diff --git a/index.js b/index.js index a26261b50..2e7c8a3e6 100644 --- a/index.js +++ b/index.js @@ -1503,9 +1503,10 @@ function drawTextureCache(gl, list, hash, cx, cy, revertY) { - var vtPoint = [], - vtTex = [], - vtOpacity = []; + var length = list.length; + var vtPoint = new Float32Array(length * 24), + vtTex = new Float32Array(length * 12), + vtOpacity = new Float32Array(length * 6); var lastChannel; // 上一个dom的单元号 var record = [0]; // [num, channel]每一批的数量和单元号记录 @@ -1598,33 +1599,72 @@ x4 = _convertCoords2Gl8[0]; y4 = _convertCoords2Gl8[1]; - vtPoint.push(x1, y1, 0, w1, x4, y4, 0, w4, x2, y2, 0, w2, x4, y4, 0, w4, x2, y2, 0, w2, x3, y3, 0, w3); + // vtPoint.push(x1, y1, 0, w1, x4, y4, 0, w4, x2, y2, 0, w2, x4, y4, 0, w4, x2, y2, 0, w2, x3, y3, 0, w3); + var j = i * 24; + vtPoint[j] = x1; + vtPoint[j + 1] = y1; + vtPoint[j + 3] = w1; + vtPoint[j + 4] = x4; + vtPoint[j + 5] = y4; + vtPoint[j + 7] = w4; + vtPoint[j + 8] = x2; + vtPoint[j + 9] = y2; + vtPoint[j + 11] = w2; + vtPoint[j + 12] = x4; + vtPoint[j + 13] = y4; + vtPoint[j + 15] = w4; + vtPoint[j + 16] = x2; + vtPoint[j + 17] = y2; + vtPoint[j + 19] = w2; + vtPoint[j + 20] = x3; + vtPoint[j + 21] = y3; + vtPoint[j + 23] = w3; var tx1 = x / page.width, ty1 = (y + height) / page.height; var tx2 = (x + width) / page.width, - ty2 = y / page.height; - vtTex.push(tx1, ty1, tx1, ty2, tx2, ty1, tx1, ty2, tx2, ty1, tx2, ty2); - vtOpacity.push(opacity, opacity, opacity, opacity, opacity, opacity); + ty2 = y / page.height; // vtTex.push(tx1, ty1, tx1, ty2, tx2, ty1, tx1, ty2, tx2, ty1, tx2, ty2); + + j = i * 12; + vtTex[j] = tx1; + vtTex[j + 1] = ty1; + vtTex[j + 2] = tx1; + vtTex[j + 3] = ty2; + vtTex[j + 4] = tx2; + vtTex[j + 5] = ty1; + vtTex[j + 6] = tx1; + vtTex[j + 7] = ty2; + vtTex[j + 8] = tx2; + vtTex[j + 9] = ty1; + vtTex[j + 10] = tx2; + vtTex[j + 11] = ty2; // vtOpacity.push(opacity, opacity, opacity, opacity, opacity, opacity); + + j = i * 6; + vtOpacity[j] = opacity; + vtOpacity[j + 1] = opacity; + vtOpacity[j + 2] = opacity; + vtOpacity[j + 3] = opacity; + vtOpacity[j + 4] = opacity; + vtOpacity[j + 5] = opacity; record[0]++; }); // 顶点buffer var pointBuffer = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer); - gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtPoint), gl.STATIC_DRAW); + gl.bufferData(gl.ARRAY_BUFFER, vtPoint, gl.STATIC_DRAW); var a_position = gl.getAttribLocation(gl.program, 'a_position'); gl.vertexAttribPointer(a_position, 4, gl.FLOAT, false, 0, 0); gl.enableVertexAttribArray(a_position); // 纹理buffer var texBuffer = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer); - gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtTex), gl.STATIC_DRAW); + gl.bufferData(gl.ARRAY_BUFFER, vtTex, gl.STATIC_DRAW); var a_texCoords = gl.getAttribLocation(gl.program, 'a_texCoords'); gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0); gl.enableVertexAttribArray(a_texCoords); // opacity buffer var opacityBuffer = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer); - gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtOpacity), gl.STATIC_DRAW); + gl.bufferData(gl.ARRAY_BUFFER, vtOpacity, gl.STATIC_DRAW); var a_opacity = gl.getAttribLocation(gl.program, 'a_opacity'); gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0); gl.enableVertexAttribArray(a_opacity); // 纹理单元 diff --git a/index.js.map b/index.js.map index 05db2bee8..cfbfd9e07 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/util/$$type.js","src/math/matrix.js","src/util/util.js","src/util/debug.js","src/gl/ca.js","src/gl/webgl.js","src/util/inject.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/math/tar.js","src/math/equation.js","src/math/bezier.js","src/math/isec.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/math/index.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/Page.js","src/refresh/Cache.js","src/refresh/offscreen.js","src/gl/MockPage.js","src/gl/MockCache.js","src/refresh/struct.js","src/gl/TexCache.js","src/node/Root.js","src/node/geom/Line.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/util/flatten.js","src/util/updater.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/refresh/index.js","src/index.js"],"sourcesContent":["class Node {\n constructor() {\n this.__x = 0;\n this.__y = 0;\n this.__ox = 0; // relative造成的偏移量\n this.__oy = 0;\n this.__sx = 0;\n this.__sy = 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, isLayout) {\n if(isLayout) {\n this.__x += diff;\n }\n else {\n this.__ox += diff;\n }\n this.__sx += diff;\n }\n\n __offsetY(diff, isLayout) {\n if(isLayout) {\n this.__y += diff;\n }\n else {\n this.__oy += diff;\n }\n this.__sy += 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 ox() {\n return this.__ox;\n }\n\n get oy() {\n return this.__oy;\n }\n\n get sx() {\n return this.x + this.ox;\n }\n\n get sy() {\n return this.y + this.oy;\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","// 类型为引用防止json仿造\nconst TYPE_VD = Symbol('Dom');\nconst TYPE_GM = Symbol('Geom');\nconst TYPE_CP = Symbol('Component');\n\nexport default {\n TYPE_VD,\n TYPE_GM,\n TYPE_CP,\n};\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\nfunction calPoint(point, m) {\n let [x, y, z, w] = point;\n if(w === undefined) {\n w = 1;\n }\n if(m && !isE(m)) {\n if(m.length === 16) {\n z = z || 0;\n let [a1, b1, c1, d1, a2, b2, c2, d2, a3, b3, c3, d3, a4, b4, c4, d4] = m;\n w *= x * d1 + y * d2 + z * d3 + d4;\n return [\n (x * a1 + y * a2 + z * a3 + a4),\n (x * b1 + y * b2 + z * b3 + b4),\n (x * c1 + y * c2 + z * c3 + c4),\n w\n ];\n }\n // 6位类型\n let [a, b, c, d, e, f] = m;\n return [a * x + c * y + e, b * x + d * y + f];\n }\n return [x, y, z, w];\n}\n\n/**\n * 初等行变换求3*3特定css的matrix方阵,一维6长度\n * https://blog.csdn.net/iloveas2014/article/details/82930946\n * @param m\n * @returns {number[]|*}\n */\nfunction inverse(m) {\n if(m.length === 16) {\n return inverse4(m);\n }\n let [a, b, c, d, e, f] = m;\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\nexport default {\n identity,\n multiply,\n calPoint,\n point2d,\n inverse,\n isE,\n m2m6,\n};\n","import $$type from './$$type';\nimport 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 if(item.isMask) {\n return;\n }\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 if(item.isMask) {\n return;\n }\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 // parse递归会出现内部先返回解析好的json,外部parse不能clone\n if(obj.$$type === $$type.TYPE_VD\n || obj.$$type === $$type.TYPE_GM\n || obj.$$type === $$type.TYPE_CP) {\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(matrix && !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 [x1, y1, , w] = mx.calPoint([x1, y1], matrix);\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 [x, y, , w] = mx.calPoint([x, y], matrix);\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 bbox = [xa, ya, xb, yb];\n }\n else 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 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 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 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","export default {\n alpha: true,\n antialias: true,\n premultipliedAlpha: true,\n preserveDrawingBuffer: true,\n // depth: true,\n // stencil: true,\n};\n","import mx from '../math/matrix';\n\nconst calPoint = mx.calPoint;\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.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, revertY) {\n if(z === undefined) {\n z = 0;\n }\n if(w === undefined) {\n w = 1;\n }\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 = (y - cy) / cy;\n if(revertY) {\n y = -y;\n }\n }\n return [x * w, y * w, 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, tex);\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\n/**\n * texCache集满纹理上传占用最多可用纹理单元后,进行批量顺序绘制\n * 将所有dom的矩形顶点(经过transform变换后的)、贴图坐标、透明度存入3个buffer中,\n * 然后相同纹理单元的形成一批,设置uniform的纹理单元号进行绘制,如此循环\n * @param gl\n * @param list\n * @param hash\n * @param cx\n * @param cy\n * @param revertY\n */\nfunction drawTextureCache(gl, list, hash, cx, cy, revertY) {\n let vtPoint = [], vtTex = [], vtOpacity = [];\n let lastChannel; // 上一个dom的单元号\n let record = [0]; // [num, channel]每一批的数量和单元号记录\n let stack = [record]; // 所有批的数据记录集合\n list.forEach((item, i) => {\n let [cache, opacity, matrix, dx, dy] = item;\n if(i) {\n let channel = hash[cache.page.uuid];\n // 和上一个单元号不同时,生成新的批次记录\n if(lastChannel !== channel) {\n lastChannel = channel;\n record = [0, lastChannel];\n stack.push(record);\n }\n }\n else {\n lastChannel = hash[cache.page.uuid];\n record[1] = lastChannel;\n }\n let { x, y, width, height, page, bbox } = cache;\n // 计算顶点坐标和纹理坐标,转换[0,1]对应关系\n let bx = bbox[0], by = bbox[1];\n let [xa, ya] = [bx + (dx || 0), by + height + (dy || 0)];\n let [xb, yb] = [bx + width + (dx || 0), by + (dy || 0)];\n let [x1, y1, , w1] = calPoint([xa, ya], matrix);\n let [x2, y2, , w2] = calPoint([xb, ya], matrix);\n let [x3, y3, , w3] = calPoint([xb, yb], matrix);\n let [x4, y4, , w4] = calPoint([xa, yb], matrix);\n [x1, y1] = convertCoords2Gl([x1, y1, 0, w1], cx, cy, revertY);\n [x2, y2] = convertCoords2Gl([x2, y2, 0, w2], cx, cy, revertY);\n [x3, y3] = convertCoords2Gl([x3, y3, 0, w3], cx, cy, revertY);\n [x4, y4] = convertCoords2Gl([x4, y4, 0, w4], cx, cy, revertY);\n vtPoint.push(x1, y1, 0, w1, x4, y4, 0, w4, x2, y2, 0, w2, x4, y4, 0, w4, x2, y2, 0, w2, x3, y3, 0, w3);\n let tx1 = x / page.width, ty1 = (y + height) / page.height;\n let tx2 = (x + width) / page.width, ty2 = y / page.height;\n vtTex.push(tx1, ty1, tx1, ty2, tx2, ty1, tx1, ty2, tx2, ty1, tx2, ty2);\n vtOpacity.push(opacity, opacity, opacity, opacity, opacity, opacity);\n record[0]++;\n });\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(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, new Float32Array(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, new Float32Array(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 let count = 0;\n // 循环按批次渲染\n stack.forEach(record => {\n let [num, channel] = record;\n gl.uniform1i(u_texture, channel);\n num *= 6;\n gl.drawArrays(gl.TRIANGLES, count, num);\n count += num;\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\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为total和filter的纹理单元,3次执行(x/y合起来算1次)需互换单元,来回执行源和结果\n * 由total变为filter时cache会各方向上扩展spread的大小到width/height\n * 因此第一次绘制时坐标非1,后面则固定1\n * @param gl\n * @param program\n * @param frameBuffer\n * @param tex1 初次绘制目标纹理\n * @param tex2 初次绘制源纹理\n * @param i 初次绘制目标纹理单元\n * @param j 初次绘制源纹理单元\n * @param width\n * @param height\n * @param spread\n * @param widthNew\n * @param heightNew\n * @param cx\n * @param cy\n */\nfunction drawBlur(gl, program, frameBuffer, tex1, tex2, i, j, width, height, spread, widthNew, heightNew, cx, cy) {\n // 第一次将total绘制到blur上,此时尺寸存在spread差值,因此不加模糊防止坐标计算问题,仅作为扩展纹理尺寸\n let [x1, y2] = convertCoords2Gl([spread, height + spread, 0, 1], cx, cy, false);\n let [x2, y1] = convertCoords2Gl([width + spread, spread, 0, 1], cx, cy, false);\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, 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 // direction全0,即无模糊,此时只是进行扩展尺寸操作,还没到模糊所以传0\n let u_direction = gl.getUniformLocation(program, 'u_direction');\n gl.uniform2f(u_direction, 0, 0);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n gl.uniform1i(u_texture, j);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n\n // fbo绑定切换纹理对象和单元索引,同时注意不能向源纹理绘制,因为源是cacheTotal,需要重新生成一个,y方向再来一次\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 /**\n * 反复执行共3次,坐标等均不变,只是切换fbo绑定对象和纹理单元\n * 注意max和ratio的设置,当是100尺寸的正方形时,传给direction的始终为1\n * 当正方形<100时,direction相应地要扩大相对于100的倍数,反之则缩小,如此为了取相邻点坐标时是+-1\n * 当非正方形时,长轴一端为基准值不变,短的要二次扩大比例倍数\n */\n let max = 100 / Math.max(widthNew, heightNew);\n let ratio = widthNew / heightNew;\n let recycle = []; // 3次过程中新生成的中间纹理需要回收\n for(let k = 0; k < 3; k++) {\n let tex3 = createTexture(gl, null, j, widthNew, heightNew);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex3, 0);\n if(widthNew >= heightNew) {\n gl.uniform2f(u_direction, max, 0);\n }\n else {\n gl.uniform2f(u_direction, max * ratio, 0);\n }\n gl.uniform1i(u_texture, i);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n recycle.push(tex1);\n let tex4 = createTexture(gl, null, i, widthNew, heightNew);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex4, 0);\n if(widthNew >= heightNew) {\n gl.uniform2f(u_direction, 0, max * ratio);\n }\n else {\n gl.uniform2f(u_direction, 0, max);\n }\n gl.uniform1i(u_texture, j);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n tex1 = tex4;\n recycle.push(tex3);\n }\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, i, m) {\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, i);\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}\n\n/**\n * 根据total/filter生成overflow\n * @param gl\n * @param i 输入纹理单元\n * @param dx 二者偏移值\n * @param dy\n * @param width 最终大小\n * @param height\n * @param w 输入纹理大小\n * @param h\n */\nfunction drawOverflow(gl, i, dx, dy, width, height, w, h) {\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.programOverflow, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer,原本大小width/height,使用其中的w/h\n let x1 = dx / w, y1 = dy / h, x2 = (width + dx) / w, y2 = (height + dy) /h;\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\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_texCoords = gl.getAttribLocation(gl.programOverflow, '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(gl.programOverflow, 'u_texture');\n gl.uniform1i(u_texture, i);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n}\n\nfunction drawMask(gl, i, j, 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_texture1 = gl.getUniformLocation(program, 'u_texture1');\n gl.uniform1i(u_texture1, j);\n let u_texture2 = gl.getUniformLocation(program, 'u_texture2');\n gl.uniform1i(u_texture2, i);\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 drawMbm(gl, program, i, j, W, H) {\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, i);\n let u_texture2 = gl.getUniformLocation(program, 'u_texture2');\n gl.uniform1i(u_texture2, j);\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, tex1, tex2, i, j, width, height, color) {\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, j);\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 return tex1;\n}\n\nexport default {\n initShaders,\n createTexture,\n bindTexture,\n drawTextureCache,\n drawBlur,\n drawOverflow,\n drawMask,\n drawMbm,\n drawCm,\n drawDropShadow,\n};\n","import util from './util';\nimport debug from './debug';\nimport ca from '../gl/ca';\nimport webgl from '../gl/webgl';\n\nconst SPF = 1000 / 60;\n\nconst CANVAS = {};\nconst WEBGL = {};\nconst CANVAS_LIST = [];\nconst WEBGL_LIST = [];\nconst SUPPORT_OFFSCREEN_CANVAS = typeof OffscreenCanvas === 'function' && util.isFunction(OffscreenCanvas.prototype.getContext);\n\nfunction cache(key, width, height, hash, message) {\n let o;\n if(!key) {\n let target = hash === CANVAS ? CANVAS_LIST : WEBGL_LIST;\n if(target.length) {\n o = target.pop();\n }\n else {\n o = !debug.flag && SUPPORT_OFFSCREEN_CANVAS ? new OffscreenCanvas(width, height) : document.createElement('canvas');\n }\n }\n else if(!hash[key]) {\n o = hash[key] = !debug.flag && SUPPORT_OFFSCREEN_CANVAS ? new OffscreenCanvas(width, height) : document.createElement('canvas');\n }\n else {\n o = hash[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 o.setAttribute('type', hash === CANVAS ? 'canvas' : 'webgl');\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;\n if(hash === CANVAS) {\n ctx = o.getContext('2d');\n }\n else {\n ctx = o.getContext('webgl', ca) || o.getContext('experimental-webgl', ca);\n }\n return {\n canvas: o,\n ctx,\n enabled: true,\n available: true,\n release() {\n if(!key && this.available) {\n if(hash === CANVAS) {\n CANVAS_LIST.push(this.canvas);\n }\n else {\n WEBGL_LIST.push(this.canvas);\n }\n }\n this.available = false;\n },\n };\n}\n\nfunction cacheCanvas(key, width, height, message) {\n return cache(key, width, height, CANVAS, message);\n}\n\nfunction cacheWebgl(key, width, height, message) {\n return cache(key, width, height, WEBGL, message);\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(window);\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(window);\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 hasCacheCanvas(key) {\n return key && CANVAS.hasOwnProperty(key);\n },\n getCacheCanvas(width, height, key, message) {\n return cacheCanvas(key, width, height, message);\n },\n releaseCacheCanvas(o) {\n CANVAS_LIST.push(o);\n },\n delCacheCanvas(key) {\n key && delete CANVAS[key];\n },\n hasCacheWebgl(key) {\n return key && WEBGL.hasOwnProperty(key);\n },\n getCacheWebgl(width, height, key, message) {\n return cacheWebgl(key, width, height, message);\n },\n releaseCacheWebgl(o) {\n WEBGL_LIST.push(o);\n },\n delCacheWebgl(key) {\n key && delete WEBGL[key];\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.getCacheCanvas(16, 16, '__$$CHECK_SUPPORT_FONT_FAMILY$$__');\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 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) && !/url\\(/.test(url)) {\n url = `url(${url})`;\n }\n let f = new FontFace(fontFamily, url);\n f.load().then(function() {\n document.fonts.add(f);\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 }).catch(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 });\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","import util from '../util/util';\nimport inject from '../util/inject';\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 info[name] = info[name] || {};\n if(url && !info[name].url) { // 不能覆盖\n info[name].url = url;\n inject.loadFont(name, url, function(res) {\n info[name].success = res.success;\n if(res.success) {\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 || info[name].lhr) {\n return;\n }\n let { emSquare = 2048, ascent = 1854, descent = 434, lineGap = 0 } = data || {};\n Object.assign(info[name], {\n lhr: (ascent + descent + lineGap) / emSquare,\n blr: ascent / emSquare,\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 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}\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\n// 向量叉乘积\nfunction crossProduct(x1, y1, x2, y2) {\n return x1 * y2 - x2 * y1;\n}\n\nexport default {\n dotProduct,\n crossProduct,\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 // GEOM\n FILL: 88,\n STROKE: 89,\n STROKE_WIDTH: 90,\n STROKE_DASHARRAY: 91,\n STROKE_DASHARRAY_STR: 92,\n STROKE_LINECAP: 93,\n STROKE_LINEJOIN: 94,\n STROKE_MITERLIMIT: 95,\n FILL_RULE: 96,\n // 无此样式,仅cache或特殊情况需要\n MATRIX: 97,\n BORDER_TOP: 98,\n BORDER_RIGHT: 99,\n BORDER_BOTTOM: 100,\n BORDER_LEFT: 101,\n TRANSLATE_PATH: 102,\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 [xmax, ymax] = vertexes[0];\n let [xmin, 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 [x1, y1] = vertexes[i];\n let [x2, 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 [x1, y1,, w1] = calPoint([x1, y1], matrix);\n [x2, y2,, w2] = calPoint([x2, y2], matrix);\n [x3, y3,, w3] = calPoint([x3, y3], matrix);\n [x4, y4,, w4] = calPoint([x4, y4], matrix);\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 [x1, y1],\n [x2, y2],\n [x4, y4],\n [x3, 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 (a * x1 + b * x2 + c * x3) / (a + b + c),\n (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 [px, py] = calPoint([px * width - ox, py * height - oy], matrix);\n return [px + ox, py + 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 [x1, 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 (ox + dt * Math.cos(d2)) / width,\n (oy + dt * Math.sin(d2)) / height,\n ];\n }\n if(d2 >= -Math.PI * 0.5) {\n d2 = -d2;\n return [\n (ox + dt * Math.cos(d2)) / width,\n (oy - dt * Math.sin(d2)) / height,\n ];\n }\n if(d2 >= -Math.PI) {\n d2 = Math.PI + d2;\n return [\n (ox - dt * Math.cos(d2)) / width,\n (oy - dt * Math.sin(d2)) / height,\n ];\n }\n d2 = -Math.PI - d2;\n return [\n (ox - dt * Math.cos(d2)) / width,\n (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 - Math.cos(deg) * r,\n y - Math.sin(deg) * r,\n ];\n }\n else if(deg >= 180) {\n deg -= 180;\n deg = d2r(deg);\n return [\n x - Math.sin(deg) * r,\n y + Math.cos(deg) * r,\n ];\n }\n else if(deg >= 90) {\n deg -= 90;\n deg = d2r(deg);\n return [\n x + Math.cos(deg) * r,\n y + Math.sin(deg) * r,\n ];\n }\n else {\n deg = d2r(deg);\n return [\n x + Math.sin(deg) * r,\n y - Math.cos(deg) * r,\n ];\n }\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};\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.getCacheCanvas(w, h, '__$$CONIC_GRADIENT$$__');\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_LEFT_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', ['x1', 'y1', 'x2', 'y2', '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, 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 temp = style.filter;\n if(temp !== undefined) {\n let f = [];\n // 先替换掉rgba为#RGBA格式,然后分割\n let arr = (replaceRgba2Hex(temp) || '').match(/[\\w-]+\\s*\\(.+?\\)/ig);\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 ].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 // translate/matrix等都是数组\n if(!equalArr(oa.v, ob.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 if(!equalArr(a[i], b[i])) {\n return false;\n }\n }\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 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 equalArr(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 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([sx3, sy3], m)[1]);\n let lt2 = Math.abs(matrix.calPoint([tx3, ty3], n)[1]);\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 [ax1, ay1] = matrix.calPoint([sx1, sy1], n);\n let [ax2, ay2] = matrix.calPoint([sx2, sy2], n);\n let [ax3, ay3] = matrix.calPoint([sx3, 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","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';\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 equation from './equation';\n\nconst getRoots = equation.getRoots;\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// bezier 2d 和椭圆\nfunction intersectBezier2Ellipse(ax1, ay1, ax2, ay2, ax3, ay3, cx, cy, rx, ry) {\n let c2, c1, c0;\n let result = [];\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 let rxrx = rx * rx;\n let ryry = ry * ry;\n\n let coefs = [ryry * c2.x * c2.x + rxrx * c2.y * c2.y,\n 2 * (ryry * c2.x * c1.x + rxrx * c2.y * c1.y),\n ryry * (2 * c2.x * c0.x + c1.x * c1.x) + rxrx * (2 * c2.y * c0.y + c1.y * c1.y) -\n 2 * (ryry * cx * c2.x + rxrx * cy * c2.y),\n 2 * (ryry * c1.x * (c0.x - cx) + rxrx * c1.y * (c0.y - cy)),\n ryry * (c0.x * c0.x + cx * cx) + rxrx * (c0.y * c0.y + cy * cy) -\n 2 * (ryry * cx * c0.x + rxrx * cy * c0.y) - rxrx * ryry].reverse();\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 x = c2.x * t * t + c1.x * t + c0.x;\n let y = c2.y * t * t + c1.y * t + c0.y;\n result.push({x, y});\n }\n }\n return result;\n}\n\n// bezier 2d 和圆\nfunction intersectBezier2Circle(ax1, ay1, ax2, ay2, ax3, ay3, cx, cy, r) {\n return intersectBezier2Ellipse(ax1, ay1, ax2, ay2, ax3, ay3, cx, cy, r, r);\n}\n\nfunction intersectBezier3Ellipse(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4, cx, cy, rx, ry) {\n let c3, c2, c1, c0;\n let result = [];\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 let rxrx = rx * rx;\n let ryry = ry * ry;\n\n let coefs = [c3.x * c3.x * ryry + c3.y * c3.y * rxrx,\n 2 * (c3.x * c2.x * ryry + c3.y * c2.y * rxrx),\n 2 * (c3.x * c1.x * ryry + c3.y * c1.y * rxrx) + c2.x * c2.x * ryry + c2.y * c2.y * rxrx,\n 2 * c3.x * ryry * (c0.x - cx) + 2 * c3.y * rxrx * (c0.y - cy) +\n 2 * (c2.x * c1.x * ryry + c2.y * c1.y * rxrx),\n 2 * c2.x * ryry * (c0.x - cx) + 2 * c2.y * rxrx * (c0.y - cy) +\n c1.x * c1.x * ryry + c1.y * c1.y * rxrx,\n 2 * c1.x * ryry * (c0.x - cx) + 2 * c1.y * rxrx * (c0.y - cy),\n c0.x * c0.x * ryry - 2 * c0.y * cy * rxrx - 2 * c0.x * cx * ryry +\n c0.y * c0.y * rxrx + cx * cx * ryry + cy * cy * rxrx - rxrx * ryry\n ].reverse();\n\n let roots = getRootsInInterval(0, 1, 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 x = c3.x * t * t * t + c2.x * t * t + c1.x * t + c0.x;\n let y = c3.y * t * t * t + c2.y * t * t + c1.y * t + c0.y;\n result.push({x, y});\n }\n }\n return result;\n}\n\nfunction intersectBezier3Circle(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4, cx, cy, r) {\n return intersectBezier3Ellipse(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4, cx, cy, r, r);\n}\n\nexport default {\n intersectBezier2Line, // 二阶贝塞尔曲线 与 直线\n intersectBezier3Line, // 三阶贝塞尔曲线 与 直线\n intersectBezier2Bezier2, // 二阶贝塞尔曲线 与 二阶贝塞尔曲线\n intersectBezier3Bezier3, // 三阶贝塞尔曲线 与 三阶贝塞尔曲线\n intersectBezier2Bezier3, // 二阶贝塞尔曲线 与 三阶贝塞尔曲线\n\n // below functions are not used for now\n // intersectBezier2Ellipse, // 二阶贝塞尔曲线 与 椭圆\n // intersectBezier3Ellipse, // 三阶贝塞尔曲线 与 椭圆\n // intersectBezier2Circle, // 二阶贝塞尔曲线 与 圆\n // intersectBezier3Circle, // 三阶贝塞尔曲线 与 圆\n}\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 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 unit from '../style/unit';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport math from '../math/index';\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 { PERCENT, REM, VW, VH, VMAX, VMIN } = unit;\nconst { matrix, geom } = math;\nconst { identity, multiply, isE } = matrix;\nconst { d2r } = geom;\n\nfunction calSingle(t, k, v) {\n if(k === TRANSLATE_X) {\n t[12] = v;\n }\n else if(k === TRANSLATE_Y) {\n t[13] = v;\n }\n else if(k === TRANSLATE_Z) {\n t[14] = v;\n }\n else if(k === SCALE_X) {\n t[0] = v;\n }\n else if(k === SCALE_Y) {\n t[5] = v;\n }\n else if(k === SCALE_Z) {\n t[10] = v;\n }\n else if(k === SKEW_X) {\n v = d2r(v);\n t[4] = Math.tan(v);\n }\n else if(k === SKEW_Y) {\n v = d2r(v);\n t[1] = Math.tan(v);\n }\n else if(k === ROTATE_X) {\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 }\n else if(k === ROTATE_Y) {\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 }\n else if(k === ROTATE_Z) {\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 }\n else if(k === ROTATE_3D) {\n let [x, y, z, r] = v;\n r = d2r(r.v);\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 }\n else if(k === PERSPECTIVE && v > 0) {\n v = Math.max(v, 1);\n t[11] = -1 / v;\n }\n else if(k === MATRIX) {\n util.assignMatrix(t, v);\n }\n}\n\nfunction calMatrix(transform, ow, oh, root) {\n let list = normalize(transform, ow, oh, root);\n let m = identity();\n list.forEach(item => {\n let t = identity();\n calSingle(t, item.k, item.v);\n m = multiply(m, t);\n });\n return m;\n}\n\n// 已有计算好的变换矩阵,根据tfo原点计算最终的matrix\nfunction calMatrixByOrigin(m, transformOrigin) {\n let [ox, oy] = transformOrigin;\n let res = m.slice(0);\n if(ox === 0 && oy === 0 || isE(m)) {\n return res;\n }\n res = multiply([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, ox, oy, 0, 1], res);\n res = multiply(res, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -ox, -oy, 0, 1]);\n return res;\n}\n\n// img缩放svg下专用,无rem\nfunction calMatrixWithOrigin(transform, transformOrigin, ow, oh) {\n let m = calMatrix(transform, ow, oh);\n return calMatrixByOrigin(m, transformOrigin);\n}\n\nfunction normalizeSingle(k, v, ow, oh, root) {\n if(k === TRANSLATE_X || k === TRANSLATE_Z) {\n if(v.u === PERCENT) {\n return v.v * 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 === TRANSLATE_Y) {\n if(v.u === PERCENT) {\n return v.v * oh * 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 normalize(transform, ow, oh, root) {\n let res = [];\n transform.forEach(item => {\n let k = item.k;\n res.push({\n k,\n v: normalizeSingle(k, item.v, ow, oh, root),\n });\n });\n return res;\n}\n\nfunction calMatrixByPerspective(m, pm) {\n if(!isE(pm)) {\n m = multiply(pm, m);\n }\n return m;\n}\n\nfunction calPerspectiveMatrix(ppt, po) {\n if(ppt && ppt > 0) {\n let res = identity();\n ppt = Math.max(ppt, 1);\n res[11] = -1 / ppt;\n let [ox, oy] = po;\n if(ox || oy) {\n res = multiply([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, ox, oy, 0, 1], res);\n res = multiply(res, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -ox, -oy, 0, 1]);\n }\n return res;\n }\n}\n\n// 是否有透视矩阵应用\nfunction isPerspectiveMatrix(m) {\n if(!m) {\n return;\n }\n return !!(m[3] || m[7] || m[11]);\n}\n\nexport default {\n calMatrix,\n calMatrixByPerspective,\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}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u{1F6FF}\\u{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 { ox, oy } = parent;\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 += ox + dx;\n y += oy + 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 tfo = [x, y];\n let m = transform.calMatrixWithOrigin(list, tfo, 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 tfo = [x, y + count];\n let m = transform.calMatrixWithOrigin(list, tfo, 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 tfo = [x, y + count];\n let m = transform.calMatrixWithOrigin(list, tfo, 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.__sx1 = x;\n this.__y = this.__sy1 = 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 ox,\n oy,\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 += ox + dx;\n y += oy + 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 tfo = [x, y];\n let m = transform.calMatrixWithOrigin(list, tfo, 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,\n SCALE_Y,\n SCALE_Z,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\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 /**\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 === 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 = null;\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.__sx = this.__sx1 = x;\n this.__y = this.__sy = this.__sy1 = 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 this.__ox = this.__oy = 0;\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.__sy1 = ly;\n }\n else {\n this.__x = this.__sx1 = 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.__sx1 += 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.__sy1 += 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 = min;\n this.__sy = this.__sy1 = min + this.oy;\n this.__sx = this.__sx1;\n this.__height = max - min;\n }\n else {\n this.__x = min;\n this.__sx = this.__sx1 = min + this.ox;\n this.__sy = this.__sy1;\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 __deepScan(cb) {\n cb(this);\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, {\n focus: level.REFLOW,\n cb,\n });\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 let res = {\n focus: level.REFLOW,\n removeDom: true,\n cb,\n };\n root.__addUpdate(this, res);\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 style() {\n return this.__domParent.__style;\n }\n\n get computedStyle() {\n return this.__domParent.__computedStyle;\n }\n\n get cacheStyle() {\n return this.__domParent.__cacheStyle;\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n __sx1, __sy1, width, height,\n computedStyle: {\n [TEXT_STROKE_WIDTH]: textStrokeWidth,\n },\n } = this;\n // 文字描边暂时不清楚最大值是多少,影响不确定,先按描边宽算,因为会出现>>0.5宽的情况\n let half = textStrokeWidth;\n this.__bbox = [__sx1 - half, __sy1 - half, __sx1 + width + half, __sy1 + 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 { 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 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 'ox',\n 'oy',\n 'sx',\n 'sy',\n // '__sx1',\n // '__sx2',\n // '__sx3',\n // '__sx4',\n // '__sx5',\n // '__sx6',\n // '__sy1',\n // '__sy2',\n // '__sy3',\n // '__sy4',\n // '__sy5',\n // '__sy6',\n 'width',\n 'height',\n 'outerWidth',\n 'outerHeight',\n 'clientWidth',\n 'clientHeight',\n 'offsetWidth',\n 'offsetHeight',\n 'style',\n 'animationList',\n 'animateStyle',\n 'currentStyle',\n 'computedStyle',\n 'currentProps',\n 'baseline',\n 'virtualDom',\n 'mask',\n 'maskId',\n 'textWidth',\n 'content',\n 'lineBoxes',\n 'charWidthList',\n 'charWidth',\n '__layoutData',\n '__struct',\n 'availableAnimating',\n 'effectiveAnimating',\n 'displayAnimating',\n 'visibilityAnimating',\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 '__deepScan',\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 + diff - bcStart + leading;\n by1 = lineBox.y + 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 + diff + lineHeight + bcEnd - leading;\n by2 = lineBox.y + 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 // 要考虑xom的ox/oy值\n x1 += xom.ox;\n x2 += xom.ox;\n bx1 += xom.ox;\n bx2 += xom.ox;\n y1 += xom.oy;\n y2 += xom.oy;\n by1 += xom.oy;\n by2 += xom.oy;\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 let tfo = [x, y];\n return transform.calMatrixWithOrigin(list, tfo, 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 let tfo = [cx, cy];\n matrix = transform.calMatrixByOrigin(matrix, tfo);\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([item[i], item[i + 1]], t);\n arr.push(p[0]);\n arr.push(p[1]);\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 = [bx1, by1];\n let p2 = [bx2, 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[0]},${p1[1]}L${p2[0]},${p1[1]}L${p2[0]},${p2[1]}L${p1[0]},${p2[1]}L${p1[0]},${p1[1]}`],\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 traversal(list, length, diff, after) {\n if(after) {\n for(let i = 0; i < length; i++) {\n let item = list[i];\n item.__after && item.__after(diff);\n }\n }\n else {\n for(let i = 0; i < length; i++) {\n let item = list[i];\n item.__before && item.__before(diff);\n }\n }\n}\n\nlet isPause;\n\nclass Frame {\n constructor() {\n this.__rootTask = []; // 动画刷新后,每个root注册的刷新回调执行\n this.__task = [];\n this.__now = null;\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 traversal(clone, length, diff, false);\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 traversal(clone, length, diff, true);\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';\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 },\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;\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矩阵\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);\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);\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 cb\n */\nfunction genBeforeRefresh(keys, root, node, cb) {\n root.__addUpdate(node, {\n keys,\n cb,\n });\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 };\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 = [];\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 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 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 hasTp;\n keys.forEach(k => {\n if(k === TRANSLATE_PATH) {\n hasTp = true;\n }\n let ts = calDiff(prev, next, k, target);\n // 可以形成过渡的才会产生结果返回\n if(ts) {\n prev.transition.push(ts);\n prev.keys.push(k);\n }\n else {\n prev.fixed.push(k);\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 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 * 根据百分比和缓动函数计算中间态样式\n * 当easing定义为steps时,优先计算\n * @param frame 当前帧\n * @param percent 到下一帧时间的百分比\n * @param target vd\n * @return {[]} 发生变更的样式key\n */\nfunction calIntermediateStyle(frame, percent, target) {\n let style = frame.style;\n let transition = frame.transition;\n let timingFunction = frame.timingFunction;\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, currentProps = target.__currentProps, res = frame.keys.slice(0);\n for(let i = 0, len = transition.length; i < len; i++) {\n let item = transition[i];\n let k = item.k, v = item.v, st = item.st, cl = item.cl;\n // transform特殊处理,只有1个matrix,有可能不存在,需给默认矩阵\n if(k === TRANSFORM) {\n if(!st || !st.length) {\n st = 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 currentStyle[k] = st;\n }\n else if(k === ROTATE_3D) {\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 currentStyle[k] = st;\n }\n else if(k === FILTER) {\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;\n // 只有dropShadow是多个数组,存放x/y/blur/spread/color\n if(k2 === 'dropShadow') {\n v2[0].v += item[0] * percent;\n v2[1].v += item[1] * percent;\n v2[2].v += item[2] * percent;\n v2[3].v += item[3] * percent;\n let c1 = v2[4], c2 = item[4];\n c1[0] += c2[0] * percent;\n c1[1] += c2[1] * percent;\n c1[2] += c2[2] * percent;\n c1[3] += c2[3] * percent;\n }\n // 其它都是带单位单值\n else {\n v2.v += item * percent;\n }\n }\n }\n currentStyle[k] = st;\n }\n else if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN || isRadiusKey(k)) {\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 currentStyle[k] = st;\n }\n else if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y || k === STROKE_WIDTH) {\n st.forEach((item, i) => {\n if(v[i]) {\n item.v = cl[i].v + v[i] * percent;\n }\n });\n currentStyle[k] = st;\n }\n else if(k === BOX_SHADOW) {\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 currentStyle[k] = st;\n }\n else if(k === BACKGROUND_SIZE) {\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 currentStyle[k] = st;\n }\n else if(k === OPACITY || k === Z_INDEX) {\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 // 特殊的曲线运动计算,转换为translateXY,出现在最后一定会覆盖原本的translate防重\n else if(k === TRANSLATE_PATH) {\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 else if(isLengthKey(k) || isExpandKey(k)) {\n st.v = cl + v * percent;\n currentStyle[k] = st;\n }\n else if(isGradientKey(k)) {\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 currentStyle[k] = st;\n }\n // color可能超限[0,255],但浏览器已经做了限制,无需关心\n else if(isColorKey(k)) {\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 currentStyle[k] = st;\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 let j = res.indexOf(k);\n res.splice(j, 1);\n }\n }\n }\n // 无变化的也得检查是否和当前相等,防止跳到一个不变化的帧上,而前一帧有变化的情况\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 res.push(k);\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 [[], [], [], {}];\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 { style, props } = target;\n let originStyle = {};\n keys.forEach(k => {\n if(isGeom(target.tagName, k)) {\n originStyle[k] = props[k];\n }\n originStyle[k] = style[k];\n });\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 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 this.__isChange = !!keys.length;\n genBeforeRefresh(keys, root, target, 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 // 对比前后两帧是否为同一关键帧,不是则清除之前关键帧上的percent标识\n if(this.__currentFrame !== currentFrame) {\n this.__currentFrame && (this.__currentFrame.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 }\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);\n }\n this.__isChange = !keys.length;\n // 无论两帧之间是否有变化,都生成计算结果赋给style,去重在root做\n genBeforeRefresh(keys, root, target, 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 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 style = frames[frames.length - 1].style;\n }\n else {\n style = framesR[framesR.length - 1].style;\n }\n }\n else {\n style = this.__originStyle;\n }\n let keys = calLastStyle(style, target, this.__keys);\n this.__isChange = !keys.length;\n genBeforeRefresh(keys, root, target, () => {\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 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, () => {\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 },\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 } = mx;\n\nconst {\n contain,\n TRANSFORM: TF,\n REFLOW,\n REPAINT,\n TRANSLATE_X: TX,\n TRANSLATE_Y: TY,\n TRANSLATE_Z: TZ,\n TRANSFORM_ALL,\n CACHE,\n} = level;\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.__isClip = !!this.props.clip;\n this.__isMask = 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 = [];\n this.__frameAnimateList = [];\n this.__contentBoxList = []; // inline存储内容用\n this.__cacheAsBitmap = !!this.props.cacheAsBitmap;\n this.__cache = this.__cacheTotal = this.__cacheFilter = this.__cacheMask = this.__cacheOverflow = null;\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 // 布局前固定尺寸的线设置好,子元素percent尺寸要用到\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 }\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, {\n focus: level.REFLOW,\n });\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.__isMask && next && (next.__isMask)) {\n let count = 0;\n while(next) {\n if(next.__isMask) {\n count++;\n }\n else {\n break;\n }\n next = next.next;\n }\n this.__hasMask = count;\n }\n }\n this.__ox = this.__oy = 0;\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 // 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 this.__offsetY(n, false, null);\n __computedStyle[TOP] = n;\n __computedStyle[BOTTOM] = 'auto';\n }\n else if(bottom.u !== AUTO) {\n let n = calRelative(__currentStyle, BOTTOM, bottom, parent);\n this.__offsetY(-n, false, null);\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 this.__offsetX(n, false, null);\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 this.__offsetX(-n, false, null);\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和6个坐标,inline在其inlineSize特殊处理\n let x = this.__sx = this.__x + this.__ox;\n let y = this.__sy = this.__y + this.__oy;\n if(!this.__isInline) {\n x = this.__sx1 = x + __computedStyle[MARGIN_LEFT];\n x = this.__sx2 = x + __computedStyle[BORDER_LEFT_WIDTH];\n x = this.__sx3 = x + __computedStyle[PADDING_LEFT];\n x = this.__sx4 = x + this.__width;\n x = this.__sx5 = x + __computedStyle[PADDING_RIGHT];\n this.__sx6 = x + __computedStyle[BORDER_RIGHT_WIDTH];\n y = this.__sy1 = y + __computedStyle[MARGIN_TOP];\n y = this.__sy2 = y + __computedStyle[BORDER_TOP_WIDTH];\n y = this.__sy3 = y + __computedStyle[PADDING_TOP];\n y = this.__sy4 = y + this.__height;\n y = this.__sy5 = y + __computedStyle[PADDING_BOTTOM];\n this.__sy6 = y + __computedStyle[BORDER_BOTTOM_WIDTH];\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,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 if(p.__currentStyle[HEIGHT].u !== AUTO) {\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, false, 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, false, null);\n }\n }\n }\n }\n }\n\n __calMatrix(lv, __currentStyle, __computedStyle, __cacheStyle) {\n let {\n __sx1,\n __sy1,\n __offsetWidth,\n __offsetHeight,\n } = this;\n if(this.__isInline) {\n __computedStyle[TRANSFORM_ORIGIN] = [__sx1, __sy1];\n return __cacheStyle[MATRIX] = this.__matrix = mx.identity();\n }\n let matrixCache = __cacheStyle[MATRIX];\n // tx/ty/tz变化特殊优化\n if(matrixCache && lv < REFLOW && !contain(lv, TF)) {\n let x = 0, y = 0, z = 0;\n if(contain(lv, TX)) {\n let v = __currentStyle[TRANSLATE_X];\n if(isNil(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 x = v - (__computedStyle[TRANSLATE_X] || 0);\n __computedStyle[TRANSLATE_X] = v;\n __computedStyle[TRANSFORM][12] += x;\n matrixCache[12] += x;\n }\n if(contain(lv, TY)) {\n let v = __currentStyle[TRANSLATE_Y];\n if(isNil(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 y = v - (__computedStyle[TRANSLATE_Y] || 0);\n __computedStyle[TRANSLATE_Y] = v;\n __computedStyle[TRANSFORM][13] += y;\n matrixCache[13] += y;\n }\n if(contain(lv, TZ)) {\n let v = __currentStyle[TRANSLATE_Z];\n if(isNil(v)) {\n v = 0;\n }\n else {\n v = this.__calSize(v, this.__offsetWidth, true);\n }\n z = v - (__computedStyle[TRANSLATE_Z] || 0);\n __computedStyle[TRANSLATE_Z] = v;\n __computedStyle[TRANSFORM][14] += z;\n matrixCache[14] += z;\n }\n __cacheStyle[MATRIX] = matrixCache;\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 let temp = [];\n [\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n ROTATE_3D,\n SKEW_X,\n SKEW_Y,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n ].forEach(k => {\n // 删除之前遗留的\n delete __computedStyle[k];\n let v = __currentStyle[k];\n if(isNil(v)) {\n return;\n }\n if(k === ROTATE_3D) {\n __computedStyle[k] = [v[0], v[1], v[2], v[3].v];\n if(v[3].v === 0) {\n return;\n }\n temp.push({k, v});\n return;\n }\n __computedStyle[k] = v.v;\n if(k === ROTATE_X || k === ROTATE_Y || k === ROTATE_Z) {\n if(v.v !== 0) {\n temp.push({k, v});\n }\n return;\n }\n // scale为1和其它为0避免计算浪费\n let isScale = k === SCALE_X || k === SCALE_Y || k === SCALE_Z;\n if(v.v === 1 && isScale || !isScale && v.v === 0) {\n return;\n }\n let p = k === TRANSLATE_X || k === TRANSLATE_Z ? __offsetWidth : __offsetHeight;\n __computedStyle[k] = this.__calSize(v, p, true);\n temp.push({k, v});\n });\n if(temp.length) {\n matrix = tf.calMatrix(temp, __offsetWidth, __offsetHeight, this.__root);\n }\n }\n __computedStyle[TRANSFORM] = matrix || mx.identity();\n }\n if(!matrixCache) {\n let m = __computedStyle[TRANSFORM];\n let tfo = __computedStyle[TRANSFORM_ORIGIN].slice(0);\n tfo[0] += __sx1 || 0;\n tfo[1] += __sy1 || 0;\n matrixCache = __cacheStyle[MATRIX] = tf.calMatrixByOrigin(m, tfo);\n }\n }\n return this.__matrix = matrixCache;\n }\n\n /**\n * 将currentStyle计算为computedStyle,同时存入cacheStyle可缓存的结果防止无变更重复计算,返回背景渲染范围\n */\n __calStyle(lv, __currentStyle, __computedStyle, __cacheStyle) {\n let {\n __sx1,\n __sx2,\n __sx3,\n __sx4,\n __sx5,\n __sx6,\n __sy1,\n __sy2,\n __sy3,\n __sy4,\n __sy5,\n __sy6,\n } = this;\n this.__bbox = null;\n let bx1 = __sx1, by1 = __sy1, bx2 = __sx6, by2 = __sy6;\n let backgroundClip = __computedStyle[BACKGROUND_CLIP] = __currentStyle[BACKGROUND_CLIP];\n // 默认border-box\n if(backgroundClip === 'paddingBox') {\n bx1 = __sx2;\n by1 = __sy2;\n bx2 = __sx5;\n by2 = __sy5;\n }\n else if(backgroundClip === 'contentBox') {\n bx1 = __sx3;\n by1 = __sy3;\n bx2 = __sx4;\n by2 = __sy4;\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 ].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]) || contain(lv, TRANSFORM_ALL)) {\n this.__calMatrix(lv, __currentStyle, __computedStyle, __cacheStyle);\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, {\n focus: REPAINT,\n });\n }\n }, {\n ctx,\n root,\n width: bx2 - bx1,\n height: by2 - by1,\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 __sx1, __sx2, __sx5, __sx6, __sy1, __sy2, __sy5, __sy6, 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 __sx1, __sx2, __sx5, __sx6, __sy1, __sy2, __sy5, __sy6, 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 __sx1, __sx2, __sx5, __sx6, __sy1, __sy2, __sy5, __sy6, 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 __sx1, __sx2, __sx5, __sx6, __sy1, __sy2, __sy5, __sy6, 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 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 = [];\n let rebuild;\n let { __sx1, __sy1 } = 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].slice(0);\n po[0] += __sx1 || 0;\n po[1] += __sy1 || 0;\n this.__perspectiveMatrix = tf.calPerspectiveMatrix(ppt, po);\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.getCacheCanvas(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.getCacheCanvas(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.getCacheCanvas(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.getCacheCanvas(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.__sx1,\n y: this.__sy1,\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 * sx1/sx2/sx3/sx4/sx5/sx6/sy1/sy2/sy3/sy4/sy5/sy6 坐标\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.getCacheCanvas(iw, ih, '__$$INLINE_BGI$$__');\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 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, sx1, sy1, sx6, sy6, sx6 - sx1, sy6 - sy1, 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 __destroy() {\n if(this.__isDestroyed) {\n return;\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, __isMask } = this;\n if(__isDestroyed || computedStyle[DISPLAY] === 'none' || e.__stopPropagation || __isMask) {\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.__isClip;\n let hasEmitMask;\n while(next && next.__isMask) {\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 { __sx1, __sy1, __offsetWidth, __offsetHeight, __matrixEvent, __computedStyle } = this;\n if(__computedStyle[POINTER_EVENTS] === 'none') {\n return;\n }\n let inThis = geom.pointInQuadrilateral(\n x, y,\n __sx1, __sy1,\n __sx1 + __offsetWidth, __sy1,\n __sx1 + __offsetWidth, __sy1 + __offsetHeight,\n __sx1, __sy1 + __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(lookUp) {\n let __cacheTotal = this.__cacheTotal;\n let __cacheFilter = this.__cacheFilter;\n let __cacheMask = this.__cacheMask;\n let __cacheOverflow = this.__cacheOverflow;\n let __cache = this.__cache;\n if(__cache) {\n __cache.release();\n }\n if(__cacheTotal) {\n __cacheTotal.release();\n }\n if(__cacheFilter) {\n __cacheFilter.release();\n }\n if(__cacheMask) {\n __cacheMask.release();\n }\n if(__cacheOverflow) {\n __cacheOverflow.release();\n }\n this.__refreshLevel |= CACHE;\n if(lookUp) {\n let p = this.__domParent;\n while(p) {\n let __cacheTotal = p.__cacheTotal;\n let __cacheFilter = p.__cacheFilter;\n let __cacheMask = p.__cacheMask;\n let __cacheOverflow = p.__cacheOverflow;\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 if(__cacheOverflow) {\n __cacheOverflow.release();\n }\n p = p.__domParent;\n }\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, {\n keys,\n cb,\n });\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 __deepScan(cb, options) {\n return cb(this, options);\n }\n\n // isLayout为false时,为relative,true则是absolute等直接改layoutData数据的\n // lv是reflow偏移时传入,需要清除cacheStyle\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, isLayout);\n if(isLayout) {\n this.__layoutData.x += diff;\n this.clearCache();\n }\n this.__sx1 += diff;\n this.__sx2 += diff;\n this.__sx3 += diff;\n this.__sx4 += diff;\n this.__sx5 += diff;\n this.__sx6 += 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 }\n }\n\n __offsetY(diff, isLayout, lv) {\n if(this.computedStyle[DISPLAY] === 'none') {\n return;\n }\n super.__offsetY(diff, isLayout);\n if(isLayout) {\n this.__layoutData && (this.__layoutData.y += diff);\n this.clearCache();\n }\n this.__sy1 += diff;\n this.__sy2 += diff;\n this.__sy3 += diff;\n this.__sy4 += diff;\n this.__sy5 += diff;\n this.__sy6 += 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 }\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.__sx4 += diff;\n this.__sx5 += diff;\n this.__sx6 += 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.__sy4 += diff;\n this.__sy5 += diff;\n this.__sy6 += 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 { __sx1, __sy1, __offsetWidth, __offsetHeight } = this;\n box = [__sx1, __sy1, __sx1 + __offsetWidth, __sy1 + __offsetHeight];\n }\n let matrixEvent = this.matrixEvent;\n let p1 = point2d(mx.calPoint([box[0], box[1]], matrixEvent));\n let p2 = point2d(mx.calPoint([box[2], box[1]], matrixEvent));\n let p3 = point2d(mx.calPoint([box[2], box[3]], matrixEvent));\n let p4 = point2d(mx.calPoint([box[0], box[3]], matrixEvent));\n return {\n left: Math.min(p1[0], Math.min(p2[0], Math.min(p3[0], p4[0]))),\n top: Math.min(p1[1], Math.min(p2[1], Math.min(p3[1], p4[1]))),\n right: Math.max(p1[0], Math.max(p2[0], Math.max(p3[0], p4[0]))),\n bottom: Math.max(p1[1], Math.max(p2[1], Math.max(p3[1], p4[1]))),\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 let res = {\n focus: REFLOW,\n removeDom: true,\n cb,\n };\n root.__addUpdate(this, res);\n }\n\n get tagName() {\n return this.__tagName;\n }\n\n get sx() {\n return this.__sx;\n }\n\n get sy() {\n return this.__sy;\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 __sx1, __sy1, __offsetWidth, __offsetHeight,\n __computedStyle: {\n [BOX_SHADOW]: boxShadow,\n },\n } = this;\n this.__bbox = spreadBoxShadow([__sx1, __sy1, __sx1 + __offsetWidth, __sy1 + __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 isMask() {\n return this.__isMask;\n }\n\n get isClip() {\n return this.__isClip;\n }\n\n get cacheAsBitmap() {\n return this.__cacheAsBitmap;\n }\n\n set cacheAsBitmap(v) {\n this.__cacheAsBitmap = !!v;\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.__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 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 // Geom强制有内容\n return computedStyle[VISIBILITY] !== 'hidden';\n }\n\n __preSet(renderMode, res) {\n let { width, height, __cacheStyle, computedStyle } = this;\n let cx = res.sx3 + width * 0.5;\n let cy = res.sy3 + 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.sx3, res.sy3, res.sx4, res.sy4, 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.sx3, res.sy3, res.sx4, res.sy4, 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([item[i] + dx, item[i + 1] + dy], t);\n arr.push(p[0]);\n arr.push(p[1]);\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([item[i] + dx, item[i + 1] + dy], t);\n arr.push(p[0]);\n arr.push(p[1]);\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 let tfo = [cx, cy];\n matrix = transform.calMatrixByOrigin(matrix, tfo);\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.getCacheCanvas(w, h, '__$$CONIC_GRADIENT$$__');\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 let temp = node;\n while(temp.isShadowRoot) {\n temp = temp.__host;\n temp.__destroy();\n }\n node.__destroy();\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 parent.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 parent.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(true);\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;\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.__isMask) {\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等对齐用\n __offsetX(diff, isLayout, lv) {\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.__sy4 += d;\n item.__sy5 += d;\n item.__sy6 += 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.__sy4 += d;\n item.__sy5 += d;\n item.__sy6 += 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.__sx4 += d;\n item.__sx5 += d;\n item.__sx6 += 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.__sx4 += d;\n item.__sx5 += d;\n item.__sx6 += 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, __ox, __oy } = 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.__sx = minOX + __ox;\n this.__sy = minOY + __oy;\n this.__sx1 = minFX + __ox;\n this.__sy1 = minFY + __oy;\n this.__sx2 = minCX + __ox;\n this.__sy2 = minCY + __oy;\n this.__sx3 = minX + __ox;\n this.__sy3 = minY + __oy;\n this.__sx4 = maxX + __ox;\n this.__sy4 = maxY + __oy;\n this.__sx5 = maxCX + __ox;\n this.__sy5 = maxCY + __oy;\n this.__sx6 = maxFX + __ox;\n this.__sy6 = maxFY + __oy;\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.__sx -= marginLeft + paddingLeft + borderLeftWidth;\n }\n else {\n th = lineHeight;\n this.__ioSize(0, th);\n this.__sy -= marginTop + paddingTop + borderTopWidth;\n }\n this.__sx1 = this.__sx + marginLeft;\n this.__sy1 = this.__sy + marginTop;\n this.__sx2 = this.__sx1 + borderLeftWidth;\n this.__sy2 = this.__sy1 + borderTopWidth;\n this.__sx4 = this.__sx3 = this.__sx2 + paddingLeft;\n this.__sy4 = this.__sy3 = this.__sy2 + paddingTop;\n this.__sx5 = this.__sx4 + tw + paddingRight;\n this.__sy5 = this.__sy4 + th + paddingBottom;\n this.__sx6 = this.__sx5 + borderRightWidth;\n this.__sy6 = this.__sy5 + borderBottomWidth;\n this.__clientWidth = this.__sx5 - this.__sx2;\n this.__clientHeight = this.__sy5 - this.__sy2;\n this.__offsetWidth = this.__sx6 - this.__sx1;\n this.__offsetHeight = this.__sy6 - this.__sy1;\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 { __sx: x, __sy: 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.__sy1 + 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, __isMask, __cacheTotal } = this;\n if(__isDestroyed || computedStyle[DISPLAY] === 'none' || e.__stopPropagation || __isMask) {\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 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 // 深度遍历执行所有子节点,包含自己,如果cb返回true,提前跳出不继续深度遍历\n __deepScan(cb, options) {\n if(super.__deepScan(cb, options)) {\n return;\n }\n this.children.forEach(node => {\n node.__deepScan(cb, options);\n });\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, {\n focus: level.REFLOW,\n addDom: true,\n cb,\n });\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, {\n focus: level.REFLOW,\n addDom: true,\n cb,\n });\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, {\n focus: level.REFLOW,\n addDom: true,\n cb,\n });\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, {\n focus: level.REFLOW,\n addDom: true,\n cb,\n });\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 = ca.width;\n 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 = cache.width;\n 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 __destroy() {\n this.root.delRefreshTask(this.__task);\n super.__destroy();\n this.__task = null;\n }\n\n // img根据加载情况更新__hasContent\n calContent(__currentStyle, __computedStyle) {\n let res = super.calContent(__currentStyle, __computedStyle);\n if(!res) {\n let {\n __loadImg: loadImg,\n } = this;\n // if(loadImg.loading) {\n // this.__loadAndRefresh(loadImg, null);\n // }\n if(__computedStyle[VISIBILITY] !== 'hidden' && (__computedStyle[WIDTH] || __computedStyle[HEIGHT])\n && loadImg.source) {\n res = true;\n }\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.sx3 + dx;\n originY = res.sy3 + 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, {\n focus: level.REPAINT, // 已知宽高无需重新布局\n cb,\n });\n }\n else {\n root.__addUpdate(self, {\n focus: level.REFLOW,\n cb,\n });\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 ctx,\n root,\n width,\n height,\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 { contain, 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.filter !== filter) {\n // if(filter) {\n // elem.setAttribute('filter', filter);\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(mask) {\n elem.setAttribute('mask', mask);\n }\n else {\n elem.removeAttribute('mask');\n }\n if(lv === NONE) {\n return;\n }\n if(contain(lv, TRANSFORM_ALL)) {\n if(transform) {\n elem.setAttribute('transform', transform);\n }\n else {\n elem.removeAttribute('transform');\n }\n }\n if(contain(lv, OPACITY)) {\n if(opacity !== 1 && opacity !== undefined) {\n elem.setAttribute('opacity', opacity);\n }\n else {\n elem.removeAttribute('opacity');\n }\n }\n if(contain(lv, FILTER) || contain(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","import inject from '../util/inject';\n\nlet SIZE = [8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192];\nlet NUMBER = [128, 64, 32, 16, 8, 4, 2, 1, 1, 1, 1];\nlet MAX = SIZE[SIZE.length - 1];\nconst HASH_CANVAS = {};\n\nlet uuid = 0;\n\nclass Page {\n constructor(size, number) {\n this.__size = size;\n this.__number = number;\n this.__free = this.__total = number * number;\n size *= number;\n this.__width = size;\n this.__height = size;\n let offscreen = this.__canvas = inject.getCacheCanvas(size, size, null, number);\n if(offscreen) {\n this.__offscreen = offscreen;\n }\n // 1/0标识n*n个单元格是否空闲可用,一维数组表示\n this.__grid = [];\n for(let i = 0; i < this.__total; i++) {\n this.__grid.push(1);\n }\n this.__uuid = uuid++;\n // webgl贴图缓存使用,一旦更新则标识记录,绑定某号纹理单元查看变化才更新贴图\n this.__update = false;\n this.time = 0;\n }\n\n add() {\n let { number, grid } = this;\n for(let i = 0; i < number; i++) {\n for(let j = 0; j < number; j++) {\n let index = i * number + j;\n if(grid[index]) {\n grid[index] = 0;\n this.__free--;\n return index;\n }\n }\n }\n // 理论不可能进入,除非bug\n throw new Error('Can not find free page');\n }\n\n del(pos) {\n if(!this.grid[pos]) {\n this.grid[pos] = 1;\n this.__free++;\n }\n }\n\n getCoords(pos) {\n let { size, number } = this;\n let x = pos % number;\n let y = Math.floor(pos / number);\n return [x * size, y * size];\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 total() {\n return this.__total;\n }\n\n get free() {\n return this.__free;\n }\n\n get grid() {\n return this.__grid;\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(size) {\n if(size > MAX) {\n return;\n }\n let s = SIZE[0];\n let n = NUMBER[0];\n // 使用刚好满足的尺寸\n for(let i = 0, len = SIZE.length; i < len; i++) {\n s = SIZE[i];\n n = NUMBER[i];\n if(SIZE[i] >= size) {\n break;\n }\n }\n let list = HASH_CANVAS[s] = HASH_CANVAS[s] || [];\n // 从hash列表中尝试取可用的一页,找不到就生成新的页\n let page;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(item.free) {\n page = item;\n break;\n }\n }\n if(!page) {\n page = new Page(s, n);\n if(!page.offscreen) {\n inject.error('Can not create off-screen for page');\n return;\n }\n list.push(page);\n }\n let pos = page.add();\n return { page, pos };\n }\n\n static set CONFIG(v) {\n if(!v || !Array.isArray(v.SIZE) || !Array.isArray(v.NUMBER)) {\n return;\n }\n SIZE = v.SIZE;\n NUMBER = v.NUMBER;\n MAX = SIZE[SIZE.length - 1];\n }\n\n static get CONFIG() {\n return {\n SIZE,\n NUMBER,\n };\n }\n\n static get MAX() {\n return MAX;\n }\n\n static genUuid() {\n return uuid++;\n }\n}\n\nexport default Page;\n","import Page from './Page';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport enums from '../util/enums';\nimport painter from '../util/painter';\nimport debug from '../util/debug';\nimport tf from '../style/transform';\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\n// 根据一个共享cache的信息,生成一个独立的离屏canvas,一般是filter,mask用,可能尺寸会发生变化\nfunction genSingle(cache, message, bboxNew) {\n let { size, sx1, sy1, 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.getCacheCanvas(width, height, null, message);\n offscreen.x = 0;\n offscreen.y = 0;\n offscreen.bbox = bboxNew;\n offscreen.size = size;\n offscreen.sx1 = sx1;\n offscreen.sy1 = sy1;\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\nclass Cache {\n constructor(w, h, bbox, page, pos, x1, y1) {\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 this.__appendData(x1, y1);\n if(page.canvas) {\n this.__enabled = true;\n let ctx = page.ctx;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n if(debug.flag) {\n page.canvas.setAttribute && page.canvas.setAttribute('size', page.size);\n }\n }\n }\n\n __appendData(sx1, sy1) {\n this.sx1 = sx1; // 去除margin的左上角原点坐标\n this.sy1 = sy1;\n let bbox = this.bbox;\n this.dx = this.x - bbox[0]; // cache坐标和box原点的差值\n this.dy = this.y - bbox[1];\n this.dbx = sx1 - bbox[0]; // 原始sx1/sy1和box原点的差值\n this.dby = sy1 - bbox[1];\n this.update();\n }\n\n update() {\n this.page.__update = true;\n }\n\n clear() {\n if(this.__available) {\n let ctx = this.ctx;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n let size = this.page.size;\n ctx.clearRect(this.x, this.y, size, size);\n this.__available = false;\n }\n }\n\n release() {\n if(this.__enabled) {\n this.clear();\n this.__page.del(this.pos);\n this.__page = null;\n this.__enabled = false;\n }\n }\n\n reset(bbox, x1, y1) {\n // 尺寸没变复用之前的并清空\n if(util.equalArr(this.bbox, bbox) && this.__enabled) {\n this.clear();\n return;\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 = Page.getInstance(Math.max(w, h));\n if(!res) {\n this.__enabled = false;\n return;\n }\n let { page, pos } = res;\n this.__init(w, h, bbox, page, pos, x1, y1);\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 canvas() {\n return this.__page.canvas;\n }\n\n get ctx() {\n return this.__page.ctx;\n }\n\n get size() {\n return this.__page.size;\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 static get MAX() {\n return Page.MAX;\n }\n\n static getInstance(bbox, x1, y1) {\n let w = Math.ceil(bbox[2] - bbox[0]);\n let h = Math.ceil(bbox[3] - bbox[1]);\n let res = Page.getInstance(Math.max(w, h));\n if(!res) {\n return;\n }\n let { page, pos } = res;\n return new Cache(w, h, bbox, page, pos, x1, y1);\n }\n\n /**\n * 复制cache的一块出来单独作为cacheFilter,尺寸边距保持一致,用浏览器原生ctx.filter滤镜\n * @param cache\n * @param filter\n * @returns {{canvas: *, ctx: *, release(): void, available: boolean}}\n */\n static genFilter(cache, filter) {\n let { x, y, size, canvas, sx1, sy1, 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.getCacheCanvas(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.sx1 = sx1;\n offscreen.sy1 = sy1;\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.__isClip;\n while(next && next.__isMask) {\n list.push(next);\n next = next.next;\n }\n let { x, y, ctx, dbx, dby } = cacheMask;\n tfo = tfo.slice(0);\n tfo[0] += x + dbx;\n tfo[1] += y + dby;\n let inverse = tf.calMatrixByOrigin(transform, tfo);\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 Cache.drawCache(target, cacheMask);\n ctx.globalCompositeOperation = 'source-over';\n return cacheMask;\n }\n\n /**\n * 如果不超过bbox,直接用已有的total/filter/mask,否则生成一个新的\n */\n static genOverflow(target, node) {\n let { bbox } = target;\n let { __sx1, __sy1, __clientWidth, __clientHeight } = node;\n let xe = __sx1 + __clientWidth;\n let ye = __sy1 + __clientHeight;\n if(bbox[0] < __sx1 || bbox[1] < __sy1 || bbox[2] > xe || bbox[3] > ye) {\n let bboxNew = [__sx1, __sy1, xe, ye];\n let cacheOverflow = genSingle(target, 'overflow', bboxNew);\n let ctx = cacheOverflow.ctx;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n Cache.drawCache(target, cacheOverflow);\n ctx.globalCompositeOperation = 'destination-in';\n ctx.fillStyle = '#FFF';\n ctx.beginPath();\n ctx.rect(0, 0, __clientWidth, __clientHeight);\n ctx.fill();\n ctx.closePath();\n ctx.globalCompositeOperation = 'source-over';\n return cacheOverflow;\n }\n }\n\n static drawCache(source, target) {\n let { x: tx, y: ty, sx1, sy1, ctx, dbx, dby } = target;\n let { x, y, canvas, sx1: sx2, sy1: sy2, dbx: dbx2, dby: dby2, width, height } = source;\n let ox = tx + sx2 - sx1 + dbx - dbx2;\n let oy = ty + sy2 - sy1 + dby - dby2;\n ctx.drawImage(canvas, x, y, width, height, ox, oy, width, height);\n }\n\n static 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\nexport default Cache;\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 inject.releaseCacheCanvas(target.canvas);\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.getCacheCanvas(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 inject.releaseCacheCanvas(apply.canvas);\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 inject.releaseCacheCanvas(target.canvas);\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 inject.releaseCacheCanvas(offscreen.target.canvas);\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 inject.releaseCacheCanvas(mask.canvas);\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 inject.releaseCacheCanvas(mask.canvas);\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 inject.releaseCacheCanvas(target.canvas);\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 inject.releaseCacheCanvas(target.canvas);\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","import Page from '../refresh/Page';\nimport inject from '../util/inject';\n\nclass MockPage {\n constructor(texture, width, height) {\n this.uuid = Page.genUuid();\n this.time = inject.now();\n this.texture = texture;\n this.width = width;\n this.height = height;\n }\n}\n\nexport default MockPage;\n","import MockPage from './MockPage';\n\n/**\n * 一个fbo离屏纹理,mock成cache,当webgl需要局部根节点汇总时生成,即cacheTotal,\n * 基于此纹理进行filter、mask等后处理渲染\n */\nclass MockCache {\n constructor(gl, texture, sx1, sy1, width, height, bbox) {\n this.gl = gl;\n this.x = 0;\n this.y = 0;\n this.sx1 = sx1;\n this.sy1 = sy1;\n this.width = width;\n this.height = height;\n this.bbox = bbox;\n this.available = true;\n this.page = new MockPage(texture, width, height);\n this.reOffset();\n }\n\n reOffset() {\n let bbox = this.bbox;\n this.dx = -bbox[0];\n this.dy = -bbox[1];\n this.dbx = this.sx1 - bbox[0];\n this.dby = this.sy1 - bbox[1];\n }\n\n release() {\n this.available = false;\n this.gl.deleteTexture(this.page.texture);\n }\n}\n\nexport default MockCache;\n","import Cache from './Cache';\nimport offscreen from './offscreen';\nimport Text from '../node/Text';\nimport Dom from '../node/Dom';\nimport Img from '../node/Img';\nimport mode from './mode';\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 MockCache from '../gl/MockCache';\nimport blur from '../math/blur';\nimport vertexBlur from '../gl/filter/blur.vert';\nimport fragmentBlur from '../gl/filter/blur.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';\n\nconst { getCache } = Cache;\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 MATRIX,\n },\n} = enums;\nconst {\n NONE,\n TRANSFORM_ALL,\n OPACITY: OP,\n FILTER: FT,\n REPAINT,\n contain,\n MIX_BLEND_MODE: MBM,\n PERSPECTIVE: PPT,\n CACHE,\n} = level;\nconst { isE, inverse, multiply } = mx;\nconst { mbmName, isValidMbm } = mbm;\nconst { assignMatrix, transformBbox } = util;\n\n/**\n * 生成一个节点及其子节点所包含的矩形范围盒,canvas和webgl的最大尺寸限制不一样,由外部传入\n * 如果某个子节点超限,则视为整个超限,超限返回空\n * @param node\n * @param __structs\n * @param index\n * @param total\n * @param parentIndexHash\n * @param opacityHash\n * @param MAX\n * @param includeLimitCache webgl时即便超限也要强制生成total,所以标识不能跳出\n * @returns {*}\n */\nfunction genBboxTotal(node, __structs, index, total, parentIndexHash, opacityHash, MAX, includeLimitCache) {\n let { __sx1: sx1, __sy1: sy1, __cache } = node;\n let {\n [FILTER]: filter,\n [PERSPECTIVE]: perspective,\n [PERSPECTIVE_ORIGIN]: perspectiveOrigin,\n } = node.__computedStyle;\n // 先将局部根节点的bbox算好,可能没内容是空\n let bboxTotal;\n if(__cache && __cache.available) {\n bboxTotal = __cache.bbox;\n }\n else {\n bboxTotal = node.filterBbox;\n }\n bboxTotal = bboxTotal.slice(0);\n // 局部根节点如有perspective,则计算pm,这里不会出现嵌套,因为每个出现都会生成局部根节点\n let pm;\n if(perspective) {\n pm = tf.calPerspectiveMatrix(perspective, perspectiveOrigin);\n }\n // 广度遍历,不断一层层循环下去,用2个hash暂存每层的父matrix和opacity,blur只需记住顶层,因为子的如果有一定是cacheFilter\n let list = [index];\n let d = 0;\n filter.forEach(item => {\n let { k, v } = item;\n if(k === 'blur') {\n d = blur.outerSize(v);\n }\n });\n opacityHash[index] = 1;\n // opacity可以保存下来层级相乘结果供外部使用,但matrix不可以,因为这里按画布原点为坐标系计算,外部合并局部根节点以bbox左上角为原点\n let matrixHash = {};\n while(list.length) {\n let arr = list.splice(0);\n for(let i = 0, len = arr.length; i < len; i++) {\n let parentIndex = arr[i];\n let total = __structs[parentIndex].total || 0;\n for(let i = parentIndex + 1, len = parentIndex + total + 1; i < len; i++) {\n let {\n node: node2,\n total,\n } = __structs[i];\n // mask也不占bbox位置\n if(node2.__isMask) {\n continue;\n }\n let {\n __sx1,\n __sy1,\n __cache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n __cacheOverflow,\n __limitCache,\n computedStyle: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n [OPACITY]: opacity,\n },\n } = node2;\n // webgl不能跳过超限\n if(__limitCache && !includeLimitCache) {\n return;\n }\n // display:none跳过整个节点树,visibility只跳过自身\n if(display === 'none') {\n i += total || 0;\n continue;\n }\n if(visibility === 'hidden') {\n continue;\n }\n parentIndexHash[i] = parentIndex;\n opacityHash[i] = opacityHash[parentIndex] * opacity;\n let bbox, dx = 0, dy = 0, hasTotal;\n // text不能用filter\n if(node2 instanceof Text) {\n bbox = node2.bbox;\n }\n else {\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal]);\n if(target) {\n bbox = target.bbox;\n dx = target.dbx;\n dy = target.dby;\n i += total || 0;\n hasTotal = true;\n }\n else if(__cache && __cache.available) {\n bbox = __cache.bbox;\n dx = __cache.dbx;\n dy = __cache.dby;\n }\n else {\n bbox = node2.filterBbox;\n }\n }\n // 可能Xom没有内容\n if(bbox) {\n bbox = bbox.slice(0);\n // 相对于根节点偏移\n bbox[0] -= sx1;\n bbox[1] -= sy1;\n bbox[2] -= sx1;\n bbox[3] -= sy1;\n let matrix = matrixHash[parentIndex];\n // 父级matrix初始化E为null,自身不为E时才运算,可以加速\n if(transform && !isE(transform)) {\n let tfo = transformOrigin.slice(0);\n // total下的节点tfo的计算,以total为原点,差值坐标即相对坐标\n tfo[0] += __sx1 - sx1 + dx;\n tfo[1] += __sy1 - sy1 + dy;\n let m = tf.calMatrixByOrigin(transform, tfo);\n if(matrix) {\n matrix = multiply(matrix, m);\n }\n else {\n matrix = m;\n }\n }\n if(matrix) {\n matrixHash[i] = matrix;\n }\n if(pm) {\n matrix = multiply(pm, matrix);\n }\n bbox = transformBbox(bbox, matrix, d, d);\n // 有孩子才继续存入下层级广度运算\n if(total && !hasTotal) {\n list.push(i);\n }\n mergeBbox(bboxTotal, bbox, sx1, sy1);\n }\n }\n }\n }\n return [bboxTotal, pm];\n}\n\nfunction mergeBbox(bbox, t, sx1, sy1) {\n bbox[0] = Math.min(bbox[0], sx1 + t[0]);\n bbox[1] = Math.min(bbox[1], sy1 + t[1]);\n bbox[2] = Math.max(bbox[2], sx1 + t[2]);\n bbox[3] = Math.max(bbox[3], sy1 + t[3]);\n}\n\n/**\n * 生成局部根节点离屏缓存,超限时除外\n * cache是每个节点自身的缓存,且共享离屏canvas\n * cacheTotal是基础\n * cacheFilter基于total\n * cacheOverflow基于filter\n * cacheMask基于overflow\n * cacheBlend基于mask\n * @param renderMode\n * @param node\n * @param index\n * @param lv\n * @param total\n * @param __structs\n * @param hasMask\n * @param width\n * @param height\n * @returns {{enabled}|Cache|*}\n */\nfunction genTotal(renderMode, node, index, lv, total, __structs, hasMask, width, height) {\n let __cacheTotal = node.__cacheTotal;\n // 先绘制形成基础的total,有可能已经存在无变化,就可省略\n if(!__cacheTotal || !__cacheTotal.available) {\n let { __sx1: sx1, __sy1: sy1, bbox } = node;\n // 局部根节点视为E且无透明度,用bbox,子节点用filterBbox\n let bboxTotal = bbox.slice(0);\n assignMatrix(node.__matrixEvent, mx.identity());\n node.__opacity = 1;\n // 先遍历每个节点,以局部根节点为E,求得所占的总的bbox,即合并所有bbox\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 // Text特殊处理,因为有stroke描边\n if(node instanceof Text) {\n let bbox = node.filterBbox, matrix = node.__domParent.__matrixEvent;\n if(!isE(matrix)) {\n bbox = transformBbox(bbox, matrix, 0, 0);\n }\n mergeBbox(bboxTotal, bbox, 0, 0);\n continue;\n }\n let {\n __computedStyle: __computedStyle2,\n __isMask,\n } = node;\n // 跳过display:none元素和它的所有子节点和mask,本身是mask除外\n if(__computedStyle2[DISPLAY] === 'none' || i !== index && __isMask) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n __cacheTotal: __cacheTotal2,\n __cacheFilter: __cacheFilter2,\n __cacheMask: __cacheMask2,\n __cacheOverflow: __cacheOverflow2,\n } = node;\n let p = node.__domParent;\n node.__opacity = __computedStyle2[OPACITY] * p.__opacity;\n let matrix = multiply(node.__matrix, p.__matrixEvent);\n assignMatrix(node.__matrixEvent, matrix);\n let bbox;\n // 子元素有cacheTotal优先使用\n let target = getCache([__cacheMask2, __cacheFilter2, __cacheOverflow2, __cacheTotal2]);\n // 局部根节点的total不需要考虑filter,子节点要\n if(target) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n bbox = target.bbox;\n }\n else {\n bbox = node.filterBbox;\n }\n // 老的不变,新的会各自重新生成,根据matrixEvent合并bboxTotal\n bbox = transformBbox(bbox, matrix, 0, 0);\n mergeBbox(bboxTotal, bbox, 0, 0);\n }\n\n // 生成cacheTotal,获取偏移dx/dy\n __cacheTotal = node.__cacheTotal = Cache.getInstance(bboxTotal, sx1, sy1);\n if(!__cacheTotal || !__cacheTotal.__enabled) {\n inject.warn('Cache of ' + node.tagName + '(' + index + ')' + ' is oversize: '\n + (bboxTotal[2] - bboxTotal[0]) + ', ' + (bboxTotal[3] - bboxTotal[1]));\n return;\n }\n __cacheTotal.__available = true;\n let { dx, dy, dbx, dby, x: tx, y: ty } = __cacheTotal;\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 if(offscreenHash.hasOwnProperty(i)) {\n ctxTotal = applyOffscreen(ctxTotal, offscreenHash[i], 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 if(offscreenHash.hasOwnProperty(i)) {\n ctxTotal = applyOffscreen(ctxTotal, offscreenHash[i], width, height, true);\n }\n continue;\n }\n let {\n __cacheTotal: __cacheTotal2,\n __cacheFilter: __cacheFilter2,\n __cacheMask: __cacheMask2,\n __cacheOverflow: __cacheOverflow2,\n } = node;\n let {\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n } = __computedStyle2;\n if(maskStartHash.hasOwnProperty(i)) {\n let { idx, hasMask, offscreenMask } = maskStartHash[i];\n let target = inject.getCacheCanvas(width, height, null, 'mask2');\n offscreenMask.mask = target; // 应用mask用到\n offscreenMask.isClip = node.__isClip;\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 tfo = tfo.slice(0);\n tfo[0] += dbx + node.__sx1 - sx1 + tx;\n tfo[1] += dby + node.__sy1 - sy1 + ty;\n m = tf.calMatrixByOrigin(transform, tfo);\n if(!isE(parentMatrix)) {\n m = multiply(parentMatrix, m);\n }\n }\n lastMatrix = m;\n // 子元素有cacheTotal优先使用\n let target = i > index && getCache([__cacheMask2, __cacheFilter2, __cacheOverflow2, __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(isValidMbm(mixBlendMode)) {\n ctxTotal.globalCompositeOperation = mbmName(mixBlendMode);\n }\n Cache.drawCache(target, __cacheTotal);\n ctxTotal.globalCompositeOperation = 'source-over';\n if(offscreenHash.hasOwnProperty(i)) {\n ctxTotal = applyOffscreen(ctxTotal, offscreenHash[i], 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 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 // 这里离屏顺序和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 ctxTotal = applyOffscreen(ctxTotal, offscreenHash[i], width, height, false);\n }\n }\n }\n }\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 __cacheOverflow,\n __cacheFilter,\n __cacheMask,\n } = node;\n let {\n [OVERFLOW]: overflow,\n [FILTER]: filter,\n } = __computedStyle;\n let target = __cacheTotal, needGen;\n if(overflow === 'hidden') {\n if(!__cacheOverflow || !__cacheOverflow.available) {\n node.__cacheOverflow = __cacheOverflow = Cache.genOverflow(target, node);\n needGen = true;\n }\n if(__cacheOverflow && __cacheOverflow.available) {\n target = __cacheOverflow;\n }\n }\n if(filter && filter.length) {\n if(!__cacheFilter || !__cacheFilter.available || needGen) {\n node.__cacheFilter = __cacheFilter = Cache.genFilter(target, filter);\n needGen = true;\n }\n if(__cacheFilter && __cacheFilter.available) {\n target = __cacheFilter;\n }\n }\n if(hasMask && (!__cacheMask || !__cacheMask.available || needGen)) {\n node.__cacheMask = __cacheMask = Cache.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, sx1, sy1 } = 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 __cacheOverflow,\n } = node;\n if(maskStartHash.hasOwnProperty(i)) {\n let { idx, hasMask, offscreenMask } = maskStartHash[i];\n let target = inject.getCacheCanvas(width, height, null, 'mask2');\n offscreenMask.mask = target; // 应用mask用到\n offscreenMask.isClip = node.__isClip;\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 tfo = tfo.slice(0);\n tfo[0] += dbx + node.__sx1 - sx1 + tx;\n tfo[1] += dby + node.__sy1 - sy1 + ty;\n m = tf.calMatrixByOrigin(transform, tfo);\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, __cacheOverflow, __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(isValidMbm(mixBlendMode)) {\n ctx.globalCompositeOperation = mbmName(mixBlendMode);\n }\n else {\n ctx.globalCompositeOperation = 'source-over';\n }\n let { x, y, canvas, width, height, sx1: sx2, sy1: sy2, dbx: dbx2, dby: dby2 } = target;\n let ox = tx + sx2 - sx1 + dbx - dbx2;\n let oy = ty + sy2 - sy1 + 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 if(__cacheMask && __cacheMask.available) {\n target = __cacheMask;\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, texCache, width, height) {\n let n = texCache.lockOneChannel();\n let texture = webgl.createTexture(gl, null, n, 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 [n, frameBuffer, texture];\n}\n\n/**\n * 局部根节点复合图层生成,汇总所有子节点到一颗局部树上的位图缓存,包含超限特殊情况\n * 即便只有自己一个也要返回,因为webgl生成total的原因是有类似filter/mask等必须离屏处理的东西\n * @param renderMode\n * @param gl\n * @param texCache\n * @param node\n * @param index\n * @param total\n * @param __structs\n * @param cache\n * @param limitCache\n * @param W\n * @param H\n * @returns {*}\n */\nfunction genTotalWebgl(renderMode, gl, texCache, node, index, total, __structs, cache, limitCache, W, H) {\n // 存每层父亲的matrix和opacity和index,bbox计算过程中生成,缓存给下面渲染过程用\n let parentIndexHash = {};\n let opacityHash = {};\n let [bboxTotal, parentPm] = genBboxTotal(node, __structs, index, total, parentIndexHash, opacityHash,\n gl.getParameter(gl.MAX_TEXTURE_SIZE), limitCache);\n // 可能局部根节点合成过程中发现整体超限\n let totalLimitCache;\n if(!bboxTotal) {\n totalLimitCache = true;\n }\n // 超限情况生成画布大小的特殊纹理\n if(limitCache || totalLimitCache) {\n bboxTotal = [0, 0, W, H];\n }\n let width = bboxTotal[2] - bboxTotal[0];\n let height = bboxTotal[3] - bboxTotal[1];\n let [n, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n // 以bboxTotal的左上角为原点生成离屏texture\n let { __sx1: sx1, __sy1: sy1 } = node;\n let cx = width * 0.5, cy = height * 0.5;\n let dx = -bboxTotal[0], dy = -bboxTotal[1];\n let dbx = sx1 - bboxTotal[0], dby = sy1 - bboxTotal[1];\n // 先绘制自己的cache,起点所以matrix视作E为空,opacity固定1\n if(cache && cache.available) {\n texCache.addTexAndDrawWhenLimit(gl, cache, 1, null, cx, cy, dx, dy, false);\n }\n // limitCache无cache需先绘制到统一的离屏画布上\n else if(limitCache) {\n let c = inject.getCacheCanvas(width, height, '__$$OVERSIZE$$__');\n node.render(mode.CANVAS, c.ctx, 0, 0);\n let j = texCache.lockOneChannel();\n let texture = webgl.createTexture(gl, c.canvas, j);\n let mockCache = new MockCache(gl, texture, 0, 0, width, height, [0, 0, width, height]);\n texCache.addTexAndDrawWhenLimit(gl, mockCache, 1, null, cx, cy, 0, 0, false);\n texCache.refresh(gl, cx, cy);\n c.ctx.setTransform(1, 0, 0, 1, 0, 0);\n c.ctx.globalAlpha = 1;\n c.ctx.clearRect(0, 0, width, height);\n mockCache.release();\n texCache.releaseLockChannel(j);\n }\n // 因为cacheTotal不总是以左上角原点为开始,所以必须每个节点重算matrix,合并box时计算的无法用到\n let matrixHash = {};\n // 先序遍历汇总到total\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 let parentIndex = parentIndexHash[i];\n let matrix = matrixHash[parentIndex]; // 父节点的在每个节点计算后保存,第一个为top的默认为E(空)\n let opacity = opacityHash[i]; // opacity在合并box时已经计算可以直接用\n // 先看text,visibility会在内部判断,display会被parent判断\n if(node instanceof Text) {\n if(parentPm) {\n matrix = multiply(parentPm, matrix);\n }\n texCache.addTexAndDrawWhenLimit(gl, node.__cache, opacity, matrix, cx, cy, dx, dy, false);\n }\n // 再看total缓存/cache,都没有的是无内容的Xom节点\n else {\n let {\n __cache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n __cacheOverflow,\n __isMask,\n } = node;\n let {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n [MIX_BLEND_MODE]: mixBlendMode,\n } = node.__computedStyle;\n if(display === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n // mask和不可见不能被汇总到top上\n if((visibility === 'hidden' || __isMask)) {\n node.render(renderMode, gl, dx, dy);\n gl.useProgram(gl.program);\n gl.viewport(0, 0, width, height);\n continue;\n }\n if(transform && !isE(transform)) {\n let tfo = transformOrigin.slice(0);\n // total下的节点tfo的计算,以total为原点,差值坐标即相对坐标\n if(__cache && __cache.available) {\n tfo[0] += __cache.sx1;\n tfo[1] += __cache.sy1;\n }\n else {\n tfo[0] += node.__sx1;\n tfo[1] += node.__sy1;\n }\n let dx = -sx1 + dbx;\n let dy = -sy1 + dby;\n tfo[0] += dx;\n tfo[1] += dy;\n let m = tf.calMatrixByOrigin(transform, tfo);\n if(matrix) {\n matrix = multiply(matrix, m);\n }\n else {\n matrix = m;\n }\n }\n if(matrix) {\n matrixHash[i] = matrix;\n }\n if(parentPm) {\n matrix = multiply(parentPm, matrix);\n }\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal, __cache]);\n if(target) {\n // 局部的mbm和主画布一样,先刷新当前fbo,然后把后面这个mbm节点绘入一个新的等画布尺寸的fbo中,再进行2者mbm合成\n if(isValidMbm(mixBlendMode)) {\n texCache.refresh(gl, cx, cy);\n let [n2, frameBuffer2, texture2] = genFrameBufferWithTexture(gl, texCache, width, height);\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, matrix, cx, cy, dx, dy, false);\n texCache.refresh(gl, cx, cy);\n // 合成结果作为当前frameBuffer,以及纹理和单元,等于替代了当前fbo作为绘制对象\n [n, frameBuffer, texture] = genMbmWebgl(gl, texCache, n, n2, frameBuffer, texture, mbmName(mixBlendMode), width, height);\n gl.deleteFramebuffer(frameBuffer2);\n gl.deleteTexture(texture2);\n }\n else {\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, matrix, cx, cy, dx, dy, false);\n }\n if(target !== __cache) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n else {\n // webgl特殊的外部钩子,比如粒子组件自定义渲染时调用\n node.render(renderMode, gl, dx, dy);\n gl.useProgram(gl.program);\n gl.viewport(0, 0, width, height);\n }\n }\n }\n }\n node.render(renderMode, gl, dx, dy);\n gl.useProgram(gl.program);\n gl.viewport(0, 0, width, height);\n // 绘制到fbo的纹理对象上并删除fbo恢复\n texCache.refresh(gl, cx, cy);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n gl.viewport(0, 0, W, H);\n // 生成的纹理对象本身已绑定一个纹理单元了,释放lock的同时可以给texCache的channel缓存,避免重复上传\n let mockCache = new MockCache(gl, texture, sx1, sy1, width, height, bboxTotal);\n texCache.releaseLockChannel(n, mockCache.page);\n return [limitCache || totalLimitCache, mockCache];\n}\n\nfunction genFilterWebgl(gl, texCache, node, cache, filter, W, H) {\n let { sx1, sy1, width, height, bbox } = cache;\n let mockCache = cache;\n filter.forEach(item => {\n let { k, v } = item;\n if(k === 'blur' && v > 0) {\n let res = genBlurWebgl(gl, texCache, mockCache, v, width, height, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n else if(k === 'dropShadow') {\n let res = genDropShadowWebgl(gl, texCache, mockCache, v, width, height, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = 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(gl, texCache, mockCache, [\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, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n else if(k === 'saturate' && v !== 100) {\n let amount = v * 0.01;\n let res = genColorMatrixWebgl(gl, texCache, mockCache, [\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, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n else if(k === 'brightness' && v !== 100) {\n let b = v * 0.01;\n let res = genColorMatrixWebgl(gl, texCache, mockCache, [\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, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = 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(gl, texCache, mockCache, [\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, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = 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(gl, texCache, mockCache, [\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, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = 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(gl, texCache, mockCache, [\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, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = 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(gl, texCache, mockCache, [\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, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n });\n // 切换回主程序\n gl.useProgram(gl.program);\n gl.viewport(0, 0, W, H);\n return mockCache;\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(gl, texCache, cache, sigma, width, height, sx1, sy1, bbox) {\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 let limit = gl.getParameter(gl.MAX_TEXTURE_SIZE);\n if(width > limit || height > limit) {\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 let widthNew = width + spread * 2;\n let heightNew = height + spread * 2;\n let cx = widthNew * 0.5, cy = heightNew * 0.5;\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 let program = webgl.initShaders(gl, vert, frag);\n gl.useProgram(program);\n let [i, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, widthNew, heightNew);\n // 将本身total的page纹理放入一个单元,一般刚生成已经在了,少部分情况变更引发的可能不在\n let j = texCache.findExistTexChannel(cache.page);\n if(j === -1) {\n // 直接绑定,因为一定是个mockCache\n j = texCache.lockOneChannel();\n webgl.bindTexture(gl, cache.page.texture, j);\n }\n else {\n texCache.lockChannel(j);\n }\n texture = webgl.drawBlur(gl, program, frameBuffer, texture, cache.page.texture, i, j,\n width, height, spread, widthNew, heightNew, cx, cy);\n // 销毁这个临时program\n gl.deleteShader(program.vertexShader);\n gl.deleteShader(program.fragmentShader);\n gl.deleteProgram(program);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n texCache.releaseLockChannel(j);\n let mockCache = new MockCache(gl, texture, sx1, sy1, widthNew, heightNew, bboxNew);\n texCache.releaseLockChannel(i, mockCache.page);\n return [mockCache, widthNew, heightNew, bboxNew];\n}\n\nfunction genColorMatrixWebgl(gl, texCache, cache, m, width, height, sx1, sy1, bbox) {\n // 生成最终纹理,尺寸为被遮罩节点大小\n let [i, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n // 将本身total的page纹理放入一个单元,一般刚生成已经在了,少部分情况变更引发的可能不在\n let j = texCache.findExistTexChannel(cache.page);\n if(j === -1) {\n // 直接绑定,因为一定是个mockCache\n j = texCache.lockOneChannel();\n webgl.bindTexture(gl, cache.page.texture, j);\n }\n else {\n texCache.lockChannel(j);\n }\n gl.useProgram(gl.programCm);\n webgl.drawCm(gl, gl.programCm, j, m);\n texCache.releaseLockChannel(j);\n // 切回\n gl.useProgram(gl.program);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n // 同total一样生成一个mockCache\n let mockCache = new MockCache(gl, texture, sx1, sy1, width, height, bbox.slice(0));\n texCache.releaseLockChannel(i, mockCache.page);\n return [mockCache, width, height, bbox];\n}\n\nfunction genOverflowWebgl(gl, texCache, node, cache, W, H) {\n let bbox = cache.bbox;\n let { __sx1, __sy1, __clientWidth, __clientHeight } = node;\n let xe = __sx1 + __clientWidth;\n let ye = __sy1 + __clientHeight;\n // 没超过无需生成\n if(bbox[0] >= __sx1 && bbox[1] >= __sy1 && bbox[2] <= xe && ye) {\n return;\n }\n let bboxNew = [__sx1, __sy1, xe, ye];\n // 生成最终纹理,尺寸为被遮罩节点大小\n let [i, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, __clientWidth, __clientHeight);\n // 将本身total的page纹理放入一个单元,一般刚生成已经在了,少部分情况变更引发的可能不在\n let j = texCache.findExistTexChannel(cache.page);\n if(j === -1) {\n // 直接绑定,因为一定是个mockCache\n j = texCache.lockOneChannel();\n webgl.bindTexture(gl, cache.page.texture, j);\n }\n else {\n texCache.lockChannel(j);\n }\n // 绘制,根据坐标裁剪使用原本纹理的一部分\n gl.useProgram(gl.programOverflow);\n webgl.drawOverflow(gl, j, bboxNew[0] - bbox[0], bboxNew[1] - bbox[1], __clientWidth, __clientHeight, cache.width, cache.height);\n texCache.releaseLockChannel(j);\n // 切回\n gl.useProgram(gl.program);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.viewport(0, 0, W, H);\n gl.deleteFramebuffer(frameBuffer);\n // 同total一样生成一个mockCache\n let overflowCache = new MockCache(gl, texture, cache.sx1, cache.sy1, __clientWidth, __clientHeight, bboxNew);\n texCache.releaseLockChannel(i, overflowCache.page);\n return overflowCache;\n}\n\nfunction genMaskWebgl(gl, texCache, node, cache, W, H, lv, __structs) {\n let { sx1, sy1, width, height, bbox, dx, dy } = cache;\n // cache一定是mockCache,可能是total/filter/overflow一种\n let cx = width * 0.5, cy = height * 0.5;\n // 先求得被遮罩的matrix,用作inverse给mask计算\n let {\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n } = node.__computedStyle;\n let inverse;\n if(isE(transform)) {\n inverse = mx.identity();\n }\n else {\n let tfo = transformOrigin.slice(0);\n tfo[0] += sx1 + dx;\n tfo[1] += sy1 + dy;\n inverse = tf.calMatrixByOrigin(transform, tfo);\n }\n inverse = mx.inverse(inverse);\n // 将所有mask绘入一个单独纹理中,尺寸和原点与被遮罩total相同,才能做到顶点坐标一致\n let [i, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n let next = node.next;\n let isClip = next.__isClip;\n let list = [];\n while(next && next.__isMask && next.__isClip === isClip) {\n list.push(next);\n next = next.next;\n }\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\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 struct = item.__struct;\n let index = __structs.indexOf(struct);\n // 可以忽略mbm,因为只有透明遮罩\n for(let i = index, len = index + (struct.total || 0) + 1; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n let __cache = node.__cache;\n let __limitCache = node.__limitCache;\n let computedStyle = node.__computedStyle;\n // 跳过display:none元素和它的所有子节点和mask\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n if(node instanceof Text) {\n if(__cache && __cache.available) {\n // text用父级的matrixEvent,在之前texCache添加到末尾了\n texCache.addTexAndDrawWhenLimit(gl, __cache, parentOpacity, texCache.last[2], cx, cy, 0, 0,true);\n }\n else if(__limitCache) {\n return;\n }\n }\n else {\n let {\n __cache,\n __cacheMask,\n __cacheFilter,\n __cacheOverflow,\n __cacheTotal,\n } = node;\n let {\n [OPACITY]: opacity,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n } = node.__computedStyle;\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, __cacheOverflow, __cacheTotal, __cache]);\n // total和自身cache的尝试,visibility不可见时没有cache\n if(target) {\n let m;\n if(isE(transform)) {\n m = mx.identity();\n }\n else {\n let tfo = transformOrigin.slice(0);\n tfo[0] += target.bbox[0] + dx;\n tfo[1] += target.bbox[1] + dy;\n m = tf.calMatrixByOrigin(transform, tfo);\n }\n m = mx.multiply(inverse, m);\n let tfo = transformOrigin.slice(0);\n tfo[0] += target.bbox[0] + dx;\n tfo[1] += target.bbox[1] + dy;\n lastMatrix = tf.calMatrixByOrigin(transform, tfo);\n if(!isE(parentMatrix)) {\n lastMatrix = multiply(parentMatrix, lastMatrix);\n }\n lastOpacity = parentOpacity * opacity;\n texCache.addTexAndDrawWhenLimit(gl, target, lastOpacity, m, cx, cy, dx, dy, true);\n if(target !== __cache) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n }\n else if(__limitCache) {\n return;\n }\n }\n }\n }\n texCache.refresh(gl, cx, cy);\n gl.deleteFramebuffer(frameBuffer);\n // 将本身total的page纹理放入一个单元,一般刚生成已经在了,少部分情况mask变更引发的可能不在\n let j = texCache.findExistTexChannel(cache.page);\n if(j === -1) {\n // 直接绑定,因为一定是个mockCache\n j = texCache.lockOneChannel();\n webgl.bindTexture(gl, cache.page.texture, j);\n }\n else {\n texCache.lockChannel(j);\n }\n // 生成最终纹理,汇总total和maskCache\n let [n, frameBuffer2, texture2] = genFrameBufferWithTexture(gl, texCache, width, height);\n let program;\n if(isClip) {\n program = gl.programClip;\n }\n else {\n program = gl.programMask;\n }\n gl.useProgram(program);\n webgl.drawMask(gl, i, j, program);\n gl.deleteTexture(texture);\n texCache.releaseLockChannel(i);\n texCache.releaseLockChannel(j);\n // 切换回主程序\n gl.useProgram(gl.program);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.viewport(0, 0, W, H);\n gl.deleteFramebuffer(frameBuffer2);\n // 同total一样生成一个mockCache\n let maskCache = new MockCache(gl, texture2, sx1, sy1, width, height, bbox);\n texCache.releaseLockChannel(n, maskCache.page);\n return maskCache;\n}\n\n/**\n * webgl的dropShadow只生成阴影部分,模糊复用blur,然后进行拼合\n * @param gl\n * @param texCache\n * @param cache\n * @param v\n * @param width\n * @param height\n * @param sx1\n * @param sy1\n * @param bbox\n * @returns {*[]}\n */\nfunction genDropShadowWebgl(gl, texCache, cache, v, width, height, sx1, sy1, bbox) {\n // 先清空之前所有绘制遗留\n texCache.refresh(gl, width * 0.5, height * 0.5);\n // 先根据x/y/color生成单色阴影\n let [x, y, blur, , color] = v;\n let [i, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n // 将本身total的page纹理放入一个单元,一般刚生成已经在了,少部分情况变更引发的可能不在\n let j = texCache.findExistTexChannel(cache.page);\n if(j === -1) {\n // 直接绑定,因为一定是个mockCache\n j = texCache.lockOneChannel();\n webgl.bindTexture(gl, cache.page.texture, j);\n }\n else {\n texCache.lockChannel(j);\n }\n gl.useProgram(gl.programDs);\n texture = webgl.drawDropShadow(gl, gl.programDs, frameBuffer, texture, cache.page.texture, i, j, width, height, color);\n // 部分清除\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n let bboxOld = bbox;\n let mockCache = new MockCache(gl, texture, sx1, sy1, width, height, bbox.slice(0));\n // 复用blur先生成模糊的阴影\n let res = genBlurWebgl(gl, texCache, mockCache, blur, width, height, sx1, sy1, bbox);\n texCache.releaseLockChannel(j); // 不管后续成功如何,都先释放阴影的lock\n gl.useProgram(gl.program);\n if(res) {\n gl.deleteTexture(texture); // 有模糊的阴影后删除之前无模糊的临时阴影\n [mockCache, width, height, bbox] = res;\n // 根据dropShadow的x/y偏移重置模糊阴影的相关数据\n if(x || y) {\n bbox[0] += x;\n bbox[1] += y;\n bbox[2] += x;\n bbox[3] += y;\n // 把模糊阴影当做一张普通的图片\n mockCache.sx1 = bbox[0];\n mockCache.sy1 = bbox[1];\n mockCache.reOffset();\n }\n let bboxMerge = bboxOld.slice(0);\n mergeBbox(bboxMerge, bbox, 0, 0);\n // 合并原本cache和blur的纹理为最终对象,i是最初的cache,j是\n width = bboxMerge[2] - bboxMerge[0];\n height = bboxMerge[3] - bboxMerge[1];\n let cx = width * 0.5, cy = height * 0.5;\n let dx = -bboxMerge[0], dy = -bboxMerge[1];\n let [k, frameBuffer, texture2] = genFrameBufferWithTexture(gl, texCache, width, height);\n // 以merge的bbox的左上角为原点,每个cache要换算一下\n texCache.addTexAndDrawWhenLimit(gl, cache, 1, null, cx, cy, dx, dy, false);\n texCache.addTexAndDrawWhenLimit(gl, mockCache, 1, null, cx, cy, dx, dy, false);\n texCache.refresh(gl, cx, cy, false);\n // 回收\n texCache.releaseLockChannel(i);\n texCache.releaseLockChannel(k);\n gl.deleteFramebuffer(frameBuffer);\n // 同total一样生成一个mockCache,数据和本身一样\n let mockCache2 = new MockCache(gl, texture2, sx1, sy1, width, height, bboxMerge);\n texCache.releaseLockChannel(k, mockCache.page);\n return [mockCache2, width, height, bboxMerge];\n }\n}\n\n/**\n * 生成blendMode混合fbo纹理结果,原本是所有元素向一个fbo记A进行绘制,当出现mbm时,进入到这里,\n * 先生成一个新的fbo记B,将A和待混合节点进行对应的mbm模式混合,结果绘制到B中,然后返回B来替换A,包括纹理单元\n * @param gl\n * @param texCache\n * @param i 之前已有的fbo和纹理单元\n * @param j 当前节点绘制的fbo和纹理单元\n * @param mbm\n * @param fbo 之前舞台绑定的fbo和纹理\n * @param tex\n * @param W\n * @param H\n * @returns {number|*}\n */\nfunction genMbmWebgl(gl, texCache, i, j, fbo, tex, mbm, W, H) {\n let frag;\n mbm = mbmName(mbm);\n if(mbm === 'multiply') {\n frag = fragmentMultiply;\n }\n else if(mbm === 'screen') {\n frag = fragmentScreen;\n }\n else if(mbm === 'overlay') {\n frag = fragmentOverlay;\n }\n else if(mbm === 'darken') {\n frag = fragmentDarken;\n }\n else if(mbm === 'lighten') {\n frag = fragmentLighten;\n }\n else if(mbm === 'color-dodge') {\n frag = fragmentColorDodge;\n }\n else if(mbm === 'color-burn') {\n frag = fragmentColorBurn;\n }\n else if(mbm === 'hard-light') {\n frag = fragmentHardLight;\n }\n else if(mbm === 'soft-light') {\n frag = fragmentSoftLight;\n }\n else if(mbm === 'difference') {\n frag = fragmentDifference;\n }\n else if(mbm === 'exclusion') {\n frag = fragmentExclusion;\n }\n else if(mbm === 'hue') {\n frag = fragmentHue;\n }\n else if(mbm === 'saturation') {\n frag = fragmentSaturation;\n }\n else if(mbm === 'color') {\n frag = fragmentColor;\n }\n else if(mbm === 'luminosity') {\n frag = fragmentLuminosity;\n }\n let program = webgl.initShaders(gl, vertexMbm, frag);\n gl.useProgram(program);\n // 生成新的fbo,将混合结果绘入\n let [n, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, W, H);\n webgl.drawMbm(gl, program, i, j, W, H);\n // 切换回主程序并销毁这个临时program\n gl.useProgram(gl.program);\n gl.viewport(0, 0, W, H);\n gl.deleteShader(program.vertexShader);\n gl.deleteShader(program.fragmentShader);\n gl.deleteProgram(program);\n gl.deleteFramebuffer(fbo);\n gl.deleteTexture(tex);\n texCache.releaseLockChannel(i);\n texCache.releaseLockChannel(j);\n return [n, frameBuffer, texture];\n}\n\nfunction renderSvg(renderMode, ctx, root, isFirst) {\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 || contain(__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 if(maskEffectHash.hasOwnProperty(i)) {\n let v = maskEffectHash[i];\n if(!contain(__refreshLevel, TRANSFORM_ALL) && v < REPAINT && !contain(v, 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.__isClip, // 第一个节点是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 let __cacheStyle = node.__cacheStyle;\n let currentStyle = node.__currentStyle;\n if(contain(__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(contain(__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(contain(__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(contain(__refreshLevel, MBM)) {\n let mixBlendMode = computedStyle[MIX_BLEND_MODE];\n if(isValidMbm(mixBlendMode)) {\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 };\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 if(maskHash.hasOwnProperty(i)\n && (maskEffectHash.hasOwnProperty(i)\n || __refreshLevel >= REPAINT\n || contain(__refreshLevel, TRANSFORM_ALL | OP))) {\n let { index, start, end, isClip } = maskHash[i];\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 }\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.__isMask) {\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) {\n let { __structs, width, height, texCache } = 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) {\n let bbox = node.bbox, sx = node.__sx, sy = node.__sy;\n let __cache = node.__cache;\n if(__cache) {\n __cache.reset(bbox, sx, sy);\n }\n else {\n __cache = Cache.getInstance(bbox, sx, sy);\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 // 根据refreshLevel优化计算\n let {\n __refreshLevel,\n __currentStyle,\n __cacheTotal,\n } = node;\n lastRefreshLevel = __refreshLevel;\n node.__refreshLevel = NONE;\n /**\n * lv=REPAINT那里,小变化不动\n * 当有遮罩时,如果被遮罩节点本身无变更,需要检查其next的遮罩节点有无变更,\n * 但其实不用检查,因为next变更一定会清空cacheMask,只要检查cacheMask即可\n * 如果没有或无效,直接添加,无视节点本身变化,后面防重即可\n */\n if(__refreshLevel < REPAINT) {\n let matrix = node.__matrix;\n let mbm = __computedStyle[MIX_BLEND_MODE];\n let isMbm = contain(__refreshLevel, MBM) && isValidMbm(mbm);\n let __domParent = node.__domParent;\n let isPpt = !isE(__domParent && __domParent.__perspectiveMatrix) || tf.isPerspectiveMatrix(matrix);\n if(isMbm) {\n hasMbm = true;\n }\n // 这里和canvas不一样,前置cacheAsBitmap条件变成或条件之一,新的ppt层级且画中画需要新的fbo\n if(contain(__refreshLevel, FT | MBM)\n || isPpt) {\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);\n // 有内容先以canvas模式绘制到离屏画布上,自定义渲染设置无内容不实现即可跳过\n if(hasContent) {\n let bbox = node.bbox, __cache = node.__cache, sx1 = node.__sx1, sy1 = node.__sy1;\n if(__cache) {\n __cache.reset(bbox, sx1, sy1);\n }\n else {\n __cache = Cache.getInstance(bbox, sx1, sy1);\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 else {\n node.__limitCache = false;\n }\n let {\n [OVERFLOW]: overflow,\n [FILTER]: filter,\n [MIX_BLEND_MODE]: mixBlendMode,\n } = __computedStyle;\n let isMbm = isValidMbm(mixBlendMode);\n let __domParent = node.__domParent;\n let isPpt = !isE(__domParent && __domParent.__perspectiveMatrix) || tf.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 || isMbm\n || isOverflow\n || isPpt) {\n mergeList.push({\n i,\n lv,\n total,\n node,\n hasMask,\n });\n }\n }\n }\n let limitHash = {};\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 mergeList.forEach(item => {\n let {\n i,\n lv,\n total,\n node,\n hasMask,\n } = item;\n let {\n __limitCache,\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) || tf.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(tf.isPerspectiveMatrix(parent.__matrix)) {\n pptHash[idx] = true;\n }\n parent = parent.__domParent;\n if(parent && parent.__perspectiveMatrix) {\n pptHash[idx] = true;\n }\n }\n if(!pptHash[i] && !hasMask && !filter.length && !(overflow === 'hidden' && total) && !node.__cacheAsBitmap) {\n return;\n }\n }\n let {\n __cache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n __cacheOverflow,\n } = node;\n let needGen;\n // 可能没变化,比如被遮罩节点、filter变更等\n if(!__cacheTotal || !__cacheTotal.available) {\n let [limit, res] = genTotalWebgl(renderMode, gl, texCache, node, i, total || 0, __structs, __cache, __limitCache, width, height);\n __cacheTotal = res;\n needGen = true;\n __limitCache = limit;\n // 返回的limit包含各种情况超限,一旦超限,只能生成临时cacheTotal不能保存\n if(!__limitCache) {\n node.__cacheTotal = res;\n }\n }\n // 即使超限,也有total结果\n let target = __cacheTotal;\n if(overflow === 'hidden') {\n if(!__cacheOverflow || !__cacheOverflow.available || needGen) {\n let temp = genOverflowWebgl(gl, texCache, node, target, width, height);\n if(temp) {\n target = temp;\n needGen = true;\n if(!__limitCache) {\n node.__cacheOverflow = target;\n }\n }\n }\n if(__cacheOverflow && __cacheOverflow.available) {\n target = __cacheOverflow;\n }\n }\n if(filter.length) {\n if(!__cacheFilter || !__cacheFilter.available || needGen) {\n let old = target;\n target = genFilterWebgl(gl, texCache, node, target, filter, width, height);\n if(target !== old) {\n needGen = true;\n if(!__limitCache) {\n node.__cacheFilter = target;\n }\n }\n }\n if(__cacheFilter && __cacheFilter.available) {\n target = __cacheFilter;\n }\n }\n if(hasMask && (!__cacheMask || !__cacheMask.available || needGen)) {\n target = genMaskWebgl(gl, texCache, node, target, width, height, lv, __structs);\n if(!__limitCache) {\n node.__cacheMask = target;\n }\n }\n // 保存临时的局部根节点\n if(__limitCache) {\n limitHash[i] = target;\n }\n });\n }\n /**\n * 最后先序遍历一次应用__cacheTotal即可,没有的用__cache,以及剩下的超尺寸的和Text\n * 由于mixBlendMode的存在,需先申请个fbo纹理,所有绘制默认向该纹理绘制,最后fbo纹理再进入主画布\n * 前面循环时有记录是否出现mbm,只有出现才申请,否则不浪费直接输出到主画布\n * 超尺寸的要走无cache逻辑render,和canvas很像,除了离屏canvas超限,汇总total也会纹理超限\n */\n let n, frameBuffer, texture;\n if(hasMbm) {\n [n, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n }\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, __domParent = node.__domParent;\n let {\n __matrixEvent,\n __opacity,\n } = __domParent;\n if(__cache && __cache.available) {\n texCache.addTexAndDrawWhenLimit(gl, __cache, __opacity, __matrixEvent, cx, cy, 0, 0,true);\n }\n // 超限特殊处理,先生成画布尺寸大小的纹理然后原始位置绘制,超限一定有文字内容\n else if(node.__limitCache && __domParent.__computedStyle[VISIBILITY] !== 'hidden') {\n let c = inject.getCacheCanvas(width, height, '__$$OVERSIZE$$__');\n node.render(mode.CANVAS, c.ctx, 0, 0);\n let j = texCache.lockOneChannel();\n let texture = webgl.createTexture(gl, c.canvas, j);\n let mockCache = new MockCache(gl, texture, 0, 0, width, height, [0, 0, width, height]);\n texCache.addTexAndDrawWhenLimit(gl, mockCache, node.__opacity, node.__matrixEvent, cx, cy, 0, 0, true);\n texCache.refresh(gl, cx, cy, true);\n c.ctx.setTransform(1, 0, 0, 1, 0, 0);\n c.ctx.globalAlpha = 1;\n c.ctx.clearRect(0, 0, width, height);\n mockCache.release();\n texCache.releaseLockChannel(j);\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 __cache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n __cacheOverflow,\n __domParent,\n __matrix,\n } = node;\n let {\n [OPACITY]: opacity,\n [MIX_BLEND_MODE]: mixBlendMode,\n } = __computedStyle;\n let m = __matrix;\n if(__domParent) {\n opacity *= __domParent.__opacity;\n let pm = __domParent.__perspectiveMatrix;\n if(!isE(pm)) {\n m = multiply(pm, m);\n }\n m = multiply(__domParent.__matrixEvent, m);\n }\n node.__opacity = opacity;\n assignMatrix(node.__matrixEvent, m);\n // 有total的可以直接绘制并跳过子节点索引,忽略total本身,其独占用纹理单元,注意特殊不取cacheTotal,\n // 这种情况发生在只有overflow:hidden声明但无效没有生成__cacheOverflow的情况,\n // 因为webgl纹理单元缓存原因,所以不用cacheTotal防止切换性能损耗\n // 已取消,因为perspective需要进行独立上下文渲染\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal, __cache]);\n // total和自身cache的尝试,visibility不可见时没有cache\n if(target) {\n // 有mbm先刷新当前fbo,然后把后面这个mbm节点绘入一个新的等画布尺寸的fbo中,再进行2者mbm合成\n if(hasMbm && isValidMbm(mixBlendMode)) {\n texCache.refresh(gl, cx, cy, true);\n let [n2, frameBuffer2, texture2] = genFrameBufferWithTexture(gl, texCache, width, height);\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, m, cx, cy, 0, 0, true);\n texCache.refresh(gl, cx, cy, true);\n // 合成结果作为当前frameBuffer,以及纹理和单元,等于替代了当前画布作为绘制对象\n [n, frameBuffer, texture] = genMbmWebgl(gl, texCache, n, n2, frameBuffer, texture, mbmName(mixBlendMode), width, height);\n gl.deleteFramebuffer(frameBuffer2);\n gl.deleteTexture(texture2);\n }\n else {\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, m, cx, cy, 0, 0, true);\n }\n if(target !== __cache) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n else {\n // webgl特殊的外部钩子,比如粒子组件自定义渲染时调用\n node.render(renderMode, gl, 0, 0);\n gl.useProgram(gl.program);\n gl.viewport(0, 0, width, height);\n }\n }\n else if(limitHash.hasOwnProperty(i)) {\n let target = limitHash[i];\n if(hasMbm && isValidMbm(mixBlendMode)) {\n texCache.refresh(gl, cx, cy, true);\n let [n2, frameBuffer2, texture2] = genFrameBufferWithTexture(gl, texCache, width, height);\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, m, cx, cy, 0, 0, true);\n texCache.refresh(gl, cx, cy, true);\n // 合成结果作为当前frameBuffer,以及纹理和单元,等于替代了当前画布作为绘制对象\n [n, frameBuffer, texture] = genMbmWebgl(gl, texCache, n, n2, frameBuffer, texture, mbmName(mixBlendMode), width, height);\n gl.deleteFramebuffer(frameBuffer2);\n gl.deleteTexture(texture2);\n }\n else {\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, m, cx, cy, 0, 0, true);\n }\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n // webgl特殊的外部钩子,比如粒子组件自定义渲染时调用\n node.render(renderMode, gl, 0, 0);\n gl.useProgram(gl.program);\n gl.viewport(0, 0, width, height);\n }\n // 超限的情况,这里是普通单节点超限,没有合成total后再合成特殊cache如filter/mask/mbm之类的,\n // 直接按原始位置绘制到离屏canvas,再作为纹理绘制即可,特殊的在total那做过降级了\n else if(node.__limitCache && node.__hasContent) {\n let c = inject.getCacheCanvas(width, height, '__$$OVERSIZE$$__');\n node.render(mode.CANVAS, c.ctx, 0, 0);\n let j = texCache.lockOneChannel();\n let texture = webgl.createTexture(gl, c.canvas, j);\n let mockCache = new MockCache(gl, texture, 0, 0, width, height, [0, 0, width, height]);\n texCache.addTexAndDrawWhenLimit(gl, mockCache, opacity, m, cx, cy, 0, 0, true);\n texCache.refresh(gl, cx, cy, true);\n c.ctx.setTransform(1, 0, 0, 1, 0, 0);\n c.ctx.globalAlpha = 1;\n c.ctx.clearRect(0, 0, width, height);\n mockCache.release();\n texCache.releaseLockChannel(j);\n // webgl特殊的外部钩子,比如粒子组件自定义渲染时调用\n node.render(renderMode, gl, 0, 0);\n gl.useProgram(gl.program);\n gl.viewport(0, 0, width, height);\n }\n }\n }\n texCache.refresh(gl, cx, cy, true);\n // 有mbm时将汇总的fbo绘入主画布,否则本身就是到主画布无需多余操作\n if(hasMbm) {\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n texCache.releaseLockChannel(n);\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 let u_texture = gl.getUniformLocation(gl.program, 'u_texture');\n gl.uniform1i(u_texture, n);\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) {\n let { __structs, width, height } = root;\n let mergeList = [];\n /**\n * 先一遍先序遍历收集cacheAsBitmap的节点,说明这棵子树需要缓存,可能出现嵌套,深层级优先、后面优先\n * 可能遇到已有缓存没变化的,这时候不要收集忽略掉,没有缓存的走后面遍历普通渲染\n */\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 if(node.__cacheAsBitmap) {\n if(contain(__refreshLevel, CACHE | FT) || __refreshLevel >= REPAINT) {\n mergeList.push({\n i,\n lv,\n total,\n node,\n hasMask,\n });\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 * 这样保证子节点在前,后节点在前,后节点是为了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, node, i, lv, total || 0, __structs, hasMask, 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 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 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 __cacheOverflow,\n __domParent,\n __matrix,\n } = node;\n // 遮罩对象申请了个离屏,其第一个mask申请另外一个离屏mask2,开始聚集所有mask元素的绘制,\n // 这是一个十分特殊的逻辑,保存的index是最后一个节点的索引,OFFSCREEN_MASK2是最低优先级,\n // 这样当mask本身有filter时优先自身,然后才是OFFSCREEN_MASK2\n if(maskStartHash.hasOwnProperty(i)) {\n let { idx, hasMask, offscreenMask } = maskStartHash[i];\n let target = inject.getCacheCanvas(width, height, null, 'mask2');\n offscreenMask.mask = target; // 应用mask用到\n offscreenMask.isClip = node.__isClip;\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 opacity *= __domParent.__opacity;\n m = multiply(__domParent.__matrixEvent, m);\n }\n node.__opacity = opacity;\n assignMatrix(node.__matrixEvent, m);\n // 有cache声明从而有total的可以直接绘制并跳过子节点索,total生成可能会因超限而失败\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __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(isValidMbm(mixBlendMode)) {\n ctx.globalCompositeOperation = mbmName(mixBlendMode);\n }\n let { x, y, canvas, sx1, sy1, dbx, dby, width, height } = target;\n ctx.drawImage(canvas, x, y, width, height, sx1 - dbx, sy1 - dby, width, height);\n // total应用后记得设置回来\n ctx.globalCompositeOperation = 'source-over';\n // 父超限但子有total的时候,i此时已经增加到了末尾,也需要检查\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height, false);\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 ctx.globalAlpha = opacity;\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 if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height, false);\n }\n }\n }\n }\n}\n\nexport default {\n renderCanvas,\n renderSvg,\n renderWebgl,\n};\n\n","import webgl from './webgl';\nimport MockPage from './MockPage';\nimport inject from '../util/inject';\n\nclass TexCache {\n constructor(units) {\n this.__units = units; // 通道数量限制,8~16\n this.__pages = []; // 存当前page列表,通道数量8~16,缓存收留尽可能多的page\n this.__list = []; // 本次渲染暂存的数据,[cache, opacity, matrix, dx, dy]\n this.__channels = []; // 每个纹理通道记录还是个数组,下标即纹理单元,内容为Page\n this.__locks = []; // 锁定纹理单元列表,下标即纹理单元,内容true为锁定\n this.__lockUnits = 0;\n }\n\n /**\n * webgl每次绘制为添加纹理并绘制,此处尝试尽可能收集所有纹理贴图,以达到尽可能多的共享纹理,再一次性绘制\n * 收集的是Page对象(从cache中取得),里面包含了若干个节点的贴图,canvas本身是2的幂次方大小\n * webgl最少有8个纹理单元最多16个,因此存了一个列表来放这些Page的canvas,刷新后清空,但纹理通道映射记录保留\n * 当8个纹理单元全部满了,进行绘制并清空这个队列,外部主循环结束时也会检查队列是否还有余留并绘制\n * 初始调用队列为空,存入Page对象,后续调用先查看是否存在以便复用,再决定是否存入Page,直到8个满了\n * Page上存有update表示是否更新,每次cache绘制时会变true,以此表示是否有贴图更新,删除可以忽视\n * 还需要一个记录上次纹理通道使用哪个Page的canvas的地方,即映射,清空后队列再次添加时,如果Page之前被添加过,\n * 此次又被添加且没有变更update,可以直接复用上次的纹理单元号且无需再次上传纹理,节省性能\n * 后续接入局部纹理更新也是复用单元号,如果update变更可以选择局部上传纹理而非整个重新上传\n * 判断上传的逻辑在收集满8个后绘制前进行,因为添加队列过程中可能会变更Page及其update\n * @param gl\n * @param cache\n * @param opacity\n * @param matrix\n * @param cx\n * @param cy\n * @param dx\n * @param dy\n * @param revertY\n */\n addTexAndDrawWhenLimit(gl, cache, opacity, matrix, cx, cy, dx = 0, dy = 0, revertY) {\n let pages = this.__pages;\n let list = this.__list;\n let page = cache.page;\n let i = pages.indexOf(page);\n // 找到说明已有page在此索引的通道中,记录下来info\n if(i > -1) {\n list.push([cache, opacity, matrix, dx, dy]);\n }\n // 找不到说明是新的纹理贴图,此时看是否超过纹理单元限制,超过则刷新绘制并清空,然后/否则 存入纹理列表\n else {\n i = pages.length;\n if(i >= this.__units - this.__lockUnits) {\n // 绘制且清空,队列索引重新为0\n this.refresh(gl, cx, cy, revertY);\n }\n pages.push(page);\n list.push([cache, opacity, matrix, dx, dy]);\n }\n }\n\n /**\n * 刷新\n * @param gl\n * @param cx\n * @param cy\n * @param revertY\n */\n refresh(gl, cx, cy, revertY) {\n let pages = this.__pages;\n let list = this.__list;\n // 防止空调用刷新,struct循环结尾会强制调用一次防止有未渲染的\n if(pages.length) {\n let channels = this.channels;\n let locks = this.locks;\n // 先将上次渲染的纹理单元使用的Page形成一个hash,键为page的uuid,值为纹理单元\n let lastHash = {};\n channels.forEach((item, i) => {\n if(item) {\n let uuid = item.uuid;\n lastHash[uuid] = i;\n }\n });\n let units = this.__units;\n // 再遍历,查找相同的Page并保持其使用的纹理单元不变,存入相同索引下标oldList,不同的按顺序收集放newList\n let oldList = new Array(units), newList = [];\n pages.forEach(page => {\n let uuid = page.uuid;\n if(lastHash.hasOwnProperty(uuid)) {\n let index = lastHash[uuid];\n oldList[index] = page;\n }\n else {\n newList.push(page);\n }\n });\n /**\n * 以oldList为基准,将newList依次存入oldList中\n * 优先使用未用过的纹理单元,以便用过的可能下次用到无需重新上传\n * 找不到未用过的后,尝试NRU算法,优先淘汰最近未使用的Page,相等则尺寸小的\n */\n if(newList.length) {\n // 先循环找空的,oldList空且channels空且locks空\n for(let i = 0; i < units; i++) {\n if(!oldList[i] && !channels[i] &&!locks[i]) {\n oldList[i] = newList.shift();\n if(!newList.length) {\n break;\n }\n }\n }\n let len = newList.length;\n if(len) {\n // 按时间排序已使用channel且未被当前占用的,以便淘汰最久未使用的\n let cl = [];\n for(let i = 0; i < units; i++) {\n if(!oldList[i] && !locks[i]) {\n cl.push([i, channels[i]]);\n }\n }\n cl.sort(function(a, b) {\n if(a[1].time !== b[1].time) {\n return (a[1].time || 0) - (b[1].time || 0);\n }\n if(a[1].fullSize !== b[1].fullSize) {\n return a[1].fullSize - b[1].fullSize;\n }\n return a[0] - b[0];\n });\n // cl靠前是时间小尺寸小的,优先使用替换\n for(let i = 0; i < len; i++) {\n oldList[cl[i][0]] = newList[i];\n }\n }\n }\n /**\n * 对比上帧渲染的和这次纹理单元情况,Page相同且!update可以省略更新,其它均重新赋值纹理\n * 后续局部更新Page相同但有update,会出现没有上帧的情况如初始渲染,此时先创建纹理单元再更新\n * 将新的数据赋给老的,可能新的一帧使用的少于上一帧,老的没用到的需继续保留\n */\n let hash = {};\n for(let i = 0, len = oldList.length; i < len; i++) {\n let page = oldList[i];\n // 可能为空,不满的情况下前面单元保留老tex先用的后面的单元\n if(!page) {\n continue;\n }\n let last = channels[i];\n if(!last || last !== page || page.update) {\n // page可能为一个已有fbo纹理,或者贴图\n if(page instanceof MockPage) {\n webgl.bindTexture(gl, page.texture, i);\n }\n else {\n // 可能老的先删除,注意只删Page,MockPage是fbo生成的texture即total缓存不能自动清除\n if(last && !(last instanceof MockPage)) {\n gl.deleteTexture(last.texture);\n }\n page.texture = webgl.createTexture(gl, page.canvas, i);\n }\n channels[i] = page;\n }\n hash[page.uuid] = i;\n // 标识没有更新,以及最后使用时间\n page.update = false;\n page.time = inject.now();\n }\n // 再次遍历开始本次渲染并清空\n webgl.drawTextureCache(gl, list, hash, cx, cy, revertY);\n pages.splice(0);\n list.splice(0);\n }\n }\n\n findExistTexChannel(page) {\n return this.channels.indexOf(page);\n }\n\n /**\n * 获取并锁定一个纹理单元优先使用空的,其次最久未使用的\n * @returns {number|*}\n */\n lockOneChannel() {\n // 优先返回空单元\n let channels = this.channels;\n let locks = this.locks;\n for(let i = 0; i < this.__units; i++) {\n if(!channels[i] && !locks[i]) {\n locks[i] = true;\n this.__lockUnits++;\n return i;\n }\n }\n // 根据NRU返回最久未使用的\n let units = this.__units;\n let cl = [];\n for(let i = 0; i < units; i++) {\n if(!locks[i]) {\n cl.push([i, channels[i]]);\n }\n }\n if(cl.length) {\n cl.sort(function(a, b) {\n if(a[1].time !== b[1].time) {\n return (a[1].time || 0) - (b[1].time || 0);\n }\n if(a[1].fullSize !== b[1].fullSize) {\n return a[1].fullSize - b[1].fullSize;\n }\n return a[0] - b[0];\n });\n let i = cl[0][0];\n channels[i] = null;\n locks[i] = true;\n this.__lockUnits++;\n return i;\n }\n throw new Error('No free texture unit');\n }\n\n /**\n * 释放掉i单元,并且设置内容到缓存channel中\n * @param i\n * @param setToChannel\n */\n releaseLockChannel(i, setToChannel) {\n if(this.locks[i]) {\n this.locks[i] = false;\n this.__lockUnits--;\n if(setToChannel) {\n this.channels[i] = setToChannel;\n }\n }\n }\n\n // 指定锁定一个单元\n lockChannel(i) {\n let channels = this.channels;\n let locks = this.locks;\n if(!locks[i]) {\n channels[i] = null;\n locks[i] = true;\n this.__lockUnits++;\n }\n }\n\n /**\n * 释放纹理单元\n * @param gl\n */\n release(gl) {\n this.channels.forEach(item => {\n if(item) {\n gl.deleteTexture(item.texture);\n }\n });\n }\n\n get channels() {\n return this.__channels;\n }\n\n get locks() {\n return this.__locks;\n }\n\n get last() {\n let list = this.__list, len = list.length;\n if(len) {\n return list[len - 1];\n }\n }\n}\n\nexport default TexCache;\n","import 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 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 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 webgl from '../gl/webgl';\nimport ca from '../gl/ca';\nimport TexCache from '../gl/TexCache';\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, isObject, isFunction } = util;\nconst { PX, INHERIT } = unit;\nconst {\n contain,\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} = level;\nconst { isGeom } = change;\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.__taskUp = [];\n this.__task = [];\n this.__ref = {};\n this.__reflowList = [{ node: this }]; // 初始化填自己,第一次布局时复用逻辑完全重新布局\n this.__animateController = new Controller();\n Event.mix(this);\n this.__updateHash = {};\n this.__uuid = uuid++;\n this.__rlv = REBUILD; // 每次刷新最大lv\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.__children = builder.initRoot(this.__cd, this);\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 this.__defs = this.dom.__defs || Defs.getInstance(this.__uuid);\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(this.tagName === 'canvas') {\n this.__ctx = this.__dom.getContext('2d', params);\n this.__renderMode = mode.CANVAS;\n }\n else if(this.tagName === 'svg') {\n this.__renderMode = mode.SVG;\n }\n else if(this.tagName === 'webgl') {\n let gl = this.__ctx = this.__dom.getContext('webgl', params);\n this.__renderMode = mode.WEBGL;\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, vertexMask, fragmentOverflow);\n gl.programCm = webgl.initShaders(gl, vertexCm, fragmentCm);\n gl.programDs = webgl.initShaders(gl, vertexDs, fragmentDs);\n gl.useProgram(gl.program);\n // 第一次渲染生成纹理缓存管理对象,收集渲染过程中生成的纹理并在gl纹理单元满了时进行绘制和清空,减少texImage2d耗时问题\n const MAX_TEXTURE_IMAGE_UNITS = Math.min(16, gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS));\n this.__texCache = new TexCache(MAX_TEXTURE_IMAGE_UNITS);\n }\n this.refresh(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 __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 refresh(isFirst) {\n // this.__hookTask = null;\n let { isDestroyed, renderMode, ctx, defs } = this;\n if(isDestroyed) {\n return;\n }\n defs.clear();\n // 首次递归测量整树的继承,后续更改各自更新机制做,防止每次整树遍历;root检查首次直接做,后续在checkUpdate()中插入\n if(isFirst) {\n this.__reLayout();\n }\n // 非首次刷新如果没有更新则无需继续\n // else if(!this.__checkUpdate(renderMode, ctx, width, height)) {\n // return;\n // }\n // this.__checkReflow(width, height);\n if(this.props.noRender) {\n return;\n }\n if(renderMode === mode.CANVAS) {\n this.__clear(ctx, renderMode);\n struct.renderCanvas(renderMode, ctx, this);\n }\n // svg的特殊diff需要\n else if(renderMode === mode.SVG) {\n struct.renderSvg(renderMode, defs, this, isFirst);\n let nvd = this.virtualDom;\n nvd.defs = defs.value;\n if(this.dom.__vd) {\n // console.log(this.dom.__vd);\n // console.log(nvd);\n domDiff(this.dom, this.dom.__vd, nvd);\n }\n else {\n this.dom.innerHTML = util.joinVirtualDom(nvd);\n }\n this.dom.__vd = nvd;\n this.dom.__defs = defs;\n }\n else if(renderMode === mode.WEBGL) {\n this.__clear(ctx, renderMode);\n struct.renderWebgl(renderMode, ctx, this);\n }\n // 特殊cb,供小程序绘制完回调使用\n // if(isFunction(cb)) {\n // cb();\n // }\n this.emit(Event.REFRESH, this.__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.__texCache && gl) {\n this.__texCache.release(gl);\n if(gl.program) {\n gl.deleteShader(gl.program.vertexShader);\n gl.deleteShader(gl.program.fragmentShader);\n gl.deleteProgram(gl.program);\n }\n if(gl.programMask) {\n gl.deleteShader(gl.programMask.vertexShader);\n gl.deleteShader(gl.programMask.fragmentShader);\n gl.deleteProgram(gl.programMask);\n }\n if(gl.programOverflow) {\n gl.deleteShader(gl.programOverflow.vertexShader);\n gl.deleteShader(gl.programOverflow.fragmentShader);\n gl.deleteProgram(gl.programOverflow);\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 addRefreshTask(cb) {\n let { taskUp, isDestroyed } = this;\n if(isDestroyed) {\n return;\n }\n // 第一个添加延迟侦听,后续放队列等待一并执行\n if(!taskUp.length) {\n let clone;\n frame.nextFrame({\n __before: diff => {\n if(this.isDestroyed) {\n return;\n }\n clone = taskUp.splice(0);\n // 前置一般是动画计算此帧样式应用,然后刷新后出发frame事件,图片加载等同\n if(clone.length) {\n clone.forEach((item, i) => {\n if(isObject(item) && isFunction(item.__before)) {\n item.__before(diff);\n }\n });\n }\n },\n __after: diff => {\n if(this.isDestroyed) {\n return;\n }\n clone.forEach(item => {\n if(isObject(item) && isFunction(item.__after)) {\n item.__after(diff);\n }\n else if(isFunction(item)) {\n item(diff);\n }\n });\n }\n });\n this.__frameHook();\n }\n if(taskUp.indexOf(cb) === -1) {\n taskUp.push(cb);\n }\n }\n\n // addForceRefreshTask(cb) {\n // this.__hasRootUpdate = true;\n // this.addRefreshTask(cb);\n // }\n\n delRefreshTask(cb) {\n if(!cb) {\n return;\n }\n let { taskUp } = this;\n for(let i = 0, len = taskUp.length; i < len; i++) {\n if(taskUp[i] === cb) {\n taskUp.splice(i, 1);\n break;\n }\n }\n }\n\n getTargetAtPoint(x, y, includeIgnore) {\n function scan(vd, x, y, path, zPath) {\n let { __sx1, __sy1, 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 __sx1, __sy1,\n __sx1 + offsetWidth, __sy1,\n __sx1 + offsetWidth, __sy1 + offsetHeight,\n __sx1, __sy1 + 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, o) {\n if(node instanceof Component) {\n node = node.shadowRoot;\n }\n let {\n keys,\n focus,\n addDom,\n removeDom,\n } = o;\n let {\n computedStyle,\n currentStyle,\n cacheStyle,\n __cacheProps,\n __isMask,\n __domParent,\n } = node;\n let hasZ, hasVisibility, hasColor, hasDisplay, hasTsColor, hasTsWidth, hasTsOver;\n let lv = focus || NONE;\n // 清空对应改变的cacheStyle\n if(keys) {\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([TOP, RIGHT, BOTTOM, LEFT].indexOf(k) > -1\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 // 没有变化,add/remove强制focus\n // 本身节点为none,变更无效,此时没有display变化,add/remove在操作时已经判断不会进入\n if(lv === NONE || computedStyle[DISPLAY] === 'none' && !hasDisplay) {\n if(isFunction(o.cb)) {\n o.cb();\n }\n return;\n }\n // transform变化清空重算,比较特殊,MATRIX的cache需手动清理\n if(contain(lv, TF)) {\n cacheStyle[MATRIX] = computedStyle[TRANSFORM] = undefined;\n }\n // mask需清除遮罩对象的缓存\n if(__isMask) {\n let prev = node.__prev;\n while(prev && (prev.__isMask)) {\n prev = prev.__prev;\n }\n if(prev && prev.__cacheMask) {\n prev.__cacheMask.release();\n prev.__refreshLevel |= CACHE;\n }\n }\n let isRp = isRepaint(lv);\n if(isRp) {\n // dom在>=REPAINT时total失效,svg的Geom比较特殊\n let need = lv >= REPAINT;\n if(need) {\n if(node.__cache) {\n node.__cache.release();\n }\n node.__calStyle(lv, currentStyle, computedStyle, cacheStyle);\n node.__calPerspective(currentStyle, computedStyle, cacheStyle);\n }\n // < REPAINT特殊的优化computedStyle计算\n else {\n if(contain(lv, PPT)) {\n node.__calPerspective(currentStyle, computedStyle, cacheStyle);\n }\n if(contain(lv, TRANSFORM_ALL)) {\n node.__calMatrix(lv, currentStyle, computedStyle, cacheStyle);\n }\n if(contain(lv, OP)) {\n computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n if(contain(lv, FT)) {\n node.__calFilter(currentStyle, computedStyle, cacheStyle);\n }\n if(contain(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共用,TODO:优化判断ppt\n if(need || contain(lv, PPT)) {\n if(node.__cacheTotal) {\n node.__cacheTotal.release();\n }\n if(node.__cacheMask) {\n node.__cacheMask.release();\n }\n if(node.__cacheOverflow) {\n node.__cacheOverflow.release();\n }\n }\n // 特殊的filter清除cache\n if((need || contain(lv, FT)) && node.__cacheFilter) {\n node.__cacheFilter.release();\n }\n // 向上清除cache汇总缓存信息,过程中可能会出现重复,根据refreshLevel判断,reflow已经自己清过了\n let p = __domParent;\n while(p) {\n if(contain(p.__refreshLevel, CACHE | REPAINT | REFLOW)) {\n break;\n }\n p.__refreshLevel |= CACHE;\n if(p.__cacheTotal) {\n p.__cacheTotal.release();\n }\n if(p.__cacheFilter) {\n p.__cacheFilter.release();\n }\n if(p.__cacheMask) {\n p.__cacheMask.release();\n }\n if(p.__cacheOverflow) {\n p.__cacheOverflow.release();\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 node.__cacheTotal.release();\n reflow.clearSvgCache(__domParent);\n }\n }\n }\n else {\n let top = reflow.checkTop(this, node, addDom, removeDom);\n if(top === this) {\n this.__reLayout();\n if(removeDom) {\n let temp = node;\n while(temp.isShadowRoot) {\n temp = temp.__host;\n temp.__destroy();\n }\n }\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 }\n node.__refreshLevel |= lv;\n if(addDom || removeDom) {\n this.__rlv |= REBUILD;\n }\n else {\n this.__rlv |= lv;\n }\n if(o.cb && !isFunction(o.cb)) {\n o.cb = null;\n }\n this.__frameRefresh(o.cb);\n }\n\n // 异步进行root刷新操作,多次调用缓存结果,刷新成功后回调\n __frameRefresh(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.refresh();\n list.forEach(item => {\n item && item();\n });\n });\n }\n this.__task.push(cb);\n }\n\n __clear(ctx, renderMode) {\n if(renderMode === mode.CANVAS) {\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 else if(renderMode === mode.WEBGL) {\n ctx.clearColor(0, 0, 0, 0);\n ctx.clear(ctx.COLOR_BUFFER_BIT);\n }\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 taskUp() {\n return this.__taskUp;\n }\n\n get ref() {\n return this.__ref;\n }\n\n get animateController() {\n return this.__animateController;\n }\n\n get texCache() {\n return this.__texCache;\n }\n}\n\nexport default Root;\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(x1, y1, x2, y2, controlA, controlB, num, start = 0, end = 1) {\n if(start === 0 && end === 1) {\n return [x1, y1, x2, y2, 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 [[x1, y1], controlA, controlB, [x2, y2]] = bezier.sliceBezier2Both([[x1, y1], controlA, controlB, [x2, y2]], start, end);\n }\n else if(num === 2) {\n [[x1, y1], controlB, [x2, y2]] = bezier.sliceBezier2Both([[x1, y1], controlB, [x2, y2]], start, end);\n }\n else if(num === 1) {\n [[x1, y1], controlA, [x2, y2]] = bezier.sliceBezier2Both([[x1, y1], controlA, [x2, y2]], start, end);\n }\n else {\n let a = x2 - x1;\n let b = y2 - y1;\n x1 += a * start;\n y1 += b * start;\n x2 += a * (1 - end);\n y2 += b * (1 - end);\n }\n return [x1, y1, x2, y2, controlA, controlB];\n}\n\nclass Line extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // x1,y1和x2,y2表明线段的首尾坐标,control表明控制点坐标\n if(this.isMulti) {\n this.__x1 = [0];\n this.__y1 = [0];\n this.__x2 = [1];\n this.__y2 = [1];\n this.__controlA = [[]];\n this.__controlB = [[]];\n this.__start = [0];\n this.__end = [1];\n if(Array.isArray(props.x1)) {\n this.__x1 = props.x1.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.x1)) {\n this.__x1 = [parseFloat(props.x1) || 0];\n }\n if(Array.isArray(props.y1)) {\n this.__y1 = props.y1.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.y1)) {\n this.__y1 = [parseFloat(props.y1) || 0];\n }\n if(Array.isArray(props.x2)) {\n this.__x2 = props.x2.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.x2)) {\n this.__x2 = [parseFloat(props.x2) || 0];\n }\n if(Array.isArray(props.y2)) {\n this.__y2 = props.y2.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.y2)) {\n this.__y2 = [parseFloat(props.y2) || 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.__x1.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.__x1.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.__x1.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.__x1.map(() => v);\n }\n }\n else {\n this.__x1 = this.__y1 = this.__start = 0;\n this.__x2 = this.__y2 = this.__end = 1;\n this.__controlA = [];\n this.__controlB = [];\n if(!isNil(props.x1)) {\n this.__x1 = parseFloat(props.x1) || 0;\n }\n if(!isNil(props.y1)) {\n this.__y1 = parseFloat(props.y1) || 0;\n }\n if(!isNil(props.x2)) {\n this.__x2 = parseFloat(props.x2) || 0;\n }\n if(!isNil(props.y2)) {\n this.__y2 = parseFloat(props.y2) || 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 ['x1', 'x2'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = reBuild(this[k], originX, width, isMulti);\n }\n });\n ['y1', 'y2'].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 sx3,\n sy3,\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(sx3, sy3);\n if(rebuild && renderMode === mode.SVG) {\n let d = '';\n if(isMulti) {\n __cacheProps.x1.forEach((xa, i) => {\n let xb = __cacheProps.x2[i];\n let ya = __cacheProps.y1[i];\n let yb = __cacheProps.y2[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 { x1, y1, x2, y2, controlA, controlB, start, end } = __cacheProps;\n if(start !== 0 || end !== 1) {\n [x1, y1, x2, y2, controlA, controlB] = getNewPoint(x1, y1, x2, y2, controlA, controlB, curve, start, end, __cacheProps.len);\n }\n d = painter.svgLine(x1, y1, x2, y2, 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.x1.forEach((xa, i) => {\n let xb = __cacheProps.x2[i];\n let ya = __cacheProps.y1[i];\n let yb = __cacheProps.y2[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 { x1, y1, x2, y2, controlA, controlB, start, end } = __cacheProps;\n if(start !== 0 || end !== 1) {\n [x1, y1, x2, y2, controlA, controlB] = getNewPoint(x1, y1, x2, y2, controlA, controlB, curve, start, end, __cacheProps.len);\n }\n painter.canvasLine(ctx, x1, y1, x2, y2, 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 x1() {\n return this.getProps('x1');\n }\n\n get y1() {\n return this.getProps('y1');\n }\n\n get x2() {\n return this.getProps('x2');\n }\n\n get y2() {\n return this.getProps('y2');\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 __sx3: originX, __sy3: originY,\n computedStyle: {\n [STROKE_WIDTH]: strokeWidth,\n },\n } = this;\n this.buildCache(originX, originY);\n let { x1, y1, x2, y2, 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 x1 = [x1];\n x2 = [x2];\n y1 = [y1];\n y2 = [y2];\n controlA = [controlA];\n controlB = [controlB];\n }\n x1.forEach((xa, i) => {\n let ya = y1[i];\n let xb = x2[i];\n let yb = y2[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], xb - half);\n bbox[1] = Math.min(bbox[1], ya - half);\n bbox[1] = Math.min(bbox[1], yb - half);\n bbox[2] = Math.max(bbox[2], xa + half);\n bbox[2] = Math.max(bbox[2], xb + half);\n bbox[3] = Math.max(bbox[3], ya + half);\n bbox[3] = Math.max(bbox[3], yb + half);\n }\n else if(isNil(ca) || ca.length < 2) {\n let bezierBox = bezier.bboxBezier(xa, ya, cb[0], cb[1], xb, yb);\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, ya, ca[0], ca[1], xb, yb);\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, ya, ca[0], ca[1], cb[0], cb[1], xb, yb);\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","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 __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.sx3, res.sy3);\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 __sx3: originX, __sy3: 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 __sx3: originX, __sy3: 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.sx3, res.sy3);\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 __sx3: originX, __sy3: 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 __sx3: originX, __sy3: 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 __sx3: originX, __sy3: 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 util from './util';\nimport $$type from './$$type';\n\nconst { TYPE_VD, TYPE_GM, TYPE_CP } = $$type;\n\n/**\n * 2. 打平children中的数组,变成一维\n * 3. 合并相连的Text节点,即string内容\n */\nfunction flattenJson(parent) {\n if(Array.isArray(parent)) {\n return parent.map(item => flattenJson(item));\n }\n else if(!parent || [TYPE_VD, TYPE_GM, TYPE_CP].indexOf(parent.$$type) === -1 || !Array.isArray(parent.children)) {\n return parent;\n }\n let list = [];\n traverseJson(list, parent.children, {\n lastText: null,\n });\n parent.children = list;\n return parent;\n}\n\nfunction traverseJson(list, children, options) {\n if(Array.isArray(children)) {\n children.forEach(item => {\n traverseJson(list, item, options);\n });\n }\n else if(children && (children.$$type === TYPE_VD || children.$$type === TYPE_GM)) {\n if(['canvas', 'svg', 'webgl'].indexOf(children.tagName) > -1) {\n throw new Error('Can not nest canvas/svg/webgl');\n }\n if(children.$$type === TYPE_VD) {\n flattenJson(children);\n }\n list.push(children);\n options.lastText = null;\n }\n else if(children && children.$$type === TYPE_CP) {\n list.push(children);\n // 强制component即便返回text也形成一个独立的节点,合并在layout布局中做\n options.lastText = null;\n }\n // 排除掉空的文本,连续的text合并\n else if(!util.isNil(children) && children !== '') {\n if(options.lastText !== null) {\n list[list.length - 1] = options.lastText += children;\n }\n else {\n list.push(children);\n }\n }\n}\n\nexport default flattenJson;\n","import Xom from '../node/Xom';\nimport Dom from '../node/Dom';\nimport Component from '../node/Component';\nimport util from './util';\nimport inject from './inject';\nimport flatten from './flatten';\nimport $$type from './$$type';\n\nconst { TYPE_VD, TYPE_GM, TYPE_CP } = $$type;\n\nlet updateList = [];\nlet removeList = [];\n\nconst KEY_FLAG = {};\n\n/**\n * setState后刷新前先根遍历检查组件开始进行shouldComponentUpdate判断\n */\nfunction check(vd) {\n if(vd instanceof Dom) {\n vd.children.forEach(child => {\n if(child instanceof Dom) {\n check(child);\n }\n // 当组件有setState更新时,从叶子到根链路会标识__hasCpUpdate,以便节约遍历成本忽略那些没变化的链路\n else if(child instanceof Component && child.__hasCpUpdate) {\n child.__hasCpUpdate = false;\n checkCp(child, child.props);\n }\n });\n }\n // 高阶组件会进入此分支,被父组件调用\n else if(vd instanceof Component && vd.__hasCpUpdate) {\n vd.__hasCpUpdate = false;\n checkCp(vd, vd.props);\n }\n}\n\n/**\n * 检查cp是否有state变更,注意递归检查时需要看shadow不能看shadowRoot,\n * 否则高阶组件会被跳过,其更新无法触发update生命周期\n * @param cp\n * @param nextProps\n * @param forceCheckUpdate,被render()后的json的二级组件,发现props有变更强制检查更新,否则可以跳过\n */\nfunction checkCp(cp, nextProps, forceCheckUpdate) {\n if(cp.__nextState || forceCheckUpdate) {\n let shouldUpdate;\n if(util.isFunction(cp.shouldComponentUpdate)) {\n shouldUpdate = cp.shouldComponentUpdate(nextProps, cp.__nextState || cp.state);\n }\n else {\n // 没有默认更新\n shouldUpdate = true;\n }\n if(shouldUpdate) {\n updateCp(cp, nextProps, cp.__nextState || cp.state);\n }\n // 不更新则递归检查子tree的cp\n else {\n cp.props = nextProps;\n cp.state = cp.__nextState || cp.state;\n check(cp.shadow);\n }\n }\n else {\n check(cp.shadow);\n }\n}\n\n/**\n * 更新组件的props和state,清空__nextState\n * @param cp\n * @param props\n * @param state\n */\nfunction updateCp(cp, props, state) {\n cp.props = props;\n cp.state = state;\n cp.__nextState = null; // 同步在refresh前清除component的新state标识,这样frame动画在after回调中可以新设\n let oldS = cp.shadow;\n let oldSr = cp.shadowRoot;\n let oldJson = cp.__cd;\n let json = flatten(cp.render());\n // 对比新老render()返回的内容,更新后重新生成sr\n diffSr(oldS, oldJson, json);\n cp.__init(json);\n // 为了局部dom布局需要知道老的css信息\n let sr = cp.shadowRoot;\n if(sr instanceof Xom) {\n [\n '__outerWidth',\n '__outerHeight',\n '__sx',\n '__sy',\n '__sx2',\n '__sx3',\n '__sx4',\n '__sx5',\n '__sx6',\n '__sy2',\n '__sy3',\n '__sy4',\n '__sy5',\n '__sy6',\n ].forEach(k => {\n sr[k] = oldSr[k];\n });\n sr.__computedStyle = oldSr.computedStyle;\n }\n [\n '__x',\n '__y',\n '__width',\n '__height',\n '__sx1', // text和xom\n '__sy1',\n '__layoutData',\n '__parent',\n '__domParent',\n ].forEach(k => {\n sr[k] = oldSr[k];\n });\n sr.__domParent = oldSr.__domParent;\n sr.__struct = oldSr.__struct;\n updateList.push(cp);\n // 老的需回收,diff会生成新的dom,唯一列外是cp直接返回一个没变化的cp\n if(!util.isObject(json) || !json.__placeholder) {\n removeList.push(oldS);\n }\n // 子组件使用老的json时标识,更新后删除,render()返回空会没json对象\n if(json && json.__placeholder) {\n delete json.__placeholder;\n }\n if(json && json.__inheritAnimate) {\n delete json.__inheritAnimate;\n }\n if(json && json.__animateRecords) {\n delete json.__animateRecords;\n }\n // 高阶组件时需判断,子组件更新后生成新的sr,父组件的sr/host需要同时更新引用\n let host = cp.host;\n while(host) {\n if(host.shadow === cp) {\n host.__shadowRoot = sr;\n sr.__hostRoot = host;\n cp = host;\n host = host.host;\n }\n else {\n break;\n }\n }\n}\n\n/**\n * 非一级组件sr进行对比,key相同的无需重新生成且继承动画\n * @param vd\n * @param oj oldJson\n * @param nj\n */\nfunction diffSr(vd, oj, nj) {\n // 先遍历检查key相同的,将没有变化的key暂存下来,深度优先,这样叶子节点出现在前面,当key的叶子也有key时,确保叶子先对比\n let ojk = getKeyHash(oj, {}, vd);\n let njk = getKeyHash(nj, {});\n let keyList = [];\n let cpList = [];\n // 先对比key对应的节点,如果新老有一方对不上则落空\n Object.keys(ojk).forEach(k => {\n let o = ojk[k];\n let n = njk[k];\n if(!n) {\n o.json.key = KEY_FLAG;\n }\n });\n Object.keys(njk).forEach(k => {\n let o = ojk[k];\n let n = njk[k];\n // 有可能老的没有这个key,新key落空\n if(!o) {\n n.json.key = KEY_FLAG;\n return;\n }\n let oj = o.json;\n let nj = n.json;\n let vd = o.vd;\n // 相同class的组件进行对比替换\n if(oj.$$type === TYPE_CP && nj.$$type === TYPE_CP) {\n if(oj.klass === nj.klass) {\n // 对比props和children看是否全等,是则直接替换新json类型为占位符,引用老vd,否则强制更新\n diffCp(oj, nj, vd);\n // 标识对比过了\n oj.key = nj.key = KEY_FLAG;\n // 老的sr里需删除这个vd,因为老sr会回收\n cpList.push(vd);\n }\n }\n // 相同类型的vd进行对比继承动画\n else if(oj.$$type === nj.$$type && oj.tagName === nj.tagName) {\n // 需判断矢量标签mutil是否相等\n if(nj.$$type !== TYPE_GM || oj.props.multi === nj.props.multi) {\n nj.__inheritAnimate = vd;\n }\n oj.key = nj.key = KEY_FLAG;\n // key相同的dom暂存下来\n if(nj.$$type === TYPE_VD) {\n keyList.push({\n vd,\n oj,\n nj,\n });\n }\n }\n });\n // key相同的dom对比children,下面非key逻辑就不做了\n keyList.forEach(item => {\n diffChildren(item.vd, item.oj, item.nj);\n });\n // 整体tree进行对比\n diffChild(vd, oj, nj);\n // 已更新的cp需被老sr删除,因为老sr会回收,而此cp继续存在于新sr中不能回收,这里处理key的\n cpList.forEach(vd => {\n removeCpFromOldTree(vd);\n });\n}\n\n/**\n * 递归检查dom的children,相同的无需重新生成,用PL类型占位符代替直接返回老vd\n * @param vd\n * @param oj\n * @param nj\n */\nfunction diffChild(vd, oj, nj) {\n if(util.isObject(nj)) {\n if(nj.$$type === TYPE_CP) {\n // key对比过了忽略\n if(nj.key === KEY_FLAG) {\n return;\n }\n // 相同class的组件处理\n if(oj && oj.$$type === nj.$$type && oj.klass === nj.klass) {\n diffCp(oj, nj, vd);\n // 已更新的cp需被老sr删除,因为老sr会回收,而此cp继续存在于新sr中不能回收\n removeCpFromOldTree(vd);\n }\n }\n else if(nj.$$type === TYPE_GM && oj && oj.$$type === TYPE_GM) {\n // $geom的multi必须一致\n if(oj.tagName === nj.tagName && oj.props.multi === nj.props.multi) {\n nj.__inheritAnimate = vd;\n }\n }\n // dom类型递归children\n else if(nj.$$type === TYPE_VD && oj && oj.$$type === TYPE_VD) {\n if(oj.tagName === nj.tagName) {\n nj.__inheritAnimate = vd;\n }\n diffChildren(vd, oj, nj);\n }\n }\n}\n\n/**\n * dom类型的vd对比children\n * @param vd\n * @param oj\n * @param nj\n */\nfunction diffChildren(vd, oj, nj) {\n let oc = oj.children;\n let nc = nj.children;\n let ol = oc.length;\n let nl = nc.length;\n let children = vd.children;\n for(let i = 0, of = 0, nf = 0, len = Math.min(ol, nl); i < len; i++) {\n let o = oc[i + of];\n let n = nc[i + nf];\n // 新老都是key直接跳过\n if(o.key === KEY_FLAG && n.key === KEY_FLAG) {\n }\n // 其中一个是key对比过了调整索引和长度\n else if(o.key === KEY_FLAG) {\n of++;\n i--;\n ol--;\n len = Math.min(ol, nl);\n }\n else if(n.key === KEY_FLAG) {\n nf++;\n i--;\n nl--;\n len = Math.min(ol, nl);\n }\n else {\n diffChild(children[i + of], o, n);\n }\n }\n // 长度不同增减的无需关注,新json创建cp有didMount,老vd会调用cp的destroy\n}\n\n/**\n * 根据json对比看cp如何更新,被render()后的json的二级组件对比才会出现\n * @param oj\n * @param nj\n * @param vd\n */\nfunction diffCp(oj, nj, vd) {\n // props全等,直接替换新json类型为占位符,引用老vd内容,无需重新创建,暂时存在json的placeholder上\n // 否则需要强制触发组件更新,包含setState内容\n nj.__placeholder = vd;\n let sr = vd.shadowRoot;\n // 对比需忽略on开头的事件,直接改老的引用到新的上,这样只变了on的话无需更新\n let exist = {};\n Object.keys(oj.props).forEach(k => {\n let v = oj.props[k];\n exist[k] = v;\n });\n Object.keys(nj.props).forEach(k => {\n let v = nj.props[k];\n if(/^on[a-zA-Z]/.test(k)) {\n oj.props[k] = v;\n let ex = exist[k];\n if(ex) {\n delete exist[k];\n if(ex !== v) {\n k = k.slice(2).toLowerCase();\n sr.listener[k] = v;\n }\n }\n else {\n k = k.slice(2).toLowerCase();\n sr.listener[k] = v;\n }\n }\n else if(/^on-[a-zA-Z\\d_$]/.test(k)) {\n oj.props[k] = v;\n let ex = exist[k];\n if(ex) {\n delete exist[k];\n if(ex !== v) {\n k = k.slice(2).toLowerCase();\n vd.off(k, exist[k]);\n vd.on(k, v);\n }\n delete exist[k];\n }\n else {\n k = k.slice(2).toLowerCase();\n vd.on(k, v);\n }\n }\n });\n // 新的少的事件取消\n Object.keys(exist).forEach(k => {\n let v = exist[k];\n if(/^on[a-zA-Z]/.test(k)) {\n nj.props[k] = v;\n k = k.slice(2).toLowerCase();\n delete sr.listener[k];\n }\n else if(/^on-[a-zA-Z\\d_$]/.test(k)) {\n nj.props[k] = v;\n k = k.slice(2).toLowerCase();\n vd.off(k, v);\n }\n });\n checkCp(vd, nj.props, !util.equal(oj.props, nj.props));\n}\n\n/**\n * 深度优先遍历json,将有key的记录在hash中,如果传入根vd,同步递归保存对应位置的vd\n * @param json\n * @param hash\n * @param vd\n * @returns {*}\n */\nfunction getKeyHash(json, hash, vd) {\n if(Array.isArray(json)) {\n json.forEach((item, i) => getKeyHash(item, hash, vd && vd[i]));\n }\n else if(util.isObject(json)) {\n if(json.$$type === TYPE_VD || json.$$type === TYPE_GM || json.$$type === TYPE_CP) {\n // 深度优先\n if(json.$$type === TYPE_VD) {\n getKeyHash(json.children, hash, vd && vd.children);\n }\n let key = json.props.key;\n if(!util.isNil(key) && key !== '') {\n // 重复key错误警告\n if(hash.hasOwnProperty(key)) {\n inject.warn('Component ' + vd.tagName + ' has duplicate key: ' + key);\n }\n hash[key] = {\n json,\n vd,\n };\n }\n }\n }\n return hash;\n}\n\n/**\n * 非一级组件diff发生更新时,其需要从sr的tree中移除,因为sr会销毁\n */\nfunction removeCpFromOldTree(vd) {\n // root下的一级组件不会发生回收情况,忽略\n if(!vd.host) {\n return;\n }\n let parent = vd.parent;\n if(parent) {\n let i = parent.children.indexOf(vd);\n if(i > -1) {\n parent.children[i] = null;\n }\n else {\n throw new Error('Can not find child: ' + vd.tagName);\n }\n }\n}\n\n/**\n * 执行componentDidUpdate/destroy\n */\nfunction did() {\n updateList.forEach(item => {\n if(util.isFunction(item.componentDidUpdate)) {\n item.componentDidUpdate();\n }\n });\n updateList.splice(0);\n removeList.forEach(item => {\n item.__destroy();\n });\n removeList = [];\n}\n\nexport default {\n updateList,\n check,\n did,\n};\n","import Node from '../node/Node';\nimport Component from '../node/Component';\nimport $$type from '../util/$$type';\nimport util from '../util/util';\n\nconst { TYPE_VD, TYPE_GM, TYPE_CP } = $$type;\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 if(item && [TYPE_VD, TYPE_GM, TYPE_CP].indexOf(item.$$type) > -1) {\n return item;\n }\n return parse(karas, item, animateRecords, opt, offsetTime);\n }));\n }\n else {\n vd = karas.createVd(tagName, props, children.map(item => {\n if(item && [TYPE_VD, TYPE_GM, TYPE_CP].indexOf(item.$$type) > -1) {\n return item;\n }\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 level from './level';\nimport change from './change';\nimport Page from './Page';\nimport Cache from './Cache';\n\nexport default {\n level,\n change,\n Page,\n Cache,\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 updater from './util/updater';\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';\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 // return {\n // tagName,\n // props,\n // children,\n // $$type: $$type.TYPE_VD,\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 // return {\n // tagName,\n // props,\n // $$type: $$type.TYPE_GM,\n // };\n },\n createCp(klass, props, children = []) {\n props.children = children;\n return new klass(props, children);\n // return {\n // klass,\n // props,\n // $$type: $$type.TYPE_CP,\n // };\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 updater,\n refresh,\n enums,\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","__ox","__oy","__sx","__sy","__width","__height","__baseline","__verticalBaseline","__prev","__next","__parent","__domParent","__root","__host","__hostRoot","__virtualDom","__bbox","__filterBbox","__isDestroyed","lv","j","__struct","node","childIndex","diff","isLayout","x","ox","y","oy","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","TYPE_VD","Symbol","TYPE_GM","TYPE_CP","identity","multiply","a","b","isE","c","i","a0","a1","a2","a3","calPoint","point","m","z","w","undefined","length","b1","c1","d1","b2","c2","d2","b3","c3","d3","a4","b4","c4","d4","d","e","f","inverse","inverse4","divisor","s","inv","det","m2m6","point2d","slice","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","isMask","props","tagName","content","opacity","transform","visibility","mask","overflow","filter","mixBlendMode","def","uuid","joinItem","rgba2int","color","charAt","push","parseInt","match","int2rgba","Math","floor","max","int2invert","joinArr","arr2hash","hash","list","keys","k","hash2arr","clone","$$type","util","Date","isPlainObject","equalArr","ai","bi","isArrayA","isArrayB","equal","getTime","extend","target","source","split","transformBbox","bbox","matrix","dx","dy","mx","x1","y1","x2","y2","xa","ya","xb","yb","min","proto","getPrototypeOf","Ctor","constructor","assignMatrix","t","prefixHex","replaceRgba2Hex","$0","$1","$2","$3","$4","isPrimitive","isAuto","flag","alpha","antialias","premultipliedAlpha","preserveDrawingBuffer","initShaders","gl","vshader","fshader","program","createProgram","Error","enable","BLEND","blendFunc","ONE","ONE_MINUS_SRC_ALPHA","vertexShader","loadShader","VERTEX_SHADER","fragmentShader","FRAGMENT_SHADER","attachShader","linkProgram","linked","getProgramParameter","LINK_STATUS","error","getProgramInfoLog","deleteProgram","deleteShader","shader","createShader","shaderSource","compileShader","compiled","getShaderParameter","COMPILE_STATUS","getShaderInfoLog","convertCoords2Gl","cx","cy","revertY","createTexture","tex","width","height","texture","bindTexture","pixelStorei","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","drawTextureCache","vtPoint","vtTex","vtOpacity","lastChannel","record","stack","cache","channel","page","bx","by","w1","w2","x3","y3","w3","x4","y4","w4","tx1","ty1","tx2","ty2","pointBuffer","createBuffer","bindBuffer","ARRAY_BUFFER","bufferData","Float32Array","STATIC_DRAW","a_position","getAttribLocation","vertexAttribPointer","FLOAT","enableVertexAttribArray","texBuffer","a_texCoords","opacityBuffer","a_opacity","u_texture","getUniformLocation","count","num","uniform1i","drawArrays","TRIANGLES","deleteBuffer","disableVertexAttribArray","drawBlur","frameBuffer","tex1","tex2","spread","widthNew","heightNew","u_direction","uniform2f","ratio","recycle","tex3","framebufferTexture2D","FRAMEBUFFER","COLOR_ATTACHMENT0","tex4","deleteTexture","drawCm","u_m","uniform1fv","drawOverflow","h","programOverflow","drawMask","u_texture1","u_texture2","drawMbm","W","H","drawDropShadow","u_color","SPF","CANVAS_LIST","WEBGL_LIST","SUPPORT_OFFSCREEN_CANVAS","OffscreenCanvas","prototype","getContext","key","message","pop","debug","document","createElement","style","setAttribute","body","appendChild","ctx","ca","canvas","enabled","available","release","cacheCanvas","cacheWebgl","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","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","hasCacheCanvas","getCacheCanvas","releaseCacheCanvas","delCacheCanvas","hasCacheWebgl","getCacheWebgl","releaseCacheWebgl","delCacheWebgl","isDom","Element","self","getElementsByTagName","isWebGLTexture","WebGLTexture","defaultFontFamily","getFontCanvas","checkSupportFontFamily","toLowerCase","context","textAlign","fillStyle","textBaseline","clearRect","font","fillText","getImageData","data","loadFont","ArrayBuffer","FontFace","load","then","fonts","add","loadComponent","script","async","head","removeChild","CALLBACK","info","arial","lhr","blr","lgr","helvetica","verdana","tahoma","georgia","simsun","support","checked","register","name","__emitFontRegister","emSquare","ascent","descent","lineGap","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","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","crossProduct","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","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","l","ELLIPSIS","sqrt","vector","enums","deg","cos","sin","pointInConvexPolygon","vertexes","xmax","ymax","xmin","ymin","first","pointInQuadrilateral","angleBySide","theta","pow","acos","sideByAngle","pointsDistance","triangleIncentre","ellipsePoints","sectorPoints","r","begin","end","h2","d2r","abs","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","PI","dt","r2d","pointOnCircle","getConicGradientImage","originX","originY","stop","getAngle","increasingList","map","angle","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","points","isLast","main1","main2","cross1","cross2","tan","calTopRadiusPoints","calRightRadiusPoints","calBottomRadiusPoints","calLeftRadiusPoints","pointsList","brx","bry","erx","ery","oxl","oxr","beginList","centerList","endList","beginLength","needInner","crossDeg","rx1","ry1","sx1","oyl","rx2","ry2","sx2","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","prev","next","half","calBorderRadiusInline","contentBoxList","last","isEllipsis","outerWidth","outerHeight","renderBorder","xom","renderMode","mode","beginPath","closePath","virtualDom","getLinearDeg","getRadialPosition","center","getColorStop","firstColor","p","dr","dg","db","da","unshift","calLinearCoords","x0","y0","calCircleCentre","iw","ih","positionX","positionY","calRadialRadius","shape","size","xl","yl","tx","ty","asin","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","aa","av","bv","ad","bd","isArrayD1","isArrayD2","ap","bp","aj","bj","ac","bc","isMulti","cloneStyle","vv","spreadBoxShadow","yt","xr","inset","blur","spreadFilter","calDeg","pointIndex","index","cross","pointByIndex","exchangeOrder","sy1","sy2","sx3","sy3","tx3","ty3","isOverflow","ls","lt","ls2","lt2","ax2","ay2","ax3","ay3","ab","AB","AC","BC","A","TOLERANCE","getLinearRoot","coefs","result","getQuadraticRoots","results","getCubicRoots","c0","offset","discrim","halfB","tmp","distance","atan2","sqrt3","getQuarticRoots","resolveRoots","reverse","t1","t2","plus","minus","getRoots","degree","bboxBezier2","minX","minY","maxX","maxY","sy","qx","qy","bboxBezier3","ax","ay","hx","hy","q","bboxBezier","arguments","norm","sum","reduce","simpson38","derivativeFunc","middleL","middleR","adaptiveSimpson38","eps","mid","st","sl","sr","ans","bezierLength","startT","endT","at","at3","p0","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","equation","sort","xt","bezierSlope","bezier2Slope","bezier3Slope","ACCURACY","getDerivativeCoefs","derivative","evaluate","bisection","minValue","maxValue","tmp1","log","tmp2","LN10","iters","ceil","LN2","value","getRootsInInterval","roots","derivativeCoefs","droots","intersectBezier2Bezier2","bx2","by2","bx3","by3","c12","c11","c10","c22","c21","c20","v0","v1","v3","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","cl","minbx","minby","maxbx","maxby","dot","lerp","p5","p6","intersectBezier3Line","p7","p8","p9","p10","Point","Segment","belong","calBbox","myFill","otherFill","myCoincide","otherCoincide","isVisited","isDeleted","bezier","toHash","EPS","EPS2","getIntersectionLineLine","toSource","toClip","getIntersectionBezier2Line","isec","getIntersectionBezier2Bezier2","getIntersectionBezier2Bezier3","getIntersectionBezier3Line","getIntersectionBezier3Bezier3","sortIntersection","isSource","intersect","Polygon","regions","segments","vertices","startPoint","firstPoint","curr","endPoint","seg","compare","cPoint","getBezierMonotonicity","curve1","curve2","cPoint1","cPoint2","lastPoint","lastT","curve","genHashXList","findIntersection","polyA","polyB","isIntermediateA","isIntermediateB","genHashXYList","aelA","aelB","hashA","hashB","ael","hc","isAboveLast","segAboveCompare","isAbove","inside","compareBelong","delList","shift","bboxA","coordsA","lenA","bboxB","coordsB","lenB","isSourceReverted","inters","overs","checkOverlapLine","checkOverlapBezier","activeNewSeg","ra","rb","pa","sliceSegment","pb","isIntermediate","ns","lx","hashX","putHashX","hashXY","putHashXY","listX","hashY","listY","pointAboveOrOnLine","pt","segA","segB","la","lb","getYByX","isX","pts","isY","firstA","firstB","lastA","lastB","t3","t4","conditionA","conditionB","conditionC","startA","endA","startB","endB","equalBezier","over","chains","chain","isHead","tail","ptHead","ptTail","close","coords2","clockwise","lastX","lastY","area","prefix","polygon","trivial","polygonA","polygonB","selfIntersect","intersect2","annotate2","INTERSECT","UNION","SUBTRACT","SUBTRACT_REV","XOR","intermediate","union","subtract","subtractRev","xor","tar","booleanOperations","bo","math","calSingle","rlen","nc","xy","yz","zx","xs","ys","zs","calMatrix","ow","oh","calMatrixByOrigin","calMatrixWithOrigin","normalizeSingle","calMatrixByPerspective","pm","calPerspectiveMatrix","ppt","po","isPerspectiveMatrix","TuOrU","TextBox","__index","__content","__parentLineBox","__isVertical","cacheStyle","dom","css","__endX","__endY","me","matrixEvent","dev1","dev2","overFill","cjk","setTransform","strokeText","tfo","measureText","nowCjk","__gradient","__bx1","__by1","__bx2","__by2","baseline","verticalBaseline","CHAR","Ellipsis","__sx1","__sy1","__ellipsis","TX","TY","TZ","OP","FT","PPT","TF","NONE","CACHE","TRANSFORM_ALL","REPAINT","REFLOW","REBUILD","ENUM","isTransforms","contain","getLevel","isReflow","measureLineWidth","perW","rw","newLine","mw","hypotheticalNum","round","getFontKey","Text","__textBoxes","__charWidth","__textWidth","__bp","__widthHash","__limitCache","__hasContent","__cache","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","__offsetX","__offsetY","firstCharWidth","lineWidth","strokeStyle","render","__addUpdate","focus","level","isShadowRoot","hostRoot","__children","__zIndexChildren","__deleteStruct","__destroy","removeDom","fontKey","charWidth","__currentStyle","__style","__computedStyle","__cacheStyle","__matrix","__matrixEvent","__perspectiveMatrix","Event","__eHash","handle","on","apply","off","__karasEventCb","once","emit","event","fns","fn","REGISTER","Component","__tagName","__ref","__isMounted","__taskList","__shadowRoot","listener","componentDidMount","REFRESH","componentWillUnmount","__shadow","force","shadowRoot","__emitEvent","__state","defineProperty","get","getInlineBox","leading","bcStart","bcEnd","pbStart","pbEnd","getInlineWidth","contentBox","matrixResize","imgWidth","imgHeight","targetWidth","targetHeight","renderBgc","method","__cacheDefs","renderImage","loadBgi","bgW","bgH","bgX","bgY","needMask","xnl","xnr","ynt","ynb","image","needResize","copy","traversal","after","__after","__before","isPause","Frame","__rootTask","__task","__now","__init","__karasFramecb","offFrame","onFrame","NEWTON_ITERATIONS","NEWTON_MIN_SLOPE","SUBDIVISION_PRECISION","SUBDIVISION_MAX_ITERATIONS","kSplineTableSize","kSampleStepSize","float32ArraySupported","aA1","aA2","B","C","calcBezier","aT","getSlope","binarySubdivide","aX","aA","aB","mX1","mX2","currentX","currentT","newtonRaphsonIterate","aGuessT","currentSlope","LinearEasing","mY1","mY2","sampleValues","getTForX","intervalStart","currentSample","lastSample","dist","guessForT","initialSlope","BezierEasing","easing","linear","easeIn","easeOut","ease","easeInOut","cubicBezier","getEasing","timingFunction","unify","frames","getProps","inherit","__outerWidth","__outerHeight","tf","genBeforeRefresh","framing","duration","es","translatePath","time","transition","fixed","calByUnit","container","calDiff","nm","pv","nv","pvv","nvv","clientHeight","clientWidth","pi","ni","offsetHeight","offsetWidth","has","pp","nn","parentComputedStyle","calDiffGradient","len2","pv2","nv2","len3","pv3","nv3","eq","isArrP","isArrN","pz","nz","np","calFrame","hasTp","ts","binarySearch","middle","frame","ea","steps","stepsD","calIntermediateStyle","lastPercent","currentProps","__currentProps","st2","cli","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","__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","__inFps","currentFrame","__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","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","blurBox","mbmName","isValidMbm","mbm","getFirstEmptyInlineWidth","flowChildren","child","Xom","__isInline","getLastEmptyInlineWidth","__listener","__animationList","__loadBgi","isClip","__isClip","__isMask","__refreshLevel","__opacity","__frameAnimateList","__contentBoxList","__cacheAsBitmap","cacheAsBitmap","__cacheTotal","__cacheFilter","__cacheMask","__cacheOverflow","__layoutData","__hasComputeReflow","__fontRegister","__hasMask","hasMask","__calSize","includePercent","isRoot","ph","fontRegister","__clientWidth","__offsetWidth","__clientHeight","__offsetHeight","isDirectionRow","isDirectItem","isAbs","isColumn","isRow","__layoutFlow","__computeReflow","__isIbFull","__isUprightIbFull","clearCache","__mp","__layoutFlex","__layoutInline","__layoutBlock","__sx2","__sx3","__sx4","__sx5","__sx6","__sy2","__sy3","__sy4","__sy5","__sy6","__execAr","__calStyle","__calPerspective","ar","__animateRecords","controller","autoPlay","__records2","init","list2","__records","__playAuto","__reset0","h3","isParentVertical","fixedWidth","fixedHeight","selfEndSpace","isReplaced","matrixCache","isScale","__calFilter","__calMatrix","bgI","kw","rebuild","offscreenBlend","offscreenMask","offscreenFilter","offscreenOverflow","origin","borderList","isRealInline","sx4","sx5","sx6","sy4","sy5","sy6","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","lookUp","formatStyle","updateFormatStyle","animation","cancel","enter","includeBbox","LineBox","__list","__lineHeight","__isUpright","__bOffset","increase","isAlign","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","cs","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","isSiblingBlock","checkNext","hasZ","cps","crs","isLastAbs","isNowAbs","isLastNone","isNowNone","isLast0","oldH","svg","ref","hasFlowPrev","__updateStruct","__layoutAbs","ld","__layout","isNow0","nowH","isRemoveSelf","__resizeY","buildChildren","flatten","relation","hoc","buildRoot","genZIndexChildren","hasMc","mcHash","lastMaskIndex","__iIndex","__zIndex","__aIndex","genOrderChildren","__order","backtrack","text","__backtrack","Dom","block","inlineBlock","none","tag","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","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","targetMainList","lessOne","factorSum","factorList","needReset","factorSum2","count1","count2","lbmList","needGenAr","firstBaseline","old","genLineBoxByInlineIfNewLine","setLbByInlineIfNotNewLine","pushContentBoxList","isIbFull","isUprightIbFull","hasAddEndSpace","isInline2","isInlineBlock2","addY","addX","popContentBoxList","maxCX","maxCY","minCX","minCY","maxFX","maxFY","minFX","minFY","maxOX","maxOY","minOX","minOY","absChildren","onlyRight","onlyBottom","fixedTop","fixedRight","fixedBottom","fixedLeft","widthLimit","heightLimit","__deepScan","__insertStruct","Img","loadImg","__loadImg","loading","__loadAndRefresh","placeholder","delRefreshTask","showError","__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","SIZE","MAX","HASH_CANVAS","Page","number","__size","__number","__free","__total","__canvas","__offscreen","__grid","__uuid","__update","grid","pos","genSingle","bboxNew","dbx","dby","Cache","__page","__pos","getCoords","__appendData","__enabled","globalAlpha","update","__available","clear","del","getInstance","oldX1","callback","cacheMask","globalCompositeOperation","drawCache","xe","ye","cacheOverflow","rect","dbx2","dby2","OFFSCREEN_OVERFLOW","OFFSCREEN_FILTER","OFFSCREEN_MASK","OFFSCREEN_BLEND","OFFSCREEN_MASK2","applyOffscreen","MockPage","genUuid","MockCache","reOffset","getCache","MBM","genBboxTotal","parentIndexHash","opacityHash","includeLimitCache","bboxTotal","filterBbox","matrixHash","parentIndex","node2","hasTotal","mergeBbox","genTotal","__computedStyle2","countMaskNum","__cacheTotal2","__cacheFilter2","__cacheMask2","__cacheOverflow2","ctxTotal","matrixList","parentMatrix","lastMatrix","lastLv","maskStartHash","offscreenHash","__calOffscreen","genTotalOther","needGen","genOverflow","genFilter","genMask","opacityList","parentOpacity","lastOpacity","genFrameBufferWithTexture","texCache","lockOneChannel","webgl","createFramebuffer","bindFramebuffer","check","checkFramebufferStatus","FRAMEBUFFER_COMPLETE","viewport","clearColor","COLOR_BUFFER_BIT","genTotalWebgl","limitCache","getParameter","MAX_TEXTURE_SIZE","parentPm","totalLimitCache","addTexAndDrawWhenLimit","mockCache","refresh","releaseLockChannel","useProgram","frameBuffer2","texture2","genMbmWebgl","deleteFramebuffer","genFilterWebgl","genBlurWebgl","genDropShadowWebgl","rotation","cosR","sinR","genColorMatrixWebgl","amount","oneMinusAmount","MAX_VARYING_VECTORS","weights","vert","frag","vertexBlur","fragmentBlur","findExistTexChannel","lockChannel","programCm","genOverflowWebgl","overflowCache","genMaskWebgl","programClip","programMask","maskCache","programDs","bboxOld","bboxMerge","mockCache2","fbo","fragmentMultiply","fragmentScreen","fragmentOverlay","fragmentDarken","fragmentLighten","fragmentColorDodge","fragmentColorBurn","fragmentHardLight","fragmentSoftLight","fragmentDifference","fragmentExclusion","fragmentHue","fragmentSaturation","fragmentColor","fragmentLuminosity","vertexMbm","renderSvg","maskEffectHash","hasEffectMask","addCache","maskHash","vdList","parentVd","lastRefreshLv","lastNode","mChildren","ivs","hasTransform","renderWebgl","lastRefreshLevel","mergeList","hasMbm","isMbm","isPpt","hasContent","calContent","isFilter","limitHash","pptHash","isPerspective","renderCanvas","TexCache","units","__units","__pages","__channels","__locks","__lockUnits","pages","channels","locks","lastHash","oldList","newList","fullSize","setToChannel","ROOT_DOM_NAME","getDom","querySelector","renderProp","EVENT_LIST","initEvent","Root","__wrapEvent","__cb","addEventListener","removeEvent","removeEventListener","__dom","__mw","__mh","__taskUp","__reflowList","mix","__updateHash","__rlv","domName","__scx","__scy","getBoundingClientRect","touches","clientX","clientY","stopPropagation","stopImmediatePropagation","preventDefault","__hasEmitted","__initProps","nodeName","__genHtml","__defs","domCss","getPropertyValue","params","contextAttributes","__ctx","__renderMode","vertex","fragment","vertexMask","fragmentMask","fragmentClip","fragmentOverflow","vertexCm","fragmentCm","vertexDs","fragmentDs","MAX_TEXTURE_IMAGE_UNITS","__texCache","destroy","__eventCbList","__checkRoot","wm","__reLayout","noRender","__clear","__vd","domDiff","updateStyle","taskUp","nextFrame","__frameHook","includeIgnore","scan","path","zPath","__index__","karas","path2","zPath2","hasVisibility","hasColor","hasDisplay","hasTsColor","hasTsWidth","hasTsOver","isRp","__frameRefresh","reBuild","base","reBuildC","curveNum","getNewPoint","Line","__x1","__y1","__x2","__y2","__controlA","__controlB","__start","dy2","buildCache","bezierBox","subtract2","concatPointAndControl","control","getLength","getIndex","getNewList","start2","end2","isStartLt0","isEndGt1","prePercent","Polyline","__points","__controls","controls","__booleanOperations","isControl","cur","rebuildSE","__getPoints","__needRebuildSE","__reprocessing","__renderPolygon","pointList","controlList","getR","dft","Sector","__r","edge","__edge","closure","__closure","sList","r2","__renderOneSector","genVertex","Rect","__rx","__ry","Circle","Ellipse","my","flattenJson","traverseJson","lastText","updateList","removeList","KEY_FLAG","__hasCpUpdate","checkCp","cp","nextProps","forceCheckUpdate","__nextState","shouldUpdate","shouldComponentUpdate","updateCp","shadow","oldS","oldSr","oldJson","__cd","json","diffSr","__placeholder","__inheritAnimate","oj","nj","ojk","getKeyHash","njk","keyList","cpList","klass","diffCp","diffChildren","removeCpFromOldTree","oc","of","nf","exist","ex","did","componentDidUpdate","parse","animateRecords","opt","oft","JSON","createGm","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","version","appendTo","parser","updater"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAMA;IACJ,SAAc,IAAA,GAAA;MACZ,IAAKC,CAAAA,GAAL,GAAW,CAAX,CAAA;MACA,IAAKC,CAAAA,GAAL,GAAW,CAAX,CAAA;EACA,IAAA,IAAA,CAAKC,IAAL,GAAY,CAAZ,CAHY;;MAIZ,IAAKC,CAAAA,IAAL,G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A,IA7EU;EA8EV4qB,EAAAA,SAAS,EAATA,SA9EU;EA+EVzlD,EAAAA,IAAI,EAAJA,IA/EU;EAgFVihD,EAAAA,IAAI,EAAJA,IAhFU;EAiFVqgB,EAAAA,IAAI,EAAJA,IAjFU;EAkFVjK,EAAAA,GAAG,EAAHA,GAlFU;EAmFVsQ,EAAAA,GAAG,EAAHA,GAnFU;EAoFVoH,EAAAA,GAAG,EAAHA,GApFU;EAqFV0Q,EAAAA,IAAI,EAAJA,IArFU;EAsFV76B,EAAAA,KAAK,EAALA,KAtFU;EAuFV55C,EAAAA,IAAI,EAAJA,IAvFU;EAwFViO,EAAAA,MAAM,EAANA,MAxFU;EAyFV1B,EAAAA,KAAK,EAALA,KAzFU;EA0FVw1E,EAAAA,MAAM,EAANA,CA1FU;EA2FV7a,EAAAA,OAAO,EAAPA,OA3FU;EA4FVn2B,EAAAA,IAAI,EAAJA,IA5FU;EA6FVixC,EAAAA,OAAO,EAAPA,OA7FU;EA8FVzT,EAAAA,OAAO,EAAPA,OA9FU;EA+FVzsD,EAAAA,KAAK,EAALA,KA/FU;;IAgGV,IAAI1V,KAAJ,CAAU/T,CAAV,EAAa;EACX+T,IAAAA,KAAK,CAACxJ,IAAN,GAAa,CAAC,CAACvK,CAAf,CAAA;EACD,GAAA;;EAlGS,EAAZ;;EAqGA,IAAG,OAAOwW,MAAP,KAAkB,WAArB,EAAkC;IAChCA,MAAM,CAAC6pE,KAAP,GAAeA,OAAf,CAAA;EACD,CAFD,MAGK,IAAG,OAAOlnE,IAAP,KAAgB,WAAnB,EAAgC;IACnCA,IAAI,CAACknE,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/util/$$type.js","src/math/matrix.js","src/util/util.js","src/util/debug.js","src/gl/ca.js","src/gl/webgl.js","src/util/inject.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/math/tar.js","src/math/equation.js","src/math/bezier.js","src/math/isec.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/math/index.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/Page.js","src/refresh/Cache.js","src/refresh/offscreen.js","src/gl/MockPage.js","src/gl/MockCache.js","src/refresh/struct.js","src/gl/TexCache.js","src/node/Root.js","src/node/geom/Line.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/util/flatten.js","src/util/updater.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/refresh/index.js","src/index.js"],"sourcesContent":["class Node {\n constructor() {\n this.__x = 0;\n this.__y = 0;\n this.__ox = 0; // relative造成的偏移量\n this.__oy = 0;\n this.__sx = 0;\n this.__sy = 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, isLayout) {\n if(isLayout) {\n this.__x += diff;\n }\n else {\n this.__ox += diff;\n }\n this.__sx += diff;\n }\n\n __offsetY(diff, isLayout) {\n if(isLayout) {\n this.__y += diff;\n }\n else {\n this.__oy += diff;\n }\n this.__sy += 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 ox() {\n return this.__ox;\n }\n\n get oy() {\n return this.__oy;\n }\n\n get sx() {\n return this.x + this.ox;\n }\n\n get sy() {\n return this.y + this.oy;\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","// 类型为引用防止json仿造\nconst TYPE_VD = Symbol('Dom');\nconst TYPE_GM = Symbol('Geom');\nconst TYPE_CP = Symbol('Component');\n\nexport default {\n TYPE_VD,\n TYPE_GM,\n TYPE_CP,\n};\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\nfunction calPoint(point, m) {\n let [x, y, z, w] = point;\n if(w === undefined) {\n w = 1;\n }\n if(m && !isE(m)) {\n if(m.length === 16) {\n z = z || 0;\n let [a1, b1, c1, d1, a2, b2, c2, d2, a3, b3, c3, d3, a4, b4, c4, d4] = m;\n w *= x * d1 + y * d2 + z * d3 + d4;\n return [\n (x * a1 + y * a2 + z * a3 + a4),\n (x * b1 + y * b2 + z * b3 + b4),\n (x * c1 + y * c2 + z * c3 + c4),\n w\n ];\n }\n // 6位类型\n let [a, b, c, d, e, f] = m;\n return [a * x + c * y + e, b * x + d * y + f];\n }\n return [x, y, z, w];\n}\n\n/**\n * 初等行变换求3*3特定css的matrix方阵,一维6长度\n * https://blog.csdn.net/iloveas2014/article/details/82930946\n * @param m\n * @returns {number[]|*}\n */\nfunction inverse(m) {\n if(m.length === 16) {\n return inverse4(m);\n }\n let [a, b, c, d, e, f] = m;\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\nexport default {\n identity,\n multiply,\n calPoint,\n point2d,\n inverse,\n isE,\n m2m6,\n};\n","import $$type from './$$type';\nimport 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 if(item.isMask) {\n return;\n }\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 if(item.isMask) {\n return;\n }\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 // parse递归会出现内部先返回解析好的json,外部parse不能clone\n if(obj.$$type === $$type.TYPE_VD\n || obj.$$type === $$type.TYPE_GM\n || obj.$$type === $$type.TYPE_CP) {\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(matrix && !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 [x1, y1, , w] = mx.calPoint([x1, y1], matrix);\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 [x, y, , w] = mx.calPoint([x, y], matrix);\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 bbox = [xa, ya, xb, yb];\n }\n else 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 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 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 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","export default {\n alpha: true,\n antialias: true,\n premultipliedAlpha: true,\n preserveDrawingBuffer: true,\n // depth: true,\n // stencil: true,\n};\n","import mx from '../math/matrix';\n\nconst calPoint = mx.calPoint;\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.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, revertY) {\n if(z === undefined) {\n z = 0;\n }\n if(w === undefined) {\n w = 1;\n }\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 = (y - cy) / cy;\n if(revertY) {\n y = -y;\n }\n }\n return [x * w, y * w, 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, tex);\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\n/**\n * texCache集满纹理上传占用最多可用纹理单元后,进行批量顺序绘制\n * 将所有dom的矩形顶点(经过transform变换后的)、贴图坐标、透明度存入3个buffer中,\n * 然后相同纹理单元的形成一批,设置uniform的纹理单元号进行绘制,如此循环\n * @param gl\n * @param list\n * @param hash\n * @param cx\n * @param cy\n * @param revertY\n */\nfunction drawTextureCache(gl, list, hash, cx, cy, revertY) {\n let length = list.length;\n let vtPoint = new Float32Array(length * 24),\n vtTex = new Float32Array(length * 12),\n vtOpacity = new Float32Array(length * 6);\n let lastChannel; // 上一个dom的单元号\n let record = [0]; // [num, channel]每一批的数量和单元号记录\n let stack = [record]; // 所有批的数据记录集合\n list.forEach((item, i) => {\n let [cache, opacity, matrix, dx, dy] = item;\n if(i) {\n let channel = hash[cache.page.uuid];\n // 和上一个单元号不同时,生成新的批次记录\n if(lastChannel !== channel) {\n lastChannel = channel;\n record = [0, lastChannel];\n stack.push(record);\n }\n }\n else {\n lastChannel = hash[cache.page.uuid];\n record[1] = lastChannel;\n }\n let { x, y, width, height, page, bbox } = cache;\n // 计算顶点坐标和纹理坐标,转换[0,1]对应关系\n let bx = bbox[0], by = bbox[1];\n let [xa, ya] = [bx + (dx || 0), by + height + (dy || 0)];\n let [xb, yb] = [bx + width + (dx || 0), by + (dy || 0)];\n let [x1, y1, , w1] = calPoint([xa, ya], matrix);\n let [x2, y2, , w2] = calPoint([xb, ya], matrix);\n let [x3, y3, , w3] = calPoint([xb, yb], matrix);\n let [x4, y4, , w4] = calPoint([xa, yb], matrix);\n [x1, y1] = convertCoords2Gl([x1, y1, 0, w1], cx, cy, revertY);\n [x2, y2] = convertCoords2Gl([x2, y2, 0, w2], cx, cy, revertY);\n [x3, y3] = convertCoords2Gl([x3, y3, 0, w3], cx, cy, revertY);\n [x4, y4] = convertCoords2Gl([x4, y4, 0, w4], cx, cy, revertY);\n // vtPoint.push(x1, y1, 0, w1, x4, y4, 0, w4, x2, y2, 0, w2, x4, y4, 0, w4, x2, y2, 0, w2, x3, y3, 0, w3);\n let j = i * 24;\n vtPoint[j] = x1;\n vtPoint[j + 1] = y1;\n vtPoint[j + 3] = w1;\n vtPoint[j + 4] = x4;\n vtPoint[j + 5] = y4;\n vtPoint[j + 7] = w4;\n vtPoint[j + 8] = x2;\n vtPoint[j + 9] = y2;\n vtPoint[j + 11] = w2;\n vtPoint[j + 12] = x4;\n vtPoint[j + 13] = y4;\n vtPoint[j + 15] = w4;\n vtPoint[j + 16] = x2;\n vtPoint[j + 17] = y2;\n vtPoint[j + 19] = w2;\n vtPoint[j + 20] = x3;\n vtPoint[j + 21] = y3;\n vtPoint[j + 23] = w3;\n let tx1 = x / page.width, ty1 = (y + height) / page.height;\n let tx2 = (x + width) / page.width, ty2 = y / page.height;\n // vtTex.push(tx1, ty1, tx1, ty2, tx2, ty1, tx1, ty2, tx2, ty1, tx2, ty2);\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 // vtOpacity.push(opacity, opacity, opacity, opacity, opacity, opacity);\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 record[0]++;\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 let count = 0;\n // 循环按批次渲染\n stack.forEach(record => {\n let [num, channel] = record;\n gl.uniform1i(u_texture, channel);\n num *= 6;\n gl.drawArrays(gl.TRIANGLES, count, num);\n count += num;\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\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为total和filter的纹理单元,3次执行(x/y合起来算1次)需互换单元,来回执行源和结果\n * 由total变为filter时cache会各方向上扩展spread的大小到width/height\n * 因此第一次绘制时坐标非1,后面则固定1\n * @param gl\n * @param program\n * @param frameBuffer\n * @param tex1 初次绘制目标纹理\n * @param tex2 初次绘制源纹理\n * @param i 初次绘制目标纹理单元\n * @param j 初次绘制源纹理单元\n * @param width\n * @param height\n * @param spread\n * @param widthNew\n * @param heightNew\n * @param cx\n * @param cy\n */\nfunction drawBlur(gl, program, frameBuffer, tex1, tex2, i, j, width, height, spread, widthNew, heightNew, cx, cy) {\n // 第一次将total绘制到blur上,此时尺寸存在spread差值,因此不加模糊防止坐标计算问题,仅作为扩展纹理尺寸\n let [x1, y2] = convertCoords2Gl([spread, height + spread, 0, 1], cx, cy, false);\n let [x2, y1] = convertCoords2Gl([width + spread, spread, 0, 1], cx, cy, false);\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, 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 // direction全0,即无模糊,此时只是进行扩展尺寸操作,还没到模糊所以传0\n let u_direction = gl.getUniformLocation(program, 'u_direction');\n gl.uniform2f(u_direction, 0, 0);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n gl.uniform1i(u_texture, j);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n\n // fbo绑定切换纹理对象和单元索引,同时注意不能向源纹理绘制,因为源是cacheTotal,需要重新生成一个,y方向再来一次\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 /**\n * 反复执行共3次,坐标等均不变,只是切换fbo绑定对象和纹理单元\n * 注意max和ratio的设置,当是100尺寸的正方形时,传给direction的始终为1\n * 当正方形<100时,direction相应地要扩大相对于100的倍数,反之则缩小,如此为了取相邻点坐标时是+-1\n * 当非正方形时,长轴一端为基准值不变,短的要二次扩大比例倍数\n */\n let max = 100 / Math.max(widthNew, heightNew);\n let ratio = widthNew / heightNew;\n let recycle = []; // 3次过程中新生成的中间纹理需要回收\n for(let k = 0; k < 3; k++) {\n let tex3 = createTexture(gl, null, j, widthNew, heightNew);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex3, 0);\n if(widthNew >= heightNew) {\n gl.uniform2f(u_direction, max, 0);\n }\n else {\n gl.uniform2f(u_direction, max * ratio, 0);\n }\n gl.uniform1i(u_texture, i);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n recycle.push(tex1);\n let tex4 = createTexture(gl, null, i, widthNew, heightNew);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex4, 0);\n if(widthNew >= heightNew) {\n gl.uniform2f(u_direction, 0, max * ratio);\n }\n else {\n gl.uniform2f(u_direction, 0, max);\n }\n gl.uniform1i(u_texture, j);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n tex1 = tex4;\n recycle.push(tex3);\n }\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, i, m) {\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, i);\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}\n\n/**\n * 根据total/filter生成overflow\n * @param gl\n * @param i 输入纹理单元\n * @param dx 二者偏移值\n * @param dy\n * @param width 最终大小\n * @param height\n * @param w 输入纹理大小\n * @param h\n */\nfunction drawOverflow(gl, i, dx, dy, width, height, w, h) {\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.programOverflow, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer,原本大小width/height,使用其中的w/h\n let x1 = dx / w, y1 = dy / h, x2 = (width + dx) / w, y2 = (height + dy) /h;\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\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_texCoords = gl.getAttribLocation(gl.programOverflow, '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(gl.programOverflow, 'u_texture');\n gl.uniform1i(u_texture, i);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n}\n\nfunction drawMask(gl, i, j, 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_texture1 = gl.getUniformLocation(program, 'u_texture1');\n gl.uniform1i(u_texture1, j);\n let u_texture2 = gl.getUniformLocation(program, 'u_texture2');\n gl.uniform1i(u_texture2, i);\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 drawMbm(gl, program, i, j, W, H) {\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, i);\n let u_texture2 = gl.getUniformLocation(program, 'u_texture2');\n gl.uniform1i(u_texture2, j);\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, tex1, tex2, i, j, width, height, color) {\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, j);\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 return tex1;\n}\n\nexport default {\n initShaders,\n createTexture,\n bindTexture,\n drawTextureCache,\n drawBlur,\n drawOverflow,\n drawMask,\n drawMbm,\n drawCm,\n drawDropShadow,\n};\n","import util from './util';\nimport debug from './debug';\nimport ca from '../gl/ca';\nimport webgl from '../gl/webgl';\n\nconst SPF = 1000 / 60;\n\nconst CANVAS = {};\nconst WEBGL = {};\nconst CANVAS_LIST = [];\nconst WEBGL_LIST = [];\nconst SUPPORT_OFFSCREEN_CANVAS = typeof OffscreenCanvas === 'function' && util.isFunction(OffscreenCanvas.prototype.getContext);\n\nfunction cache(key, width, height, hash, message) {\n let o;\n if(!key) {\n let target = hash === CANVAS ? CANVAS_LIST : WEBGL_LIST;\n if(target.length) {\n o = target.pop();\n }\n else {\n o = !debug.flag && SUPPORT_OFFSCREEN_CANVAS ? new OffscreenCanvas(width, height) : document.createElement('canvas');\n }\n }\n else if(!hash[key]) {\n o = hash[key] = !debug.flag && SUPPORT_OFFSCREEN_CANVAS ? new OffscreenCanvas(width, height) : document.createElement('canvas');\n }\n else {\n o = hash[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 o.setAttribute('type', hash === CANVAS ? 'canvas' : 'webgl');\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;\n if(hash === CANVAS) {\n ctx = o.getContext('2d');\n }\n else {\n ctx = o.getContext('webgl', ca) || o.getContext('experimental-webgl', ca);\n }\n return {\n canvas: o,\n ctx,\n enabled: true,\n available: true,\n release() {\n if(!key && this.available) {\n if(hash === CANVAS) {\n CANVAS_LIST.push(this.canvas);\n }\n else {\n WEBGL_LIST.push(this.canvas);\n }\n }\n this.available = false;\n },\n };\n}\n\nfunction cacheCanvas(key, width, height, message) {\n return cache(key, width, height, CANVAS, message);\n}\n\nfunction cacheWebgl(key, width, height, message) {\n return cache(key, width, height, WEBGL, message);\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(window);\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(window);\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 hasCacheCanvas(key) {\n return key && CANVAS.hasOwnProperty(key);\n },\n getCacheCanvas(width, height, key, message) {\n return cacheCanvas(key, width, height, message);\n },\n releaseCacheCanvas(o) {\n CANVAS_LIST.push(o);\n },\n delCacheCanvas(key) {\n key && delete CANVAS[key];\n },\n hasCacheWebgl(key) {\n return key && WEBGL.hasOwnProperty(key);\n },\n getCacheWebgl(width, height, key, message) {\n return cacheWebgl(key, width, height, message);\n },\n releaseCacheWebgl(o) {\n WEBGL_LIST.push(o);\n },\n delCacheWebgl(key) {\n key && delete WEBGL[key];\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.getCacheCanvas(16, 16, '__$$CHECK_SUPPORT_FONT_FAMILY$$__');\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 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) && !/url\\(/.test(url)) {\n url = `url(${url})`;\n }\n let f = new FontFace(fontFamily, url);\n f.load().then(function() {\n document.fonts.add(f);\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 }).catch(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 });\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","import util from '../util/util';\nimport inject from '../util/inject';\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 info[name] = info[name] || {};\n if(url && !info[name].url) { // 不能覆盖\n info[name].url = url;\n inject.loadFont(name, url, function(res) {\n info[name].success = res.success;\n if(res.success) {\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 || info[name].lhr) {\n return;\n }\n let { emSquare = 2048, ascent = 1854, descent = 434, lineGap = 0 } = data || {};\n Object.assign(info[name], {\n lhr: (ascent + descent + lineGap) / emSquare,\n blr: ascent / emSquare,\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 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}\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\n// 向量叉乘积\nfunction crossProduct(x1, y1, x2, y2) {\n return x1 * y2 - x2 * y1;\n}\n\nexport default {\n dotProduct,\n crossProduct,\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 // GEOM\n FILL: 88,\n STROKE: 89,\n STROKE_WIDTH: 90,\n STROKE_DASHARRAY: 91,\n STROKE_DASHARRAY_STR: 92,\n STROKE_LINECAP: 93,\n STROKE_LINEJOIN: 94,\n STROKE_MITERLIMIT: 95,\n FILL_RULE: 96,\n // 无此样式,仅cache或特殊情况需要\n MATRIX: 97,\n BORDER_TOP: 98,\n BORDER_RIGHT: 99,\n BORDER_BOTTOM: 100,\n BORDER_LEFT: 101,\n TRANSLATE_PATH: 102,\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 [xmax, ymax] = vertexes[0];\n let [xmin, 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 [x1, y1] = vertexes[i];\n let [x2, 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 [x1, y1,, w1] = calPoint([x1, y1], matrix);\n [x2, y2,, w2] = calPoint([x2, y2], matrix);\n [x3, y3,, w3] = calPoint([x3, y3], matrix);\n [x4, y4,, w4] = calPoint([x4, y4], matrix);\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 [x1, y1],\n [x2, y2],\n [x4, y4],\n [x3, 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 (a * x1 + b * x2 + c * x3) / (a + b + c),\n (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 [px, py] = calPoint([px * width - ox, py * height - oy], matrix);\n return [px + ox, py + 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 [x1, 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 (ox + dt * Math.cos(d2)) / width,\n (oy + dt * Math.sin(d2)) / height,\n ];\n }\n if(d2 >= -Math.PI * 0.5) {\n d2 = -d2;\n return [\n (ox + dt * Math.cos(d2)) / width,\n (oy - dt * Math.sin(d2)) / height,\n ];\n }\n if(d2 >= -Math.PI) {\n d2 = Math.PI + d2;\n return [\n (ox - dt * Math.cos(d2)) / width,\n (oy - dt * Math.sin(d2)) / height,\n ];\n }\n d2 = -Math.PI - d2;\n return [\n (ox - dt * Math.cos(d2)) / width,\n (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 - Math.cos(deg) * r,\n y - Math.sin(deg) * r,\n ];\n }\n else if(deg >= 180) {\n deg -= 180;\n deg = d2r(deg);\n return [\n x - Math.sin(deg) * r,\n y + Math.cos(deg) * r,\n ];\n }\n else if(deg >= 90) {\n deg -= 90;\n deg = d2r(deg);\n return [\n x + Math.cos(deg) * r,\n y + Math.sin(deg) * r,\n ];\n }\n else {\n deg = d2r(deg);\n return [\n x + Math.sin(deg) * r,\n y - Math.cos(deg) * r,\n ];\n }\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};\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.getCacheCanvas(w, h, '__$$CONIC_GRADIENT$$__');\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_LEFT_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', ['x1', 'y1', 'x2', 'y2', '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, 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 temp = style.filter;\n if(temp !== undefined) {\n let f = [];\n // 先替换掉rgba为#RGBA格式,然后分割\n let arr = (replaceRgba2Hex(temp) || '').match(/[\\w-]+\\s*\\(.+?\\)/ig);\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 ].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 // translate/matrix等都是数组\n if(!equalArr(oa.v, ob.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 if(!equalArr(a[i], b[i])) {\n return false;\n }\n }\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 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 equalArr(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 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([sx3, sy3], m)[1]);\n let lt2 = Math.abs(matrix.calPoint([tx3, ty3], n)[1]);\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 [ax1, ay1] = matrix.calPoint([sx1, sy1], n);\n let [ax2, ay2] = matrix.calPoint([sx2, sy2], n);\n let [ax3, ay3] = matrix.calPoint([sx3, 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","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';\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 equation from './equation';\n\nconst getRoots = equation.getRoots;\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// bezier 2d 和椭圆\nfunction intersectBezier2Ellipse(ax1, ay1, ax2, ay2, ax3, ay3, cx, cy, rx, ry) {\n let c2, c1, c0;\n let result = [];\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 let rxrx = rx * rx;\n let ryry = ry * ry;\n\n let coefs = [ryry * c2.x * c2.x + rxrx * c2.y * c2.y,\n 2 * (ryry * c2.x * c1.x + rxrx * c2.y * c1.y),\n ryry * (2 * c2.x * c0.x + c1.x * c1.x) + rxrx * (2 * c2.y * c0.y + c1.y * c1.y) -\n 2 * (ryry * cx * c2.x + rxrx * cy * c2.y),\n 2 * (ryry * c1.x * (c0.x - cx) + rxrx * c1.y * (c0.y - cy)),\n ryry * (c0.x * c0.x + cx * cx) + rxrx * (c0.y * c0.y + cy * cy) -\n 2 * (ryry * cx * c0.x + rxrx * cy * c0.y) - rxrx * ryry].reverse();\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 x = c2.x * t * t + c1.x * t + c0.x;\n let y = c2.y * t * t + c1.y * t + c0.y;\n result.push({x, y});\n }\n }\n return result;\n}\n\n// bezier 2d 和圆\nfunction intersectBezier2Circle(ax1, ay1, ax2, ay2, ax3, ay3, cx, cy, r) {\n return intersectBezier2Ellipse(ax1, ay1, ax2, ay2, ax3, ay3, cx, cy, r, r);\n}\n\nfunction intersectBezier3Ellipse(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4, cx, cy, rx, ry) {\n let c3, c2, c1, c0;\n let result = [];\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 let rxrx = rx * rx;\n let ryry = ry * ry;\n\n let coefs = [c3.x * c3.x * ryry + c3.y * c3.y * rxrx,\n 2 * (c3.x * c2.x * ryry + c3.y * c2.y * rxrx),\n 2 * (c3.x * c1.x * ryry + c3.y * c1.y * rxrx) + c2.x * c2.x * ryry + c2.y * c2.y * rxrx,\n 2 * c3.x * ryry * (c0.x - cx) + 2 * c3.y * rxrx * (c0.y - cy) +\n 2 * (c2.x * c1.x * ryry + c2.y * c1.y * rxrx),\n 2 * c2.x * ryry * (c0.x - cx) + 2 * c2.y * rxrx * (c0.y - cy) +\n c1.x * c1.x * ryry + c1.y * c1.y * rxrx,\n 2 * c1.x * ryry * (c0.x - cx) + 2 * c1.y * rxrx * (c0.y - cy),\n c0.x * c0.x * ryry - 2 * c0.y * cy * rxrx - 2 * c0.x * cx * ryry +\n c0.y * c0.y * rxrx + cx * cx * ryry + cy * cy * rxrx - rxrx * ryry\n ].reverse();\n\n let roots = getRootsInInterval(0, 1, 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 x = c3.x * t * t * t + c2.x * t * t + c1.x * t + c0.x;\n let y = c3.y * t * t * t + c2.y * t * t + c1.y * t + c0.y;\n result.push({x, y});\n }\n }\n return result;\n}\n\nfunction intersectBezier3Circle(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4, cx, cy, r) {\n return intersectBezier3Ellipse(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4, cx, cy, r, r);\n}\n\nexport default {\n intersectBezier2Line, // 二阶贝塞尔曲线 与 直线\n intersectBezier3Line, // 三阶贝塞尔曲线 与 直线\n intersectBezier2Bezier2, // 二阶贝塞尔曲线 与 二阶贝塞尔曲线\n intersectBezier3Bezier3, // 三阶贝塞尔曲线 与 三阶贝塞尔曲线\n intersectBezier2Bezier3, // 二阶贝塞尔曲线 与 三阶贝塞尔曲线\n\n // below functions are not used for now\n // intersectBezier2Ellipse, // 二阶贝塞尔曲线 与 椭圆\n // intersectBezier3Ellipse, // 三阶贝塞尔曲线 与 椭圆\n // intersectBezier2Circle, // 二阶贝塞尔曲线 与 圆\n // intersectBezier3Circle, // 三阶贝塞尔曲线 与 圆\n}\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 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 unit from '../style/unit';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport math from '../math/index';\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 { PERCENT, REM, VW, VH, VMAX, VMIN } = unit;\nconst { matrix, geom } = math;\nconst { identity, multiply, isE } = matrix;\nconst { d2r } = geom;\n\nfunction calSingle(t, k, v) {\n if(k === TRANSLATE_X) {\n t[12] = v;\n }\n else if(k === TRANSLATE_Y) {\n t[13] = v;\n }\n else if(k === TRANSLATE_Z) {\n t[14] = v;\n }\n else if(k === SCALE_X) {\n t[0] = v;\n }\n else if(k === SCALE_Y) {\n t[5] = v;\n }\n else if(k === SCALE_Z) {\n t[10] = v;\n }\n else if(k === SKEW_X) {\n v = d2r(v);\n t[4] = Math.tan(v);\n }\n else if(k === SKEW_Y) {\n v = d2r(v);\n t[1] = Math.tan(v);\n }\n else if(k === ROTATE_X) {\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 }\n else if(k === ROTATE_Y) {\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 }\n else if(k === ROTATE_Z) {\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 }\n else if(k === ROTATE_3D) {\n let [x, y, z, r] = v;\n r = d2r(r.v);\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 }\n else if(k === PERSPECTIVE && v > 0) {\n v = Math.max(v, 1);\n t[11] = -1 / v;\n }\n else if(k === MATRIX) {\n util.assignMatrix(t, v);\n }\n}\n\nfunction calMatrix(transform, ow, oh, root) {\n let list = normalize(transform, ow, oh, root);\n let m = identity();\n list.forEach(item => {\n let t = identity();\n calSingle(t, item.k, item.v);\n m = multiply(m, t);\n });\n return m;\n}\n\n// 已有计算好的变换矩阵,根据tfo原点计算最终的matrix\nfunction calMatrixByOrigin(m, transformOrigin) {\n let [ox, oy] = transformOrigin;\n let res = m.slice(0);\n if(ox === 0 && oy === 0 || isE(m)) {\n return res;\n }\n res = multiply([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, ox, oy, 0, 1], res);\n res = multiply(res, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -ox, -oy, 0, 1]);\n return res;\n}\n\n// img缩放svg下专用,无rem\nfunction calMatrixWithOrigin(transform, transformOrigin, ow, oh) {\n let m = calMatrix(transform, ow, oh);\n return calMatrixByOrigin(m, transformOrigin);\n}\n\nfunction normalizeSingle(k, v, ow, oh, root) {\n if(k === TRANSLATE_X || k === TRANSLATE_Z) {\n if(v.u === PERCENT) {\n return v.v * 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 === TRANSLATE_Y) {\n if(v.u === PERCENT) {\n return v.v * oh * 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 normalize(transform, ow, oh, root) {\n let res = [];\n transform.forEach(item => {\n let k = item.k;\n res.push({\n k,\n v: normalizeSingle(k, item.v, ow, oh, root),\n });\n });\n return res;\n}\n\nfunction calMatrixByPerspective(m, pm) {\n if(!isE(pm)) {\n m = multiply(pm, m);\n }\n return m;\n}\n\nfunction calPerspectiveMatrix(ppt, po) {\n if(ppt && ppt > 0) {\n let res = identity();\n ppt = Math.max(ppt, 1);\n res[11] = -1 / ppt;\n let [ox, oy] = po;\n if(ox || oy) {\n res = multiply([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, ox, oy, 0, 1], res);\n res = multiply(res, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -ox, -oy, 0, 1]);\n }\n return res;\n }\n}\n\n// 是否有透视矩阵应用\nfunction isPerspectiveMatrix(m) {\n if(!m) {\n return;\n }\n return !!(m[3] || m[7] || m[11]);\n}\n\nexport default {\n calMatrix,\n calMatrixByPerspective,\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}-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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}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\\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 { ox, oy } = parent;\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 += ox + dx;\n y += oy + 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 tfo = [x, y];\n let m = transform.calMatrixWithOrigin(list, tfo, 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 tfo = [x, y + count];\n let m = transform.calMatrixWithOrigin(list, tfo, 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 tfo = [x, y + count];\n let m = transform.calMatrixWithOrigin(list, tfo, 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.__sx1 = x;\n this.__y = this.__sy1 = 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 ox,\n oy,\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 += ox + dx;\n y += oy + 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 tfo = [x, y];\n let m = transform.calMatrixWithOrigin(list, tfo, 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,\n SCALE_Y,\n SCALE_Z,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\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 /**\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 === 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 = null;\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.__sx = this.__sx1 = x;\n this.__y = this.__sy = this.__sy1 = 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 this.__ox = this.__oy = 0;\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.__sy1 = ly;\n }\n else {\n this.__x = this.__sx1 = 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.__sx1 += 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.__sy1 += 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 = min;\n this.__sy = this.__sy1 = min + this.oy;\n this.__sx = this.__sx1;\n this.__height = max - min;\n }\n else {\n this.__x = min;\n this.__sx = this.__sx1 = min + this.ox;\n this.__sy = this.__sy1;\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 __deepScan(cb) {\n cb(this);\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, {\n focus: level.REFLOW,\n cb,\n });\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 let res = {\n focus: level.REFLOW,\n removeDom: true,\n cb,\n };\n root.__addUpdate(this, res);\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 style() {\n return this.__domParent.__style;\n }\n\n get computedStyle() {\n return this.__domParent.__computedStyle;\n }\n\n get cacheStyle() {\n return this.__domParent.__cacheStyle;\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n __sx1, __sy1, width, height,\n computedStyle: {\n [TEXT_STROKE_WIDTH]: textStrokeWidth,\n },\n } = this;\n // 文字描边暂时不清楚最大值是多少,影响不确定,先按描边宽算,因为会出现>>0.5宽的情况\n let half = textStrokeWidth;\n this.__bbox = [__sx1 - half, __sy1 - half, __sx1 + width + half, __sy1 + 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 { 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 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 'ox',\n 'oy',\n 'sx',\n 'sy',\n // '__sx1',\n // '__sx2',\n // '__sx3',\n // '__sx4',\n // '__sx5',\n // '__sx6',\n // '__sy1',\n // '__sy2',\n // '__sy3',\n // '__sy4',\n // '__sy5',\n // '__sy6',\n 'width',\n 'height',\n 'outerWidth',\n 'outerHeight',\n 'clientWidth',\n 'clientHeight',\n 'offsetWidth',\n 'offsetHeight',\n 'style',\n 'animationList',\n 'animateStyle',\n 'currentStyle',\n 'computedStyle',\n 'currentProps',\n 'baseline',\n 'virtualDom',\n 'mask',\n 'maskId',\n 'textWidth',\n 'content',\n 'lineBoxes',\n 'charWidthList',\n 'charWidth',\n '__layoutData',\n '__struct',\n 'availableAnimating',\n 'effectiveAnimating',\n 'displayAnimating',\n 'visibilityAnimating',\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 '__deepScan',\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 + diff - bcStart + leading;\n by1 = lineBox.y + 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 + diff + lineHeight + bcEnd - leading;\n by2 = lineBox.y + 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 // 要考虑xom的ox/oy值\n x1 += xom.ox;\n x2 += xom.ox;\n bx1 += xom.ox;\n bx2 += xom.ox;\n y1 += xom.oy;\n y2 += xom.oy;\n by1 += xom.oy;\n by2 += xom.oy;\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 let tfo = [x, y];\n return transform.calMatrixWithOrigin(list, tfo, 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 let tfo = [cx, cy];\n matrix = transform.calMatrixByOrigin(matrix, tfo);\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([item[i], item[i + 1]], t);\n arr.push(p[0]);\n arr.push(p[1]);\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 = [bx1, by1];\n let p2 = [bx2, 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[0]},${p1[1]}L${p2[0]},${p1[1]}L${p2[0]},${p2[1]}L${p1[0]},${p2[1]}L${p1[0]},${p1[1]}`],\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 traversal(list, length, diff, after) {\n if(after) {\n for(let i = 0; i < length; i++) {\n let item = list[i];\n item.__after && item.__after(diff);\n }\n }\n else {\n for(let i = 0; i < length; i++) {\n let item = list[i];\n item.__before && item.__before(diff);\n }\n }\n}\n\nlet isPause;\n\nclass Frame {\n constructor() {\n this.__rootTask = []; // 动画刷新后,每个root注册的刷新回调执行\n this.__task = [];\n this.__now = null;\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 traversal(clone, length, diff, false);\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 traversal(clone, length, diff, true);\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';\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 },\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;\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矩阵\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);\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);\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 cb\n */\nfunction genBeforeRefresh(keys, root, node, cb) {\n root.__addUpdate(node, {\n keys,\n cb,\n });\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 };\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 = [];\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 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 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 hasTp;\n keys.forEach(k => {\n if(k === TRANSLATE_PATH) {\n hasTp = true;\n }\n let ts = calDiff(prev, next, k, target);\n // 可以形成过渡的才会产生结果返回\n if(ts) {\n prev.transition.push(ts);\n prev.keys.push(k);\n }\n else {\n prev.fixed.push(k);\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 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 * 根据百分比和缓动函数计算中间态样式\n * 当easing定义为steps时,优先计算\n * @param frame 当前帧\n * @param percent 到下一帧时间的百分比\n * @param target vd\n * @return {[]} 发生变更的样式key\n */\nfunction calIntermediateStyle(frame, percent, target) {\n let style = frame.style;\n let transition = frame.transition;\n let timingFunction = frame.timingFunction;\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, currentProps = target.__currentProps, res = frame.keys.slice(0);\n for(let i = 0, len = transition.length; i < len; i++) {\n let item = transition[i];\n let k = item.k, v = item.v, st = item.st, cl = item.cl;\n // transform特殊处理,只有1个matrix,有可能不存在,需给默认矩阵\n if(k === TRANSFORM) {\n if(!st || !st.length) {\n st = 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 currentStyle[k] = st;\n }\n else if(k === ROTATE_3D) {\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 currentStyle[k] = st;\n }\n else if(k === FILTER) {\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;\n // 只有dropShadow是多个数组,存放x/y/blur/spread/color\n if(k2 === 'dropShadow') {\n v2[0].v += item[0] * percent;\n v2[1].v += item[1] * percent;\n v2[2].v += item[2] * percent;\n v2[3].v += item[3] * percent;\n let c1 = v2[4], c2 = item[4];\n c1[0] += c2[0] * percent;\n c1[1] += c2[1] * percent;\n c1[2] += c2[2] * percent;\n c1[3] += c2[3] * percent;\n }\n // 其它都是带单位单值\n else {\n v2.v += item * percent;\n }\n }\n }\n currentStyle[k] = st;\n }\n else if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN || isRadiusKey(k)) {\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 currentStyle[k] = st;\n }\n else if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y || k === STROKE_WIDTH) {\n st.forEach((item, i) => {\n if(v[i]) {\n item.v = cl[i].v + v[i] * percent;\n }\n });\n currentStyle[k] = st;\n }\n else if(k === BOX_SHADOW) {\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 currentStyle[k] = st;\n }\n else if(k === BACKGROUND_SIZE) {\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 currentStyle[k] = st;\n }\n else if(k === OPACITY || k === Z_INDEX) {\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 // 特殊的曲线运动计算,转换为translateXY,出现在最后一定会覆盖原本的translate防重\n else if(k === TRANSLATE_PATH) {\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 else if(isLengthKey(k) || isExpandKey(k)) {\n st.v = cl + v * percent;\n currentStyle[k] = st;\n }\n else if(isGradientKey(k)) {\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 currentStyle[k] = st;\n }\n // color可能超限[0,255],但浏览器已经做了限制,无需关心\n else if(isColorKey(k)) {\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 currentStyle[k] = st;\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 let j = res.indexOf(k);\n res.splice(j, 1);\n }\n }\n }\n // 无变化的也得检查是否和当前相等,防止跳到一个不变化的帧上,而前一帧有变化的情况\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 res.push(k);\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 [[], [], [], {}];\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 { style, props } = target;\n let originStyle = {};\n keys.forEach(k => {\n if(isGeom(target.tagName, k)) {\n originStyle[k] = props[k];\n }\n originStyle[k] = style[k];\n });\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 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 this.__isChange = !!keys.length;\n genBeforeRefresh(keys, root, target, 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 // 对比前后两帧是否为同一关键帧,不是则清除之前关键帧上的percent标识\n if(this.__currentFrame !== currentFrame) {\n this.__currentFrame && (this.__currentFrame.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 }\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);\n }\n this.__isChange = !keys.length;\n // 无论两帧之间是否有变化,都生成计算结果赋给style,去重在root做\n genBeforeRefresh(keys, root, target, 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 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 style = frames[frames.length - 1].style;\n }\n else {\n style = framesR[framesR.length - 1].style;\n }\n }\n else {\n style = this.__originStyle;\n }\n let keys = calLastStyle(style, target, this.__keys);\n this.__isChange = !keys.length;\n genBeforeRefresh(keys, root, target, () => {\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 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, () => {\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 },\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 } = mx;\n\nconst {\n contain,\n TRANSFORM: TF,\n REFLOW,\n REPAINT,\n TRANSLATE_X: TX,\n TRANSLATE_Y: TY,\n TRANSLATE_Z: TZ,\n TRANSFORM_ALL,\n CACHE,\n} = level;\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.__isClip = !!this.props.clip;\n this.__isMask = 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 = [];\n this.__frameAnimateList = [];\n this.__contentBoxList = []; // inline存储内容用\n this.__cacheAsBitmap = !!this.props.cacheAsBitmap;\n this.__cache = this.__cacheTotal = this.__cacheFilter = this.__cacheMask = this.__cacheOverflow = null;\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 // 布局前固定尺寸的线设置好,子元素percent尺寸要用到\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 }\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, {\n focus: level.REFLOW,\n });\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.__isMask && next && (next.__isMask)) {\n let count = 0;\n while(next) {\n if(next.__isMask) {\n count++;\n }\n else {\n break;\n }\n next = next.next;\n }\n this.__hasMask = count;\n }\n }\n this.__ox = this.__oy = 0;\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 // 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 this.__offsetY(n, false, null);\n __computedStyle[TOP] = n;\n __computedStyle[BOTTOM] = 'auto';\n }\n else if(bottom.u !== AUTO) {\n let n = calRelative(__currentStyle, BOTTOM, bottom, parent);\n this.__offsetY(-n, false, null);\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 this.__offsetX(n, false, null);\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 this.__offsetX(-n, false, null);\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和6个坐标,inline在其inlineSize特殊处理\n let x = this.__sx = this.__x + this.__ox;\n let y = this.__sy = this.__y + this.__oy;\n if(!this.__isInline) {\n x = this.__sx1 = x + __computedStyle[MARGIN_LEFT];\n x = this.__sx2 = x + __computedStyle[BORDER_LEFT_WIDTH];\n x = this.__sx3 = x + __computedStyle[PADDING_LEFT];\n x = this.__sx4 = x + this.__width;\n x = this.__sx5 = x + __computedStyle[PADDING_RIGHT];\n this.__sx6 = x + __computedStyle[BORDER_RIGHT_WIDTH];\n y = this.__sy1 = y + __computedStyle[MARGIN_TOP];\n y = this.__sy2 = y + __computedStyle[BORDER_TOP_WIDTH];\n y = this.__sy3 = y + __computedStyle[PADDING_TOP];\n y = this.__sy4 = y + this.__height;\n y = this.__sy5 = y + __computedStyle[PADDING_BOTTOM];\n this.__sy6 = y + __computedStyle[BORDER_BOTTOM_WIDTH];\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,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 if(p.__currentStyle[HEIGHT].u !== AUTO) {\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, false, 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, false, null);\n }\n }\n }\n }\n }\n\n __calMatrix(lv, __currentStyle, __computedStyle, __cacheStyle) {\n let {\n __sx1,\n __sy1,\n __offsetWidth,\n __offsetHeight,\n } = this;\n if(this.__isInline) {\n __computedStyle[TRANSFORM_ORIGIN] = [__sx1, __sy1];\n return __cacheStyle[MATRIX] = this.__matrix = mx.identity();\n }\n let matrixCache = __cacheStyle[MATRIX];\n // tx/ty/tz变化特殊优化\n if(matrixCache && lv < REFLOW && !contain(lv, TF)) {\n let x = 0, y = 0, z = 0;\n if(contain(lv, TX)) {\n let v = __currentStyle[TRANSLATE_X];\n if(isNil(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 x = v - (__computedStyle[TRANSLATE_X] || 0);\n __computedStyle[TRANSLATE_X] = v;\n __computedStyle[TRANSFORM][12] += x;\n matrixCache[12] += x;\n }\n if(contain(lv, TY)) {\n let v = __currentStyle[TRANSLATE_Y];\n if(isNil(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 y = v - (__computedStyle[TRANSLATE_Y] || 0);\n __computedStyle[TRANSLATE_Y] = v;\n __computedStyle[TRANSFORM][13] += y;\n matrixCache[13] += y;\n }\n if(contain(lv, TZ)) {\n let v = __currentStyle[TRANSLATE_Z];\n if(isNil(v)) {\n v = 0;\n }\n else {\n v = this.__calSize(v, this.__offsetWidth, true);\n }\n z = v - (__computedStyle[TRANSLATE_Z] || 0);\n __computedStyle[TRANSLATE_Z] = v;\n __computedStyle[TRANSFORM][14] += z;\n matrixCache[14] += z;\n }\n __cacheStyle[MATRIX] = matrixCache;\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 let temp = [];\n [\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n ROTATE_3D,\n SKEW_X,\n SKEW_Y,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n ].forEach(k => {\n // 删除之前遗留的\n delete __computedStyle[k];\n let v = __currentStyle[k];\n if(isNil(v)) {\n return;\n }\n if(k === ROTATE_3D) {\n __computedStyle[k] = [v[0], v[1], v[2], v[3].v];\n if(v[3].v === 0) {\n return;\n }\n temp.push({k, v});\n return;\n }\n __computedStyle[k] = v.v;\n if(k === ROTATE_X || k === ROTATE_Y || k === ROTATE_Z) {\n if(v.v !== 0) {\n temp.push({k, v});\n }\n return;\n }\n // scale为1和其它为0避免计算浪费\n let isScale = k === SCALE_X || k === SCALE_Y || k === SCALE_Z;\n if(v.v === 1 && isScale || !isScale && v.v === 0) {\n return;\n }\n let p = k === TRANSLATE_X || k === TRANSLATE_Z ? __offsetWidth : __offsetHeight;\n __computedStyle[k] = this.__calSize(v, p, true);\n temp.push({k, v});\n });\n if(temp.length) {\n matrix = tf.calMatrix(temp, __offsetWidth, __offsetHeight, this.__root);\n }\n }\n __computedStyle[TRANSFORM] = matrix || mx.identity();\n }\n if(!matrixCache) {\n let m = __computedStyle[TRANSFORM];\n let tfo = __computedStyle[TRANSFORM_ORIGIN].slice(0);\n tfo[0] += __sx1 || 0;\n tfo[1] += __sy1 || 0;\n matrixCache = __cacheStyle[MATRIX] = tf.calMatrixByOrigin(m, tfo);\n }\n }\n return this.__matrix = matrixCache;\n }\n\n /**\n * 将currentStyle计算为computedStyle,同时存入cacheStyle可缓存的结果防止无变更重复计算,返回背景渲染范围\n */\n __calStyle(lv, __currentStyle, __computedStyle, __cacheStyle) {\n let {\n __sx1,\n __sx2,\n __sx3,\n __sx4,\n __sx5,\n __sx6,\n __sy1,\n __sy2,\n __sy3,\n __sy4,\n __sy5,\n __sy6,\n } = this;\n this.__bbox = null;\n let bx1 = __sx1, by1 = __sy1, bx2 = __sx6, by2 = __sy6;\n let backgroundClip = __computedStyle[BACKGROUND_CLIP] = __currentStyle[BACKGROUND_CLIP];\n // 默认border-box\n if(backgroundClip === 'paddingBox') {\n bx1 = __sx2;\n by1 = __sy2;\n bx2 = __sx5;\n by2 = __sy5;\n }\n else if(backgroundClip === 'contentBox') {\n bx1 = __sx3;\n by1 = __sy3;\n bx2 = __sx4;\n by2 = __sy4;\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 ].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]) || contain(lv, TRANSFORM_ALL)) {\n this.__calMatrix(lv, __currentStyle, __computedStyle, __cacheStyle);\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, {\n focus: REPAINT,\n });\n }\n }, {\n ctx,\n root,\n width: bx2 - bx1,\n height: by2 - by1,\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 __sx1, __sx2, __sx5, __sx6, __sy1, __sy2, __sy5, __sy6, 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 __sx1, __sx2, __sx5, __sx6, __sy1, __sy2, __sy5, __sy6, 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 __sx1, __sx2, __sx5, __sx6, __sy1, __sy2, __sy5, __sy6, 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 __sx1, __sx2, __sx5, __sx6, __sy1, __sy2, __sy5, __sy6, 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 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 = [];\n let rebuild;\n let { __sx1, __sy1 } = 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].slice(0);\n po[0] += __sx1 || 0;\n po[1] += __sy1 || 0;\n this.__perspectiveMatrix = tf.calPerspectiveMatrix(ppt, po);\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.getCacheCanvas(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.getCacheCanvas(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.getCacheCanvas(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.getCacheCanvas(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.__sx1,\n y: this.__sy1,\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 * sx1/sx2/sx3/sx4/sx5/sx6/sy1/sy2/sy3/sy4/sy5/sy6 坐标\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.getCacheCanvas(iw, ih, '__$$INLINE_BGI$$__');\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 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, sx1, sy1, sx6, sy6, sx6 - sx1, sy6 - sy1, 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 __destroy() {\n if(this.__isDestroyed) {\n return;\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, __isMask } = this;\n if(__isDestroyed || computedStyle[DISPLAY] === 'none' || e.__stopPropagation || __isMask) {\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.__isClip;\n let hasEmitMask;\n while(next && next.__isMask) {\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 { __sx1, __sy1, __offsetWidth, __offsetHeight, __matrixEvent, __computedStyle } = this;\n if(__computedStyle[POINTER_EVENTS] === 'none') {\n return;\n }\n let inThis = geom.pointInQuadrilateral(\n x, y,\n __sx1, __sy1,\n __sx1 + __offsetWidth, __sy1,\n __sx1 + __offsetWidth, __sy1 + __offsetHeight,\n __sx1, __sy1 + __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(lookUp) {\n let __cacheTotal = this.__cacheTotal;\n let __cacheFilter = this.__cacheFilter;\n let __cacheMask = this.__cacheMask;\n let __cacheOverflow = this.__cacheOverflow;\n let __cache = this.__cache;\n if(__cache) {\n __cache.release();\n }\n if(__cacheTotal) {\n __cacheTotal.release();\n }\n if(__cacheFilter) {\n __cacheFilter.release();\n }\n if(__cacheMask) {\n __cacheMask.release();\n }\n if(__cacheOverflow) {\n __cacheOverflow.release();\n }\n this.__refreshLevel |= CACHE;\n if(lookUp) {\n let p = this.__domParent;\n while(p) {\n let __cacheTotal = p.__cacheTotal;\n let __cacheFilter = p.__cacheFilter;\n let __cacheMask = p.__cacheMask;\n let __cacheOverflow = p.__cacheOverflow;\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 if(__cacheOverflow) {\n __cacheOverflow.release();\n }\n p = p.__domParent;\n }\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, {\n keys,\n cb,\n });\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 __deepScan(cb, options) {\n return cb(this, options);\n }\n\n // isLayout为false时,为relative,true则是absolute等直接改layoutData数据的\n // lv是reflow偏移时传入,需要清除cacheStyle\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, isLayout);\n if(isLayout) {\n this.__layoutData.x += diff;\n this.clearCache();\n }\n this.__sx1 += diff;\n this.__sx2 += diff;\n this.__sx3 += diff;\n this.__sx4 += diff;\n this.__sx5 += diff;\n this.__sx6 += 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 }\n }\n\n __offsetY(diff, isLayout, lv) {\n if(this.computedStyle[DISPLAY] === 'none') {\n return;\n }\n super.__offsetY(diff, isLayout);\n if(isLayout) {\n this.__layoutData && (this.__layoutData.y += diff);\n this.clearCache();\n }\n this.__sy1 += diff;\n this.__sy2 += diff;\n this.__sy3 += diff;\n this.__sy4 += diff;\n this.__sy5 += diff;\n this.__sy6 += 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 }\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.__sx4 += diff;\n this.__sx5 += diff;\n this.__sx6 += 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.__sy4 += diff;\n this.__sy5 += diff;\n this.__sy6 += 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 { __sx1, __sy1, __offsetWidth, __offsetHeight } = this;\n box = [__sx1, __sy1, __sx1 + __offsetWidth, __sy1 + __offsetHeight];\n }\n let matrixEvent = this.matrixEvent;\n let p1 = point2d(mx.calPoint([box[0], box[1]], matrixEvent));\n let p2 = point2d(mx.calPoint([box[2], box[1]], matrixEvent));\n let p3 = point2d(mx.calPoint([box[2], box[3]], matrixEvent));\n let p4 = point2d(mx.calPoint([box[0], box[3]], matrixEvent));\n return {\n left: Math.min(p1[0], Math.min(p2[0], Math.min(p3[0], p4[0]))),\n top: Math.min(p1[1], Math.min(p2[1], Math.min(p3[1], p4[1]))),\n right: Math.max(p1[0], Math.max(p2[0], Math.max(p3[0], p4[0]))),\n bottom: Math.max(p1[1], Math.max(p2[1], Math.max(p3[1], p4[1]))),\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 let res = {\n focus: REFLOW,\n removeDom: true,\n cb,\n };\n root.__addUpdate(this, res);\n }\n\n get tagName() {\n return this.__tagName;\n }\n\n get sx() {\n return this.__sx;\n }\n\n get sy() {\n return this.__sy;\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 __sx1, __sy1, __offsetWidth, __offsetHeight,\n __computedStyle: {\n [BOX_SHADOW]: boxShadow,\n },\n } = this;\n this.__bbox = spreadBoxShadow([__sx1, __sy1, __sx1 + __offsetWidth, __sy1 + __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 isMask() {\n return this.__isMask;\n }\n\n get isClip() {\n return this.__isClip;\n }\n\n get cacheAsBitmap() {\n return this.__cacheAsBitmap;\n }\n\n set cacheAsBitmap(v) {\n this.__cacheAsBitmap = !!v;\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.__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 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 // Geom强制有内容\n return computedStyle[VISIBILITY] !== 'hidden';\n }\n\n __preSet(renderMode, res) {\n let { width, height, __cacheStyle, computedStyle } = this;\n let cx = res.sx3 + width * 0.5;\n let cy = res.sy3 + 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.sx3, res.sy3, res.sx4, res.sy4, 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.sx3, res.sy3, res.sx4, res.sy4, 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([item[i] + dx, item[i + 1] + dy], t);\n arr.push(p[0]);\n arr.push(p[1]);\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([item[i] + dx, item[i + 1] + dy], t);\n arr.push(p[0]);\n arr.push(p[1]);\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 let tfo = [cx, cy];\n matrix = transform.calMatrixByOrigin(matrix, tfo);\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.getCacheCanvas(w, h, '__$$CONIC_GRADIENT$$__');\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 let temp = node;\n while(temp.isShadowRoot) {\n temp = temp.__host;\n temp.__destroy();\n }\n node.__destroy();\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 parent.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 parent.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(true);\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;\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.__isMask) {\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等对齐用\n __offsetX(diff, isLayout, lv) {\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.__sy4 += d;\n item.__sy5 += d;\n item.__sy6 += 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.__sy4 += d;\n item.__sy5 += d;\n item.__sy6 += 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.__sx4 += d;\n item.__sx5 += d;\n item.__sx6 += 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.__sx4 += d;\n item.__sx5 += d;\n item.__sx6 += 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, __ox, __oy } = 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.__sx = minOX + __ox;\n this.__sy = minOY + __oy;\n this.__sx1 = minFX + __ox;\n this.__sy1 = minFY + __oy;\n this.__sx2 = minCX + __ox;\n this.__sy2 = minCY + __oy;\n this.__sx3 = minX + __ox;\n this.__sy3 = minY + __oy;\n this.__sx4 = maxX + __ox;\n this.__sy4 = maxY + __oy;\n this.__sx5 = maxCX + __ox;\n this.__sy5 = maxCY + __oy;\n this.__sx6 = maxFX + __ox;\n this.__sy6 = maxFY + __oy;\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.__sx -= marginLeft + paddingLeft + borderLeftWidth;\n }\n else {\n th = lineHeight;\n this.__ioSize(0, th);\n this.__sy -= marginTop + paddingTop + borderTopWidth;\n }\n this.__sx1 = this.__sx + marginLeft;\n this.__sy1 = this.__sy + marginTop;\n this.__sx2 = this.__sx1 + borderLeftWidth;\n this.__sy2 = this.__sy1 + borderTopWidth;\n this.__sx4 = this.__sx3 = this.__sx2 + paddingLeft;\n this.__sy4 = this.__sy3 = this.__sy2 + paddingTop;\n this.__sx5 = this.__sx4 + tw + paddingRight;\n this.__sy5 = this.__sy4 + th + paddingBottom;\n this.__sx6 = this.__sx5 + borderRightWidth;\n this.__sy6 = this.__sy5 + borderBottomWidth;\n this.__clientWidth = this.__sx5 - this.__sx2;\n this.__clientHeight = this.__sy5 - this.__sy2;\n this.__offsetWidth = this.__sx6 - this.__sx1;\n this.__offsetHeight = this.__sy6 - this.__sy1;\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 { __sx: x, __sy: 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.__sy1 + 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, __isMask, __cacheTotal } = this;\n if(__isDestroyed || computedStyle[DISPLAY] === 'none' || e.__stopPropagation || __isMask) {\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 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 // 深度遍历执行所有子节点,包含自己,如果cb返回true,提前跳出不继续深度遍历\n __deepScan(cb, options) {\n if(super.__deepScan(cb, options)) {\n return;\n }\n this.children.forEach(node => {\n node.__deepScan(cb, options);\n });\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, {\n focus: level.REFLOW,\n addDom: true,\n cb,\n });\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, {\n focus: level.REFLOW,\n addDom: true,\n cb,\n });\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, {\n focus: level.REFLOW,\n addDom: true,\n cb,\n });\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, {\n focus: level.REFLOW,\n addDom: true,\n cb,\n });\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 = ca.width;\n 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 = cache.width;\n 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 __destroy() {\n this.root.delRefreshTask(this.__task);\n super.__destroy();\n this.__task = null;\n }\n\n // img根据加载情况更新__hasContent\n calContent(__currentStyle, __computedStyle) {\n let res = super.calContent(__currentStyle, __computedStyle);\n if(!res) {\n let {\n __loadImg: loadImg,\n } = this;\n // if(loadImg.loading) {\n // this.__loadAndRefresh(loadImg, null);\n // }\n if(__computedStyle[VISIBILITY] !== 'hidden' && (__computedStyle[WIDTH] || __computedStyle[HEIGHT])\n && loadImg.source) {\n res = true;\n }\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.sx3 + dx;\n originY = res.sy3 + 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, {\n focus: level.REPAINT, // 已知宽高无需重新布局\n cb,\n });\n }\n else {\n root.__addUpdate(self, {\n focus: level.REFLOW,\n cb,\n });\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 ctx,\n root,\n width,\n height,\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 { contain, 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.filter !== filter) {\n // if(filter) {\n // elem.setAttribute('filter', filter);\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(mask) {\n elem.setAttribute('mask', mask);\n }\n else {\n elem.removeAttribute('mask');\n }\n if(lv === NONE) {\n return;\n }\n if(contain(lv, TRANSFORM_ALL)) {\n if(transform) {\n elem.setAttribute('transform', transform);\n }\n else {\n elem.removeAttribute('transform');\n }\n }\n if(contain(lv, OPACITY)) {\n if(opacity !== 1 && opacity !== undefined) {\n elem.setAttribute('opacity', opacity);\n }\n else {\n elem.removeAttribute('opacity');\n }\n }\n if(contain(lv, FILTER) || contain(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","import inject from '../util/inject';\n\nlet SIZE = [8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192];\nlet NUMBER = [128, 64, 32, 16, 8, 4, 2, 1, 1, 1, 1];\nlet MAX = SIZE[SIZE.length - 1];\nconst HASH_CANVAS = {};\n\nlet uuid = 0;\n\nclass Page {\n constructor(size, number) {\n this.__size = size;\n this.__number = number;\n this.__free = this.__total = number * number;\n size *= number;\n this.__width = size;\n this.__height = size;\n let offscreen = this.__canvas = inject.getCacheCanvas(size, size, null, number);\n if(offscreen) {\n this.__offscreen = offscreen;\n }\n // 1/0标识n*n个单元格是否空闲可用,一维数组表示\n this.__grid = [];\n for(let i = 0; i < this.__total; i++) {\n this.__grid.push(1);\n }\n this.__uuid = uuid++;\n // webgl贴图缓存使用,一旦更新则标识记录,绑定某号纹理单元查看变化才更新贴图\n this.__update = false;\n this.time = 0;\n }\n\n add() {\n let { number, grid } = this;\n for(let i = 0; i < number; i++) {\n for(let j = 0; j < number; j++) {\n let index = i * number + j;\n if(grid[index]) {\n grid[index] = 0;\n this.__free--;\n return index;\n }\n }\n }\n // 理论不可能进入,除非bug\n throw new Error('Can not find free page');\n }\n\n del(pos) {\n if(!this.grid[pos]) {\n this.grid[pos] = 1;\n this.__free++;\n }\n }\n\n getCoords(pos) {\n let { size, number } = this;\n let x = pos % number;\n let y = Math.floor(pos / number);\n return [x * size, y * size];\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 total() {\n return this.__total;\n }\n\n get free() {\n return this.__free;\n }\n\n get grid() {\n return this.__grid;\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(size) {\n if(size > MAX) {\n return;\n }\n let s = SIZE[0];\n let n = NUMBER[0];\n // 使用刚好满足的尺寸\n for(let i = 0, len = SIZE.length; i < len; i++) {\n s = SIZE[i];\n n = NUMBER[i];\n if(SIZE[i] >= size) {\n break;\n }\n }\n let list = HASH_CANVAS[s] = HASH_CANVAS[s] || [];\n // 从hash列表中尝试取可用的一页,找不到就生成新的页\n let page;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(item.free) {\n page = item;\n break;\n }\n }\n if(!page) {\n page = new Page(s, n);\n if(!page.offscreen) {\n inject.error('Can not create off-screen for page');\n return;\n }\n list.push(page);\n }\n let pos = page.add();\n return { page, pos };\n }\n\n static set CONFIG(v) {\n if(!v || !Array.isArray(v.SIZE) || !Array.isArray(v.NUMBER)) {\n return;\n }\n SIZE = v.SIZE;\n NUMBER = v.NUMBER;\n MAX = SIZE[SIZE.length - 1];\n }\n\n static get CONFIG() {\n return {\n SIZE,\n NUMBER,\n };\n }\n\n static get MAX() {\n return MAX;\n }\n\n static genUuid() {\n return uuid++;\n }\n}\n\nexport default Page;\n","import Page from './Page';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport enums from '../util/enums';\nimport painter from '../util/painter';\nimport debug from '../util/debug';\nimport tf from '../style/transform';\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\n// 根据一个共享cache的信息,生成一个独立的离屏canvas,一般是filter,mask用,可能尺寸会发生变化\nfunction genSingle(cache, message, bboxNew) {\n let { size, sx1, sy1, 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.getCacheCanvas(width, height, null, message);\n offscreen.x = 0;\n offscreen.y = 0;\n offscreen.bbox = bboxNew;\n offscreen.size = size;\n offscreen.sx1 = sx1;\n offscreen.sy1 = sy1;\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\nclass Cache {\n constructor(w, h, bbox, page, pos, x1, y1) {\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 this.__appendData(x1, y1);\n if(page.canvas) {\n this.__enabled = true;\n let ctx = page.ctx;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n if(debug.flag) {\n page.canvas.setAttribute && page.canvas.setAttribute('size', page.size);\n }\n }\n }\n\n __appendData(sx1, sy1) {\n this.sx1 = sx1; // 去除margin的左上角原点坐标\n this.sy1 = sy1;\n let bbox = this.bbox;\n this.dx = this.x - bbox[0]; // cache坐标和box原点的差值\n this.dy = this.y - bbox[1];\n this.dbx = sx1 - bbox[0]; // 原始sx1/sy1和box原点的差值\n this.dby = sy1 - bbox[1];\n this.update();\n }\n\n update() {\n this.page.__update = true;\n }\n\n clear() {\n if(this.__available) {\n let ctx = this.ctx;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n let size = this.page.size;\n ctx.clearRect(this.x, this.y, size, size);\n this.__available = false;\n }\n }\n\n release() {\n if(this.__enabled) {\n this.clear();\n this.__page.del(this.pos);\n this.__page = null;\n this.__enabled = false;\n }\n }\n\n reset(bbox, x1, y1) {\n // 尺寸没变复用之前的并清空\n if(util.equalArr(this.bbox, bbox) && this.__enabled) {\n this.clear();\n return;\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 = Page.getInstance(Math.max(w, h));\n if(!res) {\n this.__enabled = false;\n return;\n }\n let { page, pos } = res;\n this.__init(w, h, bbox, page, pos, x1, y1);\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 canvas() {\n return this.__page.canvas;\n }\n\n get ctx() {\n return this.__page.ctx;\n }\n\n get size() {\n return this.__page.size;\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 static get MAX() {\n return Page.MAX;\n }\n\n static getInstance(bbox, x1, y1) {\n let w = Math.ceil(bbox[2] - bbox[0]);\n let h = Math.ceil(bbox[3] - bbox[1]);\n let res = Page.getInstance(Math.max(w, h));\n if(!res) {\n return;\n }\n let { page, pos } = res;\n return new Cache(w, h, bbox, page, pos, x1, y1);\n }\n\n /**\n * 复制cache的一块出来单独作为cacheFilter,尺寸边距保持一致,用浏览器原生ctx.filter滤镜\n * @param cache\n * @param filter\n * @returns {{canvas: *, ctx: *, release(): void, available: boolean}}\n */\n static genFilter(cache, filter) {\n let { x, y, size, canvas, sx1, sy1, 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.getCacheCanvas(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.sx1 = sx1;\n offscreen.sy1 = sy1;\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.__isClip;\n while(next && next.__isMask) {\n list.push(next);\n next = next.next;\n }\n let { x, y, ctx, dbx, dby } = cacheMask;\n tfo = tfo.slice(0);\n tfo[0] += x + dbx;\n tfo[1] += y + dby;\n let inverse = tf.calMatrixByOrigin(transform, tfo);\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 Cache.drawCache(target, cacheMask);\n ctx.globalCompositeOperation = 'source-over';\n return cacheMask;\n }\n\n /**\n * 如果不超过bbox,直接用已有的total/filter/mask,否则生成一个新的\n */\n static genOverflow(target, node) {\n let { bbox } = target;\n let { __sx1, __sy1, __clientWidth, __clientHeight } = node;\n let xe = __sx1 + __clientWidth;\n let ye = __sy1 + __clientHeight;\n if(bbox[0] < __sx1 || bbox[1] < __sy1 || bbox[2] > xe || bbox[3] > ye) {\n let bboxNew = [__sx1, __sy1, xe, ye];\n let cacheOverflow = genSingle(target, 'overflow', bboxNew);\n let ctx = cacheOverflow.ctx;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n Cache.drawCache(target, cacheOverflow);\n ctx.globalCompositeOperation = 'destination-in';\n ctx.fillStyle = '#FFF';\n ctx.beginPath();\n ctx.rect(0, 0, __clientWidth, __clientHeight);\n ctx.fill();\n ctx.closePath();\n ctx.globalCompositeOperation = 'source-over';\n return cacheOverflow;\n }\n }\n\n static drawCache(source, target) {\n let { x: tx, y: ty, sx1, sy1, ctx, dbx, dby } = target;\n let { x, y, canvas, sx1: sx2, sy1: sy2, dbx: dbx2, dby: dby2, width, height } = source;\n let ox = tx + sx2 - sx1 + dbx - dbx2;\n let oy = ty + sy2 - sy1 + dby - dby2;\n ctx.drawImage(canvas, x, y, width, height, ox, oy, width, height);\n }\n\n static 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\nexport default Cache;\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 inject.releaseCacheCanvas(target.canvas);\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.getCacheCanvas(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 inject.releaseCacheCanvas(apply.canvas);\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 inject.releaseCacheCanvas(target.canvas);\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 inject.releaseCacheCanvas(offscreen.target.canvas);\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 inject.releaseCacheCanvas(mask.canvas);\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 inject.releaseCacheCanvas(mask.canvas);\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 inject.releaseCacheCanvas(target.canvas);\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 inject.releaseCacheCanvas(target.canvas);\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","import Page from '../refresh/Page';\nimport inject from '../util/inject';\n\nclass MockPage {\n constructor(texture, width, height) {\n this.uuid = Page.genUuid();\n this.time = inject.now();\n this.texture = texture;\n this.width = width;\n this.height = height;\n }\n}\n\nexport default MockPage;\n","import MockPage from './MockPage';\n\n/**\n * 一个fbo离屏纹理,mock成cache,当webgl需要局部根节点汇总时生成,即cacheTotal,\n * 基于此纹理进行filter、mask等后处理渲染\n */\nclass MockCache {\n constructor(gl, texture, sx1, sy1, width, height, bbox) {\n this.gl = gl;\n this.x = 0;\n this.y = 0;\n this.sx1 = sx1;\n this.sy1 = sy1;\n this.width = width;\n this.height = height;\n this.bbox = bbox;\n this.available = true;\n this.page = new MockPage(texture, width, height);\n this.reOffset();\n }\n\n reOffset() {\n let bbox = this.bbox;\n this.dx = -bbox[0];\n this.dy = -bbox[1];\n this.dbx = this.sx1 - bbox[0];\n this.dby = this.sy1 - bbox[1];\n }\n\n release() {\n this.available = false;\n this.gl.deleteTexture(this.page.texture);\n }\n}\n\nexport default MockCache;\n","import Cache from './Cache';\nimport offscreen from './offscreen';\nimport Text from '../node/Text';\nimport Dom from '../node/Dom';\nimport Img from '../node/Img';\nimport mode from './mode';\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 MockCache from '../gl/MockCache';\nimport blur from '../math/blur';\nimport vertexBlur from '../gl/filter/blur.vert';\nimport fragmentBlur from '../gl/filter/blur.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';\n\nconst { getCache } = Cache;\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 MATRIX,\n },\n} = enums;\nconst {\n NONE,\n TRANSFORM_ALL,\n OPACITY: OP,\n FILTER: FT,\n REPAINT,\n contain,\n MIX_BLEND_MODE: MBM,\n PERSPECTIVE: PPT,\n CACHE,\n} = level;\nconst { isE, inverse, multiply } = mx;\nconst { mbmName, isValidMbm } = mbm;\nconst { assignMatrix, transformBbox } = util;\n\n/**\n * 生成一个节点及其子节点所包含的矩形范围盒,canvas和webgl的最大尺寸限制不一样,由外部传入\n * 如果某个子节点超限,则视为整个超限,超限返回空\n * @param node\n * @param __structs\n * @param index\n * @param total\n * @param parentIndexHash\n * @param opacityHash\n * @param MAX\n * @param includeLimitCache webgl时即便超限也要强制生成total,所以标识不能跳出\n * @returns {*}\n */\nfunction genBboxTotal(node, __structs, index, total, parentIndexHash, opacityHash, MAX, includeLimitCache) {\n let { __sx1: sx1, __sy1: sy1, __cache } = node;\n let {\n [FILTER]: filter,\n [PERSPECTIVE]: perspective,\n [PERSPECTIVE_ORIGIN]: perspectiveOrigin,\n } = node.__computedStyle;\n // 先将局部根节点的bbox算好,可能没内容是空\n let bboxTotal;\n if(__cache && __cache.available) {\n bboxTotal = __cache.bbox;\n }\n else {\n bboxTotal = node.filterBbox;\n }\n bboxTotal = bboxTotal.slice(0);\n // 局部根节点如有perspective,则计算pm,这里不会出现嵌套,因为每个出现都会生成局部根节点\n let pm;\n if(perspective) {\n pm = tf.calPerspectiveMatrix(perspective, perspectiveOrigin);\n }\n // 广度遍历,不断一层层循环下去,用2个hash暂存每层的父matrix和opacity,blur只需记住顶层,因为子的如果有一定是cacheFilter\n let list = [index];\n let d = 0;\n filter.forEach(item => {\n let { k, v } = item;\n if(k === 'blur') {\n d = blur.outerSize(v);\n }\n });\n opacityHash[index] = 1;\n // opacity可以保存下来层级相乘结果供外部使用,但matrix不可以,因为这里按画布原点为坐标系计算,外部合并局部根节点以bbox左上角为原点\n let matrixHash = {};\n while(list.length) {\n let arr = list.splice(0);\n for(let i = 0, len = arr.length; i < len; i++) {\n let parentIndex = arr[i];\n let total = __structs[parentIndex].total || 0;\n for(let i = parentIndex + 1, len = parentIndex + total + 1; i < len; i++) {\n let {\n node: node2,\n total,\n } = __structs[i];\n // mask也不占bbox位置\n if(node2.__isMask) {\n continue;\n }\n let {\n __sx1,\n __sy1,\n __cache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n __cacheOverflow,\n __limitCache,\n computedStyle: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n [OPACITY]: opacity,\n },\n } = node2;\n // webgl不能跳过超限\n if(__limitCache && !includeLimitCache) {\n return;\n }\n // display:none跳过整个节点树,visibility只跳过自身\n if(display === 'none') {\n i += total || 0;\n continue;\n }\n if(visibility === 'hidden') {\n continue;\n }\n parentIndexHash[i] = parentIndex;\n opacityHash[i] = opacityHash[parentIndex] * opacity;\n let bbox, dx = 0, dy = 0, hasTotal;\n // text不能用filter\n if(node2 instanceof Text) {\n bbox = node2.bbox;\n }\n else {\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal]);\n if(target) {\n bbox = target.bbox;\n dx = target.dbx;\n dy = target.dby;\n i += total || 0;\n hasTotal = true;\n }\n else if(__cache && __cache.available) {\n bbox = __cache.bbox;\n dx = __cache.dbx;\n dy = __cache.dby;\n }\n else {\n bbox = node2.filterBbox;\n }\n }\n // 可能Xom没有内容\n if(bbox) {\n bbox = bbox.slice(0);\n // 相对于根节点偏移\n bbox[0] -= sx1;\n bbox[1] -= sy1;\n bbox[2] -= sx1;\n bbox[3] -= sy1;\n let matrix = matrixHash[parentIndex];\n // 父级matrix初始化E为null,自身不为E时才运算,可以加速\n if(transform && !isE(transform)) {\n let tfo = transformOrigin.slice(0);\n // total下的节点tfo的计算,以total为原点,差值坐标即相对坐标\n tfo[0] += __sx1 - sx1 + dx;\n tfo[1] += __sy1 - sy1 + dy;\n let m = tf.calMatrixByOrigin(transform, tfo);\n if(matrix) {\n matrix = multiply(matrix, m);\n }\n else {\n matrix = m;\n }\n }\n if(matrix) {\n matrixHash[i] = matrix;\n }\n if(pm) {\n matrix = multiply(pm, matrix);\n }\n bbox = transformBbox(bbox, matrix, d, d);\n // 有孩子才继续存入下层级广度运算\n if(total && !hasTotal) {\n list.push(i);\n }\n mergeBbox(bboxTotal, bbox, sx1, sy1);\n }\n }\n }\n }\n return [bboxTotal, pm];\n}\n\nfunction mergeBbox(bbox, t, sx1, sy1) {\n bbox[0] = Math.min(bbox[0], sx1 + t[0]);\n bbox[1] = Math.min(bbox[1], sy1 + t[1]);\n bbox[2] = Math.max(bbox[2], sx1 + t[2]);\n bbox[3] = Math.max(bbox[3], sy1 + t[3]);\n}\n\n/**\n * 生成局部根节点离屏缓存,超限时除外\n * cache是每个节点自身的缓存,且共享离屏canvas\n * cacheTotal是基础\n * cacheFilter基于total\n * cacheOverflow基于filter\n * cacheMask基于overflow\n * cacheBlend基于mask\n * @param renderMode\n * @param node\n * @param index\n * @param lv\n * @param total\n * @param __structs\n * @param hasMask\n * @param width\n * @param height\n * @returns {{enabled}|Cache|*}\n */\nfunction genTotal(renderMode, node, index, lv, total, __structs, hasMask, width, height) {\n let __cacheTotal = node.__cacheTotal;\n // 先绘制形成基础的total,有可能已经存在无变化,就可省略\n if(!__cacheTotal || !__cacheTotal.available) {\n let { __sx1: sx1, __sy1: sy1, bbox } = node;\n // 局部根节点视为E且无透明度,用bbox,子节点用filterBbox\n let bboxTotal = bbox.slice(0);\n assignMatrix(node.__matrixEvent, mx.identity());\n node.__opacity = 1;\n // 先遍历每个节点,以局部根节点为E,求得所占的总的bbox,即合并所有bbox\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 // Text特殊处理,因为有stroke描边\n if(node instanceof Text) {\n let bbox = node.filterBbox, matrix = node.__domParent.__matrixEvent;\n if(!isE(matrix)) {\n bbox = transformBbox(bbox, matrix, 0, 0);\n }\n mergeBbox(bboxTotal, bbox, 0, 0);\n continue;\n }\n let {\n __computedStyle: __computedStyle2,\n __isMask,\n } = node;\n // 跳过display:none元素和它的所有子节点和mask,本身是mask除外\n if(__computedStyle2[DISPLAY] === 'none' || i !== index && __isMask) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n __cacheTotal: __cacheTotal2,\n __cacheFilter: __cacheFilter2,\n __cacheMask: __cacheMask2,\n __cacheOverflow: __cacheOverflow2,\n } = node;\n let p = node.__domParent;\n node.__opacity = __computedStyle2[OPACITY] * p.__opacity;\n let matrix = multiply(node.__matrix, p.__matrixEvent);\n assignMatrix(node.__matrixEvent, matrix);\n let bbox;\n // 子元素有cacheTotal优先使用\n let target = getCache([__cacheMask2, __cacheFilter2, __cacheOverflow2, __cacheTotal2]);\n // 局部根节点的total不需要考虑filter,子节点要\n if(target) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n bbox = target.bbox;\n }\n else {\n bbox = node.filterBbox;\n }\n // 老的不变,新的会各自重新生成,根据matrixEvent合并bboxTotal\n bbox = transformBbox(bbox, matrix, 0, 0);\n mergeBbox(bboxTotal, bbox, 0, 0);\n }\n\n // 生成cacheTotal,获取偏移dx/dy\n __cacheTotal = node.__cacheTotal = Cache.getInstance(bboxTotal, sx1, sy1);\n if(!__cacheTotal || !__cacheTotal.__enabled) {\n inject.warn('Cache of ' + node.tagName + '(' + index + ')' + ' is oversize: '\n + (bboxTotal[2] - bboxTotal[0]) + ', ' + (bboxTotal[3] - bboxTotal[1]));\n return;\n }\n __cacheTotal.__available = true;\n let { dx, dy, dbx, dby, x: tx, y: ty } = __cacheTotal;\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 if(offscreenHash.hasOwnProperty(i)) {\n ctxTotal = applyOffscreen(ctxTotal, offscreenHash[i], 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 if(offscreenHash.hasOwnProperty(i)) {\n ctxTotal = applyOffscreen(ctxTotal, offscreenHash[i], width, height, true);\n }\n continue;\n }\n let {\n __cacheTotal: __cacheTotal2,\n __cacheFilter: __cacheFilter2,\n __cacheMask: __cacheMask2,\n __cacheOverflow: __cacheOverflow2,\n } = node;\n let {\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n } = __computedStyle2;\n if(maskStartHash.hasOwnProperty(i)) {\n let { idx, hasMask, offscreenMask } = maskStartHash[i];\n let target = inject.getCacheCanvas(width, height, null, 'mask2');\n offscreenMask.mask = target; // 应用mask用到\n offscreenMask.isClip = node.__isClip;\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 tfo = tfo.slice(0);\n tfo[0] += dbx + node.__sx1 - sx1 + tx;\n tfo[1] += dby + node.__sy1 - sy1 + ty;\n m = tf.calMatrixByOrigin(transform, tfo);\n if(!isE(parentMatrix)) {\n m = multiply(parentMatrix, m);\n }\n }\n lastMatrix = m;\n // 子元素有cacheTotal优先使用\n let target = i > index && getCache([__cacheMask2, __cacheFilter2, __cacheOverflow2, __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(isValidMbm(mixBlendMode)) {\n ctxTotal.globalCompositeOperation = mbmName(mixBlendMode);\n }\n Cache.drawCache(target, __cacheTotal);\n ctxTotal.globalCompositeOperation = 'source-over';\n if(offscreenHash.hasOwnProperty(i)) {\n ctxTotal = applyOffscreen(ctxTotal, offscreenHash[i], 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 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 // 这里离屏顺序和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 ctxTotal = applyOffscreen(ctxTotal, offscreenHash[i], width, height, false);\n }\n }\n }\n }\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 __cacheOverflow,\n __cacheFilter,\n __cacheMask,\n } = node;\n let {\n [OVERFLOW]: overflow,\n [FILTER]: filter,\n } = __computedStyle;\n let target = __cacheTotal, needGen;\n if(overflow === 'hidden') {\n if(!__cacheOverflow || !__cacheOverflow.available) {\n node.__cacheOverflow = __cacheOverflow = Cache.genOverflow(target, node);\n needGen = true;\n }\n if(__cacheOverflow && __cacheOverflow.available) {\n target = __cacheOverflow;\n }\n }\n if(filter && filter.length) {\n if(!__cacheFilter || !__cacheFilter.available || needGen) {\n node.__cacheFilter = __cacheFilter = Cache.genFilter(target, filter);\n needGen = true;\n }\n if(__cacheFilter && __cacheFilter.available) {\n target = __cacheFilter;\n }\n }\n if(hasMask && (!__cacheMask || !__cacheMask.available || needGen)) {\n node.__cacheMask = __cacheMask = Cache.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, sx1, sy1 } = 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 __cacheOverflow,\n } = node;\n if(maskStartHash.hasOwnProperty(i)) {\n let { idx, hasMask, offscreenMask } = maskStartHash[i];\n let target = inject.getCacheCanvas(width, height, null, 'mask2');\n offscreenMask.mask = target; // 应用mask用到\n offscreenMask.isClip = node.__isClip;\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 tfo = tfo.slice(0);\n tfo[0] += dbx + node.__sx1 - sx1 + tx;\n tfo[1] += dby + node.__sy1 - sy1 + ty;\n m = tf.calMatrixByOrigin(transform, tfo);\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, __cacheOverflow, __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(isValidMbm(mixBlendMode)) {\n ctx.globalCompositeOperation = mbmName(mixBlendMode);\n }\n else {\n ctx.globalCompositeOperation = 'source-over';\n }\n let { x, y, canvas, width, height, sx1: sx2, sy1: sy2, dbx: dbx2, dby: dby2 } = target;\n let ox = tx + sx2 - sx1 + dbx - dbx2;\n let oy = ty + sy2 - sy1 + 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 if(__cacheMask && __cacheMask.available) {\n target = __cacheMask;\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, texCache, width, height) {\n let n = texCache.lockOneChannel();\n let texture = webgl.createTexture(gl, null, n, 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 [n, frameBuffer, texture];\n}\n\n/**\n * 局部根节点复合图层生成,汇总所有子节点到一颗局部树上的位图缓存,包含超限特殊情况\n * 即便只有自己一个也要返回,因为webgl生成total的原因是有类似filter/mask等必须离屏处理的东西\n * @param renderMode\n * @param gl\n * @param texCache\n * @param node\n * @param index\n * @param total\n * @param __structs\n * @param cache\n * @param limitCache\n * @param W\n * @param H\n * @returns {*}\n */\nfunction genTotalWebgl(renderMode, gl, texCache, node, index, total, __structs, cache, limitCache, W, H) {\n // 存每层父亲的matrix和opacity和index,bbox计算过程中生成,缓存给下面渲染过程用\n let parentIndexHash = {};\n let opacityHash = {};\n let [bboxTotal, parentPm] = genBboxTotal(node, __structs, index, total, parentIndexHash, opacityHash,\n gl.getParameter(gl.MAX_TEXTURE_SIZE), limitCache);\n // 可能局部根节点合成过程中发现整体超限\n let totalLimitCache;\n if(!bboxTotal) {\n totalLimitCache = true;\n }\n // 超限情况生成画布大小的特殊纹理\n if(limitCache || totalLimitCache) {\n bboxTotal = [0, 0, W, H];\n }\n let width = bboxTotal[2] - bboxTotal[0];\n let height = bboxTotal[3] - bboxTotal[1];\n let [n, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n // 以bboxTotal的左上角为原点生成离屏texture\n let { __sx1: sx1, __sy1: sy1 } = node;\n let cx = width * 0.5, cy = height * 0.5;\n let dx = -bboxTotal[0], dy = -bboxTotal[1];\n let dbx = sx1 - bboxTotal[0], dby = sy1 - bboxTotal[1];\n // 先绘制自己的cache,起点所以matrix视作E为空,opacity固定1\n if(cache && cache.available) {\n texCache.addTexAndDrawWhenLimit(gl, cache, 1, null, cx, cy, dx, dy, false);\n }\n // limitCache无cache需先绘制到统一的离屏画布上\n else if(limitCache) {\n let c = inject.getCacheCanvas(width, height, '__$$OVERSIZE$$__');\n node.render(mode.CANVAS, c.ctx, 0, 0);\n let j = texCache.lockOneChannel();\n let texture = webgl.createTexture(gl, c.canvas, j);\n let mockCache = new MockCache(gl, texture, 0, 0, width, height, [0, 0, width, height]);\n texCache.addTexAndDrawWhenLimit(gl, mockCache, 1, null, cx, cy, 0, 0, false);\n texCache.refresh(gl, cx, cy);\n c.ctx.setTransform(1, 0, 0, 1, 0, 0);\n c.ctx.globalAlpha = 1;\n c.ctx.clearRect(0, 0, width, height);\n mockCache.release();\n texCache.releaseLockChannel(j);\n }\n // 因为cacheTotal不总是以左上角原点为开始,所以必须每个节点重算matrix,合并box时计算的无法用到\n let matrixHash = {};\n // 先序遍历汇总到total\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 let parentIndex = parentIndexHash[i];\n let matrix = matrixHash[parentIndex]; // 父节点的在每个节点计算后保存,第一个为top的默认为E(空)\n let opacity = opacityHash[i]; // opacity在合并box时已经计算可以直接用\n // 先看text,visibility会在内部判断,display会被parent判断\n if(node instanceof Text) {\n if(parentPm) {\n matrix = multiply(parentPm, matrix);\n }\n texCache.addTexAndDrawWhenLimit(gl, node.__cache, opacity, matrix, cx, cy, dx, dy, false);\n }\n // 再看total缓存/cache,都没有的是无内容的Xom节点\n else {\n let {\n __cache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n __cacheOverflow,\n __isMask,\n } = node;\n let {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n [MIX_BLEND_MODE]: mixBlendMode,\n } = node.__computedStyle;\n if(display === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n // mask和不可见不能被汇总到top上\n if((visibility === 'hidden' || __isMask)) {\n node.render(renderMode, gl, dx, dy);\n gl.useProgram(gl.program);\n gl.viewport(0, 0, width, height);\n continue;\n }\n if(transform && !isE(transform)) {\n let tfo = transformOrigin.slice(0);\n // total下的节点tfo的计算,以total为原点,差值坐标即相对坐标\n if(__cache && __cache.available) {\n tfo[0] += __cache.sx1;\n tfo[1] += __cache.sy1;\n }\n else {\n tfo[0] += node.__sx1;\n tfo[1] += node.__sy1;\n }\n let dx = -sx1 + dbx;\n let dy = -sy1 + dby;\n tfo[0] += dx;\n tfo[1] += dy;\n let m = tf.calMatrixByOrigin(transform, tfo);\n if(matrix) {\n matrix = multiply(matrix, m);\n }\n else {\n matrix = m;\n }\n }\n if(matrix) {\n matrixHash[i] = matrix;\n }\n if(parentPm) {\n matrix = multiply(parentPm, matrix);\n }\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal, __cache]);\n if(target) {\n // 局部的mbm和主画布一样,先刷新当前fbo,然后把后面这个mbm节点绘入一个新的等画布尺寸的fbo中,再进行2者mbm合成\n if(isValidMbm(mixBlendMode)) {\n texCache.refresh(gl, cx, cy);\n let [n2, frameBuffer2, texture2] = genFrameBufferWithTexture(gl, texCache, width, height);\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, matrix, cx, cy, dx, dy, false);\n texCache.refresh(gl, cx, cy);\n // 合成结果作为当前frameBuffer,以及纹理和单元,等于替代了当前fbo作为绘制对象\n [n, frameBuffer, texture] = genMbmWebgl(gl, texCache, n, n2, frameBuffer, texture, mbmName(mixBlendMode), width, height);\n gl.deleteFramebuffer(frameBuffer2);\n gl.deleteTexture(texture2);\n }\n else {\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, matrix, cx, cy, dx, dy, false);\n }\n if(target !== __cache) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n else {\n // webgl特殊的外部钩子,比如粒子组件自定义渲染时调用\n node.render(renderMode, gl, dx, dy);\n gl.useProgram(gl.program);\n gl.viewport(0, 0, width, height);\n }\n }\n }\n }\n node.render(renderMode, gl, dx, dy);\n gl.useProgram(gl.program);\n gl.viewport(0, 0, width, height);\n // 绘制到fbo的纹理对象上并删除fbo恢复\n texCache.refresh(gl, cx, cy);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n gl.viewport(0, 0, W, H);\n // 生成的纹理对象本身已绑定一个纹理单元了,释放lock的同时可以给texCache的channel缓存,避免重复上传\n let mockCache = new MockCache(gl, texture, sx1, sy1, width, height, bboxTotal);\n texCache.releaseLockChannel(n, mockCache.page);\n return [limitCache || totalLimitCache, mockCache];\n}\n\nfunction genFilterWebgl(gl, texCache, node, cache, filter, W, H) {\n let { sx1, sy1, width, height, bbox } = cache;\n let mockCache = cache;\n filter.forEach(item => {\n let { k, v } = item;\n if(k === 'blur' && v > 0) {\n let res = genBlurWebgl(gl, texCache, mockCache, v, width, height, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n else if(k === 'dropShadow') {\n let res = genDropShadowWebgl(gl, texCache, mockCache, v, width, height, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = 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(gl, texCache, mockCache, [\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, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n else if(k === 'saturate' && v !== 100) {\n let amount = v * 0.01;\n let res = genColorMatrixWebgl(gl, texCache, mockCache, [\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, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n else if(k === 'brightness' && v !== 100) {\n let b = v * 0.01;\n let res = genColorMatrixWebgl(gl, texCache, mockCache, [\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, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = 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(gl, texCache, mockCache, [\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, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = 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(gl, texCache, mockCache, [\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, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = 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(gl, texCache, mockCache, [\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, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = 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(gl, texCache, mockCache, [\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, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n });\n // 切换回主程序\n gl.useProgram(gl.program);\n gl.viewport(0, 0, W, H);\n return mockCache;\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(gl, texCache, cache, sigma, width, height, sx1, sy1, bbox) {\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 let limit = gl.getParameter(gl.MAX_TEXTURE_SIZE);\n if(width > limit || height > limit) {\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 let widthNew = width + spread * 2;\n let heightNew = height + spread * 2;\n let cx = widthNew * 0.5, cy = heightNew * 0.5;\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 let program = webgl.initShaders(gl, vert, frag);\n gl.useProgram(program);\n let [i, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, widthNew, heightNew);\n // 将本身total的page纹理放入一个单元,一般刚生成已经在了,少部分情况变更引发的可能不在\n let j = texCache.findExistTexChannel(cache.page);\n if(j === -1) {\n // 直接绑定,因为一定是个mockCache\n j = texCache.lockOneChannel();\n webgl.bindTexture(gl, cache.page.texture, j);\n }\n else {\n texCache.lockChannel(j);\n }\n texture = webgl.drawBlur(gl, program, frameBuffer, texture, cache.page.texture, i, j,\n width, height, spread, widthNew, heightNew, cx, cy);\n // 销毁这个临时program\n gl.deleteShader(program.vertexShader);\n gl.deleteShader(program.fragmentShader);\n gl.deleteProgram(program);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n texCache.releaseLockChannel(j);\n let mockCache = new MockCache(gl, texture, sx1, sy1, widthNew, heightNew, bboxNew);\n texCache.releaseLockChannel(i, mockCache.page);\n return [mockCache, widthNew, heightNew, bboxNew];\n}\n\nfunction genColorMatrixWebgl(gl, texCache, cache, m, width, height, sx1, sy1, bbox) {\n // 生成最终纹理,尺寸为被遮罩节点大小\n let [i, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n // 将本身total的page纹理放入一个单元,一般刚生成已经在了,少部分情况变更引发的可能不在\n let j = texCache.findExistTexChannel(cache.page);\n if(j === -1) {\n // 直接绑定,因为一定是个mockCache\n j = texCache.lockOneChannel();\n webgl.bindTexture(gl, cache.page.texture, j);\n }\n else {\n texCache.lockChannel(j);\n }\n gl.useProgram(gl.programCm);\n webgl.drawCm(gl, gl.programCm, j, m);\n texCache.releaseLockChannel(j);\n // 切回\n gl.useProgram(gl.program);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n // 同total一样生成一个mockCache\n let mockCache = new MockCache(gl, texture, sx1, sy1, width, height, bbox.slice(0));\n texCache.releaseLockChannel(i, mockCache.page);\n return [mockCache, width, height, bbox];\n}\n\nfunction genOverflowWebgl(gl, texCache, node, cache, W, H) {\n let bbox = cache.bbox;\n let { __sx1, __sy1, __clientWidth, __clientHeight } = node;\n let xe = __sx1 + __clientWidth;\n let ye = __sy1 + __clientHeight;\n // 没超过无需生成\n if(bbox[0] >= __sx1 && bbox[1] >= __sy1 && bbox[2] <= xe && ye) {\n return;\n }\n let bboxNew = [__sx1, __sy1, xe, ye];\n // 生成最终纹理,尺寸为被遮罩节点大小\n let [i, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, __clientWidth, __clientHeight);\n // 将本身total的page纹理放入一个单元,一般刚生成已经在了,少部分情况变更引发的可能不在\n let j = texCache.findExistTexChannel(cache.page);\n if(j === -1) {\n // 直接绑定,因为一定是个mockCache\n j = texCache.lockOneChannel();\n webgl.bindTexture(gl, cache.page.texture, j);\n }\n else {\n texCache.lockChannel(j);\n }\n // 绘制,根据坐标裁剪使用原本纹理的一部分\n gl.useProgram(gl.programOverflow);\n webgl.drawOverflow(gl, j, bboxNew[0] - bbox[0], bboxNew[1] - bbox[1], __clientWidth, __clientHeight, cache.width, cache.height);\n texCache.releaseLockChannel(j);\n // 切回\n gl.useProgram(gl.program);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.viewport(0, 0, W, H);\n gl.deleteFramebuffer(frameBuffer);\n // 同total一样生成一个mockCache\n let overflowCache = new MockCache(gl, texture, cache.sx1, cache.sy1, __clientWidth, __clientHeight, bboxNew);\n texCache.releaseLockChannel(i, overflowCache.page);\n return overflowCache;\n}\n\nfunction genMaskWebgl(gl, texCache, node, cache, W, H, lv, __structs) {\n let { sx1, sy1, width, height, bbox, dx, dy } = cache;\n // cache一定是mockCache,可能是total/filter/overflow一种\n let cx = width * 0.5, cy = height * 0.5;\n // 先求得被遮罩的matrix,用作inverse给mask计算\n let {\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n } = node.__computedStyle;\n let inverse;\n if(isE(transform)) {\n inverse = mx.identity();\n }\n else {\n let tfo = transformOrigin.slice(0);\n tfo[0] += sx1 + dx;\n tfo[1] += sy1 + dy;\n inverse = tf.calMatrixByOrigin(transform, tfo);\n }\n inverse = mx.inverse(inverse);\n // 将所有mask绘入一个单独纹理中,尺寸和原点与被遮罩total相同,才能做到顶点坐标一致\n let [i, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n let next = node.next;\n let isClip = next.__isClip;\n let list = [];\n while(next && next.__isMask && next.__isClip === isClip) {\n list.push(next);\n next = next.next;\n }\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\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 struct = item.__struct;\n let index = __structs.indexOf(struct);\n // 可以忽略mbm,因为只有透明遮罩\n for(let i = index, len = index + (struct.total || 0) + 1; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n let __cache = node.__cache;\n let __limitCache = node.__limitCache;\n let computedStyle = node.__computedStyle;\n // 跳过display:none元素和它的所有子节点和mask\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n if(node instanceof Text) {\n if(__cache && __cache.available) {\n // text用父级的matrixEvent,在之前texCache添加到末尾了\n texCache.addTexAndDrawWhenLimit(gl, __cache, parentOpacity, texCache.last[2], cx, cy, 0, 0,true);\n }\n else if(__limitCache) {\n return;\n }\n }\n else {\n let {\n __cache,\n __cacheMask,\n __cacheFilter,\n __cacheOverflow,\n __cacheTotal,\n } = node;\n let {\n [OPACITY]: opacity,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n } = node.__computedStyle;\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, __cacheOverflow, __cacheTotal, __cache]);\n // total和自身cache的尝试,visibility不可见时没有cache\n if(target) {\n let m;\n if(isE(transform)) {\n m = mx.identity();\n }\n else {\n let tfo = transformOrigin.slice(0);\n tfo[0] += target.bbox[0] + dx;\n tfo[1] += target.bbox[1] + dy;\n m = tf.calMatrixByOrigin(transform, tfo);\n }\n m = mx.multiply(inverse, m);\n let tfo = transformOrigin.slice(0);\n tfo[0] += target.bbox[0] + dx;\n tfo[1] += target.bbox[1] + dy;\n lastMatrix = tf.calMatrixByOrigin(transform, tfo);\n if(!isE(parentMatrix)) {\n lastMatrix = multiply(parentMatrix, lastMatrix);\n }\n lastOpacity = parentOpacity * opacity;\n texCache.addTexAndDrawWhenLimit(gl, target, lastOpacity, m, cx, cy, dx, dy, true);\n if(target !== __cache) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n }\n else if(__limitCache) {\n return;\n }\n }\n }\n }\n texCache.refresh(gl, cx, cy);\n gl.deleteFramebuffer(frameBuffer);\n // 将本身total的page纹理放入一个单元,一般刚生成已经在了,少部分情况mask变更引发的可能不在\n let j = texCache.findExistTexChannel(cache.page);\n if(j === -1) {\n // 直接绑定,因为一定是个mockCache\n j = texCache.lockOneChannel();\n webgl.bindTexture(gl, cache.page.texture, j);\n }\n else {\n texCache.lockChannel(j);\n }\n // 生成最终纹理,汇总total和maskCache\n let [n, frameBuffer2, texture2] = genFrameBufferWithTexture(gl, texCache, width, height);\n let program;\n if(isClip) {\n program = gl.programClip;\n }\n else {\n program = gl.programMask;\n }\n gl.useProgram(program);\n webgl.drawMask(gl, i, j, program);\n gl.deleteTexture(texture);\n texCache.releaseLockChannel(i);\n texCache.releaseLockChannel(j);\n // 切换回主程序\n gl.useProgram(gl.program);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.viewport(0, 0, W, H);\n gl.deleteFramebuffer(frameBuffer2);\n // 同total一样生成一个mockCache\n let maskCache = new MockCache(gl, texture2, sx1, sy1, width, height, bbox);\n texCache.releaseLockChannel(n, maskCache.page);\n return maskCache;\n}\n\n/**\n * webgl的dropShadow只生成阴影部分,模糊复用blur,然后进行拼合\n * @param gl\n * @param texCache\n * @param cache\n * @param v\n * @param width\n * @param height\n * @param sx1\n * @param sy1\n * @param bbox\n * @returns {*[]}\n */\nfunction genDropShadowWebgl(gl, texCache, cache, v, width, height, sx1, sy1, bbox) {\n // 先清空之前所有绘制遗留\n texCache.refresh(gl, width * 0.5, height * 0.5);\n // 先根据x/y/color生成单色阴影\n let [x, y, blur, , color] = v;\n let [i, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n // 将本身total的page纹理放入一个单元,一般刚生成已经在了,少部分情况变更引发的可能不在\n let j = texCache.findExistTexChannel(cache.page);\n if(j === -1) {\n // 直接绑定,因为一定是个mockCache\n j = texCache.lockOneChannel();\n webgl.bindTexture(gl, cache.page.texture, j);\n }\n else {\n texCache.lockChannel(j);\n }\n gl.useProgram(gl.programDs);\n texture = webgl.drawDropShadow(gl, gl.programDs, frameBuffer, texture, cache.page.texture, i, j, width, height, color);\n // 部分清除\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n let bboxOld = bbox;\n let mockCache = new MockCache(gl, texture, sx1, sy1, width, height, bbox.slice(0));\n // 复用blur先生成模糊的阴影\n let res = genBlurWebgl(gl, texCache, mockCache, blur, width, height, sx1, sy1, bbox);\n texCache.releaseLockChannel(j); // 不管后续成功如何,都先释放阴影的lock\n gl.useProgram(gl.program);\n if(res) {\n gl.deleteTexture(texture); // 有模糊的阴影后删除之前无模糊的临时阴影\n [mockCache, width, height, bbox] = res;\n // 根据dropShadow的x/y偏移重置模糊阴影的相关数据\n if(x || y) {\n bbox[0] += x;\n bbox[1] += y;\n bbox[2] += x;\n bbox[3] += y;\n // 把模糊阴影当做一张普通的图片\n mockCache.sx1 = bbox[0];\n mockCache.sy1 = bbox[1];\n mockCache.reOffset();\n }\n let bboxMerge = bboxOld.slice(0);\n mergeBbox(bboxMerge, bbox, 0, 0);\n // 合并原本cache和blur的纹理为最终对象,i是最初的cache,j是\n width = bboxMerge[2] - bboxMerge[0];\n height = bboxMerge[3] - bboxMerge[1];\n let cx = width * 0.5, cy = height * 0.5;\n let dx = -bboxMerge[0], dy = -bboxMerge[1];\n let [k, frameBuffer, texture2] = genFrameBufferWithTexture(gl, texCache, width, height);\n // 以merge的bbox的左上角为原点,每个cache要换算一下\n texCache.addTexAndDrawWhenLimit(gl, cache, 1, null, cx, cy, dx, dy, false);\n texCache.addTexAndDrawWhenLimit(gl, mockCache, 1, null, cx, cy, dx, dy, false);\n texCache.refresh(gl, cx, cy, false);\n // 回收\n texCache.releaseLockChannel(i);\n texCache.releaseLockChannel(k);\n gl.deleteFramebuffer(frameBuffer);\n // 同total一样生成一个mockCache,数据和本身一样\n let mockCache2 = new MockCache(gl, texture2, sx1, sy1, width, height, bboxMerge);\n texCache.releaseLockChannel(k, mockCache.page);\n return [mockCache2, width, height, bboxMerge];\n }\n}\n\n/**\n * 生成blendMode混合fbo纹理结果,原本是所有元素向一个fbo记A进行绘制,当出现mbm时,进入到这里,\n * 先生成一个新的fbo记B,将A和待混合节点进行对应的mbm模式混合,结果绘制到B中,然后返回B来替换A,包括纹理单元\n * @param gl\n * @param texCache\n * @param i 之前已有的fbo和纹理单元\n * @param j 当前节点绘制的fbo和纹理单元\n * @param mbm\n * @param fbo 之前舞台绑定的fbo和纹理\n * @param tex\n * @param W\n * @param H\n * @returns {number|*}\n */\nfunction genMbmWebgl(gl, texCache, i, j, fbo, tex, mbm, W, H) {\n let frag;\n mbm = mbmName(mbm);\n if(mbm === 'multiply') {\n frag = fragmentMultiply;\n }\n else if(mbm === 'screen') {\n frag = fragmentScreen;\n }\n else if(mbm === 'overlay') {\n frag = fragmentOverlay;\n }\n else if(mbm === 'darken') {\n frag = fragmentDarken;\n }\n else if(mbm === 'lighten') {\n frag = fragmentLighten;\n }\n else if(mbm === 'color-dodge') {\n frag = fragmentColorDodge;\n }\n else if(mbm === 'color-burn') {\n frag = fragmentColorBurn;\n }\n else if(mbm === 'hard-light') {\n frag = fragmentHardLight;\n }\n else if(mbm === 'soft-light') {\n frag = fragmentSoftLight;\n }\n else if(mbm === 'difference') {\n frag = fragmentDifference;\n }\n else if(mbm === 'exclusion') {\n frag = fragmentExclusion;\n }\n else if(mbm === 'hue') {\n frag = fragmentHue;\n }\n else if(mbm === 'saturation') {\n frag = fragmentSaturation;\n }\n else if(mbm === 'color') {\n frag = fragmentColor;\n }\n else if(mbm === 'luminosity') {\n frag = fragmentLuminosity;\n }\n let program = webgl.initShaders(gl, vertexMbm, frag);\n gl.useProgram(program);\n // 生成新的fbo,将混合结果绘入\n let [n, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, W, H);\n webgl.drawMbm(gl, program, i, j, W, H);\n // 切换回主程序并销毁这个临时program\n gl.useProgram(gl.program);\n gl.viewport(0, 0, W, H);\n gl.deleteShader(program.vertexShader);\n gl.deleteShader(program.fragmentShader);\n gl.deleteProgram(program);\n gl.deleteFramebuffer(fbo);\n gl.deleteTexture(tex);\n texCache.releaseLockChannel(i);\n texCache.releaseLockChannel(j);\n return [n, frameBuffer, texture];\n}\n\nfunction renderSvg(renderMode, ctx, root, isFirst) {\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 || contain(__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 if(maskEffectHash.hasOwnProperty(i)) {\n let v = maskEffectHash[i];\n if(!contain(__refreshLevel, TRANSFORM_ALL) && v < REPAINT && !contain(v, 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.__isClip, // 第一个节点是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 let __cacheStyle = node.__cacheStyle;\n let currentStyle = node.__currentStyle;\n if(contain(__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(contain(__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(contain(__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(contain(__refreshLevel, MBM)) {\n let mixBlendMode = computedStyle[MIX_BLEND_MODE];\n if(isValidMbm(mixBlendMode)) {\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 };\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 if(maskHash.hasOwnProperty(i)\n && (maskEffectHash.hasOwnProperty(i)\n || __refreshLevel >= REPAINT\n || contain(__refreshLevel, TRANSFORM_ALL | OP))) {\n let { index, start, end, isClip } = maskHash[i];\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 }\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.__isMask) {\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) {\n let { __structs, width, height, texCache } = 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) {\n let bbox = node.bbox, sx = node.__sx, sy = node.__sy;\n let __cache = node.__cache;\n if(__cache) {\n __cache.reset(bbox, sx, sy);\n }\n else {\n __cache = Cache.getInstance(bbox, sx, sy);\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 // 根据refreshLevel优化计算\n let {\n __refreshLevel,\n __currentStyle,\n __cacheTotal,\n } = node;\n lastRefreshLevel = __refreshLevel;\n node.__refreshLevel = NONE;\n /**\n * lv=REPAINT那里,小变化不动\n * 当有遮罩时,如果被遮罩节点本身无变更,需要检查其next的遮罩节点有无变更,\n * 但其实不用检查,因为next变更一定会清空cacheMask,只要检查cacheMask即可\n * 如果没有或无效,直接添加,无视节点本身变化,后面防重即可\n */\n if(__refreshLevel < REPAINT) {\n let matrix = node.__matrix;\n let mbm = __computedStyle[MIX_BLEND_MODE];\n let isMbm = contain(__refreshLevel, MBM) && isValidMbm(mbm);\n let __domParent = node.__domParent;\n let isPpt = !isE(__domParent && __domParent.__perspectiveMatrix) || tf.isPerspectiveMatrix(matrix);\n if(isMbm) {\n hasMbm = true;\n }\n // 这里和canvas不一样,前置cacheAsBitmap条件变成或条件之一,新的ppt层级且画中画需要新的fbo\n if(contain(__refreshLevel, FT | MBM)\n || isPpt) {\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);\n // 有内容先以canvas模式绘制到离屏画布上,自定义渲染设置无内容不实现即可跳过\n if(hasContent) {\n let bbox = node.bbox, __cache = node.__cache, sx1 = node.__sx1, sy1 = node.__sy1;\n if(__cache) {\n __cache.reset(bbox, sx1, sy1);\n }\n else {\n __cache = Cache.getInstance(bbox, sx1, sy1);\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 else {\n node.__limitCache = false;\n }\n let {\n [OVERFLOW]: overflow,\n [FILTER]: filter,\n [MIX_BLEND_MODE]: mixBlendMode,\n } = __computedStyle;\n let isMbm = isValidMbm(mixBlendMode);\n let __domParent = node.__domParent;\n let isPpt = !isE(__domParent && __domParent.__perspectiveMatrix) || tf.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 || isMbm\n || isOverflow\n || isPpt) {\n mergeList.push({\n i,\n lv,\n total,\n node,\n hasMask,\n });\n }\n }\n }\n let limitHash = {};\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 mergeList.forEach(item => {\n let {\n i,\n lv,\n total,\n node,\n hasMask,\n } = item;\n let {\n __limitCache,\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) || tf.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(tf.isPerspectiveMatrix(parent.__matrix)) {\n pptHash[idx] = true;\n }\n parent = parent.__domParent;\n if(parent && parent.__perspectiveMatrix) {\n pptHash[idx] = true;\n }\n }\n if(!pptHash[i] && !hasMask && !filter.length && !(overflow === 'hidden' && total) && !node.__cacheAsBitmap) {\n return;\n }\n }\n let {\n __cache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n __cacheOverflow,\n } = node;\n let needGen;\n // 可能没变化,比如被遮罩节点、filter变更等\n if(!__cacheTotal || !__cacheTotal.available) {\n let [limit, res] = genTotalWebgl(renderMode, gl, texCache, node, i, total || 0, __structs, __cache, __limitCache, width, height);\n __cacheTotal = res;\n needGen = true;\n __limitCache = limit;\n // 返回的limit包含各种情况超限,一旦超限,只能生成临时cacheTotal不能保存\n if(!__limitCache) {\n node.__cacheTotal = res;\n }\n }\n // 即使超限,也有total结果\n let target = __cacheTotal;\n if(overflow === 'hidden') {\n if(!__cacheOverflow || !__cacheOverflow.available || needGen) {\n let temp = genOverflowWebgl(gl, texCache, node, target, width, height);\n if(temp) {\n target = temp;\n needGen = true;\n if(!__limitCache) {\n node.__cacheOverflow = target;\n }\n }\n }\n if(__cacheOverflow && __cacheOverflow.available) {\n target = __cacheOverflow;\n }\n }\n if(filter.length) {\n if(!__cacheFilter || !__cacheFilter.available || needGen) {\n let old = target;\n target = genFilterWebgl(gl, texCache, node, target, filter, width, height);\n if(target !== old) {\n needGen = true;\n if(!__limitCache) {\n node.__cacheFilter = target;\n }\n }\n }\n if(__cacheFilter && __cacheFilter.available) {\n target = __cacheFilter;\n }\n }\n if(hasMask && (!__cacheMask || !__cacheMask.available || needGen)) {\n target = genMaskWebgl(gl, texCache, node, target, width, height, lv, __structs);\n if(!__limitCache) {\n node.__cacheMask = target;\n }\n }\n // 保存临时的局部根节点\n if(__limitCache) {\n limitHash[i] = target;\n }\n });\n }\n /**\n * 最后先序遍历一次应用__cacheTotal即可,没有的用__cache,以及剩下的超尺寸的和Text\n * 由于mixBlendMode的存在,需先申请个fbo纹理,所有绘制默认向该纹理绘制,最后fbo纹理再进入主画布\n * 前面循环时有记录是否出现mbm,只有出现才申请,否则不浪费直接输出到主画布\n * 超尺寸的要走无cache逻辑render,和canvas很像,除了离屏canvas超限,汇总total也会纹理超限\n */\n let n, frameBuffer, texture;\n if(hasMbm) {\n [n, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n }\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, __domParent = node.__domParent;\n let {\n __matrixEvent,\n __opacity,\n } = __domParent;\n if(__cache && __cache.available) {\n texCache.addTexAndDrawWhenLimit(gl, __cache, __opacity, __matrixEvent, cx, cy, 0, 0,true);\n }\n // 超限特殊处理,先生成画布尺寸大小的纹理然后原始位置绘制,超限一定有文字内容\n else if(node.__limitCache && __domParent.__computedStyle[VISIBILITY] !== 'hidden') {\n let c = inject.getCacheCanvas(width, height, '__$$OVERSIZE$$__');\n node.render(mode.CANVAS, c.ctx, 0, 0);\n let j = texCache.lockOneChannel();\n let texture = webgl.createTexture(gl, c.canvas, j);\n let mockCache = new MockCache(gl, texture, 0, 0, width, height, [0, 0, width, height]);\n texCache.addTexAndDrawWhenLimit(gl, mockCache, node.__opacity, node.__matrixEvent, cx, cy, 0, 0, true);\n texCache.refresh(gl, cx, cy, true);\n c.ctx.setTransform(1, 0, 0, 1, 0, 0);\n c.ctx.globalAlpha = 1;\n c.ctx.clearRect(0, 0, width, height);\n mockCache.release();\n texCache.releaseLockChannel(j);\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 __cache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n __cacheOverflow,\n __domParent,\n __matrix,\n } = node;\n let {\n [OPACITY]: opacity,\n [MIX_BLEND_MODE]: mixBlendMode,\n } = __computedStyle;\n let m = __matrix;\n if(__domParent) {\n opacity *= __domParent.__opacity;\n let pm = __domParent.__perspectiveMatrix;\n if(!isE(pm)) {\n m = multiply(pm, m);\n }\n m = multiply(__domParent.__matrixEvent, m);\n }\n node.__opacity = opacity;\n assignMatrix(node.__matrixEvent, m);\n // 有total的可以直接绘制并跳过子节点索引,忽略total本身,其独占用纹理单元,注意特殊不取cacheTotal,\n // 这种情况发生在只有overflow:hidden声明但无效没有生成__cacheOverflow的情况,\n // 因为webgl纹理单元缓存原因,所以不用cacheTotal防止切换性能损耗\n // 已取消,因为perspective需要进行独立上下文渲染\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal, __cache]);\n // total和自身cache的尝试,visibility不可见时没有cache\n if(target) {\n // 有mbm先刷新当前fbo,然后把后面这个mbm节点绘入一个新的等画布尺寸的fbo中,再进行2者mbm合成\n if(hasMbm && isValidMbm(mixBlendMode)) {\n texCache.refresh(gl, cx, cy, true);\n let [n2, frameBuffer2, texture2] = genFrameBufferWithTexture(gl, texCache, width, height);\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, m, cx, cy, 0, 0, true);\n texCache.refresh(gl, cx, cy, true);\n // 合成结果作为当前frameBuffer,以及纹理和单元,等于替代了当前画布作为绘制对象\n [n, frameBuffer, texture] = genMbmWebgl(gl, texCache, n, n2, frameBuffer, texture, mbmName(mixBlendMode), width, height);\n gl.deleteFramebuffer(frameBuffer2);\n gl.deleteTexture(texture2);\n }\n else {\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, m, cx, cy, 0, 0, true);\n }\n if(target !== __cache) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n else {\n // webgl特殊的外部钩子,比如粒子组件自定义渲染时调用\n node.render(renderMode, gl, 0, 0);\n gl.useProgram(gl.program);\n gl.viewport(0, 0, width, height);\n }\n }\n else if(limitHash.hasOwnProperty(i)) {\n let target = limitHash[i];\n if(hasMbm && isValidMbm(mixBlendMode)) {\n texCache.refresh(gl, cx, cy, true);\n let [n2, frameBuffer2, texture2] = genFrameBufferWithTexture(gl, texCache, width, height);\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, m, cx, cy, 0, 0, true);\n texCache.refresh(gl, cx, cy, true);\n // 合成结果作为当前frameBuffer,以及纹理和单元,等于替代了当前画布作为绘制对象\n [n, frameBuffer, texture] = genMbmWebgl(gl, texCache, n, n2, frameBuffer, texture, mbmName(mixBlendMode), width, height);\n gl.deleteFramebuffer(frameBuffer2);\n gl.deleteTexture(texture2);\n }\n else {\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, m, cx, cy, 0, 0, true);\n }\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n // webgl特殊的外部钩子,比如粒子组件自定义渲染时调用\n node.render(renderMode, gl, 0, 0);\n gl.useProgram(gl.program);\n gl.viewport(0, 0, width, height);\n }\n // 超限的情况,这里是普通单节点超限,没有合成total后再合成特殊cache如filter/mask/mbm之类的,\n // 直接按原始位置绘制到离屏canvas,再作为纹理绘制即可,特殊的在total那做过降级了\n else if(node.__limitCache && node.__hasContent) {\n let c = inject.getCacheCanvas(width, height, '__$$OVERSIZE$$__');\n node.render(mode.CANVAS, c.ctx, 0, 0);\n let j = texCache.lockOneChannel();\n let texture = webgl.createTexture(gl, c.canvas, j);\n let mockCache = new MockCache(gl, texture, 0, 0, width, height, [0, 0, width, height]);\n texCache.addTexAndDrawWhenLimit(gl, mockCache, opacity, m, cx, cy, 0, 0, true);\n texCache.refresh(gl, cx, cy, true);\n c.ctx.setTransform(1, 0, 0, 1, 0, 0);\n c.ctx.globalAlpha = 1;\n c.ctx.clearRect(0, 0, width, height);\n mockCache.release();\n texCache.releaseLockChannel(j);\n // webgl特殊的外部钩子,比如粒子组件自定义渲染时调用\n node.render(renderMode, gl, 0, 0);\n gl.useProgram(gl.program);\n gl.viewport(0, 0, width, height);\n }\n }\n }\n texCache.refresh(gl, cx, cy, true);\n // 有mbm时将汇总的fbo绘入主画布,否则本身就是到主画布无需多余操作\n if(hasMbm) {\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n texCache.releaseLockChannel(n);\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 let u_texture = gl.getUniformLocation(gl.program, 'u_texture');\n gl.uniform1i(u_texture, n);\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) {\n let { __structs, width, height } = root;\n let mergeList = [];\n /**\n * 先一遍先序遍历收集cacheAsBitmap的节点,说明这棵子树需要缓存,可能出现嵌套,深层级优先、后面优先\n * 可能遇到已有缓存没变化的,这时候不要收集忽略掉,没有缓存的走后面遍历普通渲染\n */\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 if(node.__cacheAsBitmap) {\n if(contain(__refreshLevel, CACHE | FT) || __refreshLevel >= REPAINT) {\n mergeList.push({\n i,\n lv,\n total,\n node,\n hasMask,\n });\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 * 这样保证子节点在前,后节点在前,后节点是为了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, node, i, lv, total || 0, __structs, hasMask, 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 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 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 __cacheOverflow,\n __domParent,\n __matrix,\n } = node;\n // 遮罩对象申请了个离屏,其第一个mask申请另外一个离屏mask2,开始聚集所有mask元素的绘制,\n // 这是一个十分特殊的逻辑,保存的index是最后一个节点的索引,OFFSCREEN_MASK2是最低优先级,\n // 这样当mask本身有filter时优先自身,然后才是OFFSCREEN_MASK2\n if(maskStartHash.hasOwnProperty(i)) {\n let { idx, hasMask, offscreenMask } = maskStartHash[i];\n let target = inject.getCacheCanvas(width, height, null, 'mask2');\n offscreenMask.mask = target; // 应用mask用到\n offscreenMask.isClip = node.__isClip;\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 opacity *= __domParent.__opacity;\n m = multiply(__domParent.__matrixEvent, m);\n }\n node.__opacity = opacity;\n assignMatrix(node.__matrixEvent, m);\n // 有cache声明从而有total的可以直接绘制并跳过子节点索,total生成可能会因超限而失败\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __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(isValidMbm(mixBlendMode)) {\n ctx.globalCompositeOperation = mbmName(mixBlendMode);\n }\n let { x, y, canvas, sx1, sy1, dbx, dby, width, height } = target;\n ctx.drawImage(canvas, x, y, width, height, sx1 - dbx, sy1 - dby, width, height);\n // total应用后记得设置回来\n ctx.globalCompositeOperation = 'source-over';\n // 父超限但子有total的时候,i此时已经增加到了末尾,也需要检查\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height, false);\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 ctx.globalAlpha = opacity;\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 if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height, false);\n }\n }\n }\n }\n}\n\nexport default {\n renderCanvas,\n renderSvg,\n renderWebgl,\n};\n\n","import webgl from './webgl';\nimport MockPage from './MockPage';\nimport inject from '../util/inject';\n\nclass TexCache {\n constructor(units) {\n this.__units = units; // 通道数量限制,8~16\n this.__pages = []; // 存当前page列表,通道数量8~16,缓存收留尽可能多的page\n this.__list = []; // 本次渲染暂存的数据,[cache, opacity, matrix, dx, dy]\n this.__channels = []; // 每个纹理通道记录还是个数组,下标即纹理单元,内容为Page\n this.__locks = []; // 锁定纹理单元列表,下标即纹理单元,内容true为锁定\n this.__lockUnits = 0;\n }\n\n /**\n * webgl每次绘制为添加纹理并绘制,此处尝试尽可能收集所有纹理贴图,以达到尽可能多的共享纹理,再一次性绘制\n * 收集的是Page对象(从cache中取得),里面包含了若干个节点的贴图,canvas本身是2的幂次方大小\n * webgl最少有8个纹理单元最多16个,因此存了一个列表来放这些Page的canvas,刷新后清空,但纹理通道映射记录保留\n * 当8个纹理单元全部满了,进行绘制并清空这个队列,外部主循环结束时也会检查队列是否还有余留并绘制\n * 初始调用队列为空,存入Page对象,后续调用先查看是否存在以便复用,再决定是否存入Page,直到8个满了\n * Page上存有update表示是否更新,每次cache绘制时会变true,以此表示是否有贴图更新,删除可以忽视\n * 还需要一个记录上次纹理通道使用哪个Page的canvas的地方,即映射,清空后队列再次添加时,如果Page之前被添加过,\n * 此次又被添加且没有变更update,可以直接复用上次的纹理单元号且无需再次上传纹理,节省性能\n * 后续接入局部纹理更新也是复用单元号,如果update变更可以选择局部上传纹理而非整个重新上传\n * 判断上传的逻辑在收集满8个后绘制前进行,因为添加队列过程中可能会变更Page及其update\n * @param gl\n * @param cache\n * @param opacity\n * @param matrix\n * @param cx\n * @param cy\n * @param dx\n * @param dy\n * @param revertY\n */\n addTexAndDrawWhenLimit(gl, cache, opacity, matrix, cx, cy, dx = 0, dy = 0, revertY) {\n let pages = this.__pages;\n let list = this.__list;\n let page = cache.page;\n let i = pages.indexOf(page);\n // 找到说明已有page在此索引的通道中,记录下来info\n if(i > -1) {\n list.push([cache, opacity, matrix, dx, dy]);\n }\n // 找不到说明是新的纹理贴图,此时看是否超过纹理单元限制,超过则刷新绘制并清空,然后/否则 存入纹理列表\n else {\n i = pages.length;\n if(i >= this.__units - this.__lockUnits) {\n // 绘制且清空,队列索引重新为0\n this.refresh(gl, cx, cy, revertY);\n }\n pages.push(page);\n list.push([cache, opacity, matrix, dx, dy]);\n }\n }\n\n /**\n * 刷新\n * @param gl\n * @param cx\n * @param cy\n * @param revertY\n */\n refresh(gl, cx, cy, revertY) {\n let pages = this.__pages;\n let list = this.__list;\n // 防止空调用刷新,struct循环结尾会强制调用一次防止有未渲染的\n if(pages.length) {\n let channels = this.channels;\n let locks = this.locks;\n // 先将上次渲染的纹理单元使用的Page形成一个hash,键为page的uuid,值为纹理单元\n let lastHash = {};\n channels.forEach((item, i) => {\n if(item) {\n let uuid = item.uuid;\n lastHash[uuid] = i;\n }\n });\n let units = this.__units;\n // 再遍历,查找相同的Page并保持其使用的纹理单元不变,存入相同索引下标oldList,不同的按顺序收集放newList\n let oldList = new Array(units), newList = [];\n pages.forEach(page => {\n let uuid = page.uuid;\n if(lastHash.hasOwnProperty(uuid)) {\n let index = lastHash[uuid];\n oldList[index] = page;\n }\n else {\n newList.push(page);\n }\n });\n /**\n * 以oldList为基准,将newList依次存入oldList中\n * 优先使用未用过的纹理单元,以便用过的可能下次用到无需重新上传\n * 找不到未用过的后,尝试NRU算法,优先淘汰最近未使用的Page,相等则尺寸小的\n */\n if(newList.length) {\n // 先循环找空的,oldList空且channels空且locks空\n for(let i = 0; i < units; i++) {\n if(!oldList[i] && !channels[i] &&!locks[i]) {\n oldList[i] = newList.shift();\n if(!newList.length) {\n break;\n }\n }\n }\n let len = newList.length;\n if(len) {\n // 按时间排序已使用channel且未被当前占用的,以便淘汰最久未使用的\n let cl = [];\n for(let i = 0; i < units; i++) {\n if(!oldList[i] && !locks[i]) {\n cl.push([i, channels[i]]);\n }\n }\n cl.sort(function(a, b) {\n if(a[1].time !== b[1].time) {\n return (a[1].time || 0) - (b[1].time || 0);\n }\n if(a[1].fullSize !== b[1].fullSize) {\n return a[1].fullSize - b[1].fullSize;\n }\n return a[0] - b[0];\n });\n // cl靠前是时间小尺寸小的,优先使用替换\n for(let i = 0; i < len; i++) {\n oldList[cl[i][0]] = newList[i];\n }\n }\n }\n /**\n * 对比上帧渲染的和这次纹理单元情况,Page相同且!update可以省略更新,其它均重新赋值纹理\n * 后续局部更新Page相同但有update,会出现没有上帧的情况如初始渲染,此时先创建纹理单元再更新\n * 将新的数据赋给老的,可能新的一帧使用的少于上一帧,老的没用到的需继续保留\n */\n let hash = {};\n for(let i = 0, len = oldList.length; i < len; i++) {\n let page = oldList[i];\n // 可能为空,不满的情况下前面单元保留老tex先用的后面的单元\n if(!page) {\n continue;\n }\n let last = channels[i];\n if(!last || last !== page || page.update) {\n // page可能为一个已有fbo纹理,或者贴图\n if(page instanceof MockPage) {\n webgl.bindTexture(gl, page.texture, i);\n }\n else {\n // 可能老的先删除,注意只删Page,MockPage是fbo生成的texture即total缓存不能自动清除\n if(last && !(last instanceof MockPage)) {\n gl.deleteTexture(last.texture);\n }\n page.texture = webgl.createTexture(gl, page.canvas, i);\n }\n channels[i] = page;\n }\n hash[page.uuid] = i;\n // 标识没有更新,以及最后使用时间\n page.update = false;\n page.time = inject.now();\n }\n // 再次遍历开始本次渲染并清空\n webgl.drawTextureCache(gl, list, hash, cx, cy, revertY);\n pages.splice(0);\n list.splice(0);\n }\n }\n\n findExistTexChannel(page) {\n return this.channels.indexOf(page);\n }\n\n /**\n * 获取并锁定一个纹理单元优先使用空的,其次最久未使用的\n * @returns {number|*}\n */\n lockOneChannel() {\n // 优先返回空单元\n let channels = this.channels;\n let locks = this.locks;\n for(let i = 0; i < this.__units; i++) {\n if(!channels[i] && !locks[i]) {\n locks[i] = true;\n this.__lockUnits++;\n return i;\n }\n }\n // 根据NRU返回最久未使用的\n let units = this.__units;\n let cl = [];\n for(let i = 0; i < units; i++) {\n if(!locks[i]) {\n cl.push([i, channels[i]]);\n }\n }\n if(cl.length) {\n cl.sort(function(a, b) {\n if(a[1].time !== b[1].time) {\n return (a[1].time || 0) - (b[1].time || 0);\n }\n if(a[1].fullSize !== b[1].fullSize) {\n return a[1].fullSize - b[1].fullSize;\n }\n return a[0] - b[0];\n });\n let i = cl[0][0];\n channels[i] = null;\n locks[i] = true;\n this.__lockUnits++;\n return i;\n }\n throw new Error('No free texture unit');\n }\n\n /**\n * 释放掉i单元,并且设置内容到缓存channel中\n * @param i\n * @param setToChannel\n */\n releaseLockChannel(i, setToChannel) {\n if(this.locks[i]) {\n this.locks[i] = false;\n this.__lockUnits--;\n if(setToChannel) {\n this.channels[i] = setToChannel;\n }\n }\n }\n\n // 指定锁定一个单元\n lockChannel(i) {\n let channels = this.channels;\n let locks = this.locks;\n if(!locks[i]) {\n channels[i] = null;\n locks[i] = true;\n this.__lockUnits++;\n }\n }\n\n /**\n * 释放纹理单元\n * @param gl\n */\n release(gl) {\n this.channels.forEach(item => {\n if(item) {\n gl.deleteTexture(item.texture);\n }\n });\n }\n\n get channels() {\n return this.__channels;\n }\n\n get locks() {\n return this.__locks;\n }\n\n get last() {\n let list = this.__list, len = list.length;\n if(len) {\n return list[len - 1];\n }\n }\n}\n\nexport default TexCache;\n","import 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 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 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 webgl from '../gl/webgl';\nimport ca from '../gl/ca';\nimport TexCache from '../gl/TexCache';\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, isObject, isFunction } = util;\nconst { PX, INHERIT } = unit;\nconst {\n contain,\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} = level;\nconst { isGeom } = change;\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.__taskUp = [];\n this.__task = [];\n this.__ref = {};\n this.__reflowList = [{ node: this }]; // 初始化填自己,第一次布局时复用逻辑完全重新布局\n this.__animateController = new Controller();\n Event.mix(this);\n this.__updateHash = {};\n this.__uuid = uuid++;\n this.__rlv = REBUILD; // 每次刷新最大lv\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.__children = builder.initRoot(this.__cd, this);\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 this.__defs = this.dom.__defs || Defs.getInstance(this.__uuid);\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(this.tagName === 'canvas') {\n this.__ctx = this.__dom.getContext('2d', params);\n this.__renderMode = mode.CANVAS;\n }\n else if(this.tagName === 'svg') {\n this.__renderMode = mode.SVG;\n }\n else if(this.tagName === 'webgl') {\n let gl = this.__ctx = this.__dom.getContext('webgl', params);\n this.__renderMode = mode.WEBGL;\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, vertexMask, fragmentOverflow);\n gl.programCm = webgl.initShaders(gl, vertexCm, fragmentCm);\n gl.programDs = webgl.initShaders(gl, vertexDs, fragmentDs);\n gl.useProgram(gl.program);\n // 第一次渲染生成纹理缓存管理对象,收集渲染过程中生成的纹理并在gl纹理单元满了时进行绘制和清空,减少texImage2d耗时问题\n const MAX_TEXTURE_IMAGE_UNITS = Math.min(16, gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS));\n this.__texCache = new TexCache(MAX_TEXTURE_IMAGE_UNITS);\n }\n this.refresh(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 __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 refresh(isFirst) {\n // this.__hookTask = null;\n let { isDestroyed, renderMode, ctx, defs } = this;\n if(isDestroyed) {\n return;\n }\n defs.clear();\n // 首次递归测量整树的继承,后续更改各自更新机制做,防止每次整树遍历;root检查首次直接做,后续在checkUpdate()中插入\n if(isFirst) {\n this.__reLayout();\n }\n // 非首次刷新如果没有更新则无需继续\n // else if(!this.__checkUpdate(renderMode, ctx, width, height)) {\n // return;\n // }\n // this.__checkReflow(width, height);\n if(this.props.noRender) {\n return;\n }\n if(renderMode === mode.CANVAS) {\n this.__clear(ctx, renderMode);\n struct.renderCanvas(renderMode, ctx, this);\n }\n // svg的特殊diff需要\n else if(renderMode === mode.SVG) {\n struct.renderSvg(renderMode, defs, this, isFirst);\n let nvd = this.virtualDom;\n nvd.defs = defs.value;\n if(this.dom.__vd) {\n // console.log(this.dom.__vd);\n // console.log(nvd);\n domDiff(this.dom, this.dom.__vd, nvd);\n }\n else {\n this.dom.innerHTML = util.joinVirtualDom(nvd);\n }\n this.dom.__vd = nvd;\n this.dom.__defs = defs;\n }\n else if(renderMode === mode.WEBGL) {\n this.__clear(ctx, renderMode);\n struct.renderWebgl(renderMode, ctx, this);\n }\n // 特殊cb,供小程序绘制完回调使用\n // if(isFunction(cb)) {\n // cb();\n // }\n this.emit(Event.REFRESH, this.__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.__texCache && gl) {\n this.__texCache.release(gl);\n if(gl.program) {\n gl.deleteShader(gl.program.vertexShader);\n gl.deleteShader(gl.program.fragmentShader);\n gl.deleteProgram(gl.program);\n }\n if(gl.programMask) {\n gl.deleteShader(gl.programMask.vertexShader);\n gl.deleteShader(gl.programMask.fragmentShader);\n gl.deleteProgram(gl.programMask);\n }\n if(gl.programOverflow) {\n gl.deleteShader(gl.programOverflow.vertexShader);\n gl.deleteShader(gl.programOverflow.fragmentShader);\n gl.deleteProgram(gl.programOverflow);\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 addRefreshTask(cb) {\n let { taskUp, isDestroyed } = this;\n if(isDestroyed) {\n return;\n }\n // 第一个添加延迟侦听,后续放队列等待一并执行\n if(!taskUp.length) {\n let clone;\n frame.nextFrame({\n __before: diff => {\n if(this.isDestroyed) {\n return;\n }\n clone = taskUp.splice(0);\n // 前置一般是动画计算此帧样式应用,然后刷新后出发frame事件,图片加载等同\n if(clone.length) {\n clone.forEach((item, i) => {\n if(isObject(item) && isFunction(item.__before)) {\n item.__before(diff);\n }\n });\n }\n },\n __after: diff => {\n if(this.isDestroyed) {\n return;\n }\n clone.forEach(item => {\n if(isObject(item) && isFunction(item.__after)) {\n item.__after(diff);\n }\n else if(isFunction(item)) {\n item(diff);\n }\n });\n }\n });\n this.__frameHook();\n }\n if(taskUp.indexOf(cb) === -1) {\n taskUp.push(cb);\n }\n }\n\n // addForceRefreshTask(cb) {\n // this.__hasRootUpdate = true;\n // this.addRefreshTask(cb);\n // }\n\n delRefreshTask(cb) {\n if(!cb) {\n return;\n }\n let { taskUp } = this;\n for(let i = 0, len = taskUp.length; i < len; i++) {\n if(taskUp[i] === cb) {\n taskUp.splice(i, 1);\n break;\n }\n }\n }\n\n getTargetAtPoint(x, y, includeIgnore) {\n function scan(vd, x, y, path, zPath) {\n let { __sx1, __sy1, 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 __sx1, __sy1,\n __sx1 + offsetWidth, __sy1,\n __sx1 + offsetWidth, __sy1 + offsetHeight,\n __sx1, __sy1 + 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, o) {\n if(node instanceof Component) {\n node = node.shadowRoot;\n }\n let {\n keys,\n focus,\n addDom,\n removeDom,\n } = o;\n let {\n computedStyle,\n currentStyle,\n cacheStyle,\n __cacheProps,\n __isMask,\n __domParent,\n } = node;\n let hasZ, hasVisibility, hasColor, hasDisplay, hasTsColor, hasTsWidth, hasTsOver;\n let lv = focus || NONE;\n // 清空对应改变的cacheStyle\n if(keys) {\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([TOP, RIGHT, BOTTOM, LEFT].indexOf(k) > -1\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 // 没有变化,add/remove强制focus\n // 本身节点为none,变更无效,此时没有display变化,add/remove在操作时已经判断不会进入\n if(lv === NONE || computedStyle[DISPLAY] === 'none' && !hasDisplay) {\n if(isFunction(o.cb)) {\n o.cb();\n }\n return;\n }\n // transform变化清空重算,比较特殊,MATRIX的cache需手动清理\n if(contain(lv, TF)) {\n cacheStyle[MATRIX] = computedStyle[TRANSFORM] = undefined;\n }\n // mask需清除遮罩对象的缓存\n if(__isMask) {\n let prev = node.__prev;\n while(prev && (prev.__isMask)) {\n prev = prev.__prev;\n }\n if(prev && prev.__cacheMask) {\n prev.__cacheMask.release();\n prev.__refreshLevel |= CACHE;\n }\n }\n let isRp = isRepaint(lv);\n if(isRp) {\n // dom在>=REPAINT时total失效,svg的Geom比较特殊\n let need = lv >= REPAINT;\n if(need) {\n if(node.__cache) {\n node.__cache.release();\n }\n node.__calStyle(lv, currentStyle, computedStyle, cacheStyle);\n node.__calPerspective(currentStyle, computedStyle, cacheStyle);\n }\n // < REPAINT特殊的优化computedStyle计算\n else {\n if(contain(lv, PPT)) {\n node.__calPerspective(currentStyle, computedStyle, cacheStyle);\n }\n if(contain(lv, TRANSFORM_ALL)) {\n node.__calMatrix(lv, currentStyle, computedStyle, cacheStyle);\n }\n if(contain(lv, OP)) {\n computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n if(contain(lv, FT)) {\n node.__calFilter(currentStyle, computedStyle, cacheStyle);\n }\n if(contain(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共用,TODO:优化判断ppt\n if(need || contain(lv, PPT)) {\n if(node.__cacheTotal) {\n node.__cacheTotal.release();\n }\n if(node.__cacheMask) {\n node.__cacheMask.release();\n }\n if(node.__cacheOverflow) {\n node.__cacheOverflow.release();\n }\n }\n // 特殊的filter清除cache\n if((need || contain(lv, FT)) && node.__cacheFilter) {\n node.__cacheFilter.release();\n }\n // 向上清除cache汇总缓存信息,过程中可能会出现重复,根据refreshLevel判断,reflow已经自己清过了\n let p = __domParent;\n while(p) {\n if(contain(p.__refreshLevel, CACHE | REPAINT | REFLOW)) {\n break;\n }\n p.__refreshLevel |= CACHE;\n if(p.__cacheTotal) {\n p.__cacheTotal.release();\n }\n if(p.__cacheFilter) {\n p.__cacheFilter.release();\n }\n if(p.__cacheMask) {\n p.__cacheMask.release();\n }\n if(p.__cacheOverflow) {\n p.__cacheOverflow.release();\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 node.__cacheTotal.release();\n reflow.clearSvgCache(__domParent);\n }\n }\n }\n else {\n let top = reflow.checkTop(this, node, addDom, removeDom);\n if(top === this) {\n this.__reLayout();\n if(removeDom) {\n let temp = node;\n while(temp.isShadowRoot) {\n temp = temp.__host;\n temp.__destroy();\n }\n }\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 }\n node.__refreshLevel |= lv;\n if(addDom || removeDom) {\n this.__rlv |= REBUILD;\n }\n else {\n this.__rlv |= lv;\n }\n if(o.cb && !isFunction(o.cb)) {\n o.cb = null;\n }\n this.__frameRefresh(o.cb);\n }\n\n // 异步进行root刷新操作,多次调用缓存结果,刷新成功后回调\n __frameRefresh(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.refresh();\n list.forEach(item => {\n item && item();\n });\n });\n }\n this.__task.push(cb);\n }\n\n __clear(ctx, renderMode) {\n if(renderMode === mode.CANVAS) {\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 else if(renderMode === mode.WEBGL) {\n ctx.clearColor(0, 0, 0, 0);\n ctx.clear(ctx.COLOR_BUFFER_BIT);\n }\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 taskUp() {\n return this.__taskUp;\n }\n\n get ref() {\n return this.__ref;\n }\n\n get animateController() {\n return this.__animateController;\n }\n\n get texCache() {\n return this.__texCache;\n }\n}\n\nexport default Root;\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(x1, y1, x2, y2, controlA, controlB, num, start = 0, end = 1) {\n if(start === 0 && end === 1) {\n return [x1, y1, x2, y2, 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 [[x1, y1], controlA, controlB, [x2, y2]] = bezier.sliceBezier2Both([[x1, y1], controlA, controlB, [x2, y2]], start, end);\n }\n else if(num === 2) {\n [[x1, y1], controlB, [x2, y2]] = bezier.sliceBezier2Both([[x1, y1], controlB, [x2, y2]], start, end);\n }\n else if(num === 1) {\n [[x1, y1], controlA, [x2, y2]] = bezier.sliceBezier2Both([[x1, y1], controlA, [x2, y2]], start, end);\n }\n else {\n let a = x2 - x1;\n let b = y2 - y1;\n x1 += a * start;\n y1 += b * start;\n x2 += a * (1 - end);\n y2 += b * (1 - end);\n }\n return [x1, y1, x2, y2, controlA, controlB];\n}\n\nclass Line extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // x1,y1和x2,y2表明线段的首尾坐标,control表明控制点坐标\n if(this.isMulti) {\n this.__x1 = [0];\n this.__y1 = [0];\n this.__x2 = [1];\n this.__y2 = [1];\n this.__controlA = [[]];\n this.__controlB = [[]];\n this.__start = [0];\n this.__end = [1];\n if(Array.isArray(props.x1)) {\n this.__x1 = props.x1.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.x1)) {\n this.__x1 = [parseFloat(props.x1) || 0];\n }\n if(Array.isArray(props.y1)) {\n this.__y1 = props.y1.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.y1)) {\n this.__y1 = [parseFloat(props.y1) || 0];\n }\n if(Array.isArray(props.x2)) {\n this.__x2 = props.x2.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.x2)) {\n this.__x2 = [parseFloat(props.x2) || 0];\n }\n if(Array.isArray(props.y2)) {\n this.__y2 = props.y2.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.y2)) {\n this.__y2 = [parseFloat(props.y2) || 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.__x1.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.__x1.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.__x1.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.__x1.map(() => v);\n }\n }\n else {\n this.__x1 = this.__y1 = this.__start = 0;\n this.__x2 = this.__y2 = this.__end = 1;\n this.__controlA = [];\n this.__controlB = [];\n if(!isNil(props.x1)) {\n this.__x1 = parseFloat(props.x1) || 0;\n }\n if(!isNil(props.y1)) {\n this.__y1 = parseFloat(props.y1) || 0;\n }\n if(!isNil(props.x2)) {\n this.__x2 = parseFloat(props.x2) || 0;\n }\n if(!isNil(props.y2)) {\n this.__y2 = parseFloat(props.y2) || 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 ['x1', 'x2'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = reBuild(this[k], originX, width, isMulti);\n }\n });\n ['y1', 'y2'].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 sx3,\n sy3,\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(sx3, sy3);\n if(rebuild && renderMode === mode.SVG) {\n let d = '';\n if(isMulti) {\n __cacheProps.x1.forEach((xa, i) => {\n let xb = __cacheProps.x2[i];\n let ya = __cacheProps.y1[i];\n let yb = __cacheProps.y2[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 { x1, y1, x2, y2, controlA, controlB, start, end } = __cacheProps;\n if(start !== 0 || end !== 1) {\n [x1, y1, x2, y2, controlA, controlB] = getNewPoint(x1, y1, x2, y2, controlA, controlB, curve, start, end, __cacheProps.len);\n }\n d = painter.svgLine(x1, y1, x2, y2, 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.x1.forEach((xa, i) => {\n let xb = __cacheProps.x2[i];\n let ya = __cacheProps.y1[i];\n let yb = __cacheProps.y2[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 { x1, y1, x2, y2, controlA, controlB, start, end } = __cacheProps;\n if(start !== 0 || end !== 1) {\n [x1, y1, x2, y2, controlA, controlB] = getNewPoint(x1, y1, x2, y2, controlA, controlB, curve, start, end, __cacheProps.len);\n }\n painter.canvasLine(ctx, x1, y1, x2, y2, 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 x1() {\n return this.getProps('x1');\n }\n\n get y1() {\n return this.getProps('y1');\n }\n\n get x2() {\n return this.getProps('x2');\n }\n\n get y2() {\n return this.getProps('y2');\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 __sx3: originX, __sy3: originY,\n computedStyle: {\n [STROKE_WIDTH]: strokeWidth,\n },\n } = this;\n this.buildCache(originX, originY);\n let { x1, y1, x2, y2, 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 x1 = [x1];\n x2 = [x2];\n y1 = [y1];\n y2 = [y2];\n controlA = [controlA];\n controlB = [controlB];\n }\n x1.forEach((xa, i) => {\n let ya = y1[i];\n let xb = x2[i];\n let yb = y2[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], xb - half);\n bbox[1] = Math.min(bbox[1], ya - half);\n bbox[1] = Math.min(bbox[1], yb - half);\n bbox[2] = Math.max(bbox[2], xa + half);\n bbox[2] = Math.max(bbox[2], xb + half);\n bbox[3] = Math.max(bbox[3], ya + half);\n bbox[3] = Math.max(bbox[3], yb + half);\n }\n else if(isNil(ca) || ca.length < 2) {\n let bezierBox = bezier.bboxBezier(xa, ya, cb[0], cb[1], xb, yb);\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, ya, ca[0], ca[1], xb, yb);\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, ya, ca[0], ca[1], cb[0], cb[1], xb, yb);\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","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 __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.sx3, res.sy3);\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 __sx3: originX, __sy3: 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 __sx3: originX, __sy3: 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.sx3, res.sy3);\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 __sx3: originX, __sy3: 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 __sx3: originX, __sy3: 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 __sx3: originX, __sy3: 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 util from './util';\nimport $$type from './$$type';\n\nconst { TYPE_VD, TYPE_GM, TYPE_CP } = $$type;\n\n/**\n * 2. 打平children中的数组,变成一维\n * 3. 合并相连的Text节点,即string内容\n */\nfunction flattenJson(parent) {\n if(Array.isArray(parent)) {\n return parent.map(item => flattenJson(item));\n }\n else if(!parent || [TYPE_VD, TYPE_GM, TYPE_CP].indexOf(parent.$$type) === -1 || !Array.isArray(parent.children)) {\n return parent;\n }\n let list = [];\n traverseJson(list, parent.children, {\n lastText: null,\n });\n parent.children = list;\n return parent;\n}\n\nfunction traverseJson(list, children, options) {\n if(Array.isArray(children)) {\n children.forEach(item => {\n traverseJson(list, item, options);\n });\n }\n else if(children && (children.$$type === TYPE_VD || children.$$type === TYPE_GM)) {\n if(['canvas', 'svg', 'webgl'].indexOf(children.tagName) > -1) {\n throw new Error('Can not nest canvas/svg/webgl');\n }\n if(children.$$type === TYPE_VD) {\n flattenJson(children);\n }\n list.push(children);\n options.lastText = null;\n }\n else if(children && children.$$type === TYPE_CP) {\n list.push(children);\n // 强制component即便返回text也形成一个独立的节点,合并在layout布局中做\n options.lastText = null;\n }\n // 排除掉空的文本,连续的text合并\n else if(!util.isNil(children) && children !== '') {\n if(options.lastText !== null) {\n list[list.length - 1] = options.lastText += children;\n }\n else {\n list.push(children);\n }\n }\n}\n\nexport default flattenJson;\n","import Xom from '../node/Xom';\nimport Dom from '../node/Dom';\nimport Component from '../node/Component';\nimport util from './util';\nimport inject from './inject';\nimport flatten from './flatten';\nimport $$type from './$$type';\n\nconst { TYPE_VD, TYPE_GM, TYPE_CP } = $$type;\n\nlet updateList = [];\nlet removeList = [];\n\nconst KEY_FLAG = {};\n\n/**\n * setState后刷新前先根遍历检查组件开始进行shouldComponentUpdate判断\n */\nfunction check(vd) {\n if(vd instanceof Dom) {\n vd.children.forEach(child => {\n if(child instanceof Dom) {\n check(child);\n }\n // 当组件有setState更新时,从叶子到根链路会标识__hasCpUpdate,以便节约遍历成本忽略那些没变化的链路\n else if(child instanceof Component && child.__hasCpUpdate) {\n child.__hasCpUpdate = false;\n checkCp(child, child.props);\n }\n });\n }\n // 高阶组件会进入此分支,被父组件调用\n else if(vd instanceof Component && vd.__hasCpUpdate) {\n vd.__hasCpUpdate = false;\n checkCp(vd, vd.props);\n }\n}\n\n/**\n * 检查cp是否有state变更,注意递归检查时需要看shadow不能看shadowRoot,\n * 否则高阶组件会被跳过,其更新无法触发update生命周期\n * @param cp\n * @param nextProps\n * @param forceCheckUpdate,被render()后的json的二级组件,发现props有变更强制检查更新,否则可以跳过\n */\nfunction checkCp(cp, nextProps, forceCheckUpdate) {\n if(cp.__nextState || forceCheckUpdate) {\n let shouldUpdate;\n if(util.isFunction(cp.shouldComponentUpdate)) {\n shouldUpdate = cp.shouldComponentUpdate(nextProps, cp.__nextState || cp.state);\n }\n else {\n // 没有默认更新\n shouldUpdate = true;\n }\n if(shouldUpdate) {\n updateCp(cp, nextProps, cp.__nextState || cp.state);\n }\n // 不更新则递归检查子tree的cp\n else {\n cp.props = nextProps;\n cp.state = cp.__nextState || cp.state;\n check(cp.shadow);\n }\n }\n else {\n check(cp.shadow);\n }\n}\n\n/**\n * 更新组件的props和state,清空__nextState\n * @param cp\n * @param props\n * @param state\n */\nfunction updateCp(cp, props, state) {\n cp.props = props;\n cp.state = state;\n cp.__nextState = null; // 同步在refresh前清除component的新state标识,这样frame动画在after回调中可以新设\n let oldS = cp.shadow;\n let oldSr = cp.shadowRoot;\n let oldJson = cp.__cd;\n let json = flatten(cp.render());\n // 对比新老render()返回的内容,更新后重新生成sr\n diffSr(oldS, oldJson, json);\n cp.__init(json);\n // 为了局部dom布局需要知道老的css信息\n let sr = cp.shadowRoot;\n if(sr instanceof Xom) {\n [\n '__outerWidth',\n '__outerHeight',\n '__sx',\n '__sy',\n '__sx2',\n '__sx3',\n '__sx4',\n '__sx5',\n '__sx6',\n '__sy2',\n '__sy3',\n '__sy4',\n '__sy5',\n '__sy6',\n ].forEach(k => {\n sr[k] = oldSr[k];\n });\n sr.__computedStyle = oldSr.computedStyle;\n }\n [\n '__x',\n '__y',\n '__width',\n '__height',\n '__sx1', // text和xom\n '__sy1',\n '__layoutData',\n '__parent',\n '__domParent',\n ].forEach(k => {\n sr[k] = oldSr[k];\n });\n sr.__domParent = oldSr.__domParent;\n sr.__struct = oldSr.__struct;\n updateList.push(cp);\n // 老的需回收,diff会生成新的dom,唯一列外是cp直接返回一个没变化的cp\n if(!util.isObject(json) || !json.__placeholder) {\n removeList.push(oldS);\n }\n // 子组件使用老的json时标识,更新后删除,render()返回空会没json对象\n if(json && json.__placeholder) {\n delete json.__placeholder;\n }\n if(json && json.__inheritAnimate) {\n delete json.__inheritAnimate;\n }\n if(json && json.__animateRecords) {\n delete json.__animateRecords;\n }\n // 高阶组件时需判断,子组件更新后生成新的sr,父组件的sr/host需要同时更新引用\n let host = cp.host;\n while(host) {\n if(host.shadow === cp) {\n host.__shadowRoot = sr;\n sr.__hostRoot = host;\n cp = host;\n host = host.host;\n }\n else {\n break;\n }\n }\n}\n\n/**\n * 非一级组件sr进行对比,key相同的无需重新生成且继承动画\n * @param vd\n * @param oj oldJson\n * @param nj\n */\nfunction diffSr(vd, oj, nj) {\n // 先遍历检查key相同的,将没有变化的key暂存下来,深度优先,这样叶子节点出现在前面,当key的叶子也有key时,确保叶子先对比\n let ojk = getKeyHash(oj, {}, vd);\n let njk = getKeyHash(nj, {});\n let keyList = [];\n let cpList = [];\n // 先对比key对应的节点,如果新老有一方对不上则落空\n Object.keys(ojk).forEach(k => {\n let o = ojk[k];\n let n = njk[k];\n if(!n) {\n o.json.key = KEY_FLAG;\n }\n });\n Object.keys(njk).forEach(k => {\n let o = ojk[k];\n let n = njk[k];\n // 有可能老的没有这个key,新key落空\n if(!o) {\n n.json.key = KEY_FLAG;\n return;\n }\n let oj = o.json;\n let nj = n.json;\n let vd = o.vd;\n // 相同class的组件进行对比替换\n if(oj.$$type === TYPE_CP && nj.$$type === TYPE_CP) {\n if(oj.klass === nj.klass) {\n // 对比props和children看是否全等,是则直接替换新json类型为占位符,引用老vd,否则强制更新\n diffCp(oj, nj, vd);\n // 标识对比过了\n oj.key = nj.key = KEY_FLAG;\n // 老的sr里需删除这个vd,因为老sr会回收\n cpList.push(vd);\n }\n }\n // 相同类型的vd进行对比继承动画\n else if(oj.$$type === nj.$$type && oj.tagName === nj.tagName) {\n // 需判断矢量标签mutil是否相等\n if(nj.$$type !== TYPE_GM || oj.props.multi === nj.props.multi) {\n nj.__inheritAnimate = vd;\n }\n oj.key = nj.key = KEY_FLAG;\n // key相同的dom暂存下来\n if(nj.$$type === TYPE_VD) {\n keyList.push({\n vd,\n oj,\n nj,\n });\n }\n }\n });\n // key相同的dom对比children,下面非key逻辑就不做了\n keyList.forEach(item => {\n diffChildren(item.vd, item.oj, item.nj);\n });\n // 整体tree进行对比\n diffChild(vd, oj, nj);\n // 已更新的cp需被老sr删除,因为老sr会回收,而此cp继续存在于新sr中不能回收,这里处理key的\n cpList.forEach(vd => {\n removeCpFromOldTree(vd);\n });\n}\n\n/**\n * 递归检查dom的children,相同的无需重新生成,用PL类型占位符代替直接返回老vd\n * @param vd\n * @param oj\n * @param nj\n */\nfunction diffChild(vd, oj, nj) {\n if(util.isObject(nj)) {\n if(nj.$$type === TYPE_CP) {\n // key对比过了忽略\n if(nj.key === KEY_FLAG) {\n return;\n }\n // 相同class的组件处理\n if(oj && oj.$$type === nj.$$type && oj.klass === nj.klass) {\n diffCp(oj, nj, vd);\n // 已更新的cp需被老sr删除,因为老sr会回收,而此cp继续存在于新sr中不能回收\n removeCpFromOldTree(vd);\n }\n }\n else if(nj.$$type === TYPE_GM && oj && oj.$$type === TYPE_GM) {\n // $geom的multi必须一致\n if(oj.tagName === nj.tagName && oj.props.multi === nj.props.multi) {\n nj.__inheritAnimate = vd;\n }\n }\n // dom类型递归children\n else if(nj.$$type === TYPE_VD && oj && oj.$$type === TYPE_VD) {\n if(oj.tagName === nj.tagName) {\n nj.__inheritAnimate = vd;\n }\n diffChildren(vd, oj, nj);\n }\n }\n}\n\n/**\n * dom类型的vd对比children\n * @param vd\n * @param oj\n * @param nj\n */\nfunction diffChildren(vd, oj, nj) {\n let oc = oj.children;\n let nc = nj.children;\n let ol = oc.length;\n let nl = nc.length;\n let children = vd.children;\n for(let i = 0, of = 0, nf = 0, len = Math.min(ol, nl); i < len; i++) {\n let o = oc[i + of];\n let n = nc[i + nf];\n // 新老都是key直接跳过\n if(o.key === KEY_FLAG && n.key === KEY_FLAG) {\n }\n // 其中一个是key对比过了调整索引和长度\n else if(o.key === KEY_FLAG) {\n of++;\n i--;\n ol--;\n len = Math.min(ol, nl);\n }\n else if(n.key === KEY_FLAG) {\n nf++;\n i--;\n nl--;\n len = Math.min(ol, nl);\n }\n else {\n diffChild(children[i + of], o, n);\n }\n }\n // 长度不同增减的无需关注,新json创建cp有didMount,老vd会调用cp的destroy\n}\n\n/**\n * 根据json对比看cp如何更新,被render()后的json的二级组件对比才会出现\n * @param oj\n * @param nj\n * @param vd\n */\nfunction diffCp(oj, nj, vd) {\n // props全等,直接替换新json类型为占位符,引用老vd内容,无需重新创建,暂时存在json的placeholder上\n // 否则需要强制触发组件更新,包含setState内容\n nj.__placeholder = vd;\n let sr = vd.shadowRoot;\n // 对比需忽略on开头的事件,直接改老的引用到新的上,这样只变了on的话无需更新\n let exist = {};\n Object.keys(oj.props).forEach(k => {\n let v = oj.props[k];\n exist[k] = v;\n });\n Object.keys(nj.props).forEach(k => {\n let v = nj.props[k];\n if(/^on[a-zA-Z]/.test(k)) {\n oj.props[k] = v;\n let ex = exist[k];\n if(ex) {\n delete exist[k];\n if(ex !== v) {\n k = k.slice(2).toLowerCase();\n sr.listener[k] = v;\n }\n }\n else {\n k = k.slice(2).toLowerCase();\n sr.listener[k] = v;\n }\n }\n else if(/^on-[a-zA-Z\\d_$]/.test(k)) {\n oj.props[k] = v;\n let ex = exist[k];\n if(ex) {\n delete exist[k];\n if(ex !== v) {\n k = k.slice(2).toLowerCase();\n vd.off(k, exist[k]);\n vd.on(k, v);\n }\n delete exist[k];\n }\n else {\n k = k.slice(2).toLowerCase();\n vd.on(k, v);\n }\n }\n });\n // 新的少的事件取消\n Object.keys(exist).forEach(k => {\n let v = exist[k];\n if(/^on[a-zA-Z]/.test(k)) {\n nj.props[k] = v;\n k = k.slice(2).toLowerCase();\n delete sr.listener[k];\n }\n else if(/^on-[a-zA-Z\\d_$]/.test(k)) {\n nj.props[k] = v;\n k = k.slice(2).toLowerCase();\n vd.off(k, v);\n }\n });\n checkCp(vd, nj.props, !util.equal(oj.props, nj.props));\n}\n\n/**\n * 深度优先遍历json,将有key的记录在hash中,如果传入根vd,同步递归保存对应位置的vd\n * @param json\n * @param hash\n * @param vd\n * @returns {*}\n */\nfunction getKeyHash(json, hash, vd) {\n if(Array.isArray(json)) {\n json.forEach((item, i) => getKeyHash(item, hash, vd && vd[i]));\n }\n else if(util.isObject(json)) {\n if(json.$$type === TYPE_VD || json.$$type === TYPE_GM || json.$$type === TYPE_CP) {\n // 深度优先\n if(json.$$type === TYPE_VD) {\n getKeyHash(json.children, hash, vd && vd.children);\n }\n let key = json.props.key;\n if(!util.isNil(key) && key !== '') {\n // 重复key错误警告\n if(hash.hasOwnProperty(key)) {\n inject.warn('Component ' + vd.tagName + ' has duplicate key: ' + key);\n }\n hash[key] = {\n json,\n vd,\n };\n }\n }\n }\n return hash;\n}\n\n/**\n * 非一级组件diff发生更新时,其需要从sr的tree中移除,因为sr会销毁\n */\nfunction removeCpFromOldTree(vd) {\n // root下的一级组件不会发生回收情况,忽略\n if(!vd.host) {\n return;\n }\n let parent = vd.parent;\n if(parent) {\n let i = parent.children.indexOf(vd);\n if(i > -1) {\n parent.children[i] = null;\n }\n else {\n throw new Error('Can not find child: ' + vd.tagName);\n }\n }\n}\n\n/**\n * 执行componentDidUpdate/destroy\n */\nfunction did() {\n updateList.forEach(item => {\n if(util.isFunction(item.componentDidUpdate)) {\n item.componentDidUpdate();\n }\n });\n updateList.splice(0);\n removeList.forEach(item => {\n item.__destroy();\n });\n removeList = [];\n}\n\nexport default {\n updateList,\n check,\n did,\n};\n","import Node from '../node/Node';\nimport Component from '../node/Component';\nimport $$type from '../util/$$type';\nimport util from '../util/util';\n\nconst { TYPE_VD, TYPE_GM, TYPE_CP } = $$type;\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 if(item && [TYPE_VD, TYPE_GM, TYPE_CP].indexOf(item.$$type) > -1) {\n return item;\n }\n return parse(karas, item, animateRecords, opt, offsetTime);\n }));\n }\n else {\n vd = karas.createVd(tagName, props, children.map(item => {\n if(item && [TYPE_VD, TYPE_GM, TYPE_CP].indexOf(item.$$type) > -1) {\n return item;\n }\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 level from './level';\nimport change from './change';\nimport Page from './Page';\nimport Cache from './Cache';\n\nexport default {\n level,\n change,\n Page,\n Cache,\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 updater from './util/updater';\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';\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 // return {\n // tagName,\n // props,\n // children,\n // $$type: $$type.TYPE_VD,\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 // return {\n // tagName,\n // props,\n // $$type: $$type.TYPE_GM,\n // };\n },\n createCp(klass, props, children = []) {\n props.children = children;\n return new klass(props, children);\n // return {\n // klass,\n // props,\n // $$type: $$type.TYPE_CP,\n // };\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 updater,\n refresh,\n enums,\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","__ox","__oy","__sx","__sy","__width","__height","__baseline","__verticalBaseline","__prev","__next","__parent","__domParent","__root","__host","__hostRoot","__virtualDom","__bbox","__filterBbox","__isDestroyed","lv","j","__struct","node","childIndex","diff","isLayout","x","ox","y","oy","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","TYPE_VD","Symbol","TYPE_GM","TYPE_CP","identity","multiply","a","b","isE","c","i","a0","a1","a2","a3","calPoint","point","m","z","w","undefined","length","b1","c1","d1","b2","c2","d2","b3","c3","d3","a4","b4","c4","d4","d","e","f","inverse","inverse4","divisor","s","inv","det","m2m6","point2d","slice","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","isMask","props","tagName","content","opacity","transform","visibility","mask","overflow","filter","mixBlendMode","def","uuid","joinItem","rgba2int","color","charAt","push","parseInt","match","int2rgba","Math","floor","max","int2invert","joinArr","arr2hash","hash","list","keys","k","hash2arr","clone","$$type","util","Date","isPlainObject","equalArr","ai","bi","isArrayA","isArrayB","equal","getTime","extend","target","source","split","transformBbox","bbox","matrix","dx","dy","mx","x1","y1","x2","y2","xa","ya","xb","yb","min","proto","getPrototypeOf","Ctor","constructor","assignMatrix","t","prefixHex","replaceRgba2Hex","$0","$1","$2","$3","$4","isPrimitive","isAuto","flag","alpha","antialias","premultipliedAlpha","preserveDrawingBuffer","initShaders","gl","vshader","fshader","program","createProgram","Error","enable","BLEND","blendFunc","ONE","ONE_MINUS_SRC_ALPHA","vertexShader","loadShader","VERTEX_SHADER","fragmentShader","FRAGMENT_SHADER","attachShader","linkProgram","linked","getProgramParameter","LINK_STATUS","error","getProgramInfoLog","deleteProgram","deleteShader","shader","createShader","shaderSource","compileShader","compiled","getShaderParameter","COMPILE_STATUS","getShaderInfoLog","convertCoords2Gl","cx","cy","revertY","createTexture","tex","width","height","texture","bindTexture","pixelStorei","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","drawTextureCache","vtPoint","Float32Array","vtTex","vtOpacity","lastChannel","record","stack","cache","channel","page","bx","by","w1","w2","x3","y3","w3","x4","y4","w4","tx1","ty1","tx2","ty2","pointBuffer","createBuffer","bindBuffer","ARRAY_BUFFER","bufferData","STATIC_DRAW","a_position","getAttribLocation","vertexAttribPointer","FLOAT","enableVertexAttribArray","texBuffer","a_texCoords","opacityBuffer","a_opacity","u_texture","getUniformLocation","count","num","uniform1i","drawArrays","TRIANGLES","deleteBuffer","disableVertexAttribArray","drawBlur","frameBuffer","tex1","tex2","spread","widthNew","heightNew","u_direction","uniform2f","ratio","recycle","tex3","framebufferTexture2D","FRAMEBUFFER","COLOR_ATTACHMENT0","tex4","deleteTexture","drawCm","u_m","uniform1fv","drawOverflow","h","programOverflow","drawMask","u_texture1","u_texture2","drawMbm","W","H","drawDropShadow","u_color","SPF","CANVAS_LIST","WEBGL_LIST","SUPPORT_OFFSCREEN_CANVAS","OffscreenCanvas","prototype","getContext","key","message","pop","debug","document","createElement","style","setAttribute","body","appendChild","ctx","ca","canvas","enabled","available","release","cacheCanvas","cacheWebgl","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","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","hasCacheCanvas","getCacheCanvas","releaseCacheCanvas","delCacheCanvas","hasCacheWebgl","getCacheWebgl","releaseCacheWebgl","delCacheWebgl","isDom","Element","self","getElementsByTagName","isWebGLTexture","WebGLTexture","defaultFontFamily","getFontCanvas","checkSupportFontFamily","toLowerCase","context","textAlign","fillStyle","textBaseline","clearRect","font","fillText","getImageData","data","loadFont","ArrayBuffer","FontFace","load","then","fonts","add","loadComponent","script","async","head","removeChild","CALLBACK","info","arial","lhr","blr","lgr","helvetica","verdana","tahoma","georgia","simsun","support","checked","register","name","__emitFontRegister","emSquare","ascent","descent","lineGap","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","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","crossProduct","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","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","l","ELLIPSIS","sqrt","vector","enums","deg","cos","sin","pointInConvexPolygon","vertexes","xmax","ymax","xmin","ymin","first","pointInQuadrilateral","angleBySide","theta","pow","acos","sideByAngle","pointsDistance","triangleIncentre","ellipsePoints","sectorPoints","r","begin","end","h2","d2r","abs","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","PI","dt","r2d","pointOnCircle","getConicGradientImage","originX","originY","stop","getAngle","increasingList","map","angle","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","points","isLast","main1","main2","cross1","cross2","tan","calTopRadiusPoints","calRightRadiusPoints","calBottomRadiusPoints","calLeftRadiusPoints","pointsList","brx","bry","erx","ery","oxl","oxr","beginList","centerList","endList","beginLength","needInner","crossDeg","rx1","ry1","sx1","oyl","rx2","ry2","sx2","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","prev","next","half","calBorderRadiusInline","contentBoxList","last","isEllipsis","outerWidth","outerHeight","renderBorder","xom","renderMode","mode","beginPath","closePath","virtualDom","getLinearDeg","getRadialPosition","center","getColorStop","firstColor","p","dr","dg","db","da","unshift","calLinearCoords","x0","y0","calCircleCentre","iw","ih","positionX","positionY","calRadialRadius","shape","size","xl","yl","tx","ty","asin","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","aa","av","bv","ad","bd","isArrayD1","isArrayD2","ap","bp","aj","bj","ac","bc","isMulti","cloneStyle","vv","spreadBoxShadow","yt","xr","inset","blur","spreadFilter","calDeg","pointIndex","index","cross","pointByIndex","exchangeOrder","sy1","sy2","sx3","sy3","tx3","ty3","isOverflow","ls","lt","ls2","lt2","ax2","ay2","ax3","ay3","ab","AB","AC","BC","A","TOLERANCE","getLinearRoot","coefs","result","getQuadraticRoots","results","getCubicRoots","c0","offset","discrim","halfB","tmp","distance","atan2","sqrt3","getQuarticRoots","resolveRoots","reverse","t1","t2","plus","minus","getRoots","degree","bboxBezier2","minX","minY","maxX","maxY","sy","qx","qy","bboxBezier3","ax","ay","hx","hy","q","bboxBezier","arguments","norm","sum","reduce","simpson38","derivativeFunc","middleL","middleR","adaptiveSimpson38","eps","mid","st","sl","sr","ans","bezierLength","startT","endT","at","at3","p0","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","equation","sort","xt","bezierSlope","bezier2Slope","bezier3Slope","ACCURACY","getDerivativeCoefs","derivative","evaluate","bisection","minValue","maxValue","tmp1","log","tmp2","LN10","iters","ceil","LN2","value","getRootsInInterval","roots","derivativeCoefs","droots","intersectBezier2Bezier2","bx2","by2","bx3","by3","c12","c11","c10","c22","c21","c20","v0","v1","v3","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","cl","minbx","minby","maxbx","maxby","dot","lerp","p5","p6","intersectBezier3Line","p7","p8","p9","p10","Point","Segment","belong","calBbox","myFill","otherFill","myCoincide","otherCoincide","isVisited","isDeleted","bezier","toHash","EPS","EPS2","getIntersectionLineLine","toSource","toClip","getIntersectionBezier2Line","isec","getIntersectionBezier2Bezier2","getIntersectionBezier2Bezier3","getIntersectionBezier3Line","getIntersectionBezier3Bezier3","sortIntersection","isSource","intersect","Polygon","regions","segments","vertices","startPoint","firstPoint","curr","endPoint","seg","compare","cPoint","getBezierMonotonicity","curve1","curve2","cPoint1","cPoint2","lastPoint","lastT","curve","genHashXList","findIntersection","polyA","polyB","isIntermediateA","isIntermediateB","genHashXYList","aelA","aelB","hashA","hashB","ael","hc","isAboveLast","segAboveCompare","isAbove","inside","compareBelong","delList","shift","bboxA","coordsA","lenA","bboxB","coordsB","lenB","isSourceReverted","inters","overs","checkOverlapLine","checkOverlapBezier","activeNewSeg","ra","rb","pa","sliceSegment","pb","isIntermediate","ns","lx","hashX","putHashX","hashXY","putHashXY","listX","hashY","listY","pointAboveOrOnLine","pt","segA","segB","la","lb","getYByX","isX","pts","isY","firstA","firstB","lastA","lastB","t3","t4","conditionA","conditionB","conditionC","startA","endA","startB","endB","equalBezier","over","chains","chain","isHead","tail","ptHead","ptTail","close","coords2","clockwise","lastX","lastY","area","prefix","polygon","trivial","polygonA","polygonB","selfIntersect","intersect2","annotate2","INTERSECT","UNION","SUBTRACT","SUBTRACT_REV","XOR","intermediate","union","subtract","subtractRev","xor","tar","booleanOperations","bo","math","calSingle","rlen","nc","xy","yz","zx","xs","ys","zs","calMatrix","ow","oh","calMatrixByOrigin","calMatrixWithOrigin","normalizeSingle","calMatrixByPerspective","pm","calPerspectiveMatrix","ppt","po","isPerspectiveMatrix","TuOrU","TextBox","__index","__content","__parentLineBox","__isVertical","cacheStyle","dom","css","__endX","__endY","me","matrixEvent","dev1","dev2","overFill","cjk","setTransform","strokeText","tfo","measureText","nowCjk","__gradient","__bx1","__by1","__bx2","__by2","baseline","verticalBaseline","CHAR","Ellipsis","__sx1","__sy1","__ellipsis","TX","TY","TZ","OP","FT","PPT","TF","NONE","CACHE","TRANSFORM_ALL","REPAINT","REFLOW","REBUILD","ENUM","isTransforms","contain","getLevel","isReflow","measureLineWidth","perW","rw","newLine","mw","hypotheticalNum","round","getFontKey","Text","__textBoxes","__charWidth","__textWidth","__bp","__widthHash","__limitCache","__hasContent","__cache","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","__offsetX","__offsetY","firstCharWidth","lineWidth","strokeStyle","render","__addUpdate","focus","level","isShadowRoot","hostRoot","__children","__zIndexChildren","__deleteStruct","__destroy","removeDom","fontKey","charWidth","__currentStyle","__style","__computedStyle","__cacheStyle","__matrix","__matrixEvent","__perspectiveMatrix","Event","__eHash","handle","on","apply","off","__karasEventCb","once","emit","event","fns","fn","REGISTER","Component","__tagName","__ref","__isMounted","__taskList","__shadowRoot","listener","componentDidMount","REFRESH","componentWillUnmount","__shadow","force","shadowRoot","__emitEvent","__state","defineProperty","get","getInlineBox","leading","bcStart","bcEnd","pbStart","pbEnd","getInlineWidth","contentBox","matrixResize","imgWidth","imgHeight","targetWidth","targetHeight","renderBgc","method","__cacheDefs","renderImage","loadBgi","bgW","bgH","bgX","bgY","needMask","xnl","xnr","ynt","ynb","image","needResize","copy","traversal","after","__after","__before","isPause","Frame","__rootTask","__task","__now","__init","__karasFramecb","offFrame","onFrame","NEWTON_ITERATIONS","NEWTON_MIN_SLOPE","SUBDIVISION_PRECISION","SUBDIVISION_MAX_ITERATIONS","kSplineTableSize","kSampleStepSize","float32ArraySupported","aA1","aA2","B","C","calcBezier","aT","getSlope","binarySubdivide","aX","aA","aB","mX1","mX2","currentX","currentT","newtonRaphsonIterate","aGuessT","currentSlope","LinearEasing","mY1","mY2","sampleValues","getTForX","intervalStart","currentSample","lastSample","dist","guessForT","initialSlope","BezierEasing","easing","linear","easeIn","easeOut","ease","easeInOut","cubicBezier","getEasing","timingFunction","unify","frames","getProps","inherit","__outerWidth","__outerHeight","tf","genBeforeRefresh","framing","duration","es","translatePath","time","transition","fixed","calByUnit","container","calDiff","nm","pv","nv","pvv","nvv","clientHeight","clientWidth","pi","ni","offsetHeight","offsetWidth","has","pp","nn","parentComputedStyle","calDiffGradient","len2","pv2","nv2","len3","pv3","nv3","eq","isArrP","isArrN","pz","nz","np","calFrame","hasTp","ts","binarySearch","middle","frame","ea","steps","stepsD","calIntermediateStyle","lastPercent","currentProps","__currentProps","st2","cli","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","__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","__inFps","currentFrame","__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","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","blurBox","mbmName","isValidMbm","mbm","getFirstEmptyInlineWidth","flowChildren","child","Xom","__isInline","getLastEmptyInlineWidth","__listener","__animationList","__loadBgi","isClip","__isClip","__isMask","__refreshLevel","__opacity","__frameAnimateList","__contentBoxList","__cacheAsBitmap","cacheAsBitmap","__cacheTotal","__cacheFilter","__cacheMask","__cacheOverflow","__layoutData","__hasComputeReflow","__fontRegister","__hasMask","hasMask","__calSize","includePercent","isRoot","ph","fontRegister","__clientWidth","__offsetWidth","__clientHeight","__offsetHeight","isDirectionRow","isDirectItem","isAbs","isColumn","isRow","__layoutFlow","__computeReflow","__isIbFull","__isUprightIbFull","clearCache","__mp","__layoutFlex","__layoutInline","__layoutBlock","__sx2","__sx3","__sx4","__sx5","__sx6","__sy2","__sy3","__sy4","__sy5","__sy6","__execAr","__calStyle","__calPerspective","ar","__animateRecords","controller","autoPlay","__records2","init","list2","__records","__playAuto","__reset0","h3","isParentVertical","fixedWidth","fixedHeight","selfEndSpace","isReplaced","matrixCache","isScale","__calFilter","__calMatrix","bgI","kw","rebuild","offscreenBlend","offscreenMask","offscreenFilter","offscreenOverflow","origin","borderList","isRealInline","sx4","sx5","sx6","sy4","sy5","sy6","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","lookUp","formatStyle","updateFormatStyle","animation","cancel","enter","includeBbox","LineBox","__list","__lineHeight","__isUpright","__bOffset","increase","isAlign","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","cs","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","isSiblingBlock","checkNext","hasZ","cps","crs","isLastAbs","isNowAbs","isLastNone","isNowNone","isLast0","oldH","svg","ref","hasFlowPrev","__updateStruct","__layoutAbs","ld","__layout","isNow0","nowH","isRemoveSelf","__resizeY","buildChildren","flatten","relation","hoc","buildRoot","genZIndexChildren","hasMc","mcHash","lastMaskIndex","__iIndex","__zIndex","__aIndex","genOrderChildren","__order","backtrack","text","__backtrack","Dom","block","inlineBlock","none","tag","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","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","targetMainList","lessOne","factorSum","factorList","needReset","factorSum2","count1","count2","lbmList","needGenAr","firstBaseline","old","genLineBoxByInlineIfNewLine","setLbByInlineIfNotNewLine","pushContentBoxList","isIbFull","isUprightIbFull","hasAddEndSpace","isInline2","isInlineBlock2","addY","addX","popContentBoxList","maxCX","maxCY","minCX","minCY","maxFX","maxFY","minFX","minFY","maxOX","maxOY","minOX","minOY","absChildren","onlyRight","onlyBottom","fixedTop","fixedRight","fixedBottom","fixedLeft","widthLimit","heightLimit","__deepScan","__insertStruct","Img","loadImg","__loadImg","loading","__loadAndRefresh","placeholder","delRefreshTask","showError","__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","SIZE","MAX","HASH_CANVAS","Page","number","__size","__number","__free","__total","__canvas","__offscreen","__grid","__uuid","__update","grid","pos","genSingle","bboxNew","dbx","dby","Cache","__page","__pos","getCoords","__appendData","__enabled","globalAlpha","update","__available","clear","del","getInstance","oldX1","callback","cacheMask","globalCompositeOperation","drawCache","xe","ye","cacheOverflow","rect","dbx2","dby2","OFFSCREEN_OVERFLOW","OFFSCREEN_FILTER","OFFSCREEN_MASK","OFFSCREEN_BLEND","OFFSCREEN_MASK2","applyOffscreen","MockPage","genUuid","MockCache","reOffset","getCache","MBM","genBboxTotal","parentIndexHash","opacityHash","includeLimitCache","bboxTotal","filterBbox","matrixHash","parentIndex","node2","hasTotal","mergeBbox","genTotal","__computedStyle2","countMaskNum","__cacheTotal2","__cacheFilter2","__cacheMask2","__cacheOverflow2","ctxTotal","matrixList","parentMatrix","lastMatrix","lastLv","maskStartHash","offscreenHash","__calOffscreen","genTotalOther","needGen","genOverflow","genFilter","genMask","opacityList","parentOpacity","lastOpacity","genFrameBufferWithTexture","texCache","lockOneChannel","webgl","createFramebuffer","bindFramebuffer","check","checkFramebufferStatus","FRAMEBUFFER_COMPLETE","viewport","clearColor","COLOR_BUFFER_BIT","genTotalWebgl","limitCache","getParameter","MAX_TEXTURE_SIZE","parentPm","totalLimitCache","addTexAndDrawWhenLimit","mockCache","refresh","releaseLockChannel","useProgram","frameBuffer2","texture2","genMbmWebgl","deleteFramebuffer","genFilterWebgl","genBlurWebgl","genDropShadowWebgl","rotation","cosR","sinR","genColorMatrixWebgl","amount","oneMinusAmount","MAX_VARYING_VECTORS","weights","vert","frag","vertexBlur","fragmentBlur","findExistTexChannel","lockChannel","programCm","genOverflowWebgl","overflowCache","genMaskWebgl","programClip","programMask","maskCache","programDs","bboxOld","bboxMerge","mockCache2","fbo","fragmentMultiply","fragmentScreen","fragmentOverlay","fragmentDarken","fragmentLighten","fragmentColorDodge","fragmentColorBurn","fragmentHardLight","fragmentSoftLight","fragmentDifference","fragmentExclusion","fragmentHue","fragmentSaturation","fragmentColor","fragmentLuminosity","vertexMbm","renderSvg","maskEffectHash","hasEffectMask","addCache","maskHash","vdList","parentVd","lastRefreshLv","lastNode","mChildren","ivs","hasTransform","renderWebgl","lastRefreshLevel","mergeList","hasMbm","isMbm","isPpt","hasContent","calContent","isFilter","limitHash","pptHash","isPerspective","renderCanvas","TexCache","units","__units","__pages","__channels","__locks","__lockUnits","pages","channels","locks","lastHash","oldList","newList","fullSize","setToChannel","ROOT_DOM_NAME","getDom","querySelector","renderProp","EVENT_LIST","initEvent","Root","__wrapEvent","__cb","addEventListener","removeEvent","removeEventListener","__dom","__mw","__mh","__taskUp","__reflowList","mix","__updateHash","__rlv","domName","__scx","__scy","getBoundingClientRect","touches","clientX","clientY","stopPropagation","stopImmediatePropagation","preventDefault","__hasEmitted","__initProps","nodeName","__genHtml","__defs","domCss","getPropertyValue","params","contextAttributes","__ctx","__renderMode","vertex","fragment","vertexMask","fragmentMask","fragmentClip","fragmentOverflow","vertexCm","fragmentCm","vertexDs","fragmentDs","MAX_TEXTURE_IMAGE_UNITS","__texCache","destroy","__eventCbList","__checkRoot","wm","__reLayout","noRender","__clear","__vd","domDiff","updateStyle","taskUp","nextFrame","__frameHook","includeIgnore","scan","path","zPath","__index__","karas","path2","zPath2","hasVisibility","hasColor","hasDisplay","hasTsColor","hasTsWidth","hasTsOver","isRp","__frameRefresh","reBuild","base","reBuildC","curveNum","getNewPoint","Line","__x1","__y1","__x2","__y2","__controlA","__controlB","__start","dy2","buildCache","bezierBox","subtract2","concatPointAndControl","control","getLength","getIndex","getNewList","start2","end2","isStartLt0","isEndGt1","prePercent","Polyline","__points","__controls","controls","__booleanOperations","isControl","cur","rebuildSE","__getPoints","__needRebuildSE","__reprocessing","__renderPolygon","pointList","controlList","getR","dft","Sector","__r","edge","__edge","closure","__closure","sList","r2","__renderOneSector","genVertex","Rect","__rx","__ry","Circle","Ellipse","my","flattenJson","traverseJson","lastText","updateList","removeList","KEY_FLAG","__hasCpUpdate","checkCp","cp","nextProps","forceCheckUpdate","__nextState","shouldUpdate","shouldComponentUpdate","updateCp","shadow","oldS","oldSr","oldJson","__cd","json","diffSr","__placeholder","__inheritAnimate","oj","nj","ojk","getKeyHash","njk","keyList","cpList","klass","diffCp","diffChildren","removeCpFromOldTree","oc","of","nf","exist","ex","did","componentDidUpdate","parse","animateRecords","opt","oft","JSON","createGm","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","version","appendTo","parser","updater"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAMA;IACJ,SAAc,IAAA,GAAA;MACZ,IAAKC,CAAAA,GAAL,GAAW,CAAX,CAAA;MACA,IAAKC,CAAAA,GAAL,GAAW,CAAX,CAAA;EACA,IAAA,IAAA,CAAKC,IAAL,GAAY,CAAZ,CAHY;;MAIZ,IAAKC,CAAAA,IAAL,GAAY,CAAZ,CAAA;MACA,IAAKC,CAAAA,IAAL,GAAY,CAAZ,CAAA;MACA,IAAKC,CAAAA,IAAL,GAAY,CAAZ,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,IAAnB,CAAA;MACA,IAAKC,CAAAA,MAAL,GAAc,IAAd,CAAA;MACA,IAAKC,CAAAA,MAAL,GAAc,IAAd,CAAA;MACA,IAAKC,CAAAA,UAAL,GAAkB,IAAlB,CAAA;MACA,IAAKC,CAAAA,YAAL,GAAoB,IAApB,CAAA;MACA,IAAKC,CAAAA,MAAL,GAAc,IAAd,CAAA;MACA,I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U;EAyFV1B,EAAAA,KAAK,EAALA,KAzFU;EA0FVw1E,EAAAA,MAAM,EAANA,CA1FU;EA2FV7a,EAAAA,OAAO,EAAPA,OA3FU;EA4FVn2B,EAAAA,IAAI,EAAJA,IA5FU;EA6FVixC,EAAAA,OAAO,EAAPA,OA7FU;EA8FVzT,EAAAA,OAAO,EAAPA,OA9FU;EA+FVzsD,EAAAA,KAAK,EAALA,KA/FU;;IAgGV,IAAI1V,KAAJ,CAAU/T,CAAV,EAAa;EACX+T,IAAAA,KAAK,CAACxJ,IAAN,GAAa,CAAC,CAACvK,CAAf,CAAA;EACD,GAAA;;EAlGS,EAAZ;;EAqGA,IAAG,OAAOwW,MAAP,KAAkB,WAArB,EAAkC;IAChCA,MAAM,CAAC6pE,KAAP,GAAeA,OAAf,CAAA;EACD,CAFD,MAGK,IAAG,OAAOlnE,IAAP,KAAgB,WAAnB,EAAgC;IACnCA,IAAI,CAACknE,KAAL,GAAaA,OAAb,CAAA;EACD;;;;;;;;"} \ No newline at end of file diff --git a/src/gl/webgl.js b/src/gl/webgl.js index 11835b252..2d07dde73 100644 --- a/src/gl/webgl.js +++ b/src/gl/webgl.js @@ -161,7 +161,10 @@ function bindTexture(gl, texture, n) { * @param revertY */ function drawTextureCache(gl, list, hash, cx, cy, revertY) { - let vtPoint = [], vtTex = [], vtOpacity = []; + let length = list.length; + let vtPoint = new Float32Array(length * 24), + vtTex = new Float32Array(length * 12), + vtOpacity = new Float32Array(length * 6); let lastChannel; // 上一个dom的单元号 let record = [0]; // [num, channel]每一批的数量和单元号记录 let stack = [record]; // 所有批的数据记录集合 @@ -193,31 +196,70 @@ function drawTextureCache(gl, list, hash, cx, cy, revertY) { [x2, y2] = convertCoords2Gl([x2, y2, 0, w2], cx, cy, revertY); [x3, y3] = convertCoords2Gl([x3, y3, 0, w3], cx, cy, revertY); [x4, y4] = convertCoords2Gl([x4, y4, 0, w4], cx, cy, revertY); - vtPoint.push(x1, y1, 0, w1, x4, y4, 0, w4, x2, y2, 0, w2, x4, y4, 0, w4, x2, y2, 0, w2, x3, y3, 0, w3); + // vtPoint.push(x1, y1, 0, w1, x4, y4, 0, w4, x2, y2, 0, w2, x4, y4, 0, w4, x2, y2, 0, w2, x3, y3, 0, w3); + let j = i * 24; + vtPoint[j] = x1; + vtPoint[j + 1] = y1; + vtPoint[j + 3] = w1; + vtPoint[j + 4] = x4; + vtPoint[j + 5] = y4; + vtPoint[j + 7] = w4; + vtPoint[j + 8] = x2; + vtPoint[j + 9] = y2; + vtPoint[j + 11] = w2; + vtPoint[j + 12] = x4; + vtPoint[j + 13] = y4; + vtPoint[j + 15] = w4; + vtPoint[j + 16] = x2; + vtPoint[j + 17] = y2; + vtPoint[j + 19] = w2; + vtPoint[j + 20] = x3; + vtPoint[j + 21] = y3; + vtPoint[j + 23] = w3; let tx1 = x / page.width, ty1 = (y + height) / page.height; let tx2 = (x + width) / page.width, ty2 = y / page.height; - vtTex.push(tx1, ty1, tx1, ty2, tx2, ty1, tx1, ty2, tx2, ty1, tx2, ty2); - vtOpacity.push(opacity, opacity, opacity, opacity, opacity, opacity); + // vtTex.push(tx1, ty1, tx1, ty2, tx2, ty1, tx1, ty2, tx2, ty1, tx2, ty2); + j = i * 12; + vtTex[j] = tx1; + vtTex[j + 1] = ty1; + vtTex[j + 2] = tx1; + vtTex[j + 3] = ty2; + vtTex[j + 4] = tx2; + vtTex[j + 5] = ty1; + vtTex[j + 6] = tx1; + vtTex[j + 7] = ty2; + vtTex[j + 8] = tx2; + vtTex[j + 9] = ty1; + vtTex[j + 10] = tx2; + vtTex[j + 11] = ty2; + // vtOpacity.push(opacity, opacity, opacity, opacity, opacity, opacity); + j = i * 6; + vtOpacity[j] = opacity; + vtOpacity[j + 1] = opacity; + vtOpacity[j + 2] = opacity; + vtOpacity[j + 3] = opacity; + vtOpacity[j + 4] = opacity; + vtOpacity[j + 5] = opacity; record[0]++; }); // 顶点buffer let pointBuffer = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer); - gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtPoint), gl.STATIC_DRAW); + gl.bufferData(gl.ARRAY_BUFFER, vtPoint, gl.STATIC_DRAW); let a_position = gl.getAttribLocation(gl.program, 'a_position'); gl.vertexAttribPointer(a_position, 4, gl.FLOAT, false, 0, 0); gl.enableVertexAttribArray(a_position); // 纹理buffer let texBuffer = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer); - gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtTex), gl.STATIC_DRAW); + gl.bufferData(gl.ARRAY_BUFFER, vtTex, gl.STATIC_DRAW); let a_texCoords = gl.getAttribLocation(gl.program, 'a_texCoords'); gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0); gl.enableVertexAttribArray(a_texCoords); // opacity buffer let opacityBuffer = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer); - gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtOpacity), gl.STATIC_DRAW); + gl.bufferData(gl.ARRAY_BUFFER, vtOpacity, gl.STATIC_DRAW); let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity'); gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0); gl.enableVertexAttribArray(a_opacity);