diff --git a/index.js b/index.js index 74d8b4d7a..18d5f627f 100644 --- a/index.js +++ b/index.js @@ -34152,9 +34152,9 @@ var top = node; var x1 = node.__x1, - y1 = node.__y1, - __cache = node.__cache, - __offsetWidth = node.__offsetWidth, + y1 = node.__y1; + node.__cache; + var __offsetWidth = node.__offsetWidth, __offsetHeight = node.__offsetHeight; var bboxTotal = genBboxTotal(node, __structs, index, total, lv, isPpt); @@ -34225,23 +34225,7 @@ gl.viewport(0, 0, w, h); // fbo绘制对象纹理不用绑定单元,剩下的纹理绘制用0号 var lastPage, - list = []; // 先绘制自己的cache,起点所以matrix视作E为空,opacity固定1,注意被拆分时不绘制 - - if (!oitHash || !oitHash[index]) { - if (__cache && __cache.available) { - drawTextureCache(gl, [{ - cache: __cache, - opacity: 1 - }], cx, cy, dx, dy); - } - - var render = node.render; - - if (render !== DOM_RENDER && render !== IMG_RENDER && render !== GEOM_RENDER) { - node.render(renderMode, gl, dx, dy); - } - } - + list = []; var cacheTotal = __cacheTotal; for (var i = index, len = index + (total || 0) + 1; i < len; i++) { @@ -34387,16 +34371,16 @@ } } + webgl.drawOitPlane(gl, __structs, _oit, ppt, cx, cy, dx, dy); i += _total6 || 0; if (hasMask) { i += countMaskNum(__structs, i + 1, hasMask); } - webgl.drawOitPlane(gl, __structs, _oit, ppt, cx, cy, dx, dy); - var _render = _node4.render; + var render = _node4.render; - if (_render !== DOM_RENDER && _render !== IMG_RENDER && _render !== GEOM_RENDER) { + if (render !== DOM_RENDER && render !== IMG_RENDER && render !== GEOM_RENDER) { _node4.render(renderMode, gl, dx, dy); } } else { @@ -34456,9 +34440,9 @@ if (!_target4 || _target4 === _cache2) { - var _render2 = _node4.render; + var _render = _node4.render; - if (_render2 !== DOM_RENDER && _render2 !== IMG_RENDER && _render2 !== GEOM_RENDER) { + if (_render !== DOM_RENDER && _render !== IMG_RENDER && _render !== GEOM_RENDER) { drawTextureCache(gl, list.splice(0), cx, cy, dx, dy); _node4.render(renderMode, gl, dx, dy); diff --git a/index.js.map b/index.js.map index 5a9c47eb1..cef4a623b 100644 --- a/index.js.map +++ b/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["src/node/Node.js","src/refresh/mode.js","src/style/unit.js","src/math/matrix.js","src/util/util.js","src/util/debug.js","src/util/inject.js","src/util/inflate.js","src/util/opentype.js","src/style/font.js","src/style/reset.js","src/style/reg.js","src/math/vector.js","src/util/enums.js","src/math/geom.js","src/math/gradient.js","src/util/painter.js","src/style/border.js","src/style/gradient.js","src/style/abbr.js","src/animate/key.js","src/refresh/change.js","src/math/blur.js","src/style/css.js","src/style/transform.js","src/node/TextBox.js","src/node/Ellipsis.js","src/refresh/level.js","src/node/Text.js","src/util/Event.js","src/node/Component.js","src/node/inline.js","src/style/image.js","src/style/bg.js","src/animate/frame.js","src/animate/easing.js","src/animate/Animation.js","src/style/bs.js","src/style/mbm.js","src/node/Xom.js","src/node/LineBox.js","src/node/LineBoxManager.js","src/node/tag.js","src/node/geom/Geom.js","src/refresh/reflow.js","src/node/builder.js","src/node/Dom.js","src/node/Img.js","src/node/Defs.js","src/util/diff.js","src/animate/Controller.js","src/refresh/Cache.js","src/refresh/Page.js","src/gl/webgl.js","src/refresh/CanvasPage.js","src/refresh/CanvasCache.js","src/refresh/offscreen.js","src/math/equation.js","src/math/isec.js","src/gl/oit.js","src/gl/TexturePage.js","src/gl/TextureCache.js","src/refresh/ImgCanvasCache.js","src/gl/ImgWebglCache.js","src/refresh/struct.js","src/gl/ca.js","src/node/Root.js","src/math/bezier.js","src/node/geom/Line.js","src/math/bo/Point.js","src/math/bo/Segment.js","src/math/bo/intersect.js","src/math/bo/Polygon.js","src/math/bo/chain.js","src/math/bo/index.js","src/node/geom/Polyline.js","src/node/geom/Polygon.js","src/node/geom/Sector.js","src/node/geom/Rect.js","src/node/geom/Circle.js","src/node/geom/Ellipse.js","src/parser/parse.js","src/parser/abbr.js","src/parser/apply.js","src/parser/index.js","src/style/index.js","src/animate/index.js","src/math/tar.js","src/math/index.js","src/refresh/index.js","src/index.js"],"sourcesContent":["class Node {\n constructor() {\n this.__x = 0;\n this.__y = 0;\n this.__width = 0;\n this.__height = 0;\n this.__baseline = 0;\n this.__verticalBaseline = 0;\n this.__prev = null;\n this.__next = null;\n this.__parent = null;\n this.__domParent = null;\n this.__root = null;\n this.__host = null;\n this.__hostRoot = null;\n this.__virtualDom = null;\n this.__bbox = null;\n this.__filterBbox = null;\n this.__isDestroyed = true;\n }\n\n __structure(lv, j) {\n return this.__struct = {\n node: this,\n childIndex: j,\n lv,\n };\n }\n\n __offsetX(diff) {\n this.__x += diff;\n }\n\n __offsetY(diff) {\n this.__y += diff;\n }\n\n __destroy() {\n this.__isDestroyed = true;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get width() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get outerWidth() {\n return this.__width;\n }\n\n get outerHeight() {\n return this.__height;\n }\n\n get prev() {\n return this.__prev;\n }\n\n get next() {\n return this.__next;\n }\n\n get parent() {\n return this.__parent;\n }\n\n get domParent() {\n return this.__domParent;\n }\n\n // canvas/svg根节点\n get root() {\n return this.__root;\n }\n\n // component根节点\n get host() {\n return this.__host;\n }\n\n // 考虑高阶组件在内的component根节点\n get hostRoot() {\n return this.__hostRoot;\n }\n\n get baseline() {\n return this.__baseline;\n }\n\n get verticalBaseline() {\n return this.__verticalBaseline;\n }\n\n get virtualDom() {\n return this.__virtualDom;\n }\n\n get isDestroyed() {\n return this.__isDestroyed;\n }\n\n get isReplaced() {\n return false;\n }\n}\n\nexport default Node;\n","export default {\n CANVAS: 0,\n SVG: 1,\n WEBGL: 2,\n};\n","const AUTO = 0;\nconst PX = 1;\nconst PERCENT = 2;\nconst NUMBER = 3;\nconst INHERIT = 4;\nconst DEG = 5;\nconst STRING = 6;\nconst RGBA = 7;\nconst REM = 8;\nconst EM = 9;\nconst VW = 10;\nconst VH = 11;\nconst VMAX = 12;\nconst VMIN = 13;\nconst GRADIENT = 14;\n\nlet o = {\n AUTO,\n PX,\n PERCENT,\n NUMBER,\n INHERIT,\n DEG,\n STRING,\n RGBA,\n REM,\n EM,\n VW,\n VH,\n VMAX,\n VMIN,\n GRADIENT, // 特殊格式,color/fill/stroke用给ctx传值\n /**\n * 通用的格式化计算数值单位的方法,百分比/像素/REM/VW/auto和纯数字\n * @param v value\n * @returns 格式化好的[number, unit]\n */\n calUnit(v) {\n let n = parseFloat(v) || 0;\n if(/%$/.test(v)) {\n return {\n v: n,\n u: PERCENT,\n };\n }\n else if(/px$/i.test(v)) {\n return {\n v: n,\n u: PX,\n };\n }\n else if(/deg$/i.test(v)) {\n return {\n v: n,\n u: DEG,\n };\n }\n else if(/rem$/i.test(v)) {\n return {\n v: n,\n u: REM,\n };\n }\n else if(/vw$/i.test(v)) {\n return {\n v: n,\n u: VW,\n };\n }\n else if(/vh$/i.test(v)) {\n return {\n v: n,\n u: VH,\n };\n }\n else if(/em$/i.test(v)) {\n return {\n v: n,\n u: EM,\n };\n }\n else if(/vw$/i.test(v)) {\n return {\n v: n,\n u: VW,\n };\n }\n else if(/vh$/i.test(v)) {\n return {\n v: n,\n u: VH,\n };\n }\n else if(/vmax$/i.test(v)) {\n return {\n v: n,\n u: VMAX,\n };\n }\n else if(/vmin$/i.test(v)) {\n return {\n v: n,\n u: VMIN,\n };\n }\n return {\n v: n,\n u: NUMBER,\n };\n },\n};\n\nexport default o;\n","// 生成4*4单位矩阵\nfunction identity() {\n return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n}\n\n// 矩阵a*b,固定两个matrix都是长度16\nfunction multiply(a, b) {\n if(!a && !b) {\n return identity();\n }\n if(isE(a)) {\n return b;\n }\n if(isE(b)) {\n return a;\n }\n let c = [];\n for(let i = 0; i < 4; i++) {\n let a0 = a[i] || 0;\n let a1 = a[i + 4] || 0;\n let a2 = a[i + 8] || 0;\n let a3 = a[i + 12] || 0;\n c[i] = a0 * b[0] + a1 * b[1] + a2 * b[2] + a3 * b[3];\n c[i + 4] = a0 * b[4] + a1 * b[5] + a2 * b[6] + a3 * b[7];\n c[i + 8] = a0 * b[8] + a1 * b[9] + a2 * b[10] + a3 * b[11];\n c[i + 12] = a0 * b[12] + a1 * b[13] + a2 * b[14] + a3 * b[15];\n }\n return c;\n}\n\n// 特殊优化,b为tfo,因此既只有12/13/14有值\nfunction multiplyTfo(m, x, y) {\n if(!x && !y) {\n return m;\n }\n m[12] += m[0] * x + m[4] * y;\n m[13] += m[1] * x + m[5] * y;\n m[14] += m[2] * x + m[6] * y;\n m[15] += m[3] * x + m[7] * y;\n return m;\n}\n\nfunction tfoMultiply(x, y, m) {\n if(!x && !y) {\n return m;\n }\n let d = m[3], h = m[7], l = m[11], p = m[15];\n m[0] += d * x;\n m[1] += d * y;\n m[4] += h * x;\n m[5] += h * y;\n m[8] += l * x;\n m[9] += l * y;\n m[12] += p * x;\n m[13] += p * y;\n return m;\n}\n\n// 几种特殊的transform变换优化\nfunction multiplyTranslateX(m, v) {\n if(!v) {\n return m;\n }\n m[12] += m[0] * v;\n m[13] += m[1] * v;\n m[14] += m[2] * v;\n m[15] += m[3] * v;\n return m;\n}\n\nfunction multiplyTranslateY(m, v) {\n if(!v) {\n return m;\n }\n m[12] += m[4] * v;\n m[13] += m[5] * v;\n m[14] += m[6] * v;\n m[15] += m[7] * v;\n return m;\n}\n\nfunction multiplyTranslateZ(m, v) {\n if(!v) {\n return m;\n }\n m[12] += m[8] * v;\n m[13] += m[9] * v;\n m[14] += m[10] * v;\n m[15] += m[11] * v;\n return m;\n}\n\nfunction multiplyRotateX(m, v) {\n if(!v) {\n return m;\n }\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n let e = m[4], f = m[5], g = m[6], h = m[7], i = m[8], k = m[10], l = m[11];\n m[4] = e * cos + i * sin;\n m[5] = f * cos + g * sin;\n m[6] = g * cos + k * sin;\n m[7] = h * cos + l * sin;\n m[8] = e * -sin + i * cos;\n m[9] = f * -sin + g * cos;\n m[10] = g * -sin + k * cos;\n m[11] = h * -sin + l * cos;\n return m;\n}\n\nfunction multiplyRotateY(m, v) {\n if(!v) {\n return m;\n }\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n let a = m[0], b = m[1], c = m[2], d = m[3], i = m[8], j = m[9], k = m[10], l = m[11];\n m[0] = a * cos + i * -sin;\n m[1] = b * cos + j * -sin;\n m[2] = c * cos + k * -sin;\n m[3] = d * cos + l * -sin;\n m[8] = a * sin + i * cos;\n m[9] = b * sin + j * cos;\n m[10] = c * sin + k * sin;\n m[11] = d * sin + l * sin;\n return m;\n}\n\nfunction multiplyRotateZ(m, v) {\n if(!v) {\n return m;\n }\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n let a = m[0], b = m[1], c = m[2], d = m[3], e = m[4], f = m[5], g = m[6], h = m[7];\n m[0] = a * cos + e * sin;\n m[1] = b * cos + f * sin;\n m[2] = c * cos + g * sin;\n m[3] = d * cos + h * sin;\n m[4] = a * -sin + e * cos;\n m[5] = b * -sin + f * cos;\n m[6] = c * -sin + g * cos;\n m[7] = d * -sin + h * cos;\n return m;\n}\n\nfunction multiplySkewX(m, v) {\n if(!v) {\n return m;\n }\n let tan = Math.tan(v);\n m[4] += m[0] * tan;\n m[5] += m[1] * tan;\n m[6] += m[2] * tan;\n m[7] += m[3] * tan;\n return m;\n}\n\nfunction multiplySkewY(m, v) {\n if(!v) {\n return m;\n }\n let tan = Math.tan(v);\n m[0] += m[4] * tan;\n m[1] += m[5] * tan;\n m[2] += m[6] * tan;\n m[3] += m[7] * tan;\n return m;\n}\n\nfunction multiplyScaleX(m, v) {\n if(v === 1) {\n return m;\n }\n m[0] *= v;\n m[1] *= v;\n m[2] *= v;\n m[3] *= v;\n return m;\n}\n\nfunction multiplyScaleY(m, v) {\n if(v === 1) {\n return m;\n }\n m[4] *= v;\n m[5] *= v;\n m[6] *= v;\n m[7] *= v;\n return m;\n}\n\nfunction multiplyScaleZ(m, v) {\n if(v === 1) {\n return m;\n }\n m[8] *= v;\n m[9] *= v;\n m[10] *= v;\n m[11] *= v;\n return m;\n}\n\nfunction multiplyPerspective(m, v) {\n if(!v || v <= 0) {\n return m;\n }\n v = Math.max(v, 1);\n v = -1 / v;\n m[8] += m[12] * v;\n m[9] += m[13] * v;\n m[10] += m[14] * v;\n m[11] += m[15] * v;\n return m;\n}\n\nfunction calPoint(point, m) {\n if(m && !isE(m)) {\n let { x, y, z, w } = point;\n z = z || 0;\n if(w === undefined || w === null) {\n w = 1;\n }\n let a1 = m[0], b1 = m[1], c1 = m[2], d1 = m[3];\n let a2 = m[4], b2 = m[5], c2 = m[6], d2 = m[7];\n let a3 = m[8], b3 = m[9], c3 = m[10], d3 = m[11];\n let a4 = m[12], b4 = m[13], c4 = m[14], d4 = m[15];\n let o = {\n x: ((a1 === 1) ? x : (x * a1)) + (a2 ? (y * a2) : 0) + ((w === 1) ? a4 : a4 * w),\n y: ((b1 === 1) ? x : (x * b1)) + (b2 ? (y * b2) : 0) + ((w === 1) ? b4 : b4 * w),\n z: 0,\n w,\n };\n if(d1 || d2 || d3) {\n o.w = x * d1 + y * d2 + z * d3 + d4 * w;\n }\n else if(d4 !== 1) {\n o.w *= d4;\n }\n if(z) {\n o.x += z * a3;\n o.y += z * b3;\n o.z = x * c1 + y * c2 + c4 + z * c3;\n }\n else if(c1 || c2 || c4) {\n o.z = x * c1 + y * c2 + c4;\n }\n return o;\n }\n return point;\n}\n\n/**\n * 初等行变换求3*3特定css的matrix方阵,一维6长度\n * https://blog.csdn.net/iloveas2014/article/details/82930946\n */\nfunction inverse(m) {\n if(m.length === 16) {\n return inverse4(m);\n }\n let a = m[0], b = m[1], c = m[2], d = m[3], e = m[4], f = m[5];\n if(a === 1 && b === 0 && c === 0 && d === 1 && e === 0 && f === 0) {\n return m;\n }\n let divisor = a * d - b * c;\n if(divisor === 0) {\n return m;\n }\n return [d / divisor, -b / divisor, -c / divisor, a / divisor,\n (c * f - d * e) / divisor, (b * e - a * f) / divisor];\n}\n\n// 16位或者6位单位矩阵判断,空也认为是\nfunction isE(m) {\n if(!m || !m.length) {\n return true;\n }\n if(m.length === 16) {\n return m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 0\n && m[4] === 0 && m[5] === 1 && m[6] === 0 && m[7] === 0\n && m[8] === 0 && m[9] === 0 && m[10] === 1 && m[11] === 0\n && m[12] === 0 && m[13] === 0 && m[14] === 0 && m[15] === 1;\n }\n return m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 1 && m[4] === 0 && m[5] === 0;\n}\n\n/**\n * 求任意4*4矩阵的逆矩阵,行列式为 0 则返回单位矩阵兜底\n * 格式:matrix3d(a1, b1, c1, d1, a2, b2, c2, d2, a3, b3, c3, d3, a4, b4, c4, d4)\n * 参见: https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix3d()\n * 对应:\n * [\n * a1,a2,a3,a4,\n * b1,b2,b3,b4,\n * c1,c2,c3,c4,\n * d1,d2,d3,d4,\n * ]\n *\n * 根据公式 A* = |A|A^-1 来计算\n * A* 表示矩阵 A 的伴随矩阵,A^-1 表示矩阵 A 的逆矩阵,|A| 表示行列式的值\n *\n * @returns {number[]}\n */\n\nfunction inverse4(s) {\n let inv = [];\n\n inv[0] = s[5] * s[10] * s[15] - s[5] * s[11] * s[14] - s[9] * s[6] * s[15]\n + s[9] * s[7] * s[14] + s[13] * s[6] * s[11] - s[13] * s[7] * s[10];\n inv[4] = -s[4] * s[10] * s[15] + s[4] * s[11] * s[14] + s[8] * s[6] * s[15]\n - s[8] * s[7] * s[14] - s[12] * s[6] * s[11] + s[12] * s[7] * s[10];\n inv[8] = s[4] * s[9] * s[15] - s[4] * s[11] * s[13] - s[8] * s[5] * s[15]\n + s[8] * s[7] * s[13] + s[12] * s[5] * s[11] - s[12] * s[7] * s[9];\n inv[12] = -s[4] * s[9] * s[14] + s[4] * s[10] * s[13] + s[8] * s[5] * s[14]\n - s[8] * s[6] * s[13] - s[12] * s[5] * s[10] + s[12] * s[6] * s[9];\n\n inv[1] = -s[1] * s[10] * s[15] + s[1] * s[11] * s[14] + s[9] * s[2] * s[15]\n - s[9] * s[3] * s[14] - s[13] * s[2] * s[11] + s[13] * s[3] * s[10];\n inv[5] = s[0] * s[10] * s[15] - s[0] * s[11] * s[14] - s[8] * s[2] * s[15]\n + s[8] * s[3] * s[14] + s[12] * s[2] * s[11] - s[12] * s[3] * s[10];\n inv[9] = -s[0] * s[9] * s[15] + s[0] * s[11] * s[13] + s[8] * s[1] * s[15]\n - s[8] * s[3] * s[13] - s[12] * s[1] * s[11] + s[12] * s[3] * s[9];\n inv[13] = s[0] * s[9] * s[14] - s[0] * s[10] * s[13] - s[8] * s[1] * s[14]\n + s[8] * s[2] * s[13] + s[12] * s[1] * s[10] - s[12] * s[2] * s[9];\n\n inv[2] = s[1] * s[6] * s[15] - s[1] * s[7] * s[14] - s[5] * s[2] * s[15]\n + s[5] * s[3] * s[14] + s[13] * s[2] * s[7] - s[13] * s[3] * s[6];\n inv[6] = -s[0] * s[6] * s[15] + s[0] * s[7] * s[14] + s[4] * s[2] * s[15]\n - s[4] * s[3] * s[14] - s[12] * s[2] * s[7] + s[12] * s[3] * s[6];\n inv[10] = s[0] * s[5] * s[15] - s[0] * s[7] * s[13] - s[4] * s[1] * s[15]\n + s[4] * s[3] * s[13] + s[12] * s[1] * s[7] - s[12] * s[3] * s[5];\n inv[14] = -s[0] * s[5] * s[14] + s[0] * s[6] * s[13] + s[4] * s[1] * s[14]\n - s[4] * s[2] * s[13] - s[12] * s[1] * s[6] + s[12] * s[2] * s[5];\n\n inv[3] = -s[1] * s[6] * s[11] + s[1] * s[7] * s[10] + s[5] * s[2] * s[11]\n - s[5] * s[3] * s[10] - s[9] * s[2] * s[7] + s[9] * s[3] * s[6];\n inv[7] = s[0] * s[6] * s[11] - s[0] * s[7] * s[10] - s[4] * s[2] * s[11]\n + s[4] * s[3] * s[10] + s[8] * s[2] * s[7] - s[8] * s[3] * s[6];\n inv[11] = -s[0] * s[5] * s[11] + s[0] * s[7] * s[9] + s[4] * s[1] * s[11]\n - s[4] * s[3] * s[9] - s[8] * s[1] * s[7] + s[8] * s[3] * s[5];\n inv[15] = s[0] * s[5] * s[10] - s[0] * s[6] * s[9] - s[4] * s[1] * s[10]\n + s[4] * s[2] * s[9] + s[8] * s[1] * s[6] - s[8] * s[2] * s[5];\n\n let det = s[0] * inv[0] + s[1] * inv[4] + s[2] * inv[8] + s[3] * inv[12];\n if (det === 0) {\n return identity();\n }\n\n det = 1 / det;\n let d = [];\n for (let i = 0; i < 16; i++) {\n d[i] = inv[i] * det;\n }\n return d;\n}\n\n// 将4*4的16长度矩阵转成css/canvas的6位标准使用,忽略transform3d\nfunction m2m6(m) {\n return [\n m[0],\n m[1],\n m[4],\n m[5],\n m[12],\n m[13],\n ];\n}\n\nfunction point2d(point) {\n let w = point[3];\n if(w && w !== 1) {\n point = point.slice(0, 2);\n point[0] /= w;\n point[1] /= w;\n }\n return point;\n}\n\nfunction calRectPoint(xa, ya, xb, yb, matrix) {\n let { x: x1, y: y1, z: z1, w: w1 } = calPoint({ x: xa, y: ya, z: 0, w: 1 }, matrix);\n let { x: x3, y: y3, z: z3, w: w3 } = calPoint({ x: xb, y: yb, z: 0, w: 1 }, matrix);\n let x2, y2, z2, w2, x4, y4, z4, w4;\n // 无旋转的时候可以少算2个点\n if(w1 === 1 && w3 === 1\n && (!matrix || !matrix.length\n || !matrix[1] && !matrix[2] && !matrix[4] && !matrix[6] && !matrix[7] && !matrix[8])) {\n x2 = x3;\n y2 = y1;\n z2 = z3;\n x4 = x1;\n y4 = y3;\n z2 = z4 = z1;\n w2 = w4 = 1;\n }\n else {\n let t = calPoint({ x: xb, y: ya, z: 0, w: 1 }, matrix);\n x2 = t.x; y2 = t.y; z2 = t.z; w2 = t.w;\n t = calPoint({ x: xa, y: yb, z: 0, w: 1 }, matrix);\n x4 = t.x; y4 = t.y; z4 = t.z; w4 = t.w;\n }\n return { x1, y1, z1, w1, x2, y2, z2, w2, x3, y3, z3, w3, x4, y4, z4, w4 };\n}\n\nexport default {\n identity,\n multiply,\n multiplyTfo,\n tfoMultiply,\n multiplyTranslateX,\n multiplyTranslateY,\n multiplyTranslateZ,\n multiplyRotateX,\n multiplyRotateY,\n multiplyRotateZ,\n multiplySkewX,\n multiplySkewY,\n multiplyScaleX,\n multiplyScaleY,\n multiplyScaleZ,\n multiplyPerspective,\n calPoint,\n calRectPoint,\n point2d,\n inverse,\n isE,\n m2m6,\n};\n","import mx from '../math/matrix';\n\nlet toString = {}.toString;\nfunction isType(type) {\n return function(obj) {\n return toString.call(obj) === '[object ' + type + ']';\n }\n}\n\nlet isObject = isType('Object');\nlet isString = isType('String');\nlet isFunction = isType('Function');\nlet isNumber = isType('Number');\nlet isBoolean = isType('Boolean');\nlet isDate = isType('Date');\n\nlet hasOwn = {}.hasOwnProperty;\nlet fnToString = hasOwn.toString;\nlet ObjectFunctionString = fnToString.call(Object);\n\nfunction isNil(v) {\n return v === undefined || v === null;\n}\n\nfunction joinSourceArray(arr) {\n let res = '';\n for(let i = 0, len = arr.length; i < len; i++) {\n let item = arr[i];\n if(Array.isArray(item)) {\n res += joinSourceArray(item);\n }\n else {\n res += stringify(item);\n }\n }\n return res;\n}\n\nfunction stringify(s) {\n if(isNil(s)) {\n return '';\n }\n return s.toString();\n}\n\nfunction encodeHtml(s, prop) {\n if(prop) {\n return s.replace(/\"/g, '"');\n }\n return s.replace(/&/g, '&').replace(/ {\n s += joinDef(item);\n });\n s += '';\n vd.bb.forEach(item => {\n s += joinVd(item);\n });\n s += ' {\n s += joinVd(item);\n });\n s += '';\n return s;\n}\n\n// 普通元素\nfunction joinVd(vd) {\n if(vd.type === 'item' || vd.type === 'img') {\n let s = '';\n (vd.props || []).forEach(item => {\n s += ' ' + item[0] + '=\"' + item[1] + '\"';\n });\n if(vd.tagName === 'text') {\n return '' + vd.content + '';\n }\n return '<' + vd.tagName + s + '/>';\n }\n else if(vd.type === 'text') {\n let s = '';\n // text有许多lineBox\n (vd.children || []).forEach(item => {\n s += joinVd(item);\n });\n return '' + s + '';\n }\n else if(vd.type === 'dom' || vd.type === 'geom') {\n let s = '';\n vd.bb.forEach(item => {\n s += joinVd(item);\n });\n s += ' {\n s += joinVd(item);\n });\n s += '';\n let { opacity, transform, visibility, mask, overflow, filter, mixBlendMode } = vd;\n return '' + s + '';\n }\n}\n\nfunction joinDef(def) {\n let s = '<' + def.tagName + ' id=\"' + def.uuid + '\"';\n if(def.tagName === 'mask' || def.tagName === 'clipPath') {\n // s += ' maskUnits=\"userSpaceOnUse\"';\n }\n else if(def.tagName === 'filter') {\n // s += ' filterUnits=\"userSpaceOnUse\"';\n }\n else {\n s += ' gradientUnits=\"userSpaceOnUse\"';\n }\n (def.props || []).forEach(item => {\n s += ' ' + item[0] + '=\"' + item[1] + '\"';\n });\n s += '>';\n (def.children || []).forEach(item => {\n s += joinItem(item);\n });\n s += '';\n return s;\n}\n\nfunction joinItem(item) {\n let s = '<' + item.tagName;\n (item.props || []).forEach(item => {\n s += ' ' + item[0] + '=\"' + item[1] + '\"';\n });\n s += '>';\n return s;\n}\n\nfunction rgba2int(color) {\n if(Array.isArray(color)) {\n return color;\n }\n let res = [];\n if(!color || color === 'transparent') {\n res = [0, 0, 0, 0];\n }\n else if(color.charAt(0) === '#') {\n color = color.slice(1);\n if(color.length === 3) {\n res.push(parseInt(color.charAt(0) + color.charAt(0), 16));\n res.push(parseInt(color.charAt(1) + color.charAt(1), 16));\n res.push(parseInt(color.charAt(2) + color.charAt(2), 16));\n res[3] = 1;\n }\n else if(color.length === 6) {\n res.push(parseInt(color.slice(0, 2), 16));\n res.push(parseInt(color.slice(2, 4), 16));\n res.push(parseInt(color.slice(4), 16));\n res[3] = 1;\n }\n else if(color.length === 8) {\n res.push(parseInt(color.slice(0, 2), 16));\n res.push(parseInt(color.slice(2, 4), 16));\n res.push(parseInt(color.slice(4, 6), 16));\n res.push(parseInt(color.slice(6), 16) / 255);\n }\n else {\n res[0] = res[1] = res[2] = 0;\n res[3] = 1;\n }\n }\n else {\n let c = color.match(/rgba?\\s*\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*,\\s*([\\d.]+)(?:\\s*,\\s*([\\d.]+))?\\s*\\)/i);\n if(c) {\n res = [parseInt(c[1]), parseInt(c[2]), parseInt(c[3])];\n if(!isNil(c[4])) {\n res[3] = parseFloat(c[4]);\n }\n else {\n res[3] = 1;\n }\n }\n else {\n res = [0, 0, 0, 0];\n }\n }\n return res;\n}\n\nfunction int2rgba(color) {\n if(Array.isArray(color)) {\n if(color.length === 3 || color.length === 4) {\n color[0] = Math.floor(Math.max(color[0], 0));\n color[1] = Math.floor(Math.max(color[1], 0));\n color[2] = Math.floor(Math.max(color[2], 0));\n if(color.length === 4) {\n color[3] = Math.max(color[3], 0);\n return 'rgba(' + color[0] + ',' + color[1] + ',' + color[2] + ',' + color[3] + ')';\n }\n return 'rgba(' + color[0] + ',' + color[1] + ',' + color[2] + ',1)';\n }\n // if(color.length === 4) {\n // color = color.map((c, i) => i === 3 ? c : Math.floor(Math.max(0, c)));\n // return 'rgba(' + joinArr(color, ',') + ')';\n // }\n // else if(color.length === 3) {\n // color = color.map(c => Math.floor(c));\n // return 'rgba(' + joinArr(color, ',') + ',1)';\n // }\n }\n return color || 'rgba(0,0,0,0)';\n}\n\nfunction int2invert(color) {\n if(Array.isArray(color)) {\n color = color.slice(0);\n color[0] = 255 - color[0];\n color[1] = 255 - color[1];\n color[2] = 255 - color[2];\n if(color.length === 4) {\n return 'rgba(' + joinArr(color, ',') + ')';\n }\n else if(color.length === 3) {\n return 'rgba(' + joinArr(color, ',') + ',1)';\n }\n }\n return 'rgba(0,0,0,0)';\n}\n\nfunction arr2hash(arr) {\n let hash = {};\n for(let i = 0, len = arr.length; i < len; i++) {\n let item = arr[i];\n if(Array.isArray(item)) {\n hash[item[0]] = item[1];\n }\n else {\n for(let list = Object.keys(item), j = list.length - 1; j >= 0; j--) {\n let k = list[j];\n hash[k] = item[k];\n }\n }\n }\n return hash;\n}\n\nfunction hash2arr(hash) {\n if(Array.isArray(hash)) {\n return hash;\n }\n let arr = [];\n for(let list = Object.keys(hash), i = 0, len = list.length; i < len; i++) {\n let k = list[i];\n arr.push([k, hash[k]]);\n }\n return arr;\n}\n\nfunction clone(obj) {\n if(isNil(obj) || typeof obj !== 'object') {\n return obj;\n }\n if(util.isDate(obj)) {\n return new Date(obj);\n }\n if(!isPlainObject(obj) && !Array.isArray(obj)) {\n return obj;\n }\n let n = Array.isArray(obj) ? [] : {};\n Object.keys(obj).forEach(i => {\n n[i] = clone(obj[i]);\n });\n return n;\n}\n\n/**\n * 简化的arr对比,arr中只有arr和其它类型,其它类型对比值或引用,arr递归\n * @param a\n * @param b\n * @returns {boolean}\n */\nfunction equalArr(a, b) {\n if(!a || !b) {\n return a === b;\n }\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let ai = a[i];\n let bi = b[i];\n let isArrayA = Array.isArray(ai);\n let isArrayB = Array.isArray(bi);\n if(isArrayA && isArrayB) {\n if(!equalArr(ai, bi)) {\n return false;\n }\n }\n else if(isArrayA || isArrayB) {\n return false;\n }\n else if(ai !== bi) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * 深度对比对象\n * @param a\n * @param b\n * @returns {boolean}\n */\nfunction equal(a, b) {\n if(a === b) {\n return true;\n }\n if(isObject(a) && isObject(b)) {\n let hash = {};\n for(let i = 0, arr = Object.keys(a), len = arr.length; i < len; i++) {\n let k = arr[i];\n if(!b.hasOwnProperty(k) || !equal(a[k], b[k])) {\n return false;\n }\n hash[k] = true;\n }\n // a没有b有则false\n for(let i = 0, arr = Object.keys(b), len = arr.length; i < len; i++) {\n let k = arr[i];\n if(!hash.hasOwnProperty(k)) {\n return false;\n }\n }\n }\n else if(isDate(a) && isDate(b)) {\n return a.getTime() === b.getTime();\n }\n else if(Array.isArray(a) && Array.isArray(b)) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n if(!equal(a[i], b[i])) {\n return false;\n }\n }\n }\n else {\n return a === b;\n }\n return true;\n}\n\nfunction extend(target, source, keys) {\n if(source === null || typeof source !== 'object') {\n return target;\n }\n if(!keys) {\n keys = Object.keys(source);\n }\n let i = 0;\n let len = keys.length;\n while(i < len) {\n let k = keys[i];\n target[k] = source[k];\n i++;\n }\n return target;\n}\n\nfunction joinArr(arr, split) {\n let s = arr.length ? arr[0] : '';\n for(let i = 1, len = arr.length; i < len; i++) {\n s += split + arr[i];\n }\n return s;\n}\n\nfunction transformBbox(bbox, matrix, dx = 0, dy = 0) {\n if(!mx.isE(matrix)) {\n let [x1, y1, x2, y2] = bbox;\n // 可能因filter的原因扩展范围\n if(dx) {\n x1 -= dx;\n x2 += dx;\n }\n if(dy) {\n y1 -= dy;\n y2 += dy;\n }\n let list = [x2, y1, x1, y2, x2, y2];\n let w;\n let t = mx.calPoint({ x: x1, y: y1, z: 0, w: 1 }, matrix);\n x1 = t.x; y1 = t.y; w = t.w;\n if(w && w !== 1) {\n x1 /= w;\n y1 /= w;\n }\n let xa = x1, ya = y1, xb = x1, yb = y1;\n for(let i = 0; i < 6; i += 2) {\n let x = list[i], y = list[i + 1];\n let t = mx.calPoint({ x, y, z: 0, w: 1 }, matrix);\n x = t.x; y = t.y; w = t.w;\n if(w && w !== 1) {\n x /= w;\n y /= w;\n }\n xa = Math.min(xa, x);\n xb = Math.max(xb, x);\n ya = Math.min(ya, y);\n yb = Math.max(yb, y);\n }\n return [xa, ya, xb, yb];\n }\n else {\n bbox = bbox.slice(0);\n if(dx || dy) {\n bbox = bbox.slice(0);\n bbox[0] -= dx;\n bbox[1] -= dy;\n bbox[2] += dx;\n bbox[3] += dy;\n }\n }\n return bbox;\n}\n\nfunction isPlainObject(obj) {\n if(!obj || toString.call(obj) !== '[object Object]') {\n return false;\n }\n let proto = Object.getPrototypeOf(obj);\n if(!proto) {\n return true;\n }\n let Ctor = hasOwn.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor === 'function' && fnToString.call(Ctor) === ObjectFunctionString;\n}\n\nfunction assignMatrix(t, v) {\n if(t && v) {\n t[0] = v[0];\n t[1] = v[1];\n t[2] = v[2];\n t[3] = v[3];\n t[4] = v[4];\n t[5] = v[5];\n t[6] = v[6];\n t[7] = v[7];\n t[8] = v[8];\n t[9] = v[9];\n t[10] = v[10];\n t[11] = v[11];\n t[12] = v[12];\n t[13] = v[13];\n t[14] = v[14];\n t[15] = v[15];\n }\n return t;\n}\n\nfunction prefixHex(s) {\n if(s.length === 1) {\n return '0' + s;\n }\n return s;\n}\n\nfunction replaceRgba2Hex(s) {\n return (s || '').replace(/rgba?\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*([\\d.]+)\\s*)?\\)/ig, function($0, $1, $2, $3, $4) {\n let res = '#'\n + prefixHex(parseInt($1).toString(16))\n + prefixHex(parseInt($2).toString(16))\n + prefixHex(parseInt($3).toString(16));\n if($4) {\n res += prefixHex(Math.floor(parseFloat($4) * 255).toString(16));\n }\n return res;\n });\n}\n\nlet util = {\n isObject,\n isString,\n isFunction,\n isNumber,\n isBoolean,\n isDate,\n isNil,\n isPrimitive(v) {\n return util.isNil(v) || util.isBoolean(v) || util.isString(v) || util.isNumber(v);\n },\n // css中常用undefined/null表示auto本身\n isAuto(v) {\n return isNil(v) || v === 'auto';\n },\n isPlainObject,\n stringify,\n joinSourceArray(arr) {\n return joinSourceArray(arr);\n },\n encodeHtml,\n joinVirtualDom,\n joinVd,\n joinDef,\n rgba2int,\n int2rgba,\n int2invert,\n arr2hash,\n hash2arr,\n clone,\n equalArr,\n equal,\n extend,\n joinArr,\n transformBbox,\n assignMatrix,\n prefixHex,\n replaceRgba2Hex,\n};\n\nexport default util;\n","export default {\n flag: false,\n};\n","import util from './util';\nimport debug from './debug';\n\nconst SPF = 1000 / 60;\n\nconst CANVAS = {};\nconst SUPPORT_OFFSCREEN_CANVAS = typeof OffscreenCanvas === 'function' && OffscreenCanvas.prototype.getContext;\n\nfunction offscreenCanvas(key, width, height, message) {\n let o;\n if(!key) {\n o = !debug.flag && SUPPORT_OFFSCREEN_CANVAS ? new OffscreenCanvas(width, height) : document.createElement('canvas');\n }\n else if(!CANVAS[key]) {\n o = CANVAS[key] = !debug.flag && SUPPORT_OFFSCREEN_CANVAS ? new OffscreenCanvas(width, height) : document.createElement('canvas');\n }\n else {\n o = CANVAS[key];\n }\n o.width = width;\n o.height = height;\n if(debug.flag) {\n o.style.width = width + 'px';\n o.style.height = height + 'px';\n if(key) {\n o.setAttribute('key', key);\n }\n if(message) {\n o.setAttribute('message', message);\n }\n document.body.appendChild(o);\n }\n let ctx = o.getContext('2d');\n return {\n canvas: o,\n ctx,\n enabled: true,\n available: true,\n release() {\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, width, height);\n this.available = false;\n },\n };\n}\n\nconst IMG = {};\nconst INIT = 0;\nconst LOADING = 1;\nconst LOADED = 2;\nconst FONT = {};\nconst COMPONENT = {};\nlet div;\n\nconst SUPPORT_FONT = {};\nlet defaultFontFamilyData;\n\nfunction createDiv() {\n div = document.createElement('div');\n div.style.position = 'absolute';\n div.style.left = '99999px';\n div.style.top = '-99999px';\n div.style.visibility = 'hidden';\n div.style.whiteSpace = 'nowrap';\n document.body.appendChild(div);\n}\n\nlet inject = {\n measureTextSync(str, ff, fs, fw, isUpright) {\n if(!div) {\n createDiv();\n }\n div.style.fontFamily = ff;\n div.style.fontSize = fs + 'px';\n div.style.fontWeight = fw;\n if(isUpright) {\n div.style.writingMode = 'vertical-lr';\n }\n else {\n div.style.writingMode = 'horizontal-tb';\n }\n div.innerHTML = str.replace(/';\n }\n div.innerHTML = s;\n let max = 0;\n let cns = div.childNodes;\n for(let i = 0, len = cns.length; i < len; i++) {\n let node = cns[i];\n // clientWidth只返回ceil整数,精度必须用getComputedStyle\n max = Math.max(max, parseFloat(window.getComputedStyle(node, null).width));\n }\n return max;\n },\n IMG,\n INIT,\n LOADED,\n LOADING,\n measureImg(url, cb) {\n if(Array.isArray(url)) {\n if(!url.length) {\n return cb && cb();\n }\n let count = 0;\n let len = url.length;\n let list = [];\n url.forEach((item, i) => {\n inject.measureImg(item, function(cache) {\n list[i] = cache;\n if(++count === len) {\n cb && cb(list);\n }\n });\n });\n return;\n }\n else if(!url || !util.isString(url)) {\n inject.error('Measure img invalid: ' + url);\n cb && cb({\n state: LOADED,\n success: false,\n url,\n });\n return;\n }\n let cache = IMG[url] = IMG[url] || {\n state: INIT,\n task: [],\n };\n if(cache.state === LOADED) {\n cb && cb(cache);\n }\n else if(cache.state === LOADING) {\n cb && cache.task.push(cb);\n }\n else {\n cache.state = LOADING;\n cb && cache.task.push(cb);\n let img = new Image();\n img.onload = function() {\n cache.state = LOADED;\n cache.success = true;\n cache.width = img.width;\n cache.height = img.height;\n cache.source = img;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n };\n img.onerror = function(e) {\n cache.state = LOADED;\n cache.success = false;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n };\n if(url.substr(0, 5) !== 'data:') {\n let host = /^(?:\\w+:)?\\/\\/([^/:]+)/.exec(url);\n if(host) {\n if(typeof location === 'undefined' || location.hostname !== host[1]) {\n img.crossOrigin = 'anonymous';\n }\n }\n }\n img.src = url;\n if(debug.flag && typeof document !== 'undefined') {\n document.body.appendChild(img);\n }\n }\n },\n warn(s) {\n console.warn(s);\n },\n error(s) {\n console.error(s);\n },\n requestAnimationFrame(cb) {\n if(!cb) {\n return;\n }\n let res;\n if(typeof requestAnimationFrame !== 'undefined') {\n inject.requestAnimationFrame = requestAnimationFrame.bind(null);\n res = requestAnimationFrame(cb);\n }\n else {\n res = setTimeout(cb, SPF);\n inject.requestAnimationFrame = function(cb) {\n return setTimeout(cb, SPF);\n };\n }\n return res;\n },\n cancelAnimationFrame(id) {\n let res;\n if(typeof cancelAnimationFrame !== 'undefined') {\n inject.cancelAnimationFrame = cancelAnimationFrame.bind(null);\n res = cancelAnimationFrame(id);\n }\n else {\n res = clearTimeout(id);\n inject.cancelAnimationFrame = function(id) {\n return clearTimeout(id);\n };\n }\n return res;\n },\n now() {\n if(typeof performance !== 'undefined') {\n inject.now = function() {\n return Math.floor(performance.now());\n };\n return Math.floor(performance.now());\n }\n inject.now = Date.now.bind(Date);\n return Date.now();\n },\n hasOffscreenCanvas(key) {\n return key && CANVAS.hasOwnProperty(key);\n },\n getOffscreenCanvas(width, height, key, message) {\n return offscreenCanvas(key, width, height, message);\n },\n isDom(o) {\n if(o) {\n if(util.isString(o)) {\n return true;\n }\n if(typeof window !== 'undefined' && window.Element && (o instanceof window.Element)) {\n return true;\n }\n if(typeof window !== 'undefined' && window.OffscreenCanvas && (o instanceof window.OffscreenCanvas)) {\n return true;\n }\n // worker\n if(typeof self !== 'undefined' && self.OffscreenCanvas && (o instanceof self.OffscreenCanvas)) {\n return true;\n }\n if(util.isFunction(o.getElementsByTagName)) {\n return true;\n }\n }\n return false;\n },\n isWebGLTexture(o) {\n if(o && typeof WebGLTexture !== 'undefined') {\n return o instanceof WebGLTexture;\n }\n },\n defaultFontFamily: 'arial',\n getFontCanvas() {\n return inject.getOffscreenCanvas(16, 16, '__$$CHECK_SUPPORT_FONT_FAMILY$$__', null);\n },\n checkSupportFontFamily(ff) {\n ff = ff.toLowerCase();\n // 强制arial兜底\n if(ff === this.defaultFontFamily) {\n return true;\n }\n if(SUPPORT_FONT.hasOwnProperty(ff)) {\n return SUPPORT_FONT[ff];\n }\n let canvas = inject.getFontCanvas();\n let context = canvas.ctx;\n context.textAlign = 'center';\n context.fillStyle = '#000';\n context.textBaseline = 'middle';\n if(!defaultFontFamilyData) {\n context.clearRect(0, 0, 16, 16);\n context.font = '16px ' + this.defaultFontFamily;\n context.fillText('a', 8, 8);\n defaultFontFamilyData = context.getImageData(0, 0, 16, 16).data;\n }\n context.clearRect(0, 0, 16, 16);\n if(/\\s/.test(ff)) {\n ff = '\"' + ff.replace(/\"/g, '\\\\\"') + '\"';\n }\n context.font = '16px ' + ff + ',' + this.defaultFontFamily;\n context.fillText('a', 8, 8);\n let data = context.getImageData(0, 0, 16, 16).data;\n for(let i = 0, len = data.length; i < len; i++) {\n if(defaultFontFamilyData[i] !== data[i]) {\n return SUPPORT_FONT[ff] = true;\n }\n }\n return SUPPORT_FONT[ff] = false;\n },\n FONT,\n loadFont(fontFamily, url, cb) {\n if(util.isFunction(url)) {\n cb = url;\n url = fontFamily;\n }\n if(Array.isArray(url)) {\n if(!url.length) {\n return cb();\n }\n let count = 0;\n let len = url.length;\n let list = [];\n url.forEach((item, i) => {\n inject.loadFont(item.fontFamily, item.url, function(cache) {\n list[i] = cache;\n if(++count === len) {\n cb(list);\n }\n });\n });\n return;\n }\n else if(!url || !util.isString(url)) {\n inject.error('Load font invalid: ' + url);\n cb && cb({\n state: LOADED,\n success: false,\n url,\n });\n return;\n }\n if(!fontFamily) {\n fontFamily = url;\n }\n let cache = FONT[url] = FONT[url] || {\n state: INIT,\n task: [],\n };\n if(cache.state === LOADED) {\n cb && cb(cache);\n }\n else if(cache.state === LOADING) {\n cb && cache.task.push(cb);\n }\n else {\n cache.state = LOADING;\n cb && cache.task.push(cb);\n if(url instanceof ArrayBuffer) {\n success(url);\n }\n else {\n let request = new XMLHttpRequest();\n request.open('get', url, true);\n request.responseType = 'arraybuffer';\n request.onload = function() {\n if(request.response) {\n success(request.response);\n }\n else {\n error();\n }\n };\n request.onerror = error;\n request.send();\n }\n function success(ab) {\n let f = new FontFace(fontFamily, ab);\n f.load().then(function() {\n if(typeof document !== 'undefined') {\n document.fonts.add(f);\n }\n cache.state = LOADED;\n cache.success = true;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache, ab));\n }).catch(error);\n }\n function error() {\n cache.state = LOADED;\n cache.success = false;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n }\n }\n },\n loadComponent(url, cb) {\n if(Array.isArray(url)) {\n if(!url.length) {\n return cb();\n }\n let count = 0;\n let len = url.length;\n let list = [];\n url.forEach((item, i) => {\n inject.loadComponent(item, function(cache) {\n list[i] = cache;\n if(++count === len) {\n cb(list);\n }\n });\n });\n return;\n }\n else if(!url || !util.isString(url)) {\n inject.error('Load component invalid: ' + url);\n cb && cb({\n state: LOADED,\n success: false,\n url,\n });\n return;\n }\n let cache = COMPONENT[url] = COMPONENT[url] || {\n state: INIT,\n task: [],\n };\n if(cache.state === LOADED) {\n cb && cb(cache);\n }\n else if(cache.state === LOADING) {\n cb && cache.task.push(cb);\n }\n else {\n cache.state = LOADING;\n cb && cache.task.push(cb);\n let script = document.createElement('script');\n script.src = url;\n script.async = true;\n script.onload = function() {\n cache.state = LOADED;\n cache.success = true;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n document.head.removeChild(script);\n };\n script.onerror = function() {\n cache.state = LOADED;\n cache.success = false;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n document.head.removeChild(script);\n };\n document.head.appendChild(script);\n }\n },\n};\n\nexport default inject;\n","let TINF_OK = 0;\nlet TINF_DATA_ERROR = -3;\n\nfunction Tree() {\n this.table = new Uint16Array(16); /* table of code length counts */\n this.trans = new Uint16Array(288); /* code -> symbol translation table */\n}\n\nfunction Data(source, dest) {\n this.source = source;\n this.sourceIndex = 0;\n this.tag = 0;\n this.bitcount = 0;\n\n this.dest = dest;\n this.destLen = 0;\n\n this.ltree = new Tree(); /* dynamic length/symbol tree */\n this.dtree = new Tree(); /* dynamic distance tree */\n}\n\n/* --------------------------------------------------- *\n * -- uninitialized global data (static structures) -- *\n * --------------------------------------------------- */\n\nlet sltree = new Tree();\nlet sdtree = new Tree();\n\n/* extra bits and base tables for length codes */\nlet length_bits = new Uint8Array(30);\nlet length_base = new Uint16Array(30);\n\n/* extra bits and base tables for distance codes */\nlet dist_bits = new Uint8Array(30);\nlet dist_base = new Uint16Array(30);\n\n/* special ordering of code length codes */\nlet clcidx = new Uint8Array([\n 16, 17, 18, 0, 8, 7, 9, 6,\n 10, 5, 11, 4, 12, 3, 13, 2,\n 14, 1, 15\n]);\n\n/* used by tinf_decode_trees, avoids allocations every call */\nlet code_tree = new Tree();\nlet lengths = new Uint8Array(288 + 32);\n\n/* ----------------------- *\n * -- utility functions -- *\n * ----------------------- */\n\n/* build extra bits and base tables */\nfunction tinf_build_bits_base(bits, base, delta, first) {\n let i, sum;\n\n /* build bits table */\n for (i = 0; i < delta; ++i) bits[i] = 0;\n for (i = 0; i < 30 - delta; ++i) bits[i + delta] = i / delta | 0;\n\n /* build base table */\n for (sum = first, i = 0; i < 30; ++i) {\n base[i] = sum;\n sum += 1 << bits[i];\n }\n}\n\n/* build the fixed huffman trees */\nfunction tinf_build_fixed_trees(lt, dt) {\n let i;\n\n /* build fixed length tree */\n for (i = 0; i < 7; ++i) lt.table[i] = 0;\n\n lt.table[7] = 24;\n lt.table[8] = 152;\n lt.table[9] = 112;\n\n for (i = 0; i < 24; ++i) lt.trans[i] = 256 + i;\n for (i = 0; i < 144; ++i) lt.trans[24 + i] = i;\n for (i = 0; i < 8; ++i) lt.trans[24 + 144 + i] = 280 + i;\n for (i = 0; i < 112; ++i) lt.trans[24 + 144 + 8 + i] = 144 + i;\n\n /* build fixed distance tree */\n for (i = 0; i < 5; ++i) dt.table[i] = 0;\n\n dt.table[5] = 32;\n\n for (i = 0; i < 32; ++i) dt.trans[i] = i;\n}\n\n/* given an array of code lengths, build a tree */\nlet offs = new Uint16Array(16);\n\nfunction tinf_build_tree(t, lengths, off, num) {\n let i, sum;\n\n /* clear code length count table */\n for (i = 0; i < 16; ++i) t.table[i] = 0;\n\n /* scan symbol lengths, and sum code length counts */\n for (i = 0; i < num; ++i) t.table[lengths[off + i]]++;\n\n t.table[0] = 0;\n\n /* compute offset table for distribution sort */\n for (sum = 0, i = 0; i < 16; ++i) {\n offs[i] = sum;\n sum += t.table[i];\n }\n\n /* create code->symbol translation table (symbols sorted by code) */\n for (i = 0; i < num; ++i) {\n if (lengths[off + i]) t.trans[offs[lengths[off + i]]++] = i;\n }\n}\n\n/* ---------------------- *\n * -- decode functions -- *\n * ---------------------- */\n\n/* get one bit from source stream */\nfunction tinf_getbit(d) {\n /* check if tag is empty */\n if (!d.bitcount--) {\n /* load next tag */\n d.tag = d.source[d.sourceIndex++];\n d.bitcount = 7;\n }\n\n /* shift bit out of tag */\n let bit = d.tag & 1;\n d.tag >>>= 1;\n\n return bit;\n}\n\n/* read a num bit value from a stream and add base */\nfunction tinf_read_bits(d, num, base) {\n if (!num)\n return base;\n\n while (d.bitcount < 24) {\n d.tag |= d.source[d.sourceIndex++] << d.bitcount;\n d.bitcount += 8;\n }\n\n let val = d.tag & (0xffff >>> (16 - num));\n d.tag >>>= num;\n d.bitcount -= num;\n return val + base;\n}\n\n/* given a data stream and a tree, decode a symbol */\nfunction tinf_decode_symbol(d, t) {\n while (d.bitcount < 24) {\n d.tag |= d.source[d.sourceIndex++] << d.bitcount;\n d.bitcount += 8;\n }\n\n let sum = 0, cur = 0, len = 0;\n let tag = d.tag;\n\n /* get more bits while code value is above sum */\n do {\n cur = 2 * cur + (tag & 1);\n tag >>>= 1;\n ++len;\n\n sum += t.table[len];\n cur -= t.table[len];\n } while (cur >= 0);\n\n d.tag = tag;\n d.bitcount -= len;\n\n return t.trans[sum + cur];\n}\n\n/* given a data stream, decode dynamic trees from it */\nfunction tinf_decode_trees(d, lt, dt) {\n let hlit, hdist, hclen;\n let i, num, length;\n\n /* get 5 bits HLIT (257-286) */\n hlit = tinf_read_bits(d, 5, 257);\n\n /* get 5 bits HDIST (1-32) */\n hdist = tinf_read_bits(d, 5, 1);\n\n /* get 4 bits HCLEN (4-19) */\n hclen = tinf_read_bits(d, 4, 4);\n\n for (i = 0; i < 19; ++i) lengths[i] = 0;\n\n /* read code lengths for code length alphabet */\n for (i = 0; i < hclen; ++i) {\n /* get 3 bits code length (0-7) */\n let clen = tinf_read_bits(d, 3, 0);\n lengths[clcidx[i]] = clen;\n }\n\n /* build code length tree */\n tinf_build_tree(code_tree, lengths, 0, 19);\n\n /* decode code lengths for the dynamic trees */\n for (num = 0; num < hlit + hdist;) {\n let sym = tinf_decode_symbol(d, code_tree);\n\n switch (sym) {\n case 16:\n /* copy previous code length 3-6 times (read 2 bits) */\n let prev = lengths[num - 1];\n for (length = tinf_read_bits(d, 2, 3); length; --length) {\n lengths[num++] = prev;\n }\n break;\n case 17:\n /* repeat code length 0 for 3-10 times (read 3 bits) */\n for (length = tinf_read_bits(d, 3, 3); length; --length) {\n lengths[num++] = 0;\n }\n break;\n case 18:\n /* repeat code length 0 for 11-138 times (read 7 bits) */\n for (length = tinf_read_bits(d, 7, 11); length; --length) {\n lengths[num++] = 0;\n }\n break;\n default:\n /* values 0-15 represent the actual code lengths */\n lengths[num++] = sym;\n break;\n }\n }\n\n /* build dynamic trees */\n tinf_build_tree(lt, lengths, 0, hlit);\n tinf_build_tree(dt, lengths, hlit, hdist);\n}\n\n/* ----------------------------- *\n * -- block inflate functions -- *\n * ----------------------------- */\n\n/* given a stream and two trees, inflate a block of data */\nfunction tinf_inflate_block_data(d, lt, dt) {\n while (1) {\n let sym = tinf_decode_symbol(d, lt);\n\n /* check for end of block */\n if (sym === 256) {\n return TINF_OK;\n }\n\n if (sym < 256) {\n d.dest[d.destLen++] = sym;\n } else {\n let length, dist, offs;\n let i;\n\n sym -= 257;\n\n /* possibly get more bits from length code */\n length = tinf_read_bits(d, length_bits[sym], length_base[sym]);\n\n dist = tinf_decode_symbol(d, dt);\n\n /* possibly get more bits from distance code */\n offs = d.destLen - tinf_read_bits(d, dist_bits[dist], dist_base[dist]);\n\n /* copy match */\n for (i = offs; i < offs + length; ++i) {\n d.dest[d.destLen++] = d.dest[i];\n }\n }\n }\n}\n\n/* inflate an uncompressed block of data */\nfunction tinf_inflate_uncompressed_block(d) {\n let length, invlength;\n let i;\n\n /* unread from bitbuffer */\n while (d.bitcount > 8) {\n d.sourceIndex--;\n d.bitcount -= 8;\n }\n\n /* get length */\n length = d.source[d.sourceIndex + 1];\n length = 256 * length + d.source[d.sourceIndex];\n\n /* get one's complement of length */\n invlength = d.source[d.sourceIndex + 3];\n invlength = 256 * invlength + d.source[d.sourceIndex + 2];\n\n /* check length */\n if (length !== (~invlength & 0x0000ffff))\n return TINF_DATA_ERROR;\n\n d.sourceIndex += 4;\n\n /* copy block */\n for (i = length; i; --i)\n d.dest[d.destLen++] = d.source[d.sourceIndex++];\n\n /* make sure we start next block on a byte boundary */\n d.bitcount = 0;\n\n return TINF_OK;\n}\n\n/* inflate stream from source to dest */\nfunction tinf_uncompress(source, dest) {\n let d = new Data(source, dest);\n let bfinal, btype, res;\n\n do {\n /* read final block flag */\n bfinal = tinf_getbit(d);\n\n /* read block type (2 bits) */\n btype = tinf_read_bits(d, 2, 0);\n\n /* decompress block */\n switch (btype) {\n case 0:\n /* decompress uncompressed block */\n res = tinf_inflate_uncompressed_block(d);\n break;\n case 1:\n /* decompress block with fixed huffman trees */\n res = tinf_inflate_block_data(d, sltree, sdtree);\n break;\n case 2:\n /* decompress block with dynamic huffman trees */\n tinf_decode_trees(d, d.ltree, d.dtree);\n res = tinf_inflate_block_data(d, d.ltree, d.dtree);\n break;\n default:\n res = TINF_DATA_ERROR;\n }\n\n if (res !== TINF_OK)\n throw new Error('Data error');\n\n } while (!bfinal);\n\n if (d.destLen < d.dest.length) {\n if (typeof d.dest.slice === 'function')\n return d.dest.slice(0, d.destLen);\n else\n return d.dest.subarray(0, d.destLen);\n }\n\n return d.dest;\n}\n\n/* -------------------- *\n * -- initialization -- *\n * -------------------- */\n\n/* build fixed huffman trees */\ntinf_build_fixed_trees(sltree, sdtree);\n\n/* build extra bits and base tables */\ntinf_build_bits_base(length_bits, length_base, 4, 3);\ntinf_build_bits_base(dist_bits, dist_base, 2, 1);\n\n/* fix a special case */\nlength_bits[28] = 0;\nlength_base[28] = 258;\n\nexport default tinf_uncompress;\n","import inject from './inject';\nimport inflate from './inflate';\n\nfunction getTag(dataView, offset) {\n let tag = '';\n for (let i = offset; i < offset + 4; i++) {\n tag += String.fromCharCode(dataView.getInt8(i));\n }\n return tag;\n}\n\nfunction getUShort(dataView, offset) {\n return dataView.getUint16(offset, false);\n}\n\nfunction getULong(dataView, offset) {\n return dataView.getUint32(offset, false);\n}\n\nfunction getFixed(dataView, offset) {\n let decimal = dataView.getInt16(offset, false);\n let fraction = dataView.getUint16(offset + 2, false);\n return decimal + fraction / 65535;\n}\n\nfunction parseOpenTypeTableEntries(data, numTables) {\n let tableEntries = [];\n let p = 12;\n for (let i = 0; i < numTables; i += 1) {\n let tag = getTag(data, p);\n let checksum = getULong(data, p + 4);\n let offset = getULong(data, p + 8);\n let length = getULong(data, p + 12);\n tableEntries.push({ tag: tag, checksum: checksum,\n offset: offset, length: length, compression: false });\n p += 16;\n }\n return tableEntries;\n}\n\nfunction parseWOFFTableEntries(data, numTables) {\n let tableEntries = [];\n let p = 44; // offset to the first table directory entry.\n for (let i = 0; i < numTables; i += 1) {\n let tag = getTag(data, p);\n let offset = getULong(data, p + 4);\n let compLength = getULong(data, p + 8);\n let origLength = getULong(data, p + 12);\n let compression;\n if (compLength < origLength) {\n compression = 'WOFF';\n }\n else {\n compression = false;\n }\n tableEntries.push({ tag: tag, offset: offset, compression: compression,\n compressedLength: compLength, length: origLength });\n p += 20;\n }\n return tableEntries;\n}\n\nfunction uncompressTable(data, tableEntry) {\n if (tableEntry.compression === 'WOFF') {\n let inBuffer = new Uint8Array(data.buffer, tableEntry.offset + 2, tableEntry.compressedLength - 2);\n let outBuffer = new Uint8Array(tableEntry.length);\n inflate(inBuffer, outBuffer);\n if(outBuffer.byteLength !== tableEntry.length) {\n inject.error('Decompression error: ' + tableEntry.tag + ' decompressed length doesn\\'t match recorded length');\n }\n let view = new DataView(outBuffer.buffer, 0);\n return { data: view, offset: 0 };\n }\n else {\n return { data: data, offset: tableEntry.offset };\n }\n}\n\nclass Parser {\n constructor(data, offset) {\n this.data = data;\n this.offset = offset;\n this.relativeOffset = 0;\n }\n\n parseUShort() {\n let v = this.data.getUint16(this.offset + this.relativeOffset);\n this.relativeOffset += 2;\n return v;\n }\n\n parseULong() {\n let v = getULong(this.data, this.offset + this.relativeOffset);\n this.relativeOffset += 4;\n return v;\n }\n\n parseShort() {\n let v = this.data.getInt16(this.offset + this.relativeOffset);\n this.relativeOffset += 2;\n return v;\n }\n\n parseFixed() {\n let v = getFixed(this.data, this.offset + this.relativeOffset);\n this.relativeOffset += 4;\n return v;\n }\n\n parseVersion(minorBase) {\n let major = getUShort(this.data, this.offset + this.relativeOffset);\n let minor = getUShort(this.data, this.offset + this.relativeOffset + 2);\n this.relativeOffset += 4;\n if(minorBase === undefined) {\n minorBase = 0x1000;\n }\n return major + minor / minorBase / 10;\n };\n}\n\nexport default {\n parse(arrayBuffer) {\n let data = new DataView(arrayBuffer, 0);\n let signature = getTag(data, 0);\n let numTables, tableEntries;\n if(signature === String.fromCharCode(0, 1, 0, 0) || signature === 'true' || signature === 'typ1') {\n numTables = getUShort(data, 4);\n tableEntries = parseOpenTypeTableEntries(data, numTables);\n }\n else if(signature === 'OTTO') {\n numTables = getUShort(data, 4);\n tableEntries = parseOpenTypeTableEntries(data, numTables);\n }\n else if(signature === 'wOFF') {\n let flavor = getTag(data, 4);\n if(flavor !== String.fromCharCode(0, 1, 0, 0) && flavor !== 'OTTO') {\n inject.error('Unsupported OpenType flavor ' + signature);\n return;\n }\n numTables = getUShort(data, 12);\n tableEntries = parseWOFFTableEntries(data, numTables);\n }\n else {\n inject.error('Unsupported OpenType signature ' + signature);\n }\n let emSquare = 2048, ascent, descent, lineGap = 0;\n for(let i = 0; i < numTables; i++) {\n let tableEntry = tableEntries[i];\n if(tableEntry.tag === 'head') {\n let table = uncompressTable(data, tableEntry);\n let p = new Parser(table.data, table.offset);\n p.parseVersion();\n p.parseFixed();\n p.parseULong();\n p.parseULong();\n p.parseUShort();\n emSquare = p.parseUShort();\n }\n else if(tableEntry.tag === 'hhea') {\n let table = uncompressTable(data, tableEntry);\n let p = new Parser(table.data, table.offset);\n p.parseVersion();\n ascent = Math.abs(p.parseShort());\n descent = Math.abs(p.parseShort());\n lineGap = Math.abs(p.parseShort() || 0);\n }\n }\n return {\n emSquare,\n ascent,\n descent,\n lineGap,\n };\n },\n};\n","import util from '../util/util';\nimport inject from '../util/inject';\nimport opentype from '../util/opentype';\n\nconst { isString } = util;\n\nconst CALLBACK = {};\n\nlet o = {\n info: {\n arial: {\n lhr: 1.14990234375, // 默认line-height ratio,(67+1854+434)/2048\n // car: 1.1171875, // content-area ratio,(1854+434)/2048\n blr: 0.9052734375, // base-line ratio,1854/2048\n // mdr: 0.64599609375, // middle ratio,(1854-1062/2)/2048\n lgr: 0.03271484375, // line-gap ratio,67/2048,默认0\n },\n helvetica: {\n lhr: 1.14990234375, // (8+1900+447)/2048\n blr: 0.927734375, // 1900/2048\n lgr: 0.00390625, // 8/2048\n },\n verdana: {\n lhr: 1.21533203125, // (0+2059+430)/2048\n blr: 1.00537109375, // 2059/2048\n },\n tahoma: {\n lhr: 1.20703125, // (0+2049+423)/2048\n blr: 1.00048828125, // 2049/2048\n },\n georgia: {\n lhr: 1.13623046875, // (0+1878+449)/2048\n blr: 0.9169921875, // 1878/2048\n },\n 'courier new': {\n lhr: 1.1328125, // (0+1705+615)/2048\n blr: 0.83251953125, // 1705/2048\n },\n 'pingfang sc': {\n lhr: 1.4, // (0+1060+340)/1000\n blr: 1.06, // 1060/1000\n },\n simsun: {\n lhr: 1.4, // (0+1060+340)/1000\n blr: 1.06,\n },\n },\n support(fontFamily) {\n return this.info.hasOwnProperty(fontFamily) && this.info[fontFamily].checked;\n },\n register(name, url, data) { // url和data同时需要,也可以先data后url,不能先url后data\n name = name.toLowerCase();\n if(!isString(url) && !(url instanceof ArrayBuffer)) {\n data = url;\n url = null;\n }\n let info = this.info;\n let fontInfo = info[name] = info[name] || {};\n if(url && !fontInfo.url) { // 不能覆盖\n fontInfo.url = url;\n inject.loadFont(name, url, function(res, ab) {\n fontInfo.success = res.success;\n if(res.success) {\n // 手动指定更高优先级,不解析\n if(!fontInfo.lhr && ab) {\n let r = opentype.parse(ab);\n setData(r);\n }\n // 回调\n let list = CALLBACK[name] || [];\n while(list.length) {\n let node = list.pop();\n node.__emitFontRegister(name);\n }\n }\n });\n }\n // 防止先没url只注册,再调用只传url的情况\n if(!data || fontInfo.lhr) {\n return;\n }\n setData(data);\n function setData(data) {\n let { emSquare = 2048, ascent, descent, lineGap = 0 } = data;\n if(!ascent || !descent) {\n return;\n }\n Object.assign(fontInfo, {\n lhr: (ascent + descent + lineGap) / emSquare,\n blr: ascent / emSquare,\n });\n }\n },\n hasRegister(fontFamily) {\n return this.info.hasOwnProperty(fontFamily) && this.info[fontFamily].hasOwnProperty('lhr');\n },\n hasLoaded(fontFamily) {\n return this.info.hasOwnProperty(fontFamily) && this.info[fontFamily].success;\n },\n onRegister(fontFamily, node) {\n let list = CALLBACK[fontFamily] = CALLBACK[fontFamily] || [];\n list.push(node);\n },\n offRegister(fontFamily, node) {\n let list = CALLBACK[fontFamily] = CALLBACK[fontFamily] || [];\n let i = list.indexOf(node);\n if(i > -1) {\n list.splice(i, 1);\n }\n }\n};\n\no.info['宋体'] = o.info.simsun;\no.info['pingfang'] = o.info['pingfang sc'];\n\nexport default o;\n","import inject from '../util/inject';\n\nconst DOM = {\n position: 'static',\n display: 'block',\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto',\n marginTop: 0,\n marginRight: 0,\n marginBottom: 0,\n marginLeft: 0,\n paddingTop: 0,\n paddingRight: 0,\n paddingBottom: 0,\n paddingLeft: 0,\n fontSize: 'inherit',\n fontFamily: 'inherit',\n color: 'inherit',\n fontStyle: 'inherit',\n fontWeight: 'inherit',\n lineHeight: 'inherit',\n backgroundImage: null,\n backgroundColor: 'transparent',\n backgroundSize: 'auto',\n backgroundRepeat: 'repeat',\n backgroundPositionX: 0,\n backgroundPositionY: 0,\n backgroundClip: 'borderBox',\n borderTopWidth: 0,\n borderRightWidth: 0,\n borderBottomWidth: 0,\n borderLeftWidth: 0,\n borderTopColor: 'transparent',\n borderRightColor: 'transparent',\n borderBottomColor: 'transparent',\n borderLeftColor: 'transparent',\n borderTopStyle: 'none',\n borderRightStyle: 'none',\n borderBottomStyle: 'none',\n borderLeftStyle: 'none',\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n borderBottomLeftRadius: 0,\n width: 'auto',\n height: 'auto',\n flexGrow: 0,\n flexShrink: 1,\n flexBasis: 'auto',\n flexDirection: 'row',\n flexWrap: 'nowrap',\n order: 0,\n justifyContent: 'flexStart',\n alignItems: 'stretch',\n alignSelf: 'auto',\n alignContent: 'stretch',\n textAlign: 'inherit',\n letterSpacing: 'inherit',\n transformOrigin: 'center',\n visibility: 'inherit',\n opacity: 1,\n zIndex: 0,\n transform: null,\n translateX: 0,\n translateY: 0,\n translateZ: 0,\n scaleX: 1,\n scaleY: 1,\n scaleZ: 1,\n skewX: 0,\n skewY: 0,\n rotateX: 0,\n rotateY: 0,\n rotateZ: 0,\n rotate3d: '0, 0, 0, 0',\n perspective: 0,\n perspectiveOrigin: 'center',\n transformStyle: 'flat',\n backfaceVisibility: 'visible',\n filter: null,\n boxShadow: null,\n pointerEvents: 'inherit',\n overflow: 'visible',\n mixBlendMode: 'normal',\n whiteSpace: 'inherit',\n textOverflow: 'clip',\n lineClamp: 0,\n textStrokeWidth: 'inherit',\n textStrokeColor: 'inherit',\n textStrokeOver: 'inherit',\n writingMode: 'inherit',\n};\n\nconst GEOM = {\n fill: 'transparent',\n stroke: '#000',\n strokeWidth: 1,\n strokeDasharray: '',\n strokeLinecap: 'butt',\n strokeLinejoin: 'miter',\n strokeMiterlimit: 4,\n fillRule: 'nonzero',\n};\n\nconst DOM_ENTRY_SET = [];\nconst DOM_KEY_SET = [];\nObject.keys(DOM).forEach(k => {\n DOM_KEY_SET.push(k);\n let v = DOM[k];\n DOM_ENTRY_SET.push({\n k,\n v,\n });\n});\n\nconst GEOM_ENTRY_SET = [];\nconst GEOM_KEY_SET = [];\nObject.keys(GEOM).forEach(k => {\n GEOM_KEY_SET.push(k);\n let v = GEOM[k];\n GEOM_ENTRY_SET.push({\n k,\n v,\n });\n});\n\nconst INHERIT = {\n get fontFamily() {\n return inject.defaultFontFamily;\n },\n fontSize: 16,\n fontWeight: 400,\n fontStyle: 'normal',\n color: '#000',\n textAlign: 'left',\n visibility: 'visible',\n pointerEvents: 'auto',\n textStrokeColor: '#000',\n textStrokeWidth: 0,\n textStrokeOver: 'none',\n writingMode: 'horizontalTb',\n};\n\nconst INHERIT_KEY_SET = [];\nObject.keys(INHERIT).forEach(k => {\n INHERIT_KEY_SET.push(k);\n});\n\n// 默认值放第一个\nconst VALID_STRING_VALUE = {\n position: ['static', 'relative', 'absolute'],\n display: ['block', 'inlineBlock', 'inline', 'flex', 'none'],\n flexDirection: ['row', 'column', 'rowReverse', 'columnReverse'],\n flexWrap: ['wrap', 'wrapReverse', 'nowrap'],\n justifyContent: ['flexStart', 'center', 'flexEnd', 'spaceBetween', 'spaceAround', 'spaceEvenly'],\n alignItems: ['stretch', 'flexStart', 'center', 'flexEnd', 'baseline'],\n alignSelf: ['auto', 'stretch', 'flexStart', 'center', 'flexEnd', 'baseline'],\n overflow: ['visible', 'hidden'],\n mixBlendMode: ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten',\n 'colorDodge', 'colorBurn', 'hardLight', 'softLight', 'difference', 'exclusion',\n 'hue', 'saturation', 'color', 'luminosity'],\n borderTopStyle: ['solid', 'dashed', 'dotted'],\n borderRightStyle: ['solid', 'dashed', 'dotted'],\n borderBottomStyle: ['solid', 'dashed', 'dotted'],\n borderLeftStyle: ['solid', 'dashed', 'dotted'],\n backgroundClip: ['borderBox', 'paddingBox', 'contentBox'],\n textOverflow: ['clip', 'ellipsis'],\n alignContent: ['stretch', 'flexStart', 'center', 'flexEnd', 'spaceBetween', 'spaceAround'],\n transformStyle: ['flat', 'preserve3d'],\n backfaceVisibility: ['visible', 'hidden'],\n}\n\nexport default {\n DOM,\n GEOM,\n isValid(i) {\n return DOM.hasOwnProperty(i) || GEOM.hasOwnProperty(i);\n },\n DOM_KEY_SET,\n GEOM_KEY_SET,\n DOM_ENTRY_SET,\n GEOM_ENTRY_SET,\n INHERIT,\n INHERIT_KEY_SET,\n VALID_STRING_VALUE,\n};\n","export default {\n position: /(([-+]?[\\d.]+[pxremvwhina%]*)|(left|top|right|bottom|center)){1,2}/ig,\n gradient: /\\b(\\w+)-?gradient\\((.+)\\)/i,\n img: /(?:\\burl\\((['\"]?)(.*?)\\1\\))|(?:\\b((data:)))/i,\n};\n","// 向量点乘积\nfunction dotProduct(x1, y1, x2, y2) {\n return x1 * x2 + y1 * y2;\n}\n\nfunction dotProduct3(x1, y1, z1, x2, y2, z2) {\n if(z1 === undefined && x2 === undefined && y2 === undefined && z2 === undefined) {\n x2 = y1.x;\n z2 = y1.z;\n y2 = y1.y;\n y1 = x1.y;\n z1 = x1.z;\n x1 = x1.x;\n }\n return x1 * x2 + y1 * y2 + z1 * z2;\n}\n\n// 向量叉乘积\nfunction crossProduct(x1, y1, x2, y2) {\n return x1 * y2 - x2 * y1;\n}\n\nfunction crossProduct3(x1, y1, z1, x2, y2, z2) {\n if(z1 === undefined && x2 === undefined && y2 === undefined && z2 === undefined) {\n x2 = y1.x;\n z2 = y1.z;\n y2 = y1.y;\n y1 = x1.y;\n z1 = x1.z;\n x1 = x1.x;\n }\n return {\n x: y1 * z2 - y2 * z1,\n y: z1 * x2 - z2 * x1,\n z: x1 * y2 - x2 * y1,\n };\n}\n\n// 归一化\nfunction unitize(x, y) {\n let n = length(x, y);\n return {\n x: x / n,\n y: y / n,\n };\n}\n\nfunction unitize3(x, y, z) {\n if(y === undefined && z === undefined) {\n y = x.y;\n z = x.z;\n x = x.x;\n }\n let n = length3(x, y, z);\n return {\n x: x / n,\n y: y / n,\n z: z / n,\n };\n}\n\n// 是否平行\nfunction isParallel(x1, y1, x2, y2) {\n if(isZero(x1, y1, x2, y2)) {\n return true;\n }\n let ag = angle(x1, y1, x2, y2);\n if(Math.abs(ag) < 1e-9) {\n return true;\n }\n if(Math.PI - Math.abs(ag) < 1e-9) {\n return true;\n }\n return false;\n}\n\nfunction isParallel3(x1, y1, z1, x2, y2, z2) {\n if(z1 === undefined && x2 === undefined && y2 === undefined && z2 === undefined) {\n x2 = y1.x;\n z2 = y1.z;\n y2 = y1.y;\n y1 = x1.y;\n z1 = x1.z;\n x1 = x1.x;\n }\n if(isZero3(x1, y1, z1, x2, y2, z2)) {\n return true;\n }\n let ag = angle3(x1, y1, z1, x2, y2, z2);\n if(Math.abs(ag) < 1e-9) {\n return true;\n }\n if(Math.PI - Math.abs(ag) < 1e-9) {\n return true;\n }\n return false;\n}\n\n// 是否是零,考虑误差\nfunction isZero(x1, y1, x2, y2) {\n return Math.abs(x1) < 1e-9 && Math.abs(y1) < 1e-9\n && Math.abs(x2) < 1e-9 && Math.abs(y2) < 1e-9;\n}\n\nfunction isZero3(x1, y1, z1, x2, y2, z2) {\n if(z1 === undefined && x2 === undefined && y2 === undefined && z2 === undefined) {\n x2 = y1.x;\n z2 = y1.z;\n y2 = y1.y;\n y1 = x1.y;\n z1 = x1.z;\n x1 = x1.x;\n }\n return Math.abs(x1) < 1e-9 && Math.abs(y1) < 1e-9 && Math.abs(z1) < 1e-9\n && Math.abs(x2) < 1e-9 && Math.abs(y2) < 1e-9 && Math.abs(z2) < 1e-9;\n}\n\n// 向量夹角\nfunction angle(x1, y1, x2, y2) {\n let cos = dotProduct(x1, y1, x2, y2) / (length(x1, y1) * length(x2, y2));\n if(cos < -1) {\n cos = -1;\n }\n else if(cos > 1) {\n cos = 1;\n }\n return Math.acos(cos);\n}\n\nfunction angle3(x1, y1, z1, x2, y2, z2) {\n if(z1 === undefined && x2 === undefined && y2 === undefined && z2 === undefined) {\n x2 = y1.x;\n z2 = y1.z;\n y2 = y1.y;\n y1 = x1.y;\n z1 = x1.z;\n x1 = x1.x;\n }\n let cos = dotProduct3(x1, y1, z1, x2, y2, z2) / (length3(x1, y1, z1) * length3(x2, y2, z2));\n if(cos < -1) {\n cos = -1;\n }\n else if(cos > 1) {\n cos = 1;\n }\n return Math.acos(cos);\n}\n\n// 向量长度\nfunction length(x, y) {\n return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));\n}\n\nfunction length3(x, y, z) {\n return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2) + Math.pow(z, 2));\n}\n\n// 获取任意一个垂直于目标的向量\nfunction getPerpendicularVector3(x, y, z) {\n let i, j, k, a, b;\n if(Math.abs(y) > Math.abs(x)) {\n if(Math.abs(z) > Math.abs(y)) {\n i = 2;\n j = 1;\n k = 0;\n a = z;\n b = -y;\n }\n else if(Math.abs(z) > Math.abs(x)) {\n i = 1;\n j = 2;\n k = 0;\n a = y;\n b = -z;\n }\n else {\n i = 1;\n j = 0;\n k = 2;\n a = y;\n b = -x;\n }\n }\n else if(Math.abs(z) > Math.abs(x)) {\n i = 2;\n j = 0;\n k = 1;\n a = z;\n b = -x;\n }\n else if(Math.abs(z) > Math.abs(y)) {\n i = 0;\n j = 2;\n k = 1;\n a = x;\n b = -z;\n }\n else {\n i = 0;\n j = 1;\n k = 2;\n a = x;\n b = -y;\n }\n let arr = [0, 0, 0];\n arr[i] = b;\n arr[j] = a;\n arr[k] = 0;\n return unitize3(arr[0], arr[1], arr[2]);\n}\n\nexport default {\n dotProduct,\n dotProduct3,\n crossProduct,\n crossProduct3,\n unitize,\n unitize3,\n isParallel,\n isParallel3,\n isZero,\n isZero3,\n angle,\n angle3,\n length,\n length3,\n getPerpendicularVector3,\n};\n","const STYLE_KEY = {\n POSITION: 0,\n DISPLAY: 1,\n TOP: 2,\n RIGHT: 3,\n BOTTOM: 4,\n LEFT: 5,\n MARGIN_TOP: 6,\n MARGIN_RIGHT: 7,\n MARGIN_BOTTOM: 8,\n MARGIN_LEFT: 9,\n PADDING_TOP: 10,\n PADDING_RIGHT: 11,\n PADDING_BOTTOM: 12,\n PADDING_LEFT: 13,\n FONT_SIZE: 14,\n FONT_FAMILY: 15,\n COLOR: 16,\n FONT_STYLE: 17,\n FONT_WEIGHT: 18,\n LINE_HEIGHT: 19,\n BACKGROUND_IMAGE: 20,\n BACKGROUND_COLOR: 21,\n BACKGROUND_SIZE: 22,\n BACKGROUND_REPEAT: 23,\n BACKGROUND_POSITION_X: 24,\n BACKGROUND_POSITION_Y: 25,\n BORDER_TOP_WIDTH: 26,\n BORDER_RIGHT_WIDTH: 27,\n BORDER_BOTTOM_WIDTH: 28,\n BORDER_LEFT_WIDTH: 29,\n BORDER_TOP_COLOR: 30,\n BORDER_RIGHT_COLOR: 31,\n BORDER_BOTTOM_COLOR: 32,\n BORDER_LEFT_COLOR: 33,\n BORDER_TOP_STYLE: 34,\n BORDER_RIGHT_STYLE: 35,\n BORDER_BOTTOM_STYLE: 36,\n BORDER_LEFT_STYLE: 37,\n BORDER_TOP_LEFT_RADIUS: 38,\n BORDER_TOP_RIGHT_RADIUS: 39,\n BORDER_BOTTOM_RIGHT_RADIUS: 40,\n BORDER_BOTTOM_LEFT_RADIUS: 41,\n WIDTH: 42,\n HEIGHT: 43,\n FLEX_GROW: 44,\n FLEX_SHRINK: 45,\n FLEX_BASIS: 46,\n FLEX_DIRECTION: 47,\n JUSTIFY_CONTENT: 48,\n ALIGN_ITEMS: 49,\n ALIGN_SELF: 50,\n TEXT_ALIGN: 51,\n TRANSFORM_ORIGIN: 52,\n VISIBILITY: 53,\n OPACITY: 54,\n Z_INDEX: 55,\n TRANSFORM: 56,\n TRANSLATE_X: 57,\n TRANSLATE_Y: 58,\n TRANSLATE_Z: 59,\n SCALE_X: 60,\n SCALE_Y: 61,\n SCALE_Z: 62,\n SKEW_X: 63,\n SKEW_Y: 64,\n ROTATE_X: 65,\n ROTATE_Y: 66,\n ROTATE_Z: 67,\n ROTATE_3D: 68,\n PERSPECTIVE: 69,\n PERSPECTIVE_ORIGIN: 70,\n FILTER: 71,\n BOX_SHADOW: 72,\n POINTER_EVENTS: 73,\n OVERFLOW: 74,\n MIX_BLEND_MODE: 75,\n BACKGROUND_CLIP: 76,\n WHITE_SPACE: 77,\n TEXT_OVERFLOW: 78,\n LETTER_SPACING: 79,\n LINE_CLAMP: 80,\n ORDER: 81,\n FLEX_WRAP: 82,\n ALIGN_CONTENT: 83,\n TEXT_STROKE_WIDTH: 84,\n TEXT_STROKE_COLOR: 85,\n TEXT_STROKE_OVER: 86,\n WRITING_MODE: 87,\n TRANSFORM_STYLE: 88,\n BACKFACE_VISIBILITY: 89,\n // GEOM\n FILL: 90,\n STROKE: 91,\n STROKE_WIDTH: 92,\n STROKE_DASHARRAY: 93,\n STROKE_DASHARRAY_STR: 94,\n STROKE_LINECAP: 95,\n STROKE_LINEJOIN: 96,\n STROKE_MITERLIMIT: 97,\n FILL_RULE: 98,\n // 无此样式,仅cache或特殊情况需要\n MATRIX: 99,\n BORDER_TOP: 100,\n BORDER_RIGHT: 101,\n BORDER_BOTTOM: 102,\n BORDER_LEFT: 103,\n TRANSLATE_PATH: 104,\n};\n\nconst STYLE2LOWER_MAP = {};\nfunction style2Lower(s) {\n let res = STYLE2LOWER_MAP[s];\n if(!res) {\n res = STYLE2LOWER_MAP[s] = s.toLowerCase().replace(/_([a-z])/g, function($0, $1) {\n return $1.toUpperCase();\n });\n }\n return res;\n}\n\nconst STYLE2UPPER_MAP = {};\nfunction style2Upper(s) {\n let res = STYLE2UPPER_MAP[s];\n if(!res) {\n res = STYLE2UPPER_MAP[s] = s.replace(/([a-z\\d_])([A-Z])/g, function($0, $1, $2) {\n return $1 + '_' + $2;\n }).toUpperCase();\n }\n return res;\n}\n\nconst STYLE_R_KEY = {};\nconst STYLE_RV_KEY = {};\nconst STYLE_V_KEY = {};\nObject.keys(STYLE_KEY).forEach(k => {\n let k2 = STYLE_KEY[k];\n STYLE_R_KEY[k2] = k;\n let l = style2Lower(k);\n STYLE_RV_KEY[k2] = l;\n STYLE_V_KEY[l] = k2;\n});\n\nexport default {\n STYLE_KEY, // 大写常量为k,数字为值\n STYLE_R_KEY, // 数字为k,大写常量为值\n STYLE_RV_KEY, // 数字为k,小写为值\n STYLE_V_KEY, // 小写为k,数字为值\n style2Lower,\n style2Upper,\n ELLIPSIS: '…',\n};\n","import mx from './matrix';\nimport vector from './vector';\nimport enums from '../util/enums';\n\nconst H = 4 * (Math.sqrt(2) - 1) / 3;\nconst { crossProduct } = vector;\nconst { calPoint, isE } = mx;\nconst { STYLE_KEY: {\n WIDTH,\n HEIGHT,\n TRANSFORM_ORIGIN,\n} } = enums;\n\n/**\n * 圆弧拟合公式,根据角度求得3阶贝塞尔控制点比例长度,一般<=90,超过拆分\n * @param deg\n * @returns {number}\n */\nfunction h(deg) {\n deg *= 0.5;\n return 4 * ((1 - Math.cos(deg)) / Math.sin(deg)) / 3;\n}\n\n/**\n * 判断点是否在多边形内\n * @param x 点坐标\n * @param y\n * @param vertexes 多边形顶点坐标\n * @returns {boolean}\n */\nfunction pointInConvexPolygon(x, y, vertexes) {\n // 先取最大最小值得一个外围矩形,在外边可快速判断false\n let { x: xmax, y: ymax } = vertexes[0];\n let { x: xmin, y: ymin } = vertexes[0];\n let len = vertexes.length;\n for(let i = 1; i < len; i++) {\n let { x, y } = vertexes[i];\n xmax = Math.max(xmax, x);\n ymax = Math.max(ymax, y);\n xmin = Math.min(xmin, x);\n ymin = Math.min(ymin, y);\n }\n if(x < xmin || y < ymin || x > xmax || y > ymax) {\n return false;\n }\n let first;\n // 所有向量积均为非负数(逆时针,反过来顺时针是非正)说明在多边形内或边上\n for(let i = 0, len = vertexes.length; i < len; i++) {\n let { x: x1, y: y1 } = vertexes[i];\n let { x: x2, y: y2 } = vertexes[(i + 1) % len];\n let n = crossProduct(x2 - x1, y2 - y1, x - x1, y - y1);\n if(n !== 0) {\n n = n > 0 ? 1 : 0;\n // 第一个赋值,后面检查是否正负一致性,不一致是反例就跳出\n if(first === undefined) {\n first = n;\n }\n else if(first ^ n) {\n return false;\n }\n }\n }\n return true;\n}\n\n// 判断点是否在一个4边形内,比如事件发生是否在节点上\nfunction pointInQuadrilateral(x, y, x1, y1, x2, y2, x4, y4, x3, y3, matrix) {\n if(matrix && !isE(matrix)) {\n let w1, w2, w3, w4;\n let t = calPoint({ x: x1, y: y1 }, matrix);\n x1 = t.x; y1 = t.y; w1 = t.w;\n t = calPoint({ x: x2, y: y2 }, matrix);\n x2 = t.x; y2 = t.y; w2 = t.w;\n t = calPoint({ x: x3, y: y3 }, matrix);\n x3 = t.x; y3 = t.y; w3 = t.w;\n t = calPoint({ x: x4, y: y4 }, matrix);\n x4 = t.x; y4 = t.y; w4 = t.w;\n if(w1 && w1 !== 1) {\n x1 /= w1;\n y1 /= w1;\n }\n if(w2 && w2 !== 1) {\n x2 /= w2;\n y2 /= w2;\n }\n if(w3 && w3 !== 1) {\n x3 /= w3;\n y3 /= w3;\n }\n if(w4 && w4 !== 1) {\n x4 /= w4;\n y4 /= w4;\n }\n return pointInConvexPolygon(x, y, [\n { x: x1, y: y1 },\n { x: x2, y: y2 },\n { x: x4, y: y4 },\n { x: x3, y: y3 },\n ]);\n }\n else {\n return x >= x1 && y >= y1 && x <= x4 && y <= y4;\n }\n}\n\n/**\n * 余弦定理3边长求夹角\n * @param a\n * @param b\n * @param c\n */\nfunction angleBySide(a, b, c) {\n let theta = (Math.pow(b, 2) + Math.pow(c, 2) - Math.pow(a, 2)) / (2 * b * c);\n return Math.acos(theta);\n}\n\n/**\n * 余弦定理2边长和夹角求3边\n * @param alpha 弧度\n * @param a\n * @param b\n */\nfunction sideByAngle(alpha, a, b) {\n let cos = Math.cos(alpha);\n return Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * cos);\n}\n\n/**\n * 两点距离\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n */\nfunction pointsDistance(x1, y1, x2, y2) {\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n}\n\n/**\n * 三角形内心\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n * @param x3\n * @param y3\n */\nfunction triangleIncentre(x1, y1, x2, y2, x3, y3) {\n let a = pointsDistance(x2, y2, x3, y3);\n let b = pointsDistance(x1, y1, x3, y3);\n let c = pointsDistance(x1, y1, x2, y2);\n return {\n x: (a * x1 + b * x2 + c * x3) / (a + b + c),\n y: (a * y1 + b * y2 + c * y3) / (a + b + c),\n };\n}\n\n/**\n * 椭圆圆心和长短轴生成4个端点和控制点\n */\nfunction ellipsePoints(x, y, a, b = a) {\n let ox = a * H;\n let oy = b === a ? ox : b * H;\n return [\n [x - a, y],\n [x - a, y - oy, x - ox, y - b, x, y - b],\n [x + ox, y - b, x + a, y - oy, x + a, y],\n [x + a, y + oy, x + ox, y + b, x, y + b],\n [x - ox, y + b, x - a, y + oy, x - a, y],\n ];\n}\n\n/**\n * 扇形圆心和半径起始角度生成4个端点和控制点\n * 分为4个象限进行拟合,0、1、2、3\n */\nfunction sectorPoints(x, y, r, begin, end) {\n if(begin > end) {\n [begin, end] = [end, begin];\n }\n if(begin === end) {\n return [];\n }\n let list = [];\n let b = Math.floor(begin / 90);\n let e = Math.floor(end / 90);\n // 同象限直接算\n if(b === e || (e - b) === 1 && end % 90 === 0) {\n let h2 = h(d2r(Math.abs(begin - end)));\n let d = h2 * r;\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let alpha = Math.atan(d / r);\n if(b < 90) {\n // 第1个交点\n let rx = Math.sin(d2r(begin)) * r;\n let ry = Math.cos(d2r(begin)) * r;\n let p1 = [x + rx, y - ry];\n // 第1个控制点\n let deg = alpha + d2r(begin);\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p2 = [x + rx, y - ry];\n // 第2个交点\n rx = Math.sin(d2r(end)) * r;\n ry = Math.cos(d2r(end)) * r;\n let p4 = [x + rx, y - ry];\n // 第2个控制点\n deg = d2r(end) - alpha;\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p3 = [x + rx, y - ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n else if(b < 180) {\n // 第1个交点\n let rx = Math.cos(d2r(begin - 90)) * r;\n let ry = Math.sin(d2r(begin - 90)) * r;\n let p1 = [x + rx, y + ry];\n // 第1个控制点\n let deg = alpha + d2r(begin - 90);\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p2 = [x + rx, y + ry];\n // 第2个交点\n rx = Math.cos(d2r(end - 90)) * r;\n ry = Math.sin(d2r(end - 90)) * r;\n let p4 = [x + rx, y + ry];\n // 第2个控制点\n deg = d2r(end - 90) - alpha;\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p3 = [x + rx, y + ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n else if(b < 270) {\n // 第1个交点\n let rx = Math.sin(d2r(begin - 180)) * r;\n let ry = Math.cos(d2r(begin - 180)) * r;\n let p1 = [x - rx, y + ry];\n // 第1个控制点\n let deg = alpha + d2r(begin - 180);\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p2 = [x - rx, y + ry];\n // 第2个交点\n rx = Math.sin(d2r(end - 180)) * r;\n ry = Math.cos(d2r(end - 180)) * r;\n let p4 = [x - rx, y + ry];\n // 第2个控制点\n deg = d2r(end - 180) - alpha;\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p3 = [x - rx, y + ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n else {\n // 第1个交点\n let rx = Math.cos(d2r(begin - 270)) * r;\n let ry = Math.sin(d2r(begin - 270)) * r;\n let p1 = [x - rx, y + ry];\n // 第1个控制点\n let deg = alpha + d2r(begin - 270);\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p2 = [x - rx, y + ry];\n // 第2个交点\n rx = Math.cos(d2r(end - 270)) * r;\n ry = Math.sin(d2r(end - 270)) * r;\n let p4 = [x - rx, y + ry];\n // 第2个控制点\n deg = d2r(end - 270) - alpha;\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p3 = [x - rx, y + ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n }\n // 跨象限循环算\n else {\n let i = b;\n let temp = [];\n for(; i <= e; i++) {\n if(i === 0) {\n let res = sectorPoints(x, y, r, begin, 90);\n temp.push(res);\n }\n else if(i === 1) {\n // 防止90~90这种情况,但如果begin和end都是90时又要显示\n if(b === i || end > 90) {\n let res = sectorPoints(x, y, r, begin < 90 ? 90 : begin, end > 180 ? 180 : end);\n temp.push(res);\n }\n }\n else if(i === 2) {\n // 防止180~180这种情况,但如果begin和end都是90时又要显示\n if(b === i || end > 180) {\n let res = sectorPoints(x, y, r, begin < 180 ? 180 : begin, end > 270 ? 270 : end);\n temp.push(res);\n }\n }\n else if(i === 3) {\n // 防止180~180这种情况,但如果begin和end都是90时又要显示\n if(b === i || end > 270) {\n let res = sectorPoints(x, y, r, begin < 270 ? 270 : begin, end);\n temp.push(res);\n }\n }\n }\n // 去掉重复的首尾扇弧点\n list = temp[0];\n for(let i = 1, len = temp.length; i < len; i++) {\n list.push(temp[i][1]);\n }\n }\n return list;\n}\n\n/**\n * 获取2个矩形重叠区域,如不重叠返回null\n * @param a\n * @param b\n */\nfunction getRectsIntersection(a, b) {\n if(!isRectsOverlap(a, b)) {\n return null;\n }\n let [ax1, ay1, ax4, ay4] = a;\n let [bx1, by1, bx4, by4] = b;\n return [\n Math.max(ax1, bx1),\n Math.max(ay1, by1),\n Math.min(ax4, bx4),\n Math.min(ay4, by4),\n ];\n}\n\n/**\n * 2个矩形是否重叠\n */\nfunction isRectsOverlap(a, b, includeIntersect) {\n let [ax1, ay1, ax4, ay4] = a;\n let [bx1, by1, bx4, by4] = b;\n if(includeIntersect) {\n if(ax1 > bx4 || ay1 > by4 || bx1 > ax4 || by1 > ay4) {\n return false;\n }\n }\n else if(ax1 >= bx4 || ay1 >= by4 || bx1 >= ax4 || by1 >= ay4) {\n return false;\n }\n return true;\n}\n\n/**\n * 2个矩形是否包含,a包含b\n */\nfunction isRectsInside(a, b, includeIntersect) {\n let [ax1, ay1, ax4, ay4] = a;\n let [bx1, by1, bx4, by4] = b;\n if(includeIntersect) {\n if(ax1 <= bx1 && ay1 <= by1 && ax4 >= bx4 && ay4 >= by4) {\n return true;\n }\n }\n else if(ax1 < bx1 && ay1 < by1 && ax4 > bx4 && ay4 > by4) {\n return true;\n }\n return false;\n}\n\nfunction calCoordsInNode(px, py, node) {\n let { matrix = [1, 0, 0, 1, 0, 0], computedStyle = [] } = node;\n let { [WIDTH]: width, [HEIGHT]: height, [TRANSFORM_ORIGIN]: [ox, oy] = [width * 0.5, height * 0.5] } = computedStyle;\n let t = calPoint({ x: px * width - ox, y: py * height - oy }, matrix);\n return { x: t.x + ox, y: t.y + oy };\n}\n\nfunction calPercentInNode(x, y, node) {\n let { computedStyle: { [WIDTH]: width, [HEIGHT]: height, [TRANSFORM_ORIGIN]: [ox, oy] } } = node;\n // 先求无旋转时右下角相对于原点的角度ds\n let ds = Math.atan((height - oy) / (width - ox));\n let { x: x1, y: y1 } = calCoordsInNode(1, 1, node);\n let d1;\n let deg;\n // 根据旋转后的坐标,分4个象限,求旋转后的右下角相对于原点的角度d1,得出偏移角度deg,分顺逆时针[-180, 180]\n if(x1 >= ox && y1 >= oy) {\n if(ox === x1) {\n d1 = -Math.atan(Infinity);\n }\n else {\n d1 = Math.atan((y1 - oy) / (x1 - ox));\n }\n deg = d1 - ds;\n }\n else if(x1 >= ox && y1 < oy) {\n if(ox === x1) {\n d1 = -Math.atan(Infinity);\n }\n else {\n d1 = Math.atan((oy - y1) / (x1 - ox));\n }\n deg = d1 + ds;\n }\n else if(x1 < ox && y1 >= oy) {\n d1 = Math.atan((y1 - oy) / (ox - x1));\n deg = d1 - ds;\n }\n else if(x1 < ox && y1 < oy) {\n d1 = Math.atan((y1 - oy) / (x1 - ox));\n if(ds >= d1) {\n deg = d1 + Math.PI - ds;\n }\n else {\n deg = Math.PI - d1 + ds;\n deg = -deg;\n }\n }\n else {\n deg = 0;\n }\n // 目标点到原点的边长不会变\n let dt = Math.sqrt(Math.pow(x - ox, 2) + Math.pow(y - oy, 2));\n // 分4个象限,先求目标点到原点的角度d2,再偏移deg后求得原始坐标\n let d2;\n if(x >= ox && y >= oy) {\n if(ox === x) {\n d2 = -Math.atan(Infinity);\n }\n else {\n d2 = Math.atan((y - oy) / (x - ox));\n }\n }\n else if(x >= ox && y < oy) {\n if(ox === x) {\n d2 = -Math.atan(Infinity);\n }\n else {\n d2 = -Math.atan((y - oy) / (ox - x));\n }\n }\n else if(x < ox && y >= oy) {\n d2 = Math.PI - Math.atan((y - oy) / (ox - x));\n }\n else {\n d2 = Math.atan((y - oy) / (x - ox)) - Math.PI;\n }\n d2 -= deg;\n if(d2 > Math.PI) {\n d2 -= Math.PI;\n return [\n (ox - dt * Math.cos(d2)) / width,\n (oy - dt * Math.sin(d2)) / height,\n ];\n }\n if(d2 > Math.PI * 0.5) {\n d2 = Math.PI - d2;\n return [\n (ox - dt * Math.cos(d2)) / width,\n (oy + dt * Math.sin(d2)) / height,\n ];\n }\n if(d2 >= 0) {\n return {\n x: (ox + dt * Math.cos(d2)) / width,\n y: (oy + dt * Math.sin(d2)) / height,\n };\n }\n if(d2 >= -Math.PI * 0.5) {\n d2 = -d2;\n return {\n x: (ox + dt * Math.cos(d2)) / width,\n y: (oy - dt * Math.sin(d2)) / height,\n };\n }\n if(d2 >= -Math.PI) {\n d2 = Math.PI + d2;\n return {\n x: (ox - dt * Math.cos(d2)) / width,\n y: (oy - dt * Math.sin(d2)) / height,\n };\n }\n d2 = -Math.PI - d2;\n return {\n x: (ox - dt * Math.cos(d2)) / width,\n y: (oy + dt * Math.sin(d2)) / height,\n };\n}\n\nfunction d2r(n) {\n return n * Math.PI / 180;\n}\n\nfunction r2d(n) {\n return n * 180 / Math.PI;\n}\n\nfunction pointOnCircle(x, y, r, deg) {\n if(deg >= 270) {\n deg -= 270;\n deg = d2r(deg);\n return {\n x: x - Math.cos(deg) * r,\n y: y - Math.sin(deg) * r,\n };\n }\n else if(deg >= 180) {\n deg -= 180;\n deg = d2r(deg);\n return {\n x: x - Math.sin(deg) * r,\n y: y + Math.cos(deg) * r,\n };\n }\n else if(deg >= 90) {\n deg -= 90;\n deg = d2r(deg);\n return {\n x: x + Math.cos(deg) * r,\n y: y + Math.sin(deg) * r,\n };\n }\n else {\n deg = d2r(deg);\n return {\n x: x + Math.sin(deg) * r,\n y: y - Math.cos(deg) * r,\n };\n }\n}\n\n// 3个点确定平面标准方程\nfunction getPlainNormalEquation(points) {\n let { x: x1, y: y1, z: z1 } = points[0];\n let { x: x2, y: y2, z: z2 } = points[1];\n let { x: x3, y: y3, z: z3 } = points[2];\n let a = (y2 - y1) * (z3 - z1) - (z2 - z1) * (y3 - y1);\n let b = (x3 - x1) * (z2 - z1) - (x2 - x1) * (z3 - z1);\n let c = (x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1);\n let d = -(a * x1 + b * y1 + c * z1);\n return { a, b, c, d };\n}\n\nexport default {\n pointInConvexPolygon,\n pointInQuadrilateral,\n d2r,\n r2d,\n // 贝塞尔曲线模拟1/4圆弧比例\n H,\n // <90任意角度贝塞尔曲线拟合圆弧的比例公式\n h,\n angleBySide,\n sideByAngle,\n pointsDistance,\n triangleIncentre,\n ellipsePoints,\n sectorPoints,\n getRectsIntersection,\n isRectsOverlap,\n isRectsInside,\n calCoordsInNode,\n calPercentInNode,\n pointOnCircle,\n getPlainNormalEquation,\n};\n","/**\n * @typedef {Object} gradientStatement\n * @property {Array} color - 颜色rgba,0~255,如 [0, 255, 0, 255]\n * @property {number} angle - 角度,0~2 * Math.PI,(originX, originY) 为原点,垂直向上为0\n */\n\n/**\n * 获取渐变图像像素数组\n * @param {number} originX - 渐变中心x坐标(相对图片左上角(0,0)的值,可在图片外,下同)\n * @param {number} originY - 渐变中心y坐标\n * @param {number} width - 图片宽度\n * @param {number} height - 图片高度\n * @param {Array} stop - 渐变声明列表\n * @param data - canvas的imgData.data\n * @returns {Array} 图像像素数组,每4个元素(rgba)构成一个像素点\n * @example\n // 矩形宽度为200*200,此时坐标为0~199,渐变中心为中点时,应传入99.5,可消除零点问题\n // 若渐变中心在某一整数轴上,就会引入零点问题,此时零点取y轴正半轴的色值,要消除这个问题,可以对渐变中心增加一个偏移量,使其不为整数\n let w = 200;\n let h = 200;\n let ctx = document.getElementById('example').getContext('2d');\n let imgData = ctx.getImageData(0,0, w, h);\n let data = getConicGradientImage(99.5, 99.5, w, h, [{\n color: [0,0,0,255],\n angle: 0,\n } ,{\n color: [255,0,0,255],\n angle: 2 * Math.PI,\n }]);\n for (let i = 0; i < imgData.data.length; i++) {\n imgData.data[i] = data[i];\n }\n ctx.putImageData(imgData, 0, 0);\n */\nfunction getConicGradientImage(\n originX,\n originY,\n width,\n height,\n stop,\n data\n) {\n if(stop.length < 2) {\n throw new Error(\n 'Conic gradient should recieve at least 2 gradient statements (start line and end line).'\n );\n }\n\n width = Math.floor(width);\n height = Math.floor(height);\n\n /**\n * 根据坐标获取角度\n * @param {number} x - x坐标,左上角为原点\n * @param {number} y - y坐标,左上角为原点\n * @returns {number} angle - 角度,0~2 * Math.PI,(originX, originY) 为原点,垂直向上为0\n */\n let getAngle = (x, y) => {\n // 此函数注释内的x、y轴基于 (originX, originY)\n // 计算相对 (originX, originY) 的坐标(dx, dy)\n let dx = x - originX;\n let dy = originY - y;\n // 在y轴上\n if(dx === 0) {\n return dy < 0\n ? // y轴负半轴,\n 1 * Math.PI\n : // y轴正半轴,因此,(originX, originY) 的angle视作0\n 0;\n }\n // 在x轴上\n if(dy === 0) {\n return dx < 0\n ? // x轴负半轴\n 1.5 * Math.PI\n : // x轴正半轴\n 0.5 * Math.PI;\n }\n let atan = Math.atan(dy / dx);\n /**\n * 2 | 1\n * -----|-----\n * 3 | 4\n */\n // 第一象限,atan > 0\n // 第四象限,atan < 0\n if(dx > 0) {\n return 0.5 * Math.PI - atan;\n }\n // 第二象限,atan < 0\n // 第三象限,atan > 0\n if(dx < 0) {\n return 1.5 * Math.PI - atan;\n }\n };\n\n let increasingList = stop.map(item => ({\n color: item[0],\n angle: item[1] * Math.PI * 2,\n }));\n\n for(let y = 0; y < height; y++) {\n for(let x = 0; x < width; x++) {\n // step 1. 找到当前点坐标相对 (originX, originY) 的角度\n let angle = getAngle(x, y);\n // step 2. 找到当前点坐标对应的渐变区间\n let j;\n for(j = 0; j < increasingList.length && increasingList[j].angle <= angle; j++) {\n }\n let start = increasingList[j - 1];\n let end = increasingList[j];\n if(!(start && end)) {\n // step 2-1. 不在渐变区间里\n continue;\n }\n // step 3. 计算色值并填充\n let factor = (angle - start.angle) / (end.angle - start.angle);\n let color = end.color.map(\n (v, idx) => factor * (v - start.color[idx]) + start.color[idx]\n );\n let i = (x + y * width) * 4;\n data[i] = color[0];\n data[i+1] = color[1];\n data[i+2] = color[2];\n data[i+3] = Math.min(255, color[3] * 255);\n }\n }\n return data;\n}\n\nexport default {\n getConicGradientImage,\n};\n","import util from './util';\n\nconst { int2rgba } = util;\n\nfunction canvasPolygon(ctx, list, dx = 0, dy = 0) {\n if(!list || !list.length) {\n return;\n }\n let start = -1;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(Array.isArray(item) && item.length) {\n start = i;\n break;\n }\n }\n if(start === -1) {\n return;\n }\n let first = list[start];\n ctx.moveTo(first[0] + dx, first[1] + dy);\n // 特殊的情况,布尔运算数学库会打乱原有顺序,致使第一个点可能有冗余的贝塞尔值,move到正确的索引坐标\n if(first.length === 4) {\n ctx.moveTo(first[2] + dx, first[3] + dy);\n }\n else if(first.length === 6) {\n ctx.moveTo(first[4] + dx, first[5] + dy);\n }\n for(let i = start + 1, len = list.length; i < len; i++) {\n let item = list[i];\n if(!Array.isArray(item)) {\n continue;\n }\n if(item.length === 2) {\n ctx.lineTo(item[0] + dx, item[1] + dy);\n }\n else if(item.length === 4) {\n ctx.quadraticCurveTo(item[0] + dx, item[1] + dy, item[2] + dx, item[3] + dy);\n }\n else if(item.length === 6) {\n ctx.bezierCurveTo(item[0] + dx, item[1] + dy, item[2] + dx, item[3] + dy, item[4] + dx, item[5] + dy);\n }\n }\n}\n\nfunction svgPolygon(list) {\n if(!list || !list.length) {\n return '';\n }\n let start = -1;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(Array.isArray(item) && item.length) {\n start = i;\n break;\n }\n }\n if(start === -1) {\n return '';\n }\n let first = list[start];\n let s = 'M' + first[0] + ',' + first[1];\n if(first.length === 4) {\n s = 'M' + first[2] + ',' + first[3];\n }\n else if(first.length === 6) {\n s = 'M' + first[4] + ',' + first[5];\n }\n for(let i = start + 1, len = list.length; i < len; i++) {\n let item = list[i];\n if(!Array.isArray(item)) {\n continue;\n }\n if(item.length === 2) {\n s += 'L' + item[0] + ',' + item[1];\n }\n else if(item.length === 4) {\n s += 'Q' + item[0] + ',' + item[1] + ' ' + item[2] + ',' + item[3];\n }\n else if(item.length === 6) {\n s += 'C' + item[0] + ',' + item[1] + ' ' + item[2] + ',' + item[3] + ' ' + item[4] + ',' + item[5];\n }\n }\n return s;\n}\n\nfunction canvasLine(ctx, x1, y1, x2, y2, controlA, controlB, num, dx = 0, dy = 0) {\n ctx.moveTo(x1 + dx, y1 + dy);\n if(num === 3) {\n ctx.bezierCurveTo(controlA[0] + dx, controlA[1] + dy, controlB[0] + dx, controlB[1], x2 + dx, y2 + dy);\n return 2;\n }\n else if(num === 2) {\n ctx.quadraticCurveTo(controlB[0] + dx, controlB[1] + dy, x2 + dx, y2 + dy);\n return 2;\n }\n else if(num === 1) {\n ctx.quadraticCurveTo(controlA[0] + dx, controlA[1] + dy, x2 + dx, y2 + dy);\n return 2;\n }\n else {\n ctx.lineTo(x2 + dx, y2 + dy);\n return 1;\n }\n}\n\nfunction svgLine(x1, y1, x2, y2, controlA, controlB, num) {\n if(num === 3) {\n return 'M' + x1 + ',' + y1\n + 'C' + controlA[0] + ',' + controlA[1] + ' ' + controlB[0] + ',' + controlB[1]\n + ' ' + x2 + ',' + y2;\n }\n else if(num === 2) {\n return 'M' + x1 + ',' + y1\n + 'Q' + controlB[0] + ',' + controlB[1]\n + ' ' + x2 + ',' + y2;\n }\n else if(num === 1) {\n return 'M' + x1 + ',' + y1\n + 'Q' + controlA[0] + ',' + controlA[1]\n + ' ' + x2 + ',' + y2;\n }\n else {\n return 'M' + x1 + ',' + y1 + 'L' + x2 + ',' + y2;\n }\n}\n\nfunction canvasFilter(filter) {\n let s = '';\n filter.forEach(item => {\n let { k, v } = item;\n if(k === 'blur') {\n s += `blur(${v}px)`;\n }\n else if(k === 'dropShadow') {\n // 浏览器暂未支持spread,去掉v[3]\n s += `drop-shadow(${v[0]}px ${v[1]}px ${v[2]}px ${int2rgba(v[4])})`;\n }\n else if(k === 'hueRotate') {\n s += `hue-rotate(${v}deg)`;\n }\n else if(k === 'saturate' || k === 'brightness' || k === 'grayscale' || k === 'contrast' || k === 'sepia' || k === 'invert') {\n s += `${k}(${v}%)`;\n }\n });\n return s;\n}\n\nexport default {\n canvasPolygon,\n svgPolygon,\n canvasLine,\n svgLine,\n canvasFilter,\n svgFilter: canvasFilter,\n};\n","import geom from '../math/geom';\nimport mode from '../refresh/mode';\nimport painter from '../util/painter';\nimport enums from '../util/enums';\nimport unit from './unit';\n\nconst { H } = geom;\nconst { PX, PERCENT, REM, VW, VH, VMAX, VMIN } = unit;\nconst { canvasPolygon, svgPolygon } = painter;\nconst {\n STYLE_KEY: {\n BORDER_LEFT_WIDTH,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n PADDING_LEFT,\n PADDING_BOTTOM,\n PADDING_TOP,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n FONT_SIZE,\n },\n} = enums;\n\n/* 获取合适的虚线实体空白宽度ps/pd和数量n\n * 总长total,start边长bs,end边长be,内容长w,\n * 实体长范围[smin,smax],空白长范围[dmin,dmax]\n */\nfunction calFitDashed(total, bs, be, w, smin, smax, dmin, dmax) {\n let n = 1;\n let ps = 1;\n let pd = 1;\n // 从最大实体空白长开始尝试\n outer:\n for(let i = smax; i >= smin; i--) {\n for(let j = dmax; j >= dmin; j--) {\n // 已知实体空白长度,n实体和n-1空白组成total,计算获取n数量\n let per = i + j;\n let num = Math.floor((total + j) / per);\n let k = j;\n // 可能除不尽,此时扩展空白长\n if(num * per < j + total) {\n let free = total - num * i;\n k = free / (num - 1);\n if(k > dmax) {\n continue;\n }\n }\n per = i + k;\n // bs比实体大才有效,因为小的话必定和第一个实体完整相连\n if(bs > 1 && bs > i) {\n let mo = bs % per;\n if(mo > i) {\n continue;\n }\n if(be > 1) {\n let mo = (bs + w) % per;\n if(mo > i) {\n continue;\n }\n }\n }\n if(be > 1) {\n let mo = (bs + w) % per;\n if(mo > i) {\n continue;\n }\n }\n if(num > 0) {\n n = num;\n ps = i;\n pd = k;\n }\n break outer;\n }\n }\n return {\n n,\n ps,\n pd,\n };\n}\n\n// dashed时n个实线和n-1虚线默认以3:1宽度组成,dotted则是n和n以1:1组成\nfunction calDashed(style, m1, m2, m3, m4, bw) {\n let total = m4 - m1;\n let w = m3 - m2;\n let bs = m2 - m1;\n let be = m4 - m3;\n if(style === 'dotted') {\n return calFitDashed(total, bs, be, w, bw, bw, Math.max(1, bw * 0.25), bw * 2);\n }\n else {\n let { n, ps, pd } = calFitDashed(total, bs, be, w, bw, bw * 3, Math.max(1, bw * 0.25), bw * 2);\n if(n === 1) {\n return calFitDashed(total, bs, be, w, bw, bw, Math.max(1, bw * 0.25), bw * 2);\n }\n // 降级为dotted\n return { n, ps, pd };\n }\n}\n\n// 获取边框分割为几块的坐标,虚线分割为若干四边形、三边型、五边形\n// 三边形重复内外边交点形成四边形,五边形进行切割形成2个四边形\n// direction为上右下左0123\nfunction calPoints(borderWidth, borderStyle, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, direction, beginRadius, endRadius) {\n let points = [];\n if(borderStyle === 'none') {\n return points;\n }\n if(['dashed', 'dotted'].indexOf(borderStyle) > -1) {\n // 寻找一个合适的虚线线段长度和之间空白边距长度\n let { n, ps, pd } = (direction === 0 || direction === 2)\n ? calDashed(borderStyle, x1, x2, x3, x4, borderWidth)\n : calDashed(borderStyle, y1, y2, y3, y4, borderWidth);\n if(n > 1) {\n for(let i = 0; i < n; i++) {\n // 最后一个可能没有到底,延长之\n let isLast = i === n - 1;\n let main1;\n let main2;\n let cross1;\n let cross2;\n if(direction === 0 || direction === 2) {\n main1 = i ? (x1 + ps * i + pd * i) : x1;\n }\n else {\n main1 = i ? (y1 + ps * i + pd * i) : y1;\n }\n main2 = main1 + ps;\n if(direction === 0) {\n // 整个和borderLeft重叠\n if(main2 <= x2) {\n if(isLast) {\n points.push([\n [x1, y1],\n [x4, y1],\n [x3, y2],\n [x2, y2]\n ]);\n }\n else {\n cross1 = y1 + (main1 - x1) * Math.tan(deg1);\n cross2 = y1 + (main2 - x1) * Math.tan(deg1);\n points.push([\n [main1, y1],\n [main2, y1],\n [main2, cross2],\n [main1, cross1]\n ]);\n }\n }\n // 整个和borderRight重叠\n else if(main1 >= x3) {\n cross1 = y1 + (x4 - main1) * Math.tan(deg2);\n cross2 = y1 + (x4 - main2) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [main1, y1],\n [x4, y1],\n [x4, y1],\n [main1, cross1]\n ]);\n }\n else {\n points.push([\n [main1, y1],\n [main2, y1],\n [main2, cross2],\n [main1, cross1]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross1 = y1 + (main1 - x1) * Math.tan(deg1);\n points.push([\n [main1, y1],\n [x2, y1],\n [x2, y2],\n [main1, cross1]\n ]);\n if(isLast) {\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x2, y2]\n ]);\n }\n else {\n // 下部分和borderRight重叠\n if(main2 > x3) {\n cross2 = y1 + (x4 - main2) * Math.tan(deg2);\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n points.push([\n [x3, y1],\n [main2, y1],\n [main2, cross2],\n [x3, y2]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x2, y1],\n [main2, y1],\n [main2, y2],\n [x2, y2]\n ]);\n }\n }\n }\n // 下部分和borderRight重叠\n else if(main2 > x3) {\n cross1 = y1 + (x4 - main2) * Math.tan(deg2);\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross2 = y1 + (main1 - x1) * Math.tan(deg1);\n points.push([\n [main1, y1],\n [x2, y1],\n [x2, y2],\n [main1, cross2]\n ]);\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n if(isLast) {\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x3, y2]\n ]);\n }\n else {\n points.push([\n [x3, y1],\n [main2, y1],\n [main2, cross1],\n [x3, y2]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [main1, y1],\n [x3, y1],\n [x3, y2],\n [main1, y2]\n ]);\n if(isLast) {\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x3, y2]\n ]);\n }\n else {\n points.push([\n [x3, y1],\n [main2, y1],\n [main2, cross1],\n [x3, y2]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [main1, y1],\n [x4, y1],\n [x3, y2],\n [main1, y2]\n ]);\n }\n else {\n points.push([\n [main1, y1],\n [main2, y1],\n [main2, y2],\n [main1, y2]\n ]);\n }\n }\n }\n }\n else if(direction === 1) {\n // 整个和borderTop重叠\n if(main2 <= y2) {\n if(isLast) {\n points.push([\n [x3, y2],\n [x4, y1],\n [x4, y4],\n [x3, y3]\n ]);\n }\n else {\n cross1 = x4 - (main1 - y1) * Math.tan(deg1);\n cross2 = x4 - (main2 - y1) * Math.tan(deg1);\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, main2],\n [cross2, main2],\n ]);\n }\n }\n // 整个和borderBottom重叠\n else if(main1 >= y3) {\n cross1 = x3 + (main1 - y3) * Math.tan(deg2);\n cross2 = x3 + (main2 - y3) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, y4],\n [x4, y4]\n ]);\n }\n else {\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, main2],\n [cross2, main2]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross1 = x3 + (y2 - main1) * Math.tan(deg1);\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, y2],\n [x3, y2]\n ]);\n if(isLast) {\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, y4],\n [x4, y4]\n ]);\n }\n else {\n // 下部分和borderBottom重叠\n if(main2 > y3) {\n cross2 = x3 + (main2 - y3) * Math.tan(deg2);\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, main2],\n [cross2, main2]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, main2],\n [x3, main2]\n ]);\n }\n }\n }\n // 下部分和borderBottom重叠\n else if(main2 > y3) {\n cross1 = x3 + (main2 - y3) * Math.tan(deg2);\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross2 = x3 + (y2 - main1) * Math.tan(deg1);\n points.push([\n [cross2, main1],\n [x4, main1],\n [x4, y2],\n [x3, y2]\n ]);\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, x4],\n [x4, x4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, main2],\n [cross1, main2]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [x3, main1],\n [x4, main1],\n [x4, y3],\n [x3, y3]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, y4],\n [x4, y4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, main2],\n [cross1, main2]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [x3, main1],\n [x4, main1],\n [x4, y4],\n [x3, y3]\n ]);\n }\n else {\n points.push([\n [x3, main1],\n [x4, main1],\n [x4, main2],\n [x3, main2]\n ]);\n }\n }\n }\n }\n else if(direction === 2) {\n // 整个和borderLeft重叠\n if(main2 <= x2) {\n if(isLast) {\n points.push([\n [x1, y4],\n [x2, y3],\n [x3, y3],\n [x4, y4]\n ]);\n }\n else {\n cross1 = y4 - (main1 - x1) * Math.tan(deg1);\n cross2 = y4 - (main2 - x1) * Math.tan(deg1);\n points.push([\n [main1, cross1],\n [main2, cross2],\n [main2, y4],\n [main1, y4]\n ]);\n }\n }\n // 整个和borderRight重叠\n else if(main1 >= x3) {\n cross1 = y4 - (x4 - main1) * Math.tan(deg2);\n cross2 = y4 - (x4 - main2) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [main1, cross1],\n [x4, y4],\n [x4, y4],\n [main1, y4]\n ]);\n }\n else {\n points.push([\n [main1, cross1],\n [main2, cross2],\n [main2, y4],\n [main1, y4]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross1 = y4 - (main1 - x1) * Math.tan(deg1);\n points.push([\n [main1, cross1],\n [x2, y3],\n [x2, y4],\n [main1, y4]\n ]);\n if(isLast) {\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n else {\n // 下部分和borderRight重叠\n if(main2 > x3) {\n cross2 = y4 - (main2 - x3) * Math.tan(deg2);\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n points.push([\n [x3, y3],\n [main2, cross2],\n [main2, y4],\n [x3, y4]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x2, y3],\n [main2, y3],\n [main2, y4],\n [x2, y4]\n ]);\n }\n }\n }\n // 下部分和borderRight重叠\n else if(main2 > x3) {\n cross1 = y4 - (x4 - main2) * Math.tan(deg2);\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross2 = y4 - (main1 - x3) * Math.tan(deg1);\n points.push([\n [main1, cross2],\n [x2, y3],\n [x2, y4],\n [main1, y4]\n ]);\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [main2, cross1],\n [main2, y4],\n [x3, y4]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [main1, y3],\n [x3, y3],\n [x3, y4],\n [main1, y4]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [main2, cross1],\n [main2, y4],\n [x3, y4]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [main1, y3],\n [x3, y3],\n [x4, y4],\n [main1, y4]\n ]);\n }\n else {\n points.push([\n [main1, y3],\n [main2, y3],\n [main2, y4],\n [main1, y4]\n ]);\n }\n }\n }\n }\n else if(direction === 3) {\n // 整个和borderTop重叠\n if(main2 <= y2) {\n if(isLast) {\n points.push([\n [x1, y1],\n [x2, y2],\n [x2, y3],\n [x1, y4]\n ]);\n }\n else {\n cross1 = x1 + (main1 - y1) * Math.tan(deg1);\n cross2 = x1 + (main2 - y1) * Math.tan(deg1);\n points.push([\n [x1, main1],\n [cross1, main1],\n [cross2, main2],\n [x1, main2]\n ]);\n }\n }\n // 整个和borderBottom重叠\n else if(main1 >= y3) {\n cross1 = x1 + (y4 - main1) * Math.tan(deg2);\n cross2 = x1 + (y4 - main2) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [x1, main1],\n [cross1, main1],\n [x1, y4],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, main1],\n [cross1, main1],\n [cross2, main2],\n [x1, main2]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross1 = x1 + (main1 - y1) * Math.tan(deg1);\n points.push([\n [x1, main1],\n [cross1, main1],\n [x2, y2],\n [x1, y2]\n ]);\n if(isLast) {\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4],\n ]);\n }\n else {\n // 下部分和borderBottom重叠\n if(main2 > y3) {\n cross2 = x1 + (y4 - main2) * Math.tan(deg2);\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n points.push([\n [x1, y3],\n [x2, y3],\n [cross2, main2],\n [x1, main2]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, main2],\n [x1, main2]\n ]);\n }\n }\n }\n // 下部分和borderBottom重叠\n else if(main2 > y3) {\n cross1 = x1 + (y4 - main2) * Math.tan(deg2);\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross2 = x1 + (main1 - y1) * Math.tan(deg1);\n points.push([\n [x1, main1],\n [cross2, main1],\n [x2, y2],\n [x1, y1]\n ]);\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n if(isLast) {\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, y3],\n [x2, y3],\n [cross1, main2],\n [x1, main2]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [x1, main1],\n [x2, main1],\n [x2, y3],\n [x1, y3]\n ]);\n if(isLast) {\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, y3],\n [x2, y3],\n [cross1, main2],\n [x1, main2]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [x1, main1],\n [x2, main1],\n [x2, y3],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, main1],\n [x2, main1],\n [x2, main2],\n [x1, main2]\n ]);\n }\n }\n }\n }\n }\n if(direction === 0) {\n return calTopRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 1) {\n return calRightRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 2) {\n return calBottomRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 3) {\n return calLeftRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n }\n }\n // 兜底返回实线\n if(direction === 0) {\n if(x2 > x1) {\n points.push([\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1, y1]\n ]);\n }\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n if(x4 > x3) {\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x3, y2]\n ]);\n }\n return calTopRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 1) {\n if(y2 > y1) {\n points.push([\n [x4, y1],\n [x4, y1],\n [x4, y2],\n [x3, y2]\n ]);\n }\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n if(y4 > y3) {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, y4],\n [x4, y4]\n ]);\n }\n return calRightRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 2) {\n if(x2 > x1) {\n points.push([\n [x1, y4],\n [x2, y3],\n [x2, y4],\n [x1, y4]\n ]);\n }\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n if(x4 > x3) {\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n return calBottomRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 3) {\n if(y2 > y1) {\n points.push([\n [x1, y1],\n [x1, y1],\n [x2, y2],\n [x1, y2]\n ]);\n }\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n if(y4 > y3) {\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4]\n ]);\n }\n return calLeftRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n}\n\nfunction calTopRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,左圆角、右圆角、中间矩形,3个区域2个坐标;当左右圆角相接时中间矩形为0即中间2个坐标相等\n let oxl = x2 + brx - (x2 - x1);\n let oxr = x3 - erx + (x4 - x3);\n // 先拆分,当一块四边形跨越左右圆角和中间非圆角时被拆为3份,只跨一边圆角拆2份,不跨不处理\n // 也有可能左右圆角相接,跨越的只分为左右2份\n // 最终左圆角内的存入begin,右圆角内的存入end,中间center\n let beginList = [];\n let centerList = [];\n let endList = [];\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在左圆角\n if(points[1][0] < oxl) {\n beginList.push(points);\n }\n // 全在右圆角\n else if(points[0][0] > oxr) {\n endList.push(points);\n }\n // 跨越左右圆角\n else if(points[1][0] > oxr && points[0][0] < oxl) {\n let ya = oxl < x2 ? (y1 + Math.tan(deg1) * (oxl - x1)) : y2;\n let yb = oxr > x3 ? (y1 + Math.tan(deg2) * (x4 - oxr)) : y2;\n beginList.push([\n points[0],\n [oxl, y1],\n [oxl, ya],\n points[3]\n ]);\n if(oxl < oxr) {\n if(oxl > x2 && oxr < x3) {\n centerList.push([\n [oxl, y1],\n [oxr, y1],\n [oxr, y2],\n [oxl, y2],\n ]);\n }\n else if(oxl > x2) {\n centerList.push([\n [oxl, y1],\n [x3, y1],\n [x3, y2],\n [oxl, y2],\n ]);\n centerList.push([\n [x3, y1],\n [oxr, y1],\n [oxr, yb],\n [x3, y2]\n ]);\n }\n else if(oxr < x3) {\n centerList.push([\n [oxl, y1],\n [x2, y1],\n [x2, y2],\n [oxl, ya]\n ]);\n centerList.push([\n [x2, y1],\n [oxr, y1],\n [oxr, y2],\n [x2, y2],\n ]);\n }\n else {\n centerList.push([\n [oxl, y1],\n [x2, y1],\n [x2, y2],\n [oxl, ya]\n ]);\n centerList.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2],\n ]);\n centerList.push([\n [x3, y1],\n [oxr, y1],\n [oxr, yb],\n [x3, y2]\n ]);\n }\n }\n endList.push([\n [oxr, y1],\n points[1],\n points[2],\n [oxr, yb]\n ]);\n }\n // 跨越右圆角\n else if(points[1][0] > oxr) {\n let y = oxr > x3 ? (y1 + Math.tan(deg2) * (x4 - oxr)) : y2;\n centerList.push([\n points[0],\n [oxr, y1],\n [oxr, y],\n points[3]\n ]);\n endList.push([\n [oxr, y1],\n points[1],\n points[2],\n [oxr, y]\n ]);\n }\n // 跨越左圆角\n else if(points[0][0] < oxl) {\n let y = oxl < x2 ? (y1 + Math.tan(deg1) * (oxl - x1)) : y2;\n beginList.push([\n points[0],\n [oxl, y1],\n [oxl, y],\n points[3]\n ]);\n centerList.push([\n [oxl, y1],\n points[1],\n points[2],\n [oxl, y],\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = brx > (x2 - x1) && borderWidth < bry;\n // 算这个角度是为了头部和上条边相交线的延长线\n let crossDeg = Math.atan((x2 - x1) / (y2 - y1));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oyl = y1 + bry;\n let rx2 = brx - (x2 - x1);\n let ry2 = bry - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierTopLeft(beginList[0][0], beginList[0][1], oxl, oyl, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierTopLeft(beginList[0][3], beginList[0][2], oxl, oyl, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierTopLeft(points[0], points[1], oxl, oyl, sx1, ry1);\n if(needInner) {\n controls2 = calBezierTopLeft(points[3], points[2], oxl, oyl, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 0);\n }\n points[0] = controls1[0];\n if(controls1[1]) {\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 0);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n });\n }\n let endLength = endList.length;\n if(endLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = erx > (x4 - x3) && borderWidth < ery;\n // 算这个角度是为了最后和下条边相交线的延长线\n let crossDeg = Math.atan((x4 - x3) / (y2 - y1));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oyr = y1 + ery;\n let rx2 = erx - (x4 - x3);\n let ry2 = ery - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierTopRight(endList[endLength - 1][0], endList[endLength - 1][1], oxr, oyr, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierTopRight(endList[endLength - 1][3], endList[endLength - 1][2], oxr, oyr, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierTopRight(points[0], points[1], oxr, oyr, sx1, ry1);\n if(needInner) {\n controls2 = calBezierTopRight(points[3], points[2], oxr, oyr, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 1);\n }\n points[0] = controls1[0];\n if(controls1[1]) {\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 1);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierTopLeft(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = -p1x + ox;\n let dsx1 = dx1 * sx;\n let dx2 = -p2x + ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (oy - p2y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox - Math.sin(deg2) * r / sx;\n let cpy2 = oy - Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n // 最初的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox - Math.cos(alpha) * r / sx;\n cpy1 = oy - Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (oy - p1y));\n cpx1 = ox - Math.sin(deg1) * r / sx;\n cpy1 = oy - Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(p1x, p1y, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(p2x, p2y, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calBezierTopRight(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (oy - p1y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox + Math.sin(deg1) * r / sx;\n let cpy1 = oy - Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n // 最后的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox + Math.cos(alpha) * r / sx;\n cpy2 = oy - Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (oy - p2y));\n cpx2 = ox + Math.sin(deg2) * r / sx;\n cpy2 = oy - Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calRightRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,上圆角、下圆角、中间矩形,3个区域2个坐标;当上下圆角相接时中间矩形为0即中间2个坐标相等\n let oyt = y2 + bry - (y2 - y1);\n let oyb = y3 - ery + (y4 - y3);\n let beginList = [];\n let centerList = [];\n let endList = [];\n // 同borderTop拆分\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在上圆角\n if(points[2][1] < oyt) {\n beginList.push(points);\n }\n // 全在下圆角\n else if(points[1][1] > oyb) {\n endList.push(points);\n }\n // 跨越上下圆角\n else if(points[2][1] > oyb && points[1][1] < oyt) {\n let xa = oyt < y2 ? (x3 + Math.tan(deg2) * (y2 - oyt)) : x3;\n let xb = oyb > y3 ? (x3 + Math.tan(deg1) * (oyb - y3)) : x3;\n beginList.push([\n points[0],\n points[1],\n [x4, oyt],\n [xa, oyt]\n ]);\n if(oyt < oyb) {\n if(oyb < y3 && oyt > y2) {\n centerList.push([\n [x3, oyt],\n [x4, oyt],\n [x4, oyb],\n [x3, oyb]\n ]);\n }\n else if(oyt > y2) {\n centerList.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3],\n ]);\n centerList.push([\n [x3, y3],\n [x4, y3],\n [x4, oyb],\n [xb, oyb],\n ]);\n }\n else if(oyb < y3) {\n centerList.push([\n [xa, oyt],\n [x4, oyt],\n [x4, y2],\n [x3, y2],\n ]);\n centerList.push([\n [x3, y2],\n [x4, y2],\n [x4, oyb],\n [x3, oyb],\n ]);\n }\n else {\n centerList.push([\n [xa, oyt],\n [x4, oyt],\n [x4, y2],\n [x3, y2],\n ]);\n centerList.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3],\n ]);\n centerList.push([\n [x3, y3],\n [x4, y3],\n [x4, oyb],\n [xb, oyb],\n ]);\n }\n }\n endList.push([\n [xb, oyb],\n [x4, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越下圆角\n else if(points[2][1] > oyb) {\n let x = oyb > y3 ? (x3 + Math.tan(deg1) * (oyb - y3)) : x3;\n centerList.push([\n points[0],\n points[1],\n [x4, oyb],\n [x, oyb]\n ]);\n endList.push([\n [x, oyb],\n [x4, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越上圆角\n else if(points[1][1] < oyt) {\n let x = oyt < y2 ? (x3 + Math.tan(deg2) * (y2 - oyt)) : x3;\n beginList.push([\n points[0],\n points[1],\n [x4, oyt],\n [x, oyt]\n ]);\n centerList.push([\n [x, oyt],\n [x4, oyt],\n points[2],\n points[3]\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n let needInner = bry > (y2 - y1) && borderWidth < brx;\n let crossDeg = Math.atan((x4 - x3) / (y2 - y1));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oxt = x4 - brx;\n let rx2 = brx - (x4 - x3);\n let ry2 = bry - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierRightTop(beginList[0][1], beginList[0][2], oxt, oyt, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierRightTop(beginList[0][0], beginList[0][3], oxt, oyt, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierRightTop(points[1], points[2], oxt, oyt, sx1, ry1);\n if(needInner) {\n controls2 = calBezierRightTop(points[0], points[3], oxt, oyt, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 2);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 2);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[2] = points[3];\n points[3] = points[0];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n let endLength = endList.length;\n if(endLength) {\n let needInner = ery > (y4 - y3) && borderWidth < erx;\n let crossDeg = Math.atan((x4 - x3) / (y4 - y3));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oxb = x4 - erx;\n let rx2 = erx - (x4 - x3);\n let ry2 = ery - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierRightBottom(endList[endLength - 1][1], endList[endLength - 1][2], oxb, oyb, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierRightBottom(endList[endLength - 1][0], endList[endLength - 1][3], oxb, oyb, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierRightBottom(points[1], points[2], oxb, oyb, sx1, ry1);\n if(needInner) {\n controls2 = calBezierRightBottom(points[0], points[3], oxb, oyb, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 3);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 3);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[2] = points[3];\n points[3] = points[0];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierRightTop(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (oy - p2y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox + Math.sin(deg2) * r / sx;\n let cpy2 = oy - Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox + Math.cos(alpha) * r / sx;\n cpy1 = oy - Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (oy - p1y));\n cpx1 = ox + Math.sin(deg1) * r / sx;\n cpy1 = oy - Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#000';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\nfunction calBezierRightBottom(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (p1y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox + Math.sin(deg1) * r / sx;\n let cpy1 = oy + Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox + Math.cos(alpha) * r / sx;\n cpy2 = oy + Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (p2y - oy));\n cpx2 = ox + Math.sin(deg2) * r / sx;\n cpy2 = oy + Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\nfunction calBottomRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,左圆角、右圆角、中间矩形,3个区域2个坐标;当左右圆角相接时中间矩形为0即中间2个坐标相等\n let oxl = x2 + brx - (x2 - x1);\n let oxr = x3 - erx + (x4 - x3);\n // 先拆分,当一块四边形跨越左右圆角和中间非圆角时被拆为3份,只跨一边圆角拆2份,不跨不处理\n // 也有可能左右圆角相接,跨越的只分为左右2份\n // 最终左圆角内的存入begin,右圆角内的存入end,中间center\n let beginList = [];\n let centerList = [];\n let endList = [];\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在左圆角\n if(points[2][0] < oxl) {\n beginList.push(points);\n }\n // 全在右圆角\n else if(points[3][0] > oxr) {\n endList.push(points);\n }\n // 跨越左右圆角\n else if(points[2][0] > oxr && points[3][0] < oxl) {\n let ya = oxl < x2 ? (y4 - Math.tan(deg1) * (oxl - x1)) : y2;\n let yb = oxr > x3 ? (y4 - Math.tan(deg2) * (x4 - oxr)) : y3;\n beginList.push([\n points[0],\n [oxl, ya],\n [oxl, y4],\n points[3]\n ]);\n if(oxl < oxr) {\n if(oxl > x2 && oxr < x3) {\n centerList.push([\n [oxl, y3],\n [oxr, y3],\n [oxr, y4],\n [oxl, y4],\n ]);\n }\n else if(oxl > x2) {\n centerList.push([\n [oxl, y3],\n [x3, y3],\n [x3, y4],\n [oxl, y4],\n ]);\n centerList.push([\n [x3, y3],\n [oxr, yb],\n [oxr, y4],\n [x3, y4]\n ]);\n }\n else if(oxr < x3) {\n centerList.push([\n [oxl, ya],\n [x2, y3],\n [x2, y4],\n [oxl, y4]\n ]);\n centerList.push([\n [x2, y3],\n [oxr, y3],\n [oxr, y4],\n [x2, y4],\n ]);\n }\n else {\n centerList.push([\n [oxl, ya],\n [x2, y3],\n [x2, y4],\n [oxl, y4]\n ]);\n centerList.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4],\n ]);\n centerList.push([\n [x3, y3],\n [oxr, yb],\n [oxr, y4],\n [x3, y4]\n ]);\n }\n }\n endList.push([\n [oxr, yb],\n points[1],\n points[2],\n [oxr, y4]\n ]);\n }\n // 跨越右圆角\n else if(points[2][0] > oxr) {\n let y = oxr > x3 ? (y4 - Math.tan(deg2) * (x4 - oxr)) : y3;\n centerList.push([\n points[0],\n [oxr, y],\n [oxr, y4],\n points[3]\n ]);\n endList.push([\n [oxr, y],\n points[1],\n points[2],\n [oxr, y4]\n ]);\n }\n // 跨越左圆角\n else if(points[3][0] < oxl) {\n let y = oxl < x2 ? (y4 - Math.tan(deg1) * (oxl - x1)) : y3;\n beginList.push([\n points[0],\n [oxl, y],\n [oxl, y4],\n points[3]\n ]);\n centerList.push([\n [oxl, y],\n points[1],\n points[2],\n [oxl, y4],\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = brx > (x2 - x1) && borderWidth < bry;\n // 算这个角度是为了头部和上条边相交线的延长线\n let crossDeg = Math.atan((x2 - x1) / (y4 - y3));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oyl = y4 - bry;\n let rx2 = brx - (x2 - x1);\n let ry2 = bry - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierBottomLeft(beginList[0][3], beginList[0][2], oxl, oyl, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierBottomLeft(beginList[0][0], beginList[0][1], oxl, oyl, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierBottomLeft(points[3], points[2], oxl, oyl, sx1, ry1);\n if(needInner) {\n controls2 = calBezierBottomLeft(points[0], points[1], oxl, oyl, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 4);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 4);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n else {\n points[2] = points[1];\n points[3] = points[0];\n }\n points[0] = controls1[0];\n if(controls1[1]) {\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n }\n });\n }\n let endLength = endList.length;\n if(endLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = erx > (x4 - x3) && borderWidth < ery;\n // 算这个角度是为了最后和下条边相交线的延长线\n let crossDeg = Math.atan((x4 - x3) / (y4 - y3));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oyr = y4 - ery;\n let rx2 = erx - (x4 - x3);\n let ry2 = ery - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierBottomRight(endList[endLength - 1][3], endList[endLength - 1][2], oxr, oyr, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierBottomRight(endList[endLength - 1][0], endList[endLength - 1][1], oxr, oyr, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierBottomRight(points[3], points[2], oxr, oyr, sx1, ry1);\n if(needInner) {\n controls2 = calBezierBottomRight(points[0], points[1], oxr, oyr, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 5);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 5);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n else {\n points[2] = points[1];\n points[3] = points[0];\n }\n points[0] = controls1[0];\n if(controls1[1]) {\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n }\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierBottomLeft(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = -p1x + ox;\n let dsx1 = dx1 * sx;\n let dx2 = -p2x + ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (p2y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox - Math.sin(deg2) * r / sx;\n let cpy2 = oy + Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n // 最初的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox - Math.cos(alpha) * r / sx;\n cpy1 = oy + Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (p1y - oy));\n cpx1 = ox - Math.sin(deg1) * r / sx;\n cpy1 = oy + Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calBezierBottomRight(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (p1y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox + Math.sin(deg1) * r / sx;\n let cpy1 = oy + Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n // 最后的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox + Math.cos(alpha) * r / sx;\n cpy2 = oy + Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (p2y - oy));\n cpx2 = ox + Math.sin(deg2) * r / sx;\n cpy2 = oy + Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calLeftRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,上圆角、下圆角、中间矩形,3个区域2个坐标;当上下圆角相接时中间矩形为0即中间2个坐标相等\n let oyt = y2 + bry - (y2 - y1);\n let oyb = y3 - ery + (y4 - y3);\n let beginList = [];\n let centerList = [];\n let endList = [];\n // 同borderTop拆分\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在上圆角\n if(points[3][1] < oyt) {\n beginList.push(points);\n }\n // 全在下圆角\n else if(points[0][1] > oyb) {\n endList.push(points);\n }\n // 跨越上下圆角\n else if(points[3][1] > oyb && points[0][1] < oyt) {\n let xa = oyt < y2 ? (x2 - Math.tan(deg2) * (y2 - oyt)) : x2;\n let xb = oyb > y3 ? (x2 - Math.tan(deg1) * (oyb - y3)) : x2;\n beginList.push([\n points[0],\n points[1],\n [xa, oyt],\n [x1, oyt]\n ]);\n if(oyt < oyb) {\n if(oyb < y3 && oyt > y2) {\n centerList.push([\n [x1, oyt],\n [x2, oyt],\n [x2, oyb],\n [x1, oyb]\n ]);\n }\n else if(oyt > y2) {\n centerList.push([\n [x1, oyt],\n [x2, oyt],\n [x2, y3],\n [x1, y3],\n ]);\n centerList.push([\n [x1, y3],\n [x2, y3],\n [xb, oyb],\n [x1, oyb],\n ]);\n }\n else if(oyb < y3) {\n centerList.push([\n [x1, oyt],\n [xa, oyt],\n [x2, y2],\n [x1, y2],\n ]);\n centerList.push([\n [x1, y2],\n [x2, y2],\n [x2, oyb],\n [x1, oyb],\n ]);\n }\n else {\n centerList.push([\n [x1, oyt],\n [xa, oyt],\n [x2, y2],\n [x1, y2],\n ]);\n centerList.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3],\n ]);\n centerList.push([\n [x1, y3],\n [x2, y3],\n [xb, oyb],\n [x1, oyb],\n ]);\n }\n }\n endList.push([\n [x1, oyb],\n [xb, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越下圆角\n else if(points[3][1] > oyb) {\n let x = oyb > y3 ? (x2 - Math.tan(deg1) * (oyb - y3)) : x2;\n centerList.push([\n points[0],\n points[1],\n [x, oyb],\n [x1, oyb]\n ]);\n endList.push([\n [x1, oyb],\n [x, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越上圆角\n else if(points[1][1] < oyt) {\n let x = oyt < y2 ? (x2 - Math.tan(deg2) * (y2 - oyt)) : x2;\n beginList.push([\n points[0],\n points[1],\n [x, oyt],\n [x1, oyt]\n ]);\n centerList.push([\n [x1, oyt],\n [x, oyt],\n points[2],\n points[3]\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n let needInner = bry > (y2 - y1) && borderWidth < brx;\n let crossDeg = Math.atan((x2 - x1) / (y2 - y1));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oxt = x1 + brx;\n let rx2 = brx - (x2 - x1);\n let ry2 = bry - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierLeftTop(beginList[0][0], beginList[0][3], oxt, oyt, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierLeftTop(beginList[0][1], beginList[0][2], oxt, oyt, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierLeftTop(points[0], points[3], oxt, oyt, sx1, ry1);\n if(needInner) {\n controls2 = calBezierLeftTop(points[1], points[2], oxt, oyt, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 6);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 6);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[3] = points[1];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n let endLength = endList.length;\n if(endLength) {\n let needInner = ery > (y4 - y3) && borderWidth < erx;\n let crossDeg = Math.atan((x2 - x1) / (y4 - y3));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oxb = x1 + erx;\n let rx2 = erx - (x2 - x1);\n let ry2 = ery - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierLeftBottom(endList[endLength - 1][0], endList[endLength - 1][3], oxb, oyb, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierLeftBottom(endList[endLength - 1][1], endList[endLength - 1][2], oxb, oyb, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierLeftBottom(points[0], points[3], oxb, oyb, sx1, ry1);\n if(needInner) {\n controls2 = calBezierLeftBottom(points[1], points[2], oxb, oyb, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 7);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 7);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[3] = points[1];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierLeftTop(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = ox - p1x;\n let dsx1 = dx1 * sx;\n let dx2 = ox - p2x;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (oy - p2y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox - Math.sin(deg2) * r / sx;\n let cpy2 = oy - Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox - Math.cos(alpha) * r / sx;\n cpy1 = oy - Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (oy - p1y));\n cpx1 = ox - Math.sin(deg1) * r / sx;\n cpy1 = oy - Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#000';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\nfunction calBezierLeftBottom(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = ox - p1x;\n let dsx1 = dx1 * sx;\n let dx2 = ox - p2x;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (p1y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox - Math.sin(deg1) * r / sx;\n let cpy1 = oy + Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox - Math.cos(alpha) * r / sx;\n cpy2 = oy + Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (p2y - oy));\n cpx2 = ox - Math.sin(deg2) * r / sx;\n cpy2 = oy + Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\n/**\n * 简单计算椭圆的圆化坐标控制点,视作重合位置,外面判断backgroundClip并调整坐标\n * @param x 起始x\n * @param y 起始y\n * @param w 宽\n * @param h 高\n * @param btlr borderTopLeftRadius\n * @param btrr borderTopRightRadius\n * @param bbrr borderBottomRightRadius\n * @param bblr borderBottomLeftRadius\n * @returns {[]} 多边形的顶点和曲线控制点\n */\nfunction calRadius(x, y, w, h, btlr, btrr, bbrr, bblr) {\n let need;\n let [btlx, btly] = btlr;\n let [btrx, btry] = btrr;\n let [bbrx, bbry] = bbrr;\n let [bblx, bbly] = bblr;\n btlx = Math.max(btlx, 0);\n btly = Math.max(btly, 0);\n btrx = Math.max(btrx, 0);\n btry = Math.max(btry, 0);\n bbrx = Math.max(bbrx, 0);\n bbry = Math.max(bbry, 0);\n bblx = Math.max(bblx, 0);\n bbly = Math.max(bbly, 0);\n // 圆角必须x/y都>0才有效,否则视为不绘制\n if(btlx > 0 && btly > 0 || btrx > 0 && btry > 0 || bbrx > 0 && bbry > 0 || bblx > 0 && bbly > 0) {\n need = true;\n }\n if(need) {\n let list = [];\n if(btlx > 0 && btly > 0) {\n list.push([x, y + btly]);\n list.push([x, y + (btly) * (1 - H), x + btlx * (1 - H), y, x + btlx, y]);\n }\n else {\n list.push([x, y]);\n }\n if(btrx > 0 && btry > 0) {\n list.push([x + w - btrx, y]);\n list.push([x + w - btrx * (1 - H), y, x + w, y + btry * (1 - H), x + w, y + btry]);\n }\n else {\n list.push([x + w, y]);\n }\n if(bbrx > 0 && bbry > 0) {\n list.push([x + w, y + h - bbry]);\n list.push([x + w, y + h - bbry * (1 - H), x + w - bbrx * (1 - H), y + h, x + w - bbrx, y + h]);\n }\n else {\n list.push([x + w, y + h]);\n }\n if(bblx > 0 && bbly > 0) {\n list.push([x + bblx, y + h]);\n list.push([x + bblx * (1 - H), y + h, x, y + h - bbly * (1 - H), x, y + h - bbly]);\n }\n else {\n list.push([x, y + h]);\n }\n return list;\n }\n}\n\nfunction limit(points, x, y, direction) {\n if(direction === 0) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n else if(direction === 1) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n else if(direction === 2) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 3) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n else if(direction === 4) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 5) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 6) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 7) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n}\n\nconst BR_KS = [BORDER_TOP_LEFT_RADIUS, BORDER_TOP_RIGHT_RADIUS, BORDER_BOTTOM_RIGHT_RADIUS, BORDER_BOTTOM_LEFT_RADIUS];\nfunction calBorderRadius(w, h, currentStyle, computedStyle, root) {\n let noRadius = true;\n BR_KS.forEach(k => {\n computedStyle[k] = currentStyle[k].map((item, i) => {\n if(item.v > 0) {\n noRadius = false;\n }\n else {\n return 0;\n }\n if(item.u === PX) {\n return Math.max(0, item.v);\n }\n else if(item.u === PERCENT) {\n return Math.max(0, item.v * (i ? h : w) * 0.01);\n }\n else if(item.u === REM) {\n return Math.max(0, item.v * root.computedStyle[FONT_SIZE]);\n }\n else if(item.u === VW) {\n return Math.max(0, item.v * root.width * 0.01);\n }\n else if(item.u === VH) {\n return Math.max(0, item.v * root.height * 0.01);\n }\n else if(item.u === VMAX) {\n return Math.max(0, item.v * Math.max(root.width, root.height) * 0.01);\n }\n else if(item.u === VMIN) {\n return Math.max(0, item.v * Math.min(root.width, root.height) * 0.01);\n }\n return 0;\n });\n });\n // 优化提前跳出\n if(noRadius) {\n return;\n }\n // radius限制,相交的2个之和不能超过边长,如果2个都超过中点取中点,只有1个超过取交点,这包含了单个不能超过总长的逻辑\n BR_KS.forEach((k, i) => {\n let j = i % 2 === 0 ? 0 : 1;\n let target = j ? h : w;\n let prev = computedStyle[k];\n let next = computedStyle[BR_KS[(i + 1) % 4]];\n // 相加超过边长则是相交\n if(prev[j] + next[j] > target) {\n let half = target * 0.5;\n // 都超过一半中点取中点\n if(prev[j] >= half && next[j] >= half) {\n prev[j] = next[j] = half;\n }\n // 仅1个超过中点,因相交用总长减去另一方即可\n else if(prev[j] > half) {\n prev[j] = target - next[j];\n }\n else if(next[j] > half) {\n next[j] = target - prev[j];\n }\n }\n });\n}\n\nfunction calBorderRadiusInline(contentBoxList, currentStyle, computedStyle) {\n let first, last;\n if(contentBoxList.length) {\n first = contentBoxList[0];\n last = contentBoxList[contentBoxList.length - 1];\n // 不用instanceof防止循环依赖\n if(last.isEllipsis) {\n last = contentBoxList[contentBoxList.length - 2];\n }\n }\n // 先看first的左侧\n let w = first ? first.outerWidth : 0, h = first ? first.outerHeight : 0;\n w += computedStyle[BORDER_LEFT_WIDTH] + computedStyle[PADDING_LEFT];\n h += computedStyle[BORDER_TOP_WIDTH] + computedStyle[BORDER_BOTTOM_WIDTH]\n + computedStyle[PADDING_TOP] + computedStyle[PADDING_BOTTOM];\n [BORDER_TOP_LEFT_RADIUS, BORDER_BOTTOM_LEFT_RADIUS].forEach(k => {\n computedStyle[k] = currentStyle[k].map((item, i) => {\n let v;\n if(item.u === PX) {\n v = Math.max(0, item.v);\n v = Math.min(i ? h : w, v);\n }\n else {\n v = Math.max(0, item.v * (i ? h : w) * 0.01);\n v = Math.min(i ? h : w, v);\n }\n return v;\n });\n });\n // 再看end的右侧\n w = last ? last.outerWidth : 0;\n h = last ? last.outerHeight : 0;\n [BORDER_TOP_RIGHT_RADIUS, BORDER_BOTTOM_RIGHT_RADIUS].forEach(k => {\n computedStyle[k] = currentStyle[k].map((item, i) => {\n let v;\n if(item.u === PX) {\n v = Math.max(0, item.v);\n v = Math.min(i ? h : w, v);\n }\n else {\n v = Math.max(0, item.v * (i ? h : w) * 0.01);\n v = Math.min(i ? h : w, v);\n }\n return v;\n });\n });\n}\n\nfunction renderBorder(xom, renderMode, ctx, points, color, dx, dy) {\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n ctx.beginPath();\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n points.forEach(point => {\n canvasPolygon(ctx, point, dx, dy);\n });\n ctx.fill();\n ctx.closePath();\n }\n else if(renderMode === mode.SVG) {\n let s = '';\n points.forEach(point => {\n s += svgPolygon(point);\n });\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', s],\n ['fill', color],\n ],\n });\n }\n}\n\nexport default {\n calPoints,\n calRadius,\n calBorderRadius,\n calBorderRadiusInline,\n renderBorder,\n};\n","import unit from './unit';\nimport reg from './reg';\nimport geom from '../math/geom';\nimport vector from '../math/vector';\nimport mx from '../math/matrix';\nimport gradient from '../math/gradient';\nimport border from './border';\nimport mode from '../refresh/mode';\nimport util from '../util/util';\nimport painter from '../util/painter';\nimport enums from '../util/enums';\nimport inject from '../util/inject';\n\nconst { rgba2int, isNil } = util;\nconst { PX, PERCENT, DEG, NUMBER, REM, VW, VH, VMAX, VMIN, calUnit } = unit;\nconst { d2r } = geom;\nconst { canvasPolygon } = painter;\nconst {\n STYLE_KEY: {\n FONT_SIZE,\n },\n} = enums;\n\nfunction getLinearDeg(v) {\n let deg = 180;\n if(v === 'to top') {\n deg = 0;\n }\n else if(v === 'to top right') {\n deg = 45;\n }\n else if(v === 'to right') {\n deg = 90;\n }\n else if(v === 'to bottom right') {\n deg = 135;\n }\n else if(v === 'to bottom') {\n }\n else if(v === 'to bottom left') {\n deg = 225;\n }\n else if(v === 'to left') {\n deg = 270;\n }\n else if(v === 'to top left') {\n deg = 315;\n }\n // 数字角度,没有的话取默认角度\n else {\n let match = /([-+]?[\\d.]+)deg/.exec(v);\n if(match) {\n deg = parseFloat(match[1]);\n }\n }\n return deg % 360;\n}\n\nfunction getRadialPosition(data) {\n if(/^[-+]?[\\d.]/.test(data)) {\n let v = calUnit(data);\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.v = PX;\n }\n return v;\n }\n else {\n return {\n v: {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[data] || 50,\n u: PERCENT,\n };\n }\n}\n\n// 获取color-stop区间范围,去除无用值\nfunction getColorStop(v, length, root) {\n let list = [];\n let firstColor = v[0][0];\n // 先把已经声明距离的换算成[0,1]以数组形式存入,未声明的原样存入\n for(let i = 0, len = v.length; i < len; i++) {\n let item = v[i];\n // 考虑是否声明了位置\n if(item.length > 1) {\n let p = item[1];\n if(p.u === PERCENT) {\n list.push([item[0], p.v * 0.01]);\n }\n else if(p.u === REM) {\n list.push([item[0], p.v * root.computedStyle[FONT_SIZE] / length]);\n }\n else if(p.u === VW) {\n list.push([item[0], p.v * root.width / length]);\n }\n else if(p.u === VH) {\n list.push([item[0], p.v * root.height / length]);\n }\n else if(p.u === VMAX) {\n list.push([item[0], p.v * Math.max(root.width, root.height) / length]);\n }\n else if(p.u === VMIN) {\n list.push([item[0], p.v * Math.min(root.width, root.height) / length]);\n }\n else {\n list.push([item[0], p.v / length]);\n }\n }\n else {\n list.push([item[0]]);\n }\n }\n if(list.length === 1) {\n list.push(util.clone(list[0]));\n }\n // 首尾不声明默认为[0, 1]\n if(list[0].length === 1) {\n list[0].push(0);\n }\n if(list.length > 1) {\n let i = list.length - 1;\n if(list[i].length === 1) {\n list[i].push(1);\n }\n }\n // 找到未声明位置的,需区间计算,找到连续的未声明的,前后的区间平分\n let start = list[0][1];\n for(let i = 1, len = list.length; i < len - 1; i++) {\n let item = list[i];\n if(item.length > 1) {\n start = item[1];\n }\n else {\n let j = i + 1;\n let end = list[list.length - 1][1];\n for(; j < len - 1; j++) {\n let item = list[j];\n if(item.length > 1) {\n end = item[1];\n break;\n }\n }\n let num = j - i + 1;\n let per = (end - start) / num;\n for(let k = i; k < j; k++) {\n let item = list[k];\n item.push(start + per * (k + 1 - i));\n }\n i = j;\n }\n }\n // 每个不能小于前面的,canvas/svg不能兼容这种情况,需处理\n for(let i = 1, len = list.length; i < len; i++) {\n let item = list[i];\n let prev = list[i - 1];\n if(item[1] < prev[1]) {\n item[1] = prev[1];\n }\n }\n // 0之前的和1之后的要过滤掉\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(item[1] > 1) {\n list.splice(i);\n let prev = list[i - 1];\n if(prev && prev[1] < 1) {\n let dr = item[0][0] - prev[0][0];\n let dg = item[0][1] - prev[0][1];\n let db = item[0][2] - prev[0][2];\n let da = item[0][3] - prev[0][3];\n let p = (1 - prev[1]) / (item[1] - prev[1]);\n list.push([\n [\n item[0][0] + dr * p,\n item[0][1] + dg * p,\n item[0][2] + db * p,\n item[0][3] + da * p,\n ],\n 1],\n );\n }\n break;\n }\n }\n for(let i = list.length - 1; i >= 0; i--) {\n let item = list[i];\n if(item[1] < 0) {\n list.splice(0, i + 1);\n let next = list[i];\n if(next && next[1] > 0) {\n let dr = next[0][0] - item[0][0];\n let dg = next[0][1] - item[0][1];\n let db = next[0][2] - item[0][2];\n let da = next[0][3] - item[0][3];\n let p = (-item[1]) / (next[1] - item[1]);\n list.unshift([\n [\n item[0][0] + dr * p,\n item[0][1] + dg * p,\n item[0][2] + db * p,\n item[0][3] + da * p,\n ],\n 0],\n );\n }\n break;\n }\n }\n // 可能存在超限情况,如在使用px单位超过len或 {\n // item[0] = int2rgba(item[0]);\n if(item[1] < 0) {\n item[1] = 0;\n }\n else if(item[1] > 1) {\n item[1] = 1;\n }\n });\n // 都超限时,第一个颜色兜底\n if(!list.length) {\n list.push([firstColor, 0]);\n }\n return list;\n}\n\n// 根据角度和圆心获取渐变的4个点坐标\nfunction calLinearCoords(deg, length, cx, cy) {\n let x0;\n let y0;\n let x1;\n let y1;\n if(deg >= 270) {\n let r = d2r(360 - deg);\n x0 = cx + Math.sin(r) * length;\n y0 = cy + Math.cos(r) * length;\n x1 = cx - Math.sin(r) * length;\n y1 = cy - Math.cos(r) * length;\n }\n else if(deg >= 180) {\n let r = d2r(deg - 180);\n x0 = cx + Math.sin(r) * length;\n y0 = cy - Math.cos(r) * length;\n x1 = cx - Math.sin(r) * length;\n y1 = cy + Math.cos(r) * length;\n }\n else if(deg >= 90) {\n let r = d2r(180 - deg);\n x0 = cx - Math.sin(r) * length;\n y0 = cy - Math.cos(r) * length;\n x1 = cx + Math.sin(r) * length;\n y1 = cy + Math.cos(r) * length;\n }\n else {\n let r = d2r(deg);\n x0 = cx - Math.sin(r) * length;\n y0 = cy + Math.cos(r) * length;\n x1 = cx + Math.sin(r) * length;\n y1 = cy - Math.cos(r) * length;\n }\n return [x0, y0, x1, y1];\n}\n\nfunction calCircleCentre(position, x1, y1, iw, ih, root) {\n let cx, cy;\n let positionX = position[0], positionY = position[1];\n if(positionX.u === PERCENT) {\n cx = x1 + positionX.v * iw * 0.01;\n }\n else if(positionX.u === REM) {\n cx = x1 + positionX.v * root.computedStyle[FONT_SIZE];\n }\n else if(positionX.u === VW) {\n cx = x1 + positionX.v * root.width * 0.01;\n }\n else if(positionX.u === VH) {\n cx = x1 + positionX.v * root.height * 0.01;\n }\n else if(positionX.u === VMAX) {\n cx = x1 + positionX.v * Math.max(root.width, root.height) * 0.01;\n }\n else if(positionX.u === VMIN) {\n cx = x1 + positionX.v * Math.min(root.width, root.height) * 0.01;\n }\n else {\n cx = x1 + positionX.v;\n }\n if(positionY.u === PERCENT) {\n cy = y1 + positionY.v * ih * 0.01;\n }\n else if(positionY.u === REM) {\n cy = y1 + positionY.v * root.computedStyle[FONT_SIZE];\n }\n else if(positionY.u === VW) {\n cy = y1 + positionY.v * root.width * 0.01;\n }\n else if(positionY.u === VH) {\n cy = y1 + positionY.v * root.height * 0.01;\n }\n else if(positionY.u === VH) {\n cy = y1 + positionY.v * Math.max(root.width, root.height) * 0.01;\n }\n else if(positionY.u === VH) {\n cy = y1 + positionY.v * Math.min(root.width, root.height) * 0.01;\n }\n else {\n cy = y1 + positionY.v;\n }\n return [cx, cy];\n}\n\n// 获取径向渐变圆心半径\nfunction calRadialRadius(shape, size, position, iw, ih, x1, y1, x2, y2, root) {\n let cx, cy, xl, yl, r, tx, ty, d = 0;\n // 扩展的from to ratio格式,圆心、长轴坐标、短轴缩放比\n if(Array.isArray(size)) {\n cx = x1 + size[0] * iw;\n cy = y1 + size[1] * ih;\n tx = x1 + size[4] * iw;\n ty = y1 + size[5] * ih;\n if(size[6] <= 0) {\n r = Math.min(Math.abs(cx - x1), Math.min(Math.abs(cy - y1), Math.min(Math.abs(cy - y2), Math.min(Math.abs(cx - y2)))));\n }\n else {\n xl = Math.sqrt(Math.pow((size[2] - size[0]) * iw, 2) + Math.pow((size[3] - size[1]) * ih, 2));\n yl = xl * size[6];\n r = Math.max(xl, yl);\n // 看旋转\n if(xl !== yl) {\n if(size[2] >= size[0]) {\n if(size[3] >= size[1]) {\n d = Math.asin((size[3] - size[1]) * ih / xl);\n }\n else {\n d = -Math.asin((size[1] - size[3]) * ih / xl);\n }\n }\n else {\n if(size[3] >= size[1]) {\n d = d2r(180) - Math.asin((size[3] - size[1]) * ih / xl);\n }\n else {\n d = Math.asin((size[1] - size[3]) * ih / xl) - d2r(180);\n }\n }\n }\n }\n }\n else {\n // 默认椭圆a是水平轴,b是垂直轴\n [cx, cy] = calCircleCentre(position, x1, y1, iw, ih, root);\n tx = cx;\n ty = cy;\n let ratio = 1;\n if(size === 'closest-corner' && shape === 'circle') {\n if(cx <= x1 || cx >= x2 || cy <= y1 || cy >= y2) {\n r = Math.min(Math.abs(cx - x1), Math.min(Math.abs(cy - y1), Math.min(Math.abs(cy - y2), Math.min(Math.abs(cx - y2)))));\n }\n else {\n if(cx < x1 + iw * 0.5) {\n xl = cx - x1;\n }\n else {\n xl = x2 - cx;\n }\n if(cy < y1 + ih * 0.5) {\n yl = cy - y1;\n }\n else {\n yl = y2 - cy;\n }\n r = Math.sqrt(Math.pow(xl, 2) + Math.pow(yl, 2));\n }\n }\n else if(size === 'closest-side' || size === 'closest-corner') {\n // 在边外特殊情况只有end颜色填充\n if(cx <= x1 || cx >= x2 || cy <= y1 || cy >= y2) {\n r = Math.min(Math.abs(cx - x1), Math.min(Math.abs(cy - y1), Math.min(Math.abs(cy - y2), Math.min(Math.abs(cx - y2)))));\n }\n else {\n let ratio = 1;\n if(cx < x1 + iw * 0.5) {\n xl = cx - x1;\n }\n else {\n xl = x2 - cx;\n }\n if(cy < y1 + ih * 0.5) {\n yl = cy - y1;\n }\n else {\n yl = y2 - cy;\n }\n r = Math.min(xl, yl);\n // css的角和边有对应关系,即边扩展倍数,计算为固定值\n if(size === 'closest-corner') {\n ratio = Math.sqrt(2);\n }\n xl *= ratio;\n yl *= ratio;\n r *= ratio;\n }\n }\n else {\n if(cx <= x1) {\n xl = x1 - cx + iw;\n }\n else if(cx >= x2) {\n xl = cx - x2 + iw;\n }\n else if(cx < x1 + iw * 0.5) {\n xl = x2 - cx;\n }\n else {\n xl = cx - x1;\n }\n if(cy <= y1) {\n yl = y1 - cy + ih;\n }\n else if(cy >= y2) {\n yl = cy - y2 + ih;\n }\n else if(cy < y1 + ih * 0.5) {\n yl = y2 - cy;\n }\n else {\n yl = cy - y1;\n }\n r = Math.max(xl, yl);\n if(size !== 'farthest-side') {\n ratio = Math.sqrt(2);\n }\n xl *= ratio;\n yl *= ratio;\n r *= ratio;\n }\n }\n if(shape === 'circle') {\n xl = yl = r;\n }\n return [cx, cy, r, xl, yl, tx, ty, d];\n}\n\nfunction parseGradient(s) {\n let gradient = reg.gradient.exec(s);\n if(gradient) {\n let o = {\n k: gradient[1],\n };\n if(o.k === 'linear') {\n let deg = /([-+]?[\\d.]+deg)|(to\\s+[toprighbml]+)/i.exec(gradient[2]);\n if(deg) {\n o.d = getLinearDeg(deg[0].toLowerCase());\n }\n // 扩展支持从a点到b点相对坐标,而不是css角度,sketch等ui软件中用此格式\n else {\n let points = /([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)/.exec(gradient[2]);\n if(points) {\n o.d = [parseFloat(points[1]), parseFloat(points[2]), parseFloat(points[3]), parseFloat(points[4])];\n }\n else {\n o.d = 180;\n }\n }\n }\n else if(o.k === 'radial') {\n o.s = gradient[2].indexOf('circle') > -1 ? 'circle' : 'ellipse';\n let size = /(closest|farthest)-(side|corner)/i.exec(gradient[2]);\n if(size) {\n o.z = size[0].toLowerCase();\n }\n // 扩展支持从a点到b点相对坐标,而不是size,sketch等ui软件中用此格式\n else {\n let points = /([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)(?:\\s+([-+]?[\\d.]+))?(?:\\s+([-+]?[\\d.]+))?(?:\\s+([-+]?[\\d.]+))?/.exec(gradient[2]);\n if(points) {\n o.z = [parseFloat(points[1]), parseFloat(points[2]), parseFloat(points[3]), parseFloat(points[4])];\n let i5 = !isNil(points[5]), i6 = !isNil(points[6]), i7 = !isNil(points[7]);\n // 重载,567是偏移x/y和ratio,都可省略即不偏移和半径1,只有5是ratio,只有56是x/y\n if(i5 && i6 && i7) {\n o.z.push(parseFloat(points[5]));\n o.z.push(parseFloat(points[6]));\n o.z.push(parseFloat(points[7]));\n }\n else if(i5 && i6) {\n o.z.push(parseFloat(points[5]));\n o.z.push(parseFloat(points[6]));\n o.z.push(1);\n }\n else if(i5) {\n o.z.push(o.z[0]);\n o.z.push(o.z[1]);\n o.z.push(parseFloat(points[5]));\n }\n else {\n o.z.push(o.z[0]);\n o.z.push(o.z[1])\n o.z.push(1);\n }\n }\n else {\n o.z = 'farthest-corner';\n }\n }\n let position = /at\\s+((?:[-+]?[\\d.]+[pxremvwhina%]*)|(?:left|top|right|bottom|center))(?:\\s+((?:[-+]?[\\d.]+[pxremvwhina%]*)|(?:left|top|right|bottom|center)))?/i.exec(gradient[2]);\n if(position) {\n let x = getRadialPosition(position[1]);\n let y = position[2] ? getRadialPosition(position[2]) : x;\n o.p = [x, y];\n }\n else {\n o.p = [{ v: 50, u: PERCENT }, { v: 50, u: PERCENT }];\n }\n }\n else if(o.k === 'conic') {\n let deg = /([-+]?[\\d.]+deg)/i.exec(gradient[2]);\n if(deg) {\n o.d = parseFloat(deg[0]) % 360;\n }\n else {\n o.d = 0;\n }\n let position = /at\\s+((?:[-+]?[\\d.]+[pxremvwhina%]*)|(?:left|top|right|bottom|center))(?:\\s+((?:[-+]?[\\d.]+[pxremvwhina%]*)|(?:left|top|right|bottom|center)))?/i.exec(gradient[2]);\n if(position) {\n let x = getRadialPosition(position[1]);\n let y = position[2] ? getRadialPosition(position[2]) : x;\n o.p = [x, y];\n }\n else {\n o.p = [{ v: 50, u: PERCENT }, { v: 50, u: PERCENT }];\n }\n }\n let v = gradient[2].match(/(([-+]?[\\d.]+[pxremvwhina%]+)?\\s*((#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\)))\\s*([-+]?[\\d.]+[pxremvwhina%]+)?)|(transparent)/ig) || [];\n o.v = v.map(item => {\n let color = /(?:#[0-9a-f]{3,8})|(?:rgba?\\s*\\(.+?\\))|(?:transparent)/i.exec(item);\n let arr = [rgba2int(color[0])];\n let percent = /[-+]?[\\d.]+[pxremvwhina%]+/.exec(item);\n if(percent) {\n let v = calUnit(percent[0]);\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.v = PX;\n }\n arr[1] = v;\n }\n return arr;\n });\n return o;\n }\n}\n\nfunction getLinear(v, d, ox, oy, cx, cy, w, h, root, dx = 0, dy = 0) {\n ox += dx;\n oy += dy;\n cx += dx;\n cy += dy;\n // d为数组是2个坐标点,数字是css标准角度\n let x1, y1, x2, y2, stop;\n if(Array.isArray(d)) {\n x1 = ox + d[0] * w;\n y1 = oy + d[1] * h;\n x2 = ox + d[2] * w;\n y2 = oy + d[3] * h;\n let total = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n stop = getColorStop(v, total);\n }\n else {\n while(d >= 360) {\n d -= 360;\n }\n while(d < 0) {\n d += 360;\n }\n // 根据角度求直线上2点,设置半径为长宽最大值,这样一定在矩形外,看做一个向量A\n let len = Math.max(w, h);\n let coords = calLinearCoords(d, len, cx, cy, w, h);\n len *= 2;\n // start和4个顶点的向量在A上的投影长度\n let l1 = vector.dotProduct(ox - coords[0], oy - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n let l2 = vector.dotProduct(ox + w - coords[0], oy - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n let l3 = vector.dotProduct(ox + w - coords[0], oy + h - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n let l4 = vector.dotProduct(ox - coords[0], oy + h - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n // 最小和最大值为0~100%\n let min = l1, max = l1;\n min = Math.min(min, Math.min(l2, Math.min(l3, l4)));\n max = Math.max(max, Math.max(l2, Math.max(l3, l4)));\n // 求得0和100%的长度和坐标\n let total = max - min;\n let r1 = min / len;\n let dx = coords[2] - coords[0];\n let dy = coords[3] - coords[1];\n x1 = coords[0] + dx * r1;\n y1 = coords[1] + dy * r1;\n x2 = coords[2] - dx * r1;\n y2 = coords[3] - dy * r1;\n stop = getColorStop(v, total, root);\n }\n return {\n x1,\n y1,\n x2,\n y2,\n stop,\n };\n}\n\nfunction getRadial(v, shape, size, position, x1, y1, x2, y2, root, dx = 0, dy = 0) {\n let w = x2 - x1;\n let h = y2 - y1;\n x1 += dx;\n y1 += dy;\n x2 += dx;\n y2 += dy;\n let [cx, cy, r, xl, yl, tx, ty, d] = calRadialRadius(shape, size, position, w, h, x1, y1, x2, y2, root);\n // 圆形取最小值,椭圆根据最小圆进行transform,椭圆其中一边轴和r一样,另一边则大小缩放可能\n let matrix, scx = 1, scy = 1;\n if(xl !== yl || d) {\n matrix = [1, 0, 0, 1, 0, 0];\n if(d) {\n let sin = Math.sin(d);\n let cos = Math.cos(d);\n matrix = [cos, sin, 0, 0, -sin, cos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n }\n if(xl !== r) {\n scx = xl / r;\n let m = [scx, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n matrix = mx.multiply(matrix, m);\n }\n if(yl !== r) {\n scy = yl / r;\n let m = [1, 0, 0, 0, 0, scy, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n matrix = mx.multiply(matrix, m);\n }\n }\n let stop = getColorStop(v, r, root);\n return {\n cx,\n cy,\n tx,\n ty,\n r,\n stop,\n scx,\n scy,\n matrix,\n d,\n };\n}\n\nfunction getConic(v, d, p, x1, y1, x2, y2, ratio, root) {\n let [cx, cy, r, deg] = calConicRadius(v, d, p, x1, y1, x2, y2, root);\n let stop = getColorStop(v, 1, root);\n r <<= 1; // 锥形半径*2,这样分割画圆时保证一定会填满原有矩形\n r *= ratio; // 矢量图形比较特殊,有可能超限,传入个倍数扩大半径\n return {\n cx,\n cy,\n w: x2 - x1,\n h: y2 - y1,\n r,\n deg,\n stop,\n };\n}\n\nfunction calConicRadius(v, deg, position, x1, y1, x2, y2, root) {\n let iw = x2 - x1;\n let ih = y2 - y1;\n let [cx, cy] = calCircleCentre(position, x1, y1, iw, ih, root);\n let r, a, b;\n if(cx >= x1 + iw * 0.5) {\n a = cx - x1;\n }\n else {\n a = x2 - cx;\n }\n if(cy >= y1 + ih * 0.5) {\n b = cy - y1;\n }\n else {\n b = y2 - cy;\n }\n r = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));\n return [cx, cy, r, deg];\n}\n\nfunction renderConic(xom, renderMode, ctx, res, x, y, w, h, btlr, btrr, bbrr, bblr, isInline) {\n // border-radius使用三次贝塞尔曲线模拟1/4圆角,误差在[0, 0.000273]之间\n let list = border.calRadius(x, y, w, h, btlr, btrr, bbrr, bblr);\n if(!list) {\n list = [\n [x, y],\n [x + w, y],\n [x + w, y + h],\n [x, y + h],\n [x, y],\n ];\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n let offscreen = inject.getOffscreenCanvas(w, h, '__$$CONIC_GRADIENT$$__', null);\n let imgData = offscreen.ctx.getImageData(0,0, w, h);\n gradient.getConicGradientImage(res.cx - x, res.cy - y, res.w, res.h, res.stop, imgData.data);\n offscreen.ctx.putImageData(imgData, 0, 0);\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, list);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(offscreen.canvas, x, y);\n ctx.restore();\n offscreen.ctx.clearRect(0, 0, w, h);\n }\n}\n\nexport default {\n parseGradient,\n getLinear,\n getRadial,\n getConic,\n renderConic,\n};\n","import reg from './reg';\nimport util from '../util/util';\n\nlet { isNil } = util;\n\nfunction parseFlex(style, grow, shrink, basis) {\n if(isNil(style.flexGrow)) {\n style.flexGrow = grow || 0;\n }\n if(isNil(style.flexShrink)) {\n style.flexShrink = shrink || 0;\n }\n if(isNil(style.flexBasis)) {\n style.flexBasis = basis || 0;\n }\n}\n\nfunction parseMarginPadding(style, key, list) {\n let temp = style[key];\n if(!isNil(temp)) {\n let match = temp.toString().match(/([-+]?[\\d.]+[pxremvwhina%]*)|(auto)/ig);\n if(match) {\n if(match.length === 1) {\n match[3] = match[2] = match[1] = match[0];\n }\n else if(match.length === 2) {\n match[2] = match[0];\n match[3] = match[1];\n }\n else if(match.length === 3) {\n match[3] = match[1];\n }\n list.forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = match[i];\n }\n });\n }\n }\n}\n\nfunction parseOneBorder(style, k) {\n let v = style[k];\n if(isNil(v)) {\n return;\n }\n // 后面会统一格式化处理\n if(isNil(style[k + 'Width'])) {\n let w = /\\b[\\d.]+[pxremvwhina%]*\\b/i.exec(v);\n style[k + 'Width'] = w ? w[0] : 0;\n }\n if(isNil(style[k + 'Style'])) {\n let s = /\\b(solid|dashed|dotted)\\b/i.exec(v);\n style[k + 'Style'] = s ? s[1] : 'solid';\n }\n if(isNil(style[k + 'Color'])) {\n let c = /#[0-9a-f]{3,8}/i.exec(v);\n if(c && [4, 7, 9].indexOf(c[0].length) > -1) {\n style[k + 'Color'] = c[0];\n }\n else if(/\\btransparent\\b/i.test(v)) {\n style[k + 'Color'] = 'transparent';\n }\n else {\n c = /rgba?\\s*\\(.+\\)/i.exec(v);\n style[k + 'Color'] = c ? c[0] : 'transparent';\n }\n }\n}\n\nexport default {\n margin: ['marginTop', 'marginRight', 'marginBottom', 'marginLeft'],\n padding: ['paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft'],\n border: ['borderTop', 'borderRight', 'borderBottom', 'borderLeft'],\n borderTop: ['borderTopWidth', 'borderTopStyle', 'borderTopColor'],\n borderRight: ['borderRightWidth', 'borderRightStyle', 'borderRightColor'],\n borderBottom: ['borderBottomWidth', 'borderBottomStyle', 'borderBottomColor'],\n borderLeft: ['borderLeftWidth', 'borderLeftStyle', 'borderLeftColor'],\n borderWidth: ['borderTopWidth', 'borderRightWidth', 'borderBottomWidth', 'borderLeftWidth'],\n borderColor: ['borderTopColor', 'borderRightColor', 'borderBottomColor', 'borderLeftColor'],\n borderStyle: ['borderTopStyle', 'borderRightStyle', 'borderBottomStyle', 'borderLeftStyle'],\n borderRadius: ['borderTopLeftRadius', 'borderTopRightRadius', 'borderBottomRightRadius', 'borderBottomLeftRadius'],\n background: ['backgroundColor', 'backgroundImage', 'backgroundRepeat', 'backgroundPosition'],\n backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],\n flex: ['flexGrow', 'flexShrink', 'flexBasis'],\n translate: ['translateX', 'translateY'],\n translate3d: ['translateX', 'translateY', 'translateY'],\n scale: ['scaleX', 'scaleY'],\n scale3d: ['scaleX', 'scaleY', 'scaleZ'],\n rotate: ['rotateZ'],\n skew: ['skewX', 'skewY'],\n textStroke: ['textStrokeWidth', 'textStrokeColor', 'textStrokeOver'],\n\n toFull(style, k) {\n let v = style[k];\n if(k === 'background') {\n // bg缩写多个时有color则必须是最后一个\n if(Array.isArray(v)) {\n let length = v.length;\n if(isNil(style.backgroundColor)) {\n let bgc = /^\\s*((transparent)|(#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\)))/i.exec(v[length - 1]);\n if(bgc) {\n style.backgroundColor = bgc[0];\n v = v.slice(0, length - 1);\n }\n }\n let bgi = [];\n let bgr = [];\n let bgp = [];\n v.forEach(item => {\n if(isNil(style.backgroundImage)) {\n let gd = reg.gradient.exec(item);\n if(gd) {\n bgi.push(gd[0]);\n item = item.replace(gd[0], '');\n }\n else {\n let img = reg.img.exec(v);\n if(img) {\n bgi.push(img[0]);\n item = item.replace(img[0], '');\n }\n }\n }\n if(isNil(style.backgroundRepeat)) {\n let repeat = /(no-?)?repeat(-?[xy])?/i.exec(item);\n if(repeat) {\n bgr.push(repeat[0].toLowerCase());\n }\n }\n if(isNil(style.backgroundPosition)) {\n let position = item.match(reg.position);\n if(position) {\n bgp.push(position.join(' '));\n }\n }\n });\n if(bgi.length) {\n style.backgroundImage = bgi;\n }\n if(bgr.length) {\n style.backgroundRepeat = bgr;\n }\n if(bgp.length) {\n style.backgroundPosition = bgp;\n this.toFull(style, 'backgroundPosition');\n }\n }\n else {\n if(isNil(style.backgroundImage)) {\n let gd = reg.gradient.exec(v);\n if(gd) {\n style.backgroundImage = gd[0];\n v = v.replace(gd[0], '');\n }\n else {\n let img = reg.img.exec(v);\n if(img) {\n style.backgroundImage = img[0];\n v = v.replace(img[0], '');\n }\n }\n }\n if(isNil(style.backgroundRepeat)) {\n let repeat = /(no-?)?repeat(-?[xy])?/i.exec(v);\n if(repeat) {\n style.backgroundRepeat = repeat[0].toLowerCase();\n }\n }\n if(isNil(style.backgroundColor)) {\n let bgc = /^(transparent)|(#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\))/i.exec(v);\n if(bgc) {\n style.backgroundColor = bgc[0];\n v = v.replace(bgc[0], '');\n }\n }\n if(isNil(style.backgroundPosition)) {\n let position = v.match(reg.position);\n if(position) {\n style.backgroundPosition = position.join(' ');\n this.toFull(style, 'backgroundPosition');\n }\n }\n }\n }\n else if(k === 'flex') {\n if(v === 'none') {\n parseFlex(style, 0, 0, 'auto');\n }\n else if(v === 'auto') {\n parseFlex(style, 1, 1, 'auto');\n }\n else if(/^[\\d.]+\\s+[\\d.]+\\s+(auto|none|content)/.test(v) || /^[\\d.]+\\s+[\\d.]+\\s+[\\d.]+[pxremvwhina%]*/.test(v)) {\n let arr = v.split(/\\s+/);\n parseFlex(style, parseFloat(arr[0]), parseFloat(arr[1]), arr[2]);\n }\n else if(/^[\\d.]+\\s+[\\d.]+$/.test(v)) {\n let arr = v.split(/\\s+/);\n parseFlex(style, parseFloat(arr[0]), parseFloat(arr[1]), 0);\n }\n else if(/^[\\d.]+\\s+[\\d.]+[pxremvwhina%]+/.test(v)) {\n let arr = v.split(/\\s+/);\n parseFlex(style, parseFloat(arr[0]), 1, arr[1]);\n }\n else if(/^[\\d.]+$/.test(v)) {\n parseFlex(style, parseFloat(v), 1, 0);\n }\n else if(/^[\\d.]+[pxremvwhina%]+/i.test(v)) {\n parseFlex(style, 1, 1, v);\n }\n else {\n parseFlex(style, 0, 1, 'auto');\n }\n }\n else if(k === 'flexFlow') {\n v = v.toString().split(/\\s+/);\n if(v.length) {\n if(isNil(style.flexDirection)) {\n }\n style.flexDirection = v[0];\n if(v.length > 1) {\n style.flexWrap = v[1];\n }\n }\n }\n else if(k === 'borderRadius') {\n // borderRadius缩写很特殊,/分隔x/y,然后上右下左4个\n v = v.toString().split('/');\n if(v.length === 1) {\n v[1] = v[0];\n }\n for(let i = 0; i < 2; i++) {\n let item = v[i].toString().split(/\\s+/);\n if(item.length === 0) {\n v[i] = [0, 0, 0, 0];\n }\n else if(item.length === 1) {\n v[i] = [item[0], item[0], item[0], item[0]];\n }\n else if(item.length === 2) {\n v[i] = [item[0], item[1], item[0], item[1]];\n }\n else if(item.length === 3) {\n v[i] = [item[0], item[1], item[2], item[1]];\n }\n else {\n v[i] = item.slice(0, 4);\n }\n }\n this[k].forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = v[0][i] + ' ' + v[1][i];\n }\n });\n }\n else if(k === 'backgroundPosition') {\n if(!Array.isArray(v)) {\n v = [v];\n }\n let isEmpty = this[k].map(k2 => isNil(style[k2]));\n v.forEach(v2 => {\n v2 = v2.toString().split(/\\s+/);\n if(v2.length === 1) {\n v2[1] = '50%';\n }\n this[k].forEach((k2, i) => {\n if(isEmpty[i]) {\n style[k2] = style[k2] || [];\n style[k2].push(v2[i]);\n }\n });\n });\n }\n else if(['translate', 'scale', 'skew'].indexOf(k) > -1) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[1] = arr[0];\n }\n this[k].forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = arr[i];\n }\n });\n }\n else if(['translate3d', 'scale3d'].indexOf(k) > -1) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[2] = arr[1] = arr[0];\n }\n else if(arr.length === 2) {\n arr[2] = k === 'scale3d' ? 1 : 0;\n }\n this[k].forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = arr[i];\n }\n });\n }\n else if(k === 'margin' || k === 'padding') {\n parseMarginPadding(style, k, this[k]);\n }\n else if(/^border((Top)|(Right)|(Bottom)|(Left))$/.test(k)) {\n parseOneBorder(style, k);\n }\n else if(k === 'textStroke') {\n let w = /(?:^|\\s)([-+]?[\\d.]+[pxremvwhina%]*)/.exec(v);\n if(w) {\n style.textStrokeWidth = w[1];\n }\n let c = /(transparent)|(#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\))/i.exec(v);\n if(c) {\n style.textStrokeColor = c[0];\n }\n if(/\\bfill\\b/i.test(v)) {\n style.textStrokeOver = 'fill';\n }\n else {\n style.textStrokeOver = 'none';\n }\n }\n else if(this[k]) {\n this[k].forEach(k => {\n if(isNil(style[k])) {\n style[k] = v;\n }\n });\n }\n return style;\n }\n};\n","import enums from '../util/enums';\n\nconst { STYLE_KEY } = enums;\n\nconst {\n BACKGROUND_COLOR,\n BORDER_BOTTOM_COLOR,\n BORDER_LEFT_COLOR,\n BORDER_RIGHT_COLOR,\n BORDER_TOP_COLOR,\n COLOR, // 特殊,新增GRADIENT渐变色\n TEXT_STROKE_COLOR, // 同上\n FONT_SIZE,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_TOP_WIDTH,\n LEFT,\n TOP,\n RIGHT,\n BOTTOM,\n FLEX_BASIS,\n WIDTH,\n HEIGHT,\n LINE_HEIGHT,\n MARGIN_BOTTOM,\n MARGIN_LEFT,\n MARGIN_TOP,\n MARGIN_RIGHT,\n PADDING_TOP,\n PADDING_RIGHT,\n PADDING_BOTTOM,\n PADDING_LEFT,\n STROKE_WIDTH,\n STROKE_MITERLIMIT,\n LETTER_SPACING,\n PERSPECTIVE,\n TEXT_STROKE_WIDTH,\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n SKEW_X,\n SKEW_Y,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n BACKGROUND_IMAGE,\n FILL,\n STROKE,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n} = STYLE_KEY;\n\nfunction isColorKey(k) {\n return k === BACKGROUND_COLOR || k === BORDER_BOTTOM_COLOR\n || k === BORDER_LEFT_COLOR || k === BORDER_RIGHT_COLOR\n || k === BORDER_TOP_COLOR || k === COLOR || k === TEXT_STROKE_COLOR;\n}\n\nfunction isLengthKey(k) {\n return k === FONT_SIZE || k === TEXT_STROKE_WIDTH\n || k === BORDER_BOTTOM_WIDTH || k === BORDER_LEFT_WIDTH || k === BORDER_RIGHT_WIDTH || k === BORDER_TOP_WIDTH\n || k === LEFT || k === TOP || k === RIGHT || k === BOTTOM || k === FLEX_BASIS || k === WIDTH || k === HEIGHT\n || k === LINE_HEIGHT || k === MARGIN_BOTTOM || k === MARGIN_TOP || k === MARGIN_LEFT || k === MARGIN_RIGHT\n || k === PADDING_TOP || k === PADDING_RIGHT || k === PADDING_LEFT || k === PADDING_BOTTOM\n || k === STROKE_WIDTH || k === STROKE_MITERLIMIT || k === LETTER_SPACING || k === PERSPECTIVE;\n}\n\nfunction isExpandKey(k) {\n return k === TRANSLATE_X || k === TRANSLATE_Y || k === TRANSLATE_Z\n || k === SKEW_X || k === SKEW_Y || k === SCALE_X || k === SCALE_Y || k === SCALE_Z\n || k === ROTATE_X || k === ROTATE_Y || k === ROTATE_Z;\n}\n\nfunction isGradientKey(k) {\n return k === BACKGROUND_IMAGE || k === FILL || k === STROKE;\n}\n\nfunction isRadiusKey(k) {\n return k === BORDER_BOTTOM_LEFT_RADIUS || k === BORDER_TOP_LEFT_RADIUS\n || k === BORDER_TOP_RIGHT_RADIUS || k === BORDER_BOTTOM_RIGHT_RADIUS;\n}\n\nexport default {\n isColorKey,\n isLengthKey,\n isExpandKey,\n isGradientKey,\n isRadiusKey,\n};\n","import reset from '../style/reset';\nimport enums from '../util/enums';\n\nconst { DOM: RESET_DOM, GEOM: RESET_GEOM } = reset;\nconst { STYLE_KEY } = enums;\nconst {\n POINTER_EVENTS,\n COLOR,\n STROKE_WIDTH,\n FILL,\n STROKE_DASHARRAY,\n STROKE_LINECAP,\n STROKE_LINEJOIN,\n STROKE_MITERLIMIT,\n BACKGROUND_COLOR,\n BACKGROUND_IMAGE,\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n BACKGROUND_REPEAT,\n BACKGROUND_SIZE,\n STROKE,\n BORDER_BOTTOM_COLOR,\n BORDER_LEFT_COLOR,\n BORDER_RIGHT_COLOR,\n BORDER_TOP_COLOR,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n VISIBILITY,\n BOX_SHADOW,\n OVERFLOW,\n BACKGROUND_CLIP,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_OVER,\n TRANSLATE_PATH,\n} = STYLE_KEY;\n\nconst GEOM = {};\nconst GEOM_KEY_SET = [];\n\nlet o = {\n GEOM,\n GEOM_KEY_SET,\n addGeom(tagName, ks, cb) {\n if(Array.isArray(ks)) {\n ks.forEach(k => {\n o.addGeom(tagName, k, cb);\n });\n }\n else if(ks) {\n if(!GEOM.hasOwnProperty(ks)) {\n GEOM_KEY_SET.push(ks);\n }\n let hash = GEOM[ks] = GEOM[ks] || {};\n hash[tagName] = cb || true;\n }\n },\n isIgnore(k) {\n return k === POINTER_EVENTS || k === TRANSLATE_PATH;\n },\n isGeom(tagName, k) {\n return tagName && k && GEOM.hasOwnProperty(k) && GEOM[k].hasOwnProperty(tagName);\n },\n isRepaint(k, tagName) {\n return k === COLOR || k === STROKE_WIDTH || k === FILL || k === STROKE_DASHARRAY || k === STROKE_LINECAP\n || k === STROKE_LINEJOIN || k === STROKE_MITERLIMIT || k === BACKGROUND_COLOR || k === BACKGROUND_IMAGE\n || k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y || k === BACKGROUND_REPEAT\n || k === BACKGROUND_SIZE || k === STROKE || k === BORDER_BOTTOM_COLOR || k === BORDER_LEFT_COLOR\n || k === BORDER_BOTTOM_COLOR || k === BORDER_RIGHT_COLOR || k === BORDER_TOP_COLOR\n || k === BORDER_TOP_LEFT_RADIUS || k === BORDER_TOP_RIGHT_RADIUS || k === BORDER_BOTTOM_RIGHT_RADIUS\n || k === BORDER_BOTTOM_LEFT_RADIUS || k === VISIBILITY || k === BOX_SHADOW || k === OVERFLOW\n || k === BACKGROUND_CLIP || k === TEXT_STROKE_WIDTH || k === TEXT_STROKE_COLOR || k === TEXT_STROKE_OVER\n || o.isGeom(tagName, k);\n },\n isValid(tagName, k) {\n if(!k) {\n return false;\n }\n if(RESET_DOM.hasOwnProperty(k)) {\n return true;\n }\n // geom的fill等矢量才有的样式\n if(tagName.charAt(0) === '$' && RESET_GEOM.hasOwnProperty(k)) {\n return true;\n }\n if(GEOM.hasOwnProperty(k)) {\n return GEOM[k].hasOwnProperty(tagName);\n }\n if(k === 'translatePath') {\n return true;\n }\n return false;\n },\n};\n\no.addGeom('$line', ['xa', 'ya', 'xb', 'yb', 'controlA', 'controlB', 'start', 'end']);\no.addGeom('$circle', ['r']);\no.addGeom('$ellipse', ['rx', 'ry']);\no.addGeom('$rect', ['rx', 'ry']);\no.addGeom('$sector', ['begin', 'end', 'edge', 'closure']);\no.addGeom('$polyline', ['points', 'controls', 'start', 'end']);\no.addGeom('$polygon', ['points', 'controls', 'start', 'end', 'booleanOperations']);\n\nexport default o;\n","/**\n * https://www.w3.org/TR/2018/WD-filter-effects-1-20181218/#feGaussianBlurElement\n * 根据模糊参数sigma求卷积核尺寸\n * @param sigma\n * @returns {number}\n */\nfunction kernelSize(sigma) {\n if(sigma <= 0) {\n return 0;\n }\n let d = Math.floor(sigma * 3 * Math.sqrt(2 * Math.PI) / 4 + 0.5);\n if(d < 2) {\n d = 2;\n }\n if(d % 2 === 0) {\n d++;\n }\n return d;\n}\n\n/**\n * 根据sigma求模糊扩展尺寸,卷积核求得后为d,再求半径/2,然后因为算法要执行3次,所以*3\n * 比如本来d为5,半径2.5算上自身像素点则各方向扩展2,*3则扩展6\n * @param sigma\n * @returns {number}\n */\nfunction outerSize(sigma) {\n let d = kernelSize(sigma);\n return outerSizeByD(d);\n}\n\nfunction outerSizeByD(d) {\n return Math.floor(d * 0.5) * 3;\n}\n\n/**\n * 一维高斯正态分布,根据标准差和卷积核尺寸返回一维权重数组\n * @param sigma\n * @param d\n */\nfunction gaussianWeight(sigma, d) {\n let list = [];\n let len = Math.floor(d * 0.5);\n let total = 0;\n for(let i = len; i >= 0; i--) {\n let n = Math.pow(Math.E, -Math.pow(i, 2) / (2 * Math.pow(sigma, 2)))\n / (sigma * Math.sqrt(2 * Math.PI));\n list.push(n);\n total += n;\n }\n for(let i = 1; i <= len; i++) {\n let n = Math.pow(Math.E, -Math.pow(i, 2) / (2 * Math.pow(sigma, 2)))\n / (sigma * Math.sqrt(2 * Math.PI));\n list.push(n);\n total += n;\n }\n if(total !== 1) {\n for(let i = 0; i < d; i++) {\n list[i] /= total;\n }\n }\n return list;\n}\n\nexport default {\n kernelSize,\n outerSize,\n outerSizeByD,\n gaussianWeight,\n};\n","import unit from './unit';\nimport font from './font';\nimport reset from './reset';\nimport gradient from './gradient';\nimport reg from './reg';\nimport abbr from './abbr';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport key from '../animate/key';\nimport change from '../refresh/change';\nimport blur from '../math/blur';\n\nconst { STYLE_KEY, style2Upper, STYLE_KEY: {\n POSITION,\n WIDTH,\n HEIGHT,\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n SKEW_X,\n SKEW_Y,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n ROTATE_3D,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n TRANSFORM,\n TRANSFORM_ORIGIN,\n BACKGROUND_IMAGE,\n BACKGROUND_COLOR,\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n BACKGROUND_SIZE,\n OPACITY,\n Z_INDEX,\n COLOR,\n FONT_SIZE,\n FONT_FAMILY,\n FONT_WEIGHT,\n FONT_STYLE,\n LINE_HEIGHT,\n TEXT_ALIGN,\n FILTER,\n VISIBILITY,\n BOX_SHADOW,\n POINTER_EVENTS,\n FILL,\n STROKE,\n STROKE_WIDTH,\n STROKE_DASHARRAY,\n FLEX_BASIS,\n MATRIX,\n LETTER_SPACING,\n WHITE_SPACE,\n LINE_CLAMP,\n ORDER,\n TRANSLATE_PATH,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n WRITING_MODE,\n} } = enums;\nconst { AUTO, PX, PERCENT, NUMBER, INHERIT, DEG, RGBA, STRING, REM, VW, VH, VMAX, VMIN, GRADIENT, calUnit } = unit;\nconst { isNil, rgba2int, equalArr, equal, replaceRgba2Hex } = util;\nconst { isGeom, GEOM, GEOM_KEY_SET } = change;\nconst { VALID_STRING_VALUE } = reset;\n\nconst {\n isColorKey,\n isExpandKey,\n isLengthKey,\n isGradientKey,\n isRadiusKey,\n} = key;\n\nfunction isGradient(s) {\n if(reg.gradient.test(s)) {\n let gradient = reg.gradient.exec(s);\n if(gradient && ['linear', 'radial', 'conic'].indexOf(gradient[1]) > -1) {\n return true;\n }\n }\n}\n\nconst TRANSFORM_HASH = {\n translateX: TRANSLATE_X,\n translateY: TRANSLATE_Y,\n translateZ: TRANSLATE_Z,\n scaleX: SCALE_X,\n scaleY: SCALE_Y,\n scaleZ: SCALE_Z,\n skewX: SKEW_X,\n skewY: SKEW_Y,\n rotateX: ROTATE_X,\n rotateY: ROTATE_Y,\n rotateZ: ROTATE_Z,\n rotate: ROTATE_Z,\n};\n\nfunction compatibleTransform(k, arr) {\n if(k === SCALE_X || k === SCALE_Y || k === SCALE_Z) {\n arr.u = NUMBER;\n }\n else if(k === TRANSLATE_X || k === TRANSLATE_Y || k === TRANSLATE_Z) {\n if(arr.u === NUMBER) {\n arr.u = PX;\n }\n }\n else if(k === PERSPECTIVE) {\n if([NUMBER, PERCENT, DEG].indexOf(arr.u) > -1) {\n arr.u = PX;\n }\n }\n else {\n if(arr.u === NUMBER) {\n arr.u = DEG;\n }\n }\n}\n\nfunction camel(v) {\n if(isNil(v)) {\n v = '';\n }\n v = v.toString();\n //有-才转换,否则可能是写好的驼峰\n if(v.indexOf('-') > -1) {\n return v.toString().toLowerCase().replace(/-([a-z])/ig, function($0, $1) {\n return $1.toUpperCase();\n });\n }\n return v;\n}\n\nfunction convertStringValue(k, v) {\n v = camel(v);\n let list = VALID_STRING_VALUE[k];\n let i = list.indexOf(v);\n if(i > -1) {\n return list[i];\n }\n // 兜底默认\n return list[0];\n}\n\n/**\n * 将传入的手写style标准化,并且用resetList默认值覆盖其中为空的\n * @param style 手写的style样式\n * @param resetList 默认样式,可选\n * @returns Object 标准化的枚举数组结构样式\n */\nfunction normalize(style, resetList = []) {\n if(!util.isObject(style)) {\n return {};\n }\n let res = {};\n // style只有单层无需深度clone\n style = util.extend({}, style);\n // 缩写提前处理,因为reset里没有缩写\n let temp = style.border;\n if(temp) {\n abbr.toFull(style, 'border');\n }\n ['borderTop', 'borderRight', 'borderBottom', 'borderLeft'].forEach(k => {\n abbr.toFull(style, k);\n });\n temp = style.borderWidth;\n if(temp) {\n abbr.toFull(style, 'borderWidth');\n }\n temp = style.borderColor;\n if(temp) {\n abbr.toFull(style, 'borderColor');\n }\n temp = style.borderStyle;\n if(temp) {\n abbr.toFull(style, 'borderStyle');\n }\n temp = style.borderRadius;\n if(temp) {\n abbr.toFull(style, 'borderRadius');\n }\n temp = style.background;\n // 处理渐变背景缩写\n if(temp) {\n abbr.toFull(style, 'background');\n }\n // 背景位置\n temp = style.backgroundPosition;\n if(!isNil(temp)) {\n abbr.toFull(style, 'backgroundPosition');\n }\n // flex\n temp = style.flex;\n if(temp) {\n abbr.toFull(style, 'flex');\n }\n // flex-flow\n temp = style.flexFlow;\n if(temp) {\n abbr.toFull(style, 'flexFlow');\n }\n temp = style.margin;\n if(!isNil(temp)) {\n abbr.toFull(style, 'margin');\n }\n temp = style.padding;\n if(!isNil(temp)) {\n abbr.toFull(style, 'padding');\n }\n temp = style.textStroke;\n if(temp) {\n abbr.toFull(style, 'textStroke');\n }\n temp = style.rotate3d;\n if(temp) {\n abbr.toFull(style, 'rotate3d');\n }\n // 扩展css,将transform几个值拆分为独立的css为动画准备,同时不能使用transform\n ['translate', 'scale', 'skew', 'translate3d', 'scale3d', 'rotate'].forEach(k => {\n temp = style[k];\n if(!isNil(temp)) {\n abbr.toFull(style, k);\n }\n });\n // 扩展的不能和transform混用,给出警告\n [\n 'translateX',\n 'translateY',\n 'translateZ',\n 'scaleX',\n 'scaleY',\n 'scaleZ',\n 'skewX',\n 'skewY',\n 'rotateX',\n 'rotateY',\n 'rotateZ',\n 'rotate3d',\n ].forEach(k => {\n let v = style[k];\n if(v !== undefined && style.transform) {\n inject.warn(`Can not use expand style \"${k}\" with transform`);\n }\n });\n // 默认reset,根据传入不同,当style为空时覆盖\n resetList.forEach(item => {\n let { k, v } = item;\n if(isNil(style[k])) {\n style[k] = v;\n }\n });\n // 背景图\n temp = style.backgroundImage;\n if(temp !== undefined) {\n if(!temp) {\n res[BACKGROUND_IMAGE] = [];\n }\n else if(Array.isArray(temp)) {\n res[BACKGROUND_IMAGE] = temp.map(item => {\n if(!item) {\n return null;\n }\n if(isGradient(item)) {\n return {\n v: gradient.parseGradient(item),\n u: GRADIENT,\n };\n }\n if(reg.img.test(item)) {\n return {\n v: reg.img.exec(item)[2],\n u: STRING,\n };\n }\n return null;\n });\n }\n // 区分是渐变色还是图\n else if(isGradient(temp)) {\n res[BACKGROUND_IMAGE] = [{ v: gradient.parseGradient(temp), u: GRADIENT }];\n }\n else if(reg.img.test(temp)) {\n res[BACKGROUND_IMAGE] = [{ v: reg.img.exec(temp)[2], u: STRING }];\n }\n else {\n res[BACKGROUND_IMAGE] = [];\n }\n }\n temp = style.backgroundColor;\n if(temp !== undefined) {\n temp = temp || 'transparent';\n // 先赋值默认透明,后续操作有合法值覆盖\n let bgc = /^#[0-9a-f]{3,8}/i.exec(temp);\n if(bgc && [4, 7, 9].indexOf(bgc[0].length) > -1) {\n res[BACKGROUND_COLOR] = { v: rgba2int(bgc[0]), u: RGBA };\n }\n else {\n bgc = /rgba?\\s*\\(.+\\)/i.exec(temp);\n res[BACKGROUND_COLOR] = { v: rgba2int(bgc ? bgc[0] : [0, 0, 0, 0]), u: RGBA };\n }\n }\n ['backgroundPositionX', 'backgroundPositionY'].forEach((k, i) => {\n temp = style[k];\n if(temp !== undefined) {\n temp = temp || 0;\n k = i ? BACKGROUND_POSITION_Y : BACKGROUND_POSITION_X;\n if(!Array.isArray(temp)) {\n temp = [temp];\n }\n res[k] = temp.map(item => {\n if(/^[-+]?[\\d.]/.test(item)) {\n let v = calUnit(item);\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n return v;\n }\n else {\n return {\n v: {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[item] || 0,\n u: PERCENT,\n };\n }\n });\n }\n });\n // 背景尺寸\n temp = style.backgroundSize;\n if(temp !== undefined) {\n if(!Array.isArray(temp)) {\n temp = [temp];\n }\n res[BACKGROUND_SIZE] = temp.map(item => {\n if(!item) {\n return [\n { u: AUTO },\n { u: AUTO },\n ];\n }\n let match = item.toString().match(/\\b(?:([-+]?[\\d.]+[pxremvwhina%]*)|(contain|cover|auto))/ig);\n if(match) {\n if(match.length === 1) {\n if(match[0].toLowerCase() === 'contain' || match[0].toLowerCase() === 'cover') {\n match[1] = match[0].toLowerCase();\n }\n else {\n match[1] = 'auto';\n }\n }\n let v = [];\n for(let i = 0; i < 2; i++) {\n let item = match[i].toLowerCase();\n if(/^[-+]?[\\d.]/.test(item)) {\n let n = calUnit(item);\n if([NUMBER, DEG].indexOf(n.u) > -1) {\n n.u = PX;\n }\n v.push(n);\n }\n else if(item === 'contain' || item === 'cover') {\n v.push({ v: item, u: STRING });\n }\n else {\n v.push({ u: AUTO });\n }\n }\n return v;\n }\n else {\n return [\n { u: AUTO },\n { u: AUTO },\n ];\n }\n });\n }\n // border-color\n ['Top', 'Right', 'Bottom', 'Left'].forEach(k => {\n k = 'border' + k + 'Color';\n let v = style[k];\n if(v !== undefined) {\n res[STYLE_KEY[style2Upper(k)]] = { v: rgba2int(v || 'transparent'), u: RGBA };\n }\n });\n // border-radius\n ['TopLeft', 'TopRight', 'BottomRight', 'BottomLeft'].forEach(k => {\n k = 'border' + k + 'Radius';\n let v = style[k];\n if(v !== undefined) {\n v = v || 0;\n let arr = v.toString().split(/\\s+/);\n if(arr.length === 1) {\n arr[1] = arr[0];\n }\n for(let i = 0; i < 2; i++) {\n let item = arr[i];\n if(/^[-+]?[\\d.]/.test(item)) {\n let n = calUnit(item);\n if([NUMBER, DEG].indexOf(n.u) > -1) {\n n.u = PX;\n }\n if(n.v < 0) {\n n.v = 0;\n }\n arr[i] = n;\n }\n else {\n arr[i] = { u: 0, v: PX };\n }\n }\n res[STYLE_KEY[style2Upper(k)]] = arr;\n }\n });\n temp = style.transform;\n if(temp !== undefined) {\n let transform = res[TRANSFORM] = [];\n let match = (temp || '').toString().match(/\\w+\\(.+?\\)/g);\n if(match) {\n match.forEach(item => {\n let i = item.indexOf('(');\n let k = item.slice(0, i);\n let v = item.slice(i + 1, item.length - 1);\n if(k === 'matrix') {\n let arr = v.toString().split(/\\s*,\\s*/);\n arr = arr.map(item => parseFloat(item));\n if(arr.length > 6) {\n arr = arr.slice(0, 6);\n }\n if(arr.length === 6) {\n transform.push({ k: MATRIX, v: [\n arr[0], arr[1], 0, 0, arr[2], arr[3], 0, 0, 0, 0, 1, 0, arr[4], arr[5], 0, 1,\n ]});\n }\n }\n else if(k === 'matrix3d') {\n let arr = v.toString().split(/\\s*,\\s*/);\n arr = arr.map(item => parseFloat(item));\n if(arr.length > 16) {\n arr = arr.slice(0, 16);\n }\n if(arr.length === 16) {\n transform.push({ k: MATRIX, v: arr });\n }\n }\n else if(k === 'perspective') {\n let arr = calUnit(v);\n if(arr.v < 0) {\n arr.v = 0;\n }\n compatibleTransform(PERSPECTIVE, arr);\n transform.push({ k: PERSPECTIVE, v: arr });\n }\n else if(k === 'rotate3d') {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 4) {\n let deg = calUnit(arr[3]);\n compatibleTransform(ROTATE_3D, deg);\n arr[0] = parseFloat(arr[0].replace('(', ''));\n arr[1] = parseFloat(arr[1]);\n arr[2] = parseFloat(arr[2]);\n arr[3] = deg;\n transform.push({ k: ROTATE_3D, v: arr });\n }\n }\n else if(TRANSFORM_HASH.hasOwnProperty(k)) {\n let k2 = TRANSFORM_HASH[k];\n let arr = calUnit(v);\n compatibleTransform(k2, arr);\n transform.push({ k: k2, v: arr });\n }\n else if({ translate: true, scale: true, skew: true }.hasOwnProperty(k)) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[1] = k === 'scale' ? arr[0] : [0];\n }\n if(arr.length === 2) {\n let k1 = STYLE_KEY[style2Upper(k + 'X')];\n let k2 = STYLE_KEY[style2Upper(k + 'Y')];\n let arr1 = calUnit(arr[0]);\n let arr2 = calUnit(arr[1]);\n compatibleTransform(k1, arr1);\n compatibleTransform(k2, arr2);\n transform.push({ k: k1, v: arr1 });\n transform.push({ k: k2, v: arr2 });\n }\n }\n else if({ translate3d: true, scale3d: true }.hasOwnProperty(k)) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[1] = k === 'scale3d' ? [1] : [0];\n arr[2] = k === 'scale3d' ? [1] : [0];\n }\n else if(arr.length === 2) {\n arr[2] = k === 'scale3d' ? [1] : [0];\n }\n if(arr.length === 3) {\n let k1 = STYLE_KEY[style2Upper(k + 'X')];\n let k2 = STYLE_KEY[style2Upper(k + 'Y')];\n let k3 = STYLE_KEY[style2Upper(k + 'Z')];\n let arr1 = calUnit(arr[0]);\n let arr2 = calUnit(arr[1]);\n let arr3 = calUnit(arr[2]);\n compatibleTransform(k1, arr1);\n compatibleTransform(k2, arr2);\n compatibleTransform(k3, arr3);\n transform.push({ k: k1, v: arr1 });\n transform.push({ k: k2, v: arr2 });\n transform.push({ k: k3, v: arr3 });\n }\n }\n });\n }\n }\n temp = style.perspective;\n if(temp !== undefined) {\n let arr = calUnit(temp || 0);\n if(arr.v < 0) {\n arr.v = 0;\n }\n compatibleTransform(PERSPECTIVE, arr);\n res[PERSPECTIVE] = arr;\n }\n ['perspectiveOrigin', 'transformOrigin'].forEach(k => {\n temp = style[k];\n if(temp !== undefined) {\n if(temp === null) {\n temp = '';\n }\n let arr = res[STYLE_KEY[style2Upper(k)]] = [];\n let match = temp.toString().match(reg.position);\n if(match) {\n if(match.length === 1) {\n match[1] = match[0];\n }\n for(let i = 0; i < 2; i++) {\n let item = match[i];\n if(/^[-+]?[\\d.]/.test(item)) {\n let n = calUnit(item);\n if([NUMBER, DEG].indexOf(n.u) > -1) {\n n.u = PX;\n }\n arr.push(n);\n }\n else {\n arr.push({\n v: {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[item],\n u: PERCENT,\n });\n // 不规范的写法变默认值50%\n if(isNil(arr[i].v)) {\n arr[i].v = 50;\n }\n }\n }\n }\n else {\n arr.push({ v: 50, u: PERCENT });\n arr.push({ v: 50, u: PERCENT });\n }\n }\n });\n [\n 'translateX',\n 'translateY',\n 'translateZ',\n 'scaleX',\n 'scaleY',\n 'scaleZ',\n 'skewX',\n 'skewY',\n 'rotateX',\n 'rotateY',\n 'rotateZ',\n 'rotate',\n ].forEach(k => {\n let v = style[k];\n if(v === undefined) {\n return;\n }\n if(v === null) {\n if(k.indexOf('scale') === 0) {\n v = 1;\n }\n else {\n v = 0;\n }\n }\n let k2 = TRANSFORM_HASH[k];\n let n = calUnit(v);\n // 没有单位或默认值处理单位\n compatibleTransform(k2, n);\n res[k2] = n;\n });\n temp = style.rotate3d;\n if(temp !== undefined) {\n let arr = (temp || '').toString().split(/\\s*,\\s*/);\n if(arr.length === 4) {\n let deg = calUnit(arr[3]);\n compatibleTransform(ROTATE_3D, deg);\n arr[0] = parseFloat(arr[0].replace('(', ''));\n arr[1] = parseFloat(arr[1]);\n arr[2] = parseFloat(arr[2]);\n arr[3] = deg;\n }\n res[ROTATE_3D] = arr;\n }\n temp = style.opacity;\n if(temp !== undefined) {\n if(temp === null) {\n temp = 1;\n }\n temp = parseFloat(temp);\n if(!isNaN(temp)) {\n temp = Math.max(temp, 0);\n temp = Math.min(temp, 1);\n res[OPACITY] = temp;\n }\n else {\n res[OPACITY] = 1;\n }\n }\n temp = style.zIndex;\n if(temp !== undefined) {\n res[Z_INDEX] = parseInt(temp) || 0;\n }\n // 转化不同单位值为对象标准化,不写单位的变成number单位转化为px\n [\n 'marginTop',\n 'marginRight',\n 'marginBottom',\n 'marginLeft',\n 'paddingTop',\n 'paddingRight',\n 'paddingBottom',\n 'paddingLeft',\n 'borderTopWidth',\n 'borderRightWidth',\n 'borderBottomWidth',\n 'borderLeftWidth',\n 'top',\n 'right',\n 'bottom',\n 'left',\n 'width',\n 'height',\n ].forEach(k => {\n let v = style[k];\n if(v === undefined) {\n return;\n }\n if(v === 'auto') {\n v = { v: 0, u: AUTO };\n }\n else {\n v = calUnit(v || 0);\n // 无单位视为px\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n }\n let k2 = STYLE_KEY[style2Upper(k)];\n res[k2] = v;\n // 限制padding/border为正数\n if({\n paddingTop: true,\n paddingRight: true,\n paddingBottom: true,\n paddingLeft: true,\n borderTopWidth: true,\n borderRightWidth: true,\n borderBottomWidth: true,\n borderLeftWidth: true,\n width: true,\n height: true,\n }.hasOwnProperty(k) && v.v < 0) {\n v.v = 0;\n }\n });\n temp = style.flexBasis;\n if(temp !== undefined) {\n if(/content/i.test(temp)) {\n res[FLEX_BASIS] = { v: temp.toLowerCase(), u: STRING };\n }\n else if(/^[\\d.]/.test(temp)) {\n let v = res[FLEX_BASIS] = calUnit(temp);\n v.v = Math.max(v.v, 0);\n // 无单位视为px\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n }\n else {\n res[FLEX_BASIS] = { v: 0, u: AUTO };\n }\n }\n temp = style.order;\n if(temp !== undefined) {\n res[ORDER] = parseInt(temp) || 0;\n }\n temp = style.color;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[COLOR] = { u: INHERIT };\n }\n else if(isGradient(temp)) {\n res[COLOR] = { v: gradient.parseGradient(temp), u: GRADIENT };\n }\n else {\n res[COLOR] = { v: rgba2int(temp), u: RGBA };\n }\n }\n temp = style.textStrokeColor;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[TEXT_STROKE_COLOR] = { u: INHERIT };\n }\n else if(isGradient(temp)) {\n res[TEXT_STROKE_COLOR] = { v: gradient.parseGradient(temp), u: GRADIENT };\n }\n else {\n res[TEXT_STROKE_COLOR] = { v: rgba2int(temp), u: RGBA };\n }\n }\n temp = style.fontSize;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[FONT_SIZE] = { u: INHERIT };\n }\n else {\n let v = calUnit(temp);\n // fontSize不能为负数,否则为继承\n if(v < 0) {\n res[FONT_SIZE] = { u: INHERIT };\n }\n else {\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n res[FONT_SIZE] = v;\n }\n }\n }\n temp = style.textStrokeWidth;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[TEXT_STROKE_WIDTH] = { u: INHERIT };\n }\n else {\n let v = calUnit(temp);\n // textStrokeWidth不能为负数,否则为继承\n if(v < 0) {\n res[TEXT_STROKE_WIDTH] = { u: INHERIT };\n }\n else {\n if([NUMBER, DEG, PERCENT].indexOf(v.u) > -1) {\n v.u = PX;\n }\n res[TEXT_STROKE_WIDTH] = v;\n }\n }\n }\n temp = style.textStrokeOver;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[TEXT_STROKE_OVER] = { u: INHERIT };\n }\n else {\n let v = reset.INHERIT.textStrokeOver;\n if(/fill/i.test(temp)) {\n v = 'fill';\n }\n res[TEXT_STROKE_OVER] = { v, u: STRING };\n }\n }\n temp = style.fontWeight;\n if(temp !== undefined) {\n if(/bold/i.test(temp)) {\n res[FONT_WEIGHT] = { v: 700, u: NUMBER };\n }\n else if(/normal/i.test(temp)) {\n res[FONT_WEIGHT] = { v: 400, u: NUMBER };\n }\n else if(/lighter/i.test(temp)) {\n res[FONT_WEIGHT] = { v: 200, u: NUMBER };\n }\n else if(/inherit/i.test(temp)) {\n res[FONT_WEIGHT] = { u: INHERIT };\n }\n else {\n res[FONT_WEIGHT] = { v: Math.max(0, parseInt(temp)) || 400, u: NUMBER };\n }\n }\n temp = style.fontStyle;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[FONT_STYLE] = { u: INHERIT };\n }\n else {\n let v = reset.INHERIT.fontStyle;\n if(/italic/i.test(temp)) {\n v = 'italic';\n }\n else if(/oblique/i.test(temp)) {\n v = 'oblique';\n }\n res[FONT_STYLE] = { v, u: STRING };\n }\n }\n temp = style.fontFamily;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[FONT_FAMILY] = { u: INHERIT };\n }\n else {\n // 统一文字声明格式\n res[FONT_FAMILY] = { v: temp.toString().toLowerCase()\n .replace(/['\"]/, '')\n .replace(/\\s*,\\s*/g, ','), u: STRING };\n }\n }\n temp = style.writingMode;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[WRITING_MODE] = { u: INHERIT };\n }\n else {\n let v = reset.INHERIT.writingMode;\n if(/vertical-?rl/i.test(temp)) {\n v = 'verticalRl';\n }\n else if(/vertical-?lr/i.test(temp)) {\n v = 'verticalLr';\n }\n res[WRITING_MODE] = { v, u: STRING };\n }\n }\n temp = style.textAlign;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[TEXT_ALIGN] = { u: INHERIT };\n }\n else {\n let v = 'left';\n if(/center/i.test(temp)) {\n v = 'center';\n }\n else if(/right/i.test(temp)) {\n v = 'right';\n }\n res[TEXT_ALIGN] = { v, u: STRING };\n }\n }\n temp = style.lineHeight;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[LINE_HEIGHT] = { u: INHERIT };\n }\n else if(/normal/i.test(temp)) {\n res[LINE_HEIGHT] = { u: AUTO };\n }\n // lineHeight默认数字,想要px必须强制带单位\n else if(/^[\\d.]+/i.test(temp)) {\n let v = calUnit(temp);\n if([DEG].indexOf(v.u) > -1) {\n v.u = NUMBER;\n }\n res[LINE_HEIGHT] = v;\n }\n else {\n let n = Math.max(0, parseFloat(temp)) || 'normal';\n // 非法数字\n if(n === 'normal') {\n res[LINE_HEIGHT] = { u: AUTO };\n }\n else {\n res[LINE_HEIGHT] = { v: n, u: NUMBER };\n }\n }\n }\n temp = style.letterSpacing;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[LETTER_SPACING] = { u: INHERIT };\n }\n else if(/normal/i.test(temp)) {\n res[LETTER_SPACING] = { v: 0, u: PX };\n }\n else if(/^[-+]?[\\d.]/.test(temp)) {\n let v = calUnit(temp);\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n res[LETTER_SPACING] = v;\n }\n else {\n res[LETTER_SPACING] = { v: parseFloat(temp) || 0, u: PX };\n }\n }\n temp = style.whiteSpace;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[WHITE_SPACE] = { u: INHERIT };\n }\n else {\n res[WHITE_SPACE] = { v: temp, u: STRING };\n }\n }\n temp = style.lineClamp;\n if(temp !== undefined) {\n temp = parseInt(temp) || 0;\n res[LINE_CLAMP] = Math.max(0, temp);\n }\n // fill和stroke为渐变时特殊处理,fillRule无需处理字符串\n ['fill', 'stroke'].forEach((k, i) => {\n temp = style[k];\n if(temp !== undefined) {\n k = i ? STROKE : FILL;\n if(!Array.isArray(temp)) {\n temp = [temp];\n }\n res[k] = temp.map(item => {\n if(!item) {\n return { v: 'none', u: STRING };\n }\n else if(isGradient(item)) {\n return { v: gradient.parseGradient(item), u: GRADIENT };\n }\n else {\n return { v: rgba2int(item), u: RGBA };\n }\n });\n }\n });\n temp = style.strokeWidth;\n if(temp !== undefined) {\n if(!Array.isArray(temp)) {\n temp = [temp];\n }\n res[STROKE_WIDTH] = temp.map(item => {\n let v = calUnit(item);\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n v.v = Math.max(v.v, 0);\n return v;\n });\n }\n temp = style.strokeDasharray;\n if(temp !== undefined) {\n if(Array.isArray(temp)) {\n res[STROKE_DASHARRAY] = temp.map(item => {\n let match = (item || '').toString().match(/[\\d.]+/g);\n if(match) {\n match = match.map(item => parseFloat(item));\n if(match.length % 2 === 1) {\n match.push(match[match.length - 1]);\n }\n return match;\n }\n return [];\n });\n }\n else {\n let match = (temp || '').toString().match(/[\\d.]+/g);\n if(match) {\n match = match.map(item => parseFloat(item));\n if(match.length % 2 === 1) {\n match.push(match[match.length - 1]);\n }\n res[STROKE_DASHARRAY] = [match];\n }\n else {\n res[STROKE_DASHARRAY] = [[]];\n }\n }\n }\n // filter支持数组形式\n temp = style.filter;\n if(temp !== undefined) {\n let f = [];\n // 先替换掉rgba为#RGBA格式,然后分割\n let arr;\n if(Array.isArray(temp)) {\n arr = temp.map(item => {\n return (replaceRgba2Hex(item) || '').match(/[\\w-]+\\s*\\(.+?\\)/ig);\n });\n }\n else {\n arr = (replaceRgba2Hex(temp) || '').match(/[\\w-]+\\s*\\(.+?\\)/ig);\n }\n if(arr) {\n arr.forEach(item => {\n let match = /([\\w-]+)\\s*\\((\\s*.+\\s*)\\)/i.exec(item);\n if(match) {\n let k = match[1].toLowerCase(), v = match[2];\n if(k === 'drop-shadow' || k === 'dropshadow') {\n let coords = /([-+]?[\\d.]+[pxremvwhina%]*)[\\s,]+([-+]?[\\d.]+[pxremvwhina%]*)[\\s,]+(?:([-+]?[\\d.]+[pxremvwhina%]*)[\\s,])?([-+]?[\\d.]+[pxremvwhina%]*\\s*)?/ig.exec(item);\n if(coords) {\n let res = [];\n // v,h,blur,spread,其中v和h是必须,其余没有为0\n for(let i = 1; i <= 4; i++) {\n let item2 = coords[i];\n if(item2) {\n let v = calUnit(item2);\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n // x/y可以负,blur和spread不行\n if(i > 2 && v.v < 0) {\n v.v = 0;\n }\n res.push(v);\n }\n else {\n res.push({ v: 0, u: PX });\n }\n }\n let color = /#[a-f\\d]{3,8}/i.exec(item);\n if(color) {\n res.push(rgba2int(color[0]));\n }\n else {\n res.push([0, 0, 0, 1]);\n }\n f.push({ k: 'dropShadow', v: res });\n }\n }\n else {\n let m2 = /([-+]?[\\d.]+\\s*[pxremvwhdg%]*)/i.exec(v);\n if(m2) {\n let v = calUnit(m2[0]);\n if(k === 'blur') {\n if([DEG, PERCENT].indexOf(v.u) > -1) {\n return;\n }\n if(v.u === NUMBER) {\n v.u = PX;\n }\n v.v = Math.max(v.v, 0);\n f.push({ k, v });\n }\n else if(k === 'hue-rotate' || k === 'huerotate') {\n if([NUMBER, DEG].indexOf(v.u) === -1) {\n return;\n }\n v.u = DEG;\n f.push({ k:'hueRotate', v });\n }\n else if(k === 'saturate' || k === 'brightness' || k === 'grayscale' || k === 'contrast' || k === 'sepia' || k === 'invert') {\n if([NUMBER, PERCENT].indexOf(v.u) === -1) {\n return;\n }\n v.v = Math.max(v.v, 0);\n v.u = PERCENT;\n f.push({ k, v });\n }\n }\n }\n }\n });\n }\n res[FILTER] = f;\n }\n temp = style.visibility;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[VISIBILITY] = { u: INHERIT };\n }\n else {\n let v = reset.INHERIT.visibility;\n if(/hidden/i.test(temp)) {\n v = 'hidden';\n }\n res[VISIBILITY] = { v, u: STRING };\n }\n }\n temp = style.pointerEvents;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[POINTER_EVENTS] = { u: INHERIT };\n }\n else {\n let v = reset.INHERIT.pointerEvents;\n if(/none/i.test(temp)) {\n v = 'none';\n }\n res[POINTER_EVENTS] = { v, u: STRING };\n }\n }\n temp = style.boxShadow;\n if(temp !== undefined) {\n let bs = [];\n // 先替换掉rgba为#RGBA格式,然后按逗号分割\n let arr = (replaceRgba2Hex(temp) || '').split(',');\n if(arr) {\n arr.forEach(item => {\n let coords = /([-+]?[\\d.]+[pxremvwhina%]*)\\s*([-+]?[\\d.]+[pxremvwhina%]*)\\s*([-+]?[\\d.]+[pxremvwhina%]*\\s*)?([-+]?[\\d.]+[pxremvwhina%]*\\s*)?/i.exec(item);\n if(coords) {\n let res = [];\n // v,h,blur,spread,其中v和h是必须,其余没有为0\n for(let i = 1; i <= 4; i++) {\n let item2 = coords[i];\n if(item2) {\n let v = calUnit(item2);\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n // x/y可以负,blur和spread不行\n if(i > 2 && v.v < 0) {\n v.v = 0;\n }\n res.push(v);\n }\n else {\n res.push({ v: 0, u: PX });\n }\n }\n let color = /#[a-f\\d]{3,8}/i.exec(item);\n if(color) {\n res.push(rgba2int(color[0]));\n }\n else {\n res.push([0, 0, 0, 1]);\n }\n res.push(/inset/i.test(item) ? 'inset' : 'outset');\n bs.push(res);\n }\n });\n }\n res[BOX_SHADOW] = bs;\n }\n // 直接赋值的string类型\n [\n 'position',\n 'display',\n 'flexDirection',\n 'flexWrap',\n 'justifyContent',\n 'alignItems',\n 'alignSelf',\n 'alignContent',\n 'overflow',\n 'mixBlendMode',\n 'borderTopStyle',\n 'borderRightStyle',\n 'borderBottomStyle',\n 'borderLeftStyle',\n 'backgroundClip',\n 'textOverflow',\n 'transformStyle',\n 'backfaceVisibility',\n ].forEach(k => {\n if(style.hasOwnProperty(k)) {\n res[STYLE_KEY[style2Upper(k)]] = convertStringValue(k, style[k]);\n }\n });\n // 直接赋值的number类型\n [\n 'flexGrow',\n 'flexShrink',\n ].forEach(k => {\n if(style.hasOwnProperty(k)) {\n res[STYLE_KEY[style2Upper(k)]] = Math.max(parseFloat(style[k]) || 0, 0);\n }\n });\n temp = style.zIndex;\n if(temp !== undefined) {\n res[Z_INDEX] = parseFloat(temp) || 0;\n }\n // 这些支持多个的用数组表示\n [\n 'backgroundRepeat',\n 'strokeLinecap',\n 'strokeLinejoin',\n 'strokeMiterlimit',\n 'fillRule',\n ].forEach(k => {\n if(style.hasOwnProperty(k)) {\n let v = style[k];\n if(!Array.isArray(v)) {\n v = [v];\n }\n if(k === 'backgroundRepeat') {\n v.forEach((item, i) => {\n if(item) {\n v[i] = camel(item);\n }\n });\n }\n res[STYLE_KEY[style2Upper(k)]] = v;\n }\n });\n GEOM_KEY_SET.forEach(k => {\n if(style.hasOwnProperty(k)) {\n res[k] = style[k];\n }\n });\n return res;\n}\n\nfunction setFontStyle(style) {\n let fontSize = style[FONT_SIZE] || 0;\n let fontFamily = style[FONT_FAMILY] || inject.defaultFontFamily || 'arial';\n if(/\\s/.test(fontFamily)) {\n fontFamily = '\"' + fontFamily.replace(/\"/g, '\\\\\"') + '\"';\n }\n return (style[FONT_STYLE] || 'normal') + ' ' + (style[FONT_WEIGHT] || '400') + ' '\n + fontSize + 'px/' + fontSize + 'px ' + fontFamily;\n}\n\n/**\n * https://zhuanlan.zhihu.com/p/25808995\n * 根据字形信息计算baseline的正确值,差值上下均分\n * @param style computedStyle\n * @returns {number}\n */\nfunction getBaseline(style) {\n let fontSize = style[FONT_SIZE];\n let ff = calFontFamily(style[FONT_FAMILY]);\n let normal = calNormalLineHeight(style, ff);\n return (style[LINE_HEIGHT] - normal) * 0.5 + fontSize * (font.info[ff] || font.info[inject.defaultFontFamily] || font.info.arial).blr;\n}\n\n// 垂直排版的baseline和水平类似,只是原点坐标系不同,删除加本身高度变为加gap高度\nfunction getVerticalBaseline(style) {\n return style[LINE_HEIGHT] - getBaseline(style);\n}\n\nfunction calNormalLineHeight(style, ff) {\n if(!ff) {\n ff = calFontFamily(style[FONT_FAMILY]);\n }\n return style[FONT_SIZE] * (font.info[ff] || font.info[inject.defaultFontFamily] || font.info.arial).lhr;\n}\n\nfunction calFontFamily(fontFamily) {\n let ff = fontFamily.split(/\\s*,\\s*/);\n for(let i = 0, len = ff.length; i < len; i++) {\n let item = ff[i].replace(/^['\"]/, '').replace(/['\"]$/, '');\n if(font.hasLoaded(item) || inject.checkSupportFontFamily(item)) {\n return item;\n }\n }\n return inject.defaultFontFamily;\n}\n\nfunction calRelativePercent(n, parent, k) {\n n *= 0.01;\n while(parent) {\n let style = parent.currentStyle[k];\n if(style.u === AUTO) {\n if(k === WIDTH) {\n parent = parent.domParent;\n }\n else {\n break;\n }\n }\n else if(style.u === PX) {\n return n * style.v;\n }\n else if(style.u === PERCENT) {\n n *= style.v * 0.01;\n parent = parent.domParent;\n }\n else if(style.u === REM) {\n return n * style.v * parent.root.computedStyle[FONT_SIZE];\n }\n else if(style.u === VW) {\n return n * style.v * parent.root.width * 0.01;\n }\n else if(style.u === VH) {\n return n * style.v * parent.root.height * 0.01;\n }\n else if(style.u === VMAX) {\n return n * style.v * Math.max(parent.root.width, parent.root.height) * 0.01;\n }\n else if(style.u === VMIN) {\n return n * style.v * Math.min(parent.root.width, parent.root.height) * 0.01;\n }\n }\n return n;\n}\n\nfunction calRelative(currentStyle, k, v, parent, isWidth) {\n if(v.u === AUTO) {\n v = 0;\n }\n else if([PX, NUMBER].indexOf(v.u) > -1) {\n v = v.v;\n }\n else if(v.u === PERCENT) {\n if(isWidth) {\n v = calRelativePercent(v.v, parent, WIDTH);\n }\n else {\n v = calRelativePercent(v.v, parent, HEIGHT);\n }\n }\n else if(v.u === REM) {\n v = v.v * parent.root.computedStyle[FONT_SIZE];\n }\n else if(v.u === VW) {\n v = v.v * parent.root.width * 0.01;\n }\n else if(v.u === VH) {\n v = v.v * parent.root.height * 0.01;\n }\n else if(v.u === VMAX) {\n v = v.v * Math.max(parent.root.width, parent.root.height) * 0.01;\n }\n else if(v.u === VMIN) {\n v = v.v * Math.min(parent.root.width, parent.root.height) * 0.01;\n }\n return v;\n}\n\nfunction isRelativeOrAbsolute(node) {\n let position = node.currentStyle[POSITION];\n return position === 'relative' || position === 'absolute';\n}\n\nfunction equalStyle(k, a, b, target) {\n if(!a || !b) {\n return a === b;\n }\n if(k === TRANSFORM) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let oa = a[i];\n let ob = b[i];\n if(oa.k !== ob.k) {\n return false;\n }\n let av = oa.v, bv = ob.v;\n if(oa.k === MATRIX) {\n if(!equalArr(av, bv)) {\n return false;\n }\n }\n else if(av.u !== bv.u || av.v !== bv.v) {\n return false;\n }\n }\n return true;\n }\n if(k === ROTATE_3D) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3].v === b[3].v && a[3].u === b[3].u;\n }\n if(k === FILTER) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let oa = a[i];\n let ob = b[i];\n if(oa.k !== ob.k) {\n return false;\n }\n let av = oa.v, bv = ob.v;\n if(oa.k === 'dropShadow' || oa.k === 'drop-shadow') {\n if(av.length !== bv.length) {\n return false;\n }\n for(let j = 0; j < 4; j++) {\n let avj = av[j], bvj = bv[j];\n if(avj.u !== bvj.u || avj.v !== bvj.v) {\n return false;\n }\n }\n }\n else if(av.u !== bv.u || av.v !== bv.v) {\n return false;\n }\n }\n return true;\n }\n if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN || isRadiusKey(k)) {\n return a[0].v === b[0].v && a[0].u === b[0].u\n && a[1].v === b[1].v && a[1].u === b[1].u;\n }\n if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y || k === STROKE_WIDTH) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let aa = a[i], bb = b[i];\n if(aa.v !== bb.v || aa.u !== bb.u || aa.v !== bb.v || aa.u !== bb.u) {\n return false;\n }\n }\n return true;\n }\n if(k === BOX_SHADOW) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let aa = a[i], bb = b[i];\n if((!aa || !bb) && aa !== bb) {\n return false;\n }\n for(let j = 0; j < 4; j++) {\n if(aa[j].v !== bb[j].v || aa[j].u !== bb[j].u) {\n return false;\n }\n }\n for(let j = 0; j < 4; j++) {\n if(aa[4][j] !== bb[4][j]) {\n return false;\n }\n }\n if(aa[5] !== bb[5]) {\n return false;\n }\n }\n return true;\n }\n if(k === BACKGROUND_SIZE || k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let aa = a[i], bb = b[i];\n if(aa[0].v !== bb[0].v || aa[0].u !== bb[0].u || aa[1].v !== bb[1].v || aa[1].u !== bb[1].u) {\n return false;\n }\n }\n return true;\n }\n // if(k === OPACITY || k === Z_INDEX) {} 原始数字无需判断\n if(isLengthKey(k) || isExpandKey(k)) {\n return a.v === b.v && a.u === b.u;\n }\n if(isGradientKey(k)) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let ai = a[i], bi = b[i];\n if(ai.u !== bi.u) {\n return false;\n }\n let av = ai.v, bv = bi.v;\n if(ai.u === GRADIENT) {\n if(av.k !== bv.k || av.d !== bv.d || av.s !== bv.s || av.z !== bv.z) {\n return false;\n }\n if(av.k === 'linear') {\n let ad = av.d, bd = bv.d;\n let isArrayD1 = Array.isArray(ad);\n let isArrayD2 = Array.isArray(bd);\n if(isArrayD1 !== isArrayD2) {\n return false;\n }\n if(isArrayD1) {\n if(ad[0] !== bd[0] || ad[1] !== bd[1] || ad[2] !== bd[2] || ad[3] !== bd[3]) {\n return false;\n }\n }\n else if(ad !== bd) {\n return false;\n }\n }\n else if(av.k === 'conic' && av.d !== bv.d) {\n return false;\n }\n if(av.k === 'radial' || av.k === 'conic') {\n let ap = av.p, bp = bv.p;\n if(ap[0].u !== bp[0].u || ap[0].v !== bp[0].v || ap[1].u !== bp[1].u || ap[1].v !== bp[1].v) {\n return false;\n }\n }\n for(let j = 0; j < 2; j++) {\n let aj = av.v[j], bj = bv.v[j];\n let ac = aj[0], bc = bj[0];\n if(ac[0] !== bc[0] || ac[1] !== bc[1] || ac[2] !== bc[2] || ac[3] !== bc[3]) {\n return false;\n }\n if(aj[1] && bj[1]) {\n if(aj[1].u !== bj[1].u || aj[1].v !== bj[1].v) {\n return false;\n }\n }\n else if(aj[1] || bj[1]) {\n return false;\n }\n }\n }\n else if(ai.u === RGBA) {\n if(!equalArr(av, bv)) {\n return false;\n }\n }\n else if(av !== bv) {\n return false;\n }\n }\n return true;\n }\n if(isColorKey(k)) {\n if(a.u !== b.u) {\n return false;\n }\n if(a.u === GRADIENT) {\n return equal(a.v, b.v);\n }\n else if(a.u === INHERIT) {\n return true;\n }\n else if(a.u === RGBA) {\n return equalArr(a.v, b.v);\n }\n }\n // multi都是纯值数组,equalArr本身即递归,非multi根据类型判断\n if(isGeom(target.tagName, k) && (target.isMulti || Array.isArray(a) && Array.isArray(b))) {\n return equal(a, b);\n }\n return a === b;\n}\n\nfunction cloneStyle(style, keys) {\n if(!keys) {\n keys = Object.keys(style).map(i => {\n if(!GEOM.hasOwnProperty(i)) {\n i = parseInt(i);\n }\n return i;\n });\n }\n let res = {};\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n let v = style[k];\n if(k === TRANSFORM) {\n if(v) {\n let len = v.length;\n let n = new Array(len);\n for(let i = 0; i < len; i++) {\n let o = v[i];\n if(o.k === MATRIX) {\n n[i] = {\n k: o.k,\n v: o.v.slice(0),\n };\n }\n else {\n n[i] = {\n k: o.k,\n v: {\n v: o.v.v,\n u: o.v.u,\n },\n };\n }\n }\n res[k] = n;\n }\n }\n else if(k === ROTATE_3D) {\n res[k] = [v[0], v[1], v[2], { v: v[3].v, u: v[3].u }];\n }\n else if(k === FILTER) {\n if(v) {\n let len = v.length;\n let n = new Array(len);\n for(let i = 0; i < len; i++) {\n let o = v[i];\n let k = o.k, vv = o.v;\n if(k === 'dropShadow') {\n let arr = new Array(5);\n n[i] = { k, v: arr };\n for(let j = 0; j < 4; j++) {\n let temp = vv[j];\n arr[j] = { v: temp.v, u: temp.u };\n }\n arr[4] = vv[4].slice(0);\n }\n else {\n n[i] = {k, v: { v: vv.v, u: vv.u }};\n }\n }\n res[k] = n;\n }\n }\n else if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN || isRadiusKey(k)) {\n if(v) {\n let n = new Array(2);\n for(let i = 0; i < 2; i++) {\n let o = v[i];\n n[i] = { v: o.v, u: o.u };\n }\n res[k] = n;\n }\n }\n else if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y || k === STROKE_WIDTH) {\n res[k] = v.map(item => ({ v: item.v, u: item.u }));\n }\n else if(k === BOX_SHADOW) {\n if(v) {\n v = v.map(item => {\n let n = new Array(6);\n for(let i = 0; i < 4; i++) {\n let o = item[i];\n n[i] = { v: o.v, u: o.u }; // x/y/blur/spread\n }\n n[4] = item[4].slice(0); //rgba\n n[5] = item[5]; // outset/inset\n return n;\n });\n res[k] = v;\n }\n }\n else if(k === BACKGROUND_SIZE) {\n if(v) {\n res[k] = v.map(item => {\n return [\n { v: item[0].v, u: item[0].u },\n { v: item[1].v, u: item[1].u },\n ];\n });\n }\n }\n else if(k === OPACITY || k === Z_INDEX) {\n res[k] = v;\n }\n else if(k === TRANSLATE_PATH) {\n if(v) {\n res[k] = v.map(item => ({\n v: item.v,\n u: item.u,\n }));\n }\n }\n else if(isLengthKey(k) || isExpandKey(k)) {\n res[k] = { v: v.v, u: v.u };\n }\n // 渐变特殊处理\n else if(isGradientKey(k)) {\n res[k] = v.map(item => {\n if(!item) {\n return null;\n }\n if(item.u === GRADIENT) {\n return { v: util.clone(item.v), u: GRADIENT };\n }\n // 颜色\n else if(item.u === RGBA) {\n return { v: item.v.slice(0), u: RGBA };\n }\n // string和none\n else {\n return { v: item.v, u: item.u };\n }\n });\n }\n else if(isColorKey(k)) {\n // 特殊增加支持有gradient的先判断,仅color和textStrokeColor支持\n if(v.u === GRADIENT) {\n res[k] = { v: util.clone(v.v), u: GRADIENT };\n }\n else if(v.u === RGBA) {\n res[k] = { v: v.v.slice(0), u: RGBA };\n }\n // inherit\n else {\n res[k] = { u: INHERIT };\n }\n }\n // geom自定义属性\n else if(GEOM.hasOwnProperty(k)) {\n res[k] = util.clone(v);\n }\n // position等直接值类型赋值\n else {\n res[k] = v;\n }\n }\n return res;\n}\n\nfunction spreadBoxShadow(bbox, boxShadow) {\n let [x1, y1, x2, y2] = bbox;\n if(Array.isArray(boxShadow)) {\n let xl = 0, yt = 0, xr = 0, yb = 0;\n boxShadow.forEach(item => {\n let [x, y, sigma, spread, color, inset] = item;\n if(inset !== 'inset' && color[3] > 0) {\n let d = blur.outerSize(sigma);\n d += spread;\n xl = Math.min(xl, x - d);\n yt = Math.min(yt, x - d);\n xr = Math.max(xr, x + d);\n yb = Math.max(yb, y + d);\n }\n });\n x1 += xl;\n y1 += yt;\n x2 += xr;\n y2 += yb;\n }\n return [x1, y1, x2, y2];\n}\n\nfunction spreadFilter(bbox, filter) {\n let [x1, y1, x2, y2] = bbox;\n // filter对整体有影响,且filter子项可以先后多次重复出现,上面计算完后,依次处理\n if(Array.isArray(filter)) {\n filter.forEach(item => {\n let { k, v } = item;\n if(k === 'blur' && v > 0) {\n let d = blur.kernelSize(v);\n let spread = blur.outerSizeByD(d);\n if(spread) {\n x1 -= spread;\n y1 -= spread;\n x2 += spread;\n y2 += spread;\n }\n }\n else if(k === 'dropShadow') {\n let d = blur.kernelSize(v[2]);\n let spread = blur.outerSizeByD(d);\n // x/y/blur,3个一起影响,要考虑正负号,spread一定为非负\n if(v[0] || v[1] || spread) {\n if(v[0] <= 0 || v[0] > 0 && v[0] < spread) {\n x1 += v[0] - spread;\n }\n if(v[1] <= 0 || v[1] > 0 && v[1] < spread) {\n y1 += v[1] - spread;\n }\n if(v[0] < 0 && -v[0] < spread || v[0] >= 0) {\n x2 += v[0] + spread;\n }\n if(v[1] < 0 && -v[1] < spread || v[1] >= 0) {\n y2 += v[1] + spread;\n }\n }\n }\n });\n }\n return [x1, y1, x2, y2];\n}\n\nexport default {\n normalize,\n setFontStyle,\n getBaseline,\n getVerticalBaseline,\n calRelative,\n equalStyle,\n isRelativeOrAbsolute,\n cloneStyle,\n calNormalLineHeight,\n calFontFamily,\n spreadBoxShadow,\n spreadFilter,\n};\n","import unit from '../style/unit';\nimport enums from '../util/enums';\nimport matrix from '../math/matrix';\nimport geom from '../math/geom';\n\nconst { STYLE_KEY: {\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n SKEW_X,\n SKEW_Y,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n ROTATE_3D,\n PERSPECTIVE,\n MATRIX,\n FONT_SIZE,\n}} = enums;\nconst { PX, PERCENT, REM, VW, VH, VMAX, VMIN } = unit;\nconst { identity, multiply, multiplyTfo, tfoMultiply, isE,\n multiplyTranslateX, multiplyTranslateY, multiplyTranslateZ,\n multiplyRotateX, multiplyRotateY, multiplyRotateZ,\n multiplySkewX, multiplySkewY, multiplyPerspective,\n multiplyScaleX, multiplyScaleY, multiplyScaleZ } = matrix;\nconst { d2r } = geom;\n\nfunction calRotateX(t, v) {\n v = d2r(v);\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n t[5] = t[10] = cos;\n t[6] = sin;\n t[9] = -sin;\n return t;\n}\n\nfunction calRotateY(t, v) {\n v = d2r(v);\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n t[0] = t[10] = cos;\n t[8] = sin;\n t[2] = -sin;\n return t;\n}\n\nfunction calRotateZ(t, v) {\n v = d2r(v);\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n t[0] = t[5] = cos;\n t[1] = sin;\n t[4] = -sin;\n return t;\n}\n\nfunction calRotate3d(t, v) {\n let [x, y, z, r] = v;\n r = d2r(r);\n let s = Math.sin(r);\n let c = Math.cos(r);\n if(x && !y && !z) {\n if(x < 0) {\n s = -s;\n }\n t[5] = c;\n t[9] = -s;\n t[6] = s;\n t[10] = c;\n }\n else if(y && !x && !z) {\n if(y < 0) {\n s = -s;\n }\n t[0] = c;\n t[8] = s;\n t[2] = -s;\n t[10] = c;\n }\n else if(z && !x && !y) {\n if(z < 0) {\n s = -s;\n }\n t[0] = c;\n t[4] = -s;\n t[1] = s;\n t[5] = c;\n }\n else {\n let len = Math.sqrt(x * x + y * y + z * z);\n if(len !== 1) {\n let rlen = 1 / len;\n x *= rlen;\n y *= rlen;\n z *= rlen;\n }\n let nc = 1 - c;\n let xy = x * y;\n let yz = y * z;\n let zx = z * x;\n let xs = x * s;\n let ys = y * s;\n let zs = z * s;\n\n t[0] = x * x * nc + c;\n t[1] = xy * nc + zs;\n t[2] = zx * nc - ys;\n t[3] = 0;\n\n t[4] = xy * nc - zs;\n t[5] = y * y * nc + c;\n t[6] = yz * nc + xs;\n t[7] = 0;\n\n t[8] = zx * nc + ys;\n t[9] = yz * nc - xs;\n t[10] = z * z * nc + c;\n t[11] = 0;\n\n t[12] = 0;\n t[13] = 0;\n t[14] = 0;\n t[15] = 1;\n }\n return t;\n}\n\nfunction calMatrix(transform, ow, oh, root) {\n let m = identity();\n for(let i = 0, len = transform.length; i < len; i++) {\n let item = transform[i];\n let k = item.k;\n let v = calSingleValue(k, item.v, ow, oh, root);\n if(k === TRANSLATE_X) {\n m = multiplyTranslateX(m, v);\n }\n else if(k === TRANSLATE_Y) {\n m = multiplyTranslateY(m, v);\n }\n else if(k === TRANSLATE_Z) {\n m = multiplyTranslateZ(m, v);\n }\n else if(k === ROTATE_X) {\n m = multiplyRotateX(m, d2r(v));\n }\n else if(k === ROTATE_Y) {\n m = multiplyRotateY(m, d2r(v));\n }\n else if(k === ROTATE_Z) {\n m = multiplyRotateZ(m, d2r(v));\n }\n else if(k === SKEW_X) {\n m = multiplySkewX(m, d2r(v));\n }\n else if(k === SKEW_Y) {\n m = multiplySkewY(m, d2r(v));\n }\n else if(k === SCALE_X) {\n m = multiplyScaleX(m, v);\n }\n else if(k === SCALE_Y) {\n m = multiplyScaleY(m, v);\n }\n else if(k === SCALE_Z) {\n m = multiplyScaleZ(m, v);\n }\n // 这种写法要求ppt必须在开头\n else if(k === PERSPECTIVE && !i) {\n m = multiplyPerspective(m, v);\n }\n else if(k === ROTATE_3D) {\n let t = identity();\n calRotate3d(t, [v[0], v[1], v[2], v[3].v]);\n m = multiply(m, t);\n }\n else if(k === MATRIX) {\n m = multiply(m, v);\n }\n }\n return m;\n}\n\n// 已有计算好的变换矩阵,根据tfo原点计算最终的matrix\nfunction calMatrixByOrigin(m, ox, oy) {\n let res = m.slice(0);\n if(ox === 0 && oy === 0 || isE(m)) {\n return res;\n }\n res = tfoMultiply(ox, oy, res);\n res = multiplyTfo(res, -ox, -oy);\n return res;\n}\n\n// img缩放svg下专用,无rem\nfunction calMatrixWithOrigin(transform, ox, oy, ow, oh) {\n let m = calMatrix(transform, ow, oh);\n return calMatrixByOrigin(m, ox, oy);\n}\n\nfunction calSingleValue(k, v, ow, oh, root) {\n if(k === TRANSLATE_X || k === TRANSLATE_Y || k === TRANSLATE_Z) {\n if(v.u === PX) {\n return v.v;\n }\n else if(v.u === PERCENT) {\n return v.v * (k === TRANSLATE_Y ? oh : ow) * 0.01;\n }\n else if(v.u === REM) {\n return v.v * root.__computedStyle[FONT_SIZE];\n }\n else if(v.u === VW) {\n return v.v * root.width * 0.01;\n }\n else if(v.u === VH) {\n return v.v * root.height * 0.01;\n }\n else if(v.u === VMAX) {\n return v.v * Math.max(root.width, root.height) * 0.01;\n }\n else if(v.u === VMIN) {\n return v.v * Math.min(root.width, root.height) * 0.01;\n }\n }\n else if(k === MATRIX) {\n return v;\n }\n else if(k === ROTATE_3D) {\n return v;\n }\n return v.v;\n}\n\nfunction calPerspectiveMatrix(ppt, ox, oy) {\n if(ppt && ppt > 0) {\n let res = identity();\n ppt = Math.max(ppt, 1);\n res[11] = -1 / ppt;\n if(ox || oy) {\n res = tfoMultiply(ox, oy, res);\n res = multiplyTfo(res, -ox, -oy);\n }\n return res;\n }\n}\n\n// 是否有透视矩阵应用\nfunction isPerspectiveMatrix(m) {\n if(!m) {\n return;\n }\n return !!m[11];\n}\n\nexport default {\n calSingleValue,\n calMatrix,\n calRotateX,\n calRotateY,\n calRotateZ,\n calRotate3d,\n calPerspectiveMatrix,\n calMatrixByOrigin,\n calMatrixWithOrigin,\n isPerspectiveMatrix,\n};\n","import mode from '../refresh/mode';\nimport css from '../style/css';\nimport transform from '../style/transform';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport unit from '../style/unit';\nimport mx from '../math/matrix';\n\nconst { STYLE_KEY: {\n COLOR,\n FONT_WEIGHT,\n FONT_FAMILY,\n FONT_SIZE,\n FONT_STYLE,\n LETTER_SPACING,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n ROTATE_Z,\n LINE_HEIGHT,\n} } = enums;\nconst { DEG } = unit;\nconst { CANVAS, SVG, WEBGL } = mode;\n\nconst TuOrU = /[\\u{00A7}\\u{00A9}\\u{00AE}\\u{00B1}\\u{00BC}-\\u{00BE}\\u{00D7}\\u{00F7}\\u{02EA}-\\u{02EB}\\u{1100}-\\u{11FF}\\u{1401}-\\u{166C}\\u{166D}\\u{166E}\\u{166F}-\\u{167F}\\u{18B0}-\\u{18F5}\\u{18F6}-\\u{18FF}\\u{2016}\\u{2020}-\\u{2021}\\u{2030}-\\u{2031}\\u{203B}-\\u{203C}\\u{2042}\\u{2047}-\\u{2049}\\u{2051}\\u{2065}\\u{20DD}-\\u{20E0}\\u{20E2}-\\u{20E4}\\u{2100}-\\u{2101}\\u{2103}-\\u{2106}\\u{2107}\\u{2108}-\\u{2109}\\u{210F}\\u{2113}\\u{2114}\\u{2116}-\\u{2117}\\u{211E}-\\u{2123}\\u{2125}\\u{2127}\\u{2129}\\u{212E}\\u{2135}-\\u{2138}\\u{2139}\\u{213A}-\\u{213B}\\u{213C}-\\u{213F}\\u{2145}-\\u{2149}\\u{214A}\\u{214C}-\\u{214D}\\u{214F}\\u{2150}-\\u{215F}\\u{2160}-\\u{2182}\\u{2183}-\\u{2184}\\u{2185}-\\u{2188}\\u{2189}\\u{218C}-\\u{218F}\\u{221E}\\u{2234}-\\u{2235}\\u{2300}-\\u{2307}\\u{230C}-\\u{231F}\\u{2324}-\\u{2328}\\u{232B}\\u{237D}-\\u{239A}\\u{23BE}-\\u{23CD}\\u{23CF}\\u{23D1}-\\u{23DB}\\u{23E2}-\\u{23FF}\\u{2400}-\\u{2422}\\u{2424}-\\u{2426}\\u{2427}-\\u{243F}\\u{2440}-\\u{244A}\\u{244B}-\\u{245F}\\u{2460}-\\u{249B}\\u{249C}-\\u{24E9}\\u{24EA}-\\u{24FF}\\u{25A0}-\\u{25B6}\\u{25B7}\\u{25B8}-\\u{25C0}\\u{25C1}\\u{25C2}-\\u{25F7}\\u{25F8}-\\u{25FF}\\u{2600}-\\u{2619}\\u{2620}-\\u{266E}\\u{266F}\\u{2670}-\\u{26FF}\\u{2700}-\\u{2767}\\u{2776}-\\u{2793}\\u{2B12}-\\u{2B2F}\\u{2B50}-\\u{2B59}\\u{2B97}\\u{2BB8}-\\u{2BD1}\\u{2BD3}-\\u{2BEB}\\u{2BF0}-\\u{2BFF}\\u{2E50}-\\u{2E51}\\u{2E80}-\\u{2E99}\\u{2E9A}\\u{2E9B}-\\u{2EF3}\\u{2EF4}-\\u{2EFF}\\u{2F00}-\\u{2FD5}\\u{2FD6}-\\u{2FDF}\\u{2FE0}-\\u{2FEF}\\u{2FF0}-\\u{2FFB}\\u{2FFC}-\\u{2FFF}\\u{3000}\\u{3001}-\\u{3002}\\u{3003}\\u{3004}\\u{3005}\\u{3006}\\u{3007}\\u{3012}-\\u{3013}\\u{3020}\\u{3021}-\\u{3029}\\u{302A}-\\u{302D}\\u{302E}-\\u{302F}\\u{3031}-\\u{3035}\\u{3036}-\\u{3037}\\u{3038}-\\u{303A}\\u{303B}\\u{303C}\\u{303D}\\u{303E}-\\u{303F}\\u{3040}\\u{3041}\\u{3042}\\u{3043}\\u{3044}\\u{3045}\\u{3046}\\u{3047}\\u{3048}\\u{3049}\\u{304A}-\\u{3062}\\u{3063}\\u{3064}-\\u{3082}\\u{3083}\\u{3084}\\u{3085}\\u{3086}\\u{3087}\\u{3088}-\\u{308D}\\u{308E}\\u{308F}-\\u{3094}\\u{3095}-\\u{3096}\\u{3097}-\\u{3098}\\u{3099}-\\u{309A}\\u{309B}-\\u{309C}\\u{309D}-\\u{309E}\\u{309F}\\u{30A1}\\u{30A2}\\u{30A3}\\u{30A4}\\u{30A5}\\u{30A6}\\u{30A7}\\u{30A8}\\u{30A9}\\u{30AA}-\\u{30C2}\\u{30C3}\\u{30C4}-\\u{30E2}\\u{30E3}\\u{30E4}\\u{30E5}\\u{30E6}\\u{30E7}\\u{30E8}-\\u{30ED}\\u{30EE}\\u{30EF}-\\u{30F4}\\u{30F5}-\\u{30F6}\\u{30F7}-\\u{30FA}\\u{30FB}\\u{30FD}-\\u{30FE}\\u{30FF}\\u{3100}-\\u{3104}\\u{3105}-\\u{3126}\\u{3127}\\u{3128}-\\u{312F}\\u{3130}\\u{3131}-\\u{318E}\\u{318F}\\u{3190}-\\u{3191}\\u{3192}-\\u{3195}\\u{3196}-\\u{319F}\\u{31A0}-\\u{31BF}\\u{31C0}-\\u{31E3}\\u{31E4}-\\u{31EF}\\u{31F0}-\\u{31FF}\\u{3200}-\\u{321E}\\u{321F}\\u{3220}-\\u{3229}\\u{322A}-\\u{3247}\\u{3248}-\\u{324F}\\u{3250}\\u{3251}-\\u{325F}\\u{3260}-\\u{327F}\\u{3280}-\\u{3289}\\u{328A}-\\u{32B0}\\u{32B1}-\\u{32BF}\\u{32C0}-\\u{32FE}\\u{32FF}\\u{3300}-\\u{3357}\\u{3358}-\\u{337A}\\u{337B}-\\u{337F}\\u{3380}-\\u{33FF}\\u{3400}-\\u{4DBF}\\u{4DC0}-\\u{4DFF}\\u{4E00}-\\u{9FFF}\\u{A000}-\\u{A014}\\u{A015}\\u{A016}-\\u{A48C}\\u{A48D}-\\u{A48F}\\u{A490}-\\u{A4C6}\\u{A4C7}-\\u{A4CF}\\u{A960}-\\u{A97C}\\u{A97D}-\\u{A97F}\\u{AC00}-\\u{D7A3}\\u{D7A4}-\\u{D7AF}\\u{D7B0}-\\u{D7C6}\\u{D7C7}-\\u{D7CA}\\u{D7CB}-\\u{D7FB}\\u{D7FC}-\\u{D7FF}\\u{E000}-\\u{F8FF}\\u{F900}-\\u{FA6D}\\u{FA6E}-\\u{FA6F}\\u{FA70}-\\u{FAD9}\\u{FADA}-\\u{FAFF}\\u{FE10}-\\u{FE16}\\u{FE17}\\u{FE18}\\u{FE19}\\u{FE1A}-\\u{FE1F}\\u{FE30}\\u{FE31}-\\u{FE32}\\u{FE33}-\\u{FE34}\\u{FE35}\\u{FE36}\\u{FE37}\\u{FE38}\\u{FE39}\\u{FE3A}\\u{FE3B}\\u{FE3C}\\u{FE3D}\\u{FE3E}\\u{FE3F}\\u{FE40}\\u{FE41}\\u{FE42}\\u{FE43}\\u{FE44}\\u{FE45}-\\u{FE46}\\u{FE47}\\u{FE48}\\u{FE50}-\\u{FE52}\\u{FE53}\\u{FE54}-\\u{FE57}\\u{FE5F}-\\u{FE61}\\u{FE62}\\u{FE67}\\u{FE68}\\u{FE69}\\u{FE6A}-\\u{FE6B}\\u{FE6C}-\\u{FE6F}\\u{FF01}\\u{FF02}-\\u{FF03}\\u{FF04}\\u{FF05}-\\u{FF07}\\u{FF0A}\\u{FF0B}\\u{FF0C}\\u{FF0E}\\u{FF0F}\\u{FF10}-\\u{FF19}\\u{FF1F}\\u{FF20}\\u{FF21}-\\u{FF3A}\\u{FF3C}\\u{FF3E}\\u{FF40}\\u{FF41}-\\u{FF5A}\\u{FFE0}-\\u{FFE1}\\u{FFE2}\\u{FFE4}\\u{FFE5}-\\u{FFE6}\\u{FFE7}\\u{FFF0}-\\u{FFF8}\\u{FFFC}-\\u{FFFD}\\u{10980}-\\u{1099F}\\u{11580}-\\u{115AE}\\u{115AF}-\\u{115B1}\\u{115B2}-\\u{115B5}\\u{115B6}-\\u{115B7}\\u{115B8}-\\u{115BB}\\u{115BC}-\\u{115BD}\\u{115BE}\\u{115BF}-\\u{115C0}\\u{115C1}-\\u{115D7}\\u{115D8}-\\u{115DB}\\u{115DC}-\\u{115DD}\\u{115DE}-\\u{115FF}\\u{11A00}\\u{11A01}-\\u{11A0A}\\u{11A0B}-\\u{11A32}\\u{11A33}-\\u{11A38}\\u{11A39}\\u{11A3A}\\u{11A3B}-\\u{11A3E}\\u{11A3F}-\\u{11A46}\\u{11A47}\\u{11A48}-\\u{11A4F}\\u{11A50}\\u{11A51}-\\u{11A56}\\u{11A57}-\\u{11A58}\\u{11A59}-\\u{11A5B}\\u{11A5C}-\\u{11A89}\\u{11A8A}-\\u{11A96}\\u{11A97}\\u{11A98}-\\u{11A99}\\u{11A9A}-\\u{11A9C}\\u{11A9D}\\u{11A9E}-\\u{11AA2}\\u{11AA3}-\\u{11AAF}\\u{11AB0}-\\u{11ABF}\\u{13000}-\\u{1342E}\\u{1342F}\\u{13430}-\\u{13438}\\u{13439}-\\u{1343F}\\u{14400}-\\u{14646}\\u{14647}-\\u{1467F}\\u{16FE0}-\\u{16FE1}\\u{16FE2}\\u{16FE3}\\u{16FE4}\\u{16FE5}-\\u{16FEF}\\u{16FF0}-\\u{16FF1}\\u{16FF2}-\\u{16FFF}\\u{17000}-\\u{187F7}\\u{187F8}-\\u{187FF}\\u{18800}-\\u{18AFF}\\u{18B00}-\\u{18CD5}\\u{18CD6}-\\u{18CFF}\\u{18D00}-\\u{18D08}\\u{18D09}-\\u{18D7F}\\u{1AFF0}-\\u{1AFF3}\\u{1AFF4}\\u{1AFF5}-\\u{1AFFB}\\u{1AFFC}\\u{1AFFD}-\\u{1AFFE}\\u{1AFFF}\\u{1B000}-\\u{1B0FF}\\u{1B100}-\\u{1B122}\\u{1B123}-\\u{1B12F}\\u{1B130}-\\u{1B14F}\\u{1B150}-\\u{1B152}\\u{1B153}-\\u{1B163}\\u{1B164}-\\u{1B167}\\u{1B168}-\\u{1B16F}\\u{1B170}-\\u{1B2FB}\\u{1B2FC}-\\u{1B2FF}\\u{1CF00}-\\u{1CF2D}\\u{1CF2E}-\\u{1CF2F}\\u{1CF30}-\\u{1CF46}\\u{1CF47}-\\u{1CF4F}\\u{1CF50}-\\u{1CFC3}\\u{1CFC4}-\\u{1CFCF}\\u{1D000}-\\u{1D0F5}\\u{1D0F6}-\\u{1D0FF}\\u{1D100}-\\u{1D126}\\u{1D127}-\\u{1D128}\\u{1D129}-\\u{1D164}\\u{1D165}-\\u{1D166}\\u{1D167}-\\u{1D169}\\u{1D16A}-\\u{1D16C}\\u{1D16D}-\\u{1D172}\\u{1D173}-\\u{1D17A}\\u{1D17B}-\\u{1D182}\\u{1D183}-\\u{1D184}\\u{1D185}-\\u{1D18B}\\u{1D18C}-\\u{1D1A9}\\u{1D1AA}-\\u{1D1AD}\\u{1D1AE}-\\u{1D1EA}\\u{1D1EB}-\\u{1D1FF}\\u{1D2E0}-\\u{1D2F3}\\u{1D2F4}-\\u{1D2FF}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{1F700}-\\u{1F773}\\u{1F774}-\\u{1F77F}\\u{1F780}-\\u{1F7D8}\\u{1F7D9}-\\u{1F7DF}\\u{1F7E0}-\\u{1F7EB}\\u{1F7EC}-\\u{1F7EF}\\u{1F7F0}\\u{1F7F1}-\\u{1F7FF}\\u{1F900}-\\u{1F9FF}\\u{1FA00}-\\u{1FA53}\\u{1FA54}-\\u{1FA5F}\\u{1FA60}-\\u{1FA6D}\\u{1FA6E}-\\u{1FA6F}\\u{1FA70}-\\u{1FA74}\\u{1FA75}-\\u{1FA77}\\u{1FA78}-\\u{1FA7C}\\u{1FA7D}-\\u{1FA7F}\\u{1FA80}-\\u{1FA86}\\u{1FA87}-\\u{1FA8F}\\u{1FA90}-\\u{1FAAC}\\u{1FAAD}-\\u{1FAAF}\\u{1FAB0}-\\u{1FABA}\\u{1FABB}-\\u{1FABF}\\u{1FAC0}-\\u{1FAC5}\\u{1FAC6}-\\u{1FACF}\\u{1FAD0}-\\u{1FAD9}\\u{1FADA}-\\u{1FADF}\\u{1FAE0}-\\u{1FAE7}\\u{1FAE8}-\\u{1FAEF}\\u{1FAF0}-\\u{1FAF6}\\u{1FAF7}-\\u{1FAFF}\\u{20000}-\\u{2A6DF}\\u{2A6E0}-\\u{2A6FF}\\u{2A700}-\\u{2B738}\\u{2B739}-\\u{2B73F}\\u{2B740}-\\u{2B81D}\\u{2B81E}-\\u{2B81F}\\u{2B820}-\\u{2CEA1}\\u{2CEA2}-\\u{2CEAF}\\u{2CEB0}-\\u{2EBE0}\\u{2EBE1}-\\u{2F7FF}\\u{2F800}-\\u{2FA1D}\\u{2FA1E}-\\u{2FFFD}\\u{30000}-\\u{3134A}\\u{3134B}-\\u{3134F}\\u{31350}-\\u{3FFFD}]/u;\n\n/**\n * 表示一行文本的类,保存它的位置、内容、从属信息,在布局阶段生成,并在渲染阶段被Text调用render()\n * 关系上直属于Text类,一个Text类可能因为换行原因导致有多个TextBox,一行内容中也可能有不同Text从而不同TextBox\n * 另外本类还会被LineBoxManager添加到LineBox里,LineBox为一行中的inline/文本组合,之间需要进行垂直对齐\n * 在textOverflow为ellipsis时,可能会收到后面节点的向前回退(后面不足放下…),使得省略号发生在本节点\n */\nclass TextBox {\n constructor(parent, index, x, y, w, h, content, isUpright = false) {\n this.__parent = parent;\n this.__index = index;\n this.__x = x;\n this.__y = y;\n if(isUpright) {\n this.__width = h;\n this.__height = w;\n }\n else {\n this.__width = w;\n this.__height = h;\n }\n this.__content = content;\n this.__virtualDom = {};\n this.__parentLineBox = null;\n this.__isVertical = isUpright;\n }\n\n /**\n * 渲染阶段被Text类调用,多行Text会有多个TextBox,内容被分拆开\n * @param renderMode\n * @param ctx\n * @param computedStyle\n * @param cacheStyle Text父节点Dom的缓存样式,相比computedStyle可以直接用,比如color被缓存为style字符串\n * @param dx\n * @param dy\n */\n render(renderMode, ctx, computedStyle, cacheStyle, dx, dy) {\n let { content, x, y, parent, width, height, isUpright } = this;\n let dom = parent.__domParent;\n let b = css.getBaseline(computedStyle);\n let bv = css.getVerticalBaseline(computedStyle);\n // 垂直文本x/y互换,渲染时使用rotate模拟,因为是基于baseline绘制,顺时针90deg时tfo是文字左下角,\n // 它等同于lineHeight(现在的w)减去b\n if(isUpright) {\n x += bv;\n }\n else {\n y += b;\n }\n x += dx;\n y += dy;\n if(isUpright) {\n this.__endX = x;\n this.__endY = y + height;\n }\n else {\n this.__endX = x + width;\n this.__endY = y;\n }\n let {\n [LETTER_SPACING]: letterSpacing,\n [TEXT_STROKE_WIDTH]: textStrokeWidth,\n [TEXT_STROKE_COLOR]: textStrokeColor,\n [FONT_SIZE]: fontSize,\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n let i = 0, length = content.length;\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let me = dom.matrixEvent, list;\n let dev1 = 0, dev2 = 0;\n if(isUpright) {\n list = [\n { k: ROTATE_Z, v: { v: 90, u: DEG } },\n ];\n dev1 = bv * 0.6;\n dev2 = bv * 0.2;\n }\n let overFill = computedStyle[TEXT_STROKE_OVER] === 'fill';\n if(letterSpacing) {\n for(; i < length; i++) {\n let c = content.charAt(i);\n if(isUpright) {\n let cjk = TuOrU.test(c);\n if(cjk) {\n ctx.setTransform(me[0], me[1], me[4], me[5], me[12], me[13]);\n if(overFill) {\n ctx.fillText(c, x - dev1, y - dev2);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(c, x - dev1, y - dev2);\n }\n if(!overFill) {\n ctx.fillText(c, x - dev1, y - dev2);\n }\n }\n else {\n let m = transform.calMatrixWithOrigin(list, x, y, 0, 0);\n m = mx.multiply(me, m);\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n if(overFill) {\n ctx.fillText(c, x, y);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(c, x, y);\n }\n if(!overFill) {\n ctx.fillText(c, x, y);\n }\n }\n y += ctx.measureText(c).width + letterSpacing;\n }\n else {\n if(overFill) {\n ctx.fillText(c, x, y);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(c, x, y);\n }\n if(!overFill) {\n ctx.fillText(c, x, y);\n }\n x += ctx.measureText(c).width + letterSpacing;\n }\n }\n }\n else {\n if(isUpright) {\n let cjk = TuOrU.test(content.charAt(0)), last = 0, count = 0, len = content.length;\n for(let i = 1; i < len; i++) {\n let nowCjk = TuOrU.test(content.charAt(i));\n // 不相等时cjk发生变化,输出之前的内容,记录当下的所有\n if(nowCjk !== cjk) {\n if(cjk) {\n ctx.setTransform(me[0], me[1], me[4], me[5], me[12], me[13]);\n let s = content.slice(last, i);\n if(overFill) {\n ctx.fillText(s, x - dev1, y + count + b - dev2);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(s, x - dev1, y + count + b - dev2);\n }\n if(!overFill) {\n ctx.fillText(s, x - dev1, y + count + b - dev2);\n }\n count += fontSize;\n }\n else {\n let m = transform.calMatrixWithOrigin(list, x, y + count, 0, 0);\n m = mx.multiply(me, m);\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n let s = content.slice(last, i);\n if(overFill) {\n ctx.fillText(s, x, y + count);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(s, x, y + count);\n }\n if(!overFill) {\n ctx.fillText(s, x, y + count);\n }\n count += ctx.measureText(s).width;\n }\n last = i;\n cjk = !cjk;\n }\n // cjk单字符输出\n else if(nowCjk) {\n ctx.setTransform(me[0], me[1], me[4], me[5], me[12], me[13]);\n let s = content.slice(last, i);\n if(overFill) {\n ctx.fillText(s, x - dev1, y + count + b - dev2);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(s, x - dev1, y + count + b - dev2);\n }\n if(!overFill) {\n ctx.fillText(s, x - dev1, y + count + b - dev2);\n }\n count += fontSize;\n last = i;\n }\n }\n if(last < len) {\n let s = content.slice(last, len);\n // 最后的cjk只可能是一个字符\n if(cjk) {\n ctx.setTransform(me[0], me[1], me[4], me[5], me[12], me[13]);\n if(overFill) {\n ctx.fillText(s, x - dev1, y + count + b - dev2);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(s, x - dev1, y + count + b - dev2);\n }\n if(!overFill) {\n ctx.fillText(s, x - dev1, y + count + b - dev2);\n }\n }\n else {\n let m = transform.calMatrixWithOrigin(list, x, y + count, 0, 0);\n m = mx.multiply(me, m);\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n if(overFill) {\n ctx.fillText(s, x, y + count);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(s, x, y + count);\n }\n if(!overFill) {\n ctx.fillText(s, x, y + count);\n }\n }\n }\n }\n else {\n if(overFill) {\n ctx.fillText(content, x, y);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(content, x, y);\n }\n if(!overFill) {\n ctx.fillText(content, x, y);\n }\n }\n }\n }\n else if(renderMode === SVG) {\n let color = cacheStyle[COLOR];\n if(color.k) {\n color = dom.__gradient(renderMode, ctx, dom.__bx1, dom.__by1, dom.__bx2, dom.__by2, color, dx, dy).v;\n }\n // 垂直的svg以中线为基线,需偏移baseline和中线的差值\n if(isUpright) {\n x += lineHeight * 0.5 - bv;\n }\n let props = [\n ['x', x],\n ['y', y],\n ['fill', color],\n ['font-family', computedStyle[FONT_FAMILY]],\n ['font-weight', computedStyle[FONT_WEIGHT]],\n ['font-style', computedStyle[FONT_STYLE]],\n ['font-size', computedStyle[FONT_SIZE] + 'px'],\n ];\n // svg无法定义stroke的over\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n let textStrokeColor = cacheStyle[TEXT_STROKE_COLOR];\n // 渐变\n if(textStrokeColor.k) {\n textStrokeColor = dom.__gradient(renderMode, ctx, dom.__bx1, dom.__by1, dom.__bx2, dom.__by2, textStrokeColor, dx, dy).v;\n }\n props.push(['stroke', textStrokeColor]);\n props.push(['stroke-width', computedStyle[TEXT_STROKE_WIDTH]]);\n }\n if(letterSpacing) {\n props.push(['letter-spacing', letterSpacing]);\n }\n if(isUpright) {\n props.push(['writing-mode', 'vertical-lr']);\n }\n this.__virtualDom = {\n type: 'item',\n tagName: 'text',\n props,\n content: util.encodeHtml(content),\n };\n }\n }\n\n __offsetX(diff) {\n this.__x += diff;\n }\n\n __offsetY(diff) {\n this.__y += diff;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get endX() {\n return this.__endX;\n }\n\n get endY() {\n return this.__endY;\n }\n\n get width() {\n return this.__width;\n }\n\n get offsetWidth() {\n return this.__width;\n }\n\n get outerWidth() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get offsetHeight() {\n return this.__height;\n }\n\n get outerHeight() {\n return this.__height;\n }\n\n get content() {\n return this.__content;\n }\n\n get baseline() {\n return this.parent.baseline;\n }\n\n get verticalBaseline() {\n return this.parent.verticalBaseline;\n }\n\n get virtualDom() {\n return this.__virtualDom;\n }\n\n get parent() {\n return this.__parent;\n }\n\n get parentLineBox() {\n return this.__parentLineBox;\n }\n\n get isUpright() {\n return this.__isVertical;\n }\n}\n\nexport default TextBox;\n","import Node from './Node';\nimport mode from '../refresh/mode';\nimport css from '../style/css';\nimport unit from '../style/unit';\nimport transform from '../style/transform';\nimport enums from '../util/enums';\nimport mx from '../math/matrix';\n\nconst {\n STYLE_KEY: {\n FONT_SIZE,\n FONT_FAMILY,\n FONT_WEIGHT,\n FONT_STYLE,\n COLOR,\n LINE_HEIGHT,\n ROTATE_Z,\n },\n} = enums;\nconst { DEG } = unit;\nconst { CANVAS, SVG, WEBGL } = mode;\n\nconst CHAR = '…';\n\nclass Ellipsis extends Node {\n constructor(x, y, width, parent, isUpright) {\n super();\n this.__x = this.__x1 = x;\n this.__y = this.__y1 = y;\n this.__width = width;\n this.__parent = this.__domParent = parent;\n parent.__ellipsis = this;\n this.__parentLineBox = null;\n this.__baseline = css.getBaseline(parent.computedStyle);\n this.__isVertical = isUpright;\n }\n\n render(renderMode, ctx, dx = 0, dy = 0) {\n let { x, y, parent, isUpright } = this;\n let {\n computedStyle,\n cacheStyle: {\n [COLOR]: color,\n },\n } = parent;\n let b = css.getBaseline(computedStyle);\n let bv = css.getVerticalBaseline(computedStyle);\n if(isUpright) {\n x += bv;\n }\n else {\n y += b;\n }\n x += dx;\n y += dy;\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let font = css.setFontStyle(computedStyle);\n if(ctx.font !== font) {\n ctx.font = font;\n }\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n if(isUpright) {\n let me = parent.matrixEvent, list = [\n { k: ROTATE_Z, v: { v: 90, u: DEG } },\n ];\n let m = transform.calMatrixWithOrigin(list, x, y, 0, 0);\n m = mx.multiply(me, m);\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n }\n ctx.fillText(CHAR, x, y);\n }\n else if(renderMode === SVG) {\n // 垂直的svg以中线为基线,需偏移baseline和中线的差值\n if(isUpright) {\n x += computedStyle[LINE_HEIGHT] * 0.5 - bv;\n }\n let props = [\n ['x', x],\n ['y', y],\n ['fill', color],\n ['font-family', computedStyle[FONT_FAMILY]],\n ['font-weight', computedStyle[FONT_WEIGHT]],\n ['font-style', computedStyle[FONT_STYLE]],\n ['font-size', computedStyle[FONT_SIZE] + 'px'],\n ];\n if(isUpright) {\n props.push(['writing-mode', 'vertical-lr']);\n }\n let vd = this.__virtualDom = {\n type: 'text',\n children: [\n {\n type: 'item',\n tagName: 'text',\n props,\n content: CHAR,\n },\n ],\n };\n parent.virtualDom.children.push(vd);\n }\n }\n\n get parentLineBox() {\n return this.__parentLineBox;\n }\n\n get isUpright() {\n return this.__isVertical;\n }\n\n get isEllipsis() {\n return true;\n }\n}\n\nexport default Ellipsis;\n\n","import change from './change';\nimport enums from '../util/enums';\n\nconst { STYLE_KEY: {\n TRANSLATE_X: TX,\n TRANSLATE_Y: TY,\n TRANSLATE_Z: TZ,\n OPACITY: OP,\n FILTER: FT,\n PERSPECTIVE: PPT,\n PERSPECTIVE_ORIGIN,\n Z_INDEX,\n SCALE_X: SX,\n SCALE_Y: SY,\n SCALE_Z: SZ,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z: RZ,\n ROTATE_3D,\n SKEW_X,\n SKEW_Y,\n TRANSFORM: TF,\n TRANSFORM_ORIGIN,\n} } = enums;\n\nconst { isIgnore, isRepaint } = change;\n\n// 低位表示 0;\n },\n // 是否不包含value之外的\n exclude(lv, value) {\n return (lv | value) === value;\n },\n /**\n * 得出等级\n * @param k\n * @returns {number|*}\n */\n getLevel(k) {\n if(isIgnore(k)) {\n return NONE;\n }\n if(k === Z_INDEX) {\n return CACHE;\n }\n if(k === TX) {\n return TRANSLATE_X;\n }\n if(k === TY) {\n return TRANSLATE_Y;\n }\n if(k === TZ) {\n return TRANSLATE_Z;\n }\n if(k === RZ) {\n return ROTATE_Z;\n }\n if(k === SX) {\n return SCALE_X;\n }\n if(k === SY) {\n return SCALE_Y;\n }\n if(k === SZ) {\n return SCALE_Z;\n }\n if(k === OP) {\n return OPACITY;\n }\n if(k === FT) {\n return FILTER;\n }\n if(k === PPT || k === PERSPECTIVE_ORIGIN) {\n return PERSPECTIVE;\n }\n if(isTransforms(k)) {\n return TRANSFORM;\n }\n if(isRepaint(k)) {\n return REPAINT;\n }\n return REFLOW;\n },\n isReflow(lv) {\n return lv >= REFLOW;\n },\n isRepaint(lv) {\n return lv < REFLOW;\n },\n}, ENUM);\n\nexport default o;\n","import Node from './Node';\nimport TextBox from './TextBox';\nimport Ellipsis from './Ellipsis';\nimport mode from '../refresh/mode';\nimport css from '../style/css';\nimport unit from '../style/unit';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport level from '../refresh/level';\n\nconst {\n STYLE_KEY: {\n DISPLAY,\n POSITION,\n LINE_HEIGHT,\n FONT_SIZE,\n FONT_FAMILY,\n FONT_WEIGHT,\n COLOR,\n VISIBILITY,\n LETTER_SPACING,\n OVERFLOW,\n WHITE_SPACE,\n TEXT_OVERFLOW,\n WIDTH,\n HEIGHT,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n MARGIN_TOP,\n MARGIN_BOTTOM,\n MARGIN_LEFT,\n MARGIN_RIGHT,\n PADDING_TOP,\n PADDING_BOTTOM,\n PADDING_LEFT,\n PADDING_RIGHT,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_RIGHT_WIDTH,\n FILTER,\n },\n ELLIPSIS,\n} = enums;\n\nconst { AUTO } = unit;\nconst { CANVAS, SVG, WEBGL } = mode;\nconst { isFunction } = util;\n\n/**\n * 在给定宽度w的情况下,测量文字content多少个满足塞下,只支持水平书写,从start的索引开始,content长length\n * 尽可能地少的次数调用canvas的measureText或svg的html节点的width,因为比较消耗性能\n * 这就需要一种算法,不能逐字遍历看总长度是否超过,也不能单字宽度相加因为有文本整形某些字体多个字宽度不等于每个之和\n * 简单的2分法实现简单,但是次数稍多,对于性能不是最佳,因为内容的slice裁剪和传递给canvas测量都随尺寸增加而加大\n * 由于知道w和fontSize,因此能推测出平均值为fontSize/w,即字的个数,\n * 进行测量后得出w2,和真实w对比,产生误差d,再看d和fontSize推测差距个数,如此反复\n * 返回内容和end索引和长度,最少也要1个字符\n * @param ctx\n * @param renderMode\n * @param start\n * @param length\n * @param content\n * @param w\n * @param perW\n * @param fontFamily\n * @param fontSize\n * @param fontWeight\n * @param letterSpacing\n * @param isUpright\n */\nfunction measureLineWidth(ctx, renderMode, start, length, content, w, perW,\n fontFamily, fontSize, fontWeight, letterSpacing, isUpright) {\n if(start >= length) {\n // 特殊情况不应该走进这里\n return [0, 0, false];\n }\n let i = start, j = length, rw = 0, newLine = false;\n // 特殊降级,有letterSpacing时,canvas无法完全兼容,只能采取单字测量的方式完成\n if(letterSpacing && [CANVAS, WEBGL].indexOf(renderMode) > -1) {\n let count = 0;\n for(; i < j; i++) {\n let mw = ctx.measureText(content.charAt(i)).width + letterSpacing;\n if(count + mw > w + (1e-10)) {\n newLine = true;\n break;\n }\n count += mw;\n }\n return [i - start, count, newLine || count > w + (1e-10)];\n }\n // 没有letterSpacing或者是svg模式可以完美获取TextMetrics\n let hypotheticalNum = Math.round(w / perW);\n // 不能增长0个字符,至少也要1个\n if(hypotheticalNum <= 0) {\n hypotheticalNum = 1;\n }\n // 超过内容长度范围也不行\n else if(hypotheticalNum > length - start) {\n hypotheticalNum = length - start;\n }\n // 类似2分的一个循环\n while(i < j) {\n let mw, str = content.slice(start, start + hypotheticalNum);\n if(renderMode === CANVAS || renderMode === WEBGL) {\n mw = ctx.measureText(str).width;\n }\n else if(renderMode === SVG) {\n mw = inject.measureTextSync(str, fontFamily, fontSize, fontWeight, isUpright);\n }\n if(letterSpacing) {\n mw += hypotheticalNum * letterSpacing;\n }\n if(mw === w) {\n rw = w;\n newLine = true;\n break;\n }\n // 超出,设置右边界,并根据余量推测减少个数,\n // 因为精度问题,固定宽度或者累加的剩余空间,不用相等判断,而是为原本w宽度加一点点冗余1e-10\n if(mw > w + (1e-10)) {\n newLine = true;\n // 限制至少1个\n if(hypotheticalNum === 1) {\n rw = mw;\n break;\n }\n // 注意特殊判断i和j就差1个可直接得出结果,因为现在超了而-1不超肯定是-1的结果\n if(i === j - 1 || i - start === hypotheticalNum - 1) {\n hypotheticalNum = i - start;\n break;\n }\n j = hypotheticalNum + start - 1;\n let reduce = Math.round((mw - w) / perW);\n if(reduce <= 0) {\n reduce = 1;\n }\n hypotheticalNum -= reduce;\n if(hypotheticalNum < i - start) {\n hypotheticalNum = i - start;\n }\n }\n // 还有空余,设置左边界,并根据余量推测增加的个数\n else {\n rw = mw;\n if(hypotheticalNum === length - start) {\n break;\n }\n i = hypotheticalNum + start;\n let add = Math.round((w - mw) / perW);\n if(add <= 0) {\n add = 1;\n }\n hypotheticalNum += add;\n if(hypotheticalNum > j - start) {\n hypotheticalNum = j - start;\n }\n }\n }\n return [hypotheticalNum, rw, newLine];\n}\n\nfunction getFontKey(ff, fs, fw, ls) {\n return ff + '_' + fs + '_' + fw + '_' + ls;\n}\n\nclass Text extends Node {\n constructor(content) {\n super();\n this.__content = util.isNil(content) ? '' : content.toString();\n this.__textBoxes = [];\n this.__charWidth = 0; // 最小字符宽度(单个)\n this.__textWidth = 0; // 整体宽度\n this.__bp = null; // block父节点\n this.__widthHash = {}; // 存储当前字体样式key下的charWidth/textWidth\n this.__limitCache = false;\n this.__hasContent = false;\n }\n\n /**\n * text在virtual时和普通一样,无需特殊处理\n * endSpace由外界inline布局控制,末尾最后一行的空白mpb,包含递归情况,递归为多个嵌套末尾节点的空白mpb之和\n * 即便宽度不足,每行还是强制渲染一个字符,换行依据lx开始,因为x可能是从中间开始的,非inline则两个相等\n * 最后一个字符排版时要考虑末尾mpb,排不下的话回退删掉这个字符,如果最后一个字符另起开头,排不下也强制排,每行至少1个字符\n * 在textOverflow时很特殊,多个inline同行,回退可能到前一个inline节点,这个通过x和lx判断是否行首,决定至少1个字符规则\n * @param data\n * @private\n */\n __layoutFlow(data) {\n let __cache = this.__cache;\n if(__cache) {\n __cache.release();\n }\n let { x, y, w, h, lx = x, ly = y, lineBoxManager, endSpace = 0, lineClamp = 0, lineClampCount = 0, isUpright = false } = data;\n this.__x = this.__x1 = x;\n this.__y = this.__y1 = y;\n let { __isDestroyed, content, computedStyle, textBoxes, root } = this;\n textBoxes.splice(0);\n // 空内容w/h都为0可以提前跳出,lineClamp超出一般不会进这,但有特例flex文本垂直预计算时,所以也要跳出\n if(__isDestroyed || computedStyle[DISPLAY] === 'none' || !content || lineClamp && lineClampCount >= lineClamp) {\n return lineClampCount;\n }\n // 顺序尝试分割字符串为TextBox,形成多行,begin为每行起始索引,i是当前字符索引\n let i = 0;\n let length = content.length;\n let maxW = 0;\n let {\n [LINE_HEIGHT]: lineHeight,\n [LETTER_SPACING]: letterSpacing,\n [WHITE_SPACE]: whiteSpace,\n [FONT_SIZE]: fontSize,\n [FONT_WEIGHT]: fontWeight,\n [FONT_FAMILY]: fontFamily,\n } = computedStyle;\n let size = isUpright ? h : w;\n let beginSpace = isUpright ? (y - ly) : (x - lx); // x>=lx,当第一行非起始处时前面被prev节点占据,这个差值可认为是count宽度\n // 基于最近block父节点的样式\n let bp = this.domParent;\n while(bp.computedStyle[DISPLAY] === 'inline') {\n bp = bp.domParent;\n }\n this.__bp = bp;\n let textOverflow = bp.computedStyle[TEXT_OVERFLOW];\n // 布局测量前置,根据renderMode不同提供不同的测量方法\n let renderMode = root.renderMode;\n let ctx;\n if(renderMode === CANVAS || renderMode === WEBGL) {\n ctx = renderMode === WEBGL\n ? inject.getFontCanvas().ctx\n : root.ctx;\n ctx.font = css.setFontStyle(computedStyle);\n }\n // fontSize在中文是正好1个字宽度,英文不一定,等宽为2个,不等宽可能1~2个,特殊字符甚至>2个,取预估均值然后倒数得每个均宽0.8\n let perW = (fontSize * 0.8) + letterSpacing;\n let lineCount = 0;\n let mainCoords; // 根据书写模式指向不同x/y\n // 不换行特殊对待,同时考虑overflow和textOverflow\n if(whiteSpace === 'nowrap') {\n let isTextOverflow, textWidth = this.textWidth;\n let {\n [POSITION]: position,\n [OVERFLOW]: overflow,\n } = bp.computedStyle;\n let containerSize = bp.currentStyle[isUpright ? HEIGHT: WIDTH];\n // 只要是overflow隐藏,不管textOverflow如何(默认是clip等同于overflow:hidden的功能)都截取\n if(overflow === 'hidden') {\n // abs自适应宽度时不裁剪\n if(position === 'absolute' && containerSize.u === AUTO) {\n isTextOverflow = false;\n }\n else {\n isTextOverflow = textWidth > size + (1e-10) - beginSpace - endSpace;\n }\n }\n // ellipsis生效情况,本节点开始向前回退查找,尝试放下一部分字符\n if(isTextOverflow && textOverflow === 'ellipsis') {\n [mainCoords] = this.__lineBack(ctx, renderMode, i, length, content, size - endSpace - beginSpace, perW, x, y, maxW,\n endSpace, lineHeight, textBoxes, lineBoxManager, fontFamily, fontSize, fontWeight, letterSpacing, isUpright);\n lineCount++;\n if(isUpright) {\n x = mainCoords;\n }\n else {\n y = mainCoords;\n }\n }\n // 默认是否clip跟随overflow:hidden,无需感知,裁剪由dom做,这里不裁剪\n else {\n let textBox = new TextBox(this, textBoxes.length, x, y, textWidth, lineHeight,\n content, isUpright);\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox, false);\n if(isUpright) {\n x += lineHeight;\n }\n else {\n y += lineHeight;\n }\n if(isTextOverflow) {\n lineCount++;\n }\n }\n // 和html一样,maxW此时在html是满格\n maxW = textWidth;\n }\n // 普通换行,注意x和lx的区别,可能相同(block起始处)可能不同(非起始处),第1行从x开始,第2行及以后都从lx开始\n // 然后第一次换行还有特殊之处,可能同一行前半部行高很大,此时y增加并非自身的lineHeight,而是整体LineBox的\n else {\n while(i < length) {\n let limit = i ? size : (size - beginSpace);\n if(lineClamp && lineCount + lineClampCount >= lineClamp - 1) {\n limit -= endSpace;\n }\n let [num, rw, newLine] = measureLineWidth(ctx, renderMode, i, length, content, limit, perW,\n fontFamily, fontSize, fontWeight, letterSpacing);\n // 多行文本截断,这里肯定需要回退,注意防止恰好是最后一个字符,此时无需截取\n if(lineClamp && newLine && lineCount + lineClampCount >= lineClamp - 1 && i + num < length) {\n [mainCoords, maxW] = this.__lineBack(ctx, renderMode, i, i + num, content, limit - endSpace, perW,\n lineCount ? lx : x, y, maxW, endSpace, lineHeight, textBoxes, lineBoxManager,\n fontFamily, fontSize, fontWeight, letterSpacing, isUpright);\n lineCount++;\n if(isUpright) {\n x = mainCoords;\n }\n else {\n y = mainCoords;\n }\n break;\n }\n // 最后一行考虑endSpace,可能不够需要回退,但不能是1个字符\n if(i + num === length && endSpace && rw + endSpace > limit + (1e-10) && num > 1) {\n [num, rw, newLine] = measureLineWidth(ctx, renderMode, i, length, content, limit - endSpace, perW,\n fontFamily, fontSize, fontWeight, letterSpacing);\n // 可能加上endSpace后超过了,还得再判断一次\n if(lineClamp && newLine && lineCount + lineClampCount >= lineClamp - 1) {\n [mainCoords, maxW] = this.__lineBack(ctx, renderMode, i, i + num, content, limit - endSpace, perW,\n lineCount ? lx : x, y, maxW, endSpace, lineHeight, textBoxes, lineBoxManager,\n fontFamily, fontSize, fontWeight, letterSpacing, isUpright);\n lineCount++;\n if(isUpright) {\n x = mainCoords;\n }\n else {\n y = mainCoords;\n }\n break;\n }\n }\n maxW = Math.max(maxW, rw);\n // 根据是否第一行分开处理行首空白\n let textBox = new TextBox(this, textBoxes.length,\n lineCount && !isUpright ? lx : x,\n lineCount && isUpright ? ly : y,\n rw, lineHeight, content.slice(i, i + num), isUpright);\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox, newLine);\n // 竖排横排换行不一样\n if(isUpright) {\n x += Math.max(lineHeight, lineBoxManager.verticalLineHeight);\n }\n else {\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n }\n // 至少也要1个字符形成1行,哪怕是首行,因为是否放得下逻辑在dom中做过了\n i += num;\n if(newLine) {\n lineCount++;\n }\n }\n // 换行后Text的x重设为lx\n if(lineCount) {\n if(isUpright) {\n this.__y = this.__y1 = ly;\n }\n else {\n this.__x = this.__x1 = lx;\n }\n }\n }\n if(isUpright) {\n this.__width = x - data.x;\n this.__height = maxW;\n this.__verticalBaseline = css.getVerticalBaseline(computedStyle);\n }\n else {\n this.__width = maxW;\n this.__height = y - data.y;\n this.__baseline = css.getBaseline(computedStyle);\n }\n return lineClampCount + lineCount;\n }\n\n __layoutNone() {\n this.__width = this.__height = this.__baseline = this.__verticalBaseline = 0;\n this.__textBoxes.splice(0);\n }\n\n // 末尾行因ellipsis的缘故向前回退字符生成textBox,可能会因不满足宽度导致无法生成,此时向前继续回退TextBox\n __lineBack(ctx, renderMode, i, length, content, limit, perW, x, y, maxW, endSpace, lineHeight, textBoxes, lineBoxManager,\n fontFamily, fontSize, fontWeight, letterSpacing, isUpright) {\n let ew, bp = this.__bp, computedStyle = bp.computedStyle;\n // 临时测量ELLIPSIS的尺寸\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let font = css.setFontStyle(computedStyle);\n if(ctx.font !== font) {\n ctx.font = font;\n }\n ew = ctx.measureText(ELLIPSIS).width;\n }\n else {\n ew = inject.measureTextSync(ELLIPSIS, computedStyle[FONT_FAMILY], computedStyle[FONT_SIZE], computedStyle[FONT_WEIGHT]);\n }\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let font = css.setFontStyle(this.computedStyle);\n if (ctx.font !== font) {\n ctx.font = font;\n }\n }\n let [num, rw] = measureLineWidth(ctx, renderMode, i, length, content, limit - ew - endSpace, perW, fontFamily, fontSize, fontWeight, letterSpacing);\n // 还是不够,需要回溯查找前一个inline节点继续回退,同时防止空行首,要至少一个textBox且一个字符\n if(rw + ew > limit + (1e-10) - endSpace) {\n // 向前回溯已有的tb,需注意可能是新行开头这时还没生成新的lineBox,而旧行则至少1个内容\n // 新行的话进不来,会添加上面num的内容,旧行不添加只修改之前的tb内容也有可能删除一些\n let lineBox = lineBoxManager.lineBox;\n if(!lineBoxManager.isNewLine && lineBox && lineBox.size) {\n let list = lineBox.list;\n for(let j = list.length - 1; j >= 0; j--) {\n let tb = list[j];\n // 可能是个inlineBlock,整个省略掉,除非是第一个不作ellipsis处理\n if(!(tb instanceof TextBox)) {\n if(!j) {\n break;\n }\n let item = list.pop();\n if(isUpright) {\n y -= item.outerHeight;\n }\n else {\n x -= item.outerWidth;\n }\n limit += isUpright ? item.outerHeight : item.outerWidth;\n item.__layoutNone();\n continue;\n }\n // 先判断整个tb都删除是否可以容纳下,同时注意第1个tb不能删除因此必进\n let { content, width, height, parent } = tb;\n if(!j || limit >= width + ew + (1e-10) + endSpace) {\n let length = content.length;\n let {\n [LINE_HEIGHT]: lineHeight,\n [LETTER_SPACING]: letterSpacing,\n [FONT_SIZE]: fontSize,\n [FONT_WEIGHT]: fontWeight,\n [FONT_FAMILY]: fontFamily,\n } = parent.computedStyle;\n if(renderMode === CANVAS || renderMode === WEBGL) {\n ctx.font = css.setFontStyle(parent.computedStyle);\n }\n // 再进行查找,这里也会有至少一个字符不用担心\n let [num, rw] = measureLineWidth(ctx, renderMode, 0, length, content, limit - ew + width - endSpace, perW, fontFamily, fontSize, fontWeight, letterSpacing);\n // 可能发生x回退,当tb的内容产生减少时\n if(num !== content.length) {\n tb.__content = content.slice(0, num);\n if(isUpright) {\n y -= height - rw;\n tb.__height = rw;\n }\n else {\n x -= width - rw;\n tb.__width = rw;\n }\n }\n // 重新设置lineHeight和baseline,因为可能删除了东西\n lineBox.__resetLb(computedStyle[LINE_HEIGHT],\n isUpright ? css.getVerticalBaseline(computedStyle) : css.getBaseline(computedStyle));\n let ep = isUpright\n ? new Ellipsis(x, y + rw + endSpace, ew, bp, isUpright)\n : new Ellipsis(x + rw + endSpace, y, ew, bp, isUpright);\n lineBoxManager.addItem(ep, true);\n if(isUpright) {\n x += Math.max(lineHeight, lineBoxManager.verticalLineHeight);\n }\n else {\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n }\n maxW = Math.max(maxW, rw + ew);\n return [y, maxW];\n }\n // 舍弃这个tb,x也要向前回退,w增加,这会发生在ELLIPSIS字体很大,里面内容字体很小时\n let item = list.pop();\n if(isUpright) {\n limit += height;\n y -= height;\n }\n else {\n limit += width;\n x -= width;\n }\n let tbs = item.parent.textBoxes;\n let k = tbs.indexOf(item);\n if(k > -1) {\n tbs.splice(k, 1);\n }\n // 还得去掉dom,防止inline嵌套一直向上,同时得判断不能误删前面一个的dom\n let dom = item.parent.parent;\n let prev = list[list.length - 1];\n if(prev instanceof TextBox) {\n prev = prev.parent.parent;\n }\n while(dom !== bp && dom !== prev) {\n let contentBoxList = dom.contentBoxList || [];\n let i = contentBoxList.indexOf(item);\n if(i > -1) {\n contentBoxList.splice(i, 1);\n }\n let computedStyle = dom.computedStyle;\n if(isUpright) {\n let mbp = computedStyle[MARGIN_TOP] + computedStyle[MARGIN_BOTTOM]\n + computedStyle[PADDING_TOP] + computedStyle[PADDING_BOTTOM]\n + computedStyle[BORDER_TOP_WIDTH] + computedStyle[BORDER_BOTTOM_WIDTH];\n y -= mbp;\n limit += mbp;\n }\n else {\n let mbp = computedStyle[MARGIN_LEFT] + computedStyle[MARGIN_RIGHT]\n + computedStyle[PADDING_LEFT] + computedStyle[PADDING_RIGHT]\n + computedStyle[BORDER_LEFT_WIDTH] + computedStyle[BORDER_RIGHT_WIDTH];\n x -= mbp;\n limit += mbp;\n }\n dom.__layoutNone();\n dom = dom.domParent;\n }\n let contentBoxList = prev.contentBoxList || [];\n let i = contentBoxList.indexOf(item);\n if(i > -1) {\n contentBoxList.splice(i, 1);\n }\n }\n }\n }\n // 本次回退不用向前追溯删除textBox会进这里,最少一个字符兜底\n let textBox = new TextBox(this, textBoxes.length, x, y, rw, lineHeight, content.slice(i, i + num), isUpright);\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox, false);\n // ELLIPSIS也作为内容加入,但特殊的是指向最近block使用其样式渲染\n let ep = isUpright\n ? new Ellipsis(x, y + rw + endSpace, ew, bp, isUpright)\n : new Ellipsis(x + rw + endSpace, y, ew, bp, isUpright);\n lineBoxManager.addItem(ep, true);\n if(isUpright) {\n x += Math.max(lineHeight, lineBoxManager.verticalLineHeight);\n }\n else {\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n }\n maxW = Math.max(maxW, rw + ew);\n return [isUpright ? x : y, maxW];\n }\n\n // 外部dom换行发现超行,且一定是ellipsis时,会进这里让上一行text回退,lineBox一定有值且最后一个一定是本text的最后的textBox\n __backtrack(bp, lineBoxManager, lineBox, textBox, limit, endSpace, ew, computedStyle, ctx, renderMode, isUpright) {\n let list = lineBox.list;\n for(let j = list.length - 1; j >= 0; j--) {\n let tb = list[j];\n // 可能是个inlineBlock,整个省略掉,除非是第一个不作ellipsis处理\n if(!(tb instanceof TextBox)) {\n if(!j) {\n break;\n }\n let item = list.pop();\n limit += isUpright ? item.outerHeight : item.outerWidth;\n item.__layoutNone();\n continue;\n }\n // 先判断整个tb都删除是否可以容纳下,同时注意第1个tb不能删除因此必进\n let { content, width, height, parent } = tb;\n if(!j || limit >= width + ew + (1e-10) + endSpace) {\n let length = content.length;\n let {\n [LETTER_SPACING]: letterSpacing,\n [FONT_SIZE]: fontSize,\n [FONT_WEIGHT]: fontWeight,\n [FONT_FAMILY]: fontFamily,\n } = parent.computedStyle;\n if(renderMode === CANVAS || renderMode === WEBGL) {\n ctx.font = css.setFontStyle(parent.computedStyle);\n }\n let perW = (fontSize * 0.8) + letterSpacing;\n // 再进行查找,这里也会有至少一个字符不用担心\n let [num, rw] = measureLineWidth(ctx, renderMode, 0, length, content, limit - ew - endSpace + width, perW, fontFamily, fontSize, fontWeight, letterSpacing);\n // 可能发生x回退,当tb的内容产生减少时\n if(num !== content.length) {\n tb.__content = content.slice(0, num);\n if(isUpright) {\n tb.__height = rw;\n }\n else {\n tb.__width = rw;\n }\n }\n // 重新设置lineHeight和baseline,因为可能删除了东西\n lineBox.__resetLb(computedStyle[LINE_HEIGHT],\n isUpright ? css.getVerticalBaseline(computedStyle) : css.getBaseline(computedStyle));\n let ep = isUpright\n ? new Ellipsis(tb.x, tb.y + rw + endSpace, ew, bp, isUpright)\n : new Ellipsis(tb.x + rw + endSpace, tb.y, ew, bp, isUpright);\n lineBoxManager.addItem(ep, true);\n return;\n }\n // 舍弃这个tb,x也要向前回退,w增加,这会发生在ELLIPSIS字体很大,里面内容字体很小时\n let item = list.pop();\n limit += isUpright ? height : width;\n let tbs = item.parent.textBoxes;\n let k = tbs.indexOf(item);\n if(k > -1) {\n tbs.splice(k, 1);\n }\n // 还得去掉dom,防止inline嵌套一直向上,同时得判断不能误删前面一个的dom\n let dom = item.parent.parent;\n let prev = list[list.length - 1];\n if(prev instanceof TextBox) {\n prev = prev.parent.parent;\n }\n while(dom !== bp && dom !== prev) {\n let contentBoxList = dom.contentBoxList || [];\n let i = contentBoxList.indexOf(item);\n if(i > -1) {\n contentBoxList.splice(i, 1);\n }\n let computedStyle = dom.computedStyle;\n if(isUpright) {\n let mbp = computedStyle[MARGIN_TOP] + computedStyle[MARGIN_BOTTOM]\n + computedStyle[PADDING_TOP] + computedStyle[PADDING_BOTTOM]\n + computedStyle[BORDER_TOP_WIDTH] + computedStyle[BORDER_BOTTOM_WIDTH];\n limit += mbp;\n }\n else {\n let mbp = computedStyle[MARGIN_LEFT] + computedStyle[MARGIN_RIGHT]\n + computedStyle[PADDING_LEFT] + computedStyle[PADDING_RIGHT]\n + computedStyle[BORDER_LEFT_WIDTH] + computedStyle[BORDER_RIGHT_WIDTH];\n limit += mbp;\n }\n dom.__layoutNone();\n dom = dom.domParent;\n }\n let contentBoxList = prev.contentBoxList || [];\n let i = contentBoxList.indexOf(item);\n if(i > -1) {\n contentBoxList.splice(i, 1);\n }\n }\n }\n\n __offsetX(diff, isLayout) {\n super.__offsetX(diff, isLayout);\n if(isLayout) {\n this.textBoxes.forEach(item => {\n item.__offsetX(diff);\n });\n }\n this.__x1 += diff;\n }\n\n __offsetY(diff, isLayout) {\n super.__offsetY(diff, isLayout);\n if(isLayout) {\n this.textBoxes.forEach(item => {\n item.__offsetY(diff);\n });\n }\n this.__y1 += diff;\n }\n\n __tryLayInline(total) {\n return total - this.firstCharWidth;\n }\n\n __inlineSize(isUpright) {\n let min, max;\n this.textBoxes.forEach((item, i) => {\n if(i) {\n min = Math.min(min, isUpright ? item.y : item.x);\n max = Math.max(max, (isUpright ? item.y : item.x) + item.width);\n }\n else {\n min = isUpright ? item.y : item.x;\n max = (isUpright ? item.y : item.x) + item.width;\n }\n });\n if(isUpright) {\n this.__y = this.__y1 = min;\n this.__x = this.__x1;\n this.__height = max - min;\n }\n else {\n this.__x = this.__x1 = min;\n this.__y = this.__y1;\n this.__width = max - min;\n }\n }\n\n render(renderMode, ctx, dx = 0, dy = 0) {\n let { __isDestroyed, computedStyle, textBoxes, cacheStyle } = this;\n if(renderMode === SVG) {\n this.__virtualDom = {\n type: 'text',\n children: [],\n };\n }\n // >=REPAINT清空bbox\n this.__bbox = null;\n this.__filterBbox = null;\n if(__isDestroyed || computedStyle[DISPLAY] === 'none' || computedStyle[VISIBILITY] === 'hidden'\n || !textBoxes.length) {\n this.__hasContent = false;\n return;\n }\n this.__hasContent = true;\n if(renderMode === WEBGL) {\n return;\n }\n if(renderMode === CANVAS) {\n let font = css.setFontStyle(computedStyle);\n if(ctx.font !== font) {\n ctx.font = font;\n }\n let color = cacheStyle[COLOR];\n // 渐变\n if(color.k) {\n let dom = this.parent;\n color = dom.__gradient(renderMode, ctx, dom.__bx1, dom.__by1, dom.__bx2, dom.__by2, color, dx, dy).v;\n }\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n let strokeWidth = computedStyle[TEXT_STROKE_WIDTH];\n if(ctx.lineWidth !== strokeWidth) {\n ctx.lineWidth = strokeWidth;\n }\n let textStrokeColor = cacheStyle[TEXT_STROKE_COLOR];\n // 渐变\n if(textStrokeColor.k) {\n let dom = this.parent;\n textStrokeColor = dom.__gradient(renderMode, ctx, dom.__bx1, dom.__by1, dom.__bx2, dom.__by2, textStrokeColor, dx, dy).v;\n }\n if(ctx.strokeStyle !== textStrokeColor) {\n ctx.strokeStyle = textStrokeColor;\n }\n }\n // 可能为空,整个是个ellipsis\n textBoxes.forEach(item => {\n item.render(renderMode, ctx, computedStyle, cacheStyle, dx, dy);\n });\n if(renderMode === SVG) {\n this.__virtualDom.children = textBoxes.map(textBox => textBox.virtualDom);\n }\n }\n\n __destroy() {\n if(this.__isDestroyed) {\n return;\n }\n super.__destroy();\n let __cache = this.__cache;\n if(__cache) {\n __cache.release();\n }\n }\n\n getComputedStyle(key) {\n return this.__domParent.getComputedStyle(key);\n }\n\n updateContent(s, cb) {\n if(s === this.__content || this.__isDestroyed) {\n this.__content = s;\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n this.__content = s;\n this.__root.__addUpdate(this.__domParent, null, level.REFLOW, null, null, null, cb);\n }\n\n remove(cb) {\n let { __root: root } = this;\n let parent = this.isShadowRoot ? this.hostRoot.__parent: this.__parent;\n let i;\n if(parent) {\n let target = this.isShadowRoot ? this.hostRoot : this;\n i = parent.__children.indexOf(target);\n parent.__children.splice(i, 1);\n i = parent.__zIndexChildren.indexOf(target);\n parent.__zIndexChildren.splice(i, 1);\n let { __prev, __next } = this;\n if(__prev) {\n __prev.__next = __next;\n }\n if(__next) {\n __next.__prev = __prev;\n }\n }\n if(this.__isDestroyed) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n parent.__deleteStruct(this, i);\n // 不可见仅改变数据结构\n if(this.computedStyle[DISPLAY] === 'none') {\n this.__destroy();\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 可见在reflow逻辑做结构关系等,text视为父变更\n root.__addUpdate(this, null, level.REFLOW, null, true, null, cb);\n }\n\n get content() {\n return this.__content;\n }\n\n set content(v) {\n this.__content = v;\n }\n\n get textBoxes() {\n return this.__textBoxes;\n }\n\n get charWidth() {\n let { __widthHash, content, computedStyle, root: { ctx, renderMode } } = this;\n let {\n [FONT_FAMILY]: fontFamily,\n [FONT_SIZE]: fontSize,\n [FONT_WEIGHT]: fontWeight,\n [LETTER_SPACING]: letterSpacing,\n } = computedStyle;\n let fontKey = getFontKey(fontFamily, fontSize, fontWeight, letterSpacing);\n if(!__widthHash.hasOwnProperty(fontKey)) {\n __widthHash[fontKey] = {};\n }\n let o = __widthHash[fontKey];\n if(!o.hasOwnProperty('charWidth')) {\n let max = 0;\n if(renderMode === CANVAS || renderMode === WEBGL) {\n if(renderMode === WEBGL) {\n ctx = inject.getFontCanvas().ctx;\n }\n ctx.font = css.setFontStyle(computedStyle);\n for(let i = 0, len = content.length; i < len; i++) {\n max = Math.max(max, ctx.measureText(content.charAt([i])).width);\n }\n }\n else if(renderMode === SVG) {\n max = inject.measureTextListMax(content, fontFamily, fontSize, fontWeight);\n }\n o.charWidth = max + letterSpacing;\n }\n return o.charWidth;\n }\n\n get firstCharWidth() {\n let { __widthHash, content, computedStyle, root: { ctx, renderMode } } = this;\n let {\n [FONT_FAMILY]: fontFamily,\n [FONT_SIZE]: fontSize,\n [FONT_WEIGHT]: fontWeight,\n [LETTER_SPACING]: letterSpacing,\n } = computedStyle;\n let fontKey = getFontKey(fontFamily, fontSize, fontWeight, letterSpacing);\n if(!__widthHash.hasOwnProperty(fontKey)) {\n __widthHash[fontKey] = {};\n }\n let o = __widthHash[fontKey];\n if(!o.hasOwnProperty('firstCharWidth')) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n if(renderMode === WEBGL) {\n ctx = inject.getFontCanvas().ctx;\n }\n ctx.font = css.setFontStyle(computedStyle);\n o.firstCharWidth = ctx.measureText(content.charAt(0)).width + letterSpacing;\n }\n else if(renderMode === SVG) {\n o.firstCharWidth = inject.measureTextSync(content.charAt(0), fontFamily, fontSize, fontWeight) + letterSpacing;\n }\n }\n return o.firstCharWidth;\n }\n\n get textWidth() {\n let { __widthHash, content, computedStyle, root: { ctx, renderMode } } = this;\n let {\n [FONT_FAMILY]: fontFamily,\n [FONT_SIZE]: fontSize,\n [FONT_WEIGHT]: fontWeight,\n [LETTER_SPACING]: letterSpacing,\n } = computedStyle;\n let fontKey = getFontKey(fontFamily, fontSize, fontWeight, letterSpacing);\n if(!__widthHash.hasOwnProperty(fontKey)) {\n __widthHash[fontKey] = {};\n }\n let o = __widthHash[fontKey];\n if(!o.hasOwnProperty('textWidth')) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n if(renderMode === WEBGL) {\n ctx = inject.getFontCanvas().ctx;\n }\n ctx.font = css.setFontStyle(computedStyle);\n o.textWidth = ctx.measureText(content).width + letterSpacing * content.length;\n }\n else if(renderMode === SVG) {\n o.textWidth = inject.measureTextSync(content, fontFamily, fontSize, fontWeight) + letterSpacing * content.length;\n }\n }\n return o.textWidth;\n }\n\n get clientWidth() {\n return this.__width || 0;\n }\n\n get clientHeight() {\n return this.__height || 0;\n }\n\n get offsetWidth() {\n return this.__width || 0;\n }\n\n get offsetHeight() {\n return this.__height || 0;\n }\n\n get outerWidth() {\n return this.__width || 0;\n }\n\n get outerHeight() {\n return this.__height || 0;\n }\n\n get root() {\n return this.__domParent.__root;\n }\n\n get currentStyle() {\n return this.__domParent.__currentStyle;\n }\n\n get __currentStyle() {\n return this.__domParent.__currentStyle;\n }\n\n get style() {\n return this.__domParent.__style;\n }\n\n get computedStyle() {\n return this.__domParent.__computedStyle;\n }\n\n get __computedStyle() {\n return this.__domParent.__computedStyle;\n }\n\n get cacheStyle() {\n return this.__domParent.__cacheStyle;\n }\n\n get __cacheStyle() {\n return this.__domParent.__cacheStyle;\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n __x1, __y1, width, height,\n computedStyle: {\n [TEXT_STROKE_WIDTH]: textStrokeWidth,\n },\n } = this;\n // 文字描边暂时不清楚最大值是多少,影响不确定,先按描边宽算,因为会出现>>0.5宽的情况\n let half = textStrokeWidth;\n this.__bbox = [__x1 - half, __y1 - half, __x1 + width + half, __y1 + height + half];\n }\n return this.__bbox;\n }\n\n get filterBbox() {\n if(!this.__filterBbox) {\n let bbox = this.__bbox || this.bbox;\n let filter = this.computedStyle[FILTER];\n this.__filterBbox = css.spreadFilter(bbox, filter);\n }\n return this.__filterBbox;\n }\n\n get isShadowRoot() {\n return !this.__parent && this.__host && this.__host !== this.root;\n }\n\n get matrix() {\n return this.__domParent.__matrix;\n }\n\n get matrixEvent() {\n return this.__domParent.__matrixEvent;\n }\n\n get perspectiveMatrix() {\n return this.__domParent.__perspectiveMatrix;\n }\n}\n\nexport default Text;\n","import util from './util';\n\nconst { isFunction } = util;\n\nclass Event {\n constructor() {\n this.__eHash = {};\n }\n\n on(id, handle) {\n if(!isFunction(handle)) {\n return;\n }\n let self = this;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.on(id[i], handle);\n }\n }\n else {\n if(!self.__eHash.hasOwnProperty(id)) {\n self.__eHash[id] = [];\n }\n // 遍历防止此handle被侦听过了\n for(let i = 0, item = self.__eHash[id], len = item.length; i < len; i++) {\n if(item[i] === handle) {\n return self;\n }\n }\n self.__eHash[id].push(handle);\n }\n return self;\n }\n\n once(id, handle) {\n if(!isFunction(handle)) {\n return;\n }\n let self = this;\n\n // 包裹一层会导致添加后删除对比引用删不掉,需保存原有引用进行对比\n function cb(...data) {\n handle.apply(self, data);\n self.off(id, cb);\n }\n\n cb.__karasEventCb = handle;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.once(id[i], handle);\n }\n }\n else if(handle) {\n self.on(id, cb);\n }\n return this;\n }\n\n off(id, handle) {\n let self = this;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.off(id[i], handle);\n }\n }\n else if(self.__eHash.hasOwnProperty(id)) {\n if(handle) {\n for(let i = 0, item = self.__eHash[id], len = item.length; i < len; i++) {\n // 需考虑once包裹的引用对比\n if(item[i] === handle || item[i].__karasEventCb === handle) {\n item.splice(i, 1);\n break;\n }\n }\n }\n // 未定义为全部清除\n else {\n delete self.__eHash[id];\n }\n }\n return this;\n }\n\n emit(id, ...data) {\n let self = this;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.emit(id[i], data);\n }\n }\n else {\n if(self.__eHash.hasOwnProperty(id)) {\n let list = self.__eHash[id];\n if(list.length) {\n list = list.slice();\n for(let i = 0, len = list.length; i < len; i++) {\n let cb = list[i];\n if(isFunction(cb)) {\n cb.apply(self, data);\n }\n }\n }\n }\n }\n return this;\n }\n\n static mix(...obj) {\n for(let i = obj.length - 1; i >= 0; i--) {\n let o = obj[i];\n let event = new Event();\n o.__eHash = {};\n let fns = ['on', 'once', 'off', 'emit'];\n for(let j = fns.length - 1; j >= 0; j--) {\n let fn = fns[j];\n o[fn] = event[fn];\n }\n }\n }\n\n static REFRESH = 'refresh';\n static PAUSE = 'pause';\n static PLAY = 'play';\n static FRAME = 'frame';\n static FINISH = 'finish';\n static CANCEL = 'cancel';\n static BEGIN = 'begin';\n static END = 'end';\n}\n\nexport default Event;\n","import Node from './Node';\nimport Text from './Text';\nimport Event from '../util/Event';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport css from '../style/css';\nimport change from '../refresh/change';\n\nconst { isNil, isFunction, extend } = util;\n\nconst REGISTER = {};\n\nclass Component extends Event {\n constructor(props = {}) {\n super();\n this.__tagName = /(?:function|class)\\s+([\\w$]+)/.exec(this.constructor.toString())[1];\n // 构建工具中都是arr,手写可能出现hash情况\n if(Array.isArray(props)) {\n this.props = util.arr2hash(props);\n }\n else {\n this.props = props;\n }\n this.__parent = null;\n this.__host = null;\n this.__ref = {};\n this.__isMounted = false;\n this.__taskList = [];\n }\n\n /**\n * build中调用初始化,处理过flatten\n */\n __init() {\n this.__ref = {};\n let sr = this.__shadowRoot;\n if(sr instanceof Text) {\n // 文字视作为父节点的直接文字子节点\n }\n else if(sr instanceof Node) {\n let style = css.normalize(this.props.style);\n let keys = Object.keys(style);\n extend(sr.style, style, keys);\n extend(sr.currentStyle, style, keys);\n // 事件添加到sr\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n if(/^on[a-zA-Z]/.test(k)) {\n k = k.slice(2).toLowerCase();\n sr.listener[k] = v;\n }\n });\n }\n // 自定义事件无视返回强制添加\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n if(/^on-[a-zA-Z\\d_$]/.test(k)) {\n k = k.slice(3);\n this.on(k, v);\n }\n });\n if(isFunction(this.componentDidMount)) {\n this.__root.once(Event.REFRESH, () => {\n this.componentDidMount();\n });\n }\n }\n\n render() {\n inject.warn('Component should implement render()');\n }\n\n __destroy() {\n if(this.__isDestroyed) {\n return;\n }\n this.__isDestroyed = true;\n this.__isMounted = false;\n let ref = this.props.ref;\n if(!isNil(ref) && !isFunction(ref)) {\n delete this.__root.__ref[ref];\n }\n if(isFunction(this.componentWillUnmount)) {\n this.componentWillUnmount();\n }\n if(this.__shadow) {\n this.__shadow.__destroy();\n }\n this.__host = this.__hostRoot\n = this.__shadow = this.__shadowRoot\n = this.__prev = this.__next = this.__root\n = this.__parent = this.__domParent = null;\n }\n\n __emitEvent(e, force) {\n let sr = this.shadowRoot;\n if(sr instanceof Text) {\n return;\n }\n let res = sr.__emitEvent(e, force);\n if(res) {\n e.target = this;\n return true;\n }\n }\n\n get tagName() {\n return this.__tagName;\n }\n\n get shadow() {\n return this.__shadow;\n }\n\n get shadowRoot() {\n return this.__shadowRoot;\n }\n\n get root() {\n return this.__root;\n }\n\n get host() {\n return this.__host;\n }\n\n get hostRoot() {\n return this.__hostRoot;\n }\n\n get parent() {\n return this.__parent;\n }\n\n get prev() {\n return this.__prev;\n }\n\n get next() {\n return this.__next;\n }\n\n get ref() {\n return this.__ref;\n }\n\n get domParent() {\n return this.__domParent;\n }\n\n get state() {\n return this.__state;\n }\n\n set state(v) {\n this.__state = v;\n }\n\n get isDestroyed() {\n return this.__isDestroyed;\n }\n\n static get REGISTER() {\n return REGISTER;\n }\n\n static getRegister(name) {\n if(!name || !util.isString(name) || !/^[A-Z]/.test(name)) {\n throw new Error('Invalid param');\n }\n if(!REGISTER.hasOwnProperty(name)) {\n throw new Error(`Component has not register: ${name}`);\n }\n return REGISTER[name];\n }\n\n static register(name, obj) {\n if(!name || !util.isString(name) || !/^[A-Z]/.test(name)\n || !obj.prototype || !(obj.prototype instanceof Component)) {\n throw new Error('Invalid param: Component register');\n }\n if(Component.hasRegister(name)) {\n throw new Error(`Component has already register: ${name}`);\n }\n REGISTER[name] = obj;\n }\n\n static hasRegister(name) {\n return name && REGISTER.hasOwnProperty(name);\n }\n\n static delRegister(name) {\n if(Component.hasRegister(name)) {\n delete REGISTER[name];\n }\n }\n}\n\nObject.keys(change.GEOM).concat([\n 'x',\n 'y',\n 'width',\n 'height',\n 'outerWidth',\n 'outerHeight',\n 'clientWidth',\n 'clientHeight',\n 'offsetWidth',\n 'offsetHeight',\n 'style',\n 'animationList',\n 'currentStyle',\n 'computedStyle',\n 'cacheStyle',\n '__currentStyle',\n '__computedStyle',\n '__cacheStyle',\n 'currentProps',\n '__currentProps',\n 'cacheProps',\n '__cacheProps',\n 'baseline',\n 'virtualDom',\n 'mask',\n 'maskId',\n 'textWidth',\n 'content',\n 'lineBoxes',\n 'charWidthList',\n 'charWidth',\n '__layoutData',\n '__struct',\n 'bbox',\n 'contentBoxList',\n 'listener',\n 'matrix',\n 'matrixEvent',\n]).forEach(fn => {\n Object.defineProperty(Component.prototype, fn, {\n get() {\n let sr = this.shadowRoot;\n if(sr) {\n return sr[fn];\n }\n },\n });\n});\n\n[\n '__layout',\n '__layoutFlow',\n '__layoutStyle',\n '__layoutAbs',\n '__layoutNone',\n '__tryLayInline',\n '__offsetX',\n '__offsetY',\n '__calAutoBasis',\n '__computeReflow',\n '__mp',\n 'animate',\n 'removeAnimate',\n 'clearAnimate',\n 'frameAnimate',\n 'updateStyle',\n 'getBoundingClientRect',\n 'getComputedStyle',\n 'clearCache',\n '__structure',\n '__modifyStruct',\n '__updateStruct',\n 'flowChildren',\n 'absChildren',\n '__isRealInline',\n '__calBasis',\n '__calMinMax',\n '__computeMeasure',\n 'appendChild',\n 'prependChild',\n 'insertBefore',\n 'insertAfter',\n 'removeChild',\n 'remove',\n].forEach(fn => {\n Component.prototype[fn] = function() {\n let sr = this.shadowRoot;\n if(sr && isFunction(sr[fn])) {\n return sr[fn].apply(sr, arguments);\n }\n };\n});\n\nexport default Component;\n","import Ellipsis from './Ellipsis';\nimport TextBox from './TextBox';\nimport enums from '../util/enums';\n\nconst {\n STYLE_KEY: {\n MARGIN_TOP,\n MARGIN_LEFT,\n MARGIN_RIGHT,\n MARGIN_BOTTOM,\n PADDING_TOP,\n PADDING_LEFT,\n PADDING_RIGHT,\n PADDING_BOTTOM,\n BORDER_TOP_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n },\n} = enums;\n\n/**\n * 获取inline的每一行内容的矩形坐标4个点,同时附带上border的矩形,比前面4个点尺寸大或相等(有无border/padding)\n * @param xom\n * @param isUpright\n * @param contentBoxList\n * @param start\n * @param end\n * @param lineBox\n * @param baseline\n * @param lineHeight\n * @param leading\n * @param isStart\n * @param isEnd\n * @param backgroundClip\n * @param paddingTop\n * @param paddingRight\n * @param paddingBottom\n * @param paddingLeft\n * @param borderTopWidth\n * @param borderRightWidth\n * @param borderBottomWidth\n * @param borderLeftWidth\n * @returns {(*|number)[]}\n */\nfunction getInlineBox(xom, isUpright, contentBoxList, start, end, lineBox, baseline,\n lineHeight, leading, isStart, isEnd, backgroundClip,\n paddingTop, paddingRight, paddingBottom, paddingLeft,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth) {\n // 根据bgClip确定y伸展范围,inline渲染bg扩展到pb的位置不影响布局\n let bcStart = 0, bcEnd = 0;\n let pbStart = isUpright ? (paddingLeft + borderLeftWidth) : (paddingTop + borderTopWidth);\n let pbEnd = isUpright ? (paddingRight + borderRightWidth) : (paddingBottom + borderBottomWidth);\n if(backgroundClip === 'paddingBox') {\n bcStart = isUpright ? paddingLeft : paddingTop;\n bcEnd = isUpright ? paddingRight : paddingBottom;\n }\n else if(backgroundClip === 'borderBox') {\n bcStart = pbStart;\n bcEnd = pbEnd;\n }\n // inline的baseline和lineBox的差值,不同lh时造成的偏移,一般为多个textBox时比较小的那个发生\n // 垂直排版不能简单算baseline差值,因为原点坐标系不一样\n let diff;\n if(isUpright) {\n diff = lineBox.verticalBaseline - baseline;\n }\n else {\n diff = lineBox.baseline - baseline;\n }\n let x1, y1, x2, y2, bx1, by1, bx2, by2;\n // x坐标取首尾contentBox的左右2侧,clip布局时已算好;y是根据lineHeight和lineBox的高度以及baseline对齐后计算的\n // 垂直排版则互换x/y逻辑\n if(isUpright) {\n x1 = lineBox.x + diff - bcStart + leading;\n y1 = start.y;\n bx1 = lineBox.x + diff - pbStart + leading;\n }\n else {\n x1 = start.x;\n y1 = lineBox.y + lineBox.oy + diff - bcStart + leading;\n by1 = lineBox.y + lineBox.oy + diff - pbStart + leading;\n }\n // 容器内包含的inline节点,需考虑行首水平mbp(垂直排版为垂直头mbp)\n let dom = start instanceof TextBox ? start.parent.domParent : start.domParent;\n while(dom !== xom) {\n let list = dom.contentBoxList;\n if(start === list[0]) {\n if(isUpright) {\n let {\n [MARGIN_TOP]: marginTop,\n [PADDING_TOP]: paddingTop,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n } = dom.computedStyle;\n y1 -= marginTop + paddingTop + borderTopWidth;\n }\n else {\n let {\n [MARGIN_LEFT]: marginLeft,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = dom.computedStyle;\n x1 -= marginLeft + paddingLeft + borderLeftWidth;\n }\n }\n dom = dom.domParent;\n }\n // 第一个需考虑容器本身的padding/border\n if(isUpright) {\n by1 = y1;\n if(isStart) {\n by1 -= paddingTop + borderTopWidth;\n if(backgroundClip === 'paddingBox') {\n y1 -= paddingTop;\n }\n else if(backgroundClip === 'borderBox') {\n y1 -= paddingTop + borderTopWidth;\n }\n }\n x2 = lineBox.x + diff + lineHeight + bcEnd - leading;\n bx2 = lineBox.x + diff + lineHeight + pbEnd - leading;\n y2 = end.y + end.outerHeight;\n }\n else {\n bx1 = x1;\n if(isStart) {\n bx1 -= paddingLeft + borderLeftWidth;\n if(backgroundClip === 'paddingBox') {\n x1 -= paddingLeft;\n }\n else if(backgroundClip === 'borderBox') {\n x1 -= paddingLeft + borderLeftWidth;\n }\n }\n x2 = end.x + end.outerWidth;\n y2 = lineBox.y + lineBox.oy + diff + lineHeight + bcEnd - leading;\n by2 = lineBox.y + lineBox.oy + diff + lineHeight + pbEnd - leading;\n }\n // TextBox的parent是Text,再是Dom,这里一定是inline,无嵌套就是xom本身,有则包含若干层最上层还是xom\n dom = end instanceof TextBox ? end.parent.domParent : end.domParent;\n // 从end开始,向上获取dom节点的尾部mpb进行累加,直到xom跳出\n while(dom !== xom) {\n let list = dom.contentBoxList;\n if(end === list[list.length - 1]) {\n if(isUpright) {\n let {\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_BOTTOM]: paddingBottom,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n } = dom.computedStyle;\n y2 += marginBottom + paddingBottom + borderBottomWidth;\n }\n else {\n let {\n [MARGIN_RIGHT]: marginRight,\n [PADDING_RIGHT]: paddingRight,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } = dom.computedStyle;\n x2 += marginRight + paddingRight + borderRightWidth;\n }\n }\n dom = dom.domParent;\n }\n if(isUpright) {\n by2 = y2;\n if(isEnd) {\n by2 += paddingBottom + borderBottomWidth;\n if(backgroundClip === 'paddingBox') {\n y2 += paddingBottom;\n }\n else if(backgroundClip === 'borderBox') {\n y2 += paddingBottom + borderBottomWidth;\n }\n }\n }\n else {\n bx2 = x2;\n if(isEnd) {\n bx2 += paddingRight + borderRightWidth;\n if(backgroundClip === 'paddingBox') {\n x2 += paddingRight;\n }\n else if(backgroundClip === 'borderBox') {\n x2 += paddingRight + borderRightWidth;\n }\n }\n }\n return [x1, y1, x2, y2, bx1, by1, bx2, by2];\n}\n\n/**\n * 统计inline的所有contentBox排成一行时的总宽度,考虑嵌套的mpb\n * @param xom\n * @param contentBoxList\n * @param isUpright\n * @returns {number}\n */\nfunction getInlineWidth(xom, contentBoxList, isUpright) {\n let sum = 0;\n let length = contentBoxList.length;\n if(contentBoxList[length - 1] instanceof Ellipsis) {\n length--;\n }\n for(let i = 0; i < length; i++) {\n let contentBox = contentBoxList[i];\n if(isUpright) {\n sum += contentBox.height;\n }\n else {\n sum += contentBox.width;\n }\n // 嵌套时,首尾box考虑mpb\n let dom = contentBox instanceof TextBox ? contentBox.parent.domParent : contentBox.domParent;\n while(dom !== xom) {\n let list = dom.contentBoxList;\n if(contentBox === list[0]) {\n if(isUpright) {\n let {\n [MARGIN_TOP]: marginTop,\n [PADDING_TOP]: paddingTop,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n } = dom.computedStyle;\n sum += marginTop + paddingTop + borderTopWidth;\n }\n else {\n let {\n [MARGIN_LEFT]: marginLeft,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = dom.computedStyle;\n sum += marginLeft + paddingLeft + borderLeftWidth;\n }\n }\n if(contentBox === list[list.length - 1]) {\n if(isUpright) {\n let {\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_BOTTOM]: paddingBottom,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n } = dom.computedStyle;\n sum += marginBottom + paddingBottom + borderBottomWidth;\n }\n else {\n let {\n [MARGIN_RIGHT]: marginRight,\n [PADDING_RIGHT]: paddingRight,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } = dom.computedStyle;\n sum += marginRight + paddingRight + borderRightWidth;\n }\n }\n dom = dom.domParent;\n }\n }\n return sum;\n}\n\nexport default {\n getInlineBox,\n getInlineWidth,\n};\n","import unit from './unit';\nimport transform from './transform';\nimport enums from '../util/enums';\n\nconst { STYLE_KEY: { SCALE_X, SCALE_Y } } = enums;\nconst { NUMBER } = unit;\n\nfunction matrixResize(imgWidth, imgHeight, targetWidth, targetHeight, x, y, w, h) {\n if(imgWidth === targetWidth && imgHeight === targetHeight) {\n return;\n }\n let list = [\n { k: SCALE_X, v: { v: targetWidth / imgWidth, u: NUMBER } },\n { k: SCALE_Y, v: { v: targetHeight / imgHeight, u: NUMBER } },\n ];\n return transform.calMatrixWithOrigin(list, x, y, w, h);\n}\n\nexport default {\n matrixResize,\n};\n","import border from './border';\nimport transform from './transform';\nimport mx from '../math/matrix';\nimport mode from '../refresh/mode';\nimport painter from '../util/painter';\nimport util from '../util/util';\nimport enums from '../util/enums';\nimport image from './image';\n\nconst {\n STYLE_KEY: {\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n },\n} = enums;\nconst { clone, joinArr } = util;\nconst { canvasPolygon, svgPolygon } = painter;\n\nfunction renderBgc(xom, renderMode, ctx, color, list, x, y, w, h, btlr, btrr, bbrr, bblr,\n method = 'fill', isInline = false, dx = 0, dy = 0) {\n // radial渐变ellipse形状会有matrix,用以从圆缩放到椭圆\n let matrix, cx, cy;\n if(Array.isArray(color)) {\n matrix = color[1];\n cx = color[2];\n cy = color[3];\n color = color[0];\n }\n // border-radius使用三次贝塞尔曲线模拟1/4圆角,误差在[0, 0.000273]之间\n list = list || border.calRadius(x, y, w, h, btlr, btrr, bbrr, bblr);\n if(!list) {\n list = [\n [x, y],\n [x + w, y],\n [x + w, y + h],\n [x, y + h],\n [x, y],\n ];\n }\n // 椭圆有matrix,用逆矩阵变化点来完成\n if(matrix) {\n matrix = transform.calMatrixByOrigin(matrix, cx, cy);\n let t = mx.inverse(matrix);\n list = list.map(item => {\n if(!item || !item.length) {\n return null;\n }\n let arr = [];\n for(let i = 0, len = item.length; i < len; i += 2) {\n let p = mx.calPoint({ x: item[i], y: item[i + 1] }, t);\n arr.push(p.x);\n arr.push(p.y);\n }\n return arr;\n });\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(matrix) {\n ctx.save();\n let me = xom.matrixEvent;\n matrix = mx.multiply(me, matrix);\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n }\n ctx.beginPath();\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n canvasPolygon(ctx, list, dx, dy);\n ctx[method]();\n ctx.closePath();\n if(matrix) {\n ctx.restore();\n }\n }\n else if(renderMode === mode.SVG) {\n let d = svgPolygon(list);\n if(isInline) {\n let v = {\n tagName: 'symbol',\n props: [],\n children: [\n {\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', color],\n ],\n },\n ],\n };\n xom.__cacheDefs.push(v);\n return ctx.add(v);\n }\n else {\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', color],\n ],\n });\n // 椭圆渐变独有\n if(matrix) {\n let bb = xom.virtualDom.bb;\n bb[bb.length - 1].props.push(['transform', `matrix(${joinArr(mx.m2m6(matrix), ',')})`]);\n }\n }\n }\n}\n\nfunction renderImage(xom, renderMode, ctx, loadBgi,\n bx1, by1, bx2, by2, btlr, btrr, bbrr, bblr,\n computedStyle, i, backgroundSize, backgroundRepeat, isInline,\n dx = 0, dy = 0) {\n let source = loadBgi.source;\n // 无source不绘制,可能错误或加载中\n if(source) {\n bx1 += dx;\n by1 += dy;\n bx2 += dx;\n by2 += dy;\n let bgW = bx2 - bx1;\n let bgH = by2 - by1;\n let { width, height } = loadBgi;\n let [w, h] = backgroundSize[i] || [];\n // -1为auto,-2为contain,-3为cover\n if(w === -1 && h === -1) {\n w = width;\n h = height;\n }\n else if(w === -2) {\n if(width > bgW && height > bgH) {\n w = width / bgW;\n h = height / bgH;\n if(w >= h) {\n w = bgW;\n h = w * height / width;\n }\n else {\n h = bgH;\n w = h * width / height;\n }\n }\n else if(width > bgW) {\n w = bgW;\n h = w * height / width;\n }\n else if(height > bgH) {\n h = bgH;\n w = h * width / height;\n }\n else {\n w = width;\n h = height;\n }\n }\n else if(w === -3) {\n if(bgW > width && bgH > height) {\n w = width / bgW;\n h = height / bgH;\n if(w <= h) {\n w = bgW;\n h = w * height / width;\n }\n else {\n h = bgH;\n w = h * width / height;\n }\n }\n else if(bgW > width) {\n w = bgW;\n h = w * height / width;\n }\n else if(bgH > height) {\n h = bgH;\n w = h * width / height;\n }\n else {\n w = width / bgW;\n h = height / bgH;\n if(w <= h) {\n w = bgW;\n h = w * height / width;\n }\n else {\n h = bgH;\n w = h * width / height;\n }\n }\n }\n else if(w === -1) {\n w = h * width / height;\n }\n else if(h === -1) {\n h = w * height / width;\n }\n let bgX = computedStyle[BACKGROUND_POSITION_X][i] || 0;\n if(/%/.test(bgX)) {\n bgX = (bgW - w) * parseFloat(bgX) * 0.01;\n }\n bgX += bx1;\n let bgY = computedStyle[BACKGROUND_POSITION_Y][i] || 0;\n if(/%/.test(bgY)) {\n bgY = (bgH - h) * parseFloat(bgY) * 0.01;\n }\n bgY += by1;\n // 超出尺寸模拟mask截取\n let needMask = bgX < bx1 || bgY < by1 || (bgX + w) > (bx1 + bgW) || (bgY + h) > (by1 + bgH);\n // 计算因为repeat,需要向4个方向扩展渲染几个数量图片\n let xnl = 0;\n let xnr = 0;\n let ynt = 0;\n let ynb = 0;\n // repeat-x\n if(['repeatX', 'repeat'].indexOf(backgroundRepeat[i]) > -1) {\n let diff = bgX - bx1;\n if(diff > 0) {\n xnl = Math.ceil(diff / w);\n }\n diff = bx1 + bgW - bgX - w;\n if(diff > 0) {\n xnr = Math.ceil(diff / w);\n }\n }\n // repeat-y\n if(['repeatY', 'repeat'].indexOf(backgroundRepeat[i]) > -1) {\n let diff = bgY - by1;\n if(diff > 0) {\n ynt = Math.ceil(diff / h);\n }\n diff = by1 + bgH - bgY - h;\n if(diff > 0) {\n ynb = Math.ceil(diff / h);\n }\n }\n // 分同行列和4个角分别判断,先看同行同列,再看4个角的象限\n let repeat = [];\n if(xnl > 0) {\n for(let i = 0; i < xnl; i++) {\n let x = bgX - (i + 1) * w;\n repeat.push([x, bgY]);\n // 看最左边超过没有\n if(!needMask && i === 0 && x < bx1) {\n needMask = true;\n }\n }\n }\n if(xnr > 0) {\n for(let i = 0; i < xnr; i++) {\n let x = bgX + (i + 1) * w;\n repeat.push([x, bgY]);\n // 看最右边超过没有\n if(!needMask && i === xnr - 1 && x + w > bx1 + bgW) {\n needMask = true;\n }\n }\n }\n if(ynt > 0) {\n for(let i = 0; i < ynt; i++) {\n let y = bgY - (i + 1) * h;\n repeat.push([bgX, y]);\n // 看最上边超过没有\n if(!needMask && i === 0 && y < by1) {\n needMask = true;\n }\n }\n }\n if(ynb > 0) {\n for(let i = 0; i < ynb; i++) {\n let y = bgY + (i + 1) * h;\n repeat.push([bgX, y]);\n // 看最下边超过没有\n if(!needMask && i === ynb - 1 && y + w > by1 + bgH) {\n needMask = true;\n }\n }\n }\n // 原点和同行列十字画完,看4个角的情况\n if(xnl > 0 && ynt > 0) {\n for(let i = 0; i < xnl; i++) {\n for(let j = 0; j < ynt; j++) {\n repeat.push([bgX - (i + 1) * w, bgY - (j + 1) * h]);\n }\n }\n }\n if(xnr > 0 && ynt > 0) {\n for(let i = 0; i < xnr; i++) {\n for(let j = 0; j < ynt; j++) {\n repeat.push([bgX + (i + 1) * w, bgY - (j + 1) * h]);\n }\n }\n }\n if(xnl > 0 && ynb > 0) {\n for(let i = 0; i < xnl; i++) {\n for(let j = 0; j < ynb; j++) {\n repeat.push([bgX - (i + 1) * w, bgY + (j + 1) * h]);\n }\n }\n }\n if(xnr > 0 && ynb > 0) {\n for(let i = 0; i < xnr; i++) {\n for(let j = 0; j < ynb; j++) {\n repeat.push([bgX + (i + 1) * w, bgY + (j + 1) * h]);\n }\n }\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(needMask) {\n ctx.save();\n renderBgc(this, renderMode, ctx, '#FFF', null,\n bx1, by1, bgW, bgH, btlr, btrr, bbrr, bblr, 'clip');\n }\n // 先画不考虑repeat的中心声明的\n ctx.drawImage(source, bgX, bgY, w, h);\n // 再画重复的十字和4角象限\n repeat.forEach(item => {\n ctx.drawImage(source, item[0], item[1], w, h);\n });\n if(needMask) {\n ctx.restore();\n }\n }\n else if(renderMode === mode.SVG) {\n let matrix = image.matrixResize(width, height, w, h, bgX, bgY, bgW, bgH);\n let props = [\n ['xlink:href', loadBgi.url],\n ['x', bgX],\n ['y', bgY],\n ['width', width],\n ['height', height],\n ];\n let needResize;\n if(matrix && !mx.isE(matrix)) {\n needResize = true;\n props.push(['transform', 'matrix(' + joinArr(mx.m2m6(matrix), ',') + ')']);\n }\n if(needMask) {\n let p1 = { x: bx1, y: by1 };\n let p2 = { x: bx2, y: by2 };\n if(needResize) {\n let inverse = mx.inverse(matrix);\n p1 = mx.calPoint(p1, inverse);\n p2 = mx.calPoint(p2, inverse);\n }\n let v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', `M${p1.x},${p1.y}L${p2.x},${p1.y}L${p2.x},${p2.y}L${p1.x},${p2.y}L${p1.x},${p1.y}`],\n ['fill', '#FFF'],\n ],\n }],\n };\n let id = ctx.add(v);\n xom.__cacheDefs.push(v);\n props.push(['clip-path', 'url(#' + id + ')']);\n }\n if(isInline) {\n let v = {\n tagName: 'symbol',\n props: [],\n children: [\n {\n type: 'img',\n tagName: 'image',\n props,\n }\n ],\n };\n xom.__cacheDefs.push(v);\n repeat.forEach(item => {\n let copy = clone(props);\n if(needResize) {\n let matrix = image.matrixResize(width, height, w, h, item[0], item[1], bgW, bgH);\n if(matrix && !mx.isE(matrix)) {\n copy[5][1] = 'matrix(' + joinArr(mx.m2m6(matrix), ',') + ')';\n }\n }\n copy[1][1] = item[0];\n copy[2][1] = item[1];\n v.children.push({\n type: 'img',\n tagName: 'image',\n props: copy,\n });\n });\n return ctx.add(v);\n }\n else {\n // 先画不考虑repeat的中心声明的\n xom.virtualDom.bb.push({\n type: 'img',\n tagName: 'image',\n props,\n });\n // 再画重复的十字和4角象限\n repeat.forEach(item => {\n let copy = clone(props);\n if(needResize) {\n let matrix = image.matrixResize(width, height, w, h, item[0], item[1], bgW, bgH);\n if(matrix && !mx.isE(matrix)) {\n copy[5][1] = 'matrix(' + joinArr(mx.m2m6(matrix), ',') + ')';\n }\n }\n copy[1][1] = item[0];\n copy[2][1] = item[1];\n xom.virtualDom.bb.push({\n type: 'img',\n tagName: 'image',\n props: copy,\n });\n });\n }\n }\n }\n}\n\nexport default {\n renderBgc,\n renderImage,\n};\n","import inject from '../util/inject';\nimport util from '../util/util';\n\nconst { isFunction } = util;\n\nfunction traversalBefore(list, length, diff) {\n for(let i = 0; i < length; i++) {\n let item = list[i];\n item.__before && item.__before(diff);\n }\n}\n\nfunction traversalAfter(list, length, diff) {\n for(let i = 0; i < length; i++) {\n let item = list[i];\n item.__after && item.__after(diff);\n }\n}\n\nlet isPause;\n\nclass Frame {\n constructor() {\n this.__rootTask = []; // 动画刷新后,每个root注册的刷新回调执行\n this.__task = [];\n this.__now = inject.now();\n }\n\n __init() {\n let self = this;\n let { task } = self;\n inject.cancelAnimationFrame(self.id);\n let last = self.__now = inject.now();\n function cb() {\n // 必须清除,可能会发生重复,当动画finish回调中gotoAndPlay(0),下方结束判断发现aTask还有值会继续,新的init也会进入再次执行\n inject.cancelAnimationFrame(self.id);\n self.id = inject.requestAnimationFrame(function() {\n if(isPause || !task.length) {\n return;\n }\n let now = self.__now = inject.now();\n let diff = now - last;\n diff = Math.max(diff, 0);\n // let delta = diff * 0.06; // 比例是除以1/60s,等同于*0.06\n last = now;\n // 优先动画计算\n let clone = task.slice(0);\n let length = clone.length;\n // 普通的before/after,动画计算在before,所有回调在after\n traversalBefore(clone, length, diff);\n let list = self.__rootTask.splice(0);\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n item && item(diff);\n }\n // 刷新成功后调用after,确保图像生成\n traversalAfter(clone, length, diff);\n // 执行每个Root的刷新并清空\n // 还有则继续,没有则停止节省性能\n if(task.length) {\n cb();\n }\n });\n }\n cb();\n }\n\n onFrame(handle) {\n if(!handle) {\n return;\n }\n let { task } = this;\n if(!task.length) {\n this.__init();\n }\n if(isFunction(handle)) {\n handle = {\n __after: handle,\n __karasFramecb: handle,\n };\n }\n task.push(handle);\n }\n\n offFrame(handle) {\n if(!handle) {\n return;\n }\n let { task } = this;\n for(let i = 0, len = task.length; i < len; i++) {\n let item = task[i];\n // 需考虑nextFrame包裹的引用对比\n if(item === handle || item.__karasFramecb === handle) {\n task.splice(i, 1);\n break;\n }\n }\n if(!task.length) {\n inject.cancelAnimationFrame(this.id);\n this.__now = null;\n }\n }\n\n nextFrame(handle) {\n if(!handle) {\n return;\n }\n // 包裹一层会导致添加后删除对比引用删不掉,需保存原有引用进行对比\n let cb = isFunction(handle) ? {\n __after: diff => {\n handle(diff);\n this.offFrame(cb);\n },\n } : {\n __before: handle.__before,\n __after: diff => {\n handle.__after && handle.__after(diff);\n this.offFrame(cb);\n },\n };\n cb.__karasFramecb = handle;\n this.onFrame(cb);\n }\n\n pause() {\n isPause = true;\n }\n\n resume() {\n if(isPause) {\n this.__init();\n isPause = false;\n }\n }\n\n get task() {\n return this.__task;\n }\n}\n\nexport default new Frame();\n","/**\n * https://github.com/gre/bezier-easing\n * BezierEasing - use bezier curve for transition easing function\n * by Gaëtan Renaudeau 2014 - 2015 – MIT License\n */\n\n// These values are established by empiricism with tests (tradeoff: performance VS precision)\nlet NEWTON_ITERATIONS = 4;\nlet NEWTON_MIN_SLOPE = 0.001;\nlet SUBDIVISION_PRECISION = 0.0000001;\nlet SUBDIVISION_MAX_ITERATIONS = 10;\n\nlet kSplineTableSize = 11;\nlet kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\n\nlet float32ArraySupported = typeof Float32Array === 'function';\n\nfunction A(aA1, aA2) {\n return 1.0 - 3.0 * aA2 + 3.0 * aA1;\n}\n\nfunction B(aA1, aA2) {\n return 3.0 * aA2 - 6.0 * aA1;\n}\n\nfunction C(aA1) {\n return 3.0 * aA1;\n}\n\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nfunction calcBezier(aT, aA1, aA2) {\n return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\n}\n\n// Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.\nfunction getSlope(aT, aA1, aA2) {\n return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\n}\n\nfunction binarySubdivide(aX, aA, aB, mX1, mX2) {\n let currentX, currentT, i = 0;\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n if(currentX > 0.0) {\n aB = currentT;\n } else {\n aA = currentT;\n }\n } while(Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\n return currentT;\n}\n\nfunction newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {\n for(let i = 0; i < NEWTON_ITERATIONS; ++i) {\n let currentSlope = getSlope(aGuessT, mX1, mX2);\n if(currentSlope === 0.0) {\n return aGuessT;\n }\n let currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n}\n\nfunction LinearEasing(x) {\n return x;\n}\n\nfunction bezier(mX1, mY1, mX2, mY2) {\n if(!(0 <= mX1 && mX1 <= 1 && 0 <= mX2 && mX2 <= 1)) {\n throw new Error('bezier x values must be in [0, 1] range');\n }\n\n if(mX1 === mY1 && mX2 === mY2) {\n return LinearEasing;\n }\n\n // Precompute samples table\n let sampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\n for(let i = 0; i < kSplineTableSize; ++i) {\n sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n\n function getTForX(aX) {\n let intervalStart = 0.0;\n let currentSample = 1;\n let lastSample = kSplineTableSize - 1;\n\n for(; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += kSampleStepSize;\n }\n --currentSample;\n\n // Interpolate to provide an initial guess for t\n let dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n let guessForT = intervalStart + dist * kSampleStepSize;\n\n let initialSlope = getSlope(guessForT, mX1, mX2);\n if(initialSlope >= NEWTON_MIN_SLOPE) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n } else if(initialSlope === 0.0) {\n return guessForT;\n } else {\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\n }\n }\n\n return function BezierEasing(x) {\n // Because JavaScript number are imprecise, we should guarantee the extremes are right.\n if(x === 0 || x === 1) {\n return x;\n }\n return calcBezier(getTForX(x), mY1, mY2);\n };\n}\n\nlet easing = {\n linear: bezier(1, 1, 0, 0),\n easeIn: bezier(0.42, 0, 1, 1),\n easeOut: bezier(0, 0, 0.58, 1),\n ease: bezier(0.25, 0.1, 0.25, 1),\n easeInOut: bezier(0.42, 0, 0.58, 1),\n cubicBezier: bezier,\n getEasing(v, v1, v2, v3) {\n if(arguments.length === 4) {\n return bezier(v, v1, v2, v3);\n }\n else if(Array.isArray(v) && v.length === 4) {\n return bezier(v[0], v[1], v[2], v[3]);\n }\n else if(v) {\n v = v.toString();\n let timingFunction;\n if(/^\\s*(?:cubic-bezier\\s*)?\\(\\s*[\\d.]+\\s*,\\s*[-\\d.]+\\s*,\\s*[\\d.]+\\s*,\\s*[-\\d.]+\\s*\\)\\s*$/i.test(v)) {\n v = v.match(/[\\d.]+/g);\n timingFunction = bezier(v[0], v[1], v[2], v[3]);\n }\n else if(v !== 'getEasing') {\n timingFunction = this[v];\n }\n return timingFunction;\n }\n },\n};\n\neasing['ease-in'] = easing.easeIn;\neasing['ease-out'] = easing.easeOut;\neasing['ease-in-out'] = easing.easeInOut;\n\nexport default easing;\n","import css from '../style/css';\nimport unit from '../style/unit';\nimport tf from '../style/transform';\nimport abbr from '../style/abbr';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport Event from '../util/Event';\nimport inject from '../util/inject';\nimport frame from './frame';\nimport easing from './easing';\nimport change from '../refresh/change';\nimport key from './key';\nimport mx from '../math/matrix';\nimport level from '../refresh/level';\n\nconst {\n STYLE_KEY: {\n FILTER,\n TRANSFORM_ORIGIN,\n PERSPECTIVE_ORIGIN,\n BACKGROUND_CLIP,\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n BOX_SHADOW,\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n BACKGROUND_SIZE,\n FONT_SIZE,\n FLEX_BASIS,\n FLEX_DIRECTION,\n WIDTH,\n HEIGHT,\n TOP,\n BOTTOM,\n LINE_HEIGHT,\n OPACITY,\n Z_INDEX,\n TRANSFORM,\n COLOR,\n FONT_WEIGHT,\n FONT_STYLE,\n FONT_FAMILY,\n TEXT_ALIGN,\n MATRIX,\n ROTATE_3D,\n TRANSLATE_PATH,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_OVER,\n STROKE_WIDTH,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n TEXT_STROKE_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_TOP_WIDTH,\n LEFT,\n RIGHT,\n MARGIN_BOTTOM,\n MARGIN_TOP,\n MARGIN_LEFT,\n MARGIN_RIGHT,\n PADDING_TOP,\n PADDING_RIGHT,\n PADDING_LEFT,\n PADDING_BOTTOM,\n STROKE_MITERLIMIT,\n LETTER_SPACING,\n PERSPECTIVE,\n SKEW_X,\n SKEW_Y,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n BACKGROUND_IMAGE,\n FILL,\n STROKE,\n BACKGROUND_COLOR,\n BORDER_BOTTOM_COLOR,\n BORDER_LEFT_COLOR,\n BORDER_RIGHT_COLOR,\n BORDER_TOP_COLOR,\n POSITION,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, INHERIT, RGBA, STRING, NUMBER, REM, VW, VH, VMAX, VMIN, GRADIENT, calUnit } = unit;\nconst { isNil, isFunction, isNumber, isObject, clone, equalArr } = util;\nconst { linear } = easing;\nconst { cloneStyle, equalStyle } = css;\nconst { isGeom, GEOM } = change;\nconst {\n getLevel,\n isRepaint,\n NONE,\n FILTER: FT,\n PERSPECTIVE: PPT,\n REPAINT,\n REFLOW,\n REBUILD,\n CACHE,\n TRANSFORM: TF,\n TRANSFORM_ALL,\n OPACITY: OP,\n MIX_BLEND_MODE: MBM,\n MASK,\n TRANSLATE_X: TX,\n TRANSLATE_Y: TY,\n TRANSLATE_Z: TZ,\n ROTATE_Z: RZ,\n SCALE_X: SX,\n SCALE_Y: SY,\n SCALE_Z: SZ,\n SCALE,\n} = level;\n\nconst {\n isColorKey,\n isExpandKey,\n isLengthKey,\n isGradientKey,\n isRadiusKey,\n} = key;\n\nfunction unify(frames, target) {\n let hash = {};\n let keys = [];\n // 获取所有关键帧的属性\n frames.forEach(item => {\n let style = item.style;\n Object.keys(style).forEach(k => {\n let v = style[k];\n // 未定义的过滤掉,null空有意义\n if(v !== undefined && !hash.hasOwnProperty(k)) {\n hash[k] = true;\n // geom为属性字符串,style都为枚举int\n if(!GEOM.hasOwnProperty(k)) {\n k = parseInt(k);\n }\n // path动画要转为translateXY,所以手动添加,使2帧之间存在过渡,有可能之前已存在这个动画,可忽视\n if(k === TRANSLATE_PATH) {\n if(!hash.hasOwnProperty(TRANSLATE_X)) {\n keys.push(TRANSLATE_X);\n }\n if(!hash.hasOwnProperty(TRANSLATE_Y)) {\n keys.push(TRANSLATE_Y);\n }\n hash[TRANSLATE_X] = hash[TRANSLATE_Y] = true;\n }\n keys.push(k);\n }\n });\n });\n // 添补没有声明完全的关键帧属性为节点当前值\n frames.forEach(item => {\n let style = item.style;\n keys.forEach(k => {\n if(!style.hasOwnProperty(k) || isNil(style[k])) {\n if(GEOM.hasOwnProperty(k)) {\n style[k] = clone(target.getProps(k));\n }\n else {\n if(k === TRANSLATE_X && style.hasOwnProperty(TRANSLATE_PATH)) {\n style[k] = clone(style[TRANSLATE_PATH][0]);\n }\n else if(k === TRANSLATE_Y && style.hasOwnProperty(TRANSLATE_PATH)) {\n style[k] = clone(style[TRANSLATE_PATH][1]);\n }\n else {\n style[k] = cloneStyle(target.__currentStyle, [k])[k];\n }\n }\n }\n });\n });\n return keys;\n}\n\n// 每次初始化时处理继承值,以及转换transform为单matrix矩阵,并复制clone样式供帧计算\nfunction inherit(frames, keys, target) {\n let computedStyle = target.__computedStyle;\n frames.forEach(item => {\n let style = item.style;\n keys.forEach(k => {\n let v = style[k];\n // geom的属性可能在帧中没有\n if(isNil(v)) {\n return;\n }\n if(k === TRANSFORM) {\n let ow = target.__outerWidth;\n let oh = target.__outerHeight;\n let m = tf.calMatrix(v, ow, oh, target.__root);\n style[k] = [{ k: MATRIX, v: m }];\n }\n else if(v.u === INHERIT) {\n if(k === COLOR || k === TEXT_STROKE_COLOR) {\n style[k] = { v: util.rgba2int(computedStyle[k]), u: RGBA };\n }\n else if(isLengthKey(k)) {\n style[k] = { v: computedStyle[k], u: PX };\n }\n else if(k === FONT_WEIGHT) {\n style[k] = { v: computedStyle[k], u: NUMBER };\n }\n else if(k === FONT_STYLE || k === FONT_FAMILY || k === TEXT_ALIGN || k === TEXT_STROKE_OVER) {\n style[k] = { v: computedStyle[k], u: STRING };\n }\n }\n });\n item.clone = cloneStyle(style, null);\n });\n}\n\n/**\n * 通知root更新当前动画,需要根据frame的状态来决定是否是同步插入\n * 在异步时,因为动画本身是异步,需要addRefreshTask\n * 而如果此时frame在执行before过程中,说明帧动画本身是在before计算的,需要同步插入\n * @param keys 样式所有的key\n * @param root\n * @param node\n * @param aniParams 动画更新的特殊优化参数\n * @param cb\n */\nfunction genBeforeRefresh(keys, root, node, aniParams, cb) {\n if(aniParams && !aniParams.allInFn) {\n aniParams = null;\n }\n root.__addUpdate(node, keys, null, null, null, aniParams, cb);\n}\n\n/**\n * 将每帧的样式格式化,提取出offset属性并转化为时间,提取出缓动曲线easing\n * 加好空数组transition/keys,后续计算两帧之间变化时存入\n * 加好空数组fixed,后续计算无帧变化时存入\n * @param style 关键帧样式\n * @param duration 动画时间长度\n * @param es options的easing曲线控制,frame没有自定义则使用全局的\n */\nfunction framing(style, duration, es) {\n let { offset, easing } = style;\n // 这两个特殊值提出来存储不干扰style\n delete style.offset;\n delete style.easing;\n // translatePath特殊对待,ae的曲线运动动画,普通css不包含,特殊处理并添加到style最后\n let translatePath = style.translatePath;\n style = css.normalize(style);\n if(Array.isArray(translatePath) && [6, 8].indexOf(translatePath.length) > -1) {\n style[TRANSLATE_PATH] = translatePath.map(item => {\n let v = calUnit(item);\n if(v.u === NUMBER) {\n v.u = PX;\n }\n return v;\n });\n }\n return {\n style,\n time: offset * duration,\n easing: easing || es,\n timingFunction: getEasing(easing || es),\n transition: [], // 变化的属性\n keys: [], // 变化的k\n fixed: [], // 不变的k\n lastPercent: -1,\n };\n}\n\nfunction calByUnit(p, n, container, root) {\n if(p.u === PX) {\n if(n.u === PERCENT) {\n return n.v * 0.01 * container - p.v;\n }\n else if(n.u === REM) {\n return n.v * root.computedStyle[FONT_SIZE] - p.v;\n }\n else if(n.u === VW) {\n return n.v * root.width * 0.01 - p.v;\n }\n else if(n.u === VH) {\n return n.v * root.height * 0.01 - p.v;\n }\n else if(n.u === VMAX) {\n return n.v * Math.max(root.width, root.height) * 0.01 - p.v;\n }\n else if(n.u === VMIN) {\n return n.v * Math.min(root.width, root.height) * 0.01 - p.v;\n }\n }\n else if(p.u === PERCENT) {\n if(n.u === PX) {\n return n.v * 100 / container - p.v;\n }\n else if(n.u === REM) {\n return n.v * root.computedStyle[FONT_SIZE] * 100 / container - p.v;\n }\n else if(n.u === VW) {\n return n.v * root.width / container - p.v;\n }\n else if(n.u === VH) {\n return n.v * root.height / container - p.v;\n }\n else if(n.u === VMAX) {\n return n.v * Math.max(root.width, root.height) / container - p.v;\n }\n else if(n.u === VMIN) {\n return n.v * Math.min(root.width, root.height) / container - p.v;\n }\n }\n else if(p.u === REM) {\n if(n.u === PX) {\n return n.v / root.computedStyle[FONT_SIZE] - p.v;\n }\n else if(n.u === PERCENT) {\n return n.v * 0.01 * container / root.computedStyle[FONT_SIZE] - p.v;\n }\n else if(n.u === VW) {\n return n.v * root.width * 0.01 / root.computedStyle[FONT_SIZE] - p.v;\n }\n else if(n.u === VH) {\n return n.v * root.height * 0.01 / root.computedStyle[FONT_SIZE] - p.v;\n }\n else if(n.u === VMAX) {\n return n.v * Math.max(root.width, root.height) * 0.01 / root.computedStyle[FONT_SIZE] - p.v;\n }\n else if(n.u === VMIN) {\n return n.v * Math.min(root.width, root.height) * 0.01 / root.computedStyle[FONT_SIZE] - p.v;\n }\n }\n else if(p.u === VW) {\n if(n.u === PX) {\n return n.v * 100 / root.width - p.v;\n }\n else if(n.u === REM) {\n return n.v * 100 * root.computedStyle[FONT_SIZE] / root.width - p.v;\n }\n else if(n.u === PERCENT) {\n return n.v * container / root.width - p.v;\n }\n else if(n.u === VH) {\n return n.v * root.height / root.width - p.v;\n }\n else if(n.u === VMAX) {\n return n.v * Math.max(root.width, root.height) / root.width - p.v;\n }\n else if(n.u === VMIN) {\n return n.v * Math.min(root.width, root.height) / root.width - p.v;\n }\n }\n else if(p.u === VH) {\n if(n.u === PX) {\n return n.v * 100 / root.height - p.v;\n }\n else if(n.u === REM) {\n return n.v * 100 * root.computedStyle[FONT_SIZE] / root.height - p.v;\n }\n else if(n.u === VW) {\n return n.v * root.width / root.height - p.v;\n }\n else if(n.u === PERCENT) {\n return n.v * container / root.height - p.v;\n }\n else if(n.u === VMAX) {\n return n.v * Math.max(root.width, root.height) / root.height - p.v;\n }\n else if(n.u === VMIN) {\n return n.v * Math.min(root.width, root.height) / root.height - p.v;\n }\n }\n else if(p.u === VMAX) {\n if(n.u === PX) {\n return n.v * 100 / Math.max(root.width, root.height) - p.v;\n }\n else if(n.u === REM) {\n return n.v * 100 * root.computedStyle[FONT_SIZE] / Math.max(root.width, root.height) - p.v;\n }\n else if(n.u === PERCENT) {\n return n.v * container / Math.max(root.width, root.height) - p.v;\n }\n else if(n.u === VW) {\n return n.v * root.width / Math.max(root.width, root.height) - p.v;\n }\n else if(n.u === VH) {\n return n.v * root.height / Math.max(root.width, root.height) - p.v;\n }\n else if(n.u === VMIN) {\n return n.v * Math.min(root.width, root.height) / Math.max(root.width, root.height) - p.v;\n }\n }\n else if(p.u === VMIN) {\n if(n.u === PX) {\n return n.v * 100 / Math.min(root.width, root.height) - p.v;\n }\n else if(n.u === REM) {\n return n.v * 100 * root.computedStyle[FONT_SIZE] / Math.min(root.width, root.height) - p.v;\n }\n else if(n.u === PERCENT) {\n return n.v * container / Math.min(root.width, root.height) - p.v;\n }\n else if(n.u === VW) {\n return n.v * root.width / Math.min(root.width, root.height) - p.v;\n }\n else if(n.u === VH) {\n return n.v * root.height / Math.min(root.width, root.height) - p.v;\n }\n else if(n.u === VMAX) {\n return n.v * Math.max(root.width, root.height) / Math.min(root.width, root.height) - p.v;\n }\n }\n return 0;\n}\n\n/**\n * 计算两帧之间的差,单位不同的以后面为准,返回的v表示差值\n * 没有变化返回空\n * auto等无法比较的不参与计算\n * @param prev 上一帧样式\n * @param next 下一帧样式\n * @param k 比较的样式名\n * @param target dom对象\n */\nfunction calDiff(prev, next, k, target) {\n let p = prev.style[k];\n let n = next.style[k];\n // 提前设置好引用,无需每帧计算时取引用,由于单位一定相同,可以简化直接引用到值v上无需单位u,有些直接量没有单位\n let cl = prev.clone[k];\n // translatePath可能不存在\n if(cl && cl.hasOwnProperty('v')) {\n cl = cl.v;\n }\n let res = { k, st: p, cl };\n if(k === TRANSFORM) {\n // transform不存在时需给默认矩阵,他只有1个matrix3d的值做动画\n if(!p && !n || !p.length && !n.length) {\n return;\n }\n let pm, nm;\n if(p && p[0]) {\n pm = p[0].v;\n }\n else {\n pm = mx.identity();\n }\n if(n && n[0]) {\n nm = n[0].v;\n }\n else {\n nm = mx.identity();\n }\n // transform特殊被初始化转成matrix矩阵,直接计算差值\n if(equalArr(pm, nm)) {\n return;\n }\n res.v = [\n nm[0] - pm[0],\n nm[1] - pm[1],\n nm[2] - pm[2],\n nm[3] - pm[3],\n nm[4] - pm[4],\n nm[5] - pm[5],\n nm[6] - pm[6],\n nm[7] - pm[7],\n nm[8] - pm[8],\n nm[9] - pm[9],\n nm[10] - pm[10],\n nm[11] - pm[11],\n nm[12] - pm[12],\n nm[13] - pm[13],\n nm[14] - pm[14],\n nm[15] - pm[15],\n ];\n }\n else if(k === ROTATE_3D) {\n if(p[0] === n[0] && p[1] === n[1] && p[2] === n[2]\n && p[3].v === n[3].v && p[3].u === n[3].u) {\n return;\n }\n res.v = [n[0] - p[0], n[1] - p[1], n[2] - p[2], n[3].v - p[3].v];\n }\n else if(k === FILTER) {\n // filter很特殊,里面有多个滤镜,按顺序计算,为空视为默认值,如blur默认0,brightness默认1\n let len = Math.max(p ? p.length : 0, n ? n.length : 0);\n let v = [], has;\n for(let i = 0; i < len; i++) {\n let pv = p ? p[i] : null, nv = n ? n[i] : null;\n // 空或key不等都无变化\n if(isNil(pv) || isNil(nv) || pv.k !== nv.k) {\n v.push(null);\n }\n else {\n has = true;\n let k = pv.k, pvv = pv.v, nvv = nv.v;\n if(k === 'blur') {\n if(pvv.u === nvv.u) {\n v.push(nvv.v - pvv.v);\n }\n else {\n let v2 = calByUnit(pvv, nvv, 0, target.root);\n v.push(v2);\n }\n }\n else if(k === 'hueRotate' || k === 'saturate' || k === 'brightness' || k === 'contrast'\n || k === 'sepia' || k === 'invert' || k === 'grayscale') {\n v.push(nvv.v - pvv.v);\n }\n else if(k === 'dropShadow') {\n let v2 = [];\n for(let i = 0; i < 4; i++) {\n let a = pvv[i], b = nvv[i];\n if(a.u === b.u) {\n v2.push(b.v - a.v);\n }\n else {\n v2.push(calByUnit(a, b, i === 1 ? target.clientHeight: target.clientWidth, target.root));\n }\n }\n v2.push([\n nvv[4][0] - pvv[4][0],\n nvv[4][1] - pvv[4][1],\n nvv[4][2] - pvv[4][2],\n nvv[4][3] - pvv[4][3],\n ])\n v.push(v2);\n }\n }\n }\n if(!has) {\n return;\n }\n res.v = v;\n }\n else if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN || isRadiusKey(k)) {\n // x/y都相等无需\n if(n[0].v === p[0].v && n[0].u === p[0].u\n && n[1].v === p[1].v && n[1].u === p[1].u) {\n return;\n }\n res.v = [];\n for(let i = 0; i < 2; i++) {\n let pi = p[i];\n let ni = n[i];\n if(pi.u === ni.u) {\n res.v.push(ni.v - pi.v);\n }\n else {\n let v = calByUnit(pi, ni, target[i ? 'outerHeight' : 'outerWidth'], target.root);\n res.v.push(v);\n }\n }\n }\n else if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n res.v = [];\n let length = Math.min(p.length, n.length);\n for(let i = 0; i < length; i++) {\n let pi = p[i], ni = n[i];\n if(pi.u === ni.u) {\n let v = ni.v - pi.v;\n res.v.push(v);\n }\n else {\n let k2;\n if(['padding-box', 'paddingBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = k === BACKGROUND_POSITION_X ? 'clientWidth' : 'clientHeight';\n }\n else if(['content-box', 'contentBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = k === BACKGROUND_POSITION_X ? 'width' : 'height';\n }\n else {\n k2 = k === BACKGROUND_POSITION_X ? 'offsetWidth' : 'offsetHeight';\n }\n let v = calByUnit(pi, ni, target[k2], target.root);\n res.v.push(v);\n }\n }\n }\n else if(k === BOX_SHADOW) {\n res.v = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let a = p[i];\n let b = n[i];\n // 不能为空,outset/inset必须相等\n if(!a || !b || a[5] !== b[5]) {\n res.v.push(null);\n continue;\n }\n let v = [];\n // x/y/blur/spread\n for(let j = 0; j < 4; j++) {\n if(a[j].u === b[j].u) {\n v.push(b[j].v - a[j].v);\n }\n else {\n let v2 = calByUnit(a[j], b[j], i === 1 ? target.offsetHeight : target.offsetWidth, target.root);\n v.push(v2);\n }\n }\n // rgba\n let c = [];\n for(let j = 0; j < 4; j++) {\n c.push(b[4][j] - a[4][j]);\n }\n v.push(c);\n res.v.push(v);\n }\n }\n else if(k === BACKGROUND_SIZE) {\n res.v = [];\n let length = Math.min(p.length, n.length);\n let has;\n for(let i = 0; i < length; i++) {\n let pi = p[i], ni = n[i];\n if(!pi || !ni) {\n res.v.push(null);\n continue;\n }\n let temp = [];\n for(let j = 0; j < 2; j++) {\n let pp = pi[j], nn = ni[j];\n if(pp.u === nn.u) {\n temp.push(nn.v - pp.v);\n }\n else {\n let k2;\n if(['padding-box', 'paddingBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = i ? 'clientWidth' : 'clientHeight';\n }\n else if(['content-box', 'contentBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = i ? 'width' : 'height';\n }\n else {\n k2 = i ? 'offsetWidth' : 'offsetHeight';\n }\n let v = calByUnit(pp, nn, target[k2], target.root);\n temp.push(v);\n }\n }\n if(equalArr(temp, [0, 0])) {\n res.v.push(null);\n }\n else {\n res.v.push(temp);\n has = true;\n }\n }\n if(!has) {\n return;\n }\n }\n else if(k === OPACITY || k === Z_INDEX) {\n if(n === p) {\n return;\n }\n res.v = n - p;\n }\n else if(k === STROKE_WIDTH) {\n res.v = [];\n let length = Math.min(p.length, n.length);\n for(let i = 0; i < length; i++) {\n let pi = p[i], ni = n[i];\n if(pi.u === ni.u) {\n let v = ni.v - pi.v;\n res.v.push(v);\n }\n let v = calByUnit(pi, ni, target.offsetWidth, target.root);\n res.v.push(v);\n }\n }\n // 特殊的path,不存在style中但在动画某帧中,不会统一化所以可能反向计算frameR时后一帧没有\n else if(k === TRANSLATE_PATH && p) {\n let k1 = 'offsetWidth', k2 = 'offsetHeight';\n if(['padding-box', 'paddingBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k1 = 'clientWidth';\n k2 = 'clientHeight';\n }\n else if(['content-box', 'contentBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k1 = 'width';\n k2 = 'height';\n }\n res.v = p.map((item, i) => {\n let { v, u } = item;\n if(u === PERCENT) {\n if(i % 2 === 0) {\n return { v: (parseFloat(v) || 0) * 0.01 * target[k1], u: PX };\n }\n else {\n return { v: (parseFloat(v) || 0) * 0.01 * target[k2], u: PX };\n }\n }\n else if(u === REM) {\n return { v: (parseFloat(v) || 0) * target.root.computedStyle[FONT_SIZE] * 100, u: PX };\n }\n else if(u === VW) {\n return { v: (parseFloat(v) || 0) * 0.01 * target.root.width, u: PX };\n }\n else if(u === VH) {\n return { v: (parseFloat(v) || 0) * 0.01 * target.root.height, u: PX };\n }\n else if(u === VMAX) {\n return { v: (parseFloat(v) || 0) * 0.01 * Math.max(target.root.width, target.root.height), u: PX };\n }\n else if(u === VMIN) {\n return { v: (parseFloat(v) || 0) * 0.01 * Math.min(target.root.width, target.root.height), u: PX };\n }\n else {\n return { v: parseFloat(v) || 0, u: PX };\n }\n });\n }\n else if(isExpandKey(k)) {\n if(p.u === n.u) {\n let v = n.v - p.v;\n if(v === 0) {\n return;\n }\n res.v = v;\n }\n else {\n let v = calByUnit(p, n, target[k === TRANSLATE_X || k === TRANSLATE_Z ? 'outerWidth' : 'outerHeight'], target.root);\n if(!v) {\n return;\n }\n res.v = v;\n }\n }\n else if(isLengthKey(k)) {\n // auto不做动画\n if(p.u === AUTO || n.u === AUTO) {\n return;\n }\n let computedStyle = target.computedStyle;\n let parentComputedStyle = (target.domParent || target).computedStyle;\n let diff = 0;\n if(p.u === n.u) {\n diff = n.v - p.v;\n }\n // lineHeight奇怪的单位变化,%相对于fontSize\n else if(k === LINE_HEIGHT) {\n diff = calByUnit(p, n, computedStyle[FONT_SIZE], target.root);\n }\n // fontSize的%相对于parent的\n else if(k === FONT_SIZE) {\n diff = calByUnit(p, n, parentComputedStyle[FONT_SIZE], target.root);\n }\n // 相对于父height的特殊属性\n else if(k === FLEX_BASIS\n && ['column', 'column-reverse', 'columnReverse'].indexOf(computedStyle[FLEX_DIRECTION]) > -1\n || [HEIGHT, TOP, BOTTOM].indexOf(k) > -1) {\n if(p.u !== AUTO && n.u !== AUTO) {\n diff = calByUnit(p, n, parentComputedStyle[HEIGHT], target.root);\n }\n }\n // 其余都是相对于父width的\n else {\n if(p.u !== AUTO && n.u !== AUTO) {\n diff = calByUnit(p, n, parentComputedStyle[WIDTH], target.root);\n }\n }\n // 兜底NaN非法\n if(diff === 0 || isNaN(diff)) {\n return;\n }\n res.v = diff;\n }\n else if(isGradientKey(k)) {\n // backgroundImage发生了渐变色和图片的变化,fill发生渐变色和纯色的变化等\n res.v = [];\n let length = Math.min(p.length, n.length);\n for(let i = 0; i < length; i++) {\n let pi = p[i], ni = n[i];\n if(!pi || !ni || pi.u !== ni.u || pi.u === STRING) {\n res.v.push(null);\n continue;\n }\n let u = pi.u;\n pi = pi.v;\n ni = ni.v;\n let temp;\n // 渐变\n if(u === GRADIENT) {\n let r = calDiffGradient(pi, ni, target);\n if(!r) {\n res.v.push(null);\n continue;\n }\n temp = r;\n }\n // 纯色\n else {\n if(equalArr(ni, pi)) {\n res.v.push(null);\n continue;\n }\n temp = [\n ni[0] - pi[0],\n ni[1] - pi[1],\n ni[2] - pi[2],\n ni[3] - pi[3]\n ];\n }\n res.v.push(temp);\n }\n }\n else if(isColorKey(k)) {\n if(n.u !== p.u) {\n return;\n }\n // 特殊增加支持有gradient的先判断,仅color和textStrokeColor支持\n n = n.v;\n p = p.v;\n if(n.u === GRADIENT) {\n let r = calDiffGradient(p, n, target);\n if(!r) {\n return;\n }\n res.v = r;\n }\n else {\n if(equalArr(n, p)) {\n return;\n }\n res.v = [\n n[0] - p[0],\n n[1] - p[1],\n n[2] - p[2],\n n[3] - p[3]\n ];\n }\n }\n else if(GEOM.hasOwnProperty(k)) {\n let tagName = target.tagName;\n if(isNil(p)) {\n return;\n }\n else if(GEOM[k][tagName] && isFunction(GEOM[k][tagName].calDiff)) {\n let fn = GEOM[k][tagName].calDiff;\n if(target.isMulti) {\n let arr = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n arr.push(fn(p[i], n[i]));\n }\n return arr;\n }\n else {\n res.v = fn(p, n);\n }\n }\n // 特殊处理multi\n else if(target.isMulti) {\n if(k === 'points' || k === 'controls') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res.v = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || !pv.length || isNil(nv) || !nv.length) {\n res.v.push(null);\n }\n else {\n let v2 = [];\n for(let j = 0, len2 = Math.min(pv.length, nv.length); j < len2; j++) {\n let pv2 = pv[j];\n let nv2 = nv[j];\n if(isNil(pv2) || isNil(nv2)) {\n v2.push(null);\n }\n else {\n let v3 = [];\n for(let k = 0, len3 = Math.max(pv2.length, nv2.length); k < len3; k++) {\n let pv3 = pv2[k];\n let nv3 = nv2[k];\n // control由4点变2点\n if(isNil(pv3) || isNil(nv3)) {\n v3.push(0);\n }\n else {\n v3.push(nv3 - pv3);\n }\n }\n v2.push(v3);\n }\n }\n res.v.push(v2);\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res.v = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || !pv.length || isNil(nv) || !nv.length) {\n res.v.push(null);\n }\n else {\n res.v.push([\n nv[0] - pv[0],\n nv[1] - pv[1],\n ]);\n }\n }\n }\n else {\n if(n === p || equalArr(n, p) || k === 'edge' || k === 'closure' || k === 'booleanOperations') {\n return;\n }\n let v = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || isNil(nv)) {\n v.push(0);\n }\n v.push(nv - pv);\n }\n res.v = v;\n }\n }\n // 非multi特殊处理这几类数组类型数据\n else if(k === 'points' || k === 'controls') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res.v = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || !pv.length || isNil(nv) || !nv.length) {\n res.v.push(null);\n }\n else {\n let v2 = [];\n for(let j = 0, len2 = Math.max(pv.length, nv.length); j < len2; j++) {\n let pv2 = pv[j];\n let nv2 = nv[j];\n // control由4点变2点\n if(isNil(pv2) || isNil(nv2)) {\n v2.push(0);\n }\n else {\n v2.push(nv2 - pv2);\n }\n }\n res.v.push(v2);\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res.v = [\n n[0] - p[0],\n n[1] - p[1],\n ];\n }\n // 其它简单数据,除了edge/closure/booleanOperations没有增量\n else {\n if(n === p || k === 'edge' || k === 'closure' || k === 'booleanOperations') {\n return;\n }\n else {\n res.v = n - p;\n }\n }\n }\n // display等不能有增量过程的\n else {\n return;\n }\n return res;\n}\n\n// 渐变的差异计算\nfunction calDiffGradient(p, n, target) {\n if(p.k !== n.k) {\n return;\n }\n let pv = p.v;\n let nv = n.v;\n let temp = [[]];\n let eq = equalArr(pv, nv);\n // 渐变值部分是通用的\n for(let i = 0, len = Math.min(pv.length, nv.length); i < len; i++) {\n let a = pv[i];\n let b = nv[i];\n let t = [];\n t.push([\n b[0][0] - a[0][0],\n b[0][1] - a[0][1],\n b[0][2] - a[0][2],\n b[0][3] - a[0][3],\n ]);\n if(a[1] && b[1]) {\n if(a[1].u === b[1].u) {\n t.push(b[1].v - a[1].v);\n }\n else {\n let v = calByUnit(a[1], b[1], target.clientWidth, target.root);\n t.push(v || 0);\n }\n }\n temp[0].push(t);\n }\n if(p.k === 'linear') {\n let isArrP = Array.isArray(p.d);\n let isArrN = Array.isArray(n.d);\n if(isArrN !== isArrP) {\n return;\n }\n if(isArrP) {\n let v = [n.d[0] - p.d[0], n.d[1] - p.d[1], n.d[2] - p.d[2], n.d[3] - p.d[3]];\n if(eq && equalArr(v, [0, 0, 0, 0])) {\n return;\n }\n temp[1] = v;\n }\n else {\n let v = n.d - p.d;\n // 颜色角度都没变化\n if(eq && v === 0) {\n return;\n }\n temp[1] = v;\n }\n }\n else if(p.k === 'radial') {\n let isArrP = Array.isArray(p.z);\n let isArrN = Array.isArray(n.z);\n if(isArrN !== isArrP) {\n return;\n }\n temp[2] = [];\n // sketch中a点到b点特殊格式表达,z是数组忽略p和s\n if(isArrP) {\n // 距离中心外形全等\n if(eq && equalArr(p.z, n.z)) {\n return;\n }\n for(let i = 0; i < 5; i++) {\n let pz = p.z[i];\n // 半径比例省略为1\n if(pz === undefined) {\n pz = 1;\n }\n let nz = n.z[i];\n if(nz === undefined) {\n nz = 1;\n }\n temp[2].push(nz - pz);\n }\n }\n else {\n if(eq && p.z === n.z && p.s === n.s && equalArr(p.p, n.p)) {\n return;\n }\n for(let i = 0; i < 2; i++) {\n let pp = p.p[i];\n let np = n.p[i];\n if(pp.u === np.u) {\n temp[2].push(np.v - pp.v);\n }\n else {\n let v = calByUnit(pp, np, target[i ? 'clientWidth' : 'clientHeight'], target.root);\n temp[2].push(v || 0);\n }\n }\n }\n }\n else if(p.k === 'conic') {\n if(eq && p.d === n.d && equalArr(p.p, n.p)) {\n return;\n }\n temp[1]= n.d - p.d;\n temp[2] = [];\n for(let i = 0; i < 2; i++) {\n let pp = p.p[i];\n let np = n.p[i];\n if(pp[1] === np[1]) {\n temp[2].push(np[0] - pp[0]);\n }\n else {\n let v = calByUnit(pp, np, target[i ? 'clientWidth' : 'clientHeight'], target.root);\n temp[2].push(v || 0);\n }\n }\n }\n return temp;\n}\n\n/**\n * 计算两帧之间不相同的变化,存入transition,相同的忽略\n * 同时不变化的key也得存入fixed\n */\nfunction calFrame(prev, next, keys, target) {\n let currentStyle = target.__currentStyle, hasTp, allInFn = true;\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n if(k === TRANSLATE_PATH) {\n hasTp = true;\n }\n let ts = calDiff(prev, next, k, target);\n // 可以形成过渡的才会产生结果返回\n if(ts) {\n ts.cs = currentStyle[k];\n let fn = CAL_HASH[k];\n if(fn) {\n ts.fn = fn;\n }\n else {\n allInFn = false;\n }\n prev.transition.push(ts);\n prev.keys.push(k);\n }\n else {\n prev.fixed.push(k);\n allInFn = false;\n }\n }\n // translatePath需特殊处理translate,防止被覆盖\n if(hasTp) {\n let i = prev.keys.indexOf(TRANSLATE_X);\n if(i === -1) {\n prev.keys.push(TRANSLATE_X);\n }\n i = prev.keys.indexOf(TRANSLATE_Y);\n if(i === -1) {\n prev.keys.push(TRANSLATE_Y);\n }\n i = prev.fixed.indexOf(TRANSLATE_X);\n if(i > -1) {\n prev.fixed.splice(i, 1);\n }\n i = prev.fixed.indexOf(TRANSLATE_Y);\n if(i > -1) {\n prev.fixed.splice(i, 1);\n }\n }\n prev.allInFn = allInFn;\n // 特殊优化,加速通知Root的更新\n if(allInFn) {\n let lv = NONE;\n let computedStyle = target.__computedStyle;\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n lv |= getLevel(k);\n if(k === Z_INDEX) {\n prev.hasZ = node !== this && ['relative', 'absolute'].indexOf(computedStyle[POSITION]) > -1;\n }\n else if(k === COLOR) {\n prev.hasColor = true;\n }\n else if(k === TEXT_STROKE_COLOR) {\n prev.hasTsColor = true;\n }\n else if(k === TEXT_STROKE_WIDTH) {\n prev.hasTsWidth = true;\n }\n else if(k === TEXT_STROKE_OVER) {\n prev.hasTsOver = true;\n }\n }\n // 提前计算\n prev.lv = lv;\n prev.isRepaint = isRepaint(lv);\n // 常见的几种动画matrix计算是否可优化提前计算\n if(prev.isRepaint && (lv & (TX | TY | TZ | RZ | SCALE))) {\n if((lv & TF) || (\n (lv & SX) && !computedStyle[SCALE_X]\n || (lv & SY) && !computedStyle[SCALE_Y]\n || (lv & SZ) && !computedStyle[SCALE_Z]\n || (lv & RZ) && (computedStyle[ROTATE_X] || computedStyle[ROTATE_Y]\n || computedStyle[SKEW_X] || computedStyle[SKEW_Y])\n )) {\n prev.optimize = false;\n }\n else {\n prev.optimize = true;\n }\n }\n }\n return next;\n}\n\nfunction binarySearch(i, j, time, frames) {\n while(i < j) {\n if(i === j - 1) {\n if(frames[j].time <= time) {\n return j;\n }\n return i;\n }\n let middle = i + ((j - i) >> 1);\n let frame = frames[middle];\n if(frame.time === time) {\n return middle;\n }\n if(frame.time > time) {\n j = Math.max(middle - 1, i);\n }\n else {\n i = Math.min(middle, j);\n }\n }\n return i;\n}\n\nfunction getEasing(ea) {\n let timingFunction;\n if(ea) {\n if((timingFunction = /^\\s*steps\\s*\\(\\s*(\\d+)(?:\\s*,\\s*(\\w+))?\\s*\\)/i.exec(ea))) {\n let steps = parseInt(timingFunction[1]);\n let stepsD = timingFunction[2];\n timingFunction = function(percent) {\n // steps有效定义正整数\n if(steps && steps > 0) {\n let per = 1 / steps;\n let n = stepsD === 'start' ? Math.ceil(percent / per) : Math.floor(percent / per);\n return n / steps;\n }\n return percent;\n };\n }\n else {\n timingFunction = easing.getEasing(ea);\n }\n }\n return timingFunction;\n}\n\n/**\n * calIntermediateStyle计算优化,不能类型的style动画计算方式不同,也有可以复用的,\n * 全部if分支判断太长且浪费,相同计算的用hash存储,k为样式,v为方法,一次hash获取即可\n */\nconst CAL_HASH = [];\nCAL_HASH[TRANSFORM] = calTransform;\nCAL_HASH[ROTATE_3D] = calRotate3d;\nCAL_HASH[FILTER] = calFilter;\nCAL_HASH[TRANSFORM_ORIGIN] = CAL_HASH[PERSPECTIVE_ORIGIN]\n = CAL_HASH[BORDER_TOP_LEFT_RADIUS] = CAL_HASH[BORDER_TOP_RIGHT_RADIUS]\n = CAL_HASH[BORDER_BOTTOM_RIGHT_RADIUS] = CAL_HASH[BORDER_BOTTOM_LEFT_RADIUS] = calOrigin;\nCAL_HASH[STROKE_WIDTH] = CAL_HASH[BACKGROUND_POSITION_X] = CAL_HASH[BACKGROUND_POSITION_Y] = calPosition;\nCAL_HASH[BOX_SHADOW] = calBoxShadow;\nCAL_HASH[BACKGROUND_SIZE] = calBgSize;\nCAL_HASH[OPACITY] = CAL_HASH[Z_INDEX] = calNumber;\nCAL_HASH[TRANSLATE_PATH] = calPath;\nCAL_HASH[FONT_SIZE] = CAL_HASH[TEXT_STROKE_WIDTH] = CAL_HASH[BORDER_BOTTOM_WIDTH] = CAL_HASH[BORDER_LEFT_WIDTH]\n = CAL_HASH[BORDER_RIGHT_WIDTH] = CAL_HASH[BORDER_TOP_WIDTH] = CAL_HASH[LEFT] = CAL_HASH[TOP] = CAL_HASH[RIGHT]\n = CAL_HASH[BOTTOM] = CAL_HASH[FLEX_BASIS] = CAL_HASH[WIDTH] = CAL_HASH[HEIGHT] = CAL_HASH[LINE_HEIGHT]\n = CAL_HASH[MARGIN_BOTTOM] = CAL_HASH[MARGIN_TOP] = CAL_HASH[MARGIN_LEFT] = CAL_HASH[MARGIN_RIGHT]\n = CAL_HASH[PADDING_TOP] = CAL_HASH[PADDING_RIGHT] = CAL_HASH[PADDING_LEFT] = CAL_HASH[PADDING_BOTTOM]\n = CAL_HASH[STROKE_WIDTH] = CAL_HASH[STROKE_MITERLIMIT] = CAL_HASH[LETTER_SPACING] = CAL_HASH[PERSPECTIVE]\n = CAL_HASH[TRANSLATE_X] = CAL_HASH[TRANSLATE_Y] = CAL_HASH[TRANSLATE_Z] = CAL_HASH[SKEW_X] = CAL_HASH[SKEW_Y]\n = CAL_HASH[SCALE_X] = CAL_HASH[SCALE_Y] = CAL_HASH[SCALE_Z] = CAL_HASH[ROTATE_X] = CAL_HASH[ROTATE_Y]\n = CAL_HASH[ROTATE_Z] = calLength;\nCAL_HASH[BACKGROUND_IMAGE] = CAL_HASH[FILL] = CAL_HASH[STROKE] = calGradient;\nCAL_HASH[BACKGROUND_COLOR] = CAL_HASH[BORDER_BOTTOM_COLOR] = CAL_HASH[BORDER_LEFT_COLOR] = CAL_HASH[BORDER_RIGHT_COLOR]\n = CAL_HASH[BORDER_TOP_COLOR] = CAL_HASH[COLOR] = CAL_HASH[TEXT_STROKE_COLOR] = calColor;\n\n// transform特殊处理,只有1个matrix,有可能不存在,需给默认矩阵\nfunction calTransform(k, v, percent, st, cl, frame, currentStyle) {\n if(!st || !st.length) {\n st = frame.style[k] = [{k: MATRIX, v: mx.identity()}];\n }\n if(!cl || !cl.length) {\n cl = frame.clone[k] = [{k: MATRIX, v: mx.identity()}];\n }\n for(let i = 0; i < 16; i++) {\n st[0].v[i] = cl[0].v[i] + v[i] * percent;\n }\n}\n\nfunction calRotate3d(k, v, percent, st, cl, frame, currentStyle) {\n st[0] = cl[0] + v[0] * percent;\n st[1] = cl[1] + v[1] * percent;\n st[2] = cl[2] + v[2] * percent;\n st[3].v = cl[3].v + v[3] * percent;\n}\n\nfunction calFilter(k, v, percent, st, cl, frame, currentStyle) {\n for(let i = 0, len = v.length; i < len; i++) {\n let item = v[i];\n if(item) {\n let k2 = st[i].k, v2 = st[i].v, clv = cl[i].v;\n // 只有dropShadow是多个数组,存放x/y/blur/spread/color\n if(k2 === 'dropShadow') {\n v2[0].v = clv[0].v + item[0] * percent;\n v2[1].v = clv[1].v + item[1] * percent;\n v2[2].v = clv[2].v + item[2] * percent;\n v2[3].v = clv[3].v + item[3] * percent;\n let c1 = v2[4], cv = clv[4], c2 = item[4];\n c1[0] = cv[0] + c2[0] * percent;\n c1[1] = cv[1] + c2[1] * percent;\n c1[2] = cv[2] + c2[2] * percent;\n c1[3] = cv[3] + c2[3] * percent;\n }\n // 其它都是带单位单值\n else {\n v2.v = clv.v + item * percent;\n }\n }\n }\n}\n\nfunction calOrigin(k, v, percent, st, cl, frame, currentStyle) {\n if(v[0] !== 0) {\n st[0].v = cl[0].v + v[0] * percent;\n }\n if(v[1] !== 0) {\n st[1].v = cl[1].v + v[1] * percent;\n }\n}\n\nfunction calPosition(k, v, percent, st, cl, frame, currentStyle) {\n st.forEach((item, i) => {\n if(v[i]) {\n item.v = cl[i].v + v[i] * percent;\n }\n });\n}\n\nfunction calBoxShadow(k, v, percent, st, cl, frame, currentStyle) {\n for(let i = 0, len = Math.min(st.length, v.length); i < len; i++) {\n if(!v[i]) {\n continue;\n }\n // x/y/blur/spread\n for(let j = 0; j < 4; j++) {\n st[i][j].v = cl[i][j].v + v[i][j] * percent;\n }\n // rgba\n for(let j = 0; j < 4; j++) {\n st[i][4][j] = cl[i][4][j] + v[i][4][j] * percent;\n }\n }\n}\n\nfunction calBgSize(k, v, percent, st, cl, frame, currentStyle) {\n st.forEach((item, i) => {\n let o = v[i];\n if(o) {\n item[0].v = cl[i][0].v + o[0] * percent;\n item[1].v = cl[i][1].v + o[1] * percent;\n }\n });\n}\n\nfunction calNumber(k, v, percent, st, cl, frame, currentStyle) {\n st = cl + v * percent;\n // 精度问题可能会超过[0,1]区间\n if(k === OPACITY) {\n if(st < 0) {\n st = 0;\n }\n else if(st > 1) {\n st = 1;\n }\n }\n currentStyle[k] = st;\n}\n\n// 特殊的曲线运动计算,转换为translateXY,出现在最后一定会覆盖原本的translate防重\nfunction calPath(k, v, percent, st, cl, frame, currentStyle) {\n let t = 1 - percent;\n if(v.length === 8) {\n currentStyle[TRANSLATE_X] = {\n v: v[0].v * t * t * t\n + 3 * v[2].v * percent * t * t\n + 3 * v[4].v * percent * percent * t\n + v[6].v * percent * percent * percent,\n u: PX,\n };\n currentStyle[TRANSLATE_Y] = {\n v: v[1].v * t * t * t\n + 3 * v[3].v * percent * t * t\n + 3 * v[5].v * percent * percent * t\n + v[7].v * percent * percent * percent,\n u: PX,\n };\n }\n else if(v.length === 6) {\n currentStyle[TRANSLATE_X] = {\n v: v[0].v * t * t\n + 2 * v[2].v * percent * t\n + v[4].v * percent * percent,\n u: PX,\n };\n currentStyle[TRANSLATE_Y] = {\n v: v[1].v * t * t\n + 3 * v[3].v * percent * t\n + v[5].v * percent * percent,\n u: PX,\n };\n }\n}\n\nfunction calLength(k, v, percent, st, cl, frame, currentStyle) {\n st.v = cl + v * percent;\n}\n\nfunction calGradient(k, v, percent, st, cl, frame, currentStyle) {\n st.forEach((st2, i) => {\n let v2 = v[i];\n if(!v2) {\n return;\n }\n let cli = cl[i].v;\n if(st2.u === GRADIENT) {\n st2 = st2.v;\n let [c, d, p, z] = v2;\n for(let j = 0, len = Math.min(st2.v.length, c.length); j < len; j++) {\n let a = st2.v[j];\n let b = c[j];\n a[0][0] = cli.v[j][0][0] + b[0][0] * percent;\n a[0][1] = cli.v[j][0][1] + b[0][1] * percent;\n a[0][2] = cli.v[j][0][2] + b[0][2] * percent;\n a[0][3] = cli.v[j][0][3] + b[0][3] * percent;\n if(a[1] && b[1]) {\n a[1].v = cli.v[j][1].v + b[1] * percent;\n }\n }\n if(st2.k === 'linear' && st2.d !== undefined && d !== undefined) {\n if(Array.isArray(d)) {\n st2.d[0] = cli.d[0] + d[0] * percent;\n st2.d[1] = cli.d[1] + d[1] * percent;\n st2.d[2] = cli.d[2] + d[2] * percent;\n st2.d[3] = cli.d[3] + d[3] * percent;\n }\n else {\n st2.d = cli.d + d * percent;\n }\n }\n else if(st2.k === 'radial') {\n if(st2.z !== undefined && z !== undefined) {\n st2.z[0] = cli.z[0] + z[0] * percent;\n st2.z[1] = cli.z[1] + z[1] * percent;\n st2.z[2] = cli.z[2] + z[2] * percent;\n st2.z[3] = cli.z[3] + z[3] * percent;\n st2.z[4] = cli.z[4] + z[4] * percent;\n }\n else if(st2.p !== undefined && p !== undefined) {\n st2.p[0].v = cli.p[0].v + p[0] * percent;\n st2.p[1].v = cli.p[1].v + p[1] * percent;\n }\n }\n else if(st2.k === 'conic' && st2.d !== undefined && d !== undefined) {\n st2.d = cli.d + d * percent;\n st2.p[0][0] = cli.p[0] + p[0] * percent;\n st2.p[1][0] = cli.p[1] + p[1] * percent;\n }\n }\n // fill纯色\n else {\n st2 = st2.v;\n st2[0] = cli[0] + v2[0] * percent;\n st2[1] = cli[1] + v2[1] * percent;\n st2[2] = cli[2] + v2[2] * percent;\n st2[3] = cli[3] + v2[3] * percent;\n }\n });\n}\n\n// color可能超限[0,255],但浏览器已经做了限制,无需关心\nfunction calColor(k, v, percent, st, cl, frame, currentStyle) {\n let t = st.v;\n t[0] = cl[0] + v[0] * percent;\n t[1] = cl[1] + v[1] * percent;\n t[2] = cl[2] + v[2] * percent;\n t[3] = cl[3] + v[3] * percent;\n}\n\n/**\n * 根据百分比和缓动函数计算中间态样式\n * 当easing定义为steps时,优先计算\n * @param frame 当前帧\n * @param percent 到下一帧时间的百分比\n * @param target vd\n * @param notSameFrame 是否发生了帧切换\n * @return {[]} 发生变更的样式key\n */\nfunction calIntermediateStyle(frame, percent, target, notSameFrame) {\n let style = frame.style;\n let transition = frame.transition;\n let timingFunction = frame.timingFunction;\n let allInFn = frame.allInFn;\n if(timingFunction && timingFunction !== linear) {\n percent = timingFunction(percent);\n }\n // 同一关键帧同一percent可以不刷新,比如diff为0时,或者steps情况,离开会清空\n if(frame.lastPercent === percent) {\n return [];\n }\n frame.lastPercent = percent;\n let currentStyle = target.__currentStyle, res = frame.keys;\n // 特殊性能优化,for拆开v8会提升不少\n if(allInFn) {\n for(let i = 0, len = transition.length; i < len; i++) {\n let item = transition[i];\n let k = item.k, v = item.v, cs = item.cs, cl = item.cl, fn = item.fn;\n // 同一帧内计算可避免赋值currentStyle\n if(notSameFrame) {\n cs = item.cs = currentStyle[k] = item.st;\n }\n fn(k, v, percent, cs, cl, frame, currentStyle);\n }\n }\n else {\n let currentProps = target.__currentProps, modify;\n for(let i = 0, len = transition.length; i < len; i++) {\n let item = transition[i];\n let k = item.k, v = item.v, cs = item.cs, st = item.st, cl = item.cl, fn = item.fn;\n if(fn) {\n // 同一帧内计算可避免赋值currentStyle\n if(notSameFrame) {\n cs = item.cs = currentStyle[k] = item.st;\n }\n fn(k, v, percent, cs, cl, frame, currentStyle);\n }\n else if(GEOM.hasOwnProperty(k)) {\n let tagName = target.tagName;\n if(GEOM[k][tagName] && isFunction(GEOM[k][tagName].calIncrease)) {\n let fn = GEOM[k][tagName].calIncrease;\n if(target.isMulti) {\n st = st.map((item, i) => {\n return fn(item, v[i], percent);\n });\n }\n else {\n st = fn(st, v, percent);\n }\n }\n else if(target.isMulti) {\n if(k === 'points' || k === 'controls') {\n for(let i = 0, len = Math.min(st.length, v.length); i < len; i++) {\n let o = st[i];\n let n = v[i];\n let cli = cl[i];\n if(!isNil(o) && !isNil(n)) {\n for(let j = 0, len2 = Math.min(o.length, n.length); j < len2; j++) {\n let o2 = o[j];\n let n2 = n[j];\n if(!isNil(o2) && !isNil(n2)) {\n for(let k = 0, len3 = Math.min(o2.length, n2.length); k < len3; k++) {\n if(!isNil(o2[k]) && !isNil(n2[k])) {\n o2[k] = cli[j][k] + n2[k] * percent;\n }\n }\n }\n }\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n v.forEach((item, i) => {\n let st2 = st[i];\n if(!isNil(item[0]) && !isNil(st2[0])) {\n st2[0] = cl[i][0] + item[0] * percent;\n }\n if(!isNil(item[1]) && !isNil(st2[1])) {\n st2[1] = cl[i][1] + item[1] * percent;\n }\n });\n }\n else {\n v.forEach((item, i) => {\n if(!isNil(item) && !isNil(st[i])) {\n st[i] = cl[i] + item * percent;\n }\n });\n }\n }\n else {\n if(k === 'points' || k === 'controls') {\n for(let i = 0, len = Math.min(st.length, v.length); i < len; i++) {\n let o = st[i];\n let n = v[i];\n if(!isNil(o) && !isNil(n)) {\n for(let j = 0, len2 = Math.min(o.length, n.length); j < len2; j++) {\n if(!isNil(o[j]) && !isNil(n[j])) {\n o[j] = cl[i][j] + n[j] * percent;\n }\n }\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n if(!isNil(st[0]) && !isNil(v[0])) {\n st[0] = cl[0] + v[0] * percent;\n }\n if(!isNil(st[1]) && !isNil(v[1])) {\n st[1] = cl[1] + v[1] * percent;\n }\n }\n else {\n if(!isNil(st) && !isNil(v)) {\n st = cl + v * percent;\n }\n }\n }\n currentProps[k] = st;\n }\n // string等的直接量,在不同帧之间可能存在变化,同帧变化后不再改变\n else {\n if(currentStyle[k] !== st) {\n currentStyle[k] = st;\n }\n else {\n if(!modify) {\n modify = true;\n res = res.slice(0);\n }\n let j = res.indexOf(k);\n res.splice(j, 1);\n }\n }\n }\n // 无变化的也得检查是否和当前相等,防止跳到一个不变化的帧上,而前一帧有变化的情况,allInFn不会有这里\n let fixed = frame.fixed;\n for(let i = 0, len = fixed.length; i < len; i++) {\n let k = fixed[i];\n let isGeom = GEOM.hasOwnProperty(k);\n if(!equalStyle(k, style[k], isGeom ? currentProps[k] : currentStyle[k], target)) {\n if(GEOM.hasOwnProperty(k)) {\n currentProps[k] = style[k];\n }\n else {\n currentStyle[k] = style[k];\n }\n if(!modify) {\n modify = true;\n res = res.slice(0);\n }\n res.push(k);\n }\n }\n }\n return res;\n}\n\n/**\n * 最后一帧无法计算transition,对整体keys的style进行对比\n */\nfunction calLastStyle(style, target, keys) {\n let currentStyle = target.__currentStyle, currentProps = target.__currentProps, res = [];\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i], v = style[k];\n let isGeom = GEOM.hasOwnProperty(k);\n if(!equalStyle(k, v, isGeom ? currentProps[k] : currentStyle[k], target)) {\n if(isGeom) {\n currentProps[k] = v;\n }\n else {\n currentStyle[k] = v;\n }\n res.push(k);\n }\n }\n return res;\n}\n\nfunction gotoOverload(options, cb) {\n if(isFunction(options)) {\n cb = options;\n options = {};\n }\n return [options || {}, cb];\n}\n\nfunction frameCb(self) {\n self.emit(Event.FRAME, self.__isChange);\n if(self.__firstPlay) {\n self.__firstPlay = false;\n self.emit(Event.PLAY);\n }\n let cb = self.__playCb;\n if(isFunction(cb)) {\n cb(self.__isChange);\n // 清理要检查,gotoAndStop()这种cb回调中直接再次调用goto的话cb会不一致不能删除\n if(self.__playCb === cb) {\n self.__playCb = null;\n }\n }\n}\n\nlet uuid = 0;\n\nclass Animation extends Event {\n constructor(target, list, options) {\n super();\n this.__id = uuid++;\n list = clone(list || []);\n if(Array.isArray(list)) {\n list = list.filter(item => item && isObject(item));\n }\n // 动画过程另外一种形式,object描述k-v形式\n else if(list && isObject(list)) {\n let nl = [];\n Object.keys(list).forEach(k => {\n let v = list[k];\n if(Array.isArray(v)) {\n for(let i = 0, len = v.length; i < len; i++) {\n let o = nl[i] = nl[i] || {\n offset: i / (len - 1),\n };\n o[k] = v[i];\n }\n }\n });\n list = nl;\n }\n else {\n list = [];\n }\n if(isNumber(options)) {\n this.__options = {\n duration: options,\n };\n options = this.__options;\n }\n let op = this.__options = options || {\n duration: 0,\n };\n this.__begin = true;\n this.__playState = 'idle';\n this.__target = target;\n this.__root = target.root;\n this.__isChange = false; // 每帧是否有变化,无变化不刷新也会触发frame事件\n this.__firstPlay = true;\n this.__firstEnter = true;\n let iterations = this.iterations = op.iterations;\n let duration = this.duration = op.duration;\n let { frames, framesR, keys, originStyle } = this.__init(list, iterations, duration, op.easing, target);\n this.__frames = frames;\n this.__framesR = framesR;\n this.__keys = keys;\n this.__originStyle = originStyle;\n this.__isDelay = false;\n this.__outBeginDelay = false;\n this.__playCount = 0;\n let fps = parseInt(op.fps) || 0;\n if(fps <= 0) {\n fps = 60;\n }\n this.fps = fps;\n this.spfLimit = op.spfLimit;\n this.delay = op.delay;\n this.endDelay = op.endDelay;\n this.playbackRate = op.playbackRate;\n this.fill = op.fill;\n this.iterations = op.iterations;\n this.direction = op.direction;\n this.easing = op.easing;\n this.__currentFrames = {\n reverse: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(op.direction) ? framesR : frames;\n // 时间戳\n this.__timestamp = frame.__now;\n }\n\n __init(list, iterations, duration, easing, target) {\n if(list.length < 1) {\n return { frames: [], framesR: [], keys: [], originStyle: {} };\n }\n // 过滤时间非法的,过滤后续offset<=前面的\n let offset = -1;\n for(let i = 0, len = list.length; i < len; i++) {\n let current = list[i];\n if(current.hasOwnProperty('offset')) {\n current.offset = parseFloat(current.offset) || 0;\n current.offset = Math.max(0, current.offset);\n current.offset = Math.min(1, current.offset);\n // 超过区间[0,1]\n if(isNaN(current.offset) || current.offset < 0 || current.offset > 1) {\n list.splice(i, 1);\n i--;\n len--;\n continue;\n }\n // <=前面的\n else if(current.offset <= offset) {\n list.splice(i, 1);\n i--;\n len--;\n continue;\n }\n }\n // 缩写处理\n Object.keys(current).forEach(k => {\n if(abbr.hasOwnProperty(k)) {\n abbr.toFull(current, k);\n }\n });\n // 检查key合法性\n Object.keys(current).forEach(k => {\n if(k !== 'easing' && k !== 'offset' && !change.isValid(target.tagName, k)) {\n delete current[k];\n }\n });\n }\n // 只有1帧复制出来变成2帧方便运行\n if(list.length === 1) {\n list[0] = clone(list[0]);\n if(list[0].offset === 1) {\n list.unshift({\n offset: 0,\n });\n }\n else {\n let copy = clone(list[0]);\n copy.offset = 1;\n list.push(copy);\n }\n }\n // 强制clone防止同引用\n else {\n list.forEach((item, i) => {\n list[i] = clone(item);\n });\n }\n // 首尾时间偏移强制为[0, 1],不是的话前后加空帧\n let first = list[0];\n if(first.hasOwnProperty('offset') && first.offset > 0) {\n first = {\n offset: 0,\n };\n list.unshift(first);\n }\n else {\n first.offset = 0;\n }\n let last = list[list.length - 1];\n if(last.hasOwnProperty('offset') && last.offset < 1) {\n last = {\n offset: 1,\n };\n list.push(last);\n }\n else {\n last.offset = 1;\n }\n // 计算没有设置offset的时间\n for(let i = 1, len = list.length; i < len; i++) {\n let start = list[i];\n // 从i=1开始offset一定>0,找到下一个有offset的,均分中间无声明的\n if(!start.hasOwnProperty('offset')) {\n let end;\n let j = i + 1;\n for(; j < len; j++) {\n end = list[j];\n if(end.hasOwnProperty('offset')) {\n break;\n }\n }\n let num = j - i + 1;\n start = list[i - 1];\n let per = (end.offset - start.offset) / num;\n for(let k = i; k < j; k++) {\n let item = list[k];\n item.offset = start.offset + per * (k + 1 - i);\n }\n i = j;\n }\n }\n let frames = [];\n // 换算每一关键帧样式标准化\n list.forEach(item => {\n frames.push(framing(item, duration, easing));\n });\n // 为方便两帧之间计算变化,强制统一所有帧的css属性相同,没有写的为节点的当前样式currentStyle\n let keys = unify(frames, target);\n inherit(frames, keys, target);\n let framesR = clone(frames).reverse();\n // 存储原本样式以便恢复用\n let { __currentStyle, __currentProps } = target;\n let originStyle = {};\n keys.forEach(k => {\n if(isGeom(target.tagName, k)) {\n originStyle[k] = __currentProps[k];\n }\n originStyle[k] = __currentStyle[k];\n });\n originStyle = cloneStyle(originStyle, keys);\n // 再计算两帧之间的变化,存入transition/fixed属性\n let length = frames.length;\n let prev = frames[0];\n for(let i = 1; i < length; i++) {\n let next = frames[i];\n prev = calFrame(prev, next, keys, target);\n }\n // 反向存储帧的倒排结果\n framesR.forEach(item => {\n item.time = duration - item.time;\n item.transition = [];\n });\n prev = framesR[0];\n for(let i = 1; i < length; i++) {\n let next = framesR[i];\n prev = calFrame(prev, next, keys, target);\n }\n return { frames, framesR, keys, originStyle };\n }\n\n __clean(isFinish) {\n this.__cancelTask();\n this.__nextTime = 0;\n if(isFinish) {\n // gotoAndStop到一个很大的时间的话,也需要防止超过\n this.__currentTime = this.__delay + this.__duration * this.__iterations + this.__endDelay;\n this.__playState = 'finished';\n }\n else {\n this.__playCount = this.__currentTime = 0;\n this.__playState = 'idle';\n }\n }\n\n play(cb) {\n let isDestroyed = this.__isDestroyed;\n let duration = this.__duration;\n let playState = this.__playState;\n let frames = this.__frames;\n if(isDestroyed || duration <= 0 || frames.length < 1) {\n return this;\n }\n if(playState === 'running') {\n return this;\n }\n this.__cancelTask();\n this.__playCb = cb;\n this.__playState = 'running';\n // 每次play调用标识第一次运行,需响应play事件和回调\n this.__firstPlay = true;\n this.__firstEnter = true;\n this.__playCount = 0;\n // 防止finish/cancel事件重复触发,每次播放重置\n this.__hasFin = false;\n this.__hasCancel = false;\n // 只有第一次调用会进初始化,另外finish/cancel视为销毁也会重新初始化\n if(!this.__enterFrame) {\n this.__enterFrame = true;\n let framesR = this.__framesR;\n let direction = this.__direction;\n // 初始化根据方向确定帧序列\n this.__currentFrames = {\n reverse: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(direction) ? framesR : frames;\n this.__currentTime = this.__nextTime = this.__fpsTime = 0;\n }\n // 添加每帧回调且立刻执行,本次执行调用refreshTask也是下一帧再渲染,frame的每帧都是下一帧\n // frame.offFrame(this);\n frame.onFrame(this);\n this.__startTime = frame.__now;\n this.__end = false;\n return this;\n }\n\n __before(diff) {\n this.__timestamp = frame.__now;\n let target = this.__target;\n let fps = this.__fps;\n let currentFrames = this.__currentFrames;\n let iterations = this.__iterations;\n let stayBegin = this.__stayBegin;\n let stayEnd = this.__stayEnd;\n let delay = this.__delay;\n let root = this.__root;\n let duration = this.__duration;\n let endDelay = this.__endDelay;\n let length = currentFrames.length;\n let playbackRate = this.__playbackRate;\n let spfLimit = this.__spfLimit;\n let currentTime = this.__currentTime = this.__nextTime;\n let lastFrame = this.__currentFrame;\n this.__isChange = false;\n // 定帧限制每帧时间间隔最大为spf\n if(spfLimit) {\n if(spfLimit === true) {\n diff = Math.min(diff, 1000 / fps);\n }\n else if(spfLimit > 0) {\n diff = Math.min(diff, spfLimit);\n }\n }\n // 播放时间累加,并且考虑播放速度加成\n if(playbackRate !== 1 && playbackRate > 0) {\n diff *= playbackRate;\n }\n // 用本帧和上帧时间差,计算累加运行时间currentTime,以便定位当前应该处于哪个时刻\n this.__nextTime += diff;\n // 增加的fps功能,当<60时计算跳帧,每帧运行依旧累加时间,达到fps时重置,第一帧强制不跳\n if(!this.__firstEnter && fps < 60) {\n diff = this.__fpsTime += diff;\n if(diff < 1000 / fps) {\n this.__inFps = true;\n return;\n }\n this.__fpsTime = 0;\n }\n this.__firstEnter = false;\n // delay仅第一次生效等待\n if(currentTime < delay) {\n if(stayBegin && !this.__isDelay) {\n let currentFrame = this.__currentFrame = currentFrames[0];\n let keys = calLastStyle(currentFrame.style, target, this.__keys);\n // 特殊处理,将ts上的cs指向当前currentStyle,一些继承样式如color被更新,否则delay后计算会报错\n let transition = currentFrame.transition;\n if(transition) {\n let currentStyle = target.__currentStyle;\n for(let i = 0, len = transition.length; i < len; i++) {\n let item = transition[i];\n item.cs = currentStyle[item.k] = item.st;\n }\n }\n this.__isChange = !!keys.length;\n genBeforeRefresh(keys, root, target, currentFrame, null);\n }\n this.__begin = false; // 默认是true,delay置false防触发\n // 即便不刷新,依旧执行帧回调,同时标明让后续第一帧响应begin\n this.__outBeginDelay = true;\n this.__isDelay = true;\n return;\n }\n this.__isDelay = false;\n // 减去delay,计算在哪一帧\n currentTime -= delay;\n if(this.__outBeginDelay) {\n this.__outBeginDelay = false;\n this.__begin = true;\n }\n // 超过duration非尾轮需处理回到开头,触发新一轮动画事件,这里可能时间间隔非常大直接跳过几轮\n let playCount = Math.min(iterations - 1, Math.floor(currentTime / duration));\n currentTime -= duration * playCount;\n // 如果发生轮换,需重新确定正反向\n if(this.__playCount < playCount) {\n this.__begin = true;\n this.__playCount = playCount;\n let direction = this.__direction;\n let frames = this.__frames;\n let framesR = this.__framesR;\n // 有正反向播放需要重设帧序列\n if(direction === 'alternate' || direction === 'alternate-reverse') {\n let isEven = playCount % 2 === 0;\n if(direction === 'alternate') {\n currentFrames = this.__currentFrames = isEven ? frames : framesR;\n }\n else {\n currentFrames = this.__currentFrames = isEven ? framesR : frames;\n }\n }\n }\n let isLastCount = playCount >= iterations - 1;\n // 只有2帧可优化,否则2分查找当前帧\n let i, frameTime;\n if(length === 2) {\n i = currentTime < duration ? 0 : 1;\n frameTime = duration;\n }\n else {\n i = binarySearch(0, length - 1, currentTime, currentFrames);\n frameTime = currentFrames[i].time;\n }\n // 最后一帧结束动画,仅最后一轮才会进入,需处理endDelay\n let isLastFrame = isLastCount && i === length - 1;\n let percent = 0;\n if(isLastFrame) {\n // 无需任何处理\n }\n // 否则根据目前到下一帧的时间差,计算百分比,再反馈到变化数值上\n else if(length === 2) {\n percent = currentTime / duration;\n }\n else {\n let total = currentFrames[i + 1].time - frameTime;\n percent = (currentTime - frameTime) / total;\n }\n let inEndDelay, currentFrame = currentFrames[i];\n let notSameFrame = lastFrame !== currentFrame;\n // 对比前后两帧是否为同一关键帧,不是则清除之前关键帧上的percent标识为-1,这样可以识别跳帧和本轮第一次进入此帧\n if(notSameFrame) {\n lastFrame && (lastFrame.lastPercent = -1);\n this.__currentFrame = currentFrame;\n }\n /** 这里要考虑全几种场景:\n * 1. 单次播放无endDelay且fill不停留(有/无差异,下同)\n * 2. 单次播放无endDelay且fill停留\n * 3. 单次播放有endDelay且fill不停留\n * 4. 单次播放有endDelay且fill停留\n * 5. 多次播放无endDelay且fill不停留(尾次/非尾次,下同)\n * 6. 多次播放无endDelay且fill停留\n * 7. 多次播放有endDelay且fill不停留\n * 8. 多次播放有endDelay且fill停留\n */\n let needClean;\n let keys;\n if(isLastFrame) {\n inEndDelay = currentTime < duration + endDelay;\n // 停留对比最后一帧,endDelay可能会多次进入这里,第二次进入样式相等不再重绘\n if(stayEnd) {\n keys = calLastStyle(currentFrame.style, target, this.__keys);\n }\n // 不停留或超过endDelay则计算还原,有endDelay且fill模式不停留会再次进入这里\n else {\n keys = calLastStyle(this.__originStyle, target, this.__keys);\n currentFrame = null; // 特殊清空,genBeforeRefresh()时不传过去\n }\n // 进入endDelay或结束阶段触发end事件,注意只触发一次,防重在触发的地方做\n this.__nextEnd = true;\n if(!inEndDelay) {\n this.__playCount++;\n this.__finished = true;\n frame.offFrame(this);\n needClean = true;\n this.__nextTime = 0;\n }\n }\n else {\n keys = calIntermediateStyle(currentFrame, percent, target, notSameFrame);\n }\n this.__isChange = !keys.length;\n genBeforeRefresh(keys, root, target, currentFrame, null);\n if(needClean) {\n let playCb = this.__playCb;\n this.__clean(true);\n // 丑陋的做法,防止gotoAndStop()这样的cb被clean()掉\n if(playCb) {\n this.__playCb = playCb;\n }\n }\n }\n\n __after() {\n if(this.__inFps) {\n this.__inFps = false;\n return;\n }\n frameCb(this);\n if(this.__begin) {\n this.__begin = false;\n this.emit(Event.BEGIN, this.__playCount);\n }\n // end事件只触发一次,末轮进入endDelay或直接结束时\n if(this.__nextEnd && !this.__end) {\n this.__end = true;\n this.emit(Event.END, this.__playCount - 1);\n }\n if(this.__finished) {\n this.__begin = this.__end = this.__isDelay = this.__finished\n = this.__inFps = this.__enterFrame = false;\n this.__playState = 'finished';\n this.emit(Event.FINISH, this.__isChange);\n }\n }\n\n pause(silence) {\n let isDestroyed = this.__isDestroyed;\n let duration = this.__duration;\n let { pending } = this;\n if(isDestroyed || duration <= 0 || pending) {\n return this;\n }\n this.__playState = 'paused';\n this.__cancelTask();\n if(!silence) {\n this.emit(Event.PAUSE);\n }\n return this;\n }\n\n resume(cb) {\n let isDestroyed = this.__isDestroyed;\n let duration = this.__duration;\n let playState = this.__playState;\n if(isDestroyed || duration <= 0 || playState !== 'paused') {\n return this;\n }\n return this.play(cb);\n }\n\n finish(cb) {\n let isDestroyed = this.__isDestroyed;\n let duration = this.__duration;\n let playState = this.__playState;\n let frames = this.__frames;\n if(isDestroyed || duration <= 0 || frames.length < 1) {\n return this;\n }\n if(playState === 'finished') {\n if(isFunction(cb)) {\n cb();\n }\n return this;\n }\n // 先清除所有回调任务,多次调用finish也会清除只留最后一次\n this.__clean(true);\n this.__begin = this.__end = this.__isDelay = this.__finished\n = this.__inFps = this.__enterFrame = false;\n this.__playState = 'finished';\n let root = this.__root;\n if(root) {\n let target = this.__target;\n let style;\n // 是否停留在最后一帧\n let currentFrame = null;\n if(this.__stayEnd) {\n let framesR = this.__framesR;\n let direction = this.__direction;\n let iterations = this.__iterations;\n if('reverse'.indexOf(direction) > -1) {\n [frames, framesR] = [framesR, frames];\n }\n if(iterations === Infinity || iterations % 2) {\n currentFrame = frames[frames.length - 1];\n style = currentFrame.style;\n }\n else {\n currentFrame = framesR[framesR.length - 1];\n style = currentFrame.style;\n }\n }\n else {\n style = this.__originStyle;\n }\n this.__currentFrame = currentFrame;\n let keys = calLastStyle(style, target, this.__keys);\n this.__isChange = !keys.length;\n genBeforeRefresh(keys, root, target, currentFrame, () => {\n frameCb(this);\n this.emit(Event.FINISH, this.__isChange);\n if(isFunction(cb)) {\n cb(this.__isChange);\n }\n });\n }\n return this;\n }\n\n cancel(cb) {\n let isDestroyed = this.__isDestroyed;\n let duration = this.__duration;\n let playState = this.__playState;\n let frames = this.__frames;\n if(isDestroyed || duration <= 0 || frames.length < 1) {\n return this;\n }\n if(playState === 'idle') {\n if(isFunction(cb)) {\n cb();\n }\n return this;\n }\n this.__clean();\n this.__begin = this.__end = this.__isDelay = this.__finished\n = this.__inFps = this.__enterFrame = false;\n this.__playState = 'idle';\n this.__currentFrame = null;\n let root = this.__root;\n if(root) {\n let target = this.__target;\n let keys = calLastStyle(this.__originStyle, target, this.__keys);\n this.__isChange = !keys.length;\n genBeforeRefresh(keys, root, target, null,() => {\n frameCb(this);\n this.emit(Event.CANCEL, this.__isChange);\n if(isFunction(cb)) {\n cb(this.__isChange);\n }\n });\n }\n return this;\n }\n\n gotoAndPlay(v, options, cb) {\n let isDestroyed = this.__isDestroyed;\n let duration = this.__duration;\n let frames = this.__frames;\n let delay = this.__delay;\n let endDelay = this.__endDelay;\n if(isDestroyed || duration <= 0 || frames.length < 1) {\n return this;\n }\n [options, cb] = gotoOverload(options, cb);\n // 计算出时间点直接累加播放\n this.__goto(v, options.isFrame, options.excludeDelay);\n if(v > duration + delay + endDelay) {\n return this.finish(cb);\n }\n return this.play(cb);\n }\n\n gotoAndStop(v, options, cb) {\n let isDestroyed = this.__isDestroyed;\n let duration = this.__duration;\n let frames = this.__frames;\n let delay = this.__delay;\n let endDelay = this.__endDelay;\n if(isDestroyed || duration <= 0 || frames.length < 1) {\n return this;\n }\n [options, cb] = gotoOverload(options, cb);\n v = this.__goto(v, options.isFrame, options.excludeDelay);\n if(v > duration + delay + endDelay) {\n return this.finish(cb);\n }\n // 先play一帧,回调里模拟暂停\n return this.play(() => {\n this.__playState = 'paused';\n this.__cancelTask();\n if(isFunction(cb)) {\n cb();\n }\n });\n }\n\n // 返回不包含delay且去除多轮的时间\n __goto(v, isFrame, excludeDelay) {\n let iterations = this.__iterations;\n let duration = this.__duration;\n this.__playState = 'paused';\n // this.__cancelTask(); // 应该不需要,gotoAndXxx都会调用play(),里面有\n if(isNaN(v) || v < 0) {\n throw new Error('Param of gotoAnd(Play/Stop) is illegal: ' + v);\n }\n if(isFrame) {\n v = (v - 1) / this.spf;\n }\n if(excludeDelay) {\n v += this.__delay;\n }\n // 在时间范围内设置好时间,复用play直接跳到播放点\n this.__nextTime = v;\n v -= this.__delay;\n // 超过时间长度需要累加次数,这里可以超过iterations,因为设定也许会非常大\n let playCount = 0;\n while(v >= duration && playCount < iterations - 1) {\n playCount++;\n v -= duration;\n }\n this.__playCount = playCount;\n // 防止play()重置时间和当前帧组,提前计算好\n this.__enterFrame = true;\n let frames = this.__frames;\n let framesR = this.__framesR;\n let direction = this.__direction;\n if({\n alternate: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(direction)) {\n let isEven = playCount % 2 === 0;\n if(direction === 'alternate') {\n this.__currentFrames = isEven ? frames : framesR;\n }\n else {\n this.__currentFrames = isEven ? framesR : frames;\n }\n }\n return v;\n }\n\n addControl() {\n let root = this.root;\n if(!root) {\n return;\n }\n let ac = root.animateController;\n if(ac) {\n ac.add(this);\n }\n }\n\n removeControl() {\n let root = this.__root;\n if(!root) {\n return;\n }\n let ac = root.__animateController;\n if(ac) {\n ac.remove(this);\n }\n }\n\n __setTarget(target) {\n this.__target = target;\n }\n\n __cancelTask() {\n frame.offFrame(this);\n this.__playCb = null;\n }\n\n __destroy() {\n if(this.__isDestroyed) {\n return;\n }\n this.removeControl();\n this.__clean();\n this.__target = this.__root = null;\n this.__startTime = 0;\n this.__isDestroyed = true;\n }\n\n __checkModify() {\n if(this.__playState !== 'idle' && this.__playState !== 'finished') {\n inject.warn('Modification will not come into effect when animation is running');\n }\n }\n\n get id() {\n return this.__id;\n }\n\n get target() {\n return this.__target;\n }\n\n get root() {\n return this.__root;\n }\n\n get keys() {\n return this.__keys;\n }\n\n get options() {\n return this.__options;\n }\n\n get duration() {\n return this.__duration;\n }\n\n set duration(v) {\n v = Math.max(0, parseFloat(v) || 0);\n if(this.__duration !== v) {\n this.__duration = v;\n this.__checkModify();\n }\n return v;\n }\n\n get delay() {\n return this.__delay;\n }\n\n set delay(v) {\n v = Math.max(0, parseFloat(v) || 0);\n if(this.__delay !== v) {\n this.__delay = v;\n this.__checkModify();\n }\n return v;\n }\n\n get endDelay() {\n return this.__endDelay;\n }\n\n set endDelay(v) {\n v = Math.max(0, parseFloat(v) || 0);\n if(this.__endDelay !== v) {\n this.__endDelay = v;\n this.__checkModify();\n }\n return v;\n }\n\n get fps() {\n return this.__fps;\n }\n\n set fps(v) {\n v = parseInt(v) || 60;\n if(this.__fps !== v) {\n if(v <= 0) {\n v = 60;\n }\n this.__fps = v;\n }\n return v;\n }\n\n get spf() {\n return 1 / this.fps;\n }\n\n get iterations() {\n return this.__iterations;\n }\n\n set iterations(v) {\n if(v === Infinity || util.isString(v) && v.toLowerCase() === 'infinity') {\n v = Infinity;\n }\n else {\n v = parseInt(v);\n if(isNaN(v) || v < 0) {\n v = 1;\n }\n }\n if(this.__iterations !== v) {\n this.__iterations = v;\n }\n return v;\n }\n\n get fill() {\n return this.__fill;\n }\n\n set fill(v) {\n v = v || 'none';\n if(this.__fill !== v) {\n this.__fill = v;\n this.__checkModify();\n }\n this.__stayBegin = {\n backwards: true,\n both: true,\n }.hasOwnProperty(v);\n this.__stayEnd = {\n forwards: true,\n both: true,\n }.hasOwnProperty(v);\n return v;\n }\n\n get direction() {\n return this.__direction;\n }\n\n set direction(v) {\n v = v || 'normal';\n if(this.__direction !== v) {\n this.__direction = v;\n this.__checkModify();\n }\n return v;\n }\n\n get frames() {\n return this.__frames;\n }\n\n get framesR() {\n return this.__framesR;\n }\n\n get playbackRate() {\n return this.__playbackRate;\n }\n\n set playbackRate(v) {\n v = parseFloat(v) || 1;\n if(v <= 0) {\n v = 1;\n }\n if(this.__playbackRate !== v) {\n this.__playbackRate = v;\n }\n return v;\n }\n\n get easing() {\n return this.__easing;\n }\n\n set easing(v) {\n this.__easing = v;\n }\n\n get startTime() {\n return this.__startTime;\n }\n\n get currentTime() {\n return this.__currentTime;\n }\n\n set currentTime(v) {\n v = Math.max(0, parseFloat(v) || 0);\n if(this.__currentTime !== v) {\n this.__currentTime = v;\n this.__nextTime = v;\n }\n return v;\n }\n\n get nextTime() {\n return this.__nextTime;\n }\n\n set nextTime(v) {\n v = Math.max(0, parseFloat(v) || 0);\n if(this.__nextTime !== v) {\n this.__nextTime = v;\n }\n return v;\n }\n\n get timestamp() {\n return this.__timestamp;\n }\n\n get pending() {\n return this.__playState !== 'running';\n }\n\n get finished() {\n return this.__playState === 'finished';\n }\n\n get playState() {\n return this.__playState;\n }\n\n get playCount() {\n return this.__playCount;\n }\n\n set playCount(v) {\n v = Math.max(0, parseInt(v) || 0);\n if(this.__playCount !== v) {\n this.__playCount = v;\n }\n return v;\n }\n\n get isDestroyed() {\n return this.__isDestroyed;\n }\n\n get animating() {\n let playState = this.__playState;\n if(playState === 'idle') {\n return false;\n }\n return playState !== 'finished' || this.__stayEnd || this.__stayBegin;\n }\n\n get spfLimit() {\n return this.__spfLimit;\n }\n\n set spfLimit(v) {\n if(util.isNumber(v) || /^\\d/.test(v)) {\n v = Math.max(0, parseInt(v) || 0);\n }\n else {\n v = !!v;\n }\n if(this.__spfLimit !== v) {\n this.__spfLimit = v;\n }\n return v;\n }\n}\n\nexport default Animation;\n","import mode from '../refresh/mode';\nimport geom from '../math/geom';\nimport blur from '../math/blur';\nimport util from '../util/util';\nimport painter from '../util/painter';\n\nconst { int2rgba } = util;\nconst { canvasPolygon, svgPolygon } = painter;\n\nfunction renderBoxShadow(xom, renderMode, ctx, data, x1, y1, x2, y2, w, h, dx = 0, dy = 0) {\n x1 += dx;\n y1 += dy;\n x2 += dx;\n y2 += dy;\n let [x, y, sigma, spread, color, inset] = data;\n let c = int2rgba(color);\n let n = Math.abs(sigma) * 2 + Math.abs(spread) * 2 + Math.abs(x) * 2 + Math.abs(y) * 2;\n // box本身坐标顺时针\n let box = [\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1, y2],\n [x1, y1],\n ];\n // 算上各种偏移/扩散的最外层坐标,且逆时针\n let outer = [\n [x1 - n, y1 - n],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n ];\n if(color[3] > 0) {\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n ctx.save();\n ctx.beginPath();\n // inset裁剪box外面\n if(inset === 'inset') {\n let xa = x1 + x + spread;\n let ya = y1 + y + spread;\n let xb = x2 + x - spread;\n let yb = y2 + y - spread;\n let spreadBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n // 是否相交判断需要绘制\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [spreadBox[0][0], spreadBox[0][1], spreadBox[2][0], spreadBox[2][1]]);\n if(!cross) {\n return;\n }\n cross = [\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ];\n // 扩散区域类似边框填充\n if(spread) {\n canvasPolygon(ctx, cross);\n canvasPolygon(ctx, box.slice(0).reverse());\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== c) {\n ctx.fillStyle = c;\n }\n canvasPolygon(ctx, box);\n ctx.fill();\n ctx.closePath();\n ctx.restore();\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, cross);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n // 画在外围的空心矩形,宽度要比blur大,n考虑了这一情况取了最大值\n canvasPolygon(ctx, [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [x1 - n, yb],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, yb],\n [xa, yb],\n [xa, ya],\n ]);\n }\n else {\n canvasPolygon(ctx, box);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowOffsetX = x;\n ctx.shadowOffsetY = y;\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n canvasPolygon(ctx, [\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1 - n, y2],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, y2],\n [x1, y2],\n [x1, y1],\n ]);\n }\n }\n // outset需裁减掉box本身的内容,clip()非零环绕显示box外的阴影内容,fill()绘制在内无效\n else {\n let xa = x1 + x - spread;\n let ya = y1 + y - spread;\n let xb = x2 + x + spread;\n let yb = y2 + y + spread;\n let blurBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [blurBox[0][0], blurBox[0][1], blurBox[2][0], blurBox[2][1]]);\n // 分为是否有spread,因模糊成本spread区域将没有模糊\n if(spread) {\n // 扩散区域类似边框填充\n canvasPolygon(ctx, box);\n canvasPolygon(ctx, blurBox.slice(0).reverse());\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== c) {\n ctx.fillStyle = c;\n }\n canvasPolygon(ctx, blurBox);\n ctx.fill();\n ctx.closePath();\n ctx.restore();\n ctx.save();\n ctx.beginPath();\n // 阴影部分看相交情况裁剪,有相交时逆时针绘制相交区域即可排除之\n if(cross) {\n canvasPolygon(ctx, [\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ].reverse());\n }\n canvasPolygon(ctx, box);\n canvasPolygon(ctx, blurBox);\n canvasPolygon(ctx, outer);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n canvasPolygon(ctx, blurBox);\n }\n else {\n canvasPolygon(ctx, box);\n canvasPolygon(ctx, outer);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowOffsetX = x;\n ctx.shadowOffsetY = y;\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n canvasPolygon(ctx, box);\n }\n }\n ctx.fill();\n ctx.closePath();\n ctx.restore();\n }\n else if(renderMode === mode.SVG) {\n let d = blur.outerSize(sigma);\n if(inset === 'inset') {\n let xa = x1 + x + spread;\n let ya = y1 + y + spread;\n let xb = x2 + x - spread;\n let yb = y2 + y - spread;\n let spreadBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [spreadBox[0][0], spreadBox[0][1], spreadBox[2][0], spreadBox[2][1]]);\n if(!cross) {\n return;\n }\n cross = [\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ];\n if(spread) {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', 0],\n ['dy', 0],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n }\n xom.__cacheDefs.push(v);\n let filter = ctx.add(v);\n let v2 = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(cross) + svgPolygon(box.slice(0).reverse())],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v2);\n xom.__cacheDefs.push(v2);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(box)],\n ['fill', c],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(cross)],\n ['fill', '#FFF'],\n ],\n }],\n };\n clip = ctx.add(v);\n xom.__cacheDefs.push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon([\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [x1 - n, yb],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, yb],\n [xa, yb],\n [xa, ya],\n ])],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n else {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', x],\n ['dy', y],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n }\n let filter = ctx.add(v);\n xom.__cacheDefs.push(v);\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(box)],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v);\n xom.__cacheDefs.push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon([\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1 - n, y2],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, y2],\n [x1, y2],\n [x1, y1],\n ])],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n }\n else {\n let xa = x1 + x - spread;\n let ya = y1 + y - spread;\n let xb = x2 + x + spread;\n let yb = y2 + y + spread;\n let blurBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [blurBox[0][0], blurBox[0][1], blurBox[2][0], blurBox[2][1]]);\n if(spread) {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', 0],\n ['dy', 0],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n };\n let filter = ctx.add(v);\n xom.__cacheDefs.push(v);\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(box) + svgPolygon(blurBox.slice(0).reverse())],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v);\n xom.__cacheDefs.push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(blurBox)],\n ['fill', c],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', (cross ? svgPolygon([\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ].reverse()) : '')\n + svgPolygon(box) + svgPolygon(blurBox) + svgPolygon(outer)],\n ['fill', '#FFF'],\n ],\n }],\n };\n clip = ctx.add(v);\n xom.__cacheDefs.push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(blurBox)],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n else {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', x],\n ['dy', y],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n };\n let filter = ctx.add(v);\n xom.__cacheDefs.push(v);\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(box) + svgPolygon(outer)],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v);\n xom.__cacheDefs.push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(box)],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n }\n }\n }\n}\n\nexport default {\n renderBoxShadow,\n};\n","const hash = {};\n\nfunction mbmName(v) {\n if(v) {\n if(hash.hasOwnProperty(v)) {\n return hash[v];\n }\n return hash[v] = v.replace(/[A-Z]/, function($0) {\n return '-' + $0.toLowerCase();\n });\n }\n}\n\nfunction isValidMbm(v) {\n if(v === 'normal') {\n return false;\n }\n return v === 'multiply'\n || v === 'screen'\n || v === 'overlay'\n || v === 'darken'\n || v === 'lighten'\n || v === 'colorDodge'\n || v === 'color-dodge'\n || v === 'colorBurn'\n || v === 'color-burn'\n || v === 'hardLight'\n || v === 'hard-light'\n || v === 'softLight'\n || v === 'soft-light'\n || v === 'difference'\n || v === 'exclusion'\n || v === 'hue'\n || v === 'saturation'\n || v === 'color'\n || v === 'luminosity';\n}\n\nexport default {\n mbmName,\n isValidMbm,\n};\n","import Node from './Node';\nimport Component from './Component';\nimport inline from './inline';\nimport Ellipsis from './Ellipsis';\nimport unit from '../style/unit';\nimport tf from '../style/transform';\nimport gradient from '../style/gradient';\nimport border from '../style/border';\nimport css from '../style/css';\nimport bg from '../style/bg';\nimport abbr from '../style/abbr';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport painter from '../util/painter';\nimport Animation from '../animate/Animation';\nimport frame from '../animate/frame';\nimport mx from '../math/matrix';\nimport geom from '../math/geom';\nimport mode from '../refresh/mode';\nimport change from '../refresh/change';\nimport level from '../refresh/level';\nimport font from '../style/font';\nimport bs from '../style/bs';\nimport mbm from '../style/mbm';\nimport reset from '../style/reset';\n\nconst { svgPolygon } = painter;\nconst { CANVAS, SVG, WEBGL } = mode;\nconst { normalize, equalStyle } = css;\n\nconst {\n STYLE_KEY,\n STYLE_RV_KEY,\n style2Upper,\n STYLE_KEY: {\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n PADDING_LEFT,\n PADDING_RIGHT,\n PADDING_TOP,\n PADDING_BOTTOM,\n MARGIN_LEFT,\n MARGIN_TOP,\n MARGIN_BOTTOM,\n MARGIN_RIGHT,\n BORDER_LEFT_WIDTH,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_RIGHT_WIDTH,\n TOP,\n RIGHT,\n BOTTOM,\n LEFT,\n POSITION,\n DISPLAY,\n WIDTH,\n HEIGHT,\n MATRIX,\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n TRANSFORM,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n SKEW_X,\n SKEW_Y,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n ROTATE_3D,\n TRANSFORM_ORIGIN,\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n BACKGROUND_SIZE,\n BACKGROUND_COLOR,\n BACKGROUND_IMAGE,\n BACKGROUND_REPEAT,\n BOX_SHADOW,\n OPACITY,\n Z_INDEX,\n BORDER_TOP_STYLE,\n BORDER_RIGHT_STYLE,\n BORDER_BOTTOM_STYLE,\n BORDER_LEFT_STYLE,\n FILTER,\n OVERFLOW,\n MIX_BLEND_MODE,\n TEXT_OVERFLOW,\n BORDER_TOP_COLOR,\n BORDER_BOTTOM_COLOR,\n BORDER_LEFT_COLOR,\n BORDER_RIGHT_COLOR,\n FONT_STYLE,\n COLOR,\n VISIBILITY,\n POINTER_EVENTS,\n BORDER_TOP,\n BORDER_RIGHT,\n BORDER_BOTTOM,\n BORDER_LEFT,\n BACKGROUND_CLIP,\n FONT_SIZE,\n FONT_FAMILY,\n LINE_HEIGHT,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n FONT_WEIGHT,\n FLEX_DIRECTION,\n JUSTIFY_CONTENT,\n ALIGN_ITEMS,\n ALIGN_SELF,\n FLEX_GROW,\n FLEX_SHRINK,\n LINE_CLAMP,\n ORDER,\n FLEX_WRAP,\n ALIGN_CONTENT,\n TEXT_ALIGN,\n LETTER_SPACING,\n WHITE_SPACE,\n WRITING_MODE,\n TRANSFORM_STYLE,\n BACKFACE_VISIBILITY,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, INHERIT, NUMBER, RGBA, STRING, REM, VW, VH, VMAX, VMIN, DEG, GRADIENT } = unit;\nconst { int2rgba, rgba2int, joinArr, isNil, isFunction } = util;\nconst { calRelative, calNormalLineHeight, calFontFamily, spreadBoxShadow, spreadFilter } = css;\nconst { GEOM } = change;\nconst { mbmName, isValidMbm } = mbm;\nconst { point2d, multiply,\n multiplyRotateX, multiplyRotateY, multiplyRotateZ,\n multiplySkewX, multiplySkewY,\n multiplyScaleX, multiplyScaleY, multiplyScaleZ } = mx;\n\nconst {\n TRANSFORM: TF,\n REFLOW,\n REPAINT,\n TRANSLATE_X: TX,\n TRANSLATE_Y: TY,\n TRANSLATE_Z: TZ,\n ROTATE_Z: RZ,\n SCALE_X: SX,\n SCALE_Y: SY,\n SCALE_Z: SZ,\n SCALE,\n TRANSFORM_ALL,\n CACHE,\n MASK,\n} = level;\nconst { d2r } = geom;\nconst { calRotateX, calRotateY, calRotateZ, calRotate3d } = tf;\n\nfunction getFirstEmptyInlineWidth(xom) {\n let n = 0;\n let flowChildren = xom.flowChildren;\n let length = flowChildren.length;\n for(let i = 0; i < length; i++) {\n let child = flowChildren[i];\n if(child instanceof Xom || child instanceof Component && child.shadowRoot instanceof Xom) {\n if(child.flowChildren && child.flowChildren.length) {\n n += getFirstEmptyInlineWidth(child);\n break;\n }\n else if(child.__isInline) {\n n += child.outerWidth;\n }\n }\n else {\n break;\n }\n }\n return n;\n}\n\nfunction getLastEmptyInlineWidth(xom) {\n let n = 0;\n let flowChildren = xom.flowChildren;\n let length = flowChildren.length;\n for(let i = length - 1; i >= 0; i--) {\n let child = flowChildren[i];\n if(child instanceof Xom || child instanceof Component && child.shadowRoot instanceof Xom) {\n if(child.flowChildren && child.flowChildren.length) {\n n += getLastEmptyInlineWidth(child);\n break;\n }\n else {\n n += child.outerWidth;\n }\n }\n else {\n break;\n }\n }\n return n;\n}\n\nclass Xom extends Node {\n constructor(tagName, props = {}) {\n super();\n // 构建工具中都是arr,手写可能出现hash情况\n if(Array.isArray(props)) {\n this.props = util.arr2hash(props);\n }\n else {\n this.props = props;\n }\n this.__tagName = tagName;\n this.__style = this.props.style || {}; // style被解析后的k-v形式\n this.__currentStyle = []; // 动画过程中绘制一开始会merge动画样式\n this.__computedStyle = []; // 类似getComputedStyle()将currentStyle计算好数值赋给\n this.__listener = {};\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n if(/^on[a-zA-Z]/.test(k)) {\n k = k.slice(2).toLowerCase();\n this.listener[k] = v;\n }\n });\n this.__animationList = [];\n this.__loadBgi = {\n // 刷新回调函数,用以destroy取消用\n cb: function() {\n },\n };\n this.__cacheStyle = []; // 是否缓存重新计算computedStyle的样式key\n this.__cacheDefs = []; // svg专用,缓存渲染时使用已有的defs,diff过程用,否则会defs被清空\n let isClip = this.__clip = !!this.props.clip;\n this.__mask = isClip || !!this.props.mask;\n this.__refreshLevel = REFLOW;\n this.__limitCache = false;\n this.__isInline = false;\n this.__hasContent = false;\n this.__opacity = 1;\n this.__matrix = [];\n this.__matrixEvent = [];\n this.__perspectiveMatrix = null;\n this.__frameAnimateList = [];\n this.__contentBoxList = []; // inline存储内容用\n this.__cacheAsBitmap = !!this.props.cacheAsBitmap;\n this.__cache = this.__cacheTotal = this.__cacheFilter = this.__cacheMask;\n this.__layoutData = null; // 缓存上次布局x/y/w/h数据\n this.__hasComputeReflow = false; // 每次布局计算缓存标,使得每次开始只computeReflow一次\n this.__parentLineBox = null; // inline时指向\n this.__fontRegister = {}; // 优先级字体尚未加载时记录回调hash,销毁时删除回调\n }\n\n __structure(lv, j) {\n let res = super.__structure(lv, j);\n if(this.__hasMask) {\n res.hasMask = this.__hasMask;\n }\n return res;\n }\n\n __modifyStruct() {}\n\n // 设置margin/padding的实际值,layout时执行,inline的垂直方向仍然计算值,但在布局时被忽略\n __mp(currentStyle, computedStyle, w) {\n [\n 'Top',\n 'Right',\n 'Bottom',\n 'Left',\n ].forEach(k => {\n let a = STYLE_KEY[style2Upper('margin' + k)];\n let b = STYLE_KEY[style2Upper('padding' + k)];\n computedStyle[a] = this.__calSize(currentStyle[a], w, true);\n computedStyle[b] = this.__calSize(currentStyle[b], w, true);\n });\n }\n\n __calSize(v, w, includePercent) {\n if(v.u === PX) {\n return v.v;\n }\n else if(v.u === PERCENT) {\n if(includePercent) {\n return v.v * w * 0.01;\n }\n }\n else if(v.u === REM || v.u === REM) {\n return v.v * this.__root.computedStyle[FONT_SIZE];\n }\n else if(v.u === VW) {\n return v.v * this.__root.width * 0.01;\n }\n else if(v.u === VH) {\n return v.v * this.__root.height * 0.01;\n }\n else if(v.u === VMAX) {\n return v.v * Math.max(this.__root.width, this.__root.height) * 0.01;\n }\n else if(v.u === VMIN) {\n return v.v * Math.min(this.__root.width, this.__root.height) * 0.01;\n }\n return 0;\n }\n\n __computeReflow() {\n if(this.__hasComputeReflow) {\n return;\n }\n this.__hasComputeReflow = true;\n\n let { __currentStyle: currentStyle, __computedStyle: computedStyle, __domParent: parent } = this;\n let isRoot = !parent;\n let parentComputedStyle = parent && parent.__computedStyle;\n // 继承的特殊处理,根节点用默认值\n [FONT_SIZE, FONT_FAMILY, FONT_WEIGHT, WRITING_MODE].forEach(k => {\n let v = currentStyle[k];\n // ff特殊处理\n if(k === FONT_FAMILY) {\n if(v.u === INHERIT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : parentComputedStyle[k];\n }\n else {\n computedStyle[k] = v.v;\n let ff = v.v.split(/\\s*,\\s*/);\n // 从左到右即声明的字体优先级\n for(let i = 0, len = ff.length; i < len; i++) {\n let item = ff[i].replace(/^['\"]/, '').replace(/['\"]$/, '');\n if(font.hasRegister(item)) {\n // 如果已经注册加载了,或者注册且本地支持的,说明可用\n if(font.hasLoaded(item) || inject.checkSupportFontFamily(item)) {\n break;\n }\n }\n // 不可用的都特殊记住等待注册回调__loadFontCallback\n this.__fontRegister[item] = true;\n font.onRegister(item, this);\n }\n }\n }\n else if(v.u === INHERIT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : parentComputedStyle[k];\n }\n // 只有fontSize会有%\n else if(v.u === PERCENT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (parentComputedStyle[k] * v.v * 0.01);\n }\n else if(v.u === REM) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (this.root.computedStyle[FONT_SIZE] * v.v);\n }\n else if(v.u === VW) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (this.root.width * 0.01 * v.v);\n }\n else if(v.u === VH) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (this.root.height * 0.01 * v.v);\n }\n else if(v.u === VMAX) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (Math.max(this.root.width, this.root.height) * 0.01 * v.v);\n }\n else if(v.u === VMIN) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (Math.min(this.root.width, this.root.height) * 0.01 * v.v);\n }\n else {\n computedStyle[k] = v.v;\n }\n });\n [\n BORDER_TOP_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n ].forEach(k => {\n // border-width不支持百分比\n let item = currentStyle[k];\n computedStyle[k] = this.__calSize(item, 0, false);\n });\n [\n POSITION,\n DISPLAY,\n FLEX_DIRECTION,\n JUSTIFY_CONTENT,\n ALIGN_ITEMS,\n ALIGN_SELF,\n FLEX_GROW,\n FLEX_SHRINK,\n LINE_CLAMP,\n ORDER,\n FLEX_WRAP,\n ALIGN_CONTENT,\n OVERFLOW,\n TEXT_OVERFLOW,\n ].forEach(k => {\n computedStyle[k] = currentStyle[k];\n });\n // writingMode特殊判断inline\n if(parentComputedStyle && computedStyle[WRITING_MODE] !== parentComputedStyle[WRITING_MODE] && computedStyle[DISPLAY] === 'inline') {\n computedStyle[DISPLAY] = 'inlineBlock';\n }\n // 匿名块对象\n if(computedStyle[POSITION] === 'absolute' || parentComputedStyle && parentComputedStyle[DISPLAY] === 'flex') {\n if(['block', 'flex'].indexOf(computedStyle[DISPLAY]) === -1) {\n computedStyle[DISPLAY] = 'block';\n }\n }\n let textAlign = currentStyle[TEXT_ALIGN];\n if(textAlign.u === INHERIT) {\n computedStyle[TEXT_ALIGN] = isRoot ? 'left' : parentComputedStyle[TEXT_ALIGN];\n }\n else {\n computedStyle[TEXT_ALIGN] = textAlign.v;\n }\n let fontSize = computedStyle[FONT_SIZE];\n let lineHeight = currentStyle[LINE_HEIGHT];\n // lineHeight继承很特殊,数字和normal不同于普通单位\n if(lineHeight.u === INHERIT) {\n if(isRoot) {\n computedStyle[LINE_HEIGHT] = calNormalLineHeight(computedStyle);\n }\n else {\n let p = parent;\n let ph;\n while(p) {\n ph = p.currentStyle[LINE_HEIGHT];\n if(ph.u !== INHERIT) {\n break;\n }\n p = p.domParent;\n }\n // 到root还是inherit或normal,或者中途遇到了normal,使用normal\n if([AUTO, INHERIT].indexOf(ph.u) > -1) {\n computedStyle[LINE_HEIGHT] = calNormalLineHeight(computedStyle);\n }\n // 数字继承\n else if(ph.u === NUMBER) {\n computedStyle[LINE_HEIGHT] = Math.max(ph.v, 0) * fontSize;\n }\n // 单位继承\n else {\n computedStyle[LINE_HEIGHT] = parentComputedStyle[LINE_HEIGHT];\n }\n }\n }\n else if(lineHeight.u === NUMBER) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight.v, 0) * fontSize || calNormalLineHeight(computedStyle);\n }\n // 防止为0\n else {\n let v = Math.max(this.__calSize(lineHeight, fontSize, true), 0);\n computedStyle[LINE_HEIGHT] = v || calNormalLineHeight(computedStyle);\n }\n let letterSpacing = currentStyle[LETTER_SPACING];\n if(letterSpacing.u === INHERIT) {\n computedStyle[LETTER_SPACING] = isRoot ? 0 : parentComputedStyle[LETTER_SPACING];\n }\n else {\n computedStyle[LETTER_SPACING] = this.__calSize(letterSpacing, fontSize, true);\n }\n //whiteSpace\n let whiteSpace = currentStyle[WHITE_SPACE];\n if(whiteSpace.u === INHERIT) {\n computedStyle[WHITE_SPACE] = isRoot ? 'normal' : parentComputedStyle[WHITE_SPACE];\n }\n else {\n computedStyle[WHITE_SPACE] = whiteSpace.v;\n }\n let {\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n this.__width = this.__height = 0;\n // 布局前固定尺寸的线设置好,子元素percent尺寸要用到,flex的子元素侧轴stretch也要特殊提前处理,认为定高\n if(width.u !== AUTO) {\n this.__width = computedStyle[WIDTH] = this.__calSize(width, isRoot ? this.__width : parent.__width, true);\n }\n if(height.u !== AUTO) {\n this.__height = computedStyle[HEIGHT] = this.__calSize(height, isRoot ? this.__height : parent.__height, true);\n }\n else {\n let p = this.__domParent;\n if(p) {\n let crs = p.__currentStyle;\n let alignSelf = currentStyle[ALIGN_SELF];\n // flex的子元素stretch提前处理认为高度,以便其子元素%高度计算\n if(crs[DISPLAY] === 'flex' && p.__height) {\n if(crs[FLEX_DIRECTION].indexOf('row') > -1\n && (alignSelf === 'stretch'\n || crs[ALIGN_ITEMS] === 'stretch' && alignSelf === 'auto')) {\n this.__height = p.__height;\n }\n }\n }\n }\n }\n\n __emitFontRegister(fontFamily) {\n let node = this, fontRegister = node.__fontRegister;\n if(node.__isDestroyed) {\n return;\n }\n delete fontRegister[fontFamily];\n let { root, currentStyle } = node;\n if(!root) {\n return;\n }\n let v = currentStyle[FONT_FAMILY];\n if(v.u === INHERIT) {\n return;\n }\n let ff = v.v.split(/\\s*,\\s*/);\n for(let i = 0, len = ff.length; i < len; i++) {\n let item = ff[i].replace(/^['\"]/, '').replace(/['\"]$/, '');\n if(item === fontFamily) {\n // 加载成功回调可能没注册信息,需要多判断一下\n if(font.hasRegister(item)) {\n root.__addUpdate(node, null, REFLOW, null, null, null, null);\n }\n // 后面低优先级的无需再看\n return;\n }\n // 有更高优先级的已经支持了,回调刷新无效\n else if(font.hasRegister(item)\n && (font.hasLoaded(item) || inject.checkSupportFontFamily(item))) {\n return;\n }\n }\n }\n\n // dom常用的几种尺寸赋值\n __ioSize(w, h) {\n let computedStyle = this.computedStyle;\n // 可能不传,在虚拟布局时用不到\n if(!isNil(w)) {\n this.__width = computedStyle[WIDTH] = w;\n this.__clientWidth = w += computedStyle[PADDING_LEFT] + computedStyle[PADDING_RIGHT];\n this.__offsetWidth = w += computedStyle[BORDER_LEFT_WIDTH] + computedStyle[BORDER_RIGHT_WIDTH];\n this.__outerWidth = w + computedStyle[MARGIN_LEFT] + computedStyle[MARGIN_RIGHT];\n }\n if(!isNil(h)) {\n this.__height = computedStyle[HEIGHT] = h;\n this.__clientHeight = h += computedStyle[PADDING_TOP] + computedStyle[PADDING_BOTTOM];\n this.__offsetHeight = h += computedStyle[BORDER_TOP_WIDTH] + computedStyle[BORDER_BOTTOM_WIDTH];\n this.__outerHeight = h + computedStyle[MARGIN_TOP] + computedStyle[MARGIN_BOTTOM];\n }\n }\n\n // 为basis的b/min/max添加mpb,只有当b未显示指定等于w/content时才加,同时返回mpb值\n __addMBP(isDirectionRow, w, currentStyle, computedStyle, res, isDirectItem) {\n let {\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n } = currentStyle;\n let {\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = computedStyle;\n let mbp = this.__calSize(marginLeft, w, isDirectItem)\n + this.__calSize(marginRight, w, isDirectItem)\n + this.__calSize(paddingLeft, w, isDirectItem)\n + this.__calSize(paddingRight, w, isDirectItem)\n + borderLeftWidth + borderRightWidth;\n if(isDirectionRow) {\n res = res.map(item => item + mbp);\n }\n else {\n let mbp = this.__calSize(marginTop, w, isDirectItem)\n + this.__calSize(marginBottom, w, isDirectItem)\n + this.__calSize(paddingTop, w, isDirectItem)\n + this.__calSize(paddingBottom, w, isDirectItem)\n + borderTopWidth + borderBottomWidth;\n res = res.map(item => item + mbp);\n }\n return res;\n }\n\n __layout(data, isAbs, isColumn, isRow) {\n this.__layoutFlow(data, isAbs, isColumn, isRow);\n }\n\n // absolute且无尺寸时,isAbs标明先假布局一次计算尺寸,还有flex列计算时isColumn假布局,flex横计算时writingMode垂直假布局\n __layoutFlow(data, isAbs, isColumn, isRow) {\n this.__computeReflow();\n let { __isDestroyed, __currentStyle, __computedStyle, __ellipsis } = this;\n // 虚拟省略号每次清除\n if(__ellipsis) {\n this.__ellipsis = null;\n }\n this.__parentLineBox = null;\n this.__isIbFull = this.__isUprightIbFull = false;\n let {\n [DISPLAY]: display,\n [POSITION]: position,\n } = __computedStyle;\n this.__layoutData = {\n x: data.x,\n y: data.y,\n w: data.w,\n h: data.h,\n lx: data.lx,\n ly: data.ly,\n isUpright: data.isUpright, // 从Root开始,父级的书写模式需每层传递\n container: data.container,\n };\n // 防止display:none不统计mask,isVirtual忽略,abs/flex布局后续会真正来走一遍\n if(!isAbs && !isColumn && !isRow) {\n this.clearCache();\n this.__cacheStyle = [];\n this.__refreshLevel = REFLOW;\n this.__limitCache = false;\n this.__isInline = false;\n let { next } = this;\n // mask关系只有布局才会变更,普通渲染关系不会改变,clip也是mask的一种\n if(!this.__mask && next && (next.__mask)) {\n let count = 0;\n while(next) {\n if(next.__mask) {\n count++;\n }\n else {\n break;\n }\n next = next.next;\n }\n this.__hasMask = count;\n }\n }\n if(__isDestroyed || display === 'none') {\n this.__x = data.x;\n this.__y = data.y;\n this.__layoutNone();\n this.__hasComputeReflow = false;\n return;\n }\n // absolute特殊,在自己布局时已计算相对于容器的mbp\n if(position !== 'absolute') {\n this.__mp(__currentStyle, __computedStyle, data.w);\n }\n // 只有inline会继承计算行数,其它都是原样返回\n let lineClampCount = data.lineClampCount || 0;\n // 4种布局,默认block,inlineBlock基本可以复用inline逻辑,除了尺寸\n if(display === 'flex') {\n data.lineClampCount = 0;\n this.__layoutFlex(data, isAbs, isColumn, isRow);\n }\n else if(display === 'inlineBlock') {\n data.lineClampCount = 0;\n this.__layoutInline(data, isAbs, isColumn, isRow);\n }\n else if(display === 'inline') {\n lineClampCount = this.__layoutInline(data, isAbs, isColumn, isRow, true);\n }\n else {\n data.lineClampCount = 0;\n this.__layoutBlock(data, isAbs, isColumn, isRow);\n }\n // 非虚拟布局才执行,防止重复\n if(!isAbs && !isColumn && !isRow) {\n // 计算结果存入computedStyle和6个坐标,inline在其inlineSize特殊处理\n let x = this.__x;\n let y = this.__y;\n if(!this.__isInline) {\n x = this.__x1 = x + __computedStyle[MARGIN_LEFT];\n x = this.__x2 = x + __computedStyle[BORDER_LEFT_WIDTH];\n x = this.__x3 = x + __computedStyle[PADDING_LEFT];\n x = this.__x4 = x + this.__width;\n x = this.__x5 = x + __computedStyle[PADDING_RIGHT];\n this.__x6 = x + __computedStyle[BORDER_RIGHT_WIDTH];\n y = this.__y1 = y + __computedStyle[MARGIN_TOP];\n y = this.__y2 = y + __computedStyle[BORDER_TOP_WIDTH];\n y = this.__y3 = y + __computedStyle[PADDING_TOP];\n y = this.__y4 = y + this.__height;\n y = this.__y5 = y + __computedStyle[PADDING_BOTTOM];\n this.__y6 = y + __computedStyle[BORDER_BOTTOM_WIDTH];\n }\n // relative渲染时做偏移,百分比基于父元素,若父元素没有定高则为0\n if(position === 'relative') {\n let {[TOP]: top, [RIGHT]: right, [BOTTOM]: bottom, [LEFT]: left} = __currentStyle;\n let {parent} = this;\n if(top.u !== AUTO) {\n let n = calRelative(__currentStyle, TOP, top, parent);\n if(n) {\n this.__offsetY(n, true, null);\n if(this.__isInline) {\n let list = this.__contentBoxList;\n if(Array.isArray(list)) {\n let last;\n list.forEach(item => {\n let p = item.__parentLineBox;\n if(p && p !== last) {\n p.__oy += n;\n }\n last = p;\n });\n }\n }\n }\n __computedStyle[TOP] = n;\n __computedStyle[BOTTOM] = 'auto';\n }\n else if(bottom.u !== AUTO) {\n let n = calRelative(__currentStyle, BOTTOM, bottom, parent);\n if(n) {\n this.__offsetY(-n, true, null);\n if(this.__isInline) {\n let list = this.__contentBoxList;\n if(Array.isArray(list)) {\n let last;\n list.forEach(item => {\n let p = item.__parentLineBox;\n if(p && p !== last) {\n p.__oy -= n;\n }\n last = p;\n });\n }\n }\n }\n __computedStyle[BOTTOM] = n;\n __computedStyle[TOP] = 'auto';\n }\n else {\n __computedStyle[TOP] = __computedStyle[BOTTOM] = 'auto';\n }\n if(left.u !== AUTO) {\n let n = calRelative(__currentStyle, LEFT, left, parent, true);\n if(n) {\n this.__offsetX(n, true, null);\n }\n __computedStyle[LEFT] = n;\n __computedStyle[RIGHT] = 'auto';\n }\n else if (right.u !== AUTO) {\n let n = calRelative(__currentStyle, RIGHT, right, parent, true);\n if(n) {\n this.__offsetX(-n, true, null);\n }\n __computedStyle[RIGHT] = n;\n __computedStyle[LEFT] = 'auto';\n }\n else {\n __computedStyle[LEFT] = __computedStyle[RIGHT] = 'auto';\n }\n }\n else if (position !== 'absolute') {\n __computedStyle[TOP] = __computedStyle[BOTTOM] = __computedStyle[LEFT] = __computedStyle[RIGHT] = 'auto';\n }\n __computedStyle[WIDTH] = this.__width;\n __computedStyle[HEIGHT] = this.__height;\n // abs为parse的根节点时特殊自己执行,前提是真布局\n if(position !== 'absolute') {\n this.__execAr();\n }\n this.__hasComputeReflow = false;\n }\n return lineClampCount;\n }\n\n __layoutStyle() {\n let currentStyle = this.__currentStyle;\n let computedStyle = this.__computedStyle;\n let cacheStyle = this.__cacheStyle;\n this.__calStyle(level.REFLOW, currentStyle, computedStyle, cacheStyle);\n this.__calPerspective(currentStyle, computedStyle, cacheStyle);\n }\n\n __execAr() {\n // 动态json引用时动画暂存,第一次布局时处理这些动画到root的animateController上\n let ar = this.__animateRecords;\n if(ar) {\n this.__animateRecords = null;\n // parse没有dom时,animate的target引用都是json,vd后生成需重新赋值\n ar.list.forEach(item => {\n if(item.target.vd instanceof Xom) {\n item.target = item.target.vd;\n }\n });\n let ac = ar.controller || this.root.animateController;\n // 不自动播放进入记录列表,初始化并等待手动调用\n if(ar.options && ar.options.autoPlay === false) {\n ac.__records2 = ac.__records2.concat(ar.list);\n ac.init(ac.__records2, ac.list2);\n }\n else {\n ac.__records = ac.__records.concat(ar.list);\n ac.__playAuto();\n }\n }\n }\n\n __layoutNone() {\n this.__computeReflow();\n let { __computedStyle } = this;\n __computedStyle[DISPLAY] = 'none';\n this.__reset0();\n this.__hasComputeReflow = false;\n }\n\n __reset0() {\n let { __computedStyle } = this;\n __computedStyle[MARGIN_TOP]\n = __computedStyle[MARGIN_RIGHT]\n = __computedStyle[MARGIN_BOTTOM]\n = __computedStyle[MARGIN_LEFT]\n = __computedStyle[BORDER_TOP_WIDTH]\n = __computedStyle[BORDER_RIGHT_WIDTH]\n = __computedStyle[BORDER_BOTTOM_WIDTH]\n = __computedStyle[BORDER_LEFT_WIDTH]\n = __computedStyle[PADDING_TOP]\n = __computedStyle[PADDING_RIGHT]\n = __computedStyle[PADDING_BOTTOM]\n = __computedStyle[PADDING_LEFT]\n = __computedStyle[WIDTH]\n = __computedStyle[HEIGHT]\n = this.__width\n = this.__height\n = this.__clientWidth\n = this.__clientHeight\n = this.__offsetWidth\n = this.__offsetHeight\n = this.__outerWidth\n = this.__outerHeight\n = 0;\n }\n\n // 预先计算是否是固定宽高,布局点位和尺寸考虑margin/border/padding\n __preLayout(data, isInline) {\n let { x, y, w, h, w2, h2, w3, h3, lx, ly, lineBoxManager, endSpace = 0, isUpright: isParentVertical, container } = data;\n this.__x = x;\n this.__y = y;\n let { currentStyle, computedStyle } = this;\n let {\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n let position = computedStyle[POSITION];\n let {\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [PADDING_LEFT]: paddingLeft,\n [WRITING_MODE]: writingMode,\n } = computedStyle;\n let isUpright = writingMode.indexOf('vertical') === 0;\n // 除了auto外都是固定宽高度\n let fixedWidth;\n let fixedHeight;\n // 绝对定位是left+right这种其实等于定义了width,但不能修改原始style,存入特殊变量标识\n if(w2 !== undefined) {\n fixedWidth = true;\n w = w2;\n }\n // flex时也会用到,子级得出目标主尺寸后按这个来\n else if(w3 !== undefined) {\n fixedWidth = true;\n w = w3;\n }\n else if(width.u !== AUTO && !isInline) {\n fixedWidth = true;\n // abs的百分比尺寸相对于container\n if(position === 'absolute' && width.u === PERCENT) {\n w = this.__calSize(width, container.__clientWidth, true);\n }\n else {\n w = this.__calSize(width, w, true);\n }\n }\n if(h2 !== undefined) {\n fixedHeight = true;\n h = h2;\n }\n else if(h3 !== undefined) {\n fixedHeight = true;\n h = h3;\n }\n // height的百分比需要parent有值不能auto,或者parent的flex定高且侧轴stretch时;abs的百分比相对于container\n else if(height.u !== AUTO && !isInline) {\n if(position === 'absolute' && height.u === PERCENT) {\n h = this.__calSize(height, container.__clientHeight, true);\n }\n else {\n let p = this.__domParent;\n if(height.u === PERCENT) {\n // 一般都是0,除了定高,或者flex的stretch\n if(p.height) {\n fixedHeight = true;\n h = this.__calSize(height, p.height || 0, true);\n }\n }\n else {\n fixedHeight = true;\n h = this.__calSize(height, h, true);\n }\n }\n }\n // margin/border/padding影响x和y和尺寸,注意inline的y不受mpb影响(垂直模式则是x)\n if(!isInline) {\n x += borderLeftWidth + marginLeft + paddingLeft;\n y += borderTopWidth + marginTop + paddingTop;\n }\n else {\n if(isUpright) {\n y += borderTopWidth + marginTop + paddingTop;\n }\n else {\n x += borderLeftWidth + marginLeft + paddingLeft;\n }\n }\n data.x = x;\n data.y = y;\n // inline的w/h很特殊,需不考虑inline自身水平的mpb以便换行,因为mpb只在首尾行生效,所以首尾需特殊处理中间忽略\n // 当嵌套inline时更加复杂,假如inline有尾部mpb,最后一行需考虑,如果此inline是父的最后一个且父有mpb需叠加\n let selfEndSpace = 0;\n if(isInline) {\n if(isUpright) {\n selfEndSpace = paddingBottom + borderBottomWidth + marginBottom;\n }\n else {\n selfEndSpace = paddingRight + borderRightWidth + marginRight;\n }\n }\n // 传入w3/h3时,flex的item已知目标主尺寸,需减去mbp,其一定是block,和inline互斥\n if(!isInline) {\n if(width.u === AUTO || w3 !== undefined) {\n w -= borderLeftWidth + borderRightWidth + marginLeft + marginRight + paddingLeft + paddingRight;\n }\n if(height.u === AUTO || h3 !== undefined) {\n h -= borderTopWidth + borderBottomWidth + marginTop + marginBottom + paddingTop + paddingBottom;\n }\n }\n return {\n fixedWidth,\n fixedHeight,\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n endSpace,\n selfEndSpace,\n isParentVertical,\n isUpright,\n };\n }\n\n // 处理margin:xx auto居中对齐或右对齐\n __marginAuto(style, data, isUpright) {\n let {\n [POSITION]: position,\n [DISPLAY]: display,\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [WIDTH]: width,\n [HEIGHT]: height,\n } = style;\n if(position !== 'absolute' && (display === 'block' || display === 'flex')) {\n if(isUpright) {\n if((height.u !== AUTO || this.isReplaced) && marginTop.u === AUTO && marginBottom.u === AUTO) {\n let oh = this.outerHeight;\n if(oh < data.h) {\n this.__offsetY((data.h - oh) * 0.5, true, null);\n }\n }\n }\n else {\n if((width.u !== AUTO || this.isReplaced) && marginLeft.u === AUTO && marginRight.u === AUTO) {\n let ow = this.outerWidth;\n if(ow < data.w) {\n this.__offsetX((data.w - ow) * 0.5, true, null);\n }\n }\n }\n }\n }\n\n __calMatrix(lv, __currentStyle, __computedStyle, __cacheStyle, optimize) {\n let {\n __x1,\n __y1,\n __offsetWidth,\n __offsetHeight,\n } = this;\n if(this.__isInline) {\n __computedStyle[TRANSFORM_ORIGIN] = [__x1, __y1];\n return __cacheStyle[MATRIX] = this.__matrix = mx.identity();\n }\n let matrixCache = __cacheStyle[MATRIX];\n // 优化计算scale不能为0,无法计算倍数差,rotateZ优化不能包含rotateX/rotateY/skew\n if(!isNil(optimize)) {}\n else if(matrixCache && lv < REFLOW && !(lv & TF)) {\n if((lv & SX) && !__computedStyle[SCALE_X]\n || (lv & SY) && !__computedStyle[SCALE_Y]\n || (lv & SZ) && !__computedStyle[SCALE_Z]\n || (lv & RZ) && (__computedStyle[ROTATE_X] || __computedStyle[ROTATE_Y]\n || __computedStyle[SKEW_X] || __computedStyle[SKEW_Y])) {\n }\n else {\n optimize = true;\n }\n }\n // translate/scale变化特殊优化,d/h/l不能有值,否则不能这样直接简化运算,因为这里不包含perspective,所以一定没有\n if(optimize && matrixCache) {\n let transform = __computedStyle[TRANSFORM];\n if(lv & TX) {\n let v = __currentStyle[TRANSLATE_X];\n if(!v) {\n v = 0;\n }\n else if(v.u === PX) {\n v = v.v;\n }\n else {\n v = this.__calSize(v, this.__offsetWidth, true);\n }\n let x = v - __computedStyle[TRANSLATE_X];\n __computedStyle[TRANSLATE_X] = v;\n transform[12] += x;\n matrixCache[12] += x;\n }\n if(lv & TY) {\n let v = __currentStyle[TRANSLATE_Y];\n if(!v) {\n v = 0;\n }\n else if(v.u === PX) {\n v = v.v;\n }\n else {\n v = this.__calSize(v, this.__offsetHeight, true);\n }\n let y = v - __computedStyle[TRANSLATE_Y];\n __computedStyle[TRANSLATE_Y] = v;\n transform[13] += y;\n matrixCache[13] += y;\n }\n if(lv & TZ) {\n let v = __currentStyle[TRANSLATE_Z];\n if(!v) {\n v = 0;\n }\n else if(v.u === PX) {\n v = v.v;\n }\n else {\n v = this.__calSize(v, this.__offsetWidth, true);\n }\n let z = v - __computedStyle[TRANSLATE_Z];\n __computedStyle[TRANSLATE_Z] = v;\n transform[14] += z;\n matrixCache[14] += z;\n }\n if(lv & RZ) {\n let v = __currentStyle[ROTATE_Z].v;\n __computedStyle[ROTATE_Z] = v;\n v = d2r(v);\n let sin = Math.sin(v), cos = Math.cos(v);\n let x = __computedStyle[SCALE_X], y = __computedStyle[SCALE_Y];\n let cx = matrixCache[0] = transform[0] = cos * x;\n let sx = matrixCache[1] = transform[1] = sin * x;\n let sy = matrixCache[4] = transform[4] = -sin * y;\n let cy = matrixCache[5] = transform[5] = cos * y;\n let t = __computedStyle[TRANSFORM_ORIGIN], ox = t[0], oy = t[1];\n ox += __x1;\n oy += __y1;\n matrixCache[12] = transform[12] + ox - cx * ox - oy * sy;\n matrixCache[13] = transform[13] + oy - sx * ox - oy * cy;\n }\n if(lv & SCALE) {\n if(lv & SX) {\n if(!__computedStyle[SCALE_X]) {\n return this.__calMatrix(REFLOW, __currentStyle, __computedStyle, __cacheStyle, false);\n }\n let v = __currentStyle[SCALE_X].v;\n let x = v / __computedStyle[SCALE_X];\n __computedStyle[SCALE_X] = v;\n transform[0] *= x;\n transform[1] *= x;\n transform[2] *= x;\n matrixCache[0] *= x;\n matrixCache[1] *= x;\n matrixCache[2] *= x;\n }\n if(lv & SY) {\n if(!__computedStyle[SCALE_Y]) {\n return this.__calMatrix(lv, __currentStyle, __computedStyle, __cacheStyle, false);\n }\n let v = __currentStyle[SCALE_Y].v;\n let y = v / __computedStyle[SCALE_Y];\n __computedStyle[SCALE_Y] = v;\n transform[4] *= y;\n transform[5] *= y;\n transform[6] *= y;\n matrixCache[4] *= y;\n matrixCache[5] *= y;\n matrixCache[6] *= y;\n }\n if(lv & SZ) {\n if(!__computedStyle[SCALE_Z]) {\n return this.__calMatrix(lv, __currentStyle, __computedStyle, __cacheStyle, false);\n }\n let v = __currentStyle[SCALE_Z].v;\n let z = v / __computedStyle[SCALE_Z];\n __computedStyle[SCALE_Z] = v;\n transform[8] *= z;\n transform[9] *= z;\n transform[10] *= z;\n matrixCache[8] *= z;\n matrixCache[9] *= z;\n matrixCache[10] *= z;\n }\n let t = __computedStyle[TRANSFORM_ORIGIN], ox = t[0], oy = t[1];\n ox += __x1;\n oy += __y1;\n matrixCache[12] = transform[12] + ox - transform[0] * ox - transform[4] * oy;\n matrixCache[13] = transform[13] + oy - transform[1] * ox - transform[5] * oy;\n matrixCache[14] = transform[14] - transform[2] * ox - transform[6] * oy;\n }\n }\n // 先根据cache计算需要重新计算的computedStyle\n else {\n if(__cacheStyle[TRANSFORM_ORIGIN] === undefined) {\n __cacheStyle[TRANSFORM_ORIGIN] = true;\n matrixCache = null;\n __computedStyle[TRANSFORM_ORIGIN] = __currentStyle[TRANSFORM_ORIGIN].map((item, i) => {\n return this.__calSize(item, i ? __offsetHeight : __offsetWidth, true);\n });\n }\n if(__cacheStyle[TRANSFORM] === undefined\n || __cacheStyle[TRANSLATE_X] === undefined\n || __cacheStyle[TRANSLATE_Y] === undefined\n || __cacheStyle[TRANSLATE_Z] === undefined\n || __cacheStyle[ROTATE_X] === undefined\n || __cacheStyle[ROTATE_Y] === undefined\n || __cacheStyle[ROTATE_Z] === undefined\n || __cacheStyle[ROTATE_3D] === undefined\n || __cacheStyle[SCALE_X] === undefined\n || __cacheStyle[SCALE_Y] === undefined\n || __cacheStyle[SCALE_Z] === undefined\n || __cacheStyle[SKEW_X] === undefined\n || __cacheStyle[SKEW_Y] === undefined) {\n __cacheStyle[TRANSFORM]\n = __cacheStyle[TRANSLATE_X]\n = __cacheStyle[TRANSLATE_Y]\n = __cacheStyle[TRANSLATE_Z]\n = __cacheStyle[ROTATE_X]\n = __cacheStyle[ROTATE_Y]\n = __cacheStyle[ROTATE_Z]\n = __cacheStyle[SCALE_X]\n = __cacheStyle[SCALE_Y]\n = __cacheStyle[SCALE_Z]\n = __cacheStyle[SKEW_X]\n = __cacheStyle[SKEW_Y]\n = true;\n matrixCache = null;\n let matrix;\n // transform相对于自身\n if(__currentStyle[TRANSFORM] && __currentStyle[TRANSFORM].length) {\n matrix = tf.calMatrix(__currentStyle[TRANSFORM], __offsetWidth, __offsetHeight, this.__root);\n }\n // 没有transform则看是否有扩展的css独立变换属性\n else {\n __computedStyle[TRANSLATE_X] = 0;\n let v = __currentStyle[TRANSLATE_X];\n if(v) {\n v = __computedStyle[TRANSLATE_X] = this.__calSize(v, this.__offsetWidth, true);\n if(v) {\n matrix = matrix || mx.identity();\n matrix[12] = v;\n }\n }\n __computedStyle[TRANSLATE_Y] = 0;\n v = __currentStyle[TRANSLATE_Y];\n if(v) {\n v = __computedStyle[TRANSLATE_Y] = this.__calSize(v, this.__offsetHeight, true);\n if(v) {\n matrix = matrix || mx.identity();\n matrix[13] = v;\n }\n }\n __computedStyle[TRANSLATE_Z] = 0;\n v = __currentStyle[TRANSLATE_Z];\n if(v) {\n v = __computedStyle[TRANSLATE_Z] = this.__calSize(v, this.__offsetWidth, true);\n if(v) {\n matrix = matrix || mx.identity();\n matrix[14] = v;\n }\n }\n __computedStyle[ROTATE_X] = 0;\n v = __currentStyle[ROTATE_X];\n if(v) {\n v = __computedStyle[ROTATE_X] = v.v;\n if(v) {\n matrix = matrix || mx.identity();\n if(matrix) {\n matrix = multiplyRotateX(matrix, d2r(v));\n }\n else {\n matrix = calRotateX(mx.identity(), v);\n }\n }\n }\n __computedStyle[ROTATE_Y] = 0;\n v = __currentStyle[ROTATE_Y];\n if(v) {\n v = __computedStyle[ROTATE_Y] = v.v;\n if(v) {\n if(matrix) {\n matrix = multiplyRotateY(matrix, d2r(v));\n }\n else {\n matrix = calRotateY(mx.identity(), v);\n }\n }\n }\n __computedStyle[ROTATE_Z] = 0;\n v = __currentStyle[ROTATE_Z];\n if(v) {\n v = __computedStyle[ROTATE_Z] = v.v;\n if(v) {\n if(matrix) {\n matrix = multiplyRotateZ(matrix, d2r(v));\n }\n else {\n matrix = calRotateZ(mx.identity(), v);\n }\n }\n }\n __computedStyle[ROTATE_3D] = [0, 0, 0, 0];\n v = __currentStyle[ROTATE_3D];\n if(v) {\n v = __computedStyle[ROTATE_3D] = [v[0], v[1], v[2], v[3].v];\n if((v[0] || v[1] || v[2]) && v[3]) {\n if(matrix) {\n matrix = multiply(matrix, calRotate3d(mx.identity(), v));\n }\n else {\n matrix = calRotate3d(mx.identity(), v);\n }\n }\n }\n __computedStyle[SKEW_X] = 0;\n v = __currentStyle[SKEW_X];\n if(v) {\n v = __computedStyle[SKEW_X] = v.v;\n if(v) {\n if(matrix) {\n matrix = multiplySkewX(matrix, d2r(v));\n }\n else {\n matrix = mx.identity();\n matrix[4] = Math.tan(d2r(v));\n }\n }\n }\n __computedStyle[SKEW_Y] = 0;\n v = __currentStyle[SKEW_Y];\n if(v) {\n v = __computedStyle[SKEW_Y] = v.v;\n if(v) {\n if(matrix) {\n matrix = multiplySkewY(matrix, d2r(v));\n }\n else {\n matrix = mx.identity();\n matrix[1] = Math.tan(d2r(v));\n }\n }\n }\n __computedStyle[SCALE_X] = 1;\n v = __currentStyle[SCALE_X];\n if(v) {\n v = __computedStyle[SCALE_X] = v.v;\n if(v !== 1) {\n if(matrix) {\n matrix = multiplyScaleX(matrix, v);\n }\n else {\n matrix = mx.identity();\n matrix[0] = v;\n }\n }\n }\n __computedStyle[SCALE_Y] = 1;\n v = __currentStyle[SCALE_Y];\n if(v) {\n v = __computedStyle[SCALE_Y] = v.v;\n if(v !== 1) {\n if(matrix) {\n matrix = multiplyScaleY(matrix, v);\n }\n else {\n matrix = mx.identity();\n matrix[5] = v;\n }\n }\n }\n __computedStyle[SCALE_Z] = 1;\n v = __currentStyle[SCALE_Z];\n if(v) {\n v = __computedStyle[SCALE_Z] = v.v;\n if(v !== 1) {\n if(matrix) {\n matrix = multiplyScaleZ(matrix, v);\n }\n else {\n matrix = mx.identity();\n matrix[10] = v;\n }\n }\n }\n }\n __computedStyle[TRANSFORM] = matrix || mx.identity();\n }\n if(!matrixCache) {\n let m = __computedStyle[TRANSFORM];\n let tfo = __computedStyle[TRANSFORM_ORIGIN];\n matrixCache = __cacheStyle[MATRIX] = tf.calMatrixByOrigin(m, tfo[0] + __x1, tfo[1] + __y1);\n }\n }\n return this.__matrix = matrixCache;\n }\n\n /**\n * 将currentStyle计算为computedStyle,同时存入cacheStyle可缓存的结果防止无变更重复计算,返回背景渲染范围\n */\n __calStyle(lv, __currentStyle, __computedStyle, __cacheStyle) {\n let {\n __x1,\n __x2,\n __x3,\n __x4,\n __x5,\n __x6,\n __y1,\n __y2,\n __y3,\n __y4,\n __y5,\n __y6,\n } = this;\n this.__bbox = null;\n let bx1 = __x1, by1 = __y1, bx2 = __x6, by2 = __y6;\n let backgroundClip = __computedStyle[BACKGROUND_CLIP] = __currentStyle[BACKGROUND_CLIP];\n // 默认border-box\n if(backgroundClip === 'paddingBox') {\n bx1 = __x2;\n by1 = __y2;\n bx2 = __x5;\n by2 = __y5;\n }\n else if(backgroundClip === 'contentBox') {\n bx1 = __x3;\n by1 = __y3;\n bx2 = __x4;\n by2 = __y4;\n }\n let isInline = this.__isInline;\n if(isInline && !this.__contentBoxList.length) {\n isInline = false;\n }\n // 这些直接赋值的不需要再算缓存\n [\n OPACITY,\n Z_INDEX,\n BORDER_TOP_STYLE,\n BORDER_RIGHT_STYLE,\n BORDER_BOTTOM_STYLE,\n BORDER_LEFT_STYLE,\n BACKGROUND_REPEAT,\n OVERFLOW,\n MIX_BLEND_MODE,\n TEXT_OVERFLOW,\n BACKGROUND_CLIP,\n TRANSFORM_STYLE,\n BACKFACE_VISIBILITY,\n ].forEach(k => {\n __computedStyle[k] = __currentStyle[k];\n });\n if(isNil(__cacheStyle[FILTER])) {\n this.__calFilter(__currentStyle, __computedStyle, __cacheStyle);\n }\n // 特殊的判断,MATRIX不存在于样式key中,所有的transform共用一个\n if(isNil(__cacheStyle[MATRIX]) || (lv & TRANSFORM_ALL)) {\n this.__calMatrix(lv, __currentStyle, __computedStyle, __cacheStyle, false);\n }\n if(isNil(__cacheStyle[BACKGROUND_POSITION_X])) {\n __cacheStyle[BACKGROUND_POSITION_X] = true;\n let {\n [BACKGROUND_POSITION_X]: bgX,\n } = __currentStyle;\n __computedStyle[BACKGROUND_POSITION_X] = (bgX || []).map(item => {\n if(item.u === PERCENT) {\n return item.v + '%';\n }\n return this.__calSize(item, bx2 - bx1, true);\n });\n }\n if(isNil(__cacheStyle[BACKGROUND_POSITION_Y])) {\n __cacheStyle[BACKGROUND_POSITION_Y] = true;\n let {\n [BACKGROUND_POSITION_Y]: bgY,\n } = __currentStyle;\n __computedStyle[BACKGROUND_POSITION_Y] = (bgY || []).map(item => {\n if(item.u === PERCENT) {\n return item.v + '%';\n }\n return this.__calSize(item, by2 - by1, true);\n });\n }\n if(isNil(__cacheStyle[BACKGROUND_SIZE])) {\n __cacheStyle[BACKGROUND_SIZE] = true;\n __computedStyle[BACKGROUND_SIZE] = (__currentStyle[BACKGROUND_SIZE] || []).map(item => {\n if(Array.isArray(item)) {\n // 每项是x/y2个\n return item.map((item2, i) => {\n if(item2.u === AUTO) {\n return -1;\n }\n else if(item2.u === STRING) {\n return item2.v === 'contain' ? -2 : -3;\n }\n return this.__calSize(item2, i ? (by2 - by1) : (bx2 - bx1), true);\n });\n }\n });\n }\n if(isNil(__cacheStyle[BACKGROUND_IMAGE])) {\n let bgI = __currentStyle[BACKGROUND_IMAGE];\n __computedStyle[BACKGROUND_IMAGE] = bgI.map(item => {\n if(item) {\n return item.v;\n }\n return null;\n });\n __cacheStyle[BACKGROUND_IMAGE] = bgI.map((bgi, i) => {\n if(!bgi) {\n return null;\n }\n // 防止隐藏不加载背景图\n if(bgi.u === STRING) {\n let loadBgi = this.__loadBgi[i] = this.__loadBgi[i] || {};\n let cache = inject.IMG[bgi.v];\n if(cache && cache.state === inject.LOADED) {\n loadBgi.url = bgi.v;\n loadBgi.source = cache.source;\n loadBgi.width = cache.width;\n loadBgi.height = cache.height;\n }\n else if(loadBgi.url !== bgi.v) {\n // 可能改变导致多次加载,每次清空,成功后还要比对url是否相同\n loadBgi.url = bgi.v;\n loadBgi.source = null;\n let node = this;\n let root = this.__root;\n let ctx = this.ctx;\n inject.measureImg(bgi.v, data => {\n // 还需判断url,防止重复加载时老的替换新的,失败不绘制bgi\n if(data.success && data.url === loadBgi.url && !this.isDestroyed) {\n loadBgi.source = data.source;\n loadBgi.width = data.width;\n loadBgi.height = data.height;\n __cacheStyle[BACKGROUND_IMAGE] = undefined;\n root.__addUpdate(node, null, REPAINT, null, null, null, null);\n }\n });\n }\n return true;\n }\n else if(!isInline && bgi.v && bgi.u === GRADIENT) {\n // gradient在渲染时才生成\n return true;\n }\n });\n }\n if(isNil(__cacheStyle[BOX_SHADOW])) {\n __cacheStyle[BOX_SHADOW] = true;\n __computedStyle[BOX_SHADOW] = (__currentStyle[BOX_SHADOW] || []).map(item => {\n return item.map((item2, i) => {\n if(i > 3) {\n return item2;\n }\n return this.__calSize(item2, i === 0 ? (bx2 - bx1) : (by2 - by1), true);\n });\n });\n }\n [\n BACKGROUND_COLOR,\n BORDER_TOP_COLOR,\n BORDER_RIGHT_COLOR,\n BORDER_BOTTOM_COLOR,\n BORDER_LEFT_COLOR,\n ].forEach(k => {\n if(isNil(__cacheStyle[k])) {\n __cacheStyle[k] = int2rgba(__computedStyle[k] = __currentStyle[k].v);\n }\n });\n // 圆角边计算\n if(isNil(__cacheStyle[BORDER_TOP_LEFT_RADIUS])\n || isNil(__cacheStyle[BORDER_TOP_RIGHT_RADIUS])\n || isNil(__cacheStyle[BORDER_BOTTOM_RIGHT_RADIUS])\n || isNil(__cacheStyle[BORDER_BOTTOM_LEFT_RADIUS])) {\n __cacheStyle[BORDER_TOP_LEFT_RADIUS]\n = __cacheStyle[BORDER_TOP_RIGHT_RADIUS]\n = __cacheStyle[BORDER_BOTTOM_RIGHT_RADIUS]\n = __cacheStyle[BORDER_BOTTOM_LEFT_RADIUS]\n = true;\n // 非替代的inline计算看contentBox首尾\n if(isInline) {\n border.calBorderRadiusInline(this.__contentBoxList, __currentStyle, __computedStyle, this.__root);\n }\n // 普通block整体计算\n else {\n border.calBorderRadius(this.__offsetWidth, this.__offsetHeight, __currentStyle, __computedStyle, this.__root);\n }\n }\n // width/style/radius影响border,color不影响渲染缓存\n let btlr = __computedStyle[BORDER_TOP_LEFT_RADIUS];\n let btrr = __computedStyle[BORDER_TOP_RIGHT_RADIUS];\n let bbrr = __computedStyle[BORDER_BOTTOM_RIGHT_RADIUS];\n let bblr = __computedStyle[BORDER_BOTTOM_LEFT_RADIUS];\n let borderTopWidth = __computedStyle[BORDER_TOP_WIDTH];\n let borderRightWidth = __computedStyle[BORDER_RIGHT_WIDTH];\n let borderBottomWidth = __computedStyle[BORDER_BOTTOM_WIDTH];\n let borderLeftWidth = __computedStyle[BORDER_LEFT_WIDTH];\n ['Top', 'Right', 'Bottom', 'Left'].forEach(k => {\n k = 'border' + k;\n let k2 = STYLE_KEY[style2Upper(k)];\n let kw = STYLE_KEY[style2Upper(k + 'Width')];\n let ks = STYLE_KEY[style2Upper(k + 'Style')];\n // width/style变更影响border重新计算\n if(isNil(__cacheStyle[kw])) {\n __cacheStyle[kw] = true;\n __cacheStyle[k2] = undefined;\n }\n if(isNil(__cacheStyle[ks])) {\n __cacheStyle[ks] = true;\n __cacheStyle[k2] = undefined;\n }\n if(isNil(__cacheStyle[k2])) {\n if(k2 === BORDER_TOP) {\n if(borderTopWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderTopWidth / borderLeftWidth);\n let deg2 = Math.atan(borderTopWidth / borderRightWidth);\n __cacheStyle[k2] = border.calPoints(borderTopWidth, __computedStyle[ks], deg1, deg2,\n __x1, __x2, __x5, __x6, __y1, __y2, __y5, __y6, 0, btlr, btrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_RIGHT) {\n if(borderRightWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderRightWidth / borderTopWidth);\n let deg2 = Math.atan(borderRightWidth / borderBottomWidth);\n __cacheStyle[k2] = border.calPoints(borderRightWidth, __computedStyle[ks], deg1, deg2,\n __x1, __x2, __x5, __x6, __y1, __y2, __y5, __y6, 1, btrr, bbrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_BOTTOM) {\n if(borderBottomWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderBottomWidth / borderLeftWidth);\n let deg2 = Math.atan(borderBottomWidth / borderRightWidth);\n __cacheStyle[k2] = border.calPoints(borderBottomWidth, __computedStyle[ks], deg1, deg2,\n __x1, __x2, __x5, __x6, __y1, __y2, __y5, __y6, 2, bblr, bbrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_LEFT) {\n if(borderLeftWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderLeftWidth / borderTopWidth);\n let deg2 = Math.atan(borderLeftWidth / borderBottomWidth);\n __cacheStyle[k2] = border.calPoints(borderLeftWidth, __computedStyle[ks], deg1, deg2,\n __x1, __x2, __x5, __x6, __y1, __y2, __y5, __y6, 3, btlr, bblr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n }\n });\n // 强制计算继承性的\n let parent = this.__domParent;\n let parentComputedStyle = parent && parent.__computedStyle;\n if(__currentStyle[FONT_STYLE].u === INHERIT) {\n __computedStyle[FONT_STYLE] = parent ? parentComputedStyle[FONT_STYLE] : 'normal';\n }\n else if(isNil(__cacheStyle[FONT_STYLE])) {\n __computedStyle[FONT_STYLE] = __currentStyle[FONT_STYLE].v;\n }\n __cacheStyle[FONT_STYLE] = __computedStyle[FONT_STYLE];\n let color = __currentStyle[COLOR];\n if(color.u === INHERIT) {\n let v = __computedStyle[COLOR] = parent ? parentComputedStyle[COLOR] : rgba2int(reset.INHERIT.color);\n if(v.k) {\n __cacheStyle[COLOR] = v;\n }\n else {\n __cacheStyle[COLOR] = int2rgba(__computedStyle[COLOR]);\n }\n }\n else if(isNil(__cacheStyle[COLOR])) {\n if(color.u === GRADIENT) {\n __cacheStyle[COLOR] = __computedStyle[COLOR] = color.v;\n }\n else {\n __cacheStyle[COLOR] = int2rgba(__computedStyle[COLOR] = rgba2int(color.v));\n }\n }\n let textStrokeColor = __currentStyle[TEXT_STROKE_COLOR];\n if(textStrokeColor.u === INHERIT) {\n let v = __computedStyle[TEXT_STROKE_COLOR] = parent ? parentComputedStyle[TEXT_STROKE_COLOR] : rgba2int(reset.INHERIT.textStrokeColor);\n if(v.k) {\n __cacheStyle[TEXT_STROKE_COLOR] = v;\n }\n else {\n __cacheStyle[TEXT_STROKE_COLOR] = int2rgba(__computedStyle[TEXT_STROKE_COLOR]);\n }\n }\n else if(isNil(__cacheStyle[TEXT_STROKE_COLOR])) {\n if(textStrokeColor.u === GRADIENT) {\n __cacheStyle[TEXT_STROKE_COLOR] = __computedStyle[TEXT_STROKE_COLOR] = textStrokeColor.v;\n }\n else if(textStrokeColor.u === RGBA) {\n __cacheStyle[TEXT_STROKE_COLOR] = int2rgba(__computedStyle[TEXT_STROKE_COLOR] = rgba2int(textStrokeColor.v));\n }\n }\n if(__currentStyle[TEXT_STROKE_WIDTH].u === INHERIT) {\n __computedStyle[TEXT_STROKE_WIDTH] = parent ? parentComputedStyle[TEXT_STROKE_WIDTH] : reset.INHERIT.textStrokeWidth;\n __cacheStyle[TEXT_STROKE_WIDTH] = true;\n }\n else if(isNil(__cacheStyle[TEXT_STROKE_WIDTH])) {\n let v = __currentStyle[TEXT_STROKE_WIDTH];\n if(v.u === REM) {\n v = v.v * this.__root.__computedStyle[FONT_SIZE];\n }\n else if(v.u === VW) {\n v = v.v * this.__root.width * 0.01;\n }\n else if(v.u === VH) {\n v = v.v * this.__root.height * 0.01;\n }\n else if(v.u === VMAX) {\n v = v.v * Math.max(this.__root.width, this.__root.height) * 0.01;\n }\n else if(v.u === VMIN) {\n v = v.v * Math.min(this.__root.width, this.__root.height) * 0.01;\n }\n else {\n v = v.v;\n }\n __computedStyle[TEXT_STROKE_WIDTH] = v;\n __cacheStyle[TEXT_STROKE_WIDTH] = true;\n }\n if(__currentStyle[TEXT_STROKE_OVER].u === INHERIT) {\n __cacheStyle[TEXT_STROKE_OVER] = __computedStyle[TEXT_STROKE_OVER] = parent ? parentComputedStyle[TEXT_STROKE_OVER] : reset.INHERIT.textStrokeOver;\n }\n else {\n __cacheStyle[TEXT_STROKE_OVER] = __computedStyle[TEXT_STROKE_OVER] = __currentStyle[TEXT_STROKE_OVER].v;\n }\n if(__currentStyle[VISIBILITY].u === INHERIT) {\n __computedStyle[VISIBILITY] = parent ? parentComputedStyle[VISIBILITY] : 'visible';\n }\n else if(isNil(__cacheStyle[VISIBILITY])) {\n __computedStyle[VISIBILITY] = __currentStyle[VISIBILITY].v;\n }\n __cacheStyle[VISIBILITY] = __computedStyle[VISIBILITY];\n if(__currentStyle[POINTER_EVENTS].u === INHERIT) {\n __computedStyle[POINTER_EVENTS] = parent ? parentComputedStyle[POINTER_EVENTS] : 'auto';\n }\n else if(isNil(__cacheStyle[POINTER_EVENTS])) {\n __computedStyle[POINTER_EVENTS] = __currentStyle[POINTER_EVENTS].v;\n }\n __cacheStyle[POINTER_EVENTS] = __computedStyle[POINTER_EVENTS];\n // transformStyle需要特殊判断,在一些情况下强制flat,取消规范的opacity<1限制\n if(__computedStyle[TRANSFORM_STYLE] === 'preserve3d') {\n if(__computedStyle[OVERFLOW] === 'hidden'\n || __computedStyle[FILTER].length\n || this.__cacheAsBitmap) {\n __computedStyle[TRANSFORM_STYLE] = 'flat';\n }\n }\n // 影响父级flat的\n if((__computedStyle[MIX_BLEND_MODE] !== 'normal' || this.__mask) && parentComputedStyle) {\n parentComputedStyle[TRANSFORM_STYLE] = 'flat';\n }\n this.__bx1 = bx1;\n this.__bx2 = bx2;\n this.__by1 = by1;\n this.__by2 = by2;\n return [bx1, by1, bx2, by2];\n }\n\n __calPerspective(__currentStyle, __computedStyle, __cacheStyle) {\n this.__perspectiveMatrix = null;\n let rebuild;\n let { __x1, __y1 } = this;\n if(isNil(__cacheStyle[PERSPECTIVE])) {\n __cacheStyle[PERSPECTIVE] = true;\n rebuild = true;\n let v = __currentStyle[PERSPECTIVE];\n __computedStyle[PERSPECTIVE] = this.__calSize(v, this.clientWidth, true);\n }\n if(isNil(__cacheStyle[PERSPECTIVE_ORIGIN])) {\n __cacheStyle[PERSPECTIVE_ORIGIN] = true;\n rebuild = true;\n __computedStyle[PERSPECTIVE_ORIGIN] = __currentStyle[PERSPECTIVE_ORIGIN].map((item, i) => {\n return this.__calSize(item, i ? this.__offsetHeight : this.__offsetWidth, true);\n });\n }\n let ppt = __computedStyle[PERSPECTIVE];\n // perspective为0无效\n if(rebuild && ppt) {\n let po = __computedStyle[PERSPECTIVE_ORIGIN];\n this.__perspectiveMatrix = tf.calPerspectiveMatrix(ppt, po[0] + __x1, po[1] + __y1);\n }\n return this.__perspectiveMatrix;\n }\n\n __calFilter(__currentStyle, __computedStyle, __cacheStyle) {\n __cacheStyle[FILTER] = true;\n this.__filterBbox = null;\n return __computedStyle[FILTER] = (__currentStyle[FILTER] || []).map(item => {\n let { k, v } = item;\n if(k === 'dropShadow') {\n let v2 = v.map((item2, i) => {\n if(i > 3) {\n return item2;\n }\n return this.__calSize(item2, i === 0 ? (this.__bx2 - this.__bx1) : (this.__by2 - this.__by1), true);\n });\n return { k, v: v2 };\n }\n else {\n // 部分%单位的滤镜强制使用数字\n if(v.u === DEG || v.u === NUMBER || v.u === PERCENT) {\n v = v.v;\n }\n else {\n v = this.__calSize(v, this.root.width, true);\n }\n return { k, v };\n }\n });\n }\n\n __calOffscreen(ctx, __computedStyle) {\n let offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow, root = this.__root;\n let { width, height } = root;\n let origin = ctx;\n let {\n [MIX_BLEND_MODE]: mixBlendMode,\n [FILTER]: filter,\n [OVERFLOW]: overflow,\n [DISPLAY]: display,\n } = __computedStyle;\n if(mixBlendMode !== 'normal' && isValidMbm(mixBlendMode)) {\n mixBlendMode = mbmName(mixBlendMode);\n let c = inject.getOffscreenCanvas(width, height, null, 'blend');\n offscreenBlend = {\n ctx,\n target: c,\n mixBlendMode,\n };\n ctx = c.ctx;\n }\n if(this.__hasMask) {\n let c = inject.getOffscreenCanvas(width, height, null, 'mask1');\n offscreenMask = {\n ctx,\n target: c,\n };\n ctx = c.ctx;\n }\n if(filter && filter.length) {\n let c = inject.getOffscreenCanvas(width, height, null, 'filter');\n offscreenFilter = {\n ctx,\n filter,\n target: c,\n };\n ctx = c.ctx;\n }\n if(overflow === 'hidden' && display !== 'inline') {\n let c = inject.getOffscreenCanvas(width, height, null, 'overflow');\n let bx1 = this.__bx1;\n let bx2 = this.__bx2;\n let by1 = this.__by1;\n let by2 = this.__by2;\n let {\n [BORDER_TOP_LEFT_RADIUS]: borderTopLeftRadius,\n [BORDER_TOP_RIGHT_RADIUS]: borderTopRightRadius,\n [BORDER_BOTTOM_RIGHT_RADIUS]: borderBottomRightRadius,\n [BORDER_BOTTOM_LEFT_RADIUS]: borderBottomLeftRadius,\n [BACKGROUND_CLIP]: backgroundClip,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [PADDING_LEFT]: paddingLeft,\n } = __computedStyle;\n let btlr = borderTopLeftRadius.slice(0);\n let btrr = borderTopRightRadius.slice(0);\n let bbrr = borderBottomRightRadius.slice(0);\n let bblr = borderBottomLeftRadius.slice(0);\n if(backgroundClip === 'paddingBox') {\n btlr[0] -= borderLeftWidth;\n btlr[1] -= borderTopWidth;\n btrr[0] -= borderRightWidth;\n btrr[1] -= borderTopWidth;\n bbrr[0] -= borderRightWidth;\n bbrr[1] -= borderBottomWidth;\n bblr[0] -= borderLeftWidth;\n bblr[1] -= borderBottomWidth;\n }\n else if(backgroundClip === 'contentBox') {\n btlr[0] -= borderLeftWidth + paddingLeft;\n btlr[1] -= borderTopWidth + paddingTop;\n btrr[0] -= borderRightWidth + paddingRight;\n btrr[1] -= borderTopWidth + paddingTop;\n bbrr[0] -= borderRightWidth + paddingRight;\n bbrr[1] -= borderBottomWidth + paddingBottom;\n bblr[0] -= borderLeftWidth + paddingLeft;\n bblr[1] -= borderBottomWidth + paddingBottom;\n }\n let borderList = border.calRadius(bx1, by1, bx2 - bx1, by2 - by1, btlr, btrr, bbrr, bblr);\n offscreenOverflow = {\n ctx,\n target: c,\n matrix: this.__matrixEvent,\n x: this.__x1,\n y: this.__y1,\n offsetWidth: this.__offsetWidth,\n offsetHeight: this.__offsetHeight,\n borderList,\n };\n ctx = c.ctx;\n }\n // 无离屏不返回\n if(origin === ctx) {\n return;\n }\n return {\n ctx,\n offscreenBlend,\n offscreenMask,\n offscreenFilter,\n offscreenOverflow,\n };\n }\n\n // 自定义图形可能需要覆盖判断,所以是public方法\n calContent(__currentStyle, __computedStyle) {\n let visibility = __currentStyle[VISIBILITY];\n if(visibility !== 'hidden') {\n let bgI = __currentStyle[BACKGROUND_IMAGE];\n if(Array.isArray(bgI)) {\n for(let i = 0, len = bgI.length; i < len; i++) {\n if(bgI[i]) {\n return this.__hasContent = true;\n }\n }\n }\n if(__currentStyle[BACKGROUND_COLOR].v[3] > 0) {\n let width = __computedStyle[WIDTH], height = __computedStyle[HEIGHT],\n paddingTop = __computedStyle[PADDING_TOP], paddingRight = __computedStyle[PADDING_RIGHT],\n paddingBottom = __computedStyle[PADDING_BOTTOM], paddingLeft = __computedStyle[PADDING_LEFT];\n if(width && height || paddingTop || paddingRight || paddingBottom || paddingLeft) {\n return this.__hasContent = true;\n }\n }\n for(let list = ['Top', 'Right', 'Bottom', 'Left'], i = 0, len = list.length; i < len; i++) {\n let k = list[i];\n if(__computedStyle[STYLE_KEY[style2Upper('border' + k + 'Width')]] > 0\n && __currentStyle[STYLE_KEY[style2Upper('border' + k + 'Color')]].v[3] > 0) {\n return this.__hasContent = true;\n }\n }\n let bs = __currentStyle[BOX_SHADOW];\n if(Array.isArray(bs)) {\n for(let i = 0, len = bs.length; i < len; i++) {\n let item = bs[i];\n if(item && item[4][3] > 0) {\n return this.__hasContent = true;\n }\n }\n }\n }\n return this.__hasContent = false;\n }\n\n /**\n * 渲染基础方法,Dom/Geom公用\n * @param renderMode\n * @see node/mode\n * @param ctx canvas/svg/webgl共用\n * @param dx cache时偏移x\n * @param dy cache时偏移y\n * @return Object\n * x1/x2/x3/x4/x5/x6/y1/y2/y3/y4/y5/y6 坐标\n * break svg判断无变化提前跳出\n */\n render(renderMode, ctx, dx = 0, dy = 0) {\n let {\n __isDestroyed: isDestroyed,\n } = this;\n let cacheStyle = this.__cacheStyle;\n let computedStyle = this.__computedStyle;\n if(isDestroyed) {\n return { isDestroyed, break: true };\n }\n let virtualDom;\n // svg设置vd上的lv属性标明lineHeight的话,另外特殊字体如arial拥有lineGap也会产生间隙,背景色不绘制这个间隙\n * x轴根据contentBox的范围坐标,y则固定和font/lineHeight相关\n * 圆角发生在首尾lineBox处,中间不会有,bgi则产生类似bgc作为mask的效果\n * 另外要注意多个时的顺序,必须依次渲染,后面的bb可能会覆盖前面行的\n */\n if(isRealInline) {\n let contentBoxList = this.contentBoxList;\n let length = contentBoxList.length;\n if(contentBoxList[length - 1] instanceof Ellipsis) {\n length--;\n }\n let hasBgi = backgroundImage.some(item => item);\n if(length) {\n let {\n [FONT_SIZE]: fontSize,\n [FONT_FAMILY]: fontFamily,\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n let iw = 0, ih = 0;\n let offscreen, svgBgSymbol = [];\n // bgi视作inline排满一行绘制,然后按分行拆开给每行\n if(hasBgi) {\n iw = inline.getInlineWidth(this, contentBoxList, isUpright);\n ih = lineHeight;\n // 垂直模式互换,计算时始终按照宽度为主轴计算的\n if(isUpright) {\n [iw, ih] = [ih, iw];\n }\n if(backgroundClip === 'paddingBox' || backgroundClip === 'padding-box') {\n if(isUpright) {\n iw += paddingTop + paddingBottom;\n ih += paddingLeft + paddingRight;\n }\n else {\n iw += paddingLeft + paddingRight;\n ih += paddingTop + paddingBottom;\n }\n }\n else if(backgroundClip !== 'contentBox' && backgroundClip !== 'content-box') {\n if(isUpright) {\n iw += paddingTop + paddingBottom + borderTopWidth + borderBottomWidth;\n ih += paddingLeft + paddingRight + borderLeftWidth + borderRightWidth;\n }\n else {\n iw += paddingLeft + paddingRight + borderLeftWidth + borderRightWidth;\n ih += paddingTop + paddingBottom + borderTopWidth + borderBottomWidth;\n }\n }\n if(renderMode === CANVAS || renderMode === WEBGL) {\n offscreen = inject.getOffscreenCanvas(iw, ih, '__$$INLINE_BGI$$__', null);\n }\n let length = backgroundImage.length;\n backgroundImage.slice(0).reverse().forEach((bgi, i) => {\n if(!bgi) {\n return;\n }\n i = length - 1 - i;\n if(util.isString(bgi)) {\n let loadBgi = this.__loadBgi[i];\n if(loadBgi.url === bgi) {\n let uuid = bg.renderImage(this, renderMode, offscreen && offscreen.ctx || ctx, loadBgi,\n 0, 0, iw, ih, btlr, btrr, bbrr, bblr,\n computedStyle, i, backgroundSize, backgroundRepeat, true, dx, dy);\n if(renderMode === SVG && uuid) {\n svgBgSymbol.push(uuid);\n }\n }\n }\n else if(bgi.k) {\n let gd = this.__gradient(renderMode, ctx, 0, 0, iw, ih, bgi, dx, dy);\n if(gd) {\n if(gd.k === 'conic') {\n gradient.renderConic(this, renderMode, offscreen && offscreen.ctx || ctx, gd.v, 0, 0, iw, lineHeight,\n btlr, btrr, bbrr, bblr, true);\n }\n else {\n let uuid = bg.renderBgc(this, renderMode, offscreen && offscreen.ctx || ctx, gd.v, null,\n 0, 0, iw, ih, btlr, btrr, bbrr, bblr, 'fill', true);\n if(renderMode === SVG && uuid) {\n svgBgSymbol.push(uuid);\n }\n }\n }\n }\n });\n }\n // 获取当前dom的baseline,再减去lineBox的baseline得出差值,这样渲染范围y就是lineBox的y+差值为起始,lineHeight为高\n // lineGap,一般为0,某些字体如arial有,渲染高度需减去它,最终是lineHeight - leading,上下均分\n let leading = fontSize * ((font.info[calFontFamily(fontFamily)] || {}).lgr || 0) * 0.5;\n let baseline = isUpright ? css.getVerticalBaseline(computedStyle) : css.getBaseline(computedStyle);\n // 注意只有1个的时候特殊情况,圆角只在首尾行出现\n let isFirst = true;\n let lastContentBox = contentBoxList[0], lastLineBox = lastContentBox.parentLineBox;\n // bgi需统计宽度累计值,将当前行所处理想单行的x范围位置计算出来,并进行bgi贴图绘制,svg还需统计第几行\n let count = 0;\n for(let i = 0; i < length; i++) {\n let contentBox = contentBoxList[i];\n if(contentBox.parentLineBox !== lastLineBox) {\n // 上一行\n let [ix1, iy1, ix2, iy2, bx1, by1, bx2, by2] = inline.getInlineBox(this, isUpright, contentBoxList,\n lastContentBox, contentBoxList[i - 1], lastLineBox, baseline, lineHeight, leading, isFirst, false,\n backgroundClip, paddingTop, paddingRight, paddingBottom, paddingLeft,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth);\n // 要算上开头空白inline,可能有多个和递归嵌套\n if(isFirst) {\n let n = getFirstEmptyInlineWidth(this);\n ix1 -= n;\n bx1 -= n;\n }\n if(backgroundColor[3] > 0) {\n bg.renderBgc(this, renderMode, ctx, cacheStyle[BACKGROUND_COLOR], null,\n ix1, iy1, ix2 - ix1, iy2 - iy1, btlr, [0, 0], [0, 0], bblr, 'fill', false, dx, dy);\n }\n let w = ix2 - ix1, h = iy2 - iy1; // 世界参考系的宽高,根据writingMode不同取值使用\n // canvas的bg位图裁剪\n if((renderMode === CANVAS || renderMode === WEBGL) && offscreen) {\n if(isUpright) {\n ctx.drawImage(offscreen.canvas, 0, count, iw, h, ix1 + dx, iy1 + dy, iw, h);\n }\n else {\n ctx.drawImage(offscreen.canvas, count, 0, w, ih, ix1 + dx, iy1 + dy, w, ih);\n }\n }\n //svg则特殊判断\n else if(renderMode === SVG && svgBgSymbol.length) {\n svgBgSymbol.forEach(symbol => {\n if(symbol) {\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n tagName: 'path',\n props: [\n [\n 'd',\n isUpright\n ? `M${0},${count}L${ih},${count}L${ih},${h+count}L${0},${h+count},L${0},${count}`\n : `M${count},${0}L${w+count},${0}L${w+count},${ih}L${count},${ih},L${count},${0}`\n ],\n ],\n }\n ],\n };\n let clip = ctx.add(v);\n this.__cacheDefs.push(v);\n virtualDom.bb.push({\n type: 'item',\n tagName: 'use',\n props: [\n ['xlink:href', '#' + symbol],\n ['x', isUpright ? ix1 : (ix1 - count)],\n ['y', isUpright ? (iy1 - count) : iy1],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n });\n }\n count += isUpright ? h : w; // 增加主轴方向的一行/列尺寸\n if(boxShadow) {\n boxShadow.forEach(item => {\n bs.renderBoxShadow(this, renderMode, ctx, item, bx1, by1, bx2, by2, bx2 - bx1, by2 - by1, dx, dy);\n });\n }\n if(borderTopWidth > 0 && borderTopColor[3] > 0) {\n let deg1 = Math.atan(borderTopWidth / borderLeftWidth);\n let deg2 = Math.atan(borderTopWidth / borderRightWidth);\n let list = border.calPoints(borderTopWidth, computedStyle[BORDER_TOP_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 0, isFirst ? btlr : [0, 0], [0, 0]);\n border.renderBorder(this, renderMode, ctx, list, cacheStyle[BORDER_TOP_COLOR], dx, dy);\n }\n // right在最后这里不渲染\n if(borderBottomWidth > 0 && borderBottomColor[3] > 0) {\n let deg1 = Math.atan(borderBottomWidth / borderLeftWidth);\n let deg2 = Math.atan(borderBottomWidth / borderRightWidth);\n let list = border.calPoints(borderBottomWidth, computedStyle[BORDER_BOTTOM_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 2, isFirst ? btlr : [0, 0], [0, 0]);\n border.renderBorder(this, renderMode, ctx, list, cacheStyle[BORDER_BOTTOM_COLOR], dx, dy);\n }\n if(isFirst && borderLeftWidth > 0 && borderLeftColor[3] > 0) {\n let deg1 = Math.atan(borderLeftWidth / borderTopWidth);\n let deg2 = Math.atan(borderLeftWidth / borderBottomWidth);\n let list = border.calPoints(borderLeftWidth, computedStyle[BORDER_LEFT_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 3, btlr, btrr);\n border.renderBorder(this, renderMode, ctx, list, cacheStyle[BORDER_LEFT_COLOR], dx, dy);\n }\n isFirst = false;\n lastContentBox = contentBox;\n lastLineBox = contentBox.parentLineBox;\n }\n // 最后一个特殊判断\n if(i === length - 1) {\n let [ix1, iy1, ix2, iy2, bx1, by1, bx2, by2] = inline.getInlineBox(this, isUpright, contentBoxList,\n lastContentBox, contentBoxList[i], lastLineBox, baseline, lineHeight, leading, isFirst, true,\n backgroundClip, paddingTop, paddingRight, paddingBottom, paddingLeft,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth);\n // 要算上开头空白inline,可能有多个和递归嵌套\n if(isFirst) {\n let n = getFirstEmptyInlineWidth(this);\n ix1 -= n;\n bx1 -= n;\n }\n // 要算上末尾空白inline,可能有多个和递归嵌套\n let n = getLastEmptyInlineWidth(this);\n ix2 += n;\n bx2 += n;\n if(backgroundColor[3] > 0) {\n bg.renderBgc(this, renderMode, ctx, cacheStyle[BACKGROUND_COLOR], null,\n ix1, iy1, ix2 - ix1, iy2 - iy1, isFirst ? btlr : [0, 0], btrr, bbrr, isFirst ? bblr : [0, 0],\n 'fill', false, dx, dy);\n }\n let w = ix2 - ix1, h = iy2 - iy1;\n // canvas的bg位图裁剪\n if((renderMode === CANVAS || renderMode === WEBGL) && offscreen) {\n if(isUpright) {\n ctx.drawImage(offscreen.canvas, 0, count, iw, h, ix1 + dx, iy1 + dy, iw, h);\n }\n else {\n ctx.drawImage(offscreen.canvas, count, 0, w, ih, ix1 + dx, iy1 + dy, w, ih);\n }\n }\n //svg则特殊判断\n else if(renderMode === SVG && svgBgSymbol.length) {\n svgBgSymbol.forEach(symbol => {\n if(symbol) {\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n tagName: 'path',\n props: [\n [\n 'd',\n isUpright\n ? `M${0},${count}L${ih},${count}L${ih},${h+count}L${0},${h+count},L${0},${count}`\n : `M${count},${0}L${w+count},${0}L${w+count},${ih}L${count},${ih},L${count},${0}`\n ],\n ],\n }\n ],\n };\n let clip = ctx.add(v);\n this.__cacheDefs.push(v);\n virtualDom.bb.push({\n type: 'item',\n tagName: 'use',\n props: [\n ['xlink:href', '#' + symbol],\n ['x', isUpright ? ix1 : (ix1 - count)],\n ['y', isUpright ? (iy1 - count) : iy1],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n });\n }\n if(boxShadow) {\n boxShadow.forEach(item => {\n bs.renderBoxShadow(this, renderMode, ctx, item, bx1, by1, bx2, by2, bx2 - bx1, by2 - by1, dx, dy);\n });\n }\n if(borderTopWidth > 0 && borderTopColor[3] > 0) {\n let deg1 = Math.atan(borderTopWidth / borderLeftWidth);\n let deg2 = Math.atan(borderTopWidth / borderRightWidth);\n let list = border.calPoints(borderTopWidth, computedStyle[BORDER_TOP_STYLE], deg1, deg2,\n bx1, bx1, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 0, isFirst ? btlr : [0, 0], btrr);\n border.renderBorder(this, renderMode, ctx, list, cacheStyle[BORDER_TOP_COLOR], dx, dy);\n }\n if(borderRightWidth > 0 && borderRightColor[3] > 0) {\n let deg1 = Math.atan(borderRightWidth / borderTopWidth);\n let deg2 = Math.atan(borderRightWidth / borderBottomWidth);\n let list = border.calPoints(borderRightWidth, computedStyle[BORDER_RIGHT_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 1, btlr, btrr);\n border.renderBorder(this, renderMode, ctx, list, cacheStyle[BORDER_RIGHT_COLOR], dx, dy);\n }\n if(borderBottomWidth > 0 && borderBottomColor[3] > 0) {\n let deg1 = Math.atan(borderBottomWidth / borderLeftWidth);\n let deg2 = Math.atan(borderBottomWidth / borderRightWidth);\n let list = border.calPoints(borderBottomWidth, computedStyle[BORDER_BOTTOM_STYLE], deg1, deg2,\n bx1, bx1, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 2, isFirst ? btlr : [0, 0], btrr);\n border.renderBorder(this, renderMode, ctx, list, cacheStyle[BORDER_BOTTOM_COLOR], dx, dy);\n }\n if(isFirst && borderLeftWidth > 0 && borderLeftColor[3] > 0) {\n let deg1 = Math.atan(borderLeftWidth / borderTopWidth);\n let deg2 = Math.atan(borderLeftWidth / borderBottomWidth);\n let list = border.calPoints(borderLeftWidth, computedStyle[BORDER_LEFT_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 3, btlr, btrr);\n border.renderBorder(this, renderMode, ctx, list, cacheStyle[BORDER_LEFT_COLOR], dx, dy);\n }\n }\n }\n if(offscreen) {\n offscreen.ctx.clearRect(0, 0, iw, ih);\n }\n return res;\n }\n // 无内容且无尺寸的无需渲染\n else if(bx1 === bx2 || by1 === by2) {\n return res;\n }\n }\n // block渲染,bgc垫底\n if(backgroundColor[3] > 0) {\n bg.renderBgc(this, renderMode, ctx, cacheStyle[BACKGROUND_COLOR], borderList,\n bx1, by1, bx2 - bx1, by2 - by1, btlr, btrr, bbrr, bblr, 'fill', false, dx, dy);\n }\n // 渐变或图片叠加\n if(backgroundImage) {\n let length = backgroundImage.length;\n backgroundImage.slice(0).reverse().forEach((bgi, i) => {\n if(!bgi) {\n return;\n }\n i = length - 1 - i;\n if(util.isString(bgi)) {\n let loadBgi = this.__loadBgi[i];\n if(loadBgi.url === bgi) {\n bg.renderImage(this, renderMode, ctx, loadBgi,\n bx1, by1, bx2, by2, btlr, btrr, bbrr, bblr,\n computedStyle, i, backgroundSize, backgroundRepeat, false, dx, dy);\n }\n }\n else if(bgi.k) {\n let gd = this.__gradient(renderMode, ctx, bx1, by1, bx2, by2, bgi, dx, dy);\n if(gd) {\n if(gd.k === 'conic') {\n gradient.renderConic(this, renderMode, ctx, gd.v, bx1, by1, bx2 - bx1, by2 - by1,\n btlr, btrr, bbrr, bblr);\n }\n else {\n bg.renderBgc(this, renderMode, ctx, gd.v, borderList,\n bx1, by1, bx2 - bx1, by2 - by1, btlr, btrr, bbrr, bblr, 'fill', false, dx, dy);\n }\n }\n }\n });\n }\n // boxShadow可能会有多个\n if(boxShadow) {\n boxShadow.forEach(item => {\n bs.renderBoxShadow(this, renderMode, ctx, item, x1, y1, x6, y6, x6 - x1, y6 - y1, dx, dy);\n });\n }\n // 边框需考虑尖角,两条相交边平分45°夹角\n if(borderTopWidth > 0 && borderTopColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, cacheStyle[BORDER_TOP], cacheStyle[BORDER_TOP_COLOR], dx, dy);\n }\n if(borderRightWidth > 0 && borderRightColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, cacheStyle[BORDER_RIGHT], cacheStyle[BORDER_RIGHT_COLOR], dx, dy);\n }\n if(borderBottomWidth > 0 && borderBottomColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, cacheStyle[BORDER_BOTTOM], cacheStyle[BORDER_BOTTOM_COLOR], dx, dy);\n }\n if(borderLeftWidth > 0 && borderLeftColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, cacheStyle[BORDER_LEFT], cacheStyle[BORDER_LEFT_COLOR], dx, dy);\n }\n return res;\n }\n\n // 强制刷新API\n refresh(lv, cb) {\n let root = this.__root;\n if(isFunction(lv) || !lv) {\n lv = CACHE;\n }\n if(lv) {\n this.clearCache(lv < REPAINT);\n }\n if(root && !this.__isDestroyed) {\n root.__addUpdate(this, null, lv, null, null, null, cb);\n }\n else if(isFunction(cb)) {\n cb(-1);\n }\n }\n\n __destroy() {\n if(this.__isDestroyed) {\n return;\n }\n let ref = this.props.ref;\n if(!isNil(ref) && !isFunction(ref)) {\n delete this.__root.__ref[ref];\n }\n super.__destroy();\n this.clearAnimate();\n this.clearFrameAnimate();\n this.clearCache();\n let fontRegister = this.__fontRegister;\n for(let i in fontRegister) {\n if(fontRegister.hasOwnProperty(i)) {\n font.offRegister(i, this);\n }\n }\n this.__host = this.__hostRoot = this.__root\n = this.__prev = this.__next\n = this.__parent = this.__domParent = null;\n this.__reset0();\n }\n\n // 先查找到注册了事件的节点,再捕获冒泡判断增加性能\n __emitEvent(e, force) {\n let { __isDestroyed, __computedStyle: computedStyle, __mask } = this;\n if(__isDestroyed || computedStyle[DISPLAY] === 'none' || e.__stopPropagation || __mask) {\n return;\n }\n let { event: { type } } = e;\n let { listener, __hasMask } = this;\n let cb;\n if(listener.hasOwnProperty(type)) {\n cb = listener[type];\n }\n // touchmove之类强制的直接由Root通知即可\n if(force) {\n if(computedStyle[POINTER_EVENTS] !== 'none' && isFunction(cb) && !e.__stopImmediatePropagation) {\n cb.call(this, e);\n }\n return true;\n }\n // 非force的判断事件坐标是否在节点内\n if(this.willResponseEvent(e)) {\n // 如果有mask,点在mask上才行,点在clip外才行\n if(__hasMask) {\n let next = this.next;\n let isClip = next.__clip;\n let hasEmitMask;\n while(next && next.__mask) {\n if(next.willResponseEvent(e, true)) {\n hasEmitMask = true;\n break;\n }\n next = next.next;\n }\n if(!isClip && !hasEmitMask) {\n return;\n }\n }\n if(isFunction(cb) && !e.__stopImmediatePropagation) {\n cb.call(this, e);\n }\n return true;\n }\n }\n\n willResponseEvent(e, ignore) {\n let { x, y } = e;\n let { __x1, __y1, __offsetWidth, __offsetHeight, __matrixEvent, __computedStyle } = this;\n if(__computedStyle[POINTER_EVENTS] === 'none') {\n return;\n }\n let inThis = geom.pointInQuadrilateral(\n x, y,\n __x1, __y1,\n __x1 + __offsetWidth, __y1,\n __x1 + __offsetWidth, __y1 + __offsetHeight,\n __x1, __y1 + __offsetHeight,\n __matrixEvent\n );\n if(inThis) {\n if(!e.target && !ignore) {\n e.target = this;\n // 缓存target给move用\n if(e.event.type === 'touchstart') {\n this.root && (this.root.__touchstartTarget = this);\n }\n }\n return true;\n }\n }\n\n __gradient(renderMode, ctx, bx1, by1, bx2, by2, bgi, dx = 0, dy = 0) {\n let iw = bx2 - bx1;\n let ih = by2 - by1;\n // 无尺寸无需创建渐变\n if(!iw || !ih) {\n return;\n }\n let { k, v, d, s, z, p } = bgi;\n let cx = bx1 + iw * 0.5;\n let cy = by1 + ih * 0.5;\n let res = { k };\n if(k === 'linear') {\n let gd = gradient.getLinear(v, d, bx1, by1, cx, cy, iw, ih, this.root, dx, dy);\n res.v = this.__getLg(renderMode, ctx, gd);\n }\n else if(k === 'radial') {\n let gd = gradient.getRadial(v, s, z, p, bx1, by1, bx2, by2, this.root, dx, dy);\n if(gd) {\n res.v = this.__getRg(renderMode, ctx, gd)\n if(gd.matrix) {\n res.v = [res.v, gd.matrix, gd.cx, gd.cy];\n }\n }\n }\n else if(k === 'conic') {\n let bbox = this.bbox;\n let m1 = Math.max(Math.abs(bbox[2] - bbox[0]), Math.abs(bbox[3] - bbox[1]));\n let m2 = Math.max(Math.abs(iw), Math.abs(ih));\n let gd = gradient.getConic(v, d, p, bx1, by1, bx2, by2, m1 / m2, this.root, dx, dy);\n res.v = this.__getCg(renderMode, ctx, gd);\n }\n return res;\n }\n\n __getLg(renderMode, ctx, gd) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let lg = ctx.createLinearGradient(gd.x1, gd.y1, gd.x2, gd.y2);\n gd.stop.forEach(item => {\n lg.addColorStop(item[1], int2rgba(item[0]));\n });\n return lg;\n }\n else if(renderMode === SVG) {\n let v = {\n tagName: 'linearGradient',\n props: [\n ['x1', gd.x1],\n ['y1', gd.y1],\n ['x2', gd.x2],\n ['y2', gd.y2],\n ],\n children: gd.stop.map(item => {\n return {\n tagName: 'stop',\n props: [\n ['stop-color', int2rgba(item[0])],\n ['offset', item[1] * 100 + '%'],\n ],\n };\n }),\n };\n let uuid = ctx.add(v);\n this.__cacheDefs.push(v);\n return 'url(#' + uuid + ')';\n }\n }\n\n __getRg(renderMode, ctx, gd) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let rg = ctx.createRadialGradient(gd.cx, gd.cy, 0, gd.tx, gd.ty, gd.r);\n gd.stop.forEach(item => {\n rg.addColorStop(item[1], int2rgba(item[0]));\n });\n return rg;\n }\n else if(renderMode === SVG) {\n let v = {\n tagName: 'radialGradient',\n props: [\n ['cx', gd.tx],\n ['cy', gd.ty],\n ['r', gd.r],\n ],\n children: gd.stop.map(item => {\n return {\n tagName: 'stop',\n props: [\n ['stop-color', int2rgba(item[0])],\n ['offset', item[1] * 100 + '%'],\n ],\n };\n }),\n };\n if(gd.tx !== gd.cx) {\n v.props.push(['fx', gd.cx]);\n }\n if(gd.ty !== gd.cy) {\n v.props.push(['fy', gd.cy]);\n }\n let uuid = ctx.add(v);\n this.__cacheDefs.push(v);\n return 'url(#' + uuid + ')';\n }\n }\n\n __getCg(renderMode, ctx, gd) {\n let { stop } = gd;\n let len = stop.length - 1;\n if(stop[len][1] < 1) {\n stop.push([stop[len][0].slice(0), 1]);\n }\n if(stop[0][1] > 0) {\n stop.unshift([stop[0][0].slice(0), 0]);\n }\n // canvas采用点色值计算法,svg则分360度画块\n let res = [];\n if(renderMode === CANVAS || renderMode === WEBGL) {\n return gd;\n }\n return res;\n }\n\n // canvas清空自身cache,cacheTotal在Root的自底向上逻辑做,svg仅有cacheTotal\n clearCache(onlyTotal) {\n let __cacheTotal = this.__cacheTotal;\n let __cacheFilter = this.__cacheFilter;\n let __cacheMask = this.__cacheMask;\n let __cache = this.__cache;\n if(__cache && !onlyTotal) {\n __cache.release();\n this.__refreshLevel |= REPAINT;\n }\n if(__cacheTotal) {\n __cacheTotal.release();\n }\n if(__cacheFilter) {\n __cacheFilter.release();\n }\n if(__cacheMask) {\n __cacheMask.release();\n }\n this.__refreshLevel |= CACHE;\n this.clearTopCache();\n }\n\n clearTopCache() {\n let p = this.__domParent;\n while(p) {\n let __cacheTotal = p.__cacheTotal;\n let __cacheFilter = p.__cacheFilter;\n let __cacheMask = p.__cacheMask;\n p.__refreshLevel |= CACHE;\n if(__cacheTotal) {\n __cacheTotal.release();\n }\n if(__cacheFilter) {\n __cacheFilter.release();\n }\n if(__cacheMask) {\n __cacheMask.release();\n }\n p = p.__domParent;\n }\n }\n\n updateStyle(style, cb) {\n let formatStyle = normalize(style);\n this.updateFormatStyle(formatStyle, cb);\n }\n\n // 传入格式化好key/value的样式\n updateFormatStyle(style, cb) {\n let root = this.__root, currentStyle = this.__currentStyle, currentProps = this.__currentProps;\n let keys = [];\n Object.keys(style).forEach(i => {\n let isGeom = GEOM.hasOwnProperty(i);\n if(!isGeom) {\n i = parseInt(i);\n }\n if(!equalStyle(i, isGeom ? currentProps[i] : currentStyle[i], style[i], this)) {\n if(isGeom) {\n currentProps[i] = style[i];\n }\n else {\n currentStyle[i] = style[i];\n }\n keys.push(i);\n }\n });\n if(!keys.length || this.__isDestroyed) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n if(root) {\n root.__addUpdate(this, keys, null, null, null, null, cb);\n }\n }\n\n animate(list, options = {}) {\n let animation = new Animation(this, list, options);\n if(this.__isDestroyed) {\n animation.__destroy();\n return animation;\n }\n this.__animationList.push(animation);\n if(options.autoPlay === false) {\n return animation;\n }\n return animation.play();\n }\n\n removeAnimate(o) {\n if(o instanceof Animation) {\n let i = this.__animationList.indexOf(o);\n if(i > -1) {\n o.cancel();\n o.__destroy();\n this.__animationList.splice(i, 1);\n }\n }\n }\n\n clearAnimate() {\n this.__animationList.splice(0).forEach(o => {\n o.cancel();\n o.__destroy();\n });\n }\n\n frameAnimate(cb) {\n if(isFunction(cb)) {\n let list = this.__frameAnimateList;\n // 防止重复\n for(let i = 0, len = list.length; i < len; i++) {\n if(list[i].__karasFramecb === cb) {\n return cb;\n }\n }\n let enter = {\n __after(diff) {\n cb(diff);\n },\n __karasFramecb: cb,\n };\n list.push(enter);\n frame.onFrame(enter);\n return cb;\n }\n }\n\n removeFrameAnimate(cb) {\n for(let i = 0, list = this.__frameAnimateList, len = list.length; i < len; i++) {\n if(list[i].__karasFramecb === cb) {\n list.splice(i, 1);\n frame.offFrame(cb);\n return;\n }\n }\n }\n\n clearFrameAnimate() {\n this.__frameAnimateList.splice(0).forEach(o => {\n frame.offFrame(o);\n });\n }\n\n // isLayout为false时,为relative,true则是absolute/justify/marginAuto等直接改layoutData数据的\n // lv是reflow偏移时传入,需要清除cacheStyle,并且对位图cache进行偏移设置\n // 注意所有的offset/resize都要避免display:none的,比如合并margin导致block的孩子inline因clamp为none时没有layoutData\n __offsetX(diff, isLayout, lv) {\n if(this.__computedStyle[DISPLAY] === 'none') {\n return;\n }\n super.__offsetX(diff);\n if(isLayout) {\n this.__layoutData.x += diff;\n }\n this.__x1 += diff;\n this.__x2 += diff;\n this.__x3 += diff;\n this.__x4 += diff;\n this.__x5 += diff;\n this.__x6 += diff;\n if(lv) {\n this.__refreshLevel |= lv;\n if(lv >= REFLOW) {\n this.__cacheStyle = [];\n this.__calStyle(lv, this.__currentStyle, this.__computedStyle, this.__cacheStyle);\n }\n if(this.__bbox) {\n this.__bbox[0] += diff;\n this.__bbox[2] += diff;\n }\n if(this.__filterBbox) {\n this.__filterBbox[0] += diff;\n this.__filterBbox[2] += diff;\n }\n }\n }\n\n __offsetY(diff, isLayout, lv) {\n if(this.__computedStyle[DISPLAY] === 'none') {\n return;\n }\n super.__offsetY(diff);\n if(isLayout) {\n this.__layoutData && (this.__layoutData.y += diff);\n }\n this.__y1 += diff;\n this.__y2 += diff;\n this.__y3 += diff;\n this.__y4 += diff;\n this.__y5 += diff;\n this.__y6 += diff;\n if(lv) {\n this.__refreshLevel |= lv;\n if(lv >= REFLOW) {\n this.__cacheStyle = [];\n this.__calStyle(lv, this.__currentStyle, this.__computedStyle, this.__cacheStyle);\n }\n if(this.__bbox) {\n this.__bbox[1] += diff;\n this.__bbox[3] += diff;\n }\n if(this.__filterBbox) {\n this.__filterBbox[1] += diff;\n this.__filterBbox[3] += diff;\n }\n if(this.__cache) {\n this.__cache.__offsetY(diff);\n }\n if(this.__cacheTotal) {\n this.__cacheTotal.__offsetY(diff);\n }\n if(this.__cacheFilter) {\n this.__cacheFilter.__offsetY(diff);\n }\n if(this.__cacheMask) {\n this.__cacheMask.__offsetY(diff);\n }\n }\n }\n\n __resizeX(diff, lv) {\n if(this.__computedStyle[DISPLAY] === 'none') {\n return;\n }\n this.__computedStyle.width = this.__width += diff;\n this.__clientWidth += diff;\n this.__offsetWidth += diff;\n this.__outerWidth += diff;\n this.__layoutData && (this.__layoutData.w += diff);\n this.__x4 += diff;\n this.__x5 += diff;\n this.__x6 += diff;\n if(diff < 0) {\n this.__limitCache = false;\n }\n if(lv) {\n this.__refreshLevel |= lv;\n if(lv >= REFLOW) {\n this.__cacheStyle = [];\n this.__calStyle(lv, this.__currentStyle, this.__computedStyle, this.__cacheStyle);\n }\n }\n this.clearCache();\n }\n\n __resizeY(diff, lv) {\n if(this.__computedStyle[DISPLAY] === 'none') {\n return;\n }\n this.__computedStyle.height = this.__height += diff;\n this.__clientHeight += diff;\n this.__offsetHeight += diff;\n this.__outerHeight += diff;\n this.__layoutData.h += diff;\n this.__y4 += diff;\n this.__y5 += diff;\n this.__y6 += diff;\n if(diff < 0) {\n this.__limitCache = false;\n }\n if(lv) {\n this.__refreshLevel |= lv;\n if(lv >= REFLOW) {\n this.__cacheStyle = [];\n this.__calStyle(lv, this.__currentStyle, this.__computedStyle, this.__cacheStyle);\n }\n }\n this.clearCache();\n }\n\n getComputedStyle(key) {\n let computedStyle = this.__computedStyle;\n let res = {};\n let keys = [];\n if(key) {\n let temp;\n if(Array.isArray(key)) {\n temp = key;\n }\n else {\n temp = [key];\n }\n temp.forEach(k => {\n if(abbr.hasOwnProperty(k)) {\n abbr[k].forEach(k => {\n keys.push(STYLE_KEY[style2Upper(k)]);\n });\n }\n else {\n keys.push(STYLE_KEY[style2Upper(k)]);\n }\n });\n }\n else {\n keys = Object.keys(computedStyle);\n }\n keys.forEach(k => {\n if(GEOM.hasOwnProperty(k)) {\n res[k] = computedStyle[k];\n }\n else {\n res[STYLE_RV_KEY[k]] = computedStyle[k];\n }\n });\n return res;\n }\n\n getBoundingClientRect(includeBbox) {\n let box;\n if(includeBbox) {\n box = this.bbox;\n }\n else {\n let { __x1, __y1, __offsetWidth, __offsetHeight } = this;\n box = [__x1, __y1, __x1 + __offsetWidth, __y1 + __offsetHeight];\n }\n let matrixEvent = this.__matrixEvent;\n let p1 = point2d(mx.calPoint({ x: box[0], y: box[1] }, matrixEvent));\n let p2 = point2d(mx.calPoint({ x: box[2], y: box[1] }, matrixEvent));\n let p3 = point2d(mx.calPoint({ x: box[2], y: box[3] }, matrixEvent));\n let p4 = point2d(mx.calPoint({ x: box[0], y: box[3] }, matrixEvent));\n return {\n left: Math.min(p1.x, Math.min(p2.x, Math.min(p3.x, p4.x))),\n top: Math.min(p1.y, Math.min(p2.y, Math.min(p3.y, p4.y))),\n right: Math.max(p1.x, Math.max(p2.x, Math.max(p3.x, p4.x))),\n bottom: Math.max(p1.y, Math.max(p2.y, Math.max(p3.y, p4.y))),\n points: [p1, p2, p3, p4],\n };\n }\n\n // img和geom返回false,在inline布局时判断是否是真的inline\n __isRealInline() {\n return true;\n }\n\n remove(cb) {\n let { __root: root } = this;\n let parent = this.isShadowRoot ? this.hostRoot.__parent: this.__parent;\n let i;\n if(parent) {\n // 移除component的shadowRoot视为移除component\n let target = this.isShadowRoot ? this.hostRoot : this;\n i = parent.__children.indexOf(target);\n parent.__children.splice(i, 1);\n i = parent.__zIndexChildren.indexOf(target);\n parent.__zIndexChildren.splice(i, 1);\n let { __prev, __next } = this;\n if(__prev) {\n __prev.__next = __next;\n }\n if(__next) {\n __next.__prev = __prev;\n }\n }\n if(this.__isDestroyed) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n parent.__deleteStruct(this, i);\n // 不可见仅改变数据结构\n if(this.__computedStyle[DISPLAY] === 'none' || parent.__computedStyle[DISPLAY] === 'none') {\n this.__destroy();\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 可见在reflow逻辑做结构关系等\n root.__addUpdate(this, null, REFLOW, null, true, null, cb);\n }\n\n get tagName() {\n return this.__tagName;\n }\n\n get clientWidth() {\n return this.__clientWidth || 0;\n }\n\n get clientHeight() {\n return this.__clientHeight || 0;\n }\n\n get offsetWidth() {\n return this.__offsetWidth || 0;\n }\n\n get offsetHeight() {\n return this.__offsetHeight || 0;\n }\n\n get outerWidth() {\n return this.__outerWidth || 0;\n }\n\n get outerHeight() {\n return this.__outerHeight || 0;\n }\n\n // 相对自身原点,不考虑margin的范围,>=REPAINT渲染或个别有影响的渲染改变(如blur)清空缓存\n get bbox() {\n if(!this.__bbox) {\n let {\n __x1, __y1, __offsetWidth, __offsetHeight,\n __computedStyle: {\n [BOX_SHADOW]: boxShadow,\n },\n } = this;\n this.__bbox = spreadBoxShadow([__x1, __y1, __x1 + __offsetWidth, __y1 + __offsetHeight], boxShadow);\n }\n return this.__bbox;\n }\n\n get filterBbox() {\n if(!this.__filterBbox) {\n let bbox = this.__bbox || this.bbox;\n let filter = this.__computedStyle[FILTER];\n this.__filterBbox = spreadFilter(bbox, filter);\n }\n return this.__filterBbox;\n }\n\n get listener() {\n return this.__listener;\n }\n\n get opacity() {\n return this.__opacity;\n }\n\n get matrix() {\n return this.__matrix;\n }\n\n get matrixEvent() {\n let __domParent = this.__domParent, matrix = this.__matrix;\n while(__domParent) {\n matrix = mx.multiply(__domParent.__perspectiveMatrix, matrix);\n matrix = mx.multiply(__domParent.__matrix, matrix);\n __domParent = __domParent.__domParent;\n }\n return matrix;\n }\n\n get perspectiveMatrix() {\n return this.__perspectiveMatrix;\n }\n\n get style() {\n return this.__style;\n }\n\n get computedStyle() {\n return this.__computedStyle;\n }\n\n get animationList() {\n return this.__animationList;\n }\n\n get currentStyle() {\n return this.__currentStyle;\n }\n\n get cacheStyle() {\n return this.__cacheStyle;\n }\n\n get isShadowRoot() {\n return !this.parent && this.host && this.host !== this.root;\n }\n\n get contentBoxList() {\n return this.__contentBoxList;\n }\n\n get baseline() {\n return this.__offsetHeight;\n }\n\n get firstBaseline() {\n return this.__offsetHeight;\n }\n\n get verticalBaseline() {\n return this.__offsetWidth;\n }\n\n get mask() {\n return this.__mask;\n }\n\n set mask(v) {\n v = !!v;\n if(this.__mask !== v) {\n this.__mask = v;\n let root = this.__root;\n if(root && !this.__isDestroyed) {\n let p = this.__domParent;\n if(p) {\n if(v) {\n p.__computedStyle[TRANSFORM_STYLE] = 'flat';\n }\n else {\n p.__computedStyle[TRANSFORM_STYLE] = p.__currentStyle[TRANSFORM_STYLE];\n }\n }\n root.__addUpdate(this, null, MASK, null, null, null, null);\n }\n }\n }\n\n get clip() {\n return this.__clip;\n }\n\n set clip(v) {\n v = !!v;\n if(this.__clip !== v) {\n this.__clip = v;\n let root = this.__root;\n if(root && !this.__isDestroyed) {\n let p = this.__domParent;\n if(p) {\n if(v) {\n p.__computedStyle[TRANSFORM_STYLE] = 'flat';\n }\n else {\n p.__computedStyle[TRANSFORM_STYLE] = p.__currentStyle[TRANSFORM_STYLE];\n }\n }\n root.__addUpdate(this, null, MASK, null, null, null, null);\n }\n }\n }\n\n get cacheAsBitmap() {\n return this.__cacheAsBitmap;\n }\n\n set cacheAsBitmap(v) {\n v = !!v;\n if(this.__cacheAsBitmap !== v) {\n this.__cacheAsBitmap = v;\n let root = this.__root;\n if(root && !this.__isDestroyed) {\n if(v) {\n this.__computedStyle[TRANSFORM_STYLE] = 'flat';\n }\n else {\n this.__computedStyle[TRANSFORM_STYLE] = this.__currentStyle[TRANSFORM_STYLE];\n }\n root.__addUpdate(this, null, REPAINT, null, null, null, null);\n }\n }\n }\n\n get parentLineBox() {\n return this.__parentLineBox;\n }\n}\n\nexport default Xom;\n","import TextBox from './TextBox';\nimport enums from '../util/enums';\nimport css from '../style/css';\n\nconst { STYLE_KEY: {\n DISPLAY,\n MARGIN_TOP,\n MARGIN_BOTTOM,\n MARGIN_LEFT,\n MARGIN_RIGHT,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_RIGHT_WIDTH,\n PADDING_TOP,\n PADDING_BOTTOM,\n PADDING_LEFT,\n PADDING_RIGHT,\n LINE_HEIGHT,\n} } = enums;\n\n/**\n * css中常见的概念,一行内容,里面可能有若干不同的内容,仅在布局阶段出现,不参与渲染逻辑\n * 本类是个抽象逻辑概念,会包含Text的内容TextBox和inlineBlock等节点,而内容TextBox则属于Text\n * 一个Text可能因为换行产生多个TextBox,从而形成不同行的内容就属于不同的LineBox\n * 本类属于block(包含flex和inlineBlock,下同)节点下,一个dom会有个专门列表,\n * 包含若干个LineBox保存着若干行文本内容TextBox,不直接关联Text,\n * inline则不会有此对象和列表,其复用最近block父层的,这样解决嵌套问题,\n * block在布局时将列表向孩子传递下去,每遇到block会重新生成\n * 每当发生换行时,专门列表中会新生成一个LineBox,让后续内容继续跟随新的LB\n * LB内部要进行垂直对齐,Text内容较简单x字符底部为baseline,inlineBlock等节点按最后一行baseline\n */\nclass LineBox {\n constructor(x, y, lineHeight, baseline, isUpright) {\n this.__list = [];\n this.__x = x;\n this.__y = y;\n this.__oy = 0; // 很难受,relative的offset不能直接加在x上,会引发重复以及block父尺寸问题\n this.__lineHeight = lineHeight; // 可能出现空的inline,因此一个inline进入布局时先设置当前lineBox的最小lineHeight/baseline\n this.__baseline = baseline;\n this.__isUpright = isUpright;\n this.__bOffset = 0;\n }\n\n add(item) {\n this.list.push(item);\n item.__parentLineBox = this;\n }\n\n verticalAlign(isUpright) {\n let baseline = isUpright ? this.verticalBaseline : this.baseline;\n let lineHeight = isUpright ? this.verticalLineHeight : this.lineHeight;\n let increase = lineHeight;\n // 只有1个也需要对齐,因为可能内嵌了空inline使得baseline发生变化\n if(this.list.length) {\n this.list.forEach(item => {\n if(item.isEllipsis) {\n return;\n }\n // 垂直排版计算不太一样,因为原点坐标系不一样\n if(isUpright) {\n let n = item.verticalBaseline;\n if(n !== baseline) {\n let d = baseline - n;\n item.__offsetX(d, true);\n // 同下方\n increase = Math.max(increase, item.offsetWidth + d);\n }\n }\n else {\n let n = item.baseline;\n if(n !== baseline) {\n let d = baseline - n;\n item.__offsetY(d, true);\n // text的话对齐下移可能影响整体高度,在同行有img/ib这样的替换元素下,需记录最大偏移导致的高度调整值\n // 比如一个字符和img,字符下调y即字符的baseline和图片底部对齐,导致高度增加lineHeight和baseline的差值\n increase = Math.max(increase, item.offsetHeight + d);\n }\n }\n });\n // 特殊情况,有img这样的替换元素时,要参与这一行和baseline的对齐扩充,常见于css的img底部额外4px问题\n // 先计算总体baseline和本身baseline差值得出偏移,然后加到本身lineHeight上得出尺寸,再和其它扩充取最大值\n let diff = baseline - this.__baseline;\n increase = Math.max(increase, this.__lineHeight + diff);\n }\n return Math.max(0, increase - lineHeight);\n }\n\n __offsetX(diff, isAlign) {\n this.__x += diff;\n // vertical-align或水平情况特殊对齐,可能替换元素img和text导致偏移\n if(isAlign) {\n this.list.forEach(item => {\n item.__offsetX(diff, true);\n });\n }\n }\n\n __offsetY(diff, isAlign) {\n this.__y += diff;\n // vertical-align情况或水平特殊对齐,可能替换元素img和textBox导致偏移\n if(isAlign) {\n this.list.forEach(item => {\n item.__offsetY(diff, true);\n });\n }\n }\n\n /**\n * 防止非行首空inline,每当遇到inline就设置当前lineBox的lineHeight/baseline,这样有最小值兜底\n * @param l\n * @param b\n * @private\n */\n __setLB(l, b) {\n this.__lineHeight = Math.max(l, this.__lineHeight);\n this.__baseline = Math.max(b, this.__baseline);\n }\n\n __resetLb(l, b) {\n this.list.forEach(item => {\n let dom = item;\n if(item instanceof TextBox) {\n dom = item.parent.parent;\n }\n let computedStyle = dom.computedStyle;\n while(computedStyle[DISPLAY] === 'inline') {\n l = Math.max(l, computedStyle[LINE_HEIGHT]);\n b = Math.max(b, css.getBaseline(computedStyle));\n dom = dom.domParent;\n computedStyle = dom.computedStyle;\n }\n });\n this.__lineHeight = l;\n this.__baseline = b;\n }\n\n get list() {\n return this.__list;\n }\n\n get size() {\n return this.__list.length;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get ox() {\n return this.__ox;\n }\n\n get oy() {\n return this.__oy;\n }\n\n get endX() {\n return this.x + this.width;\n }\n\n get endY() {\n return this.y + this.height;\n }\n\n get width() {\n if(this.isUpright) {\n return this.verticalLineHeight;\n }\n let list = this.list;\n let length = list.length;\n if(length) {\n let first = list[0];\n let last = list[length - 1];\n let x1 = first.x;\n let dom = first instanceof TextBox ? first.parent.domParent : first.domParent;\n // 因为inline可以嵌套inline,所以一直向上查找到非inline为止,每层inline如果是首个则减去左侧mbp\n while(true) {\n let list = dom.contentBoxList;\n let {\n [DISPLAY]: display,\n [MARGIN_LEFT]: marginLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [PADDING_LEFT]: paddingLeft,\n } = dom.computedStyle;\n if(display !== 'inline') {\n break;\n }\n if(first === list[0]) {\n x1 -= marginLeft + borderLeftWidth + paddingLeft;\n }\n dom = dom.domParent;\n }\n let x2 = last.x + last.outerWidth;\n dom = last instanceof TextBox ? last.parent.domParent : last.domParent;\n // 同向上查非inline,每层inline如果是最后一个则加上右侧mbp\n while(true) {\n let list = dom.contentBoxList;\n let {\n [DISPLAY]: display,\n [MARGIN_RIGHT]: marginRight,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [PADDING_RIGHT]: paddingRight,\n } = dom.computedStyle;\n if(display !== 'inline') {\n break;\n }\n if(first === list[list.length - 1]) {\n x2 += marginRight + borderRightWidth + paddingRight;\n }\n dom = dom.domParent;\n }\n return x2 - x1;\n }\n return 0;\n }\n\n get height() {\n if(!this.isUpright) {\n return this.lineHeight;\n }\n let list = this.list;\n let length = list.length;\n if(length) {\n let first = list[0];\n let last = list[length - 1];\n let y1 = first.y;\n let dom = first instanceof TextBox ? first.parent.domParent : first.domParent;\n // 因为inline可以嵌套inline,所以一直向上查找到非inline为止,每层inline如果是首个则减去左侧mbp\n while(true) {\n let list = dom.contentBoxList;\n let {\n [DISPLAY]: display,\n [MARGIN_TOP]: marginTop,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [PADDING_TOP]: paddingTop,\n } = dom.computedStyle;\n if(display !== 'inline') {\n break;\n }\n if(first === list[0]) {\n y1 -= marginTop + borderTopWidth + paddingTop;\n }\n dom = dom.domParent;\n }\n let y2 = last.y + last.outerHeight;\n dom = last instanceof TextBox ? last.parent.domParent : last.domParent;\n // 同向上查非inline,每层inline如果是最后一个则加上右侧mbp\n while(true) {\n let list = dom.contentBoxList;\n let {\n [DISPLAY]: display,\n [MARGIN_BOTTOM]: marginBottom,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [PADDING_BOTTOM]: paddingBottom,\n } = dom.computedStyle;\n if(display !== 'inline') {\n break;\n }\n if(first === list[list.length - 1]) {\n y2 += marginBottom + borderBottomWidth + paddingBottom;\n }\n dom = dom.domParent;\n }\n return y2 - y1;\n }\n return 0;\n }\n\n get bOffset() {\n return this.__bOffset;\n }\n\n get baseline() {\n let baseline = this.__baseline;\n // 只有TextBox和InlineBlock或replaced\n this.list.forEach(item => {\n baseline = Math.max(baseline, item.baseline);\n });\n return baseline;\n }\n\n get verticalBaseline() {\n let baseline = this.__baseline;\n // 只有TextBox和InlineBlock或replaced\n this.list.forEach(item => {\n baseline = Math.max(baseline, item.verticalBaseline);\n });\n return baseline;\n }\n\n get lineHeight() {\n let lineHeight = this.__lineHeight;\n // 只有TextBox和InlineBlock或replaced\n this.list.forEach(item => {\n lineHeight = Math.max(lineHeight, item.outerHeight);\n });\n return lineHeight;\n }\n\n get verticalLineHeight() {\n let lineHeight = this.__lineHeight;\n // 只有TextBox和InlineBlock或replaced\n this.list.forEach(item => {\n lineHeight = Math.max(lineHeight, item.outerWidth);\n });\n return lineHeight;\n }\n\n get isUpright() {\n return this.__isUpright;\n }\n}\n\nexport default LineBox;\n","import LineBox from './LineBox';\n\n/**\n * 维护一个上下文的LineBox,向LineBox中添加Item以及新增下一行的LineBox,多个LineBox组成一个区域\n * 一个block/inlineBlock拥有一个本类对象,上下文即对应这个dom流,而inline则复用最近非inline父元素的\n * 同时LineBox可能连续也可能不连续,不连续的是中间有block之类的隔离开来\n */\nclass LineBoxManager {\n constructor(x, y, lineHeight, baseline, isUpright) {\n this.__x = this.__lastX = x; // last存储目前最后一行LineBox的结尾位置,供后续inline使用\n this.__y = this.__lastY = y;\n this.__max = isUpright ? y : x;\n this.__domList = [];\n this.__domStack = [];\n this.__list = []; // 包含若干LineBox\n this.__isNewLine = true; // 区域内是否是新行,容器dom(block)开头肯定是\n this.__lineHeight = lineHeight;\n this.__baseline = baseline;\n this.__isEnd = true; // 在dom中是否一个区域处在结尾,外部控制\n this.__spreadList = []; // verticalAlign时每个区域增加的y高度\n this.__isVertical = isUpright;\n }\n\n /**\n * 每次换行时重新生成LineBox存入列表,同时由于flow流当前一定是流(dom)的结尾,设置isEnd\n * @returns {LineBox}\n */\n genLineBox(x, y) {\n let lineBox = new LineBox(x, y, this.__lineHeight, this.__baseline, this.isUpright);\n this.list.push(lineBox);\n this.__isEnd = true;\n return lineBox;\n }\n\n /**\n * inline的特殊调用,防止空内容但有mbp的inline不占位,放入一个有lineHeight的空lineBox\n * 只有新行开头时需要,后面的无论是否有内容都会影响lineHeight\n * @param x\n * @param y\n * @param l\n * @param b\n * @returns {LineBox}\n */\n genLineBoxByInlineIfNewLine(x, y, l, b) {\n let lineHeight = Math.max(this.__lineHeight, l);\n let baseline = Math.max(this.__baseline, b);\n if(this.__isNewLine) {\n let lineBox = new LineBox(x, y, lineHeight, baseline, this.isUpright);\n this.list.push(lineBox);\n this.__isEnd = true;\n this.__isNewLine = false;\n return lineBox;\n }\n }\n\n /**\n * 外部设置为结尾,如一个LineBox后出现一个block,此时会被隔断,不再作为流的末尾\n */\n setNotEnd() {\n this.__isEnd = false;\n }\n\n /**\n * 外部设置新行,下次新生成LineBox\n */\n setNewLine() {\n this.__isNewLine = true;\n }\n\n /**\n * 当前LineBox放入一个新项,当新行时(如第一行)产生一个新的LineBox并存入列表\n * 是否新区域和新行都是可以被外部控制,默认第一行是新\n * 当被隔断后会被外部重置新行,这样会生成新的来作为新加项的LineBox\n * 当换行时外部也会调用新行,这样再次添加Item时会自动生成新的LineBox而不是用之前的\n * @param o TextBox/Inline/InlineBlock\n * @param nextNewLine 是否设置newLine,标明下次添加新生成LineBox\n * @returns {LineBox}\n */\n addItem(o, nextNewLine) {\n let lineBox, isUpright = this.isUpright;\n // 新行新的lineBox,否则复用最后一个\n if(this.__isNewLine) {\n this.__isNewLine = false;\n lineBox = this.genLineBox(o.x, o.y);\n }\n else {\n let list = this.list;\n let length = list.length;\n lineBox = list[length - 1];\n }\n // inline递归过程中所有inline父子顺序列表,每个dom都需要对当前内容保存\n this.__domStack.forEach(item => {\n item.__contentBoxList.push(o);\n });\n lineBox.add(o);\n // 设置结束x的位置给next的inline标记用,o可能是TextBox或inlineBlock,当next新行时注意位置\n if(nextNewLine) {\n this.__isNewLine = true;\n this.__lastX = o.x;\n this.__lastY = o.y + o.outerHeight;\n }\n else {\n if(isUpright) {\n this.__lastX = o.x;\n this.__lastY = o.y + o.outerHeight;\n }\n else {\n this.__lastX = o.x + o.outerWidth;\n this.__lastY = o.y;\n }\n }\n this.__max = Math.max(this.__max, isUpright ? (o.y + o.outerHeight) : (o.x + o.outerWidth));\n return lineBox;\n }\n\n horizonAlign(size, textAlign, isUpright) {\n this.list.forEach(lineBox => {\n let diff = size - (isUpright ? lineBox.height : lineBox.width);\n if(diff > 0) {\n if(textAlign === 'center') {\n diff *= 0.5;\n }\n if(isUpright) {\n lineBox.__offsetY(diff, true);\n }\n else {\n lineBox.__offsetX(diff, true);\n }\n }\n });\n }\n\n /**\n * 垂直对齐过程中,如果遇到占位元素如img,可能会导致每行lineBox高度增加,需返回增加量,\n * next行也需要y偏移\n * @returns {number}\n */\n verticalAlign(isUpright) {\n let spreadList = this.__spreadList;\n spreadList.splice(0);\n let spread = 0;\n this.list.forEach(lineBox => {\n if(spread) {\n lineBox.__bOffset = spread; // 对齐造成的误差需记录给baseline修正\n if(isUpright) {\n lineBox.__offsetX(spread, true);\n }\n else {\n lineBox.__offsetY(spread, true);\n }\n }\n spread += lineBox.verticalAlign(isUpright);\n spreadList.push(spread);\n });\n return spread;\n }\n\n addX(n) {\n this.__lastX += n;\n }\n\n addY(n) {\n this.__lastY += n;\n }\n\n /**\n * inline递归过程中布局调用,不断出入栈dom对象,获取当前行状态下有哪些dom还在\n * @param dom\n */\n pushContentBoxList(dom) {\n this.__domList.push(dom);\n this.__domStack.push(dom);\n }\n\n popContentBoxList() {\n this.__domStack.pop();\n }\n\n __offsetX(diff) {\n this.list.forEach(lineBox => {\n lineBox.__offsetX(diff);\n });\n }\n\n __offsetY(diff) {\n this.list.forEach(lineBox => {\n lineBox.__offsetY(diff);\n });\n }\n\n /**\n * inline的特殊调用,非行首无论是否有内容都设置lineBox的lineHeight\n * @param l\n * @param b\n * @private\n */\n setLbByInlineIfNotNewLine(l, b) {\n let length = this.list.length;\n if(length && !this.isNewLine) {\n this.list[length - 1].__setLB(l, b, false);\n }\n }\n\n get size() {\n return this.list.length;\n }\n\n get lastX() {\n return this.__lastX;\n }\n\n get lastY() {\n return this.__lastY;\n }\n\n get endX() {\n let list = this.list;\n let length = list.length;\n if(length) {\n return list[length - 1].endX;\n }\n return this.__x;\n }\n\n get endY() {\n let list = this.list;\n let length = list.length;\n if(length) {\n return list[length - 1].endY;\n }\n return this.__y;\n }\n\n get isEnd() {\n return this.__isEnd;\n }\n\n get isNewLine() {\n return this.__isNewLine;\n }\n\n get breakLine() {\n return this.list.length > 1;\n }\n\n get domList() {\n return this.__domList;\n }\n\n get baseline() {\n let list = this.list;\n let length = list.length;\n if(length) {\n let n = 0;\n for(let i = 0; i < length - 1; i++) {\n n += list[i].height;\n }\n // 需考虑因为verticalAlign造成的lineBox偏移offset值,修正计算正确的baseline\n return n + list[length - 1].baseline + list[length - 1].bOffset;\n }\n return 0;\n }\n\n get firstBaseline() {\n let list = this.list;\n let length = list.length;\n if(length) {\n return list[0].baseline;\n }\n return 0;\n }\n\n get verticalBaseline() {\n let list = this.list;\n let length = list.length;\n if(length) {\n return list[0].baseline + list[0].bOffset;\n }\n return 0;\n }\n\n get lineHeight() {\n let list = this.list;\n if(list.length) {\n return list[list.length - 1].lineHeight;\n }\n return 0;\n }\n\n get verticalLineHeight() {\n let list = this.list;\n if(list.length) {\n return list[list.length - 1].verticalLineHeight;\n }\n return 0;\n }\n\n get lineBox() {\n let list = this.list;\n if(list.length) {\n return list[list.length - 1];\n }\n }\n\n get list() {\n return this.__list;\n }\n\n get width() {\n let w = 0;\n this.list.forEach(item => {\n w = Math.max(w, item.width);\n });\n return w;\n }\n\n get spreadList() {\n return this.__spreadList;\n }\n\n get isUpright() {\n return this.__isVertical;\n }\n\n get max() {\n return this.__max;\n }\n}\n\nexport default LineBoxManager;\n","const TAG_NAME = {\n 'div': true,\n 'p': true,\n 'span': true,\n 'img': true,\n 'b': true,\n 'strong': true,\n};\n\nconst INLINE = {\n 'span': true,\n 'img': true,\n 'b': true,\n 'strong': true,\n};\n\nconst BOLD = {\n 'b': true,\n 'strong': true,\n}\n\nexport default {\n TAG_NAME,\n INLINE,\n BOLD,\n};\n","import Xom from '../Xom';\nimport reset from '../../style/reset';\nimport css from '../../style/css';\nimport unit from '../../style/unit';\nimport enums from '../../util/enums';\nimport mode from '../../refresh/mode';\nimport util from '../../util/util';\nimport painter from '../../util/painter';\nimport transform from '../../style/transform';\nimport mx from '../../math/matrix';\nimport inject from '../../util/inject';\nimport gradient from '../../math/gradient';\nimport level from '../../refresh/level';\n\nconst {\n STYLE_KEY: {\n MARGIN_RIGHT,\n MARGIN_LEFT,\n PADDING_RIGHT,\n PADDING_LEFT,\n WIDTH,\n HEIGHT,\n BORDER_RIGHT_WIDTH,\n BORDER_LEFT_WIDTH,\n FILL,\n STROKE,\n STROKE_MITERLIMIT,\n STROKE_WIDTH,\n STROKE_LINECAP,\n STROKE_LINEJOIN,\n STROKE_DASHARRAY,\n STROKE_DASHARRAY_STR,\n FILL_RULE,\n VISIBILITY,\n FLEX_BASIS,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, REM, VW, VH, VMAX, VMIN, RGBA, GRADIENT } = unit;\nconst { int2rgba, isNil, joinArr } = util;\nconst { canvasPolygon, svgPolygon } = painter;\n\nconst REGISTER = {};\n\nclass Geom extends Xom {\n constructor(tagName, props) {\n super(tagName, props);\n this.__isMulti = !!this.props.multi;\n this.__style = css.normalize(this.style, reset.DOM_ENTRY_SET.concat(reset.GEOM_ENTRY_SET));\n this.__currentStyle = util.extend([], this.__style);\n this.__currentProps = util.clone(this.props);\n this.__cacheProps = {};\n }\n\n __tryLayInline(w, total) {\n this.__computeReflow();\n // 无children,直接以style的width为宽度,不定义则为0\n let { currentStyle: {\n [WIDTH]: width,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n }, computedStyle: {\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } } = this;\n if(width[1] !== AUTO) {\n w -= this.__calSize(width, total, true);\n }\n // 减去水平mbp\n w -= this.__calSize(marginRight, total, true);\n w -= this.__calSize(paddingRight, total, true);\n w -= borderRightWidth;\n w -= this.__calSize(marginLeft, total, true);\n w -= this.__calSize(paddingLeft, total, true);\n w -= borderLeftWidth;\n return w;\n }\n\n __calBasis(isDirectionRow, isAbs, isColumn, data, isDirectChild) {\n this.__computeReflow();\n let b = 0;\n let min = 0;\n let max = 0;\n let { currentStyle, computedStyle } = this;\n let { w, h } = data;\n // 计算需考虑style的属性\n let {\n [FLEX_BASIS]: flexBasis,\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n let main = isDirectionRow ? width : height;\n // basis3种情况:auto、固定、content,只区分固定和其它\n let isFixed = [PX, PERCENT, REM, VW, VH, VMAX, VMIN].indexOf(flexBasis.u) > -1;\n if(isFixed) {\n b = max = min = this.__calSize(flexBasis, isDirectionRow ? w : h, true);\n }\n else if(([PX, PERCENT, REM, VW, VH, VMAX, VMIN].indexOf(main.u) > -1)) {\n b = max = min = this.__calSize(main, isDirectionRow ? w : h, true);\n }\n // 直接item的mpb影响basis\n return this.__addMBP(isDirectionRow, w, currentStyle, computedStyle, [b, min, max], isDirectChild);\n }\n\n __layout(data, isAbs, isColumn, isRow) {\n super.__layout(data, isAbs, isColumn, isRow);\n this.__layoutStyle();\n }\n\n __layoutBlock(data, isAbs, isColumn, isRow) {\n let { fixedWidth, fixedHeight, w, h, isParentVertical, isUpright } = this.__preLayout(data, false);\n let tw = 0, th = 0;\n if(fixedWidth || !isAbs && !isParentVertical && !isUpright) {\n tw = w;\n }\n if(fixedHeight || !isAbs && isParentVertical && isUpright) {\n th = h;\n }\n this.__ioSize(tw, th);\n if(isAbs || isColumn || isRow) {\n return;\n }\n this.__marginAuto(this.currentStyle, data);\n this.__cacheProps = {};\n }\n\n __layoutFlex(data, isAbs, isColumn, isRow) {\n // 无children所以等同于block\n this.__layoutBlock(data, isAbs, isColumn, isRow);\n }\n\n __layoutInline(data, isAbs, isInline) {\n let { fixedWidth, fixedHeight, w, h } = this.__preLayout(data, false);\n let tw = fixedWidth ? w : 0;\n let th = fixedHeight ? h : 0;\n this.__ioSize(tw, th);\n this.__cacheProps = {};\n }\n\n __calStyle(lv, __currentStyle, __computedStyle, __cacheStyle) {\n let res = super.__calStyle(lv, __currentStyle, __computedStyle, __cacheStyle);\n if(isNil(__cacheStyle[STROKE_WIDTH])) {\n __cacheStyle[STROKE_WIDTH] = true;\n let strokeWidth = __currentStyle[STROKE_WIDTH] || [];\n let w = this.width;\n __computedStyle[STROKE_WIDTH] = strokeWidth.map(item => {\n return this.__calSize(item, w, true);\n });\n }\n if(isNil(__cacheStyle[STROKE_DASHARRAY])) {\n __cacheStyle[STROKE_DASHARRAY] = true;\n __computedStyle[STROKE_DASHARRAY] = __currentStyle[STROKE_DASHARRAY] || [];\n __cacheStyle[STROKE_DASHARRAY_STR] = __computedStyle[STROKE_DASHARRAY].map(item => joinArr(item, ','));\n }\n // 直接赋值的\n [\n STROKE_LINECAP,\n STROKE_LINEJOIN,\n STROKE_MITERLIMIT,\n FILL_RULE,\n ].forEach(k => {\n __computedStyle[k] = __currentStyle[k];\n });\n // stroke/fll移至render里处理,因为cache涉及渐变坐标偏移\n [FILL, STROKE].forEach(k => {\n if(isNil(__cacheStyle[k])) {\n let v = __currentStyle[k];\n let cs = __computedStyle[k] = [];\n let res = __cacheStyle[k] = [];\n if(Array.isArray(v)) {\n v.forEach(item => {\n if(item && item.u === GRADIENT) {\n // let t = this.__gradient(renderMode, ctx, x3, y3, x4, y4, item[0], 0, 0);\n cs.push(item.v);\n res.push(true);\n }\n else if(item && item.u === RGBA && item.v[3] > 0) {\n cs.push(item.v);\n res.push(int2rgba(item.v));\n }\n else {\n cs.push('none');\n res.push('none');\n }\n });\n }\n }\n });\n return res;\n }\n\n calContent(currentStyle, computedStyle) {\n let res = super.calContent(currentStyle, computedStyle);\n this.__hasXomContent = res;\n let {\n [FILL]: fill,\n [STROKE]: stroke,\n [STROKE_WIDTH]: strokeWidth,\n } = computedStyle;\n let empty = true;\n for(let i = 0, len = fill.length; i < len; i++) {\n let item = fill[i];\n if(item.k || item[3] > 0) {\n empty = false;\n break;\n }\n }\n for(let i = 0, len = stroke.length; i < len; i++) {\n let item = stroke[i];\n if((item.k || item[3] > 0) && strokeWidth[i] > 0) {\n empty = false;\n break;\n }\n }\n // 矢量图形默认有内容\n if(!empty) {\n return true;\n }\n // 没有fill和stroke则认为矢量图形为空\n if(!res && empty) {\n return false;\n }\n return res;\n }\n\n __preSet(renderMode, res) {\n let { width, height, __cacheStyle, computedStyle } = this;\n let cx = res.x3 + width * 0.5;\n let cy = res.y3 + height * 0.5;\n let {\n [STROKE_DASHARRAY_STR]: strokeDasharrayStr,\n } = __cacheStyle;\n let {\n [FILL]: fill,\n [STROKE]: stroke,\n [STROKE_WIDTH]: strokeWidth,\n [STROKE_LINECAP]: strokeLinecap,\n [STROKE_LINEJOIN]: strokeLinejoin,\n [STROKE_MITERLIMIT]: strokeMiterlimit,\n [STROKE_DASHARRAY]: strokeDasharray,\n [FILL_RULE]: fillRule,\n } = computedStyle;\n stroke = stroke.map(item => {\n if(item.k) {\n return this.__gradient(renderMode, res.ctx, res.x3, res.y3, res.x4, res.y4, item, res.dx, res.dy);\n }\n return int2rgba(item);\n });\n fill = fill.map(item => {\n if(item.k) {\n return this.__gradient(renderMode, res.ctx, res.x3, res.y3, res.x4, res.y4, item, res.dx, res.dy);\n }\n return int2rgba(item);\n });\n return {\n cx,\n cy,\n stroke,\n strokeWidth,\n strokeDasharray,\n strokeDasharrayStr,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n fill,\n fillRule,\n };\n }\n\n __preSetCanvas(renderMode, ctx, res) {\n let {\n stroke,\n strokeWidth,\n strokeDasharray,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n fill,\n } = res;\n if(renderMode === mode.CANVAS) {\n if(fill) {\n if(fill.k === 'linear') {\n ctx.fillStyle = fill.v;\n }\n else if(fill.k === 'radial' && !Array.isArray(fill.v)) {\n ctx.fillStyle = fill.v;\n }\n else if(fill.k === 'conic') {\n //\n }\n else if(!fill.k && ctx.fillStyle !== fill) {\n ctx.fillStyle = fill;\n }\n }\n if(stroke) {\n if(stroke.k === 'linear') {\n ctx.strokeStyle = stroke.v;\n }\n else if(stroke.k === 'radial' && !Array.isArray(stroke.v)) {\n ctx.strokeStyle = stroke.v;\n }\n else if(stroke.k === 'conic') {\n //\n }\n else if(!stroke.k && ctx.strokeStyle !== stroke) {\n ctx.strokeStyle = stroke;\n }\n }\n if(strokeWidth !== undefined && ctx.lineWidth !== strokeWidth) {\n ctx.lineWidth = strokeWidth;\n }\n if(strokeLinecap !== undefined && ctx.lineCap !== strokeLinecap) {\n ctx.lineCap = strokeLinecap;\n }\n if(strokeLinejoin !== undefined && ctx.lineJoin !== strokeLinejoin) {\n ctx.lineJoin = strokeLinejoin;\n }\n if(strokeMiterlimit !== undefined && ctx.miterLimit !== strokeMiterlimit) {\n ctx.miterLimit = strokeMiterlimit;\n }\n // 小程序没这个方法\n if(util.isFunction(ctx.getLineDash)) {\n if(strokeDasharray && !util.equalArr(ctx.getLineDash(), strokeDasharray)) {\n ctx.setLineDash(strokeDasharray);\n }\n }\n else if(strokeDasharray) {\n ctx.setLineDash(strokeDasharray);\n }\n }\n }\n\n render(renderMode, ctx, dx, dy) {\n let res = super.render(renderMode, ctx, dx, dy);\n if(renderMode === mode.SVG) {\n this.virtualDom.type = 'geom';\n }\n // 无论canvas/svg,break可提前跳出省略计算\n if(res.break || renderMode === mode.WEBGL) {\n return res;\n }\n // data在无cache时没有提前设置\n let preData = this.__preSet(renderMode, res);\n return Object.assign(res, preData);\n }\n\n __renderPolygon(renderMode, ctx, res) {\n let {\n fill: fills,\n fillRule: fillRules,\n stroke: strokes,\n strokeWidth: strokeWidths,\n strokeDasharray: strokeDasharrays,\n strokeDasharrayStr: strokeDasharrayStrs,\n strokeLinecap: strokeLinecaps,\n strokeLinejoin: strokeLinejoins,\n strokeMiterlimit: strokeMiterlimits,\n dx,\n dy,\n } = res;\n let { __cacheProps: { list }, isMulti, bbox } = this;\n // 普通情况下只有1个,按普通情况走\n if(fills.length <= 1 && strokes.length <= 1) {\n let o = {\n fill: fills[0],\n fillRule: fillRules[0],\n stroke: strokes[0],\n strokeWidth: strokeWidths[0],\n strokeDasharray: strokeDasharrays[0],\n strokeDasharrayStr: strokeDasharrayStrs[0],\n strokeLinecap: strokeLinecaps[0],\n strokeLinejoin: strokeLinejoins[0],\n strokeMiterlimit: strokeMiterlimits[0],\n dx,\n dy,\n bbox,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, o);\n }\n // 多个需要fill在下面,stroke在上面,依次循环\n else {\n for(let i = 0, len = fills.length; i < len; i++) {\n let fill = fills[i];\n if(fill) {\n let o = {\n fill,\n fillRule: fillRules[i],\n dx,\n dy,\n bbox,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, o);\n }\n }\n for(let i = 0, len = strokes.length; i < len; i++) {\n let stroke = strokes[i];\n if(stroke) {\n let o = {\n stroke,\n strokeWidth: strokeWidths[i],\n strokeDasharray: strokeDasharrays[i],\n strokeDasharrayStr: strokeDasharrayStrs[i],\n strokeLinecap: strokeLinecaps[i],\n strokeLinejoin: strokeLinejoins[i],\n strokeMiterlimit: strokeMiterlimits[i],\n dx,\n dy,\n bbox,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, o);\n }\n }\n }\n }\n\n __renderOnePolygon(renderMode, ctx, isMulti, list, res) {\n let {\n fill,\n stroke,\n strokeWidth,\n } = res;\n let isFillCE = fill && fill.k === 'conic';\n let isStrokeCE = stroke && stroke.k === 'conic';\n // 椭圆是array\n let isFillRE = fill && fill.k === 'radial' && Array.isArray(fill.v);\n let isStrokeRE = strokeWidth && strokeWidth > 0 && stroke && stroke.k === 'radial' && Array.isArray(stroke.v);\n if(isFillCE || isStrokeCE) {\n if(isFillCE) {\n this.__conicGradient(renderMode, ctx, list, isMulti, res);\n }\n else if(fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n if(strokeWidth && strokeWidth > 0 && isStrokeCE) {\n inject.warn('Stroke style can not use conic-gradient');\n }\n else if(strokeWidth && strokeWidth > 0 && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, false, true);\n }\n }\n else if(isFillRE || isStrokeRE) {\n if(isFillRE) {\n this.__radialEllipse(renderMode, ctx, list, isMulti, res, 'fill');\n }\n else if(fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n // stroke椭圆渐变matrix会变形,降级为圆\n if(strokeWidth && strokeWidth > 0 && isStrokeRE) {\n inject.warn('Stroke style can not use radial-gradient for ellipse');\n res.stroke.v = res.stroke.v[0];\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, false, true);\n }\n else if(strokeWidth && strokeWidth > 0 && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, false, true);\n }\n }\n else {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true, true);\n }\n }\n\n __drawPolygon(renderMode, ctx, isMulti, list, res, isFill, isStroke) {\n let {\n fill,\n stroke,\n strokeWidth,\n fillRule,\n strokeDasharrayStr,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n dx,\n dy,\n } = res;\n if(renderMode === mode.CANVAS) {\n this.__preSetCanvas(renderMode, ctx, res);\n ctx.beginPath();\n if(isMulti) {\n list.forEach(item => canvasPolygon(ctx, item, dx, dy));\n }\n else {\n canvasPolygon(ctx, list, dx, dy);\n }\n if(isFill && fill && fill !== 'none') {\n ctx.fill(fillRule);\n }\n if(isStroke && stroke && stroke !== 'none' && strokeWidth && strokeWidth > 0) {\n ctx.stroke();\n }\n ctx.closePath();\n }\n else if(renderMode === mode.SVG) {\n let d = '';\n if(isMulti) {\n list.forEach(item => d += svgPolygon(item));\n }\n else {\n d = svgPolygon(list);\n }\n let props = [\n ['d', d],\n ];\n // 2个都没有常出现在多fill/stroke时,也有可能特殊单个故意这样写的\n if((!fill || fill === 'none') && (!stroke || stroke === 'none')) {\n return;\n }\n if(isFill && fill && fill !== 'none') {\n props.push(['fill', fill.v || fill]);\n if(fillRule && fillRule !== 'nonzero') { // evenodd\n props.push(['fill-rule', fillRule]);\n }\n }\n else {\n props.push(['fill', 'none']);\n }\n if(isStroke && stroke && stroke !== 'none' && strokeWidth && strokeWidth > 0) {\n props.push(['stroke', stroke.v || stroke]);\n props.push(['stroke-width', strokeWidth]);\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n }\n else {\n props.push(['stroke-width', 0]);\n }\n this.addGeom('path', props);\n }\n }\n\n __inversePtList(list, isMulti, t, dx = 0, dy = 0) {\n if(isMulti) {\n return list.map(item => {\n if(!item || !item.length) {\n return null;\n }\n return item.map(item => {\n if(!item || !item.length) {\n return null;\n }\n let arr = [];\n for(let i = 0, len = item.length; i < len; i += 2) {\n let p = mx.calPoint({ x: item[i] + dx, y: item[i + 1] + dy }, t);\n arr.push(p.x);\n arr.push(p.y);\n }\n return arr;\n });\n });\n }\n else {\n return list.map(item => {\n if(!item || !item.length) {\n return null;\n }\n let arr = [];\n for(let i = 0, len = item.length; i < len; i += 2) {\n let p = mx.calPoint({ x: item[i] + dx, y: item[i + 1] + dy }, t);\n arr.push(p.x);\n arr.push(p.y);\n }\n return arr;\n });\n }\n }\n\n __radialEllipse(renderMode, ctx, list, isMulti, res, method) {\n let {\n strokeWidth,\n strokeDasharrayStr,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n dx,\n dy,\n } = res;\n let [color, matrix, cx, cy] = res[method].v;\n // 椭圆渐变的转换,顶点逆矩阵变换\n matrix = transform.calMatrixByOrigin(matrix, cx, cy);\n let t = mx.inverse(matrix);\n list = this.__inversePtList(list, isMulti, t, dx, dy);\n // 用正向matrix渲染\n if(renderMode === mode.CANVAS) {\n if(matrix) {\n ctx.save();\n // 获取当前matrix,在webgl中为E,在canvas中分无cache和有cache模式\n let me = ctx.getTransform();\n me = [me.a, me.b, 0, 0, me.c, me.d, 0, 0, 0, 0, 1, 0, me.e, me.f, 1, 0];\n matrix = mx.multiply(me, matrix);\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n }\n ctx.beginPath();\n if(ctx[method + 'Style'] !== color) {\n ctx[method + 'Style'] = color;\n }\n if(isMulti) {\n list.forEach(item => painter.canvasPolygon(ctx, item));\n }\n else {\n canvasPolygon(ctx, list);\n }\n ctx[method]();\n ctx.closePath();\n if(matrix) {\n ctx.restore();\n }\n }\n else if(renderMode === mode.SVG) {\n let d = '';\n if(isMulti) {\n list.forEach(item => d += svgPolygon(item));\n }\n else {\n d = svgPolygon(list);\n }\n let props = [\n ['d', d],\n ];\n if(method === 'fill') {\n props.push(['fill', color]);\n props.push(['strokeWidth', 0]);\n }\n else if(method === 'stroke') {\n props.push(['fill', 'none']);\n props.push(['stroke', color]);\n props.push(['stroke-width', strokeWidth]);\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n }\n props.push(['transform', `matrix(${joinArr(mx.m2m6(matrix), ',')})`]);\n this.addGeom('path', props);\n }\n }\n\n __conicGradient(renderMode, ctx, list, isMulti, res) {\n let {\n fill,\n bbox,\n dx = 0,\n dy = 0,\n } = res;\n let color = fill.v;\n if(renderMode === mode.CANVAS) {\n let [x1, y1, x2, y2] = bbox;\n let w = x2 - x1, h = y2 - y1;\n let offscreen = inject.getOffscreenCanvas(w, h, '__$$CONIC_GRADIENT$$__', null);\n let imgData = offscreen.ctx.getImageData(0,0, w, h);\n gradient.getConicGradientImage(w * 0.5, h * 0.5, w, h, fill.v.stop, imgData.data);\n offscreen.ctx.putImageData(imgData, 0, 0);\n if(isMulti) {\n list.forEach(item => {\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, item, dx, dy);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(offscreen.canvas, x1 + dx, y1 + dy);\n ctx.restore();\n });\n }\n else {\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, list, dx, dy);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(offscreen.canvas, x1 + dx, y1 + dy);\n ctx.restore();\n }\n offscreen.ctx.clearRect(0, 0, w, h);\n }\n else if(renderMode === mode.SVG) {\n if(isMulti) {\n list.forEach(item => {\n let v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(item)],\n ],\n }],\n };\n let clip = ctx.add(v);\n this.__cacheDefs.push(v);\n color.forEach(item => {\n this.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(item[0])],\n ['fill', item[1]],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n });\n });\n }\n else {\n let v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(list)],\n ],\n }],\n };\n let clip = ctx.add(v);\n this.__cacheDefs.push(v);\n color.forEach(item => {\n this.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(item[0])],\n ['fill', item[1]],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n });\n }\n }\n }\n\n __propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit) {\n if(strokeDasharrayStr) {\n props.push(['stroke-dasharray', strokeDasharrayStr]);\n }\n if(strokeLinecap && strokeLinecap !== 'butt') {\n props.push(['stroke-linecap', strokeLinecap]);\n }\n if(strokeLinejoin && strokeLinejoin !== 'miter') {\n props.push(['stroke-linejoin', strokeLinejoin]);\n }\n if(strokeMiterlimit && strokeMiterlimit !== 4) {\n props.push(['stroke-miterlimit', strokeMiterlimit]);\n }\n }\n\n // offset/resize时要多一步清空props上记录的缓存\n __offsetX(diff, isLayout, lv) {\n super.__offsetX(diff, isLayout, lv);\n if(lv && lv >= level.REFLOW) {\n this.__cacheProps = {};\n }\n }\n\n __offsetY(diff, isLayout, lv) {\n super.__offsetY(diff, isLayout, lv);\n if(lv && lv >= level.REFLOW) {\n this.__cacheProps = {};\n }\n }\n\n __resizeX(diff, lv) {\n super.__resizeX(diff, lv);\n if(lv && lv >= level.REFLOW) {\n this.__cacheProps = {};\n }\n }\n\n __resizeY(diff, lv) {\n super.__resizeY(diff, lv);\n if(lv && lv >= level.REFLOW) {\n this.__cacheProps = {};\n }\n }\n\n addGeom(tagName, props) {\n props = util.hash2arr(props);\n this.virtualDom.children.push({\n type: 'item',\n tagName,\n props,\n });\n }\n\n getProps(k) {\n let v = this.currentProps[k];\n if(!isNil(v)) {\n return v;\n }\n return this['__' + k];\n }\n\n __isRealInline() {\n return false;\n }\n\n get isMulti() {\n return this.__isMulti;\n }\n\n get currentProps() {\n return this.__currentProps;\n }\n\n static get REGISTER() {\n return REGISTER;\n }\n\n static getRegister(name) {\n if(name && !util.isString(name) && name.prototype && name.prototype instanceof Geom) {\n return name;\n }\n if(!name || !util.isString(name) || name.charAt(0) !== '$') {\n throw new Error('Invalid param');\n }\n if(!REGISTER.hasOwnProperty(name)) {\n throw new Error(`Geom has not register: ${name}`);\n }\n return REGISTER[name];\n }\n\n static register(name, obj) {\n if(!name || !util.isString(name) || name.charAt(0) !== '$'\n || !obj.prototype || !(obj.prototype instanceof Geom)) {\n throw new Error('Invalid param');\n }\n if(Geom.hasRegister(name)) {\n throw new Error(`Geom has already register: ${name}`);\n }\n REGISTER[name] = obj;\n }\n\n static hasRegister(name) {\n return name && REGISTER.hasOwnProperty(name);\n }\n\n static delRegister(name) {\n if(Geom.hasRegister(name)) {\n delete REGISTER[name];\n }\n }\n}\n\nexport default Geom;\n","import enums from '../util/enums';\nimport unit from '../style/unit';\nimport level from './level';\nimport css from '../style/css';\nimport Text from '../node/Text';\nimport Component from '../node/Component';\nimport Geom from '../node/geom/Geom';\nimport mode from './mode';\n\nconst {\n STYLE_KEY: {\n DISPLAY,\n TOP,\n BOTTOM,\n POSITION,\n WIDTH,\n HEIGHT,\n MARGIN_TOP,\n MARGIN_BOTTOM,\n MARGIN_LEFT,\n BORDER_TOP_WIDTH,\n PADDING_TOP,\n BORDER_LEFT_WIDTH,\n PADDING_LEFT,\n },\n} = enums;\nconst { AUTO, PX, REM, VW, VH, VMAX, VMIN, PERCENT } = unit;\nconst { REPAINT, REFLOW, CACHE } = level;\nconst { isRelativeOrAbsolute } = css;\n\nfunction clearSvgCache(node, child) {\n if(child) {\n node.__refreshLevel |= REPAINT;\n }\n else {\n node.__refreshLevel |= CACHE;\n }\n if(Array.isArray(node.children)) {\n node.children.forEach(child => {\n if(child instanceof Component) {\n child = child.shadowRoot;\n }\n clearSvgCache(child, true);\n });\n }\n}\n\n// 合并margin,和原本不合并情况下的差值\nfunction getMergeMargin(topList, bottomList) {\n let total = 0;\n let max = topList[0] || 0;\n let min = topList[0] || 0;\n topList.forEach(item => {\n total += item;\n max = Math.max(max, item);\n min = Math.min(min, item);\n });\n bottomList.forEach(item => {\n total += item;\n max = Math.max(max, item);\n min = Math.min(min, item);\n });\n // 正数取最大,负数取最小,正负则相加\n let target = 0;\n if(max > 0 && min > 0) {\n target = Math.max(max, min);\n }\n else if(max < 0 && min < 0) {\n target = Math.min(max, min);\n }\n else if(max !== 0 || min !== 0) {\n target = max + min;\n }\n return {\n target, // 应该的目标margin\n total, // 累计的margin\n diff: target - total,\n };\n}\n\n// 提取出对比节点尺寸是否固定非AUTO\nfunction isFixedWidthOrHeight(node, k) {\n let c = node.currentStyle[k];\n return c.u !== AUTO;\n}\n// 除了固定尺寸,父级也不能是flex\nfunction isFixedSize(node, includeParentFlex) {\n let res = isFixedWidthOrHeight(node, WIDTH) && isFixedWidthOrHeight(node, HEIGHT);\n if(res && includeParentFlex) {\n let parent = node.__domParent;\n if(parent) {\n if(parent.computedStyle[DISPLAY] === 'flex') {\n return false;\n }\n }\n }\n return res;\n}\n\nfunction getPrevMergeMargin(prev, mtList, mbList) {\n while(prev && !(prev instanceof Text)\n && !(prev instanceof Component && prev.shadowRoot instanceof Text)\n && ['block', 'flex'].indexOf(prev.computedStyle[DISPLAY]) > -1\n && prev.computedStyle[POSITION] !== 'absolute') {\n mbList.push(prev.computedStyle[MARGIN_BOTTOM]);\n if(prev.offsetHeight > 0) {\n break;\n }\n mtList.push(prev.computedStyle[MARGIN_TOP]);\n prev = prev.__prev;\n }\n}\n\nfunction getNextMergeMargin(next, mtList, mbList) {\n while(next && !(next instanceof Text)\n && !(next instanceof Component && next.shadowRoot instanceof Text)\n && ['block', 'flex'].indexOf(next.computedStyle[DISPLAY]) > -1\n && next.computedStyle[POSITION] !== 'absolute') {\n mtList.push(next.computedStyle[MARGIN_TOP]);\n if(next.offsetHeight > 0) {\n break;\n }\n mbList.push(next.computedStyle[MARGIN_BOTTOM]);\n next = next.__next;\n }\n}\n\nfunction offsetNext(next, diff, parentFixed, absList) {\n while(next) {\n let cs = next.currentStyle;\n // flow流和auto/px/rem的absolute流需要偏移diff值\n if(cs[POSITION] !== 'absolute'\n || (cs[TOP].u === AUTO && cs[BOTTOM].u === AUTO\n || cs[TOP].u === AUTO && [PX, REM, VW, VH, VMAX, VMIN].indexOf(cs[BOTTOM].u) > -1)) {\n next.__offsetY(diff, true, REFLOW);\n }\n // absolute中百分比的特殊计算偏移,但要排除parent固定尺寸\n else if(!parentFixed && cs[POSITION] === 'absolute'\n && (cs[TOP].u === PERCENT || cs[BOTTOM].u === PERCENT)) {\n if(cs[TOP].u === PERCENT) {\n next.__offsetY(diff * 0.01 * cs[TOP].v, true, REFLOW);\n }\n else {\n next.__offsetY(diff * (1 - 0.01 * cs[BOTTOM].v), true, REFLOW);\n }\n }\n // abs的percent调整,记录\n if(!(cs instanceof Text) && !(cs instanceof Component && cs.shadowRoot instanceof Text)) {\n if(cs[POSITION] === 'absolute' && cs[HEIGHT].u === PERCENT) {\n absList.push(next);\n }\n }\n next = next.__next;\n }\n return diff;\n}\n\n/**\n * 单独提出共用检测影响的函数,从节点本身开始向上分析影响,找到最上层的影响节点设置其重新布局\n * ---\n * 当一个元素absolute时,其变化不会影响父元素和兄弟元素,直接自己重新layout\n * 当absolute发生改变时,其变化会影响父和兄弟,视作父重新布局\n * 当inline变化时,视为其最近block/flex父变化\n * 当block/flex变化时,往上查找最上层flex视为其变化,如没有flex则影响后面兄弟offset和父resize\n * 以上情况向上查找时遇到父absolute均提前跳出,并layout\n * 上面所有情况即便结束还得额外看是否处于absolute中,是还是标记absolute重新布局\n * 当relative只变化left/top/right/bottom时,自己重新layout\n * ===\n * 返回最上层节点,可能为node自己\n */\nfunction checkTop(root, node, addDom, removeDom) {\n if(root === node) {\n return root;\n }\n if(node instanceof Text) {\n node = node.__domParent;\n }\n // add/remove情况abs节点特殊对待不影响其它节点,不能判断display,因为inline会强制block\n if(addDom && node.currentStyle[POSITION] === 'absolute') {\n return node;\n }\n if(removeDom && node.computedStyle[POSITION] === 'absolute') {\n return node;\n }\n let target = node;\n // add/remove的相邻出现inline的话,视为父节点reflow\n if(addDom || removeDom) {\n let isSiblingBlock = true;\n let { __prev, __next } = node;\n if(__prev\n && (__prev instanceof Text\n || ['inline', 'inlineBlock'].indexOf(__prev.computedStyle[DISPLAY]) > -1)) {\n isSiblingBlock = false;\n }\n else if(__next\n && (__next instanceof Text\n || ['inline', 'inlineBlock'].indexOf(__next.computedStyle[DISPLAY]) > -1)) {\n isSiblingBlock = false;\n }\n if(!isSiblingBlock) {\n target = node.__domParent;\n if(target === root) {\n return root;\n }\n }\n }\n // 如果一直是absolute,则不影响其它节点\n if(target.currentStyle[POSITION] === 'absolute' && target.computedStyle[POSITION] === 'absolute') {\n return target;\n }\n // inline节点变为最近的父非inline,自身可能会display变化前后状态都要看,\n // absolute不变会影响但被上面if排除,而absolute发生变化则也需要进入这里\n if(['inline', 'inlineBlock'].indexOf(target.currentStyle[DISPLAY]) > -1\n || ['inline', 'inlineBlock'].indexOf(target.computedStyle[DISPLAY]) > -1) {\n do {\n target = target.__domParent;\n if(target === root) {\n return root;\n }\n }\n // 父节点不会display变化,因为同步检测,只看computedStyle即可\n while(['inline', 'inlineBlock'].indexOf(target.computedStyle[DISPLAY]) > -1\n && target.computedStyle[POSITION] !== 'absolute');\n // target已不是inline,父固定宽高跳出直接父进行LAYOUT即可,不影响上下文,但不能是flex孩子,此时固定尺寸无用\n // root也会进这里,因为root强制固定size\n if(isFixedSize(target, true)) {\n return target;\n }\n }\n // 此时target指向node,如果是inline/absolute变化则是其最近的非inline父\n let parent = target;\n // 向上检查flex/absolute/fixedSize,以最上层的flex视作其更改,node本身flex不进入\n let top;\n do {\n if(parent === root) {\n break;\n }\n if(parent.computedStyle[DISPLAY] === 'flex') {\n top = parent;\n }\n // 遇到固定size提前跳出,以及absolute也是\n if(parent.computedStyle[POSITION] === 'absolute' || isFixedSize(parent, true)) {\n break;\n }\n parent = parent.__domParent;\n }\n while(parent);\n // 找到最上层flex,视作其更改\n if(top) {\n target = top;\n }\n return target;\n}\n\n/**\n * checkReflow之后,节点重新布局对自己next的节点的offset影响,计算偏移量让所有next兄弟offsetY,\n * 以及递归向上父级resize和父级所有next兄弟offsetY\n */\nfunction checkNext(root, top, node, hasZ, addDom, removeDom) {\n let cps = top.computedStyle, crs = top.currentStyle;\n let position = cps[POSITION], display = cps[DISPLAY];\n let isLastAbs = position === 'absolute';\n let isNowAbs = crs[POSITION] === 'absolute';\n let isLastNone = display === 'none';\n let isNowNone = crs[DISPLAY] === 'none';\n let isLast0 = top.offsetHeight === 0;\n // none不可见布局无效可以无视,add/remove已提前判断,none时不会进来\n if(isLastNone && isNowNone) {\n return;\n }\n let parent = top.__domParent, oldH = top.offsetHeight;\n // svg在特殊children顺序变化的情况需清除缓存以便diff运行\n // add/remove已提前自己做好,zIndex有效变化也触发,position变更static和非static触发\n let svg = root.renderMode === mode.SVG;\n if(!addDom && !removeDom) {\n if(hasZ && position === 'static' && crs[POSITION] === 'static') {\n hasZ = false;\n }\n else if(position !== crs[POSITION] && (position === 'static' || crs[POSITION] === 'static')) {\n hasZ = true;\n }\n // 特殊,zIndexChildren不变化但影响svg的diff\n else if(isLastNone !== isNowNone && !hasZ) {\n svg && clearSvgCache(parent, false);\n }\n }\n else {\n hasZ = false;\n }\n // remove自身且abs时不影响其它,除了svg的zIndex\n if(removeDom && top === node && node.computedStyle[POSITION] === 'absolute') {\n top.clearCache(true);\n svg && clearSvgCache(parent, false);\n return;\n }\n // 后续调整offsetY需要考虑mergeMargin各种情况(包含上下2个方向),之前合并前和合并后的差值都需记录\n // 先记录没更新前的,如果是空节点则m1作为整个,忽视m2\n let t1 = 0, d1 = 0, t2 = 0, d2 = 0;\n let mbList = [], mtList = [];\n let prev = top.isShadowRoot ? top.__hostRoot.__prev : top.__prev;\n let next = top.isShadowRoot ? top.__hostRoot.__next : top.__next;\n if(addDom || isLast0) {\n getPrevMergeMargin(prev, mtList, mbList);\n getNextMergeMargin(next, mtList, mbList);\n if(!addDom) {\n mtList.push(cps[MARGIN_TOP]);\n mbList.push(cps[MARGIN_BOTTOM]);\n }\n let t = getMergeMargin(mtList, mbList);\n t1 = t.target;\n d1 = t.diff;\n }\n else {\n getPrevMergeMargin(prev, mtList, mbList);\n mtList.push(cps[MARGIN_TOP]);\n let t = getMergeMargin(mtList, mbList);\n t1 = t.target;\n d1 = t.diff;\n mtList.splice(0);\n mbList.splice(0);\n getNextMergeMargin(next, mtList, mbList);\n mbList.push(cps[MARGIN_BOTTOM]);\n t = getMergeMargin(mtList, mbList);\n t2 = t.target;\n d2 = t.diff;\n }\n // __layoutData使用prev或者父节点,并重新计算y(不包含合并margin),因为display:none或add的无数据或不对\n let __layoutData = parent.__layoutData;\n let x = __layoutData.x;\n let y = __layoutData.y;\n let w = parent.__width;\n let h = parent.__currentStyle[HEIGHT].u === AUTO ? __layoutData.h : parent.__height;\n let current = top;\n // cp的shadowRoot要向上到cp本身,考虑高阶组件在内到真正的顶层cp\n if(current.isShadowRoot) {\n current = current.__hostRoot;\n }\n // y使用prev或者parent的,首个节点无prev,prev要忽略absolute的和display:none的\n let ref = current.__prev;\n let hasFlowPrev;\n while(ref) {\n // 注意有可能是text,视为其父级\n let computedStyle = ref.computedStyle;\n if(computedStyle[POSITION] !== 'absolute' && computedStyle[DISPLAY] !== 'none') {\n y = ref.y + ref.outerHeight;\n hasFlowPrev = true;\n break;\n }\n ref = ref.__prev;\n }\n // 找不到prev以默认parent的为基准,找到则增加自身,排除remove\n let __computedStyle = parent.__computedStyle;\n if(!hasFlowPrev) {\n y += __computedStyle[MARGIN_TOP] + __computedStyle[BORDER_TOP_WIDTH] + __computedStyle[PADDING_TOP];\n }\n x += __computedStyle[MARGIN_LEFT] + __computedStyle[BORDER_LEFT_WIDTH] + __computedStyle[PADDING_LEFT];\n // 特殊的如add/remove时为absolute和none的在调用时即检查提前跳出了,不触发reflow,这里一定是触发的\n // 找到最上层容器供absolute使用,注意top本身是否abs的区别,非abs可能为relative)\n let container = isNowAbs ? parent : top;\n while(container && container !== root) {\n if(isRelativeOrAbsolute(container)) {\n break;\n }\n container = container.__domParent;\n }\n if(!container) {\n container = root;\n }\n // 删除的节点的影响top是自己,无需重新布局只要看next节点的offsetY\n if(removeDom && top === node) {\n }\n // 一定不是add/remove,同步操作提前判断\n else if(isNowNone) {\n top.__layoutNone();\n if(hasZ) {\n parent.__zIndexChildren = null;\n parent.__updateStruct();\n svg && clearSvgCache(parent, false);\n }\n }\n // 现在是定位流,还要看之前是什么\n else if(isNowAbs) {\n parent.__layoutAbs(container, __layoutData, top);\n if(hasZ) {\n parent.__zIndexChildren = null;\n parent.__updateStruct();\n svg && clearSvgCache(parent, false);\n }\n // add/remove的zIndex已提前做好无需关心,只看普通变更\n if(!addDom && !removeDom) {\n // 之前也是abs,可以跳出不会影响其它只看zIndex即可\n if(isLastAbs) {\n top.clearCache(true);\n return;\n }\n }\n }\n // 现在是普通流,不管之前是啥直接布局\n else {\n let ld = Object.assign({}, addDom ? __layoutData : top.__layoutData, {\n x,\n y,\n w,\n h,\n });\n top.__layout(ld, false, false, false);\n // 防止Geom\n if(!(top instanceof Geom)) {\n top.__layoutAbs(container, ld, null);\n }\n if(hasZ) {\n parent.__zIndexChildren = null;\n parent.__updateStruct();\n svg && clearSvgCache(parent, false);\n }\n }\n // add的情况在自身是abs时不影响next,除了svg的zIndex\n if(addDom && top === node && node.currentStyle[POSITION] === 'absolute') {\n top.clearCache(true);\n svg && clearSvgCache(parent, false);\n return;\n }\n // 向上查找最近的relative的parent,获取ox/oy并赋值,无需继续向上递归,因为parent已经递归包含了\n let p = parent;\n while(p) {\n if(p.__computedStyle[POSITION] === 'relative') {\n let { ox, oy } = p;\n ox && top.__offsetX(ox, false, null);\n oy && top.__offsetY(oy, false, null);\n break;\n }\n p = p.__domParent;\n }\n // 高度不变一直0提前跳出,不影响包含margin合并,但需排除节点add/remove,因为空节点会上下穿透合并\n let isNow0 = removeDom && top === node || top.offsetHeight === 0;\n // 几种忽略的情况\n if(addDom && isNow0 || removeDom && isLast0) {\n top.clearCache(true);\n return;\n }\n // 查看现在的上下margin合并情况,和之前的对比得出diff差值进行offsetY/resizeY\n if(top.isShadowRoot) {\n top = top.__hostRoot;\n }\n let t3 = 0, d3 = 0, t4 = 0, d4 = 0;\n mbList.splice(0);\n mtList.splice(0);\n if(removeDom || isNow0) {\n getPrevMergeMargin(prev, mtList, mbList);\n getNextMergeMargin(next, mtList, mbList);\n if(!removeDom) {\n mtList.push(cps[MARGIN_TOP]);\n mbList.push(cps[MARGIN_BOTTOM]);\n }\n let t = getMergeMargin(mtList, mbList);\n t3 = t.target;\n d3 = t.diff;\n }\n else {\n getPrevMergeMargin(prev, mtList, mbList);\n mtList.push(cps[MARGIN_TOP]);\n let t = getMergeMargin(mtList, mbList);\n t3 = t.target;\n d3 = t.diff;\n mtList.splice(0);\n mbList.splice(0);\n getNextMergeMargin(next, mtList, mbList);\n mbList.push(cps[MARGIN_BOTTOM]);\n t = getMergeMargin(mtList, mbList);\n t4 = t.target;\n d4 = t.diff;\n }\n let nowH;\n if(removeDom) {\n // remove有没有向上影响,决定布局后的高度nowH\n let isRemoveSelf = top === node || node.isShadowRoot && node.__hostRoot === top;\n if(isRemoveSelf) {\n nowH = 0;\n }\n else {\n nowH = top.offsetHeight;\n }\n }\n else if(isNowAbs) {\n nowH = 0;\n }\n else {\n nowH = top.offsetHeight;\n }\n // 查看mergeMargin对top造成的偏移\n if(!removeDom && d3) {\n top.__offsetY(d3, true, REFLOW);\n }\n // 差值计算注意考虑margin合并前的值,和合并后的差值,height使用offsetHeight不考虑margin\n let diff = t3 + t4 - t1 - t2 + nowH - oldH;\n // console.log('t3', t3, 'd3', d3, 't4', t4, 'd4', d4, 't1', t1, 'd1', d1, 't2', t2, 'd2', d2, nowH, oldH, diff);\n if(!diff) {\n top.clearCache(true);\n return;\n }\n let parentFixed = isFixedWidthOrHeight(parent, HEIGHT);\n if(!parentFixed) {\n parent.__resizeY(diff, REFLOW);\n }\n // 调整的同时遇到百分比高度的abs需记录下来最后重新布局\n let absList = [];\n offsetNext(next, diff, parentFixed, absList);\n top.clearCache(true);\n // 影响完next之后,向上递归,所有parent的next都影响,遇到固定尺寸或absolute跳出\n while(parent && !parentFixed && parent.__computedStyle[POSITION] !== 'absolute') {\n next = parent.__next;\n parent = parent.__domParent;\n parentFixed = parent && isFixedWidthOrHeight(parent, HEIGHT);\n if(!parentFixed) {\n parent.__resizeY(diff, REFLOW);\n }\n offsetNext(next, diff, parentFixed, absList);\n if(parentFixed) {\n parent.clearCache(false);\n }\n }\n // 记录的受影响的abs节点,都是百分比高度,需重新布局\n absList.forEach(item => {\n let ld = item.__layoutData, container = ld.container;\n item.__domParent.__layoutAbs(container, ld, item);\n });\n}\n\nexport default {\n getMergeMargin,\n checkTop,\n checkNext,\n clearSvgCache,\n};\n","import Xom from './Xom';\nimport Node from './Node';\nimport Text from './Text';\nimport Component from './Component';\nimport util from '../util/util';\n\n/**\n * 打平children,多维嵌套的数组变成一维\n */\nfunction buildChildren(parent, children) {\n let list = [];\n flatten(parent, children, list);\n return list;\n}\n\nfunction flatten(parent, children, list) {\n if(Array.isArray(children)) {\n children.forEach(item => {\n flatten(parent, item, list);\n });\n }\n else if(children instanceof Xom) {\n if(['canvas', 'svg', 'webgl'].indexOf(children.tagName) > -1) {\n throw new Error('Can not nest canvas/svg/webgl');\n }\n children.__parent = parent;\n list.push(children);\n }\n else if(children instanceof Component) {\n children.__parent = parent;\n list.push(children);\n }\n else if(!util.isNil(children) && children !== '') {\n let t = new Text(children);\n t.__parent = parent;\n list.push(t);\n }\n}\n\n/**\n * 设置关系,父子和兄弟,被添加到真实dom中前调用\n */\nfunction relation(root, host, parent, children, options = {}) {\n if(Array.isArray(children)) {\n children.forEach(item => {\n relation(root, host, parent, item, options);\n });\n }\n else if(children instanceof Xom || children instanceof Component || children instanceof Text) {\n children.__root = root;\n children.__parent = parent;\n children.__domParent = parent;\n children.__isDestroyed = false;\n if(options.prev) {\n options.prev.__next = children;\n children.__prev = options.prev;\n }\n options.prev = children;\n if(!(children instanceof Text)) {\n let ref = children.props.ref;\n if(util.isString(ref) && ref || util.isNumber(ref)) {\n host.ref[ref] = children;\n }\n else if(ref && util.isFunction(ref)) {\n ref(children);\n }\n }\n if(children instanceof Xom && children.__children) {\n relation(root, host, children, children.__children, {});\n }\n else if(children instanceof Component) {\n let sr = children.render();\n let hoc = [];\n while(sr && sr instanceof Component) {\n hoc.push(sr);\n let res = sr.render();\n if(res) {\n sr.__shadow = res;\n res.__host = sr;\n }\n sr = res;\n }\n if(!(sr instanceof Node)) {\n sr = new Text(sr);\n }\n if(hoc.length) {\n children.__shadow = hoc[0];\n hoc[0].__host = children;\n hoc.forEach(item => {\n item.__shadowRoot = sr;\n item.__hostRoot = children;\n item.__root = root;\n item.__domParent = parent;\n });\n }\n else {\n children.__shadow = sr;\n sr.__host = children;\n }\n children.__shadowRoot = sr;\n sr.__hostRoot = children;\n sr.__root = root;\n sr.__domParent = parent;\n sr.__isDestroyed = false;\n children.__init();\n if(sr instanceof Xom && sr.__children) {\n relation(root, children, sr, sr.__children, {});\n }\n }\n }\n return children;\n}\n\n// 设置每个节点root引用,组件初始化\nfunction buildRoot(root, children) {\n root.__root = root;\n root.__host = root;\n relation(root, root, root, children, {});\n}\n\nexport default {\n buildChildren,\n buildRoot,\n relation,\n};\n","import Xom from './Xom';\nimport Text from './Text';\nimport Node from './Node';\nimport LineBoxManager from './LineBoxManager';\nimport Component from './Component';\nimport tag from './tag';\nimport TextBox from './TextBox';\nimport Ellipsis from './Ellipsis';\nimport reset from '../style/reset';\nimport css from '../style/css';\nimport unit from '../style/unit';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport reflow from '../refresh/reflow';\nimport builder from './builder';\nimport mode from '../refresh/mode';\nimport level from '../refresh/level';\nimport geom from '../math/geom';\nimport mx from '../math/matrix';\n\nconst {\n STYLE_KEY: {\n POSITION,\n DISPLAY,\n MARGIN_LEFT,\n MARGIN_TOP,\n MARGIN_RIGHT,\n MARGIN_BOTTOM,\n PADDING_LEFT,\n PADDING_BOTTOM,\n PADDING_RIGHT,\n PADDING_TOP,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_LEFT_WIDTH,\n TOP,\n RIGHT,\n BOTTOM,\n LEFT,\n WIDTH,\n HEIGHT,\n TEXT_ALIGN,\n FLEX_DIRECTION,\n FLEX_BASIS,\n FLEX_SHRINK,\n FLEX_GROW,\n ALIGN_SELF,\n ALIGN_ITEMS,\n JUSTIFY_CONTENT,\n Z_INDEX,\n WHITE_SPACE,\n LINE_HEIGHT,\n LINE_CLAMP,\n ORDER,\n FLEX_WRAP,\n ALIGN_CONTENT,\n OVERFLOW,\n FONT_SIZE,\n FONT_FAMILY,\n FONT_WEIGHT,\n WRITING_MODE,\n },\n ELLIPSIS,\n} = enums;\nconst { AUTO, PX, PERCENT, REM, VW, VH, VMAX, VMIN } = unit;\nconst { isRelativeOrAbsolute, getBaseline, getVerticalBaseline } = css;\nconst { extend, isNil, isFunction, assignMatrix } = util;\nconst { CANVAS, SVG, WEBGL } = mode;\nconst { isE, multiply } = mx;\nconst { REFLOW } = level;\n\n// 渲染获取zIndex顺序\nfunction genZIndexChildren(dom) {\n let normal = [];\n let hasMc;\n let mcHash = {};\n let lastMaskIndex;\n let children = dom.children;\n children.forEach((item, i) => {\n let child = item;\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n // 遮罩单独保存后特殊排序\n if(item instanceof Xom && item.__mask) {\n // 开头的mc忽略,后续的连续mc以第一次出现为准\n if(lastMaskIndex !== undefined) {\n mcHash[lastMaskIndex].push(item);\n }\n else if(i) {\n lastMaskIndex = i - 1;\n children[lastMaskIndex].__iIndex = lastMaskIndex;\n mcHash[lastMaskIndex] = [item];\n hasMc = true;\n }\n }\n else {\n lastMaskIndex = undefined;\n if(item instanceof Xom) {\n child.__zIndex = item.currentStyle[Z_INDEX];\n if(isRelativeOrAbsolute(item)) {\n // 临时变量为排序使用\n child.__aIndex = true;\n normal.push(child);\n }\n else {\n // 之前遗留清除\n child.__aIndex = undefined;\n normal.push(child);\n }\n }\n else {\n child.__zIndex = 0;\n normal.push(child);\n }\n child.__iIndex = i;\n }\n });\n normal.sort(function(a, b) {\n if(a.__zIndex !== b.__zIndex) {\n return a.__zIndex - b.__zIndex;\n }\n // zIndex相等时abs优先flow\n if(a.__aIndex !== b.__aIndex) {\n if(a.__aIndex) {\n return 1;\n }\n return -1;\n }\n // 都相等看索引\n return a.__iIndex - b.__iIndex;\n });\n // 将遮罩插入到对应顺序上\n if(hasMc) {\n for(let i = normal.length - 1; i >= 0; i--) {\n let idx = normal[i].__iIndex;\n if(mcHash.hasOwnProperty(idx)) {\n normal.splice(i + 1, 0, ...mcHash[idx]);\n }\n }\n }\n return normal;\n}\n\n// flex布局阶段顺序,不是渲染也和struct结构无关,可以无视mask\nfunction genOrderChildren(flowChildren) {\n let normal = [];\n flowChildren.forEach((item, i) => {\n let child = item;\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Xom) {\n child.__order = item.currentStyle[ORDER];\n }\n else {\n child.__order = 0;\n }\n normal.push(child);\n child.__iIndex = i;\n });\n normal.sort(function(a, b) {\n if(a.__order !== b.__order) {\n return a.__order - b.__order;\n }\n // order相等时看节点索引\n return a.__iIndex - b.__iIndex;\n });\n return normal;\n}\n\n/**\n * lineClamp超出范围时ib作为最后一行最后一个无法挤下时进行回溯\n */\nfunction backtrack(bp, lineBoxManager, lineBox, total, endSpace, isUpright) {\n let ew, computedStyle = bp.computedStyle, root = bp.root, renderMode = root.renderMode;\n let list = lineBox.list;\n // 根据textBox里的内容,确定当前内容,索引,x和剩余宽度\n list.forEach(item => {\n total -= isUpright ? item.outerHeight : item.outerWidth;\n });\n let ctx;\n if(renderMode === CANVAS || renderMode === WEBGL) {\n ctx = renderMode === WEBGL\n ? inject.getFontCanvas().ctx\n : root.ctx;\n }\n // 临时测量ELLIPSIS的尺寸\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let font = css.setFontStyle(computedStyle);\n if(ctx.font !== font) {\n ctx.font = font;\n }\n ew = ctx.measureText(ELLIPSIS).width;\n }\n else {\n ew = inject.measureTextSync(ELLIPSIS, computedStyle[FONT_FAMILY], computedStyle[FONT_SIZE], computedStyle[FONT_WEIGHT]);\n }\n for(let i = list.length - 1; i >= 0; i--) {\n let item = list[i];\n // 无论删除一个ib还是textBox,放得下的话都可以暂停循环,注意强制保留行首\n if(!i || total + item.outerWidth >= ew + (1e-10)) {\n if(item instanceof TextBox) {\n let text = item.parent;\n text.__backtrack(bp, lineBoxManager, lineBox, item, total, endSpace, ew, computedStyle, ctx, renderMode, isUpright);\n }\n else {\n let ep = new Ellipsis(item.x + item.outerWidth + endSpace, item.y, ew, bp);\n lineBoxManager.addItem(ep, true);\n }\n break;\n }\n // 放不下删除\n else {\n if(item instanceof TextBox) {\n let text = item.parent;\n let i = text.textBoxes.indexOf(item);\n if(i > -1) {\n text.textBoxes.splice(i, 1);\n }\n }\n else {\n item.__layoutNone();\n }\n list.pop();\n total += isUpright ? item.outerHeight : item.outerWidth;\n }\n }\n}\n\nclass Dom extends Xom {\n constructor(tagName, props, children) {\n super(tagName, props);\n let { style } = this;\n if(!style.display || !{\n flex: true,\n block: true,\n inline: true,\n 'inline-block': true,\n inlineBlock: true,\n none: true,\n }.hasOwnProperty(style.display)) {\n if(tag.INLINE.hasOwnProperty(this.tagName)) {\n style.display = 'inline';\n }\n else {\n style.display = 'block';\n }\n }\n if(!style[FONT_WEIGHT] && tag.BOLD.hasOwnProperty(tagName)) {\n style.fontWeight = 700;\n }\n this.__style = css.normalize(style, reset.DOM_ENTRY_SET);\n // currentStyle/currentProps不深度clone,继承一层即可,动画时也是extend这样只改一层引用不动原始静态style\n this.__currentStyle = extend([], this.__style);\n this.__children = builder.buildChildren(this, children);\n this.__flexLine = []; // flex布局多行模式时存储行\n this.__ellipsis = null; // 虚拟节点,有的话渲染\n this.__zIndexChildren = null;\n }\n\n __structure(lv, j) {\n let res = super.__structure(lv, j);\n let arr = [res];\n let zIndexChildren = this.__zIndexChildren = this.__zIndexChildren || genZIndexChildren(this);\n zIndexChildren.forEach((child, i) => {\n let temp = child.__structure(lv + 1, i);\n if(Array.isArray(temp)) {\n arr = arr.concat(temp);\n }\n else {\n arr.push(temp);\n }\n });\n let total = arr.length - 1;\n res.num = zIndexChildren.length;\n res.total = total;\n return arr;\n }\n\n __modifyStruct() {\n let struct = this.__struct;\n let total = struct.total || 0;\n let root = this.__root, __structs = root.__structs;\n // 新生成了struct,引用也变了\n let nss = this.__structure(struct.lv, struct.childIndex);\n let i = __structs.indexOf(struct);\n root.__structs.splice(i, total + 1, ...nss);\n let d = 0;\n if(this !== root) {\n struct = this.__struct;\n d = (struct.total || 0) - total;\n if(d) {\n let p = this.__domParent;\n while(p) {\n p.__struct.total = p.__struct.total || 0;\n p.__struct.total += d;\n p = p.__domParent;\n }\n }\n }\n }\n\n __insertStruct(child, childIndex) {\n let struct = this.__struct;\n let cs = child.__structure(struct.lv + 1, childIndex);\n let root = this.__root, structs = root.__structs;\n // 根据是否有prev确定插入索引位置\n let zIndexChildren = this.__zIndexChildren;\n let i;\n if(childIndex) {\n let ps = zIndexChildren[childIndex - 1].__struct;\n let total = ps.total || 0;\n i = structs.indexOf(ps) + total + 1;\n }\n else {\n i = structs.indexOf(struct) + 1;\n }\n let total;\n if(Array.isArray(cs)) {\n structs.splice(i, 0, ...cs);\n total = (cs[0].total || 0) + 1;\n }\n else {\n structs.splice(i, 0, cs);\n total = (cs.total || 0) + 1;\n }\n // 调整后面children的childIndex,+1\n i++;\n for(let len = zIndexChildren.length; i < len; i++) {\n zIndexChildren[i].__struct.childIndex++;\n }\n // 向上添加parent的total数量\n struct.num++;\n struct.total += total;\n let p = this.__domParent;\n while(p) {\n struct = p.__struct;\n struct.total = struct.total || 0;\n struct.total += total;\n p = p.__domParent;\n }\n }\n\n __deleteStruct(child, childIndex) {\n let cs = child.__struct;\n let total = (cs.total || 0) + 1;\n let root = this.__root, structs = root.__structs;\n let i = structs.indexOf(cs);\n structs.splice(i, total);\n // zIndexChildren后面的childIndex偏移\n let zIndexChildren = this.__zIndexChildren;\n for(let i = childIndex + 1, len = zIndexChildren.length; i < len; i++) {\n zIndexChildren[i].__struct.childIndex--;\n }\n // 向上减少parent的total数量\n let struct = this.__struct;\n struct.num--;\n struct.total = struct.total || 0;\n struct.total -= total;\n let p = this.__domParent;\n while(p) {\n struct = p.__struct;\n struct.total = struct.total || 0;\n struct.total -= total;\n p = p.__domParent;\n }\n }\n\n /**\n * 因为zIndex/abs/add的变化造成的更新,只需重排这一段顺序即可\n */\n __updateStruct() {\n let structs = this.__root.__structs;\n let struct = this.__struct;\n let total = struct.total || 0;\n let index = structs.indexOf(struct);\n let zIndexChildren = this.__zIndexChildren = genZIndexChildren(this);\n let length = zIndexChildren.length;\n if(length === 1) {\n return;\n }\n let needSort;\n zIndexChildren.forEach((child, i) => {\n let cs = child.__struct;\n cs.childIndex = i; // 仅后面排序用\n });\n // 按之前的structs划分为相同数量的若干段进行排序\n let source = [], arr = [], count = 0;\n for(let i = index + 1; i <= index + total; i++) {\n let cs = structs[i];\n let o = {\n cs,\n list: structs.slice(i, i + (cs.total || 0) + 1),\n };\n if(cs.childIndex !== count++) {\n needSort = true;\n }\n source.push(o);\n i += cs.total || 0;\n }\n\n if(needSort) {\n let list = [];\n source.sort(function(a, b) {\n return a.cs.childIndex - b.cs.childIndex;\n });\n source.forEach(item => {\n list = list.concat(item.list);\n });\n structs.splice(index + 1, total, ...list);\n }\n }\n\n /**\n * 给定父宽度情况下,尝试行内放下后的剩余宽度,为负数即放不下,这里只会出现行内级即inline(Block)\n * 调用前提是非行开头的inline尝试计算是否放得下,开头无需且禁止判断,防止出现永远放不下一个字符卡死\n * 返回非负数就是放得下,这样一些尺寸为0的也算\n * @param free 剩余宽度\n * @param total 容器尺寸\n * @param isUpright 垂直排版\n * @returns {number|*}\n * @private\n */\n __tryLayInline(free, total, isUpright) {\n this.__computeReflow();\n let { flowChildren, currentStyle: {\n [DISPLAY]: display,\n [WIDTH]: width,\n [HEIGHT]: height,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n }, computedStyle: {\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n } } = this;\n // inline没w/h,并且尝试孩子第一个能放下即可,如果是文字就是第一个字符\n if(display === 'inline') {\n if(flowChildren.length) {\n let first = flowChildren[0];\n if(first instanceof Component) {\n first = first.shadowRoot;\n }\n if(first instanceof Xom) {\n free = first.__tryLayInline(free, total, isUpright);\n }\n else {\n free -= first.firstCharWidth;\n }\n }\n }\n // inlineBlock尝试所有孩子在一行上\n else {\n if(width.u !== AUTO) {\n free -= isUpright ? this.__calSize(height, total, true) : this.__calSize(width, total, true);\n }\n else {\n for(let i = 0; i < flowChildren.length; i++) {\n // 当放不下时直接返回,无需继续多余的尝试计算\n if(free < 0) {\n return free;\n }\n let item = flowChildren[i];\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Xom) {\n free = item.__tryLayInline(free, total, isUpright);\n }\n // text强制一行,否则非头就是放不下,需从头开始\n else {\n free -= item.textWidth;\n }\n }\n }\n // ib要减去末尾mpb\n if(isUpright) {\n free -= this.__calSize(marginBottom, total, true);\n free -= this.__calSize(paddingBottom, total, true);\n free -= borderBottomWidth;\n }\n else {\n free -= this.__calSize(marginRight, total, true);\n free -= this.__calSize(paddingRight, total, true);\n free -= borderRightWidth;\n }\n }\n // 还要减去开头的mpb\n if(isUpright) {\n free -= this.__calSize(marginTop, total, true);\n free -= this.__calSize(paddingTop, total, true);\n free -= borderTopWidth;\n }\n else {\n free -= this.__calSize(marginLeft, total, true);\n free -= this.__calSize(paddingLeft, total, true);\n free -= borderLeftWidth;\n }\n return free;\n }\n\n // 设置y偏移值,递归包括children,此举在justify-content/margin-auto/relative等对齐用\n __offsetX(diff, isLayout, lv) {\n if(this.__computedStyle[DISPLAY] === 'none') {\n return;\n }\n super.__offsetX(diff, isLayout, lv);\n let ep = this.__ellipsis;\n if(ep) {\n ep.__offsetX(diff, isLayout);\n }\n // 记得偏移LineBox\n if(isLayout && !this.__isInline && this.lineBoxManager) {\n this.lineBoxManager.__offsetX(diff);\n }\n this.flowChildren.forEach(item => {\n if(item) {\n item.__offsetX(diff, isLayout, lv);\n }\n });\n }\n\n __offsetY(diff, isLayout, lv) {\n if(this.__computedStyle[DISPLAY] === 'none') {\n return;\n }\n super.__offsetY(diff, isLayout, lv);\n let ep = this.__ellipsis;\n if(ep) {\n ep.__offsetY(diff, isLayout);\n }\n if(isLayout && !this.__isInline && this.lineBoxManager) {\n this.lineBoxManager.__offsetY(diff);\n }\n this.flowChildren.forEach(item => {\n if(item) {\n item.__offsetY(diff, isLayout, lv);\n }\n });\n }\n\n\n /**\n * flex布局时,计算basis尺寸,如果有固定声明则以其为标准,content为内容最大尺寸,auto依赖w/h或降级content\n * basis要考虑相加直接item的mpb,非绝对值单位以container为基准,basis为内容时为max值\n * item的孩子为孙子节点需递归,不参与basis计算,只参与min/max,尺寸和mpb均只考虑绝对值\n * 自动计算时影响尺寸的只有换行的text,以及一组inline,均按其中最大尺寸的一个计算\n * auto自动计算递归进行,如果是普通row方向,按最大text的charWidth为准\n * 如果是column方向,则虚拟布局后看text的height\n * 在abs下时进入特殊状态,无论是row/column,都会按row方向尝试最大尺寸,直到舞台边缘或容器声明的w折行\n * 返回b,声明则按css值,否则是auto/content\n * 返回min为最小宽度,遇到字符/inline则单列排版后需要的最大宽度\n * 返回max为最大宽度,理想情况一排最大值,在abs时virtualMode状态参与计算,文本抵达边界才进行换行\n * 当为column方向时,特殊进行虚拟布局isVirtual,需要获取高度\n * @param isDirectionRow\n * @param isAbs\n * @param isColumn\n * @param data\n * @param isDirectChild\n * @private\n */\n __calBasis(isDirectionRow, isAbs, isColumn, data, isDirectChild) {\n this.__computeReflow();\n let b = 0;\n let min = 0;\n let max = 0;\n let { flowChildren, currentStyle, computedStyle } = this;\n let { x, y, w, h } = data;\n // 计算需考虑style的属性\n let {\n [FLEX_DIRECTION]: flexDirection,\n [FLEX_BASIS]: flexBasis,\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n let {\n [LINE_HEIGHT]: lineHeight,\n [DISPLAY]: display,\n [LINE_CLAMP]: lineClamp,\n [WRITING_MODE]: writingMode,\n } = computedStyle;\n let isUpright = writingMode.indexOf('vertical') === 0;\n let main = isDirectionRow ? width : height;\n // basis3种情况:auto、固定、content\n let isAuto = flexBasis.u === AUTO;\n let isFixed = [PX, PERCENT, REM, VW, VH, VMAX, VMIN].indexOf(flexBasis.u) > -1;\n let isContent = !isAuto && !isFixed;\n let fixedSize;\n // flex的item固定basis计算\n if(isFixed) {\n b = fixedSize = this.__calSize(flexBasis, isDirectionRow ? w : h, true);\n }\n // 已声明主轴尺寸的,当basis是auto时为main值\n else if(isAuto && ([PX, PERCENT, REM, VW, VH, VMAX, VMIN].indexOf(main.u) > -1)) {\n b = fixedSize = this.__calSize(main, isDirectionRow ? w : h, true);\n }\n // 非固定尺寸的basis为auto时降级为content\n else if(isAuto) {\n isContent = true;\n }\n let countMin = 0, countMax = 0;\n lineClamp = lineClamp || 0;\n // row的flex时,child只需计算宽度的basis/min/max,递归下去也是如此,即便包含递归的flex\n if(isDirectionRow) {\n // flex的item还是flex时\n if(display === 'flex') {\n let isR = ['column', 'columnReverse'].indexOf(flexDirection) === -1;\n flowChildren = genOrderChildren(flowChildren);\n flowChildren.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let [, min2, max2] = item.__calBasis(isDirectionRow, isAbs, isColumn, { x, y, w, h }, false);\n if(isR) {\n min += min2;\n max += max2;\n }\n else {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n }\n }\n // text除了flex还需要分辨垂直排版\n else {\n if(isUpright) {\n let lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight,\n isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle), isUpright);\n item.__layoutFlow({\n x,\n y,\n w,\n h,\n lineBoxManager,\n lineClamp,\n isUpright,\n });\n min += item.width;\n max += item.width;\n }\n if(isR) {\n min += item.charWidth;\n max += item.textWidth;\n }\n else {\n min = Math.max(min, item.charWidth);\n max = Math.max(max, item.textWidth);\n }\n }\n });\n }\n // 特殊的flex水平布局但书写垂直,遇到后直接假布局获取宽度,因为水平尺寸视为无限但垂直不是,\n // 这里一定是第一个垂直排版不会递归下去,因为flex的child匿名block,水平的垂直书写inline匿名ib\n else if(isUpright) {\n let lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight,\n isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle), isUpright);\n this.__layoutFlow({\n x,\n y,\n w,\n h,\n lineBoxManager,\n lineClamp,\n isUpright,\n }, isAbs, false, true);\n min = max = b = this.width;\n }\n // flex的item是block/inline时,inline也会变成block统一对待,递归下去会有inline出现,但row的水平size为无穷不会换行可以忽略\n else {\n let lineBoxManager = data.lineBoxManager;\n if(display !== 'inline') {\n lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight,\n isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle), isUpright);\n }\n flowChildren.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let [, min2, max2] = item.__calBasis(isDirectionRow, isAbs, isColumn, { x, y, w, h, lineBoxManager }, false);\n let display = item.computedStyle[DISPLAY];\n // row看块级最大尺寸和连续行级最大尺寸的宽\n if(display === 'block' || display === 'flex') {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n countMin = countMax = 0;\n }\n else {\n countMin += min2;\n countMax += max2;\n min = Math.max(min, countMin);\n max = Math.max(max, countMax);\n }\n }\n else {\n countMin += item.charWidth;\n countMax += item.textWidth;\n min = Math.max(min, countMin);\n max = Math.max(max, countMax);\n }\n });\n }\n if(fixedSize) {\n max = Math.max(fixedSize, max);\n }\n // row降级为内容时basis等同于max\n if(isContent) {\n b = max;\n }\n }\n // column的flex时,每个child做一次虚拟布局,获取到每个child的高度和宽度\n else {\n this.__layoutFlow({\n x,\n y,\n w,\n h,\n isUpright,\n }, isAbs, true, false);\n min = max = b = this.height; // column的child,max和b总相等\n }\n // 直接item的mpb影响basis\n return this.__addMBP(isDirectionRow, w, currentStyle, computedStyle, [b, min, max], isDirectChild);\n }\n\n // flow的layout包裹方法,布局后递归计算computedStyle,abs节点在__layoutAbs中做\n __layout(data, isAbs, isColumn, isRow) {\n super.__layout(data, isAbs, isColumn, isRow);\n this.__layoutStyle();\n }\n\n // 布局结束后递归向下计算computedStyle,父级必须先算因为有inherit\n __layoutStyle() {\n super.__layoutStyle();\n this.flowChildren.forEach(child => {\n if(!(child instanceof Text)) {\n child.__layoutStyle();\n }\n });\n }\n\n __layoutNone() {\n super.__layoutNone();\n let { children } = this;\n children.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n item.__layoutNone();\n }\n });\n }\n\n /**\n * block布局,本身固定尺寸优先,否则看内容从上往下从左往右flow流排布\n * 内部inline和inlineBlock组成LineBox,通过LineBoxManager来管理混排的现象\n * LineBoxManager只有block和inlineBlock内部生成,inline会复用最近父级的\n * 内部的block在垂直方向要考虑margin合并的问题,强制所有节点为bfc,精简逻辑\n * @param data\n * @param isAbs abs无尺寸时提前虚拟布局计算尺寸\n * @param isColumn flex列无尺寸时提前虚拟布局计算尺寸\n * @param isRow flex行布局时出现writingMode垂直排版计算尺寸\n */\n __layoutBlock(data, isAbs, isColumn, isRow) {\n let { flowChildren, currentStyle, computedStyle } = this;\n let {\n [TEXT_ALIGN]: textAlign,\n [WHITE_SPACE]: whiteSpace,\n [LINE_CLAMP]: lineClamp,\n [LINE_HEIGHT]: lineHeight,\n [OVERFLOW]: overflow,\n } = computedStyle;\n let { fixedWidth, fixedHeight, x, y, w, h, isParentVertical, isUpright } = this.__preLayout(data, false);\n // abs虚拟布局需预知width,固定可提前返回\n if(isAbs && (fixedWidth && !isUpright || fixedHeight && isUpright)) {\n if(isUpright) {\n this.__ioSize(undefined, h);\n }\n else {\n this.__ioSize(w, undefined);\n }\n return;\n }\n if(isColumn && fixedHeight) {\n this.__ioSize(undefined, h);\n return;\n }\n if(isRow && fixedWidth) {\n this.__ioSize(w, undefined);\n return;\n }\n // 只有>=1的正整数才有效\n lineClamp = lineClamp || 0;\n let lineClampCount = 0;\n // 虚线管理一个block内部的LineBox列表,使得inline的元素可以中途衔接处理折行\n // 内部维护inline结束的各种坐标来达到目的,遇到block时中断并处理换行坐标\n let lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight,\n isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle), isUpright);\n // 因精度问题,统计宽度均从0开始累加每行,最后取最大值,仅在abs布局时isVirtual生效\n let maxSize = 0;\n let countSize = 0;\n let lx = x; // 行首,考虑了mbp\n let ly = y;\n // 连续block(flex相同,下面都是)的上下margin合并值记录,合并时从列表中取\n let mergeMarginEndList = [], mergeMarginStartList = [];\n let length = flowChildren.length;\n let ignoreNextLine; // lineClamp超过后,后面的均忽略并置none,注意block内部行数统计是跨子block的\n let ignoreNextWrap; // whiteSpace单行超过后,后面的均忽略并置none,注意这也是跨block的会被隔断重计\n flowChildren.forEach((item, i) => {\n let isXom = item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom;\n if(isXom) {\n item.__computeReflow(); // writing-mode可能会造成inline改变为ib\n }\n let isInline = isXom && item.computedStyle[DISPLAY] === 'inline';\n let isInlineBlock = isXom && item.computedStyle[DISPLAY] === 'inlineBlock';\n let isRealInline = isInline && item.__isRealInline();\n let lastLineClampCount = lineClampCount;\n // 每次循环开始前,这次不是block的话,看之前遗留待合并margin,并重置\n if((!isXom || isInline || isInlineBlock)) {\n if(mergeMarginEndList.length && mergeMarginStartList.length) {\n let diff = reflow.getMergeMargin(mergeMarginStartList, mergeMarginEndList).diff;\n if(diff) {\n if(isUpright) {\n x += diff;\n }\n else {\n y += diff;\n }\n }\n }\n mergeMarginStartList = [];\n mergeMarginEndList = [];\n }\n if(isXom) {\n // inline和inlineBlock的细节不同之处,ib除了w/h之外,更想像block一样占据一行\n // 比如2个inline前面占一半后面比一半多但还是会从一半开始然后第2行换行继续,但ib放不下则重开一行\n // inline和ib能互相嵌套,形成的LineBox中则是TextBox和节点混合\n if(isInlineBlock || isInline) {\n if(ignoreNextLine || ignoreNextWrap) {\n item.__layoutNone();\n return;\n }\n // x开头或者nowrap单行的非block,不用考虑是否放得下直接放\n if((isUpright && y === ly) || (!isUpright && x === lx) || !i || whiteSpace === 'nowrap') {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager, // ib内部新生成会内部判断,这里不管统一传入\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n // inlineBlock的特殊之处,一旦w为auto且内部产生折行时,整个变成block独占一块区域,坐标计算和block一样,注意nowrap排除\n if(item.__isIbFull) {\n lineClampCount++;\n }\n if((isUpright && item.__isUprightIbFull || !isUpright && item.__isIbFull)\n && whiteSpace !== 'nowrap') {\n lineBoxManager.addItem(item, true);\n if(isUpright) {\n x += item.outerWidth;\n y = ly;\n }\n else {\n x = lx;\n y += item.outerHeight;\n }\n lineBoxManager.setNotEnd();\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中\n else {\n (isInlineBlock || !isRealInline) && lineBoxManager.addItem(item, false);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n // 单行时inline在ellipsis会导致行数变化,否则判断坐标尺寸(恰好有点空剩余inline排不下),注意前提是非abs,其虚拟计算尺寸无视限制\n if(!isAbs && overflow === 'hidden' && whiteSpace === 'nowrap'\n && ((isUpright && y - ly > h + (1e-10)) || (!isUpright && x - lx > w + (1e-10))\n || lineClampCount > lastLineClampCount)) {\n ignoreNextWrap = true;\n }\n else if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n // abs统计宽度,注意nowrap时累加\n if(isAbs) {\n if(whiteSpace === 'nowrap') {\n countSize += isUpright ? item.outerHeight : item.outerWidth;\n }\n else {\n countSize = isUpright ? item.outerHeight : item.outerWidth;\n if(lineClampCount > lastLineClampCount) {\n countSize = Math.max(countSize, isUpright ? h : w);\n }\n }\n maxSize = Math.max(maxSize, countSize);\n }\n }\n else {\n // 非开头先尝试是否放得下,内部判断了inline/ib,ib要考虑是否有width\n let free = item.__tryLayInline(isUpright ? (h + ly - y) : (w + lx - x), isUpright ? h : w, isUpright);\n // 放得下继续,奇怪的精度问题,加上阈值\n if(free >= (-1e-10)) {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n // ib放得下要么内部没有折行,要么声明了width限制,都需手动存入当前lb\n (isInlineBlock || !isRealInline) && lineBoxManager.addItem(item, false);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n if(isAbs) {\n // ib和非换行inline累加\n if(isInlineBlock || lineClampCount === lastLineClampCount) {\n countSize += isUpright ? item.outerHeight : item.outerWidth;\n maxSize = Math.max(maxSize, countSize);\n }\n // inline换行时一定超过边界至少撑满w\n else {\n maxSize = Math.max(maxSize, isUpright ? h : w);\n countSize = isUpright ? (y - ly) : (x - lx);\n maxSize = Math.max(maxSize, countSize);\n }\n }\n }\n // 放不下处理之前的lineBox,并考虑重新开头或截断\n else {\n lineClampCount++;\n if(isUpright) {\n x = lineBoxManager.endX;\n y = ly;\n }\n else {\n x = lx;\n y = lineBoxManager.endY;\n }\n lineBoxManager.setNewLine();\n // 超过行数,整个block共用计数器\n if(lineClamp && lineClampCount >= lineClamp) {\n item.__layoutNone();\n ignoreNextLine = true;\n let list = lineBoxManager.list;\n let lineBox = list[list.length - 1];\n backtrack(this, lineBoxManager, lineBox, isUpright ? h : w, 0, isUpright);\n return;\n }\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n // 重新开头的ib和上面开头处一样逻辑\n if(item.__isIbFull || item.__isUprightIbFull) {\n lineBoxManager.addItem(item, false);\n if(isUpright) {\n x += item.outerWidth;\n y = ly;\n }\n else {\n x = lx;\n y += item.outerHeight;\n }\n lineBoxManager.setNotEnd();\n lineClampCount++;\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中\n else {\n (isInlineBlock || !isRealInline) && lineBoxManager.addItem(item, false);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n if(isAbs) {\n maxSize = Math.max(maxSize, countSize);\n // 此处发生换行撑满\n maxSize = Math.max(maxSize, isUpright ? h : w);\n // 新行重计\n countSize = isUpright ? item.outerHeight : item.outerWidth;\n maxSize = Math.max(maxSize, countSize);\n }\n }\n }\n }\n // block/flex先处理之前可能遗留的最后一行LineBox,然后递归时不传lineBoxManager,其内部生成新的\n else {\n ignoreNextWrap = false; // block出现的话只隔断单行,不影响多行计数器\n // 非开头,说明之前的text/ib未换行,需要增加行数\n if((isUpright && y > ly) || (!isUpright && x > lx)) {\n lineClampCount++;\n }\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n if(isUpright) {\n y = ly;\n }\n else {\n x = lx;\n }\n if(lineBoxManager.isEnd) {\n if(isUpright) {\n x = lineBoxManager.endX;\n }\n else {\n y = lineBoxManager.endY;\n }\n lineBoxManager.setNotEnd();\n lineBoxManager.setNewLine();\n }\n item.__layoutFlow({\n x,\n y,\n w,\n h,\n isUpright,\n }, isAbs, isColumn, isRow);\n // 自身无内容\n let isNone = item.currentStyle[DISPLAY] === 'none';\n let isEmptyBlock;\n if(!isNone && item.flowChildren && item.flowChildren.length === 0) {\n let {\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [PADDING_LEFT]: paddingLeft,\n [WIDTH]: width,\n [HEIGHT]: height,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = item.computedStyle;\n // 无内容高度为0的空block特殊情况,记录2个margin下来等后续循环判断处理\n if(isUpright && paddingLeft <= 0 && paddingRight <= 0 && width <= 0 && borderLeftWidth <= 0 && borderRightWidth <= 0) {\n mergeMarginEndList.push(marginRight);\n mergeMarginStartList.push(marginLeft);\n isEmptyBlock = true;\n }\n else if(!isUpright && paddingTop <= 0 && paddingBottom <= 0 && height <= 0 && borderTopWidth <= 0 && borderBottomWidth <= 0) {\n mergeMarginEndList.push(marginBottom);\n mergeMarginStartList.push(marginTop);\n isEmptyBlock = true;\n }\n }\n if(isUpright) {\n x += item.outerWidth;\n lineBoxManager.__lastX = x;\n }\n else {\n y += item.outerHeight;\n lineBoxManager.__lastY = y;\n }\n // absolute/flex前置虚拟计算\n if(isAbs) {\n maxSize = Math.max(maxSize, isUpright ? item.outerHeight : item.outerWidth);\n countSize = 0;\n }\n // 空block要留下轮循环看,除非是最后一个,此处非空本轮处理掉看是否要合并\n if(!isNone && !isEmptyBlock) {\n let {\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n } = item.computedStyle;\n // 有bottom值说明之前有紧邻的block,任意个甚至空block,自己有个top所以无需判断top\n // 如果是只有紧邻的2个非空block,也被包含在情况内,取上下各1合并\n if(mergeMarginEndList.length) {\n if(isUpright) {\n mergeMarginStartList.push(marginLeft);\n let diff = reflow.getMergeMargin(mergeMarginStartList, mergeMarginEndList).diff;\n if(diff) {\n item.__offsetX(diff, true, null);\n x += diff;\n }\n }\n else {\n mergeMarginStartList.push(marginTop);\n let diff = reflow.getMergeMargin(mergeMarginStartList, mergeMarginEndList).diff;\n if(diff) {\n item.__offsetY(diff, true, null);\n y += diff;\n }\n }\n }\n // 同时自己保存bottom,为后续block准备\n mergeMarginStartList = [];\n mergeMarginEndList = [isUpright ? marginRight : marginBottom];\n }\n // 最后一个空block当是正正和负负时要处理,正负在outHeight处理了结果是0\n else if(i === length - 1) {\n let diff = reflow.getMergeMargin(mergeMarginStartList, mergeMarginEndList).diff;\n if(diff) {\n if(isUpright) {\n x += diff;\n }\n else {\n y += diff;\n }\n }\n }\n }\n }\n // 文字和inline类似\n else {\n if(ignoreNextLine || ignoreNextWrap) {\n item.__layoutNone();\n return;\n }\n // x开头,不用考虑是否放得下直接放\n if((isUpright && y === ly) || (!isUpright && x === lx) || !i || whiteSpace === 'nowrap') {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n isUpright,\n });\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n // 和inline很像,只是没有ib\n if(!isAbs && overflow === 'hidden' && whiteSpace === 'nowrap'\n && ((isUpright && y - ly > h + (1e-10)) || (!isUpright && x - lx > w + (1e-10))\n || lineClampCount > lastLineClampCount)) {\n ignoreNextWrap = true;\n }\n else if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n // abs统计宽度,注意nowrap时累加\n if(isAbs) {\n if(whiteSpace === 'nowrap') {\n countSize += isUpright ? item.height : item.width;\n }\n else {\n countSize = isUpright ? item.height : item.width;\n if(lineClampCount > lastLineClampCount) {\n countSize = Math.max(countSize, isUpright ? h : w);\n }\n }\n maxSize = Math.max(maxSize, countSize);\n }\n }\n else {\n // 非开头先尝试是否放得下\n let free = item.__tryLayInline(isUpright ? (h + ly - y) : (w + lx - x));\n // 放得下继续\n if(free >= (-1e-10)) {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n isUpright,\n });\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n if(isAbs) {\n if(lineClampCount === lastLineClampCount) {\n countSize += isUpright ? item.height : item.width;\n maxSize = Math.max(maxSize, countSize);\n }\n // inline换行一定超过边界\n else {\n maxSize = Math.max(maxSize, isUpright ? h : w);\n countSize = isUpright ? (y - ly) : (x - lx);\n maxSize = Math.max(maxSize, countSize);\n }\n }\n }\n // 放不下处理之前的lineBox,并重新开头\n else {\n lineClampCount++;\n if(isUpright) {\n x = lineBoxManager.endX;\n y = ly;\n }\n else {\n x = lx;\n y = lineBoxManager.endY;\n }\n lineBoxManager.setNewLine();\n // 和inline/ib一样\n if(lineClamp && lineClampCount >= lineClamp) {\n item.__layoutNone();\n ignoreNextLine = true;\n let list = lineBoxManager.list;\n let lineBox = list[list.length - 1];\n backtrack(this, lineBoxManager, lineBox, isUpright ? h : w, 0, isUpright);\n return;\n }\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n isUpright,\n });\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n if(isAbs) {\n maxSize = Math.max(maxSize, countSize);\n // 此处发生换行撑满\n maxSize = Math.max(maxSize, isUpright ? h : w);\n // 新行重计\n countSize = isUpright ? item.height : item.width;\n maxSize = Math.max(maxSize, countSize);\n }\n }\n }\n }\n });\n // 结束后如果是以LineBox结尾,则需要设置y到这里,否则流布局中block会设置\n // 当以block换行时,新行是true,否则是false即结尾\n if(lineBoxManager.isEnd) {\n if(isUpright) {\n x = lineBoxManager.endX;\n }\n else {\n y = lineBoxManager.endY;\n }\n }\n let tw = 0, th = 0;\n // 根据书写模式、嵌套等条件计算宽高,只有父子同向才会主轴撑满\n if(fixedWidth || !isAbs && !isParentVertical && !isUpright) {\n tw = w;\n }\n else if(isAbs) {\n tw = isUpright ? (x - data.x) : maxSize;\n }\n else {\n tw = x - data.x;\n }\n if(fixedHeight || !isAbs && isParentVertical && isUpright) {\n th = h;\n }\n else if(isAbs) {\n th = isUpright ? maxSize : (y - data.y);\n }\n else {\n th = y - data.y;\n }\n this.__ioSize(tw, th);\n // 除了水平abs的虚拟外,都需要垂直对齐,因为img这种占位元素会影响lineBox高度,水平abs虚拟只需宽度\n if(!isAbs) {\n let spread = lineBoxManager.verticalAlign(isUpright);\n if(spread) {\n if(isUpright && !fixedWidth) {\n this.__resizeX(spread, null);\n }\n else if(!isUpright && !fixedHeight) {\n this.__resizeY(spread, null);\n }\n /**\n * parent以及parent的next无需处理,因为深度遍历后面还会进行,\n * 但自己的block需处理,因为对齐只处理了inline元素,忽略了block,\n * 同时由于block和inline区域可能不连续,每个增加的y不一样,\n * 需要按照每个不同区域来判断,区域是按索引次序依次增大的,\n * 只有在inline出现过后才开始生效,inline之前的block忽略\n */\n let count = 0, spreadList = lineBoxManager.spreadList;\n let isLastBlock = false, hasStart = false;\n flowChildren.forEach(item => {\n let isXom = item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom;\n let isBlock = isXom && ['block', 'flex'].indexOf(item.computedStyle[DISPLAY]) > -1;\n if(isBlock) {\n if(!hasStart) {\n return;\n }\n isLastBlock = true;\n if(isUpright) {\n item.__offsetX(spreadList[count], true, null);\n }\n else {\n item.__offsetY(spreadList[count], true, null);\n }\n }\n else {\n hasStart = true;\n if(isLastBlock) {\n count++;\n }\n isLastBlock = false;\n }\n });\n }\n // 非abs提前的虚拟布局,真实布局情况下最后为所有行内元素进行2个方向上的对齐\n if(!isColumn && !isRow) {\n if(['center', 'right'].indexOf(textAlign) > -1) {\n lineBoxManager.horizonAlign(isUpright ? th : tw, textAlign, isUpright);\n // 直接text需计算size\n flowChildren.forEach(item => {\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Text) {\n item.__inlineSize(isUpright);\n }\n });\n }\n // 所有inline计算size\n lineBoxManager.domList.forEach(item => {\n item.__inlineSize(isUpright ? th : tw, textAlign, isUpright);\n });\n this.__marginAuto(currentStyle, data, isUpright);\n }\n }\n }\n\n // 弹性布局时的计算位置\n __layoutFlex(data, isAbs, isColumn, isRow) {\n let { flowChildren, currentStyle, computedStyle, __flexLine } = this;\n let {\n [FLEX_DIRECTION]: flexDirection,\n [JUSTIFY_CONTENT]: justifyContent,\n [ALIGN_ITEMS]: alignItems,\n [LINE_CLAMP]: lineClamp,\n [FLEX_WRAP]: flexWrap,\n [ALIGN_CONTENT]: alignContent,\n [LINE_HEIGHT]: lineHeight,\n [TEXT_ALIGN]: textAlign,\n } = computedStyle;\n let { fixedWidth, fixedHeight, x, y, w, h, isParentVertical, isUpright } = this.__preLayout(data, false);\n if(isAbs && (fixedWidth && !isUpright || fixedHeight && isUpright)) {\n if(isUpright) {\n this.__ioSize(undefined, h);\n }\n else {\n this.__ioSize(w, undefined);\n }\n return;\n }\n if(isColumn && fixedHeight) {\n this.__ioSize(undefined, h);\n return;\n }\n if(isRow && fixedWidth) {\n this.__ioSize(w, undefined);\n return;\n }\n // 每次布局情况多行内容\n __flexLine.splice(0);\n // 只有>=1的正整数才有效\n lineClamp = lineClamp || 0;\n let lineClampCount = 0;\n let isDirectionRow = ['column', 'columnReverse'].indexOf(flexDirection) === -1;\n // 计算伸缩基数\n let growList = [];\n let shrinkList = [];\n let basisList = [];\n let maxList = [];\n let minList = [];\n let orderChildren = genOrderChildren(flowChildren);\n orderChildren.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let { currentStyle, computedStyle } = item;\n let [b, min, max] = item.__calBasis(isDirectionRow, isAbs, isColumn, { x, y, w, h }, true);\n let { [FLEX_GROW]: flexGrow, [FLEX_SHRINK]: flexShrink } = currentStyle;\n computedStyle[FLEX_BASIS] = b;\n growList.push(flexGrow);\n shrinkList.push(flexShrink);\n // 根据basis不同,计算方式不同\n basisList.push(b);\n maxList.push(max);\n minList.push(min);\n }\n // 文本\n else {\n growList.push(0);\n shrinkList.push(1);\n // 水平flex垂直文字和垂直flex水平文字都先假布局一次取结果,其它取文本最大最小宽度即可\n if(isDirectionRow && isUpright || !isDirectionRow && !isUpright) {\n let lineBoxManager = new LineBoxManager(x, y, lineHeight,\n isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle), isUpright);\n item.__layoutFlow({\n x,\n y,\n w,\n h,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n let n = isUpright ? item.width: item.height;\n basisList.push(n);\n maxList.push(n);\n minList.push(n);\n }\n // 水平flex水平文本和垂直flex垂直文本\n else {\n let cw = item.charWidth;\n let tw = item.textWidth;\n basisList.push(tw);\n maxList.push(tw);\n minList.push(cw);\n }\n }\n });\n let containerSize = isDirectionRow ? w : h;\n let isMultiLine = ['wrap', 'wrapReverse'].indexOf(flexWrap) > -1;\n /**\n * 判断是否需要分行,根据假设主尺寸来统计尺寸和计算,假设主尺寸是clamp(min_main_size, flex_base_size, max_main_size)\n * 当多行时,由于每行一定有最小限制,所以每行一般情况都不是shrink状态,\n * 但也有极端情况,比如一行只能放下1个元素时,且此元素比容器小,会是shrink\n */\n let line = [], sum = 0, hypotheticalList = [];\n basisList.forEach((item, i) => {\n let min = minList[i], max = maxList[i];\n let hypothetical;\n if(item < min) {\n hypothetical = min;\n }\n else if(item > max) {\n hypothetical = max;\n }\n else {\n hypothetical = item;\n }\n hypotheticalList.push(hypothetical);\n if(isMultiLine) {\n // 超过尺寸时,要防止sum为0即1个也会超过尺寸\n if(sum + hypothetical > containerSize) {\n if(sum) {\n __flexLine.push(line);\n line = [orderChildren[i]];\n sum = hypothetical;\n }\n else {\n line.push(orderChildren[i]);\n __flexLine.push(line);\n line = [];\n sum = 0;\n }\n }\n else {\n line.push(orderChildren[i]);\n sum += hypothetical;\n }\n }\n else {\n line.push(orderChildren[i]);\n }\n });\n if(line.length) {\n __flexLine.push(line);\n }\n let offset = 0, clone = { x, y, w, h };\n let maxCrossList = [], marginAutoCountList = [], freeList = [];\n __flexLine.forEach(item => {\n let length = item.length;\n let end = offset + length;\n let [x1, y1, maxCross, marginAutoCount, free] = this.__layoutFlexLine(clone, isDirectionRow, isAbs, isColumn, isRow, isUpright,\n containerSize, fixedWidth, fixedHeight, lineClamp, lineClampCount,\n lineHeight, computedStyle, justifyContent, alignItems,\n orderChildren.slice(offset, end), item, textAlign,\n growList.slice(offset, end), shrinkList.slice(offset, end), basisList.slice(offset, end),\n hypotheticalList.slice(offset, end), minList.slice(offset, end), maxList.slice(offset, end));\n // 下一行/列更新坐标\n if(isDirectionRow) {\n clone.y = y1;\n }\n else {\n clone.x = x1;\n }\n x = Math.max(x, x1);\n y = Math.max(y, y1);\n maxCrossList.push(maxCross);\n marginAutoCountList.push(marginAutoCount);\n freeList.push(free);\n offset += length;\n });\n // abs预布局只计算宽度无需对齐\n if(isAbs) {\n let max = 0;\n __flexLine.forEach(line => {\n let count = 0;\n line.forEach(item => {\n if(isDirectionRow) {\n count += isUpright ? item.outerHeight : item.outerWidth;\n }\n else {\n count = Math.max(count, isUpright ? item.outerHeight : item.outerWidth);\n }\n // 文字发生换行无论row/column一定放不下需占满容器尺寸\n if(item instanceof Text) {\n if(isUpright) {\n if(item.textWidth > h) {\n max = Math.max(max, h);\n }\n }\n else {\n if(item.textWidth > w) {\n max = Math.max(max, w);\n }\n }\n }\n });\n max = Math.max(max, count);\n });\n if(isUpright) {\n this.__ioSize(undefined, max);\n }\n else {\n this.__ioSize(max, undefined);\n }\n return;\n }\n // 同block计算\n let tw = 0, th = 0;\n if(fixedWidth || !isAbs && !isParentVertical && !isUpright) {\n tw = w;\n }\n else {\n tw = x - data.x;\n }\n if(fixedHeight || !isAbs && isParentVertical && isUpright) {\n th = h;\n }\n else {\n th = y - data.y;\n }\n this.__ioSize(tw, th);\n if(isColumn || isRow) {\n return;\n }\n // flexDirection当有reverse时交换每line的主轴序\n if(flexDirection === 'rowReverse') {\n __flexLine.forEach(line => {\n line.forEach(item => {\n // 一个矩形内的子矩形进行镜像移动,用外w减去内w再减去开头空白的2倍即可\n let diff = tw - item.outerWidth - (item.x - data.x) * 2;\n if(diff) {\n item.__offsetX(diff, true, null);\n }\n });\n });\n }\n else if(flexDirection === 'columnReverse') {\n __flexLine.forEach(line => {\n line.forEach(item => {\n // 一个矩形内的子矩形进行镜像移动,用外w减去内w再减去开头空白的2倍即可\n let diff = th - item.outerHeight - (item.y - data.y) * 2;\n if(diff) {\n item.__offsetY(diff, true, null);\n }\n });\n });\n }\n // wrap-reverse且多轴线时交换轴线序,需要2行及以上才行\n let length = __flexLine.length;\n if(flexWrap === 'wrapReverse' && length > 1) {\n let crossSum = 0, crossSumList = [];\n maxCrossList.forEach(item => {\n crossSumList.push(crossSum);\n crossSum += item;\n });\n let count = 0;\n for(let i = length - 1; i >= 0; i--) {\n let line = __flexLine[i];\n let source = crossSumList[i];\n let diff = count - source;\n if(diff) {\n line.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(diff, true, null);\n }\n else {\n item.__offsetX(diff, true, null);\n }\n });\n }\n count += maxCrossList[i];\n }\n __flexLine.reverse();\n }\n // 侧轴对齐分flexLine做,要考虑整体的alignContent的stretch和每行的alignItems的stretch\n // 先做整体的,得出交叉轴空白再均分给每一行做单行的,整体的只有1行忽略\n let per;\n if(length > 1 && (fixedHeight && isDirectionRow || !isDirectionRow)) {\n let diff = isDirectionRow ? th - (y - data.y) : tw - (x - data.x);\n // 有空余时才进行对齐\n if(diff > 0) {\n if(alignContent === 'center') {\n let per = diff * 0.5;\n orderChildren.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(per, true, null);\n }\n else {\n item.__offsetX(per, true, null);\n }\n });\n }\n else if(alignContent === 'flexStart') {}\n else if(alignContent === 'flexEnd') {\n orderChildren.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(diff, true, null);\n }\n else {\n item.__offsetX(diff, true, null);\n }\n });\n }\n else if(alignContent === 'spaceBetween') {\n let between = diff / (length - 1);\n // 除了第1行其它进行偏移\n __flexLine.forEach((item, i) => {\n if(i) {\n item.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(between, true, null);\n }\n else {\n item.__offsetX(between, true, null);\n }\n });\n }\n });\n }\n else if(alignContent === 'spaceAround') {\n let around = diff / (length + 1);\n __flexLine.forEach((item, i) => {\n item.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(around * (i + 1), true, null);\n }\n else {\n item.__offsetX(around * (i + 1), true, null);\n }\n });\n });\n }\n // 默认stretch,每个flexLine进行扩充\n else {\n per = diff / length;\n // 因为每行都cross扩充了per,所有除了第1行其它进行偏移\n __flexLine.forEach((item, i) => {\n if(i) {\n item.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(per * i, true, null);\n }\n else {\n item.__offsetX(per * i, true, null);\n }\n });\n }\n });\n }\n }\n }\n // 每行再进行main/cross对齐,在alignContent为stretch时计算每行的高度\n if(!isColumn && !isRow) {\n if(length > 1) {\n __flexLine.forEach((item, i) => {\n let maxCross = maxCrossList[i];\n if(per) {\n maxCross += per;\n }\n this.__flexAlign(item, alignItems, justifyContent, isDirectionRow, maxCross, marginAutoCountList[i], freeList[i]);\n });\n }\n else if(length) {\n let maxCross = isDirectionRow ? th : tw;\n this.__flexAlign(__flexLine[0], alignItems, justifyContent, isDirectionRow, maxCross, marginAutoCountList[0], freeList[0]);\n }\n this.__marginAuto(currentStyle, data, isUpright);\n }\n }\n\n /**\n * 计算获取子元素的b/min/max完毕后,尝试进行flex每行布局\n * https://www.w3.org/TR/css-flexbox-1/#layout-algorithm\n * 假想主尺寸,其为clamp(min_main_size, flex_base_size, max_main_size)\n * 随后按算法一步步来 https://zhuanlan.zhihu.com/p/354567655\n * 规范没提到mpb,item的要计算,孙子的只考虑绝对值\n * 先收集basis和假设主尺寸\n */\n __layoutFlexLine(data, isDirectionRow, isAbs, isColumn, isRow, isUpright,\n containerSize, fixedWidth, fixedHeight, lineClamp, lineClampCount,\n lineHeight, computedStyle, justifyContent, alignItems,\n orderChildren, flexLine, textAlign,\n growList, shrinkList, basisList, hypotheticalList, minList, maxList) {\n let { x, y, w, h } = data;\n let hypotheticalSum = 0;\n hypotheticalList.forEach(item => {\n hypotheticalSum += item;\n });\n // 根据假设尺寸确定使用grow还是shrink,冻结非弹性项并设置target尺寸,确定剩余未冻结数量\n let isOverflow = hypotheticalSum >= containerSize;\n let targetMainList = [];\n basisList.forEach((item, i) => {\n if(isOverflow) {\n if(!shrinkList[i] || (basisList[i] < hypotheticalList[i])) {\n targetMainList[i] = hypotheticalList[i];\n }\n }\n else {\n if(!growList[i] || (basisList[i] > hypotheticalList[i])) {\n targetMainList[i] = hypotheticalList[i];\n }\n }\n });\n // 初始可用空间,冻结使用确定的target尺寸,未冻结使用假想\n let free = 0;\n basisList.forEach((item, i) => {\n if(targetMainList[i] !== undefined) {\n free += targetMainList[i];\n }\n else {\n free += item;\n }\n });\n let total = Infinity;\n if(isDirectionRow) {\n total = w;\n }\n else if(fixedHeight) {\n total = h;\n }\n else {\n total = free;\n }\n free = Math.abs(total - free); // 压缩也使用正值\n let lessOne = 0;\n // 循环,文档算法不够简练,其合并了grow和shrink,实际拆开写更简单\n let factorSum = 0;\n if(isOverflow) {\n // 计算真正的因子占比,同时得出缩小尺寸数值\n // 还需判断每个item收缩不能 {\n if(targetMainList[i] === undefined) { // 冻结项的目标主尺寸有值,因子无值或为0\n factorSum += item;\n return item;\n }\n });\n while(true) {\n // 都冻结了\n if(factorSum === 0) {\n break;\n }\n if(factorSum < 1) {\n lessOne += free * (1 - factorSum);\n free *= factorSum;\n }\n let needReset, factorSum2 = 0, count1 = 0, count2 = 0;\n factorList.forEach((item, i) => {\n if(item) {\n let r = item / factorSum;\n let s = r * free; // 需要收缩的尺寸\n let n = basisList[i] - s; // 实际尺寸\n // 比min还小设置为min,同时设0冻结剔除\n if(n < minList[i]) {\n targetMainList[i] = minList[i];\n factorList[i] = 0;\n needReset = true;\n count1 += basisList[i] - minList[i]; // 超出的尺寸也要减去实际收缩的尺寸,最终从free里减去\n }\n // else if(n > maxList[i]) {\n // targetMainList[i] = maxList[i];\n // factorList[i] = 0;\n // needReset = true;\n // count1 += maxList[i];\n // }\n // 先按照没有超限的设置,正常情况直接跳出,如果有超限,记录sum2给下轮赋值重新计算\n else {\n targetMainList[i] = n;\n factorSum2 += item;\n count2 += n;\n }\n }\n });\n if(!needReset) {\n free -= count2;\n break;\n }\n free -= count1;\n factorSum = factorSum2;\n }\n }\n else {\n let factorList = growList.map((item, i) => {\n if(targetMainList[i] === undefined) {\n factorSum += item;\n return item;\n }\n });\n while(true) {\n if(factorSum === 0) {\n break;\n }\n if(factorSum < 1) {\n lessOne += free * (1 - factorSum);\n free *= factorSum;\n }\n let needReset, factorSum2 = 0, count1 = 0, count2 = 0;\n factorList.forEach((item, i) => {\n if(item) {\n let r = item / factorSum;\n let s = r * free; // 需要扩展的尺寸\n let n = basisList[i] + s; // 实际尺寸\n // 比min还小设置为min,同时设0剔除\n if(n < minList[i]) {\n targetMainList[i] = minList[i];\n factorList[i] = 0;\n needReset = true;\n count1 += basisList[i] - minList[i];\n }\n // else if(n > maxList[i]) {\n // targetMainList[i] = maxList[i];\n // factorList[i] = 0;\n // needReset = true;\n // count1 += maxList[i];\n // }\n // 先按照没有超限的设置,正常情况直接跳出,如果有超限,记录sum2给下轮赋值重新计算\n else {\n targetMainList[i] = n;\n factorSum2 += item;\n count2 += n;\n }\n }\n });\n if(!needReset) {\n free -= count2;\n break;\n }\n free -= count1;\n factorSum = factorSum2;\n }\n }\n let maxCross = 0;\n let lbmList = [];\n let marginAutoCount = 0;\n orderChildren.forEach((item, i) => {\n let main = targetMainList[i];\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n if(isDirectionRow) {\n item.__layoutFlow({\n x,\n y,\n w: main,\n h,\n w3: main, // w3假设固定宽度,忽略原始style中的设置\n isUpright,\n }, isAbs, isColumn, isRow);\n }\n else {\n let {\n [ALIGN_SELF]: alignSelf,\n [WIDTH]: width,\n } = item.currentStyle;\n // column的child真布局时,如果是stretch宽度,则可以直接生成animateRecord,否则自适应调整后才进行\n if(!isAbs && !isColumn && !isRow) {\n let needGenAr;\n if(width.u !== AUTO || alignSelf === 'stretch') {\n needGenAr = true;\n }\n else if(alignSelf === 'auto' && alignItems === 'stretch') {\n needGenAr = true;\n }\n if(needGenAr) {\n item.__layoutFlow({\n x,\n y,\n w,\n h: main,\n h3: main, // 同w2\n isUpright,\n }, isAbs, isColumn, isRow);\n }\n else {\n item.__layoutFlow({\n x,\n y,\n w,\n h: main,\n h3: main, // 同w2\n isUpright,\n }, true, isColumn, isRow);\n item.__layoutFlow({\n x,\n y,\n w,\n w3: item.outerWidth,\n h: main,\n h3: main, // 同w2\n isUpright,\n }, isAbs, isColumn, isRow);\n }\n }\n else {\n item.__layoutFlow({\n x,\n y,\n w,\n h: main,\n h3: main, // 同w2\n isUpright,\n }, isAbs, isColumn, isRow);\n }\n }\n // 记录主轴是否有margin为auto的情况\n if(!isAbs && !isColumn && !isRow) {\n let currentStyle = item.currentStyle;\n if(isDirectionRow) {\n if(currentStyle[MARGIN_LEFT].u === AUTO) {\n marginAutoCount++;\n }\n if(currentStyle[MARGIN_RIGHT].u === AUTO) {\n marginAutoCount++;\n }\n }\n else {\n if(currentStyle[MARGIN_TOP].u === AUTO) {\n marginAutoCount++;\n }\n if(currentStyle[MARGIN_BOTTOM].u === AUTO) {\n marginAutoCount++;\n }\n }\n }\n }\n // 文字\n else {\n let lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight,\n isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle), isUpright);\n lbmList.push(lineBoxManager);\n item.__layoutFlow({\n x,\n y,\n w: isDirectionRow ? main : w,\n h: isDirectionRow ? h : main,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n isUpright,\n });\n }\n if(isDirectionRow) {\n x += item.outerWidth;\n maxCross = Math.max(maxCross, item.outerHeight);\n }\n else {\n y += item.outerHeight;\n maxCross = Math.max(maxCross, item.outerWidth);\n }\n });\n if(isDirectionRow) {\n y += maxCross;\n }\n else {\n x += maxCross;\n }\n // flex的直接text对齐比较特殊\n if(!isAbs && !isColumn && !isRow && ['center', 'right'].indexOf(textAlign) > -1) {\n lbmList.forEach(item => {\n item.horizonAlign(isUpright? item.height : item.width, textAlign, isUpright);\n })\n }\n return [x, y, maxCross, marginAutoCount, isOverflow ? 0 : Math.max(0, free + lessOne)];\n }\n\n // 每个flexLine的主轴侧轴对齐\n __flexAlign(line, alignItems, justifyContent, isDirectionRow, maxCross, marginAutoCount, free) {\n let baseline = 0;\n line.forEach(item => {\n baseline = Math.max(baseline, item.firstBaseline);\n });\n // 先主轴对齐方式,需要考虑margin,如果有auto则优先于justifyContent\n let len = line.length;\n if(marginAutoCount) {\n // 类似于space-between,空白均分于auto,两边都有就是2份,只有1边是1份\n let count = 0, per = free / marginAutoCount;\n for(let i = 0; i < len; i++) {\n let child = line[i];\n let currentStyle = child.currentStyle;\n if(isDirectionRow) {\n if(currentStyle[MARGIN_LEFT].u === AUTO) {\n count += per;\n child.__offsetX(count, true, null);\n }\n else if(count) {\n child.__offsetX(count, true, null);\n }\n if(currentStyle[MARGIN_RIGHT].u === AUTO) {\n count += per;\n }\n }\n else {\n if(currentStyle[MARGIN_TOP].u === AUTO) {\n count += per;\n child.__offsetY(count, true, null);\n }\n else if(count) {\n child.__offsetY(count, true, null);\n }\n if(currentStyle[MARGIN_BOTTOM].u === AUTO) {\n count += per;\n }\n }\n }\n }\n else {\n if(justifyContent === 'flexEnd') {\n for(let i = 0; i < len; i++) {\n let child = line[i];\n isDirectionRow ? child.__offsetX(free, true, null) : child.__offsetY(free, true, null);\n }\n }\n else if(justifyContent === 'center') {\n let center = free * 0.5;\n for(let i = 0; i < len; i++) {\n let child = line[i];\n isDirectionRow ? child.__offsetX(center, true, null) : child.__offsetY(center, true, null);\n }\n }\n else if(justifyContent === 'spaceBetween') {\n let between = free / (len - 1);\n for(let i = 1; i < len; i++) {\n let child = line[i];\n isDirectionRow ? child.__offsetX(between * i, true, null) : child.__offsetY(between * i, true, null);\n }\n }\n else if(justifyContent === 'spaceAround') {\n let around = free * 0.5 / len;\n for(let i = 0; i < len; i++) {\n let child = line[i];\n isDirectionRow ? child.__offsetX(around * (i * 2 + 1), true, null) : child.__offsetY(around * (i * 2 + 1), true, null);\n }\n }\n else if(justifyContent === 'spaceEvenly') {\n let around = free / (len + 1);\n for(let i = 0; i < len; i++) {\n let child = line[i];\n isDirectionRow ? child.__offsetX(around * (i + 1), true, null) : child.__offsetY(around * (i + 1), true, null);\n }\n }\n }\n // 再侧轴\n line.forEach(item => {\n let { currentStyle: { [ALIGN_SELF]: alignSelf } } = item;\n if(isDirectionRow) {\n if(alignSelf === 'flexStart') {}\n else if(alignSelf === 'flexEnd') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff, true, null);\n }\n }\n else if(alignSelf === 'center') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff * 0.5, true, null);\n }\n }\n else if(alignSelf === 'stretch') {\n let { computedStyle, currentStyle: { [HEIGHT]: height } } = item;\n let {\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n } = computedStyle;\n if(height.u === AUTO) {\n let old = item.height;\n let v = item.__height = computedStyle[HEIGHT] = maxCross - marginTop - marginBottom - paddingTop - paddingBottom - borderTopWidth - borderBottomWidth;\n let d = v - old;\n item.__y4 += d;\n item.__y5 += d;\n item.__y6 += d;\n item.__height += d;\n item.__clientHeight += d;\n item.__offsetHeight += d;\n item.__outerHeight += d;\n }\n }\n else if(alignSelf === 'baseline') {\n let diff = baseline - item.firstBaseline;\n if(diff !== 0) {\n item.__offsetY(diff, true, null);\n }\n }\n // 默认auto,取alignItems\n else {\n if(alignItems === 'flexStart') {}\n else if(alignItems === 'center') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff * 0.5, true, null);\n }\n }\n else if(alignItems === 'flexEnd') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff, true, null);\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseline - item.firstBaseline;\n if(diff !== 0) {\n item.__offsetY(diff, true, null);\n }\n }\n // 默认stretch\n else {\n let { computedStyle, currentStyle: {\n [DISPLAY]: display,\n [FLEX_DIRECTION]: flexDirection,\n [HEIGHT]: height,\n } } = item;\n // row的孩子还是flex且column且不定高时,如果高度<侧轴拉伸高度则重新布局\n if(isDirectionRow && display === 'flex' && flexDirection === 'column' && height.u === AUTO && item.outerHeight < maxCross) {\n item.__layoutFlow(Object.assign(item.__layoutData, { h3: maxCross }));\n }\n let {\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n } = computedStyle;\n if(height.u === AUTO) {\n let old = item.height;\n let v = maxCross - marginTop - marginBottom - paddingTop - paddingBottom - borderTopWidth - borderBottomWidth;\n let d = v - old;\n item.__y4 += d;\n item.__y5 += d;\n item.__y6 += d;\n item.__height += d;\n item.__clientHeight += d;\n item.__offsetHeight += d;\n item.__outerHeight += d;\n }\n }\n }\n }\n // column\n else {\n if(alignSelf === 'flexStart') {}\n else if(alignSelf === 'flexEnd') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff, true, null);\n }\n }\n else if(alignSelf === 'center') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff * 0.5, true, null);\n }\n }\n else if(alignSelf === 'stretch') {\n let { computedStyle, currentStyle: { [WIDTH]: width } } = item;\n let {\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_LEFT]: paddingLeft,\n } = computedStyle;\n if(width.u === AUTO) {\n let old = item.width;\n let v = item.__width = computedStyle[WIDTH] = maxCross - marginLeft - marginRight - paddingLeft - paddingRight - borderRightWidth - borderLeftWidth;\n let d = v - old;\n item.__x4 += d;\n item.__x5 += d;\n item.__x6 += d;\n item.__width += d;\n item.__clientWidth += d;\n item.__offsetWidth += d;\n item.__outerWidth += d;\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseline - item.firstBaseline;\n if(diff !== 0) {\n item.__offsetX(diff, true, null);\n }\n }\n // 默认auto,取alignItems\n else {\n if(alignItems === 'flexStart') {}\n else if(alignItems === 'center') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff * 0.5, true, null);\n }\n }\n else if(alignItems === 'flexEnd') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff, true, null);\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseline - item.firstBaseline;\n if(diff !== 0) {\n item.__offsetX(diff, true, null);\n }\n }\n // 默认stretch\n else {\n let { computedStyle, currentStyle: {\n [WIDTH]: width,\n } } = item;\n let {\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_LEFT]: paddingLeft,\n } = computedStyle;\n if(width.u === AUTO) {\n let old = item.width;\n let v = item.__width = computedStyle[WIDTH] = maxCross - marginLeft - marginRight - paddingLeft - paddingRight - borderRightWidth - borderLeftWidth;\n let d = v - old;\n item.__x4 += d;\n item.__x5 += d;\n item.__x6 += d;\n item.__width += d;\n item.__clientWidth += d;\n item.__offsetWidth += d;\n item.__outerWidth += d;\n }\n }\n }\n }\n });\n }\n\n /**\n * inline比较特殊,先简单顶部对齐,后续还需根据vertical和lineHeight计算y偏移\n * inlineBlock复用逻辑,可以设置w/h,在混排时表现不同,inlineBlock换行限制在规定的矩形内,\n * 且ib会在没设置width且换行的时候撑满上一行,即便内部尺寸没抵达边界\n * 而inline换行则会从父容器start处开始,且首尾可能占用矩形不同\n * 嵌套inline情况十分复杂,尾部mpb空白可能产生叠加情况,因此endSpace表示自身,\n * 然后根据是否在最后一个元素进行叠加父元素的,多层嵌套则多层尾部叠加,均以最后一个元素为依据判断\n * Text获取这个叠加的endSpace值即可,无需感知是否最后一个,外层(此处)进行逻辑封装\n * @param data\n * @param isAbs\n * @param isColumn\n * @param isRow\n * @param isInline\n * @private\n */\n __layoutInline(data, isAbs, isColumn, isRow, isInline) {\n let { flowChildren, currentStyle, computedStyle } = this;\n let {\n [TEXT_ALIGN]: textAlign,\n [WHITE_SPACE]: whiteSpace,\n [LINE_CLAMP]: lineClamp,\n [LINE_HEIGHT]: lineHeight,\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n } = computedStyle;\n let lineClampCount = data.lineClampCount || 0;\n let { fixedWidth, fixedHeight, x, y, w, h, lx, ly,\n lineBoxManager, endSpace, selfEndSpace, isUpright } = this.__preLayout(data, isInline);\n // abs虚拟布局需预知width,固定可提前返回\n if(isAbs && (fixedWidth && !isUpright || fixedHeight && isUpright)) {\n if(isUpright) {\n this.__ioSize(undefined, h);\n }\n else {\n this.__ioSize(w, undefined);\n }\n return lineClampCount;\n }\n let {\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n if(isInline && !this.__isRealInline()) {\n isInline = false;\n }\n // inline-block假布局提前结束\n if(!isInline) {\n if(isColumn && fixedHeight) {\n this.__ioSize(undefined, h);\n return lineClampCount;\n }\n if(isRow && fixedWidth) {\n this.__ioSize(w, undefined);\n return lineClampCount;\n }\n }\n // 只有inline的孩子需要考虑换行后从行首开始,而ib不需要,因此重置行首标识lx为x,末尾空白为0\n // 而inline的LineBoxManager复用最近非inline父dom的,ib需要重新生成,末尾空白叠加\n if(isInline) {\n this.__isInline = true;\n this.__lineBoxManager = lineBoxManager;\n let baseline = isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle);\n // 特殊inline调用,有内容的话(如左右mbp),默认生成一个lineBox,即便是空,也要形成占位,只有开头时需要\n if(isUpright\n && (marginTop || marginBottom || paddingTop || paddingBottom || borderTopWidth || borderBottomWidth)\n || !isUpright\n && (marginLeft || marginRight || paddingLeft || paddingRight || borderLeftWidth || borderRightWidth)) {\n if(lineBoxManager.isNewLine) {\n lineBoxManager.genLineBoxByInlineIfNewLine(x, y, lineHeight, baseline);\n }\n else {\n lineBoxManager.setLbByInlineIfNotNewLine(lineHeight, baseline);\n }\n }\n else {\n lineBoxManager.setLbByInlineIfNotNewLine(lineHeight, baseline);\n }\n lineClamp = data.lineClamp || 0;\n }\n else {\n lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight,\n isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle), isUpright);\n lx = x;\n ly = y;\n endSpace = selfEndSpace = lineClampCount = 0;\n }\n // 存LineBox里的内容列表专用,布局过程中由lineBoxManager存入,递归情况每个inline节点都保存contentBox\n if(isInline) {\n this.contentBoxList.splice(0);\n lineBoxManager.pushContentBoxList(this);\n }\n // ib的bp是自己,inline是最近的非inline\n let bp = this;\n while(bp.computedStyle[DISPLAY] === 'inline') {\n bp = bp.domParent;\n }\n let {\n [OVERFLOW]: overflow,\n } = bp.computedStyle;\n let isIbFull = false, isUprightIbFull = false; // ib时不限定w情况下发生折行则撑满行,即便内容没有撑满边界\n let length = flowChildren.length;\n let ignoreNextLine = false; // lineClamp超过后,后面的均忽略并置none,注意ib内部自己统计类似block\n let ignoreNextWrap = false; // whiteSpace单行超过后,后面的均忽略并置none,注意和block不一样不隔断\n let hasAddEndSpace; // 最后一行生效,只加1次防重复\n flowChildren.forEach((item, i) => {\n // 和block不太一样可以提前判断,因为不可能包含block隔断区域了\n if(ignoreNextLine || ignoreNextWrap) {\n item.__layoutNone();\n return;\n }\n let isXom = item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom;\n if(isXom) {\n item.__computeReflow(); // writing-mode可能会造成inline改变为ib\n }\n let isInline2 = isXom && item.computedStyle[DISPLAY] === 'inline';\n let isInlineBlock2 = isXom && item.computedStyle[DISPLAY] === 'inlineBlock';\n let isRealInline = isInline2 && item.__isRealInline();\n // 最后一个元素会产生最后一行,叠加父元素的尾部mpb,注意只执行一次防止重复叠加\n let isEnd = isInline && !hasAddEndSpace\n && (whiteSpace === 'nowrap' || (!isXom && i === length - 1)\n || ((lineClamp && i === length - 1) || lineClampCount === lineClamp - 1));\n if(isEnd) {\n hasAddEndSpace = true;\n endSpace += selfEndSpace;\n }\n let lastLineClampCount = lineClampCount;\n if(isXom) {\n if(!isInline2 && !isInlineBlock2) {\n item.currentStyle[DISPLAY] = item.computedStyle[DISPLAY] = 'inlineBlock';\n isInlineBlock2 = true;\n inject.warn('Inline can not contain block/flex');\n }\n // x开头或者nowrap单行,不用考虑是否放得下直接放,因为有beginSpace所以要多判断i为0\n if((isUpright && y === ly) || (!isUpright && x === lx) || !i || whiteSpace === 'nowrap') {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n // 同block布局\n if(item.__isIbFull || item.__isUprightIbFull) {\n lineClampCount++;\n }\n if(item.__isIbFull && whiteSpace !== 'nowrap') {\n if(isUpright && h.u === AUTO) {\n isUprightIbFull = true;\n }\n else if(!isUpright && w.u === AUTO) {\n isIbFull = true;\n }\n lineBoxManager.addItem(item, true);\n if(isUpright) {\n x += item.outerWidth;\n y = ly;\n }\n else {\n x = lx;\n y += item.outerHeight;\n }\n lineBoxManager.setNotEnd();\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中,以计算宽度\n else {\n (isInlineBlock2 || !isRealInline) && lineBoxManager.addItem(item, false);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n if(!isAbs && overflow === 'hidden' && whiteSpace === 'nowrap'\n && ((isUpright && y - ly > h + (1e-10)) || (!isUpright && x - lx > w + (1e-10))\n || lineClampCount > lastLineClampCount)) {\n ignoreNextWrap = true;\n }\n else if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n }\n else {\n // 不换行继续排,换行非开头先尝试是否放得下,结尾要考虑mpb因此减去endSpace\n let free = item.__tryLayInline(isUpright ? (h + ly - y - endSpace) : (w + lx - x - endSpace), isUpright ? h : w, isUpright);\n // 放得下继续\n if(free >= (-1e-10)) {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n // ib放得下要么内部没有折行,要么声明了width限制,都需手动存入当前lb\n (isInlineBlock2 || !isRealInline) && lineBoxManager.addItem(item, false);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n }\n // 放不下处理之前的lineBox,并重新开头\n else {\n lineClampCount++;\n if(isUpright) {\n x = lineBoxManager.endX;\n y = ly;\n }\n else {\n x = lx;\n y = lineBoxManager.endY;\n }\n lineBoxManager.setNewLine();\n // 可能超行了,无需继续,并且进行回溯\n if(lineClamp && lineClampCount >= lineClamp) {\n item.__layoutNone();\n ignoreNextLine = true;\n let list = lineBoxManager.list;\n let lineBox = list[list.length - 1];\n backtrack(bp, lineBoxManager, lineBox, w, endSpace, isUpright);\n return;\n }\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n // 重新开头的ib和上面开头处一样逻辑\n if(item.__isIbFull || item.__isUprightIbFull) {\n lineBoxManager.addItem(item, true);\n if(isUpright) {\n x += item.outerWidth;\n y = ly;\n }\n else {\n x = lx;\n y += item.outerHeight;\n }\n lineBoxManager.setNotEnd();\n lineClampCount++;\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中\n else {\n (isInlineBlock2 || !isRealInline) && lineBoxManager.addItem(item, false);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n }\n }\n }\n // inline里的其它只有文本,可能开始紧跟着之前的x,也可能换行后从lx行头开始\n // 紧跟着x可能出现在前面有节点换行后第2行,此时不一定放得下,因此不能作为判断依据,开头仅有lx\n else {\n let n = lineBoxManager.size;\n // i为0时强制不换行\n if((isUpright && y === ly) || (!isUpright && x === lx) || !i || whiteSpace === 'nowrap') {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n // ib情况发生折行,且非定宽\n if(!isInline && (lineBoxManager.size - n) > 1) {\n if(height.u === AUTO && isUpright) {\n isUprightIbFull = true;\n }\n if(width.u === AUTO && !isUpright) {\n isIbFull = true;\n }\n }\n if(!isAbs && overflow === 'hidden' && whiteSpace === 'nowrap'\n && ((isUpright && y - ly > h + (1e-10)) || (!isUpright && x - lx > w + (1e-10))\n || lineClampCount > lastLineClampCount)) {\n ignoreNextWrap = true;\n }\n else if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n }\n else {\n // 非开头先尝试是否放得下,如果放得下再看是否end,加end且只有1个字时放不下要换行,否则可以放,换行由text内部做\n let free = item.__tryLayInline(isUpright ? (h + ly - y - endSpace) : (w + lx - x - endSpace));\n // 放得下继续\n if(free >= (-1e-10)) {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n // 这里ib放得下一定是要么没换行要么固定宽度,所以无需判断isIbFull\n }\n // 放不下处理之前的lineBox,并重新开头\n else {\n lineClampCount++;\n if(isUpright) {\n x = lineBoxManager.endX;\n y = ly;\n }\n else {\n x = lx;\n y = lineBoxManager.endY;\n }\n lineBoxManager.setNewLine();\n // 可能超行了,无需继续,并且进行回溯\n if(lineClamp && lineClampCount >= lineClamp) {\n item.__layoutNone();\n ignoreNextLine = true;\n let list = lineBoxManager.list;\n let lineBox = list[list.length - 1];\n backtrack(bp, lineBoxManager, lineBox, w, endSpace, isUpright);\n return;\n }\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n // ib情况发生折行\n if(!isInline && (lineBoxManager.size - n) > 1) {\n if(height.u === AUTO && isUpright) {\n isUprightIbFull = true;\n }\n if(width.u === AUTO && !isUpright) {\n isIbFull = true;\n }\n }\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n }\n }\n }\n });\n // 同block结尾,不过这里一定是lineBox结束,无需判断\n if(isUpright) {\n x = lineBoxManager.endX;\n }\n else {\n y = lineBoxManager.endY;\n }\n // 标识ib情况同block一样占满行\n this.__isIbFull = isIbFull;\n this.__isUprightIbFull = isUprightIbFull;\n // 元素的width在固定情况或者ibFull情况已被计算出来,否则为最大延展尺寸,inline没有固定尺寸概念\n let tw, th;\n if(isInline) {\n // inline最后的x要算上右侧mpb,为next行元素提供x坐标基准,同时其尺寸计算比较特殊\n if(selfEndSpace) {\n if(isUpright) {\n lineBoxManager.addY(selfEndSpace);\n }\n else {\n lineBoxManager.addX(selfEndSpace);\n }\n }\n // 如果没有内容,空白还要加上开头即左侧mpb\n if(!flowChildren.length) {\n let {\n [MARGIN_TOP]: marginTop,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = computedStyle;\n if(isUpright) {\n lineBoxManager.addY(marginTop + paddingTop + borderTopWidth);\n }\n else {\n lineBoxManager.addX(marginLeft + paddingLeft + borderLeftWidth);\n }\n }\n // 结束出栈contentBox,递归情况结束子inline获取contentBox,父inline继续\n lineBoxManager.popContentBoxList();\n // abs非固定w时预计算,本来是最近非inline父层统一计算,但在abs时不算,这里无视textAlign默认left\n if(isAbs) {\n this.__inlineSize(0, 'left', isUpright);\n }\n }\n else {\n // ib在满时很特殊,取最大值,可能w本身很小不足排下1个字符,此时要用max\n let max = lineBoxManager.max - (isUpright ? data.y : data.x);\n if(isUpright) {\n tw = fixedWidth ? w : x - data.x;\n th = fixedHeight ? h : (isIbFull ? Math.max(h, max) : max);\n }\n else {\n tw = fixedWidth ? w : (isIbFull ? Math.max(w, max) : max);\n th = fixedHeight ? h : y - data.y;\n }\n this.__ioSize(tw, th);\n }\n // 非abs提前虚拟布局,真实布局情况下最后为所有行内元素进行2个方向上的对齐,inline会被父级调用这里只看ib\n if(!isAbs && !isInline) {\n let spread = lineBoxManager.verticalAlign(isUpright);\n if(spread) {\n if(isUpright && !fixedWidth) {\n this.__resizeX(spread, null);\n }\n else if(!isUpright && !fixedHeight) {\n this.__resizeY(spread, null);\n }\n }\n if(!isColumn && !isRow) {\n if(['center', 'right'].indexOf(textAlign) > -1) {\n lineBoxManager.horizonAlign(isUpright ? th : tw, textAlign, isUpright);\n // 直接text需计算size\n flowChildren.forEach(item => {\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Text) {\n item.__inlineSize(isUpright);\n }\n });\n }\n // block的所有inline计算size\n lineBoxManager.domList.forEach(item => {\n item.__inlineSize(isUpright ? th : tw, textAlign, isUpright);\n });\n }\n }\n // inlineBlock新开上下文,但父级block遇到要处理换行\n return lineClampCount;\n }\n\n /**\n * inline的尺寸计算非常特殊,并非一个矩形区域,而是由字体行高结合节点下多个LineBox中的内容决定,\n * 且这个尺寸又并非真实LineBox中的内容直接合并计算而来,比如包含了个更大尺寸的ib却不会计入\n * 具体方法为遍历持有的LineBox下的内容,x取两侧极值,同时首尾要考虑mpb,y值取上下极值,同样首尾考虑mpb\n * 首尾行LineBox可能不是不是占满一行,比如前后都有同行inline的情况,非首尾行则肯定占满\n * 绘制内容(如背景色)的区域也很特殊,每行LineBox根据lineHeight对齐baseline得来,并非LineBox全部\n * 当LineBox只有直属Text时如果font没有lineGap则等价于全部,如有则需减去\n * 另外其client/offset/outer的w/h尺寸计算也很特殊,皆因首尾x方向的mpb导致\n * @private\n */\n __inlineSize(size, textAlign, isUpright) {\n let { contentBoxList, computedStyle } = this;\n let {\n [DISPLAY]: display,\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n // 可能因为Ellipsis回溯变成none\n if(display === 'none') {\n return;\n }\n // x/clientX/offsetX/outerX\n let maxX, maxY, minX, minY, maxCX, maxCY, minCX, minCY, maxFX, maxFY, minFX, minFY, maxOX, maxOY, minOX, minOY;\n let length = contentBoxList.length;\n if(length) {\n // 遍历contentBox,里面存的是LineBox内容,根据父LineBox引用判断是否换行\n contentBoxList.forEach((item, i) => {\n // 非第一个除了minY不用看其它都要,minX是换行导致,而maxX在最后一个要考虑右侧mpb,中间的无需考虑嵌套inline的mpb\n if(i) {\n minX = Math.min(minX, item.x);\n minCX = Math.min(minCX, item.x);\n minFX = Math.min(minFX, item.x);\n minOX = Math.min(minOX, item.x);\n if(i === length - 1) {\n maxX = maxCX = maxFX = maxOX = Math.max(maxX, item.x + item.outerWidth);\n maxY = maxCY = maxFY = maxOY = Math.max(maxY, item.y + item.outerHeight);\n maxCX += paddingRight;\n maxCY += paddingBottom;\n maxFX += paddingRight + borderRightWidth;\n maxFY += paddingBottom + borderBottomWidth;\n maxOX += borderRightWidth + paddingRight + marginRight\n maxOY += borderBottomWidth + paddingBottom + marginBottom;\n }\n else {\n maxX = maxCX = maxFX = maxOX = Math.max(maxX, item.x + item.outerWidth);\n }\n }\n // 第一个初始化\n else {\n minX = item.x;\n minY = item.y;\n minCX = minX - paddingLeft;\n minCY = minY - paddingTop;\n minFX = minCX - borderLeftWidth;\n minFY = minCY - borderTopWidth;\n minOX = minFX - marginLeft;\n minOY = minFY - marginTop;\n maxX = maxCX = maxFX = maxOX = item.x + item.outerWidth;\n maxY = maxCY = maxFY = maxOY = item.y + item.outerHeight;\n if(i === length - 1) {\n maxCX += paddingRight;\n maxCY += paddingBottom;\n maxFX += paddingRight + borderRightWidth;\n maxFY += paddingBottom + borderBottomWidth;\n maxOX += borderRightWidth + paddingRight + marginRight\n maxOY += borderBottomWidth + paddingBottom + marginBottom;\n }\n }\n });\n this.__x = minOX;\n this.__y = minOY;\n this.__width = computedStyle[WIDTH] = maxX - minX;\n // 防止比自己最小高度lineHeight还小,比如内容是个小字体\n this.__height = computedStyle[HEIGHT] = Math.max(lineHeight, maxY - minY);\n this.__clientWidth = maxCX - minCX;\n this.__clientHeight = maxCY - minCY;\n this.__offsetWidth = maxFX - minFX;\n this.__offsetHeight = maxFY - minFY;\n this.__outerWidth = maxOX - minOX;\n this.__outerHeight = maxOY - minOY;\n this.__x1 = minFX;\n this.__y1 = minFY;\n this.__x2 = minCX;\n this.__y2 = minCY;\n this.__x3 = minX;\n this.__y3 = minY;\n this.__x4 = maxX;\n this.__y4 = maxY;\n this.__x5 = maxCX;\n this.__y5 = maxCY;\n this.__x6 = maxFX;\n this.__y6 = maxFY;\n // inline的text整体设置相同\n if(['center', 'right'].indexOf(textAlign) > -1) {\n this.children.forEach(item => {\n if(item instanceof Text) {\n item.__inlineSize(isUpright);\n }\n });\n }\n }\n // 如果没有内容,宽度为0高度为lineHeight,对齐也特殊处理,lineBoxManager不会处理\n else {\n let tw = 0, th = 0;\n if(['center', 'right'].indexOf(textAlign) > -1) {\n let diff = size;\n if(textAlign === 'center') {\n diff *= 0.5;\n }\n if(diff > 0) {\n if(isUpright) {\n this.__offsetY(diff, true, null);\n }\n else {\n this.__offsetX(diff, true, null);\n }\n }\n }\n if(isUpright) {\n tw = lineHeight;\n this.__ioSize(tw, 0);\n this.__x -= marginLeft + paddingLeft + borderLeftWidth;\n }\n else {\n th = lineHeight;\n this.__ioSize(0, th);\n this.__y -= marginTop + paddingTop + borderTopWidth;\n }\n this.__x1 = this.__x + marginLeft;\n this.__y1 = this.__y + marginTop;\n this.__x2 = this.__x1 + borderLeftWidth;\n this.__y2 = this.__y1 + borderTopWidth;\n this.__x4 = this.__x3 = this.__x2 + paddingLeft;\n this.__y4 = this.__y3 = this.__y2 + paddingTop;\n this.__x5 = this.__x4 + tw + paddingRight;\n this.__y5 = this.__y4 + th + paddingBottom;\n this.__x6 = this.__x5 + borderRightWidth;\n this.__y6 = this.__y5 + borderBottomWidth;\n this.__clientWidth = this.__x5 - this.__x2;\n this.__clientHeight = this.__y5 - this.__y2;\n this.__offsetWidth = this.__x6 - this.__x1;\n this.__offsetHeight = this.__y6 - this.__y1;\n this.__outerWidth = this.__offsetWidth + marginLeft + marginRight;\n this.__outerHeight = this.__offsetHeight + marginTop + marginBottom;\n }\n }\n\n /**\n * 只针对绝对定位children布局\n * @param container\n * @param data\n * @param target 可选,只针对某个abs的child特定布局,在局部更新时用\n * @private\n */\n __layoutAbs(container, data, target) {\n let { __x: x, __y: y,\n __clientWidth: clientWidth, __clientHeight: clientHeight,\n __computedStyle: computedStyle } = container;\n let { __isDestroyed: isDestroyed, children, absChildren } = this;\n let {\n [DISPLAY]: display,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_TOP]: paddingTop,\n } = computedStyle;\n if(isDestroyed || display === 'none') {\n this.__layoutNone();\n return;\n }\n x += marginLeft + borderLeftWidth;\n y += marginTop + borderTopWidth;\n // 对absolute的元素进行相对容器布局\n absChildren.forEach(item => {\n if(target) {\n // 传入target局部布局更新,这时候如果是Component引发的,当setState时是Cp自身,当layout时是sr\n let node = item;\n if(node instanceof Component) {\n node = item.shadowRoot;\n }\n // 所以得2个都对比\n if(target !== node && target !== item) {\n return;\n }\n }\n let { currentStyle, computedStyle } = item;\n if(item.isDestroyed || currentStyle[DISPLAY] === 'none') {\n item.__layoutNone();\n return;\n }\n // 先根据容器宽度计算margin/padding,匿名块对象特殊处理,此时没有computedStyle\n item.__computeReflow();\n item.__mp(currentStyle, computedStyle, clientWidth);\n let {\n [LEFT]: left,\n [TOP]: top,\n [RIGHT]: right,\n [BOTTOM]: bottom,\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n let x2, y2, w2, h2;\n let onlyRight;\n let onlyBottom;\n let fixedTop;\n let fixedRight;\n let fixedBottom;\n let fixedLeft;\n // 判断何种方式的定位,比如左+宽度,左+右之类\n if(left.u !== AUTO) {\n fixedLeft = true;\n computedStyle[LEFT] = this.__calSize(left, clientWidth, true);\n }\n else {\n computedStyle[LEFT] = 'auto';\n }\n if(right.u !== AUTO) {\n fixedRight = true;\n computedStyle[RIGHT] = this.__calSize(right, clientWidth, true);\n }\n else {\n computedStyle[RIGHT] = 'auto';\n }\n if(top.u !== AUTO) {\n fixedTop = true;\n computedStyle[TOP] = this.__calSize(top, clientHeight, true);\n }\n else {\n computedStyle[TOP] = 'auto';\n }\n if(bottom.u !== AUTO) {\n fixedBottom = true;\n computedStyle[BOTTOM] = this.__calSize(bottom, clientHeight, true);\n }\n else {\n computedStyle[BOTTOM] = 'auto';\n }\n // 优先级最高left+right,其次left+width,再次right+width,再次仅申明单个,最次全部auto\n if(fixedLeft && fixedRight) {\n x2 = x + computedStyle[LEFT];\n w2 = clientWidth - computedStyle[RIGHT] - computedStyle[LEFT];\n }\n else if(fixedLeft) {\n x2 = x + computedStyle[LEFT];\n if(width.u !== AUTO) {\n w2 = this.__calSize(width, clientWidth, true);\n }\n }\n else if(fixedRight) {\n if(width.u !== AUTO) {\n w2 = this.__calSize(width, clientWidth, true);\n }\n else {\n onlyRight = true;\n }\n x2 = x + clientWidth - computedStyle[RIGHT] - (w2 || 0);\n // 右对齐有尺寸时还需减去margin/border/padding的\n x2 -= computedStyle[MARGIN_LEFT];\n x2 -= computedStyle[MARGIN_RIGHT];\n x2 -= computedStyle[PADDING_LEFT];\n x2 -= computedStyle[PADDING_RIGHT];\n x2 -= computedStyle[BORDER_LEFT_WIDTH];\n x2 -= computedStyle[BORDER_RIGHT_WIDTH];\n }\n else {\n x2 = x + paddingLeft;\n if(width.u !== AUTO) {\n w2 = this.__calSize(width, clientWidth, true);\n }\n }\n // top/bottom/height优先级同上\n if(fixedTop && fixedBottom) {\n y2 = y + computedStyle[TOP];\n h2 = clientHeight - computedStyle[TOP] - computedStyle[BOTTOM];\n }\n else if(fixedTop) {\n y2 = y + computedStyle[TOP];\n if(height.u !== AUTO) {\n h2 = this.__calSize(height, clientHeight, true);\n }\n }\n else if(fixedBottom) {\n if(height.u !== AUTO) {\n h2 = this.__calSize(height, clientHeight, true);\n }\n else {\n onlyBottom = true;\n }\n y2 = y + clientHeight - computedStyle[BOTTOM] - (h2 || 0);\n // 底对齐有尺寸时y值还需减去margin/border/padding的\n y2 -= computedStyle[MARGIN_TOP];\n y2 -= computedStyle[MARGIN_BOTTOM];\n y2 -= computedStyle[PADDING_TOP];\n y2 -= computedStyle[PADDING_BOTTOM];\n y2 -= computedStyle[BORDER_TOP_WIDTH];\n y2 -= computedStyle[BORDER_BOTTOM_WIDTH];\n }\n // 未声明y的找到之前的流布局child,紧随其下\n else {\n y2 = y + paddingTop;\n let prev = item.__prev, mtList = [], mbList = [];\n while(prev) {\n // 以前面的flow的最近的prev末尾为准\n if(prev instanceof Text || (prev instanceof Component && prev.shadowRoot instanceof Text)\n || prev.computedStyle[POSITION] !== 'absolute') {\n // 当prev是空白节点时,还要考虑margin合并的影响\n let cps = prev.computedStyle;\n if(prev.clientHeight <= 0) {\n mtList.push(cps[MARGIN_TOP]);\n mbList.push(cps[MARGIN_BOTTOM]);\n }\n else {\n mbList.push(cps[MARGIN_BOTTOM]);\n let t = reflow.getMergeMargin(mtList, mbList);\n y2 = prev.__y1 + prev.offsetHeight + t.target;\n break;\n }\n }\n prev = prev.__prev;\n }\n if(height.u !== AUTO) {\n h2 = this.__calSize(height, clientHeight, true);\n }\n }\n // onlyRight时做的布局其实是以那个点位为left/top布局然后offset,limit要特殊计算,从本点向左侧为边界\n let widthLimit = onlyRight ? x2 - x : clientWidth + x - x2;\n // onlyBottom相同,正常情况是左上到右下的尺寸限制\n let heightLimit = onlyBottom ? y2 - y : clientHeight + y - y2;\n // 未直接或间接定义尺寸,取特殊孩子宽度的最大值,同时不能超限\n if(w2 === undefined) {\n item.__layoutFlow({\n x: x2,\n y: y2,\n w: widthLimit,\n h: heightLimit,\n isUpright: data.isUpright, // 父亲的\n container,\n }, true, false);\n widthLimit = item.outerWidth;\n }\n // 这里用包裹方法标明要递归计算computedStyle\n item.__layoutFlow({\n x: x2,\n y: y2,\n w: widthLimit,\n h: heightLimit,\n w2, // left+right这种等于有宽度,但不能修改style,继续传入到__preLayout中特殊对待\n h2,\n isUpright: data.isUpright,\n container,\n }, false, false);\n if(onlyRight) {\n item.__offsetX(-item.outerWidth, true, null);\n }\n if(onlyBottom) {\n item.__offsetY(-item.outerHeight, true, null);\n }\n item.__layoutStyle();\n });\n // 递归进行,遇到absolute/relative/component的设置新容器\n children.forEach(item => {\n if(target) {\n // 传入target局部布局更新,这时候如果是Component引发的,当setState时是Cp自身,当layout时是sr\n let node = item;\n if(node instanceof Component) {\n node = item.shadowRoot;\n }\n // 所以得2个都对比\n if(target !== node && target !== item) {\n return;\n }\n }\n if(item instanceof Dom) {\n item.__layoutAbs(isRelativeOrAbsolute(item) ? item : container, data, null);\n }\n else if(item instanceof Component) {\n let sr = item.shadowRoot;\n if(sr instanceof Dom) {\n sr.__layoutAbs(sr, data, null);\n }\n }\n });\n // 根节点自己特殊执行,不在layout统一\n this.__execAr();\n }\n\n render(renderMode, ctx, dx, dy) {\n let res = super.render(renderMode, ctx, dx, dy);\n let ep = this.__ellipsis;\n if(ep) {\n ep.render(renderMode, res.ctx, dx, dy)\n }\n if(renderMode === SVG) {\n this.virtualDom.type = 'dom';\n }\n return res;\n }\n\n __destroy() {\n if(this.isDestroyed) {\n return;\n }\n this.children.forEach(child => {\n // 有可能为空,因为diff过程中相同的cp被移到新的vd中,老的防止destroy设null\n if(child) {\n child.__destroy();\n }\n });\n if(this.__ellipsis) {\n this.__ellipsis.__destroy();\n }\n super.__destroy();\n }\n\n __emitEvent(e, pm, force) {\n if(force) {\n return super.__emitEvent(e, force);\n }\n let { __isDestroyed, __computedStyle: computedStyle, __mask, __cacheTotal } = this;\n if(__isDestroyed || computedStyle[DISPLAY] === 'none' || e.__stopPropagation || __mask) {\n return;\n }\n // 检查perspective嵌套状态,自身有perspective则设置10位,自身有transform的p矩阵则设置01位\n // if(computedStyle[PERSPECTIVE]) {\n // perspectiveNest++;\n // }\n // if(tf.isPerspectiveMatrix(computedStyle[TRANSFORM])) {\n // perspectiveTfNest++;\n // }\n // overflow:hidden时还需要判断是否超出范围外,如果是则无效\n if(computedStyle[OVERFLOW] === 'hidden' && !this.willResponseEvent(e, true)) {\n return;\n }\n // __cacheTotal可提前判断是否在bbox范围内,svg没有bbox防止进入判断\n if(__cacheTotal && __cacheTotal.available && __cacheTotal.bbox) {\n // 不是E的话,因为缓存缘故影响cache的子元素,先左乘可能的父matrix(嵌套cache),再赋值给pm递归传下去\n if(!isE(this.__matrix)) {\n pm = multiply(pm, this.__matrix);\n assignMatrix(this.__matrixEvent, pm);\n }\n else if(this.__perspectiveMatrix) {\n pm = this.__perspectiveMatrix;\n }\n let bbox = __cacheTotal.bbox;\n if(!geom.pointInQuadrilateral(\n e.x, e.y,\n bbox[0], bbox[1],\n bbox[2], bbox[1],\n bbox[2], bbox[3],\n bbox[0], bbox[3], this.__matrixEvent)) {\n return;\n }\n }\n // 递归传下来的pm如果有说明是cache的子元素且需要重新计算matrix\n else if(!mx.isE(pm)) {\n util.assignMatrix(this.__matrixEvent, mx.multiply(pm, this.__matrix));\n }\n // 找到对应的callback\n let { event: { type } } = e;\n let { listener, zIndexChildren } = this;\n let cb;\n if(listener.hasOwnProperty(type)) {\n cb = listener[type];\n }\n // child触发则parent一定触发\n for(let i = zIndexChildren.length - 1; i >=0; i--) {\n let child = zIndexChildren[i];\n if(child instanceof Xom\n || child instanceof Component && child.shadowRoot instanceof Xom) {\n if(child.__emitEvent(e, pm, false)) {\n // 孩子阻止冒泡\n if(e.__stopPropagation) {\n return;\n }\n if(isFunction(cb) && !e.__stopImmediatePropagation) {\n cb.call(this, e);\n }\n return true;\n }\n }\n }\n // child不触发再看自己\n return super.__emitEvent(e, false);\n }\n\n appendChild(child, cb) {\n let { __root: root, __host: host, __children: children } = this;\n if(!(child instanceof Node || child instanceof Component)) {\n child = new Text(child);\n }\n child.remove();\n // 只设兄弟/parent,children在relation做,离屏则等真实添加时机\n let len = children.length;\n if(len) {\n let last = children[len - 1];\n last.__next = child;\n child.__prev = last;\n }\n child.__parent = this;\n children.push(child);\n let zIndexChildren = this.__zIndexChildren = genZIndexChildren(this);\n // 离屏情况,不刷新\n if(this.__isDestroyed) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 在dom中则整体设置关系和struct,不可见提前跳出\n builder.relation(root, host, this, child, {});\n this.__insertStruct(child, zIndexChildren.indexOf(child));\n // 可能为component,不能用__currentStyle\n if(child.currentStyle[DISPLAY] === 'none' || this.__computedStyle[DISPLAY] === 'none') {\n child.__layoutNone();\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 在reflow过程中设置struct,text视为父变更\n if(child instanceof Text) {\n child = this;\n }\n root.__addUpdate(child, null, REFLOW, true, null, null, cb);\n }\n\n prependChild(child, cb) {\n let { __root: root, __host: host, __children: children } = this;\n if(!(child instanceof Node || child instanceof Component)) {\n child = new Text(child);\n }\n child.remove();\n // 只设兄弟/parent,children在relation做,离屏则等真实添加时机\n let len = children.length;\n if(len) {\n let first = children[0];\n first.__prev = child;\n child.__next = first;\n }\n child.__parent = this;\n children.unshift(child);\n let zIndexChildren = this.__zIndexChildren = genZIndexChildren(this);\n // 离屏情况,不刷新\n if(this.__isDestroyed) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 在dom中则整体设置关系和struct,不可见提前跳出\n builder.relation(root, host, this, child, {});\n this.__insertStruct(child, zIndexChildren.indexOf(child));\n // 可能为component,不能用__currentStyle\n if(child.currentStyle[DISPLAY] === 'none' || this.__computedStyle[DISPLAY] === 'none') {\n child.__layoutNone();\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 可见在reflow过程中设置struct\n if(child instanceof Text) {\n child = this;\n }\n root.__addUpdate(child, null, REFLOW, true, null, null, cb);\n }\n\n insertBefore(child, cb) {\n let { __root: root } = this;\n if(!(child instanceof Node || child instanceof Component)) {\n child = new Text(child);\n }\n child.remove();\n let parent = this.isShadowRoot ? this.__hostRoot.__parent: this.__parent;\n let i;\n // 即便没被添加到dom中,也有可能有父节点,除非是离屏根节点,注意组件\n if(parent) {\n let children = parent.__children;\n let target = this.isShadowRoot ? this.__hostRoot : this;\n i = children.indexOf(target);\n if(i === -1) {\n throw new Error('Index exception of insertBefore()');\n }\n let prev = target.__prev;\n if(prev) {\n prev.__next = child;\n child.__prev = prev;\n }\n child.__next = target;\n target.__prev = child;\n children.splice(i, 0, child);\n parent.__zIndexChildren = genZIndexChildren(parent);\n }\n else {\n throw new Error('InsertBefore() illegal');\n }\n // 离屏情况,不刷新\n if(this.__isDestroyed) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 在dom中则整体设置关系和struct,不可见提前跳出\n builder.relation(root, parent.__host, parent, child, {});\n parent.__insertStruct(child, parent.__zIndexChildren.indexOf(child));\n if(child.currentStyle[DISPLAY] === 'none' || parent.__computedStyle[DISPLAY] === 'none') {\n child.__layoutNone();\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n if(child instanceof Text) {\n child = parent;\n }\n root.__addUpdate(child, null, REFLOW, true, null, null, cb);\n }\n\n insertAfter(child, cb) {\n let { __root: root } = this;\n if(!(child instanceof Node || child instanceof Component)) {\n child = new Text(child);\n }\n child.remove();\n let parent = this.isShadowRoot ? this.__hostRoot.__parent: this.__parent;\n let i;\n // 即便没被添加到dom中,也有可能有父节点,除非是离屏根节点,注意组件\n if(parent) {\n let children = parent.__children;\n let target = this.isShadowRoot ? this.__hostRoot : this;\n i = children.indexOf(target);\n if(i === -1) {\n throw new Error('Index exception of insertBefore()');\n }\n target.__next = child;\n child.__prev = target;\n children.splice(i + 1, 0, child);\n parent.__zIndexChildren = genZIndexChildren(parent);\n }\n else {\n throw new Error('InsertAfter() illegal');\n }\n // 离屏情况,不刷新\n if(this.__isDestroyed) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 在dom中则整体设置关系和struct,不可见提前跳出\n builder.relation(root, parent.__host, parent, child, {});\n parent.__insertStruct(child, parent.__zIndexChildren.indexOf(child));\n if(child.currentStyle[DISPLAY] === 'none' || parent.__computedStyle[DISPLAY] === 'none') {\n child.__layoutNone();\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n if(child instanceof Text) {\n child = parent;\n }\n root.__addUpdate(child, null, REFLOW, true, null, null, cb);\n }\n\n removeChild(target, cb) {\n if((target.__parent === this || target.__domParent === this)\n && (target instanceof Node || target instanceof Component)) {\n target.remove(cb);\n }\n else {\n inject.error('Invalid parameter of removeChild()');\n }\n }\n\n get children() {\n return this.__children;\n }\n\n get flowChildren() {\n return this.__children.filter(item => {\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n return item instanceof Text || item.__currentStyle[POSITION] !== 'absolute';\n });\n }\n\n get absChildren() {\n return this.__children.filter(item => {\n if(item instanceof Component) {\n item = item.__shadowRoot;\n }\n return item instanceof Xom && item.__currentStyle[POSITION] === 'absolute';\n });\n }\n\n get zIndexChildren() {\n return this.__zIndexChildren;\n }\n\n get lineBoxManager() {\n return this.__lineBoxManager;\n }\n\n get baseline() {\n let {\n [MARGIN_TOP]: marginTop,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [PADDING_TOP]: paddingTop,\n [WRITING_MODE]: writingMode,\n } = this.computedStyle;\n if(!this.lineBoxManager || !this.lineBoxManager.size\n || writingMode.indexOf('vertical') === 0) {\n return this.offsetHeight;\n }\n return marginTop + borderTopWidth + paddingTop + this.lineBoxManager.baseline;\n }\n\n get firstBaseline() {\n if(!this.lineBoxManager || !this.lineBoxManager.size) {\n return this.offsetHeight;\n }\n let {\n [MARGIN_TOP]: marginTop,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [PADDING_TOP]: paddingTop,\n } = this.computedStyle;\n return marginTop + borderTopWidth + paddingTop + this.lineBoxManager.firstBaseline;\n }\n\n get verticalBaseline() {\n if(!this.lineBoxManager || !this.lineBoxManager.size) {\n return 0;\n }\n let {\n [MARGIN_LEFT]: marginLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [PADDING_LEFT]: paddingLeft,\n [WRITING_MODE]: writingMode,\n } = this.computedStyle;\n if(!this.lineBoxManager || !this.lineBoxManager.size\n || writingMode.indexOf('vertical') === -1) {\n return 0;\n }\n return marginLeft + borderLeftWidth + paddingLeft + this.lineBoxManager.verticalBaseline;\n }\n}\n\nexport default Dom;\n","import Dom from './Dom';\nimport mode from '../refresh/mode';\nimport painter from '../util/painter';\nimport inject from '../util/inject';\nimport util from '../util/util';\nimport enums from '../util/enums';\nimport unit from '../style/unit';\nimport image from '../style/image';\nimport border from '../style/border';\nimport level from '../refresh/level';\nimport mx from '../math/matrix';\nimport geom from '../math/geom';\n\nconst {\n STYLE_KEY: {\n WIDTH,\n HEIGHT,\n DISPLAY,\n BORDER_RIGHT_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n VISIBILITY,\n MARGIN_RIGHT,\n MARGIN_LEFT,\n PADDING_RIGHT,\n PADDING_LEFT,\n FONT_SIZE,\n FLEX_BASIS,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, REM, VW, VH, VMAX, VMIN } = unit;\nconst { canvasPolygon, svgPolygon } = painter;\nconst { isFunction } = util;\n\nclass Img extends Dom {\n constructor(tagName, props) {\n super(tagName, props);\n let src = this.props.src;\n let loadImg = this.__loadImg = {\n src,\n };\n // 空url用错误图代替\n if(!src) {\n loadImg.error = true;\n }\n else {\n let ca = inject.IMG[src];\n if(!ca) {\n inject.measureImg(src, null);\n }\n else if(ca && ca.state === inject.LOADED) {\n loadImg.source = ca.source;\n loadImg.width = loadImg.__width = ca.width;\n loadImg.height = loadImg.__height = ca.height;\n }\n }\n }\n\n /**\n * 覆盖xom的方法,在__layout()3个分支中会首先被调用\n * 当样式中固定宽高时,图片按样式尺寸,加载后重新绘制即可\n * 只固定宽高一个时,加载完要计算缩放比,重新布局绘制\n * 都没有固定,按照图片尺寸,重新布局绘制\n * 这里计算非固定的情况,将其改为固定供布局渲染使用,未加载完成为0\n */\n __preLayout(data, isInline) {\n let res = super.__preLayout(data, false);\n let loadImg = this.__loadImg;\n // 可能已提前加载好了,或有缓存,为减少刷新直接使用\n let src = loadImg.src;\n if(src) {\n let cache = inject.IMG[src];\n if(!cache || cache.state === inject.LOADING) {\n if(!loadImg.loading) {\n this.__loadAndRefresh(loadImg, null);\n }\n }\n else if(cache && cache.state === inject.LOADED && cache.success) {\n loadImg.source = cache.source;\n loadImg.width = loadImg.__width = cache.width;\n loadImg.height = loadImg.__height = cache.height;\n }\n loadImg.cache = false;\n }\n if(res.fixedWidth && res.fixedHeight) {\n return res;\n }\n if(loadImg.error && !this.props.placeholder) {\n if(res.fixedWidth) {\n res.h = res.w;\n }\n else if(res.fixedHeight) {\n res.w = res.h;\n }\n else {\n res.w = res.h = 32;\n }\n }\n else if(loadImg.source) {\n if(res.fixedWidth) {\n res.h = res.w * loadImg.height / loadImg.width;\n }\n else if(res.fixedHeight) {\n res.w = res.h * loadImg.width / loadImg.height;\n }\n else {\n res.w = loadImg.width;\n res.h = loadImg.height;\n }\n }\n else {\n res.w = res.h = 0;\n }\n res.fixedWidth = true;\n res.fixedHeight = true;\n return res;\n }\n\n __addGeom(tagName, props) {\n props = util.hash2arr(props);\n this.__virtualDom.children.push({\n type: 'item',\n tagName,\n props,\n });\n }\n\n // img根据加载情况更新__hasContent,同时识别是否仅有图片内容本身,多个相同图片视为同一个资源\n calContent(__currentStyle, __computedStyle) {\n let res = super.calContent(__currentStyle, __computedStyle);\n let {\n __loadImg: loadImg,\n } = this;\n if(!res) {\n loadImg.onlyImg = true;\n if(__computedStyle[VISIBILITY] !== 'hidden' && (__computedStyle[WIDTH] || __computedStyle[HEIGHT])\n && loadImg.source) {\n res = true;\n }\n }\n else {\n loadImg.onlyImg = false;\n }\n return res;\n }\n\n render(renderMode, ctx, dx = 0, dy = 0) {\n let res = super.render(renderMode, ctx, dx, dy);\n let {\n width, height, __isDestroyed,\n props: {\n placeholder,\n },\n __computedStyle: {\n [DISPLAY]: display,\n [BORDER_TOP_LEFT_RADIUS]: borderTopLeftRadius,\n [BORDER_TOP_RIGHT_RADIUS]: borderTopRightRadius,\n [BORDER_BOTTOM_RIGHT_RADIUS]: borderBottomRightRadius,\n [BORDER_BOTTOM_LEFT_RADIUS]: borderBottomLeftRadius,\n [VISIBILITY]: visibility,\n },\n virtualDom,\n __loadImg: loadImg,\n } = this;\n if(__isDestroyed || display === 'none' || visibility === 'hidden' || renderMode === mode.WEBGL) {\n return res;\n }\n let originX, originY;\n originX = res.x3 + dx;\n originY = res.y3 + dy;\n // 根据配置以及占位图显示error\n let source = loadImg.source;\n if(loadImg.error && !placeholder && Img.showError) {\n let strokeWidth = Math.min(width, height) * 0.02;\n let stroke = '#CCC';\n let fill = '#DDD';\n let cx = originX + width * 0.7;\n let cy = originY + height * 0.3;\n let r = strokeWidth * 5;\n let pts = [\n [originX + width * 0.15, originY + height * 0.7],\n [originX + width * 0.3, originY + height * 0.4],\n [originX + width * 0.5, originY + height * 0.6],\n [originX + width * 0.6, originY + height * 0.5],\n [originX + width * 0.9, originY + height * 0.8],\n [originX + width * 0.15, originY + height * 0.8]\n ];\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n ctx.strokeStyle = stroke;\n ctx.lineWidth = strokeWidth;\n ctx.fillStyle = fill;\n ctx.beginPath();\n ctx.moveTo(originX, originY);\n ctx.lineTo(originX + width, originY);\n ctx.lineTo(originX + width, originY + height);\n ctx.lineTo(originX, originY + height);\n ctx.lineTo(originX, originY);\n ctx.stroke();\n ctx.closePath();\n ctx.beginPath();\n let points = geom.ellipsePoints(cx, cy, r, r);\n painter.canvasPolygon(ctx, points, 0, 0);\n ctx.fill();\n ctx.closePath();\n ctx.beginPath();\n ctx.moveTo(pts[0][0], pts[0][1]);\n for(let i = 1, len = pts.length; i < len; i++) {\n let point = pts[i];\n ctx.lineTo(point[0], point[1]);\n }\n ctx.lineTo(pts[0][0], pts[0][1]);\n ctx.fill();\n ctx.closePath();\n }\n else if(renderMode === mode.SVG) {\n this.__addGeom('rect', [\n ['x', originX],\n ['y', originY],\n ['width', width],\n ['height', height],\n ['stroke', stroke],\n ['stroke-width', strokeWidth],\n ['fill', 'rgba(0,0,0,0)']\n ]);\n this.__addGeom('circle', [\n ['cx', cx],\n ['cy', cy],\n ['r', r],\n ['fill', fill],\n ]);\n let s = '';\n for(let i = 0, len = pts.length; i < len; i++) {\n let point = pts[i];\n if(i) {\n s += ' ';\n }\n s += point[0] + ',' + point[1];\n }\n this.__addGeom('polygon', [\n ['points', s],\n ['fill', fill]\n ]);\n }\n }\n else if(source) {\n // 圆角需要生成一个mask\n let list = border.calRadius(originX, originY, width, height,\n borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius);\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n // 有border-radius需模拟遮罩裁剪\n if(list) {\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, list, dx, dy);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(source, originX, originY, width, height);\n ctx.restore();\n }\n else {\n ctx.drawImage(source, originX, originY, width, height);\n }\n }\n else if(renderMode === mode.SVG) {\n // img没有变化无需diff,直接用上次的vd\n if(loadImg.cache) {\n loadImg.cache.cache = true;\n virtualDom.children = [loadImg.cache];\n // 但是还是要校验是否有borderRadius变化,引发img的圆角遮罩\n if(!virtualDom.cache && list) {\n let d = svgPolygon(list);\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', '#FFF'],\n ],\n }\n ],\n };\n let id = ctx.add(v);\n this.__cacheDefs.push(v);\n virtualDom.conClip = 'url(#' + id + ')';\n }\n return;\n }\n // 缩放图片,无需考虑原先矩阵,xom里对父层已经变换过了\n let matrix;\n if(width !== loadImg.width || height !== loadImg.height) {\n matrix = image.matrixResize(loadImg.width, loadImg.height, width, height, originX, originY, width, height);\n }\n let props = [\n ['xlink:href', loadImg.error ? placeholder : loadImg.src],\n ['x', originX],\n ['y', originY],\n ['width', loadImg.width],\n ['height', loadImg.height]\n ];\n if(list) {\n let d = svgPolygon(list);\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', '#FFF']\n ],\n }\n ],\n };\n let id = ctx.add(v);\n this.__cacheDefs.push(v);\n virtualDom.conClip = 'url(#' + id + ')';\n delete virtualDom.cache;\n }\n if(matrix && !mx.isE(matrix)) {\n props.push(['transform', 'matrix(' + util.joinArr(mx.m2m6(matrix), ',') + ')']);\n }\n let vd = {\n type: 'img',\n tagName: 'image',\n props,\n };\n virtualDom.children = [vd];\n loadImg.cache = vd;\n }\n }\n return res;\n }\n\n __isRealInline() {\n return false;\n }\n\n // overwrite\n __tryLayInline(w, total) {\n let { currentStyle: {\n [WIDTH]: width,\n [HEIGHT]: height,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n }, computedStyle: {\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } } = this;\n if(width.u !== AUTO) {\n w -= this.__calSize(width, total, true);\n }\n else {\n let loadImg = this.__loadImg;\n // 加载成功计算缩放后的宽度\n if(loadImg.source) {\n if(height.u === PX) {\n w -= loadImg.width * height.v / loadImg.height;\n }\n else if(height.u === PERCENT) {\n w -= loadImg.width * height.v * total * 0.01 / loadImg.height;\n }\n else if(height.u === REM) {\n w -= loadImg.width * height.v * this.root.computedStyle[FONT_SIZE] / loadImg.height;\n }\n else if(height.u === VW) {\n w -= loadImg.width * height.v * this.root.width * 0.01 / loadImg.height;\n }\n else if(height.u === VH) {\n w -= loadImg.width * height.v * this.root.height * 0.01 / loadImg.height;\n }\n else if(height.u === VMAX) {\n w -= height.v * Math.max(this.root.width, this.root.height) * 0.01 / loadImg.height;\n }\n else if(height.u === VMIN) {\n w -= height.v * Math.min(this.root.width, this.root.height) * 0.01 / loadImg.height;\n }\n else {\n w -= loadImg.width;\n }\n }\n }\n // 减去水平mbp\n w -= this.__calSize(marginRight, total, true);\n w -= this.__calSize(paddingRight, total, true);\n w -= borderRightWidth;\n w -= this.__calSize(marginLeft, total, true);\n w -= this.__calSize(paddingLeft, total, true);\n w -= borderLeftWidth;\n return w;\n }\n\n __calBasis(isDirectionRow, isAbs, isColumn, data, isDirectChild) {\n this.__computeReflow();\n let b = 0;\n let min = 0;\n let max = 0;\n let { currentStyle, computedStyle, __loadImg } = this;\n let { w, h } = data;\n // 计算需考虑style的属性\n let {\n [FLEX_BASIS]: flexBasis,\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n let main = isDirectionRow ? width : height;\n let cross = isDirectionRow ? height : width;\n // basis3种情况:auto、固定、content,只区分固定和其它\n let isFixed = [PX, PERCENT, REM, VW, VH, VMAX, VMIN].indexOf(flexBasis.u) > -1;\n if(isFixed) {\n b = max = min = this.__calSize(flexBasis, isDirectionRow ? w : h, true);\n }\n else if(([PX, PERCENT, REM, VW, VH, VMAX, VMIN].indexOf(main.u) > -1)) {\n b = max = min = this.__calSize(main, isDirectionRow ? w : h, true);\n }\n // auto和content固定尺寸比例计算\n else if(__loadImg.source || __loadImg.error) {\n let res = this.__preLayout(data);\n if(cross.u !== AUTO) {\n cross = this.__calSize(cross, isDirectionRow ? h : w, true);\n let ratio = res.w / res.h;\n b = max = min = isDirectionRow ? cross * ratio : cross / ratio;\n }\n else {\n b = max = min = isDirectionRow ? res.w : res.h;\n }\n }\n // 直接item的mpb影响basis\n return this.__addMBP(isDirectionRow, w, currentStyle, computedStyle, [b, min, max], isDirectChild);\n }\n\n __loadAndRefresh(loadImg, cb) {\n let self = this;\n // 先清空之前可能的\n if(loadImg.source || loadImg.error) {\n loadImg.source = null;\n }\n loadImg.loading = true;\n let root = this.__root, ctx = root.ctx;\n let placeholder = this.props.placeholder, computedStyle = this.__computedStyle;\n let width = computedStyle[WIDTH], height = computedStyle[HEIGHT];\n // 再测量,可能瞬间完成替换掉上面的\n inject.measureImg(loadImg.src, data => {\n // 还需判断url,防止重复加载时老的替换新的,失败走error绘制\n if(data.url === loadImg.src) {\n loadImg.cache && (loadImg.cache.cache = false);\n loadImg.loading = false;\n function reload() {\n let { __currentStyle: { [WIDTH]: width, [HEIGHT]: height } } = self;\n if(width.u !== AUTO && height.u !== AUTO) {\n root.__addUpdate(self, null, level.REPAINT, null, null, null, cb);\n }\n else {\n root.__addUpdate(self, null, level.REFLOW, null, null, null, cb);\n }\n }\n if(data.success) {\n loadImg.source = data.source;\n loadImg.width = data.width;\n loadImg.height = data.height;\n }\n else if(placeholder) {\n loadImg.error = true;\n inject.measureImg(placeholder, data => {\n if(data.success) {\n loadImg.source = data.source;\n loadImg.width = data.width;\n loadImg.height = data.height;\n if(computedStyle[DISPLAY] !== 'none' && !self.__isDestroyed) {\n reload();\n }\n }\n }, {\n ctx,\n root,\n width,\n height,\n });\n return;\n }\n else {\n loadImg.error = true;\n }\n // 可见状态进行刷新操作,visibility某些情况需要刷新,可能宽高未定义要重新布局\n if(computedStyle[DISPLAY] !== 'none' && !self.__isDestroyed) {\n reload();\n }\n }\n });\n }\n\n updateSrc(v, cb) {\n let loadImg = this.__loadImg;\n // 相等或空且当前error直接返回\n if(v === loadImg.src || this.__isDestroyed || !v && loadImg.error) {\n loadImg.src = v;\n inject.measureImg(v, null);\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n loadImg.src = v;\n this.__loadAndRefresh(loadImg, cb);\n }\n\n appendChild() {\n inject.error('Img can not appendChild.');\n }\n\n get src() {\n return this.__loadImg.src;\n }\n\n get isReplaced() {\n return true;\n }\n\n static showError = true;\n}\n\nexport default Img;\n","class Defs {\n constructor(uuid) {\n this.id = uuid;\n this.count = 0;\n this.list = [];\n this.cacheHash = {}; // 每次svg渲染前重置,存储前次渲染不变的缓存id\n }\n add(data) {\n let uuid = this.count;\n let hash = this.cacheHash;\n while(hash.hasOwnProperty(uuid)) {\n uuid++;\n }\n this.count = uuid + 1;\n data.id = uuid;\n data.uuid = 'karas-defs-' + this.id + '-' + uuid;\n data.index = this.list.length;\n this.list.push(data);\n return data.uuid;\n }\n addCache(data) {\n data.index = this.list.length;\n this.list.push(data);\n this.cacheHash[data.id] = true;\n return data.uuid;\n }\n clear() {\n this.list = [];\n this.count = 0;\n this.cacheHash = {};\n }\n removeCache(data) {\n let list = this.list;\n let i = data.index;\n // 一般情况index即位置,但每次渲染过程中,可能会删掉一些,此时位置会往前,但index不变,因此遍历\n for(; i >= 0; i--) {\n if(list[i] === data) {\n list.splice(i, 1);\n return;\n }\n }\n }\n\n get value() {\n return this.list;\n }\n\n static getInstance(uuid) {\n return new Defs(uuid);\n }\n}\n\nexport default Defs;\n","import util from './util';\nimport level from '../refresh/level';\n\nconst { joinVd, joinDef } = util;\nconst { NONE, TRANSFORM_ALL, OPACITY, FILTER, MIX_BLEND_MODE } = level;\n\nfunction diff(elem, ovd, nvd) {\n let cns = elem.childNodes;\n diffDefs(cns[0], ovd.defs, nvd.defs);\n // = i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinDef(nd[i]));\n }\n }\n}\n\nfunction diffDef(elem, od, nd) {\n if(od.tagName !== nd.tagName) {\n insertAdjacentHTML(elem, 'beforebegin', joinDef(nd));\n // elem.insertAdjacentHTML('beforebegin', joinDef(nd));\n elem.parentNode.removeChild(elem);\n }\n else {\n if(od.uuid !== nd.uuid) {\n elem.setAttribute('id', nd.uuid);\n }\n let op = {};\n for(let i = 0, len = (od.props || []).length; i < len; i++) {\n let prop = od.props[i];\n let [k, v] = prop;\n op[k] = v;\n }\n for(let i = 0, len = (nd.props || []).length; i < len; i++) {\n let prop = nd.props[i];\n let [k, v] = prop;\n // 已有不等更新,没有添加\n if(op.hasOwnProperty(k)) {\n if(op[k] !== v) {\n elem.setAttribute(k, v);\n }\n delete op[k];\n }\n else {\n elem.setAttribute(k, v);\n }\n }\n // 多余的删除\n Object.keys(op).forEach(i => {\n elem.removeAttribute(i);\n });\n let cns = elem.childNodes;\n let ol = od.children.length;\n let nl = nd.children.length;\n let i = 0;\n for(; i < Math.min(ol, nl); i++) {\n diffItem(elem, i, od.children[i], nd.children[i]);\n }\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinVd(nd.children[i]));\n }\n }\n }\n}\n\nfunction diffChild(elem, ovd, nvd) {\n if(ovd.type === 'dom') {\n if(nvd.type === 'dom') {\n diffD2D(elem, ovd, nvd);\n }\n else if(nvd.type === 'geom') {\n diffD2G(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n else if(ovd.type === 'text') {\n if(nvd.type === 'text') {\n diffT2T(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n else if(ovd.type === 'geom') {\n if(nvd.type === 'dom') {\n diffG2D(elem, ovd, nvd);\n }\n else if(nvd.type === 'geom') {\n diffG2G(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n else if(ovd.type === 'img') {\n if(nvd.type === 'img') {\n diffItemSelf(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n // 特殊情况,当有连续2个img,后面1个发生error时,其children内容不是type为img的图片,而是矢量图item,会进入此分支\n else if(ovd.type === 'item' && nvd.type === 'item') {\n diffItemSelf(elem, ovd, nvd);\n }\n}\n\nfunction diffX2X(elem, ovd, nvd) {\n let { transform, opacity, visibility, mask, overflow, filter, mixBlendMode, conClip } = nvd;\n if(ovd.transform !== transform) {\n if(transform) {\n elem.setAttribute('transform', transform);\n }\n else {\n elem.removeAttribute('transform');\n }\n }\n if(ovd.opacity !== opacity) {\n if(opacity !== 1 && opacity !== undefined) {\n elem.setAttribute('opacity', opacity);\n }\n else {\n elem.removeAttribute('opacity');\n }\n }\n if(ovd.visibility !== visibility) {\n elem.setAttribute('visibility', visibility);\n }\n if(ovd.mask !== mask) {\n if(mask) {\n elem.setAttribute('mask', mask);\n }\n else {\n elem.removeAttribute('mask');\n }\n }\n if(ovd.filter !== filter || ovd.mixBlendMode !== mixBlendMode) {\n let s = (filter ? `filter:${filter};` : '') + (mixBlendMode ? `mix-blend-mode:${mixBlendMode};` : '');\n if(s) {\n elem.setAttribute('style', s);\n }\n else {\n elem.removeAttribute('filter');\n }\n }\n if(ovd.overflow !== overflow) {\n if(overflow) {\n elem.setAttribute('clipPath', overflow);\n }\n else {\n elem.removeAttribute('overflow');\n }\n }\n if(ovd.conClip !== conClip) {\n if(conClip) {\n elem.childNodes[1].setAttribute('clip-path', conClip);\n }\n else {\n elem.childNodes[1].removeAttribute('clip-path');\n }\n }\n}\n\nfunction diffByLessLv(elem, ovd, nvd, lv) {\n let { transform, opacity, mask, filter, mixBlendMode } = nvd;\n if(lv === NONE) {\n return;\n }\n if(mask) {\n elem.setAttribute('mask', mask);\n }\n else {\n elem.removeAttribute('mask');\n }\n if(lv & TRANSFORM_ALL) {\n if(transform) {\n elem.setAttribute('transform', transform);\n }\n else {\n elem.removeAttribute('transform');\n }\n }\n if(lv & OPACITY) {\n if(opacity !== 1 && opacity !== undefined) {\n elem.setAttribute('opacity', opacity);\n }\n else {\n elem.removeAttribute('opacity');\n }\n }\n if((lv & FILTER) || (lv & MIX_BLEND_MODE)) {\n let s = (filter ? `filter:${filter};` : '') + (mixBlendMode ? `mix-blend-mode:${mixBlendMode};` : '');\n if(s) {\n elem.setAttribute('style', s);\n }\n else {\n elem.removeAttribute('style');\n }\n }\n}\n\nfunction diffD2D(elem, ovd, nvd, root) {\n // cache表明children无变化缓存,一定是REPAINT以下的,只需看自身的lv以及mask\n if(nvd.cache) {\n diffByLessLv(elem, ovd, nvd, nvd.lv);\n return;\n }\n // 无cache且= i; j--) {\n removeAt(lastChild, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(lastChild, cns, i, joinVd(nvd.children[i]));\n }\n }\n}\n\nfunction diffD2G(elem, ovd, nvd) {\n diffX2X(elem, ovd, nvd);\n diffBb(elem.firstChild, ovd.bb, nvd.bb);\n let ol = ovd.children.length;\n let nl = nvd.children.length;\n let i = 0;\n let lastChild = elem.lastChild;\n let cns = lastChild.childNodes;\n for(; i < Math.min(ol, nl); i++) {\n replaceWith(cns[i], nvd.children[i]);\n }\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(lastChild, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(lastChild, cns, i, joinVd(nvd.children[i]));\n }\n }\n}\n\nfunction diffT2T(elem, ovd, nvd) {\n if(nvd.cache) {\n return;\n }\n let ol = ovd.children.length;\n let nl = nvd.children.length;\n let i = 0;\n for(; i < Math.min(ol, nl); i++) {\n diffItem(elem, i, ovd.children[i], nvd.children[i], true);\n }\n let cns = elem.childNodes;\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinVd(nvd.children[i]));\n }\n }\n}\n\nfunction diffG2D(elem, ovd, nvd) {\n diffD2G(elem, ovd, nvd);\n}\n\nfunction diffG2G(elem, ovd, nvd) {\n if(nvd.cache) {\n diffByLessLv(elem, ovd, nvd, nvd.lv);\n return;\n }\n // 无cache且= i; j--) {\n removeAt(lastChild, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(lastChild, cns, i, joinVd(nvd.children[i]));\n }\n }\n }\n}\n\nfunction diffBb(elem, obb, nbb) {\n let ol = obb.length;\n let nl = nbb.length;\n let i = 0;\n for(; i < Math.min(ol, nl); i++) {\n diffItem(elem, i, obb[i], nbb[i]);\n }\n let cns = elem.childNodes;\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinVd(nbb[i]));\n }\n }\n}\n\nfunction diffItem(elem, i, ovd, nvd, isText) {\n let cns = elem.childNodes;\n if(ovd.tagName !== nvd.tagName) {\n replaceWith(cns[i], nvd);\n }\n else {\n diffItemSelf(cns[i], ovd, nvd);\n if(isText && ovd.content !== nvd.content) {\n cns[i].innerHTML = nvd.content;\n }\n }\n}\n\nfunction diffItemSelf(elem, ovd, nvd) {\n if(nvd.cache) {\n return;\n }\n let op = {};\n for(let i = 0, len = (ovd.props || []).length; i < len; i++) {\n let prop = ovd.props[i];\n let [k, v] = prop;\n op[k] = v;\n }\n for(let i = 0, len = (nvd.props || []).length; i < len; i++) {\n let prop = nvd.props[i];\n let [k, v] = prop;\n // 已有不等更新,没有添加\n if(op.hasOwnProperty(k)) {\n if(op[k] !== v) {\n elem.setAttribute(k, v);\n }\n delete op[k];\n }\n else {\n elem.setAttribute(k, v);\n }\n }\n // 多余的删除\n Object.keys(op).forEach(i => {\n elem.removeAttribute(i);\n });\n}\n\nfunction replaceWith(elem, vd) {\n let res;\n if(Array.isArray(vd)) {\n res = '';\n vd.forEach(item => {\n res += joinVd(item);\n });\n }\n else {\n res = joinVd(vd);\n }\n insertAdjacentHTML(elem, 'beforebegin', res);\n // elem.insertAdjacentHTML('beforebegin', res);\n elem.parentNode.removeChild(elem);\n}\n\nfunction insertAt(elem, cns, index, html) {\n if(index >= cns.length) {\n insertAdjacentHTML(elem, 'beforeend', html);\n // elem.insertAdjacentHTML('beforeend', html);\n }\n else {\n insertAdjacentHTML(cns[index], 'beforebegin', html);\n // cns[index].insertAdjacentHTML('beforebegin', html);\n }\n}\n\nfunction removeAt(elem, cns, index) {\n if(cns[index]) {\n elem.removeChild(cns[index]);\n }\n}\n\nlet svg;\nfunction insertAdjacentHTML(elem, where, content) {\n if(elem.insertAdjacentHTML) {\n elem.insertAdjacentHTML(where, content);\n }\n else {\n switch(where) {\n case 'beforeend':\n elem.innerHTML += content;\n break;\n case 'beforebegin':\n svg = svg || document.createElement('svg');\n svg.innerHTML = content;\n elem.parentNode.insertBefore(svg.childNodes[0], elem);\n break;\n }\n }\n}\n\nexport default diff;\n","import util from '../util/util';\n\nconst { isFunction } = util;\n\nclass Controller {\n constructor() {\n this.__records = []; // 默认记录和自动记录\n this.__records2 = []; // 非自动播放的动画记录\n this.__list = [] // 默认初始化播放列表,自动播放也存这里\n this.__list2 = []; // json中autoPlay为false的初始化存入这里\n this.__onList = []; // list中已存在的侦听事件,list2初始化时也需要增加上\n this.__lastTime = {}; // 每个类型的上次触发时间,防止重复emit\n }\n\n add(v, list = this.list) {\n if(list.indexOf(v) === -1) {\n list.push(v);\n }\n }\n\n remove(v) {\n let i = this.list.indexOf(v);\n if(i > -1) {\n this.list.splice(i, 1);\n }\n }\n\n __destroy() {\n this.__records = [];\n this.__records2 = [];\n this.__list = [];\n this.__list2 = [];\n }\n\n __action(k, args) {\n this.list.forEach(item => {\n item[k].apply(item, args);\n });\n }\n\n init(records = this.__records, list = this.list) {\n // 检查尚未初始化的record,并初始化,后面才能调用各种控制方法\n if(records.length) {\n // 清除防止重复调用,并且新的json还会进入整体逻辑\n records.splice(0).forEach(item => {\n let { target, animate, offsetTime } = item;\n if(target.isDestroyed || !animate) {\n return;\n }\n if(!Array.isArray(animate)) {\n animate = [animate];\n }\n animate.forEach(animate => {\n let { value, options } = animate;\n options.autoPlay = false;\n if(offsetTime) {\n options = Object.assign({}, options); // clone防止多个使用相同的干扰\n options.delay = options.delay || 0;\n options.delay += offsetTime;\n }\n let o = target.animate(value, options);\n this.add(o, list);\n });\n });\n }\n // 非自动播放后初始化需检测事件,给非自动播放添加上,并清空本次\n if(records === this.__records2) {\n let onList = this.__onList;\n let list2 = this.list2;\n if(list2.length && onList.length) {\n list2.forEach(item => {\n onList.forEach(arr => {\n let cb = () => {\n let time = item.timestamp;\n if(time !== this.__lastTime[arr[0]]) {\n this.__lastTime[arr[0]] = time;\n arr[1] && arr[1]();\n }\n };\n cb.__karasEventCb = arr[1];\n item.off(arr[0], arr[1]);\n item.on(arr[0], cb);\n });\n });\n }\n }\n }\n\n __playAuto() {\n this.init();\n this.__action('play');\n }\n\n play(cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('play', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n pause() {\n this.__action('pause');\n }\n\n resume(cb) {\n let once = true;\n this.__action('resume', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n __mergeAuto() {\n this.init();\n this.init(this.__records2);\n if(this.__list2.length) {\n this.__list = this.__list.concat(this.__list2);\n this.__list2 = [];\n }\n }\n\n cancel(cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('cancel', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n finish(cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('finish', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n gotoAndStop(v, options, cb) {\n this.__mergeAuto();\n this.__onList = [];\n if(isFunction(options)) {\n cb = options;\n options = {};\n }\n let once = true;\n this.__action('gotoAndStop', [v, options, cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n gotoAndPlay(v, options, cb) {\n this.__mergeAuto();\n this.__onList = [];\n if(isFunction(options)) {\n cb = options;\n options = {};\n }\n let once = true;\n this.__action('gotoAndPlay', [v, options, cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n on(id, handle) {\n if(!isFunction(handle)) {\n return;\n }\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n this.__on(id[i], handle);\n }\n this.__onList.push([id, handle]);\n }\n else {\n this.__on(id, handle);\n this.__onList.push([id, handle]);\n }\n }\n\n __on(id, handle) {\n this.list.forEach(item => {\n let cb = () => {\n let time = item.timestamp;\n if(time !== this.__lastTime[id]) {\n this.__lastTime[id] = time;\n handle && handle();\n }\n };\n cb.__karasEventCb = handle;\n item.on(id, cb);\n });\n }\n\n off(id, handle) {\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n this.off(id[i], handle);\n }\n }\n else {\n this.list.forEach(item => {\n item.off(id, handle);\n });\n }\n }\n\n get list() {\n return this.__list;\n }\n\n get list2() {\n return this.__list2;\n }\n\n __set(key, value) {\n this.list.forEach(item => {\n item[key] = value;\n });\n }\n\n set playbackRate(v) {\n this.__set('playbackRate', v);\n }\n\n set iterations(v) {\n this.__set('iterations', v);\n }\n\n set playCount(v) {\n this.__set('playCount', v);\n }\n\n set fps(v) {\n this.__set('fps', v);\n }\n\n set currentTime(v) {\n this.__set('currentTime', v);\n }\n\n set spfLimit(v) {\n this.__set('spfLimit', v);\n }\n\n set delay(v) {\n this.__set('delay', v);\n }\n\n set endDelay(v) {\n this.__set('endDelay', v);\n }\n\n set fill(v) {\n this.__set('fill', v);\n }\n\n set direction(v) {\n this.__set('direction', v);\n }\n}\n\nexport default Controller;\n","/**\n * canvas和texture合图的基类,和Page类配合,抽象出基础尺寸偏差等信息\n * 派生2个子类\n */\n\nlet uuid = 0;\n\nclass Cache {\n constructor(renderMode, ctx, rootId, w, h, bbox, page, pos, x1, y1) {\n this.__uuid = uuid++;\n this.__renderMode = renderMode;\n this.__ctx = ctx;\n this.__rootId = rootId;\n this.__init(w, h, bbox, page, pos, x1, y1);\n }\n\n __init(w, h, bbox, page, pos, x1, y1) {\n this.__width = w;\n this.__height = h;\n this.__bbox = bbox;\n this.__page = page;\n this.__pos = pos;\n let { x, y } = page.getCoords(pos);\n this.__x = x;\n this.__y = y;\n let size = page.__size;\n this.__tx1 = x / size;\n this.__ty1 = (size - y - h) / size;\n this.__tx2 = (x + w) / size;\n this.__ty2 = (size - y) / size;\n this.__enabled = true;\n this.__available = false;\n this.__appendData(x1, y1);\n }\n\n __appendData(x1, y1) {\n this.x1 = x1; // 去除margin的左上角原点坐标\n this.y1 = y1;\n let bbox = this.__bbox;\n this.dx = this.__x - bbox[0]; // cache坐标和box原点的差值\n this.dy = this.__y - bbox[1];\n this.dbx = x1 - bbox[0]; // 原始sx1/sy1和box原点的差值\n this.dby = y1 - bbox[1];\n this.update();\n }\n\n update() {\n this.__page.__update = true;\n }\n\n clear() {\n if(this.__available) {\n this.__available = false;\n this.update();\n return true;\n }\n }\n\n // svg打标用会覆盖此方法\n release() {\n if(this.__enabled) {\n this.clear();\n this.__page.del(this.__pos);\n this.__page = null;\n this.__enabled = false;\n return true;\n }\n }\n\n reset(bbox, x1, y1, klass) {\n // 尺寸没变复用之前的并清空\n this.release();\n let w = Math.ceil(bbox[2] - bbox[0]);\n let h = Math.ceil(bbox[3] - bbox[1]);\n let res = klass.getInstance(this.__renderMode, this.__ctx, this.__rootId, Math.max(w, h), null);\n if(!res) {\n return;\n }\n let { page, pos } = res;\n this.__init(w, h, bbox, page, pos, x1, y1);\n }\n\n __offsetY(diff) {\n this.y1 += diff;\n let bbox = this.__bbox;\n bbox[1] += diff;\n bbox[3] += diff;\n this.dy -= diff;\n }\n\n get uuid() {\n return this.__uuid;\n }\n\n // 是否功能可用,生成离屏canvas及尺寸超限\n get enabled() {\n return this.__enabled;\n }\n\n // 是否有可用缓存内容\n get available() {\n return this.__enabled && this.__available;\n }\n\n get bbox() {\n return this.__bbox;\n }\n\n get page() {\n return this.__page;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get width() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get pos() {\n return this.__pos;\n }\n\n get size() {\n return this.__page.__size;\n }\n\n get texture() {\n return this.__page.texture;\n }\n\n static getInstance(renderMode, ctx, rootId, bbox, x1, y1, cacheKlass, pageKlass, excludePage) {\n let w = Math.ceil(bbox[2] - bbox[0]);\n let h = Math.ceil(bbox[3] - bbox[1]);\n let n = Math.max(w, h);\n if(n <= 0) {\n return;\n }\n let res = pageKlass.getInstance(renderMode, ctx, rootId, n, excludePage);\n if(!res) {\n return;\n }\n let { page, pos } = res;\n return new cacheKlass(renderMode, ctx, rootId, w, h, bbox, page, pos, x1, y1);\n }\n}\n\nexport default Cache;\n","/**\n * 默认的动态合图配置,保守低端机8个纹理单元和最大2048px尺寸,一般chrome是16个和16384px\n * webgl初始化会调用获取参数动态进行更改,16px是最小划分基本单位1,后续成2倍增长\n * 并不需要非常紧凑合理,因为特定需求如骨骼动画,合图都是前置做好的,这里应对临时的Dom位图\n * 应该尽可能避免纹理单元切换,因此设计固定的正方形尺寸,以2的幂次方增长,从16px开始到MAX\n * 每个texture从左到右按小到大排列,一列都为相同尺寸的正方形格子,用数组存储表示状态\n * 内容0为空白,1为单位1大小占用,2为2个单位1,如此成2倍增长,可能会形成这种状态:\n * 1 0 2 2 4 4 4 4 ...\n * 其中开头0位置是个单位1的正方形,1位置为空,2、3位置为一个2个单位的正方形,4、5、6、7是4个单位\n * 一张纹理存储时可以按照自己的bbox尺寸计算出正方形大小n,然后循环搜索,每次递增n,不必++遍历\n * 如此可满足不同尺寸分布在一张texture上的需求,碎片情况也较少,避免频繁纹理切换,清空置0\n * canvas模式时固定2048,是个保守值,当webgl第一次初始化,会改变这些值\n */\nconst UNIT = 16;\nlet MAX = 2048;\nlet NUMBER = 128;\nconst HASH = {};\n\nlet uuid = 0;\nlet init = false;\n\nclass Page {\n constructor(renderMode, ctx, size, number) {\n this.__size = size;\n this.__number = number;\n this.__width = this.__height = size;\n // 标识n*n个单元格是否空闲可用,一维数组表示\n let grid = [];\n for(let i = 0, len = number * number; i < len; i++) {\n grid.push(0);\n }\n this.__grid = new Int32Array(grid);\n this.__uuid = uuid++;\n // webgl贴图缓存更新使用,canvas/img等发生变更需刷新重新生成texture,fbo的texture不需要\n this.__update = false;\n this.time = 0;\n }\n\n add(unitSize, pos) {\n let { number, grid } = this;\n for(let i = pos; i < pos + unitSize; i++) {\n grid[i] = unitSize;\n for(let j = 1; j < unitSize; j++) {\n grid[i + j * number] = unitSize;\n }\n }\n }\n\n del(pos) {\n let { number, grid } = this;\n let u = grid[pos];\n if(u) {\n grid[pos] = 0;\n for(let i = pos; i < pos + u; i++) {\n grid[i] = 0;\n for(let j = 1; j < u; j++) {\n grid[i + j * number] = 0;\n }\n }\n }\n }\n\n getCoords(pos) {\n let { number } = this;\n let x = (pos % number) * UNIT;\n let y = Math.floor(pos / number) * UNIT;\n return { x, y };\n }\n\n getFreePos(unitSize) {\n let { number, grid } = this;\n outer:\n for(let i = 0; i < number; i++) {\n let u = grid[i];\n if(u) {\n if(u === unitSize) {\n // 找到同尺寸的列位置,向下查找空白区域确定行位置\n for(let j = unitSize; j < number; j += unitSize) {\n let n = i + j * number;\n if(!grid[n]) {\n return n;\n }\n }\n }\n else {\n i += u;\n }\n }\n else {\n // 空白列检查尺寸是否符合\n for(let j = i + 1, len = i + unitSize; j < len; j++) {\n if(grid[i]) {\n continue outer;\n }\n }\n return i;\n }\n }\n return -1;\n }\n\n get uuid() {\n return this.__uuid;\n }\n\n get size() {\n return this.__size;\n }\n\n get width() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get number() {\n return this.__number;\n }\n\n get grid() {\n return this.__grid;\n }\n\n get update() {\n return this.__update;\n }\n\n set update(v) {\n this.__update = v;\n }\n\n static getInstance(renderMode, ctx, rootId, size, klass, excludePage) {\n if(size > MAX) {\n return;\n }\n // 换算为每单位16px占多少单位\n let unitSize = 1;\n while((UNIT * unitSize) < size) {\n unitSize <<= 1;\n }\n let n = MAX;\n // 只有超过一定尺寸时用8192最大尺寸,大部分情况4096足够,且8192会轻微卡顿一下\n if(size <= 2048 && MAX === 8192) {\n n = 4096;\n }\n let key = rootId + ',' + renderMode;\n // 每个root复用自己的合图,webgl中为了隔离不同实例\n let list = HASH[key] = HASH[key] || [];\n let page, pos;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(excludePage && item === excludePage || item.__size !== n) {\n continue;\n }\n if((pos = item.getFreePos(unitSize)) > -1) {\n page = item;\n break;\n }\n }\n if(!page) {\n page = new klass(renderMode, ctx, n, NUMBER);\n pos = 0;\n list.push(page);\n }\n page.add(unitSize, pos);\n return { page, pos };\n }\n\n static get UNIT() {\n return UNIT;\n }\n\n static get MAX() {\n return MAX;\n }\n\n static set MAX(MAX_TEXTURE_SIZE) {\n // 确保MAX_TEXTURE_SIZE是2的幂级数,如果不是向下取整\n let n = 2;\n while(n < MAX_TEXTURE_SIZE) {\n n = n << 1;\n if(n >= MAX_TEXTURE_SIZE) {\n if(n > MAX_TEXTURE_SIZE) {\n n = n << 1;\n }\n break;\n }\n }\n MAX = n;\n NUMBER = Math.ceil(MAX / UNIT);\n }\n\n static get NUMBER() {\n return NUMBER;\n }\n\n static genUuid() {\n return uuid++;\n }\n\n static init(MAX_TEXTURE_SIZE) {\n if(init) {\n return;\n }\n init = true;\n if(MAX_TEXTURE_SIZE !== MAX) {\n // 超过限制会明显卡一下\n Page.MAX = Math.min(MAX_TEXTURE_SIZE, 8192);\n }\n }\n}\n\nexport default Page;\n","import mx from '../math/matrix';\n\nconst { calRectPoint, calPoint } = mx;\n\n/**\n * 初始化 shader\n * @param gl GL context\n * @param vshader vertex shader (string)\n * @param fshader fragment shader (string)\n * @return program, if the program object was created and successfully made current\n */\nfunction initShaders(gl, vshader, fshader) {\n let program = createProgram(gl, vshader, fshader);\n if(!program) {\n throw new Error('Failed to create program');\n }\n\n // 要开启透明度,用以绘制透明的图形\n gl.enable(gl.BLEND);\n // gl.enable(gl.DEPTH_TEST);\n // gl.enable(gl.POLYGON_OFFSET_FILL);\n gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n return program;\n}\n\n/**\n * Create the linked program object\n * @param gl GL context\n * @param vshader a vertex shader program (string)\n * @param fshader a fragment shader program (string)\n * @return created program object, or null if the creation has failed\n */\nfunction createProgram(gl, vshader, fshader) {\n // Create shader object\n let vertexShader = loadShader(gl, gl.VERTEX_SHADER, vshader);\n let fragmentShader = loadShader(gl, gl.FRAGMENT_SHADER, fshader);\n if(!vertexShader || !fragmentShader) {\n return null;\n }\n\n // Create a program object\n let program = gl.createProgram();\n if(!program) {\n return null;\n }\n program.vertexShader = vertexShader;\n program.fragmentShader = fragmentShader;\n\n // Attach the shader objects\n gl.attachShader(program, vertexShader);\n gl.attachShader(program, fragmentShader);\n\n // Link the program object\n gl.linkProgram(program);\n\n // Check the result of linking\n let linked = gl.getProgramParameter(program, gl.LINK_STATUS);\n if(!linked) {\n let error = gl.getProgramInfoLog(program);\n gl.deleteProgram(program);\n gl.deleteShader(fragmentShader);\n gl.deleteShader(vertexShader);\n throw new Error('Failed to link program: ' + error);\n }\n return program;\n}\n\n/**\n * Create a shader object\n * @param gl GL context\n * @param type the type of the shader object to be created\n * @param source shader program (string)\n * @return created shader object, or null if the creation has failed.\n */\nexport function loadShader(gl, type, source) {\n // Create shader object\n let shader = gl.createShader(type);\n if(shader == null) {\n throw new Error('unable to create shader');\n }\n\n // Set the shader program\n gl.shaderSource(shader, source);\n\n // Compile the shader\n gl.compileShader(shader);\n\n // Check the result of compilation\n let compiled = gl.getShaderParameter(shader, gl.COMPILE_STATUS);\n if(!compiled) {\n let error = gl.getShaderInfoLog(shader);\n gl.deleteShader(shader);\n throw new Error('Failed to compile shader: ' + error);\n }\n\n return shader;\n}\n\nfunction convertCoords2Gl(x, y, z, w, cx, cy, tz) {\n if(w && w !== 1) {\n x /= w;\n y /= w;\n z /= w;\n }\n if(x === cx) {\n x = 0;\n }\n else {\n x = (x - cx) / cx;\n }\n if(y === cy) {\n y = 0;\n }\n else {\n y = (cy - y) / cy;\n }\n if(tz) {\n z /= -tz;\n }\n if(w === 1) {\n return { x, y, z, w };\n }\n return { x: x * w, y: y * w, z: z * w, w };\n}\n\nfunction createTexture(gl, tex, n, width, height) {\n let texture = gl.createTexture();\n bindTexture(gl, texture, n);\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, 1);\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);\n // 传入高宽时是绑定fbo,且tex一定为null\n if(width && height) {\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);\n }\n // 普通将canvas对象作为纹理\n else {\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, tex);\n }\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n return texture;\n}\n\nfunction bindTexture(gl, texture, n) {\n gl.activeTexture(gl['TEXTURE' + n]);\n gl.bindTexture(gl.TEXTURE_2D, texture);\n}\n\nlet lastVtPoint, lastVtTex, lastVtOpacity;\n/**\n * texCache集满纹理上传占用最多可用纹理单元后,进行批量顺序绘制\n * 将所有dom的矩形顶点(经过transform变换后的)、贴图坐标、透明度存入3个buffer中,\n * 然后相同纹理单元的形成一批,设置uniform的纹理单元号进行绘制,如此循环\n */\nfunction drawTextureCache(gl, list, cx, cy, dx, dy) {\n let length = list.length;\n if(!length) {\n return;\n }\n let vtPoint, vtTex, vtOpacity;\n if(lastVtPoint && lastVtPoint.length === length * 24) {\n vtPoint = lastVtPoint;\n }\n else {\n vtPoint = lastVtPoint = new Float32Array(length * 24);\n }\n if(lastVtTex && lastVtTex.length === length * 12) {\n vtTex = lastVtTex;\n }\n else {\n vtTex = lastVtTex = new Float32Array(length * 12);\n }\n if(lastVtOpacity && lastVtOpacity.length === length * 6) {\n vtOpacity = lastVtOpacity;\n }\n else {\n vtOpacity = lastVtOpacity = new Float32Array(length * 6);\n }\n for(let i = 0; i < length; i++) {\n let { cache, opacity, matrix } = list[i];\n let { __width: width, __height: height,\n __tx1: tx1, __ty1: ty1, __tx2: tx2, __ty2: ty2,\n __page: page, __bbox: bbox } = cache;\n if(!i) {\n // canvas需要生成texture,texture则强制不会进来\n if(page.__update) {\n page.genTexture(gl);\n }\n bindTexture(gl, page.texture, 0);\n }\n // 计算顶点坐标和纹理坐标,转换[0,1]对应关系\n let bx = bbox[0], by = bbox[1];\n let xa = bx + dx, ya = by + height + dy;\n let xb = bx + width + dx, yb = by + dy;\n let { x1, y1, z1, w1, x2, y2, z2, w2, x3, y3, z3, w3, x4, y4, z4, w4 } = calRectPoint(xa, ya, xb, yb, matrix);\n // console.warn(x1,y1,z1,w1,',',x2,y2,z2,w2,',',x3,y3,z3,w3,',',x4,y4,z4,w4);\n // z范围取所有、对角线最大值,只有当非0有值时才求\n let z = Math.max(Math.abs(z1), Math.abs(z2));\n z = Math.max(z, Math.abs(z3));\n z = Math.max(z, Math.abs(z4));\n if(z) {\n z = Math.max(z, Math.sqrt(cx * cx + cy * cy));\n }\n let t = convertCoords2Gl(x1, y1, z1, w1, cx, cy, z);\n x1 = t.x; y1 = t.y; z1 = t.z;\n t = convertCoords2Gl(x2, y2, z2, w2, cx, cy, z);\n x2 = t.x; y2 = t.y; z2 = t.z;\n t = convertCoords2Gl(x3, y3, z3, w3, cx, cy, z);\n x3 = t.x; y3 = t.y; z3 = t.z;\n t = convertCoords2Gl(x4, y4, z4, w4, cx, cy, z);\n x4 = t.x; y4 = t.y; z4 = t.z;\n // console.log(x1,y1,z1,w1,',',x2,y2,z2,w2,',',x3,y3,z3,w3,',',x4,y4,z4,w4);\n let j = i * 24;\n vtPoint[j] = x1;\n vtPoint[j + 1] = y1;\n vtPoint[j + 2] = z1;\n vtPoint[j + 3] = w1;\n vtPoint[j + 4] = x4;\n vtPoint[j + 5] = y4;\n vtPoint[j + 6] = z4;\n vtPoint[j + 7] = w4;\n vtPoint[j + 8] = x2;\n vtPoint[j + 9] = y2;\n vtPoint[j + 10] = z2;\n vtPoint[j + 11] = w2;\n vtPoint[j + 12] = x4;\n vtPoint[j + 13] = y4;\n vtPoint[j + 14] = z4;\n vtPoint[j + 15] = w4;\n vtPoint[j + 16] = x2;\n vtPoint[j + 17] = y2;\n vtPoint[j + 18] = z2;\n vtPoint[j + 19] = w2;\n vtPoint[j + 20] = x3;\n vtPoint[j + 21] = y3;\n vtPoint[j + 22] = z3;\n vtPoint[j + 23] = w3;\n j = i * 12;\n vtTex[j] = tx1;\n vtTex[j + 1] = ty1;\n vtTex[j + 2] = tx1;\n vtTex[j + 3] = ty2;\n vtTex[j + 4] = tx2;\n vtTex[j + 5] = ty1;\n vtTex[j + 6] = tx1;\n vtTex[j + 7] = ty2;\n vtTex[j + 8] = tx2;\n vtTex[j + 9] = ty1;\n vtTex[j + 10] = tx2;\n vtTex[j + 11] = ty2;\n j = i * 6;\n vtOpacity[j] = opacity;\n vtOpacity[j + 1] = opacity;\n vtOpacity[j + 2] = opacity;\n vtOpacity[j + 3] = opacity;\n vtOpacity[j + 4] = opacity;\n vtOpacity[j + 5] = opacity;\n }\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, vtPoint, gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(gl.program, 'a_position');\n gl.vertexAttribPointer(a_position, 4, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, vtTex, gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(gl.program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, vtOpacity, gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n let u_texture = gl.getUniformLocation(gl.program, 'u_texture');\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, length * 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.deleteBuffer(opacityBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.disableVertexAttribArray(a_opacity);\n}\n\n/**\n * https://www.w3.org/TR/2018/WD-filter-effects-1-20181218/#feGaussianBlurElement\n * 根据cacheTotal生成cacheFilter,按照css规范的优化方法执行3次,避免卷积核扩大3倍性能慢\n * x/y方向分开执行,加速性能,计算次数由d*d变为d+d,d为卷积核大小\n * spread由d和sigma计算得出,d由sigma计算得出,sigma即css的blur()参数\n * 规范的优化方法对d的值分奇偶优化,这里再次简化,d一定是奇数,即卷积核大小\n * i和j为filter和total的纹理单元,3次执行(x/y合起来算1次)需互换单元,来回执行源和结果\n * 由total变为filter时cache会各方向上扩展spread的大小到width/height\n */\nfunction drawBlur(gl, program, tex1, width, height) {\n gl.useProgram(program);\n gl.viewport(0, 0, width, height);\n /**\n * 注意max和ratio的设置,当是100尺寸的正方形时,传给direction的始终为1\n * 当正方形<100时,direction相应地要扩大相对于100的倍数,反之则缩小,如此为了取相邻点坐标时是+-1\n * 当非正方形时,长轴一端为基准值不变,短的要二次扩大比例倍数\n * tex1和tex2来回3次,最后是到tex1\n */\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n let u_direction = gl.getUniformLocation(program, 'u_direction');\n let recycle = []; // 3次过程中新生成的中间纹理需要回收\n let max = 100 / Math.max(width, height);\n let ratio = width / height;\n for(let n = 0; n < 3; n++) {\n // tex1到tex2\n let tex2 = createTexture(gl, null, 1, width, height);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex2, 0);\n bindTexture(gl, tex1, 0);\n if(width >= height) {\n gl.uniform2f(u_direction, max, 0);\n }\n else {\n gl.uniform2f(u_direction, max * ratio, 0);\n }\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n // tex2到tex1\n let tex3 = createTexture(gl, null, 0, width, height);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex3, 0);\n bindTexture(gl, tex2, 1);\n if(width >= height) {\n gl.uniform2f(u_direction, 0, max * ratio);\n }\n else {\n gl.uniform2f(u_direction, 0, max);\n }\n gl.uniform1i(u_texture, 1);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n recycle.push(tex1);\n recycle.push(tex2);\n tex1 = tex3;\n }\n // 0/1单元都解绑\n bindTexture(gl, null, 0);\n bindTexture(gl, null, 1);\n // 回收\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n recycle.forEach(item => gl.deleteTexture(item));\n return tex1;\n}\n\nfunction drawCm(gl, program, target, source, m, center, size) {\n gl.useProgram(program);\n bindTexture(gl, source.__page.texture, 0);\n gl.viewport(0, 0, size, size);\n let { x: tx1, y: ty1, width: w1, height: h1 } = target;\n let { x: tx2, y: ty2, width: w2, height: h2 } = source;\n let { x: x1, y: y2 } = convertCoords2Gl(tx1, ty1 + h1, 0, 1, center, center);\n let { x: x2, y: y1 } = convertCoords2Gl(tx1 + w1, ty1, 0, 1, center, center);\n let xa = tx2 / size, ya = (size - ty2) / size, xb = (tx2 + w2) / size, yb = (size - ty2 - h2) / size;\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n xa, ya,\n xa, yb,\n xb, ya,\n xa, yb,\n xb, ya,\n xb, yb,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n gl.uniform1i(u_texture, 0);\n // matrix\n let u_m = gl.getUniformLocation(program, 'u_m');\n gl.uniform1fv(u_m, new Float32Array(m));\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n // 回收\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n bindTexture(gl, null, 0);\n}\n\n/**\n * 根据total/filter生成overflow\n */\nfunction drawOverflow(gl, program, target, source, center, size) {\n gl.useProgram(program);\n let { x: tx1, y: ty1, width: w1, height: h1, bbox: bbox1 } = target;\n let { x: tx2, y: ty2, bbox: bbox2 } = source;\n let dx = bbox1[0] - bbox2[0], dy = bbox1[1] - bbox2[1];\n gl.viewport(0, 0, size, size);\n let { x: x1, y: y2 } = convertCoords2Gl(tx1, ty1 + h1, 0, 1, center, center);\n let { x: x2, y: y1 } = convertCoords2Gl(tx1 + w1, ty1, 0, 1, center, center);\n let xa = (tx2 + dx) / size, ya = (size - ty2 - dy) / size, xb = (tx2 + w1 + dx) / size, yb = (size - ty2 - h1 - dy) / size;\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n xa, ya,\n xa, yb,\n xb, ya,\n xa, yb,\n xb, ya,\n xb, yb,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n bindTexture(gl, source.__page.texture, 0);\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n // 回收\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n}\n\nfunction drawMask(gl, program, target, source, temp, center, size) {\n gl.useProgram(program);\n bindTexture(gl, source.__page.texture, 0);\n bindTexture(gl, temp, 1);\n gl.viewport(0, 0, size, size);\n let { x: tx1, y: ty1, width: w1, height: h1 } = target;\n let { x: tx2, y: ty2, width: w2, height: h2 } = source;\n let { x: x1, y: y2 } = convertCoords2Gl(tx1, ty1 + h1, 0, 1, center, center);\n let { x: x2, y: y1 } = convertCoords2Gl(tx1 + w1, ty1, 0, 1, center, center);\n let xa = tx2 / size, ya = (size - ty2) / size, xb = (tx2 + w2) / size, yb = (size - ty2 - h2) / size;\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer1 = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer1);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n xa, ya,\n xa, yb,\n xb, ya,\n xa, yb,\n xb, ya,\n xb, yb,\n ]), gl.STATIC_DRAW);\n let a_texCoords1 = gl.getAttribLocation(program, 'a_texCoords1');\n gl.vertexAttribPointer(a_texCoords1, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords1);\n let texBuffer2 = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer2);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 1,\n 0, 0,\n 1, 1,\n 0, 0,\n 1, 1,\n 1, 0,\n ]), gl.STATIC_DRAW);\n let a_texCoords2 = gl.getAttribLocation(program, 'a_texCoords2');\n gl.vertexAttribPointer(a_texCoords2, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords2);\n // 纹理单元\n let u_texture1 = gl.getUniformLocation(program, 'u_texture1');\n gl.uniform1i(u_texture1, 0);\n let u_texture2 = gl.getUniformLocation(program, 'u_texture2');\n gl.uniform1i(u_texture2, 1);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer1);\n gl.deleteBuffer(texBuffer2);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords1);\n gl.disableVertexAttribArray(a_texCoords2);\n gl.deleteTexture(temp);\n gl.bindTexture(gl.TEXTURE_2D, null);\n bindTexture(gl, null, 0);\n bindTexture(gl, null, 1);\n}\n\nfunction drawMbm(gl, program, tex1, tex2) {\n bindTexture(gl, tex1, 0);\n bindTexture(gl, tex2, 1);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture1 = gl.getUniformLocation(program, 'u_texture1');\n gl.uniform1i(u_texture1, 0);\n let u_texture2 = gl.getUniformLocation(program, 'u_texture2');\n gl.uniform1i(u_texture2, 1);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n}\n\nfunction drawDropShadow(gl, program, frameBuffer, cache, color, w1, w2, h1, h2) {\n gl.useProgram(program);\n let { x, y, width, height, __page: page } = cache;\n let size = page.size, texture = page.texture;\n let xa = x / size, ya = (size - y) / size, xb = (x + width) / size, yb = (size - y - height) / size;\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n let w = w1 / w2, h = h1 / h2;\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -w, -h,\n -w, h,\n w, -h,\n -w, h,\n w, -h,\n w, h,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n xa, yb,\n xa, ya,\n xb, yb,\n xa, ya,\n xb, yb,\n xb, ya,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n bindTexture(gl, texture, 0);\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n gl.uniform1i(u_texture, 0);\n // color\n let u_color = gl.getUniformLocation(program, 'u_color');\n gl.uniform1fv(u_color, new Float32Array([color[0] / 255, color[1] / 255, color[2] / 255, color[3]]));\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n // 回收\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n bindTexture(gl, null, 0);\n}\n\nfunction drawDropShadowMerge(gl, target, size, tex1, dx1, dy1, w, h, tex2, dx2, dy2, width, height) {\n let { x, y } = target;\n let center = size * 0.5;\n let { x: x1, y: y2 } = convertCoords2Gl(x + dx1, y + h + dy1, 0, 1, center, center);\n let { x: x2, y: y1 } = convertCoords2Gl(x + w + dx1, y + dy1, 0, 1, center, center);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(gl.program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 1,\n 0, 0,\n 1, 1,\n 0, 0,\n 1, 1,\n 1, 0,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(gl.program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1, 1, 1, 1, 1, 1]), gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n bindTexture(gl, tex1, 0);\n let u_texture = gl.getUniformLocation(gl.program, 'u_texture');\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n\n let { x: x3, y: y4 } = convertCoords2Gl(x + dx2, y + height + dy2, 0, 1, center, center);\n let { x: x4, y: y3 } = convertCoords2Gl(x + width + dx2, y + dy2, 0, 1, center, center);\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x3, y3,\n x3, y4,\n x4, y3,\n x3, y4,\n x4, y3,\n x4, y4,\n ]), gl.STATIC_DRAW);\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1, 1, 1, 1, 1, 1]), gl.STATIC_DRAW);\n bindTexture(gl, tex2, 0);\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n bindTexture(gl, null, 0);\n}\n\nfunction drawTex2Cache(gl, program, cache, tex, width, height) {\n gl.useProgram(program);\n let page = cache.__page, size = page.__size;\n gl.viewport(0, 0, size, size);\n let x = cache.x, y = cache.y, center = size * 0.5;\n let { x: x1, y: y2 } = convertCoords2Gl(x, y + height, 0, 1, center, center);\n let { x: x2, y: y1 } = convertCoords2Gl(x + width, y, 0, 1, center, center);\n bindTexture(gl, tex, 0);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 1,\n 0, 0,\n 1, 1,\n 0, 0,\n 1, 1,\n 1, 0,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 透明度buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1, 1, 1, 1, 1, 1]), gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n bindTexture(gl, tex, 0);\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.deleteBuffer(opacityBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.disableVertexAttribArray(a_opacity);\n gl.bindTexture(gl.TEXTURE_2D, null);\n}\n\nfunction drawCache2Tex(gl, program, cache, width, height, spread) {\n let { x: tx1, y: ty1, width: w1, height: h1, __page: { texture, size } } = cache;\n gl.useProgram(program);\n gl.viewport(0, 0, width, height);\n // 首先将cache的纹理原状绘制到tex1上,为后续3次循环做准备,注意扩充的spread距离\n let cx = width * 0.5, cy = height * 0.5;\n let { x: x1, y: y2 } = convertCoords2Gl(spread, height - spread, 0, 1, cx, cy);\n let { x: x2, y: y1 } = convertCoords2Gl(width - spread, spread, 0, 1, cx, cy);\n let xa = tx1 / size, ya = (size - ty1) / size, xb = (tx1 + w1) / size, yb = (size - ty1 - h1) / size;\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n xa, ya,\n xa, yb,\n xb, ya,\n xa, yb,\n xb, ya,\n xb, yb,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1, 1, 1, 1, 1, 1]), gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n bindTexture(gl, texture, 0);\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n}\n\nfunction drawSameSize(gl, tex, opacity) {\n let program = gl.programSs;\n gl.useProgram(program);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n gl.uniform1i(u_texture, 0);\n bindTexture(gl, tex, 0);\n let u_opacity = gl.getUniformLocation(program, 'u_opacity');\n gl.uniform1f(u_opacity, opacity);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.useProgram(gl.program);\n}\n\nfunction drawOitPlane(gl, structs, list, ppt, cx, cy, dx, dy) {\n let pointBuffer = gl.createBuffer();\n let a_position = gl.getAttribLocation(gl.program, 'a_position');\n let texBuffer = gl.createBuffer();\n let a_texCoords = gl.getAttribLocation(gl.program, 'a_texCoords');\n let opacityBuffer = gl.createBuffer();\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n let u_texture = gl.getUniformLocation(gl.program, 'u_texture');\n // 循环所有顺序拼图/平面\n for(let i = 0, len = list.length; i < len; i++) {\n let { isPuzzle, node, target, points } = list[i];\n let { __width: width, __height: height,\n __tx1: tx1, __ty1: ty1, __tx2: tx2, __ty2: ty2,\n __page: page, __bbox: bbox } = target;\n // 固定绑定纹理0号单元\n if(page.__update) {\n page.genTexture(gl);\n }\n bindTexture(gl, page.texture, 0);\n let bx = bbox[0], by = bbox[1];\n let opacity = node.__opacity;\n let matrix = node.__matrixEvent;\n let tw = tx2 - tx1, th = ty2 - ty1;\n // 先按照没有拆分拼图的情况求出节点的四个顶点坐标列表,可能有重复利用hash缓存\n let vtPoint = [], vtTex = [], vtOpacity = [];\n let pHash = [], tHash = [];\n if(isPuzzle) {\n // 拼接三角形,以起点为初始点链接其它所有顶点组成n-2个三角形\n let x0, y0, z0, w0;\n let p = points[0];\n let o = calPoint({\n x: bx + dx + p.px * width,\n y: by + dy + p.py * height,\n z: 0,\n w: 1,\n }, matrix);\n w0 = o.w;\n let t = convertCoords2Gl(o.x, o.y, o.z, w0, cx, cy, ppt);\n x0 = t.x; y0 = t.y; z0 = t.z;\n let tx0 = tx1 + p.px * tw, ty0 = ty1 + p.py * th;\n // 每次循环以第0个点为起点\n for(let j = 1, len = points.length; j < len - 1; j++) {\n vtPoint.push(x0);\n vtPoint.push(y0);\n vtPoint.push(z0);\n vtPoint.push(w0);\n vtTex.push(tx0);\n vtTex.push(ty0);\n vtOpacity.push(opacity);\n // 依次的2个相邻点\n for(let k = j; k < j + 2; k++) {\n let p = points[k];\n let x, y, z, w;\n let hashP = pHash[k];\n if(hashP) {\n x = hashP.x;\n y = hashP.y;\n z = hashP.z;\n w = hashP.w;\n }\n else {\n let o = calPoint({\n x: bx + dx + p.px * width,\n y: by + dy + p.py * height,\n z: 0,\n w: 1,\n }, matrix);\n w = o.w;\n let t = convertCoords2Gl(o.x, o.y, o.z, w, cx, cy, ppt);\n x = t.x; y = t.y; z = t.z;\n pHash[k] = {\n x,\n y,\n z,\n w,\n };\n }\n vtPoint.push(x);\n vtPoint.push(y);\n vtPoint.push(z);\n vtPoint.push(w);\n let tx, ty;\n let hashT = tHash[k];\n if(hashT) {\n tx = hashT.tx;\n ty = hashT.ty;\n }\n else {\n tx = tx1 + p.px * tw;\n ty = ty1 + p.py * th;\n tHash[k] = {\n tx,\n ty,\n };\n }\n vtTex.push(tx);\n vtTex.push(ty);\n vtOpacity.push(opacity);\n }\n }\n }\n else {\n let xa = bx + dx, ya = by + height + dy;\n let xb = bx + width + dx, yb = by + dy;\n let { x1, y1, z1, w1, x2, y2, z2, w2, x3, y3, z3, w3, x4, y4, z4, w4 } = calRectPoint(xa, ya, xb, yb, matrix);\n let t = convertCoords2Gl(x1, y1, z1, w1, cx, cy, ppt);\n x1 = t.x; y1 = t.y; z1 = t.z;\n t = convertCoords2Gl(x2, y2, z2, w2, cx, cy, ppt);\n x2 = t.x; y2 = t.y; z2 = t.z;\n t = convertCoords2Gl(x3, y3, z3, w3, cx, cy, ppt);\n x3 = t.x; y3 = t.y; z3 = t.z;\n t = convertCoords2Gl(x4, y4, z4, w4, cx, cy, ppt);\n x4 = t.x; y4 = t.y; z4 = t.z;\n vtPoint[0] = x1;\n vtPoint[1] = y1;\n vtPoint[2] = z1;\n vtPoint[3] = w1;\n vtPoint[4] = x4;\n vtPoint[5] = y4;\n vtPoint[6] = z4;\n vtPoint[7] = w4;\n vtPoint[8] = x2;\n vtPoint[9] = y2;\n vtPoint[10] = z2;\n vtPoint[11] = w2;\n vtPoint[12] = x4;\n vtPoint[13] = y4;\n vtPoint[14] = z4;\n vtPoint[15] = w4;\n vtPoint[16] = x2;\n vtPoint[17] = y2;\n vtPoint[18] = z2;\n vtPoint[19] = w2;\n vtPoint[20] = x3;\n vtPoint[21] = y3;\n vtPoint[22] = z3;\n vtPoint[23] = w3;\n vtTex[0] = tx1;\n vtTex[1] = ty1;\n vtTex[2] = tx1;\n vtTex[3] = ty2;\n vtTex[4] = tx2;\n vtTex[5] = ty1;\n vtTex[6] = tx1;\n vtTex[7] = ty2;\n vtTex[8] = tx2;\n vtTex[9] = ty1;\n vtTex[10] = tx2;\n vtTex[11] = ty2;\n vtOpacity[0] = opacity;\n vtOpacity[1] = opacity;\n vtOpacity[2] = opacity;\n vtOpacity[3] = opacity;\n vtOpacity[4] = opacity;\n vtOpacity[5] = opacity;\n }\n // 顶点buffer\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtPoint), gl.STATIC_DRAW);\n gl.vertexAttribPointer(a_position, 4, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtTex), gl.STATIC_DRAW);\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtOpacity), gl.STATIC_DRAW);\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, vtOpacity.length);\n }\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.deleteBuffer(opacityBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.disableVertexAttribArray(a_opacity);\n}\n\nexport default {\n initShaders,\n convertCoords2Gl,\n createTexture,\n bindTexture,\n drawTextureCache,\n drawBlur,\n drawOverflow,\n drawMask,\n drawMbm,\n drawCm,\n drawDropShadow,\n drawDropShadowMerge,\n drawTex2Cache,\n drawCache2Tex,\n drawSameSize,\n drawOitPlane,\n};\n","import Page from './Page';\nimport webgl from '../gl/webgl';\nimport inject from '../util/inject';\n\nclass CanvasPage extends Page {\n constructor(renderMode, ctx, size, number) {\n super(renderMode, ctx, size, number);\n this.__offscreen = inject.getOffscreenCanvas(size, size, null, number);\n }\n\n genTexture(gl) {\n if(this.__update) {\n this.__update = false;\n let t = this.texture;\n if(t) {\n gl.deleteTexture(t);\n }\n this.texture = webgl.createTexture(gl, this.__offscreen.canvas, 0, null, null); // 默认0单元\n gl.bindTexture(gl.TEXTURE_2D, null);\n }\n }\n\n get offscreen() {\n return this.__offscreen;\n }\n\n get canvas() {\n return this.__offscreen.canvas;\n }\n\n get ctx() {\n return this.__offscreen.ctx;\n }\n\n get update() {\n return this.__update;\n }\n\n set update(v) {\n this.__update = v;\n }\n\n static getInstance(renderMode, ctx, rootId, size, excludePage) {\n return super.getInstance(renderMode, ctx, rootId, size, this, excludePage);\n }\n}\n\nexport default CanvasPage;\n","import Cache from './Cache';\nimport CanvasPage from './CanvasPage';\nimport inject from '../util/inject';\nimport painter from '../util/painter';\nimport tf from '../style/transform';\nimport enums from '../util/enums';\nimport css from '../style/css';\nimport mx from '../math/matrix';\n\nconst {\n STYLE_KEY: {\n TRANSFORM_ORIGIN,\n TRANSFORM,\n },\n} = enums;\nconst { spreadFilter } = css;\nconst { isE } = mx;\n\nclass CanvasCache extends Cache {\n constructor(renderMode, ctx, rootId, w, h, bbox, page, pos, x1, y1) {\n super(renderMode, ctx, rootId, w, h, bbox, page, pos, x1, y1);\n }\n\n clear() {\n if(super.clear()) {\n this.__available = false;\n let page = this.__page, ctx = page.ctx;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(this.__x, this.__y, this.__width, this.__height);\n }\n }\n\n reset(bbox, x1, y1) {\n return super.reset(bbox, x1, y1, CanvasPage);\n }\n\n get canvas() {\n return this.__page.canvas;\n }\n\n get ctx() {\n return this.__page.ctx;\n }\n\n static getInstance(renderMode, ctx, rootId, bbox, x1, y1, excludePage) {\n return super.getInstance(renderMode, ctx, rootId, bbox, x1, y1, this, CanvasPage, excludePage);\n }\n\n /**\n * 复制cache的一块出来单独作为cacheFilter,尺寸边距保持一致,用浏览器原生ctx.filter滤镜\n * @param cache\n * @param filter\n */\n static genFilter(cache, filter) {\n let { x, y, size, canvas, x1, y1, width, height, bbox } = cache;\n let oldX1 = bbox[0];\n bbox = spreadFilter(bbox, filter);\n let d = oldX1 - bbox[0];\n let widthNew = bbox[2] - bbox[0];\n let heightNew = bbox[3] - bbox[1];\n let offscreen = inject.getOffscreenCanvas(widthNew, heightNew, null, 'filter');\n offscreen.ctx.filter = painter.canvasFilter(filter);\n offscreen.ctx.drawImage(canvas, x, y, width, height, d, d, width, height);\n offscreen.ctx.filter = 'none';\n offscreen.bbox = bbox;\n // 单独的离屏,其dx/dy要重算\n offscreen.x = 0;\n offscreen.y = 0;\n offscreen.size = size;\n offscreen.x1 = x1;\n offscreen.y1 = y1;\n offscreen.dx = -bbox[0];\n offscreen.dy = -bbox[1];\n offscreen.dbx = cache.dbx + d;\n offscreen.dby = cache.dby + d;\n offscreen.width = widthNew;\n offscreen.height = heightNew;\n return offscreen;\n }\n\n static genMask(target, node, callback) {\n let cacheMask = genSingle(target, 'mask1');\n let list = [];\n let { [TRANSFORM]: transform, [TRANSFORM_ORIGIN]: tfo } = node.__computedStyle;\n let next = node.next;\n let isClip = next.__clip;\n while(next && next.__mask) {\n list.push(next);\n next = next.next;\n }\n let { x, y, ctx, dbx, dby } = cacheMask;\n let inverse = tf.calMatrixByOrigin(transform, tfo[0] + x + dbx, tfo[1] + y + dby);\n if(isE(inverse)) {\n inverse = null;\n }\n // 先将mask本身绘制到cache上,再设置模式绘制dom本身\n list.forEach(item => {\n callback(item, cacheMask, inverse);\n });\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n ctx.globalCompositeOperation = isClip ? 'source-out' : 'source-in';\n CanvasCache.drawCache(target, cacheMask);\n ctx.globalCompositeOperation = 'source-over';\n return cacheMask;\n }\n\n\n static drawCache(source, target) {\n let { x: tx, y: ty, x1, y1, ctx, dbx, dby } = target;\n let { x, y, canvas, x1: x2, y1: y2, dbx: dbx2, dby: dby2, width, height } = source;\n let ox = tx + x2 - x1 + dbx - dbx2;\n let oy = ty + y2 - y1 + dby - dby2;\n ctx.drawImage(canvas, x, y, width, height, ox, oy, width, height);\n }\n}\n\n// 根据一个共享cache的信息,生成一个独立的离屏canvas,一般是filter,mask用,可能尺寸会发生变化\nfunction genSingle(cache, message, bboxNew) {\n let { size, x1, y1, bbox } = cache;\n bboxNew = bboxNew || bbox;\n let width = bboxNew[2] - bboxNew[0];\n let height = bboxNew[3] - bboxNew[1];\n let dx = bboxNew[0] - bbox[0];\n let dy = bboxNew[1] - bbox[1];\n let offscreen = inject.getOffscreenCanvas(width, height, null, message);\n offscreen.x = 0;\n offscreen.y = 0;\n offscreen.bbox = bboxNew;\n offscreen.size = size;\n offscreen.x1 = x1;\n offscreen.y1 = y1;\n offscreen.dx = -bboxNew[0];\n offscreen.dy = -bboxNew[1];\n offscreen.dbx = cache.dbx - dx;\n offscreen.dby = cache.dby - dy;\n offscreen.width = width;\n offscreen.height = height;\n return offscreen;\n}\n\nexport default CanvasCache;\n","import inject from '../util/inject';\nimport painter from '../util/painter';\n\nconst { canvasPolygon } = painter;\n\n// 无cache时应用离屏时的优先级,从小到大,OFFSCREEN_MASK2是个特殊的\nconst OFFSCREEN_OVERFLOW = 0;\nconst OFFSCREEN_FILTER = 1;\nconst OFFSCREEN_MASK = 2;\nconst OFFSCREEN_BLEND = 3;\nconst OFFSCREEN_MASK2 = 4;\n\nfunction applyOffscreen(ctx, list, width, height) {\n list.sort(function(a, b) {\n if(a.lv === b.lv) {\n if(a.idx === b.idx) {\n return a.type - b.type;\n }\n return b.idx - a.idx;\n }\n return b.lv - a.lv;\n });\n list.forEach(item => {\n let { type, offscreen } = item;\n if(type === OFFSCREEN_OVERFLOW) {\n let { matrix, target, ctx: origin, x, y, offsetWidth, offsetHeight, list } = offscreen;\n ctx.globalCompositeOperation = 'destination-in';\n ctx.globalAlpha = 1;\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n ctx.fillStyle = '#FFF';\n ctx.beginPath();\n if(list) {\n canvasPolygon(ctx, list);\n }\n else {\n ctx.rect(x, y, offsetWidth, offsetHeight);\n }\n ctx.fill();\n ctx.closePath();\n ctx.globalCompositeOperation = 'source-over';\n ctx = origin;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n if(width && height) {\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n }\n else if(type === OFFSCREEN_FILTER) {\n let { target, ctx: origin, filter } = offscreen;\n // 申请一个新的离屏,应用blur并绘制,如没有则降级,默认ctx.filter为'none'\n if(ctx.filter) {\n let apply = inject.getOffscreenCanvas(width, height, null, 'filter2');\n apply.ctx.filter = painter.canvasFilter(filter);\n if(width && height) {\n apply.ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n apply.ctx.filter = 'none';\n target.ctx.globalAlpha = 1;\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n if(width && height) {\n target.ctx.drawImage(apply.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n apply.ctx.setTransform(1, 0, 0, 1, 0, 0);\n apply.ctx.clearRect(0, 0, width, height);\n }\n // 绘制回主画布,如果不支持则等同无filter原样绘制\n ctx = origin;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n if(width && height) {\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.globalAlpha = 1;\n target.ctx.clearRect(0, 0, width, height);\n }\n else if(type === OFFSCREEN_MASK) {\n let { mask, isClip } = offscreen;\n if(isClip) {\n ctx = mask.ctx;\n ctx.globalCompositeOperation = 'source-out';\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n if(width && height) {\n ctx.drawImage(offscreen.target.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n ctx.globalCompositeOperation = 'source-over';\n offscreen.target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n offscreen.target.ctx.clearRect(0, 0, width, height);\n ctx = offscreen.ctx;\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n if(width && height) {\n ctx.drawImage(mask.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n mask.ctx.setTransform(1, 0, 0, 1, 0, 0);\n mask.ctx.clearRect(0, 0, width, height);\n }\n else {\n let target = offscreen.target;\n ctx = target.ctx;\n ctx.globalCompositeOperation = 'destination-in';\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n if(width && height) {\n ctx.drawImage(mask.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n ctx.globalCompositeOperation = 'source-over';\n mask.ctx.setTransform(1, 0, 0, 1, 0, 0);\n mask.ctx.clearRect(0, 0, width, height);\n ctx = offscreen.ctx;\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n if(width && height) {\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n }\n }\n else if(type === OFFSCREEN_BLEND) {\n let target = offscreen.target;\n ctx = offscreen.ctx;\n ctx.globalCompositeOperation = offscreen.mixBlendMode;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n if(width && height) {\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n ctx.globalCompositeOperation = 'source-over';\n target.ctx.globalAlpha = 1;\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n }\n // 特殊的mask节点汇总结束,还原ctx\n else if(type === OFFSCREEN_MASK2) {\n ctx = offscreen.ctx;\n }\n });\n return ctx;\n}\n\nexport default {\n OFFSCREEN_OVERFLOW,\n OFFSCREEN_FILTER,\n OFFSCREEN_MASK,\n OFFSCREEN_BLEND,\n OFFSCREEN_MASK2,\n applyOffscreen,\n};\n","const TOLERANCE = 1e-6;\n\n/**\n * 计算线性方程的根\n * y = ax + b\n * root = -b / a\n * @param {Array} coefs 系数 [b, a] 本文件代码中的系数数组都是从阶次由低到高排列\n */\nfunction getLinearRoot(coefs) {\n let result = [];\n let a = coefs[1];\n\n if (a !== 0) {\n result.push(-coefs[0] / a);\n }\n return result;\n}\n\n/**\n * 计算二次方程的根,一元二次方程求根公式\n * y = ax^2 + bx + c\n * root = (-b ± sqrt(b^2 - 4ac)) / 2a\n * @param {Array} coefs 系数,系数 [c, b, a]\n */\nfunction getQuadraticRoots(coefs) {\n let results = [];\n\n let a = coefs[2];\n let b = coefs[1] / a;\n let c = coefs[0] / a;\n let d = b * b - 4 * c;\n if (d > 0) {\n let e = Math.sqrt(d);\n results.push(0.5 * (-b + e));\n results.push(0.5 * (-b - e));\n } else if (d === 0) {\n // 两个相同的根,只要返回一个\n results.push(0.5 * -b);\n }\n return results;\n}\n\n/**\n * 计算一元三次方程的根\n * y = ax^3 + bx^2 + cx + d\n * 求根公式参见: https://baike.baidu.com/item/%E4%B8%80%E5%85%83%E4%B8%89%E6%AC%A1%E6%96%B9%E7%A8%8B%E6%B1%82%E6%A0%B9%E5%85%AC%E5%BC%8F/10721952?fr=aladdin\n * @param {Array} coefs 系数\n */\nfunction getCubicRoots(coefs) {\n let results = [];\n\n let c3 = coefs[3];\n let c2 = coefs[2] / c3;\n let c1 = coefs[1] / c3;\n let c0 = coefs[0] / c3;\n\n let a = (3 * c1 - c2 * c2) / 3;\n let b = (2 * c2 * c2 * c2 - 9 * c1 * c2 + 27 * c0) / 27;\n let offset = c2 / 3;\n let discrim = b * b / 4 + a * a * a / 27;\n let halfB = b / 2;\n\n if (Math.abs(discrim) <= TOLERANCE) {\n discrim = 0;\n }\n\n if (discrim > 0) {\n let e = Math.sqrt(discrim);\n let tmp;\n let root;\n\n tmp = -halfB + e;\n if (tmp >= 0)\n root = Math.pow(tmp, 1 / 3);\n else\n root = -Math.pow(-tmp, 1 / 3);\n\n tmp = -halfB - e;\n if (tmp >= 0)\n root += Math.pow(tmp, 1 / 3);\n else\n root -= Math.pow(-tmp, 1 / 3);\n\n results.push(root - offset);\n } else if (discrim < 0) {\n let distance = Math.sqrt(-a / 3);\n let angle = Math.atan2(Math.sqrt(-discrim), -halfB) / 3;\n let cos = Math.cos(angle);\n let sin = Math.sin(angle);\n let sqrt3 = Math.sqrt(3);\n\n results.push(2 * distance * cos - offset);\n results.push(-distance * (cos + sqrt3 * sin) - offset);\n results.push(-distance * (cos - sqrt3 * sin) - offset);\n } else {\n let tmp;\n\n if (halfB >= 0)\n tmp = -Math.pow(halfB, 1 / 3);\n else\n tmp = Math.pow(-halfB, 1 / 3);\n\n results.push(2 * tmp - offset);\n // really should return next root twice, but we return only one\n results.push(-tmp - offset);\n }\n\n\n return results;\n}\n\n/**\n * 计算一元四次方程的根\n * 求根公式: https://baike.baidu.com/item/%E4%B8%80%E5%85%83%E4%B8%89%E6%AC%A1%E6%96%B9%E7%A8%8B%E6%B1%82%E6%A0%B9%E5%85%AC%E5%BC%8F/10721952?fr=aladdin\n * @param {Array} coefs 系数\n */\nfunction getQuarticRoots(coefs) {\n let results = [];\n\n let c4 = coefs[4];\n let c3 = coefs[3] / c4;\n let c2 = coefs[2] / c4;\n let c1 = coefs[1] / c4;\n let c0 = coefs[0] / c4;\n\n let resolveRoots = getCubicRoots([ 1, -c2, c3 * c1 - 4 * c0, -c3 * c3 * c0 + 4 * c2 * c0 - c1 * c1 ].reverse());\n\n let y = resolveRoots[0];\n let discrim = c3 * c3 / 4 - c2 + y;\n\n if (Math.abs(discrim) <= TOLERANCE) discrim = 0;\n\n if (discrim > 0) {\n let e = Math.sqrt(discrim);\n let t1 = 3 * c3 * c3 / 4 - e * e - 2 * c2;\n let t2 = (4 * c3 * c2 - 8 * c1 - c3 * c3 * c3) / (4 * e);\n let plus = t1 + t2;\n let minus = t1 - t2;\n\n if (Math.abs(plus) <= TOLERANCE) plus = 0;\n if (Math.abs(minus) <= TOLERANCE) minus = 0;\n\n if (plus >= 0) {\n let f = Math.sqrt(plus);\n\n results.push(-c3 / 4 + (e + f) / 2);\n results.push(-c3 / 4 + (e - f) / 2);\n }\n if (minus >= 0) {\n let f = Math.sqrt(minus);\n\n results.push(-c3 / 4 + (f - e) / 2);\n results.push(-c3 / 4 - (f + e) / 2);\n }\n } else if (discrim < 0) {\n // no roots\n } else {\n let t2 = y * y - 4 * c0;\n\n if (t2 >= -TOLERANCE) {\n if (t2 < 0) t2 = 0;\n\n t2 = 2 * Math.sqrt(t2);\n let t1 = 3 * c3 * c3 / 4 - 2 * c2;\n if (t1 + t2 >= TOLERANCE) {\n let d = Math.sqrt(t1 + t2);\n\n results.push(-c3 / 4 + d / 2);\n results.push(-c3 / 4 - d / 2);\n }\n if (t1 - t2 >= TOLERANCE) {\n let d = Math.sqrt(t1 - t2);\n\n results.push(-c3 / 4 + d / 2);\n results.push(-c3 / 4 - d / 2);\n }\n }\n }\n\n return results;\n}\n\n/**\n * 计算方程的根\n * @param {Array} coefs 系数按幂次方倒序\n */\nfunction getRoots(coefs) {\n let degree = coefs.length - 1;\n for(let i = degree; i >= 0; i--) {\n if(Math.abs(coefs[i]) < 1e-12) {\n degree--;\n }\n else {\n break;\n }\n }\n let result = [];\n switch (degree) {\n case 1:\n result = getLinearRoot(coefs);\n break;\n case 2:\n result = getQuadraticRoots(coefs);\n break;\n case 3:\n result = getCubicRoots(coefs);\n break;\n case 4:\n result = getQuarticRoots(coefs);\n }\n return result;\n}\n\nexport default {\n getRoots,\n};\n","import equation from './equation';\nimport vector from './vector';\n\nconst getRoots = equation.getRoots;\nconst { unitize3, crossProduct3, dotProduct3, isParallel3, length3 } = vector;\n\n// 两个三次方程组的数值解.9阶的多项式方程,可以最多有9个实根(两个S形曲线的情况)\n// 两个三次方程组无法解析表示,只能数值计算\n// 参考:https://mat.polsl.pl/sjpam/zeszyty/z6/Silesian_J_Pure_Appl_Math_v6_i1_str_155-176.pdf\nconst TOLERANCE = 1e-6;\nconst ACCURACY = 6;\n\n/**\n * 获取求导之后的系数\n * @param coefs\n */\nfunction getDerivativeCoefs(coefs) {\n let derivative = [];\n for(let i = 1; i < coefs.length; i++) {\n derivative.push(i * coefs[i]);\n }\n return derivative;\n}\n\n/**\n * 评估函数\n * @param x\n * @param coefs\n * @return {number}\n */\nfunction evaluate(x, coefs) {\n let result = 0;\n for(let i = coefs.length - 1; i >= 0; i--) {\n result = result * x + coefs[i];\n }\n return result;\n}\n\nfunction bisection(min, max, coefs) {\n let minValue = evaluate(min, coefs);\n let maxValue = evaluate(max, coefs);\n let result;\n if(Math.abs(minValue) <= TOLERANCE) {\n result = min;\n }\n else if(Math.abs(maxValue) <= TOLERANCE) {\n result = max;\n }\n else if(minValue * maxValue <= 0) {\n let tmp1 = Math.log(max - min);\n let tmp2 = Math.LN10 * ACCURACY;\n let iters = Math.ceil((tmp1 + tmp2) / Math.LN2);\n for(let i = 0; i < iters; i++) {\n result = 0.5 * (min + max);\n let value = evaluate(result, coefs);\n\n if(Math.abs(value) <= TOLERANCE) {\n break;\n }\n\n if(value * minValue < 0) {\n max = result;\n maxValue = value;\n }\n else {\n min = result;\n minValue = value;\n }\n }\n\n }\n return result;\n}\n\nfunction getRootsInInterval(min, max, coefs) {\n // console.log('getRootsInInterval', coefs);\n let roots = [];\n let root;\n let degree = coefs.length - 1;\n if(degree === 1) {\n root = bisection(min, max, coefs);\n if(root != null) {\n roots.push(root);\n }\n }\n else {\n let derivativeCoefs = getDerivativeCoefs(coefs);\n let droots = getRootsInInterval(min, max, derivativeCoefs);\n\n if(droots.length > 0) {\n // find root on [min, droots[0]]\n root = bisection(min, droots[0], coefs);\n if(root != null) {\n roots.push(root);\n }\n // find root on [droots[i],droots[i+1]] for 0 <= i <= count-2\n for(let i = 0; i <= droots.length - 2; i++) {\n root = bisection(droots[i], droots[i + 1], coefs);\n if(root != null) {\n roots.push(root);\n }\n }\n\n // find root on [droots[count-1],xmax]\n root = bisection(droots[droots.length - 1], max, coefs);\n if(root != null) {\n roots.push(root);\n }\n }\n else {\n // polynomial is monotone on [min,max], has at most one root\n root = bisection(min, max, coefs);\n if(root != null) {\n roots.push(root);\n }\n }\n }\n return roots;\n}\n\n/**\n * 二阶贝塞尔曲线 与 二阶贝塞尔曲线 交点\n * @return {[]}\n */\nfunction intersectBezier2Bezier2(ax1, ay1, ax2, ay2, ax3, ay3, bx1, by1, bx2, by2, bx3, by3) {\n let c12, c11, c10;\n let c22, c21, c20;\n\n let result = [];\n\n c12 = {\n x: ax1 - 2 * ax2 + ax3,\n y: ay1 - 2 * ay2 + ay3,\n };\n\n c11 = {\n x: 2 * ax2 - 2 * ax1,\n y: 2 * ay2 - 2 * ay1,\n };\n c10 = {x: ax1, y: ay1};\n c22 = {\n x: bx1 - 2 * bx2 + bx3,\n y: by1 - 2 * by2 + by3,\n };\n c21 = {\n x: 2 * bx2 - 2 * bx1,\n y: 2 * by2 - 2 * by1,\n };\n c20 = {x: bx1, y: by1};\n\n let coefs;\n\n if(c12.y === 0) {\n let v0 = c12.x * (c10.y - c20.y);\n let v1 = v0 - c11.x * c11.y;\n let v2 = v0 + v1;\n let v3 = c11.y * c11.y;\n\n coefs = [\n c12.x * c22.y * c22.y,\n 2 * c12.x * c21.y * c22.y,\n c12.x * c21.y * c21.y - c22.x * v3 - c22.y * v0 - c22.y * v1,\n -c21.x * v3 - c21.y * v0 - c21.y * v1,\n (c10.x - c20.x) * v3 + (c10.y - c20.y) * v1\n ].reverse();\n }\n else {\n let v0 = c12.x * c22.y - c12.y * c22.x;\n let v1 = c12.x * c21.y - c21.x * c12.y;\n let v2 = c11.x * c12.y - c11.y * c12.x;\n let v3 = c10.y - c20.y;\n let v4 = c12.y * (c10.x - c20.x) - c12.x * v3;\n let v5 = -c11.y * v2 + c12.y * v4;\n let v6 = v2 * v2;\n coefs = [\n v0 * v0,\n 2 * v0 * v1,\n (-c22.y * v6 + c12.y * v1 * v1 + c12.y * v0 * v4 + v0 * v5) / c12.y,\n (-c21.y * v6 + c12.y * v1 * v4 + v1 * v5) / c12.y,\n (v3 * v6 + v4 * v5) / c12.y\n ].reverse();\n }\n\n let roots = getRoots(coefs);\n\n for(let i = 0; i < roots.length; i++) {\n let s = roots[i];\n\n if(0 <= s && s <= 1) {\n let xRoots = getRoots([c12.x, c11.x, c10.x - c20.x - s * c21.x - s * s * c22.x].reverse());\n\n let yRoots = getRoots([c12.y, c11.y, c10.y - c20.y - s * c21.y - s * s * c22.y].reverse());\n\n if(xRoots.length > 0 && yRoots.length > 0) {\n let TOLERANCE = 1e-4;\n\n checkRoots:\n for(let j = 0; j < xRoots.length; j++) {\n let xRoot = xRoots[j];\n\n if(0 <= xRoot && xRoot <= 1) {\n for(let k = 0; k < yRoots.length; k++) {\n if(Math.abs(xRoot - yRoots[k]) < TOLERANCE) {\n let x = c22.x * s * s + c21.x * s + c20.x;\n let y = c22.y * s * s + c21.y * s + c20.y;\n result.push({x, y, t: xRoot});\n // result.push(c22.multiply(s * s).add(c21.multiply(s).add(c20)));\n break checkRoots;\n }\n }\n }\n }\n }\n }\n }\n return result;\n}\n\nfunction intersectBezier3Bezier3(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4, bx1, by1, bx2, by2, bx3, by3, bx4, by4) {\n let c13, c12, c11, c10; // 三阶系数\n let c23, c22, c21, c20;\n\n let result = [];\n\n c13 = {\n x: -ax1 + 3 * ax2 - 3 * ax3 + ax4,\n y: -ay1 + 3 * ay2 - 3 * ay3 + ay4,\n };\n\n c12 = {\n x: 3 * ax1 - 6 * ax2 + 3 * ax3,\n y: 3 * ay1 - 6 * ay2 + 3 * ay3,\n };\n\n c11 = {\n x: -3 * ax1 + 3 * ax2,\n y: -3 * ay1 + 3 * ay2,\n };\n\n c10 = {x: ax1, y: ay1};\n\n c23 = {\n x: -bx1 + 3 * bx2 - 3 * bx3 + bx4,\n y: -by1 + 3 * by2 - 3 * by3 + by4,\n };\n\n c22 = {\n x: 3 * bx1 - 6 * bx2 + 3 * bx3,\n y: 3 * by1 - 6 * by2 + 3 * by3,\n };\n\n c21 = {\n x: -3 * bx1 + 3 * bx2,\n y: -3 * by1 + 3 * by2,\n };\n\n c20 = {x: bx1, y: by1};\n\n let c10x2 = c10.x * c10.x;\n let c10x3 = c10.x * c10.x * c10.x;\n let c10y2 = c10.y * c10.y;\n let c10y3 = c10.y * c10.y * c10.y;\n let c11x2 = c11.x * c11.x;\n let c11x3 = c11.x * c11.x * c11.x;\n let c11y2 = c11.y * c11.y;\n let c11y3 = c11.y * c11.y * c11.y;\n let c12x2 = c12.x * c12.x;\n let c12x3 = c12.x * c12.x * c12.x;\n let c12y2 = c12.y * c12.y;\n let c12y3 = c12.y * c12.y * c12.y;\n let c13x2 = c13.x * c13.x;\n let c13x3 = c13.x * c13.x * c13.x;\n let c13y2 = c13.y * c13.y;\n let c13y3 = c13.y * c13.y * c13.y;\n let c20x2 = c20.x * c20.x;\n let c20x3 = c20.x * c20.x * c20.x;\n let c20y2 = c20.y * c20.y;\n let c20y3 = c20.y * c20.y * c20.y;\n let c21x2 = c21.x * c21.x;\n let c21x3 = c21.x * c21.x * c21.x;\n let c21y2 = c21.y * c21.y;\n let c22x2 = c22.x * c22.x;\n let c22x3 = c22.x * c22.x * c22.x;\n let c22y2 = c22.y * c22.y;\n let c23x2 = c23.x * c23.x;\n let c23x3 = c23.x * c23.x * c23.x;\n let c23y2 = c23.y * c23.y;\n let c23y3 = c23.y * c23.y * c23.y;\n\n let coefs = [-c13x3 * c23y3 + c13y3 * c23x3 - 3 * c13.x * c13y2 * c23x2 * c23.y +\n 3 * c13x2 * c13.y * c23.x * c23y2,\n -6 * c13.x * c22.x * c13y2 * c23.x * c23.y + 6 * c13x2 * c13.y * c22.y * c23.x * c23.y + 3 * c22.x * c13y3 * c23x2 -\n 3 * c13x3 * c22.y * c23y2 - 3 * c13.x * c13y2 * c22.y * c23x2 + 3 * c13x2 * c22.x * c13.y * c23y2,\n -6 * c21.x * c13.x * c13y2 * c23.x * c23.y - 6 * c13.x * c22.x * c13y2 * c22.y * c23.x + 6 * c13x2 * c22.x * c13.y * c22.y * c23.y +\n 3 * c21.x * c13y3 * c23x2 + 3 * c22x2 * c13y3 * c23.x + 3 * c21.x * c13x2 * c13.y * c23y2 - 3 * c13.x * c21.y * c13y2 * c23x2 -\n 3 * c13.x * c22x2 * c13y2 * c23.y + c13x2 * c13.y * c23.x * (6 * c21.y * c23.y + 3 * c22y2) + c13x3 * (-c21.y * c23y2 -\n 2 * c22y2 * c23.y - c23.y * (2 * c21.y * c23.y + c22y2)),\n c11.x * c12.y * c13.x * c13.y * c23.x * c23.y - c11.y * c12.x * c13.x * c13.y * c23.x * c23.y + 6 * c21.x * c22.x * c13y3 * c23.x +\n 3 * c11.x * c12.x * c13.x * c13.y * c23y2 + 6 * c10.x * c13.x * c13y2 * c23.x * c23.y - 3 * c11.x * c12.x * c13y2 * c23.x * c23.y -\n 3 * c11.y * c12.y * c13.x * c13.y * c23x2 - 6 * c10.y * c13x2 * c13.y * c23.x * c23.y - 6 * c20.x * c13.x * c13y2 * c23.x * c23.y +\n 3 * c11.y * c12.y * c13x2 * c23.x * c23.y - 2 * c12.x * c12y2 * c13.x * c23.x * c23.y - 6 * c21.x * c13.x * c22.x * c13y2 * c23.y -\n 6 * c21.x * c13.x * c13y2 * c22.y * c23.x - 6 * c13.x * c21.y * c22.x * c13y2 * c23.x + 6 * c21.x * c13x2 * c13.y * c22.y * c23.y +\n 2 * c12x2 * c12.y * c13.y * c23.x * c23.y + c22x3 * c13y3 - 3 * c10.x * c13y3 * c23x2 + 3 * c10.y * c13x3 * c23y2 +\n 3 * c20.x * c13y3 * c23x2 + c12y3 * c13.x * c23x2 - c12x3 * c13.y * c23y2 - 3 * c10.x * c13x2 * c13.y * c23y2 +\n 3 * c10.y * c13.x * c13y2 * c23x2 - 2 * c11.x * c12.y * c13x2 * c23y2 + c11.x * c12.y * c13y2 * c23x2 - c11.y * c12.x * c13x2 * c23y2 +\n 2 * c11.y * c12.x * c13y2 * c23x2 + 3 * c20.x * c13x2 * c13.y * c23y2 - c12.x * c12y2 * c13.y * c23x2 -\n 3 * c20.y * c13.x * c13y2 * c23x2 + c12x2 * c12.y * c13.x * c23y2 - 3 * c13.x * c22x2 * c13y2 * c22.y +\n c13x2 * c13.y * c23.x * (6 * c20.y * c23.y + 6 * c21.y * c22.y) + c13x2 * c22.x * c13.y * (6 * c21.y * c23.y + 3 * c22y2) +\n c13x3 * (-2 * c21.y * c22.y * c23.y - c20.y * c23y2 - c22.y * (2 * c21.y * c23.y + c22y2) - c23.y * (2 * c20.y * c23.y + 2 * c21.y * c22.y)),\n 6 * c11.x * c12.x * c13.x * c13.y * c22.y * c23.y + c11.x * c12.y * c13.x * c22.x * c13.y * c23.y + c11.x * c12.y * c13.x * c13.y * c22.y * c23.x -\n c11.y * c12.x * c13.x * c22.x * c13.y * c23.y - c11.y * c12.x * c13.x * c13.y * c22.y * c23.x - 6 * c11.y * c12.y * c13.x * c22.x * c13.y * c23.x -\n 6 * c10.x * c22.x * c13y3 * c23.x + 6 * c20.x * c22.x * c13y3 * c23.x + 6 * c10.y * c13x3 * c22.y * c23.y + 2 * c12y3 * c13.x * c22.x * c23.x -\n 2 * c12x3 * c13.y * c22.y * c23.y + 6 * c10.x * c13.x * c22.x * c13y2 * c23.y + 6 * c10.x * c13.x * c13y2 * c22.y * c23.x +\n 6 * c10.y * c13.x * c22.x * c13y2 * c23.x - 3 * c11.x * c12.x * c22.x * c13y2 * c23.y - 3 * c11.x * c12.x * c13y2 * c22.y * c23.x +\n 2 * c11.x * c12.y * c22.x * c13y2 * c23.x + 4 * c11.y * c12.x * c22.x * c13y2 * c23.x - 6 * c10.x * c13x2 * c13.y * c22.y * c23.y -\n 6 * c10.y * c13x2 * c22.x * c13.y * c23.y - 6 * c10.y * c13x2 * c13.y * c22.y * c23.x - 4 * c11.x * c12.y * c13x2 * c22.y * c23.y -\n 6 * c20.x * c13.x * c22.x * c13y2 * c23.y - 6 * c20.x * c13.x * c13y2 * c22.y * c23.x - 2 * c11.y * c12.x * c13x2 * c22.y * c23.y +\n 3 * c11.y * c12.y * c13x2 * c22.x * c23.y + 3 * c11.y * c12.y * c13x2 * c22.y * c23.x - 2 * c12.x * c12y2 * c13.x * c22.x * c23.y -\n 2 * c12.x * c12y2 * c13.x * c22.y * c23.x - 2 * c12.x * c12y2 * c22.x * c13.y * c23.x - 6 * c20.y * c13.x * c22.x * c13y2 * c23.x -\n 6 * c21.x * c13.x * c21.y * c13y2 * c23.x - 6 * c21.x * c13.x * c22.x * c13y2 * c22.y + 6 * c20.x * c13x2 * c13.y * c22.y * c23.y +\n 2 * c12x2 * c12.y * c13.x * c22.y * c23.y + 2 * c12x2 * c12.y * c22.x * c13.y * c23.y + 2 * c12x2 * c12.y * c13.y * c22.y * c23.x +\n 3 * c21.x * c22x2 * c13y3 + 3 * c21x2 * c13y3 * c23.x - 3 * c13.x * c21.y * c22x2 * c13y2 - 3 * c21x2 * c13.x * c13y2 * c23.y +\n c13x2 * c22.x * c13.y * (6 * c20.y * c23.y + 6 * c21.y * c22.y) + c13x2 * c13.y * c23.x * (6 * c20.y * c22.y + 3 * c21y2) +\n c21.x * c13x2 * c13.y * (6 * c21.y * c23.y + 3 * c22y2) + c13x3 * (-2 * c20.y * c22.y * c23.y - c23.y * (2 * c20.y * c22.y + c21y2) -\n c21.y * (2 * c21.y * c23.y + c22y2) - c22.y * (2 * c20.y * c23.y + 2 * c21.y * c22.y)),\n c11.x * c21.x * c12.y * c13.x * c13.y * c23.y + c11.x * c12.y * c13.x * c21.y * c13.y * c23.x + c11.x * c12.y * c13.x * c22.x * c13.y * c22.y -\n c11.y * c12.x * c21.x * c13.x * c13.y * c23.y - c11.y * c12.x * c13.x * c21.y * c13.y * c23.x - c11.y * c12.x * c13.x * c22.x * c13.y * c22.y -\n 6 * c11.y * c21.x * c12.y * c13.x * c13.y * c23.x - 6 * c10.x * c21.x * c13y3 * c23.x + 6 * c20.x * c21.x * c13y3 * c23.x +\n 2 * c21.x * c12y3 * c13.x * c23.x + 6 * c10.x * c21.x * c13.x * c13y2 * c23.y + 6 * c10.x * c13.x * c21.y * c13y2 * c23.x +\n 6 * c10.x * c13.x * c22.x * c13y2 * c22.y + 6 * c10.y * c21.x * c13.x * c13y2 * c23.x - 3 * c11.x * c12.x * c21.x * c13y2 * c23.y -\n 3 * c11.x * c12.x * c21.y * c13y2 * c23.x - 3 * c11.x * c12.x * c22.x * c13y2 * c22.y + 2 * c11.x * c21.x * c12.y * c13y2 * c23.x +\n 4 * c11.y * c12.x * c21.x * c13y2 * c23.x - 6 * c10.y * c21.x * c13x2 * c13.y * c23.y - 6 * c10.y * c13x2 * c21.y * c13.y * c23.x -\n 6 * c10.y * c13x2 * c22.x * c13.y * c22.y - 6 * c20.x * c21.x * c13.x * c13y2 * c23.y - 6 * c20.x * c13.x * c21.y * c13y2 * c23.x -\n 6 * c20.x * c13.x * c22.x * c13y2 * c22.y + 3 * c11.y * c21.x * c12.y * c13x2 * c23.y - 3 * c11.y * c12.y * c13.x * c22x2 * c13.y +\n 3 * c11.y * c12.y * c13x2 * c21.y * c23.x + 3 * c11.y * c12.y * c13x2 * c22.x * c22.y - 2 * c12.x * c21.x * c12y2 * c13.x * c23.y -\n 2 * c12.x * c21.x * c12y2 * c13.y * c23.x - 2 * c12.x * c12y2 * c13.x * c21.y * c23.x - 2 * c12.x * c12y2 * c13.x * c22.x * c22.y -\n 6 * c20.y * c21.x * c13.x * c13y2 * c23.x - 6 * c21.x * c13.x * c21.y * c22.x * c13y2 + 6 * c20.y * c13x2 * c21.y * c13.y * c23.x +\n 2 * c12x2 * c21.x * c12.y * c13.y * c23.y + 2 * c12x2 * c12.y * c21.y * c13.y * c23.x + 2 * c12x2 * c12.y * c22.x * c13.y * c22.y -\n 3 * c10.x * c22x2 * c13y3 + 3 * c20.x * c22x2 * c13y3 + 3 * c21x2 * c22.x * c13y3 + c12y3 * c13.x * c22x2 +\n 3 * c10.y * c13.x * c22x2 * c13y2 + c11.x * c12.y * c22x2 * c13y2 + 2 * c11.y * c12.x * c22x2 * c13y2 -\n c12.x * c12y2 * c22x2 * c13.y - 3 * c20.y * c13.x * c22x2 * c13y2 - 3 * c21x2 * c13.x * c13y2 * c22.y +\n c12x2 * c12.y * c13.x * (2 * c21.y * c23.y + c22y2) + c11.x * c12.x * c13.x * c13.y * (6 * c21.y * c23.y + 3 * c22y2) +\n c21.x * c13x2 * c13.y * (6 * c20.y * c23.y + 6 * c21.y * c22.y) + c12x3 * c13.y * (-2 * c21.y * c23.y - c22y2) +\n c10.y * c13x3 * (6 * c21.y * c23.y + 3 * c22y2) + c11.y * c12.x * c13x2 * (-2 * c21.y * c23.y - c22y2) +\n c11.x * c12.y * c13x2 * (-4 * c21.y * c23.y - 2 * c22y2) + c10.x * c13x2 * c13.y * (-6 * c21.y * c23.y - 3 * c22y2) +\n c13x2 * c22.x * c13.y * (6 * c20.y * c22.y + 3 * c21y2) + c20.x * c13x2 * c13.y * (6 * c21.y * c23.y + 3 * c22y2) +\n c13x3 * (-2 * c20.y * c21.y * c23.y - c22.y * (2 * c20.y * c22.y + c21y2) - c20.y * (2 * c21.y * c23.y + c22y2) -\n c21.y * (2 * c20.y * c23.y + 2 * c21.y * c22.y)),\n -c10.x * c11.x * c12.y * c13.x * c13.y * c23.y + c10.x * c11.y * c12.x * c13.x * c13.y * c23.y + 6 * c10.x * c11.y * c12.y * c13.x * c13.y * c23.x -\n 6 * c10.y * c11.x * c12.x * c13.x * c13.y * c23.y - c10.y * c11.x * c12.y * c13.x * c13.y * c23.x + c10.y * c11.y * c12.x * c13.x * c13.y * c23.x +\n c11.x * c11.y * c12.x * c12.y * c13.x * c23.y - c11.x * c11.y * c12.x * c12.y * c13.y * c23.x + c11.x * c20.x * c12.y * c13.x * c13.y * c23.y +\n c11.x * c20.y * c12.y * c13.x * c13.y * c23.x + c11.x * c21.x * c12.y * c13.x * c13.y * c22.y + c11.x * c12.y * c13.x * c21.y * c22.x * c13.y -\n c20.x * c11.y * c12.x * c13.x * c13.y * c23.y - 6 * c20.x * c11.y * c12.y * c13.x * c13.y * c23.x - c11.y * c12.x * c20.y * c13.x * c13.y * c23.x -\n c11.y * c12.x * c21.x * c13.x * c13.y * c22.y - c11.y * c12.x * c13.x * c21.y * c22.x * c13.y - 6 * c11.y * c21.x * c12.y * c13.x * c22.x * c13.y -\n 6 * c10.x * c20.x * c13y3 * c23.x - 6 * c10.x * c21.x * c22.x * c13y3 - 2 * c10.x * c12y3 * c13.x * c23.x + 6 * c20.x * c21.x * c22.x * c13y3 +\n 2 * c20.x * c12y3 * c13.x * c23.x + 2 * c21.x * c12y3 * c13.x * c22.x + 2 * c10.y * c12x3 * c13.y * c23.y - 6 * c10.x * c10.y * c13.x * c13y2 * c23.x +\n 3 * c10.x * c11.x * c12.x * c13y2 * c23.y - 2 * c10.x * c11.x * c12.y * c13y2 * c23.x - 4 * c10.x * c11.y * c12.x * c13y2 * c23.x +\n 3 * c10.y * c11.x * c12.x * c13y2 * c23.x + 6 * c10.x * c10.y * c13x2 * c13.y * c23.y + 6 * c10.x * c20.x * c13.x * c13y2 * c23.y -\n 3 * c10.x * c11.y * c12.y * c13x2 * c23.y + 2 * c10.x * c12.x * c12y2 * c13.x * c23.y + 2 * c10.x * c12.x * c12y2 * c13.y * c23.x +\n 6 * c10.x * c20.y * c13.x * c13y2 * c23.x + 6 * c10.x * c21.x * c13.x * c13y2 * c22.y + 6 * c10.x * c13.x * c21.y * c22.x * c13y2 +\n 4 * c10.y * c11.x * c12.y * c13x2 * c23.y + 6 * c10.y * c20.x * c13.x * c13y2 * c23.x + 2 * c10.y * c11.y * c12.x * c13x2 * c23.y -\n 3 * c10.y * c11.y * c12.y * c13x2 * c23.x + 2 * c10.y * c12.x * c12y2 * c13.x * c23.x + 6 * c10.y * c21.x * c13.x * c22.x * c13y2 -\n 3 * c11.x * c20.x * c12.x * c13y2 * c23.y + 2 * c11.x * c20.x * c12.y * c13y2 * c23.x + c11.x * c11.y * c12y2 * c13.x * c23.x -\n 3 * c11.x * c12.x * c20.y * c13y2 * c23.x - 3 * c11.x * c12.x * c21.x * c13y2 * c22.y - 3 * c11.x * c12.x * c21.y * c22.x * c13y2 +\n 2 * c11.x * c21.x * c12.y * c22.x * c13y2 + 4 * c20.x * c11.y * c12.x * c13y2 * c23.x + 4 * c11.y * c12.x * c21.x * c22.x * c13y2 -\n 2 * c10.x * c12x2 * c12.y * c13.y * c23.y - 6 * c10.y * c20.x * c13x2 * c13.y * c23.y - 6 * c10.y * c20.y * c13x2 * c13.y * c23.x -\n 6 * c10.y * c21.x * c13x2 * c13.y * c22.y - 2 * c10.y * c12x2 * c12.y * c13.x * c23.y - 2 * c10.y * c12x2 * c12.y * c13.y * c23.x -\n 6 * c10.y * c13x2 * c21.y * c22.x * c13.y - c11.x * c11.y * c12x2 * c13.y * c23.y - 2 * c11.x * c11y2 * c13.x * c13.y * c23.x +\n 3 * c20.x * c11.y * c12.y * c13x2 * c23.y - 2 * c20.x * c12.x * c12y2 * c13.x * c23.y - 2 * c20.x * c12.x * c12y2 * c13.y * c23.x -\n 6 * c20.x * c20.y * c13.x * c13y2 * c23.x - 6 * c20.x * c21.x * c13.x * c13y2 * c22.y - 6 * c20.x * c13.x * c21.y * c22.x * c13y2 +\n 3 * c11.y * c20.y * c12.y * c13x2 * c23.x + 3 * c11.y * c21.x * c12.y * c13x2 * c22.y + 3 * c11.y * c12.y * c13x2 * c21.y * c22.x -\n 2 * c12.x * c20.y * c12y2 * c13.x * c23.x - 2 * c12.x * c21.x * c12y2 * c13.x * c22.y - 2 * c12.x * c21.x * c12y2 * c22.x * c13.y -\n 2 * c12.x * c12y2 * c13.x * c21.y * c22.x - 6 * c20.y * c21.x * c13.x * c22.x * c13y2 - c11y2 * c12.x * c12.y * c13.x * c23.x +\n 2 * c20.x * c12x2 * c12.y * c13.y * c23.y + 6 * c20.y * c13x2 * c21.y * c22.x * c13.y + 2 * c11x2 * c11.y * c13.x * c13.y * c23.y +\n c11x2 * c12.x * c12.y * c13.y * c23.y + 2 * c12x2 * c20.y * c12.y * c13.y * c23.x + 2 * c12x2 * c21.x * c12.y * c13.y * c22.y +\n 2 * c12x2 * c12.y * c21.y * c22.x * c13.y + c21x3 * c13y3 + 3 * c10x2 * c13y3 * c23.x - 3 * c10y2 * c13x3 * c23.y +\n 3 * c20x2 * c13y3 * c23.x + c11y3 * c13x2 * c23.x - c11x3 * c13y2 * c23.y - c11.x * c11y2 * c13x2 * c23.y +\n c11x2 * c11.y * c13y2 * c23.x - 3 * c10x2 * c13.x * c13y2 * c23.y + 3 * c10y2 * c13x2 * c13.y * c23.x - c11x2 * c12y2 * c13.x * c23.y +\n c11y2 * c12x2 * c13.y * c23.x - 3 * c21x2 * c13.x * c21.y * c13y2 - 3 * c20x2 * c13.x * c13y2 * c23.y + 3 * c20y2 * c13x2 * c13.y * c23.x +\n c11.x * c12.x * c13.x * c13.y * (6 * c20.y * c23.y + 6 * c21.y * c22.y) + c12x3 * c13.y * (-2 * c20.y * c23.y - 2 * c21.y * c22.y) +\n c10.y * c13x3 * (6 * c20.y * c23.y + 6 * c21.y * c22.y) + c11.y * c12.x * c13x2 * (-2 * c20.y * c23.y - 2 * c21.y * c22.y) +\n c12x2 * c12.y * c13.x * (2 * c20.y * c23.y + 2 * c21.y * c22.y) + c11.x * c12.y * c13x2 * (-4 * c20.y * c23.y - 4 * c21.y * c22.y) +\n c10.x * c13x2 * c13.y * (-6 * c20.y * c23.y - 6 * c21.y * c22.y) + c20.x * c13x2 * c13.y * (6 * c20.y * c23.y + 6 * c21.y * c22.y) +\n c21.x * c13x2 * c13.y * (6 * c20.y * c22.y + 3 * c21y2) + c13x3 * (-2 * c20.y * c21.y * c22.y - c20y2 * c23.y -\n c21.y * (2 * c20.y * c22.y + c21y2) - c20.y * (2 * c20.y * c23.y + 2 * c21.y * c22.y)),\n -c10.x * c11.x * c12.y * c13.x * c13.y * c22.y + c10.x * c11.y * c12.x * c13.x * c13.y * c22.y + 6 * c10.x * c11.y * c12.y * c13.x * c22.x * c13.y -\n 6 * c10.y * c11.x * c12.x * c13.x * c13.y * c22.y - c10.y * c11.x * c12.y * c13.x * c22.x * c13.y + c10.y * c11.y * c12.x * c13.x * c22.x * c13.y +\n c11.x * c11.y * c12.x * c12.y * c13.x * c22.y - c11.x * c11.y * c12.x * c12.y * c22.x * c13.y + c11.x * c20.x * c12.y * c13.x * c13.y * c22.y +\n c11.x * c20.y * c12.y * c13.x * c22.x * c13.y + c11.x * c21.x * c12.y * c13.x * c21.y * c13.y - c20.x * c11.y * c12.x * c13.x * c13.y * c22.y -\n 6 * c20.x * c11.y * c12.y * c13.x * c22.x * c13.y - c11.y * c12.x * c20.y * c13.x * c22.x * c13.y - c11.y * c12.x * c21.x * c13.x * c21.y * c13.y -\n 6 * c10.x * c20.x * c22.x * c13y3 - 2 * c10.x * c12y3 * c13.x * c22.x + 2 * c20.x * c12y3 * c13.x * c22.x + 2 * c10.y * c12x3 * c13.y * c22.y -\n 6 * c10.x * c10.y * c13.x * c22.x * c13y2 + 3 * c10.x * c11.x * c12.x * c13y2 * c22.y - 2 * c10.x * c11.x * c12.y * c22.x * c13y2 -\n 4 * c10.x * c11.y * c12.x * c22.x * c13y2 + 3 * c10.y * c11.x * c12.x * c22.x * c13y2 + 6 * c10.x * c10.y * c13x2 * c13.y * c22.y +\n 6 * c10.x * c20.x * c13.x * c13y2 * c22.y - 3 * c10.x * c11.y * c12.y * c13x2 * c22.y + 2 * c10.x * c12.x * c12y2 * c13.x * c22.y +\n 2 * c10.x * c12.x * c12y2 * c22.x * c13.y + 6 * c10.x * c20.y * c13.x * c22.x * c13y2 + 6 * c10.x * c21.x * c13.x * c21.y * c13y2 +\n 4 * c10.y * c11.x * c12.y * c13x2 * c22.y + 6 * c10.y * c20.x * c13.x * c22.x * c13y2 + 2 * c10.y * c11.y * c12.x * c13x2 * c22.y -\n 3 * c10.y * c11.y * c12.y * c13x2 * c22.x + 2 * c10.y * c12.x * c12y2 * c13.x * c22.x - 3 * c11.x * c20.x * c12.x * c13y2 * c22.y +\n 2 * c11.x * c20.x * c12.y * c22.x * c13y2 + c11.x * c11.y * c12y2 * c13.x * c22.x - 3 * c11.x * c12.x * c20.y * c22.x * c13y2 -\n 3 * c11.x * c12.x * c21.x * c21.y * c13y2 + 4 * c20.x * c11.y * c12.x * c22.x * c13y2 - 2 * c10.x * c12x2 * c12.y * c13.y * c22.y -\n 6 * c10.y * c20.x * c13x2 * c13.y * c22.y - 6 * c10.y * c20.y * c13x2 * c22.x * c13.y - 6 * c10.y * c21.x * c13x2 * c21.y * c13.y -\n 2 * c10.y * c12x2 * c12.y * c13.x * c22.y - 2 * c10.y * c12x2 * c12.y * c22.x * c13.y - c11.x * c11.y * c12x2 * c13.y * c22.y -\n 2 * c11.x * c11y2 * c13.x * c22.x * c13.y + 3 * c20.x * c11.y * c12.y * c13x2 * c22.y - 2 * c20.x * c12.x * c12y2 * c13.x * c22.y -\n 2 * c20.x * c12.x * c12y2 * c22.x * c13.y - 6 * c20.x * c20.y * c13.x * c22.x * c13y2 - 6 * c20.x * c21.x * c13.x * c21.y * c13y2 +\n 3 * c11.y * c20.y * c12.y * c13x2 * c22.x + 3 * c11.y * c21.x * c12.y * c13x2 * c21.y - 2 * c12.x * c20.y * c12y2 * c13.x * c22.x -\n 2 * c12.x * c21.x * c12y2 * c13.x * c21.y - c11y2 * c12.x * c12.y * c13.x * c22.x + 2 * c20.x * c12x2 * c12.y * c13.y * c22.y -\n 3 * c11.y * c21x2 * c12.y * c13.x * c13.y + 6 * c20.y * c21.x * c13x2 * c21.y * c13.y + 2 * c11x2 * c11.y * c13.x * c13.y * c22.y +\n c11x2 * c12.x * c12.y * c13.y * c22.y + 2 * c12x2 * c20.y * c12.y * c22.x * c13.y + 2 * c12x2 * c21.x * c12.y * c21.y * c13.y -\n 3 * c10.x * c21x2 * c13y3 + 3 * c20.x * c21x2 * c13y3 + 3 * c10x2 * c22.x * c13y3 - 3 * c10y2 * c13x3 * c22.y + 3 * c20x2 * c22.x * c13y3 +\n c21x2 * c12y3 * c13.x + c11y3 * c13x2 * c22.x - c11x3 * c13y2 * c22.y + 3 * c10.y * c21x2 * c13.x * c13y2 -\n c11.x * c11y2 * c13x2 * c22.y + c11.x * c21x2 * c12.y * c13y2 + 2 * c11.y * c12.x * c21x2 * c13y2 + c11x2 * c11.y * c22.x * c13y2 -\n c12.x * c21x2 * c12y2 * c13.y - 3 * c20.y * c21x2 * c13.x * c13y2 - 3 * c10x2 * c13.x * c13y2 * c22.y + 3 * c10y2 * c13x2 * c22.x * c13.y -\n c11x2 * c12y2 * c13.x * c22.y + c11y2 * c12x2 * c22.x * c13.y - 3 * c20x2 * c13.x * c13y2 * c22.y + 3 * c20y2 * c13x2 * c22.x * c13.y +\n c12x2 * c12.y * c13.x * (2 * c20.y * c22.y + c21y2) + c11.x * c12.x * c13.x * c13.y * (6 * c20.y * c22.y + 3 * c21y2) +\n c12x3 * c13.y * (-2 * c20.y * c22.y - c21y2) + c10.y * c13x3 * (6 * c20.y * c22.y + 3 * c21y2) +\n c11.y * c12.x * c13x2 * (-2 * c20.y * c22.y - c21y2) + c11.x * c12.y * c13x2 * (-4 * c20.y * c22.y - 2 * c21y2) +\n c10.x * c13x2 * c13.y * (-6 * c20.y * c22.y - 3 * c21y2) + c20.x * c13x2 * c13.y * (6 * c20.y * c22.y + 3 * c21y2) +\n c13x3 * (-2 * c20.y * c21y2 - c20y2 * c22.y - c20.y * (2 * c20.y * c22.y + c21y2)),\n -c10.x * c11.x * c12.y * c13.x * c21.y * c13.y + c10.x * c11.y * c12.x * c13.x * c21.y * c13.y + 6 * c10.x * c11.y * c21.x * c12.y * c13.x * c13.y -\n 6 * c10.y * c11.x * c12.x * c13.x * c21.y * c13.y - c10.y * c11.x * c21.x * c12.y * c13.x * c13.y + c10.y * c11.y * c12.x * c21.x * c13.x * c13.y -\n c11.x * c11.y * c12.x * c21.x * c12.y * c13.y + c11.x * c11.y * c12.x * c12.y * c13.x * c21.y + c11.x * c20.x * c12.y * c13.x * c21.y * c13.y +\n 6 * c11.x * c12.x * c20.y * c13.x * c21.y * c13.y + c11.x * c20.y * c21.x * c12.y * c13.x * c13.y - c20.x * c11.y * c12.x * c13.x * c21.y * c13.y -\n 6 * c20.x * c11.y * c21.x * c12.y * c13.x * c13.y - c11.y * c12.x * c20.y * c21.x * c13.x * c13.y - 6 * c10.x * c20.x * c21.x * c13y3 -\n 2 * c10.x * c21.x * c12y3 * c13.x + 6 * c10.y * c20.y * c13x3 * c21.y + 2 * c20.x * c21.x * c12y3 * c13.x + 2 * c10.y * c12x3 * c21.y * c13.y -\n 2 * c12x3 * c20.y * c21.y * c13.y - 6 * c10.x * c10.y * c21.x * c13.x * c13y2 + 3 * c10.x * c11.x * c12.x * c21.y * c13y2 -\n 2 * c10.x * c11.x * c21.x * c12.y * c13y2 - 4 * c10.x * c11.y * c12.x * c21.x * c13y2 + 3 * c10.y * c11.x * c12.x * c21.x * c13y2 +\n 6 * c10.x * c10.y * c13x2 * c21.y * c13.y + 6 * c10.x * c20.x * c13.x * c21.y * c13y2 - 3 * c10.x * c11.y * c12.y * c13x2 * c21.y +\n 2 * c10.x * c12.x * c21.x * c12y2 * c13.y + 2 * c10.x * c12.x * c12y2 * c13.x * c21.y + 6 * c10.x * c20.y * c21.x * c13.x * c13y2 +\n 4 * c10.y * c11.x * c12.y * c13x2 * c21.y + 6 * c10.y * c20.x * c21.x * c13.x * c13y2 + 2 * c10.y * c11.y * c12.x * c13x2 * c21.y -\n 3 * c10.y * c11.y * c21.x * c12.y * c13x2 + 2 * c10.y * c12.x * c21.x * c12y2 * c13.x - 3 * c11.x * c20.x * c12.x * c21.y * c13y2 +\n 2 * c11.x * c20.x * c21.x * c12.y * c13y2 + c11.x * c11.y * c21.x * c12y2 * c13.x - 3 * c11.x * c12.x * c20.y * c21.x * c13y2 +\n 4 * c20.x * c11.y * c12.x * c21.x * c13y2 - 6 * c10.x * c20.y * c13x2 * c21.y * c13.y - 2 * c10.x * c12x2 * c12.y * c21.y * c13.y -\n 6 * c10.y * c20.x * c13x2 * c21.y * c13.y - 6 * c10.y * c20.y * c21.x * c13x2 * c13.y - 2 * c10.y * c12x2 * c21.x * c12.y * c13.y -\n 2 * c10.y * c12x2 * c12.y * c13.x * c21.y - c11.x * c11.y * c12x2 * c21.y * c13.y - 4 * c11.x * c20.y * c12.y * c13x2 * c21.y -\n 2 * c11.x * c11y2 * c21.x * c13.x * c13.y + 3 * c20.x * c11.y * c12.y * c13x2 * c21.y - 2 * c20.x * c12.x * c21.x * c12y2 * c13.y -\n 2 * c20.x * c12.x * c12y2 * c13.x * c21.y - 6 * c20.x * c20.y * c21.x * c13.x * c13y2 - 2 * c11.y * c12.x * c20.y * c13x2 * c21.y +\n 3 * c11.y * c20.y * c21.x * c12.y * c13x2 - 2 * c12.x * c20.y * c21.x * c12y2 * c13.x - c11y2 * c12.x * c21.x * c12.y * c13.x +\n 6 * c20.x * c20.y * c13x2 * c21.y * c13.y + 2 * c20.x * c12x2 * c12.y * c21.y * c13.y + 2 * c11x2 * c11.y * c13.x * c21.y * c13.y +\n c11x2 * c12.x * c12.y * c21.y * c13.y + 2 * c12x2 * c20.y * c21.x * c12.y * c13.y + 2 * c12x2 * c20.y * c12.y * c13.x * c21.y +\n 3 * c10x2 * c21.x * c13y3 - 3 * c10y2 * c13x3 * c21.y + 3 * c20x2 * c21.x * c13y3 + c11y3 * c21.x * c13x2 - c11x3 * c21.y * c13y2 -\n 3 * c20y2 * c13x3 * c21.y - c11.x * c11y2 * c13x2 * c21.y + c11x2 * c11.y * c21.x * c13y2 - 3 * c10x2 * c13.x * c21.y * c13y2 +\n 3 * c10y2 * c21.x * c13x2 * c13.y - c11x2 * c12y2 * c13.x * c21.y + c11y2 * c12x2 * c21.x * c13.y - 3 * c20x2 * c13.x * c21.y * c13y2 +\n 3 * c20y2 * c21.x * c13x2 * c13.y,\n c10.x * c10.y * c11.x * c12.y * c13.x * c13.y - c10.x * c10.y * c11.y * c12.x * c13.x * c13.y + c10.x * c11.x * c11.y * c12.x * c12.y * c13.y -\n c10.y * c11.x * c11.y * c12.x * c12.y * c13.x - c10.x * c11.x * c20.y * c12.y * c13.x * c13.y + 6 * c10.x * c20.x * c11.y * c12.y * c13.x * c13.y +\n c10.x * c11.y * c12.x * c20.y * c13.x * c13.y - c10.y * c11.x * c20.x * c12.y * c13.x * c13.y - 6 * c10.y * c11.x * c12.x * c20.y * c13.x * c13.y +\n c10.y * c20.x * c11.y * c12.x * c13.x * c13.y - c11.x * c20.x * c11.y * c12.x * c12.y * c13.y + c11.x * c11.y * c12.x * c20.y * c12.y * c13.x +\n c11.x * c20.x * c20.y * c12.y * c13.x * c13.y - c20.x * c11.y * c12.x * c20.y * c13.x * c13.y - 2 * c10.x * c20.x * c12y3 * c13.x +\n 2 * c10.y * c12x3 * c20.y * c13.y - 3 * c10.x * c10.y * c11.x * c12.x * c13y2 - 6 * c10.x * c10.y * c20.x * c13.x * c13y2 +\n 3 * c10.x * c10.y * c11.y * c12.y * c13x2 - 2 * c10.x * c10.y * c12.x * c12y2 * c13.x - 2 * c10.x * c11.x * c20.x * c12.y * c13y2 -\n c10.x * c11.x * c11.y * c12y2 * c13.x + 3 * c10.x * c11.x * c12.x * c20.y * c13y2 - 4 * c10.x * c20.x * c11.y * c12.x * c13y2 +\n 3 * c10.y * c11.x * c20.x * c12.x * c13y2 + 6 * c10.x * c10.y * c20.y * c13x2 * c13.y + 2 * c10.x * c10.y * c12x2 * c12.y * c13.y +\n 2 * c10.x * c11.x * c11y2 * c13.x * c13.y + 2 * c10.x * c20.x * c12.x * c12y2 * c13.y + 6 * c10.x * c20.x * c20.y * c13.x * c13y2 -\n 3 * c10.x * c11.y * c20.y * c12.y * c13x2 + 2 * c10.x * c12.x * c20.y * c12y2 * c13.x + c10.x * c11y2 * c12.x * c12.y * c13.x +\n c10.y * c11.x * c11.y * c12x2 * c13.y + 4 * c10.y * c11.x * c20.y * c12.y * c13x2 - 3 * c10.y * c20.x * c11.y * c12.y * c13x2 +\n 2 * c10.y * c20.x * c12.x * c12y2 * c13.x + 2 * c10.y * c11.y * c12.x * c20.y * c13x2 + c11.x * c20.x * c11.y * c12y2 * c13.x -\n 3 * c11.x * c20.x * c12.x * c20.y * c13y2 - 2 * c10.x * c12x2 * c20.y * c12.y * c13.y - 6 * c10.y * c20.x * c20.y * c13x2 * c13.y -\n 2 * c10.y * c20.x * c12x2 * c12.y * c13.y - 2 * c10.y * c11x2 * c11.y * c13.x * c13.y - c10.y * c11x2 * c12.x * c12.y * c13.y -\n 2 * c10.y * c12x2 * c20.y * c12.y * c13.x - 2 * c11.x * c20.x * c11y2 * c13.x * c13.y - c11.x * c11.y * c12x2 * c20.y * c13.y +\n 3 * c20.x * c11.y * c20.y * c12.y * c13x2 - 2 * c20.x * c12.x * c20.y * c12y2 * c13.x - c20.x * c11y2 * c12.x * c12.y * c13.x +\n 3 * c10y2 * c11.x * c12.x * c13.x * c13.y + 3 * c11.x * c12.x * c20y2 * c13.x * c13.y + 2 * c20.x * c12x2 * c20.y * c12.y * c13.y -\n 3 * c10x2 * c11.y * c12.y * c13.x * c13.y + 2 * c11x2 * c11.y * c20.y * c13.x * c13.y + c11x2 * c12.x * c20.y * c12.y * c13.y -\n 3 * c20x2 * c11.y * c12.y * c13.x * c13.y - c10x3 * c13y3 + c10y3 * c13x3 + c20x3 * c13y3 - c20y3 * c13x3 -\n 3 * c10.x * c20x2 * c13y3 - c10.x * c11y3 * c13x2 + 3 * c10x2 * c20.x * c13y3 + c10.y * c11x3 * c13y2 +\n 3 * c10.y * c20y2 * c13x3 + c20.x * c11y3 * c13x2 + c10x2 * c12y3 * c13.x - 3 * c10y2 * c20.y * c13x3 - c10y2 * c12x3 * c13.y +\n c20x2 * c12y3 * c13.x - c11x3 * c20.y * c13y2 - c12x3 * c20y2 * c13.y - c10.x * c11x2 * c11.y * c13y2 +\n c10.y * c11.x * c11y2 * c13x2 - 3 * c10.x * c10y2 * c13x2 * c13.y - c10.x * c11y2 * c12x2 * c13.y + c10.y * c11x2 * c12y2 * c13.x -\n c11.x * c11y2 * c20.y * c13x2 + 3 * c10x2 * c10.y * c13.x * c13y2 + c10x2 * c11.x * c12.y * c13y2 +\n 2 * c10x2 * c11.y * c12.x * c13y2 - 2 * c10y2 * c11.x * c12.y * c13x2 - c10y2 * c11.y * c12.x * c13x2 + c11x2 * c20.x * c11.y * c13y2 -\n 3 * c10.x * c20y2 * c13x2 * c13.y + 3 * c10.y * c20x2 * c13.x * c13y2 + c11.x * c20x2 * c12.y * c13y2 - 2 * c11.x * c20y2 * c12.y * c13x2 +\n c20.x * c11y2 * c12x2 * c13.y - c11.y * c12.x * c20y2 * c13x2 - c10x2 * c12.x * c12y2 * c13.y - 3 * c10x2 * c20.y * c13.x * c13y2 +\n 3 * c10y2 * c20.x * c13x2 * c13.y + c10y2 * c12x2 * c12.y * c13.x - c11x2 * c20.y * c12y2 * c13.x + 2 * c20x2 * c11.y * c12.x * c13y2 +\n 3 * c20.x * c20y2 * c13x2 * c13.y - c20x2 * c12.x * c12y2 * c13.y - 3 * c20x2 * c20.y * c13.x * c13y2 + c12x2 * c20y2 * c12.y * c13.x\n ].reverse();\n\n let roots = getRootsInInterval(0, 1, coefs);\n\n for(let i = 0; i < roots.length; i++) {\n let s = roots[i];\n let xRoots = getRoots([c13.x, c12.x, c11.x, c10.x - c20.x - s * c21.x - s * s * c22.x - s * s * s * c23.x].reverse());\n let yRoots = getRoots([c13.y,\n c12.y,\n c11.y,\n c10.y - c20.y - s * c21.y - s * s * c22.y - s * s * s * c23.y].reverse());\n\n if(xRoots.length > 0 && yRoots.length > 0) {\n let TOLERANCE = 1e-4;\n\n checkRoots:\n for(let j = 0; j < xRoots.length; j++) {\n let xRoot = xRoots[j];\n\n if(0 <= xRoot && xRoot <= 1) {\n for(let k = 0; k < yRoots.length; k++) {\n if(Math.abs(xRoot - yRoots[k]) < TOLERANCE) {\n let x = c23.x * s * s * s + c22.x * s * s + c21.x * s + c20.x;\n let y = c23.y * s * s * s + c22.y * s * s + c21.y * s + c20.y;\n result.push({x, y, t: xRoot});\n break checkRoots;\n }\n }\n }\n }\n }\n }\n return result;\n}\n\nfunction intersectBezier2Bezier3(ax1, ay1, ax2, ay2, ax3, ay3, bx1, by1, bx2, by2, bx3, by3, bx4, by4) {\n let c12, c11, c10;\n let c23, c22, c21, c20;\n let result = [];\n\n c12 = {\n x: ax1 - 2 * ax2 + ax3,\n y: ay1 - 2 * ay2 + ay3,\n };\n\n c11 = {\n x: 2 * ax2 - 2 * ax1,\n y: 2 * ay2 - 2 * ay1,\n };\n c10 = {x: ax1, y: ay1};\n\n c23 = {\n x: -bx1 + 3 * bx2 - 3 * bx3 + bx4,\n y: -by1 + 3 * by2 - 3 * by3 + by4,\n };\n\n c22 = {\n x: 3 * bx1 - 6 * bx2 + 3 * bx3,\n y: 3 * by1 - 6 * by2 + 3 * by3,\n };\n\n c21 = {\n x: -3 * bx1 + 3 * bx2,\n y: -3 * by1 + 3 * by2,\n };\n\n c20 = {x: bx1, y: by1};\n\n let c10x2 = c10.x * c10.x;\n let c10y2 = c10.y * c10.y;\n let c11x2 = c11.x * c11.x;\n let c11y2 = c11.y * c11.y;\n let c12x2 = c12.x * c12.x;\n let c12y2 = c12.y * c12.y;\n let c20x2 = c20.x * c20.x;\n let c20y2 = c20.y * c20.y;\n let c21x2 = c21.x * c21.x;\n let c21y2 = c21.y * c21.y;\n let c22x2 = c22.x * c22.x;\n let c22y2 = c22.y * c22.y;\n let c23x2 = c23.x * c23.x;\n let c23y2 = c23.y * c23.y;\n\n let coefs = [\n -2 * c12.x * c12.y * c23.x * c23.y + c12x2 * c23y2 + c12y2 * c23x2,\n -2 * c12.x * c12.y * c22.x * c23.y - 2 * c12.x * c12.y * c22.y * c23.x + 2 * c12y2 * c22.x * c23.x +\n 2 * c12x2 * c22.y * c23.y,\n -2 * c12.x * c21.x * c12.y * c23.y - 2 * c12.x * c12.y * c21.y * c23.x - 2 * c12.x * c12.y * c22.x * c22.y +\n 2 * c21.x * c12y2 * c23.x + c12y2 * c22x2 + c12x2 * (2 * c21.y * c23.y + c22y2),\n 2 * c10.x * c12.x * c12.y * c23.y + 2 * c10.y * c12.x * c12.y * c23.x + c11.x * c11.y * c12.x * c23.y +\n c11.x * c11.y * c12.y * c23.x - 2 * c20.x * c12.x * c12.y * c23.y - 2 * c12.x * c20.y * c12.y * c23.x -\n 2 * c12.x * c21.x * c12.y * c22.y - 2 * c12.x * c12.y * c21.y * c22.x - 2 * c10.x * c12y2 * c23.x -\n 2 * c10.y * c12x2 * c23.y + 2 * c20.x * c12y2 * c23.x + 2 * c21.x * c12y2 * c22.x -\n c11y2 * c12.x * c23.x - c11x2 * c12.y * c23.y + c12x2 * (2 * c20.y * c23.y + 2 * c21.y * c22.y),\n 2 * c10.x * c12.x * c12.y * c22.y + 2 * c10.y * c12.x * c12.y * c22.x + c11.x * c11.y * c12.x * c22.y +\n c11.x * c11.y * c12.y * c22.x - 2 * c20.x * c12.x * c12.y * c22.y - 2 * c12.x * c20.y * c12.y * c22.x -\n 2 * c12.x * c21.x * c12.y * c21.y - 2 * c10.x * c12y2 * c22.x - 2 * c10.y * c12x2 * c22.y +\n 2 * c20.x * c12y2 * c22.x - c11y2 * c12.x * c22.x - c11x2 * c12.y * c22.y + c21x2 * c12y2 +\n c12x2 * (2 * c20.y * c22.y + c21y2),\n 2 * c10.x * c12.x * c12.y * c21.y + 2 * c10.y * c12.x * c21.x * c12.y + c11.x * c11.y * c12.x * c21.y +\n c11.x * c11.y * c21.x * c12.y - 2 * c20.x * c12.x * c12.y * c21.y - 2 * c12.x * c20.y * c21.x * c12.y -\n 2 * c10.x * c21.x * c12y2 - 2 * c10.y * c12x2 * c21.y + 2 * c20.x * c21.x * c12y2 -\n c11y2 * c12.x * c21.x - c11x2 * c12.y * c21.y + 2 * c12x2 * c20.y * c21.y,\n -2 * c10.x * c10.y * c12.x * c12.y - c10.x * c11.x * c11.y * c12.y - c10.y * c11.x * c11.y * c12.x +\n 2 * c10.x * c12.x * c20.y * c12.y + 2 * c10.y * c20.x * c12.x * c12.y + c11.x * c20.x * c11.y * c12.y +\n c11.x * c11.y * c12.x * c20.y - 2 * c20.x * c12.x * c20.y * c12.y - 2 * c10.x * c20.x * c12y2 +\n c10.x * c11y2 * c12.x + c10.y * c11x2 * c12.y - 2 * c10.y * c12x2 * c20.y -\n c20.x * c11y2 * c12.x - c11x2 * c20.y * c12.y + c10x2 * c12y2 + c10y2 * c12x2 +\n c20x2 * c12y2 + c12x2 * c20y2].reverse();\n\n let roots = getRootsInInterval(0, 1, coefs);\n // console.log(roots);\n\n for(let i = 0; i < roots.length; i++) {\n let s = roots[i];\n let xRoots = getRoots([c12.x,\n c11.x,\n c10.x - c20.x - s * c21.x - s * s * c22.x - s * s * s * c23.x].reverse());\n let yRoots = getRoots([c12.y,\n c11.y,\n c10.y - c20.y - s * c21.y - s * s * c22.y - s * s * s * c23.y].reverse());\n //\n // console.log('xRoots', xRoots);\n //\n // console.log('yRoots', yRoots);\n\n if(xRoots.length > 0 && yRoots.length > 0) {\n let TOLERANCE = 1e-4;\n\n checkRoots:\n for(let j = 0; j < xRoots.length; j++) {\n let xRoot = xRoots[j];\n\n if(0 <= xRoot && xRoot <= 1) {\n for(let k = 0; k < yRoots.length; k++) {\n if(Math.abs(xRoot - yRoots[k]) < TOLERANCE) {\n\n let x = c23.x * s * s * s + c22.x * s * s + c21.x * s + c20.x;\n let y = c23.y * s * s * s + c22.y * s * s + c21.y * s + c20.y;\n result.push({x, y, t: xRoot});\n break checkRoots;\n }\n }\n }\n }\n }\n }\n return result;\n}\n\nfunction intersectBezier2Line(ax1, ay1, ax2, ay2, ax3, ay3, bx1, by1, bx2, by2) {\n let c2, c1, c0;\n let cl, n;\n let result = [];\n\n let minbx = Math.min(bx1, bx2);\n let minby = Math.min(by1, by2);\n let maxbx = Math.max(bx1, bx2);\n let maxby = Math.max(by1, by2);\n\n const dot = (a, b) => a.x * b.x + a.y * b.y;\n const lerp = (a, b, t) => ({\n x: a.x - (a.x - b.x) * t,\n y: a.y - (a.y - b.y) * t,\n t,\n });\n\n c2 = {\n x: ax1 - 2 * ax2 + ax3,\n y: ay1 - 2 * ay2 + ay3,\n };\n c1 = {\n x: -2 * ax1 + 2 * ax2,\n y: -2 * ay1 + 2 * ay2,\n };\n c0 = {x: ax1, y: ay1};\n\n n = {x: by1 - by2, y: bx2 - bx1};\n cl = bx1 * by2 - bx2 * by1;\n\n // console.log('intersectBezier2Line', n, c0, c1, c2, cl);\n\n let coefs = [dot(n, c2), dot(n, c1), dot(n, c0) + cl].reverse();\n\n // console.log('intersectBezier2Line coefs', coefs);\n\n let roots = getRoots(coefs);\n\n // console.log('intersectBezier2Line roots', roots);\n\n for(let i = 0; i < roots.length; i++) {\n let t = roots[i];\n\n if(0 <= t && t <= 1) {\n let p4 = lerp({x: ax1, y: ay1}, {x: ax2, y: ay2}, t);\n let p5 = lerp({x: ax2, y: ay2}, {x: ax3, y: ay3}, t);\n\n let p6 = lerp(p4, p5, t);\n // console.log('p4, p5, p6', p4, p5, p6);\n\n if(bx1 === bx2) {\n if(minby <= p6.y && p6.y <= maxby) {\n result.push(p6);\n }\n }\n else if(by1 === by2) {\n if(minbx <= p6.x && p6.x <= maxbx) {\n result.push(p6);\n }\n }\n else if(p6.x >= minbx && p6.y >= minby && p6.x <= maxbx && p6.y <= maxby) {\n result.push(p6);\n }\n }\n }\n return result;\n}\n\n\n/**\n *\n * (-P1+3P2-3P3+P4)t^3 + (3P1-6P2+3P3)t^2 + (-3P1+3P2)t + P1\n * /\\ /\\ /\\ /\\\n * || || || ||\n * c3 c2 c1 c0\n */\nfunction intersectBezier3Line(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4, bx1, by1, bx2, by2) {\n let c3, c2, c1, c0;\n let cl, n;\n let result = [];\n\n let minbx = Math.min(bx1, bx2);\n let minby = Math.min(by1, by2);\n let maxbx = Math.max(bx1, bx2);\n let maxby = Math.max(by1, by2);\n\n const dot = (a, b) => a.x * b.x + a.y * b.y;\n const lerp = (a, b, t) => ({\n x: a.x - (a.x - b.x) * t,\n y: a.y - (a.y - b.y) * t,\n t,\n });\n\n c3 = {\n x: -ax1 + 3 * ax2 - 3 * ax3 + ax4,\n y: -ay1 + 3 * ay2 - 3 * ay3 + ay4,\n };\n c2 = {\n x: 3 * ax1 - 6 * ax2 + 3 * ax3,\n y: 3 * ay1 - 6 * ay2 + 3 * ay3,\n };\n c1 = {\n x: -3 * ax1 + 3 * ax2,\n y: -3 * ay1 + 3 * ay2,\n };\n c0 = {x: ax1, y: ay1};\n\n n = {x: by1 - by2, y: bx2 - bx1};\n cl = bx1 * by2 - bx2 * by1;\n\n let coefs = [\n cl + dot(n, c0),\n dot(n, c1),\n dot(n, c2),\n dot(n, c3),\n ];\n\n let roots = getRoots(coefs);\n\n for(let i = 0; i < roots.length; i++) {\n let t = roots[i];\n\n if(0 <= t && t <= 1) {\n let p5 = lerp({x: ax1, y: ay1}, {x: ax2, y: ay2}, t);\n let p6 = lerp({x: ax2, y: ay2}, {x: ax3, y: ay3}, t);\n let p7 = lerp({x: ax3, y: ay3}, {x: ax4, y: ay4}, t);\n let p8 = lerp(p5, p6, t);\n let p9 = lerp(p6, p7, t);\n let p10 = lerp(p8, p9, t);\n\n if(bx1 === bx2) {\n if(minby <= p10.y && p10.y <= maxby) {\n result.push(p10);\n }\n }\n else if(by1 === by2) {\n if(minbx <= p10.x && p10.x <= maxbx) {\n result.push(p10);\n }\n }\n else if(p10.x >= minbx && p10.y >= minby && p10.x <= maxbx && p10.y <= maxby) {\n result.push(p10);\n }\n }\n }\n return result;\n}\n\n/**\n * 3d直线交点,允许误差,传入4个顶点坐标\n * limitToFiniteSegment可传0、1、2、3,默认0是不考虑点是否在传入的顶点组成的线段上\n * 1为限制在p1/p2线段,2为限制在p3/p4线段,3为都限制\n */\nfunction intersectLineLine3(p1, p2, p3, p4, limitToFiniteSegment = 0, tolerance = 1e-9) {\n let p13 = subtractPoint(p1, p3);\n let p43 = subtractPoint(p4, p3);\n let p21 = subtractPoint(p2, p1);\n let d1343 = p13.x * p43.x + p13.y * p43.y + p13.z * p43.z;\n let d4321 = p43.x * p21.x + p43.y * p21.y + p43.z * p21.z;\n let d1321 = p13.x * p21.x + p13.y * p21.y + p13.z * p21.z;\n let d4343 = p43.x * p43.x + p43.y * p43.y + p43.z * p43.z;\n let d2121 = p21.x * p21.x + p21.y * p21.y + p21.z * p21.z;\n let denom = d2121 * d4343 - d4321 * d4321;\n if(Math.abs(denom) < tolerance) {\n return;\n }\n let numer = d1343 * d4321 - d1321 * d4343;\n let mua = numer / denom;\n let mub = (d1343 + d4321 * mua) / d4343;\n let pa = {\n x: p1.x + mua * p21.x,\n y: p1.y + mua * p21.y,\n z: p1.z + mua * p21.z,\n };\n let pb = {\n x: p3.x + mub * p43.x,\n y: p3.y + mub * p43.y,\n z: p3.z + mub * p43.z,\n };\n let distance = distanceTo(pa, pb);\n if(distance > tolerance) {\n return;\n }\n let intersectPt = divide(addPoint(pa, pb), 2);\n if(!limitToFiniteSegment) {\n return intersectPt;\n }\n let paramA = closestParam(intersectPt, p1, p2);\n let paramB = closestParam(intersectPt, p3, p4);\n if(limitToFiniteSegment === 1 && paramA >= 0 && paramA <= 1) {\n return intersectPt;\n }\n if(limitToFiniteSegment === 2 && paramB >= 0 && paramB <= 1) {\n return intersectPt;\n }\n if(limitToFiniteSegment === 3 && paramA >= 0 && paramA <= 1 && paramB >= 0 && paramB <= 1) {\n return intersectPt;\n }\n}\n\nfunction subtractPoint(p1, p2) {\n return {\n x: p1.x - p2.x,\n y: p1.y - p2.y,\n z: p1.z - p2.z,\n };\n}\n\nfunction distanceTo(a, b) {\n return Math.sqrt(Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2) + Math.pow(a.z - b.z, 2));\n}\n\nfunction addPoint(a, b) {\n return {\n x: a.x + b.x,\n y: a.y + b.y,\n z: a.z + b.z,\n };\n}\n\nfunction divide(p, t) {\n let n = 1 / t;\n return {\n x: p.x * n,\n y: p.y * n,\n z: p.z * n,\n };\n}\n\nfunction closestParam(p, from, to) {\n let startToP = subtractPoint(p, from);\n let startToEnd = subtractPoint(to, from);\n let startEnd2 = dotProduct3(startToEnd, startToEnd);\n let startEnd_startP = dotProduct3(startToEnd, startToP);\n return startEnd_startP / startEnd2;\n}\n\n/**\n * 平面相交线,传入2个平面的各3个顶点,返回2点式\n */\nfunction intersectPlanePlane(p1, p2, p3, p4, p5, p6) {\n let v1 = unitize3(\n p2.x - p1.x,\n p2.y - p1.y,\n p2.z - p1.z,\n ), v2 = unitize3(\n p3.x - p1.x,\n p3.y - p1.y,\n p3.z - p1.z,\n ), v4 = unitize3(\n p5.x - p4.x,\n p5.y - p4.y,\n p5.z - p4.z,\n ), v5 = unitize3(\n p6.x - p4.x,\n p6.y - p4.y,\n p6.z - p4.z,\n );\n let v3 = unitize3(crossProduct3(v1.x, v1.y, v1.z, v2.x, v2.y, v2.z));\n let v6 = unitize3(crossProduct3(v4.x, v4.y, v4.z, v5.x, v5.y, v5.z));\n if(isParallel3(v3, v6)) {\n return null;\n }\n let normal = crossProduct3(v6.x, v6.y, v6.z, v3.x, v3.y, v3.z);\n let p7 = addPoint(v1, v4);\n // planeC\n let v9 = unitize3(normal.x, normal.y, normal.z);\n // 3平面相交\n let a1 = v3.x, b1 = v3.y, c1 = v3.z, d1 = -a1 * p1.x - b1 * p1.y - c1 * p1.z;\n let a2 = v6.x, b2 = v6.y, c2 = v6.z, d2 = -a2 * p4.x - b2 * p4.y - c2 * p4.z;\n let a3 = v9.x, b3 = v9.y, c3 = v9.z, d3 = -a3 * p7.x - b3 * p7.y - c3 * p7.z;\n let mb = [-d1, -d2, -d3];\n let det = a1 * (b2 * c3 - c2 * b3) - b1 * (a2 * c3 - c2 * a3) + c1 * (a2 * b3 - b2 * a3);\n if(Math.abs(det) < 1e-9) {\n return null;\n }\n let invDet = 1 / det;\n let v11 = invDet * (b2 * c3 - c2 * b3);\n let v12 = invDet * (c1 * b3 - b1 * c3);\n let v13 = invDet * (b1 * c2 - c1 * b2);\n let v21 = invDet * (c2 * a3 - a2 * c3);\n let v22 = invDet * (a1 * c3 - c1 * a3);\n let v23 = invDet * (c1 * a2 - a1 * c2);\n let v31 = invDet * (a2 * b3 - b2 * a3);\n let v32 = invDet * (b1 * a3 - a1 * b3);\n let v33 = invDet * (a1 * b2 - b1 * a2);\n let x = v11 * mb[0] + v12 * mb[1] + v13 * mb[2];\n let y = v21 * mb[0] + v22 * mb[1] + v23 * mb[2];\n let z = v31 * mb[0] + v32 * mb[1] + v33 * mb[2];\n let point = { x, y, z };\n return [\n point,\n addPoint(point, v9),\n ];\n}\n\n// 点是否在线段上,注意误差\nfunction pointOnLine3(p, p1, p2) {\n let v1x = p1.x - p.x, v1y = p1.y - p.y, v1z = p1.z - p.z;\n let v2x = p2.x - p.x, v2y = p2.y - p.y, v2z = p2.z - p.z;\n let c = crossProduct3(v1x, v1y, v1z, v2x, v2y, v2z);\n return length3(c.x, c.y, c.z) < 1e-9;\n}\n\nexport default {\n intersectBezier2Line, // 二阶贝塞尔曲线 与 直线\n intersectBezier3Line, // 三阶贝塞尔曲线 与 直线\n intersectBezier2Bezier2, // 二阶贝塞尔曲线 与 二阶贝塞尔曲线\n intersectBezier3Bezier3, // 三阶贝塞尔曲线 与 三阶贝塞尔曲线\n intersectBezier2Bezier3, // 二阶贝塞尔曲线 与 三阶贝塞尔曲线\n intersectLineLine3,\n intersectPlanePlane,\n pointOnLine3,\n}\n","import isec from '../math/isec';\nimport geom from '../math/geom';\nimport vector from '../math/vector';\n\nconst { intersectPlanePlane, intersectLineLine3, pointOnLine3 } = isec;\nconst { isRectsOverlap } = geom;\nconst { isZero3 } = vector;\n\n// 设置新拼图的x/y/z投影数据和bbox数据,原本平面矩形也算一个拼图\nfunction shadow(puzzle) {\n let points = puzzle.points;\n let xShadow = [\n {\n y: points[0].y,\n z: points[0].z,\n },\n ];\n if(points[1].y !== points[0].y || points[1].z !== points[0].z) {\n xShadow.push({\n y: points[1].y,\n z: points[1].z,\n });\n }\n if((points[2].y !== points[0].y || points[2].z !== points[0].z)\n && (points[2].y !== points[1].y || points[2].z !== points[1].z)) {\n xShadow.push({\n y: points[2].y,\n z: points[2].z,\n });\n }\n if((points[3].y !== points[0].y || points[3].z !== points[0].z)\n && (points[3].y !== points[1].y || points[3].z !== points[1].z)\n && (points[3].y !== points[2].y || points[3].z !== points[2].z)) {\n xShadow.push({\n y: points[3].y,\n z: points[3].z,\n });\n }\n // 顶点和bbox,每个轴投影都要,x特殊多线段列表\n puzzle.xShadow = [];\n puzzle.xBbox = [];\n for(let j = 0, len = xShadow.length; j < len; j++) {\n let a = xShadow[j];\n puzzle.xShadow.push(a);\n if(j === 0) {\n puzzle.xBbox[0] = a.z;\n puzzle.xBbox[1] = a.y;\n puzzle.xBbox[2] = a.z;\n puzzle.xBbox[3] = a.y;\n }\n else {\n puzzle.xBbox[0] = Math.min(puzzle.xBbox[0], a.z);\n puzzle.xBbox[1] = Math.min(puzzle.xBbox[1], a.y);\n puzzle.xBbox[2] = Math.max(puzzle.xBbox[2], a.z);\n puzzle.xBbox[3] = Math.max(puzzle.xBbox[3], a.y);\n }\n }\n // y/z类似,但不用排序添加\n let yShadow = [\n {\n x: points[0].x,\n z: points[0].z,\n },\n ];\n if(points[1].x !== points[0].x || points[1].z !== points[0].z) {\n yShadow.push({\n x: points[1].x,\n z: points[1].z,\n });\n }\n if((points[2].x !== points[0].x || points[2].z !== points[0].z)\n && (points[2].x !== points[1].x || points[2].z !== points[1].z)) {\n yShadow.push({\n x: points[2].x,\n z: points[2].z,\n });\n }\n if((points[3].x !== points[0].x || points[3].z !== points[0].z)\n && (points[3].x !== points[1].x || points[3].z !== points[1].z)\n && (points[3].x !== points[2].x || points[3].z !== points[2].z)) {\n yShadow.push({\n x: points[3].x,\n z: points[3].z,\n });\n }\n // y/z类似,但不用排序添加\n puzzle.yShadow = [];\n puzzle.yBbox = [];\n for(let j = 0, len = yShadow.length; j < len; j++) {\n let a = yShadow[j];\n puzzle.yShadow.push(a);\n if(j === 0) {\n puzzle.yBbox[0] = a.x;\n puzzle.yBbox[1] = a.z;\n puzzle.yBbox[2] = a.x;\n puzzle.yBbox[3] = a.z;\n }\n else {\n puzzle.yBbox[0] = Math.min(puzzle.yBbox[0], a.x);\n puzzle.yBbox[1] = Math.min(puzzle.yBbox[1], a.z);\n puzzle.yBbox[2] = Math.max(puzzle.yBbox[2], a.x);\n puzzle.yBbox[3] = Math.max(puzzle.yBbox[3], a.z);\n }\n }\n let zShadow = [\n {\n x: points[0].x,\n y: points[0].y,\n },\n ];\n if(points[1].x !== points[0].x || points[1].y !== points[0].y) {\n zShadow.push({\n x: points[1].x,\n y: points[1].y,\n });\n }\n if((points[2].x !== points[0].x || points[2].y !== points[0].y)\n && (points[2].x !== points[1].x || points[2].y !== points[1].y)) {\n zShadow.push({\n x: points[2].x,\n y: points[2].y,\n });\n }\n if((points[3].x !== points[0].x || points[3].y !== points[0].y)\n && (points[3].x !== points[1].x || points[3].y !== points[1].y)\n && (points[3].x !== points[2].x || points[3].y !== points[2].y)) {\n zShadow.push({\n x: points[3].x,\n y: points[3].y,\n });\n }\n puzzle.zShadow = [];\n puzzle.zBbox = [];\n for(let j = 0, len = zShadow.length; j < len; j++) {\n let a = zShadow[j];\n puzzle.zShadow.push(a);\n if(j === 0) {\n puzzle.zBbox[0] = a.x;\n puzzle.zBbox[1] = a.y;\n puzzle.zBbox[2] = a.x;\n puzzle.zBbox[3] = a.y;\n }\n else {\n puzzle.zBbox[0] = Math.min(puzzle.zBbox[0], a.x);\n puzzle.zBbox[1] = Math.min(puzzle.zBbox[1], a.y);\n puzzle.zBbox[2] = Math.max(puzzle.zBbox[2], a.x);\n puzzle.zBbox[3] = Math.max(puzzle.zBbox[3], a.y);\n }\n }\n}\n\n// 多个平面相交切割,每个平面有[3,]个顶点,且有index索引额外信息\nfunction splitQuadrilateralPlane(list) {\n let uuid = 0;\n let length = list.length;\n if(length < 2) {\n return;\n }\n // 先每个四边形计算x/y/z轴上的投影,可能是四边形也可能重合三角形或直线\n let xList = [];\n for(let i = 0; i < length; i++) {\n let item = list[i];\n shadow(item);\n item.uuid = uuid++;\n item.plane = item;\n let xShadow = item.xShadow;\n for(let i = 0, len = xShadow.length; i < len; i++) {\n // 只有2个点防重,x投影特殊需要,线段排序列表\n if(len === 2 && i === 1) {\n break;\n }\n let a = xShadow[i];\n let b = xShadow[(i + 1) % len];\n if(a.z > b.z) {\n [a, b] = [b, a];\n }\n xList.push({\n belong: item,\n y1: a.y,\n z1: a.z,\n y2: b.y,\n z2: b.z,\n });\n }\n }\n /**\n * 从侧面观看投影,即x轴,按照深度z顺序,每个平面可形成2或4条线(y/z坐标),用扫描线算法求交\n * 处在扫描线活动范围下的2个线段,如果属于2个不同平面,继续\n * 再检测面的x/y/z是否bbox重叠,3个都重叠是2个四边面空间重叠的必要条件,以此前提甄选\n * 再用平面相交公式求得相交线,查看双方顶点是否都存在于此条线上且范围内,都有则真正相交,开始拆分\n */\n let eventHash = {};\n for(let i = 0, len = xList.length; i < len; i++) {\n let seg = xList[i];\n let o = eventHash[seg.z1] = eventHash[seg.z1] || [];\n o.push(seg);\n o = eventHash[seg.z2] = eventHash[seg.z2] || [];\n o.push(seg);\n }\n // z排序,不用管y\n let eventList = [];\n for(let i in eventHash) {\n if(eventHash.hasOwnProperty(i)) {\n let o = eventHash[i];\n eventList.push({\n z: i,\n list: o,\n });\n }\n }\n eventList.sort(function(a, b) {\n return a.z - b.z;\n });\n const HISTORY = {}; // 求过的2个平面记录,只求1次防重\n let ael = []; // 当前扫描线活动边\n for(let i = 0, elLen = eventList.length; i < elLen; i++) {\n let { z, list } = eventList[i];\n for(let j = 0, length = list.length; j < length; j++) {\n let seg = list[j];\n // 第1次进是start,第2次是end\n if(seg.isVisited) {\n let j = ael.indexOf(seg);\n if(j > -1) {\n ael.splice(j, 1);\n }\n }\n else {\n if(ael.length) {\n for(let j = 0, len = ael.length; j < len; j++) {\n let item = ael[j];\n let pa = seg.belong, pb = item.belong;\n // 属于不同的平面才能相交\n if(pa.plane === pb.plane) {\n continue;\n }\n // 如果面被拆分过,忽略掉\n if(pa.isDeleted) {\n break;\n }\n if(pb.isDeleted) {\n continue;\n }\n // 无论结果如何,这2个拼图都记录下防止重复检测\n let key = pa.uuid > pb.uuid ? (pb.uuid + ',' + pa.uuid) : (pa.uuid + ',' + pb.uuid);\n if(HISTORY.hasOwnProperty(key)) {\n continue;\n }\n HISTORY[key] = true;\n // 所属的2个面进行x/y/z上的bbox重叠验证,是屏幕真相交的前提必要条件\n if(isRectsOverlap(pa.xBbox, pb.xBbox, false)\n && isRectsOverlap(pa.yBbox, pb.yBbox, false)\n && isRectsOverlap(pa.zBbox, pb.zBbox, false)) {\n let pointsA = pa.points, pointsB = pb.points;\n // 真正求交\n let line = intersectPlanePlane(\n pointsA[0], pointsA[1], pointsA[2],\n pointsB[0], pointsB[1], pointsB[2]\n );\n if(!line) {\n continue;\n }\n // 这条线一定和2个四边形有2/4个不同交点,分别用每条边和直线求交点,2个是四边形a内切割b,4个是a和b恰好互相切割\n // 被切割后的puzzle解法相同,只是变成了多边形,n>=3\n let resA = [], resB = [];\n for(let i = 0, len = pointsA.length; i < len; i++) {\n let r = intersectLineLine3(\n pointsA[i], pointsA[(i + 1) % len],\n line[0], line[1], 1\n );\n if(r) {\n resA.push(r);\n }\n }\n for(let i = 0, len = pointsB.length; i < len; i++) {\n let r = intersectLineLine3(\n pointsB[i], pointsB[(i + 1) % len],\n line[0], line[1], 1\n );\n if(r) {\n resB.push(r);\n }\n }\n // res只可能是2和0,2个res组合只有3种可能,其它则是精度误差忽略,切割的交点在边的索引和下个索引之间的边上\n if(resA.length === 2 && resB.length === 2\n || resA.length === 2 && !resB.length\n || !resA.length || resB.length === 2) {\n let puzzle = [];\n // 2个都需要切割,各自判断\n if(resA.length) {\n pa.isDeleted = true;\n let t = splitPlaneByPoint(pa, resA);\n if(t) {\n puzzle = puzzle.concat(t);\n }\n }\n if(resB.length) {\n pa.isDeleted = true;\n let t = splitPlaneByPoint(pb, resB);\n if(t) {\n puzzle = puzzle.concat(t);\n }\n }\n // 新的拼图需考虑加入到eventList的合适位置,可能是新增的扫描事件\n for(let j = 0, len = puzzle.length; j < len; j++) {\n let item = puzzle[j];\n shadow(item);\n item.uuid = uuid++;\n let xBbox = item.xBbox;\n if(xBbox[2] <= z) {\n continue;\n }\n let xShadow = item.xShadow;\n for(let j = 0, len = xShadow.length; j < len; j++) {\n // 只有2个点防重,x投影特殊需要,线段排序列表\n if(len === 2 && j === 1) {\n break;\n }\n let a = xShadow[j];\n let b = xShadow[(j + 1) % len];\n if(a.z > b.z) {\n [a, b] = [b, a];\n }\n // 和初始化不一样多判断下,最大值比当前还小的是无效的事件,已经扫过了\n if(b.z <= z) {\n continue;\n }\n let seg = {\n belong: item,\n y1: a.y,\n z1: a.z,\n y2: b.y,\n z2: b.z,\n };\n // 最小值比当前z小,被访问过isVisited\n if(seg.z1 <= z) {\n seg.isVisited = true;\n // 等于才加入当前事件列表\n if(seg.z1 === z) {\n list.push(seg);\n length++;\n }\n }\n // 最大值加入事件列表,=z忽略,注意判断可能z所属的扫描坐标不存在\n if(seg.z2 > z) {\n for(let j = i + 1; j < elLen; j++) {\n let item = eventList[j];\n let z = item.z;\n if(seg.z2 === z) {\n item.list.push(seg);\n break;\n }\n else if(seg.z2 > z || j === elLen - 1) {\n eventList.splice(j, 0, {\n z: seg.z2,\n list: [seg],\n });\n elLen++;\n break;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n seg.isVisited = true;\n ael.push(seg);\n }\n }\n }\n}\n\nfunction splitPlaneByPoint(puzzle, res) {\n let plane = puzzle.plane, points = puzzle.points, i1 = -1, i2 = -1;\n let p0 = points[0], p1 = points[1], p2 = points[2], p3 = points[3];\n // 交点一定在边上,不在边上的不切割\n for(let i = 0, len = points.length; i < len; i++) {\n let p1 = points[i], p2 = points[(i + 1) % len];\n let r1 = pointOnLine3(res[0], p1, p2);\n let r2 = pointOnLine3(res[1], p1, p2);\n if(r1) {\n i1 = i;\n }\n if(r2) {\n i2 = i;\n }\n }\n // 看是否相邻以及是否是原有顶点,不同情况不同拆分,切割也不能在同一条边上\n if(i1 > -1 && i2 > -1 && i1 !== i2) {\n let onVertex1 = isZero3(points[i1], res[0]) ? i1 : -1;\n if(!onVertex1 && points[i1 + 1]) {\n onVertex1 = isZero3(points[i1 + 1], res[0]) ? (i1 + 1) : -1;\n }\n let onVertex2 = isZero3(points[i2], res[1]) ? i2 : -1;\n if(!onVertex2 && points[i2 + 1]) {\n onVertex2 = isZero3(points[i2 + 1], res[1]) ? (i2 + 1) : -1;\n }\n // 如果是相邻顶点,或者只有1个顶点但恰好2点在同边则失效\n if(Math.abs(i1 - i2) <= 1) {\n if(onVertex1 > -1 && onVertex2 > -1) {\n return;\n }\n else if(onVertex1 > -1) {\n if(onVertex1 === i2) {\n return;\n }\n }\n else if(onVertex2 > -1) {\n if(onVertex2 === i2) {\n return;\n }\n }\n }\n // 原本矩形经过任意matrix变换后一定还是个平行四边形(相对所在平面),4个顶点坐标已知\n // 然后交点坐标已知,也一定在这个平面上,求得相对于左上角顶点即原点的百分比坐标,分母为宽或高\n // 其实就是求拆分后的拼图,某个点对应于原本矩形纹理的百分比坐标\n // 先求得平行四边形的2个邻边的向量,然后求交点和向量所在直线与边的交点即可得出\n let va = plane.va, vb = plane.vb;\n if(!va) {\n va = plane.va = {\n x: p0.x - p1.x,\n y: p0.y - p1.y,\n z: p0.z - p1.z,\n };\n }\n if(!vb) {\n vb = plane.vb = {\n x: p1.x - p2.x,\n y: p1.y - p2.y,\n z: p1.z - p2.z,\n };\n }\n let hash = [], r0, r1;\n // n边形(n一定>=3),会被分为a、b两个多边形\n plane.puzzle = plane.puzzle || [];\n let puzzle = [];\n let a = {\n plane,\n node: plane.node,\n target: plane.target,\n isPuzzle: true,\n points: [],\n };\n for(let i = 0; i <= i1; i++) {\n let r = hash[i] = getPercentXY(points[i], va, vb, p0, p1, p3);\n a.points.push(r);\n }\n // 第1个交点如果在顶点上忽略,前面循环考虑了\n if(onVertex1 === -1) {\n a.points.push(r0 = getPercentXY(res[0], va, vb, p0, p1, p3));\n }\n // 第2个即便在顶点上也包含,后面循环没考虑\n a.points.push(r1 = getPercentXY(res[1], va, vb, p0, p1, p3));\n for(let i = i2 + 1, len = points.length; i < len; i++) {\n let r = hash[i] = getPercentXY(points[i], va, vb, p0, p1, p3);\n a.points.push(r);\n }\n if(a.points.length > 2) {\n puzzle.push(a);\n }\n // b部分同上\n let b = {\n plane,\n node: plane.node,\n target: plane.target,\n isPuzzle: true,\n points: [],\n };\n // 复用数据但不能相同引用\n if(r0) {\n b.points.push(Object.assign({}, r0));\n }\n else {\n b.points.push(getPercentXY(res[0], va, vb, p0, p1, p3));\n }\n for(let i = i1 + 1; i <= i2; i++) {\n let r = hash[i] = hash[i] || getPercentXY(points[i], va, vb, p0, p1, p3);\n b.points.push(r);\n }\n if(onVertex2 === -1) {\n if(r1) {\n b.points.push(Object.assign({}, r1));\n }\n else {\n b.points.push(getPercentXY(res[1], va, vb, p0, p1, p3));\n }\n }\n if(b.points.length > 2) {\n puzzle.push(b);\n }\n // 只返回新增的\n plane.puzzle = plane.puzzle.concat(puzzle);\n return puzzle;\n }\n}\n\n// 已知空间平行四边形顶点和其面上一点,求相对于左上角顶点即原点的百分比坐标,四边形宽高即分母\nfunction getPercentXY(p, va, vb, p0, p1, p3) {\n let pa = {\n x: p.x + va.x,\n y: p.y + va.y,\n z: p.z + va.z,\n }, pb = {\n x: p.x + vb.x,\n y: p.y + vb.y,\n z: p.z + vb.z,\n };\n let ipx = intersectLineLine3(p0, p1, p, pb, 3);\n let ipy = intersectLineLine3(p0, p3, p, pa, 3);\n return {\n x: p.x,\n y: p.y,\n z: p.z,\n px: (ipx.x - p0.x) / (p1.x - p0.x),\n py: (ipy.y - p0.y) / (p3.y - p1.y),\n };\n}\n\n// 将拼图按z顺序排好,渲染从z小的开始,拼图已经完全不相交(3d空间)\nfunction sortPuzzleZ(list) {\n if(list.length < 2) {\n return list;\n }\n // 用扫描线遍历一遍,可以找到2个拼图在x投影重合部分的顶点集合,计算集合的z平均值,\n // 比较大小可以得出这2个拼图真正的z先后次序,如果相等则特殊处理,和不重合逻辑一样,\n // 不重合的话,取最大最小值z的平均比较即可,平均值可避免起点终点相同无法比较\n let eventHash = {};\n for(let i = 0, len = list.length; i < len; i++) {\n let puzzle = list[i], points = puzzle.points;\n for(let i = 0, len = points.length; i < len; i++) {\n let p = points[i];\n p.puzzle = puzzle;\n let o = eventHash[p.z] = eventHash[p.z] || [];\n o.push(p);\n }\n let xBbox = puzzle.xBbox;\n puzzle.cz = (xBbox[0] + xBbox[2]) * 0.5;\n }\n let eventList = [];\n for(let i in eventHash) {\n if(eventHash.hasOwnProperty(i)) {\n let o = eventHash[i];\n eventList.push({\n z: i,\n list: o,\n });\n }\n }\n eventList.sort(function(a, b) {\n return a.z - b.z;\n });\n // 每个点作为事件,触发时所属拼图count--,首次拼图视为start,当count为0时拼图视为end\n // 这样2个(或多个)拼图同时都在start状态下(count > 0)的点就是重合区域点集合\n let ael = [], hash = {};\n for(let i = 0, len = eventList.length; i < len; i++) {\n let list = eventList[i].list;\n // 先一遍循环,把刚进入的点所属平面初始化放入ael,这样同时初始化的就不会有遗漏\n for(let i = 0, len = list.length; i < len; i++) {\n let puzzle = list[i].puzzle;\n // 首次进入初始化数据\n if(!puzzle.isStart) {\n puzzle.isStart = true;\n puzzle.count = puzzle.points.length;\n ael.push(puzzle);\n }\n }\n let willEnd = [];\n // 再一遍循环,检查同区域点集合\n for(let i = 0, len = list.length; i < len; i++) {\n let p = list[i], puzzle = p.puzzle;\n // 遍历已存在的puzzle,和当前puzzle视为同区域集合,存数据\n for(let i = 0, len = ael.length; i < len; i++) {\n let item = ael[i];\n if(puzzle.uuid === item.uuid || puzzle.plane === item.plane) {\n continue;\n }\n let key = puzzle.uuid > item.uuid ? (item.uuid + ',' + puzzle.uuid) : (puzzle.uuid + ',' + item.uuid);\n let o = hash[key] = hash[key] || [];\n o.push(p);\n }\n // 归零时离开,延迟处理,依然是防止同时离开的点puzzle不会有遗漏\n if(!--puzzle.count) {\n willEnd.push(puzzle);\n }\n }\n for(let j = 0, len = willEnd.length; j < len; j++) {\n let i = ael.indexOf(willEnd[j]);\n ael.splice(i, 1);\n }\n }\n let zHash = {};\n for(let i in hash) {\n if(hash.hasOwnProperty(i)) {\n let list = hash[i], count1 = 0, count2 = 0, uuid = list[0].puzzle.uuid;\n for(let i = 0, len = list.length; i < len; i++) {\n let p = list[i], puzzle = p.puzzle;\n if(uuid === puzzle.uuid) {\n count1 += p.z;\n }\n else {\n count2 += p.z;\n }\n }\n zHash[i] = {\n uuid,\n count1,\n count2,\n };\n }\n }\n list.sort(function(a, b) {\n let key = a.uuid > b.uuid ? (b.uuid + ',' + a.uuid) : (a.uuid + ',' + b.uuid);\n // 有重合的区域,除非相等,否则可以直接得出结果\n if(zHash.hasOwnProperty(key)) {\n let item = zHash[key];\n if(a.uuid === item.uuid) {\n if(item.count1 !== item.count2) {\n return item.count1 - item.count2;\n }\n }\n else {\n if(item.count1 !== item.count2) {\n return item.count2 - item.count1;\n }\n }\n }\n // 无重合或者相等的,对比z中点\n return a.cz - b.cz;\n });\n return list;\n}\n\nexport default {\n splitQuadrilateralPlane,\n sortPuzzleZ,\n};\n","import Page from '../refresh/Page';\nimport webgl from './webgl';\n\nclass TexturePage extends Page {\n constructor(renderMode, gl, size, number) {\n super(renderMode, gl, size, number);\n this.gl = gl;\n this.texture = webgl.createTexture(gl, null, 0, size, size); // 默认0单元\n gl.bindTexture(gl.TEXTURE_2D, null);\n }\n\n static getInstance(renderMode, gl, rootId, size, excludePage) {\n return super.getInstance(renderMode, gl, rootId, size, this, excludePage);\n }\n}\n\nexport default TexturePage;\n","import Cache from '../refresh/Cache';\nimport TexturePage from './TexturePage';\n\n/**\n * 一个fbo离屏纹理,mock成cache,当webgl需要局部根节点汇总时生成,即cacheTotal,\n * 基于此纹理进行filter、mask等后处理渲染\n */\nclass TextureCache extends Cache {\n constructor(renderMode, gl, rootId, w, h, bbox, page, pos, x1, y1) {\n super(renderMode, gl, rootId, w, h, bbox, page, pos, x1, y1);\n this.gl = gl;\n }\n\n update() {\n // 直接生成的texture不需要更新,覆盖掉不调用\n }\n\n clear() {\n if(super.clear()) {\n let page = this.__page, gl = page.gl, size = page.__size;\n // 尺寸必须对上才行\n let data = new Uint8Array(this.__width * this.__height * 4);\n gl.bindTexture(gl.TEXTURE_2D, page.texture);\n // 注意y镜像和原点左下\n gl.texSubImage2D(gl.TEXTURE_2D, 0, this.__x, size - this.__y - this.__height,\n this.__width, this.__height, gl.RGBA, gl.UNSIGNED_BYTE, data);\n gl.bindTexture(gl.TEXTURE_2D, null);\n }\n }\n\n reset(bbox, x1, y1) {\n return super.reset(bbox, x1, y1, TexturePage);\n }\n\n static getInstance(renderMode, gl, rootId, bbox, x1, y1, excludePage) {\n return super.getInstance(renderMode, gl, rootId, bbox, x1, y1, this, TexturePage, excludePage);\n }\n}\n\nexport default TextureCache;\n","import CanvasCache from './CanvasCache';\nimport inject from '../util/inject';\n\nconst HASH = {};\n\n/**\n * 相同的图片且尺寸相同时,复用一个source,如果尺寸和原图相等直接用,否则生成一个离屏canvas\n */\nclass ImgCanvasCache extends CanvasCache {\n constructor(renderMode, ctx, rootId, w, h, bbox, page, x1, y1) {\n super(renderMode, ctx, rootId, w, h, bbox, page, null, x1, y1);\n }\n\n __init(w, h, bbox, page, pos, x1, y1) {\n this.__width = w;\n this.__height = h;\n this.__bbox = bbox;\n this.__page = page;\n // 相等就不生成新的离屏canvas,直接用原始资源比如节点内容\n if(page.width === w && page.height === h) {\n this.__canvas = page.source;\n }\n // 不等则一个url只生成一份OffscreenCanvas\n else {\n let key = this.key = w + ' ' + h + ' ' + page.src;\n if(HASH.hasOwnProperty(key)) {\n let o = HASH[key];\n o.count++;\n this.__canvas = o.canvas;\n }\n else {\n let offscreenCanvas = inject.getOffscreenCanvas(w, h, null, null);\n let ctx = offscreenCanvas.ctx;\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(page.source, 0, 0, w, h);\n this.__canvas = offscreenCanvas.canvas;\n HASH[key] = {\n canvas: offscreenCanvas.canvas,\n count: 1,\n };\n }\n }\n this.__x = 0;\n this.__y = 0;\n this.__enabled = true;\n this.__available = true;\n this.__appendData(x1, y1);\n }\n\n clear() {\n if(this.__available) {\n this.__available = false;\n return true;\n }\n }\n\n release() {\n if(this.__enabled) {\n this.clear();\n let key = this.key;\n if(HASH.hasOwnProperty(key)) {\n let o = HASH[key];\n o.count--;\n if(!o.count) {\n delete HASH[key];\n }\n }\n this.__enabled = false;\n this.__page = null;\n return true;\n }\n }\n\n reset(bbox, x1, y1) {\n this.release();\n let w = Math.ceil(bbox[2] - bbox[0]);\n let h = Math.ceil(bbox[3] - bbox[1]);\n let n = Math.max(w, h);\n if(n <= 0) {\n return;\n }\n this.__init(w, h, bbox, this.__page, null, x1, y1);\n }\n\n get canvas() {\n return this.__canvas;\n }\n\n get ctx() {\n return this.__ctx;\n }\n\n get size() {}\n\n static getInstance(renderMode, ctx, rootId, bbox, loadImg, x1, y1) {\n let w = Math.ceil(bbox[2] - bbox[0]);\n let h = Math.ceil(bbox[3] - bbox[1]);\n let n = Math.max(w, h);\n if(n <= 0) {\n return;\n }\n return new ImgCanvasCache(renderMode, ctx, rootId, w, h, bbox, loadImg, x1, y1);\n }\n}\n\nexport default ImgCanvasCache;\n","import Cache from '../refresh/Cache';\nimport CanvasCache from '../refresh/CanvasCache';\nimport CanvasPage from '../refresh/CanvasPage';\n\nconst HASH = {};\n\nclass ImgWebglCache extends CanvasCache {\n constructor(renderMode, ctx, rootId, w, h, bbox, page, pos, x1, y1) {\n super(renderMode, ctx, rootId, w, h, bbox, page, pos, x1, y1);\n }\n\n clear() {\n if(this.__available) {\n this.__available = false;\n this.update();\n return true;\n }\n }\n\n release() {\n if(this.__enabled) {\n this.clear();\n let key = this.key;\n if(HASH.hasOwnProperty(key)) {\n let o = HASH[key];\n o.count--;\n if(!o.count) {\n delete HASH[key];\n this.__page.del(this.__pos);\n }\n }\n this.__page = null;\n this.__enabled = false;\n return true;\n }\n }\n\n static getInstance(renderMode, ctx, rootId, bbox, loadImg, x1, y1) {\n let key = rootId + ',' + loadImg.width + ' ' + loadImg.height + ' ' + loadImg.src;\n if(HASH.hasOwnProperty(key)) {\n let o = HASH[key];\n o.count++;\n let w = bbox[2] - bbox[0], h = bbox[3] - bbox[1];\n let cache = o.cache;\n let res = new ImgWebglCache(renderMode, ctx, rootId, w, h, bbox, cache.page, cache.pos, x1, y1);\n res.key = key;\n return res;\n }\n let cache = Cache.getInstance(renderMode, ctx, rootId, bbox, x1, y1, this, CanvasPage, null);\n // 超限为空\n if(cache) {\n cache.key = key;\n if(cache) {\n HASH[key] = {\n cache,\n count: 1,\n };\n return cache;\n }\n }\n }\n}\n\nexport default ImgWebglCache;\n","import CanvasCache from './CanvasCache';\nimport offscreen from './offscreen';\nimport mode from './mode';\nimport Page from './Page';\nimport Text from '../node/Text';\nimport Dom from '../node/Dom';\nimport Img from '../node/Img';\nimport Geom from '../node/geom/Geom';\nimport mx from '../math/matrix';\nimport geom from '../math/geom';\nimport level from './level';\nimport painter from '../util/painter';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport tf from '../style/transform';\nimport mbm from '../style/mbm';\nimport enums from '../util/enums';\nimport webgl from '../gl/webgl';\nimport oit from '../gl/oit';\nimport TextureCache from '../gl/TextureCache';\nimport blur from '../math/blur';\nimport vertexBlur from '../gl/filter/blur.vert';\nimport fragmentBlur from '../gl/filter/blur.frag';\nimport ImgCanvasCache from './ImgCanvasCache';\nimport ImgWebglCache from '../gl/ImgWebglCache';\n\nconst {\n OFFSCREEN_OVERFLOW,\n OFFSCREEN_FILTER,\n OFFSCREEN_MASK,\n OFFSCREEN_BLEND,\n OFFSCREEN_MASK2,\n applyOffscreen,\n} = offscreen;\n\nconst {\n STYLE_KEY: {\n DISPLAY,\n OPACITY,\n VISIBILITY,\n FILTER,\n OVERFLOW,\n MIX_BLEND_MODE,\n FILL,\n TRANSFORM,\n TRANSFORM_ORIGIN,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n TRANSFORM_STYLE,\n BACKFACE_VISIBILITY,\n },\n} = enums;\nconst {\n NONE,\n TRANSFORM_ALL,\n OPACITY: OP,\n FILTER: FT,\n REPAINT,\n MIX_BLEND_MODE: MBM,\n PERSPECTIVE: PPT,\n CACHE,\n MASK,\n} = level;\nconst { isE, inverse, multiply, calRectPoint } = mx;\nconst { mbmName } = mbm;\nconst { assignMatrix, transformBbox } = util;\nconst { isPerspectiveMatrix } = tf;\nconst {\n drawTextureCache,\n createTexture,\n bindTexture,\n drawCache2Tex,\n drawTex2Cache,\n} = webgl;\n\nconst DOM_RENDER = Dom.prototype.render;\nconst IMG_RENDER = Img.prototype.render;\nconst GEOM_RENDER = Geom.prototype.render;\n\nfunction getCache(list) {\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(item && item.available) {\n return item;\n }\n }\n}\n\n/**\n * 生成一个节点及其子节点所包含的矩形范围盒,canvas和webgl的最大尺寸限制不一样,由外部传入\n * 如果某个子节点超限,则视为整个超限,超限返回空\n * isPpt为webgl下有perspective的节点,需考虑透视\n */\nfunction genBboxTotal(node, __structs, index, total, lv, isPpt) {\n let { __cache } = node;\n assignMatrix(node.__matrixEvent, mx.identity());\n node.__opacity = 1;\n // 先将局部根节点的bbox算好,可能没内容是空\n let bboxTotal;\n if(__cache && __cache.available) {\n bboxTotal = __cache.bbox;\n }\n else {\n bboxTotal = node.bbox;\n }\n bboxTotal = bboxTotal.slice(0);\n // 局部根节点如有perspective,则计算pm,这里不会出现嵌套,因为每个出现都会生成局部根节点\n // 分2种情况,普通父ppt和自身有ppt情况,自身不能视为E,被绘入主画布时注意特殊处理\n let pm;\n if(isPpt) {\n pm = node.__perspectiveMatrix;\n if(!pm) {\n pm = node.__matrix;\n }\n }\n let top = node;\n for(let i = index + 1, len = index + total + 1; i < len; i++) {\n let {\n node,\n total,\n hasMask,\n } = __structs[i];\n if(node instanceof Text) {\n if(node.__limitCache) {\n inject.warn('Bbox of Text(' + index + ')' + ' is oversize'\n + node.offsetWidth + ', ' + node.offsetHeight);\n return;\n }\n let bbox = node.bbox, p = node.__domParent, matrix = p.__matrixEvent;\n if((bbox[2] - bbox[0]) && (bbox[3] - bbox[1])) {\n if(!isE(matrix)) {\n bbox = transformBbox(bbox, matrix, 0, 0);\n }\n mergeBbox(bboxTotal, bbox);\n }\n continue;\n }\n if(node.__limitCache) {\n inject.warn('Bbox of ' + node.tagName + '(' + index + ')' + ' is oversize'\n + node.offsetWidth + ', ' + node.offsetHeight);\n return;\n }\n let {\n __computedStyle: __computedStyle2,\n __mask,\n } = node;\n // 跳过display:none元素和它的所有子节点和mask,本身是mask除外\n if(__computedStyle2[DISPLAY] === 'none' || i !== index && __mask) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n __cache: __cache2,\n __cacheTotal: __cacheTotal2,\n __cacheFilter: __cacheFilter2,\n __cacheMask: __cacheMask2,\n } = node;\n let p = node.__domParent;\n node.__opacity = __computedStyle2[OPACITY] * p.__opacity;\n let m = node.__matrix;\n if(p !== top) {\n m = multiply(p.__matrixEvent, m);\n }\n // 只有webgl且ppt情况才有pm,直接子节点才考虑预乘\n if(pm && p === top) {\n m = multiply(pm, m);\n }\n assignMatrix(node.__matrixEvent, m);\n let bbox;\n // 子元素有cacheTotal优先使用\n let target = getCache([__cacheMask2, __cacheFilter2, __cacheTotal2, __cache2]);\n if(target) {\n if(target !== __cache2) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n bbox = target.bbox;\n }\n else {\n bbox = node.bbox; // 不能用filterBbox,子元素继承根节点的,如果有filter会是cacheFilter的bbox\n }\n if((bbox[2] - bbox[0]) && (bbox[3] - bbox[1])) {\n // 老的不变,新的会各自重新生成,根据matrixEvent合并bboxTotal\n bbox = transformBbox(bbox, m, 0, 0);\n mergeBbox(bboxTotal, bbox);\n }\n }\n if((bboxTotal[2] - bboxTotal[0] <= 0) || (bboxTotal[3] - bboxTotal[1] <= 0)) {\n return;\n }\n return bboxTotal;\n}\n\nfunction mergeBbox(bbox, t) {\n bbox[0] = Math.min(bbox[0], t[0]);\n bbox[1] = Math.min(bbox[1], t[1]);\n bbox[2] = Math.max(bbox[2], t[2]);\n bbox[3] = Math.max(bbox[3], t[3]);\n}\n\n/**\n * 生成局部根节点离屏缓存,超限时除外\n * cache是每个节点自身的缓存,且共享离屏canvas\n * cacheTotal是基础\n * cacheFilter基于total\n * cacheMask基于filter\n * cacheBlend基于mask\n */\nfunction genTotal(renderMode, ctx, root, node, index, lv, total, __structs, width, height) {\n let __cacheTotal = node.__cacheTotal;\n if(__cacheTotal && __cacheTotal.available) {\n return __cacheTotal;\n }\n let { __x1: x1, __y1: y1, __offsetWidth, __offsetHeight } = node;\n let bboxTotal = genBboxTotal(node, __structs, index, total, lv, false);\n if(!bboxTotal) {\n return;\n }\n\n // img节点特殊对待,如果只包含图片内容本身,多个相同引用可复用图片\n if(node instanceof Img && node.__loadImg.onlyImg) {\n __cacheTotal = node.__cacheTotal = ImgCanvasCache.getInstance(renderMode, ctx, root.__uuid, bboxTotal, node.__loadImg, x1, y1);\n return __cacheTotal;\n }\n\n // 生成cacheTotal,获取偏移dx/dy,连带考虑overflow:hidden的情况,当hidden尺寸一致无效时可忽略\n // 否则用一个单独临时的离屏获取包含hidden的结果,再绘入total\n let w, h, dx, dy, dbx, dby, tx, ty;\n let overflow = node.__computedStyle[OVERFLOW], isOverflow;\n if((x1 !== bboxTotal[0]\n || y1 !== bboxTotal[1]\n || __offsetWidth !== (bboxTotal[2] - bboxTotal[0])\n || __offsetHeight !== (bboxTotal[3] - bboxTotal[1])) && overflow === 'hidden') {\n // geom可能超限,不能直接用bbox\n bboxTotal = [x1, y1, x1 + __offsetWidth, y1 + __offsetHeight];\n w = __offsetWidth;\n h = __offsetHeight;\n dx = -x1;\n dy = -y1;\n dbx = 0;\n dby = 0;\n tx = 0;\n ty = 0;\n isOverflow = true;\n __cacheTotal = inject.getOffscreenCanvas(w, h, 'overflow', null);\n }\n else {\n w = bboxTotal[2] - bboxTotal[0];\n h = bboxTotal[3] - bboxTotal[1];\n __cacheTotal = node.__cacheTotal = CanvasCache.getInstance(renderMode, ctx, root.__uuid, bboxTotal, x1, y1, null);\n if(!__cacheTotal || !__cacheTotal.__enabled) {\n if(w || h) {\n inject.warn('CanvasCache of ' + node.tagName + '(' + index + ')' + ' is oversize: '\n + w + ', ' + h);\n }\n return;\n }\n __cacheTotal.__available = true;\n dx = __cacheTotal.dx;\n dy = __cacheTotal.dy;\n dbx = __cacheTotal.dbx;\n dby = __cacheTotal.dby;\n tx = __cacheTotal.x;\n ty = __cacheTotal.y;\n }\n let ctxTotal = __cacheTotal.ctx;\n\n /**\n * 再次遍历每个节点,以局部根节点左上角为基准原点,将所有节点绘制上去\n * 每个子节点的opacity有父继承计算在上面循环已经做好了,直接获取\n * 但matrixEvent可能需要重算,因为原点不一定是根节点的原点,影响tfo\n * 另外每个节点的refreshLevel需要设置REPAINT\n * 这样cacheTotal取消时子节点需确保重新计算一次matrix/opacity/filter,保证下次和父元素继承正确\n */\n let matrixList = [];\n let parentMatrix = null;\n let lastMatrix = null;\n let lastLv = lv;\n // 和外面没cache的类似,mask生成hash记录\n let maskStartHash = [];\n let offscreenHash = [];\n for(let i = index, len = index + (total || 0) + 1; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n // 排除Text\n if(node instanceof Text) {\n node.render(renderMode, ctxTotal, dx, dy);\n let oh = offscreenHash[i];\n if(oh) {\n ctxTotal = applyOffscreen(ctxTotal, oh, width, height, false);\n }\n }\n else {\n let __computedStyle2 = node.__computedStyle;\n // none跳过这棵子树,判断下最后一个节点的离屏应用即可\n if(__computedStyle2[DISPLAY] === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n let oh = offscreenHash[i];\n if(oh) {\n ctxTotal = applyOffscreen(ctxTotal, oh, width, height, true);\n }\n continue;\n }\n let {\n __cacheTotal: __cacheTotal2,\n __cacheFilter: __cacheFilter2,\n __cacheMask: __cacheMask2,\n } = node;\n let {\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n [VISIBILITY]: visibility,\n } = __computedStyle2;\n let mh = maskStartHash[i];\n if(mh) {\n let { idx, hasMask, offscreenMask } = mh;\n let target = inject.getOffscreenCanvas(width, height, null, 'mask2');\n offscreenMask.mask = target; // 应用mask用到\n offscreenMask.isClip = node.__clip;\n // 定位到最后一个mask元素上的末尾\n let j = i + (total || 0) + 1;\n while(--hasMask) {\n let { total } = __structs[j];\n j += (total || 0) + 1;\n }\n j--;\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx, lv, type: OFFSCREEN_MASK, offscreen: offscreenMask });\n list.push({ idx: j, lv, type: OFFSCREEN_MASK2, offscreen: {\n ctx: ctxTotal, // 保存等待OFFSCREEN_MASK2时还原\n target,\n }});\n ctxTotal = target.ctx;\n }\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,根节点是第一个特殊处理\n if(i === index) {}\n else if(lv > lastLv) {\n parentMatrix = lastMatrix;\n if(isE(parentMatrix)) {\n parentMatrix = null;\n }\n matrixList.push(parentMatrix);\n }\n // 变小出栈索引需注意,可能不止一层,多层计算diff层级\n else if(lv < lastLv) {\n let diff = lastLv - lv;\n matrixList.splice(-diff);\n parentMatrix = matrixList[lv - 1];\n }\n // 不变是同级兄弟,无需特殊处理 else {}\n lastLv = lv;\n // 特殊渲染的matrix,局部根节点为原点考虑,当需要计算时(不为E)再计算\n let m;\n if(i !== index && (!isE(parentMatrix) || !isE(transform))) {\n m = tf.calMatrixByOrigin(transform, tfo[0] + dbx + node.__x1 - x1 + tx, tfo[1] + dby + node.__y1 - y1 + ty);\n if(!isE(parentMatrix)) {\n m = multiply(parentMatrix, m);\n }\n }\n lastMatrix = m;\n // 子元素有cacheTotal优先使用\n let target = i > index && getCache([__cacheMask2, __cacheFilter2, __cacheTotal2]);\n if(target) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n ctxTotal.globalAlpha = node.__opacity;\n if(m) {\n ctxTotal.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n }\n else {\n ctxTotal.setTransform(1, 0, 0, 1, 0, 0);\n }\n let mixBlendMode = __computedStyle2[MIX_BLEND_MODE];\n if(mixBlendMode !== 'normal') {\n ctxTotal.globalCompositeOperation = mbmName(mixBlendMode);\n }\n CanvasCache.drawCache(target, __cacheTotal);\n ctxTotal.globalCompositeOperation = 'source-over';\n let oh = offscreenHash[i];\n if(oh) {\n ctxTotal = applyOffscreen(ctxTotal, oh, width, height, false);\n }\n }\n else {\n let offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow;\n let offscreen = i > index && node.__calOffscreen(ctxTotal, __computedStyle2);\n if(offscreen) {\n ctxTotal = offscreen.ctx;\n offscreenBlend = offscreen.offscreenBlend;\n offscreenMask = offscreen.offscreenMask;\n offscreenFilter = offscreen.offscreenFilter;\n offscreenOverflow = offscreen.offscreenOverflow;\n }\n if(visibility === 'visible') {\n ctxTotal.globalAlpha = node.__opacity;\n if(m) {\n ctxTotal.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n }\n else {\n ctxTotal.setTransform(1, 0, 0, 1, 0, 0);\n }\n node.render(renderMode, ctxTotal, dx, dy);\n }\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_BLEND, offscreen: offscreenBlend });\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n // 最后一个遮罩索引因数量不好计算,放在maskStartHash做\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = {\n idx: i,\n hasMask,\n offscreenMask,\n };\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_FILTER, offscreen: offscreenFilter });\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_OVERFLOW, offscreen: offscreenOverflow });\n }\n // 离屏应用,按照lv从大到小即子节点在前先应用,同一个节点多个效果按offscreen优先级从小到大来,\n // 由于mask特殊索引影响,所有离屏都在最后一个mask索引判断,此时mask本身优先结算,以index序大到小判断\n let oh = offscreenHash[i];\n if(oh) {\n ctxTotal = applyOffscreen(ctxTotal, oh, width, height, false);\n }\n }\n }\n }\n\n // overflow写回整体离屏\n if(isOverflow) {\n let t = node.__cacheTotal = CanvasCache.getInstance(renderMode, ctx, root.__uuid, bboxTotal, x1, y1, null);\n t.__available = true;\n t.ctx.drawImage(__cacheTotal.canvas, t.x, t.y);\n __cacheTotal.release();\n __cacheTotal = t;\n }\n return __cacheTotal;\n}\n\n// 从cacheTotal生成overflow、filter和mask,一定有cacheTotal才会进\nfunction genTotalOther(renderMode, __structs, __cacheTotal, node, hasMask, width, height) {\n let {\n __computedStyle,\n __cacheFilter,\n __cacheMask,\n } = node;\n let {\n [FILTER]: filter,\n } = __computedStyle;\n let target = __cacheTotal, needGen;\n if(filter && filter.length) {\n if(!__cacheFilter|| !__cacheFilter.available || needGen) {\n target = node.__cacheFilter = CanvasCache.genFilter(target, filter);\n needGen = true;\n }\n }\n if(hasMask && (!__cacheMask || !__cacheMask.available || needGen)) {\n target = node.__cacheMask = CanvasCache.genMask(target, node, function(item, cacheMask, inverse) {\n // 和外面没cache的类似,mask生成hash记录,这里mask节点一定是个普通无cache的独立节点\n let maskStartHash = {};\n let offscreenHash = {};\n let { dx, dy, dbx, dby, x: tx, y: ty, ctx, x1, y1 } = cacheMask;\n let struct = item.__struct, root = item.__root, structs = root.__structs;\n let index = structs.indexOf(struct);\n let {\n total,\n lv,\n } = struct;\n let matrixList = [];\n let parentMatrix = null;\n let lastMatrix = null;\n let opacityList = [];\n let parentOpacity = 1;\n let lastOpacity = 1;\n let lastLv = lv;\n for(let i = index, len = index + (total || 0) + 1; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n // 排除Text\n if(node instanceof Text) {\n node.render(renderMode, ctx, dx, dy);\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height, false);\n }\n }\n else {\n let __computedStyle = node.__computedStyle;\n // none跳过这棵子树,判断下最后一个节点的离屏应用即可\n if(__computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height, true);\n }\n continue;\n }\n let {\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n } = node;\n if(maskStartHash.hasOwnProperty(i)) {\n let { idx, hasMask, offscreenMask } = maskStartHash[i];\n let target = inject.getOffscreenCanvas(width, height, null, 'mask2');\n offscreenMask.mask = target; // 应用mask用到\n offscreenMask.isClip = node.__clip;\n // 定位到最后一个mask元素上的末尾\n let j = i + (total || 0) + 1;\n while(--hasMask) {\n let { total } = __structs[j];\n j += (total || 0) + 1;\n }\n j--;\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx, lv, type: OFFSCREEN_MASK, offscreen: offscreenMask });\n list.push({ idx: j, lv, type: OFFSCREEN_MASK2, offscreen: {\n ctx, // 保存等待OFFSCREEN_MASK2时还原\n target,\n }});\n ctx = target.ctx;\n }\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,根节点是第一个特殊处理\n if(i === index) {}\n else if(lv > lastLv) {\n parentMatrix = lastMatrix;\n if(isE(parentMatrix)) {\n parentMatrix = null;\n }\n matrixList.push(parentMatrix);\n parentOpacity = lastOpacity;\n opacityList.push(parentOpacity);\n }\n // 变小出栈索引需注意,可能不止一层,多层计算diff层级\n else if(lv < lastLv) {\n let diff = lastLv - lv;\n matrixList.splice(-diff);\n parentMatrix = matrixList[lv - 1];\n opacityList.splice(-diff);\n parentOpacity = opacityList[lv - 1];\n }\n // 不变是同级兄弟,无需特殊处理 else {}\n lastLv = lv;\n // 计算临时的matrix,先以此节点为局部根节点原点,后面考虑逆矩阵\n let {\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n [OPACITY]: opacity, // 和genTotal不同,局部根节点opacity生效不为1\n } = __computedStyle;\n if(i !== index) {\n opacity *= parentOpacity;\n }\n node.__opacity = lastOpacity = opacity;\n // 特殊渲染的matrix,局部根节点为原点且考虑根节点自身的transform\n let m;\n if(!isE(transform)) {\n m = tf.calMatrixByOrigin(transform, tfo[0] + dbx + node.__x1 - x1 + tx, tfo[1] + dby + node.__y1 - y1 + ty);\n if(!isE(parentMatrix)) {\n m = multiply(parentMatrix, m);\n }\n }\n lastMatrix = m;\n if(m) {\n // 很多情况mask和target相同matrix,可简化计算\n if(util.equalArr(m, inverse)) {\n m = mx.identity();\n }\n else if(inverse) {\n inverse = mx.inverse(inverse);\n m = mx.multiply(inverse, m);\n }\n }\n else if(!isE(inverse)) {\n m = mx.inverse(inverse);\n }\n m = m || mx.identity();\n assignMatrix(node.__matrixEvent, m);\n // 特殊渲染的matrix,局部根节点为原点考虑,本节点需inverse反向\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal]);\n if(target) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n ctx.globalAlpha = opacity;\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n let mixBlendMode = __computedStyle[MIX_BLEND_MODE];\n if(mixBlendMode !== 'normal') {\n ctx.globalCompositeOperation = mbmName(mixBlendMode);\n }\n else {\n ctx.globalCompositeOperation = 'source-over';\n }\n let { x, y, canvas, width, height, x1: x2, y1: y2, dbx: dbx2, dby: dby2 } = target;\n let ox = tx + x2 - x1 + dbx - dbx2;\n let oy = ty + y2 - y1 + dby - dby2;\n ctx.drawImage(canvas, x, y, width, height, ox, oy, width, height);\n ctx.globalCompositeOperation = 'source-over';\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height, false);\n }\n }\n // 等于将外面bbox计算和渲染合一的过程,但不需要bbox本身的内容\n else {\n let offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow;\n let offscreen = node.__calOffscreen(ctx, __computedStyle);\n if(offscreen) {\n ctx = offscreen.ctx;\n offscreenBlend = offscreen.offscreenBlend;\n offscreenMask = offscreen.offscreenMask;\n offscreenFilter = offscreen.offscreenFilter;\n offscreenOverflow = offscreen.offscreenOverflow;\n }\n ctx.globalAlpha = opacity;\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n node.render(renderMode, ctx, dx, dy);\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_BLEND, offscreen: offscreenBlend });\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n // 最后一个遮罩索引因数量不好计算,放在maskStartHash做\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = {\n idx: i,\n hasMask,\n offscreenMask,\n };\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_FILTER, offscreen: offscreenFilter });\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_OVERFLOW, offscreen: offscreenOverflow });\n }\n // 离屏应用,按照lv从大到小即子节点在前先应用,同一个节点多个效果按offscreen优先级从小到大来,\n // 由于mask特殊索引影响,所有离屏都在最后一个mask索引判断,此时mask本身优先结算,以index序大到小判断\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n }\n }\n }\n });\n }\n return target;\n}\n\n/**\n * canvas/webgl支持任意节点为mask,不像svg仅单节点\n * hasMask的num是指遮罩对象后面的兄弟节点数,需要换算成包含子节点的总数\n * @param __structs\n * @param start\n * @param hasMask\n */\nfunction countMaskNum(__structs, start, hasMask) {\n let count = 0;\n while(hasMask--) {\n let total = __structs[start].total;\n count += total || 0;\n start += total || 0;\n // total不算自身,所以还得+1\n count++;\n start++;\n }\n return count;\n}\n\n// webgl不太一样,使用fbo离屏绘制到一个纹理上进行汇总\nfunction genFrameBufferWithTexture(gl, texture, width, height) {\n let frameBuffer = gl.createFramebuffer();\n gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n let check = gl.checkFramebufferStatus(gl.FRAMEBUFFER);\n if(check !== gl.FRAMEBUFFER_COMPLETE) {\n inject.error('Framebuffer object is incomplete: ' + check.toString());\n }\n // 离屏窗口0开始\n gl.viewport(0, 0, width, height);\n // gl.clearColor(0, 0, 0, 0);\n // gl.clear(gl.COLOR_BUFFER_BIT);\n return frameBuffer;\n}\n\n/**\n * 局部根节点复合图层生成,汇总所有子节点到一颗局部树上的位图缓存,包含超限特殊情况\n * 即便只有自己一个也要返回,因为webgl生成total的原因是有类似filter/mask等必须离屏处理的东西\n * 传入isPpt的时候,说明是有perspective的节点在前置分割处理完毕之后,进行的渲染,需预乘pm透视矩阵\n * 传入pptNode/oitHash的时候,说明是透视节点下某个preserve3d的子节点,其渲染需要考虑其子节点平面拆分,预处理\n */\nfunction genTotalWebgl(renderMode, __cacheTotal, gl, root, node, index, lv, total,\n __structs, W, H, isPpt, pptNode, oitHash) {\n if(__cacheTotal && __cacheTotal.available) {\n return __cacheTotal;\n }\n let top = node;\n\n let { __x1: x1, __y1: y1, __cache, __offsetWidth, __offsetHeight } = node;\n let bboxTotal = genBboxTotal(node, __structs, index, total, lv, isPpt);\n if(!bboxTotal) {\n return;\n }\n\n // overflow:hidden和canvas一样特殊考虑\n let w, h, dx, dy, cx, cy, texture, frameBuffer;\n let overflow = node.__computedStyle[OVERFLOW];\n if(overflow === 'hidden' && (x1 !== bboxTotal[0]\n || y1 !== bboxTotal[1]\n || __offsetWidth !== (bboxTotal[2] - bboxTotal[0])\n || __offsetHeight !== (bboxTotal[3] - bboxTotal[1]))) {\n // geom可能超限,不能直接用bbox\n bboxTotal = [x1, y1, x1 + __offsetWidth, y1 + __offsetHeight];\n w = __offsetWidth;\n h = __offsetHeight;\n }\n else {\n w = bboxTotal[2] - bboxTotal[0];\n h = bboxTotal[3] - bboxTotal[1];\n }\n if(__cacheTotal) {\n __cacheTotal.reset(bboxTotal, x1, y1);\n }\n else {\n __cacheTotal = TextureCache.getInstance(renderMode, gl, root.__uuid, bboxTotal, x1, y1, null);\n }\n if(!__cacheTotal || !__cacheTotal.__enabled) {\n if(w || h) {\n inject.warn('TextureCache of ' + node.tagName + '(' + index + ')' + ' is oversize: '\n + w + ', ' + h);\n }\n return;\n }\n __cacheTotal.__available = true;\n node.__cacheTotal = __cacheTotal;\n cx = w * 0.5;\n cy = h * 0.5;\n dx = -bboxTotal[0];\n dy = -bboxTotal[1];\n\n // 需要重新计算,因为bbox里是原本位置,这里是新的位置\n let pm, ppt;\n if(isPpt) {\n if(top.__perspectiveMatrix) {\n let {\n [PERSPECTIVE]: perspective,\n [PERSPECTIVE_ORIGIN]: perspectiveOrigin,\n } = top.__computedStyle;\n pm = tf.calPerspectiveMatrix(perspective, x1 + dx + perspectiveOrigin[0], y1 + dy + perspectiveOrigin[1]);\n }\n else {\n }\n }\n if(oitHash) {\n if(pptNode.__perspectiveMatrix) {\n let {\n [PERSPECTIVE]: perspective,\n } = pptNode.__computedStyle;\n ppt = perspective;\n }\n else {\n ppt = -1 / pptNode.__matrix[11];\n }\n }\n\n let page = __cacheTotal.__page, size = page.__size;\n // 先绘制到一张单独的纹理,防止children中和cacheTotal重复texture不能绘制\n texture = createTexture(gl, null, 0, w, h);\n frameBuffer = genFrameBufferWithTexture(gl, texture, w, h);\n gl.viewport(0, 0, w, h);\n\n // fbo绘制对象纹理不用绑定单元,剩下的纹理绘制用0号\n let lastPage, list = [];\n // 先绘制自己的cache,起点所以matrix视作E为空,opacity固定1,注意被拆分时不绘制\n if(!oitHash || !oitHash[index]) {\n if(__cache && __cache.available) {\n drawTextureCache(gl, [{cache: __cache, opacity: 1}], cx, cy, dx, dy);\n }\n let render = node.render;\n if(render !== DOM_RENDER && render !== IMG_RENDER && render !== GEOM_RENDER) {\n node.render(renderMode, gl, dx, dy);\n }\n }\n\n let cacheTotal = __cacheTotal;\n for(let i = index, len = index + (total || 0) + 1; i < len; i++) {\n let {\n node,\n total,\n hasMask,\n } = __structs[i];\n // 先看text,visibility会在内部判断,display会被parent判断\n if(node instanceof Text) {\n let __cache = node.__cache;\n if(__cache && __cache.available) {\n let {\n __opacity,\n __matrixEvent,\n } = node.__domParent;\n let p = __cache.__page;\n if(lastPage && lastPage !== p) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n }\n lastPage = p;\n list.push({ cache: __cache, opacity: __opacity, matrix: __matrixEvent });\n }\n }\n // 再看total缓存/cache,都没有的是无内容的Xom节点\n else {\n let __computedStyle = node.__computedStyle;\n if(i > index) {\n if(__computedStyle[DISPLAY] === 'none' || node.__mask) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n }\n let {\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n [MIX_BLEND_MODE]: mixBlendMode,\n } = __computedStyle;\n if(visibility === 'hidden' && !total) {\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let p = node.__domParent;\n // 特殊渲染的matrix,局部根节点为原点考虑,和bbox以节点自身主画布参考系不同\n let m;\n if(i > index) {\n if(!isE(transform)) {\n m = tf.calMatrixByOrigin(transform, tfo[0] + node.__x1 + dx, tfo[1] + node.__y1 + dy);\n }\n if(p !== top) {\n m = multiply(p.__matrixEvent, m);\n }\n // 有透视还得预乘透视\n else if(pm) {\n m = multiply(pm, m);\n }\n assignMatrix(node.__matrixEvent, m);\n }\n // 有oit平面拆分的优先考虑,其一定没有mbm;否则走普通渲染逻辑\n let oit = oitHash && oitHash[i];\n if(oit) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n lastPage = null;\n // 只求子节点的matrix即可\n for(let j = i + 1, len = i + (total || 0) + 1; j < len; j++) {\n let {\n node,\n total,\n hasMask,\n } = __structs[j];\n if(!(node instanceof Text)) {\n let __computedStyle = node.__computedStyle;\n if(__computedStyle[DISPLAY] === 'none' || node.__mask) {\n j += (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n continue;\n }\n let {\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n } = __computedStyle;\n if(visibility === 'hidden' && !total) {\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n continue;\n }\n let p = node.__domParent;\n let m;\n if(!isE(transform)) {\n m = tf.calMatrixByOrigin(transform, tfo[0] + node.__x1 + dx, tfo[1] + node.__y1 + dy);\n }\n if(p !== top) {\n m = multiply(p.__matrixEvent, m);\n }\n // 有透视还得预乘透视\n else if(pm) {\n m = multiply(pm, m);\n }\n assignMatrix(node.__matrixEvent, m);\n let {\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n } = node;\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal]);\n if(target) {\n j += (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n }\n }\n }\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n webgl.drawOitPlane(gl, __structs, oit, ppt, cx, cy, dx, dy);\n let render = node.render;\n if(render !== DOM_RENDER && render !== IMG_RENDER && render !== GEOM_RENDER) {\n node.render(renderMode, gl, dx, dy);\n }\n }\n else {\n let {\n __cache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n } = node;\n let target = i > index ? getCache([__cacheMask, __cacheFilter, __cacheTotal, __cache]) : __cache;\n if(target) {\n // 局部的mbm和主画布一样,先刷新当前fbo,然后把后面这个mbm节点绘入一个新的等画布尺寸的fbo中,再进行2者mbm合成\n if(i > index && mixBlendMode !== 'normal') {\n if(list.length) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n }\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n let res = genMbmWebgl(gl, texture, target, mixBlendMode, node.__opacity, m, dx, dy, cx, cy, size, size);\n if(res) {\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n gl.deleteTexture(texture);\n texture = res.texture;\n frameBuffer = res.frameBuffer;\n gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n }\n lastPage = null;\n }\n else {\n let p = target.__page;\n if(lastPage && lastPage !== p) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n }\n lastPage = p;\n list.push({cache: target, opacity: node.__opacity, matrix: m});\n }\n if(target !== __cache) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n }\n // webgl特殊的外部钩子,比如粒子组件自定义渲染时调用\n if(!target || target === __cache) {\n let render = node.render;\n if(render !== DOM_RENDER && render !== IMG_RENDER && render !== GEOM_RENDER) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n node.render(renderMode, gl, dx, dy);\n }\n }\n }\n }\n }\n\n // 删除fbo恢复\n drawTextureCache(gl, list, cx, cy, dx, dy);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n // 汇入集合\n frameBuffer = genFrameBufferWithTexture(gl, page.texture, size, size);\n drawTex2Cache(gl, gl.program, cacheTotal, texture, w, h);\n gl.deleteTexture(texture);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n gl.bindTexture(gl.TEXTURE_2D, null);\n gl.viewport(0, 0, W, H);\n return __cacheTotal;\n}\n\nfunction genPptWebgl(renderMode, __cacheTotal, gl, root, node, index, lv, total, __structs, W, H) {\n if(__cacheTotal && __cacheTotal.available) {\n return __cacheTotal;\n }\n\n let top = node;\n let mergeHash = [], mergeList = [];\n let isFlat = top.__computedStyle[TRANSFORM_STYLE] === 'flat', isTopFlat = isFlat;\n // 将产生transformStyle变化的节点记下来,直接子节点如果是flat也记下来,这样除了根节点下一直preserve3d的其它都被记录\n for(let i = index + 1, len = index + (total || 0) + 1; i < len; i++) {\n let {\n lv,\n node,\n total,\n hasMask,\n } = __structs[i];\n if(node instanceof Text) {\n let mh = mergeHash[i];\n if(mh) {\n isFlat = mh.isFlat;\n }\n }\n else {\n let __computedStyle = node.__computedStyle;\n if(__computedStyle[DISPLAY] === 'none' || node.__mask) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n let mh = mergeHash[i];\n if(mh) {\n isFlat = mh.isFlat;\n }\n continue;\n }\n let {\n [VISIBILITY]: visibility,\n [TRANSFORM_STYLE]: transformStyle,\n } = __computedStyle;\n if(visibility === 'hidden' && !total) {\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n let mh = mergeHash[i];\n if(mh) {\n isFlat = mh.isFlat;\n }\n continue;\n }\n let {\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n __domParent: p,\n } = node;\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal]);\n // flat变化的局部子节点,或者flat根的直接子节点,生成局部根,已生成过的不用再生成\n if(total && !target && (transformStyle !== p.__computedStyle[TRANSFORM_STYLE]\n || p === top && transformStyle === 'flat')) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n mergeHash[j] = {\n isFlat,\n };\n isFlat = transformStyle === 'flat';\n // 变化的则生成新的局部子节点汇总,记录flat情况\n mergeList.push({\n i,\n lv,\n total,\n node,\n isFlat,\n });\n }\n // 子cache可以跳过,因为flat肯定先前执行\n if(target) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n let mh = mergeHash[i];\n if(mh) {\n isFlat = mh.isFlat;\n }\n }\n }\n // 排序依旧是子节点先,但同层级不用倒序(没有mask影响)\n mergeList.sort(function(a, b) {\n if(a.lv === b.lv) {\n return a.i - b.i;\n }\n return b.lv - a.lv;\n });\n // 根节点特殊处理,如果是flat就是flat但直接子节点后续渲染仍需要透视,如果是3d就要切分\n if(!isTopFlat) {\n mergeList.push({\n i: index,\n lv,\n total,\n node,\n isFlat: isTopFlat,\n });\n }\n // 变为preserve3d的子节点需要对其子节点进行平面拆分,记录这个子节点索引和拆分信息\n let oitHash = [];\n for(let i = 0, len = mergeList.length; i < len; i++) {\n let { i: index, lv, total, node, isFlat } = mergeList[i];\n // flat汇集临时cacheTotal\n if(isFlat) {\n genTotalWebgl(renderMode, node.__cacheTotal, gl, root, node, index, lv, total || 0,\n __structs, W, H, null, top, oitHash);\n }\n // preserve3d需要以此节点为局部根E,所有子节点四边形面在3d空间下求交拆分,暂时不绘制,等上层flat调用绘制投影\n else {\n let top = node, x0 = node.__x1, y0 = node.__y1, planeList = [];\n if(node.__hasContent) {\n let {\n __cache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n } = node;\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal, __cache]);\n let o = {\n index,\n node,\n target,\n points: [\n { x: 0, y: 0, z: 0 },\n { x: node.__offsetWidth, y: 0, z: 0 },\n { x: node.__offsetWidth, y: node.__offsetHeight, z: 0 },\n { x: 0, y: node.__offsetHeight, z: 0 },\n ],\n };\n planeList.push(o);\n }\n for(let i = index + 1, len = index + (total || 0) + 1; i < len; i++) {\n let {\n node,\n total,\n hasMask,\n } = __structs[i];\n if(node instanceof Text) {\n let __cache = node.__cache;\n if(__cache && __cache.available) {\n let {\n __matrixEvent,\n } = node.__domParent;\n let { x1: x, y1: y, __width: width, __height: height } = __cache;\n let xa = x - x0, ya = y - y0;\n let xb = x + width - x0, yb = y + height - y0;\n let { x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4 } = calRectPoint(xa, ya, xb, yb, __matrixEvent);\n let o = {\n index: i,\n node,\n target: __cache,\n points: [\n { x: x1, y: y1, z: z1 },\n { x: x2, y: y2, z: z2 },\n { x: x3, y: y3, z: z3 },\n { x: x4, y: y4, z: z4 },\n ],\n };\n planeList.push(o);\n }\n }\n else {\n let __computedStyle = node.__computedStyle;\n if(__computedStyle[DISPLAY] === 'none' || node.__mask) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n } = __computedStyle;\n if(visibility === 'hidden' && !total) {\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n __cache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n __domParent: p,\n } = node;\n // 当前局部根为原点坐标系下的matrix,只求交用\n let m;\n if(!isE(transform)) {\n m = tf.calMatrixByOrigin(transform, tfo[0] + node.__x1 - x0, tfo[1] + node.__y1 - y0);\n }\n if(p !== top) {\n m = multiply(p.__matrixEvent, m);\n }\n assignMatrix(node.__matrixEvent, m);\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal, __cache]);\n if(target) {\n let { x1: x, y1: y, __width: width, __height: height } = target;\n // 坐标计算还是以局部根为原点\n let xa = x - x0, ya = y - y0;\n let xb = x + width - x0, yb = y + height - y0;\n let { x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4 } = calRectPoint(xa, ya, xb, yb, m);\n let o = {\n index: i,\n node,\n target,\n points: [\n { x: x1, y: y1, z: z1 },\n { x: x2, y: y2, z: z2 },\n { x: x3, y: y3, z: z3 },\n { x: x4, y: y4, z: z4 },\n ],\n };\n planeList.push(o);\n if(target !== __cache) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n }\n }\n }\n // 有2个以上面才会求相交\n if(planeList.length > 1) {\n oit.splitQuadrilateralPlane(planeList);\n }\n // 没拆分的直接存入,拆分的存有效拼图\n let list = [];\n for(let i = 0, len = planeList.length; i < len; i++) {\n let plane = planeList[i];\n let puzzle = plane.puzzle;\n if(puzzle) {\n for(let i = 0, len = puzzle.length; i < len; i++) {\n let p = puzzle[i];\n if(!p.isDeleted) {\n list.push(p);\n }\n }\n }\n else {\n list.push(plane);\n }\n }\n // 按z排序,远的先绘制\n oitHash[index] = oit.sortPuzzleZ(list);\n }\n }\n // 最后一次循环绘制到局部根节点上,类似genTotalWebgl()逻辑,但要考虑ppt透视\n return genTotalWebgl(renderMode, __cacheTotal, gl, root, node, index, lv, total,\n __structs, W, H, true, node, oitHash);\n}\n\nfunction genFilterWebgl(renderMode, gl, node, cache, filter, W, H) {\n let { x1, y1, width, height, bbox } = cache;\n let target = cache;\n filter.forEach(item => {\n let { k, v } = item;\n if(k === 'blur' && v > 0) {\n let res = genBlurWebgl(renderMode, gl, target, v);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'dropShadow') {\n let res = genDropShadowWebgl(renderMode, gl, target, v);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'hueRotate') {\n let rotation = geom.d2r(v % 360);\n let cosR = Math.cos(rotation);\n let sinR = Math.sin(rotation);\n let res = genColorMatrixWebgl(renderMode, gl, target, [\n 0.213 + cosR * 0.787 - sinR * 0.213, 0.715 - cosR * 0.715 - sinR * 0.715, 0.072 - cosR * 0.072 + sinR * 0.928, 0, 0,\n 0.213 - cosR * 0.213 + sinR * 0.143, 0.715 + cosR * 0.285 + sinR * 0.140, 0.072 - cosR * 0.072 - sinR * 0.283, 0, 0,\n 0.213 - cosR * 0.213 - sinR * 0.787, 0.715 - cosR * 0.715 + sinR * 0.715, 0.072 + cosR * 0.928 + sinR * 0.072, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, x1, y1, bbox);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'saturate' && v !== 100) {\n let amount = v * 0.01;\n let res = genColorMatrixWebgl(renderMode, gl, target, [\n 0.213 + 0.787 * amount, 0.715 - 0.715 * amount, 0.072 - 0.072 * amount, 0, 0,\n 0.213 - 0.213 * amount, 0.715 + 0.285 * amount, 0.072 - 0.072 * amount, 0, 0,\n 0.213 - 0.213 * amount, 0.715 - 0.715 * amount, 0.072 + 0.928 * amount, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, x1, y1, bbox);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'brightness' && v !== 100) {\n let b = v * 0.01;\n let res = genColorMatrixWebgl(renderMode, gl, target, [\n b, 0, 0, 0, 0,\n 0, b, 0, 0, 0,\n 0, 0, b, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, x1, y1, bbox);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'grayscale' && v > 0) {\n v = Math.min(v, 100);\n let oneMinusAmount = 1 - v * 0.01;\n if(oneMinusAmount < 0) {\n oneMinusAmount = 0;\n }\n else if(oneMinusAmount > 1) {\n oneMinusAmount = 1;\n }\n let res = genColorMatrixWebgl(renderMode, gl, target, [\n 0.2126 + 0.7874 * oneMinusAmount, 0.7152 - 0.7152 * oneMinusAmount, 0.0722 - 0.0722 * oneMinusAmount, 0, 0,\n 0.2126 - 0.2126 * oneMinusAmount, 0.7152 + 0.2848 * oneMinusAmount, 0.0722 - 0.0722 * oneMinusAmount, 0, 0,\n 0.2126 - 0.2126 * oneMinusAmount, 0.7152 - 0.7152 * oneMinusAmount, 0.0722 + 0.9278 * oneMinusAmount, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, x1, y1, bbox);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'contrast' && v !== 100) {\n let amount = v * 0.01;\n let o = -0.5 * amount + 0.5;\n let res = genColorMatrixWebgl(renderMode, gl, target, [\n amount, 0, 0, 0, o,\n 0, amount, 0, 0, o,\n 0, 0, amount, 0, o,\n 0, 0, 0, 1, 0,\n ], width, height, x1, y1, bbox);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'sepia' && v > 0) {\n v = Math.min(v, 100);\n let oneMinusAmount = 1 - v * 0.01;\n if(oneMinusAmount < 0) {\n oneMinusAmount = 0;\n }\n else if(oneMinusAmount > 1) {\n oneMinusAmount = 1;\n }\n let res = genColorMatrixWebgl(renderMode, gl, target, [\n 0.393 + 0.607 * oneMinusAmount, 0.769 - 0.769 * oneMinusAmount, 0.189 - 0.189 * oneMinusAmount, 0, 0,\n 0.349 - 0.349 * oneMinusAmount, 0.686 + 0.314 * oneMinusAmount, 0.168 - 0.168 * oneMinusAmount, 0, 0,\n 0.272 - 0.272 * oneMinusAmount, 0.534 - 0.534 * oneMinusAmount, 0.131 + 0.869 * oneMinusAmount, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, x1, y1, bbox);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'invert' && v > 0) {\n v = Math.min(v, 100);\n let o = v * 0.01;\n let amount = 1 - 2 * o;\n let res = genColorMatrixWebgl(renderMode, gl, target, [\n amount, 0, 0, 0, o,\n 0, amount, 0, 0, o,\n 0, 0, amount, 0, o,\n 0, 0, 0, 1, 0,\n ], width, height, x1, y1, bbox);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n });\n // 切换回主程序\n gl.useProgram(gl.program);\n gl.viewport(0, 0, W, H);\n return node.__cacheFilter = target;\n}\n\nfunction genBlurShader(gl, sigma, d) {\n let key = 'programBlur,' + sigma + ',' + d;\n if(gl.hasOwnProperty(key)) {\n return gl[key];\n }\n let weights = blur.gaussianWeight(sigma, d);\n let vert = '';\n let frag = '';\n let r = Math.floor(d * 0.5);\n for(let i = 0; i < r; i++) {\n let c = (r - i) * 0.01;\n vert += `v_texCoordsBlur[${i}] = a_texCoords + vec2(-${c}, -${c}) * u_direction;`;\n frag += `gl_FragColor += texture2D(u_texture, v_texCoordsBlur[${i}]) * ${weights[i]};`;\n }\n vert += `v_texCoordsBlur[${r}] = a_texCoords;`;\n frag += `gl_FragColor += texture2D(u_texture, v_texCoordsBlur[${r}]) * ${weights[r]};`;\n for(let i = 0; i < r; i++) {\n let c = (i + 1) * 0.01;\n vert += `v_texCoordsBlur[${i + r + 1}] = a_texCoords + vec2(${c}, ${c}) * u_direction;`;\n frag += `gl_FragColor += texture2D(u_texture, v_texCoordsBlur[${i + r + 1}]) * ${weights[i + r + 1]};`;\n }\n vert = vertexBlur.replace('[3]', '[' + d + ']').replace(/}$/, vert + '}');\n frag = fragmentBlur.replace('[3]', '[' + d + ']').replace(/}$/, frag + '}');\n return gl[key] = webgl.initShaders(gl, vert, frag);\n}\n\n/**\n * https://www.w3.org/TR/2018/WD-filter-effects-1-20181218/#feGaussianBlurElement\n * 根据cacheTotal生成cacheFilter,按照css规范的优化方法执行3次,避免卷积核d扩大3倍性能慢\n * 规范的优化方法对d的值分奇偶优化,这里再次简化,d一定是奇数,即卷积核大小\n * 先动态生成gl程序,默认3核源码示例已注释,根据sigma获得d(一定奇数),再计算权重\n * 然后将d尺寸和权重拼接成真正程序并编译成program,再开始绘制\n */\nfunction genBlurWebgl(renderMode, gl, cache, sigma) {\n let { x1, y1, bbox, width, height } = cache;\n let d = blur.kernelSize(sigma);\n let max = Math.max(15, gl.getParameter(gl.MAX_VARYING_VECTORS));\n while(d > max) {\n d -= 2;\n }\n let spread = blur.outerSizeByD(d);\n // 防止超限,webgl最大纹理尺寸限制\n if(width > Page.MAX + spread || height > Page.MAX + spread) {\n inject.warn('Filter blur is oversize');\n return;\n }\n let bboxNew = bbox.slice(0);\n bboxNew[0] -= spread;\n bboxNew[1] -= spread;\n bboxNew[2] += spread;\n bboxNew[3] += spread;\n // 写到一个tex中方便后续处理\n let w = width + spread * 2, h = height + spread * 2;\n let tex = createTexture(gl, null, 0, w, h);\n let frameBuffer = genFrameBufferWithTexture(gl, tex, w, h);\n drawCache2Tex(gl, gl.program, cache, w, h, spread);\n // 生成blur,同尺寸复用fbo\n let program = genBlurShader(gl, sigma, d);\n tex = webgl.drawBlur(gl, program, tex, w, h);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n // 写回一个cache中\n let target = TextureCache.getInstance(renderMode, gl, cache.__rootId, bboxNew, x1, y1, null);\n target.__available = true;\n let page = target.__page, size = page.__size, texture = page.texture;\n frameBuffer = genFrameBufferWithTexture(gl, texture, size, size);\n drawTex2Cache(gl, gl.program, target, tex, w, h);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n return target;\n}\n\nfunction genColorMatrixWebgl(renderMode, gl, cache, m) {\n let { x1, y1, bbox } = cache;\n let target = TextureCache.getInstance(renderMode, gl, cache.__rootId, bbox.slice(0), x1, y1, cache.__page);\n target.__available = true;\n let page = target.__page, size = page.__size;\n let frameBuffer = genFrameBufferWithTexture(gl, target.__page.texture, size, size);\n webgl.drawCm(gl, gl.programCm, target, cache, m, size * 0.5, size);\n // 切回\n gl.useProgram(gl.program);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n return target;\n}\n\nfunction genMaskWebgl(renderMode, gl, root, node, cache, W, H, i, lv, __structs) {\n let { x1, y1, width, height, bbox, dbx, dby } = cache;\n let bboxNew = bbox.slice(0);\n // 结果不能和源同page纹理,一定符合尺寸要求,不会比源大\n let __cacheMask = TextureCache.getInstance(renderMode, gl, root.__uuid, bboxNew, x1, y1, cache.__page);\n __cacheMask.__available = true;\n node.__cacheMask = __cacheMask;\n // 先求得被遮罩的matrix,用作inverse给mask计算,以被遮罩左上角为原点\n let {\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n } = node.__computedStyle;\n let inverse;\n if(isE(transform)) {\n inverse = mx.identity();\n }\n else {\n inverse = tf.calMatrixByOrigin(transform, tfo[0], tfo[1]);\n }\n inverse = mx.inverse(inverse);\n // 将所有mask绘入一个单独纹理中,尺寸和原点与被遮罩相同\n gl.viewport(0, 0, width, height);\n let texture = createTexture(gl, null, 0, width, height);\n let cx = width * 0.5, cy = height * 0.5;\n let frameBuffer = genFrameBufferWithTexture(gl, texture, width, height);\n let next = node.next;\n let isClip = next.__clip;\n let lastPage, list = [];\n let dx = -x1 + dbx, dy = -y1 + dby;\n while(next && next.__mask && next.__clip === isClip) {\n let total = __structs[i].total || 0;\n let matrixList = [];\n let parentMatrix;\n let lastMatrix;\n let opacityList = [];\n let parentOpacity = 1;\n let lastOpacity;\n let lastLv = lv;\n let index = i;\n for(let len = i + (total || 0) + 1; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n if(node instanceof Text) {\n let __cache = node.__cache;\n if(__cache && __cache.available) {\n let {\n __matrixEvent,\n __opacity,\n } = node.__domParent;\n let p = __cache.__page;\n if(lastPage && lastPage !== p) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n }\n lastPage = p;\n list.push({ cache: __cache, opacity: __opacity, matrix: __matrixEvent });\n }\n }\n else {\n let __limitCache = node.__limitCache;\n let computedStyle = node.__computedStyle;\n // 跳过display:none元素和它的所有子节点和mask\n if(computedStyle[DISPLAY] === 'none' || __limitCache) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n [OPACITY]: opacity,\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n } = computedStyle;\n if(visibility === 'hidden' && !total) {\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n __cache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n } = node;\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,根节点是第一个特殊处理\n if(i === index) {}\n else if(lv > lastLv) {\n parentMatrix = lastMatrix;\n if(isE(parentMatrix)) {\n parentMatrix = null;\n }\n matrixList.push(parentMatrix);\n parentOpacity = lastOpacity;\n opacityList.push(parentOpacity);\n }\n // 变小出栈索引需注意,可能不止一层,多层计算diff层级\n else if(lv < lastLv) {\n let diff = lastLv - lv;\n matrixList.splice(-diff);\n parentMatrix = matrixList[lv - 1];\n opacityList.splice(-diff);\n parentOpacity = opacityList[lv - 1];\n }\n // 不变是同级兄弟,无需特殊处理 else {}\n lastLv = lv;\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal, __cache]);\n if(target && (target !== __cache || visibility === 'visible')) {\n // 不考虑mbm\n let m;\n if(isE(transform)) {\n m = mx.identity();\n }\n else {\n m = tf.calMatrixByOrigin(transform, tfo[0] + target.x1 - x1, tfo[1] + target.y1 - y1);\n }\n if(!isE(parentMatrix)) {\n lastMatrix = multiply(parentMatrix, lastMatrix);\n }\n m = mx.multiply(inverse, m);\n lastMatrix = m;\n lastOpacity = parentOpacity * opacity;\n let p = target.__page;\n if(lastPage && lastPage !== p) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n }\n lastPage = p;\n list.push({ cache: target, opacity: lastOpacity, matrix: m });\n if(target !== __cache) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n }\n // webgl特殊的外部钩子,比如粒子组件自定义渲染时调用\n if(!target || target === __cache) {\n let render = node.render;\n if(render !== DOM_RENDER && render !== IMG_RENDER && render !== GEOM_RENDER) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n node.render(renderMode, gl, dx, dy);\n }\n }\n }\n }\n next = next.__next;\n }\n // 绘制到fbo的纹理对象上并删除fbo恢复\n drawTextureCache(gl, list, cx, cy, dx, dy);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n gl.bindTexture(gl.TEXTURE_2D, null);\n let program;\n if(isClip) {\n program = gl.programClip;\n }\n else {\n program = gl.programMask;\n }\n let page = __cacheMask.__page, size = page.size, tex = page.texture;\n frameBuffer = genFrameBufferWithTexture(gl, tex, size, size);\n webgl.drawMask(gl, program, __cacheMask, cache, texture, size * 0.5, size);\n // 切换回主程序\n gl.useProgram(gl.program);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n gl.viewport(0, 0, W, H);\n return __cacheMask;\n}\n\n/**\n * webgl的dropShadow只生成阴影部分,模糊复用blur,然后进行拼合\n * 复用blur时生成的模糊是临时的,和主程序模糊不一样,需区分\n */\nfunction genDropShadowWebgl(renderMode, gl, cache, v) {\n let { x1, y1, bbox, width, height } = cache;\n // 先根据x/y/color生成单色阴影\n let [x, y, sigma, , color] = v;\n let d = blur.kernelSize(sigma);\n let max = Math.max(15, gl.getParameter(gl.MAX_VARYING_VECTORS));\n while(d > max) {\n d -= 2;\n }\n let spread = blur.outerSizeByD(d);\n // 防止超限,webgl最大纹理尺寸限制\n if(width > Page.MAX + spread || height > Page.MAX + spread) {\n inject.warn('Filter dropShadow is oversize');\n return;\n }\n let w = width + spread * 2, h = height + spread * 2;\n let tex1 = createTexture(gl, null, 0, w, h);\n let frameBuffer = genFrameBufferWithTexture(gl, tex1, w, h);\n gl.useProgram(gl.programDs);\n webgl.drawDropShadow(gl, gl.programDs, frameBuffer, cache, color, width, w, height, h);\n // 生成模糊的阴影\n if(sigma) {\n let program = genBlurShader(gl, sigma, d);\n tex1 = webgl.drawBlur(gl, program, tex1, w, h);\n }\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n // cache绘制到一个单独的tex上\n let tex2 = createTexture(gl, null, 0, width, height);\n frameBuffer = genFrameBufferWithTexture(gl, tex2, width, height);\n drawCache2Tex(gl, gl.program, cache, width, height, 0);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n // 原图tex2和模糊阴影tex1合成\n let bboxNew = bbox.slice(0);\n bboxNew[0] += x;\n bboxNew[1] += y;\n bboxNew[2] += x;\n bboxNew[3] += y;\n bboxNew[0] -= spread;\n bboxNew[1] -= spread;\n bboxNew[2] += spread;\n bboxNew[3] += spread;\n let bboxMerge = bbox.slice(0);\n mergeBbox(bboxMerge, bboxNew);\n let target = TextureCache.getInstance(renderMode, gl, cache.__rootId, bboxMerge, x1, y1, null);\n target.__available = true;\n let page = target.__page, size = page.__size;\n frameBuffer = genFrameBufferWithTexture(gl, page.texture, size, size);\n let dx1 = bboxNew[0] - bboxMerge[0], dy1 = bboxNew[1] - bboxMerge[1];\n let dx2 = bbox[0] - bboxMerge[0], dy2 = bbox[1] - bboxMerge[1];\n webgl.drawDropShadowMerge(gl, target, size, tex1, dx1, dy1, w, h, tex2, dx2, dy2, width, height);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n bindTexture(gl, null, 0);\n gl.deleteTexture(tex1);\n gl.deleteTexture(tex2);\n return target;\n}\n\n/**\n * 生成blendMode混合fbo纹理结果,原本是所有元素向画布或一个fbo记A进行绘制,当出现mbm时,进入到这里,\n * 先生成一个新的fbo记B,之前的绘制都先到B上,再把后续元素绘制到一个同尺寸的fbo纹理上,\n * 两者进行mbm混合,返回到A上\n */\nfunction genMbmWebgl(gl, texture, cache, mbm, opacity, matrix, dx, dy, cx, cy, width, height) {\n // 后续绘制到同尺寸纹理上\n let tex = createTexture(gl, null, 0, width, height);\n let frameBuffer = genFrameBufferWithTexture(gl, tex, width, height);\n drawTextureCache(gl, [{ cache, opacity, matrix }], cx, cy, dx, dy);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n // 获取对应的mbm程序\n let program;\n mbm = mbmName(mbm);\n if(mbm === 'multiply') {\n program = gl.programMbmMp;\n }\n else if(mbm === 'screen') {\n program = gl.programMbmSr;\n }\n else if(mbm === 'overlay') {\n program = gl.programMbmOl;\n }\n else if(mbm === 'darken') {\n program = gl.programMbmDk;\n }\n else if(mbm === 'lighten') {\n program = gl.programMbmLt;\n }\n else if(mbm === 'color-dodge') {\n program = gl.programMbmCd;\n }\n else if(mbm === 'color-burn') {\n program = gl.programMbmCb;\n }\n else if(mbm === 'hard-light') {\n program = gl.programMbmHl;\n }\n else if(mbm === 'soft-light') {\n program = gl.programMbmSl;\n }\n else if(mbm === 'difference') {\n program = gl.programMbmDf;\n }\n else if(mbm === 'exclusion') {\n program = gl.programMbmEx;\n }\n else if(mbm === 'hue') {\n program = gl.programMbmHue;\n }\n else if(mbm === 'saturation') {\n program = gl.programMbmSt;\n }\n else if(mbm === 'color') {\n program = gl.programMbmCl;\n }\n else if(mbm === 'luminosity') {\n program = gl.programMbmLm;\n }\n gl.useProgram(program);\n // 生成新的fbo,将混合结果绘入\n let resTex = createTexture(gl, null, 0, width, height);\n let resFrameBuffer = genFrameBufferWithTexture(gl, resTex, width, height);\n webgl.drawMbm(gl, program, texture, tex);\n gl.useProgram(gl.program);\n return {\n texture: resTex,\n frameBuffer: resFrameBuffer,\n };\n}\n\nfunction renderSvg(renderMode, ctx, root, isFirst, rlv) {\n let { __structs, width, height } = root;\n // mask节点很特殊,本身有matrix会影响,本身没改变但对象节点有改变也需要计算逆矩阵应用顶点\n let maskEffectHash = [];\n if(!isFirst) {\n // 先遍历一遍收集完全不变的defs,缓存起来id,随后再执行遍历渲染生成新的,避免掉重复的id\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n node,\n total,\n hasMask,\n } = __structs[i];\n let __cacheDefs = node.__cacheDefs;\n let __refreshLevel = node.__refreshLevel;\n // 只要涉及到matrix和opacity就影响mask\n let hasEffectMask = hasMask && (__refreshLevel >= REPAINT || (__refreshLevel & (TRANSFORM_ALL | OP)));\n if(hasEffectMask) {\n let start = i + (total || 0) + 1;\n let end = start + hasMask;\n // mask索引遍历时处理,暂存遮罩对象的刷新lv\n maskEffectHash[end - 1] = __refreshLevel;\n }\n // >=REPAINT重绘生成走render()跳过这里\n if(__refreshLevel < REPAINT) {\n // 特殊的mask判断,遮罩对象影响这个mask了,除去filter、遮罩对象无TRANSFORM变化外都可缓存\n let mh = maskEffectHash[i];\n if(mh) {\n if(!(__refreshLevel & TRANSFORM_ALL) && mh < REPAINT && !(mh & TRANSFORM_ALL)) {\n __cacheDefs.forEach(item => {\n ctx.addCache(item);\n });\n }\n }\n // 去除特殊的filter,普通节点或不影响的mask在 {\n ctx.addCache(item);\n });\n }\n }\n }\n }\n let maskHash = [];\n // 栈代替递归,存父节点的matrix/opacity,matrix为E时存null省略计算\n let matrixList = [];\n let parentMatrix;\n let vdList = [];\n let parentVd;\n let lastLv = 0;\n let lastRefreshLv = 0;\n let lastNode;\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n let computedStyle, __refreshLevel, __cacheDefs, __cacheTotal;\n if(node instanceof Text) {\n computedStyle = node.computedStyle;\n __refreshLevel = lastRefreshLv;\n }\n else {\n computedStyle = node.__computedStyle;\n __cacheDefs = node.__cacheDefs;\n __refreshLevel = node.__refreshLevel;\n __cacheTotal = node.__cacheTotal;\n }\n lastRefreshLv = __refreshLevel;\n node.__refreshLevel = NONE;\n let display = computedStyle[DISPLAY];\n // 将随后的若干个mask节点范围存下来\n if(hasMask && display !== 'none') {\n let start = i + (total || 0) + 1;\n let end = start + hasMask;\n // svg限制了只能Geom单节点,不可能是Dom,所以end只有唯一\n maskHash[end - 1] = {\n index: i,\n start,\n end,\n isClip: __structs[start].node.__clip, // 第一个节点是clip为准\n };\n }\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,Root节点第一个特殊处理\n if(lv < lastLv) {\n let diff = lastLv - lv;\n matrixList.splice(-diff);\n parentMatrix = matrixList[lv - 1];\n vdList.splice(-diff);\n parentVd = vdList[lv - 1];\n }\n else if(lv > lastLv) {\n matrixList.push(parentMatrix = lastNode.__matrix);\n let vd = lastNode.__virtualDom;\n vdList.push(vd);\n parentVd = vd;\n }\n lastNode = node;\n lastLv = lv;\n let virtualDom;\n // svg小刷新等级时直接修改vd,这样Geom不再感知\n if(__refreshLevel < REPAINT && !(node instanceof Text)) {\n virtualDom = node.__virtualDom;\n // total可以跳过所有孩子节点省略循环\n if(__cacheTotal && __cacheTotal.available) {\n i += (total || 0);\n virtualDom.cache = true;\n }\n else {\n __cacheTotal && (__cacheTotal.available = true);\n virtualDom = node.__virtualDom = util.extend({}, virtualDom);\n // dom要清除children缓存,geom和img无需\n if(node instanceof Dom && !(node instanceof Img)) {\n virtualDom.children = [];\n }\n // 还得判断,和img加载混在一起时,触发刷新如果display:none,则还有cacheTotal\n if(display === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += hasMask;\n }\n }\n else {\n delete virtualDom.cache;\n }\n }\n if(__refreshLevel & TRANSFORM_ALL) {\n let matrix = node.__matrix;\n if(!matrix || isE(matrix)) {\n delete virtualDom.transform;\n }\n else {\n virtualDom.transform = 'matrix(' + util.joinArr(mx.m2m6(matrix), ',') + ')';\n }\n if(parentMatrix && matrix) {\n matrix = multiply(parentMatrix, matrix);\n }\n assignMatrix(node.__matrixEvent, matrix);\n }\n if(__refreshLevel & OP) {\n let opacity = computedStyle[OPACITY];\n if(opacity === 1) {\n delete virtualDom.opacity;\n }\n else {\n virtualDom.opacity = opacity;\n }\n }\n if(__refreshLevel & FT) {\n let filter = computedStyle[FILTER];\n let s = painter.svgFilter(filter);\n if(s) {\n virtualDom.filter = s;\n }\n else {\n delete virtualDom.filter;\n }\n }\n if(__refreshLevel & MBM) {\n let mixBlendMode = computedStyle[MIX_BLEND_MODE];\n if(mixBlendMode !== 'normal') {\n virtualDom.mixBlendMode = mbmName(mixBlendMode);\n }\n else {\n delete virtualDom.mixBlendMode;\n }\n }\n virtualDom.lv = __refreshLevel;\n }\n else {\n // >=REPAINT会调用render,重新生成defsCache,text没有这个东西\n if(!(node instanceof Text)) {\n node.__cacheDefs.splice(0);\n let matrix = node.__matrix;\n if(parentMatrix) {\n matrix = multiply(parentMatrix, matrix);\n }\n assignMatrix(node.__matrixEvent, matrix);\n }\n node.render(renderMode, ctx, 0, 0);\n virtualDom = node.__virtualDom;\n // svg mock,每次都生成,每个节点都是局部根,更新时自底向上清除\n if(!(node instanceof Text)) {\n node.__cacheTotal = node.__cacheTotal || {\n available: true,\n release() {\n this.available = false;\n delete virtualDom.cache;\n },\n __offsetY() {},\n };\n node.__cacheTotal.available = true;\n }\n // 渲染后更新取值\n display = computedStyle[DISPLAY];\n if(display === 'none') {\n i += total || 0;\n i += hasMask || 0;\n }\n }\n /**\n * mask会在join时过滤掉,这里将假设正常渲染的vd的内容获取出来组成defs的mask内容\n * 另外最初遍历时记录了会影响的mask,在=REPAINT始终重新设置\n * 本身有matrix也需要重设\n */\n let mh = maskHash[i];\n if(mh && (maskEffectHash[i]\n || __refreshLevel >= REPAINT\n || (__refreshLevel & (TRANSFORM_ALL | OP)))) {\n let { index, start, end, isClip } = mh;\n let target = __structs[index];\n let dom = target.node;\n let mChildren = [];\n // clip模式时,先添加兜底整个白色使得全部都可见,mask本身变反色(黑色)\n if(isClip) {\n mChildren.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', `M0,0L${width},0L${width},${height}L0,${height}L0,0`],\n ['fill', 'rgba(255,255,255,1)'],\n ['stroke-width', 0],\n ],\n });\n }\n for(let j = start; j < end; j++) {\n let node = __structs[j].node;\n let { computedStyle: { [DISPLAY]: display, [VISIBILITY]: visibility, [FILL]: fill },\n virtualDom: { children, opacity } } = node;\n if(display !== 'none' && visibility !== 'hidden') {\n // 引用相同无法diff,需要clone\n children = util.clone(children);\n mChildren = mChildren.concat(children);\n for(let k = 0, len = children.length; k < len; k++) {\n let { tagName, props } = children[k];\n if(tagName === 'path') {\n if(isClip) {\n for(let j = 0, len = props.length; j < len; j++) {\n let item = props[j];\n if(item[0] === 'fill') {\n item[1] = util.int2invert(fill[0]);\n }\n }\n }\n let matrix = node.matrix;\n let ivs = inverse(dom.matrix);\n matrix = multiply(ivs, matrix);\n // path没有transform属性,在vd上,需要弥补\n props.push(['transform', `matrix(${util.joinArr(mx.m2m6(matrix), ',')})`]);\n // path没有opacity属性,在vd上,需要弥补\n if(!util.isNil(opacity) && opacity !== 1) {\n props.push(['opacity', opacity]);\n }\n }\n // img可能有matrix属性,需判断\n else if(tagName === 'image') {\n let hasTransform = -1;\n for(let m = 0, len = props.length; m < len; m++) {\n if(props[m][0] === 'transform') {\n hasTransform = m;\n break;\n }\n }\n if(hasTransform === -1) {\n let ivs = inverse(dom.matrix);\n if(!isE(ivs)) {\n props.push(['transform', `matrix(${util.joinArr(mx.m2m6(ivs), ',')})`]);\n }\n }\n else {\n let matrix = props[hasTransform][1].match(/[\\d.]+/g).map(i => parseFloat(i));\n let ivs = inverse(dom.matrix);\n matrix = multiply(ivs, matrix);\n props[hasTransform][1] = `matrix(${util.joinArr(mx.m2m6(matrix), ',')})`;\n }\n }\n }\n }\n }\n // 清掉上次的\n for(let i = __cacheDefs.length - 1; i >= 0; i--) {\n let item = __cacheDefs[i];\n if(item.tagName === 'mask') {\n __cacheDefs.splice(i, 1);\n ctx.removeCache(item);\n }\n }\n let o = {\n tagName: 'mask',\n props: [],\n children: mChildren,\n };\n let id = ctx.add(o);\n __cacheDefs.push(o);\n id = 'url(#' + id + ')';\n dom.virtualDom.mask = id;\n }\n // mask不入children\n if(parentVd && !node.__mask) {\n parentVd.children.push(virtualDom);\n }\n if(i === 0) {\n parentMatrix = node.__matrix;\n parentVd = virtualDom;\n }\n }\n}\n\nfunction renderWebgl(renderMode, gl, root, isFirst, rlv) {\n if(isFirst) {\n Page.init(gl.getParameter(gl.MAX_TEXTURE_SIZE));\n }\n let { __structs, width, height } = root;\n let cx = width * 0.5, cy = height * 0.5;\n // 栈代替递归,存父节点的matrix/opacity,matrix为E时存null省略计算\n let lastRefreshLevel = NONE;\n let mergeList = [];\n let hasMbm; // 是否有混合模式出现\n /**\n * 先一遍先序遍历每个节点绘制到自己__cache上,排除Text和已有的缓存以及局部根缓存,\n * 根据refreshLevel进行等级区分,可能是=REPAINT,REFLOW布局已前置处理完。\n * 首次绘制没有catchTotal等,后续则可能会有,在= REPAINT || (rlv & (CACHE | FT | PPT | MASK))) {\n // 记录transformStyle,出现ppt时有用,同时ts为flat后同一ppt上下文影响继承显示\n let flatList = [], flatExtendList = [];\n let parentFlat = false, parentExtendFlat = false;\n let lastFlat = false, lastExtendFlat = false;\n let pptNodeList = [];\n let parentPptNode = null;\n let lastPptNode = null;\n let lastLv = 0;\n // 节点开始有ppt得记录,后续孩子中如果有flat的,得强制生成cacheTotal\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n node.__index = i; // 生成total需要\n // Text特殊处理,webgl中先渲染为bitmap,再作为贴图绘制,缓存交由text内部判断,直接调用渲染纹理方法\n if(node instanceof Text) {\n if(lastRefreshLevel >= REPAINT) {\n let bbox = node.bbox, x = node.__x, y = node.__y;\n let __cache = node.__cache;\n if(__cache) {\n __cache.reset(bbox, x, y);\n }\n else {\n __cache = CanvasCache.getInstance(mode.CANVAS, gl, root.__uuid, bbox, x, y, null);\n }\n if(__cache && __cache.enabled) {\n __cache.__bbox = bbox;\n __cache.__available = true;\n node.__cache = __cache;\n node.render(mode.CANVAS, __cache.ctx, __cache.dx, __cache.dy);\n }\n else {\n __cache && __cache.release();\n node.__limitCache = true;\n }\n }\n continue;\n }\n let __computedStyle = node.__computedStyle;\n // 跳过display:none元素和它的所有子节点\n if(__computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let perspective = __computedStyle[PERSPECTIVE];\n let isFlat = __computedStyle[TRANSFORM_STYLE] === 'flat';\n // 特殊,新的ppt上下文节点启用新值,否则还是老的\n let isExtendFlat = parentExtendFlat || isFlat;\n let pptNode = perspective ? node : null;\n // root第一个特殊处理\n if(lv === 0) {\n parentFlat = parentExtendFlat = isFlat;\n if(perspective) {\n parentPptNode = node;\n }\n }\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树\n else if(lv > lastLv) {\n parentFlat = lastFlat;\n flatList.push(isFlat);\n parentExtendFlat = lastExtendFlat;\n flatExtendList.push(isFlat);\n parentPptNode = lastPptNode || parentPptNode;\n pptNodeList.push(pptNode || parentPptNode);\n }\n // 变小出栈索引需注意,可能不止一层,多层计算diff层级\n else if(lv < lastLv) {\n let diff = lastLv - lv;\n flatList.splice(-diff);\n parentFlat = flatList[lv - 1];\n flatExtendList.splice(-diff);\n parentExtendFlat = flatExtendList[lv - 1];\n pptNodeList.splice(-diff);\n parentPptNode = pptNodeList[lv - 1];\n }\n // 不变是同级兄弟,无需特殊处理 else {}\n lastLv = lv;\n // 根据refreshLevel优化计算\n let {\n __refreshLevel,\n __currentStyle,\n __cacheTotal,\n } = node;\n node.__refreshLevel = NONE;\n /**\n * lv=REPAINT那里,小变化不动\n * 当有遮罩时,如果被遮罩节点本身无变更,需要检查其next的遮罩节点有无变更,\n * 但其实不用检查,因为next变更一定会清空cacheMask,只要检查cacheMask即可\n * 如果没有或无效,直接添加,无视节点本身变化,后面防重即可\n */\n if(!__refreshLevel) {\n }\n else if(__refreshLevel < REPAINT) {\n let mixBlendMode = __computedStyle[MIX_BLEND_MODE];\n let isMbm = (__refreshLevel & MBM) && mixBlendMode !== 'normal';\n let need = node.__cacheAsBitmap || hasMask;\n if(!need && (__refreshLevel & FT)) {\n let filter = __computedStyle[FILTER];\n if(filter && filter.length) {\n need = true;\n }\n }\n if(!need && (__refreshLevel & PPT)) {\n let __domParent = node.__domParent;\n let isPpt = !isE(__domParent && __domParent.__perspectiveMatrix) || isPerspectiveMatrix(node.__matrix);\n if(isPpt) {\n need = true;\n }\n }\n if(isMbm) {\n hasMbm = true;\n }\n // 这里和canvas不一样,前置cacheAsBitmap条件变成或条件之一,新的ppt层级且画中画需要新的fbo\n if(need) {\n mergeList.push({\n i,\n lv,\n total,\n node,\n hasMask,\n });\n }\n // total可以跳过所有孩子节点省略循环,filter/mask等的强制前提是有total\n if(__cacheTotal && __cacheTotal.available) {\n i += (total || 0);\n if(__refreshLevel === NONE && hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n }\n /**\n * >=REPAINT重新渲染,并根据结果判断是否离屏限制错误\n * Geom没有子节点无需汇总局部根,Dom中Img也是,它们的局部根等于自身的cache,其它符合条件的Dom需要生成\n */\n else {\n let hasContent = node.calContent(__currentStyle, __computedStyle), onlyImg;\n // 有内容先以canvas模式绘制到离屏画布上,自定义渲染设置无内容不实现即可跳过\n if(hasContent) {\n let bbox = node.bbox, __cache = node.__cache, x1 = node.__x1, y1 = node.__y1;\n // 单图特殊对待缓存\n if(node instanceof Img) {\n let loadImg = node.__loadImg;\n if(loadImg.onlyImg && !loadImg.error && loadImg.source) {\n onlyImg = true;\n __cache = node.__cache = ImgWebglCache.getInstance(mode.CANVAS, gl, root.__uuid, bbox, loadImg, x1, y1);\n }\n }\n if(!onlyImg) {\n if(__cache) {\n __cache.reset(bbox, x1, y1);\n }\n else {\n __cache = CanvasCache.getInstance(mode.CANVAS, gl, root.__uuid, bbox, x1, y1, null);\n }\n }\n if(__cache && __cache.enabled) {\n __cache.__bbox = bbox;\n __cache.__available = true;\n node.__cache = __cache;\n node.render(mode.CANVAS, __cache.ctx, __cache.dx, __cache.dy);\n }\n else {\n __cache && __cache.release();\n node.__limitCache = true;\n return;\n }\n }\n else {\n node.__limitCache = false;\n }\n let {\n [OVERFLOW]: overflow,\n [FILTER]: filter,\n [MIX_BLEND_MODE]: mixBlendMode,\n [PERSPECTIVE]: perspective,\n } = __computedStyle;\n let isMbm = mixBlendMode !== 'normal';\n let isPpt = total && (perspective || isPerspectiveMatrix(node.__matrix));\n let isOverflow = overflow === 'hidden' && total;\n let isFilter = filter && filter.length;\n if(isMbm) {\n hasMbm = true;\n }\n if(node.__cacheAsBitmap\n || hasMask\n || isFilter\n || isOverflow\n || isPpt) {\n mergeList.push({\n i,\n lv,\n total,\n node,\n hasMask,\n isPpt,\n });\n }\n }\n lastRefreshLevel = __refreshLevel;\n lastFlat = isFlat;\n lastExtendFlat = isExtendFlat;\n lastPptNode = pptNode;\n }\n }\n // 根据收集的需要合并局部根的索引,尝试合并,按照层级从大到小,索引从大到小的顺序,\n // 这样保证子节点在前,后节点在前,后节点是为了mask先应用自身如filter之后再进行遮罩\n if(mergeList.length) {\n mergeList.sort(function(a, b) {\n if(a.lv === b.lv) {\n return b.i - a.i;\n }\n return b.lv - a.lv;\n });\n // ppt只有嵌套才需要生成,最下面的孩子节点的ppt无需,因此记录一个hash存index,\n // 同时因为是后序遍历,孩子先存所有父亲的index即可保证父亲才能生成cacheTotal\n let pptHash = {};\n for(let ii = 0, len = mergeList.length; ii < len; ii++) {\n let {\n i,\n lv,\n total,\n node,\n hasMask,\n isPpt,\n } = mergeList[ii];\n let {\n __matrix,\n __domParent,\n __computedStyle,\n } = node;\n let {\n [OVERFLOW]: overflow,\n [FILTER]: filter,\n } = __computedStyle;\n let isPerspective = !isE(__domParent && __domParent.__perspectiveMatrix) || isPerspectiveMatrix(__matrix);\n // 有ppt的,向上查找所有父亲index记录,可能出现重复记得提前跳出\n if(isPerspective) {\n let parent = node.__domParent;\n while(parent) {\n let idx = parent.__index;\n if(pptHash[idx]) {\n break;\n }\n if(isPerspectiveMatrix(parent.__matrix)) {\n pptHash[idx] = true;\n }\n parent = parent.__domParent;\n if(parent && parent.__perspectiveMatrix) {\n pptHash[idx] = true;\n }\n }\n // 最内层的ppt忽略,注意transformStyle变化的强制生成\n if(!pptHash[i]) {\n if(!hasMask && !filter.length && !(overflow === 'hidden' && total) && !node.__cacheAsBitmap) {\n // return;\n }\n }\n }\n let {\n __limitCache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n } = node;\n if(__limitCache) {\n return;\n }\n let needGen;\n // 可能没变化,比如被遮罩节点、filter变更等\n if(!__cacheTotal || !__cacheTotal.available) {\n let res;\n if(isPpt) {\n res = genPptWebgl(renderMode, __cacheTotal, gl, root, node, i, lv, total || 0,\n __structs, width, height);\n }\n else {\n res = genTotalWebgl(renderMode, __cacheTotal, gl, root, node, i, lv, total || 0,\n __structs, width, height, null, null, null);\n }\n if(!res) {\n return;\n }\n __cacheTotal = res;\n needGen = true;\n }\n // 即使超限,也有total结果\n let target = __cacheTotal;\n if(filter.length) {\n if(!__cacheFilter || !__cacheFilter.available || needGen) {\n let res = genFilterWebgl(renderMode, gl, node, target, filter, width, height);\n if(res) {\n target = res;\n needGen = true;\n }\n }\n }\n if(hasMask && (!__cacheMask || !__cacheMask.available || needGen)) {\n genMaskWebgl(renderMode, gl, root, node, target, width, height, i + (total || 0) + 1, lv, __structs);\n }\n }\n }\n /**\n * 最后先序遍历一次应用__cacheTotal即可,没有的用__cache,以及剩下的超尺寸的和Text\n * 由于mixBlendMode的存在,需先申请个fbo纹理,所有绘制默认向该纹理绘制,最后fbo纹理再进入主画布\n * 前面循环时有记录是否出现mbm,只有出现才申请,否则不浪费直接输出到主画布\n * 超尺寸的不绘制并给出警告,实现会扰乱逻辑且很少会出现这种情况\n */\n let frameBuffer, texture;\n if(hasMbm) {\n texture = createTexture(gl, null, 0, width, height);\n bindTexture(gl, null, 0);\n frameBuffer = genFrameBufferWithTexture(gl, texture, width, height);\n gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n }\n let lastPage, list = [];\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n node,\n total,\n hasMask,\n } = __structs[i];\n // text如果display不可见,parent会直接跳过,不会走到这里,这里一定是直接绘制到root的,visibility在其内部判断\n if(node instanceof Text) {\n // text特殊之处,__config部分是复用parent的\n let __cache = node.__cache;\n if(__cache && __cache.available) {\n let {\n __matrixEvent,\n __opacity,\n } = node.__domParent;\n let p = __cache.__page;\n if(lastPage && lastPage !== p) {\n drawTextureCache(gl, list.splice(0), cx, cy, 0, 0);\n }\n lastPage = p;\n list.push({ cache: __cache, opacity: __opacity, matrix: __matrixEvent });\n }\n }\n else {\n let __computedStyle = node.__computedStyle;\n // none跳过这棵子树,判断下最后一个节点的离屏应用即可\n if(__computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n [OPACITY]: opacity,\n [MIX_BLEND_MODE]: mixBlendMode,\n [VISIBILITY]: visibility,\n } = __computedStyle;\n if(visibility === 'hidden' && !total) {\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n __cache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n __domParent,\n __matrix,\n } = node;\n let m = __matrix;\n if(__domParent) {\n let op = __domParent.__opacity;\n if(op !== 1) {\n opacity *= __domParent.__opacity;\n }\n let pm = __domParent.__perspectiveMatrix, me = __domParent.__matrixEvent;\n if(pm && pm.length) {\n m = multiply(__domParent.__perspectiveMatrix, m);\n }\n if(me && me.length) {\n m = multiply(__domParent.__matrixEvent, m);\n }\n }\n node.__opacity = opacity;\n assignMatrix(node.__matrixEvent, m);\n // total和自身cache的尝试,visibility不可见时没有cache\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal, __cache]);\n if(target) {\n // 有mbm则需要混合之前的纹理和新纹理到fbo上面,连续的mbm则依次交替绘制到画布或离屏fbo上\n if(mixBlendMode !== 'normal') {\n if(list.length) {\n drawTextureCache(gl, list.splice(0), cx, cy, 0, 0);\n lastPage = null;\n }\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n let res = genMbmWebgl(gl, texture, target, mixBlendMode, opacity, m, 0, 0, cx, cy, width, height);\n if(res) {\n gl.deleteTexture(texture);\n texture = res.texture;\n frameBuffer = res.frameBuffer;\n }\n }\n else {\n let p = target.__page;\n if(lastPage && lastPage !== p) {\n drawTextureCache(gl, list.splice(0), cx, cy, 0, 0);\n }\n lastPage = p;\n list.push({ cache: target, opacity, matrix: m });\n }\n if(target !== __cache) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n }\n // webgl特殊的外部钩子,比如粒子组件自定义渲染时调用\n if(!target || target === __cache) {\n let render = node.render;\n if(render !== DOM_RENDER && render !== IMG_RENDER && render !== GEOM_RENDER) {\n node.render(renderMode, gl, 0, 0);\n }\n }\n }\n }\n drawTextureCache(gl, list, cx, cy, 0, 0);\n // 有mbm时将汇总的fbo绘入主画布,否则本身就是到主画布无需多余操作\n if(hasMbm) {\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(gl.program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(gl.program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1, 1, 1, 1, 1, 1]), gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n bindTexture(gl, texture, 0);\n let u_texture = gl.getUniformLocation(gl.program, 'u_texture');\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.deleteBuffer(opacityBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.deleteTexture(texture);\n }\n}\n\nfunction renderCanvas(renderMode, ctx, root, isFirst, rlv) {\n let { __structs, width, height } = root;\n let mergeList = [];\n /**\n * 先一遍先序遍历收集cacheAsBitmap的节点,说明这棵子树需要缓存,可能出现嵌套,深层级优先、后面优先\n * 可能遇到已有缓存没变化的,这时候不要收集忽略掉,没有缓存的走后面遍历普通渲染\n * 第一次强制进入,后续不包含cache变更且= REPAINT || (rlv & (CACHE | FT | MASK))) {\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n // 排除Text,要么根节点直接绘制,要么被局部根节点汇总,自身并不缓存(fillText比位图更快)\n if(node instanceof Text) {\n continue;\n }\n let __computedStyle = node.__computedStyle;\n // 跳过display:none元素和它的所有子节点\n if(__computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n // 根据refreshLevel优化计算,处理其样式\n let {\n __refreshLevel,\n __cacheTotal,\n } = node;\n node.__refreshLevel = NONE;\n // filter变化需重新生成,cacheTotal本身就存在要判断下;CACHE取消重新生成则无需判断\n // img在只有自身的情况下自动生成并特殊对待,多个相同引用的img使用同一份资源\n let need = node.__cacheAsBitmap &&\n ((__refreshLevel & (CACHE | FT)) || __refreshLevel >= REPAINT);\n if(!need && node instanceof Img) {\n let hasContent = node.calContent(node.__currentStyle, node.__computedStyle);\n let loadImg = node.__loadImg;\n if(loadImg.onlyImg && hasContent) {\n need = true;\n }\n }\n if(need) {\n mergeList.push({\n i,\n lv,\n total,\n node,\n hasMask,\n });\n }\n // total可以跳过所有孩子节点省略循环,filter/mask等的强制前提是有total\n if(__cacheTotal && __cacheTotal.available) {\n i += (total || 0);\n if(__refreshLevel === NONE && hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n }\n }\n /**\n * 根据收集的需要合并局部根的索引,尝试合并,按照层级从大到小,索引从大到小的顺序,\n * 这样保证子节点在前,后节点在前,后节点是为了mask先应用自身如filter之后再进行遮罩\n */\n if(mergeList.length) {\n mergeList.sort(function(a, b) {\n if(a.lv === b.lv) {\n return b.i - a.i;\n }\n return b.lv - a.lv;\n });\n mergeList.forEach(item => {\n let { i, lv, total, node, hasMask } = item;\n let __cacheTotal = genTotal(renderMode, ctx, root, node, i, lv, total || 0, __structs, width, height);\n if(__cacheTotal) {\n genTotalOther(renderMode, __structs, __cacheTotal, node, hasMask, width, height);\n }\n });\n }\n /**\n * 最后先序遍历一次并应用__cacheTotal即可,没有的普通绘制,以及剩下的超尺寸的和Text\n * 特殊离屏和cacheAsBitmap的离屏都已经产生了cacheTotal,除非超限\n * 离屏功能的数据结构和算法逻辑非常复杂,需用到下面2个hash,来完成一些filter、mask等离屏才能完成的绘制\n * 其中overflow、filter、mix-blend-mode是对自身及子节点,mask则是对自身和后续next遮罩节点\n * 一个节点在Xom渲染中申请离屏canvas,是按照一定顺序来的,且多个离屏后面的有前面的ctx引用,第一个则引用最初非离屏的ctx\n * 这个顺序在应用离屏时以反向顺序开始,这样最后ctx被还原到最初的ctx\n * mask是个十分特殊的离屏,因为除了自身外,next节点也需要汇总到另外一个离屏上,为了逻辑一致性\n * 所有离屏应用的索引都以最后一个节点的索引为准,即有mask时以最后一个mask,无mask则以自身节点的最后一个(+total)为索引\n * 由于存在普通非cache绘制,所以依然要用到栈代替递归计算matrix\n */\n let maskStartHash = [];\n let offscreenHash = [];\n let lastOpacity = -1;\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n // text如果display不可见,parent会直接跳过,不会走到这里,这里一定是直接绘制到root的,visibility在其内部判断\n if(node instanceof Text) {\n node.render(renderMode, ctx, 0, 0);\n let oh = offscreenHash[i];\n if(oh) {\n ctx = applyOffscreen(ctx, oh, width, height, false);\n lastOpacity = -1;\n }\n }\n else {\n let __computedStyle = node.__computedStyle;\n // none跳过这棵子树,判断下最后一个节点的离屏应用即可\n if(__computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n let oh = offscreenHash[i];\n if(oh) {\n ctx = applyOffscreen(ctx, oh, width, height, true);\n lastOpacity = -1;\n }\n continue;\n }\n let {\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n __domParent,\n __matrix,\n } = node;\n // 遮罩对象申请了个离屏,其第一个mask申请另外一个离屏mask2,开始聚集所有mask元素的绘制,\n // 这是一个十分特殊的逻辑,保存的index是最后一个节点的索引,OFFSCREEN_MASK2是最低优先级,\n // 这样当mask本身有filter时优先自身,然后才是OFFSCREEN_MASK2\n let msh = maskStartHash[i];\n if(msh) {\n let { idx, hasMask, offscreenMask } = msh;\n let target = inject.getOffscreenCanvas(width, height, null, 'mask2');\n offscreenMask.mask = target; // 应用mask用到\n offscreenMask.isClip = node.__clip;\n // 定位到最后一个mask元素上的末尾\n let j = i + (total || 0) + 1;\n while(--hasMask) {\n let { total } = __structs[j];\n j += (total || 0) + 1;\n }\n j--;\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx, lv, type: OFFSCREEN_MASK, offscreen: offscreenMask });\n list.push({ idx: j, lv, type: OFFSCREEN_MASK2, offscreen: {\n ctx, // 保存等待OFFSCREEN_MASK2时还原\n target,\n }});\n ctx = target.ctx;\n }\n // 设置opacity/matrix,根节点是没有父节点的不计算继承值\n let opacity = __computedStyle[OPACITY];\n let m = __matrix;\n if(__domParent) {\n let op = __domParent.__opacity;\n if(op !== 1) {\n opacity *= __domParent.__opacity;\n }\n let me = __domParent.__matrixEvent;\n if(me && me.length) {\n m = multiply(me, m);\n }\n }\n node.__opacity = opacity;\n assignMatrix(node.__matrixEvent, m);\n // 有cache声明从而有total的可以直接绘制并跳过子节点索,total生成可能会因超限而失败\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal]);\n if(target) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n if(lastOpacity !== opacity) {\n ctx.globalAlpha = opacity;\n lastOpacity = opacity;\n }\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n let mixBlendMode = __computedStyle[MIX_BLEND_MODE];\n if(mixBlendMode !== 'normal') {\n ctx.globalCompositeOperation = mbmName(mixBlendMode);\n }\n let { x, y, canvas, x1, y1, dbx, dby, width: w, height: h } = target;\n ctx.drawImage(canvas, x, y, w, h, x1 - dbx, y1 - dby, w, h);\n // total应用后记得设置回来\n ctx.globalCompositeOperation = 'source-over';\n // 父超限但子有total的时候,i此时已经增加到了末尾,也需要检查\n let oh = offscreenHash[i];\n if(oh) {\n ctx = applyOffscreen(ctx, oh, width, height, false);\n lastOpacity = -1;\n }\n }\n // 没有cacheTotal是普通节点绘制\n else {\n // 如果有离屏则先申请替换ctx\n let offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow;\n let offscreen = node.__calOffscreen(ctx, __computedStyle);\n if(offscreen) {\n ctx = offscreen.ctx;\n offscreenBlend = offscreen.offscreenBlend;\n offscreenMask = offscreen.offscreenMask;\n offscreenFilter = offscreen.offscreenFilter;\n offscreenOverflow = offscreen.offscreenOverflow;\n }\n // 节点自身渲染\n if(lastOpacity !== opacity) {\n ctx.globalAlpha = opacity;\n lastOpacity = opacity;\n }\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n node.render(renderMode, ctx, 0, 0);\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_BLEND, offscreen: offscreenBlend });\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n // 最后一个遮罩索引因数量不好计算,放在maskStartHash做\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = {\n idx: i,\n hasMask,\n offscreenMask,\n };\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_FILTER, offscreen: offscreenFilter });\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_OVERFLOW, offscreen: offscreenOverflow });\n }\n // 离屏应用,按照lv从大到小即子节点在前先应用,同一个节点多个效果按offscreen优先级从小到大来,\n // 由于mask特殊索引影响,所有离屏都在最后一个mask索引判断,此时mask本身优先结算,以index序大到小判断\n let oh = offscreenHash[i];\n if(oh) {\n ctx = applyOffscreen(ctx, oh, width, height, false);\n lastOpacity = -1;\n }\n }\n }\n }\n}\n\nexport default {\n renderCanvas,\n renderSvg,\n renderWebgl,\n};\n\n","export default {\n alpha: true,\n antialias: true,\n premultipliedAlpha: true,\n preserveDrawingBuffer: true,\n depth: true,\n // stencil: true,\n};\n","import Xom from './Xom';\nimport Dom from './Dom';\nimport Text from './Text';\nimport Component from './Component';\nimport Defs from './Defs';\nimport Geom from './geom/Geom';\nimport builder from './builder';\nimport util from '../util/util';\nimport domDiff from '../util/diff';\nimport unit from '../style/unit';\nimport geom from '../math/geom';\nimport enums from '../util/enums';\nimport inject from '../util/inject';\nimport Event from '../util/Event';\nimport frame from '../animate/frame';\nimport Controller from '../animate/Controller';\nimport mode from '../refresh/mode';\nimport change from '../refresh/change';\nimport level from '../refresh/level';\nimport struct from '../refresh/struct';\nimport reflow from '../refresh/reflow';\nimport webgl from '../gl/webgl';\nimport ca from '../gl/ca';\nimport vertex from '../gl/main.vert';\nimport fragment from '../gl/main.frag';\nimport vertexMask from '../gl/mask.vert';\nimport fragmentMask from '../gl/mask.frag';\nimport fragmentClip from '../gl/clip.frag';\nimport vertexOverflow from '../gl/overflow.vert';\nimport fragmentOverflow from '../gl/overflow.frag';\nimport vertexCm from '../gl/filter/cm.vert';\nimport fragmentCm from '../gl/filter/cm.frag';\nimport vertexDs from '../gl/filter/drops.vert'\nimport fragmentDs from '../gl/filter/drops.frag';\nimport vertexMbm from '../gl/mbm/mbm.vert';\nimport fragmentMultiply from '../gl/mbm/multiply.frag';\nimport fragmentScreen from '../gl/mbm/screen.frag';\nimport fragmentOverlay from '../gl/mbm/overlay.frag';\nimport fragmentDarken from '../gl/mbm/darken.frag';\nimport fragmentLighten from '../gl/mbm/lighten.frag';\nimport fragmentColorDodge from '../gl/mbm/color-dodge.frag';\nimport fragmentColorBurn from '../gl/mbm/color-burn.frag';\nimport fragmentHardLight from '../gl/mbm/hard-light.frag';\nimport fragmentSoftLight from '../gl/mbm/soft-light.frag';\nimport fragmentDifference from '../gl/mbm/difference.frag';\nimport fragmentExclusion from '../gl/mbm/exclusion.frag';\nimport fragmentHue from '../gl/mbm/hue.frag';\nimport fragmentSaturation from '../gl/mbm/saturation.frag';\nimport fragmentColor from '../gl/mbm/color.frag';\nimport fragmentLuminosity from '../gl/mbm/luminosity.frag';\nimport vertexSs from '../gl/ss.vert';\nimport fragmentSs from '../gl/ss.frag';\n\nconst {\n STYLE_KEY: {\n TOP,\n RIGHT,\n BOTTOM,\n LEFT,\n POSITION,\n DISPLAY,\n VISIBILITY,\n COLOR,\n WIDTH,\n HEIGHT,\n Z_INDEX,\n POINTER_EVENTS,\n WRITING_MODE,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n MATRIX,\n TRANSFORM,\n OPACITY,\n MIX_BLEND_MODE,\n },\n} = enums;\nconst { isNil, isFunction } = util;\nconst { PX, INHERIT } = unit;\nconst {\n getLevel,\n isRepaint,\n NONE,\n FILTER: FT,\n PERSPECTIVE: PPT,\n REPAINT,\n REFLOW,\n REBUILD,\n CACHE,\n TRANSFORM: TF,\n TRANSFORM_ALL,\n OPACITY: OP,\n MIX_BLEND_MODE: MBM,\n MASK,\n} = level;\nconst { isGeom } = change;\nconst { renderCanvas, renderSvg, renderWebgl } = struct;\n\nconst ROOT_DOM_NAME = {\n canvas: 'canvas',\n svg: 'svg',\n webgl: 'canvas',\n};\n\nfunction getDom(dom) {\n if(util.isString(dom) && dom) {\n let o = document.querySelector(dom);\n if(!o) {\n throw new Error('Can not find dom of selector: ' + dom);\n }\n return o;\n }\n if(!dom) {\n throw new Error('Can not find dom: ' + dom);\n }\n return dom;\n}\n\nfunction renderProp(k, v) {\n let s = Array.isArray(v) ? util.joinSourceArray(v) : util.stringify(v);\n if(k === 'className') {\n k = 'class';\n }\n else if(k === 'style') {\n return '';\n }\n return ' ' + k + '=\"' + util.encodeHtml(s, true) + '\"';\n}\n\nconst EVENT_LIST = ['click', 'dblclick', 'mousedown', 'mousemove', 'mouseup', 'touchstart', 'touchmove', 'touchend', 'touchcancel'];\n\nfunction initEvent(dom, Root) {\n let list = [];\n EVENT_LIST.forEach(type => {\n function cb(e) {\n let root = dom.__root;\n if(root && root instanceof Root) {\n if(['touchend', 'touchcancel', 'touchmove'].indexOf(type) > -1) {\n let target = root.__touchstartTarget;\n let event = root.__wrapEvent(e);\n event.target = target;\n while(target) {\n target.__emitEvent(event, null, true);\n target = target.__domParent;\n }\n }\n else {\n root.__cb(e);\n }\n }\n }\n dom.addEventListener(type, cb);\n list.push([type, cb]);\n });\n return list;\n}\n\nfunction removeEvent(dom, list) {\n list.forEach(item => {\n dom.removeEventListener(item[0], item[1]);\n });\n}\n\nlet uuid = 0;\n\nclass Root extends Dom {\n constructor(tagName, props, children) {\n super(tagName, props, children);\n this.__dom = null; // 真实DOM引用\n this.__mw = 0; // 记录最大宽高,防止尺寸变化清除不完全\n this.__mh = 0;\n // this.__scx = 1; // 默认缩放,css改变canvas/svg缩放后影响事件坐标,有值手动指定,否则自动计算\n // this.__scy = 1;\n this.__task = [];\n this.__ref = {};\n this.__animateController = new Controller();\n Event.mix(this);\n this.__uuid = uuid++;\n this.__rlv = REBUILD; // 每次刷新最大lv\n this.__lastUpdateP = null; // 每帧addUpdate都会向上检查,很多时候同级无需继续,第一次检查暂存parent对象\n builder.buildRoot(this, this.__children);\n }\n\n __initProps() {\n let w = this.props.width;\n if(!isNil(w)) {\n let value = parseFloat(w) || 0;\n if(value > 0) {\n this.__width = value;\n }\n }\n let h = this.props.height;\n if(!isNil(h)) {\n let value = parseFloat(h) || 0;\n if(value > 0) {\n this.__height = value;\n }\n }\n }\n\n __genHtml(domName) {\n let res = `<${domName}`;\n // 拼接处理属性\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n // 忽略事件\n if(!/^on[a-zA-Z]/.test(k)) {\n res += renderProp(k, v);\n }\n });\n res += `>`;\n return res;\n }\n\n __wrapEvent(e) {\n let x, y;\n // 触摸结束取消特殊没有touches\n if(['touchend', 'touchcancel'].indexOf(e.type) === -1) {\n let { dom, __scx, __scy } = this;\n let { x: x2, y: y2, left, top, width, height } = dom.getBoundingClientRect();\n x = x2 || left || 0;\n y = y2 || top || 0;\n let { clientX, clientY } = e.touches ? e.touches[0] : e;\n x = clientX - x;\n y = clientY - y;\n // 外边的scale影响元素事件响应,根据倍数计算真实的坐标,优先手动指定,否则自动计算\n if(!isNil(__scx)) {\n x /= __scx;\n }\n else {\n x *= this.__width / width;\n }\n if(!isNil(__scy)) {\n y /= __scy;\n }\n else {\n y *= this.__height / height;\n }\n }\n return {\n event: e,\n stopPropagation() {\n this.__stopPropagation = true;\n e.stopPropagation();\n },\n stopImmediatePropagation() {\n this.__stopPropagation = true;\n this.__stopImmediatePropagation = true;\n e.stopImmediatePropagation();\n },\n preventDefault() {\n e.preventDefault();\n },\n x,\n y,\n __hasEmitted: false,\n };\n }\n\n // 类似touchend/touchcancel/touchmove这种无需判断是否发生于元素上,直接响应\n __cb(e) {\n if(e.type === 'touchmove' && !this.__touchstartTarget) {\n return;\n }\n let data = this.__wrapEvent(e);\n this.__emitEvent(data, null, false);\n return data;\n }\n\n /**\n * 添加到真实Dom上,优先已存在的同名canvas/svg节点,没有则dom下生成新的\n * @param dom\n */\n appendTo(dom) {\n dom = getDom(dom);\n this.__isDestroyed = false;\n this.__initProps();\n let tagName = this.tagName;\n let domName = ROOT_DOM_NAME[tagName];\n // OffscreenCanvas兼容,包含worker的\n if(typeof window !== 'undefined' && window.OffscreenCanvas && (dom instanceof window.OffscreenCanvas)\n || typeof self !== 'undefined' && self.OffscreenCanvas && (dom instanceof self.OffscreenCanvas)) {\n this.__dom = dom;\n this.__width = dom.width;\n this.__height = dom.height;\n }\n // 已有root节点\n else if(dom.nodeName.toLowerCase() === domName) {\n this.__dom = dom;\n if(this.__width) {\n dom.setAttribute('width', this.__width);\n }\n if(this.__height) {\n dom.setAttribute('height', this.__height);\n }\n }\n // 没有canvas/svg节点则生成一个新的\n else {\n this.__dom = dom.querySelector(domName);\n if(!this.__dom) {\n dom.innerHTML = this.__genHtml(domName);\n this.__dom = dom.querySelector(domName);\n }\n }\n // 没有设置width/height则采用css计算形式\n if(!this.__width || !this.__height) {\n let domCss = window.getComputedStyle(dom, null);\n if(!this.__width) {\n this.__width = parseFloat(domCss.getPropertyValue('width')) || 0;\n dom.setAttribute('width', this.width);\n }\n if(!this.__height) {\n this.__height = parseFloat(domCss.getPropertyValue('height')) || 0;\n dom.setAttribute('height', this.height);\n }\n }\n // 最终无宽高给出警告\n if(!this.__width || !this.__height) {\n inject.warn('Karas render target with a width or height of 0.')\n }\n let params = Object.assign({}, ca, this.props.contextAttributes);\n // 只有canvas有ctx,svg用真实dom\n if(tagName === 'canvas') {\n this.__ctx = this.__dom.getContext('2d', params);\n this.__renderMode = mode.CANVAS;\n }\n else if(tagName === 'svg') {\n this.__defs = this.dom.__defs || Defs.getInstance(this.__uuid);\n this.__renderMode = mode.SVG;\n }\n else if(tagName === 'webgl') {\n // 优先手动指定,再自动判断,最后兜底\n let gl, webgl2 = this.props.webgl2;\n if(!isNil(webgl2)) {\n if(webgl2) {\n gl = this.__dom.getContext('webgl2', params);\n }\n if(!gl) {\n gl = this.__dom.getContext('webgl', params);\n }\n this.__ctx = gl;\n }\n else {\n gl = this.__ctx = this.__dom.getContext('webgl2', params)\n || this.__dom.getContext('webgl', params);\n }\n this.__initShader(gl);\n this.__renderMode = mode.WEBGL;\n }\n this.draw(true);\n // 第一次节点没有__root,渲染一次就有了才能diff\n if(this.__dom.__root && this.__dom.__root instanceof Root) {\n this.__dom.__root.destroy();\n }\n this.__eventCbList = initEvent(this.__dom, Root);\n this.__dom.__root = this;\n }\n\n __initShader(gl) {\n gl.program = webgl.initShaders(gl, vertex, fragment);\n gl.programMask = webgl.initShaders(gl, vertexMask, fragmentMask);\n gl.programClip = webgl.initShaders(gl, vertexMask, fragmentClip);\n gl.programOverflow = webgl.initShaders(gl, vertexOverflow, fragmentOverflow);\n gl.programCm = webgl.initShaders(gl, vertexCm, fragmentCm);\n gl.programDs = webgl.initShaders(gl, vertexDs, fragmentDs);\n gl.programMbmMp = webgl.initShaders(gl, vertexMbm, fragmentMultiply);\n gl.programMbmSr = webgl.initShaders(gl, vertexMbm, fragmentScreen);\n gl.programMbmOl = webgl.initShaders(gl, vertexMbm, fragmentOverlay);\n gl.programMbmDk = webgl.initShaders(gl, vertexMbm, fragmentDarken);\n gl.programMbmLt = webgl.initShaders(gl, vertexMbm, fragmentLighten);\n gl.programMbmCd = webgl.initShaders(gl, vertexMbm, fragmentColorDodge);\n gl.programMbmCb = webgl.initShaders(gl, vertexMbm, fragmentColorBurn);\n gl.programMbmHl = webgl.initShaders(gl, vertexMbm, fragmentHardLight);\n gl.programMbmSl = webgl.initShaders(gl, vertexMbm, fragmentSoftLight);\n gl.programMbmDf = webgl.initShaders(gl, vertexMbm, fragmentDifference);\n gl.programMbmEx = webgl.initShaders(gl, vertexMbm, fragmentExclusion);\n gl.programMbmHue = webgl.initShaders(gl, vertexMbm, fragmentHue);\n gl.programMbmSt = webgl.initShaders(gl, vertexMbm, fragmentSaturation);\n gl.programMbmCl = webgl.initShaders(gl, vertexMbm, fragmentColor);\n gl.programMbmLm = webgl.initShaders(gl, vertexMbm, fragmentLuminosity);\n gl.programSs = webgl.initShaders(gl, vertexSs, fragmentSs);\n gl.useProgram(gl.program);\n }\n\n __reLayout() {\n let {\n renderMode,\n width,\n height,\n } = this;\n this.__checkRoot(renderMode, width, height);\n let wm = this.__currentStyle[WRITING_MODE];\n let isUpright = wm.v && wm.v.indexOf('vertical') === 0;\n // 布局分为两步,普通流和定位流,互相递归\n this.__layout({\n x: 0,\n y: 0,\n w: width,\n h: height,\n isUpright,\n }, false, false, false);\n // 绝对布局需要从根开始保存相对坐标系的容器引用,并根据relative/absolute情况变更\n this.__layoutAbs(this, {\n x: 0,\n y: 0,\n w: width,\n h: height,\n isUpright,\n }, null);\n this.__structs = this.__structure(0, 0);\n }\n\n draw(isFirst) {\n let { isDestroyed, renderMode, ctx, defs } = this;\n if(isDestroyed) {\n return;\n }\n this.__lastUpdateP = null;\n // 首次递归测量整树的继承,后续更改各自更新机制做,防止每次整树遍历;root检查首次直接做,后续在checkUpdate()中插入\n if(isFirst) {\n this.__reLayout();\n }\n if(this.props.noRender) {\n return;\n }\n let rlv = this.__rlv;\n if(renderMode === mode.CANVAS) {\n this.__clearCanvas(ctx);\n renderCanvas(renderMode, ctx, this, isFirst, rlv);\n }\n // svg的特殊diff需要\n else if(renderMode === mode.SVG) {\n defs.clear();\n renderSvg(renderMode, defs, this, isFirst, rlv);\n let nvd = this.virtualDom;\n nvd.defs = defs.value;\n let dom = this.__dom;\n if(dom.__vd) {\n // console.log(this.dom.__vd);\n // console.log(nvd);\n domDiff(dom, dom.__vd, nvd);\n }\n else {\n dom.innerHTML = util.joinVirtualDom(nvd);\n }\n dom.__vd = nvd;\n dom.__defs = defs;\n }\n else if(renderMode === mode.WEBGL) {\n this.__clearWebgl(ctx);\n renderWebgl(renderMode, ctx, this, isFirst, rlv);\n }\n this.emit(Event.REFRESH, rlv);\n this.__rlv = NONE;\n }\n\n destroy() {\n this.__destroy();\n this.__animateController.__destroy();\n let n = this.dom;\n if(n) {\n removeEvent(n, this.__eventCbList || []);\n n.__root = null;\n }\n let gl = this.ctx;\n if(this.renderMode === mode.WEBGL) {\n [\n 'program',\n 'programMask',\n 'programClip',\n 'programOverflow',\n 'programCm',\n 'programDs',\n 'programMbmMp',\n 'programMbmSr',\n 'programMbmOl',\n 'programMbmDk',\n 'programMbmLt',\n 'programMbmCd',\n 'programMbmCb',\n 'programMbmHl',\n 'programMbmSl',\n 'programMbmDf',\n 'programMbmEx',\n 'programMbmHue',\n 'programMbmSt',\n 'programMbmCl',\n 'programMbmLm',\n ].forEach(k => {\n let p = gl[k];\n gl.deleteShader(p.vertexShader);\n gl.deleteShader(p.fragmentShader);\n gl.deleteProgram(p);\n });\n for(let i in gl) {\n if(i.indexOf('programBlur,') === 0) {\n let p = gl[i];\n gl.deleteShader(p.vertexShader);\n gl.deleteShader(p.fragmentShader);\n gl.deleteProgram(p);\n }\n }\n }\n }\n\n scale(x = 1, y = x) {\n this.__scx = x;\n this.__scy = y;\n }\n\n resize(w, h, cb) {\n let self = this;\n if(w !== self.width || h !== self.height) {\n self.__width = w;\n self.__height = h;\n self.updateStyle({\n width: w,\n height: h,\n }, cb);\n }\n else if(isFunction(cb)) {\n cb(-1);\n }\n }\n\n getTargetAtPoint(x, y, includeIgnore) {\n function scan(vd, x, y, path, zPath) {\n let { __x1, __y1, offsetWidth, offsetHeight, matrixEvent, children, zIndexChildren,\n computedStyle: { [DISPLAY]: display, [POINTER_EVENTS]: pointerEvents } } = vd;\n if(!includeIgnore && display === 'none') {\n return;\n }\n if(Array.isArray(zIndexChildren)) {\n for(let i = 0, len = children.length; i < len; i++) {\n children[i].__index__ = i;\n }\n for(let i = zIndexChildren.length - 1; i >= 0; i--) {\n let item = zIndexChildren[i];\n if(item instanceof karas.Text) {\n continue;\n }\n let path2 = path.slice();\n path2.push(item.__index__);\n let zPath2 = zPath.slice();\n zPath2.push(i);\n let res = scan(item, x, y, path2, zPath2);\n if(res) {\n return res;\n }\n }\n }\n if(!includeIgnore && pointerEvents === 'none') {\n return;\n }\n let inThis = geom.pointInQuadrilateral(\n x, y,\n __x1, __y1,\n __x1 + offsetWidth, __y1,\n __x1 + offsetWidth, __y1 + offsetHeight,\n __x1, __y1 + offsetHeight,\n matrixEvent\n );\n if(inThis) {\n return {\n target: vd,\n path,\n zPath,\n };\n }\n }\n return scan(this, x, y, [], []);\n }\n\n /**\n * 每次刷新前检查root节点的样式,有些固定的修改无效,有些继承的作为根初始化\n * @param renderMode\n * @param width\n * @param height\n * @private\n */\n __checkRoot(renderMode, width, height) {\n let { dom, currentStyle, computedStyle } = this;\n // canvas/svg作为根节点一定是block或flex,不会是inline\n if(['flex', 'block'].indexOf(currentStyle[DISPLAY]) === -1) {\n computedStyle[DISPLAY] = currentStyle[DISPLAY] = 'block';\n }\n // 同理position不能为absolute\n if(currentStyle[POSITION] === 'absolute') {\n computedStyle[POSITION] = currentStyle[POSITION] = 'static';\n }\n // 根节点满宽高\n currentStyle[WIDTH] = { v: width, u: PX };\n currentStyle[HEIGHT] = { v: height, u: PX };\n computedStyle[WIDTH] = width;\n computedStyle[HEIGHT] = height;\n // 可能调用resize()导致变更,要重设,canvas无论离屏与否都可使用直接赋值,svg则按dom属性api\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(dom.width !== width) {\n dom.width = width;\n }\n if(dom.height !== height) {\n dom.height = height;\n }\n }\n else if(renderMode === mode.SVG) {\n dom.setAttribute('width', width);\n dom.setAttribute('height', height);\n }\n }\n\n /**\n * 添加更新,分析repaint/reflow和上下影响,异步刷新\n */\n __addUpdate(node, keys, focus, addDom, removeDom, aniParams, cb) {\n if(node instanceof Component) {\n node = node.shadowRoot;\n }\n let {\n __computedStyle: computedStyle,\n __currentStyle: currentStyle,\n __cacheStyle: cacheStyle,\n __cacheProps,\n __mask,\n __domParent,\n } = node;\n let hasZ, hasVisibility, hasColor, hasDisplay, hasTsColor, hasTsWidth, hasTsOver;\n // 可能无keys但有aniParams,多防御一下,比如steps动画\n let lv = focus || (aniParams && keys && keys.length ? aniParams.lv : NONE);\n // 清空对应改变的cacheStyle\n if(keys) {\n if(aniParams) {\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n cacheStyle[k] = undefined;\n }\n hasZ = aniParams.hasZ;\n hasColor = aniParams.hasColor;\n hasTsColor = aniParams.hasTsColor;\n hasTsWidth = aniParams.hasTsWidth;\n hasTsOver = aniParams.hasTsOver;\n }\n else {\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n if(node instanceof Geom && isGeom(node.tagName, k)) {\n lv |= REPAINT;\n __cacheProps[k] = undefined;\n }\n else {\n // repaint置空,如果reflow会重新生成空的\n cacheStyle[k] = undefined;\n // TRBL变化只对relative/absolute起作用,其它忽视\n if((k === TOP || k === RIGHT || k === BOTTOM || k === LEFT)\n && ['relative', 'absolute'].indexOf(computedStyle[POSITION]) === -1) {\n continue;\n }\n // 细化等级\n lv |= getLevel(k);\n if(k === DISPLAY) {\n hasDisplay = true;\n }\n else if(k === Z_INDEX) {\n hasZ = node !== this && ['relative', 'absolute'].indexOf(computedStyle[POSITION]) > -1;\n }\n else if(k === VISIBILITY) {\n hasVisibility = true;\n }\n else if(k === COLOR) {\n hasColor = true;\n }\n else if(k === TEXT_STROKE_COLOR) {\n hasTsColor = true;\n }\n else if(k === TEXT_STROKE_WIDTH) {\n hasTsWidth = true;\n }\n else if(k === TEXT_STROKE_OVER) {\n hasTsOver = true;\n }\n }\n }\n }\n }\n // 没有变化,add/remove强制focus\n // 本身节点为none,变更无效,此时没有display变化,add/remove在操作时已经判断不会进入\n if(lv === NONE || computedStyle[DISPLAY] === 'none' && !hasDisplay) {\n if(cb && isFunction(cb)) {\n cb();\n }\n return;\n }\n // transform变化清空重算,比较特殊,MATRIX的cache需手动清理\n if(lv & TF) {\n cacheStyle[MATRIX] = computedStyle[TRANSFORM] = undefined;\n }\n // mask需清除遮罩对象的缓存\n let hasRelease, hasMask = lv & MASK;\n if(__mask || hasMask) {\n let prev = node.__prev;\n while(prev && (prev.__mask)) {\n prev = prev.__prev;\n }\n if(prev && (prev instanceof Xom || prev instanceof Component && prev.shadowRoot instanceof Xom)) {\n prev.__refreshLevel |= CACHE | MASK;\n prev.__struct.hasMask = prev.__hasMask = __mask;\n if(prev.__cacheMask) {\n hasRelease = prev.__cacheMask.release() || hasRelease;\n }\n }\n }\n // aniParams在动画引擎提前计算好了\n let isRp = aniParams && aniParams.isRepaint || isRepaint(lv);\n if(isRp) {\n // dom在>=REPAINT时total失效,svg的Geom比较特殊\n let need = lv >= REPAINT;\n if(need) {\n if(node.__cache) {\n hasRelease = node.__cache.release() || hasRelease;\n }\n node.__calStyle(lv, currentStyle, computedStyle, cacheStyle);\n node.__calPerspective(currentStyle, computedStyle, cacheStyle);\n }\n // < REPAINT特殊的优化computedStyle计算\n else {\n if(lv & PPT) {\n node.__calPerspective(currentStyle, computedStyle, cacheStyle);\n }\n if(lv & TRANSFORM_ALL) {\n node.__calMatrix(lv, currentStyle, computedStyle, cacheStyle, aniParams && aniParams.optimize);\n }\n if(lv & OP) {\n computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n if(lv & FT) {\n node.__calFilter(currentStyle, computedStyle, cacheStyle);\n }\n if(lv & MBM) {\n computedStyle[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE];\n }\n }\n // 影响子继承REPAINT的变化,如果被cache住需要清除\n if(hasVisibility || hasColor || hasTsColor || hasTsWidth || hasTsOver) {\n for(let __structs = this.__structs,\n __struct = node.__struct,\n i = __structs.indexOf(__struct) + 1,\n len = i + (__struct.total || 0); i < len; i++) {\n let {\n node,\n total,\n } = __structs[i];\n // text的style指向parent,不用管\n if(node instanceof Text) {\n continue;\n }\n let currentStyle = node.__currentStyle, cacheStyle = node.__cacheStyle;\n let need;\n if(hasVisibility && currentStyle[VISIBILITY].u === INHERIT) {\n need = true;\n cacheStyle[VISIBILITY] = undefined;\n }\n else if(hasColor && currentStyle[COLOR].u === INHERIT) {\n need = true;\n cacheStyle[COLOR] = undefined;\n }\n else if(hasTsColor && currentStyle[TEXT_STROKE_COLOR].u === INHERIT) {\n need = true;\n cacheStyle[TEXT_STROKE_COLOR] = undefined;\n }\n else if(hasTsWidth && currentStyle[TEXT_STROKE_WIDTH].u === INHERIT) {\n need = true;\n cacheStyle[TEXT_STROKE_WIDTH] = undefined;\n }\n else if(hasTsOver && currentStyle[TEXT_STROKE_OVER].u === INHERIT) {\n need = true;\n cacheStyle[TEXT_STROKE_OVER] = undefined;\n }\n if(need) {\n node.__refreshLevel |= REPAINT;\n node.clearCache();\n node.__calStyle(REPAINT, currentStyle, node.__computedStyle, cacheStyle);\n }\n // 不为inherit此子树可跳过,因为不影响\n else {\n i += total || 0;\n }\n }\n }\n // perspective也特殊只清空total的cache,和>=REPAINT清空total共用\n if(need || (lv & PPT)) {\n if(node.__cacheTotal) {\n hasRelease = node.__cacheTotal.release() || hasRelease;\n }\n }\n // mask无论如何都要清除,除非是opacity\n if(node.__hasMask) {\n if(need || (lv ^ OP)) {\n if(node.__cacheMask) {\n hasRelease = node.__cacheMask.release() || hasRelease;\n }\n if(node.__cacheFilter) {\n hasRelease = node.__cacheFilter.release() || hasRelease;\n }\n }\n }\n // 特殊的filter清除cache\n else if((need || (lv & FT)) && node.__cacheFilter) {\n hasRelease = node.__cacheFilter.release() || hasRelease;\n }\n // 向上清除cache汇总缓存信息,过程中可能会出现重复,根据refreshLevel判断,reflow已经自己清过了\n if(__domParent !== this.__lastUpdateP) {\n let p = __domParent;\n this.__lastUpdateP = p; // 同层级避免重复进入查找,每次draw()重设\n while(p) {\n if(p.__refreshLevel & (CACHE | REPAINT | REFLOW)) {\n break;\n }\n p.__refreshLevel |= CACHE;\n if(p.__cacheTotal) {\n hasRelease = p.__cacheTotal.release() || hasRelease;\n }\n if(p.__cacheFilter) {\n hasRelease = p.__cacheFilter.release() || hasRelease;\n }\n if(p.__cacheMask) {\n hasRelease = p.__cacheMask.release() || hasRelease;\n }\n p = p.__domParent;\n }\n // 清除parent的zIndexChildren缓存,强制所有孩子重新渲染\n if(hasZ && __domParent) {\n __domParent.__zIndexChildren = null;\n __domParent.__updateStruct();\n if(this.__renderMode === mode.SVG) {\n hasRelease = node.__cacheTotal.release() || hasRelease;\n reflow.clearSvgCache(__domParent);\n }\n }\n }\n }\n else {\n let top = reflow.checkTop(this, node, addDom, removeDom);\n if(top === this) {\n this.__reLayout();\n }\n // 布局影响next的所有节点,重新layout的w/h数据使用之前parent暂存的,x使用parent,y使用prev或者parent的\n else {\n reflow.checkNext(this, top, node, hasZ, addDom, removeDom);\n }\n if(removeDom) {\n let temp = node;\n while(temp.isShadowRoot) {\n temp = temp.__host;\n temp.__destroy();\n }\n node.__destroy();\n }\n }\n node.__refreshLevel |= lv;\n // 有被清除的cache则设置到Root上\n if(hasRelease) {\n lv |= CACHE;\n }\n if(addDom || removeDom) {\n this.__rlv |= REBUILD;\n }\n else {\n this.__rlv |= lv;\n }\n if(cb && !isFunction(cb)) {\n cb = null;\n }\n this.__frameDraw(cb);\n }\n\n // 异步进行root刷新操作,多次调用缓存结果,刷新成功后回调\n __frameDraw(cb) {\n if(!this.__task.length) {\n frame.nextFrame(() => {\n });\n frame.__rootTask.push(() => {\n // 需要先获得累积的刷新回调再刷新,防止refresh触发事件中再次调用刷新\n let list = this.__task.splice(0);\n this.draw(false);\n list.forEach(item => {\n item && item();\n });\n });\n this.__task.push(cb);\n }\n else if(cb) {\n this.__task.push(cb);\n }\n }\n\n __clearCanvas(ctx) {\n // 可能会调整宽高,所以每次清除用最大值\n this.__mw = Math.max(this.__mw, this.width);\n this.__mh = Math.max(this.__mh, this.height);\n // 清除前得恢复默认matrix,防止每次布局改变了属性\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, this.__mw, this.__mh);\n }\n\n __clearWebgl(ctx) {\n ctx.clearColor(0, 0, 0, 0);\n ctx.clear(ctx.COLOR_BUFFER_BIT);\n }\n\n get dom() {\n return this.__dom;\n }\n\n get uuid() {\n return this.__uuid;\n }\n\n get renderMode() {\n return this.__renderMode;\n }\n\n get ctx() {\n return this.__ctx;\n }\n\n get defs() {\n return this.__defs;\n }\n\n get ref() {\n return this.__ref;\n }\n\n get animateController() {\n return this.__animateController;\n }\n}\n\nexport default Root;\n","import equation from './equation';\n\n/**\n * 二阶贝塞尔曲线范围框\n * @param x0\n * @param y0\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n * @returns {number[]}\n * https://www.iquilezles.org/www/articles/bezierbbox/bezierbbox.htm\n */\nfunction bboxBezier2(x0, y0, x1, y1, x2, y2) {\n let minX = Math.min(x0, x2);\n let minY = Math.min(y0, y2);\n let maxX = Math.max(x0, x2);\n let maxY = Math.max(y0, y2);\n // 控制点位于边界内部时,边界就是范围框,否则计算导数获取极值\n if(x1 < minX || y1 < minY || x1 > maxX || y1 > maxY) {\n let tx = (x0 - x1) / (x0 - 2 * x1 + x2);\n if(tx < 0) {\n tx = 0;\n }\n else if(tx > 1) {\n tx = 1;\n }\n let ty = (y0 - y1) / (y0 - 2 * y1 + y2);\n if(ty < 0) {\n ty = 0;\n }\n else if(ty > 1) {\n ty = 1;\n }\n let sx = 1 - tx;\n let sy = 1 - ty;\n let qx = sx * sx * x0 + 2 * sx * tx * x1 + tx * tx * x2;\n let qy = sy * sy * y0 + 2 * sy * ty * y1 + ty * ty * y2;\n minX = Math.min(minX, qx);\n minY = Math.min(minY, qy);\n maxX = Math.max(maxX, qx);\n maxY = Math.max(maxY, qy);\n }\n return [minX, minY, maxX, maxY];\n}\n\n/**\n * 同上三阶的\n */\nfunction bboxBezier3(x0, y0, x1, y1, x2, y2, x3, y3) {\n let minX = Math.min(x0, x3);\n let minY = Math.min(y0, y3);\n let maxX = Math.max(x0, x3);\n let maxY = Math.max(y0, y3);\n if(x1 < minX || y1 < minY || x1 > maxX || y1 > maxY || x2 < minX || y2 < minY || x2 > maxX || y2 > maxY) {\n let cx = -x0 + x1;\n let cy = -y0 + y1;\n let bx = x0 - 2 * x1 + x2;\n let by = y0 - 2 * y1 + y2;\n let ax = -x0 + 3 * x1 - 3 * x2 + x3;\n let ay = -y0 + 3 * y1 - 3 * y2 + y3;\n let hx = bx * bx - ax * cx;\n let hy = by * by - ay * cy;\n if(hx > 0) {\n hx = Math.sqrt(hx);\n let t = (-bx - hx) / ax;\n // 2次项系数为0注意降级为一元一次方程\n if(ax && t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * x0 + 3 * s * s * t * x1 + 3 * s * t * t * x2 + t * t * t * x3;\n minX = Math.min(minX, q);\n maxX = Math.max(maxX, q);\n }\n t = ax ? ((-bx + hx) / ax) : (-cx * 0.5 / bx);\n if(t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * x0 + 3 * s * s * t * x1 + 3 * s * t * t * x2 + t * t * t * x3;\n minX = Math.min(minX, q);\n maxX = Math.max(maxX, q);\n }\n }\n if(hy > 0) {\n hy = Math.sqrt(hy);\n let t = (-by - hy) / ay;\n if(ay && t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * y0 + 3 * s * s * t * y1 + 3 * s * t * t * y2 + t * t * t * y3;\n minY = Math.min(minY, q);\n maxY = Math.max(maxY, q);\n }\n t = ay ? ((-by + hy) / ay) : (-cy * 0.5 / by);\n if(t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * y0 + 3 * s * s * t * y1 + 3 * s * t * t * y2 + t * t * t * y3;\n minY = Math.min(minY, q);\n maxY = Math.max(maxY, q);\n }\n }\n }\n return [minX, minY, maxX, maxY];\n}\n\nfunction bboxBezier(x0, y0, x1, y1, x2, y2, x3, y3) {\n let len = arguments.length;\n if(Array.isArray(x0)) {\n let l = x0.length;\n let arr = x0;\n [x0, y0] = arr[0];\n [x1, y1] = arr[1];\n len = 4;\n if(l >= 3) {\n [x2, y2] = arr[2];\n len = 6;\n }\n if(l >= 4) {\n [x3, y3] = arr[3];\n len = 8;\n }\n }\n if(len === 4) {\n let a = Math.min(x0, x1);\n let b = Math.min(y0, y1);\n let c = Math.max(x0, x1);\n let d = Math.max(y0, y1);\n return [a, b, c, d];\n }\n if(len === 6) {\n return bboxBezier2(x0, y0, x1, y1, x2, y2);\n }\n if(len === 8) {\n return bboxBezier3(x0, y0, x1, y1, x2, y2, x3, y3);\n }\n}\n\n\n/**\n * 范数 or 模\n */\nfunction norm(v) {\n let order = v.length;\n let sum = v.reduce((a, b) => Math.pow(a, order) + Math.pow(b, order));\n return Math.pow(sum, 1 / order);\n}\n\n// https://zhuanlan.zhihu.com/p/130247362\nfunction simpson38(derivativeFunc, l, r) {\n let f = derivativeFunc;\n let middleL = (2 * l + r) / 3;\n let middleR = (l + 2 * r) / 3;\n return (f(l) + 3 * f(middleL) + 3 * f(middleR) + f(r)) * (r - l) / 8;\n}\n\n/**\n * bezier 曲线的长度\n * @param derivativeFunc 微分函数\n * @param l 左点\n * @param r 右点\n * @param eps 精度\n * @return {*} number\n */\nfunction adaptiveSimpson38(derivativeFunc, l, r, eps = 0.001) {\n let f = derivativeFunc;\n let mid = (l + r) / 2;\n let st = simpson38(f, l, r);\n let sl = simpson38(f, l, mid);\n let sr = simpson38(f, mid, r);\n let ans = sl + sr - st;\n if(Math.abs(ans) <= 15 * eps) {\n return sl + sr + ans / 15;\n }\n return adaptiveSimpson38(f, l, mid, eps / 2) + adaptiveSimpson38(f, mid, r, eps / 2);\n}\n\n/**\n * bezier 曲线的长度\n * @param points 曲线的起止点 和 控制点\n * @param startT 计算长度的起点,满足 0 <= startT <= endT <= 1\n * @param endT 计算长度的终点\n * @return {*} number\n */\nfunction bezierLength(points, startT = 0, endT = 1) {\n if(points.length === 6) {\n points = [\n [points[0], points[1]],\n [points[2], points[3]],\n [points[4], points[5]],\n ];\n }\n else if(points.length === 8) {\n points = [\n [points[0], points[1]],\n [points[2], points[3]],\n [points[4], points[5]],\n [points[6], points[7]],\n ];\n }\n if(points.length === 2) {\n let [x1, y1] = points[0], [x2, y2] = points[1];\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n }\n let derivativeFunc = t => norm(at(t, points));\n return adaptiveSimpson38(derivativeFunc, startT, endT);\n}\n\n/**\n * 3 阶 bezier 曲线的 order 阶导数在 t 位置时候的 (x, y) 的值\n */\nfunction at3(t, points, order = 1) {\n let [p0, p1, p2, p3] = points;\n let [x0, y0] = p0;\n let [x1, y1] = p1;\n let [x2, y2] = p2;\n let [x3, y3] = p3;\n let x = 0;\n let y = 0;\n // 3阶导数就是常数了,大于3阶的都是0\n if(order === 0) {\n x = Math.pow((1 - t), 3) * x0 + 3 * t * Math.pow((1 - t), 2) * x1 + 3 * (1 - t) * Math.pow(t, 2) * x2 + Math.pow(t, 3) * x3;\n y = Math.pow((1 - t), 3) * y0 + 3 * t * Math.pow((1 - t), 2) * y1 + 3 * (1 - t) * Math.pow(t, 2) * y2 + Math.pow(t, 3) * y3;\n }\n else if(order === 1) {\n x = 3 * ((1 - t) * (1 - t) * (x1 - x0) + 2 * (1 - t) * t * (x2 - x1) + t * t * (x3 - x2));\n y = 3 * ((1 - t) * (1 - t) * (y1 - y0) + 2 * (1 - t) * t * (y2 - y1) + t * t * (y3 - y2));\n }\n else if(order === 2) {\n x = 6 * (x2 - 2 * x1 + x0) * (1 - t) + 6 * (x3 - 2 * x2 + x1) * t;\n y = 6 * (y2 - 2 * y1 + y0) * (1 - t) + 6 * (y3 - 2 * y2 + y1) * t;\n }\n else if(order === 3) {\n x = 6 * (x3 - 3 * x2 + 3 * x1 - x0);\n y = 6 * (y3 - 3 * y2 + 3 * y1 - y0);\n }\n return [x, y];\n}\n\n/**\n * 2 阶 bezier 曲线的 order 阶导数在 t 位置时候的 (x, y) 的值\n */\nfunction at2(t, points, order = 1) {\n let [p0, p1, p2] = points;\n let [x0, y0] = p0;\n let [x1, y1] = p1;\n let [x2, y2] = p2;\n let x = 0;\n let y = 0;\n if(order === 0) {\n x = Math.pow((1 - t), 2) * x0 + 2 * t * (1 - t) * x1 + Math.pow(t, 2) * x2;\n y = Math.pow((1 - t), 2) * y0 + 2 * t * (1 - t) * y1 + Math.pow(t, 2) * y2;\n }\n else if(order === 1) {\n x = 2 * (1 - t) * (x1 - x0) + 2 * t * (x2 - x1);\n y = 2 * (1 - t) * (y1 - y0) + 2 * t * (y2 - y1);\n }\n else if(order === 2) {\n x = 2 * (x2 - 2 * x1 + x0);\n y = 2 * (y2 - 2 * y1 + y0);\n }\n return [x, y];\n}\n\nfunction at(t, points, derivativeOrder = 1) {\n if(points.length === 4) {\n return at3(t, points, derivativeOrder);\n }\n else if(points.length === 3) {\n return at2(t, points, derivativeOrder);\n }\n}\n\nfunction pointAtBezier(points, percent, maxIteration, eps) {\n let length = bezierLength(points, 0, 1);\n return pointAtBezierWithLength(points, length, percent, maxIteration, eps);\n}\n\nfunction pointAtBezierWithLength(points, length, percent = 1, maxIteration = 20, eps = 0.001) {\n let derivativeFunc = t => norm(at(t, points));\n let targetLen = length * percent;\n let approachLen = length;\n let approachT = percent;\n let preApproachT = approachT;\n for(let i = 0; i < maxIteration; i++) {\n approachLen = simpson38(derivativeFunc, 0, approachT);\n let d = approachLen - targetLen;\n if(Math.abs(d) < eps) {\n break;\n }\n // Newton 法\n let derivative1 = norm(at(approachT, points, 1)); // 1 阶导数\n let derivative2 = norm(at(approachT, points, 2)); // 2 阶导数\n let numerator = d * derivative1;\n let denominator = d * derivative2 + derivative1 * derivative1;\n approachT = approachT - numerator / denominator;\n if(Math.abs(approachT - preApproachT) < eps) {\n break;\n }\n else {\n preApproachT = approachT;\n }\n }\n return at(approachT, points, 0);\n}\n\nfunction sliceBezier(points, t) {\n let [[x1, y1], [x2, y2], [x3, y3], p4] = points;\n let x12 = (x2 - x1) * t + x1;\n let y12 = (y2 - y1) * t + y1;\n let x23 = (x3 - x2) * t + x2;\n let y23 = (y3 - y2) * t + y2;\n let x123 = (x23 - x12) * t + x12;\n let y123 = (y23 - y12) * t + y12;\n if(points.length === 4) {\n let [x4, y4] = p4;\n let x34 = (x4 - x3) * t + x3;\n let y34 = (y4 - y3) * t + y3;\n let x234 = (x34 - x23) * t + x23;\n let y234 = (y34 - y23) * t + y23;\n let x1234 = (x234 - x123) * t + x123;\n let y1234 = (y234 - y123) * t + y123;\n return [[x1, y1], [x12, y12], [x123, y123], [x1234, y1234]];\n }\n else if(points.length === 3) {\n return [[x1, y1], [x12, y12], [x123, y123]];\n }\n}\n\nfunction sliceBezier2Both(points, start = 0, end = 1) {\n start = Math.max(start, 0);\n end = Math.min(end, 1);\n if(start === 0 && end === 1) {\n return points;\n }\n if(end < 1) {\n points = sliceBezier(points, end);\n }\n if(start > 0) {\n if(end < 1) {\n start = start / end;\n }\n points = sliceBezier(points.slice(0).reverse(), (1 - start)).reverse();\n }\n return points;\n}\n\nfunction pointAtByT(points, t = 0) {\n if(points.length === 4) {\n return pointAtByT3(points, t);\n }\n else if(points.length === 3) {\n return pointAtByT2(points, t);\n }\n}\n\nfunction pointAtByT2(points, t) {\n let x = points[0][0] * (1 - t) * (1 - t)\n + 2 * points[1][0] * t * (1 - t)\n + points[2][0] * t * t;\n let y = points[0][1] * (1 - t) * (1 - t)\n + 2 * points[1][1] * t * (1 - t)\n + points[2][1] * t * t;\n return [x, y];\n}\n\nfunction pointAtByT3(points, t) {\n let x = points[0][0] * (1 - t) * (1 - t) * (1 - t)\n + 3 * points[1][0] * t * (1 - t) * (1 - t)\n + 3 * points[2][0] * t * t * (1 - t)\n + points[3][0] * t * t * t;\n let y = points[0][1] * (1 - t) * (1 - t) * (1 - t)\n + 3 * points[1][1] * t * (1 - t) * (1 - t)\n + 3 * points[2][1] * t * t * (1 - t)\n + points[3][1] * t * t * t;\n return [x, y];\n}\n\n// 已知曲线和上面一点获得t\nfunction getPointT(points, x, y) {\n if(points.length === 4) {\n return getPointT3(points, x, y);\n }\n else if(points.length === 3) {\n return getPointT2(points, x, y);\n }\n}\n\nfunction getPointT2(points, x, y) {\n // x/y都需要求,以免其中一个无解,过滤掉[0, 1]之外的\n let tx = equation.getRoots([\n points[0][0] - x,\n 2 * (points[1][0] - points[0][0]),\n points[2][0] + points[0][0] - 2 * points[1][0],\n ]).filter(i => i >= 0 && i <= 1);\n let ty = equation.getRoots([\n points[0][1] - y,\n 2 * (points[1][1] - points[0][1]),\n points[2][1] + points[0][1] - 2 * points[1][1],\n ]).filter(i => i >= 0 && i <= 1);\n // 可能有多个解,x和y要匹配上,这里最多x和y各2个总共4个解\n let t = [];\n for(let i = 0, len = tx.length; i < len; i++) {\n let x = tx[i];\n for(let j = 0, len = ty.length; j < len; j++) {\n let y = ty[j];\n let diff = Math.abs(x - y);\n // 必须小于一定误差\n if(diff < 1e-10) {\n t.push({\n x,\n y,\n diff,\n });\n }\n }\n }\n t.sort(function(a, b) {\n return a.diff - b.diff;\n });\n if(t.length > 2) {\n t.splice(2);\n }\n // 取均数\n t = t.map(item => (item.x + item.y) * 0.5);\n let res = [];\n t.forEach(t => {\n let xt = points[0][0] * Math.pow(1 - t, 2)\n + 2 * points[1][0] * t * (1 - t)\n + points[2][0] * t * t;\n let yt = points[0][1] * Math.pow(1 - t, 2)\n + 2 * points[1][1] * t * (1 - t)\n + points[2][1] * t * t;\n // 计算误差忽略\n if(Math.abs(xt - x) < 1e-10 && Math.abs(yt - y) < 1e-10) {\n res.push(t);\n }\n });\n return res;\n}\n\nfunction getPointT3(points, x, y) {\n let tx = equation.getRoots([\n points[0][0] - x,\n 3 * (points[1][0] - points[0][0]),\n 3 * (points[2][0] + points[0][0] - 2 * points[1][0]),\n points[3][0] - points[0][0] + 3 * points[1][0] - 3 * points[2][0],\n ]).filter(i => i >= 0 && i <= 1);\n let ty = equation.getRoots([\n points[0][1] - y,\n 3 * (points[1][1] - points[0][1]),\n 3 * (points[2][1] + points[0][1] - 2 * points[1][1]),\n points[3][1] - points[0][1] + 3 * points[1][1] - 3 * points[2][1],\n ]).filter(i => i >= 0 && i <= 1);\n // 可能有多个解,x和y要匹配上,这里最多x和y各3个总共9个解\n let t = [];\n for(let i = 0, len = tx.length; i < len; i++) {\n let x = tx[i];\n for(let j = 0, len = ty.length; j < len; j++) {\n let y = ty[j];\n let diff = Math.abs(x - y);\n // 必须小于一定误差\n if(diff < 1e-10) {\n t.push({\n x,\n y,\n diff,\n });\n }\n }\n }\n t.sort(function(a, b) {\n return a.diff - b.diff;\n });\n if(t.length > 3) {\n t.splice(3);\n }\n // 取均数\n t = t.map(item => (item.x + item.y) * 0.5);\n let res = [];\n t.forEach(t => {\n let xt = points[0][0] * Math.pow(1 - t, 3)\n + 3 * points[1][0] * t * Math.pow(1 - t, 2)\n + 3 * points[2][0] * t * t * (1 - t)\n + points[3][0] * Math.pow(t, 3);\n let yt = points[0][1] * Math.pow(1 - t, 3)\n + 3 * points[1][1] * t * Math.pow(1 - t, 2)\n + 3 * points[2][1] * t * t * (1 - t)\n + points[3][1] * Math.pow(t, 3);\n // 计算误差忽略\n if(Math.abs(xt - x) < 1e-10 && Math.abs(yt - y) < 1e-10) {\n res.push(t);\n }\n });\n return res;\n}\n\nfunction bezierSlope(points, t) {\n if(points.length === 2) {\n let [x1, y1] = points[0];\n let [x2, y2] = points[1];\n if(x1 === x2) {\n return Infinity;\n }\n return (y2 - y1) / (x2 - x1);\n }\n if(points.length === 3) {\n return bezier2Slope(points, t);\n }\n if(points.length === 4) {\n return bezier3Slope(points, t);\n }\n}\n\nfunction bezier2Slope(points, t) {\n let [\n [x0, y0],\n [x1, y1],\n [x2, y2],\n ] = points;\n let x = 2 * (x0 - 2 * x1 + x2) * t + 2 * x1 - 2 * x0;\n if(x === 0) {\n return Infinity;\n }\n return (2 * (y0 - 2 * y1 + y2) * t + 2 * y1 - 2 * y0) / x;\n}\n\nfunction bezier3Slope(points, t) {\n let [\n [x0, y0],\n [x1, y1],\n [x2, y2],\n [x3, y3],\n ] = points;\n let x = 3 * (-x0 + 3 * x1 - 3 * x2 + x3) * t * t\n + 2 * (3 * x0 - 6 * x1 + 3 * x2) * t\n + 3 * x1 - 3 * x0;\n if(x === 0) {\n return Infinity;\n }\n return (3 * (-y0 + 3 * y1 - 3 * y2 + y3) * t * t\n + 2 * (3 * y0 - 6 * y1 + 3 * y2) * t\n + 3 * y1 - 3 * y0) / x;\n}\n\nexport default {\n bboxBezier,\n bezierLength,\n pointAtBezier,\n pointAtBezierWithLength,\n sliceBezier,\n sliceBezier2Both,\n pointAtByT,\n getPointT,\n bezierSlope,\n};\n","import Geom from './Geom';\nimport mode from '../../refresh/mode';\nimport painter from '../../util/painter';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport bezier from '../../math/bezier';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n} } = enums;\nconst { isNil } = util;\n\nfunction reBuild(target, origin, base, isMulti) {\n if(isMulti) {\n return target.map(item => origin + item * base);\n }\n else {\n return origin + target * base;\n }\n}\n\nfunction reBuildC(target, originX, originY, width, height, isMulti) {\n if(isMulti) {\n if(target) {\n return target.map(item => reBuildC(item, originX, originY, width, height));\n }\n }\n else {\n if(target && target.length >= 2) {\n return [\n originX + target[0] * width,\n originY + target[1] * height,\n ];\n }\n }\n return [];\n}\n\nfunction curveNum(controlA, controlB) {\n let num = 0;\n if(controlA && controlA.length >= 2) {\n num++;\n }\n if(controlB && controlB.length >= 2) {\n num += 2;\n }\n return num;\n}\n\nfunction getNewPoint(xa, ya, xb, yb, controlA, controlB, num, start = 0, end = 1) {\n if(start === 0 && end === 1) {\n return [xa, ya, xb, yb, controlA, controlB];\n }\n if(start === end) {\n return [];\n }\n if(start > end) {\n [start, end] = [end, start];\n }\n start = Math.max(0, start);\n end = Math.min(1, end);\n if(num === 3) {\n [[xa, ya], controlA, controlB, [xb, yb]] = bezier.sliceBezier2Both([[xa, ya], controlA, controlB, [xb, yb]], start, end);\n }\n else if(num === 2) {\n [[xa, ya], controlB, [xb, yb]] = bezier.sliceBezier2Both([[xa, ya], controlB, [xb, yb]], start, end);\n }\n else if(num === 1) {\n [[xa, ya], controlA, [xb, yb]] = bezier.sliceBezier2Both([[xa, ya], controlA, [xb, yb]], start, end);\n }\n else {\n let a = xb - xa;\n let b = yb - ya;\n xa += a * start;\n ya += b * start;\n xb += a * (1 - end);\n yb += b * (1 - end);\n }\n return [xa, ya, xb, yb, controlA, controlB];\n}\n\nclass Line extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // xa,ya和xb,yb表明线段的首尾坐标,control表明控制点坐标\n if(this.isMulti) {\n this.__xa = [0];\n this.__ya = [0];\n this.__xb = [1];\n this.__yb = [1];\n this.__controlA = [[]];\n this.__controlB = [[]];\n this.__start = [0];\n this.__end = [1];\n if(Array.isArray(props.xa)) {\n this.__xa = props.xa.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.xa)) {\n this.__xa = [parseFloat(props.xa) || 0];\n }\n if(Array.isArray(props.ya)) {\n this.__ya = props.ya.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.ya)) {\n this.__ya = [parseFloat(props.ya) || 0];\n }\n if(Array.isArray(props.xb)) {\n this.__xb = props.xb.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.xb)) {\n this.__xb = [parseFloat(props.xb) || 0];\n }\n if(Array.isArray(props.yb)) {\n this.__yb = props.yb.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.yb)) {\n this.__yb = [parseFloat(props.yb) || 0];\n }\n if(Array.isArray(props.controlA)) {\n this.__controlA = props.controlA.map(item => {\n if(Array.isArray(item)) {\n return item;\n }\n return [];\n });\n }\n if(Array.isArray(props.controlB)) {\n this.__controlB = props.controlB.map(item => {\n if(Array.isArray(item)) {\n return item;\n }\n return [];\n });\n }\n if(Array.isArray(props.start)) {\n this.__start = props.start.map(i => parseFloat(i) || 0);\n for(let i = this.__start.length; i < this.__xa.length; i++) {\n this.__start.push(0);\n }\n }\n else if(!isNil(props.start)) {\n let v = parseFloat(props.start) || 0;\n this.__start = this.__xa.map(() => v);\n }\n if(Array.isArray(props.end)) {\n this.__end = props.end.map(i => {\n let v = parseFloat(i);\n if(isNaN(v)) {\n v = 1;\n }\n return v;\n });\n for(let i = this.__end.length; i < this.__xa.length; i++) {\n this.__end.push(1);\n }\n }\n else if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n this.__end = this.__xa.map(() => v);\n }\n }\n else {\n this.__xa = this.__ya = this.__start = 0;\n this.__xb = this.__yb = this.__end = 1;\n this.__controlA = [];\n this.__controlB = [];\n if(!isNil(props.xa)) {\n this.__xa = parseFloat(props.xa) || 0;\n }\n if(!isNil(props.ya)) {\n this.__ya = parseFloat(props.ya) || 0;\n }\n if(!isNil(props.xb)) {\n this.__xb = parseFloat(props.xb) || 0;\n }\n if(!isNil(props.yb)) {\n this.__yb = parseFloat(props.yb) || 0;\n }\n if(!isNil(props.start)) {\n this.__start = parseFloat(props.start) || 0;\n }\n if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n this.__end = v;\n }\n if(Array.isArray(props.controlA)) {\n this.__controlA = props.controlA;\n }\n if(Array.isArray(props.controlB)) {\n this.__controlB = props.controlB;\n }\n }\n }\n\n buildCache(originX, originY, focus) {\n let { width, height, __cacheProps, isMulti } = this;\n let rebuild;\n ['xa', 'xb'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = reBuild(this[k], originX, width, isMulti);\n }\n });\n ['ya', 'yb'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = reBuild(this[k], originY, height, isMulti);\n }\n });\n ['controlA', 'controlB'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = reBuildC(this[k], originX, originY, width, height, isMulti);\n }\n });\n ['start', 'end'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = this[k];\n }\n });\n return rebuild;\n }\n\n render(renderMode, ctx, dx2, dy2) {\n let res = super.render(renderMode, ctx, dx2, dy2);\n if(res.break || renderMode === mode.WEBGL) {\n return res;\n }\n let {\n x3,\n y3,\n stroke: strokes,\n strokeWidth: strokeWidths,\n strokeDasharray: strokeDasharrays,\n strokeDasharrayStr: strokeDasharrayStrs,\n strokeLinecap: strokeLinecaps,\n strokeLinejoin: strokeLinejoins,\n strokeMiterlimit: strokeMiterlimits,\n dx,\n dy,\n } = res;\n let { __cacheProps, isMulti } = this;\n let rebuild = this.buildCache(x3, y3);\n if(rebuild && renderMode === mode.SVG) {\n let d = '';\n if(isMulti) {\n __cacheProps.xa.forEach((xa, i) => {\n let xb = __cacheProps.xb[i];\n let ya = __cacheProps.ya[i];\n let yb = __cacheProps.yb[i];\n let ca = __cacheProps.controlA[i];\n let cb = __cacheProps.controlB[i];\n let start = __cacheProps.start[i];\n let end = __cacheProps.end[i];\n let curve = curveNum(ca, cb);\n if(start !== 0 || end !== 1) {\n [xa, ya, xb, ya, ca, cb] = getNewPoint(xa, ya, xb, ya, ca, cb, curve, start, end, __cacheProps.len);\n }\n d += painter.svgLine(xa, ya, xb, yb, ca, cb, curve);\n });\n }\n else {\n let curve = curveNum(__cacheProps.controlA, __cacheProps.controlB);\n let { xa, ya, xb, yb, controlA, controlB, start, end } = __cacheProps;\n if(start !== 0 || end !== 1) {\n [xa, ya, xb, yb, controlA, controlB] = getNewPoint(xa, ya, xb, yb, controlA, controlB, curve, start, end, __cacheProps.len);\n }\n d = painter.svgLine(xa, ya, xb, yb, controlA, controlB, curve);\n }\n __cacheProps.d = d;\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n strokes.forEach((stroke, i) => {\n let strokeWidth = strokeWidths[i];\n let isStrokeRE = strokeWidth > 0 && stroke.k === 'radial' && Array.isArray(stroke.v);\n if(strokeWidth > 0 && stroke !== 'none') {\n this.__preSetCanvas(renderMode, ctx, {\n stroke,\n strokeWidth,\n strokeDasharray: strokeDasharrays[i],\n strokeLinecap: strokeLinecaps[i],\n strokeLinejoin: strokeLinejoins[i],\n strokeMiterlimit: strokeMiterlimits[i],\n });\n if(isStrokeRE) {\n ctx.strokeStyle = stroke.v[0];\n }\n ctx.beginPath();\n if(isMulti) {\n __cacheProps.xa.forEach((xa, i) => {\n let xb = __cacheProps.xb[i];\n let ya = __cacheProps.ya[i];\n let yb = __cacheProps.yb[i];\n let ca = __cacheProps.controlA[i];\n let cb = __cacheProps.controlB[i];\n let start = __cacheProps.start[i];\n let end = __cacheProps.end[i];\n let curve = curveNum(ca, cb);\n if(start !== 0 || end !== 1) {\n [xa, ya, xb, ya, ca, cb] = getNewPoint(xa, ya, xb, ya, ca, cb, curve, start, end, __cacheProps.len);\n }\n painter.canvasLine(ctx, xa, ya, xb, yb, ca, cb, curve, dx, dy);\n });\n }\n else {\n let curve = curveNum(__cacheProps.controlA, __cacheProps.controlB);\n let { xa, ya, xb, yb, controlA, controlB, start, end } = __cacheProps;\n if(start !== 0 || end !== 1) {\n [xa, ya, xb, yb, controlA, controlB] = getNewPoint(xa, ya, xb, yb, controlA, controlB, curve, start, end, __cacheProps.len);\n }\n painter.canvasLine(ctx, xa, ya, xb, yb, controlA, controlB, curve, dx, dy);\n }\n ctx.stroke();\n ctx.closePath();\n }\n });\n }\n else if(renderMode === mode.SVG) {\n strokes.forEach((stroke, i) => {\n let strokeWidth = strokeWidths[i];\n let isStrokeRE = strokeWidth > 0 && stroke.k === 'radial' && Array.isArray(stroke.v);\n let props = [\n ['d', __cacheProps.d],\n ['fill', 'none'],\n ['stroke', isStrokeRE ? stroke.v[0] : (stroke.v || stroke)],\n ['stroke-width', strokeWidth]\n ];\n this.__propsStrokeStyle(props, strokeDasharrayStrs[i], strokeLinecaps[i], strokeLinejoins[i], strokeMiterlimits[i]);\n this.addGeom('path', props);\n });\n }\n return res;\n }\n\n get xa() {\n return this.getProps('xa');\n }\n\n get ya() {\n return this.getProps('ya');\n }\n\n get xb() {\n return this.getProps('xb');\n }\n\n get yb() {\n return this.getProps('yb');\n }\n\n get controlA() {\n return this.getProps('controlA');\n }\n\n get controlB() {\n return this.getProps('controlB');\n }\n\n get start() {\n return this.getProps('start');\n }\n\n get end() {\n return this.getProps('end');\n }\n\n get bbox() {\n let {\n isMulti, __cacheProps,\n __x3: originX, __y3: originY,\n computedStyle: {\n [STROKE_WIDTH]: strokeWidth,\n },\n } = this;\n this.buildCache(originX, originY);\n let { xa, ya, xb, yb, controlA, controlB } = __cacheProps;\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(half, item);\n });\n half = Math.ceil(half * 0.5) + 1;\n if(!isMulti) {\n xa = [xa];\n xb = [xb];\n ya = [ya];\n yb = [yb];\n controlA = [controlA];\n controlB = [controlB];\n }\n xa.forEach((xa, i) => {\n let y1 = ya[i];\n let x2 = xb[i];\n let y2 = yb[i];\n let ca = controlA[i];\n let cb = controlB[i];\n if((isNil(ca) || ca.length < 2) && (isNil(cb) || cb.length < 2)) {\n bbox[0] = Math.min(bbox[0], xa - half);\n bbox[0] = Math.min(bbox[0], x2 - half);\n bbox[1] = Math.min(bbox[1], y1 - half);\n bbox[1] = Math.min(bbox[1], y2 - half);\n bbox[2] = Math.max(bbox[2], xa + half);\n bbox[2] = Math.max(bbox[2], x2 + half);\n bbox[3] = Math.max(bbox[3], y1 + half);\n bbox[3] = Math.max(bbox[3], y2 + half);\n }\n else if(isNil(ca) || ca.length < 2) {\n let bezierBox = bezier.bboxBezier(xa, y1, cb[0], cb[1], x2, y2);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - half);\n bbox[0] = Math.min(bbox[0], bezierBox[2] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[3] - half);\n bbox[2] = Math.max(bbox[2], bezierBox[0] + half);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[1] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + half);\n }\n else if(isNil(cb) || cb.length < 2) {\n let bezierBox = bezier.bboxBezier(xa, y1, ca[0], ca[1], x2, y2);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - half);\n bbox[0] = Math.min(bbox[0], bezierBox[2] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[3] - half);\n bbox[2] = Math.max(bbox[2], bezierBox[0] + half);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[1] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + half);\n }\n else {\n let bezierBox = bezier.bboxBezier(xa, y1, ca[0], ca[1], cb[0], cb[1], x2, y2);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - half);\n bbox[0] = Math.min(bbox[0], bezierBox[2] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[3] - half);\n bbox[2] = Math.max(bbox[2], bezierBox[0] + half);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[1] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + half);\n }\n });\n return bbox;\n }\n}\n\nexport default Line;\n","class Point {\n constructor(x, y) {\n if(Array.isArray(x)) {\n [x, y] = x;\n }\n this.x = x;\n this.y = y;\n }\n\n toString() {\n // return this.x.toFixed(1).replace('.0', '') + ',' + this.y.toFixed(1).replace('.0', '');\n return this.x + ',' + this.y;\n }\n\n equal(o) {\n return this === o || this.x === o.x && this.y === o.y;\n }\n\n // 排序,要求a在b左即x更小,x相等a在b下,符合返回false,不符合则true\n static compare(a, b) {\n if(a.x > b.x) {\n return true;\n }\n return a.x === b.x && a.y > b.y;\n }\n}\n\nexport default Point;\n","import bezier from '../bezier';\n\nclass Segment {\n constructor(coords, belong) {\n this.coords = coords;\n this.belong = belong; // 属于source多边形还是clip多边形,0和1区别\n this.calBbox();\n this.myFill = [false, false]; // 自己的上下内外性\n this.otherFill = [false, false]; // 对方的上下内外性\n this.myCoincide = 0; // 自己重合次数\n this.otherCoincide = 0; // 对方重合次数\n this.isVisited = false; // 扫描求交时用到\n this.isDeleted = false; // 相交裁剪老的线段会被删除\n }\n\n calBbox() {\n let coords = this.coords, l = coords.length;\n if(l === 2) {\n let a = coords[0], b = coords[1];\n let x1 = Math.min(a.x, b.x);\n let y1 = Math.min(a.y, b.y);\n let x2 = Math.max(a.x, b.x);\n let y2 = Math.max(a.y, b.y);\n this.bbox = [x1, y1, x2, y2];\n }\n else {\n let arr = coords.map(item => [item.x, item.y]);\n this.bbox = bezier.bboxBezier(arr);\n }\n }\n\n // 线段边逆序\n reverse() {\n this.coords.reverse();\n }\n\n equal(o) {\n let ca = this.coords, cb = o.coords;\n if(ca.length !== cb.length) {\n return false;\n }\n for(let i = 0, len = ca.length; i < len; i++) {\n if(!ca[i].equal(cb[i])) {\n return false;\n }\n }\n return true;\n }\n\n toHash() {\n return this.coords.map(item => item.toString()).join(' ');\n }\n\n toString() {\n return this.toHash()\n + ' ' + this.belong\n + ' ' + this.myCoincide\n + '' + this.otherCoincide\n + ' ' + this.myFill.map(i => i ? 1 : 0).join('')\n + this.otherFill.map(i => i ? 1 : 0).join('');\n }\n}\n\nexport default Segment;\n","import Point from './Point';\nimport isec from '../isec';\nimport bezier from '../bezier';\n\nconst EPS = 1e-9;\nconst EPS2 = 1 - (1e-9);\n\nfunction getIntersectionLineLine(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2, d) {\n let toSource = (\n (bx2 - bx1) * (ay1 - by1) - (by2 - by1) * (ax1 - bx1)\n ) / d;\n let toClip = (\n (ax2 - ax1) * (ay1 - by1) - (ay2 - ay1) * (ax1 - bx1)\n ) / d;\n // 非顶点相交才是真相交\n if(toSource > EPS && toSource < EPS2 && toClip > EPS && toClip < EPS2) {\n let ox = ax1 + toSource * (ax2 - ax1);\n let oy = ay1 + toSource * (ay2 - ay1);\n return [{\n point: new Point(ox, oy),\n toSource,\n toClip,\n }];\n }\n}\n\nfunction getIntersectionBezier2Line(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2) {\n let res = isec.intersectBezier2Line(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2);\n if(res.length) {\n res = res.map(item => {\n let toClip;\n // toClip是直线上的距离,可以简化为只看x或y,选择差值比较大的防止精度问题\n if(Math.abs(bx2 - bx1) >= Math.abs(by2 - by1)) {\n toClip = Math.abs((item.x - bx1) / (bx2 - bx1));\n }\n else {\n toClip = Math.abs((item.y - by1) / (by2 - by1));\n }\n if(item.t > EPS && item.t < EPS2 && toClip > EPS && toClip < EPS2) {\n // 还要判断斜率,相等也忽略(小于一定误差)\n let k1 = bezier.bezierSlope([\n [ax1, ay1],\n [ax2, ay2],\n [ax3, ay3],\n ], item.t);\n let k2 = bezier.bezierSlope([[bx1, by1], [bx2, by2]]);\n // 忽略方向,180°也是平行,Infinity相减为NaN\n if(Math.abs((Math.abs(k1) - Math.abs(k2)) || 0) < EPS) {\n return;\n }\n return {\n point: new Point(item.x, item.y),\n toSource: item.t, // source是曲线直接用t\n toClip,\n };\n }\n }).filter(i => i);\n if(res.length) {\n return res;\n }\n }\n}\n\nfunction getIntersectionBezier2Bezier2(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2, bx3, by3) {\n let res = isec.intersectBezier2Bezier2(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2, bx3, by3);\n if(res.length) {\n res = res.map(item => {\n // toClip是另一条曲线的距离,需根据交点和曲线方程求t\n let toClip = bezier.getPointT([\n [bx1, by1],\n [bx2, by2],\n [bx3, by3],\n ], item.x, item.y);\n // 防止误差无值\n if(toClip.length) {\n toClip = toClip[0];\n if(item.t > EPS && item.t < EPS2 && toClip > EPS && toClip < EPS2) {\n // 还要判断斜率,相等也忽略(小于一定误差)\n let k1 = bezier.bezierSlope([\n [ax1, ay1],\n [ax2, ay2],\n [ax3, ay3],\n ], item.t);\n let k2 = bezier.bezierSlope([\n [bx1, by1],\n [bx2, by2],\n [bx3, by3],\n ], toClip);\n // 忽略方向,180°也是平行,Infinity相减为NaN\n if(Math.abs((Math.abs(k1) - Math.abs(k2)) || 0) < EPS) {\n return;\n }\n return {\n point: new Point(item.x, item.y),\n toSource: item.t, // source是曲线直接用t\n toClip,\n };\n }\n }\n }).filter(i => i);\n if(res.length) {\n return res;\n }\n }\n}\n\nfunction getIntersectionBezier2Bezier3(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2, bx3, by3, bx4, by4) {\n\n let res = isec.intersectBezier2Bezier3(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2, bx3, by3, bx4, by4);\n if(res.length) {\n res = res.map(item => {\n // toClip是另一条曲线的距离,需根据交点和曲线方程求t\n let toClip = bezier.getPointT([\n [bx1, by1],\n [bx2, by2],\n [bx3, by3],\n [bx4, by4],\n ], item.x, item.y);\n // 防止误差无值\n if(toClip.length) {\n toClip = toClip[0];\n if(item.t > EPS && item.t < EPS2 && toClip > EPS && toClip < EPS2) {\n // 还要判断斜率,相等也忽略(小于一定误差)\n let k1 = bezier.bezierSlope([\n [ax1, ay1],\n [ax2, ay2],\n [ax3, ay3],\n ], item.t);\n let k2 = bezier.bezierSlope([\n [bx1, by1],\n [bx2, by2],\n [bx3, by3],\n [bx4, by4],\n ], toClip);\n // 忽略方向,180°也是平行,Infinity相减为NaN\n if(Math.abs((Math.abs(k1) - Math.abs(k2)) || 0) < EPS) {\n return;\n }\n return {\n point: new Point(item.x, item.y),\n toSource: item.t, // source是曲线直接用t\n toClip: toClip,\n };\n }\n }\n }).filter(i => i);\n if(res.length) {\n return res;\n }\n }\n}\n\nfunction getIntersectionBezier3Line(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4,\n bx1, by1, bx2, by2) {\n let res = isec.intersectBezier3Line(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4,\n bx1, by1, bx2, by2);\n if(res.length) {\n res = res.map(item => {\n // toClip是直线上的距离,可以简化为只看x或y,选择差值比较大的防止精度问题\n let toClip;\n if(Math.abs(bx2 - bx1) >= Math.abs(by2 - by1)) {\n toClip = Math.abs((item.x - bx1) / (bx2 - bx1));\n }\n else {\n toClip = Math.abs((item.y - by1) / (by2 - by1));\n }\n if(item.t > EPS && item.t < EPS2 && toClip > EPS && toClip < EPS2) {\n // 还要判断斜率,相等也忽略(小于一定误差)\n let k1 = bezier.bezierSlope([\n [ax1, ay1],\n [ax2, ay2],\n [ax3, ay3],\n [ax4, ay4],\n ], item.t);\n let k2 = bezier.bezierSlope([\n [bx1, by1],\n [bx2, by2],\n ]);\n // 忽略方向,180°也是平行,Infinity相减为NaN\n if(Math.abs((Math.abs(k1) - Math.abs(k2)) || 0) < EPS) {\n return;\n }\n return {\n point: new Point(item.x, item.y),\n toSource: item.t, // source是曲线直接用t\n toClip,\n };\n }\n }).filter(i => i);\n if(res.length) {\n return res;\n }\n }\n}\n\nfunction getIntersectionBezier3Bezier3(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4,\n bx1, by1, bx2, by2, bx3, by3, bx4, by4) {\n let res = isec.intersectBezier3Bezier3(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4,\n bx1, by1, bx2, by2, bx3, by3, bx4, by4);\n if(res.length) {\n res = res.map(item => {\n // toClip是另一条曲线的距离,需根据交点和曲线方程求t\n let toClip = bezier.getPointT([\n [bx1, by1],\n [bx2, by2],\n [bx3, by3],\n [bx4, by4],\n ], item.x, item.y);\n // 防止误差无值\n if(toClip.length) {\n toClip = toClip[0];\n if(item.t > EPS && item.t < EPS2 && toClip > EPS && toClip < EPS2) {\n // 还要判断斜率,相等也忽略(小于一定误差)\n let k1 = bezier.bezierSlope([\n [ax1, ay1],\n [ax2, ay2],\n [ax3, ay3],\n [ax4, ay4],\n ], item.t);\n let k2 = bezier.bezierSlope([\n [bx1, by1],\n [bx2, by2],\n [bx3, by3],\n [bx4, by4],\n ], toClip);\n // 忽略方向,180°也是平行,Infinity相减为NaN\n if(Math.abs((Math.abs(k1) - Math.abs(k2)) || 0) < EPS) {\n return;\n }\n return {\n point: new Point(item.x, item.y),\n toSource: item.t, // source是曲线直接用t\n toClip: toClip,\n };\n }\n }\n }).filter(i => i);\n if(res.length) {\n return res;\n }\n }\n}\n\n// 两条线可能多个交点,将交点按原本线段的方向顺序排序\nfunction sortIntersection(res, isSource) {\n return res.sort(function(a, b) {\n if(isSource) {\n return a.toSource - b.toSource;\n }\n return a.toClip - b.toClip;\n }).map(item => {\n return {\n point: item.point,\n t: isSource ? item.toSource : item.toClip,\n };\n }).filter(item => item.t > EPS && item.t < EPS2);\n}\n\nexport default {\n getIntersectionLineLine,\n getIntersectionBezier2Line,\n getIntersectionBezier2Bezier2,\n getIntersectionBezier2Bezier3,\n getIntersectionBezier3Line,\n getIntersectionBezier3Bezier3,\n sortIntersection,\n};\n","import geom from '../geom';\nimport vector from '../vector';\nimport bezier from '../bezier';\nimport equation from '../equation';\nimport Point from './Point';\nimport Segment from './Segment';\nimport intersect from './intersect';\n\nconst {\n getIntersectionLineLine,\n getIntersectionBezier2Line,\n getIntersectionBezier2Bezier2,\n getIntersectionBezier2Bezier3,\n getIntersectionBezier3Line,\n getIntersectionBezier3Bezier3,\n sortIntersection,\n} = intersect;\n\nclass Polygon {\n constructor(regions, index) {\n this.index = index; // 属于source多边形还是clip多边形,0和1区别\n let segments = [];\n // 多边形有>=1个区域,一般是1个\n if(!Array.isArray(regions)) {\n return;\n }\n regions.forEach(vertices => {\n // 每个区域有>=2条线段,组成封闭区域,1条肯定不行,2条必须是曲线\n if(!Array.isArray(vertices) || vertices.length < 2) {\n return;\n }\n if(vertices.length === 2 && vertices[1].length <= 2) {\n return;\n }\n let startPoint = new Point(vertices[0]), firstPoint = startPoint;\n // 根据多边形有向边,生成线段,不保持原有向,统一左下作为线段起点,如果翻转则记录个值标明\n for(let i = 1, len = vertices.length; i < len; i++) {\n let curr = vertices[i], l = curr.length;\n // 闭合区域,首尾顶点重复统一\n let endPoint = new Point(curr[l - 2], curr[l - 1]);\n let seg;\n if(l === 2) {\n // 长度为0的直线忽略\n if(startPoint.equal(endPoint)) {\n continue;\n }\n let coords = Point.compare(startPoint, endPoint) ? [\n endPoint,\n startPoint,\n ] : [\n startPoint,\n endPoint,\n ];\n seg = new Segment(coords, index);\n }\n // 曲线需确保x单调性,如果非单调,则切割为单调的多条\n else if(l === 4) {\n // 长度为0的曲线忽略\n if(startPoint.equal(endPoint) && startPoint.x === curr[0] && startPoint.y === curr[1]) {\n continue;\n }\n let cPoint = new Point(curr[0], curr[1]);\n let t = getBezierMonotonicity([startPoint, cPoint, endPoint], true);\n if(t) {\n let points = [\n [startPoint.x, startPoint.y],\n [curr[0], curr[1]],\n [endPoint.x, endPoint.y],\n ];\n let curve1 = bezier.sliceBezier(points, t[0]);\n let curve2 = bezier.sliceBezier2Both(points, t[0], 1);\n let p1 = new Point(curve1[1]), p2 = new Point(curve1[2]), p3 = new Point(curve2[1]);\n let coords = Point.compare(startPoint, p2) ? [\n p2,\n p1,\n startPoint,\n ] : [\n startPoint,\n p1,\n p2,\n ];\n segments.push(new Segment(coords, index));\n coords = Point.compare(p2, endPoint) ? [\n endPoint,\n p3,\n p2,\n ] : [\n p2,\n p3,\n endPoint,\n ];\n seg = new Segment(coords, index);\n }\n else {\n let coords = Point.compare(startPoint, endPoint) ? [\n endPoint,\n cPoint,\n startPoint,\n ] : [\n startPoint,\n cPoint,\n endPoint,\n ];\n seg = new Segment(coords, index);\n }\n }\n // 3阶可能有2个单调改变t点\n else if(l === 6) {\n // 降级为2阶曲线\n if(curr[0] === curr[2] && curr[1] === curr[3]) {\n curr.splice(2, 2);\n i--;\n continue;\n }\n // 长度为0的曲线忽略\n if(startPoint.equal(endPoint)\n && startPoint.x === curr[0] && startPoint.y === curr[1]\n && startPoint.x === curr[2] && startPoint.y === curr[3]) {\n continue;\n }\n let cPoint1 = new Point(curr[0], curr[1]), cPoint2 = new Point(curr[2], curr[3]);\n let t = getBezierMonotonicity([startPoint, cPoint1, cPoint2, endPoint], true);\n if(t) {\n let points = [\n [startPoint.x, startPoint.y],\n [curr[0], curr[1]],\n [curr[2], curr[3]],\n [endPoint.x, endPoint.y],\n ];\n let lastPoint = startPoint, lastT = 0;\n t.forEach(t => {\n let curve = bezier.sliceBezier2Both(points, lastT, t);\n let p1 = new Point(curve[1]), p2 = new Point(curve[2]), p3 = new Point(curve[3]);\n let coords = Point.compare(lastPoint, p3) ? [\n p3,\n p2,\n p1,\n lastPoint,\n ] : [\n lastPoint,\n p1,\n p2,\n p3,\n ];\n segments.push(new Segment(coords, index));\n lastT = t;\n lastPoint = p3;\n });\n let curve = bezier.sliceBezier2Both(points, lastT, 1);\n let p1 = new Point(curve[1]), p2 = new Point(curve[2]);\n let coords = Point.compare(lastPoint, endPoint) ? [\n endPoint,\n p2,\n p1,\n lastPoint,\n ] : [\n lastPoint,\n p1,\n p2,\n endPoint,\n ];\n seg = new Segment(coords, index);\n }\n else {\n let coords = Point.compare(startPoint, endPoint) ? [\n endPoint,\n cPoint2,\n cPoint1,\n startPoint,\n ] : [\n startPoint,\n cPoint1,\n cPoint2,\n endPoint,\n ];\n seg = new Segment(coords, index);\n }\n }\n segments.push(seg);\n // 终点是下条边的起点\n startPoint = endPoint;\n }\n // 强制要求闭合,非闭合自动连直线到开始点闭合\n if(!startPoint.equal(firstPoint)) {\n let coords = Point.compare(startPoint, firstPoint) ? [\n firstPoint,\n startPoint,\n ] : [\n startPoint,\n firstPoint,\n ];\n segments.push(new Segment(coords, index));\n }\n });\n this.segments = segments;\n }\n\n // 根据y坐标排序,生成有序线段列表,再扫描求交\n selfIntersect() {\n let list = genHashXList(this.segments);\n this.segments = findIntersection(list, false, false, false);\n }\n\n toString() {\n return this.segments.map(item => item.toString());\n }\n\n reset(index) {\n this.index = index;\n this.segments.forEach(seg => {\n seg.belong = index;\n seg.otherCoincide = 0;\n seg.otherFill[0] = seg.otherFill[1] = false;\n });\n return this;\n }\n\n // 2个非自交的多边形互相判断相交,依旧是扫描线算法,2个多边形统一y排序,但要分别出属于哪个多边形,因为只和对方测试相交\n static intersect2(polyA, polyB, isIntermediateA, isIntermediateB) {\n if(!polyA.segments.length || !polyB.segments.length) {\n return;\n }\n\n let list = genHashXList(polyA.segments.concat(polyB.segments));\n let segments = findIntersection(list, true, isIntermediateA, isIntermediateB);\n polyA.segments = segments.filter(item => item.belong === 0);\n polyB.segments = segments.filter(item => item.belong === 1);\n }\n\n /**\n * 以Bentley-Ottmann算法为原理,为每个顶点设计事件,按x升序、y升序遍历所有顶点的事件\n * 每条线段边有2个顶点即2个事件,左下为start,右上为end\n * 同顶点优先end,start相同则对比线段谁后面的y更小(向量法),其实就是对比非共点部分的y大小\n * 维护一个活跃边列表ael,同样保证x升序、y升序,start事件线段进入ael,end离开\n * ael中相邻的线段说明上下相互接壤,接壤一侧则内外填充性一致\n * 最下面的边(含第一条)可直接得知下方填充性(下面没有了一定是多边形外部),再推测出上方\n * 其余的边根据自己下方相邻即可确定填充性\n */\n static annotate2(polyA, polyB, isIntermediateA, isIntermediateB) {\n let list = genHashXYList(polyA.segments.concat(polyB.segments));\n let aelA = [], aelB = [], hashA = {}, hashB = {};\n // 算法3遍循环,先注释a多边形的边自己内外性,再b的边自己内外性,最后一起注释对方的内外性\n // 因数据结构合在一起,所以2遍循环可以完成,先注释a和b的自己,再一遍对方\n list.forEach(item => {\n let { isStart, seg } = item;\n let belong = seg.belong;\n // 连续操作时,已有的中间结果可以跳过\n if(belong === 0 && isIntermediateA || belong === 1 && isIntermediateB) {\n return;\n }\n let ael = belong === 0 ? aelA : aelB, hash = belong === 0 ? hashA : hashB;\n if(isStart) {\n // 自己重合的线段只考虑第一条,其它剔除\n if(seg.myCoincide) {\n let hc = seg.toHash();\n if(hash.hasOwnProperty(hc)) {\n return;\n }\n hash[hc] = true;\n }\n // console.error(seg.toString(), ael.length)\n // 下面没有线段了,底部边,上方填充下方空白(除非是偶次重复段,上下都空白,奇次和单线相同)\n if(!ael.length) {\n if(seg.myCoincide) {\n seg.myFill[0] = seg.myCoincide % 2 === 0;\n }\n else {\n seg.myFill[0] = true;\n }\n ael.push(seg);\n }\n else {\n // 插入到ael正确的位置,按照x升序、y升序\n let len = ael.length, top = ael[len - 1];\n let isAboveLast = segAboveCompare(seg, top);\n // 比ael栈顶还高在最上方\n if(isAboveLast) {\n seg.myFill[1] = top.myFill[0];\n if(seg.myCoincide) {\n seg.myFill[0] = seg.myCoincide % 2 === 0 ? !seg.myFill[1] : seg.myFill[1];\n }\n else {\n seg.myFill[0] = !seg.myFill[1];\n }\n ael.push(seg);\n }\n // 不高且只有1个则在最下方\n else if(len === 1) {\n if(seg.myCoincide) {\n seg.myFill[0] = seg.myCoincide % 2 === 0;\n }\n else {\n seg.myFill[0] = true;\n }\n ael.unshift(seg);\n }\n else {\n // 遍历,尝试对比是否在ael栈中相邻2条线段之间\n for(let i = len - 2; i >= 0; i--) {\n let curr = ael[i];\n let isAbove = segAboveCompare(seg, curr);\n if(isAbove) {\n seg.myFill[1] = curr.myFill[0];\n if(seg.myCoincide) {\n seg.myFill[0] = seg.myCoincide % 2 === 0 ? !seg.myFill[1] : seg.myFill[1];\n }\n else {\n seg.myFill[0] = !seg.myFill[1];\n }\n ael.splice(i + 1, 0, seg);\n break;\n }\n else if(i === 0) {\n if(seg.myCoincide) {\n seg.myFill[0] = seg.myCoincide % 2 === 0;\n }\n else {\n seg.myFill[0] = true;\n }\n ael.unshift(seg);\n }\n }\n }\n }\n // console.warn(seg.toString())\n }\n else {\n let i = ael.indexOf(seg);\n // 一般肯定有,重合线段会剔除不进ael\n if(i > -1) {\n ael.splice(i, 1);\n }\n }\n });\n // 注释对方,除了重合线直接使用双方各自的注释拼接,普通线两边的对方内外性相同,根据是否在里面inside确定结果\n // inside依旧看自己下方的线段上方情况,不同的是要看下方的线和自己belong是否相同,再确定取下方above的值\n let ael = [], hash = {};\n list.forEach(item => {\n let { isStart, seg } = item;\n let belong = seg.belong;\n if(isStart) {\n // 自重合或者它重合统一只保留第一条线\n if(seg.myCoincide || seg.otherCoincide) {\n let hc = seg.toHash();\n if(hash.hasOwnProperty(hc)) {\n return;\n }\n hash[hc] = true;\n }\n // console.error(seg.toString(), ael.length)\n let inside = false;\n if(!ael.length) {\n inside = false;\n ael.push(seg);\n }\n else {\n let len = ael.length, top = ael[len - 1];\n let isAboveLast = segAboveCompare(seg, top);\n if(isAboveLast) {\n if(top.belong === belong) {\n inside = top.otherFill[0];\n }\n else {\n inside = top.myFill[0];\n }\n ael.push(seg);\n }\n else if(len === 1) {\n // inside = false;\n ael.unshift(seg);\n }\n else {\n for(let i = len - 2; i >= 0; i--) {\n let curr = ael[i];\n let isAbove = segAboveCompare(seg, curr);\n if(isAbove) {\n // 如果在自己的下方线和自己同色,则取下方线的另外色上填充\n if(curr.belong === belong) {\n inside = curr.otherFill[0];\n }\n // 否则取下方线的下方色上填充\n else {\n inside = curr.myFill[0];\n }\n ael.splice(i + 1, 0, seg);\n break;\n }\n else if(i === 0) {\n // inside = false;\n ael.unshift(seg);\n }\n }\n }\n }\n // 重合线的otherFill直接引用指向对方myFill,不能普通计算\n if(!seg.otherCoincide) {\n seg.otherFill[0] = inside;\n seg.otherFill[1] = inside;\n }\n // console.warn(seg.toString(), inside)\n }\n else {\n let i = ael.indexOf(seg);\n if(i > -1) {\n ael.splice(i, 1);\n }\n }\n });\n }\n}\n\nfunction findIntersection(list, compareBelong, isIntermediateA, isIntermediateB) {\n // 从左到右扫描,按x坐标排序,相等按y,边会进入和离开扫描线各1次,在扫描线中的边为活跃边,维护1个活跃边列表,新添加的和老的求交\n let ael = [], delList = [], segments = [];\n while(list.length) {\n if(delList.length) {\n delList.splice(0).forEach(seg => {\n let i = ael.indexOf(seg);\n ael.splice(i, 1);\n if(!seg.isDeleted) {\n segments.push(seg);\n }\n });\n }\n\n let { x, arr } = list[0];\n while(arr.length) {\n let seg = arr.shift();\n // 被切割的老线段无效\n if(seg.isDeleted) {\n continue;\n }\n let belong = seg.belong, bboxA = seg.bbox;\n // 第2次访问边是离开活动,考虑删除\n if(seg.isVisited) {\n // console.warn(x, seg.toString());\n // console.log(ael.map(item => item.toString()));\n // 可能是垂线不能立刻删除,所以等到下次活动x再删除,因为会出现极端情况刚进来就出去,和后面同y的重合\n if(bboxA[0] !== bboxA[2] || seg.coords.length !== 2) {\n let i = ael.indexOf(seg);\n ael.splice(i, 1);\n if(!seg.isDeleted) {\n segments.push(seg);\n }\n }\n else {\n delList.push(seg);\n }\n seg.isVisited = false; // 还原以备后面逻辑重复利用\n // console.log(ael.map(item => item.toString()));\n }\n // 第1次访问边一定是进入活动,求交\n else {\n // console.error(x, seg.toString(), ael.length);\n // console.log(ael.map(item => item.toString()));\n // 和asl里的边求交,如果被分割,新生成的存入asl和hash,老的线段无需再进入asl\n if(ael.length) {\n let coordsA = seg.coords, lenA = coordsA.length;\n let { x: ax1, y: ay1 } = coordsA[0];\n let { x: ax2, y: ay2 } = coordsA[1];\n for(let i = 0; i < ael.length; i++) {\n let item = ael[i];\n // 被切割的老线段无效,注意seg切割过程中可能变成删除\n if(item.isDeleted || seg.isDeleted) {\n continue;\n }\n // 互交所属belong不同才进行检测,自交则不检查belong\n if(compareBelong && item.belong === belong) {\n continue;\n }\n // bbox相交才考虑真正计算,加速\n let bboxB = item.bbox, coordsB = item.coords, lenB = coordsB.length;\n let isSourceReverted = false; // 求交可能a、b线主从互换\n if(isRectsOverlap(bboxA, bboxB, lenA, lenB)) {\n // 完全重合简化,同矩形的线myFill共享,对方矩形互换otherFill\n if(lenA === lenB && seg.equal(item)) {\n if(compareBelong) {\n // 因为一定不自交,所以重合线不会被分割\n seg.otherCoincide++;\n item.otherCoincide++;\n seg.otherFill = item.myFill;\n item.otherFill = seg.myFill;\n }\n else {\n seg.myCoincide++;\n item.myCoincide++;\n seg.myFill = item.myFill;\n }\n continue;\n }\n let { x: bx1, y: by1 } = coordsB[0];\n let { x: bx2, y: by2 } = coordsB[1];\n let inters, overs;\n // a是直线\n if(lenA === 2) {\n // b是直线\n if(lenB === 2) {\n let d = (by2 - by1) * (ax2 - ax1) - (bx2 - bx1) * (ay2 - ay1);\n // 平行检查是否重合,否则求交\n if(d === 0) {\n // 垂线特殊,y=kx+b没法求\n if(ax1 === ax2) {\n if(ax1 === bx1 && ax2 === bx2) {\n overs = checkOverlapLine(ax1, ay1, ax2, ay2, seg,\n bx1, by1, bx2, by2, item, true);\n }\n }\n else {\n let b1 = (ay2 - ay1) * ax1 / (ax2 - ax1) + ay1;\n let b2 = (by2 - by1) * bx1 / (bx2 - bx1) + by1;\n if(b1 === b2) {\n overs = checkOverlapLine(ax1, ay1, ax2, ay2, seg,\n bx1, by1, bx2, by2, item, false);\n }\n }\n }\n else {\n inters = getIntersectionLineLine(ax1, ay1, ax2, ay2,\n bx1, by1, bx2, by2, d);\n }\n }\n // b是曲线\n else {\n let { x: bx3, y: by3 } = coordsB[2];\n // b是2阶曲线\n if(lenB === 3) {\n inters = getIntersectionBezier2Line(bx1, by1, bx2, by2, bx3, by3,\n ax1, ay1, ax2, ay2);\n isSourceReverted = true;\n }\n // b是3阶曲线\n else {\n let { x: bx4, y: by4 } = coordsB[3];\n inters = getIntersectionBezier3Line(bx1, by1, bx2, by2, bx3, by3, bx4, by4,\n ax1, ay1, ax2, ay2);\n isSourceReverted = true;\n }\n }\n }\n // a是曲线\n else {\n let { x: ax3, y: ay3 } = coordsA[2];\n // a是2阶曲线\n if(lenA === 3) {\n // b是直线\n if(lenB === 2) {\n inters = getIntersectionBezier2Line(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2);\n }\n // b是曲线\n else {\n let { x: bx3, y: by3 } = coordsB[2];\n // b是2阶曲线\n if(lenB === 3) {\n inters = getIntersectionBezier2Bezier2(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2, bx3, by3);\n if(!inters) {\n overs = checkOverlapBezier(seg, item);\n }\n }\n // b是3阶曲线\n else {\n let { x: bx4, y: by4 } = coordsB[3];\n inters = getIntersectionBezier2Bezier3(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2, bx3, by3, bx4, by4);\n }\n }\n }\n // a是3阶曲线\n else {\n let { x: ax4, y: ay4 } = coordsA[3];\n // b是直线\n if(lenB === 2) {\n inters = getIntersectionBezier3Line(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4,\n bx1, by1, bx2, by2);\n }\n // b是曲线\n else {\n let { x: bx3, y: by3 } = coordsB[2];\n // b是2阶曲线\n if(lenB === 3) {\n inters = getIntersectionBezier2Bezier3(bx1, by1, bx2, by2, bx3, by3,\n ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4);\n isSourceReverted = true;\n }\n // b是3阶曲线\n else {\n let { x: bx4, y: by4 } = coordsB[3];\n inters = getIntersectionBezier3Bezier3(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4,\n bx1, by1, bx2, by2, bx3, by3, bx4, by4);\n if(!inters) {\n overs = checkOverlapBezier(seg, item);\n }\n }\n }\n }\n }\n // 有重合的,重合线段已经求好,直接使用\n if(overs) {\n activeNewSeg(segments, list, ael, x, overs.ra);\n activeNewSeg(segments, list, ael, x, overs.rb);\n seg.isDeleted = item.isDeleted = true;\n ael.splice(i, 1);\n break;\n }\n // 有交点,确保原先线段方向顺序(x升序、y升序),各自依次切割,x右侧新线段也要存入list\n else if(inters && inters.length) {\n // console.log('inters', i, inters);\n let pa = sortIntersection(inters, !isSourceReverted);\n // console.log(pa);\n let ra = sliceSegment(seg, pa, isIntermediateA && belong === 0);\n // console.log(ra.map(item => item.toString()));\n let pb = sortIntersection(inters, isSourceReverted);\n // console.log(pb);\n let rb = sliceSegment(item, pb, isIntermediateB && belong === 1);\n // console.log(rb.map(item => item.toString()));\n // 新切割的线段继续按照坐标存入列表以及ael,为后续求交\n activeNewSeg(segments, list, ael, x, ra);\n activeNewSeg(segments, list, ael, x, rb);\n // 老的线段被删除无效了,踢出ael,防止seg没被分割\n if(rb.length) {\n ael.splice(i, 1);\n }\n break;\n }\n }\n }\n }\n // 不相交切割才进入ael\n if(!seg.isDeleted) {\n ael.push(seg);\n seg.isVisited = true;\n }\n // console.log(ael.map(item => item.toString()));\n }\n }\n list.shift();\n }\n // 最后面的线\n delList.forEach(seg => {\n if(!seg.isDeleted) {\n segments.push(seg);\n }\n });\n // 最后再过滤一遍,因为新生成的切割线可能会被再次切割变成删除的无效线段\n return segments.filter(item => !item.isDeleted);\n}\n\n// 给定交点列表分割线段,ps需排好顺序从头到尾,isSelf标明是否自相交阶段,false是和对方交点切割\nfunction sliceSegment(seg, ps, isIntermediate) {\n let res = [];\n if(!ps.length) {\n return res;\n }\n let belong = seg.belong, coords = seg.coords, len = coords.length;\n let startPoint = coords[0];\n let lastT = 0;\n // 多个点可能截取多条,最后一条保留只修改数据,其它新生成\n ps.forEach(item => {\n let point = item.point, t = item.t;\n let ns;\n if(len === 2) {\n ns = new Segment([\n startPoint,\n point,\n ], belong);\n }\n else if(len === 3) {\n let c = bezier.sliceBezier2Both(coords.map(item => [item.x, item.y]), lastT, t);\n ns = new Segment([\n startPoint,\n new Point(c[1][0], c[1][1]),\n point,\n ], belong);\n }\n else if(len === 4) {\n let c = bezier.sliceBezier2Both(coords.map(item => [item.x, item.y]), lastT, t);\n ns = new Segment([\n startPoint,\n new Point(c[1][0], c[1][1]),\n new Point(c[2][0], c[2][1]),\n point,\n ], belong);\n }\n // 连续操作的中间结果已有自己内外性,截取时需继承\n if(isIntermediate) {\n ns.myFill[0] = seg.myFill[0];\n ns.myFill[1] = seg.myFill[1];\n }\n startPoint = point;\n res.push(ns);\n lastT = t;\n });\n // 最后一条\n let ns;\n if(len === 2) {\n ns = new Segment([\n startPoint,\n coords[1],\n ], belong);\n }\n else if(len === 3) {\n let c = bezier.sliceBezier2Both(coords.map(item => [item.x, item.y]), lastT, 1);\n ns = new Segment([\n startPoint,\n new Point(c[1][0], c[1][1]),\n coords[2],\n ], belong);\n }\n else if(len === 4) {\n let c = bezier.sliceBezier2Both(coords.map(item => [item.x, item.y]), lastT, 1);\n ns = new Segment([\n startPoint,\n new Point(c[1][0], c[1][1]),\n new Point(c[2][0], c[2][1]),\n coords[3],\n ], belong);\n }\n if(isIntermediate) {\n ns.myFill[0] = seg.myFill[0];\n ns.myFill[1] = seg.myFill[1];\n }\n res.push(ns);\n // 老的打标失效删除\n seg.isDeleted = true;\n return res;\n}\n\n// 相交的线段slice成多条后,老的删除,新的考虑添加进扫描列表和活动边列表,根据新的是否在范围内\nfunction activeNewSeg(segments, list, ael, x, ns) {\n ns.forEach(seg => {\n let bbox = seg.bbox, x1 = bbox[0], x2 = bbox[2];\n // console.log(seg.toString(), x1, x2, x);\n // 活跃x之前无相交判断意义,除了竖线,出现活跃前只可能一方为竖线截断另一方的左边部分\n if(x2 <= x && x1 !== x2 && seg.coords.length !== 2) {\n segments.push(seg);\n return;\n }\n // 按顺序放在list的正确位置,可能x1已经过去不需要加入了,但要考虑ael\n let i = 0;\n if(x1 < x) {\n seg.isVisited = true;\n ael.push(seg);\n }\n else {\n for(let len = list.length; i < len; i++) {\n let item = list[i];\n let lx = item.x;\n if(x1 === lx) {\n item.arr.push(seg);\n break;\n }\n // 新的插入\n if(x1 < lx) {\n let temp = {\n x: x1,\n arr: [seg],\n };\n list.splice(i, 0, temp);\n break;\n }\n }\n }\n // x2一定会加入\n for(let len = list.length; i < len; i++) {\n let item = list[i];\n let lx = item.x;\n if(x2 === lx) {\n // 访问过的尽可能排在前面早出栈,减少对比次数\n item.arr.unshift(seg);\n break;\n }\n if(x2 < lx) {\n let temp = {\n x: x2,\n arr: [seg],\n };\n list.splice(i, 0, temp);\n break;\n }\n }\n });\n}\n\n// 按x升序将所有线段组成一个垂直扫描线列表,求交用,y方向不用管\nfunction genHashXList(segments) {\n let hashX = {};\n segments.forEach(seg => {\n let bbox = seg.bbox, min = bbox[0], max = bbox[2];\n putHashX(hashX, min, seg);\n putHashX(hashX, max, seg);\n });\n let list = [];\n Object.keys(hashX).forEach(x => list.push({\n x: parseFloat(x),\n arr: hashX[x],\n }));\n return list.sort(function(a, b) {\n return a.x - b.x;\n });\n}\n\n// 每个线段会放2次,开始点和结束点,哪怕x相同,第1次是开始用push,第2次结束unshift,这样离开时排在前面\nfunction putHashX(hashX, x, seg) {\n let list = hashX[x] = hashX[x] || [];\n if(seg.isVisited) {\n list.unshift(seg);\n seg.isVisited = false;\n }\n else {\n list.push(seg);\n seg.isVisited = true;\n }\n}\n\n// 按x升序将所有线段组成一个垂直扫描线列表,y方向也需要判断\nfunction genHashXYList(segments) {\n let hashXY = {};\n segments.forEach(seg => {\n let coords = seg.coords, l = coords.length;\n let start = coords[0], end = coords[l - 1];\n putHashXY(hashXY, start.x, start.y, seg, true);\n putHashXY(hashXY, end.x, end.y, seg, false);\n });\n let listX = [];\n Object.keys(hashXY).forEach(x => {\n let hashY = hashXY[x];\n let listY = [];\n Object.keys(hashY).forEach(y => {\n let arr = hashY[y].sort(function(a, b) {\n // end优先于start先触发\n if(a.isStart !== b.isStart) {\n return a.isStart ? 1 : -1;\n }\n // start点相同看谁在上谁在下,下方在前,比y极大值,因为start相同又不相交,所以上方的y极值更大\n if(a.isStart) {\n return segAboveCompare(a.seg, b.seg) ? 1 : -1;\n }\n // end点相同无所谓,其不参与运算,因为每次end线段先出栈ael\n });\n // console.log(x, y, arr.map(item => item.isStart + ', ' + item.seg.toString()));\n listY.push({\n y: parseFloat(y),\n arr,\n })\n });\n listX.push({\n x: parseFloat(x),\n arr: listY.sort(function(a, b) {\n return a.y - b.y;\n }),\n });\n });\n listX.sort(function(a, b) {\n return a.x - b.x;\n });\n let list = [];\n listX.forEach(item => {\n item.arr.forEach(item => {\n list = list.concat(item.arr);\n });\n });\n return list;\n}\n\nfunction putHashXY(hashXY, x, y, seg, isStart) {\n let hash = hashXY[x] = hashXY[x] || {};\n let list = hash[y] = hash[y] || [];\n list.push({\n isStart,\n seg,\n });\n}\n\n// pt在线段left -> right的上方或线上\nfunction pointAboveOrOnLine(pt, left, right) {\n let { x, y } = pt;\n let { x: x1, y: y1 } = left;\n let { x: x2, y: y2 } = right;\n return vector.crossProduct(x1 - x, y1 - y, x2 - x, y2 - y) >= 0;\n}\n\n// a是否在b的上边,取x相同部分看y大小,只有start点事件时才判断\nfunction segAboveCompare(segA, segB) {\n let ca = segA.coords, cb = segB.coords;\n let la = ca.length, lb = cb.length;\n let a1 = ca[0], b1 = cb[0];\n // 两条直线用向量积判断,注意开始点是否相同即可\n if(la === 2 && lb === 2) {\n let a2 = ca[1], b2 = cb[1];\n if(a1.equal(b1)) {\n return pointAboveOrOnLine(a2, b1, b2);\n }\n else {\n return pointAboveOrOnLine(a1, b1, b2);\n }\n }\n // a是竖线的话看另一条在左还是右,左的话a在下,否则在上,因为此时只可能是左和a尾相连或右和a首相连\n if(la === 2 && a1.x === ca[1].x) {\n return b1.x >= a1.x;\n }\n // 如果有曲线,取二者x共同的区域部分[x1, x3],以及区域中点x2,这3个点不可能都重合,一定会有某点的y比较大小\n let x1 = Math.max(a1.x, b1.x), x3 = Math.min(ca[la - 1].x, cb[lb - 1].x), x2 = x1 + (x3 - x1) * 0.5;\n if(a1 !== b1) {\n let y1 = getYByX(ca, x1), y2 = getYByX(cb, x1);\n if(y1 !== y2) {\n return y1 > y2;\n }\n }\n if(ca[la - 1] !== cb[lb - 1]) {\n let y1 = getYByX(ca, x3), y2 = getYByX(cb, x3);\n if(y1 !== y2) {\n return y1 > y2;\n }\n }\n let y1 = getYByX(ca, x2), y2 = getYByX(cb, x2);\n if(y1 !== y2) {\n return y1 > y2;\n }\n}\n\n// 获取曲线单调性t值,有结果才返回\nfunction getBezierMonotonicity(coords, isX) {\n if(coords.length === 3) {\n let t = isX\n ? (coords[0].x - coords[1].x) / (coords[0].x - 2 * coords[1].x + coords[2].x)\n : (coords[0].y - coords[1].y) / (coords[0].y - 2 * coords[1].y + coords[2].y);\n if(t > 0 && t < 1) {\n return [t];\n }\n }\n else if(coords.length === 4) {\n let t = equation.getRoots([\n isX\n ? 3 * (coords[1].x - coords[0].x)\n : 3 * (coords[1].y - coords[0].y),\n isX\n ? 6 * (coords[2].x + coords[0].x - 2 * coords[1].x)\n : 6 * (coords[2].y + coords[0].y - 2 * coords[1].y),\n isX\n ? 3 * (coords[3].x + 3 * coords[1].x - coords[0].x - 3 * coords[2].x)\n : 3 * (coords[3].y + 3 * coords[1].y - coords[0].y - 3 * coords[2].y)\n ]).filter(i => i > 0 && i < 1);\n if(t.length) {\n return t.sort(function(a, b) {\n return a - b;\n });\n }\n }\n}\n\n// 根据x的值解得t后获取y,由于线段已经x单调,所以解只会有1个而非多个\nfunction getYByX(coords, x) {\n let len = coords.length;\n if(x === coords[0].x) {\n return coords[0].y;\n }\n if(x === coords[len - 1].x) {\n return coords[len - 1].y;\n }\n if(len === 2) {\n if(coords[0].y === coords[1].y) {\n return coords[0].y;\n }\n let p = (x - coords[0].x) / (coords[1].x - coords[0].x);\n return coords[0].y + p * (coords[1].y - coords[0].y);\n }\n else if(len === 3) {\n let t = equation.getRoots([\n coords[0].x - x,\n 2 * (coords[1].x - coords[0].x),\n coords[2].x + coords[0].x - 2 * coords[1].x,\n ]).filter(i => i >= 0 && i <= 1);\n let pts = coords.map(item => [item.x, item.y]);\n return bezier.pointAtByT(pts, t[0])[1];\n }\n else if(len === 4) {\n let t = equation.getRoots([\n coords[0].x - x,\n 3 * (coords[1].x - coords[0].x),\n 3 * (coords[2].x + coords[0].x - 2 * coords[1].x),\n coords[3].x + 3 * coords[1].x - coords[0].x - 3 * coords[2].x\n ]).filter(i => i >= 0 && i <= 1);\n let pts = coords.map(item => [item.x, item.y]);\n return bezier.pointAtByT(pts, t[0])[1];\n }\n}\n\nfunction isRectsOverlap(bboxA, bboxB, lenA, lenB) {\n if(lenA === 2 && lenB === 2) {\n // 2条垂线特殊考虑,此时x范围都是0,只能比较y\n if(bboxA[0] === bboxA[2] && bboxB[0] === bboxB[2] && bboxA[0] === bboxA[2]) {\n if(bboxA[1] >= bboxB[3] || bboxB[1] >= bboxA[3]) {\n return false;\n }\n return true;\n }\n // 2条水平线也是\n if(bboxA[1] === bboxA[3] && bboxB[1] === bboxB[3] && bboxA[1] === bboxA[1]) {\n if(bboxA[0] >= bboxB[2] || bboxB[0] >= bboxA[2]) {\n return false;\n }\n return true;\n }\n }\n return geom.isRectsOverlap(bboxA, bboxB);\n}\n\nfunction checkOverlapLine(ax1, ay1, ax2, ay2, segA,\n bx1, by1, bx2, by2, segB, isY) {\n let ra = [], rb = [];\n let coordsA = segA.coords, coordsB = segB.coords;\n if(ax1 < bx1 && !isY || ay1 < by1 && isY) {\n ra.push(new Segment([\n coordsA[0],\n coordsB[0],\n ], segA.belong));\n if(ax2 < bx2 && !isY || ay2 < by2 && isY) {\n ra.push(new Segment([\n coordsB[0],\n coordsA[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsB[0],\n coordsA[1],\n ], segB.belong));\n rb.push(new Segment([\n coordsA[1],\n coordsB[1],\n ], segB.belong));\n }\n else if(ax2 === bx2 && !isY || ay2 === by2 && isY) {\n ra.push(new Segment([\n coordsB[0],\n coordsB[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsB[0],\n coordsB[1],\n ], segB.belong));\n }\n else {\n ra.push(new Segment([\n coordsB[0],\n coordsB[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsB[0],\n coordsB[1],\n ], segB.belong));\n ra.push(new Segment([\n coordsB[1],\n coordsA[1],\n ], segA.belong));\n }\n }\n // 不会出现完全重合即ax2 == bx2\n else if(ax1 === bx1 && !isY || ay1 === by1 && isY) {\n if(ax2 < bx2 && !isY || ay2 < by2 && isY) {\n ra.push(new Segment([\n coordsA[0],\n coordsA[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsA[0],\n coordsA[1],\n ], segB.belong));\n rb.push(new Segment([\n coordsA[1],\n coordsB[1],\n ], segB.belong));\n }\n else {\n ra.push(new Segment([\n coordsB[0],\n coordsB[1],\n ], segA.belong));\n ra.push(new Segment([\n coordsB[1],\n coordsA[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsB[0],\n coordsB[1],\n ], segB.belong));\n }\n }\n // ax1 > bx1\n else {\n rb.push(new Segment([\n coordsB[0],\n coordsA[0],\n ], segB.belong));\n if(ax2 < bx2 && !isY || ay2 < by2 && isY) {\n ra.push(new Segment([\n coordsA[0],\n coordsA[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsA[0],\n coordsA[1],\n ], segB.belong));\n rb.push(new Segment([\n coordsA[1],\n coordsB[1],\n ], segB.belong));\n }\n else if(ax2 === bx2 && !isY || ay2 === by2 && isY) {\n ra.push(new Segment([\n coordsA[0],\n coordsA[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsA[0],\n coordsA[1],\n ], segB.belong));\n }\n else {\n ra.push(new Segment([\n coordsA[0],\n coordsB[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsA[0],\n coordsB[1],\n ], segB.belong));\n ra.push(new Segment([\n coordsB[1],\n coordsA[1],\n ], segA.belong));\n }\n }\n return {\n ra,\n rb,\n };\n}\n\nfunction checkOverlapBezier(segA, segB) {\n let ca = segA.coords.map(item => [item.x, item.y]), la = ca.length;\n let cb = segB.coords.map(item => [item.x, item.y]), lb = cb.length;\n let firstA = ca[0], firstB = cb[0], lastA = ca[la - 1], lastB = cb[lb - 1];\n let t1 = bezier.getPointT(ca, firstB[0], firstB[1]);\n let t2 = bezier.getPointT(ca, lastB[0], lastB[1]);\n let t3 = bezier.getPointT(cb, firstA[0], firstA[1]);\n let t4 = bezier.getPointT(cb, lastA[0], lastA[1]);\n // console.warn(segA.toString());console.warn(segB.toString());\n // console.log(t1, t2, t3, t4);\n let l1 = t1.length, l2 = t2.length, l3 = t3.length, l4 = t4.length;\n /**\n * 重合有3种情况,对应4个t(每方各2个)的情况不同:\n * a. 一个包含另外一个,这样其中一方t为空,另一方t为2个即两个端点各1\n * b. 一对端点重合另外一侧包含,比上面的t多1个即空的那方t多1\n * c. 普通部分重合,每方各有1个t\n */\n let conditionA = l1 === 1 && l2 === 1 && l3 === 0 && l4 === 0 || l1 === 0 && l2 === 0 && l3 === 1 && l4 === 1;\n let conditionB = l1 === 1 && l2 === 1 && l3 + l4 === 1 || l1 + l2 === 1 && l3 === 1 && l4 === 1;\n let conditionC = l1 + l2 === 1 && l3 + l4 === 1;\n if(conditionA || conditionB || conditionC) {\n let startA = l1 ? t1[0] : 0;\n let endA = l2 ? t2[0] : 1;\n let a = bezier.sliceBezier2Both(ca, startA, endA);\n let startB = l3 ? t3[0] : 0;\n let endB = l4 ? t4[0] : 1;\n let b = bezier.sliceBezier2Both(cb, startB, endB);\n // console.log(startA, endA, startB, endB);\n // 确定重合之后就是截取,重合一定出现在左右的中间部分,这样只要分别判断左右两端是否需要各自裁剪即可\n if(equalBezier(a, b)) {\n let over = a.map(item => new Point(item));\n // console.log(over);\n let ra = [], rb = [];\n if(startA > 0) {\n let s = bezier.sliceBezier2Both(ca, 0, startA);\n let arr = [\n segA.coords[0],\n new Point(s[1]),\n segB.coords[0],\n ];\n if(la === 4) {\n arr.splice(2, 0, new Point(s[2]));\n }\n ra.push(new Segment(arr, segA.belong));\n }\n ra.push(new Segment(over, segA.belong)); // 重合的部分\n if(endA < 1) {\n let s = bezier.sliceBezier2Both(ca, endA, 1);\n let arr = [\n segB.coords[lb - 1],\n new Point(s[1]),\n segA.coords[la - 1],\n ];\n if(la === 4) {\n arr.splice(2, 0, new Point(s[2]));\n }\n ra.push(new Segment(arr, segA.belong));\n }\n if(startB > 0) {\n let s = bezier.sliceBezier2Both(cb, 0, startB);\n let arr = [\n segB.coords[0],\n new Point(s[1]),\n segA.coords[0],\n ];\n if(lb === 4) {\n arr.splice(2, 0, new Point(s[2]));\n }\n rb.push(new Segment(arr, segB.belong));\n }\n rb.push(new Segment(over, segB.belong)); // 重合的部分\n if(endB < 1) {\n let s = bezier.sliceBezier2Both(cb, endB, 1);\n let arr = [\n segA.coords[la - 1],\n new Point(s[1]),\n segB.coords[lb - 1],\n ];\n if(lb === 4) {\n arr.splice(2, 0, new Point(s[2]));\n }\n rb.push(new Segment(arr, segB.belong));\n }\n // console.log(ra.map(item => item.toString()));\n // console.log(rb.map(item => item.toString()));\n return {\n ra,\n rb,\n };\n }\n }\n}\n\nfunction equalBezier(a, b) {\n for(let i = 0, len = a.length; i < len; i++) {\n let ai = a[i], bi = b[i];\n if(Math.abs(ai[0] - bi[0]) > 1e-9 || Math.abs(ai[1] - bi[1]) > 1e-9) {\n return false;\n }\n }\n return true;\n}\n\nexport default Polygon;\n","import geom from '../geom';\n\n// 新线段添加到某个链上后,要先检查是否能合其它链连起来,再检查闭合情况\nfunction join(res, chains, chain, index, pt, isHead) {\n for(let i = 0, len = chains.length; i < len; i++) {\n let item = chains[i];\n if(item !== chain) {\n let l = item.length;\n let head = item[0], tail = item[l - 1];\n let ptHead = head.coords[0];\n let coords = tail.coords, l2 = coords.length;\n let ptTail = coords[l2 - 1];\n if(pt.equal(ptHead)) {\n if(isHead) {\n item = reverse(chain).concat(item);\n chains[i] = item;\n chains.splice(index, 1);\n return close(res, chains, item, i);\n }\n else {\n item = chain.concat(item);\n chains[i] = item;\n chains.splice(index, 1);\n return close(res, chains, item, i);\n }\n }\n else if(pt.equal(ptTail)) {\n if(isHead) {\n item = item.concat(chain);\n chains[i] = item;\n chains.splice(index, 1);\n return close(res, chains, item, i);\n }\n else {\n item = item.concat(reverse(chain));\n chains[i] = item;\n chains.splice(index, 1);\n return close(res, chains, item, i);\n }\n }\n }\n }\n // 无法和别的链接,也要检查自身闭合\n close(res, chains, chain, index);\n}\n\nfunction close(res, chains, chain, index) {\n let l = chain.length;\n let head = chain[0], tail = chain[l - 1];\n let ptHead = head.coords[0];\n let coords2 = tail.coords, l2 = coords2.length;\n let ptTail = coords2[l2 - 1];\n if(ptHead.equal(ptTail)) {\n chains.splice(index, 1);\n res.push(chain);\n }\n}\n\n// 整条链颠倒,包含每个线段自身颠倒\nfunction reverse(chain) {\n chain.forEach(item => item.reverse());\n return chain.reverse();\n}\n\nexport default function(list) {\n let chains = [], res = [];\n // 在对方内部的排在前面,这样会优先形成包含情况而不是交叉\n list.sort(function(a, b) {\n if(b.otherFill[0] && b.otherFill[1]) {\n return 1;\n }\n return -1;\n });\n outer:\n while(list.length) {\n let seg = list.shift(), coords = seg.coords, len = coords.length;\n let start = coords[0], end = coords[len - 1];\n let temp;\n // 尝试追加到某条链中,互相头尾链接可能有4种情况,其中2种会reverse线段首尾\n for(let i = 0, len = chains.length; i < len; i++) {\n let chain = chains[i], l = chain.length;\n let head = chain[0], tail = chain[l - 1];\n let ptHead = head.coords[0];\n let coords2 = tail.coords, l2 = coords2.length;\n let ptTail = coords2[l2 - 1];\n if(start.equal(ptTail)) {\n if(seg.belong !== tail.belong) {\n chain.push(seg);\n join(res, chains, chain, i, end, false);\n continue outer;\n }\n else if(!temp) {\n temp = {i, t: 0};\n }\n }\n else if(start.equal(ptHead)) {\n if(seg.belong !== tail.belong) {\n seg.reverse();\n chain.unshift(seg);\n join(res, chains, chain, i, end, true);\n continue outer;\n }\n else if(!temp) {\n temp = {i, t: 1};\n }\n }\n else if(end.equal(ptTail)) {\n if(seg.belong !== tail.belong) {\n seg.reverse();\n chain.push(seg);\n join(res, chains, chain, i, start, false);\n continue outer;\n }\n else if(!temp) {\n temp = {i, t: 2};\n }\n }\n else if(end.equal(ptHead)) {\n if(seg.belong !== tail.belong) {\n chain.unshift(seg);\n join(res, chains, chain, i, start, true);\n continue outer;\n }\n else if(!temp) {\n temp = {i, t: 3};\n }\n }\n }\n // 如果没有优先添加对方的线段形成包含,则到这里检查是否有己方的进行链接\n if(temp) {\n if(temp.t === 0) {\n chains[temp.i].push(seg);\n join(res, chains, chains[temp.i], temp.i, end, false);\n }\n else if(temp.t === 1) {\n seg.reverse();\n chains[temp.i].unshift(seg);\n join(res, chains, chains[temp.i], temp.i, end, true);\n }\n else if(temp.t === 2) {\n seg.reverse();\n chains[temp.i].push(seg);\n join(res, chains, chains[temp.i], temp.i, start, false);\n }\n else if(temp.t === 3) {\n chains[temp.i].unshift(seg);\n join(res, chains, chains[temp.i], temp.i, start, true);\n }\n }\n // 找不到则生成新链\n else {\n chains.push([seg]);\n }\n }\n // 鞋带公式求得每个多边形的时钟序 https://zhuanlan.zhihu.com/p/401010594\n let v = res.map(item => {\n // let isInner = true, isOuter = true;\n let clockwise = true;\n let s = 0, lastX, lastY, minX, minY, maxX, maxY;\n item.forEach((seg, i) => {\n // 内部是指边的两侧都是对方填充说明在内部\n // if(!seg.otherFill[0] || !seg.otherFill[1]) {\n // isInner = false;\n // }\n // // 外部是指边的一侧为空\n // if(!seg.myFill[0] && !seg.otherFill[0] || !seg.myFill[1] && !seg.otherFill[1]) {}\n // else {\n // isOuter = false;\n // }\n let coords = seg.coords, len = coords.length, bbox = seg.bbox;\n if(i) {\n minX = Math.min(minX, bbox[0]);\n minY = Math.min(minY, bbox[1]);\n maxX = Math.max(maxX, bbox[2]);\n maxY = Math.max(maxY, bbox[3]);\n }\n else {\n minX = bbox[0];\n minY = bbox[1];\n maxX = bbox[2];\n maxY = bbox[3];\n }\n if(len === 2) {\n if(i) {\n s += lastX * coords[1].y - lastY * coords[1].x;\n }\n else {\n s += coords[0].x * coords[1].y - coords[0].y * coords[1].x;\n }\n lastX = coords[1].x;\n lastY = coords[1].y;\n }\n else if(len === 3) {\n if(i) {\n s += lastX * coords[2].y - lastY * coords[2].x;\n }\n else {\n s += coords[0].x * coords[1].y - coords[0].y * coords[2].x;\n }\n lastX = coords[2].x;\n lastY = coords[2].y;\n }\n else if(len === 4) {\n if(i) {\n s += lastX * coords[3].y - lastY * coords[3].x;\n }\n else {\n s += coords[0].x * coords[3].y - coords[0].y * coords[3].x;\n }\n lastX = coords[3].x;\n lastY = coords[3].y;\n }\n });\n // 首个顶点重合\n let first = item[0], coords = first.coords;\n s += lastX * coords[0].y - lastY * coords[0].x;\n if(s < 0) {\n clockwise = false;\n }\n return {\n // isInner,\n // isOuter,\n list: item,\n clockwise,\n bbox: [minX, minY, maxX, maxY],\n area: (maxX - minX) * (maxY - minY),\n };\n });\n v.forEach(item => {\n if(item.checked) {\n return;\n }\n let bbox = item.bbox;\n let list = [item];\n for(let i = 0, len = v.length; i < len; i++) {\n let item2 = v[i];\n if(item2 !== item) {\n // 互相包含则存入列表\n if(geom.isRectsInside(bbox, item2.bbox, true) || geom.isRectsInside(item2.bbox, bbox, true)) {\n list.push(item2);\n }\n }\n }\n // 按面积排序,最小的即最里面的在前面\n if(list.length > 1) {\n list.sort(function(a, b) {\n return a.area - b.area;\n });\n // 可能存在已经排过序的,例如外围a包含了内部的b和c,b和c互不相交,a和b已经调整过排序了,a和c再调整则a已经checked\n for(let i = 1, len = list.length;i < len; i++) {\n let item = list[i];\n if(item.checked) {\n let clockwise = item.clockwise;\n for(let j = i - 1; j >= 0; j--) {\n let item2 = list[j];\n item2.checked = true;\n if(item2.clockwise === clockwise) {\n reverse(item2.list);\n item2.clockwise = !clockwise;\n }\n clockwise = !clockwise;\n }\n clockwise = item.clockwise;\n for(let j = i + 1; j < len; j++) {\n let item2 = list[j];\n item2.checked = true;\n if(item2.clockwise === clockwise) {\n reverse(item2.list);\n item2.clockwise = !clockwise;\n }\n clockwise = !clockwise;\n }\n return;\n }\n }\n // 新的依次时钟序互相颠倒\n let clockwise = list[0].clockwise;\n list[0].checked = true;\n for(let i = 1, len = list.length;i < len; i++) {\n let item = list[i];\n item.checked = true;\n if(item.clockwise === clockwise) {\n reverse(item.list);\n item.clockwise = !clockwise;\n }\n clockwise = !clockwise;\n }\n }\n });\n return v.map(item => {\n let list = item.list.map(seg => {\n let coords = seg.coords, len = coords.length;\n if(len === 2) {\n return [coords[1].x, coords[1].y];\n }\n else if(len === 3) {\n return [coords[1].x, coords[1].y, coords[2].x, coords[2].y];\n }\n else if(len === 4) {\n return [coords[1].x, coords[1].y, coords[2].x, coords[2].y, coords[3].x, coords[3].y];\n }\n });\n // 首个顶点重合\n let first = item.list[0], coords = first.coords;\n list.unshift([coords[0].x, coords[0].y]);\n return list;\n });\n}\n","import Polygon from './Polygon';\nimport chain from './chain';\n\n// 多边形都是多个区域,重载支持外部传入1个区域则数组化\nfunction prefix(polygon) {\n if(!polygon || !Array.isArray(polygon) || !Array.isArray(polygon[0])) {\n return [];\n }\n if(Array.isArray(polygon[0][0])) {\n return polygon;\n }\n return [polygon];\n}\n\nfunction trivial(polygonA, polygonB) {\n let isIntermediateA = polygonA instanceof Polygon;\n let isIntermediateB = polygonB instanceof Polygon;\n // 生成多边形对象,相交线段拆分开来,曲线x单调性裁剪,重合线段标记\n let source;\n if(isIntermediateA) {\n source = polygonA.reset(0);\n }\n else {\n source = new Polygon(prefix(polygonA), 0);\n source.selfIntersect();\n }\n // console.log(source.toString());\n let clip;\n if(isIntermediateB) {\n clip = polygonB.reset(1);\n }\n else {\n clip = new Polygon(prefix(polygonB), 1);\n clip.selfIntersect();\n }\n // console.log(clip.toString());\n // console.log('----');\n // 两个多边形之间再次互相判断相交\n Polygon.intersect2(source, clip, isIntermediateA, isIntermediateB);\n // console.log(source.toString());\n // console.log(clip.toString());\n // console.log('====');\n Polygon.annotate2(source, clip, isIntermediateA, isIntermediateB);\n // console.log(source.toString());\n // console.log(clip.toString());\n return [source, clip];\n}\n\nconst INTERSECT = [\n 0, 0, 0, 1,\n 0, 0, 0, 1,\n 0, 0, 0, 1,\n 1, 1, 1, 0,\n], UNION = [\n 0, 1, 1, 1,\n 1, 0, 0, 0,\n 1, 0, 0, 0,\n 1, 0, 0, 0,\n], SUBTRACT = [\n 0, 0, 1, 0,\n 0, 0, 1, 0,\n 1, 1, 0, 1,\n 0, 0, 1, 0,\n], SUBTRACT_REV = [\n 0, 1, 0, 0,\n 1, 0, 1, 1,\n 0, 1, 0, 0,\n 0, 1, 0, 0,\n], XOR = [\n 0, 1, 1, 0,\n 1, 0, 0, 1,\n 1, 0, 0, 1,\n 0, 1, 1, 0,\n];\n\nfunction filter(segments, matrix) {\n let res = [], hash = {};\n segments.forEach(seg => {\n let { belong, myFill, otherFill, otherCoincide } = seg;\n if(otherCoincide) {\n // 对方重合线只出现一次\n let hc = seg.toHash();\n if(hash.hasOwnProperty(hc)) {\n return;\n }\n hash[hc] = true;\n }\n let i;\n if(belong) {\n i = (otherFill[0] ? 8 : 0)\n + (myFill[0] ? 4 : 0)\n + (otherFill[1] ? 2 : 0)\n + (myFill[1] ? 1 : 0);\n }\n else {\n i = (myFill[0] ? 8 : 0)\n + (otherFill[0] ? 4 : 0)\n + (myFill[1] ? 2 : 0)\n + (otherFill[1] ? 1 : 0);\n }\n if(matrix[i]) {\n res.push(seg);\n }\n });\n // console.log(res.map(item => item.toString()));\n return res;\n}\n\nexport default {\n intersect(polygonA, polygonB, intermediate) {\n let [source, clip] = trivial(polygonA, polygonB);\n let list = filter(source.segments.concat(clip.segments), INTERSECT);\n if(intermediate) {\n source.segments = list;\n return source;\n }\n return chain(list);\n },\n union(polygonA, polygonB, intermediate) {\n let [source, clip] = trivial(polygonA, polygonB);\n let list = filter(source.segments.concat(clip.segments), UNION);\n if(intermediate) {\n source.segments = list;\n return source;\n }\n return chain(list);\n },\n subtract(polygonA, polygonB, intermediate) {\n let [source, clip] = trivial(polygonA, polygonB);\n let list = filter(source.segments.concat(clip.segments), SUBTRACT);\n if(intermediate) {\n source.segments = list;\n return source;\n }\n return chain(list);\n },\n subtractRev(polygonA, polygonB, intermediate) {\n let [source, clip] = trivial(polygonA, polygonB);\n let list = filter(source.segments.concat(clip.segments), SUBTRACT_REV);\n if(intermediate) {\n source.segments = list;\n return source;\n }\n return chain(list);\n },\n xor(polygonA, polygonB, intermediate) {\n let [source, clip] = trivial(polygonA, polygonB);\n let list = filter(source.segments.concat(clip.segments), XOR);\n if(intermediate) {\n source.segments = list;\n return source;\n }\n return chain(list);\n },\n chain(polygon) {\n if(polygon instanceof Polygon) {\n return chain(polygon.segments);\n }\n return prefix(polygon);\n },\n};\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport bezier from '../../math/bezier';\nimport bo from '../../math/bo/index';\nimport mode from '../../refresh/mode';\n\nlet { intersect, union, subtract, subtract2, xor, chain } = bo;\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n} } = enums;\nconst { isNil } = util;\n\nfunction concatPointAndControl(point, control) {\n if(Array.isArray(control) && (control.length === 2 || control.length === 4)\n && Array.isArray(point) && point.length === 2) {\n return control.concat(point);\n }\n return point;\n}\n\nfunction getLength(list, isMulti) {\n let res = [];\n let total = 0;\n let increase = [];\n if(isMulti) {\n total = [];\n list.forEach(list => {\n let temp = getLength(list);\n res.push(temp.list);\n total.push(temp.total);\n increase.push([0].concat(temp.increase));\n });\n }\n else if(Array.isArray(list)) {\n total = 0;\n increase.push(0);\n let start = 0;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(Array.isArray(item)) {\n start = i;\n break;\n }\n }\n let prev = list[start];\n for(let i = start + 1, len = list.length; i < len; i++) {\n let item = list[i];\n if(!Array.isArray(item)) {\n continue;\n }\n if(item.length === 2) {\n let a = Math.abs(item[0] - prev[0]);\n let b = Math.abs(item[1] - prev[1]);\n let c = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));\n res.push(c);\n total += c;\n increase.push(total);\n prev = item;\n }\n else if(item.length === 4) {\n let c = bezier.bezierLength([prev, [item[0], item[1]], [item[2], item[3]]]);\n res.push(c);\n total += c;\n increase.push(total);\n prev = [item[2], item[3]];\n }\n else if(item.length === 6) {\n let c = bezier.bezierLength([prev, [item[0], item[1]], [item[2], item[3]], [item[4], item[5]]]);\n res.push(c);\n total += c;\n increase.push(total);\n prev = [item[4], item[5]];\n }\n }\n }\n return {\n list: res,\n total,\n increase,\n };\n}\n\nfunction getIndex(list, t, i, j) {\n if(i === j) {\n if(list[i] > t) {\n return i - 1;\n }\n return i;\n }\n let middle = i + ((j - i) >> 1);\n if(list[middle] === t) {\n return middle;\n }\n else if(list[middle] > t) {\n return getIndex(list, t, i, Math.max(middle - 1, i));\n }\n else {\n return getIndex(list, t, Math.min(middle + 1, j), j);\n }\n}\n\nfunction getNewList(list, len, start = 0, end = 1) {\n if(start === 0 && end === 1) {\n return list;\n }\n if(start === end) {\n return [];\n }\n if(start > end) {\n [start, end] = [end, start];\n }\n // start和end只能相差<=1,如果>1则校正\n while(end - start > 1) {\n end--;\n }\n // 将start和end统一至最接近0的正值\n while(end < 0 || start < 0) {\n end++;\n start++;\n }\n while(end >= 1 && start >= 1) {\n end--;\n start--;\n }\n // clone出原本顶点列表,防止干扰\n let length = list.length;\n list = util.clone(list);\n let res = [];\n let start2 = start > 1 ? (start - 1) : start;\n let end2 = end > 1 ? (end - 1) : end;\n let i = getIndex(len.increase, start2 * len.total, 0, length - 1);\n let j = getIndex(len.increase, end2 * len.total, 0, length - 1);\n // start<0或者end>1或者普通情况,一共3种,start和end不可能同时超限\n let isStartLt0 = start < 0;\n let isEndGt1 = end > 1;\n end2 *= len.total;\n let prePercent = 1;\n let endPoint;\n if(end2 > len.increase[j]) {\n let prev = list[j].slice(list[j].length - 2); // 最后2个点是x,y,前面是control\n let current = list[j + 1];\n let l = len.list[j];\n let diff = end2 - len.increase[j];\n let t = diff / l;\n prePercent = t;\n if(current.length === 2) {\n let a = current[0] - prev[0];\n let b = current[1] - prev[1];\n if(isEndGt1) {\n endPoint = [prev[0] + t * a, prev[1] + t * b];\n }\n else {\n t = 1 - t;\n endPoint = [current[0] - t * a, current[1] - t * b];\n }\n }\n else if(current.length === 4) {\n let r = bezier.sliceBezier([prev, [current[0], current[1]], [current[2], current[3]]], t);\n endPoint = [r[1][0], r[1][1], r[2][0], r[2][1]];\n }\n else if(current.length === 6) {\n let r = bezier.sliceBezier([prev, [current[0], current[1]], [current[2], current[3]], [current[4], current[5]]], t);\n endPoint = [r[1][0], r[1][1], r[2][0], r[2][1], r[3][0], r[3][1]];\n }\n }\n start2 *= len.total;\n if(start2 > len.increase[i]) {\n let current;\n let prev = list[i].slice(list[i].length - 2);\n let l = len.list[i];\n // 同一条线段时如果有end裁剪,会影响start长度,这里还要防止头尾绕了一圈的情况\n if(i === j && !isStartLt0 && !isEndGt1 && prePercent !== 1) {\n l *= prePercent;\n if(endPoint) {\n current = endPoint;\n }\n }\n if(!current) {\n current = list[i + 1];\n }\n let diff = start2 - len.increase[i];\n let t = diff / l;\n if(current.length === 2) {\n let a = current[0] - prev[0];\n let b = current[1] - prev[1];\n if(isStartLt0) {\n t = 1 - t;\n res.push([current[0] - t * a, current[1] - t * b]);\n }\n else {\n res.push([prev[0] + t * a, prev[1] + t * b]);\n }\n res.push(current);\n }\n else if(current.length === 4) {\n let r = bezier.sliceBezier([[current[2], current[3]], [current[0], current[1]], prev], 1 - t).reverse();\n res.push(r[0]);\n res.push([r[1][0], r[1][1], r[2][0], r[2][1]]);\n // 同一条线段上去除end冲突\n if(i === j && !isStartLt0 && !isEndGt1) {\n endPoint = null;\n }\n }\n else if(current.length === 6) {\n let r = bezier.sliceBezier([[current[4], current[5]], [current[2], current[3]], [current[0], current[1]], prev], 1 - t).reverse();\n res.push(r[0])\n res.push([r[1][0], r[1][1], r[2][0], r[2][1], current[4], current[5]]);\n if(i === j && !isStartLt0 && !isEndGt1) {\n endPoint = null;\n }\n }\n }\n // start和end之间的线段,注意头尾饶了一圈的情况,以及起始点被上方考虑过了\n for(let k = i + 2; k <= j + (!isStartLt0 && !isEndGt1 ? 0 : length); k++) {\n res.push(list[k % length]);\n }\n if(endPoint) {\n res.push(endPoint);\n }\n return res;\n}\n\nclass Polyline extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 所有点的列表\n if(this.isMulti) {\n this.__points = [[]];\n this.__controls = [[]];\n this.__start = [0];\n this.__end = [1];\n if(Array.isArray(props.start)) {\n this.__start = props.start.map(i => parseFloat(i) || 0);\n for(let i = this.__start.length; i < this.__points.length; i++) {\n this.__start.push(0);\n }\n }\n else if(!isNil(props.start)) {\n let v = parseFloat(props.start) || 0;\n this.__start = this.__points.map(() => v);\n }\n if(Array.isArray(props.end)) {\n this.__end = props.end.map(i => {\n let v = parseFloat(i);\n if(isNaN(v)) {\n v = 1;\n }\n return v;\n });\n for(let i = this.__end.length; i < this.__points.length; i++) {\n this.__end.push(1);\n }\n }\n else if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n this.__end = this.__points.map(() => v);\n }\n }\n else {\n this.__points = [];\n // 控制点\n this.__controls = [];\n this.__start = 0;\n this.__end = 1;\n if(!isNil(props.start)) {\n this.__start = parseFloat(props.start) || 0;\n }\n if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n this.__end = v;\n }\n }\n if(Array.isArray(props.controls)) {\n this.__controls = props.controls;\n }\n if(Array.isArray(props.points)) {\n this.__points = props.points;\n }\n if(props.booleanOperations) {\n this.__booleanOperations = props.booleanOperations;\n }\n }\n\n calContent(currentStyle, computedStyle) {\n let res = super.calContent(currentStyle, computedStyle);\n // 查看是否有顶点\n if(res && !this.__hasXomContent) {\n let { currentProps: { points }, isMulti } = this;\n if(isMulti) {\n for(let i = 0, len = points.length; i < len; i++) {\n if(points.length) {\n return true;\n }\n }\n }\n else {\n if(points.length) {\n return true;\n }\n }\n }\n return res;\n }\n\n __getPoints(originX, originY, width, height, points, isControl) {\n return points.map(item => {\n if(!Array.isArray(item)) {\n return;\n }\n let len = item.length;\n if(isControl) {\n if(len !== 0 && len !== 2 && len !== 4) {\n return;\n }\n }\n else {\n if(len !== 0 && len !== 2) {\n return;\n }\n }\n let res = [];\n for(let i = 0; i < len; i++) {\n if(i % 2 === 0) {\n res.push(originX + item[i] * width);\n }\n else {\n res.push(originY + item[i] * height);\n }\n }\n return res;\n });\n }\n\n // 供polygon覆盖,后处理booleanOperations\n __reprocessing(list, isMulti) {\n if(!isMulti || list.length < 2) {\n return list;\n }\n let bo = this.booleanOperations, len = list.length;\n if(!bo) {\n return list;\n }\n if(!Array.isArray(bo)) {\n let old = bo;\n bo = [bo];\n for(let i = 1; i < len - 1; i++) {\n bo.push(old);\n }\n }\n if(Array.isArray(bo) && bo.length) {\n let res = [], temp = list[0];\n for(let i = 1; i < len; i++) {\n let op = (bo[i - 1] || '').toString().toLowerCase();\n let cur = list[i];\n if(['intersect', 'intersection', 'union', 'subtract', 'subtract2', 'diff', 'difference', 'xor'].indexOf(op) === -1) {\n res = res.concat(chain(temp));\n temp = cur || [];\n continue;\n }\n switch(op) {\n case 'intersect':\n case 'intersection':\n temp = intersect(temp, cur, true);\n break;\n case 'union':\n temp = union(temp, cur, true);\n break;\n case 'subtract':\n case 'diff':\n case 'difference':\n temp = subtract(temp, cur, true);\n break;\n case 'subtract2':\n temp = subtract2(temp, cur, true);\n break;\n case 'xor':\n temp = xor(temp, cur, true);\n break;\n }\n }\n return res.concat(chain(temp));\n }\n return list;\n }\n\n // 同polygon覆盖,booleanOperations改变时需刷新缓冲顶点坐标\n __needRebuildSE(__cacheProps) {\n if(util.isNil(__cacheProps.booleanOperations)) {\n __cacheProps.booleanOperations = true;\n return true;\n }\n }\n\n buildCache(originX, originY) {\n let { width, height, points, controls, start, end, __cacheProps, isMulti } = this;\n let rebuild, rebuildSE;\n if(isNil(__cacheProps.points)) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.points = points.map(item => {\n if(Array.isArray(item)) {\n return this.__getPoints(originX, originY, width, height, item);\n }\n });\n }\n else {\n __cacheProps.points = this.__getPoints(originX, originY, width, height, points);\n }\n }\n if(isNil(__cacheProps.controls)) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.controls = controls.map(item => {\n if(Array.isArray(item)) {\n return this.__getPoints(originX, originY, width, height, item, true);\n }\n return item;\n });\n }\n else {\n __cacheProps.controls = this.__getPoints(originX, originY, width, height, controls, true);\n }\n }\n if(isNil(__cacheProps.start)) {\n rebuildSE = true;\n __cacheProps.start = start;\n }\n if(isNil(__cacheProps.end)) {\n rebuildSE = true;\n __cacheProps.end = end;\n }\n // polygon会覆盖检查booleanOperations缓存\n if(this.__needRebuildSE(__cacheProps)) {\n rebuildSE = true;\n }\n // points/controls有变化就需要重建顶点\n if(rebuild) {\n let { points, controls } = __cacheProps;\n if(isMulti) {\n __cacheProps.list2 = points.map((item, i) => {\n let cl = controls[i];\n if(Array.isArray(item)) {\n return item.map((point, j) => {\n if(j) {\n return concatPointAndControl(point, cl && cl[j - 1]);\n }\n return point;\n });\n }\n });\n __cacheProps.len = getLength(__cacheProps.list2, isMulti);\n }\n else {\n __cacheProps.list2 = points.map((point, i) => {\n if(i) {\n return concatPointAndControl(point, controls[i - 1]);\n }\n return point;\n });\n __cacheProps.len = getLength(__cacheProps.list2, isMulti);\n }\n }\n if(rebuild || rebuildSE) {\n if(isMulti) {\n __cacheProps.list = __cacheProps.list2.map((item, i) => {\n if(Array.isArray(item)) {\n let len = __cacheProps.len;\n return getNewList(item, {\n list: len.list[i],\n total: len.total[i],\n increase: len.increase[i],\n }, __cacheProps.start[i], __cacheProps.end[i]);\n }\n });\n }\n else {\n __cacheProps.list = getNewList(__cacheProps.list2, __cacheProps.len, __cacheProps.start, __cacheProps.end);\n }\n // 后处理一次,让polygon支持布尔运算\n __cacheProps.list = this.__reprocessing(__cacheProps.list, isMulti);\n }\n return rebuild || rebuildSE;\n }\n\n render(renderMode, ctx, dx, dy) {\n let res = super.render(renderMode, ctx, dx, dy);\n if(res.break || renderMode === mode.WEBGL) {\n return res;\n }\n this.buildCache(res.x3, res.y3);\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get points() {\n return this.getProps('points');\n }\n\n get controls() {\n return this.getProps('controls');\n }\n\n get start() {\n return this.getProps('start');\n }\n\n get end() {\n return this.getProps('end');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n isMulti, __cacheProps,\n __x3: originX, __y3: originY,\n computedStyle: {\n [STROKE_WIDTH]: strokeWidth,\n },\n } = this;\n this.buildCache(originX, originY);\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(half, item);\n });\n half = Math.ceil(half * 0.5) + 1;\n let { points, controls } = __cacheProps;\n if(!isMulti) {\n points = [points];\n controls = [controls];\n }\n points.forEach((pointList, i) => {\n if(!pointList || pointList.length < 2 || !pointList[0] || !pointList[1]\n || pointList[0].length < 2 || pointList[1].length < 2) {\n return;\n }\n let controlList = controls[i] || [];\n let [xa, ya] = pointList[0];\n for(let i = 1, len = pointList.length; i < len; i++) {\n let item = pointList[i];\n if(!item || item.length < 2) {\n continue;\n }\n let [xb, yb] = pointList[i];\n let c = controlList[i - 1];\n if(c && c.length === 4) {\n let bezierBox = bezier.bboxBezier(xa, ya, c[0], c[1], c[2], c[3], xb, yb);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - half);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + half);\n }\n else if(c && c.length === 2) {\n let bezierBox = bezier.bboxBezier(xa, ya, c[0], c[1], xb, yb);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - half);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + half);\n }\n else {\n bbox[0] = Math.min(bbox[0], xa - half);\n bbox[1] = Math.min(bbox[1], ya - half);\n bbox[2] = Math.max(bbox[2], xa + half);\n bbox[3] = Math.max(bbox[3], ya + half);\n }\n xa = xb;\n ya = yb;\n }\n });\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n\n get booleanOperations() {\n return this.getProps('booleanOperations');\n }\n}\n\nexport default Polyline;\n","import Polyline from './Polyline';\n\nclass Polygon extends Polyline {\n constructor(tagName, props) {\n super(tagName, props);\n }\n\n __getPoints(originX, originY, width, height, points, isControl) {\n let res = super.__getPoints(originX, originY, width, height, points, isControl);\n if(!isControl) {\n res.push(res[0]);\n }\n return res;\n }\n}\n\nexport default Polygon;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\nimport inject from '../../util/inject';\nimport mode from '../../refresh/mode';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n} } = enums;\nconst { isNil } = util;\nconst { sectorPoints } = geom;\n\nfunction getR(v, dft) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = dft;\n }\n return v;\n}\n\nclass Sector extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 角度\n if(this.isMulti) {\n this.__begin = [0];\n this.__end = [0];\n this.__r = [1];\n if(Array.isArray(props.begin)) {\n this.__begin = props.begin.map(i => getR(i, 0));\n }\n if(Array.isArray(props.end)) {\n this.__end = props.end.map(i => getR(i, 0));\n }\n if(Array.isArray(props.r)) {\n this.__r = props.r.map(i => getR(i, 1));\n }\n if(Array.isArray(props.edge)) {\n this.__edge = props.edge.map(i => !!i);\n }\n if(Array.isArray(props.closure)) {\n this.__closure = props.closure.map(i => !!i);\n }\n }\n else {\n this.__begin = this.__end = 0;\n // 半径[0, ∞),默认1\n this.__r = 1;\n // 扇形两侧是否有边\n this.__edge = false;\n // 扇形大于180°时,是否闭合两端\n this.__closure = false;\n if(!isNil(props.begin)) {\n this.__begin = getR(props.begin, 0);\n }\n if(!isNil(props.end)) {\n this.__end = getR(props.end, 0);\n }\n if(!isNil(props.r)) {\n this.__r = getR(props.r, 1);\n }\n if(!isNil(props.edge)) {\n this.__edge = !!props.edge;\n }\n if(!isNil(props.closure)) {\n this.__closure = !!props.closure;\n }\n }\n }\n\n buildCache(cx, cy, focus) {\n let { width, begin, end, r, edge, closure, __cacheProps, isMulti } = this;\n let rebuild;\n if(isNil(__cacheProps.begin) || focus) {\n rebuild = true;\n __cacheProps.begin = (begin || 0) % 360;\n }\n if(isNil(__cacheProps.end) || focus) {\n rebuild = true;\n __cacheProps.end = (end || 0) % 360;\n }\n if(isNil(__cacheProps.r) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.r = r.map(r => r * width * 0.5);\n }\n else {\n __cacheProps.r = r * width * 0.5;\n }\n }\n r = __cacheProps.r;\n if(isNil(__cacheProps.edge) || focus) {\n rebuild = true;\n __cacheProps.edge = edge;\n }\n if(isNil(__cacheProps.closure) || focus) {\n rebuild = true;\n __cacheProps.closure = closure;\n }\n if(rebuild) {\n if(isMulti) {\n __cacheProps.list = [];\n __cacheProps.sList = [];\n begin.forEach((begin, i) => {\n let r2 = isNil(r[i]) ? width * 0.5 : r[i];\n let list = sectorPoints(cx, cy, r2, parseFloat(begin || 0) % 360, parseFloat(end[i] || 0) % 360);\n let sList = list.slice(0);\n if(closure[i]) {\n list.push(list[0].slice(0));\n if(edge) {\n sList.push(sList[0].slice(0));\n }\n }\n else {\n list.unshift([cx, cy]);\n list.push([cx, cy]);\n if(edge) {\n sList.unshift([cx, cy]);\n sList.push([cx, cy]);\n }\n }\n __cacheProps.list.push(list);\n __cacheProps.sList.push(sList);\n });\n }\n else {\n let list = sectorPoints(cx, cy, r, parseFloat(begin || 0), parseFloat(end || 0));\n let sList = list.slice(0);\n if(closure) {\n list.push(list[0].slice(0));\n if(edge) {\n sList.push(sList[0].slice(0));\n }\n }\n else {\n list.unshift([cx, cy]);\n list.push([cx, cy]);\n if(edge) {\n sList.unshift([cx, cy]);\n sList.push([cx, cy]);\n }\n }\n __cacheProps.list = list;\n __cacheProps.sList = sList;\n }\n }\n return rebuild;\n }\n\n render(renderMode, ctx, dx2, dy2) {\n let res = super.render(renderMode, ctx, dx2, dy2);\n if(res.break || renderMode === mode.WEBGL) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n let {\n fill: fills,\n fillRule: fillRules,\n stroke: strokes,\n strokeWidth: strokeWidths,\n strokeDasharray: strokeDasharrays,\n strokeDasharrayStr: strokeDasharrayStrs,\n strokeLinecap: strokeLinecaps,\n strokeLinejoin: strokeLinejoins,\n strokeMiterlimit: strokeMiterlimits,\n dx,\n dy,\n } = res;\n let { __cacheProps: { list, sList }, isMulti } = this;\n // 普通情况下只有1个,按普通情况走\n if(fills.length <= 1 && strokes.length <= 1) {\n let o = {\n fill: fills[0],\n fillRule: fillRules[0],\n stroke: strokes[0],\n strokeWidth: strokeWidths[0],\n strokeDasharray: strokeDasharrays[0],\n strokeDasharrayStr: strokeDasharrayStrs[0],\n strokeLinecap: strokeLinecaps[0],\n strokeLinejoin: strokeLinejoins[0],\n strokeMiterlimit: strokeMiterlimits[0],\n dx,\n dy,\n };\n this.__renderOneSector(renderMode, ctx, isMulti, list, sList, o);\n }\n // 多个需要fill在下面,stroke在上面,依次循环\n else {\n for(let i = 0, len = fills.length; i < len; i++) {\n let fill = fills[i];\n if(fill) {\n let o = {\n fill,\n fillRule: fillRules[i],\n dx,\n dy,\n };\n this.__renderOneSector(renderMode, ctx, isMulti, list, sList, o);\n }\n }\n for(let i = 0, len = strokes.length; i < len; i++) {\n let stroke = strokes[i];\n if(stroke) {\n let o = {\n stroke,\n strokeWidth: strokeWidths[i],\n strokeDasharray: strokeDasharrays[i],\n strokeDasharrayStr: strokeDasharrayStrs[i],\n strokeLinecap: strokeLinecaps[i],\n strokeLinejoin: strokeLinejoins[i],\n strokeMiterlimit: strokeMiterlimits[i],\n dx,\n dy,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, sList, o);\n }\n }\n }\n return res;\n }\n\n __renderOneSector(renderMode, ctx, isMulti, list, sList, res) {\n let {\n fill,\n stroke,\n strokeWidth,\n } = res;\n let isFillCE = fill.k === 'conic';\n let isStrokeCE = stroke.k === 'conic';\n let isFillRE = fill.k === 'radial' && Array.isArray(fill.v);\n let isStrokeRE = strokeWidth > 0 && stroke.k === 'radial' && Array.isArray(stroke.v);\n if(isFillCE || isStrokeCE) {\n if(isFillCE) {\n this.__conicGradient(renderMode, ctx, list, isMulti, res);\n }\n else if(fill && fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n if(strokeWidth > 0 && isStrokeCE) {\n inject.warn('Stroke style can not use conic-gradient');\n }\n else if(strokeWidth > 0 && stroke && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n }\n else if(isFillRE || isStrokeRE) {\n if(isFillRE) {\n this.__radialEllipse(renderMode, ctx, list, isMulti, res, 'fill');\n }\n else if(fill && fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n // stroke椭圆渐变matrix会变形,降级为圆\n if(strokeWidth > 0 && isStrokeRE) {\n inject.warn('Stroke style can not use radial-gradient for ellipse');\n res.stroke = res.stroke.v[0];\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n else if(strokeWidth > 0 && stroke && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n }\n else {\n if(fill && fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true, false);\n }\n if(strokeWidth > 0 && stroke && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n }\n }\n\n __genSector(edge, d, fill, stroke, strokeWidth, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit) {\n if(edge) {\n let props = [\n ['d', d[0]],\n ['fill', fill.v || fill],\n ['stroke', stroke.v || stroke],\n ['stroke-width', strokeWidth],\n ];\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n this.addGeom('path', props);\n }\n else {\n this.addGeom('path', [\n ['d', d[0]],\n ['fill', fill.v || fill],\n ]);\n if(strokeWidth > 0) {\n let props = [\n ['d', d[1]],\n ['fill', 'none'],\n ['stroke', stroke.v || stroke],\n ['stroke-width', strokeWidth],\n ];\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n this.addGeom('path', props);\n }\n }\n }\n\n get begin() {\n return this.getProps('begin');\n }\n\n get end() {\n return this.getProps('end');\n }\n\n get r() {\n return this.getProps('r');\n }\n\n get edge() {\n return this.getProps('edge');\n }\n\n // >180°时是否链接端点\n get closure() {\n return this.getProps('closure');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n isMulti, __cacheProps,\n __x3: originX, __y3: originY, width, height,\n computedStyle: {\n [STROKE_WIDTH]: strokeWidth,\n }\n } = this;\n let cx = originX + width * 0.5;\n let cy = originY + height * 0.5;\n this.buildCache(cx, cy);\n let r = 0;\n if(isMulti) {\n let max = 0;\n __cacheProps.r.forEach(r => {\n max = Math.max(r, max);\n });\n r = max;\n }\n else {\n r = __cacheProps.r;\n }\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(half, item);\n });\n half = Math.ceil(half * 0.5) + 1;\n let xa = cx - r - half;\n let xb = cx + r - half;\n let ya = cy - r + half;\n let yb = cy + r + half;\n bbox[0] = Math.min(bbox[0], xa);\n bbox[1] = Math.min(bbox[1], ya);\n bbox[2] = Math.max(bbox[2], xb);\n bbox[3] = Math.max(bbox[3], yb);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Sector;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\nimport mode from '../../refresh/mode';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n} } = enums;\nconst { isNil } = util;\n\nfunction genVertex(x, y, width, height, rx = 0, ry = 0) {\n if(rx === 0 || ry === 0) {\n return [\n [x, y],\n [x + width, y],\n [x + width, y + height],\n [x, y + height],\n [x, y],\n ];\n }\n let ox = rx * geom.H;\n let oy = ry * geom.H;\n return [\n [x + rx, y],\n [x + width - rx, y],\n [x + width + ox - rx, y, x + width, y + ry - oy, x + width, y + ry],\n [x + width, y + height - ry],\n [x + width, y + height + oy - ry, x + width + ox - rx, y + height, x + width - rx, y + height],\n [x + rx, y + height],\n [x + rx - ox, y + height, x, y + height + oy - ry, x, y + height - ry],\n [x, y + ry],\n [x, y + ry - oy, x + rx - ox, y, x + rx, y]\n ];\n}\n\n\nfunction getR(v) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = 0;\n }\n return v;\n}\n\nclass Rect extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 圆角\n if(this.isMulti) {\n this.__rx = [0];\n this.__ry = [0];\n if(Array.isArray(props.rx)) {\n this.__rx = props.rx.map(i => getR(i));\n }\n if(Array.isArray(props.ry)) {\n this.__ry = props.ry.map(i => getR(i));\n }\n }\n else {\n this.__rx = this.__ry = 0;\n if(!isNil(props.rx)) {\n this.__rx = getR(props.rx);\n }\n if(!isNil(props.ry)) {\n this.__ry = getR(props.ry);\n }\n }\n }\n\n buildCache(originX, originY, focus) {\n let { width, height, rx, ry, __cacheProps, isMulti } = this;\n let rebuild;\n if(isNil(__cacheProps.rx) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.rx = rx.map(rx => Math.min(rx, 0.5) * width);\n }\n else {\n __cacheProps.rx = Math.min(rx, 0.5) * width;\n }\n }\n if(isNil(__cacheProps.ry) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.ry = rx.map(ry => Math.min(ry, 0.5) * height);\n }\n else {\n __cacheProps.ry = Math.min(ry, 0.5) * height;\n }\n }\n if(rebuild) {\n let { rx, ry } = __cacheProps;\n if(isMulti) {\n __cacheProps.list = rx.map((rx, i) => genVertex(originX, originY, width, height, rx, ry[i]));\n }\n else {\n __cacheProps.list = genVertex(originX, originY, width, height, rx, ry);\n }\n }\n return rebuild;\n }\n\n render(renderMode, ctx, dx, dy) {\n let res = super.render(renderMode, ctx, dx, dy);\n if(res.break || renderMode === mode.WEBGL) {\n return res;\n }\n this.buildCache(res.x3, res.y3);\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get rx() {\n return this.getProps('rx');\n }\n\n get ry() {\n return this.getProps('ry');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n __x3: originX, __y3: originY, width, height,\n computedStyle: {\n [STROKE_WIDTH]: strokeWidth,\n }\n } = this;\n this.buildCache(originX, originY);\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(half, item);\n });\n half = Math.ceil(half * 0.5) + 1;\n bbox[0] = Math.min(bbox[0], originX - half);\n bbox[1] = Math.min(bbox[1], originY - half);\n bbox[2] = Math.max(bbox[2], originX + width + half);\n bbox[3] = Math.max(bbox[3], originY + height + half);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Rect;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\nimport mode from '../../refresh/mode';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n} } = enums;\nconst { isNil } = util;\n\nfunction getR(v) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = 1;\n }\n return v;\n}\n\nclass Circle extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 半径[0, ∞),默认1\n if(this.isMulti) {\n this.__r = [1];\n if(Array.isArray(props.r)) {\n this.__r = props.r.map(i => getR(i));\n }\n else if(!isNil(props.r)) {\n this.__r = getR(props.r);\n }\n }\n else {\n this.__r = 1;\n if(!isNil(props.r)) {\n this.__r = getR(props.r);\n }\n }\n }\n\n buildCache(cx, cy, focus) {\n let { width, r, __cacheProps, isMulti } = this;\n if(isNil(__cacheProps.r) || focus) {\n if(isMulti) {\n __cacheProps.r = r.map(i => i * width * 0.5);\n __cacheProps.list = __cacheProps.r.map(r => geom.ellipsePoints(cx, cy, r, r));\n }\n else {\n __cacheProps.r = r * width * 0.5;\n __cacheProps.list = geom.ellipsePoints(cx, cy, __cacheProps.r, __cacheProps.r);\n }\n }\n }\n\n render(renderMode, ctx, dx, dy) {\n let res = super.render(renderMode, ctx, dx, dy);\n if(res.break || renderMode === mode.WEBGL) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get r() {\n return this.getProps('r');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n isMulti, __cacheProps,\n __x3: originX, __y3: originY, width, height,\n computedStyle: {\n [STROKE_WIDTH]: strokeWidth,\n }\n } = this;\n let cx = originX + width * 0.5;\n let cy = originY + height * 0.5;\n this.buildCache(cx, cy);\n let r = 0;\n if(isMulti) {\n let max = 0;\n __cacheProps.r.forEach(r => {\n max = Math.max(r, max);\n });\n r = max;\n }\n else {\n r = __cacheProps.r;\n }\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(half, item);\n });\n half = Math.ceil(half * 0.5) + 1;\n let xa = cx - r - half;\n let ya = cy - r - half;\n let xb = cx + r + half;\n let yb = cy + r + half;\n bbox[0] = Math.min(bbox[0], xa);\n bbox[1] = Math.min(bbox[1], ya);\n bbox[2] = Math.max(bbox[2], xb);\n bbox[3] = Math.max(bbox[3], yb);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Circle;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\nimport mode from '../../refresh/mode';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n} } = enums;\nconst { isNil } = util;\n\nfunction getR(v) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = 1;\n }\n return v;\n}\n\nclass Ellipse extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 半径[0, ∞),默认1\n if(this.isMulti) {\n this.__rx = [1];\n this.__ry = [1];\n if(Array.isArray(props.rx)) {\n this.__rx = props.rx.map(i => getR(i));\n }\n else if(!isNil(props.rx)) {\n this.__rx = [getR(props.rx)];\n }\n if(Array.isArray(props.ry)) {\n this.__ry = props.ry.map(i => getR(i));\n }\n else if(!isNil(props.ry)) {\n this.__ry = [getR(props.ry)];\n }\n }\n else {\n this.__rx = 1;\n if(!isNil(props.rx)) {\n this.__rx = getR(props.rx);\n }\n this.__ry = 1;\n if(!isNil(props.ry)) {\n this.__ry = getR(props.ry);\n }\n }\n }\n\n buildCache(cx, cy, focus) {\n let { width, height, rx, ry, __cacheProps, isMulti } = this;\n let rebuild;\n if(isNil(__cacheProps.rx) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.rx = rx.map(i => i * width * 0.5);\n }\n else {\n __cacheProps.rx = rx * width * 0.5;\n }\n }\n if(isNil(__cacheProps.ry) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.ry = ry.map(i => i * height * 0.5);\n }\n else {\n __cacheProps.ry = ry * height * 0.5;\n }\n }\n if(rebuild) {\n let { rx, ry } = __cacheProps;\n if(isMulti) {\n __cacheProps.list = rx.map((rx, i) => geom.ellipsePoints(cx, cy, rx, ry[i]));\n }\n else {\n __cacheProps.list = geom.ellipsePoints(cx, cy, rx, ry);\n }\n }\n return rebuild;\n }\n\n render(renderMode, ctx, dx, dy) {\n let res = super.render(renderMode, ctx, dx, dy);\n if(res.break || renderMode === mode.WEBGL) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get rx() {\n return this.getProps('rx');\n }\n\n get ry() {\n return this.getProps('ry');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n isMulti, __cacheProps,\n __x3: originX, __y3: originY, width, height,\n computedStyle: {\n [STROKE_WIDTH]: strokeWidth,\n }\n } = this;\n let cx = originX + width * 0.5;\n let cy = originY + height * 0.5;\n this.buildCache(cx, cy);\n let rx = 0, ry = 0;\n if(isMulti) {\n let mx = 0, my = 0;\n __cacheProps.rx.forEach((rx, i) => {\n mx = Math.max(rx, mx);\n my = Math.max(ry, __cacheProps.ry[i]);\n });\n rx = mx;\n ry = my;\n }\n else {\n rx = __cacheProps.rx;\n ry = __cacheProps.ry;\n }\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(half, item);\n });\n half = Math.ceil(half * 0.5) + 1;\n let xa = cx - rx - half;\n let xb = cx + rx + half;\n let ya = cy - ry - half;\n let yb = cy + ry + half;\n bbox[0] = Math.min(bbox[0], xa);\n bbox[1] = Math.min(bbox[1], ya);\n bbox[2] = Math.max(bbox[2], xb);\n bbox[3] = Math.max(bbox[3], yb);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Ellipse;\n","import Node from '../node/Node';\nimport Component from '../node/Component';\nimport util from '../util/util';\n\nlet { isPrimitive } = util;\n\n/**\n * 入口方法,animateRecords记录所有的动画结果等初始化后分配开始动画\n * hash为library库的hash格式,将原本数组转为id和value访问,每递归遇到library形成一个新的scope重新初始化\n * offsetTime默认0,递归传下去为右libraryId引用的元素增加偏移时间,为了库元素动画复用而开始时间不同\n * @param karas\n * @param json\n * @param animateRecords\n * @param opt\n * @param offsetTime\n * @returns {Node|Component|*}\n */\nfunction parse(karas, json, animateRecords, opt, offsetTime) {\n if(isPrimitive(json) || json instanceof Node || json instanceof Component) {\n return json;\n }\n if(Array.isArray(json)) {\n return json.map(item => {\n return parse(karas, item, animateRecords, opt, offsetTime);\n });\n }\n let oft = offsetTime; // 暂存,后续生成动画用这个值\n offsetTime += json.offsetTime || 0; // 可能有时间偏移加上为递归准备\n let { tagName, props = {}, children = [], animate = [] } = json;\n if(!tagName) {\n throw new Error('Dom must have a tagName: ' + JSON.stringify(json));\n }\n if(!Array.isArray(children)) {\n throw new Error('children must be an array');\n }\n let vd;\n if(tagName.charAt(0) === '$') {\n vd = karas.createGm(tagName, props);\n }\n else if(/^[A-Z]/.test(tagName)) {\n let cp = Component.getRegister(tagName);\n vd = karas.createCp(cp, props, children.map(item => {\n return parse(karas, item, animateRecords, opt, offsetTime);\n }));\n }\n else {\n vd = karas.createVd(tagName, props, children.map(item => {\n return parse(karas, item, animateRecords, opt, offsetTime);\n }));\n }\n if(animate) {\n if(!Array.isArray(animate)) {\n animate = [animate];\n }\n let has;\n animate.forEach(item => {\n let { value } = item;\n // 忽略空动画\n if(Array.isArray(value) && value.length) {\n has = true;\n }\n });\n // 产生实际动画运行才存入列表供root调用执行\n if(has) {\n animateRecords.push({\n animate,\n target: vd,\n offsetTime: oft,\n });\n }\n }\n return vd;\n}\n\nexport default parse;\n","import reset from '../style/reset';\n\nlet fullCssProperty = {\n skewX: 'kx',\n skewY: 'ky',\n transform: 'tf',\n fontSize: 'fz',\n offset: 'os',\n easing: 'e',\n filter: 'ft',\n boxShadow: 'bd',\n overflow: 'of',\n backgroundClip: 'bp',\n textOverflow: 'tof',\n flexWrap: 'fp',\n perspective: 'ppt',\n rotate3d: 'r3',\n};\n\nlet abbrCssProperty = {\n os: 'offset', // 非css属性不会被下面反向遍历插入,手动\n e: 'easing',\n};\n\nlet fullAnimate = {\n value: 'v',\n options: 'o',\n};\n\nlet abbrAnimate = {};\n\nlet fullAnimateOption = {\n duration: 'dt',\n delay: 'd',\n endDelay: 'ed',\n iterations: 'i',\n direction: 'dc',\n fill: 'f',\n fps: 'fp',\n playbackRate: 'p',\n spfLimit: 'sl',\n};\n\nlet abbrAnimateOption = {};\n\nreset.DOM_KEY_SET.concat(reset.GEOM_KEY_SET).forEach(k => {\n if(fullCssProperty.hasOwnProperty(k)) {\n abbrCssProperty[fullCssProperty[k]] = k;\n return;\n }\n let v = k.charAt(0) + k.replace(/[a-z]/g, '').toLowerCase();\n fullCssProperty[k] = v;\n abbrCssProperty[v] = k;\n});\n\nObject.keys(fullAnimate).forEach(k => {\n abbrAnimate[fullAnimate[k]] = k;\n});\n\nObject.keys(fullAnimateOption).forEach(k => {\n abbrAnimateOption[fullAnimateOption[k]] = k;\n});\n\nexport default {\n fullCssProperty,\n abbrCssProperty,\n fullAnimate,\n abbrAnimate,\n fullAnimateOption,\n abbrAnimateOption,\n};\n","import abbr from './abbr';\nimport inject from '../util/inject';\nimport util from '../util/util';\nimport Node from '../node/Node';\nimport Component from '../node/Component';\n\nlet { isNil, isFunction, isPrimitive, clone, extend } = util;\nlet { abbrCssProperty, abbrAnimateOption, abbrAnimate } = abbr;\n\n/**\n * 还原缩写到全称,涉及样式和动画属性,已过时\n * @param target 还原的对象\n * @param hash 缩写映射\n */\nfunction abbr2full(target, hash) {\n // 也许节点没写样式\n if(target) {\n Object.keys(target).forEach(k => {\n // var-attr格式特殊考虑,仅映射attr部分,var-还要保留\n if(k.indexOf('var-') === 0) {\n let k2 = k.slice(4);\n if(hash.hasOwnProperty(k2)) {\n let fk = hash[k2];\n target['var-' + fk] = target[k];\n // delete target[k];\n }\n }\n // 普通样式缩写还原\n else if(hash.hasOwnProperty(k)) {\n let fk = hash[k];\n target[fk] = target[k];\n // 删除以免二次解析\n delete target[k];\n }\n });\n }\n}\n\n/**\n * 链接json中的某个child到library文件,\n * props需要是clone的,因为防止多个child使用同一个库文件\n * children则直接引用,无需担心多个使用同一个\n * library也需要带上,在library直接子元素还包含library时会用到\n * @param child\n * @param libraryItem\n */\nfunction linkLibrary(child, libraryItem) {\n // 规定图层child只有init和动画,属性和子图层来自库\n child.tagName = libraryItem.tagName;\n child.props = clone(libraryItem.props) || {};\n child.children = libraryItem.children || [];\n if(libraryItem.vars && !child.vars) {\n child.vars = libraryItem.vars;\n }\n if(libraryItem.library) {\n child.library = libraryItem.library;\n }\n // library的var-也要继承过来,本身的var-优先级更高,目前只有children会出现优先级情况\n Object.keys(libraryItem).forEach(k => {\n if(k.indexOf('var-') === 0 && !child.hasOwnProperty(k)) {\n child[k] = libraryItem[k];\n }\n });\n // 删除以免二次解析\n delete child.libraryId;\n let init = child.init;\n if(init) {\n let props = child.props;\n let style = props.style;\n extend(props, init);\n // style特殊处理,防止被上面覆盖丢失原始值\n if(style) {\n extend(style, init.style);\n props.style = style;\n }\n // 删除以免二次解析\n delete child.init;\n }\n}\n\n/**\n * 遍历一遍library的一级,将一级的id存到hash上,无需递归二级,\n * 因为顺序前提要求排好且无循环依赖,所以被用到的一定在前面出现,\n * 一般是无children的元件在前,包含children的div在后\n * 即便library中的元素有children或library,在linkChild时将其link过去,parse递归会继续处理\n * @param item:library的一级孩子\n * @param hash:存放library的key/value引用\n */\nfunction initLibrary(item, hash) {\n let id = item.id;\n // library中一定有id,因为是一级,二级+特殊需求才会出现放开\n if(isNil(id)) {\n throw new Error('Library item miss id: ' + JSON.stringify(item));\n }\n else {\n hash[id] = item;\n }\n}\n\n// 有library的json一级初始化library供链接前,可以替换library里的内容\nfunction replaceLibraryVars(json, hash, vars) {\n // 新版同级vars语法,增加可以修改library子元素中递归子属性\n if(json.hasOwnProperty('vars')) {\n let slot = json.vars;\n delete json.vars;\n if(!Array.isArray(slot)) {\n slot = [slot];\n }\n slot.forEach(item => {\n let { id, member } = item;\n if(!Array.isArray(member)) {\n member = [member];\n }\n // library.xxx,需要>=2的长度,开头必须是library\n if(Array.isArray(member) && member.length > 1 && vars && vars.hasOwnProperty(id)) {\n if(member[0] === 'library') {\n let target = hash;\n for(let i = 1, len = member.length; i < len; i++) {\n let k = member[i];\n // 最后一个属性可以为空\n if(target.hasOwnProperty(k) || i === len - 1) {\n // 最后一个member表达式替换\n if(i === len - 1) {\n let v = vars[id];\n let old = target[k];\n // 支持函数模式和值模式\n if(isFunction(v)) {\n v = v(old);\n }\n // 直接替换library的子对象,需补充id和tagName\n if(i === 1) {\n target[k] = Object.assign({ id: old.id, tagName: old.tagName }, v);\n }\n // 替换library中子对象的一个属性直接赋值\n else {\n target[k] = v;\n }\n }\n // 子属性继续下去\n else {\n target = target[k];\n }\n }\n else {\n inject.error('Library slot miss ' + k);\n return;\n }\n }\n }\n }\n });\n }\n // 兼容老版var-,只支持一级library元素\n else {\n Object.keys(json).forEach(k => {\n if(k.indexOf('var-library.') === 0) {\n let v = json[k];\n delete json[k];\n if(!v || !vars) {\n return;\n }\n let k2 = k.slice(12);\n // 有id且变量里面传入了替换的值\n if(k2 && v.id && vars.hasOwnProperty(v.id)) {\n let value = vars[v.id];\n if(isFunction(value)) {\n value = value(v);\n }\n // library对象也要加上id,与正常的library保持一致\n hash[k2] = Object.assign({ id: k2 }, value);\n }\n }\n });\n }\n}\n\nfunction replaceVars(json, vars) {\n if(json) {\n // 新版vars语法\n if(json.hasOwnProperty('vars')) {\n let slot = json.vars;\n delete json.vars;\n if(!Array.isArray(slot)) {\n slot = [slot];\n }\n if(Array.isArray(slot)) {\n slot.forEach(item => {\n let { id, member } = item;\n if(!Array.isArray(member)) {\n member = [member];\n }\n // 排除特殊的library\n if(Array.isArray(member) && member.length && member[0] !== 'library' && vars && vars.hasOwnProperty(id)) {\n let target = json;\n for(let i = 0, len = member.length; i < len; i++) {\n let k = member[i];\n // 最后一个属性可以为空\n if(target.hasOwnProperty(k) || i === len - 1) {\n // 最后一个member表达式替换\n if(i === len - 1) {\n let v = vars[id];\n // undefined和null意义不同\n if(v === undefined) {\n return;\n }\n // 支持函数模式和值模式\n if(isFunction(v)) {\n v = v(target[k]);\n }\n target[k] = v;\n }\n else {\n target = target[k];\n }\n }\n else {\n inject.error('Slot miss ' + k);\n return;\n }\n }\n }\n });\n }\n }\n else {\n Object.keys(json).forEach(k => {\n if(k.indexOf('var-') === 0) {\n let v = json[k];\n delete json[k];\n if(!v || !vars) {\n return;\n }\n let k2 = k.slice(4);\n // 有id且变量里面传入了替换的值,值可为null,因为某些情况下空为自动\n if(k2 && v.id && vars.hasOwnProperty(v.id)) {\n let value = vars[v.id];\n // undefined和null意义不同\n if(value === undefined) {\n return;\n }\n let target = json;\n // 如果有.则特殊处理子属性\n if(k2.indexOf('.') > -1) {\n let list = k2.split('.');\n let len = list.length;\n for(let i = 0; i < len - 1; i++) {\n k2 = list[i];\n // 避免异常\n if(target[k2]) {\n target = target[k2];\n }\n else {\n inject.warn('parseJson vars is not exist: ' + v.id + ', ' + k + ', ' + list.slice(0, i).join('.'));\n return;\n }\n }\n k2 = list[len - 1];\n }\n // 支持函数模式和值模式\n if(isFunction(value)) {\n value = value(v);\n }\n target[k2] = value;\n }\n }\n });\n }\n }\n}\n\n// parse的options可以传总的duration等\nfunction replaceAnimateOptions(options, opt) {\n ['iterations', 'fill', 'duration', 'direction', 'easing', 'fps', 'delay', 'endDelay', 'playbackRate', 'spfLimit'].forEach(k => {\n if(opt.hasOwnProperty(k)) {\n options[k] = opt[k];\n }\n });\n}\n\nfunction apply(json, opt, hash) {\n if(isPrimitive(json) || json instanceof Node || json instanceof Component) {\n return json;\n }\n if(Array.isArray(json)) {\n return json.map(item => apply(item, opt, hash));\n }\n // 先判断是否是个链接到库的节点,是则进行链接操作\n let libraryId = json.libraryId;\n if(!isNil(libraryId)) {\n let libraryItem = hash[libraryId];\n // 规定图层child只有init和动画,tagName和属性和子图层来自库\n if(libraryItem) {\n linkLibrary(json, libraryItem);\n }\n else {\n throw new Error('Link library miss id: ' + libraryId);\n }\n }\n // 再判断是否有library形成一个新的作用域,会出现library下的library使得一个链接节点链接后出现library的情况\n let library = json.library;\n if(Array.isArray(library)) {\n hash = {};\n library.forEach(item => initLibrary(item, hash));\n // 替换library插槽\n replaceLibraryVars(json, hash, opt.vars);\n delete json.library;\n }\n let { tagName, props = {}, children = [], animate = [] } = json;\n if(!tagName) {\n throw new Error('Dom must have a tagName: ' + JSON.stringify(json));\n }\n // 缩写src和font\n let src = props.src;\n if(/^#\\d+$/.test(src)) {\n let imgs = opt.imgs, i = parseInt(src.slice(1));\n if(Array.isArray(imgs)) {\n props.src = imgs[i];\n }\n }\n let style = props.style;\n if(style) {\n let fontFamily = style.fontFamily;\n if(/^#\\d+$/.test(fontFamily)) {\n let fonts = opt.fonts, i = parseInt(fontFamily.slice(1));\n if(Array.isArray(fonts)) {\n style.fontFamily = fonts[i];\n }\n }\n (opt.abbr !== false) && abbr2full(style, abbrCssProperty);\n // 先替换style的\n replaceVars(style, opt.vars);\n }\n // 再替换静态属性,style也作为属性的一种\n replaceVars(props, opt.vars);\n // 替换children里的内容,如文字,无法直接替换tagName/props/children/animate本身,因为下方用的还是原引用\n replaceVars(json, opt.vars);\n json.children = apply(children, opt, hash);\n if(animate) {\n if(!Array.isArray(animate)) {\n animate = [animate];\n }\n animate.forEach(item => {\n (opt.abbr !== false) && abbr2full(item, abbrAnimate);\n let { value, options } = item;\n // 忽略空动画\n if(Array.isArray(value) && value.length) {\n value.forEach(item => {\n (opt.abbr !== false) && abbr2full(item, abbrCssProperty);\n replaceVars(item, opt.vars);\n });\n }\n if(options) {\n (opt.abbr !== false) && abbr2full(options, abbrAnimateOption);\n replaceVars(options, opt.vars);\n replaceAnimateOptions(options, opt);\n }\n });\n }\n return json;\n}\n\n// 将library、vars应用于json,转换json为一个普通的原始json数据\nexport default function(json, options = {}) {\n // json中定义无abbr\n if(json.abbr === false) {\n options.abbr = false;\n }\n if(options.abbr !== false) {\n inject.warn('Abbr in json is deprecated');\n }\n // 特殊单例声明无需clone加速解析\n if(!options.singleton && !json.singleton) {\n json = util.clone(json);\n }\n return apply(json, options, {});\n}\n","import parse from './parse';\nimport abbr from './abbr';\nimport inject from '../util/inject';\nimport util from '../util/util';\nimport font from '../style/font';\nimport Controller from '../animate/Controller';\nimport apply from './apply';\n\nlet o = {\n apply,\n parse(karas, json, dom, options) {\n if(!json) {\n return;\n }\n // 根节点的fonts字段定义字体信息\n let fonts = json.fonts;\n if(fonts) {\n if(!Array.isArray(fonts)) {\n fonts = [fonts];\n }\n fonts.forEach(item => {\n let { fontFamily, url, data } = item;\n if(fontFamily && (url || data)) {\n font.register(fontFamily, url, data);\n }\n });\n }\n // 重载,在确定dom传入选择器字符串或html节点对象时作为渲染功能,否则仅创建vd返回\n if(!inject.isDom(dom)) {\n options = options || dom || {};\n dom = null;\n }\n else {\n options = options || {};\n }\n json = apply(json, options);\n // 暂存所有动画声明,等root的生成后开始执行\n let animateRecords = [];\n let vd = parse(karas, json, animateRecords, options, 0);\n // 有dom时parse作为根方法渲染\n if(dom) {\n let { tagName } = json;\n if(['canvas', 'svg', 'webgl'].indexOf(tagName) === -1) {\n throw new Error('Parse dom must be canvas/svg/webgl');\n }\n // parse直接(非递归)的动画记录\n let ac = options.controller instanceof Controller ? options.controller : vd.animateController;\n // 第一次render,收集递归json里面的animateRecords,它在xom的__layout最后生成\n karas.render(vd, dom);\n // 由于vd首先生成的都是json,根parse要特殊处理将target指向真正的vd引用,json的vd在builder中赋值\n // animateRecords.forEach(item => {\n // item.target = item.target.vd;\n // });\n // 直接的json里的animateRecords,再加上递归的parse的json的(第一次render布局时处理)动画一并播放\n if(options.autoPlay !== false) {\n ac.__records = ac.__records.concat(animateRecords);\n ac.__playAuto();\n }\n // 不自动播放进入记录列表,初始化并等待手动调用\n else {\n ac.__records2 = ac.__records2.concat(animateRecords);\n ac.init(ac.__records2, ac.list2);\n }\n }\n // 递归的parse,如果有动画,此时还没root,先暂存下来,等上面的root的render第一次布局时收集\n else {\n if(animateRecords.length) {\n vd.__animateRecords = {\n options,\n list: animateRecords,\n controller: options.controller instanceof Controller ? options.controller : null,\n };\n }\n }\n return vd;\n },\n loadAndParse(karas, json, dom, options) {\n let { fonts, components, imgs } = json;\n let list1 = [];\n let list2 = [];\n let list3 = [];\n if(fonts) {\n if(!Array.isArray(fonts)) {\n fonts = [fonts];\n }\n fonts.forEach(item => {\n let url = item.url;\n if(url) {\n list1.push(item);\n }\n });\n }\n if(components) {\n if(!Array.isArray(components)) {\n components = [components];\n }\n components.forEach(item => {\n let { tagName, url, reload } = item;\n // 如果没申明reload且已经被注册,则无需重复加载\n if(tagName && karas.Component.hasRegister(tagName) && !reload) {\n return;\n }\n // 即便没有tagName也要加载,可能组件内部执行了注册逻辑\n if(url) {\n list2.push(item);\n }\n });\n }\n if(imgs) {\n if(!Array.isArray(imgs)) {\n imgs = [imgs];\n }\n imgs.forEach(item => {\n let url = item.url;\n if(url) {\n list3.push(url);\n }\n });\n }\n let a = list1.length, b = list2.length, c = list3.length;\n let count = 0;\n let cb = function() {\n if(count === a + b + c) {\n let res = o.parse(karas, json, dom, options);\n if(options && util.isFunction(options.callback)) {\n options.callback(res);\n }\n }\n };\n if(a || b || c) {\n karas.inject.loadFont(list1, function() {\n count += a;\n cb();\n });\n karas.inject.loadComponent(list2.map(item => item.url), function() {\n count += b;\n // 默认约定加载的js组件会在全局变量申明同名tagName,已有不覆盖,防止组件代码内部本身有register\n list2.forEach(item => {\n let tagName = item.tagName;\n if(tagName && window[tagName] && !karas.Component.hasRegister(tagName)) {\n karas.Component.register(tagName, window[tagName]);\n }\n });\n cb();\n });\n karas.inject.measureImg(list3, function() {\n count += c;\n cb();\n });\n }\n else {\n cb();\n }\n },\n abbr,\n};\n\nexport default o;\n","import css from './css';\nimport reset from './reset';\nimport unit from './unit';\nimport font from './font';\nimport abbr from './abbr';\nimport transform from './transform';\n\nexport default {\n css,\n reset,\n unit,\n font,\n abbr,\n transform,\n};\n","import Animation from './Animation';\nimport Controller from './Controller';\nimport easing from './easing';\nimport frame from './frame';\n\nexport default {\n Animation,\n Controller,\n easing,\n frame,\n};\n","import matrix from './matrix';\nimport geom from './geom';\n\n// 一条边相对于自己开始点的x向量角度,即从x到此边旋转,0~180和-180~0,需要判断象限\nfunction calDeg(x1, y1, x2, y2) {\n let dx = x2 - x1;\n let dy = y2 - y1;\n let atan = Math.atan(Math.abs(dy) / Math.abs(dx));\n // 2象限\n if(dx < 0 && dy >= 0) {\n return Math.PI - atan;\n }\n // 3象限\n if(dx < 0 && dy < 0) {\n return atan - Math.PI;\n }\n // 1象限\n if(dx >= 0 && dy >= 0) {\n return atan;\n }\n // 4象限,顺时针正好\n return -atan;\n}\n\nfunction rotate(theta) {\n let sin = Math.sin(theta);\n let cos = Math.cos(theta);\n let t = matrix.identity();\n t[0] = t[5] = cos;\n t[1] = sin;\n t[4] = -sin;\n return t;\n}\n\n/**\n * 确保3个点中,a点在三角形左上方,b/c在右方,同时ab到ac要顺时针旋转\n * @param points\n */\nfunction pointIndex(points) {\n let [x1, y1, x2, y2, x3, y3] = points;\n let index = [0, 1, 2];\n // 将a点放入最左\n if(x2 < x1 && x2 < x3) {\n [x1, y1, x2, y2] = [x2, y2, x1, y1];\n index[0] = 1;\n index[1] = 0;\n }\n else if(x3 < x2 && x3 < x1) {\n [x1, y1, x3, y3] = [x3, y3, x1, y1];\n index[0] = 2;\n index[2] = 0;\n }\n // 有可能出现2个并列的情况,判断取上面那个\n if(x1 === x2) {\n if(y1 > y2) {\n [x1, y1, x2, y2] = [x2, y2, x1, y1];\n let t = index[0];\n index[0] = index[1];\n index[1] = t;\n }\n }\n else if(x1 === x3) {\n if(y1 > y3) {\n [x1, y1, x3, y3] = [x3, y3, x1, y1];\n let t = index[0];\n index[0] = index[2];\n index[2] = t;\n }\n }\n // ab到ac要顺时针旋转,即2个向量夹角为正,用向量叉乘判断正负\n let cross = (x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1);\n if(cross < 0) {\n [x2, y2, x3, y3] = [x3, y3, x2, y2];\n let t = index[1];\n index[1] = index[2];\n index[2] = t;\n }\n return [x1, y1, x2, y2, x3, y3, index];\n}\n\n/**\n * 第2个点根据第一个点的交换顺序交换\n * @param points\n * @param index\n * @returns {[]}\n */\nfunction pointByIndex(points, index) {\n let res = [];\n for(let i = 0, len = index.length; i < len; i++) {\n let j = index[i];\n res.push(points[j * 2]);\n res.push(points[j * 2 + 1]);\n }\n return res;\n}\n\n/**\n * 确保3个点中,a点在三角形左上方,b/c在右方,同时ab到ac要顺时针旋转\n * @param source 源3个点\n * @param target 目标3个点\n * @returns 交换顺序后的点坐标\n */\nfunction exchangeOrder(source, target) {\n let [sx1, sy1, sx2, sy2, sx3, sy3, index] = pointIndex(source);\n let [tx1, ty1, tx2, ty2, tx3, ty3] = pointByIndex(target, index);\n return [\n [sx1, sy1, sx2, sy2, sx3, sy3],\n [tx1, ty1, tx2, ty2, tx3, ty3]\n ];\n}\n\n/**\n * 存在一种情况,变换结果使得三角形镜像相反了,即顶点a越过bc线,判断是否溢出\n * @param source\n * @param target\n * @returns {boolean}是否溢出\n */\nfunction isOverflow(source, target) {\n let [sx1, sy1, sx2, sy2, sx3, sy3] = source;\n let [tx1, ty1, tx2, ty2, tx3, ty3] = target;\n let cross1 = (sx2 - sx1) * (sy3 - sy1) - (sx3 - sx1) * (sy2 - sy1);\n let cross2 = (tx2 - tx1) * (ty3 - ty1) - (tx3 - tx1) * (ty2 - ty1);\n return cross1 > 0 && cross2 < 0 || cross1 < 0 && cross2 > 0;\n}\n\nfunction transform(source, target) {\n let [sx1, sy1, sx2, sy2, sx3, sy3] = source;\n let [tx1, ty1, tx2, ty2, tx3, ty3] = target;\n // 记录翻转\n let overflow = isOverflow(source, target);\n // 第0步,将源三角第1个a点移到原点\n let m = matrix.identity();\n m[12] = -sx1;\n m[13] = -sy1;\n let t;\n // 第1步,以第1条边ab为基准,将其贴合x轴上,为后续倾斜不干扰做准备\n let theta = calDeg(sx1, sy1, sx2, sy2);\n if(theta !== 0) {\n t = rotate(-theta);\n m = matrix.multiply(t, m);\n }\n // 第2步,以第1条边AB为基准,缩放x轴ab至目标相同长度,可与4步合并\n let ls = geom.pointsDistance(sx1, sy1, sx2, sy2);\n let lt = geom.pointsDistance(tx1, ty1, tx2, ty2);\n // if(ls !== lt) {\n // let scale = lt / ls;\n // t = matrix.identity();\n // t[0] = scale;\n // m = matrix.multiply(t, m);\n // }\n // 第3步,缩放y,先将目标三角形旋转到x轴平行,再变换坐标计算\n let n = matrix.identity();\n n[12] = -tx1;\n n[13] = -ty1;\n theta = calDeg(tx1, ty1, tx2, ty2);\n // 记录下这个旋转角度,后面源三角形要反向旋转\n let alpha = theta;\n if(theta !== 0) {\n t = rotate(-theta);\n n = matrix.multiply(t, n);\n }\n // 目标三角反向旋转至x轴后的坐标\n // 源三角目前的第3点坐标y值即为长度,因为a点在原点0无需减去\n let ls2 = Math.abs(matrix.calPoint({ x: sx3, y: sy3 }, m).y);\n let lt2 = Math.abs(matrix.calPoint({ x: tx3, y: ty3 }, n).y);\n // 缩放y\n // if(ls2 !== lt2) {\n // let scale = lt / ls;\n // t = matrix.identity();\n // t[3] = scale;\n // m = matrix.multiply(t, m);\n // }\n if(ls !== lt || ls2 !== lt2) {\n t = matrix.identity();\n if(ls !== lt) {\n t[0] = lt / ls;\n }\n if(ls2 !== lt2) {\n t[5] = lt2 / ls2;\n }\n m = matrix.multiply(t, m);\n }\n // 第4步,x轴倾斜,用余弦定理求目前a和A的夹角\n n = m;\n let { x: ax1, y: ay1 } = matrix.calPoint({ x: sx1, y: sy1 }, n);\n let { x: ax2, y: ay2 } = matrix.calPoint({ x: sx2, y: sy2 }, n);\n let { x: ax3, y: ay3 } = matrix.calPoint({ x: sx3, y: sy3 }, n);\n let ab = geom.pointsDistance(ax1, ay1, ax2, ay2);\n let ac = geom.pointsDistance(ax1, ay1, ax3, ay3);\n let bc = geom.pointsDistance(ax3, ay3, ax2, ay2);\n let AB = geom.pointsDistance(tx1, ty1, tx2, ty2);\n let AC = geom.pointsDistance(tx1, ty1, tx3, ty3);\n let BC = geom.pointsDistance(tx3, ty3, tx2, ty2);\n let a = geom.angleBySide(bc, ab, ac);\n let A = geom.angleBySide(BC, AB, AC);\n // 先至90°,再旋转至目标角,可以合并成tan相加,不知道为什么不能直接tan倾斜差值角度\n if(a !== A) {\n t = matrix.identity();\n t[4] = Math.tan(a - Math.PI * 0.5) + Math.tan(Math.PI * 0.5 - A);\n m = matrix.multiply(t, m);\n }\n // 发生翻转时特殊处理按x轴垂直翻转\n if(overflow) {\n m[1] = -m[1];\n m[5] = -m[5];\n m[13] = -m[13];\n }\n // 第5步,再次旋转,角度为目标旋转到x轴的负值,可与下步合并\n if(alpha !== 0) {\n t = rotate(alpha);\n // m = matrix.multiply(t, m);\n }\n else {\n t = matrix.identity();\n }\n // 第6步,移动第一个点的差值\n // t = matrix.identity();\n t[12] = tx1;\n t[13] = ty1;\n return matrix.multiply(t, m);\n}\n\nexport default {\n exchangeOrder,\n isOverflow,\n transform,\n};\n","import matrix from './matrix';\nimport tar from './tar';\nimport vector from './vector';\nimport equation from './equation';\nimport geom from './geom';\nimport bezier from './bezier';\nimport isec from './isec';\n// import { union, diff, intersection, xor } from './martinez';\nimport bo from './bo/index';\n\nexport default {\n matrix,\n tar,\n vector,\n equation,\n geom,\n bezier,\n isec,\n booleanOperations: bo,\n};\n","import level from './level';\nimport change from './change';\nimport Page from './Page';\nimport Cache from './Cache';\nimport CanvasPage from './CanvasPage';\nimport CanvasCache from './CanvasCache';\n\nexport default {\n level,\n change,\n Page,\n Cache,\n CanvasPage,\n CanvasCache,\n};\n","import Node from './node/Node';\nimport Text from './node/Text';\nimport Xom from './node/Xom';\nimport Dom from './node/Dom';\nimport Img from './node/Img';\nimport Root from './node/Root';\nimport tag from './node/tag';\nimport mode from './refresh/mode';\nimport Geom from './node/geom/Geom';\nimport Line from './node/geom/Line';\nimport Polyline from './node/geom/Polyline';\nimport Polygon from './node/geom/Polygon';\nimport Sector from './node/geom/Sector';\nimport Rect from './node/geom/Rect';\nimport Circle from './node/geom/Circle';\nimport Ellipse from './node/geom/Ellipse';\nimport Component from './node/Component';\nimport Event from './util/Event';\nimport util from './util/util';\nimport inject from './util/inject';\nimport enums from './util/enums';\nimport debug from './util/debug';\nimport parser from './parser/index';\nimport style from './style/index';\nimport animate from './animate/index';\nimport math from './math/index';\nimport refresh from './refresh/index';\nimport { version } from '../package.json';\nimport ca from './gl/ca';\n\nGeom.register('$line', Line);\nGeom.register('$polyline', Polyline);\nGeom.register('$polygon', Polygon);\nGeom.register('$sector', Sector);\nGeom.register('$rect', Rect);\nGeom.register('$circle', Circle);\nGeom.register('$ellipse', Ellipse);\n\nlet karas = {\n version,\n render(root, dom) {\n if(!(root instanceof Root)) {\n throw new Error('Render dom must be canvas/svg/webgl');\n }\n if(dom) {\n root.appendTo(dom);\n }\n return root;\n },\n createElement(tagName, props) {\n props = props || {};\n let children = [];\n for(let i = 2, len = arguments.length; i < len; i++) {\n children.push(arguments[i]);\n }\n if(util.isString(tagName)) {\n if(tagName.charAt(0) === '$') {\n return this.createGm(tagName, props);\n }\n else {\n return this.createVd(tagName, props, children);\n }\n }\n else if(tagName) {\n // 特殊的$匿名类\n if(tagName instanceof Geom) {\n return this.createGm(tagName, props);\n }\n return this.createCp(tagName, props, children);\n }\n },\n createVd(tagName, props, children = []) {\n if(['canvas', 'svg', 'webgl'].indexOf(tagName) > -1) {\n return new Root(tagName, props, children);\n }\n if(tag.TAG_NAME.hasOwnProperty(tagName)) {\n if(tagName === 'img') {\n return new Img(tagName, props);\n }\n else {\n return new Dom(tagName, props, children);\n }\n }\n throw new Error(`Can not use <${tagName}>`);\n },\n createGm(tagName, props) {\n let klass = Geom.getRegister(tagName);\n return new klass(tagName, props);\n },\n createCp(klass, props, children = []) {\n props.children = children;\n return new klass(props, children);\n },\n parse(json, dom, options) {\n return parser.parse(this, json, dom, options);\n },\n loadAndParse(json, dom, options) {\n return parser.loadAndParse(this, json, dom, options);\n },\n mode,\n Component,\n Node,\n Text,\n Geom,\n Xom,\n Dom,\n Img,\n Root,\n Event,\n util,\n inject,\n style,\n parser,\n animate,\n math,\n refresh,\n enums,\n ca,\n set debug(v) {\n debug.flag = !!v;\n },\n};\n\nif(typeof window !== 'undefined') {\n window.karas = karas;\n}\nelse if(typeof self !== 'undefined') {\n self.karas = karas;\n}\n\nexport default karas;\n"],"names":["Node","__x","__y","__width","__height","__baseline","__verticalBaseline","__prev","__next","__parent","__domParent","__root","__host","__hostRoot","__virtualDom","__bbox","__filterBbox","__isDestroyed","lv","j","__struct","node","childIndex","diff","CANVAS","SVG","WEBGL","AUTO","PX","PERCENT","NUMBER","INHERIT","DEG","STRING","RGBA","REM","EM","VW","VH","VMAX","VMIN","GRADIENT","o","calUnit","v","n","parseFloat","test","u","identity","multiply","a","b","isE","c","i","a0","a1","a2","a3","multiplyTfo","m","x","y","tfoMultiply","d","h","l","p","multiplyTranslateX","multiplyTranslateY","multiplyTranslateZ","multiplyRotateX","sin","Math","cos","e","f","g","k","multiplyRotateY","multiplyRotateZ","multiplySkewX","tan","multiplySkewY","multiplyScaleX","multiplyScaleY","multiplyScaleZ","multiplyPerspective","max","calPoint","point","z","w","undefined","b1","c1","d1","b2","c2","d2","b3","c3","d3","a4","b4","c4","d4","inverse","length","inverse4","divisor","s","inv","det","m2m6","point2d","slice","calRectPoint","xa","ya","xb","yb","matrix","x1","y1","z1","w1","x3","y3","z3","w3","x2","y2","z2","w2","x4","y4","z4","w4","t","toString","isType","type","obj","call","isObject","isString","isFunction","isNumber","isBoolean","isDate","hasOwn","hasOwnProperty","fnToString","ObjectFunctionString","Object","isNil","joinSourceArray","arr","res","len","item","Array","isArray","stringify","encodeHtml","prop","replace","joinVirtualDom","vd","defs","forEach","joinDef","bb","joinVd","conClip","children","props","tagName","content","opacity","transform","visibility","mask","overflow","filter","mixBlendMode","def","uuid","joinItem","rgba2int","color","charAt","push","parseInt","match","int2rgba","floor","int2invert","joinArr","arr2hash","hash","list","keys","hash2arr","clone","util","Date","isPlainObject","equalArr","ai","bi","isArrayA","isArrayB","equal","getTime","extend","target","source","split","transformBbox","bbox","dx","dy","mx","min","proto","getPrototypeOf","Ctor","constructor","assignMatrix","prefixHex","replaceRgba2Hex","$0","$1","$2","$3","$4","isPrimitive","isAuto","flag","SPF","SUPPORT_OFFSCREEN_CANVAS","OffscreenCanvas","prototype","getContext","offscreenCanvas","key","width","height","message","debug","document","createElement","style","setAttribute","body","appendChild","ctx","canvas","enabled","available","release","globalAlpha","setTransform","clearRect","IMG","INIT","LOADING","LOADED","FONT","COMPONENT","div","SUPPORT_FONT","defaultFontFamilyData","createDiv","position","left","top","whiteSpace","inject","measureTextSync","str","ff","fs","fw","isUpright","fontFamily","fontSize","fontWeight","writingMode","innerHTML","window","getComputedStyle","measureTextListMax","cns","childNodes","measureImg","url","cb","count","cache","error","state","success","task","img","Image","onload","splice","onerror","substr","host","exec","location","hostname","crossOrigin","src","warn","console","requestAnimationFrame","bind","setTimeout","cancelAnimationFrame","id","clearTimeout","now","performance","hasOffscreenCanvas","getOffscreenCanvas","isDom","Element","self","getElementsByTagName","isWebGLTexture","WebGLTexture","defaultFontFamily","getFontCanvas","checkSupportFontFamily","toLowerCase","context","textAlign","fillStyle","textBaseline","font","fillText","getImageData","data","loadFont","ab","FontFace","load","then","fonts","add","ArrayBuffer","request","XMLHttpRequest","open","responseType","response","send","loadComponent","script","async","head","removeChild","TINF_OK","TINF_DATA_ERROR","Tree","table","Uint16Array","trans","Data","dest","sourceIndex","tag","bitcount","destLen","ltree","dtree","sltree","sdtree","length_bits","Uint8Array","length_base","dist_bits","dist_base","clcidx","code_tree","lengths","tinf_build_bits_base","bits","base","delta","first","sum","tinf_build_fixed_trees","lt","dt","offs","tinf_build_tree","off","num","tinf_getbit","bit","tinf_read_bits","val","tinf_decode_symbol","cur","tinf_decode_trees","hlit","hdist","hclen","clen","sym","prev","tinf_inflate_block_data","dist","tinf_inflate_uncompressed_block","invlength","tinf_uncompress","bfinal","btype","Error","subarray","getTag","dataView","offset","String","fromCharCode","getInt8","getUShort","getUint16","getULong","getUint32","getFixed","decimal","getInt16","fraction","parseOpenTypeTableEntries","numTables","tableEntries","checksum","compression","parseWOFFTableEntries","compLength","origLength","compressedLength","uncompressTable","tableEntry","inBuffer","buffer","outBuffer","inflate","byteLength","view","DataView","Parser","relativeOffset","minorBase","major","minor","parse","arrayBuffer","signature","flavor","emSquare","ascent","descent","lineGap","parseVersion","parseFixed","parseULong","parseUShort","abs","parseShort","CALLBACK","info","arial","lhr","blr","lgr","helvetica","verdana","tahoma","georgia","simsun","support","checked","register","name","fontInfo","r","opentype","setData","pop","__emitFontRegister","assign","hasRegister","hasLoaded","onRegister","offRegister","indexOf","DOM","display","right","bottom","marginTop","marginRight","marginBottom","marginLeft","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","lineHeight","backgroundImage","backgroundColor","backgroundSize","backgroundRepeat","backgroundPositionX","backgroundPositionY","backgroundClip","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","flexGrow","flexShrink","flexBasis","flexDirection","flexWrap","order","justifyContent","alignItems","alignSelf","alignContent","letterSpacing","transformOrigin","zIndex","translateX","translateY","translateZ","scaleX","scaleY","scaleZ","skewX","skewY","rotateX","rotateY","rotateZ","rotate3d","perspective","perspectiveOrigin","transformStyle","backfaceVisibility","boxShadow","pointerEvents","textOverflow","lineClamp","textStrokeWidth","textStrokeColor","textStrokeOver","GEOM","fill","stroke","strokeWidth","strokeDasharray","strokeLinecap","strokeLinejoin","strokeMiterlimit","fillRule","DOM_ENTRY_SET","DOM_KEY_SET","GEOM_ENTRY_SET","GEOM_KEY_SET","INHERIT_KEY_SET","VALID_STRING_VALUE","isValid","gradient","dotProduct","dotProduct3","crossProduct","crossProduct3","unitize","unitize3","length3","isParallel","isZero","ag","angle","PI","isParallel3","isZero3","angle3","acos","sqrt","pow","getPerpendicularVector3","STYLE_KEY","POSITION","DISPLAY","TOP","RIGHT","BOTTOM","LEFT","MARGIN_TOP","MARGIN_RIGHT","MARGIN_BOTTOM","MARGIN_LEFT","PADDING_TOP","PADDING_RIGHT","PADDING_BOTTOM","PADDING_LEFT","FONT_SIZE","FONT_FAMILY","COLOR","FONT_STYLE","FONT_WEIGHT","LINE_HEIGHT","BACKGROUND_IMAGE","BACKGROUND_COLOR","BACKGROUND_SIZE","BACKGROUND_REPEAT","BACKGROUND_POSITION_X","BACKGROUND_POSITION_Y","BORDER_TOP_WIDTH","BORDER_RIGHT_WIDTH","BORDER_BOTTOM_WIDTH","BORDER_LEFT_WIDTH","BORDER_TOP_COLOR","BORDER_RIGHT_COLOR","BORDER_BOTTOM_COLOR","BORDER_LEFT_COLOR","BORDER_TOP_STYLE","BORDER_RIGHT_STYLE","BORDER_BOTTOM_STYLE","BORDER_LEFT_STYLE","BORDER_TOP_LEFT_RADIUS","BORDER_TOP_RIGHT_RADIUS","BORDER_BOTTOM_RIGHT_RADIUS","BORDER_BOTTOM_LEFT_RADIUS","WIDTH","HEIGHT","FLEX_GROW","FLEX_SHRINK","FLEX_BASIS","FLEX_DIRECTION","JUSTIFY_CONTENT","ALIGN_ITEMS","ALIGN_SELF","TEXT_ALIGN","TRANSFORM_ORIGIN","VISIBILITY","OPACITY","Z_INDEX","TRANSFORM","TRANSLATE_X","TRANSLATE_Y","TRANSLATE_Z","SCALE_X","SCALE_Y","SCALE_Z","SKEW_X","SKEW_Y","ROTATE_X","ROTATE_Y","ROTATE_Z","ROTATE_3D","PERSPECTIVE","PERSPECTIVE_ORIGIN","FILTER","BOX_SHADOW","POINTER_EVENTS","OVERFLOW","MIX_BLEND_MODE","BACKGROUND_CLIP","WHITE_SPACE","TEXT_OVERFLOW","LETTER_SPACING","LINE_CLAMP","ORDER","FLEX_WRAP","ALIGN_CONTENT","TEXT_STROKE_WIDTH","TEXT_STROKE_COLOR","TEXT_STROKE_OVER","WRITING_MODE","TRANSFORM_STYLE","BACKFACE_VISIBILITY","FILL","STROKE","STROKE_WIDTH","STROKE_DASHARRAY","STROKE_DASHARRAY_STR","STROKE_LINECAP","STROKE_LINEJOIN","STROKE_MITERLIMIT","FILL_RULE","MATRIX","BORDER_TOP","BORDER_RIGHT","BORDER_BOTTOM","BORDER_LEFT","TRANSLATE_PATH","STYLE2LOWER_MAP","style2Lower","toUpperCase","STYLE2UPPER_MAP","style2Upper","STYLE_R_KEY","STYLE_RV_KEY","STYLE_V_KEY","k2","ELLIPSIS","H","vector","enums","deg","pointInConvexPolygon","vertexes","xmax","ymax","xmin","ymin","pointInQuadrilateral","angleBySide","theta","sideByAngle","alpha","pointsDistance","triangleIncentre","ellipsePoints","ox","oy","sectorPoints","begin","end","h2","d2r","atan","rx","ry","p1","p2","p4","p3","concat","temp","getRectsIntersection","isRectsOverlap","ax1","ay1","ax4","ay4","bx1","by1","bx4","by4","includeIntersect","isRectsInside","calCoordsInNode","px","py","computedStyle","calPercentInNode","ds","Infinity","r2d","pointOnCircle","getPlainNormalEquation","points","getConicGradientImage","originX","originY","stop","getAngle","increasingList","map","start","factor","idx","canvasPolygon","moveTo","lineTo","quadraticCurveTo","bezierCurveTo","svgPolygon","canvasLine","controlA","controlB","svgLine","canvasFilter","svgFilter","geom","unit","painter","calFitDashed","total","bs","be","smin","smax","dmin","dmax","ps","pd","outer","per","free","mo","calDashed","m1","m2","m3","m4","bw","calPoints","borderWidth","borderStyle","deg1","deg2","direction","beginRadius","endRadius","isLast","main1","main2","cross1","cross2","calTopRadiusPoints","calRightRadiusPoints","calBottomRadiusPoints","calLeftRadiusPoints","pointsList","brx","bry","erx","ery","oxl","oxr","beginList","centerList","endList","beginLength","needInner","crossDeg","rx1","ry1","sx1","oyl","rx2","ry2","sx2","ca","calBezierTopLeft","controls1","controls2","limit","endLength","oyr","calBezierTopRight","sx","isStart","crossDx","p1x","p1y","p2x","p2y","dx1","dsx1","dx2","dsx2","cpx2","cpy2","cpx1","cpy1","crossDsx","beta","tanBetaDiv2Sqrt","tanAlphaHalf","degTg","degTg1","cdx1","cdy1","cx1","cy1","degTg2","cdx2","cdy2","cx2","cy2","isEnd","oyt","oyb","oxt","calBezierRightTop","oxb","calBezierRightBottom","calBezierBottomLeft","calBezierBottomRight","calBezierLeftTop","calBezierLeftBottom","calRadius","btlr","btrr","bbrr","bblr","need","btlx","btly","btrx","btry","bbrx","bbry","bblx","bbly","BR_KS","calBorderRadius","currentStyle","root","noRadius","next","half","calBorderRadiusInline","contentBoxList","last","isEllipsis","outerWidth","outerHeight","renderBorder","xom","renderMode","mode","beginPath","closePath","virtualDom","getLinearDeg","getRadialPosition","center","getColorStop","firstColor","dr","dg","db","da","unshift","calLinearCoords","cx","cy","x0","y0","calCircleCentre","iw","ih","positionX","positionY","calRadialRadius","shape","size","xl","yl","tx","ty","asin","ratio","parseGradient","reg","i5","i6","i7","percent","getLinear","coords","l1","l2","l3","l4","r1","getRadial","scx","scy","getConic","calConicRadius","renderConic","isInline","border","offscreen","imgData","putImageData","save","clip","drawImage","restore","parseFlex","grow","shrink","basis","parseMarginPadding","parseOneBorder","margin","padding","borderTop","borderRight","borderBottom","borderLeft","borderColor","borderRadius","background","backgroundPosition","flex","translate","translate3d","scale","scale3d","rotate","skew","textStroke","toFull","bgc","bgi","bgr","bgp","gd","repeat","join","isEmpty","v2","isColorKey","isLengthKey","isExpandKey","isGradientKey","isRadiusKey","RESET_DOM","reset","RESET_GEOM","addGeom","ks","isIgnore","isGeom","isRepaint","kernelSize","sigma","outerSize","outerSizeByD","gaussianWeight","E","change","isGradient","TRANSFORM_HASH","compatibleTransform","camel","convertStringValue","normalize","resetList","abbr","flexFlow","k1","arr1","arr2","k3","arr3","isNaN","item2","setFontStyle","getBaseline","calFontFamily","normal","calNormalLineHeight","getVerticalBaseline","calRelativePercent","parent","domParent","calRelative","isWidth","isRelativeOrAbsolute","equalStyle","oa","ob","av","bv","avj","bvj","aa","ad","bd","isArrayD1","isArrayD2","ap","bp","aj","bj","ac","bc","isMulti","cloneStyle","vv","spreadBoxShadow","yt","xr","spread","inset","blur","spreadFilter","calRotateX","calRotateY","calRotateZ","calRotate3d","rlen","nc","xy","yz","zx","xs","ys","zs","calMatrix","ow","oh","calSingleValue","calMatrixByOrigin","calMatrixWithOrigin","__computedStyle","calPerspectiveMatrix","ppt","isPerspectiveMatrix","TuOrU","TextBox","index","__index","__content","__parentLineBox","__isVertical","cacheStyle","dom","css","__endX","__endY","me","matrixEvent","dev1","dev2","overFill","cjk","strokeText","measureText","nowCjk","__gradient","__bx1","__by1","__bx2","__by2","baseline","verticalBaseline","CHAR","Ellipsis","__x1","__y1","__ellipsis","TX","TY","TZ","OP","FT","PPT","SX","SY","SZ","RZ","TF","NONE","CACHE","TRANSLATE","SCALE","TRANSFORM_ALL","MASK","REPAINT","REFLOW","REBUILD","ENUM","isTransforms","contain","value","exclude","getLevel","isReflow","measureLineWidth","perW","rw","newLine","mw","hypotheticalNum","round","reduce","getFontKey","ls","Text","__textBoxes","__charWidth","__textWidth","__bp","__widthHash","__limitCache","__hasContent","__cache","lx","ly","lineBoxManager","endSpace","lineClampCount","textBoxes","maxW","beginSpace","lineCount","mainCoords","isTextOverflow","textWidth","containerSize","__lineBack","textBox","addItem","verticalLineHeight","ew","lineBox","isNewLine","tb","__layoutNone","__resetLb","ep","tbs","mbp","isLayout","__offsetX","__offsetY","firstCharWidth","lineWidth","strokeStyle","render","__addUpdate","level","isShadowRoot","hostRoot","__children","__zIndexChildren","__deleteStruct","__destroy","fontKey","charWidth","__currentStyle","__style","__cacheStyle","__matrix","__matrixEvent","__perspectiveMatrix","Event","__eHash","handle","on","apply","__karasEventCb","once","emit","event","fns","fn","REGISTER","Component","__tagName","__ref","__isMounted","__taskList","sr","__shadowRoot","listener","componentDidMount","REFRESH","ref","componentWillUnmount","__shadow","force","shadowRoot","__emitEvent","__state","defineProperty","get","arguments","getInlineBox","leading","bcStart","bcEnd","pbStart","pbEnd","bx2","by2","getInlineWidth","contentBox","matrixResize","imgWidth","imgHeight","targetWidth","targetHeight","renderBgc","method","__cacheDefs","renderImage","loadBgi","bgW","bgH","bgX","bgY","needMask","xnl","xnr","ynt","ynb","ceil","image","needResize","copy","traversalBefore","__before","traversalAfter","__after","isPause","Frame","__rootTask","__task","__now","__init","__karasFramecb","offFrame","onFrame","NEWTON_ITERATIONS","NEWTON_MIN_SLOPE","SUBDIVISION_PRECISION","SUBDIVISION_MAX_ITERATIONS","kSplineTableSize","kSampleStepSize","float32ArraySupported","Float32Array","A","aA1","aA2","B","C","calcBezier","aT","getSlope","binarySubdivide","aX","aA","aB","mX1","mX2","currentX","currentT","newtonRaphsonIterate","aGuessT","currentSlope","LinearEasing","bezier","mY1","mY2","sampleValues","getTForX","intervalStart","currentSample","lastSample","guessForT","initialSlope","BezierEasing","easing","linear","easeIn","easeOut","ease","easeInOut","cubicBezier","getEasing","v1","v3","timingFunction","unify","frames","getProps","inherit","__outerWidth","__outerHeight","tf","genBeforeRefresh","aniParams","allInFn","framing","duration","es","translatePath","time","transition","fixed","lastPercent","calByUnit","container","calDiff","cl","st","pm","nm","has","pv","nv","pvv","nvv","clientHeight","clientWidth","pi","ni","offsetHeight","offsetWidth","pp","nn","parentComputedStyle","calDiffGradient","len2","pv2","nv2","len3","pv3","nv3","eq","isArrP","isArrN","pz","nz","np","calFrame","hasTp","ts","cs","CAL_HASH","hasZ","hasColor","hasTsColor","hasTsWidth","hasTsOver","optimize","binarySearch","middle","frame","ea","steps","stepsD","calTransform","calFilter","calOrigin","calPosition","calBoxShadow","calBgSize","calNumber","calPath","calLength","calGradient","calColor","clv","cv","st2","cli","calIntermediateStyle","notSameFrame","currentProps","__currentProps","modify","calIncrease","o2","n2","calLastStyle","gotoOverload","options","frameCb","FRAME","__isChange","__firstPlay","PLAY","__playCb","Animation","__id","nl","__options","op","__begin","__playState","__target","__firstEnter","iterations","framesR","originStyle","__frames","__framesR","__keys","__originStyle","__isDelay","__outBeginDelay","__playCount","fps","spfLimit","delay","endDelay","playbackRate","__currentFrames","reverse","__timestamp","current","isFinish","__cancelTask","__nextTime","__currentTime","__delay","__duration","__iterations","__endDelay","isDestroyed","playState","__hasFin","__hasCancel","__enterFrame","__direction","__fpsTime","__startTime","__end","__fps","currentFrames","stayBegin","__stayBegin","stayEnd","__stayEnd","__playbackRate","__spfLimit","currentTime","lastFrame","__currentFrame","__inFps","currentFrame","playCount","isEven","isLastCount","frameTime","isLastFrame","inEndDelay","needClean","__nextEnd","__finished","playCb","__clean","BEGIN","END","FINISH","silence","pending","PAUSE","play","CANCEL","__goto","isFrame","excludeDelay","finish","spf","alternate","animateController","__animateController","remove","removeControl","__checkModify","__fill","backwards","both","forwards","__easing","renderBoxShadow","box","spreadBox","cross","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","blurBox","mbmName","isValidMbm","mbm","getFirstEmptyInlineWidth","flowChildren","child","Xom","__isInline","getLastEmptyInlineWidth","__listener","__animationList","__loadBgi","isClip","__clip","__mask","__refreshLevel","__opacity","__frameAnimateList","__contentBoxList","__cacheAsBitmap","cacheAsBitmap","__cacheTotal","__cacheFilter","__cacheMask","__layoutData","__hasComputeReflow","__fontRegister","__hasMask","hasMask","__calSize","includePercent","isRoot","ph","crs","fontRegister","__clientWidth","__offsetWidth","__clientHeight","__offsetHeight","isDirectionRow","isDirectItem","isAbs","isColumn","isRow","__layoutFlow","__computeReflow","__isIbFull","__isUprightIbFull","clearCache","__mp","__layoutFlex","__layoutInline","__layoutBlock","__x2","__x3","__x4","__x5","__x6","__y2","__y3","__y4","__y5","__y6","__oy","__execAr","__calStyle","__calPerspective","ar","__animateRecords","controller","autoPlay","__records2","init","list2","__records","__playAuto","__reset0","h3","isParentVertical","fixedWidth","fixedHeight","selfEndSpace","isReplaced","matrixCache","sy","__calMatrix","tfo","__calFilter","bgI","kw","rebuild","po","offscreenBlend","offscreenMask","offscreenFilter","offscreenOverflow","origin","borderList","x5","x6","y5","y6","isRealInline","hasBgi","some","svgBgSymbol","inline","bg","isFirst","lastContentBox","lastLineBox","parentLineBox","ix1","iy1","ix2","iy2","symbol","clearAnimate","clearFrameAnimate","__stopPropagation","__stopImmediatePropagation","willResponseEvent","hasEmitMask","ignore","inThis","__touchstartTarget","__getLg","__getRg","__getCg","lg","createLinearGradient","addColorStop","rg","createRadialGradient","onlyTotal","clearTopCache","formatStyle","updateFormatStyle","animation","cancel","enter","includeBbox","LineBox","__list","__lineHeight","__isUpright","__bOffset","increase","isAlign","__ox","LineBoxManager","__lastX","__lastY","__max","__domList","__domStack","__isNewLine","__isEnd","__spreadList","nextNewLine","genLineBox","spreadList","verticalAlign","__setLB","endX","endY","bOffset","TAG_NAME","INLINE","BOLD","Geom","__isMulti","multi","__cacheProps","isDirectChild","main","isFixed","__addMBP","__layoutStyle","__preLayout","tw","th","__ioSize","__marginAuto","__hasXomContent","empty","strokeDasharrayStr","lineCap","lineJoin","miterLimit","getLineDash","setLineDash","preData","__preSet","fills","fillRules","strokes","strokeWidths","strokeDasharrays","strokeDasharrayStrs","strokeLinecaps","strokeLinejoins","strokeMiterlimits","__renderOnePolygon","isFillCE","isStrokeCE","isFillRE","isStrokeRE","__conicGradient","__drawPolygon","__radialEllipse","isFill","isStroke","__preSetCanvas","__propsStrokeStyle","__inversePtList","getTransform","clearSvgCache","getMergeMargin","topList","bottomList","isFixedWidthOrHeight","isFixedSize","includeParentFlex","getPrevMergeMargin","mtList","mbList","getNextMergeMargin","offsetNext","parentFixed","absList","checkTop","addDom","removeDom","isSiblingBlock","checkNext","cps","isLastAbs","isNowAbs","isLastNone","isNowNone","isLast0","oldH","svg","t1","t2","hasFlowPrev","__updateStruct","__layoutAbs","ld","__layout","isNow0","t3","t4","nowH","isRemoveSelf","__resizeY","buildChildren","flatten","relation","hoc","buildRoot","genZIndexChildren","hasMc","mcHash","lastMaskIndex","__iIndex","__zIndex","__aIndex","sort","genOrderChildren","__order","backtrack","text","__backtrack","Dom","block","inlineBlock","none","builder","__flexLine","zIndexChildren","__structure","struct","__structs","nss","structs","needSort","__tryLayInline","isContent","fixedSize","countMin","countMax","isR","__calBasis","min2","max2","__lineBoxManager","maxSize","countSize","mergeMarginEndList","mergeMarginStartList","ignoreNextLine","ignoreNextWrap","isXom","isInlineBlock","__isRealInline","lastLineClampCount","reflow","setNotEnd","lastX","lastY","setNewLine","isNone","isEmptyBlock","__resizeX","isLastBlock","hasStart","isBlock","horizonAlign","__inlineSize","domList","growList","shrinkList","basisList","maxList","minList","orderChildren","cw","isMultiLine","line","hypotheticalList","hypothetical","maxCrossList","marginAutoCountList","freeList","__layoutFlexLine","maxCross","marginAutoCount","crossSum","crossSumList","between","around","__flexAlign","flexLine","hypotheticalSum","isOverflow","targetMainList","lessOne","factorSum","factorList","needReset","factorSum2","count1","count2","lbmList","needGenAr","firstBaseline","old","genLineBoxByInlineIfNewLine","setLbByInlineIfNotNewLine","pushContentBoxList","isIbFull","isUprightIbFull","hasAddEndSpace","isInline2","isInlineBlock2","addY","addX","popContentBoxList","maxX","maxY","minX","minY","maxCX","maxCY","minCX","minCY","maxFX","maxFY","minFX","minFY","maxOX","maxOY","minOX","minOY","absChildren","onlyRight","onlyBottom","fixedTop","fixedRight","fixedBottom","fixedLeft","widthLimit","heightLimit","__insertStruct","Img","loadImg","__loadImg","loading","__loadAndRefresh","placeholder","onlyImg","showError","pts","__addGeom","reload","Defs","cacheHash","elem","ovd","nvd","diffDefs","diffBb","diffD2D","od","nd","ol","diffDef","removeAt","insertAt","insertAdjacentHTML","parentNode","removeAttribute","diffItem","diffChild","diffD2G","replaceWith","diffT2T","diffG2D","diffG2G","diffItemSelf","diffX2X","diffByLessLv","firstChild","lastChild","obb","nbb","isText","html","where","insertBefore","Controller","__list2","__onList","__lastTime","args","records","animate","offsetTime","onList","timestamp","__action","__mergeAuto","__on","__set","Cache","rootId","page","pos","__uuid","__renderMode","__ctx","__rootId","__page","__pos","getCoords","__size","__tx1","__ty1","__tx2","__ty2","__enabled","__available","__appendData","dbx","dby","update","__update","clear","del","klass","getInstance","texture","cacheKlass","pageKlass","excludePage","UNIT","MAX","HASH","Page","number","__number","grid","__grid","Int32Array","unitSize","getFreePos","MAX_TEXTURE_SIZE","initShaders","gl","vshader","fshader","program","createProgram","enable","BLEND","blendFunc","ONE","ONE_MINUS_SRC_ALPHA","vertexShader","loadShader","VERTEX_SHADER","fragmentShader","FRAGMENT_SHADER","attachShader","linkProgram","linked","getProgramParameter","LINK_STATUS","getProgramInfoLog","deleteProgram","deleteShader","shader","createShader","shaderSource","compileShader","compiled","getShaderParameter","COMPILE_STATUS","getShaderInfoLog","convertCoords2Gl","tz","createTexture","tex","bindTexture","pixelStorei","UNPACK_FLIP_Y_WEBGL","UNPACK_PREMULTIPLY_ALPHA_WEBGL","texImage2D","TEXTURE_2D","UNSIGNED_BYTE","texParameteri","TEXTURE_WRAP_S","CLAMP_TO_EDGE","TEXTURE_WRAP_T","TEXTURE_MIN_FILTER","LINEAR","TEXTURE_MAG_FILTER","activeTexture","lastVtPoint","lastVtTex","lastVtOpacity","drawTextureCache","vtPoint","vtTex","vtOpacity","tx1","ty1","tx2","ty2","genTexture","bx","by","pointBuffer","createBuffer","bindBuffer","ARRAY_BUFFER","bufferData","STATIC_DRAW","a_position","getAttribLocation","vertexAttribPointer","FLOAT","enableVertexAttribArray","texBuffer","a_texCoords","opacityBuffer","a_opacity","u_texture","getUniformLocation","uniform1i","drawArrays","TRIANGLES","deleteBuffer","disableVertexAttribArray","drawBlur","tex1","useProgram","viewport","u_direction","recycle","tex2","framebufferTexture2D","FRAMEBUFFER","COLOR_ATTACHMENT0","uniform2f","tex3","deleteTexture","drawCm","h1","u_m","uniform1fv","drawOverflow","bbox1","bbox2","drawMask","texBuffer1","a_texCoords1","texBuffer2","a_texCoords2","u_texture1","u_texture2","drawMbm","drawDropShadow","frameBuffer","u_color","drawDropShadowMerge","dy1","dy2","drawTex2Cache","drawCache2Tex","drawSameSize","programSs","u_opacity","uniform1f","drawOitPlane","isPuzzle","pHash","tHash","z0","w0","tx0","ty0","hashP","hashT","CanvasPage","__offscreen","webgl","CanvasCache","oldX1","widthNew","heightNew","callback","cacheMask","genSingle","globalCompositeOperation","drawCache","dbx2","dby2","bboxNew","OFFSCREEN_OVERFLOW","OFFSCREEN_FILTER","OFFSCREEN_MASK","OFFSCREEN_BLEND","OFFSCREEN_MASK2","applyOffscreen","rect","TOLERANCE","getLinearRoot","coefs","result","getQuadraticRoots","results","getCubicRoots","c0","discrim","halfB","tmp","distance","atan2","sqrt3","getQuarticRoots","resolveRoots","plus","minus","getRoots","degree","equation","ACCURACY","getDerivativeCoefs","derivative","evaluate","bisection","minValue","maxValue","tmp1","log","tmp2","LN10","iters","LN2","getRootsInInterval","roots","derivativeCoefs","droots","intersectBezier2Bezier2","ax2","ay2","ax3","ay3","bx3","by3","c12","c11","c10","c22","c21","c20","v0","v4","v5","v6","xRoots","yRoots","checkRoots","xRoot","intersectBezier3Bezier3","c13","c23","c10x2","c10x3","c10y2","c10y3","c11x2","c11x3","c11y2","c11y3","c12x2","c12x3","c12y2","c12y3","c13x2","c13x3","c13y2","c13y3","c20x2","c20x3","c20y2","c20y3","c21x2","c21x3","c21y2","c22x2","c22x3","c22y2","c23x2","c23x3","c23y2","c23y3","intersectBezier2Bezier3","intersectBezier2Line","minbx","minby","maxbx","maxby","dot","lerp","p5","p6","intersectBezier3Line","p7","p8","p9","p10","intersectLineLine3","limitToFiniteSegment","tolerance","p13","subtractPoint","p43","p21","d1343","d4321","d1321","d4343","d2121","denom","numer","mua","mub","pa","pb","distanceTo","intersectPt","divide","addPoint","paramA","closestParam","paramB","from","to","startToP","startToEnd","startEnd2","startEnd_startP","intersectPlanePlane","v9","mb","invDet","v11","v12","v13","v21","v22","v23","v31","v32","v33","pointOnLine3","v1x","v1y","v1z","v2x","v2y","v2z","isec","shadow","puzzle","xShadow","xBbox","yShadow","yBbox","zShadow","zBbox","splitQuadrilateralPlane","xList","plane","belong","eventHash","seg","eventList","HISTORY","ael","elLen","isVisited","isDeleted","pointsA","pointsB","resA","resB","splitPlaneByPoint","i1","i2","p0","r2","onVertex1","onVertex2","va","vb","r0","getPercentXY","ipx","ipy","sortPuzzleZ","cz","willEnd","zHash","TexturePage","TextureCache","texSubImage2D","ImgCanvasCache","__canvas","ImgWebglCache","MBM","DOM_RENDER","IMG_RENDER","GEOM_RENDER","getCache","genBboxTotal","isPpt","bboxTotal","mergeBbox","__computedStyle2","countMaskNum","__cache2","__cacheTotal2","__cacheFilter2","__cacheMask2","genTotal","ctxTotal","matrixList","parentMatrix","lastMatrix","lastLv","maskStartHash","offscreenHash","mh","__calOffscreen","genTotalOther","needGen","genFilter","genMask","opacityList","parentOpacity","lastOpacity","genFrameBufferWithTexture","createFramebuffer","bindFramebuffer","check","checkFramebufferStatus","FRAMEBUFFER_COMPLETE","genTotalWebgl","W","pptNode","oitHash","lastPage","cacheTotal","oit","genMbmWebgl","deleteFramebuffer","genPptWebgl","mergeHash","mergeList","isFlat","isTopFlat","planeList","genFilterWebgl","genBlurWebgl","genDropShadowWebgl","rotation","cosR","sinR","genColorMatrixWebgl","amount","oneMinusAmount","genBlurShader","weights","vert","frag","vertexBlur","fragmentBlur","getParameter","MAX_VARYING_VECTORS","programCm","genMaskWebgl","programClip","programMask","programDs","bboxMerge","programMbmMp","programMbmSr","programMbmOl","programMbmDk","programMbmLt","programMbmCd","programMbmCb","programMbmHl","programMbmSl","programMbmDf","programMbmEx","programMbmHue","programMbmSt","programMbmCl","programMbmLm","resTex","resFrameBuffer","renderSvg","rlv","maskEffectHash","hasEffectMask","addCache","maskHash","vdList","parentVd","lastRefreshLv","lastNode","mChildren","ivs","hasTransform","removeCache","renderWebgl","lastRefreshLevel","hasMbm","flatList","flatExtendList","pptNodeList","parentPptNode","lastPptNode","parentFlat","parentExtendFlat","isMbm","hasContent","calContent","isFilter","pptHash","ii","isPerspective","renderCanvas","msh","antialias","premultipliedAlpha","preserveDrawingBuffer","depth","ROOT_DOM_NAME","getDom","querySelector","renderProp","EVENT_LIST","initEvent","Root","__wrapEvent","__cb","addEventListener","removeEvent","removeEventListener","__dom","__mw","__mh","mix","__rlv","__lastUpdateP","domName","__scx","__scy","getBoundingClientRect","touches","clientX","clientY","stopPropagation","stopImmediatePropagation","preventDefault","__hasEmitted","__initProps","nodeName","__genHtml","domCss","getPropertyValue","params","contextAttributes","__defs","webgl2","__initShader","draw","destroy","__eventCbList","vertex","fragment","vertexMask","fragmentMask","fragmentClip","programOverflow","vertexOverflow","fragmentOverflow","vertexCm","fragmentCm","vertexDs","fragmentDs","vertexMbm","fragmentMultiply","fragmentScreen","fragmentOverlay","fragmentDarken","fragmentLighten","fragmentColorDodge","fragmentColorBurn","fragmentHardLight","fragmentSoftLight","fragmentDifference","fragmentExclusion","fragmentHue","fragmentSaturation","fragmentColor","fragmentLuminosity","vertexSs","fragmentSs","__checkRoot","wm","__reLayout","noRender","__clearCanvas","__vd","domDiff","__clearWebgl","updateStyle","includeIgnore","scan","path","zPath","__index__","karas","path2","zPath2","focus","hasVisibility","hasDisplay","hasRelease","isRp","__frameDraw","nextFrame","clearColor","COLOR_BUFFER_BIT","bboxBezier2","qx","qy","bboxBezier3","ax","ay","hx","hy","q","bboxBezier","norm","simpson38","derivativeFunc","middleL","middleR","adaptiveSimpson38","eps","mid","sl","ans","bezierLength","startT","endT","at","at3","at2","derivativeOrder","pointAtBezier","maxIteration","pointAtBezierWithLength","targetLen","approachLen","approachT","preApproachT","derivative1","derivative2","numerator","denominator","sliceBezier","x12","y12","x23","y23","x123","y123","x34","y34","x234","y234","x1234","y1234","sliceBezier2Both","pointAtByT","pointAtByT3","pointAtByT2","getPointT","getPointT3","getPointT2","xt","bezierSlope","bezier2Slope","bezier3Slope","reBuild","reBuildC","curveNum","getNewPoint","Line","__xa","__ya","__xb","__yb","__controlA","__controlB","__start","buildCache","curve","bezierBox","Point","Segment","calBbox","myFill","otherFill","myCoincide","otherCoincide","toHash","EPS","EPS2","getIntersectionLineLine","toSource","toClip","getIntersectionBezier2Line","getIntersectionBezier2Bezier2","getIntersectionBezier2Bezier3","getIntersectionBezier3Line","getIntersectionBezier3Bezier3","sortIntersection","isSource","intersect","Polygon","regions","segments","vertices","startPoint","firstPoint","curr","endPoint","compare","cPoint","getBezierMonotonicity","curve1","curve2","cPoint1","cPoint2","lastPoint","lastT","genHashXList","findIntersection","polyA","polyB","isIntermediateA","isIntermediateB","genHashXYList","aelA","aelB","hashA","hashB","hc","isAboveLast","segAboveCompare","isAbove","inside","compareBelong","delList","shift","bboxA","coordsA","lenA","bboxB","coordsB","lenB","isSourceReverted","inters","overs","checkOverlapLine","checkOverlapBezier","activeNewSeg","ra","rb","sliceSegment","isIntermediate","ns","hashX","putHashX","hashXY","putHashXY","listX","hashY","listY","pointAboveOrOnLine","pt","segA","segB","la","lb","getYByX","isX","isY","firstA","firstB","lastA","lastB","conditionA","conditionB","conditionC","startA","endA","startB","endB","equalBezier","over","chains","chain","isHead","tail","ptHead","ptTail","close","coords2","clockwise","area","prefix","polygon","trivial","polygonA","polygonB","selfIntersect","intersect2","annotate2","INTERSECT","UNION","SUBTRACT","SUBTRACT_REV","XOR","intermediate","union","subtract","subtractRev","xor","bo","subtract2","concatPointAndControl","control","getLength","getIndex","getNewList","start2","end2","isStartLt0","isEndGt1","prePercent","Polyline","__points","__controls","controls","booleanOperations","__booleanOperations","isControl","rebuildSE","__getPoints","__needRebuildSE","__reprocessing","__renderPolygon","pointList","controlList","getR","dft","Sector","__r","edge","__edge","closure","__closure","sList","__renderOneSector","genVertex","Rect","__rx","__ry","Circle","Ellipse","my","json","animateRecords","opt","oft","JSON","createGm","cp","getRegister","createCp","createVd","fullCssProperty","abbrCssProperty","os","fullAnimate","abbrAnimate","fullAnimateOption","abbrAnimateOption","abbr2full","fk","linkLibrary","libraryItem","vars","library","libraryId","initLibrary","replaceLibraryVars","slot","member","replaceVars","replaceAnimateOptions","imgs","singleton","loadAndParse","components","list1","list3","calDeg","pointIndex","pointByIndex","exchangeOrder","sy1","sy2","sx3","sy3","tx3","ty3","ls2","lt2","AB","AC","BC","tar","version","appendTo","parser","math","refresh"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAMA;IACJ,SAAc,IAAA,GAAA;MACZ,IAAKC,CAAAA,GAAL,GAAW,CAAX,CAAA;MACA,IAAKC,CAAAA,GAAL,GAAW,CAAX,CAAA;MACA,IAAKC,CAAAA,OAAL,GAAe,CAAf,CAAA;MACA,IAAKC,CAAAA,QAAL,GAAgB,CAAhB,CAAA;MACA,IAAKC,CAAAA,UAAL,GAAkB,CAAlB,CAAA;MACA,IAAKC,CAAAA,kBAAL,GAA0B,CAA1B,CAAA;MACA,IAAKC,CAAAA,MAAL,GAAc,IAAd,CAAA;MACA,IAAKC,CAAAA,MAAL,GAAc,I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EAAZ;;EAqFA,IAAG,OAAOyP,MAAP,KAAkB,WAArB,EAAkC;IAChCA,MAAM,CAACm1E,KAAP,GAAeA,OAAf,CAAA;EACD,CAFD,MAGK,IAAG,OAAO3yE,IAAP,KAAgB,WAAnB,EAAgC;IACnCA,IAAI,CAAC2yE,KAAL,GAAaA,OAAb,CAAA;EACD;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["src/node/Node.js","src/refresh/mode.js","src/style/unit.js","src/math/matrix.js","src/util/util.js","src/util/debug.js","src/util/inject.js","src/util/inflate.js","src/util/opentype.js","src/style/font.js","src/style/reset.js","src/style/reg.js","src/math/vector.js","src/util/enums.js","src/math/geom.js","src/math/gradient.js","src/util/painter.js","src/style/border.js","src/style/gradient.js","src/style/abbr.js","src/animate/key.js","src/refresh/change.js","src/math/blur.js","src/style/css.js","src/style/transform.js","src/node/TextBox.js","src/node/Ellipsis.js","src/refresh/level.js","src/node/Text.js","src/util/Event.js","src/node/Component.js","src/node/inline.js","src/style/image.js","src/style/bg.js","src/animate/frame.js","src/animate/easing.js","src/animate/Animation.js","src/style/bs.js","src/style/mbm.js","src/node/Xom.js","src/node/LineBox.js","src/node/LineBoxManager.js","src/node/tag.js","src/node/geom/Geom.js","src/refresh/reflow.js","src/node/builder.js","src/node/Dom.js","src/node/Img.js","src/node/Defs.js","src/util/diff.js","src/animate/Controller.js","src/refresh/Cache.js","src/refresh/Page.js","src/gl/webgl.js","src/refresh/CanvasPage.js","src/refresh/CanvasCache.js","src/refresh/offscreen.js","src/math/equation.js","src/math/isec.js","src/gl/oit.js","src/gl/TexturePage.js","src/gl/TextureCache.js","src/refresh/ImgCanvasCache.js","src/gl/ImgWebglCache.js","src/refresh/struct.js","src/gl/ca.js","src/node/Root.js","src/math/bezier.js","src/node/geom/Line.js","src/math/bo/Point.js","src/math/bo/Segment.js","src/math/bo/intersect.js","src/math/bo/Polygon.js","src/math/bo/chain.js","src/math/bo/index.js","src/node/geom/Polyline.js","src/node/geom/Polygon.js","src/node/geom/Sector.js","src/node/geom/Rect.js","src/node/geom/Circle.js","src/node/geom/Ellipse.js","src/parser/parse.js","src/parser/abbr.js","src/parser/apply.js","src/parser/index.js","src/style/index.js","src/animate/index.js","src/math/tar.js","src/math/index.js","src/refresh/index.js","src/index.js"],"sourcesContent":["class Node {\n constructor() {\n this.__x = 0;\n this.__y = 0;\n this.__width = 0;\n this.__height = 0;\n this.__baseline = 0;\n this.__verticalBaseline = 0;\n this.__prev = null;\n this.__next = null;\n this.__parent = null;\n this.__domParent = null;\n this.__root = null;\n this.__host = null;\n this.__hostRoot = null;\n this.__virtualDom = null;\n this.__bbox = null;\n this.__filterBbox = null;\n this.__isDestroyed = true;\n }\n\n __structure(lv, j) {\n return this.__struct = {\n node: this,\n childIndex: j,\n lv,\n };\n }\n\n __offsetX(diff) {\n this.__x += diff;\n }\n\n __offsetY(diff) {\n this.__y += diff;\n }\n\n __destroy() {\n this.__isDestroyed = true;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get width() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get outerWidth() {\n return this.__width;\n }\n\n get outerHeight() {\n return this.__height;\n }\n\n get prev() {\n return this.__prev;\n }\n\n get next() {\n return this.__next;\n }\n\n get parent() {\n return this.__parent;\n }\n\n get domParent() {\n return this.__domParent;\n }\n\n // canvas/svg根节点\n get root() {\n return this.__root;\n }\n\n // component根节点\n get host() {\n return this.__host;\n }\n\n // 考虑高阶组件在内的component根节点\n get hostRoot() {\n return this.__hostRoot;\n }\n\n get baseline() {\n return this.__baseline;\n }\n\n get verticalBaseline() {\n return this.__verticalBaseline;\n }\n\n get virtualDom() {\n return this.__virtualDom;\n }\n\n get isDestroyed() {\n return this.__isDestroyed;\n }\n\n get isReplaced() {\n return false;\n }\n}\n\nexport default Node;\n","export default {\n CANVAS: 0,\n SVG: 1,\n WEBGL: 2,\n};\n","const AUTO = 0;\nconst PX = 1;\nconst PERCENT = 2;\nconst NUMBER = 3;\nconst INHERIT = 4;\nconst DEG = 5;\nconst STRING = 6;\nconst RGBA = 7;\nconst REM = 8;\nconst EM = 9;\nconst VW = 10;\nconst VH = 11;\nconst VMAX = 12;\nconst VMIN = 13;\nconst GRADIENT = 14;\n\nlet o = {\n AUTO,\n PX,\n PERCENT,\n NUMBER,\n INHERIT,\n DEG,\n STRING,\n RGBA,\n REM,\n EM,\n VW,\n VH,\n VMAX,\n VMIN,\n GRADIENT, // 特殊格式,color/fill/stroke用给ctx传值\n /**\n * 通用的格式化计算数值单位的方法,百分比/像素/REM/VW/auto和纯数字\n * @param v value\n * @returns 格式化好的[number, unit]\n */\n calUnit(v) {\n let n = parseFloat(v) || 0;\n if(/%$/.test(v)) {\n return {\n v: n,\n u: PERCENT,\n };\n }\n else if(/px$/i.test(v)) {\n return {\n v: n,\n u: PX,\n };\n }\n else if(/deg$/i.test(v)) {\n return {\n v: n,\n u: DEG,\n };\n }\n else if(/rem$/i.test(v)) {\n return {\n v: n,\n u: REM,\n };\n }\n else if(/vw$/i.test(v)) {\n return {\n v: n,\n u: VW,\n };\n }\n else if(/vh$/i.test(v)) {\n return {\n v: n,\n u: VH,\n };\n }\n else if(/em$/i.test(v)) {\n return {\n v: n,\n u: EM,\n };\n }\n else if(/vw$/i.test(v)) {\n return {\n v: n,\n u: VW,\n };\n }\n else if(/vh$/i.test(v)) {\n return {\n v: n,\n u: VH,\n };\n }\n else if(/vmax$/i.test(v)) {\n return {\n v: n,\n u: VMAX,\n };\n }\n else if(/vmin$/i.test(v)) {\n return {\n v: n,\n u: VMIN,\n };\n }\n return {\n v: n,\n u: NUMBER,\n };\n },\n};\n\nexport default o;\n","// 生成4*4单位矩阵\nfunction identity() {\n return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n}\n\n// 矩阵a*b,固定两个matrix都是长度16\nfunction multiply(a, b) {\n if(!a && !b) {\n return identity();\n }\n if(isE(a)) {\n return b;\n }\n if(isE(b)) {\n return a;\n }\n let c = [];\n for(let i = 0; i < 4; i++) {\n let a0 = a[i] || 0;\n let a1 = a[i + 4] || 0;\n let a2 = a[i + 8] || 0;\n let a3 = a[i + 12] || 0;\n c[i] = a0 * b[0] + a1 * b[1] + a2 * b[2] + a3 * b[3];\n c[i + 4] = a0 * b[4] + a1 * b[5] + a2 * b[6] + a3 * b[7];\n c[i + 8] = a0 * b[8] + a1 * b[9] + a2 * b[10] + a3 * b[11];\n c[i + 12] = a0 * b[12] + a1 * b[13] + a2 * b[14] + a3 * b[15];\n }\n return c;\n}\n\n// 特殊优化,b为tfo,因此既只有12/13/14有值\nfunction multiplyTfo(m, x, y) {\n if(!x && !y) {\n return m;\n }\n m[12] += m[0] * x + m[4] * y;\n m[13] += m[1] * x + m[5] * y;\n m[14] += m[2] * x + m[6] * y;\n m[15] += m[3] * x + m[7] * y;\n return m;\n}\n\nfunction tfoMultiply(x, y, m) {\n if(!x && !y) {\n return m;\n }\n let d = m[3], h = m[7], l = m[11], p = m[15];\n m[0] += d * x;\n m[1] += d * y;\n m[4] += h * x;\n m[5] += h * y;\n m[8] += l * x;\n m[9] += l * y;\n m[12] += p * x;\n m[13] += p * y;\n return m;\n}\n\n// 几种特殊的transform变换优化\nfunction multiplyTranslateX(m, v) {\n if(!v) {\n return m;\n }\n m[12] += m[0] * v;\n m[13] += m[1] * v;\n m[14] += m[2] * v;\n m[15] += m[3] * v;\n return m;\n}\n\nfunction multiplyTranslateY(m, v) {\n if(!v) {\n return m;\n }\n m[12] += m[4] * v;\n m[13] += m[5] * v;\n m[14] += m[6] * v;\n m[15] += m[7] * v;\n return m;\n}\n\nfunction multiplyTranslateZ(m, v) {\n if(!v) {\n return m;\n }\n m[12] += m[8] * v;\n m[13] += m[9] * v;\n m[14] += m[10] * v;\n m[15] += m[11] * v;\n return m;\n}\n\nfunction multiplyRotateX(m, v) {\n if(!v) {\n return m;\n }\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n let e = m[4], f = m[5], g = m[6], h = m[7], i = m[8], k = m[10], l = m[11];\n m[4] = e * cos + i * sin;\n m[5] = f * cos + g * sin;\n m[6] = g * cos + k * sin;\n m[7] = h * cos + l * sin;\n m[8] = e * -sin + i * cos;\n m[9] = f * -sin + g * cos;\n m[10] = g * -sin + k * cos;\n m[11] = h * -sin + l * cos;\n return m;\n}\n\nfunction multiplyRotateY(m, v) {\n if(!v) {\n return m;\n }\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n let a = m[0], b = m[1], c = m[2], d = m[3], i = m[8], j = m[9], k = m[10], l = m[11];\n m[0] = a * cos + i * -sin;\n m[1] = b * cos + j * -sin;\n m[2] = c * cos + k * -sin;\n m[3] = d * cos + l * -sin;\n m[8] = a * sin + i * cos;\n m[9] = b * sin + j * cos;\n m[10] = c * sin + k * sin;\n m[11] = d * sin + l * sin;\n return m;\n}\n\nfunction multiplyRotateZ(m, v) {\n if(!v) {\n return m;\n }\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n let a = m[0], b = m[1], c = m[2], d = m[3], e = m[4], f = m[5], g = m[6], h = m[7];\n m[0] = a * cos + e * sin;\n m[1] = b * cos + f * sin;\n m[2] = c * cos + g * sin;\n m[3] = d * cos + h * sin;\n m[4] = a * -sin + e * cos;\n m[5] = b * -sin + f * cos;\n m[6] = c * -sin + g * cos;\n m[7] = d * -sin + h * cos;\n return m;\n}\n\nfunction multiplySkewX(m, v) {\n if(!v) {\n return m;\n }\n let tan = Math.tan(v);\n m[4] += m[0] * tan;\n m[5] += m[1] * tan;\n m[6] += m[2] * tan;\n m[7] += m[3] * tan;\n return m;\n}\n\nfunction multiplySkewY(m, v) {\n if(!v) {\n return m;\n }\n let tan = Math.tan(v);\n m[0] += m[4] * tan;\n m[1] += m[5] * tan;\n m[2] += m[6] * tan;\n m[3] += m[7] * tan;\n return m;\n}\n\nfunction multiplyScaleX(m, v) {\n if(v === 1) {\n return m;\n }\n m[0] *= v;\n m[1] *= v;\n m[2] *= v;\n m[3] *= v;\n return m;\n}\n\nfunction multiplyScaleY(m, v) {\n if(v === 1) {\n return m;\n }\n m[4] *= v;\n m[5] *= v;\n m[6] *= v;\n m[7] *= v;\n return m;\n}\n\nfunction multiplyScaleZ(m, v) {\n if(v === 1) {\n return m;\n }\n m[8] *= v;\n m[9] *= v;\n m[10] *= v;\n m[11] *= v;\n return m;\n}\n\nfunction multiplyPerspective(m, v) {\n if(!v || v <= 0) {\n return m;\n }\n v = Math.max(v, 1);\n v = -1 / v;\n m[8] += m[12] * v;\n m[9] += m[13] * v;\n m[10] += m[14] * v;\n m[11] += m[15] * v;\n return m;\n}\n\nfunction calPoint(point, m) {\n if(m && !isE(m)) {\n let { x, y, z, w } = point;\n z = z || 0;\n if(w === undefined || w === null) {\n w = 1;\n }\n let a1 = m[0], b1 = m[1], c1 = m[2], d1 = m[3];\n let a2 = m[4], b2 = m[5], c2 = m[6], d2 = m[7];\n let a3 = m[8], b3 = m[9], c3 = m[10], d3 = m[11];\n let a4 = m[12], b4 = m[13], c4 = m[14], d4 = m[15];\n let o = {\n x: ((a1 === 1) ? x : (x * a1)) + (a2 ? (y * a2) : 0) + ((w === 1) ? a4 : a4 * w),\n y: ((b1 === 1) ? x : (x * b1)) + (b2 ? (y * b2) : 0) + ((w === 1) ? b4 : b4 * w),\n z: 0,\n w,\n };\n if(d1 || d2 || d3) {\n o.w = x * d1 + y * d2 + z * d3 + d4 * w;\n }\n else if(d4 !== 1) {\n o.w *= d4;\n }\n if(z) {\n o.x += z * a3;\n o.y += z * b3;\n o.z = x * c1 + y * c2 + c4 + z * c3;\n }\n else if(c1 || c2 || c4) {\n o.z = x * c1 + y * c2 + c4;\n }\n return o;\n }\n return point;\n}\n\n/**\n * 初等行变换求3*3特定css的matrix方阵,一维6长度\n * https://blog.csdn.net/iloveas2014/article/details/82930946\n */\nfunction inverse(m) {\n if(m.length === 16) {\n return inverse4(m);\n }\n let a = m[0], b = m[1], c = m[2], d = m[3], e = m[4], f = m[5];\n if(a === 1 && b === 0 && c === 0 && d === 1 && e === 0 && f === 0) {\n return m;\n }\n let divisor = a * d - b * c;\n if(divisor === 0) {\n return m;\n }\n return [d / divisor, -b / divisor, -c / divisor, a / divisor,\n (c * f - d * e) / divisor, (b * e - a * f) / divisor];\n}\n\n// 16位或者6位单位矩阵判断,空也认为是\nfunction isE(m) {\n if(!m || !m.length) {\n return true;\n }\n if(m.length === 16) {\n return m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 0\n && m[4] === 0 && m[5] === 1 && m[6] === 0 && m[7] === 0\n && m[8] === 0 && m[9] === 0 && m[10] === 1 && m[11] === 0\n && m[12] === 0 && m[13] === 0 && m[14] === 0 && m[15] === 1;\n }\n return m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 1 && m[4] === 0 && m[5] === 0;\n}\n\n/**\n * 求任意4*4矩阵的逆矩阵,行列式为 0 则返回单位矩阵兜底\n * 格式:matrix3d(a1, b1, c1, d1, a2, b2, c2, d2, a3, b3, c3, d3, a4, b4, c4, d4)\n * 参见: https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix3d()\n * 对应:\n * [\n * a1,a2,a3,a4,\n * b1,b2,b3,b4,\n * c1,c2,c3,c4,\n * d1,d2,d3,d4,\n * ]\n *\n * 根据公式 A* = |A|A^-1 来计算\n * A* 表示矩阵 A 的伴随矩阵,A^-1 表示矩阵 A 的逆矩阵,|A| 表示行列式的值\n *\n * @returns {number[]}\n */\n\nfunction inverse4(s) {\n let inv = [];\n\n inv[0] = s[5] * s[10] * s[15] - s[5] * s[11] * s[14] - s[9] * s[6] * s[15]\n + s[9] * s[7] * s[14] + s[13] * s[6] * s[11] - s[13] * s[7] * s[10];\n inv[4] = -s[4] * s[10] * s[15] + s[4] * s[11] * s[14] + s[8] * s[6] * s[15]\n - s[8] * s[7] * s[14] - s[12] * s[6] * s[11] + s[12] * s[7] * s[10];\n inv[8] = s[4] * s[9] * s[15] - s[4] * s[11] * s[13] - s[8] * s[5] * s[15]\n + s[8] * s[7] * s[13] + s[12] * s[5] * s[11] - s[12] * s[7] * s[9];\n inv[12] = -s[4] * s[9] * s[14] + s[4] * s[10] * s[13] + s[8] * s[5] * s[14]\n - s[8] * s[6] * s[13] - s[12] * s[5] * s[10] + s[12] * s[6] * s[9];\n\n inv[1] = -s[1] * s[10] * s[15] + s[1] * s[11] * s[14] + s[9] * s[2] * s[15]\n - s[9] * s[3] * s[14] - s[13] * s[2] * s[11] + s[13] * s[3] * s[10];\n inv[5] = s[0] * s[10] * s[15] - s[0] * s[11] * s[14] - s[8] * s[2] * s[15]\n + s[8] * s[3] * s[14] + s[12] * s[2] * s[11] - s[12] * s[3] * s[10];\n inv[9] = -s[0] * s[9] * s[15] + s[0] * s[11] * s[13] + s[8] * s[1] * s[15]\n - s[8] * s[3] * s[13] - s[12] * s[1] * s[11] + s[12] * s[3] * s[9];\n inv[13] = s[0] * s[9] * s[14] - s[0] * s[10] * s[13] - s[8] * s[1] * s[14]\n + s[8] * s[2] * s[13] + s[12] * s[1] * s[10] - s[12] * s[2] * s[9];\n\n inv[2] = s[1] * s[6] * s[15] - s[1] * s[7] * s[14] - s[5] * s[2] * s[15]\n + s[5] * s[3] * s[14] + s[13] * s[2] * s[7] - s[13] * s[3] * s[6];\n inv[6] = -s[0] * s[6] * s[15] + s[0] * s[7] * s[14] + s[4] * s[2] * s[15]\n - s[4] * s[3] * s[14] - s[12] * s[2] * s[7] + s[12] * s[3] * s[6];\n inv[10] = s[0] * s[5] * s[15] - s[0] * s[7] * s[13] - s[4] * s[1] * s[15]\n + s[4] * s[3] * s[13] + s[12] * s[1] * s[7] - s[12] * s[3] * s[5];\n inv[14] = -s[0] * s[5] * s[14] + s[0] * s[6] * s[13] + s[4] * s[1] * s[14]\n - s[4] * s[2] * s[13] - s[12] * s[1] * s[6] + s[12] * s[2] * s[5];\n\n inv[3] = -s[1] * s[6] * s[11] + s[1] * s[7] * s[10] + s[5] * s[2] * s[11]\n - s[5] * s[3] * s[10] - s[9] * s[2] * s[7] + s[9] * s[3] * s[6];\n inv[7] = s[0] * s[6] * s[11] - s[0] * s[7] * s[10] - s[4] * s[2] * s[11]\n + s[4] * s[3] * s[10] + s[8] * s[2] * s[7] - s[8] * s[3] * s[6];\n inv[11] = -s[0] * s[5] * s[11] + s[0] * s[7] * s[9] + s[4] * s[1] * s[11]\n - s[4] * s[3] * s[9] - s[8] * s[1] * s[7] + s[8] * s[3] * s[5];\n inv[15] = s[0] * s[5] * s[10] - s[0] * s[6] * s[9] - s[4] * s[1] * s[10]\n + s[4] * s[2] * s[9] + s[8] * s[1] * s[6] - s[8] * s[2] * s[5];\n\n let det = s[0] * inv[0] + s[1] * inv[4] + s[2] * inv[8] + s[3] * inv[12];\n if (det === 0) {\n return identity();\n }\n\n det = 1 / det;\n let d = [];\n for (let i = 0; i < 16; i++) {\n d[i] = inv[i] * det;\n }\n return d;\n}\n\n// 将4*4的16长度矩阵转成css/canvas的6位标准使用,忽略transform3d\nfunction m2m6(m) {\n return [\n m[0],\n m[1],\n m[4],\n m[5],\n m[12],\n m[13],\n ];\n}\n\nfunction point2d(point) {\n let w = point[3];\n if(w && w !== 1) {\n point = point.slice(0, 2);\n point[0] /= w;\n point[1] /= w;\n }\n return point;\n}\n\nfunction calRectPoint(xa, ya, xb, yb, matrix) {\n let { x: x1, y: y1, z: z1, w: w1 } = calPoint({ x: xa, y: ya, z: 0, w: 1 }, matrix);\n let { x: x3, y: y3, z: z3, w: w3 } = calPoint({ x: xb, y: yb, z: 0, w: 1 }, matrix);\n let x2, y2, z2, w2, x4, y4, z4, w4;\n // 无旋转的时候可以少算2个点\n if(w1 === 1 && w3 === 1\n && (!matrix || !matrix.length\n || !matrix[1] && !matrix[2] && !matrix[4] && !matrix[6] && !matrix[7] && !matrix[8])) {\n x2 = x3;\n y2 = y1;\n z2 = z3;\n x4 = x1;\n y4 = y3;\n z2 = z4 = z1;\n w2 = w4 = 1;\n }\n else {\n let t = calPoint({ x: xb, y: ya, z: 0, w: 1 }, matrix);\n x2 = t.x; y2 = t.y; z2 = t.z; w2 = t.w;\n t = calPoint({ x: xa, y: yb, z: 0, w: 1 }, matrix);\n x4 = t.x; y4 = t.y; z4 = t.z; w4 = t.w;\n }\n return { x1, y1, z1, w1, x2, y2, z2, w2, x3, y3, z3, w3, x4, y4, z4, w4 };\n}\n\nexport default {\n identity,\n multiply,\n multiplyTfo,\n tfoMultiply,\n multiplyTranslateX,\n multiplyTranslateY,\n multiplyTranslateZ,\n multiplyRotateX,\n multiplyRotateY,\n multiplyRotateZ,\n multiplySkewX,\n multiplySkewY,\n multiplyScaleX,\n multiplyScaleY,\n multiplyScaleZ,\n multiplyPerspective,\n calPoint,\n calRectPoint,\n point2d,\n inverse,\n isE,\n m2m6,\n};\n","import mx from '../math/matrix';\n\nlet toString = {}.toString;\nfunction isType(type) {\n return function(obj) {\n return toString.call(obj) === '[object ' + type + ']';\n }\n}\n\nlet isObject = isType('Object');\nlet isString = isType('String');\nlet isFunction = isType('Function');\nlet isNumber = isType('Number');\nlet isBoolean = isType('Boolean');\nlet isDate = isType('Date');\n\nlet hasOwn = {}.hasOwnProperty;\nlet fnToString = hasOwn.toString;\nlet ObjectFunctionString = fnToString.call(Object);\n\nfunction isNil(v) {\n return v === undefined || v === null;\n}\n\nfunction joinSourceArray(arr) {\n let res = '';\n for(let i = 0, len = arr.length; i < len; i++) {\n let item = arr[i];\n if(Array.isArray(item)) {\n res += joinSourceArray(item);\n }\n else {\n res += stringify(item);\n }\n }\n return res;\n}\n\nfunction stringify(s) {\n if(isNil(s)) {\n return '';\n }\n return s.toString();\n}\n\nfunction encodeHtml(s, prop) {\n if(prop) {\n return s.replace(/\"/g, '"');\n }\n return s.replace(/&/g, '&').replace(/ {\n s += joinDef(item);\n });\n s += '';\n vd.bb.forEach(item => {\n s += joinVd(item);\n });\n s += ' {\n s += joinVd(item);\n });\n s += '';\n return s;\n}\n\n// 普通元素\nfunction joinVd(vd) {\n if(vd.type === 'item' || vd.type === 'img') {\n let s = '';\n (vd.props || []).forEach(item => {\n s += ' ' + item[0] + '=\"' + item[1] + '\"';\n });\n if(vd.tagName === 'text') {\n return '' + vd.content + '';\n }\n return '<' + vd.tagName + s + '/>';\n }\n else if(vd.type === 'text') {\n let s = '';\n // text有许多lineBox\n (vd.children || []).forEach(item => {\n s += joinVd(item);\n });\n return '' + s + '';\n }\n else if(vd.type === 'dom' || vd.type === 'geom') {\n let s = '';\n vd.bb.forEach(item => {\n s += joinVd(item);\n });\n s += ' {\n s += joinVd(item);\n });\n s += '';\n let { opacity, transform, visibility, mask, overflow, filter, mixBlendMode } = vd;\n return '' + s + '';\n }\n}\n\nfunction joinDef(def) {\n let s = '<' + def.tagName + ' id=\"' + def.uuid + '\"';\n if(def.tagName === 'mask' || def.tagName === 'clipPath') {\n // s += ' maskUnits=\"userSpaceOnUse\"';\n }\n else if(def.tagName === 'filter') {\n // s += ' filterUnits=\"userSpaceOnUse\"';\n }\n else {\n s += ' gradientUnits=\"userSpaceOnUse\"';\n }\n (def.props || []).forEach(item => {\n s += ' ' + item[0] + '=\"' + item[1] + '\"';\n });\n s += '>';\n (def.children || []).forEach(item => {\n s += joinItem(item);\n });\n s += '';\n return s;\n}\n\nfunction joinItem(item) {\n let s = '<' + item.tagName;\n (item.props || []).forEach(item => {\n s += ' ' + item[0] + '=\"' + item[1] + '\"';\n });\n s += '>';\n return s;\n}\n\nfunction rgba2int(color) {\n if(Array.isArray(color)) {\n return color;\n }\n let res = [];\n if(!color || color === 'transparent') {\n res = [0, 0, 0, 0];\n }\n else if(color.charAt(0) === '#') {\n color = color.slice(1);\n if(color.length === 3) {\n res.push(parseInt(color.charAt(0) + color.charAt(0), 16));\n res.push(parseInt(color.charAt(1) + color.charAt(1), 16));\n res.push(parseInt(color.charAt(2) + color.charAt(2), 16));\n res[3] = 1;\n }\n else if(color.length === 6) {\n res.push(parseInt(color.slice(0, 2), 16));\n res.push(parseInt(color.slice(2, 4), 16));\n res.push(parseInt(color.slice(4), 16));\n res[3] = 1;\n }\n else if(color.length === 8) {\n res.push(parseInt(color.slice(0, 2), 16));\n res.push(parseInt(color.slice(2, 4), 16));\n res.push(parseInt(color.slice(4, 6), 16));\n res.push(parseInt(color.slice(6), 16) / 255);\n }\n else {\n res[0] = res[1] = res[2] = 0;\n res[3] = 1;\n }\n }\n else {\n let c = color.match(/rgba?\\s*\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*,\\s*([\\d.]+)(?:\\s*,\\s*([\\d.]+))?\\s*\\)/i);\n if(c) {\n res = [parseInt(c[1]), parseInt(c[2]), parseInt(c[3])];\n if(!isNil(c[4])) {\n res[3] = parseFloat(c[4]);\n }\n else {\n res[3] = 1;\n }\n }\n else {\n res = [0, 0, 0, 0];\n }\n }\n return res;\n}\n\nfunction int2rgba(color) {\n if(Array.isArray(color)) {\n if(color.length === 3 || color.length === 4) {\n color[0] = Math.floor(Math.max(color[0], 0));\n color[1] = Math.floor(Math.max(color[1], 0));\n color[2] = Math.floor(Math.max(color[2], 0));\n if(color.length === 4) {\n color[3] = Math.max(color[3], 0);\n return 'rgba(' + color[0] + ',' + color[1] + ',' + color[2] + ',' + color[3] + ')';\n }\n return 'rgba(' + color[0] + ',' + color[1] + ',' + color[2] + ',1)';\n }\n // if(color.length === 4) {\n // color = color.map((c, i) => i === 3 ? c : Math.floor(Math.max(0, c)));\n // return 'rgba(' + joinArr(color, ',') + ')';\n // }\n // else if(color.length === 3) {\n // color = color.map(c => Math.floor(c));\n // return 'rgba(' + joinArr(color, ',') + ',1)';\n // }\n }\n return color || 'rgba(0,0,0,0)';\n}\n\nfunction int2invert(color) {\n if(Array.isArray(color)) {\n color = color.slice(0);\n color[0] = 255 - color[0];\n color[1] = 255 - color[1];\n color[2] = 255 - color[2];\n if(color.length === 4) {\n return 'rgba(' + joinArr(color, ',') + ')';\n }\n else if(color.length === 3) {\n return 'rgba(' + joinArr(color, ',') + ',1)';\n }\n }\n return 'rgba(0,0,0,0)';\n}\n\nfunction arr2hash(arr) {\n let hash = {};\n for(let i = 0, len = arr.length; i < len; i++) {\n let item = arr[i];\n if(Array.isArray(item)) {\n hash[item[0]] = item[1];\n }\n else {\n for(let list = Object.keys(item), j = list.length - 1; j >= 0; j--) {\n let k = list[j];\n hash[k] = item[k];\n }\n }\n }\n return hash;\n}\n\nfunction hash2arr(hash) {\n if(Array.isArray(hash)) {\n return hash;\n }\n let arr = [];\n for(let list = Object.keys(hash), i = 0, len = list.length; i < len; i++) {\n let k = list[i];\n arr.push([k, hash[k]]);\n }\n return arr;\n}\n\nfunction clone(obj) {\n if(isNil(obj) || typeof obj !== 'object') {\n return obj;\n }\n if(util.isDate(obj)) {\n return new Date(obj);\n }\n if(!isPlainObject(obj) && !Array.isArray(obj)) {\n return obj;\n }\n let n = Array.isArray(obj) ? [] : {};\n Object.keys(obj).forEach(i => {\n n[i] = clone(obj[i]);\n });\n return n;\n}\n\n/**\n * 简化的arr对比,arr中只有arr和其它类型,其它类型对比值或引用,arr递归\n * @param a\n * @param b\n * @returns {boolean}\n */\nfunction equalArr(a, b) {\n if(!a || !b) {\n return a === b;\n }\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let ai = a[i];\n let bi = b[i];\n let isArrayA = Array.isArray(ai);\n let isArrayB = Array.isArray(bi);\n if(isArrayA && isArrayB) {\n if(!equalArr(ai, bi)) {\n return false;\n }\n }\n else if(isArrayA || isArrayB) {\n return false;\n }\n else if(ai !== bi) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * 深度对比对象\n * @param a\n * @param b\n * @returns {boolean}\n */\nfunction equal(a, b) {\n if(a === b) {\n return true;\n }\n if(isObject(a) && isObject(b)) {\n let hash = {};\n for(let i = 0, arr = Object.keys(a), len = arr.length; i < len; i++) {\n let k = arr[i];\n if(!b.hasOwnProperty(k) || !equal(a[k], b[k])) {\n return false;\n }\n hash[k] = true;\n }\n // a没有b有则false\n for(let i = 0, arr = Object.keys(b), len = arr.length; i < len; i++) {\n let k = arr[i];\n if(!hash.hasOwnProperty(k)) {\n return false;\n }\n }\n }\n else if(isDate(a) && isDate(b)) {\n return a.getTime() === b.getTime();\n }\n else if(Array.isArray(a) && Array.isArray(b)) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n if(!equal(a[i], b[i])) {\n return false;\n }\n }\n }\n else {\n return a === b;\n }\n return true;\n}\n\nfunction extend(target, source, keys) {\n if(source === null || typeof source !== 'object') {\n return target;\n }\n if(!keys) {\n keys = Object.keys(source);\n }\n let i = 0;\n let len = keys.length;\n while(i < len) {\n let k = keys[i];\n target[k] = source[k];\n i++;\n }\n return target;\n}\n\nfunction joinArr(arr, split) {\n let s = arr.length ? arr[0] : '';\n for(let i = 1, len = arr.length; i < len; i++) {\n s += split + arr[i];\n }\n return s;\n}\n\nfunction transformBbox(bbox, matrix, dx = 0, dy = 0) {\n if(!mx.isE(matrix)) {\n let [x1, y1, x2, y2] = bbox;\n // 可能因filter的原因扩展范围\n if(dx) {\n x1 -= dx;\n x2 += dx;\n }\n if(dy) {\n y1 -= dy;\n y2 += dy;\n }\n let list = [x2, y1, x1, y2, x2, y2];\n let w;\n let t = mx.calPoint({ x: x1, y: y1, z: 0, w: 1 }, matrix);\n x1 = t.x; y1 = t.y; w = t.w;\n if(w && w !== 1) {\n x1 /= w;\n y1 /= w;\n }\n let xa = x1, ya = y1, xb = x1, yb = y1;\n for(let i = 0; i < 6; i += 2) {\n let x = list[i], y = list[i + 1];\n let t = mx.calPoint({ x, y, z: 0, w: 1 }, matrix);\n x = t.x; y = t.y; w = t.w;\n if(w && w !== 1) {\n x /= w;\n y /= w;\n }\n xa = Math.min(xa, x);\n xb = Math.max(xb, x);\n ya = Math.min(ya, y);\n yb = Math.max(yb, y);\n }\n return [xa, ya, xb, yb];\n }\n else {\n bbox = bbox.slice(0);\n if(dx || dy) {\n bbox = bbox.slice(0);\n bbox[0] -= dx;\n bbox[1] -= dy;\n bbox[2] += dx;\n bbox[3] += dy;\n }\n }\n return bbox;\n}\n\nfunction isPlainObject(obj) {\n if(!obj || toString.call(obj) !== '[object Object]') {\n return false;\n }\n let proto = Object.getPrototypeOf(obj);\n if(!proto) {\n return true;\n }\n let Ctor = hasOwn.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor === 'function' && fnToString.call(Ctor) === ObjectFunctionString;\n}\n\nfunction assignMatrix(t, v) {\n if(t && v) {\n t[0] = v[0];\n t[1] = v[1];\n t[2] = v[2];\n t[3] = v[3];\n t[4] = v[4];\n t[5] = v[5];\n t[6] = v[6];\n t[7] = v[7];\n t[8] = v[8];\n t[9] = v[9];\n t[10] = v[10];\n t[11] = v[11];\n t[12] = v[12];\n t[13] = v[13];\n t[14] = v[14];\n t[15] = v[15];\n }\n return t;\n}\n\nfunction prefixHex(s) {\n if(s.length === 1) {\n return '0' + s;\n }\n return s;\n}\n\nfunction replaceRgba2Hex(s) {\n return (s || '').replace(/rgba?\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*([\\d.]+)\\s*)?\\)/ig, function($0, $1, $2, $3, $4) {\n let res = '#'\n + prefixHex(parseInt($1).toString(16))\n + prefixHex(parseInt($2).toString(16))\n + prefixHex(parseInt($3).toString(16));\n if($4) {\n res += prefixHex(Math.floor(parseFloat($4) * 255).toString(16));\n }\n return res;\n });\n}\n\nlet util = {\n isObject,\n isString,\n isFunction,\n isNumber,\n isBoolean,\n isDate,\n isNil,\n isPrimitive(v) {\n return util.isNil(v) || util.isBoolean(v) || util.isString(v) || util.isNumber(v);\n },\n // css中常用undefined/null表示auto本身\n isAuto(v) {\n return isNil(v) || v === 'auto';\n },\n isPlainObject,\n stringify,\n joinSourceArray(arr) {\n return joinSourceArray(arr);\n },\n encodeHtml,\n joinVirtualDom,\n joinVd,\n joinDef,\n rgba2int,\n int2rgba,\n int2invert,\n arr2hash,\n hash2arr,\n clone,\n equalArr,\n equal,\n extend,\n joinArr,\n transformBbox,\n assignMatrix,\n prefixHex,\n replaceRgba2Hex,\n};\n\nexport default util;\n","export default {\n flag: false,\n};\n","import util from './util';\nimport debug from './debug';\n\nconst SPF = 1000 / 60;\n\nconst CANVAS = {};\nconst SUPPORT_OFFSCREEN_CANVAS = typeof OffscreenCanvas === 'function' && OffscreenCanvas.prototype.getContext;\n\nfunction offscreenCanvas(key, width, height, message) {\n let o;\n if(!key) {\n o = !debug.flag && SUPPORT_OFFSCREEN_CANVAS ? new OffscreenCanvas(width, height) : document.createElement('canvas');\n }\n else if(!CANVAS[key]) {\n o = CANVAS[key] = !debug.flag && SUPPORT_OFFSCREEN_CANVAS ? new OffscreenCanvas(width, height) : document.createElement('canvas');\n }\n else {\n o = CANVAS[key];\n }\n o.width = width;\n o.height = height;\n if(debug.flag) {\n o.style.width = width + 'px';\n o.style.height = height + 'px';\n if(key) {\n o.setAttribute('key', key);\n }\n if(message) {\n o.setAttribute('message', message);\n }\n document.body.appendChild(o);\n }\n let ctx = o.getContext('2d');\n return {\n canvas: o,\n ctx,\n enabled: true,\n available: true,\n release() {\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, width, height);\n this.available = false;\n },\n };\n}\n\nconst IMG = {};\nconst INIT = 0;\nconst LOADING = 1;\nconst LOADED = 2;\nconst FONT = {};\nconst COMPONENT = {};\nlet div;\n\nconst SUPPORT_FONT = {};\nlet defaultFontFamilyData;\n\nfunction createDiv() {\n div = document.createElement('div');\n div.style.position = 'absolute';\n div.style.left = '99999px';\n div.style.top = '-99999px';\n div.style.visibility = 'hidden';\n div.style.whiteSpace = 'nowrap';\n document.body.appendChild(div);\n}\n\nlet inject = {\n measureTextSync(str, ff, fs, fw, isUpright) {\n if(!div) {\n createDiv();\n }\n div.style.fontFamily = ff;\n div.style.fontSize = fs + 'px';\n div.style.fontWeight = fw;\n if(isUpright) {\n div.style.writingMode = 'vertical-lr';\n }\n else {\n div.style.writingMode = 'horizontal-tb';\n }\n div.innerHTML = str.replace(/';\n }\n div.innerHTML = s;\n let max = 0;\n let cns = div.childNodes;\n for(let i = 0, len = cns.length; i < len; i++) {\n let node = cns[i];\n // clientWidth只返回ceil整数,精度必须用getComputedStyle\n max = Math.max(max, parseFloat(window.getComputedStyle(node, null).width));\n }\n return max;\n },\n IMG,\n INIT,\n LOADED,\n LOADING,\n measureImg(url, cb) {\n if(Array.isArray(url)) {\n if(!url.length) {\n return cb && cb();\n }\n let count = 0;\n let len = url.length;\n let list = [];\n url.forEach((item, i) => {\n inject.measureImg(item, function(cache) {\n list[i] = cache;\n if(++count === len) {\n cb && cb(list);\n }\n });\n });\n return;\n }\n else if(!url || !util.isString(url)) {\n inject.error('Measure img invalid: ' + url);\n cb && cb({\n state: LOADED,\n success: false,\n url,\n });\n return;\n }\n let cache = IMG[url] = IMG[url] || {\n state: INIT,\n task: [],\n };\n if(cache.state === LOADED) {\n cb && cb(cache);\n }\n else if(cache.state === LOADING) {\n cb && cache.task.push(cb);\n }\n else {\n cache.state = LOADING;\n cb && cache.task.push(cb);\n let img = new Image();\n img.onload = function() {\n cache.state = LOADED;\n cache.success = true;\n cache.width = img.width;\n cache.height = img.height;\n cache.source = img;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n };\n img.onerror = function(e) {\n cache.state = LOADED;\n cache.success = false;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n };\n if(url.substr(0, 5) !== 'data:') {\n let host = /^(?:\\w+:)?\\/\\/([^/:]+)/.exec(url);\n if(host) {\n if(typeof location === 'undefined' || location.hostname !== host[1]) {\n img.crossOrigin = 'anonymous';\n }\n }\n }\n img.src = url;\n if(debug.flag && typeof document !== 'undefined') {\n document.body.appendChild(img);\n }\n }\n },\n warn(s) {\n console.warn(s);\n },\n error(s) {\n console.error(s);\n },\n requestAnimationFrame(cb) {\n if(!cb) {\n return;\n }\n let res;\n if(typeof requestAnimationFrame !== 'undefined') {\n inject.requestAnimationFrame = requestAnimationFrame.bind(null);\n res = requestAnimationFrame(cb);\n }\n else {\n res = setTimeout(cb, SPF);\n inject.requestAnimationFrame = function(cb) {\n return setTimeout(cb, SPF);\n };\n }\n return res;\n },\n cancelAnimationFrame(id) {\n let res;\n if(typeof cancelAnimationFrame !== 'undefined') {\n inject.cancelAnimationFrame = cancelAnimationFrame.bind(null);\n res = cancelAnimationFrame(id);\n }\n else {\n res = clearTimeout(id);\n inject.cancelAnimationFrame = function(id) {\n return clearTimeout(id);\n };\n }\n return res;\n },\n now() {\n if(typeof performance !== 'undefined') {\n inject.now = function() {\n return Math.floor(performance.now());\n };\n return Math.floor(performance.now());\n }\n inject.now = Date.now.bind(Date);\n return Date.now();\n },\n hasOffscreenCanvas(key) {\n return key && CANVAS.hasOwnProperty(key);\n },\n getOffscreenCanvas(width, height, key, message) {\n return offscreenCanvas(key, width, height, message);\n },\n isDom(o) {\n if(o) {\n if(util.isString(o)) {\n return true;\n }\n if(typeof window !== 'undefined' && window.Element && (o instanceof window.Element)) {\n return true;\n }\n if(typeof window !== 'undefined' && window.OffscreenCanvas && (o instanceof window.OffscreenCanvas)) {\n return true;\n }\n // worker\n if(typeof self !== 'undefined' && self.OffscreenCanvas && (o instanceof self.OffscreenCanvas)) {\n return true;\n }\n if(util.isFunction(o.getElementsByTagName)) {\n return true;\n }\n }\n return false;\n },\n isWebGLTexture(o) {\n if(o && typeof WebGLTexture !== 'undefined') {\n return o instanceof WebGLTexture;\n }\n },\n defaultFontFamily: 'arial',\n getFontCanvas() {\n return inject.getOffscreenCanvas(16, 16, '__$$CHECK_SUPPORT_FONT_FAMILY$$__', null);\n },\n checkSupportFontFamily(ff) {\n ff = ff.toLowerCase();\n // 强制arial兜底\n if(ff === this.defaultFontFamily) {\n return true;\n }\n if(SUPPORT_FONT.hasOwnProperty(ff)) {\n return SUPPORT_FONT[ff];\n }\n let canvas = inject.getFontCanvas();\n let context = canvas.ctx;\n context.textAlign = 'center';\n context.fillStyle = '#000';\n context.textBaseline = 'middle';\n if(!defaultFontFamilyData) {\n context.clearRect(0, 0, 16, 16);\n context.font = '16px ' + this.defaultFontFamily;\n context.fillText('a', 8, 8);\n defaultFontFamilyData = context.getImageData(0, 0, 16, 16).data;\n }\n context.clearRect(0, 0, 16, 16);\n if(/\\s/.test(ff)) {\n ff = '\"' + ff.replace(/\"/g, '\\\\\"') + '\"';\n }\n context.font = '16px ' + ff + ',' + this.defaultFontFamily;\n context.fillText('a', 8, 8);\n let data = context.getImageData(0, 0, 16, 16).data;\n for(let i = 0, len = data.length; i < len; i++) {\n if(defaultFontFamilyData[i] !== data[i]) {\n return SUPPORT_FONT[ff] = true;\n }\n }\n return SUPPORT_FONT[ff] = false;\n },\n FONT,\n loadFont(fontFamily, url, cb) {\n if(util.isFunction(url)) {\n cb = url;\n url = fontFamily;\n }\n if(Array.isArray(url)) {\n if(!url.length) {\n return cb();\n }\n let count = 0;\n let len = url.length;\n let list = [];\n url.forEach((item, i) => {\n inject.loadFont(item.fontFamily, item.url, function(cache) {\n list[i] = cache;\n if(++count === len) {\n cb(list);\n }\n });\n });\n return;\n }\n else if(!url || !util.isString(url)) {\n inject.error('Load font invalid: ' + url);\n cb && cb({\n state: LOADED,\n success: false,\n url,\n });\n return;\n }\n if(!fontFamily) {\n fontFamily = url;\n }\n let cache = FONT[url] = FONT[url] || {\n state: INIT,\n task: [],\n };\n if(cache.state === LOADED) {\n cb && cb(cache);\n }\n else if(cache.state === LOADING) {\n cb && cache.task.push(cb);\n }\n else {\n cache.state = LOADING;\n cb && cache.task.push(cb);\n if(url instanceof ArrayBuffer) {\n success(url);\n }\n else {\n let request = new XMLHttpRequest();\n request.open('get', url, true);\n request.responseType = 'arraybuffer';\n request.onload = function() {\n if(request.response) {\n success(request.response);\n }\n else {\n error();\n }\n };\n request.onerror = error;\n request.send();\n }\n function success(ab) {\n let f = new FontFace(fontFamily, ab);\n f.load().then(function() {\n if(typeof document !== 'undefined') {\n document.fonts.add(f);\n }\n cache.state = LOADED;\n cache.success = true;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache, ab));\n }).catch(error);\n }\n function error() {\n cache.state = LOADED;\n cache.success = false;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n }\n }\n },\n loadComponent(url, cb) {\n if(Array.isArray(url)) {\n if(!url.length) {\n return cb();\n }\n let count = 0;\n let len = url.length;\n let list = [];\n url.forEach((item, i) => {\n inject.loadComponent(item, function(cache) {\n list[i] = cache;\n if(++count === len) {\n cb(list);\n }\n });\n });\n return;\n }\n else if(!url || !util.isString(url)) {\n inject.error('Load component invalid: ' + url);\n cb && cb({\n state: LOADED,\n success: false,\n url,\n });\n return;\n }\n let cache = COMPONENT[url] = COMPONENT[url] || {\n state: INIT,\n task: [],\n };\n if(cache.state === LOADED) {\n cb && cb(cache);\n }\n else if(cache.state === LOADING) {\n cb && cache.task.push(cb);\n }\n else {\n cache.state = LOADING;\n cb && cache.task.push(cb);\n let script = document.createElement('script');\n script.src = url;\n script.async = true;\n script.onload = function() {\n cache.state = LOADED;\n cache.success = true;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n document.head.removeChild(script);\n };\n script.onerror = function() {\n cache.state = LOADED;\n cache.success = false;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n document.head.removeChild(script);\n };\n document.head.appendChild(script);\n }\n },\n};\n\nexport default inject;\n","let TINF_OK = 0;\nlet TINF_DATA_ERROR = -3;\n\nfunction Tree() {\n this.table = new Uint16Array(16); /* table of code length counts */\n this.trans = new Uint16Array(288); /* code -> symbol translation table */\n}\n\nfunction Data(source, dest) {\n this.source = source;\n this.sourceIndex = 0;\n this.tag = 0;\n this.bitcount = 0;\n\n this.dest = dest;\n this.destLen = 0;\n\n this.ltree = new Tree(); /* dynamic length/symbol tree */\n this.dtree = new Tree(); /* dynamic distance tree */\n}\n\n/* --------------------------------------------------- *\n * -- uninitialized global data (static structures) -- *\n * --------------------------------------------------- */\n\nlet sltree = new Tree();\nlet sdtree = new Tree();\n\n/* extra bits and base tables for length codes */\nlet length_bits = new Uint8Array(30);\nlet length_base = new Uint16Array(30);\n\n/* extra bits and base tables for distance codes */\nlet dist_bits = new Uint8Array(30);\nlet dist_base = new Uint16Array(30);\n\n/* special ordering of code length codes */\nlet clcidx = new Uint8Array([\n 16, 17, 18, 0, 8, 7, 9, 6,\n 10, 5, 11, 4, 12, 3, 13, 2,\n 14, 1, 15\n]);\n\n/* used by tinf_decode_trees, avoids allocations every call */\nlet code_tree = new Tree();\nlet lengths = new Uint8Array(288 + 32);\n\n/* ----------------------- *\n * -- utility functions -- *\n * ----------------------- */\n\n/* build extra bits and base tables */\nfunction tinf_build_bits_base(bits, base, delta, first) {\n let i, sum;\n\n /* build bits table */\n for (i = 0; i < delta; ++i) bits[i] = 0;\n for (i = 0; i < 30 - delta; ++i) bits[i + delta] = i / delta | 0;\n\n /* build base table */\n for (sum = first, i = 0; i < 30; ++i) {\n base[i] = sum;\n sum += 1 << bits[i];\n }\n}\n\n/* build the fixed huffman trees */\nfunction tinf_build_fixed_trees(lt, dt) {\n let i;\n\n /* build fixed length tree */\n for (i = 0; i < 7; ++i) lt.table[i] = 0;\n\n lt.table[7] = 24;\n lt.table[8] = 152;\n lt.table[9] = 112;\n\n for (i = 0; i < 24; ++i) lt.trans[i] = 256 + i;\n for (i = 0; i < 144; ++i) lt.trans[24 + i] = i;\n for (i = 0; i < 8; ++i) lt.trans[24 + 144 + i] = 280 + i;\n for (i = 0; i < 112; ++i) lt.trans[24 + 144 + 8 + i] = 144 + i;\n\n /* build fixed distance tree */\n for (i = 0; i < 5; ++i) dt.table[i] = 0;\n\n dt.table[5] = 32;\n\n for (i = 0; i < 32; ++i) dt.trans[i] = i;\n}\n\n/* given an array of code lengths, build a tree */\nlet offs = new Uint16Array(16);\n\nfunction tinf_build_tree(t, lengths, off, num) {\n let i, sum;\n\n /* clear code length count table */\n for (i = 0; i < 16; ++i) t.table[i] = 0;\n\n /* scan symbol lengths, and sum code length counts */\n for (i = 0; i < num; ++i) t.table[lengths[off + i]]++;\n\n t.table[0] = 0;\n\n /* compute offset table for distribution sort */\n for (sum = 0, i = 0; i < 16; ++i) {\n offs[i] = sum;\n sum += t.table[i];\n }\n\n /* create code->symbol translation table (symbols sorted by code) */\n for (i = 0; i < num; ++i) {\n if (lengths[off + i]) t.trans[offs[lengths[off + i]]++] = i;\n }\n}\n\n/* ---------------------- *\n * -- decode functions -- *\n * ---------------------- */\n\n/* get one bit from source stream */\nfunction tinf_getbit(d) {\n /* check if tag is empty */\n if (!d.bitcount--) {\n /* load next tag */\n d.tag = d.source[d.sourceIndex++];\n d.bitcount = 7;\n }\n\n /* shift bit out of tag */\n let bit = d.tag & 1;\n d.tag >>>= 1;\n\n return bit;\n}\n\n/* read a num bit value from a stream and add base */\nfunction tinf_read_bits(d, num, base) {\n if (!num)\n return base;\n\n while (d.bitcount < 24) {\n d.tag |= d.source[d.sourceIndex++] << d.bitcount;\n d.bitcount += 8;\n }\n\n let val = d.tag & (0xffff >>> (16 - num));\n d.tag >>>= num;\n d.bitcount -= num;\n return val + base;\n}\n\n/* given a data stream and a tree, decode a symbol */\nfunction tinf_decode_symbol(d, t) {\n while (d.bitcount < 24) {\n d.tag |= d.source[d.sourceIndex++] << d.bitcount;\n d.bitcount += 8;\n }\n\n let sum = 0, cur = 0, len = 0;\n let tag = d.tag;\n\n /* get more bits while code value is above sum */\n do {\n cur = 2 * cur + (tag & 1);\n tag >>>= 1;\n ++len;\n\n sum += t.table[len];\n cur -= t.table[len];\n } while (cur >= 0);\n\n d.tag = tag;\n d.bitcount -= len;\n\n return t.trans[sum + cur];\n}\n\n/* given a data stream, decode dynamic trees from it */\nfunction tinf_decode_trees(d, lt, dt) {\n let hlit, hdist, hclen;\n let i, num, length;\n\n /* get 5 bits HLIT (257-286) */\n hlit = tinf_read_bits(d, 5, 257);\n\n /* get 5 bits HDIST (1-32) */\n hdist = tinf_read_bits(d, 5, 1);\n\n /* get 4 bits HCLEN (4-19) */\n hclen = tinf_read_bits(d, 4, 4);\n\n for (i = 0; i < 19; ++i) lengths[i] = 0;\n\n /* read code lengths for code length alphabet */\n for (i = 0; i < hclen; ++i) {\n /* get 3 bits code length (0-7) */\n let clen = tinf_read_bits(d, 3, 0);\n lengths[clcidx[i]] = clen;\n }\n\n /* build code length tree */\n tinf_build_tree(code_tree, lengths, 0, 19);\n\n /* decode code lengths for the dynamic trees */\n for (num = 0; num < hlit + hdist;) {\n let sym = tinf_decode_symbol(d, code_tree);\n\n switch (sym) {\n case 16:\n /* copy previous code length 3-6 times (read 2 bits) */\n let prev = lengths[num - 1];\n for (length = tinf_read_bits(d, 2, 3); length; --length) {\n lengths[num++] = prev;\n }\n break;\n case 17:\n /* repeat code length 0 for 3-10 times (read 3 bits) */\n for (length = tinf_read_bits(d, 3, 3); length; --length) {\n lengths[num++] = 0;\n }\n break;\n case 18:\n /* repeat code length 0 for 11-138 times (read 7 bits) */\n for (length = tinf_read_bits(d, 7, 11); length; --length) {\n lengths[num++] = 0;\n }\n break;\n default:\n /* values 0-15 represent the actual code lengths */\n lengths[num++] = sym;\n break;\n }\n }\n\n /* build dynamic trees */\n tinf_build_tree(lt, lengths, 0, hlit);\n tinf_build_tree(dt, lengths, hlit, hdist);\n}\n\n/* ----------------------------- *\n * -- block inflate functions -- *\n * ----------------------------- */\n\n/* given a stream and two trees, inflate a block of data */\nfunction tinf_inflate_block_data(d, lt, dt) {\n while (1) {\n let sym = tinf_decode_symbol(d, lt);\n\n /* check for end of block */\n if (sym === 256) {\n return TINF_OK;\n }\n\n if (sym < 256) {\n d.dest[d.destLen++] = sym;\n } else {\n let length, dist, offs;\n let i;\n\n sym -= 257;\n\n /* possibly get more bits from length code */\n length = tinf_read_bits(d, length_bits[sym], length_base[sym]);\n\n dist = tinf_decode_symbol(d, dt);\n\n /* possibly get more bits from distance code */\n offs = d.destLen - tinf_read_bits(d, dist_bits[dist], dist_base[dist]);\n\n /* copy match */\n for (i = offs; i < offs + length; ++i) {\n d.dest[d.destLen++] = d.dest[i];\n }\n }\n }\n}\n\n/* inflate an uncompressed block of data */\nfunction tinf_inflate_uncompressed_block(d) {\n let length, invlength;\n let i;\n\n /* unread from bitbuffer */\n while (d.bitcount > 8) {\n d.sourceIndex--;\n d.bitcount -= 8;\n }\n\n /* get length */\n length = d.source[d.sourceIndex + 1];\n length = 256 * length + d.source[d.sourceIndex];\n\n /* get one's complement of length */\n invlength = d.source[d.sourceIndex + 3];\n invlength = 256 * invlength + d.source[d.sourceIndex + 2];\n\n /* check length */\n if (length !== (~invlength & 0x0000ffff))\n return TINF_DATA_ERROR;\n\n d.sourceIndex += 4;\n\n /* copy block */\n for (i = length; i; --i)\n d.dest[d.destLen++] = d.source[d.sourceIndex++];\n\n /* make sure we start next block on a byte boundary */\n d.bitcount = 0;\n\n return TINF_OK;\n}\n\n/* inflate stream from source to dest */\nfunction tinf_uncompress(source, dest) {\n let d = new Data(source, dest);\n let bfinal, btype, res;\n\n do {\n /* read final block flag */\n bfinal = tinf_getbit(d);\n\n /* read block type (2 bits) */\n btype = tinf_read_bits(d, 2, 0);\n\n /* decompress block */\n switch (btype) {\n case 0:\n /* decompress uncompressed block */\n res = tinf_inflate_uncompressed_block(d);\n break;\n case 1:\n /* decompress block with fixed huffman trees */\n res = tinf_inflate_block_data(d, sltree, sdtree);\n break;\n case 2:\n /* decompress block with dynamic huffman trees */\n tinf_decode_trees(d, d.ltree, d.dtree);\n res = tinf_inflate_block_data(d, d.ltree, d.dtree);\n break;\n default:\n res = TINF_DATA_ERROR;\n }\n\n if (res !== TINF_OK)\n throw new Error('Data error');\n\n } while (!bfinal);\n\n if (d.destLen < d.dest.length) {\n if (typeof d.dest.slice === 'function')\n return d.dest.slice(0, d.destLen);\n else\n return d.dest.subarray(0, d.destLen);\n }\n\n return d.dest;\n}\n\n/* -------------------- *\n * -- initialization -- *\n * -------------------- */\n\n/* build fixed huffman trees */\ntinf_build_fixed_trees(sltree, sdtree);\n\n/* build extra bits and base tables */\ntinf_build_bits_base(length_bits, length_base, 4, 3);\ntinf_build_bits_base(dist_bits, dist_base, 2, 1);\n\n/* fix a special case */\nlength_bits[28] = 0;\nlength_base[28] = 258;\n\nexport default tinf_uncompress;\n","import inject from './inject';\nimport inflate from './inflate';\n\nfunction getTag(dataView, offset) {\n let tag = '';\n for (let i = offset; i < offset + 4; i++) {\n tag += String.fromCharCode(dataView.getInt8(i));\n }\n return tag;\n}\n\nfunction getUShort(dataView, offset) {\n return dataView.getUint16(offset, false);\n}\n\nfunction getULong(dataView, offset) {\n return dataView.getUint32(offset, false);\n}\n\nfunction getFixed(dataView, offset) {\n let decimal = dataView.getInt16(offset, false);\n let fraction = dataView.getUint16(offset + 2, false);\n return decimal + fraction / 65535;\n}\n\nfunction parseOpenTypeTableEntries(data, numTables) {\n let tableEntries = [];\n let p = 12;\n for (let i = 0; i < numTables; i += 1) {\n let tag = getTag(data, p);\n let checksum = getULong(data, p + 4);\n let offset = getULong(data, p + 8);\n let length = getULong(data, p + 12);\n tableEntries.push({ tag: tag, checksum: checksum,\n offset: offset, length: length, compression: false });\n p += 16;\n }\n return tableEntries;\n}\n\nfunction parseWOFFTableEntries(data, numTables) {\n let tableEntries = [];\n let p = 44; // offset to the first table directory entry.\n for (let i = 0; i < numTables; i += 1) {\n let tag = getTag(data, p);\n let offset = getULong(data, p + 4);\n let compLength = getULong(data, p + 8);\n let origLength = getULong(data, p + 12);\n let compression;\n if (compLength < origLength) {\n compression = 'WOFF';\n }\n else {\n compression = false;\n }\n tableEntries.push({ tag: tag, offset: offset, compression: compression,\n compressedLength: compLength, length: origLength });\n p += 20;\n }\n return tableEntries;\n}\n\nfunction uncompressTable(data, tableEntry) {\n if (tableEntry.compression === 'WOFF') {\n let inBuffer = new Uint8Array(data.buffer, tableEntry.offset + 2, tableEntry.compressedLength - 2);\n let outBuffer = new Uint8Array(tableEntry.length);\n inflate(inBuffer, outBuffer);\n if(outBuffer.byteLength !== tableEntry.length) {\n inject.error('Decompression error: ' + tableEntry.tag + ' decompressed length doesn\\'t match recorded length');\n }\n let view = new DataView(outBuffer.buffer, 0);\n return { data: view, offset: 0 };\n }\n else {\n return { data: data, offset: tableEntry.offset };\n }\n}\n\nclass Parser {\n constructor(data, offset) {\n this.data = data;\n this.offset = offset;\n this.relativeOffset = 0;\n }\n\n parseUShort() {\n let v = this.data.getUint16(this.offset + this.relativeOffset);\n this.relativeOffset += 2;\n return v;\n }\n\n parseULong() {\n let v = getULong(this.data, this.offset + this.relativeOffset);\n this.relativeOffset += 4;\n return v;\n }\n\n parseShort() {\n let v = this.data.getInt16(this.offset + this.relativeOffset);\n this.relativeOffset += 2;\n return v;\n }\n\n parseFixed() {\n let v = getFixed(this.data, this.offset + this.relativeOffset);\n this.relativeOffset += 4;\n return v;\n }\n\n parseVersion(minorBase) {\n let major = getUShort(this.data, this.offset + this.relativeOffset);\n let minor = getUShort(this.data, this.offset + this.relativeOffset + 2);\n this.relativeOffset += 4;\n if(minorBase === undefined) {\n minorBase = 0x1000;\n }\n return major + minor / minorBase / 10;\n };\n}\n\nexport default {\n parse(arrayBuffer) {\n let data = new DataView(arrayBuffer, 0);\n let signature = getTag(data, 0);\n let numTables, tableEntries;\n if(signature === String.fromCharCode(0, 1, 0, 0) || signature === 'true' || signature === 'typ1') {\n numTables = getUShort(data, 4);\n tableEntries = parseOpenTypeTableEntries(data, numTables);\n }\n else if(signature === 'OTTO') {\n numTables = getUShort(data, 4);\n tableEntries = parseOpenTypeTableEntries(data, numTables);\n }\n else if(signature === 'wOFF') {\n let flavor = getTag(data, 4);\n if(flavor !== String.fromCharCode(0, 1, 0, 0) && flavor !== 'OTTO') {\n inject.error('Unsupported OpenType flavor ' + signature);\n return;\n }\n numTables = getUShort(data, 12);\n tableEntries = parseWOFFTableEntries(data, numTables);\n }\n else {\n inject.error('Unsupported OpenType signature ' + signature);\n }\n let emSquare = 2048, ascent, descent, lineGap = 0;\n for(let i = 0; i < numTables; i++) {\n let tableEntry = tableEntries[i];\n if(tableEntry.tag === 'head') {\n let table = uncompressTable(data, tableEntry);\n let p = new Parser(table.data, table.offset);\n p.parseVersion();\n p.parseFixed();\n p.parseULong();\n p.parseULong();\n p.parseUShort();\n emSquare = p.parseUShort();\n }\n else if(tableEntry.tag === 'hhea') {\n let table = uncompressTable(data, tableEntry);\n let p = new Parser(table.data, table.offset);\n p.parseVersion();\n ascent = Math.abs(p.parseShort());\n descent = Math.abs(p.parseShort());\n lineGap = Math.abs(p.parseShort() || 0);\n }\n }\n return {\n emSquare,\n ascent,\n descent,\n lineGap,\n };\n },\n};\n","import util from '../util/util';\nimport inject from '../util/inject';\nimport opentype from '../util/opentype';\n\nconst { isString } = util;\n\nconst CALLBACK = {};\n\nlet o = {\n info: {\n arial: {\n lhr: 1.14990234375, // 默认line-height ratio,(67+1854+434)/2048\n // car: 1.1171875, // content-area ratio,(1854+434)/2048\n blr: 0.9052734375, // base-line ratio,1854/2048\n // mdr: 0.64599609375, // middle ratio,(1854-1062/2)/2048\n lgr: 0.03271484375, // line-gap ratio,67/2048,默认0\n },\n helvetica: {\n lhr: 1.14990234375, // (8+1900+447)/2048\n blr: 0.927734375, // 1900/2048\n lgr: 0.00390625, // 8/2048\n },\n verdana: {\n lhr: 1.21533203125, // (0+2059+430)/2048\n blr: 1.00537109375, // 2059/2048\n },\n tahoma: {\n lhr: 1.20703125, // (0+2049+423)/2048\n blr: 1.00048828125, // 2049/2048\n },\n georgia: {\n lhr: 1.13623046875, // (0+1878+449)/2048\n blr: 0.9169921875, // 1878/2048\n },\n 'courier new': {\n lhr: 1.1328125, // (0+1705+615)/2048\n blr: 0.83251953125, // 1705/2048\n },\n 'pingfang sc': {\n lhr: 1.4, // (0+1060+340)/1000\n blr: 1.06, // 1060/1000\n },\n simsun: {\n lhr: 1.4, // (0+1060+340)/1000\n blr: 1.06,\n },\n },\n support(fontFamily) {\n return this.info.hasOwnProperty(fontFamily) && this.info[fontFamily].checked;\n },\n register(name, url, data) { // url和data同时需要,也可以先data后url,不能先url后data\n name = name.toLowerCase();\n if(!isString(url) && !(url instanceof ArrayBuffer)) {\n data = url;\n url = null;\n }\n let info = this.info;\n let fontInfo = info[name] = info[name] || {};\n if(url && !fontInfo.url) { // 不能覆盖\n fontInfo.url = url;\n inject.loadFont(name, url, function(res, ab) {\n fontInfo.success = res.success;\n if(res.success) {\n // 手动指定更高优先级,不解析\n if(!fontInfo.lhr && ab) {\n let r = opentype.parse(ab);\n setData(r);\n }\n // 回调\n let list = CALLBACK[name] || [];\n while(list.length) {\n let node = list.pop();\n node.__emitFontRegister(name);\n }\n }\n });\n }\n // 防止先没url只注册,再调用只传url的情况\n if(!data || fontInfo.lhr) {\n return;\n }\n setData(data);\n function setData(data) {\n let { emSquare = 2048, ascent, descent, lineGap = 0 } = data;\n if(!ascent || !descent) {\n return;\n }\n Object.assign(fontInfo, {\n lhr: (ascent + descent + lineGap) / emSquare,\n blr: ascent / emSquare,\n });\n }\n },\n hasRegister(fontFamily) {\n return this.info.hasOwnProperty(fontFamily) && this.info[fontFamily].hasOwnProperty('lhr');\n },\n hasLoaded(fontFamily) {\n return this.info.hasOwnProperty(fontFamily) && this.info[fontFamily].success;\n },\n onRegister(fontFamily, node) {\n let list = CALLBACK[fontFamily] = CALLBACK[fontFamily] || [];\n list.push(node);\n },\n offRegister(fontFamily, node) {\n let list = CALLBACK[fontFamily] = CALLBACK[fontFamily] || [];\n let i = list.indexOf(node);\n if(i > -1) {\n list.splice(i, 1);\n }\n }\n};\n\no.info['宋体'] = o.info.simsun;\no.info['pingfang'] = o.info['pingfang sc'];\n\nexport default o;\n","import inject from '../util/inject';\n\nconst DOM = {\n position: 'static',\n display: 'block',\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto',\n marginTop: 0,\n marginRight: 0,\n marginBottom: 0,\n marginLeft: 0,\n paddingTop: 0,\n paddingRight: 0,\n paddingBottom: 0,\n paddingLeft: 0,\n fontSize: 'inherit',\n fontFamily: 'inherit',\n color: 'inherit',\n fontStyle: 'inherit',\n fontWeight: 'inherit',\n lineHeight: 'inherit',\n backgroundImage: null,\n backgroundColor: 'transparent',\n backgroundSize: 'auto',\n backgroundRepeat: 'repeat',\n backgroundPositionX: 0,\n backgroundPositionY: 0,\n backgroundClip: 'borderBox',\n borderTopWidth: 0,\n borderRightWidth: 0,\n borderBottomWidth: 0,\n borderLeftWidth: 0,\n borderTopColor: 'transparent',\n borderRightColor: 'transparent',\n borderBottomColor: 'transparent',\n borderLeftColor: 'transparent',\n borderTopStyle: 'none',\n borderRightStyle: 'none',\n borderBottomStyle: 'none',\n borderLeftStyle: 'none',\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n borderBottomLeftRadius: 0,\n width: 'auto',\n height: 'auto',\n flexGrow: 0,\n flexShrink: 1,\n flexBasis: 'auto',\n flexDirection: 'row',\n flexWrap: 'nowrap',\n order: 0,\n justifyContent: 'flexStart',\n alignItems: 'stretch',\n alignSelf: 'auto',\n alignContent: 'stretch',\n textAlign: 'inherit',\n letterSpacing: 'inherit',\n transformOrigin: 'center',\n visibility: 'inherit',\n opacity: 1,\n zIndex: 0,\n transform: null,\n translateX: 0,\n translateY: 0,\n translateZ: 0,\n scaleX: 1,\n scaleY: 1,\n scaleZ: 1,\n skewX: 0,\n skewY: 0,\n rotateX: 0,\n rotateY: 0,\n rotateZ: 0,\n rotate3d: '0, 0, 0, 0',\n perspective: 0,\n perspectiveOrigin: 'center',\n transformStyle: 'flat',\n backfaceVisibility: 'visible',\n filter: null,\n boxShadow: null,\n pointerEvents: 'inherit',\n overflow: 'visible',\n mixBlendMode: 'normal',\n whiteSpace: 'inherit',\n textOverflow: 'clip',\n lineClamp: 0,\n textStrokeWidth: 'inherit',\n textStrokeColor: 'inherit',\n textStrokeOver: 'inherit',\n writingMode: 'inherit',\n};\n\nconst GEOM = {\n fill: 'transparent',\n stroke: '#000',\n strokeWidth: 1,\n strokeDasharray: '',\n strokeLinecap: 'butt',\n strokeLinejoin: 'miter',\n strokeMiterlimit: 4,\n fillRule: 'nonzero',\n};\n\nconst DOM_ENTRY_SET = [];\nconst DOM_KEY_SET = [];\nObject.keys(DOM).forEach(k => {\n DOM_KEY_SET.push(k);\n let v = DOM[k];\n DOM_ENTRY_SET.push({\n k,\n v,\n });\n});\n\nconst GEOM_ENTRY_SET = [];\nconst GEOM_KEY_SET = [];\nObject.keys(GEOM).forEach(k => {\n GEOM_KEY_SET.push(k);\n let v = GEOM[k];\n GEOM_ENTRY_SET.push({\n k,\n v,\n });\n});\n\nconst INHERIT = {\n get fontFamily() {\n return inject.defaultFontFamily;\n },\n fontSize: 16,\n fontWeight: 400,\n fontStyle: 'normal',\n color: '#000',\n textAlign: 'left',\n visibility: 'visible',\n pointerEvents: 'auto',\n textStrokeColor: '#000',\n textStrokeWidth: 0,\n textStrokeOver: 'none',\n writingMode: 'horizontalTb',\n};\n\nconst INHERIT_KEY_SET = [];\nObject.keys(INHERIT).forEach(k => {\n INHERIT_KEY_SET.push(k);\n});\n\n// 默认值放第一个\nconst VALID_STRING_VALUE = {\n position: ['static', 'relative', 'absolute'],\n display: ['block', 'inlineBlock', 'inline', 'flex', 'none'],\n flexDirection: ['row', 'column', 'rowReverse', 'columnReverse'],\n flexWrap: ['wrap', 'wrapReverse', 'nowrap'],\n justifyContent: ['flexStart', 'center', 'flexEnd', 'spaceBetween', 'spaceAround', 'spaceEvenly'],\n alignItems: ['stretch', 'flexStart', 'center', 'flexEnd', 'baseline'],\n alignSelf: ['auto', 'stretch', 'flexStart', 'center', 'flexEnd', 'baseline'],\n overflow: ['visible', 'hidden'],\n mixBlendMode: ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten',\n 'colorDodge', 'colorBurn', 'hardLight', 'softLight', 'difference', 'exclusion',\n 'hue', 'saturation', 'color', 'luminosity'],\n borderTopStyle: ['solid', 'dashed', 'dotted'],\n borderRightStyle: ['solid', 'dashed', 'dotted'],\n borderBottomStyle: ['solid', 'dashed', 'dotted'],\n borderLeftStyle: ['solid', 'dashed', 'dotted'],\n backgroundClip: ['borderBox', 'paddingBox', 'contentBox'],\n textOverflow: ['clip', 'ellipsis'],\n alignContent: ['stretch', 'flexStart', 'center', 'flexEnd', 'spaceBetween', 'spaceAround'],\n transformStyle: ['flat', 'preserve3d'],\n backfaceVisibility: ['visible', 'hidden'],\n}\n\nexport default {\n DOM,\n GEOM,\n isValid(i) {\n return DOM.hasOwnProperty(i) || GEOM.hasOwnProperty(i);\n },\n DOM_KEY_SET,\n GEOM_KEY_SET,\n DOM_ENTRY_SET,\n GEOM_ENTRY_SET,\n INHERIT,\n INHERIT_KEY_SET,\n VALID_STRING_VALUE,\n};\n","export default {\n position: /(([-+]?[\\d.]+[pxremvwhina%]*)|(left|top|right|bottom|center)){1,2}/ig,\n gradient: /\\b(\\w+)-?gradient\\((.+)\\)/i,\n img: /(?:\\burl\\((['\"]?)(.*?)\\1\\))|(?:\\b((data:)))/i,\n};\n","// 向量点乘积\nfunction dotProduct(x1, y1, x2, y2) {\n return x1 * x2 + y1 * y2;\n}\n\nfunction dotProduct3(x1, y1, z1, x2, y2, z2) {\n if(z1 === undefined && x2 === undefined && y2 === undefined && z2 === undefined) {\n x2 = y1.x;\n z2 = y1.z;\n y2 = y1.y;\n y1 = x1.y;\n z1 = x1.z;\n x1 = x1.x;\n }\n return x1 * x2 + y1 * y2 + z1 * z2;\n}\n\n// 向量叉乘积\nfunction crossProduct(x1, y1, x2, y2) {\n return x1 * y2 - x2 * y1;\n}\n\nfunction crossProduct3(x1, y1, z1, x2, y2, z2) {\n if(z1 === undefined && x2 === undefined && y2 === undefined && z2 === undefined) {\n x2 = y1.x;\n z2 = y1.z;\n y2 = y1.y;\n y1 = x1.y;\n z1 = x1.z;\n x1 = x1.x;\n }\n return {\n x: y1 * z2 - y2 * z1,\n y: z1 * x2 - z2 * x1,\n z: x1 * y2 - x2 * y1,\n };\n}\n\n// 归一化\nfunction unitize(x, y) {\n let n = length(x, y);\n return {\n x: x / n,\n y: y / n,\n };\n}\n\nfunction unitize3(x, y, z) {\n if(y === undefined && z === undefined) {\n y = x.y;\n z = x.z;\n x = x.x;\n }\n let n = length3(x, y, z);\n return {\n x: x / n,\n y: y / n,\n z: z / n,\n };\n}\n\n// 是否平行\nfunction isParallel(x1, y1, x2, y2) {\n if(isZero(x1, y1, x2, y2)) {\n return true;\n }\n let ag = angle(x1, y1, x2, y2);\n if(Math.abs(ag) < 1e-9) {\n return true;\n }\n if(Math.PI - Math.abs(ag) < 1e-9) {\n return true;\n }\n return false;\n}\n\nfunction isParallel3(x1, y1, z1, x2, y2, z2) {\n if(z1 === undefined && x2 === undefined && y2 === undefined && z2 === undefined) {\n x2 = y1.x;\n z2 = y1.z;\n y2 = y1.y;\n y1 = x1.y;\n z1 = x1.z;\n x1 = x1.x;\n }\n if(isZero3(x1, y1, z1, x2, y2, z2)) {\n return true;\n }\n let ag = angle3(x1, y1, z1, x2, y2, z2);\n if(Math.abs(ag) < 1e-9) {\n return true;\n }\n if(Math.PI - Math.abs(ag) < 1e-9) {\n return true;\n }\n return false;\n}\n\n// 是否是零,考虑误差\nfunction isZero(x1, y1, x2, y2) {\n return Math.abs(x1) < 1e-9 && Math.abs(y1) < 1e-9\n && Math.abs(x2) < 1e-9 && Math.abs(y2) < 1e-9;\n}\n\nfunction isZero3(x1, y1, z1, x2, y2, z2) {\n if(z1 === undefined && x2 === undefined && y2 === undefined && z2 === undefined) {\n x2 = y1.x;\n z2 = y1.z;\n y2 = y1.y;\n y1 = x1.y;\n z1 = x1.z;\n x1 = x1.x;\n }\n return Math.abs(x1) < 1e-9 && Math.abs(y1) < 1e-9 && Math.abs(z1) < 1e-9\n && Math.abs(x2) < 1e-9 && Math.abs(y2) < 1e-9 && Math.abs(z2) < 1e-9;\n}\n\n// 向量夹角\nfunction angle(x1, y1, x2, y2) {\n let cos = dotProduct(x1, y1, x2, y2) / (length(x1, y1) * length(x2, y2));\n if(cos < -1) {\n cos = -1;\n }\n else if(cos > 1) {\n cos = 1;\n }\n return Math.acos(cos);\n}\n\nfunction angle3(x1, y1, z1, x2, y2, z2) {\n if(z1 === undefined && x2 === undefined && y2 === undefined && z2 === undefined) {\n x2 = y1.x;\n z2 = y1.z;\n y2 = y1.y;\n y1 = x1.y;\n z1 = x1.z;\n x1 = x1.x;\n }\n let cos = dotProduct3(x1, y1, z1, x2, y2, z2) / (length3(x1, y1, z1) * length3(x2, y2, z2));\n if(cos < -1) {\n cos = -1;\n }\n else if(cos > 1) {\n cos = 1;\n }\n return Math.acos(cos);\n}\n\n// 向量长度\nfunction length(x, y) {\n return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));\n}\n\nfunction length3(x, y, z) {\n return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2) + Math.pow(z, 2));\n}\n\n// 获取任意一个垂直于目标的向量\nfunction getPerpendicularVector3(x, y, z) {\n let i, j, k, a, b;\n if(Math.abs(y) > Math.abs(x)) {\n if(Math.abs(z) > Math.abs(y)) {\n i = 2;\n j = 1;\n k = 0;\n a = z;\n b = -y;\n }\n else if(Math.abs(z) > Math.abs(x)) {\n i = 1;\n j = 2;\n k = 0;\n a = y;\n b = -z;\n }\n else {\n i = 1;\n j = 0;\n k = 2;\n a = y;\n b = -x;\n }\n }\n else if(Math.abs(z) > Math.abs(x)) {\n i = 2;\n j = 0;\n k = 1;\n a = z;\n b = -x;\n }\n else if(Math.abs(z) > Math.abs(y)) {\n i = 0;\n j = 2;\n k = 1;\n a = x;\n b = -z;\n }\n else {\n i = 0;\n j = 1;\n k = 2;\n a = x;\n b = -y;\n }\n let arr = [0, 0, 0];\n arr[i] = b;\n arr[j] = a;\n arr[k] = 0;\n return unitize3(arr[0], arr[1], arr[2]);\n}\n\nexport default {\n dotProduct,\n dotProduct3,\n crossProduct,\n crossProduct3,\n unitize,\n unitize3,\n isParallel,\n isParallel3,\n isZero,\n isZero3,\n angle,\n angle3,\n length,\n length3,\n getPerpendicularVector3,\n};\n","const STYLE_KEY = {\n POSITION: 0,\n DISPLAY: 1,\n TOP: 2,\n RIGHT: 3,\n BOTTOM: 4,\n LEFT: 5,\n MARGIN_TOP: 6,\n MARGIN_RIGHT: 7,\n MARGIN_BOTTOM: 8,\n MARGIN_LEFT: 9,\n PADDING_TOP: 10,\n PADDING_RIGHT: 11,\n PADDING_BOTTOM: 12,\n PADDING_LEFT: 13,\n FONT_SIZE: 14,\n FONT_FAMILY: 15,\n COLOR: 16,\n FONT_STYLE: 17,\n FONT_WEIGHT: 18,\n LINE_HEIGHT: 19,\n BACKGROUND_IMAGE: 20,\n BACKGROUND_COLOR: 21,\n BACKGROUND_SIZE: 22,\n BACKGROUND_REPEAT: 23,\n BACKGROUND_POSITION_X: 24,\n BACKGROUND_POSITION_Y: 25,\n BORDER_TOP_WIDTH: 26,\n BORDER_RIGHT_WIDTH: 27,\n BORDER_BOTTOM_WIDTH: 28,\n BORDER_LEFT_WIDTH: 29,\n BORDER_TOP_COLOR: 30,\n BORDER_RIGHT_COLOR: 31,\n BORDER_BOTTOM_COLOR: 32,\n BORDER_LEFT_COLOR: 33,\n BORDER_TOP_STYLE: 34,\n BORDER_RIGHT_STYLE: 35,\n BORDER_BOTTOM_STYLE: 36,\n BORDER_LEFT_STYLE: 37,\n BORDER_TOP_LEFT_RADIUS: 38,\n BORDER_TOP_RIGHT_RADIUS: 39,\n BORDER_BOTTOM_RIGHT_RADIUS: 40,\n BORDER_BOTTOM_LEFT_RADIUS: 41,\n WIDTH: 42,\n HEIGHT: 43,\n FLEX_GROW: 44,\n FLEX_SHRINK: 45,\n FLEX_BASIS: 46,\n FLEX_DIRECTION: 47,\n JUSTIFY_CONTENT: 48,\n ALIGN_ITEMS: 49,\n ALIGN_SELF: 50,\n TEXT_ALIGN: 51,\n TRANSFORM_ORIGIN: 52,\n VISIBILITY: 53,\n OPACITY: 54,\n Z_INDEX: 55,\n TRANSFORM: 56,\n TRANSLATE_X: 57,\n TRANSLATE_Y: 58,\n TRANSLATE_Z: 59,\n SCALE_X: 60,\n SCALE_Y: 61,\n SCALE_Z: 62,\n SKEW_X: 63,\n SKEW_Y: 64,\n ROTATE_X: 65,\n ROTATE_Y: 66,\n ROTATE_Z: 67,\n ROTATE_3D: 68,\n PERSPECTIVE: 69,\n PERSPECTIVE_ORIGIN: 70,\n FILTER: 71,\n BOX_SHADOW: 72,\n POINTER_EVENTS: 73,\n OVERFLOW: 74,\n MIX_BLEND_MODE: 75,\n BACKGROUND_CLIP: 76,\n WHITE_SPACE: 77,\n TEXT_OVERFLOW: 78,\n LETTER_SPACING: 79,\n LINE_CLAMP: 80,\n ORDER: 81,\n FLEX_WRAP: 82,\n ALIGN_CONTENT: 83,\n TEXT_STROKE_WIDTH: 84,\n TEXT_STROKE_COLOR: 85,\n TEXT_STROKE_OVER: 86,\n WRITING_MODE: 87,\n TRANSFORM_STYLE: 88,\n BACKFACE_VISIBILITY: 89,\n // GEOM\n FILL: 90,\n STROKE: 91,\n STROKE_WIDTH: 92,\n STROKE_DASHARRAY: 93,\n STROKE_DASHARRAY_STR: 94,\n STROKE_LINECAP: 95,\n STROKE_LINEJOIN: 96,\n STROKE_MITERLIMIT: 97,\n FILL_RULE: 98,\n // 无此样式,仅cache或特殊情况需要\n MATRIX: 99,\n BORDER_TOP: 100,\n BORDER_RIGHT: 101,\n BORDER_BOTTOM: 102,\n BORDER_LEFT: 103,\n TRANSLATE_PATH: 104,\n};\n\nconst STYLE2LOWER_MAP = {};\nfunction style2Lower(s) {\n let res = STYLE2LOWER_MAP[s];\n if(!res) {\n res = STYLE2LOWER_MAP[s] = s.toLowerCase().replace(/_([a-z])/g, function($0, $1) {\n return $1.toUpperCase();\n });\n }\n return res;\n}\n\nconst STYLE2UPPER_MAP = {};\nfunction style2Upper(s) {\n let res = STYLE2UPPER_MAP[s];\n if(!res) {\n res = STYLE2UPPER_MAP[s] = s.replace(/([a-z\\d_])([A-Z])/g, function($0, $1, $2) {\n return $1 + '_' + $2;\n }).toUpperCase();\n }\n return res;\n}\n\nconst STYLE_R_KEY = {};\nconst STYLE_RV_KEY = {};\nconst STYLE_V_KEY = {};\nObject.keys(STYLE_KEY).forEach(k => {\n let k2 = STYLE_KEY[k];\n STYLE_R_KEY[k2] = k;\n let l = style2Lower(k);\n STYLE_RV_KEY[k2] = l;\n STYLE_V_KEY[l] = k2;\n});\n\nexport default {\n STYLE_KEY, // 大写常量为k,数字为值\n STYLE_R_KEY, // 数字为k,大写常量为值\n STYLE_RV_KEY, // 数字为k,小写为值\n STYLE_V_KEY, // 小写为k,数字为值\n style2Lower,\n style2Upper,\n ELLIPSIS: '…',\n};\n","import mx from './matrix';\nimport vector from './vector';\nimport enums from '../util/enums';\n\nconst H = 4 * (Math.sqrt(2) - 1) / 3;\nconst { crossProduct } = vector;\nconst { calPoint, isE } = mx;\nconst { STYLE_KEY: {\n WIDTH,\n HEIGHT,\n TRANSFORM_ORIGIN,\n} } = enums;\n\n/**\n * 圆弧拟合公式,根据角度求得3阶贝塞尔控制点比例长度,一般<=90,超过拆分\n * @param deg\n * @returns {number}\n */\nfunction h(deg) {\n deg *= 0.5;\n return 4 * ((1 - Math.cos(deg)) / Math.sin(deg)) / 3;\n}\n\n/**\n * 判断点是否在多边形内\n * @param x 点坐标\n * @param y\n * @param vertexes 多边形顶点坐标\n * @returns {boolean}\n */\nfunction pointInConvexPolygon(x, y, vertexes) {\n // 先取最大最小值得一个外围矩形,在外边可快速判断false\n let { x: xmax, y: ymax } = vertexes[0];\n let { x: xmin, y: ymin } = vertexes[0];\n let len = vertexes.length;\n for(let i = 1; i < len; i++) {\n let { x, y } = vertexes[i];\n xmax = Math.max(xmax, x);\n ymax = Math.max(ymax, y);\n xmin = Math.min(xmin, x);\n ymin = Math.min(ymin, y);\n }\n if(x < xmin || y < ymin || x > xmax || y > ymax) {\n return false;\n }\n let first;\n // 所有向量积均为非负数(逆时针,反过来顺时针是非正)说明在多边形内或边上\n for(let i = 0, len = vertexes.length; i < len; i++) {\n let { x: x1, y: y1 } = vertexes[i];\n let { x: x2, y: y2 } = vertexes[(i + 1) % len];\n let n = crossProduct(x2 - x1, y2 - y1, x - x1, y - y1);\n if(n !== 0) {\n n = n > 0 ? 1 : 0;\n // 第一个赋值,后面检查是否正负一致性,不一致是反例就跳出\n if(first === undefined) {\n first = n;\n }\n else if(first ^ n) {\n return false;\n }\n }\n }\n return true;\n}\n\n// 判断点是否在一个4边形内,比如事件发生是否在节点上\nfunction pointInQuadrilateral(x, y, x1, y1, x2, y2, x4, y4, x3, y3, matrix) {\n if(matrix && !isE(matrix)) {\n let w1, w2, w3, w4;\n let t = calPoint({ x: x1, y: y1 }, matrix);\n x1 = t.x; y1 = t.y; w1 = t.w;\n t = calPoint({ x: x2, y: y2 }, matrix);\n x2 = t.x; y2 = t.y; w2 = t.w;\n t = calPoint({ x: x3, y: y3 }, matrix);\n x3 = t.x; y3 = t.y; w3 = t.w;\n t = calPoint({ x: x4, y: y4 }, matrix);\n x4 = t.x; y4 = t.y; w4 = t.w;\n if(w1 && w1 !== 1) {\n x1 /= w1;\n y1 /= w1;\n }\n if(w2 && w2 !== 1) {\n x2 /= w2;\n y2 /= w2;\n }\n if(w3 && w3 !== 1) {\n x3 /= w3;\n y3 /= w3;\n }\n if(w4 && w4 !== 1) {\n x4 /= w4;\n y4 /= w4;\n }\n return pointInConvexPolygon(x, y, [\n { x: x1, y: y1 },\n { x: x2, y: y2 },\n { x: x4, y: y4 },\n { x: x3, y: y3 },\n ]);\n }\n else {\n return x >= x1 && y >= y1 && x <= x4 && y <= y4;\n }\n}\n\n/**\n * 余弦定理3边长求夹角\n * @param a\n * @param b\n * @param c\n */\nfunction angleBySide(a, b, c) {\n let theta = (Math.pow(b, 2) + Math.pow(c, 2) - Math.pow(a, 2)) / (2 * b * c);\n return Math.acos(theta);\n}\n\n/**\n * 余弦定理2边长和夹角求3边\n * @param alpha 弧度\n * @param a\n * @param b\n */\nfunction sideByAngle(alpha, a, b) {\n let cos = Math.cos(alpha);\n return Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * cos);\n}\n\n/**\n * 两点距离\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n */\nfunction pointsDistance(x1, y1, x2, y2) {\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n}\n\n/**\n * 三角形内心\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n * @param x3\n * @param y3\n */\nfunction triangleIncentre(x1, y1, x2, y2, x3, y3) {\n let a = pointsDistance(x2, y2, x3, y3);\n let b = pointsDistance(x1, y1, x3, y3);\n let c = pointsDistance(x1, y1, x2, y2);\n return {\n x: (a * x1 + b * x2 + c * x3) / (a + b + c),\n y: (a * y1 + b * y2 + c * y3) / (a + b + c),\n };\n}\n\n/**\n * 椭圆圆心和长短轴生成4个端点和控制点\n */\nfunction ellipsePoints(x, y, a, b = a) {\n let ox = a * H;\n let oy = b === a ? ox : b * H;\n return [\n [x - a, y],\n [x - a, y - oy, x - ox, y - b, x, y - b],\n [x + ox, y - b, x + a, y - oy, x + a, y],\n [x + a, y + oy, x + ox, y + b, x, y + b],\n [x - ox, y + b, x - a, y + oy, x - a, y],\n ];\n}\n\n/**\n * 扇形圆心和半径起始角度生成4个端点和控制点\n * 分为4个象限进行拟合,0、1、2、3\n */\nfunction sectorPoints(x, y, r, begin, end) {\n if(begin > end) {\n [begin, end] = [end, begin];\n }\n if(begin === end) {\n return [];\n }\n let list = [];\n let b = Math.floor(begin / 90);\n let e = Math.floor(end / 90);\n // 同象限直接算\n if(b === e || (e - b) === 1 && end % 90 === 0) {\n let h2 = h(d2r(Math.abs(begin - end)));\n let d = h2 * r;\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let alpha = Math.atan(d / r);\n if(b < 90) {\n // 第1个交点\n let rx = Math.sin(d2r(begin)) * r;\n let ry = Math.cos(d2r(begin)) * r;\n let p1 = [x + rx, y - ry];\n // 第1个控制点\n let deg = alpha + d2r(begin);\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p2 = [x + rx, y - ry];\n // 第2个交点\n rx = Math.sin(d2r(end)) * r;\n ry = Math.cos(d2r(end)) * r;\n let p4 = [x + rx, y - ry];\n // 第2个控制点\n deg = d2r(end) - alpha;\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p3 = [x + rx, y - ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n else if(b < 180) {\n // 第1个交点\n let rx = Math.cos(d2r(begin - 90)) * r;\n let ry = Math.sin(d2r(begin - 90)) * r;\n let p1 = [x + rx, y + ry];\n // 第1个控制点\n let deg = alpha + d2r(begin - 90);\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p2 = [x + rx, y + ry];\n // 第2个交点\n rx = Math.cos(d2r(end - 90)) * r;\n ry = Math.sin(d2r(end - 90)) * r;\n let p4 = [x + rx, y + ry];\n // 第2个控制点\n deg = d2r(end - 90) - alpha;\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p3 = [x + rx, y + ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n else if(b < 270) {\n // 第1个交点\n let rx = Math.sin(d2r(begin - 180)) * r;\n let ry = Math.cos(d2r(begin - 180)) * r;\n let p1 = [x - rx, y + ry];\n // 第1个控制点\n let deg = alpha + d2r(begin - 180);\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p2 = [x - rx, y + ry];\n // 第2个交点\n rx = Math.sin(d2r(end - 180)) * r;\n ry = Math.cos(d2r(end - 180)) * r;\n let p4 = [x - rx, y + ry];\n // 第2个控制点\n deg = d2r(end - 180) - alpha;\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p3 = [x - rx, y + ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n else {\n // 第1个交点\n let rx = Math.cos(d2r(begin - 270)) * r;\n let ry = Math.sin(d2r(begin - 270)) * r;\n let p1 = [x - rx, y + ry];\n // 第1个控制点\n let deg = alpha + d2r(begin - 270);\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p2 = [x - rx, y + ry];\n // 第2个交点\n rx = Math.cos(d2r(end - 270)) * r;\n ry = Math.sin(d2r(end - 270)) * r;\n let p4 = [x - rx, y + ry];\n // 第2个控制点\n deg = d2r(end - 270) - alpha;\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p3 = [x - rx, y + ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n }\n // 跨象限循环算\n else {\n let i = b;\n let temp = [];\n for(; i <= e; i++) {\n if(i === 0) {\n let res = sectorPoints(x, y, r, begin, 90);\n temp.push(res);\n }\n else if(i === 1) {\n // 防止90~90这种情况,但如果begin和end都是90时又要显示\n if(b === i || end > 90) {\n let res = sectorPoints(x, y, r, begin < 90 ? 90 : begin, end > 180 ? 180 : end);\n temp.push(res);\n }\n }\n else if(i === 2) {\n // 防止180~180这种情况,但如果begin和end都是90时又要显示\n if(b === i || end > 180) {\n let res = sectorPoints(x, y, r, begin < 180 ? 180 : begin, end > 270 ? 270 : end);\n temp.push(res);\n }\n }\n else if(i === 3) {\n // 防止180~180这种情况,但如果begin和end都是90时又要显示\n if(b === i || end > 270) {\n let res = sectorPoints(x, y, r, begin < 270 ? 270 : begin, end);\n temp.push(res);\n }\n }\n }\n // 去掉重复的首尾扇弧点\n list = temp[0];\n for(let i = 1, len = temp.length; i < len; i++) {\n list.push(temp[i][1]);\n }\n }\n return list;\n}\n\n/**\n * 获取2个矩形重叠区域,如不重叠返回null\n * @param a\n * @param b\n */\nfunction getRectsIntersection(a, b) {\n if(!isRectsOverlap(a, b)) {\n return null;\n }\n let [ax1, ay1, ax4, ay4] = a;\n let [bx1, by1, bx4, by4] = b;\n return [\n Math.max(ax1, bx1),\n Math.max(ay1, by1),\n Math.min(ax4, bx4),\n Math.min(ay4, by4),\n ];\n}\n\n/**\n * 2个矩形是否重叠\n */\nfunction isRectsOverlap(a, b, includeIntersect) {\n let [ax1, ay1, ax4, ay4] = a;\n let [bx1, by1, bx4, by4] = b;\n if(includeIntersect) {\n if(ax1 > bx4 || ay1 > by4 || bx1 > ax4 || by1 > ay4) {\n return false;\n }\n }\n else if(ax1 >= bx4 || ay1 >= by4 || bx1 >= ax4 || by1 >= ay4) {\n return false;\n }\n return true;\n}\n\n/**\n * 2个矩形是否包含,a包含b\n */\nfunction isRectsInside(a, b, includeIntersect) {\n let [ax1, ay1, ax4, ay4] = a;\n let [bx1, by1, bx4, by4] = b;\n if(includeIntersect) {\n if(ax1 <= bx1 && ay1 <= by1 && ax4 >= bx4 && ay4 >= by4) {\n return true;\n }\n }\n else if(ax1 < bx1 && ay1 < by1 && ax4 > bx4 && ay4 > by4) {\n return true;\n }\n return false;\n}\n\nfunction calCoordsInNode(px, py, node) {\n let { matrix = [1, 0, 0, 1, 0, 0], computedStyle = [] } = node;\n let { [WIDTH]: width, [HEIGHT]: height, [TRANSFORM_ORIGIN]: [ox, oy] = [width * 0.5, height * 0.5] } = computedStyle;\n let t = calPoint({ x: px * width - ox, y: py * height - oy }, matrix);\n return { x: t.x + ox, y: t.y + oy };\n}\n\nfunction calPercentInNode(x, y, node) {\n let { computedStyle: { [WIDTH]: width, [HEIGHT]: height, [TRANSFORM_ORIGIN]: [ox, oy] } } = node;\n // 先求无旋转时右下角相对于原点的角度ds\n let ds = Math.atan((height - oy) / (width - ox));\n let { x: x1, y: y1 } = calCoordsInNode(1, 1, node);\n let d1;\n let deg;\n // 根据旋转后的坐标,分4个象限,求旋转后的右下角相对于原点的角度d1,得出偏移角度deg,分顺逆时针[-180, 180]\n if(x1 >= ox && y1 >= oy) {\n if(ox === x1) {\n d1 = -Math.atan(Infinity);\n }\n else {\n d1 = Math.atan((y1 - oy) / (x1 - ox));\n }\n deg = d1 - ds;\n }\n else if(x1 >= ox && y1 < oy) {\n if(ox === x1) {\n d1 = -Math.atan(Infinity);\n }\n else {\n d1 = Math.atan((oy - y1) / (x1 - ox));\n }\n deg = d1 + ds;\n }\n else if(x1 < ox && y1 >= oy) {\n d1 = Math.atan((y1 - oy) / (ox - x1));\n deg = d1 - ds;\n }\n else if(x1 < ox && y1 < oy) {\n d1 = Math.atan((y1 - oy) / (x1 - ox));\n if(ds >= d1) {\n deg = d1 + Math.PI - ds;\n }\n else {\n deg = Math.PI - d1 + ds;\n deg = -deg;\n }\n }\n else {\n deg = 0;\n }\n // 目标点到原点的边长不会变\n let dt = Math.sqrt(Math.pow(x - ox, 2) + Math.pow(y - oy, 2));\n // 分4个象限,先求目标点到原点的角度d2,再偏移deg后求得原始坐标\n let d2;\n if(x >= ox && y >= oy) {\n if(ox === x) {\n d2 = -Math.atan(Infinity);\n }\n else {\n d2 = Math.atan((y - oy) / (x - ox));\n }\n }\n else if(x >= ox && y < oy) {\n if(ox === x) {\n d2 = -Math.atan(Infinity);\n }\n else {\n d2 = -Math.atan((y - oy) / (ox - x));\n }\n }\n else if(x < ox && y >= oy) {\n d2 = Math.PI - Math.atan((y - oy) / (ox - x));\n }\n else {\n d2 = Math.atan((y - oy) / (x - ox)) - Math.PI;\n }\n d2 -= deg;\n if(d2 > Math.PI) {\n d2 -= Math.PI;\n return [\n (ox - dt * Math.cos(d2)) / width,\n (oy - dt * Math.sin(d2)) / height,\n ];\n }\n if(d2 > Math.PI * 0.5) {\n d2 = Math.PI - d2;\n return [\n (ox - dt * Math.cos(d2)) / width,\n (oy + dt * Math.sin(d2)) / height,\n ];\n }\n if(d2 >= 0) {\n return {\n x: (ox + dt * Math.cos(d2)) / width,\n y: (oy + dt * Math.sin(d2)) / height,\n };\n }\n if(d2 >= -Math.PI * 0.5) {\n d2 = -d2;\n return {\n x: (ox + dt * Math.cos(d2)) / width,\n y: (oy - dt * Math.sin(d2)) / height,\n };\n }\n if(d2 >= -Math.PI) {\n d2 = Math.PI + d2;\n return {\n x: (ox - dt * Math.cos(d2)) / width,\n y: (oy - dt * Math.sin(d2)) / height,\n };\n }\n d2 = -Math.PI - d2;\n return {\n x: (ox - dt * Math.cos(d2)) / width,\n y: (oy + dt * Math.sin(d2)) / height,\n };\n}\n\nfunction d2r(n) {\n return n * Math.PI / 180;\n}\n\nfunction r2d(n) {\n return n * 180 / Math.PI;\n}\n\nfunction pointOnCircle(x, y, r, deg) {\n if(deg >= 270) {\n deg -= 270;\n deg = d2r(deg);\n return {\n x: x - Math.cos(deg) * r,\n y: y - Math.sin(deg) * r,\n };\n }\n else if(deg >= 180) {\n deg -= 180;\n deg = d2r(deg);\n return {\n x: x - Math.sin(deg) * r,\n y: y + Math.cos(deg) * r,\n };\n }\n else if(deg >= 90) {\n deg -= 90;\n deg = d2r(deg);\n return {\n x: x + Math.cos(deg) * r,\n y: y + Math.sin(deg) * r,\n };\n }\n else {\n deg = d2r(deg);\n return {\n x: x + Math.sin(deg) * r,\n y: y - Math.cos(deg) * r,\n };\n }\n}\n\n// 3个点确定平面标准方程\nfunction getPlainNormalEquation(points) {\n let { x: x1, y: y1, z: z1 } = points[0];\n let { x: x2, y: y2, z: z2 } = points[1];\n let { x: x3, y: y3, z: z3 } = points[2];\n let a = (y2 - y1) * (z3 - z1) - (z2 - z1) * (y3 - y1);\n let b = (x3 - x1) * (z2 - z1) - (x2 - x1) * (z3 - z1);\n let c = (x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1);\n let d = -(a * x1 + b * y1 + c * z1);\n return { a, b, c, d };\n}\n\nexport default {\n pointInConvexPolygon,\n pointInQuadrilateral,\n d2r,\n r2d,\n // 贝塞尔曲线模拟1/4圆弧比例\n H,\n // <90任意角度贝塞尔曲线拟合圆弧的比例公式\n h,\n angleBySide,\n sideByAngle,\n pointsDistance,\n triangleIncentre,\n ellipsePoints,\n sectorPoints,\n getRectsIntersection,\n isRectsOverlap,\n isRectsInside,\n calCoordsInNode,\n calPercentInNode,\n pointOnCircle,\n getPlainNormalEquation,\n};\n","/**\n * @typedef {Object} gradientStatement\n * @property {Array} color - 颜色rgba,0~255,如 [0, 255, 0, 255]\n * @property {number} angle - 角度,0~2 * Math.PI,(originX, originY) 为原点,垂直向上为0\n */\n\n/**\n * 获取渐变图像像素数组\n * @param {number} originX - 渐变中心x坐标(相对图片左上角(0,0)的值,可在图片外,下同)\n * @param {number} originY - 渐变中心y坐标\n * @param {number} width - 图片宽度\n * @param {number} height - 图片高度\n * @param {Array} stop - 渐变声明列表\n * @param data - canvas的imgData.data\n * @returns {Array} 图像像素数组,每4个元素(rgba)构成一个像素点\n * @example\n // 矩形宽度为200*200,此时坐标为0~199,渐变中心为中点时,应传入99.5,可消除零点问题\n // 若渐变中心在某一整数轴上,就会引入零点问题,此时零点取y轴正半轴的色值,要消除这个问题,可以对渐变中心增加一个偏移量,使其不为整数\n let w = 200;\n let h = 200;\n let ctx = document.getElementById('example').getContext('2d');\n let imgData = ctx.getImageData(0,0, w, h);\n let data = getConicGradientImage(99.5, 99.5, w, h, [{\n color: [0,0,0,255],\n angle: 0,\n } ,{\n color: [255,0,0,255],\n angle: 2 * Math.PI,\n }]);\n for (let i = 0; i < imgData.data.length; i++) {\n imgData.data[i] = data[i];\n }\n ctx.putImageData(imgData, 0, 0);\n */\nfunction getConicGradientImage(\n originX,\n originY,\n width,\n height,\n stop,\n data\n) {\n if(stop.length < 2) {\n throw new Error(\n 'Conic gradient should recieve at least 2 gradient statements (start line and end line).'\n );\n }\n\n width = Math.floor(width);\n height = Math.floor(height);\n\n /**\n * 根据坐标获取角度\n * @param {number} x - x坐标,左上角为原点\n * @param {number} y - y坐标,左上角为原点\n * @returns {number} angle - 角度,0~2 * Math.PI,(originX, originY) 为原点,垂直向上为0\n */\n let getAngle = (x, y) => {\n // 此函数注释内的x、y轴基于 (originX, originY)\n // 计算相对 (originX, originY) 的坐标(dx, dy)\n let dx = x - originX;\n let dy = originY - y;\n // 在y轴上\n if(dx === 0) {\n return dy < 0\n ? // y轴负半轴,\n 1 * Math.PI\n : // y轴正半轴,因此,(originX, originY) 的angle视作0\n 0;\n }\n // 在x轴上\n if(dy === 0) {\n return dx < 0\n ? // x轴负半轴\n 1.5 * Math.PI\n : // x轴正半轴\n 0.5 * Math.PI;\n }\n let atan = Math.atan(dy / dx);\n /**\n * 2 | 1\n * -----|-----\n * 3 | 4\n */\n // 第一象限,atan > 0\n // 第四象限,atan < 0\n if(dx > 0) {\n return 0.5 * Math.PI - atan;\n }\n // 第二象限,atan < 0\n // 第三象限,atan > 0\n if(dx < 0) {\n return 1.5 * Math.PI - atan;\n }\n };\n\n let increasingList = stop.map(item => ({\n color: item[0],\n angle: item[1] * Math.PI * 2,\n }));\n\n for(let y = 0; y < height; y++) {\n for(let x = 0; x < width; x++) {\n // step 1. 找到当前点坐标相对 (originX, originY) 的角度\n let angle = getAngle(x, y);\n // step 2. 找到当前点坐标对应的渐变区间\n let j;\n for(j = 0; j < increasingList.length && increasingList[j].angle <= angle; j++) {\n }\n let start = increasingList[j - 1];\n let end = increasingList[j];\n if(!(start && end)) {\n // step 2-1. 不在渐变区间里\n continue;\n }\n // step 3. 计算色值并填充\n let factor = (angle - start.angle) / (end.angle - start.angle);\n let color = end.color.map(\n (v, idx) => factor * (v - start.color[idx]) + start.color[idx]\n );\n let i = (x + y * width) * 4;\n data[i] = color[0];\n data[i+1] = color[1];\n data[i+2] = color[2];\n data[i+3] = Math.min(255, color[3] * 255);\n }\n }\n return data;\n}\n\nexport default {\n getConicGradientImage,\n};\n","import util from './util';\n\nconst { int2rgba } = util;\n\nfunction canvasPolygon(ctx, list, dx = 0, dy = 0) {\n if(!list || !list.length) {\n return;\n }\n let start = -1;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(Array.isArray(item) && item.length) {\n start = i;\n break;\n }\n }\n if(start === -1) {\n return;\n }\n let first = list[start];\n ctx.moveTo(first[0] + dx, first[1] + dy);\n // 特殊的情况,布尔运算数学库会打乱原有顺序,致使第一个点可能有冗余的贝塞尔值,move到正确的索引坐标\n if(first.length === 4) {\n ctx.moveTo(first[2] + dx, first[3] + dy);\n }\n else if(first.length === 6) {\n ctx.moveTo(first[4] + dx, first[5] + dy);\n }\n for(let i = start + 1, len = list.length; i < len; i++) {\n let item = list[i];\n if(!Array.isArray(item)) {\n continue;\n }\n if(item.length === 2) {\n ctx.lineTo(item[0] + dx, item[1] + dy);\n }\n else if(item.length === 4) {\n ctx.quadraticCurveTo(item[0] + dx, item[1] + dy, item[2] + dx, item[3] + dy);\n }\n else if(item.length === 6) {\n ctx.bezierCurveTo(item[0] + dx, item[1] + dy, item[2] + dx, item[3] + dy, item[4] + dx, item[5] + dy);\n }\n }\n}\n\nfunction svgPolygon(list) {\n if(!list || !list.length) {\n return '';\n }\n let start = -1;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(Array.isArray(item) && item.length) {\n start = i;\n break;\n }\n }\n if(start === -1) {\n return '';\n }\n let first = list[start];\n let s = 'M' + first[0] + ',' + first[1];\n if(first.length === 4) {\n s = 'M' + first[2] + ',' + first[3];\n }\n else if(first.length === 6) {\n s = 'M' + first[4] + ',' + first[5];\n }\n for(let i = start + 1, len = list.length; i < len; i++) {\n let item = list[i];\n if(!Array.isArray(item)) {\n continue;\n }\n if(item.length === 2) {\n s += 'L' + item[0] + ',' + item[1];\n }\n else if(item.length === 4) {\n s += 'Q' + item[0] + ',' + item[1] + ' ' + item[2] + ',' + item[3];\n }\n else if(item.length === 6) {\n s += 'C' + item[0] + ',' + item[1] + ' ' + item[2] + ',' + item[3] + ' ' + item[4] + ',' + item[5];\n }\n }\n return s;\n}\n\nfunction canvasLine(ctx, x1, y1, x2, y2, controlA, controlB, num, dx = 0, dy = 0) {\n ctx.moveTo(x1 + dx, y1 + dy);\n if(num === 3) {\n ctx.bezierCurveTo(controlA[0] + dx, controlA[1] + dy, controlB[0] + dx, controlB[1], x2 + dx, y2 + dy);\n return 2;\n }\n else if(num === 2) {\n ctx.quadraticCurveTo(controlB[0] + dx, controlB[1] + dy, x2 + dx, y2 + dy);\n return 2;\n }\n else if(num === 1) {\n ctx.quadraticCurveTo(controlA[0] + dx, controlA[1] + dy, x2 + dx, y2 + dy);\n return 2;\n }\n else {\n ctx.lineTo(x2 + dx, y2 + dy);\n return 1;\n }\n}\n\nfunction svgLine(x1, y1, x2, y2, controlA, controlB, num) {\n if(num === 3) {\n return 'M' + x1 + ',' + y1\n + 'C' + controlA[0] + ',' + controlA[1] + ' ' + controlB[0] + ',' + controlB[1]\n + ' ' + x2 + ',' + y2;\n }\n else if(num === 2) {\n return 'M' + x1 + ',' + y1\n + 'Q' + controlB[0] + ',' + controlB[1]\n + ' ' + x2 + ',' + y2;\n }\n else if(num === 1) {\n return 'M' + x1 + ',' + y1\n + 'Q' + controlA[0] + ',' + controlA[1]\n + ' ' + x2 + ',' + y2;\n }\n else {\n return 'M' + x1 + ',' + y1 + 'L' + x2 + ',' + y2;\n }\n}\n\nfunction canvasFilter(filter) {\n let s = '';\n filter.forEach(item => {\n let { k, v } = item;\n if(k === 'blur') {\n s += `blur(${v}px)`;\n }\n else if(k === 'dropShadow') {\n // 浏览器暂未支持spread,去掉v[3]\n s += `drop-shadow(${v[0]}px ${v[1]}px ${v[2]}px ${int2rgba(v[4])})`;\n }\n else if(k === 'hueRotate') {\n s += `hue-rotate(${v}deg)`;\n }\n else if(k === 'saturate' || k === 'brightness' || k === 'grayscale' || k === 'contrast' || k === 'sepia' || k === 'invert') {\n s += `${k}(${v}%)`;\n }\n });\n return s;\n}\n\nexport default {\n canvasPolygon,\n svgPolygon,\n canvasLine,\n svgLine,\n canvasFilter,\n svgFilter: canvasFilter,\n};\n","import geom from '../math/geom';\nimport mode from '../refresh/mode';\nimport painter from '../util/painter';\nimport enums from '../util/enums';\nimport unit from './unit';\n\nconst { H } = geom;\nconst { PX, PERCENT, REM, VW, VH, VMAX, VMIN } = unit;\nconst { canvasPolygon, svgPolygon } = painter;\nconst {\n STYLE_KEY: {\n BORDER_LEFT_WIDTH,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n PADDING_LEFT,\n PADDING_BOTTOM,\n PADDING_TOP,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n FONT_SIZE,\n },\n} = enums;\n\n/* 获取合适的虚线实体空白宽度ps/pd和数量n\n * 总长total,start边长bs,end边长be,内容长w,\n * 实体长范围[smin,smax],空白长范围[dmin,dmax]\n */\nfunction calFitDashed(total, bs, be, w, smin, smax, dmin, dmax) {\n let n = 1;\n let ps = 1;\n let pd = 1;\n // 从最大实体空白长开始尝试\n outer:\n for(let i = smax; i >= smin; i--) {\n for(let j = dmax; j >= dmin; j--) {\n // 已知实体空白长度,n实体和n-1空白组成total,计算获取n数量\n let per = i + j;\n let num = Math.floor((total + j) / per);\n let k = j;\n // 可能除不尽,此时扩展空白长\n if(num * per < j + total) {\n let free = total - num * i;\n k = free / (num - 1);\n if(k > dmax) {\n continue;\n }\n }\n per = i + k;\n // bs比实体大才有效,因为小的话必定和第一个实体完整相连\n if(bs > 1 && bs > i) {\n let mo = bs % per;\n if(mo > i) {\n continue;\n }\n if(be > 1) {\n let mo = (bs + w) % per;\n if(mo > i) {\n continue;\n }\n }\n }\n if(be > 1) {\n let mo = (bs + w) % per;\n if(mo > i) {\n continue;\n }\n }\n if(num > 0) {\n n = num;\n ps = i;\n pd = k;\n }\n break outer;\n }\n }\n return {\n n,\n ps,\n pd,\n };\n}\n\n// dashed时n个实线和n-1虚线默认以3:1宽度组成,dotted则是n和n以1:1组成\nfunction calDashed(style, m1, m2, m3, m4, bw) {\n let total = m4 - m1;\n let w = m3 - m2;\n let bs = m2 - m1;\n let be = m4 - m3;\n if(style === 'dotted') {\n return calFitDashed(total, bs, be, w, bw, bw, Math.max(1, bw * 0.25), bw * 2);\n }\n else {\n let { n, ps, pd } = calFitDashed(total, bs, be, w, bw, bw * 3, Math.max(1, bw * 0.25), bw * 2);\n if(n === 1) {\n return calFitDashed(total, bs, be, w, bw, bw, Math.max(1, bw * 0.25), bw * 2);\n }\n // 降级为dotted\n return { n, ps, pd };\n }\n}\n\n// 获取边框分割为几块的坐标,虚线分割为若干四边形、三边型、五边形\n// 三边形重复内外边交点形成四边形,五边形进行切割形成2个四边形\n// direction为上右下左0123\nfunction calPoints(borderWidth, borderStyle, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, direction, beginRadius, endRadius) {\n let points = [];\n if(borderStyle === 'none') {\n return points;\n }\n if(['dashed', 'dotted'].indexOf(borderStyle) > -1) {\n // 寻找一个合适的虚线线段长度和之间空白边距长度\n let { n, ps, pd } = (direction === 0 || direction === 2)\n ? calDashed(borderStyle, x1, x2, x3, x4, borderWidth)\n : calDashed(borderStyle, y1, y2, y3, y4, borderWidth);\n if(n > 1) {\n for(let i = 0; i < n; i++) {\n // 最后一个可能没有到底,延长之\n let isLast = i === n - 1;\n let main1;\n let main2;\n let cross1;\n let cross2;\n if(direction === 0 || direction === 2) {\n main1 = i ? (x1 + ps * i + pd * i) : x1;\n }\n else {\n main1 = i ? (y1 + ps * i + pd * i) : y1;\n }\n main2 = main1 + ps;\n if(direction === 0) {\n // 整个和borderLeft重叠\n if(main2 <= x2) {\n if(isLast) {\n points.push([\n [x1, y1],\n [x4, y1],\n [x3, y2],\n [x2, y2]\n ]);\n }\n else {\n cross1 = y1 + (main1 - x1) * Math.tan(deg1);\n cross2 = y1 + (main2 - x1) * Math.tan(deg1);\n points.push([\n [main1, y1],\n [main2, y1],\n [main2, cross2],\n [main1, cross1]\n ]);\n }\n }\n // 整个和borderRight重叠\n else if(main1 >= x3) {\n cross1 = y1 + (x4 - main1) * Math.tan(deg2);\n cross2 = y1 + (x4 - main2) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [main1, y1],\n [x4, y1],\n [x4, y1],\n [main1, cross1]\n ]);\n }\n else {\n points.push([\n [main1, y1],\n [main2, y1],\n [main2, cross2],\n [main1, cross1]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross1 = y1 + (main1 - x1) * Math.tan(deg1);\n points.push([\n [main1, y1],\n [x2, y1],\n [x2, y2],\n [main1, cross1]\n ]);\n if(isLast) {\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x2, y2]\n ]);\n }\n else {\n // 下部分和borderRight重叠\n if(main2 > x3) {\n cross2 = y1 + (x4 - main2) * Math.tan(deg2);\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n points.push([\n [x3, y1],\n [main2, y1],\n [main2, cross2],\n [x3, y2]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x2, y1],\n [main2, y1],\n [main2, y2],\n [x2, y2]\n ]);\n }\n }\n }\n // 下部分和borderRight重叠\n else if(main2 > x3) {\n cross1 = y1 + (x4 - main2) * Math.tan(deg2);\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross2 = y1 + (main1 - x1) * Math.tan(deg1);\n points.push([\n [main1, y1],\n [x2, y1],\n [x2, y2],\n [main1, cross2]\n ]);\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n if(isLast) {\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x3, y2]\n ]);\n }\n else {\n points.push([\n [x3, y1],\n [main2, y1],\n [main2, cross1],\n [x3, y2]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [main1, y1],\n [x3, y1],\n [x3, y2],\n [main1, y2]\n ]);\n if(isLast) {\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x3, y2]\n ]);\n }\n else {\n points.push([\n [x3, y1],\n [main2, y1],\n [main2, cross1],\n [x3, y2]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [main1, y1],\n [x4, y1],\n [x3, y2],\n [main1, y2]\n ]);\n }\n else {\n points.push([\n [main1, y1],\n [main2, y1],\n [main2, y2],\n [main1, y2]\n ]);\n }\n }\n }\n }\n else if(direction === 1) {\n // 整个和borderTop重叠\n if(main2 <= y2) {\n if(isLast) {\n points.push([\n [x3, y2],\n [x4, y1],\n [x4, y4],\n [x3, y3]\n ]);\n }\n else {\n cross1 = x4 - (main1 - y1) * Math.tan(deg1);\n cross2 = x4 - (main2 - y1) * Math.tan(deg1);\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, main2],\n [cross2, main2],\n ]);\n }\n }\n // 整个和borderBottom重叠\n else if(main1 >= y3) {\n cross1 = x3 + (main1 - y3) * Math.tan(deg2);\n cross2 = x3 + (main2 - y3) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, y4],\n [x4, y4]\n ]);\n }\n else {\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, main2],\n [cross2, main2]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross1 = x3 + (y2 - main1) * Math.tan(deg1);\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, y2],\n [x3, y2]\n ]);\n if(isLast) {\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, y4],\n [x4, y4]\n ]);\n }\n else {\n // 下部分和borderBottom重叠\n if(main2 > y3) {\n cross2 = x3 + (main2 - y3) * Math.tan(deg2);\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, main2],\n [cross2, main2]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, main2],\n [x3, main2]\n ]);\n }\n }\n }\n // 下部分和borderBottom重叠\n else if(main2 > y3) {\n cross1 = x3 + (main2 - y3) * Math.tan(deg2);\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross2 = x3 + (y2 - main1) * Math.tan(deg1);\n points.push([\n [cross2, main1],\n [x4, main1],\n [x4, y2],\n [x3, y2]\n ]);\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, x4],\n [x4, x4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, main2],\n [cross1, main2]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [x3, main1],\n [x4, main1],\n [x4, y3],\n [x3, y3]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, y4],\n [x4, y4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, main2],\n [cross1, main2]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [x3, main1],\n [x4, main1],\n [x4, y4],\n [x3, y3]\n ]);\n }\n else {\n points.push([\n [x3, main1],\n [x4, main1],\n [x4, main2],\n [x3, main2]\n ]);\n }\n }\n }\n }\n else if(direction === 2) {\n // 整个和borderLeft重叠\n if(main2 <= x2) {\n if(isLast) {\n points.push([\n [x1, y4],\n [x2, y3],\n [x3, y3],\n [x4, y4]\n ]);\n }\n else {\n cross1 = y4 - (main1 - x1) * Math.tan(deg1);\n cross2 = y4 - (main2 - x1) * Math.tan(deg1);\n points.push([\n [main1, cross1],\n [main2, cross2],\n [main2, y4],\n [main1, y4]\n ]);\n }\n }\n // 整个和borderRight重叠\n else if(main1 >= x3) {\n cross1 = y4 - (x4 - main1) * Math.tan(deg2);\n cross2 = y4 - (x4 - main2) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [main1, cross1],\n [x4, y4],\n [x4, y4],\n [main1, y4]\n ]);\n }\n else {\n points.push([\n [main1, cross1],\n [main2, cross2],\n [main2, y4],\n [main1, y4]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross1 = y4 - (main1 - x1) * Math.tan(deg1);\n points.push([\n [main1, cross1],\n [x2, y3],\n [x2, y4],\n [main1, y4]\n ]);\n if(isLast) {\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n else {\n // 下部分和borderRight重叠\n if(main2 > x3) {\n cross2 = y4 - (main2 - x3) * Math.tan(deg2);\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n points.push([\n [x3, y3],\n [main2, cross2],\n [main2, y4],\n [x3, y4]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x2, y3],\n [main2, y3],\n [main2, y4],\n [x2, y4]\n ]);\n }\n }\n }\n // 下部分和borderRight重叠\n else if(main2 > x3) {\n cross1 = y4 - (x4 - main2) * Math.tan(deg2);\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross2 = y4 - (main1 - x3) * Math.tan(deg1);\n points.push([\n [main1, cross2],\n [x2, y3],\n [x2, y4],\n [main1, y4]\n ]);\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [main2, cross1],\n [main2, y4],\n [x3, y4]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [main1, y3],\n [x3, y3],\n [x3, y4],\n [main1, y4]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [main2, cross1],\n [main2, y4],\n [x3, y4]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [main1, y3],\n [x3, y3],\n [x4, y4],\n [main1, y4]\n ]);\n }\n else {\n points.push([\n [main1, y3],\n [main2, y3],\n [main2, y4],\n [main1, y4]\n ]);\n }\n }\n }\n }\n else if(direction === 3) {\n // 整个和borderTop重叠\n if(main2 <= y2) {\n if(isLast) {\n points.push([\n [x1, y1],\n [x2, y2],\n [x2, y3],\n [x1, y4]\n ]);\n }\n else {\n cross1 = x1 + (main1 - y1) * Math.tan(deg1);\n cross2 = x1 + (main2 - y1) * Math.tan(deg1);\n points.push([\n [x1, main1],\n [cross1, main1],\n [cross2, main2],\n [x1, main2]\n ]);\n }\n }\n // 整个和borderBottom重叠\n else if(main1 >= y3) {\n cross1 = x1 + (y4 - main1) * Math.tan(deg2);\n cross2 = x1 + (y4 - main2) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [x1, main1],\n [cross1, main1],\n [x1, y4],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, main1],\n [cross1, main1],\n [cross2, main2],\n [x1, main2]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross1 = x1 + (main1 - y1) * Math.tan(deg1);\n points.push([\n [x1, main1],\n [cross1, main1],\n [x2, y2],\n [x1, y2]\n ]);\n if(isLast) {\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4],\n ]);\n }\n else {\n // 下部分和borderBottom重叠\n if(main2 > y3) {\n cross2 = x1 + (y4 - main2) * Math.tan(deg2);\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n points.push([\n [x1, y3],\n [x2, y3],\n [cross2, main2],\n [x1, main2]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, main2],\n [x1, main2]\n ]);\n }\n }\n }\n // 下部分和borderBottom重叠\n else if(main2 > y3) {\n cross1 = x1 + (y4 - main2) * Math.tan(deg2);\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross2 = x1 + (main1 - y1) * Math.tan(deg1);\n points.push([\n [x1, main1],\n [cross2, main1],\n [x2, y2],\n [x1, y1]\n ]);\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n if(isLast) {\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, y3],\n [x2, y3],\n [cross1, main2],\n [x1, main2]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [x1, main1],\n [x2, main1],\n [x2, y3],\n [x1, y3]\n ]);\n if(isLast) {\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, y3],\n [x2, y3],\n [cross1, main2],\n [x1, main2]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [x1, main1],\n [x2, main1],\n [x2, y3],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, main1],\n [x2, main1],\n [x2, main2],\n [x1, main2]\n ]);\n }\n }\n }\n }\n }\n if(direction === 0) {\n return calTopRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 1) {\n return calRightRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 2) {\n return calBottomRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 3) {\n return calLeftRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n }\n }\n // 兜底返回实线\n if(direction === 0) {\n if(x2 > x1) {\n points.push([\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1, y1]\n ]);\n }\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n if(x4 > x3) {\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x3, y2]\n ]);\n }\n return calTopRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 1) {\n if(y2 > y1) {\n points.push([\n [x4, y1],\n [x4, y1],\n [x4, y2],\n [x3, y2]\n ]);\n }\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n if(y4 > y3) {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, y4],\n [x4, y4]\n ]);\n }\n return calRightRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 2) {\n if(x2 > x1) {\n points.push([\n [x1, y4],\n [x2, y3],\n [x2, y4],\n [x1, y4]\n ]);\n }\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n if(x4 > x3) {\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n return calBottomRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 3) {\n if(y2 > y1) {\n points.push([\n [x1, y1],\n [x1, y1],\n [x2, y2],\n [x1, y2]\n ]);\n }\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n if(y4 > y3) {\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4]\n ]);\n }\n return calLeftRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n}\n\nfunction calTopRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,左圆角、右圆角、中间矩形,3个区域2个坐标;当左右圆角相接时中间矩形为0即中间2个坐标相等\n let oxl = x2 + brx - (x2 - x1);\n let oxr = x3 - erx + (x4 - x3);\n // 先拆分,当一块四边形跨越左右圆角和中间非圆角时被拆为3份,只跨一边圆角拆2份,不跨不处理\n // 也有可能左右圆角相接,跨越的只分为左右2份\n // 最终左圆角内的存入begin,右圆角内的存入end,中间center\n let beginList = [];\n let centerList = [];\n let endList = [];\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在左圆角\n if(points[1][0] < oxl) {\n beginList.push(points);\n }\n // 全在右圆角\n else if(points[0][0] > oxr) {\n endList.push(points);\n }\n // 跨越左右圆角\n else if(points[1][0] > oxr && points[0][0] < oxl) {\n let ya = oxl < x2 ? (y1 + Math.tan(deg1) * (oxl - x1)) : y2;\n let yb = oxr > x3 ? (y1 + Math.tan(deg2) * (x4 - oxr)) : y2;\n beginList.push([\n points[0],\n [oxl, y1],\n [oxl, ya],\n points[3]\n ]);\n if(oxl < oxr) {\n if(oxl > x2 && oxr < x3) {\n centerList.push([\n [oxl, y1],\n [oxr, y1],\n [oxr, y2],\n [oxl, y2],\n ]);\n }\n else if(oxl > x2) {\n centerList.push([\n [oxl, y1],\n [x3, y1],\n [x3, y2],\n [oxl, y2],\n ]);\n centerList.push([\n [x3, y1],\n [oxr, y1],\n [oxr, yb],\n [x3, y2]\n ]);\n }\n else if(oxr < x3) {\n centerList.push([\n [oxl, y1],\n [x2, y1],\n [x2, y2],\n [oxl, ya]\n ]);\n centerList.push([\n [x2, y1],\n [oxr, y1],\n [oxr, y2],\n [x2, y2],\n ]);\n }\n else {\n centerList.push([\n [oxl, y1],\n [x2, y1],\n [x2, y2],\n [oxl, ya]\n ]);\n centerList.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2],\n ]);\n centerList.push([\n [x3, y1],\n [oxr, y1],\n [oxr, yb],\n [x3, y2]\n ]);\n }\n }\n endList.push([\n [oxr, y1],\n points[1],\n points[2],\n [oxr, yb]\n ]);\n }\n // 跨越右圆角\n else if(points[1][0] > oxr) {\n let y = oxr > x3 ? (y1 + Math.tan(deg2) * (x4 - oxr)) : y2;\n centerList.push([\n points[0],\n [oxr, y1],\n [oxr, y],\n points[3]\n ]);\n endList.push([\n [oxr, y1],\n points[1],\n points[2],\n [oxr, y]\n ]);\n }\n // 跨越左圆角\n else if(points[0][0] < oxl) {\n let y = oxl < x2 ? (y1 + Math.tan(deg1) * (oxl - x1)) : y2;\n beginList.push([\n points[0],\n [oxl, y1],\n [oxl, y],\n points[3]\n ]);\n centerList.push([\n [oxl, y1],\n points[1],\n points[2],\n [oxl, y],\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = brx > (x2 - x1) && borderWidth < bry;\n // 算这个角度是为了头部和上条边相交线的延长线\n let crossDeg = Math.atan((x2 - x1) / (y2 - y1));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oyl = y1 + bry;\n let rx2 = brx - (x2 - x1);\n let ry2 = bry - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierTopLeft(beginList[0][0], beginList[0][1], oxl, oyl, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierTopLeft(beginList[0][3], beginList[0][2], oxl, oyl, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierTopLeft(points[0], points[1], oxl, oyl, sx1, ry1);\n if(needInner) {\n controls2 = calBezierTopLeft(points[3], points[2], oxl, oyl, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 0);\n }\n points[0] = controls1[0];\n if(controls1[1]) {\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 0);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n });\n }\n let endLength = endList.length;\n if(endLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = erx > (x4 - x3) && borderWidth < ery;\n // 算这个角度是为了最后和下条边相交线的延长线\n let crossDeg = Math.atan((x4 - x3) / (y2 - y1));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oyr = y1 + ery;\n let rx2 = erx - (x4 - x3);\n let ry2 = ery - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierTopRight(endList[endLength - 1][0], endList[endLength - 1][1], oxr, oyr, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierTopRight(endList[endLength - 1][3], endList[endLength - 1][2], oxr, oyr, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierTopRight(points[0], points[1], oxr, oyr, sx1, ry1);\n if(needInner) {\n controls2 = calBezierTopRight(points[3], points[2], oxr, oyr, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 1);\n }\n points[0] = controls1[0];\n if(controls1[1]) {\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 1);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierTopLeft(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = -p1x + ox;\n let dsx1 = dx1 * sx;\n let dx2 = -p2x + ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (oy - p2y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox - Math.sin(deg2) * r / sx;\n let cpy2 = oy - Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n // 最初的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox - Math.cos(alpha) * r / sx;\n cpy1 = oy - Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (oy - p1y));\n cpx1 = ox - Math.sin(deg1) * r / sx;\n cpy1 = oy - Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(p1x, p1y, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(p2x, p2y, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calBezierTopRight(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (oy - p1y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox + Math.sin(deg1) * r / sx;\n let cpy1 = oy - Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n // 最后的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox + Math.cos(alpha) * r / sx;\n cpy2 = oy - Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (oy - p2y));\n cpx2 = ox + Math.sin(deg2) * r / sx;\n cpy2 = oy - Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calRightRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,上圆角、下圆角、中间矩形,3个区域2个坐标;当上下圆角相接时中间矩形为0即中间2个坐标相等\n let oyt = y2 + bry - (y2 - y1);\n let oyb = y3 - ery + (y4 - y3);\n let beginList = [];\n let centerList = [];\n let endList = [];\n // 同borderTop拆分\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在上圆角\n if(points[2][1] < oyt) {\n beginList.push(points);\n }\n // 全在下圆角\n else if(points[1][1] > oyb) {\n endList.push(points);\n }\n // 跨越上下圆角\n else if(points[2][1] > oyb && points[1][1] < oyt) {\n let xa = oyt < y2 ? (x3 + Math.tan(deg2) * (y2 - oyt)) : x3;\n let xb = oyb > y3 ? (x3 + Math.tan(deg1) * (oyb - y3)) : x3;\n beginList.push([\n points[0],\n points[1],\n [x4, oyt],\n [xa, oyt]\n ]);\n if(oyt < oyb) {\n if(oyb < y3 && oyt > y2) {\n centerList.push([\n [x3, oyt],\n [x4, oyt],\n [x4, oyb],\n [x3, oyb]\n ]);\n }\n else if(oyt > y2) {\n centerList.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3],\n ]);\n centerList.push([\n [x3, y3],\n [x4, y3],\n [x4, oyb],\n [xb, oyb],\n ]);\n }\n else if(oyb < y3) {\n centerList.push([\n [xa, oyt],\n [x4, oyt],\n [x4, y2],\n [x3, y2],\n ]);\n centerList.push([\n [x3, y2],\n [x4, y2],\n [x4, oyb],\n [x3, oyb],\n ]);\n }\n else {\n centerList.push([\n [xa, oyt],\n [x4, oyt],\n [x4, y2],\n [x3, y2],\n ]);\n centerList.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3],\n ]);\n centerList.push([\n [x3, y3],\n [x4, y3],\n [x4, oyb],\n [xb, oyb],\n ]);\n }\n }\n endList.push([\n [xb, oyb],\n [x4, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越下圆角\n else if(points[2][1] > oyb) {\n let x = oyb > y3 ? (x3 + Math.tan(deg1) * (oyb - y3)) : x3;\n centerList.push([\n points[0],\n points[1],\n [x4, oyb],\n [x, oyb]\n ]);\n endList.push([\n [x, oyb],\n [x4, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越上圆角\n else if(points[1][1] < oyt) {\n let x = oyt < y2 ? (x3 + Math.tan(deg2) * (y2 - oyt)) : x3;\n beginList.push([\n points[0],\n points[1],\n [x4, oyt],\n [x, oyt]\n ]);\n centerList.push([\n [x, oyt],\n [x4, oyt],\n points[2],\n points[3]\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n let needInner = bry > (y2 - y1) && borderWidth < brx;\n let crossDeg = Math.atan((x4 - x3) / (y2 - y1));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oxt = x4 - brx;\n let rx2 = brx - (x4 - x3);\n let ry2 = bry - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierRightTop(beginList[0][1], beginList[0][2], oxt, oyt, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierRightTop(beginList[0][0], beginList[0][3], oxt, oyt, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierRightTop(points[1], points[2], oxt, oyt, sx1, ry1);\n if(needInner) {\n controls2 = calBezierRightTop(points[0], points[3], oxt, oyt, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 2);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 2);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[2] = points[3];\n points[3] = points[0];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n let endLength = endList.length;\n if(endLength) {\n let needInner = ery > (y4 - y3) && borderWidth < erx;\n let crossDeg = Math.atan((x4 - x3) / (y4 - y3));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oxb = x4 - erx;\n let rx2 = erx - (x4 - x3);\n let ry2 = ery - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierRightBottom(endList[endLength - 1][1], endList[endLength - 1][2], oxb, oyb, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierRightBottom(endList[endLength - 1][0], endList[endLength - 1][3], oxb, oyb, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierRightBottom(points[1], points[2], oxb, oyb, sx1, ry1);\n if(needInner) {\n controls2 = calBezierRightBottom(points[0], points[3], oxb, oyb, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 3);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 3);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[2] = points[3];\n points[3] = points[0];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierRightTop(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (oy - p2y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox + Math.sin(deg2) * r / sx;\n let cpy2 = oy - Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox + Math.cos(alpha) * r / sx;\n cpy1 = oy - Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (oy - p1y));\n cpx1 = ox + Math.sin(deg1) * r / sx;\n cpy1 = oy - Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#000';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\nfunction calBezierRightBottom(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (p1y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox + Math.sin(deg1) * r / sx;\n let cpy1 = oy + Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox + Math.cos(alpha) * r / sx;\n cpy2 = oy + Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (p2y - oy));\n cpx2 = ox + Math.sin(deg2) * r / sx;\n cpy2 = oy + Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\nfunction calBottomRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,左圆角、右圆角、中间矩形,3个区域2个坐标;当左右圆角相接时中间矩形为0即中间2个坐标相等\n let oxl = x2 + brx - (x2 - x1);\n let oxr = x3 - erx + (x4 - x3);\n // 先拆分,当一块四边形跨越左右圆角和中间非圆角时被拆为3份,只跨一边圆角拆2份,不跨不处理\n // 也有可能左右圆角相接,跨越的只分为左右2份\n // 最终左圆角内的存入begin,右圆角内的存入end,中间center\n let beginList = [];\n let centerList = [];\n let endList = [];\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在左圆角\n if(points[2][0] < oxl) {\n beginList.push(points);\n }\n // 全在右圆角\n else if(points[3][0] > oxr) {\n endList.push(points);\n }\n // 跨越左右圆角\n else if(points[2][0] > oxr && points[3][0] < oxl) {\n let ya = oxl < x2 ? (y4 - Math.tan(deg1) * (oxl - x1)) : y2;\n let yb = oxr > x3 ? (y4 - Math.tan(deg2) * (x4 - oxr)) : y3;\n beginList.push([\n points[0],\n [oxl, ya],\n [oxl, y4],\n points[3]\n ]);\n if(oxl < oxr) {\n if(oxl > x2 && oxr < x3) {\n centerList.push([\n [oxl, y3],\n [oxr, y3],\n [oxr, y4],\n [oxl, y4],\n ]);\n }\n else if(oxl > x2) {\n centerList.push([\n [oxl, y3],\n [x3, y3],\n [x3, y4],\n [oxl, y4],\n ]);\n centerList.push([\n [x3, y3],\n [oxr, yb],\n [oxr, y4],\n [x3, y4]\n ]);\n }\n else if(oxr < x3) {\n centerList.push([\n [oxl, ya],\n [x2, y3],\n [x2, y4],\n [oxl, y4]\n ]);\n centerList.push([\n [x2, y3],\n [oxr, y3],\n [oxr, y4],\n [x2, y4],\n ]);\n }\n else {\n centerList.push([\n [oxl, ya],\n [x2, y3],\n [x2, y4],\n [oxl, y4]\n ]);\n centerList.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4],\n ]);\n centerList.push([\n [x3, y3],\n [oxr, yb],\n [oxr, y4],\n [x3, y4]\n ]);\n }\n }\n endList.push([\n [oxr, yb],\n points[1],\n points[2],\n [oxr, y4]\n ]);\n }\n // 跨越右圆角\n else if(points[2][0] > oxr) {\n let y = oxr > x3 ? (y4 - Math.tan(deg2) * (x4 - oxr)) : y3;\n centerList.push([\n points[0],\n [oxr, y],\n [oxr, y4],\n points[3]\n ]);\n endList.push([\n [oxr, y],\n points[1],\n points[2],\n [oxr, y4]\n ]);\n }\n // 跨越左圆角\n else if(points[3][0] < oxl) {\n let y = oxl < x2 ? (y4 - Math.tan(deg1) * (oxl - x1)) : y3;\n beginList.push([\n points[0],\n [oxl, y],\n [oxl, y4],\n points[3]\n ]);\n centerList.push([\n [oxl, y],\n points[1],\n points[2],\n [oxl, y4],\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = brx > (x2 - x1) && borderWidth < bry;\n // 算这个角度是为了头部和上条边相交线的延长线\n let crossDeg = Math.atan((x2 - x1) / (y4 - y3));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oyl = y4 - bry;\n let rx2 = brx - (x2 - x1);\n let ry2 = bry - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierBottomLeft(beginList[0][3], beginList[0][2], oxl, oyl, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierBottomLeft(beginList[0][0], beginList[0][1], oxl, oyl, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierBottomLeft(points[3], points[2], oxl, oyl, sx1, ry1);\n if(needInner) {\n controls2 = calBezierBottomLeft(points[0], points[1], oxl, oyl, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 4);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 4);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n else {\n points[2] = points[1];\n points[3] = points[0];\n }\n points[0] = controls1[0];\n if(controls1[1]) {\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n }\n });\n }\n let endLength = endList.length;\n if(endLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = erx > (x4 - x3) && borderWidth < ery;\n // 算这个角度是为了最后和下条边相交线的延长线\n let crossDeg = Math.atan((x4 - x3) / (y4 - y3));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oyr = y4 - ery;\n let rx2 = erx - (x4 - x3);\n let ry2 = ery - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierBottomRight(endList[endLength - 1][3], endList[endLength - 1][2], oxr, oyr, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierBottomRight(endList[endLength - 1][0], endList[endLength - 1][1], oxr, oyr, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierBottomRight(points[3], points[2], oxr, oyr, sx1, ry1);\n if(needInner) {\n controls2 = calBezierBottomRight(points[0], points[1], oxr, oyr, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 5);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 5);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n else {\n points[2] = points[1];\n points[3] = points[0];\n }\n points[0] = controls1[0];\n if(controls1[1]) {\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n }\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierBottomLeft(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = -p1x + ox;\n let dsx1 = dx1 * sx;\n let dx2 = -p2x + ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (p2y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox - Math.sin(deg2) * r / sx;\n let cpy2 = oy + Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n // 最初的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox - Math.cos(alpha) * r / sx;\n cpy1 = oy + Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (p1y - oy));\n cpx1 = ox - Math.sin(deg1) * r / sx;\n cpy1 = oy + Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calBezierBottomRight(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (p1y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox + Math.sin(deg1) * r / sx;\n let cpy1 = oy + Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n // 最后的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox + Math.cos(alpha) * r / sx;\n cpy2 = oy + Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (p2y - oy));\n cpx2 = ox + Math.sin(deg2) * r / sx;\n cpy2 = oy + Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calLeftRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,上圆角、下圆角、中间矩形,3个区域2个坐标;当上下圆角相接时中间矩形为0即中间2个坐标相等\n let oyt = y2 + bry - (y2 - y1);\n let oyb = y3 - ery + (y4 - y3);\n let beginList = [];\n let centerList = [];\n let endList = [];\n // 同borderTop拆分\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在上圆角\n if(points[3][1] < oyt) {\n beginList.push(points);\n }\n // 全在下圆角\n else if(points[0][1] > oyb) {\n endList.push(points);\n }\n // 跨越上下圆角\n else if(points[3][1] > oyb && points[0][1] < oyt) {\n let xa = oyt < y2 ? (x2 - Math.tan(deg2) * (y2 - oyt)) : x2;\n let xb = oyb > y3 ? (x2 - Math.tan(deg1) * (oyb - y3)) : x2;\n beginList.push([\n points[0],\n points[1],\n [xa, oyt],\n [x1, oyt]\n ]);\n if(oyt < oyb) {\n if(oyb < y3 && oyt > y2) {\n centerList.push([\n [x1, oyt],\n [x2, oyt],\n [x2, oyb],\n [x1, oyb]\n ]);\n }\n else if(oyt > y2) {\n centerList.push([\n [x1, oyt],\n [x2, oyt],\n [x2, y3],\n [x1, y3],\n ]);\n centerList.push([\n [x1, y3],\n [x2, y3],\n [xb, oyb],\n [x1, oyb],\n ]);\n }\n else if(oyb < y3) {\n centerList.push([\n [x1, oyt],\n [xa, oyt],\n [x2, y2],\n [x1, y2],\n ]);\n centerList.push([\n [x1, y2],\n [x2, y2],\n [x2, oyb],\n [x1, oyb],\n ]);\n }\n else {\n centerList.push([\n [x1, oyt],\n [xa, oyt],\n [x2, y2],\n [x1, y2],\n ]);\n centerList.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3],\n ]);\n centerList.push([\n [x1, y3],\n [x2, y3],\n [xb, oyb],\n [x1, oyb],\n ]);\n }\n }\n endList.push([\n [x1, oyb],\n [xb, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越下圆角\n else if(points[3][1] > oyb) {\n let x = oyb > y3 ? (x2 - Math.tan(deg1) * (oyb - y3)) : x2;\n centerList.push([\n points[0],\n points[1],\n [x, oyb],\n [x1, oyb]\n ]);\n endList.push([\n [x1, oyb],\n [x, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越上圆角\n else if(points[1][1] < oyt) {\n let x = oyt < y2 ? (x2 - Math.tan(deg2) * (y2 - oyt)) : x2;\n beginList.push([\n points[0],\n points[1],\n [x, oyt],\n [x1, oyt]\n ]);\n centerList.push([\n [x1, oyt],\n [x, oyt],\n points[2],\n points[3]\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n let needInner = bry > (y2 - y1) && borderWidth < brx;\n let crossDeg = Math.atan((x2 - x1) / (y2 - y1));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oxt = x1 + brx;\n let rx2 = brx - (x2 - x1);\n let ry2 = bry - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierLeftTop(beginList[0][0], beginList[0][3], oxt, oyt, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierLeftTop(beginList[0][1], beginList[0][2], oxt, oyt, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierLeftTop(points[0], points[3], oxt, oyt, sx1, ry1);\n if(needInner) {\n controls2 = calBezierLeftTop(points[1], points[2], oxt, oyt, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 6);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 6);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[3] = points[1];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n let endLength = endList.length;\n if(endLength) {\n let needInner = ery > (y4 - y3) && borderWidth < erx;\n let crossDeg = Math.atan((x2 - x1) / (y4 - y3));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oxb = x1 + erx;\n let rx2 = erx - (x2 - x1);\n let ry2 = ery - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierLeftBottom(endList[endLength - 1][0], endList[endLength - 1][3], oxb, oyb, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierLeftBottom(endList[endLength - 1][1], endList[endLength - 1][2], oxb, oyb, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierLeftBottom(points[0], points[3], oxb, oyb, sx1, ry1);\n if(needInner) {\n controls2 = calBezierLeftBottom(points[1], points[2], oxb, oyb, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 7);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 7);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[3] = points[1];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierLeftTop(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = ox - p1x;\n let dsx1 = dx1 * sx;\n let dx2 = ox - p2x;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (oy - p2y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox - Math.sin(deg2) * r / sx;\n let cpy2 = oy - Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox - Math.cos(alpha) * r / sx;\n cpy1 = oy - Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (oy - p1y));\n cpx1 = ox - Math.sin(deg1) * r / sx;\n cpy1 = oy - Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#000';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\nfunction calBezierLeftBottom(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = ox - p1x;\n let dsx1 = dx1 * sx;\n let dx2 = ox - p2x;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (p1y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox - Math.sin(deg1) * r / sx;\n let cpy1 = oy + Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox - Math.cos(alpha) * r / sx;\n cpy2 = oy + Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (p2y - oy));\n cpx2 = ox - Math.sin(deg2) * r / sx;\n cpy2 = oy + Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\n/**\n * 简单计算椭圆的圆化坐标控制点,视作重合位置,外面判断backgroundClip并调整坐标\n * @param x 起始x\n * @param y 起始y\n * @param w 宽\n * @param h 高\n * @param btlr borderTopLeftRadius\n * @param btrr borderTopRightRadius\n * @param bbrr borderBottomRightRadius\n * @param bblr borderBottomLeftRadius\n * @returns {[]} 多边形的顶点和曲线控制点\n */\nfunction calRadius(x, y, w, h, btlr, btrr, bbrr, bblr) {\n let need;\n let [btlx, btly] = btlr;\n let [btrx, btry] = btrr;\n let [bbrx, bbry] = bbrr;\n let [bblx, bbly] = bblr;\n btlx = Math.max(btlx, 0);\n btly = Math.max(btly, 0);\n btrx = Math.max(btrx, 0);\n btry = Math.max(btry, 0);\n bbrx = Math.max(bbrx, 0);\n bbry = Math.max(bbry, 0);\n bblx = Math.max(bblx, 0);\n bbly = Math.max(bbly, 0);\n // 圆角必须x/y都>0才有效,否则视为不绘制\n if(btlx > 0 && btly > 0 || btrx > 0 && btry > 0 || bbrx > 0 && bbry > 0 || bblx > 0 && bbly > 0) {\n need = true;\n }\n if(need) {\n let list = [];\n if(btlx > 0 && btly > 0) {\n list.push([x, y + btly]);\n list.push([x, y + (btly) * (1 - H), x + btlx * (1 - H), y, x + btlx, y]);\n }\n else {\n list.push([x, y]);\n }\n if(btrx > 0 && btry > 0) {\n list.push([x + w - btrx, y]);\n list.push([x + w - btrx * (1 - H), y, x + w, y + btry * (1 - H), x + w, y + btry]);\n }\n else {\n list.push([x + w, y]);\n }\n if(bbrx > 0 && bbry > 0) {\n list.push([x + w, y + h - bbry]);\n list.push([x + w, y + h - bbry * (1 - H), x + w - bbrx * (1 - H), y + h, x + w - bbrx, y + h]);\n }\n else {\n list.push([x + w, y + h]);\n }\n if(bblx > 0 && bbly > 0) {\n list.push([x + bblx, y + h]);\n list.push([x + bblx * (1 - H), y + h, x, y + h - bbly * (1 - H), x, y + h - bbly]);\n }\n else {\n list.push([x, y + h]);\n }\n return list;\n }\n}\n\nfunction limit(points, x, y, direction) {\n if(direction === 0) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n else if(direction === 1) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n else if(direction === 2) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 3) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n else if(direction === 4) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 5) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 6) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 7) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n}\n\nconst BR_KS = [BORDER_TOP_LEFT_RADIUS, BORDER_TOP_RIGHT_RADIUS, BORDER_BOTTOM_RIGHT_RADIUS, BORDER_BOTTOM_LEFT_RADIUS];\nfunction calBorderRadius(w, h, currentStyle, computedStyle, root) {\n let noRadius = true;\n BR_KS.forEach(k => {\n computedStyle[k] = currentStyle[k].map((item, i) => {\n if(item.v > 0) {\n noRadius = false;\n }\n else {\n return 0;\n }\n if(item.u === PX) {\n return Math.max(0, item.v);\n }\n else if(item.u === PERCENT) {\n return Math.max(0, item.v * (i ? h : w) * 0.01);\n }\n else if(item.u === REM) {\n return Math.max(0, item.v * root.computedStyle[FONT_SIZE]);\n }\n else if(item.u === VW) {\n return Math.max(0, item.v * root.width * 0.01);\n }\n else if(item.u === VH) {\n return Math.max(0, item.v * root.height * 0.01);\n }\n else if(item.u === VMAX) {\n return Math.max(0, item.v * Math.max(root.width, root.height) * 0.01);\n }\n else if(item.u === VMIN) {\n return Math.max(0, item.v * Math.min(root.width, root.height) * 0.01);\n }\n return 0;\n });\n });\n // 优化提前跳出\n if(noRadius) {\n return;\n }\n // radius限制,相交的2个之和不能超过边长,如果2个都超过中点取中点,只有1个超过取交点,这包含了单个不能超过总长的逻辑\n BR_KS.forEach((k, i) => {\n let j = i % 2 === 0 ? 0 : 1;\n let target = j ? h : w;\n let prev = computedStyle[k];\n let next = computedStyle[BR_KS[(i + 1) % 4]];\n // 相加超过边长则是相交\n if(prev[j] + next[j] > target) {\n let half = target * 0.5;\n // 都超过一半中点取中点\n if(prev[j] >= half && next[j] >= half) {\n prev[j] = next[j] = half;\n }\n // 仅1个超过中点,因相交用总长减去另一方即可\n else if(prev[j] > half) {\n prev[j] = target - next[j];\n }\n else if(next[j] > half) {\n next[j] = target - prev[j];\n }\n }\n });\n}\n\nfunction calBorderRadiusInline(contentBoxList, currentStyle, computedStyle) {\n let first, last;\n if(contentBoxList.length) {\n first = contentBoxList[0];\n last = contentBoxList[contentBoxList.length - 1];\n // 不用instanceof防止循环依赖\n if(last.isEllipsis) {\n last = contentBoxList[contentBoxList.length - 2];\n }\n }\n // 先看first的左侧\n let w = first ? first.outerWidth : 0, h = first ? first.outerHeight : 0;\n w += computedStyle[BORDER_LEFT_WIDTH] + computedStyle[PADDING_LEFT];\n h += computedStyle[BORDER_TOP_WIDTH] + computedStyle[BORDER_BOTTOM_WIDTH]\n + computedStyle[PADDING_TOP] + computedStyle[PADDING_BOTTOM];\n [BORDER_TOP_LEFT_RADIUS, BORDER_BOTTOM_LEFT_RADIUS].forEach(k => {\n computedStyle[k] = currentStyle[k].map((item, i) => {\n let v;\n if(item.u === PX) {\n v = Math.max(0, item.v);\n v = Math.min(i ? h : w, v);\n }\n else {\n v = Math.max(0, item.v * (i ? h : w) * 0.01);\n v = Math.min(i ? h : w, v);\n }\n return v;\n });\n });\n // 再看end的右侧\n w = last ? last.outerWidth : 0;\n h = last ? last.outerHeight : 0;\n [BORDER_TOP_RIGHT_RADIUS, BORDER_BOTTOM_RIGHT_RADIUS].forEach(k => {\n computedStyle[k] = currentStyle[k].map((item, i) => {\n let v;\n if(item.u === PX) {\n v = Math.max(0, item.v);\n v = Math.min(i ? h : w, v);\n }\n else {\n v = Math.max(0, item.v * (i ? h : w) * 0.01);\n v = Math.min(i ? h : w, v);\n }\n return v;\n });\n });\n}\n\nfunction renderBorder(xom, renderMode, ctx, points, color, dx, dy) {\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n ctx.beginPath();\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n points.forEach(point => {\n canvasPolygon(ctx, point, dx, dy);\n });\n ctx.fill();\n ctx.closePath();\n }\n else if(renderMode === mode.SVG) {\n let s = '';\n points.forEach(point => {\n s += svgPolygon(point);\n });\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', s],\n ['fill', color],\n ],\n });\n }\n}\n\nexport default {\n calPoints,\n calRadius,\n calBorderRadius,\n calBorderRadiusInline,\n renderBorder,\n};\n","import unit from './unit';\nimport reg from './reg';\nimport geom from '../math/geom';\nimport vector from '../math/vector';\nimport mx from '../math/matrix';\nimport gradient from '../math/gradient';\nimport border from './border';\nimport mode from '../refresh/mode';\nimport util from '../util/util';\nimport painter from '../util/painter';\nimport enums from '../util/enums';\nimport inject from '../util/inject';\n\nconst { rgba2int, isNil } = util;\nconst { PX, PERCENT, DEG, NUMBER, REM, VW, VH, VMAX, VMIN, calUnit } = unit;\nconst { d2r } = geom;\nconst { canvasPolygon } = painter;\nconst {\n STYLE_KEY: {\n FONT_SIZE,\n },\n} = enums;\n\nfunction getLinearDeg(v) {\n let deg = 180;\n if(v === 'to top') {\n deg = 0;\n }\n else if(v === 'to top right') {\n deg = 45;\n }\n else if(v === 'to right') {\n deg = 90;\n }\n else if(v === 'to bottom right') {\n deg = 135;\n }\n else if(v === 'to bottom') {\n }\n else if(v === 'to bottom left') {\n deg = 225;\n }\n else if(v === 'to left') {\n deg = 270;\n }\n else if(v === 'to top left') {\n deg = 315;\n }\n // 数字角度,没有的话取默认角度\n else {\n let match = /([-+]?[\\d.]+)deg/.exec(v);\n if(match) {\n deg = parseFloat(match[1]);\n }\n }\n return deg % 360;\n}\n\nfunction getRadialPosition(data) {\n if(/^[-+]?[\\d.]/.test(data)) {\n let v = calUnit(data);\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.v = PX;\n }\n return v;\n }\n else {\n return {\n v: {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[data] || 50,\n u: PERCENT,\n };\n }\n}\n\n// 获取color-stop区间范围,去除无用值\nfunction getColorStop(v, length, root) {\n let list = [];\n let firstColor = v[0][0];\n // 先把已经声明距离的换算成[0,1]以数组形式存入,未声明的原样存入\n for(let i = 0, len = v.length; i < len; i++) {\n let item = v[i];\n // 考虑是否声明了位置\n if(item.length > 1) {\n let p = item[1];\n if(p.u === PERCENT) {\n list.push([item[0], p.v * 0.01]);\n }\n else if(p.u === REM) {\n list.push([item[0], p.v * root.computedStyle[FONT_SIZE] / length]);\n }\n else if(p.u === VW) {\n list.push([item[0], p.v * root.width / length]);\n }\n else if(p.u === VH) {\n list.push([item[0], p.v * root.height / length]);\n }\n else if(p.u === VMAX) {\n list.push([item[0], p.v * Math.max(root.width, root.height) / length]);\n }\n else if(p.u === VMIN) {\n list.push([item[0], p.v * Math.min(root.width, root.height) / length]);\n }\n else {\n list.push([item[0], p.v / length]);\n }\n }\n else {\n list.push([item[0]]);\n }\n }\n if(list.length === 1) {\n list.push(util.clone(list[0]));\n }\n // 首尾不声明默认为[0, 1]\n if(list[0].length === 1) {\n list[0].push(0);\n }\n if(list.length > 1) {\n let i = list.length - 1;\n if(list[i].length === 1) {\n list[i].push(1);\n }\n }\n // 找到未声明位置的,需区间计算,找到连续的未声明的,前后的区间平分\n let start = list[0][1];\n for(let i = 1, len = list.length; i < len - 1; i++) {\n let item = list[i];\n if(item.length > 1) {\n start = item[1];\n }\n else {\n let j = i + 1;\n let end = list[list.length - 1][1];\n for(; j < len - 1; j++) {\n let item = list[j];\n if(item.length > 1) {\n end = item[1];\n break;\n }\n }\n let num = j - i + 1;\n let per = (end - start) / num;\n for(let k = i; k < j; k++) {\n let item = list[k];\n item.push(start + per * (k + 1 - i));\n }\n i = j;\n }\n }\n // 每个不能小于前面的,canvas/svg不能兼容这种情况,需处理\n for(let i = 1, len = list.length; i < len; i++) {\n let item = list[i];\n let prev = list[i - 1];\n if(item[1] < prev[1]) {\n item[1] = prev[1];\n }\n }\n // 0之前的和1之后的要过滤掉\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(item[1] > 1) {\n list.splice(i);\n let prev = list[i - 1];\n if(prev && prev[1] < 1) {\n let dr = item[0][0] - prev[0][0];\n let dg = item[0][1] - prev[0][1];\n let db = item[0][2] - prev[0][2];\n let da = item[0][3] - prev[0][3];\n let p = (1 - prev[1]) / (item[1] - prev[1]);\n list.push([\n [\n item[0][0] + dr * p,\n item[0][1] + dg * p,\n item[0][2] + db * p,\n item[0][3] + da * p,\n ],\n 1],\n );\n }\n break;\n }\n }\n for(let i = list.length - 1; i >= 0; i--) {\n let item = list[i];\n if(item[1] < 0) {\n list.splice(0, i + 1);\n let next = list[i];\n if(next && next[1] > 0) {\n let dr = next[0][0] - item[0][0];\n let dg = next[0][1] - item[0][1];\n let db = next[0][2] - item[0][2];\n let da = next[0][3] - item[0][3];\n let p = (-item[1]) / (next[1] - item[1]);\n list.unshift([\n [\n item[0][0] + dr * p,\n item[0][1] + dg * p,\n item[0][2] + db * p,\n item[0][3] + da * p,\n ],\n 0],\n );\n }\n break;\n }\n }\n // 可能存在超限情况,如在使用px单位超过len或 {\n // item[0] = int2rgba(item[0]);\n if(item[1] < 0) {\n item[1] = 0;\n }\n else if(item[1] > 1) {\n item[1] = 1;\n }\n });\n // 都超限时,第一个颜色兜底\n if(!list.length) {\n list.push([firstColor, 0]);\n }\n return list;\n}\n\n// 根据角度和圆心获取渐变的4个点坐标\nfunction calLinearCoords(deg, length, cx, cy) {\n let x0;\n let y0;\n let x1;\n let y1;\n if(deg >= 270) {\n let r = d2r(360 - deg);\n x0 = cx + Math.sin(r) * length;\n y0 = cy + Math.cos(r) * length;\n x1 = cx - Math.sin(r) * length;\n y1 = cy - Math.cos(r) * length;\n }\n else if(deg >= 180) {\n let r = d2r(deg - 180);\n x0 = cx + Math.sin(r) * length;\n y0 = cy - Math.cos(r) * length;\n x1 = cx - Math.sin(r) * length;\n y1 = cy + Math.cos(r) * length;\n }\n else if(deg >= 90) {\n let r = d2r(180 - deg);\n x0 = cx - Math.sin(r) * length;\n y0 = cy - Math.cos(r) * length;\n x1 = cx + Math.sin(r) * length;\n y1 = cy + Math.cos(r) * length;\n }\n else {\n let r = d2r(deg);\n x0 = cx - Math.sin(r) * length;\n y0 = cy + Math.cos(r) * length;\n x1 = cx + Math.sin(r) * length;\n y1 = cy - Math.cos(r) * length;\n }\n return [x0, y0, x1, y1];\n}\n\nfunction calCircleCentre(position, x1, y1, iw, ih, root) {\n let cx, cy;\n let positionX = position[0], positionY = position[1];\n if(positionX.u === PERCENT) {\n cx = x1 + positionX.v * iw * 0.01;\n }\n else if(positionX.u === REM) {\n cx = x1 + positionX.v * root.computedStyle[FONT_SIZE];\n }\n else if(positionX.u === VW) {\n cx = x1 + positionX.v * root.width * 0.01;\n }\n else if(positionX.u === VH) {\n cx = x1 + positionX.v * root.height * 0.01;\n }\n else if(positionX.u === VMAX) {\n cx = x1 + positionX.v * Math.max(root.width, root.height) * 0.01;\n }\n else if(positionX.u === VMIN) {\n cx = x1 + positionX.v * Math.min(root.width, root.height) * 0.01;\n }\n else {\n cx = x1 + positionX.v;\n }\n if(positionY.u === PERCENT) {\n cy = y1 + positionY.v * ih * 0.01;\n }\n else if(positionY.u === REM) {\n cy = y1 + positionY.v * root.computedStyle[FONT_SIZE];\n }\n else if(positionY.u === VW) {\n cy = y1 + positionY.v * root.width * 0.01;\n }\n else if(positionY.u === VH) {\n cy = y1 + positionY.v * root.height * 0.01;\n }\n else if(positionY.u === VH) {\n cy = y1 + positionY.v * Math.max(root.width, root.height) * 0.01;\n }\n else if(positionY.u === VH) {\n cy = y1 + positionY.v * Math.min(root.width, root.height) * 0.01;\n }\n else {\n cy = y1 + positionY.v;\n }\n return [cx, cy];\n}\n\n// 获取径向渐变圆心半径\nfunction calRadialRadius(shape, size, position, iw, ih, x1, y1, x2, y2, root) {\n let cx, cy, xl, yl, r, tx, ty, d = 0;\n // 扩展的from to ratio格式,圆心、长轴坐标、短轴缩放比\n if(Array.isArray(size)) {\n cx = x1 + size[0] * iw;\n cy = y1 + size[1] * ih;\n tx = x1 + size[4] * iw;\n ty = y1 + size[5] * ih;\n if(size[6] <= 0) {\n r = Math.min(Math.abs(cx - x1), Math.min(Math.abs(cy - y1), Math.min(Math.abs(cy - y2), Math.min(Math.abs(cx - y2)))));\n }\n else {\n xl = Math.sqrt(Math.pow((size[2] - size[0]) * iw, 2) + Math.pow((size[3] - size[1]) * ih, 2));\n yl = xl * size[6];\n r = Math.max(xl, yl);\n // 看旋转\n if(xl !== yl) {\n if(size[2] >= size[0]) {\n if(size[3] >= size[1]) {\n d = Math.asin((size[3] - size[1]) * ih / xl);\n }\n else {\n d = -Math.asin((size[1] - size[3]) * ih / xl);\n }\n }\n else {\n if(size[3] >= size[1]) {\n d = d2r(180) - Math.asin((size[3] - size[1]) * ih / xl);\n }\n else {\n d = Math.asin((size[1] - size[3]) * ih / xl) - d2r(180);\n }\n }\n }\n }\n }\n else {\n // 默认椭圆a是水平轴,b是垂直轴\n [cx, cy] = calCircleCentre(position, x1, y1, iw, ih, root);\n tx = cx;\n ty = cy;\n let ratio = 1;\n if(size === 'closest-corner' && shape === 'circle') {\n if(cx <= x1 || cx >= x2 || cy <= y1 || cy >= y2) {\n r = Math.min(Math.abs(cx - x1), Math.min(Math.abs(cy - y1), Math.min(Math.abs(cy - y2), Math.min(Math.abs(cx - y2)))));\n }\n else {\n if(cx < x1 + iw * 0.5) {\n xl = cx - x1;\n }\n else {\n xl = x2 - cx;\n }\n if(cy < y1 + ih * 0.5) {\n yl = cy - y1;\n }\n else {\n yl = y2 - cy;\n }\n r = Math.sqrt(Math.pow(xl, 2) + Math.pow(yl, 2));\n }\n }\n else if(size === 'closest-side' || size === 'closest-corner') {\n // 在边外特殊情况只有end颜色填充\n if(cx <= x1 || cx >= x2 || cy <= y1 || cy >= y2) {\n r = Math.min(Math.abs(cx - x1), Math.min(Math.abs(cy - y1), Math.min(Math.abs(cy - y2), Math.min(Math.abs(cx - y2)))));\n }\n else {\n let ratio = 1;\n if(cx < x1 + iw * 0.5) {\n xl = cx - x1;\n }\n else {\n xl = x2 - cx;\n }\n if(cy < y1 + ih * 0.5) {\n yl = cy - y1;\n }\n else {\n yl = y2 - cy;\n }\n r = Math.min(xl, yl);\n // css的角和边有对应关系,即边扩展倍数,计算为固定值\n if(size === 'closest-corner') {\n ratio = Math.sqrt(2);\n }\n xl *= ratio;\n yl *= ratio;\n r *= ratio;\n }\n }\n else {\n if(cx <= x1) {\n xl = x1 - cx + iw;\n }\n else if(cx >= x2) {\n xl = cx - x2 + iw;\n }\n else if(cx < x1 + iw * 0.5) {\n xl = x2 - cx;\n }\n else {\n xl = cx - x1;\n }\n if(cy <= y1) {\n yl = y1 - cy + ih;\n }\n else if(cy >= y2) {\n yl = cy - y2 + ih;\n }\n else if(cy < y1 + ih * 0.5) {\n yl = y2 - cy;\n }\n else {\n yl = cy - y1;\n }\n r = Math.max(xl, yl);\n if(size !== 'farthest-side') {\n ratio = Math.sqrt(2);\n }\n xl *= ratio;\n yl *= ratio;\n r *= ratio;\n }\n }\n if(shape === 'circle') {\n xl = yl = r;\n }\n return [cx, cy, r, xl, yl, tx, ty, d];\n}\n\nfunction parseGradient(s) {\n let gradient = reg.gradient.exec(s);\n if(gradient) {\n let o = {\n k: gradient[1],\n };\n if(o.k === 'linear') {\n let deg = /([-+]?[\\d.]+deg)|(to\\s+[toprighbml]+)/i.exec(gradient[2]);\n if(deg) {\n o.d = getLinearDeg(deg[0].toLowerCase());\n }\n // 扩展支持从a点到b点相对坐标,而不是css角度,sketch等ui软件中用此格式\n else {\n let points = /([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)/.exec(gradient[2]);\n if(points) {\n o.d = [parseFloat(points[1]), parseFloat(points[2]), parseFloat(points[3]), parseFloat(points[4])];\n }\n else {\n o.d = 180;\n }\n }\n }\n else if(o.k === 'radial') {\n o.s = gradient[2].indexOf('circle') > -1 ? 'circle' : 'ellipse';\n let size = /(closest|farthest)-(side|corner)/i.exec(gradient[2]);\n if(size) {\n o.z = size[0].toLowerCase();\n }\n // 扩展支持从a点到b点相对坐标,而不是size,sketch等ui软件中用此格式\n else {\n let points = /([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)(?:\\s+([-+]?[\\d.]+))?(?:\\s+([-+]?[\\d.]+))?(?:\\s+([-+]?[\\d.]+))?/.exec(gradient[2]);\n if(points) {\n o.z = [parseFloat(points[1]), parseFloat(points[2]), parseFloat(points[3]), parseFloat(points[4])];\n let i5 = !isNil(points[5]), i6 = !isNil(points[6]), i7 = !isNil(points[7]);\n // 重载,567是偏移x/y和ratio,都可省略即不偏移和半径1,只有5是ratio,只有56是x/y\n if(i5 && i6 && i7) {\n o.z.push(parseFloat(points[5]));\n o.z.push(parseFloat(points[6]));\n o.z.push(parseFloat(points[7]));\n }\n else if(i5 && i6) {\n o.z.push(parseFloat(points[5]));\n o.z.push(parseFloat(points[6]));\n o.z.push(1);\n }\n else if(i5) {\n o.z.push(o.z[0]);\n o.z.push(o.z[1]);\n o.z.push(parseFloat(points[5]));\n }\n else {\n o.z.push(o.z[0]);\n o.z.push(o.z[1])\n o.z.push(1);\n }\n }\n else {\n o.z = 'farthest-corner';\n }\n }\n let position = /at\\s+((?:[-+]?[\\d.]+[pxremvwhina%]*)|(?:left|top|right|bottom|center))(?:\\s+((?:[-+]?[\\d.]+[pxremvwhina%]*)|(?:left|top|right|bottom|center)))?/i.exec(gradient[2]);\n if(position) {\n let x = getRadialPosition(position[1]);\n let y = position[2] ? getRadialPosition(position[2]) : x;\n o.p = [x, y];\n }\n else {\n o.p = [{ v: 50, u: PERCENT }, { v: 50, u: PERCENT }];\n }\n }\n else if(o.k === 'conic') {\n let deg = /([-+]?[\\d.]+deg)/i.exec(gradient[2]);\n if(deg) {\n o.d = parseFloat(deg[0]) % 360;\n }\n else {\n o.d = 0;\n }\n let position = /at\\s+((?:[-+]?[\\d.]+[pxremvwhina%]*)|(?:left|top|right|bottom|center))(?:\\s+((?:[-+]?[\\d.]+[pxremvwhina%]*)|(?:left|top|right|bottom|center)))?/i.exec(gradient[2]);\n if(position) {\n let x = getRadialPosition(position[1]);\n let y = position[2] ? getRadialPosition(position[2]) : x;\n o.p = [x, y];\n }\n else {\n o.p = [{ v: 50, u: PERCENT }, { v: 50, u: PERCENT }];\n }\n }\n let v = gradient[2].match(/(([-+]?[\\d.]+[pxremvwhina%]+)?\\s*((#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\)))\\s*([-+]?[\\d.]+[pxremvwhina%]+)?)|(transparent)/ig) || [];\n o.v = v.map(item => {\n let color = /(?:#[0-9a-f]{3,8})|(?:rgba?\\s*\\(.+?\\))|(?:transparent)/i.exec(item);\n let arr = [rgba2int(color[0])];\n let percent = /[-+]?[\\d.]+[pxremvwhina%]+/.exec(item);\n if(percent) {\n let v = calUnit(percent[0]);\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.v = PX;\n }\n arr[1] = v;\n }\n return arr;\n });\n return o;\n }\n}\n\nfunction getLinear(v, d, ox, oy, cx, cy, w, h, root, dx = 0, dy = 0) {\n ox += dx;\n oy += dy;\n cx += dx;\n cy += dy;\n // d为数组是2个坐标点,数字是css标准角度\n let x1, y1, x2, y2, stop;\n if(Array.isArray(d)) {\n x1 = ox + d[0] * w;\n y1 = oy + d[1] * h;\n x2 = ox + d[2] * w;\n y2 = oy + d[3] * h;\n let total = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n stop = getColorStop(v, total);\n }\n else {\n while(d >= 360) {\n d -= 360;\n }\n while(d < 0) {\n d += 360;\n }\n // 根据角度求直线上2点,设置半径为长宽最大值,这样一定在矩形外,看做一个向量A\n let len = Math.max(w, h);\n let coords = calLinearCoords(d, len, cx, cy, w, h);\n len *= 2;\n // start和4个顶点的向量在A上的投影长度\n let l1 = vector.dotProduct(ox - coords[0], oy - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n let l2 = vector.dotProduct(ox + w - coords[0], oy - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n let l3 = vector.dotProduct(ox + w - coords[0], oy + h - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n let l4 = vector.dotProduct(ox - coords[0], oy + h - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n // 最小和最大值为0~100%\n let min = l1, max = l1;\n min = Math.min(min, Math.min(l2, Math.min(l3, l4)));\n max = Math.max(max, Math.max(l2, Math.max(l3, l4)));\n // 求得0和100%的长度和坐标\n let total = max - min;\n let r1 = min / len;\n let dx = coords[2] - coords[0];\n let dy = coords[3] - coords[1];\n x1 = coords[0] + dx * r1;\n y1 = coords[1] + dy * r1;\n x2 = coords[2] - dx * r1;\n y2 = coords[3] - dy * r1;\n stop = getColorStop(v, total, root);\n }\n return {\n x1,\n y1,\n x2,\n y2,\n stop,\n };\n}\n\nfunction getRadial(v, shape, size, position, x1, y1, x2, y2, root, dx = 0, dy = 0) {\n let w = x2 - x1;\n let h = y2 - y1;\n x1 += dx;\n y1 += dy;\n x2 += dx;\n y2 += dy;\n let [cx, cy, r, xl, yl, tx, ty, d] = calRadialRadius(shape, size, position, w, h, x1, y1, x2, y2, root);\n // 圆形取最小值,椭圆根据最小圆进行transform,椭圆其中一边轴和r一样,另一边则大小缩放可能\n let matrix, scx = 1, scy = 1;\n if(xl !== yl || d) {\n matrix = [1, 0, 0, 1, 0, 0];\n if(d) {\n let sin = Math.sin(d);\n let cos = Math.cos(d);\n matrix = [cos, sin, 0, 0, -sin, cos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n }\n if(xl !== r) {\n scx = xl / r;\n let m = [scx, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n matrix = mx.multiply(matrix, m);\n }\n if(yl !== r) {\n scy = yl / r;\n let m = [1, 0, 0, 0, 0, scy, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n matrix = mx.multiply(matrix, m);\n }\n }\n let stop = getColorStop(v, r, root);\n return {\n cx,\n cy,\n tx,\n ty,\n r,\n stop,\n scx,\n scy,\n matrix,\n d,\n };\n}\n\nfunction getConic(v, d, p, x1, y1, x2, y2, ratio, root) {\n let [cx, cy, r, deg] = calConicRadius(v, d, p, x1, y1, x2, y2, root);\n let stop = getColorStop(v, 1, root);\n r <<= 1; // 锥形半径*2,这样分割画圆时保证一定会填满原有矩形\n r *= ratio; // 矢量图形比较特殊,有可能超限,传入个倍数扩大半径\n return {\n cx,\n cy,\n w: x2 - x1,\n h: y2 - y1,\n r,\n deg,\n stop,\n };\n}\n\nfunction calConicRadius(v, deg, position, x1, y1, x2, y2, root) {\n let iw = x2 - x1;\n let ih = y2 - y1;\n let [cx, cy] = calCircleCentre(position, x1, y1, iw, ih, root);\n let r, a, b;\n if(cx >= x1 + iw * 0.5) {\n a = cx - x1;\n }\n else {\n a = x2 - cx;\n }\n if(cy >= y1 + ih * 0.5) {\n b = cy - y1;\n }\n else {\n b = y2 - cy;\n }\n r = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));\n return [cx, cy, r, deg];\n}\n\nfunction renderConic(xom, renderMode, ctx, res, x, y, w, h, btlr, btrr, bbrr, bblr, isInline) {\n // border-radius使用三次贝塞尔曲线模拟1/4圆角,误差在[0, 0.000273]之间\n let list = border.calRadius(x, y, w, h, btlr, btrr, bbrr, bblr);\n if(!list) {\n list = [\n [x, y],\n [x + w, y],\n [x + w, y + h],\n [x, y + h],\n [x, y],\n ];\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n let offscreen = inject.getOffscreenCanvas(w, h, '__$$CONIC_GRADIENT$$__', null);\n let imgData = offscreen.ctx.getImageData(0,0, w, h);\n gradient.getConicGradientImage(res.cx - x, res.cy - y, res.w, res.h, res.stop, imgData.data);\n offscreen.ctx.putImageData(imgData, 0, 0);\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, list);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(offscreen.canvas, x, y);\n ctx.restore();\n offscreen.ctx.clearRect(0, 0, w, h);\n }\n}\n\nexport default {\n parseGradient,\n getLinear,\n getRadial,\n getConic,\n renderConic,\n};\n","import reg from './reg';\nimport util from '../util/util';\n\nlet { isNil } = util;\n\nfunction parseFlex(style, grow, shrink, basis) {\n if(isNil(style.flexGrow)) {\n style.flexGrow = grow || 0;\n }\n if(isNil(style.flexShrink)) {\n style.flexShrink = shrink || 0;\n }\n if(isNil(style.flexBasis)) {\n style.flexBasis = basis || 0;\n }\n}\n\nfunction parseMarginPadding(style, key, list) {\n let temp = style[key];\n if(!isNil(temp)) {\n let match = temp.toString().match(/([-+]?[\\d.]+[pxremvwhina%]*)|(auto)/ig);\n if(match) {\n if(match.length === 1) {\n match[3] = match[2] = match[1] = match[0];\n }\n else if(match.length === 2) {\n match[2] = match[0];\n match[3] = match[1];\n }\n else if(match.length === 3) {\n match[3] = match[1];\n }\n list.forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = match[i];\n }\n });\n }\n }\n}\n\nfunction parseOneBorder(style, k) {\n let v = style[k];\n if(isNil(v)) {\n return;\n }\n // 后面会统一格式化处理\n if(isNil(style[k + 'Width'])) {\n let w = /\\b[\\d.]+[pxremvwhina%]*\\b/i.exec(v);\n style[k + 'Width'] = w ? w[0] : 0;\n }\n if(isNil(style[k + 'Style'])) {\n let s = /\\b(solid|dashed|dotted)\\b/i.exec(v);\n style[k + 'Style'] = s ? s[1] : 'solid';\n }\n if(isNil(style[k + 'Color'])) {\n let c = /#[0-9a-f]{3,8}/i.exec(v);\n if(c && [4, 7, 9].indexOf(c[0].length) > -1) {\n style[k + 'Color'] = c[0];\n }\n else if(/\\btransparent\\b/i.test(v)) {\n style[k + 'Color'] = 'transparent';\n }\n else {\n c = /rgba?\\s*\\(.+\\)/i.exec(v);\n style[k + 'Color'] = c ? c[0] : 'transparent';\n }\n }\n}\n\nexport default {\n margin: ['marginTop', 'marginRight', 'marginBottom', 'marginLeft'],\n padding: ['paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft'],\n border: ['borderTop', 'borderRight', 'borderBottom', 'borderLeft'],\n borderTop: ['borderTopWidth', 'borderTopStyle', 'borderTopColor'],\n borderRight: ['borderRightWidth', 'borderRightStyle', 'borderRightColor'],\n borderBottom: ['borderBottomWidth', 'borderBottomStyle', 'borderBottomColor'],\n borderLeft: ['borderLeftWidth', 'borderLeftStyle', 'borderLeftColor'],\n borderWidth: ['borderTopWidth', 'borderRightWidth', 'borderBottomWidth', 'borderLeftWidth'],\n borderColor: ['borderTopColor', 'borderRightColor', 'borderBottomColor', 'borderLeftColor'],\n borderStyle: ['borderTopStyle', 'borderRightStyle', 'borderBottomStyle', 'borderLeftStyle'],\n borderRadius: ['borderTopLeftRadius', 'borderTopRightRadius', 'borderBottomRightRadius', 'borderBottomLeftRadius'],\n background: ['backgroundColor', 'backgroundImage', 'backgroundRepeat', 'backgroundPosition'],\n backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],\n flex: ['flexGrow', 'flexShrink', 'flexBasis'],\n translate: ['translateX', 'translateY'],\n translate3d: ['translateX', 'translateY', 'translateY'],\n scale: ['scaleX', 'scaleY'],\n scale3d: ['scaleX', 'scaleY', 'scaleZ'],\n rotate: ['rotateZ'],\n skew: ['skewX', 'skewY'],\n textStroke: ['textStrokeWidth', 'textStrokeColor', 'textStrokeOver'],\n\n toFull(style, k) {\n let v = style[k];\n if(k === 'background') {\n // bg缩写多个时有color则必须是最后一个\n if(Array.isArray(v)) {\n let length = v.length;\n if(isNil(style.backgroundColor)) {\n let bgc = /^\\s*((transparent)|(#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\)))/i.exec(v[length - 1]);\n if(bgc) {\n style.backgroundColor = bgc[0];\n v = v.slice(0, length - 1);\n }\n }\n let bgi = [];\n let bgr = [];\n let bgp = [];\n v.forEach(item => {\n if(isNil(style.backgroundImage)) {\n let gd = reg.gradient.exec(item);\n if(gd) {\n bgi.push(gd[0]);\n item = item.replace(gd[0], '');\n }\n else {\n let img = reg.img.exec(v);\n if(img) {\n bgi.push(img[0]);\n item = item.replace(img[0], '');\n }\n }\n }\n if(isNil(style.backgroundRepeat)) {\n let repeat = /(no-?)?repeat(-?[xy])?/i.exec(item);\n if(repeat) {\n bgr.push(repeat[0].toLowerCase());\n }\n }\n if(isNil(style.backgroundPosition)) {\n let position = item.match(reg.position);\n if(position) {\n bgp.push(position.join(' '));\n }\n }\n });\n if(bgi.length) {\n style.backgroundImage = bgi;\n }\n if(bgr.length) {\n style.backgroundRepeat = bgr;\n }\n if(bgp.length) {\n style.backgroundPosition = bgp;\n this.toFull(style, 'backgroundPosition');\n }\n }\n else {\n if(isNil(style.backgroundImage)) {\n let gd = reg.gradient.exec(v);\n if(gd) {\n style.backgroundImage = gd[0];\n v = v.replace(gd[0], '');\n }\n else {\n let img = reg.img.exec(v);\n if(img) {\n style.backgroundImage = img[0];\n v = v.replace(img[0], '');\n }\n }\n }\n if(isNil(style.backgroundRepeat)) {\n let repeat = /(no-?)?repeat(-?[xy])?/i.exec(v);\n if(repeat) {\n style.backgroundRepeat = repeat[0].toLowerCase();\n }\n }\n if(isNil(style.backgroundColor)) {\n let bgc = /^(transparent)|(#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\))/i.exec(v);\n if(bgc) {\n style.backgroundColor = bgc[0];\n v = v.replace(bgc[0], '');\n }\n }\n if(isNil(style.backgroundPosition)) {\n let position = v.match(reg.position);\n if(position) {\n style.backgroundPosition = position.join(' ');\n this.toFull(style, 'backgroundPosition');\n }\n }\n }\n }\n else if(k === 'flex') {\n if(v === 'none') {\n parseFlex(style, 0, 0, 'auto');\n }\n else if(v === 'auto') {\n parseFlex(style, 1, 1, 'auto');\n }\n else if(/^[\\d.]+\\s+[\\d.]+\\s+(auto|none|content)/.test(v) || /^[\\d.]+\\s+[\\d.]+\\s+[\\d.]+[pxremvwhina%]*/.test(v)) {\n let arr = v.split(/\\s+/);\n parseFlex(style, parseFloat(arr[0]), parseFloat(arr[1]), arr[2]);\n }\n else if(/^[\\d.]+\\s+[\\d.]+$/.test(v)) {\n let arr = v.split(/\\s+/);\n parseFlex(style, parseFloat(arr[0]), parseFloat(arr[1]), 0);\n }\n else if(/^[\\d.]+\\s+[\\d.]+[pxremvwhina%]+/.test(v)) {\n let arr = v.split(/\\s+/);\n parseFlex(style, parseFloat(arr[0]), 1, arr[1]);\n }\n else if(/^[\\d.]+$/.test(v)) {\n parseFlex(style, parseFloat(v), 1, 0);\n }\n else if(/^[\\d.]+[pxremvwhina%]+/i.test(v)) {\n parseFlex(style, 1, 1, v);\n }\n else {\n parseFlex(style, 0, 1, 'auto');\n }\n }\n else if(k === 'flexFlow') {\n v = v.toString().split(/\\s+/);\n if(v.length) {\n if(isNil(style.flexDirection)) {\n }\n style.flexDirection = v[0];\n if(v.length > 1) {\n style.flexWrap = v[1];\n }\n }\n }\n else if(k === 'borderRadius') {\n // borderRadius缩写很特殊,/分隔x/y,然后上右下左4个\n v = v.toString().split('/');\n if(v.length === 1) {\n v[1] = v[0];\n }\n for(let i = 0; i < 2; i++) {\n let item = v[i].toString().split(/\\s+/);\n if(item.length === 0) {\n v[i] = [0, 0, 0, 0];\n }\n else if(item.length === 1) {\n v[i] = [item[0], item[0], item[0], item[0]];\n }\n else if(item.length === 2) {\n v[i] = [item[0], item[1], item[0], item[1]];\n }\n else if(item.length === 3) {\n v[i] = [item[0], item[1], item[2], item[1]];\n }\n else {\n v[i] = item.slice(0, 4);\n }\n }\n this[k].forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = v[0][i] + ' ' + v[1][i];\n }\n });\n }\n else if(k === 'backgroundPosition') {\n if(!Array.isArray(v)) {\n v = [v];\n }\n let isEmpty = this[k].map(k2 => isNil(style[k2]));\n v.forEach(v2 => {\n v2 = v2.toString().split(/\\s+/);\n if(v2.length === 1) {\n v2[1] = '50%';\n }\n this[k].forEach((k2, i) => {\n if(isEmpty[i]) {\n style[k2] = style[k2] || [];\n style[k2].push(v2[i]);\n }\n });\n });\n }\n else if(['translate', 'scale', 'skew'].indexOf(k) > -1) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[1] = arr[0];\n }\n this[k].forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = arr[i];\n }\n });\n }\n else if(['translate3d', 'scale3d'].indexOf(k) > -1) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[2] = arr[1] = arr[0];\n }\n else if(arr.length === 2) {\n arr[2] = k === 'scale3d' ? 1 : 0;\n }\n this[k].forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = arr[i];\n }\n });\n }\n else if(k === 'margin' || k === 'padding') {\n parseMarginPadding(style, k, this[k]);\n }\n else if(/^border((Top)|(Right)|(Bottom)|(Left))$/.test(k)) {\n parseOneBorder(style, k);\n }\n else if(k === 'textStroke') {\n let w = /(?:^|\\s)([-+]?[\\d.]+[pxremvwhina%]*)/.exec(v);\n if(w) {\n style.textStrokeWidth = w[1];\n }\n let c = /(transparent)|(#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\))/i.exec(v);\n if(c) {\n style.textStrokeColor = c[0];\n }\n if(/\\bfill\\b/i.test(v)) {\n style.textStrokeOver = 'fill';\n }\n else {\n style.textStrokeOver = 'none';\n }\n }\n else if(this[k]) {\n this[k].forEach(k => {\n if(isNil(style[k])) {\n style[k] = v;\n }\n });\n }\n return style;\n }\n};\n","import enums from '../util/enums';\n\nconst { STYLE_KEY } = enums;\n\nconst {\n BACKGROUND_COLOR,\n BORDER_BOTTOM_COLOR,\n BORDER_LEFT_COLOR,\n BORDER_RIGHT_COLOR,\n BORDER_TOP_COLOR,\n COLOR, // 特殊,新增GRADIENT渐变色\n TEXT_STROKE_COLOR, // 同上\n FONT_SIZE,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_TOP_WIDTH,\n LEFT,\n TOP,\n RIGHT,\n BOTTOM,\n FLEX_BASIS,\n WIDTH,\n HEIGHT,\n LINE_HEIGHT,\n MARGIN_BOTTOM,\n MARGIN_LEFT,\n MARGIN_TOP,\n MARGIN_RIGHT,\n PADDING_TOP,\n PADDING_RIGHT,\n PADDING_BOTTOM,\n PADDING_LEFT,\n STROKE_WIDTH,\n STROKE_MITERLIMIT,\n LETTER_SPACING,\n PERSPECTIVE,\n TEXT_STROKE_WIDTH,\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n SKEW_X,\n SKEW_Y,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n BACKGROUND_IMAGE,\n FILL,\n STROKE,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n} = STYLE_KEY;\n\nfunction isColorKey(k) {\n return k === BACKGROUND_COLOR || k === BORDER_BOTTOM_COLOR\n || k === BORDER_LEFT_COLOR || k === BORDER_RIGHT_COLOR\n || k === BORDER_TOP_COLOR || k === COLOR || k === TEXT_STROKE_COLOR;\n}\n\nfunction isLengthKey(k) {\n return k === FONT_SIZE || k === TEXT_STROKE_WIDTH\n || k === BORDER_BOTTOM_WIDTH || k === BORDER_LEFT_WIDTH || k === BORDER_RIGHT_WIDTH || k === BORDER_TOP_WIDTH\n || k === LEFT || k === TOP || k === RIGHT || k === BOTTOM || k === FLEX_BASIS || k === WIDTH || k === HEIGHT\n || k === LINE_HEIGHT || k === MARGIN_BOTTOM || k === MARGIN_TOP || k === MARGIN_LEFT || k === MARGIN_RIGHT\n || k === PADDING_TOP || k === PADDING_RIGHT || k === PADDING_LEFT || k === PADDING_BOTTOM\n || k === STROKE_WIDTH || k === STROKE_MITERLIMIT || k === LETTER_SPACING || k === PERSPECTIVE;\n}\n\nfunction isExpandKey(k) {\n return k === TRANSLATE_X || k === TRANSLATE_Y || k === TRANSLATE_Z\n || k === SKEW_X || k === SKEW_Y || k === SCALE_X || k === SCALE_Y || k === SCALE_Z\n || k === ROTATE_X || k === ROTATE_Y || k === ROTATE_Z;\n}\n\nfunction isGradientKey(k) {\n return k === BACKGROUND_IMAGE || k === FILL || k === STROKE;\n}\n\nfunction isRadiusKey(k) {\n return k === BORDER_BOTTOM_LEFT_RADIUS || k === BORDER_TOP_LEFT_RADIUS\n || k === BORDER_TOP_RIGHT_RADIUS || k === BORDER_BOTTOM_RIGHT_RADIUS;\n}\n\nexport default {\n isColorKey,\n isLengthKey,\n isExpandKey,\n isGradientKey,\n isRadiusKey,\n};\n","import reset from '../style/reset';\nimport enums from '../util/enums';\n\nconst { DOM: RESET_DOM, GEOM: RESET_GEOM } = reset;\nconst { STYLE_KEY } = enums;\nconst {\n POINTER_EVENTS,\n COLOR,\n STROKE_WIDTH,\n FILL,\n STROKE_DASHARRAY,\n STROKE_LINECAP,\n STROKE_LINEJOIN,\n STROKE_MITERLIMIT,\n BACKGROUND_COLOR,\n BACKGROUND_IMAGE,\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n BACKGROUND_REPEAT,\n BACKGROUND_SIZE,\n STROKE,\n BORDER_BOTTOM_COLOR,\n BORDER_LEFT_COLOR,\n BORDER_RIGHT_COLOR,\n BORDER_TOP_COLOR,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n VISIBILITY,\n BOX_SHADOW,\n OVERFLOW,\n BACKGROUND_CLIP,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_OVER,\n TRANSLATE_PATH,\n} = STYLE_KEY;\n\nconst GEOM = {};\nconst GEOM_KEY_SET = [];\n\nlet o = {\n GEOM,\n GEOM_KEY_SET,\n addGeom(tagName, ks, cb) {\n if(Array.isArray(ks)) {\n ks.forEach(k => {\n o.addGeom(tagName, k, cb);\n });\n }\n else if(ks) {\n if(!GEOM.hasOwnProperty(ks)) {\n GEOM_KEY_SET.push(ks);\n }\n let hash = GEOM[ks] = GEOM[ks] || {};\n hash[tagName] = cb || true;\n }\n },\n isIgnore(k) {\n return k === POINTER_EVENTS || k === TRANSLATE_PATH;\n },\n isGeom(tagName, k) {\n return tagName && k && GEOM.hasOwnProperty(k) && GEOM[k].hasOwnProperty(tagName);\n },\n isRepaint(k, tagName) {\n return k === COLOR || k === STROKE_WIDTH || k === FILL || k === STROKE_DASHARRAY || k === STROKE_LINECAP\n || k === STROKE_LINEJOIN || k === STROKE_MITERLIMIT || k === BACKGROUND_COLOR || k === BACKGROUND_IMAGE\n || k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y || k === BACKGROUND_REPEAT\n || k === BACKGROUND_SIZE || k === STROKE || k === BORDER_BOTTOM_COLOR || k === BORDER_LEFT_COLOR\n || k === BORDER_BOTTOM_COLOR || k === BORDER_RIGHT_COLOR || k === BORDER_TOP_COLOR\n || k === BORDER_TOP_LEFT_RADIUS || k === BORDER_TOP_RIGHT_RADIUS || k === BORDER_BOTTOM_RIGHT_RADIUS\n || k === BORDER_BOTTOM_LEFT_RADIUS || k === VISIBILITY || k === BOX_SHADOW || k === OVERFLOW\n || k === BACKGROUND_CLIP || k === TEXT_STROKE_WIDTH || k === TEXT_STROKE_COLOR || k === TEXT_STROKE_OVER\n || o.isGeom(tagName, k);\n },\n isValid(tagName, k) {\n if(!k) {\n return false;\n }\n if(RESET_DOM.hasOwnProperty(k)) {\n return true;\n }\n // geom的fill等矢量才有的样式\n if(tagName.charAt(0) === '$' && RESET_GEOM.hasOwnProperty(k)) {\n return true;\n }\n if(GEOM.hasOwnProperty(k)) {\n return GEOM[k].hasOwnProperty(tagName);\n }\n if(k === 'translatePath') {\n return true;\n }\n return false;\n },\n};\n\no.addGeom('$line', ['xa', 'ya', 'xb', 'yb', 'controlA', 'controlB', 'start', 'end']);\no.addGeom('$circle', ['r']);\no.addGeom('$ellipse', ['rx', 'ry']);\no.addGeom('$rect', ['rx', 'ry']);\no.addGeom('$sector', ['begin', 'end', 'edge', 'closure']);\no.addGeom('$polyline', ['points', 'controls', 'start', 'end']);\no.addGeom('$polygon', ['points', 'controls', 'start', 'end', 'booleanOperations']);\n\nexport default o;\n","/**\n * https://www.w3.org/TR/2018/WD-filter-effects-1-20181218/#feGaussianBlurElement\n * 根据模糊参数sigma求卷积核尺寸\n * @param sigma\n * @returns {number}\n */\nfunction kernelSize(sigma) {\n if(sigma <= 0) {\n return 0;\n }\n let d = Math.floor(sigma * 3 * Math.sqrt(2 * Math.PI) / 4 + 0.5);\n if(d < 2) {\n d = 2;\n }\n if(d % 2 === 0) {\n d++;\n }\n return d;\n}\n\n/**\n * 根据sigma求模糊扩展尺寸,卷积核求得后为d,再求半径/2,然后因为算法要执行3次,所以*3\n * 比如本来d为5,半径2.5算上自身像素点则各方向扩展2,*3则扩展6\n * @param sigma\n * @returns {number}\n */\nfunction outerSize(sigma) {\n let d = kernelSize(sigma);\n return outerSizeByD(d);\n}\n\nfunction outerSizeByD(d) {\n return Math.floor(d * 0.5) * 3;\n}\n\n/**\n * 一维高斯正态分布,根据标准差和卷积核尺寸返回一维权重数组\n * @param sigma\n * @param d\n */\nfunction gaussianWeight(sigma, d) {\n let list = [];\n let len = Math.floor(d * 0.5);\n let total = 0;\n for(let i = len; i >= 0; i--) {\n let n = Math.pow(Math.E, -Math.pow(i, 2) / (2 * Math.pow(sigma, 2)))\n / (sigma * Math.sqrt(2 * Math.PI));\n list.push(n);\n total += n;\n }\n for(let i = 1; i <= len; i++) {\n let n = Math.pow(Math.E, -Math.pow(i, 2) / (2 * Math.pow(sigma, 2)))\n / (sigma * Math.sqrt(2 * Math.PI));\n list.push(n);\n total += n;\n }\n if(total !== 1) {\n for(let i = 0; i < d; i++) {\n list[i] /= total;\n }\n }\n return list;\n}\n\nexport default {\n kernelSize,\n outerSize,\n outerSizeByD,\n gaussianWeight,\n};\n","import unit from './unit';\nimport font from './font';\nimport reset from './reset';\nimport gradient from './gradient';\nimport reg from './reg';\nimport abbr from './abbr';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport key from '../animate/key';\nimport change from '../refresh/change';\nimport blur from '../math/blur';\n\nconst { STYLE_KEY, style2Upper, STYLE_KEY: {\n POSITION,\n WIDTH,\n HEIGHT,\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n SKEW_X,\n SKEW_Y,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n ROTATE_3D,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n TRANSFORM,\n TRANSFORM_ORIGIN,\n BACKGROUND_IMAGE,\n BACKGROUND_COLOR,\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n BACKGROUND_SIZE,\n OPACITY,\n Z_INDEX,\n COLOR,\n FONT_SIZE,\n FONT_FAMILY,\n FONT_WEIGHT,\n FONT_STYLE,\n LINE_HEIGHT,\n TEXT_ALIGN,\n FILTER,\n VISIBILITY,\n BOX_SHADOW,\n POINTER_EVENTS,\n FILL,\n STROKE,\n STROKE_WIDTH,\n STROKE_DASHARRAY,\n FLEX_BASIS,\n MATRIX,\n LETTER_SPACING,\n WHITE_SPACE,\n LINE_CLAMP,\n ORDER,\n TRANSLATE_PATH,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n WRITING_MODE,\n} } = enums;\nconst { AUTO, PX, PERCENT, NUMBER, INHERIT, DEG, RGBA, STRING, REM, VW, VH, VMAX, VMIN, GRADIENT, calUnit } = unit;\nconst { isNil, rgba2int, equalArr, equal, replaceRgba2Hex } = util;\nconst { isGeom, GEOM, GEOM_KEY_SET } = change;\nconst { VALID_STRING_VALUE } = reset;\n\nconst {\n isColorKey,\n isExpandKey,\n isLengthKey,\n isGradientKey,\n isRadiusKey,\n} = key;\n\nfunction isGradient(s) {\n if(reg.gradient.test(s)) {\n let gradient = reg.gradient.exec(s);\n if(gradient && ['linear', 'radial', 'conic'].indexOf(gradient[1]) > -1) {\n return true;\n }\n }\n}\n\nconst TRANSFORM_HASH = {\n translateX: TRANSLATE_X,\n translateY: TRANSLATE_Y,\n translateZ: TRANSLATE_Z,\n scaleX: SCALE_X,\n scaleY: SCALE_Y,\n scaleZ: SCALE_Z,\n skewX: SKEW_X,\n skewY: SKEW_Y,\n rotateX: ROTATE_X,\n rotateY: ROTATE_Y,\n rotateZ: ROTATE_Z,\n rotate: ROTATE_Z,\n};\n\nfunction compatibleTransform(k, arr) {\n if(k === SCALE_X || k === SCALE_Y || k === SCALE_Z) {\n arr.u = NUMBER;\n }\n else if(k === TRANSLATE_X || k === TRANSLATE_Y || k === TRANSLATE_Z) {\n if(arr.u === NUMBER) {\n arr.u = PX;\n }\n }\n else if(k === PERSPECTIVE) {\n if([NUMBER, PERCENT, DEG].indexOf(arr.u) > -1) {\n arr.u = PX;\n }\n }\n else {\n if(arr.u === NUMBER) {\n arr.u = DEG;\n }\n }\n}\n\nfunction camel(v) {\n if(isNil(v)) {\n v = '';\n }\n v = v.toString();\n //有-才转换,否则可能是写好的驼峰\n if(v.indexOf('-') > -1) {\n return v.toString().toLowerCase().replace(/-([a-z])/ig, function($0, $1) {\n return $1.toUpperCase();\n });\n }\n return v;\n}\n\nfunction convertStringValue(k, v) {\n v = camel(v);\n let list = VALID_STRING_VALUE[k];\n let i = list.indexOf(v);\n if(i > -1) {\n return list[i];\n }\n // 兜底默认\n return list[0];\n}\n\n/**\n * 将传入的手写style标准化,并且用resetList默认值覆盖其中为空的\n * @param style 手写的style样式\n * @param resetList 默认样式,可选\n * @returns Object 标准化的枚举数组结构样式\n */\nfunction normalize(style, resetList = []) {\n if(!util.isObject(style)) {\n return {};\n }\n let res = {};\n // style只有单层无需深度clone\n style = util.extend({}, style);\n // 缩写提前处理,因为reset里没有缩写\n let temp = style.border;\n if(temp) {\n abbr.toFull(style, 'border');\n }\n ['borderTop', 'borderRight', 'borderBottom', 'borderLeft'].forEach(k => {\n abbr.toFull(style, k);\n });\n temp = style.borderWidth;\n if(temp) {\n abbr.toFull(style, 'borderWidth');\n }\n temp = style.borderColor;\n if(temp) {\n abbr.toFull(style, 'borderColor');\n }\n temp = style.borderStyle;\n if(temp) {\n abbr.toFull(style, 'borderStyle');\n }\n temp = style.borderRadius;\n if(temp) {\n abbr.toFull(style, 'borderRadius');\n }\n temp = style.background;\n // 处理渐变背景缩写\n if(temp) {\n abbr.toFull(style, 'background');\n }\n // 背景位置\n temp = style.backgroundPosition;\n if(!isNil(temp)) {\n abbr.toFull(style, 'backgroundPosition');\n }\n // flex\n temp = style.flex;\n if(temp) {\n abbr.toFull(style, 'flex');\n }\n // flex-flow\n temp = style.flexFlow;\n if(temp) {\n abbr.toFull(style, 'flexFlow');\n }\n temp = style.margin;\n if(!isNil(temp)) {\n abbr.toFull(style, 'margin');\n }\n temp = style.padding;\n if(!isNil(temp)) {\n abbr.toFull(style, 'padding');\n }\n temp = style.textStroke;\n if(temp) {\n abbr.toFull(style, 'textStroke');\n }\n temp = style.rotate3d;\n if(temp) {\n abbr.toFull(style, 'rotate3d');\n }\n // 扩展css,将transform几个值拆分为独立的css为动画准备,同时不能使用transform\n ['translate', 'scale', 'skew', 'translate3d', 'scale3d', 'rotate'].forEach(k => {\n temp = style[k];\n if(!isNil(temp)) {\n abbr.toFull(style, k);\n }\n });\n // 扩展的不能和transform混用,给出警告\n [\n 'translateX',\n 'translateY',\n 'translateZ',\n 'scaleX',\n 'scaleY',\n 'scaleZ',\n 'skewX',\n 'skewY',\n 'rotateX',\n 'rotateY',\n 'rotateZ',\n 'rotate3d',\n ].forEach(k => {\n let v = style[k];\n if(v !== undefined && style.transform) {\n inject.warn(`Can not use expand style \"${k}\" with transform`);\n }\n });\n // 默认reset,根据传入不同,当style为空时覆盖\n resetList.forEach(item => {\n let { k, v } = item;\n if(isNil(style[k])) {\n style[k] = v;\n }\n });\n // 背景图\n temp = style.backgroundImage;\n if(temp !== undefined) {\n if(!temp) {\n res[BACKGROUND_IMAGE] = [];\n }\n else if(Array.isArray(temp)) {\n res[BACKGROUND_IMAGE] = temp.map(item => {\n if(!item) {\n return null;\n }\n if(isGradient(item)) {\n return {\n v: gradient.parseGradient(item),\n u: GRADIENT,\n };\n }\n if(reg.img.test(item)) {\n return {\n v: reg.img.exec(item)[2],\n u: STRING,\n };\n }\n return null;\n });\n }\n // 区分是渐变色还是图\n else if(isGradient(temp)) {\n res[BACKGROUND_IMAGE] = [{ v: gradient.parseGradient(temp), u: GRADIENT }];\n }\n else if(reg.img.test(temp)) {\n res[BACKGROUND_IMAGE] = [{ v: reg.img.exec(temp)[2], u: STRING }];\n }\n else {\n res[BACKGROUND_IMAGE] = [];\n }\n }\n temp = style.backgroundColor;\n if(temp !== undefined) {\n temp = temp || 'transparent';\n // 先赋值默认透明,后续操作有合法值覆盖\n let bgc = /^#[0-9a-f]{3,8}/i.exec(temp);\n if(bgc && [4, 7, 9].indexOf(bgc[0].length) > -1) {\n res[BACKGROUND_COLOR] = { v: rgba2int(bgc[0]), u: RGBA };\n }\n else {\n bgc = /rgba?\\s*\\(.+\\)/i.exec(temp);\n res[BACKGROUND_COLOR] = { v: rgba2int(bgc ? bgc[0] : [0, 0, 0, 0]), u: RGBA };\n }\n }\n ['backgroundPositionX', 'backgroundPositionY'].forEach((k, i) => {\n temp = style[k];\n if(temp !== undefined) {\n temp = temp || 0;\n k = i ? BACKGROUND_POSITION_Y : BACKGROUND_POSITION_X;\n if(!Array.isArray(temp)) {\n temp = [temp];\n }\n res[k] = temp.map(item => {\n if(/^[-+]?[\\d.]/.test(item)) {\n let v = calUnit(item);\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n return v;\n }\n else {\n return {\n v: {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[item] || 0,\n u: PERCENT,\n };\n }\n });\n }\n });\n // 背景尺寸\n temp = style.backgroundSize;\n if(temp !== undefined) {\n if(!Array.isArray(temp)) {\n temp = [temp];\n }\n res[BACKGROUND_SIZE] = temp.map(item => {\n if(!item) {\n return [\n { u: AUTO },\n { u: AUTO },\n ];\n }\n let match = item.toString().match(/\\b(?:([-+]?[\\d.]+[pxremvwhina%]*)|(contain|cover|auto))/ig);\n if(match) {\n if(match.length === 1) {\n if(match[0].toLowerCase() === 'contain' || match[0].toLowerCase() === 'cover') {\n match[1] = match[0].toLowerCase();\n }\n else {\n match[1] = 'auto';\n }\n }\n let v = [];\n for(let i = 0; i < 2; i++) {\n let item = match[i].toLowerCase();\n if(/^[-+]?[\\d.]/.test(item)) {\n let n = calUnit(item);\n if([NUMBER, DEG].indexOf(n.u) > -1) {\n n.u = PX;\n }\n v.push(n);\n }\n else if(item === 'contain' || item === 'cover') {\n v.push({ v: item, u: STRING });\n }\n else {\n v.push({ u: AUTO });\n }\n }\n return v;\n }\n else {\n return [\n { u: AUTO },\n { u: AUTO },\n ];\n }\n });\n }\n // border-color\n ['Top', 'Right', 'Bottom', 'Left'].forEach(k => {\n k = 'border' + k + 'Color';\n let v = style[k];\n if(v !== undefined) {\n res[STYLE_KEY[style2Upper(k)]] = { v: rgba2int(v || 'transparent'), u: RGBA };\n }\n });\n // border-radius\n ['TopLeft', 'TopRight', 'BottomRight', 'BottomLeft'].forEach(k => {\n k = 'border' + k + 'Radius';\n let v = style[k];\n if(v !== undefined) {\n v = v || 0;\n let arr = v.toString().split(/\\s+/);\n if(arr.length === 1) {\n arr[1] = arr[0];\n }\n for(let i = 0; i < 2; i++) {\n let item = arr[i];\n if(/^[-+]?[\\d.]/.test(item)) {\n let n = calUnit(item);\n if([NUMBER, DEG].indexOf(n.u) > -1) {\n n.u = PX;\n }\n if(n.v < 0) {\n n.v = 0;\n }\n arr[i] = n;\n }\n else {\n arr[i] = { u: 0, v: PX };\n }\n }\n res[STYLE_KEY[style2Upper(k)]] = arr;\n }\n });\n temp = style.transform;\n if(temp !== undefined) {\n let transform = res[TRANSFORM] = [];\n let match = (temp || '').toString().match(/\\w+\\(.+?\\)/g);\n if(match) {\n match.forEach(item => {\n let i = item.indexOf('(');\n let k = item.slice(0, i);\n let v = item.slice(i + 1, item.length - 1);\n if(k === 'matrix') {\n let arr = v.toString().split(/\\s*,\\s*/);\n arr = arr.map(item => parseFloat(item));\n if(arr.length > 6) {\n arr = arr.slice(0, 6);\n }\n if(arr.length === 6) {\n transform.push({ k: MATRIX, v: [\n arr[0], arr[1], 0, 0, arr[2], arr[3], 0, 0, 0, 0, 1, 0, arr[4], arr[5], 0, 1,\n ]});\n }\n }\n else if(k === 'matrix3d') {\n let arr = v.toString().split(/\\s*,\\s*/);\n arr = arr.map(item => parseFloat(item));\n if(arr.length > 16) {\n arr = arr.slice(0, 16);\n }\n if(arr.length === 16) {\n transform.push({ k: MATRIX, v: arr });\n }\n }\n else if(k === 'perspective') {\n let arr = calUnit(v);\n if(arr.v < 0) {\n arr.v = 0;\n }\n compatibleTransform(PERSPECTIVE, arr);\n transform.push({ k: PERSPECTIVE, v: arr });\n }\n else if(k === 'rotate3d') {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 4) {\n let deg = calUnit(arr[3]);\n compatibleTransform(ROTATE_3D, deg);\n arr[0] = parseFloat(arr[0].replace('(', ''));\n arr[1] = parseFloat(arr[1]);\n arr[2] = parseFloat(arr[2]);\n arr[3] = deg;\n transform.push({ k: ROTATE_3D, v: arr });\n }\n }\n else if(TRANSFORM_HASH.hasOwnProperty(k)) {\n let k2 = TRANSFORM_HASH[k];\n let arr = calUnit(v);\n compatibleTransform(k2, arr);\n transform.push({ k: k2, v: arr });\n }\n else if({ translate: true, scale: true, skew: true }.hasOwnProperty(k)) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[1] = k === 'scale' ? arr[0] : [0];\n }\n if(arr.length === 2) {\n let k1 = STYLE_KEY[style2Upper(k + 'X')];\n let k2 = STYLE_KEY[style2Upper(k + 'Y')];\n let arr1 = calUnit(arr[0]);\n let arr2 = calUnit(arr[1]);\n compatibleTransform(k1, arr1);\n compatibleTransform(k2, arr2);\n transform.push({ k: k1, v: arr1 });\n transform.push({ k: k2, v: arr2 });\n }\n }\n else if({ translate3d: true, scale3d: true }.hasOwnProperty(k)) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[1] = k === 'scale3d' ? [1] : [0];\n arr[2] = k === 'scale3d' ? [1] : [0];\n }\n else if(arr.length === 2) {\n arr[2] = k === 'scale3d' ? [1] : [0];\n }\n if(arr.length === 3) {\n let k1 = STYLE_KEY[style2Upper(k + 'X')];\n let k2 = STYLE_KEY[style2Upper(k + 'Y')];\n let k3 = STYLE_KEY[style2Upper(k + 'Z')];\n let arr1 = calUnit(arr[0]);\n let arr2 = calUnit(arr[1]);\n let arr3 = calUnit(arr[2]);\n compatibleTransform(k1, arr1);\n compatibleTransform(k2, arr2);\n compatibleTransform(k3, arr3);\n transform.push({ k: k1, v: arr1 });\n transform.push({ k: k2, v: arr2 });\n transform.push({ k: k3, v: arr3 });\n }\n }\n });\n }\n }\n temp = style.perspective;\n if(temp !== undefined) {\n let arr = calUnit(temp || 0);\n if(arr.v < 0) {\n arr.v = 0;\n }\n compatibleTransform(PERSPECTIVE, arr);\n res[PERSPECTIVE] = arr;\n }\n ['perspectiveOrigin', 'transformOrigin'].forEach(k => {\n temp = style[k];\n if(temp !== undefined) {\n if(temp === null) {\n temp = '';\n }\n let arr = res[STYLE_KEY[style2Upper(k)]] = [];\n let match = temp.toString().match(reg.position);\n if(match) {\n if(match.length === 1) {\n match[1] = match[0];\n }\n for(let i = 0; i < 2; i++) {\n let item = match[i];\n if(/^[-+]?[\\d.]/.test(item)) {\n let n = calUnit(item);\n if([NUMBER, DEG].indexOf(n.u) > -1) {\n n.u = PX;\n }\n arr.push(n);\n }\n else {\n arr.push({\n v: {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[item],\n u: PERCENT,\n });\n // 不规范的写法变默认值50%\n if(isNil(arr[i].v)) {\n arr[i].v = 50;\n }\n }\n }\n }\n else {\n arr.push({ v: 50, u: PERCENT });\n arr.push({ v: 50, u: PERCENT });\n }\n }\n });\n [\n 'translateX',\n 'translateY',\n 'translateZ',\n 'scaleX',\n 'scaleY',\n 'scaleZ',\n 'skewX',\n 'skewY',\n 'rotateX',\n 'rotateY',\n 'rotateZ',\n 'rotate',\n ].forEach(k => {\n let v = style[k];\n if(v === undefined) {\n return;\n }\n if(v === null) {\n if(k.indexOf('scale') === 0) {\n v = 1;\n }\n else {\n v = 0;\n }\n }\n let k2 = TRANSFORM_HASH[k];\n let n = calUnit(v);\n // 没有单位或默认值处理单位\n compatibleTransform(k2, n);\n res[k2] = n;\n });\n temp = style.rotate3d;\n if(temp !== undefined) {\n let arr = (temp || '').toString().split(/\\s*,\\s*/);\n if(arr.length === 4) {\n let deg = calUnit(arr[3]);\n compatibleTransform(ROTATE_3D, deg);\n arr[0] = parseFloat(arr[0].replace('(', ''));\n arr[1] = parseFloat(arr[1]);\n arr[2] = parseFloat(arr[2]);\n arr[3] = deg;\n }\n res[ROTATE_3D] = arr;\n }\n temp = style.opacity;\n if(temp !== undefined) {\n if(temp === null) {\n temp = 1;\n }\n temp = parseFloat(temp);\n if(!isNaN(temp)) {\n temp = Math.max(temp, 0);\n temp = Math.min(temp, 1);\n res[OPACITY] = temp;\n }\n else {\n res[OPACITY] = 1;\n }\n }\n temp = style.zIndex;\n if(temp !== undefined) {\n res[Z_INDEX] = parseInt(temp) || 0;\n }\n // 转化不同单位值为对象标准化,不写单位的变成number单位转化为px\n [\n 'marginTop',\n 'marginRight',\n 'marginBottom',\n 'marginLeft',\n 'paddingTop',\n 'paddingRight',\n 'paddingBottom',\n 'paddingLeft',\n 'borderTopWidth',\n 'borderRightWidth',\n 'borderBottomWidth',\n 'borderLeftWidth',\n 'top',\n 'right',\n 'bottom',\n 'left',\n 'width',\n 'height',\n ].forEach(k => {\n let v = style[k];\n if(v === undefined) {\n return;\n }\n if(v === 'auto') {\n v = { v: 0, u: AUTO };\n }\n else {\n v = calUnit(v || 0);\n // 无单位视为px\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n }\n let k2 = STYLE_KEY[style2Upper(k)];\n res[k2] = v;\n // 限制padding/border为正数\n if({\n paddingTop: true,\n paddingRight: true,\n paddingBottom: true,\n paddingLeft: true,\n borderTopWidth: true,\n borderRightWidth: true,\n borderBottomWidth: true,\n borderLeftWidth: true,\n width: true,\n height: true,\n }.hasOwnProperty(k) && v.v < 0) {\n v.v = 0;\n }\n });\n temp = style.flexBasis;\n if(temp !== undefined) {\n if(/content/i.test(temp)) {\n res[FLEX_BASIS] = { v: temp.toLowerCase(), u: STRING };\n }\n else if(/^[\\d.]/.test(temp)) {\n let v = res[FLEX_BASIS] = calUnit(temp);\n v.v = Math.max(v.v, 0);\n // 无单位视为px\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n }\n else {\n res[FLEX_BASIS] = { v: 0, u: AUTO };\n }\n }\n temp = style.order;\n if(temp !== undefined) {\n res[ORDER] = parseInt(temp) || 0;\n }\n temp = style.color;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[COLOR] = { u: INHERIT };\n }\n else if(isGradient(temp)) {\n res[COLOR] = { v: gradient.parseGradient(temp), u: GRADIENT };\n }\n else {\n res[COLOR] = { v: rgba2int(temp), u: RGBA };\n }\n }\n temp = style.textStrokeColor;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[TEXT_STROKE_COLOR] = { u: INHERIT };\n }\n else if(isGradient(temp)) {\n res[TEXT_STROKE_COLOR] = { v: gradient.parseGradient(temp), u: GRADIENT };\n }\n else {\n res[TEXT_STROKE_COLOR] = { v: rgba2int(temp), u: RGBA };\n }\n }\n temp = style.fontSize;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[FONT_SIZE] = { u: INHERIT };\n }\n else {\n let v = calUnit(temp);\n // fontSize不能为负数,否则为继承\n if(v < 0) {\n res[FONT_SIZE] = { u: INHERIT };\n }\n else {\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n res[FONT_SIZE] = v;\n }\n }\n }\n temp = style.textStrokeWidth;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[TEXT_STROKE_WIDTH] = { u: INHERIT };\n }\n else {\n let v = calUnit(temp);\n // textStrokeWidth不能为负数,否则为继承\n if(v < 0) {\n res[TEXT_STROKE_WIDTH] = { u: INHERIT };\n }\n else {\n if([NUMBER, DEG, PERCENT].indexOf(v.u) > -1) {\n v.u = PX;\n }\n res[TEXT_STROKE_WIDTH] = v;\n }\n }\n }\n temp = style.textStrokeOver;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[TEXT_STROKE_OVER] = { u: INHERIT };\n }\n else {\n let v = reset.INHERIT.textStrokeOver;\n if(/fill/i.test(temp)) {\n v = 'fill';\n }\n res[TEXT_STROKE_OVER] = { v, u: STRING };\n }\n }\n temp = style.fontWeight;\n if(temp !== undefined) {\n if(/bold/i.test(temp)) {\n res[FONT_WEIGHT] = { v: 700, u: NUMBER };\n }\n else if(/normal/i.test(temp)) {\n res[FONT_WEIGHT] = { v: 400, u: NUMBER };\n }\n else if(/lighter/i.test(temp)) {\n res[FONT_WEIGHT] = { v: 200, u: NUMBER };\n }\n else if(/inherit/i.test(temp)) {\n res[FONT_WEIGHT] = { u: INHERIT };\n }\n else {\n res[FONT_WEIGHT] = { v: Math.max(0, parseInt(temp)) || 400, u: NUMBER };\n }\n }\n temp = style.fontStyle;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[FONT_STYLE] = { u: INHERIT };\n }\n else {\n let v = reset.INHERIT.fontStyle;\n if(/italic/i.test(temp)) {\n v = 'italic';\n }\n else if(/oblique/i.test(temp)) {\n v = 'oblique';\n }\n res[FONT_STYLE] = { v, u: STRING };\n }\n }\n temp = style.fontFamily;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[FONT_FAMILY] = { u: INHERIT };\n }\n else {\n // 统一文字声明格式\n res[FONT_FAMILY] = { v: temp.toString().toLowerCase()\n .replace(/['\"]/, '')\n .replace(/\\s*,\\s*/g, ','), u: STRING };\n }\n }\n temp = style.writingMode;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[WRITING_MODE] = { u: INHERIT };\n }\n else {\n let v = reset.INHERIT.writingMode;\n if(/vertical-?rl/i.test(temp)) {\n v = 'verticalRl';\n }\n else if(/vertical-?lr/i.test(temp)) {\n v = 'verticalLr';\n }\n res[WRITING_MODE] = { v, u: STRING };\n }\n }\n temp = style.textAlign;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[TEXT_ALIGN] = { u: INHERIT };\n }\n else {\n let v = 'left';\n if(/center/i.test(temp)) {\n v = 'center';\n }\n else if(/right/i.test(temp)) {\n v = 'right';\n }\n res[TEXT_ALIGN] = { v, u: STRING };\n }\n }\n temp = style.lineHeight;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[LINE_HEIGHT] = { u: INHERIT };\n }\n else if(/normal/i.test(temp)) {\n res[LINE_HEIGHT] = { u: AUTO };\n }\n // lineHeight默认数字,想要px必须强制带单位\n else if(/^[\\d.]+/i.test(temp)) {\n let v = calUnit(temp);\n if([DEG].indexOf(v.u) > -1) {\n v.u = NUMBER;\n }\n res[LINE_HEIGHT] = v;\n }\n else {\n let n = Math.max(0, parseFloat(temp)) || 'normal';\n // 非法数字\n if(n === 'normal') {\n res[LINE_HEIGHT] = { u: AUTO };\n }\n else {\n res[LINE_HEIGHT] = { v: n, u: NUMBER };\n }\n }\n }\n temp = style.letterSpacing;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[LETTER_SPACING] = { u: INHERIT };\n }\n else if(/normal/i.test(temp)) {\n res[LETTER_SPACING] = { v: 0, u: PX };\n }\n else if(/^[-+]?[\\d.]/.test(temp)) {\n let v = calUnit(temp);\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n res[LETTER_SPACING] = v;\n }\n else {\n res[LETTER_SPACING] = { v: parseFloat(temp) || 0, u: PX };\n }\n }\n temp = style.whiteSpace;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[WHITE_SPACE] = { u: INHERIT };\n }\n else {\n res[WHITE_SPACE] = { v: temp, u: STRING };\n }\n }\n temp = style.lineClamp;\n if(temp !== undefined) {\n temp = parseInt(temp) || 0;\n res[LINE_CLAMP] = Math.max(0, temp);\n }\n // fill和stroke为渐变时特殊处理,fillRule无需处理字符串\n ['fill', 'stroke'].forEach((k, i) => {\n temp = style[k];\n if(temp !== undefined) {\n k = i ? STROKE : FILL;\n if(!Array.isArray(temp)) {\n temp = [temp];\n }\n res[k] = temp.map(item => {\n if(!item) {\n return { v: 'none', u: STRING };\n }\n else if(isGradient(item)) {\n return { v: gradient.parseGradient(item), u: GRADIENT };\n }\n else {\n return { v: rgba2int(item), u: RGBA };\n }\n });\n }\n });\n temp = style.strokeWidth;\n if(temp !== undefined) {\n if(!Array.isArray(temp)) {\n temp = [temp];\n }\n res[STROKE_WIDTH] = temp.map(item => {\n let v = calUnit(item);\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n v.v = Math.max(v.v, 0);\n return v;\n });\n }\n temp = style.strokeDasharray;\n if(temp !== undefined) {\n if(Array.isArray(temp)) {\n res[STROKE_DASHARRAY] = temp.map(item => {\n let match = (item || '').toString().match(/[\\d.]+/g);\n if(match) {\n match = match.map(item => parseFloat(item));\n if(match.length % 2 === 1) {\n match.push(match[match.length - 1]);\n }\n return match;\n }\n return [];\n });\n }\n else {\n let match = (temp || '').toString().match(/[\\d.]+/g);\n if(match) {\n match = match.map(item => parseFloat(item));\n if(match.length % 2 === 1) {\n match.push(match[match.length - 1]);\n }\n res[STROKE_DASHARRAY] = [match];\n }\n else {\n res[STROKE_DASHARRAY] = [[]];\n }\n }\n }\n // filter支持数组形式\n temp = style.filter;\n if(temp !== undefined) {\n let f = [];\n // 先替换掉rgba为#RGBA格式,然后分割\n let arr;\n if(Array.isArray(temp)) {\n arr = temp.map(item => {\n return (replaceRgba2Hex(item) || '').match(/[\\w-]+\\s*\\(.+?\\)/ig);\n });\n }\n else {\n arr = (replaceRgba2Hex(temp) || '').match(/[\\w-]+\\s*\\(.+?\\)/ig);\n }\n if(arr) {\n arr.forEach(item => {\n let match = /([\\w-]+)\\s*\\((\\s*.+\\s*)\\)/i.exec(item);\n if(match) {\n let k = match[1].toLowerCase(), v = match[2];\n if(k === 'drop-shadow' || k === 'dropshadow') {\n let coords = /([-+]?[\\d.]+[pxremvwhina%]*)[\\s,]+([-+]?[\\d.]+[pxremvwhina%]*)[\\s,]+(?:([-+]?[\\d.]+[pxremvwhina%]*)[\\s,])?([-+]?[\\d.]+[pxremvwhina%]*\\s*)?/ig.exec(item);\n if(coords) {\n let res = [];\n // v,h,blur,spread,其中v和h是必须,其余没有为0\n for(let i = 1; i <= 4; i++) {\n let item2 = coords[i];\n if(item2) {\n let v = calUnit(item2);\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n // x/y可以负,blur和spread不行\n if(i > 2 && v.v < 0) {\n v.v = 0;\n }\n res.push(v);\n }\n else {\n res.push({ v: 0, u: PX });\n }\n }\n let color = /#[a-f\\d]{3,8}/i.exec(item);\n if(color) {\n res.push(rgba2int(color[0]));\n }\n else {\n res.push([0, 0, 0, 1]);\n }\n f.push({ k: 'dropShadow', v: res });\n }\n }\n else {\n let m2 = /([-+]?[\\d.]+\\s*[pxremvwhdg%]*)/i.exec(v);\n if(m2) {\n let v = calUnit(m2[0]);\n if(k === 'blur') {\n if([DEG, PERCENT].indexOf(v.u) > -1) {\n return;\n }\n if(v.u === NUMBER) {\n v.u = PX;\n }\n v.v = Math.max(v.v, 0);\n f.push({ k, v });\n }\n else if(k === 'hue-rotate' || k === 'huerotate') {\n if([NUMBER, DEG].indexOf(v.u) === -1) {\n return;\n }\n v.u = DEG;\n f.push({ k:'hueRotate', v });\n }\n else if(k === 'saturate' || k === 'brightness' || k === 'grayscale' || k === 'contrast' || k === 'sepia' || k === 'invert') {\n if([NUMBER, PERCENT].indexOf(v.u) === -1) {\n return;\n }\n v.v = Math.max(v.v, 0);\n v.u = PERCENT;\n f.push({ k, v });\n }\n }\n }\n }\n });\n }\n res[FILTER] = f;\n }\n temp = style.visibility;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[VISIBILITY] = { u: INHERIT };\n }\n else {\n let v = reset.INHERIT.visibility;\n if(/hidden/i.test(temp)) {\n v = 'hidden';\n }\n res[VISIBILITY] = { v, u: STRING };\n }\n }\n temp = style.pointerEvents;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[POINTER_EVENTS] = { u: INHERIT };\n }\n else {\n let v = reset.INHERIT.pointerEvents;\n if(/none/i.test(temp)) {\n v = 'none';\n }\n res[POINTER_EVENTS] = { v, u: STRING };\n }\n }\n temp = style.boxShadow;\n if(temp !== undefined) {\n let bs = [];\n // 先替换掉rgba为#RGBA格式,然后按逗号分割\n let arr = (replaceRgba2Hex(temp) || '').split(',');\n if(arr) {\n arr.forEach(item => {\n let coords = /([-+]?[\\d.]+[pxremvwhina%]*)\\s*([-+]?[\\d.]+[pxremvwhina%]*)\\s*([-+]?[\\d.]+[pxremvwhina%]*\\s*)?([-+]?[\\d.]+[pxremvwhina%]*\\s*)?/i.exec(item);\n if(coords) {\n let res = [];\n // v,h,blur,spread,其中v和h是必须,其余没有为0\n for(let i = 1; i <= 4; i++) {\n let item2 = coords[i];\n if(item2) {\n let v = calUnit(item2);\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n // x/y可以负,blur和spread不行\n if(i > 2 && v.v < 0) {\n v.v = 0;\n }\n res.push(v);\n }\n else {\n res.push({ v: 0, u: PX });\n }\n }\n let color = /#[a-f\\d]{3,8}/i.exec(item);\n if(color) {\n res.push(rgba2int(color[0]));\n }\n else {\n res.push([0, 0, 0, 1]);\n }\n res.push(/inset/i.test(item) ? 'inset' : 'outset');\n bs.push(res);\n }\n });\n }\n res[BOX_SHADOW] = bs;\n }\n // 直接赋值的string类型\n [\n 'position',\n 'display',\n 'flexDirection',\n 'flexWrap',\n 'justifyContent',\n 'alignItems',\n 'alignSelf',\n 'alignContent',\n 'overflow',\n 'mixBlendMode',\n 'borderTopStyle',\n 'borderRightStyle',\n 'borderBottomStyle',\n 'borderLeftStyle',\n 'backgroundClip',\n 'textOverflow',\n 'transformStyle',\n 'backfaceVisibility',\n ].forEach(k => {\n if(style.hasOwnProperty(k)) {\n res[STYLE_KEY[style2Upper(k)]] = convertStringValue(k, style[k]);\n }\n });\n // 直接赋值的number类型\n [\n 'flexGrow',\n 'flexShrink',\n ].forEach(k => {\n if(style.hasOwnProperty(k)) {\n res[STYLE_KEY[style2Upper(k)]] = Math.max(parseFloat(style[k]) || 0, 0);\n }\n });\n temp = style.zIndex;\n if(temp !== undefined) {\n res[Z_INDEX] = parseFloat(temp) || 0;\n }\n // 这些支持多个的用数组表示\n [\n 'backgroundRepeat',\n 'strokeLinecap',\n 'strokeLinejoin',\n 'strokeMiterlimit',\n 'fillRule',\n ].forEach(k => {\n if(style.hasOwnProperty(k)) {\n let v = style[k];\n if(!Array.isArray(v)) {\n v = [v];\n }\n if(k === 'backgroundRepeat') {\n v.forEach((item, i) => {\n if(item) {\n v[i] = camel(item);\n }\n });\n }\n res[STYLE_KEY[style2Upper(k)]] = v;\n }\n });\n GEOM_KEY_SET.forEach(k => {\n if(style.hasOwnProperty(k)) {\n res[k] = style[k];\n }\n });\n return res;\n}\n\nfunction setFontStyle(style) {\n let fontSize = style[FONT_SIZE] || 0;\n let fontFamily = style[FONT_FAMILY] || inject.defaultFontFamily || 'arial';\n if(/\\s/.test(fontFamily)) {\n fontFamily = '\"' + fontFamily.replace(/\"/g, '\\\\\"') + '\"';\n }\n return (style[FONT_STYLE] || 'normal') + ' ' + (style[FONT_WEIGHT] || '400') + ' '\n + fontSize + 'px/' + fontSize + 'px ' + fontFamily;\n}\n\n/**\n * https://zhuanlan.zhihu.com/p/25808995\n * 根据字形信息计算baseline的正确值,差值上下均分\n * @param style computedStyle\n * @returns {number}\n */\nfunction getBaseline(style) {\n let fontSize = style[FONT_SIZE];\n let ff = calFontFamily(style[FONT_FAMILY]);\n let normal = calNormalLineHeight(style, ff);\n return (style[LINE_HEIGHT] - normal) * 0.5 + fontSize * (font.info[ff] || font.info[inject.defaultFontFamily] || font.info.arial).blr;\n}\n\n// 垂直排版的baseline和水平类似,只是原点坐标系不同,删除加本身高度变为加gap高度\nfunction getVerticalBaseline(style) {\n return style[LINE_HEIGHT] - getBaseline(style);\n}\n\nfunction calNormalLineHeight(style, ff) {\n if(!ff) {\n ff = calFontFamily(style[FONT_FAMILY]);\n }\n return style[FONT_SIZE] * (font.info[ff] || font.info[inject.defaultFontFamily] || font.info.arial).lhr;\n}\n\nfunction calFontFamily(fontFamily) {\n let ff = fontFamily.split(/\\s*,\\s*/);\n for(let i = 0, len = ff.length; i < len; i++) {\n let item = ff[i].replace(/^['\"]/, '').replace(/['\"]$/, '');\n if(font.hasLoaded(item) || inject.checkSupportFontFamily(item)) {\n return item;\n }\n }\n return inject.defaultFontFamily;\n}\n\nfunction calRelativePercent(n, parent, k) {\n n *= 0.01;\n while(parent) {\n let style = parent.currentStyle[k];\n if(style.u === AUTO) {\n if(k === WIDTH) {\n parent = parent.domParent;\n }\n else {\n break;\n }\n }\n else if(style.u === PX) {\n return n * style.v;\n }\n else if(style.u === PERCENT) {\n n *= style.v * 0.01;\n parent = parent.domParent;\n }\n else if(style.u === REM) {\n return n * style.v * parent.root.computedStyle[FONT_SIZE];\n }\n else if(style.u === VW) {\n return n * style.v * parent.root.width * 0.01;\n }\n else if(style.u === VH) {\n return n * style.v * parent.root.height * 0.01;\n }\n else if(style.u === VMAX) {\n return n * style.v * Math.max(parent.root.width, parent.root.height) * 0.01;\n }\n else if(style.u === VMIN) {\n return n * style.v * Math.min(parent.root.width, parent.root.height) * 0.01;\n }\n }\n return n;\n}\n\nfunction calRelative(currentStyle, k, v, parent, isWidth) {\n if(v.u === AUTO) {\n v = 0;\n }\n else if([PX, NUMBER].indexOf(v.u) > -1) {\n v = v.v;\n }\n else if(v.u === PERCENT) {\n if(isWidth) {\n v = calRelativePercent(v.v, parent, WIDTH);\n }\n else {\n v = calRelativePercent(v.v, parent, HEIGHT);\n }\n }\n else if(v.u === REM) {\n v = v.v * parent.root.computedStyle[FONT_SIZE];\n }\n else if(v.u === VW) {\n v = v.v * parent.root.width * 0.01;\n }\n else if(v.u === VH) {\n v = v.v * parent.root.height * 0.01;\n }\n else if(v.u === VMAX) {\n v = v.v * Math.max(parent.root.width, parent.root.height) * 0.01;\n }\n else if(v.u === VMIN) {\n v = v.v * Math.min(parent.root.width, parent.root.height) * 0.01;\n }\n return v;\n}\n\nfunction isRelativeOrAbsolute(node) {\n let position = node.currentStyle[POSITION];\n return position === 'relative' || position === 'absolute';\n}\n\nfunction equalStyle(k, a, b, target) {\n if(!a || !b) {\n return a === b;\n }\n if(k === TRANSFORM) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let oa = a[i];\n let ob = b[i];\n if(oa.k !== ob.k) {\n return false;\n }\n let av = oa.v, bv = ob.v;\n if(oa.k === MATRIX) {\n if(!equalArr(av, bv)) {\n return false;\n }\n }\n else if(av.u !== bv.u || av.v !== bv.v) {\n return false;\n }\n }\n return true;\n }\n if(k === ROTATE_3D) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3].v === b[3].v && a[3].u === b[3].u;\n }\n if(k === FILTER) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let oa = a[i];\n let ob = b[i];\n if(oa.k !== ob.k) {\n return false;\n }\n let av = oa.v, bv = ob.v;\n if(oa.k === 'dropShadow' || oa.k === 'drop-shadow') {\n if(av.length !== bv.length) {\n return false;\n }\n for(let j = 0; j < 4; j++) {\n let avj = av[j], bvj = bv[j];\n if(avj.u !== bvj.u || avj.v !== bvj.v) {\n return false;\n }\n }\n }\n else if(av.u !== bv.u || av.v !== bv.v) {\n return false;\n }\n }\n return true;\n }\n if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN || isRadiusKey(k)) {\n return a[0].v === b[0].v && a[0].u === b[0].u\n && a[1].v === b[1].v && a[1].u === b[1].u;\n }\n if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y || k === STROKE_WIDTH) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let aa = a[i], bb = b[i];\n if(aa.v !== bb.v || aa.u !== bb.u || aa.v !== bb.v || aa.u !== bb.u) {\n return false;\n }\n }\n return true;\n }\n if(k === BOX_SHADOW) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let aa = a[i], bb = b[i];\n if((!aa || !bb) && aa !== bb) {\n return false;\n }\n for(let j = 0; j < 4; j++) {\n if(aa[j].v !== bb[j].v || aa[j].u !== bb[j].u) {\n return false;\n }\n }\n for(let j = 0; j < 4; j++) {\n if(aa[4][j] !== bb[4][j]) {\n return false;\n }\n }\n if(aa[5] !== bb[5]) {\n return false;\n }\n }\n return true;\n }\n if(k === BACKGROUND_SIZE || k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let aa = a[i], bb = b[i];\n if(aa[0].v !== bb[0].v || aa[0].u !== bb[0].u || aa[1].v !== bb[1].v || aa[1].u !== bb[1].u) {\n return false;\n }\n }\n return true;\n }\n // if(k === OPACITY || k === Z_INDEX) {} 原始数字无需判断\n if(isLengthKey(k) || isExpandKey(k)) {\n return a.v === b.v && a.u === b.u;\n }\n if(isGradientKey(k)) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let ai = a[i], bi = b[i];\n if(ai.u !== bi.u) {\n return false;\n }\n let av = ai.v, bv = bi.v;\n if(ai.u === GRADIENT) {\n if(av.k !== bv.k || av.d !== bv.d || av.s !== bv.s || av.z !== bv.z) {\n return false;\n }\n if(av.k === 'linear') {\n let ad = av.d, bd = bv.d;\n let isArrayD1 = Array.isArray(ad);\n let isArrayD2 = Array.isArray(bd);\n if(isArrayD1 !== isArrayD2) {\n return false;\n }\n if(isArrayD1) {\n if(ad[0] !== bd[0] || ad[1] !== bd[1] || ad[2] !== bd[2] || ad[3] !== bd[3]) {\n return false;\n }\n }\n else if(ad !== bd) {\n return false;\n }\n }\n else if(av.k === 'conic' && av.d !== bv.d) {\n return false;\n }\n if(av.k === 'radial' || av.k === 'conic') {\n let ap = av.p, bp = bv.p;\n if(ap[0].u !== bp[0].u || ap[0].v !== bp[0].v || ap[1].u !== bp[1].u || ap[1].v !== bp[1].v) {\n return false;\n }\n }\n for(let j = 0; j < 2; j++) {\n let aj = av.v[j], bj = bv.v[j];\n let ac = aj[0], bc = bj[0];\n if(ac[0] !== bc[0] || ac[1] !== bc[1] || ac[2] !== bc[2] || ac[3] !== bc[3]) {\n return false;\n }\n if(aj[1] && bj[1]) {\n if(aj[1].u !== bj[1].u || aj[1].v !== bj[1].v) {\n return false;\n }\n }\n else if(aj[1] || bj[1]) {\n return false;\n }\n }\n }\n else if(ai.u === RGBA) {\n if(!equalArr(av, bv)) {\n return false;\n }\n }\n else if(av !== bv) {\n return false;\n }\n }\n return true;\n }\n if(isColorKey(k)) {\n if(a.u !== b.u) {\n return false;\n }\n if(a.u === GRADIENT) {\n return equal(a.v, b.v);\n }\n else if(a.u === INHERIT) {\n return true;\n }\n else if(a.u === RGBA) {\n return equalArr(a.v, b.v);\n }\n }\n // multi都是纯值数组,equalArr本身即递归,非multi根据类型判断\n if(isGeom(target.tagName, k) && (target.isMulti || Array.isArray(a) && Array.isArray(b))) {\n return equal(a, b);\n }\n return a === b;\n}\n\nfunction cloneStyle(style, keys) {\n if(!keys) {\n keys = Object.keys(style).map(i => {\n if(!GEOM.hasOwnProperty(i)) {\n i = parseInt(i);\n }\n return i;\n });\n }\n let res = {};\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n let v = style[k];\n if(k === TRANSFORM) {\n if(v) {\n let len = v.length;\n let n = new Array(len);\n for(let i = 0; i < len; i++) {\n let o = v[i];\n if(o.k === MATRIX) {\n n[i] = {\n k: o.k,\n v: o.v.slice(0),\n };\n }\n else {\n n[i] = {\n k: o.k,\n v: {\n v: o.v.v,\n u: o.v.u,\n },\n };\n }\n }\n res[k] = n;\n }\n }\n else if(k === ROTATE_3D) {\n res[k] = [v[0], v[1], v[2], { v: v[3].v, u: v[3].u }];\n }\n else if(k === FILTER) {\n if(v) {\n let len = v.length;\n let n = new Array(len);\n for(let i = 0; i < len; i++) {\n let o = v[i];\n let k = o.k, vv = o.v;\n if(k === 'dropShadow') {\n let arr = new Array(5);\n n[i] = { k, v: arr };\n for(let j = 0; j < 4; j++) {\n let temp = vv[j];\n arr[j] = { v: temp.v, u: temp.u };\n }\n arr[4] = vv[4].slice(0);\n }\n else {\n n[i] = {k, v: { v: vv.v, u: vv.u }};\n }\n }\n res[k] = n;\n }\n }\n else if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN || isRadiusKey(k)) {\n if(v) {\n let n = new Array(2);\n for(let i = 0; i < 2; i++) {\n let o = v[i];\n n[i] = { v: o.v, u: o.u };\n }\n res[k] = n;\n }\n }\n else if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y || k === STROKE_WIDTH) {\n res[k] = v.map(item => ({ v: item.v, u: item.u }));\n }\n else if(k === BOX_SHADOW) {\n if(v) {\n v = v.map(item => {\n let n = new Array(6);\n for(let i = 0; i < 4; i++) {\n let o = item[i];\n n[i] = { v: o.v, u: o.u }; // x/y/blur/spread\n }\n n[4] = item[4].slice(0); //rgba\n n[5] = item[5]; // outset/inset\n return n;\n });\n res[k] = v;\n }\n }\n else if(k === BACKGROUND_SIZE) {\n if(v) {\n res[k] = v.map(item => {\n return [\n { v: item[0].v, u: item[0].u },\n { v: item[1].v, u: item[1].u },\n ];\n });\n }\n }\n else if(k === OPACITY || k === Z_INDEX) {\n res[k] = v;\n }\n else if(k === TRANSLATE_PATH) {\n if(v) {\n res[k] = v.map(item => ({\n v: item.v,\n u: item.u,\n }));\n }\n }\n else if(isLengthKey(k) || isExpandKey(k)) {\n res[k] = { v: v.v, u: v.u };\n }\n // 渐变特殊处理\n else if(isGradientKey(k)) {\n res[k] = v.map(item => {\n if(!item) {\n return null;\n }\n if(item.u === GRADIENT) {\n return { v: util.clone(item.v), u: GRADIENT };\n }\n // 颜色\n else if(item.u === RGBA) {\n return { v: item.v.slice(0), u: RGBA };\n }\n // string和none\n else {\n return { v: item.v, u: item.u };\n }\n });\n }\n else if(isColorKey(k)) {\n // 特殊增加支持有gradient的先判断,仅color和textStrokeColor支持\n if(v.u === GRADIENT) {\n res[k] = { v: util.clone(v.v), u: GRADIENT };\n }\n else if(v.u === RGBA) {\n res[k] = { v: v.v.slice(0), u: RGBA };\n }\n // inherit\n else {\n res[k] = { u: INHERIT };\n }\n }\n // geom自定义属性\n else if(GEOM.hasOwnProperty(k)) {\n res[k] = util.clone(v);\n }\n // position等直接值类型赋值\n else {\n res[k] = v;\n }\n }\n return res;\n}\n\nfunction spreadBoxShadow(bbox, boxShadow) {\n let [x1, y1, x2, y2] = bbox;\n if(Array.isArray(boxShadow)) {\n let xl = 0, yt = 0, xr = 0, yb = 0;\n boxShadow.forEach(item => {\n let [x, y, sigma, spread, color, inset] = item;\n if(inset !== 'inset' && color[3] > 0) {\n let d = blur.outerSize(sigma);\n d += spread;\n xl = Math.min(xl, x - d);\n yt = Math.min(yt, x - d);\n xr = Math.max(xr, x + d);\n yb = Math.max(yb, y + d);\n }\n });\n x1 += xl;\n y1 += yt;\n x2 += xr;\n y2 += yb;\n }\n return [x1, y1, x2, y2];\n}\n\nfunction spreadFilter(bbox, filter) {\n let [x1, y1, x2, y2] = bbox;\n // filter对整体有影响,且filter子项可以先后多次重复出现,上面计算完后,依次处理\n if(Array.isArray(filter)) {\n filter.forEach(item => {\n let { k, v } = item;\n if(k === 'blur' && v > 0) {\n let d = blur.kernelSize(v);\n let spread = blur.outerSizeByD(d);\n if(spread) {\n x1 -= spread;\n y1 -= spread;\n x2 += spread;\n y2 += spread;\n }\n }\n else if(k === 'dropShadow') {\n let d = blur.kernelSize(v[2]);\n let spread = blur.outerSizeByD(d);\n // x/y/blur,3个一起影响,要考虑正负号,spread一定为非负\n if(v[0] || v[1] || spread) {\n if(v[0] <= 0 || v[0] > 0 && v[0] < spread) {\n x1 += v[0] - spread;\n }\n if(v[1] <= 0 || v[1] > 0 && v[1] < spread) {\n y1 += v[1] - spread;\n }\n if(v[0] < 0 && -v[0] < spread || v[0] >= 0) {\n x2 += v[0] + spread;\n }\n if(v[1] < 0 && -v[1] < spread || v[1] >= 0) {\n y2 += v[1] + spread;\n }\n }\n }\n });\n }\n return [x1, y1, x2, y2];\n}\n\nexport default {\n normalize,\n setFontStyle,\n getBaseline,\n getVerticalBaseline,\n calRelative,\n equalStyle,\n isRelativeOrAbsolute,\n cloneStyle,\n calNormalLineHeight,\n calFontFamily,\n spreadBoxShadow,\n spreadFilter,\n};\n","import unit from '../style/unit';\nimport enums from '../util/enums';\nimport matrix from '../math/matrix';\nimport geom from '../math/geom';\n\nconst { STYLE_KEY: {\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n SKEW_X,\n SKEW_Y,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n ROTATE_3D,\n PERSPECTIVE,\n MATRIX,\n FONT_SIZE,\n}} = enums;\nconst { PX, PERCENT, REM, VW, VH, VMAX, VMIN } = unit;\nconst { identity, multiply, multiplyTfo, tfoMultiply, isE,\n multiplyTranslateX, multiplyTranslateY, multiplyTranslateZ,\n multiplyRotateX, multiplyRotateY, multiplyRotateZ,\n multiplySkewX, multiplySkewY, multiplyPerspective,\n multiplyScaleX, multiplyScaleY, multiplyScaleZ } = matrix;\nconst { d2r } = geom;\n\nfunction calRotateX(t, v) {\n v = d2r(v);\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n t[5] = t[10] = cos;\n t[6] = sin;\n t[9] = -sin;\n return t;\n}\n\nfunction calRotateY(t, v) {\n v = d2r(v);\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n t[0] = t[10] = cos;\n t[8] = sin;\n t[2] = -sin;\n return t;\n}\n\nfunction calRotateZ(t, v) {\n v = d2r(v);\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n t[0] = t[5] = cos;\n t[1] = sin;\n t[4] = -sin;\n return t;\n}\n\nfunction calRotate3d(t, v) {\n let [x, y, z, r] = v;\n r = d2r(r);\n let s = Math.sin(r);\n let c = Math.cos(r);\n if(x && !y && !z) {\n if(x < 0) {\n s = -s;\n }\n t[5] = c;\n t[9] = -s;\n t[6] = s;\n t[10] = c;\n }\n else if(y && !x && !z) {\n if(y < 0) {\n s = -s;\n }\n t[0] = c;\n t[8] = s;\n t[2] = -s;\n t[10] = c;\n }\n else if(z && !x && !y) {\n if(z < 0) {\n s = -s;\n }\n t[0] = c;\n t[4] = -s;\n t[1] = s;\n t[5] = c;\n }\n else {\n let len = Math.sqrt(x * x + y * y + z * z);\n if(len !== 1) {\n let rlen = 1 / len;\n x *= rlen;\n y *= rlen;\n z *= rlen;\n }\n let nc = 1 - c;\n let xy = x * y;\n let yz = y * z;\n let zx = z * x;\n let xs = x * s;\n let ys = y * s;\n let zs = z * s;\n\n t[0] = x * x * nc + c;\n t[1] = xy * nc + zs;\n t[2] = zx * nc - ys;\n t[3] = 0;\n\n t[4] = xy * nc - zs;\n t[5] = y * y * nc + c;\n t[6] = yz * nc + xs;\n t[7] = 0;\n\n t[8] = zx * nc + ys;\n t[9] = yz * nc - xs;\n t[10] = z * z * nc + c;\n t[11] = 0;\n\n t[12] = 0;\n t[13] = 0;\n t[14] = 0;\n t[15] = 1;\n }\n return t;\n}\n\nfunction calMatrix(transform, ow, oh, root) {\n let m = identity();\n for(let i = 0, len = transform.length; i < len; i++) {\n let item = transform[i];\n let k = item.k;\n let v = calSingleValue(k, item.v, ow, oh, root);\n if(k === TRANSLATE_X) {\n m = multiplyTranslateX(m, v);\n }\n else if(k === TRANSLATE_Y) {\n m = multiplyTranslateY(m, v);\n }\n else if(k === TRANSLATE_Z) {\n m = multiplyTranslateZ(m, v);\n }\n else if(k === ROTATE_X) {\n m = multiplyRotateX(m, d2r(v));\n }\n else if(k === ROTATE_Y) {\n m = multiplyRotateY(m, d2r(v));\n }\n else if(k === ROTATE_Z) {\n m = multiplyRotateZ(m, d2r(v));\n }\n else if(k === SKEW_X) {\n m = multiplySkewX(m, d2r(v));\n }\n else if(k === SKEW_Y) {\n m = multiplySkewY(m, d2r(v));\n }\n else if(k === SCALE_X) {\n m = multiplyScaleX(m, v);\n }\n else if(k === SCALE_Y) {\n m = multiplyScaleY(m, v);\n }\n else if(k === SCALE_Z) {\n m = multiplyScaleZ(m, v);\n }\n // 这种写法要求ppt必须在开头\n else if(k === PERSPECTIVE && !i) {\n m = multiplyPerspective(m, v);\n }\n else if(k === ROTATE_3D) {\n let t = identity();\n calRotate3d(t, [v[0], v[1], v[2], v[3].v]);\n m = multiply(m, t);\n }\n else if(k === MATRIX) {\n m = multiply(m, v);\n }\n }\n return m;\n}\n\n// 已有计算好的变换矩阵,根据tfo原点计算最终的matrix\nfunction calMatrixByOrigin(m, ox, oy) {\n let res = m.slice(0);\n if(ox === 0 && oy === 0 || isE(m)) {\n return res;\n }\n res = tfoMultiply(ox, oy, res);\n res = multiplyTfo(res, -ox, -oy);\n return res;\n}\n\n// img缩放svg下专用,无rem\nfunction calMatrixWithOrigin(transform, ox, oy, ow, oh) {\n let m = calMatrix(transform, ow, oh);\n return calMatrixByOrigin(m, ox, oy);\n}\n\nfunction calSingleValue(k, v, ow, oh, root) {\n if(k === TRANSLATE_X || k === TRANSLATE_Y || k === TRANSLATE_Z) {\n if(v.u === PX) {\n return v.v;\n }\n else if(v.u === PERCENT) {\n return v.v * (k === TRANSLATE_Y ? oh : ow) * 0.01;\n }\n else if(v.u === REM) {\n return v.v * root.__computedStyle[FONT_SIZE];\n }\n else if(v.u === VW) {\n return v.v * root.width * 0.01;\n }\n else if(v.u === VH) {\n return v.v * root.height * 0.01;\n }\n else if(v.u === VMAX) {\n return v.v * Math.max(root.width, root.height) * 0.01;\n }\n else if(v.u === VMIN) {\n return v.v * Math.min(root.width, root.height) * 0.01;\n }\n }\n else if(k === MATRIX) {\n return v;\n }\n else if(k === ROTATE_3D) {\n return v;\n }\n return v.v;\n}\n\nfunction calPerspectiveMatrix(ppt, ox, oy) {\n if(ppt && ppt > 0) {\n let res = identity();\n ppt = Math.max(ppt, 1);\n res[11] = -1 / ppt;\n if(ox || oy) {\n res = tfoMultiply(ox, oy, res);\n res = multiplyTfo(res, -ox, -oy);\n }\n return res;\n }\n}\n\n// 是否有透视矩阵应用\nfunction isPerspectiveMatrix(m) {\n if(!m) {\n return;\n }\n return !!m[11];\n}\n\nexport default {\n calSingleValue,\n calMatrix,\n calRotateX,\n calRotateY,\n calRotateZ,\n calRotate3d,\n calPerspectiveMatrix,\n calMatrixByOrigin,\n calMatrixWithOrigin,\n isPerspectiveMatrix,\n};\n","import mode from '../refresh/mode';\nimport css from '../style/css';\nimport transform from '../style/transform';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport unit from '../style/unit';\nimport mx from '../math/matrix';\n\nconst { STYLE_KEY: {\n COLOR,\n FONT_WEIGHT,\n FONT_FAMILY,\n FONT_SIZE,\n FONT_STYLE,\n LETTER_SPACING,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n ROTATE_Z,\n LINE_HEIGHT,\n} } = enums;\nconst { DEG } = unit;\nconst { CANVAS, SVG, WEBGL } = mode;\n\nconst TuOrU = /[\\u{00A7}\\u{00A9}\\u{00AE}\\u{00B1}\\u{00BC}-\\u{00BE}\\u{00D7}\\u{00F7}\\u{02EA}-\\u{02EB}\\u{1100}-\\u{11FF}\\u{1401}-\\u{166C}\\u{166D}\\u{166E}\\u{166F}-\\u{167F}\\u{18B0}-\\u{18F5}\\u{18F6}-\\u{18FF}\\u{2016}\\u{2020}-\\u{2021}\\u{2030}-\\u{2031}\\u{203B}-\\u{203C}\\u{2042}\\u{2047}-\\u{2049}\\u{2051}\\u{2065}\\u{20DD}-\\u{20E0}\\u{20E2}-\\u{20E4}\\u{2100}-\\u{2101}\\u{2103}-\\u{2106}\\u{2107}\\u{2108}-\\u{2109}\\u{210F}\\u{2113}\\u{2114}\\u{2116}-\\u{2117}\\u{211E}-\\u{2123}\\u{2125}\\u{2127}\\u{2129}\\u{212E}\\u{2135}-\\u{2138}\\u{2139}\\u{213A}-\\u{213B}\\u{213C}-\\u{213F}\\u{2145}-\\u{2149}\\u{214A}\\u{214C}-\\u{214D}\\u{214F}\\u{2150}-\\u{215F}\\u{2160}-\\u{2182}\\u{2183}-\\u{2184}\\u{2185}-\\u{2188}\\u{2189}\\u{218C}-\\u{218F}\\u{221E}\\u{2234}-\\u{2235}\\u{2300}-\\u{2307}\\u{230C}-\\u{231F}\\u{2324}-\\u{2328}\\u{232B}\\u{237D}-\\u{239A}\\u{23BE}-\\u{23CD}\\u{23CF}\\u{23D1}-\\u{23DB}\\u{23E2}-\\u{23FF}\\u{2400}-\\u{2422}\\u{2424}-\\u{2426}\\u{2427}-\\u{243F}\\u{2440}-\\u{244A}\\u{244B}-\\u{245F}\\u{2460}-\\u{249B}\\u{249C}-\\u{24E9}\\u{24EA}-\\u{24FF}\\u{25A0}-\\u{25B6}\\u{25B7}\\u{25B8}-\\u{25C0}\\u{25C1}\\u{25C2}-\\u{25F7}\\u{25F8}-\\u{25FF}\\u{2600}-\\u{2619}\\u{2620}-\\u{266E}\\u{266F}\\u{2670}-\\u{26FF}\\u{2700}-\\u{2767}\\u{2776}-\\u{2793}\\u{2B12}-\\u{2B2F}\\u{2B50}-\\u{2B59}\\u{2B97}\\u{2BB8}-\\u{2BD1}\\u{2BD3}-\\u{2BEB}\\u{2BF0}-\\u{2BFF}\\u{2E50}-\\u{2E51}\\u{2E80}-\\u{2E99}\\u{2E9A}\\u{2E9B}-\\u{2EF3}\\u{2EF4}-\\u{2EFF}\\u{2F00}-\\u{2FD5}\\u{2FD6}-\\u{2FDF}\\u{2FE0}-\\u{2FEF}\\u{2FF0}-\\u{2FFB}\\u{2FFC}-\\u{2FFF}\\u{3000}\\u{3001}-\\u{3002}\\u{3003}\\u{3004}\\u{3005}\\u{3006}\\u{3007}\\u{3012}-\\u{3013}\\u{3020}\\u{3021}-\\u{3029}\\u{302A}-\\u{302D}\\u{302E}-\\u{302F}\\u{3031}-\\u{3035}\\u{3036}-\\u{3037}\\u{3038}-\\u{303A}\\u{303B}\\u{303C}\\u{303D}\\u{303E}-\\u{303F}\\u{3040}\\u{3041}\\u{3042}\\u{3043}\\u{3044}\\u{3045}\\u{3046}\\u{3047}\\u{3048}\\u{3049}\\u{304A}-\\u{3062}\\u{3063}\\u{3064}-\\u{3082}\\u{3083}\\u{3084}\\u{3085}\\u{3086}\\u{3087}\\u{3088}-\\u{308D}\\u{308E}\\u{308F}-\\u{3094}\\u{3095}-\\u{3096}\\u{3097}-\\u{3098}\\u{3099}-\\u{309A}\\u{309B}-\\u{309C}\\u{309D}-\\u{309E}\\u{309F}\\u{30A1}\\u{30A2}\\u{30A3}\\u{30A4}\\u{30A5}\\u{30A6}\\u{30A7}\\u{30A8}\\u{30A9}\\u{30AA}-\\u{30C2}\\u{30C3}\\u{30C4}-\\u{30E2}\\u{30E3}\\u{30E4}\\u{30E5}\\u{30E6}\\u{30E7}\\u{30E8}-\\u{30ED}\\u{30EE}\\u{30EF}-\\u{30F4}\\u{30F5}-\\u{30F6}\\u{30F7}-\\u{30FA}\\u{30FB}\\u{30FD}-\\u{30FE}\\u{30FF}\\u{3100}-\\u{3104}\\u{3105}-\\u{3126}\\u{3127}\\u{3128}-\\u{312F}\\u{3130}\\u{3131}-\\u{318E}\\u{318F}\\u{3190}-\\u{3191}\\u{3192}-\\u{3195}\\u{3196}-\\u{319F}\\u{31A0}-\\u{31BF}\\u{31C0}-\\u{31E3}\\u{31E4}-\\u{31EF}\\u{31F0}-\\u{31FF}\\u{3200}-\\u{321E}\\u{321F}\\u{3220}-\\u{3229}\\u{322A}-\\u{3247}\\u{3248}-\\u{324F}\\u{3250}\\u{3251}-\\u{325F}\\u{3260}-\\u{327F}\\u{3280}-\\u{3289}\\u{328A}-\\u{32B0}\\u{32B1}-\\u{32BF}\\u{32C0}-\\u{32FE}\\u{32FF}\\u{3300}-\\u{3357}\\u{3358}-\\u{337A}\\u{337B}-\\u{337F}\\u{3380}-\\u{33FF}\\u{3400}-\\u{4DBF}\\u{4DC0}-\\u{4DFF}\\u{4E00}-\\u{9FFF}\\u{A000}-\\u{A014}\\u{A015}\\u{A016}-\\u{A48C}\\u{A48D}-\\u{A48F}\\u{A490}-\\u{A4C6}\\u{A4C7}-\\u{A4CF}\\u{A960}-\\u{A97C}\\u{A97D}-\\u{A97F}\\u{AC00}-\\u{D7A3}\\u{D7A4}-\\u{D7AF}\\u{D7B0}-\\u{D7C6}\\u{D7C7}-\\u{D7CA}\\u{D7CB}-\\u{D7FB}\\u{D7FC}-\\u{D7FF}\\u{E000}-\\u{F8FF}\\u{F900}-\\u{FA6D}\\u{FA6E}-\\u{FA6F}\\u{FA70}-\\u{FAD9}\\u{FADA}-\\u{FAFF}\\u{FE10}-\\u{FE16}\\u{FE17}\\u{FE18}\\u{FE19}\\u{FE1A}-\\u{FE1F}\\u{FE30}\\u{FE31}-\\u{FE32}\\u{FE33}-\\u{FE34}\\u{FE35}\\u{FE36}\\u{FE37}\\u{FE38}\\u{FE39}\\u{FE3A}\\u{FE3B}\\u{FE3C}\\u{FE3D}\\u{FE3E}\\u{FE3F}\\u{FE40}\\u{FE41}\\u{FE42}\\u{FE43}\\u{FE44}\\u{FE45}-\\u{FE46}\\u{FE47}\\u{FE48}\\u{FE50}-\\u{FE52}\\u{FE53}\\u{FE54}-\\u{FE57}\\u{FE5F}-\\u{FE61}\\u{FE62}\\u{FE67}\\u{FE68}\\u{FE69}\\u{FE6A}-\\u{FE6B}\\u{FE6C}-\\u{FE6F}\\u{FF01}\\u{FF02}-\\u{FF03}\\u{FF04}\\u{FF05}-\\u{FF07}\\u{FF0A}\\u{FF0B}\\u{FF0C}\\u{FF0E}\\u{FF0F}\\u{FF10}-\\u{FF19}\\u{FF1F}\\u{FF20}\\u{FF21}-\\u{FF3A}\\u{FF3C}\\u{FF3E}\\u{FF40}\\u{FF41}-\\u{FF5A}\\u{FFE0}-\\u{FFE1}\\u{FFE2}\\u{FFE4}\\u{FFE5}-\\u{FFE6}\\u{FFE7}\\u{FFF0}-\\u{FFF8}\\u{FFFC}-\\u{FFFD}\\u{10980}-\\u{1099F}\\u{11580}-\\u{115AE}\\u{115AF}-\\u{115B1}\\u{115B2}-\\u{115B5}\\u{115B6}-\\u{115B7}\\u{115B8}-\\u{115BB}\\u{115BC}-\\u{115BD}\\u{115BE}\\u{115BF}-\\u{115C0}\\u{115C1}-\\u{115D7}\\u{115D8}-\\u{115DB}\\u{115DC}-\\u{115DD}\\u{115DE}-\\u{115FF}\\u{11A00}\\u{11A01}-\\u{11A0A}\\u{11A0B}-\\u{11A32}\\u{11A33}-\\u{11A38}\\u{11A39}\\u{11A3A}\\u{11A3B}-\\u{11A3E}\\u{11A3F}-\\u{11A46}\\u{11A47}\\u{11A48}-\\u{11A4F}\\u{11A50}\\u{11A51}-\\u{11A56}\\u{11A57}-\\u{11A58}\\u{11A59}-\\u{11A5B}\\u{11A5C}-\\u{11A89}\\u{11A8A}-\\u{11A96}\\u{11A97}\\u{11A98}-\\u{11A99}\\u{11A9A}-\\u{11A9C}\\u{11A9D}\\u{11A9E}-\\u{11AA2}\\u{11AA3}-\\u{11AAF}\\u{11AB0}-\\u{11ABF}\\u{13000}-\\u{1342E}\\u{1342F}\\u{13430}-\\u{13438}\\u{13439}-\\u{1343F}\\u{14400}-\\u{14646}\\u{14647}-\\u{1467F}\\u{16FE0}-\\u{16FE1}\\u{16FE2}\\u{16FE3}\\u{16FE4}\\u{16FE5}-\\u{16FEF}\\u{16FF0}-\\u{16FF1}\\u{16FF2}-\\u{16FFF}\\u{17000}-\\u{187F7}\\u{187F8}-\\u{187FF}\\u{18800}-\\u{18AFF}\\u{18B00}-\\u{18CD5}\\u{18CD6}-\\u{18CFF}\\u{18D00}-\\u{18D08}\\u{18D09}-\\u{18D7F}\\u{1AFF0}-\\u{1AFF3}\\u{1AFF4}\\u{1AFF5}-\\u{1AFFB}\\u{1AFFC}\\u{1AFFD}-\\u{1AFFE}\\u{1AFFF}\\u{1B000}-\\u{1B0FF}\\u{1B100}-\\u{1B122}\\u{1B123}-\\u{1B12F}\\u{1B130}-\\u{1B14F}\\u{1B150}-\\u{1B152}\\u{1B153}-\\u{1B163}\\u{1B164}-\\u{1B167}\\u{1B168}-\\u{1B16F}\\u{1B170}-\\u{1B2FB}\\u{1B2FC}-\\u{1B2FF}\\u{1CF00}-\\u{1CF2D}\\u{1CF2E}-\\u{1CF2F}\\u{1CF30}-\\u{1CF46}\\u{1CF47}-\\u{1CF4F}\\u{1CF50}-\\u{1CFC3}\\u{1CFC4}-\\u{1CFCF}\\u{1D000}-\\u{1D0F5}\\u{1D0F6}-\\u{1D0FF}\\u{1D100}-\\u{1D126}\\u{1D127}-\\u{1D128}\\u{1D129}-\\u{1D164}\\u{1D165}-\\u{1D166}\\u{1D167}-\\u{1D169}\\u{1D16A}-\\u{1D16C}\\u{1D16D}-\\u{1D172}\\u{1D173}-\\u{1D17A}\\u{1D17B}-\\u{1D182}\\u{1D183}-\\u{1D184}\\u{1D185}-\\u{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;\n\n/**\n * 表示一行文本的类,保存它的位置、内容、从属信息,在布局阶段生成,并在渲染阶段被Text调用render()\n * 关系上直属于Text类,一个Text类可能因为换行原因导致有多个TextBox,一行内容中也可能有不同Text从而不同TextBox\n * 另外本类还会被LineBoxManager添加到LineBox里,LineBox为一行中的inline/文本组合,之间需要进行垂直对齐\n * 在textOverflow为ellipsis时,可能会收到后面节点的向前回退(后面不足放下…),使得省略号发生在本节点\n */\nclass TextBox {\n constructor(parent, index, x, y, w, h, content, isUpright = false) {\n this.__parent = parent;\n this.__index = index;\n this.__x = x;\n this.__y = y;\n if(isUpright) {\n this.__width = h;\n this.__height = w;\n }\n else {\n this.__width = w;\n this.__height = h;\n }\n this.__content = content;\n this.__virtualDom = {};\n this.__parentLineBox = null;\n this.__isVertical = isUpright;\n }\n\n /**\n * 渲染阶段被Text类调用,多行Text会有多个TextBox,内容被分拆开\n * @param renderMode\n * @param ctx\n * @param computedStyle\n * @param cacheStyle Text父节点Dom的缓存样式,相比computedStyle可以直接用,比如color被缓存为style字符串\n * @param dx\n * @param dy\n */\n render(renderMode, ctx, computedStyle, cacheStyle, dx, dy) {\n let { content, x, y, parent, width, height, isUpright } = this;\n let dom = parent.__domParent;\n let b = css.getBaseline(computedStyle);\n let bv = css.getVerticalBaseline(computedStyle);\n // 垂直文本x/y互换,渲染时使用rotate模拟,因为是基于baseline绘制,顺时针90deg时tfo是文字左下角,\n // 它等同于lineHeight(现在的w)减去b\n if(isUpright) {\n x += bv;\n }\n else {\n y += b;\n }\n x += dx;\n y += dy;\n if(isUpright) {\n this.__endX = x;\n this.__endY = y + height;\n }\n else {\n this.__endX = x + width;\n this.__endY = y;\n }\n let {\n [LETTER_SPACING]: letterSpacing,\n [TEXT_STROKE_WIDTH]: textStrokeWidth,\n [TEXT_STROKE_COLOR]: textStrokeColor,\n [FONT_SIZE]: fontSize,\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n let i = 0, length = content.length;\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let me = dom.matrixEvent, list;\n let dev1 = 0, dev2 = 0;\n if(isUpright) {\n list = [\n { k: ROTATE_Z, v: { v: 90, u: DEG } },\n ];\n dev1 = bv * 0.6;\n dev2 = bv * 0.2;\n }\n let overFill = computedStyle[TEXT_STROKE_OVER] === 'fill';\n if(letterSpacing) {\n for(; i < length; i++) {\n let c = content.charAt(i);\n if(isUpright) {\n let cjk = TuOrU.test(c);\n if(cjk) {\n ctx.setTransform(me[0], me[1], me[4], me[5], me[12], me[13]);\n if(overFill) {\n ctx.fillText(c, x - dev1, y - dev2);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(c, x - dev1, y - dev2);\n }\n if(!overFill) {\n ctx.fillText(c, x - dev1, y - dev2);\n }\n }\n else {\n let m = transform.calMatrixWithOrigin(list, x, y, 0, 0);\n m = mx.multiply(me, m);\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n if(overFill) {\n ctx.fillText(c, x, y);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(c, x, y);\n }\n if(!overFill) {\n ctx.fillText(c, x, y);\n }\n }\n y += ctx.measureText(c).width + letterSpacing;\n }\n else {\n if(overFill) {\n ctx.fillText(c, x, y);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(c, x, y);\n }\n if(!overFill) {\n ctx.fillText(c, x, y);\n }\n x += ctx.measureText(c).width + letterSpacing;\n }\n }\n }\n else {\n if(isUpright) {\n let cjk = TuOrU.test(content.charAt(0)), last = 0, count = 0, len = content.length;\n for(let i = 1; i < len; i++) {\n let nowCjk = TuOrU.test(content.charAt(i));\n // 不相等时cjk发生变化,输出之前的内容,记录当下的所有\n if(nowCjk !== cjk) {\n if(cjk) {\n ctx.setTransform(me[0], me[1], me[4], me[5], me[12], me[13]);\n let s = content.slice(last, i);\n if(overFill) {\n ctx.fillText(s, x - dev1, y + count + b - dev2);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(s, x - dev1, y + count + b - dev2);\n }\n if(!overFill) {\n ctx.fillText(s, x - dev1, y + count + b - dev2);\n }\n count += fontSize;\n }\n else {\n let m = transform.calMatrixWithOrigin(list, x, y + count, 0, 0);\n m = mx.multiply(me, m);\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n let s = content.slice(last, i);\n if(overFill) {\n ctx.fillText(s, x, y + count);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(s, x, y + count);\n }\n if(!overFill) {\n ctx.fillText(s, x, y + count);\n }\n count += ctx.measureText(s).width;\n }\n last = i;\n cjk = !cjk;\n }\n // cjk单字符输出\n else if(nowCjk) {\n ctx.setTransform(me[0], me[1], me[4], me[5], me[12], me[13]);\n let s = content.slice(last, i);\n if(overFill) {\n ctx.fillText(s, x - dev1, y + count + b - dev2);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(s, x - dev1, y + count + b - dev2);\n }\n if(!overFill) {\n ctx.fillText(s, x - dev1, y + count + b - dev2);\n }\n count += fontSize;\n last = i;\n }\n }\n if(last < len) {\n let s = content.slice(last, len);\n // 最后的cjk只可能是一个字符\n if(cjk) {\n ctx.setTransform(me[0], me[1], me[4], me[5], me[12], me[13]);\n if(overFill) {\n ctx.fillText(s, x - dev1, y + count + b - dev2);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(s, x - dev1, y + count + b - dev2);\n }\n if(!overFill) {\n ctx.fillText(s, x - dev1, y + count + b - dev2);\n }\n }\n else {\n let m = transform.calMatrixWithOrigin(list, x, y + count, 0, 0);\n m = mx.multiply(me, m);\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n if(overFill) {\n ctx.fillText(s, x, y + count);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(s, x, y + count);\n }\n if(!overFill) {\n ctx.fillText(s, x, y + count);\n }\n }\n }\n }\n else {\n if(overFill) {\n ctx.fillText(content, x, y);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(content, x, y);\n }\n if(!overFill) {\n ctx.fillText(content, x, y);\n }\n }\n }\n }\n else if(renderMode === SVG) {\n let color = cacheStyle[COLOR];\n if(color.k) {\n color = dom.__gradient(renderMode, ctx, dom.__bx1, dom.__by1, dom.__bx2, dom.__by2, color, dx, dy).v;\n }\n // 垂直的svg以中线为基线,需偏移baseline和中线的差值\n if(isUpright) {\n x += lineHeight * 0.5 - bv;\n }\n let props = [\n ['x', x],\n ['y', y],\n ['fill', color],\n ['font-family', computedStyle[FONT_FAMILY]],\n ['font-weight', computedStyle[FONT_WEIGHT]],\n ['font-style', computedStyle[FONT_STYLE]],\n ['font-size', computedStyle[FONT_SIZE] + 'px'],\n ];\n // svg无法定义stroke的over\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n let textStrokeColor = cacheStyle[TEXT_STROKE_COLOR];\n // 渐变\n if(textStrokeColor.k) {\n textStrokeColor = dom.__gradient(renderMode, ctx, dom.__bx1, dom.__by1, dom.__bx2, dom.__by2, textStrokeColor, dx, dy).v;\n }\n props.push(['stroke', textStrokeColor]);\n props.push(['stroke-width', computedStyle[TEXT_STROKE_WIDTH]]);\n }\n if(letterSpacing) {\n props.push(['letter-spacing', letterSpacing]);\n }\n if(isUpright) {\n props.push(['writing-mode', 'vertical-lr']);\n }\n this.__virtualDom = {\n type: 'item',\n tagName: 'text',\n props,\n content: util.encodeHtml(content),\n };\n }\n }\n\n __offsetX(diff) {\n this.__x += diff;\n }\n\n __offsetY(diff) {\n this.__y += diff;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get endX() {\n return this.__endX;\n }\n\n get endY() {\n return this.__endY;\n }\n\n get width() {\n return this.__width;\n }\n\n get offsetWidth() {\n return this.__width;\n }\n\n get outerWidth() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get offsetHeight() {\n return this.__height;\n }\n\n get outerHeight() {\n return this.__height;\n }\n\n get content() {\n return this.__content;\n }\n\n get baseline() {\n return this.parent.baseline;\n }\n\n get verticalBaseline() {\n return this.parent.verticalBaseline;\n }\n\n get virtualDom() {\n return this.__virtualDom;\n }\n\n get parent() {\n return this.__parent;\n }\n\n get parentLineBox() {\n return this.__parentLineBox;\n }\n\n get isUpright() {\n return this.__isVertical;\n }\n}\n\nexport default TextBox;\n","import Node from './Node';\nimport mode from '../refresh/mode';\nimport css from '../style/css';\nimport unit from '../style/unit';\nimport transform from '../style/transform';\nimport enums from '../util/enums';\nimport mx from '../math/matrix';\n\nconst {\n STYLE_KEY: {\n FONT_SIZE,\n FONT_FAMILY,\n FONT_WEIGHT,\n FONT_STYLE,\n COLOR,\n LINE_HEIGHT,\n ROTATE_Z,\n },\n} = enums;\nconst { DEG } = unit;\nconst { CANVAS, SVG, WEBGL } = mode;\n\nconst CHAR = '…';\n\nclass Ellipsis extends Node {\n constructor(x, y, width, parent, isUpright) {\n super();\n this.__x = this.__x1 = x;\n this.__y = this.__y1 = y;\n this.__width = width;\n this.__parent = this.__domParent = parent;\n parent.__ellipsis = this;\n this.__parentLineBox = null;\n this.__baseline = css.getBaseline(parent.computedStyle);\n this.__isVertical = isUpright;\n }\n\n render(renderMode, ctx, dx = 0, dy = 0) {\n let { x, y, parent, isUpright } = this;\n let {\n computedStyle,\n cacheStyle: {\n [COLOR]: color,\n },\n } = parent;\n let b = css.getBaseline(computedStyle);\n let bv = css.getVerticalBaseline(computedStyle);\n if(isUpright) {\n x += bv;\n }\n else {\n y += b;\n }\n x += dx;\n y += dy;\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let font = css.setFontStyle(computedStyle);\n if(ctx.font !== font) {\n ctx.font = font;\n }\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n if(isUpright) {\n let me = parent.matrixEvent, list = [\n { k: ROTATE_Z, v: { v: 90, u: DEG } },\n ];\n let m = transform.calMatrixWithOrigin(list, x, y, 0, 0);\n m = mx.multiply(me, m);\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n }\n ctx.fillText(CHAR, x, y);\n }\n else if(renderMode === SVG) {\n // 垂直的svg以中线为基线,需偏移baseline和中线的差值\n if(isUpright) {\n x += computedStyle[LINE_HEIGHT] * 0.5 - bv;\n }\n let props = [\n ['x', x],\n ['y', y],\n ['fill', color],\n ['font-family', computedStyle[FONT_FAMILY]],\n ['font-weight', computedStyle[FONT_WEIGHT]],\n ['font-style', computedStyle[FONT_STYLE]],\n ['font-size', computedStyle[FONT_SIZE] + 'px'],\n ];\n if(isUpright) {\n props.push(['writing-mode', 'vertical-lr']);\n }\n let vd = this.__virtualDom = {\n type: 'text',\n children: [\n {\n type: 'item',\n tagName: 'text',\n props,\n content: CHAR,\n },\n ],\n };\n parent.virtualDom.children.push(vd);\n }\n }\n\n get parentLineBox() {\n return this.__parentLineBox;\n }\n\n get isUpright() {\n return this.__isVertical;\n }\n\n get isEllipsis() {\n return true;\n }\n}\n\nexport default Ellipsis;\n\n","import change from './change';\nimport enums from '../util/enums';\n\nconst { STYLE_KEY: {\n TRANSLATE_X: TX,\n TRANSLATE_Y: TY,\n TRANSLATE_Z: TZ,\n OPACITY: OP,\n FILTER: FT,\n PERSPECTIVE: PPT,\n PERSPECTIVE_ORIGIN,\n Z_INDEX,\n SCALE_X: SX,\n SCALE_Y: SY,\n SCALE_Z: SZ,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z: RZ,\n ROTATE_3D,\n SKEW_X,\n SKEW_Y,\n TRANSFORM: TF,\n TRANSFORM_ORIGIN,\n} } = enums;\n\nconst { isIgnore, isRepaint } = change;\n\n// 低位表示 0;\n },\n // 是否不包含value之外的\n exclude(lv, value) {\n return (lv | value) === value;\n },\n /**\n * 得出等级\n * @param k\n * @returns {number|*}\n */\n getLevel(k) {\n if(isIgnore(k)) {\n return NONE;\n }\n if(k === Z_INDEX) {\n return CACHE;\n }\n if(k === TX) {\n return TRANSLATE_X;\n }\n if(k === TY) {\n return TRANSLATE_Y;\n }\n if(k === TZ) {\n return TRANSLATE_Z;\n }\n if(k === RZ) {\n return ROTATE_Z;\n }\n if(k === SX) {\n return SCALE_X;\n }\n if(k === SY) {\n return SCALE_Y;\n }\n if(k === SZ) {\n return SCALE_Z;\n }\n if(k === OP) {\n return OPACITY;\n }\n if(k === FT) {\n return FILTER;\n }\n if(k === PPT || k === PERSPECTIVE_ORIGIN) {\n return PERSPECTIVE;\n }\n if(isTransforms(k)) {\n return TRANSFORM;\n }\n if(isRepaint(k)) {\n return REPAINT;\n }\n return REFLOW;\n },\n isReflow(lv) {\n return lv >= REFLOW;\n },\n isRepaint(lv) {\n return lv < REFLOW;\n },\n}, ENUM);\n\nexport default o;\n","import Node from './Node';\nimport TextBox from './TextBox';\nimport Ellipsis from './Ellipsis';\nimport mode from '../refresh/mode';\nimport css from '../style/css';\nimport unit from '../style/unit';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport level from '../refresh/level';\n\nconst {\n STYLE_KEY: {\n DISPLAY,\n POSITION,\n LINE_HEIGHT,\n FONT_SIZE,\n FONT_FAMILY,\n FONT_WEIGHT,\n COLOR,\n VISIBILITY,\n LETTER_SPACING,\n OVERFLOW,\n WHITE_SPACE,\n TEXT_OVERFLOW,\n WIDTH,\n HEIGHT,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n MARGIN_TOP,\n MARGIN_BOTTOM,\n MARGIN_LEFT,\n MARGIN_RIGHT,\n PADDING_TOP,\n PADDING_BOTTOM,\n PADDING_LEFT,\n PADDING_RIGHT,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_RIGHT_WIDTH,\n FILTER,\n },\n ELLIPSIS,\n} = enums;\n\nconst { AUTO } = unit;\nconst { CANVAS, SVG, WEBGL } = mode;\nconst { isFunction } = util;\n\n/**\n * 在给定宽度w的情况下,测量文字content多少个满足塞下,只支持水平书写,从start的索引开始,content长length\n * 尽可能地少的次数调用canvas的measureText或svg的html节点的width,因为比较消耗性能\n * 这就需要一种算法,不能逐字遍历看总长度是否超过,也不能单字宽度相加因为有文本整形某些字体多个字宽度不等于每个之和\n * 简单的2分法实现简单,但是次数稍多,对于性能不是最佳,因为内容的slice裁剪和传递给canvas测量都随尺寸增加而加大\n * 由于知道w和fontSize,因此能推测出平均值为fontSize/w,即字的个数,\n * 进行测量后得出w2,和真实w对比,产生误差d,再看d和fontSize推测差距个数,如此反复\n * 返回内容和end索引和长度,最少也要1个字符\n * @param ctx\n * @param renderMode\n * @param start\n * @param length\n * @param content\n * @param w\n * @param perW\n * @param fontFamily\n * @param fontSize\n * @param fontWeight\n * @param letterSpacing\n * @param isUpright\n */\nfunction measureLineWidth(ctx, renderMode, start, length, content, w, perW,\n fontFamily, fontSize, fontWeight, letterSpacing, isUpright) {\n if(start >= length) {\n // 特殊情况不应该走进这里\n return [0, 0, false];\n }\n let i = start, j = length, rw = 0, newLine = false;\n // 特殊降级,有letterSpacing时,canvas无法完全兼容,只能采取单字测量的方式完成\n if(letterSpacing && [CANVAS, WEBGL].indexOf(renderMode) > -1) {\n let count = 0;\n for(; i < j; i++) {\n let mw = ctx.measureText(content.charAt(i)).width + letterSpacing;\n if(count + mw > w + (1e-10)) {\n newLine = true;\n break;\n }\n count += mw;\n }\n return [i - start, count, newLine || count > w + (1e-10)];\n }\n // 没有letterSpacing或者是svg模式可以完美获取TextMetrics\n let hypotheticalNum = Math.round(w / perW);\n // 不能增长0个字符,至少也要1个\n if(hypotheticalNum <= 0) {\n hypotheticalNum = 1;\n }\n // 超过内容长度范围也不行\n else if(hypotheticalNum > length - start) {\n hypotheticalNum = length - start;\n }\n // 类似2分的一个循环\n while(i < j) {\n let mw, str = content.slice(start, start + hypotheticalNum);\n if(renderMode === CANVAS || renderMode === WEBGL) {\n mw = ctx.measureText(str).width;\n }\n else if(renderMode === SVG) {\n mw = inject.measureTextSync(str, fontFamily, fontSize, fontWeight, isUpright);\n }\n if(letterSpacing) {\n mw += hypotheticalNum * letterSpacing;\n }\n if(mw === w) {\n rw = w;\n newLine = true;\n break;\n }\n // 超出,设置右边界,并根据余量推测减少个数,\n // 因为精度问题,固定宽度或者累加的剩余空间,不用相等判断,而是为原本w宽度加一点点冗余1e-10\n if(mw > w + (1e-10)) {\n newLine = true;\n // 限制至少1个\n if(hypotheticalNum === 1) {\n rw = mw;\n break;\n }\n // 注意特殊判断i和j就差1个可直接得出结果,因为现在超了而-1不超肯定是-1的结果\n if(i === j - 1 || i - start === hypotheticalNum - 1) {\n hypotheticalNum = i - start;\n break;\n }\n j = hypotheticalNum + start - 1;\n let reduce = Math.round((mw - w) / perW);\n if(reduce <= 0) {\n reduce = 1;\n }\n hypotheticalNum -= reduce;\n if(hypotheticalNum < i - start) {\n hypotheticalNum = i - start;\n }\n }\n // 还有空余,设置左边界,并根据余量推测增加的个数\n else {\n rw = mw;\n if(hypotheticalNum === length - start) {\n break;\n }\n i = hypotheticalNum + start;\n let add = Math.round((w - mw) / perW);\n if(add <= 0) {\n add = 1;\n }\n hypotheticalNum += add;\n if(hypotheticalNum > j - start) {\n hypotheticalNum = j - start;\n }\n }\n }\n return [hypotheticalNum, rw, newLine];\n}\n\nfunction getFontKey(ff, fs, fw, ls) {\n return ff + '_' + fs + '_' + fw + '_' + ls;\n}\n\nclass Text extends Node {\n constructor(content) {\n super();\n this.__content = util.isNil(content) ? '' : content.toString();\n this.__textBoxes = [];\n this.__charWidth = 0; // 最小字符宽度(单个)\n this.__textWidth = 0; // 整体宽度\n this.__bp = null; // block父节点\n this.__widthHash = {}; // 存储当前字体样式key下的charWidth/textWidth\n this.__limitCache = false;\n this.__hasContent = false;\n }\n\n /**\n * text在virtual时和普通一样,无需特殊处理\n * endSpace由外界inline布局控制,末尾最后一行的空白mpb,包含递归情况,递归为多个嵌套末尾节点的空白mpb之和\n * 即便宽度不足,每行还是强制渲染一个字符,换行依据lx开始,因为x可能是从中间开始的,非inline则两个相等\n * 最后一个字符排版时要考虑末尾mpb,排不下的话回退删掉这个字符,如果最后一个字符另起开头,排不下也强制排,每行至少1个字符\n * 在textOverflow时很特殊,多个inline同行,回退可能到前一个inline节点,这个通过x和lx判断是否行首,决定至少1个字符规则\n * @param data\n * @private\n */\n __layoutFlow(data) {\n let __cache = this.__cache;\n if(__cache) {\n __cache.release();\n }\n let { x, y, w, h, lx = x, ly = y, lineBoxManager, endSpace = 0, lineClamp = 0, lineClampCount = 0, isUpright = false } = data;\n this.__x = this.__x1 = x;\n this.__y = this.__y1 = y;\n let { __isDestroyed, content, computedStyle, textBoxes, root } = this;\n textBoxes.splice(0);\n // 空内容w/h都为0可以提前跳出,lineClamp超出一般不会进这,但有特例flex文本垂直预计算时,所以也要跳出\n if(__isDestroyed || computedStyle[DISPLAY] === 'none' || !content || lineClamp && lineClampCount >= lineClamp) {\n return lineClampCount;\n }\n // 顺序尝试分割字符串为TextBox,形成多行,begin为每行起始索引,i是当前字符索引\n let i = 0;\n let length = content.length;\n let maxW = 0;\n let {\n [LINE_HEIGHT]: lineHeight,\n [LETTER_SPACING]: letterSpacing,\n [WHITE_SPACE]: whiteSpace,\n [FONT_SIZE]: fontSize,\n [FONT_WEIGHT]: fontWeight,\n [FONT_FAMILY]: fontFamily,\n } = computedStyle;\n let size = isUpright ? h : w;\n let beginSpace = isUpright ? (y - ly) : (x - lx); // x>=lx,当第一行非起始处时前面被prev节点占据,这个差值可认为是count宽度\n // 基于最近block父节点的样式\n let bp = this.domParent;\n while(bp.computedStyle[DISPLAY] === 'inline') {\n bp = bp.domParent;\n }\n this.__bp = bp;\n let textOverflow = bp.computedStyle[TEXT_OVERFLOW];\n // 布局测量前置,根据renderMode不同提供不同的测量方法\n let renderMode = root.renderMode;\n let ctx;\n if(renderMode === CANVAS || renderMode === WEBGL) {\n ctx = renderMode === WEBGL\n ? inject.getFontCanvas().ctx\n : root.ctx;\n ctx.font = css.setFontStyle(computedStyle);\n }\n // fontSize在中文是正好1个字宽度,英文不一定,等宽为2个,不等宽可能1~2个,特殊字符甚至>2个,取预估均值然后倒数得每个均宽0.8\n let perW = (fontSize * 0.8) + letterSpacing;\n let lineCount = 0;\n let mainCoords; // 根据书写模式指向不同x/y\n // 不换行特殊对待,同时考虑overflow和textOverflow\n if(whiteSpace === 'nowrap') {\n let isTextOverflow, textWidth = this.textWidth;\n let {\n [POSITION]: position,\n [OVERFLOW]: overflow,\n } = bp.computedStyle;\n let containerSize = bp.currentStyle[isUpright ? HEIGHT: WIDTH];\n // 只要是overflow隐藏,不管textOverflow如何(默认是clip等同于overflow:hidden的功能)都截取\n if(overflow === 'hidden') {\n // abs自适应宽度时不裁剪\n if(position === 'absolute' && containerSize.u === AUTO) {\n isTextOverflow = false;\n }\n else {\n isTextOverflow = textWidth > size + (1e-10) - beginSpace - endSpace;\n }\n }\n // ellipsis生效情况,本节点开始向前回退查找,尝试放下一部分字符\n if(isTextOverflow && textOverflow === 'ellipsis') {\n [mainCoords] = this.__lineBack(ctx, renderMode, i, length, content, size - endSpace - beginSpace, perW, x, y, maxW,\n endSpace, lineHeight, textBoxes, lineBoxManager, fontFamily, fontSize, fontWeight, letterSpacing, isUpright);\n lineCount++;\n if(isUpright) {\n x = mainCoords;\n }\n else {\n y = mainCoords;\n }\n }\n // 默认是否clip跟随overflow:hidden,无需感知,裁剪由dom做,这里不裁剪\n else {\n let textBox = new TextBox(this, textBoxes.length, x, y, textWidth, lineHeight,\n content, isUpright);\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox, false);\n if(isUpright) {\n x += lineHeight;\n }\n else {\n y += lineHeight;\n }\n if(isTextOverflow) {\n lineCount++;\n }\n }\n // 和html一样,maxW此时在html是满格\n maxW = textWidth;\n }\n // 普通换行,注意x和lx的区别,可能相同(block起始处)可能不同(非起始处),第1行从x开始,第2行及以后都从lx开始\n // 然后第一次换行还有特殊之处,可能同一行前半部行高很大,此时y增加并非自身的lineHeight,而是整体LineBox的\n else {\n while(i < length) {\n let limit = i ? size : (size - beginSpace);\n if(lineClamp && lineCount + lineClampCount >= lineClamp - 1) {\n limit -= endSpace;\n }\n let [num, rw, newLine] = measureLineWidth(ctx, renderMode, i, length, content, limit, perW,\n fontFamily, fontSize, fontWeight, letterSpacing);\n // 多行文本截断,这里肯定需要回退,注意防止恰好是最后一个字符,此时无需截取\n if(lineClamp && newLine && lineCount + lineClampCount >= lineClamp - 1 && i + num < length) {\n [mainCoords, maxW] = this.__lineBack(ctx, renderMode, i, i + num, content, limit - endSpace, perW,\n lineCount ? lx : x, y, maxW, endSpace, lineHeight, textBoxes, lineBoxManager,\n fontFamily, fontSize, fontWeight, letterSpacing, isUpright);\n lineCount++;\n if(isUpright) {\n x = mainCoords;\n }\n else {\n y = mainCoords;\n }\n break;\n }\n // 最后一行考虑endSpace,可能不够需要回退,但不能是1个字符\n if(i + num === length && endSpace && rw + endSpace > limit + (1e-10) && num > 1) {\n [num, rw, newLine] = measureLineWidth(ctx, renderMode, i, length, content, limit - endSpace, perW,\n fontFamily, fontSize, fontWeight, letterSpacing);\n // 可能加上endSpace后超过了,还得再判断一次\n if(lineClamp && newLine && lineCount + lineClampCount >= lineClamp - 1) {\n [mainCoords, maxW] = this.__lineBack(ctx, renderMode, i, i + num, content, limit - endSpace, perW,\n lineCount ? lx : x, y, maxW, endSpace, lineHeight, textBoxes, lineBoxManager,\n fontFamily, fontSize, fontWeight, letterSpacing, isUpright);\n lineCount++;\n if(isUpright) {\n x = mainCoords;\n }\n else {\n y = mainCoords;\n }\n break;\n }\n }\n maxW = Math.max(maxW, rw);\n // 根据是否第一行分开处理行首空白\n let textBox = new TextBox(this, textBoxes.length,\n lineCount && !isUpright ? lx : x,\n lineCount && isUpright ? ly : y,\n rw, lineHeight, content.slice(i, i + num), isUpright);\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox, newLine);\n // 竖排横排换行不一样\n if(isUpright) {\n x += Math.max(lineHeight, lineBoxManager.verticalLineHeight);\n }\n else {\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n }\n // 至少也要1个字符形成1行,哪怕是首行,因为是否放得下逻辑在dom中做过了\n i += num;\n if(newLine) {\n lineCount++;\n }\n }\n // 换行后Text的x重设为lx\n if(lineCount) {\n if(isUpright) {\n this.__y = this.__y1 = ly;\n }\n else {\n this.__x = this.__x1 = lx;\n }\n }\n }\n if(isUpright) {\n this.__width = x - data.x;\n this.__height = maxW;\n this.__verticalBaseline = css.getVerticalBaseline(computedStyle);\n }\n else {\n this.__width = maxW;\n this.__height = y - data.y;\n this.__baseline = css.getBaseline(computedStyle);\n }\n return lineClampCount + lineCount;\n }\n\n __layoutNone() {\n this.__width = this.__height = this.__baseline = this.__verticalBaseline = 0;\n this.__textBoxes.splice(0);\n }\n\n // 末尾行因ellipsis的缘故向前回退字符生成textBox,可能会因不满足宽度导致无法生成,此时向前继续回退TextBox\n __lineBack(ctx, renderMode, i, length, content, limit, perW, x, y, maxW, endSpace, lineHeight, textBoxes, lineBoxManager,\n fontFamily, fontSize, fontWeight, letterSpacing, isUpright) {\n let ew, bp = this.__bp, computedStyle = bp.computedStyle;\n // 临时测量ELLIPSIS的尺寸\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let font = css.setFontStyle(computedStyle);\n if(ctx.font !== font) {\n ctx.font = font;\n }\n ew = ctx.measureText(ELLIPSIS).width;\n }\n else {\n ew = inject.measureTextSync(ELLIPSIS, computedStyle[FONT_FAMILY], computedStyle[FONT_SIZE], computedStyle[FONT_WEIGHT]);\n }\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let font = css.setFontStyle(this.computedStyle);\n if (ctx.font !== font) {\n ctx.font = font;\n }\n }\n let [num, rw] = measureLineWidth(ctx, renderMode, i, length, content, limit - ew - endSpace, perW, fontFamily, fontSize, fontWeight, letterSpacing);\n // 还是不够,需要回溯查找前一个inline节点继续回退,同时防止空行首,要至少一个textBox且一个字符\n if(rw + ew > limit + (1e-10) - endSpace) {\n // 向前回溯已有的tb,需注意可能是新行开头这时还没生成新的lineBox,而旧行则至少1个内容\n // 新行的话进不来,会添加上面num的内容,旧行不添加只修改之前的tb内容也有可能删除一些\n let lineBox = lineBoxManager.lineBox;\n if(!lineBoxManager.isNewLine && lineBox && lineBox.size) {\n let list = lineBox.list;\n for(let j = list.length - 1; j >= 0; j--) {\n let tb = list[j];\n // 可能是个inlineBlock,整个省略掉,除非是第一个不作ellipsis处理\n if(!(tb instanceof TextBox)) {\n if(!j) {\n break;\n }\n let item = list.pop();\n if(isUpright) {\n y -= item.outerHeight;\n }\n else {\n x -= item.outerWidth;\n }\n limit += isUpright ? item.outerHeight : item.outerWidth;\n item.__layoutNone();\n continue;\n }\n // 先判断整个tb都删除是否可以容纳下,同时注意第1个tb不能删除因此必进\n let { content, width, height, parent } = tb;\n if(!j || limit >= width + ew + (1e-10) + endSpace) {\n let length = content.length;\n let {\n [LINE_HEIGHT]: lineHeight,\n [LETTER_SPACING]: letterSpacing,\n [FONT_SIZE]: fontSize,\n [FONT_WEIGHT]: fontWeight,\n [FONT_FAMILY]: fontFamily,\n } = parent.computedStyle;\n if(renderMode === CANVAS || renderMode === WEBGL) {\n ctx.font = css.setFontStyle(parent.computedStyle);\n }\n // 再进行查找,这里也会有至少一个字符不用担心\n let [num, rw] = measureLineWidth(ctx, renderMode, 0, length, content, limit - ew + width - endSpace, perW, fontFamily, fontSize, fontWeight, letterSpacing);\n // 可能发生x回退,当tb的内容产生减少时\n if(num !== content.length) {\n tb.__content = content.slice(0, num);\n if(isUpright) {\n y -= height - rw;\n tb.__height = rw;\n }\n else {\n x -= width - rw;\n tb.__width = rw;\n }\n }\n // 重新设置lineHeight和baseline,因为可能删除了东西\n lineBox.__resetLb(computedStyle[LINE_HEIGHT],\n isUpright ? css.getVerticalBaseline(computedStyle) : css.getBaseline(computedStyle));\n let ep = isUpright\n ? new Ellipsis(x, y + rw + endSpace, ew, bp, isUpright)\n : new Ellipsis(x + rw + endSpace, y, ew, bp, isUpright);\n lineBoxManager.addItem(ep, true);\n if(isUpright) {\n x += Math.max(lineHeight, lineBoxManager.verticalLineHeight);\n }\n else {\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n }\n maxW = Math.max(maxW, rw + ew);\n return [y, maxW];\n }\n // 舍弃这个tb,x也要向前回退,w增加,这会发生在ELLIPSIS字体很大,里面内容字体很小时\n let item = list.pop();\n if(isUpright) {\n limit += height;\n y -= height;\n }\n else {\n limit += width;\n x -= width;\n }\n let tbs = item.parent.textBoxes;\n let k = tbs.indexOf(item);\n if(k > -1) {\n tbs.splice(k, 1);\n }\n // 还得去掉dom,防止inline嵌套一直向上,同时得判断不能误删前面一个的dom\n let dom = item.parent.parent;\n let prev = list[list.length - 1];\n if(prev instanceof TextBox) {\n prev = prev.parent.parent;\n }\n while(dom !== bp && dom !== prev) {\n let contentBoxList = dom.contentBoxList || [];\n let i = contentBoxList.indexOf(item);\n if(i > -1) {\n contentBoxList.splice(i, 1);\n }\n let computedStyle = dom.computedStyle;\n if(isUpright) {\n let mbp = computedStyle[MARGIN_TOP] + computedStyle[MARGIN_BOTTOM]\n + computedStyle[PADDING_TOP] + computedStyle[PADDING_BOTTOM]\n + computedStyle[BORDER_TOP_WIDTH] + computedStyle[BORDER_BOTTOM_WIDTH];\n y -= mbp;\n limit += mbp;\n }\n else {\n let mbp = computedStyle[MARGIN_LEFT] + computedStyle[MARGIN_RIGHT]\n + computedStyle[PADDING_LEFT] + computedStyle[PADDING_RIGHT]\n + computedStyle[BORDER_LEFT_WIDTH] + computedStyle[BORDER_RIGHT_WIDTH];\n x -= mbp;\n limit += mbp;\n }\n dom.__layoutNone();\n dom = dom.domParent;\n }\n let contentBoxList = prev.contentBoxList || [];\n let i = contentBoxList.indexOf(item);\n if(i > -1) {\n contentBoxList.splice(i, 1);\n }\n }\n }\n }\n // 本次回退不用向前追溯删除textBox会进这里,最少一个字符兜底\n let textBox = new TextBox(this, textBoxes.length, x, y, rw, lineHeight, content.slice(i, i + num), isUpright);\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox, false);\n // ELLIPSIS也作为内容加入,但特殊的是指向最近block使用其样式渲染\n let ep = isUpright\n ? new Ellipsis(x, y + rw + endSpace, ew, bp, isUpright)\n : new Ellipsis(x + rw + endSpace, y, ew, bp, isUpright);\n lineBoxManager.addItem(ep, true);\n if(isUpright) {\n x += Math.max(lineHeight, lineBoxManager.verticalLineHeight);\n }\n else {\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n }\n maxW = Math.max(maxW, rw + ew);\n return [isUpright ? x : y, maxW];\n }\n\n // 外部dom换行发现超行,且一定是ellipsis时,会进这里让上一行text回退,lineBox一定有值且最后一个一定是本text的最后的textBox\n __backtrack(bp, lineBoxManager, lineBox, textBox, limit, endSpace, ew, computedStyle, ctx, renderMode, isUpright) {\n let list = lineBox.list;\n for(let j = list.length - 1; j >= 0; j--) {\n let tb = list[j];\n // 可能是个inlineBlock,整个省略掉,除非是第一个不作ellipsis处理\n if(!(tb instanceof TextBox)) {\n if(!j) {\n break;\n }\n let item = list.pop();\n limit += isUpright ? item.outerHeight : item.outerWidth;\n item.__layoutNone();\n continue;\n }\n // 先判断整个tb都删除是否可以容纳下,同时注意第1个tb不能删除因此必进\n let { content, width, height, parent } = tb;\n if(!j || limit >= width + ew + (1e-10) + endSpace) {\n let length = content.length;\n let {\n [LETTER_SPACING]: letterSpacing,\n [FONT_SIZE]: fontSize,\n [FONT_WEIGHT]: fontWeight,\n [FONT_FAMILY]: fontFamily,\n } = parent.computedStyle;\n if(renderMode === CANVAS || renderMode === WEBGL) {\n ctx.font = css.setFontStyle(parent.computedStyle);\n }\n let perW = (fontSize * 0.8) + letterSpacing;\n // 再进行查找,这里也会有至少一个字符不用担心\n let [num, rw] = measureLineWidth(ctx, renderMode, 0, length, content, limit - ew - endSpace + width, perW, fontFamily, fontSize, fontWeight, letterSpacing);\n // 可能发生x回退,当tb的内容产生减少时\n if(num !== content.length) {\n tb.__content = content.slice(0, num);\n if(isUpright) {\n tb.__height = rw;\n }\n else {\n tb.__width = rw;\n }\n }\n // 重新设置lineHeight和baseline,因为可能删除了东西\n lineBox.__resetLb(computedStyle[LINE_HEIGHT],\n isUpright ? css.getVerticalBaseline(computedStyle) : css.getBaseline(computedStyle));\n let ep = isUpright\n ? new Ellipsis(tb.x, tb.y + rw + endSpace, ew, bp, isUpright)\n : new Ellipsis(tb.x + rw + endSpace, tb.y, ew, bp, isUpright);\n lineBoxManager.addItem(ep, true);\n return;\n }\n // 舍弃这个tb,x也要向前回退,w增加,这会发生在ELLIPSIS字体很大,里面内容字体很小时\n let item = list.pop();\n limit += isUpright ? height : width;\n let tbs = item.parent.textBoxes;\n let k = tbs.indexOf(item);\n if(k > -1) {\n tbs.splice(k, 1);\n }\n // 还得去掉dom,防止inline嵌套一直向上,同时得判断不能误删前面一个的dom\n let dom = item.parent.parent;\n let prev = list[list.length - 1];\n if(prev instanceof TextBox) {\n prev = prev.parent.parent;\n }\n while(dom !== bp && dom !== prev) {\n let contentBoxList = dom.contentBoxList || [];\n let i = contentBoxList.indexOf(item);\n if(i > -1) {\n contentBoxList.splice(i, 1);\n }\n let computedStyle = dom.computedStyle;\n if(isUpright) {\n let mbp = computedStyle[MARGIN_TOP] + computedStyle[MARGIN_BOTTOM]\n + computedStyle[PADDING_TOP] + computedStyle[PADDING_BOTTOM]\n + computedStyle[BORDER_TOP_WIDTH] + computedStyle[BORDER_BOTTOM_WIDTH];\n limit += mbp;\n }\n else {\n let mbp = computedStyle[MARGIN_LEFT] + computedStyle[MARGIN_RIGHT]\n + computedStyle[PADDING_LEFT] + computedStyle[PADDING_RIGHT]\n + computedStyle[BORDER_LEFT_WIDTH] + computedStyle[BORDER_RIGHT_WIDTH];\n limit += mbp;\n }\n dom.__layoutNone();\n dom = dom.domParent;\n }\n let contentBoxList = prev.contentBoxList || [];\n let i = contentBoxList.indexOf(item);\n if(i > -1) {\n contentBoxList.splice(i, 1);\n }\n }\n }\n\n __offsetX(diff, isLayout) {\n super.__offsetX(diff, isLayout);\n if(isLayout) {\n this.textBoxes.forEach(item => {\n item.__offsetX(diff);\n });\n }\n this.__x1 += diff;\n }\n\n __offsetY(diff, isLayout) {\n super.__offsetY(diff, isLayout);\n if(isLayout) {\n this.textBoxes.forEach(item => {\n item.__offsetY(diff);\n });\n }\n this.__y1 += diff;\n }\n\n __tryLayInline(total) {\n return total - this.firstCharWidth;\n }\n\n __inlineSize(isUpright) {\n let min, max;\n this.textBoxes.forEach((item, i) => {\n if(i) {\n min = Math.min(min, isUpright ? item.y : item.x);\n max = Math.max(max, (isUpright ? item.y : item.x) + item.width);\n }\n else {\n min = isUpright ? item.y : item.x;\n max = (isUpright ? item.y : item.x) + item.width;\n }\n });\n if(isUpright) {\n this.__y = this.__y1 = min;\n this.__x = this.__x1;\n this.__height = max - min;\n }\n else {\n this.__x = this.__x1 = min;\n this.__y = this.__y1;\n this.__width = max - min;\n }\n }\n\n render(renderMode, ctx, dx = 0, dy = 0) {\n let { __isDestroyed, computedStyle, textBoxes, cacheStyle } = this;\n if(renderMode === SVG) {\n this.__virtualDom = {\n type: 'text',\n children: [],\n };\n }\n // >=REPAINT清空bbox\n this.__bbox = null;\n this.__filterBbox = null;\n if(__isDestroyed || computedStyle[DISPLAY] === 'none' || computedStyle[VISIBILITY] === 'hidden'\n || !textBoxes.length) {\n this.__hasContent = false;\n return;\n }\n this.__hasContent = true;\n if(renderMode === WEBGL) {\n return;\n }\n if(renderMode === CANVAS) {\n let font = css.setFontStyle(computedStyle);\n if(ctx.font !== font) {\n ctx.font = font;\n }\n let color = cacheStyle[COLOR];\n // 渐变\n if(color.k) {\n let dom = this.parent;\n color = dom.__gradient(renderMode, ctx, dom.__bx1, dom.__by1, dom.__bx2, dom.__by2, color, dx, dy).v;\n }\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n let strokeWidth = computedStyle[TEXT_STROKE_WIDTH];\n if(ctx.lineWidth !== strokeWidth) {\n ctx.lineWidth = strokeWidth;\n }\n let textStrokeColor = cacheStyle[TEXT_STROKE_COLOR];\n // 渐变\n if(textStrokeColor.k) {\n let dom = this.parent;\n textStrokeColor = dom.__gradient(renderMode, ctx, dom.__bx1, dom.__by1, dom.__bx2, dom.__by2, textStrokeColor, dx, dy).v;\n }\n if(ctx.strokeStyle !== textStrokeColor) {\n ctx.strokeStyle = textStrokeColor;\n }\n }\n // 可能为空,整个是个ellipsis\n textBoxes.forEach(item => {\n item.render(renderMode, ctx, computedStyle, cacheStyle, dx, dy);\n });\n if(renderMode === SVG) {\n this.__virtualDom.children = textBoxes.map(textBox => textBox.virtualDom);\n }\n }\n\n __destroy() {\n if(this.__isDestroyed) {\n return;\n }\n super.__destroy();\n let __cache = this.__cache;\n if(__cache) {\n __cache.release();\n }\n }\n\n getComputedStyle(key) {\n return this.__domParent.getComputedStyle(key);\n }\n\n updateContent(s, cb) {\n if(s === this.__content || this.__isDestroyed) {\n this.__content = s;\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n this.__content = s;\n this.__root.__addUpdate(this.__domParent, null, level.REFLOW, null, null, null, cb);\n }\n\n remove(cb) {\n let { __root: root } = this;\n let parent = this.isShadowRoot ? this.hostRoot.__parent: this.__parent;\n let i;\n if(parent) {\n let target = this.isShadowRoot ? this.hostRoot : this;\n i = parent.__children.indexOf(target);\n parent.__children.splice(i, 1);\n i = parent.__zIndexChildren.indexOf(target);\n parent.__zIndexChildren.splice(i, 1);\n let { __prev, __next } = this;\n if(__prev) {\n __prev.__next = __next;\n }\n if(__next) {\n __next.__prev = __prev;\n }\n }\n if(this.__isDestroyed) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n parent.__deleteStruct(this, i);\n // 不可见仅改变数据结构\n if(this.computedStyle[DISPLAY] === 'none') {\n this.__destroy();\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 可见在reflow逻辑做结构关系等,text视为父变更\n root.__addUpdate(this, null, level.REFLOW, null, true, null, cb);\n }\n\n get content() {\n return this.__content;\n }\n\n set content(v) {\n this.__content = v;\n }\n\n get textBoxes() {\n return this.__textBoxes;\n }\n\n get charWidth() {\n let { __widthHash, content, computedStyle, root: { ctx, renderMode } } = this;\n let {\n [FONT_FAMILY]: fontFamily,\n [FONT_SIZE]: fontSize,\n [FONT_WEIGHT]: fontWeight,\n [LETTER_SPACING]: letterSpacing,\n } = computedStyle;\n let fontKey = getFontKey(fontFamily, fontSize, fontWeight, letterSpacing);\n if(!__widthHash.hasOwnProperty(fontKey)) {\n __widthHash[fontKey] = {};\n }\n let o = __widthHash[fontKey];\n if(!o.hasOwnProperty('charWidth')) {\n let max = 0;\n if(renderMode === CANVAS || renderMode === WEBGL) {\n if(renderMode === WEBGL) {\n ctx = inject.getFontCanvas().ctx;\n }\n ctx.font = css.setFontStyle(computedStyle);\n for(let i = 0, len = content.length; i < len; i++) {\n max = Math.max(max, ctx.measureText(content.charAt([i])).width);\n }\n }\n else if(renderMode === SVG) {\n max = inject.measureTextListMax(content, fontFamily, fontSize, fontWeight);\n }\n o.charWidth = max + letterSpacing;\n }\n return o.charWidth;\n }\n\n get firstCharWidth() {\n let { __widthHash, content, computedStyle, root: { ctx, renderMode } } = this;\n let {\n [FONT_FAMILY]: fontFamily,\n [FONT_SIZE]: fontSize,\n [FONT_WEIGHT]: fontWeight,\n [LETTER_SPACING]: letterSpacing,\n } = computedStyle;\n let fontKey = getFontKey(fontFamily, fontSize, fontWeight, letterSpacing);\n if(!__widthHash.hasOwnProperty(fontKey)) {\n __widthHash[fontKey] = {};\n }\n let o = __widthHash[fontKey];\n if(!o.hasOwnProperty('firstCharWidth')) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n if(renderMode === WEBGL) {\n ctx = inject.getFontCanvas().ctx;\n }\n ctx.font = css.setFontStyle(computedStyle);\n o.firstCharWidth = ctx.measureText(content.charAt(0)).width + letterSpacing;\n }\n else if(renderMode === SVG) {\n o.firstCharWidth = inject.measureTextSync(content.charAt(0), fontFamily, fontSize, fontWeight) + letterSpacing;\n }\n }\n return o.firstCharWidth;\n }\n\n get textWidth() {\n let { __widthHash, content, computedStyle, root: { ctx, renderMode } } = this;\n let {\n [FONT_FAMILY]: fontFamily,\n [FONT_SIZE]: fontSize,\n [FONT_WEIGHT]: fontWeight,\n [LETTER_SPACING]: letterSpacing,\n } = computedStyle;\n let fontKey = getFontKey(fontFamily, fontSize, fontWeight, letterSpacing);\n if(!__widthHash.hasOwnProperty(fontKey)) {\n __widthHash[fontKey] = {};\n }\n let o = __widthHash[fontKey];\n if(!o.hasOwnProperty('textWidth')) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n if(renderMode === WEBGL) {\n ctx = inject.getFontCanvas().ctx;\n }\n ctx.font = css.setFontStyle(computedStyle);\n o.textWidth = ctx.measureText(content).width + letterSpacing * content.length;\n }\n else if(renderMode === SVG) {\n o.textWidth = inject.measureTextSync(content, fontFamily, fontSize, fontWeight) + letterSpacing * content.length;\n }\n }\n return o.textWidth;\n }\n\n get clientWidth() {\n return this.__width || 0;\n }\n\n get clientHeight() {\n return this.__height || 0;\n }\n\n get offsetWidth() {\n return this.__width || 0;\n }\n\n get offsetHeight() {\n return this.__height || 0;\n }\n\n get outerWidth() {\n return this.__width || 0;\n }\n\n get outerHeight() {\n return this.__height || 0;\n }\n\n get root() {\n return this.__domParent.__root;\n }\n\n get currentStyle() {\n return this.__domParent.__currentStyle;\n }\n\n get __currentStyle() {\n return this.__domParent.__currentStyle;\n }\n\n get style() {\n return this.__domParent.__style;\n }\n\n get computedStyle() {\n return this.__domParent.__computedStyle;\n }\n\n get __computedStyle() {\n return this.__domParent.__computedStyle;\n }\n\n get cacheStyle() {\n return this.__domParent.__cacheStyle;\n }\n\n get __cacheStyle() {\n return this.__domParent.__cacheStyle;\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n __x1, __y1, width, height,\n computedStyle: {\n [TEXT_STROKE_WIDTH]: textStrokeWidth,\n },\n } = this;\n // 文字描边暂时不清楚最大值是多少,影响不确定,先按描边宽算,因为会出现>>0.5宽的情况\n let half = textStrokeWidth;\n this.__bbox = [__x1 - half, __y1 - half, __x1 + width + half, __y1 + height + half];\n }\n return this.__bbox;\n }\n\n get filterBbox() {\n if(!this.__filterBbox) {\n let bbox = this.__bbox || this.bbox;\n let filter = this.computedStyle[FILTER];\n this.__filterBbox = css.spreadFilter(bbox, filter);\n }\n return this.__filterBbox;\n }\n\n get isShadowRoot() {\n return !this.__parent && this.__host && this.__host !== this.root;\n }\n\n get matrix() {\n return this.__domParent.__matrix;\n }\n\n get matrixEvent() {\n return this.__domParent.__matrixEvent;\n }\n\n get perspectiveMatrix() {\n return this.__domParent.__perspectiveMatrix;\n }\n}\n\nexport default Text;\n","import util from './util';\n\nconst { isFunction } = util;\n\nclass Event {\n constructor() {\n this.__eHash = {};\n }\n\n on(id, handle) {\n if(!isFunction(handle)) {\n return;\n }\n let self = this;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.on(id[i], handle);\n }\n }\n else {\n if(!self.__eHash.hasOwnProperty(id)) {\n self.__eHash[id] = [];\n }\n // 遍历防止此handle被侦听过了\n for(let i = 0, item = self.__eHash[id], len = item.length; i < len; i++) {\n if(item[i] === handle) {\n return self;\n }\n }\n self.__eHash[id].push(handle);\n }\n return self;\n }\n\n once(id, handle) {\n if(!isFunction(handle)) {\n return;\n }\n let self = this;\n\n // 包裹一层会导致添加后删除对比引用删不掉,需保存原有引用进行对比\n function cb(...data) {\n handle.apply(self, data);\n self.off(id, cb);\n }\n\n cb.__karasEventCb = handle;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.once(id[i], handle);\n }\n }\n else if(handle) {\n self.on(id, cb);\n }\n return this;\n }\n\n off(id, handle) {\n let self = this;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.off(id[i], handle);\n }\n }\n else if(self.__eHash.hasOwnProperty(id)) {\n if(handle) {\n for(let i = 0, item = self.__eHash[id], len = item.length; i < len; i++) {\n // 需考虑once包裹的引用对比\n if(item[i] === handle || item[i].__karasEventCb === handle) {\n item.splice(i, 1);\n break;\n }\n }\n }\n // 未定义为全部清除\n else {\n delete self.__eHash[id];\n }\n }\n return this;\n }\n\n emit(id, ...data) {\n let self = this;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.emit(id[i], data);\n }\n }\n else {\n if(self.__eHash.hasOwnProperty(id)) {\n let list = self.__eHash[id];\n if(list.length) {\n list = list.slice();\n for(let i = 0, len = list.length; i < len; i++) {\n let cb = list[i];\n if(isFunction(cb)) {\n cb.apply(self, data);\n }\n }\n }\n }\n }\n return this;\n }\n\n static mix(...obj) {\n for(let i = obj.length - 1; i >= 0; i--) {\n let o = obj[i];\n let event = new Event();\n o.__eHash = {};\n let fns = ['on', 'once', 'off', 'emit'];\n for(let j = fns.length - 1; j >= 0; j--) {\n let fn = fns[j];\n o[fn] = event[fn];\n }\n }\n }\n\n static REFRESH = 'refresh';\n static PAUSE = 'pause';\n static PLAY = 'play';\n static FRAME = 'frame';\n static FINISH = 'finish';\n static CANCEL = 'cancel';\n static BEGIN = 'begin';\n static END = 'end';\n}\n\nexport default Event;\n","import Node from './Node';\nimport Text from './Text';\nimport Event from '../util/Event';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport css from '../style/css';\nimport change from '../refresh/change';\n\nconst { isNil, isFunction, extend } = util;\n\nconst REGISTER = {};\n\nclass Component extends Event {\n constructor(props = {}) {\n super();\n this.__tagName = /(?:function|class)\\s+([\\w$]+)/.exec(this.constructor.toString())[1];\n // 构建工具中都是arr,手写可能出现hash情况\n if(Array.isArray(props)) {\n this.props = util.arr2hash(props);\n }\n else {\n this.props = props;\n }\n this.__parent = null;\n this.__host = null;\n this.__ref = {};\n this.__isMounted = false;\n this.__taskList = [];\n }\n\n /**\n * build中调用初始化,处理过flatten\n */\n __init() {\n this.__ref = {};\n let sr = this.__shadowRoot;\n if(sr instanceof Text) {\n // 文字视作为父节点的直接文字子节点\n }\n else if(sr instanceof Node) {\n let style = css.normalize(this.props.style);\n let keys = Object.keys(style);\n extend(sr.style, style, keys);\n extend(sr.currentStyle, style, keys);\n // 事件添加到sr\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n if(/^on[a-zA-Z]/.test(k)) {\n k = k.slice(2).toLowerCase();\n sr.listener[k] = v;\n }\n });\n }\n // 自定义事件无视返回强制添加\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n if(/^on-[a-zA-Z\\d_$]/.test(k)) {\n k = k.slice(3);\n this.on(k, v);\n }\n });\n if(isFunction(this.componentDidMount)) {\n this.__root.once(Event.REFRESH, () => {\n this.componentDidMount();\n });\n }\n }\n\n render() {\n inject.warn('Component should implement render()');\n }\n\n __destroy() {\n if(this.__isDestroyed) {\n return;\n }\n this.__isDestroyed = true;\n this.__isMounted = false;\n let ref = this.props.ref;\n if(!isNil(ref) && !isFunction(ref)) {\n delete this.__root.__ref[ref];\n }\n if(isFunction(this.componentWillUnmount)) {\n this.componentWillUnmount();\n }\n if(this.__shadow) {\n this.__shadow.__destroy();\n }\n this.__host = this.__hostRoot\n = this.__shadow = this.__shadowRoot\n = this.__prev = this.__next = this.__root\n = this.__parent = this.__domParent = null;\n }\n\n __emitEvent(e, force) {\n let sr = this.shadowRoot;\n if(sr instanceof Text) {\n return;\n }\n let res = sr.__emitEvent(e, force);\n if(res) {\n e.target = this;\n return true;\n }\n }\n\n get tagName() {\n return this.__tagName;\n }\n\n get shadow() {\n return this.__shadow;\n }\n\n get shadowRoot() {\n return this.__shadowRoot;\n }\n\n get root() {\n return this.__root;\n }\n\n get host() {\n return this.__host;\n }\n\n get hostRoot() {\n return this.__hostRoot;\n }\n\n get parent() {\n return this.__parent;\n }\n\n get prev() {\n return this.__prev;\n }\n\n get next() {\n return this.__next;\n }\n\n get ref() {\n return this.__ref;\n }\n\n get domParent() {\n return this.__domParent;\n }\n\n get state() {\n return this.__state;\n }\n\n set state(v) {\n this.__state = v;\n }\n\n get isDestroyed() {\n return this.__isDestroyed;\n }\n\n static get REGISTER() {\n return REGISTER;\n }\n\n static getRegister(name) {\n if(!name || !util.isString(name) || !/^[A-Z]/.test(name)) {\n throw new Error('Invalid param');\n }\n if(!REGISTER.hasOwnProperty(name)) {\n throw new Error(`Component has not register: ${name}`);\n }\n return REGISTER[name];\n }\n\n static register(name, obj) {\n if(!name || !util.isString(name) || !/^[A-Z]/.test(name)\n || !obj.prototype || !(obj.prototype instanceof Component)) {\n throw new Error('Invalid param: Component register');\n }\n if(Component.hasRegister(name)) {\n throw new Error(`Component has already register: ${name}`);\n }\n REGISTER[name] = obj;\n }\n\n static hasRegister(name) {\n return name && REGISTER.hasOwnProperty(name);\n }\n\n static delRegister(name) {\n if(Component.hasRegister(name)) {\n delete REGISTER[name];\n }\n }\n}\n\nObject.keys(change.GEOM).concat([\n 'x',\n 'y',\n 'width',\n 'height',\n 'outerWidth',\n 'outerHeight',\n 'clientWidth',\n 'clientHeight',\n 'offsetWidth',\n 'offsetHeight',\n 'style',\n 'animationList',\n 'currentStyle',\n 'computedStyle',\n 'cacheStyle',\n '__currentStyle',\n '__computedStyle',\n '__cacheStyle',\n 'currentProps',\n '__currentProps',\n 'cacheProps',\n '__cacheProps',\n 'baseline',\n 'virtualDom',\n 'mask',\n 'maskId',\n 'textWidth',\n 'content',\n 'lineBoxes',\n 'charWidthList',\n 'charWidth',\n '__layoutData',\n '__struct',\n 'bbox',\n 'contentBoxList',\n 'listener',\n 'matrix',\n 'matrixEvent',\n]).forEach(fn => {\n Object.defineProperty(Component.prototype, fn, {\n get() {\n let sr = this.shadowRoot;\n if(sr) {\n return sr[fn];\n }\n },\n });\n});\n\n[\n '__layout',\n '__layoutFlow',\n '__layoutStyle',\n '__layoutAbs',\n '__layoutNone',\n '__tryLayInline',\n '__offsetX',\n '__offsetY',\n '__calAutoBasis',\n '__computeReflow',\n '__mp',\n 'animate',\n 'removeAnimate',\n 'clearAnimate',\n 'frameAnimate',\n 'updateStyle',\n 'getBoundingClientRect',\n 'getComputedStyle',\n 'clearCache',\n '__structure',\n '__modifyStruct',\n '__updateStruct',\n 'flowChildren',\n 'absChildren',\n '__isRealInline',\n '__calBasis',\n '__calMinMax',\n '__computeMeasure',\n 'appendChild',\n 'prependChild',\n 'insertBefore',\n 'insertAfter',\n 'removeChild',\n 'remove',\n].forEach(fn => {\n Component.prototype[fn] = function() {\n let sr = this.shadowRoot;\n if(sr && isFunction(sr[fn])) {\n return sr[fn].apply(sr, arguments);\n }\n };\n});\n\nexport default Component;\n","import Ellipsis from './Ellipsis';\nimport TextBox from './TextBox';\nimport enums from '../util/enums';\n\nconst {\n STYLE_KEY: {\n MARGIN_TOP,\n MARGIN_LEFT,\n MARGIN_RIGHT,\n MARGIN_BOTTOM,\n PADDING_TOP,\n PADDING_LEFT,\n PADDING_RIGHT,\n PADDING_BOTTOM,\n BORDER_TOP_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n },\n} = enums;\n\n/**\n * 获取inline的每一行内容的矩形坐标4个点,同时附带上border的矩形,比前面4个点尺寸大或相等(有无border/padding)\n * @param xom\n * @param isUpright\n * @param contentBoxList\n * @param start\n * @param end\n * @param lineBox\n * @param baseline\n * @param lineHeight\n * @param leading\n * @param isStart\n * @param isEnd\n * @param backgroundClip\n * @param paddingTop\n * @param paddingRight\n * @param paddingBottom\n * @param paddingLeft\n * @param borderTopWidth\n * @param borderRightWidth\n * @param borderBottomWidth\n * @param borderLeftWidth\n * @returns {(*|number)[]}\n */\nfunction getInlineBox(xom, isUpright, contentBoxList, start, end, lineBox, baseline,\n lineHeight, leading, isStart, isEnd, backgroundClip,\n paddingTop, paddingRight, paddingBottom, paddingLeft,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth) {\n // 根据bgClip确定y伸展范围,inline渲染bg扩展到pb的位置不影响布局\n let bcStart = 0, bcEnd = 0;\n let pbStart = isUpright ? (paddingLeft + borderLeftWidth) : (paddingTop + borderTopWidth);\n let pbEnd = isUpright ? (paddingRight + borderRightWidth) : (paddingBottom + borderBottomWidth);\n if(backgroundClip === 'paddingBox') {\n bcStart = isUpright ? paddingLeft : paddingTop;\n bcEnd = isUpright ? paddingRight : paddingBottom;\n }\n else if(backgroundClip === 'borderBox') {\n bcStart = pbStart;\n bcEnd = pbEnd;\n }\n // inline的baseline和lineBox的差值,不同lh时造成的偏移,一般为多个textBox时比较小的那个发生\n // 垂直排版不能简单算baseline差值,因为原点坐标系不一样\n let diff;\n if(isUpright) {\n diff = lineBox.verticalBaseline - baseline;\n }\n else {\n diff = lineBox.baseline - baseline;\n }\n let x1, y1, x2, y2, bx1, by1, bx2, by2;\n // x坐标取首尾contentBox的左右2侧,clip布局时已算好;y是根据lineHeight和lineBox的高度以及baseline对齐后计算的\n // 垂直排版则互换x/y逻辑\n if(isUpright) {\n x1 = lineBox.x + diff - bcStart + leading;\n y1 = start.y;\n bx1 = lineBox.x + diff - pbStart + leading;\n }\n else {\n x1 = start.x;\n y1 = lineBox.y + lineBox.oy + diff - bcStart + leading;\n by1 = lineBox.y + lineBox.oy + diff - pbStart + leading;\n }\n // 容器内包含的inline节点,需考虑行首水平mbp(垂直排版为垂直头mbp)\n let dom = start instanceof TextBox ? start.parent.domParent : start.domParent;\n while(dom !== xom) {\n let list = dom.contentBoxList;\n if(start === list[0]) {\n if(isUpright) {\n let {\n [MARGIN_TOP]: marginTop,\n [PADDING_TOP]: paddingTop,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n } = dom.computedStyle;\n y1 -= marginTop + paddingTop + borderTopWidth;\n }\n else {\n let {\n [MARGIN_LEFT]: marginLeft,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = dom.computedStyle;\n x1 -= marginLeft + paddingLeft + borderLeftWidth;\n }\n }\n dom = dom.domParent;\n }\n // 第一个需考虑容器本身的padding/border\n if(isUpright) {\n by1 = y1;\n if(isStart) {\n by1 -= paddingTop + borderTopWidth;\n if(backgroundClip === 'paddingBox') {\n y1 -= paddingTop;\n }\n else if(backgroundClip === 'borderBox') {\n y1 -= paddingTop + borderTopWidth;\n }\n }\n x2 = lineBox.x + diff + lineHeight + bcEnd - leading;\n bx2 = lineBox.x + diff + lineHeight + pbEnd - leading;\n y2 = end.y + end.outerHeight;\n }\n else {\n bx1 = x1;\n if(isStart) {\n bx1 -= paddingLeft + borderLeftWidth;\n if(backgroundClip === 'paddingBox') {\n x1 -= paddingLeft;\n }\n else if(backgroundClip === 'borderBox') {\n x1 -= paddingLeft + borderLeftWidth;\n }\n }\n x2 = end.x + end.outerWidth;\n y2 = lineBox.y + lineBox.oy + diff + lineHeight + bcEnd - leading;\n by2 = lineBox.y + lineBox.oy + diff + lineHeight + pbEnd - leading;\n }\n // TextBox的parent是Text,再是Dom,这里一定是inline,无嵌套就是xom本身,有则包含若干层最上层还是xom\n dom = end instanceof TextBox ? end.parent.domParent : end.domParent;\n // 从end开始,向上获取dom节点的尾部mpb进行累加,直到xom跳出\n while(dom !== xom) {\n let list = dom.contentBoxList;\n if(end === list[list.length - 1]) {\n if(isUpright) {\n let {\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_BOTTOM]: paddingBottom,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n } = dom.computedStyle;\n y2 += marginBottom + paddingBottom + borderBottomWidth;\n }\n else {\n let {\n [MARGIN_RIGHT]: marginRight,\n [PADDING_RIGHT]: paddingRight,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } = dom.computedStyle;\n x2 += marginRight + paddingRight + borderRightWidth;\n }\n }\n dom = dom.domParent;\n }\n if(isUpright) {\n by2 = y2;\n if(isEnd) {\n by2 += paddingBottom + borderBottomWidth;\n if(backgroundClip === 'paddingBox') {\n y2 += paddingBottom;\n }\n else if(backgroundClip === 'borderBox') {\n y2 += paddingBottom + borderBottomWidth;\n }\n }\n }\n else {\n bx2 = x2;\n if(isEnd) {\n bx2 += paddingRight + borderRightWidth;\n if(backgroundClip === 'paddingBox') {\n x2 += paddingRight;\n }\n else if(backgroundClip === 'borderBox') {\n x2 += paddingRight + borderRightWidth;\n }\n }\n }\n return [x1, y1, x2, y2, bx1, by1, bx2, by2];\n}\n\n/**\n * 统计inline的所有contentBox排成一行时的总宽度,考虑嵌套的mpb\n * @param xom\n * @param contentBoxList\n * @param isUpright\n * @returns {number}\n */\nfunction getInlineWidth(xom, contentBoxList, isUpright) {\n let sum = 0;\n let length = contentBoxList.length;\n if(contentBoxList[length - 1] instanceof Ellipsis) {\n length--;\n }\n for(let i = 0; i < length; i++) {\n let contentBox = contentBoxList[i];\n if(isUpright) {\n sum += contentBox.height;\n }\n else {\n sum += contentBox.width;\n }\n // 嵌套时,首尾box考虑mpb\n let dom = contentBox instanceof TextBox ? contentBox.parent.domParent : contentBox.domParent;\n while(dom !== xom) {\n let list = dom.contentBoxList;\n if(contentBox === list[0]) {\n if(isUpright) {\n let {\n [MARGIN_TOP]: marginTop,\n [PADDING_TOP]: paddingTop,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n } = dom.computedStyle;\n sum += marginTop + paddingTop + borderTopWidth;\n }\n else {\n let {\n [MARGIN_LEFT]: marginLeft,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = dom.computedStyle;\n sum += marginLeft + paddingLeft + borderLeftWidth;\n }\n }\n if(contentBox === list[list.length - 1]) {\n if(isUpright) {\n let {\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_BOTTOM]: paddingBottom,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n } = dom.computedStyle;\n sum += marginBottom + paddingBottom + borderBottomWidth;\n }\n else {\n let {\n [MARGIN_RIGHT]: marginRight,\n [PADDING_RIGHT]: paddingRight,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } = dom.computedStyle;\n sum += marginRight + paddingRight + borderRightWidth;\n }\n }\n dom = dom.domParent;\n }\n }\n return sum;\n}\n\nexport default {\n getInlineBox,\n getInlineWidth,\n};\n","import unit from './unit';\nimport transform from './transform';\nimport enums from '../util/enums';\n\nconst { STYLE_KEY: { SCALE_X, SCALE_Y } } = enums;\nconst { NUMBER } = unit;\n\nfunction matrixResize(imgWidth, imgHeight, targetWidth, targetHeight, x, y, w, h) {\n if(imgWidth === targetWidth && imgHeight === targetHeight) {\n return;\n }\n let list = [\n { k: SCALE_X, v: { v: targetWidth / imgWidth, u: NUMBER } },\n { k: SCALE_Y, v: { v: targetHeight / imgHeight, u: NUMBER } },\n ];\n return transform.calMatrixWithOrigin(list, x, y, w, h);\n}\n\nexport default {\n matrixResize,\n};\n","import border from './border';\nimport transform from './transform';\nimport mx from '../math/matrix';\nimport mode from '../refresh/mode';\nimport painter from '../util/painter';\nimport util from '../util/util';\nimport enums from '../util/enums';\nimport image from './image';\n\nconst {\n STYLE_KEY: {\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n },\n} = enums;\nconst { clone, joinArr } = util;\nconst { canvasPolygon, svgPolygon } = painter;\n\nfunction renderBgc(xom, renderMode, ctx, color, list, x, y, w, h, btlr, btrr, bbrr, bblr,\n method = 'fill', isInline = false, dx = 0, dy = 0) {\n // radial渐变ellipse形状会有matrix,用以从圆缩放到椭圆\n let matrix, cx, cy;\n if(Array.isArray(color)) {\n matrix = color[1];\n cx = color[2];\n cy = color[3];\n color = color[0];\n }\n // border-radius使用三次贝塞尔曲线模拟1/4圆角,误差在[0, 0.000273]之间\n list = list || border.calRadius(x, y, w, h, btlr, btrr, bbrr, bblr);\n if(!list) {\n list = [\n [x, y],\n [x + w, y],\n [x + w, y + h],\n [x, y + h],\n [x, y],\n ];\n }\n // 椭圆有matrix,用逆矩阵变化点来完成\n if(matrix) {\n matrix = transform.calMatrixByOrigin(matrix, cx, cy);\n let t = mx.inverse(matrix);\n list = list.map(item => {\n if(!item || !item.length) {\n return null;\n }\n let arr = [];\n for(let i = 0, len = item.length; i < len; i += 2) {\n let p = mx.calPoint({ x: item[i], y: item[i + 1] }, t);\n arr.push(p.x);\n arr.push(p.y);\n }\n return arr;\n });\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(matrix) {\n ctx.save();\n let me = xom.matrixEvent;\n matrix = mx.multiply(me, matrix);\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n }\n ctx.beginPath();\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n canvasPolygon(ctx, list, dx, dy);\n ctx[method]();\n ctx.closePath();\n if(matrix) {\n ctx.restore();\n }\n }\n else if(renderMode === mode.SVG) {\n let d = svgPolygon(list);\n if(isInline) {\n let v = {\n tagName: 'symbol',\n props: [],\n children: [\n {\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', color],\n ],\n },\n ],\n };\n xom.__cacheDefs.push(v);\n return ctx.add(v);\n }\n else {\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', color],\n ],\n });\n // 椭圆渐变独有\n if(matrix) {\n let bb = xom.virtualDom.bb;\n bb[bb.length - 1].props.push(['transform', `matrix(${joinArr(mx.m2m6(matrix), ',')})`]);\n }\n }\n }\n}\n\nfunction renderImage(xom, renderMode, ctx, loadBgi,\n bx1, by1, bx2, by2, btlr, btrr, bbrr, bblr,\n computedStyle, i, backgroundSize, backgroundRepeat, isInline,\n dx = 0, dy = 0) {\n let source = loadBgi.source;\n // 无source不绘制,可能错误或加载中\n if(source) {\n bx1 += dx;\n by1 += dy;\n bx2 += dx;\n by2 += dy;\n let bgW = bx2 - bx1;\n let bgH = by2 - by1;\n let { width, height } = loadBgi;\n let [w, h] = backgroundSize[i] || [];\n // -1为auto,-2为contain,-3为cover\n if(w === -1 && h === -1) {\n w = width;\n h = height;\n }\n else if(w === -2) {\n if(width > bgW && height > bgH) {\n w = width / bgW;\n h = height / bgH;\n if(w >= h) {\n w = bgW;\n h = w * height / width;\n }\n else {\n h = bgH;\n w = h * width / height;\n }\n }\n else if(width > bgW) {\n w = bgW;\n h = w * height / width;\n }\n else if(height > bgH) {\n h = bgH;\n w = h * width / height;\n }\n else {\n w = width;\n h = height;\n }\n }\n else if(w === -3) {\n if(bgW > width && bgH > height) {\n w = width / bgW;\n h = height / bgH;\n if(w <= h) {\n w = bgW;\n h = w * height / width;\n }\n else {\n h = bgH;\n w = h * width / height;\n }\n }\n else if(bgW > width) {\n w = bgW;\n h = w * height / width;\n }\n else if(bgH > height) {\n h = bgH;\n w = h * width / height;\n }\n else {\n w = width / bgW;\n h = height / bgH;\n if(w <= h) {\n w = bgW;\n h = w * height / width;\n }\n else {\n h = bgH;\n w = h * width / height;\n }\n }\n }\n else if(w === -1) {\n w = h * width / height;\n }\n else if(h === -1) {\n h = w * height / width;\n }\n let bgX = computedStyle[BACKGROUND_POSITION_X][i] || 0;\n if(/%/.test(bgX)) {\n bgX = (bgW - w) * parseFloat(bgX) * 0.01;\n }\n bgX += bx1;\n let bgY = computedStyle[BACKGROUND_POSITION_Y][i] || 0;\n if(/%/.test(bgY)) {\n bgY = (bgH - h) * parseFloat(bgY) * 0.01;\n }\n bgY += by1;\n // 超出尺寸模拟mask截取\n let needMask = bgX < bx1 || bgY < by1 || (bgX + w) > (bx1 + bgW) || (bgY + h) > (by1 + bgH);\n // 计算因为repeat,需要向4个方向扩展渲染几个数量图片\n let xnl = 0;\n let xnr = 0;\n let ynt = 0;\n let ynb = 0;\n // repeat-x\n if(['repeatX', 'repeat'].indexOf(backgroundRepeat[i]) > -1) {\n let diff = bgX - bx1;\n if(diff > 0) {\n xnl = Math.ceil(diff / w);\n }\n diff = bx1 + bgW - bgX - w;\n if(diff > 0) {\n xnr = Math.ceil(diff / w);\n }\n }\n // repeat-y\n if(['repeatY', 'repeat'].indexOf(backgroundRepeat[i]) > -1) {\n let diff = bgY - by1;\n if(diff > 0) {\n ynt = Math.ceil(diff / h);\n }\n diff = by1 + bgH - bgY - h;\n if(diff > 0) {\n ynb = Math.ceil(diff / h);\n }\n }\n // 分同行列和4个角分别判断,先看同行同列,再看4个角的象限\n let repeat = [];\n if(xnl > 0) {\n for(let i = 0; i < xnl; i++) {\n let x = bgX - (i + 1) * w;\n repeat.push([x, bgY]);\n // 看最左边超过没有\n if(!needMask && i === 0 && x < bx1) {\n needMask = true;\n }\n }\n }\n if(xnr > 0) {\n for(let i = 0; i < xnr; i++) {\n let x = bgX + (i + 1) * w;\n repeat.push([x, bgY]);\n // 看最右边超过没有\n if(!needMask && i === xnr - 1 && x + w > bx1 + bgW) {\n needMask = true;\n }\n }\n }\n if(ynt > 0) {\n for(let i = 0; i < ynt; i++) {\n let y = bgY - (i + 1) * h;\n repeat.push([bgX, y]);\n // 看最上边超过没有\n if(!needMask && i === 0 && y < by1) {\n needMask = true;\n }\n }\n }\n if(ynb > 0) {\n for(let i = 0; i < ynb; i++) {\n let y = bgY + (i + 1) * h;\n repeat.push([bgX, y]);\n // 看最下边超过没有\n if(!needMask && i === ynb - 1 && y + w > by1 + bgH) {\n needMask = true;\n }\n }\n }\n // 原点和同行列十字画完,看4个角的情况\n if(xnl > 0 && ynt > 0) {\n for(let i = 0; i < xnl; i++) {\n for(let j = 0; j < ynt; j++) {\n repeat.push([bgX - (i + 1) * w, bgY - (j + 1) * h]);\n }\n }\n }\n if(xnr > 0 && ynt > 0) {\n for(let i = 0; i < xnr; i++) {\n for(let j = 0; j < ynt; j++) {\n repeat.push([bgX + (i + 1) * w, bgY - (j + 1) * h]);\n }\n }\n }\n if(xnl > 0 && ynb > 0) {\n for(let i = 0; i < xnl; i++) {\n for(let j = 0; j < ynb; j++) {\n repeat.push([bgX - (i + 1) * w, bgY + (j + 1) * h]);\n }\n }\n }\n if(xnr > 0 && ynb > 0) {\n for(let i = 0; i < xnr; i++) {\n for(let j = 0; j < ynb; j++) {\n repeat.push([bgX + (i + 1) * w, bgY + (j + 1) * h]);\n }\n }\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(needMask) {\n ctx.save();\n renderBgc(this, renderMode, ctx, '#FFF', null,\n bx1, by1, bgW, bgH, btlr, btrr, bbrr, bblr, 'clip');\n }\n // 先画不考虑repeat的中心声明的\n ctx.drawImage(source, bgX, bgY, w, h);\n // 再画重复的十字和4角象限\n repeat.forEach(item => {\n ctx.drawImage(source, item[0], item[1], w, h);\n });\n if(needMask) {\n ctx.restore();\n }\n }\n else if(renderMode === mode.SVG) {\n let matrix = image.matrixResize(width, height, w, h, bgX, bgY, bgW, bgH);\n let props = [\n ['xlink:href', loadBgi.url],\n ['x', bgX],\n ['y', bgY],\n ['width', width],\n ['height', height],\n ];\n let needResize;\n if(matrix && !mx.isE(matrix)) {\n needResize = true;\n props.push(['transform', 'matrix(' + joinArr(mx.m2m6(matrix), ',') + ')']);\n }\n if(needMask) {\n let p1 = { x: bx1, y: by1 };\n let p2 = { x: bx2, y: by2 };\n if(needResize) {\n let inverse = mx.inverse(matrix);\n p1 = mx.calPoint(p1, inverse);\n p2 = mx.calPoint(p2, inverse);\n }\n let v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', `M${p1.x},${p1.y}L${p2.x},${p1.y}L${p2.x},${p2.y}L${p1.x},${p2.y}L${p1.x},${p1.y}`],\n ['fill', '#FFF'],\n ],\n }],\n };\n let id = ctx.add(v);\n xom.__cacheDefs.push(v);\n props.push(['clip-path', 'url(#' + id + ')']);\n }\n if(isInline) {\n let v = {\n tagName: 'symbol',\n props: [],\n children: [\n {\n type: 'img',\n tagName: 'image',\n props,\n }\n ],\n };\n xom.__cacheDefs.push(v);\n repeat.forEach(item => {\n let copy = clone(props);\n if(needResize) {\n let matrix = image.matrixResize(width, height, w, h, item[0], item[1], bgW, bgH);\n if(matrix && !mx.isE(matrix)) {\n copy[5][1] = 'matrix(' + joinArr(mx.m2m6(matrix), ',') + ')';\n }\n }\n copy[1][1] = item[0];\n copy[2][1] = item[1];\n v.children.push({\n type: 'img',\n tagName: 'image',\n props: copy,\n });\n });\n return ctx.add(v);\n }\n else {\n // 先画不考虑repeat的中心声明的\n xom.virtualDom.bb.push({\n type: 'img',\n tagName: 'image',\n props,\n });\n // 再画重复的十字和4角象限\n repeat.forEach(item => {\n let copy = clone(props);\n if(needResize) {\n let matrix = image.matrixResize(width, height, w, h, item[0], item[1], bgW, bgH);\n if(matrix && !mx.isE(matrix)) {\n copy[5][1] = 'matrix(' + joinArr(mx.m2m6(matrix), ',') + ')';\n }\n }\n copy[1][1] = item[0];\n copy[2][1] = item[1];\n xom.virtualDom.bb.push({\n type: 'img',\n tagName: 'image',\n props: copy,\n });\n });\n }\n }\n }\n}\n\nexport default {\n renderBgc,\n renderImage,\n};\n","import inject from '../util/inject';\nimport util from '../util/util';\n\nconst { isFunction } = util;\n\nfunction traversalBefore(list, length, diff) {\n for(let i = 0; i < length; i++) {\n let item = list[i];\n item.__before && item.__before(diff);\n }\n}\n\nfunction traversalAfter(list, length, diff) {\n for(let i = 0; i < length; i++) {\n let item = list[i];\n item.__after && item.__after(diff);\n }\n}\n\nlet isPause;\n\nclass Frame {\n constructor() {\n this.__rootTask = []; // 动画刷新后,每个root注册的刷新回调执行\n this.__task = [];\n this.__now = inject.now();\n }\n\n __init() {\n let self = this;\n let { task } = self;\n inject.cancelAnimationFrame(self.id);\n let last = self.__now = inject.now();\n function cb() {\n // 必须清除,可能会发生重复,当动画finish回调中gotoAndPlay(0),下方结束判断发现aTask还有值会继续,新的init也会进入再次执行\n inject.cancelAnimationFrame(self.id);\n self.id = inject.requestAnimationFrame(function() {\n if(isPause || !task.length) {\n return;\n }\n let now = self.__now = inject.now();\n let diff = now - last;\n diff = Math.max(diff, 0);\n // let delta = diff * 0.06; // 比例是除以1/60s,等同于*0.06\n last = now;\n // 优先动画计算\n let clone = task.slice(0);\n let length = clone.length;\n // 普通的before/after,动画计算在before,所有回调在after\n traversalBefore(clone, length, diff);\n let list = self.__rootTask.splice(0);\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n item && item(diff);\n }\n // 刷新成功后调用after,确保图像生成\n traversalAfter(clone, length, diff);\n // 执行每个Root的刷新并清空\n // 还有则继续,没有则停止节省性能\n if(task.length) {\n cb();\n }\n });\n }\n cb();\n }\n\n onFrame(handle) {\n if(!handle) {\n return;\n }\n let { task } = this;\n if(!task.length) {\n this.__init();\n }\n if(isFunction(handle)) {\n handle = {\n __after: handle,\n __karasFramecb: handle,\n };\n }\n task.push(handle);\n }\n\n offFrame(handle) {\n if(!handle) {\n return;\n }\n let { task } = this;\n for(let i = 0, len = task.length; i < len; i++) {\n let item = task[i];\n // 需考虑nextFrame包裹的引用对比\n if(item === handle || item.__karasFramecb === handle) {\n task.splice(i, 1);\n break;\n }\n }\n if(!task.length) {\n inject.cancelAnimationFrame(this.id);\n this.__now = null;\n }\n }\n\n nextFrame(handle) {\n if(!handle) {\n return;\n }\n // 包裹一层会导致添加后删除对比引用删不掉,需保存原有引用进行对比\n let cb = isFunction(handle) ? {\n __after: diff => {\n handle(diff);\n this.offFrame(cb);\n },\n } : {\n __before: handle.__before,\n __after: diff => {\n handle.__after && handle.__after(diff);\n this.offFrame(cb);\n },\n };\n cb.__karasFramecb = handle;\n this.onFrame(cb);\n }\n\n pause() {\n isPause = true;\n }\n\n resume() {\n if(isPause) {\n this.__init();\n isPause = false;\n }\n }\n\n get task() {\n return this.__task;\n }\n}\n\nexport default new Frame();\n","/**\n * https://github.com/gre/bezier-easing\n * BezierEasing - use bezier curve for transition easing function\n * by Gaëtan Renaudeau 2014 - 2015 – MIT License\n */\n\n// These values are established by empiricism with tests (tradeoff: performance VS precision)\nlet NEWTON_ITERATIONS = 4;\nlet NEWTON_MIN_SLOPE = 0.001;\nlet SUBDIVISION_PRECISION = 0.0000001;\nlet SUBDIVISION_MAX_ITERATIONS = 10;\n\nlet kSplineTableSize = 11;\nlet kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\n\nlet float32ArraySupported = typeof Float32Array === 'function';\n\nfunction A(aA1, aA2) {\n return 1.0 - 3.0 * aA2 + 3.0 * aA1;\n}\n\nfunction B(aA1, aA2) {\n return 3.0 * aA2 - 6.0 * aA1;\n}\n\nfunction C(aA1) {\n return 3.0 * aA1;\n}\n\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nfunction calcBezier(aT, aA1, aA2) {\n return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\n}\n\n// Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.\nfunction getSlope(aT, aA1, aA2) {\n return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\n}\n\nfunction binarySubdivide(aX, aA, aB, mX1, mX2) {\n let currentX, currentT, i = 0;\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n if(currentX > 0.0) {\n aB = currentT;\n } else {\n aA = currentT;\n }\n } while(Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\n return currentT;\n}\n\nfunction newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {\n for(let i = 0; i < NEWTON_ITERATIONS; ++i) {\n let currentSlope = getSlope(aGuessT, mX1, mX2);\n if(currentSlope === 0.0) {\n return aGuessT;\n }\n let currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n}\n\nfunction LinearEasing(x) {\n return x;\n}\n\nfunction bezier(mX1, mY1, mX2, mY2) {\n if(!(0 <= mX1 && mX1 <= 1 && 0 <= mX2 && mX2 <= 1)) {\n throw new Error('bezier x values must be in [0, 1] range');\n }\n\n if(mX1 === mY1 && mX2 === mY2) {\n return LinearEasing;\n }\n\n // Precompute samples table\n let sampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\n for(let i = 0; i < kSplineTableSize; ++i) {\n sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n\n function getTForX(aX) {\n let intervalStart = 0.0;\n let currentSample = 1;\n let lastSample = kSplineTableSize - 1;\n\n for(; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += kSampleStepSize;\n }\n --currentSample;\n\n // Interpolate to provide an initial guess for t\n let dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n let guessForT = intervalStart + dist * kSampleStepSize;\n\n let initialSlope = getSlope(guessForT, mX1, mX2);\n if(initialSlope >= NEWTON_MIN_SLOPE) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n } else if(initialSlope === 0.0) {\n return guessForT;\n } else {\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\n }\n }\n\n return function BezierEasing(x) {\n // Because JavaScript number are imprecise, we should guarantee the extremes are right.\n if(x === 0 || x === 1) {\n return x;\n }\n return calcBezier(getTForX(x), mY1, mY2);\n };\n}\n\nlet easing = {\n linear: bezier(1, 1, 0, 0),\n easeIn: bezier(0.42, 0, 1, 1),\n easeOut: bezier(0, 0, 0.58, 1),\n ease: bezier(0.25, 0.1, 0.25, 1),\n easeInOut: bezier(0.42, 0, 0.58, 1),\n cubicBezier: bezier,\n getEasing(v, v1, v2, v3) {\n if(arguments.length === 4) {\n return bezier(v, v1, v2, v3);\n }\n else if(Array.isArray(v) && v.length === 4) {\n return bezier(v[0], v[1], v[2], v[3]);\n }\n else if(v) {\n v = v.toString();\n let timingFunction;\n if(/^\\s*(?:cubic-bezier\\s*)?\\(\\s*[\\d.]+\\s*,\\s*[-\\d.]+\\s*,\\s*[\\d.]+\\s*,\\s*[-\\d.]+\\s*\\)\\s*$/i.test(v)) {\n v = v.match(/[\\d.]+/g);\n timingFunction = bezier(v[0], v[1], v[2], v[3]);\n }\n else if(v !== 'getEasing') {\n timingFunction = this[v];\n }\n return timingFunction;\n }\n },\n};\n\neasing['ease-in'] = easing.easeIn;\neasing['ease-out'] = easing.easeOut;\neasing['ease-in-out'] = easing.easeInOut;\n\nexport default easing;\n","import css from '../style/css';\nimport unit from '../style/unit';\nimport tf from '../style/transform';\nimport abbr from '../style/abbr';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport Event from '../util/Event';\nimport inject from '../util/inject';\nimport frame from './frame';\nimport easing from './easing';\nimport change from '../refresh/change';\nimport key from './key';\nimport mx from '../math/matrix';\nimport level from '../refresh/level';\n\nconst {\n STYLE_KEY: {\n FILTER,\n TRANSFORM_ORIGIN,\n PERSPECTIVE_ORIGIN,\n BACKGROUND_CLIP,\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n BOX_SHADOW,\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n BACKGROUND_SIZE,\n FONT_SIZE,\n FLEX_BASIS,\n FLEX_DIRECTION,\n WIDTH,\n HEIGHT,\n TOP,\n BOTTOM,\n LINE_HEIGHT,\n OPACITY,\n Z_INDEX,\n TRANSFORM,\n COLOR,\n FONT_WEIGHT,\n FONT_STYLE,\n FONT_FAMILY,\n TEXT_ALIGN,\n MATRIX,\n ROTATE_3D,\n TRANSLATE_PATH,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_OVER,\n STROKE_WIDTH,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n TEXT_STROKE_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_TOP_WIDTH,\n LEFT,\n RIGHT,\n MARGIN_BOTTOM,\n MARGIN_TOP,\n MARGIN_LEFT,\n MARGIN_RIGHT,\n PADDING_TOP,\n PADDING_RIGHT,\n PADDING_LEFT,\n PADDING_BOTTOM,\n STROKE_MITERLIMIT,\n LETTER_SPACING,\n PERSPECTIVE,\n SKEW_X,\n SKEW_Y,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n BACKGROUND_IMAGE,\n FILL,\n STROKE,\n BACKGROUND_COLOR,\n BORDER_BOTTOM_COLOR,\n BORDER_LEFT_COLOR,\n BORDER_RIGHT_COLOR,\n BORDER_TOP_COLOR,\n POSITION,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, INHERIT, RGBA, STRING, NUMBER, REM, VW, VH, VMAX, VMIN, GRADIENT, calUnit } = unit;\nconst { isNil, isFunction, isNumber, isObject, clone, equalArr } = util;\nconst { linear } = easing;\nconst { cloneStyle, equalStyle } = css;\nconst { isGeom, GEOM } = change;\nconst {\n getLevel,\n isRepaint,\n NONE,\n FILTER: FT,\n PERSPECTIVE: PPT,\n REPAINT,\n REFLOW,\n REBUILD,\n CACHE,\n TRANSFORM: TF,\n TRANSFORM_ALL,\n OPACITY: OP,\n MIX_BLEND_MODE: MBM,\n MASK,\n TRANSLATE_X: TX,\n TRANSLATE_Y: TY,\n TRANSLATE_Z: TZ,\n ROTATE_Z: RZ,\n SCALE_X: SX,\n SCALE_Y: SY,\n SCALE_Z: SZ,\n SCALE,\n} = level;\n\nconst {\n isColorKey,\n isExpandKey,\n isLengthKey,\n isGradientKey,\n isRadiusKey,\n} = key;\n\nfunction unify(frames, target) {\n let hash = {};\n let keys = [];\n // 获取所有关键帧的属性\n frames.forEach(item => {\n let style = item.style;\n Object.keys(style).forEach(k => {\n let v = style[k];\n // 未定义的过滤掉,null空有意义\n if(v !== undefined && !hash.hasOwnProperty(k)) {\n hash[k] = true;\n // geom为属性字符串,style都为枚举int\n if(!GEOM.hasOwnProperty(k)) {\n k = parseInt(k);\n }\n // path动画要转为translateXY,所以手动添加,使2帧之间存在过渡,有可能之前已存在这个动画,可忽视\n if(k === TRANSLATE_PATH) {\n if(!hash.hasOwnProperty(TRANSLATE_X)) {\n keys.push(TRANSLATE_X);\n }\n if(!hash.hasOwnProperty(TRANSLATE_Y)) {\n keys.push(TRANSLATE_Y);\n }\n hash[TRANSLATE_X] = hash[TRANSLATE_Y] = true;\n }\n keys.push(k);\n }\n });\n });\n // 添补没有声明完全的关键帧属性为节点当前值\n frames.forEach(item => {\n let style = item.style;\n keys.forEach(k => {\n if(!style.hasOwnProperty(k) || isNil(style[k])) {\n if(GEOM.hasOwnProperty(k)) {\n style[k] = clone(target.getProps(k));\n }\n else {\n if(k === TRANSLATE_X && style.hasOwnProperty(TRANSLATE_PATH)) {\n style[k] = clone(style[TRANSLATE_PATH][0]);\n }\n else if(k === TRANSLATE_Y && style.hasOwnProperty(TRANSLATE_PATH)) {\n style[k] = clone(style[TRANSLATE_PATH][1]);\n }\n else {\n style[k] = cloneStyle(target.__currentStyle, [k])[k];\n }\n }\n }\n });\n });\n return keys;\n}\n\n// 每次初始化时处理继承值,以及转换transform为单matrix矩阵,并复制clone样式供帧计算\nfunction inherit(frames, keys, target) {\n let computedStyle = target.__computedStyle;\n frames.forEach(item => {\n let style = item.style;\n keys.forEach(k => {\n let v = style[k];\n // geom的属性可能在帧中没有\n if(isNil(v)) {\n return;\n }\n if(k === TRANSFORM) {\n let ow = target.__outerWidth;\n let oh = target.__outerHeight;\n let m = tf.calMatrix(v, ow, oh, target.__root);\n style[k] = [{ k: MATRIX, v: m }];\n }\n else if(v.u === INHERIT) {\n if(k === COLOR || k === TEXT_STROKE_COLOR) {\n style[k] = { v: util.rgba2int(computedStyle[k]), u: RGBA };\n }\n else if(isLengthKey(k)) {\n style[k] = { v: computedStyle[k], u: PX };\n }\n else if(k === FONT_WEIGHT) {\n style[k] = { v: computedStyle[k], u: NUMBER };\n }\n else if(k === FONT_STYLE || k === FONT_FAMILY || k === TEXT_ALIGN || k === TEXT_STROKE_OVER) {\n style[k] = { v: computedStyle[k], u: STRING };\n }\n }\n });\n item.clone = cloneStyle(style, null);\n });\n}\n\n/**\n * 通知root更新当前动画,需要根据frame的状态来决定是否是同步插入\n * 在异步时,因为动画本身是异步,需要addRefreshTask\n * 而如果此时frame在执行before过程中,说明帧动画本身是在before计算的,需要同步插入\n * @param keys 样式所有的key\n * @param root\n * @param node\n * @param aniParams 动画更新的特殊优化参数\n * @param cb\n */\nfunction genBeforeRefresh(keys, root, node, aniParams, cb) {\n if(aniParams && !aniParams.allInFn) {\n aniParams = null;\n }\n root.__addUpdate(node, keys, null, null, null, aniParams, cb);\n}\n\n/**\n * 将每帧的样式格式化,提取出offset属性并转化为时间,提取出缓动曲线easing\n * 加好空数组transition/keys,后续计算两帧之间变化时存入\n * 加好空数组fixed,后续计算无帧变化时存入\n * @param style 关键帧样式\n * @param duration 动画时间长度\n * @param es options的easing曲线控制,frame没有自定义则使用全局的\n */\nfunction framing(style, duration, es) {\n let { offset, easing } = style;\n // 这两个特殊值提出来存储不干扰style\n delete style.offset;\n delete style.easing;\n // translatePath特殊对待,ae的曲线运动动画,普通css不包含,特殊处理并添加到style最后\n let translatePath = style.translatePath;\n style = css.normalize(style);\n if(Array.isArray(translatePath) && [6, 8].indexOf(translatePath.length) > -1) {\n style[TRANSLATE_PATH] = translatePath.map(item => {\n let v = calUnit(item);\n if(v.u === NUMBER) {\n v.u = PX;\n }\n return v;\n });\n }\n return {\n style,\n time: offset * duration,\n easing: easing || es,\n timingFunction: getEasing(easing || es),\n transition: [], // 变化的属性\n keys: [], // 变化的k\n fixed: [], // 不变的k\n lastPercent: -1,\n };\n}\n\nfunction calByUnit(p, n, container, root) {\n if(p.u === PX) {\n if(n.u === PERCENT) {\n return n.v * 0.01 * container - p.v;\n }\n else if(n.u === REM) {\n return n.v * root.computedStyle[FONT_SIZE] - p.v;\n }\n else if(n.u === VW) {\n return n.v * root.width * 0.01 - p.v;\n }\n else if(n.u === VH) {\n return n.v * root.height * 0.01 - p.v;\n }\n else if(n.u === VMAX) {\n return n.v * Math.max(root.width, root.height) * 0.01 - p.v;\n }\n else if(n.u === VMIN) {\n return n.v * Math.min(root.width, root.height) * 0.01 - p.v;\n }\n }\n else if(p.u === PERCENT) {\n if(n.u === PX) {\n return n.v * 100 / container - p.v;\n }\n else if(n.u === REM) {\n return n.v * root.computedStyle[FONT_SIZE] * 100 / container - p.v;\n }\n else if(n.u === VW) {\n return n.v * root.width / container - p.v;\n }\n else if(n.u === VH) {\n return n.v * root.height / container - p.v;\n }\n else if(n.u === VMAX) {\n return n.v * Math.max(root.width, root.height) / container - p.v;\n }\n else if(n.u === VMIN) {\n return n.v * Math.min(root.width, root.height) / container - p.v;\n }\n }\n else if(p.u === REM) {\n if(n.u === PX) {\n return n.v / root.computedStyle[FONT_SIZE] - p.v;\n }\n else if(n.u === PERCENT) {\n return n.v * 0.01 * container / root.computedStyle[FONT_SIZE] - p.v;\n }\n else if(n.u === VW) {\n return n.v * root.width * 0.01 / root.computedStyle[FONT_SIZE] - p.v;\n }\n else if(n.u === VH) {\n return n.v * root.height * 0.01 / root.computedStyle[FONT_SIZE] - p.v;\n }\n else if(n.u === VMAX) {\n return n.v * Math.max(root.width, root.height) * 0.01 / root.computedStyle[FONT_SIZE] - p.v;\n }\n else if(n.u === VMIN) {\n return n.v * Math.min(root.width, root.height) * 0.01 / root.computedStyle[FONT_SIZE] - p.v;\n }\n }\n else if(p.u === VW) {\n if(n.u === PX) {\n return n.v * 100 / root.width - p.v;\n }\n else if(n.u === REM) {\n return n.v * 100 * root.computedStyle[FONT_SIZE] / root.width - p.v;\n }\n else if(n.u === PERCENT) {\n return n.v * container / root.width - p.v;\n }\n else if(n.u === VH) {\n return n.v * root.height / root.width - p.v;\n }\n else if(n.u === VMAX) {\n return n.v * Math.max(root.width, root.height) / root.width - p.v;\n }\n else if(n.u === VMIN) {\n return n.v * Math.min(root.width, root.height) / root.width - p.v;\n }\n }\n else if(p.u === VH) {\n if(n.u === PX) {\n return n.v * 100 / root.height - p.v;\n }\n else if(n.u === REM) {\n return n.v * 100 * root.computedStyle[FONT_SIZE] / root.height - p.v;\n }\n else if(n.u === VW) {\n return n.v * root.width / root.height - p.v;\n }\n else if(n.u === PERCENT) {\n return n.v * container / root.height - p.v;\n }\n else if(n.u === VMAX) {\n return n.v * Math.max(root.width, root.height) / root.height - p.v;\n }\n else if(n.u === VMIN) {\n return n.v * Math.min(root.width, root.height) / root.height - p.v;\n }\n }\n else if(p.u === VMAX) {\n if(n.u === PX) {\n return n.v * 100 / Math.max(root.width, root.height) - p.v;\n }\n else if(n.u === REM) {\n return n.v * 100 * root.computedStyle[FONT_SIZE] / Math.max(root.width, root.height) - p.v;\n }\n else if(n.u === PERCENT) {\n return n.v * container / Math.max(root.width, root.height) - p.v;\n }\n else if(n.u === VW) {\n return n.v * root.width / Math.max(root.width, root.height) - p.v;\n }\n else if(n.u === VH) {\n return n.v * root.height / Math.max(root.width, root.height) - p.v;\n }\n else if(n.u === VMIN) {\n return n.v * Math.min(root.width, root.height) / Math.max(root.width, root.height) - p.v;\n }\n }\n else if(p.u === VMIN) {\n if(n.u === PX) {\n return n.v * 100 / Math.min(root.width, root.height) - p.v;\n }\n else if(n.u === REM) {\n return n.v * 100 * root.computedStyle[FONT_SIZE] / Math.min(root.width, root.height) - p.v;\n }\n else if(n.u === PERCENT) {\n return n.v * container / Math.min(root.width, root.height) - p.v;\n }\n else if(n.u === VW) {\n return n.v * root.width / Math.min(root.width, root.height) - p.v;\n }\n else if(n.u === VH) {\n return n.v * root.height / Math.min(root.width, root.height) - p.v;\n }\n else if(n.u === VMAX) {\n return n.v * Math.max(root.width, root.height) / Math.min(root.width, root.height) - p.v;\n }\n }\n return 0;\n}\n\n/**\n * 计算两帧之间的差,单位不同的以后面为准,返回的v表示差值\n * 没有变化返回空\n * auto等无法比较的不参与计算\n * @param prev 上一帧样式\n * @param next 下一帧样式\n * @param k 比较的样式名\n * @param target dom对象\n */\nfunction calDiff(prev, next, k, target) {\n let p = prev.style[k];\n let n = next.style[k];\n // 提前设置好引用,无需每帧计算时取引用,由于单位一定相同,可以简化直接引用到值v上无需单位u,有些直接量没有单位\n let cl = prev.clone[k];\n // translatePath可能不存在\n if(cl && cl.hasOwnProperty('v')) {\n cl = cl.v;\n }\n let res = { k, st: p, cl };\n if(k === TRANSFORM) {\n // transform不存在时需给默认矩阵,他只有1个matrix3d的值做动画\n if(!p && !n || !p.length && !n.length) {\n return;\n }\n let pm, nm;\n if(p && p[0]) {\n pm = p[0].v;\n }\n else {\n pm = mx.identity();\n }\n if(n && n[0]) {\n nm = n[0].v;\n }\n else {\n nm = mx.identity();\n }\n // transform特殊被初始化转成matrix矩阵,直接计算差值\n if(equalArr(pm, nm)) {\n return;\n }\n res.v = [\n nm[0] - pm[0],\n nm[1] - pm[1],\n nm[2] - pm[2],\n nm[3] - pm[3],\n nm[4] - pm[4],\n nm[5] - pm[5],\n nm[6] - pm[6],\n nm[7] - pm[7],\n nm[8] - pm[8],\n nm[9] - pm[9],\n nm[10] - pm[10],\n nm[11] - pm[11],\n nm[12] - pm[12],\n nm[13] - pm[13],\n nm[14] - pm[14],\n nm[15] - pm[15],\n ];\n }\n else if(k === ROTATE_3D) {\n if(p[0] === n[0] && p[1] === n[1] && p[2] === n[2]\n && p[3].v === n[3].v && p[3].u === n[3].u) {\n return;\n }\n res.v = [n[0] - p[0], n[1] - p[1], n[2] - p[2], n[3].v - p[3].v];\n }\n else if(k === FILTER) {\n // filter很特殊,里面有多个滤镜,按顺序计算,为空视为默认值,如blur默认0,brightness默认1\n let len = Math.max(p ? p.length : 0, n ? n.length : 0);\n let v = [], has;\n for(let i = 0; i < len; i++) {\n let pv = p ? p[i] : null, nv = n ? n[i] : null;\n // 空或key不等都无变化\n if(isNil(pv) || isNil(nv) || pv.k !== nv.k) {\n v.push(null);\n }\n else {\n has = true;\n let k = pv.k, pvv = pv.v, nvv = nv.v;\n if(k === 'blur') {\n if(pvv.u === nvv.u) {\n v.push(nvv.v - pvv.v);\n }\n else {\n let v2 = calByUnit(pvv, nvv, 0, target.root);\n v.push(v2);\n }\n }\n else if(k === 'hueRotate' || k === 'saturate' || k === 'brightness' || k === 'contrast'\n || k === 'sepia' || k === 'invert' || k === 'grayscale') {\n v.push(nvv.v - pvv.v);\n }\n else if(k === 'dropShadow') {\n let v2 = [];\n for(let i = 0; i < 4; i++) {\n let a = pvv[i], b = nvv[i];\n if(a.u === b.u) {\n v2.push(b.v - a.v);\n }\n else {\n v2.push(calByUnit(a, b, i === 1 ? target.clientHeight: target.clientWidth, target.root));\n }\n }\n v2.push([\n nvv[4][0] - pvv[4][0],\n nvv[4][1] - pvv[4][1],\n nvv[4][2] - pvv[4][2],\n nvv[4][3] - pvv[4][3],\n ])\n v.push(v2);\n }\n }\n }\n if(!has) {\n return;\n }\n res.v = v;\n }\n else if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN || isRadiusKey(k)) {\n // x/y都相等无需\n if(n[0].v === p[0].v && n[0].u === p[0].u\n && n[1].v === p[1].v && n[1].u === p[1].u) {\n return;\n }\n res.v = [];\n for(let i = 0; i < 2; i++) {\n let pi = p[i];\n let ni = n[i];\n if(pi.u === ni.u) {\n res.v.push(ni.v - pi.v);\n }\n else {\n let v = calByUnit(pi, ni, target[i ? 'outerHeight' : 'outerWidth'], target.root);\n res.v.push(v);\n }\n }\n }\n else if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n res.v = [];\n let length = Math.min(p.length, n.length);\n for(let i = 0; i < length; i++) {\n let pi = p[i], ni = n[i];\n if(pi.u === ni.u) {\n let v = ni.v - pi.v;\n res.v.push(v);\n }\n else {\n let k2;\n if(['padding-box', 'paddingBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = k === BACKGROUND_POSITION_X ? 'clientWidth' : 'clientHeight';\n }\n else if(['content-box', 'contentBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = k === BACKGROUND_POSITION_X ? 'width' : 'height';\n }\n else {\n k2 = k === BACKGROUND_POSITION_X ? 'offsetWidth' : 'offsetHeight';\n }\n let v = calByUnit(pi, ni, target[k2], target.root);\n res.v.push(v);\n }\n }\n }\n else if(k === BOX_SHADOW) {\n res.v = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let a = p[i];\n let b = n[i];\n // 不能为空,outset/inset必须相等\n if(!a || !b || a[5] !== b[5]) {\n res.v.push(null);\n continue;\n }\n let v = [];\n // x/y/blur/spread\n for(let j = 0; j < 4; j++) {\n if(a[j].u === b[j].u) {\n v.push(b[j].v - a[j].v);\n }\n else {\n let v2 = calByUnit(a[j], b[j], i === 1 ? target.offsetHeight : target.offsetWidth, target.root);\n v.push(v2);\n }\n }\n // rgba\n let c = [];\n for(let j = 0; j < 4; j++) {\n c.push(b[4][j] - a[4][j]);\n }\n v.push(c);\n res.v.push(v);\n }\n }\n else if(k === BACKGROUND_SIZE) {\n res.v = [];\n let length = Math.min(p.length, n.length);\n let has;\n for(let i = 0; i < length; i++) {\n let pi = p[i], ni = n[i];\n if(!pi || !ni) {\n res.v.push(null);\n continue;\n }\n let temp = [];\n for(let j = 0; j < 2; j++) {\n let pp = pi[j], nn = ni[j];\n if(pp.u === nn.u) {\n temp.push(nn.v - pp.v);\n }\n else {\n let k2;\n if(['padding-box', 'paddingBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = i ? 'clientWidth' : 'clientHeight';\n }\n else if(['content-box', 'contentBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = i ? 'width' : 'height';\n }\n else {\n k2 = i ? 'offsetWidth' : 'offsetHeight';\n }\n let v = calByUnit(pp, nn, target[k2], target.root);\n temp.push(v);\n }\n }\n if(equalArr(temp, [0, 0])) {\n res.v.push(null);\n }\n else {\n res.v.push(temp);\n has = true;\n }\n }\n if(!has) {\n return;\n }\n }\n else if(k === OPACITY || k === Z_INDEX) {\n if(n === p) {\n return;\n }\n res.v = n - p;\n }\n else if(k === STROKE_WIDTH) {\n res.v = [];\n let length = Math.min(p.length, n.length);\n for(let i = 0; i < length; i++) {\n let pi = p[i], ni = n[i];\n if(pi.u === ni.u) {\n let v = ni.v - pi.v;\n res.v.push(v);\n }\n let v = calByUnit(pi, ni, target.offsetWidth, target.root);\n res.v.push(v);\n }\n }\n // 特殊的path,不存在style中但在动画某帧中,不会统一化所以可能反向计算frameR时后一帧没有\n else if(k === TRANSLATE_PATH && p) {\n let k1 = 'offsetWidth', k2 = 'offsetHeight';\n if(['padding-box', 'paddingBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k1 = 'clientWidth';\n k2 = 'clientHeight';\n }\n else if(['content-box', 'contentBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k1 = 'width';\n k2 = 'height';\n }\n res.v = p.map((item, i) => {\n let { v, u } = item;\n if(u === PERCENT) {\n if(i % 2 === 0) {\n return { v: (parseFloat(v) || 0) * 0.01 * target[k1], u: PX };\n }\n else {\n return { v: (parseFloat(v) || 0) * 0.01 * target[k2], u: PX };\n }\n }\n else if(u === REM) {\n return { v: (parseFloat(v) || 0) * target.root.computedStyle[FONT_SIZE] * 100, u: PX };\n }\n else if(u === VW) {\n return { v: (parseFloat(v) || 0) * 0.01 * target.root.width, u: PX };\n }\n else if(u === VH) {\n return { v: (parseFloat(v) || 0) * 0.01 * target.root.height, u: PX };\n }\n else if(u === VMAX) {\n return { v: (parseFloat(v) || 0) * 0.01 * Math.max(target.root.width, target.root.height), u: PX };\n }\n else if(u === VMIN) {\n return { v: (parseFloat(v) || 0) * 0.01 * Math.min(target.root.width, target.root.height), u: PX };\n }\n else {\n return { v: parseFloat(v) || 0, u: PX };\n }\n });\n }\n else if(isExpandKey(k)) {\n if(p.u === n.u) {\n let v = n.v - p.v;\n if(v === 0) {\n return;\n }\n res.v = v;\n }\n else {\n let v = calByUnit(p, n, target[k === TRANSLATE_X || k === TRANSLATE_Z ? 'outerWidth' : 'outerHeight'], target.root);\n if(!v) {\n return;\n }\n res.v = v;\n }\n }\n else if(isLengthKey(k)) {\n // auto不做动画\n if(p.u === AUTO || n.u === AUTO) {\n return;\n }\n let computedStyle = target.computedStyle;\n let parentComputedStyle = (target.domParent || target).computedStyle;\n let diff = 0;\n if(p.u === n.u) {\n diff = n.v - p.v;\n }\n // lineHeight奇怪的单位变化,%相对于fontSize\n else if(k === LINE_HEIGHT) {\n diff = calByUnit(p, n, computedStyle[FONT_SIZE], target.root);\n }\n // fontSize的%相对于parent的\n else if(k === FONT_SIZE) {\n diff = calByUnit(p, n, parentComputedStyle[FONT_SIZE], target.root);\n }\n // 相对于父height的特殊属性\n else if(k === FLEX_BASIS\n && ['column', 'column-reverse', 'columnReverse'].indexOf(computedStyle[FLEX_DIRECTION]) > -1\n || [HEIGHT, TOP, BOTTOM].indexOf(k) > -1) {\n if(p.u !== AUTO && n.u !== AUTO) {\n diff = calByUnit(p, n, parentComputedStyle[HEIGHT], target.root);\n }\n }\n // 其余都是相对于父width的\n else {\n if(p.u !== AUTO && n.u !== AUTO) {\n diff = calByUnit(p, n, parentComputedStyle[WIDTH], target.root);\n }\n }\n // 兜底NaN非法\n if(diff === 0 || isNaN(diff)) {\n return;\n }\n res.v = diff;\n }\n else if(isGradientKey(k)) {\n // backgroundImage发生了渐变色和图片的变化,fill发生渐变色和纯色的变化等\n res.v = [];\n let length = Math.min(p.length, n.length);\n for(let i = 0; i < length; i++) {\n let pi = p[i], ni = n[i];\n if(!pi || !ni || pi.u !== ni.u || pi.u === STRING) {\n res.v.push(null);\n continue;\n }\n let u = pi.u;\n pi = pi.v;\n ni = ni.v;\n let temp;\n // 渐变\n if(u === GRADIENT) {\n let r = calDiffGradient(pi, ni, target);\n if(!r) {\n res.v.push(null);\n continue;\n }\n temp = r;\n }\n // 纯色\n else {\n if(equalArr(ni, pi)) {\n res.v.push(null);\n continue;\n }\n temp = [\n ni[0] - pi[0],\n ni[1] - pi[1],\n ni[2] - pi[2],\n ni[3] - pi[3]\n ];\n }\n res.v.push(temp);\n }\n }\n else if(isColorKey(k)) {\n if(n.u !== p.u) {\n return;\n }\n // 特殊增加支持有gradient的先判断,仅color和textStrokeColor支持\n n = n.v;\n p = p.v;\n if(n.u === GRADIENT) {\n let r = calDiffGradient(p, n, target);\n if(!r) {\n return;\n }\n res.v = r;\n }\n else {\n if(equalArr(n, p)) {\n return;\n }\n res.v = [\n n[0] - p[0],\n n[1] - p[1],\n n[2] - p[2],\n n[3] - p[3]\n ];\n }\n }\n else if(GEOM.hasOwnProperty(k)) {\n let tagName = target.tagName;\n if(isNil(p)) {\n return;\n }\n else if(GEOM[k][tagName] && isFunction(GEOM[k][tagName].calDiff)) {\n let fn = GEOM[k][tagName].calDiff;\n if(target.isMulti) {\n let arr = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n arr.push(fn(p[i], n[i]));\n }\n return arr;\n }\n else {\n res.v = fn(p, n);\n }\n }\n // 特殊处理multi\n else if(target.isMulti) {\n if(k === 'points' || k === 'controls') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res.v = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || !pv.length || isNil(nv) || !nv.length) {\n res.v.push(null);\n }\n else {\n let v2 = [];\n for(let j = 0, len2 = Math.min(pv.length, nv.length); j < len2; j++) {\n let pv2 = pv[j];\n let nv2 = nv[j];\n if(isNil(pv2) || isNil(nv2)) {\n v2.push(null);\n }\n else {\n let v3 = [];\n for(let k = 0, len3 = Math.max(pv2.length, nv2.length); k < len3; k++) {\n let pv3 = pv2[k];\n let nv3 = nv2[k];\n // control由4点变2点\n if(isNil(pv3) || isNil(nv3)) {\n v3.push(0);\n }\n else {\n v3.push(nv3 - pv3);\n }\n }\n v2.push(v3);\n }\n }\n res.v.push(v2);\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res.v = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || !pv.length || isNil(nv) || !nv.length) {\n res.v.push(null);\n }\n else {\n res.v.push([\n nv[0] - pv[0],\n nv[1] - pv[1],\n ]);\n }\n }\n }\n else {\n if(n === p || equalArr(n, p) || k === 'edge' || k === 'closure' || k === 'booleanOperations') {\n return;\n }\n let v = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || isNil(nv)) {\n v.push(0);\n }\n v.push(nv - pv);\n }\n res.v = v;\n }\n }\n // 非multi特殊处理这几类数组类型数据\n else if(k === 'points' || k === 'controls') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res.v = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || !pv.length || isNil(nv) || !nv.length) {\n res.v.push(null);\n }\n else {\n let v2 = [];\n for(let j = 0, len2 = Math.max(pv.length, nv.length); j < len2; j++) {\n let pv2 = pv[j];\n let nv2 = nv[j];\n // control由4点变2点\n if(isNil(pv2) || isNil(nv2)) {\n v2.push(0);\n }\n else {\n v2.push(nv2 - pv2);\n }\n }\n res.v.push(v2);\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res.v = [\n n[0] - p[0],\n n[1] - p[1],\n ];\n }\n // 其它简单数据,除了edge/closure/booleanOperations没有增量\n else {\n if(n === p || k === 'edge' || k === 'closure' || k === 'booleanOperations') {\n return;\n }\n else {\n res.v = n - p;\n }\n }\n }\n // display等不能有增量过程的\n else {\n return;\n }\n return res;\n}\n\n// 渐变的差异计算\nfunction calDiffGradient(p, n, target) {\n if(p.k !== n.k) {\n return;\n }\n let pv = p.v;\n let nv = n.v;\n let temp = [[]];\n let eq = equalArr(pv, nv);\n // 渐变值部分是通用的\n for(let i = 0, len = Math.min(pv.length, nv.length); i < len; i++) {\n let a = pv[i];\n let b = nv[i];\n let t = [];\n t.push([\n b[0][0] - a[0][0],\n b[0][1] - a[0][1],\n b[0][2] - a[0][2],\n b[0][3] - a[0][3],\n ]);\n if(a[1] && b[1]) {\n if(a[1].u === b[1].u) {\n t.push(b[1].v - a[1].v);\n }\n else {\n let v = calByUnit(a[1], b[1], target.clientWidth, target.root);\n t.push(v || 0);\n }\n }\n temp[0].push(t);\n }\n if(p.k === 'linear') {\n let isArrP = Array.isArray(p.d);\n let isArrN = Array.isArray(n.d);\n if(isArrN !== isArrP) {\n return;\n }\n if(isArrP) {\n let v = [n.d[0] - p.d[0], n.d[1] - p.d[1], n.d[2] - p.d[2], n.d[3] - p.d[3]];\n if(eq && equalArr(v, [0, 0, 0, 0])) {\n return;\n }\n temp[1] = v;\n }\n else {\n let v = n.d - p.d;\n // 颜色角度都没变化\n if(eq && v === 0) {\n return;\n }\n temp[1] = v;\n }\n }\n else if(p.k === 'radial') {\n let isArrP = Array.isArray(p.z);\n let isArrN = Array.isArray(n.z);\n if(isArrN !== isArrP) {\n return;\n }\n temp[2] = [];\n // sketch中a点到b点特殊格式表达,z是数组忽略p和s\n if(isArrP) {\n // 距离中心外形全等\n if(eq && equalArr(p.z, n.z)) {\n return;\n }\n for(let i = 0; i < 5; i++) {\n let pz = p.z[i];\n // 半径比例省略为1\n if(pz === undefined) {\n pz = 1;\n }\n let nz = n.z[i];\n if(nz === undefined) {\n nz = 1;\n }\n temp[2].push(nz - pz);\n }\n }\n else {\n if(eq && p.z === n.z && p.s === n.s && equalArr(p.p, n.p)) {\n return;\n }\n for(let i = 0; i < 2; i++) {\n let pp = p.p[i];\n let np = n.p[i];\n if(pp.u === np.u) {\n temp[2].push(np.v - pp.v);\n }\n else {\n let v = calByUnit(pp, np, target[i ? 'clientWidth' : 'clientHeight'], target.root);\n temp[2].push(v || 0);\n }\n }\n }\n }\n else if(p.k === 'conic') {\n if(eq && p.d === n.d && equalArr(p.p, n.p)) {\n return;\n }\n temp[1]= n.d - p.d;\n temp[2] = [];\n for(let i = 0; i < 2; i++) {\n let pp = p.p[i];\n let np = n.p[i];\n if(pp[1] === np[1]) {\n temp[2].push(np[0] - pp[0]);\n }\n else {\n let v = calByUnit(pp, np, target[i ? 'clientWidth' : 'clientHeight'], target.root);\n temp[2].push(v || 0);\n }\n }\n }\n return temp;\n}\n\n/**\n * 计算两帧之间不相同的变化,存入transition,相同的忽略\n * 同时不变化的key也得存入fixed\n */\nfunction calFrame(prev, next, keys, target) {\n let currentStyle = target.__currentStyle, hasTp, allInFn = true;\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n if(k === TRANSLATE_PATH) {\n hasTp = true;\n }\n let ts = calDiff(prev, next, k, target);\n // 可以形成过渡的才会产生结果返回\n if(ts) {\n ts.cs = currentStyle[k];\n let fn = CAL_HASH[k];\n if(fn) {\n ts.fn = fn;\n }\n else {\n allInFn = false;\n }\n prev.transition.push(ts);\n prev.keys.push(k);\n }\n else {\n prev.fixed.push(k);\n allInFn = false;\n }\n }\n // translatePath需特殊处理translate,防止被覆盖\n if(hasTp) {\n let i = prev.keys.indexOf(TRANSLATE_X);\n if(i === -1) {\n prev.keys.push(TRANSLATE_X);\n }\n i = prev.keys.indexOf(TRANSLATE_Y);\n if(i === -1) {\n prev.keys.push(TRANSLATE_Y);\n }\n i = prev.fixed.indexOf(TRANSLATE_X);\n if(i > -1) {\n prev.fixed.splice(i, 1);\n }\n i = prev.fixed.indexOf(TRANSLATE_Y);\n if(i > -1) {\n prev.fixed.splice(i, 1);\n }\n }\n prev.allInFn = allInFn;\n // 特殊优化,加速通知Root的更新\n if(allInFn) {\n let lv = NONE;\n let computedStyle = target.__computedStyle;\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n lv |= getLevel(k);\n if(k === Z_INDEX) {\n prev.hasZ = node !== this && ['relative', 'absolute'].indexOf(computedStyle[POSITION]) > -1;\n }\n else if(k === COLOR) {\n prev.hasColor = true;\n }\n else if(k === TEXT_STROKE_COLOR) {\n prev.hasTsColor = true;\n }\n else if(k === TEXT_STROKE_WIDTH) {\n prev.hasTsWidth = true;\n }\n else if(k === TEXT_STROKE_OVER) {\n prev.hasTsOver = true;\n }\n }\n // 提前计算\n prev.lv = lv;\n prev.isRepaint = isRepaint(lv);\n // 常见的几种动画matrix计算是否可优化提前计算\n if(prev.isRepaint && (lv & (TX | TY | TZ | RZ | SCALE))) {\n if((lv & TF) || (\n (lv & SX) && !computedStyle[SCALE_X]\n || (lv & SY) && !computedStyle[SCALE_Y]\n || (lv & SZ) && !computedStyle[SCALE_Z]\n || (lv & RZ) && (computedStyle[ROTATE_X] || computedStyle[ROTATE_Y]\n || computedStyle[SKEW_X] || computedStyle[SKEW_Y])\n )) {\n prev.optimize = false;\n }\n else {\n prev.optimize = true;\n }\n }\n }\n return next;\n}\n\nfunction binarySearch(i, j, time, frames) {\n while(i < j) {\n if(i === j - 1) {\n if(frames[j].time <= time) {\n return j;\n }\n return i;\n }\n let middle = i + ((j - i) >> 1);\n let frame = frames[middle];\n if(frame.time === time) {\n return middle;\n }\n if(frame.time > time) {\n j = Math.max(middle - 1, i);\n }\n else {\n i = Math.min(middle, j);\n }\n }\n return i;\n}\n\nfunction getEasing(ea) {\n let timingFunction;\n if(ea) {\n if((timingFunction = /^\\s*steps\\s*\\(\\s*(\\d+)(?:\\s*,\\s*(\\w+))?\\s*\\)/i.exec(ea))) {\n let steps = parseInt(timingFunction[1]);\n let stepsD = timingFunction[2];\n timingFunction = function(percent) {\n // steps有效定义正整数\n if(steps && steps > 0) {\n let per = 1 / steps;\n let n = stepsD === 'start' ? Math.ceil(percent / per) : Math.floor(percent / per);\n return n / steps;\n }\n return percent;\n };\n }\n else {\n timingFunction = easing.getEasing(ea);\n }\n }\n return timingFunction;\n}\n\n/**\n * calIntermediateStyle计算优化,不能类型的style动画计算方式不同,也有可以复用的,\n * 全部if分支判断太长且浪费,相同计算的用hash存储,k为样式,v为方法,一次hash获取即可\n */\nconst CAL_HASH = [];\nCAL_HASH[TRANSFORM] = calTransform;\nCAL_HASH[ROTATE_3D] = calRotate3d;\nCAL_HASH[FILTER] = calFilter;\nCAL_HASH[TRANSFORM_ORIGIN] = CAL_HASH[PERSPECTIVE_ORIGIN]\n = CAL_HASH[BORDER_TOP_LEFT_RADIUS] = CAL_HASH[BORDER_TOP_RIGHT_RADIUS]\n = CAL_HASH[BORDER_BOTTOM_RIGHT_RADIUS] = CAL_HASH[BORDER_BOTTOM_LEFT_RADIUS] = calOrigin;\nCAL_HASH[STROKE_WIDTH] = CAL_HASH[BACKGROUND_POSITION_X] = CAL_HASH[BACKGROUND_POSITION_Y] = calPosition;\nCAL_HASH[BOX_SHADOW] = calBoxShadow;\nCAL_HASH[BACKGROUND_SIZE] = calBgSize;\nCAL_HASH[OPACITY] = CAL_HASH[Z_INDEX] = calNumber;\nCAL_HASH[TRANSLATE_PATH] = calPath;\nCAL_HASH[FONT_SIZE] = CAL_HASH[TEXT_STROKE_WIDTH] = CAL_HASH[BORDER_BOTTOM_WIDTH] = CAL_HASH[BORDER_LEFT_WIDTH]\n = CAL_HASH[BORDER_RIGHT_WIDTH] = CAL_HASH[BORDER_TOP_WIDTH] = CAL_HASH[LEFT] = CAL_HASH[TOP] = CAL_HASH[RIGHT]\n = CAL_HASH[BOTTOM] = CAL_HASH[FLEX_BASIS] = CAL_HASH[WIDTH] = CAL_HASH[HEIGHT] = CAL_HASH[LINE_HEIGHT]\n = CAL_HASH[MARGIN_BOTTOM] = CAL_HASH[MARGIN_TOP] = CAL_HASH[MARGIN_LEFT] = CAL_HASH[MARGIN_RIGHT]\n = CAL_HASH[PADDING_TOP] = CAL_HASH[PADDING_RIGHT] = CAL_HASH[PADDING_LEFT] = CAL_HASH[PADDING_BOTTOM]\n = CAL_HASH[STROKE_WIDTH] = CAL_HASH[STROKE_MITERLIMIT] = CAL_HASH[LETTER_SPACING] = CAL_HASH[PERSPECTIVE]\n = CAL_HASH[TRANSLATE_X] = CAL_HASH[TRANSLATE_Y] = CAL_HASH[TRANSLATE_Z] = CAL_HASH[SKEW_X] = CAL_HASH[SKEW_Y]\n = CAL_HASH[SCALE_X] = CAL_HASH[SCALE_Y] = CAL_HASH[SCALE_Z] = CAL_HASH[ROTATE_X] = CAL_HASH[ROTATE_Y]\n = CAL_HASH[ROTATE_Z] = calLength;\nCAL_HASH[BACKGROUND_IMAGE] = CAL_HASH[FILL] = CAL_HASH[STROKE] = calGradient;\nCAL_HASH[BACKGROUND_COLOR] = CAL_HASH[BORDER_BOTTOM_COLOR] = CAL_HASH[BORDER_LEFT_COLOR] = CAL_HASH[BORDER_RIGHT_COLOR]\n = CAL_HASH[BORDER_TOP_COLOR] = CAL_HASH[COLOR] = CAL_HASH[TEXT_STROKE_COLOR] = calColor;\n\n// transform特殊处理,只有1个matrix,有可能不存在,需给默认矩阵\nfunction calTransform(k, v, percent, st, cl, frame, currentStyle) {\n if(!st || !st.length) {\n st = frame.style[k] = [{k: MATRIX, v: mx.identity()}];\n }\n if(!cl || !cl.length) {\n cl = frame.clone[k] = [{k: MATRIX, v: mx.identity()}];\n }\n for(let i = 0; i < 16; i++) {\n st[0].v[i] = cl[0].v[i] + v[i] * percent;\n }\n}\n\nfunction calRotate3d(k, v, percent, st, cl, frame, currentStyle) {\n st[0] = cl[0] + v[0] * percent;\n st[1] = cl[1] + v[1] * percent;\n st[2] = cl[2] + v[2] * percent;\n st[3].v = cl[3].v + v[3] * percent;\n}\n\nfunction calFilter(k, v, percent, st, cl, frame, currentStyle) {\n for(let i = 0, len = v.length; i < len; i++) {\n let item = v[i];\n if(item) {\n let k2 = st[i].k, v2 = st[i].v, clv = cl[i].v;\n // 只有dropShadow是多个数组,存放x/y/blur/spread/color\n if(k2 === 'dropShadow') {\n v2[0].v = clv[0].v + item[0] * percent;\n v2[1].v = clv[1].v + item[1] * percent;\n v2[2].v = clv[2].v + item[2] * percent;\n v2[3].v = clv[3].v + item[3] * percent;\n let c1 = v2[4], cv = clv[4], c2 = item[4];\n c1[0] = cv[0] + c2[0] * percent;\n c1[1] = cv[1] + c2[1] * percent;\n c1[2] = cv[2] + c2[2] * percent;\n c1[3] = cv[3] + c2[3] * percent;\n }\n // 其它都是带单位单值\n else {\n v2.v = clv.v + item * percent;\n }\n }\n }\n}\n\nfunction calOrigin(k, v, percent, st, cl, frame, currentStyle) {\n if(v[0] !== 0) {\n st[0].v = cl[0].v + v[0] * percent;\n }\n if(v[1] !== 0) {\n st[1].v = cl[1].v + v[1] * percent;\n }\n}\n\nfunction calPosition(k, v, percent, st, cl, frame, currentStyle) {\n st.forEach((item, i) => {\n if(v[i]) {\n item.v = cl[i].v + v[i] * percent;\n }\n });\n}\n\nfunction calBoxShadow(k, v, percent, st, cl, frame, currentStyle) {\n for(let i = 0, len = Math.min(st.length, v.length); i < len; i++) {\n if(!v[i]) {\n continue;\n }\n // x/y/blur/spread\n for(let j = 0; j < 4; j++) {\n st[i][j].v = cl[i][j].v + v[i][j] * percent;\n }\n // rgba\n for(let j = 0; j < 4; j++) {\n st[i][4][j] = cl[i][4][j] + v[i][4][j] * percent;\n }\n }\n}\n\nfunction calBgSize(k, v, percent, st, cl, frame, currentStyle) {\n st.forEach((item, i) => {\n let o = v[i];\n if(o) {\n item[0].v = cl[i][0].v + o[0] * percent;\n item[1].v = cl[i][1].v + o[1] * percent;\n }\n });\n}\n\nfunction calNumber(k, v, percent, st, cl, frame, currentStyle) {\n st = cl + v * percent;\n // 精度问题可能会超过[0,1]区间\n if(k === OPACITY) {\n if(st < 0) {\n st = 0;\n }\n else if(st > 1) {\n st = 1;\n }\n }\n currentStyle[k] = st;\n}\n\n// 特殊的曲线运动计算,转换为translateXY,出现在最后一定会覆盖原本的translate防重\nfunction calPath(k, v, percent, st, cl, frame, currentStyle) {\n let t = 1 - percent;\n if(v.length === 8) {\n currentStyle[TRANSLATE_X] = {\n v: v[0].v * t * t * t\n + 3 * v[2].v * percent * t * t\n + 3 * v[4].v * percent * percent * t\n + v[6].v * percent * percent * percent,\n u: PX,\n };\n currentStyle[TRANSLATE_Y] = {\n v: v[1].v * t * t * t\n + 3 * v[3].v * percent * t * t\n + 3 * v[5].v * percent * percent * t\n + v[7].v * percent * percent * percent,\n u: PX,\n };\n }\n else if(v.length === 6) {\n currentStyle[TRANSLATE_X] = {\n v: v[0].v * t * t\n + 2 * v[2].v * percent * t\n + v[4].v * percent * percent,\n u: PX,\n };\n currentStyle[TRANSLATE_Y] = {\n v: v[1].v * t * t\n + 3 * v[3].v * percent * t\n + v[5].v * percent * percent,\n u: PX,\n };\n }\n}\n\nfunction calLength(k, v, percent, st, cl, frame, currentStyle) {\n st.v = cl + v * percent;\n}\n\nfunction calGradient(k, v, percent, st, cl, frame, currentStyle) {\n st.forEach((st2, i) => {\n let v2 = v[i];\n if(!v2) {\n return;\n }\n let cli = cl[i].v;\n if(st2.u === GRADIENT) {\n st2 = st2.v;\n let [c, d, p, z] = v2;\n for(let j = 0, len = Math.min(st2.v.length, c.length); j < len; j++) {\n let a = st2.v[j];\n let b = c[j];\n a[0][0] = cli.v[j][0][0] + b[0][0] * percent;\n a[0][1] = cli.v[j][0][1] + b[0][1] * percent;\n a[0][2] = cli.v[j][0][2] + b[0][2] * percent;\n a[0][3] = cli.v[j][0][3] + b[0][3] * percent;\n if(a[1] && b[1]) {\n a[1].v = cli.v[j][1].v + b[1] * percent;\n }\n }\n if(st2.k === 'linear' && st2.d !== undefined && d !== undefined) {\n if(Array.isArray(d)) {\n st2.d[0] = cli.d[0] + d[0] * percent;\n st2.d[1] = cli.d[1] + d[1] * percent;\n st2.d[2] = cli.d[2] + d[2] * percent;\n st2.d[3] = cli.d[3] + d[3] * percent;\n }\n else {\n st2.d = cli.d + d * percent;\n }\n }\n else if(st2.k === 'radial') {\n if(st2.z !== undefined && z !== undefined) {\n st2.z[0] = cli.z[0] + z[0] * percent;\n st2.z[1] = cli.z[1] + z[1] * percent;\n st2.z[2] = cli.z[2] + z[2] * percent;\n st2.z[3] = cli.z[3] + z[3] * percent;\n st2.z[4] = cli.z[4] + z[4] * percent;\n }\n else if(st2.p !== undefined && p !== undefined) {\n st2.p[0].v = cli.p[0].v + p[0] * percent;\n st2.p[1].v = cli.p[1].v + p[1] * percent;\n }\n }\n else if(st2.k === 'conic' && st2.d !== undefined && d !== undefined) {\n st2.d = cli.d + d * percent;\n st2.p[0][0] = cli.p[0] + p[0] * percent;\n st2.p[1][0] = cli.p[1] + p[1] * percent;\n }\n }\n // fill纯色\n else {\n st2 = st2.v;\n st2[0] = cli[0] + v2[0] * percent;\n st2[1] = cli[1] + v2[1] * percent;\n st2[2] = cli[2] + v2[2] * percent;\n st2[3] = cli[3] + v2[3] * percent;\n }\n });\n}\n\n// color可能超限[0,255],但浏览器已经做了限制,无需关心\nfunction calColor(k, v, percent, st, cl, frame, currentStyle) {\n let t = st.v;\n t[0] = cl[0] + v[0] * percent;\n t[1] = cl[1] + v[1] * percent;\n t[2] = cl[2] + v[2] * percent;\n t[3] = cl[3] + v[3] * percent;\n}\n\n/**\n * 根据百分比和缓动函数计算中间态样式\n * 当easing定义为steps时,优先计算\n * @param frame 当前帧\n * @param percent 到下一帧时间的百分比\n * @param target vd\n * @param notSameFrame 是否发生了帧切换\n * @return {[]} 发生变更的样式key\n */\nfunction calIntermediateStyle(frame, percent, target, notSameFrame) {\n let style = frame.style;\n let transition = frame.transition;\n let timingFunction = frame.timingFunction;\n let allInFn = frame.allInFn;\n if(timingFunction && timingFunction !== linear) {\n percent = timingFunction(percent);\n }\n // 同一关键帧同一percent可以不刷新,比如diff为0时,或者steps情况,离开会清空\n if(frame.lastPercent === percent) {\n return [];\n }\n frame.lastPercent = percent;\n let currentStyle = target.__currentStyle, res = frame.keys;\n // 特殊性能优化,for拆开v8会提升不少\n if(allInFn) {\n for(let i = 0, len = transition.length; i < len; i++) {\n let item = transition[i];\n let k = item.k, v = item.v, cs = item.cs, cl = item.cl, fn = item.fn;\n // 同一帧内计算可避免赋值currentStyle\n if(notSameFrame) {\n cs = item.cs = currentStyle[k] = item.st;\n }\n fn(k, v, percent, cs, cl, frame, currentStyle);\n }\n }\n else {\n let currentProps = target.__currentProps, modify;\n for(let i = 0, len = transition.length; i < len; i++) {\n let item = transition[i];\n let k = item.k, v = item.v, cs = item.cs, st = item.st, cl = item.cl, fn = item.fn;\n if(fn) {\n // 同一帧内计算可避免赋值currentStyle\n if(notSameFrame) {\n cs = item.cs = currentStyle[k] = item.st;\n }\n fn(k, v, percent, cs, cl, frame, currentStyle);\n }\n else if(GEOM.hasOwnProperty(k)) {\n let tagName = target.tagName;\n if(GEOM[k][tagName] && isFunction(GEOM[k][tagName].calIncrease)) {\n let fn = GEOM[k][tagName].calIncrease;\n if(target.isMulti) {\n st = st.map((item, i) => {\n return fn(item, v[i], percent);\n });\n }\n else {\n st = fn(st, v, percent);\n }\n }\n else if(target.isMulti) {\n if(k === 'points' || k === 'controls') {\n for(let i = 0, len = Math.min(st.length, v.length); i < len; i++) {\n let o = st[i];\n let n = v[i];\n let cli = cl[i];\n if(!isNil(o) && !isNil(n)) {\n for(let j = 0, len2 = Math.min(o.length, n.length); j < len2; j++) {\n let o2 = o[j];\n let n2 = n[j];\n if(!isNil(o2) && !isNil(n2)) {\n for(let k = 0, len3 = Math.min(o2.length, n2.length); k < len3; k++) {\n if(!isNil(o2[k]) && !isNil(n2[k])) {\n o2[k] = cli[j][k] + n2[k] * percent;\n }\n }\n }\n }\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n v.forEach((item, i) => {\n let st2 = st[i];\n if(!isNil(item[0]) && !isNil(st2[0])) {\n st2[0] = cl[i][0] + item[0] * percent;\n }\n if(!isNil(item[1]) && !isNil(st2[1])) {\n st2[1] = cl[i][1] + item[1] * percent;\n }\n });\n }\n else {\n v.forEach((item, i) => {\n if(!isNil(item) && !isNil(st[i])) {\n st[i] = cl[i] + item * percent;\n }\n });\n }\n }\n else {\n if(k === 'points' || k === 'controls') {\n for(let i = 0, len = Math.min(st.length, v.length); i < len; i++) {\n let o = st[i];\n let n = v[i];\n if(!isNil(o) && !isNil(n)) {\n for(let j = 0, len2 = Math.min(o.length, n.length); j < len2; j++) {\n if(!isNil(o[j]) && !isNil(n[j])) {\n o[j] = cl[i][j] + n[j] * percent;\n }\n }\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n if(!isNil(st[0]) && !isNil(v[0])) {\n st[0] = cl[0] + v[0] * percent;\n }\n if(!isNil(st[1]) && !isNil(v[1])) {\n st[1] = cl[1] + v[1] * percent;\n }\n }\n else {\n if(!isNil(st) && !isNil(v)) {\n st = cl + v * percent;\n }\n }\n }\n currentProps[k] = st;\n }\n // string等的直接量,在不同帧之间可能存在变化,同帧变化后不再改变\n else {\n if(currentStyle[k] !== st) {\n currentStyle[k] = st;\n }\n else {\n if(!modify) {\n modify = true;\n res = res.slice(0);\n }\n let j = res.indexOf(k);\n res.splice(j, 1);\n }\n }\n }\n // 无变化的也得检查是否和当前相等,防止跳到一个不变化的帧上,而前一帧有变化的情况,allInFn不会有这里\n let fixed = frame.fixed;\n for(let i = 0, len = fixed.length; i < len; i++) {\n let k = fixed[i];\n let isGeom = GEOM.hasOwnProperty(k);\n if(!equalStyle(k, style[k], isGeom ? currentProps[k] : currentStyle[k], target)) {\n if(GEOM.hasOwnProperty(k)) {\n currentProps[k] = style[k];\n }\n else {\n currentStyle[k] = style[k];\n }\n if(!modify) {\n modify = true;\n res = res.slice(0);\n }\n res.push(k);\n }\n }\n }\n return res;\n}\n\n/**\n * 最后一帧无法计算transition,对整体keys的style进行对比\n */\nfunction calLastStyle(style, target, keys) {\n let currentStyle = target.__currentStyle, currentProps = target.__currentProps, res = [];\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i], v = style[k];\n let isGeom = GEOM.hasOwnProperty(k);\n if(!equalStyle(k, v, isGeom ? currentProps[k] : currentStyle[k], target)) {\n if(isGeom) {\n currentProps[k] = v;\n }\n else {\n currentStyle[k] = v;\n }\n res.push(k);\n }\n }\n return res;\n}\n\nfunction gotoOverload(options, cb) {\n if(isFunction(options)) {\n cb = options;\n options = {};\n }\n return [options || {}, cb];\n}\n\nfunction frameCb(self) {\n self.emit(Event.FRAME, self.__isChange);\n if(self.__firstPlay) {\n self.__firstPlay = false;\n self.emit(Event.PLAY);\n }\n let cb = self.__playCb;\n if(isFunction(cb)) {\n cb(self.__isChange);\n // 清理要检查,gotoAndStop()这种cb回调中直接再次调用goto的话cb会不一致不能删除\n if(self.__playCb === cb) {\n self.__playCb = null;\n }\n }\n}\n\nlet uuid = 0;\n\nclass Animation extends Event {\n constructor(target, list, options) {\n super();\n this.__id = uuid++;\n list = clone(list || []);\n if(Array.isArray(list)) {\n list = list.filter(item => item && isObject(item));\n }\n // 动画过程另外一种形式,object描述k-v形式\n else if(list && isObject(list)) {\n let nl = [];\n Object.keys(list).forEach(k => {\n let v = list[k];\n if(Array.isArray(v)) {\n for(let i = 0, len = v.length; i < len; i++) {\n let o = nl[i] = nl[i] || {\n offset: i / (len - 1),\n };\n o[k] = v[i];\n }\n }\n });\n list = nl;\n }\n else {\n list = [];\n }\n if(isNumber(options)) {\n this.__options = {\n duration: options,\n };\n options = this.__options;\n }\n let op = this.__options = options || {\n duration: 0,\n };\n this.__begin = true;\n this.__playState = 'idle';\n this.__target = target;\n this.__root = target.root;\n this.__isChange = false; // 每帧是否有变化,无变化不刷新也会触发frame事件\n this.__firstPlay = true;\n this.__firstEnter = true;\n let iterations = this.iterations = op.iterations;\n let duration = this.duration = op.duration;\n let { frames, framesR, keys, originStyle } = this.__init(list, iterations, duration, op.easing, target);\n this.__frames = frames;\n this.__framesR = framesR;\n this.__keys = keys;\n this.__originStyle = originStyle;\n this.__isDelay = false;\n this.__outBeginDelay = false;\n this.__playCount = 0;\n let fps = parseInt(op.fps) || 0;\n if(fps <= 0) {\n fps = 60;\n }\n this.fps = fps;\n this.spfLimit = op.spfLimit;\n this.delay = op.delay;\n this.endDelay = op.endDelay;\n this.playbackRate = op.playbackRate;\n this.fill = op.fill;\n this.iterations = op.iterations;\n this.direction = op.direction;\n this.easing = op.easing;\n this.__currentFrames = {\n reverse: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(op.direction) ? framesR : frames;\n // 时间戳\n this.__timestamp = frame.__now;\n }\n\n __init(list, iterations, duration, easing, target) {\n if(list.length < 1) {\n return { frames: [], framesR: [], keys: [], originStyle: {} };\n }\n // 过滤时间非法的,过滤后续offset<=前面的\n let offset = -1;\n for(let i = 0, len = list.length; i < len; i++) {\n let current = list[i];\n if(current.hasOwnProperty('offset')) {\n current.offset = parseFloat(current.offset) || 0;\n current.offset = Math.max(0, current.offset);\n current.offset = Math.min(1, current.offset);\n // 超过区间[0,1]\n if(isNaN(current.offset) || current.offset < 0 || current.offset > 1) {\n list.splice(i, 1);\n i--;\n len--;\n continue;\n }\n // <=前面的\n else if(current.offset <= offset) {\n list.splice(i, 1);\n i--;\n len--;\n continue;\n }\n }\n // 缩写处理\n Object.keys(current).forEach(k => {\n if(abbr.hasOwnProperty(k)) {\n abbr.toFull(current, k);\n }\n });\n // 检查key合法性\n Object.keys(current).forEach(k => {\n if(k !== 'easing' && k !== 'offset' && !change.isValid(target.tagName, k)) {\n delete current[k];\n }\n });\n }\n // 只有1帧复制出来变成2帧方便运行\n if(list.length === 1) {\n list[0] = clone(list[0]);\n if(list[0].offset === 1) {\n list.unshift({\n offset: 0,\n });\n }\n else {\n let copy = clone(list[0]);\n copy.offset = 1;\n list.push(copy);\n }\n }\n // 强制clone防止同引用\n else {\n list.forEach((item, i) => {\n list[i] = clone(item);\n });\n }\n // 首尾时间偏移强制为[0, 1],不是的话前后加空帧\n let first = list[0];\n if(first.hasOwnProperty('offset') && first.offset > 0) {\n first = {\n offset: 0,\n };\n list.unshift(first);\n }\n else {\n first.offset = 0;\n }\n let last = list[list.length - 1];\n if(last.hasOwnProperty('offset') && last.offset < 1) {\n last = {\n offset: 1,\n };\n list.push(last);\n }\n else {\n last.offset = 1;\n }\n // 计算没有设置offset的时间\n for(let i = 1, len = list.length; i < len; i++) {\n let start = list[i];\n // 从i=1开始offset一定>0,找到下一个有offset的,均分中间无声明的\n if(!start.hasOwnProperty('offset')) {\n let end;\n let j = i + 1;\n for(; j < len; j++) {\n end = list[j];\n if(end.hasOwnProperty('offset')) {\n break;\n }\n }\n let num = j - i + 1;\n start = list[i - 1];\n let per = (end.offset - start.offset) / num;\n for(let k = i; k < j; k++) {\n let item = list[k];\n item.offset = start.offset + per * (k + 1 - i);\n }\n i = j;\n }\n }\n let frames = [];\n // 换算每一关键帧样式标准化\n list.forEach(item => {\n frames.push(framing(item, duration, easing));\n });\n // 为方便两帧之间计算变化,强制统一所有帧的css属性相同,没有写的为节点的当前样式currentStyle\n let keys = unify(frames, target);\n inherit(frames, keys, target);\n let framesR = clone(frames).reverse();\n // 存储原本样式以便恢复用\n let { __currentStyle, __currentProps } = target;\n let originStyle = {};\n keys.forEach(k => {\n if(isGeom(target.tagName, k)) {\n originStyle[k] = __currentProps[k];\n }\n originStyle[k] = __currentStyle[k];\n });\n originStyle = cloneStyle(originStyle, keys);\n // 再计算两帧之间的变化,存入transition/fixed属性\n let length = frames.length;\n let prev = frames[0];\n for(let i = 1; i < length; i++) {\n let next = frames[i];\n prev = calFrame(prev, next, keys, target);\n }\n // 反向存储帧的倒排结果\n framesR.forEach(item => {\n item.time = duration - item.time;\n item.transition = [];\n });\n prev = framesR[0];\n for(let i = 1; i < length; i++) {\n let next = framesR[i];\n prev = calFrame(prev, next, keys, target);\n }\n return { frames, framesR, keys, originStyle };\n }\n\n __clean(isFinish) {\n this.__cancelTask();\n this.__nextTime = 0;\n if(isFinish) {\n // gotoAndStop到一个很大的时间的话,也需要防止超过\n this.__currentTime = this.__delay + this.__duration * this.__iterations + this.__endDelay;\n this.__playState = 'finished';\n }\n else {\n this.__playCount = this.__currentTime = 0;\n this.__playState = 'idle';\n }\n }\n\n play(cb) {\n let isDestroyed = this.__isDestroyed;\n let duration = this.__duration;\n let playState = this.__playState;\n let frames = this.__frames;\n if(isDestroyed || duration <= 0 || frames.length < 1) {\n return this;\n }\n if(playState === 'running') {\n return this;\n }\n this.__cancelTask();\n this.__playCb = cb;\n this.__playState = 'running';\n // 每次play调用标识第一次运行,需响应play事件和回调\n this.__firstPlay = true;\n this.__firstEnter = true;\n this.__playCount = 0;\n // 防止finish/cancel事件重复触发,每次播放重置\n this.__hasFin = false;\n this.__hasCancel = false;\n // 只有第一次调用会进初始化,另外finish/cancel视为销毁也会重新初始化\n if(!this.__enterFrame) {\n this.__enterFrame = true;\n let framesR = this.__framesR;\n let direction = this.__direction;\n // 初始化根据方向确定帧序列\n this.__currentFrames = {\n reverse: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(direction) ? framesR : frames;\n this.__currentTime = this.__nextTime = this.__fpsTime = 0;\n }\n // 添加每帧回调且立刻执行,本次执行调用refreshTask也是下一帧再渲染,frame的每帧都是下一帧\n // frame.offFrame(this);\n frame.onFrame(this);\n this.__startTime = frame.__now;\n this.__end = false;\n return this;\n }\n\n __before(diff) {\n this.__timestamp = frame.__now;\n let target = this.__target;\n let fps = this.__fps;\n let currentFrames = this.__currentFrames;\n let iterations = this.__iterations;\n let stayBegin = this.__stayBegin;\n let stayEnd = this.__stayEnd;\n let delay = this.__delay;\n let root = this.__root;\n let duration = this.__duration;\n let endDelay = this.__endDelay;\n let length = currentFrames.length;\n let playbackRate = this.__playbackRate;\n let spfLimit = this.__spfLimit;\n let currentTime = this.__currentTime = this.__nextTime;\n let lastFrame = this.__currentFrame;\n this.__isChange = false;\n // 定帧限制每帧时间间隔最大为spf\n if(spfLimit) {\n if(spfLimit === true) {\n diff = Math.min(diff, 1000 / fps);\n }\n else if(spfLimit > 0) {\n diff = Math.min(diff, spfLimit);\n }\n }\n // 播放时间累加,并且考虑播放速度加成\n if(playbackRate !== 1 && playbackRate > 0) {\n diff *= playbackRate;\n }\n // 用本帧和上帧时间差,计算累加运行时间currentTime,以便定位当前应该处于哪个时刻\n this.__nextTime += diff;\n // 增加的fps功能,当<60时计算跳帧,每帧运行依旧累加时间,达到fps时重置,第一帧强制不跳\n if(!this.__firstEnter && fps < 60) {\n diff = this.__fpsTime += diff;\n if(diff < 1000 / fps) {\n this.__inFps = true;\n return;\n }\n this.__fpsTime = 0;\n }\n this.__firstEnter = false;\n // delay仅第一次生效等待\n if(currentTime < delay) {\n if(stayBegin && !this.__isDelay) {\n let currentFrame = this.__currentFrame = currentFrames[0];\n let keys = calLastStyle(currentFrame.style, target, this.__keys);\n // 特殊处理,将ts上的cs指向当前currentStyle,一些继承样式如color被更新,否则delay后计算会报错\n let transition = currentFrame.transition;\n if(transition) {\n let currentStyle = target.__currentStyle;\n for(let i = 0, len = transition.length; i < len; i++) {\n let item = transition[i];\n item.cs = currentStyle[item.k] = item.st;\n }\n }\n this.__isChange = !!keys.length;\n genBeforeRefresh(keys, root, target, currentFrame, null);\n }\n this.__begin = false; // 默认是true,delay置false防触发\n // 即便不刷新,依旧执行帧回调,同时标明让后续第一帧响应begin\n this.__outBeginDelay = true;\n this.__isDelay = true;\n return;\n }\n this.__isDelay = false;\n // 减去delay,计算在哪一帧\n currentTime -= delay;\n if(this.__outBeginDelay) {\n this.__outBeginDelay = false;\n this.__begin = true;\n }\n // 超过duration非尾轮需处理回到开头,触发新一轮动画事件,这里可能时间间隔非常大直接跳过几轮\n let playCount = Math.min(iterations - 1, Math.floor(currentTime / duration));\n currentTime -= duration * playCount;\n // 如果发生轮换,需重新确定正反向\n if(this.__playCount < playCount) {\n this.__begin = true;\n this.__playCount = playCount;\n let direction = this.__direction;\n let frames = this.__frames;\n let framesR = this.__framesR;\n // 有正反向播放需要重设帧序列\n if(direction === 'alternate' || direction === 'alternate-reverse') {\n let isEven = playCount % 2 === 0;\n if(direction === 'alternate') {\n currentFrames = this.__currentFrames = isEven ? frames : framesR;\n }\n else {\n currentFrames = this.__currentFrames = isEven ? framesR : frames;\n }\n }\n }\n let isLastCount = playCount >= iterations - 1;\n // 只有2帧可优化,否则2分查找当前帧\n let i, frameTime;\n if(length === 2) {\n i = currentTime < duration ? 0 : 1;\n frameTime = duration;\n }\n else {\n i = binarySearch(0, length - 1, currentTime, currentFrames);\n frameTime = currentFrames[i].time;\n }\n // 最后一帧结束动画,仅最后一轮才会进入,需处理endDelay\n let isLastFrame = isLastCount && i === length - 1;\n let percent = 0;\n if(isLastFrame) {\n // 无需任何处理\n }\n // 否则根据目前到下一帧的时间差,计算百分比,再反馈到变化数值上\n else if(length === 2) {\n percent = currentTime / duration;\n }\n else {\n let total = currentFrames[i + 1].time - frameTime;\n percent = (currentTime - frameTime) / total;\n }\n let inEndDelay, currentFrame = currentFrames[i];\n let notSameFrame = lastFrame !== currentFrame;\n // 对比前后两帧是否为同一关键帧,不是则清除之前关键帧上的percent标识为-1,这样可以识别跳帧和本轮第一次进入此帧\n if(notSameFrame) {\n lastFrame && (lastFrame.lastPercent = -1);\n this.__currentFrame = currentFrame;\n }\n /** 这里要考虑全几种场景:\n * 1. 单次播放无endDelay且fill不停留(有/无差异,下同)\n * 2. 单次播放无endDelay且fill停留\n * 3. 单次播放有endDelay且fill不停留\n * 4. 单次播放有endDelay且fill停留\n * 5. 多次播放无endDelay且fill不停留(尾次/非尾次,下同)\n * 6. 多次播放无endDelay且fill停留\n * 7. 多次播放有endDelay且fill不停留\n * 8. 多次播放有endDelay且fill停留\n */\n let needClean;\n let keys;\n if(isLastFrame) {\n inEndDelay = currentTime < duration + endDelay;\n // 停留对比最后一帧,endDelay可能会多次进入这里,第二次进入样式相等不再重绘\n if(stayEnd) {\n keys = calLastStyle(currentFrame.style, target, this.__keys);\n }\n // 不停留或超过endDelay则计算还原,有endDelay且fill模式不停留会再次进入这里\n else {\n keys = calLastStyle(this.__originStyle, target, this.__keys);\n currentFrame = null; // 特殊清空,genBeforeRefresh()时不传过去\n }\n // 进入endDelay或结束阶段触发end事件,注意只触发一次,防重在触发的地方做\n this.__nextEnd = true;\n if(!inEndDelay) {\n this.__playCount++;\n this.__finished = true;\n frame.offFrame(this);\n needClean = true;\n this.__nextTime = 0;\n }\n }\n else {\n keys = calIntermediateStyle(currentFrame, percent, target, notSameFrame);\n }\n this.__isChange = !keys.length;\n genBeforeRefresh(keys, root, target, currentFrame, null);\n if(needClean) {\n let playCb = this.__playCb;\n this.__clean(true);\n // 丑陋的做法,防止gotoAndStop()这样的cb被clean()掉\n if(playCb) {\n this.__playCb = playCb;\n }\n }\n }\n\n __after() {\n if(this.__inFps) {\n this.__inFps = false;\n return;\n }\n frameCb(this);\n if(this.__begin) {\n this.__begin = false;\n this.emit(Event.BEGIN, this.__playCount);\n }\n // end事件只触发一次,末轮进入endDelay或直接结束时\n if(this.__nextEnd && !this.__end) {\n this.__end = true;\n this.emit(Event.END, this.__playCount - 1);\n }\n if(this.__finished) {\n this.__begin = this.__end = this.__isDelay = this.__finished\n = this.__inFps = this.__enterFrame = false;\n this.__playState = 'finished';\n this.emit(Event.FINISH, this.__isChange);\n }\n }\n\n pause(silence) {\n let isDestroyed = this.__isDestroyed;\n let duration = this.__duration;\n let { pending } = this;\n if(isDestroyed || duration <= 0 || pending) {\n return this;\n }\n this.__playState = 'paused';\n this.__cancelTask();\n if(!silence) {\n this.emit(Event.PAUSE);\n }\n return this;\n }\n\n resume(cb) {\n let isDestroyed = this.__isDestroyed;\n let duration = this.__duration;\n let playState = this.__playState;\n if(isDestroyed || duration <= 0 || playState !== 'paused') {\n return this;\n }\n return this.play(cb);\n }\n\n finish(cb) {\n let isDestroyed = this.__isDestroyed;\n let duration = this.__duration;\n let playState = this.__playState;\n let frames = this.__frames;\n if(isDestroyed || duration <= 0 || frames.length < 1) {\n return this;\n }\n if(playState === 'finished') {\n if(isFunction(cb)) {\n cb();\n }\n return this;\n }\n // 先清除所有回调任务,多次调用finish也会清除只留最后一次\n this.__clean(true);\n this.__begin = this.__end = this.__isDelay = this.__finished\n = this.__inFps = this.__enterFrame = false;\n this.__playState = 'finished';\n let root = this.__root;\n if(root) {\n let target = this.__target;\n let style;\n // 是否停留在最后一帧\n let currentFrame = null;\n if(this.__stayEnd) {\n let framesR = this.__framesR;\n let direction = this.__direction;\n let iterations = this.__iterations;\n if('reverse'.indexOf(direction) > -1) {\n [frames, framesR] = [framesR, frames];\n }\n if(iterations === Infinity || iterations % 2) {\n currentFrame = frames[frames.length - 1];\n style = currentFrame.style;\n }\n else {\n currentFrame = framesR[framesR.length - 1];\n style = currentFrame.style;\n }\n }\n else {\n style = this.__originStyle;\n }\n this.__currentFrame = currentFrame;\n let keys = calLastStyle(style, target, this.__keys);\n this.__isChange = !keys.length;\n genBeforeRefresh(keys, root, target, currentFrame, () => {\n frameCb(this);\n this.emit(Event.FINISH, this.__isChange);\n if(isFunction(cb)) {\n cb(this.__isChange);\n }\n });\n }\n return this;\n }\n\n cancel(cb) {\n let isDestroyed = this.__isDestroyed;\n let duration = this.__duration;\n let playState = this.__playState;\n let frames = this.__frames;\n if(isDestroyed || duration <= 0 || frames.length < 1) {\n return this;\n }\n if(playState === 'idle') {\n if(isFunction(cb)) {\n cb();\n }\n return this;\n }\n this.__clean();\n this.__begin = this.__end = this.__isDelay = this.__finished\n = this.__inFps = this.__enterFrame = false;\n this.__playState = 'idle';\n this.__currentFrame = null;\n let root = this.__root;\n if(root) {\n let target = this.__target;\n let keys = calLastStyle(this.__originStyle, target, this.__keys);\n this.__isChange = !keys.length;\n genBeforeRefresh(keys, root, target, null,() => {\n frameCb(this);\n this.emit(Event.CANCEL, this.__isChange);\n if(isFunction(cb)) {\n cb(this.__isChange);\n }\n });\n }\n return this;\n }\n\n gotoAndPlay(v, options, cb) {\n let isDestroyed = this.__isDestroyed;\n let duration = this.__duration;\n let frames = this.__frames;\n let delay = this.__delay;\n let endDelay = this.__endDelay;\n if(isDestroyed || duration <= 0 || frames.length < 1) {\n return this;\n }\n [options, cb] = gotoOverload(options, cb);\n // 计算出时间点直接累加播放\n this.__goto(v, options.isFrame, options.excludeDelay);\n if(v > duration + delay + endDelay) {\n return this.finish(cb);\n }\n return this.play(cb);\n }\n\n gotoAndStop(v, options, cb) {\n let isDestroyed = this.__isDestroyed;\n let duration = this.__duration;\n let frames = this.__frames;\n let delay = this.__delay;\n let endDelay = this.__endDelay;\n if(isDestroyed || duration <= 0 || frames.length < 1) {\n return this;\n }\n [options, cb] = gotoOverload(options, cb);\n v = this.__goto(v, options.isFrame, options.excludeDelay);\n if(v > duration + delay + endDelay) {\n return this.finish(cb);\n }\n // 先play一帧,回调里模拟暂停\n return this.play(() => {\n this.__playState = 'paused';\n this.__cancelTask();\n if(isFunction(cb)) {\n cb();\n }\n });\n }\n\n // 返回不包含delay且去除多轮的时间\n __goto(v, isFrame, excludeDelay) {\n let iterations = this.__iterations;\n let duration = this.__duration;\n this.__playState = 'paused';\n // this.__cancelTask(); // 应该不需要,gotoAndXxx都会调用play(),里面有\n if(isNaN(v) || v < 0) {\n throw new Error('Param of gotoAnd(Play/Stop) is illegal: ' + v);\n }\n if(isFrame) {\n v = (v - 1) / this.spf;\n }\n if(excludeDelay) {\n v += this.__delay;\n }\n // 在时间范围内设置好时间,复用play直接跳到播放点\n this.__nextTime = v;\n v -= this.__delay;\n // 超过时间长度需要累加次数,这里可以超过iterations,因为设定也许会非常大\n let playCount = 0;\n while(v >= duration && playCount < iterations - 1) {\n playCount++;\n v -= duration;\n }\n this.__playCount = playCount;\n // 防止play()重置时间和当前帧组,提前计算好\n this.__enterFrame = true;\n let frames = this.__frames;\n let framesR = this.__framesR;\n let direction = this.__direction;\n if({\n alternate: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(direction)) {\n let isEven = playCount % 2 === 0;\n if(direction === 'alternate') {\n this.__currentFrames = isEven ? frames : framesR;\n }\n else {\n this.__currentFrames = isEven ? framesR : frames;\n }\n }\n return v;\n }\n\n addControl() {\n let root = this.root;\n if(!root) {\n return;\n }\n let ac = root.animateController;\n if(ac) {\n ac.add(this);\n }\n }\n\n removeControl() {\n let root = this.__root;\n if(!root) {\n return;\n }\n let ac = root.__animateController;\n if(ac) {\n ac.remove(this);\n }\n }\n\n __setTarget(target) {\n this.__target = target;\n }\n\n __cancelTask() {\n frame.offFrame(this);\n this.__playCb = null;\n }\n\n __destroy() {\n if(this.__isDestroyed) {\n return;\n }\n this.removeControl();\n this.__clean();\n this.__target = this.__root = null;\n this.__startTime = 0;\n this.__isDestroyed = true;\n }\n\n __checkModify() {\n if(this.__playState !== 'idle' && this.__playState !== 'finished') {\n inject.warn('Modification will not come into effect when animation is running');\n }\n }\n\n get id() {\n return this.__id;\n }\n\n get target() {\n return this.__target;\n }\n\n get root() {\n return this.__root;\n }\n\n get keys() {\n return this.__keys;\n }\n\n get options() {\n return this.__options;\n }\n\n get duration() {\n return this.__duration;\n }\n\n set duration(v) {\n v = Math.max(0, parseFloat(v) || 0);\n if(this.__duration !== v) {\n this.__duration = v;\n this.__checkModify();\n }\n return v;\n }\n\n get delay() {\n return this.__delay;\n }\n\n set delay(v) {\n v = Math.max(0, parseFloat(v) || 0);\n if(this.__delay !== v) {\n this.__delay = v;\n this.__checkModify();\n }\n return v;\n }\n\n get endDelay() {\n return this.__endDelay;\n }\n\n set endDelay(v) {\n v = Math.max(0, parseFloat(v) || 0);\n if(this.__endDelay !== v) {\n this.__endDelay = v;\n this.__checkModify();\n }\n return v;\n }\n\n get fps() {\n return this.__fps;\n }\n\n set fps(v) {\n v = parseInt(v) || 60;\n if(this.__fps !== v) {\n if(v <= 0) {\n v = 60;\n }\n this.__fps = v;\n }\n return v;\n }\n\n get spf() {\n return 1 / this.fps;\n }\n\n get iterations() {\n return this.__iterations;\n }\n\n set iterations(v) {\n if(v === Infinity || util.isString(v) && v.toLowerCase() === 'infinity') {\n v = Infinity;\n }\n else {\n v = parseInt(v);\n if(isNaN(v) || v < 0) {\n v = 1;\n }\n }\n if(this.__iterations !== v) {\n this.__iterations = v;\n }\n return v;\n }\n\n get fill() {\n return this.__fill;\n }\n\n set fill(v) {\n v = v || 'none';\n if(this.__fill !== v) {\n this.__fill = v;\n this.__checkModify();\n }\n this.__stayBegin = {\n backwards: true,\n both: true,\n }.hasOwnProperty(v);\n this.__stayEnd = {\n forwards: true,\n both: true,\n }.hasOwnProperty(v);\n return v;\n }\n\n get direction() {\n return this.__direction;\n }\n\n set direction(v) {\n v = v || 'normal';\n if(this.__direction !== v) {\n this.__direction = v;\n this.__checkModify();\n }\n return v;\n }\n\n get frames() {\n return this.__frames;\n }\n\n get framesR() {\n return this.__framesR;\n }\n\n get playbackRate() {\n return this.__playbackRate;\n }\n\n set playbackRate(v) {\n v = parseFloat(v) || 1;\n if(v <= 0) {\n v = 1;\n }\n if(this.__playbackRate !== v) {\n this.__playbackRate = v;\n }\n return v;\n }\n\n get easing() {\n return this.__easing;\n }\n\n set easing(v) {\n this.__easing = v;\n }\n\n get startTime() {\n return this.__startTime;\n }\n\n get currentTime() {\n return this.__currentTime;\n }\n\n set currentTime(v) {\n v = Math.max(0, parseFloat(v) || 0);\n if(this.__currentTime !== v) {\n this.__currentTime = v;\n this.__nextTime = v;\n }\n return v;\n }\n\n get nextTime() {\n return this.__nextTime;\n }\n\n set nextTime(v) {\n v = Math.max(0, parseFloat(v) || 0);\n if(this.__nextTime !== v) {\n this.__nextTime = v;\n }\n return v;\n }\n\n get timestamp() {\n return this.__timestamp;\n }\n\n get pending() {\n return this.__playState !== 'running';\n }\n\n get finished() {\n return this.__playState === 'finished';\n }\n\n get playState() {\n return this.__playState;\n }\n\n get playCount() {\n return this.__playCount;\n }\n\n set playCount(v) {\n v = Math.max(0, parseInt(v) || 0);\n if(this.__playCount !== v) {\n this.__playCount = v;\n }\n return v;\n }\n\n get isDestroyed() {\n return this.__isDestroyed;\n }\n\n get animating() {\n let playState = this.__playState;\n if(playState === 'idle') {\n return false;\n }\n return playState !== 'finished' || this.__stayEnd || this.__stayBegin;\n }\n\n get spfLimit() {\n return this.__spfLimit;\n }\n\n set spfLimit(v) {\n if(util.isNumber(v) || /^\\d/.test(v)) {\n v = Math.max(0, parseInt(v) || 0);\n }\n else {\n v = !!v;\n }\n if(this.__spfLimit !== v) {\n this.__spfLimit = v;\n }\n return v;\n }\n}\n\nexport default Animation;\n","import mode from '../refresh/mode';\nimport geom from '../math/geom';\nimport blur from '../math/blur';\nimport util from '../util/util';\nimport painter from '../util/painter';\n\nconst { int2rgba } = util;\nconst { canvasPolygon, svgPolygon } = painter;\n\nfunction renderBoxShadow(xom, renderMode, ctx, data, x1, y1, x2, y2, w, h, dx = 0, dy = 0) {\n x1 += dx;\n y1 += dy;\n x2 += dx;\n y2 += dy;\n let [x, y, sigma, spread, color, inset] = data;\n let c = int2rgba(color);\n let n = Math.abs(sigma) * 2 + Math.abs(spread) * 2 + Math.abs(x) * 2 + Math.abs(y) * 2;\n // box本身坐标顺时针\n let box = [\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1, y2],\n [x1, y1],\n ];\n // 算上各种偏移/扩散的最外层坐标,且逆时针\n let outer = [\n [x1 - n, y1 - n],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n ];\n if(color[3] > 0) {\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n ctx.save();\n ctx.beginPath();\n // inset裁剪box外面\n if(inset === 'inset') {\n let xa = x1 + x + spread;\n let ya = y1 + y + spread;\n let xb = x2 + x - spread;\n let yb = y2 + y - spread;\n let spreadBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n // 是否相交判断需要绘制\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [spreadBox[0][0], spreadBox[0][1], spreadBox[2][0], spreadBox[2][1]]);\n if(!cross) {\n return;\n }\n cross = [\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ];\n // 扩散区域类似边框填充\n if(spread) {\n canvasPolygon(ctx, cross);\n canvasPolygon(ctx, box.slice(0).reverse());\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== c) {\n ctx.fillStyle = c;\n }\n canvasPolygon(ctx, box);\n ctx.fill();\n ctx.closePath();\n ctx.restore();\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, cross);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n // 画在外围的空心矩形,宽度要比blur大,n考虑了这一情况取了最大值\n canvasPolygon(ctx, [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [x1 - n, yb],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, yb],\n [xa, yb],\n [xa, ya],\n ]);\n }\n else {\n canvasPolygon(ctx, box);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowOffsetX = x;\n ctx.shadowOffsetY = y;\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n canvasPolygon(ctx, [\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1 - n, y2],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, y2],\n [x1, y2],\n [x1, y1],\n ]);\n }\n }\n // outset需裁减掉box本身的内容,clip()非零环绕显示box外的阴影内容,fill()绘制在内无效\n else {\n let xa = x1 + x - spread;\n let ya = y1 + y - spread;\n let xb = x2 + x + spread;\n let yb = y2 + y + spread;\n let blurBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [blurBox[0][0], blurBox[0][1], blurBox[2][0], blurBox[2][1]]);\n // 分为是否有spread,因模糊成本spread区域将没有模糊\n if(spread) {\n // 扩散区域类似边框填充\n canvasPolygon(ctx, box);\n canvasPolygon(ctx, blurBox.slice(0).reverse());\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== c) {\n ctx.fillStyle = c;\n }\n canvasPolygon(ctx, blurBox);\n ctx.fill();\n ctx.closePath();\n ctx.restore();\n ctx.save();\n ctx.beginPath();\n // 阴影部分看相交情况裁剪,有相交时逆时针绘制相交区域即可排除之\n if(cross) {\n canvasPolygon(ctx, [\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ].reverse());\n }\n canvasPolygon(ctx, box);\n canvasPolygon(ctx, blurBox);\n canvasPolygon(ctx, outer);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n canvasPolygon(ctx, blurBox);\n }\n else {\n canvasPolygon(ctx, box);\n canvasPolygon(ctx, outer);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowOffsetX = x;\n ctx.shadowOffsetY = y;\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n canvasPolygon(ctx, box);\n }\n }\n ctx.fill();\n ctx.closePath();\n ctx.restore();\n }\n else if(renderMode === mode.SVG) {\n let d = blur.outerSize(sigma);\n if(inset === 'inset') {\n let xa = x1 + x + spread;\n let ya = y1 + y + spread;\n let xb = x2 + x - spread;\n let yb = y2 + y - spread;\n let spreadBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [spreadBox[0][0], spreadBox[0][1], spreadBox[2][0], spreadBox[2][1]]);\n if(!cross) {\n return;\n }\n cross = [\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ];\n if(spread) {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', 0],\n ['dy', 0],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n }\n xom.__cacheDefs.push(v);\n let filter = ctx.add(v);\n let v2 = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(cross) + svgPolygon(box.slice(0).reverse())],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v2);\n xom.__cacheDefs.push(v2);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(box)],\n ['fill', c],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(cross)],\n ['fill', '#FFF'],\n ],\n }],\n };\n clip = ctx.add(v);\n xom.__cacheDefs.push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon([\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [x1 - n, yb],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, yb],\n [xa, yb],\n [xa, ya],\n ])],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n else {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', x],\n ['dy', y],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n }\n let filter = ctx.add(v);\n xom.__cacheDefs.push(v);\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(box)],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v);\n xom.__cacheDefs.push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon([\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1 - n, y2],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, y2],\n [x1, y2],\n [x1, y1],\n ])],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n }\n else {\n let xa = x1 + x - spread;\n let ya = y1 + y - spread;\n let xb = x2 + x + spread;\n let yb = y2 + y + spread;\n let blurBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [blurBox[0][0], blurBox[0][1], blurBox[2][0], blurBox[2][1]]);\n if(spread) {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', 0],\n ['dy', 0],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n };\n let filter = ctx.add(v);\n xom.__cacheDefs.push(v);\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(box) + svgPolygon(blurBox.slice(0).reverse())],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v);\n xom.__cacheDefs.push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(blurBox)],\n ['fill', c],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', (cross ? svgPolygon([\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ].reverse()) : '')\n + svgPolygon(box) + svgPolygon(blurBox) + svgPolygon(outer)],\n ['fill', '#FFF'],\n ],\n }],\n };\n clip = ctx.add(v);\n xom.__cacheDefs.push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(blurBox)],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n else {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', x],\n ['dy', y],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n };\n let filter = ctx.add(v);\n xom.__cacheDefs.push(v);\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(box) + svgPolygon(outer)],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v);\n xom.__cacheDefs.push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(box)],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n }\n }\n }\n}\n\nexport default {\n renderBoxShadow,\n};\n","const hash = {};\n\nfunction mbmName(v) {\n if(v) {\n if(hash.hasOwnProperty(v)) {\n return hash[v];\n }\n return hash[v] = v.replace(/[A-Z]/, function($0) {\n return '-' + $0.toLowerCase();\n });\n }\n}\n\nfunction isValidMbm(v) {\n if(v === 'normal') {\n return false;\n }\n return v === 'multiply'\n || v === 'screen'\n || v === 'overlay'\n || v === 'darken'\n || v === 'lighten'\n || v === 'colorDodge'\n || v === 'color-dodge'\n || v === 'colorBurn'\n || v === 'color-burn'\n || v === 'hardLight'\n || v === 'hard-light'\n || v === 'softLight'\n || v === 'soft-light'\n || v === 'difference'\n || v === 'exclusion'\n || v === 'hue'\n || v === 'saturation'\n || v === 'color'\n || v === 'luminosity';\n}\n\nexport default {\n mbmName,\n isValidMbm,\n};\n","import Node from './Node';\nimport Component from './Component';\nimport inline from './inline';\nimport Ellipsis from './Ellipsis';\nimport unit from '../style/unit';\nimport tf from '../style/transform';\nimport gradient from '../style/gradient';\nimport border from '../style/border';\nimport css from '../style/css';\nimport bg from '../style/bg';\nimport abbr from '../style/abbr';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport painter from '../util/painter';\nimport Animation from '../animate/Animation';\nimport frame from '../animate/frame';\nimport mx from '../math/matrix';\nimport geom from '../math/geom';\nimport mode from '../refresh/mode';\nimport change from '../refresh/change';\nimport level from '../refresh/level';\nimport font from '../style/font';\nimport bs from '../style/bs';\nimport mbm from '../style/mbm';\nimport reset from '../style/reset';\n\nconst { svgPolygon } = painter;\nconst { CANVAS, SVG, WEBGL } = mode;\nconst { normalize, equalStyle } = css;\n\nconst {\n STYLE_KEY,\n STYLE_RV_KEY,\n style2Upper,\n STYLE_KEY: {\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n PADDING_LEFT,\n PADDING_RIGHT,\n PADDING_TOP,\n PADDING_BOTTOM,\n MARGIN_LEFT,\n MARGIN_TOP,\n MARGIN_BOTTOM,\n MARGIN_RIGHT,\n BORDER_LEFT_WIDTH,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_RIGHT_WIDTH,\n TOP,\n RIGHT,\n BOTTOM,\n LEFT,\n POSITION,\n DISPLAY,\n WIDTH,\n HEIGHT,\n MATRIX,\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n TRANSFORM,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n SKEW_X,\n SKEW_Y,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n ROTATE_3D,\n TRANSFORM_ORIGIN,\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n BACKGROUND_SIZE,\n BACKGROUND_COLOR,\n BACKGROUND_IMAGE,\n BACKGROUND_REPEAT,\n BOX_SHADOW,\n OPACITY,\n Z_INDEX,\n BORDER_TOP_STYLE,\n BORDER_RIGHT_STYLE,\n BORDER_BOTTOM_STYLE,\n BORDER_LEFT_STYLE,\n FILTER,\n OVERFLOW,\n MIX_BLEND_MODE,\n TEXT_OVERFLOW,\n BORDER_TOP_COLOR,\n BORDER_BOTTOM_COLOR,\n BORDER_LEFT_COLOR,\n BORDER_RIGHT_COLOR,\n FONT_STYLE,\n COLOR,\n VISIBILITY,\n POINTER_EVENTS,\n BORDER_TOP,\n BORDER_RIGHT,\n BORDER_BOTTOM,\n BORDER_LEFT,\n BACKGROUND_CLIP,\n FONT_SIZE,\n FONT_FAMILY,\n LINE_HEIGHT,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n FONT_WEIGHT,\n FLEX_DIRECTION,\n JUSTIFY_CONTENT,\n ALIGN_ITEMS,\n ALIGN_SELF,\n FLEX_GROW,\n FLEX_SHRINK,\n LINE_CLAMP,\n ORDER,\n FLEX_WRAP,\n ALIGN_CONTENT,\n TEXT_ALIGN,\n LETTER_SPACING,\n WHITE_SPACE,\n WRITING_MODE,\n TRANSFORM_STYLE,\n BACKFACE_VISIBILITY,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, INHERIT, NUMBER, RGBA, STRING, REM, VW, VH, VMAX, VMIN, DEG, GRADIENT } = unit;\nconst { int2rgba, rgba2int, joinArr, isNil, isFunction } = util;\nconst { calRelative, calNormalLineHeight, calFontFamily, spreadBoxShadow, spreadFilter } = css;\nconst { GEOM } = change;\nconst { mbmName, isValidMbm } = mbm;\nconst { point2d, multiply,\n multiplyRotateX, multiplyRotateY, multiplyRotateZ,\n multiplySkewX, multiplySkewY,\n multiplyScaleX, multiplyScaleY, multiplyScaleZ } = mx;\n\nconst {\n TRANSFORM: TF,\n REFLOW,\n REPAINT,\n TRANSLATE_X: TX,\n TRANSLATE_Y: TY,\n TRANSLATE_Z: TZ,\n ROTATE_Z: RZ,\n SCALE_X: SX,\n SCALE_Y: SY,\n SCALE_Z: SZ,\n SCALE,\n TRANSFORM_ALL,\n CACHE,\n MASK,\n} = level;\nconst { d2r } = geom;\nconst { calRotateX, calRotateY, calRotateZ, calRotate3d } = tf;\n\nfunction getFirstEmptyInlineWidth(xom) {\n let n = 0;\n let flowChildren = xom.flowChildren;\n let length = flowChildren.length;\n for(let i = 0; i < length; i++) {\n let child = flowChildren[i];\n if(child instanceof Xom || child instanceof Component && child.shadowRoot instanceof Xom) {\n if(child.flowChildren && child.flowChildren.length) {\n n += getFirstEmptyInlineWidth(child);\n break;\n }\n else if(child.__isInline) {\n n += child.outerWidth;\n }\n }\n else {\n break;\n }\n }\n return n;\n}\n\nfunction getLastEmptyInlineWidth(xom) {\n let n = 0;\n let flowChildren = xom.flowChildren;\n let length = flowChildren.length;\n for(let i = length - 1; i >= 0; i--) {\n let child = flowChildren[i];\n if(child instanceof Xom || child instanceof Component && child.shadowRoot instanceof Xom) {\n if(child.flowChildren && child.flowChildren.length) {\n n += getLastEmptyInlineWidth(child);\n break;\n }\n else {\n n += child.outerWidth;\n }\n }\n else {\n break;\n }\n }\n return n;\n}\n\nclass Xom extends Node {\n constructor(tagName, props = {}) {\n super();\n // 构建工具中都是arr,手写可能出现hash情况\n if(Array.isArray(props)) {\n this.props = util.arr2hash(props);\n }\n else {\n this.props = props;\n }\n this.__tagName = tagName;\n this.__style = this.props.style || {}; // style被解析后的k-v形式\n this.__currentStyle = []; // 动画过程中绘制一开始会merge动画样式\n this.__computedStyle = []; // 类似getComputedStyle()将currentStyle计算好数值赋给\n this.__listener = {};\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n if(/^on[a-zA-Z]/.test(k)) {\n k = k.slice(2).toLowerCase();\n this.listener[k] = v;\n }\n });\n this.__animationList = [];\n this.__loadBgi = {\n // 刷新回调函数,用以destroy取消用\n cb: function() {\n },\n };\n this.__cacheStyle = []; // 是否缓存重新计算computedStyle的样式key\n this.__cacheDefs = []; // svg专用,缓存渲染时使用已有的defs,diff过程用,否则会defs被清空\n let isClip = this.__clip = !!this.props.clip;\n this.__mask = isClip || !!this.props.mask;\n this.__refreshLevel = REFLOW;\n this.__limitCache = false;\n this.__isInline = false;\n this.__hasContent = false;\n this.__opacity = 1;\n this.__matrix = [];\n this.__matrixEvent = [];\n this.__perspectiveMatrix = null;\n this.__frameAnimateList = [];\n this.__contentBoxList = []; // inline存储内容用\n this.__cacheAsBitmap = !!this.props.cacheAsBitmap;\n this.__cache = this.__cacheTotal = this.__cacheFilter = this.__cacheMask;\n this.__layoutData = null; // 缓存上次布局x/y/w/h数据\n this.__hasComputeReflow = false; // 每次布局计算缓存标,使得每次开始只computeReflow一次\n this.__parentLineBox = null; // inline时指向\n this.__fontRegister = {}; // 优先级字体尚未加载时记录回调hash,销毁时删除回调\n }\n\n __structure(lv, j) {\n let res = super.__structure(lv, j);\n if(this.__hasMask) {\n res.hasMask = this.__hasMask;\n }\n return res;\n }\n\n __modifyStruct() {}\n\n // 设置margin/padding的实际值,layout时执行,inline的垂直方向仍然计算值,但在布局时被忽略\n __mp(currentStyle, computedStyle, w) {\n [\n 'Top',\n 'Right',\n 'Bottom',\n 'Left',\n ].forEach(k => {\n let a = STYLE_KEY[style2Upper('margin' + k)];\n let b = STYLE_KEY[style2Upper('padding' + k)];\n computedStyle[a] = this.__calSize(currentStyle[a], w, true);\n computedStyle[b] = this.__calSize(currentStyle[b], w, true);\n });\n }\n\n __calSize(v, w, includePercent) {\n if(v.u === PX) {\n return v.v;\n }\n else if(v.u === PERCENT) {\n if(includePercent) {\n return v.v * w * 0.01;\n }\n }\n else if(v.u === REM || v.u === REM) {\n return v.v * this.__root.computedStyle[FONT_SIZE];\n }\n else if(v.u === VW) {\n return v.v * this.__root.width * 0.01;\n }\n else if(v.u === VH) {\n return v.v * this.__root.height * 0.01;\n }\n else if(v.u === VMAX) {\n return v.v * Math.max(this.__root.width, this.__root.height) * 0.01;\n }\n else if(v.u === VMIN) {\n return v.v * Math.min(this.__root.width, this.__root.height) * 0.01;\n }\n return 0;\n }\n\n __computeReflow() {\n if(this.__hasComputeReflow) {\n return;\n }\n this.__hasComputeReflow = true;\n\n let { __currentStyle: currentStyle, __computedStyle: computedStyle, __domParent: parent } = this;\n let isRoot = !parent;\n let parentComputedStyle = parent && parent.__computedStyle;\n // 继承的特殊处理,根节点用默认值\n [FONT_SIZE, FONT_FAMILY, FONT_WEIGHT, WRITING_MODE].forEach(k => {\n let v = currentStyle[k];\n // ff特殊处理\n if(k === FONT_FAMILY) {\n if(v.u === INHERIT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : parentComputedStyle[k];\n }\n else {\n computedStyle[k] = v.v;\n let ff = v.v.split(/\\s*,\\s*/);\n // 从左到右即声明的字体优先级\n for(let i = 0, len = ff.length; i < len; i++) {\n let item = ff[i].replace(/^['\"]/, '').replace(/['\"]$/, '');\n if(font.hasRegister(item)) {\n // 如果已经注册加载了,或者注册且本地支持的,说明可用\n if(font.hasLoaded(item) || inject.checkSupportFontFamily(item)) {\n break;\n }\n }\n // 不可用的都特殊记住等待注册回调__loadFontCallback\n this.__fontRegister[item] = true;\n font.onRegister(item, this);\n }\n }\n }\n else if(v.u === INHERIT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : parentComputedStyle[k];\n }\n // 只有fontSize会有%\n else if(v.u === PERCENT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (parentComputedStyle[k] * v.v * 0.01);\n }\n else if(v.u === REM) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (this.root.computedStyle[FONT_SIZE] * v.v);\n }\n else if(v.u === VW) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (this.root.width * 0.01 * v.v);\n }\n else if(v.u === VH) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (this.root.height * 0.01 * v.v);\n }\n else if(v.u === VMAX) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (Math.max(this.root.width, this.root.height) * 0.01 * v.v);\n }\n else if(v.u === VMIN) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (Math.min(this.root.width, this.root.height) * 0.01 * v.v);\n }\n else {\n computedStyle[k] = v.v;\n }\n });\n [\n BORDER_TOP_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n ].forEach(k => {\n // border-width不支持百分比\n let item = currentStyle[k];\n computedStyle[k] = this.__calSize(item, 0, false);\n });\n [\n POSITION,\n DISPLAY,\n FLEX_DIRECTION,\n JUSTIFY_CONTENT,\n ALIGN_ITEMS,\n ALIGN_SELF,\n FLEX_GROW,\n FLEX_SHRINK,\n LINE_CLAMP,\n ORDER,\n FLEX_WRAP,\n ALIGN_CONTENT,\n OVERFLOW,\n TEXT_OVERFLOW,\n ].forEach(k => {\n computedStyle[k] = currentStyle[k];\n });\n // writingMode特殊判断inline\n if(parentComputedStyle && computedStyle[WRITING_MODE] !== parentComputedStyle[WRITING_MODE] && computedStyle[DISPLAY] === 'inline') {\n computedStyle[DISPLAY] = 'inlineBlock';\n }\n // 匿名块对象\n if(computedStyle[POSITION] === 'absolute' || parentComputedStyle && parentComputedStyle[DISPLAY] === 'flex') {\n if(['block', 'flex'].indexOf(computedStyle[DISPLAY]) === -1) {\n computedStyle[DISPLAY] = 'block';\n }\n }\n let textAlign = currentStyle[TEXT_ALIGN];\n if(textAlign.u === INHERIT) {\n computedStyle[TEXT_ALIGN] = isRoot ? 'left' : parentComputedStyle[TEXT_ALIGN];\n }\n else {\n computedStyle[TEXT_ALIGN] = textAlign.v;\n }\n let fontSize = computedStyle[FONT_SIZE];\n let lineHeight = currentStyle[LINE_HEIGHT];\n // lineHeight继承很特殊,数字和normal不同于普通单位\n if(lineHeight.u === INHERIT) {\n if(isRoot) {\n computedStyle[LINE_HEIGHT] = calNormalLineHeight(computedStyle);\n }\n else {\n let p = parent;\n let ph;\n while(p) {\n ph = p.currentStyle[LINE_HEIGHT];\n if(ph.u !== INHERIT) {\n break;\n }\n p = p.domParent;\n }\n // 到root还是inherit或normal,或者中途遇到了normal,使用normal\n if([AUTO, INHERIT].indexOf(ph.u) > -1) {\n computedStyle[LINE_HEIGHT] = calNormalLineHeight(computedStyle);\n }\n // 数字继承\n else if(ph.u === NUMBER) {\n computedStyle[LINE_HEIGHT] = Math.max(ph.v, 0) * fontSize;\n }\n // 单位继承\n else {\n computedStyle[LINE_HEIGHT] = parentComputedStyle[LINE_HEIGHT];\n }\n }\n }\n else if(lineHeight.u === NUMBER) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight.v, 0) * fontSize || calNormalLineHeight(computedStyle);\n }\n // 防止为0\n else {\n let v = Math.max(this.__calSize(lineHeight, fontSize, true), 0);\n computedStyle[LINE_HEIGHT] = v || calNormalLineHeight(computedStyle);\n }\n let letterSpacing = currentStyle[LETTER_SPACING];\n if(letterSpacing.u === INHERIT) {\n computedStyle[LETTER_SPACING] = isRoot ? 0 : parentComputedStyle[LETTER_SPACING];\n }\n else {\n computedStyle[LETTER_SPACING] = this.__calSize(letterSpacing, fontSize, true);\n }\n //whiteSpace\n let whiteSpace = currentStyle[WHITE_SPACE];\n if(whiteSpace.u === INHERIT) {\n computedStyle[WHITE_SPACE] = isRoot ? 'normal' : parentComputedStyle[WHITE_SPACE];\n }\n else {\n computedStyle[WHITE_SPACE] = whiteSpace.v;\n }\n let {\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n this.__width = this.__height = 0;\n // 布局前固定尺寸的线设置好,子元素percent尺寸要用到,flex的子元素侧轴stretch也要特殊提前处理,认为定高\n if(width.u !== AUTO) {\n this.__width = computedStyle[WIDTH] = this.__calSize(width, isRoot ? this.__width : parent.__width, true);\n }\n if(height.u !== AUTO) {\n this.__height = computedStyle[HEIGHT] = this.__calSize(height, isRoot ? this.__height : parent.__height, true);\n }\n else {\n let p = this.__domParent;\n if(p) {\n let crs = p.__currentStyle;\n let alignSelf = currentStyle[ALIGN_SELF];\n // flex的子元素stretch提前处理认为高度,以便其子元素%高度计算\n if(crs[DISPLAY] === 'flex' && p.__height) {\n if(crs[FLEX_DIRECTION].indexOf('row') > -1\n && (alignSelf === 'stretch'\n || crs[ALIGN_ITEMS] === 'stretch' && alignSelf === 'auto')) {\n this.__height = p.__height;\n }\n }\n }\n }\n }\n\n __emitFontRegister(fontFamily) {\n let node = this, fontRegister = node.__fontRegister;\n if(node.__isDestroyed) {\n return;\n }\n delete fontRegister[fontFamily];\n let { root, currentStyle } = node;\n if(!root) {\n return;\n }\n let v = currentStyle[FONT_FAMILY];\n if(v.u === INHERIT) {\n return;\n }\n let ff = v.v.split(/\\s*,\\s*/);\n for(let i = 0, len = ff.length; i < len; i++) {\n let item = ff[i].replace(/^['\"]/, '').replace(/['\"]$/, '');\n if(item === fontFamily) {\n // 加载成功回调可能没注册信息,需要多判断一下\n if(font.hasRegister(item)) {\n root.__addUpdate(node, null, REFLOW, null, null, null, null);\n }\n // 后面低优先级的无需再看\n return;\n }\n // 有更高优先级的已经支持了,回调刷新无效\n else if(font.hasRegister(item)\n && (font.hasLoaded(item) || inject.checkSupportFontFamily(item))) {\n return;\n }\n }\n }\n\n // dom常用的几种尺寸赋值\n __ioSize(w, h) {\n let computedStyle = this.computedStyle;\n // 可能不传,在虚拟布局时用不到\n if(!isNil(w)) {\n this.__width = computedStyle[WIDTH] = w;\n this.__clientWidth = w += computedStyle[PADDING_LEFT] + computedStyle[PADDING_RIGHT];\n this.__offsetWidth = w += computedStyle[BORDER_LEFT_WIDTH] + computedStyle[BORDER_RIGHT_WIDTH];\n this.__outerWidth = w + computedStyle[MARGIN_LEFT] + computedStyle[MARGIN_RIGHT];\n }\n if(!isNil(h)) {\n this.__height = computedStyle[HEIGHT] = h;\n this.__clientHeight = h += computedStyle[PADDING_TOP] + computedStyle[PADDING_BOTTOM];\n this.__offsetHeight = h += computedStyle[BORDER_TOP_WIDTH] + computedStyle[BORDER_BOTTOM_WIDTH];\n this.__outerHeight = h + computedStyle[MARGIN_TOP] + computedStyle[MARGIN_BOTTOM];\n }\n }\n\n // 为basis的b/min/max添加mpb,只有当b未显示指定等于w/content时才加,同时返回mpb值\n __addMBP(isDirectionRow, w, currentStyle, computedStyle, res, isDirectItem) {\n let {\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n } = currentStyle;\n let {\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = computedStyle;\n let mbp = this.__calSize(marginLeft, w, isDirectItem)\n + this.__calSize(marginRight, w, isDirectItem)\n + this.__calSize(paddingLeft, w, isDirectItem)\n + this.__calSize(paddingRight, w, isDirectItem)\n + borderLeftWidth + borderRightWidth;\n if(isDirectionRow) {\n res = res.map(item => item + mbp);\n }\n else {\n let mbp = this.__calSize(marginTop, w, isDirectItem)\n + this.__calSize(marginBottom, w, isDirectItem)\n + this.__calSize(paddingTop, w, isDirectItem)\n + this.__calSize(paddingBottom, w, isDirectItem)\n + borderTopWidth + borderBottomWidth;\n res = res.map(item => item + mbp);\n }\n return res;\n }\n\n __layout(data, isAbs, isColumn, isRow) {\n this.__layoutFlow(data, isAbs, isColumn, isRow);\n }\n\n // absolute且无尺寸时,isAbs标明先假布局一次计算尺寸,还有flex列计算时isColumn假布局,flex横计算时writingMode垂直假布局\n __layoutFlow(data, isAbs, isColumn, isRow) {\n this.__computeReflow();\n let { __isDestroyed, __currentStyle, __computedStyle, __ellipsis } = this;\n // 虚拟省略号每次清除\n if(__ellipsis) {\n this.__ellipsis = null;\n }\n this.__parentLineBox = null;\n this.__isIbFull = this.__isUprightIbFull = false;\n let {\n [DISPLAY]: display,\n [POSITION]: position,\n } = __computedStyle;\n this.__layoutData = {\n x: data.x,\n y: data.y,\n w: data.w,\n h: data.h,\n lx: data.lx,\n ly: data.ly,\n isUpright: data.isUpright, // 从Root开始,父级的书写模式需每层传递\n container: data.container,\n };\n // 防止display:none不统计mask,isVirtual忽略,abs/flex布局后续会真正来走一遍\n if(!isAbs && !isColumn && !isRow) {\n this.clearCache();\n this.__cacheStyle = [];\n this.__refreshLevel = REFLOW;\n this.__limitCache = false;\n this.__isInline = false;\n let { next } = this;\n // mask关系只有布局才会变更,普通渲染关系不会改变,clip也是mask的一种\n if(!this.__mask && next && (next.__mask)) {\n let count = 0;\n while(next) {\n if(next.__mask) {\n count++;\n }\n else {\n break;\n }\n next = next.next;\n }\n this.__hasMask = count;\n }\n }\n if(__isDestroyed || display === 'none') {\n this.__x = data.x;\n this.__y = data.y;\n this.__layoutNone();\n this.__hasComputeReflow = false;\n return;\n }\n // absolute特殊,在自己布局时已计算相对于容器的mbp\n if(position !== 'absolute') {\n this.__mp(__currentStyle, __computedStyle, data.w);\n }\n // 只有inline会继承计算行数,其它都是原样返回\n let lineClampCount = data.lineClampCount || 0;\n // 4种布局,默认block,inlineBlock基本可以复用inline逻辑,除了尺寸\n if(display === 'flex') {\n data.lineClampCount = 0;\n this.__layoutFlex(data, isAbs, isColumn, isRow);\n }\n else if(display === 'inlineBlock') {\n data.lineClampCount = 0;\n this.__layoutInline(data, isAbs, isColumn, isRow);\n }\n else if(display === 'inline') {\n lineClampCount = this.__layoutInline(data, isAbs, isColumn, isRow, true);\n }\n else {\n data.lineClampCount = 0;\n this.__layoutBlock(data, isAbs, isColumn, isRow);\n }\n // 非虚拟布局才执行,防止重复\n if(!isAbs && !isColumn && !isRow) {\n // 计算结果存入computedStyle和6个坐标,inline在其inlineSize特殊处理\n let x = this.__x;\n let y = this.__y;\n if(!this.__isInline) {\n x = this.__x1 = x + __computedStyle[MARGIN_LEFT];\n x = this.__x2 = x + __computedStyle[BORDER_LEFT_WIDTH];\n x = this.__x3 = x + __computedStyle[PADDING_LEFT];\n x = this.__x4 = x + this.__width;\n x = this.__x5 = x + __computedStyle[PADDING_RIGHT];\n this.__x6 = x + __computedStyle[BORDER_RIGHT_WIDTH];\n y = this.__y1 = y + __computedStyle[MARGIN_TOP];\n y = this.__y2 = y + __computedStyle[BORDER_TOP_WIDTH];\n y = this.__y3 = y + __computedStyle[PADDING_TOP];\n y = this.__y4 = y + this.__height;\n y = this.__y5 = y + __computedStyle[PADDING_BOTTOM];\n this.__y6 = y + __computedStyle[BORDER_BOTTOM_WIDTH];\n }\n // relative渲染时做偏移,百分比基于父元素,若父元素没有定高则为0\n if(position === 'relative') {\n let {[TOP]: top, [RIGHT]: right, [BOTTOM]: bottom, [LEFT]: left} = __currentStyle;\n let {parent} = this;\n if(top.u !== AUTO) {\n let n = calRelative(__currentStyle, TOP, top, parent);\n if(n) {\n this.__offsetY(n, true, null);\n if(this.__isInline) {\n let list = this.__contentBoxList;\n if(Array.isArray(list)) {\n let last;\n list.forEach(item => {\n let p = item.__parentLineBox;\n if(p && p !== last) {\n p.__oy += n;\n }\n last = p;\n });\n }\n }\n }\n __computedStyle[TOP] = n;\n __computedStyle[BOTTOM] = 'auto';\n }\n else if(bottom.u !== AUTO) {\n let n = calRelative(__currentStyle, BOTTOM, bottom, parent);\n if(n) {\n this.__offsetY(-n, true, null);\n if(this.__isInline) {\n let list = this.__contentBoxList;\n if(Array.isArray(list)) {\n let last;\n list.forEach(item => {\n let p = item.__parentLineBox;\n if(p && p !== last) {\n p.__oy -= n;\n }\n last = p;\n });\n }\n }\n }\n __computedStyle[BOTTOM] = n;\n __computedStyle[TOP] = 'auto';\n }\n else {\n __computedStyle[TOP] = __computedStyle[BOTTOM] = 'auto';\n }\n if(left.u !== AUTO) {\n let n = calRelative(__currentStyle, LEFT, left, parent, true);\n if(n) {\n this.__offsetX(n, true, null);\n }\n __computedStyle[LEFT] = n;\n __computedStyle[RIGHT] = 'auto';\n }\n else if (right.u !== AUTO) {\n let n = calRelative(__currentStyle, RIGHT, right, parent, true);\n if(n) {\n this.__offsetX(-n, true, null);\n }\n __computedStyle[RIGHT] = n;\n __computedStyle[LEFT] = 'auto';\n }\n else {\n __computedStyle[LEFT] = __computedStyle[RIGHT] = 'auto';\n }\n }\n else if (position !== 'absolute') {\n __computedStyle[TOP] = __computedStyle[BOTTOM] = __computedStyle[LEFT] = __computedStyle[RIGHT] = 'auto';\n }\n __computedStyle[WIDTH] = this.__width;\n __computedStyle[HEIGHT] = this.__height;\n // abs为parse的根节点时特殊自己执行,前提是真布局\n if(position !== 'absolute') {\n this.__execAr();\n }\n this.__hasComputeReflow = false;\n }\n return lineClampCount;\n }\n\n __layoutStyle() {\n let currentStyle = this.__currentStyle;\n let computedStyle = this.__computedStyle;\n let cacheStyle = this.__cacheStyle;\n this.__calStyle(level.REFLOW, currentStyle, computedStyle, cacheStyle);\n this.__calPerspective(currentStyle, computedStyle, cacheStyle);\n }\n\n __execAr() {\n // 动态json引用时动画暂存,第一次布局时处理这些动画到root的animateController上\n let ar = this.__animateRecords;\n if(ar) {\n this.__animateRecords = null;\n // parse没有dom时,animate的target引用都是json,vd后生成需重新赋值\n ar.list.forEach(item => {\n if(item.target.vd instanceof Xom) {\n item.target = item.target.vd;\n }\n });\n let ac = ar.controller || this.root.animateController;\n // 不自动播放进入记录列表,初始化并等待手动调用\n if(ar.options && ar.options.autoPlay === false) {\n ac.__records2 = ac.__records2.concat(ar.list);\n ac.init(ac.__records2, ac.list2);\n }\n else {\n ac.__records = ac.__records.concat(ar.list);\n ac.__playAuto();\n }\n }\n }\n\n __layoutNone() {\n this.__computeReflow();\n let { __computedStyle } = this;\n __computedStyle[DISPLAY] = 'none';\n this.__reset0();\n this.__hasComputeReflow = false;\n }\n\n __reset0() {\n let { __computedStyle } = this;\n __computedStyle[MARGIN_TOP]\n = __computedStyle[MARGIN_RIGHT]\n = __computedStyle[MARGIN_BOTTOM]\n = __computedStyle[MARGIN_LEFT]\n = __computedStyle[BORDER_TOP_WIDTH]\n = __computedStyle[BORDER_RIGHT_WIDTH]\n = __computedStyle[BORDER_BOTTOM_WIDTH]\n = __computedStyle[BORDER_LEFT_WIDTH]\n = __computedStyle[PADDING_TOP]\n = __computedStyle[PADDING_RIGHT]\n = __computedStyle[PADDING_BOTTOM]\n = __computedStyle[PADDING_LEFT]\n = __computedStyle[WIDTH]\n = __computedStyle[HEIGHT]\n = this.__width\n = this.__height\n = this.__clientWidth\n = this.__clientHeight\n = this.__offsetWidth\n = this.__offsetHeight\n = this.__outerWidth\n = this.__outerHeight\n = 0;\n }\n\n // 预先计算是否是固定宽高,布局点位和尺寸考虑margin/border/padding\n __preLayout(data, isInline) {\n let { x, y, w, h, w2, h2, w3, h3, lx, ly, lineBoxManager, endSpace = 0, isUpright: isParentVertical, container } = data;\n this.__x = x;\n this.__y = y;\n let { currentStyle, computedStyle } = this;\n let {\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n let position = computedStyle[POSITION];\n let {\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [PADDING_LEFT]: paddingLeft,\n [WRITING_MODE]: writingMode,\n } = computedStyle;\n let isUpright = writingMode.indexOf('vertical') === 0;\n // 除了auto外都是固定宽高度\n let fixedWidth;\n let fixedHeight;\n // 绝对定位是left+right这种其实等于定义了width,但不能修改原始style,存入特殊变量标识\n if(w2 !== undefined) {\n fixedWidth = true;\n w = w2;\n }\n // flex时也会用到,子级得出目标主尺寸后按这个来\n else if(w3 !== undefined) {\n fixedWidth = true;\n w = w3;\n }\n else if(width.u !== AUTO && !isInline) {\n fixedWidth = true;\n // abs的百分比尺寸相对于container\n if(position === 'absolute' && width.u === PERCENT) {\n w = this.__calSize(width, container.__clientWidth, true);\n }\n else {\n w = this.__calSize(width, w, true);\n }\n }\n if(h2 !== undefined) {\n fixedHeight = true;\n h = h2;\n }\n else if(h3 !== undefined) {\n fixedHeight = true;\n h = h3;\n }\n // height的百分比需要parent有值不能auto,或者parent的flex定高且侧轴stretch时;abs的百分比相对于container\n else if(height.u !== AUTO && !isInline) {\n if(position === 'absolute' && height.u === PERCENT) {\n h = this.__calSize(height, container.__clientHeight, true);\n }\n else {\n let p = this.__domParent;\n if(height.u === PERCENT) {\n // 一般都是0,除了定高,或者flex的stretch\n if(p.height) {\n fixedHeight = true;\n h = this.__calSize(height, p.height || 0, true);\n }\n }\n else {\n fixedHeight = true;\n h = this.__calSize(height, h, true);\n }\n }\n }\n // margin/border/padding影响x和y和尺寸,注意inline的y不受mpb影响(垂直模式则是x)\n if(!isInline) {\n x += borderLeftWidth + marginLeft + paddingLeft;\n y += borderTopWidth + marginTop + paddingTop;\n }\n else {\n if(isUpright) {\n y += borderTopWidth + marginTop + paddingTop;\n }\n else {\n x += borderLeftWidth + marginLeft + paddingLeft;\n }\n }\n data.x = x;\n data.y = y;\n // inline的w/h很特殊,需不考虑inline自身水平的mpb以便换行,因为mpb只在首尾行生效,所以首尾需特殊处理中间忽略\n // 当嵌套inline时更加复杂,假如inline有尾部mpb,最后一行需考虑,如果此inline是父的最后一个且父有mpb需叠加\n let selfEndSpace = 0;\n if(isInline) {\n if(isUpright) {\n selfEndSpace = paddingBottom + borderBottomWidth + marginBottom;\n }\n else {\n selfEndSpace = paddingRight + borderRightWidth + marginRight;\n }\n }\n // 传入w3/h3时,flex的item已知目标主尺寸,需减去mbp,其一定是block,和inline互斥\n if(!isInline) {\n if(width.u === AUTO || w3 !== undefined) {\n w -= borderLeftWidth + borderRightWidth + marginLeft + marginRight + paddingLeft + paddingRight;\n }\n if(height.u === AUTO || h3 !== undefined) {\n h -= borderTopWidth + borderBottomWidth + marginTop + marginBottom + paddingTop + paddingBottom;\n }\n }\n return {\n fixedWidth,\n fixedHeight,\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n endSpace,\n selfEndSpace,\n isParentVertical,\n isUpright,\n };\n }\n\n // 处理margin:xx auto居中对齐或右对齐\n __marginAuto(style, data, isUpright) {\n let {\n [POSITION]: position,\n [DISPLAY]: display,\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [WIDTH]: width,\n [HEIGHT]: height,\n } = style;\n if(position !== 'absolute' && (display === 'block' || display === 'flex')) {\n if(isUpright) {\n if((height.u !== AUTO || this.isReplaced) && marginTop.u === AUTO && marginBottom.u === AUTO) {\n let oh = this.outerHeight;\n if(oh < data.h) {\n this.__offsetY((data.h - oh) * 0.5, true, null);\n }\n }\n }\n else {\n if((width.u !== AUTO || this.isReplaced) && marginLeft.u === AUTO && marginRight.u === AUTO) {\n let ow = this.outerWidth;\n if(ow < data.w) {\n this.__offsetX((data.w - ow) * 0.5, true, null);\n }\n }\n }\n }\n }\n\n __calMatrix(lv, __currentStyle, __computedStyle, __cacheStyle, optimize) {\n let {\n __x1,\n __y1,\n __offsetWidth,\n __offsetHeight,\n } = this;\n if(this.__isInline) {\n __computedStyle[TRANSFORM_ORIGIN] = [__x1, __y1];\n return __cacheStyle[MATRIX] = this.__matrix = mx.identity();\n }\n let matrixCache = __cacheStyle[MATRIX];\n // 优化计算scale不能为0,无法计算倍数差,rotateZ优化不能包含rotateX/rotateY/skew\n if(!isNil(optimize)) {}\n else if(matrixCache && lv < REFLOW && !(lv & TF)) {\n if((lv & SX) && !__computedStyle[SCALE_X]\n || (lv & SY) && !__computedStyle[SCALE_Y]\n || (lv & SZ) && !__computedStyle[SCALE_Z]\n || (lv & RZ) && (__computedStyle[ROTATE_X] || __computedStyle[ROTATE_Y]\n || __computedStyle[SKEW_X] || __computedStyle[SKEW_Y])) {\n }\n else {\n optimize = true;\n }\n }\n // translate/scale变化特殊优化,d/h/l不能有值,否则不能这样直接简化运算,因为这里不包含perspective,所以一定没有\n if(optimize && matrixCache) {\n let transform = __computedStyle[TRANSFORM];\n if(lv & TX) {\n let v = __currentStyle[TRANSLATE_X];\n if(!v) {\n v = 0;\n }\n else if(v.u === PX) {\n v = v.v;\n }\n else {\n v = this.__calSize(v, this.__offsetWidth, true);\n }\n let x = v - __computedStyle[TRANSLATE_X];\n __computedStyle[TRANSLATE_X] = v;\n transform[12] += x;\n matrixCache[12] += x;\n }\n if(lv & TY) {\n let v = __currentStyle[TRANSLATE_Y];\n if(!v) {\n v = 0;\n }\n else if(v.u === PX) {\n v = v.v;\n }\n else {\n v = this.__calSize(v, this.__offsetHeight, true);\n }\n let y = v - __computedStyle[TRANSLATE_Y];\n __computedStyle[TRANSLATE_Y] = v;\n transform[13] += y;\n matrixCache[13] += y;\n }\n if(lv & TZ) {\n let v = __currentStyle[TRANSLATE_Z];\n if(!v) {\n v = 0;\n }\n else if(v.u === PX) {\n v = v.v;\n }\n else {\n v = this.__calSize(v, this.__offsetWidth, true);\n }\n let z = v - __computedStyle[TRANSLATE_Z];\n __computedStyle[TRANSLATE_Z] = v;\n transform[14] += z;\n matrixCache[14] += z;\n }\n if(lv & RZ) {\n let v = __currentStyle[ROTATE_Z].v;\n __computedStyle[ROTATE_Z] = v;\n v = d2r(v);\n let sin = Math.sin(v), cos = Math.cos(v);\n let x = __computedStyle[SCALE_X], y = __computedStyle[SCALE_Y];\n let cx = matrixCache[0] = transform[0] = cos * x;\n let sx = matrixCache[1] = transform[1] = sin * x;\n let sy = matrixCache[4] = transform[4] = -sin * y;\n let cy = matrixCache[5] = transform[5] = cos * y;\n let t = __computedStyle[TRANSFORM_ORIGIN], ox = t[0], oy = t[1];\n ox += __x1;\n oy += __y1;\n matrixCache[12] = transform[12] + ox - cx * ox - oy * sy;\n matrixCache[13] = transform[13] + oy - sx * ox - oy * cy;\n }\n if(lv & SCALE) {\n if(lv & SX) {\n if(!__computedStyle[SCALE_X]) {\n return this.__calMatrix(REFLOW, __currentStyle, __computedStyle, __cacheStyle, false);\n }\n let v = __currentStyle[SCALE_X].v;\n let x = v / __computedStyle[SCALE_X];\n __computedStyle[SCALE_X] = v;\n transform[0] *= x;\n transform[1] *= x;\n transform[2] *= x;\n matrixCache[0] *= x;\n matrixCache[1] *= x;\n matrixCache[2] *= x;\n }\n if(lv & SY) {\n if(!__computedStyle[SCALE_Y]) {\n return this.__calMatrix(lv, __currentStyle, __computedStyle, __cacheStyle, false);\n }\n let v = __currentStyle[SCALE_Y].v;\n let y = v / __computedStyle[SCALE_Y];\n __computedStyle[SCALE_Y] = v;\n transform[4] *= y;\n transform[5] *= y;\n transform[6] *= y;\n matrixCache[4] *= y;\n matrixCache[5] *= y;\n matrixCache[6] *= y;\n }\n if(lv & SZ) {\n if(!__computedStyle[SCALE_Z]) {\n return this.__calMatrix(lv, __currentStyle, __computedStyle, __cacheStyle, false);\n }\n let v = __currentStyle[SCALE_Z].v;\n let z = v / __computedStyle[SCALE_Z];\n __computedStyle[SCALE_Z] = v;\n transform[8] *= z;\n transform[9] *= z;\n transform[10] *= z;\n matrixCache[8] *= z;\n matrixCache[9] *= z;\n matrixCache[10] *= z;\n }\n let t = __computedStyle[TRANSFORM_ORIGIN], ox = t[0], oy = t[1];\n ox += __x1;\n oy += __y1;\n matrixCache[12] = transform[12] + ox - transform[0] * ox - transform[4] * oy;\n matrixCache[13] = transform[13] + oy - transform[1] * ox - transform[5] * oy;\n matrixCache[14] = transform[14] - transform[2] * ox - transform[6] * oy;\n }\n }\n // 先根据cache计算需要重新计算的computedStyle\n else {\n if(__cacheStyle[TRANSFORM_ORIGIN] === undefined) {\n __cacheStyle[TRANSFORM_ORIGIN] = true;\n matrixCache = null;\n __computedStyle[TRANSFORM_ORIGIN] = __currentStyle[TRANSFORM_ORIGIN].map((item, i) => {\n return this.__calSize(item, i ? __offsetHeight : __offsetWidth, true);\n });\n }\n if(__cacheStyle[TRANSFORM] === undefined\n || __cacheStyle[TRANSLATE_X] === undefined\n || __cacheStyle[TRANSLATE_Y] === undefined\n || __cacheStyle[TRANSLATE_Z] === undefined\n || __cacheStyle[ROTATE_X] === undefined\n || __cacheStyle[ROTATE_Y] === undefined\n || __cacheStyle[ROTATE_Z] === undefined\n || __cacheStyle[ROTATE_3D] === undefined\n || __cacheStyle[SCALE_X] === undefined\n || __cacheStyle[SCALE_Y] === undefined\n || __cacheStyle[SCALE_Z] === undefined\n || __cacheStyle[SKEW_X] === undefined\n || __cacheStyle[SKEW_Y] === undefined) {\n __cacheStyle[TRANSFORM]\n = __cacheStyle[TRANSLATE_X]\n = __cacheStyle[TRANSLATE_Y]\n = __cacheStyle[TRANSLATE_Z]\n = __cacheStyle[ROTATE_X]\n = __cacheStyle[ROTATE_Y]\n = __cacheStyle[ROTATE_Z]\n = __cacheStyle[SCALE_X]\n = __cacheStyle[SCALE_Y]\n = __cacheStyle[SCALE_Z]\n = __cacheStyle[SKEW_X]\n = __cacheStyle[SKEW_Y]\n = true;\n matrixCache = null;\n let matrix;\n // transform相对于自身\n if(__currentStyle[TRANSFORM] && __currentStyle[TRANSFORM].length) {\n matrix = tf.calMatrix(__currentStyle[TRANSFORM], __offsetWidth, __offsetHeight, this.__root);\n }\n // 没有transform则看是否有扩展的css独立变换属性\n else {\n __computedStyle[TRANSLATE_X] = 0;\n let v = __currentStyle[TRANSLATE_X];\n if(v) {\n v = __computedStyle[TRANSLATE_X] = this.__calSize(v, this.__offsetWidth, true);\n if(v) {\n matrix = matrix || mx.identity();\n matrix[12] = v;\n }\n }\n __computedStyle[TRANSLATE_Y] = 0;\n v = __currentStyle[TRANSLATE_Y];\n if(v) {\n v = __computedStyle[TRANSLATE_Y] = this.__calSize(v, this.__offsetHeight, true);\n if(v) {\n matrix = matrix || mx.identity();\n matrix[13] = v;\n }\n }\n __computedStyle[TRANSLATE_Z] = 0;\n v = __currentStyle[TRANSLATE_Z];\n if(v) {\n v = __computedStyle[TRANSLATE_Z] = this.__calSize(v, this.__offsetWidth, true);\n if(v) {\n matrix = matrix || mx.identity();\n matrix[14] = v;\n }\n }\n __computedStyle[ROTATE_X] = 0;\n v = __currentStyle[ROTATE_X];\n if(v) {\n v = __computedStyle[ROTATE_X] = v.v;\n if(v) {\n matrix = matrix || mx.identity();\n if(matrix) {\n matrix = multiplyRotateX(matrix, d2r(v));\n }\n else {\n matrix = calRotateX(mx.identity(), v);\n }\n }\n }\n __computedStyle[ROTATE_Y] = 0;\n v = __currentStyle[ROTATE_Y];\n if(v) {\n v = __computedStyle[ROTATE_Y] = v.v;\n if(v) {\n if(matrix) {\n matrix = multiplyRotateY(matrix, d2r(v));\n }\n else {\n matrix = calRotateY(mx.identity(), v);\n }\n }\n }\n __computedStyle[ROTATE_Z] = 0;\n v = __currentStyle[ROTATE_Z];\n if(v) {\n v = __computedStyle[ROTATE_Z] = v.v;\n if(v) {\n if(matrix) {\n matrix = multiplyRotateZ(matrix, d2r(v));\n }\n else {\n matrix = calRotateZ(mx.identity(), v);\n }\n }\n }\n __computedStyle[ROTATE_3D] = [0, 0, 0, 0];\n v = __currentStyle[ROTATE_3D];\n if(v) {\n v = __computedStyle[ROTATE_3D] = [v[0], v[1], v[2], v[3].v];\n if((v[0] || v[1] || v[2]) && v[3]) {\n if(matrix) {\n matrix = multiply(matrix, calRotate3d(mx.identity(), v));\n }\n else {\n matrix = calRotate3d(mx.identity(), v);\n }\n }\n }\n __computedStyle[SKEW_X] = 0;\n v = __currentStyle[SKEW_X];\n if(v) {\n v = __computedStyle[SKEW_X] = v.v;\n if(v) {\n if(matrix) {\n matrix = multiplySkewX(matrix, d2r(v));\n }\n else {\n matrix = mx.identity();\n matrix[4] = Math.tan(d2r(v));\n }\n }\n }\n __computedStyle[SKEW_Y] = 0;\n v = __currentStyle[SKEW_Y];\n if(v) {\n v = __computedStyle[SKEW_Y] = v.v;\n if(v) {\n if(matrix) {\n matrix = multiplySkewY(matrix, d2r(v));\n }\n else {\n matrix = mx.identity();\n matrix[1] = Math.tan(d2r(v));\n }\n }\n }\n __computedStyle[SCALE_X] = 1;\n v = __currentStyle[SCALE_X];\n if(v) {\n v = __computedStyle[SCALE_X] = v.v;\n if(v !== 1) {\n if(matrix) {\n matrix = multiplyScaleX(matrix, v);\n }\n else {\n matrix = mx.identity();\n matrix[0] = v;\n }\n }\n }\n __computedStyle[SCALE_Y] = 1;\n v = __currentStyle[SCALE_Y];\n if(v) {\n v = __computedStyle[SCALE_Y] = v.v;\n if(v !== 1) {\n if(matrix) {\n matrix = multiplyScaleY(matrix, v);\n }\n else {\n matrix = mx.identity();\n matrix[5] = v;\n }\n }\n }\n __computedStyle[SCALE_Z] = 1;\n v = __currentStyle[SCALE_Z];\n if(v) {\n v = __computedStyle[SCALE_Z] = v.v;\n if(v !== 1) {\n if(matrix) {\n matrix = multiplyScaleZ(matrix, v);\n }\n else {\n matrix = mx.identity();\n matrix[10] = v;\n }\n }\n }\n }\n __computedStyle[TRANSFORM] = matrix || mx.identity();\n }\n if(!matrixCache) {\n let m = __computedStyle[TRANSFORM];\n let tfo = __computedStyle[TRANSFORM_ORIGIN];\n matrixCache = __cacheStyle[MATRIX] = tf.calMatrixByOrigin(m, tfo[0] + __x1, tfo[1] + __y1);\n }\n }\n return this.__matrix = matrixCache;\n }\n\n /**\n * 将currentStyle计算为computedStyle,同时存入cacheStyle可缓存的结果防止无变更重复计算,返回背景渲染范围\n */\n __calStyle(lv, __currentStyle, __computedStyle, __cacheStyle) {\n let {\n __x1,\n __x2,\n __x3,\n __x4,\n __x5,\n __x6,\n __y1,\n __y2,\n __y3,\n __y4,\n __y5,\n __y6,\n } = this;\n this.__bbox = null;\n let bx1 = __x1, by1 = __y1, bx2 = __x6, by2 = __y6;\n let backgroundClip = __computedStyle[BACKGROUND_CLIP] = __currentStyle[BACKGROUND_CLIP];\n // 默认border-box\n if(backgroundClip === 'paddingBox') {\n bx1 = __x2;\n by1 = __y2;\n bx2 = __x5;\n by2 = __y5;\n }\n else if(backgroundClip === 'contentBox') {\n bx1 = __x3;\n by1 = __y3;\n bx2 = __x4;\n by2 = __y4;\n }\n let isInline = this.__isInline;\n if(isInline && !this.__contentBoxList.length) {\n isInline = false;\n }\n // 这些直接赋值的不需要再算缓存\n [\n OPACITY,\n Z_INDEX,\n BORDER_TOP_STYLE,\n BORDER_RIGHT_STYLE,\n BORDER_BOTTOM_STYLE,\n BORDER_LEFT_STYLE,\n BACKGROUND_REPEAT,\n OVERFLOW,\n MIX_BLEND_MODE,\n TEXT_OVERFLOW,\n BACKGROUND_CLIP,\n TRANSFORM_STYLE,\n BACKFACE_VISIBILITY,\n ].forEach(k => {\n __computedStyle[k] = __currentStyle[k];\n });\n if(isNil(__cacheStyle[FILTER])) {\n this.__calFilter(__currentStyle, __computedStyle, __cacheStyle);\n }\n // 特殊的判断,MATRIX不存在于样式key中,所有的transform共用一个\n if(isNil(__cacheStyle[MATRIX]) || (lv & TRANSFORM_ALL)) {\n this.__calMatrix(lv, __currentStyle, __computedStyle, __cacheStyle, false);\n }\n if(isNil(__cacheStyle[BACKGROUND_POSITION_X])) {\n __cacheStyle[BACKGROUND_POSITION_X] = true;\n let {\n [BACKGROUND_POSITION_X]: bgX,\n } = __currentStyle;\n __computedStyle[BACKGROUND_POSITION_X] = (bgX || []).map(item => {\n if(item.u === PERCENT) {\n return item.v + '%';\n }\n return this.__calSize(item, bx2 - bx1, true);\n });\n }\n if(isNil(__cacheStyle[BACKGROUND_POSITION_Y])) {\n __cacheStyle[BACKGROUND_POSITION_Y] = true;\n let {\n [BACKGROUND_POSITION_Y]: bgY,\n } = __currentStyle;\n __computedStyle[BACKGROUND_POSITION_Y] = (bgY || []).map(item => {\n if(item.u === PERCENT) {\n return item.v + '%';\n }\n return this.__calSize(item, by2 - by1, true);\n });\n }\n if(isNil(__cacheStyle[BACKGROUND_SIZE])) {\n __cacheStyle[BACKGROUND_SIZE] = true;\n __computedStyle[BACKGROUND_SIZE] = (__currentStyle[BACKGROUND_SIZE] || []).map(item => {\n if(Array.isArray(item)) {\n // 每项是x/y2个\n return item.map((item2, i) => {\n if(item2.u === AUTO) {\n return -1;\n }\n else if(item2.u === STRING) {\n return item2.v === 'contain' ? -2 : -3;\n }\n return this.__calSize(item2, i ? (by2 - by1) : (bx2 - bx1), true);\n });\n }\n });\n }\n if(isNil(__cacheStyle[BACKGROUND_IMAGE])) {\n let bgI = __currentStyle[BACKGROUND_IMAGE];\n __computedStyle[BACKGROUND_IMAGE] = bgI.map(item => {\n if(item) {\n return item.v;\n }\n return null;\n });\n __cacheStyle[BACKGROUND_IMAGE] = bgI.map((bgi, i) => {\n if(!bgi) {\n return null;\n }\n // 防止隐藏不加载背景图\n if(bgi.u === STRING) {\n let loadBgi = this.__loadBgi[i] = this.__loadBgi[i] || {};\n let cache = inject.IMG[bgi.v];\n if(cache && cache.state === inject.LOADED) {\n loadBgi.url = bgi.v;\n loadBgi.source = cache.source;\n loadBgi.width = cache.width;\n loadBgi.height = cache.height;\n }\n else if(loadBgi.url !== bgi.v) {\n // 可能改变导致多次加载,每次清空,成功后还要比对url是否相同\n loadBgi.url = bgi.v;\n loadBgi.source = null;\n let node = this;\n let root = this.__root;\n let ctx = this.ctx;\n inject.measureImg(bgi.v, data => {\n // 还需判断url,防止重复加载时老的替换新的,失败不绘制bgi\n if(data.success && data.url === loadBgi.url && !this.isDestroyed) {\n loadBgi.source = data.source;\n loadBgi.width = data.width;\n loadBgi.height = data.height;\n __cacheStyle[BACKGROUND_IMAGE] = undefined;\n root.__addUpdate(node, null, REPAINT, null, null, null, null);\n }\n });\n }\n return true;\n }\n else if(!isInline && bgi.v && bgi.u === GRADIENT) {\n // gradient在渲染时才生成\n return true;\n }\n });\n }\n if(isNil(__cacheStyle[BOX_SHADOW])) {\n __cacheStyle[BOX_SHADOW] = true;\n __computedStyle[BOX_SHADOW] = (__currentStyle[BOX_SHADOW] || []).map(item => {\n return item.map((item2, i) => {\n if(i > 3) {\n return item2;\n }\n return this.__calSize(item2, i === 0 ? (bx2 - bx1) : (by2 - by1), true);\n });\n });\n }\n [\n BACKGROUND_COLOR,\n BORDER_TOP_COLOR,\n BORDER_RIGHT_COLOR,\n BORDER_BOTTOM_COLOR,\n BORDER_LEFT_COLOR,\n ].forEach(k => {\n if(isNil(__cacheStyle[k])) {\n __cacheStyle[k] = int2rgba(__computedStyle[k] = __currentStyle[k].v);\n }\n });\n // 圆角边计算\n if(isNil(__cacheStyle[BORDER_TOP_LEFT_RADIUS])\n || isNil(__cacheStyle[BORDER_TOP_RIGHT_RADIUS])\n || isNil(__cacheStyle[BORDER_BOTTOM_RIGHT_RADIUS])\n || isNil(__cacheStyle[BORDER_BOTTOM_LEFT_RADIUS])) {\n __cacheStyle[BORDER_TOP_LEFT_RADIUS]\n = __cacheStyle[BORDER_TOP_RIGHT_RADIUS]\n = __cacheStyle[BORDER_BOTTOM_RIGHT_RADIUS]\n = __cacheStyle[BORDER_BOTTOM_LEFT_RADIUS]\n = true;\n // 非替代的inline计算看contentBox首尾\n if(isInline) {\n border.calBorderRadiusInline(this.__contentBoxList, __currentStyle, __computedStyle, this.__root);\n }\n // 普通block整体计算\n else {\n border.calBorderRadius(this.__offsetWidth, this.__offsetHeight, __currentStyle, __computedStyle, this.__root);\n }\n }\n // width/style/radius影响border,color不影响渲染缓存\n let btlr = __computedStyle[BORDER_TOP_LEFT_RADIUS];\n let btrr = __computedStyle[BORDER_TOP_RIGHT_RADIUS];\n let bbrr = __computedStyle[BORDER_BOTTOM_RIGHT_RADIUS];\n let bblr = __computedStyle[BORDER_BOTTOM_LEFT_RADIUS];\n let borderTopWidth = __computedStyle[BORDER_TOP_WIDTH];\n let borderRightWidth = __computedStyle[BORDER_RIGHT_WIDTH];\n let borderBottomWidth = __computedStyle[BORDER_BOTTOM_WIDTH];\n let borderLeftWidth = __computedStyle[BORDER_LEFT_WIDTH];\n ['Top', 'Right', 'Bottom', 'Left'].forEach(k => {\n k = 'border' + k;\n let k2 = STYLE_KEY[style2Upper(k)];\n let kw = STYLE_KEY[style2Upper(k + 'Width')];\n let ks = STYLE_KEY[style2Upper(k + 'Style')];\n // width/style变更影响border重新计算\n if(isNil(__cacheStyle[kw])) {\n __cacheStyle[kw] = true;\n __cacheStyle[k2] = undefined;\n }\n if(isNil(__cacheStyle[ks])) {\n __cacheStyle[ks] = true;\n __cacheStyle[k2] = undefined;\n }\n if(isNil(__cacheStyle[k2])) {\n if(k2 === BORDER_TOP) {\n if(borderTopWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderTopWidth / borderLeftWidth);\n let deg2 = Math.atan(borderTopWidth / borderRightWidth);\n __cacheStyle[k2] = border.calPoints(borderTopWidth, __computedStyle[ks], deg1, deg2,\n __x1, __x2, __x5, __x6, __y1, __y2, __y5, __y6, 0, btlr, btrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_RIGHT) {\n if(borderRightWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderRightWidth / borderTopWidth);\n let deg2 = Math.atan(borderRightWidth / borderBottomWidth);\n __cacheStyle[k2] = border.calPoints(borderRightWidth, __computedStyle[ks], deg1, deg2,\n __x1, __x2, __x5, __x6, __y1, __y2, __y5, __y6, 1, btrr, bbrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_BOTTOM) {\n if(borderBottomWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderBottomWidth / borderLeftWidth);\n let deg2 = Math.atan(borderBottomWidth / borderRightWidth);\n __cacheStyle[k2] = border.calPoints(borderBottomWidth, __computedStyle[ks], deg1, deg2,\n __x1, __x2, __x5, __x6, __y1, __y2, __y5, __y6, 2, bblr, bbrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_LEFT) {\n if(borderLeftWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderLeftWidth / borderTopWidth);\n let deg2 = Math.atan(borderLeftWidth / borderBottomWidth);\n __cacheStyle[k2] = border.calPoints(borderLeftWidth, __computedStyle[ks], deg1, deg2,\n __x1, __x2, __x5, __x6, __y1, __y2, __y5, __y6, 3, btlr, bblr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n }\n });\n // 强制计算继承性的\n let parent = this.__domParent;\n let parentComputedStyle = parent && parent.__computedStyle;\n if(__currentStyle[FONT_STYLE].u === INHERIT) {\n __computedStyle[FONT_STYLE] = parent ? parentComputedStyle[FONT_STYLE] : 'normal';\n }\n else if(isNil(__cacheStyle[FONT_STYLE])) {\n __computedStyle[FONT_STYLE] = __currentStyle[FONT_STYLE].v;\n }\n __cacheStyle[FONT_STYLE] = __computedStyle[FONT_STYLE];\n let color = __currentStyle[COLOR];\n if(color.u === INHERIT) {\n let v = __computedStyle[COLOR] = parent ? parentComputedStyle[COLOR] : rgba2int(reset.INHERIT.color);\n if(v.k) {\n __cacheStyle[COLOR] = v;\n }\n else {\n __cacheStyle[COLOR] = int2rgba(__computedStyle[COLOR]);\n }\n }\n else if(isNil(__cacheStyle[COLOR])) {\n if(color.u === GRADIENT) {\n __cacheStyle[COLOR] = __computedStyle[COLOR] = color.v;\n }\n else {\n __cacheStyle[COLOR] = int2rgba(__computedStyle[COLOR] = rgba2int(color.v));\n }\n }\n let textStrokeColor = __currentStyle[TEXT_STROKE_COLOR];\n if(textStrokeColor.u === INHERIT) {\n let v = __computedStyle[TEXT_STROKE_COLOR] = parent ? parentComputedStyle[TEXT_STROKE_COLOR] : rgba2int(reset.INHERIT.textStrokeColor);\n if(v.k) {\n __cacheStyle[TEXT_STROKE_COLOR] = v;\n }\n else {\n __cacheStyle[TEXT_STROKE_COLOR] = int2rgba(__computedStyle[TEXT_STROKE_COLOR]);\n }\n }\n else if(isNil(__cacheStyle[TEXT_STROKE_COLOR])) {\n if(textStrokeColor.u === GRADIENT) {\n __cacheStyle[TEXT_STROKE_COLOR] = __computedStyle[TEXT_STROKE_COLOR] = textStrokeColor.v;\n }\n else if(textStrokeColor.u === RGBA) {\n __cacheStyle[TEXT_STROKE_COLOR] = int2rgba(__computedStyle[TEXT_STROKE_COLOR] = rgba2int(textStrokeColor.v));\n }\n }\n if(__currentStyle[TEXT_STROKE_WIDTH].u === INHERIT) {\n __computedStyle[TEXT_STROKE_WIDTH] = parent ? parentComputedStyle[TEXT_STROKE_WIDTH] : reset.INHERIT.textStrokeWidth;\n __cacheStyle[TEXT_STROKE_WIDTH] = true;\n }\n else if(isNil(__cacheStyle[TEXT_STROKE_WIDTH])) {\n let v = __currentStyle[TEXT_STROKE_WIDTH];\n if(v.u === REM) {\n v = v.v * this.__root.__computedStyle[FONT_SIZE];\n }\n else if(v.u === VW) {\n v = v.v * this.__root.width * 0.01;\n }\n else if(v.u === VH) {\n v = v.v * this.__root.height * 0.01;\n }\n else if(v.u === VMAX) {\n v = v.v * Math.max(this.__root.width, this.__root.height) * 0.01;\n }\n else if(v.u === VMIN) {\n v = v.v * Math.min(this.__root.width, this.__root.height) * 0.01;\n }\n else {\n v = v.v;\n }\n __computedStyle[TEXT_STROKE_WIDTH] = v;\n __cacheStyle[TEXT_STROKE_WIDTH] = true;\n }\n if(__currentStyle[TEXT_STROKE_OVER].u === INHERIT) {\n __cacheStyle[TEXT_STROKE_OVER] = __computedStyle[TEXT_STROKE_OVER] = parent ? parentComputedStyle[TEXT_STROKE_OVER] : reset.INHERIT.textStrokeOver;\n }\n else {\n __cacheStyle[TEXT_STROKE_OVER] = __computedStyle[TEXT_STROKE_OVER] = __currentStyle[TEXT_STROKE_OVER].v;\n }\n if(__currentStyle[VISIBILITY].u === INHERIT) {\n __computedStyle[VISIBILITY] = parent ? parentComputedStyle[VISIBILITY] : 'visible';\n }\n else if(isNil(__cacheStyle[VISIBILITY])) {\n __computedStyle[VISIBILITY] = __currentStyle[VISIBILITY].v;\n }\n __cacheStyle[VISIBILITY] = __computedStyle[VISIBILITY];\n if(__currentStyle[POINTER_EVENTS].u === INHERIT) {\n __computedStyle[POINTER_EVENTS] = parent ? parentComputedStyle[POINTER_EVENTS] : 'auto';\n }\n else if(isNil(__cacheStyle[POINTER_EVENTS])) {\n __computedStyle[POINTER_EVENTS] = __currentStyle[POINTER_EVENTS].v;\n }\n __cacheStyle[POINTER_EVENTS] = __computedStyle[POINTER_EVENTS];\n // transformStyle需要特殊判断,在一些情况下强制flat,取消规范的opacity<1限制\n if(__computedStyle[TRANSFORM_STYLE] === 'preserve3d') {\n if(__computedStyle[OVERFLOW] === 'hidden'\n || __computedStyle[FILTER].length\n || this.__cacheAsBitmap) {\n __computedStyle[TRANSFORM_STYLE] = 'flat';\n }\n }\n // 影响父级flat的\n if((__computedStyle[MIX_BLEND_MODE] !== 'normal' || this.__mask) && parentComputedStyle) {\n parentComputedStyle[TRANSFORM_STYLE] = 'flat';\n }\n this.__bx1 = bx1;\n this.__bx2 = bx2;\n this.__by1 = by1;\n this.__by2 = by2;\n return [bx1, by1, bx2, by2];\n }\n\n __calPerspective(__currentStyle, __computedStyle, __cacheStyle) {\n this.__perspectiveMatrix = null;\n let rebuild;\n let { __x1, __y1 } = this;\n if(isNil(__cacheStyle[PERSPECTIVE])) {\n __cacheStyle[PERSPECTIVE] = true;\n rebuild = true;\n let v = __currentStyle[PERSPECTIVE];\n __computedStyle[PERSPECTIVE] = this.__calSize(v, this.clientWidth, true);\n }\n if(isNil(__cacheStyle[PERSPECTIVE_ORIGIN])) {\n __cacheStyle[PERSPECTIVE_ORIGIN] = true;\n rebuild = true;\n __computedStyle[PERSPECTIVE_ORIGIN] = __currentStyle[PERSPECTIVE_ORIGIN].map((item, i) => {\n return this.__calSize(item, i ? this.__offsetHeight : this.__offsetWidth, true);\n });\n }\n let ppt = __computedStyle[PERSPECTIVE];\n // perspective为0无效\n if(rebuild && ppt) {\n let po = __computedStyle[PERSPECTIVE_ORIGIN];\n this.__perspectiveMatrix = tf.calPerspectiveMatrix(ppt, po[0] + __x1, po[1] + __y1);\n }\n return this.__perspectiveMatrix;\n }\n\n __calFilter(__currentStyle, __computedStyle, __cacheStyle) {\n __cacheStyle[FILTER] = true;\n this.__filterBbox = null;\n return __computedStyle[FILTER] = (__currentStyle[FILTER] || []).map(item => {\n let { k, v } = item;\n if(k === 'dropShadow') {\n let v2 = v.map((item2, i) => {\n if(i > 3) {\n return item2;\n }\n return this.__calSize(item2, i === 0 ? (this.__bx2 - this.__bx1) : (this.__by2 - this.__by1), true);\n });\n return { k, v: v2 };\n }\n else {\n // 部分%单位的滤镜强制使用数字\n if(v.u === DEG || v.u === NUMBER || v.u === PERCENT) {\n v = v.v;\n }\n else {\n v = this.__calSize(v, this.root.width, true);\n }\n return { k, v };\n }\n });\n }\n\n __calOffscreen(ctx, __computedStyle) {\n let offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow, root = this.__root;\n let { width, height } = root;\n let origin = ctx;\n let {\n [MIX_BLEND_MODE]: mixBlendMode,\n [FILTER]: filter,\n [OVERFLOW]: overflow,\n [DISPLAY]: display,\n } = __computedStyle;\n if(mixBlendMode !== 'normal' && isValidMbm(mixBlendMode)) {\n mixBlendMode = mbmName(mixBlendMode);\n let c = inject.getOffscreenCanvas(width, height, null, 'blend');\n offscreenBlend = {\n ctx,\n target: c,\n mixBlendMode,\n };\n ctx = c.ctx;\n }\n if(this.__hasMask) {\n let c = inject.getOffscreenCanvas(width, height, null, 'mask1');\n offscreenMask = {\n ctx,\n target: c,\n };\n ctx = c.ctx;\n }\n if(filter && filter.length) {\n let c = inject.getOffscreenCanvas(width, height, null, 'filter');\n offscreenFilter = {\n ctx,\n filter,\n target: c,\n };\n ctx = c.ctx;\n }\n if(overflow === 'hidden' && display !== 'inline') {\n let c = inject.getOffscreenCanvas(width, height, null, 'overflow');\n let bx1 = this.__bx1;\n let bx2 = this.__bx2;\n let by1 = this.__by1;\n let by2 = this.__by2;\n let {\n [BORDER_TOP_LEFT_RADIUS]: borderTopLeftRadius,\n [BORDER_TOP_RIGHT_RADIUS]: borderTopRightRadius,\n [BORDER_BOTTOM_RIGHT_RADIUS]: borderBottomRightRadius,\n [BORDER_BOTTOM_LEFT_RADIUS]: borderBottomLeftRadius,\n [BACKGROUND_CLIP]: backgroundClip,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [PADDING_LEFT]: paddingLeft,\n } = __computedStyle;\n let btlr = borderTopLeftRadius.slice(0);\n let btrr = borderTopRightRadius.slice(0);\n let bbrr = borderBottomRightRadius.slice(0);\n let bblr = borderBottomLeftRadius.slice(0);\n if(backgroundClip === 'paddingBox') {\n btlr[0] -= borderLeftWidth;\n btlr[1] -= borderTopWidth;\n btrr[0] -= borderRightWidth;\n btrr[1] -= borderTopWidth;\n bbrr[0] -= borderRightWidth;\n bbrr[1] -= borderBottomWidth;\n bblr[0] -= borderLeftWidth;\n bblr[1] -= borderBottomWidth;\n }\n else if(backgroundClip === 'contentBox') {\n btlr[0] -= borderLeftWidth + paddingLeft;\n btlr[1] -= borderTopWidth + paddingTop;\n btrr[0] -= borderRightWidth + paddingRight;\n btrr[1] -= borderTopWidth + paddingTop;\n bbrr[0] -= borderRightWidth + paddingRight;\n bbrr[1] -= borderBottomWidth + paddingBottom;\n bblr[0] -= borderLeftWidth + paddingLeft;\n bblr[1] -= borderBottomWidth + paddingBottom;\n }\n let borderList = border.calRadius(bx1, by1, bx2 - bx1, by2 - by1, btlr, btrr, bbrr, bblr);\n offscreenOverflow = {\n ctx,\n target: c,\n matrix: this.__matrixEvent,\n x: this.__x1,\n y: this.__y1,\n offsetWidth: this.__offsetWidth,\n offsetHeight: this.__offsetHeight,\n borderList,\n };\n ctx = c.ctx;\n }\n // 无离屏不返回\n if(origin === ctx) {\n return;\n }\n return {\n ctx,\n offscreenBlend,\n offscreenMask,\n offscreenFilter,\n offscreenOverflow,\n };\n }\n\n // 自定义图形可能需要覆盖判断,所以是public方法\n calContent(__currentStyle, __computedStyle) {\n let visibility = __currentStyle[VISIBILITY];\n if(visibility !== 'hidden') {\n let bgI = __currentStyle[BACKGROUND_IMAGE];\n if(Array.isArray(bgI)) {\n for(let i = 0, len = bgI.length; i < len; i++) {\n if(bgI[i]) {\n return this.__hasContent = true;\n }\n }\n }\n if(__currentStyle[BACKGROUND_COLOR].v[3] > 0) {\n let width = __computedStyle[WIDTH], height = __computedStyle[HEIGHT],\n paddingTop = __computedStyle[PADDING_TOP], paddingRight = __computedStyle[PADDING_RIGHT],\n paddingBottom = __computedStyle[PADDING_BOTTOM], paddingLeft = __computedStyle[PADDING_LEFT];\n if(width && height || paddingTop || paddingRight || paddingBottom || paddingLeft) {\n return this.__hasContent = true;\n }\n }\n for(let list = ['Top', 'Right', 'Bottom', 'Left'], i = 0, len = list.length; i < len; i++) {\n let k = list[i];\n if(__computedStyle[STYLE_KEY[style2Upper('border' + k + 'Width')]] > 0\n && __currentStyle[STYLE_KEY[style2Upper('border' + k + 'Color')]].v[3] > 0) {\n return this.__hasContent = true;\n }\n }\n let bs = __currentStyle[BOX_SHADOW];\n if(Array.isArray(bs)) {\n for(let i = 0, len = bs.length; i < len; i++) {\n let item = bs[i];\n if(item && item[4][3] > 0) {\n return this.__hasContent = true;\n }\n }\n }\n }\n return this.__hasContent = false;\n }\n\n /**\n * 渲染基础方法,Dom/Geom公用\n * @param renderMode\n * @see node/mode\n * @param ctx canvas/svg/webgl共用\n * @param dx cache时偏移x\n * @param dy cache时偏移y\n * @return Object\n * x1/x2/x3/x4/x5/x6/y1/y2/y3/y4/y5/y6 坐标\n * break svg判断无变化提前跳出\n */\n render(renderMode, ctx, dx = 0, dy = 0) {\n let {\n __isDestroyed: isDestroyed,\n } = this;\n let cacheStyle = this.__cacheStyle;\n let computedStyle = this.__computedStyle;\n if(isDestroyed) {\n return { isDestroyed, break: true };\n }\n let virtualDom;\n // svg设置vd上的lv属性标明lineHeight的话,另外特殊字体如arial拥有lineGap也会产生间隙,背景色不绘制这个间隙\n * x轴根据contentBox的范围坐标,y则固定和font/lineHeight相关\n * 圆角发生在首尾lineBox处,中间不会有,bgi则产生类似bgc作为mask的效果\n * 另外要注意多个时的顺序,必须依次渲染,后面的bb可能会覆盖前面行的\n */\n if(isRealInline) {\n let contentBoxList = this.contentBoxList;\n let length = contentBoxList.length;\n if(contentBoxList[length - 1] instanceof Ellipsis) {\n length--;\n }\n let hasBgi = backgroundImage.some(item => item);\n if(length) {\n let {\n [FONT_SIZE]: fontSize,\n [FONT_FAMILY]: fontFamily,\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n let iw = 0, ih = 0;\n let offscreen, svgBgSymbol = [];\n // bgi视作inline排满一行绘制,然后按分行拆开给每行\n if(hasBgi) {\n iw = inline.getInlineWidth(this, contentBoxList, isUpright);\n ih = lineHeight;\n // 垂直模式互换,计算时始终按照宽度为主轴计算的\n if(isUpright) {\n [iw, ih] = [ih, iw];\n }\n if(backgroundClip === 'paddingBox' || backgroundClip === 'padding-box') {\n if(isUpright) {\n iw += paddingTop + paddingBottom;\n ih += paddingLeft + paddingRight;\n }\n else {\n iw += paddingLeft + paddingRight;\n ih += paddingTop + paddingBottom;\n }\n }\n else if(backgroundClip !== 'contentBox' && backgroundClip !== 'content-box') {\n if(isUpright) {\n iw += paddingTop + paddingBottom + borderTopWidth + borderBottomWidth;\n ih += paddingLeft + paddingRight + borderLeftWidth + borderRightWidth;\n }\n else {\n iw += paddingLeft + paddingRight + borderLeftWidth + borderRightWidth;\n ih += paddingTop + paddingBottom + borderTopWidth + borderBottomWidth;\n }\n }\n if(renderMode === CANVAS || renderMode === WEBGL) {\n offscreen = inject.getOffscreenCanvas(iw, ih, '__$$INLINE_BGI$$__', null);\n }\n let length = backgroundImage.length;\n backgroundImage.slice(0).reverse().forEach((bgi, i) => {\n if(!bgi) {\n return;\n }\n i = length - 1 - i;\n if(util.isString(bgi)) {\n let loadBgi = this.__loadBgi[i];\n if(loadBgi.url === bgi) {\n let uuid = bg.renderImage(this, renderMode, offscreen && offscreen.ctx || ctx, loadBgi,\n 0, 0, iw, ih, btlr, btrr, bbrr, bblr,\n computedStyle, i, backgroundSize, backgroundRepeat, true, dx, dy);\n if(renderMode === SVG && uuid) {\n svgBgSymbol.push(uuid);\n }\n }\n }\n else if(bgi.k) {\n let gd = this.__gradient(renderMode, ctx, 0, 0, iw, ih, bgi, dx, dy);\n if(gd) {\n if(gd.k === 'conic') {\n gradient.renderConic(this, renderMode, offscreen && offscreen.ctx || ctx, gd.v, 0, 0, iw, lineHeight,\n btlr, btrr, bbrr, bblr, true);\n }\n else {\n let uuid = bg.renderBgc(this, renderMode, offscreen && offscreen.ctx || ctx, gd.v, null,\n 0, 0, iw, ih, btlr, btrr, bbrr, bblr, 'fill', true);\n if(renderMode === SVG && uuid) {\n svgBgSymbol.push(uuid);\n }\n }\n }\n }\n });\n }\n // 获取当前dom的baseline,再减去lineBox的baseline得出差值,这样渲染范围y就是lineBox的y+差值为起始,lineHeight为高\n // lineGap,一般为0,某些字体如arial有,渲染高度需减去它,最终是lineHeight - leading,上下均分\n let leading = fontSize * ((font.info[calFontFamily(fontFamily)] || {}).lgr || 0) * 0.5;\n let baseline = isUpright ? css.getVerticalBaseline(computedStyle) : css.getBaseline(computedStyle);\n // 注意只有1个的时候特殊情况,圆角只在首尾行出现\n let isFirst = true;\n let lastContentBox = contentBoxList[0], lastLineBox = lastContentBox.parentLineBox;\n // bgi需统计宽度累计值,将当前行所处理想单行的x范围位置计算出来,并进行bgi贴图绘制,svg还需统计第几行\n let count = 0;\n for(let i = 0; i < length; i++) {\n let contentBox = contentBoxList[i];\n if(contentBox.parentLineBox !== lastLineBox) {\n // 上一行\n let [ix1, iy1, ix2, iy2, bx1, by1, bx2, by2] = inline.getInlineBox(this, isUpright, contentBoxList,\n lastContentBox, contentBoxList[i - 1], lastLineBox, baseline, lineHeight, leading, isFirst, false,\n backgroundClip, paddingTop, paddingRight, paddingBottom, paddingLeft,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth);\n // 要算上开头空白inline,可能有多个和递归嵌套\n if(isFirst) {\n let n = getFirstEmptyInlineWidth(this);\n ix1 -= n;\n bx1 -= n;\n }\n if(backgroundColor[3] > 0) {\n bg.renderBgc(this, renderMode, ctx, cacheStyle[BACKGROUND_COLOR], null,\n ix1, iy1, ix2 - ix1, iy2 - iy1, btlr, [0, 0], [0, 0], bblr, 'fill', false, dx, dy);\n }\n let w = ix2 - ix1, h = iy2 - iy1; // 世界参考系的宽高,根据writingMode不同取值使用\n // canvas的bg位图裁剪\n if((renderMode === CANVAS || renderMode === WEBGL) && offscreen) {\n if(isUpright) {\n ctx.drawImage(offscreen.canvas, 0, count, iw, h, ix1 + dx, iy1 + dy, iw, h);\n }\n else {\n ctx.drawImage(offscreen.canvas, count, 0, w, ih, ix1 + dx, iy1 + dy, w, ih);\n }\n }\n //svg则特殊判断\n else if(renderMode === SVG && svgBgSymbol.length) {\n svgBgSymbol.forEach(symbol => {\n if(symbol) {\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n tagName: 'path',\n props: [\n [\n 'd',\n isUpright\n ? `M${0},${count}L${ih},${count}L${ih},${h+count}L${0},${h+count},L${0},${count}`\n : `M${count},${0}L${w+count},${0}L${w+count},${ih}L${count},${ih},L${count},${0}`\n ],\n ],\n }\n ],\n };\n let clip = ctx.add(v);\n this.__cacheDefs.push(v);\n virtualDom.bb.push({\n type: 'item',\n tagName: 'use',\n props: [\n ['xlink:href', '#' + symbol],\n ['x', isUpright ? ix1 : (ix1 - count)],\n ['y', isUpright ? (iy1 - count) : iy1],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n });\n }\n count += isUpright ? h : w; // 增加主轴方向的一行/列尺寸\n if(boxShadow) {\n boxShadow.forEach(item => {\n bs.renderBoxShadow(this, renderMode, ctx, item, bx1, by1, bx2, by2, bx2 - bx1, by2 - by1, dx, dy);\n });\n }\n if(borderTopWidth > 0 && borderTopColor[3] > 0) {\n let deg1 = Math.atan(borderTopWidth / borderLeftWidth);\n let deg2 = Math.atan(borderTopWidth / borderRightWidth);\n let list = border.calPoints(borderTopWidth, computedStyle[BORDER_TOP_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 0, isFirst ? btlr : [0, 0], [0, 0]);\n border.renderBorder(this, renderMode, ctx, list, cacheStyle[BORDER_TOP_COLOR], dx, dy);\n }\n // right在最后这里不渲染\n if(borderBottomWidth > 0 && borderBottomColor[3] > 0) {\n let deg1 = Math.atan(borderBottomWidth / borderLeftWidth);\n let deg2 = Math.atan(borderBottomWidth / borderRightWidth);\n let list = border.calPoints(borderBottomWidth, computedStyle[BORDER_BOTTOM_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 2, isFirst ? btlr : [0, 0], [0, 0]);\n border.renderBorder(this, renderMode, ctx, list, cacheStyle[BORDER_BOTTOM_COLOR], dx, dy);\n }\n if(isFirst && borderLeftWidth > 0 && borderLeftColor[3] > 0) {\n let deg1 = Math.atan(borderLeftWidth / borderTopWidth);\n let deg2 = Math.atan(borderLeftWidth / borderBottomWidth);\n let list = border.calPoints(borderLeftWidth, computedStyle[BORDER_LEFT_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 3, btlr, btrr);\n border.renderBorder(this, renderMode, ctx, list, cacheStyle[BORDER_LEFT_COLOR], dx, dy);\n }\n isFirst = false;\n lastContentBox = contentBox;\n lastLineBox = contentBox.parentLineBox;\n }\n // 最后一个特殊判断\n if(i === length - 1) {\n let [ix1, iy1, ix2, iy2, bx1, by1, bx2, by2] = inline.getInlineBox(this, isUpright, contentBoxList,\n lastContentBox, contentBoxList[i], lastLineBox, baseline, lineHeight, leading, isFirst, true,\n backgroundClip, paddingTop, paddingRight, paddingBottom, paddingLeft,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth);\n // 要算上开头空白inline,可能有多个和递归嵌套\n if(isFirst) {\n let n = getFirstEmptyInlineWidth(this);\n ix1 -= n;\n bx1 -= n;\n }\n // 要算上末尾空白inline,可能有多个和递归嵌套\n let n = getLastEmptyInlineWidth(this);\n ix2 += n;\n bx2 += n;\n if(backgroundColor[3] > 0) {\n bg.renderBgc(this, renderMode, ctx, cacheStyle[BACKGROUND_COLOR], null,\n ix1, iy1, ix2 - ix1, iy2 - iy1, isFirst ? btlr : [0, 0], btrr, bbrr, isFirst ? bblr : [0, 0],\n 'fill', false, dx, dy);\n }\n let w = ix2 - ix1, h = iy2 - iy1;\n // canvas的bg位图裁剪\n if((renderMode === CANVAS || renderMode === WEBGL) && offscreen) {\n if(isUpright) {\n ctx.drawImage(offscreen.canvas, 0, count, iw, h, ix1 + dx, iy1 + dy, iw, h);\n }\n else {\n ctx.drawImage(offscreen.canvas, count, 0, w, ih, ix1 + dx, iy1 + dy, w, ih);\n }\n }\n //svg则特殊判断\n else if(renderMode === SVG && svgBgSymbol.length) {\n svgBgSymbol.forEach(symbol => {\n if(symbol) {\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n tagName: 'path',\n props: [\n [\n 'd',\n isUpright\n ? `M${0},${count}L${ih},${count}L${ih},${h+count}L${0},${h+count},L${0},${count}`\n : `M${count},${0}L${w+count},${0}L${w+count},${ih}L${count},${ih},L${count},${0}`\n ],\n ],\n }\n ],\n };\n let clip = ctx.add(v);\n this.__cacheDefs.push(v);\n virtualDom.bb.push({\n type: 'item',\n tagName: 'use',\n props: [\n ['xlink:href', '#' + symbol],\n ['x', isUpright ? ix1 : (ix1 - count)],\n ['y', isUpright ? (iy1 - count) : iy1],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n });\n }\n if(boxShadow) {\n boxShadow.forEach(item => {\n bs.renderBoxShadow(this, renderMode, ctx, item, bx1, by1, bx2, by2, bx2 - bx1, by2 - by1, dx, dy);\n });\n }\n if(borderTopWidth > 0 && borderTopColor[3] > 0) {\n let deg1 = Math.atan(borderTopWidth / borderLeftWidth);\n let deg2 = Math.atan(borderTopWidth / borderRightWidth);\n let list = border.calPoints(borderTopWidth, computedStyle[BORDER_TOP_STYLE], deg1, deg2,\n bx1, bx1, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 0, isFirst ? btlr : [0, 0], btrr);\n border.renderBorder(this, renderMode, ctx, list, cacheStyle[BORDER_TOP_COLOR], dx, dy);\n }\n if(borderRightWidth > 0 && borderRightColor[3] > 0) {\n let deg1 = Math.atan(borderRightWidth / borderTopWidth);\n let deg2 = Math.atan(borderRightWidth / borderBottomWidth);\n let list = border.calPoints(borderRightWidth, computedStyle[BORDER_RIGHT_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 1, btlr, btrr);\n border.renderBorder(this, renderMode, ctx, list, cacheStyle[BORDER_RIGHT_COLOR], dx, dy);\n }\n if(borderBottomWidth > 0 && borderBottomColor[3] > 0) {\n let deg1 = Math.atan(borderBottomWidth / borderLeftWidth);\n let deg2 = Math.atan(borderBottomWidth / borderRightWidth);\n let list = border.calPoints(borderBottomWidth, computedStyle[BORDER_BOTTOM_STYLE], deg1, deg2,\n bx1, bx1, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 2, isFirst ? btlr : [0, 0], btrr);\n border.renderBorder(this, renderMode, ctx, list, cacheStyle[BORDER_BOTTOM_COLOR], dx, dy);\n }\n if(isFirst && borderLeftWidth > 0 && borderLeftColor[3] > 0) {\n let deg1 = Math.atan(borderLeftWidth / borderTopWidth);\n let deg2 = Math.atan(borderLeftWidth / borderBottomWidth);\n let list = border.calPoints(borderLeftWidth, computedStyle[BORDER_LEFT_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 3, btlr, btrr);\n border.renderBorder(this, renderMode, ctx, list, cacheStyle[BORDER_LEFT_COLOR], dx, dy);\n }\n }\n }\n if(offscreen) {\n offscreen.ctx.clearRect(0, 0, iw, ih);\n }\n return res;\n }\n // 无内容且无尺寸的无需渲染\n else if(bx1 === bx2 || by1 === by2) {\n return res;\n }\n }\n // block渲染,bgc垫底\n if(backgroundColor[3] > 0) {\n bg.renderBgc(this, renderMode, ctx, cacheStyle[BACKGROUND_COLOR], borderList,\n bx1, by1, bx2 - bx1, by2 - by1, btlr, btrr, bbrr, bblr, 'fill', false, dx, dy);\n }\n // 渐变或图片叠加\n if(backgroundImage) {\n let length = backgroundImage.length;\n backgroundImage.slice(0).reverse().forEach((bgi, i) => {\n if(!bgi) {\n return;\n }\n i = length - 1 - i;\n if(util.isString(bgi)) {\n let loadBgi = this.__loadBgi[i];\n if(loadBgi.url === bgi) {\n bg.renderImage(this, renderMode, ctx, loadBgi,\n bx1, by1, bx2, by2, btlr, btrr, bbrr, bblr,\n computedStyle, i, backgroundSize, backgroundRepeat, false, dx, dy);\n }\n }\n else if(bgi.k) {\n let gd = this.__gradient(renderMode, ctx, bx1, by1, bx2, by2, bgi, dx, dy);\n if(gd) {\n if(gd.k === 'conic') {\n gradient.renderConic(this, renderMode, ctx, gd.v, bx1, by1, bx2 - bx1, by2 - by1,\n btlr, btrr, bbrr, bblr);\n }\n else {\n bg.renderBgc(this, renderMode, ctx, gd.v, borderList,\n bx1, by1, bx2 - bx1, by2 - by1, btlr, btrr, bbrr, bblr, 'fill', false, dx, dy);\n }\n }\n }\n });\n }\n // boxShadow可能会有多个\n if(boxShadow) {\n boxShadow.forEach(item => {\n bs.renderBoxShadow(this, renderMode, ctx, item, x1, y1, x6, y6, x6 - x1, y6 - y1, dx, dy);\n });\n }\n // 边框需考虑尖角,两条相交边平分45°夹角\n if(borderTopWidth > 0 && borderTopColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, cacheStyle[BORDER_TOP], cacheStyle[BORDER_TOP_COLOR], dx, dy);\n }\n if(borderRightWidth > 0 && borderRightColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, cacheStyle[BORDER_RIGHT], cacheStyle[BORDER_RIGHT_COLOR], dx, dy);\n }\n if(borderBottomWidth > 0 && borderBottomColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, cacheStyle[BORDER_BOTTOM], cacheStyle[BORDER_BOTTOM_COLOR], dx, dy);\n }\n if(borderLeftWidth > 0 && borderLeftColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, cacheStyle[BORDER_LEFT], cacheStyle[BORDER_LEFT_COLOR], dx, dy);\n }\n return res;\n }\n\n // 强制刷新API\n refresh(lv, cb) {\n let root = this.__root;\n if(isFunction(lv) || !lv) {\n lv = CACHE;\n }\n if(lv) {\n this.clearCache(lv < REPAINT);\n }\n if(root && !this.__isDestroyed) {\n root.__addUpdate(this, null, lv, null, null, null, cb);\n }\n else if(isFunction(cb)) {\n cb(-1);\n }\n }\n\n __destroy() {\n if(this.__isDestroyed) {\n return;\n }\n let ref = this.props.ref;\n if(!isNil(ref) && !isFunction(ref)) {\n delete this.__root.__ref[ref];\n }\n super.__destroy();\n this.clearAnimate();\n this.clearFrameAnimate();\n this.clearCache();\n let fontRegister = this.__fontRegister;\n for(let i in fontRegister) {\n if(fontRegister.hasOwnProperty(i)) {\n font.offRegister(i, this);\n }\n }\n this.__host = this.__hostRoot = this.__root\n = this.__prev = this.__next\n = this.__parent = this.__domParent = null;\n this.__reset0();\n }\n\n // 先查找到注册了事件的节点,再捕获冒泡判断增加性能\n __emitEvent(e, force) {\n let { __isDestroyed, __computedStyle: computedStyle, __mask } = this;\n if(__isDestroyed || computedStyle[DISPLAY] === 'none' || e.__stopPropagation || __mask) {\n return;\n }\n let { event: { type } } = e;\n let { listener, __hasMask } = this;\n let cb;\n if(listener.hasOwnProperty(type)) {\n cb = listener[type];\n }\n // touchmove之类强制的直接由Root通知即可\n if(force) {\n if(computedStyle[POINTER_EVENTS] !== 'none' && isFunction(cb) && !e.__stopImmediatePropagation) {\n cb.call(this, e);\n }\n return true;\n }\n // 非force的判断事件坐标是否在节点内\n if(this.willResponseEvent(e)) {\n // 如果有mask,点在mask上才行,点在clip外才行\n if(__hasMask) {\n let next = this.next;\n let isClip = next.__clip;\n let hasEmitMask;\n while(next && next.__mask) {\n if(next.willResponseEvent(e, true)) {\n hasEmitMask = true;\n break;\n }\n next = next.next;\n }\n if(!isClip && !hasEmitMask) {\n return;\n }\n }\n if(isFunction(cb) && !e.__stopImmediatePropagation) {\n cb.call(this, e);\n }\n return true;\n }\n }\n\n willResponseEvent(e, ignore) {\n let { x, y } = e;\n let { __x1, __y1, __offsetWidth, __offsetHeight, __matrixEvent, __computedStyle } = this;\n if(__computedStyle[POINTER_EVENTS] === 'none') {\n return;\n }\n let inThis = geom.pointInQuadrilateral(\n x, y,\n __x1, __y1,\n __x1 + __offsetWidth, __y1,\n __x1 + __offsetWidth, __y1 + __offsetHeight,\n __x1, __y1 + __offsetHeight,\n __matrixEvent\n );\n if(inThis) {\n if(!e.target && !ignore) {\n e.target = this;\n // 缓存target给move用\n if(e.event.type === 'touchstart') {\n this.root && (this.root.__touchstartTarget = this);\n }\n }\n return true;\n }\n }\n\n __gradient(renderMode, ctx, bx1, by1, bx2, by2, bgi, dx = 0, dy = 0) {\n let iw = bx2 - bx1;\n let ih = by2 - by1;\n // 无尺寸无需创建渐变\n if(!iw || !ih) {\n return;\n }\n let { k, v, d, s, z, p } = bgi;\n let cx = bx1 + iw * 0.5;\n let cy = by1 + ih * 0.5;\n let res = { k };\n if(k === 'linear') {\n let gd = gradient.getLinear(v, d, bx1, by1, cx, cy, iw, ih, this.root, dx, dy);\n res.v = this.__getLg(renderMode, ctx, gd);\n }\n else if(k === 'radial') {\n let gd = gradient.getRadial(v, s, z, p, bx1, by1, bx2, by2, this.root, dx, dy);\n if(gd) {\n res.v = this.__getRg(renderMode, ctx, gd)\n if(gd.matrix) {\n res.v = [res.v, gd.matrix, gd.cx, gd.cy];\n }\n }\n }\n else if(k === 'conic') {\n let bbox = this.bbox;\n let m1 = Math.max(Math.abs(bbox[2] - bbox[0]), Math.abs(bbox[3] - bbox[1]));\n let m2 = Math.max(Math.abs(iw), Math.abs(ih));\n let gd = gradient.getConic(v, d, p, bx1, by1, bx2, by2, m1 / m2, this.root, dx, dy);\n res.v = this.__getCg(renderMode, ctx, gd);\n }\n return res;\n }\n\n __getLg(renderMode, ctx, gd) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let lg = ctx.createLinearGradient(gd.x1, gd.y1, gd.x2, gd.y2);\n gd.stop.forEach(item => {\n lg.addColorStop(item[1], int2rgba(item[0]));\n });\n return lg;\n }\n else if(renderMode === SVG) {\n let v = {\n tagName: 'linearGradient',\n props: [\n ['x1', gd.x1],\n ['y1', gd.y1],\n ['x2', gd.x2],\n ['y2', gd.y2],\n ],\n children: gd.stop.map(item => {\n return {\n tagName: 'stop',\n props: [\n ['stop-color', int2rgba(item[0])],\n ['offset', item[1] * 100 + '%'],\n ],\n };\n }),\n };\n let uuid = ctx.add(v);\n this.__cacheDefs.push(v);\n return 'url(#' + uuid + ')';\n }\n }\n\n __getRg(renderMode, ctx, gd) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let rg = ctx.createRadialGradient(gd.cx, gd.cy, 0, gd.tx, gd.ty, gd.r);\n gd.stop.forEach(item => {\n rg.addColorStop(item[1], int2rgba(item[0]));\n });\n return rg;\n }\n else if(renderMode === SVG) {\n let v = {\n tagName: 'radialGradient',\n props: [\n ['cx', gd.tx],\n ['cy', gd.ty],\n ['r', gd.r],\n ],\n children: gd.stop.map(item => {\n return {\n tagName: 'stop',\n props: [\n ['stop-color', int2rgba(item[0])],\n ['offset', item[1] * 100 + '%'],\n ],\n };\n }),\n };\n if(gd.tx !== gd.cx) {\n v.props.push(['fx', gd.cx]);\n }\n if(gd.ty !== gd.cy) {\n v.props.push(['fy', gd.cy]);\n }\n let uuid = ctx.add(v);\n this.__cacheDefs.push(v);\n return 'url(#' + uuid + ')';\n }\n }\n\n __getCg(renderMode, ctx, gd) {\n let { stop } = gd;\n let len = stop.length - 1;\n if(stop[len][1] < 1) {\n stop.push([stop[len][0].slice(0), 1]);\n }\n if(stop[0][1] > 0) {\n stop.unshift([stop[0][0].slice(0), 0]);\n }\n // canvas采用点色值计算法,svg则分360度画块\n let res = [];\n if(renderMode === CANVAS || renderMode === WEBGL) {\n return gd;\n }\n return res;\n }\n\n // canvas清空自身cache,cacheTotal在Root的自底向上逻辑做,svg仅有cacheTotal\n clearCache(onlyTotal) {\n let __cacheTotal = this.__cacheTotal;\n let __cacheFilter = this.__cacheFilter;\n let __cacheMask = this.__cacheMask;\n let __cache = this.__cache;\n if(__cache && !onlyTotal) {\n __cache.release();\n this.__refreshLevel |= REPAINT;\n }\n if(__cacheTotal) {\n __cacheTotal.release();\n }\n if(__cacheFilter) {\n __cacheFilter.release();\n }\n if(__cacheMask) {\n __cacheMask.release();\n }\n this.__refreshLevel |= CACHE;\n this.clearTopCache();\n }\n\n clearTopCache() {\n let p = this.__domParent;\n while(p) {\n let __cacheTotal = p.__cacheTotal;\n let __cacheFilter = p.__cacheFilter;\n let __cacheMask = p.__cacheMask;\n p.__refreshLevel |= CACHE;\n if(__cacheTotal) {\n __cacheTotal.release();\n }\n if(__cacheFilter) {\n __cacheFilter.release();\n }\n if(__cacheMask) {\n __cacheMask.release();\n }\n p = p.__domParent;\n }\n }\n\n updateStyle(style, cb) {\n let formatStyle = normalize(style);\n this.updateFormatStyle(formatStyle, cb);\n }\n\n // 传入格式化好key/value的样式\n updateFormatStyle(style, cb) {\n let root = this.__root, currentStyle = this.__currentStyle, currentProps = this.__currentProps;\n let keys = [];\n Object.keys(style).forEach(i => {\n let isGeom = GEOM.hasOwnProperty(i);\n if(!isGeom) {\n i = parseInt(i);\n }\n if(!equalStyle(i, isGeom ? currentProps[i] : currentStyle[i], style[i], this)) {\n if(isGeom) {\n currentProps[i] = style[i];\n }\n else {\n currentStyle[i] = style[i];\n }\n keys.push(i);\n }\n });\n if(!keys.length || this.__isDestroyed) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n if(root) {\n root.__addUpdate(this, keys, null, null, null, null, cb);\n }\n }\n\n animate(list, options = {}) {\n let animation = new Animation(this, list, options);\n if(this.__isDestroyed) {\n animation.__destroy();\n return animation;\n }\n this.__animationList.push(animation);\n if(options.autoPlay === false) {\n return animation;\n }\n return animation.play();\n }\n\n removeAnimate(o) {\n if(o instanceof Animation) {\n let i = this.__animationList.indexOf(o);\n if(i > -1) {\n o.cancel();\n o.__destroy();\n this.__animationList.splice(i, 1);\n }\n }\n }\n\n clearAnimate() {\n this.__animationList.splice(0).forEach(o => {\n o.cancel();\n o.__destroy();\n });\n }\n\n frameAnimate(cb) {\n if(isFunction(cb)) {\n let list = this.__frameAnimateList;\n // 防止重复\n for(let i = 0, len = list.length; i < len; i++) {\n if(list[i].__karasFramecb === cb) {\n return cb;\n }\n }\n let enter = {\n __after(diff) {\n cb(diff);\n },\n __karasFramecb: cb,\n };\n list.push(enter);\n frame.onFrame(enter);\n return cb;\n }\n }\n\n removeFrameAnimate(cb) {\n for(let i = 0, list = this.__frameAnimateList, len = list.length; i < len; i++) {\n if(list[i].__karasFramecb === cb) {\n list.splice(i, 1);\n frame.offFrame(cb);\n return;\n }\n }\n }\n\n clearFrameAnimate() {\n this.__frameAnimateList.splice(0).forEach(o => {\n frame.offFrame(o);\n });\n }\n\n // isLayout为false时,为relative,true则是absolute/justify/marginAuto等直接改layoutData数据的\n // lv是reflow偏移时传入,需要清除cacheStyle,并且对位图cache进行偏移设置\n // 注意所有的offset/resize都要避免display:none的,比如合并margin导致block的孩子inline因clamp为none时没有layoutData\n __offsetX(diff, isLayout, lv) {\n if(this.__computedStyle[DISPLAY] === 'none') {\n return;\n }\n super.__offsetX(diff);\n if(isLayout) {\n this.__layoutData.x += diff;\n }\n this.__x1 += diff;\n this.__x2 += diff;\n this.__x3 += diff;\n this.__x4 += diff;\n this.__x5 += diff;\n this.__x6 += diff;\n if(lv) {\n this.__refreshLevel |= lv;\n if(lv >= REFLOW) {\n this.__cacheStyle = [];\n this.__calStyle(lv, this.__currentStyle, this.__computedStyle, this.__cacheStyle);\n }\n if(this.__bbox) {\n this.__bbox[0] += diff;\n this.__bbox[2] += diff;\n }\n if(this.__filterBbox) {\n this.__filterBbox[0] += diff;\n this.__filterBbox[2] += diff;\n }\n }\n }\n\n __offsetY(diff, isLayout, lv) {\n if(this.__computedStyle[DISPLAY] === 'none') {\n return;\n }\n super.__offsetY(diff);\n if(isLayout) {\n this.__layoutData && (this.__layoutData.y += diff);\n }\n this.__y1 += diff;\n this.__y2 += diff;\n this.__y3 += diff;\n this.__y4 += diff;\n this.__y5 += diff;\n this.__y6 += diff;\n if(lv) {\n this.__refreshLevel |= lv;\n if(lv >= REFLOW) {\n this.__cacheStyle = [];\n this.__calStyle(lv, this.__currentStyle, this.__computedStyle, this.__cacheStyle);\n }\n if(this.__bbox) {\n this.__bbox[1] += diff;\n this.__bbox[3] += diff;\n }\n if(this.__filterBbox) {\n this.__filterBbox[1] += diff;\n this.__filterBbox[3] += diff;\n }\n if(this.__cache) {\n this.__cache.__offsetY(diff);\n }\n if(this.__cacheTotal) {\n this.__cacheTotal.__offsetY(diff);\n }\n if(this.__cacheFilter) {\n this.__cacheFilter.__offsetY(diff);\n }\n if(this.__cacheMask) {\n this.__cacheMask.__offsetY(diff);\n }\n }\n }\n\n __resizeX(diff, lv) {\n if(this.__computedStyle[DISPLAY] === 'none') {\n return;\n }\n this.__computedStyle.width = this.__width += diff;\n this.__clientWidth += diff;\n this.__offsetWidth += diff;\n this.__outerWidth += diff;\n this.__layoutData && (this.__layoutData.w += diff);\n this.__x4 += diff;\n this.__x5 += diff;\n this.__x6 += diff;\n if(diff < 0) {\n this.__limitCache = false;\n }\n if(lv) {\n this.__refreshLevel |= lv;\n if(lv >= REFLOW) {\n this.__cacheStyle = [];\n this.__calStyle(lv, this.__currentStyle, this.__computedStyle, this.__cacheStyle);\n }\n }\n this.clearCache();\n }\n\n __resizeY(diff, lv) {\n if(this.__computedStyle[DISPLAY] === 'none') {\n return;\n }\n this.__computedStyle.height = this.__height += diff;\n this.__clientHeight += diff;\n this.__offsetHeight += diff;\n this.__outerHeight += diff;\n this.__layoutData.h += diff;\n this.__y4 += diff;\n this.__y5 += diff;\n this.__y6 += diff;\n if(diff < 0) {\n this.__limitCache = false;\n }\n if(lv) {\n this.__refreshLevel |= lv;\n if(lv >= REFLOW) {\n this.__cacheStyle = [];\n this.__calStyle(lv, this.__currentStyle, this.__computedStyle, this.__cacheStyle);\n }\n }\n this.clearCache();\n }\n\n getComputedStyle(key) {\n let computedStyle = this.__computedStyle;\n let res = {};\n let keys = [];\n if(key) {\n let temp;\n if(Array.isArray(key)) {\n temp = key;\n }\n else {\n temp = [key];\n }\n temp.forEach(k => {\n if(abbr.hasOwnProperty(k)) {\n abbr[k].forEach(k => {\n keys.push(STYLE_KEY[style2Upper(k)]);\n });\n }\n else {\n keys.push(STYLE_KEY[style2Upper(k)]);\n }\n });\n }\n else {\n keys = Object.keys(computedStyle);\n }\n keys.forEach(k => {\n if(GEOM.hasOwnProperty(k)) {\n res[k] = computedStyle[k];\n }\n else {\n res[STYLE_RV_KEY[k]] = computedStyle[k];\n }\n });\n return res;\n }\n\n getBoundingClientRect(includeBbox) {\n let box;\n if(includeBbox) {\n box = this.bbox;\n }\n else {\n let { __x1, __y1, __offsetWidth, __offsetHeight } = this;\n box = [__x1, __y1, __x1 + __offsetWidth, __y1 + __offsetHeight];\n }\n let matrixEvent = this.__matrixEvent;\n let p1 = point2d(mx.calPoint({ x: box[0], y: box[1] }, matrixEvent));\n let p2 = point2d(mx.calPoint({ x: box[2], y: box[1] }, matrixEvent));\n let p3 = point2d(mx.calPoint({ x: box[2], y: box[3] }, matrixEvent));\n let p4 = point2d(mx.calPoint({ x: box[0], y: box[3] }, matrixEvent));\n return {\n left: Math.min(p1.x, Math.min(p2.x, Math.min(p3.x, p4.x))),\n top: Math.min(p1.y, Math.min(p2.y, Math.min(p3.y, p4.y))),\n right: Math.max(p1.x, Math.max(p2.x, Math.max(p3.x, p4.x))),\n bottom: Math.max(p1.y, Math.max(p2.y, Math.max(p3.y, p4.y))),\n points: [p1, p2, p3, p4],\n };\n }\n\n // img和geom返回false,在inline布局时判断是否是真的inline\n __isRealInline() {\n return true;\n }\n\n remove(cb) {\n let { __root: root } = this;\n let parent = this.isShadowRoot ? this.hostRoot.__parent: this.__parent;\n let i;\n if(parent) {\n // 移除component的shadowRoot视为移除component\n let target = this.isShadowRoot ? this.hostRoot : this;\n i = parent.__children.indexOf(target);\n parent.__children.splice(i, 1);\n i = parent.__zIndexChildren.indexOf(target);\n parent.__zIndexChildren.splice(i, 1);\n let { __prev, __next } = this;\n if(__prev) {\n __prev.__next = __next;\n }\n if(__next) {\n __next.__prev = __prev;\n }\n }\n if(this.__isDestroyed) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n parent.__deleteStruct(this, i);\n // 不可见仅改变数据结构\n if(this.__computedStyle[DISPLAY] === 'none' || parent.__computedStyle[DISPLAY] === 'none') {\n this.__destroy();\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 可见在reflow逻辑做结构关系等\n root.__addUpdate(this, null, REFLOW, null, true, null, cb);\n }\n\n get tagName() {\n return this.__tagName;\n }\n\n get clientWidth() {\n return this.__clientWidth || 0;\n }\n\n get clientHeight() {\n return this.__clientHeight || 0;\n }\n\n get offsetWidth() {\n return this.__offsetWidth || 0;\n }\n\n get offsetHeight() {\n return this.__offsetHeight || 0;\n }\n\n get outerWidth() {\n return this.__outerWidth || 0;\n }\n\n get outerHeight() {\n return this.__outerHeight || 0;\n }\n\n // 相对自身原点,不考虑margin的范围,>=REPAINT渲染或个别有影响的渲染改变(如blur)清空缓存\n get bbox() {\n if(!this.__bbox) {\n let {\n __x1, __y1, __offsetWidth, __offsetHeight,\n __computedStyle: {\n [BOX_SHADOW]: boxShadow,\n },\n } = this;\n this.__bbox = spreadBoxShadow([__x1, __y1, __x1 + __offsetWidth, __y1 + __offsetHeight], boxShadow);\n }\n return this.__bbox;\n }\n\n get filterBbox() {\n if(!this.__filterBbox) {\n let bbox = this.__bbox || this.bbox;\n let filter = this.__computedStyle[FILTER];\n this.__filterBbox = spreadFilter(bbox, filter);\n }\n return this.__filterBbox;\n }\n\n get listener() {\n return this.__listener;\n }\n\n get opacity() {\n return this.__opacity;\n }\n\n get matrix() {\n return this.__matrix;\n }\n\n get matrixEvent() {\n let __domParent = this.__domParent, matrix = this.__matrix;\n while(__domParent) {\n matrix = mx.multiply(__domParent.__perspectiveMatrix, matrix);\n matrix = mx.multiply(__domParent.__matrix, matrix);\n __domParent = __domParent.__domParent;\n }\n return matrix;\n }\n\n get perspectiveMatrix() {\n return this.__perspectiveMatrix;\n }\n\n get style() {\n return this.__style;\n }\n\n get computedStyle() {\n return this.__computedStyle;\n }\n\n get animationList() {\n return this.__animationList;\n }\n\n get currentStyle() {\n return this.__currentStyle;\n }\n\n get cacheStyle() {\n return this.__cacheStyle;\n }\n\n get isShadowRoot() {\n return !this.parent && this.host && this.host !== this.root;\n }\n\n get contentBoxList() {\n return this.__contentBoxList;\n }\n\n get baseline() {\n return this.__offsetHeight;\n }\n\n get firstBaseline() {\n return this.__offsetHeight;\n }\n\n get verticalBaseline() {\n return this.__offsetWidth;\n }\n\n get mask() {\n return this.__mask;\n }\n\n set mask(v) {\n v = !!v;\n if(this.__mask !== v) {\n this.__mask = v;\n let root = this.__root;\n if(root && !this.__isDestroyed) {\n let p = this.__domParent;\n if(p) {\n if(v) {\n p.__computedStyle[TRANSFORM_STYLE] = 'flat';\n }\n else {\n p.__computedStyle[TRANSFORM_STYLE] = p.__currentStyle[TRANSFORM_STYLE];\n }\n }\n root.__addUpdate(this, null, MASK, null, null, null, null);\n }\n }\n }\n\n get clip() {\n return this.__clip;\n }\n\n set clip(v) {\n v = !!v;\n if(this.__clip !== v) {\n this.__clip = v;\n let root = this.__root;\n if(root && !this.__isDestroyed) {\n let p = this.__domParent;\n if(p) {\n if(v) {\n p.__computedStyle[TRANSFORM_STYLE] = 'flat';\n }\n else {\n p.__computedStyle[TRANSFORM_STYLE] = p.__currentStyle[TRANSFORM_STYLE];\n }\n }\n root.__addUpdate(this, null, MASK, null, null, null, null);\n }\n }\n }\n\n get cacheAsBitmap() {\n return this.__cacheAsBitmap;\n }\n\n set cacheAsBitmap(v) {\n v = !!v;\n if(this.__cacheAsBitmap !== v) {\n this.__cacheAsBitmap = v;\n let root = this.__root;\n if(root && !this.__isDestroyed) {\n if(v) {\n this.__computedStyle[TRANSFORM_STYLE] = 'flat';\n }\n else {\n this.__computedStyle[TRANSFORM_STYLE] = this.__currentStyle[TRANSFORM_STYLE];\n }\n root.__addUpdate(this, null, REPAINT, null, null, null, null);\n }\n }\n }\n\n get parentLineBox() {\n return this.__parentLineBox;\n }\n}\n\nexport default Xom;\n","import TextBox from './TextBox';\nimport enums from '../util/enums';\nimport css from '../style/css';\n\nconst { STYLE_KEY: {\n DISPLAY,\n MARGIN_TOP,\n MARGIN_BOTTOM,\n MARGIN_LEFT,\n MARGIN_RIGHT,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_RIGHT_WIDTH,\n PADDING_TOP,\n PADDING_BOTTOM,\n PADDING_LEFT,\n PADDING_RIGHT,\n LINE_HEIGHT,\n} } = enums;\n\n/**\n * css中常见的概念,一行内容,里面可能有若干不同的内容,仅在布局阶段出现,不参与渲染逻辑\n * 本类是个抽象逻辑概念,会包含Text的内容TextBox和inlineBlock等节点,而内容TextBox则属于Text\n * 一个Text可能因为换行产生多个TextBox,从而形成不同行的内容就属于不同的LineBox\n * 本类属于block(包含flex和inlineBlock,下同)节点下,一个dom会有个专门列表,\n * 包含若干个LineBox保存着若干行文本内容TextBox,不直接关联Text,\n * inline则不会有此对象和列表,其复用最近block父层的,这样解决嵌套问题,\n * block在布局时将列表向孩子传递下去,每遇到block会重新生成\n * 每当发生换行时,专门列表中会新生成一个LineBox,让后续内容继续跟随新的LB\n * LB内部要进行垂直对齐,Text内容较简单x字符底部为baseline,inlineBlock等节点按最后一行baseline\n */\nclass LineBox {\n constructor(x, y, lineHeight, baseline, isUpright) {\n this.__list = [];\n this.__x = x;\n this.__y = y;\n this.__oy = 0; // 很难受,relative的offset不能直接加在x上,会引发重复以及block父尺寸问题\n this.__lineHeight = lineHeight; // 可能出现空的inline,因此一个inline进入布局时先设置当前lineBox的最小lineHeight/baseline\n this.__baseline = baseline;\n this.__isUpright = isUpright;\n this.__bOffset = 0;\n }\n\n add(item) {\n this.list.push(item);\n item.__parentLineBox = this;\n }\n\n verticalAlign(isUpright) {\n let baseline = isUpright ? this.verticalBaseline : this.baseline;\n let lineHeight = isUpright ? this.verticalLineHeight : this.lineHeight;\n let increase = lineHeight;\n // 只有1个也需要对齐,因为可能内嵌了空inline使得baseline发生变化\n if(this.list.length) {\n this.list.forEach(item => {\n if(item.isEllipsis) {\n return;\n }\n // 垂直排版计算不太一样,因为原点坐标系不一样\n if(isUpright) {\n let n = item.verticalBaseline;\n if(n !== baseline) {\n let d = baseline - n;\n item.__offsetX(d, true);\n // 同下方\n increase = Math.max(increase, item.offsetWidth + d);\n }\n }\n else {\n let n = item.baseline;\n if(n !== baseline) {\n let d = baseline - n;\n item.__offsetY(d, true);\n // text的话对齐下移可能影响整体高度,在同行有img/ib这样的替换元素下,需记录最大偏移导致的高度调整值\n // 比如一个字符和img,字符下调y即字符的baseline和图片底部对齐,导致高度增加lineHeight和baseline的差值\n increase = Math.max(increase, item.offsetHeight + d);\n }\n }\n });\n // 特殊情况,有img这样的替换元素时,要参与这一行和baseline的对齐扩充,常见于css的img底部额外4px问题\n // 先计算总体baseline和本身baseline差值得出偏移,然后加到本身lineHeight上得出尺寸,再和其它扩充取最大值\n let diff = baseline - this.__baseline;\n increase = Math.max(increase, this.__lineHeight + diff);\n }\n return Math.max(0, increase - lineHeight);\n }\n\n __offsetX(diff, isAlign) {\n this.__x += diff;\n // vertical-align或水平情况特殊对齐,可能替换元素img和text导致偏移\n if(isAlign) {\n this.list.forEach(item => {\n item.__offsetX(diff, true);\n });\n }\n }\n\n __offsetY(diff, isAlign) {\n this.__y += diff;\n // vertical-align情况或水平特殊对齐,可能替换元素img和textBox导致偏移\n if(isAlign) {\n this.list.forEach(item => {\n item.__offsetY(diff, true);\n });\n }\n }\n\n /**\n * 防止非行首空inline,每当遇到inline就设置当前lineBox的lineHeight/baseline,这样有最小值兜底\n * @param l\n * @param b\n * @private\n */\n __setLB(l, b) {\n this.__lineHeight = Math.max(l, this.__lineHeight);\n this.__baseline = Math.max(b, this.__baseline);\n }\n\n __resetLb(l, b) {\n this.list.forEach(item => {\n let dom = item;\n if(item instanceof TextBox) {\n dom = item.parent.parent;\n }\n let computedStyle = dom.computedStyle;\n while(computedStyle[DISPLAY] === 'inline') {\n l = Math.max(l, computedStyle[LINE_HEIGHT]);\n b = Math.max(b, css.getBaseline(computedStyle));\n dom = dom.domParent;\n computedStyle = dom.computedStyle;\n }\n });\n this.__lineHeight = l;\n this.__baseline = b;\n }\n\n get list() {\n return this.__list;\n }\n\n get size() {\n return this.__list.length;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get ox() {\n return this.__ox;\n }\n\n get oy() {\n return this.__oy;\n }\n\n get endX() {\n return this.x + this.width;\n }\n\n get endY() {\n return this.y + this.height;\n }\n\n get width() {\n if(this.isUpright) {\n return this.verticalLineHeight;\n }\n let list = this.list;\n let length = list.length;\n if(length) {\n let first = list[0];\n let last = list[length - 1];\n let x1 = first.x;\n let dom = first instanceof TextBox ? first.parent.domParent : first.domParent;\n // 因为inline可以嵌套inline,所以一直向上查找到非inline为止,每层inline如果是首个则减去左侧mbp\n while(true) {\n let list = dom.contentBoxList;\n let {\n [DISPLAY]: display,\n [MARGIN_LEFT]: marginLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [PADDING_LEFT]: paddingLeft,\n } = dom.computedStyle;\n if(display !== 'inline') {\n break;\n }\n if(first === list[0]) {\n x1 -= marginLeft + borderLeftWidth + paddingLeft;\n }\n dom = dom.domParent;\n }\n let x2 = last.x + last.outerWidth;\n dom = last instanceof TextBox ? last.parent.domParent : last.domParent;\n // 同向上查非inline,每层inline如果是最后一个则加上右侧mbp\n while(true) {\n let list = dom.contentBoxList;\n let {\n [DISPLAY]: display,\n [MARGIN_RIGHT]: marginRight,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [PADDING_RIGHT]: paddingRight,\n } = dom.computedStyle;\n if(display !== 'inline') {\n break;\n }\n if(first === list[list.length - 1]) {\n x2 += marginRight + borderRightWidth + paddingRight;\n }\n dom = dom.domParent;\n }\n return x2 - x1;\n }\n return 0;\n }\n\n get height() {\n if(!this.isUpright) {\n return this.lineHeight;\n }\n let list = this.list;\n let length = list.length;\n if(length) {\n let first = list[0];\n let last = list[length - 1];\n let y1 = first.y;\n let dom = first instanceof TextBox ? first.parent.domParent : first.domParent;\n // 因为inline可以嵌套inline,所以一直向上查找到非inline为止,每层inline如果是首个则减去左侧mbp\n while(true) {\n let list = dom.contentBoxList;\n let {\n [DISPLAY]: display,\n [MARGIN_TOP]: marginTop,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [PADDING_TOP]: paddingTop,\n } = dom.computedStyle;\n if(display !== 'inline') {\n break;\n }\n if(first === list[0]) {\n y1 -= marginTop + borderTopWidth + paddingTop;\n }\n dom = dom.domParent;\n }\n let y2 = last.y + last.outerHeight;\n dom = last instanceof TextBox ? last.parent.domParent : last.domParent;\n // 同向上查非inline,每层inline如果是最后一个则加上右侧mbp\n while(true) {\n let list = dom.contentBoxList;\n let {\n [DISPLAY]: display,\n [MARGIN_BOTTOM]: marginBottom,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [PADDING_BOTTOM]: paddingBottom,\n } = dom.computedStyle;\n if(display !== 'inline') {\n break;\n }\n if(first === list[list.length - 1]) {\n y2 += marginBottom + borderBottomWidth + paddingBottom;\n }\n dom = dom.domParent;\n }\n return y2 - y1;\n }\n return 0;\n }\n\n get bOffset() {\n return this.__bOffset;\n }\n\n get baseline() {\n let baseline = this.__baseline;\n // 只有TextBox和InlineBlock或replaced\n this.list.forEach(item => {\n baseline = Math.max(baseline, item.baseline);\n });\n return baseline;\n }\n\n get verticalBaseline() {\n let baseline = this.__baseline;\n // 只有TextBox和InlineBlock或replaced\n this.list.forEach(item => {\n baseline = Math.max(baseline, item.verticalBaseline);\n });\n return baseline;\n }\n\n get lineHeight() {\n let lineHeight = this.__lineHeight;\n // 只有TextBox和InlineBlock或replaced\n this.list.forEach(item => {\n lineHeight = Math.max(lineHeight, item.outerHeight);\n });\n return lineHeight;\n }\n\n get verticalLineHeight() {\n let lineHeight = this.__lineHeight;\n // 只有TextBox和InlineBlock或replaced\n this.list.forEach(item => {\n lineHeight = Math.max(lineHeight, item.outerWidth);\n });\n return lineHeight;\n }\n\n get isUpright() {\n return this.__isUpright;\n }\n}\n\nexport default LineBox;\n","import LineBox from './LineBox';\n\n/**\n * 维护一个上下文的LineBox,向LineBox中添加Item以及新增下一行的LineBox,多个LineBox组成一个区域\n * 一个block/inlineBlock拥有一个本类对象,上下文即对应这个dom流,而inline则复用最近非inline父元素的\n * 同时LineBox可能连续也可能不连续,不连续的是中间有block之类的隔离开来\n */\nclass LineBoxManager {\n constructor(x, y, lineHeight, baseline, isUpright) {\n this.__x = this.__lastX = x; // last存储目前最后一行LineBox的结尾位置,供后续inline使用\n this.__y = this.__lastY = y;\n this.__max = isUpright ? y : x;\n this.__domList = [];\n this.__domStack = [];\n this.__list = []; // 包含若干LineBox\n this.__isNewLine = true; // 区域内是否是新行,容器dom(block)开头肯定是\n this.__lineHeight = lineHeight;\n this.__baseline = baseline;\n this.__isEnd = true; // 在dom中是否一个区域处在结尾,外部控制\n this.__spreadList = []; // verticalAlign时每个区域增加的y高度\n this.__isVertical = isUpright;\n }\n\n /**\n * 每次换行时重新生成LineBox存入列表,同时由于flow流当前一定是流(dom)的结尾,设置isEnd\n * @returns {LineBox}\n */\n genLineBox(x, y) {\n let lineBox = new LineBox(x, y, this.__lineHeight, this.__baseline, this.isUpright);\n this.list.push(lineBox);\n this.__isEnd = true;\n return lineBox;\n }\n\n /**\n * inline的特殊调用,防止空内容但有mbp的inline不占位,放入一个有lineHeight的空lineBox\n * 只有新行开头时需要,后面的无论是否有内容都会影响lineHeight\n * @param x\n * @param y\n * @param l\n * @param b\n * @returns {LineBox}\n */\n genLineBoxByInlineIfNewLine(x, y, l, b) {\n let lineHeight = Math.max(this.__lineHeight, l);\n let baseline = Math.max(this.__baseline, b);\n if(this.__isNewLine) {\n let lineBox = new LineBox(x, y, lineHeight, baseline, this.isUpright);\n this.list.push(lineBox);\n this.__isEnd = true;\n this.__isNewLine = false;\n return lineBox;\n }\n }\n\n /**\n * 外部设置为结尾,如一个LineBox后出现一个block,此时会被隔断,不再作为流的末尾\n */\n setNotEnd() {\n this.__isEnd = false;\n }\n\n /**\n * 外部设置新行,下次新生成LineBox\n */\n setNewLine() {\n this.__isNewLine = true;\n }\n\n /**\n * 当前LineBox放入一个新项,当新行时(如第一行)产生一个新的LineBox并存入列表\n * 是否新区域和新行都是可以被外部控制,默认第一行是新\n * 当被隔断后会被外部重置新行,这样会生成新的来作为新加项的LineBox\n * 当换行时外部也会调用新行,这样再次添加Item时会自动生成新的LineBox而不是用之前的\n * @param o TextBox/Inline/InlineBlock\n * @param nextNewLine 是否设置newLine,标明下次添加新生成LineBox\n * @returns {LineBox}\n */\n addItem(o, nextNewLine) {\n let lineBox, isUpright = this.isUpright;\n // 新行新的lineBox,否则复用最后一个\n if(this.__isNewLine) {\n this.__isNewLine = false;\n lineBox = this.genLineBox(o.x, o.y);\n }\n else {\n let list = this.list;\n let length = list.length;\n lineBox = list[length - 1];\n }\n // inline递归过程中所有inline父子顺序列表,每个dom都需要对当前内容保存\n this.__domStack.forEach(item => {\n item.__contentBoxList.push(o);\n });\n lineBox.add(o);\n // 设置结束x的位置给next的inline标记用,o可能是TextBox或inlineBlock,当next新行时注意位置\n if(nextNewLine) {\n this.__isNewLine = true;\n this.__lastX = o.x;\n this.__lastY = o.y + o.outerHeight;\n }\n else {\n if(isUpright) {\n this.__lastX = o.x;\n this.__lastY = o.y + o.outerHeight;\n }\n else {\n this.__lastX = o.x + o.outerWidth;\n this.__lastY = o.y;\n }\n }\n this.__max = Math.max(this.__max, isUpright ? (o.y + o.outerHeight) : (o.x + o.outerWidth));\n return lineBox;\n }\n\n horizonAlign(size, textAlign, isUpright) {\n this.list.forEach(lineBox => {\n let diff = size - (isUpright ? lineBox.height : lineBox.width);\n if(diff > 0) {\n if(textAlign === 'center') {\n diff *= 0.5;\n }\n if(isUpright) {\n lineBox.__offsetY(diff, true);\n }\n else {\n lineBox.__offsetX(diff, true);\n }\n }\n });\n }\n\n /**\n * 垂直对齐过程中,如果遇到占位元素如img,可能会导致每行lineBox高度增加,需返回增加量,\n * next行也需要y偏移\n * @returns {number}\n */\n verticalAlign(isUpright) {\n let spreadList = this.__spreadList;\n spreadList.splice(0);\n let spread = 0;\n this.list.forEach(lineBox => {\n if(spread) {\n lineBox.__bOffset = spread; // 对齐造成的误差需记录给baseline修正\n if(isUpright) {\n lineBox.__offsetX(spread, true);\n }\n else {\n lineBox.__offsetY(spread, true);\n }\n }\n spread += lineBox.verticalAlign(isUpright);\n spreadList.push(spread);\n });\n return spread;\n }\n\n addX(n) {\n this.__lastX += n;\n }\n\n addY(n) {\n this.__lastY += n;\n }\n\n /**\n * inline递归过程中布局调用,不断出入栈dom对象,获取当前行状态下有哪些dom还在\n * @param dom\n */\n pushContentBoxList(dom) {\n this.__domList.push(dom);\n this.__domStack.push(dom);\n }\n\n popContentBoxList() {\n this.__domStack.pop();\n }\n\n __offsetX(diff) {\n this.list.forEach(lineBox => {\n lineBox.__offsetX(diff);\n });\n }\n\n __offsetY(diff) {\n this.list.forEach(lineBox => {\n lineBox.__offsetY(diff);\n });\n }\n\n /**\n * inline的特殊调用,非行首无论是否有内容都设置lineBox的lineHeight\n * @param l\n * @param b\n * @private\n */\n setLbByInlineIfNotNewLine(l, b) {\n let length = this.list.length;\n if(length && !this.isNewLine) {\n this.list[length - 1].__setLB(l, b, false);\n }\n }\n\n get size() {\n return this.list.length;\n }\n\n get lastX() {\n return this.__lastX;\n }\n\n get lastY() {\n return this.__lastY;\n }\n\n get endX() {\n let list = this.list;\n let length = list.length;\n if(length) {\n return list[length - 1].endX;\n }\n return this.__x;\n }\n\n get endY() {\n let list = this.list;\n let length = list.length;\n if(length) {\n return list[length - 1].endY;\n }\n return this.__y;\n }\n\n get isEnd() {\n return this.__isEnd;\n }\n\n get isNewLine() {\n return this.__isNewLine;\n }\n\n get breakLine() {\n return this.list.length > 1;\n }\n\n get domList() {\n return this.__domList;\n }\n\n get baseline() {\n let list = this.list;\n let length = list.length;\n if(length) {\n let n = 0;\n for(let i = 0; i < length - 1; i++) {\n n += list[i].height;\n }\n // 需考虑因为verticalAlign造成的lineBox偏移offset值,修正计算正确的baseline\n return n + list[length - 1].baseline + list[length - 1].bOffset;\n }\n return 0;\n }\n\n get firstBaseline() {\n let list = this.list;\n let length = list.length;\n if(length) {\n return list[0].baseline;\n }\n return 0;\n }\n\n get verticalBaseline() {\n let list = this.list;\n let length = list.length;\n if(length) {\n return list[0].baseline + list[0].bOffset;\n }\n return 0;\n }\n\n get lineHeight() {\n let list = this.list;\n if(list.length) {\n return list[list.length - 1].lineHeight;\n }\n return 0;\n }\n\n get verticalLineHeight() {\n let list = this.list;\n if(list.length) {\n return list[list.length - 1].verticalLineHeight;\n }\n return 0;\n }\n\n get lineBox() {\n let list = this.list;\n if(list.length) {\n return list[list.length - 1];\n }\n }\n\n get list() {\n return this.__list;\n }\n\n get width() {\n let w = 0;\n this.list.forEach(item => {\n w = Math.max(w, item.width);\n });\n return w;\n }\n\n get spreadList() {\n return this.__spreadList;\n }\n\n get isUpright() {\n return this.__isVertical;\n }\n\n get max() {\n return this.__max;\n }\n}\n\nexport default LineBoxManager;\n","const TAG_NAME = {\n 'div': true,\n 'p': true,\n 'span': true,\n 'img': true,\n 'b': true,\n 'strong': true,\n};\n\nconst INLINE = {\n 'span': true,\n 'img': true,\n 'b': true,\n 'strong': true,\n};\n\nconst BOLD = {\n 'b': true,\n 'strong': true,\n}\n\nexport default {\n TAG_NAME,\n INLINE,\n BOLD,\n};\n","import Xom from '../Xom';\nimport reset from '../../style/reset';\nimport css from '../../style/css';\nimport unit from '../../style/unit';\nimport enums from '../../util/enums';\nimport mode from '../../refresh/mode';\nimport util from '../../util/util';\nimport painter from '../../util/painter';\nimport transform from '../../style/transform';\nimport mx from '../../math/matrix';\nimport inject from '../../util/inject';\nimport gradient from '../../math/gradient';\nimport level from '../../refresh/level';\n\nconst {\n STYLE_KEY: {\n MARGIN_RIGHT,\n MARGIN_LEFT,\n PADDING_RIGHT,\n PADDING_LEFT,\n WIDTH,\n HEIGHT,\n BORDER_RIGHT_WIDTH,\n BORDER_LEFT_WIDTH,\n FILL,\n STROKE,\n STROKE_MITERLIMIT,\n STROKE_WIDTH,\n STROKE_LINECAP,\n STROKE_LINEJOIN,\n STROKE_DASHARRAY,\n STROKE_DASHARRAY_STR,\n FILL_RULE,\n VISIBILITY,\n FLEX_BASIS,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, REM, VW, VH, VMAX, VMIN, RGBA, GRADIENT } = unit;\nconst { int2rgba, isNil, joinArr } = util;\nconst { canvasPolygon, svgPolygon } = painter;\n\nconst REGISTER = {};\n\nclass Geom extends Xom {\n constructor(tagName, props) {\n super(tagName, props);\n this.__isMulti = !!this.props.multi;\n this.__style = css.normalize(this.style, reset.DOM_ENTRY_SET.concat(reset.GEOM_ENTRY_SET));\n this.__currentStyle = util.extend([], this.__style);\n this.__currentProps = util.clone(this.props);\n this.__cacheProps = {};\n }\n\n __tryLayInline(w, total) {\n this.__computeReflow();\n // 无children,直接以style的width为宽度,不定义则为0\n let { currentStyle: {\n [WIDTH]: width,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n }, computedStyle: {\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } } = this;\n if(width[1] !== AUTO) {\n w -= this.__calSize(width, total, true);\n }\n // 减去水平mbp\n w -= this.__calSize(marginRight, total, true);\n w -= this.__calSize(paddingRight, total, true);\n w -= borderRightWidth;\n w -= this.__calSize(marginLeft, total, true);\n w -= this.__calSize(paddingLeft, total, true);\n w -= borderLeftWidth;\n return w;\n }\n\n __calBasis(isDirectionRow, isAbs, isColumn, data, isDirectChild) {\n this.__computeReflow();\n let b = 0;\n let min = 0;\n let max = 0;\n let { currentStyle, computedStyle } = this;\n let { w, h } = data;\n // 计算需考虑style的属性\n let {\n [FLEX_BASIS]: flexBasis,\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n let main = isDirectionRow ? width : height;\n // basis3种情况:auto、固定、content,只区分固定和其它\n let isFixed = [PX, PERCENT, REM, VW, VH, VMAX, VMIN].indexOf(flexBasis.u) > -1;\n if(isFixed) {\n b = max = min = this.__calSize(flexBasis, isDirectionRow ? w : h, true);\n }\n else if(([PX, PERCENT, REM, VW, VH, VMAX, VMIN].indexOf(main.u) > -1)) {\n b = max = min = this.__calSize(main, isDirectionRow ? w : h, true);\n }\n // 直接item的mpb影响basis\n return this.__addMBP(isDirectionRow, w, currentStyle, computedStyle, [b, min, max], isDirectChild);\n }\n\n __layout(data, isAbs, isColumn, isRow) {\n super.__layout(data, isAbs, isColumn, isRow);\n this.__layoutStyle();\n }\n\n __layoutBlock(data, isAbs, isColumn, isRow) {\n let { fixedWidth, fixedHeight, w, h, isParentVertical, isUpright } = this.__preLayout(data, false);\n let tw = 0, th = 0;\n if(fixedWidth || !isAbs && !isParentVertical && !isUpright) {\n tw = w;\n }\n if(fixedHeight || !isAbs && isParentVertical && isUpright) {\n th = h;\n }\n this.__ioSize(tw, th);\n if(isAbs || isColumn || isRow) {\n return;\n }\n this.__marginAuto(this.currentStyle, data);\n this.__cacheProps = {};\n }\n\n __layoutFlex(data, isAbs, isColumn, isRow) {\n // 无children所以等同于block\n this.__layoutBlock(data, isAbs, isColumn, isRow);\n }\n\n __layoutInline(data, isAbs, isInline) {\n let { fixedWidth, fixedHeight, w, h } = this.__preLayout(data, false);\n let tw = fixedWidth ? w : 0;\n let th = fixedHeight ? h : 0;\n this.__ioSize(tw, th);\n this.__cacheProps = {};\n }\n\n __calStyle(lv, __currentStyle, __computedStyle, __cacheStyle) {\n let res = super.__calStyle(lv, __currentStyle, __computedStyle, __cacheStyle);\n if(isNil(__cacheStyle[STROKE_WIDTH])) {\n __cacheStyle[STROKE_WIDTH] = true;\n let strokeWidth = __currentStyle[STROKE_WIDTH] || [];\n let w = this.width;\n __computedStyle[STROKE_WIDTH] = strokeWidth.map(item => {\n return this.__calSize(item, w, true);\n });\n }\n if(isNil(__cacheStyle[STROKE_DASHARRAY])) {\n __cacheStyle[STROKE_DASHARRAY] = true;\n __computedStyle[STROKE_DASHARRAY] = __currentStyle[STROKE_DASHARRAY] || [];\n __cacheStyle[STROKE_DASHARRAY_STR] = __computedStyle[STROKE_DASHARRAY].map(item => joinArr(item, ','));\n }\n // 直接赋值的\n [\n STROKE_LINECAP,\n STROKE_LINEJOIN,\n STROKE_MITERLIMIT,\n FILL_RULE,\n ].forEach(k => {\n __computedStyle[k] = __currentStyle[k];\n });\n // stroke/fll移至render里处理,因为cache涉及渐变坐标偏移\n [FILL, STROKE].forEach(k => {\n if(isNil(__cacheStyle[k])) {\n let v = __currentStyle[k];\n let cs = __computedStyle[k] = [];\n let res = __cacheStyle[k] = [];\n if(Array.isArray(v)) {\n v.forEach(item => {\n if(item && item.u === GRADIENT) {\n // let t = this.__gradient(renderMode, ctx, x3, y3, x4, y4, item[0], 0, 0);\n cs.push(item.v);\n res.push(true);\n }\n else if(item && item.u === RGBA && item.v[3] > 0) {\n cs.push(item.v);\n res.push(int2rgba(item.v));\n }\n else {\n cs.push('none');\n res.push('none');\n }\n });\n }\n }\n });\n return res;\n }\n\n calContent(currentStyle, computedStyle) {\n let res = super.calContent(currentStyle, computedStyle);\n this.__hasXomContent = res;\n let {\n [FILL]: fill,\n [STROKE]: stroke,\n [STROKE_WIDTH]: strokeWidth,\n } = computedStyle;\n let empty = true;\n for(let i = 0, len = fill.length; i < len; i++) {\n let item = fill[i];\n if(item.k || item[3] > 0) {\n empty = false;\n break;\n }\n }\n for(let i = 0, len = stroke.length; i < len; i++) {\n let item = stroke[i];\n if((item.k || item[3] > 0) && strokeWidth[i] > 0) {\n empty = false;\n break;\n }\n }\n // 矢量图形默认有内容\n if(!empty) {\n return true;\n }\n // 没有fill和stroke则认为矢量图形为空\n if(!res && empty) {\n return false;\n }\n return res;\n }\n\n __preSet(renderMode, res) {\n let { width, height, __cacheStyle, computedStyle } = this;\n let cx = res.x3 + width * 0.5;\n let cy = res.y3 + height * 0.5;\n let {\n [STROKE_DASHARRAY_STR]: strokeDasharrayStr,\n } = __cacheStyle;\n let {\n [FILL]: fill,\n [STROKE]: stroke,\n [STROKE_WIDTH]: strokeWidth,\n [STROKE_LINECAP]: strokeLinecap,\n [STROKE_LINEJOIN]: strokeLinejoin,\n [STROKE_MITERLIMIT]: strokeMiterlimit,\n [STROKE_DASHARRAY]: strokeDasharray,\n [FILL_RULE]: fillRule,\n } = computedStyle;\n stroke = stroke.map(item => {\n if(item.k) {\n return this.__gradient(renderMode, res.ctx, res.x3, res.y3, res.x4, res.y4, item, res.dx, res.dy);\n }\n return int2rgba(item);\n });\n fill = fill.map(item => {\n if(item.k) {\n return this.__gradient(renderMode, res.ctx, res.x3, res.y3, res.x4, res.y4, item, res.dx, res.dy);\n }\n return int2rgba(item);\n });\n return {\n cx,\n cy,\n stroke,\n strokeWidth,\n strokeDasharray,\n strokeDasharrayStr,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n fill,\n fillRule,\n };\n }\n\n __preSetCanvas(renderMode, ctx, res) {\n let {\n stroke,\n strokeWidth,\n strokeDasharray,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n fill,\n } = res;\n if(renderMode === mode.CANVAS) {\n if(fill) {\n if(fill.k === 'linear') {\n ctx.fillStyle = fill.v;\n }\n else if(fill.k === 'radial' && !Array.isArray(fill.v)) {\n ctx.fillStyle = fill.v;\n }\n else if(fill.k === 'conic') {\n //\n }\n else if(!fill.k && ctx.fillStyle !== fill) {\n ctx.fillStyle = fill;\n }\n }\n if(stroke) {\n if(stroke.k === 'linear') {\n ctx.strokeStyle = stroke.v;\n }\n else if(stroke.k === 'radial' && !Array.isArray(stroke.v)) {\n ctx.strokeStyle = stroke.v;\n }\n else if(stroke.k === 'conic') {\n //\n }\n else if(!stroke.k && ctx.strokeStyle !== stroke) {\n ctx.strokeStyle = stroke;\n }\n }\n if(strokeWidth !== undefined && ctx.lineWidth !== strokeWidth) {\n ctx.lineWidth = strokeWidth;\n }\n if(strokeLinecap !== undefined && ctx.lineCap !== strokeLinecap) {\n ctx.lineCap = strokeLinecap;\n }\n if(strokeLinejoin !== undefined && ctx.lineJoin !== strokeLinejoin) {\n ctx.lineJoin = strokeLinejoin;\n }\n if(strokeMiterlimit !== undefined && ctx.miterLimit !== strokeMiterlimit) {\n ctx.miterLimit = strokeMiterlimit;\n }\n // 小程序没这个方法\n if(util.isFunction(ctx.getLineDash)) {\n if(strokeDasharray && !util.equalArr(ctx.getLineDash(), strokeDasharray)) {\n ctx.setLineDash(strokeDasharray);\n }\n }\n else if(strokeDasharray) {\n ctx.setLineDash(strokeDasharray);\n }\n }\n }\n\n render(renderMode, ctx, dx, dy) {\n let res = super.render(renderMode, ctx, dx, dy);\n if(renderMode === mode.SVG) {\n this.virtualDom.type = 'geom';\n }\n // 无论canvas/svg,break可提前跳出省略计算\n if(res.break || renderMode === mode.WEBGL) {\n return res;\n }\n // data在无cache时没有提前设置\n let preData = this.__preSet(renderMode, res);\n return Object.assign(res, preData);\n }\n\n __renderPolygon(renderMode, ctx, res) {\n let {\n fill: fills,\n fillRule: fillRules,\n stroke: strokes,\n strokeWidth: strokeWidths,\n strokeDasharray: strokeDasharrays,\n strokeDasharrayStr: strokeDasharrayStrs,\n strokeLinecap: strokeLinecaps,\n strokeLinejoin: strokeLinejoins,\n strokeMiterlimit: strokeMiterlimits,\n dx,\n dy,\n } = res;\n let { __cacheProps: { list }, isMulti, bbox } = this;\n // 普通情况下只有1个,按普通情况走\n if(fills.length <= 1 && strokes.length <= 1) {\n let o = {\n fill: fills[0],\n fillRule: fillRules[0],\n stroke: strokes[0],\n strokeWidth: strokeWidths[0],\n strokeDasharray: strokeDasharrays[0],\n strokeDasharrayStr: strokeDasharrayStrs[0],\n strokeLinecap: strokeLinecaps[0],\n strokeLinejoin: strokeLinejoins[0],\n strokeMiterlimit: strokeMiterlimits[0],\n dx,\n dy,\n bbox,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, o);\n }\n // 多个需要fill在下面,stroke在上面,依次循环\n else {\n for(let i = 0, len = fills.length; i < len; i++) {\n let fill = fills[i];\n if(fill) {\n let o = {\n fill,\n fillRule: fillRules[i],\n dx,\n dy,\n bbox,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, o);\n }\n }\n for(let i = 0, len = strokes.length; i < len; i++) {\n let stroke = strokes[i];\n if(stroke) {\n let o = {\n stroke,\n strokeWidth: strokeWidths[i],\n strokeDasharray: strokeDasharrays[i],\n strokeDasharrayStr: strokeDasharrayStrs[i],\n strokeLinecap: strokeLinecaps[i],\n strokeLinejoin: strokeLinejoins[i],\n strokeMiterlimit: strokeMiterlimits[i],\n dx,\n dy,\n bbox,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, o);\n }\n }\n }\n }\n\n __renderOnePolygon(renderMode, ctx, isMulti, list, res) {\n let {\n fill,\n stroke,\n strokeWidth,\n } = res;\n let isFillCE = fill && fill.k === 'conic';\n let isStrokeCE = stroke && stroke.k === 'conic';\n // 椭圆是array\n let isFillRE = fill && fill.k === 'radial' && Array.isArray(fill.v);\n let isStrokeRE = strokeWidth && strokeWidth > 0 && stroke && stroke.k === 'radial' && Array.isArray(stroke.v);\n if(isFillCE || isStrokeCE) {\n if(isFillCE) {\n this.__conicGradient(renderMode, ctx, list, isMulti, res);\n }\n else if(fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n if(strokeWidth && strokeWidth > 0 && isStrokeCE) {\n inject.warn('Stroke style can not use conic-gradient');\n }\n else if(strokeWidth && strokeWidth > 0 && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, false, true);\n }\n }\n else if(isFillRE || isStrokeRE) {\n if(isFillRE) {\n this.__radialEllipse(renderMode, ctx, list, isMulti, res, 'fill');\n }\n else if(fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n // stroke椭圆渐变matrix会变形,降级为圆\n if(strokeWidth && strokeWidth > 0 && isStrokeRE) {\n inject.warn('Stroke style can not use radial-gradient for ellipse');\n res.stroke.v = res.stroke.v[0];\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, false, true);\n }\n else if(strokeWidth && strokeWidth > 0 && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, false, true);\n }\n }\n else {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true, true);\n }\n }\n\n __drawPolygon(renderMode, ctx, isMulti, list, res, isFill, isStroke) {\n let {\n fill,\n stroke,\n strokeWidth,\n fillRule,\n strokeDasharrayStr,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n dx,\n dy,\n } = res;\n if(renderMode === mode.CANVAS) {\n this.__preSetCanvas(renderMode, ctx, res);\n ctx.beginPath();\n if(isMulti) {\n list.forEach(item => canvasPolygon(ctx, item, dx, dy));\n }\n else {\n canvasPolygon(ctx, list, dx, dy);\n }\n if(isFill && fill && fill !== 'none') {\n ctx.fill(fillRule);\n }\n if(isStroke && stroke && stroke !== 'none' && strokeWidth && strokeWidth > 0) {\n ctx.stroke();\n }\n ctx.closePath();\n }\n else if(renderMode === mode.SVG) {\n let d = '';\n if(isMulti) {\n list.forEach(item => d += svgPolygon(item));\n }\n else {\n d = svgPolygon(list);\n }\n let props = [\n ['d', d],\n ];\n // 2个都没有常出现在多fill/stroke时,也有可能特殊单个故意这样写的\n if((!fill || fill === 'none') && (!stroke || stroke === 'none')) {\n return;\n }\n if(isFill && fill && fill !== 'none') {\n props.push(['fill', fill.v || fill]);\n if(fillRule && fillRule !== 'nonzero') { // evenodd\n props.push(['fill-rule', fillRule]);\n }\n }\n else {\n props.push(['fill', 'none']);\n }\n if(isStroke && stroke && stroke !== 'none' && strokeWidth && strokeWidth > 0) {\n props.push(['stroke', stroke.v || stroke]);\n props.push(['stroke-width', strokeWidth]);\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n }\n else {\n props.push(['stroke-width', 0]);\n }\n this.addGeom('path', props);\n }\n }\n\n __inversePtList(list, isMulti, t, dx = 0, dy = 0) {\n if(isMulti) {\n return list.map(item => {\n if(!item || !item.length) {\n return null;\n }\n return item.map(item => {\n if(!item || !item.length) {\n return null;\n }\n let arr = [];\n for(let i = 0, len = item.length; i < len; i += 2) {\n let p = mx.calPoint({ x: item[i] + dx, y: item[i + 1] + dy }, t);\n arr.push(p.x);\n arr.push(p.y);\n }\n return arr;\n });\n });\n }\n else {\n return list.map(item => {\n if(!item || !item.length) {\n return null;\n }\n let arr = [];\n for(let i = 0, len = item.length; i < len; i += 2) {\n let p = mx.calPoint({ x: item[i] + dx, y: item[i + 1] + dy }, t);\n arr.push(p.x);\n arr.push(p.y);\n }\n return arr;\n });\n }\n }\n\n __radialEllipse(renderMode, ctx, list, isMulti, res, method) {\n let {\n strokeWidth,\n strokeDasharrayStr,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n dx,\n dy,\n } = res;\n let [color, matrix, cx, cy] = res[method].v;\n // 椭圆渐变的转换,顶点逆矩阵变换\n matrix = transform.calMatrixByOrigin(matrix, cx, cy);\n let t = mx.inverse(matrix);\n list = this.__inversePtList(list, isMulti, t, dx, dy);\n // 用正向matrix渲染\n if(renderMode === mode.CANVAS) {\n if(matrix) {\n ctx.save();\n // 获取当前matrix,在webgl中为E,在canvas中分无cache和有cache模式\n let me = ctx.getTransform();\n me = [me.a, me.b, 0, 0, me.c, me.d, 0, 0, 0, 0, 1, 0, me.e, me.f, 1, 0];\n matrix = mx.multiply(me, matrix);\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n }\n ctx.beginPath();\n if(ctx[method + 'Style'] !== color) {\n ctx[method + 'Style'] = color;\n }\n if(isMulti) {\n list.forEach(item => painter.canvasPolygon(ctx, item));\n }\n else {\n canvasPolygon(ctx, list);\n }\n ctx[method]();\n ctx.closePath();\n if(matrix) {\n ctx.restore();\n }\n }\n else if(renderMode === mode.SVG) {\n let d = '';\n if(isMulti) {\n list.forEach(item => d += svgPolygon(item));\n }\n else {\n d = svgPolygon(list);\n }\n let props = [\n ['d', d],\n ];\n if(method === 'fill') {\n props.push(['fill', color]);\n props.push(['strokeWidth', 0]);\n }\n else if(method === 'stroke') {\n props.push(['fill', 'none']);\n props.push(['stroke', color]);\n props.push(['stroke-width', strokeWidth]);\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n }\n props.push(['transform', `matrix(${joinArr(mx.m2m6(matrix), ',')})`]);\n this.addGeom('path', props);\n }\n }\n\n __conicGradient(renderMode, ctx, list, isMulti, res) {\n let {\n fill,\n bbox,\n dx = 0,\n dy = 0,\n } = res;\n let color = fill.v;\n if(renderMode === mode.CANVAS) {\n let [x1, y1, x2, y2] = bbox;\n let w = x2 - x1, h = y2 - y1;\n let offscreen = inject.getOffscreenCanvas(w, h, '__$$CONIC_GRADIENT$$__', null);\n let imgData = offscreen.ctx.getImageData(0,0, w, h);\n gradient.getConicGradientImage(w * 0.5, h * 0.5, w, h, fill.v.stop, imgData.data);\n offscreen.ctx.putImageData(imgData, 0, 0);\n if(isMulti) {\n list.forEach(item => {\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, item, dx, dy);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(offscreen.canvas, x1 + dx, y1 + dy);\n ctx.restore();\n });\n }\n else {\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, list, dx, dy);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(offscreen.canvas, x1 + dx, y1 + dy);\n ctx.restore();\n }\n offscreen.ctx.clearRect(0, 0, w, h);\n }\n else if(renderMode === mode.SVG) {\n if(isMulti) {\n list.forEach(item => {\n let v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(item)],\n ],\n }],\n };\n let clip = ctx.add(v);\n this.__cacheDefs.push(v);\n color.forEach(item => {\n this.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(item[0])],\n ['fill', item[1]],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n });\n });\n }\n else {\n let v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(list)],\n ],\n }],\n };\n let clip = ctx.add(v);\n this.__cacheDefs.push(v);\n color.forEach(item => {\n this.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(item[0])],\n ['fill', item[1]],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n });\n }\n }\n }\n\n __propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit) {\n if(strokeDasharrayStr) {\n props.push(['stroke-dasharray', strokeDasharrayStr]);\n }\n if(strokeLinecap && strokeLinecap !== 'butt') {\n props.push(['stroke-linecap', strokeLinecap]);\n }\n if(strokeLinejoin && strokeLinejoin !== 'miter') {\n props.push(['stroke-linejoin', strokeLinejoin]);\n }\n if(strokeMiterlimit && strokeMiterlimit !== 4) {\n props.push(['stroke-miterlimit', strokeMiterlimit]);\n }\n }\n\n // offset/resize时要多一步清空props上记录的缓存\n __offsetX(diff, isLayout, lv) {\n super.__offsetX(diff, isLayout, lv);\n if(lv && lv >= level.REFLOW) {\n this.__cacheProps = {};\n }\n }\n\n __offsetY(diff, isLayout, lv) {\n super.__offsetY(diff, isLayout, lv);\n if(lv && lv >= level.REFLOW) {\n this.__cacheProps = {};\n }\n }\n\n __resizeX(diff, lv) {\n super.__resizeX(diff, lv);\n if(lv && lv >= level.REFLOW) {\n this.__cacheProps = {};\n }\n }\n\n __resizeY(diff, lv) {\n super.__resizeY(diff, lv);\n if(lv && lv >= level.REFLOW) {\n this.__cacheProps = {};\n }\n }\n\n addGeom(tagName, props) {\n props = util.hash2arr(props);\n this.virtualDom.children.push({\n type: 'item',\n tagName,\n props,\n });\n }\n\n getProps(k) {\n let v = this.currentProps[k];\n if(!isNil(v)) {\n return v;\n }\n return this['__' + k];\n }\n\n __isRealInline() {\n return false;\n }\n\n get isMulti() {\n return this.__isMulti;\n }\n\n get currentProps() {\n return this.__currentProps;\n }\n\n static get REGISTER() {\n return REGISTER;\n }\n\n static getRegister(name) {\n if(name && !util.isString(name) && name.prototype && name.prototype instanceof Geom) {\n return name;\n }\n if(!name || !util.isString(name) || name.charAt(0) !== '$') {\n throw new Error('Invalid param');\n }\n if(!REGISTER.hasOwnProperty(name)) {\n throw new Error(`Geom has not register: ${name}`);\n }\n return REGISTER[name];\n }\n\n static register(name, obj) {\n if(!name || !util.isString(name) || name.charAt(0) !== '$'\n || !obj.prototype || !(obj.prototype instanceof Geom)) {\n throw new Error('Invalid param');\n }\n if(Geom.hasRegister(name)) {\n throw new Error(`Geom has already register: ${name}`);\n }\n REGISTER[name] = obj;\n }\n\n static hasRegister(name) {\n return name && REGISTER.hasOwnProperty(name);\n }\n\n static delRegister(name) {\n if(Geom.hasRegister(name)) {\n delete REGISTER[name];\n }\n }\n}\n\nexport default Geom;\n","import enums from '../util/enums';\nimport unit from '../style/unit';\nimport level from './level';\nimport css from '../style/css';\nimport Text from '../node/Text';\nimport Component from '../node/Component';\nimport Geom from '../node/geom/Geom';\nimport mode from './mode';\n\nconst {\n STYLE_KEY: {\n DISPLAY,\n TOP,\n BOTTOM,\n POSITION,\n WIDTH,\n HEIGHT,\n MARGIN_TOP,\n MARGIN_BOTTOM,\n MARGIN_LEFT,\n BORDER_TOP_WIDTH,\n PADDING_TOP,\n BORDER_LEFT_WIDTH,\n PADDING_LEFT,\n },\n} = enums;\nconst { AUTO, PX, REM, VW, VH, VMAX, VMIN, PERCENT } = unit;\nconst { REPAINT, REFLOW, CACHE } = level;\nconst { isRelativeOrAbsolute } = css;\n\nfunction clearSvgCache(node, child) {\n if(child) {\n node.__refreshLevel |= REPAINT;\n }\n else {\n node.__refreshLevel |= CACHE;\n }\n if(Array.isArray(node.children)) {\n node.children.forEach(child => {\n if(child instanceof Component) {\n child = child.shadowRoot;\n }\n clearSvgCache(child, true);\n });\n }\n}\n\n// 合并margin,和原本不合并情况下的差值\nfunction getMergeMargin(topList, bottomList) {\n let total = 0;\n let max = topList[0] || 0;\n let min = topList[0] || 0;\n topList.forEach(item => {\n total += item;\n max = Math.max(max, item);\n min = Math.min(min, item);\n });\n bottomList.forEach(item => {\n total += item;\n max = Math.max(max, item);\n min = Math.min(min, item);\n });\n // 正数取最大,负数取最小,正负则相加\n let target = 0;\n if(max > 0 && min > 0) {\n target = Math.max(max, min);\n }\n else if(max < 0 && min < 0) {\n target = Math.min(max, min);\n }\n else if(max !== 0 || min !== 0) {\n target = max + min;\n }\n return {\n target, // 应该的目标margin\n total, // 累计的margin\n diff: target - total,\n };\n}\n\n// 提取出对比节点尺寸是否固定非AUTO\nfunction isFixedWidthOrHeight(node, k) {\n let c = node.currentStyle[k];\n return c.u !== AUTO;\n}\n// 除了固定尺寸,父级也不能是flex\nfunction isFixedSize(node, includeParentFlex) {\n let res = isFixedWidthOrHeight(node, WIDTH) && isFixedWidthOrHeight(node, HEIGHT);\n if(res && includeParentFlex) {\n let parent = node.__domParent;\n if(parent) {\n if(parent.computedStyle[DISPLAY] === 'flex') {\n return false;\n }\n }\n }\n return res;\n}\n\nfunction getPrevMergeMargin(prev, mtList, mbList) {\n while(prev && !(prev instanceof Text)\n && !(prev instanceof Component && prev.shadowRoot instanceof Text)\n && ['block', 'flex'].indexOf(prev.computedStyle[DISPLAY]) > -1\n && prev.computedStyle[POSITION] !== 'absolute') {\n mbList.push(prev.computedStyle[MARGIN_BOTTOM]);\n if(prev.offsetHeight > 0) {\n break;\n }\n mtList.push(prev.computedStyle[MARGIN_TOP]);\n prev = prev.__prev;\n }\n}\n\nfunction getNextMergeMargin(next, mtList, mbList) {\n while(next && !(next instanceof Text)\n && !(next instanceof Component && next.shadowRoot instanceof Text)\n && ['block', 'flex'].indexOf(next.computedStyle[DISPLAY]) > -1\n && next.computedStyle[POSITION] !== 'absolute') {\n mtList.push(next.computedStyle[MARGIN_TOP]);\n if(next.offsetHeight > 0) {\n break;\n }\n mbList.push(next.computedStyle[MARGIN_BOTTOM]);\n next = next.__next;\n }\n}\n\nfunction offsetNext(next, diff, parentFixed, absList) {\n while(next) {\n let cs = next.currentStyle;\n // flow流和auto/px/rem的absolute流需要偏移diff值\n if(cs[POSITION] !== 'absolute'\n || (cs[TOP].u === AUTO && cs[BOTTOM].u === AUTO\n || cs[TOP].u === AUTO && [PX, REM, VW, VH, VMAX, VMIN].indexOf(cs[BOTTOM].u) > -1)) {\n next.__offsetY(diff, true, REFLOW);\n }\n // absolute中百分比的特殊计算偏移,但要排除parent固定尺寸\n else if(!parentFixed && cs[POSITION] === 'absolute'\n && (cs[TOP].u === PERCENT || cs[BOTTOM].u === PERCENT)) {\n if(cs[TOP].u === PERCENT) {\n next.__offsetY(diff * 0.01 * cs[TOP].v, true, REFLOW);\n }\n else {\n next.__offsetY(diff * (1 - 0.01 * cs[BOTTOM].v), true, REFLOW);\n }\n }\n // abs的percent调整,记录\n if(!(cs instanceof Text) && !(cs instanceof Component && cs.shadowRoot instanceof Text)) {\n if(cs[POSITION] === 'absolute' && cs[HEIGHT].u === PERCENT) {\n absList.push(next);\n }\n }\n next = next.__next;\n }\n return diff;\n}\n\n/**\n * 单独提出共用检测影响的函数,从节点本身开始向上分析影响,找到最上层的影响节点设置其重新布局\n * ---\n * 当一个元素absolute时,其变化不会影响父元素和兄弟元素,直接自己重新layout\n * 当absolute发生改变时,其变化会影响父和兄弟,视作父重新布局\n * 当inline变化时,视为其最近block/flex父变化\n * 当block/flex变化时,往上查找最上层flex视为其变化,如没有flex则影响后面兄弟offset和父resize\n * 以上情况向上查找时遇到父absolute均提前跳出,并layout\n * 上面所有情况即便结束还得额外看是否处于absolute中,是还是标记absolute重新布局\n * 当relative只变化left/top/right/bottom时,自己重新layout\n * ===\n * 返回最上层节点,可能为node自己\n */\nfunction checkTop(root, node, addDom, removeDom) {\n if(root === node) {\n return root;\n }\n if(node instanceof Text) {\n node = node.__domParent;\n }\n // add/remove情况abs节点特殊对待不影响其它节点,不能判断display,因为inline会强制block\n if(addDom && node.currentStyle[POSITION] === 'absolute') {\n return node;\n }\n if(removeDom && node.computedStyle[POSITION] === 'absolute') {\n return node;\n }\n let target = node;\n // add/remove的相邻出现inline的话,视为父节点reflow\n if(addDom || removeDom) {\n let isSiblingBlock = true;\n let { __prev, __next } = node;\n if(__prev\n && (__prev instanceof Text\n || ['inline', 'inlineBlock'].indexOf(__prev.computedStyle[DISPLAY]) > -1)) {\n isSiblingBlock = false;\n }\n else if(__next\n && (__next instanceof Text\n || ['inline', 'inlineBlock'].indexOf(__next.computedStyle[DISPLAY]) > -1)) {\n isSiblingBlock = false;\n }\n if(!isSiblingBlock) {\n target = node.__domParent;\n if(target === root) {\n return root;\n }\n }\n }\n // 如果一直是absolute,则不影响其它节点\n if(target.currentStyle[POSITION] === 'absolute' && target.computedStyle[POSITION] === 'absolute') {\n return target;\n }\n // inline节点变为最近的父非inline,自身可能会display变化前后状态都要看,\n // absolute不变会影响但被上面if排除,而absolute发生变化则也需要进入这里\n if(['inline', 'inlineBlock'].indexOf(target.currentStyle[DISPLAY]) > -1\n || ['inline', 'inlineBlock'].indexOf(target.computedStyle[DISPLAY]) > -1) {\n do {\n target = target.__domParent;\n if(target === root) {\n return root;\n }\n }\n // 父节点不会display变化,因为同步检测,只看computedStyle即可\n while(['inline', 'inlineBlock'].indexOf(target.computedStyle[DISPLAY]) > -1\n && target.computedStyle[POSITION] !== 'absolute');\n // target已不是inline,父固定宽高跳出直接父进行LAYOUT即可,不影响上下文,但不能是flex孩子,此时固定尺寸无用\n // root也会进这里,因为root强制固定size\n if(isFixedSize(target, true)) {\n return target;\n }\n }\n // 此时target指向node,如果是inline/absolute变化则是其最近的非inline父\n let parent = target;\n // 向上检查flex/absolute/fixedSize,以最上层的flex视作其更改,node本身flex不进入\n let top;\n do {\n if(parent === root) {\n break;\n }\n if(parent.computedStyle[DISPLAY] === 'flex') {\n top = parent;\n }\n // 遇到固定size提前跳出,以及absolute也是\n if(parent.computedStyle[POSITION] === 'absolute' || isFixedSize(parent, true)) {\n break;\n }\n parent = parent.__domParent;\n }\n while(parent);\n // 找到最上层flex,视作其更改\n if(top) {\n target = top;\n }\n return target;\n}\n\n/**\n * checkReflow之后,节点重新布局对自己next的节点的offset影响,计算偏移量让所有next兄弟offsetY,\n * 以及递归向上父级resize和父级所有next兄弟offsetY\n */\nfunction checkNext(root, top, node, hasZ, addDom, removeDom) {\n let cps = top.computedStyle, crs = top.currentStyle;\n let position = cps[POSITION], display = cps[DISPLAY];\n let isLastAbs = position === 'absolute';\n let isNowAbs = crs[POSITION] === 'absolute';\n let isLastNone = display === 'none';\n let isNowNone = crs[DISPLAY] === 'none';\n let isLast0 = top.offsetHeight === 0;\n // none不可见布局无效可以无视,add/remove已提前判断,none时不会进来\n if(isLastNone && isNowNone) {\n return;\n }\n let parent = top.__domParent, oldH = top.offsetHeight;\n // svg在特殊children顺序变化的情况需清除缓存以便diff运行\n // add/remove已提前自己做好,zIndex有效变化也触发,position变更static和非static触发\n let svg = root.renderMode === mode.SVG;\n if(!addDom && !removeDom) {\n if(hasZ && position === 'static' && crs[POSITION] === 'static') {\n hasZ = false;\n }\n else if(position !== crs[POSITION] && (position === 'static' || crs[POSITION] === 'static')) {\n hasZ = true;\n }\n // 特殊,zIndexChildren不变化但影响svg的diff\n else if(isLastNone !== isNowNone && !hasZ) {\n svg && clearSvgCache(parent, false);\n }\n }\n else {\n hasZ = false;\n }\n // remove自身且abs时不影响其它,除了svg的zIndex\n if(removeDom && top === node && node.computedStyle[POSITION] === 'absolute') {\n top.clearCache(true);\n svg && clearSvgCache(parent, false);\n return;\n }\n // 后续调整offsetY需要考虑mergeMargin各种情况(包含上下2个方向),之前合并前和合并后的差值都需记录\n // 先记录没更新前的,如果是空节点则m1作为整个,忽视m2\n let t1 = 0, d1 = 0, t2 = 0, d2 = 0;\n let mbList = [], mtList = [];\n let prev = top.isShadowRoot ? top.__hostRoot.__prev : top.__prev;\n let next = top.isShadowRoot ? top.__hostRoot.__next : top.__next;\n if(addDom || isLast0) {\n getPrevMergeMargin(prev, mtList, mbList);\n getNextMergeMargin(next, mtList, mbList);\n if(!addDom) {\n mtList.push(cps[MARGIN_TOP]);\n mbList.push(cps[MARGIN_BOTTOM]);\n }\n let t = getMergeMargin(mtList, mbList);\n t1 = t.target;\n d1 = t.diff;\n }\n else {\n getPrevMergeMargin(prev, mtList, mbList);\n mtList.push(cps[MARGIN_TOP]);\n let t = getMergeMargin(mtList, mbList);\n t1 = t.target;\n d1 = t.diff;\n mtList.splice(0);\n mbList.splice(0);\n getNextMergeMargin(next, mtList, mbList);\n mbList.push(cps[MARGIN_BOTTOM]);\n t = getMergeMargin(mtList, mbList);\n t2 = t.target;\n d2 = t.diff;\n }\n // __layoutData使用prev或者父节点,并重新计算y(不包含合并margin),因为display:none或add的无数据或不对\n let __layoutData = parent.__layoutData;\n let x = __layoutData.x;\n let y = __layoutData.y;\n let w = parent.__width;\n let h = parent.__currentStyle[HEIGHT].u === AUTO ? __layoutData.h : parent.__height;\n let current = top;\n // cp的shadowRoot要向上到cp本身,考虑高阶组件在内到真正的顶层cp\n if(current.isShadowRoot) {\n current = current.__hostRoot;\n }\n // y使用prev或者parent的,首个节点无prev,prev要忽略absolute的和display:none的\n let ref = current.__prev;\n let hasFlowPrev;\n while(ref) {\n // 注意有可能是text,视为其父级\n let computedStyle = ref.computedStyle;\n if(computedStyle[POSITION] !== 'absolute' && computedStyle[DISPLAY] !== 'none') {\n y = ref.y + ref.outerHeight;\n hasFlowPrev = true;\n break;\n }\n ref = ref.__prev;\n }\n // 找不到prev以默认parent的为基准,找到则增加自身,排除remove\n let __computedStyle = parent.__computedStyle;\n if(!hasFlowPrev) {\n y += __computedStyle[MARGIN_TOP] + __computedStyle[BORDER_TOP_WIDTH] + __computedStyle[PADDING_TOP];\n }\n x += __computedStyle[MARGIN_LEFT] + __computedStyle[BORDER_LEFT_WIDTH] + __computedStyle[PADDING_LEFT];\n // 特殊的如add/remove时为absolute和none的在调用时即检查提前跳出了,不触发reflow,这里一定是触发的\n // 找到最上层容器供absolute使用,注意top本身是否abs的区别,非abs可能为relative)\n let container = isNowAbs ? parent : top;\n while(container && container !== root) {\n if(isRelativeOrAbsolute(container)) {\n break;\n }\n container = container.__domParent;\n }\n if(!container) {\n container = root;\n }\n // 删除的节点的影响top是自己,无需重新布局只要看next节点的offsetY\n if(removeDom && top === node) {\n }\n // 一定不是add/remove,同步操作提前判断\n else if(isNowNone) {\n top.__layoutNone();\n if(hasZ) {\n parent.__zIndexChildren = null;\n parent.__updateStruct();\n svg && clearSvgCache(parent, false);\n }\n }\n // 现在是定位流,还要看之前是什么\n else if(isNowAbs) {\n parent.__layoutAbs(container, __layoutData, top);\n if(hasZ) {\n parent.__zIndexChildren = null;\n parent.__updateStruct();\n svg && clearSvgCache(parent, false);\n }\n // add/remove的zIndex已提前做好无需关心,只看普通变更\n if(!addDom && !removeDom) {\n // 之前也是abs,可以跳出不会影响其它只看zIndex即可\n if(isLastAbs) {\n top.clearCache(true);\n return;\n }\n }\n }\n // 现在是普通流,不管之前是啥直接布局\n else {\n let ld = Object.assign({}, addDom ? __layoutData : top.__layoutData, {\n x,\n y,\n w,\n h,\n });\n top.__layout(ld, false, false, false);\n // 防止Geom\n if(!(top instanceof Geom)) {\n top.__layoutAbs(container, ld, null);\n }\n if(hasZ) {\n parent.__zIndexChildren = null;\n parent.__updateStruct();\n svg && clearSvgCache(parent, false);\n }\n }\n // add的情况在自身是abs时不影响next,除了svg的zIndex\n if(addDom && top === node && node.currentStyle[POSITION] === 'absolute') {\n top.clearCache(true);\n svg && clearSvgCache(parent, false);\n return;\n }\n // 向上查找最近的relative的parent,获取ox/oy并赋值,无需继续向上递归,因为parent已经递归包含了\n let p = parent;\n while(p) {\n if(p.__computedStyle[POSITION] === 'relative') {\n let { ox, oy } = p;\n ox && top.__offsetX(ox, false, null);\n oy && top.__offsetY(oy, false, null);\n break;\n }\n p = p.__domParent;\n }\n // 高度不变一直0提前跳出,不影响包含margin合并,但需排除节点add/remove,因为空节点会上下穿透合并\n let isNow0 = removeDom && top === node || top.offsetHeight === 0;\n // 几种忽略的情况\n if(addDom && isNow0 || removeDom && isLast0) {\n top.clearCache(true);\n return;\n }\n // 查看现在的上下margin合并情况,和之前的对比得出diff差值进行offsetY/resizeY\n if(top.isShadowRoot) {\n top = top.__hostRoot;\n }\n let t3 = 0, d3 = 0, t4 = 0, d4 = 0;\n mbList.splice(0);\n mtList.splice(0);\n if(removeDom || isNow0) {\n getPrevMergeMargin(prev, mtList, mbList);\n getNextMergeMargin(next, mtList, mbList);\n if(!removeDom) {\n mtList.push(cps[MARGIN_TOP]);\n mbList.push(cps[MARGIN_BOTTOM]);\n }\n let t = getMergeMargin(mtList, mbList);\n t3 = t.target;\n d3 = t.diff;\n }\n else {\n getPrevMergeMargin(prev, mtList, mbList);\n mtList.push(cps[MARGIN_TOP]);\n let t = getMergeMargin(mtList, mbList);\n t3 = t.target;\n d3 = t.diff;\n mtList.splice(0);\n mbList.splice(0);\n getNextMergeMargin(next, mtList, mbList);\n mbList.push(cps[MARGIN_BOTTOM]);\n t = getMergeMargin(mtList, mbList);\n t4 = t.target;\n d4 = t.diff;\n }\n let nowH;\n if(removeDom) {\n // remove有没有向上影响,决定布局后的高度nowH\n let isRemoveSelf = top === node || node.isShadowRoot && node.__hostRoot === top;\n if(isRemoveSelf) {\n nowH = 0;\n }\n else {\n nowH = top.offsetHeight;\n }\n }\n else if(isNowAbs) {\n nowH = 0;\n }\n else {\n nowH = top.offsetHeight;\n }\n // 查看mergeMargin对top造成的偏移\n if(!removeDom && d3) {\n top.__offsetY(d3, true, REFLOW);\n }\n // 差值计算注意考虑margin合并前的值,和合并后的差值,height使用offsetHeight不考虑margin\n let diff = t3 + t4 - t1 - t2 + nowH - oldH;\n // console.log('t3', t3, 'd3', d3, 't4', t4, 'd4', d4, 't1', t1, 'd1', d1, 't2', t2, 'd2', d2, nowH, oldH, diff);\n if(!diff) {\n top.clearCache(true);\n return;\n }\n let parentFixed = isFixedWidthOrHeight(parent, HEIGHT);\n if(!parentFixed) {\n parent.__resizeY(diff, REFLOW);\n }\n // 调整的同时遇到百分比高度的abs需记录下来最后重新布局\n let absList = [];\n offsetNext(next, diff, parentFixed, absList);\n top.clearCache(true);\n // 影响完next之后,向上递归,所有parent的next都影响,遇到固定尺寸或absolute跳出\n while(parent && !parentFixed && parent.__computedStyle[POSITION] !== 'absolute') {\n next = parent.__next;\n parent = parent.__domParent;\n parentFixed = parent && isFixedWidthOrHeight(parent, HEIGHT);\n if(!parentFixed) {\n parent.__resizeY(diff, REFLOW);\n }\n offsetNext(next, diff, parentFixed, absList);\n if(parentFixed) {\n parent.clearCache(false);\n }\n }\n // 记录的受影响的abs节点,都是百分比高度,需重新布局\n absList.forEach(item => {\n let ld = item.__layoutData, container = ld.container;\n item.__domParent.__layoutAbs(container, ld, item);\n });\n}\n\nexport default {\n getMergeMargin,\n checkTop,\n checkNext,\n clearSvgCache,\n};\n","import Xom from './Xom';\nimport Node from './Node';\nimport Text from './Text';\nimport Component from './Component';\nimport util from '../util/util';\n\n/**\n * 打平children,多维嵌套的数组变成一维\n */\nfunction buildChildren(parent, children) {\n let list = [];\n flatten(parent, children, list);\n return list;\n}\n\nfunction flatten(parent, children, list) {\n if(Array.isArray(children)) {\n children.forEach(item => {\n flatten(parent, item, list);\n });\n }\n else if(children instanceof Xom) {\n if(['canvas', 'svg', 'webgl'].indexOf(children.tagName) > -1) {\n throw new Error('Can not nest canvas/svg/webgl');\n }\n children.__parent = parent;\n list.push(children);\n }\n else if(children instanceof Component) {\n children.__parent = parent;\n list.push(children);\n }\n else if(!util.isNil(children) && children !== '') {\n let t = new Text(children);\n t.__parent = parent;\n list.push(t);\n }\n}\n\n/**\n * 设置关系,父子和兄弟,被添加到真实dom中前调用\n */\nfunction relation(root, host, parent, children, options = {}) {\n if(Array.isArray(children)) {\n children.forEach(item => {\n relation(root, host, parent, item, options);\n });\n }\n else if(children instanceof Xom || children instanceof Component || children instanceof Text) {\n children.__root = root;\n children.__parent = parent;\n children.__domParent = parent;\n children.__isDestroyed = false;\n if(options.prev) {\n options.prev.__next = children;\n children.__prev = options.prev;\n }\n options.prev = children;\n if(!(children instanceof Text)) {\n let ref = children.props.ref;\n if(util.isString(ref) && ref || util.isNumber(ref)) {\n host.ref[ref] = children;\n }\n else if(ref && util.isFunction(ref)) {\n ref(children);\n }\n }\n if(children instanceof Xom && children.__children) {\n relation(root, host, children, children.__children, {});\n }\n else if(children instanceof Component) {\n let sr = children.render();\n let hoc = [];\n while(sr && sr instanceof Component) {\n hoc.push(sr);\n let res = sr.render();\n if(res) {\n sr.__shadow = res;\n res.__host = sr;\n }\n sr = res;\n }\n if(!(sr instanceof Node)) {\n sr = new Text(sr);\n }\n if(hoc.length) {\n children.__shadow = hoc[0];\n hoc[0].__host = children;\n hoc.forEach(item => {\n item.__shadowRoot = sr;\n item.__hostRoot = children;\n item.__root = root;\n item.__domParent = parent;\n });\n }\n else {\n children.__shadow = sr;\n sr.__host = children;\n }\n children.__shadowRoot = sr;\n sr.__hostRoot = children;\n sr.__root = root;\n sr.__domParent = parent;\n sr.__isDestroyed = false;\n children.__init();\n if(sr instanceof Xom && sr.__children) {\n relation(root, children, sr, sr.__children, {});\n }\n }\n }\n return children;\n}\n\n// 设置每个节点root引用,组件初始化\nfunction buildRoot(root, children) {\n root.__root = root;\n root.__host = root;\n relation(root, root, root, children, {});\n}\n\nexport default {\n buildChildren,\n buildRoot,\n relation,\n};\n","import Xom from './Xom';\nimport Text from './Text';\nimport Node from './Node';\nimport LineBoxManager from './LineBoxManager';\nimport Component from './Component';\nimport tag from './tag';\nimport TextBox from './TextBox';\nimport Ellipsis from './Ellipsis';\nimport reset from '../style/reset';\nimport css from '../style/css';\nimport unit from '../style/unit';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport reflow from '../refresh/reflow';\nimport builder from './builder';\nimport mode from '../refresh/mode';\nimport level from '../refresh/level';\nimport geom from '../math/geom';\nimport mx from '../math/matrix';\n\nconst {\n STYLE_KEY: {\n POSITION,\n DISPLAY,\n MARGIN_LEFT,\n MARGIN_TOP,\n MARGIN_RIGHT,\n MARGIN_BOTTOM,\n PADDING_LEFT,\n PADDING_BOTTOM,\n PADDING_RIGHT,\n PADDING_TOP,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_LEFT_WIDTH,\n TOP,\n RIGHT,\n BOTTOM,\n LEFT,\n WIDTH,\n HEIGHT,\n TEXT_ALIGN,\n FLEX_DIRECTION,\n FLEX_BASIS,\n FLEX_SHRINK,\n FLEX_GROW,\n ALIGN_SELF,\n ALIGN_ITEMS,\n JUSTIFY_CONTENT,\n Z_INDEX,\n WHITE_SPACE,\n LINE_HEIGHT,\n LINE_CLAMP,\n ORDER,\n FLEX_WRAP,\n ALIGN_CONTENT,\n OVERFLOW,\n FONT_SIZE,\n FONT_FAMILY,\n FONT_WEIGHT,\n WRITING_MODE,\n },\n ELLIPSIS,\n} = enums;\nconst { AUTO, PX, PERCENT, REM, VW, VH, VMAX, VMIN } = unit;\nconst { isRelativeOrAbsolute, getBaseline, getVerticalBaseline } = css;\nconst { extend, isNil, isFunction, assignMatrix } = util;\nconst { CANVAS, SVG, WEBGL } = mode;\nconst { isE, multiply } = mx;\nconst { REFLOW } = level;\n\n// 渲染获取zIndex顺序\nfunction genZIndexChildren(dom) {\n let normal = [];\n let hasMc;\n let mcHash = {};\n let lastMaskIndex;\n let children = dom.children;\n children.forEach((item, i) => {\n let child = item;\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n // 遮罩单独保存后特殊排序\n if(item instanceof Xom && item.__mask) {\n // 开头的mc忽略,后续的连续mc以第一次出现为准\n if(lastMaskIndex !== undefined) {\n mcHash[lastMaskIndex].push(item);\n }\n else if(i) {\n lastMaskIndex = i - 1;\n children[lastMaskIndex].__iIndex = lastMaskIndex;\n mcHash[lastMaskIndex] = [item];\n hasMc = true;\n }\n }\n else {\n lastMaskIndex = undefined;\n if(item instanceof Xom) {\n child.__zIndex = item.currentStyle[Z_INDEX];\n if(isRelativeOrAbsolute(item)) {\n // 临时变量为排序使用\n child.__aIndex = true;\n normal.push(child);\n }\n else {\n // 之前遗留清除\n child.__aIndex = undefined;\n normal.push(child);\n }\n }\n else {\n child.__zIndex = 0;\n normal.push(child);\n }\n child.__iIndex = i;\n }\n });\n normal.sort(function(a, b) {\n if(a.__zIndex !== b.__zIndex) {\n return a.__zIndex - b.__zIndex;\n }\n // zIndex相等时abs优先flow\n if(a.__aIndex !== b.__aIndex) {\n if(a.__aIndex) {\n return 1;\n }\n return -1;\n }\n // 都相等看索引\n return a.__iIndex - b.__iIndex;\n });\n // 将遮罩插入到对应顺序上\n if(hasMc) {\n for(let i = normal.length - 1; i >= 0; i--) {\n let idx = normal[i].__iIndex;\n if(mcHash.hasOwnProperty(idx)) {\n normal.splice(i + 1, 0, ...mcHash[idx]);\n }\n }\n }\n return normal;\n}\n\n// flex布局阶段顺序,不是渲染也和struct结构无关,可以无视mask\nfunction genOrderChildren(flowChildren) {\n let normal = [];\n flowChildren.forEach((item, i) => {\n let child = item;\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Xom) {\n child.__order = item.currentStyle[ORDER];\n }\n else {\n child.__order = 0;\n }\n normal.push(child);\n child.__iIndex = i;\n });\n normal.sort(function(a, b) {\n if(a.__order !== b.__order) {\n return a.__order - b.__order;\n }\n // order相等时看节点索引\n return a.__iIndex - b.__iIndex;\n });\n return normal;\n}\n\n/**\n * lineClamp超出范围时ib作为最后一行最后一个无法挤下时进行回溯\n */\nfunction backtrack(bp, lineBoxManager, lineBox, total, endSpace, isUpright) {\n let ew, computedStyle = bp.computedStyle, root = bp.root, renderMode = root.renderMode;\n let list = lineBox.list;\n // 根据textBox里的内容,确定当前内容,索引,x和剩余宽度\n list.forEach(item => {\n total -= isUpright ? item.outerHeight : item.outerWidth;\n });\n let ctx;\n if(renderMode === CANVAS || renderMode === WEBGL) {\n ctx = renderMode === WEBGL\n ? inject.getFontCanvas().ctx\n : root.ctx;\n }\n // 临时测量ELLIPSIS的尺寸\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let font = css.setFontStyle(computedStyle);\n if(ctx.font !== font) {\n ctx.font = font;\n }\n ew = ctx.measureText(ELLIPSIS).width;\n }\n else {\n ew = inject.measureTextSync(ELLIPSIS, computedStyle[FONT_FAMILY], computedStyle[FONT_SIZE], computedStyle[FONT_WEIGHT]);\n }\n for(let i = list.length - 1; i >= 0; i--) {\n let item = list[i];\n // 无论删除一个ib还是textBox,放得下的话都可以暂停循环,注意强制保留行首\n if(!i || total + item.outerWidth >= ew + (1e-10)) {\n if(item instanceof TextBox) {\n let text = item.parent;\n text.__backtrack(bp, lineBoxManager, lineBox, item, total, endSpace, ew, computedStyle, ctx, renderMode, isUpright);\n }\n else {\n let ep = new Ellipsis(item.x + item.outerWidth + endSpace, item.y, ew, bp);\n lineBoxManager.addItem(ep, true);\n }\n break;\n }\n // 放不下删除\n else {\n if(item instanceof TextBox) {\n let text = item.parent;\n let i = text.textBoxes.indexOf(item);\n if(i > -1) {\n text.textBoxes.splice(i, 1);\n }\n }\n else {\n item.__layoutNone();\n }\n list.pop();\n total += isUpright ? item.outerHeight : item.outerWidth;\n }\n }\n}\n\nclass Dom extends Xom {\n constructor(tagName, props, children) {\n super(tagName, props);\n let { style } = this;\n if(!style.display || !{\n flex: true,\n block: true,\n inline: true,\n 'inline-block': true,\n inlineBlock: true,\n none: true,\n }.hasOwnProperty(style.display)) {\n if(tag.INLINE.hasOwnProperty(this.tagName)) {\n style.display = 'inline';\n }\n else {\n style.display = 'block';\n }\n }\n if(!style[FONT_WEIGHT] && tag.BOLD.hasOwnProperty(tagName)) {\n style.fontWeight = 700;\n }\n this.__style = css.normalize(style, reset.DOM_ENTRY_SET);\n // currentStyle/currentProps不深度clone,继承一层即可,动画时也是extend这样只改一层引用不动原始静态style\n this.__currentStyle = extend([], this.__style);\n this.__children = builder.buildChildren(this, children);\n this.__flexLine = []; // flex布局多行模式时存储行\n this.__ellipsis = null; // 虚拟节点,有的话渲染\n this.__zIndexChildren = null;\n }\n\n __structure(lv, j) {\n let res = super.__structure(lv, j);\n let arr = [res];\n let zIndexChildren = this.__zIndexChildren = this.__zIndexChildren || genZIndexChildren(this);\n zIndexChildren.forEach((child, i) => {\n let temp = child.__structure(lv + 1, i);\n if(Array.isArray(temp)) {\n arr = arr.concat(temp);\n }\n else {\n arr.push(temp);\n }\n });\n let total = arr.length - 1;\n res.num = zIndexChildren.length;\n res.total = total;\n return arr;\n }\n\n __modifyStruct() {\n let struct = this.__struct;\n let total = struct.total || 0;\n let root = this.__root, __structs = root.__structs;\n // 新生成了struct,引用也变了\n let nss = this.__structure(struct.lv, struct.childIndex);\n let i = __structs.indexOf(struct);\n root.__structs.splice(i, total + 1, ...nss);\n let d = 0;\n if(this !== root) {\n struct = this.__struct;\n d = (struct.total || 0) - total;\n if(d) {\n let p = this.__domParent;\n while(p) {\n p.__struct.total = p.__struct.total || 0;\n p.__struct.total += d;\n p = p.__domParent;\n }\n }\n }\n }\n\n __insertStruct(child, childIndex) {\n let struct = this.__struct;\n let cs = child.__structure(struct.lv + 1, childIndex);\n let root = this.__root, structs = root.__structs;\n // 根据是否有prev确定插入索引位置\n let zIndexChildren = this.__zIndexChildren;\n let i;\n if(childIndex) {\n let ps = zIndexChildren[childIndex - 1].__struct;\n let total = ps.total || 0;\n i = structs.indexOf(ps) + total + 1;\n }\n else {\n i = structs.indexOf(struct) + 1;\n }\n let total;\n if(Array.isArray(cs)) {\n structs.splice(i, 0, ...cs);\n total = (cs[0].total || 0) + 1;\n }\n else {\n structs.splice(i, 0, cs);\n total = (cs.total || 0) + 1;\n }\n // 调整后面children的childIndex,+1\n i++;\n for(let len = zIndexChildren.length; i < len; i++) {\n zIndexChildren[i].__struct.childIndex++;\n }\n // 向上添加parent的total数量\n struct.num++;\n struct.total += total;\n let p = this.__domParent;\n while(p) {\n struct = p.__struct;\n struct.total = struct.total || 0;\n struct.total += total;\n p = p.__domParent;\n }\n }\n\n __deleteStruct(child, childIndex) {\n let cs = child.__struct;\n let total = (cs.total || 0) + 1;\n let root = this.__root, structs = root.__structs;\n let i = structs.indexOf(cs);\n structs.splice(i, total);\n // zIndexChildren后面的childIndex偏移\n let zIndexChildren = this.__zIndexChildren;\n for(let i = childIndex + 1, len = zIndexChildren.length; i < len; i++) {\n zIndexChildren[i].__struct.childIndex--;\n }\n // 向上减少parent的total数量\n let struct = this.__struct;\n struct.num--;\n struct.total = struct.total || 0;\n struct.total -= total;\n let p = this.__domParent;\n while(p) {\n struct = p.__struct;\n struct.total = struct.total || 0;\n struct.total -= total;\n p = p.__domParent;\n }\n }\n\n /**\n * 因为zIndex/abs/add的变化造成的更新,只需重排这一段顺序即可\n */\n __updateStruct() {\n let structs = this.__root.__structs;\n let struct = this.__struct;\n let total = struct.total || 0;\n let index = structs.indexOf(struct);\n let zIndexChildren = this.__zIndexChildren = genZIndexChildren(this);\n let length = zIndexChildren.length;\n if(length === 1) {\n return;\n }\n let needSort;\n zIndexChildren.forEach((child, i) => {\n let cs = child.__struct;\n cs.childIndex = i; // 仅后面排序用\n });\n // 按之前的structs划分为相同数量的若干段进行排序\n let source = [], arr = [], count = 0;\n for(let i = index + 1; i <= index + total; i++) {\n let cs = structs[i];\n let o = {\n cs,\n list: structs.slice(i, i + (cs.total || 0) + 1),\n };\n if(cs.childIndex !== count++) {\n needSort = true;\n }\n source.push(o);\n i += cs.total || 0;\n }\n\n if(needSort) {\n let list = [];\n source.sort(function(a, b) {\n return a.cs.childIndex - b.cs.childIndex;\n });\n source.forEach(item => {\n list = list.concat(item.list);\n });\n structs.splice(index + 1, total, ...list);\n }\n }\n\n /**\n * 给定父宽度情况下,尝试行内放下后的剩余宽度,为负数即放不下,这里只会出现行内级即inline(Block)\n * 调用前提是非行开头的inline尝试计算是否放得下,开头无需且禁止判断,防止出现永远放不下一个字符卡死\n * 返回非负数就是放得下,这样一些尺寸为0的也算\n * @param free 剩余宽度\n * @param total 容器尺寸\n * @param isUpright 垂直排版\n * @returns {number|*}\n * @private\n */\n __tryLayInline(free, total, isUpright) {\n this.__computeReflow();\n let { flowChildren, currentStyle: {\n [DISPLAY]: display,\n [WIDTH]: width,\n [HEIGHT]: height,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n }, computedStyle: {\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n } } = this;\n // inline没w/h,并且尝试孩子第一个能放下即可,如果是文字就是第一个字符\n if(display === 'inline') {\n if(flowChildren.length) {\n let first = flowChildren[0];\n if(first instanceof Component) {\n first = first.shadowRoot;\n }\n if(first instanceof Xom) {\n free = first.__tryLayInline(free, total, isUpright);\n }\n else {\n free -= first.firstCharWidth;\n }\n }\n }\n // inlineBlock尝试所有孩子在一行上\n else {\n if(width.u !== AUTO) {\n free -= isUpright ? this.__calSize(height, total, true) : this.__calSize(width, total, true);\n }\n else {\n for(let i = 0; i < flowChildren.length; i++) {\n // 当放不下时直接返回,无需继续多余的尝试计算\n if(free < 0) {\n return free;\n }\n let item = flowChildren[i];\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Xom) {\n free = item.__tryLayInline(free, total, isUpright);\n }\n // text强制一行,否则非头就是放不下,需从头开始\n else {\n free -= item.textWidth;\n }\n }\n }\n // ib要减去末尾mpb\n if(isUpright) {\n free -= this.__calSize(marginBottom, total, true);\n free -= this.__calSize(paddingBottom, total, true);\n free -= borderBottomWidth;\n }\n else {\n free -= this.__calSize(marginRight, total, true);\n free -= this.__calSize(paddingRight, total, true);\n free -= borderRightWidth;\n }\n }\n // 还要减去开头的mpb\n if(isUpright) {\n free -= this.__calSize(marginTop, total, true);\n free -= this.__calSize(paddingTop, total, true);\n free -= borderTopWidth;\n }\n else {\n free -= this.__calSize(marginLeft, total, true);\n free -= this.__calSize(paddingLeft, total, true);\n free -= borderLeftWidth;\n }\n return free;\n }\n\n // 设置y偏移值,递归包括children,此举在justify-content/margin-auto/relative等对齐用\n __offsetX(diff, isLayout, lv) {\n if(this.__computedStyle[DISPLAY] === 'none') {\n return;\n }\n super.__offsetX(diff, isLayout, lv);\n let ep = this.__ellipsis;\n if(ep) {\n ep.__offsetX(diff, isLayout);\n }\n // 记得偏移LineBox\n if(isLayout && !this.__isInline && this.lineBoxManager) {\n this.lineBoxManager.__offsetX(diff);\n }\n this.flowChildren.forEach(item => {\n if(item) {\n item.__offsetX(diff, isLayout, lv);\n }\n });\n }\n\n __offsetY(diff, isLayout, lv) {\n if(this.__computedStyle[DISPLAY] === 'none') {\n return;\n }\n super.__offsetY(diff, isLayout, lv);\n let ep = this.__ellipsis;\n if(ep) {\n ep.__offsetY(diff, isLayout);\n }\n if(isLayout && !this.__isInline && this.lineBoxManager) {\n this.lineBoxManager.__offsetY(diff);\n }\n this.flowChildren.forEach(item => {\n if(item) {\n item.__offsetY(diff, isLayout, lv);\n }\n });\n }\n\n\n /**\n * flex布局时,计算basis尺寸,如果有固定声明则以其为标准,content为内容最大尺寸,auto依赖w/h或降级content\n * basis要考虑相加直接item的mpb,非绝对值单位以container为基准,basis为内容时为max值\n * item的孩子为孙子节点需递归,不参与basis计算,只参与min/max,尺寸和mpb均只考虑绝对值\n * 自动计算时影响尺寸的只有换行的text,以及一组inline,均按其中最大尺寸的一个计算\n * auto自动计算递归进行,如果是普通row方向,按最大text的charWidth为准\n * 如果是column方向,则虚拟布局后看text的height\n * 在abs下时进入特殊状态,无论是row/column,都会按row方向尝试最大尺寸,直到舞台边缘或容器声明的w折行\n * 返回b,声明则按css值,否则是auto/content\n * 返回min为最小宽度,遇到字符/inline则单列排版后需要的最大宽度\n * 返回max为最大宽度,理想情况一排最大值,在abs时virtualMode状态参与计算,文本抵达边界才进行换行\n * 当为column方向时,特殊进行虚拟布局isVirtual,需要获取高度\n * @param isDirectionRow\n * @param isAbs\n * @param isColumn\n * @param data\n * @param isDirectChild\n * @private\n */\n __calBasis(isDirectionRow, isAbs, isColumn, data, isDirectChild) {\n this.__computeReflow();\n let b = 0;\n let min = 0;\n let max = 0;\n let { flowChildren, currentStyle, computedStyle } = this;\n let { x, y, w, h } = data;\n // 计算需考虑style的属性\n let {\n [FLEX_DIRECTION]: flexDirection,\n [FLEX_BASIS]: flexBasis,\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n let {\n [LINE_HEIGHT]: lineHeight,\n [DISPLAY]: display,\n [LINE_CLAMP]: lineClamp,\n [WRITING_MODE]: writingMode,\n } = computedStyle;\n let isUpright = writingMode.indexOf('vertical') === 0;\n let main = isDirectionRow ? width : height;\n // basis3种情况:auto、固定、content\n let isAuto = flexBasis.u === AUTO;\n let isFixed = [PX, PERCENT, REM, VW, VH, VMAX, VMIN].indexOf(flexBasis.u) > -1;\n let isContent = !isAuto && !isFixed;\n let fixedSize;\n // flex的item固定basis计算\n if(isFixed) {\n b = fixedSize = this.__calSize(flexBasis, isDirectionRow ? w : h, true);\n }\n // 已声明主轴尺寸的,当basis是auto时为main值\n else if(isAuto && ([PX, PERCENT, REM, VW, VH, VMAX, VMIN].indexOf(main.u) > -1)) {\n b = fixedSize = this.__calSize(main, isDirectionRow ? w : h, true);\n }\n // 非固定尺寸的basis为auto时降级为content\n else if(isAuto) {\n isContent = true;\n }\n let countMin = 0, countMax = 0;\n lineClamp = lineClamp || 0;\n // row的flex时,child只需计算宽度的basis/min/max,递归下去也是如此,即便包含递归的flex\n if(isDirectionRow) {\n // flex的item还是flex时\n if(display === 'flex') {\n let isR = ['column', 'columnReverse'].indexOf(flexDirection) === -1;\n flowChildren = genOrderChildren(flowChildren);\n flowChildren.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let [, min2, max2] = item.__calBasis(isDirectionRow, isAbs, isColumn, { x, y, w, h }, false);\n if(isR) {\n min += min2;\n max += max2;\n }\n else {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n }\n }\n // text除了flex还需要分辨垂直排版\n else {\n if(isUpright) {\n let lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight,\n isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle), isUpright);\n item.__layoutFlow({\n x,\n y,\n w,\n h,\n lineBoxManager,\n lineClamp,\n isUpright,\n });\n min += item.width;\n max += item.width;\n }\n if(isR) {\n min += item.charWidth;\n max += item.textWidth;\n }\n else {\n min = Math.max(min, item.charWidth);\n max = Math.max(max, item.textWidth);\n }\n }\n });\n }\n // 特殊的flex水平布局但书写垂直,遇到后直接假布局获取宽度,因为水平尺寸视为无限但垂直不是,\n // 这里一定是第一个垂直排版不会递归下去,因为flex的child匿名block,水平的垂直书写inline匿名ib\n else if(isUpright) {\n let lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight,\n isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle), isUpright);\n this.__layoutFlow({\n x,\n y,\n w,\n h,\n lineBoxManager,\n lineClamp,\n isUpright,\n }, isAbs, false, true);\n min = max = b = this.width;\n }\n // flex的item是block/inline时,inline也会变成block统一对待,递归下去会有inline出现,但row的水平size为无穷不会换行可以忽略\n else {\n let lineBoxManager = data.lineBoxManager;\n if(display !== 'inline') {\n lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight,\n isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle), isUpright);\n }\n flowChildren.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let [, min2, max2] = item.__calBasis(isDirectionRow, isAbs, isColumn, { x, y, w, h, lineBoxManager }, false);\n let display = item.computedStyle[DISPLAY];\n // row看块级最大尺寸和连续行级最大尺寸的宽\n if(display === 'block' || display === 'flex') {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n countMin = countMax = 0;\n }\n else {\n countMin += min2;\n countMax += max2;\n min = Math.max(min, countMin);\n max = Math.max(max, countMax);\n }\n }\n else {\n countMin += item.charWidth;\n countMax += item.textWidth;\n min = Math.max(min, countMin);\n max = Math.max(max, countMax);\n }\n });\n }\n if(fixedSize) {\n max = Math.max(fixedSize, max);\n }\n // row降级为内容时basis等同于max\n if(isContent) {\n b = max;\n }\n }\n // column的flex时,每个child做一次虚拟布局,获取到每个child的高度和宽度\n else {\n this.__layoutFlow({\n x,\n y,\n w,\n h,\n isUpright,\n }, isAbs, true, false);\n min = max = b = this.height; // column的child,max和b总相等\n }\n // 直接item的mpb影响basis\n return this.__addMBP(isDirectionRow, w, currentStyle, computedStyle, [b, min, max], isDirectChild);\n }\n\n // flow的layout包裹方法,布局后递归计算computedStyle,abs节点在__layoutAbs中做\n __layout(data, isAbs, isColumn, isRow) {\n super.__layout(data, isAbs, isColumn, isRow);\n this.__layoutStyle();\n }\n\n // 布局结束后递归向下计算computedStyle,父级必须先算因为有inherit\n __layoutStyle() {\n super.__layoutStyle();\n this.flowChildren.forEach(child => {\n if(!(child instanceof Text)) {\n child.__layoutStyle();\n }\n });\n }\n\n __layoutNone() {\n super.__layoutNone();\n let { children } = this;\n children.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n item.__layoutNone();\n }\n });\n }\n\n /**\n * block布局,本身固定尺寸优先,否则看内容从上往下从左往右flow流排布\n * 内部inline和inlineBlock组成LineBox,通过LineBoxManager来管理混排的现象\n * LineBoxManager只有block和inlineBlock内部生成,inline会复用最近父级的\n * 内部的block在垂直方向要考虑margin合并的问题,强制所有节点为bfc,精简逻辑\n * @param data\n * @param isAbs abs无尺寸时提前虚拟布局计算尺寸\n * @param isColumn flex列无尺寸时提前虚拟布局计算尺寸\n * @param isRow flex行布局时出现writingMode垂直排版计算尺寸\n */\n __layoutBlock(data, isAbs, isColumn, isRow) {\n let { flowChildren, currentStyle, computedStyle } = this;\n let {\n [TEXT_ALIGN]: textAlign,\n [WHITE_SPACE]: whiteSpace,\n [LINE_CLAMP]: lineClamp,\n [LINE_HEIGHT]: lineHeight,\n [OVERFLOW]: overflow,\n } = computedStyle;\n let { fixedWidth, fixedHeight, x, y, w, h, isParentVertical, isUpright } = this.__preLayout(data, false);\n // abs虚拟布局需预知width,固定可提前返回\n if(isAbs && (fixedWidth && !isUpright || fixedHeight && isUpright)) {\n if(isUpright) {\n this.__ioSize(undefined, h);\n }\n else {\n this.__ioSize(w, undefined);\n }\n return;\n }\n if(isColumn && fixedHeight) {\n this.__ioSize(undefined, h);\n return;\n }\n if(isRow && fixedWidth) {\n this.__ioSize(w, undefined);\n return;\n }\n // 只有>=1的正整数才有效\n lineClamp = lineClamp || 0;\n let lineClampCount = 0;\n // 虚线管理一个block内部的LineBox列表,使得inline的元素可以中途衔接处理折行\n // 内部维护inline结束的各种坐标来达到目的,遇到block时中断并处理换行坐标\n let lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight,\n isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle), isUpright);\n // 因精度问题,统计宽度均从0开始累加每行,最后取最大值,仅在abs布局时isVirtual生效\n let maxSize = 0;\n let countSize = 0;\n let lx = x; // 行首,考虑了mbp\n let ly = y;\n // 连续block(flex相同,下面都是)的上下margin合并值记录,合并时从列表中取\n let mergeMarginEndList = [], mergeMarginStartList = [];\n let length = flowChildren.length;\n let ignoreNextLine; // lineClamp超过后,后面的均忽略并置none,注意block内部行数统计是跨子block的\n let ignoreNextWrap; // whiteSpace单行超过后,后面的均忽略并置none,注意这也是跨block的会被隔断重计\n flowChildren.forEach((item, i) => {\n let isXom = item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom;\n if(isXom) {\n item.__computeReflow(); // writing-mode可能会造成inline改变为ib\n }\n let isInline = isXom && item.computedStyle[DISPLAY] === 'inline';\n let isInlineBlock = isXom && item.computedStyle[DISPLAY] === 'inlineBlock';\n let isRealInline = isInline && item.__isRealInline();\n let lastLineClampCount = lineClampCount;\n // 每次循环开始前,这次不是block的话,看之前遗留待合并margin,并重置\n if((!isXom || isInline || isInlineBlock)) {\n if(mergeMarginEndList.length && mergeMarginStartList.length) {\n let diff = reflow.getMergeMargin(mergeMarginStartList, mergeMarginEndList).diff;\n if(diff) {\n if(isUpright) {\n x += diff;\n }\n else {\n y += diff;\n }\n }\n }\n mergeMarginStartList = [];\n mergeMarginEndList = [];\n }\n if(isXom) {\n // inline和inlineBlock的细节不同之处,ib除了w/h之外,更想像block一样占据一行\n // 比如2个inline前面占一半后面比一半多但还是会从一半开始然后第2行换行继续,但ib放不下则重开一行\n // inline和ib能互相嵌套,形成的LineBox中则是TextBox和节点混合\n if(isInlineBlock || isInline) {\n if(ignoreNextLine || ignoreNextWrap) {\n item.__layoutNone();\n return;\n }\n // x开头或者nowrap单行的非block,不用考虑是否放得下直接放\n if((isUpright && y === ly) || (!isUpright && x === lx) || !i || whiteSpace === 'nowrap') {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager, // ib内部新生成会内部判断,这里不管统一传入\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n // inlineBlock的特殊之处,一旦w为auto且内部产生折行时,整个变成block独占一块区域,坐标计算和block一样,注意nowrap排除\n if(item.__isIbFull) {\n lineClampCount++;\n }\n if((isUpright && item.__isUprightIbFull || !isUpright && item.__isIbFull)\n && whiteSpace !== 'nowrap') {\n lineBoxManager.addItem(item, true);\n if(isUpright) {\n x += item.outerWidth;\n y = ly;\n }\n else {\n x = lx;\n y += item.outerHeight;\n }\n lineBoxManager.setNotEnd();\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中\n else {\n (isInlineBlock || !isRealInline) && lineBoxManager.addItem(item, false);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n // 单行时inline在ellipsis会导致行数变化,否则判断坐标尺寸(恰好有点空剩余inline排不下),注意前提是非abs,其虚拟计算尺寸无视限制\n if(!isAbs && overflow === 'hidden' && whiteSpace === 'nowrap'\n && ((isUpright && y - ly > h + (1e-10)) || (!isUpright && x - lx > w + (1e-10))\n || lineClampCount > lastLineClampCount)) {\n ignoreNextWrap = true;\n }\n else if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n // abs统计宽度,注意nowrap时累加\n if(isAbs) {\n if(whiteSpace === 'nowrap') {\n countSize += isUpright ? item.outerHeight : item.outerWidth;\n }\n else {\n countSize = isUpright ? item.outerHeight : item.outerWidth;\n if(lineClampCount > lastLineClampCount) {\n countSize = Math.max(countSize, isUpright ? h : w);\n }\n }\n maxSize = Math.max(maxSize, countSize);\n }\n }\n else {\n // 非开头先尝试是否放得下,内部判断了inline/ib,ib要考虑是否有width\n let free = item.__tryLayInline(isUpright ? (h + ly - y) : (w + lx - x), isUpright ? h : w, isUpright);\n // 放得下继续,奇怪的精度问题,加上阈值\n if(free >= (-1e-10)) {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n // ib放得下要么内部没有折行,要么声明了width限制,都需手动存入当前lb\n (isInlineBlock || !isRealInline) && lineBoxManager.addItem(item, false);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n if(isAbs) {\n // ib和非换行inline累加\n if(isInlineBlock || lineClampCount === lastLineClampCount) {\n countSize += isUpright ? item.outerHeight : item.outerWidth;\n maxSize = Math.max(maxSize, countSize);\n }\n // inline换行时一定超过边界至少撑满w\n else {\n maxSize = Math.max(maxSize, isUpright ? h : w);\n countSize = isUpright ? (y - ly) : (x - lx);\n maxSize = Math.max(maxSize, countSize);\n }\n }\n }\n // 放不下处理之前的lineBox,并考虑重新开头或截断\n else {\n lineClampCount++;\n if(isUpright) {\n x = lineBoxManager.endX;\n y = ly;\n }\n else {\n x = lx;\n y = lineBoxManager.endY;\n }\n lineBoxManager.setNewLine();\n // 超过行数,整个block共用计数器\n if(lineClamp && lineClampCount >= lineClamp) {\n item.__layoutNone();\n ignoreNextLine = true;\n let list = lineBoxManager.list;\n let lineBox = list[list.length - 1];\n backtrack(this, lineBoxManager, lineBox, isUpright ? h : w, 0, isUpright);\n return;\n }\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n // 重新开头的ib和上面开头处一样逻辑\n if(item.__isIbFull || item.__isUprightIbFull) {\n lineBoxManager.addItem(item, false);\n if(isUpright) {\n x += item.outerWidth;\n y = ly;\n }\n else {\n x = lx;\n y += item.outerHeight;\n }\n lineBoxManager.setNotEnd();\n lineClampCount++;\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中\n else {\n (isInlineBlock || !isRealInline) && lineBoxManager.addItem(item, false);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n if(isAbs) {\n maxSize = Math.max(maxSize, countSize);\n // 此处发生换行撑满\n maxSize = Math.max(maxSize, isUpright ? h : w);\n // 新行重计\n countSize = isUpright ? item.outerHeight : item.outerWidth;\n maxSize = Math.max(maxSize, countSize);\n }\n }\n }\n }\n // block/flex先处理之前可能遗留的最后一行LineBox,然后递归时不传lineBoxManager,其内部生成新的\n else {\n ignoreNextWrap = false; // block出现的话只隔断单行,不影响多行计数器\n // 非开头,说明之前的text/ib未换行,需要增加行数\n if((isUpright && y > ly) || (!isUpright && x > lx)) {\n lineClampCount++;\n }\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n if(isUpright) {\n y = ly;\n }\n else {\n x = lx;\n }\n if(lineBoxManager.isEnd) {\n if(isUpright) {\n x = lineBoxManager.endX;\n }\n else {\n y = lineBoxManager.endY;\n }\n lineBoxManager.setNotEnd();\n lineBoxManager.setNewLine();\n }\n item.__layoutFlow({\n x,\n y,\n w,\n h,\n isUpright,\n }, isAbs, isColumn, isRow);\n // 自身无内容\n let isNone = item.currentStyle[DISPLAY] === 'none';\n let isEmptyBlock;\n if(!isNone && item.flowChildren && item.flowChildren.length === 0) {\n let {\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [PADDING_LEFT]: paddingLeft,\n [WIDTH]: width,\n [HEIGHT]: height,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = item.computedStyle;\n // 无内容高度为0的空block特殊情况,记录2个margin下来等后续循环判断处理\n if(isUpright && paddingLeft <= 0 && paddingRight <= 0 && width <= 0 && borderLeftWidth <= 0 && borderRightWidth <= 0) {\n mergeMarginEndList.push(marginRight);\n mergeMarginStartList.push(marginLeft);\n isEmptyBlock = true;\n }\n else if(!isUpright && paddingTop <= 0 && paddingBottom <= 0 && height <= 0 && borderTopWidth <= 0 && borderBottomWidth <= 0) {\n mergeMarginEndList.push(marginBottom);\n mergeMarginStartList.push(marginTop);\n isEmptyBlock = true;\n }\n }\n if(isUpright) {\n x += item.outerWidth;\n lineBoxManager.__lastX = x;\n }\n else {\n y += item.outerHeight;\n lineBoxManager.__lastY = y;\n }\n // absolute/flex前置虚拟计算\n if(isAbs) {\n maxSize = Math.max(maxSize, isUpright ? item.outerHeight : item.outerWidth);\n countSize = 0;\n }\n // 空block要留下轮循环看,除非是最后一个,此处非空本轮处理掉看是否要合并\n if(!isNone && !isEmptyBlock) {\n let {\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n } = item.computedStyle;\n // 有bottom值说明之前有紧邻的block,任意个甚至空block,自己有个top所以无需判断top\n // 如果是只有紧邻的2个非空block,也被包含在情况内,取上下各1合并\n if(mergeMarginEndList.length) {\n if(isUpright) {\n mergeMarginStartList.push(marginLeft);\n let diff = reflow.getMergeMargin(mergeMarginStartList, mergeMarginEndList).diff;\n if(diff) {\n item.__offsetX(diff, true, null);\n x += diff;\n }\n }\n else {\n mergeMarginStartList.push(marginTop);\n let diff = reflow.getMergeMargin(mergeMarginStartList, mergeMarginEndList).diff;\n if(diff) {\n item.__offsetY(diff, true, null);\n y += diff;\n }\n }\n }\n // 同时自己保存bottom,为后续block准备\n mergeMarginStartList = [];\n mergeMarginEndList = [isUpright ? marginRight : marginBottom];\n }\n // 最后一个空block当是正正和负负时要处理,正负在outHeight处理了结果是0\n else if(i === length - 1) {\n let diff = reflow.getMergeMargin(mergeMarginStartList, mergeMarginEndList).diff;\n if(diff) {\n if(isUpright) {\n x += diff;\n }\n else {\n y += diff;\n }\n }\n }\n }\n }\n // 文字和inline类似\n else {\n if(ignoreNextLine || ignoreNextWrap) {\n item.__layoutNone();\n return;\n }\n // x开头,不用考虑是否放得下直接放\n if((isUpright && y === ly) || (!isUpright && x === lx) || !i || whiteSpace === 'nowrap') {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n isUpright,\n });\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n // 和inline很像,只是没有ib\n if(!isAbs && overflow === 'hidden' && whiteSpace === 'nowrap'\n && ((isUpright && y - ly > h + (1e-10)) || (!isUpright && x - lx > w + (1e-10))\n || lineClampCount > lastLineClampCount)) {\n ignoreNextWrap = true;\n }\n else if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n // abs统计宽度,注意nowrap时累加\n if(isAbs) {\n if(whiteSpace === 'nowrap') {\n countSize += isUpright ? item.height : item.width;\n }\n else {\n countSize = isUpright ? item.height : item.width;\n if(lineClampCount > lastLineClampCount) {\n countSize = Math.max(countSize, isUpright ? h : w);\n }\n }\n maxSize = Math.max(maxSize, countSize);\n }\n }\n else {\n // 非开头先尝试是否放得下\n let free = item.__tryLayInline(isUpright ? (h + ly - y) : (w + lx - x));\n // 放得下继续\n if(free >= (-1e-10)) {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n isUpright,\n });\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n if(isAbs) {\n if(lineClampCount === lastLineClampCount) {\n countSize += isUpright ? item.height : item.width;\n maxSize = Math.max(maxSize, countSize);\n }\n // inline换行一定超过边界\n else {\n maxSize = Math.max(maxSize, isUpright ? h : w);\n countSize = isUpright ? (y - ly) : (x - lx);\n maxSize = Math.max(maxSize, countSize);\n }\n }\n }\n // 放不下处理之前的lineBox,并重新开头\n else {\n lineClampCount++;\n if(isUpright) {\n x = lineBoxManager.endX;\n y = ly;\n }\n else {\n x = lx;\n y = lineBoxManager.endY;\n }\n lineBoxManager.setNewLine();\n // 和inline/ib一样\n if(lineClamp && lineClampCount >= lineClamp) {\n item.__layoutNone();\n ignoreNextLine = true;\n let list = lineBoxManager.list;\n let lineBox = list[list.length - 1];\n backtrack(this, lineBoxManager, lineBox, isUpright ? h : w, 0, isUpright);\n return;\n }\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n isUpright,\n });\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n if(isAbs) {\n maxSize = Math.max(maxSize, countSize);\n // 此处发生换行撑满\n maxSize = Math.max(maxSize, isUpright ? h : w);\n // 新行重计\n countSize = isUpright ? item.height : item.width;\n maxSize = Math.max(maxSize, countSize);\n }\n }\n }\n }\n });\n // 结束后如果是以LineBox结尾,则需要设置y到这里,否则流布局中block会设置\n // 当以block换行时,新行是true,否则是false即结尾\n if(lineBoxManager.isEnd) {\n if(isUpright) {\n x = lineBoxManager.endX;\n }\n else {\n y = lineBoxManager.endY;\n }\n }\n let tw = 0, th = 0;\n // 根据书写模式、嵌套等条件计算宽高,只有父子同向才会主轴撑满\n if(fixedWidth || !isAbs && !isParentVertical && !isUpright) {\n tw = w;\n }\n else if(isAbs) {\n tw = isUpright ? (x - data.x) : maxSize;\n }\n else {\n tw = x - data.x;\n }\n if(fixedHeight || !isAbs && isParentVertical && isUpright) {\n th = h;\n }\n else if(isAbs) {\n th = isUpright ? maxSize : (y - data.y);\n }\n else {\n th = y - data.y;\n }\n this.__ioSize(tw, th);\n // 除了水平abs的虚拟外,都需要垂直对齐,因为img这种占位元素会影响lineBox高度,水平abs虚拟只需宽度\n if(!isAbs) {\n let spread = lineBoxManager.verticalAlign(isUpright);\n if(spread) {\n if(isUpright && !fixedWidth) {\n this.__resizeX(spread, null);\n }\n else if(!isUpright && !fixedHeight) {\n this.__resizeY(spread, null);\n }\n /**\n * parent以及parent的next无需处理,因为深度遍历后面还会进行,\n * 但自己的block需处理,因为对齐只处理了inline元素,忽略了block,\n * 同时由于block和inline区域可能不连续,每个增加的y不一样,\n * 需要按照每个不同区域来判断,区域是按索引次序依次增大的,\n * 只有在inline出现过后才开始生效,inline之前的block忽略\n */\n let count = 0, spreadList = lineBoxManager.spreadList;\n let isLastBlock = false, hasStart = false;\n flowChildren.forEach(item => {\n let isXom = item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom;\n let isBlock = isXom && ['block', 'flex'].indexOf(item.computedStyle[DISPLAY]) > -1;\n if(isBlock) {\n if(!hasStart) {\n return;\n }\n isLastBlock = true;\n if(isUpright) {\n item.__offsetX(spreadList[count], true, null);\n }\n else {\n item.__offsetY(spreadList[count], true, null);\n }\n }\n else {\n hasStart = true;\n if(isLastBlock) {\n count++;\n }\n isLastBlock = false;\n }\n });\n }\n // 非abs提前的虚拟布局,真实布局情况下最后为所有行内元素进行2个方向上的对齐\n if(!isColumn && !isRow) {\n if(['center', 'right'].indexOf(textAlign) > -1) {\n lineBoxManager.horizonAlign(isUpright ? th : tw, textAlign, isUpright);\n // 直接text需计算size\n flowChildren.forEach(item => {\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Text) {\n item.__inlineSize(isUpright);\n }\n });\n }\n // 所有inline计算size\n lineBoxManager.domList.forEach(item => {\n item.__inlineSize(isUpright ? th : tw, textAlign, isUpright);\n });\n this.__marginAuto(currentStyle, data, isUpright);\n }\n }\n }\n\n // 弹性布局时的计算位置\n __layoutFlex(data, isAbs, isColumn, isRow) {\n let { flowChildren, currentStyle, computedStyle, __flexLine } = this;\n let {\n [FLEX_DIRECTION]: flexDirection,\n [JUSTIFY_CONTENT]: justifyContent,\n [ALIGN_ITEMS]: alignItems,\n [LINE_CLAMP]: lineClamp,\n [FLEX_WRAP]: flexWrap,\n [ALIGN_CONTENT]: alignContent,\n [LINE_HEIGHT]: lineHeight,\n [TEXT_ALIGN]: textAlign,\n } = computedStyle;\n let { fixedWidth, fixedHeight, x, y, w, h, isParentVertical, isUpright } = this.__preLayout(data, false);\n if(isAbs && (fixedWidth && !isUpright || fixedHeight && isUpright)) {\n if(isUpright) {\n this.__ioSize(undefined, h);\n }\n else {\n this.__ioSize(w, undefined);\n }\n return;\n }\n if(isColumn && fixedHeight) {\n this.__ioSize(undefined, h);\n return;\n }\n if(isRow && fixedWidth) {\n this.__ioSize(w, undefined);\n return;\n }\n // 每次布局情况多行内容\n __flexLine.splice(0);\n // 只有>=1的正整数才有效\n lineClamp = lineClamp || 0;\n let lineClampCount = 0;\n let isDirectionRow = ['column', 'columnReverse'].indexOf(flexDirection) === -1;\n // 计算伸缩基数\n let growList = [];\n let shrinkList = [];\n let basisList = [];\n let maxList = [];\n let minList = [];\n let orderChildren = genOrderChildren(flowChildren);\n orderChildren.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let { currentStyle, computedStyle } = item;\n let [b, min, max] = item.__calBasis(isDirectionRow, isAbs, isColumn, { x, y, w, h }, true);\n let { [FLEX_GROW]: flexGrow, [FLEX_SHRINK]: flexShrink } = currentStyle;\n computedStyle[FLEX_BASIS] = b;\n growList.push(flexGrow);\n shrinkList.push(flexShrink);\n // 根据basis不同,计算方式不同\n basisList.push(b);\n maxList.push(max);\n minList.push(min);\n }\n // 文本\n else {\n growList.push(0);\n shrinkList.push(1);\n // 水平flex垂直文字和垂直flex水平文字都先假布局一次取结果,其它取文本最大最小宽度即可\n if(isDirectionRow && isUpright || !isDirectionRow && !isUpright) {\n let lineBoxManager = new LineBoxManager(x, y, lineHeight,\n isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle), isUpright);\n item.__layoutFlow({\n x,\n y,\n w,\n h,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n let n = isUpright ? item.width: item.height;\n basisList.push(n);\n maxList.push(n);\n minList.push(n);\n }\n // 水平flex水平文本和垂直flex垂直文本\n else {\n let cw = item.charWidth;\n let tw = item.textWidth;\n basisList.push(tw);\n maxList.push(tw);\n minList.push(cw);\n }\n }\n });\n let containerSize = isDirectionRow ? w : h;\n let isMultiLine = ['wrap', 'wrapReverse'].indexOf(flexWrap) > -1;\n /**\n * 判断是否需要分行,根据假设主尺寸来统计尺寸和计算,假设主尺寸是clamp(min_main_size, flex_base_size, max_main_size)\n * 当多行时,由于每行一定有最小限制,所以每行一般情况都不是shrink状态,\n * 但也有极端情况,比如一行只能放下1个元素时,且此元素比容器小,会是shrink\n */\n let line = [], sum = 0, hypotheticalList = [];\n basisList.forEach((item, i) => {\n let min = minList[i], max = maxList[i];\n let hypothetical;\n if(item < min) {\n hypothetical = min;\n }\n else if(item > max) {\n hypothetical = max;\n }\n else {\n hypothetical = item;\n }\n hypotheticalList.push(hypothetical);\n if(isMultiLine) {\n // 超过尺寸时,要防止sum为0即1个也会超过尺寸\n if(sum + hypothetical > containerSize) {\n if(sum) {\n __flexLine.push(line);\n line = [orderChildren[i]];\n sum = hypothetical;\n }\n else {\n line.push(orderChildren[i]);\n __flexLine.push(line);\n line = [];\n sum = 0;\n }\n }\n else {\n line.push(orderChildren[i]);\n sum += hypothetical;\n }\n }\n else {\n line.push(orderChildren[i]);\n }\n });\n if(line.length) {\n __flexLine.push(line);\n }\n let offset = 0, clone = { x, y, w, h };\n let maxCrossList = [], marginAutoCountList = [], freeList = [];\n __flexLine.forEach(item => {\n let length = item.length;\n let end = offset + length;\n let [x1, y1, maxCross, marginAutoCount, free] = this.__layoutFlexLine(clone, isDirectionRow, isAbs, isColumn, isRow, isUpright,\n containerSize, fixedWidth, fixedHeight, lineClamp, lineClampCount,\n lineHeight, computedStyle, justifyContent, alignItems,\n orderChildren.slice(offset, end), item, textAlign,\n growList.slice(offset, end), shrinkList.slice(offset, end), basisList.slice(offset, end),\n hypotheticalList.slice(offset, end), minList.slice(offset, end), maxList.slice(offset, end));\n // 下一行/列更新坐标\n if(isDirectionRow) {\n clone.y = y1;\n }\n else {\n clone.x = x1;\n }\n x = Math.max(x, x1);\n y = Math.max(y, y1);\n maxCrossList.push(maxCross);\n marginAutoCountList.push(marginAutoCount);\n freeList.push(free);\n offset += length;\n });\n // abs预布局只计算宽度无需对齐\n if(isAbs) {\n let max = 0;\n __flexLine.forEach(line => {\n let count = 0;\n line.forEach(item => {\n if(isDirectionRow) {\n count += isUpright ? item.outerHeight : item.outerWidth;\n }\n else {\n count = Math.max(count, isUpright ? item.outerHeight : item.outerWidth);\n }\n // 文字发生换行无论row/column一定放不下需占满容器尺寸\n if(item instanceof Text) {\n if(isUpright) {\n if(item.textWidth > h) {\n max = Math.max(max, h);\n }\n }\n else {\n if(item.textWidth > w) {\n max = Math.max(max, w);\n }\n }\n }\n });\n max = Math.max(max, count);\n });\n if(isUpright) {\n this.__ioSize(undefined, max);\n }\n else {\n this.__ioSize(max, undefined);\n }\n return;\n }\n // 同block计算\n let tw = 0, th = 0;\n if(fixedWidth || !isAbs && !isParentVertical && !isUpright) {\n tw = w;\n }\n else {\n tw = x - data.x;\n }\n if(fixedHeight || !isAbs && isParentVertical && isUpright) {\n th = h;\n }\n else {\n th = y - data.y;\n }\n this.__ioSize(tw, th);\n if(isColumn || isRow) {\n return;\n }\n // flexDirection当有reverse时交换每line的主轴序\n if(flexDirection === 'rowReverse') {\n __flexLine.forEach(line => {\n line.forEach(item => {\n // 一个矩形内的子矩形进行镜像移动,用外w减去内w再减去开头空白的2倍即可\n let diff = tw - item.outerWidth - (item.x - data.x) * 2;\n if(diff) {\n item.__offsetX(diff, true, null);\n }\n });\n });\n }\n else if(flexDirection === 'columnReverse') {\n __flexLine.forEach(line => {\n line.forEach(item => {\n // 一个矩形内的子矩形进行镜像移动,用外w减去内w再减去开头空白的2倍即可\n let diff = th - item.outerHeight - (item.y - data.y) * 2;\n if(diff) {\n item.__offsetY(diff, true, null);\n }\n });\n });\n }\n // wrap-reverse且多轴线时交换轴线序,需要2行及以上才行\n let length = __flexLine.length;\n if(flexWrap === 'wrapReverse' && length > 1) {\n let crossSum = 0, crossSumList = [];\n maxCrossList.forEach(item => {\n crossSumList.push(crossSum);\n crossSum += item;\n });\n let count = 0;\n for(let i = length - 1; i >= 0; i--) {\n let line = __flexLine[i];\n let source = crossSumList[i];\n let diff = count - source;\n if(diff) {\n line.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(diff, true, null);\n }\n else {\n item.__offsetX(diff, true, null);\n }\n });\n }\n count += maxCrossList[i];\n }\n __flexLine.reverse();\n }\n // 侧轴对齐分flexLine做,要考虑整体的alignContent的stretch和每行的alignItems的stretch\n // 先做整体的,得出交叉轴空白再均分给每一行做单行的,整体的只有1行忽略\n let per;\n if(length > 1 && (fixedHeight && isDirectionRow || !isDirectionRow)) {\n let diff = isDirectionRow ? th - (y - data.y) : tw - (x - data.x);\n // 有空余时才进行对齐\n if(diff > 0) {\n if(alignContent === 'center') {\n let per = diff * 0.5;\n orderChildren.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(per, true, null);\n }\n else {\n item.__offsetX(per, true, null);\n }\n });\n }\n else if(alignContent === 'flexStart') {}\n else if(alignContent === 'flexEnd') {\n orderChildren.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(diff, true, null);\n }\n else {\n item.__offsetX(diff, true, null);\n }\n });\n }\n else if(alignContent === 'spaceBetween') {\n let between = diff / (length - 1);\n // 除了第1行其它进行偏移\n __flexLine.forEach((item, i) => {\n if(i) {\n item.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(between, true, null);\n }\n else {\n item.__offsetX(between, true, null);\n }\n });\n }\n });\n }\n else if(alignContent === 'spaceAround') {\n let around = diff / (length + 1);\n __flexLine.forEach((item, i) => {\n item.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(around * (i + 1), true, null);\n }\n else {\n item.__offsetX(around * (i + 1), true, null);\n }\n });\n });\n }\n // 默认stretch,每个flexLine进行扩充\n else {\n per = diff / length;\n // 因为每行都cross扩充了per,所有除了第1行其它进行偏移\n __flexLine.forEach((item, i) => {\n if(i) {\n item.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(per * i, true, null);\n }\n else {\n item.__offsetX(per * i, true, null);\n }\n });\n }\n });\n }\n }\n }\n // 每行再进行main/cross对齐,在alignContent为stretch时计算每行的高度\n if(!isColumn && !isRow) {\n if(length > 1) {\n __flexLine.forEach((item, i) => {\n let maxCross = maxCrossList[i];\n if(per) {\n maxCross += per;\n }\n this.__flexAlign(item, alignItems, justifyContent, isDirectionRow, maxCross, marginAutoCountList[i], freeList[i]);\n });\n }\n else if(length) {\n let maxCross = isDirectionRow ? th : tw;\n this.__flexAlign(__flexLine[0], alignItems, justifyContent, isDirectionRow, maxCross, marginAutoCountList[0], freeList[0]);\n }\n this.__marginAuto(currentStyle, data, isUpright);\n }\n }\n\n /**\n * 计算获取子元素的b/min/max完毕后,尝试进行flex每行布局\n * https://www.w3.org/TR/css-flexbox-1/#layout-algorithm\n * 假想主尺寸,其为clamp(min_main_size, flex_base_size, max_main_size)\n * 随后按算法一步步来 https://zhuanlan.zhihu.com/p/354567655\n * 规范没提到mpb,item的要计算,孙子的只考虑绝对值\n * 先收集basis和假设主尺寸\n */\n __layoutFlexLine(data, isDirectionRow, isAbs, isColumn, isRow, isUpright,\n containerSize, fixedWidth, fixedHeight, lineClamp, lineClampCount,\n lineHeight, computedStyle, justifyContent, alignItems,\n orderChildren, flexLine, textAlign,\n growList, shrinkList, basisList, hypotheticalList, minList, maxList) {\n let { x, y, w, h } = data;\n let hypotheticalSum = 0;\n hypotheticalList.forEach(item => {\n hypotheticalSum += item;\n });\n // 根据假设尺寸确定使用grow还是shrink,冻结非弹性项并设置target尺寸,确定剩余未冻结数量\n let isOverflow = hypotheticalSum >= containerSize;\n let targetMainList = [];\n basisList.forEach((item, i) => {\n if(isOverflow) {\n if(!shrinkList[i] || (basisList[i] < hypotheticalList[i])) {\n targetMainList[i] = hypotheticalList[i];\n }\n }\n else {\n if(!growList[i] || (basisList[i] > hypotheticalList[i])) {\n targetMainList[i] = hypotheticalList[i];\n }\n }\n });\n // 初始可用空间,冻结使用确定的target尺寸,未冻结使用假想\n let free = 0;\n basisList.forEach((item, i) => {\n if(targetMainList[i] !== undefined) {\n free += targetMainList[i];\n }\n else {\n free += item;\n }\n });\n let total = Infinity;\n if(isDirectionRow) {\n total = w;\n }\n else if(fixedHeight) {\n total = h;\n }\n else {\n total = free;\n }\n free = Math.abs(total - free); // 压缩也使用正值\n let lessOne = 0;\n // 循环,文档算法不够简练,其合并了grow和shrink,实际拆开写更简单\n let factorSum = 0;\n if(isOverflow) {\n // 计算真正的因子占比,同时得出缩小尺寸数值\n // 还需判断每个item收缩不能 {\n if(targetMainList[i] === undefined) { // 冻结项的目标主尺寸有值,因子无值或为0\n factorSum += item;\n return item;\n }\n });\n while(true) {\n // 都冻结了\n if(factorSum === 0) {\n break;\n }\n if(factorSum < 1) {\n lessOne += free * (1 - factorSum);\n free *= factorSum;\n }\n let needReset, factorSum2 = 0, count1 = 0, count2 = 0;\n factorList.forEach((item, i) => {\n if(item) {\n let r = item / factorSum;\n let s = r * free; // 需要收缩的尺寸\n let n = basisList[i] - s; // 实际尺寸\n // 比min还小设置为min,同时设0冻结剔除\n if(n < minList[i]) {\n targetMainList[i] = minList[i];\n factorList[i] = 0;\n needReset = true;\n count1 += basisList[i] - minList[i]; // 超出的尺寸也要减去实际收缩的尺寸,最终从free里减去\n }\n // else if(n > maxList[i]) {\n // targetMainList[i] = maxList[i];\n // factorList[i] = 0;\n // needReset = true;\n // count1 += maxList[i];\n // }\n // 先按照没有超限的设置,正常情况直接跳出,如果有超限,记录sum2给下轮赋值重新计算\n else {\n targetMainList[i] = n;\n factorSum2 += item;\n count2 += n;\n }\n }\n });\n if(!needReset) {\n free -= count2;\n break;\n }\n free -= count1;\n factorSum = factorSum2;\n }\n }\n else {\n let factorList = growList.map((item, i) => {\n if(targetMainList[i] === undefined) {\n factorSum += item;\n return item;\n }\n });\n while(true) {\n if(factorSum === 0) {\n break;\n }\n if(factorSum < 1) {\n lessOne += free * (1 - factorSum);\n free *= factorSum;\n }\n let needReset, factorSum2 = 0, count1 = 0, count2 = 0;\n factorList.forEach((item, i) => {\n if(item) {\n let r = item / factorSum;\n let s = r * free; // 需要扩展的尺寸\n let n = basisList[i] + s; // 实际尺寸\n // 比min还小设置为min,同时设0剔除\n if(n < minList[i]) {\n targetMainList[i] = minList[i];\n factorList[i] = 0;\n needReset = true;\n count1 += basisList[i] - minList[i];\n }\n // else if(n > maxList[i]) {\n // targetMainList[i] = maxList[i];\n // factorList[i] = 0;\n // needReset = true;\n // count1 += maxList[i];\n // }\n // 先按照没有超限的设置,正常情况直接跳出,如果有超限,记录sum2给下轮赋值重新计算\n else {\n targetMainList[i] = n;\n factorSum2 += item;\n count2 += n;\n }\n }\n });\n if(!needReset) {\n free -= count2;\n break;\n }\n free -= count1;\n factorSum = factorSum2;\n }\n }\n let maxCross = 0;\n let lbmList = [];\n let marginAutoCount = 0;\n orderChildren.forEach((item, i) => {\n let main = targetMainList[i];\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n if(isDirectionRow) {\n item.__layoutFlow({\n x,\n y,\n w: main,\n h,\n w3: main, // w3假设固定宽度,忽略原始style中的设置\n isUpright,\n }, isAbs, isColumn, isRow);\n }\n else {\n let {\n [ALIGN_SELF]: alignSelf,\n [WIDTH]: width,\n } = item.currentStyle;\n // column的child真布局时,如果是stretch宽度,则可以直接生成animateRecord,否则自适应调整后才进行\n if(!isAbs && !isColumn && !isRow) {\n let needGenAr;\n if(width.u !== AUTO || alignSelf === 'stretch') {\n needGenAr = true;\n }\n else if(alignSelf === 'auto' && alignItems === 'stretch') {\n needGenAr = true;\n }\n if(needGenAr) {\n item.__layoutFlow({\n x,\n y,\n w,\n h: main,\n h3: main, // 同w2\n isUpright,\n }, isAbs, isColumn, isRow);\n }\n else {\n item.__layoutFlow({\n x,\n y,\n w,\n h: main,\n h3: main, // 同w2\n isUpright,\n }, true, isColumn, isRow);\n item.__layoutFlow({\n x,\n y,\n w,\n w3: item.outerWidth,\n h: main,\n h3: main, // 同w2\n isUpright,\n }, isAbs, isColumn, isRow);\n }\n }\n else {\n item.__layoutFlow({\n x,\n y,\n w,\n h: main,\n h3: main, // 同w2\n isUpright,\n }, isAbs, isColumn, isRow);\n }\n }\n // 记录主轴是否有margin为auto的情况\n if(!isAbs && !isColumn && !isRow) {\n let currentStyle = item.currentStyle;\n if(isDirectionRow) {\n if(currentStyle[MARGIN_LEFT].u === AUTO) {\n marginAutoCount++;\n }\n if(currentStyle[MARGIN_RIGHT].u === AUTO) {\n marginAutoCount++;\n }\n }\n else {\n if(currentStyle[MARGIN_TOP].u === AUTO) {\n marginAutoCount++;\n }\n if(currentStyle[MARGIN_BOTTOM].u === AUTO) {\n marginAutoCount++;\n }\n }\n }\n }\n // 文字\n else {\n let lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight,\n isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle), isUpright);\n lbmList.push(lineBoxManager);\n item.__layoutFlow({\n x,\n y,\n w: isDirectionRow ? main : w,\n h: isDirectionRow ? h : main,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n isUpright,\n });\n }\n if(isDirectionRow) {\n x += item.outerWidth;\n maxCross = Math.max(maxCross, item.outerHeight);\n }\n else {\n y += item.outerHeight;\n maxCross = Math.max(maxCross, item.outerWidth);\n }\n });\n if(isDirectionRow) {\n y += maxCross;\n }\n else {\n x += maxCross;\n }\n // flex的直接text对齐比较特殊\n if(!isAbs && !isColumn && !isRow && ['center', 'right'].indexOf(textAlign) > -1) {\n lbmList.forEach(item => {\n item.horizonAlign(isUpright? item.height : item.width, textAlign, isUpright);\n })\n }\n return [x, y, maxCross, marginAutoCount, isOverflow ? 0 : Math.max(0, free + lessOne)];\n }\n\n // 每个flexLine的主轴侧轴对齐\n __flexAlign(line, alignItems, justifyContent, isDirectionRow, maxCross, marginAutoCount, free) {\n let baseline = 0;\n line.forEach(item => {\n baseline = Math.max(baseline, item.firstBaseline);\n });\n // 先主轴对齐方式,需要考虑margin,如果有auto则优先于justifyContent\n let len = line.length;\n if(marginAutoCount) {\n // 类似于space-between,空白均分于auto,两边都有就是2份,只有1边是1份\n let count = 0, per = free / marginAutoCount;\n for(let i = 0; i < len; i++) {\n let child = line[i];\n let currentStyle = child.currentStyle;\n if(isDirectionRow) {\n if(currentStyle[MARGIN_LEFT].u === AUTO) {\n count += per;\n child.__offsetX(count, true, null);\n }\n else if(count) {\n child.__offsetX(count, true, null);\n }\n if(currentStyle[MARGIN_RIGHT].u === AUTO) {\n count += per;\n }\n }\n else {\n if(currentStyle[MARGIN_TOP].u === AUTO) {\n count += per;\n child.__offsetY(count, true, null);\n }\n else if(count) {\n child.__offsetY(count, true, null);\n }\n if(currentStyle[MARGIN_BOTTOM].u === AUTO) {\n count += per;\n }\n }\n }\n }\n else {\n if(justifyContent === 'flexEnd') {\n for(let i = 0; i < len; i++) {\n let child = line[i];\n isDirectionRow ? child.__offsetX(free, true, null) : child.__offsetY(free, true, null);\n }\n }\n else if(justifyContent === 'center') {\n let center = free * 0.5;\n for(let i = 0; i < len; i++) {\n let child = line[i];\n isDirectionRow ? child.__offsetX(center, true, null) : child.__offsetY(center, true, null);\n }\n }\n else if(justifyContent === 'spaceBetween') {\n let between = free / (len - 1);\n for(let i = 1; i < len; i++) {\n let child = line[i];\n isDirectionRow ? child.__offsetX(between * i, true, null) : child.__offsetY(between * i, true, null);\n }\n }\n else if(justifyContent === 'spaceAround') {\n let around = free * 0.5 / len;\n for(let i = 0; i < len; i++) {\n let child = line[i];\n isDirectionRow ? child.__offsetX(around * (i * 2 + 1), true, null) : child.__offsetY(around * (i * 2 + 1), true, null);\n }\n }\n else if(justifyContent === 'spaceEvenly') {\n let around = free / (len + 1);\n for(let i = 0; i < len; i++) {\n let child = line[i];\n isDirectionRow ? child.__offsetX(around * (i + 1), true, null) : child.__offsetY(around * (i + 1), true, null);\n }\n }\n }\n // 再侧轴\n line.forEach(item => {\n let { currentStyle: { [ALIGN_SELF]: alignSelf } } = item;\n if(isDirectionRow) {\n if(alignSelf === 'flexStart') {}\n else if(alignSelf === 'flexEnd') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff, true, null);\n }\n }\n else if(alignSelf === 'center') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff * 0.5, true, null);\n }\n }\n else if(alignSelf === 'stretch') {\n let { computedStyle, currentStyle: { [HEIGHT]: height } } = item;\n let {\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n } = computedStyle;\n if(height.u === AUTO) {\n let old = item.height;\n let v = item.__height = computedStyle[HEIGHT] = maxCross - marginTop - marginBottom - paddingTop - paddingBottom - borderTopWidth - borderBottomWidth;\n let d = v - old;\n item.__y4 += d;\n item.__y5 += d;\n item.__y6 += d;\n item.__height += d;\n item.__clientHeight += d;\n item.__offsetHeight += d;\n item.__outerHeight += d;\n }\n }\n else if(alignSelf === 'baseline') {\n let diff = baseline - item.firstBaseline;\n if(diff !== 0) {\n item.__offsetY(diff, true, null);\n }\n }\n // 默认auto,取alignItems\n else {\n if(alignItems === 'flexStart') {}\n else if(alignItems === 'center') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff * 0.5, true, null);\n }\n }\n else if(alignItems === 'flexEnd') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff, true, null);\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseline - item.firstBaseline;\n if(diff !== 0) {\n item.__offsetY(diff, true, null);\n }\n }\n // 默认stretch\n else {\n let { computedStyle, currentStyle: {\n [DISPLAY]: display,\n [FLEX_DIRECTION]: flexDirection,\n [HEIGHT]: height,\n } } = item;\n // row的孩子还是flex且column且不定高时,如果高度<侧轴拉伸高度则重新布局\n if(isDirectionRow && display === 'flex' && flexDirection === 'column' && height.u === AUTO && item.outerHeight < maxCross) {\n item.__layoutFlow(Object.assign(item.__layoutData, { h3: maxCross }));\n }\n let {\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n } = computedStyle;\n if(height.u === AUTO) {\n let old = item.height;\n let v = maxCross - marginTop - marginBottom - paddingTop - paddingBottom - borderTopWidth - borderBottomWidth;\n let d = v - old;\n item.__y4 += d;\n item.__y5 += d;\n item.__y6 += d;\n item.__height += d;\n item.__clientHeight += d;\n item.__offsetHeight += d;\n item.__outerHeight += d;\n }\n }\n }\n }\n // column\n else {\n if(alignSelf === 'flexStart') {}\n else if(alignSelf === 'flexEnd') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff, true, null);\n }\n }\n else if(alignSelf === 'center') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff * 0.5, true, null);\n }\n }\n else if(alignSelf === 'stretch') {\n let { computedStyle, currentStyle: { [WIDTH]: width } } = item;\n let {\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_LEFT]: paddingLeft,\n } = computedStyle;\n if(width.u === AUTO) {\n let old = item.width;\n let v = item.__width = computedStyle[WIDTH] = maxCross - marginLeft - marginRight - paddingLeft - paddingRight - borderRightWidth - borderLeftWidth;\n let d = v - old;\n item.__x4 += d;\n item.__x5 += d;\n item.__x6 += d;\n item.__width += d;\n item.__clientWidth += d;\n item.__offsetWidth += d;\n item.__outerWidth += d;\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseline - item.firstBaseline;\n if(diff !== 0) {\n item.__offsetX(diff, true, null);\n }\n }\n // 默认auto,取alignItems\n else {\n if(alignItems === 'flexStart') {}\n else if(alignItems === 'center') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff * 0.5, true, null);\n }\n }\n else if(alignItems === 'flexEnd') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff, true, null);\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseline - item.firstBaseline;\n if(diff !== 0) {\n item.__offsetX(diff, true, null);\n }\n }\n // 默认stretch\n else {\n let { computedStyle, currentStyle: {\n [WIDTH]: width,\n } } = item;\n let {\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_LEFT]: paddingLeft,\n } = computedStyle;\n if(width.u === AUTO) {\n let old = item.width;\n let v = item.__width = computedStyle[WIDTH] = maxCross - marginLeft - marginRight - paddingLeft - paddingRight - borderRightWidth - borderLeftWidth;\n let d = v - old;\n item.__x4 += d;\n item.__x5 += d;\n item.__x6 += d;\n item.__width += d;\n item.__clientWidth += d;\n item.__offsetWidth += d;\n item.__outerWidth += d;\n }\n }\n }\n }\n });\n }\n\n /**\n * inline比较特殊,先简单顶部对齐,后续还需根据vertical和lineHeight计算y偏移\n * inlineBlock复用逻辑,可以设置w/h,在混排时表现不同,inlineBlock换行限制在规定的矩形内,\n * 且ib会在没设置width且换行的时候撑满上一行,即便内部尺寸没抵达边界\n * 而inline换行则会从父容器start处开始,且首尾可能占用矩形不同\n * 嵌套inline情况十分复杂,尾部mpb空白可能产生叠加情况,因此endSpace表示自身,\n * 然后根据是否在最后一个元素进行叠加父元素的,多层嵌套则多层尾部叠加,均以最后一个元素为依据判断\n * Text获取这个叠加的endSpace值即可,无需感知是否最后一个,外层(此处)进行逻辑封装\n * @param data\n * @param isAbs\n * @param isColumn\n * @param isRow\n * @param isInline\n * @private\n */\n __layoutInline(data, isAbs, isColumn, isRow, isInline) {\n let { flowChildren, currentStyle, computedStyle } = this;\n let {\n [TEXT_ALIGN]: textAlign,\n [WHITE_SPACE]: whiteSpace,\n [LINE_CLAMP]: lineClamp,\n [LINE_HEIGHT]: lineHeight,\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n } = computedStyle;\n let lineClampCount = data.lineClampCount || 0;\n let { fixedWidth, fixedHeight, x, y, w, h, lx, ly,\n lineBoxManager, endSpace, selfEndSpace, isUpright } = this.__preLayout(data, isInline);\n // abs虚拟布局需预知width,固定可提前返回\n if(isAbs && (fixedWidth && !isUpright || fixedHeight && isUpright)) {\n if(isUpright) {\n this.__ioSize(undefined, h);\n }\n else {\n this.__ioSize(w, undefined);\n }\n return lineClampCount;\n }\n let {\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n if(isInline && !this.__isRealInline()) {\n isInline = false;\n }\n // inline-block假布局提前结束\n if(!isInline) {\n if(isColumn && fixedHeight) {\n this.__ioSize(undefined, h);\n return lineClampCount;\n }\n if(isRow && fixedWidth) {\n this.__ioSize(w, undefined);\n return lineClampCount;\n }\n }\n // 只有inline的孩子需要考虑换行后从行首开始,而ib不需要,因此重置行首标识lx为x,末尾空白为0\n // 而inline的LineBoxManager复用最近非inline父dom的,ib需要重新生成,末尾空白叠加\n if(isInline) {\n this.__isInline = true;\n this.__lineBoxManager = lineBoxManager;\n let baseline = isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle);\n // 特殊inline调用,有内容的话(如左右mbp),默认生成一个lineBox,即便是空,也要形成占位,只有开头时需要\n if(isUpright\n && (marginTop || marginBottom || paddingTop || paddingBottom || borderTopWidth || borderBottomWidth)\n || !isUpright\n && (marginLeft || marginRight || paddingLeft || paddingRight || borderLeftWidth || borderRightWidth)) {\n if(lineBoxManager.isNewLine) {\n lineBoxManager.genLineBoxByInlineIfNewLine(x, y, lineHeight, baseline);\n }\n else {\n lineBoxManager.setLbByInlineIfNotNewLine(lineHeight, baseline);\n }\n }\n else {\n lineBoxManager.setLbByInlineIfNotNewLine(lineHeight, baseline);\n }\n lineClamp = data.lineClamp || 0;\n }\n else {\n lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight,\n isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle), isUpright);\n lx = x;\n ly = y;\n endSpace = selfEndSpace = lineClampCount = 0;\n }\n // 存LineBox里的内容列表专用,布局过程中由lineBoxManager存入,递归情况每个inline节点都保存contentBox\n if(isInline) {\n this.contentBoxList.splice(0);\n lineBoxManager.pushContentBoxList(this);\n }\n // ib的bp是自己,inline是最近的非inline\n let bp = this;\n while(bp.computedStyle[DISPLAY] === 'inline') {\n bp = bp.domParent;\n }\n let {\n [OVERFLOW]: overflow,\n } = bp.computedStyle;\n let isIbFull = false, isUprightIbFull = false; // ib时不限定w情况下发生折行则撑满行,即便内容没有撑满边界\n let length = flowChildren.length;\n let ignoreNextLine = false; // lineClamp超过后,后面的均忽略并置none,注意ib内部自己统计类似block\n let ignoreNextWrap = false; // whiteSpace单行超过后,后面的均忽略并置none,注意和block不一样不隔断\n let hasAddEndSpace; // 最后一行生效,只加1次防重复\n flowChildren.forEach((item, i) => {\n // 和block不太一样可以提前判断,因为不可能包含block隔断区域了\n if(ignoreNextLine || ignoreNextWrap) {\n item.__layoutNone();\n return;\n }\n let isXom = item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom;\n if(isXom) {\n item.__computeReflow(); // writing-mode可能会造成inline改变为ib\n }\n let isInline2 = isXom && item.computedStyle[DISPLAY] === 'inline';\n let isInlineBlock2 = isXom && item.computedStyle[DISPLAY] === 'inlineBlock';\n let isRealInline = isInline2 && item.__isRealInline();\n // 最后一个元素会产生最后一行,叠加父元素的尾部mpb,注意只执行一次防止重复叠加\n let isEnd = isInline && !hasAddEndSpace\n && (whiteSpace === 'nowrap' || (!isXom && i === length - 1)\n || ((lineClamp && i === length - 1) || lineClampCount === lineClamp - 1));\n if(isEnd) {\n hasAddEndSpace = true;\n endSpace += selfEndSpace;\n }\n let lastLineClampCount = lineClampCount;\n if(isXom) {\n if(!isInline2 && !isInlineBlock2) {\n item.currentStyle[DISPLAY] = item.computedStyle[DISPLAY] = 'inlineBlock';\n isInlineBlock2 = true;\n inject.warn('Inline can not contain block/flex');\n }\n // x开头或者nowrap单行,不用考虑是否放得下直接放,因为有beginSpace所以要多判断i为0\n if((isUpright && y === ly) || (!isUpright && x === lx) || !i || whiteSpace === 'nowrap') {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n // 同block布局\n if(item.__isIbFull || item.__isUprightIbFull) {\n lineClampCount++;\n }\n if(item.__isIbFull && whiteSpace !== 'nowrap') {\n if(isUpright && h.u === AUTO) {\n isUprightIbFull = true;\n }\n else if(!isUpright && w.u === AUTO) {\n isIbFull = true;\n }\n lineBoxManager.addItem(item, true);\n if(isUpright) {\n x += item.outerWidth;\n y = ly;\n }\n else {\n x = lx;\n y += item.outerHeight;\n }\n lineBoxManager.setNotEnd();\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中,以计算宽度\n else {\n (isInlineBlock2 || !isRealInline) && lineBoxManager.addItem(item, false);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n if(!isAbs && overflow === 'hidden' && whiteSpace === 'nowrap'\n && ((isUpright && y - ly > h + (1e-10)) || (!isUpright && x - lx > w + (1e-10))\n || lineClampCount > lastLineClampCount)) {\n ignoreNextWrap = true;\n }\n else if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n }\n else {\n // 不换行继续排,换行非开头先尝试是否放得下,结尾要考虑mpb因此减去endSpace\n let free = item.__tryLayInline(isUpright ? (h + ly - y - endSpace) : (w + lx - x - endSpace), isUpright ? h : w, isUpright);\n // 放得下继续\n if(free >= (-1e-10)) {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n // ib放得下要么内部没有折行,要么声明了width限制,都需手动存入当前lb\n (isInlineBlock2 || !isRealInline) && lineBoxManager.addItem(item, false);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n }\n // 放不下处理之前的lineBox,并重新开头\n else {\n lineClampCount++;\n if(isUpright) {\n x = lineBoxManager.endX;\n y = ly;\n }\n else {\n x = lx;\n y = lineBoxManager.endY;\n }\n lineBoxManager.setNewLine();\n // 可能超行了,无需继续,并且进行回溯\n if(lineClamp && lineClampCount >= lineClamp) {\n item.__layoutNone();\n ignoreNextLine = true;\n let list = lineBoxManager.list;\n let lineBox = list[list.length - 1];\n backtrack(bp, lineBoxManager, lineBox, w, endSpace, isUpright);\n return;\n }\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n // 重新开头的ib和上面开头处一样逻辑\n if(item.__isIbFull || item.__isUprightIbFull) {\n lineBoxManager.addItem(item, true);\n if(isUpright) {\n x += item.outerWidth;\n y = ly;\n }\n else {\n x = lx;\n y += item.outerHeight;\n }\n lineBoxManager.setNotEnd();\n lineClampCount++;\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中\n else {\n (isInlineBlock2 || !isRealInline) && lineBoxManager.addItem(item, false);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n }\n }\n }\n // inline里的其它只有文本,可能开始紧跟着之前的x,也可能换行后从lx行头开始\n // 紧跟着x可能出现在前面有节点换行后第2行,此时不一定放得下,因此不能作为判断依据,开头仅有lx\n else {\n let n = lineBoxManager.size;\n // i为0时强制不换行\n if((isUpright && y === ly) || (!isUpright && x === lx) || !i || whiteSpace === 'nowrap') {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n // ib情况发生折行,且非定宽\n if(!isInline && (lineBoxManager.size - n) > 1) {\n if(height.u === AUTO && isUpright) {\n isUprightIbFull = true;\n }\n if(width.u === AUTO && !isUpright) {\n isIbFull = true;\n }\n }\n if(!isAbs && overflow === 'hidden' && whiteSpace === 'nowrap'\n && ((isUpright && y - ly > h + (1e-10)) || (!isUpright && x - lx > w + (1e-10))\n || lineClampCount > lastLineClampCount)) {\n ignoreNextWrap = true;\n }\n else if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n }\n else {\n // 非开头先尝试是否放得下,如果放得下再看是否end,加end且只有1个字时放不下要换行,否则可以放,换行由text内部做\n let free = item.__tryLayInline(isUpright ? (h + ly - y - endSpace) : (w + lx - x - endSpace));\n // 放得下继续\n if(free >= (-1e-10)) {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n // 这里ib放得下一定是要么没换行要么固定宽度,所以无需判断isIbFull\n }\n // 放不下处理之前的lineBox,并重新开头\n else {\n lineClampCount++;\n if(isUpright) {\n x = lineBoxManager.endX;\n y = ly;\n }\n else {\n x = lx;\n y = lineBoxManager.endY;\n }\n lineBoxManager.setNewLine();\n // 可能超行了,无需继续,并且进行回溯\n if(lineClamp && lineClampCount >= lineClamp) {\n item.__layoutNone();\n ignoreNextLine = true;\n let list = lineBoxManager.list;\n let lineBox = list[list.length - 1];\n backtrack(bp, lineBoxManager, lineBox, w, endSpace, isUpright);\n return;\n }\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n // ib情况发生折行\n if(!isInline && (lineBoxManager.size - n) > 1) {\n if(height.u === AUTO && isUpright) {\n isUprightIbFull = true;\n }\n if(width.u === AUTO && !isUpright) {\n isIbFull = true;\n }\n }\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n }\n }\n }\n });\n // 同block结尾,不过这里一定是lineBox结束,无需判断\n if(isUpright) {\n x = lineBoxManager.endX;\n }\n else {\n y = lineBoxManager.endY;\n }\n // 标识ib情况同block一样占满行\n this.__isIbFull = isIbFull;\n this.__isUprightIbFull = isUprightIbFull;\n // 元素的width在固定情况或者ibFull情况已被计算出来,否则为最大延展尺寸,inline没有固定尺寸概念\n let tw, th;\n if(isInline) {\n // inline最后的x要算上右侧mpb,为next行元素提供x坐标基准,同时其尺寸计算比较特殊\n if(selfEndSpace) {\n if(isUpright) {\n lineBoxManager.addY(selfEndSpace);\n }\n else {\n lineBoxManager.addX(selfEndSpace);\n }\n }\n // 如果没有内容,空白还要加上开头即左侧mpb\n if(!flowChildren.length) {\n let {\n [MARGIN_TOP]: marginTop,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = computedStyle;\n if(isUpright) {\n lineBoxManager.addY(marginTop + paddingTop + borderTopWidth);\n }\n else {\n lineBoxManager.addX(marginLeft + paddingLeft + borderLeftWidth);\n }\n }\n // 结束出栈contentBox,递归情况结束子inline获取contentBox,父inline继续\n lineBoxManager.popContentBoxList();\n // abs非固定w时预计算,本来是最近非inline父层统一计算,但在abs时不算,这里无视textAlign默认left\n if(isAbs) {\n this.__inlineSize(0, 'left', isUpright);\n }\n }\n else {\n // ib在满时很特殊,取最大值,可能w本身很小不足排下1个字符,此时要用max\n let max = lineBoxManager.max - (isUpright ? data.y : data.x);\n if(isUpright) {\n tw = fixedWidth ? w : x - data.x;\n th = fixedHeight ? h : (isIbFull ? Math.max(h, max) : max);\n }\n else {\n tw = fixedWidth ? w : (isIbFull ? Math.max(w, max) : max);\n th = fixedHeight ? h : y - data.y;\n }\n this.__ioSize(tw, th);\n }\n // 非abs提前虚拟布局,真实布局情况下最后为所有行内元素进行2个方向上的对齐,inline会被父级调用这里只看ib\n if(!isAbs && !isInline) {\n let spread = lineBoxManager.verticalAlign(isUpright);\n if(spread) {\n if(isUpright && !fixedWidth) {\n this.__resizeX(spread, null);\n }\n else if(!isUpright && !fixedHeight) {\n this.__resizeY(spread, null);\n }\n }\n if(!isColumn && !isRow) {\n if(['center', 'right'].indexOf(textAlign) > -1) {\n lineBoxManager.horizonAlign(isUpright ? th : tw, textAlign, isUpright);\n // 直接text需计算size\n flowChildren.forEach(item => {\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Text) {\n item.__inlineSize(isUpright);\n }\n });\n }\n // block的所有inline计算size\n lineBoxManager.domList.forEach(item => {\n item.__inlineSize(isUpright ? th : tw, textAlign, isUpright);\n });\n }\n }\n // inlineBlock新开上下文,但父级block遇到要处理换行\n return lineClampCount;\n }\n\n /**\n * inline的尺寸计算非常特殊,并非一个矩形区域,而是由字体行高结合节点下多个LineBox中的内容决定,\n * 且这个尺寸又并非真实LineBox中的内容直接合并计算而来,比如包含了个更大尺寸的ib却不会计入\n * 具体方法为遍历持有的LineBox下的内容,x取两侧极值,同时首尾要考虑mpb,y值取上下极值,同样首尾考虑mpb\n * 首尾行LineBox可能不是不是占满一行,比如前后都有同行inline的情况,非首尾行则肯定占满\n * 绘制内容(如背景色)的区域也很特殊,每行LineBox根据lineHeight对齐baseline得来,并非LineBox全部\n * 当LineBox只有直属Text时如果font没有lineGap则等价于全部,如有则需减去\n * 另外其client/offset/outer的w/h尺寸计算也很特殊,皆因首尾x方向的mpb导致\n * @private\n */\n __inlineSize(size, textAlign, isUpright) {\n let { contentBoxList, computedStyle } = this;\n let {\n [DISPLAY]: display,\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n // 可能因为Ellipsis回溯变成none\n if(display === 'none') {\n return;\n }\n // x/clientX/offsetX/outerX\n let maxX, maxY, minX, minY, maxCX, maxCY, minCX, minCY, maxFX, maxFY, minFX, minFY, maxOX, maxOY, minOX, minOY;\n let length = contentBoxList.length;\n if(length) {\n // 遍历contentBox,里面存的是LineBox内容,根据父LineBox引用判断是否换行\n contentBoxList.forEach((item, i) => {\n // 非第一个除了minY不用看其它都要,minX是换行导致,而maxX在最后一个要考虑右侧mpb,中间的无需考虑嵌套inline的mpb\n if(i) {\n minX = Math.min(minX, item.x);\n minCX = Math.min(minCX, item.x);\n minFX = Math.min(minFX, item.x);\n minOX = Math.min(minOX, item.x);\n if(i === length - 1) {\n maxX = maxCX = maxFX = maxOX = Math.max(maxX, item.x + item.outerWidth);\n maxY = maxCY = maxFY = maxOY = Math.max(maxY, item.y + item.outerHeight);\n maxCX += paddingRight;\n maxCY += paddingBottom;\n maxFX += paddingRight + borderRightWidth;\n maxFY += paddingBottom + borderBottomWidth;\n maxOX += borderRightWidth + paddingRight + marginRight\n maxOY += borderBottomWidth + paddingBottom + marginBottom;\n }\n else {\n maxX = maxCX = maxFX = maxOX = Math.max(maxX, item.x + item.outerWidth);\n }\n }\n // 第一个初始化\n else {\n minX = item.x;\n minY = item.y;\n minCX = minX - paddingLeft;\n minCY = minY - paddingTop;\n minFX = minCX - borderLeftWidth;\n minFY = minCY - borderTopWidth;\n minOX = minFX - marginLeft;\n minOY = minFY - marginTop;\n maxX = maxCX = maxFX = maxOX = item.x + item.outerWidth;\n maxY = maxCY = maxFY = maxOY = item.y + item.outerHeight;\n if(i === length - 1) {\n maxCX += paddingRight;\n maxCY += paddingBottom;\n maxFX += paddingRight + borderRightWidth;\n maxFY += paddingBottom + borderBottomWidth;\n maxOX += borderRightWidth + paddingRight + marginRight\n maxOY += borderBottomWidth + paddingBottom + marginBottom;\n }\n }\n });\n this.__x = minOX;\n this.__y = minOY;\n this.__width = computedStyle[WIDTH] = maxX - minX;\n // 防止比自己最小高度lineHeight还小,比如内容是个小字体\n this.__height = computedStyle[HEIGHT] = Math.max(lineHeight, maxY - minY);\n this.__clientWidth = maxCX - minCX;\n this.__clientHeight = maxCY - minCY;\n this.__offsetWidth = maxFX - minFX;\n this.__offsetHeight = maxFY - minFY;\n this.__outerWidth = maxOX - minOX;\n this.__outerHeight = maxOY - minOY;\n this.__x1 = minFX;\n this.__y1 = minFY;\n this.__x2 = minCX;\n this.__y2 = minCY;\n this.__x3 = minX;\n this.__y3 = minY;\n this.__x4 = maxX;\n this.__y4 = maxY;\n this.__x5 = maxCX;\n this.__y5 = maxCY;\n this.__x6 = maxFX;\n this.__y6 = maxFY;\n // inline的text整体设置相同\n if(['center', 'right'].indexOf(textAlign) > -1) {\n this.children.forEach(item => {\n if(item instanceof Text) {\n item.__inlineSize(isUpright);\n }\n });\n }\n }\n // 如果没有内容,宽度为0高度为lineHeight,对齐也特殊处理,lineBoxManager不会处理\n else {\n let tw = 0, th = 0;\n if(['center', 'right'].indexOf(textAlign) > -1) {\n let diff = size;\n if(textAlign === 'center') {\n diff *= 0.5;\n }\n if(diff > 0) {\n if(isUpright) {\n this.__offsetY(diff, true, null);\n }\n else {\n this.__offsetX(diff, true, null);\n }\n }\n }\n if(isUpright) {\n tw = lineHeight;\n this.__ioSize(tw, 0);\n this.__x -= marginLeft + paddingLeft + borderLeftWidth;\n }\n else {\n th = lineHeight;\n this.__ioSize(0, th);\n this.__y -= marginTop + paddingTop + borderTopWidth;\n }\n this.__x1 = this.__x + marginLeft;\n this.__y1 = this.__y + marginTop;\n this.__x2 = this.__x1 + borderLeftWidth;\n this.__y2 = this.__y1 + borderTopWidth;\n this.__x4 = this.__x3 = this.__x2 + paddingLeft;\n this.__y4 = this.__y3 = this.__y2 + paddingTop;\n this.__x5 = this.__x4 + tw + paddingRight;\n this.__y5 = this.__y4 + th + paddingBottom;\n this.__x6 = this.__x5 + borderRightWidth;\n this.__y6 = this.__y5 + borderBottomWidth;\n this.__clientWidth = this.__x5 - this.__x2;\n this.__clientHeight = this.__y5 - this.__y2;\n this.__offsetWidth = this.__x6 - this.__x1;\n this.__offsetHeight = this.__y6 - this.__y1;\n this.__outerWidth = this.__offsetWidth + marginLeft + marginRight;\n this.__outerHeight = this.__offsetHeight + marginTop + marginBottom;\n }\n }\n\n /**\n * 只针对绝对定位children布局\n * @param container\n * @param data\n * @param target 可选,只针对某个abs的child特定布局,在局部更新时用\n * @private\n */\n __layoutAbs(container, data, target) {\n let { __x: x, __y: y,\n __clientWidth: clientWidth, __clientHeight: clientHeight,\n __computedStyle: computedStyle } = container;\n let { __isDestroyed: isDestroyed, children, absChildren } = this;\n let {\n [DISPLAY]: display,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_TOP]: paddingTop,\n } = computedStyle;\n if(isDestroyed || display === 'none') {\n this.__layoutNone();\n return;\n }\n x += marginLeft + borderLeftWidth;\n y += marginTop + borderTopWidth;\n // 对absolute的元素进行相对容器布局\n absChildren.forEach(item => {\n if(target) {\n // 传入target局部布局更新,这时候如果是Component引发的,当setState时是Cp自身,当layout时是sr\n let node = item;\n if(node instanceof Component) {\n node = item.shadowRoot;\n }\n // 所以得2个都对比\n if(target !== node && target !== item) {\n return;\n }\n }\n let { currentStyle, computedStyle } = item;\n if(item.isDestroyed || currentStyle[DISPLAY] === 'none') {\n item.__layoutNone();\n return;\n }\n // 先根据容器宽度计算margin/padding,匿名块对象特殊处理,此时没有computedStyle\n item.__computeReflow();\n item.__mp(currentStyle, computedStyle, clientWidth);\n let {\n [LEFT]: left,\n [TOP]: top,\n [RIGHT]: right,\n [BOTTOM]: bottom,\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n let x2, y2, w2, h2;\n let onlyRight;\n let onlyBottom;\n let fixedTop;\n let fixedRight;\n let fixedBottom;\n let fixedLeft;\n // 判断何种方式的定位,比如左+宽度,左+右之类\n if(left.u !== AUTO) {\n fixedLeft = true;\n computedStyle[LEFT] = this.__calSize(left, clientWidth, true);\n }\n else {\n computedStyle[LEFT] = 'auto';\n }\n if(right.u !== AUTO) {\n fixedRight = true;\n computedStyle[RIGHT] = this.__calSize(right, clientWidth, true);\n }\n else {\n computedStyle[RIGHT] = 'auto';\n }\n if(top.u !== AUTO) {\n fixedTop = true;\n computedStyle[TOP] = this.__calSize(top, clientHeight, true);\n }\n else {\n computedStyle[TOP] = 'auto';\n }\n if(bottom.u !== AUTO) {\n fixedBottom = true;\n computedStyle[BOTTOM] = this.__calSize(bottom, clientHeight, true);\n }\n else {\n computedStyle[BOTTOM] = 'auto';\n }\n // 优先级最高left+right,其次left+width,再次right+width,再次仅申明单个,最次全部auto\n if(fixedLeft && fixedRight) {\n x2 = x + computedStyle[LEFT];\n w2 = clientWidth - computedStyle[RIGHT] - computedStyle[LEFT];\n }\n else if(fixedLeft) {\n x2 = x + computedStyle[LEFT];\n if(width.u !== AUTO) {\n w2 = this.__calSize(width, clientWidth, true);\n }\n }\n else if(fixedRight) {\n if(width.u !== AUTO) {\n w2 = this.__calSize(width, clientWidth, true);\n }\n else {\n onlyRight = true;\n }\n x2 = x + clientWidth - computedStyle[RIGHT] - (w2 || 0);\n // 右对齐有尺寸时还需减去margin/border/padding的\n x2 -= computedStyle[MARGIN_LEFT];\n x2 -= computedStyle[MARGIN_RIGHT];\n x2 -= computedStyle[PADDING_LEFT];\n x2 -= computedStyle[PADDING_RIGHT];\n x2 -= computedStyle[BORDER_LEFT_WIDTH];\n x2 -= computedStyle[BORDER_RIGHT_WIDTH];\n }\n else {\n x2 = x + paddingLeft;\n if(width.u !== AUTO) {\n w2 = this.__calSize(width, clientWidth, true);\n }\n }\n // top/bottom/height优先级同上\n if(fixedTop && fixedBottom) {\n y2 = y + computedStyle[TOP];\n h2 = clientHeight - computedStyle[TOP] - computedStyle[BOTTOM];\n }\n else if(fixedTop) {\n y2 = y + computedStyle[TOP];\n if(height.u !== AUTO) {\n h2 = this.__calSize(height, clientHeight, true);\n }\n }\n else if(fixedBottom) {\n if(height.u !== AUTO) {\n h2 = this.__calSize(height, clientHeight, true);\n }\n else {\n onlyBottom = true;\n }\n y2 = y + clientHeight - computedStyle[BOTTOM] - (h2 || 0);\n // 底对齐有尺寸时y值还需减去margin/border/padding的\n y2 -= computedStyle[MARGIN_TOP];\n y2 -= computedStyle[MARGIN_BOTTOM];\n y2 -= computedStyle[PADDING_TOP];\n y2 -= computedStyle[PADDING_BOTTOM];\n y2 -= computedStyle[BORDER_TOP_WIDTH];\n y2 -= computedStyle[BORDER_BOTTOM_WIDTH];\n }\n // 未声明y的找到之前的流布局child,紧随其下\n else {\n y2 = y + paddingTop;\n let prev = item.__prev, mtList = [], mbList = [];\n while(prev) {\n // 以前面的flow的最近的prev末尾为准\n if(prev instanceof Text || (prev instanceof Component && prev.shadowRoot instanceof Text)\n || prev.computedStyle[POSITION] !== 'absolute') {\n // 当prev是空白节点时,还要考虑margin合并的影响\n let cps = prev.computedStyle;\n if(prev.clientHeight <= 0) {\n mtList.push(cps[MARGIN_TOP]);\n mbList.push(cps[MARGIN_BOTTOM]);\n }\n else {\n mbList.push(cps[MARGIN_BOTTOM]);\n let t = reflow.getMergeMargin(mtList, mbList);\n y2 = prev.__y1 + prev.offsetHeight + t.target;\n break;\n }\n }\n prev = prev.__prev;\n }\n if(height.u !== AUTO) {\n h2 = this.__calSize(height, clientHeight, true);\n }\n }\n // onlyRight时做的布局其实是以那个点位为left/top布局然后offset,limit要特殊计算,从本点向左侧为边界\n let widthLimit = onlyRight ? x2 - x : clientWidth + x - x2;\n // onlyBottom相同,正常情况是左上到右下的尺寸限制\n let heightLimit = onlyBottom ? y2 - y : clientHeight + y - y2;\n // 未直接或间接定义尺寸,取特殊孩子宽度的最大值,同时不能超限\n if(w2 === undefined) {\n item.__layoutFlow({\n x: x2,\n y: y2,\n w: widthLimit,\n h: heightLimit,\n isUpright: data.isUpright, // 父亲的\n container,\n }, true, false);\n widthLimit = item.outerWidth;\n }\n // 这里用包裹方法标明要递归计算computedStyle\n item.__layoutFlow({\n x: x2,\n y: y2,\n w: widthLimit,\n h: heightLimit,\n w2, // left+right这种等于有宽度,但不能修改style,继续传入到__preLayout中特殊对待\n h2,\n isUpright: data.isUpright,\n container,\n }, false, false);\n if(onlyRight) {\n item.__offsetX(-item.outerWidth, true, null);\n }\n if(onlyBottom) {\n item.__offsetY(-item.outerHeight, true, null);\n }\n item.__layoutStyle();\n });\n // 递归进行,遇到absolute/relative/component的设置新容器\n children.forEach(item => {\n if(target) {\n // 传入target局部布局更新,这时候如果是Component引发的,当setState时是Cp自身,当layout时是sr\n let node = item;\n if(node instanceof Component) {\n node = item.shadowRoot;\n }\n // 所以得2个都对比\n if(target !== node && target !== item) {\n return;\n }\n }\n if(item instanceof Dom) {\n item.__layoutAbs(isRelativeOrAbsolute(item) ? item : container, data, null);\n }\n else if(item instanceof Component) {\n let sr = item.shadowRoot;\n if(sr instanceof Dom) {\n sr.__layoutAbs(sr, data, null);\n }\n }\n });\n // 根节点自己特殊执行,不在layout统一\n this.__execAr();\n }\n\n render(renderMode, ctx, dx, dy) {\n let res = super.render(renderMode, ctx, dx, dy);\n let ep = this.__ellipsis;\n if(ep) {\n ep.render(renderMode, res.ctx, dx, dy)\n }\n if(renderMode === SVG) {\n this.virtualDom.type = 'dom';\n }\n return res;\n }\n\n __destroy() {\n if(this.isDestroyed) {\n return;\n }\n this.children.forEach(child => {\n // 有可能为空,因为diff过程中相同的cp被移到新的vd中,老的防止destroy设null\n if(child) {\n child.__destroy();\n }\n });\n if(this.__ellipsis) {\n this.__ellipsis.__destroy();\n }\n super.__destroy();\n }\n\n __emitEvent(e, pm, force) {\n if(force) {\n return super.__emitEvent(e, force);\n }\n let { __isDestroyed, __computedStyle: computedStyle, __mask, __cacheTotal } = this;\n if(__isDestroyed || computedStyle[DISPLAY] === 'none' || e.__stopPropagation || __mask) {\n return;\n }\n // 检查perspective嵌套状态,自身有perspective则设置10位,自身有transform的p矩阵则设置01位\n // if(computedStyle[PERSPECTIVE]) {\n // perspectiveNest++;\n // }\n // if(tf.isPerspectiveMatrix(computedStyle[TRANSFORM])) {\n // perspectiveTfNest++;\n // }\n // overflow:hidden时还需要判断是否超出范围外,如果是则无效\n if(computedStyle[OVERFLOW] === 'hidden' && !this.willResponseEvent(e, true)) {\n return;\n }\n // __cacheTotal可提前判断是否在bbox范围内,svg没有bbox防止进入判断\n if(__cacheTotal && __cacheTotal.available && __cacheTotal.bbox) {\n // 不是E的话,因为缓存缘故影响cache的子元素,先左乘可能的父matrix(嵌套cache),再赋值给pm递归传下去\n if(!isE(this.__matrix)) {\n pm = multiply(pm, this.__matrix);\n assignMatrix(this.__matrixEvent, pm);\n }\n else if(this.__perspectiveMatrix) {\n pm = this.__perspectiveMatrix;\n }\n let bbox = __cacheTotal.bbox;\n if(!geom.pointInQuadrilateral(\n e.x, e.y,\n bbox[0], bbox[1],\n bbox[2], bbox[1],\n bbox[2], bbox[3],\n bbox[0], bbox[3], this.__matrixEvent)) {\n return;\n }\n }\n // 递归传下来的pm如果有说明是cache的子元素且需要重新计算matrix\n else if(!mx.isE(pm)) {\n util.assignMatrix(this.__matrixEvent, mx.multiply(pm, this.__matrix));\n }\n // 找到对应的callback\n let { event: { type } } = e;\n let { listener, zIndexChildren } = this;\n let cb;\n if(listener.hasOwnProperty(type)) {\n cb = listener[type];\n }\n // child触发则parent一定触发\n for(let i = zIndexChildren.length - 1; i >=0; i--) {\n let child = zIndexChildren[i];\n if(child instanceof Xom\n || child instanceof Component && child.shadowRoot instanceof Xom) {\n if(child.__emitEvent(e, pm, false)) {\n // 孩子阻止冒泡\n if(e.__stopPropagation) {\n return;\n }\n if(isFunction(cb) && !e.__stopImmediatePropagation) {\n cb.call(this, e);\n }\n return true;\n }\n }\n }\n // child不触发再看自己\n return super.__emitEvent(e, false);\n }\n\n appendChild(child, cb) {\n let { __root: root, __host: host, __children: children } = this;\n if(!(child instanceof Node || child instanceof Component)) {\n child = new Text(child);\n }\n child.remove();\n // 只设兄弟/parent,children在relation做,离屏则等真实添加时机\n let len = children.length;\n if(len) {\n let last = children[len - 1];\n last.__next = child;\n child.__prev = last;\n }\n child.__parent = this;\n children.push(child);\n let zIndexChildren = this.__zIndexChildren = genZIndexChildren(this);\n // 离屏情况,不刷新\n if(this.__isDestroyed) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 在dom中则整体设置关系和struct,不可见提前跳出\n builder.relation(root, host, this, child, {});\n this.__insertStruct(child, zIndexChildren.indexOf(child));\n // 可能为component,不能用__currentStyle\n if(child.currentStyle[DISPLAY] === 'none' || this.__computedStyle[DISPLAY] === 'none') {\n child.__layoutNone();\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 在reflow过程中设置struct,text视为父变更\n if(child instanceof Text) {\n child = this;\n }\n root.__addUpdate(child, null, REFLOW, true, null, null, cb);\n }\n\n prependChild(child, cb) {\n let { __root: root, __host: host, __children: children } = this;\n if(!(child instanceof Node || child instanceof Component)) {\n child = new Text(child);\n }\n child.remove();\n // 只设兄弟/parent,children在relation做,离屏则等真实添加时机\n let len = children.length;\n if(len) {\n let first = children[0];\n first.__prev = child;\n child.__next = first;\n }\n child.__parent = this;\n children.unshift(child);\n let zIndexChildren = this.__zIndexChildren = genZIndexChildren(this);\n // 离屏情况,不刷新\n if(this.__isDestroyed) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 在dom中则整体设置关系和struct,不可见提前跳出\n builder.relation(root, host, this, child, {});\n this.__insertStruct(child, zIndexChildren.indexOf(child));\n // 可能为component,不能用__currentStyle\n if(child.currentStyle[DISPLAY] === 'none' || this.__computedStyle[DISPLAY] === 'none') {\n child.__layoutNone();\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 可见在reflow过程中设置struct\n if(child instanceof Text) {\n child = this;\n }\n root.__addUpdate(child, null, REFLOW, true, null, null, cb);\n }\n\n insertBefore(child, cb) {\n let { __root: root } = this;\n if(!(child instanceof Node || child instanceof Component)) {\n child = new Text(child);\n }\n child.remove();\n let parent = this.isShadowRoot ? this.__hostRoot.__parent: this.__parent;\n let i;\n // 即便没被添加到dom中,也有可能有父节点,除非是离屏根节点,注意组件\n if(parent) {\n let children = parent.__children;\n let target = this.isShadowRoot ? this.__hostRoot : this;\n i = children.indexOf(target);\n if(i === -1) {\n throw new Error('Index exception of insertBefore()');\n }\n let prev = target.__prev;\n if(prev) {\n prev.__next = child;\n child.__prev = prev;\n }\n child.__next = target;\n target.__prev = child;\n children.splice(i, 0, child);\n parent.__zIndexChildren = genZIndexChildren(parent);\n }\n else {\n throw new Error('InsertBefore() illegal');\n }\n // 离屏情况,不刷新\n if(this.__isDestroyed) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 在dom中则整体设置关系和struct,不可见提前跳出\n builder.relation(root, parent.__host, parent, child, {});\n parent.__insertStruct(child, parent.__zIndexChildren.indexOf(child));\n if(child.currentStyle[DISPLAY] === 'none' || parent.__computedStyle[DISPLAY] === 'none') {\n child.__layoutNone();\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n if(child instanceof Text) {\n child = parent;\n }\n root.__addUpdate(child, null, REFLOW, true, null, null, cb);\n }\n\n insertAfter(child, cb) {\n let { __root: root } = this;\n if(!(child instanceof Node || child instanceof Component)) {\n child = new Text(child);\n }\n child.remove();\n let parent = this.isShadowRoot ? this.__hostRoot.__parent: this.__parent;\n let i;\n // 即便没被添加到dom中,也有可能有父节点,除非是离屏根节点,注意组件\n if(parent) {\n let children = parent.__children;\n let target = this.isShadowRoot ? this.__hostRoot : this;\n i = children.indexOf(target);\n if(i === -1) {\n throw new Error('Index exception of insertBefore()');\n }\n target.__next = child;\n child.__prev = target;\n children.splice(i + 1, 0, child);\n parent.__zIndexChildren = genZIndexChildren(parent);\n }\n else {\n throw new Error('InsertAfter() illegal');\n }\n // 离屏情况,不刷新\n if(this.__isDestroyed) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 在dom中则整体设置关系和struct,不可见提前跳出\n builder.relation(root, parent.__host, parent, child, {});\n parent.__insertStruct(child, parent.__zIndexChildren.indexOf(child));\n if(child.currentStyle[DISPLAY] === 'none' || parent.__computedStyle[DISPLAY] === 'none') {\n child.__layoutNone();\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n if(child instanceof Text) {\n child = parent;\n }\n root.__addUpdate(child, null, REFLOW, true, null, null, cb);\n }\n\n removeChild(target, cb) {\n if((target.__parent === this || target.__domParent === this)\n && (target instanceof Node || target instanceof Component)) {\n target.remove(cb);\n }\n else {\n inject.error('Invalid parameter of removeChild()');\n }\n }\n\n get children() {\n return this.__children;\n }\n\n get flowChildren() {\n return this.__children.filter(item => {\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n return item instanceof Text || item.__currentStyle[POSITION] !== 'absolute';\n });\n }\n\n get absChildren() {\n return this.__children.filter(item => {\n if(item instanceof Component) {\n item = item.__shadowRoot;\n }\n return item instanceof Xom && item.__currentStyle[POSITION] === 'absolute';\n });\n }\n\n get zIndexChildren() {\n return this.__zIndexChildren;\n }\n\n get lineBoxManager() {\n return this.__lineBoxManager;\n }\n\n get baseline() {\n let {\n [MARGIN_TOP]: marginTop,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [PADDING_TOP]: paddingTop,\n [WRITING_MODE]: writingMode,\n } = this.computedStyle;\n if(!this.lineBoxManager || !this.lineBoxManager.size\n || writingMode.indexOf('vertical') === 0) {\n return this.offsetHeight;\n }\n return marginTop + borderTopWidth + paddingTop + this.lineBoxManager.baseline;\n }\n\n get firstBaseline() {\n if(!this.lineBoxManager || !this.lineBoxManager.size) {\n return this.offsetHeight;\n }\n let {\n [MARGIN_TOP]: marginTop,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [PADDING_TOP]: paddingTop,\n } = this.computedStyle;\n return marginTop + borderTopWidth + paddingTop + this.lineBoxManager.firstBaseline;\n }\n\n get verticalBaseline() {\n if(!this.lineBoxManager || !this.lineBoxManager.size) {\n return 0;\n }\n let {\n [MARGIN_LEFT]: marginLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [PADDING_LEFT]: paddingLeft,\n [WRITING_MODE]: writingMode,\n } = this.computedStyle;\n if(!this.lineBoxManager || !this.lineBoxManager.size\n || writingMode.indexOf('vertical') === -1) {\n return 0;\n }\n return marginLeft + borderLeftWidth + paddingLeft + this.lineBoxManager.verticalBaseline;\n }\n}\n\nexport default Dom;\n","import Dom from './Dom';\nimport mode from '../refresh/mode';\nimport painter from '../util/painter';\nimport inject from '../util/inject';\nimport util from '../util/util';\nimport enums from '../util/enums';\nimport unit from '../style/unit';\nimport image from '../style/image';\nimport border from '../style/border';\nimport level from '../refresh/level';\nimport mx from '../math/matrix';\nimport geom from '../math/geom';\n\nconst {\n STYLE_KEY: {\n WIDTH,\n HEIGHT,\n DISPLAY,\n BORDER_RIGHT_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n VISIBILITY,\n MARGIN_RIGHT,\n MARGIN_LEFT,\n PADDING_RIGHT,\n PADDING_LEFT,\n FONT_SIZE,\n FLEX_BASIS,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, REM, VW, VH, VMAX, VMIN } = unit;\nconst { canvasPolygon, svgPolygon } = painter;\nconst { isFunction } = util;\n\nclass Img extends Dom {\n constructor(tagName, props) {\n super(tagName, props);\n let src = this.props.src;\n let loadImg = this.__loadImg = {\n src,\n };\n // 空url用错误图代替\n if(!src) {\n loadImg.error = true;\n }\n else {\n let ca = inject.IMG[src];\n if(!ca) {\n inject.measureImg(src, null);\n }\n else if(ca && ca.state === inject.LOADED) {\n loadImg.source = ca.source;\n loadImg.width = loadImg.__width = ca.width;\n loadImg.height = loadImg.__height = ca.height;\n }\n }\n }\n\n /**\n * 覆盖xom的方法,在__layout()3个分支中会首先被调用\n * 当样式中固定宽高时,图片按样式尺寸,加载后重新绘制即可\n * 只固定宽高一个时,加载完要计算缩放比,重新布局绘制\n * 都没有固定,按照图片尺寸,重新布局绘制\n * 这里计算非固定的情况,将其改为固定供布局渲染使用,未加载完成为0\n */\n __preLayout(data, isInline) {\n let res = super.__preLayout(data, false);\n let loadImg = this.__loadImg;\n // 可能已提前加载好了,或有缓存,为减少刷新直接使用\n let src = loadImg.src;\n if(src) {\n let cache = inject.IMG[src];\n if(!cache || cache.state === inject.LOADING) {\n if(!loadImg.loading) {\n this.__loadAndRefresh(loadImg, null);\n }\n }\n else if(cache && cache.state === inject.LOADED && cache.success) {\n loadImg.source = cache.source;\n loadImg.width = loadImg.__width = cache.width;\n loadImg.height = loadImg.__height = cache.height;\n }\n loadImg.cache = false;\n }\n if(res.fixedWidth && res.fixedHeight) {\n return res;\n }\n if(loadImg.error && !this.props.placeholder) {\n if(res.fixedWidth) {\n res.h = res.w;\n }\n else if(res.fixedHeight) {\n res.w = res.h;\n }\n else {\n res.w = res.h = 32;\n }\n }\n else if(loadImg.source) {\n if(res.fixedWidth) {\n res.h = res.w * loadImg.height / loadImg.width;\n }\n else if(res.fixedHeight) {\n res.w = res.h * loadImg.width / loadImg.height;\n }\n else {\n res.w = loadImg.width;\n res.h = loadImg.height;\n }\n }\n else {\n res.w = res.h = 0;\n }\n res.fixedWidth = true;\n res.fixedHeight = true;\n return res;\n }\n\n __addGeom(tagName, props) {\n props = util.hash2arr(props);\n this.__virtualDom.children.push({\n type: 'item',\n tagName,\n props,\n });\n }\n\n // img根据加载情况更新__hasContent,同时识别是否仅有图片内容本身,多个相同图片视为同一个资源\n calContent(__currentStyle, __computedStyle) {\n let res = super.calContent(__currentStyle, __computedStyle);\n let {\n __loadImg: loadImg,\n } = this;\n if(!res) {\n loadImg.onlyImg = true;\n if(__computedStyle[VISIBILITY] !== 'hidden' && (__computedStyle[WIDTH] || __computedStyle[HEIGHT])\n && loadImg.source) {\n res = true;\n }\n }\n else {\n loadImg.onlyImg = false;\n }\n return res;\n }\n\n render(renderMode, ctx, dx = 0, dy = 0) {\n let res = super.render(renderMode, ctx, dx, dy);\n let {\n width, height, __isDestroyed,\n props: {\n placeholder,\n },\n __computedStyle: {\n [DISPLAY]: display,\n [BORDER_TOP_LEFT_RADIUS]: borderTopLeftRadius,\n [BORDER_TOP_RIGHT_RADIUS]: borderTopRightRadius,\n [BORDER_BOTTOM_RIGHT_RADIUS]: borderBottomRightRadius,\n [BORDER_BOTTOM_LEFT_RADIUS]: borderBottomLeftRadius,\n [VISIBILITY]: visibility,\n },\n virtualDom,\n __loadImg: loadImg,\n } = this;\n if(__isDestroyed || display === 'none' || visibility === 'hidden' || renderMode === mode.WEBGL) {\n return res;\n }\n let originX, originY;\n originX = res.x3 + dx;\n originY = res.y3 + dy;\n // 根据配置以及占位图显示error\n let source = loadImg.source;\n if(loadImg.error && !placeholder && Img.showError) {\n let strokeWidth = Math.min(width, height) * 0.02;\n let stroke = '#CCC';\n let fill = '#DDD';\n let cx = originX + width * 0.7;\n let cy = originY + height * 0.3;\n let r = strokeWidth * 5;\n let pts = [\n [originX + width * 0.15, originY + height * 0.7],\n [originX + width * 0.3, originY + height * 0.4],\n [originX + width * 0.5, originY + height * 0.6],\n [originX + width * 0.6, originY + height * 0.5],\n [originX + width * 0.9, originY + height * 0.8],\n [originX + width * 0.15, originY + height * 0.8]\n ];\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n ctx.strokeStyle = stroke;\n ctx.lineWidth = strokeWidth;\n ctx.fillStyle = fill;\n ctx.beginPath();\n ctx.moveTo(originX, originY);\n ctx.lineTo(originX + width, originY);\n ctx.lineTo(originX + width, originY + height);\n ctx.lineTo(originX, originY + height);\n ctx.lineTo(originX, originY);\n ctx.stroke();\n ctx.closePath();\n ctx.beginPath();\n let points = geom.ellipsePoints(cx, cy, r, r);\n painter.canvasPolygon(ctx, points, 0, 0);\n ctx.fill();\n ctx.closePath();\n ctx.beginPath();\n ctx.moveTo(pts[0][0], pts[0][1]);\n for(let i = 1, len = pts.length; i < len; i++) {\n let point = pts[i];\n ctx.lineTo(point[0], point[1]);\n }\n ctx.lineTo(pts[0][0], pts[0][1]);\n ctx.fill();\n ctx.closePath();\n }\n else if(renderMode === mode.SVG) {\n this.__addGeom('rect', [\n ['x', originX],\n ['y', originY],\n ['width', width],\n ['height', height],\n ['stroke', stroke],\n ['stroke-width', strokeWidth],\n ['fill', 'rgba(0,0,0,0)']\n ]);\n this.__addGeom('circle', [\n ['cx', cx],\n ['cy', cy],\n ['r', r],\n ['fill', fill],\n ]);\n let s = '';\n for(let i = 0, len = pts.length; i < len; i++) {\n let point = pts[i];\n if(i) {\n s += ' ';\n }\n s += point[0] + ',' + point[1];\n }\n this.__addGeom('polygon', [\n ['points', s],\n ['fill', fill]\n ]);\n }\n }\n else if(source) {\n // 圆角需要生成一个mask\n let list = border.calRadius(originX, originY, width, height,\n borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius);\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n // 有border-radius需模拟遮罩裁剪\n if(list) {\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, list, dx, dy);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(source, originX, originY, width, height);\n ctx.restore();\n }\n else {\n ctx.drawImage(source, originX, originY, width, height);\n }\n }\n else if(renderMode === mode.SVG) {\n // img没有变化无需diff,直接用上次的vd\n if(loadImg.cache) {\n loadImg.cache.cache = true;\n virtualDom.children = [loadImg.cache];\n // 但是还是要校验是否有borderRadius变化,引发img的圆角遮罩\n if(!virtualDom.cache && list) {\n let d = svgPolygon(list);\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', '#FFF'],\n ],\n }\n ],\n };\n let id = ctx.add(v);\n this.__cacheDefs.push(v);\n virtualDom.conClip = 'url(#' + id + ')';\n }\n return;\n }\n // 缩放图片,无需考虑原先矩阵,xom里对父层已经变换过了\n let matrix;\n if(width !== loadImg.width || height !== loadImg.height) {\n matrix = image.matrixResize(loadImg.width, loadImg.height, width, height, originX, originY, width, height);\n }\n let props = [\n ['xlink:href', loadImg.error ? placeholder : loadImg.src],\n ['x', originX],\n ['y', originY],\n ['width', loadImg.width],\n ['height', loadImg.height]\n ];\n if(list) {\n let d = svgPolygon(list);\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', '#FFF']\n ],\n }\n ],\n };\n let id = ctx.add(v);\n this.__cacheDefs.push(v);\n virtualDom.conClip = 'url(#' + id + ')';\n delete virtualDom.cache;\n }\n if(matrix && !mx.isE(matrix)) {\n props.push(['transform', 'matrix(' + util.joinArr(mx.m2m6(matrix), ',') + ')']);\n }\n let vd = {\n type: 'img',\n tagName: 'image',\n props,\n };\n virtualDom.children = [vd];\n loadImg.cache = vd;\n }\n }\n return res;\n }\n\n __isRealInline() {\n return false;\n }\n\n // overwrite\n __tryLayInline(w, total) {\n let { currentStyle: {\n [WIDTH]: width,\n [HEIGHT]: height,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n }, computedStyle: {\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } } = this;\n if(width.u !== AUTO) {\n w -= this.__calSize(width, total, true);\n }\n else {\n let loadImg = this.__loadImg;\n // 加载成功计算缩放后的宽度\n if(loadImg.source) {\n if(height.u === PX) {\n w -= loadImg.width * height.v / loadImg.height;\n }\n else if(height.u === PERCENT) {\n w -= loadImg.width * height.v * total * 0.01 / loadImg.height;\n }\n else if(height.u === REM) {\n w -= loadImg.width * height.v * this.root.computedStyle[FONT_SIZE] / loadImg.height;\n }\n else if(height.u === VW) {\n w -= loadImg.width * height.v * this.root.width * 0.01 / loadImg.height;\n }\n else if(height.u === VH) {\n w -= loadImg.width * height.v * this.root.height * 0.01 / loadImg.height;\n }\n else if(height.u === VMAX) {\n w -= height.v * Math.max(this.root.width, this.root.height) * 0.01 / loadImg.height;\n }\n else if(height.u === VMIN) {\n w -= height.v * Math.min(this.root.width, this.root.height) * 0.01 / loadImg.height;\n }\n else {\n w -= loadImg.width;\n }\n }\n }\n // 减去水平mbp\n w -= this.__calSize(marginRight, total, true);\n w -= this.__calSize(paddingRight, total, true);\n w -= borderRightWidth;\n w -= this.__calSize(marginLeft, total, true);\n w -= this.__calSize(paddingLeft, total, true);\n w -= borderLeftWidth;\n return w;\n }\n\n __calBasis(isDirectionRow, isAbs, isColumn, data, isDirectChild) {\n this.__computeReflow();\n let b = 0;\n let min = 0;\n let max = 0;\n let { currentStyle, computedStyle, __loadImg } = this;\n let { w, h } = data;\n // 计算需考虑style的属性\n let {\n [FLEX_BASIS]: flexBasis,\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n let main = isDirectionRow ? width : height;\n let cross = isDirectionRow ? height : width;\n // basis3种情况:auto、固定、content,只区分固定和其它\n let isFixed = [PX, PERCENT, REM, VW, VH, VMAX, VMIN].indexOf(flexBasis.u) > -1;\n if(isFixed) {\n b = max = min = this.__calSize(flexBasis, isDirectionRow ? w : h, true);\n }\n else if(([PX, PERCENT, REM, VW, VH, VMAX, VMIN].indexOf(main.u) > -1)) {\n b = max = min = this.__calSize(main, isDirectionRow ? w : h, true);\n }\n // auto和content固定尺寸比例计算\n else if(__loadImg.source || __loadImg.error) {\n let res = this.__preLayout(data);\n if(cross.u !== AUTO) {\n cross = this.__calSize(cross, isDirectionRow ? h : w, true);\n let ratio = res.w / res.h;\n b = max = min = isDirectionRow ? cross * ratio : cross / ratio;\n }\n else {\n b = max = min = isDirectionRow ? res.w : res.h;\n }\n }\n // 直接item的mpb影响basis\n return this.__addMBP(isDirectionRow, w, currentStyle, computedStyle, [b, min, max], isDirectChild);\n }\n\n __loadAndRefresh(loadImg, cb) {\n let self = this;\n // 先清空之前可能的\n if(loadImg.source || loadImg.error) {\n loadImg.source = null;\n }\n loadImg.loading = true;\n let root = this.__root, ctx = root.ctx;\n let placeholder = this.props.placeholder, computedStyle = this.__computedStyle;\n let width = computedStyle[WIDTH], height = computedStyle[HEIGHT];\n // 再测量,可能瞬间完成替换掉上面的\n inject.measureImg(loadImg.src, data => {\n // 还需判断url,防止重复加载时老的替换新的,失败走error绘制\n if(data.url === loadImg.src) {\n loadImg.cache && (loadImg.cache.cache = false);\n loadImg.loading = false;\n function reload() {\n let { __currentStyle: { [WIDTH]: width, [HEIGHT]: height } } = self;\n if(width.u !== AUTO && height.u !== AUTO) {\n root.__addUpdate(self, null, level.REPAINT, null, null, null, cb);\n }\n else {\n root.__addUpdate(self, null, level.REFLOW, null, null, null, cb);\n }\n }\n if(data.success) {\n loadImg.source = data.source;\n loadImg.width = data.width;\n loadImg.height = data.height;\n }\n else if(placeholder) {\n loadImg.error = true;\n inject.measureImg(placeholder, data => {\n if(data.success) {\n loadImg.source = data.source;\n loadImg.width = data.width;\n loadImg.height = data.height;\n if(computedStyle[DISPLAY] !== 'none' && !self.__isDestroyed) {\n reload();\n }\n }\n }, {\n ctx,\n root,\n width,\n height,\n });\n return;\n }\n else {\n loadImg.error = true;\n }\n // 可见状态进行刷新操作,visibility某些情况需要刷新,可能宽高未定义要重新布局\n if(computedStyle[DISPLAY] !== 'none' && !self.__isDestroyed) {\n reload();\n }\n }\n });\n }\n\n updateSrc(v, cb) {\n let loadImg = this.__loadImg;\n // 相等或空且当前error直接返回\n if(v === loadImg.src || this.__isDestroyed || !v && loadImg.error) {\n loadImg.src = v;\n inject.measureImg(v, null);\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n loadImg.src = v;\n this.__loadAndRefresh(loadImg, cb);\n }\n\n appendChild() {\n inject.error('Img can not appendChild.');\n }\n\n get src() {\n return this.__loadImg.src;\n }\n\n get isReplaced() {\n return true;\n }\n\n static showError = true;\n}\n\nexport default Img;\n","class Defs {\n constructor(uuid) {\n this.id = uuid;\n this.count = 0;\n this.list = [];\n this.cacheHash = {}; // 每次svg渲染前重置,存储前次渲染不变的缓存id\n }\n add(data) {\n let uuid = this.count;\n let hash = this.cacheHash;\n while(hash.hasOwnProperty(uuid)) {\n uuid++;\n }\n this.count = uuid + 1;\n data.id = uuid;\n data.uuid = 'karas-defs-' + this.id + '-' + uuid;\n data.index = this.list.length;\n this.list.push(data);\n return data.uuid;\n }\n addCache(data) {\n data.index = this.list.length;\n this.list.push(data);\n this.cacheHash[data.id] = true;\n return data.uuid;\n }\n clear() {\n this.list = [];\n this.count = 0;\n this.cacheHash = {};\n }\n removeCache(data) {\n let list = this.list;\n let i = data.index;\n // 一般情况index即位置,但每次渲染过程中,可能会删掉一些,此时位置会往前,但index不变,因此遍历\n for(; i >= 0; i--) {\n if(list[i] === data) {\n list.splice(i, 1);\n return;\n }\n }\n }\n\n get value() {\n return this.list;\n }\n\n static getInstance(uuid) {\n return new Defs(uuid);\n }\n}\n\nexport default Defs;\n","import util from './util';\nimport level from '../refresh/level';\n\nconst { joinVd, joinDef } = util;\nconst { NONE, TRANSFORM_ALL, OPACITY, FILTER, MIX_BLEND_MODE } = level;\n\nfunction diff(elem, ovd, nvd) {\n let cns = elem.childNodes;\n diffDefs(cns[0], ovd.defs, nvd.defs);\n // = i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinDef(nd[i]));\n }\n }\n}\n\nfunction diffDef(elem, od, nd) {\n if(od.tagName !== nd.tagName) {\n insertAdjacentHTML(elem, 'beforebegin', joinDef(nd));\n // elem.insertAdjacentHTML('beforebegin', joinDef(nd));\n elem.parentNode.removeChild(elem);\n }\n else {\n if(od.uuid !== nd.uuid) {\n elem.setAttribute('id', nd.uuid);\n }\n let op = {};\n for(let i = 0, len = (od.props || []).length; i < len; i++) {\n let prop = od.props[i];\n let [k, v] = prop;\n op[k] = v;\n }\n for(let i = 0, len = (nd.props || []).length; i < len; i++) {\n let prop = nd.props[i];\n let [k, v] = prop;\n // 已有不等更新,没有添加\n if(op.hasOwnProperty(k)) {\n if(op[k] !== v) {\n elem.setAttribute(k, v);\n }\n delete op[k];\n }\n else {\n elem.setAttribute(k, v);\n }\n }\n // 多余的删除\n Object.keys(op).forEach(i => {\n elem.removeAttribute(i);\n });\n let cns = elem.childNodes;\n let ol = od.children.length;\n let nl = nd.children.length;\n let i = 0;\n for(; i < Math.min(ol, nl); i++) {\n diffItem(elem, i, od.children[i], nd.children[i]);\n }\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinVd(nd.children[i]));\n }\n }\n }\n}\n\nfunction diffChild(elem, ovd, nvd) {\n if(ovd.type === 'dom') {\n if(nvd.type === 'dom') {\n diffD2D(elem, ovd, nvd);\n }\n else if(nvd.type === 'geom') {\n diffD2G(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n else if(ovd.type === 'text') {\n if(nvd.type === 'text') {\n diffT2T(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n else if(ovd.type === 'geom') {\n if(nvd.type === 'dom') {\n diffG2D(elem, ovd, nvd);\n }\n else if(nvd.type === 'geom') {\n diffG2G(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n else if(ovd.type === 'img') {\n if(nvd.type === 'img') {\n diffItemSelf(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n // 特殊情况,当有连续2个img,后面1个发生error时,其children内容不是type为img的图片,而是矢量图item,会进入此分支\n else if(ovd.type === 'item' && nvd.type === 'item') {\n diffItemSelf(elem, ovd, nvd);\n }\n}\n\nfunction diffX2X(elem, ovd, nvd) {\n let { transform, opacity, visibility, mask, overflow, filter, mixBlendMode, conClip } = nvd;\n if(ovd.transform !== transform) {\n if(transform) {\n elem.setAttribute('transform', transform);\n }\n else {\n elem.removeAttribute('transform');\n }\n }\n if(ovd.opacity !== opacity) {\n if(opacity !== 1 && opacity !== undefined) {\n elem.setAttribute('opacity', opacity);\n }\n else {\n elem.removeAttribute('opacity');\n }\n }\n if(ovd.visibility !== visibility) {\n elem.setAttribute('visibility', visibility);\n }\n if(ovd.mask !== mask) {\n if(mask) {\n elem.setAttribute('mask', mask);\n }\n else {\n elem.removeAttribute('mask');\n }\n }\n if(ovd.filter !== filter || ovd.mixBlendMode !== mixBlendMode) {\n let s = (filter ? `filter:${filter};` : '') + (mixBlendMode ? `mix-blend-mode:${mixBlendMode};` : '');\n if(s) {\n elem.setAttribute('style', s);\n }\n else {\n elem.removeAttribute('filter');\n }\n }\n if(ovd.overflow !== overflow) {\n if(overflow) {\n elem.setAttribute('clipPath', overflow);\n }\n else {\n elem.removeAttribute('overflow');\n }\n }\n if(ovd.conClip !== conClip) {\n if(conClip) {\n elem.childNodes[1].setAttribute('clip-path', conClip);\n }\n else {\n elem.childNodes[1].removeAttribute('clip-path');\n }\n }\n}\n\nfunction diffByLessLv(elem, ovd, nvd, lv) {\n let { transform, opacity, mask, filter, mixBlendMode } = nvd;\n if(lv === NONE) {\n return;\n }\n if(mask) {\n elem.setAttribute('mask', mask);\n }\n else {\n elem.removeAttribute('mask');\n }\n if(lv & TRANSFORM_ALL) {\n if(transform) {\n elem.setAttribute('transform', transform);\n }\n else {\n elem.removeAttribute('transform');\n }\n }\n if(lv & OPACITY) {\n if(opacity !== 1 && opacity !== undefined) {\n elem.setAttribute('opacity', opacity);\n }\n else {\n elem.removeAttribute('opacity');\n }\n }\n if((lv & FILTER) || (lv & MIX_BLEND_MODE)) {\n let s = (filter ? `filter:${filter};` : '') + (mixBlendMode ? `mix-blend-mode:${mixBlendMode};` : '');\n if(s) {\n elem.setAttribute('style', s);\n }\n else {\n elem.removeAttribute('style');\n }\n }\n}\n\nfunction diffD2D(elem, ovd, nvd, root) {\n // cache表明children无变化缓存,一定是REPAINT以下的,只需看自身的lv以及mask\n if(nvd.cache) {\n diffByLessLv(elem, ovd, nvd, nvd.lv);\n return;\n }\n // 无cache且= i; j--) {\n removeAt(lastChild, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(lastChild, cns, i, joinVd(nvd.children[i]));\n }\n }\n}\n\nfunction diffD2G(elem, ovd, nvd) {\n diffX2X(elem, ovd, nvd);\n diffBb(elem.firstChild, ovd.bb, nvd.bb);\n let ol = ovd.children.length;\n let nl = nvd.children.length;\n let i = 0;\n let lastChild = elem.lastChild;\n let cns = lastChild.childNodes;\n for(; i < Math.min(ol, nl); i++) {\n replaceWith(cns[i], nvd.children[i]);\n }\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(lastChild, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(lastChild, cns, i, joinVd(nvd.children[i]));\n }\n }\n}\n\nfunction diffT2T(elem, ovd, nvd) {\n if(nvd.cache) {\n return;\n }\n let ol = ovd.children.length;\n let nl = nvd.children.length;\n let i = 0;\n for(; i < Math.min(ol, nl); i++) {\n diffItem(elem, i, ovd.children[i], nvd.children[i], true);\n }\n let cns = elem.childNodes;\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinVd(nvd.children[i]));\n }\n }\n}\n\nfunction diffG2D(elem, ovd, nvd) {\n diffD2G(elem, ovd, nvd);\n}\n\nfunction diffG2G(elem, ovd, nvd) {\n if(nvd.cache) {\n diffByLessLv(elem, ovd, nvd, nvd.lv);\n return;\n }\n // 无cache且= i; j--) {\n removeAt(lastChild, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(lastChild, cns, i, joinVd(nvd.children[i]));\n }\n }\n }\n}\n\nfunction diffBb(elem, obb, nbb) {\n let ol = obb.length;\n let nl = nbb.length;\n let i = 0;\n for(; i < Math.min(ol, nl); i++) {\n diffItem(elem, i, obb[i], nbb[i]);\n }\n let cns = elem.childNodes;\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinVd(nbb[i]));\n }\n }\n}\n\nfunction diffItem(elem, i, ovd, nvd, isText) {\n let cns = elem.childNodes;\n if(ovd.tagName !== nvd.tagName) {\n replaceWith(cns[i], nvd);\n }\n else {\n diffItemSelf(cns[i], ovd, nvd);\n if(isText && ovd.content !== nvd.content) {\n cns[i].innerHTML = nvd.content;\n }\n }\n}\n\nfunction diffItemSelf(elem, ovd, nvd) {\n if(nvd.cache) {\n return;\n }\n let op = {};\n for(let i = 0, len = (ovd.props || []).length; i < len; i++) {\n let prop = ovd.props[i];\n let [k, v] = prop;\n op[k] = v;\n }\n for(let i = 0, len = (nvd.props || []).length; i < len; i++) {\n let prop = nvd.props[i];\n let [k, v] = prop;\n // 已有不等更新,没有添加\n if(op.hasOwnProperty(k)) {\n if(op[k] !== v) {\n elem.setAttribute(k, v);\n }\n delete op[k];\n }\n else {\n elem.setAttribute(k, v);\n }\n }\n // 多余的删除\n Object.keys(op).forEach(i => {\n elem.removeAttribute(i);\n });\n}\n\nfunction replaceWith(elem, vd) {\n let res;\n if(Array.isArray(vd)) {\n res = '';\n vd.forEach(item => {\n res += joinVd(item);\n });\n }\n else {\n res = joinVd(vd);\n }\n insertAdjacentHTML(elem, 'beforebegin', res);\n // elem.insertAdjacentHTML('beforebegin', res);\n elem.parentNode.removeChild(elem);\n}\n\nfunction insertAt(elem, cns, index, html) {\n if(index >= cns.length) {\n insertAdjacentHTML(elem, 'beforeend', html);\n // elem.insertAdjacentHTML('beforeend', html);\n }\n else {\n insertAdjacentHTML(cns[index], 'beforebegin', html);\n // cns[index].insertAdjacentHTML('beforebegin', html);\n }\n}\n\nfunction removeAt(elem, cns, index) {\n if(cns[index]) {\n elem.removeChild(cns[index]);\n }\n}\n\nlet svg;\nfunction insertAdjacentHTML(elem, where, content) {\n if(elem.insertAdjacentHTML) {\n elem.insertAdjacentHTML(where, content);\n }\n else {\n switch(where) {\n case 'beforeend':\n elem.innerHTML += content;\n break;\n case 'beforebegin':\n svg = svg || document.createElement('svg');\n svg.innerHTML = content;\n elem.parentNode.insertBefore(svg.childNodes[0], elem);\n break;\n }\n }\n}\n\nexport default diff;\n","import util from '../util/util';\n\nconst { isFunction } = util;\n\nclass Controller {\n constructor() {\n this.__records = []; // 默认记录和自动记录\n this.__records2 = []; // 非自动播放的动画记录\n this.__list = [] // 默认初始化播放列表,自动播放也存这里\n this.__list2 = []; // json中autoPlay为false的初始化存入这里\n this.__onList = []; // list中已存在的侦听事件,list2初始化时也需要增加上\n this.__lastTime = {}; // 每个类型的上次触发时间,防止重复emit\n }\n\n add(v, list = this.list) {\n if(list.indexOf(v) === -1) {\n list.push(v);\n }\n }\n\n remove(v) {\n let i = this.list.indexOf(v);\n if(i > -1) {\n this.list.splice(i, 1);\n }\n }\n\n __destroy() {\n this.__records = [];\n this.__records2 = [];\n this.__list = [];\n this.__list2 = [];\n }\n\n __action(k, args) {\n this.list.forEach(item => {\n item[k].apply(item, args);\n });\n }\n\n init(records = this.__records, list = this.list) {\n // 检查尚未初始化的record,并初始化,后面才能调用各种控制方法\n if(records.length) {\n // 清除防止重复调用,并且新的json还会进入整体逻辑\n records.splice(0).forEach(item => {\n let { target, animate, offsetTime } = item;\n if(target.isDestroyed || !animate) {\n return;\n }\n if(!Array.isArray(animate)) {\n animate = [animate];\n }\n animate.forEach(animate => {\n let { value, options } = animate;\n options.autoPlay = false;\n if(offsetTime) {\n options = Object.assign({}, options); // clone防止多个使用相同的干扰\n options.delay = options.delay || 0;\n options.delay += offsetTime;\n }\n let o = target.animate(value, options);\n this.add(o, list);\n });\n });\n }\n // 非自动播放后初始化需检测事件,给非自动播放添加上,并清空本次\n if(records === this.__records2) {\n let onList = this.__onList;\n let list2 = this.list2;\n if(list2.length && onList.length) {\n list2.forEach(item => {\n onList.forEach(arr => {\n let cb = () => {\n let time = item.timestamp;\n if(time !== this.__lastTime[arr[0]]) {\n this.__lastTime[arr[0]] = time;\n arr[1] && arr[1]();\n }\n };\n cb.__karasEventCb = arr[1];\n item.off(arr[0], arr[1]);\n item.on(arr[0], cb);\n });\n });\n }\n }\n }\n\n __playAuto() {\n this.init();\n this.__action('play');\n }\n\n play(cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('play', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n pause() {\n this.__action('pause');\n }\n\n resume(cb) {\n let once = true;\n this.__action('resume', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n __mergeAuto() {\n this.init();\n this.init(this.__records2);\n if(this.__list2.length) {\n this.__list = this.__list.concat(this.__list2);\n this.__list2 = [];\n }\n }\n\n cancel(cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('cancel', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n finish(cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('finish', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n gotoAndStop(v, options, cb) {\n this.__mergeAuto();\n this.__onList = [];\n if(isFunction(options)) {\n cb = options;\n options = {};\n }\n let once = true;\n this.__action('gotoAndStop', [v, options, cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n gotoAndPlay(v, options, cb) {\n this.__mergeAuto();\n this.__onList = [];\n if(isFunction(options)) {\n cb = options;\n options = {};\n }\n let once = true;\n this.__action('gotoAndPlay', [v, options, cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n on(id, handle) {\n if(!isFunction(handle)) {\n return;\n }\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n this.__on(id[i], handle);\n }\n this.__onList.push([id, handle]);\n }\n else {\n this.__on(id, handle);\n this.__onList.push([id, handle]);\n }\n }\n\n __on(id, handle) {\n this.list.forEach(item => {\n let cb = () => {\n let time = item.timestamp;\n if(time !== this.__lastTime[id]) {\n this.__lastTime[id] = time;\n handle && handle();\n }\n };\n cb.__karasEventCb = handle;\n item.on(id, cb);\n });\n }\n\n off(id, handle) {\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n this.off(id[i], handle);\n }\n }\n else {\n this.list.forEach(item => {\n item.off(id, handle);\n });\n }\n }\n\n get list() {\n return this.__list;\n }\n\n get list2() {\n return this.__list2;\n }\n\n __set(key, value) {\n this.list.forEach(item => {\n item[key] = value;\n });\n }\n\n set playbackRate(v) {\n this.__set('playbackRate', v);\n }\n\n set iterations(v) {\n this.__set('iterations', v);\n }\n\n set playCount(v) {\n this.__set('playCount', v);\n }\n\n set fps(v) {\n this.__set('fps', v);\n }\n\n set currentTime(v) {\n this.__set('currentTime', v);\n }\n\n set spfLimit(v) {\n this.__set('spfLimit', v);\n }\n\n set delay(v) {\n this.__set('delay', v);\n }\n\n set endDelay(v) {\n this.__set('endDelay', v);\n }\n\n set fill(v) {\n this.__set('fill', v);\n }\n\n set direction(v) {\n this.__set('direction', v);\n }\n}\n\nexport default Controller;\n","/**\n * canvas和texture合图的基类,和Page类配合,抽象出基础尺寸偏差等信息\n * 派生2个子类\n */\n\nlet uuid = 0;\n\nclass Cache {\n constructor(renderMode, ctx, rootId, w, h, bbox, page, pos, x1, y1) {\n this.__uuid = uuid++;\n this.__renderMode = renderMode;\n this.__ctx = ctx;\n this.__rootId = rootId;\n this.__init(w, h, bbox, page, pos, x1, y1);\n }\n\n __init(w, h, bbox, page, pos, x1, y1) {\n this.__width = w;\n this.__height = h;\n this.__bbox = bbox;\n this.__page = page;\n this.__pos = pos;\n let { x, y } = page.getCoords(pos);\n this.__x = x;\n this.__y = y;\n let size = page.__size;\n this.__tx1 = x / size;\n this.__ty1 = (size - y - h) / size;\n this.__tx2 = (x + w) / size;\n this.__ty2 = (size - y) / size;\n this.__enabled = true;\n this.__available = false;\n this.__appendData(x1, y1);\n }\n\n __appendData(x1, y1) {\n this.x1 = x1; // 去除margin的左上角原点坐标\n this.y1 = y1;\n let bbox = this.__bbox;\n this.dx = this.__x - bbox[0]; // cache坐标和box原点的差值\n this.dy = this.__y - bbox[1];\n this.dbx = x1 - bbox[0]; // 原始sx1/sy1和box原点的差值\n this.dby = y1 - bbox[1];\n this.update();\n }\n\n update() {\n this.__page.__update = true;\n }\n\n clear() {\n if(this.__available) {\n this.__available = false;\n this.update();\n return true;\n }\n }\n\n // svg打标用会覆盖此方法\n release() {\n if(this.__enabled) {\n this.clear();\n this.__page.del(this.__pos);\n this.__page = null;\n this.__enabled = false;\n return true;\n }\n }\n\n reset(bbox, x1, y1, klass) {\n // 尺寸没变复用之前的并清空\n this.release();\n let w = Math.ceil(bbox[2] - bbox[0]);\n let h = Math.ceil(bbox[3] - bbox[1]);\n let res = klass.getInstance(this.__renderMode, this.__ctx, this.__rootId, Math.max(w, h), null);\n if(!res) {\n return;\n }\n let { page, pos } = res;\n this.__init(w, h, bbox, page, pos, x1, y1);\n }\n\n __offsetY(diff) {\n this.y1 += diff;\n let bbox = this.__bbox;\n bbox[1] += diff;\n bbox[3] += diff;\n this.dy -= diff;\n }\n\n get uuid() {\n return this.__uuid;\n }\n\n // 是否功能可用,生成离屏canvas及尺寸超限\n get enabled() {\n return this.__enabled;\n }\n\n // 是否有可用缓存内容\n get available() {\n return this.__enabled && this.__available;\n }\n\n get bbox() {\n return this.__bbox;\n }\n\n get page() {\n return this.__page;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get width() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get pos() {\n return this.__pos;\n }\n\n get size() {\n return this.__page.__size;\n }\n\n get texture() {\n return this.__page.texture;\n }\n\n static getInstance(renderMode, ctx, rootId, bbox, x1, y1, cacheKlass, pageKlass, excludePage) {\n let w = Math.ceil(bbox[2] - bbox[0]);\n let h = Math.ceil(bbox[3] - bbox[1]);\n let n = Math.max(w, h);\n if(n <= 0) {\n return;\n }\n let res = pageKlass.getInstance(renderMode, ctx, rootId, n, excludePage);\n if(!res) {\n return;\n }\n let { page, pos } = res;\n return new cacheKlass(renderMode, ctx, rootId, w, h, bbox, page, pos, x1, y1);\n }\n}\n\nexport default Cache;\n","/**\n * 默认的动态合图配置,保守低端机8个纹理单元和最大2048px尺寸,一般chrome是16个和16384px\n * webgl初始化会调用获取参数动态进行更改,16px是最小划分基本单位1,后续成2倍增长\n * 并不需要非常紧凑合理,因为特定需求如骨骼动画,合图都是前置做好的,这里应对临时的Dom位图\n * 应该尽可能避免纹理单元切换,因此设计固定的正方形尺寸,以2的幂次方增长,从16px开始到MAX\n * 每个texture从左到右按小到大排列,一列都为相同尺寸的正方形格子,用数组存储表示状态\n * 内容0为空白,1为单位1大小占用,2为2个单位1,如此成2倍增长,可能会形成这种状态:\n * 1 0 2 2 4 4 4 4 ...\n * 其中开头0位置是个单位1的正方形,1位置为空,2、3位置为一个2个单位的正方形,4、5、6、7是4个单位\n * 一张纹理存储时可以按照自己的bbox尺寸计算出正方形大小n,然后循环搜索,每次递增n,不必++遍历\n * 如此可满足不同尺寸分布在一张texture上的需求,碎片情况也较少,避免频繁纹理切换,清空置0\n * canvas模式时固定2048,是个保守值,当webgl第一次初始化,会改变这些值\n */\nconst UNIT = 16;\nlet MAX = 2048;\nlet NUMBER = 128;\nconst HASH = {};\n\nlet uuid = 0;\nlet init = false;\n\nclass Page {\n constructor(renderMode, ctx, size, number) {\n this.__size = size;\n this.__number = number;\n this.__width = this.__height = size;\n // 标识n*n个单元格是否空闲可用,一维数组表示\n let grid = [];\n for(let i = 0, len = number * number; i < len; i++) {\n grid.push(0);\n }\n this.__grid = new Int32Array(grid);\n this.__uuid = uuid++;\n // webgl贴图缓存更新使用,canvas/img等发生变更需刷新重新生成texture,fbo的texture不需要\n this.__update = false;\n this.time = 0;\n }\n\n add(unitSize, pos) {\n let { number, grid } = this;\n for(let i = pos; i < pos + unitSize; i++) {\n grid[i] = unitSize;\n for(let j = 1; j < unitSize; j++) {\n grid[i + j * number] = unitSize;\n }\n }\n }\n\n del(pos) {\n let { number, grid } = this;\n let u = grid[pos];\n if(u) {\n grid[pos] = 0;\n for(let i = pos; i < pos + u; i++) {\n grid[i] = 0;\n for(let j = 1; j < u; j++) {\n grid[i + j * number] = 0;\n }\n }\n }\n }\n\n getCoords(pos) {\n let { number } = this;\n let x = (pos % number) * UNIT;\n let y = Math.floor(pos / number) * UNIT;\n return { x, y };\n }\n\n getFreePos(unitSize) {\n let { number, grid } = this;\n outer:\n for(let i = 0; i < number; i++) {\n let u = grid[i];\n if(u) {\n if(u === unitSize) {\n // 找到同尺寸的列位置,向下查找空白区域确定行位置\n for(let j = unitSize; j < number; j += unitSize) {\n let n = i + j * number;\n if(!grid[n]) {\n return n;\n }\n }\n }\n else {\n i += u;\n }\n }\n else {\n // 空白列检查尺寸是否符合\n for(let j = i + 1, len = i + unitSize; j < len; j++) {\n if(grid[i]) {\n continue outer;\n }\n }\n return i;\n }\n }\n return -1;\n }\n\n get uuid() {\n return this.__uuid;\n }\n\n get size() {\n return this.__size;\n }\n\n get width() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get number() {\n return this.__number;\n }\n\n get grid() {\n return this.__grid;\n }\n\n get update() {\n return this.__update;\n }\n\n set update(v) {\n this.__update = v;\n }\n\n static getInstance(renderMode, ctx, rootId, size, klass, excludePage) {\n if(size > MAX) {\n return;\n }\n // 换算为每单位16px占多少单位\n let unitSize = 1;\n while((UNIT * unitSize) < size) {\n unitSize <<= 1;\n }\n let n = MAX;\n // 只有超过一定尺寸时用8192最大尺寸,大部分情况4096足够,且8192会轻微卡顿一下\n if(size <= 2048 && MAX === 8192) {\n n = 4096;\n }\n let key = rootId + ',' + renderMode;\n // 每个root复用自己的合图,webgl中为了隔离不同实例\n let list = HASH[key] = HASH[key] || [];\n let page, pos;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(excludePage && item === excludePage || item.__size !== n) {\n continue;\n }\n if((pos = item.getFreePos(unitSize)) > -1) {\n page = item;\n break;\n }\n }\n if(!page) {\n page = new klass(renderMode, ctx, n, NUMBER);\n pos = 0;\n list.push(page);\n }\n page.add(unitSize, pos);\n return { page, pos };\n }\n\n static get UNIT() {\n return UNIT;\n }\n\n static get MAX() {\n return MAX;\n }\n\n static set MAX(MAX_TEXTURE_SIZE) {\n // 确保MAX_TEXTURE_SIZE是2的幂级数,如果不是向下取整\n let n = 2;\n while(n < MAX_TEXTURE_SIZE) {\n n = n << 1;\n if(n >= MAX_TEXTURE_SIZE) {\n if(n > MAX_TEXTURE_SIZE) {\n n = n << 1;\n }\n break;\n }\n }\n MAX = n;\n NUMBER = Math.ceil(MAX / UNIT);\n }\n\n static get NUMBER() {\n return NUMBER;\n }\n\n static genUuid() {\n return uuid++;\n }\n\n static init(MAX_TEXTURE_SIZE) {\n if(init) {\n return;\n }\n init = true;\n if(MAX_TEXTURE_SIZE !== MAX) {\n // 超过限制会明显卡一下\n Page.MAX = Math.min(MAX_TEXTURE_SIZE, 8192);\n }\n }\n}\n\nexport default Page;\n","import mx from '../math/matrix';\n\nconst { calRectPoint, calPoint } = mx;\n\n/**\n * 初始化 shader\n * @param gl GL context\n * @param vshader vertex shader (string)\n * @param fshader fragment shader (string)\n * @return program, if the program object was created and successfully made current\n */\nfunction initShaders(gl, vshader, fshader) {\n let program = createProgram(gl, vshader, fshader);\n if(!program) {\n throw new Error('Failed to create program');\n }\n\n // 要开启透明度,用以绘制透明的图形\n gl.enable(gl.BLEND);\n // gl.enable(gl.DEPTH_TEST);\n // gl.enable(gl.POLYGON_OFFSET_FILL);\n gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n return program;\n}\n\n/**\n * Create the linked program object\n * @param gl GL context\n * @param vshader a vertex shader program (string)\n * @param fshader a fragment shader program (string)\n * @return created program object, or null if the creation has failed\n */\nfunction createProgram(gl, vshader, fshader) {\n // Create shader object\n let vertexShader = loadShader(gl, gl.VERTEX_SHADER, vshader);\n let fragmentShader = loadShader(gl, gl.FRAGMENT_SHADER, fshader);\n if(!vertexShader || !fragmentShader) {\n return null;\n }\n\n // Create a program object\n let program = gl.createProgram();\n if(!program) {\n return null;\n }\n program.vertexShader = vertexShader;\n program.fragmentShader = fragmentShader;\n\n // Attach the shader objects\n gl.attachShader(program, vertexShader);\n gl.attachShader(program, fragmentShader);\n\n // Link the program object\n gl.linkProgram(program);\n\n // Check the result of linking\n let linked = gl.getProgramParameter(program, gl.LINK_STATUS);\n if(!linked) {\n let error = gl.getProgramInfoLog(program);\n gl.deleteProgram(program);\n gl.deleteShader(fragmentShader);\n gl.deleteShader(vertexShader);\n throw new Error('Failed to link program: ' + error);\n }\n return program;\n}\n\n/**\n * Create a shader object\n * @param gl GL context\n * @param type the type of the shader object to be created\n * @param source shader program (string)\n * @return created shader object, or null if the creation has failed.\n */\nexport function loadShader(gl, type, source) {\n // Create shader object\n let shader = gl.createShader(type);\n if(shader == null) {\n throw new Error('unable to create shader');\n }\n\n // Set the shader program\n gl.shaderSource(shader, source);\n\n // Compile the shader\n gl.compileShader(shader);\n\n // Check the result of compilation\n let compiled = gl.getShaderParameter(shader, gl.COMPILE_STATUS);\n if(!compiled) {\n let error = gl.getShaderInfoLog(shader);\n gl.deleteShader(shader);\n throw new Error('Failed to compile shader: ' + error);\n }\n\n return shader;\n}\n\nfunction convertCoords2Gl(x, y, z, w, cx, cy, tz) {\n if(w && w !== 1) {\n x /= w;\n y /= w;\n z /= w;\n }\n if(x === cx) {\n x = 0;\n }\n else {\n x = (x - cx) / cx;\n }\n if(y === cy) {\n y = 0;\n }\n else {\n y = (cy - y) / cy;\n }\n if(tz) {\n z /= -tz;\n }\n if(w === 1) {\n return { x, y, z, w };\n }\n return { x: x * w, y: y * w, z: z * w, w };\n}\n\nfunction createTexture(gl, tex, n, width, height) {\n let texture = gl.createTexture();\n bindTexture(gl, texture, n);\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, 1);\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);\n // 传入高宽时是绑定fbo,且tex一定为null\n if(width && height) {\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);\n }\n // 普通将canvas对象作为纹理\n else {\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, tex);\n }\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n return texture;\n}\n\nfunction bindTexture(gl, texture, n) {\n gl.activeTexture(gl['TEXTURE' + n]);\n gl.bindTexture(gl.TEXTURE_2D, texture);\n}\n\nlet lastVtPoint, lastVtTex, lastVtOpacity;\n/**\n * texCache集满纹理上传占用最多可用纹理单元后,进行批量顺序绘制\n * 将所有dom的矩形顶点(经过transform变换后的)、贴图坐标、透明度存入3个buffer中,\n * 然后相同纹理单元的形成一批,设置uniform的纹理单元号进行绘制,如此循环\n */\nfunction drawTextureCache(gl, list, cx, cy, dx, dy) {\n let length = list.length;\n if(!length) {\n return;\n }\n let vtPoint, vtTex, vtOpacity;\n if(lastVtPoint && lastVtPoint.length === length * 24) {\n vtPoint = lastVtPoint;\n }\n else {\n vtPoint = lastVtPoint = new Float32Array(length * 24);\n }\n if(lastVtTex && lastVtTex.length === length * 12) {\n vtTex = lastVtTex;\n }\n else {\n vtTex = lastVtTex = new Float32Array(length * 12);\n }\n if(lastVtOpacity && lastVtOpacity.length === length * 6) {\n vtOpacity = lastVtOpacity;\n }\n else {\n vtOpacity = lastVtOpacity = new Float32Array(length * 6);\n }\n for(let i = 0; i < length; i++) {\n let { cache, opacity, matrix } = list[i];\n let { __width: width, __height: height,\n __tx1: tx1, __ty1: ty1, __tx2: tx2, __ty2: ty2,\n __page: page, __bbox: bbox } = cache;\n if(!i) {\n // canvas需要生成texture,texture则强制不会进来\n if(page.__update) {\n page.genTexture(gl);\n }\n bindTexture(gl, page.texture, 0);\n }\n // 计算顶点坐标和纹理坐标,转换[0,1]对应关系\n let bx = bbox[0], by = bbox[1];\n let xa = bx + dx, ya = by + height + dy;\n let xb = bx + width + dx, yb = by + dy;\n let { x1, y1, z1, w1, x2, y2, z2, w2, x3, y3, z3, w3, x4, y4, z4, w4 } = calRectPoint(xa, ya, xb, yb, matrix);\n // console.warn(x1,y1,z1,w1,',',x2,y2,z2,w2,',',x3,y3,z3,w3,',',x4,y4,z4,w4);\n // z范围取所有、对角线最大值,只有当非0有值时才求\n let z = Math.max(Math.abs(z1), Math.abs(z2));\n z = Math.max(z, Math.abs(z3));\n z = Math.max(z, Math.abs(z4));\n if(z) {\n z = Math.max(z, Math.sqrt(cx * cx + cy * cy));\n }\n let t = convertCoords2Gl(x1, y1, z1, w1, cx, cy, z);\n x1 = t.x; y1 = t.y; z1 = t.z;\n t = convertCoords2Gl(x2, y2, z2, w2, cx, cy, z);\n x2 = t.x; y2 = t.y; z2 = t.z;\n t = convertCoords2Gl(x3, y3, z3, w3, cx, cy, z);\n x3 = t.x; y3 = t.y; z3 = t.z;\n t = convertCoords2Gl(x4, y4, z4, w4, cx, cy, z);\n x4 = t.x; y4 = t.y; z4 = t.z;\n // console.log(x1,y1,z1,w1,',',x2,y2,z2,w2,',',x3,y3,z3,w3,',',x4,y4,z4,w4);\n let j = i * 24;\n vtPoint[j] = x1;\n vtPoint[j + 1] = y1;\n vtPoint[j + 2] = z1;\n vtPoint[j + 3] = w1;\n vtPoint[j + 4] = x4;\n vtPoint[j + 5] = y4;\n vtPoint[j + 6] = z4;\n vtPoint[j + 7] = w4;\n vtPoint[j + 8] = x2;\n vtPoint[j + 9] = y2;\n vtPoint[j + 10] = z2;\n vtPoint[j + 11] = w2;\n vtPoint[j + 12] = x4;\n vtPoint[j + 13] = y4;\n vtPoint[j + 14] = z4;\n vtPoint[j + 15] = w4;\n vtPoint[j + 16] = x2;\n vtPoint[j + 17] = y2;\n vtPoint[j + 18] = z2;\n vtPoint[j + 19] = w2;\n vtPoint[j + 20] = x3;\n vtPoint[j + 21] = y3;\n vtPoint[j + 22] = z3;\n vtPoint[j + 23] = w3;\n j = i * 12;\n vtTex[j] = tx1;\n vtTex[j + 1] = ty1;\n vtTex[j + 2] = tx1;\n vtTex[j + 3] = ty2;\n vtTex[j + 4] = tx2;\n vtTex[j + 5] = ty1;\n vtTex[j + 6] = tx1;\n vtTex[j + 7] = ty2;\n vtTex[j + 8] = tx2;\n vtTex[j + 9] = ty1;\n vtTex[j + 10] = tx2;\n vtTex[j + 11] = ty2;\n j = i * 6;\n vtOpacity[j] = opacity;\n vtOpacity[j + 1] = opacity;\n vtOpacity[j + 2] = opacity;\n vtOpacity[j + 3] = opacity;\n vtOpacity[j + 4] = opacity;\n vtOpacity[j + 5] = opacity;\n }\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, vtPoint, gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(gl.program, 'a_position');\n gl.vertexAttribPointer(a_position, 4, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, vtTex, gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(gl.program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, vtOpacity, gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n let u_texture = gl.getUniformLocation(gl.program, 'u_texture');\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, length * 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.deleteBuffer(opacityBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.disableVertexAttribArray(a_opacity);\n}\n\n/**\n * https://www.w3.org/TR/2018/WD-filter-effects-1-20181218/#feGaussianBlurElement\n * 根据cacheTotal生成cacheFilter,按照css规范的优化方法执行3次,避免卷积核扩大3倍性能慢\n * x/y方向分开执行,加速性能,计算次数由d*d变为d+d,d为卷积核大小\n * spread由d和sigma计算得出,d由sigma计算得出,sigma即css的blur()参数\n * 规范的优化方法对d的值分奇偶优化,这里再次简化,d一定是奇数,即卷积核大小\n * i和j为filter和total的纹理单元,3次执行(x/y合起来算1次)需互换单元,来回执行源和结果\n * 由total变为filter时cache会各方向上扩展spread的大小到width/height\n */\nfunction drawBlur(gl, program, tex1, width, height) {\n gl.useProgram(program);\n gl.viewport(0, 0, width, height);\n /**\n * 注意max和ratio的设置,当是100尺寸的正方形时,传给direction的始终为1\n * 当正方形<100时,direction相应地要扩大相对于100的倍数,反之则缩小,如此为了取相邻点坐标时是+-1\n * 当非正方形时,长轴一端为基准值不变,短的要二次扩大比例倍数\n * tex1和tex2来回3次,最后是到tex1\n */\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n let u_direction = gl.getUniformLocation(program, 'u_direction');\n let recycle = []; // 3次过程中新生成的中间纹理需要回收\n let max = 100 / Math.max(width, height);\n let ratio = width / height;\n for(let n = 0; n < 3; n++) {\n // tex1到tex2\n let tex2 = createTexture(gl, null, 1, width, height);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex2, 0);\n bindTexture(gl, tex1, 0);\n if(width >= height) {\n gl.uniform2f(u_direction, max, 0);\n }\n else {\n gl.uniform2f(u_direction, max * ratio, 0);\n }\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n // tex2到tex1\n let tex3 = createTexture(gl, null, 0, width, height);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex3, 0);\n bindTexture(gl, tex2, 1);\n if(width >= height) {\n gl.uniform2f(u_direction, 0, max * ratio);\n }\n else {\n gl.uniform2f(u_direction, 0, max);\n }\n gl.uniform1i(u_texture, 1);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n recycle.push(tex1);\n recycle.push(tex2);\n tex1 = tex3;\n }\n // 0/1单元都解绑\n bindTexture(gl, null, 0);\n bindTexture(gl, null, 1);\n // 回收\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n recycle.forEach(item => gl.deleteTexture(item));\n return tex1;\n}\n\nfunction drawCm(gl, program, target, source, m, center, size) {\n gl.useProgram(program);\n bindTexture(gl, source.__page.texture, 0);\n gl.viewport(0, 0, size, size);\n let { x: tx1, y: ty1, width: w1, height: h1 } = target;\n let { x: tx2, y: ty2, width: w2, height: h2 } = source;\n let { x: x1, y: y2 } = convertCoords2Gl(tx1, ty1 + h1, 0, 1, center, center);\n let { x: x2, y: y1 } = convertCoords2Gl(tx1 + w1, ty1, 0, 1, center, center);\n let xa = tx2 / size, ya = (size - ty2) / size, xb = (tx2 + w2) / size, yb = (size - ty2 - h2) / size;\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n xa, ya,\n xa, yb,\n xb, ya,\n xa, yb,\n xb, ya,\n xb, yb,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n gl.uniform1i(u_texture, 0);\n // matrix\n let u_m = gl.getUniformLocation(program, 'u_m');\n gl.uniform1fv(u_m, new Float32Array(m));\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n // 回收\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n bindTexture(gl, null, 0);\n}\n\n/**\n * 根据total/filter生成overflow\n */\nfunction drawOverflow(gl, program, target, source, center, size) {\n gl.useProgram(program);\n let { x: tx1, y: ty1, width: w1, height: h1, bbox: bbox1 } = target;\n let { x: tx2, y: ty2, bbox: bbox2 } = source;\n let dx = bbox1[0] - bbox2[0], dy = bbox1[1] - bbox2[1];\n gl.viewport(0, 0, size, size);\n let { x: x1, y: y2 } = convertCoords2Gl(tx1, ty1 + h1, 0, 1, center, center);\n let { x: x2, y: y1 } = convertCoords2Gl(tx1 + w1, ty1, 0, 1, center, center);\n let xa = (tx2 + dx) / size, ya = (size - ty2 - dy) / size, xb = (tx2 + w1 + dx) / size, yb = (size - ty2 - h1 - dy) / size;\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n xa, ya,\n xa, yb,\n xb, ya,\n xa, yb,\n xb, ya,\n xb, yb,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n bindTexture(gl, source.__page.texture, 0);\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n // 回收\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n}\n\nfunction drawMask(gl, program, target, source, temp, center, size) {\n gl.useProgram(program);\n bindTexture(gl, source.__page.texture, 0);\n bindTexture(gl, temp, 1);\n gl.viewport(0, 0, size, size);\n let { x: tx1, y: ty1, width: w1, height: h1 } = target;\n let { x: tx2, y: ty2, width: w2, height: h2 } = source;\n let { x: x1, y: y2 } = convertCoords2Gl(tx1, ty1 + h1, 0, 1, center, center);\n let { x: x2, y: y1 } = convertCoords2Gl(tx1 + w1, ty1, 0, 1, center, center);\n let xa = tx2 / size, ya = (size - ty2) / size, xb = (tx2 + w2) / size, yb = (size - ty2 - h2) / size;\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer1 = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer1);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n xa, ya,\n xa, yb,\n xb, ya,\n xa, yb,\n xb, ya,\n xb, yb,\n ]), gl.STATIC_DRAW);\n let a_texCoords1 = gl.getAttribLocation(program, 'a_texCoords1');\n gl.vertexAttribPointer(a_texCoords1, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords1);\n let texBuffer2 = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer2);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 1,\n 0, 0,\n 1, 1,\n 0, 0,\n 1, 1,\n 1, 0,\n ]), gl.STATIC_DRAW);\n let a_texCoords2 = gl.getAttribLocation(program, 'a_texCoords2');\n gl.vertexAttribPointer(a_texCoords2, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords2);\n // 纹理单元\n let u_texture1 = gl.getUniformLocation(program, 'u_texture1');\n gl.uniform1i(u_texture1, 0);\n let u_texture2 = gl.getUniformLocation(program, 'u_texture2');\n gl.uniform1i(u_texture2, 1);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer1);\n gl.deleteBuffer(texBuffer2);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords1);\n gl.disableVertexAttribArray(a_texCoords2);\n gl.deleteTexture(temp);\n gl.bindTexture(gl.TEXTURE_2D, null);\n bindTexture(gl, null, 0);\n bindTexture(gl, null, 1);\n}\n\nfunction drawMbm(gl, program, tex1, tex2) {\n bindTexture(gl, tex1, 0);\n bindTexture(gl, tex2, 1);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture1 = gl.getUniformLocation(program, 'u_texture1');\n gl.uniform1i(u_texture1, 0);\n let u_texture2 = gl.getUniformLocation(program, 'u_texture2');\n gl.uniform1i(u_texture2, 1);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n}\n\nfunction drawDropShadow(gl, program, frameBuffer, cache, color, w1, w2, h1, h2) {\n gl.useProgram(program);\n let { x, y, width, height, __page: page } = cache;\n let size = page.size, texture = page.texture;\n let xa = x / size, ya = (size - y) / size, xb = (x + width) / size, yb = (size - y - height) / size;\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n let w = w1 / w2, h = h1 / h2;\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -w, -h,\n -w, h,\n w, -h,\n -w, h,\n w, -h,\n w, h,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n xa, yb,\n xa, ya,\n xb, yb,\n xa, ya,\n xb, yb,\n xb, ya,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n bindTexture(gl, texture, 0);\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n gl.uniform1i(u_texture, 0);\n // color\n let u_color = gl.getUniformLocation(program, 'u_color');\n gl.uniform1fv(u_color, new Float32Array([color[0] / 255, color[1] / 255, color[2] / 255, color[3]]));\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n // 回收\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n bindTexture(gl, null, 0);\n}\n\nfunction drawDropShadowMerge(gl, target, size, tex1, dx1, dy1, w, h, tex2, dx2, dy2, width, height) {\n let { x, y } = target;\n let center = size * 0.5;\n let { x: x1, y: y2 } = convertCoords2Gl(x + dx1, y + h + dy1, 0, 1, center, center);\n let { x: x2, y: y1 } = convertCoords2Gl(x + w + dx1, y + dy1, 0, 1, center, center);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(gl.program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 1,\n 0, 0,\n 1, 1,\n 0, 0,\n 1, 1,\n 1, 0,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(gl.program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1, 1, 1, 1, 1, 1]), gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n bindTexture(gl, tex1, 0);\n let u_texture = gl.getUniformLocation(gl.program, 'u_texture');\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n\n let { x: x3, y: y4 } = convertCoords2Gl(x + dx2, y + height + dy2, 0, 1, center, center);\n let { x: x4, y: y3 } = convertCoords2Gl(x + width + dx2, y + dy2, 0, 1, center, center);\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x3, y3,\n x3, y4,\n x4, y3,\n x3, y4,\n x4, y3,\n x4, y4,\n ]), gl.STATIC_DRAW);\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1, 1, 1, 1, 1, 1]), gl.STATIC_DRAW);\n bindTexture(gl, tex2, 0);\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n bindTexture(gl, null, 0);\n}\n\nfunction drawTex2Cache(gl, program, cache, tex, width, height) {\n gl.useProgram(program);\n let page = cache.__page, size = page.__size;\n gl.viewport(0, 0, size, size);\n let x = cache.x, y = cache.y, center = size * 0.5;\n let { x: x1, y: y2 } = convertCoords2Gl(x, y + height, 0, 1, center, center);\n let { x: x2, y: y1 } = convertCoords2Gl(x + width, y, 0, 1, center, center);\n bindTexture(gl, tex, 0);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 1,\n 0, 0,\n 1, 1,\n 0, 0,\n 1, 1,\n 1, 0,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 透明度buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1, 1, 1, 1, 1, 1]), gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n bindTexture(gl, tex, 0);\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.deleteBuffer(opacityBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.disableVertexAttribArray(a_opacity);\n gl.bindTexture(gl.TEXTURE_2D, null);\n}\n\nfunction drawCache2Tex(gl, program, cache, width, height, spread) {\n let { x: tx1, y: ty1, width: w1, height: h1, __page: { texture, size } } = cache;\n gl.useProgram(program);\n gl.viewport(0, 0, width, height);\n // 首先将cache的纹理原状绘制到tex1上,为后续3次循环做准备,注意扩充的spread距离\n let cx = width * 0.5, cy = height * 0.5;\n let { x: x1, y: y2 } = convertCoords2Gl(spread, height - spread, 0, 1, cx, cy);\n let { x: x2, y: y1 } = convertCoords2Gl(width - spread, spread, 0, 1, cx, cy);\n let xa = tx1 / size, ya = (size - ty1) / size, xb = (tx1 + w1) / size, yb = (size - ty1 - h1) / size;\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n xa, ya,\n xa, yb,\n xb, ya,\n xa, yb,\n xb, ya,\n xb, yb,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1, 1, 1, 1, 1, 1]), gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n bindTexture(gl, texture, 0);\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n}\n\nfunction drawSameSize(gl, tex, opacity) {\n let program = gl.programSs;\n gl.useProgram(program);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n gl.uniform1i(u_texture, 0);\n bindTexture(gl, tex, 0);\n let u_opacity = gl.getUniformLocation(program, 'u_opacity');\n gl.uniform1f(u_opacity, opacity);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.useProgram(gl.program);\n}\n\nfunction drawOitPlane(gl, structs, list, ppt, cx, cy, dx, dy) {\n let pointBuffer = gl.createBuffer();\n let a_position = gl.getAttribLocation(gl.program, 'a_position');\n let texBuffer = gl.createBuffer();\n let a_texCoords = gl.getAttribLocation(gl.program, 'a_texCoords');\n let opacityBuffer = gl.createBuffer();\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n let u_texture = gl.getUniformLocation(gl.program, 'u_texture');\n // 循环所有顺序拼图/平面\n for(let i = 0, len = list.length; i < len; i++) {\n let { isPuzzle, node, target, points } = list[i];\n let { __width: width, __height: height,\n __tx1: tx1, __ty1: ty1, __tx2: tx2, __ty2: ty2,\n __page: page, __bbox: bbox } = target;\n // 固定绑定纹理0号单元\n if(page.__update) {\n page.genTexture(gl);\n }\n bindTexture(gl, page.texture, 0);\n let bx = bbox[0], by = bbox[1];\n let opacity = node.__opacity;\n let matrix = node.__matrixEvent;\n let tw = tx2 - tx1, th = ty2 - ty1;\n // 先按照没有拆分拼图的情况求出节点的四个顶点坐标列表,可能有重复利用hash缓存\n let vtPoint = [], vtTex = [], vtOpacity = [];\n let pHash = [], tHash = [];\n if(isPuzzle) {\n // 拼接三角形,以起点为初始点链接其它所有顶点组成n-2个三角形\n let x0, y0, z0, w0;\n let p = points[0];\n let o = calPoint({\n x: bx + dx + p.px * width,\n y: by + dy + p.py * height,\n z: 0,\n w: 1,\n }, matrix);\n w0 = o.w;\n let t = convertCoords2Gl(o.x, o.y, o.z, w0, cx, cy, ppt);\n x0 = t.x; y0 = t.y; z0 = t.z;\n let tx0 = tx1 + p.px * tw, ty0 = ty1 + p.py * th;\n // 每次循环以第0个点为起点\n for(let j = 1, len = points.length; j < len - 1; j++) {\n vtPoint.push(x0);\n vtPoint.push(y0);\n vtPoint.push(z0);\n vtPoint.push(w0);\n vtTex.push(tx0);\n vtTex.push(ty0);\n vtOpacity.push(opacity);\n // 依次的2个相邻点\n for(let k = j; k < j + 2; k++) {\n let p = points[k];\n let x, y, z, w;\n let hashP = pHash[k];\n if(hashP) {\n x = hashP.x;\n y = hashP.y;\n z = hashP.z;\n w = hashP.w;\n }\n else {\n let o = calPoint({\n x: bx + dx + p.px * width,\n y: by + dy + p.py * height,\n z: 0,\n w: 1,\n }, matrix);\n w = o.w;\n let t = convertCoords2Gl(o.x, o.y, o.z, w, cx, cy, ppt);\n x = t.x; y = t.y; z = t.z;\n pHash[k] = {\n x,\n y,\n z,\n w,\n };\n }\n vtPoint.push(x);\n vtPoint.push(y);\n vtPoint.push(z);\n vtPoint.push(w);\n let tx, ty;\n let hashT = tHash[k];\n if(hashT) {\n tx = hashT.tx;\n ty = hashT.ty;\n }\n else {\n tx = tx1 + p.px * tw;\n ty = ty1 + p.py * th;\n tHash[k] = {\n tx,\n ty,\n };\n }\n vtTex.push(tx);\n vtTex.push(ty);\n vtOpacity.push(opacity);\n }\n }\n }\n else {\n let xa = bx + dx, ya = by + height + dy;\n let xb = bx + width + dx, yb = by + dy;\n let { x1, y1, z1, w1, x2, y2, z2, w2, x3, y3, z3, w3, x4, y4, z4, w4 } = calRectPoint(xa, ya, xb, yb, matrix);\n let t = convertCoords2Gl(x1, y1, z1, w1, cx, cy, ppt);\n x1 = t.x; y1 = t.y; z1 = t.z;\n t = convertCoords2Gl(x2, y2, z2, w2, cx, cy, ppt);\n x2 = t.x; y2 = t.y; z2 = t.z;\n t = convertCoords2Gl(x3, y3, z3, w3, cx, cy, ppt);\n x3 = t.x; y3 = t.y; z3 = t.z;\n t = convertCoords2Gl(x4, y4, z4, w4, cx, cy, ppt);\n x4 = t.x; y4 = t.y; z4 = t.z;\n vtPoint[0] = x1;\n vtPoint[1] = y1;\n vtPoint[2] = z1;\n vtPoint[3] = w1;\n vtPoint[4] = x4;\n vtPoint[5] = y4;\n vtPoint[6] = z4;\n vtPoint[7] = w4;\n vtPoint[8] = x2;\n vtPoint[9] = y2;\n vtPoint[10] = z2;\n vtPoint[11] = w2;\n vtPoint[12] = x4;\n vtPoint[13] = y4;\n vtPoint[14] = z4;\n vtPoint[15] = w4;\n vtPoint[16] = x2;\n vtPoint[17] = y2;\n vtPoint[18] = z2;\n vtPoint[19] = w2;\n vtPoint[20] = x3;\n vtPoint[21] = y3;\n vtPoint[22] = z3;\n vtPoint[23] = w3;\n vtTex[0] = tx1;\n vtTex[1] = ty1;\n vtTex[2] = tx1;\n vtTex[3] = ty2;\n vtTex[4] = tx2;\n vtTex[5] = ty1;\n vtTex[6] = tx1;\n vtTex[7] = ty2;\n vtTex[8] = tx2;\n vtTex[9] = ty1;\n vtTex[10] = tx2;\n vtTex[11] = ty2;\n vtOpacity[0] = opacity;\n vtOpacity[1] = opacity;\n vtOpacity[2] = opacity;\n vtOpacity[3] = opacity;\n vtOpacity[4] = opacity;\n vtOpacity[5] = opacity;\n }\n // 顶点buffer\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtPoint), gl.STATIC_DRAW);\n gl.vertexAttribPointer(a_position, 4, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtTex), gl.STATIC_DRAW);\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtOpacity), gl.STATIC_DRAW);\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, vtOpacity.length);\n }\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.deleteBuffer(opacityBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.disableVertexAttribArray(a_opacity);\n}\n\nexport default {\n initShaders,\n convertCoords2Gl,\n createTexture,\n bindTexture,\n drawTextureCache,\n drawBlur,\n drawOverflow,\n drawMask,\n drawMbm,\n drawCm,\n drawDropShadow,\n drawDropShadowMerge,\n drawTex2Cache,\n drawCache2Tex,\n drawSameSize,\n drawOitPlane,\n};\n","import Page from './Page';\nimport webgl from '../gl/webgl';\nimport inject from '../util/inject';\n\nclass CanvasPage extends Page {\n constructor(renderMode, ctx, size, number) {\n super(renderMode, ctx, size, number);\n this.__offscreen = inject.getOffscreenCanvas(size, size, null, number);\n }\n\n genTexture(gl) {\n if(this.__update) {\n this.__update = false;\n let t = this.texture;\n if(t) {\n gl.deleteTexture(t);\n }\n this.texture = webgl.createTexture(gl, this.__offscreen.canvas, 0, null, null); // 默认0单元\n gl.bindTexture(gl.TEXTURE_2D, null);\n }\n }\n\n get offscreen() {\n return this.__offscreen;\n }\n\n get canvas() {\n return this.__offscreen.canvas;\n }\n\n get ctx() {\n return this.__offscreen.ctx;\n }\n\n get update() {\n return this.__update;\n }\n\n set update(v) {\n this.__update = v;\n }\n\n static getInstance(renderMode, ctx, rootId, size, excludePage) {\n return super.getInstance(renderMode, ctx, rootId, size, this, excludePage);\n }\n}\n\nexport default CanvasPage;\n","import Cache from './Cache';\nimport CanvasPage from './CanvasPage';\nimport inject from '../util/inject';\nimport painter from '../util/painter';\nimport tf from '../style/transform';\nimport enums from '../util/enums';\nimport css from '../style/css';\nimport mx from '../math/matrix';\n\nconst {\n STYLE_KEY: {\n TRANSFORM_ORIGIN,\n TRANSFORM,\n },\n} = enums;\nconst { spreadFilter } = css;\nconst { isE } = mx;\n\nclass CanvasCache extends Cache {\n constructor(renderMode, ctx, rootId, w, h, bbox, page, pos, x1, y1) {\n super(renderMode, ctx, rootId, w, h, bbox, page, pos, x1, y1);\n }\n\n clear() {\n if(super.clear()) {\n this.__available = false;\n let page = this.__page, ctx = page.ctx;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(this.__x, this.__y, this.__width, this.__height);\n }\n }\n\n reset(bbox, x1, y1) {\n return super.reset(bbox, x1, y1, CanvasPage);\n }\n\n get canvas() {\n return this.__page.canvas;\n }\n\n get ctx() {\n return this.__page.ctx;\n }\n\n static getInstance(renderMode, ctx, rootId, bbox, x1, y1, excludePage) {\n return super.getInstance(renderMode, ctx, rootId, bbox, x1, y1, this, CanvasPage, excludePage);\n }\n\n /**\n * 复制cache的一块出来单独作为cacheFilter,尺寸边距保持一致,用浏览器原生ctx.filter滤镜\n * @param cache\n * @param filter\n */\n static genFilter(cache, filter) {\n let { x, y, size, canvas, x1, y1, width, height, bbox } = cache;\n let oldX1 = bbox[0];\n bbox = spreadFilter(bbox, filter);\n let d = oldX1 - bbox[0];\n let widthNew = bbox[2] - bbox[0];\n let heightNew = bbox[3] - bbox[1];\n let offscreen = inject.getOffscreenCanvas(widthNew, heightNew, null, 'filter');\n offscreen.ctx.filter = painter.canvasFilter(filter);\n offscreen.ctx.drawImage(canvas, x, y, width, height, d, d, width, height);\n offscreen.ctx.filter = 'none';\n offscreen.bbox = bbox;\n // 单独的离屏,其dx/dy要重算\n offscreen.x = 0;\n offscreen.y = 0;\n offscreen.size = size;\n offscreen.x1 = x1;\n offscreen.y1 = y1;\n offscreen.dx = -bbox[0];\n offscreen.dy = -bbox[1];\n offscreen.dbx = cache.dbx + d;\n offscreen.dby = cache.dby + d;\n offscreen.width = widthNew;\n offscreen.height = heightNew;\n return offscreen;\n }\n\n static genMask(target, node, callback) {\n let cacheMask = genSingle(target, 'mask1');\n let list = [];\n let { [TRANSFORM]: transform, [TRANSFORM_ORIGIN]: tfo } = node.__computedStyle;\n let next = node.next;\n let isClip = next.__clip;\n while(next && next.__mask) {\n list.push(next);\n next = next.next;\n }\n let { x, y, ctx, dbx, dby } = cacheMask;\n let inverse = tf.calMatrixByOrigin(transform, tfo[0] + x + dbx, tfo[1] + y + dby);\n if(isE(inverse)) {\n inverse = null;\n }\n // 先将mask本身绘制到cache上,再设置模式绘制dom本身\n list.forEach(item => {\n callback(item, cacheMask, inverse);\n });\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n ctx.globalCompositeOperation = isClip ? 'source-out' : 'source-in';\n CanvasCache.drawCache(target, cacheMask);\n ctx.globalCompositeOperation = 'source-over';\n return cacheMask;\n }\n\n\n static drawCache(source, target) {\n let { x: tx, y: ty, x1, y1, ctx, dbx, dby } = target;\n let { x, y, canvas, x1: x2, y1: y2, dbx: dbx2, dby: dby2, width, height } = source;\n let ox = tx + x2 - x1 + dbx - dbx2;\n let oy = ty + y2 - y1 + dby - dby2;\n ctx.drawImage(canvas, x, y, width, height, ox, oy, width, height);\n }\n}\n\n// 根据一个共享cache的信息,生成一个独立的离屏canvas,一般是filter,mask用,可能尺寸会发生变化\nfunction genSingle(cache, message, bboxNew) {\n let { size, x1, y1, bbox } = cache;\n bboxNew = bboxNew || bbox;\n let width = bboxNew[2] - bboxNew[0];\n let height = bboxNew[3] - bboxNew[1];\n let dx = bboxNew[0] - bbox[0];\n let dy = bboxNew[1] - bbox[1];\n let offscreen = inject.getOffscreenCanvas(width, height, null, message);\n offscreen.x = 0;\n offscreen.y = 0;\n offscreen.bbox = bboxNew;\n offscreen.size = size;\n offscreen.x1 = x1;\n offscreen.y1 = y1;\n offscreen.dx = -bboxNew[0];\n offscreen.dy = -bboxNew[1];\n offscreen.dbx = cache.dbx - dx;\n offscreen.dby = cache.dby - dy;\n offscreen.width = width;\n offscreen.height = height;\n return offscreen;\n}\n\nexport default CanvasCache;\n","import inject from '../util/inject';\nimport painter from '../util/painter';\n\nconst { canvasPolygon } = painter;\n\n// 无cache时应用离屏时的优先级,从小到大,OFFSCREEN_MASK2是个特殊的\nconst OFFSCREEN_OVERFLOW = 0;\nconst OFFSCREEN_FILTER = 1;\nconst OFFSCREEN_MASK = 2;\nconst OFFSCREEN_BLEND = 3;\nconst OFFSCREEN_MASK2 = 4;\n\nfunction applyOffscreen(ctx, list, width, height) {\n list.sort(function(a, b) {\n if(a.lv === b.lv) {\n if(a.idx === b.idx) {\n return a.type - b.type;\n }\n return b.idx - a.idx;\n }\n return b.lv - a.lv;\n });\n list.forEach(item => {\n let { type, offscreen } = item;\n if(type === OFFSCREEN_OVERFLOW) {\n let { matrix, target, ctx: origin, x, y, offsetWidth, offsetHeight, list } = offscreen;\n ctx.globalCompositeOperation = 'destination-in';\n ctx.globalAlpha = 1;\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n ctx.fillStyle = '#FFF';\n ctx.beginPath();\n if(list) {\n canvasPolygon(ctx, list);\n }\n else {\n ctx.rect(x, y, offsetWidth, offsetHeight);\n }\n ctx.fill();\n ctx.closePath();\n ctx.globalCompositeOperation = 'source-over';\n ctx = origin;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n if(width && height) {\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n }\n else if(type === OFFSCREEN_FILTER) {\n let { target, ctx: origin, filter } = offscreen;\n // 申请一个新的离屏,应用blur并绘制,如没有则降级,默认ctx.filter为'none'\n if(ctx.filter) {\n let apply = inject.getOffscreenCanvas(width, height, null, 'filter2');\n apply.ctx.filter = painter.canvasFilter(filter);\n if(width && height) {\n apply.ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n apply.ctx.filter = 'none';\n target.ctx.globalAlpha = 1;\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n if(width && height) {\n target.ctx.drawImage(apply.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n apply.ctx.setTransform(1, 0, 0, 1, 0, 0);\n apply.ctx.clearRect(0, 0, width, height);\n }\n // 绘制回主画布,如果不支持则等同无filter原样绘制\n ctx = origin;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n if(width && height) {\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.globalAlpha = 1;\n target.ctx.clearRect(0, 0, width, height);\n }\n else if(type === OFFSCREEN_MASK) {\n let { mask, isClip } = offscreen;\n if(isClip) {\n ctx = mask.ctx;\n ctx.globalCompositeOperation = 'source-out';\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n if(width && height) {\n ctx.drawImage(offscreen.target.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n ctx.globalCompositeOperation = 'source-over';\n offscreen.target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n offscreen.target.ctx.clearRect(0, 0, width, height);\n ctx = offscreen.ctx;\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n if(width && height) {\n ctx.drawImage(mask.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n mask.ctx.setTransform(1, 0, 0, 1, 0, 0);\n mask.ctx.clearRect(0, 0, width, height);\n }\n else {\n let target = offscreen.target;\n ctx = target.ctx;\n ctx.globalCompositeOperation = 'destination-in';\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n if(width && height) {\n ctx.drawImage(mask.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n ctx.globalCompositeOperation = 'source-over';\n mask.ctx.setTransform(1, 0, 0, 1, 0, 0);\n mask.ctx.clearRect(0, 0, width, height);\n ctx = offscreen.ctx;\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n if(width && height) {\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n }\n }\n else if(type === OFFSCREEN_BLEND) {\n let target = offscreen.target;\n ctx = offscreen.ctx;\n ctx.globalCompositeOperation = offscreen.mixBlendMode;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n if(width && height) {\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n ctx.globalCompositeOperation = 'source-over';\n target.ctx.globalAlpha = 1;\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n }\n // 特殊的mask节点汇总结束,还原ctx\n else if(type === OFFSCREEN_MASK2) {\n ctx = offscreen.ctx;\n }\n });\n return ctx;\n}\n\nexport default {\n OFFSCREEN_OVERFLOW,\n OFFSCREEN_FILTER,\n OFFSCREEN_MASK,\n OFFSCREEN_BLEND,\n OFFSCREEN_MASK2,\n applyOffscreen,\n};\n","const TOLERANCE = 1e-6;\n\n/**\n * 计算线性方程的根\n * y = ax + b\n * root = -b / a\n * @param {Array} coefs 系数 [b, a] 本文件代码中的系数数组都是从阶次由低到高排列\n */\nfunction getLinearRoot(coefs) {\n let result = [];\n let a = coefs[1];\n\n if (a !== 0) {\n result.push(-coefs[0] / a);\n }\n return result;\n}\n\n/**\n * 计算二次方程的根,一元二次方程求根公式\n * y = ax^2 + bx + c\n * root = (-b ± sqrt(b^2 - 4ac)) / 2a\n * @param {Array} coefs 系数,系数 [c, b, a]\n */\nfunction getQuadraticRoots(coefs) {\n let results = [];\n\n let a = coefs[2];\n let b = coefs[1] / a;\n let c = coefs[0] / a;\n let d = b * b - 4 * c;\n if (d > 0) {\n let e = Math.sqrt(d);\n results.push(0.5 * (-b + e));\n results.push(0.5 * (-b - e));\n } else if (d === 0) {\n // 两个相同的根,只要返回一个\n results.push(0.5 * -b);\n }\n return results;\n}\n\n/**\n * 计算一元三次方程的根\n * y = ax^3 + bx^2 + cx + d\n * 求根公式参见: https://baike.baidu.com/item/%E4%B8%80%E5%85%83%E4%B8%89%E6%AC%A1%E6%96%B9%E7%A8%8B%E6%B1%82%E6%A0%B9%E5%85%AC%E5%BC%8F/10721952?fr=aladdin\n * @param {Array} coefs 系数\n */\nfunction getCubicRoots(coefs) {\n let results = [];\n\n let c3 = coefs[3];\n let c2 = coefs[2] / c3;\n let c1 = coefs[1] / c3;\n let c0 = coefs[0] / c3;\n\n let a = (3 * c1 - c2 * c2) / 3;\n let b = (2 * c2 * c2 * c2 - 9 * c1 * c2 + 27 * c0) / 27;\n let offset = c2 / 3;\n let discrim = b * b / 4 + a * a * a / 27;\n let halfB = b / 2;\n\n if (Math.abs(discrim) <= TOLERANCE) {\n discrim = 0;\n }\n\n if (discrim > 0) {\n let e = Math.sqrt(discrim);\n let tmp;\n let root;\n\n tmp = -halfB + e;\n if (tmp >= 0)\n root = Math.pow(tmp, 1 / 3);\n else\n root = -Math.pow(-tmp, 1 / 3);\n\n tmp = -halfB - e;\n if (tmp >= 0)\n root += Math.pow(tmp, 1 / 3);\n else\n root -= Math.pow(-tmp, 1 / 3);\n\n results.push(root - offset);\n } else if (discrim < 0) {\n let distance = Math.sqrt(-a / 3);\n let angle = Math.atan2(Math.sqrt(-discrim), -halfB) / 3;\n let cos = Math.cos(angle);\n let sin = Math.sin(angle);\n let sqrt3 = Math.sqrt(3);\n\n results.push(2 * distance * cos - offset);\n results.push(-distance * (cos + sqrt3 * sin) - offset);\n results.push(-distance * (cos - sqrt3 * sin) - offset);\n } else {\n let tmp;\n\n if (halfB >= 0)\n tmp = -Math.pow(halfB, 1 / 3);\n else\n tmp = Math.pow(-halfB, 1 / 3);\n\n results.push(2 * tmp - offset);\n // really should return next root twice, but we return only one\n results.push(-tmp - offset);\n }\n\n\n return results;\n}\n\n/**\n * 计算一元四次方程的根\n * 求根公式: https://baike.baidu.com/item/%E4%B8%80%E5%85%83%E4%B8%89%E6%AC%A1%E6%96%B9%E7%A8%8B%E6%B1%82%E6%A0%B9%E5%85%AC%E5%BC%8F/10721952?fr=aladdin\n * @param {Array} coefs 系数\n */\nfunction getQuarticRoots(coefs) {\n let results = [];\n\n let c4 = coefs[4];\n let c3 = coefs[3] / c4;\n let c2 = coefs[2] / c4;\n let c1 = coefs[1] / c4;\n let c0 = coefs[0] / c4;\n\n let resolveRoots = getCubicRoots([ 1, -c2, c3 * c1 - 4 * c0, -c3 * c3 * c0 + 4 * c2 * c0 - c1 * c1 ].reverse());\n\n let y = resolveRoots[0];\n let discrim = c3 * c3 / 4 - c2 + y;\n\n if (Math.abs(discrim) <= TOLERANCE) discrim = 0;\n\n if (discrim > 0) {\n let e = Math.sqrt(discrim);\n let t1 = 3 * c3 * c3 / 4 - e * e - 2 * c2;\n let t2 = (4 * c3 * c2 - 8 * c1 - c3 * c3 * c3) / (4 * e);\n let plus = t1 + t2;\n let minus = t1 - t2;\n\n if (Math.abs(plus) <= TOLERANCE) plus = 0;\n if (Math.abs(minus) <= TOLERANCE) minus = 0;\n\n if (plus >= 0) {\n let f = Math.sqrt(plus);\n\n results.push(-c3 / 4 + (e + f) / 2);\n results.push(-c3 / 4 + (e - f) / 2);\n }\n if (minus >= 0) {\n let f = Math.sqrt(minus);\n\n results.push(-c3 / 4 + (f - e) / 2);\n results.push(-c3 / 4 - (f + e) / 2);\n }\n } else if (discrim < 0) {\n // no roots\n } else {\n let t2 = y * y - 4 * c0;\n\n if (t2 >= -TOLERANCE) {\n if (t2 < 0) t2 = 0;\n\n t2 = 2 * Math.sqrt(t2);\n let t1 = 3 * c3 * c3 / 4 - 2 * c2;\n if (t1 + t2 >= TOLERANCE) {\n let d = Math.sqrt(t1 + t2);\n\n results.push(-c3 / 4 + d / 2);\n results.push(-c3 / 4 - d / 2);\n }\n if (t1 - t2 >= TOLERANCE) {\n let d = Math.sqrt(t1 - t2);\n\n results.push(-c3 / 4 + d / 2);\n results.push(-c3 / 4 - d / 2);\n }\n }\n }\n\n return results;\n}\n\n/**\n * 计算方程的根\n * @param {Array} coefs 系数按幂次方倒序\n */\nfunction getRoots(coefs) {\n let degree = coefs.length - 1;\n for(let i = degree; i >= 0; i--) {\n if(Math.abs(coefs[i]) < 1e-12) {\n degree--;\n }\n else {\n break;\n }\n }\n let result = [];\n switch (degree) {\n case 1:\n result = getLinearRoot(coefs);\n break;\n case 2:\n result = getQuadraticRoots(coefs);\n break;\n case 3:\n result = getCubicRoots(coefs);\n break;\n case 4:\n result = getQuarticRoots(coefs);\n }\n return result;\n}\n\nexport default {\n getRoots,\n};\n","import equation from './equation';\nimport vector from './vector';\n\nconst getRoots = equation.getRoots;\nconst { unitize3, crossProduct3, dotProduct3, isParallel3, length3 } = vector;\n\n// 两个三次方程组的数值解.9阶的多项式方程,可以最多有9个实根(两个S形曲线的情况)\n// 两个三次方程组无法解析表示,只能数值计算\n// 参考:https://mat.polsl.pl/sjpam/zeszyty/z6/Silesian_J_Pure_Appl_Math_v6_i1_str_155-176.pdf\nconst TOLERANCE = 1e-6;\nconst ACCURACY = 6;\n\n/**\n * 获取求导之后的系数\n * @param coefs\n */\nfunction getDerivativeCoefs(coefs) {\n let derivative = [];\n for(let i = 1; i < coefs.length; i++) {\n derivative.push(i * coefs[i]);\n }\n return derivative;\n}\n\n/**\n * 评估函数\n * @param x\n * @param coefs\n * @return {number}\n */\nfunction evaluate(x, coefs) {\n let result = 0;\n for(let i = coefs.length - 1; i >= 0; i--) {\n result = result * x + coefs[i];\n }\n return result;\n}\n\nfunction bisection(min, max, coefs) {\n let minValue = evaluate(min, coefs);\n let maxValue = evaluate(max, coefs);\n let result;\n if(Math.abs(minValue) <= TOLERANCE) {\n result = min;\n }\n else if(Math.abs(maxValue) <= TOLERANCE) {\n result = max;\n }\n else if(minValue * maxValue <= 0) {\n let tmp1 = Math.log(max - min);\n let tmp2 = Math.LN10 * ACCURACY;\n let iters = Math.ceil((tmp1 + tmp2) / Math.LN2);\n for(let i = 0; i < iters; i++) {\n result = 0.5 * (min + max);\n let value = evaluate(result, coefs);\n\n if(Math.abs(value) <= TOLERANCE) {\n break;\n }\n\n if(value * minValue < 0) {\n max = result;\n maxValue = value;\n }\n else {\n min = result;\n minValue = value;\n }\n }\n\n }\n return result;\n}\n\nfunction getRootsInInterval(min, max, coefs) {\n // console.log('getRootsInInterval', coefs);\n let roots = [];\n let root;\n let degree = coefs.length - 1;\n if(degree === 1) {\n root = bisection(min, max, coefs);\n if(root != null) {\n roots.push(root);\n }\n }\n else {\n let derivativeCoefs = getDerivativeCoefs(coefs);\n let droots = getRootsInInterval(min, max, derivativeCoefs);\n\n if(droots.length > 0) {\n // find root on [min, droots[0]]\n root = bisection(min, droots[0], coefs);\n if(root != null) {\n roots.push(root);\n }\n // find root on [droots[i],droots[i+1]] for 0 <= i <= count-2\n for(let i = 0; i <= droots.length - 2; i++) {\n root = bisection(droots[i], droots[i + 1], coefs);\n if(root != null) {\n roots.push(root);\n }\n }\n\n // find root on [droots[count-1],xmax]\n root = bisection(droots[droots.length - 1], max, coefs);\n if(root != null) {\n roots.push(root);\n }\n }\n else {\n // polynomial is monotone on [min,max], has at most one root\n root = bisection(min, max, coefs);\n if(root != null) {\n roots.push(root);\n }\n }\n }\n return roots;\n}\n\n/**\n * 二阶贝塞尔曲线 与 二阶贝塞尔曲线 交点\n * @return {[]}\n */\nfunction intersectBezier2Bezier2(ax1, ay1, ax2, ay2, ax3, ay3, bx1, by1, bx2, by2, bx3, by3) {\n let c12, c11, c10;\n let c22, c21, c20;\n\n let result = [];\n\n c12 = {\n x: ax1 - 2 * ax2 + ax3,\n y: ay1 - 2 * ay2 + ay3,\n };\n\n c11 = {\n x: 2 * ax2 - 2 * ax1,\n y: 2 * ay2 - 2 * ay1,\n };\n c10 = {x: ax1, y: ay1};\n c22 = {\n x: bx1 - 2 * bx2 + bx3,\n y: by1 - 2 * by2 + by3,\n };\n c21 = {\n x: 2 * bx2 - 2 * bx1,\n y: 2 * by2 - 2 * by1,\n };\n c20 = {x: bx1, y: by1};\n\n let coefs;\n\n if(c12.y === 0) {\n let v0 = c12.x * (c10.y - c20.y);\n let v1 = v0 - c11.x * c11.y;\n let v2 = v0 + v1;\n let v3 = c11.y * c11.y;\n\n coefs = [\n c12.x * c22.y * c22.y,\n 2 * c12.x * c21.y * c22.y,\n c12.x * c21.y * c21.y - c22.x * v3 - c22.y * v0 - c22.y * v1,\n -c21.x * v3 - c21.y * v0 - c21.y * v1,\n (c10.x - c20.x) * v3 + (c10.y - c20.y) * v1\n ].reverse();\n }\n else {\n let v0 = c12.x * c22.y - c12.y * c22.x;\n let v1 = c12.x * c21.y - c21.x * c12.y;\n let v2 = c11.x * c12.y - c11.y * c12.x;\n let v3 = c10.y - c20.y;\n let v4 = c12.y * (c10.x - c20.x) - c12.x * v3;\n let v5 = -c11.y * v2 + c12.y * v4;\n let v6 = v2 * v2;\n coefs = [\n v0 * v0,\n 2 * v0 * v1,\n (-c22.y * v6 + c12.y * v1 * v1 + c12.y * v0 * v4 + v0 * v5) / c12.y,\n (-c21.y * v6 + c12.y * v1 * v4 + v1 * v5) / c12.y,\n (v3 * v6 + v4 * v5) / c12.y\n ].reverse();\n }\n\n let roots = getRoots(coefs);\n\n for(let i = 0; i < roots.length; i++) {\n let s = roots[i];\n\n if(0 <= s && s <= 1) {\n let xRoots = getRoots([c12.x, c11.x, c10.x - c20.x - s * c21.x - s * s * c22.x].reverse());\n\n let yRoots = getRoots([c12.y, c11.y, c10.y - c20.y - s * c21.y - s * s * c22.y].reverse());\n\n if(xRoots.length > 0 && yRoots.length > 0) {\n let TOLERANCE = 1e-4;\n\n checkRoots:\n for(let j = 0; j < xRoots.length; j++) {\n let xRoot = xRoots[j];\n\n if(0 <= xRoot && xRoot <= 1) {\n for(let k = 0; k < yRoots.length; k++) {\n if(Math.abs(xRoot - yRoots[k]) < TOLERANCE) {\n let x = c22.x * s * s + c21.x * s + c20.x;\n let y = c22.y * s * s + c21.y * s + c20.y;\n result.push({x, y, t: xRoot});\n // result.push(c22.multiply(s * s).add(c21.multiply(s).add(c20)));\n break checkRoots;\n }\n }\n }\n }\n }\n }\n }\n return result;\n}\n\nfunction intersectBezier3Bezier3(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4, bx1, by1, bx2, by2, bx3, by3, bx4, by4) {\n let c13, c12, c11, c10; // 三阶系数\n let c23, c22, c21, c20;\n\n let result = [];\n\n c13 = {\n x: -ax1 + 3 * ax2 - 3 * ax3 + ax4,\n y: -ay1 + 3 * ay2 - 3 * ay3 + ay4,\n };\n\n c12 = {\n x: 3 * ax1 - 6 * ax2 + 3 * ax3,\n y: 3 * ay1 - 6 * ay2 + 3 * ay3,\n };\n\n c11 = {\n x: -3 * ax1 + 3 * ax2,\n y: -3 * ay1 + 3 * ay2,\n };\n\n c10 = {x: ax1, y: ay1};\n\n c23 = {\n x: -bx1 + 3 * bx2 - 3 * bx3 + bx4,\n y: -by1 + 3 * by2 - 3 * by3 + by4,\n };\n\n c22 = {\n x: 3 * bx1 - 6 * bx2 + 3 * bx3,\n y: 3 * by1 - 6 * by2 + 3 * by3,\n };\n\n c21 = {\n x: -3 * bx1 + 3 * bx2,\n y: -3 * by1 + 3 * by2,\n };\n\n c20 = {x: bx1, y: by1};\n\n let c10x2 = c10.x * c10.x;\n let c10x3 = c10.x * c10.x * c10.x;\n let c10y2 = c10.y * c10.y;\n let c10y3 = c10.y * c10.y * c10.y;\n let c11x2 = c11.x * c11.x;\n let c11x3 = c11.x * c11.x * c11.x;\n let c11y2 = c11.y * c11.y;\n let c11y3 = c11.y * c11.y * c11.y;\n let c12x2 = c12.x * c12.x;\n let c12x3 = c12.x * c12.x * c12.x;\n let c12y2 = c12.y * c12.y;\n let c12y3 = c12.y * c12.y * c12.y;\n let c13x2 = c13.x * c13.x;\n let c13x3 = c13.x * c13.x * c13.x;\n let c13y2 = c13.y * c13.y;\n let c13y3 = c13.y * c13.y * c13.y;\n let c20x2 = c20.x * c20.x;\n let c20x3 = c20.x * c20.x * c20.x;\n let c20y2 = c20.y * c20.y;\n let c20y3 = c20.y * c20.y * c20.y;\n let c21x2 = c21.x * c21.x;\n let c21x3 = c21.x * c21.x * c21.x;\n let c21y2 = c21.y * c21.y;\n let c22x2 = c22.x * c22.x;\n let c22x3 = c22.x * c22.x * c22.x;\n let c22y2 = c22.y * c22.y;\n let c23x2 = c23.x * c23.x;\n let c23x3 = c23.x * c23.x * c23.x;\n let c23y2 = c23.y * c23.y;\n let c23y3 = c23.y * c23.y * c23.y;\n\n let coefs = [-c13x3 * c23y3 + c13y3 * c23x3 - 3 * c13.x * c13y2 * c23x2 * c23.y +\n 3 * c13x2 * c13.y * c23.x * c23y2,\n -6 * c13.x * c22.x * c13y2 * c23.x * c23.y + 6 * c13x2 * c13.y * c22.y * c23.x * c23.y + 3 * c22.x * c13y3 * c23x2 -\n 3 * c13x3 * c22.y * c23y2 - 3 * c13.x * c13y2 * c22.y * c23x2 + 3 * c13x2 * c22.x * c13.y * c23y2,\n -6 * c21.x * c13.x * c13y2 * c23.x * c23.y - 6 * c13.x * c22.x * c13y2 * c22.y * c23.x + 6 * c13x2 * c22.x * c13.y * c22.y * c23.y +\n 3 * c21.x * c13y3 * c23x2 + 3 * c22x2 * c13y3 * c23.x + 3 * c21.x * c13x2 * c13.y * c23y2 - 3 * c13.x * c21.y * c13y2 * c23x2 -\n 3 * c13.x * c22x2 * c13y2 * c23.y + c13x2 * c13.y * c23.x * (6 * c21.y * c23.y + 3 * c22y2) + c13x3 * (-c21.y * c23y2 -\n 2 * c22y2 * c23.y - c23.y * (2 * c21.y * c23.y + c22y2)),\n c11.x * c12.y * c13.x * c13.y * c23.x * c23.y - c11.y * c12.x * c13.x * c13.y * c23.x * c23.y + 6 * c21.x * c22.x * c13y3 * c23.x +\n 3 * c11.x * c12.x * c13.x * c13.y * c23y2 + 6 * c10.x * c13.x * c13y2 * c23.x * c23.y - 3 * c11.x * c12.x * c13y2 * c23.x * c23.y -\n 3 * c11.y * c12.y * c13.x * c13.y * c23x2 - 6 * c10.y * c13x2 * c13.y * c23.x * c23.y - 6 * c20.x * c13.x * c13y2 * c23.x * c23.y +\n 3 * c11.y * c12.y * c13x2 * c23.x * c23.y - 2 * c12.x * c12y2 * c13.x * c23.x * c23.y - 6 * c21.x * c13.x * c22.x * c13y2 * c23.y -\n 6 * c21.x * c13.x * c13y2 * c22.y * c23.x - 6 * c13.x * c21.y * c22.x * c13y2 * c23.x + 6 * c21.x * c13x2 * c13.y * c22.y * c23.y +\n 2 * c12x2 * c12.y * c13.y * c23.x * c23.y + c22x3 * c13y3 - 3 * c10.x * c13y3 * c23x2 + 3 * c10.y * c13x3 * c23y2 +\n 3 * c20.x * c13y3 * c23x2 + c12y3 * c13.x * c23x2 - c12x3 * c13.y * c23y2 - 3 * c10.x * c13x2 * c13.y * c23y2 +\n 3 * c10.y * c13.x * c13y2 * c23x2 - 2 * c11.x * c12.y * c13x2 * c23y2 + c11.x * c12.y * c13y2 * c23x2 - c11.y * c12.x * c13x2 * c23y2 +\n 2 * c11.y * c12.x * c13y2 * c23x2 + 3 * c20.x * c13x2 * c13.y * c23y2 - c12.x * c12y2 * c13.y * c23x2 -\n 3 * c20.y * c13.x * c13y2 * c23x2 + c12x2 * c12.y * c13.x * c23y2 - 3 * c13.x * c22x2 * c13y2 * c22.y +\n c13x2 * c13.y * c23.x * (6 * c20.y * c23.y + 6 * c21.y * c22.y) + c13x2 * c22.x * c13.y * (6 * c21.y * c23.y + 3 * c22y2) +\n c13x3 * (-2 * c21.y * c22.y * c23.y - c20.y * c23y2 - c22.y * (2 * c21.y * c23.y + c22y2) - c23.y * (2 * c20.y * c23.y + 2 * c21.y * c22.y)),\n 6 * c11.x * c12.x * c13.x * c13.y * c22.y * c23.y + c11.x * c12.y * c13.x * c22.x * c13.y * c23.y + c11.x * c12.y * c13.x * c13.y * c22.y * c23.x -\n c11.y * c12.x * c13.x * c22.x * c13.y * c23.y - c11.y * c12.x * c13.x * c13.y * c22.y * c23.x - 6 * c11.y * c12.y * c13.x * c22.x * c13.y * c23.x -\n 6 * c10.x * c22.x * c13y3 * c23.x + 6 * c20.x * c22.x * c13y3 * c23.x + 6 * c10.y * c13x3 * c22.y * c23.y + 2 * c12y3 * c13.x * c22.x * c23.x -\n 2 * c12x3 * c13.y * c22.y * c23.y + 6 * c10.x * c13.x * c22.x * c13y2 * c23.y + 6 * c10.x * c13.x * c13y2 * c22.y * c23.x +\n 6 * c10.y * c13.x * c22.x * c13y2 * c23.x - 3 * c11.x * c12.x * c22.x * c13y2 * c23.y - 3 * c11.x * c12.x * c13y2 * c22.y * c23.x +\n 2 * c11.x * c12.y * c22.x * c13y2 * c23.x + 4 * c11.y * c12.x * c22.x * c13y2 * c23.x - 6 * c10.x * c13x2 * c13.y * c22.y * c23.y -\n 6 * c10.y * c13x2 * c22.x * c13.y * c23.y - 6 * c10.y * c13x2 * c13.y * c22.y * c23.x - 4 * c11.x * c12.y * c13x2 * c22.y * c23.y -\n 6 * c20.x * c13.x * c22.x * c13y2 * c23.y - 6 * c20.x * c13.x * c13y2 * c22.y * c23.x - 2 * c11.y * c12.x * c13x2 * c22.y * c23.y +\n 3 * c11.y * c12.y * c13x2 * c22.x * c23.y + 3 * c11.y * c12.y * c13x2 * c22.y * c23.x - 2 * c12.x * c12y2 * c13.x * c22.x * c23.y -\n 2 * c12.x * c12y2 * c13.x * c22.y * c23.x - 2 * c12.x * c12y2 * c22.x * c13.y * c23.x - 6 * c20.y * c13.x * c22.x * c13y2 * c23.x -\n 6 * c21.x * c13.x * c21.y * c13y2 * c23.x - 6 * c21.x * c13.x * c22.x * c13y2 * c22.y + 6 * c20.x * c13x2 * c13.y * c22.y * c23.y +\n 2 * c12x2 * c12.y * c13.x * c22.y * c23.y + 2 * c12x2 * c12.y * c22.x * c13.y * c23.y + 2 * c12x2 * c12.y * c13.y * c22.y * c23.x +\n 3 * c21.x * c22x2 * c13y3 + 3 * c21x2 * c13y3 * c23.x - 3 * c13.x * c21.y * c22x2 * c13y2 - 3 * c21x2 * c13.x * c13y2 * c23.y +\n c13x2 * c22.x * c13.y * (6 * c20.y * c23.y + 6 * c21.y * c22.y) + c13x2 * c13.y * c23.x * (6 * c20.y * c22.y + 3 * c21y2) +\n c21.x * c13x2 * c13.y * (6 * c21.y * c23.y + 3 * c22y2) + c13x3 * (-2 * c20.y * c22.y * c23.y - c23.y * (2 * c20.y * c22.y + c21y2) -\n c21.y * (2 * c21.y * c23.y + c22y2) - c22.y * (2 * c20.y * c23.y + 2 * c21.y * c22.y)),\n c11.x * c21.x * c12.y * c13.x * c13.y * c23.y + c11.x * c12.y * c13.x * c21.y * c13.y * c23.x + c11.x * c12.y * c13.x * c22.x * c13.y * c22.y -\n c11.y * c12.x * c21.x * c13.x * c13.y * c23.y - c11.y * c12.x * c13.x * c21.y * c13.y * c23.x - c11.y * c12.x * c13.x * c22.x * c13.y * c22.y -\n 6 * c11.y * c21.x * c12.y * c13.x * c13.y * c23.x - 6 * c10.x * c21.x * c13y3 * c23.x + 6 * c20.x * c21.x * c13y3 * c23.x +\n 2 * c21.x * c12y3 * c13.x * c23.x + 6 * c10.x * c21.x * c13.x * c13y2 * c23.y + 6 * c10.x * c13.x * c21.y * c13y2 * c23.x +\n 6 * c10.x * c13.x * c22.x * c13y2 * c22.y + 6 * c10.y * c21.x * c13.x * c13y2 * c23.x - 3 * c11.x * c12.x * c21.x * c13y2 * c23.y -\n 3 * c11.x * c12.x * c21.y * c13y2 * c23.x - 3 * c11.x * c12.x * c22.x * c13y2 * c22.y + 2 * c11.x * c21.x * c12.y * c13y2 * c23.x +\n 4 * c11.y * c12.x * c21.x * c13y2 * c23.x - 6 * c10.y * c21.x * c13x2 * c13.y * c23.y - 6 * c10.y * c13x2 * c21.y * c13.y * c23.x -\n 6 * c10.y * c13x2 * c22.x * c13.y * c22.y - 6 * c20.x * c21.x * c13.x * c13y2 * c23.y - 6 * c20.x * c13.x * c21.y * c13y2 * c23.x -\n 6 * c20.x * c13.x * c22.x * c13y2 * c22.y + 3 * c11.y * c21.x * c12.y * c13x2 * c23.y - 3 * c11.y * c12.y * c13.x * c22x2 * c13.y +\n 3 * c11.y * c12.y * c13x2 * c21.y * c23.x + 3 * c11.y * c12.y * c13x2 * c22.x * c22.y - 2 * c12.x * c21.x * c12y2 * c13.x * c23.y -\n 2 * c12.x * c21.x * c12y2 * c13.y * c23.x - 2 * c12.x * c12y2 * c13.x * c21.y * c23.x - 2 * c12.x * c12y2 * c13.x * c22.x * c22.y -\n 6 * c20.y * c21.x * c13.x * c13y2 * c23.x - 6 * c21.x * c13.x * c21.y * c22.x * c13y2 + 6 * c20.y * c13x2 * c21.y * c13.y * c23.x +\n 2 * c12x2 * c21.x * c12.y * c13.y * c23.y + 2 * c12x2 * c12.y * c21.y * c13.y * c23.x + 2 * c12x2 * c12.y * c22.x * c13.y * c22.y -\n 3 * c10.x * c22x2 * c13y3 + 3 * c20.x * c22x2 * c13y3 + 3 * c21x2 * c22.x * c13y3 + c12y3 * c13.x * c22x2 +\n 3 * c10.y * c13.x * c22x2 * c13y2 + c11.x * c12.y * c22x2 * c13y2 + 2 * c11.y * c12.x * c22x2 * c13y2 -\n c12.x * c12y2 * c22x2 * c13.y - 3 * c20.y * c13.x * c22x2 * c13y2 - 3 * c21x2 * c13.x * c13y2 * c22.y +\n c12x2 * c12.y * c13.x * (2 * c21.y * c23.y + c22y2) + c11.x * c12.x * c13.x * c13.y * (6 * c21.y * c23.y + 3 * c22y2) +\n c21.x * c13x2 * c13.y * (6 * c20.y * c23.y + 6 * c21.y * c22.y) + c12x3 * c13.y * (-2 * c21.y * c23.y - c22y2) +\n c10.y * c13x3 * (6 * c21.y * c23.y + 3 * c22y2) + c11.y * c12.x * c13x2 * (-2 * c21.y * c23.y - c22y2) +\n c11.x * c12.y * c13x2 * (-4 * c21.y * c23.y - 2 * c22y2) + c10.x * c13x2 * c13.y * (-6 * c21.y * c23.y - 3 * c22y2) +\n c13x2 * c22.x * c13.y * (6 * c20.y * c22.y + 3 * c21y2) + c20.x * c13x2 * c13.y * (6 * c21.y * c23.y + 3 * c22y2) +\n c13x3 * (-2 * c20.y * c21.y * c23.y - c22.y * (2 * c20.y * c22.y + c21y2) - c20.y * (2 * c21.y * c23.y + c22y2) -\n c21.y * (2 * c20.y * c23.y + 2 * c21.y * c22.y)),\n -c10.x * c11.x * c12.y * c13.x * c13.y * c23.y + c10.x * c11.y * c12.x * c13.x * c13.y * c23.y + 6 * c10.x * c11.y * c12.y * c13.x * c13.y * c23.x -\n 6 * c10.y * c11.x * c12.x * c13.x * c13.y * c23.y - c10.y * c11.x * c12.y * c13.x * c13.y * c23.x + c10.y * c11.y * c12.x * c13.x * c13.y * c23.x +\n c11.x * c11.y * c12.x * c12.y * c13.x * c23.y - c11.x * c11.y * c12.x * c12.y * c13.y * c23.x + c11.x * c20.x * c12.y * c13.x * c13.y * c23.y +\n c11.x * c20.y * c12.y * c13.x * c13.y * c23.x + c11.x * c21.x * c12.y * c13.x * c13.y * c22.y + c11.x * c12.y * c13.x * c21.y * c22.x * c13.y -\n c20.x * c11.y * c12.x * c13.x * c13.y * c23.y - 6 * c20.x * c11.y * c12.y * c13.x * c13.y * c23.x - c11.y * c12.x * c20.y * c13.x * c13.y * c23.x -\n c11.y * c12.x * c21.x * c13.x * c13.y * c22.y - c11.y * c12.x * c13.x * c21.y * c22.x * c13.y - 6 * c11.y * c21.x * c12.y * c13.x * c22.x * c13.y -\n 6 * c10.x * c20.x * c13y3 * c23.x - 6 * c10.x * c21.x * c22.x * c13y3 - 2 * c10.x * c12y3 * c13.x * c23.x + 6 * c20.x * c21.x * c22.x * c13y3 +\n 2 * c20.x * c12y3 * c13.x * c23.x + 2 * c21.x * c12y3 * c13.x * c22.x + 2 * c10.y * c12x3 * c13.y * c23.y - 6 * c10.x * c10.y * c13.x * c13y2 * c23.x +\n 3 * c10.x * c11.x * c12.x * c13y2 * c23.y - 2 * c10.x * c11.x * c12.y * c13y2 * c23.x - 4 * c10.x * c11.y * c12.x * c13y2 * c23.x +\n 3 * c10.y * c11.x * c12.x * c13y2 * c23.x + 6 * c10.x * c10.y * c13x2 * c13.y * c23.y + 6 * c10.x * c20.x * c13.x * c13y2 * c23.y -\n 3 * c10.x * c11.y * c12.y * c13x2 * c23.y + 2 * c10.x * c12.x * c12y2 * c13.x * c23.y + 2 * c10.x * c12.x * c12y2 * c13.y * c23.x +\n 6 * c10.x * c20.y * c13.x * c13y2 * c23.x + 6 * c10.x * c21.x * c13.x * c13y2 * c22.y + 6 * c10.x * c13.x * c21.y * c22.x * c13y2 +\n 4 * c10.y * c11.x * c12.y * c13x2 * c23.y + 6 * c10.y * c20.x * c13.x * c13y2 * c23.x + 2 * c10.y * c11.y * c12.x * c13x2 * c23.y -\n 3 * c10.y * c11.y * c12.y * c13x2 * c23.x + 2 * c10.y * c12.x * c12y2 * c13.x * c23.x + 6 * c10.y * c21.x * c13.x * c22.x * c13y2 -\n 3 * c11.x * c20.x * c12.x * c13y2 * c23.y + 2 * c11.x * c20.x * c12.y * c13y2 * c23.x + c11.x * c11.y * c12y2 * c13.x * c23.x -\n 3 * c11.x * c12.x * c20.y * c13y2 * c23.x - 3 * c11.x * c12.x * c21.x * c13y2 * c22.y - 3 * c11.x * c12.x * c21.y * c22.x * c13y2 +\n 2 * c11.x * c21.x * c12.y * c22.x * c13y2 + 4 * c20.x * c11.y * c12.x * c13y2 * c23.x + 4 * c11.y * c12.x * c21.x * c22.x * c13y2 -\n 2 * c10.x * c12x2 * c12.y * c13.y * c23.y - 6 * c10.y * c20.x * c13x2 * c13.y * c23.y - 6 * c10.y * c20.y * c13x2 * c13.y * c23.x -\n 6 * c10.y * c21.x * c13x2 * c13.y * c22.y - 2 * c10.y * c12x2 * c12.y * c13.x * c23.y - 2 * c10.y * c12x2 * c12.y * c13.y * c23.x -\n 6 * c10.y * c13x2 * c21.y * c22.x * c13.y - c11.x * c11.y * c12x2 * c13.y * c23.y - 2 * c11.x * c11y2 * c13.x * c13.y * c23.x +\n 3 * c20.x * c11.y * c12.y * c13x2 * c23.y - 2 * c20.x * c12.x * c12y2 * c13.x * c23.y - 2 * c20.x * c12.x * c12y2 * c13.y * c23.x -\n 6 * c20.x * c20.y * c13.x * c13y2 * c23.x - 6 * c20.x * c21.x * c13.x * c13y2 * c22.y - 6 * c20.x * c13.x * c21.y * c22.x * c13y2 +\n 3 * c11.y * c20.y * c12.y * c13x2 * c23.x + 3 * c11.y * c21.x * c12.y * c13x2 * c22.y + 3 * c11.y * c12.y * c13x2 * c21.y * c22.x -\n 2 * c12.x * c20.y * c12y2 * c13.x * c23.x - 2 * c12.x * c21.x * c12y2 * c13.x * c22.y - 2 * c12.x * c21.x * c12y2 * c22.x * c13.y -\n 2 * c12.x * c12y2 * c13.x * c21.y * c22.x - 6 * c20.y * c21.x * c13.x * c22.x * c13y2 - c11y2 * c12.x * c12.y * c13.x * c23.x +\n 2 * c20.x * c12x2 * c12.y * c13.y * c23.y + 6 * c20.y * c13x2 * c21.y * c22.x * c13.y + 2 * c11x2 * c11.y * c13.x * c13.y * c23.y +\n c11x2 * c12.x * c12.y * c13.y * c23.y + 2 * c12x2 * c20.y * c12.y * c13.y * c23.x + 2 * c12x2 * c21.x * c12.y * c13.y * c22.y +\n 2 * c12x2 * c12.y * c21.y * c22.x * c13.y + c21x3 * c13y3 + 3 * c10x2 * c13y3 * c23.x - 3 * c10y2 * c13x3 * c23.y +\n 3 * c20x2 * c13y3 * c23.x + c11y3 * c13x2 * c23.x - c11x3 * c13y2 * c23.y - c11.x * c11y2 * c13x2 * c23.y +\n c11x2 * c11.y * c13y2 * c23.x - 3 * c10x2 * c13.x * c13y2 * c23.y + 3 * c10y2 * c13x2 * c13.y * c23.x - c11x2 * c12y2 * c13.x * c23.y +\n c11y2 * c12x2 * c13.y * c23.x - 3 * c21x2 * c13.x * c21.y * c13y2 - 3 * c20x2 * c13.x * c13y2 * c23.y + 3 * c20y2 * c13x2 * c13.y * c23.x +\n c11.x * c12.x * c13.x * c13.y * (6 * c20.y * c23.y + 6 * c21.y * c22.y) + c12x3 * c13.y * (-2 * c20.y * c23.y - 2 * c21.y * c22.y) +\n c10.y * c13x3 * (6 * c20.y * c23.y + 6 * c21.y * c22.y) + c11.y * c12.x * c13x2 * (-2 * c20.y * c23.y - 2 * c21.y * c22.y) +\n c12x2 * c12.y * c13.x * (2 * c20.y * c23.y + 2 * c21.y * c22.y) + c11.x * c12.y * c13x2 * (-4 * c20.y * c23.y - 4 * c21.y * c22.y) +\n c10.x * c13x2 * c13.y * (-6 * c20.y * c23.y - 6 * c21.y * c22.y) + c20.x * c13x2 * c13.y * (6 * c20.y * c23.y + 6 * c21.y * c22.y) +\n c21.x * c13x2 * c13.y * (6 * c20.y * c22.y + 3 * c21y2) + c13x3 * (-2 * c20.y * c21.y * c22.y - c20y2 * c23.y -\n c21.y * (2 * c20.y * c22.y + c21y2) - c20.y * (2 * c20.y * c23.y + 2 * c21.y * c22.y)),\n -c10.x * c11.x * c12.y * c13.x * c13.y * c22.y + c10.x * c11.y * c12.x * c13.x * c13.y * c22.y + 6 * c10.x * c11.y * c12.y * c13.x * c22.x * c13.y -\n 6 * c10.y * c11.x * c12.x * c13.x * c13.y * c22.y - c10.y * c11.x * c12.y * c13.x * c22.x * c13.y + c10.y * c11.y * c12.x * c13.x * c22.x * c13.y +\n c11.x * c11.y * c12.x * c12.y * c13.x * c22.y - c11.x * c11.y * c12.x * c12.y * c22.x * c13.y + c11.x * c20.x * c12.y * c13.x * c13.y * c22.y +\n c11.x * c20.y * c12.y * c13.x * c22.x * c13.y + c11.x * c21.x * c12.y * c13.x * c21.y * c13.y - c20.x * c11.y * c12.x * c13.x * c13.y * c22.y -\n 6 * c20.x * c11.y * c12.y * c13.x * c22.x * c13.y - c11.y * c12.x * c20.y * c13.x * c22.x * c13.y - c11.y * c12.x * c21.x * c13.x * c21.y * c13.y -\n 6 * c10.x * c20.x * c22.x * c13y3 - 2 * c10.x * c12y3 * c13.x * c22.x + 2 * c20.x * c12y3 * c13.x * c22.x + 2 * c10.y * c12x3 * c13.y * c22.y -\n 6 * c10.x * c10.y * c13.x * c22.x * c13y2 + 3 * c10.x * c11.x * c12.x * c13y2 * c22.y - 2 * c10.x * c11.x * c12.y * c22.x * c13y2 -\n 4 * c10.x * c11.y * c12.x * c22.x * c13y2 + 3 * c10.y * c11.x * c12.x * c22.x * c13y2 + 6 * c10.x * c10.y * c13x2 * c13.y * c22.y +\n 6 * c10.x * c20.x * c13.x * c13y2 * c22.y - 3 * c10.x * c11.y * c12.y * c13x2 * c22.y + 2 * c10.x * c12.x * c12y2 * c13.x * c22.y +\n 2 * c10.x * c12.x * c12y2 * c22.x * c13.y + 6 * c10.x * c20.y * c13.x * c22.x * c13y2 + 6 * c10.x * c21.x * c13.x * c21.y * c13y2 +\n 4 * c10.y * c11.x * c12.y * c13x2 * c22.y + 6 * c10.y * c20.x * c13.x * c22.x * c13y2 + 2 * c10.y * c11.y * c12.x * c13x2 * c22.y -\n 3 * c10.y * c11.y * c12.y * c13x2 * c22.x + 2 * c10.y * c12.x * c12y2 * c13.x * c22.x - 3 * c11.x * c20.x * c12.x * c13y2 * c22.y +\n 2 * c11.x * c20.x * c12.y * c22.x * c13y2 + c11.x * c11.y * c12y2 * c13.x * c22.x - 3 * c11.x * c12.x * c20.y * c22.x * c13y2 -\n 3 * c11.x * c12.x * c21.x * c21.y * c13y2 + 4 * c20.x * c11.y * c12.x * c22.x * c13y2 - 2 * c10.x * c12x2 * c12.y * c13.y * c22.y -\n 6 * c10.y * c20.x * c13x2 * c13.y * c22.y - 6 * c10.y * c20.y * c13x2 * c22.x * c13.y - 6 * c10.y * c21.x * c13x2 * c21.y * c13.y -\n 2 * c10.y * c12x2 * c12.y * c13.x * c22.y - 2 * c10.y * c12x2 * c12.y * c22.x * c13.y - c11.x * c11.y * c12x2 * c13.y * c22.y -\n 2 * c11.x * c11y2 * c13.x * c22.x * c13.y + 3 * c20.x * c11.y * c12.y * c13x2 * c22.y - 2 * c20.x * c12.x * c12y2 * c13.x * c22.y -\n 2 * c20.x * c12.x * c12y2 * c22.x * c13.y - 6 * c20.x * c20.y * c13.x * c22.x * c13y2 - 6 * c20.x * c21.x * c13.x * c21.y * c13y2 +\n 3 * c11.y * c20.y * c12.y * c13x2 * c22.x + 3 * c11.y * c21.x * c12.y * c13x2 * c21.y - 2 * c12.x * c20.y * c12y2 * c13.x * c22.x -\n 2 * c12.x * c21.x * c12y2 * c13.x * c21.y - c11y2 * c12.x * c12.y * c13.x * c22.x + 2 * c20.x * c12x2 * c12.y * c13.y * c22.y -\n 3 * c11.y * c21x2 * c12.y * c13.x * c13.y + 6 * c20.y * c21.x * c13x2 * c21.y * c13.y + 2 * c11x2 * c11.y * c13.x * c13.y * c22.y +\n c11x2 * c12.x * c12.y * c13.y * c22.y + 2 * c12x2 * c20.y * c12.y * c22.x * c13.y + 2 * c12x2 * c21.x * c12.y * c21.y * c13.y -\n 3 * c10.x * c21x2 * c13y3 + 3 * c20.x * c21x2 * c13y3 + 3 * c10x2 * c22.x * c13y3 - 3 * c10y2 * c13x3 * c22.y + 3 * c20x2 * c22.x * c13y3 +\n c21x2 * c12y3 * c13.x + c11y3 * c13x2 * c22.x - c11x3 * c13y2 * c22.y + 3 * c10.y * c21x2 * c13.x * c13y2 -\n c11.x * c11y2 * c13x2 * c22.y + c11.x * c21x2 * c12.y * c13y2 + 2 * c11.y * c12.x * c21x2 * c13y2 + c11x2 * c11.y * c22.x * c13y2 -\n c12.x * c21x2 * c12y2 * c13.y - 3 * c20.y * c21x2 * c13.x * c13y2 - 3 * c10x2 * c13.x * c13y2 * c22.y + 3 * c10y2 * c13x2 * c22.x * c13.y -\n c11x2 * c12y2 * c13.x * c22.y + c11y2 * c12x2 * c22.x * c13.y - 3 * c20x2 * c13.x * c13y2 * c22.y + 3 * c20y2 * c13x2 * c22.x * c13.y +\n c12x2 * c12.y * c13.x * (2 * c20.y * c22.y + c21y2) + c11.x * c12.x * c13.x * c13.y * (6 * c20.y * c22.y + 3 * c21y2) +\n c12x3 * c13.y * (-2 * c20.y * c22.y - c21y2) + c10.y * c13x3 * (6 * c20.y * c22.y + 3 * c21y2) +\n c11.y * c12.x * c13x2 * (-2 * c20.y * c22.y - c21y2) + c11.x * c12.y * c13x2 * (-4 * c20.y * c22.y - 2 * c21y2) +\n c10.x * c13x2 * c13.y * (-6 * c20.y * c22.y - 3 * c21y2) + c20.x * c13x2 * c13.y * (6 * c20.y * c22.y + 3 * c21y2) +\n c13x3 * (-2 * c20.y * c21y2 - c20y2 * c22.y - c20.y * (2 * c20.y * c22.y + c21y2)),\n -c10.x * c11.x * c12.y * c13.x * c21.y * c13.y + c10.x * c11.y * c12.x * c13.x * c21.y * c13.y + 6 * c10.x * c11.y * c21.x * c12.y * c13.x * c13.y -\n 6 * c10.y * c11.x * c12.x * c13.x * c21.y * c13.y - c10.y * c11.x * c21.x * c12.y * c13.x * c13.y + c10.y * c11.y * c12.x * c21.x * c13.x * c13.y -\n c11.x * c11.y * c12.x * c21.x * c12.y * c13.y + c11.x * c11.y * c12.x * c12.y * c13.x * c21.y + c11.x * c20.x * c12.y * c13.x * c21.y * c13.y +\n 6 * c11.x * c12.x * c20.y * c13.x * c21.y * c13.y + c11.x * c20.y * c21.x * c12.y * c13.x * c13.y - c20.x * c11.y * c12.x * c13.x * c21.y * c13.y -\n 6 * c20.x * c11.y * c21.x * c12.y * c13.x * c13.y - c11.y * c12.x * c20.y * c21.x * c13.x * c13.y - 6 * c10.x * c20.x * c21.x * c13y3 -\n 2 * c10.x * c21.x * c12y3 * c13.x + 6 * c10.y * c20.y * c13x3 * c21.y + 2 * c20.x * c21.x * c12y3 * c13.x + 2 * c10.y * c12x3 * c21.y * c13.y -\n 2 * c12x3 * c20.y * c21.y * c13.y - 6 * c10.x * c10.y * c21.x * c13.x * c13y2 + 3 * c10.x * c11.x * c12.x * c21.y * c13y2 -\n 2 * c10.x * c11.x * c21.x * c12.y * c13y2 - 4 * c10.x * c11.y * c12.x * c21.x * c13y2 + 3 * c10.y * c11.x * c12.x * c21.x * c13y2 +\n 6 * c10.x * c10.y * c13x2 * c21.y * c13.y + 6 * c10.x * c20.x * c13.x * c21.y * c13y2 - 3 * c10.x * c11.y * c12.y * c13x2 * c21.y +\n 2 * c10.x * c12.x * c21.x * c12y2 * c13.y + 2 * c10.x * c12.x * c12y2 * c13.x * c21.y + 6 * c10.x * c20.y * c21.x * c13.x * c13y2 +\n 4 * c10.y * c11.x * c12.y * c13x2 * c21.y + 6 * c10.y * c20.x * c21.x * c13.x * c13y2 + 2 * c10.y * c11.y * c12.x * c13x2 * c21.y -\n 3 * c10.y * c11.y * c21.x * c12.y * c13x2 + 2 * c10.y * c12.x * c21.x * c12y2 * c13.x - 3 * c11.x * c20.x * c12.x * c21.y * c13y2 +\n 2 * c11.x * c20.x * c21.x * c12.y * c13y2 + c11.x * c11.y * c21.x * c12y2 * c13.x - 3 * c11.x * c12.x * c20.y * c21.x * c13y2 +\n 4 * c20.x * c11.y * c12.x * c21.x * c13y2 - 6 * c10.x * c20.y * c13x2 * c21.y * c13.y - 2 * c10.x * c12x2 * c12.y * c21.y * c13.y -\n 6 * c10.y * c20.x * c13x2 * c21.y * c13.y - 6 * c10.y * c20.y * c21.x * c13x2 * c13.y - 2 * c10.y * c12x2 * c21.x * c12.y * c13.y -\n 2 * c10.y * c12x2 * c12.y * c13.x * c21.y - c11.x * c11.y * c12x2 * c21.y * c13.y - 4 * c11.x * c20.y * c12.y * c13x2 * c21.y -\n 2 * c11.x * c11y2 * c21.x * c13.x * c13.y + 3 * c20.x * c11.y * c12.y * c13x2 * c21.y - 2 * c20.x * c12.x * c21.x * c12y2 * c13.y -\n 2 * c20.x * c12.x * c12y2 * c13.x * c21.y - 6 * c20.x * c20.y * c21.x * c13.x * c13y2 - 2 * c11.y * c12.x * c20.y * c13x2 * c21.y +\n 3 * c11.y * c20.y * c21.x * c12.y * c13x2 - 2 * c12.x * c20.y * c21.x * c12y2 * c13.x - c11y2 * c12.x * c21.x * c12.y * c13.x +\n 6 * c20.x * c20.y * c13x2 * c21.y * c13.y + 2 * c20.x * c12x2 * c12.y * c21.y * c13.y + 2 * c11x2 * c11.y * c13.x * c21.y * c13.y +\n c11x2 * c12.x * c12.y * c21.y * c13.y + 2 * c12x2 * c20.y * c21.x * c12.y * c13.y + 2 * c12x2 * c20.y * c12.y * c13.x * c21.y +\n 3 * c10x2 * c21.x * c13y3 - 3 * c10y2 * c13x3 * c21.y + 3 * c20x2 * c21.x * c13y3 + c11y3 * c21.x * c13x2 - c11x3 * c21.y * c13y2 -\n 3 * c20y2 * c13x3 * c21.y - c11.x * c11y2 * c13x2 * c21.y + c11x2 * c11.y * c21.x * c13y2 - 3 * c10x2 * c13.x * c21.y * c13y2 +\n 3 * c10y2 * c21.x * c13x2 * c13.y - c11x2 * c12y2 * c13.x * c21.y + c11y2 * c12x2 * c21.x * c13.y - 3 * c20x2 * c13.x * c21.y * c13y2 +\n 3 * c20y2 * c21.x * c13x2 * c13.y,\n c10.x * c10.y * c11.x * c12.y * c13.x * c13.y - c10.x * c10.y * c11.y * c12.x * c13.x * c13.y + c10.x * c11.x * c11.y * c12.x * c12.y * c13.y -\n c10.y * c11.x * c11.y * c12.x * c12.y * c13.x - c10.x * c11.x * c20.y * c12.y * c13.x * c13.y + 6 * c10.x * c20.x * c11.y * c12.y * c13.x * c13.y +\n c10.x * c11.y * c12.x * c20.y * c13.x * c13.y - c10.y * c11.x * c20.x * c12.y * c13.x * c13.y - 6 * c10.y * c11.x * c12.x * c20.y * c13.x * c13.y +\n c10.y * c20.x * c11.y * c12.x * c13.x * c13.y - c11.x * c20.x * c11.y * c12.x * c12.y * c13.y + c11.x * c11.y * c12.x * c20.y * c12.y * c13.x +\n c11.x * c20.x * c20.y * c12.y * c13.x * c13.y - c20.x * c11.y * c12.x * c20.y * c13.x * c13.y - 2 * c10.x * c20.x * c12y3 * c13.x +\n 2 * c10.y * c12x3 * c20.y * c13.y - 3 * c10.x * c10.y * c11.x * c12.x * c13y2 - 6 * c10.x * c10.y * c20.x * c13.x * c13y2 +\n 3 * c10.x * c10.y * c11.y * c12.y * c13x2 - 2 * c10.x * c10.y * c12.x * c12y2 * c13.x - 2 * c10.x * c11.x * c20.x * c12.y * c13y2 -\n c10.x * c11.x * c11.y * c12y2 * c13.x + 3 * c10.x * c11.x * c12.x * c20.y * c13y2 - 4 * c10.x * c20.x * c11.y * c12.x * c13y2 +\n 3 * c10.y * c11.x * c20.x * c12.x * c13y2 + 6 * c10.x * c10.y * c20.y * c13x2 * c13.y + 2 * c10.x * c10.y * c12x2 * c12.y * c13.y +\n 2 * c10.x * c11.x * c11y2 * c13.x * c13.y + 2 * c10.x * c20.x * c12.x * c12y2 * c13.y + 6 * c10.x * c20.x * c20.y * c13.x * c13y2 -\n 3 * c10.x * c11.y * c20.y * c12.y * c13x2 + 2 * c10.x * c12.x * c20.y * c12y2 * c13.x + c10.x * c11y2 * c12.x * c12.y * c13.x +\n c10.y * c11.x * c11.y * c12x2 * c13.y + 4 * c10.y * c11.x * c20.y * c12.y * c13x2 - 3 * c10.y * c20.x * c11.y * c12.y * c13x2 +\n 2 * c10.y * c20.x * c12.x * c12y2 * c13.x + 2 * c10.y * c11.y * c12.x * c20.y * c13x2 + c11.x * c20.x * c11.y * c12y2 * c13.x -\n 3 * c11.x * c20.x * c12.x * c20.y * c13y2 - 2 * c10.x * c12x2 * c20.y * c12.y * c13.y - 6 * c10.y * c20.x * c20.y * c13x2 * c13.y -\n 2 * c10.y * c20.x * c12x2 * c12.y * c13.y - 2 * c10.y * c11x2 * c11.y * c13.x * c13.y - c10.y * c11x2 * c12.x * c12.y * c13.y -\n 2 * c10.y * c12x2 * c20.y * c12.y * c13.x - 2 * c11.x * c20.x * c11y2 * c13.x * c13.y - c11.x * c11.y * c12x2 * c20.y * c13.y +\n 3 * c20.x * c11.y * c20.y * c12.y * c13x2 - 2 * c20.x * c12.x * c20.y * c12y2 * c13.x - c20.x * c11y2 * c12.x * c12.y * c13.x +\n 3 * c10y2 * c11.x * c12.x * c13.x * c13.y + 3 * c11.x * c12.x * c20y2 * c13.x * c13.y + 2 * c20.x * c12x2 * c20.y * c12.y * c13.y -\n 3 * c10x2 * c11.y * c12.y * c13.x * c13.y + 2 * c11x2 * c11.y * c20.y * c13.x * c13.y + c11x2 * c12.x * c20.y * c12.y * c13.y -\n 3 * c20x2 * c11.y * c12.y * c13.x * c13.y - c10x3 * c13y3 + c10y3 * c13x3 + c20x3 * c13y3 - c20y3 * c13x3 -\n 3 * c10.x * c20x2 * c13y3 - c10.x * c11y3 * c13x2 + 3 * c10x2 * c20.x * c13y3 + c10.y * c11x3 * c13y2 +\n 3 * c10.y * c20y2 * c13x3 + c20.x * c11y3 * c13x2 + c10x2 * c12y3 * c13.x - 3 * c10y2 * c20.y * c13x3 - c10y2 * c12x3 * c13.y +\n c20x2 * c12y3 * c13.x - c11x3 * c20.y * c13y2 - c12x3 * c20y2 * c13.y - c10.x * c11x2 * c11.y * c13y2 +\n c10.y * c11.x * c11y2 * c13x2 - 3 * c10.x * c10y2 * c13x2 * c13.y - c10.x * c11y2 * c12x2 * c13.y + c10.y * c11x2 * c12y2 * c13.x -\n c11.x * c11y2 * c20.y * c13x2 + 3 * c10x2 * c10.y * c13.x * c13y2 + c10x2 * c11.x * c12.y * c13y2 +\n 2 * c10x2 * c11.y * c12.x * c13y2 - 2 * c10y2 * c11.x * c12.y * c13x2 - c10y2 * c11.y * c12.x * c13x2 + c11x2 * c20.x * c11.y * c13y2 -\n 3 * c10.x * c20y2 * c13x2 * c13.y + 3 * c10.y * c20x2 * c13.x * c13y2 + c11.x * c20x2 * c12.y * c13y2 - 2 * c11.x * c20y2 * c12.y * c13x2 +\n c20.x * c11y2 * c12x2 * c13.y - c11.y * c12.x * c20y2 * c13x2 - c10x2 * c12.x * c12y2 * c13.y - 3 * c10x2 * c20.y * c13.x * c13y2 +\n 3 * c10y2 * c20.x * c13x2 * c13.y + c10y2 * c12x2 * c12.y * c13.x - c11x2 * c20.y * c12y2 * c13.x + 2 * c20x2 * c11.y * c12.x * c13y2 +\n 3 * c20.x * c20y2 * c13x2 * c13.y - c20x2 * c12.x * c12y2 * c13.y - 3 * c20x2 * c20.y * c13.x * c13y2 + c12x2 * c20y2 * c12.y * c13.x\n ].reverse();\n\n let roots = getRootsInInterval(0, 1, coefs);\n\n for(let i = 0; i < roots.length; i++) {\n let s = roots[i];\n let xRoots = getRoots([c13.x, c12.x, c11.x, c10.x - c20.x - s * c21.x - s * s * c22.x - s * s * s * c23.x].reverse());\n let yRoots = getRoots([c13.y,\n c12.y,\n c11.y,\n c10.y - c20.y - s * c21.y - s * s * c22.y - s * s * s * c23.y].reverse());\n\n if(xRoots.length > 0 && yRoots.length > 0) {\n let TOLERANCE = 1e-4;\n\n checkRoots:\n for(let j = 0; j < xRoots.length; j++) {\n let xRoot = xRoots[j];\n\n if(0 <= xRoot && xRoot <= 1) {\n for(let k = 0; k < yRoots.length; k++) {\n if(Math.abs(xRoot - yRoots[k]) < TOLERANCE) {\n let x = c23.x * s * s * s + c22.x * s * s + c21.x * s + c20.x;\n let y = c23.y * s * s * s + c22.y * s * s + c21.y * s + c20.y;\n result.push({x, y, t: xRoot});\n break checkRoots;\n }\n }\n }\n }\n }\n }\n return result;\n}\n\nfunction intersectBezier2Bezier3(ax1, ay1, ax2, ay2, ax3, ay3, bx1, by1, bx2, by2, bx3, by3, bx4, by4) {\n let c12, c11, c10;\n let c23, c22, c21, c20;\n let result = [];\n\n c12 = {\n x: ax1 - 2 * ax2 + ax3,\n y: ay1 - 2 * ay2 + ay3,\n };\n\n c11 = {\n x: 2 * ax2 - 2 * ax1,\n y: 2 * ay2 - 2 * ay1,\n };\n c10 = {x: ax1, y: ay1};\n\n c23 = {\n x: -bx1 + 3 * bx2 - 3 * bx3 + bx4,\n y: -by1 + 3 * by2 - 3 * by3 + by4,\n };\n\n c22 = {\n x: 3 * bx1 - 6 * bx2 + 3 * bx3,\n y: 3 * by1 - 6 * by2 + 3 * by3,\n };\n\n c21 = {\n x: -3 * bx1 + 3 * bx2,\n y: -3 * by1 + 3 * by2,\n };\n\n c20 = {x: bx1, y: by1};\n\n let c10x2 = c10.x * c10.x;\n let c10y2 = c10.y * c10.y;\n let c11x2 = c11.x * c11.x;\n let c11y2 = c11.y * c11.y;\n let c12x2 = c12.x * c12.x;\n let c12y2 = c12.y * c12.y;\n let c20x2 = c20.x * c20.x;\n let c20y2 = c20.y * c20.y;\n let c21x2 = c21.x * c21.x;\n let c21y2 = c21.y * c21.y;\n let c22x2 = c22.x * c22.x;\n let c22y2 = c22.y * c22.y;\n let c23x2 = c23.x * c23.x;\n let c23y2 = c23.y * c23.y;\n\n let coefs = [\n -2 * c12.x * c12.y * c23.x * c23.y + c12x2 * c23y2 + c12y2 * c23x2,\n -2 * c12.x * c12.y * c22.x * c23.y - 2 * c12.x * c12.y * c22.y * c23.x + 2 * c12y2 * c22.x * c23.x +\n 2 * c12x2 * c22.y * c23.y,\n -2 * c12.x * c21.x * c12.y * c23.y - 2 * c12.x * c12.y * c21.y * c23.x - 2 * c12.x * c12.y * c22.x * c22.y +\n 2 * c21.x * c12y2 * c23.x + c12y2 * c22x2 + c12x2 * (2 * c21.y * c23.y + c22y2),\n 2 * c10.x * c12.x * c12.y * c23.y + 2 * c10.y * c12.x * c12.y * c23.x + c11.x * c11.y * c12.x * c23.y +\n c11.x * c11.y * c12.y * c23.x - 2 * c20.x * c12.x * c12.y * c23.y - 2 * c12.x * c20.y * c12.y * c23.x -\n 2 * c12.x * c21.x * c12.y * c22.y - 2 * c12.x * c12.y * c21.y * c22.x - 2 * c10.x * c12y2 * c23.x -\n 2 * c10.y * c12x2 * c23.y + 2 * c20.x * c12y2 * c23.x + 2 * c21.x * c12y2 * c22.x -\n c11y2 * c12.x * c23.x - c11x2 * c12.y * c23.y + c12x2 * (2 * c20.y * c23.y + 2 * c21.y * c22.y),\n 2 * c10.x * c12.x * c12.y * c22.y + 2 * c10.y * c12.x * c12.y * c22.x + c11.x * c11.y * c12.x * c22.y +\n c11.x * c11.y * c12.y * c22.x - 2 * c20.x * c12.x * c12.y * c22.y - 2 * c12.x * c20.y * c12.y * c22.x -\n 2 * c12.x * c21.x * c12.y * c21.y - 2 * c10.x * c12y2 * c22.x - 2 * c10.y * c12x2 * c22.y +\n 2 * c20.x * c12y2 * c22.x - c11y2 * c12.x * c22.x - c11x2 * c12.y * c22.y + c21x2 * c12y2 +\n c12x2 * (2 * c20.y * c22.y + c21y2),\n 2 * c10.x * c12.x * c12.y * c21.y + 2 * c10.y * c12.x * c21.x * c12.y + c11.x * c11.y * c12.x * c21.y +\n c11.x * c11.y * c21.x * c12.y - 2 * c20.x * c12.x * c12.y * c21.y - 2 * c12.x * c20.y * c21.x * c12.y -\n 2 * c10.x * c21.x * c12y2 - 2 * c10.y * c12x2 * c21.y + 2 * c20.x * c21.x * c12y2 -\n c11y2 * c12.x * c21.x - c11x2 * c12.y * c21.y + 2 * c12x2 * c20.y * c21.y,\n -2 * c10.x * c10.y * c12.x * c12.y - c10.x * c11.x * c11.y * c12.y - c10.y * c11.x * c11.y * c12.x +\n 2 * c10.x * c12.x * c20.y * c12.y + 2 * c10.y * c20.x * c12.x * c12.y + c11.x * c20.x * c11.y * c12.y +\n c11.x * c11.y * c12.x * c20.y - 2 * c20.x * c12.x * c20.y * c12.y - 2 * c10.x * c20.x * c12y2 +\n c10.x * c11y2 * c12.x + c10.y * c11x2 * c12.y - 2 * c10.y * c12x2 * c20.y -\n c20.x * c11y2 * c12.x - c11x2 * c20.y * c12.y + c10x2 * c12y2 + c10y2 * c12x2 +\n c20x2 * c12y2 + c12x2 * c20y2].reverse();\n\n let roots = getRootsInInterval(0, 1, coefs);\n // console.log(roots);\n\n for(let i = 0; i < roots.length; i++) {\n let s = roots[i];\n let xRoots = getRoots([c12.x,\n c11.x,\n c10.x - c20.x - s * c21.x - s * s * c22.x - s * s * s * c23.x].reverse());\n let yRoots = getRoots([c12.y,\n c11.y,\n c10.y - c20.y - s * c21.y - s * s * c22.y - s * s * s * c23.y].reverse());\n //\n // console.log('xRoots', xRoots);\n //\n // console.log('yRoots', yRoots);\n\n if(xRoots.length > 0 && yRoots.length > 0) {\n let TOLERANCE = 1e-4;\n\n checkRoots:\n for(let j = 0; j < xRoots.length; j++) {\n let xRoot = xRoots[j];\n\n if(0 <= xRoot && xRoot <= 1) {\n for(let k = 0; k < yRoots.length; k++) {\n if(Math.abs(xRoot - yRoots[k]) < TOLERANCE) {\n\n let x = c23.x * s * s * s + c22.x * s * s + c21.x * s + c20.x;\n let y = c23.y * s * s * s + c22.y * s * s + c21.y * s + c20.y;\n result.push({x, y, t: xRoot});\n break checkRoots;\n }\n }\n }\n }\n }\n }\n return result;\n}\n\nfunction intersectBezier2Line(ax1, ay1, ax2, ay2, ax3, ay3, bx1, by1, bx2, by2) {\n let c2, c1, c0;\n let cl, n;\n let result = [];\n\n let minbx = Math.min(bx1, bx2);\n let minby = Math.min(by1, by2);\n let maxbx = Math.max(bx1, bx2);\n let maxby = Math.max(by1, by2);\n\n const dot = (a, b) => a.x * b.x + a.y * b.y;\n const lerp = (a, b, t) => ({\n x: a.x - (a.x - b.x) * t,\n y: a.y - (a.y - b.y) * t,\n t,\n });\n\n c2 = {\n x: ax1 - 2 * ax2 + ax3,\n y: ay1 - 2 * ay2 + ay3,\n };\n c1 = {\n x: -2 * ax1 + 2 * ax2,\n y: -2 * ay1 + 2 * ay2,\n };\n c0 = {x: ax1, y: ay1};\n\n n = {x: by1 - by2, y: bx2 - bx1};\n cl = bx1 * by2 - bx2 * by1;\n\n // console.log('intersectBezier2Line', n, c0, c1, c2, cl);\n\n let coefs = [dot(n, c2), dot(n, c1), dot(n, c0) + cl].reverse();\n\n // console.log('intersectBezier2Line coefs', coefs);\n\n let roots = getRoots(coefs);\n\n // console.log('intersectBezier2Line roots', roots);\n\n for(let i = 0; i < roots.length; i++) {\n let t = roots[i];\n\n if(0 <= t && t <= 1) {\n let p4 = lerp({x: ax1, y: ay1}, {x: ax2, y: ay2}, t);\n let p5 = lerp({x: ax2, y: ay2}, {x: ax3, y: ay3}, t);\n\n let p6 = lerp(p4, p5, t);\n // console.log('p4, p5, p6', p4, p5, p6);\n\n if(bx1 === bx2) {\n if(minby <= p6.y && p6.y <= maxby) {\n result.push(p6);\n }\n }\n else if(by1 === by2) {\n if(minbx <= p6.x && p6.x <= maxbx) {\n result.push(p6);\n }\n }\n else if(p6.x >= minbx && p6.y >= minby && p6.x <= maxbx && p6.y <= maxby) {\n result.push(p6);\n }\n }\n }\n return result;\n}\n\n\n/**\n *\n * (-P1+3P2-3P3+P4)t^3 + (3P1-6P2+3P3)t^2 + (-3P1+3P2)t + P1\n * /\\ /\\ /\\ /\\\n * || || || ||\n * c3 c2 c1 c0\n */\nfunction intersectBezier3Line(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4, bx1, by1, bx2, by2) {\n let c3, c2, c1, c0;\n let cl, n;\n let result = [];\n\n let minbx = Math.min(bx1, bx2);\n let minby = Math.min(by1, by2);\n let maxbx = Math.max(bx1, bx2);\n let maxby = Math.max(by1, by2);\n\n const dot = (a, b) => a.x * b.x + a.y * b.y;\n const lerp = (a, b, t) => ({\n x: a.x - (a.x - b.x) * t,\n y: a.y - (a.y - b.y) * t,\n t,\n });\n\n c3 = {\n x: -ax1 + 3 * ax2 - 3 * ax3 + ax4,\n y: -ay1 + 3 * ay2 - 3 * ay3 + ay4,\n };\n c2 = {\n x: 3 * ax1 - 6 * ax2 + 3 * ax3,\n y: 3 * ay1 - 6 * ay2 + 3 * ay3,\n };\n c1 = {\n x: -3 * ax1 + 3 * ax2,\n y: -3 * ay1 + 3 * ay2,\n };\n c0 = {x: ax1, y: ay1};\n\n n = {x: by1 - by2, y: bx2 - bx1};\n cl = bx1 * by2 - bx2 * by1;\n\n let coefs = [\n cl + dot(n, c0),\n dot(n, c1),\n dot(n, c2),\n dot(n, c3),\n ];\n\n let roots = getRoots(coefs);\n\n for(let i = 0; i < roots.length; i++) {\n let t = roots[i];\n\n if(0 <= t && t <= 1) {\n let p5 = lerp({x: ax1, y: ay1}, {x: ax2, y: ay2}, t);\n let p6 = lerp({x: ax2, y: ay2}, {x: ax3, y: ay3}, t);\n let p7 = lerp({x: ax3, y: ay3}, {x: ax4, y: ay4}, t);\n let p8 = lerp(p5, p6, t);\n let p9 = lerp(p6, p7, t);\n let p10 = lerp(p8, p9, t);\n\n if(bx1 === bx2) {\n if(minby <= p10.y && p10.y <= maxby) {\n result.push(p10);\n }\n }\n else if(by1 === by2) {\n if(minbx <= p10.x && p10.x <= maxbx) {\n result.push(p10);\n }\n }\n else if(p10.x >= minbx && p10.y >= minby && p10.x <= maxbx && p10.y <= maxby) {\n result.push(p10);\n }\n }\n }\n return result;\n}\n\n/**\n * 3d直线交点,允许误差,传入4个顶点坐标\n * limitToFiniteSegment可传0、1、2、3,默认0是不考虑点是否在传入的顶点组成的线段上\n * 1为限制在p1/p2线段,2为限制在p3/p4线段,3为都限制\n */\nfunction intersectLineLine3(p1, p2, p3, p4, limitToFiniteSegment = 0, tolerance = 1e-9) {\n let p13 = subtractPoint(p1, p3);\n let p43 = subtractPoint(p4, p3);\n let p21 = subtractPoint(p2, p1);\n let d1343 = p13.x * p43.x + p13.y * p43.y + p13.z * p43.z;\n let d4321 = p43.x * p21.x + p43.y * p21.y + p43.z * p21.z;\n let d1321 = p13.x * p21.x + p13.y * p21.y + p13.z * p21.z;\n let d4343 = p43.x * p43.x + p43.y * p43.y + p43.z * p43.z;\n let d2121 = p21.x * p21.x + p21.y * p21.y + p21.z * p21.z;\n let denom = d2121 * d4343 - d4321 * d4321;\n if(Math.abs(denom) < tolerance) {\n return;\n }\n let numer = d1343 * d4321 - d1321 * d4343;\n let mua = numer / denom;\n let mub = (d1343 + d4321 * mua) / d4343;\n let pa = {\n x: p1.x + mua * p21.x,\n y: p1.y + mua * p21.y,\n z: p1.z + mua * p21.z,\n };\n let pb = {\n x: p3.x + mub * p43.x,\n y: p3.y + mub * p43.y,\n z: p3.z + mub * p43.z,\n };\n let distance = distanceTo(pa, pb);\n if(distance > tolerance) {\n return;\n }\n let intersectPt = divide(addPoint(pa, pb), 2);\n if(!limitToFiniteSegment) {\n return intersectPt;\n }\n let paramA = closestParam(intersectPt, p1, p2);\n let paramB = closestParam(intersectPt, p3, p4);\n if(limitToFiniteSegment === 1 && paramA >= 0 && paramA <= 1) {\n return intersectPt;\n }\n if(limitToFiniteSegment === 2 && paramB >= 0 && paramB <= 1) {\n return intersectPt;\n }\n if(limitToFiniteSegment === 3 && paramA >= 0 && paramA <= 1 && paramB >= 0 && paramB <= 1) {\n return intersectPt;\n }\n}\n\nfunction subtractPoint(p1, p2) {\n return {\n x: p1.x - p2.x,\n y: p1.y - p2.y,\n z: p1.z - p2.z,\n };\n}\n\nfunction distanceTo(a, b) {\n return Math.sqrt(Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2) + Math.pow(a.z - b.z, 2));\n}\n\nfunction addPoint(a, b) {\n return {\n x: a.x + b.x,\n y: a.y + b.y,\n z: a.z + b.z,\n };\n}\n\nfunction divide(p, t) {\n let n = 1 / t;\n return {\n x: p.x * n,\n y: p.y * n,\n z: p.z * n,\n };\n}\n\nfunction closestParam(p, from, to) {\n let startToP = subtractPoint(p, from);\n let startToEnd = subtractPoint(to, from);\n let startEnd2 = dotProduct3(startToEnd, startToEnd);\n let startEnd_startP = dotProduct3(startToEnd, startToP);\n return startEnd_startP / startEnd2;\n}\n\n/**\n * 平面相交线,传入2个平面的各3个顶点,返回2点式\n */\nfunction intersectPlanePlane(p1, p2, p3, p4, p5, p6) {\n let v1 = unitize3(\n p2.x - p1.x,\n p2.y - p1.y,\n p2.z - p1.z,\n ), v2 = unitize3(\n p3.x - p1.x,\n p3.y - p1.y,\n p3.z - p1.z,\n ), v4 = unitize3(\n p5.x - p4.x,\n p5.y - p4.y,\n p5.z - p4.z,\n ), v5 = unitize3(\n p6.x - p4.x,\n p6.y - p4.y,\n p6.z - p4.z,\n );\n let v3 = unitize3(crossProduct3(v1.x, v1.y, v1.z, v2.x, v2.y, v2.z));\n let v6 = unitize3(crossProduct3(v4.x, v4.y, v4.z, v5.x, v5.y, v5.z));\n if(isParallel3(v3, v6)) {\n return null;\n }\n let normal = crossProduct3(v6.x, v6.y, v6.z, v3.x, v3.y, v3.z);\n let p7 = addPoint(v1, v4);\n // planeC\n let v9 = unitize3(normal.x, normal.y, normal.z);\n // 3平面相交\n let a1 = v3.x, b1 = v3.y, c1 = v3.z, d1 = -a1 * p1.x - b1 * p1.y - c1 * p1.z;\n let a2 = v6.x, b2 = v6.y, c2 = v6.z, d2 = -a2 * p4.x - b2 * p4.y - c2 * p4.z;\n let a3 = v9.x, b3 = v9.y, c3 = v9.z, d3 = -a3 * p7.x - b3 * p7.y - c3 * p7.z;\n let mb = [-d1, -d2, -d3];\n let det = a1 * (b2 * c3 - c2 * b3) - b1 * (a2 * c3 - c2 * a3) + c1 * (a2 * b3 - b2 * a3);\n if(Math.abs(det) < 1e-9) {\n return null;\n }\n let invDet = 1 / det;\n let v11 = invDet * (b2 * c3 - c2 * b3);\n let v12 = invDet * (c1 * b3 - b1 * c3);\n let v13 = invDet * (b1 * c2 - c1 * b2);\n let v21 = invDet * (c2 * a3 - a2 * c3);\n let v22 = invDet * (a1 * c3 - c1 * a3);\n let v23 = invDet * (c1 * a2 - a1 * c2);\n let v31 = invDet * (a2 * b3 - b2 * a3);\n let v32 = invDet * (b1 * a3 - a1 * b3);\n let v33 = invDet * (a1 * b2 - b1 * a2);\n let x = v11 * mb[0] + v12 * mb[1] + v13 * mb[2];\n let y = v21 * mb[0] + v22 * mb[1] + v23 * mb[2];\n let z = v31 * mb[0] + v32 * mb[1] + v33 * mb[2];\n let point = { x, y, z };\n return [\n point,\n addPoint(point, v9),\n ];\n}\n\n// 点是否在线段上,注意误差\nfunction pointOnLine3(p, p1, p2) {\n let v1x = p1.x - p.x, v1y = p1.y - p.y, v1z = p1.z - p.z;\n let v2x = p2.x - p.x, v2y = p2.y - p.y, v2z = p2.z - p.z;\n let c = crossProduct3(v1x, v1y, v1z, v2x, v2y, v2z);\n return length3(c.x, c.y, c.z) < 1e-9;\n}\n\nexport default {\n intersectBezier2Line, // 二阶贝塞尔曲线 与 直线\n intersectBezier3Line, // 三阶贝塞尔曲线 与 直线\n intersectBezier2Bezier2, // 二阶贝塞尔曲线 与 二阶贝塞尔曲线\n intersectBezier3Bezier3, // 三阶贝塞尔曲线 与 三阶贝塞尔曲线\n intersectBezier2Bezier3, // 二阶贝塞尔曲线 与 三阶贝塞尔曲线\n intersectLineLine3,\n intersectPlanePlane,\n pointOnLine3,\n}\n","import isec from '../math/isec';\nimport geom from '../math/geom';\nimport vector from '../math/vector';\n\nconst { intersectPlanePlane, intersectLineLine3, pointOnLine3 } = isec;\nconst { isRectsOverlap } = geom;\nconst { isZero3 } = vector;\n\n// 设置新拼图的x/y/z投影数据和bbox数据,原本平面矩形也算一个拼图\nfunction shadow(puzzle) {\n let points = puzzle.points;\n let xShadow = [\n {\n y: points[0].y,\n z: points[0].z,\n },\n ];\n if(points[1].y !== points[0].y || points[1].z !== points[0].z) {\n xShadow.push({\n y: points[1].y,\n z: points[1].z,\n });\n }\n if((points[2].y !== points[0].y || points[2].z !== points[0].z)\n && (points[2].y !== points[1].y || points[2].z !== points[1].z)) {\n xShadow.push({\n y: points[2].y,\n z: points[2].z,\n });\n }\n if((points[3].y !== points[0].y || points[3].z !== points[0].z)\n && (points[3].y !== points[1].y || points[3].z !== points[1].z)\n && (points[3].y !== points[2].y || points[3].z !== points[2].z)) {\n xShadow.push({\n y: points[3].y,\n z: points[3].z,\n });\n }\n // 顶点和bbox,每个轴投影都要,x特殊多线段列表\n puzzle.xShadow = [];\n puzzle.xBbox = [];\n for(let j = 0, len = xShadow.length; j < len; j++) {\n let a = xShadow[j];\n puzzle.xShadow.push(a);\n if(j === 0) {\n puzzle.xBbox[0] = a.z;\n puzzle.xBbox[1] = a.y;\n puzzle.xBbox[2] = a.z;\n puzzle.xBbox[3] = a.y;\n }\n else {\n puzzle.xBbox[0] = Math.min(puzzle.xBbox[0], a.z);\n puzzle.xBbox[1] = Math.min(puzzle.xBbox[1], a.y);\n puzzle.xBbox[2] = Math.max(puzzle.xBbox[2], a.z);\n puzzle.xBbox[3] = Math.max(puzzle.xBbox[3], a.y);\n }\n }\n // y/z类似,但不用排序添加\n let yShadow = [\n {\n x: points[0].x,\n z: points[0].z,\n },\n ];\n if(points[1].x !== points[0].x || points[1].z !== points[0].z) {\n yShadow.push({\n x: points[1].x,\n z: points[1].z,\n });\n }\n if((points[2].x !== points[0].x || points[2].z !== points[0].z)\n && (points[2].x !== points[1].x || points[2].z !== points[1].z)) {\n yShadow.push({\n x: points[2].x,\n z: points[2].z,\n });\n }\n if((points[3].x !== points[0].x || points[3].z !== points[0].z)\n && (points[3].x !== points[1].x || points[3].z !== points[1].z)\n && (points[3].x !== points[2].x || points[3].z !== points[2].z)) {\n yShadow.push({\n x: points[3].x,\n z: points[3].z,\n });\n }\n // y/z类似,但不用排序添加\n puzzle.yShadow = [];\n puzzle.yBbox = [];\n for(let j = 0, len = yShadow.length; j < len; j++) {\n let a = yShadow[j];\n puzzle.yShadow.push(a);\n if(j === 0) {\n puzzle.yBbox[0] = a.x;\n puzzle.yBbox[1] = a.z;\n puzzle.yBbox[2] = a.x;\n puzzle.yBbox[3] = a.z;\n }\n else {\n puzzle.yBbox[0] = Math.min(puzzle.yBbox[0], a.x);\n puzzle.yBbox[1] = Math.min(puzzle.yBbox[1], a.z);\n puzzle.yBbox[2] = Math.max(puzzle.yBbox[2], a.x);\n puzzle.yBbox[3] = Math.max(puzzle.yBbox[3], a.z);\n }\n }\n let zShadow = [\n {\n x: points[0].x,\n y: points[0].y,\n },\n ];\n if(points[1].x !== points[0].x || points[1].y !== points[0].y) {\n zShadow.push({\n x: points[1].x,\n y: points[1].y,\n });\n }\n if((points[2].x !== points[0].x || points[2].y !== points[0].y)\n && (points[2].x !== points[1].x || points[2].y !== points[1].y)) {\n zShadow.push({\n x: points[2].x,\n y: points[2].y,\n });\n }\n if((points[3].x !== points[0].x || points[3].y !== points[0].y)\n && (points[3].x !== points[1].x || points[3].y !== points[1].y)\n && (points[3].x !== points[2].x || points[3].y !== points[2].y)) {\n zShadow.push({\n x: points[3].x,\n y: points[3].y,\n });\n }\n puzzle.zShadow = [];\n puzzle.zBbox = [];\n for(let j = 0, len = zShadow.length; j < len; j++) {\n let a = zShadow[j];\n puzzle.zShadow.push(a);\n if(j === 0) {\n puzzle.zBbox[0] = a.x;\n puzzle.zBbox[1] = a.y;\n puzzle.zBbox[2] = a.x;\n puzzle.zBbox[3] = a.y;\n }\n else {\n puzzle.zBbox[0] = Math.min(puzzle.zBbox[0], a.x);\n puzzle.zBbox[1] = Math.min(puzzle.zBbox[1], a.y);\n puzzle.zBbox[2] = Math.max(puzzle.zBbox[2], a.x);\n puzzle.zBbox[3] = Math.max(puzzle.zBbox[3], a.y);\n }\n }\n}\n\n// 多个平面相交切割,每个平面有[3,]个顶点,且有index索引额外信息\nfunction splitQuadrilateralPlane(list) {\n let uuid = 0;\n let length = list.length;\n if(length < 2) {\n return;\n }\n // 先每个四边形计算x/y/z轴上的投影,可能是四边形也可能重合三角形或直线\n let xList = [];\n for(let i = 0; i < length; i++) {\n let item = list[i];\n shadow(item);\n item.uuid = uuid++;\n item.plane = item;\n let xShadow = item.xShadow;\n for(let i = 0, len = xShadow.length; i < len; i++) {\n // 只有2个点防重,x投影特殊需要,线段排序列表\n if(len === 2 && i === 1) {\n break;\n }\n let a = xShadow[i];\n let b = xShadow[(i + 1) % len];\n if(a.z > b.z) {\n [a, b] = [b, a];\n }\n xList.push({\n belong: item,\n y1: a.y,\n z1: a.z,\n y2: b.y,\n z2: b.z,\n });\n }\n }\n /**\n * 从侧面观看投影,即x轴,按照深度z顺序,每个平面可形成2或4条线(y/z坐标),用扫描线算法求交\n * 处在扫描线活动范围下的2个线段,如果属于2个不同平面,继续\n * 再检测面的x/y/z是否bbox重叠,3个都重叠是2个四边面空间重叠的必要条件,以此前提甄选\n * 再用平面相交公式求得相交线,查看双方顶点是否都存在于此条线上且范围内,都有则真正相交,开始拆分\n */\n let eventHash = {};\n for(let i = 0, len = xList.length; i < len; i++) {\n let seg = xList[i];\n let o = eventHash[seg.z1] = eventHash[seg.z1] || [];\n o.push(seg);\n o = eventHash[seg.z2] = eventHash[seg.z2] || [];\n o.push(seg);\n }\n // z排序,不用管y\n let eventList = [];\n for(let i in eventHash) {\n if(eventHash.hasOwnProperty(i)) {\n let o = eventHash[i];\n eventList.push({\n z: i,\n list: o,\n });\n }\n }\n eventList.sort(function(a, b) {\n return a.z - b.z;\n });\n const HISTORY = {}; // 求过的2个平面记录,只求1次防重\n let ael = []; // 当前扫描线活动边\n for(let i = 0, elLen = eventList.length; i < elLen; i++) {\n let { z, list } = eventList[i];\n for(let j = 0, length = list.length; j < length; j++) {\n let seg = list[j];\n // 第1次进是start,第2次是end\n if(seg.isVisited) {\n let j = ael.indexOf(seg);\n if(j > -1) {\n ael.splice(j, 1);\n }\n }\n else {\n if(ael.length) {\n for(let j = 0, len = ael.length; j < len; j++) {\n let item = ael[j];\n let pa = seg.belong, pb = item.belong;\n // 属于不同的平面才能相交\n if(pa.plane === pb.plane) {\n continue;\n }\n // 如果面被拆分过,忽略掉\n if(pa.isDeleted) {\n break;\n }\n if(pb.isDeleted) {\n continue;\n }\n // 无论结果如何,这2个拼图都记录下防止重复检测\n let key = pa.uuid > pb.uuid ? (pb.uuid + ',' + pa.uuid) : (pa.uuid + ',' + pb.uuid);\n if(HISTORY.hasOwnProperty(key)) {\n continue;\n }\n HISTORY[key] = true;\n // 所属的2个面进行x/y/z上的bbox重叠验证,是屏幕真相交的前提必要条件\n if(isRectsOverlap(pa.xBbox, pb.xBbox, false)\n && isRectsOverlap(pa.yBbox, pb.yBbox, false)\n && isRectsOverlap(pa.zBbox, pb.zBbox, false)) {\n let pointsA = pa.points, pointsB = pb.points;\n // 真正求交\n let line = intersectPlanePlane(\n pointsA[0], pointsA[1], pointsA[2],\n pointsB[0], pointsB[1], pointsB[2]\n );\n if(!line) {\n continue;\n }\n // 这条线一定和2个四边形有2/4个不同交点,分别用每条边和直线求交点,2个是四边形a内切割b,4个是a和b恰好互相切割\n // 被切割后的puzzle解法相同,只是变成了多边形,n>=3\n let resA = [], resB = [];\n for(let i = 0, len = pointsA.length; i < len; i++) {\n let r = intersectLineLine3(\n pointsA[i], pointsA[(i + 1) % len],\n line[0], line[1], 1\n );\n if(r) {\n resA.push(r);\n }\n }\n for(let i = 0, len = pointsB.length; i < len; i++) {\n let r = intersectLineLine3(\n pointsB[i], pointsB[(i + 1) % len],\n line[0], line[1], 1\n );\n if(r) {\n resB.push(r);\n }\n }\n // res只可能是2和0,2个res组合只有3种可能,其它则是精度误差忽略,切割的交点在边的索引和下个索引之间的边上\n if(resA.length === 2 && resB.length === 2\n || resA.length === 2 && !resB.length\n || !resA.length || resB.length === 2) {\n let puzzle = [];\n // 2个都需要切割,各自判断\n if(resA.length) {\n pa.isDeleted = true;\n let t = splitPlaneByPoint(pa, resA);\n if(t) {\n puzzle = puzzle.concat(t);\n }\n }\n if(resB.length) {\n pa.isDeleted = true;\n let t = splitPlaneByPoint(pb, resB);\n if(t) {\n puzzle = puzzle.concat(t);\n }\n }\n // 新的拼图需考虑加入到eventList的合适位置,可能是新增的扫描事件\n for(let j = 0, len = puzzle.length; j < len; j++) {\n let item = puzzle[j];\n shadow(item);\n item.uuid = uuid++;\n let xBbox = item.xBbox;\n if(xBbox[2] <= z) {\n continue;\n }\n let xShadow = item.xShadow;\n for(let j = 0, len = xShadow.length; j < len; j++) {\n // 只有2个点防重,x投影特殊需要,线段排序列表\n if(len === 2 && j === 1) {\n break;\n }\n let a = xShadow[j];\n let b = xShadow[(j + 1) % len];\n if(a.z > b.z) {\n [a, b] = [b, a];\n }\n // 和初始化不一样多判断下,最大值比当前还小的是无效的事件,已经扫过了\n if(b.z <= z) {\n continue;\n }\n let seg = {\n belong: item,\n y1: a.y,\n z1: a.z,\n y2: b.y,\n z2: b.z,\n };\n // 最小值比当前z小,被访问过isVisited\n if(seg.z1 <= z) {\n seg.isVisited = true;\n // 等于才加入当前事件列表\n if(seg.z1 === z) {\n list.push(seg);\n length++;\n }\n }\n // 最大值加入事件列表,=z忽略,注意判断可能z所属的扫描坐标不存在\n if(seg.z2 > z) {\n for(let j = i + 1; j < elLen; j++) {\n let item = eventList[j];\n let z = item.z;\n if(seg.z2 === z) {\n item.list.push(seg);\n break;\n }\n else if(seg.z2 > z || j === elLen - 1) {\n eventList.splice(j, 0, {\n z: seg.z2,\n list: [seg],\n });\n elLen++;\n break;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n seg.isVisited = true;\n ael.push(seg);\n }\n }\n }\n}\n\nfunction splitPlaneByPoint(puzzle, res) {\n let plane = puzzle.plane, points = puzzle.points, i1 = -1, i2 = -1;\n let p0 = points[0], p1 = points[1], p2 = points[2], p3 = points[3];\n // 交点一定在边上,不在边上的不切割\n for(let i = 0, len = points.length; i < len; i++) {\n let p1 = points[i], p2 = points[(i + 1) % len];\n let r1 = pointOnLine3(res[0], p1, p2);\n let r2 = pointOnLine3(res[1], p1, p2);\n if(r1) {\n i1 = i;\n }\n if(r2) {\n i2 = i;\n }\n }\n // 看是否相邻以及是否是原有顶点,不同情况不同拆分,切割也不能在同一条边上\n if(i1 > -1 && i2 > -1 && i1 !== i2) {\n let onVertex1 = isZero3(points[i1], res[0]) ? i1 : -1;\n if(!onVertex1 && points[i1 + 1]) {\n onVertex1 = isZero3(points[i1 + 1], res[0]) ? (i1 + 1) : -1;\n }\n let onVertex2 = isZero3(points[i2], res[1]) ? i2 : -1;\n if(!onVertex2 && points[i2 + 1]) {\n onVertex2 = isZero3(points[i2 + 1], res[1]) ? (i2 + 1) : -1;\n }\n // 如果是相邻顶点,或者只有1个顶点但恰好2点在同边则失效\n if(Math.abs(i1 - i2) <= 1) {\n if(onVertex1 > -1 && onVertex2 > -1) {\n return;\n }\n else if(onVertex1 > -1) {\n if(onVertex1 === i2) {\n return;\n }\n }\n else if(onVertex2 > -1) {\n if(onVertex2 === i2) {\n return;\n }\n }\n }\n // 原本矩形经过任意matrix变换后一定还是个平行四边形(相对所在平面),4个顶点坐标已知\n // 然后交点坐标已知,也一定在这个平面上,求得相对于左上角顶点即原点的百分比坐标,分母为宽或高\n // 其实就是求拆分后的拼图,某个点对应于原本矩形纹理的百分比坐标\n // 先求得平行四边形的2个邻边的向量,然后求交点和向量所在直线与边的交点即可得出\n let va = plane.va, vb = plane.vb;\n if(!va) {\n va = plane.va = {\n x: p0.x - p1.x,\n y: p0.y - p1.y,\n z: p0.z - p1.z,\n };\n }\n if(!vb) {\n vb = plane.vb = {\n x: p1.x - p2.x,\n y: p1.y - p2.y,\n z: p1.z - p2.z,\n };\n }\n let hash = [], r0, r1;\n // n边形(n一定>=3),会被分为a、b两个多边形\n plane.puzzle = plane.puzzle || [];\n let puzzle = [];\n let a = {\n plane,\n node: plane.node,\n target: plane.target,\n isPuzzle: true,\n points: [],\n };\n for(let i = 0; i <= i1; i++) {\n let r = hash[i] = getPercentXY(points[i], va, vb, p0, p1, p3);\n a.points.push(r);\n }\n // 第1个交点如果在顶点上忽略,前面循环考虑了\n if(onVertex1 === -1) {\n a.points.push(r0 = getPercentXY(res[0], va, vb, p0, p1, p3));\n }\n // 第2个即便在顶点上也包含,后面循环没考虑\n a.points.push(r1 = getPercentXY(res[1], va, vb, p0, p1, p3));\n for(let i = i2 + 1, len = points.length; i < len; i++) {\n let r = hash[i] = getPercentXY(points[i], va, vb, p0, p1, p3);\n a.points.push(r);\n }\n if(a.points.length > 2) {\n puzzle.push(a);\n }\n // b部分同上\n let b = {\n plane,\n node: plane.node,\n target: plane.target,\n isPuzzle: true,\n points: [],\n };\n // 复用数据但不能相同引用\n if(r0) {\n b.points.push(Object.assign({}, r0));\n }\n else {\n b.points.push(getPercentXY(res[0], va, vb, p0, p1, p3));\n }\n for(let i = i1 + 1; i <= i2; i++) {\n let r = hash[i] = hash[i] || getPercentXY(points[i], va, vb, p0, p1, p3);\n b.points.push(r);\n }\n if(onVertex2 === -1) {\n if(r1) {\n b.points.push(Object.assign({}, r1));\n }\n else {\n b.points.push(getPercentXY(res[1], va, vb, p0, p1, p3));\n }\n }\n if(b.points.length > 2) {\n puzzle.push(b);\n }\n // 只返回新增的\n plane.puzzle = plane.puzzle.concat(puzzle);\n return puzzle;\n }\n}\n\n// 已知空间平行四边形顶点和其面上一点,求相对于左上角顶点即原点的百分比坐标,四边形宽高即分母\nfunction getPercentXY(p, va, vb, p0, p1, p3) {\n let pa = {\n x: p.x + va.x,\n y: p.y + va.y,\n z: p.z + va.z,\n }, pb = {\n x: p.x + vb.x,\n y: p.y + vb.y,\n z: p.z + vb.z,\n };\n let ipx = intersectLineLine3(p0, p1, p, pb, 3);\n let ipy = intersectLineLine3(p0, p3, p, pa, 3);\n return {\n x: p.x,\n y: p.y,\n z: p.z,\n px: (ipx.x - p0.x) / (p1.x - p0.x),\n py: (ipy.y - p0.y) / (p3.y - p1.y),\n };\n}\n\n// 将拼图按z顺序排好,渲染从z小的开始,拼图已经完全不相交(3d空间)\nfunction sortPuzzleZ(list) {\n if(list.length < 2) {\n return list;\n }\n // 用扫描线遍历一遍,可以找到2个拼图在x投影重合部分的顶点集合,计算集合的z平均值,\n // 比较大小可以得出这2个拼图真正的z先后次序,如果相等则特殊处理,和不重合逻辑一样,\n // 不重合的话,取最大最小值z的平均比较即可,平均值可避免起点终点相同无法比较\n let eventHash = {};\n for(let i = 0, len = list.length; i < len; i++) {\n let puzzle = list[i], points = puzzle.points;\n for(let i = 0, len = points.length; i < len; i++) {\n let p = points[i];\n p.puzzle = puzzle;\n let o = eventHash[p.z] = eventHash[p.z] || [];\n o.push(p);\n }\n let xBbox = puzzle.xBbox;\n puzzle.cz = (xBbox[0] + xBbox[2]) * 0.5;\n }\n let eventList = [];\n for(let i in eventHash) {\n if(eventHash.hasOwnProperty(i)) {\n let o = eventHash[i];\n eventList.push({\n z: i,\n list: o,\n });\n }\n }\n eventList.sort(function(a, b) {\n return a.z - b.z;\n });\n // 每个点作为事件,触发时所属拼图count--,首次拼图视为start,当count为0时拼图视为end\n // 这样2个(或多个)拼图同时都在start状态下(count > 0)的点就是重合区域点集合\n let ael = [], hash = {};\n for(let i = 0, len = eventList.length; i < len; i++) {\n let list = eventList[i].list;\n // 先一遍循环,把刚进入的点所属平面初始化放入ael,这样同时初始化的就不会有遗漏\n for(let i = 0, len = list.length; i < len; i++) {\n let puzzle = list[i].puzzle;\n // 首次进入初始化数据\n if(!puzzle.isStart) {\n puzzle.isStart = true;\n puzzle.count = puzzle.points.length;\n ael.push(puzzle);\n }\n }\n let willEnd = [];\n // 再一遍循环,检查同区域点集合\n for(let i = 0, len = list.length; i < len; i++) {\n let p = list[i], puzzle = p.puzzle;\n // 遍历已存在的puzzle,和当前puzzle视为同区域集合,存数据\n for(let i = 0, len = ael.length; i < len; i++) {\n let item = ael[i];\n if(puzzle.uuid === item.uuid || puzzle.plane === item.plane) {\n continue;\n }\n let key = puzzle.uuid > item.uuid ? (item.uuid + ',' + puzzle.uuid) : (puzzle.uuid + ',' + item.uuid);\n let o = hash[key] = hash[key] || [];\n o.push(p);\n }\n // 归零时离开,延迟处理,依然是防止同时离开的点puzzle不会有遗漏\n if(!--puzzle.count) {\n willEnd.push(puzzle);\n }\n }\n for(let j = 0, len = willEnd.length; j < len; j++) {\n let i = ael.indexOf(willEnd[j]);\n ael.splice(i, 1);\n }\n }\n let zHash = {};\n for(let i in hash) {\n if(hash.hasOwnProperty(i)) {\n let list = hash[i], count1 = 0, count2 = 0, uuid = list[0].puzzle.uuid;\n for(let i = 0, len = list.length; i < len; i++) {\n let p = list[i], puzzle = p.puzzle;\n if(uuid === puzzle.uuid) {\n count1 += p.z;\n }\n else {\n count2 += p.z;\n }\n }\n zHash[i] = {\n uuid,\n count1,\n count2,\n };\n }\n }\n list.sort(function(a, b) {\n let key = a.uuid > b.uuid ? (b.uuid + ',' + a.uuid) : (a.uuid + ',' + b.uuid);\n // 有重合的区域,除非相等,否则可以直接得出结果\n if(zHash.hasOwnProperty(key)) {\n let item = zHash[key];\n if(a.uuid === item.uuid) {\n if(item.count1 !== item.count2) {\n return item.count1 - item.count2;\n }\n }\n else {\n if(item.count1 !== item.count2) {\n return item.count2 - item.count1;\n }\n }\n }\n // 无重合或者相等的,对比z中点\n return a.cz - b.cz;\n });\n return list;\n}\n\nexport default {\n splitQuadrilateralPlane,\n sortPuzzleZ,\n};\n","import Page from '../refresh/Page';\nimport webgl from './webgl';\n\nclass TexturePage extends Page {\n constructor(renderMode, gl, size, number) {\n super(renderMode, gl, size, number);\n this.gl = gl;\n this.texture = webgl.createTexture(gl, null, 0, size, size); // 默认0单元\n gl.bindTexture(gl.TEXTURE_2D, null);\n }\n\n static getInstance(renderMode, gl, rootId, size, excludePage) {\n return super.getInstance(renderMode, gl, rootId, size, this, excludePage);\n }\n}\n\nexport default TexturePage;\n","import Cache from '../refresh/Cache';\nimport TexturePage from './TexturePage';\n\n/**\n * 一个fbo离屏纹理,mock成cache,当webgl需要局部根节点汇总时生成,即cacheTotal,\n * 基于此纹理进行filter、mask等后处理渲染\n */\nclass TextureCache extends Cache {\n constructor(renderMode, gl, rootId, w, h, bbox, page, pos, x1, y1) {\n super(renderMode, gl, rootId, w, h, bbox, page, pos, x1, y1);\n this.gl = gl;\n }\n\n update() {\n // 直接生成的texture不需要更新,覆盖掉不调用\n }\n\n clear() {\n if(super.clear()) {\n let page = this.__page, gl = page.gl, size = page.__size;\n // 尺寸必须对上才行\n let data = new Uint8Array(this.__width * this.__height * 4);\n gl.bindTexture(gl.TEXTURE_2D, page.texture);\n // 注意y镜像和原点左下\n gl.texSubImage2D(gl.TEXTURE_2D, 0, this.__x, size - this.__y - this.__height,\n this.__width, this.__height, gl.RGBA, gl.UNSIGNED_BYTE, data);\n gl.bindTexture(gl.TEXTURE_2D, null);\n }\n }\n\n reset(bbox, x1, y1) {\n return super.reset(bbox, x1, y1, TexturePage);\n }\n\n static getInstance(renderMode, gl, rootId, bbox, x1, y1, excludePage) {\n return super.getInstance(renderMode, gl, rootId, bbox, x1, y1, this, TexturePage, excludePage);\n }\n}\n\nexport default TextureCache;\n","import CanvasCache from './CanvasCache';\nimport inject from '../util/inject';\n\nconst HASH = {};\n\n/**\n * 相同的图片且尺寸相同时,复用一个source,如果尺寸和原图相等直接用,否则生成一个离屏canvas\n */\nclass ImgCanvasCache extends CanvasCache {\n constructor(renderMode, ctx, rootId, w, h, bbox, page, x1, y1) {\n super(renderMode, ctx, rootId, w, h, bbox, page, null, x1, y1);\n }\n\n __init(w, h, bbox, page, pos, x1, y1) {\n this.__width = w;\n this.__height = h;\n this.__bbox = bbox;\n this.__page = page;\n // 相等就不生成新的离屏canvas,直接用原始资源比如节点内容\n if(page.width === w && page.height === h) {\n this.__canvas = page.source;\n }\n // 不等则一个url只生成一份OffscreenCanvas\n else {\n let key = this.key = w + ' ' + h + ' ' + page.src;\n if(HASH.hasOwnProperty(key)) {\n let o = HASH[key];\n o.count++;\n this.__canvas = o.canvas;\n }\n else {\n let offscreenCanvas = inject.getOffscreenCanvas(w, h, null, null);\n let ctx = offscreenCanvas.ctx;\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(page.source, 0, 0, w, h);\n this.__canvas = offscreenCanvas.canvas;\n HASH[key] = {\n canvas: offscreenCanvas.canvas,\n count: 1,\n };\n }\n }\n this.__x = 0;\n this.__y = 0;\n this.__enabled = true;\n this.__available = true;\n this.__appendData(x1, y1);\n }\n\n clear() {\n if(this.__available) {\n this.__available = false;\n return true;\n }\n }\n\n release() {\n if(this.__enabled) {\n this.clear();\n let key = this.key;\n if(HASH.hasOwnProperty(key)) {\n let o = HASH[key];\n o.count--;\n if(!o.count) {\n delete HASH[key];\n }\n }\n this.__enabled = false;\n this.__page = null;\n return true;\n }\n }\n\n reset(bbox, x1, y1) {\n this.release();\n let w = Math.ceil(bbox[2] - bbox[0]);\n let h = Math.ceil(bbox[3] - bbox[1]);\n let n = Math.max(w, h);\n if(n <= 0) {\n return;\n }\n this.__init(w, h, bbox, this.__page, null, x1, y1);\n }\n\n get canvas() {\n return this.__canvas;\n }\n\n get ctx() {\n return this.__ctx;\n }\n\n get size() {}\n\n static getInstance(renderMode, ctx, rootId, bbox, loadImg, x1, y1) {\n let w = Math.ceil(bbox[2] - bbox[0]);\n let h = Math.ceil(bbox[3] - bbox[1]);\n let n = Math.max(w, h);\n if(n <= 0) {\n return;\n }\n return new ImgCanvasCache(renderMode, ctx, rootId, w, h, bbox, loadImg, x1, y1);\n }\n}\n\nexport default ImgCanvasCache;\n","import Cache from '../refresh/Cache';\nimport CanvasCache from '../refresh/CanvasCache';\nimport CanvasPage from '../refresh/CanvasPage';\n\nconst HASH = {};\n\nclass ImgWebglCache extends CanvasCache {\n constructor(renderMode, ctx, rootId, w, h, bbox, page, pos, x1, y1) {\n super(renderMode, ctx, rootId, w, h, bbox, page, pos, x1, y1);\n }\n\n clear() {\n if(this.__available) {\n this.__available = false;\n this.update();\n return true;\n }\n }\n\n release() {\n if(this.__enabled) {\n this.clear();\n let key = this.key;\n if(HASH.hasOwnProperty(key)) {\n let o = HASH[key];\n o.count--;\n if(!o.count) {\n delete HASH[key];\n this.__page.del(this.__pos);\n }\n }\n this.__page = null;\n this.__enabled = false;\n return true;\n }\n }\n\n static getInstance(renderMode, ctx, rootId, bbox, loadImg, x1, y1) {\n let key = rootId + ',' + loadImg.width + ' ' + loadImg.height + ' ' + loadImg.src;\n if(HASH.hasOwnProperty(key)) {\n let o = HASH[key];\n o.count++;\n let w = bbox[2] - bbox[0], h = bbox[3] - bbox[1];\n let cache = o.cache;\n let res = new ImgWebglCache(renderMode, ctx, rootId, w, h, bbox, cache.page, cache.pos, x1, y1);\n res.key = key;\n return res;\n }\n let cache = Cache.getInstance(renderMode, ctx, rootId, bbox, x1, y1, this, CanvasPage, null);\n // 超限为空\n if(cache) {\n cache.key = key;\n if(cache) {\n HASH[key] = {\n cache,\n count: 1,\n };\n return cache;\n }\n }\n }\n}\n\nexport default ImgWebglCache;\n","import CanvasCache from './CanvasCache';\nimport offscreen from './offscreen';\nimport mode from './mode';\nimport Page from './Page';\nimport Text from '../node/Text';\nimport Dom from '../node/Dom';\nimport Img from '../node/Img';\nimport Geom from '../node/geom/Geom';\nimport mx from '../math/matrix';\nimport geom from '../math/geom';\nimport level from './level';\nimport painter from '../util/painter';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport tf from '../style/transform';\nimport mbm from '../style/mbm';\nimport enums from '../util/enums';\nimport webgl from '../gl/webgl';\nimport oit from '../gl/oit';\nimport TextureCache from '../gl/TextureCache';\nimport blur from '../math/blur';\nimport vertexBlur from '../gl/filter/blur.vert';\nimport fragmentBlur from '../gl/filter/blur.frag';\nimport ImgCanvasCache from './ImgCanvasCache';\nimport ImgWebglCache from '../gl/ImgWebglCache';\n\nconst {\n OFFSCREEN_OVERFLOW,\n OFFSCREEN_FILTER,\n OFFSCREEN_MASK,\n OFFSCREEN_BLEND,\n OFFSCREEN_MASK2,\n applyOffscreen,\n} = offscreen;\n\nconst {\n STYLE_KEY: {\n DISPLAY,\n OPACITY,\n VISIBILITY,\n FILTER,\n OVERFLOW,\n MIX_BLEND_MODE,\n FILL,\n TRANSFORM,\n TRANSFORM_ORIGIN,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n TRANSFORM_STYLE,\n BACKFACE_VISIBILITY,\n },\n} = enums;\nconst {\n NONE,\n TRANSFORM_ALL,\n OPACITY: OP,\n FILTER: FT,\n REPAINT,\n MIX_BLEND_MODE: MBM,\n PERSPECTIVE: PPT,\n CACHE,\n MASK,\n} = level;\nconst { isE, inverse, multiply, calRectPoint } = mx;\nconst { mbmName } = mbm;\nconst { assignMatrix, transformBbox } = util;\nconst { isPerspectiveMatrix } = tf;\nconst {\n drawTextureCache,\n createTexture,\n bindTexture,\n drawCache2Tex,\n drawTex2Cache,\n} = webgl;\n\nconst DOM_RENDER = Dom.prototype.render;\nconst IMG_RENDER = Img.prototype.render;\nconst GEOM_RENDER = Geom.prototype.render;\n\nfunction getCache(list) {\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(item && item.available) {\n return item;\n }\n }\n}\n\n/**\n * 生成一个节点及其子节点所包含的矩形范围盒,canvas和webgl的最大尺寸限制不一样,由外部传入\n * 如果某个子节点超限,则视为整个超限,超限返回空\n * isPpt为webgl下有perspective的节点,需考虑透视\n */\nfunction genBboxTotal(node, __structs, index, total, lv, isPpt) {\n let { __cache } = node;\n assignMatrix(node.__matrixEvent, mx.identity());\n node.__opacity = 1;\n // 先将局部根节点的bbox算好,可能没内容是空\n let bboxTotal;\n if(__cache && __cache.available) {\n bboxTotal = __cache.bbox;\n }\n else {\n bboxTotal = node.bbox;\n }\n bboxTotal = bboxTotal.slice(0);\n // 局部根节点如有perspective,则计算pm,这里不会出现嵌套,因为每个出现都会生成局部根节点\n // 分2种情况,普通父ppt和自身有ppt情况,自身不能视为E,被绘入主画布时注意特殊处理\n let pm;\n if(isPpt) {\n pm = node.__perspectiveMatrix;\n if(!pm) {\n pm = node.__matrix;\n }\n }\n let top = node;\n for(let i = index + 1, len = index + total + 1; i < len; i++) {\n let {\n node,\n total,\n hasMask,\n } = __structs[i];\n if(node instanceof Text) {\n if(node.__limitCache) {\n inject.warn('Bbox of Text(' + index + ')' + ' is oversize'\n + node.offsetWidth + ', ' + node.offsetHeight);\n return;\n }\n let bbox = node.bbox, p = node.__domParent, matrix = p.__matrixEvent;\n if((bbox[2] - bbox[0]) && (bbox[3] - bbox[1])) {\n if(!isE(matrix)) {\n bbox = transformBbox(bbox, matrix, 0, 0);\n }\n mergeBbox(bboxTotal, bbox);\n }\n continue;\n }\n if(node.__limitCache) {\n inject.warn('Bbox of ' + node.tagName + '(' + index + ')' + ' is oversize'\n + node.offsetWidth + ', ' + node.offsetHeight);\n return;\n }\n let {\n __computedStyle: __computedStyle2,\n __mask,\n } = node;\n // 跳过display:none元素和它的所有子节点和mask,本身是mask除外\n if(__computedStyle2[DISPLAY] === 'none' || i !== index && __mask) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n __cache: __cache2,\n __cacheTotal: __cacheTotal2,\n __cacheFilter: __cacheFilter2,\n __cacheMask: __cacheMask2,\n } = node;\n let p = node.__domParent;\n node.__opacity = __computedStyle2[OPACITY] * p.__opacity;\n let m = node.__matrix;\n if(p !== top) {\n m = multiply(p.__matrixEvent, m);\n }\n // 只有webgl且ppt情况才有pm,直接子节点才考虑预乘\n if(pm && p === top) {\n m = multiply(pm, m);\n }\n assignMatrix(node.__matrixEvent, m);\n let bbox;\n // 子元素有cacheTotal优先使用\n let target = getCache([__cacheMask2, __cacheFilter2, __cacheTotal2, __cache2]);\n if(target) {\n if(target !== __cache2) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n bbox = target.bbox;\n }\n else {\n bbox = node.bbox; // 不能用filterBbox,子元素继承根节点的,如果有filter会是cacheFilter的bbox\n }\n if((bbox[2] - bbox[0]) && (bbox[3] - bbox[1])) {\n // 老的不变,新的会各自重新生成,根据matrixEvent合并bboxTotal\n bbox = transformBbox(bbox, m, 0, 0);\n mergeBbox(bboxTotal, bbox);\n }\n }\n if((bboxTotal[2] - bboxTotal[0] <= 0) || (bboxTotal[3] - bboxTotal[1] <= 0)) {\n return;\n }\n return bboxTotal;\n}\n\nfunction mergeBbox(bbox, t) {\n bbox[0] = Math.min(bbox[0], t[0]);\n bbox[1] = Math.min(bbox[1], t[1]);\n bbox[2] = Math.max(bbox[2], t[2]);\n bbox[3] = Math.max(bbox[3], t[3]);\n}\n\n/**\n * 生成局部根节点离屏缓存,超限时除外\n * cache是每个节点自身的缓存,且共享离屏canvas\n * cacheTotal是基础\n * cacheFilter基于total\n * cacheMask基于filter\n * cacheBlend基于mask\n */\nfunction genTotal(renderMode, ctx, root, node, index, lv, total, __structs, width, height) {\n let __cacheTotal = node.__cacheTotal;\n if(__cacheTotal && __cacheTotal.available) {\n return __cacheTotal;\n }\n let { __x1: x1, __y1: y1, __offsetWidth, __offsetHeight } = node;\n let bboxTotal = genBboxTotal(node, __structs, index, total, lv, false);\n if(!bboxTotal) {\n return;\n }\n\n // img节点特殊对待,如果只包含图片内容本身,多个相同引用可复用图片\n if(node instanceof Img && node.__loadImg.onlyImg) {\n __cacheTotal = node.__cacheTotal = ImgCanvasCache.getInstance(renderMode, ctx, root.__uuid, bboxTotal, node.__loadImg, x1, y1);\n return __cacheTotal;\n }\n\n // 生成cacheTotal,获取偏移dx/dy,连带考虑overflow:hidden的情况,当hidden尺寸一致无效时可忽略\n // 否则用一个单独临时的离屏获取包含hidden的结果,再绘入total\n let w, h, dx, dy, dbx, dby, tx, ty;\n let overflow = node.__computedStyle[OVERFLOW], isOverflow;\n if((x1 !== bboxTotal[0]\n || y1 !== bboxTotal[1]\n || __offsetWidth !== (bboxTotal[2] - bboxTotal[0])\n || __offsetHeight !== (bboxTotal[3] - bboxTotal[1])) && overflow === 'hidden') {\n // geom可能超限,不能直接用bbox\n bboxTotal = [x1, y1, x1 + __offsetWidth, y1 + __offsetHeight];\n w = __offsetWidth;\n h = __offsetHeight;\n dx = -x1;\n dy = -y1;\n dbx = 0;\n dby = 0;\n tx = 0;\n ty = 0;\n isOverflow = true;\n __cacheTotal = inject.getOffscreenCanvas(w, h, 'overflow', null);\n }\n else {\n w = bboxTotal[2] - bboxTotal[0];\n h = bboxTotal[3] - bboxTotal[1];\n __cacheTotal = node.__cacheTotal = CanvasCache.getInstance(renderMode, ctx, root.__uuid, bboxTotal, x1, y1, null);\n if(!__cacheTotal || !__cacheTotal.__enabled) {\n if(w || h) {\n inject.warn('CanvasCache of ' + node.tagName + '(' + index + ')' + ' is oversize: '\n + w + ', ' + h);\n }\n return;\n }\n __cacheTotal.__available = true;\n dx = __cacheTotal.dx;\n dy = __cacheTotal.dy;\n dbx = __cacheTotal.dbx;\n dby = __cacheTotal.dby;\n tx = __cacheTotal.x;\n ty = __cacheTotal.y;\n }\n let ctxTotal = __cacheTotal.ctx;\n\n /**\n * 再次遍历每个节点,以局部根节点左上角为基准原点,将所有节点绘制上去\n * 每个子节点的opacity有父继承计算在上面循环已经做好了,直接获取\n * 但matrixEvent可能需要重算,因为原点不一定是根节点的原点,影响tfo\n * 另外每个节点的refreshLevel需要设置REPAINT\n * 这样cacheTotal取消时子节点需确保重新计算一次matrix/opacity/filter,保证下次和父元素继承正确\n */\n let matrixList = [];\n let parentMatrix = null;\n let lastMatrix = null;\n let lastLv = lv;\n // 和外面没cache的类似,mask生成hash记录\n let maskStartHash = [];\n let offscreenHash = [];\n for(let i = index, len = index + (total || 0) + 1; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n // 排除Text\n if(node instanceof Text) {\n node.render(renderMode, ctxTotal, dx, dy);\n let oh = offscreenHash[i];\n if(oh) {\n ctxTotal = applyOffscreen(ctxTotal, oh, width, height, false);\n }\n }\n else {\n let __computedStyle2 = node.__computedStyle;\n // none跳过这棵子树,判断下最后一个节点的离屏应用即可\n if(__computedStyle2[DISPLAY] === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n let oh = offscreenHash[i];\n if(oh) {\n ctxTotal = applyOffscreen(ctxTotal, oh, width, height, true);\n }\n continue;\n }\n let {\n __cacheTotal: __cacheTotal2,\n __cacheFilter: __cacheFilter2,\n __cacheMask: __cacheMask2,\n } = node;\n let {\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n [VISIBILITY]: visibility,\n } = __computedStyle2;\n let mh = maskStartHash[i];\n if(mh) {\n let { idx, hasMask, offscreenMask } = mh;\n let target = inject.getOffscreenCanvas(width, height, null, 'mask2');\n offscreenMask.mask = target; // 应用mask用到\n offscreenMask.isClip = node.__clip;\n // 定位到最后一个mask元素上的末尾\n let j = i + (total || 0) + 1;\n while(--hasMask) {\n let { total } = __structs[j];\n j += (total || 0) + 1;\n }\n j--;\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx, lv, type: OFFSCREEN_MASK, offscreen: offscreenMask });\n list.push({ idx: j, lv, type: OFFSCREEN_MASK2, offscreen: {\n ctx: ctxTotal, // 保存等待OFFSCREEN_MASK2时还原\n target,\n }});\n ctxTotal = target.ctx;\n }\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,根节点是第一个特殊处理\n if(i === index) {}\n else if(lv > lastLv) {\n parentMatrix = lastMatrix;\n if(isE(parentMatrix)) {\n parentMatrix = null;\n }\n matrixList.push(parentMatrix);\n }\n // 变小出栈索引需注意,可能不止一层,多层计算diff层级\n else if(lv < lastLv) {\n let diff = lastLv - lv;\n matrixList.splice(-diff);\n parentMatrix = matrixList[lv - 1];\n }\n // 不变是同级兄弟,无需特殊处理 else {}\n lastLv = lv;\n // 特殊渲染的matrix,局部根节点为原点考虑,当需要计算时(不为E)再计算\n let m;\n if(i !== index && (!isE(parentMatrix) || !isE(transform))) {\n m = tf.calMatrixByOrigin(transform, tfo[0] + dbx + node.__x1 - x1 + tx, tfo[1] + dby + node.__y1 - y1 + ty);\n if(!isE(parentMatrix)) {\n m = multiply(parentMatrix, m);\n }\n }\n lastMatrix = m;\n // 子元素有cacheTotal优先使用\n let target = i > index && getCache([__cacheMask2, __cacheFilter2, __cacheTotal2]);\n if(target) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n ctxTotal.globalAlpha = node.__opacity;\n if(m) {\n ctxTotal.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n }\n else {\n ctxTotal.setTransform(1, 0, 0, 1, 0, 0);\n }\n let mixBlendMode = __computedStyle2[MIX_BLEND_MODE];\n if(mixBlendMode !== 'normal') {\n ctxTotal.globalCompositeOperation = mbmName(mixBlendMode);\n }\n CanvasCache.drawCache(target, __cacheTotal);\n ctxTotal.globalCompositeOperation = 'source-over';\n let oh = offscreenHash[i];\n if(oh) {\n ctxTotal = applyOffscreen(ctxTotal, oh, width, height, false);\n }\n }\n else {\n let offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow;\n let offscreen = i > index && node.__calOffscreen(ctxTotal, __computedStyle2);\n if(offscreen) {\n ctxTotal = offscreen.ctx;\n offscreenBlend = offscreen.offscreenBlend;\n offscreenMask = offscreen.offscreenMask;\n offscreenFilter = offscreen.offscreenFilter;\n offscreenOverflow = offscreen.offscreenOverflow;\n }\n if(visibility === 'visible') {\n ctxTotal.globalAlpha = node.__opacity;\n if(m) {\n ctxTotal.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n }\n else {\n ctxTotal.setTransform(1, 0, 0, 1, 0, 0);\n }\n node.render(renderMode, ctxTotal, dx, dy);\n }\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_BLEND, offscreen: offscreenBlend });\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n // 最后一个遮罩索引因数量不好计算,放在maskStartHash做\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = {\n idx: i,\n hasMask,\n offscreenMask,\n };\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_FILTER, offscreen: offscreenFilter });\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_OVERFLOW, offscreen: offscreenOverflow });\n }\n // 离屏应用,按照lv从大到小即子节点在前先应用,同一个节点多个效果按offscreen优先级从小到大来,\n // 由于mask特殊索引影响,所有离屏都在最后一个mask索引判断,此时mask本身优先结算,以index序大到小判断\n let oh = offscreenHash[i];\n if(oh) {\n ctxTotal = applyOffscreen(ctxTotal, oh, width, height, false);\n }\n }\n }\n }\n\n // overflow写回整体离屏\n if(isOverflow) {\n let t = node.__cacheTotal = CanvasCache.getInstance(renderMode, ctx, root.__uuid, bboxTotal, x1, y1, null);\n t.__available = true;\n t.ctx.drawImage(__cacheTotal.canvas, t.x, t.y);\n __cacheTotal.release();\n __cacheTotal = t;\n }\n return __cacheTotal;\n}\n\n// 从cacheTotal生成overflow、filter和mask,一定有cacheTotal才会进\nfunction genTotalOther(renderMode, __structs, __cacheTotal, node, hasMask, width, height) {\n let {\n __computedStyle,\n __cacheFilter,\n __cacheMask,\n } = node;\n let {\n [FILTER]: filter,\n } = __computedStyle;\n let target = __cacheTotal, needGen;\n if(filter && filter.length) {\n if(!__cacheFilter|| !__cacheFilter.available || needGen) {\n target = node.__cacheFilter = CanvasCache.genFilter(target, filter);\n needGen = true;\n }\n }\n if(hasMask && (!__cacheMask || !__cacheMask.available || needGen)) {\n target = node.__cacheMask = CanvasCache.genMask(target, node, function(item, cacheMask, inverse) {\n // 和外面没cache的类似,mask生成hash记录,这里mask节点一定是个普通无cache的独立节点\n let maskStartHash = {};\n let offscreenHash = {};\n let { dx, dy, dbx, dby, x: tx, y: ty, ctx, x1, y1 } = cacheMask;\n let struct = item.__struct, root = item.__root, structs = root.__structs;\n let index = structs.indexOf(struct);\n let {\n total,\n lv,\n } = struct;\n let matrixList = [];\n let parentMatrix = null;\n let lastMatrix = null;\n let opacityList = [];\n let parentOpacity = 1;\n let lastOpacity = 1;\n let lastLv = lv;\n for(let i = index, len = index + (total || 0) + 1; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n // 排除Text\n if(node instanceof Text) {\n node.render(renderMode, ctx, dx, dy);\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height, false);\n }\n }\n else {\n let __computedStyle = node.__computedStyle;\n // none跳过这棵子树,判断下最后一个节点的离屏应用即可\n if(__computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height, true);\n }\n continue;\n }\n let {\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n } = node;\n if(maskStartHash.hasOwnProperty(i)) {\n let { idx, hasMask, offscreenMask } = maskStartHash[i];\n let target = inject.getOffscreenCanvas(width, height, null, 'mask2');\n offscreenMask.mask = target; // 应用mask用到\n offscreenMask.isClip = node.__clip;\n // 定位到最后一个mask元素上的末尾\n let j = i + (total || 0) + 1;\n while(--hasMask) {\n let { total } = __structs[j];\n j += (total || 0) + 1;\n }\n j--;\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx, lv, type: OFFSCREEN_MASK, offscreen: offscreenMask });\n list.push({ idx: j, lv, type: OFFSCREEN_MASK2, offscreen: {\n ctx, // 保存等待OFFSCREEN_MASK2时还原\n target,\n }});\n ctx = target.ctx;\n }\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,根节点是第一个特殊处理\n if(i === index) {}\n else if(lv > lastLv) {\n parentMatrix = lastMatrix;\n if(isE(parentMatrix)) {\n parentMatrix = null;\n }\n matrixList.push(parentMatrix);\n parentOpacity = lastOpacity;\n opacityList.push(parentOpacity);\n }\n // 变小出栈索引需注意,可能不止一层,多层计算diff层级\n else if(lv < lastLv) {\n let diff = lastLv - lv;\n matrixList.splice(-diff);\n parentMatrix = matrixList[lv - 1];\n opacityList.splice(-diff);\n parentOpacity = opacityList[lv - 1];\n }\n // 不变是同级兄弟,无需特殊处理 else {}\n lastLv = lv;\n // 计算临时的matrix,先以此节点为局部根节点原点,后面考虑逆矩阵\n let {\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n [OPACITY]: opacity, // 和genTotal不同,局部根节点opacity生效不为1\n } = __computedStyle;\n if(i !== index) {\n opacity *= parentOpacity;\n }\n node.__opacity = lastOpacity = opacity;\n // 特殊渲染的matrix,局部根节点为原点且考虑根节点自身的transform\n let m;\n if(!isE(transform)) {\n m = tf.calMatrixByOrigin(transform, tfo[0] + dbx + node.__x1 - x1 + tx, tfo[1] + dby + node.__y1 - y1 + ty);\n if(!isE(parentMatrix)) {\n m = multiply(parentMatrix, m);\n }\n }\n lastMatrix = m;\n if(m) {\n // 很多情况mask和target相同matrix,可简化计算\n if(util.equalArr(m, inverse)) {\n m = mx.identity();\n }\n else if(inverse) {\n inverse = mx.inverse(inverse);\n m = mx.multiply(inverse, m);\n }\n }\n else if(!isE(inverse)) {\n m = mx.inverse(inverse);\n }\n m = m || mx.identity();\n assignMatrix(node.__matrixEvent, m);\n // 特殊渲染的matrix,局部根节点为原点考虑,本节点需inverse反向\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal]);\n if(target) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n ctx.globalAlpha = opacity;\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n let mixBlendMode = __computedStyle[MIX_BLEND_MODE];\n if(mixBlendMode !== 'normal') {\n ctx.globalCompositeOperation = mbmName(mixBlendMode);\n }\n else {\n ctx.globalCompositeOperation = 'source-over';\n }\n let { x, y, canvas, width, height, x1: x2, y1: y2, dbx: dbx2, dby: dby2 } = target;\n let ox = tx + x2 - x1 + dbx - dbx2;\n let oy = ty + y2 - y1 + dby - dby2;\n ctx.drawImage(canvas, x, y, width, height, ox, oy, width, height);\n ctx.globalCompositeOperation = 'source-over';\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height, false);\n }\n }\n // 等于将外面bbox计算和渲染合一的过程,但不需要bbox本身的内容\n else {\n let offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow;\n let offscreen = node.__calOffscreen(ctx, __computedStyle);\n if(offscreen) {\n ctx = offscreen.ctx;\n offscreenBlend = offscreen.offscreenBlend;\n offscreenMask = offscreen.offscreenMask;\n offscreenFilter = offscreen.offscreenFilter;\n offscreenOverflow = offscreen.offscreenOverflow;\n }\n ctx.globalAlpha = opacity;\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n node.render(renderMode, ctx, dx, dy);\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_BLEND, offscreen: offscreenBlend });\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n // 最后一个遮罩索引因数量不好计算,放在maskStartHash做\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = {\n idx: i,\n hasMask,\n offscreenMask,\n };\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_FILTER, offscreen: offscreenFilter });\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_OVERFLOW, offscreen: offscreenOverflow });\n }\n // 离屏应用,按照lv从大到小即子节点在前先应用,同一个节点多个效果按offscreen优先级从小到大来,\n // 由于mask特殊索引影响,所有离屏都在最后一个mask索引判断,此时mask本身优先结算,以index序大到小判断\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n }\n }\n }\n });\n }\n return target;\n}\n\n/**\n * canvas/webgl支持任意节点为mask,不像svg仅单节点\n * hasMask的num是指遮罩对象后面的兄弟节点数,需要换算成包含子节点的总数\n * @param __structs\n * @param start\n * @param hasMask\n */\nfunction countMaskNum(__structs, start, hasMask) {\n let count = 0;\n while(hasMask--) {\n let total = __structs[start].total;\n count += total || 0;\n start += total || 0;\n // total不算自身,所以还得+1\n count++;\n start++;\n }\n return count;\n}\n\n// webgl不太一样,使用fbo离屏绘制到一个纹理上进行汇总\nfunction genFrameBufferWithTexture(gl, texture, width, height) {\n let frameBuffer = gl.createFramebuffer();\n gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n let check = gl.checkFramebufferStatus(gl.FRAMEBUFFER);\n if(check !== gl.FRAMEBUFFER_COMPLETE) {\n inject.error('Framebuffer object is incomplete: ' + check.toString());\n }\n // 离屏窗口0开始\n gl.viewport(0, 0, width, height);\n // gl.clearColor(0, 0, 0, 0);\n // gl.clear(gl.COLOR_BUFFER_BIT);\n return frameBuffer;\n}\n\n/**\n * 局部根节点复合图层生成,汇总所有子节点到一颗局部树上的位图缓存,包含超限特殊情况\n * 即便只有自己一个也要返回,因为webgl生成total的原因是有类似filter/mask等必须离屏处理的东西\n * 传入isPpt的时候,说明是有perspective的节点在前置分割处理完毕之后,进行的渲染,需预乘pm透视矩阵\n * 传入pptNode/oitHash的时候,说明是透视节点下某个preserve3d的子节点,其渲染需要考虑其子节点平面拆分,预处理\n */\nfunction genTotalWebgl(renderMode, __cacheTotal, gl, root, node, index, lv, total,\n __structs, W, H, isPpt, pptNode, oitHash) {\n if(__cacheTotal && __cacheTotal.available) {\n return __cacheTotal;\n }\n\n let top = node;\n let { __x1: x1, __y1: y1, __cache, __offsetWidth, __offsetHeight } = node;\n let bboxTotal = genBboxTotal(node, __structs, index, total, lv, isPpt);\n if(!bboxTotal) {\n return;\n }\n\n // overflow:hidden和canvas一样特殊考虑\n let w, h, dx, dy, cx, cy, texture, frameBuffer;\n let overflow = node.__computedStyle[OVERFLOW];\n if(overflow === 'hidden' && (x1 !== bboxTotal[0]\n || y1 !== bboxTotal[1]\n || __offsetWidth !== (bboxTotal[2] - bboxTotal[0])\n || __offsetHeight !== (bboxTotal[3] - bboxTotal[1]))) {\n // geom可能超限,不能直接用bbox\n bboxTotal = [x1, y1, x1 + __offsetWidth, y1 + __offsetHeight];\n w = __offsetWidth;\n h = __offsetHeight;\n }\n else {\n w = bboxTotal[2] - bboxTotal[0];\n h = bboxTotal[3] - bboxTotal[1];\n }\n if(__cacheTotal) {\n __cacheTotal.reset(bboxTotal, x1, y1);\n }\n else {\n __cacheTotal = TextureCache.getInstance(renderMode, gl, root.__uuid, bboxTotal, x1, y1, null);\n }\n if(!__cacheTotal || !__cacheTotal.__enabled) {\n if(w || h) {\n inject.warn('TextureCache of ' + node.tagName + '(' + index + ')' + ' is oversize: '\n + w + ', ' + h);\n }\n return;\n }\n __cacheTotal.__available = true;\n node.__cacheTotal = __cacheTotal;\n cx = w * 0.5;\n cy = h * 0.5;\n dx = -bboxTotal[0];\n dy = -bboxTotal[1];\n\n // 需要重新计算,因为bbox里是原本位置,这里是新的位置\n let pm, ppt;\n if(isPpt) {\n if(top.__perspectiveMatrix) {\n let {\n [PERSPECTIVE]: perspective,\n [PERSPECTIVE_ORIGIN]: perspectiveOrigin,\n } = top.__computedStyle;\n pm = tf.calPerspectiveMatrix(perspective, x1 + dx + perspectiveOrigin[0], y1 + dy + perspectiveOrigin[1]);\n }\n else {\n }\n }\n if(oitHash) {\n if(pptNode.__perspectiveMatrix) {\n let {\n [PERSPECTIVE]: perspective,\n } = pptNode.__computedStyle;\n ppt = perspective;\n }\n else {\n ppt = -1 / pptNode.__matrix[11];\n }\n }\n\n let page = __cacheTotal.__page, size = page.__size;\n // 先绘制到一张单独的纹理,防止children中和cacheTotal重复texture不能绘制\n texture = createTexture(gl, null, 0, w, h);\n frameBuffer = genFrameBufferWithTexture(gl, texture, w, h);\n gl.viewport(0, 0, w, h);\n\n // fbo绘制对象纹理不用绑定单元,剩下的纹理绘制用0号\n let lastPage, list = [];\n let cacheTotal = __cacheTotal;\n for(let i = index, len = index + (total || 0) + 1; i < len; i++) {\n let {\n node,\n total,\n hasMask,\n } = __structs[i];\n // 先看text,visibility会在内部判断,display会被parent判断\n if(node instanceof Text) {\n let __cache = node.__cache;\n if(__cache && __cache.available) {\n let {\n __opacity,\n __matrixEvent,\n } = node.__domParent;\n let p = __cache.__page;\n if(lastPage && lastPage !== p) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n }\n lastPage = p;\n list.push({ cache: __cache, opacity: __opacity, matrix: __matrixEvent });\n }\n }\n // 再看total缓存/cache,都没有的是无内容的Xom节点\n else {\n let __computedStyle = node.__computedStyle;\n if(i > index) {\n if(__computedStyle[DISPLAY] === 'none' || node.__mask) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n }\n let {\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n [MIX_BLEND_MODE]: mixBlendMode,\n } = __computedStyle;\n if(visibility === 'hidden' && !total) {\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let p = node.__domParent;\n // 特殊渲染的matrix,局部根节点为原点考虑,和bbox以节点自身主画布参考系不同\n let m;\n if(i > index) {\n if(!isE(transform)) {\n m = tf.calMatrixByOrigin(transform, tfo[0] + node.__x1 + dx, tfo[1] + node.__y1 + dy);\n }\n if(p !== top) {\n m = multiply(p.__matrixEvent, m);\n }\n // 有透视还得预乘透视\n else if(pm) {\n m = multiply(pm, m);\n }\n assignMatrix(node.__matrixEvent, m);\n }\n // 有oit平面拆分的优先考虑,其一定没有mbm;否则走普通渲染逻辑\n let oit = oitHash && oitHash[i];\n if(oit) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n lastPage = null;\n // 只求子节点的matrix即可\n for(let j = i + 1, len = i + (total || 0) + 1; j < len; j++) {\n let {\n node,\n total,\n hasMask,\n } = __structs[j];\n if(!(node instanceof Text)) {\n let __computedStyle = node.__computedStyle;\n if(__computedStyle[DISPLAY] === 'none' || node.__mask) {\n j += (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n continue;\n }\n let {\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n } = __computedStyle;\n if(visibility === 'hidden' && !total) {\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n continue;\n }\n let p = node.__domParent;\n let m;\n if(!isE(transform)) {\n m = tf.calMatrixByOrigin(transform, tfo[0] + node.__x1 + dx, tfo[1] + node.__y1 + dy);\n }\n if(p !== top) {\n m = multiply(p.__matrixEvent, m);\n }\n // 有透视还得预乘透视\n else if(pm) {\n m = multiply(pm, m);\n }\n assignMatrix(node.__matrixEvent, m);\n let {\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n } = node;\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal]);\n if(target) {\n j += (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n }\n }\n }\n webgl.drawOitPlane(gl, __structs, oit, ppt, cx, cy, dx, dy);\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n let render = node.render;\n if(render !== DOM_RENDER && render !== IMG_RENDER && render !== GEOM_RENDER) {\n node.render(renderMode, gl, dx, dy);\n }\n }\n else {\n let {\n __cache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n } = node;\n let target = i > index ? getCache([__cacheMask, __cacheFilter, __cacheTotal, __cache]) : __cache;\n if(target) {\n // 局部的mbm和主画布一样,先刷新当前fbo,然后把后面这个mbm节点绘入一个新的等画布尺寸的fbo中,再进行2者mbm合成\n if(i > index && mixBlendMode !== 'normal') {\n if(list.length) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n }\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n let res = genMbmWebgl(gl, texture, target, mixBlendMode, node.__opacity, m, dx, dy, cx, cy, size, size);\n if(res) {\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n gl.deleteTexture(texture);\n texture = res.texture;\n frameBuffer = res.frameBuffer;\n gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n }\n lastPage = null;\n }\n else {\n let p = target.__page;\n if(lastPage && lastPage !== p) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n }\n lastPage = p;\n list.push({cache: target, opacity: node.__opacity, matrix: m});\n }\n if(target !== __cache) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n }\n // webgl特殊的外部钩子,比如粒子组件自定义渲染时调用\n if(!target || target === __cache) {\n let render = node.render;\n if(render !== DOM_RENDER && render !== IMG_RENDER && render !== GEOM_RENDER) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n node.render(renderMode, gl, dx, dy);\n }\n }\n }\n }\n }\n\n // 删除fbo恢复\n drawTextureCache(gl, list, cx, cy, dx, dy);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n // 汇入集合\n frameBuffer = genFrameBufferWithTexture(gl, page.texture, size, size);\n drawTex2Cache(gl, gl.program, cacheTotal, texture, w, h);\n gl.deleteTexture(texture);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n gl.bindTexture(gl.TEXTURE_2D, null);\n gl.viewport(0, 0, W, H);\n return __cacheTotal;\n}\n\nfunction genPptWebgl(renderMode, __cacheTotal, gl, root, node, index, lv, total, __structs, W, H) {\n if(__cacheTotal && __cacheTotal.available) {\n return __cacheTotal;\n }\n\n let top = node;\n let mergeHash = [], mergeList = [];\n let isFlat = top.__computedStyle[TRANSFORM_STYLE] === 'flat', isTopFlat = isFlat;\n // 将产生transformStyle变化的节点记下来,直接子节点如果是flat也记下来,这样除了根节点下一直preserve3d的其它都被记录\n for(let i = index + 1, len = index + (total || 0) + 1; i < len; i++) {\n let {\n lv,\n node,\n total,\n hasMask,\n } = __structs[i];\n if(node instanceof Text) {\n let mh = mergeHash[i];\n if(mh) {\n isFlat = mh.isFlat;\n }\n }\n else {\n let __computedStyle = node.__computedStyle;\n if(__computedStyle[DISPLAY] === 'none' || node.__mask) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n let mh = mergeHash[i];\n if(mh) {\n isFlat = mh.isFlat;\n }\n continue;\n }\n let {\n [VISIBILITY]: visibility,\n [TRANSFORM_STYLE]: transformStyle,\n } = __computedStyle;\n if(visibility === 'hidden' && !total) {\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n let mh = mergeHash[i];\n if(mh) {\n isFlat = mh.isFlat;\n }\n continue;\n }\n let {\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n __domParent: p,\n } = node;\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal]);\n // flat变化的局部子节点,或者flat根的直接子节点,生成局部根,已生成过的不用再生成\n if(total && !target && (transformStyle !== p.__computedStyle[TRANSFORM_STYLE]\n || p === top && transformStyle === 'flat')) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n mergeHash[j] = {\n isFlat,\n };\n isFlat = transformStyle === 'flat';\n // 变化的则生成新的局部子节点汇总,记录flat情况\n mergeList.push({\n i,\n lv,\n total,\n node,\n isFlat,\n });\n }\n // 子cache可以跳过,因为flat肯定先前执行\n if(target) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n let mh = mergeHash[i];\n if(mh) {\n isFlat = mh.isFlat;\n }\n }\n }\n // 排序依旧是子节点先,但同层级不用倒序(没有mask影响)\n mergeList.sort(function(a, b) {\n if(a.lv === b.lv) {\n return a.i - b.i;\n }\n return b.lv - a.lv;\n });\n // 根节点特殊处理,如果是flat就是flat但直接子节点后续渲染仍需要透视,如果是3d就要切分\n if(!isTopFlat) {\n mergeList.push({\n i: index,\n lv,\n total,\n node,\n isFlat: isTopFlat,\n });\n }\n // 变为preserve3d的子节点需要对其子节点进行平面拆分,记录这个子节点索引和拆分信息\n let oitHash = [];\n for(let i = 0, len = mergeList.length; i < len; i++) {\n let { i: index, lv, total, node, isFlat } = mergeList[i];\n // flat汇集临时cacheTotal\n if(isFlat) {\n genTotalWebgl(renderMode, node.__cacheTotal, gl, root, node, index, lv, total || 0,\n __structs, W, H, null, top, oitHash);\n }\n // preserve3d需要以此节点为局部根E,所有子节点四边形面在3d空间下求交拆分,暂时不绘制,等上层flat调用绘制投影\n else {\n let top = node, x0 = node.__x1, y0 = node.__y1, planeList = [];\n if(node.__hasContent) {\n let {\n __cache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n } = node;\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal, __cache]);\n let o = {\n index,\n node,\n target,\n points: [\n { x: 0, y: 0, z: 0 },\n { x: node.__offsetWidth, y: 0, z: 0 },\n { x: node.__offsetWidth, y: node.__offsetHeight, z: 0 },\n { x: 0, y: node.__offsetHeight, z: 0 },\n ],\n };\n planeList.push(o);\n }\n for(let i = index + 1, len = index + (total || 0) + 1; i < len; i++) {\n let {\n node,\n total,\n hasMask,\n } = __structs[i];\n if(node instanceof Text) {\n let __cache = node.__cache;\n if(__cache && __cache.available) {\n let {\n __matrixEvent,\n } = node.__domParent;\n let { x1: x, y1: y, __width: width, __height: height } = __cache;\n let xa = x - x0, ya = y - y0;\n let xb = x + width - x0, yb = y + height - y0;\n let { x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4 } = calRectPoint(xa, ya, xb, yb, __matrixEvent);\n let o = {\n index: i,\n node,\n target: __cache,\n points: [\n { x: x1, y: y1, z: z1 },\n { x: x2, y: y2, z: z2 },\n { x: x3, y: y3, z: z3 },\n { x: x4, y: y4, z: z4 },\n ],\n };\n planeList.push(o);\n }\n }\n else {\n let __computedStyle = node.__computedStyle;\n if(__computedStyle[DISPLAY] === 'none' || node.__mask) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n } = __computedStyle;\n if(visibility === 'hidden' && !total) {\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n __cache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n __domParent: p,\n } = node;\n // 当前局部根为原点坐标系下的matrix,只求交用\n let m;\n if(!isE(transform)) {\n m = tf.calMatrixByOrigin(transform, tfo[0] + node.__x1 - x0, tfo[1] + node.__y1 - y0);\n }\n if(p !== top) {\n m = multiply(p.__matrixEvent, m);\n }\n assignMatrix(node.__matrixEvent, m);\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal, __cache]);\n if(target) {\n let { x1: x, y1: y, __width: width, __height: height } = target;\n // 坐标计算还是以局部根为原点\n let xa = x - x0, ya = y - y0;\n let xb = x + width - x0, yb = y + height - y0;\n let { x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4 } = calRectPoint(xa, ya, xb, yb, m);\n let o = {\n index: i,\n node,\n target,\n points: [\n { x: x1, y: y1, z: z1 },\n { x: x2, y: y2, z: z2 },\n { x: x3, y: y3, z: z3 },\n { x: x4, y: y4, z: z4 },\n ],\n };\n planeList.push(o);\n if(target !== __cache) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n }\n }\n }\n // 有2个以上面才会求相交\n if(planeList.length > 1) {\n oit.splitQuadrilateralPlane(planeList);\n }\n // 没拆分的直接存入,拆分的存有效拼图\n let list = [];\n for(let i = 0, len = planeList.length; i < len; i++) {\n let plane = planeList[i];\n let puzzle = plane.puzzle;\n if(puzzle) {\n for(let i = 0, len = puzzle.length; i < len; i++) {\n let p = puzzle[i];\n if(!p.isDeleted) {\n list.push(p);\n }\n }\n }\n else {\n list.push(plane);\n }\n }\n // 按z排序,远的先绘制\n oitHash[index] = oit.sortPuzzleZ(list);\n }\n }\n // 最后一次循环绘制到局部根节点上,类似genTotalWebgl()逻辑,但要考虑ppt透视\n return genTotalWebgl(renderMode, __cacheTotal, gl, root, node, index, lv, total,\n __structs, W, H, true, node, oitHash);\n}\n\nfunction genFilterWebgl(renderMode, gl, node, cache, filter, W, H) {\n let { x1, y1, width, height, bbox } = cache;\n let target = cache;\n filter.forEach(item => {\n let { k, v } = item;\n if(k === 'blur' && v > 0) {\n let res = genBlurWebgl(renderMode, gl, target, v);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'dropShadow') {\n let res = genDropShadowWebgl(renderMode, gl, target, v);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'hueRotate') {\n let rotation = geom.d2r(v % 360);\n let cosR = Math.cos(rotation);\n let sinR = Math.sin(rotation);\n let res = genColorMatrixWebgl(renderMode, gl, target, [\n 0.213 + cosR * 0.787 - sinR * 0.213, 0.715 - cosR * 0.715 - sinR * 0.715, 0.072 - cosR * 0.072 + sinR * 0.928, 0, 0,\n 0.213 - cosR * 0.213 + sinR * 0.143, 0.715 + cosR * 0.285 + sinR * 0.140, 0.072 - cosR * 0.072 - sinR * 0.283, 0, 0,\n 0.213 - cosR * 0.213 - sinR * 0.787, 0.715 - cosR * 0.715 + sinR * 0.715, 0.072 + cosR * 0.928 + sinR * 0.072, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, x1, y1, bbox);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'saturate' && v !== 100) {\n let amount = v * 0.01;\n let res = genColorMatrixWebgl(renderMode, gl, target, [\n 0.213 + 0.787 * amount, 0.715 - 0.715 * amount, 0.072 - 0.072 * amount, 0, 0,\n 0.213 - 0.213 * amount, 0.715 + 0.285 * amount, 0.072 - 0.072 * amount, 0, 0,\n 0.213 - 0.213 * amount, 0.715 - 0.715 * amount, 0.072 + 0.928 * amount, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, x1, y1, bbox);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'brightness' && v !== 100) {\n let b = v * 0.01;\n let res = genColorMatrixWebgl(renderMode, gl, target, [\n b, 0, 0, 0, 0,\n 0, b, 0, 0, 0,\n 0, 0, b, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, x1, y1, bbox);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'grayscale' && v > 0) {\n v = Math.min(v, 100);\n let oneMinusAmount = 1 - v * 0.01;\n if(oneMinusAmount < 0) {\n oneMinusAmount = 0;\n }\n else if(oneMinusAmount > 1) {\n oneMinusAmount = 1;\n }\n let res = genColorMatrixWebgl(renderMode, gl, target, [\n 0.2126 + 0.7874 * oneMinusAmount, 0.7152 - 0.7152 * oneMinusAmount, 0.0722 - 0.0722 * oneMinusAmount, 0, 0,\n 0.2126 - 0.2126 * oneMinusAmount, 0.7152 + 0.2848 * oneMinusAmount, 0.0722 - 0.0722 * oneMinusAmount, 0, 0,\n 0.2126 - 0.2126 * oneMinusAmount, 0.7152 - 0.7152 * oneMinusAmount, 0.0722 + 0.9278 * oneMinusAmount, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, x1, y1, bbox);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'contrast' && v !== 100) {\n let amount = v * 0.01;\n let o = -0.5 * amount + 0.5;\n let res = genColorMatrixWebgl(renderMode, gl, target, [\n amount, 0, 0, 0, o,\n 0, amount, 0, 0, o,\n 0, 0, amount, 0, o,\n 0, 0, 0, 1, 0,\n ], width, height, x1, y1, bbox);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'sepia' && v > 0) {\n v = Math.min(v, 100);\n let oneMinusAmount = 1 - v * 0.01;\n if(oneMinusAmount < 0) {\n oneMinusAmount = 0;\n }\n else if(oneMinusAmount > 1) {\n oneMinusAmount = 1;\n }\n let res = genColorMatrixWebgl(renderMode, gl, target, [\n 0.393 + 0.607 * oneMinusAmount, 0.769 - 0.769 * oneMinusAmount, 0.189 - 0.189 * oneMinusAmount, 0, 0,\n 0.349 - 0.349 * oneMinusAmount, 0.686 + 0.314 * oneMinusAmount, 0.168 - 0.168 * oneMinusAmount, 0, 0,\n 0.272 - 0.272 * oneMinusAmount, 0.534 - 0.534 * oneMinusAmount, 0.131 + 0.869 * oneMinusAmount, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, x1, y1, bbox);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'invert' && v > 0) {\n v = Math.min(v, 100);\n let o = v * 0.01;\n let amount = 1 - 2 * o;\n let res = genColorMatrixWebgl(renderMode, gl, target, [\n amount, 0, 0, 0, o,\n 0, amount, 0, 0, o,\n 0, 0, amount, 0, o,\n 0, 0, 0, 1, 0,\n ], width, height, x1, y1, bbox);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n });\n // 切换回主程序\n gl.useProgram(gl.program);\n gl.viewport(0, 0, W, H);\n return node.__cacheFilter = target;\n}\n\nfunction genBlurShader(gl, sigma, d) {\n let key = 'programBlur,' + sigma + ',' + d;\n if(gl.hasOwnProperty(key)) {\n return gl[key];\n }\n let weights = blur.gaussianWeight(sigma, d);\n let vert = '';\n let frag = '';\n let r = Math.floor(d * 0.5);\n for(let i = 0; i < r; i++) {\n let c = (r - i) * 0.01;\n vert += `v_texCoordsBlur[${i}] = a_texCoords + vec2(-${c}, -${c}) * u_direction;`;\n frag += `gl_FragColor += texture2D(u_texture, v_texCoordsBlur[${i}]) * ${weights[i]};`;\n }\n vert += `v_texCoordsBlur[${r}] = a_texCoords;`;\n frag += `gl_FragColor += texture2D(u_texture, v_texCoordsBlur[${r}]) * ${weights[r]};`;\n for(let i = 0; i < r; i++) {\n let c = (i + 1) * 0.01;\n vert += `v_texCoordsBlur[${i + r + 1}] = a_texCoords + vec2(${c}, ${c}) * u_direction;`;\n frag += `gl_FragColor += texture2D(u_texture, v_texCoordsBlur[${i + r + 1}]) * ${weights[i + r + 1]};`;\n }\n vert = vertexBlur.replace('[3]', '[' + d + ']').replace(/}$/, vert + '}');\n frag = fragmentBlur.replace('[3]', '[' + d + ']').replace(/}$/, frag + '}');\n return gl[key] = webgl.initShaders(gl, vert, frag);\n}\n\n/**\n * https://www.w3.org/TR/2018/WD-filter-effects-1-20181218/#feGaussianBlurElement\n * 根据cacheTotal生成cacheFilter,按照css规范的优化方法执行3次,避免卷积核d扩大3倍性能慢\n * 规范的优化方法对d的值分奇偶优化,这里再次简化,d一定是奇数,即卷积核大小\n * 先动态生成gl程序,默认3核源码示例已注释,根据sigma获得d(一定奇数),再计算权重\n * 然后将d尺寸和权重拼接成真正程序并编译成program,再开始绘制\n */\nfunction genBlurWebgl(renderMode, gl, cache, sigma) {\n let { x1, y1, bbox, width, height } = cache;\n let d = blur.kernelSize(sigma);\n let max = Math.max(15, gl.getParameter(gl.MAX_VARYING_VECTORS));\n while(d > max) {\n d -= 2;\n }\n let spread = blur.outerSizeByD(d);\n // 防止超限,webgl最大纹理尺寸限制\n if(width > Page.MAX + spread || height > Page.MAX + spread) {\n inject.warn('Filter blur is oversize');\n return;\n }\n let bboxNew = bbox.slice(0);\n bboxNew[0] -= spread;\n bboxNew[1] -= spread;\n bboxNew[2] += spread;\n bboxNew[3] += spread;\n // 写到一个tex中方便后续处理\n let w = width + spread * 2, h = height + spread * 2;\n let tex = createTexture(gl, null, 0, w, h);\n let frameBuffer = genFrameBufferWithTexture(gl, tex, w, h);\n drawCache2Tex(gl, gl.program, cache, w, h, spread);\n // 生成blur,同尺寸复用fbo\n let program = genBlurShader(gl, sigma, d);\n tex = webgl.drawBlur(gl, program, tex, w, h);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n // 写回一个cache中\n let target = TextureCache.getInstance(renderMode, gl, cache.__rootId, bboxNew, x1, y1, null);\n target.__available = true;\n let page = target.__page, size = page.__size, texture = page.texture;\n frameBuffer = genFrameBufferWithTexture(gl, texture, size, size);\n drawTex2Cache(gl, gl.program, target, tex, w, h);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n return target;\n}\n\nfunction genColorMatrixWebgl(renderMode, gl, cache, m) {\n let { x1, y1, bbox } = cache;\n let target = TextureCache.getInstance(renderMode, gl, cache.__rootId, bbox.slice(0), x1, y1, cache.__page);\n target.__available = true;\n let page = target.__page, size = page.__size;\n let frameBuffer = genFrameBufferWithTexture(gl, target.__page.texture, size, size);\n webgl.drawCm(gl, gl.programCm, target, cache, m, size * 0.5, size);\n // 切回\n gl.useProgram(gl.program);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n return target;\n}\n\nfunction genMaskWebgl(renderMode, gl, root, node, cache, W, H, i, lv, __structs) {\n let { x1, y1, width, height, bbox, dbx, dby } = cache;\n let bboxNew = bbox.slice(0);\n // 结果不能和源同page纹理,一定符合尺寸要求,不会比源大\n let __cacheMask = TextureCache.getInstance(renderMode, gl, root.__uuid, bboxNew, x1, y1, cache.__page);\n __cacheMask.__available = true;\n node.__cacheMask = __cacheMask;\n // 先求得被遮罩的matrix,用作inverse给mask计算,以被遮罩左上角为原点\n let {\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n } = node.__computedStyle;\n let inverse;\n if(isE(transform)) {\n inverse = mx.identity();\n }\n else {\n inverse = tf.calMatrixByOrigin(transform, tfo[0], tfo[1]);\n }\n inverse = mx.inverse(inverse);\n // 将所有mask绘入一个单独纹理中,尺寸和原点与被遮罩相同\n gl.viewport(0, 0, width, height);\n let texture = createTexture(gl, null, 0, width, height);\n let cx = width * 0.5, cy = height * 0.5;\n let frameBuffer = genFrameBufferWithTexture(gl, texture, width, height);\n let next = node.next;\n let isClip = next.__clip;\n let lastPage, list = [];\n let dx = -x1 + dbx, dy = -y1 + dby;\n while(next && next.__mask && next.__clip === isClip) {\n let total = __structs[i].total || 0;\n let matrixList = [];\n let parentMatrix;\n let lastMatrix;\n let opacityList = [];\n let parentOpacity = 1;\n let lastOpacity;\n let lastLv = lv;\n let index = i;\n for(let len = i + (total || 0) + 1; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n if(node instanceof Text) {\n let __cache = node.__cache;\n if(__cache && __cache.available) {\n let {\n __matrixEvent,\n __opacity,\n } = node.__domParent;\n let p = __cache.__page;\n if(lastPage && lastPage !== p) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n }\n lastPage = p;\n list.push({ cache: __cache, opacity: __opacity, matrix: __matrixEvent });\n }\n }\n else {\n let __limitCache = node.__limitCache;\n let computedStyle = node.__computedStyle;\n // 跳过display:none元素和它的所有子节点和mask\n if(computedStyle[DISPLAY] === 'none' || __limitCache) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n [OPACITY]: opacity,\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n } = computedStyle;\n if(visibility === 'hidden' && !total) {\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n __cache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n } = node;\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,根节点是第一个特殊处理\n if(i === index) {}\n else if(lv > lastLv) {\n parentMatrix = lastMatrix;\n if(isE(parentMatrix)) {\n parentMatrix = null;\n }\n matrixList.push(parentMatrix);\n parentOpacity = lastOpacity;\n opacityList.push(parentOpacity);\n }\n // 变小出栈索引需注意,可能不止一层,多层计算diff层级\n else if(lv < lastLv) {\n let diff = lastLv - lv;\n matrixList.splice(-diff);\n parentMatrix = matrixList[lv - 1];\n opacityList.splice(-diff);\n parentOpacity = opacityList[lv - 1];\n }\n // 不变是同级兄弟,无需特殊处理 else {}\n lastLv = lv;\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal, __cache]);\n if(target && (target !== __cache || visibility === 'visible')) {\n // 不考虑mbm\n let m;\n if(isE(transform)) {\n m = mx.identity();\n }\n else {\n m = tf.calMatrixByOrigin(transform, tfo[0] + target.x1 - x1, tfo[1] + target.y1 - y1);\n }\n if(!isE(parentMatrix)) {\n lastMatrix = multiply(parentMatrix, lastMatrix);\n }\n m = mx.multiply(inverse, m);\n lastMatrix = m;\n lastOpacity = parentOpacity * opacity;\n let p = target.__page;\n if(lastPage && lastPage !== p) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n }\n lastPage = p;\n list.push({ cache: target, opacity: lastOpacity, matrix: m });\n if(target !== __cache) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n }\n // webgl特殊的外部钩子,比如粒子组件自定义渲染时调用\n if(!target || target === __cache) {\n let render = node.render;\n if(render !== DOM_RENDER && render !== IMG_RENDER && render !== GEOM_RENDER) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n node.render(renderMode, gl, dx, dy);\n }\n }\n }\n }\n next = next.__next;\n }\n // 绘制到fbo的纹理对象上并删除fbo恢复\n drawTextureCache(gl, list, cx, cy, dx, dy);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n gl.bindTexture(gl.TEXTURE_2D, null);\n let program;\n if(isClip) {\n program = gl.programClip;\n }\n else {\n program = gl.programMask;\n }\n let page = __cacheMask.__page, size = page.size, tex = page.texture;\n frameBuffer = genFrameBufferWithTexture(gl, tex, size, size);\n webgl.drawMask(gl, program, __cacheMask, cache, texture, size * 0.5, size);\n // 切换回主程序\n gl.useProgram(gl.program);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n gl.viewport(0, 0, W, H);\n return __cacheMask;\n}\n\n/**\n * webgl的dropShadow只生成阴影部分,模糊复用blur,然后进行拼合\n * 复用blur时生成的模糊是临时的,和主程序模糊不一样,需区分\n */\nfunction genDropShadowWebgl(renderMode, gl, cache, v) {\n let { x1, y1, bbox, width, height } = cache;\n // 先根据x/y/color生成单色阴影\n let [x, y, sigma, , color] = v;\n let d = blur.kernelSize(sigma);\n let max = Math.max(15, gl.getParameter(gl.MAX_VARYING_VECTORS));\n while(d > max) {\n d -= 2;\n }\n let spread = blur.outerSizeByD(d);\n // 防止超限,webgl最大纹理尺寸限制\n if(width > Page.MAX + spread || height > Page.MAX + spread) {\n inject.warn('Filter dropShadow is oversize');\n return;\n }\n let w = width + spread * 2, h = height + spread * 2;\n let tex1 = createTexture(gl, null, 0, w, h);\n let frameBuffer = genFrameBufferWithTexture(gl, tex1, w, h);\n gl.useProgram(gl.programDs);\n webgl.drawDropShadow(gl, gl.programDs, frameBuffer, cache, color, width, w, height, h);\n // 生成模糊的阴影\n if(sigma) {\n let program = genBlurShader(gl, sigma, d);\n tex1 = webgl.drawBlur(gl, program, tex1, w, h);\n }\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n // cache绘制到一个单独的tex上\n let tex2 = createTexture(gl, null, 0, width, height);\n frameBuffer = genFrameBufferWithTexture(gl, tex2, width, height);\n drawCache2Tex(gl, gl.program, cache, width, height, 0);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n // 原图tex2和模糊阴影tex1合成\n let bboxNew = bbox.slice(0);\n bboxNew[0] += x;\n bboxNew[1] += y;\n bboxNew[2] += x;\n bboxNew[3] += y;\n bboxNew[0] -= spread;\n bboxNew[1] -= spread;\n bboxNew[2] += spread;\n bboxNew[3] += spread;\n let bboxMerge = bbox.slice(0);\n mergeBbox(bboxMerge, bboxNew);\n let target = TextureCache.getInstance(renderMode, gl, cache.__rootId, bboxMerge, x1, y1, null);\n target.__available = true;\n let page = target.__page, size = page.__size;\n frameBuffer = genFrameBufferWithTexture(gl, page.texture, size, size);\n let dx1 = bboxNew[0] - bboxMerge[0], dy1 = bboxNew[1] - bboxMerge[1];\n let dx2 = bbox[0] - bboxMerge[0], dy2 = bbox[1] - bboxMerge[1];\n webgl.drawDropShadowMerge(gl, target, size, tex1, dx1, dy1, w, h, tex2, dx2, dy2, width, height);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n bindTexture(gl, null, 0);\n gl.deleteTexture(tex1);\n gl.deleteTexture(tex2);\n return target;\n}\n\n/**\n * 生成blendMode混合fbo纹理结果,原本是所有元素向画布或一个fbo记A进行绘制,当出现mbm时,进入到这里,\n * 先生成一个新的fbo记B,之前的绘制都先到B上,再把后续元素绘制到一个同尺寸的fbo纹理上,\n * 两者进行mbm混合,返回到A上\n */\nfunction genMbmWebgl(gl, texture, cache, mbm, opacity, matrix, dx, dy, cx, cy, width, height) {\n // 后续绘制到同尺寸纹理上\n let tex = createTexture(gl, null, 0, width, height);\n let frameBuffer = genFrameBufferWithTexture(gl, tex, width, height);\n drawTextureCache(gl, [{ cache, opacity, matrix }], cx, cy, dx, dy);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n // 获取对应的mbm程序\n let program;\n mbm = mbmName(mbm);\n if(mbm === 'multiply') {\n program = gl.programMbmMp;\n }\n else if(mbm === 'screen') {\n program = gl.programMbmSr;\n }\n else if(mbm === 'overlay') {\n program = gl.programMbmOl;\n }\n else if(mbm === 'darken') {\n program = gl.programMbmDk;\n }\n else if(mbm === 'lighten') {\n program = gl.programMbmLt;\n }\n else if(mbm === 'color-dodge') {\n program = gl.programMbmCd;\n }\n else if(mbm === 'color-burn') {\n program = gl.programMbmCb;\n }\n else if(mbm === 'hard-light') {\n program = gl.programMbmHl;\n }\n else if(mbm === 'soft-light') {\n program = gl.programMbmSl;\n }\n else if(mbm === 'difference') {\n program = gl.programMbmDf;\n }\n else if(mbm === 'exclusion') {\n program = gl.programMbmEx;\n }\n else if(mbm === 'hue') {\n program = gl.programMbmHue;\n }\n else if(mbm === 'saturation') {\n program = gl.programMbmSt;\n }\n else if(mbm === 'color') {\n program = gl.programMbmCl;\n }\n else if(mbm === 'luminosity') {\n program = gl.programMbmLm;\n }\n gl.useProgram(program);\n // 生成新的fbo,将混合结果绘入\n let resTex = createTexture(gl, null, 0, width, height);\n let resFrameBuffer = genFrameBufferWithTexture(gl, resTex, width, height);\n webgl.drawMbm(gl, program, texture, tex);\n gl.useProgram(gl.program);\n return {\n texture: resTex,\n frameBuffer: resFrameBuffer,\n };\n}\n\nfunction renderSvg(renderMode, ctx, root, isFirst, rlv) {\n let { __structs, width, height } = root;\n // mask节点很特殊,本身有matrix会影响,本身没改变但对象节点有改变也需要计算逆矩阵应用顶点\n let maskEffectHash = [];\n if(!isFirst) {\n // 先遍历一遍收集完全不变的defs,缓存起来id,随后再执行遍历渲染生成新的,避免掉重复的id\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n node,\n total,\n hasMask,\n } = __structs[i];\n let __cacheDefs = node.__cacheDefs;\n let __refreshLevel = node.__refreshLevel;\n // 只要涉及到matrix和opacity就影响mask\n let hasEffectMask = hasMask && (__refreshLevel >= REPAINT || (__refreshLevel & (TRANSFORM_ALL | OP)));\n if(hasEffectMask) {\n let start = i + (total || 0) + 1;\n let end = start + hasMask;\n // mask索引遍历时处理,暂存遮罩对象的刷新lv\n maskEffectHash[end - 1] = __refreshLevel;\n }\n // >=REPAINT重绘生成走render()跳过这里\n if(__refreshLevel < REPAINT) {\n // 特殊的mask判断,遮罩对象影响这个mask了,除去filter、遮罩对象无TRANSFORM变化外都可缓存\n let mh = maskEffectHash[i];\n if(mh) {\n if(!(__refreshLevel & TRANSFORM_ALL) && mh < REPAINT && !(mh & TRANSFORM_ALL)) {\n __cacheDefs.forEach(item => {\n ctx.addCache(item);\n });\n }\n }\n // 去除特殊的filter,普通节点或不影响的mask在 {\n ctx.addCache(item);\n });\n }\n }\n }\n }\n let maskHash = [];\n // 栈代替递归,存父节点的matrix/opacity,matrix为E时存null省略计算\n let matrixList = [];\n let parentMatrix;\n let vdList = [];\n let parentVd;\n let lastLv = 0;\n let lastRefreshLv = 0;\n let lastNode;\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n let computedStyle, __refreshLevel, __cacheDefs, __cacheTotal;\n if(node instanceof Text) {\n computedStyle = node.computedStyle;\n __refreshLevel = lastRefreshLv;\n }\n else {\n computedStyle = node.__computedStyle;\n __cacheDefs = node.__cacheDefs;\n __refreshLevel = node.__refreshLevel;\n __cacheTotal = node.__cacheTotal;\n }\n lastRefreshLv = __refreshLevel;\n node.__refreshLevel = NONE;\n let display = computedStyle[DISPLAY];\n // 将随后的若干个mask节点范围存下来\n if(hasMask && display !== 'none') {\n let start = i + (total || 0) + 1;\n let end = start + hasMask;\n // svg限制了只能Geom单节点,不可能是Dom,所以end只有唯一\n maskHash[end - 1] = {\n index: i,\n start,\n end,\n isClip: __structs[start].node.__clip, // 第一个节点是clip为准\n };\n }\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,Root节点第一个特殊处理\n if(lv < lastLv) {\n let diff = lastLv - lv;\n matrixList.splice(-diff);\n parentMatrix = matrixList[lv - 1];\n vdList.splice(-diff);\n parentVd = vdList[lv - 1];\n }\n else if(lv > lastLv) {\n matrixList.push(parentMatrix = lastNode.__matrix);\n let vd = lastNode.__virtualDom;\n vdList.push(vd);\n parentVd = vd;\n }\n lastNode = node;\n lastLv = lv;\n let virtualDom;\n // svg小刷新等级时直接修改vd,这样Geom不再感知\n if(__refreshLevel < REPAINT && !(node instanceof Text)) {\n virtualDom = node.__virtualDom;\n // total可以跳过所有孩子节点省略循环\n if(__cacheTotal && __cacheTotal.available) {\n i += (total || 0);\n virtualDom.cache = true;\n }\n else {\n __cacheTotal && (__cacheTotal.available = true);\n virtualDom = node.__virtualDom = util.extend({}, virtualDom);\n // dom要清除children缓存,geom和img无需\n if(node instanceof Dom && !(node instanceof Img)) {\n virtualDom.children = [];\n }\n // 还得判断,和img加载混在一起时,触发刷新如果display:none,则还有cacheTotal\n if(display === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += hasMask;\n }\n }\n else {\n delete virtualDom.cache;\n }\n }\n if(__refreshLevel & TRANSFORM_ALL) {\n let matrix = node.__matrix;\n if(!matrix || isE(matrix)) {\n delete virtualDom.transform;\n }\n else {\n virtualDom.transform = 'matrix(' + util.joinArr(mx.m2m6(matrix), ',') + ')';\n }\n if(parentMatrix && matrix) {\n matrix = multiply(parentMatrix, matrix);\n }\n assignMatrix(node.__matrixEvent, matrix);\n }\n if(__refreshLevel & OP) {\n let opacity = computedStyle[OPACITY];\n if(opacity === 1) {\n delete virtualDom.opacity;\n }\n else {\n virtualDom.opacity = opacity;\n }\n }\n if(__refreshLevel & FT) {\n let filter = computedStyle[FILTER];\n let s = painter.svgFilter(filter);\n if(s) {\n virtualDom.filter = s;\n }\n else {\n delete virtualDom.filter;\n }\n }\n if(__refreshLevel & MBM) {\n let mixBlendMode = computedStyle[MIX_BLEND_MODE];\n if(mixBlendMode !== 'normal') {\n virtualDom.mixBlendMode = mbmName(mixBlendMode);\n }\n else {\n delete virtualDom.mixBlendMode;\n }\n }\n virtualDom.lv = __refreshLevel;\n }\n else {\n // >=REPAINT会调用render,重新生成defsCache,text没有这个东西\n if(!(node instanceof Text)) {\n node.__cacheDefs.splice(0);\n let matrix = node.__matrix;\n if(parentMatrix) {\n matrix = multiply(parentMatrix, matrix);\n }\n assignMatrix(node.__matrixEvent, matrix);\n }\n node.render(renderMode, ctx, 0, 0);\n virtualDom = node.__virtualDom;\n // svg mock,每次都生成,每个节点都是局部根,更新时自底向上清除\n if(!(node instanceof Text)) {\n node.__cacheTotal = node.__cacheTotal || {\n available: true,\n release() {\n this.available = false;\n delete virtualDom.cache;\n },\n __offsetY() {},\n };\n node.__cacheTotal.available = true;\n }\n // 渲染后更新取值\n display = computedStyle[DISPLAY];\n if(display === 'none') {\n i += total || 0;\n i += hasMask || 0;\n }\n }\n /**\n * mask会在join时过滤掉,这里将假设正常渲染的vd的内容获取出来组成defs的mask内容\n * 另外最初遍历时记录了会影响的mask,在=REPAINT始终重新设置\n * 本身有matrix也需要重设\n */\n let mh = maskHash[i];\n if(mh && (maskEffectHash[i]\n || __refreshLevel >= REPAINT\n || (__refreshLevel & (TRANSFORM_ALL | OP)))) {\n let { index, start, end, isClip } = mh;\n let target = __structs[index];\n let dom = target.node;\n let mChildren = [];\n // clip模式时,先添加兜底整个白色使得全部都可见,mask本身变反色(黑色)\n if(isClip) {\n mChildren.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', `M0,0L${width},0L${width},${height}L0,${height}L0,0`],\n ['fill', 'rgba(255,255,255,1)'],\n ['stroke-width', 0],\n ],\n });\n }\n for(let j = start; j < end; j++) {\n let node = __structs[j].node;\n let { computedStyle: { [DISPLAY]: display, [VISIBILITY]: visibility, [FILL]: fill },\n virtualDom: { children, opacity } } = node;\n if(display !== 'none' && visibility !== 'hidden') {\n // 引用相同无法diff,需要clone\n children = util.clone(children);\n mChildren = mChildren.concat(children);\n for(let k = 0, len = children.length; k < len; k++) {\n let { tagName, props } = children[k];\n if(tagName === 'path') {\n if(isClip) {\n for(let j = 0, len = props.length; j < len; j++) {\n let item = props[j];\n if(item[0] === 'fill') {\n item[1] = util.int2invert(fill[0]);\n }\n }\n }\n let matrix = node.matrix;\n let ivs = inverse(dom.matrix);\n matrix = multiply(ivs, matrix);\n // path没有transform属性,在vd上,需要弥补\n props.push(['transform', `matrix(${util.joinArr(mx.m2m6(matrix), ',')})`]);\n // path没有opacity属性,在vd上,需要弥补\n if(!util.isNil(opacity) && opacity !== 1) {\n props.push(['opacity', opacity]);\n }\n }\n // img可能有matrix属性,需判断\n else if(tagName === 'image') {\n let hasTransform = -1;\n for(let m = 0, len = props.length; m < len; m++) {\n if(props[m][0] === 'transform') {\n hasTransform = m;\n break;\n }\n }\n if(hasTransform === -1) {\n let ivs = inverse(dom.matrix);\n if(!isE(ivs)) {\n props.push(['transform', `matrix(${util.joinArr(mx.m2m6(ivs), ',')})`]);\n }\n }\n else {\n let matrix = props[hasTransform][1].match(/[\\d.]+/g).map(i => parseFloat(i));\n let ivs = inverse(dom.matrix);\n matrix = multiply(ivs, matrix);\n props[hasTransform][1] = `matrix(${util.joinArr(mx.m2m6(matrix), ',')})`;\n }\n }\n }\n }\n }\n // 清掉上次的\n for(let i = __cacheDefs.length - 1; i >= 0; i--) {\n let item = __cacheDefs[i];\n if(item.tagName === 'mask') {\n __cacheDefs.splice(i, 1);\n ctx.removeCache(item);\n }\n }\n let o = {\n tagName: 'mask',\n props: [],\n children: mChildren,\n };\n let id = ctx.add(o);\n __cacheDefs.push(o);\n id = 'url(#' + id + ')';\n dom.virtualDom.mask = id;\n }\n // mask不入children\n if(parentVd && !node.__mask) {\n parentVd.children.push(virtualDom);\n }\n if(i === 0) {\n parentMatrix = node.__matrix;\n parentVd = virtualDom;\n }\n }\n}\n\nfunction renderWebgl(renderMode, gl, root, isFirst, rlv) {\n if(isFirst) {\n Page.init(gl.getParameter(gl.MAX_TEXTURE_SIZE));\n }\n let { __structs, width, height } = root;\n let cx = width * 0.5, cy = height * 0.5;\n // 栈代替递归,存父节点的matrix/opacity,matrix为E时存null省略计算\n let lastRefreshLevel = NONE;\n let mergeList = [];\n let hasMbm; // 是否有混合模式出现\n /**\n * 先一遍先序遍历每个节点绘制到自己__cache上,排除Text和已有的缓存以及局部根缓存,\n * 根据refreshLevel进行等级区分,可能是=REPAINT,REFLOW布局已前置处理完。\n * 首次绘制没有catchTotal等,后续则可能会有,在= REPAINT || (rlv & (CACHE | FT | PPT | MASK))) {\n // 记录transformStyle,出现ppt时有用,同时ts为flat后同一ppt上下文影响继承显示\n let flatList = [], flatExtendList = [];\n let parentFlat = false, parentExtendFlat = false;\n let lastFlat = false, lastExtendFlat = false;\n let pptNodeList = [];\n let parentPptNode = null;\n let lastPptNode = null;\n let lastLv = 0;\n // 节点开始有ppt得记录,后续孩子中如果有flat的,得强制生成cacheTotal\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n node.__index = i; // 生成total需要\n // Text特殊处理,webgl中先渲染为bitmap,再作为贴图绘制,缓存交由text内部判断,直接调用渲染纹理方法\n if(node instanceof Text) {\n if(lastRefreshLevel >= REPAINT) {\n let bbox = node.bbox, x = node.__x, y = node.__y;\n let __cache = node.__cache;\n if(__cache) {\n __cache.reset(bbox, x, y);\n }\n else {\n __cache = CanvasCache.getInstance(mode.CANVAS, gl, root.__uuid, bbox, x, y, null);\n }\n if(__cache && __cache.enabled) {\n __cache.__bbox = bbox;\n __cache.__available = true;\n node.__cache = __cache;\n node.render(mode.CANVAS, __cache.ctx, __cache.dx, __cache.dy);\n }\n else {\n __cache && __cache.release();\n node.__limitCache = true;\n }\n }\n continue;\n }\n let __computedStyle = node.__computedStyle;\n // 跳过display:none元素和它的所有子节点\n if(__computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let perspective = __computedStyle[PERSPECTIVE];\n let isFlat = __computedStyle[TRANSFORM_STYLE] === 'flat';\n // 特殊,新的ppt上下文节点启用新值,否则还是老的\n let isExtendFlat = parentExtendFlat || isFlat;\n let pptNode = perspective ? node : null;\n // root第一个特殊处理\n if(lv === 0) {\n parentFlat = parentExtendFlat = isFlat;\n if(perspective) {\n parentPptNode = node;\n }\n }\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树\n else if(lv > lastLv) {\n parentFlat = lastFlat;\n flatList.push(isFlat);\n parentExtendFlat = lastExtendFlat;\n flatExtendList.push(isFlat);\n parentPptNode = lastPptNode || parentPptNode;\n pptNodeList.push(pptNode || parentPptNode);\n }\n // 变小出栈索引需注意,可能不止一层,多层计算diff层级\n else if(lv < lastLv) {\n let diff = lastLv - lv;\n flatList.splice(-diff);\n parentFlat = flatList[lv - 1];\n flatExtendList.splice(-diff);\n parentExtendFlat = flatExtendList[lv - 1];\n pptNodeList.splice(-diff);\n parentPptNode = pptNodeList[lv - 1];\n }\n // 不变是同级兄弟,无需特殊处理 else {}\n lastLv = lv;\n // 根据refreshLevel优化计算\n let {\n __refreshLevel,\n __currentStyle,\n __cacheTotal,\n } = node;\n node.__refreshLevel = NONE;\n /**\n * lv=REPAINT那里,小变化不动\n * 当有遮罩时,如果被遮罩节点本身无变更,需要检查其next的遮罩节点有无变更,\n * 但其实不用检查,因为next变更一定会清空cacheMask,只要检查cacheMask即可\n * 如果没有或无效,直接添加,无视节点本身变化,后面防重即可\n */\n if(!__refreshLevel) {\n }\n else if(__refreshLevel < REPAINT) {\n let mixBlendMode = __computedStyle[MIX_BLEND_MODE];\n let isMbm = (__refreshLevel & MBM) && mixBlendMode !== 'normal';\n let need = node.__cacheAsBitmap || hasMask;\n if(!need && (__refreshLevel & FT)) {\n let filter = __computedStyle[FILTER];\n if(filter && filter.length) {\n need = true;\n }\n }\n if(!need && (__refreshLevel & PPT)) {\n let __domParent = node.__domParent;\n let isPpt = !isE(__domParent && __domParent.__perspectiveMatrix) || isPerspectiveMatrix(node.__matrix);\n if(isPpt) {\n need = true;\n }\n }\n if(isMbm) {\n hasMbm = true;\n }\n // 这里和canvas不一样,前置cacheAsBitmap条件变成或条件之一,新的ppt层级且画中画需要新的fbo\n if(need) {\n mergeList.push({\n i,\n lv,\n total,\n node,\n hasMask,\n });\n }\n // total可以跳过所有孩子节点省略循环,filter/mask等的强制前提是有total\n if(__cacheTotal && __cacheTotal.available) {\n i += (total || 0);\n if(__refreshLevel === NONE && hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n }\n /**\n * >=REPAINT重新渲染,并根据结果判断是否离屏限制错误\n * Geom没有子节点无需汇总局部根,Dom中Img也是,它们的局部根等于自身的cache,其它符合条件的Dom需要生成\n */\n else {\n let hasContent = node.calContent(__currentStyle, __computedStyle), onlyImg;\n // 有内容先以canvas模式绘制到离屏画布上,自定义渲染设置无内容不实现即可跳过\n if(hasContent) {\n let bbox = node.bbox, __cache = node.__cache, x1 = node.__x1, y1 = node.__y1;\n // 单图特殊对待缓存\n if(node instanceof Img) {\n let loadImg = node.__loadImg;\n if(loadImg.onlyImg && !loadImg.error && loadImg.source) {\n onlyImg = true;\n __cache = node.__cache = ImgWebglCache.getInstance(mode.CANVAS, gl, root.__uuid, bbox, loadImg, x1, y1);\n }\n }\n if(!onlyImg) {\n if(__cache) {\n __cache.reset(bbox, x1, y1);\n }\n else {\n __cache = CanvasCache.getInstance(mode.CANVAS, gl, root.__uuid, bbox, x1, y1, null);\n }\n }\n if(__cache && __cache.enabled) {\n __cache.__bbox = bbox;\n __cache.__available = true;\n node.__cache = __cache;\n node.render(mode.CANVAS, __cache.ctx, __cache.dx, __cache.dy);\n }\n else {\n __cache && __cache.release();\n node.__limitCache = true;\n return;\n }\n }\n else {\n node.__limitCache = false;\n }\n let {\n [OVERFLOW]: overflow,\n [FILTER]: filter,\n [MIX_BLEND_MODE]: mixBlendMode,\n [PERSPECTIVE]: perspective,\n } = __computedStyle;\n let isMbm = mixBlendMode !== 'normal';\n let isPpt = total && (perspective || isPerspectiveMatrix(node.__matrix));\n let isOverflow = overflow === 'hidden' && total;\n let isFilter = filter && filter.length;\n if(isMbm) {\n hasMbm = true;\n }\n if(node.__cacheAsBitmap\n || hasMask\n || isFilter\n || isOverflow\n || isPpt) {\n mergeList.push({\n i,\n lv,\n total,\n node,\n hasMask,\n isPpt,\n });\n }\n }\n lastRefreshLevel = __refreshLevel;\n lastFlat = isFlat;\n lastExtendFlat = isExtendFlat;\n lastPptNode = pptNode;\n }\n }\n // 根据收集的需要合并局部根的索引,尝试合并,按照层级从大到小,索引从大到小的顺序,\n // 这样保证子节点在前,后节点在前,后节点是为了mask先应用自身如filter之后再进行遮罩\n if(mergeList.length) {\n mergeList.sort(function(a, b) {\n if(a.lv === b.lv) {\n return b.i - a.i;\n }\n return b.lv - a.lv;\n });\n // ppt只有嵌套才需要生成,最下面的孩子节点的ppt无需,因此记录一个hash存index,\n // 同时因为是后序遍历,孩子先存所有父亲的index即可保证父亲才能生成cacheTotal\n let pptHash = {};\n for(let ii = 0, len = mergeList.length; ii < len; ii++) {\n let {\n i,\n lv,\n total,\n node,\n hasMask,\n isPpt,\n } = mergeList[ii];\n let {\n __matrix,\n __domParent,\n __computedStyle,\n } = node;\n let {\n [OVERFLOW]: overflow,\n [FILTER]: filter,\n } = __computedStyle;\n let isPerspective = !isE(__domParent && __domParent.__perspectiveMatrix) || isPerspectiveMatrix(__matrix);\n // 有ppt的,向上查找所有父亲index记录,可能出现重复记得提前跳出\n if(isPerspective) {\n let parent = node.__domParent;\n while(parent) {\n let idx = parent.__index;\n if(pptHash[idx]) {\n break;\n }\n if(isPerspectiveMatrix(parent.__matrix)) {\n pptHash[idx] = true;\n }\n parent = parent.__domParent;\n if(parent && parent.__perspectiveMatrix) {\n pptHash[idx] = true;\n }\n }\n // 最内层的ppt忽略,注意transformStyle变化的强制生成\n if(!pptHash[i]) {\n if(!hasMask && !filter.length && !(overflow === 'hidden' && total) && !node.__cacheAsBitmap) {\n // return;\n }\n }\n }\n let {\n __limitCache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n } = node;\n if(__limitCache) {\n return;\n }\n let needGen;\n // 可能没变化,比如被遮罩节点、filter变更等\n if(!__cacheTotal || !__cacheTotal.available) {\n let res;\n if(isPpt) {\n res = genPptWebgl(renderMode, __cacheTotal, gl, root, node, i, lv, total || 0,\n __structs, width, height);\n }\n else {\n res = genTotalWebgl(renderMode, __cacheTotal, gl, root, node, i, lv, total || 0,\n __structs, width, height, null, null, null);\n }\n if(!res) {\n return;\n }\n __cacheTotal = res;\n needGen = true;\n }\n // 即使超限,也有total结果\n let target = __cacheTotal;\n if(filter.length) {\n if(!__cacheFilter || !__cacheFilter.available || needGen) {\n let res = genFilterWebgl(renderMode, gl, node, target, filter, width, height);\n if(res) {\n target = res;\n needGen = true;\n }\n }\n }\n if(hasMask && (!__cacheMask || !__cacheMask.available || needGen)) {\n genMaskWebgl(renderMode, gl, root, node, target, width, height, i + (total || 0) + 1, lv, __structs);\n }\n }\n }\n /**\n * 最后先序遍历一次应用__cacheTotal即可,没有的用__cache,以及剩下的超尺寸的和Text\n * 由于mixBlendMode的存在,需先申请个fbo纹理,所有绘制默认向该纹理绘制,最后fbo纹理再进入主画布\n * 前面循环时有记录是否出现mbm,只有出现才申请,否则不浪费直接输出到主画布\n * 超尺寸的不绘制并给出警告,实现会扰乱逻辑且很少会出现这种情况\n */\n let frameBuffer, texture;\n if(hasMbm) {\n texture = createTexture(gl, null, 0, width, height);\n bindTexture(gl, null, 0);\n frameBuffer = genFrameBufferWithTexture(gl, texture, width, height);\n gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n }\n let lastPage, list = [];\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n node,\n total,\n hasMask,\n } = __structs[i];\n // text如果display不可见,parent会直接跳过,不会走到这里,这里一定是直接绘制到root的,visibility在其内部判断\n if(node instanceof Text) {\n // text特殊之处,__config部分是复用parent的\n let __cache = node.__cache;\n if(__cache && __cache.available) {\n let {\n __matrixEvent,\n __opacity,\n } = node.__domParent;\n let p = __cache.__page;\n if(lastPage && lastPage !== p) {\n drawTextureCache(gl, list.splice(0), cx, cy, 0, 0);\n }\n lastPage = p;\n list.push({ cache: __cache, opacity: __opacity, matrix: __matrixEvent });\n }\n }\n else {\n let __computedStyle = node.__computedStyle;\n // none跳过这棵子树,判断下最后一个节点的离屏应用即可\n if(__computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n [OPACITY]: opacity,\n [MIX_BLEND_MODE]: mixBlendMode,\n [VISIBILITY]: visibility,\n } = __computedStyle;\n if(visibility === 'hidden' && !total) {\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n __cache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n __domParent,\n __matrix,\n } = node;\n let m = __matrix;\n if(__domParent) {\n let op = __domParent.__opacity;\n if(op !== 1) {\n opacity *= __domParent.__opacity;\n }\n let pm = __domParent.__perspectiveMatrix, me = __domParent.__matrixEvent;\n if(pm && pm.length) {\n m = multiply(__domParent.__perspectiveMatrix, m);\n }\n if(me && me.length) {\n m = multiply(__domParent.__matrixEvent, m);\n }\n }\n node.__opacity = opacity;\n assignMatrix(node.__matrixEvent, m);\n // total和自身cache的尝试,visibility不可见时没有cache\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal, __cache]);\n if(target) {\n // 有mbm则需要混合之前的纹理和新纹理到fbo上面,连续的mbm则依次交替绘制到画布或离屏fbo上\n if(mixBlendMode !== 'normal') {\n if(list.length) {\n drawTextureCache(gl, list.splice(0), cx, cy, 0, 0);\n lastPage = null;\n }\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n let res = genMbmWebgl(gl, texture, target, mixBlendMode, opacity, m, 0, 0, cx, cy, width, height);\n if(res) {\n gl.deleteTexture(texture);\n texture = res.texture;\n frameBuffer = res.frameBuffer;\n }\n }\n else {\n let p = target.__page;\n if(lastPage && lastPage !== p) {\n drawTextureCache(gl, list.splice(0), cx, cy, 0, 0);\n }\n lastPage = p;\n list.push({ cache: target, opacity, matrix: m });\n }\n if(target !== __cache) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n }\n // webgl特殊的外部钩子,比如粒子组件自定义渲染时调用\n if(!target || target === __cache) {\n let render = node.render;\n if(render !== DOM_RENDER && render !== IMG_RENDER && render !== GEOM_RENDER) {\n node.render(renderMode, gl, 0, 0);\n }\n }\n }\n }\n drawTextureCache(gl, list, cx, cy, 0, 0);\n // 有mbm时将汇总的fbo绘入主画布,否则本身就是到主画布无需多余操作\n if(hasMbm) {\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(gl.program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(gl.program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1, 1, 1, 1, 1, 1]), gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n bindTexture(gl, texture, 0);\n let u_texture = gl.getUniformLocation(gl.program, 'u_texture');\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.deleteBuffer(opacityBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.deleteTexture(texture);\n }\n}\n\nfunction renderCanvas(renderMode, ctx, root, isFirst, rlv) {\n let { __structs, width, height } = root;\n let mergeList = [];\n /**\n * 先一遍先序遍历收集cacheAsBitmap的节点,说明这棵子树需要缓存,可能出现嵌套,深层级优先、后面优先\n * 可能遇到已有缓存没变化的,这时候不要收集忽略掉,没有缓存的走后面遍历普通渲染\n * 第一次强制进入,后续不包含cache变更且= REPAINT || (rlv & (CACHE | FT | MASK))) {\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n // 排除Text,要么根节点直接绘制,要么被局部根节点汇总,自身并不缓存(fillText比位图更快)\n if(node instanceof Text) {\n continue;\n }\n let __computedStyle = node.__computedStyle;\n // 跳过display:none元素和它的所有子节点\n if(__computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n // 根据refreshLevel优化计算,处理其样式\n let {\n __refreshLevel,\n __cacheTotal,\n } = node;\n node.__refreshLevel = NONE;\n // filter变化需重新生成,cacheTotal本身就存在要判断下;CACHE取消重新生成则无需判断\n // img在只有自身的情况下自动生成并特殊对待,多个相同引用的img使用同一份资源\n let need = node.__cacheAsBitmap &&\n ((__refreshLevel & (CACHE | FT)) || __refreshLevel >= REPAINT);\n if(!need && node instanceof Img) {\n let hasContent = node.calContent(node.__currentStyle, node.__computedStyle);\n let loadImg = node.__loadImg;\n if(loadImg.onlyImg && hasContent) {\n need = true;\n }\n }\n if(need) {\n mergeList.push({\n i,\n lv,\n total,\n node,\n hasMask,\n });\n }\n // total可以跳过所有孩子节点省略循环,filter/mask等的强制前提是有total\n if(__cacheTotal && __cacheTotal.available) {\n i += (total || 0);\n if(__refreshLevel === NONE && hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n }\n }\n /**\n * 根据收集的需要合并局部根的索引,尝试合并,按照层级从大到小,索引从大到小的顺序,\n * 这样保证子节点在前,后节点在前,后节点是为了mask先应用自身如filter之后再进行遮罩\n */\n if(mergeList.length) {\n mergeList.sort(function(a, b) {\n if(a.lv === b.lv) {\n return b.i - a.i;\n }\n return b.lv - a.lv;\n });\n mergeList.forEach(item => {\n let { i, lv, total, node, hasMask } = item;\n let __cacheTotal = genTotal(renderMode, ctx, root, node, i, lv, total || 0, __structs, width, height);\n if(__cacheTotal) {\n genTotalOther(renderMode, __structs, __cacheTotal, node, hasMask, width, height);\n }\n });\n }\n /**\n * 最后先序遍历一次并应用__cacheTotal即可,没有的普通绘制,以及剩下的超尺寸的和Text\n * 特殊离屏和cacheAsBitmap的离屏都已经产生了cacheTotal,除非超限\n * 离屏功能的数据结构和算法逻辑非常复杂,需用到下面2个hash,来完成一些filter、mask等离屏才能完成的绘制\n * 其中overflow、filter、mix-blend-mode是对自身及子节点,mask则是对自身和后续next遮罩节点\n * 一个节点在Xom渲染中申请离屏canvas,是按照一定顺序来的,且多个离屏后面的有前面的ctx引用,第一个则引用最初非离屏的ctx\n * 这个顺序在应用离屏时以反向顺序开始,这样最后ctx被还原到最初的ctx\n * mask是个十分特殊的离屏,因为除了自身外,next节点也需要汇总到另外一个离屏上,为了逻辑一致性\n * 所有离屏应用的索引都以最后一个节点的索引为准,即有mask时以最后一个mask,无mask则以自身节点的最后一个(+total)为索引\n * 由于存在普通非cache绘制,所以依然要用到栈代替递归计算matrix\n */\n let maskStartHash = [];\n let offscreenHash = [];\n let lastOpacity = -1;\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n // text如果display不可见,parent会直接跳过,不会走到这里,这里一定是直接绘制到root的,visibility在其内部判断\n if(node instanceof Text) {\n node.render(renderMode, ctx, 0, 0);\n let oh = offscreenHash[i];\n if(oh) {\n ctx = applyOffscreen(ctx, oh, width, height, false);\n lastOpacity = -1;\n }\n }\n else {\n let __computedStyle = node.__computedStyle;\n // none跳过这棵子树,判断下最后一个节点的离屏应用即可\n if(__computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n let oh = offscreenHash[i];\n if(oh) {\n ctx = applyOffscreen(ctx, oh, width, height, true);\n lastOpacity = -1;\n }\n continue;\n }\n let {\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n __domParent,\n __matrix,\n } = node;\n // 遮罩对象申请了个离屏,其第一个mask申请另外一个离屏mask2,开始聚集所有mask元素的绘制,\n // 这是一个十分特殊的逻辑,保存的index是最后一个节点的索引,OFFSCREEN_MASK2是最低优先级,\n // 这样当mask本身有filter时优先自身,然后才是OFFSCREEN_MASK2\n let msh = maskStartHash[i];\n if(msh) {\n let { idx, hasMask, offscreenMask } = msh;\n let target = inject.getOffscreenCanvas(width, height, null, 'mask2');\n offscreenMask.mask = target; // 应用mask用到\n offscreenMask.isClip = node.__clip;\n // 定位到最后一个mask元素上的末尾\n let j = i + (total || 0) + 1;\n while(--hasMask) {\n let { total } = __structs[j];\n j += (total || 0) + 1;\n }\n j--;\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx, lv, type: OFFSCREEN_MASK, offscreen: offscreenMask });\n list.push({ idx: j, lv, type: OFFSCREEN_MASK2, offscreen: {\n ctx, // 保存等待OFFSCREEN_MASK2时还原\n target,\n }});\n ctx = target.ctx;\n }\n // 设置opacity/matrix,根节点是没有父节点的不计算继承值\n let opacity = __computedStyle[OPACITY];\n let m = __matrix;\n if(__domParent) {\n let op = __domParent.__opacity;\n if(op !== 1) {\n opacity *= __domParent.__opacity;\n }\n let me = __domParent.__matrixEvent;\n if(me && me.length) {\n m = multiply(me, m);\n }\n }\n node.__opacity = opacity;\n assignMatrix(node.__matrixEvent, m);\n // 有cache声明从而有total的可以直接绘制并跳过子节点索,total生成可能会因超限而失败\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal]);\n if(target) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n if(lastOpacity !== opacity) {\n ctx.globalAlpha = opacity;\n lastOpacity = opacity;\n }\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n let mixBlendMode = __computedStyle[MIX_BLEND_MODE];\n if(mixBlendMode !== 'normal') {\n ctx.globalCompositeOperation = mbmName(mixBlendMode);\n }\n let { x, y, canvas, x1, y1, dbx, dby, width: w, height: h } = target;\n ctx.drawImage(canvas, x, y, w, h, x1 - dbx, y1 - dby, w, h);\n // total应用后记得设置回来\n ctx.globalCompositeOperation = 'source-over';\n // 父超限但子有total的时候,i此时已经增加到了末尾,也需要检查\n let oh = offscreenHash[i];\n if(oh) {\n ctx = applyOffscreen(ctx, oh, width, height, false);\n lastOpacity = -1;\n }\n }\n // 没有cacheTotal是普通节点绘制\n else {\n // 如果有离屏则先申请替换ctx\n let offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow;\n let offscreen = node.__calOffscreen(ctx, __computedStyle);\n if(offscreen) {\n ctx = offscreen.ctx;\n offscreenBlend = offscreen.offscreenBlend;\n offscreenMask = offscreen.offscreenMask;\n offscreenFilter = offscreen.offscreenFilter;\n offscreenOverflow = offscreen.offscreenOverflow;\n }\n // 节点自身渲染\n if(lastOpacity !== opacity) {\n ctx.globalAlpha = opacity;\n lastOpacity = opacity;\n }\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n node.render(renderMode, ctx, 0, 0);\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_BLEND, offscreen: offscreenBlend });\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n // 最后一个遮罩索引因数量不好计算,放在maskStartHash做\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = {\n idx: i,\n hasMask,\n offscreenMask,\n };\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_FILTER, offscreen: offscreenFilter });\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_OVERFLOW, offscreen: offscreenOverflow });\n }\n // 离屏应用,按照lv从大到小即子节点在前先应用,同一个节点多个效果按offscreen优先级从小到大来,\n // 由于mask特殊索引影响,所有离屏都在最后一个mask索引判断,此时mask本身优先结算,以index序大到小判断\n let oh = offscreenHash[i];\n if(oh) {\n ctx = applyOffscreen(ctx, oh, width, height, false);\n lastOpacity = -1;\n }\n }\n }\n }\n}\n\nexport default {\n renderCanvas,\n renderSvg,\n renderWebgl,\n};\n\n","export default {\n alpha: true,\n antialias: true,\n premultipliedAlpha: true,\n preserveDrawingBuffer: true,\n depth: true,\n // stencil: true,\n};\n","import Xom from './Xom';\nimport Dom from './Dom';\nimport Text from './Text';\nimport Component from './Component';\nimport Defs from './Defs';\nimport Geom from './geom/Geom';\nimport builder from './builder';\nimport util from '../util/util';\nimport domDiff from '../util/diff';\nimport unit from '../style/unit';\nimport geom from '../math/geom';\nimport enums from '../util/enums';\nimport inject from '../util/inject';\nimport Event from '../util/Event';\nimport frame from '../animate/frame';\nimport Controller from '../animate/Controller';\nimport mode from '../refresh/mode';\nimport change from '../refresh/change';\nimport level from '../refresh/level';\nimport struct from '../refresh/struct';\nimport reflow from '../refresh/reflow';\nimport webgl from '../gl/webgl';\nimport ca from '../gl/ca';\nimport vertex from '../gl/main.vert';\nimport fragment from '../gl/main.frag';\nimport vertexMask from '../gl/mask.vert';\nimport fragmentMask from '../gl/mask.frag';\nimport fragmentClip from '../gl/clip.frag';\nimport vertexOverflow from '../gl/overflow.vert';\nimport fragmentOverflow from '../gl/overflow.frag';\nimport vertexCm from '../gl/filter/cm.vert';\nimport fragmentCm from '../gl/filter/cm.frag';\nimport vertexDs from '../gl/filter/drops.vert'\nimport fragmentDs from '../gl/filter/drops.frag';\nimport vertexMbm from '../gl/mbm/mbm.vert';\nimport fragmentMultiply from '../gl/mbm/multiply.frag';\nimport fragmentScreen from '../gl/mbm/screen.frag';\nimport fragmentOverlay from '../gl/mbm/overlay.frag';\nimport fragmentDarken from '../gl/mbm/darken.frag';\nimport fragmentLighten from '../gl/mbm/lighten.frag';\nimport fragmentColorDodge from '../gl/mbm/color-dodge.frag';\nimport fragmentColorBurn from '../gl/mbm/color-burn.frag';\nimport fragmentHardLight from '../gl/mbm/hard-light.frag';\nimport fragmentSoftLight from '../gl/mbm/soft-light.frag';\nimport fragmentDifference from '../gl/mbm/difference.frag';\nimport fragmentExclusion from '../gl/mbm/exclusion.frag';\nimport fragmentHue from '../gl/mbm/hue.frag';\nimport fragmentSaturation from '../gl/mbm/saturation.frag';\nimport fragmentColor from '../gl/mbm/color.frag';\nimport fragmentLuminosity from '../gl/mbm/luminosity.frag';\nimport vertexSs from '../gl/ss.vert';\nimport fragmentSs from '../gl/ss.frag';\n\nconst {\n STYLE_KEY: {\n TOP,\n RIGHT,\n BOTTOM,\n LEFT,\n POSITION,\n DISPLAY,\n VISIBILITY,\n COLOR,\n WIDTH,\n HEIGHT,\n Z_INDEX,\n POINTER_EVENTS,\n WRITING_MODE,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n MATRIX,\n TRANSFORM,\n OPACITY,\n MIX_BLEND_MODE,\n },\n} = enums;\nconst { isNil, isFunction } = util;\nconst { PX, INHERIT } = unit;\nconst {\n getLevel,\n isRepaint,\n NONE,\n FILTER: FT,\n PERSPECTIVE: PPT,\n REPAINT,\n REFLOW,\n REBUILD,\n CACHE,\n TRANSFORM: TF,\n TRANSFORM_ALL,\n OPACITY: OP,\n MIX_BLEND_MODE: MBM,\n MASK,\n} = level;\nconst { isGeom } = change;\nconst { renderCanvas, renderSvg, renderWebgl } = struct;\n\nconst ROOT_DOM_NAME = {\n canvas: 'canvas',\n svg: 'svg',\n webgl: 'canvas',\n};\n\nfunction getDom(dom) {\n if(util.isString(dom) && dom) {\n let o = document.querySelector(dom);\n if(!o) {\n throw new Error('Can not find dom of selector: ' + dom);\n }\n return o;\n }\n if(!dom) {\n throw new Error('Can not find dom: ' + dom);\n }\n return dom;\n}\n\nfunction renderProp(k, v) {\n let s = Array.isArray(v) ? util.joinSourceArray(v) : util.stringify(v);\n if(k === 'className') {\n k = 'class';\n }\n else if(k === 'style') {\n return '';\n }\n return ' ' + k + '=\"' + util.encodeHtml(s, true) + '\"';\n}\n\nconst EVENT_LIST = ['click', 'dblclick', 'mousedown', 'mousemove', 'mouseup', 'touchstart', 'touchmove', 'touchend', 'touchcancel'];\n\nfunction initEvent(dom, Root) {\n let list = [];\n EVENT_LIST.forEach(type => {\n function cb(e) {\n let root = dom.__root;\n if(root && root instanceof Root) {\n if(['touchend', 'touchcancel', 'touchmove'].indexOf(type) > -1) {\n let target = root.__touchstartTarget;\n let event = root.__wrapEvent(e);\n event.target = target;\n while(target) {\n target.__emitEvent(event, null, true);\n target = target.__domParent;\n }\n }\n else {\n root.__cb(e);\n }\n }\n }\n dom.addEventListener(type, cb);\n list.push([type, cb]);\n });\n return list;\n}\n\nfunction removeEvent(dom, list) {\n list.forEach(item => {\n dom.removeEventListener(item[0], item[1]);\n });\n}\n\nlet uuid = 0;\n\nclass Root extends Dom {\n constructor(tagName, props, children) {\n super(tagName, props, children);\n this.__dom = null; // 真实DOM引用\n this.__mw = 0; // 记录最大宽高,防止尺寸变化清除不完全\n this.__mh = 0;\n // this.__scx = 1; // 默认缩放,css改变canvas/svg缩放后影响事件坐标,有值手动指定,否则自动计算\n // this.__scy = 1;\n this.__task = [];\n this.__ref = {};\n this.__animateController = new Controller();\n Event.mix(this);\n this.__uuid = uuid++;\n this.__rlv = REBUILD; // 每次刷新最大lv\n this.__lastUpdateP = null; // 每帧addUpdate都会向上检查,很多时候同级无需继续,第一次检查暂存parent对象\n builder.buildRoot(this, this.__children);\n }\n\n __initProps() {\n let w = this.props.width;\n if(!isNil(w)) {\n let value = parseFloat(w) || 0;\n if(value > 0) {\n this.__width = value;\n }\n }\n let h = this.props.height;\n if(!isNil(h)) {\n let value = parseFloat(h) || 0;\n if(value > 0) {\n this.__height = value;\n }\n }\n }\n\n __genHtml(domName) {\n let res = `<${domName}`;\n // 拼接处理属性\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n // 忽略事件\n if(!/^on[a-zA-Z]/.test(k)) {\n res += renderProp(k, v);\n }\n });\n res += `>`;\n return res;\n }\n\n __wrapEvent(e) {\n let x, y;\n // 触摸结束取消特殊没有touches\n if(['touchend', 'touchcancel'].indexOf(e.type) === -1) {\n let { dom, __scx, __scy } = this;\n let { x: x2, y: y2, left, top, width, height } = dom.getBoundingClientRect();\n x = x2 || left || 0;\n y = y2 || top || 0;\n let { clientX, clientY } = e.touches ? e.touches[0] : e;\n x = clientX - x;\n y = clientY - y;\n // 外边的scale影响元素事件响应,根据倍数计算真实的坐标,优先手动指定,否则自动计算\n if(!isNil(__scx)) {\n x /= __scx;\n }\n else {\n x *= this.__width / width;\n }\n if(!isNil(__scy)) {\n y /= __scy;\n }\n else {\n y *= this.__height / height;\n }\n }\n return {\n event: e,\n stopPropagation() {\n this.__stopPropagation = true;\n e.stopPropagation();\n },\n stopImmediatePropagation() {\n this.__stopPropagation = true;\n this.__stopImmediatePropagation = true;\n e.stopImmediatePropagation();\n },\n preventDefault() {\n e.preventDefault();\n },\n x,\n y,\n __hasEmitted: false,\n };\n }\n\n // 类似touchend/touchcancel/touchmove这种无需判断是否发生于元素上,直接响应\n __cb(e) {\n if(e.type === 'touchmove' && !this.__touchstartTarget) {\n return;\n }\n let data = this.__wrapEvent(e);\n this.__emitEvent(data, null, false);\n return data;\n }\n\n /**\n * 添加到真实Dom上,优先已存在的同名canvas/svg节点,没有则dom下生成新的\n * @param dom\n */\n appendTo(dom) {\n dom = getDom(dom);\n this.__isDestroyed = false;\n this.__initProps();\n let tagName = this.tagName;\n let domName = ROOT_DOM_NAME[tagName];\n // OffscreenCanvas兼容,包含worker的\n if(typeof window !== 'undefined' && window.OffscreenCanvas && (dom instanceof window.OffscreenCanvas)\n || typeof self !== 'undefined' && self.OffscreenCanvas && (dom instanceof self.OffscreenCanvas)) {\n this.__dom = dom;\n this.__width = dom.width;\n this.__height = dom.height;\n }\n // 已有root节点\n else if(dom.nodeName.toLowerCase() === domName) {\n this.__dom = dom;\n if(this.__width) {\n dom.setAttribute('width', this.__width);\n }\n if(this.__height) {\n dom.setAttribute('height', this.__height);\n }\n }\n // 没有canvas/svg节点则生成一个新的\n else {\n this.__dom = dom.querySelector(domName);\n if(!this.__dom) {\n dom.innerHTML = this.__genHtml(domName);\n this.__dom = dom.querySelector(domName);\n }\n }\n // 没有设置width/height则采用css计算形式\n if(!this.__width || !this.__height) {\n let domCss = window.getComputedStyle(dom, null);\n if(!this.__width) {\n this.__width = parseFloat(domCss.getPropertyValue('width')) || 0;\n dom.setAttribute('width', this.width);\n }\n if(!this.__height) {\n this.__height = parseFloat(domCss.getPropertyValue('height')) || 0;\n dom.setAttribute('height', this.height);\n }\n }\n // 最终无宽高给出警告\n if(!this.__width || !this.__height) {\n inject.warn('Karas render target with a width or height of 0.')\n }\n let params = Object.assign({}, ca, this.props.contextAttributes);\n // 只有canvas有ctx,svg用真实dom\n if(tagName === 'canvas') {\n this.__ctx = this.__dom.getContext('2d', params);\n this.__renderMode = mode.CANVAS;\n }\n else if(tagName === 'svg') {\n this.__defs = this.dom.__defs || Defs.getInstance(this.__uuid);\n this.__renderMode = mode.SVG;\n }\n else if(tagName === 'webgl') {\n // 优先手动指定,再自动判断,最后兜底\n let gl, webgl2 = this.props.webgl2;\n if(!isNil(webgl2)) {\n if(webgl2) {\n gl = this.__dom.getContext('webgl2', params);\n }\n if(!gl) {\n gl = this.__dom.getContext('webgl', params);\n }\n this.__ctx = gl;\n }\n else {\n gl = this.__ctx = this.__dom.getContext('webgl2', params)\n || this.__dom.getContext('webgl', params);\n }\n this.__initShader(gl);\n this.__renderMode = mode.WEBGL;\n }\n this.draw(true);\n // 第一次节点没有__root,渲染一次就有了才能diff\n if(this.__dom.__root && this.__dom.__root instanceof Root) {\n this.__dom.__root.destroy();\n }\n this.__eventCbList = initEvent(this.__dom, Root);\n this.__dom.__root = this;\n }\n\n __initShader(gl) {\n gl.program = webgl.initShaders(gl, vertex, fragment);\n gl.programMask = webgl.initShaders(gl, vertexMask, fragmentMask);\n gl.programClip = webgl.initShaders(gl, vertexMask, fragmentClip);\n gl.programOverflow = webgl.initShaders(gl, vertexOverflow, fragmentOverflow);\n gl.programCm = webgl.initShaders(gl, vertexCm, fragmentCm);\n gl.programDs = webgl.initShaders(gl, vertexDs, fragmentDs);\n gl.programMbmMp = webgl.initShaders(gl, vertexMbm, fragmentMultiply);\n gl.programMbmSr = webgl.initShaders(gl, vertexMbm, fragmentScreen);\n gl.programMbmOl = webgl.initShaders(gl, vertexMbm, fragmentOverlay);\n gl.programMbmDk = webgl.initShaders(gl, vertexMbm, fragmentDarken);\n gl.programMbmLt = webgl.initShaders(gl, vertexMbm, fragmentLighten);\n gl.programMbmCd = webgl.initShaders(gl, vertexMbm, fragmentColorDodge);\n gl.programMbmCb = webgl.initShaders(gl, vertexMbm, fragmentColorBurn);\n gl.programMbmHl = webgl.initShaders(gl, vertexMbm, fragmentHardLight);\n gl.programMbmSl = webgl.initShaders(gl, vertexMbm, fragmentSoftLight);\n gl.programMbmDf = webgl.initShaders(gl, vertexMbm, fragmentDifference);\n gl.programMbmEx = webgl.initShaders(gl, vertexMbm, fragmentExclusion);\n gl.programMbmHue = webgl.initShaders(gl, vertexMbm, fragmentHue);\n gl.programMbmSt = webgl.initShaders(gl, vertexMbm, fragmentSaturation);\n gl.programMbmCl = webgl.initShaders(gl, vertexMbm, fragmentColor);\n gl.programMbmLm = webgl.initShaders(gl, vertexMbm, fragmentLuminosity);\n gl.programSs = webgl.initShaders(gl, vertexSs, fragmentSs);\n gl.useProgram(gl.program);\n }\n\n __reLayout() {\n let {\n renderMode,\n width,\n height,\n } = this;\n this.__checkRoot(renderMode, width, height);\n let wm = this.__currentStyle[WRITING_MODE];\n let isUpright = wm.v && wm.v.indexOf('vertical') === 0;\n // 布局分为两步,普通流和定位流,互相递归\n this.__layout({\n x: 0,\n y: 0,\n w: width,\n h: height,\n isUpright,\n }, false, false, false);\n // 绝对布局需要从根开始保存相对坐标系的容器引用,并根据relative/absolute情况变更\n this.__layoutAbs(this, {\n x: 0,\n y: 0,\n w: width,\n h: height,\n isUpright,\n }, null);\n this.__structs = this.__structure(0, 0);\n }\n\n draw(isFirst) {\n let { isDestroyed, renderMode, ctx, defs } = this;\n if(isDestroyed) {\n return;\n }\n this.__lastUpdateP = null;\n // 首次递归测量整树的继承,后续更改各自更新机制做,防止每次整树遍历;root检查首次直接做,后续在checkUpdate()中插入\n if(isFirst) {\n this.__reLayout();\n }\n if(this.props.noRender) {\n return;\n }\n let rlv = this.__rlv;\n if(renderMode === mode.CANVAS) {\n this.__clearCanvas(ctx);\n renderCanvas(renderMode, ctx, this, isFirst, rlv);\n }\n // svg的特殊diff需要\n else if(renderMode === mode.SVG) {\n defs.clear();\n renderSvg(renderMode, defs, this, isFirst, rlv);\n let nvd = this.virtualDom;\n nvd.defs = defs.value;\n let dom = this.__dom;\n if(dom.__vd) {\n // console.log(this.dom.__vd);\n // console.log(nvd);\n domDiff(dom, dom.__vd, nvd);\n }\n else {\n dom.innerHTML = util.joinVirtualDom(nvd);\n }\n dom.__vd = nvd;\n dom.__defs = defs;\n }\n else if(renderMode === mode.WEBGL) {\n this.__clearWebgl(ctx);\n renderWebgl(renderMode, ctx, this, isFirst, rlv);\n }\n this.emit(Event.REFRESH, rlv);\n this.__rlv = NONE;\n }\n\n destroy() {\n this.__destroy();\n this.__animateController.__destroy();\n let n = this.dom;\n if(n) {\n removeEvent(n, this.__eventCbList || []);\n n.__root = null;\n }\n let gl = this.ctx;\n if(this.renderMode === mode.WEBGL) {\n [\n 'program',\n 'programMask',\n 'programClip',\n 'programOverflow',\n 'programCm',\n 'programDs',\n 'programMbmMp',\n 'programMbmSr',\n 'programMbmOl',\n 'programMbmDk',\n 'programMbmLt',\n 'programMbmCd',\n 'programMbmCb',\n 'programMbmHl',\n 'programMbmSl',\n 'programMbmDf',\n 'programMbmEx',\n 'programMbmHue',\n 'programMbmSt',\n 'programMbmCl',\n 'programMbmLm',\n ].forEach(k => {\n let p = gl[k];\n gl.deleteShader(p.vertexShader);\n gl.deleteShader(p.fragmentShader);\n gl.deleteProgram(p);\n });\n for(let i in gl) {\n if(i.indexOf('programBlur,') === 0) {\n let p = gl[i];\n gl.deleteShader(p.vertexShader);\n gl.deleteShader(p.fragmentShader);\n gl.deleteProgram(p);\n }\n }\n }\n }\n\n scale(x = 1, y = x) {\n this.__scx = x;\n this.__scy = y;\n }\n\n resize(w, h, cb) {\n let self = this;\n if(w !== self.width || h !== self.height) {\n self.__width = w;\n self.__height = h;\n self.updateStyle({\n width: w,\n height: h,\n }, cb);\n }\n else if(isFunction(cb)) {\n cb(-1);\n }\n }\n\n getTargetAtPoint(x, y, includeIgnore) {\n function scan(vd, x, y, path, zPath) {\n let { __x1, __y1, offsetWidth, offsetHeight, matrixEvent, children, zIndexChildren,\n computedStyle: { [DISPLAY]: display, [POINTER_EVENTS]: pointerEvents } } = vd;\n if(!includeIgnore && display === 'none') {\n return;\n }\n if(Array.isArray(zIndexChildren)) {\n for(let i = 0, len = children.length; i < len; i++) {\n children[i].__index__ = i;\n }\n for(let i = zIndexChildren.length - 1; i >= 0; i--) {\n let item = zIndexChildren[i];\n if(item instanceof karas.Text) {\n continue;\n }\n let path2 = path.slice();\n path2.push(item.__index__);\n let zPath2 = zPath.slice();\n zPath2.push(i);\n let res = scan(item, x, y, path2, zPath2);\n if(res) {\n return res;\n }\n }\n }\n if(!includeIgnore && pointerEvents === 'none') {\n return;\n }\n let inThis = geom.pointInQuadrilateral(\n x, y,\n __x1, __y1,\n __x1 + offsetWidth, __y1,\n __x1 + offsetWidth, __y1 + offsetHeight,\n __x1, __y1 + offsetHeight,\n matrixEvent\n );\n if(inThis) {\n return {\n target: vd,\n path,\n zPath,\n };\n }\n }\n return scan(this, x, y, [], []);\n }\n\n /**\n * 每次刷新前检查root节点的样式,有些固定的修改无效,有些继承的作为根初始化\n * @param renderMode\n * @param width\n * @param height\n * @private\n */\n __checkRoot(renderMode, width, height) {\n let { dom, currentStyle, computedStyle } = this;\n // canvas/svg作为根节点一定是block或flex,不会是inline\n if(['flex', 'block'].indexOf(currentStyle[DISPLAY]) === -1) {\n computedStyle[DISPLAY] = currentStyle[DISPLAY] = 'block';\n }\n // 同理position不能为absolute\n if(currentStyle[POSITION] === 'absolute') {\n computedStyle[POSITION] = currentStyle[POSITION] = 'static';\n }\n // 根节点满宽高\n currentStyle[WIDTH] = { v: width, u: PX };\n currentStyle[HEIGHT] = { v: height, u: PX };\n computedStyle[WIDTH] = width;\n computedStyle[HEIGHT] = height;\n // 可能调用resize()导致变更,要重设,canvas无论离屏与否都可使用直接赋值,svg则按dom属性api\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(dom.width !== width) {\n dom.width = width;\n }\n if(dom.height !== height) {\n dom.height = height;\n }\n }\n else if(renderMode === mode.SVG) {\n dom.setAttribute('width', width);\n dom.setAttribute('height', height);\n }\n }\n\n /**\n * 添加更新,分析repaint/reflow和上下影响,异步刷新\n */\n __addUpdate(node, keys, focus, addDom, removeDom, aniParams, cb) {\n if(node instanceof Component) {\n node = node.shadowRoot;\n }\n let {\n __computedStyle: computedStyle,\n __currentStyle: currentStyle,\n __cacheStyle: cacheStyle,\n __cacheProps,\n __mask,\n __domParent,\n } = node;\n let hasZ, hasVisibility, hasColor, hasDisplay, hasTsColor, hasTsWidth, hasTsOver;\n // 可能无keys但有aniParams,多防御一下,比如steps动画\n let lv = focus || (aniParams && keys && keys.length ? aniParams.lv : NONE);\n // 清空对应改变的cacheStyle\n if(keys) {\n if(aniParams) {\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n cacheStyle[k] = undefined;\n }\n hasZ = aniParams.hasZ;\n hasColor = aniParams.hasColor;\n hasTsColor = aniParams.hasTsColor;\n hasTsWidth = aniParams.hasTsWidth;\n hasTsOver = aniParams.hasTsOver;\n }\n else {\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n if(node instanceof Geom && isGeom(node.tagName, k)) {\n lv |= REPAINT;\n __cacheProps[k] = undefined;\n }\n else {\n // repaint置空,如果reflow会重新生成空的\n cacheStyle[k] = undefined;\n // TRBL变化只对relative/absolute起作用,其它忽视\n if((k === TOP || k === RIGHT || k === BOTTOM || k === LEFT)\n && ['relative', 'absolute'].indexOf(computedStyle[POSITION]) === -1) {\n continue;\n }\n // 细化等级\n lv |= getLevel(k);\n if(k === DISPLAY) {\n hasDisplay = true;\n }\n else if(k === Z_INDEX) {\n hasZ = node !== this && ['relative', 'absolute'].indexOf(computedStyle[POSITION]) > -1;\n }\n else if(k === VISIBILITY) {\n hasVisibility = true;\n }\n else if(k === COLOR) {\n hasColor = true;\n }\n else if(k === TEXT_STROKE_COLOR) {\n hasTsColor = true;\n }\n else if(k === TEXT_STROKE_WIDTH) {\n hasTsWidth = true;\n }\n else if(k === TEXT_STROKE_OVER) {\n hasTsOver = true;\n }\n }\n }\n }\n }\n // 没有变化,add/remove强制focus\n // 本身节点为none,变更无效,此时没有display变化,add/remove在操作时已经判断不会进入\n if(lv === NONE || computedStyle[DISPLAY] === 'none' && !hasDisplay) {\n if(cb && isFunction(cb)) {\n cb();\n }\n return;\n }\n // transform变化清空重算,比较特殊,MATRIX的cache需手动清理\n if(lv & TF) {\n cacheStyle[MATRIX] = computedStyle[TRANSFORM] = undefined;\n }\n // mask需清除遮罩对象的缓存\n let hasRelease, hasMask = lv & MASK;\n if(__mask || hasMask) {\n let prev = node.__prev;\n while(prev && (prev.__mask)) {\n prev = prev.__prev;\n }\n if(prev && (prev instanceof Xom || prev instanceof Component && prev.shadowRoot instanceof Xom)) {\n prev.__refreshLevel |= CACHE | MASK;\n prev.__struct.hasMask = prev.__hasMask = __mask;\n if(prev.__cacheMask) {\n hasRelease = prev.__cacheMask.release() || hasRelease;\n }\n }\n }\n // aniParams在动画引擎提前计算好了\n let isRp = aniParams && aniParams.isRepaint || isRepaint(lv);\n if(isRp) {\n // dom在>=REPAINT时total失效,svg的Geom比较特殊\n let need = lv >= REPAINT;\n if(need) {\n if(node.__cache) {\n hasRelease = node.__cache.release() || hasRelease;\n }\n node.__calStyle(lv, currentStyle, computedStyle, cacheStyle);\n node.__calPerspective(currentStyle, computedStyle, cacheStyle);\n }\n // < REPAINT特殊的优化computedStyle计算\n else {\n if(lv & PPT) {\n node.__calPerspective(currentStyle, computedStyle, cacheStyle);\n }\n if(lv & TRANSFORM_ALL) {\n node.__calMatrix(lv, currentStyle, computedStyle, cacheStyle, aniParams && aniParams.optimize);\n }\n if(lv & OP) {\n computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n if(lv & FT) {\n node.__calFilter(currentStyle, computedStyle, cacheStyle);\n }\n if(lv & MBM) {\n computedStyle[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE];\n }\n }\n // 影响子继承REPAINT的变化,如果被cache住需要清除\n if(hasVisibility || hasColor || hasTsColor || hasTsWidth || hasTsOver) {\n for(let __structs = this.__structs,\n __struct = node.__struct,\n i = __structs.indexOf(__struct) + 1,\n len = i + (__struct.total || 0); i < len; i++) {\n let {\n node,\n total,\n } = __structs[i];\n // text的style指向parent,不用管\n if(node instanceof Text) {\n continue;\n }\n let currentStyle = node.__currentStyle, cacheStyle = node.__cacheStyle;\n let need;\n if(hasVisibility && currentStyle[VISIBILITY].u === INHERIT) {\n need = true;\n cacheStyle[VISIBILITY] = undefined;\n }\n else if(hasColor && currentStyle[COLOR].u === INHERIT) {\n need = true;\n cacheStyle[COLOR] = undefined;\n }\n else if(hasTsColor && currentStyle[TEXT_STROKE_COLOR].u === INHERIT) {\n need = true;\n cacheStyle[TEXT_STROKE_COLOR] = undefined;\n }\n else if(hasTsWidth && currentStyle[TEXT_STROKE_WIDTH].u === INHERIT) {\n need = true;\n cacheStyle[TEXT_STROKE_WIDTH] = undefined;\n }\n else if(hasTsOver && currentStyle[TEXT_STROKE_OVER].u === INHERIT) {\n need = true;\n cacheStyle[TEXT_STROKE_OVER] = undefined;\n }\n if(need) {\n node.__refreshLevel |= REPAINT;\n node.clearCache();\n node.__calStyle(REPAINT, currentStyle, node.__computedStyle, cacheStyle);\n }\n // 不为inherit此子树可跳过,因为不影响\n else {\n i += total || 0;\n }\n }\n }\n // perspective也特殊只清空total的cache,和>=REPAINT清空total共用\n if(need || (lv & PPT)) {\n if(node.__cacheTotal) {\n hasRelease = node.__cacheTotal.release() || hasRelease;\n }\n }\n // mask无论如何都要清除,除非是opacity\n if(node.__hasMask) {\n if(need || (lv ^ OP)) {\n if(node.__cacheMask) {\n hasRelease = node.__cacheMask.release() || hasRelease;\n }\n if(node.__cacheFilter) {\n hasRelease = node.__cacheFilter.release() || hasRelease;\n }\n }\n }\n // 特殊的filter清除cache\n else if((need || (lv & FT)) && node.__cacheFilter) {\n hasRelease = node.__cacheFilter.release() || hasRelease;\n }\n // 向上清除cache汇总缓存信息,过程中可能会出现重复,根据refreshLevel判断,reflow已经自己清过了\n if(__domParent !== this.__lastUpdateP) {\n let p = __domParent;\n this.__lastUpdateP = p; // 同层级避免重复进入查找,每次draw()重设\n while(p) {\n if(p.__refreshLevel & (CACHE | REPAINT | REFLOW)) {\n break;\n }\n p.__refreshLevel |= CACHE;\n if(p.__cacheTotal) {\n hasRelease = p.__cacheTotal.release() || hasRelease;\n }\n if(p.__cacheFilter) {\n hasRelease = p.__cacheFilter.release() || hasRelease;\n }\n if(p.__cacheMask) {\n hasRelease = p.__cacheMask.release() || hasRelease;\n }\n p = p.__domParent;\n }\n // 清除parent的zIndexChildren缓存,强制所有孩子重新渲染\n if(hasZ && __domParent) {\n __domParent.__zIndexChildren = null;\n __domParent.__updateStruct();\n if(this.__renderMode === mode.SVG) {\n hasRelease = node.__cacheTotal.release() || hasRelease;\n reflow.clearSvgCache(__domParent);\n }\n }\n }\n }\n else {\n let top = reflow.checkTop(this, node, addDom, removeDom);\n if(top === this) {\n this.__reLayout();\n }\n // 布局影响next的所有节点,重新layout的w/h数据使用之前parent暂存的,x使用parent,y使用prev或者parent的\n else {\n reflow.checkNext(this, top, node, hasZ, addDom, removeDom);\n }\n if(removeDom) {\n let temp = node;\n while(temp.isShadowRoot) {\n temp = temp.__host;\n temp.__destroy();\n }\n node.__destroy();\n }\n }\n node.__refreshLevel |= lv;\n // 有被清除的cache则设置到Root上\n if(hasRelease) {\n lv |= CACHE;\n }\n if(addDom || removeDom) {\n this.__rlv |= REBUILD;\n }\n else {\n this.__rlv |= lv;\n }\n if(cb && !isFunction(cb)) {\n cb = null;\n }\n this.__frameDraw(cb);\n }\n\n // 异步进行root刷新操作,多次调用缓存结果,刷新成功后回调\n __frameDraw(cb) {\n if(!this.__task.length) {\n frame.nextFrame(() => {\n });\n frame.__rootTask.push(() => {\n // 需要先获得累积的刷新回调再刷新,防止refresh触发事件中再次调用刷新\n let list = this.__task.splice(0);\n this.draw(false);\n list.forEach(item => {\n item && item();\n });\n });\n this.__task.push(cb);\n }\n else if(cb) {\n this.__task.push(cb);\n }\n }\n\n __clearCanvas(ctx) {\n // 可能会调整宽高,所以每次清除用最大值\n this.__mw = Math.max(this.__mw, this.width);\n this.__mh = Math.max(this.__mh, this.height);\n // 清除前得恢复默认matrix,防止每次布局改变了属性\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, this.__mw, this.__mh);\n }\n\n __clearWebgl(ctx) {\n ctx.clearColor(0, 0, 0, 0);\n ctx.clear(ctx.COLOR_BUFFER_BIT);\n }\n\n get dom() {\n return this.__dom;\n }\n\n get uuid() {\n return this.__uuid;\n }\n\n get renderMode() {\n return this.__renderMode;\n }\n\n get ctx() {\n return this.__ctx;\n }\n\n get defs() {\n return this.__defs;\n }\n\n get ref() {\n return this.__ref;\n }\n\n get animateController() {\n return this.__animateController;\n }\n}\n\nexport default Root;\n","import equation from './equation';\n\n/**\n * 二阶贝塞尔曲线范围框\n * @param x0\n * @param y0\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n * @returns {number[]}\n * https://www.iquilezles.org/www/articles/bezierbbox/bezierbbox.htm\n */\nfunction bboxBezier2(x0, y0, x1, y1, x2, y2) {\n let minX = Math.min(x0, x2);\n let minY = Math.min(y0, y2);\n let maxX = Math.max(x0, x2);\n let maxY = Math.max(y0, y2);\n // 控制点位于边界内部时,边界就是范围框,否则计算导数获取极值\n if(x1 < minX || y1 < minY || x1 > maxX || y1 > maxY) {\n let tx = (x0 - x1) / (x0 - 2 * x1 + x2);\n if(tx < 0) {\n tx = 0;\n }\n else if(tx > 1) {\n tx = 1;\n }\n let ty = (y0 - y1) / (y0 - 2 * y1 + y2);\n if(ty < 0) {\n ty = 0;\n }\n else if(ty > 1) {\n ty = 1;\n }\n let sx = 1 - tx;\n let sy = 1 - ty;\n let qx = sx * sx * x0 + 2 * sx * tx * x1 + tx * tx * x2;\n let qy = sy * sy * y0 + 2 * sy * ty * y1 + ty * ty * y2;\n minX = Math.min(minX, qx);\n minY = Math.min(minY, qy);\n maxX = Math.max(maxX, qx);\n maxY = Math.max(maxY, qy);\n }\n return [minX, minY, maxX, maxY];\n}\n\n/**\n * 同上三阶的\n */\nfunction bboxBezier3(x0, y0, x1, y1, x2, y2, x3, y3) {\n let minX = Math.min(x0, x3);\n let minY = Math.min(y0, y3);\n let maxX = Math.max(x0, x3);\n let maxY = Math.max(y0, y3);\n if(x1 < minX || y1 < minY || x1 > maxX || y1 > maxY || x2 < minX || y2 < minY || x2 > maxX || y2 > maxY) {\n let cx = -x0 + x1;\n let cy = -y0 + y1;\n let bx = x0 - 2 * x1 + x2;\n let by = y0 - 2 * y1 + y2;\n let ax = -x0 + 3 * x1 - 3 * x2 + x3;\n let ay = -y0 + 3 * y1 - 3 * y2 + y3;\n let hx = bx * bx - ax * cx;\n let hy = by * by - ay * cy;\n if(hx > 0) {\n hx = Math.sqrt(hx);\n let t = (-bx - hx) / ax;\n // 2次项系数为0注意降级为一元一次方程\n if(ax && t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * x0 + 3 * s * s * t * x1 + 3 * s * t * t * x2 + t * t * t * x3;\n minX = Math.min(minX, q);\n maxX = Math.max(maxX, q);\n }\n t = ax ? ((-bx + hx) / ax) : (-cx * 0.5 / bx);\n if(t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * x0 + 3 * s * s * t * x1 + 3 * s * t * t * x2 + t * t * t * x3;\n minX = Math.min(minX, q);\n maxX = Math.max(maxX, q);\n }\n }\n if(hy > 0) {\n hy = Math.sqrt(hy);\n let t = (-by - hy) / ay;\n if(ay && t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * y0 + 3 * s * s * t * y1 + 3 * s * t * t * y2 + t * t * t * y3;\n minY = Math.min(minY, q);\n maxY = Math.max(maxY, q);\n }\n t = ay ? ((-by + hy) / ay) : (-cy * 0.5 / by);\n if(t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * y0 + 3 * s * s * t * y1 + 3 * s * t * t * y2 + t * t * t * y3;\n minY = Math.min(minY, q);\n maxY = Math.max(maxY, q);\n }\n }\n }\n return [minX, minY, maxX, maxY];\n}\n\nfunction bboxBezier(x0, y0, x1, y1, x2, y2, x3, y3) {\n let len = arguments.length;\n if(Array.isArray(x0)) {\n let l = x0.length;\n let arr = x0;\n [x0, y0] = arr[0];\n [x1, y1] = arr[1];\n len = 4;\n if(l >= 3) {\n [x2, y2] = arr[2];\n len = 6;\n }\n if(l >= 4) {\n [x3, y3] = arr[3];\n len = 8;\n }\n }\n if(len === 4) {\n let a = Math.min(x0, x1);\n let b = Math.min(y0, y1);\n let c = Math.max(x0, x1);\n let d = Math.max(y0, y1);\n return [a, b, c, d];\n }\n if(len === 6) {\n return bboxBezier2(x0, y0, x1, y1, x2, y2);\n }\n if(len === 8) {\n return bboxBezier3(x0, y0, x1, y1, x2, y2, x3, y3);\n }\n}\n\n\n/**\n * 范数 or 模\n */\nfunction norm(v) {\n let order = v.length;\n let sum = v.reduce((a, b) => Math.pow(a, order) + Math.pow(b, order));\n return Math.pow(sum, 1 / order);\n}\n\n// https://zhuanlan.zhihu.com/p/130247362\nfunction simpson38(derivativeFunc, l, r) {\n let f = derivativeFunc;\n let middleL = (2 * l + r) / 3;\n let middleR = (l + 2 * r) / 3;\n return (f(l) + 3 * f(middleL) + 3 * f(middleR) + f(r)) * (r - l) / 8;\n}\n\n/**\n * bezier 曲线的长度\n * @param derivativeFunc 微分函数\n * @param l 左点\n * @param r 右点\n * @param eps 精度\n * @return {*} number\n */\nfunction adaptiveSimpson38(derivativeFunc, l, r, eps = 0.001) {\n let f = derivativeFunc;\n let mid = (l + r) / 2;\n let st = simpson38(f, l, r);\n let sl = simpson38(f, l, mid);\n let sr = simpson38(f, mid, r);\n let ans = sl + sr - st;\n if(Math.abs(ans) <= 15 * eps) {\n return sl + sr + ans / 15;\n }\n return adaptiveSimpson38(f, l, mid, eps / 2) + adaptiveSimpson38(f, mid, r, eps / 2);\n}\n\n/**\n * bezier 曲线的长度\n * @param points 曲线的起止点 和 控制点\n * @param startT 计算长度的起点,满足 0 <= startT <= endT <= 1\n * @param endT 计算长度的终点\n * @return {*} number\n */\nfunction bezierLength(points, startT = 0, endT = 1) {\n if(points.length === 6) {\n points = [\n [points[0], points[1]],\n [points[2], points[3]],\n [points[4], points[5]],\n ];\n }\n else if(points.length === 8) {\n points = [\n [points[0], points[1]],\n [points[2], points[3]],\n [points[4], points[5]],\n [points[6], points[7]],\n ];\n }\n if(points.length === 2) {\n let [x1, y1] = points[0], [x2, y2] = points[1];\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n }\n let derivativeFunc = t => norm(at(t, points));\n return adaptiveSimpson38(derivativeFunc, startT, endT);\n}\n\n/**\n * 3 阶 bezier 曲线的 order 阶导数在 t 位置时候的 (x, y) 的值\n */\nfunction at3(t, points, order = 1) {\n let [p0, p1, p2, p3] = points;\n let [x0, y0] = p0;\n let [x1, y1] = p1;\n let [x2, y2] = p2;\n let [x3, y3] = p3;\n let x = 0;\n let y = 0;\n // 3阶导数就是常数了,大于3阶的都是0\n if(order === 0) {\n x = Math.pow((1 - t), 3) * x0 + 3 * t * Math.pow((1 - t), 2) * x1 + 3 * (1 - t) * Math.pow(t, 2) * x2 + Math.pow(t, 3) * x3;\n y = Math.pow((1 - t), 3) * y0 + 3 * t * Math.pow((1 - t), 2) * y1 + 3 * (1 - t) * Math.pow(t, 2) * y2 + Math.pow(t, 3) * y3;\n }\n else if(order === 1) {\n x = 3 * ((1 - t) * (1 - t) * (x1 - x0) + 2 * (1 - t) * t * (x2 - x1) + t * t * (x3 - x2));\n y = 3 * ((1 - t) * (1 - t) * (y1 - y0) + 2 * (1 - t) * t * (y2 - y1) + t * t * (y3 - y2));\n }\n else if(order === 2) {\n x = 6 * (x2 - 2 * x1 + x0) * (1 - t) + 6 * (x3 - 2 * x2 + x1) * t;\n y = 6 * (y2 - 2 * y1 + y0) * (1 - t) + 6 * (y3 - 2 * y2 + y1) * t;\n }\n else if(order === 3) {\n x = 6 * (x3 - 3 * x2 + 3 * x1 - x0);\n y = 6 * (y3 - 3 * y2 + 3 * y1 - y0);\n }\n return [x, y];\n}\n\n/**\n * 2 阶 bezier 曲线的 order 阶导数在 t 位置时候的 (x, y) 的值\n */\nfunction at2(t, points, order = 1) {\n let [p0, p1, p2] = points;\n let [x0, y0] = p0;\n let [x1, y1] = p1;\n let [x2, y2] = p2;\n let x = 0;\n let y = 0;\n if(order === 0) {\n x = Math.pow((1 - t), 2) * x0 + 2 * t * (1 - t) * x1 + Math.pow(t, 2) * x2;\n y = Math.pow((1 - t), 2) * y0 + 2 * t * (1 - t) * y1 + Math.pow(t, 2) * y2;\n }\n else if(order === 1) {\n x = 2 * (1 - t) * (x1 - x0) + 2 * t * (x2 - x1);\n y = 2 * (1 - t) * (y1 - y0) + 2 * t * (y2 - y1);\n }\n else if(order === 2) {\n x = 2 * (x2 - 2 * x1 + x0);\n y = 2 * (y2 - 2 * y1 + y0);\n }\n return [x, y];\n}\n\nfunction at(t, points, derivativeOrder = 1) {\n if(points.length === 4) {\n return at3(t, points, derivativeOrder);\n }\n else if(points.length === 3) {\n return at2(t, points, derivativeOrder);\n }\n}\n\nfunction pointAtBezier(points, percent, maxIteration, eps) {\n let length = bezierLength(points, 0, 1);\n return pointAtBezierWithLength(points, length, percent, maxIteration, eps);\n}\n\nfunction pointAtBezierWithLength(points, length, percent = 1, maxIteration = 20, eps = 0.001) {\n let derivativeFunc = t => norm(at(t, points));\n let targetLen = length * percent;\n let approachLen = length;\n let approachT = percent;\n let preApproachT = approachT;\n for(let i = 0; i < maxIteration; i++) {\n approachLen = simpson38(derivativeFunc, 0, approachT);\n let d = approachLen - targetLen;\n if(Math.abs(d) < eps) {\n break;\n }\n // Newton 法\n let derivative1 = norm(at(approachT, points, 1)); // 1 阶导数\n let derivative2 = norm(at(approachT, points, 2)); // 2 阶导数\n let numerator = d * derivative1;\n let denominator = d * derivative2 + derivative1 * derivative1;\n approachT = approachT - numerator / denominator;\n if(Math.abs(approachT - preApproachT) < eps) {\n break;\n }\n else {\n preApproachT = approachT;\n }\n }\n return at(approachT, points, 0);\n}\n\nfunction sliceBezier(points, t) {\n let [[x1, y1], [x2, y2], [x3, y3], p4] = points;\n let x12 = (x2 - x1) * t + x1;\n let y12 = (y2 - y1) * t + y1;\n let x23 = (x3 - x2) * t + x2;\n let y23 = (y3 - y2) * t + y2;\n let x123 = (x23 - x12) * t + x12;\n let y123 = (y23 - y12) * t + y12;\n if(points.length === 4) {\n let [x4, y4] = p4;\n let x34 = (x4 - x3) * t + x3;\n let y34 = (y4 - y3) * t + y3;\n let x234 = (x34 - x23) * t + x23;\n let y234 = (y34 - y23) * t + y23;\n let x1234 = (x234 - x123) * t + x123;\n let y1234 = (y234 - y123) * t + y123;\n return [[x1, y1], [x12, y12], [x123, y123], [x1234, y1234]];\n }\n else if(points.length === 3) {\n return [[x1, y1], [x12, y12], [x123, y123]];\n }\n}\n\nfunction sliceBezier2Both(points, start = 0, end = 1) {\n start = Math.max(start, 0);\n end = Math.min(end, 1);\n if(start === 0 && end === 1) {\n return points;\n }\n if(end < 1) {\n points = sliceBezier(points, end);\n }\n if(start > 0) {\n if(end < 1) {\n start = start / end;\n }\n points = sliceBezier(points.slice(0).reverse(), (1 - start)).reverse();\n }\n return points;\n}\n\nfunction pointAtByT(points, t = 0) {\n if(points.length === 4) {\n return pointAtByT3(points, t);\n }\n else if(points.length === 3) {\n return pointAtByT2(points, t);\n }\n}\n\nfunction pointAtByT2(points, t) {\n let x = points[0][0] * (1 - t) * (1 - t)\n + 2 * points[1][0] * t * (1 - t)\n + points[2][0] * t * t;\n let y = points[0][1] * (1 - t) * (1 - t)\n + 2 * points[1][1] * t * (1 - t)\n + points[2][1] * t * t;\n return [x, y];\n}\n\nfunction pointAtByT3(points, t) {\n let x = points[0][0] * (1 - t) * (1 - t) * (1 - t)\n + 3 * points[1][0] * t * (1 - t) * (1 - t)\n + 3 * points[2][0] * t * t * (1 - t)\n + points[3][0] * t * t * t;\n let y = points[0][1] * (1 - t) * (1 - t) * (1 - t)\n + 3 * points[1][1] * t * (1 - t) * (1 - t)\n + 3 * points[2][1] * t * t * (1 - t)\n + points[3][1] * t * t * t;\n return [x, y];\n}\n\n// 已知曲线和上面一点获得t\nfunction getPointT(points, x, y) {\n if(points.length === 4) {\n return getPointT3(points, x, y);\n }\n else if(points.length === 3) {\n return getPointT2(points, x, y);\n }\n}\n\nfunction getPointT2(points, x, y) {\n // x/y都需要求,以免其中一个无解,过滤掉[0, 1]之外的\n let tx = equation.getRoots([\n points[0][0] - x,\n 2 * (points[1][0] - points[0][0]),\n points[2][0] + points[0][0] - 2 * points[1][0],\n ]).filter(i => i >= 0 && i <= 1);\n let ty = equation.getRoots([\n points[0][1] - y,\n 2 * (points[1][1] - points[0][1]),\n points[2][1] + points[0][1] - 2 * points[1][1],\n ]).filter(i => i >= 0 && i <= 1);\n // 可能有多个解,x和y要匹配上,这里最多x和y各2个总共4个解\n let t = [];\n for(let i = 0, len = tx.length; i < len; i++) {\n let x = tx[i];\n for(let j = 0, len = ty.length; j < len; j++) {\n let y = ty[j];\n let diff = Math.abs(x - y);\n // 必须小于一定误差\n if(diff < 1e-10) {\n t.push({\n x,\n y,\n diff,\n });\n }\n }\n }\n t.sort(function(a, b) {\n return a.diff - b.diff;\n });\n if(t.length > 2) {\n t.splice(2);\n }\n // 取均数\n t = t.map(item => (item.x + item.y) * 0.5);\n let res = [];\n t.forEach(t => {\n let xt = points[0][0] * Math.pow(1 - t, 2)\n + 2 * points[1][0] * t * (1 - t)\n + points[2][0] * t * t;\n let yt = points[0][1] * Math.pow(1 - t, 2)\n + 2 * points[1][1] * t * (1 - t)\n + points[2][1] * t * t;\n // 计算误差忽略\n if(Math.abs(xt - x) < 1e-10 && Math.abs(yt - y) < 1e-10) {\n res.push(t);\n }\n });\n return res;\n}\n\nfunction getPointT3(points, x, y) {\n let tx = equation.getRoots([\n points[0][0] - x,\n 3 * (points[1][0] - points[0][0]),\n 3 * (points[2][0] + points[0][0] - 2 * points[1][0]),\n points[3][0] - points[0][0] + 3 * points[1][0] - 3 * points[2][0],\n ]).filter(i => i >= 0 && i <= 1);\n let ty = equation.getRoots([\n points[0][1] - y,\n 3 * (points[1][1] - points[0][1]),\n 3 * (points[2][1] + points[0][1] - 2 * points[1][1]),\n points[3][1] - points[0][1] + 3 * points[1][1] - 3 * points[2][1],\n ]).filter(i => i >= 0 && i <= 1);\n // 可能有多个解,x和y要匹配上,这里最多x和y各3个总共9个解\n let t = [];\n for(let i = 0, len = tx.length; i < len; i++) {\n let x = tx[i];\n for(let j = 0, len = ty.length; j < len; j++) {\n let y = ty[j];\n let diff = Math.abs(x - y);\n // 必须小于一定误差\n if(diff < 1e-10) {\n t.push({\n x,\n y,\n diff,\n });\n }\n }\n }\n t.sort(function(a, b) {\n return a.diff - b.diff;\n });\n if(t.length > 3) {\n t.splice(3);\n }\n // 取均数\n t = t.map(item => (item.x + item.y) * 0.5);\n let res = [];\n t.forEach(t => {\n let xt = points[0][0] * Math.pow(1 - t, 3)\n + 3 * points[1][0] * t * Math.pow(1 - t, 2)\n + 3 * points[2][0] * t * t * (1 - t)\n + points[3][0] * Math.pow(t, 3);\n let yt = points[0][1] * Math.pow(1 - t, 3)\n + 3 * points[1][1] * t * Math.pow(1 - t, 2)\n + 3 * points[2][1] * t * t * (1 - t)\n + points[3][1] * Math.pow(t, 3);\n // 计算误差忽略\n if(Math.abs(xt - x) < 1e-10 && Math.abs(yt - y) < 1e-10) {\n res.push(t);\n }\n });\n return res;\n}\n\nfunction bezierSlope(points, t) {\n if(points.length === 2) {\n let [x1, y1] = points[0];\n let [x2, y2] = points[1];\n if(x1 === x2) {\n return Infinity;\n }\n return (y2 - y1) / (x2 - x1);\n }\n if(points.length === 3) {\n return bezier2Slope(points, t);\n }\n if(points.length === 4) {\n return bezier3Slope(points, t);\n }\n}\n\nfunction bezier2Slope(points, t) {\n let [\n [x0, y0],\n [x1, y1],\n [x2, y2],\n ] = points;\n let x = 2 * (x0 - 2 * x1 + x2) * t + 2 * x1 - 2 * x0;\n if(x === 0) {\n return Infinity;\n }\n return (2 * (y0 - 2 * y1 + y2) * t + 2 * y1 - 2 * y0) / x;\n}\n\nfunction bezier3Slope(points, t) {\n let [\n [x0, y0],\n [x1, y1],\n [x2, y2],\n [x3, y3],\n ] = points;\n let x = 3 * (-x0 + 3 * x1 - 3 * x2 + x3) * t * t\n + 2 * (3 * x0 - 6 * x1 + 3 * x2) * t\n + 3 * x1 - 3 * x0;\n if(x === 0) {\n return Infinity;\n }\n return (3 * (-y0 + 3 * y1 - 3 * y2 + y3) * t * t\n + 2 * (3 * y0 - 6 * y1 + 3 * y2) * t\n + 3 * y1 - 3 * y0) / x;\n}\n\nexport default {\n bboxBezier,\n bezierLength,\n pointAtBezier,\n pointAtBezierWithLength,\n sliceBezier,\n sliceBezier2Both,\n pointAtByT,\n getPointT,\n bezierSlope,\n};\n","import Geom from './Geom';\nimport mode from '../../refresh/mode';\nimport painter from '../../util/painter';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport bezier from '../../math/bezier';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n} } = enums;\nconst { isNil } = util;\n\nfunction reBuild(target, origin, base, isMulti) {\n if(isMulti) {\n return target.map(item => origin + item * base);\n }\n else {\n return origin + target * base;\n }\n}\n\nfunction reBuildC(target, originX, originY, width, height, isMulti) {\n if(isMulti) {\n if(target) {\n return target.map(item => reBuildC(item, originX, originY, width, height));\n }\n }\n else {\n if(target && target.length >= 2) {\n return [\n originX + target[0] * width,\n originY + target[1] * height,\n ];\n }\n }\n return [];\n}\n\nfunction curveNum(controlA, controlB) {\n let num = 0;\n if(controlA && controlA.length >= 2) {\n num++;\n }\n if(controlB && controlB.length >= 2) {\n num += 2;\n }\n return num;\n}\n\nfunction getNewPoint(xa, ya, xb, yb, controlA, controlB, num, start = 0, end = 1) {\n if(start === 0 && end === 1) {\n return [xa, ya, xb, yb, controlA, controlB];\n }\n if(start === end) {\n return [];\n }\n if(start > end) {\n [start, end] = [end, start];\n }\n start = Math.max(0, start);\n end = Math.min(1, end);\n if(num === 3) {\n [[xa, ya], controlA, controlB, [xb, yb]] = bezier.sliceBezier2Both([[xa, ya], controlA, controlB, [xb, yb]], start, end);\n }\n else if(num === 2) {\n [[xa, ya], controlB, [xb, yb]] = bezier.sliceBezier2Both([[xa, ya], controlB, [xb, yb]], start, end);\n }\n else if(num === 1) {\n [[xa, ya], controlA, [xb, yb]] = bezier.sliceBezier2Both([[xa, ya], controlA, [xb, yb]], start, end);\n }\n else {\n let a = xb - xa;\n let b = yb - ya;\n xa += a * start;\n ya += b * start;\n xb += a * (1 - end);\n yb += b * (1 - end);\n }\n return [xa, ya, xb, yb, controlA, controlB];\n}\n\nclass Line extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // xa,ya和xb,yb表明线段的首尾坐标,control表明控制点坐标\n if(this.isMulti) {\n this.__xa = [0];\n this.__ya = [0];\n this.__xb = [1];\n this.__yb = [1];\n this.__controlA = [[]];\n this.__controlB = [[]];\n this.__start = [0];\n this.__end = [1];\n if(Array.isArray(props.xa)) {\n this.__xa = props.xa.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.xa)) {\n this.__xa = [parseFloat(props.xa) || 0];\n }\n if(Array.isArray(props.ya)) {\n this.__ya = props.ya.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.ya)) {\n this.__ya = [parseFloat(props.ya) || 0];\n }\n if(Array.isArray(props.xb)) {\n this.__xb = props.xb.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.xb)) {\n this.__xb = [parseFloat(props.xb) || 0];\n }\n if(Array.isArray(props.yb)) {\n this.__yb = props.yb.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.yb)) {\n this.__yb = [parseFloat(props.yb) || 0];\n }\n if(Array.isArray(props.controlA)) {\n this.__controlA = props.controlA.map(item => {\n if(Array.isArray(item)) {\n return item;\n }\n return [];\n });\n }\n if(Array.isArray(props.controlB)) {\n this.__controlB = props.controlB.map(item => {\n if(Array.isArray(item)) {\n return item;\n }\n return [];\n });\n }\n if(Array.isArray(props.start)) {\n this.__start = props.start.map(i => parseFloat(i) || 0);\n for(let i = this.__start.length; i < this.__xa.length; i++) {\n this.__start.push(0);\n }\n }\n else if(!isNil(props.start)) {\n let v = parseFloat(props.start) || 0;\n this.__start = this.__xa.map(() => v);\n }\n if(Array.isArray(props.end)) {\n this.__end = props.end.map(i => {\n let v = parseFloat(i);\n if(isNaN(v)) {\n v = 1;\n }\n return v;\n });\n for(let i = this.__end.length; i < this.__xa.length; i++) {\n this.__end.push(1);\n }\n }\n else if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n this.__end = this.__xa.map(() => v);\n }\n }\n else {\n this.__xa = this.__ya = this.__start = 0;\n this.__xb = this.__yb = this.__end = 1;\n this.__controlA = [];\n this.__controlB = [];\n if(!isNil(props.xa)) {\n this.__xa = parseFloat(props.xa) || 0;\n }\n if(!isNil(props.ya)) {\n this.__ya = parseFloat(props.ya) || 0;\n }\n if(!isNil(props.xb)) {\n this.__xb = parseFloat(props.xb) || 0;\n }\n if(!isNil(props.yb)) {\n this.__yb = parseFloat(props.yb) || 0;\n }\n if(!isNil(props.start)) {\n this.__start = parseFloat(props.start) || 0;\n }\n if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n this.__end = v;\n }\n if(Array.isArray(props.controlA)) {\n this.__controlA = props.controlA;\n }\n if(Array.isArray(props.controlB)) {\n this.__controlB = props.controlB;\n }\n }\n }\n\n buildCache(originX, originY, focus) {\n let { width, height, __cacheProps, isMulti } = this;\n let rebuild;\n ['xa', 'xb'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = reBuild(this[k], originX, width, isMulti);\n }\n });\n ['ya', 'yb'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = reBuild(this[k], originY, height, isMulti);\n }\n });\n ['controlA', 'controlB'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = reBuildC(this[k], originX, originY, width, height, isMulti);\n }\n });\n ['start', 'end'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = this[k];\n }\n });\n return rebuild;\n }\n\n render(renderMode, ctx, dx2, dy2) {\n let res = super.render(renderMode, ctx, dx2, dy2);\n if(res.break || renderMode === mode.WEBGL) {\n return res;\n }\n let {\n x3,\n y3,\n stroke: strokes,\n strokeWidth: strokeWidths,\n strokeDasharray: strokeDasharrays,\n strokeDasharrayStr: strokeDasharrayStrs,\n strokeLinecap: strokeLinecaps,\n strokeLinejoin: strokeLinejoins,\n strokeMiterlimit: strokeMiterlimits,\n dx,\n dy,\n } = res;\n let { __cacheProps, isMulti } = this;\n let rebuild = this.buildCache(x3, y3);\n if(rebuild && renderMode === mode.SVG) {\n let d = '';\n if(isMulti) {\n __cacheProps.xa.forEach((xa, i) => {\n let xb = __cacheProps.xb[i];\n let ya = __cacheProps.ya[i];\n let yb = __cacheProps.yb[i];\n let ca = __cacheProps.controlA[i];\n let cb = __cacheProps.controlB[i];\n let start = __cacheProps.start[i];\n let end = __cacheProps.end[i];\n let curve = curveNum(ca, cb);\n if(start !== 0 || end !== 1) {\n [xa, ya, xb, ya, ca, cb] = getNewPoint(xa, ya, xb, ya, ca, cb, curve, start, end, __cacheProps.len);\n }\n d += painter.svgLine(xa, ya, xb, yb, ca, cb, curve);\n });\n }\n else {\n let curve = curveNum(__cacheProps.controlA, __cacheProps.controlB);\n let { xa, ya, xb, yb, controlA, controlB, start, end } = __cacheProps;\n if(start !== 0 || end !== 1) {\n [xa, ya, xb, yb, controlA, controlB] = getNewPoint(xa, ya, xb, yb, controlA, controlB, curve, start, end, __cacheProps.len);\n }\n d = painter.svgLine(xa, ya, xb, yb, controlA, controlB, curve);\n }\n __cacheProps.d = d;\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n strokes.forEach((stroke, i) => {\n let strokeWidth = strokeWidths[i];\n let isStrokeRE = strokeWidth > 0 && stroke.k === 'radial' && Array.isArray(stroke.v);\n if(strokeWidth > 0 && stroke !== 'none') {\n this.__preSetCanvas(renderMode, ctx, {\n stroke,\n strokeWidth,\n strokeDasharray: strokeDasharrays[i],\n strokeLinecap: strokeLinecaps[i],\n strokeLinejoin: strokeLinejoins[i],\n strokeMiterlimit: strokeMiterlimits[i],\n });\n if(isStrokeRE) {\n ctx.strokeStyle = stroke.v[0];\n }\n ctx.beginPath();\n if(isMulti) {\n __cacheProps.xa.forEach((xa, i) => {\n let xb = __cacheProps.xb[i];\n let ya = __cacheProps.ya[i];\n let yb = __cacheProps.yb[i];\n let ca = __cacheProps.controlA[i];\n let cb = __cacheProps.controlB[i];\n let start = __cacheProps.start[i];\n let end = __cacheProps.end[i];\n let curve = curveNum(ca, cb);\n if(start !== 0 || end !== 1) {\n [xa, ya, xb, ya, ca, cb] = getNewPoint(xa, ya, xb, ya, ca, cb, curve, start, end, __cacheProps.len);\n }\n painter.canvasLine(ctx, xa, ya, xb, yb, ca, cb, curve, dx, dy);\n });\n }\n else {\n let curve = curveNum(__cacheProps.controlA, __cacheProps.controlB);\n let { xa, ya, xb, yb, controlA, controlB, start, end } = __cacheProps;\n if(start !== 0 || end !== 1) {\n [xa, ya, xb, yb, controlA, controlB] = getNewPoint(xa, ya, xb, yb, controlA, controlB, curve, start, end, __cacheProps.len);\n }\n painter.canvasLine(ctx, xa, ya, xb, yb, controlA, controlB, curve, dx, dy);\n }\n ctx.stroke();\n ctx.closePath();\n }\n });\n }\n else if(renderMode === mode.SVG) {\n strokes.forEach((stroke, i) => {\n let strokeWidth = strokeWidths[i];\n let isStrokeRE = strokeWidth > 0 && stroke.k === 'radial' && Array.isArray(stroke.v);\n let props = [\n ['d', __cacheProps.d],\n ['fill', 'none'],\n ['stroke', isStrokeRE ? stroke.v[0] : (stroke.v || stroke)],\n ['stroke-width', strokeWidth]\n ];\n this.__propsStrokeStyle(props, strokeDasharrayStrs[i], strokeLinecaps[i], strokeLinejoins[i], strokeMiterlimits[i]);\n this.addGeom('path', props);\n });\n }\n return res;\n }\n\n get xa() {\n return this.getProps('xa');\n }\n\n get ya() {\n return this.getProps('ya');\n }\n\n get xb() {\n return this.getProps('xb');\n }\n\n get yb() {\n return this.getProps('yb');\n }\n\n get controlA() {\n return this.getProps('controlA');\n }\n\n get controlB() {\n return this.getProps('controlB');\n }\n\n get start() {\n return this.getProps('start');\n }\n\n get end() {\n return this.getProps('end');\n }\n\n get bbox() {\n let {\n isMulti, __cacheProps,\n __x3: originX, __y3: originY,\n computedStyle: {\n [STROKE_WIDTH]: strokeWidth,\n },\n } = this;\n this.buildCache(originX, originY);\n let { xa, ya, xb, yb, controlA, controlB } = __cacheProps;\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(half, item);\n });\n half = Math.ceil(half * 0.5) + 1;\n if(!isMulti) {\n xa = [xa];\n xb = [xb];\n ya = [ya];\n yb = [yb];\n controlA = [controlA];\n controlB = [controlB];\n }\n xa.forEach((xa, i) => {\n let y1 = ya[i];\n let x2 = xb[i];\n let y2 = yb[i];\n let ca = controlA[i];\n let cb = controlB[i];\n if((isNil(ca) || ca.length < 2) && (isNil(cb) || cb.length < 2)) {\n bbox[0] = Math.min(bbox[0], xa - half);\n bbox[0] = Math.min(bbox[0], x2 - half);\n bbox[1] = Math.min(bbox[1], y1 - half);\n bbox[1] = Math.min(bbox[1], y2 - half);\n bbox[2] = Math.max(bbox[2], xa + half);\n bbox[2] = Math.max(bbox[2], x2 + half);\n bbox[3] = Math.max(bbox[3], y1 + half);\n bbox[3] = Math.max(bbox[3], y2 + half);\n }\n else if(isNil(ca) || ca.length < 2) {\n let bezierBox = bezier.bboxBezier(xa, y1, cb[0], cb[1], x2, y2);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - half);\n bbox[0] = Math.min(bbox[0], bezierBox[2] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[3] - half);\n bbox[2] = Math.max(bbox[2], bezierBox[0] + half);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[1] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + half);\n }\n else if(isNil(cb) || cb.length < 2) {\n let bezierBox = bezier.bboxBezier(xa, y1, ca[0], ca[1], x2, y2);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - half);\n bbox[0] = Math.min(bbox[0], bezierBox[2] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[3] - half);\n bbox[2] = Math.max(bbox[2], bezierBox[0] + half);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[1] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + half);\n }\n else {\n let bezierBox = bezier.bboxBezier(xa, y1, ca[0], ca[1], cb[0], cb[1], x2, y2);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - half);\n bbox[0] = Math.min(bbox[0], bezierBox[2] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[3] - half);\n bbox[2] = Math.max(bbox[2], bezierBox[0] + half);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[1] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + half);\n }\n });\n return bbox;\n }\n}\n\nexport default Line;\n","class Point {\n constructor(x, y) {\n if(Array.isArray(x)) {\n [x, y] = x;\n }\n this.x = x;\n this.y = y;\n }\n\n toString() {\n // return this.x.toFixed(1).replace('.0', '') + ',' + this.y.toFixed(1).replace('.0', '');\n return this.x + ',' + this.y;\n }\n\n equal(o) {\n return this === o || this.x === o.x && this.y === o.y;\n }\n\n // 排序,要求a在b左即x更小,x相等a在b下,符合返回false,不符合则true\n static compare(a, b) {\n if(a.x > b.x) {\n return true;\n }\n return a.x === b.x && a.y > b.y;\n }\n}\n\nexport default Point;\n","import bezier from '../bezier';\n\nclass Segment {\n constructor(coords, belong) {\n this.coords = coords;\n this.belong = belong; // 属于source多边形还是clip多边形,0和1区别\n this.calBbox();\n this.myFill = [false, false]; // 自己的上下内外性\n this.otherFill = [false, false]; // 对方的上下内外性\n this.myCoincide = 0; // 自己重合次数\n this.otherCoincide = 0; // 对方重合次数\n this.isVisited = false; // 扫描求交时用到\n this.isDeleted = false; // 相交裁剪老的线段会被删除\n }\n\n calBbox() {\n let coords = this.coords, l = coords.length;\n if(l === 2) {\n let a = coords[0], b = coords[1];\n let x1 = Math.min(a.x, b.x);\n let y1 = Math.min(a.y, b.y);\n let x2 = Math.max(a.x, b.x);\n let y2 = Math.max(a.y, b.y);\n this.bbox = [x1, y1, x2, y2];\n }\n else {\n let arr = coords.map(item => [item.x, item.y]);\n this.bbox = bezier.bboxBezier(arr);\n }\n }\n\n // 线段边逆序\n reverse() {\n this.coords.reverse();\n }\n\n equal(o) {\n let ca = this.coords, cb = o.coords;\n if(ca.length !== cb.length) {\n return false;\n }\n for(let i = 0, len = ca.length; i < len; i++) {\n if(!ca[i].equal(cb[i])) {\n return false;\n }\n }\n return true;\n }\n\n toHash() {\n return this.coords.map(item => item.toString()).join(' ');\n }\n\n toString() {\n return this.toHash()\n + ' ' + this.belong\n + ' ' + this.myCoincide\n + '' + this.otherCoincide\n + ' ' + this.myFill.map(i => i ? 1 : 0).join('')\n + this.otherFill.map(i => i ? 1 : 0).join('');\n }\n}\n\nexport default Segment;\n","import Point from './Point';\nimport isec from '../isec';\nimport bezier from '../bezier';\n\nconst EPS = 1e-9;\nconst EPS2 = 1 - (1e-9);\n\nfunction getIntersectionLineLine(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2, d) {\n let toSource = (\n (bx2 - bx1) * (ay1 - by1) - (by2 - by1) * (ax1 - bx1)\n ) / d;\n let toClip = (\n (ax2 - ax1) * (ay1 - by1) - (ay2 - ay1) * (ax1 - bx1)\n ) / d;\n // 非顶点相交才是真相交\n if(toSource > EPS && toSource < EPS2 && toClip > EPS && toClip < EPS2) {\n let ox = ax1 + toSource * (ax2 - ax1);\n let oy = ay1 + toSource * (ay2 - ay1);\n return [{\n point: new Point(ox, oy),\n toSource,\n toClip,\n }];\n }\n}\n\nfunction getIntersectionBezier2Line(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2) {\n let res = isec.intersectBezier2Line(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2);\n if(res.length) {\n res = res.map(item => {\n let toClip;\n // toClip是直线上的距离,可以简化为只看x或y,选择差值比较大的防止精度问题\n if(Math.abs(bx2 - bx1) >= Math.abs(by2 - by1)) {\n toClip = Math.abs((item.x - bx1) / (bx2 - bx1));\n }\n else {\n toClip = Math.abs((item.y - by1) / (by2 - by1));\n }\n if(item.t > EPS && item.t < EPS2 && toClip > EPS && toClip < EPS2) {\n // 还要判断斜率,相等也忽略(小于一定误差)\n let k1 = bezier.bezierSlope([\n [ax1, ay1],\n [ax2, ay2],\n [ax3, ay3],\n ], item.t);\n let k2 = bezier.bezierSlope([[bx1, by1], [bx2, by2]]);\n // 忽略方向,180°也是平行,Infinity相减为NaN\n if(Math.abs((Math.abs(k1) - Math.abs(k2)) || 0) < EPS) {\n return;\n }\n return {\n point: new Point(item.x, item.y),\n toSource: item.t, // source是曲线直接用t\n toClip,\n };\n }\n }).filter(i => i);\n if(res.length) {\n return res;\n }\n }\n}\n\nfunction getIntersectionBezier2Bezier2(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2, bx3, by3) {\n let res = isec.intersectBezier2Bezier2(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2, bx3, by3);\n if(res.length) {\n res = res.map(item => {\n // toClip是另一条曲线的距离,需根据交点和曲线方程求t\n let toClip = bezier.getPointT([\n [bx1, by1],\n [bx2, by2],\n [bx3, by3],\n ], item.x, item.y);\n // 防止误差无值\n if(toClip.length) {\n toClip = toClip[0];\n if(item.t > EPS && item.t < EPS2 && toClip > EPS && toClip < EPS2) {\n // 还要判断斜率,相等也忽略(小于一定误差)\n let k1 = bezier.bezierSlope([\n [ax1, ay1],\n [ax2, ay2],\n [ax3, ay3],\n ], item.t);\n let k2 = bezier.bezierSlope([\n [bx1, by1],\n [bx2, by2],\n [bx3, by3],\n ], toClip);\n // 忽略方向,180°也是平行,Infinity相减为NaN\n if(Math.abs((Math.abs(k1) - Math.abs(k2)) || 0) < EPS) {\n return;\n }\n return {\n point: new Point(item.x, item.y),\n toSource: item.t, // source是曲线直接用t\n toClip,\n };\n }\n }\n }).filter(i => i);\n if(res.length) {\n return res;\n }\n }\n}\n\nfunction getIntersectionBezier2Bezier3(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2, bx3, by3, bx4, by4) {\n\n let res = isec.intersectBezier2Bezier3(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2, bx3, by3, bx4, by4);\n if(res.length) {\n res = res.map(item => {\n // toClip是另一条曲线的距离,需根据交点和曲线方程求t\n let toClip = bezier.getPointT([\n [bx1, by1],\n [bx2, by2],\n [bx3, by3],\n [bx4, by4],\n ], item.x, item.y);\n // 防止误差无值\n if(toClip.length) {\n toClip = toClip[0];\n if(item.t > EPS && item.t < EPS2 && toClip > EPS && toClip < EPS2) {\n // 还要判断斜率,相等也忽略(小于一定误差)\n let k1 = bezier.bezierSlope([\n [ax1, ay1],\n [ax2, ay2],\n [ax3, ay3],\n ], item.t);\n let k2 = bezier.bezierSlope([\n [bx1, by1],\n [bx2, by2],\n [bx3, by3],\n [bx4, by4],\n ], toClip);\n // 忽略方向,180°也是平行,Infinity相减为NaN\n if(Math.abs((Math.abs(k1) - Math.abs(k2)) || 0) < EPS) {\n return;\n }\n return {\n point: new Point(item.x, item.y),\n toSource: item.t, // source是曲线直接用t\n toClip: toClip,\n };\n }\n }\n }).filter(i => i);\n if(res.length) {\n return res;\n }\n }\n}\n\nfunction getIntersectionBezier3Line(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4,\n bx1, by1, bx2, by2) {\n let res = isec.intersectBezier3Line(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4,\n bx1, by1, bx2, by2);\n if(res.length) {\n res = res.map(item => {\n // toClip是直线上的距离,可以简化为只看x或y,选择差值比较大的防止精度问题\n let toClip;\n if(Math.abs(bx2 - bx1) >= Math.abs(by2 - by1)) {\n toClip = Math.abs((item.x - bx1) / (bx2 - bx1));\n }\n else {\n toClip = Math.abs((item.y - by1) / (by2 - by1));\n }\n if(item.t > EPS && item.t < EPS2 && toClip > EPS && toClip < EPS2) {\n // 还要判断斜率,相等也忽略(小于一定误差)\n let k1 = bezier.bezierSlope([\n [ax1, ay1],\n [ax2, ay2],\n [ax3, ay3],\n [ax4, ay4],\n ], item.t);\n let k2 = bezier.bezierSlope([\n [bx1, by1],\n [bx2, by2],\n ]);\n // 忽略方向,180°也是平行,Infinity相减为NaN\n if(Math.abs((Math.abs(k1) - Math.abs(k2)) || 0) < EPS) {\n return;\n }\n return {\n point: new Point(item.x, item.y),\n toSource: item.t, // source是曲线直接用t\n toClip,\n };\n }\n }).filter(i => i);\n if(res.length) {\n return res;\n }\n }\n}\n\nfunction getIntersectionBezier3Bezier3(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4,\n bx1, by1, bx2, by2, bx3, by3, bx4, by4) {\n let res = isec.intersectBezier3Bezier3(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4,\n bx1, by1, bx2, by2, bx3, by3, bx4, by4);\n if(res.length) {\n res = res.map(item => {\n // toClip是另一条曲线的距离,需根据交点和曲线方程求t\n let toClip = bezier.getPointT([\n [bx1, by1],\n [bx2, by2],\n [bx3, by3],\n [bx4, by4],\n ], item.x, item.y);\n // 防止误差无值\n if(toClip.length) {\n toClip = toClip[0];\n if(item.t > EPS && item.t < EPS2 && toClip > EPS && toClip < EPS2) {\n // 还要判断斜率,相等也忽略(小于一定误差)\n let k1 = bezier.bezierSlope([\n [ax1, ay1],\n [ax2, ay2],\n [ax3, ay3],\n [ax4, ay4],\n ], item.t);\n let k2 = bezier.bezierSlope([\n [bx1, by1],\n [bx2, by2],\n [bx3, by3],\n [bx4, by4],\n ], toClip);\n // 忽略方向,180°也是平行,Infinity相减为NaN\n if(Math.abs((Math.abs(k1) - Math.abs(k2)) || 0) < EPS) {\n return;\n }\n return {\n point: new Point(item.x, item.y),\n toSource: item.t, // source是曲线直接用t\n toClip: toClip,\n };\n }\n }\n }).filter(i => i);\n if(res.length) {\n return res;\n }\n }\n}\n\n// 两条线可能多个交点,将交点按原本线段的方向顺序排序\nfunction sortIntersection(res, isSource) {\n return res.sort(function(a, b) {\n if(isSource) {\n return a.toSource - b.toSource;\n }\n return a.toClip - b.toClip;\n }).map(item => {\n return {\n point: item.point,\n t: isSource ? item.toSource : item.toClip,\n };\n }).filter(item => item.t > EPS && item.t < EPS2);\n}\n\nexport default {\n getIntersectionLineLine,\n getIntersectionBezier2Line,\n getIntersectionBezier2Bezier2,\n getIntersectionBezier2Bezier3,\n getIntersectionBezier3Line,\n getIntersectionBezier3Bezier3,\n sortIntersection,\n};\n","import geom from '../geom';\nimport vector from '../vector';\nimport bezier from '../bezier';\nimport equation from '../equation';\nimport Point from './Point';\nimport Segment from './Segment';\nimport intersect from './intersect';\n\nconst {\n getIntersectionLineLine,\n getIntersectionBezier2Line,\n getIntersectionBezier2Bezier2,\n getIntersectionBezier2Bezier3,\n getIntersectionBezier3Line,\n getIntersectionBezier3Bezier3,\n sortIntersection,\n} = intersect;\n\nclass Polygon {\n constructor(regions, index) {\n this.index = index; // 属于source多边形还是clip多边形,0和1区别\n let segments = [];\n // 多边形有>=1个区域,一般是1个\n if(!Array.isArray(regions)) {\n return;\n }\n regions.forEach(vertices => {\n // 每个区域有>=2条线段,组成封闭区域,1条肯定不行,2条必须是曲线\n if(!Array.isArray(vertices) || vertices.length < 2) {\n return;\n }\n if(vertices.length === 2 && vertices[1].length <= 2) {\n return;\n }\n let startPoint = new Point(vertices[0]), firstPoint = startPoint;\n // 根据多边形有向边,生成线段,不保持原有向,统一左下作为线段起点,如果翻转则记录个值标明\n for(let i = 1, len = vertices.length; i < len; i++) {\n let curr = vertices[i], l = curr.length;\n // 闭合区域,首尾顶点重复统一\n let endPoint = new Point(curr[l - 2], curr[l - 1]);\n let seg;\n if(l === 2) {\n // 长度为0的直线忽略\n if(startPoint.equal(endPoint)) {\n continue;\n }\n let coords = Point.compare(startPoint, endPoint) ? [\n endPoint,\n startPoint,\n ] : [\n startPoint,\n endPoint,\n ];\n seg = new Segment(coords, index);\n }\n // 曲线需确保x单调性,如果非单调,则切割为单调的多条\n else if(l === 4) {\n // 长度为0的曲线忽略\n if(startPoint.equal(endPoint) && startPoint.x === curr[0] && startPoint.y === curr[1]) {\n continue;\n }\n let cPoint = new Point(curr[0], curr[1]);\n let t = getBezierMonotonicity([startPoint, cPoint, endPoint], true);\n if(t) {\n let points = [\n [startPoint.x, startPoint.y],\n [curr[0], curr[1]],\n [endPoint.x, endPoint.y],\n ];\n let curve1 = bezier.sliceBezier(points, t[0]);\n let curve2 = bezier.sliceBezier2Both(points, t[0], 1);\n let p1 = new Point(curve1[1]), p2 = new Point(curve1[2]), p3 = new Point(curve2[1]);\n let coords = Point.compare(startPoint, p2) ? [\n p2,\n p1,\n startPoint,\n ] : [\n startPoint,\n p1,\n p2,\n ];\n segments.push(new Segment(coords, index));\n coords = Point.compare(p2, endPoint) ? [\n endPoint,\n p3,\n p2,\n ] : [\n p2,\n p3,\n endPoint,\n ];\n seg = new Segment(coords, index);\n }\n else {\n let coords = Point.compare(startPoint, endPoint) ? [\n endPoint,\n cPoint,\n startPoint,\n ] : [\n startPoint,\n cPoint,\n endPoint,\n ];\n seg = new Segment(coords, index);\n }\n }\n // 3阶可能有2个单调改变t点\n else if(l === 6) {\n // 降级为2阶曲线\n if(curr[0] === curr[2] && curr[1] === curr[3]) {\n curr.splice(2, 2);\n i--;\n continue;\n }\n // 长度为0的曲线忽略\n if(startPoint.equal(endPoint)\n && startPoint.x === curr[0] && startPoint.y === curr[1]\n && startPoint.x === curr[2] && startPoint.y === curr[3]) {\n continue;\n }\n let cPoint1 = new Point(curr[0], curr[1]), cPoint2 = new Point(curr[2], curr[3]);\n let t = getBezierMonotonicity([startPoint, cPoint1, cPoint2, endPoint], true);\n if(t) {\n let points = [\n [startPoint.x, startPoint.y],\n [curr[0], curr[1]],\n [curr[2], curr[3]],\n [endPoint.x, endPoint.y],\n ];\n let lastPoint = startPoint, lastT = 0;\n t.forEach(t => {\n let curve = bezier.sliceBezier2Both(points, lastT, t);\n let p1 = new Point(curve[1]), p2 = new Point(curve[2]), p3 = new Point(curve[3]);\n let coords = Point.compare(lastPoint, p3) ? [\n p3,\n p2,\n p1,\n lastPoint,\n ] : [\n lastPoint,\n p1,\n p2,\n p3,\n ];\n segments.push(new Segment(coords, index));\n lastT = t;\n lastPoint = p3;\n });\n let curve = bezier.sliceBezier2Both(points, lastT, 1);\n let p1 = new Point(curve[1]), p2 = new Point(curve[2]);\n let coords = Point.compare(lastPoint, endPoint) ? [\n endPoint,\n p2,\n p1,\n lastPoint,\n ] : [\n lastPoint,\n p1,\n p2,\n endPoint,\n ];\n seg = new Segment(coords, index);\n }\n else {\n let coords = Point.compare(startPoint, endPoint) ? [\n endPoint,\n cPoint2,\n cPoint1,\n startPoint,\n ] : [\n startPoint,\n cPoint1,\n cPoint2,\n endPoint,\n ];\n seg = new Segment(coords, index);\n }\n }\n segments.push(seg);\n // 终点是下条边的起点\n startPoint = endPoint;\n }\n // 强制要求闭合,非闭合自动连直线到开始点闭合\n if(!startPoint.equal(firstPoint)) {\n let coords = Point.compare(startPoint, firstPoint) ? [\n firstPoint,\n startPoint,\n ] : [\n startPoint,\n firstPoint,\n ];\n segments.push(new Segment(coords, index));\n }\n });\n this.segments = segments;\n }\n\n // 根据y坐标排序,生成有序线段列表,再扫描求交\n selfIntersect() {\n let list = genHashXList(this.segments);\n this.segments = findIntersection(list, false, false, false);\n }\n\n toString() {\n return this.segments.map(item => item.toString());\n }\n\n reset(index) {\n this.index = index;\n this.segments.forEach(seg => {\n seg.belong = index;\n seg.otherCoincide = 0;\n seg.otherFill[0] = seg.otherFill[1] = false;\n });\n return this;\n }\n\n // 2个非自交的多边形互相判断相交,依旧是扫描线算法,2个多边形统一y排序,但要分别出属于哪个多边形,因为只和对方测试相交\n static intersect2(polyA, polyB, isIntermediateA, isIntermediateB) {\n if(!polyA.segments.length || !polyB.segments.length) {\n return;\n }\n\n let list = genHashXList(polyA.segments.concat(polyB.segments));\n let segments = findIntersection(list, true, isIntermediateA, isIntermediateB);\n polyA.segments = segments.filter(item => item.belong === 0);\n polyB.segments = segments.filter(item => item.belong === 1);\n }\n\n /**\n * 以Bentley-Ottmann算法为原理,为每个顶点设计事件,按x升序、y升序遍历所有顶点的事件\n * 每条线段边有2个顶点即2个事件,左下为start,右上为end\n * 同顶点优先end,start相同则对比线段谁后面的y更小(向量法),其实就是对比非共点部分的y大小\n * 维护一个活跃边列表ael,同样保证x升序、y升序,start事件线段进入ael,end离开\n * ael中相邻的线段说明上下相互接壤,接壤一侧则内外填充性一致\n * 最下面的边(含第一条)可直接得知下方填充性(下面没有了一定是多边形外部),再推测出上方\n * 其余的边根据自己下方相邻即可确定填充性\n */\n static annotate2(polyA, polyB, isIntermediateA, isIntermediateB) {\n let list = genHashXYList(polyA.segments.concat(polyB.segments));\n let aelA = [], aelB = [], hashA = {}, hashB = {};\n // 算法3遍循环,先注释a多边形的边自己内外性,再b的边自己内外性,最后一起注释对方的内外性\n // 因数据结构合在一起,所以2遍循环可以完成,先注释a和b的自己,再一遍对方\n list.forEach(item => {\n let { isStart, seg } = item;\n let belong = seg.belong;\n // 连续操作时,已有的中间结果可以跳过\n if(belong === 0 && isIntermediateA || belong === 1 && isIntermediateB) {\n return;\n }\n let ael = belong === 0 ? aelA : aelB, hash = belong === 0 ? hashA : hashB;\n if(isStart) {\n // 自己重合的线段只考虑第一条,其它剔除\n if(seg.myCoincide) {\n let hc = seg.toHash();\n if(hash.hasOwnProperty(hc)) {\n return;\n }\n hash[hc] = true;\n }\n // console.error(seg.toString(), ael.length)\n // 下面没有线段了,底部边,上方填充下方空白(除非是偶次重复段,上下都空白,奇次和单线相同)\n if(!ael.length) {\n if(seg.myCoincide) {\n seg.myFill[0] = seg.myCoincide % 2 === 0;\n }\n else {\n seg.myFill[0] = true;\n }\n ael.push(seg);\n }\n else {\n // 插入到ael正确的位置,按照x升序、y升序\n let len = ael.length, top = ael[len - 1];\n let isAboveLast = segAboveCompare(seg, top);\n // 比ael栈顶还高在最上方\n if(isAboveLast) {\n seg.myFill[1] = top.myFill[0];\n if(seg.myCoincide) {\n seg.myFill[0] = seg.myCoincide % 2 === 0 ? !seg.myFill[1] : seg.myFill[1];\n }\n else {\n seg.myFill[0] = !seg.myFill[1];\n }\n ael.push(seg);\n }\n // 不高且只有1个则在最下方\n else if(len === 1) {\n if(seg.myCoincide) {\n seg.myFill[0] = seg.myCoincide % 2 === 0;\n }\n else {\n seg.myFill[0] = true;\n }\n ael.unshift(seg);\n }\n else {\n // 遍历,尝试对比是否在ael栈中相邻2条线段之间\n for(let i = len - 2; i >= 0; i--) {\n let curr = ael[i];\n let isAbove = segAboveCompare(seg, curr);\n if(isAbove) {\n seg.myFill[1] = curr.myFill[0];\n if(seg.myCoincide) {\n seg.myFill[0] = seg.myCoincide % 2 === 0 ? !seg.myFill[1] : seg.myFill[1];\n }\n else {\n seg.myFill[0] = !seg.myFill[1];\n }\n ael.splice(i + 1, 0, seg);\n break;\n }\n else if(i === 0) {\n if(seg.myCoincide) {\n seg.myFill[0] = seg.myCoincide % 2 === 0;\n }\n else {\n seg.myFill[0] = true;\n }\n ael.unshift(seg);\n }\n }\n }\n }\n // console.warn(seg.toString())\n }\n else {\n let i = ael.indexOf(seg);\n // 一般肯定有,重合线段会剔除不进ael\n if(i > -1) {\n ael.splice(i, 1);\n }\n }\n });\n // 注释对方,除了重合线直接使用双方各自的注释拼接,普通线两边的对方内外性相同,根据是否在里面inside确定结果\n // inside依旧看自己下方的线段上方情况,不同的是要看下方的线和自己belong是否相同,再确定取下方above的值\n let ael = [], hash = {};\n list.forEach(item => {\n let { isStart, seg } = item;\n let belong = seg.belong;\n if(isStart) {\n // 自重合或者它重合统一只保留第一条线\n if(seg.myCoincide || seg.otherCoincide) {\n let hc = seg.toHash();\n if(hash.hasOwnProperty(hc)) {\n return;\n }\n hash[hc] = true;\n }\n // console.error(seg.toString(), ael.length)\n let inside = false;\n if(!ael.length) {\n inside = false;\n ael.push(seg);\n }\n else {\n let len = ael.length, top = ael[len - 1];\n let isAboveLast = segAboveCompare(seg, top);\n if(isAboveLast) {\n if(top.belong === belong) {\n inside = top.otherFill[0];\n }\n else {\n inside = top.myFill[0];\n }\n ael.push(seg);\n }\n else if(len === 1) {\n // inside = false;\n ael.unshift(seg);\n }\n else {\n for(let i = len - 2; i >= 0; i--) {\n let curr = ael[i];\n let isAbove = segAboveCompare(seg, curr);\n if(isAbove) {\n // 如果在自己的下方线和自己同色,则取下方线的另外色上填充\n if(curr.belong === belong) {\n inside = curr.otherFill[0];\n }\n // 否则取下方线的下方色上填充\n else {\n inside = curr.myFill[0];\n }\n ael.splice(i + 1, 0, seg);\n break;\n }\n else if(i === 0) {\n // inside = false;\n ael.unshift(seg);\n }\n }\n }\n }\n // 重合线的otherFill直接引用指向对方myFill,不能普通计算\n if(!seg.otherCoincide) {\n seg.otherFill[0] = inside;\n seg.otherFill[1] = inside;\n }\n // console.warn(seg.toString(), inside)\n }\n else {\n let i = ael.indexOf(seg);\n if(i > -1) {\n ael.splice(i, 1);\n }\n }\n });\n }\n}\n\nfunction findIntersection(list, compareBelong, isIntermediateA, isIntermediateB) {\n // 从左到右扫描,按x坐标排序,相等按y,边会进入和离开扫描线各1次,在扫描线中的边为活跃边,维护1个活跃边列表,新添加的和老的求交\n let ael = [], delList = [], segments = [];\n while(list.length) {\n if(delList.length) {\n delList.splice(0).forEach(seg => {\n let i = ael.indexOf(seg);\n ael.splice(i, 1);\n if(!seg.isDeleted) {\n segments.push(seg);\n }\n });\n }\n\n let { x, arr } = list[0];\n while(arr.length) {\n let seg = arr.shift();\n // 被切割的老线段无效\n if(seg.isDeleted) {\n continue;\n }\n let belong = seg.belong, bboxA = seg.bbox;\n // 第2次访问边是离开活动,考虑删除\n if(seg.isVisited) {\n // console.warn(x, seg.toString());\n // console.log(ael.map(item => item.toString()));\n // 可能是垂线不能立刻删除,所以等到下次活动x再删除,因为会出现极端情况刚进来就出去,和后面同y的重合\n if(bboxA[0] !== bboxA[2] || seg.coords.length !== 2) {\n let i = ael.indexOf(seg);\n ael.splice(i, 1);\n if(!seg.isDeleted) {\n segments.push(seg);\n }\n }\n else {\n delList.push(seg);\n }\n seg.isVisited = false; // 还原以备后面逻辑重复利用\n // console.log(ael.map(item => item.toString()));\n }\n // 第1次访问边一定是进入活动,求交\n else {\n // console.error(x, seg.toString(), ael.length);\n // console.log(ael.map(item => item.toString()));\n // 和asl里的边求交,如果被分割,新生成的存入asl和hash,老的线段无需再进入asl\n if(ael.length) {\n let coordsA = seg.coords, lenA = coordsA.length;\n let { x: ax1, y: ay1 } = coordsA[0];\n let { x: ax2, y: ay2 } = coordsA[1];\n for(let i = 0; i < ael.length; i++) {\n let item = ael[i];\n // 被切割的老线段无效,注意seg切割过程中可能变成删除\n if(item.isDeleted || seg.isDeleted) {\n continue;\n }\n // 互交所属belong不同才进行检测,自交则不检查belong\n if(compareBelong && item.belong === belong) {\n continue;\n }\n // bbox相交才考虑真正计算,加速\n let bboxB = item.bbox, coordsB = item.coords, lenB = coordsB.length;\n let isSourceReverted = false; // 求交可能a、b线主从互换\n if(isRectsOverlap(bboxA, bboxB, lenA, lenB)) {\n // 完全重合简化,同矩形的线myFill共享,对方矩形互换otherFill\n if(lenA === lenB && seg.equal(item)) {\n if(compareBelong) {\n // 因为一定不自交,所以重合线不会被分割\n seg.otherCoincide++;\n item.otherCoincide++;\n seg.otherFill = item.myFill;\n item.otherFill = seg.myFill;\n }\n else {\n seg.myCoincide++;\n item.myCoincide++;\n seg.myFill = item.myFill;\n }\n continue;\n }\n let { x: bx1, y: by1 } = coordsB[0];\n let { x: bx2, y: by2 } = coordsB[1];\n let inters, overs;\n // a是直线\n if(lenA === 2) {\n // b是直线\n if(lenB === 2) {\n let d = (by2 - by1) * (ax2 - ax1) - (bx2 - bx1) * (ay2 - ay1);\n // 平行检查是否重合,否则求交\n if(d === 0) {\n // 垂线特殊,y=kx+b没法求\n if(ax1 === ax2) {\n if(ax1 === bx1 && ax2 === bx2) {\n overs = checkOverlapLine(ax1, ay1, ax2, ay2, seg,\n bx1, by1, bx2, by2, item, true);\n }\n }\n else {\n let b1 = (ay2 - ay1) * ax1 / (ax2 - ax1) + ay1;\n let b2 = (by2 - by1) * bx1 / (bx2 - bx1) + by1;\n if(b1 === b2) {\n overs = checkOverlapLine(ax1, ay1, ax2, ay2, seg,\n bx1, by1, bx2, by2, item, false);\n }\n }\n }\n else {\n inters = getIntersectionLineLine(ax1, ay1, ax2, ay2,\n bx1, by1, bx2, by2, d);\n }\n }\n // b是曲线\n else {\n let { x: bx3, y: by3 } = coordsB[2];\n // b是2阶曲线\n if(lenB === 3) {\n inters = getIntersectionBezier2Line(bx1, by1, bx2, by2, bx3, by3,\n ax1, ay1, ax2, ay2);\n isSourceReverted = true;\n }\n // b是3阶曲线\n else {\n let { x: bx4, y: by4 } = coordsB[3];\n inters = getIntersectionBezier3Line(bx1, by1, bx2, by2, bx3, by3, bx4, by4,\n ax1, ay1, ax2, ay2);\n isSourceReverted = true;\n }\n }\n }\n // a是曲线\n else {\n let { x: ax3, y: ay3 } = coordsA[2];\n // a是2阶曲线\n if(lenA === 3) {\n // b是直线\n if(lenB === 2) {\n inters = getIntersectionBezier2Line(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2);\n }\n // b是曲线\n else {\n let { x: bx3, y: by3 } = coordsB[2];\n // b是2阶曲线\n if(lenB === 3) {\n inters = getIntersectionBezier2Bezier2(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2, bx3, by3);\n if(!inters) {\n overs = checkOverlapBezier(seg, item);\n }\n }\n // b是3阶曲线\n else {\n let { x: bx4, y: by4 } = coordsB[3];\n inters = getIntersectionBezier2Bezier3(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2, bx3, by3, bx4, by4);\n }\n }\n }\n // a是3阶曲线\n else {\n let { x: ax4, y: ay4 } = coordsA[3];\n // b是直线\n if(lenB === 2) {\n inters = getIntersectionBezier3Line(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4,\n bx1, by1, bx2, by2);\n }\n // b是曲线\n else {\n let { x: bx3, y: by3 } = coordsB[2];\n // b是2阶曲线\n if(lenB === 3) {\n inters = getIntersectionBezier2Bezier3(bx1, by1, bx2, by2, bx3, by3,\n ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4);\n isSourceReverted = true;\n }\n // b是3阶曲线\n else {\n let { x: bx4, y: by4 } = coordsB[3];\n inters = getIntersectionBezier3Bezier3(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4,\n bx1, by1, bx2, by2, bx3, by3, bx4, by4);\n if(!inters) {\n overs = checkOverlapBezier(seg, item);\n }\n }\n }\n }\n }\n // 有重合的,重合线段已经求好,直接使用\n if(overs) {\n activeNewSeg(segments, list, ael, x, overs.ra);\n activeNewSeg(segments, list, ael, x, overs.rb);\n seg.isDeleted = item.isDeleted = true;\n ael.splice(i, 1);\n break;\n }\n // 有交点,确保原先线段方向顺序(x升序、y升序),各自依次切割,x右侧新线段也要存入list\n else if(inters && inters.length) {\n // console.log('inters', i, inters);\n let pa = sortIntersection(inters, !isSourceReverted);\n // console.log(pa);\n let ra = sliceSegment(seg, pa, isIntermediateA && belong === 0);\n // console.log(ra.map(item => item.toString()));\n let pb = sortIntersection(inters, isSourceReverted);\n // console.log(pb);\n let rb = sliceSegment(item, pb, isIntermediateB && belong === 1);\n // console.log(rb.map(item => item.toString()));\n // 新切割的线段继续按照坐标存入列表以及ael,为后续求交\n activeNewSeg(segments, list, ael, x, ra);\n activeNewSeg(segments, list, ael, x, rb);\n // 老的线段被删除无效了,踢出ael,防止seg没被分割\n if(rb.length) {\n ael.splice(i, 1);\n }\n break;\n }\n }\n }\n }\n // 不相交切割才进入ael\n if(!seg.isDeleted) {\n ael.push(seg);\n seg.isVisited = true;\n }\n // console.log(ael.map(item => item.toString()));\n }\n }\n list.shift();\n }\n // 最后面的线\n delList.forEach(seg => {\n if(!seg.isDeleted) {\n segments.push(seg);\n }\n });\n // 最后再过滤一遍,因为新生成的切割线可能会被再次切割变成删除的无效线段\n return segments.filter(item => !item.isDeleted);\n}\n\n// 给定交点列表分割线段,ps需排好顺序从头到尾,isSelf标明是否自相交阶段,false是和对方交点切割\nfunction sliceSegment(seg, ps, isIntermediate) {\n let res = [];\n if(!ps.length) {\n return res;\n }\n let belong = seg.belong, coords = seg.coords, len = coords.length;\n let startPoint = coords[0];\n let lastT = 0;\n // 多个点可能截取多条,最后一条保留只修改数据,其它新生成\n ps.forEach(item => {\n let point = item.point, t = item.t;\n let ns;\n if(len === 2) {\n ns = new Segment([\n startPoint,\n point,\n ], belong);\n }\n else if(len === 3) {\n let c = bezier.sliceBezier2Both(coords.map(item => [item.x, item.y]), lastT, t);\n ns = new Segment([\n startPoint,\n new Point(c[1][0], c[1][1]),\n point,\n ], belong);\n }\n else if(len === 4) {\n let c = bezier.sliceBezier2Both(coords.map(item => [item.x, item.y]), lastT, t);\n ns = new Segment([\n startPoint,\n new Point(c[1][0], c[1][1]),\n new Point(c[2][0], c[2][1]),\n point,\n ], belong);\n }\n // 连续操作的中间结果已有自己内外性,截取时需继承\n if(isIntermediate) {\n ns.myFill[0] = seg.myFill[0];\n ns.myFill[1] = seg.myFill[1];\n }\n startPoint = point;\n res.push(ns);\n lastT = t;\n });\n // 最后一条\n let ns;\n if(len === 2) {\n ns = new Segment([\n startPoint,\n coords[1],\n ], belong);\n }\n else if(len === 3) {\n let c = bezier.sliceBezier2Both(coords.map(item => [item.x, item.y]), lastT, 1);\n ns = new Segment([\n startPoint,\n new Point(c[1][0], c[1][1]),\n coords[2],\n ], belong);\n }\n else if(len === 4) {\n let c = bezier.sliceBezier2Both(coords.map(item => [item.x, item.y]), lastT, 1);\n ns = new Segment([\n startPoint,\n new Point(c[1][0], c[1][1]),\n new Point(c[2][0], c[2][1]),\n coords[3],\n ], belong);\n }\n if(isIntermediate) {\n ns.myFill[0] = seg.myFill[0];\n ns.myFill[1] = seg.myFill[1];\n }\n res.push(ns);\n // 老的打标失效删除\n seg.isDeleted = true;\n return res;\n}\n\n// 相交的线段slice成多条后,老的删除,新的考虑添加进扫描列表和活动边列表,根据新的是否在范围内\nfunction activeNewSeg(segments, list, ael, x, ns) {\n ns.forEach(seg => {\n let bbox = seg.bbox, x1 = bbox[0], x2 = bbox[2];\n // console.log(seg.toString(), x1, x2, x);\n // 活跃x之前无相交判断意义,除了竖线,出现活跃前只可能一方为竖线截断另一方的左边部分\n if(x2 <= x && x1 !== x2 && seg.coords.length !== 2) {\n segments.push(seg);\n return;\n }\n // 按顺序放在list的正确位置,可能x1已经过去不需要加入了,但要考虑ael\n let i = 0;\n if(x1 < x) {\n seg.isVisited = true;\n ael.push(seg);\n }\n else {\n for(let len = list.length; i < len; i++) {\n let item = list[i];\n let lx = item.x;\n if(x1 === lx) {\n item.arr.push(seg);\n break;\n }\n // 新的插入\n if(x1 < lx) {\n let temp = {\n x: x1,\n arr: [seg],\n };\n list.splice(i, 0, temp);\n break;\n }\n }\n }\n // x2一定会加入\n for(let len = list.length; i < len; i++) {\n let item = list[i];\n let lx = item.x;\n if(x2 === lx) {\n // 访问过的尽可能排在前面早出栈,减少对比次数\n item.arr.unshift(seg);\n break;\n }\n if(x2 < lx) {\n let temp = {\n x: x2,\n arr: [seg],\n };\n list.splice(i, 0, temp);\n break;\n }\n }\n });\n}\n\n// 按x升序将所有线段组成一个垂直扫描线列表,求交用,y方向不用管\nfunction genHashXList(segments) {\n let hashX = {};\n segments.forEach(seg => {\n let bbox = seg.bbox, min = bbox[0], max = bbox[2];\n putHashX(hashX, min, seg);\n putHashX(hashX, max, seg);\n });\n let list = [];\n Object.keys(hashX).forEach(x => list.push({\n x: parseFloat(x),\n arr: hashX[x],\n }));\n return list.sort(function(a, b) {\n return a.x - b.x;\n });\n}\n\n// 每个线段会放2次,开始点和结束点,哪怕x相同,第1次是开始用push,第2次结束unshift,这样离开时排在前面\nfunction putHashX(hashX, x, seg) {\n let list = hashX[x] = hashX[x] || [];\n if(seg.isVisited) {\n list.unshift(seg);\n seg.isVisited = false;\n }\n else {\n list.push(seg);\n seg.isVisited = true;\n }\n}\n\n// 按x升序将所有线段组成一个垂直扫描线列表,y方向也需要判断\nfunction genHashXYList(segments) {\n let hashXY = {};\n segments.forEach(seg => {\n let coords = seg.coords, l = coords.length;\n let start = coords[0], end = coords[l - 1];\n putHashXY(hashXY, start.x, start.y, seg, true);\n putHashXY(hashXY, end.x, end.y, seg, false);\n });\n let listX = [];\n Object.keys(hashXY).forEach(x => {\n let hashY = hashXY[x];\n let listY = [];\n Object.keys(hashY).forEach(y => {\n let arr = hashY[y].sort(function(a, b) {\n // end优先于start先触发\n if(a.isStart !== b.isStart) {\n return a.isStart ? 1 : -1;\n }\n // start点相同看谁在上谁在下,下方在前,比y极大值,因为start相同又不相交,所以上方的y极值更大\n if(a.isStart) {\n return segAboveCompare(a.seg, b.seg) ? 1 : -1;\n }\n // end点相同无所谓,其不参与运算,因为每次end线段先出栈ael\n });\n // console.log(x, y, arr.map(item => item.isStart + ', ' + item.seg.toString()));\n listY.push({\n y: parseFloat(y),\n arr,\n })\n });\n listX.push({\n x: parseFloat(x),\n arr: listY.sort(function(a, b) {\n return a.y - b.y;\n }),\n });\n });\n listX.sort(function(a, b) {\n return a.x - b.x;\n });\n let list = [];\n listX.forEach(item => {\n item.arr.forEach(item => {\n list = list.concat(item.arr);\n });\n });\n return list;\n}\n\nfunction putHashXY(hashXY, x, y, seg, isStart) {\n let hash = hashXY[x] = hashXY[x] || {};\n let list = hash[y] = hash[y] || [];\n list.push({\n isStart,\n seg,\n });\n}\n\n// pt在线段left -> right的上方或线上\nfunction pointAboveOrOnLine(pt, left, right) {\n let { x, y } = pt;\n let { x: x1, y: y1 } = left;\n let { x: x2, y: y2 } = right;\n return vector.crossProduct(x1 - x, y1 - y, x2 - x, y2 - y) >= 0;\n}\n\n// a是否在b的上边,取x相同部分看y大小,只有start点事件时才判断\nfunction segAboveCompare(segA, segB) {\n let ca = segA.coords, cb = segB.coords;\n let la = ca.length, lb = cb.length;\n let a1 = ca[0], b1 = cb[0];\n // 两条直线用向量积判断,注意开始点是否相同即可\n if(la === 2 && lb === 2) {\n let a2 = ca[1], b2 = cb[1];\n if(a1.equal(b1)) {\n return pointAboveOrOnLine(a2, b1, b2);\n }\n else {\n return pointAboveOrOnLine(a1, b1, b2);\n }\n }\n // a是竖线的话看另一条在左还是右,左的话a在下,否则在上,因为此时只可能是左和a尾相连或右和a首相连\n if(la === 2 && a1.x === ca[1].x) {\n return b1.x >= a1.x;\n }\n // 如果有曲线,取二者x共同的区域部分[x1, x3],以及区域中点x2,这3个点不可能都重合,一定会有某点的y比较大小\n let x1 = Math.max(a1.x, b1.x), x3 = Math.min(ca[la - 1].x, cb[lb - 1].x), x2 = x1 + (x3 - x1) * 0.5;\n if(a1 !== b1) {\n let y1 = getYByX(ca, x1), y2 = getYByX(cb, x1);\n if(y1 !== y2) {\n return y1 > y2;\n }\n }\n if(ca[la - 1] !== cb[lb - 1]) {\n let y1 = getYByX(ca, x3), y2 = getYByX(cb, x3);\n if(y1 !== y2) {\n return y1 > y2;\n }\n }\n let y1 = getYByX(ca, x2), y2 = getYByX(cb, x2);\n if(y1 !== y2) {\n return y1 > y2;\n }\n}\n\n// 获取曲线单调性t值,有结果才返回\nfunction getBezierMonotonicity(coords, isX) {\n if(coords.length === 3) {\n let t = isX\n ? (coords[0].x - coords[1].x) / (coords[0].x - 2 * coords[1].x + coords[2].x)\n : (coords[0].y - coords[1].y) / (coords[0].y - 2 * coords[1].y + coords[2].y);\n if(t > 0 && t < 1) {\n return [t];\n }\n }\n else if(coords.length === 4) {\n let t = equation.getRoots([\n isX\n ? 3 * (coords[1].x - coords[0].x)\n : 3 * (coords[1].y - coords[0].y),\n isX\n ? 6 * (coords[2].x + coords[0].x - 2 * coords[1].x)\n : 6 * (coords[2].y + coords[0].y - 2 * coords[1].y),\n isX\n ? 3 * (coords[3].x + 3 * coords[1].x - coords[0].x - 3 * coords[2].x)\n : 3 * (coords[3].y + 3 * coords[1].y - coords[0].y - 3 * coords[2].y)\n ]).filter(i => i > 0 && i < 1);\n if(t.length) {\n return t.sort(function(a, b) {\n return a - b;\n });\n }\n }\n}\n\n// 根据x的值解得t后获取y,由于线段已经x单调,所以解只会有1个而非多个\nfunction getYByX(coords, x) {\n let len = coords.length;\n if(x === coords[0].x) {\n return coords[0].y;\n }\n if(x === coords[len - 1].x) {\n return coords[len - 1].y;\n }\n if(len === 2) {\n if(coords[0].y === coords[1].y) {\n return coords[0].y;\n }\n let p = (x - coords[0].x) / (coords[1].x - coords[0].x);\n return coords[0].y + p * (coords[1].y - coords[0].y);\n }\n else if(len === 3) {\n let t = equation.getRoots([\n coords[0].x - x,\n 2 * (coords[1].x - coords[0].x),\n coords[2].x + coords[0].x - 2 * coords[1].x,\n ]).filter(i => i >= 0 && i <= 1);\n let pts = coords.map(item => [item.x, item.y]);\n return bezier.pointAtByT(pts, t[0])[1];\n }\n else if(len === 4) {\n let t = equation.getRoots([\n coords[0].x - x,\n 3 * (coords[1].x - coords[0].x),\n 3 * (coords[2].x + coords[0].x - 2 * coords[1].x),\n coords[3].x + 3 * coords[1].x - coords[0].x - 3 * coords[2].x\n ]).filter(i => i >= 0 && i <= 1);\n let pts = coords.map(item => [item.x, item.y]);\n return bezier.pointAtByT(pts, t[0])[1];\n }\n}\n\nfunction isRectsOverlap(bboxA, bboxB, lenA, lenB) {\n if(lenA === 2 && lenB === 2) {\n // 2条垂线特殊考虑,此时x范围都是0,只能比较y\n if(bboxA[0] === bboxA[2] && bboxB[0] === bboxB[2] && bboxA[0] === bboxA[2]) {\n if(bboxA[1] >= bboxB[3] || bboxB[1] >= bboxA[3]) {\n return false;\n }\n return true;\n }\n // 2条水平线也是\n if(bboxA[1] === bboxA[3] && bboxB[1] === bboxB[3] && bboxA[1] === bboxA[1]) {\n if(bboxA[0] >= bboxB[2] || bboxB[0] >= bboxA[2]) {\n return false;\n }\n return true;\n }\n }\n return geom.isRectsOverlap(bboxA, bboxB);\n}\n\nfunction checkOverlapLine(ax1, ay1, ax2, ay2, segA,\n bx1, by1, bx2, by2, segB, isY) {\n let ra = [], rb = [];\n let coordsA = segA.coords, coordsB = segB.coords;\n if(ax1 < bx1 && !isY || ay1 < by1 && isY) {\n ra.push(new Segment([\n coordsA[0],\n coordsB[0],\n ], segA.belong));\n if(ax2 < bx2 && !isY || ay2 < by2 && isY) {\n ra.push(new Segment([\n coordsB[0],\n coordsA[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsB[0],\n coordsA[1],\n ], segB.belong));\n rb.push(new Segment([\n coordsA[1],\n coordsB[1],\n ], segB.belong));\n }\n else if(ax2 === bx2 && !isY || ay2 === by2 && isY) {\n ra.push(new Segment([\n coordsB[0],\n coordsB[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsB[0],\n coordsB[1],\n ], segB.belong));\n }\n else {\n ra.push(new Segment([\n coordsB[0],\n coordsB[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsB[0],\n coordsB[1],\n ], segB.belong));\n ra.push(new Segment([\n coordsB[1],\n coordsA[1],\n ], segA.belong));\n }\n }\n // 不会出现完全重合即ax2 == bx2\n else if(ax1 === bx1 && !isY || ay1 === by1 && isY) {\n if(ax2 < bx2 && !isY || ay2 < by2 && isY) {\n ra.push(new Segment([\n coordsA[0],\n coordsA[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsA[0],\n coordsA[1],\n ], segB.belong));\n rb.push(new Segment([\n coordsA[1],\n coordsB[1],\n ], segB.belong));\n }\n else {\n ra.push(new Segment([\n coordsB[0],\n coordsB[1],\n ], segA.belong));\n ra.push(new Segment([\n coordsB[1],\n coordsA[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsB[0],\n coordsB[1],\n ], segB.belong));\n }\n }\n // ax1 > bx1\n else {\n rb.push(new Segment([\n coordsB[0],\n coordsA[0],\n ], segB.belong));\n if(ax2 < bx2 && !isY || ay2 < by2 && isY) {\n ra.push(new Segment([\n coordsA[0],\n coordsA[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsA[0],\n coordsA[1],\n ], segB.belong));\n rb.push(new Segment([\n coordsA[1],\n coordsB[1],\n ], segB.belong));\n }\n else if(ax2 === bx2 && !isY || ay2 === by2 && isY) {\n ra.push(new Segment([\n coordsA[0],\n coordsA[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsA[0],\n coordsA[1],\n ], segB.belong));\n }\n else {\n ra.push(new Segment([\n coordsA[0],\n coordsB[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsA[0],\n coordsB[1],\n ], segB.belong));\n ra.push(new Segment([\n coordsB[1],\n coordsA[1],\n ], segA.belong));\n }\n }\n return {\n ra,\n rb,\n };\n}\n\nfunction checkOverlapBezier(segA, segB) {\n let ca = segA.coords.map(item => [item.x, item.y]), la = ca.length;\n let cb = segB.coords.map(item => [item.x, item.y]), lb = cb.length;\n let firstA = ca[0], firstB = cb[0], lastA = ca[la - 1], lastB = cb[lb - 1];\n let t1 = bezier.getPointT(ca, firstB[0], firstB[1]);\n let t2 = bezier.getPointT(ca, lastB[0], lastB[1]);\n let t3 = bezier.getPointT(cb, firstA[0], firstA[1]);\n let t4 = bezier.getPointT(cb, lastA[0], lastA[1]);\n // console.warn(segA.toString());console.warn(segB.toString());\n // console.log(t1, t2, t3, t4);\n let l1 = t1.length, l2 = t2.length, l3 = t3.length, l4 = t4.length;\n /**\n * 重合有3种情况,对应4个t(每方各2个)的情况不同:\n * a. 一个包含另外一个,这样其中一方t为空,另一方t为2个即两个端点各1\n * b. 一对端点重合另外一侧包含,比上面的t多1个即空的那方t多1\n * c. 普通部分重合,每方各有1个t\n */\n let conditionA = l1 === 1 && l2 === 1 && l3 === 0 && l4 === 0 || l1 === 0 && l2 === 0 && l3 === 1 && l4 === 1;\n let conditionB = l1 === 1 && l2 === 1 && l3 + l4 === 1 || l1 + l2 === 1 && l3 === 1 && l4 === 1;\n let conditionC = l1 + l2 === 1 && l3 + l4 === 1;\n if(conditionA || conditionB || conditionC) {\n let startA = l1 ? t1[0] : 0;\n let endA = l2 ? t2[0] : 1;\n let a = bezier.sliceBezier2Both(ca, startA, endA);\n let startB = l3 ? t3[0] : 0;\n let endB = l4 ? t4[0] : 1;\n let b = bezier.sliceBezier2Both(cb, startB, endB);\n // console.log(startA, endA, startB, endB);\n // 确定重合之后就是截取,重合一定出现在左右的中间部分,这样只要分别判断左右两端是否需要各自裁剪即可\n if(equalBezier(a, b)) {\n let over = a.map(item => new Point(item));\n // console.log(over);\n let ra = [], rb = [];\n if(startA > 0) {\n let s = bezier.sliceBezier2Both(ca, 0, startA);\n let arr = [\n segA.coords[0],\n new Point(s[1]),\n segB.coords[0],\n ];\n if(la === 4) {\n arr.splice(2, 0, new Point(s[2]));\n }\n ra.push(new Segment(arr, segA.belong));\n }\n ra.push(new Segment(over, segA.belong)); // 重合的部分\n if(endA < 1) {\n let s = bezier.sliceBezier2Both(ca, endA, 1);\n let arr = [\n segB.coords[lb - 1],\n new Point(s[1]),\n segA.coords[la - 1],\n ];\n if(la === 4) {\n arr.splice(2, 0, new Point(s[2]));\n }\n ra.push(new Segment(arr, segA.belong));\n }\n if(startB > 0) {\n let s = bezier.sliceBezier2Both(cb, 0, startB);\n let arr = [\n segB.coords[0],\n new Point(s[1]),\n segA.coords[0],\n ];\n if(lb === 4) {\n arr.splice(2, 0, new Point(s[2]));\n }\n rb.push(new Segment(arr, segB.belong));\n }\n rb.push(new Segment(over, segB.belong)); // 重合的部分\n if(endB < 1) {\n let s = bezier.sliceBezier2Both(cb, endB, 1);\n let arr = [\n segA.coords[la - 1],\n new Point(s[1]),\n segB.coords[lb - 1],\n ];\n if(lb === 4) {\n arr.splice(2, 0, new Point(s[2]));\n }\n rb.push(new Segment(arr, segB.belong));\n }\n // console.log(ra.map(item => item.toString()));\n // console.log(rb.map(item => item.toString()));\n return {\n ra,\n rb,\n };\n }\n }\n}\n\nfunction equalBezier(a, b) {\n for(let i = 0, len = a.length; i < len; i++) {\n let ai = a[i], bi = b[i];\n if(Math.abs(ai[0] - bi[0]) > 1e-9 || Math.abs(ai[1] - bi[1]) > 1e-9) {\n return false;\n }\n }\n return true;\n}\n\nexport default Polygon;\n","import geom from '../geom';\n\n// 新线段添加到某个链上后,要先检查是否能合其它链连起来,再检查闭合情况\nfunction join(res, chains, chain, index, pt, isHead) {\n for(let i = 0, len = chains.length; i < len; i++) {\n let item = chains[i];\n if(item !== chain) {\n let l = item.length;\n let head = item[0], tail = item[l - 1];\n let ptHead = head.coords[0];\n let coords = tail.coords, l2 = coords.length;\n let ptTail = coords[l2 - 1];\n if(pt.equal(ptHead)) {\n if(isHead) {\n item = reverse(chain).concat(item);\n chains[i] = item;\n chains.splice(index, 1);\n return close(res, chains, item, i);\n }\n else {\n item = chain.concat(item);\n chains[i] = item;\n chains.splice(index, 1);\n return close(res, chains, item, i);\n }\n }\n else if(pt.equal(ptTail)) {\n if(isHead) {\n item = item.concat(chain);\n chains[i] = item;\n chains.splice(index, 1);\n return close(res, chains, item, i);\n }\n else {\n item = item.concat(reverse(chain));\n chains[i] = item;\n chains.splice(index, 1);\n return close(res, chains, item, i);\n }\n }\n }\n }\n // 无法和别的链接,也要检查自身闭合\n close(res, chains, chain, index);\n}\n\nfunction close(res, chains, chain, index) {\n let l = chain.length;\n let head = chain[0], tail = chain[l - 1];\n let ptHead = head.coords[0];\n let coords2 = tail.coords, l2 = coords2.length;\n let ptTail = coords2[l2 - 1];\n if(ptHead.equal(ptTail)) {\n chains.splice(index, 1);\n res.push(chain);\n }\n}\n\n// 整条链颠倒,包含每个线段自身颠倒\nfunction reverse(chain) {\n chain.forEach(item => item.reverse());\n return chain.reverse();\n}\n\nexport default function(list) {\n let chains = [], res = [];\n // 在对方内部的排在前面,这样会优先形成包含情况而不是交叉\n list.sort(function(a, b) {\n if(b.otherFill[0] && b.otherFill[1]) {\n return 1;\n }\n return -1;\n });\n outer:\n while(list.length) {\n let seg = list.shift(), coords = seg.coords, len = coords.length;\n let start = coords[0], end = coords[len - 1];\n let temp;\n // 尝试追加到某条链中,互相头尾链接可能有4种情况,其中2种会reverse线段首尾\n for(let i = 0, len = chains.length; i < len; i++) {\n let chain = chains[i], l = chain.length;\n let head = chain[0], tail = chain[l - 1];\n let ptHead = head.coords[0];\n let coords2 = tail.coords, l2 = coords2.length;\n let ptTail = coords2[l2 - 1];\n if(start.equal(ptTail)) {\n if(seg.belong !== tail.belong) {\n chain.push(seg);\n join(res, chains, chain, i, end, false);\n continue outer;\n }\n else if(!temp) {\n temp = {i, t: 0};\n }\n }\n else if(start.equal(ptHead)) {\n if(seg.belong !== tail.belong) {\n seg.reverse();\n chain.unshift(seg);\n join(res, chains, chain, i, end, true);\n continue outer;\n }\n else if(!temp) {\n temp = {i, t: 1};\n }\n }\n else if(end.equal(ptTail)) {\n if(seg.belong !== tail.belong) {\n seg.reverse();\n chain.push(seg);\n join(res, chains, chain, i, start, false);\n continue outer;\n }\n else if(!temp) {\n temp = {i, t: 2};\n }\n }\n else if(end.equal(ptHead)) {\n if(seg.belong !== tail.belong) {\n chain.unshift(seg);\n join(res, chains, chain, i, start, true);\n continue outer;\n }\n else if(!temp) {\n temp = {i, t: 3};\n }\n }\n }\n // 如果没有优先添加对方的线段形成包含,则到这里检查是否有己方的进行链接\n if(temp) {\n if(temp.t === 0) {\n chains[temp.i].push(seg);\n join(res, chains, chains[temp.i], temp.i, end, false);\n }\n else if(temp.t === 1) {\n seg.reverse();\n chains[temp.i].unshift(seg);\n join(res, chains, chains[temp.i], temp.i, end, true);\n }\n else if(temp.t === 2) {\n seg.reverse();\n chains[temp.i].push(seg);\n join(res, chains, chains[temp.i], temp.i, start, false);\n }\n else if(temp.t === 3) {\n chains[temp.i].unshift(seg);\n join(res, chains, chains[temp.i], temp.i, start, true);\n }\n }\n // 找不到则生成新链\n else {\n chains.push([seg]);\n }\n }\n // 鞋带公式求得每个多边形的时钟序 https://zhuanlan.zhihu.com/p/401010594\n let v = res.map(item => {\n // let isInner = true, isOuter = true;\n let clockwise = true;\n let s = 0, lastX, lastY, minX, minY, maxX, maxY;\n item.forEach((seg, i) => {\n // 内部是指边的两侧都是对方填充说明在内部\n // if(!seg.otherFill[0] || !seg.otherFill[1]) {\n // isInner = false;\n // }\n // // 外部是指边的一侧为空\n // if(!seg.myFill[0] && !seg.otherFill[0] || !seg.myFill[1] && !seg.otherFill[1]) {}\n // else {\n // isOuter = false;\n // }\n let coords = seg.coords, len = coords.length, bbox = seg.bbox;\n if(i) {\n minX = Math.min(minX, bbox[0]);\n minY = Math.min(minY, bbox[1]);\n maxX = Math.max(maxX, bbox[2]);\n maxY = Math.max(maxY, bbox[3]);\n }\n else {\n minX = bbox[0];\n minY = bbox[1];\n maxX = bbox[2];\n maxY = bbox[3];\n }\n if(len === 2) {\n if(i) {\n s += lastX * coords[1].y - lastY * coords[1].x;\n }\n else {\n s += coords[0].x * coords[1].y - coords[0].y * coords[1].x;\n }\n lastX = coords[1].x;\n lastY = coords[1].y;\n }\n else if(len === 3) {\n if(i) {\n s += lastX * coords[2].y - lastY * coords[2].x;\n }\n else {\n s += coords[0].x * coords[1].y - coords[0].y * coords[2].x;\n }\n lastX = coords[2].x;\n lastY = coords[2].y;\n }\n else if(len === 4) {\n if(i) {\n s += lastX * coords[3].y - lastY * coords[3].x;\n }\n else {\n s += coords[0].x * coords[3].y - coords[0].y * coords[3].x;\n }\n lastX = coords[3].x;\n lastY = coords[3].y;\n }\n });\n // 首个顶点重合\n let first = item[0], coords = first.coords;\n s += lastX * coords[0].y - lastY * coords[0].x;\n if(s < 0) {\n clockwise = false;\n }\n return {\n // isInner,\n // isOuter,\n list: item,\n clockwise,\n bbox: [minX, minY, maxX, maxY],\n area: (maxX - minX) * (maxY - minY),\n };\n });\n v.forEach(item => {\n if(item.checked) {\n return;\n }\n let bbox = item.bbox;\n let list = [item];\n for(let i = 0, len = v.length; i < len; i++) {\n let item2 = v[i];\n if(item2 !== item) {\n // 互相包含则存入列表\n if(geom.isRectsInside(bbox, item2.bbox, true) || geom.isRectsInside(item2.bbox, bbox, true)) {\n list.push(item2);\n }\n }\n }\n // 按面积排序,最小的即最里面的在前面\n if(list.length > 1) {\n list.sort(function(a, b) {\n return a.area - b.area;\n });\n // 可能存在已经排过序的,例如外围a包含了内部的b和c,b和c互不相交,a和b已经调整过排序了,a和c再调整则a已经checked\n for(let i = 1, len = list.length;i < len; i++) {\n let item = list[i];\n if(item.checked) {\n let clockwise = item.clockwise;\n for(let j = i - 1; j >= 0; j--) {\n let item2 = list[j];\n item2.checked = true;\n if(item2.clockwise === clockwise) {\n reverse(item2.list);\n item2.clockwise = !clockwise;\n }\n clockwise = !clockwise;\n }\n clockwise = item.clockwise;\n for(let j = i + 1; j < len; j++) {\n let item2 = list[j];\n item2.checked = true;\n if(item2.clockwise === clockwise) {\n reverse(item2.list);\n item2.clockwise = !clockwise;\n }\n clockwise = !clockwise;\n }\n return;\n }\n }\n // 新的依次时钟序互相颠倒\n let clockwise = list[0].clockwise;\n list[0].checked = true;\n for(let i = 1, len = list.length;i < len; i++) {\n let item = list[i];\n item.checked = true;\n if(item.clockwise === clockwise) {\n reverse(item.list);\n item.clockwise = !clockwise;\n }\n clockwise = !clockwise;\n }\n }\n });\n return v.map(item => {\n let list = item.list.map(seg => {\n let coords = seg.coords, len = coords.length;\n if(len === 2) {\n return [coords[1].x, coords[1].y];\n }\n else if(len === 3) {\n return [coords[1].x, coords[1].y, coords[2].x, coords[2].y];\n }\n else if(len === 4) {\n return [coords[1].x, coords[1].y, coords[2].x, coords[2].y, coords[3].x, coords[3].y];\n }\n });\n // 首个顶点重合\n let first = item.list[0], coords = first.coords;\n list.unshift([coords[0].x, coords[0].y]);\n return list;\n });\n}\n","import Polygon from './Polygon';\nimport chain from './chain';\n\n// 多边形都是多个区域,重载支持外部传入1个区域则数组化\nfunction prefix(polygon) {\n if(!polygon || !Array.isArray(polygon) || !Array.isArray(polygon[0])) {\n return [];\n }\n if(Array.isArray(polygon[0][0])) {\n return polygon;\n }\n return [polygon];\n}\n\nfunction trivial(polygonA, polygonB) {\n let isIntermediateA = polygonA instanceof Polygon;\n let isIntermediateB = polygonB instanceof Polygon;\n // 生成多边形对象,相交线段拆分开来,曲线x单调性裁剪,重合线段标记\n let source;\n if(isIntermediateA) {\n source = polygonA.reset(0);\n }\n else {\n source = new Polygon(prefix(polygonA), 0);\n source.selfIntersect();\n }\n // console.log(source.toString());\n let clip;\n if(isIntermediateB) {\n clip = polygonB.reset(1);\n }\n else {\n clip = new Polygon(prefix(polygonB), 1);\n clip.selfIntersect();\n }\n // console.log(clip.toString());\n // console.log('----');\n // 两个多边形之间再次互相判断相交\n Polygon.intersect2(source, clip, isIntermediateA, isIntermediateB);\n // console.log(source.toString());\n // console.log(clip.toString());\n // console.log('====');\n Polygon.annotate2(source, clip, isIntermediateA, isIntermediateB);\n // console.log(source.toString());\n // console.log(clip.toString());\n return [source, clip];\n}\n\nconst INTERSECT = [\n 0, 0, 0, 1,\n 0, 0, 0, 1,\n 0, 0, 0, 1,\n 1, 1, 1, 0,\n], UNION = [\n 0, 1, 1, 1,\n 1, 0, 0, 0,\n 1, 0, 0, 0,\n 1, 0, 0, 0,\n], SUBTRACT = [\n 0, 0, 1, 0,\n 0, 0, 1, 0,\n 1, 1, 0, 1,\n 0, 0, 1, 0,\n], SUBTRACT_REV = [\n 0, 1, 0, 0,\n 1, 0, 1, 1,\n 0, 1, 0, 0,\n 0, 1, 0, 0,\n], XOR = [\n 0, 1, 1, 0,\n 1, 0, 0, 1,\n 1, 0, 0, 1,\n 0, 1, 1, 0,\n];\n\nfunction filter(segments, matrix) {\n let res = [], hash = {};\n segments.forEach(seg => {\n let { belong, myFill, otherFill, otherCoincide } = seg;\n if(otherCoincide) {\n // 对方重合线只出现一次\n let hc = seg.toHash();\n if(hash.hasOwnProperty(hc)) {\n return;\n }\n hash[hc] = true;\n }\n let i;\n if(belong) {\n i = (otherFill[0] ? 8 : 0)\n + (myFill[0] ? 4 : 0)\n + (otherFill[1] ? 2 : 0)\n + (myFill[1] ? 1 : 0);\n }\n else {\n i = (myFill[0] ? 8 : 0)\n + (otherFill[0] ? 4 : 0)\n + (myFill[1] ? 2 : 0)\n + (otherFill[1] ? 1 : 0);\n }\n if(matrix[i]) {\n res.push(seg);\n }\n });\n // console.log(res.map(item => item.toString()));\n return res;\n}\n\nexport default {\n intersect(polygonA, polygonB, intermediate) {\n let [source, clip] = trivial(polygonA, polygonB);\n let list = filter(source.segments.concat(clip.segments), INTERSECT);\n if(intermediate) {\n source.segments = list;\n return source;\n }\n return chain(list);\n },\n union(polygonA, polygonB, intermediate) {\n let [source, clip] = trivial(polygonA, polygonB);\n let list = filter(source.segments.concat(clip.segments), UNION);\n if(intermediate) {\n source.segments = list;\n return source;\n }\n return chain(list);\n },\n subtract(polygonA, polygonB, intermediate) {\n let [source, clip] = trivial(polygonA, polygonB);\n let list = filter(source.segments.concat(clip.segments), SUBTRACT);\n if(intermediate) {\n source.segments = list;\n return source;\n }\n return chain(list);\n },\n subtractRev(polygonA, polygonB, intermediate) {\n let [source, clip] = trivial(polygonA, polygonB);\n let list = filter(source.segments.concat(clip.segments), SUBTRACT_REV);\n if(intermediate) {\n source.segments = list;\n return source;\n }\n return chain(list);\n },\n xor(polygonA, polygonB, intermediate) {\n let [source, clip] = trivial(polygonA, polygonB);\n let list = filter(source.segments.concat(clip.segments), XOR);\n if(intermediate) {\n source.segments = list;\n return source;\n }\n return chain(list);\n },\n chain(polygon) {\n if(polygon instanceof Polygon) {\n return chain(polygon.segments);\n }\n return prefix(polygon);\n },\n};\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport bezier from '../../math/bezier';\nimport bo from '../../math/bo/index';\nimport mode from '../../refresh/mode';\n\nlet { intersect, union, subtract, subtract2, xor, chain } = bo;\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n} } = enums;\nconst { isNil } = util;\n\nfunction concatPointAndControl(point, control) {\n if(Array.isArray(control) && (control.length === 2 || control.length === 4)\n && Array.isArray(point) && point.length === 2) {\n return control.concat(point);\n }\n return point;\n}\n\nfunction getLength(list, isMulti) {\n let res = [];\n let total = 0;\n let increase = [];\n if(isMulti) {\n total = [];\n list.forEach(list => {\n let temp = getLength(list);\n res.push(temp.list);\n total.push(temp.total);\n increase.push([0].concat(temp.increase));\n });\n }\n else if(Array.isArray(list)) {\n total = 0;\n increase.push(0);\n let start = 0;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(Array.isArray(item)) {\n start = i;\n break;\n }\n }\n let prev = list[start];\n for(let i = start + 1, len = list.length; i < len; i++) {\n let item = list[i];\n if(!Array.isArray(item)) {\n continue;\n }\n if(item.length === 2) {\n let a = Math.abs(item[0] - prev[0]);\n let b = Math.abs(item[1] - prev[1]);\n let c = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));\n res.push(c);\n total += c;\n increase.push(total);\n prev = item;\n }\n else if(item.length === 4) {\n let c = bezier.bezierLength([prev, [item[0], item[1]], [item[2], item[3]]]);\n res.push(c);\n total += c;\n increase.push(total);\n prev = [item[2], item[3]];\n }\n else if(item.length === 6) {\n let c = bezier.bezierLength([prev, [item[0], item[1]], [item[2], item[3]], [item[4], item[5]]]);\n res.push(c);\n total += c;\n increase.push(total);\n prev = [item[4], item[5]];\n }\n }\n }\n return {\n list: res,\n total,\n increase,\n };\n}\n\nfunction getIndex(list, t, i, j) {\n if(i === j) {\n if(list[i] > t) {\n return i - 1;\n }\n return i;\n }\n let middle = i + ((j - i) >> 1);\n if(list[middle] === t) {\n return middle;\n }\n else if(list[middle] > t) {\n return getIndex(list, t, i, Math.max(middle - 1, i));\n }\n else {\n return getIndex(list, t, Math.min(middle + 1, j), j);\n }\n}\n\nfunction getNewList(list, len, start = 0, end = 1) {\n if(start === 0 && end === 1) {\n return list;\n }\n if(start === end) {\n return [];\n }\n if(start > end) {\n [start, end] = [end, start];\n }\n // start和end只能相差<=1,如果>1则校正\n while(end - start > 1) {\n end--;\n }\n // 将start和end统一至最接近0的正值\n while(end < 0 || start < 0) {\n end++;\n start++;\n }\n while(end >= 1 && start >= 1) {\n end--;\n start--;\n }\n // clone出原本顶点列表,防止干扰\n let length = list.length;\n list = util.clone(list);\n let res = [];\n let start2 = start > 1 ? (start - 1) : start;\n let end2 = end > 1 ? (end - 1) : end;\n let i = getIndex(len.increase, start2 * len.total, 0, length - 1);\n let j = getIndex(len.increase, end2 * len.total, 0, length - 1);\n // start<0或者end>1或者普通情况,一共3种,start和end不可能同时超限\n let isStartLt0 = start < 0;\n let isEndGt1 = end > 1;\n end2 *= len.total;\n let prePercent = 1;\n let endPoint;\n if(end2 > len.increase[j]) {\n let prev = list[j].slice(list[j].length - 2); // 最后2个点是x,y,前面是control\n let current = list[j + 1];\n let l = len.list[j];\n let diff = end2 - len.increase[j];\n let t = diff / l;\n prePercent = t;\n if(current.length === 2) {\n let a = current[0] - prev[0];\n let b = current[1] - prev[1];\n if(isEndGt1) {\n endPoint = [prev[0] + t * a, prev[1] + t * b];\n }\n else {\n t = 1 - t;\n endPoint = [current[0] - t * a, current[1] - t * b];\n }\n }\n else if(current.length === 4) {\n let r = bezier.sliceBezier([prev, [current[0], current[1]], [current[2], current[3]]], t);\n endPoint = [r[1][0], r[1][1], r[2][0], r[2][1]];\n }\n else if(current.length === 6) {\n let r = bezier.sliceBezier([prev, [current[0], current[1]], [current[2], current[3]], [current[4], current[5]]], t);\n endPoint = [r[1][0], r[1][1], r[2][0], r[2][1], r[3][0], r[3][1]];\n }\n }\n start2 *= len.total;\n if(start2 > len.increase[i]) {\n let current;\n let prev = list[i].slice(list[i].length - 2);\n let l = len.list[i];\n // 同一条线段时如果有end裁剪,会影响start长度,这里还要防止头尾绕了一圈的情况\n if(i === j && !isStartLt0 && !isEndGt1 && prePercent !== 1) {\n l *= prePercent;\n if(endPoint) {\n current = endPoint;\n }\n }\n if(!current) {\n current = list[i + 1];\n }\n let diff = start2 - len.increase[i];\n let t = diff / l;\n if(current.length === 2) {\n let a = current[0] - prev[0];\n let b = current[1] - prev[1];\n if(isStartLt0) {\n t = 1 - t;\n res.push([current[0] - t * a, current[1] - t * b]);\n }\n else {\n res.push([prev[0] + t * a, prev[1] + t * b]);\n }\n res.push(current);\n }\n else if(current.length === 4) {\n let r = bezier.sliceBezier([[current[2], current[3]], [current[0], current[1]], prev], 1 - t).reverse();\n res.push(r[0]);\n res.push([r[1][0], r[1][1], r[2][0], r[2][1]]);\n // 同一条线段上去除end冲突\n if(i === j && !isStartLt0 && !isEndGt1) {\n endPoint = null;\n }\n }\n else if(current.length === 6) {\n let r = bezier.sliceBezier([[current[4], current[5]], [current[2], current[3]], [current[0], current[1]], prev], 1 - t).reverse();\n res.push(r[0])\n res.push([r[1][0], r[1][1], r[2][0], r[2][1], current[4], current[5]]);\n if(i === j && !isStartLt0 && !isEndGt1) {\n endPoint = null;\n }\n }\n }\n // start和end之间的线段,注意头尾饶了一圈的情况,以及起始点被上方考虑过了\n for(let k = i + 2; k <= j + (!isStartLt0 && !isEndGt1 ? 0 : length); k++) {\n res.push(list[k % length]);\n }\n if(endPoint) {\n res.push(endPoint);\n }\n return res;\n}\n\nclass Polyline extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 所有点的列表\n if(this.isMulti) {\n this.__points = [[]];\n this.__controls = [[]];\n this.__start = [0];\n this.__end = [1];\n if(Array.isArray(props.start)) {\n this.__start = props.start.map(i => parseFloat(i) || 0);\n for(let i = this.__start.length; i < this.__points.length; i++) {\n this.__start.push(0);\n }\n }\n else if(!isNil(props.start)) {\n let v = parseFloat(props.start) || 0;\n this.__start = this.__points.map(() => v);\n }\n if(Array.isArray(props.end)) {\n this.__end = props.end.map(i => {\n let v = parseFloat(i);\n if(isNaN(v)) {\n v = 1;\n }\n return v;\n });\n for(let i = this.__end.length; i < this.__points.length; i++) {\n this.__end.push(1);\n }\n }\n else if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n this.__end = this.__points.map(() => v);\n }\n }\n else {\n this.__points = [];\n // 控制点\n this.__controls = [];\n this.__start = 0;\n this.__end = 1;\n if(!isNil(props.start)) {\n this.__start = parseFloat(props.start) || 0;\n }\n if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n this.__end = v;\n }\n }\n if(Array.isArray(props.controls)) {\n this.__controls = props.controls;\n }\n if(Array.isArray(props.points)) {\n this.__points = props.points;\n }\n if(props.booleanOperations) {\n this.__booleanOperations = props.booleanOperations;\n }\n }\n\n calContent(currentStyle, computedStyle) {\n let res = super.calContent(currentStyle, computedStyle);\n // 查看是否有顶点\n if(res && !this.__hasXomContent) {\n let { currentProps: { points }, isMulti } = this;\n if(isMulti) {\n for(let i = 0, len = points.length; i < len; i++) {\n if(points.length) {\n return true;\n }\n }\n }\n else {\n if(points.length) {\n return true;\n }\n }\n }\n return res;\n }\n\n __getPoints(originX, originY, width, height, points, isControl) {\n return points.map(item => {\n if(!Array.isArray(item)) {\n return;\n }\n let len = item.length;\n if(isControl) {\n if(len !== 0 && len !== 2 && len !== 4) {\n return;\n }\n }\n else {\n if(len !== 0 && len !== 2) {\n return;\n }\n }\n let res = [];\n for(let i = 0; i < len; i++) {\n if(i % 2 === 0) {\n res.push(originX + item[i] * width);\n }\n else {\n res.push(originY + item[i] * height);\n }\n }\n return res;\n });\n }\n\n // 供polygon覆盖,后处理booleanOperations\n __reprocessing(list, isMulti) {\n if(!isMulti || list.length < 2) {\n return list;\n }\n let bo = this.booleanOperations, len = list.length;\n if(!bo) {\n return list;\n }\n if(!Array.isArray(bo)) {\n let old = bo;\n bo = [bo];\n for(let i = 1; i < len - 1; i++) {\n bo.push(old);\n }\n }\n if(Array.isArray(bo) && bo.length) {\n let res = [], temp = list[0];\n for(let i = 1; i < len; i++) {\n let op = (bo[i - 1] || '').toString().toLowerCase();\n let cur = list[i];\n if(['intersect', 'intersection', 'union', 'subtract', 'subtract2', 'diff', 'difference', 'xor'].indexOf(op) === -1) {\n res = res.concat(chain(temp));\n temp = cur || [];\n continue;\n }\n switch(op) {\n case 'intersect':\n case 'intersection':\n temp = intersect(temp, cur, true);\n break;\n case 'union':\n temp = union(temp, cur, true);\n break;\n case 'subtract':\n case 'diff':\n case 'difference':\n temp = subtract(temp, cur, true);\n break;\n case 'subtract2':\n temp = subtract2(temp, cur, true);\n break;\n case 'xor':\n temp = xor(temp, cur, true);\n break;\n }\n }\n return res.concat(chain(temp));\n }\n return list;\n }\n\n // 同polygon覆盖,booleanOperations改变时需刷新缓冲顶点坐标\n __needRebuildSE(__cacheProps) {\n if(util.isNil(__cacheProps.booleanOperations)) {\n __cacheProps.booleanOperations = true;\n return true;\n }\n }\n\n buildCache(originX, originY) {\n let { width, height, points, controls, start, end, __cacheProps, isMulti } = this;\n let rebuild, rebuildSE;\n if(isNil(__cacheProps.points)) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.points = points.map(item => {\n if(Array.isArray(item)) {\n return this.__getPoints(originX, originY, width, height, item);\n }\n });\n }\n else {\n __cacheProps.points = this.__getPoints(originX, originY, width, height, points);\n }\n }\n if(isNil(__cacheProps.controls)) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.controls = controls.map(item => {\n if(Array.isArray(item)) {\n return this.__getPoints(originX, originY, width, height, item, true);\n }\n return item;\n });\n }\n else {\n __cacheProps.controls = this.__getPoints(originX, originY, width, height, controls, true);\n }\n }\n if(isNil(__cacheProps.start)) {\n rebuildSE = true;\n __cacheProps.start = start;\n }\n if(isNil(__cacheProps.end)) {\n rebuildSE = true;\n __cacheProps.end = end;\n }\n // polygon会覆盖检查booleanOperations缓存\n if(this.__needRebuildSE(__cacheProps)) {\n rebuildSE = true;\n }\n // points/controls有变化就需要重建顶点\n if(rebuild) {\n let { points, controls } = __cacheProps;\n if(isMulti) {\n __cacheProps.list2 = points.map((item, i) => {\n let cl = controls[i];\n if(Array.isArray(item)) {\n return item.map((point, j) => {\n if(j) {\n return concatPointAndControl(point, cl && cl[j - 1]);\n }\n return point;\n });\n }\n });\n __cacheProps.len = getLength(__cacheProps.list2, isMulti);\n }\n else {\n __cacheProps.list2 = points.map((point, i) => {\n if(i) {\n return concatPointAndControl(point, controls[i - 1]);\n }\n return point;\n });\n __cacheProps.len = getLength(__cacheProps.list2, isMulti);\n }\n }\n if(rebuild || rebuildSE) {\n if(isMulti) {\n __cacheProps.list = __cacheProps.list2.map((item, i) => {\n if(Array.isArray(item)) {\n let len = __cacheProps.len;\n return getNewList(item, {\n list: len.list[i],\n total: len.total[i],\n increase: len.increase[i],\n }, __cacheProps.start[i], __cacheProps.end[i]);\n }\n });\n }\n else {\n __cacheProps.list = getNewList(__cacheProps.list2, __cacheProps.len, __cacheProps.start, __cacheProps.end);\n }\n // 后处理一次,让polygon支持布尔运算\n __cacheProps.list = this.__reprocessing(__cacheProps.list, isMulti);\n }\n return rebuild || rebuildSE;\n }\n\n render(renderMode, ctx, dx, dy) {\n let res = super.render(renderMode, ctx, dx, dy);\n if(res.break || renderMode === mode.WEBGL) {\n return res;\n }\n this.buildCache(res.x3, res.y3);\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get points() {\n return this.getProps('points');\n }\n\n get controls() {\n return this.getProps('controls');\n }\n\n get start() {\n return this.getProps('start');\n }\n\n get end() {\n return this.getProps('end');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n isMulti, __cacheProps,\n __x3: originX, __y3: originY,\n computedStyle: {\n [STROKE_WIDTH]: strokeWidth,\n },\n } = this;\n this.buildCache(originX, originY);\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(half, item);\n });\n half = Math.ceil(half * 0.5) + 1;\n let { points, controls } = __cacheProps;\n if(!isMulti) {\n points = [points];\n controls = [controls];\n }\n points.forEach((pointList, i) => {\n if(!pointList || pointList.length < 2 || !pointList[0] || !pointList[1]\n || pointList[0].length < 2 || pointList[1].length < 2) {\n return;\n }\n let controlList = controls[i] || [];\n let [xa, ya] = pointList[0];\n for(let i = 1, len = pointList.length; i < len; i++) {\n let item = pointList[i];\n if(!item || item.length < 2) {\n continue;\n }\n let [xb, yb] = pointList[i];\n let c = controlList[i - 1];\n if(c && c.length === 4) {\n let bezierBox = bezier.bboxBezier(xa, ya, c[0], c[1], c[2], c[3], xb, yb);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - half);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + half);\n }\n else if(c && c.length === 2) {\n let bezierBox = bezier.bboxBezier(xa, ya, c[0], c[1], xb, yb);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - half);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + half);\n }\n else {\n bbox[0] = Math.min(bbox[0], xa - half);\n bbox[1] = Math.min(bbox[1], ya - half);\n bbox[2] = Math.max(bbox[2], xa + half);\n bbox[3] = Math.max(bbox[3], ya + half);\n }\n xa = xb;\n ya = yb;\n }\n });\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n\n get booleanOperations() {\n return this.getProps('booleanOperations');\n }\n}\n\nexport default Polyline;\n","import Polyline from './Polyline';\n\nclass Polygon extends Polyline {\n constructor(tagName, props) {\n super(tagName, props);\n }\n\n __getPoints(originX, originY, width, height, points, isControl) {\n let res = super.__getPoints(originX, originY, width, height, points, isControl);\n if(!isControl) {\n res.push(res[0]);\n }\n return res;\n }\n}\n\nexport default Polygon;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\nimport inject from '../../util/inject';\nimport mode from '../../refresh/mode';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n} } = enums;\nconst { isNil } = util;\nconst { sectorPoints } = geom;\n\nfunction getR(v, dft) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = dft;\n }\n return v;\n}\n\nclass Sector extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 角度\n if(this.isMulti) {\n this.__begin = [0];\n this.__end = [0];\n this.__r = [1];\n if(Array.isArray(props.begin)) {\n this.__begin = props.begin.map(i => getR(i, 0));\n }\n if(Array.isArray(props.end)) {\n this.__end = props.end.map(i => getR(i, 0));\n }\n if(Array.isArray(props.r)) {\n this.__r = props.r.map(i => getR(i, 1));\n }\n if(Array.isArray(props.edge)) {\n this.__edge = props.edge.map(i => !!i);\n }\n if(Array.isArray(props.closure)) {\n this.__closure = props.closure.map(i => !!i);\n }\n }\n else {\n this.__begin = this.__end = 0;\n // 半径[0, ∞),默认1\n this.__r = 1;\n // 扇形两侧是否有边\n this.__edge = false;\n // 扇形大于180°时,是否闭合两端\n this.__closure = false;\n if(!isNil(props.begin)) {\n this.__begin = getR(props.begin, 0);\n }\n if(!isNil(props.end)) {\n this.__end = getR(props.end, 0);\n }\n if(!isNil(props.r)) {\n this.__r = getR(props.r, 1);\n }\n if(!isNil(props.edge)) {\n this.__edge = !!props.edge;\n }\n if(!isNil(props.closure)) {\n this.__closure = !!props.closure;\n }\n }\n }\n\n buildCache(cx, cy, focus) {\n let { width, begin, end, r, edge, closure, __cacheProps, isMulti } = this;\n let rebuild;\n if(isNil(__cacheProps.begin) || focus) {\n rebuild = true;\n __cacheProps.begin = (begin || 0) % 360;\n }\n if(isNil(__cacheProps.end) || focus) {\n rebuild = true;\n __cacheProps.end = (end || 0) % 360;\n }\n if(isNil(__cacheProps.r) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.r = r.map(r => r * width * 0.5);\n }\n else {\n __cacheProps.r = r * width * 0.5;\n }\n }\n r = __cacheProps.r;\n if(isNil(__cacheProps.edge) || focus) {\n rebuild = true;\n __cacheProps.edge = edge;\n }\n if(isNil(__cacheProps.closure) || focus) {\n rebuild = true;\n __cacheProps.closure = closure;\n }\n if(rebuild) {\n if(isMulti) {\n __cacheProps.list = [];\n __cacheProps.sList = [];\n begin.forEach((begin, i) => {\n let r2 = isNil(r[i]) ? width * 0.5 : r[i];\n let list = sectorPoints(cx, cy, r2, parseFloat(begin || 0) % 360, parseFloat(end[i] || 0) % 360);\n let sList = list.slice(0);\n if(closure[i]) {\n list.push(list[0].slice(0));\n if(edge) {\n sList.push(sList[0].slice(0));\n }\n }\n else {\n list.unshift([cx, cy]);\n list.push([cx, cy]);\n if(edge) {\n sList.unshift([cx, cy]);\n sList.push([cx, cy]);\n }\n }\n __cacheProps.list.push(list);\n __cacheProps.sList.push(sList);\n });\n }\n else {\n let list = sectorPoints(cx, cy, r, parseFloat(begin || 0), parseFloat(end || 0));\n let sList = list.slice(0);\n if(closure) {\n list.push(list[0].slice(0));\n if(edge) {\n sList.push(sList[0].slice(0));\n }\n }\n else {\n list.unshift([cx, cy]);\n list.push([cx, cy]);\n if(edge) {\n sList.unshift([cx, cy]);\n sList.push([cx, cy]);\n }\n }\n __cacheProps.list = list;\n __cacheProps.sList = sList;\n }\n }\n return rebuild;\n }\n\n render(renderMode, ctx, dx2, dy2) {\n let res = super.render(renderMode, ctx, dx2, dy2);\n if(res.break || renderMode === mode.WEBGL) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n let {\n fill: fills,\n fillRule: fillRules,\n stroke: strokes,\n strokeWidth: strokeWidths,\n strokeDasharray: strokeDasharrays,\n strokeDasharrayStr: strokeDasharrayStrs,\n strokeLinecap: strokeLinecaps,\n strokeLinejoin: strokeLinejoins,\n strokeMiterlimit: strokeMiterlimits,\n dx,\n dy,\n } = res;\n let { __cacheProps: { list, sList }, isMulti } = this;\n // 普通情况下只有1个,按普通情况走\n if(fills.length <= 1 && strokes.length <= 1) {\n let o = {\n fill: fills[0],\n fillRule: fillRules[0],\n stroke: strokes[0],\n strokeWidth: strokeWidths[0],\n strokeDasharray: strokeDasharrays[0],\n strokeDasharrayStr: strokeDasharrayStrs[0],\n strokeLinecap: strokeLinecaps[0],\n strokeLinejoin: strokeLinejoins[0],\n strokeMiterlimit: strokeMiterlimits[0],\n dx,\n dy,\n };\n this.__renderOneSector(renderMode, ctx, isMulti, list, sList, o);\n }\n // 多个需要fill在下面,stroke在上面,依次循环\n else {\n for(let i = 0, len = fills.length; i < len; i++) {\n let fill = fills[i];\n if(fill) {\n let o = {\n fill,\n fillRule: fillRules[i],\n dx,\n dy,\n };\n this.__renderOneSector(renderMode, ctx, isMulti, list, sList, o);\n }\n }\n for(let i = 0, len = strokes.length; i < len; i++) {\n let stroke = strokes[i];\n if(stroke) {\n let o = {\n stroke,\n strokeWidth: strokeWidths[i],\n strokeDasharray: strokeDasharrays[i],\n strokeDasharrayStr: strokeDasharrayStrs[i],\n strokeLinecap: strokeLinecaps[i],\n strokeLinejoin: strokeLinejoins[i],\n strokeMiterlimit: strokeMiterlimits[i],\n dx,\n dy,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, sList, o);\n }\n }\n }\n return res;\n }\n\n __renderOneSector(renderMode, ctx, isMulti, list, sList, res) {\n let {\n fill,\n stroke,\n strokeWidth,\n } = res;\n let isFillCE = fill.k === 'conic';\n let isStrokeCE = stroke.k === 'conic';\n let isFillRE = fill.k === 'radial' && Array.isArray(fill.v);\n let isStrokeRE = strokeWidth > 0 && stroke.k === 'radial' && Array.isArray(stroke.v);\n if(isFillCE || isStrokeCE) {\n if(isFillCE) {\n this.__conicGradient(renderMode, ctx, list, isMulti, res);\n }\n else if(fill && fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n if(strokeWidth > 0 && isStrokeCE) {\n inject.warn('Stroke style can not use conic-gradient');\n }\n else if(strokeWidth > 0 && stroke && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n }\n else if(isFillRE || isStrokeRE) {\n if(isFillRE) {\n this.__radialEllipse(renderMode, ctx, list, isMulti, res, 'fill');\n }\n else if(fill && fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n // stroke椭圆渐变matrix会变形,降级为圆\n if(strokeWidth > 0 && isStrokeRE) {\n inject.warn('Stroke style can not use radial-gradient for ellipse');\n res.stroke = res.stroke.v[0];\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n else if(strokeWidth > 0 && stroke && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n }\n else {\n if(fill && fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true, false);\n }\n if(strokeWidth > 0 && stroke && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n }\n }\n\n __genSector(edge, d, fill, stroke, strokeWidth, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit) {\n if(edge) {\n let props = [\n ['d', d[0]],\n ['fill', fill.v || fill],\n ['stroke', stroke.v || stroke],\n ['stroke-width', strokeWidth],\n ];\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n this.addGeom('path', props);\n }\n else {\n this.addGeom('path', [\n ['d', d[0]],\n ['fill', fill.v || fill],\n ]);\n if(strokeWidth > 0) {\n let props = [\n ['d', d[1]],\n ['fill', 'none'],\n ['stroke', stroke.v || stroke],\n ['stroke-width', strokeWidth],\n ];\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n this.addGeom('path', props);\n }\n }\n }\n\n get begin() {\n return this.getProps('begin');\n }\n\n get end() {\n return this.getProps('end');\n }\n\n get r() {\n return this.getProps('r');\n }\n\n get edge() {\n return this.getProps('edge');\n }\n\n // >180°时是否链接端点\n get closure() {\n return this.getProps('closure');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n isMulti, __cacheProps,\n __x3: originX, __y3: originY, width, height,\n computedStyle: {\n [STROKE_WIDTH]: strokeWidth,\n }\n } = this;\n let cx = originX + width * 0.5;\n let cy = originY + height * 0.5;\n this.buildCache(cx, cy);\n let r = 0;\n if(isMulti) {\n let max = 0;\n __cacheProps.r.forEach(r => {\n max = Math.max(r, max);\n });\n r = max;\n }\n else {\n r = __cacheProps.r;\n }\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(half, item);\n });\n half = Math.ceil(half * 0.5) + 1;\n let xa = cx - r - half;\n let xb = cx + r - half;\n let ya = cy - r + half;\n let yb = cy + r + half;\n bbox[0] = Math.min(bbox[0], xa);\n bbox[1] = Math.min(bbox[1], ya);\n bbox[2] = Math.max(bbox[2], xb);\n bbox[3] = Math.max(bbox[3], yb);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Sector;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\nimport mode from '../../refresh/mode';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n} } = enums;\nconst { isNil } = util;\n\nfunction genVertex(x, y, width, height, rx = 0, ry = 0) {\n if(rx === 0 || ry === 0) {\n return [\n [x, y],\n [x + width, y],\n [x + width, y + height],\n [x, y + height],\n [x, y],\n ];\n }\n let ox = rx * geom.H;\n let oy = ry * geom.H;\n return [\n [x + rx, y],\n [x + width - rx, y],\n [x + width + ox - rx, y, x + width, y + ry - oy, x + width, y + ry],\n [x + width, y + height - ry],\n [x + width, y + height + oy - ry, x + width + ox - rx, y + height, x + width - rx, y + height],\n [x + rx, y + height],\n [x + rx - ox, y + height, x, y + height + oy - ry, x, y + height - ry],\n [x, y + ry],\n [x, y + ry - oy, x + rx - ox, y, x + rx, y]\n ];\n}\n\n\nfunction getR(v) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = 0;\n }\n return v;\n}\n\nclass Rect extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 圆角\n if(this.isMulti) {\n this.__rx = [0];\n this.__ry = [0];\n if(Array.isArray(props.rx)) {\n this.__rx = props.rx.map(i => getR(i));\n }\n if(Array.isArray(props.ry)) {\n this.__ry = props.ry.map(i => getR(i));\n }\n }\n else {\n this.__rx = this.__ry = 0;\n if(!isNil(props.rx)) {\n this.__rx = getR(props.rx);\n }\n if(!isNil(props.ry)) {\n this.__ry = getR(props.ry);\n }\n }\n }\n\n buildCache(originX, originY, focus) {\n let { width, height, rx, ry, __cacheProps, isMulti } = this;\n let rebuild;\n if(isNil(__cacheProps.rx) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.rx = rx.map(rx => Math.min(rx, 0.5) * width);\n }\n else {\n __cacheProps.rx = Math.min(rx, 0.5) * width;\n }\n }\n if(isNil(__cacheProps.ry) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.ry = rx.map(ry => Math.min(ry, 0.5) * height);\n }\n else {\n __cacheProps.ry = Math.min(ry, 0.5) * height;\n }\n }\n if(rebuild) {\n let { rx, ry } = __cacheProps;\n if(isMulti) {\n __cacheProps.list = rx.map((rx, i) => genVertex(originX, originY, width, height, rx, ry[i]));\n }\n else {\n __cacheProps.list = genVertex(originX, originY, width, height, rx, ry);\n }\n }\n return rebuild;\n }\n\n render(renderMode, ctx, dx, dy) {\n let res = super.render(renderMode, ctx, dx, dy);\n if(res.break || renderMode === mode.WEBGL) {\n return res;\n }\n this.buildCache(res.x3, res.y3);\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get rx() {\n return this.getProps('rx');\n }\n\n get ry() {\n return this.getProps('ry');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n __x3: originX, __y3: originY, width, height,\n computedStyle: {\n [STROKE_WIDTH]: strokeWidth,\n }\n } = this;\n this.buildCache(originX, originY);\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(half, item);\n });\n half = Math.ceil(half * 0.5) + 1;\n bbox[0] = Math.min(bbox[0], originX - half);\n bbox[1] = Math.min(bbox[1], originY - half);\n bbox[2] = Math.max(bbox[2], originX + width + half);\n bbox[3] = Math.max(bbox[3], originY + height + half);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Rect;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\nimport mode from '../../refresh/mode';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n} } = enums;\nconst { isNil } = util;\n\nfunction getR(v) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = 1;\n }\n return v;\n}\n\nclass Circle extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 半径[0, ∞),默认1\n if(this.isMulti) {\n this.__r = [1];\n if(Array.isArray(props.r)) {\n this.__r = props.r.map(i => getR(i));\n }\n else if(!isNil(props.r)) {\n this.__r = getR(props.r);\n }\n }\n else {\n this.__r = 1;\n if(!isNil(props.r)) {\n this.__r = getR(props.r);\n }\n }\n }\n\n buildCache(cx, cy, focus) {\n let { width, r, __cacheProps, isMulti } = this;\n if(isNil(__cacheProps.r) || focus) {\n if(isMulti) {\n __cacheProps.r = r.map(i => i * width * 0.5);\n __cacheProps.list = __cacheProps.r.map(r => geom.ellipsePoints(cx, cy, r, r));\n }\n else {\n __cacheProps.r = r * width * 0.5;\n __cacheProps.list = geom.ellipsePoints(cx, cy, __cacheProps.r, __cacheProps.r);\n }\n }\n }\n\n render(renderMode, ctx, dx, dy) {\n let res = super.render(renderMode, ctx, dx, dy);\n if(res.break || renderMode === mode.WEBGL) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get r() {\n return this.getProps('r');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n isMulti, __cacheProps,\n __x3: originX, __y3: originY, width, height,\n computedStyle: {\n [STROKE_WIDTH]: strokeWidth,\n }\n } = this;\n let cx = originX + width * 0.5;\n let cy = originY + height * 0.5;\n this.buildCache(cx, cy);\n let r = 0;\n if(isMulti) {\n let max = 0;\n __cacheProps.r.forEach(r => {\n max = Math.max(r, max);\n });\n r = max;\n }\n else {\n r = __cacheProps.r;\n }\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(half, item);\n });\n half = Math.ceil(half * 0.5) + 1;\n let xa = cx - r - half;\n let ya = cy - r - half;\n let xb = cx + r + half;\n let yb = cy + r + half;\n bbox[0] = Math.min(bbox[0], xa);\n bbox[1] = Math.min(bbox[1], ya);\n bbox[2] = Math.max(bbox[2], xb);\n bbox[3] = Math.max(bbox[3], yb);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Circle;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\nimport mode from '../../refresh/mode';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n} } = enums;\nconst { isNil } = util;\n\nfunction getR(v) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = 1;\n }\n return v;\n}\n\nclass Ellipse extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 半径[0, ∞),默认1\n if(this.isMulti) {\n this.__rx = [1];\n this.__ry = [1];\n if(Array.isArray(props.rx)) {\n this.__rx = props.rx.map(i => getR(i));\n }\n else if(!isNil(props.rx)) {\n this.__rx = [getR(props.rx)];\n }\n if(Array.isArray(props.ry)) {\n this.__ry = props.ry.map(i => getR(i));\n }\n else if(!isNil(props.ry)) {\n this.__ry = [getR(props.ry)];\n }\n }\n else {\n this.__rx = 1;\n if(!isNil(props.rx)) {\n this.__rx = getR(props.rx);\n }\n this.__ry = 1;\n if(!isNil(props.ry)) {\n this.__ry = getR(props.ry);\n }\n }\n }\n\n buildCache(cx, cy, focus) {\n let { width, height, rx, ry, __cacheProps, isMulti } = this;\n let rebuild;\n if(isNil(__cacheProps.rx) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.rx = rx.map(i => i * width * 0.5);\n }\n else {\n __cacheProps.rx = rx * width * 0.5;\n }\n }\n if(isNil(__cacheProps.ry) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.ry = ry.map(i => i * height * 0.5);\n }\n else {\n __cacheProps.ry = ry * height * 0.5;\n }\n }\n if(rebuild) {\n let { rx, ry } = __cacheProps;\n if(isMulti) {\n __cacheProps.list = rx.map((rx, i) => geom.ellipsePoints(cx, cy, rx, ry[i]));\n }\n else {\n __cacheProps.list = geom.ellipsePoints(cx, cy, rx, ry);\n }\n }\n return rebuild;\n }\n\n render(renderMode, ctx, dx, dy) {\n let res = super.render(renderMode, ctx, dx, dy);\n if(res.break || renderMode === mode.WEBGL) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get rx() {\n return this.getProps('rx');\n }\n\n get ry() {\n return this.getProps('ry');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n isMulti, __cacheProps,\n __x3: originX, __y3: originY, width, height,\n computedStyle: {\n [STROKE_WIDTH]: strokeWidth,\n }\n } = this;\n let cx = originX + width * 0.5;\n let cy = originY + height * 0.5;\n this.buildCache(cx, cy);\n let rx = 0, ry = 0;\n if(isMulti) {\n let mx = 0, my = 0;\n __cacheProps.rx.forEach((rx, i) => {\n mx = Math.max(rx, mx);\n my = Math.max(ry, __cacheProps.ry[i]);\n });\n rx = mx;\n ry = my;\n }\n else {\n rx = __cacheProps.rx;\n ry = __cacheProps.ry;\n }\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(half, item);\n });\n half = Math.ceil(half * 0.5) + 1;\n let xa = cx - rx - half;\n let xb = cx + rx + half;\n let ya = cy - ry - half;\n let yb = cy + ry + half;\n bbox[0] = Math.min(bbox[0], xa);\n bbox[1] = Math.min(bbox[1], ya);\n bbox[2] = Math.max(bbox[2], xb);\n bbox[3] = Math.max(bbox[3], yb);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Ellipse;\n","import Node from '../node/Node';\nimport Component from '../node/Component';\nimport util from '../util/util';\n\nlet { isPrimitive } = util;\n\n/**\n * 入口方法,animateRecords记录所有的动画结果等初始化后分配开始动画\n * hash为library库的hash格式,将原本数组转为id和value访问,每递归遇到library形成一个新的scope重新初始化\n * offsetTime默认0,递归传下去为右libraryId引用的元素增加偏移时间,为了库元素动画复用而开始时间不同\n * @param karas\n * @param json\n * @param animateRecords\n * @param opt\n * @param offsetTime\n * @returns {Node|Component|*}\n */\nfunction parse(karas, json, animateRecords, opt, offsetTime) {\n if(isPrimitive(json) || json instanceof Node || json instanceof Component) {\n return json;\n }\n if(Array.isArray(json)) {\n return json.map(item => {\n return parse(karas, item, animateRecords, opt, offsetTime);\n });\n }\n let oft = offsetTime; // 暂存,后续生成动画用这个值\n offsetTime += json.offsetTime || 0; // 可能有时间偏移加上为递归准备\n let { tagName, props = {}, children = [], animate = [] } = json;\n if(!tagName) {\n throw new Error('Dom must have a tagName: ' + JSON.stringify(json));\n }\n if(!Array.isArray(children)) {\n throw new Error('children must be an array');\n }\n let vd;\n if(tagName.charAt(0) === '$') {\n vd = karas.createGm(tagName, props);\n }\n else if(/^[A-Z]/.test(tagName)) {\n let cp = Component.getRegister(tagName);\n vd = karas.createCp(cp, props, children.map(item => {\n return parse(karas, item, animateRecords, opt, offsetTime);\n }));\n }\n else {\n vd = karas.createVd(tagName, props, children.map(item => {\n return parse(karas, item, animateRecords, opt, offsetTime);\n }));\n }\n if(animate) {\n if(!Array.isArray(animate)) {\n animate = [animate];\n }\n let has;\n animate.forEach(item => {\n let { value } = item;\n // 忽略空动画\n if(Array.isArray(value) && value.length) {\n has = true;\n }\n });\n // 产生实际动画运行才存入列表供root调用执行\n if(has) {\n animateRecords.push({\n animate,\n target: vd,\n offsetTime: oft,\n });\n }\n }\n return vd;\n}\n\nexport default parse;\n","import reset from '../style/reset';\n\nlet fullCssProperty = {\n skewX: 'kx',\n skewY: 'ky',\n transform: 'tf',\n fontSize: 'fz',\n offset: 'os',\n easing: 'e',\n filter: 'ft',\n boxShadow: 'bd',\n overflow: 'of',\n backgroundClip: 'bp',\n textOverflow: 'tof',\n flexWrap: 'fp',\n perspective: 'ppt',\n rotate3d: 'r3',\n};\n\nlet abbrCssProperty = {\n os: 'offset', // 非css属性不会被下面反向遍历插入,手动\n e: 'easing',\n};\n\nlet fullAnimate = {\n value: 'v',\n options: 'o',\n};\n\nlet abbrAnimate = {};\n\nlet fullAnimateOption = {\n duration: 'dt',\n delay: 'd',\n endDelay: 'ed',\n iterations: 'i',\n direction: 'dc',\n fill: 'f',\n fps: 'fp',\n playbackRate: 'p',\n spfLimit: 'sl',\n};\n\nlet abbrAnimateOption = {};\n\nreset.DOM_KEY_SET.concat(reset.GEOM_KEY_SET).forEach(k => {\n if(fullCssProperty.hasOwnProperty(k)) {\n abbrCssProperty[fullCssProperty[k]] = k;\n return;\n }\n let v = k.charAt(0) + k.replace(/[a-z]/g, '').toLowerCase();\n fullCssProperty[k] = v;\n abbrCssProperty[v] = k;\n});\n\nObject.keys(fullAnimate).forEach(k => {\n abbrAnimate[fullAnimate[k]] = k;\n});\n\nObject.keys(fullAnimateOption).forEach(k => {\n abbrAnimateOption[fullAnimateOption[k]] = k;\n});\n\nexport default {\n fullCssProperty,\n abbrCssProperty,\n fullAnimate,\n abbrAnimate,\n fullAnimateOption,\n abbrAnimateOption,\n};\n","import abbr from './abbr';\nimport inject from '../util/inject';\nimport util from '../util/util';\nimport Node from '../node/Node';\nimport Component from '../node/Component';\n\nlet { isNil, isFunction, isPrimitive, clone, extend } = util;\nlet { abbrCssProperty, abbrAnimateOption, abbrAnimate } = abbr;\n\n/**\n * 还原缩写到全称,涉及样式和动画属性,已过时\n * @param target 还原的对象\n * @param hash 缩写映射\n */\nfunction abbr2full(target, hash) {\n // 也许节点没写样式\n if(target) {\n Object.keys(target).forEach(k => {\n // var-attr格式特殊考虑,仅映射attr部分,var-还要保留\n if(k.indexOf('var-') === 0) {\n let k2 = k.slice(4);\n if(hash.hasOwnProperty(k2)) {\n let fk = hash[k2];\n target['var-' + fk] = target[k];\n // delete target[k];\n }\n }\n // 普通样式缩写还原\n else if(hash.hasOwnProperty(k)) {\n let fk = hash[k];\n target[fk] = target[k];\n // 删除以免二次解析\n delete target[k];\n }\n });\n }\n}\n\n/**\n * 链接json中的某个child到library文件,\n * props需要是clone的,因为防止多个child使用同一个库文件\n * children则直接引用,无需担心多个使用同一个\n * library也需要带上,在library直接子元素还包含library时会用到\n * @param child\n * @param libraryItem\n */\nfunction linkLibrary(child, libraryItem) {\n // 规定图层child只有init和动画,属性和子图层来自库\n child.tagName = libraryItem.tagName;\n child.props = clone(libraryItem.props) || {};\n child.children = libraryItem.children || [];\n if(libraryItem.vars && !child.vars) {\n child.vars = libraryItem.vars;\n }\n if(libraryItem.library) {\n child.library = libraryItem.library;\n }\n // library的var-也要继承过来,本身的var-优先级更高,目前只有children会出现优先级情况\n Object.keys(libraryItem).forEach(k => {\n if(k.indexOf('var-') === 0 && !child.hasOwnProperty(k)) {\n child[k] = libraryItem[k];\n }\n });\n // 删除以免二次解析\n delete child.libraryId;\n let init = child.init;\n if(init) {\n let props = child.props;\n let style = props.style;\n extend(props, init);\n // style特殊处理,防止被上面覆盖丢失原始值\n if(style) {\n extend(style, init.style);\n props.style = style;\n }\n // 删除以免二次解析\n delete child.init;\n }\n}\n\n/**\n * 遍历一遍library的一级,将一级的id存到hash上,无需递归二级,\n * 因为顺序前提要求排好且无循环依赖,所以被用到的一定在前面出现,\n * 一般是无children的元件在前,包含children的div在后\n * 即便library中的元素有children或library,在linkChild时将其link过去,parse递归会继续处理\n * @param item:library的一级孩子\n * @param hash:存放library的key/value引用\n */\nfunction initLibrary(item, hash) {\n let id = item.id;\n // library中一定有id,因为是一级,二级+特殊需求才会出现放开\n if(isNil(id)) {\n throw new Error('Library item miss id: ' + JSON.stringify(item));\n }\n else {\n hash[id] = item;\n }\n}\n\n// 有library的json一级初始化library供链接前,可以替换library里的内容\nfunction replaceLibraryVars(json, hash, vars) {\n // 新版同级vars语法,增加可以修改library子元素中递归子属性\n if(json.hasOwnProperty('vars')) {\n let slot = json.vars;\n delete json.vars;\n if(!Array.isArray(slot)) {\n slot = [slot];\n }\n slot.forEach(item => {\n let { id, member } = item;\n if(!Array.isArray(member)) {\n member = [member];\n }\n // library.xxx,需要>=2的长度,开头必须是library\n if(Array.isArray(member) && member.length > 1 && vars && vars.hasOwnProperty(id)) {\n if(member[0] === 'library') {\n let target = hash;\n for(let i = 1, len = member.length; i < len; i++) {\n let k = member[i];\n // 最后一个属性可以为空\n if(target.hasOwnProperty(k) || i === len - 1) {\n // 最后一个member表达式替换\n if(i === len - 1) {\n let v = vars[id];\n let old = target[k];\n // 支持函数模式和值模式\n if(isFunction(v)) {\n v = v(old);\n }\n // 直接替换library的子对象,需补充id和tagName\n if(i === 1) {\n target[k] = Object.assign({ id: old.id, tagName: old.tagName }, v);\n }\n // 替换library中子对象的一个属性直接赋值\n else {\n target[k] = v;\n }\n }\n // 子属性继续下去\n else {\n target = target[k];\n }\n }\n else {\n inject.error('Library slot miss ' + k);\n return;\n }\n }\n }\n }\n });\n }\n // 兼容老版var-,只支持一级library元素\n else {\n Object.keys(json).forEach(k => {\n if(k.indexOf('var-library.') === 0) {\n let v = json[k];\n delete json[k];\n if(!v || !vars) {\n return;\n }\n let k2 = k.slice(12);\n // 有id且变量里面传入了替换的值\n if(k2 && v.id && vars.hasOwnProperty(v.id)) {\n let value = vars[v.id];\n if(isFunction(value)) {\n value = value(v);\n }\n // library对象也要加上id,与正常的library保持一致\n hash[k2] = Object.assign({ id: k2 }, value);\n }\n }\n });\n }\n}\n\nfunction replaceVars(json, vars) {\n if(json) {\n // 新版vars语法\n if(json.hasOwnProperty('vars')) {\n let slot = json.vars;\n delete json.vars;\n if(!Array.isArray(slot)) {\n slot = [slot];\n }\n if(Array.isArray(slot)) {\n slot.forEach(item => {\n let { id, member } = item;\n if(!Array.isArray(member)) {\n member = [member];\n }\n // 排除特殊的library\n if(Array.isArray(member) && member.length && member[0] !== 'library' && vars && vars.hasOwnProperty(id)) {\n let target = json;\n for(let i = 0, len = member.length; i < len; i++) {\n let k = member[i];\n // 最后一个属性可以为空\n if(target.hasOwnProperty(k) || i === len - 1) {\n // 最后一个member表达式替换\n if(i === len - 1) {\n let v = vars[id];\n // undefined和null意义不同\n if(v === undefined) {\n return;\n }\n // 支持函数模式和值模式\n if(isFunction(v)) {\n v = v(target[k]);\n }\n target[k] = v;\n }\n else {\n target = target[k];\n }\n }\n else {\n inject.error('Slot miss ' + k);\n return;\n }\n }\n }\n });\n }\n }\n else {\n Object.keys(json).forEach(k => {\n if(k.indexOf('var-') === 0) {\n let v = json[k];\n delete json[k];\n if(!v || !vars) {\n return;\n }\n let k2 = k.slice(4);\n // 有id且变量里面传入了替换的值,值可为null,因为某些情况下空为自动\n if(k2 && v.id && vars.hasOwnProperty(v.id)) {\n let value = vars[v.id];\n // undefined和null意义不同\n if(value === undefined) {\n return;\n }\n let target = json;\n // 如果有.则特殊处理子属性\n if(k2.indexOf('.') > -1) {\n let list = k2.split('.');\n let len = list.length;\n for(let i = 0; i < len - 1; i++) {\n k2 = list[i];\n // 避免异常\n if(target[k2]) {\n target = target[k2];\n }\n else {\n inject.warn('parseJson vars is not exist: ' + v.id + ', ' + k + ', ' + list.slice(0, i).join('.'));\n return;\n }\n }\n k2 = list[len - 1];\n }\n // 支持函数模式和值模式\n if(isFunction(value)) {\n value = value(v);\n }\n target[k2] = value;\n }\n }\n });\n }\n }\n}\n\n// parse的options可以传总的duration等\nfunction replaceAnimateOptions(options, opt) {\n ['iterations', 'fill', 'duration', 'direction', 'easing', 'fps', 'delay', 'endDelay', 'playbackRate', 'spfLimit'].forEach(k => {\n if(opt.hasOwnProperty(k)) {\n options[k] = opt[k];\n }\n });\n}\n\nfunction apply(json, opt, hash) {\n if(isPrimitive(json) || json instanceof Node || json instanceof Component) {\n return json;\n }\n if(Array.isArray(json)) {\n return json.map(item => apply(item, opt, hash));\n }\n // 先判断是否是个链接到库的节点,是则进行链接操作\n let libraryId = json.libraryId;\n if(!isNil(libraryId)) {\n let libraryItem = hash[libraryId];\n // 规定图层child只有init和动画,tagName和属性和子图层来自库\n if(libraryItem) {\n linkLibrary(json, libraryItem);\n }\n else {\n throw new Error('Link library miss id: ' + libraryId);\n }\n }\n // 再判断是否有library形成一个新的作用域,会出现library下的library使得一个链接节点链接后出现library的情况\n let library = json.library;\n if(Array.isArray(library)) {\n hash = {};\n library.forEach(item => initLibrary(item, hash));\n // 替换library插槽\n replaceLibraryVars(json, hash, opt.vars);\n delete json.library;\n }\n let { tagName, props = {}, children = [], animate = [] } = json;\n if(!tagName) {\n throw new Error('Dom must have a tagName: ' + JSON.stringify(json));\n }\n // 缩写src和font\n let src = props.src;\n if(/^#\\d+$/.test(src)) {\n let imgs = opt.imgs, i = parseInt(src.slice(1));\n if(Array.isArray(imgs)) {\n props.src = imgs[i];\n }\n }\n let style = props.style;\n if(style) {\n let fontFamily = style.fontFamily;\n if(/^#\\d+$/.test(fontFamily)) {\n let fonts = opt.fonts, i = parseInt(fontFamily.slice(1));\n if(Array.isArray(fonts)) {\n style.fontFamily = fonts[i];\n }\n }\n (opt.abbr !== false) && abbr2full(style, abbrCssProperty);\n // 先替换style的\n replaceVars(style, opt.vars);\n }\n // 再替换静态属性,style也作为属性的一种\n replaceVars(props, opt.vars);\n // 替换children里的内容,如文字,无法直接替换tagName/props/children/animate本身,因为下方用的还是原引用\n replaceVars(json, opt.vars);\n json.children = apply(children, opt, hash);\n if(animate) {\n if(!Array.isArray(animate)) {\n animate = [animate];\n }\n animate.forEach(item => {\n (opt.abbr !== false) && abbr2full(item, abbrAnimate);\n let { value, options } = item;\n // 忽略空动画\n if(Array.isArray(value) && value.length) {\n value.forEach(item => {\n (opt.abbr !== false) && abbr2full(item, abbrCssProperty);\n replaceVars(item, opt.vars);\n });\n }\n if(options) {\n (opt.abbr !== false) && abbr2full(options, abbrAnimateOption);\n replaceVars(options, opt.vars);\n replaceAnimateOptions(options, opt);\n }\n });\n }\n return json;\n}\n\n// 将library、vars应用于json,转换json为一个普通的原始json数据\nexport default function(json, options = {}) {\n // json中定义无abbr\n if(json.abbr === false) {\n options.abbr = false;\n }\n if(options.abbr !== false) {\n inject.warn('Abbr in json is deprecated');\n }\n // 特殊单例声明无需clone加速解析\n if(!options.singleton && !json.singleton) {\n json = util.clone(json);\n }\n return apply(json, options, {});\n}\n","import parse from './parse';\nimport abbr from './abbr';\nimport inject from '../util/inject';\nimport util from '../util/util';\nimport font from '../style/font';\nimport Controller from '../animate/Controller';\nimport apply from './apply';\n\nlet o = {\n apply,\n parse(karas, json, dom, options) {\n if(!json) {\n return;\n }\n // 根节点的fonts字段定义字体信息\n let fonts = json.fonts;\n if(fonts) {\n if(!Array.isArray(fonts)) {\n fonts = [fonts];\n }\n fonts.forEach(item => {\n let { fontFamily, url, data } = item;\n if(fontFamily && (url || data)) {\n font.register(fontFamily, url, data);\n }\n });\n }\n // 重载,在确定dom传入选择器字符串或html节点对象时作为渲染功能,否则仅创建vd返回\n if(!inject.isDom(dom)) {\n options = options || dom || {};\n dom = null;\n }\n else {\n options = options || {};\n }\n json = apply(json, options);\n // 暂存所有动画声明,等root的生成后开始执行\n let animateRecords = [];\n let vd = parse(karas, json, animateRecords, options, 0);\n // 有dom时parse作为根方法渲染\n if(dom) {\n let { tagName } = json;\n if(['canvas', 'svg', 'webgl'].indexOf(tagName) === -1) {\n throw new Error('Parse dom must be canvas/svg/webgl');\n }\n // parse直接(非递归)的动画记录\n let ac = options.controller instanceof Controller ? options.controller : vd.animateController;\n // 第一次render,收集递归json里面的animateRecords,它在xom的__layout最后生成\n karas.render(vd, dom);\n // 由于vd首先生成的都是json,根parse要特殊处理将target指向真正的vd引用,json的vd在builder中赋值\n // animateRecords.forEach(item => {\n // item.target = item.target.vd;\n // });\n // 直接的json里的animateRecords,再加上递归的parse的json的(第一次render布局时处理)动画一并播放\n if(options.autoPlay !== false) {\n ac.__records = ac.__records.concat(animateRecords);\n ac.__playAuto();\n }\n // 不自动播放进入记录列表,初始化并等待手动调用\n else {\n ac.__records2 = ac.__records2.concat(animateRecords);\n ac.init(ac.__records2, ac.list2);\n }\n }\n // 递归的parse,如果有动画,此时还没root,先暂存下来,等上面的root的render第一次布局时收集\n else {\n if(animateRecords.length) {\n vd.__animateRecords = {\n options,\n list: animateRecords,\n controller: options.controller instanceof Controller ? options.controller : null,\n };\n }\n }\n return vd;\n },\n loadAndParse(karas, json, dom, options) {\n let { fonts, components, imgs } = json;\n let list1 = [];\n let list2 = [];\n let list3 = [];\n if(fonts) {\n if(!Array.isArray(fonts)) {\n fonts = [fonts];\n }\n fonts.forEach(item => {\n let url = item.url;\n if(url) {\n list1.push(item);\n }\n });\n }\n if(components) {\n if(!Array.isArray(components)) {\n components = [components];\n }\n components.forEach(item => {\n let { tagName, url, reload } = item;\n // 如果没申明reload且已经被注册,则无需重复加载\n if(tagName && karas.Component.hasRegister(tagName) && !reload) {\n return;\n }\n // 即便没有tagName也要加载,可能组件内部执行了注册逻辑\n if(url) {\n list2.push(item);\n }\n });\n }\n if(imgs) {\n if(!Array.isArray(imgs)) {\n imgs = [imgs];\n }\n imgs.forEach(item => {\n let url = item.url;\n if(url) {\n list3.push(url);\n }\n });\n }\n let a = list1.length, b = list2.length, c = list3.length;\n let count = 0;\n let cb = function() {\n if(count === a + b + c) {\n let res = o.parse(karas, json, dom, options);\n if(options && util.isFunction(options.callback)) {\n options.callback(res);\n }\n }\n };\n if(a || b || c) {\n karas.inject.loadFont(list1, function() {\n count += a;\n cb();\n });\n karas.inject.loadComponent(list2.map(item => item.url), function() {\n count += b;\n // 默认约定加载的js组件会在全局变量申明同名tagName,已有不覆盖,防止组件代码内部本身有register\n list2.forEach(item => {\n let tagName = item.tagName;\n if(tagName && window[tagName] && !karas.Component.hasRegister(tagName)) {\n karas.Component.register(tagName, window[tagName]);\n }\n });\n cb();\n });\n karas.inject.measureImg(list3, function() {\n count += c;\n cb();\n });\n }\n else {\n cb();\n }\n },\n abbr,\n};\n\nexport default o;\n","import css from './css';\nimport reset from './reset';\nimport unit from './unit';\nimport font from './font';\nimport abbr from './abbr';\nimport transform from './transform';\n\nexport default {\n css,\n reset,\n unit,\n font,\n abbr,\n transform,\n};\n","import Animation from './Animation';\nimport Controller from './Controller';\nimport easing from './easing';\nimport frame from './frame';\n\nexport default {\n Animation,\n Controller,\n easing,\n frame,\n};\n","import matrix from './matrix';\nimport geom from './geom';\n\n// 一条边相对于自己开始点的x向量角度,即从x到此边旋转,0~180和-180~0,需要判断象限\nfunction calDeg(x1, y1, x2, y2) {\n let dx = x2 - x1;\n let dy = y2 - y1;\n let atan = Math.atan(Math.abs(dy) / Math.abs(dx));\n // 2象限\n if(dx < 0 && dy >= 0) {\n return Math.PI - atan;\n }\n // 3象限\n if(dx < 0 && dy < 0) {\n return atan - Math.PI;\n }\n // 1象限\n if(dx >= 0 && dy >= 0) {\n return atan;\n }\n // 4象限,顺时针正好\n return -atan;\n}\n\nfunction rotate(theta) {\n let sin = Math.sin(theta);\n let cos = Math.cos(theta);\n let t = matrix.identity();\n t[0] = t[5] = cos;\n t[1] = sin;\n t[4] = -sin;\n return t;\n}\n\n/**\n * 确保3个点中,a点在三角形左上方,b/c在右方,同时ab到ac要顺时针旋转\n * @param points\n */\nfunction pointIndex(points) {\n let [x1, y1, x2, y2, x3, y3] = points;\n let index = [0, 1, 2];\n // 将a点放入最左\n if(x2 < x1 && x2 < x3) {\n [x1, y1, x2, y2] = [x2, y2, x1, y1];\n index[0] = 1;\n index[1] = 0;\n }\n else if(x3 < x2 && x3 < x1) {\n [x1, y1, x3, y3] = [x3, y3, x1, y1];\n index[0] = 2;\n index[2] = 0;\n }\n // 有可能出现2个并列的情况,判断取上面那个\n if(x1 === x2) {\n if(y1 > y2) {\n [x1, y1, x2, y2] = [x2, y2, x1, y1];\n let t = index[0];\n index[0] = index[1];\n index[1] = t;\n }\n }\n else if(x1 === x3) {\n if(y1 > y3) {\n [x1, y1, x3, y3] = [x3, y3, x1, y1];\n let t = index[0];\n index[0] = index[2];\n index[2] = t;\n }\n }\n // ab到ac要顺时针旋转,即2个向量夹角为正,用向量叉乘判断正负\n let cross = (x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1);\n if(cross < 0) {\n [x2, y2, x3, y3] = [x3, y3, x2, y2];\n let t = index[1];\n index[1] = index[2];\n index[2] = t;\n }\n return [x1, y1, x2, y2, x3, y3, index];\n}\n\n/**\n * 第2个点根据第一个点的交换顺序交换\n * @param points\n * @param index\n * @returns {[]}\n */\nfunction pointByIndex(points, index) {\n let res = [];\n for(let i = 0, len = index.length; i < len; i++) {\n let j = index[i];\n res.push(points[j * 2]);\n res.push(points[j * 2 + 1]);\n }\n return res;\n}\n\n/**\n * 确保3个点中,a点在三角形左上方,b/c在右方,同时ab到ac要顺时针旋转\n * @param source 源3个点\n * @param target 目标3个点\n * @returns 交换顺序后的点坐标\n */\nfunction exchangeOrder(source, target) {\n let [sx1, sy1, sx2, sy2, sx3, sy3, index] = pointIndex(source);\n let [tx1, ty1, tx2, ty2, tx3, ty3] = pointByIndex(target, index);\n return [\n [sx1, sy1, sx2, sy2, sx3, sy3],\n [tx1, ty1, tx2, ty2, tx3, ty3]\n ];\n}\n\n/**\n * 存在一种情况,变换结果使得三角形镜像相反了,即顶点a越过bc线,判断是否溢出\n * @param source\n * @param target\n * @returns {boolean}是否溢出\n */\nfunction isOverflow(source, target) {\n let [sx1, sy1, sx2, sy2, sx3, sy3] = source;\n let [tx1, ty1, tx2, ty2, tx3, ty3] = target;\n let cross1 = (sx2 - sx1) * (sy3 - sy1) - (sx3 - sx1) * (sy2 - sy1);\n let cross2 = (tx2 - tx1) * (ty3 - ty1) - (tx3 - tx1) * (ty2 - ty1);\n return cross1 > 0 && cross2 < 0 || cross1 < 0 && cross2 > 0;\n}\n\nfunction transform(source, target) {\n let [sx1, sy1, sx2, sy2, sx3, sy3] = source;\n let [tx1, ty1, tx2, ty2, tx3, ty3] = target;\n // 记录翻转\n let overflow = isOverflow(source, target);\n // 第0步,将源三角第1个a点移到原点\n let m = matrix.identity();\n m[12] = -sx1;\n m[13] = -sy1;\n let t;\n // 第1步,以第1条边ab为基准,将其贴合x轴上,为后续倾斜不干扰做准备\n let theta = calDeg(sx1, sy1, sx2, sy2);\n if(theta !== 0) {\n t = rotate(-theta);\n m = matrix.multiply(t, m);\n }\n // 第2步,以第1条边AB为基准,缩放x轴ab至目标相同长度,可与4步合并\n let ls = geom.pointsDistance(sx1, sy1, sx2, sy2);\n let lt = geom.pointsDistance(tx1, ty1, tx2, ty2);\n // if(ls !== lt) {\n // let scale = lt / ls;\n // t = matrix.identity();\n // t[0] = scale;\n // m = matrix.multiply(t, m);\n // }\n // 第3步,缩放y,先将目标三角形旋转到x轴平行,再变换坐标计算\n let n = matrix.identity();\n n[12] = -tx1;\n n[13] = -ty1;\n theta = calDeg(tx1, ty1, tx2, ty2);\n // 记录下这个旋转角度,后面源三角形要反向旋转\n let alpha = theta;\n if(theta !== 0) {\n t = rotate(-theta);\n n = matrix.multiply(t, n);\n }\n // 目标三角反向旋转至x轴后的坐标\n // 源三角目前的第3点坐标y值即为长度,因为a点在原点0无需减去\n let ls2 = Math.abs(matrix.calPoint({ x: sx3, y: sy3 }, m).y);\n let lt2 = Math.abs(matrix.calPoint({ x: tx3, y: ty3 }, n).y);\n // 缩放y\n // if(ls2 !== lt2) {\n // let scale = lt / ls;\n // t = matrix.identity();\n // t[3] = scale;\n // m = matrix.multiply(t, m);\n // }\n if(ls !== lt || ls2 !== lt2) {\n t = matrix.identity();\n if(ls !== lt) {\n t[0] = lt / ls;\n }\n if(ls2 !== lt2) {\n t[5] = lt2 / ls2;\n }\n m = matrix.multiply(t, m);\n }\n // 第4步,x轴倾斜,用余弦定理求目前a和A的夹角\n n = m;\n let { x: ax1, y: ay1 } = matrix.calPoint({ x: sx1, y: sy1 }, n);\n let { x: ax2, y: ay2 } = matrix.calPoint({ x: sx2, y: sy2 }, n);\n let { x: ax3, y: ay3 } = matrix.calPoint({ x: sx3, y: sy3 }, n);\n let ab = geom.pointsDistance(ax1, ay1, ax2, ay2);\n let ac = geom.pointsDistance(ax1, ay1, ax3, ay3);\n let bc = geom.pointsDistance(ax3, ay3, ax2, ay2);\n let AB = geom.pointsDistance(tx1, ty1, tx2, ty2);\n let AC = geom.pointsDistance(tx1, ty1, tx3, ty3);\n let BC = geom.pointsDistance(tx3, ty3, tx2, ty2);\n let a = geom.angleBySide(bc, ab, ac);\n let A = geom.angleBySide(BC, AB, AC);\n // 先至90°,再旋转至目标角,可以合并成tan相加,不知道为什么不能直接tan倾斜差值角度\n if(a !== A) {\n t = matrix.identity();\n t[4] = Math.tan(a - Math.PI * 0.5) + Math.tan(Math.PI * 0.5 - A);\n m = matrix.multiply(t, m);\n }\n // 发生翻转时特殊处理按x轴垂直翻转\n if(overflow) {\n m[1] = -m[1];\n m[5] = -m[5];\n m[13] = -m[13];\n }\n // 第5步,再次旋转,角度为目标旋转到x轴的负值,可与下步合并\n if(alpha !== 0) {\n t = rotate(alpha);\n // m = matrix.multiply(t, m);\n }\n else {\n t = matrix.identity();\n }\n // 第6步,移动第一个点的差值\n // t = matrix.identity();\n t[12] = tx1;\n t[13] = ty1;\n return matrix.multiply(t, m);\n}\n\nexport default {\n exchangeOrder,\n isOverflow,\n transform,\n};\n","import matrix from './matrix';\nimport tar from './tar';\nimport vector from './vector';\nimport equation from './equation';\nimport geom from './geom';\nimport bezier from './bezier';\nimport isec from './isec';\n// import { union, diff, intersection, xor } from './martinez';\nimport bo from './bo/index';\n\nexport default {\n matrix,\n tar,\n vector,\n equation,\n geom,\n bezier,\n isec,\n booleanOperations: bo,\n};\n","import level from './level';\nimport change from './change';\nimport Page from './Page';\nimport Cache from './Cache';\nimport CanvasPage from './CanvasPage';\nimport CanvasCache from './CanvasCache';\n\nexport default {\n level,\n change,\n Page,\n Cache,\n CanvasPage,\n CanvasCache,\n};\n","import Node from './node/Node';\nimport Text from './node/Text';\nimport Xom from './node/Xom';\nimport Dom from './node/Dom';\nimport Img from './node/Img';\nimport Root from './node/Root';\nimport tag from './node/tag';\nimport mode from './refresh/mode';\nimport Geom from './node/geom/Geom';\nimport Line from './node/geom/Line';\nimport Polyline from './node/geom/Polyline';\nimport Polygon from './node/geom/Polygon';\nimport Sector from './node/geom/Sector';\nimport Rect from './node/geom/Rect';\nimport Circle from './node/geom/Circle';\nimport Ellipse from './node/geom/Ellipse';\nimport Component from './node/Component';\nimport Event from './util/Event';\nimport util from './util/util';\nimport inject from './util/inject';\nimport enums from './util/enums';\nimport debug from './util/debug';\nimport parser from './parser/index';\nimport style from './style/index';\nimport animate from './animate/index';\nimport math from './math/index';\nimport refresh from './refresh/index';\nimport { version } from '../package.json';\nimport ca from './gl/ca';\n\nGeom.register('$line', Line);\nGeom.register('$polyline', Polyline);\nGeom.register('$polygon', Polygon);\nGeom.register('$sector', Sector);\nGeom.register('$rect', Rect);\nGeom.register('$circle', Circle);\nGeom.register('$ellipse', Ellipse);\n\nlet karas = {\n version,\n render(root, dom) {\n if(!(root instanceof Root)) {\n throw new Error('Render dom must be canvas/svg/webgl');\n }\n if(dom) {\n root.appendTo(dom);\n }\n return root;\n },\n createElement(tagName, props) {\n props = props || {};\n let children = [];\n for(let i = 2, len = arguments.length; i < len; i++) {\n children.push(arguments[i]);\n }\n if(util.isString(tagName)) {\n if(tagName.charAt(0) === '$') {\n return this.createGm(tagName, props);\n }\n else {\n return this.createVd(tagName, props, children);\n }\n }\n else if(tagName) {\n // 特殊的$匿名类\n if(tagName instanceof Geom) {\n return this.createGm(tagName, props);\n }\n return this.createCp(tagName, props, children);\n }\n },\n createVd(tagName, props, children = []) {\n if(['canvas', 'svg', 'webgl'].indexOf(tagName) > -1) {\n return new Root(tagName, props, children);\n }\n if(tag.TAG_NAME.hasOwnProperty(tagName)) {\n if(tagName === 'img') {\n return new Img(tagName, props);\n }\n else {\n return new Dom(tagName, props, children);\n }\n }\n throw new Error(`Can not use <${tagName}>`);\n },\n createGm(tagName, props) {\n let klass = Geom.getRegister(tagName);\n return new klass(tagName, props);\n },\n createCp(klass, props, children = []) {\n props.children = children;\n return new klass(props, children);\n },\n parse(json, dom, options) {\n return parser.parse(this, json, dom, options);\n },\n loadAndParse(json, dom, options) {\n return parser.loadAndParse(this, json, dom, options);\n },\n mode,\n Component,\n Node,\n Text,\n Geom,\n Xom,\n Dom,\n Img,\n Root,\n Event,\n util,\n inject,\n style,\n parser,\n animate,\n math,\n refresh,\n enums,\n ca,\n set debug(v) {\n debug.flag = !!v;\n },\n};\n\nif(typeof window !== 'undefined') {\n window.karas = karas;\n}\nelse if(typeof self !== 'undefined') {\n self.karas = karas;\n}\n\nexport default karas;\n"],"names":["Node","__x","__y","__width","__height","__baseline","__verticalBaseline","__prev","__next","__parent","__domParent","__root","__host","__hostRoot","__virtualDom","__bbox","__filterBbox","__isDestroyed","lv","j","__struct","node","childIndex","diff","CANVAS","SVG","WEBGL","AUTO","PX","PERCENT","NUMBER","INHERIT","DEG","STRING","RGBA","REM","EM","VW","VH","VMAX","VMIN","GRADIENT","o","calUnit","v","n","parseFloat","test","u","identity","multiply","a","b","isE","c","i","a0","a1","a2","a3","multiplyTfo","m","x","y","tfoMultiply","d","h","l","p","multiplyTranslateX","multiplyTranslateY","multiplyTranslateZ","multiplyRotateX","sin","Math","cos","e","f","g","k","multiplyRotateY","multiplyRotateZ","multiplySkewX","tan","multiplySkewY","multiplyScaleX","multiplyScaleY","multiplyScaleZ","multiplyPerspective","max","calPoint","point","z","w","undefined","b1","c1","d1","b2","c2","d2","b3","c3","d3","a4","b4","c4","d4","inverse","length","inverse4","divisor","s","inv","det","m2m6","point2d","slice","calRectPoint","xa","ya","xb","yb","matrix","x1","y1","z1","w1","x3","y3","z3","w3","x2","y2","z2","w2","x4","y4","z4","w4","t","toString","isType","type","obj","call","isObject","isString","isFunction","isNumber","isBoolean","isDate","hasOwn","hasOwnProperty","fnToString","ObjectFunctionString","Object","isNil","joinSourceArray","arr","res","len","item","Array","isArray","stringify","encodeHtml","prop","replace","joinVirtualDom","vd","defs","forEach","joinDef","bb","joinVd","conClip","children","props","tagName","content","opacity","transform","visibility","mask","overflow","filter","mixBlendMode","def","uuid","joinItem","rgba2int","color","charAt","push","parseInt","match","int2rgba","floor","int2invert","joinArr","arr2hash","hash","list","keys","hash2arr","clone","util","Date","isPlainObject","equalArr","ai","bi","isArrayA","isArrayB","equal","getTime","extend","target","source","split","transformBbox","bbox","dx","dy","mx","min","proto","getPrototypeOf","Ctor","constructor","assignMatrix","prefixHex","replaceRgba2Hex","$0","$1","$2","$3","$4","isPrimitive","isAuto","flag","SPF","SUPPORT_OFFSCREEN_CANVAS","OffscreenCanvas","prototype","getContext","offscreenCanvas","key","width","height","message","debug","document","createElement","style","setAttribute","body","appendChild","ctx","canvas","enabled","available","release","globalAlpha","setTransform","clearRect","IMG","INIT","LOADING","LOADED","FONT","COMPONENT","div","SUPPORT_FONT","defaultFontFamilyData","createDiv","position","left","top","whiteSpace","inject","measureTextSync","str","ff","fs","fw","isUpright","fontFamily","fontSize","fontWeight","writingMode","innerHTML","window","getComputedStyle","measureTextListMax","cns","childNodes","measureImg","url","cb","count","cache","error","state","success","task","img","Image","onload","splice","onerror","substr","host","exec","location","hostname","crossOrigin","src","warn","console","requestAnimationFrame","bind","setTimeout","cancelAnimationFrame","id","clearTimeout","now","performance","hasOffscreenCanvas","getOffscreenCanvas","isDom","Element","self","getElementsByTagName","isWebGLTexture","WebGLTexture","defaultFontFamily","getFontCanvas","checkSupportFontFamily","toLowerCase","context","textAlign","fillStyle","textBaseline","font","fillText","getImageData","data","loadFont","ab","FontFace","load","then","fonts","add","ArrayBuffer","request","XMLHttpRequest","open","responseType","response","send","loadComponent","script","async","head","removeChild","TINF_OK","TINF_DATA_ERROR","Tree","table","Uint16Array","trans","Data","dest","sourceIndex","tag","bitcount","destLen","ltree","dtree","sltree","sdtree","length_bits","Uint8Array","length_base","dist_bits","dist_base","clcidx","code_tree","lengths","tinf_build_bits_base","bits","base","delta","first","sum","tinf_build_fixed_trees","lt","dt","offs","tinf_build_tree","off","num","tinf_getbit","bit","tinf_read_bits","val","tinf_decode_symbol","cur","tinf_decode_trees","hlit","hdist","hclen","clen","sym","prev","tinf_inflate_block_data","dist","tinf_inflate_uncompressed_block","invlength","tinf_uncompress","bfinal","btype","Error","subarray","getTag","dataView","offset","String","fromCharCode","getInt8","getUShort","getUint16","getULong","getUint32","getFixed","decimal","getInt16","fraction","parseOpenTypeTableEntries","numTables","tableEntries","checksum","compression","parseWOFFTableEntries","compLength","origLength","compressedLength","uncompressTable","tableEntry","inBuffer","buffer","outBuffer","inflate","byteLength","view","DataView","Parser","relativeOffset","minorBase","major","minor","parse","arrayBuffer","signature","flavor","emSquare","ascent","descent","lineGap","parseVersion","parseFixed","parseULong","parseUShort","abs","parseShort","CALLBACK","info","arial","lhr","blr","lgr","helvetica","verdana","tahoma","georgia","simsun","support","checked","register","name","fontInfo","r","opentype","setData","pop","__emitFontRegister","assign","hasRegister","hasLoaded","onRegister","offRegister","indexOf","DOM","display","right","bottom","marginTop","marginRight","marginBottom","marginLeft","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","lineHeight","backgroundImage","backgroundColor","backgroundSize","backgroundRepeat","backgroundPositionX","backgroundPositionY","backgroundClip","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","flexGrow","flexShrink","flexBasis","flexDirection","flexWrap","order","justifyContent","alignItems","alignSelf","alignContent","letterSpacing","transformOrigin","zIndex","translateX","translateY","translateZ","scaleX","scaleY","scaleZ","skewX","skewY","rotateX","rotateY","rotateZ","rotate3d","perspective","perspectiveOrigin","transformStyle","backfaceVisibility","boxShadow","pointerEvents","textOverflow","lineClamp","textStrokeWidth","textStrokeColor","textStrokeOver","GEOM","fill","stroke","strokeWidth","strokeDasharray","strokeLinecap","strokeLinejoin","strokeMiterlimit","fillRule","DOM_ENTRY_SET","DOM_KEY_SET","GEOM_ENTRY_SET","GEOM_KEY_SET","INHERIT_KEY_SET","VALID_STRING_VALUE","isValid","gradient","dotProduct","dotProduct3","crossProduct","crossProduct3","unitize","unitize3","length3","isParallel","isZero","ag","angle","PI","isParallel3","isZero3","angle3","acos","sqrt","pow","getPerpendicularVector3","STYLE_KEY","POSITION","DISPLAY","TOP","RIGHT","BOTTOM","LEFT","MARGIN_TOP","MARGIN_RIGHT","MARGIN_BOTTOM","MARGIN_LEFT","PADDING_TOP","PADDING_RIGHT","PADDING_BOTTOM","PADDING_LEFT","FONT_SIZE","FONT_FAMILY","COLOR","FONT_STYLE","FONT_WEIGHT","LINE_HEIGHT","BACKGROUND_IMAGE","BACKGROUND_COLOR","BACKGROUND_SIZE","BACKGROUND_REPEAT","BACKGROUND_POSITION_X","BACKGROUND_POSITION_Y","BORDER_TOP_WIDTH","BORDER_RIGHT_WIDTH","BORDER_BOTTOM_WIDTH","BORDER_LEFT_WIDTH","BORDER_TOP_COLOR","BORDER_RIGHT_COLOR","BORDER_BOTTOM_COLOR","BORDER_LEFT_COLOR","BORDER_TOP_STYLE","BORDER_RIGHT_STYLE","BORDER_BOTTOM_STYLE","BORDER_LEFT_STYLE","BORDER_TOP_LEFT_RADIUS","BORDER_TOP_RIGHT_RADIUS","BORDER_BOTTOM_RIGHT_RADIUS","BORDER_BOTTOM_LEFT_RADIUS","WIDTH","HEIGHT","FLEX_GROW","FLEX_SHRINK","FLEX_BASIS","FLEX_DIRECTION","JUSTIFY_CONTENT","ALIGN_ITEMS","ALIGN_SELF","TEXT_ALIGN","TRANSFORM_ORIGIN","VISIBILITY","OPACITY","Z_INDEX","TRANSFORM","TRANSLATE_X","TRANSLATE_Y","TRANSLATE_Z","SCALE_X","SCALE_Y","SCALE_Z","SKEW_X","SKEW_Y","ROTATE_X","ROTATE_Y","ROTATE_Z","ROTATE_3D","PERSPECTIVE","PERSPECTIVE_ORIGIN","FILTER","BOX_SHADOW","POINTER_EVENTS","OVERFLOW","MIX_BLEND_MODE","BACKGROUND_CLIP","WHITE_SPACE","TEXT_OVERFLOW","LETTER_SPACING","LINE_CLAMP","ORDER","FLEX_WRAP","ALIGN_CONTENT","TEXT_STROKE_WIDTH","TEXT_STROKE_COLOR","TEXT_STROKE_OVER","WRITING_MODE","TRANSFORM_STYLE","BACKFACE_VISIBILITY","FILL","STROKE","STROKE_WIDTH","STROKE_DASHARRAY","STROKE_DASHARRAY_STR","STROKE_LINECAP","STROKE_LINEJOIN","STROKE_MITERLIMIT","FILL_RULE","MATRIX","BORDER_TOP","BORDER_RIGHT","BORDER_BOTTOM","BORDER_LEFT","TRANSLATE_PATH","STYLE2LOWER_MAP","style2Lower","toUpperCase","STYLE2UPPER_MAP","style2Upper","STYLE_R_KEY","STYLE_RV_KEY","STYLE_V_KEY","k2","ELLIPSIS","H","vector","enums","deg","pointInConvexPolygon","vertexes","xmax","ymax","xmin","ymin","pointInQuadrilateral","angleBySide","theta","sideByAngle","alpha","pointsDistance","triangleIncentre","ellipsePoints","ox","oy","sectorPoints","begin","end","h2","d2r","atan","rx","ry","p1","p2","p4","p3","concat","temp","getRectsIntersection","isRectsOverlap","ax1","ay1","ax4","ay4","bx1","by1","bx4","by4","includeIntersect","isRectsInside","calCoordsInNode","px","py","computedStyle","calPercentInNode","ds","Infinity","r2d","pointOnCircle","getPlainNormalEquation","points","getConicGradientImage","originX","originY","stop","getAngle","increasingList","map","start","factor","idx","canvasPolygon","moveTo","lineTo","quadraticCurveTo","bezierCurveTo","svgPolygon","canvasLine","controlA","controlB","svgLine","canvasFilter","svgFilter","geom","unit","painter","calFitDashed","total","bs","be","smin","smax","dmin","dmax","ps","pd","outer","per","free","mo","calDashed","m1","m2","m3","m4","bw","calPoints","borderWidth","borderStyle","deg1","deg2","direction","beginRadius","endRadius","isLast","main1","main2","cross1","cross2","calTopRadiusPoints","calRightRadiusPoints","calBottomRadiusPoints","calLeftRadiusPoints","pointsList","brx","bry","erx","ery","oxl","oxr","beginList","centerList","endList","beginLength","needInner","crossDeg","rx1","ry1","sx1","oyl","rx2","ry2","sx2","ca","calBezierTopLeft","controls1","controls2","limit","endLength","oyr","calBezierTopRight","sx","isStart","crossDx","p1x","p1y","p2x","p2y","dx1","dsx1","dx2","dsx2","cpx2","cpy2","cpx1","cpy1","crossDsx","beta","tanBetaDiv2Sqrt","tanAlphaHalf","degTg","degTg1","cdx1","cdy1","cx1","cy1","degTg2","cdx2","cdy2","cx2","cy2","isEnd","oyt","oyb","oxt","calBezierRightTop","oxb","calBezierRightBottom","calBezierBottomLeft","calBezierBottomRight","calBezierLeftTop","calBezierLeftBottom","calRadius","btlr","btrr","bbrr","bblr","need","btlx","btly","btrx","btry","bbrx","bbry","bblx","bbly","BR_KS","calBorderRadius","currentStyle","root","noRadius","next","half","calBorderRadiusInline","contentBoxList","last","isEllipsis","outerWidth","outerHeight","renderBorder","xom","renderMode","mode","beginPath","closePath","virtualDom","getLinearDeg","getRadialPosition","center","getColorStop","firstColor","dr","dg","db","da","unshift","calLinearCoords","cx","cy","x0","y0","calCircleCentre","iw","ih","positionX","positionY","calRadialRadius","shape","size","xl","yl","tx","ty","asin","ratio","parseGradient","reg","i5","i6","i7","percent","getLinear","coords","l1","l2","l3","l4","r1","getRadial","scx","scy","getConic","calConicRadius","renderConic","isInline","border","offscreen","imgData","putImageData","save","clip","drawImage","restore","parseFlex","grow","shrink","basis","parseMarginPadding","parseOneBorder","margin","padding","borderTop","borderRight","borderBottom","borderLeft","borderColor","borderRadius","background","backgroundPosition","flex","translate","translate3d","scale","scale3d","rotate","skew","textStroke","toFull","bgc","bgi","bgr","bgp","gd","repeat","join","isEmpty","v2","isColorKey","isLengthKey","isExpandKey","isGradientKey","isRadiusKey","RESET_DOM","reset","RESET_GEOM","addGeom","ks","isIgnore","isGeom","isRepaint","kernelSize","sigma","outerSize","outerSizeByD","gaussianWeight","E","change","isGradient","TRANSFORM_HASH","compatibleTransform","camel","convertStringValue","normalize","resetList","abbr","flexFlow","k1","arr1","arr2","k3","arr3","isNaN","item2","setFontStyle","getBaseline","calFontFamily","normal","calNormalLineHeight","getVerticalBaseline","calRelativePercent","parent","domParent","calRelative","isWidth","isRelativeOrAbsolute","equalStyle","oa","ob","av","bv","avj","bvj","aa","ad","bd","isArrayD1","isArrayD2","ap","bp","aj","bj","ac","bc","isMulti","cloneStyle","vv","spreadBoxShadow","yt","xr","spread","inset","blur","spreadFilter","calRotateX","calRotateY","calRotateZ","calRotate3d","rlen","nc","xy","yz","zx","xs","ys","zs","calMatrix","ow","oh","calSingleValue","calMatrixByOrigin","calMatrixWithOrigin","__computedStyle","calPerspectiveMatrix","ppt","isPerspectiveMatrix","TuOrU","TextBox","index","__index","__content","__parentLineBox","__isVertical","cacheStyle","dom","css","__endX","__endY","me","matrixEvent","dev1","dev2","overFill","cjk","strokeText","measureText","nowCjk","__gradient","__bx1","__by1","__bx2","__by2","baseline","verticalBaseline","CHAR","Ellipsis","__x1","__y1","__ellipsis","TX","TY","TZ","OP","FT","PPT","SX","SY","SZ","RZ","TF","NONE","CACHE","TRANSLATE","SCALE","TRANSFORM_ALL","MASK","REPAINT","REFLOW","REBUILD","ENUM","isTransforms","contain","value","exclude","getLevel","isReflow","measureLineWidth","perW","rw","newLine","mw","hypotheticalNum","round","reduce","getFontKey","ls","Text","__textBoxes","__charWidth","__textWidth","__bp","__widthHash","__limitCache","__hasContent","__cache","lx","ly","lineBoxManager","endSpace","lineClampCount","textBoxes","maxW","beginSpace","lineCount","mainCoords","isTextOverflow","textWidth","containerSize","__lineBack","textBox","addItem","verticalLineHeight","ew","lineBox","isNewLine","tb","__layoutNone","__resetLb","ep","tbs","mbp","isLayout","__offsetX","__offsetY","firstCharWidth","lineWidth","strokeStyle","render","__addUpdate","level","isShadowRoot","hostRoot","__children","__zIndexChildren","__deleteStruct","__destroy","fontKey","charWidth","__currentStyle","__style","__cacheStyle","__matrix","__matrixEvent","__perspectiveMatrix","Event","__eHash","handle","on","apply","__karasEventCb","once","emit","event","fns","fn","REGISTER","Component","__tagName","__ref","__isMounted","__taskList","sr","__shadowRoot","listener","componentDidMount","REFRESH","ref","componentWillUnmount","__shadow","force","shadowRoot","__emitEvent","__state","defineProperty","get","arguments","getInlineBox","leading","bcStart","bcEnd","pbStart","pbEnd","bx2","by2","getInlineWidth","contentBox","matrixResize","imgWidth","imgHeight","targetWidth","targetHeight","renderBgc","method","__cacheDefs","renderImage","loadBgi","bgW","bgH","bgX","bgY","needMask","xnl","xnr","ynt","ynb","ceil","image","needResize","copy","traversalBefore","__before","traversalAfter","__after","isPause","Frame","__rootTask","__task","__now","__init","__karasFramecb","offFrame","onFrame","NEWTON_ITERATIONS","NEWTON_MIN_SLOPE","SUBDIVISION_PRECISION","SUBDIVISION_MAX_ITERATIONS","kSplineTableSize","kSampleStepSize","float32ArraySupported","Float32Array","A","aA1","aA2","B","C","calcBezier","aT","getSlope","binarySubdivide","aX","aA","aB","mX1","mX2","currentX","currentT","newtonRaphsonIterate","aGuessT","currentSlope","LinearEasing","bezier","mY1","mY2","sampleValues","getTForX","intervalStart","currentSample","lastSample","guessForT","initialSlope","BezierEasing","easing","linear","easeIn","easeOut","ease","easeInOut","cubicBezier","getEasing","v1","v3","timingFunction","unify","frames","getProps","inherit","__outerWidth","__outerHeight","tf","genBeforeRefresh","aniParams","allInFn","framing","duration","es","translatePath","time","transition","fixed","lastPercent","calByUnit","container","calDiff","cl","st","pm","nm","has","pv","nv","pvv","nvv","clientHeight","clientWidth","pi","ni","offsetHeight","offsetWidth","pp","nn","parentComputedStyle","calDiffGradient","len2","pv2","nv2","len3","pv3","nv3","eq","isArrP","isArrN","pz","nz","np","calFrame","hasTp","ts","cs","CAL_HASH","hasZ","hasColor","hasTsColor","hasTsWidth","hasTsOver","optimize","binarySearch","middle","frame","ea","steps","stepsD","calTransform","calFilter","calOrigin","calPosition","calBoxShadow","calBgSize","calNumber","calPath","calLength","calGradient","calColor","clv","cv","st2","cli","calIntermediateStyle","notSameFrame","currentProps","__currentProps","modify","calIncrease","o2","n2","calLastStyle","gotoOverload","options","frameCb","FRAME","__isChange","__firstPlay","PLAY","__playCb","Animation","__id","nl","__options","op","__begin","__playState","__target","__firstEnter","iterations","framesR","originStyle","__frames","__framesR","__keys","__originStyle","__isDelay","__outBeginDelay","__playCount","fps","spfLimit","delay","endDelay","playbackRate","__currentFrames","reverse","__timestamp","current","isFinish","__cancelTask","__nextTime","__currentTime","__delay","__duration","__iterations","__endDelay","isDestroyed","playState","__hasFin","__hasCancel","__enterFrame","__direction","__fpsTime","__startTime","__end","__fps","currentFrames","stayBegin","__stayBegin","stayEnd","__stayEnd","__playbackRate","__spfLimit","currentTime","lastFrame","__currentFrame","__inFps","currentFrame","playCount","isEven","isLastCount","frameTime","isLastFrame","inEndDelay","needClean","__nextEnd","__finished","playCb","__clean","BEGIN","END","FINISH","silence","pending","PAUSE","play","CANCEL","__goto","isFrame","excludeDelay","finish","spf","alternate","animateController","__animateController","remove","removeControl","__checkModify","__fill","backwards","both","forwards","__easing","renderBoxShadow","box","spreadBox","cross","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","blurBox","mbmName","isValidMbm","mbm","getFirstEmptyInlineWidth","flowChildren","child","Xom","__isInline","getLastEmptyInlineWidth","__listener","__animationList","__loadBgi","isClip","__clip","__mask","__refreshLevel","__opacity","__frameAnimateList","__contentBoxList","__cacheAsBitmap","cacheAsBitmap","__cacheTotal","__cacheFilter","__cacheMask","__layoutData","__hasComputeReflow","__fontRegister","__hasMask","hasMask","__calSize","includePercent","isRoot","ph","crs","fontRegister","__clientWidth","__offsetWidth","__clientHeight","__offsetHeight","isDirectionRow","isDirectItem","isAbs","isColumn","isRow","__layoutFlow","__computeReflow","__isIbFull","__isUprightIbFull","clearCache","__mp","__layoutFlex","__layoutInline","__layoutBlock","__x2","__x3","__x4","__x5","__x6","__y2","__y3","__y4","__y5","__y6","__oy","__execAr","__calStyle","__calPerspective","ar","__animateRecords","controller","autoPlay","__records2","init","list2","__records","__playAuto","__reset0","h3","isParentVertical","fixedWidth","fixedHeight","selfEndSpace","isReplaced","matrixCache","sy","__calMatrix","tfo","__calFilter","bgI","kw","rebuild","po","offscreenBlend","offscreenMask","offscreenFilter","offscreenOverflow","origin","borderList","x5","x6","y5","y6","isRealInline","hasBgi","some","svgBgSymbol","inline","bg","isFirst","lastContentBox","lastLineBox","parentLineBox","ix1","iy1","ix2","iy2","symbol","clearAnimate","clearFrameAnimate","__stopPropagation","__stopImmediatePropagation","willResponseEvent","hasEmitMask","ignore","inThis","__touchstartTarget","__getLg","__getRg","__getCg","lg","createLinearGradient","addColorStop","rg","createRadialGradient","onlyTotal","clearTopCache","formatStyle","updateFormatStyle","animation","cancel","enter","includeBbox","LineBox","__list","__lineHeight","__isUpright","__bOffset","increase","isAlign","__ox","LineBoxManager","__lastX","__lastY","__max","__domList","__domStack","__isNewLine","__isEnd","__spreadList","nextNewLine","genLineBox","spreadList","verticalAlign","__setLB","endX","endY","bOffset","TAG_NAME","INLINE","BOLD","Geom","__isMulti","multi","__cacheProps","isDirectChild","main","isFixed","__addMBP","__layoutStyle","__preLayout","tw","th","__ioSize","__marginAuto","__hasXomContent","empty","strokeDasharrayStr","lineCap","lineJoin","miterLimit","getLineDash","setLineDash","preData","__preSet","fills","fillRules","strokes","strokeWidths","strokeDasharrays","strokeDasharrayStrs","strokeLinecaps","strokeLinejoins","strokeMiterlimits","__renderOnePolygon","isFillCE","isStrokeCE","isFillRE","isStrokeRE","__conicGradient","__drawPolygon","__radialEllipse","isFill","isStroke","__preSetCanvas","__propsStrokeStyle","__inversePtList","getTransform","clearSvgCache","getMergeMargin","topList","bottomList","isFixedWidthOrHeight","isFixedSize","includeParentFlex","getPrevMergeMargin","mtList","mbList","getNextMergeMargin","offsetNext","parentFixed","absList","checkTop","addDom","removeDom","isSiblingBlock","checkNext","cps","isLastAbs","isNowAbs","isLastNone","isNowNone","isLast0","oldH","svg","t1","t2","hasFlowPrev","__updateStruct","__layoutAbs","ld","__layout","isNow0","t3","t4","nowH","isRemoveSelf","__resizeY","buildChildren","flatten","relation","hoc","buildRoot","genZIndexChildren","hasMc","mcHash","lastMaskIndex","__iIndex","__zIndex","__aIndex","sort","genOrderChildren","__order","backtrack","text","__backtrack","Dom","block","inlineBlock","none","builder","__flexLine","zIndexChildren","__structure","struct","__structs","nss","structs","needSort","__tryLayInline","isContent","fixedSize","countMin","countMax","isR","__calBasis","min2","max2","__lineBoxManager","maxSize","countSize","mergeMarginEndList","mergeMarginStartList","ignoreNextLine","ignoreNextWrap","isXom","isInlineBlock","__isRealInline","lastLineClampCount","reflow","setNotEnd","lastX","lastY","setNewLine","isNone","isEmptyBlock","__resizeX","isLastBlock","hasStart","isBlock","horizonAlign","__inlineSize","domList","growList","shrinkList","basisList","maxList","minList","orderChildren","cw","isMultiLine","line","hypotheticalList","hypothetical","maxCrossList","marginAutoCountList","freeList","__layoutFlexLine","maxCross","marginAutoCount","crossSum","crossSumList","between","around","__flexAlign","flexLine","hypotheticalSum","isOverflow","targetMainList","lessOne","factorSum","factorList","needReset","factorSum2","count1","count2","lbmList","needGenAr","firstBaseline","old","genLineBoxByInlineIfNewLine","setLbByInlineIfNotNewLine","pushContentBoxList","isIbFull","isUprightIbFull","hasAddEndSpace","isInline2","isInlineBlock2","addY","addX","popContentBoxList","maxX","maxY","minX","minY","maxCX","maxCY","minCX","minCY","maxFX","maxFY","minFX","minFY","maxOX","maxOY","minOX","minOY","absChildren","onlyRight","onlyBottom","fixedTop","fixedRight","fixedBottom","fixedLeft","widthLimit","heightLimit","__insertStruct","Img","loadImg","__loadImg","loading","__loadAndRefresh","placeholder","onlyImg","showError","pts","__addGeom","reload","Defs","cacheHash","elem","ovd","nvd","diffDefs","diffBb","diffD2D","od","nd","ol","diffDef","removeAt","insertAt","insertAdjacentHTML","parentNode","removeAttribute","diffItem","diffChild","diffD2G","replaceWith","diffT2T","diffG2D","diffG2G","diffItemSelf","diffX2X","diffByLessLv","firstChild","lastChild","obb","nbb","isText","html","where","insertBefore","Controller","__list2","__onList","__lastTime","args","records","animate","offsetTime","onList","timestamp","__action","__mergeAuto","__on","__set","Cache","rootId","page","pos","__uuid","__renderMode","__ctx","__rootId","__page","__pos","getCoords","__size","__tx1","__ty1","__tx2","__ty2","__enabled","__available","__appendData","dbx","dby","update","__update","clear","del","klass","getInstance","texture","cacheKlass","pageKlass","excludePage","UNIT","MAX","HASH","Page","number","__number","grid","__grid","Int32Array","unitSize","getFreePos","MAX_TEXTURE_SIZE","initShaders","gl","vshader","fshader","program","createProgram","enable","BLEND","blendFunc","ONE","ONE_MINUS_SRC_ALPHA","vertexShader","loadShader","VERTEX_SHADER","fragmentShader","FRAGMENT_SHADER","attachShader","linkProgram","linked","getProgramParameter","LINK_STATUS","getProgramInfoLog","deleteProgram","deleteShader","shader","createShader","shaderSource","compileShader","compiled","getShaderParameter","COMPILE_STATUS","getShaderInfoLog","convertCoords2Gl","tz","createTexture","tex","bindTexture","pixelStorei","UNPACK_FLIP_Y_WEBGL","UNPACK_PREMULTIPLY_ALPHA_WEBGL","texImage2D","TEXTURE_2D","UNSIGNED_BYTE","texParameteri","TEXTURE_WRAP_S","CLAMP_TO_EDGE","TEXTURE_WRAP_T","TEXTURE_MIN_FILTER","LINEAR","TEXTURE_MAG_FILTER","activeTexture","lastVtPoint","lastVtTex","lastVtOpacity","drawTextureCache","vtPoint","vtTex","vtOpacity","tx1","ty1","tx2","ty2","genTexture","bx","by","pointBuffer","createBuffer","bindBuffer","ARRAY_BUFFER","bufferData","STATIC_DRAW","a_position","getAttribLocation","vertexAttribPointer","FLOAT","enableVertexAttribArray","texBuffer","a_texCoords","opacityBuffer","a_opacity","u_texture","getUniformLocation","uniform1i","drawArrays","TRIANGLES","deleteBuffer","disableVertexAttribArray","drawBlur","tex1","useProgram","viewport","u_direction","recycle","tex2","framebufferTexture2D","FRAMEBUFFER","COLOR_ATTACHMENT0","uniform2f","tex3","deleteTexture","drawCm","h1","u_m","uniform1fv","drawOverflow","bbox1","bbox2","drawMask","texBuffer1","a_texCoords1","texBuffer2","a_texCoords2","u_texture1","u_texture2","drawMbm","drawDropShadow","frameBuffer","u_color","drawDropShadowMerge","dy1","dy2","drawTex2Cache","drawCache2Tex","drawSameSize","programSs","u_opacity","uniform1f","drawOitPlane","isPuzzle","pHash","tHash","z0","w0","tx0","ty0","hashP","hashT","CanvasPage","__offscreen","webgl","CanvasCache","oldX1","widthNew","heightNew","callback","cacheMask","genSingle","globalCompositeOperation","drawCache","dbx2","dby2","bboxNew","OFFSCREEN_OVERFLOW","OFFSCREEN_FILTER","OFFSCREEN_MASK","OFFSCREEN_BLEND","OFFSCREEN_MASK2","applyOffscreen","rect","TOLERANCE","getLinearRoot","coefs","result","getQuadraticRoots","results","getCubicRoots","c0","discrim","halfB","tmp","distance","atan2","sqrt3","getQuarticRoots","resolveRoots","plus","minus","getRoots","degree","equation","ACCURACY","getDerivativeCoefs","derivative","evaluate","bisection","minValue","maxValue","tmp1","log","tmp2","LN10","iters","LN2","getRootsInInterval","roots","derivativeCoefs","droots","intersectBezier2Bezier2","ax2","ay2","ax3","ay3","bx3","by3","c12","c11","c10","c22","c21","c20","v0","v4","v5","v6","xRoots","yRoots","checkRoots","xRoot","intersectBezier3Bezier3","c13","c23","c10x2","c10x3","c10y2","c10y3","c11x2","c11x3","c11y2","c11y3","c12x2","c12x3","c12y2","c12y3","c13x2","c13x3","c13y2","c13y3","c20x2","c20x3","c20y2","c20y3","c21x2","c21x3","c21y2","c22x2","c22x3","c22y2","c23x2","c23x3","c23y2","c23y3","intersectBezier2Bezier3","intersectBezier2Line","minbx","minby","maxbx","maxby","dot","lerp","p5","p6","intersectBezier3Line","p7","p8","p9","p10","intersectLineLine3","limitToFiniteSegment","tolerance","p13","subtractPoint","p43","p21","d1343","d4321","d1321","d4343","d2121","denom","numer","mua","mub","pa","pb","distanceTo","intersectPt","divide","addPoint","paramA","closestParam","paramB","from","to","startToP","startToEnd","startEnd2","startEnd_startP","intersectPlanePlane","v9","mb","invDet","v11","v12","v13","v21","v22","v23","v31","v32","v33","pointOnLine3","v1x","v1y","v1z","v2x","v2y","v2z","isec","shadow","puzzle","xShadow","xBbox","yShadow","yBbox","zShadow","zBbox","splitQuadrilateralPlane","xList","plane","belong","eventHash","seg","eventList","HISTORY","ael","elLen","isVisited","isDeleted","pointsA","pointsB","resA","resB","splitPlaneByPoint","i1","i2","p0","r2","onVertex1","onVertex2","va","vb","r0","getPercentXY","ipx","ipy","sortPuzzleZ","cz","willEnd","zHash","TexturePage","TextureCache","texSubImage2D","ImgCanvasCache","__canvas","ImgWebglCache","MBM","DOM_RENDER","IMG_RENDER","GEOM_RENDER","getCache","genBboxTotal","isPpt","bboxTotal","mergeBbox","__computedStyle2","countMaskNum","__cache2","__cacheTotal2","__cacheFilter2","__cacheMask2","genTotal","ctxTotal","matrixList","parentMatrix","lastMatrix","lastLv","maskStartHash","offscreenHash","mh","__calOffscreen","genTotalOther","needGen","genFilter","genMask","opacityList","parentOpacity","lastOpacity","genFrameBufferWithTexture","createFramebuffer","bindFramebuffer","check","checkFramebufferStatus","FRAMEBUFFER_COMPLETE","genTotalWebgl","W","pptNode","oitHash","lastPage","cacheTotal","oit","genMbmWebgl","deleteFramebuffer","genPptWebgl","mergeHash","mergeList","isFlat","isTopFlat","planeList","genFilterWebgl","genBlurWebgl","genDropShadowWebgl","rotation","cosR","sinR","genColorMatrixWebgl","amount","oneMinusAmount","genBlurShader","weights","vert","frag","vertexBlur","fragmentBlur","getParameter","MAX_VARYING_VECTORS","programCm","genMaskWebgl","programClip","programMask","programDs","bboxMerge","programMbmMp","programMbmSr","programMbmOl","programMbmDk","programMbmLt","programMbmCd","programMbmCb","programMbmHl","programMbmSl","programMbmDf","programMbmEx","programMbmHue","programMbmSt","programMbmCl","programMbmLm","resTex","resFrameBuffer","renderSvg","rlv","maskEffectHash","hasEffectMask","addCache","maskHash","vdList","parentVd","lastRefreshLv","lastNode","mChildren","ivs","hasTransform","removeCache","renderWebgl","lastRefreshLevel","hasMbm","flatList","flatExtendList","pptNodeList","parentPptNode","lastPptNode","parentFlat","parentExtendFlat","isMbm","hasContent","calContent","isFilter","pptHash","ii","isPerspective","renderCanvas","msh","antialias","premultipliedAlpha","preserveDrawingBuffer","depth","ROOT_DOM_NAME","getDom","querySelector","renderProp","EVENT_LIST","initEvent","Root","__wrapEvent","__cb","addEventListener","removeEvent","removeEventListener","__dom","__mw","__mh","mix","__rlv","__lastUpdateP","domName","__scx","__scy","getBoundingClientRect","touches","clientX","clientY","stopPropagation","stopImmediatePropagation","preventDefault","__hasEmitted","__initProps","nodeName","__genHtml","domCss","getPropertyValue","params","contextAttributes","__defs","webgl2","__initShader","draw","destroy","__eventCbList","vertex","fragment","vertexMask","fragmentMask","fragmentClip","programOverflow","vertexOverflow","fragmentOverflow","vertexCm","fragmentCm","vertexDs","fragmentDs","vertexMbm","fragmentMultiply","fragmentScreen","fragmentOverlay","fragmentDarken","fragmentLighten","fragmentColorDodge","fragmentColorBurn","fragmentHardLight","fragmentSoftLight","fragmentDifference","fragmentExclusion","fragmentHue","fragmentSaturation","fragmentColor","fragmentLuminosity","vertexSs","fragmentSs","__checkRoot","wm","__reLayout","noRender","__clearCanvas","__vd","domDiff","__clearWebgl","updateStyle","includeIgnore","scan","path","zPath","__index__","karas","path2","zPath2","focus","hasVisibility","hasDisplay","hasRelease","isRp","__frameDraw","nextFrame","clearColor","COLOR_BUFFER_BIT","bboxBezier2","qx","qy","bboxBezier3","ax","ay","hx","hy","q","bboxBezier","norm","simpson38","derivativeFunc","middleL","middleR","adaptiveSimpson38","eps","mid","sl","ans","bezierLength","startT","endT","at","at3","at2","derivativeOrder","pointAtBezier","maxIteration","pointAtBezierWithLength","targetLen","approachLen","approachT","preApproachT","derivative1","derivative2","numerator","denominator","sliceBezier","x12","y12","x23","y23","x123","y123","x34","y34","x234","y234","x1234","y1234","sliceBezier2Both","pointAtByT","pointAtByT3","pointAtByT2","getPointT","getPointT3","getPointT2","xt","bezierSlope","bezier2Slope","bezier3Slope","reBuild","reBuildC","curveNum","getNewPoint","Line","__xa","__ya","__xb","__yb","__controlA","__controlB","__start","buildCache","curve","bezierBox","Point","Segment","calBbox","myFill","otherFill","myCoincide","otherCoincide","toHash","EPS","EPS2","getIntersectionLineLine","toSource","toClip","getIntersectionBezier2Line","getIntersectionBezier2Bezier2","getIntersectionBezier2Bezier3","getIntersectionBezier3Line","getIntersectionBezier3Bezier3","sortIntersection","isSource","intersect","Polygon","regions","segments","vertices","startPoint","firstPoint","curr","endPoint","compare","cPoint","getBezierMonotonicity","curve1","curve2","cPoint1","cPoint2","lastPoint","lastT","genHashXList","findIntersection","polyA","polyB","isIntermediateA","isIntermediateB","genHashXYList","aelA","aelB","hashA","hashB","hc","isAboveLast","segAboveCompare","isAbove","inside","compareBelong","delList","shift","bboxA","coordsA","lenA","bboxB","coordsB","lenB","isSourceReverted","inters","overs","checkOverlapLine","checkOverlapBezier","activeNewSeg","ra","rb","sliceSegment","isIntermediate","ns","hashX","putHashX","hashXY","putHashXY","listX","hashY","listY","pointAboveOrOnLine","pt","segA","segB","la","lb","getYByX","isX","isY","firstA","firstB","lastA","lastB","conditionA","conditionB","conditionC","startA","endA","startB","endB","equalBezier","over","chains","chain","isHead","tail","ptHead","ptTail","close","coords2","clockwise","area","prefix","polygon","trivial","polygonA","polygonB","selfIntersect","intersect2","annotate2","INTERSECT","UNION","SUBTRACT","SUBTRACT_REV","XOR","intermediate","union","subtract","subtractRev","xor","bo","subtract2","concatPointAndControl","control","getLength","getIndex","getNewList","start2","end2","isStartLt0","isEndGt1","prePercent","Polyline","__points","__controls","controls","booleanOperations","__booleanOperations","isControl","rebuildSE","__getPoints","__needRebuildSE","__reprocessing","__renderPolygon","pointList","controlList","getR","dft","Sector","__r","edge","__edge","closure","__closure","sList","__renderOneSector","genVertex","Rect","__rx","__ry","Circle","Ellipse","my","json","animateRecords","opt","oft","JSON","createGm","cp","getRegister","createCp","createVd","fullCssProperty","abbrCssProperty","os","fullAnimate","abbrAnimate","fullAnimateOption","abbrAnimateOption","abbr2full","fk","linkLibrary","libraryItem","vars","library","libraryId","initLibrary","replaceLibraryVars","slot","member","replaceVars","replaceAnimateOptions","imgs","singleton","loadAndParse","components","list1","list3","calDeg","pointIndex","pointByIndex","exchangeOrder","sy1","sy2","sx3","sy3","tx3","ty3","ls2","lt2","AB","AC","BC","tar","version","appendTo","parser","math","refresh"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAMA;IACJ,SAAc,IAAA,GAAA;MACZ,IAAKC,CAAAA,GAAL,GAAW,CAAX,CAAA;MACA,IAAKC,CAAAA,GAAL,GAAW,CAAX,CAAA;MACA,IAAKC,CAAAA,OAAL,GAAe,CAAf,CAAA;MACA,IAAKC,CAAAA,QAAL,GAAgB,CAAhB,CAAA;MACA,IAAKC,CAAAA,UAAL,GAAkB,CAAlB,CAAA;MACA,IAAKC,CAAAA,kBAAL,GAA0B,CAA1B,CAAA;MACA,IAAKC,CAAAA,MAAL,GAAc,IAAd,CAAA;MACA,IAAKC,CAAAA,MAAL,GAAc,IAAd,CAAA;MACA,IAAKC,CAAAA,QAAL,GAAgB,IAAhB,CAAA;MACA,IAAKC,CAAAA,WAAL,GAAmB,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,GAAhC,EAAqCsV,OAArC,CAAP,CAAA;KA3DQ;EA6DV/hB,EAAAA,IAAI,EAAJA,IA7DU;EA8DV6U,EAAAA,SAAS,EAATA,SA9DU;EA+DVjwC,EAAAA,IAAI,EAAJA,IA/DU;EAgEV2rC,EAAAA,IAAI,EAAJA,IAhEU;EAiEV+iB,EAAAA,IAAI,EAAJA,IAjEU;EAkEVpK,EAAAA,GAAG,EAAHA,GAlEU;EAmEV6Q,EAAAA,GAAG,EAAHA,GAnEU;EAoEVyH,EAAAA,GAAG,EAAHA,GApEU;EAqEV4lB,EAAAA,IAAI,EAAJA,IArEU;EAsEVnzC,EAAAA,KAAK,EAALA,KAtEU;EAuEVtiC,EAAAA,IAAI,EAAJA,IAvEU;EAwEV0E,EAAAA,MAAM,EAANA,MAxEU;EAyEV1B,EAAAA,KAAK,EAALA,KAzEU;EA0EVsrF,EAAAA,MAAM,EAANA,CA1EU;EA2EVr7B,EAAAA,OAAO,EAAPA,OA3EU;EA4EVs7B,EAAAA,IAAI,EAAJA,IA5EU;EA6EVC,EAAAA,OAAO,EAAPA,OA7EU;EA8EV3tE,EAAAA,KAAK,EAALA,KA9EU;EA+EVyI,EAAAA,EAAE,EAAFA,EA/EU;;IAgFV,IAAIzmB,KAAJ,CAAUhN,CAAV,EAAa;EACXgN,IAAAA,KAAK,CAACX,IAAN,GAAa,CAAC,CAACrM,CAAf,CAAA;EACD,GAAA;;EAlFS,EAAZ;;EAqFA,IAAG,OAAOyP,MAAP,KAAkB,WAArB,EAAkC;IAChCA,MAAM,CAACm1E,KAAP,GAAeA,OAAf,CAAA;EACD,CAFD,MAGK,IAAG,OAAO3yE,IAAP,KAAgB,WAAnB,EAAgC;IACnCA,IAAI,CAAC2yE,KAAL,GAAaA,OAAb,CAAA;EACD;;;;;;;;"} \ No newline at end of file diff --git a/src/refresh/struct.js b/src/refresh/struct.js index ca41ee2bc..4673c71a6 100644 --- a/src/refresh/struct.js +++ b/src/refresh/struct.js @@ -752,8 +752,8 @@ function genTotalWebgl(renderMode, __cacheTotal, gl, root, node, index, lv, tota if(__cacheTotal && __cacheTotal.available) { return __cacheTotal; } - let top = node; + let top = node; let { __x1: x1, __y1: y1, __cache, __offsetWidth, __offsetHeight } = node; let bboxTotal = genBboxTotal(node, __structs, index, total, lv, isPpt); if(!bboxTotal) { @@ -829,17 +829,6 @@ function genTotalWebgl(renderMode, __cacheTotal, gl, root, node, index, lv, tota // fbo绘制对象纹理不用绑定单元,剩下的纹理绘制用0号 let lastPage, list = []; - // 先绘制自己的cache,起点所以matrix视作E为空,opacity固定1,注意被拆分时不绘制 - if(!oitHash || !oitHash[index]) { - if(__cache && __cache.available) { - drawTextureCache(gl, [{cache: __cache, opacity: 1}], cx, cy, dx, dy); - } - let render = node.render; - if(render !== DOM_RENDER && render !== IMG_RENDER && render !== GEOM_RENDER) { - node.render(renderMode, gl, dx, dy); - } - } - let cacheTotal = __cacheTotal; for(let i = index, len = index + (total || 0) + 1; i < len; i++) { let { @@ -962,11 +951,11 @@ function genTotalWebgl(renderMode, __cacheTotal, gl, root, node, index, lv, tota } } } + webgl.drawOitPlane(gl, __structs, oit, ppt, cx, cy, dx, dy); i += (total || 0); if(hasMask) { i += countMaskNum(__structs, i + 1, hasMask); } - webgl.drawOitPlane(gl, __structs, oit, ppt, cx, cy, dx, dy); let render = node.render; if(render !== DOM_RENDER && render !== IMG_RENDER && render !== GEOM_RENDER) { node.render(renderMode, gl, dx, dy);