diff --git a/index.es.js b/index.es.js
index d93ba0a67..67a8cdc01 100644
--- a/index.es.js
+++ b/index.es.js
@@ -304,19 +304,29 @@ var STYLE_KEY$5 = {
var STYLE2LOWER_MAP = {};
function style2Lower(s) {
- STYLE2LOWER_MAP[s] = STYLE2LOWER_MAP[s] || s.toLowerCase().replace(/_([a-z])/g, function ($0, $1) {
- return $1.toUpperCase();
- });
- return STYLE2LOWER_MAP[s];
+ var res = STYLE2LOWER_MAP[s];
+
+ if (!res) {
+ res = STYLE2LOWER_MAP[s] = s.toLowerCase().replace(/_([a-z])/g, function ($0, $1) {
+ return $1.toUpperCase();
+ });
+ }
+
+ return res;
}
var STYLE2UPPER_MAP = {};
function style2Upper$2(s) {
- STYLE2UPPER_MAP[s] = STYLE2UPPER_MAP[s] || s.replace(/([a-z\d_])([A-Z])/g, function ($0, $1, $2) {
- return $1 + '_' + $2;
- }).toUpperCase();
- return STYLE2UPPER_MAP[s];
+ var res = STYLE2UPPER_MAP[s];
+
+ if (!res) {
+ res = STYLE2UPPER_MAP[s] = s.replace(/([a-z\d_])([A-Z])/g, function ($0, $1, $2) {
+ return $1 + '_' + $2;
+ }).toUpperCase();
+ }
+
+ return res;
}
var STYLE_R_KEY = {};
@@ -1141,17 +1151,26 @@ function rgba2int$3(color) {
function int2rgba$4(color) {
if (Array.isArray(color)) {
- if (color.length === 4) {
- color = color.map(function (c, i) {
- return i === 3 ? c : Math.floor(Math.max(0, c));
- });
- return 'rgba(' + joinArr$3(color, ',') + ')';
- } else if (color.length === 3) {
- color = color.map(function (c) {
- return Math.floor(c);
- });
- return 'rgba(' + joinArr$3(color, ',') + ',1)';
- }
+ if (color.length === 3 || color.length === 4) {
+ color[0] = Math.floor(Math.max(color[0], 0));
+ color[1] = Math.floor(Math.max(color[1], 0));
+ color[2] = Math.floor(Math.max(color[2], 0));
+
+ if (color.length === 4) {
+ color[3] = Math.max(color[3], 0);
+ return 'rgba(' + color[0] + ',' + color[1] + ',' + color[2] + ',' + color[3] + ')';
+ }
+
+ return 'rgba(' + color[0] + ',' + color[1] + ',' + color[2] + ',1)';
+ } // if(color.length === 4) {
+ // color = color.map((c, i) => i === 3 ? c : Math.floor(Math.max(0, c)));
+ // return 'rgba(' + joinArr(color, ',') + ')';
+ // }
+ // else if(color.length === 3) {
+ // color = color.map(c => Math.floor(c));
+ // return 'rgba(' + joinArr(color, ',') + ',1)';
+ // }
+
}
return color || 'rgba(0,0,0,0)';
@@ -14992,7 +15011,7 @@ var ENUM = {
REBUILD: 1024 // 10000000000
};
-var TRANSFORMS = (_TRANSFORMS = {}, _defineProperty(_TRANSFORMS, STYLE_KEY$1.SCALE_X, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.SCALE_Y, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.SCALE_Z, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.ROTATE_X, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.ROTATE_Y, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.ROTATE_Z, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.SKEW_X, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.SKEW_Y, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.ROTATE_3D, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.TRANSFORM, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.TRANSFORM_ORIGIN, true), _TRANSFORMS);
+var TRANSFORMS = (_TRANSFORMS = {}, _defineProperty(_TRANSFORMS, STYLE_KEY$1.SCALE_X, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.SCALE_Y, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.SCALE_Z, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.ROTATE_X, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.ROTATE_Y, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.ROTATE_Z, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.SKEW_X, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.SKEW_Y, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.ROTATE_3D, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.TRANSFORM, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.TRANSFORM_ORIGIN, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.TRANSLATE_PATH, true), _TRANSFORMS);
var o$1 = Object.assign({
contain: function contain(lv, value) {
return (lv & value) > 0;
@@ -32414,8 +32433,18 @@ var Controller = /*#__PURE__*/function () {
if (list2.length && onList.length) {
list2.forEach(function (item) {
onList.forEach(function (arr) {
+ var cb = function cb() {
+ var time = item.timestamp;
+
+ if (time !== _this.__lastTime[arr[0]]) {
+ _this.__lastTime[arr[0]] = time;
+ arr[1] && arr[1]();
+ }
+ };
+
+ cb.__karasEventCb = arr[1];
item.off(arr[0], arr[1]);
- item.on(arr[0], arr[1]);
+ item.on(arr[0], cb);
});
});
}
@@ -32591,7 +32620,7 @@ var Controller = /*#__PURE__*/function () {
if (time !== _this2.__lastTime[id]) {
_this2.__lastTime[id] = time;
- handle();
+ handle && handle();
}
};
@@ -41889,7 +41918,7 @@ var refresh = {
Cache: Cache
};
-var version = "0.78.1";
+var version = "0.78.2";
Geom.register('$line', Line);
Geom.register('$polyline', Polyline);
diff --git a/index.es.js.map b/index.es.js.map
index 202b1296d..13cfcbc2b 100644
--- a/index.es.js.map
+++ b/index.es.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.es.js","sources":["src/util/enums.js","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/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/Page.js","src/refresh/Cache.js","src/refresh/level.js","src/node/Text.js","src/util/flatten.js","src/util/builder.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/refresh/reflow.js","src/node/Dom.js","src/node/Img.js","src/node/Defs.js","src/node/geom/Geom.js","src/util/updater.js","src/util/diff.js","src/animate/Controller.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/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":["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 STYLE2LOWER_MAP[s] = STYLE2LOWER_MAP[s] || s.toLowerCase().replace(/_([a-z])/g, function($0, $1) {\n return $1.toUpperCase();\n });\n\n return STYLE2LOWER_MAP[s];\n}\n\nconst STYLE2UPPER_MAP = {};\nfunction style2Upper(s) {\n STYLE2UPPER_MAP[s] = STYLE2UPPER_MAP[s] || s.replace(/([a-z\\d_])([A-Z])/g, function($0, $1, $2) {\n return $1 + '_' + $2;\n }).toUpperCase();\n\n return STYLE2UPPER_MAP[s];\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\n// Root的update过程使用\nconst UPDATE_KEY = {\n UPDATE_NODE: 0,\n UPDATE_STYLE: 1,\n UPDATE_FOCUS: 2,\n UPDATE_COMPONENT: 3,\n UPDATE_OVERWRITE: 4,\n UPDATE_KEYS: 5,\n UPDATE_LIST: 6,\n UPDATE_CONFIG: 7,\n UPDATE_ADD_DOM: 8,\n UPDATE_REMOVE_DOM: 9,\n};\n\n// animation计算每帧使用\nconst KEY_FRAME_KEY = {\n FRAME_STYLE: 0,\n FRAME_TIME: 1,\n FRAME_EASING: 2,\n FRAME_TRANSITION: 3,\n};\n\n// 节点使用\nconst NODE_KEY = {\n NODE_DOM_PARENT: 0,\n NODE_OPACITY: 1,\n NODE_MATRIX: 2,\n NODE_MATRIX_EVENT: 3,\n NODE_CACHE: 4,\n NODE_CACHE_TOTAL: 5,\n NODE_CACHE_FILTER: 6,\n NODE_CACHE_MASK: 7,\n NODE_CACHE_OVERFLOW: 8,\n NODE_STRUCT: 9,\n NODE_TAG_NAME: 10,\n NODE_CURRENT_STYLE: 11,\n NODE_CURRENT_PROPS: 12,\n NODE_COMPUTED_STYLE: 13,\n NODE_CACHE_STYLE: 14,\n NODE_CACHE_PROPS: 15,\n NODE_LIMIT_CACHE: 16,\n NODE_IS_MASK: 17,\n NODE_IS_INLINE: 18,\n NODE_HAS_CONTENT: 19,\n NODE_REFRESH_LV: 20,\n NODE_IS_DESTROYED: 21,\n NODE_STYLE: 22,\n NODE_UPDATE_HASH: 23,\n NODE_UNIQUE_UPDATE_ID: 24,\n NODE_DEFS_CACHE: 25,\n NODE_PERSPECTIVE_MATRIX: 26,\n NODE_VIRTUAL_DOM: 27,\n NODE_CACHE_AS_BITMAP: 28,\n};\n\n// struct用\nconst STRUCT_KEY = {\n STRUCT_NODE: 0,\n STRUCT_INDEX: 1,\n STRUCT_CHILD_INDEX: 2,\n STRUCT_LV: 3,\n STRUCT_NUM: 4,\n STRUCT_TOTAL: 5,\n STRUCT_HAS_MASK: 6,\n};\n\nconst ANIMATE_KEY = {\n I_ASSIGNING: 0,\n I_IN_FPS: 1,\n I_IS_DELAY: 2,\n I_BEGIN: 3,\n I_END: 4,\n I_FINISHED: 5,\n I_NEXT_END: 6,\n I_FIRST_PLAY: 7,\n I_PLAY_CB: 8,\n I_TARGET: 9,\n I_ROOT: 10,\n I_FRAMES: 11,\n I_FRAMES_R: 12,\n I_CURRENT_TIME: 13,\n I_NEXT_TIME: 14,\n I_STYLE: 15,\n I_DURATION: 16,\n I_ITERATIONS: 17,\n I_FILL: 18,\n I_PLAYBACK_RATE: 19,\n I_PLAY_COUNT: 20,\n I_PLAY_STATE: 21,\n I_DESTROYED: 22,\n I_START_TIME: 23,\n I_FPS_TIME: 24,\n I_EASING: 25,\n I_ENTER_FRAME: 26,\n I_DELAY: 27,\n I_END_DELAY: 28,\n I_KEYS: 29,\n I_ORIGIN_STYLE: 30,\n I_CURRENT_FRAMES: 31,\n I_CURRENT_FRAME: 32,\n I_SPF_LIMIT: 33,\n I_FPS: 34,\n I_DIRECTION: 35,\n I_FIRST_ENTER: 36,\n I_STAY_BEGIN: 37,\n I_STAY_END: 38,\n I_IS2: 39,\n I_END_TIME: 40,\n I_NODE_CONFIG: 41,\n I_ROOT_CONFIG: 42,\n I_OUT_BEGIN_DELAY: 43,\n I_TIME_STAMP: 44,\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 UPDATE_KEY,\n KEY_FRAME_KEY,\n NODE_KEY,\n STRUCT_KEY,\n ANIMATE_KEY,\n ELLIPSIS: '…',\n};\n","import enums from '../util/enums';\n\nconst {\n STRUCT_KEY: {\n STRUCT_NODE,\n STRUCT_INDEX,\n STRUCT_CHILD_INDEX,\n STRUCT_LV,\n },\n NODE_KEY: {\n NODE_IS_DESTROYED,\n NODE_STRUCT,\n },\n} = enums;\n\nclass 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.__config = {};\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.__virtualDom = null;\n this.__bbox = null;\n this.__filterBbox = null;\n }\n\n __structure(i, lv, j) {\n return this.__config[NODE_STRUCT] = {\n [STRUCT_NODE]: this,\n [STRUCT_INDEX]: i,\n [STRUCT_CHILD_INDEX]: j,\n [STRUCT_LV]: lv,\n };\n }\n\n __modifyStruct(root, offset = 0) {\n let struct = this.__config[NODE_STRUCT];\n return [struct, 0];\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.__config[NODE_IS_DESTROYED] = 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.__config[NODE_IS_DESTROYED];\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","let o = {\n AUTO: 0,\n PX: 1,\n PERCENT: 2,\n NUMBER: 3,\n INHERIT: 4,\n DEG: 5,\n STRING: 6,\n RGBA: 7,\n REM: 8,\n EM: 9,\n VW: 10,\n VH: 11,\n VMAX: 12,\n VMIN: 13,\n GRADIENT: 14, // 特殊格式,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, o.PERCENT];\n }\n else if(/px$/i.test(v)) {\n return [n, o.PX];\n }\n else if(/deg$/i.test(v)) {\n return [n, o.DEG];\n }\n else if(/rem$/i.test(v)) {\n return [n, o.REM];\n }\n else if(/vw$/i.test(v)) {\n return [n, o.VW];\n }\n else if(/vh$/i.test(v)) {\n return [n, o.VH];\n }\n else if(/em$/i.test(v)) {\n return [n, o.EM];\n }\n else if(/vw$/i.test(v)) {\n return [n, o.VW];\n }\n else if(/vh$/i.test(v)) {\n return [n, o.VH];\n }\n else if(/vmax$/i.test(v)) {\n return [n, o.VMAX];\n }\n else if(/vmin$/i.test(v)) {\n return [n, o.VMIN];\n }\n return [n, o.NUMBER];\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(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 vd.defs.forEach(item => {\n s += joinDef(item);\n });\n s += '';\n vd.bb.forEach(item => {\n s += joinVd(item);\n });\n s += '';\n (vd.children || []).forEach(item => {\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 (vd.children || []).forEach(item => {\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 += '' + def.tagName + '>';\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 += '>' + item.tagName + '>';\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 === 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 extendAnimate(ovd, nvd) {\n let list = nvd.__animationList = ovd.animationList.splice(0);\n list.forEach(item => {\n item.__setTarget(nvd);\n // 事件队列的缘故,可能动画本帧刚执行过,然后再继承,就会缺失,需再次赋值一遍;也有可能停留最后\n if(item.assigning || item.finished && item.__stayEnd()) {\n item.assignCurrentStyle();\n }\n });\n // 帧动画继承\n nvd.__frameAnimateList = ovd.__frameAnimateList.splice(0);\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 extendAnimate,\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 draw() {\n // 空函数,仅对小程序提供hook特殊处理,flush缓冲\n },\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(/' + str.charAt(i).replace('<', '<').replace(/[ \\n]/, ' ') + '';\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();\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(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 canvas.draw();\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 canvas.draw();\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","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[0] > 0) {\n noRadius = false;\n }\n else {\n return 0;\n }\n if(item[1] === PX) {\n return Math.max(0, item[0]);\n }\n else if(item[1] === PERCENT) {\n return Math.max(0, item[0] * (i ? h : w) * 0.01);\n }\n else if(item[1] === REM) {\n return Math.max(0, item[0] * root.computedStyle[FONT_SIZE]);\n }\n else if(item[1] === VW) {\n return Math.max(0, item[0] * root.width * 0.01);\n }\n else if(item[1] === VH) {\n return Math.max(0, item[0] * root.height * 0.01);\n }\n else if(item[1] === VMAX) {\n return Math.max(0, item[0] * Math.max(root.width, root.height) * 0.01);\n }\n else if(item[1] === VMIN) {\n return Math.max(0, item[0] * 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[1] === PX) {\n v = Math.max(0, item[0]);\n v = Math.min(i ? h : w, v);\n }\n else {\n v = Math.max(0, item[0] * (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[1] === PX) {\n v = Math.max(0, item[0]);\n v = Math.min(i ? h : w, v);\n }\n else {\n v = Math.max(0, item[0] * (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[1]) > -1) {\n v[1] = PX;\n }\n return v;\n }\n else {\n return [\n {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[data] || 50,\n 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[1] === PERCENT) {\n list.push([item[0], p[0] * 0.01]);\n }\n else if(p[1] === REM) {\n list.push([item[0], p[0] * root.computedStyle[FONT_SIZE] / length]);\n }\n else if(p[1] === VW) {\n list.push([item[0], p[0] * root.width / length]);\n }\n else if(p[1] === VH) {\n list.push([item[0], p[0] * root.height / length]);\n }\n else if(p[1] === VMAX) {\n list.push([item[0], p[0] * Math.max(root.width, root.height) / length]);\n }\n else if(p[1] === VMIN) {\n list.push([item[0], p[0] * Math.min(root.width, root.height) / length]);\n }\n else {\n list.push([item[0], p[0] / 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[1] === PERCENT) {\n cx = x1 + positionX[0] * iw * 0.01;\n }\n else if(positionX[1] === REM) {\n cx = x1 + positionX[0] * root.computedStyle[FONT_SIZE];\n }\n else if(positionX[1] === VW) {\n cx = x1 + positionX[0] * root.width * 0.01;\n }\n else if(positionX[1] === VH) {\n cx = x1 + positionX[0] * root.height * 0.01;\n }\n else if(positionX[1] === VMAX) {\n cx = x1 + positionX[0] * Math.max(root.width, root.height) * 0.01;\n }\n else if(positionX[1] === VMIN) {\n cx = x1 + positionX[0] * Math.min(root.width, root.height) * 0.01;\n }\n else {\n cx = x1 + positionX[0];\n }\n if(positionY[1] === PERCENT) {\n cy = y1 + positionY[0] * ih * 0.01;\n }\n else if(positionY[1] === REM) {\n cy = y1 + positionY[0] * root.computedStyle[FONT_SIZE];\n }\n else if(positionY[1] === VW) {\n cy = y1 + positionY[0] * root.width * 0.01;\n }\n else if(positionY[1] === VH) {\n cy = y1 + positionY[0] * root.height * 0.01;\n }\n else if(positionY[1] === VH) {\n cy = y1 + positionY[0] * Math.max(root.width, root.height) * 0.01;\n }\n else if(positionY[1] === VH) {\n cy = y1 + positionY[0] * Math.min(root.width, root.height) * 0.01;\n }\n else {\n cy = y1 + positionY[0];\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 = [[50, PERCENT], [50, 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 = [[50, PERCENT], [50, 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[1]) > -1) {\n v[1] = 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 KEY_COLOR = [\n [STYLE_KEY.BACKGROUND_COLOR],\n [STYLE_KEY.BORDER_BOTTOM_COLOR],\n [STYLE_KEY.BORDER_LEFT_COLOR],\n [STYLE_KEY.BORDER_RIGHT_COLOR],\n [STYLE_KEY.BORDER_TOP_COLOR],\n [STYLE_KEY.COLOR], // 这2个特殊,新增GRADIENT渐变色\n [STYLE_KEY.TEXT_STROKE_COLOR],\n];\n\nconst KEY_LENGTH = [\n [STYLE_KEY.FONT_SIZE],\n [STYLE_KEY.BORDER_BOTTOM_WIDTH],\n [STYLE_KEY.BORDER_LEFT_WIDTH],\n [STYLE_KEY.BORDER_RIGHT_WIDTH],\n [STYLE_KEY.BORDER_TOP_WIDTH],\n [STYLE_KEY.LEFT],\n [STYLE_KEY.TOP],\n [STYLE_KEY.RIGHT],\n [STYLE_KEY.BOTTOM],\n [STYLE_KEY.FLEX_BASIS],\n [STYLE_KEY.WIDTH],\n [STYLE_KEY.HEIGHT],\n [STYLE_KEY.LINE_HEIGHT],\n [STYLE_KEY.MARGIN_BOTTOM],\n [STYLE_KEY.MARGIN_LEFT],\n [STYLE_KEY.MARGIN_TOP],\n [STYLE_KEY.MARGIN_RIGHT],\n [STYLE_KEY.PADDING_TOP],\n [STYLE_KEY.PADDING_RIGHT],\n [STYLE_KEY.PADDING_BOTTOM],\n [STYLE_KEY.PADDING_LEFT],\n [STYLE_KEY.STROKE_WIDTH],\n [STYLE_KEY.STROKE_MITERLIMIT],\n [STYLE_KEY.LETTER_SPACING],\n [STYLE_KEY.PERSPECTIVE],\n [STYLE_KEY.TEXT_STROKE_WIDTH],\n];\n\nconst KEY_GRADIENT = [\n [STYLE_KEY.BACKGROUND_IMAGE],\n [STYLE_KEY.FILL],\n [STYLE_KEY.STROKE],\n];\n\nconst KEY_RADIUS = [\n [STYLE_KEY.BORDER_TOP_LEFT_RADIUS],\n [STYLE_KEY.BORDER_TOP_RIGHT_RADIUS],\n [STYLE_KEY.BORDER_BOTTOM_RIGHT_RADIUS],\n [STYLE_KEY.BORDER_BOTTOM_LEFT_RADIUS],\n];\n\nconst COLOR_HASH = {};\nKEY_COLOR.forEach(k => {\n COLOR_HASH[k] = true;\n});\n\nconst LENGTH_HASH = {};\nKEY_LENGTH.forEach(k => {\n LENGTH_HASH[k] = true;\n});\n\nconst RADIUS_HASH = {};\nKEY_RADIUS.forEach(k => {\n RADIUS_HASH[k] = true;\n});\n\nconst GRADIENT_HASH = {};\nKEY_GRADIENT.forEach(k => {\n GRADIENT_HASH[k] = true;\n});\n\nconst GRADIENT_TYPE = {\n linear: true,\n radial: true,\n conic: true,\n};\n\nconst KEY_EXPAND = [\n [STYLE_KEY.TRANSLATE_X],\n [STYLE_KEY.TRANSLATE_Y],\n [STYLE_KEY.TRANSLATE_Z],\n [STYLE_KEY.SKEW_X],\n [STYLE_KEY.SKEW_Y],\n [STYLE_KEY.SCALE_X],\n [STYLE_KEY.SCALE_Y],\n [STYLE_KEY.SCALE_Z],\n [STYLE_KEY.ROTATE_X],\n [STYLE_KEY.ROTATE_Y],\n [STYLE_KEY.ROTATE_Z],\n];\n\nconst EXPAND_HASH = {};\nKEY_EXPAND.forEach(k => {\n EXPAND_HASH[k] = true;\n});\n\nexport default {\n KEY_COLOR,\n KEY_EXPAND,\n KEY_GRADIENT,\n KEY_LENGTH,\n KEY_RADIUS,\n COLOR_HASH,\n EXPAND_HASH,\n GRADIENT_HASH,\n LENGTH_HASH,\n RADIUS_HASH,\n GRADIENT_TYPE,\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;\n\nconst GEOM = {};\nconst GEOM_KEY_SET = [];\nconst IGNORE = {\n [STYLE_KEY.POINTER_EVENTS]: true,\n};\nconst REPAINT = {\n [STYLE_KEY.TRANSFORM]: true,\n [STYLE_KEY.TRANSLATE_X]: true,\n [STYLE_KEY.TRANSLATE_Y]: true,\n [STYLE_KEY.SKEW_X]: true,\n [STYLE_KEY.SKEW_Y]: true,\n [STYLE_KEY.SCALE_X]: true,\n [STYLE_KEY.SCALE_Y]: true,\n [STYLE_KEY.ROTATE_Z]: true,\n [STYLE_KEY.COLOR]: true,\n [STYLE_KEY.FONT_STYLE]: true,\n [STYLE_KEY.STROKE_WIDTH]: true,\n [STYLE_KEY.FILL]: true,\n [STYLE_KEY.STROKE_DASHARRAY]: true,\n [STYLE_KEY.STROKE_LINECAP]: true,\n [STYLE_KEY.STROKE_LINEJOIN]: true,\n [STYLE_KEY.STROKE_MITERLIMIT]: true,\n [STYLE_KEY.BACKGROUND_COLOR]: true,\n [STYLE_KEY.BACKGROUND_IMAGE]: true,\n [STYLE_KEY.BACKGROUND_POSITION_X]: true,\n [STYLE_KEY.BACKGROUND_POSITION_Y]: true,\n [STYLE_KEY.BACKGROUND_REPEAT]: true,\n [STYLE_KEY.BACKGROUND_SIZE]: true,\n [STYLE_KEY.STROKE]: true,\n [STYLE_KEY.BORDER_BOTTOM_COLOR]: true,\n [STYLE_KEY.BORDER_LEFT_COLOR]: true,\n [STYLE_KEY.BORDER_RIGHT_COLOR]: true,\n [STYLE_KEY.BORDER_TOP_COLOR]: true,\n [STYLE_KEY.BORDER_TOP_LEFT_RADIUS]: true,\n [STYLE_KEY.BORDER_TOP_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_LEFT_RADIUS]: true,\n [STYLE_KEY.VISIBILITY]: true,\n [STYLE_KEY.OPACITY]: true,\n [STYLE_KEY.Z_INDEX]: true,\n [STYLE_KEY.FILTER]: true,\n [STYLE_KEY.BOX_SHADOW]: true,\n [STYLE_KEY.OVERFLOW]: true,\n [STYLE_KEY.BACKGROUND_CLIP]: true,\n [STYLE_KEY.TEXT_STROKE_WIDTH]: true,\n [STYLE_KEY.TEXT_STROKE_COLOR]: true,\n [STYLE_KEY.TEXT_STROKE_OVER]: true,\n};\n\nlet o = {\n GEOM,\n GEOM_KEY_SET,\n IGNORE,\n REPAINT,\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 IGNORE.hasOwnProperty(k);\n },\n isGeom(tagName, k) {\n return tagName && k && GEOM.hasOwnProperty(k) && GEOM[k].hasOwnProperty(tagName);\n },\n isRepaint(k, tagName) {\n return REPAINT.hasOwnProperty(k) || 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 DISPLAY,\n FLEX_DIRECTION,\n FLEX_GROW,\n FLEX_SHRINK,\n FLEX_BASIS,\n JUSTIFY_CONTENT,\n ALIGN_SELF,\n ALIGN_ITEMS,\n MATRIX,\n LETTER_SPACING,\n BACKGROUND_CLIP,\n WHITE_SPACE,\n TEXT_OVERFLOW,\n LINE_CLAMP,\n ORDER,\n FLEX_WRAP,\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 COLOR_HASH,\n LENGTH_HASH,\n RADIUS_HASH,\n GRADIENT_HASH,\n EXPAND_HASH,\n GRADIENT_TYPE,\n} = key;\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[1] = NUMBER;\n }\n else if(k === TRANSLATE_X || k === TRANSLATE_Y || k === TRANSLATE_Z) {\n if(arr[1] === NUMBER) {\n arr[1] = PX;\n }\n }\n else if(k === PERSPECTIVE) {\n if([NUMBER, PERCENT, DEG].indexOf(arr[1]) > -1) {\n arr[1] = PX;\n }\n }\n else {\n if(arr[1] === NUMBER) {\n arr[1] = 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] = [null];\n }\n else if(Array.isArray(temp)) {\n res[BACKGROUND_IMAGE] = temp.map(item => {\n if(!item) {\n return null;\n }\n if(reg.gradient.test(item)) {\n return [gradient.parseGradient(item), GRADIENT];\n }\n if(reg.img.test(item)) {\n return [reg.img.exec(item)[2], STRING];\n }\n return null;\n });\n }\n // 区分是渐变色还是图\n else if(reg.gradient.test(temp)) {\n res[BACKGROUND_IMAGE] = [[gradient.parseGradient(temp), GRADIENT]];\n }\n else if(reg.img.test(temp)) {\n res[BACKGROUND_IMAGE] = [[reg.img.exec(temp)[2], STRING]];\n }\n else {\n res[BACKGROUND_IMAGE] = [null];\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] = [rgba2int(bgc[0]), RGBA];\n }\n else {\n bgc = /rgba?\\s*\\(.+\\)/i.exec(temp);\n res[BACKGROUND_COLOR] = [rgba2int(bgc ? bgc[0] : [0, 0, 0, 0]), 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[1]) > -1) {\n v[1] = PX;\n }\n return v;\n }\n else {\n return [\n {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[item] || 0,\n 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 [0, AUTO],\n [0, 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[1]) > -1) {\n n[1] = PX;\n }\n v.push(n);\n }\n else if(item === 'contain' || item === 'cover') {\n v.push([item, STRING]);\n }\n else {\n v.push([0, AUTO]);\n }\n }\n return v;\n }\n else {\n return [\n [0, AUTO],\n [0, 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)]] = [rgba2int(v || 'transparent'), 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[1]) > -1) {\n n[1] = PX;\n }\n if(n[0] < 0) {\n n[0] = 0;\n }\n arr[i] = n;\n }\n else {\n arr[i] = [0, PX];\n }\n }\n res[STYLE_KEY[style2Upper(k)]] = arr;\n }\n });\n temp = style.transform;\n if(temp === null) {\n res[TRANSFORM] = null;\n }\n else 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([MATRIX, [\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([MATRIX, arr]);\n }\n }\n else if(k === 'perspective') {\n let arr = calUnit(v);\n if(arr[0] < 0) {\n arr[0] = 0;\n }\n compatibleTransform(PERSPECTIVE, arr);\n transform.push([PERSPECTIVE, 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([ROTATE_3D, 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([k2, 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([k1, arr1]);\n transform.push([k2, 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([k1, arr1]);\n transform.push([k2, arr2]);\n transform.push([k3, arr3]);\n }\n }\n });\n }\n }\n temp = style.perspective;\n if(temp !== undefined) {\n let arr = calUnit(temp || 0);\n if(arr[0] < 0) {\n arr[0] = 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[1]) > -1) {\n n[1] = PX;\n }\n arr.push(n);\n }\n else {\n arr.push([\n {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[item],\n PERCENT,\n ]);\n // 不规范的写法变默认值50%\n if(isNil(arr[i][0])) {\n arr[i][0] = 50;\n }\n }\n }\n }\n else {\n arr.push([50, PERCENT]);\n arr.push([50, 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 = [0, AUTO];\n }\n else {\n v = calUnit(v || 0);\n // 无单位视为px\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = 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[0] < 0) {\n v[0] = 0;\n }\n });\n temp = style.flexBasis;\n if(temp !== undefined) {\n if(/content/i.test(temp)) {\n res[FLEX_BASIS] = [temp, STRING];\n }\n else if(/^[\\d.]/.test(temp)) {\n let v = res[FLEX_BASIS] = calUnit(temp);\n v[0] = Math.max(v[0], 0);\n // 无单位视为px\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n }\n else {\n res[FLEX_BASIS] = [0, 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] = [[], INHERIT];\n }\n else if(reg.gradient.test(temp)) {\n res[COLOR] = [gradient.parseGradient(temp), GRADIENT];\n }\n else {\n res[COLOR] = [rgba2int(temp), RGBA];\n }\n }\n temp = style.textStrokeColor;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[TEXT_STROKE_COLOR] = [[], INHERIT];\n }\n else if(reg.gradient.test(temp)) {\n res[TEXT_STROKE_COLOR] = [gradient.parseGradient(temp), GRADIENT];\n }\n else {\n res[TEXT_STROKE_COLOR] = [rgba2int(temp), RGBA];\n }\n }\n temp = style.fontSize;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[FONT_SIZE] = [0, INHERIT];\n }\n else {\n let v = calUnit(temp);\n // fontSize不能为负数,否则为继承\n if(v < 0) {\n res[FONT_SIZE] = [0, INHERIT];\n }\n else {\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = 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] = [0, INHERIT];\n }\n else {\n let v = calUnit(temp);\n // textStrokeWidth不能为负数,否则为继承\n if(v < 0) {\n res[TEXT_STROKE_WIDTH] = [0, INHERIT];\n }\n else {\n if([NUMBER, DEG, PERCENT].indexOf(v[1]) > -1) {\n v[1] = 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] = [0, 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, STRING];\n }\n }\n temp = style.fontWeight;\n if(temp !== undefined) {\n if(/bold/i.test(temp)) {\n res[FONT_WEIGHT] = [700, NUMBER];\n }\n else if(/normal/i.test(temp)) {\n res[FONT_WEIGHT] = [400, NUMBER];\n }\n else if(/lighter/i.test(temp)) {\n res[FONT_WEIGHT] = [200, NUMBER];\n }\n else if(/inherit/i.test(temp)) {\n res[FONT_WEIGHT] = [0, INHERIT];\n }\n else {\n res[FONT_WEIGHT] = [Math.max(0, parseInt(temp)) || 400, NUMBER];\n }\n }\n temp = style.fontStyle;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[FONT_STYLE] = [0, 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, STRING];\n }\n }\n temp = style.fontFamily;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[FONT_FAMILY] = [0, INHERIT];\n }\n else {\n // 统一文字声明格式\n res[FONT_FAMILY] = [temp.toString().toLowerCase().replace(/['\"]/, '').replace(/\\s*,\\s*/g, ','), STRING];\n }\n }\n temp = style.writingMode;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[WRITING_MODE] = [0, 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, STRING];\n }\n }\n temp = style.textAlign;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[TEXT_ALIGN] = [0, 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, STRING];\n }\n }\n temp = style.lineHeight;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[LINE_HEIGHT] = [0, INHERIT];\n }\n else if(/normal/i.test(temp)) {\n res[LINE_HEIGHT] = [0, AUTO];\n }\n // lineHeight默认数字,想要px必须强制带单位\n else if(/^[\\d.]+/i.test(temp)) {\n let v = calUnit(temp);\n if([DEG].indexOf(v[1]) > -1) {\n v[1] = 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] = [null, AUTO];\n }\n else {\n res[LINE_HEIGHT] = [n, NUMBER];\n }\n }\n }\n temp = style.letterSpacing;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[LETTER_SPACING] = [0, INHERIT];\n }\n else if(/normal/i.test(temp)) {\n res[LETTER_SPACING] = [0, PX];\n }\n else if(/^[-+]?[\\d.]/.test(temp)) {\n let v = calUnit(temp);\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n res[LETTER_SPACING] = v;\n }\n else {\n res[LETTER_SPACING] = [parseFloat(temp) || 0, PX];\n }\n }\n temp = style.whiteSpace;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[WHITE_SPACE] = [0, INHERIT];\n }\n else {\n res[WHITE_SPACE] = [temp, 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 temp = style.fill;\n if(temp !== undefined) {\n if(!temp) {\n res[FILL] = [['none', STRING]];\n }\n else if(Array.isArray(temp)) {\n if(temp.length) {\n res[FILL] = temp.map(item => {\n if(!item) {\n return ['none', STRING];\n }\n else if(reg.gradient.test(item)) {\n return [gradient.parseGradient(item), GRADIENT];\n }\n else {\n return [rgba2int(item), RGBA];\n }\n });\n }\n else {\n res[FILL] = [['none', STRING]];\n }\n }\n else if(reg.gradient.test(temp)) {\n res[FILL] = [[gradient.parseGradient(temp), GRADIENT]];\n }\n else {\n res[FILL] = [[rgba2int(temp), RGBA]];\n }\n }\n temp = style.stroke;\n if(temp !== undefined) {\n if(!temp) {\n res[STROKE] = [['none', STRING]];\n }\n else if(Array.isArray(temp)) {\n if(temp.length) {\n res[STROKE] = temp.map(item => {\n if(!item) {\n return ['none', STRING];\n }\n else if(reg.gradient.test(item)) {\n return [gradient.parseGradient(item), GRADIENT];\n }\n else {\n return [rgba2int(item), RGBA];\n }\n });\n }\n else {\n res[STROKE] = [['none', STRING]];\n }\n }\n else if(reg.gradient.test(temp)) {\n res[STROKE] = [[gradient.parseGradient(temp), GRADIENT]];\n }\n else {\n res[STROKE] = [[rgba2int(temp), RGBA]];\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[1]) > -1) {\n v[1] = PX;\n }\n v[0] = Math.max(v[0], 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 = null;\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 f = f || [];\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[1]) > -1) {\n v[1] = PX;\n }\n // x/y可以负,blur和spread不行\n if(i > 2 && v[0] < 0) {\n v = 0;\n }\n res.push(v);\n }\n else {\n res.push([0, 1]);\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(['dropShadow', res]);\n }\n }\n else {\n let m2 = /([-+]?[\\d.]+\\s*[pxremvwhdg%]*)/i.exec(v);\n if(m2) {\n f = f || [];\n let v = calUnit(m2[0]);\n if(k === 'blur') {\n if([DEG, PERCENT].indexOf(v[1]) > -1) {\n return;\n }\n if(v[1] === NUMBER) {\n v[1] = PX;\n }\n v[0] = Math.max(v[0], 0);\n f.push([k, v]);\n }\n else if(k === 'hue-rotate' || k === 'huerotate') {\n if([NUMBER, DEG].indexOf(v[1]) === -1) {\n return;\n }\n v[1] = DEG;\n f.push(['hueRotate', v]);\n }\n else if(k === 'saturate' || k === 'brightness' || k === 'grayscale' || k === 'contrast' || k === 'sepia' || k === 'invert') {\n if([NUMBER, PERCENT].indexOf(v[1]) === -1) {\n return;\n }\n v[0] = Math.max(v[0], 0);\n v[1] = 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] = [0, INHERIT];\n }\n else {\n let v = reset.INHERIT.visibility;\n if(/hidden/i.test(temp)) {\n v = 'hidden';\n }\n res[VISIBILITY] = [v, STRING];\n }\n }\n temp = style.pointerEvents;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[POINTER_EVENTS] = [0, 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, STRING];\n }\n }\n temp = style.boxShadow;\n if(temp !== undefined) {\n let bs = null;\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 bs = bs || [];\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[1]) > -1) {\n v[1] = PX;\n }\n // x/y可以负,blur和spread不行\n if(i > 2 && v[0] < 0) {\n v = 0;\n }\n res.push(v);\n }\n else {\n res.push([0, 1]);\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[1] === AUTO) {\n if(k === WIDTH) {\n parent = parent.domParent;\n }\n else {\n break;\n }\n }\n else if(style[1] === PX) {\n return n * style[0];\n }\n else if(style[1] === PERCENT) {\n n *= style[0] * 0.01;\n parent = parent.domParent;\n }\n else if(style[1] === REM) {\n return n * style[0] * parent.root.computedStyle[FONT_SIZE];\n }\n else if(style[1] === VW) {\n return n * style[0] * parent.root.width * 0.01;\n }\n else if(style[1] === VH) {\n return n * style[0] * parent.root.height * 0.01;\n }\n else if(style[1] === VMAX) {\n return n * style[0] * Math.max(parent.root.width, parent.root.height) * 0.01;\n }\n else if(style[1] === VMIN) {\n return n * style[0] * 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[1] === AUTO) {\n v = 0;\n }\n else if([PX, NUMBER].indexOf(v[1]) > -1) {\n v = v[0];\n }\n else if(v[1] === PERCENT) {\n if(isWidth) {\n v = calRelativePercent(v[0], parent, WIDTH);\n }\n else {\n v = calRelativePercent(v[0], parent, HEIGHT);\n }\n }\n else if(v[1] === REM) {\n v = v[0] * parent.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * parent.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * parent.root.height * 0.01;\n }\n else if(v[1] === VMAX) {\n v = v[0] * Math.max(parent.root.width, parent.root.height) * 0.01;\n }\n else if(v[1] === VMIN) {\n v = v[0] * Math.min(parent.root.width, parent.root.height) * 0.01;\n }\n return v;\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[0] !== ob[0]) {\n return false;\n }\n // translate/matrix等都是数组\n if(!equalArr(oa[1], ob[1])) {\n return false;\n }\n }\n return true;\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 === BACKGROUND_SIZE) {\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][0] !== bb[0][0] || aa[0][1] !== bb[0][1] || aa[1][0] !== bb[1][0] || aa[1][1] !== bb[1][1]) {\n return false;\n }\n }\n return true;\n }\n if(k === TRANSFORM_ORIGIN || RADIUS_HASH.hasOwnProperty(k)) {\n return a[0][0] === b[0][0] && a[0][1] === b[0][1]\n && a[1][0] === b[1][0] && a[1][1] === b[1][1];\n }\n if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y\n || LENGTH_HASH.hasOwnProperty(k) || EXPAND_HASH.hasOwnProperty(k)) {\n return a[0] === b[0] && a[1] === b[1];\n }\n if(k === BOX_SHADOW) {\n return equalArr(a, b);\n }\n // color等是rgba颜色时\n if(k === COLOR || k === TEXT_STROKE_COLOR) {\n if(a[1] !== b[1]) {\n return false;\n }\n if(a[1] === RGBA) {\n return equalArr(a[0], b[0]);\n }\n else {}\n }\n if(COLOR_HASH.hasOwnProperty(k)) {\n return a[1] === b[1] && equalArr(a[0], b[0]);\n }\n // color/fill等是gradient时\n if(GRADIENT_HASH.hasOwnProperty(k) && a.k === b.k && GRADIENT_TYPE.hasOwnProperty(a.k)) {\n let av = a.v;\n let bv = b.v;\n if(a.d !== b.d || av.length !== bv.length) {\n return false;\n }\n for(let i = 0, len = av.length; i < len; i++) {\n let ai = av[i];\n let bi = bv[i];\n if(ai.length !== bi.length) {\n return false;\n }\n for(let j = 0; j < 4; j++) {\n if(ai[0][j] !== bi[0][j]) {\n return false;\n }\n }\n if(ai.length > 1) {\n if(ai[1][0] !== bi[1][0] || ai[1][1] !== bi[1][1]) {\n return false;\n }\n }\n }\n return true;\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 isRelativeOrAbsolute(node) {\n let position = node.currentStyle[POSITION];\n return position === 'relative' || position === 'absolute';\n}\n\nconst VALUE = {\n [POSITION]: true,\n [DISPLAY]: true,\n [STYLE_KEY.BACKGROUND_REPEAT]: true,\n [FLEX_DIRECTION]: true,\n [FLEX_GROW]: true,\n [FLEX_SHRINK]: true,\n [FLEX_WRAP]: true,\n [JUSTIFY_CONTENT]: true,\n [ALIGN_ITEMS]: true,\n [ALIGN_SELF]: true,\n [STYLE_KEY.OVERFLOW]: true,\n [STYLE_KEY.MIX_BLEND_MODE]: true,\n [STYLE_KEY.STROKE_LINECAP]: true,\n [STYLE_KEY.STROKE_LINEJOIN]: true,\n [STYLE_KEY.STROKE_MITERLIMIT]: true,\n [STYLE_KEY.FILL_RULE]: true,\n [OPACITY]: true,\n [Z_INDEX]: true,\n [BACKGROUND_CLIP]: true,\n [TEXT_OVERFLOW]: true,\n [LINE_CLAMP]: true,\n};\n// 仅1维数组\nconst ARRAY_0 = {\n [BACKGROUND_COLOR]: true,\n [STYLE_KEY.BORDER_TOP_COLOR]: true,\n [STYLE_KEY.BORDER_RIGHT_COLOR]: true,\n [STYLE_KEY.BORDER_BOTTOM_COLOR]: true,\n [STYLE_KEY.BORDER_LEFT_COLOR]: true,\n};\n// 仅2维数组且只有2个值\nconst ARRAY_0_1 = {\n [STYLE_KEY.BORDER_TOP_LEFT_RADIUS]: true,\n [STYLE_KEY.BORDER_TOP_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_LEFT_RADIUS]: true,\n [TRANSFORM_ORIGIN]: true,\n [PERSPECTIVE_ORIGIN]: true,\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 // 渐变特殊处理\n if(k === BACKGROUND_IMAGE) {\n res[k] = v.map(item => {\n if(item[1] === GRADIENT) {\n return [util.clone(item[0]), item[1]];\n }\n else {\n return item;\n }\n });\n }\n else if(k === FILL || k === STROKE) {\n res[k] = v.map(item => {\n // 渐变可能非法为空\n if(item[1] === GRADIENT) {\n return [util.clone(item[0]), item[1]];\n }\n // 颜色\n else if(item[1] === RGBA) {\n return [item[0].slice(0), item[1]];\n }\n // none\n else {\n return item;\n }\n });\n }\n else if(k === TRANSFORM) {\n if(v) {\n let n = v.slice(0);\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n n[i][1] = n[i][1].slice(0);\n }\n res[k] = n;\n }\n }\n else if(k === FILTER) {\n if(v) {\n let n = v.slice(0);\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n let k = n[i][0];\n n[i][1] = n[i][1].slice(0);\n if(k === 'dropShadow') {\n let temp = n[i][1];\n temp.forEach((item, j) => {\n temp[j] = temp[j].slice(0);\n });\n }\n }\n res[k] = n;\n }\n }\n else if(k === BOX_SHADOW) {\n if(v) {\n v = v.map(item => {\n let n = item.slice(0);\n n[4] = n[4].slice(0);\n return n;\n });\n res[k] = v;\n }\n }\n else if(k === TRANSLATE_PATH) {\n if(v) {\n res[k] = v.map(item => item.slice(0));\n }\n }\n else if(k === COLOR || k === TEXT_STROKE_COLOR) {\n if(v) {\n if(v[1] === GRADIENT) {\n res[k] = [util.clone(v[0]), v[1]];\n }\n else if(v[1] === RGBA) {\n res[k] = [v[0].slice(0), v[1]];\n }\n // inherit\n else {\n res[k] = v.slice(0);\n }\n }\n }\n // position等直接值类型赋值\n else if(VALUE.hasOwnProperty(k)) {\n res[k] = v;\n }\n // geom自定义属性\n else if(GEOM.hasOwnProperty(k)) {\n res[k] = util.clone(v);\n }\n // 其余皆是数组或空,默认是一维数组只需slice即可\n else if(v) {\n let n = res[k] = v.slice(0);\n // 特殊引用里数组某项再次clone\n if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n }\n }\n else if(k === BACKGROUND_SIZE) {\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n n[i][0] = n[i][0].slice(0);\n n[i][1] = n[i][1].slice(0);\n }\n }\n else if(ARRAY_0.hasOwnProperty(k)) {\n n[0] = n[0].slice(0);\n }\n else if(ARRAY_0_1.hasOwnProperty(k)) {\n n[0] = n[0].slice(0);\n n[1] = n[1].slice(0);\n }\n else if(k === TRANSFORM) {\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n }\n }\n else if(k === ROTATE_3D) {\n n[3] = n[3].slice(0);\n }\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 { PX, 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[0]);\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 [k, v] = item;\n let t = identity();\n calSingle(t, k, 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[1] === PERCENT) {\n return v[0] * ow * 0.01;\n }\n else if(v[1] === REM) {\n return v[0] * root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n return v[0] * root.width * 0.01;\n }\n else if(v[1] === VH) {\n return v[0] * root.height * 0.01;\n }\n else if(v[1] === VMAX) {\n return v[0] * Math.max(root.width, root.height) * 0.01;\n }\n else if(v[1] === VMIN) {\n return v[0] * Math.min(root.width, root.height) * 0.01;\n }\n }\n else if(k === TRANSLATE_Y) {\n if(v[1] === PERCENT) {\n return v[0] * oh * 0.01;\n }\n else if(v[1] === REM) {\n return v[0] * root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n return v[0] * root.width * 0.01;\n }\n else if(v[1] === VH) {\n return v[0] * root.height * 0.01;\n }\n else if(v[1] === VMAX) {\n return v[0] * Math.max(root.width, root.height) * 0.01;\n }\n else if(v[1] === VMIN) {\n return v[0] * 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[0];\n}\n\nfunction normalize(transform, ow, oh, root) {\n let res = [];\n transform.forEach(item => {\n let [k, v] = item;\n res.push([k, normalizeSingle(k, v, ow, oh, root)]);\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}\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**\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.parent;\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 [ROTATE_Z, [90, 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 NODE_KEY: {\n NODE_VIRTUAL_DOM,\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, lv, ctx, cache, 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 [ROTATE_Z, [90, 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.__config[NODE_VIRTUAL_DOM] = 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 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;\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 this.__isNew = true;\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 this.__isNew = true;\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 resetBbox(bbox) {}\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 get isNew() {\n return this.__isNew;\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, draw()}}\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.draw();\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, cb) {\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[0] += x + dbx + node.__sx1 - target.sx1;\n tfo[1] += y + dby + node.__sy1 - target.sy1;\n let inverse = tf.calMatrixByOrigin(transform, tfo);\n // 先将mask本身绘制到cache上,再设置模式绘制dom本身,因为都是img所以1个就够了\n list.forEach(item => {\n cb(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 cacheMask.draw(ctx);\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 cacheOverflow.draw(ctx);\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, transform, matrix, tfo, parentMatrix, inverse) {\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 if(transform && matrix && tfo) {\n tfo[0] += ox;\n tfo[1] += oy;\n let m = tf.calMatrixByOrigin(transform, tfo);\n matrix = mx.multiply(matrix, m);\n if(!mx.isE(parentMatrix)) {\n matrix = mx.multiply(parentMatrix, matrix);\n }\n if(inverse) {\n // 很多情况mask和target相同matrix,可简化计算\n if(util.equalArr(matrix, inverse)) {\n matrix = mx.identity();\n }\n else {\n inverse = mx.inverse(inverse);\n matrix = mx.multiply(inverse, matrix);\n }\n }\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n }\n ctx.drawImage(canvas, x, y, width, height, ox, oy, width, height);\n }\n\n static draw(ctx, opacity, matrix, cache) {\n ctx.globalAlpha = opacity;\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n let { x, y, canvas, sx1, sy1, dbx, dby, width, height } = cache;\n ctx.drawImage(canvas, x, y, width, height, sx1 - dbx, sy1 - dby, 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 static NA = 0; // 无缓存模式\n static LOCAL = 1; // 局部根节点\n static CHILD = 2; // 其子节点\n static SELF = 3; // webgl专用\n}\n\nexport default Cache;\n","import change from './change';\nimport enums from '../util/enums';\n\nconst { STYLE_KEY, STYLE_KEY: {\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n OPACITY,\n FILTER,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n} } = enums;\n\nconst ENUM = {\n // 低位表示 0;\n },\n /**\n * 得出等级\n * @param k\n * @returns {number|*}\n */\n getLevel(k) {\n if(change.isIgnore(k)) {\n return ENUM.NONE;\n }\n if(k === TRANSLATE_X) {\n return ENUM.TRANSLATE_X;\n }\n else if(k === TRANSLATE_Y) {\n return ENUM.TRANSLATE_Y;\n }\n else if(k === TRANSLATE_Z) {\n return ENUM.TRANSLATE_Z;\n }\n else if(TRANSFORMS.hasOwnProperty(k)) {\n return ENUM.TRANSFORM;\n }\n else if(k === OPACITY) {\n return ENUM.OPACITY;\n }\n else if(k === FILTER) {\n return ENUM.FILTER;\n }\n else if(k === PERSPECTIVE || k === PERSPECTIVE_ORIGIN) {\n return ENUM.PERSPECTIVE;\n }\n else if(change.isRepaint(k)) {\n return ENUM.REPAINT;\n }\n return ENUM.REFLOW;\n },\n isReflow(lv) {\n return !this.isRepaint(lv);\n },\n isRepaint(lv) {\n return lv < ENUM.REFLOW;\n },\n isRebuild(lv) {\n return lv >= ENUM.REBUILD;\n },\n}, ENUM);\no.TRANSFORMS = TRANSFORMS;\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 Cache from '../refresh/Cache';\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 NODE_KEY: {\n NODE_CACHE,\n NODE_LIMIT_CACHE,\n NODE_DOM_PARENT,\n NODE_MATRIX_EVENT,\n NODE_OPACITY,\n NODE_VIRTUAL_DOM,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_FOCUS,\n UPDATE_CONFIG,\n },\n ELLIPSIS,\n} = enums;\n\nconst { AUTO } = unit;\nconst { CANVAS, SVG, WEBGL } = mode;\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 }\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 __layout(data) {\n let __cache = this.__config[NODE_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 let __config = this.__config;\n __config[NODE_LIMIT_CACHE] = false;\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[1] === 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, lv, ctx, cache, dx = 0, dy = 0) {\n let { isDestroyed, computedStyle, textBoxes, cacheStyle, __config } = this;\n if(renderMode === SVG) {\n __config[NODE_VIRTUAL_DOM] = this.__virtualDom = {\n type: 'text',\n children: [],\n };\n }\n // >=REPAINT清空bbox\n if(lv >= level.REPAINT) {\n this.__bbox = null;\n this.__filterBbox = null;\n }\n if(isDestroyed || computedStyle[DISPLAY] === 'none' || computedStyle[VISIBILITY] === 'hidden'\n || !textBoxes.length) {\n return;\n }\n if(renderMode === CANVAS || renderMode === WEBGL) {\n // webgl借用离屏canvas绘制文本,cache标识为true是普通绘制,否则是超限降级情况\n if(renderMode === WEBGL) {\n if(cache) {\n let { sx, sy, bbox } = this;\n let __cache = __config[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 __config[NODE_CACHE] = __cache;\n __cache.__available = true;\n ctx = __cache.ctx;\n dx += __cache.dx;\n dy += __cache.dy;\n __config[NODE_LIMIT_CACHE] = false;\n }\n else {\n __config[NODE_LIMIT_CACHE] = true;\n return;\n }\n }\n else {\n let root = this.root;\n let c = inject.getCacheCanvas(root.width, root.height, '__$$OVERSIZE$$__');\n ctx = c.ctx;\n let {\n [NODE_DOM_PARENT]: {\n __config: {\n [NODE_MATRIX_EVENT]: m,\n [NODE_OPACITY]: opacity,\n },\n },\n } = __config;\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n ctx.globalAlpha = opacity;\n }\n }\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.__config[NODE_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 let self = this;\n if(s === self.__content) {\n if(util.isFunction(cb)) {\n cb(-1);\n }\n return;\n }\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__content = s;\n let res = {};\n let vd = self.domParent;\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_CONFIG] = vd.__config;\n let root = vd.root;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb(diff);\n }\n },\n });\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 root() {\n return this.domParent.root;\n }\n\n get currentStyle() {\n return this.domParent.currentStyle;\n }\n\n get style() {\n return this.__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 let { __sx1: sx, __sy1: sy, width, height,\n computedStyle: {\n [TEXT_STROKE_WIDTH]: textStrokeWidth,\n },\n } = this;\n // TODO: 文字描边暂时不清楚最大值是多少,影响不确定,先按描边宽算,因为会出现>>0.5宽的情况\n let half = textStrokeWidth;\n return [sx - half, sy - half, sx + width + half, sy + height + half];\n }\n\n get filterBbox() {\n if(!this.__filterBbox) {\n let 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\nText.prototype.__renderByMask = Text.prototype.render;\n\nexport default Text;\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 Text from '../node/Text';\nimport util from './util';\nimport $$type from './$$type';\nimport enums from './enums';\nimport flatten from './flatten';\n\nconst { NODE_KEY: {\n NODE_DOM_PARENT,\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n} } = enums;\nconst { TYPE_VD, TYPE_GM, TYPE_CP } = $$type;\n\nlet Xom, Dom, Img, Geom, Component;\n\nfunction initRoot(cd, root) {\n let c = flatten({\n tagName: root.tagName,\n props: {},\n children: cd,\n $$type: TYPE_VD,\n });\n root.__json = c;\n root.__host = root;\n let children = build(c.children, root, root);\n return relation(root, children);\n}\n\nfunction initDom(json, root, host, parent) {\n let vd = build(json, root, host);\n return relation(parent, vd);\n}\n\nfunction initCp(json, root, host) {\n if(util.isObject(json)) {\n // cp的flatten在__init中自己做\n return build(json, root, host);\n }\n // text的relation会由上层如Root设置\n else {\n return new Text(json);\n }\n}\n\nfunction initCp2(json, root, host, parent) {\n let vd = new json.klass(json.props);\n vd.__tagName = json.tagName || vd.__tagName;\n vd.__root = root;\n vd.__host = host;\n vd.__json = json;\n vd.__init();\n return relation(parent, vd);\n}\n\n/**\n * 将初始json文件生成virtualDom\n * @param json\n * @param root\n * @param host\n * @param hasP 出现过p标签\n * @returns vd\n */\nfunction build(json, root, host, hasP) {\n if(Array.isArray(json)) {\n return json.map(item => build(item, root, host, hasP));\n }\n let vd;\n if(util.isObject(json) && json.$$type) {\n let { tagName, props, children, klass, $$type, __inheritAnimate, __animateRecords } = json;\n // 更新过程中无变化的cp直接使用原来生成的\n if($$type === TYPE_CP && json.__placeholder) {\n return json.__placeholder;\n }\n if($$type === TYPE_VD) {\n if(tagName === 'img') {\n vd = new Img(tagName, props);\n if(Array.isArray(children) && children.length) {\n throw new Error('Img can not contain children');\n }\n }\n else {\n vd = new Dom(tagName, props);\n }\n // 检查p不能包含div\n if(tagName === 'p') {\n hasP = true;\n }\n else if(tagName === 'div' && hasP) {\n throw new Error('Markup p can not contain div');\n }\n if(Array.isArray(children)) {\n children = relation(vd, build(children, root, host, hasP));\n }\n else {\n children = [];\n }\n vd.__children = children;\n }\n else if($$type === TYPE_GM) {\n if(util.isString(tagName)) {\n let klass = Geom.getRegister(tagName);\n vd = new klass(tagName, props);\n }\n else if(tagName) {\n vd = new tagName('$', props);\n }\n }\n else if($$type === TYPE_CP) {\n vd = new klass(props);\n vd.__tagName = tagName || vd.__tagName;\n }\n else {\n return new Text(json);\n }\n // 根parse需要用到真正的vd引用,然后vd也要引用json,用以做domApi\n json.vd = vd;\n vd.__json = json;\n // 递归parse中的动画记录需特殊处理,将target改为真正的vd引用\n if(__animateRecords) {\n vd.__animateRecords = __animateRecords;\n __animateRecords.list.forEach(item => {\n item.target = item.target.vd;\n });\n delete json.__animateRecords;\n }\n // 更新过程中key相同或者普通相同的vd继承动画\n if(__inheritAnimate) {\n util.extendAnimate(__inheritAnimate, vd);\n delete json.__inheritAnimate;\n }\n vd.__root = root;\n vd.__host = host;\n if($$type === TYPE_CP) {\n vd.__init();\n }\n let ref = props.ref;\n if(util.isString(ref) && ref || util.isNumber(ref)) {\n host.ref[ref] = vd;\n }\n else if(util.isFunction(ref)) {\n ref(vd);\n }\n return vd;\n }\n return new Text(json);\n}\n\n/**\n * 设置关系,父子和兄弟\n * @param parent\n * @param children\n * @param options\n * @returns {Xom|Text|Component}\n */\nfunction relation(parent, children, options = {}) {\n if(Array.isArray(children)) {\n children.forEach(item => {\n relation(parent, item, options);\n });\n }\n else if(children instanceof Xom || children instanceof Component || children instanceof Text) {\n children.__parent = parent;\n children.__domParent = parent;\n // 极为恶心,为了v8的性能优化,text复用parent的__config部分,但domParent重设\n if(children instanceof Text) {\n [\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n ].forEach(k => {\n children.__config[k] = parent.__config[k];\n });\n }\n if(children.__config) {\n children.__config[NODE_DOM_PARENT] = parent;\n }\n if(options.prev) {\n options.prev.__next = children;\n children.__prev = options.prev;\n }\n options.prev = children;\n // 文字视作为父节点的直接文字子节点\n if(children instanceof Component) {\n let sr = children.shadowRoot;\n if(sr instanceof Text) {\n sr.__parent = parent;\n [\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n ].forEach(k => {\n children.__config[k] = parent.__config[k];\n });\n }\n sr.__domParent = parent;\n if(sr.__config) {\n sr.__config[NODE_DOM_PARENT] = parent;\n }\n }\n }\n return children;\n}\n\nexport default {\n ref(o) {\n Xom = o.Xom;\n Dom = o.Dom;\n Img = o.Img;\n Geom = o.Geom;\n Component = o.Component;\n },\n initRoot,\n initDom,\n initCp,\n initCp2,\n relation,\n};\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 builder from '../util/builder';\nimport Event from '../util/Event';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport flatten from '../util/flatten';\nimport css from '../style/css';\nimport change from '../refresh/change';\n\nconst { isNil, isFunction, clone, extend } = util;\n\nconst REGISTER = {};\n\n/**\n * 向上设置cp类型叶子节点,表明从root到本节点这条链路有更新,使得无链路更新的节约递归\n * 在check时树递归会用到,判断是否需要查找cp更新\n * @param cp\n */\nfunction setUpdateFlag(cp) {\n // 去重\n if(cp.__hasCpUpdate) {\n return;\n }\n cp.__hasCpUpdate = true;\n let host = cp.host;\n if(host) {\n setUpdateFlag(host);\n }\n}\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.state = {};\n this.__isMounted = false;\n this.__taskList = [];\n }\n\n setState(n, cb) {\n let self = this;\n if(isNil(n)) {\n n = {};\n }\n else if(isFunction(n)) {\n return;\n }\n else {\n if(Object.keys(n).length === 0) {\n if(isFunction(cb)) {\n cb.call(self);\n }\n return;\n }\n let state = clone(self.state);\n n = extend(state, n);\n }\n let root = self.root;\n if(root && self.__isMounted) {\n // 一帧之内多次调用,需合并\n if(self.__nextState) {\n Object.assign(self.__nextState, n);\n self.__taskList.push(cb);\n }\n else {\n self.__nextState = n;\n self.__taskList = [cb];\n // 回调更新列表,before执行时splice出来供after执行,防止中途产生的后续setState干扰\n let list = [];\n let t = self.__task = {\n __before: () => {\n list = self.__taskList.splice(0);\n // 标识更新\n setUpdateFlag(this);\n },\n __after: () => {\n // self.__nextState = null; 由updater.js每次refresh前同步执行清空,这里不能异步清除,否则frame动画会乱序\n list.forEach(cb => {\n if(isFunction(cb)) {\n cb.call(self);\n }\n });\n },\n };\n root.addRefreshCp(t);\n }\n }\n // 构造函数中调用还未render,\n else if(isFunction(cb)) {\n self.state = n;\n cb.call(self);\n }\n }\n\n /**\n * build中调用初始化,json有值时是update过程才有,且处理过flatten\n * @param json\n * @private\n */\n __init(json) {\n this.__ref = {};\n let root = this.root;\n let cd = json || flatten(this.render());\n let sr = builder.initCp(cd, root, this);\n this.__cd = cd;\n if(sr instanceof Text) {\n // 文字视作为父节点的直接文字子节点,在builder里做\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 else if(!(sr instanceof Component)) {\n // 本身build是递归的,子cp已经初始化了\n throw new Error('Component render() must return a dom/text: ' + this);\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 // shadow指向直接renderRoot,shadowRoot考虑到返回Component的递归即hoc高阶组件\n // host是直接所属,hostRoot同考虑到高阶组件\n this.__shadow = sr;\n sr.__host = this;\n // 递归下去,多层级时执行顺序由里到外,最终会被最上层执行替换\n while(sr instanceof Component) {\n sr.__hostRoot = this;\n sr.shadow.__host = sr;\n sr = sr.shadow;\n }\n this.__shadowRoot = sr;\n sr.__hostRoot = this;\n if(!this.__isMounted) {\n this.__isMounted = true;\n if(isFunction(this.componentDidMount)) {\n root.once(Event.REFRESH, () => {\n this.componentDidMount();\n });\n }\n }\n }\n\n render() {\n inject.warn('Component must 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 this.root.delRefreshTask(this.__task);\n if(this.shadowRoot) {\n this.shadowRoot.__destroy();\n }\n this.__parent = 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 'availableAnimating',\n 'effectiveAnimating',\n 'displayAnimating',\n 'visibilityAnimating',\n 'bbox',\n '__config',\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 '__layoutAbs',\n '__layoutNone',\n '__tryLayInline',\n '__offsetX',\n '__offsetY',\n '__calAutoBasis',\n '__computeReflow',\n '__renderAsMask',\n '__renderByMask',\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 [SCALE_X, [targetWidth / imgWidth, NUMBER]],\n [SCALE_Y, [targetHeight / imgHeight, 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 FONT_SIZE,\n },\n NODE_KEY: {\n NODE_DEFS_CACHE,\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.__config[NODE_DEFS_CACHE].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, __config, 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 __config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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 if(item[1]) {\n item[1](diff);\n }\n else {\n item.__after && item.__after(diff);\n }\n }\n }\n else {\n for(let i = 0; i < length; i++) {\n let item = list[i];\n if(item[0]) {\n item[0](diff);\n }\n else {\n item.__before && item.__before(diff);\n }\n }\n }\n}\n\nlet isPause;\n\nclass Frame {\n constructor() {\n this.__hookTask = []; // 动画刷新后,每个root注册的刷新回调执行\n this.__task = [];\n this.__taskCp = []; // 区别于task,component专用,和animate等其它不同流水线,在最后执行,防止混了 #122\n this.__now = null;\n }\n\n __init() {\n let self = this;\n let { task, taskCp } = 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 && !taskCp.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 cloneCp = taskCp.splice(0); // task要常驻,taskCp只1次直接splice清空\n let length = clone.length;\n let lengthCp = cloneCp.length;\n traversal(clone, length, diff, false);\n traversal(cloneCp, lengthCp, diff, false);\n // 执行动画造成的每个Root的刷新并清空\n let list = self.__hookTask.splice(0);\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n item && item();\n }\n // 普通的before/after\n traversal(clone, length, diff, true);\n traversal(cloneCp, lengthCp, diff, true);\n // 还有则继续,没有则停止节省性能\n if(task.length || taskCp.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 __nextFrameCp(handle) {\n let { task, taskCp } = this;\n if(!task.length && !taskCp.length) {\n this.__init();\n }\n taskCp.push(handle);\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 get taskCp() {\n return this.__taskCp;\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 },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_STYLE,\n UPDATE_KEYS,\n UPDATE_CONFIG,\n },\n KEY_FRAME_KEY: {\n FRAME_STYLE,\n FRAME_TIME,\n FRAME_EASING,\n FRAME_TRANSITION,\n },\n ANIMATE_KEY: {\n I_ASSIGNING,\n I_IN_FPS,\n I_IS_DELAY,\n I_BEGIN,\n I_END,\n I_FINISHED,\n I_NEXT_END,\n I_FIRST_PLAY,\n I_PLAY_CB,\n I_TARGET,\n I_ROOT,\n I_FRAMES,\n I_FRAMES_R,\n I_CURRENT_TIME,\n I_NEXT_TIME,\n I_STYLE,\n I_DURATION,\n I_ITERATIONS,\n I_FILL,\n I_PLAYBACK_RATE,\n I_PLAY_COUNT,\n I_PLAY_STATE,\n I_DESTROYED,\n I_START_TIME,\n I_FPS_TIME,\n I_EASING,\n I_ENTER_FRAME,\n I_DELAY,\n I_END_DELAY,\n I_KEYS,\n I_ORIGIN_STYLE,\n I_CURRENT_FRAMES,\n I_CURRENT_FRAME,\n I_SPF_LIMIT,\n I_FPS,\n I_DIRECTION,\n I_FIRST_ENTER,\n I_STAY_BEGIN,\n I_STAY_END,\n I_IS2,\n I_END_TIME,\n I_NODE_CONFIG,\n I_ROOT_CONFIG,\n I_OUT_BEGIN_DELAY,\n I_TIME_STAMP,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, INHERIT, RGBA, STRING, NUMBER, REM, VW, VH, VMAX, VMIN, GRADIENT, calUnit } = unit;\nconst { isNil, isFunction, isNumber, isObject, isString, clone, equalArr } = util;\nconst { linear } = easing;\nconst { cloneStyle } = css;\nconst { isGeom, GEOM } = change;\n\nconst {\n COLOR_HASH,\n LENGTH_HASH,\n RADIUS_HASH,\n GRADIENT_HASH,\n EXPAND_HASH,\n GRADIENT_TYPE,\n} = key;\n\nconst NUM_CAL_HASH = {\n};\nObject.assign(NUM_CAL_HASH, LENGTH_HASH);\nObject.assign(NUM_CAL_HASH, EXPAND_HASH);\n\nfunction unify(frames, target) {\n let hash = {};\n let keys = [];\n // 获取所有关键帧的属性\n frames.forEach(item => {\n let style = item[FRAME_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[FRAME_STYLE];\n keys.forEach(k => {\n if(!style.hasOwnProperty(k) || isNil(style[k])) {\n if(GEOM.hasOwnProperty(k)) {\n style[k] = target.getProps(k);\n }\n else {\n if(k === TRANSLATE_X && style.hasOwnProperty(TRANSLATE_PATH)) {\n style[k] = style[TRANSLATE_PATH][0];\n }\n else if(k === TRANSLATE_Y && style.hasOwnProperty(TRANSLATE_PATH)) {\n style[k] = style[TRANSLATE_PATH][1];\n }\n else {\n style[k] = target.currentStyle[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[FRAME_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] = [[MATRIX, m]];\n }\n else if(v[1] === INHERIT) {\n if(k === COLOR || k === TEXT_STROKE_COLOR) {\n style[k] = [util.rgba2int(computedStyle[k]), RGBA];\n }\n else if(LENGTH_HASH.hasOwnProperty(k)) {\n style[k] = [computedStyle[k], PX];\n }\n else if(k === FONT_WEIGHT) {\n style[k] = [computedStyle[k], NUMBER];\n }\n else if(k === FONT_STYLE || k === FONT_FAMILY || k === TEXT_ALIGN || k === TEXT_STROKE_OVER) {\n style[k] = [computedStyle[k], STRING];\n }\n }\n });\n });\n}\n\n/**\n * 通知root更新当前动画,需要根据frame的状态来决定是否是同步插入\n * 在异步时,因为动画本身是异步,需要addRefreshTask\n * 而如果此时frame在执行before过程中,说明帧动画本身是在before计算的,需要同步插入\n * @param style\n * @param keys 样式所有的key\n * @param __config\n * @param root\n * @param node\n */\nfunction genBeforeRefresh(style, keys, __config, root, node) {\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_STYLE] = style;\n res[UPDATE_KEYS] = keys;\n res[UPDATE_CONFIG] = __config[I_NODE_CONFIG];\n root.__addUpdate(node, __config[I_NODE_CONFIG], root, __config[I_ROOT_CONFIG], res);\n __config[I_STYLE] = style;\n __config[I_ASSIGNING] = true;\n // frame每帧回调时,下方先执行计算好变更的样式,这里特殊插入一个hook,让root增加一个刷新操作\n // 多个动画调用因为相同root也只会插入一个,这样在所有动画执行完毕后frame里检查同步进行刷新,解决单异步问题\n root.__frameHook();\n}\n\n/**\n * 将每帧的样式格式化,提取出offset属性并转化为时间,提取出缓动曲线easing\n * @param style 关键帧样式\n * @param duration 动画时间长度\n * @param es options的easing曲线控制,frame没有自定义则使用全局的\n * @returns {{style: *, time: number, easing: *, transition: []}}\n */\nfunction framing(style, duration, es) {\n let { offset, easing } = style;\n // 这两个特殊值提出来存储不干扰style\n delete style.offset;\n delete style.easing;\n // translatePath特殊对待,ae的曲线运动动画\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[1] === NUMBER) {\n v[1] = PX;\n }\n return v;\n });\n }\n let res = [];\n res[FRAME_STYLE] = style;\n res[FRAME_TIME] = offset * duration;\n res[FRAME_EASING] = easing || es;\n res[FRAME_TRANSITION] = [];\n return res;\n}\n\nfunction calByUnit(p, n, container, root) {\n if(p[1] === PX) {\n if(n[1] === PERCENT) {\n return n[0] * 0.01 * container - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width * 0.01 - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height * 0.01 - p[0];\n }\n else if(n[1] === VMAX) {\n return n[0] * Math.max(root.width, root.height) * 0.01 - p[0];\n }\n else if(n[1] === VMIN) {\n return n[0] * Math.min(root.width, root.height) * 0.01 - p[0];\n }\n }\n else if(p[1] === PERCENT) {\n if(n[1] === PX) {\n return n[0] * 100 / container - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * root.computedStyle[FONT_SIZE] * 100 / container - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width / container - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height / container - p[0];\n }\n else if(n[1] === VMAX) {\n return n[0] * Math.max(root.width, root.height) / container - p[0];\n }\n else if(n[1] === VMIN) {\n return n[0] * Math.min(root.width, root.height) / container - p[0];\n }\n }\n else if(p[1] === REM) {\n if(n[1] === PX) {\n return n[0] / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * 0.01 * container / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width * 0.01 / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height * 0.01 / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VMAX) {\n return n[0] * Math.max(root.width, root.height) * 0.01 / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VMIN) {\n return n[0] * Math.min(root.width, root.height) * 0.01 / root.computedStyle[FONT_SIZE] - p[0];\n }\n }\n else if(p[1] === VW) {\n if(n[1] === PX) {\n return n[0] * 100 / root.width - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * 100 * root.computedStyle[FONT_SIZE] / root.width - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * container / root.width - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height / root.width - p[0];\n }\n else if(n[1] === VMAX) {\n return n[0] * Math.max(root.width, root.height) / root.width - p[0];\n }\n else if(n[1] === VMIN) {\n return n[0] * Math.min(root.width, root.height) / root.width - p[0];\n }\n }\n else if(p[1] === VH) {\n if(n[1] === PX) {\n return n[0] * 100 / root.height - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * 100 * root.computedStyle[FONT_SIZE] / root.height - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width / root.height - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * container / root.height - p[0];\n }\n else if(n[1] === VMAX) {\n return n[0] * Math.max(root.width, root.height) / root.height - p[0];\n }\n else if(n[1] === VMIN) {\n return n[0] * Math.min(root.width, root.height) / root.height - p[0];\n }\n }\n else if(p[1] === VMAX) {\n if(n[1] === PX) {\n return n[0] * 100 / Math.max(root.width, root.height) - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * 100 * root.computedStyle[FONT_SIZE] / Math.max(root.width, root.height) - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * container / Math.max(root.width, root.height) - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width / Math.max(root.width, root.height) - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height / Math.max(root.width, root.height) - p[0];\n }\n else if(n[1] === VMIN) {\n return n[0] * Math.min(root.width, root.height) / Math.max(root.width, root.height) - p[0];\n }\n }\n else if(p[1] === VMIN) {\n if(n[1] === PX) {\n return n[0] * 100 / Math.min(root.width, root.height) - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * 100 * root.computedStyle[FONT_SIZE] / Math.min(root.width, root.height) - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * container / Math.min(root.width, root.height) - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width / Math.min(root.width, root.height) - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height / Math.min(root.width, root.height) - p[0];\n }\n else if(n[1] === VMAX) {\n return n[0] * Math.max(root.width, root.height) / Math.min(root.width, root.height) - p[0];\n }\n }\n}\n\n/**\n * 计算两帧之间的差,单位不同的以后面为准,返回的v表示差值\n * 没有变化返回空\n * auto等无法比较的不参与计算,不返回来标识无过度效果\n * @param prev 上一帧样式\n * @param next 下一帧样式\n * @param k 比较的样式名\n * @param target dom对象\n * @param tagName dom名\n * @returns {{k: *, v: *}}\n */\nfunction calDiff(prev, next, k, target, tagName) {\n let res = [k];\n let p = prev[k];\n let n = next[k];\n if(k === TRANSFORM) {\n // transform因默认值null很特殊,不存在时需给默认矩阵\n if(!p && !n) {\n return;\n }\n let pm, nm;\n if(p) {\n pm = p[0][1];\n }\n else {\n pm = mx.identity();\n }\n if(n) {\n nm = n[0][1];\n }\n else {\n nm = mx.identity();\n }\n // transform特殊被初始化转成matrix矩阵,直接计算差值\n if(equalArr(pm, nm)) {\n return;\n }\n res[1] = [\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 return res;\n }\n else if(k === ROTATE_3D) {\n if(equalArr(p, n)) {\n return;\n }\n res[1] = [n[0] - n[0], n[1] - p[1], n[2] - p[2], [n[3][0] - p[3][0], n[3][1]]];\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[0] !== nv[0]) {\n v.push(null);\n }\n else {\n let k = pv[0];\n if(k === 'blur') {\n if(pv[1][1] === nv[1][1]) {\n v.push(nv[1][0] - pv[1][0]);\n }\n else {\n let v2 = calByUnit(pv[1], nv[1], 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(nv[1][0] - pv[1][0]);\n }\n else if(k === 'dropShadow') {\n let v2 = [];\n for(let i = 0; i < 4; i++) {\n let a = pv[1][i], b = nv[1][i];\n if(a[1] === b[1]) {\n v2.push(b[0] - a[0]);\n }\n else {\n v2.push(calByUnit(a, b, i === 1 ? taraget.clientHeight: target.clientWidth, target.root));\n }\n }\n v2.push([\n nv[1][4][0] - pv[1][4][0],\n nv[1][4][1] - pv[1][4][1],\n nv[1][4][2] - pv[1][4][2],\n nv[1][4][3] - pv[1][4][3],\n ])\n v.push(v2);\n }\n }\n }\n res[1] = v;\n }\n else if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN) {\n res[1] = [];\n for(let i = 0; i < 2; i++) {\n let pi = p[i];\n let ni = n[i];\n if(pi[1] === ni[1]) {\n res[1].push(ni[0] - pi[0]);\n }\n else {\n let v = calByUnit(pi, ni, target[i ? 'outerHeight' : 'outerWidth'], target.root);\n res[1].push(v || 0);\n }\n }\n if(equalArr(res[1], [0, 0])) {\n return;\n }\n }\n else if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n res[1] = [];\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) {\n res[1].push(null);\n continue;\n }\n if(pi[1] === ni[1]) {\n let v = ni[0] - pi[0];\n if(!v) {\n res[1].push(null);\n return;\n }\n res[1].push(v);\n }\n else {\n let k2 = k === BACKGROUND_POSITION_X ? 'offsetWidth' : 'offsetHeight';\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 let v = calByUnit(pi, ni, target[k2], target.root);\n if(!v) {\n res[1].push(null);\n return;\n }\n res[1].push(v);\n }\n }\n }\n else if(k === BOX_SHADOW) {\n res[1] = [];\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 let v = [];\n // x/y/blur/spread\n for(let j = 0; j < 4; j++) {\n v.push(b[j] - a[j]);\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[1].push(v);\n }\n }\n else if(EXPAND_HASH.hasOwnProperty(k)) {\n if(p[1] === n[1]) {\n let v = n[0] - p[0];\n if(v === 0) {\n return;\n }\n res[1] = 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[1] = v;\n }\n }\n else if(k === BACKGROUND_SIZE) {\n res[1] = [];\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[1].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[1] === nn[1]) {\n temp.push(nn[0] - pp[0]);\n }\n else {\n let k2 = i ? 'offsetWidth' : 'offsetHeight';\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 let v = calByUnit(pp, nn, target[k2], target.root);\n temp.push(v || 0);\n }\n }\n if(equalArr(temp, [0, 0])) {\n res[1].push(null);\n }\n else {\n res[1].push(temp);\n has = true;\n }\n }\n if(!has) {\n return;\n }\n }\n else if(GRADIENT_HASH.hasOwnProperty(k)) {\n // backgroundImage发生了渐变色和图片的变化,fill发生渐变色和纯色的变化等\n res[1] = [];\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[1] !== ni[1]) {\n res[1].push(null);\n continue;\n }\n let isGradient = pi[1] === GRADIENT;\n pi = pi[0];\n ni = ni[0];\n let temp = [];\n // 渐变\n if(isGradient) {\n let r = calDiffGradient(pi, ni, target);\n if(!r) {\n res[1].push(null);\n continue;\n }\n temp = r;\n }\n // 纯色\n else {\n if(equalArr(ni, pi)) {\n res[1].push(null);\n }\n temp[0] = [\n ni[0] - pi[0],\n ni[1] - pi[1],\n ni[2] - pi[2],\n ni[3] - pi[3]\n ];\n }\n res[1].push(temp);\n }\n }\n else if(COLOR_HASH.hasOwnProperty(k)) {\n if(n[1] !== p[1]) {\n return;\n }\n // 特殊增加支持有gradient的先判断,仅color和textStrokeColor支持\n let isGradient = n[1] === GRADIENT;\n n = n[0];\n p = p[0];\n if(isGradient) {\n let r = calDiffGradient(p, n, target);\n if(!r) {\n return;\n }\n res[1] = r;\n }\n else {\n // 透明变化无视\n if(equalArr(n, p) || n[3] === 0 && p[3] === 0) {\n return;\n }\n res[1] = [\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(RADIUS_HASH.hasOwnProperty(k)) {\n // x/y都相等无需\n if(n[0][0] === p[0][0] && n[0][1] === p[0][1]\n && n[1][0] === p[1][0] && n[1][1] === p[1][1]) {\n return;\n }\n res[1] = [];\n for(let i = 0; i < 2; i++) {\n if(n[i][1] === p[i][1]) {\n res[1].push(n[i][0] - p[i][0]);\n }\n else {\n let v = calByUnit(p[i], n[i], target[i ? 'outerHeight' : 'outerWidth'], target.root);\n res[1].push(v || 0);\n }\n }\n }\n else if(LENGTH_HASH.hasOwnProperty(k)) {\n // auto不做动画\n if(p[1] === AUTO || n[1] === AUTO) {\n return;\n }\n let computedStyle = target.computedStyle;\n let parentComputedStyle = (target.domParent || target).computedStyle;\n let diff = 0;\n if(p[1] === n[1]) {\n diff = n[0] - p[0];\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[1] !== AUTO && n[1] !== AUTO) {\n diff = calByUnit(p, n, parentComputedStyle[HEIGHT], target.root);\n }\n }\n // 其余都是相对于父width的\n else {\n if(p[1] !== AUTO && n[1] !== 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[1] = diff;\n }\n else if(GEOM.hasOwnProperty(k)) {\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[1] = 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[1] = [];\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[1].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[1].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[1] = [];\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[1].push(null);\n }\n else {\n res[1].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[1] = 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[1] = [];\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[1].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[1].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[1] = [\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[1] = n - p;\n }\n }\n }\n else if(k === OPACITY || k === Z_INDEX) {\n if(n === p) {\n return;\n }\n res[1] = n - p;\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[1] = p.map((item, i) => {\n let [v, u] = item;\n if(u === PERCENT) {\n if(i % 2 === 0) {\n return [(parseFloat(v) || 0) * 0.01 * target[k1], PX];\n }\n else {\n return [(parseFloat(v) || 0) * 0.01 * target[k2], PX];\n }\n }\n else if(u === REM) {\n return [(parseFloat(v) || 0) * root.computedStyle[FONT_SIZE] * 100, PX];\n }\n else if(u === VW) {\n return [(parseFloat(v) || 0) * 0.01 * root.width, PX];\n }\n else if(u === VH) {\n return [(parseFloat(v) || 0) * 0.01 * root.height, PX];\n }\n else if(u === VMAX) {\n return [(parseFloat(v) || 0) * 0.01 * Math.max(root.width, root.height), PX];\n }\n else if(u === VMIN) {\n return [(parseFloat(v) || 0) * 0.01 * Math.min(root.width, root.height), PX];\n }\n else {\n return [parseFloat(v) || 0, PX];\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 || !GRADIENT_TYPE.hasOwnProperty(p.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][1] === b[1][1]) {\n t.push(b[1][0] - a[1][0]);\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[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 }\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// 计算两帧之间不相同的变化,存入transition,相同的忽略\nfunction calFrame(prev, next, keys, target, tagName) {\n keys.forEach(k => {\n let ts = calDiff(prev[FRAME_STYLE], next[FRAME_STYLE], k, target, tagName);\n // 可以形成过渡的才会产生结果返回\n if(ts) {\n prev[FRAME_TRANSITION].push(ts);\n }\n });\n return next;\n}\n\nfunction binarySearch(i, j, time, frames) {\n if(i === j) {\n let frame = frames[i];\n if(frame[FRAME_TIME] > time) {\n return i - 1;\n }\n return i;\n }\n else {\n let middle = i + ((j - i) >> 1);\n let frame = frames[middle];\n if(frame[FRAME_TIME] === time) {\n return middle;\n }\n else if(frame[FRAME_TIME] > time) {\n return binarySearch(i, Math.max(middle - 1, i), time, frames);\n }\n else {\n return binarySearch(Math.min(middle + 1, j), j, time, frames);\n }\n }\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 keys 所有样式key\n * @param percent 到下一帧时间的百分比\n * @param target vd\n * @returns {*}\n */\nfunction calIntermediateStyle(frame, keys, percent, target) {\n let style = cloneStyle(frame[FRAME_STYLE], keys);\n let timingFunction = getEasing(frame[FRAME_EASING]);\n if(timingFunction && timingFunction !== linear) {\n percent = timingFunction(percent);\n }\n let transition = frame[FRAME_TRANSITION];\n for(let i = 0, len = transition.length; i < len; i++) {\n let [k, v] = transition[i];\n let st = style[k];\n // transform特殊处理,只有1个matrix,有可能不存在,需给默认矩阵\n if(k === TRANSFORM) {\n if(!st) {\n st = style[k] = [[MATRIX, mx.identity()]];\n }\n for(let i = 0; i < 16; i++) {\n st[0][1][i] += v[i] * percent;\n }\n }\n // 特殊的曲线运动计算,转换为translateXY,出现在最后一定会覆盖原本的translate防重\n else if(k === TRANSLATE_PATH) {\n let t = 1 - percent;\n if(v.length === 8) {\n style[TRANSLATE_X] = [\n v[0][0] * t * t * t\n + 3 * v[2][0] * percent * t * t\n + 3 * v[4][0] * percent * percent * t\n + v[6][0] * percent * percent * percent,\n PX,\n ];\n style[TRANSLATE_Y] = [\n v[1][0] * t * t * t\n + 3 * v[3][0] * percent * t * t\n + 3 * v[5][0] * percent * percent * t\n + v[7][0] * percent * percent * percent,\n PX,\n ];\n }\n else if(v.length === 6) {\n style[TRANSLATE_X] = [\n v[0][0] * t * t\n + 2 * v[2][0] * percent * t\n + v[4][0] * percent * percent,\n PX,\n ];\n style[TRANSLATE_Y] = [\n v[1][0] * t * t\n + 3 * v[3][0] * percent * t\n + v[5][0] * percent * percent,\n PX,\n ];\n }\n }\n else if(k === ROTATE_3D) {\n st[0] += v[0] * percent;\n st[1] += v[1] * percent;\n st[2] += v[2] * percent;\n st[3][0] += v[3][0] * percent;\n }\n else if(NUM_CAL_HASH.hasOwnProperty(k)) {\n if(v) {\n st[0] += v * percent;\n }\n }\n else if(k === FILTER) {\n // 只有1个样式声明了filter另外一个为空,会造成无样式,需初始化数组并在下面计算出样式存入\n if(!st) {\n st = style[k] = [];\n }\n for(let i = 0, len = v.length; i < len; i++) {\n let item = v[i];\n if(item) {\n let k2 = st[i][0], v2 = st[i][1];\n // 只有dropShadow是多个数组,存放x/y/blur/spread/color\n if(k2 === 'dropShadow') {\n v2[0][0] += item[0] * percent;\n v2[1][0] += item[1] * percent;\n v2[2][0] += item[2] * percent;\n v2[3][0] += 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[0] += item * percent;\n }\n }\n }\n }\n else if(RADIUS_HASH.hasOwnProperty(k)) {\n for(let i = 0; i < 2; i++) {\n st[i][0] += v[i] * percent;\n }\n }\n else if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN) {\n if(v[0] !== 0) {\n st[0][0] += v[0] * percent;\n }\n if(v[1] !== 0) {\n st[1][0] += v[1] * percent;\n }\n }\n else if(k === BOX_SHADOW) {\n for(let i = 0, len = Math.min(st.length, v.length); i < len; i++) {\n // x/y/blur/spread\n for(let j = 0; j < 4; j++) {\n st[i][j] += v[i][j] * percent;\n }\n // rgba\n for(let j = 0; j < 4; j++) {\n st[i][4][j] += v[i][4][j] * percent;\n }\n }\n }\n else if(k === BACKGROUND_SIZE) {\n st.forEach((item, i) => {\n if(v[i]) {\n item[0][0] += v[i][0] * percent;\n item[1][0] += v[i][1] * percent;\n }\n });\n }\n else if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n st.forEach((item, i) => {\n if(v[i]) {\n item[0] += v[i] * percent;\n }\n });\n }\n else if(GRADIENT_HASH.hasOwnProperty(k)) {\n st.forEach((st2, i) => {\n let v2 = v[i];\n if(!v2) {\n return;\n }\n if(st2[1] === GRADIENT && GRADIENT_TYPE.hasOwnProperty(st2[0].k)) {\n st2 = st2[0];\n let [c, d, p, z] = v2;\n for(let i = 0, len = Math.min(st2.v.length, c.length); i < len; i++) {\n let a = st2.v[i];\n let b = c[i];\n a[0][0] += b[0][0] * percent;\n a[0][1] += b[0][1] * percent;\n a[0][2] += b[0][2] * percent;\n a[0][3] += b[0][3] * percent;\n if(a[1] && b[1]) {\n a[1][0] += b[1] * percent;\n }\n }\n if(st2.k === 'linear' && st2.d !== undefined && d !== undefined) {\n if(Array.isArray(d)) {\n st2.d[0] += d[0] * percent;\n st2.d[1] += d[1] * percent;\n st2.d[2] += d[2] * percent;\n st2.d[3] += d[3] * percent;\n }\n else {\n st2.d += d * percent;\n }\n }\n if(st2.k === 'radial') {\n if(st2.z !== undefined && z !== undefined) {\n st2.z[0] += z[0] * percent;\n st2.z[1] += z[1] * percent;\n st2.z[2] += z[2] * percent;\n st2.z[3] += z[3] * percent;\n st2.z[4] += z[4] * percent;\n }\n else if(st2.p !== undefined && p !== undefined) {\n st2.p[0][0] += p[0] * percent;\n st2.p[1][0] += p[1] * percent;\n }\n }\n else if(st2.k === 'conic' && st2.d !== undefined && d !== undefined) {\n st2.d += d * percent;\n st2.p[0][0] += p[0] * percent;\n st2.p[1][0] += p[1] * percent;\n }\n }\n // fill纯色\n else {\n st2 = st2[0];\n let c = v2[0];\n st2[0] += c[0] * percent;\n st2[1] += c[1] * percent;\n st2[2] += c[2] * percent;\n st2[3] += c[3] * percent;\n }\n });\n }\n // color可能超限[0,255],但浏览器已经做了限制,无需关心\n else if(COLOR_HASH.hasOwnProperty(k)) {\n st = st[0];\n st[0] += v[0] * percent;\n st[1] += v[1] * percent;\n st[2] += v[2] * percent;\n st[3] += v[3] * percent;\n }\n else if(GEOM.hasOwnProperty(k)) {\n let st = style[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 style[k] = st.map((item, i) => {\n return fn(item, v[i], percent);\n });\n }\n else {\n style[k] = 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 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] += 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) && !isNil(st2)) {\n for(let i = 0, len = Math.min(st2.length, item.length); i < len; i++) {\n let o = st2[i];\n let n = item[i];\n if(!isNil(o) && !isNil(n)) {\n st2[i] += n * percent;\n }\n }\n }\n });\n }\n else {\n v.forEach((item, i) => {\n if(!isNil(item) && !isNil(st[i])) {\n st[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] += 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] += v[0] * percent;\n }\n if(!isNil(st[1]) && !isNil(v[1])) {\n st[1] += v[1] * percent;\n }\n }\n else {\n if(!isNil(st) && !isNil(v)) {\n style[k] += v * percent;\n }\n }\n }\n }\n else if(k === OPACITY || k === Z_INDEX) {\n style[k] += v * percent;\n // 精度问题可能会超过[0,1]区间\n if(k === OPACITY) {\n if(style[k] < 0) {\n style[k] = 0;\n }\n else if(style[k] > 1) {\n style[k] = 1;\n }\n }\n }\n }\n return style;\n}\n\nfunction gotoOverload(options, cb) {\n if(isFunction(options)) {\n cb = options;\n options = {};\n }\n return [options || {}, cb];\n}\n\nfunction calDiffTime(__config, diff) {\n let playbackRate = __config[I_PLAYBACK_RATE];\n let spfLimit = __config[I_SPF_LIMIT];\n let fps = __config[I_FPS];\n let v = __config[I_CURRENT_TIME] = __config[I_NEXT_TIME];\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 __config[I_NEXT_TIME] += diff;\n return [v, diff];\n}\n\nfunction frameCb(self, __config, diff, isDelay) {\n self.emit(Event.FRAME, diff, isDelay);\n if(__config[I_FIRST_PLAY]) {\n __config[I_FIRST_PLAY] = false;\n self.emit(Event.PLAY);\n }\n let cb = __config[I_PLAY_CB];\n if(isFunction(cb)) {\n cb.call(self, diff, isDelay);\n // 清理要检查,gotoAndStop()这种cb回调中直接再次调用goto的话cb会不一致不能删除\n if(__config[I_PLAY_CB] === cb) {\n __config[I_PLAY_CB] = 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 let root = target.root;\n let config = this.__config = [\n false, // assigning\n false, // inFps\n false, // isDelay\n true, // begin\n false, // end\n false, // finished\n false, // nextBegin\n true, // firstPlay\n null, // playCb\n target,\n root,\n null, // frames\n null, // framesR\n 0, // currentTime\n 0, // nextTime\n {}, // style\n 0, // duration\n 1, // iterations\n 'none', // fill\n 1, // playbackRate\n 0, // playCount\n 'idle',\n false, // destroy\n 0, // startTime\n 0, // fpsTime\n op.easing,\n false, // enterFrame\n 0, // delay\n 0, // endDelay\n null, // keys,\n null, // originStyle,\n null, // currentFrames\n null, // currentFrame\n false, // spfLimit\n 60, // fps\n 'normal', // direction\n true, // firstEnter,\n false, // stayBegin\n false, // stayEnd\n false, // is2\n 0, // endTime\n target.__config, // nodeConfig\n root && root.__config, // rootConfig,destroy后root可能为空\n false, // outBeginDelay\n ];\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 config[I_FRAMES] = frames;\n config[I_FRAMES_R] = framesR;\n config[I_KEYS] = keys;\n config[I_ORIGIN_STYLE] = originStyle;\n if(frames.length === 2) {\n config[I_IS2] = true;\n config[I_END_TIME] = frames[1][FRAME_TIME];\n }\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 config[I_CURRENT_FRAMES] = {\n reverse: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(op.direction) ? framesR : frames;\n // 时间戳\n config[I_TIME_STAMP] = frame.__now;\n // 性能优化访问\n this[0] = this.__before;\n this[1] = this.__after;\n }\n\n __init(list, iterations, duration, easing, target) {\n if(list.length < 1) {\n return [[], [], [], {}];\n }\n // 过滤时间非法的,过滤后续offset<=前面的\n let offset = -1;\n let tagName = target.tagName;\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(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(tagName, k)) {\n originStyle[k] = props[k];\n }\n originStyle[k] = style[k];\n });\n // 再计算两帧之间的变化,存入transition属性\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, tagName);\n }\n // 反向存储帧的倒排结果\n framesR.forEach(item => {\n item[FRAME_TIME] = duration - item[FRAME_TIME];\n item[FRAME_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, tagName);\n }\n return [frames, framesR, keys, originStyle];\n }\n\n __clean(isFinish) {\n let __config = this.__config;\n this.__cancelTask();\n __config[I_NEXT_TIME] = 0;\n let restore;\n let style = __config[I_STYLE];\n let keys = __config[I_KEYS];\n let target = __config[I_TARGET];\n if(isFinish) {\n // gotoAndStop到一个很大的时间的话,也需要防止超过\n __config[I_CURRENT_TIME] = __config[I_DELAY] + __config[I_DURATION] * __config[I_ITERATIONS] + __config[I_END_DELAY];\n if(__config[I_PLAY_STATE] === 'finish') {\n return;\n }\n __config[I_PLAY_STATE] = 'finish';\n // cancel需要清除finish根据情况保留\n if(!__config[I_STAY_END]) {\n __config[I_STYLE] = {};\n restore = true;\n }\n }\n else {\n __config[I_PLAY_COUNT] = __config[I_CURRENT_TIME] = 0;\n if(__config[I_PLAY_STATE] === 'idle') {\n return;\n }\n __config[I_PLAY_STATE] = 'idle';\n __config[I_STYLE] = {};\n restore = true;\n }\n // 动画取消结束不停留在最后一帧需要还原target原本的样式,需要对比目前是否是由本动画赋值的\n if(restore) {\n keys.forEach(k => {\n if(GEOM.hasOwnProperty(k)) {\n if(target.__currentProps[k] === style[k]) {\n target.__currentProps[k] = target.props[k];\n }\n }\n else {\n if(target.__currentStyle[k] === style[k]) {\n target.__currentStyle[k] = target.style[k];\n }\n }\n });\n }\n }\n\n play(cb) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n let frames = __config[I_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 __config[I_PLAY_CB] = cb;\n __config[I_PLAY_STATE] = 'running';\n // 每次play调用标识第一次运行,需响应play事件和回调\n __config[I_FIRST_PLAY] = true;\n // 防止finish/cancel事件重复触发,每次播放重置\n this.__hasFin = false;\n this.__hasCancel = false;\n // 只有第一次调用会进初始化,另外finish/cancel视为销毁也会重新初始化\n if(!__config[I_ENTER_FRAME]) {\n __config[I_ENTER_FRAME] = true;\n let framesR = __config[I_FRAMES_R];\n let direction = __config[I_DIRECTION];\n // 初始化根据方向确定帧序列\n __config[I_CURRENT_FRAMES] = {\n reverse: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(direction) ? framesR : frames;\n __config[I_CURRENT_TIME] = __config[I_NEXT_TIME] = __config[I_FPS_TIME] = 0;\n }\n // 添加每帧回调且立刻执行,本次执行调用refreshTask也是下一帧再渲染,frame的每帧都是下一帧\n // frame.offFrame(this);\n frame.onFrame(this);\n __config[I_START_TIME] = frame.__now;\n __config[I_END] = false;\n return this;\n }\n\n __before(diff) {\n let __config = this.__config;\n __config[I_TIME_STAMP] = frame.__now;\n let target = __config[I_TARGET];\n let fps = __config[I_FPS];\n let playCount = 0;\n let currentFrames = __config[I_CURRENT_FRAMES];\n let iterations = __config[I_ITERATIONS];\n let stayBegin = __config[I_STAY_BEGIN];\n let stayEnd = __config[I_STAY_END];\n let delay = __config[I_DELAY];\n let root = __config[I_ROOT];\n let is2 = __config[I_IS2];\n let endTime = __config[I_END_TIME];\n let duration = __config[I_DURATION];\n let endDelay = __config[I_END_DELAY];\n let length = currentFrames.length;\n // 用本帧和上帧时间差,计算累加运行时间currentTime,以便定位当前应该处于哪个时刻\n let [currentTime, d] = calDiffTime(__config, diff);\n diff = d;\n // 增加的fps功能,当<60时计算跳帧,每帧运行依旧累加时间,达到fps时重置,第一帧强制不跳\n if(!__config[I_FIRST_ENTER] && fps < 60) {\n diff = __config[I_FPS_TIME] += diff;\n if(diff < 1000 / fps) {\n __config[I_IN_FPS] = true;\n return;\n }\n __config[I_FPS_TIME] = 0;\n }\n __config[I_FIRST_ENTER] = false;\n // delay仅第一次生效等待\n if(currentTime < delay) {\n if(stayBegin) {\n let currentFrame = __config[I_CURRENT_FRAME] = currentFrames[0];\n let current = currentFrame[FRAME_STYLE];\n genBeforeRefresh(current, __config[I_KEYS], __config, root, target);\n }\n __config[I_BEGIN] = false; // 默认是true,delay置false防触发\n // 即便不刷新,依旧执行帧回调,同时标明让后续第一帧响应begin\n __config[I_OUT_BEGIN_DELAY] = true;\n __config[I_IS_DELAY] = true;\n return;\n }\n // 减去delay,计算在哪一帧\n currentTime -= delay;\n if(__config[I_OUT_BEGIN_DELAY]) {\n __config[I_OUT_BEGIN_DELAY] = false;\n __config[I_BEGIN] = true;\n }\n // 超过duration非尾轮需处理回到开头,触发新一轮动画事件,这里可能时间间隔非常大直接跳过几轮\n let round;\n while(currentTime >= duration && playCount < iterations - 1) {\n currentTime -= duration;\n playCount++;\n }\n if(__config[I_PLAY_COUNT] < playCount) {\n __config[I_BEGIN] = true;\n round = true;\n }\n __config[I_PLAY_COUNT] = playCount;\n // 如果发生轮换,需重新确定正反向\n if(round) {\n let direction = __config[I_DIRECTION];\n let frames = __config[I_FRAMES];\n let framesR = __config[I_FRAMES_R];\n let isAlternate = {\n alternate: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(direction);\n // 有正反向播放需要重设帧序列\n if(isAlternate) {\n let isEven = playCount % 2 === 0;\n if(direction === 'alternate') {\n currentFrames = __config[I_CURRENT_FRAMES] = isEven ? frames : framesR;\n }\n else {\n currentFrames = __config[I_CURRENT_FRAMES] = isEven ? framesR : frames;\n }\n }\n }\n let isLastCount = playCount >= iterations - 1;\n // 只有2帧可优化,否则2分查找当前帧\n let i, frameTime;\n if(is2) {\n i = currentTime < endTime ? 0 : 1;\n frameTime = endTime;\n }\n else {\n i = binarySearch(0, length - 1, currentTime, currentFrames);\n frameTime = currentFrames[i][FRAME_TIME];\n }\n // 最后一帧结束动画,仅最后一轮才会进入,需处理endDelay\n let isLastFrame = isLastCount && i === length - 1;\n let percent = 0;\n if(isLastFrame) {\n // 无需任何处理\n }\n // 否则根据目前到下一帧的时间差,计算百分比,再反馈到变化数值上\n else if(is2) {\n percent = currentTime / duration;\n }\n else {\n let total = currentFrames[i + 1][FRAME_TIME] - frameTime;\n percent = (currentTime - frameTime) / total;\n }\n let inEndDelay, currentFrame = currentFrames[i], current;\n __config[I_CURRENT_FRAME] = currentFrame;\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 if(isLastFrame) {\n inEndDelay = currentTime < duration + endDelay;\n // 停留对比最后一帧,endDelay可能会多次进入这里,第二次进入样式相等不再重绘\n if(stayEnd) {\n current = cloneStyle(currentFrame[FRAME_STYLE], __config[I_KEYS]);\n }\n // 不停留或超过endDelay则计算还原,有endDelay且fill模式不停留会再次进入这里\n else {\n current = cloneStyle(__config[I_ORIGIN_STYLE], __config[I_KEYS]);\n }\n // 进入endDelay或结束阶段触发end事件,注意只触发一次,防重在触发的地方做\n __config[I_NEXT_END] = true;\n if(!inEndDelay) {\n __config[I_PLAY_COUNT]++;\n __config[I_FINISHED] = true;\n frame.offFrame(this);\n needClean = true;\n __config[I_NEXT_TIME] = 0;\n }\n }\n else {\n current = calIntermediateStyle(currentFrame, __config[I_KEYS], percent, target);\n }\n // 无论两帧之间是否有变化,都生成计算结果赋给style,去重在root做\n genBeforeRefresh(current, __config[I_KEYS], __config, root, target);\n if(needClean) {\n let playCb = __config[I_PLAY_CB];\n this.__clean(true);\n // 丑陋的做法,防止gotoAndStop()这样的cb被clean()掉\n if(playCb) {\n __config[I_PLAY_CB] = playCb;\n }\n }\n }\n\n __after(diff) {\n let __config = this.__config;\n __config[I_ASSIGNING] = false;\n if(__config[I_IN_FPS]) {\n __config[I_IN_FPS] = false;\n return;\n }\n frameCb(this, __config, diff, __config[I_IS_DELAY]);\n __config[I_IS_DELAY] = false;\n if(__config[I_BEGIN]) {\n __config[I_BEGIN] = false;\n this.emit(Event.BEGIN, __config[I_PLAY_COUNT]);\n }\n // end事件只触发一次,末轮进入endDelay或直接结束时\n if(__config[I_NEXT_END] && !__config[I_END]) {\n __config[I_END] = true;\n this.emit(Event.END, __config[I_PLAY_COUNT] - 1);\n }\n if(__config[I_FINISHED]) {\n __config[I_BEGIN] = __config[I_END] = __config[I_IS_DELAY] = __config[I_FINISHED]\n = __config[I_IN_FPS] = __config[I_ENTER_FRAME] = false;\n __config[I_PLAY_STATE] = 'finished';\n this.emit(Event.FINISH);\n }\n }\n\n pause(silence) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let { pending } = this;\n if(isDestroyed || duration <= 0 || pending) {\n return this;\n }\n __config[I_PLAY_STATE] = 'paused';\n this.__cancelTask();\n if(!silence) {\n this.emit(Event.PAUSE);\n }\n return this;\n }\n\n resume(cb) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n if(isDestroyed || duration <= 0 || playState !== 'paused') {\n return this;\n }\n return this.play(cb);\n }\n\n finish(cb) {\n let self = this;\n let __config = self.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n let frames = __config[I_FRAMES];\n if(isDestroyed || duration <= 0 || frames.length < 1 || playState === 'finished' || playState === 'idle') {\n return self;\n }\n // 先清除所有回调任务,多次调用finish也会清除只留最后一次\n self.__cancelTask();\n let root = __config[I_ROOT];\n let originStyle = __config[I_ORIGIN_STYLE];\n if(root) {\n let current;\n // 停留在最后一帧\n if(__config[I_STAY_END]) {\n __config[I_CURRENT_FRAME] = frames[frames.length - 1];\n current = frames[frames.length - 1][FRAME_STYLE];\n }\n else {\n current = originStyle;\n }\n root.addRefreshTask({\n __before() {\n __config[I_ASSIGNING] = true;\n genBeforeRefresh(current, __config[I_KEYS], __config, root, __config[I_TARGET]);\n self.__clean(true);\n },\n __after(diff) {\n if(!self.__hasFin) {\n self.__hasFin = true;\n __config[I_ASSIGNING] = false;\n frameCb(self, __config, diff);\n __config[I_BEGIN] = __config[I_END] = __config[I_IS_DELAY] = __config[I_FINISHED]\n = __config[I_IN_FPS] = __config[I_ENTER_FRAME] = false;\n self.emit(Event.FINISH);\n }\n if(isFunction(cb)) {\n cb.call(self, diff);\n }\n },\n });\n }\n return self;\n }\n\n cancel(cb) {\n let self = this;\n let __config = self.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n let frames = __config[I_FRAMES];\n if(isDestroyed || duration <= 0 || playState === 'idle' || frames.length < 1) {\n return self;\n }\n self.__cancelTask();\n let root = __config[I_ROOT];\n let originStyle = __config[I_ORIGIN_STYLE];\n if(root) {\n root.addRefreshTask({\n __before() {\n __config[I_ASSIGNING] = true;\n genBeforeRefresh(originStyle, __config[I_KEYS], __config, root, __config[I_TARGET]);\n self.__clean();\n },\n __after(diff) {\n if(!self.__hasCancel) {\n self.__hasCancel = true;\n __config[I_ASSIGNING] = false;\n frameCb(self, __config, diff);\n __config[I_BEGIN] = __config[I_END] = __config[I_IS_DELAY] = __config[I_FINISHED]\n = __config[I_IN_FPS] = __config[I_ENTER_FRAME] = false;\n self.emit(Event.CANCEL);\n }\n if(isFunction(cb)) {\n cb.call(self, diff);\n }\n },\n });\n }\n return self;\n }\n\n gotoAndPlay(v, options, cb) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let frames = __config[I_FRAMES];\n let delay = __config[I_DELAY];\n let endDelay = __config[I_END_DELAY];\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 __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let frames = __config[I_FRAMES];\n let delay = __config[I_DELAY];\n let endDelay = __config[I_END_DELAY];\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(diff => {\n __config[I_PLAY_STATE] = 'paused';\n this.__cancelTask();\n if(isFunction(cb)) {\n cb.call(this, diff);\n }\n });\n }\n\n // 同步赋予,用在extendAnimate\n assignCurrentStyle() {\n let __config = this.__config;\n let style = __config[I_STYLE];\n let target = __config[I_TARGET];\n let keys = __config[I_KEYS];\n keys.forEach(i => {\n if(style.hasOwnProperty(i)) {\n let v = style[i];\n // geom的属性变化\n if(GEOM.hasOwnProperty(i)) {\n target.currentProps[i] = v;\n }\n // 样式\n else {\n // 将动画样式直接赋给currentStyle\n target.currentStyle[i] = v;\n }\n }\n });\n }\n\n // 返回不包含delay且去除多轮的时间\n __goto(v, isFrame, excludeDelay) {\n let __config = this.__config;\n let iterations = __config[I_ITERATIONS];\n let duration = __config[I_DURATION];\n __config[I_PLAY_STATE] = '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 += __config[I_DELAY];\n }\n // 在时间范围内设置好时间,复用play直接跳到播放点\n __config[I_NEXT_TIME] = v;\n v -= __config[I_DELAY];\n // 超过时间长度需要累加次数,这里可以超过iterations,因为设定也许会非常大\n let playCount = 0;\n while(v >= duration && playCount < iterations - 1) {\n playCount++;\n v -= duration;\n }\n __config[I_PLAY_COUNT] = playCount;\n // 防止play()重置时间和当前帧组,提前计算好\n __config[I_ENTER_FRAME] = true;\n let frames = __config[I_FRAMES];\n let framesR = __config[I_FRAMES_R];\n let direction = __config[I_DIRECTION];\n if({\n alternate: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(direction)) {\n let isEven = playCount % 2 === 0;\n if(direction === 'alternate') {\n __config[I_CURRENT_FRAMES] = isEven ? frames : framesR;\n }\n else {\n __config[I_CURRENT_FRAMES] = 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 __stayBegin() {\n return {\n backwards: true,\n both: true,\n }.hasOwnProperty(this.fill);\n }\n\n __stayEnd() {\n return {\n forwards: true,\n both: true,\n }.hasOwnProperty(this.fill);\n }\n\n __setTarget(target) {\n this.__target = target;\n this.__config[I_TARGET] = target;\n this.__config[I_NODE_CONFIG] = target.__config;\n }\n\n __cancelTask() {\n frame.offFrame(this);\n this.__config[I_PLAY_CB] = null;\n }\n\n __destroy(sync) {\n let self = this;\n let __config = self.__config;\n if(__config[I_DESTROYED]) {\n return;\n }\n self.removeControl();\n // clean异步执行,因为里面的样式还原需要等到下一帧,否则同步执行清除后,紧接着的新同步动画获取不到currentStyle\n if(sync) {\n self.__clean();\n __config[I_TARGET] = null;\n }\n else {\n frame.nextFrame({\n __before() {\n self.__clean();\n __config[I_TARGET] = null;\n },\n });\n }\n __config[I_START_TIME] = 0;\n __config[I_DESTROYED] = true;\n }\n\n __checkModify() {\n let __config = this.__config;\n if(__config[I_PLAY_STATE] !== 'idle' && __config[I_PLAY_STATE] !== '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.__config[I_TARGET];\n }\n\n get root() {\n return this.__config[I_ROOT];\n }\n\n get keys() {\n return this.__config[I_KEYS];\n }\n\n get style() {\n return this.__config[I_STYLE];\n }\n\n get options() {\n return this.__options;\n }\n\n get duration() {\n return this.__config[I_DURATION];\n }\n\n set duration(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_DURATION] !== v) {\n __config[I_DURATION] = v;\n __config[I_END_TIME] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get delay() {\n return this.__config[I_DELAY];\n }\n\n set delay(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_DELAY] !== v) {\n __config[I_DELAY] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get endDelay() {\n return this.__config[I_END_DELAY];\n }\n\n set endDelay(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_END_DELAY] !== v) {\n __config[I_END_DELAY] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get fps() {\n return this.__config[I_FPS];\n }\n\n set fps(v) {\n v = parseInt(v) || 60;\n let __config = this.__config;\n if(__config[I_FPS] !== v) {\n if(v <= 0) {\n v = 60;\n }\n __config[I_FPS] = v;\n }\n return v;\n }\n\n get spf() {\n return 1 / this.fps;\n }\n\n get iterations() {\n return this.__config[I_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 let __config = this.__config;\n if(__config[I_ITERATIONS] !== v) {\n __config[I_ITERATIONS] = v;\n }\n return v;\n }\n\n get fill() {\n return this.__config[I_FILL];\n }\n\n set fill(v) {\n v = v || 'none';\n let __config = this.__config;\n if(__config[I_FILL] !== v) {\n __config[I_FILL] = v;\n this.__checkModify();\n }\n __config[I_STAY_BEGIN] = {\n backwards: true,\n both: true,\n }.hasOwnProperty(v);\n __config[I_STAY_END] = {\n forwards: true,\n both: true,\n }.hasOwnProperty(v);\n return v;\n }\n\n get direction() {\n return this.__config[I_DIRECTION];\n }\n\n set direction(v) {\n v = v || 'normal';\n let __config = this.__config;\n if(__config[I_DIRECTION] !== v) {\n __config[I_DIRECTION] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get frames() {\n return this.__config[I_FRAMES];\n }\n\n get framesR() {\n return this.__config[I_FRAMES_R];\n }\n\n get playbackRate() {\n return this.__config[I_PLAYBACK_RATE];\n }\n\n set playbackRate(v) {\n v = parseFloat(v) || 1;\n if(v <= 0) {\n v = 1;\n }\n let __config = this.__config;\n if(__config[I_PLAYBACK_RATE] !== v) {\n __config[I_PLAYBACK_RATE] = v;\n }\n return v;\n }\n\n get easing() {\n return this.__config[I_EASING];\n }\n\n get startTime() {\n return this.__config[I_START_TIME];\n }\n\n get currentTime() {\n return this.__config[I_CURRENT_TIME];\n }\n\n set currentTime(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_CURRENT_TIME] !== v) {\n __config[I_CURRENT_TIME] = v;\n __config[I_NEXT_TIME] = v;\n }\n return v;\n }\n\n get nextTime() {\n return this.__config[I_NEXT_TIME];\n }\n\n set nextTime(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_NEXT_TIME] !== v) {\n __config[I_NEXT_TIME] = v;\n }\n return v;\n }\n\n get timestamp() {\n return this.__config[I_TIME_STAMP];\n }\n\n get pending() {\n return this.__config[I_PLAY_STATE] !== 'running';\n }\n\n get finished() {\n return this.__config[I_PLAY_STATE] === 'finished';\n }\n\n get playState() {\n return this.__config[I_PLAY_STATE];\n }\n\n get playCount() {\n return this.__config[I_PLAY_COUNT];\n }\n\n set playCount(v) {\n v = Math.max(0, parseInt(v) || 0);\n let __config = this.__config;\n if(__config[I_PLAY_COUNT] !== v) {\n __config[I_PLAY_COUNT] = v;\n }\n return v;\n }\n\n get isDestroyed() {\n return this.__config[I_DESTROYED];\n }\n\n get animating() {\n let __config = this.__config;\n let playState = __config[I_PLAY_STATE];\n if(playState === 'idle') {\n return false;\n }\n return playState !== 'finished' || __config[I_STAY_END] || __config[I_STAY_BEGIN];\n }\n\n get spfLimit() {\n let __config = this.__config;\n return __config[I_SPF_LIMIT];\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 let __config = this.__config;\n if(__config[I_SPF_LIMIT] !== v) {\n __config[I_SPF_LIMIT] = v;\n }\n return v;\n }\n\n get assigning() {\n return this.__config[I_ASSIGNING];\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';\nimport enums from '../util/enums';\n\nconst {\n NODE_KEY: {\n NODE_DEFS_CACHE,\n }\n} = enums;\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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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 MBM_HASH = {\n multiply: true,\n screen: true,\n overlay: true,\n darken: true,\n lighten: true,\n colorDodge: true,\n colorBurn: true,\n hardLight: true,\n softLight: true,\n difference: true,\n exclusion: true,\n hue: true,\n saturation: true,\n color: true,\n luminosity: true,\n};\n\nfunction mbmName(v) {\n if(v) {\n return v.replace(/[A-Z]/, function($0) {\n return '-' + $0.toLowerCase();\n });\n }\n}\n\nfunction isValidMbm(v) {\n return MBM_HASH.hasOwnProperty(v);\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 Cache from '../refresh/Cache';\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 { LOCAL } = Cache;\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 UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_FOCUS,\n UPDATE_STYLE,\n UPDATE_OVERWRITE,\n UPDATE_KEYS,\n UPDATE_CONFIG,\n UPDATE_REMOVE_DOM,\n },\n STRUCT_KEY: {\n STRUCT_HAS_MASK,\n },\n NODE_KEY: {\n NODE_TAG_NAME,\n NODE_CACHE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_STYLE,\n NODE_STRUCT,\n NODE_OPACITY,\n NODE_MATRIX_EVENT,\n NODE_MATRIX,\n NODE_LIMIT_CACHE,\n NODE_HAS_CONTENT,\n NODE_REFRESH_LV,\n NODE_CACHE,\n NODE_CACHE_TOTAL,\n NODE_CACHE_FILTER,\n NODE_CACHE_MASK,\n NODE_CACHE_OVERFLOW,\n NODE_IS_DESTROYED,\n NODE_DEFS_CACHE,\n NODE_DOM_PARENT,\n NODE_IS_INLINE,\n NODE_PERSPECTIVE_MATRIX,\n NODE_IS_MASK,\n NODE_VIRTUAL_DOM,\n NODE_CACHE_AS_BITMAP,\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 NONE,\n TRANSFORM: TF,\n REFLOW,\n REPAINT,\n TRANSLATE_X: TX,\n TRANSLATE_Y: TY,\n TRANSLATE_Z: TZ,\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.__config[NODE_IS_INLINE]) {\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 let isMask = this.__isMask = isClip || !!this.props.mask;\n let config = this.__config;\n config[NODE_TAG_NAME] = tagName;\n config[NODE_CACHE_STYLE] = this.__cacheStyle;\n config[NODE_CURRENT_STYLE] = this.__currentStyle;\n config[NODE_COMPUTED_STYLE] = this.__computedStyle;\n config[NODE_REFRESH_LV] = REFLOW;\n config[NODE_STYLE] = this.__style;\n config[NODE_MATRIX] = [];\n config[NODE_MATRIX_EVENT] = [];\n config[NODE_DEFS_CACHE] = this.__cacheDefs;\n config[NODE_IS_MASK] = isMask;\n this.__frameAnimateList = [];\n this.__contentBoxList = []; // inline存储内容用\n // this.__json domApi需要获取生成时的json引用,builder过程添加,如appendChild时json也需要跟着变更\n config[NODE_CACHE_AS_BITMAP] = this.__cacheAsBitmap = !!this.props.cacheAsBitmap;\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(i, lv, j) {\n let res = super.__structure(i, lv, j);\n if(this.__hasMask) {\n res[STRUCT_HAS_MASK] = this.__hasMask;\n }\n this.__config[NODE_STRUCT] = res;\n return res;\n }\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[1] === PX) {\n return v[0];\n }\n else if(v[1] === PERCENT && includePercent) {\n return v[0] * w * 0.01;\n }\n else if(v[1] === REM) {\n return v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n return v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n return v[0] * this.root.height * 0.01;\n }\n else if(v[1] === VMAX) {\n return v[0] * Math.max(this.root.width, this.root.height) * 0.01;\n }\n else if(v[1] === VMIN) {\n return v[0] * 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, 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[1] === INHERIT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : parentComputedStyle[k];\n }\n else {\n computedStyle[k] = v[0];\n let ff = v[0].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[1] === INHERIT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : parentComputedStyle[k];\n }\n // 只有fontSize会有%\n else if(v[1] === PERCENT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (parentComputedStyle[k] * v[0] * 0.01);\n }\n else if(v[1] === REM) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (this.root.computedStyle[FONT_SIZE] * v[0]);\n }\n else if(v[1] === VW) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (this.root.width * 0.01 * v[0]);\n }\n else if(v[1] === VH) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (this.root.height * 0.01 * v[0]);\n }\n else if(v[1] === VMAX) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (Math.max(this.root.width, this.root.height) * 0.01 * v[0]);\n }\n else if(v[1] === VMIN) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (Math.min(this.root.width, this.root.height) * 0.01 * v[0]);\n }\n else {\n computedStyle[k] = v[0];\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[1] === INHERIT) {\n computedStyle[TEXT_ALIGN] = isRoot ? 'left' : parentComputedStyle[TEXT_ALIGN];\n }\n else {\n computedStyle[TEXT_ALIGN] = textAlign[0];\n }\n let fontSize = computedStyle[FONT_SIZE];\n let lineHeight = currentStyle[LINE_HEIGHT];\n // lineHeight继承很特殊,数字和normal不同于普通单位\n if(lineHeight[1] === 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[1] !== INHERIT) {\n break;\n }\n p = p.domParent;\n }\n // 到root还是inherit或normal,或者中途遇到了normal,使用normal\n if([AUTO, INHERIT].indexOf(ph[1]) > -1) {\n computedStyle[LINE_HEIGHT] = calNormalLineHeight(computedStyle);\n }\n // 数字继承\n else if(ph[1] === NUMBER) {\n computedStyle[LINE_HEIGHT] = Math.max(ph[0], 0) * fontSize;\n }\n // 单位继承\n else {\n computedStyle[LINE_HEIGHT] = parentComputedStyle[LINE_HEIGHT];\n }\n }\n }\n else if(lineHeight[1] === NUMBER) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight[0], 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[1] === 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[1] === INHERIT) {\n computedStyle[WHITE_SPACE] = isRoot ? 'normal' : parentComputedStyle[WHITE_SPACE];\n }\n else {\n computedStyle[WHITE_SPACE] = whiteSpace[0];\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, __config } = node;\n if(!root) {\n return;\n }\n let v = currentStyle[FONT_FAMILY];\n if(v[1] === INHERIT) {\n return;\n }\n let ff = v[0].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.addRefreshTask({\n __before() {\n if(__config[NODE_IS_DESTROYED]) {\n return;\n }\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_FOCUS] = level.REFLOW; // 强制执行\n res[UPDATE_CONFIG] = __config;\n root.__addUpdate(node, __config, root, root.__config, res);\n },\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 // absolute且无尺寸时,isAbs标明先假布局一次计算尺寸,还有flex列计算时isColumn假布局,flex横计算时writingMode垂直假布局\n __layout(data, isAbs, isColumn, isRow) {\n this.__computeReflow();\n let { w } = data;\n let { isDestroyed, currentStyle, computedStyle, __config, __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,\n h: data.h,\n lx: data.lx,\n ly: data.ly,\n isUpright: data.isUpright, // 从Root开始,父级的书写模式需每层传递\n };\n // 防止display:none不统计mask,isVirtual忽略,abs/flex布局后续会真正来走一遍\n if(!isAbs && !isColumn && !isRow) {\n this.clearCache();\n __config[NODE_REFRESH_LV] = REFLOW;\n __config[NODE_LIMIT_CACHE] = false;\n __config[NODE_IS_INLINE] = 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.__width = this.__height\n = this.__clientWidth = this.__clientHeight\n = this.__offsetWidth = this.__offsetHeight\n = this.__outerWidth = this.__outerHeight\n = computedStyle[WIDTH] = computedStyle[HEIGHT] = 0;\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, 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 // relative渲染时做偏移,百分比基于父元素,若父元素没有定高则为0\n if(!isAbs && !isColumn && !isRow) {\n if(position === 'relative') {\n let {[TOP]: top, [RIGHT]: right, [BOTTOM]: bottom, [LEFT]: left} = currentStyle;\n let {parent} = this;\n if(top[1] !== AUTO) {\n let n = calRelative(currentStyle, TOP, top, parent);\n this.__offsetY(n);\n computedStyle[TOP] = n;\n computedStyle[BOTTOM] = 'auto';\n }\n else if(bottom[1] !== AUTO) {\n let n = calRelative(currentStyle, BOTTOM, bottom, parent);\n this.__offsetY(-n);\n computedStyle[BOTTOM] = n;\n computedStyle[TOP] = 'auto';\n }\n else {\n computedStyle[TOP] = computedStyle[BOTTOM] = 'auto';\n }\n if(left[1] !== AUTO) {\n let n = calRelative(currentStyle, LEFT, left, parent, true);\n this.__offsetX(n);\n computedStyle[LEFT] = n;\n computedStyle[RIGHT] = 'auto';\n }\n else if (right[1] !== AUTO) {\n let n = calRelative(currentStyle, RIGHT, right, parent, true);\n this.__offsetX(-n);\n computedStyle[RIGHT] = n;\n computedStyle[LEFT] = 'auto';\n }\n else {\n computedStyle[LEFT] = computedStyle[RIGHT] = 'auto';\n }\n }\n else if (position !== 'absolute') {\n computedStyle[TOP] = computedStyle[BOTTOM] = computedStyle[LEFT] = computedStyle[RIGHT] = 'auto';\n }\n // 计算结果存入computedStyle和6个坐标,inline在其inlineSize特殊处理\n let x = this.__sx = this.x + this.ox;\n let y = this.__sy = this.y + this.oy;\n if(!__config[NODE_IS_INLINE]) {\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 __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 let { computedStyle } = this;\n computedStyle[DISPLAY] = 'none';\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 = 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 } = 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 {\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[1] !== AUTO && !isInline) {\n fixedWidth = true;\n w = this.__calSize(width, w, true);\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 else if(height[1] !== AUTO && !isInline) {\n fixedHeight = true;\n h = this.__calSize(height, h, true);\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[1] === AUTO || w3 !== undefined) {\n w -= borderLeftWidth + borderRightWidth + marginLeft + marginRight + paddingLeft + paddingRight;\n }\n if(height[1] === 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[1] !== AUTO || this.isReplaced) && marginTop[1] === AUTO && marginBottom[1] === AUTO) {\n let oh = this.outerHeight;\n if(oh < data.h) {\n this.__offsetY((data.h - oh) * 0.5, true);\n }\n }\n }\n else {\n if((width[1] !== AUTO || this.isReplaced) && marginLeft[1] === AUTO && marginRight[1] === AUTO) {\n let ow = this.outerWidth;\n if(ow < data.w) {\n this.__offsetX((data.w - ow) * 0.5, true);\n }\n }\n }\n }\n }\n\n __calMatrix(lv, __cacheStyle, currentStyle, computedStyle, __config, sx1, sy1, offsetWidth, offsetHeight) {\n if(__config[NODE_IS_INLINE]) {\n computedStyle[TRANSFORM_ORIGIN] = [sx1, sy1];\n return __cacheStyle[MATRIX] = mx.identity();\n }\n let matrixCache = __cacheStyle[MATRIX];\n // tx/ty变化特殊优化\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 // 不访问this.offsetWidth性能提升,暂时性\n else if(v[1] === PX) {\n v = v[0];\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[1] === PX) {\n v = v[0];\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(sx1 === undefined) {\n sx1 = this.__sx1;\n sy1 = this.__sy1;\n offsetWidth = this.offsetWidth;\n offsetHeight = this.offsetHeight;\n }\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]) {\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][0]];\n if(v[3][0] === 0) {\n return;\n }\n temp.push([k, v]);\n return;\n }\n computedStyle[k] = v[0];\n if(k === ROTATE_X || k === ROTATE_Y || k === ROTATE_Z) {\n temp.push([k, v]);\n return;\n }\n // scale为1和其它为0避免计算浪费\n let isScale = k === SCALE_X || k === SCALE_Y || k === SCALE_Z;\n if(v[0] === 1 && isScale || !isScale && v[0] === 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 matrixCache;\n }\n\n /**\n * 将currentStyle计算为computedStyle,同时存入cacheStyle可缓存的结果防止无变更重复计算\n * @param renderMode\n * @param ctx\n * @param parent\n * @param __cacheStyle\n * @param currentStyle\n * @param computedStyle\n * @param clientWidth\n * @param clientHeight\n * @param offsetWidth\n * @param offsetHeight\n * @param borderTopWidth\n * @param borderRightWidth\n * @param borderBottomWidth\n * @param borderLeftWidth\n * @param paddingTop\n * @param paddingRight\n * @param paddingBottom\n * @param paddingLeft\n * @param x1\n * @param x2\n * @param x3\n * @param x4\n * @param x5\n * @param x6\n * @param y1\n * @param y2\n * @param y3\n * @param y4\n * @param y5\n * @param y6\n * @returns {*[]}\n * @private\n */\n __calCache(renderMode, ctx, parent, __cacheStyle, currentStyle, computedStyle,\n clientWidth, clientHeight, offsetWidth, offsetHeight,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth,\n paddingTop, paddingRight, paddingBottom, paddingLeft,\n x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6) {\n let bx1 = x1, by1 = y1, bx2 = x6, by2 = y6;\n let backgroundClip = computedStyle[BACKGROUND_CLIP] = currentStyle[BACKGROUND_CLIP];\n // 默认border-box\n if(backgroundClip === 'paddingBox') {\n bx1 = x2;\n by1 = y2;\n bx2 = x5;\n by2 = y5;\n }\n else if(backgroundClip === 'contentBox') {\n bx1 = x3;\n by1 = y3;\n bx2 = x4;\n by2 = y4;\n }\n let isInline = this.__config[NODE_IS_INLINE];\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 __cacheStyle[FILTER] = true;\n this.__calFilter(currentStyle, computedStyle);\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[1] === PERCENT) {\n return item[0] + '%';\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[1] === PERCENT) {\n return item[0] + '%';\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[1] === AUTO) {\n return -1;\n }\n else if(item2[1] === STRING) {\n return item2[0] === '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[0];\n }\n return null;\n });\n __cacheStyle[BACKGROUND_IMAGE] = bgI.map((bgi, i) => {\n if(!bgi) {\n return null;\n }\n // 防止隐藏不加载背景图\n if(bgi[1] === STRING) {\n let loadBgi = this.__loadBgi[i] = this.__loadBgi[i] || {};\n let cache = inject.IMG[bgi[0]];\n if(cache && cache.state === inject.LOADED) {\n loadBgi.url = bgi[0];\n loadBgi.source = cache.source;\n loadBgi.width = cache.width;\n loadBgi.height = cache.height;\n }\n else if(loadBgi.url !== bgi[0]) {\n // 可能改变导致多次加载,每次清空,成功后还要比对url是否相同\n loadBgi.url = bgi[0];\n loadBgi.source = null;\n let node = this;\n let root = node.root;\n inject.measureImg(bgi[0], 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 root.delRefreshTask(loadBgi.cb);\n root.addRefreshTask(loadBgi.cb = {\n __before() {\n __cacheStyle[BACKGROUND_IMAGE] = undefined;\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_FOCUS] = REPAINT;\n res[UPDATE_CONFIG] = node.__config;\n root.__addUpdate(node, node.__config, root, root.__config, res);\n },\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[0] && bgi[1] === 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][0]);\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(offsetWidth, 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 ['Top', 'Right', 'Bottom', 'Left'].forEach(k => {\n k = 'border' + k;\n let k2 = STYLE_KEY[style2Upper(k)];\n let kw = STYLE_KEY[style2Upper(k + 'Width')];\n let ks = STYLE_KEY[style2Upper(k + 'Style')];\n // width/style变更影响border重新计算\n if(isNil(__cacheStyle[kw])) {\n __cacheStyle[kw] = true;\n __cacheStyle[k2] = undefined;\n }\n if(isNil(__cacheStyle[ks])) {\n __cacheStyle[ks] = true;\n __cacheStyle[k2] = undefined;\n }\n if(isNil(__cacheStyle[k2])) {\n if(k2 === BORDER_TOP) {\n if(borderTopWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderTopWidth / borderLeftWidth);\n let deg2 = Math.atan(borderTopWidth / borderRightWidth);\n __cacheStyle[k2] = border.calPoints(borderTopWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 0, btlr, btrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_RIGHT) {\n if(borderRightWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderRightWidth / borderTopWidth);\n let deg2 = Math.atan(borderRightWidth / borderBottomWidth);\n __cacheStyle[k2] = border.calPoints(borderRightWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 1, btrr, bbrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_BOTTOM) {\n if(borderBottomWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderBottomWidth / borderLeftWidth);\n let deg2 = Math.atan(borderBottomWidth / borderRightWidth);\n __cacheStyle[k2] = border.calPoints(borderBottomWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 2, bblr, bbrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_LEFT) {\n if(borderLeftWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderLeftWidth / borderTopWidth);\n let deg2 = Math.atan(borderLeftWidth / borderBottomWidth);\n __cacheStyle[k2] = border.calPoints(borderLeftWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 3, btlr, bblr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n }\n });\n // 强制计算继承性的\n let parentComputedStyle = parent && parent.computedStyle;\n if(currentStyle[FONT_STYLE][1] === 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][0];\n }\n __cacheStyle[FONT_STYLE] = computedStyle[FONT_STYLE];\n let color = currentStyle[COLOR];\n if(color[1] === 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[1] === GRADIENT) {\n __cacheStyle[COLOR] = computedStyle[COLOR] = color[0];\n }\n else if(color[1] === RGBA) {\n __cacheStyle[COLOR] = int2rgba(computedStyle[COLOR] = rgba2int(color[0]));\n }\n }\n let textStrokeColor = currentStyle[TEXT_STROKE_COLOR];\n if(textStrokeColor[1] === 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[1] === GRADIENT) {\n __cacheStyle[TEXT_STROKE_COLOR] = computedStyle[TEXT_STROKE_COLOR] = textStrokeColor[0];\n }\n else if(textStrokeColor[1] === RGBA) {\n __cacheStyle[TEXT_STROKE_COLOR] = int2rgba(computedStyle[TEXT_STROKE_COLOR] = rgba2int(textStrokeColor[0]));\n }\n }\n if(currentStyle[TEXT_STROKE_WIDTH][1] === 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[1] === REM) {\n v = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * this.root.height * 0.01;\n }\n else if(v[1] === VMAX) {\n v = v[0] * Math.max(this.root.width, this.root.height) * 0.01;\n }\n else if(v[1] === VMIN) {\n v = v[0] * Math.min(this.root.width, this.root.height) * 0.01;\n }\n else {\n v = v[0];\n }\n computedStyle[TEXT_STROKE_WIDTH] = v;\n __cacheStyle[TEXT_STROKE_WIDTH] = true;\n }\n if(currentStyle[TEXT_STROKE_OVER][1] === 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][0];\n }\n if(currentStyle[VISIBILITY][1] === INHERIT) {\n computedStyle[VISIBILITY] = parent ? parentComputedStyle[VISIBILITY] : 'visible';\n }\n else if(isNil(__cacheStyle[VISIBILITY])) {\n computedStyle[VISIBILITY] = currentStyle[VISIBILITY][0];\n }\n __cacheStyle[VISIBILITY] = computedStyle[VISIBILITY];\n if(currentStyle[POINTER_EVENTS][1] === 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][0];\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(__cacheStyle, currentStyle, computedStyle, __config, sx1, sy1) {\n let rebuild;\n if(isNil(__cacheStyle[PERSPECTIVE])) {\n __cacheStyle[PERSPECTIVE] = true;\n rebuild = true;\n let v = currentStyle[PERSPECTIVE];\n let ppt = this.__calSize(v, this.clientWidth, true);\n computedStyle[PERSPECTIVE] = ppt;\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 if(rebuild) {\n if(sx1 === undefined) {\n sx1 = this.__sx1;\n sy1 = this.__sy1;\n }\n let po = computedStyle[PERSPECTIVE_ORIGIN].slice(0);\n po[0] += sx1 || 0;\n po[1] += sy1 || 0;\n __config[NODE_PERSPECTIVE_MATRIX] = tf.calPerspectiveMatrix(computedStyle[PERSPECTIVE], po);\n }\n }\n\n __calFilter(currentStyle, computedStyle) {\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, v2];\n }\n else {\n // 部分%单位的滤镜强制使用数字\n if(v[1] === DEG || v[1] === PERCENT || v[1] === NUMBER) {\n v = v[0];\n }\n else {\n v = this.__calSize(v, this.root.width, false);\n }\n return [k, v];\n }\n });\n }\n\n __calContent(renderMode, lv, currentStyle, computedStyle) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n if(lv < REPAINT) {\n return this.__hasContent;\n }\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 true;\n }\n }\n }\n if(currentStyle[BACKGROUND_COLOR][0][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 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')]][0][3] > 0) {\n return 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 true;\n }\n }\n }\n }\n }\n return false;\n }\n\n /**\n * 渲染基础方法,Dom/Geom公用\n * @param renderMode\n * @see node/mode\n * @param lv\n * @see refresh/level\n * @param ctx canvas/svg/webgl共用\n * @param cache 是否是局部根节点缓存模式下的绘制\n * @see refresh/Cache.NA\n * @param dx cache时偏移x\n * @param dy cache时偏移y\n * @return Object\n * x1/x2/x3/x4/y1/y2/y3/y4 坐标\n * break svg判断无变化提前跳出\n * cacheError 离屏申请失败,仅canvas\n * offscreenBlend 无cache时的离屏canvas,仅canvas\n * offscreenFilter 无cache时的离屏canvas,仅canvas\n * offscreenOverflow 无cache时的离屏canvas,仅canvas\n * offscreenMask 无cache时的离屏canvas,仅canvas\n */\n render(renderMode, lv, ctx, cache, dx = 0, dy = 0) {\n let {\n isDestroyed,\n root,\n __config,\n } = this;\n let __cache = __config[NODE_CACHE];\n let __cacheStyle = __config[NODE_CACHE_STYLE];\n let currentStyle = __config[NODE_CURRENT_STYLE];\n let computedStyle = __config[NODE_COMPUTED_STYLE];\n // 渲染完认为完全无变更,等布局/动画/更新重置\n __config[NODE_REFRESH_LV] = NONE;\n // >=REPAINT清空bbox\n if(lv >= REPAINT) {\n this.__bbox = null;\n this.__filterBbox = null;\n }\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, __config, 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 __config[NODE_DEFS_CACHE].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 __config[NODE_DEFS_CACHE].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, __config, false, dx, dy);\n }\n }\n else if(bgi.k) {\n let gd = this.__gradient(renderMode, ctx, bx1, by1, bx2, by2, bgi, dx, dy);\n if(gd) {\n if(gd.k === 'conic') {\n gradient.renderConic(this, renderMode, ctx, gd.v, bx1, by1, bx2 - bx1, by2 - by1,\n btlr, btrr, bbrr, bblr);\n }\n else {\n bg.renderBgc(this, renderMode, ctx, gd.v, borderList,\n bx1, by1, bx2 - bx1, by2 - by1, btlr, btrr, bbrr, bblr, 'fill', false, dx, dy);\n }\n }\n }\n });\n }\n // boxShadow可能会有多个\n if(boxShadow) {\n boxShadow.forEach(item => {\n bs.renderBoxShadow(this, renderMode, ctx, item, x1, y1, x6, y6, x6 - x1, y6 - y1, dx, dy);\n });\n }\n // 边框需考虑尖角,两条相交边平分45°夹角\n if(borderTopWidth > 0 && borderTopColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_TOP], __cacheStyle[BORDER_TOP_COLOR], dx, dy);\n }\n if(borderRightWidth > 0 && borderRightColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_RIGHT], __cacheStyle[BORDER_RIGHT_COLOR], dx, dy);\n }\n if(borderBottomWidth > 0 && borderBottomColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_BOTTOM], __cacheStyle[BORDER_BOTTOM_COLOR], dx, dy);\n }\n if(borderLeftWidth > 0 && borderLeftColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_LEFT], __cacheStyle[BORDER_LEFT_COLOR], dx, dy);\n }\n return res;\n }\n\n __destroy() {\n if(this.isDestroyed) {\n return;\n }\n super.__destroy();\n let { root } = this;\n this.clearAnimate();\n this.clearFrameAnimate();\n // root在没有初始化到真实dom渲染的情况下没有\n root && root.delRefreshTask(this.__loadBgi.cb);\n root && root.delRefreshTask(this.__task);\n this.__task = null;\n this.__root = null;\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 }\n\n // 先查找到注册了事件的节点,再捕获冒泡判断增加性能\n __emitEvent(e, force) {\n let { isDestroyed, 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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].push(v);\n return 'url(#' + uuid + ')';\n }\n }\n\n __getCg(renderMode, ctx, gd) {\n let { stop } = gd;\n let len = stop.length - 1;\n if(stop[len][1] < 1) {\n stop.push([stop[len][0].slice(0), 1]);\n }\n if(stop[0][1] > 0) {\n stop.unshift([stop[0][0].slice(0), 0]);\n }\n // canvas采用点色值计算法,svg则分360度画块\n let res = [];\n if(renderMode === CANVAS || renderMode === WEBGL) {\n return gd;\n }\n return res;\n }\n\n // canvas清空自身cache,cacheTotal在Root的自底向上逻辑做,svg仅有cacheTotal\n clearCache(onlyTotal) {\n let __config = this.__config;\n let __cacheTotal = __config[NODE_CACHE_TOTAL];\n let __cacheFilter = __config[NODE_CACHE_FILTER];\n let __cacheMask = __config[NODE_CACHE_MASK];\n let __cacheOverflow = __config[NODE_CACHE_OVERFLOW];\n if(!onlyTotal) {\n __config[NODE_CACHE_STYLE] = this.__cacheStyle = {};\n let __cache = __config[NODE_CACHE];\n if(__cache) {\n __cache.release();\n }\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 }\n\n updateStyle(style, cb) {\n let node = this;\n let { root, __config } = node;\n let formatStyle = css.normalize(style);\n // 有root说明被添加渲染过了\n if(root) {\n root.addRefreshTask(node.__task = {\n __before() {\n node.__task = null;\n if(__config[NODE_IS_DESTROYED]) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_STYLE] = formatStyle;\n res[UPDATE_OVERWRITE] = style; // 标识盖原有style样式不仅仅是修改currentStyle,不同于animate\n res[UPDATE_KEYS] = Object.keys(formatStyle).map(i => {\n if(!GEOM.hasOwnProperty(i)) {\n i = parseInt(i);\n }\n return i;\n });\n res[UPDATE_CONFIG] = __config;\n root.__addUpdate(node, __config, root, root.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb.call(node, diff);\n }\n },\n });\n }\n // 没有是在如parse()还未添加的时候,可以直接同步覆盖\n else {\n Object.assign(this.currentStyle, formatStyle);\n if(isFunction(cb)) {\n cb.call(node, -1);\n }\n }\n }\n\n // 传入格式化好key/value的样式\n updateFormatStyle(style, cb) {\n let node = this;\n let { root, __config } = node;\n if(root) {\n root.addRefreshTask(node.__task = {\n __before() {\n node.__task = null; // 清除在before,防止after的回调增加新的task误删\n if(__config[NODE_IS_DESTROYED]) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_STYLE] = style;\n res[UPDATE_KEYS] = Object.keys(style).map(i => {\n if(!GEOM.hasOwnProperty(i)) {\n i = parseInt(i);\n }\n return i;\n });\n res[UPDATE_CONFIG] = __config;\n root.__addUpdate(node, __config, root, root.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb.call(node, diff);\n }\n },\n });\n }\n // 没有是在如parse()还未添加的时候,可以直接同步覆盖\n else {\n Object.assign(this.currentStyle, style);\n if(isFunction(cb)) {\n cb.call(node, -1);\n }\n }\n }\n\n animate(list, options = {}) {\n let animation = new Animation(this, list, options);\n if(this.isDestroyed) {\n animation.__destroy(true);\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/margin/flex/vertical等\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 if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\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 }\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 if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\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 }\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.__config[NODE_LIMIT_CACHE] = false;\n }\n if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\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.__config[NODE_LIMIT_CACHE] = false;\n }\n if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\n }\n this.clearCache();\n }\n\n __releaseWhenEmpty(__cache) {\n if(__cache && __cache.available) {\n __cache.release();\n }\n return true;\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 self = this;\n if(self.isDestroyed) {\n inject.warn('Remove target is destroyed.');\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n let { root, domParent } = self;\n let target = self.isShadowRoot ? self.hostRoot : self;\n // 特殊情况连续append/remove时候,还未被添加进来找不到所以无需删除\n if(domParent.children.indexOf(target) === -1) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null; // 清除在before,防止after的回调增加新的task误删\n let pJson = domParent.__json;\n let i = pJson.children.indexOf(self.isShadowRoot ? self.hostRoot.__json : self.__json);\n if(i === -1) {\n throw new Error('Remove index Exception.')\n }\n pJson.children.splice(i, 1);\n domParent.children.splice(i, 1);\n let zChildren = domParent.zIndexChildren;\n // 可能appendChild会清空没有\n if(zChildren) {\n let j = zChildren.indexOf(self.isShadowRoot ? self.hostRoot : self);\n if(j > -1) {\n zChildren.splice(j, 1);\n }\n }\n if(self.__prev) {\n self.__prev.__next = self.__next;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = REFLOW;\n res[UPDATE_REMOVE_DOM] = true;\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n __after(diff) {\n self.isShadowRoot ? self.hostRoot.__destroy() : self.__destroy();\n if(isFunction(cb)) {\n cb.call(self, diff);\n }\n },\n });\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;\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 matrix() {\n return this.__config[NODE_MATRIX];\n }\n\n get matrixEvent() {\n return this.__config[NODE_MATRIX_EVENT];\n }\n\n get perspectiveMatrix() {\n return this.__config[NODE_PERSPECTIVE_MATRIX];\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.__config[NODE_CACHE_AS_BITMAP] = 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 enums from '../util/enums';\nimport unit from '../style/unit';\nimport level from './level';\n\nconst {\n STYLE_KEY: {\n DISPLAY,\n TOP,\n BOTTOM,\n POSITION,\n HEIGHT,\n },\n} = enums;\nconst { AUTO, PX, PERCENT } = unit;\nconst { REFLOW } = level;\n\nfunction offsetAndResizeByNodeOnY(node, root, reflowHash, dy, inDirectAbsList) {\n if(dy) {\n let last;\n do {\n // component的sr没有next兄弟,视为component的next\n while(node.isShadowRoot) {\n node = node.host;\n }\n last = node;\n let isContainer, parent = node.domParent;\n if(parent) {\n let cs = parent.computedStyle;\n let ps = cs[POSITION];\n isContainer = parent === root || parent.isShadowRoot || ps === 'relative' || ps === 'absolute';\n }\n // 先偏移next,忽略有定位的absolute,本身非container也忽略\n let next = node.next;\n let container;\n while(next) {\n if(next.computedStyle[DISPLAY] !== 'none') {\n if(next.currentStyle[POSITION] === 'absolute') {\n let { [TOP]: top, [BOTTOM]: bottom, [HEIGHT]: height } = next.currentStyle;\n if(top[1] === AUTO) {\n if(bottom[1] === AUTO || bottom[1] === PX) {\n next.__offsetY(dy, true, REFLOW);\n next.clearCache();\n }\n else if(bottom[1] === PERCENT) {\n let v = (1 - bottom[0] * 0.01) * dy;\n next.__offsetY(v, true, REFLOW);\n next.clearCache();\n }\n }\n else if(top[1] === PERCENT) {\n let v = top[0] * 0.01 * dy;\n next.__offsetY(v, true, REFLOW);\n next.clearCache();\n }\n // 高度百分比需发生变化的重新布局,需要在容器内\n if(height[1] === PERCENT) {\n if(isContainer) {\n parent.__layoutAbs(parent, parent.__layoutData, next);\n }\n else {\n if(!container) {\n container = parent;\n while(container) {\n if(container === root || container.isShadowRoot) {\n break;\n }\n let cs = container.currentStyle;\n if(cs[POSITION] === 'absolute' || cs[POSITION] === 'relative') {\n break;\n }\n container = container.domParent;\n }\n }\n inDirectAbsList.push([parent, container, next]);\n }\n }\n }\n else {\n next.__offsetY(dy, true, REFLOW);\n next.clearCache();\n }\n }\n next = next.next;\n }\n // root本身没domParent\n if(!parent) {\n break;\n }\n node = parent;\n // parent判断是否要resize\n let { currentStyle } = node;\n let isAbs = currentStyle[POSITION] === 'absolute';\n let need;\n if(isAbs) {\n if(currentStyle[HEIGHT][1] === AUTO\n && (currentStyle[TOP][1] === AUTO || currentStyle[BOTTOM][1] === AUTO)) {\n need = true;\n }\n }\n // height不定则需要\n else if(currentStyle[HEIGHT][1] === AUTO) {\n need = true;\n }\n if(need) {\n node.__resizeY(dy, REFLOW);\n node.clearCache();\n }\n // abs或者高度不需要继续向上调整提前跳出\n else {\n break;\n }\n if(node === root) {\n break;\n }\n }\n while(true);\n // 最后一个递归向上取消总缓存,防止过程中重复next多次无用递归\n while(last) {\n last.clearCache(true);\n last = last.domParent;\n }\n }\n}\n\nfunction clearUniqueReflowId(hash) {\n for(let i in hash) {\n if(hash.hasOwnProperty(i)) {\n let { node } = hash[i];\n delete node.__uniqueReflowId;\n }\n }\n}\n\nfunction getMergeMargin(topList, bottomList) {\n let total = 0;\n let max = topList[0];\n let min = topList[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 diff = 0;\n if(max > 0 && min > 0) {\n diff = Math.max(max, min) - total;\n }\n else if(max < 0 && min < 0) {\n diff = Math.min(max, min) - total;\n }\n else if(max !== 0 || min !== 0) {\n diff = max + min - total;\n }\n return diff;\n}\n\nexport default {\n offsetAndResizeByNodeOnY,\n clearUniqueReflowId,\n getMergeMargin,\n};\n","import Xom from './Xom';\nimport Text from './Text';\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 $$type from '../util/$$type';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport reflow from '../refresh/reflow';\nimport builder from '../util/builder';\nimport mode from '../refresh/mode';\nimport level from '../refresh/level';\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 NODE_KEY: {\n NODE_CURRENT_STYLE,\n NODE_STYLE,\n NODE_STRUCT,\n NODE_DOM_PARENT,\n NODE_IS_INLINE,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_FOCUS,\n UPDATE_ADD_DOM,\n UPDATE_CONFIG,\n },\n STRUCT_KEY: {\n STRUCT_NUM,\n STRUCT_LV,\n STRUCT_TOTAL,\n STRUCT_CHILD_INDEX,\n STRUCT_INDEX,\n },\n ELLIPSIS,\n} = enums;\nconst { AUTO, PX, PERCENT, REM, VW, VH, VMAX, VMIN } = unit;\nconst { isRelativeOrAbsolute, getBaseline, getVerticalBaseline } = css;\nconst { extend, isNil, isFunction } = util;\nconst { CANVAS, SVG, WEBGL } = mode;\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 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 = children || [];\n this.__flexLine = []; // flex布局多行模式时存储行\n this.__ellipsis = null; // 虚拟节点,有的话渲染\n let config = this.__config;\n config[NODE_CURRENT_STYLE] = this.__currentStyle;\n config[NODE_STYLE] = this.__style;\n }\n\n __structure(i, lv, j) {\n let res = super.__structure(i++, lv, j);\n let arr = [res];\n let zIndexChildren = this.__zIndexChildren = this.__zIndexChildren || genZIndexChildren(this);\n zIndexChildren.forEach((child, j) => {\n let temp = child.__structure(i, lv + 1, j);\n if(Array.isArray(temp)) {\n i += temp.length;\n arr = arr.concat(temp);\n }\n else {\n i++;\n arr.push(temp);\n }\n });\n let total = arr.length - 1;\n res[STRUCT_NUM] = zIndexChildren.length;\n res[STRUCT_TOTAL] = total;\n return arr;\n }\n\n __modifyStruct(root, offset = 0) {\n let __config = this.__config;\n let struct = __config[NODE_STRUCT];\n let total = struct[STRUCT_TOTAL] || 0;\n // 新生成了struct,引用也变了\n let nss = this.__structure(struct[STRUCT_INDEX], struct[STRUCT_LV], struct[STRUCT_CHILD_INDEX]);\n root.__structs.splice(struct[STRUCT_INDEX] + offset, total + 1, ...nss);\n let d = 0;\n if(this !== root) {\n struct = __config[NODE_STRUCT];\n d = (struct[STRUCT_TOTAL] || 0) - total;\n let ps = __config[NODE_DOM_PARENT].__config[NODE_STRUCT];\n ps[STRUCT_TOTAL] = ps[STRUCT_TOTAL] || 0;\n ps[STRUCT_TOTAL] += d;\n }\n return [struct, d];\n }\n\n /**\n * 因为zIndex/abs的变化造成的更新,只需重排这一段顺序即可\n * 即便包含component造成的dom变化也不影响,component作为子节点reflow会再执行,这里重排老的vd\n * @param structs\n * @private\n */\n __updateStruct(structs) {\n let { [STRUCT_INDEX]: index, [STRUCT_TOTAL]: total = 0 } = this.__config[NODE_STRUCT];\n let zIndexChildren = this.__zIndexChildren = genZIndexChildren(this);\n let length = zIndexChildren.length;\n if(length === 1) {\n return;\n }\n zIndexChildren.forEach((child, i) => {\n let ns = child.__config[NODE_STRUCT];\n // 一般肯定有的,但是在zIndex更新和addChild同时发生时,新添加的尚无,zIndex更新会报错,临时解决\n if(ns) {\n ns[STRUCT_CHILD_INDEX] = i; // 仅后面排序用\n }\n });\n // 按直接子节点划分为相同数量的若干段进行排序\n let arr = [];\n let source = [];\n for(let i = index + 1; i <= index + total; i++) {\n let child = structs[i];\n // 同上防止\n if(child) {\n let o = {\n child,\n list: structs.slice(child[STRUCT_INDEX], child[STRUCT_INDEX] + (child[STRUCT_TOTAL] || 0) + 1),\n };\n arr.push(o);\n source.push(o);\n i += child[STRUCT_TOTAL] || 0;\n }\n }\n arr.sort(function(a, b) {\n return a.child[STRUCT_CHILD_INDEX] - b.child[STRUCT_CHILD_INDEX];\n });\n // 是否有变更,有才进行重新计算\n let needSort;\n for(let i = 0, len = source.length; i < len; i++) {\n if(source[i] !== arr[i]) {\n needSort = true;\n break;\n }\n }\n if(needSort) {\n let list = [];\n arr.forEach(item => {\n list = list.concat(item.list);\n });\n list.forEach((struct, i) => {\n struct[STRUCT_INDEX] = index + i + 1;\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[1] !== 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.__config[NODE_IS_INLINE] && 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 super.__offsetY(diff, isLayout, lv);\n let ep = this.__ellipsis;\n if(ep) {\n ep.__offsetY(diff, isLayout);\n }\n if(isLayout && !this.__config[NODE_IS_INLINE] && 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[1] === AUTO;\n let isFixed = [PX, PERCENT, REM, VW, VH, VMAX, VMIN].indexOf(flexBasis[1]) > -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[1]) > -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.__layout({\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.__layout({\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.__layout({\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 __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 * @private\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);\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.__layout({\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.__layout({\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.__layout({\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.__layout({\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);\n if(diff) {\n item.__offsetX(diff, true);\n x += diff;\n }\n }\n else {\n mergeMarginStartList.push(marginTop);\n let diff = reflow.getMergeMargin(mergeMarginStartList, mergeMarginEndList);\n if(diff) {\n item.__offsetY(diff, true);\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);\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.__layout({\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.__layout({\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.__layout({\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);\n }\n else if(!isUpright && !fixedHeight) {\n this.__resizeY(spread);\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);\n }\n else {\n item.__offsetY(spreadList[count], true);\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.__layout({\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);\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);\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);\n }\n else {\n item.__offsetX(diff, true);\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);\n }\n else {\n item.__offsetX(per, true);\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);\n }\n else {\n item.__offsetX(diff, true);\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);\n }\n else {\n item.__offsetX(between, true);\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);\n }\n else {\n item.__offsetX(around * (i + 1), true);\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);\n }\n else {\n item.__offsetX(per * i, true);\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.__layout({\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[1] !== AUTO || alignSelf === 'stretch') {\n needGenAr = true;\n }\n else if(alignSelf === 'auto' && alignItems === 'stretch') {\n needGenAr = true;\n }\n if(needGenAr) {\n item.__layout({\n x,\n y,\n w,\n h: main,\n h3: main, // 同w2\n isUpright,\n }, isAbs, isColumn, isRow);\n }\n else {\n item.__layout({\n x,\n y,\n w,\n h: main,\n h3: main, // 同w2\n isUpright,\n }, true, isColumn, isRow);\n item.__layout({\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.__layout({\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][1] === AUTO) {\n marginAutoCount++;\n }\n if(currentStyle[MARGIN_RIGHT][1] === AUTO) {\n marginAutoCount++;\n }\n }\n else {\n if(currentStyle[MARGIN_TOP][1] === AUTO) {\n marginAutoCount++;\n }\n if(currentStyle[MARGIN_BOTTOM][1] === 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.__layout({\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][1] === AUTO) {\n count += per;\n child.__offsetX(count, true);\n }\n else if(count) {\n child.__offsetX(count, true);\n }\n if(currentStyle[MARGIN_RIGHT][1] === AUTO) {\n count += per;\n }\n }\n else {\n if(currentStyle[MARGIN_TOP][1] === AUTO) {\n count += per;\n child.__offsetY(count, true);\n }\n else if(count) {\n child.__offsetY(count, true);\n }\n if(currentStyle[MARGIN_BOTTOM][1] === 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) : child.__offsetY(free, true);\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) : child.__offsetY(center, true);\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) : child.__offsetY(between * i, true);\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) : child.__offsetY(around * (i * 2 + 1), true);\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) : child.__offsetY(around * (i + 1), true);\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);\n }\n }\n else if(alignSelf === 'center') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff * 0.5, true);\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[1] === 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);\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);\n }\n }\n else if(alignItems === 'flexEnd') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff, true);\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseline - item.firstBaseline;\n if(diff !== 0) {\n item.__offsetY(diff, true);\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[1] === AUTO && item.outerHeight < maxCross) {\n item.__layout(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[1] === 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);\n }\n }\n else if(alignSelf === 'center') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff * 0.5, true);\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[1] === 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);\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);\n }\n }\n else if(alignItems === 'flexEnd') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff, true);\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseline - item.firstBaseline;\n if(diff !== 0) {\n item.__offsetX(diff, true);\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[1] === 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.__config[NODE_IS_INLINE] = 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.__layout({\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[1] === AUTO) {\n isUprightIbFull = true;\n }\n else if(!isUpright && w[1] === 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.__layout({\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.__layout({\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.__layout({\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[1] === AUTO && isUpright) {\n isUprightIbFull = true;\n }\n if(width[1] === 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.__layout({\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.__layout({\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[1] === AUTO && isUpright) {\n isUprightIbFull = true;\n }\n if(width[1] === 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);\n }\n else if(!isUpright && !fixedHeight) {\n this.__resizeY(spread);\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);\n }\n else {\n this.__offsetX(diff, true);\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, clientWidth, clientHeight, computedStyle } = container;\n let { 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[1] !== AUTO) {\n fixedLeft = true;\n computedStyle[LEFT] = this.__calSize(left, clientWidth, true);\n }\n else {\n computedStyle[LEFT] = 'auto';\n }\n if(right[1] !== AUTO) {\n fixedRight = true;\n computedStyle[RIGHT] = this.__calSize(right, clientWidth, true);\n }\n else {\n computedStyle[RIGHT] = 'auto';\n }\n if(top[1] !== AUTO) {\n fixedTop = true;\n computedStyle[TOP] = this.__calSize(top, clientHeight, true);\n }\n else {\n computedStyle[TOP] = 'auto';\n }\n if(bottom[1] !== 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[1] !== AUTO) {\n w2 = this.__calSize(width, clientWidth, true);\n }\n }\n else if(fixedRight) {\n if(width[1] !== 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[1] !== 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[1] !== AUTO) {\n h2 = this.__calSize(height, clientHeight, true);\n }\n }\n else if(fixedBottom) {\n if(height[1] !== 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;\n while(prev) {\n // 以前面的flow的最近的prev末尾为准\n if(prev instanceof Text || prev.computedStyle[POSITION] !== 'absolute') {\n y2 = prev.y + prev.outerHeight;\n break;\n }\n prev = prev.prev;\n }\n if(height[1] !== 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.__layout({\n x: x2,\n y: y2,\n w: widthLimit,\n h: heightLimit,\n isUpright: data.isUpright, // 父亲的\n }, true, false);\n widthLimit = item.outerWidth;\n }\n item.__layout({\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 }, false, false);\n if(onlyRight) {\n item.__offsetX(-item.outerWidth, true);\n }\n if(onlyBottom) {\n item.__offsetY(-item.outerHeight, true);\n }\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);\n }\n else if(item instanceof Component) {\n let sr = item.shadowRoot;\n if(sr instanceof Dom) {\n sr.__layoutAbs(sr, data);\n }\n }\n });\n // 根节点自己特殊执行,不在layout统一\n this.__execAr();\n }\n\n render(renderMode, lv, ctx, cache, dx, dy) {\n let res = super.render(renderMode, lv, ctx, cache, dx, dy);\n let ep = this.__ellipsis;\n if(ep) {\n ep.render(renderMode, lv, res.ctx, cache, 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, force) {\n if(force) {\n return super.__emitEvent(e, force);\n }\n let { isDestroyed, computedStyle, isMask } = 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 // 找到对应的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)) {\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);\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(json, cb) {\n let self = this;\n if(!isNil(json) && !self.isDestroyed) {\n let { root, host } = self;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, self);\n }\n else {\n vd = builder.initDom(json, root, host, self);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null; // 清除在before,防止after的回调增加新的task误删\n self.__json.children.push(json);\n let len = self.children.length;\n if(len) {\n let last = self.children[len - 1];\n last.__next = vd;\n vd.__prev = last;\n }\n self.children.push(vd);\n self.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in appendChild.');\n }\n }\n }\n\n prependChild(json, cb) {\n let self = this;\n if(!isNil(json) && !self.isDestroyed) {\n let { root, host } = self;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, self);\n }\n else {\n vd = builder.initDom(json, root, host, self);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null;\n self.__json.children.unshift(json);\n let len = self.children.length;\n if(len) {\n let first = self.children[0];\n first.__prev = vd;\n vd.__next = first;\n }\n self.children.unshift(vd);\n self.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in prependChild.');\n }\n }\n }\n\n insertBefore(json, cb) {\n let self = this;\n if(!isNil(json) && !self.isDestroyed && self.domParent) {\n let { root, domParent } = self;\n let host = domParent.hostRoot;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, domParent);\n }\n else {\n vd = builder.initDom(json, root, host, domParent);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null;\n let i = 0, has, __json = domParent.__json, children = __json.children, len = children.length;\n let pJson = self.isShadowRoot ? self.hostRoot.__json : self.__json;\n for(; i < len; i++) {\n if(children[i] === pJson) {\n has = true;\n break;\n }\n }\n if(!has) {\n throw new Error('InsertBefore exception.');\n }\n // 插入注意开头位置处理\n if(i) {\n children.splice(i, 0, json);\n vd.__next = self;\n vd.__prev = self.__prev;\n self.__prev = vd;\n domParent.children.splice(i, 0, vd);\n }\n else {\n if(len) {\n let first = domParent.children[0];\n first.__prev = vd;\n vd.__next = first;\n }\n children.unshift(json);\n domParent.children.unshift(vd);\n }\n domParent.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in insertBefore.');\n }\n }\n }\n\n insertAfter(json, cb) {\n let self = this;\n if(!isNil(json) && !self.isDestroyed && self.domParent) {\n let { root, domParent } = self;\n let host = domParent.hostRoot;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, domParent);\n }\n else {\n vd = builder.initDom(json, root, host, domParent);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null;\n let i = 0, has, __json = domParent.__json, children = __json.children, len = children.length;\n let pJson = self.isShadowRoot ? self.hostRoot.__json : self.__json;\n for(; i < len; i++) {\n if(children[i] === pJson) {\n has = true;\n break;\n }\n }\n if(!has) {\n throw new Error('insertAfter exception.');\n }\n // 插入注意末尾位置处理\n if(i < len - 1) {\n children.splice(i + 1, 0, json);\n vd.__prev = self;\n vd.__next = self.__next;\n self.__next = vd;\n domParent.children.splice(i + 1, 0, vd);\n }\n else {\n if(len) {\n let last = domParent.children[len - 1];\n last.__next = vd;\n vd.__prev = last;\n }\n children.push(json);\n domParent.children.push(vd);\n }\n domParent.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in insertAfter.');\n }\n }\n }\n\n removeChild(target, cb) {\n if(target.parent === this && (target instanceof Xom || target instanceof Component)) {\n if(this.isDestroyed) {\n inject.warn('Remove parent is destroyed.');\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n target.remove(cb);\n }\n else {\n inject.error('Invalid parameter in 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';\nimport css from '../style/css';\n\nconst {\n STYLE_KEY: {\n WIDTH,\n HEIGHT,\n DISPLAY,\n BORDER_TOP_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n VISIBILITY,\n BACKGROUND_IMAGE,\n BACKGROUND_COLOR,\n BOX_SHADOW,\n MIX_BLEND_MODE,\n MARGIN_RIGHT,\n MARGIN_LEFT,\n PADDING_RIGHT,\n PADDING_LEFT,\n FONT_SIZE,\n FLEX_BASIS,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_FOCUS,\n UPDATE_CONFIG,\n },\n NODE_KEY: {\n NODE_CACHE,\n NODE_DEFS_CACHE,\n NODE_IS_MASK,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, REM, VW, VH, VMAX, VMIN, RGBA } = 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 && ca.state === inject.LOADED) {\n loadImg.source = ca.source;\n loadImg.width = ca.width;\n loadImg.height = ca.height;\n }\n }\n let config = this.__config;\n if(config[NODE_IS_MASK]) {\n let { style, currentStyle } = this;\n style[BACKGROUND_IMAGE] = currentStyle[BACKGROUND_IMAGE] = [null];\n style[BACKGROUND_COLOR] = currentStyle[BACKGROUND_COLOR] = [[0, 0, 0, 0], RGBA];\n style[BORDER_TOP_WIDTH] = currentStyle[BORDER_TOP_WIDTH] = [0, PX];\n style[BORDER_RIGHT_WIDTH] = currentStyle[BORDER_RIGHT_WIDTH] = [0, PX];\n style[BORDER_LEFT_WIDTH] = currentStyle[BORDER_LEFT_WIDTH] = [0, PX];\n style[BORDER_BOTTOM_WIDTH] = currentStyle[BORDER_BOTTOM_WIDTH] = [0, PX];\n style[BOX_SHADOW] = currentStyle[BOX_SHADOW] = null;\n style[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE] = 'normal';\n }\n }\n\n /**\n * 覆盖xom的方法,在__layout()3个分支中会首先被调用\n * 当样式中固定宽高时,图片按样式尺寸,加载后重新绘制即可\n * 只固定宽高一个时,加载完要计算缩放比,重新布局绘制\n * 都没有固定,按照图片尺寸,重新布局绘制\n * 这里计算非固定的情况,将其改为固定供布局渲染使用,未加载完成为0\n * @param data\n * @param isInline\n * @returns {{fixedWidth: boolean, w: *, x: *, h: *, y: *, fixedHeight: boolean}}\n * @private\n */\n __preLayout(data, isInline) {\n let res = super.__preLayout(data, false);\n let loadImg = this.__loadImg;\n // 可能已提前加载好了,或有缓存,为减少刷新直接使用\n if(!loadImg.error) {\n let src = loadImg.src;\n let cache = inject.IMG[src];\n if(cache && cache.state === inject.LOADED) {\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(renderMode, lv, currentStyle, computedStyle) {\n let res = super.__calContent(renderMode, lv, currentStyle, computedStyle);\n if(!res) {\n let {\n __loadImg: loadImg,\n } = this;\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, lv, ctx, cache, dx = 0, dy = 0) {\n let res = super.render(renderMode, lv, ctx, cache, dx, dy);\n if(renderMode === mode.WEBGL) {\n dx = res.dx;\n dy = res.dy;\n }\n let {\n offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow,\n } = res;\n let {\n width, height, isDestroyed,\n props: {\n placeholder,\n },\n computedStyle,\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 __config,\n __loadImg: loadImg,\n root,\n } = this;\n if(offscreenBlend) {\n ctx = offscreenBlend.target.ctx;\n }\n if(offscreenMask) {\n ctx = offscreenMask.target.ctx;\n }\n if(offscreenFilter) {\n ctx = offscreenFilter.target.ctx;\n }\n if(offscreenOverflow) {\n ctx = offscreenOverflow.target.ctx;\n }\n // 没source且不error时加载图片\n if(!loadImg.source && !loadImg.error && !loadImg.loading) {\n this.__loadAndRefresh(loadImg, root, ctx, placeholder, computedStyle, width, height);\n }\n if(isDestroyed || display === 'none' || visibility === 'hidden') {\n return res;\n }\n let __cache = __config[NODE_CACHE];\n if(cache && __cache && __cache.enabled) {\n ctx = __cache.ctx;\n }\n let originX, originY;\n originX = res.x3 + dx;\n originY = res.y3 + dy;\n // 根据配置以及占位图显示error\n let source = loadImg.source;\n if(loadImg.error && !placeholder && Img.showError) {\n let strokeWidth = Math.min(width, height) * 0.02;\n let stroke = '#CCC';\n let fill = '#DDD';\n let cx = originX + width * 0.7;\n let cy = originY + height * 0.3;\n let r = strokeWidth * 5;\n let pts = [\n [originX + width * 0.15, originY + height * 0.7],\n [originX + width * 0.3, originY + height * 0.4],\n [originX + width * 0.5, originY + height * 0.6],\n [originX + width * 0.6, originY + height * 0.5],\n [originX + width * 0.9, originY + height * 0.8],\n [originX + width * 0.15, originY + height * 0.8]\n ];\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n ctx.strokeStyle = stroke;\n ctx.lineWidth = strokeWidth;\n ctx.fillStyle = fill;\n ctx.beginPath();\n ctx.moveTo(originX, originY);\n ctx.lineTo(originX + width, originY);\n ctx.lineTo(originX + width, originY + height);\n ctx.lineTo(originX, originY + height);\n ctx.lineTo(originX, originY);\n ctx.stroke();\n ctx.closePath();\n ctx.beginPath();\n let points = geom.ellipsePoints(cx, cy, r, r);\n painter.canvasPolygon(ctx, points, 0, 0);\n ctx.fill();\n ctx.closePath();\n ctx.beginPath();\n ctx.moveTo(pts[0][0], pts[0][1]);\n for(let i = 1, len = pts.length; i < len; i++) {\n let point = pts[i];\n ctx.lineTo(point[0], point[1]);\n }\n ctx.lineTo(pts[0][0], pts[0][1]);\n ctx.fill();\n ctx.closePath();\n }\n else if(renderMode === mode.SVG) {\n this.__addGeom('rect', [\n ['x', originX],\n ['y', originY],\n ['width', width],\n ['height', height],\n ['stroke', stroke],\n ['stroke-width', strokeWidth],\n ['fill', 'rgba(0,0,0,0)']\n ]);\n this.__addGeom('circle', [\n ['cx', cx],\n ['cy', cy],\n ['r', r],\n ['fill', fill],\n ]);\n let s = '';\n for(let i = 0, len = pts.length; i < len; i++) {\n let point = pts[i];\n if(i) {\n s += ' ';\n }\n s += point[0] + ',' + point[1];\n }\n this.__addGeom('polygon', [\n ['points', s],\n ['fill', fill]\n ]);\n }\n }\n else if(source) {\n // 圆角需要生成一个mask\n let list = border.calRadius(originX, originY, width, height,\n borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius);\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n // 有border-radius需模拟遮罩裁剪\n if(list) {\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, list, dx, dy);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(source, originX, originY, width, height);\n ctx.restore();\n }\n else {\n ctx.drawImage(source, originX, originY, width, height);\n }\n }\n else if(renderMode === mode.SVG) {\n // img没有变化无需diff,直接用上次的vd\n if(loadImg.cache) {\n loadImg.cache.cache = true;\n virtualDom.children = [loadImg.cache];\n // 但是还是要校验是否有borderRadius变化,引发img的圆角遮罩\n if(!virtualDom.cache && list) {\n let d = svgPolygon(list);\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', '#FFF'],\n ],\n }\n ],\n };\n let id = ctx.add(v);\n __config[NODE_DEFS_CACHE].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 __config[NODE_DEFS_CACHE].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 // img没加载时,清空,这样Xom就认为没内容不生成cache,防止img先绘制cache再绘制主屏,重复\n __releaseWhenEmpty(__cache) {\n if(!this.__loadImg.error && !this.__loadImg.source) {\n return super.__releaseWhenEmpty(__cache);\n }\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[1] !== AUTO) {\n w -= this.__calSize(width, total, true);\n }\n else {\n let loadImg = this.__loadImg;\n // 加载成功计算缩放后的宽度\n if(loadImg.source) {\n if(height[1] === PX) {\n w -= loadImg.width * height[0] / loadImg.height;\n }\n else if(height[1] === PERCENT) {\n w -= loadImg.width * height[0] * total * 0.01 / loadImg.height;\n }\n else if(height[1] === REM) {\n w -= loadImg.width * height[0] * this.root.computedStyle[FONT_SIZE] / loadImg.height;\n }\n else if(height[1] === VW) {\n w -= loadImg.width * height[0] * this.root.width * 0.01 / loadImg.height;\n }\n else if(height[1] === VH) {\n w -= loadImg.width * height[0] * this.root.height * 0.01 / loadImg.height;\n }\n else if(height[1] === VMAX) {\n w -= height[0] * Math.max(this.root.width, this.root.height) * 0.01 / loadImg.height;\n }\n else if(height[1] === VMIN) {\n w -= height[0] * 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[1]) > -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[1]) > -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[1] !== 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, root, ctx, placeholder, computedStyle, width, height, cb) {\n let self = this;\n // 先清空之前可能的\n if(loadImg.source || loadImg.error) {\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null; // 清除在before,防止after的回调增加新的task误删\n if(self.isDestroyed) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REFLOW; // 没有样式变化但内容尺寸发生了变化强制执行\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n });\n loadImg.source = null;\n }\n loadImg.loading = true;\n // 再测量,可能瞬间完成替换掉上面的\n inject.measureImg(loadImg.src, data => {\n // 还需判断url,防止重复加载时老的替换新的,失败走error绘制\n if(data.url === loadImg.src && !self.isDestroyed) {\n loadImg.cache && (loadImg.cache.cache = false);\n loadImg.loading = false;\n function reload() {\n let { currentStyle: { [WIDTH]: width, [HEIGHT]: height } } = self;\n root.delRefreshTask(self.__task);\n if(width[1] !== AUTO && height[1] !== AUTO) {\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null;\n if(self.isDestroyed) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REPAINT;\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n __after() {\n if(isFunction(cb)) {\n cb.call(self);\n }\n },\n });\n }\n else {\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null;\n if(self.isDestroyed) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REFLOW; // 没有样式变化但内容尺寸发生了变化强制执行\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n __after() {\n if(isFunction(cb)) {\n cb.call(self);\n }\n },\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 inject.measureImg(placeholder, data => {\n if(data.success) {\n loadImg.error = true;\n loadImg.source = data.source;\n loadImg.width = data.width;\n loadImg.height = data.height;\n reload();\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') {\n reload();\n }\n }\n }, {\n ctx,\n root,\n width,\n height,\n });\n }\n\n updateSrc(v, cb) {\n let self = this;\n let loadImg = self.__loadImg;\n let root = this.root;\n // 相等或空且当前error直接返回\n if(v === loadImg.src || !v && loadImg.error) {\n if(isFunction(cb)) {\n cb(-1);\n }\n }\n else if(v) {\n loadImg.src = v;\n self.__loadAndRefresh(loadImg, root, root.ctx, self.props.placeholder, self.computedStyle, self.width, self.height, cb);\n }\n else {\n loadImg.src = v;\n loadImg.source = null;\n loadImg.error = true;\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null;\n if(self.isDestroyed) {\n return;\n }\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, self.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb(diff);\n }\n },\n });\n }\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 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';\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 NODE_KEY: {\n NODE_CACHE_PROPS,\n NODE_CURRENT_PROPS,\n NODE_CURRENT_STYLE,\n NODE_STYLE,\n NODE_DEFS_CACHE,\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 let config = this.__config;\n config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n config[NODE_CURRENT_PROPS] = this.__currentProps;\n config[NODE_CURRENT_STYLE] = this.__currentStyle;\n config[NODE_STYLE] = this.__style;\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[1]) > -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[1]) > -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 __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.__config[NODE_CACHE_PROPS] = 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.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __calCache(renderMode, ctx, parent, __cacheStyle, currentStyle, computedStyle,\n clientWidth, clientHeight, offsetWidth, offsetHeight,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth,\n paddingTop, paddingRight, paddingBottom, paddingLeft,\n x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6) {\n let res = super.__calCache(renderMode, ctx, parent, __cacheStyle, currentStyle, computedStyle,\n clientWidth, clientHeight, offsetWidth, offsetHeight,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth,\n paddingTop, paddingRight, paddingBottom, paddingLeft,\n x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6);\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[1] === GRADIENT) {\n // let t = this.__gradient(renderMode, ctx, x3, y3, x4, y4, item[0], 0, 0);\n cs.push(item[0]);\n res.push(true);\n }\n else if(item && item[1] === RGBA && item[0][3] > 0) {\n cs.push(item[0]);\n res.push(int2rgba(item[0]));\n }\n else {\n cs.push('none');\n res.push('none');\n }\n });\n }\n }\n });\n return res;\n }\n\n __calContent(renderMode, lv, 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.x3, res.y3, res.x4, res.y4, item, res.dx, res.dy);\n }\n return int2rgba(item);\n });\n fill = fill.map(item => {\n if(item.k) {\n return this.__gradient(renderMode, res.ctx, res.x3, res.y3, res.x4, res.y4, item, res.dx, res.dy);\n }\n return int2rgba(item);\n });\n return {\n cx,\n cy,\n stroke,\n strokeWidth,\n strokeDasharray,\n strokeDasharrayStr,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n fill,\n fillRule,\n };\n }\n\n __preSetCanvas(renderMode, ctx, res) {\n let {\n stroke,\n strokeWidth,\n strokeDasharray,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n fill,\n } = res;\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\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, lv, ctx, cache, dx, dy) {\n let res = super.render(renderMode, lv, ctx, cache, dx, dy);\n if(renderMode === mode.SVG) {\n this.virtualDom.type = 'geom';\n }\n // 无论canvas/svg,break可提前跳出省略计算\n if(res.break) {\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 || renderMode === mode.WEBGL) {\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 || renderMode === mode.WEBGL) {\n if(matrix) {\n ctx.save();\n // 临时解决方案,webgl和cacheCanvas的渲染忽略世界matrix\n if(renderMode === mode.CANVAS) {\n let me = this.matrixEvent;\n matrix = mx.multiply(me, matrix);\n }\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 || renderMode === mode.WEBGL) {\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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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 // geom的cache无内容也不清除,因为子类不清楚内容,除非看不见\n __releaseWhenEmpty(cache, computedStyle) {\n return computedStyle[VISIBILITY] === 'hidden';\n }\n\n // offset/resize时要多一步清空props上记录的缓存\n __offsetX(diff, isLayout, lv) {\n super.__offsetX(diff, isLayout, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __offsetY(diff, isLayout, lv) {\n super.__offsetY(diff, isLayout, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __resizeX(diff, lv) {\n super.__resizeX(diff, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __resizeY(diff, lv) {\n super.__resizeY(diff, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\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.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 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';\nimport enums from './enums';\n\nconst {\n NODE_KEY: {\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_DOM_PARENT,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n NODE_STRUCT,\n },\n} = enums;\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 = sr.__config[NODE_COMPUTED_STYLE] = oldSr.computedStyle;\n }\n else {\n let domParent = cp.domParent;\n [\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n ].forEach(k => {\n sr.__config[k] = domParent.__config[k];\n });\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.__config[NODE_DOM_PARENT] = oldSr.domParent;\n sr.__config[NODE_STRUCT] = oldSr.__config[NODE_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 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 item.off(arr[0], arr[1]);\n item.on(arr[0], arr[1]);\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();\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';\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[1] === b[1]) {\n if(a[0] === b[0]) {\n return a[2] - b[2];\n }\n return b[0] - a[0];\n }\n return b[1] - a[1];\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 target.draw();\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 ctx.draw && ctx.draw(true);\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\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 apply.draw();\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 target.draw();\n apply.ctx.setTransform(1, 0, 0, 1, 0, 0);\n apply.ctx.clearRect(0, 0, width, height);\n apply.draw();\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 ctx.draw && ctx.draw(true);\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.globalAlpha = 1;\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\n inject.releaseCacheCanvas(target.canvas);\n }\n else if(type === OFFSCREEN_MASK) {\n let { mask, isClip } = offscreen;\n if(isClip) {\n offscreen.target.draw();\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 mask.draw();\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 offscreen.target.draw();\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 ctx.draw && ctx.draw(true);\n mask.ctx.setTransform(1, 0, 0, 1, 0, 0);\n mask.ctx.clearRect(0, 0, width, height);\n mask.draw();\n inject.releaseCacheCanvas(mask.canvas);\n }\n else {\n mask.draw();\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 target.draw();\n mask.ctx.setTransform(1, 0, 0, 1, 0, 0);\n mask.ctx.clearRect(0, 0, width, height);\n mask.draw();\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 ctx.draw && ctx.draw(true);\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\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 target.draw();\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 ctx.draw && ctx.draw(true);\n target.ctx.globalAlpha = 1;\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\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 get page() {\n return this.__page;\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 { NA, LOCAL, CHILD, SELF, 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 PADDING_LEFT,\n PADDING_RIGHT,\n PADDING_TOP,\n PADDING_BOTTOM,\n BORDER_TOP_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n MATRIX,\n },\n NODE_KEY: {\n NODE_CACHE,\n NODE_CACHE_TOTAL,\n NODE_CACHE_OVERFLOW,\n NODE_CACHE_MASK,\n NODE_CACHE_FILTER,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n NODE_OPACITY,\n NODE_COMPUTED_STYLE,\n NODE_CURRENT_STYLE,\n NODE_LIMIT_CACHE,\n NODE_REFRESH_LV,\n NODE_CACHE_STYLE,\n NODE_DEFS_CACHE,\n NODE_IS_MASK,\n NODE_DOM_PARENT,\n NODE_PERSPECTIVE_MATRIX,\n NODE_VIRTUAL_DOM,\n NODE_CACHE_AS_BITMAP,\n NODE_STRUCT,\n },\n STRUCT_KEY: {\n STRUCT_NODE,\n STRUCT_INDEX,\n STRUCT_TOTAL,\n STRUCT_HAS_MASK,\n STRUCT_LV,\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} = 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, __config } = node;\n let {\n [NODE_CACHE]: cache,\n [NODE_COMPUTED_STYLE]: {\n [FILTER]: filter,\n [PERSPECTIVE]: perspective,\n [PERSPECTIVE_ORIGIN]: perspectiveOrigin,\n },\n } = __config;\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][STRUCT_TOTAL] || 0;\n for(let i = parentIndex + 1, len = parentIndex + total + 1; i < len; i++) {\n let {\n [STRUCT_NODE]: node2,\n [STRUCT_TOTAL]: total,\n } = __structs[i];\n // mask也不占bbox位置\n if(node2.isMask) {\n continue;\n }\n let {\n __sx1,\n __sy1,\n __config: {\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n [OPACITY]: opacity,\n },\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 config\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, config, index, lv, total, __structs, hasMask, width, height) {\n let {\n [NODE_CACHE_TOTAL]: cacheTotal,\n [NODE_CACHE_FILTER]: cacheFilter,\n [NODE_CACHE_MASK]: cacheMask,\n [NODE_CACHE_OVERFLOW]: cacheOverflow,\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = config;\n let needGen;\n // 先绘制形成基础的total,有可能已经存在无变化,就可省略\n if(!cacheTotal || !cacheTotal.available) {\n needGen = true; // total重新生成了,其它基于的也一定需要重新生成\n let bboxTotal, baseMatrix;\n let { __sx1: sx1, __sy1: sy1 } = node;\n // 栈代替递归,存父节点的matrix/opacity,matrix为E时存null省略计算\n let matrixList = [];\n let parentMatrix;\n let opacityList = [];\n let parentOpacity = 1;\n let lastConfig;\n let lastLv = lv;\n // 先遍历每个节点,以局部根节点左上角为原点,求得所占的总的bbox,即合并所有bbox\n for(let i = index, len = index + (total || 0) + 1; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n // 排除Text\n if(node instanceof Text) {\n let bbox = node.bbox; // 文字节点不能算filter\n if(!isE(parentMatrix)) {\n bbox = transformBbox(bbox, parentMatrix, 0, 0);\n }\n mergeBbox(bboxTotal, bbox, 0, 0);\n continue;\n }\n let __config = node.__config;\n let {\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_IS_MASK]: isMask,\n } = __config;\n // 跳过display:none元素和它的所有子节点和mask\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n continue;\n }\n // mask不占bbox,本身除外\n if(i !== index && isMask) {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n continue;\n }\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,根节点是第一个特殊处理\n if(i === index) {}\n else if(lv > lastLv) {\n parentMatrix = lastConfig[NODE_MATRIX_EVENT];\n if(isE(parentMatrix)) {\n parentMatrix = null;\n }\n matrixList.push(parentMatrix);\n parentOpacity = lastConfig[NODE_OPACITY];\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 lastConfig = __config;\n lastLv = lv;\n let {\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_CACHE_STYLE]: __cacheStyle,\n } = __config;\n let matrix, opacity;\n /**\n * lv=REPAINT重新渲染,bbox重新生成,matrix重新生成,filter重新生成\n */\n else {\n node.__bbox = null;\n node.__filterBbox = null;\n if(i === index) {\n node.__calFilter(currentStyle, computedStyle);\n }\n matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n assignMatrix(__config[NODE_MATRIX], matrix);\n opacity = computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n // opacity可临时赋值下面循环渲染用,matrixEvent可能需重新计算,因为局部根节点为E没考虑继承,这里仅计算bbox用\n if(i === index) {\n opacity = 1;\n baseMatrix = matrix;\n matrix = mx.identity();\n }\n else if(!isE(parentMatrix)) {\n matrix = multiply(parentMatrix, matrix);\n }\n assignMatrix(__config[NODE_MATRIX_EVENT], matrix);\n __config[NODE_OPACITY] = parentOpacity * opacity;\n let bbox;\n // 子元素有cacheTotal优先使用,一定是子元素,局部根节点available为false不会进\n let target = i > index && getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal]);\n // 局部根节点的total不需要考虑filter,子节点要\n if(target) {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n bbox = target.bbox;\n }\n else {\n bbox = i === index ? node.bbox : node.filterBbox;\n }\n // 老的不变,新的会各自重新生成,根据matrixEvent合并bboxTotal\n bbox = transformBbox(bbox, matrix, 0, 0);\n if(i === index) {\n bboxTotal = bbox.slice(0);\n }\n else {\n mergeBbox(bboxTotal, bbox, 0, 0);\n }\n }\n // 生成cacheTotal,获取偏移dx/dy\n config[NODE_CACHE_TOTAL] = cacheTotal = Cache.getInstance(bboxTotal, sx1, sy1);\n if(!cacheTotal || !cacheTotal.enabled) {\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 * 每个子节点的opacity有父继承计算在上面循环已经做好了,直接获取\n * 但matrixEvent可能需要重算,因为原点不一定是根节点的原点,影响tfo\n * 另外每个节点的refreshLevel需要设置REPAINT\n * 这样cacheTotal取消时子节点需确保重新计算一次matrix/opacity/filter,保证下次和父元素继承正确\n */\n parentMatrix = null;\n let lastMatrix;\n 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 [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n // 排除Text\n if(node instanceof Text) {\n node.render(renderMode, REPAINT, ctxTotal, CHILD, dx, dy);\n if(offscreenHash.hasOwnProperty(i)) {\n ctxTotal = applyOffscreen(ctxTotal, offscreenHash[i], width, height);\n }\n }\n else {\n let __config = node.__config;\n let {\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = __config;\n if(maskStartHash.hasOwnProperty(i)) {\n let [idx, n, 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(--n) {\n let { [STRUCT_TOTAL]: total } = __structs[j];\n j += (total || 0) + 1;\n }\n j--;\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([idx, lv, OFFSCREEN_MASK, offscreenMask]);\n list.push([j, lv, OFFSCREEN_MASK2, {\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 let {\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n [DISPLAY]: display,\n } = computedStyle;\n // 特殊渲染的matrix,局部根节点为原点考虑,当需要计算时再计算\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 else {\n m = null;\n }\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 lastLv = lv;\n lastMatrix = m;\n // 子元素有cacheTotal优先使用,也一定是子元素,局部根节点不会进\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal]);\n if(i !== index && target) {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n // 跳过display:none元素和它的所有子节点\n if(display === 'none') {\n continue;\n }\n let mixBlendMode = computedStyle[MIX_BLEND_MODE];\n if(isValidMbm(mixBlendMode)) {\n ctxTotal.globalCompositeOperation = mbmName(mixBlendMode);\n }\n else {\n ctxTotal.globalCompositeOperation = 'source-over';\n }\n ctxTotal.globalAlpha = __config[NODE_OPACITY];\n Cache.drawCache(target, cacheTotal);\n ctxTotal.globalCompositeOperation = 'source-over';\n }\n else {\n if(refreshLevel >= REPAINT) {\n // 手动计算cacheStyle和根据border-box的坐标再渲染\n node.__calCache(renderMode, ctxTotal, __config[NODE_DOM_PARENT],\n __config[NODE_CACHE_STYLE], __config[NODE_CURRENT_STYLE], computedStyle,\n node.clientWidth, node.clientHeight, node.offsetWidth, node.offsetHeight,\n computedStyle[BORDER_TOP_WIDTH], computedStyle[BORDER_RIGHT_WIDTH],\n computedStyle[BORDER_BOTTOM_WIDTH], computedStyle[BORDER_LEFT_WIDTH],\n computedStyle[PADDING_TOP], computedStyle[PADDING_RIGHT],\n computedStyle[PADDING_BOTTOM], computedStyle[PADDING_LEFT],\n node.__sx1, node.__sx2, node.__sx3, node.__sx4, node.__sx5, node.__sx6,\n node.__sy1, node.__sy2, node.__sy3, node.__sy4, node.__sy5, node.__sy6);\n }\n let res = node.render(renderMode, refreshLevel, ctxTotal, i === index ? LOCAL : CHILD, dx, dy);\n let { offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow } = res || {};\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_BLEND, offscreenBlend]);\n ctxTotal = offscreenBlend.target.ctx;\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n // 最后一个遮罩索引因数量不好计算,放在maskStartHash做\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = [i, hasMask, offscreenMask];\n ctxTotal = offscreenMask.target.ctx;\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_FILTER, offscreenFilter]);\n ctxTotal = offscreenFilter.target.ctx;\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_OVERFLOW, offscreenOverflow]);\n ctxTotal = offscreenOverflow.target.ctx;\n }\n // 离屏应用,按照lv从大到小即子节点在前先应用,同一个节点多个效果按offscreen优先级从小到大来,\n // 由于mask特殊索引影响,所有离屏都在最后一个mask索引判断,此时mask本身优先结算,以index序大到小判断\n if(offscreenHash.hasOwnProperty(i)) {\n ctxTotal = applyOffscreen(ctxTotal, offscreenHash[i], width, height);\n }\n // render后判断可见状态,此时computedStyle才有值\n if(display === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n }\n }\n }\n }\n // 恢复,且局部根节点设置NONE\n assignMatrix(config[NODE_MATRIX_EVENT], baseMatrix);\n config[NODE_REFRESH_LV] = NONE;\n }\n // cacheTotal仍在说明 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 [DISPLAY]: display,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n } = computedStyle;\n // 特殊渲染的matrix,局部根节点为原点考虑,本节点需inverse反向\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal]);\n if(target) {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n // 跳过display:none元素和它的所有子节点\n if(display === 'none') {\n continue;\n }\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 ctx.globalAlpha = __config[NODE_OPACITY];\n Cache.drawCache(target, cacheMask, transform, mx.identity(), tfo.slice(0), parentMatrix, inverse);\n ctx.globalCompositeOperation = 'source-over';\n }\n // 等于将外面bbox计算和渲染合一的过程,但不需要bbox本身的内容\n else {\n let {\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_CACHE_STYLE]: __cacheStyle,\n } = __config;\n let matrix, opacity;\n if(refreshLevel < REPAINT) {\n if(contain(refreshLevel, TRANSFORM_ALL)) {\n matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n assignMatrix(__config[NODE_MATRIX], matrix);\n }\n else {\n matrix = __config[NODE_MATRIX];\n }\n if(contain(refreshLevel, OP)) {\n computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n opacity = computedStyle[OPACITY];\n if(contain(refreshLevel, FT)) {\n node.__bbox = null;\n node.__filterBbox = null;\n node.__calFilter(currentStyle, computedStyle);\n }\n matrix = __config[NODE_MATRIX];\n if(contain(refreshLevel, MBM)) {\n computedStyle[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE];\n }\n }\n else {\n node.__bbox = null;\n node.__filterBbox = null;\n if(i === index) {\n node.__calFilter(currentStyle, computedStyle);\n }\n matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n assignMatrix(__config[NODE_MATRIX], matrix);\n opacity = computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n // opacity可临时赋值下面循环渲染用,matrixEvent可能需重新计算,因为局部根节点为E没考虑继承,这里仅计算bbox用\n if(i === index) {\n opacity = 1;\n matrix = mx.identity();\n }\n else if(parentMatrix) {\n matrix = multiply(parentMatrix, matrix);\n }\n assignMatrix(__config[NODE_MATRIX_EVENT], matrix);\n lastOpacity = __config[NODE_OPACITY] = parentOpacity * opacity;\n // 特殊渲染的matrix,局部根节点为原点考虑,当需要计算时再计算\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 else {\n m = null;\n }\n lastMatrix = m;\n if(m) {\n // 很多情况mask和target相同matrix,可简化计算\n if(util.equalArr(m, inverse)) {\n m = mx.identity();\n }\n else {\n inverse = mx.inverse(inverse);\n m = mx.multiply(inverse, m);\n }\n }\n if(m) {\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n }\n else {\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n }\n if(refreshLevel >= REPAINT) {\n // 手动计算cacheStyle和根据border-box的坐标再渲染\n node.__calCache(renderMode, ctx, __config[NODE_DOM_PARENT],\n __config[NODE_CACHE_STYLE], __config[NODE_CURRENT_STYLE], computedStyle,\n node.clientWidth, node.clientHeight, node.offsetWidth, node.offsetHeight,\n computedStyle[BORDER_TOP_WIDTH], computedStyle[BORDER_RIGHT_WIDTH],\n computedStyle[BORDER_BOTTOM_WIDTH], computedStyle[BORDER_LEFT_WIDTH],\n computedStyle[PADDING_TOP], computedStyle[PADDING_RIGHT],\n computedStyle[PADDING_BOTTOM], computedStyle[PADDING_LEFT],\n node.__sx1, node.__sx2, node.__sx3, node.__sx4, node.__sx5, node.__sx6,\n node.__sy1, node.__sy2, node.__sy3, node.__sy4, node.__sy5, node.__sy6);\n }\n let res = node.render(renderMode, refreshLevel, ctx, CHILD, dx, dy);\n let { offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow } = res || {};\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_BLEND, offscreenBlend]);\n ctx = offscreenBlend.target.ctx;\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n // 最后一个遮罩索引因数量不好计算,放在maskStartHash做\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = [i, hasMask, offscreenMask];\n ctx = offscreenMask.target.ctx;\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_FILTER, offscreenFilter]);\n ctx = offscreenFilter.target.ctx;\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_OVERFLOW, offscreenOverflow]);\n ctx = offscreenOverflow.target.ctx;\n }\n // 离屏应用,按照lv从大到小即子节点在前先应用,同一个节点多个效果按offscreen优先级从小到大来,\n // 由于mask特殊索引影响,所有离屏都在最后一个mask索引判断,此时mask本身优先结算,以index序大到小判断\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n // render后判断可见状态,此时computedStyle才有值\n if(display === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n }\n }\n }\n }\n });\n }\n }\n}\n\nfunction resetMatrixCacheTotal(__structs, index, total, lv, matrixEvent) {\n let matrixList = [];\n let parentMatrix;\n let lastMatrix = matrixEvent;\n let lastLv = lv;\n for(let i = index + 1, len = index + (total || 0) + 1; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n // 排除Text\n if(node instanceof Text) {\n continue;\n }\n let __config = node.__config;\n let {\n [NODE_MATRIX_EVENT]: old,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_CACHE_STYLE]: cacheStyle,\n } = __config;\n // 跳过display:none元素和它的所有子节点和mask\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n continue;\n }\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树\n 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 old = old.slice(0);\n // 计算真正的相对于root原点的matrix\n cacheStyle[MATRIX] = null;\n let matrix = node.__calMatrix(REPAINT, cacheStyle, currentStyle, computedStyle, __config);\n assignMatrix(__config[NODE_MATRIX], matrix);\n if(!isE(parentMatrix)) {\n matrix = multiply(parentMatrix, matrix);\n }\n assignMatrix(__config[NODE_MATRIX_EVENT], matrix);\n lastMatrix = matrix;\n // 深度遍历递归进行\n if(__cacheTotal && __cacheTotal.available) {\n let needReset = __cacheTotal.isNew;\n if(!needReset && !util.equalArr(old, matrix)) {\n needReset = true;\n }\n if(needReset) {\n resetMatrixCacheTotal(__structs, i, total || 0, lv, matrix);\n }\n __cacheTotal.__isNew = false;\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n }\n }\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 {\n [STRUCT_TOTAL]: total,\n } = __structs[start];\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 gl\n * @param texCache\n * @param node\n * @param __config\n * @param index\n * @param total\n * @param __structs\n * @param cache\n * @param limitCache\n * @param hasMbm\n * @param W\n * @param H\n * @returns {*}\n */\nfunction genTotalWebgl(gl, texCache, node, __config, index, total, __structs, cache, limitCache, hasMbm, 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.WEBGL, 0, gl, NA, 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 [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let __config = node.__config;\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, __config[NODE_CACHE], opacity, matrix, cx, cy, dx, dy, false);\n }\n // 再看total缓存/cache,都没有的是无内容的Xom节点\n else {\n let {\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_IS_MASK]: isMask,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n [MIX_BLEND_MODE]: mixBlendMode,\n },\n } = __config;\n if(display === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n continue;\n }\n // mask和不可见不能被汇总到top上\n if((visibility === 'hidden' || isMask) && !node.hookGlRender) {\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) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n }\n }\n // webgl特殊的外部钩子,比如粒子组件自定义渲染时调用\n if(node.hookGlRender) {\n node.hookGlRender(gl, opacity, matrix, cx, cy, dx, dy, false);\n }\n }\n }\n if(node.hookGlRender) {\n node.hookGlRender(gl, 1, null, cx, cy, dx, dy, false);\n }\n // 绘制到fbo的纹理对象上并删除fbo恢复\n texCache.refresh(gl, cx, cy);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.viewport(0, 0, W, H);\n gl.deleteFramebuffer(frameBuffer);\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, __config, 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 [NODE_COMPUTED_STYLE]: {\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n },\n } = __config;\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 {\n [STRUCT_INDEX]: index,\n [STRUCT_TOTAL]: total,\n } = item.__config[NODE_STRUCT];\n // 可以忽略mbm,因为只有透明遮罩\n for(let i = index, len = index + (total || 0) + 1; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let __config = node.__config;\n let {\n [NODE_CACHE]: __cache,\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_LIMIT_CACHE]: limitCache,\n } = __config;\n // 跳过display:none元素和它的所有子节点和mask\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\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 [NODE_CACHE]: __cache,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_COMPUTED_STYLE]: {\n [OPACITY]: opacity,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n },\n } = __config;\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) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\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.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 [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let {\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_DEFS_CACHE]: defsCache,\n } = node.__config;\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 defsCache.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 lastConfig;\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n [STRUCT_LV]: lv,\n } = __structs[i];\n let __config = node.__config;\n let {\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_DEFS_CACHE]: defsCache,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = __config;\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][STRUCT_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(lastConfig[NODE_MATRIX]);\n let vd = lastConfig[NODE_VIRTUAL_DOM];\n vdList.push(vd);\n parentVd = vd;\n }\n lastConfig = __config;\n let virtualDom;\n // svg小刷新等级时直接修改vd,这样Geom不再感知\n if(refreshLevel < REPAINT && !(node instanceof Text)) {\n __config[NODE_REFRESH_LV] = NONE;\n virtualDom = __config[NODE_VIRTUAL_DOM];\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 = __config[NODE_VIRTUAL_DOM] = 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 {\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_CACHE_STYLE]: __cacheStyle,\n } = __config;\n if(contain(refreshLevel, TRANSFORM_ALL)) {\n let matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n // 恶心的v8性能优化\n let m = __config[NODE_MATRIX];\n assignMatrix(m, 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 // 恶心的v8性能优化\n m = __config[NODE_MATRIX_EVENT];\n assignMatrix(m, matrix);\n }\n if(contain(refreshLevel, OP)) {\n let opacity = computedStyle[OPACITY] = currentStyle[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 = node.__calFilter(currentStyle, computedStyle);\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] = currentStyle[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 __config[NODE_DEFS_CACHE] && __config[NODE_DEFS_CACHE].splice(0);\n node.render(renderMode, refreshLevel, ctx, NA, 0, 0);\n virtualDom = __config[NODE_VIRTUAL_DOM];\n // 渲染后更新取值\n display = computedStyle[DISPLAY];\n if(display === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += hasMask;\n }\n }\n }\n /**\n * mask会在join时过滤掉,这里将假设正常渲染的vd的内容获取出来组成defs的mask内容\n * 另外最初遍历时记录了会影响的mask,在=REPAINT始终重新设置\n * 本身有matrix也需要重设\n */\n if(maskHash.hasOwnProperty(i) && (maskEffectHash.hasOwnProperty(i) || refreshLevel >= REPAINT || contain(refreshLevel, TRANSFORM_ALL | OP))) {\n let { index, start, end, isClip } = maskHash[i];\n let target = __structs[index];\n let dom = target[STRUCT_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][STRUCT_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 = defsCache.length - 1; i >= 0; i--) {\n let item = defsCache[i];\n if(item.tagName === 'mask') {\n defsCache.splice(i, 1);\n }\n }\n let o = {\n tagName: 'mask',\n props: [],\n children: mChildren,\n };\n let id = ctx.add(o);\n defsCache.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 = __config[NODE_MATRIX];\n parentVd = virtualDom;\n }\n lastLv = lv;\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 matrixList = [];\n let parentMatrix;\n let opacityList = [];\n let parentOpacity = 1;\n let pmList = [];\n let parentPm;\n let lastRefreshLevel;\n let lastConfig;\n let lastLv = 0;\n let mergeList = [];\n let hasMbm; // 是否有混合模式出现\n /**\n * 先一遍先序遍历每个节点绘制到自己__cache上,排除Text和已有的缓存以及局部根缓存,\n * 根据refreshLevel进行等级区分,可能是=REPAINT,REFLOW布局已前置处理完。\n * 首次绘制没有catchTotal等,后续则可能会有,在= REPAINT) {\n node.render(renderMode, REPAINT, gl, SELF, 0, 0);\n }\n continue;\n }\n let __config = node.__config;\n let refreshLevel = __config[NODE_REFRESH_LV];\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,Root节点是第一个特殊处理\n if(i === 0) {}\n else if(lv > lastLv) {\n parentMatrix = lastConfig[NODE_MATRIX_EVENT];\n if(isE(parentMatrix)) {\n parentMatrix = null;\n }\n matrixList.push(parentMatrix);\n parentOpacity = lastConfig[NODE_OPACITY];\n opacityList.push(parentOpacity);\n parentPm = lastConfig[NODE_PERSPECTIVE_MATRIX];\n if(isE(parentPm)) {\n parentPm = null;\n }\n pmList.push(parentPm);\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 pmList.splice(-diff);\n parentPm = pmList[lv - 1];\n }\n // 不变是同级兄弟,无需特殊处理 else {}\n lastRefreshLevel = refreshLevel;\n lastConfig = __config;\n lastLv = lv;\n let {\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = __config;\n // 跳过display:none元素和它的所有子节点\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n // 只跳过自身不能跳过后面的mask,mask要渲染自身并进行缓存cache,以备对象切换display用\n continue;\n }\n let hasRecordAsMask;\n /**\n * lv=REPAINT那里,小变化不动\n * 当有遮罩时,如果被遮罩节点本身无变更,需要检查其next的遮罩节点有无变更,\n * 但其实不用检查,因为next变更一定会清空cacheMask,只要检查cacheMask即可\n * 如果没有或无效,直接添加,无视节点本身变化,后面防重即可\n */\n if(refreshLevel < REPAINT) {\n __config[NODE_REFRESH_LV] = NONE;\n let {\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_CACHE_STYLE]: __cacheStyle,\n [NODE_MATRIX_EVENT]: matrixEvent,\n } = __config;\n if(contain(refreshLevel, PPT)) {\n node.__calPerspective(__cacheStyle, currentStyle, computedStyle, __config);\n }\n // transform变化,父元素的perspective变化也会在Root特殊处理重新计算\n let matrix;\n if(contain(refreshLevel, TRANSFORM_ALL)) {\n matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n assignMatrix(__config[NODE_MATRIX], matrix);\n }\n else {\n matrix = __config[NODE_MATRIX];\n }\n // 先左乘perspective的矩阵,再左乘父级的总矩阵\n if(parentPm) {\n matrix = multiply(parentPm, matrix);\n }\n if(parentMatrix) {\n matrix = multiply(parentMatrix, matrix);\n }\n // 恶心的v8性能优化\n assignMatrix(matrixEvent, matrix);\n let opacity;\n if(contain(refreshLevel, OP)) {\n opacity = computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n else {\n opacity = computedStyle[OPACITY];\n }\n __config[NODE_OPACITY] = parentOpacity * opacity;\n // filter会改变bbox范围\n if(contain(refreshLevel, FT)) {\n node.__bbox = null;\n node.__filterBbox = null;\n node.__calFilter(currentStyle, computedStyle);\n }\n if(contain(refreshLevel, MBM)) {\n computedStyle[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE];\n }\n // total可以跳过所有孩子节点省略循环,filter/mask等的强制前提是有total\n if(__cacheTotal && __cacheTotal.available) {\n i += (total || 0);\n }\n }\n /**\n * >=REPAINT重新渲染,并根据结果判断是否离屏限制错误\n * Geom没有子节点无需汇总局部根,Dom中Img也是,它们的局部根等于自身的cache,其它符合条件的Dom需要生成\n */\n else {\n let res = node.render(renderMode, refreshLevel, gl, SELF, 0, 0);\n // geom可返回texture纹理,替代原有xom的__cache纹理\n if(res && inject.isWebGLTexture(res.texture)) {\n let { __sx1: sx1, __sy1: sy1, offsetWidth: w, offsetHeight: h, bbox } = node;\n __config[NODE_CACHE] = new MockCache(gl, res.texture, sx1, sy1, w, h, bbox);\n gl.viewport(0, 0, width, height);\n gl.useProgram(gl.program);\n }\n }\n // 每个元素检查cacheTotal生成,已有的上面会continue跳过\n let {\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_CACHE_AS_BITMAP]: cacheAsBitmap,\n } = __config;\n let {\n [OVERFLOW]: overflow,\n [FILTER]: filter,\n [MIX_BLEND_MODE]: mixBlendMode,\n [TRANSFORM]: transform,\n } = computedStyle;\n let validMbm = isValidMbm(mixBlendMode);\n // 3d渲染上下文\n let isPerspective = tf.isPerspectiveMatrix(transform) || parentPm;\n if(cacheAsBitmap || hasMask || filter.length || (overflow === 'hidden' && total) || validMbm || isPerspective) {\n if(validMbm) {\n hasMbm = true;\n }\n if(hasRecordAsMask) {\n hasRecordAsMask[5] = limitCache;\n hasRecordAsMask[7] = filter;\n hasRecordAsMask[8] = overflow;\n hasRecordAsMask[9] = isPerspective;\n hasRecordAsMask[10] = cacheAsBitmap;\n }\n else {\n mergeList.push([i, lv, total, node, __config, limitCache, hasMask, filter, overflow, isPerspective, cacheAsBitmap]);\n }\n }\n }\n let limitHash = {};\n // 根据收集的需要合并局部根的索引,尝试合并,按照层级从大到小,索引从大到小的顺序,\n // 这样保证子节点在前,后节点在前,后节点是为了mask先应用自身如filter之后再进行遮罩\n if(mergeList.length) {\n mergeList.sort(function(a, b) {\n if(a[1] === b[1]) {\n return b[0] - a[0];\n }\n return b[1] - a[1];\n });\n // ppt只有嵌套才需要生成,最下面的孩子节点的ppt无需,因此记录一个hash存index,\n // 同时因为是后序遍历,孩子先存所有父亲的index即可保证父亲才能生成cacheTotal\n let pptHash = {};\n mergeList.forEach(item => {\n let [i, lv, total, node, __config, limitCache, hasMask, filter, overflow, isPerspective, cacheAsBitmap] = item;\n // 有ppt的,向上查找所有父亲index记录,可能出现重复记得提前跳出\n if(isPerspective) {\n let parent = __config[NODE_DOM_PARENT];\n while(parent) {\n let config = parent.__config;\n let idx = config[NODE_STRUCT][STRUCT_INDEX];\n if(pptHash[idx]) {\n break;\n }\n if(tf.isPerspectiveMatrix(config[NODE_MATRIX]) || config[NODE_PERSPECTIVE_MATRIX]) {\n pptHash[idx] = true;\n }\n parent = config[NODE_DOM_PARENT];\n }\n if(!pptHash[i] && !hasMask && !filter.length && overflow !== 'hidden' && !cacheAsBitmap) {\n return;\n }\n }\n let {\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n } = __config;\n let needGen;\n // 可能没变化,比如被遮罩节点、filter变更等\n if(!__cacheTotal || !__cacheTotal.available) {\n let [limit, res] = genTotalWebgl(gl, texCache, node, __config, i, total || 0, __structs, __cache, limitCache, hasMbm, width, height);\n __cacheTotal = res;\n needGen = true;\n limitCache = limit;\n // 返回的limit包含各种情况超限,一旦超限,只能生成临时cacheTotal不能保存\n if(!limitCache) {\n __config[NODE_CACHE_TOTAL] = 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 __config[NODE_CACHE_OVERFLOW] = target;\n }\n }\n }\n else {\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 __config[NODE_CACHE_FILTER] = target;\n }\n }\n }\n else {\n target = __cacheFilter;\n }\n }\n if(hasMask && (!__cacheMask || !__cacheMask.available || needGen)) {\n target = genMaskWebgl(gl, texCache, node, __config, target, width, height, lv, __structs);\n if(!limitCache) {\n __config[NODE_CACHE_MASK] = 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 [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let __config = node.__config;\n // text如果display不可见,parent会直接跳过,不会走到这里,这里一定是直接绘制到root的,visibility在其内部判断\n if(node instanceof Text) {\n // text特殊之处,__config部分是复用parent的\n let {\n [NODE_CACHE]: __cache,\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_DOM_PARENT]: {\n __config: {\n [NODE_MATRIX_EVENT]: matrixEvent,\n [NODE_OPACITY]: opacity,\n },\n },\n } = __config;\n if(__cache && __cache.available) {\n texCache.addTexAndDrawWhenLimit(gl, __cache, opacity, matrixEvent, cx, cy, 0, 0,true);\n }\n // 超限特殊处理,先生成画布尺寸大小的纹理然后原始位置绘制\n else if(limitCache) {\n let c = inject.getCacheCanvas(width, height, '__$$OVERSIZE$$__');\n node.render(renderMode, 0, gl, NA, 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, 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 {\n [NODE_OPACITY]: opacity,\n [NODE_MATRIX_EVENT]: matrixEvent,\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [MIX_BLEND_MODE]: mixBlendMode,\n },\n } = __config;\n if(display === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n continue;\n }\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, matrixEvent, 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, matrixEvent, cx, cy, 0, 0, true);\n }\n if(target !== __cache) {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\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, matrixEvent, 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, matrixEvent, cx, cy, 0, 0, true);\n }\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n }\n // 超限的情况,这里是普通单节点超限,没有合成total后再合成特殊cache如filter/mask/mbm之类的,\n // 直接按原始位置绘制到离屏canvas,再作为纹理绘制即可,特殊的在total那做过降级了\n else if(limitCache && display !== 'none' && visibility !== 'hidden') {\n let c = inject.getCacheCanvas(width, height, '__$$OVERSIZE$$__');\n node.render(renderMode, refreshLevel, gl, NA, 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, 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 // webgl特殊的外部钩子,比如粒子组件自定义渲染时调用\n if(node.hookGlRender) {\n node.hookGlRender(gl, opacity, matrixEvent, cx, cy, 0, 0, true);\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 [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n // 排除Text,要么根节点直接绘制,要么被局部根节点汇总,自身并不缓存(fillText比位图更快)\n if(node instanceof Text) {\n continue;\n }\n let __config = node.__config;\n let {\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_CACHE_AS_BITMAP]: cacheAsBitmap,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = __config;\n if(refreshLevel >= REPAINT) {\n node.__calCache(renderMode, ctx, __config[NODE_DOM_PARENT],\n __config[NODE_CACHE_STYLE], __config[NODE_CURRENT_STYLE], computedStyle,\n node.clientWidth, node.clientHeight, node.offsetWidth, node.offsetHeight,\n computedStyle[BORDER_TOP_WIDTH], computedStyle[BORDER_RIGHT_WIDTH],\n computedStyle[BORDER_BOTTOM_WIDTH], computedStyle[BORDER_LEFT_WIDTH],\n computedStyle[PADDING_TOP], computedStyle[PADDING_RIGHT],\n computedStyle[PADDING_BOTTOM], computedStyle[PADDING_LEFT],\n node.__sx1, node.__sx2, node.__sx3, node.__sx4, node.__sx5, node.__sx6,\n node.__sy1, node.__sy2, node.__sy3, node.__sy4, node.__sy5, node.__sy6);\n }\n if(cacheAsBitmap) {\n // 跳过display:none元素和它的所有子节点\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n continue;\n }\n mergeList.push([i, lv, total, node, __config, hasMask]);\n }\n }\n /**\n * 根据收集的需要合并局部根的索引,尝试合并,按照层级从大到小,索引从大到小的顺序,\n * 这样保证子节点在前,后节点在前(mask在后面),渲染顺序正确\n */\n if(mergeList.length) {\n mergeList.sort(function(a, b) {\n if(a[1] === b[1]) {\n return b[0] - a[0];\n }\n return b[1] - a[1];\n });\n mergeList.forEach(item => {\n let [i, lv, total, node, __config, hasMask] = item;\n genTotal(renderMode, node, __config, i, lv, total || 0, __structs, hasMask, width, height);\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 [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n // text如果display不可见,parent会直接跳过,不会走到这里,这里一定是直接绘制到root的,visibility在其内部判断\n if(node instanceof Text) {\n node.render(renderMode, REPAINT, ctx, NA, 0, 0);\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n }\n else {\n let __config = node.__config;\n let {\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [MIX_BLEND_MODE]: mixBlendMode,\n [OPACITY]: opacity,\n },\n } = __config;\n // 遮罩对象申请了个离屏,其第一个mask申请另外一个离屏mask2,开始聚集所有mask元素的绘制,\n // 这是一个十分特殊的逻辑,保存的index是最后一个节点的索引,OFFSCREEN_MASK2是最低优先级,\n // 这样当mask本身有filter时优先自身,然后才是OFFSCREEN_MASK2\n if(maskStartHash.hasOwnProperty(i)) {\n let [idx, n, 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(--n) {\n let { [STRUCT_TOTAL]: total } = __structs[j];\n j += (total || 0) + 1;\n }\n j--;\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([idx, lv, OFFSCREEN_MASK, offscreenMask]);\n list.push([j, lv, OFFSCREEN_MASK2, {\n ctx, // 保存等待OFFSCREEN_MASK2时还原\n target,\n }]);\n ctx = target.ctx;\n }\n // 有cache声明从而有total的可以直接绘制并跳过子节点索,total生成可能会因超限而失败\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal]);\n if(target) {\n let j = i;\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n // total的none直接跳过\n if(display === 'none') {\n continue;\n }\n if(isValidMbm(mixBlendMode)) {\n ctx.globalCompositeOperation = mbmName(mixBlendMode);\n }\n else {\n ctx.globalCompositeOperation = 'source-over';\n }\n // cache需要计算matrixEvent,因为局部根节点临时视为E,根据refreshLevel决定\n let matrix = __config[NODE_MATRIX], matrixEvent = __config[NODE_MATRIX_EVENT];\n let old = matrixEvent.slice(0);\n let parentMatrix = __config[NODE_DOM_PARENT].matrixEvent;\n if(parentMatrix && !isE(parentMatrix)) {\n matrix = multiply(parentMatrix, matrix);\n }\n util.assignMatrix(matrixEvent, matrix);\n Cache.draw(ctx, opacity, matrixEvent, target);\n // total应用后记得设置回来\n ctx.globalCompositeOperation = 'source-over';\n // 父超限但子有total的时候,i此时已经增加到了末尾,也需要检查\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n // 有cache的可以跳过子节点,但如果matrixEvent变化还是需要遍历计算一下的,虽然跳过了渲染\n // 如果cache是新的,则需要完整遍历设置一次\n // 如果isNew为false,则计算下局部根节点再对比下看是否有变化,无变化可省略\n let needReset = __cacheTotal.isNew;\n if(!needReset && !util.equalArr(old, matrixEvent)) {\n needReset = true;\n }\n if(needReset) {\n resetMatrixCacheTotal(__structs, j, total || 0, lv, matrixEvent);\n }\n __cacheTotal.__isNew = false;\n }\n // 没有cacheTotal是普通节点绘制\n else {\n let res = node.render(renderMode, refreshLevel, ctx, NA, 0, 0);\n let { offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow } = res || {};\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_BLEND, offscreenBlend]);\n ctx = offscreenBlend.target.ctx;\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n // 最后一个遮罩索引因数量不好计算,放在maskStartHash做\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = [i, hasMask, offscreenMask];\n ctx = offscreenMask.target.ctx;\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_FILTER, offscreenFilter]);\n ctx = offscreenFilter.target.ctx;\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_OVERFLOW, offscreenOverflow]);\n ctx = offscreenOverflow.target.ctx;\n }\n // 离屏应用,按照lv从大到小即子节点在前先应用,同一个节点多个效果按offscreen优先级从小到大来,\n // 由于mask特殊索引影响,所有离屏都在最后一个mask索引判断,此时mask本身优先结算,以index序大到小判断\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n // render后判断可见状态,此时computedStyle才有值,none可以忽略渲染,但是可能会跳过offscreenHash预置的索引\n if(display === 'none') {\n let add = (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n for(let j = i + 1; j <= i + add; j++) {\n if(offscreenHash.hasOwnProperty(j)) {\n ctx = applyOffscreen(ctx, offscreenHash[j], width, height);\n }\n }\n i += add;\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 Xom from './Xom';\nimport Component from './Component';\nimport Defs from './Defs';\nimport Geom from './geom/Geom';\nimport builder from '../util/builder';\nimport updater from '../util/updater';\nimport util from '../util/util';\nimport domDiff from '../util/diff';\nimport css from '../style/css';\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 MARGIN_TOP,\n MARGIN_LEFT,\n MARGIN_BOTTOM,\n PADDING_TOP,\n PADDING_LEFT,\n PADDING_BOTTOM,\n BORDER_TOP_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n POINTER_EVENTS,\n WRITING_MODE,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_STYLE,\n UPDATE_KEYS,\n UPDATE_COMPONENT,\n UPDATE_FOCUS,\n UPDATE_OVERWRITE,\n UPDATE_LIST,\n UPDATE_CONFIG,\n UPDATE_ADD_DOM,\n UPDATE_REMOVE_DOM,\n },\n NODE_KEY: {\n NODE_TAG_NAME,\n NODE_CACHE_STYLE,\n NODE_CACHE_PROPS,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_CURRENT_PROPS,\n NODE_DOM_PARENT,\n NODE_IS_MASK,\n NODE_REFRESH_LV,\n NODE_IS_DESTROYED,\n NODE_STYLE,\n NODE_UPDATE_HASH,\n NODE_UNIQUE_UPDATE_ID,\n NODE_CACHE,\n NODE_CACHE_TOTAL,\n NODE_CACHE_FILTER,\n NODE_CACHE_OVERFLOW,\n NODE_CACHE_MASK,\n NODE_STRUCT,\n },\n STRUCT_KEY: {\n STRUCT_INDEX,\n STRUCT_TOTAL,\n STRUCT_NODE,\n }\n} = enums;\nconst DIRECTION_HASH = {\n [TOP]: true,\n [RIGHT]: true,\n [BOTTOM]: true,\n [LEFT]: true,\n};\nconst { isNil, isObject, isFunction } = util;\nconst { AUTO, PX, PERCENT, INHERIT } = unit;\nconst { isRelativeOrAbsolute, equalStyle } = css;\nconst { contain, getLevel, isRepaint, NONE, FILTER, PERSPECTIVE, REPAINT, REFLOW, REBUILD } = level;\nconst { isIgnore, 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, 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\n// 提取出对比节点尺寸是否固定非AUTO\nfunction isFixedWidthOrHeight(node, k) {\n let c = node.currentStyle[k];\n return c[1] !== AUTO;\n}\n// 除了固定尺寸,父级也不能是flex或变化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.currentStyle[DISPLAY] === 'flex' || parent.computedStyle[DISPLAY] === 'flex') {\n return false;\n }\n }\n }\n return res;\n}\n\nfunction isLAYOUT(node) {\n return node.hasOwnProperty('__uniqueReflowId');\n}\n\nlet __uniqueReflowId = 0;\nfunction setLAYOUT(node, hash, component, addDom) {\n if(!node.hasOwnProperty('__uniqueReflowId')) {\n node.__uniqueReflowId = __uniqueReflowId;\n hash[__uniqueReflowId++] = {\n node,\n component,\n addDom,\n };\n }\n}\n\n/**\n * 单独提出共用检测影响的函数,从节点本身开始向上分析影响,找到最上层的影响节点设置其重新布局\n * 过程即__checkReflow中所提及的,各种情况\n * 将影响升至最近的父级节点,并添加布局标识,这样后面的深度遍历会以父级为准忽略本身\n * 如果最终是root,则返回true标识,直接整个重新开始布局\n * ====\n * addDom情况下的特殊影响检测,类似checkInfluence\n * 添加的是absolute则只影响自己,大部分交互游戏情况属于此类型优化\n * 添加的是inline/inlineBlock的话,影响最近非inline父节点\n * 父为flex则直接影响父节点,不管添加情况如何\n * 添加block/flex的话,上下都block/flex则只影响自己,否则还是影响父节点\n * 如果最终是root,则返回true标识,直接整个重新开始布局\n * @returns {boolean}\n */\nfunction checkInfluence(root, reflowHash, node, component, addDom) {\n // add情况abs节点特殊对待不影响其它节点,不能判断display,因为inline会强制block\n if(addDom && node.currentStyle[POSITION] === 'absolute') {\n return;\n }\n let target = node;\n // inline新老都影响,节点变为最近的父非inline\n if(['inline', 'inlineBlock'].indexOf(target.currentStyle[DISPLAY]) > -1\n || ['inline', 'inlineBlock'].indexOf(target.computedStyle[DISPLAY]) > -1) {\n do {\n target = target.domParent;\n // 父到root提前跳出\n if(target === root) {\n return true;\n }\n // 父已有LAYOUT跳出防重\n if(isLAYOUT(target)) {\n return;\n }\n // 遇到absolute跳出,设置其布局;如果absolute不变化普通处理,如果absolute发生变化,一定会存在于列表中,不用考虑\n if(target.currentStyle[POSITION] === 'absolute' || target.computedStyle[POSITION] === 'absolute') {\n setLAYOUT(target, reflowHash, component, addDom);\n return;\n }\n }\n while(target && (['inline', 'inlineBlock'].indexOf(target.currentStyle[DISPLAY]) > -1\n || ['inline', 'inlineBlock'].indexOf(target.computedStyle[DISPLAY]) > -1));\n // target已不是inline,父固定宽高跳出直接父进行LAYOUT即可,不影响上下文,但不能是flex孩子,此时固定尺寸无用\n if(isFixedSize(target, true)) {\n setLAYOUT(target, reflowHash, component, addDom);\n return;\n }\n }\n // 此时target指向node,如果原本是inline则是其flow的非inline父\n let parent = target.domParent;\n // parent有LAYOUT跳出,已被包含\n if(isLAYOUT(parent)) {\n return;\n }\n // 向上检查flex,如果父级中有flex,以最上层的flex视作其更改,node本身flex不进入\n let topFlex;\n do {\n // 父已有LAYOUT跳出防重\n if(isLAYOUT(parent)) {\n return;\n }\n // flex相关,包含变化或不变化\n if(parent.computedStyle[DISPLAY] === 'flex' || parent.currentStyle[DISPLAY] === 'flex') {\n topFlex = parent;\n }\n // 遇到absolute跳出,如果absolute不变化普通处理,如果absolute发生变化,一定会存在于列表中,不用考虑\n if(parent.currentStyle[POSITION] === 'absolute' || parent.computedStyle[POSITION] === 'absolute') {\n break;\n }\n // 父固定宽高跳出\n if(isFixedSize(parent, true)) {\n break;\n }\n parent = parent.domParent;\n }\n while(parent);\n // 找到最上层flex,视作其更改\n if(topFlex) {\n target = topFlex;\n }\n if(target === root) {\n return true;\n }\n parent = target;\n // 向上检查非固定尺寸的absolute,找到则视为其变更,上面过程中一定没有出现absolute\n while(parent) {\n // 无论新老absolute,不变化则设置,变化一定会出现在列表中\n if(parent.currentStyle[POSITION] === 'absolute' || parent.computedStyle[POSITION] === 'absolute') {\n if(parent === root) {\n break;\n }\n // 固定尺寸的不用设置,需要跳出循环\n if(isFixedSize(parent)) {\n break;\n }\n else {\n setLAYOUT(parent, reflowHash, component, addDom);\n return;\n }\n }\n parent = parent.domParent;\n }\n // 向上查找了并且没提前跳出的target如果不等于自身则重新布局,自身外面设置过了\n if(target !== node) {\n setLAYOUT(target, reflowHash, component, addDom);\n }\n else if(addDom) {\n // 前后必须都是block,否则还是视为父布局\n let isSiblingBlock = true;\n let { prev, next } = node;\n if(prev && ['inline', 'inlineBlock'].indexOf(prev.currentStyle[DISPLAY]) > -1) {\n isSiblingBlock = false;\n }\n else if(next && ['inline', 'inlineBlock'].indexOf(next.currentStyle[DISPLAY]) > -1) {\n isSiblingBlock = false;\n }\n if(!isSiblingBlock) {\n target = node.domParent;\n if(target === root) {\n return true;\n }\n setLAYOUT(target, reflowHash, false, true);\n }\n }\n}\n\nlet uniqueUpdateId = 0;\nfunction parseUpdate(renderMode, root, target, reflowList, cacheHash, cacheList, zHash, zList) {\n let {\n [UPDATE_NODE]: node,\n [UPDATE_STYLE]: style,\n [UPDATE_OVERWRITE]: overwrite,\n [UPDATE_FOCUS]: focus,\n [UPDATE_COMPONENT]: component,\n [UPDATE_LIST]: list,\n [UPDATE_KEYS]: keys,\n [UPDATE_CONFIG]: __config,\n [UPDATE_ADD_DOM]: addDom,\n [UPDATE_REMOVE_DOM]: removeDom,\n } = target;\n if(__config[NODE_IS_DESTROYED]) {\n return;\n }\n // updateStyle()这样的调用需要覆盖原有样式,因为是按顺序遍历,后面的优先级自动更高不怕重复\n if(overwrite) {\n Object.assign(__config[NODE_STYLE], overwrite);\n }\n // 多次调用更新才会有list,一般没有,优化;component无需,因为多次都是它自己\n if(list && !component) {\n keys = (keys || []).slice(0); // 防止原始值被更改\n let hash = {};\n keys.forEach(k => {\n hash[k] = true;\n });\n list.forEach(item => {\n let { [UPDATE_STYLE]: style2, [UPDATE_OVERWRITE]: overwrite, [UPDATE_KEYS]: keys2 } = item;\n (keys2 || []).forEach(k2 => {\n if(!hash.hasOwnProperty(k2)) {\n hash[k2] = true;\n keys.push(k2);\n }\n });\n if(overwrite) {\n Object.assign(__config[NODE_STYLE], overwrite);\n }\n if(style2) {\n if(style) {\n Object.assign(style, style2);\n }\n else {\n style = style2;\n }\n }\n });\n }\n // 按节点合并完style后判断改变等级\n let {\n [NODE_TAG_NAME]: tagName,\n [NODE_CACHE_STYLE]: __cacheStyle,\n [NODE_CACHE_PROPS]: __cacheProps,\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_CURRENT_PROPS]: currentProps,\n [NODE_DOM_PARENT]: domParent,\n [NODE_IS_MASK]: isMask,\n } = __config;\n let lv = focus || NONE;\n let hasZ, hasVisibility, hasColor, hasDisplay, hasTsColor, hasTsWidth, hasTsOver;\n // component无需遍历直接赋值,img重新加载等情况没有样式更新\n if(!component && style && keys) {\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n let v = style[k];\n // 只有geom的props和style2种可能\n if(node instanceof Geom && isGeom(tagName, k)) {\n if(!equalStyle(k, v, currentProps[k], node)) {\n lv |= REPAINT;\n __cacheProps[k] = undefined;\n currentProps[k] = v;\n }\n }\n else {\n // 需和现在不等,且不是pointerEvents这种无关的\n if(!equalStyle(k, v, currentStyle[k], node)) {\n // pointerEvents这种无关的只需更新\n if(isIgnore(k)) {\n __cacheStyle[k] = undefined;\n currentStyle[k] = v;\n }\n else {\n // TRBL变化只对relative/absolute起作用,其它忽视\n if(DIRECTION_HASH.hasOwnProperty(k)) {\n let position = currentStyle[POSITION];\n if(position !== 'relative' && position !== 'absolute') {\n delete style[k];\n continue;\n }\n }\n else if(k === DISPLAY) {\n hasDisplay = true;\n }\n // repaint细化等级,reflow在checkReflow()\n lv |= getLevel(k);\n // repaint置空,如果reflow会重新生成空的\n __cacheStyle[k] = undefined;\n currentStyle[k] = v;\n if(k === Z_INDEX && node !== root) {\n hasZ = true;\n }\n else if(k === VISIBILITY) {\n hasVisibility = true;\n }\n else if(k === COLOR) {\n hasColor = true;\n }\n else if(k === TEXT_STROKE_COLOR) {\n hasTsColor = true;\n }\n else if(k === TEXT_STROKE_WIDTH) {\n hasTsWidth = true;\n }\n else if(k === TEXT_STROKE_OVER) {\n hasTsOver = true;\n }\n }\n }\n }\n }\n }\n // 无任何改变处理的去除记录,如pointerEvents、无效的left\n // 但是perspective需考虑进来,虽然不影响自己但影响别人,要返回true表明有变更\n if(lv === NONE && !component) {\n delete __config[NODE_UNIQUE_UPDATE_ID];\n return;\n }\n // 由于父节点中有display:none,或本身节点也为none,执行普通动画是无效的,此时没有display变化\n if(computedStyle[DISPLAY] === 'none' && !hasDisplay) {\n return;\n }\n // 记录下来清除parent的zIndexChildren缓存\n if(hasZ && domParent) {\n delete domParent.__zIndexChildren;\n }\n // 影响子继承REPAINT的变化,如果被cache住需要清除\n if(hasVisibility || hasColor || hasTsColor || hasTsWidth || hasTsOver) {\n for(let __structs = root.__structs, __struct = node.__config[NODE_STRUCT], i = __struct[STRUCT_INDEX] + 1, len = i + __struct[STRUCT_TOTAL]; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n } = __structs[i];\n // text的style指向parent,不用管\n if(node instanceof Text) {\n continue;\n }\n let __config = node.__config;\n let currentStyle = __config[NODE_CURRENT_STYLE];\n let need;\n if(hasVisibility && currentStyle[VISIBILITY][1] === INHERIT) {\n need = true;\n }\n else if(hasColor && currentStyle[COLOR][1] === INHERIT) {\n need = true;\n }\n else if(hasTsColor && currentStyle[TEXT_STROKE_COLOR][1] === INHERIT) {\n need = true;\n }\n else if(hasTsWidth && currentStyle[TEXT_STROKE_WIDTH][1] === INHERIT) {\n need = true;\n }\n else if(hasTsOver && currentStyle[TEXT_STROKE_OVER][1] === INHERIT) {\n need = true;\n }\n if(need) {\n __config[NODE_REFRESH_LV] |= REPAINT;\n node.clearCache();\n }\n else {\n i += total || 0;\n }\n }\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.__config[NODE_CACHE_MASK]) {\n prev.__config[NODE_CACHE_MASK].release();\n }\n }\n // 特殊情况,父节点display:none,子节点进行任意变更,应视为无效\n // 如果父节点由none变block,这里也return false,因为父节点会重新layout+render\n // 如果父节点由block变none,同上,所以只要current/computed里有none就return false\n let parent = domParent;\n if(hasDisplay && parent) {\n let __config = parent.__config;\n if(__config[NODE_CURRENT_STYLE][DISPLAY] === 'none' || __config[NODE_COMPUTED_STYLE][DISPLAY] === 'none') {\n computedStyle[DISPLAY] = 'none';\n return;\n }\n }\n // reflow/repaint相关的记录下来\n let isRp = !component && isRepaint(lv);\n if(isRp) {\n // zIndex变化需清空svg缓存\n if(hasZ && renderMode === mode.SVG) {\n lv |= REPAINT;\n domParent && cleanSvgCache(domParent);\n }\n // z改变影响struct局部重排,它的数量不会变因此不影响外围,此处先收集,最后统一对局部根节点进行更新\n if(hasZ && !component && zHash) {\n if(domParent && !domParent.hasOwnProperty('__uniqueZId')) {\n zHash[uniqueUpdateId] = true;\n domParent.__uniqueZId = uniqueUpdateId++;\n zList.push(domParent);\n }\n }\n }\n // reflow在root的refresh中做\n else {\n reflowList.push({\n node,\n style,\n component,\n addDom,\n removeDom,\n });\n }\n // 这里也需|运算,每次刷新会置0,但是如果父元素进行继承变更,会在此元素分析前更改,比如visibility,此时不能直接赋值\n __config[NODE_REFRESH_LV] |= lv;\n if(component || addDom || removeDom) {\n root.__rlv = REBUILD;\n }\n else {\n root.__rlv = Math.max(root.__rlv, lv);\n }\n // dom在>=REPAINT时total失效,svg的Geom比较特殊\n let need = lv >= REPAINT || renderMode === mode.SVG && node instanceof Geom;\n if(need) {\n if(__config[NODE_CACHE]) {\n __config[NODE_CACHE].release();\n }\n }\n // perspective也特殊只清空total的cache,和>=REPAINT清空total共用\n if(need || contain(lv, PERSPECTIVE)) {\n if(__config[NODE_CACHE_TOTAL]) {\n __config[NODE_CACHE_TOTAL].release();\n }\n if(__config[NODE_CACHE_MASK]) {\n __config[NODE_CACHE_MASK].release();\n }\n if(__config[NODE_CACHE_OVERFLOW]) {\n __config[NODE_CACHE_OVERFLOW].release();\n }\n }\n // 特殊的filter清除cache\n if((need || contain(lv, FILTER)) && __config[NODE_CACHE_FILTER]) {\n __config[NODE_CACHE_FILTER].release();\n }\n // 向上清除等级>=REPAINT的汇总缓存信息,过程中可能会出现重复,因此节点上记录一个临时标防止重复递归\n while(parent) {\n let __config = parent.__config;\n // 向上查找,出现重复跳出\n if(__config.hasOwnProperty(NODE_UNIQUE_UPDATE_ID)) {\n let id = __config[NODE_UNIQUE_UPDATE_ID];\n if(cacheHash.hasOwnProperty(id)) {\n break;\n }\n cacheHash[id] = true;\n }\n // 没有的需要设置一个标识\n else {\n cacheHash[uniqueUpdateId] = true;\n __config[NODE_UNIQUE_UPDATE_ID] = uniqueUpdateId++;\n cacheList.push(__config);\n }\n let lv = __config[NODE_REFRESH_LV];\n let need = lv >= REPAINT;\n if(need && __config[NODE_CACHE]) {\n __config[NODE_CACHE].release();\n }\n // 前面已经过滤了无改变NONE的,只要孩子有任何改变父亲就要清除\n if(__config[NODE_CACHE_TOTAL]) {\n __config[NODE_CACHE_TOTAL].release();\n }\n if(__config[NODE_CACHE_FILTER]) {\n __config[NODE_CACHE_FILTER].release();\n }\n if(__config[NODE_CACHE_MASK]) {\n __config[NODE_CACHE_MASK].release();\n }\n if(__config[NODE_CACHE_OVERFLOW]) {\n __config[NODE_CACHE_OVERFLOW].release();\n }\n parent = __config[NODE_DOM_PARENT];\n }\n return true;\n}\n\nfunction cleanSvgCache(node, child) {\n let __config = node.__config;\n if(child) {\n __config[NODE_REFRESH_LV] |= REPAINT;\n }\n else {\n __config[NODE_CACHE_TOTAL].release();\n }\n if(Array.isArray(node.children)) {\n node.children.forEach(child => {\n if(child instanceof Component) {\n child = child.shadowRoot;\n }\n if(!(child instanceof Text)) {\n cleanSvgCache(child, true);\n }\n });\n }\n}\n\nlet uuid = 0;\n\nclass Root extends Dom {\n constructor(tagName, props, children) {\n super(tagName, props);\n this.__cd = children || []; // 原始children,再初始化过程中生成真正的dom\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.__taskCp = [];\n this.__ref = {};\n this.__reflowList = [{ node: this }]; // 初始化填自己,第一次布局时复用逻辑完全重新布局\n this.__animateController = new Controller();\n Event.mix(this);\n this.__config[NODE_UPDATE_HASH] = this.__updateHash = {};\n this.__uuid = uuid++;\n this.__rlv = REBUILD; // 每次刷新最大lv\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 += `>${domName}>`;\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);\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.__initProps();\n this.__root = this;\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(null, 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 refresh(cb, isFirst) {\n this.__hookTask = null;\n let { isDestroyed, renderMode, ctx, defs, width, height } = this;\n if(isDestroyed) {\n return;\n }\n defs.clear();\n // 首次递归测量整树的继承,后续更改各自更新机制做,防止每次整树遍历;root检查首次直接做,后续在checkUpdate()中插入\n if(isFirst) {\n this.__checkRoot(renderMode, width, height);\n }\n // 非首次刷新如果没有更新则无需继续\n else if(!this.__checkUpdate(renderMode, ctx, width, height)) {\n return;\n }\n this.__checkReflow(width, height);\n if(renderMode === mode.CANVAS && !this.props.noRender) {\n this.__clear(ctx, renderMode);\n struct.renderCanvas(renderMode, ctx, this);\n }\n // svg的特殊diff需要\n else if(renderMode === mode.SVG && !this.props.noRender) {\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 && !this.props.noRender) {\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 /**\n * 为component的setState更新专门开辟个独立的流水线,root/frame中以taskCp存储更新列表\n * 普通的动画、img加载等都走普通的refresh的task,component走这里,frame中的结构同样\n * 在frame的每帧调用中,先执行普通的动画task,再执行component的task\n * 这样动画执行完后,某个cp的sr及子节点依旧先进行了动画变更,进入__addUpdate()环节\n * 然后此cp再更新sr及子节点,这样会被__addUpdate()添加到尾部,依赖目前浏览器默认实现\n * 上一行cp更新过程中是updater.check()进行的,如果有新老交换且有动画,动画的assigning是true,进行继承\n * root刷新parseUpdate()时,老的sr及子节点先进行,随后新的sr后进行且有component标识,sr子节点不会有更新\n * @param cb\n */\n addRefreshCp(cb) {\n let { taskCp, isDestroyed } = this;\n if(isDestroyed) {\n return;\n }\n // 每次只执行1次\n if(!taskCp.length) {\n let clone;\n frame.__nextFrameCp({\n __before: diff => {\n if(this.isDestroyed) {\n return;\n }\n clone = taskCp.splice(0);\n if(clone.length) {\n clone.forEach(item => {\n item.__before(diff);\n });\n updater.check(this);\n let len = updater.updateList.length;\n if(len) {\n updater.updateList.forEach(cp => {\n let root = cp.root; // 多个root并存时可能cp的引用不相同,需分别获取\n let sr = cp.shadowRoot;\n // 可能返回text,需视为其parentNode\n if(sr instanceof Text) {\n sr = sr.domParent;\n }\n let res = {};\n res[UPDATE_NODE] = sr;\n res[UPDATE_STYLE] = sr.currentStyle;\n res[UPDATE_FOCUS] = REFLOW;\n res[UPDATE_COMPONENT] = cp;\n res[UPDATE_CONFIG] = sr.__config;\n this.__addUpdate(sr, sr.__config, root, root.__config, res);\n });\n }\n }\n },\n __after: diff => {\n if(this.isDestroyed) {\n return;\n }\n clone.forEach(item => {\n item.__after(diff);\n });\n // 触发didUpdate\n updater.did();\n },\n });\n this.__frameHook();\n }\n if(taskCp.indexOf(cb) === -1) {\n taskCp.push(cb);\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] = [width, PX];\n currentStyle[HEIGHT] = [height, 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 * 添加更新入口,按节点汇总更新信息\n * @private\n */\n __addUpdate(node, nodeConfig, root, rootConfig, o) {\n let updateHash = rootConfig[NODE_UPDATE_HASH];\n // root特殊处理,检查变更时优先看继承信息\n if(node === root) {\n updateHash = root.__updateRoot;\n if(updateHash) {\n if(o[UPDATE_FOCUS]) {\n updateHash[UPDATE_FOCUS] |= o[UPDATE_FOCUS];\n }\n // 后续存在新建list上,需增加遍历逻辑\n if(o[UPDATE_STYLE]) {\n let list = updateHash[UPDATE_LIST] = updateHash[UPDATE_LIST] || [];\n list.push({\n [UPDATE_STYLE]: o[UPDATE_STYLE],\n [UPDATE_OVERWRITE]: o[UPDATE_OVERWRITE],\n [UPDATE_KEYS]: o[UPDATE_KEYS],\n });\n }\n }\n else {\n root.__updateRoot = o;\n }\n }\n else if(!nodeConfig.hasOwnProperty(NODE_UNIQUE_UPDATE_ID)) {\n nodeConfig[NODE_UNIQUE_UPDATE_ID] = uniqueUpdateId;\n // 大多数情况节点都只有一次更新,所以优化首次直接存在style上,后续存在list\n updateHash[uniqueUpdateId++] = o;\n }\n else if(updateHash.hasOwnProperty(nodeConfig[NODE_UNIQUE_UPDATE_ID])) {\n let target = updateHash[nodeConfig[NODE_UNIQUE_UPDATE_ID]];\n if(o[UPDATE_FOCUS]) {\n target[UPDATE_FOCUS] |= o[UPDATE_FOCUS];\n }\n // 后续存在新建list上,需增加遍历逻辑\n if(o[UPDATE_STYLE]) {\n let list = target[UPDATE_LIST] = target[UPDATE_LIST] || [];\n list.push({\n [UPDATE_STYLE]: o[UPDATE_STYLE],\n [UPDATE_OVERWRITE]: o[UPDATE_OVERWRITE],\n [UPDATE_KEYS]: o[UPDATE_KEYS],\n });\n }\n }\n else {\n inject.error('Update process miss uniqueUpdateId');\n }\n }\n\n /**\n * 除首次外每次刷新前检查更新列表,计算样式变化,以及测量信息\n * @private\n */\n __checkUpdate(renderMode, ctx, width, height) {\n let root = this;\n let reflowList = [];\n let cacheHash = {};\n let cacheList = [];\n let zHash = {};\n let zList = [];\n let updateRoot = root.__updateRoot;\n let updateHash = root.__updateHash;\n // 给个方式使得外部可以强制刷新\n let hasUpdate = root.__hasRootUpdate;\n root.__hasRootUpdate = false;\n // root更新特殊提前,因为有继承因素\n if(updateRoot) {\n root.__updateRoot = null;\n hasUpdate = parseUpdate(renderMode, root, updateRoot,\n reflowList, cacheHash, cacheList);\n // 此时做root检查,防止root出现继承等无效样式,或者发生resize()\n if(hasUpdate) {\n root.__checkRoot(renderMode, width, height);\n }\n }\n // 汇总处理每个节点,k是递增数字直接循环遍历\n let keys = Object.keys(updateHash);\n for(let i = 0, len = keys.length; i < len; i++) {\n let t = parseUpdate(renderMode, root, updateHash[keys[i]],\n reflowList, cacheHash, cacheList, zHash, zList);\n hasUpdate = hasUpdate || t;\n }\n // 先做一部分reset避免下面measureList干扰,cacheList的是专门收集新增的额外节点\n root.__reflowList = reflowList;\n uniqueUpdateId = 0;\n root.__updateHash = root.__config[NODE_UPDATE_HASH] = {};\n cacheList.forEach(__config => {\n delete __config[NODE_UNIQUE_UPDATE_ID];\n });\n // zIndex改变的汇总修改,防止重复操作,有个注意点,有新增的child时,\n // 会在后面的reflow重新build父节点的struct,这里提前更新会报错,里面进行判断\n zList.forEach(item => {\n if(item.hasOwnProperty('__uniqueZId')) {\n delete item.__uniqueZId;\n item.__updateStruct(root.__structs);\n }\n });\n // 做完清空留待下次刷新重来\n for(let i = 0, len = keys.length; i < len; i++) {\n delete updateHash[keys[i]][UPDATE_CONFIG][NODE_UNIQUE_UPDATE_ID];\n }\n return hasUpdate;\n }\n\n /**\n * 除首次外每次刷新前检查reflow列表,计算需要reflow的节点局部重新布局\n * 当一个元素absolute不变时,其变化不会影响父元素和兄弟元素,直接自己重新局部LAYOUT包含子节点\n * 当absolute发生改变时,其变化会影响父和兄弟,视作父重新布局\n * 当inline变化时,视为其最近block/flex父变化\n * 当block变化时,往上查找最上层flex视为其变化,如不是则影响后面兄弟offset和父resize\n * 当flex变化时,往上查找最上层flex视为其变化,如不是则影响所有递归子节点layout和父resize\n * 以上3种情况向上查找时遇到absolute父均提前跳出,并标记absolute父LAYOUT\n * 上面所有情况即便结束还得额外看是否处于absolute中,是还是标记absolute重新布局\n * 当relative只变化left/top/right/bottom时,自己重新layout\n * 检测节点时记录影响的所有节点,最终形成一棵或n棵局部树\n * 需要重新布局的记作LAYOUT,被兄弟影响只需偏移的记作OFFSET,OFFSET可能会重复变为LAYOUT\n * 上述情况倘若发生包含重复,去掉子树,因子树视为被包含的重新布局\n * 如果有从root开始的,直接重新布局像首次那样即可\n * 如果非root,所有树根按先根顺序记录下来,依次执行局部布局\n * =========================\n * addDom比较特殊,是向已有节点中添加新的节点,检查影响与普通domDiff变化不同\n * @private\n */\n __checkReflow(width, height) {\n let { __reflowList: reflowList } = this;\n if(!reflowList.length) {\n return;\n }\n let root = this;\n let uniqueList = [];\n let hasRoot;\n __uniqueReflowId = 0;\n let reflowHash = {};\n // 遍历检查发生布局改变的节点列表,此时computedStyle还是老的,currentStyle是新的\n for(let i = 0, len = reflowList.length; i < len; i++) {\n let item = reflowList[i];\n let { node, component, addDom, removeDom } = item;\n // root提前跳出,完全重新布局\n if(node === this) {\n hasRoot = true;\n break;\n }\n // 添加时如果是cp则node取sr来布局\n if(addDom && node instanceof Component) {\n node = node.shadowRoot;\n }\n // 每个节点生成唯一的布局识别id存入hash防止重复\n if(!node.hasOwnProperty('__uniqueReflowId')) {\n node.__uniqueReflowId = __uniqueReflowId;\n reflowHash[__uniqueReflowId++] = item;\n }\n // 每个节点都向上检查影响,以及是否从root开始完全重新,remove特殊对待,影响父节点视为普通父节点relay\n if(checkInfluence(root, reflowHash, node, component, addDom)) {\n hasRoot = true;\n if(addDom) {\n this.__zIndexChildren = null;\n }\n break;\n }\n // remove的要特殊对待,因为提前删除了父子兄弟关系,下面deepScan不会出现\n else if(removeDom) {\n uniqueList.push(item);\n }\n }\n __uniqueReflowId = 0;\n this.__reflowList = [];\n // 有root提前跳出\n if(hasRoot) {\n reflow.clearUniqueReflowId(reflowHash);\n let isUpright = this.currentStyle[WRITING_MODE].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 });\n this.__structs = this.__structure(0, 0);\n return true;\n }\n /**\n * 修剪树,自顶向下深度遍历\n * LAYOUT节点作为局部根,其递归子节点无需重复任何操作,直接去重\n * OFFSET节点作为局部根,其递归子节点先执行任何操作,后续根节点再偏移一次\n */\n else {\n this.__deepScan(function(node, options) {\n if(node.hasOwnProperty('__uniqueReflowId')) {\n let o = reflowHash[node.__uniqueReflowId];\n options.uniqueList.push(o);\n // 返回true即可提前结束深度遍历,在reflowHash有记录时提前跳出,子节点交由上面逻辑执行\n return true;\n }\n // reflowHash没有记录则无返回继续递归执行\n }, { uniqueList });\n /**\n * 按顺序执行列表即可,上层LAYOUT先执行且停止递归子节点,上层OFFSET后执行等子节点先LAYOUT/OFFSET\n * 同级按先后顺序排列,过程中记录diff在结束后进行structs更新\n * 这里要注意margin合并的逻辑,因为最终都是block(flex等同),需要进行合并\n * 在处理一个block时,先判断是否是空block,同时看后面紧邻的有没有在uniqueList的下一个\n * 单独空block处理、2个相邻的非block处理直接可以进行判断\n * 中间的空block(即非空block的下一个是空block,且下一个不是最后一个),先记录下来list,合并后一并offset\n * 合并margin和Dom的逻辑一样,抽离共有方法\n **/\n let diffList = [];\n let diffI = 0;\n let mergeOffsetList = [];\n let __uniqueMergeOffsetId = 0;\n uniqueList.forEach(item => {\n let { node, component, addDom, removeDom } = item;\n // 重新layout的w/h数据使用之前parent暂存的,x使用parent,y使用prev或者parent的\n let cps = node.computedStyle, cts = node.currentStyle;\n let zIndex = cps[Z_INDEX], position = cps[POSITION], display = cps[DISPLAY];\n let isLastAbs = position === 'absolute';\n let isNowAbs = cts[POSITION] === 'absolute';\n let isLastNone = display === 'none';\n let isNowNone = cts[DISPLAY] === 'none';\n // none不可见布局无效可以无视\n if(isLastNone && isNowNone) {\n return;\n }\n let parent = node.domParent;\n let { __layoutData: { x, y, h }, width, computedStyle } = parent;\n let current = node;\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 if(ref instanceof Text\n || (ref.computedStyle[POSITION] !== 'absolute' && ref.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 if(!removeDom) {\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 }\n // 找到最上层容器,如果是组件的子节点,以sr为container,sr本身往上找\n let container = node;\n // remove的节点本身无需再次布局\n if(!removeDom) {\n if(isNowAbs) {\n container = container.domParent;\n while(container && container !== root) {\n if(isRelativeOrAbsolute(container)) {\n break;\n }\n // 不能用domParent,必须在组件环境内\n if(container.parent) {\n container = container.parent;\n }\n else if(container.host) {\n break;\n }\n }\n if(!container) {\n container = root;\n }\n // 由setState引发的要检查是cp自身还是更上层,如果cp被abs包含,那么node是cp的父亲,否则node是cp的sr\n // 而这种情况下传cp或node都一样,所以最终统一传node\n parent.__layoutAbs(container, parent.__layoutData, node);\n // 优先判断dom变更\n if(addDom) {\n let arr = parent.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n parent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n return;\n }\n // 前后都是abs无需偏移后面兄弟和parent调整,component变化节点需更新struct\n else if(isLastAbs) {\n if(component) {\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n if((position !== cts[POSITION] && (position === 'static' || cts[POSITION] === 'static'))\n || zIndex !== cts[Z_INDEX]) {\n parent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n }\n }\n else if(isLastNone || isNowNone) {\n node.__zIndexChildren = null;\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n }\n return;\n }\n // 标识flow变abs,可能引发zIndex变更,重设struct和svg\n parent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n }\n // 现在是普通流,不管之前是啥直接布局,排除remove删除的\n else {\n node.__layout({\n x,\n y,\n w: width,\n h,\n }, false, false, false);\n y += node.outerHeight;\n if(component) {\n container = node;\n }\n else {\n container = container.domParent;\n while(container && container !== root) {\n if(isRelativeOrAbsolute(container)) {\n break;\n }\n // 不能用domParent,必须在组件环境内\n if(container.parent) {\n container = container.parent;\n }\n else if(container.host) {\n break;\n }\n }\n }\n if(!container) {\n container = root;\n }\n // 防止geom\n if(node instanceof Dom) {\n node.__layoutAbs(container, {\n x,\n y,\n w: width,\n h,\n });\n }\n }\n }\n\n // 向上查找最近的parent是relative,需再次累加ox/oy,无需继续向上递归,因为parent已经递归包含了\n // 这样node重新布局后再次设置其使用parent的偏移\n let p = node;\n while(p && p !== root) {\n p = p.domParent;\n computedStyle = p.computedStyle;\n if(computedStyle[POSITION] === 'relative') {\n let { ox, oy } = p;\n ox && node.__offsetX(ox);\n oy && node.__offsetY(oy);\n break;\n }\n }\n\n // 向下调整next的flow位置,遇到重复LAYOUT的跳出等待其调用并处理其next,忽视掉abs,margin和abs在merge中做\n if(node.isShadowRoot) {\n node = node.hostRoot;\n }\n let next = node.next;\n while(next && !next.hasOwnProperty('__uniqueReflowId')) {\n if(next.computedStyle[POSITION] === 'absolute') {\n next = next.next;\n continue;\n }\n let { y: oy } = next;\n let diff = y - oy;\n if(diff) {\n while(next && !next.hasOwnProperty('__uniqueReflowId')) {\n let target = next;\n if(target instanceof Component) {\n target = target.shadowRoot;\n }\n let cs = target.computedStyle;\n if(cs[POSITION] !== 'absolute' && cs[DISPLAY] !== 'none') {\n target.__offsetY(diff, true, REPAINT);\n }\n next = next.next;\n }\n }\n break;\n }\n\n // 去重防止abs并记录parent,整个结束后按先序顺序进行margin合并以及偏移,注意忽略有display:none变block同时为absolute的\n if(!parent.hasOwnProperty('__uniqueMergeOffsetId') && !(isNowAbs && isLastNone)) {\n parent.__uniqueMergeOffsetId = __uniqueMergeOffsetId++;\n mergeOffsetList.push(parent);\n }\n\n // add和remove都需父节点重新生成struct,zIndexChildren已在对应api操作的before()侦听做了\n if(addDom || removeDom) {\n let arr = parent.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n }\n // component未知dom变化,所以强制重新struct,text则为其父节点,同时防止zIndex变更影响父节点\n else if(component) {\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n if((position !== cts[POSITION] && (position === 'static' || cts[POSITION] === 'static'))\n || zIndex !== cts[Z_INDEX]) {\n node.domParent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(node.domParent);\n }\n }\n }\n // display有none变化,重置struct和zIndexChildren\n else if(isLastNone || isNowNone) {\n node.__zIndexChildren = null;\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n }\n });\n /**\n * mergeMargin后续调整,记录的是变更节点的父节点,因此每个节点内部直接遍历孩子进行\n * 由于保持先根遍历的顺序,因此会从最上最里的节点开始,先进行margin合并\n * 由于之前忽略掉abs节点,因此再检查直接abs是否要调整\n * 完成后对此父节点的后续兄弟节点进行调整,多次不会干扰影响\n * 然后继续往上循环,直到root结束\n */\n let inDirectAbsList = [];\n mergeOffsetList.forEach(parent => {\n delete parent.__uniqueMergeOffsetId;\n let flowChildren = parent.flowChildren, absChildren = parent.absChildren;\n let mergeMarginBottomList = [], mergeMarginTopList = [];\n let length = flowChildren.length, lastChild;\n let isStart, startIndex, startNode;\n // 遍历flow孩子,从开始变化的节点开始,看变化造成的影响,对其后面节点进行偏移,并统计总偏移量\n for(let i = 0; i < length; i++) {\n let item = flowChildren[i];\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n let isXom = item instanceof Xom;\n // 忽略掉前面没有变更的节点,不能合并\n if(!isStart && isXom) {\n if(item.hasOwnProperty('__uniqueReflowId')) {\n isStart = true;\n startIndex = i;\n startNode = item;\n }\n }\n // 开始变更的节点,至少不是第0个\n let cs = isXom && item.currentStyle;\n let isInline = isXom && cs[DISPLAY] === 'inline';\n let isInlineBlock = isXom && cs[DISPLAY] === 'inlineBlock';\n lastChild = item;\n // 每次循环开始前,这次不是block的话,看之前遗留的,可能是以空block结束,需要特殊处理,单独一个空block也包含\n if((!isXom || isInline || isInlineBlock)) {\n if(mergeMarginBottomList.length && mergeMarginTopList.length && isStart) {\n let diff = reflow.getMergeMargin(mergeMarginTopList, mergeMarginBottomList);\n if(diff) {\n for(let j = Math.max(startIndex, i - mergeMarginBottomList.length + 1); j < length; j++) {\n flowChildren[j].__offsetY(diff, true, REPAINT);\n }\n }\n }\n mergeMarginTopList = [];\n mergeMarginBottomList = [];\n }\n // 和普通布局类似,只是不用重新布局只需处理合并margin再根据差值偏移\n if(isXom && !isInline) {\n let isNone = isXom && cs[DISPLAY] === 'none';\n let isEmptyBlock;\n if(!isNone && item.flowChildren && item.flowChildren.length === 0) {\n let {\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n [HEIGHT]: height,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n } = item.computedStyle;\n // 无内容高度为0的空block特殊情况,记录2个margin下来等后续循环判断处理\n if(paddingTop <= 0 && paddingBottom <= 0 && height <= 0 && borderTopWidth <= 0 && borderBottomWidth <= 0) {\n mergeMarginBottomList.push(marginBottom);\n mergeMarginTopList.push(marginTop);\n isEmptyBlock = true;\n }\n }\n // 空block要留下轮循环看,除非是最后一个,非空本轮处理掉看是否要合并\n if(!isNone && !isEmptyBlock) {\n let { [MARGIN_TOP]: marginTop, [MARGIN_BOTTOM]: marginBottom } = item.computedStyle;\n // 有bottom值说明之前有紧邻的block,任意个甚至空block,自己有个top所以无需判断top\n // 如果是只有紧邻的2个非空block,也被包含在情况内,取上下各1合并\n if(mergeMarginBottomList.length) {\n mergeMarginTopList.push(marginTop);\n if(isStart) {\n let diff = reflow.getMergeMargin(mergeMarginTopList, mergeMarginBottomList);\n // 需要合并的情况,根据记录数和索引向上向下遍历节点设置偏移,同时设置总偏移量供父级使用\n if(diff) {\n for(let j = Math.max(startIndex, i - mergeMarginBottomList.length + 1); j < length; j++) {\n flowChildren[j].__offsetY(diff, true, REPAINT);\n }\n }\n }\n }\n // 同时自己保存bottom,为后续block准备\n mergeMarginTopList = [];\n mergeMarginBottomList = [marginBottom];\n }\n // 最后一个空block当是正正和负负时要处理,正负在outHeight处理了结果是0,最后一个一定有不必判断isStart\n else if(i === length - 1) {\n let diff = reflow.getMergeMargin(mergeMarginTopList, mergeMarginBottomList);\n if(diff) {\n for(let j = Math.max(startIndex, i - mergeMarginBottomList.length + 1); j < length; j++) {\n flowChildren[j].__offsetY(diff, true, REPAINT);\n }\n }\n }\n }\n }\n // 先检查parent的尺寸是否发生了变化,从而决定是否调整next以及向上递归调整\n let cs = parent.currentStyle;\n let height = cs[HEIGHT];\n let isContainer = parent === root || parent.isShadowRoot || cs[POSITION] === 'absolute' || cs[POSITION] === 'relative';\n if(height[1] === AUTO && lastChild) {\n let oldH = parent.height + parent.computedStyle[PADDING_TOP];\n let nowH = lastChild.y + lastChild.outerHeight - parent.y;\n let diff = nowH - oldH;\n // 调整next以及非固定PX的abs,再递归向上\n if(diff) {\n parent.__resizeY(diff, REPAINT);\n let container;\n for(let i = 0, len = absChildren.length; i < len; i++) {\n let item = absChildren[i];\n let { [TOP]: top, [BOTTOM]: bottom, [HEIGHT]: height } = item.currentStyle;\n // 是容器,所有的都调整,不是容器,其偏移是上级parent的某一个,根据情况具体不同\n if(top[1] === AUTO) {\n if(bottom[1] === AUTO) {\n let prev = item.prev;\n while(prev) {\n let target = prev;\n if(target instanceof Component) {\n target = target.shadowRoot;\n }\n let isXom = target instanceof Xom;\n let cs = isXom && target.currentStyle;\n let isAbs = isXom && cs[POSITION] === 'absolute';\n if(!isAbs) {\n let y = target.y + target.outerHeight;\n let d = y - item.y;\n if(d) {\n item.__offsetY(d, true, REPAINT);\n }\n break;\n }\n prev = prev.prev;\n }\n }\n else if(bottom[1] === PX) {\n item.__offsetY(diff, true, REPAINT);\n }\n else if(bottom[1] === PERCENT) {\n let v = (1 - bottom[0] * 0.01) * diff;\n item.__offsetY(v, true, REPAINT);\n }\n }\n else if(top[1] === PERCENT) {\n if(isContainer) {\n let v = top[0] * 0.01 * diff;\n item.__offsetY(v, true, REPAINT);\n }\n // 非容器的特殊处理\n else {\n if(!container) {\n container = parent.domParent;\n while(container) {\n if(container === root || container.isShadowRoot) {\n break;\n }\n let cs = container.currentStyle;\n if(cs[POSITION] === 'absolute' || cs[POSITION] === 'relative') {\n break;\n }\n container = container.domParent;\n }\n }\n if(container.currentStyle[HEIGHT][1] !== PX) {\n let v = top[0] * 0.01 * diff;\n item.__offsetY(v, true, REPAINT);\n }\n }\n }\n // 高度百分比需发生变化的重新布局,需要在容器内\n if(height[1] === PERCENT) {\n if(isContainer) {\n parent.__layoutAbs(parent, parent.__layoutData, item);\n }\n // 不在容器内说明在上级,存入等结束后统一重新布局\n else {\n if(!container) {\n container = parent.domParent;\n while(container) {\n if(container === root || container.isShadowRoot) {\n break;\n }\n let cs = container.currentStyle;\n if(cs[POSITION] === 'absolute' || cs[POSITION] === 'relative') {\n break;\n }\n container = container.domParent;\n }\n }\n inDirectAbsList.push([parent, container, item]);\n }\n }\n }\n reflow.offsetAndResizeByNodeOnY(parent, root, reflowHash, diff, inDirectAbsList);\n return;\n }\n }\n // 没有diff变化或者固定尺寸,可能内部发生变化,调整AUTO的abs,不递归向上\n for(let i = 0, len = absChildren.length; i < len; i++) {\n let item = absChildren[i];\n let { [TOP]: top, [BOTTOM]: bottom } = item.currentStyle;\n if(top[1] === AUTO && bottom[1] === AUTO) {\n let prev = item.prev;\n while(prev) {\n let target = prev;\n if(target instanceof Component) {\n target = target.shadowRoot;\n }\n let isXom = target instanceof Xom;\n let cs = isXom && target.currentStyle;\n let isAbs = isXom && cs[POSITION] === 'absolute';\n if(!isAbs) {\n let y = target.y + target.outerHeight;\n let d = y - item.y;\n if(d) {\n item.__offsetY(d, true, REPAINT);\n }\n break;\n }\n prev = prev.prev;\n }\n }\n }\n });\n // merge过程中需要重新布局的abs\n inDirectAbsList.forEach(arr => {\n arr[0].__layoutAbs(arr[1], arr[0].__layoutData, arr[2]);\n });\n\n // 调整因reflow造成的原struct数据索引数量偏差,纯zIndex的已经在repaint里面重新生成过了\n // 这里因为和update保持一致的顺序,因此一定是先根顺序且互不包含\n let diff = 0, lastIndex = 0, isFirst = true, structs = root.__structs;\n diffList.forEach(item => {\n let [ns, d] = item;\n // 第一个有变化的,及后面无论有无变化都需更新\n // 第1个变化区域无需更改前面一段\n if(isFirst) {\n isFirst = false;\n lastIndex = ns[STRUCT_INDEX] + (ns[STRUCT_TOTAL] || 0) + 1;\n diff += d;\n }\n // 第2+个变化区域看是否和前面一个相连,有不变的段则先偏移它,然后再偏移自己\n else {\n let j = ns[STRUCT_INDEX] + (ns[STRUCT_TOTAL] || 0) + 1 + diff;\n for(let i = lastIndex; i < j; i++) {\n structs[i][STRUCT_INDEX] += diff;\n }\n lastIndex = j;\n diff += d;\n }\n });\n // 后面的要根据偏移量校正索引\n if(diff) {\n for(let i = lastIndex, len = structs.length; i < len; i++) {\n structs[i][STRUCT_INDEX] += diff;\n }\n }\n // 清除id\n reflow.clearUniqueReflowId(reflowHash);\n }\n }\n\n // 每个root拥有一个刷新hook,多个root塞到frame的__hookTask里\n // frame在所有的帧刷新逻辑执行后检查hook列表,进行root刷新操作\n __frameHook() {\n if(!this.__hookTask) {\n let r = this.__hookTask = (() => {\n this.refresh();\n });\n frame.__hookTask.push(r);\n }\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 taskCp() {\n return this.__taskCp;\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, lv, ctx, cache, dx2, dy2) {\n let res = super.render(renderMode, lv, ctx, cache, dx2, dy2);\n if(res.break) {\n return res;\n }\n ctx = res.ctx;\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';\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, lv, ctx, cache, dx, dy) {\n let res = super.render(renderMode, lv, ctx, cache, dx, dy);\n if(res.break) {\n return res;\n }\n this.buildCache(res.sx3, res.sy3);\n ctx = res.ctx;\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';\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, lv, ctx, cache, dx2, dy2) {\n let res = super.render(renderMode, lv, ctx, cache, dx2, dy2);\n if(res.break) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n ctx = res.ctx;\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';\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, lv, ctx, cache, dx, dy) {\n let res = super.render(renderMode, lv, ctx, cache, dx, dy);\n if(res.break) {\n return res;\n }\n this.buildCache(res.sx3, res.sy3);\n ctx = res.ctx;\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';\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, lv, ctx, cache, dx, dy) {\n let res = super.render(renderMode, lv, ctx, cache, dx, dy);\n if(res.break) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n ctx = res.ctx;\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';\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, lv, ctx, cache, dx, dy) {\n let res = super.render(renderMode, lv, ctx, cache, dx, dy);\n if(res.break) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n ctx = res.ctx;\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 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 $$type from './util/$$type';\nimport builder from './util/builder';\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 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 return {\n tagName,\n props,\n $$type: $$type.TYPE_GM,\n };\n },\n createCp(klass, props, children = []) {\n props.children = 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 builder,\n updater,\n refresh,\n enums,\n set debug(v) {\n debug.flag = !!v;\n },\n};\n\nbuilder.ref({\n Xom,\n Dom,\n Img,\n Geom,\n Component,\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":["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","s","toLowerCase","replace","$0","$1","toUpperCase","STYLE2UPPER_MAP","style2Upper","$2","STYLE_R_KEY","STYLE_RV_KEY","STYLE_V_KEY","Object","keys","forEach","k","k2","l","UPDATE_KEY","UPDATE_NODE","UPDATE_STYLE","UPDATE_FOCUS","UPDATE_COMPONENT","UPDATE_OVERWRITE","UPDATE_KEYS","UPDATE_LIST","UPDATE_CONFIG","UPDATE_ADD_DOM","UPDATE_REMOVE_DOM","KEY_FRAME_KEY","FRAME_STYLE","FRAME_TIME","FRAME_EASING","FRAME_TRANSITION","NODE_KEY","NODE_DOM_PARENT","NODE_OPACITY","NODE_MATRIX","NODE_MATRIX_EVENT","NODE_CACHE","NODE_CACHE_TOTAL","NODE_CACHE_FILTER","NODE_CACHE_MASK","NODE_CACHE_OVERFLOW","NODE_STRUCT","NODE_TAG_NAME","NODE_CURRENT_STYLE","NODE_CURRENT_PROPS","NODE_COMPUTED_STYLE","NODE_CACHE_STYLE","NODE_CACHE_PROPS","NODE_LIMIT_CACHE","NODE_IS_MASK","NODE_IS_INLINE","NODE_HAS_CONTENT","NODE_REFRESH_LV","NODE_IS_DESTROYED","NODE_STYLE","NODE_UPDATE_HASH","NODE_UNIQUE_UPDATE_ID","NODE_DEFS_CACHE","NODE_PERSPECTIVE_MATRIX","NODE_VIRTUAL_DOM","NODE_CACHE_AS_BITMAP","STRUCT_KEY","STRUCT_NODE","STRUCT_INDEX","STRUCT_CHILD_INDEX","STRUCT_LV","STRUCT_NUM","STRUCT_TOTAL","STRUCT_HAS_MASK","ANIMATE_KEY","I_ASSIGNING","I_IN_FPS","I_IS_DELAY","I_BEGIN","I_END","I_FINISHED","I_NEXT_END","I_FIRST_PLAY","I_PLAY_CB","I_TARGET","I_ROOT","I_FRAMES","I_FRAMES_R","I_CURRENT_TIME","I_NEXT_TIME","I_STYLE","I_DURATION","I_ITERATIONS","I_FILL","I_PLAYBACK_RATE","I_PLAY_COUNT","I_PLAY_STATE","I_DESTROYED","I_START_TIME","I_FPS_TIME","I_EASING","I_ENTER_FRAME","I_DELAY","I_END_DELAY","I_KEYS","I_ORIGIN_STYLE","I_CURRENT_FRAMES","I_CURRENT_FRAME","I_SPF_LIMIT","I_FPS","I_DIRECTION","I_FIRST_ENTER","I_STAY_BEGIN","I_STAY_END","I_IS2","I_END_TIME","I_NODE_CONFIG","I_ROOT_CONFIG","I_OUT_BEGIN_DELAY","I_TIME_STAMP","ELLIPSIS","enums","Node","__x","__y","__ox","__oy","__sx","__sy","__width","__height","__baseline","__verticalBaseline","__config","__prev","__next","__parent","__domParent","__root","__host","__virtualDom","__bbox","__filterBbox","i","lv","j","root","struct","diff","isLayout","x","ox","y","oy","__hostRoot","CANVAS","SVG","WEBGL","o","AUTO","PX","PERCENT","NUMBER","INHERIT","DEG","STRING","RGBA","REM","EM","VW","VH","VMAX","VMIN","GRADIENT","calUnit","v","n","parseFloat","test","TYPE_VD","Symbol","TYPE_GM","TYPE_CP","identity","multiply","a","b","isE","c","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","inv","det","m2m6","point2d","slice","toString","isType","type","obj","call","isObject","isString","isFunction","isNumber","isBoolean","isDate","hasOwn","hasOwnProperty","fnToString","ObjectFunctionString","isNil","joinSourceArray","arr","res","len","item","Array","isArray","stringify","encodeHtml","prop","joinVirtualDom","vd","defs","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","map","Math","floor","max","joinArr","int2invert","arr2hash","hash","list","hash2arr","clone","$$type","util","Date","isPlainObject","equalArr","ai","bi","isArrayA","isArrayB","equal","getTime","extend","target","source","split","extendAnimate","ovd","nvd","__animationList","animationList","splice","__setTarget","assigning","finished","__stayEnd","assignCurrentStyle","__frameAnimateList","transformBbox","bbox","matrix","dx","dy","mx","x1","y1","x2","y2","xa","ya","xb","yb","min","proto","getPrototypeOf","Ctor","constructor","assignMatrix","t","prefixHex","replaceRgba2Hex","$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","draw","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","node","measureImg","url","cb","state","success","task","img","Image","onload","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","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","sqrt","vector","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","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","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","KEY_COLOR","KEY_LENGTH","KEY_GRADIENT","KEY_RADIUS","COLOR_HASH","LENGTH_HASH","RADIUS_HASH","GRADIENT_HASH","GRADIENT_TYPE","linear","radial","conic","KEY_EXPAND","EXPAND_HASH","RESET_DOM","reset","RESET_GEOM","IGNORE","REPAINT","addGeom","ks","isIgnore","isGeom","isRepaint","kernelSize","sigma","outerSize","outerSizeByD","gaussianWeight","E","change","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","equalStyle","oa","ob","aa","av","bv","isMulti","isRelativeOrAbsolute","VALUE","ARRAY_0","ARRAY_0_1","cloneStyle","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","ac","bc","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","SIZE","MAX","HASH_CANVAS","Page","number","__size","__number","__free","__total","__canvas","__offscreen","__grid","__uuid","__update","time","grid","pos","genSingle","bboxNew","dbx","dby","Cache","__init","__page","__pos","getCoords","__appendData","__isNew","__enabled","globalAlpha","update","__available","clear","del","getInstance","oldX1","cacheMask","isClip","tf","globalCompositeOperation","drawCache","clientWidth","clientHeight","xe","ye","cacheOverflow","rect","parentMatrix","dbx2","dby2","ENUM","NONE","TRANSFORM_ALL","REFLOW","REBUILD","TRANSFORMS","contain","getLevel","isReflow","isRebuild","measureLineWidth","perW","rw","newLine","mw","hypotheticalNum","round","getFontKey","Text","__textBoxes","__charWidth","__textWidth","__bp","__widthHash","__cache","ly","lineBoxManager","endSpace","lineClampCount","isDestroyed","textBoxes","maxW","beginSpace","bp","lineCount","mainCoords","isTextOverflow","textWidth","containerSize","__lineBack","textBox","addItem","verticalLineHeight","ew","lineBox","isNewLine","tb","__layoutNone","__resetLb","ep","tbs","mbp","__offsetX","__offsetY","firstCharWidth","level","lineWidth","strokeStyle","render","delRefreshTask","__task","addRefreshTask","__before","__addUpdate","__after","fontKey","charWidth","__style","__cacheStyle","__renderByMask","flattenJson","traverseJson","lastText","options","Xom","Dom","Img","Geom","Component","initRoot","cd","flatten","__json","build","relation","initDom","json","initCp","initCp2","klass","__tagName","hasP","__inheritAnimate","__animateRecords","__placeholder","__children","getRegister","ref","shadowRoot","Event","__eHash","handle","on","apply","off","__karasEventCb","once","emit","event","fns","fn","REGISTER","setUpdateFlag","cp","__hasCpUpdate","__ref","__isMounted","__taskList","__nextState","addRefreshCp","builder","__cd","listener","__shadow","shadow","__shadowRoot","componentDidMount","REFRESH","__isDestroyed","componentWillUnmount","__destroy","force","__emitEvent","__state","defineProperty","get","getInlineBox","leading","bcStart","bcEnd","pbStart","pbEnd","getInlineWidth","contentBox","matrixResize","imgWidth","imgHeight","targetWidth","targetHeight","renderBgc","method","renderImage","loadBgi","bgW","bgH","bgX","bgY","needMask","xnl","xnr","ynt","ynb","image","needResize","copy","traversal","after","isPause","Frame","__hookTask","__taskCp","__now","taskCp","cloneCp","lengthCp","__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","easeIn","easeOut","ease","easeInOut","cubicBezier","getEasing","timingFunction","NUM_CAL_HASH","unify","frames","getProps","inherit","genBeforeRefresh","__frameHook","framing","duration","es","translatePath","calByUnit","container","calDiff","nm","pv","nv","taraget","pi","ni","has","pp","nn","isGradient","calDiffGradient","parentComputedStyle","len2","pv2","nv2","len3","pv3","nv3","u","eq","isArrP","isArrN","pz","nz","np","calFrame","ts","binarySearch","frame","middle","ea","steps","stepsD","calIntermediateStyle","transition","st2","calIncrease","o2","n2","gotoOverload","calDiffTime","playbackRate","spfLimit","fps","frameCb","isDelay","FRAME","PLAY","Animation","__id","nl","__options","op","config","iterations","framesR","originStyle","delay","endDelay","current","isFinish","__cancelTask","__currentProps","__currentStyle","playState","__hasFin","__hasCancel","playCount","currentFrames","stayBegin","stayEnd","is2","endTime","currentTime","currentFrame","isAlternate","alternate","isEven","isLastCount","frameTime","isLastFrame","inEndDelay","needClean","playCb","__clean","BEGIN","END","FINISH","silence","pending","PAUSE","play","CANCEL","__goto","isFrame","excludeDelay","finish","currentProps","spf","animateController","remove","backwards","both","forwards","__target","sync","removeControl","nextFrame","__checkModify","renderBoxShadow","box","spreadBox","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","blurBox","MBM_HASH","screen","overlay","darken","lighten","colorDodge","colorBurn","hardLight","softLight","difference","exclusion","hue","saturation","luminosity","mbmName","isValidMbm","LOCAL","mbm","TF","TX","TY","TZ","getFirstEmptyInlineWidth","flowChildren","child","getLastEmptyInlineWidth","__computedStyle","__listener","__loadBgi","__cacheDefs","__isClip","__isMask","__contentBoxList","__cacheAsBitmap","cacheAsBitmap","__layoutData","__hasComputeReflow","__fontRegister","__hasMask","__calSize","includePercent","isRoot","ph","fontRegister","__clientWidth","__offsetWidth","__outerWidth","__clientHeight","__offsetHeight","__outerHeight","isDirectionRow","isDirectItem","isAbs","isColumn","isRow","__computeReflow","__isIbFull","__isUprightIbFull","clearCache","__mp","__layoutFlex","__layoutInline","__layoutBlock","__sx2","__sx3","__sx4","__sx5","__sx6","__sy2","__sy3","__sy4","__sy5","__sy6","__execAr","ar","controller","autoPlay","__records2","init","list2","__records","__playAuto","h3","isParentVertical","fixedWidth","fixedHeight","selfEndSpace","isReplaced","offsetWidth","offsetHeight","matrixCache","isScale","x5","x6","y5","y6","__calFilter","bgI","kw","rebuild","__hasContent","isRealInline","sx4","sx5","sx6","sy4","sy5","sy6","__calPerspective","__calMatrix","__calCache","hasContent","__calContent","__releaseWhenEmpty","limitCache","perspectiveMatrix","offscreenBlend","offscreenMask","hasFilter","offscreenFilter","offscreenOverflow","borderList","hasBgi","some","svgBgSymbol","inline","bg","isFirst","lastContentBox","lastLineBox","parentLineBox","ix1","iy1","ix2","iy2","symbol","clearAnimate","clearFrameAnimate","__stopPropagation","__stopImmediatePropagation","willResponseEvent","hasEmitMask","ignore","inThis","__touchstartTarget","__getLg","__getRg","__getCg","lg","createLinearGradient","addColorStop","rg","createRadialGradient","onlyTotal","__cacheTotal","__cacheFilter","__cacheMask","__cacheOverflow","formatStyle","animation","cancel","enter","includeBbox","isShadowRoot","hostRoot","pJson","zChildren","zIndexChildren","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","offsetAndResizeByNodeOnY","reflowHash","inDirectAbsList","isContainer","cs","__layoutAbs","__resizeY","clearUniqueReflowId","__uniqueReflowId","getMergeMargin","topList","bottomList","genZIndexChildren","hasMc","mcHash","lastMaskIndex","__iIndex","__zIndex","__aIndex","genOrderChildren","__order","backtrack","text","__backtrack","block","inlineBlock","none","tag","__flexLine","__zIndexChildren","__structure","nss","__structs","structs","needSort","__tryLayInline","isDirectChild","main","isFixed","isContent","fixedSize","countMin","countMax","isR","__calBasis","min2","max2","__lineBoxManager","__layout","__addMBP","__preLayout","__ioSize","maxSize","countSize","mergeMarginEndList","mergeMarginStartList","ignoreNextLine","ignoreNextWrap","isXom","isInlineBlock","__isRealInline","lastLineClampCount","reflow","setNotEnd","setNewLine","isNone","isEmptyBlock","tw","th","__resizeX","isLastBlock","hasStart","isBlock","horizonAlign","__inlineSize","domList","__marginAuto","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","loadImg","__loadImg","placeholder","loading","__loadAndRefresh","showError","__addGeom","reload","Defs","cacheHash","__isMulti","multi","__cacheProps","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","updateList","removeList","KEY_FLAG","check","checkCp","nextProps","forceCheckUpdate","shouldUpdate","shouldComponentUpdate","updateCp","oldS","oldSr","oldJson","diffSr","oj","nj","ojk","getKeyHash","njk","keyList","cpList","diffCp","diffChildren","diffChild","removeCpFromOldTree","oc","ol","of","nf","exist","ex","did","componentDidUpdate","elem","diffDefs","diffBb","diffD2D","od","nd","diffDef","removeAt","insertAt","insertAdjacentHTML","parentNode","removeAttribute","diffItem","diffD2G","replaceWith","diffT2T","diffG2D","diffG2G","diffItemSelf","diffX2X","diffByLessLv","firstChild","lastChild","obb","nbb","isText","html","svg","where","insertBefore","Controller","__list2","__onList","__lastTime","args","records","animate","offsetTime","onList","__action","__mergeAuto","__on","timestamp","__set","OFFSCREEN_OVERFLOW","OFFSCREEN_FILTER","OFFSCREEN_MASK","OFFSCREEN_BLEND","OFFSCREEN_MASK2","applyOffscreen","origin","MockPage","genUuid","MockCache","reOffset","NA","CHILD","SELF","getCache","OP","FT","MBM","PPT","genBboxTotal","parentIndexHash","opacityHash","includeLimitCache","bboxTotal","filterBbox","matrixHash","parentIndex","node2","hasTotal","mergeBbox","genTotal","hasMask","cacheTotal","cacheFilter","needGen","baseMatrix","matrixList","opacityList","parentOpacity","lastConfig","lastLv","refreshLevel","countMaskNum","ctxTotal","lastMatrix","maskStartHash","offscreenHash","genOverflow","genFilter","genMask","lastOpacity","resetMatrixCacheTotal","isNew","genFrameBufferWithTexture","texCache","lockOneChannel","webgl","createFramebuffer","bindFramebuffer","checkFramebufferStatus","FRAMEBUFFER_COMPLETE","viewport","clearColor","COLOR_BUFFER_BIT","genTotalWebgl","hasMbm","getParameter","MAX_TEXTURE_SIZE","parentPm","totalLimitCache","addTexAndDrawWhenLimit","mockCache","refresh","releaseLockChannel","hookGlRender","frameBuffer2","texture2","genMbmWebgl","deleteFramebuffer","genFilterWebgl","genBlurWebgl","genDropShadowWebgl","rotation","cosR","sinR","genColorMatrixWebgl","amount","oneMinusAmount","useProgram","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","defsCache","hasEffectMask","addCache","maskHash","vdList","parentVd","mChildren","ivs","hasTransform","renderWebgl","pmList","lastRefreshLevel","mergeList","hasRecordAsMask","validMbm","isPerspective","limitHash","pptHash","renderCanvas","TexCache","units","__units","__pages","__channels","__locks","__lockUnits","pages","channels","locks","lastHash","oldList","newList","fullSize","setToChannel","DIRECTION_HASH","ROOT_DOM_NAME","getDom","querySelector","renderProp","EVENT_LIST","initEvent","Root","__wrapEvent","__cb","addEventListener","removeEvent","removeEventListener","isFixedWidthOrHeight","isFixedSize","includeParentFlex","isLAYOUT","setLAYOUT","component","addDom","checkInfluence","topFlex","isSiblingBlock","uniqueUpdateId","parseUpdate","reflowList","cacheList","zHash","zList","overwrite","focus","removeDom","style2","keys2","hasZ","hasVisibility","hasColor","hasDisplay","hasTsColor","hasTsWidth","hasTsOver","__struct","isRp","cleanSvgCache","__uniqueZId","__rlv","__dom","__mw","__mh","__taskUp","__reflowList","__animateController","mix","__updateHash","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","__checkUpdate","__checkReflow","noRender","__clear","__vd","domDiff","updateStyle","taskUp","__hasRootUpdate","__nextFrameCp","updater","includeIgnore","scan","path","zPath","__index__","karas","path2","zPath2","nodeConfig","rootConfig","updateHash","__updateRoot","updateRoot","hasUpdate","__updateStruct","uniqueList","hasRoot","diffList","diffI","mergeOffsetList","__uniqueMergeOffsetId","cps","cts","isLastAbs","isNowAbs","isLastNone","isNowNone","hasFlowPrev","__modifyStruct","mergeMarginBottomList","mergeMarginTopList","startIndex","oldH","nowH","lastIndex","reBuild","base","reBuildC","curveNum","getNewPoint","Line","__x1","__y1","__x2","__y2","__controlA","__controlB","__start","__end","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","__begin","__r","edge","__edge","closure","__closure","sList","r2","__renderOneSector","genVertex","Rect","__rx","__ry","Circle","Ellipse","my","parse","animateRecords","opt","oft","JSON","createGm","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","callback","version","appendTo","parser"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,WAAS,GAAG;AAChBC,EAAAA,QAAQ,EAAE,CADM;AAEhBC,EAAAA,OAAO,EAAE,CAFO;AAGhBC,EAAAA,GAAG,EAAE,CAHW;AAIhBC,EAAAA,KAAK,EAAE,CAJS;AAKhBC,EAAAA,MAAM,EAAE,CALQ;AAMhBC,EAAAA,IAAI,EAAE,CANU;AAOhBC,EAAAA,UAAU,EAAE,CAPI;AAQhBC,EAAAA,YAAY,EAAE,CARE;AAShBC,EAAAA,aAAa,E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,IAAG,OAAOxiE,IAAP,KAAgB,WAAnB,EAAgC;EACnCA,IAAI,CAACwiE,KAAL,GAAaA,OAAb,CAAA;AACD;;;;"}
\ No newline at end of file
+{"version":3,"file":"index.es.js","sources":["src/util/enums.js","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/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/Page.js","src/refresh/Cache.js","src/refresh/level.js","src/node/Text.js","src/util/flatten.js","src/util/builder.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/refresh/reflow.js","src/node/Dom.js","src/node/Img.js","src/node/Defs.js","src/node/geom/Geom.js","src/util/updater.js","src/util/diff.js","src/animate/Controller.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/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":["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\n// Root的update过程使用\nconst UPDATE_KEY = {\n UPDATE_NODE: 0,\n UPDATE_STYLE: 1,\n UPDATE_FOCUS: 2,\n UPDATE_COMPONENT: 3,\n UPDATE_OVERWRITE: 4,\n UPDATE_KEYS: 5,\n UPDATE_LIST: 6,\n UPDATE_CONFIG: 7,\n UPDATE_ADD_DOM: 8,\n UPDATE_REMOVE_DOM: 9,\n};\n\n// animation计算每帧使用\nconst KEY_FRAME_KEY = {\n FRAME_STYLE: 0,\n FRAME_TIME: 1,\n FRAME_EASING: 2,\n FRAME_TRANSITION: 3,\n};\n\n// 节点使用\nconst NODE_KEY = {\n NODE_DOM_PARENT: 0,\n NODE_OPACITY: 1,\n NODE_MATRIX: 2,\n NODE_MATRIX_EVENT: 3,\n NODE_CACHE: 4,\n NODE_CACHE_TOTAL: 5,\n NODE_CACHE_FILTER: 6,\n NODE_CACHE_MASK: 7,\n NODE_CACHE_OVERFLOW: 8,\n NODE_STRUCT: 9,\n NODE_TAG_NAME: 10,\n NODE_CURRENT_STYLE: 11,\n NODE_CURRENT_PROPS: 12,\n NODE_COMPUTED_STYLE: 13,\n NODE_CACHE_STYLE: 14,\n NODE_CACHE_PROPS: 15,\n NODE_LIMIT_CACHE: 16,\n NODE_IS_MASK: 17,\n NODE_IS_INLINE: 18,\n NODE_HAS_CONTENT: 19,\n NODE_REFRESH_LV: 20,\n NODE_IS_DESTROYED: 21,\n NODE_STYLE: 22,\n NODE_UPDATE_HASH: 23,\n NODE_UNIQUE_UPDATE_ID: 24,\n NODE_DEFS_CACHE: 25,\n NODE_PERSPECTIVE_MATRIX: 26,\n NODE_VIRTUAL_DOM: 27,\n NODE_CACHE_AS_BITMAP: 28,\n};\n\n// struct用\nconst STRUCT_KEY = {\n STRUCT_NODE: 0,\n STRUCT_INDEX: 1,\n STRUCT_CHILD_INDEX: 2,\n STRUCT_LV: 3,\n STRUCT_NUM: 4,\n STRUCT_TOTAL: 5,\n STRUCT_HAS_MASK: 6,\n};\n\nconst ANIMATE_KEY = {\n I_ASSIGNING: 0,\n I_IN_FPS: 1,\n I_IS_DELAY: 2,\n I_BEGIN: 3,\n I_END: 4,\n I_FINISHED: 5,\n I_NEXT_END: 6,\n I_FIRST_PLAY: 7,\n I_PLAY_CB: 8,\n I_TARGET: 9,\n I_ROOT: 10,\n I_FRAMES: 11,\n I_FRAMES_R: 12,\n I_CURRENT_TIME: 13,\n I_NEXT_TIME: 14,\n I_STYLE: 15,\n I_DURATION: 16,\n I_ITERATIONS: 17,\n I_FILL: 18,\n I_PLAYBACK_RATE: 19,\n I_PLAY_COUNT: 20,\n I_PLAY_STATE: 21,\n I_DESTROYED: 22,\n I_START_TIME: 23,\n I_FPS_TIME: 24,\n I_EASING: 25,\n I_ENTER_FRAME: 26,\n I_DELAY: 27,\n I_END_DELAY: 28,\n I_KEYS: 29,\n I_ORIGIN_STYLE: 30,\n I_CURRENT_FRAMES: 31,\n I_CURRENT_FRAME: 32,\n I_SPF_LIMIT: 33,\n I_FPS: 34,\n I_DIRECTION: 35,\n I_FIRST_ENTER: 36,\n I_STAY_BEGIN: 37,\n I_STAY_END: 38,\n I_IS2: 39,\n I_END_TIME: 40,\n I_NODE_CONFIG: 41,\n I_ROOT_CONFIG: 42,\n I_OUT_BEGIN_DELAY: 43,\n I_TIME_STAMP: 44,\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 UPDATE_KEY,\n KEY_FRAME_KEY,\n NODE_KEY,\n STRUCT_KEY,\n ANIMATE_KEY,\n ELLIPSIS: '…',\n};\n","import enums from '../util/enums';\n\nconst {\n STRUCT_KEY: {\n STRUCT_NODE,\n STRUCT_INDEX,\n STRUCT_CHILD_INDEX,\n STRUCT_LV,\n },\n NODE_KEY: {\n NODE_IS_DESTROYED,\n NODE_STRUCT,\n },\n} = enums;\n\nclass 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.__config = {};\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.__virtualDom = null;\n this.__bbox = null;\n this.__filterBbox = null;\n }\n\n __structure(i, lv, j) {\n return this.__config[NODE_STRUCT] = {\n [STRUCT_NODE]: this,\n [STRUCT_INDEX]: i,\n [STRUCT_CHILD_INDEX]: j,\n [STRUCT_LV]: lv,\n };\n }\n\n __modifyStruct(root, offset = 0) {\n let struct = this.__config[NODE_STRUCT];\n return [struct, 0];\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.__config[NODE_IS_DESTROYED] = 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.__config[NODE_IS_DESTROYED];\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","let o = {\n AUTO: 0,\n PX: 1,\n PERCENT: 2,\n NUMBER: 3,\n INHERIT: 4,\n DEG: 5,\n STRING: 6,\n RGBA: 7,\n REM: 8,\n EM: 9,\n VW: 10,\n VH: 11,\n VMAX: 12,\n VMIN: 13,\n GRADIENT: 14, // 特殊格式,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, o.PERCENT];\n }\n else if(/px$/i.test(v)) {\n return [n, o.PX];\n }\n else if(/deg$/i.test(v)) {\n return [n, o.DEG];\n }\n else if(/rem$/i.test(v)) {\n return [n, o.REM];\n }\n else if(/vw$/i.test(v)) {\n return [n, o.VW];\n }\n else if(/vh$/i.test(v)) {\n return [n, o.VH];\n }\n else if(/em$/i.test(v)) {\n return [n, o.EM];\n }\n else if(/vw$/i.test(v)) {\n return [n, o.VW];\n }\n else if(/vh$/i.test(v)) {\n return [n, o.VH];\n }\n else if(/vmax$/i.test(v)) {\n return [n, o.VMAX];\n }\n else if(/vmin$/i.test(v)) {\n return [n, o.VMIN];\n }\n return [n, o.NUMBER];\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(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 vd.defs.forEach(item => {\n s += joinDef(item);\n });\n s += '';\n vd.bb.forEach(item => {\n s += joinVd(item);\n });\n s += '';\n (vd.children || []).forEach(item => {\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 (vd.children || []).forEach(item => {\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 += '' + def.tagName + '>';\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 += '>' + item.tagName + '>';\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 extendAnimate(ovd, nvd) {\n let list = nvd.__animationList = ovd.animationList.splice(0);\n list.forEach(item => {\n item.__setTarget(nvd);\n // 事件队列的缘故,可能动画本帧刚执行过,然后再继承,就会缺失,需再次赋值一遍;也有可能停留最后\n if(item.assigning || item.finished && item.__stayEnd()) {\n item.assignCurrentStyle();\n }\n });\n // 帧动画继承\n nvd.__frameAnimateList = ovd.__frameAnimateList.splice(0);\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 extendAnimate,\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 draw() {\n // 空函数,仅对小程序提供hook特殊处理,flush缓冲\n },\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(/' + str.charAt(i).replace('<', '<').replace(/[ \\n]/, ' ') + '';\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();\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(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 canvas.draw();\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 canvas.draw();\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","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[0] > 0) {\n noRadius = false;\n }\n else {\n return 0;\n }\n if(item[1] === PX) {\n return Math.max(0, item[0]);\n }\n else if(item[1] === PERCENT) {\n return Math.max(0, item[0] * (i ? h : w) * 0.01);\n }\n else if(item[1] === REM) {\n return Math.max(0, item[0] * root.computedStyle[FONT_SIZE]);\n }\n else if(item[1] === VW) {\n return Math.max(0, item[0] * root.width * 0.01);\n }\n else if(item[1] === VH) {\n return Math.max(0, item[0] * root.height * 0.01);\n }\n else if(item[1] === VMAX) {\n return Math.max(0, item[0] * Math.max(root.width, root.height) * 0.01);\n }\n else if(item[1] === VMIN) {\n return Math.max(0, item[0] * 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[1] === PX) {\n v = Math.max(0, item[0]);\n v = Math.min(i ? h : w, v);\n }\n else {\n v = Math.max(0, item[0] * (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[1] === PX) {\n v = Math.max(0, item[0]);\n v = Math.min(i ? h : w, v);\n }\n else {\n v = Math.max(0, item[0] * (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[1]) > -1) {\n v[1] = PX;\n }\n return v;\n }\n else {\n return [\n {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[data] || 50,\n 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[1] === PERCENT) {\n list.push([item[0], p[0] * 0.01]);\n }\n else if(p[1] === REM) {\n list.push([item[0], p[0] * root.computedStyle[FONT_SIZE] / length]);\n }\n else if(p[1] === VW) {\n list.push([item[0], p[0] * root.width / length]);\n }\n else if(p[1] === VH) {\n list.push([item[0], p[0] * root.height / length]);\n }\n else if(p[1] === VMAX) {\n list.push([item[0], p[0] * Math.max(root.width, root.height) / length]);\n }\n else if(p[1] === VMIN) {\n list.push([item[0], p[0] * Math.min(root.width, root.height) / length]);\n }\n else {\n list.push([item[0], p[0] / 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[1] === PERCENT) {\n cx = x1 + positionX[0] * iw * 0.01;\n }\n else if(positionX[1] === REM) {\n cx = x1 + positionX[0] * root.computedStyle[FONT_SIZE];\n }\n else if(positionX[1] === VW) {\n cx = x1 + positionX[0] * root.width * 0.01;\n }\n else if(positionX[1] === VH) {\n cx = x1 + positionX[0] * root.height * 0.01;\n }\n else if(positionX[1] === VMAX) {\n cx = x1 + positionX[0] * Math.max(root.width, root.height) * 0.01;\n }\n else if(positionX[1] === VMIN) {\n cx = x1 + positionX[0] * Math.min(root.width, root.height) * 0.01;\n }\n else {\n cx = x1 + positionX[0];\n }\n if(positionY[1] === PERCENT) {\n cy = y1 + positionY[0] * ih * 0.01;\n }\n else if(positionY[1] === REM) {\n cy = y1 + positionY[0] * root.computedStyle[FONT_SIZE];\n }\n else if(positionY[1] === VW) {\n cy = y1 + positionY[0] * root.width * 0.01;\n }\n else if(positionY[1] === VH) {\n cy = y1 + positionY[0] * root.height * 0.01;\n }\n else if(positionY[1] === VH) {\n cy = y1 + positionY[0] * Math.max(root.width, root.height) * 0.01;\n }\n else if(positionY[1] === VH) {\n cy = y1 + positionY[0] * Math.min(root.width, root.height) * 0.01;\n }\n else {\n cy = y1 + positionY[0];\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 = [[50, PERCENT], [50, 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 = [[50, PERCENT], [50, 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[1]) > -1) {\n v[1] = 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 KEY_COLOR = [\n [STYLE_KEY.BACKGROUND_COLOR],\n [STYLE_KEY.BORDER_BOTTOM_COLOR],\n [STYLE_KEY.BORDER_LEFT_COLOR],\n [STYLE_KEY.BORDER_RIGHT_COLOR],\n [STYLE_KEY.BORDER_TOP_COLOR],\n [STYLE_KEY.COLOR], // 这2个特殊,新增GRADIENT渐变色\n [STYLE_KEY.TEXT_STROKE_COLOR],\n];\n\nconst KEY_LENGTH = [\n [STYLE_KEY.FONT_SIZE],\n [STYLE_KEY.BORDER_BOTTOM_WIDTH],\n [STYLE_KEY.BORDER_LEFT_WIDTH],\n [STYLE_KEY.BORDER_RIGHT_WIDTH],\n [STYLE_KEY.BORDER_TOP_WIDTH],\n [STYLE_KEY.LEFT],\n [STYLE_KEY.TOP],\n [STYLE_KEY.RIGHT],\n [STYLE_KEY.BOTTOM],\n [STYLE_KEY.FLEX_BASIS],\n [STYLE_KEY.WIDTH],\n [STYLE_KEY.HEIGHT],\n [STYLE_KEY.LINE_HEIGHT],\n [STYLE_KEY.MARGIN_BOTTOM],\n [STYLE_KEY.MARGIN_LEFT],\n [STYLE_KEY.MARGIN_TOP],\n [STYLE_KEY.MARGIN_RIGHT],\n [STYLE_KEY.PADDING_TOP],\n [STYLE_KEY.PADDING_RIGHT],\n [STYLE_KEY.PADDING_BOTTOM],\n [STYLE_KEY.PADDING_LEFT],\n [STYLE_KEY.STROKE_WIDTH],\n [STYLE_KEY.STROKE_MITERLIMIT],\n [STYLE_KEY.LETTER_SPACING],\n [STYLE_KEY.PERSPECTIVE],\n [STYLE_KEY.TEXT_STROKE_WIDTH],\n];\n\nconst KEY_GRADIENT = [\n [STYLE_KEY.BACKGROUND_IMAGE],\n [STYLE_KEY.FILL],\n [STYLE_KEY.STROKE],\n];\n\nconst KEY_RADIUS = [\n [STYLE_KEY.BORDER_TOP_LEFT_RADIUS],\n [STYLE_KEY.BORDER_TOP_RIGHT_RADIUS],\n [STYLE_KEY.BORDER_BOTTOM_RIGHT_RADIUS],\n [STYLE_KEY.BORDER_BOTTOM_LEFT_RADIUS],\n];\n\nconst COLOR_HASH = {};\nKEY_COLOR.forEach(k => {\n COLOR_HASH[k] = true;\n});\n\nconst LENGTH_HASH = {};\nKEY_LENGTH.forEach(k => {\n LENGTH_HASH[k] = true;\n});\n\nconst RADIUS_HASH = {};\nKEY_RADIUS.forEach(k => {\n RADIUS_HASH[k] = true;\n});\n\nconst GRADIENT_HASH = {};\nKEY_GRADIENT.forEach(k => {\n GRADIENT_HASH[k] = true;\n});\n\nconst GRADIENT_TYPE = {\n linear: true,\n radial: true,\n conic: true,\n};\n\nconst KEY_EXPAND = [\n [STYLE_KEY.TRANSLATE_X],\n [STYLE_KEY.TRANSLATE_Y],\n [STYLE_KEY.TRANSLATE_Z],\n [STYLE_KEY.SKEW_X],\n [STYLE_KEY.SKEW_Y],\n [STYLE_KEY.SCALE_X],\n [STYLE_KEY.SCALE_Y],\n [STYLE_KEY.SCALE_Z],\n [STYLE_KEY.ROTATE_X],\n [STYLE_KEY.ROTATE_Y],\n [STYLE_KEY.ROTATE_Z],\n];\n\nconst EXPAND_HASH = {};\nKEY_EXPAND.forEach(k => {\n EXPAND_HASH[k] = true;\n});\n\nexport default {\n KEY_COLOR,\n KEY_EXPAND,\n KEY_GRADIENT,\n KEY_LENGTH,\n KEY_RADIUS,\n COLOR_HASH,\n EXPAND_HASH,\n GRADIENT_HASH,\n LENGTH_HASH,\n RADIUS_HASH,\n GRADIENT_TYPE,\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;\n\nconst GEOM = {};\nconst GEOM_KEY_SET = [];\nconst IGNORE = {\n [STYLE_KEY.POINTER_EVENTS]: true,\n};\nconst REPAINT = {\n [STYLE_KEY.TRANSFORM]: true,\n [STYLE_KEY.TRANSLATE_X]: true,\n [STYLE_KEY.TRANSLATE_Y]: true,\n [STYLE_KEY.SKEW_X]: true,\n [STYLE_KEY.SKEW_Y]: true,\n [STYLE_KEY.SCALE_X]: true,\n [STYLE_KEY.SCALE_Y]: true,\n [STYLE_KEY.ROTATE_Z]: true,\n [STYLE_KEY.COLOR]: true,\n [STYLE_KEY.FONT_STYLE]: true,\n [STYLE_KEY.STROKE_WIDTH]: true,\n [STYLE_KEY.FILL]: true,\n [STYLE_KEY.STROKE_DASHARRAY]: true,\n [STYLE_KEY.STROKE_LINECAP]: true,\n [STYLE_KEY.STROKE_LINEJOIN]: true,\n [STYLE_KEY.STROKE_MITERLIMIT]: true,\n [STYLE_KEY.BACKGROUND_COLOR]: true,\n [STYLE_KEY.BACKGROUND_IMAGE]: true,\n [STYLE_KEY.BACKGROUND_POSITION_X]: true,\n [STYLE_KEY.BACKGROUND_POSITION_Y]: true,\n [STYLE_KEY.BACKGROUND_REPEAT]: true,\n [STYLE_KEY.BACKGROUND_SIZE]: true,\n [STYLE_KEY.STROKE]: true,\n [STYLE_KEY.BORDER_BOTTOM_COLOR]: true,\n [STYLE_KEY.BORDER_LEFT_COLOR]: true,\n [STYLE_KEY.BORDER_RIGHT_COLOR]: true,\n [STYLE_KEY.BORDER_TOP_COLOR]: true,\n [STYLE_KEY.BORDER_TOP_LEFT_RADIUS]: true,\n [STYLE_KEY.BORDER_TOP_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_LEFT_RADIUS]: true,\n [STYLE_KEY.VISIBILITY]: true,\n [STYLE_KEY.OPACITY]: true,\n [STYLE_KEY.Z_INDEX]: true,\n [STYLE_KEY.FILTER]: true,\n [STYLE_KEY.BOX_SHADOW]: true,\n [STYLE_KEY.OVERFLOW]: true,\n [STYLE_KEY.BACKGROUND_CLIP]: true,\n [STYLE_KEY.TEXT_STROKE_WIDTH]: true,\n [STYLE_KEY.TEXT_STROKE_COLOR]: true,\n [STYLE_KEY.TEXT_STROKE_OVER]: true,\n};\n\nlet o = {\n GEOM,\n GEOM_KEY_SET,\n IGNORE,\n REPAINT,\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 IGNORE.hasOwnProperty(k);\n },\n isGeom(tagName, k) {\n return tagName && k && GEOM.hasOwnProperty(k) && GEOM[k].hasOwnProperty(tagName);\n },\n isRepaint(k, tagName) {\n return REPAINT.hasOwnProperty(k) || 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 DISPLAY,\n FLEX_DIRECTION,\n FLEX_GROW,\n FLEX_SHRINK,\n FLEX_BASIS,\n JUSTIFY_CONTENT,\n ALIGN_SELF,\n ALIGN_ITEMS,\n MATRIX,\n LETTER_SPACING,\n BACKGROUND_CLIP,\n WHITE_SPACE,\n TEXT_OVERFLOW,\n LINE_CLAMP,\n ORDER,\n FLEX_WRAP,\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 COLOR_HASH,\n LENGTH_HASH,\n RADIUS_HASH,\n GRADIENT_HASH,\n EXPAND_HASH,\n GRADIENT_TYPE,\n} = key;\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[1] = NUMBER;\n }\n else if(k === TRANSLATE_X || k === TRANSLATE_Y || k === TRANSLATE_Z) {\n if(arr[1] === NUMBER) {\n arr[1] = PX;\n }\n }\n else if(k === PERSPECTIVE) {\n if([NUMBER, PERCENT, DEG].indexOf(arr[1]) > -1) {\n arr[1] = PX;\n }\n }\n else {\n if(arr[1] === NUMBER) {\n arr[1] = 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] = [null];\n }\n else if(Array.isArray(temp)) {\n res[BACKGROUND_IMAGE] = temp.map(item => {\n if(!item) {\n return null;\n }\n if(reg.gradient.test(item)) {\n return [gradient.parseGradient(item), GRADIENT];\n }\n if(reg.img.test(item)) {\n return [reg.img.exec(item)[2], STRING];\n }\n return null;\n });\n }\n // 区分是渐变色还是图\n else if(reg.gradient.test(temp)) {\n res[BACKGROUND_IMAGE] = [[gradient.parseGradient(temp), GRADIENT]];\n }\n else if(reg.img.test(temp)) {\n res[BACKGROUND_IMAGE] = [[reg.img.exec(temp)[2], STRING]];\n }\n else {\n res[BACKGROUND_IMAGE] = [null];\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] = [rgba2int(bgc[0]), RGBA];\n }\n else {\n bgc = /rgba?\\s*\\(.+\\)/i.exec(temp);\n res[BACKGROUND_COLOR] = [rgba2int(bgc ? bgc[0] : [0, 0, 0, 0]), 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[1]) > -1) {\n v[1] = PX;\n }\n return v;\n }\n else {\n return [\n {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[item] || 0,\n 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 [0, AUTO],\n [0, 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[1]) > -1) {\n n[1] = PX;\n }\n v.push(n);\n }\n else if(item === 'contain' || item === 'cover') {\n v.push([item, STRING]);\n }\n else {\n v.push([0, AUTO]);\n }\n }\n return v;\n }\n else {\n return [\n [0, AUTO],\n [0, 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)]] = [rgba2int(v || 'transparent'), 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[1]) > -1) {\n n[1] = PX;\n }\n if(n[0] < 0) {\n n[0] = 0;\n }\n arr[i] = n;\n }\n else {\n arr[i] = [0, PX];\n }\n }\n res[STYLE_KEY[style2Upper(k)]] = arr;\n }\n });\n temp = style.transform;\n if(temp === null) {\n res[TRANSFORM] = null;\n }\n else 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([MATRIX, [\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([MATRIX, arr]);\n }\n }\n else if(k === 'perspective') {\n let arr = calUnit(v);\n if(arr[0] < 0) {\n arr[0] = 0;\n }\n compatibleTransform(PERSPECTIVE, arr);\n transform.push([PERSPECTIVE, 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([ROTATE_3D, 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([k2, 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([k1, arr1]);\n transform.push([k2, 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([k1, arr1]);\n transform.push([k2, arr2]);\n transform.push([k3, arr3]);\n }\n }\n });\n }\n }\n temp = style.perspective;\n if(temp !== undefined) {\n let arr = calUnit(temp || 0);\n if(arr[0] < 0) {\n arr[0] = 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[1]) > -1) {\n n[1] = PX;\n }\n arr.push(n);\n }\n else {\n arr.push([\n {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[item],\n PERCENT,\n ]);\n // 不规范的写法变默认值50%\n if(isNil(arr[i][0])) {\n arr[i][0] = 50;\n }\n }\n }\n }\n else {\n arr.push([50, PERCENT]);\n arr.push([50, 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 = [0, AUTO];\n }\n else {\n v = calUnit(v || 0);\n // 无单位视为px\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = 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[0] < 0) {\n v[0] = 0;\n }\n });\n temp = style.flexBasis;\n if(temp !== undefined) {\n if(/content/i.test(temp)) {\n res[FLEX_BASIS] = [temp, STRING];\n }\n else if(/^[\\d.]/.test(temp)) {\n let v = res[FLEX_BASIS] = calUnit(temp);\n v[0] = Math.max(v[0], 0);\n // 无单位视为px\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n }\n else {\n res[FLEX_BASIS] = [0, 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] = [[], INHERIT];\n }\n else if(reg.gradient.test(temp)) {\n res[COLOR] = [gradient.parseGradient(temp), GRADIENT];\n }\n else {\n res[COLOR] = [rgba2int(temp), RGBA];\n }\n }\n temp = style.textStrokeColor;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[TEXT_STROKE_COLOR] = [[], INHERIT];\n }\n else if(reg.gradient.test(temp)) {\n res[TEXT_STROKE_COLOR] = [gradient.parseGradient(temp), GRADIENT];\n }\n else {\n res[TEXT_STROKE_COLOR] = [rgba2int(temp), RGBA];\n }\n }\n temp = style.fontSize;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[FONT_SIZE] = [0, INHERIT];\n }\n else {\n let v = calUnit(temp);\n // fontSize不能为负数,否则为继承\n if(v < 0) {\n res[FONT_SIZE] = [0, INHERIT];\n }\n else {\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = 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] = [0, INHERIT];\n }\n else {\n let v = calUnit(temp);\n // textStrokeWidth不能为负数,否则为继承\n if(v < 0) {\n res[TEXT_STROKE_WIDTH] = [0, INHERIT];\n }\n else {\n if([NUMBER, DEG, PERCENT].indexOf(v[1]) > -1) {\n v[1] = 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] = [0, 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, STRING];\n }\n }\n temp = style.fontWeight;\n if(temp !== undefined) {\n if(/bold/i.test(temp)) {\n res[FONT_WEIGHT] = [700, NUMBER];\n }\n else if(/normal/i.test(temp)) {\n res[FONT_WEIGHT] = [400, NUMBER];\n }\n else if(/lighter/i.test(temp)) {\n res[FONT_WEIGHT] = [200, NUMBER];\n }\n else if(/inherit/i.test(temp)) {\n res[FONT_WEIGHT] = [0, INHERIT];\n }\n else {\n res[FONT_WEIGHT] = [Math.max(0, parseInt(temp)) || 400, NUMBER];\n }\n }\n temp = style.fontStyle;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[FONT_STYLE] = [0, 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, STRING];\n }\n }\n temp = style.fontFamily;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[FONT_FAMILY] = [0, INHERIT];\n }\n else {\n // 统一文字声明格式\n res[FONT_FAMILY] = [temp.toString().toLowerCase().replace(/['\"]/, '').replace(/\\s*,\\s*/g, ','), STRING];\n }\n }\n temp = style.writingMode;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[WRITING_MODE] = [0, 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, STRING];\n }\n }\n temp = style.textAlign;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[TEXT_ALIGN] = [0, 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, STRING];\n }\n }\n temp = style.lineHeight;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[LINE_HEIGHT] = [0, INHERIT];\n }\n else if(/normal/i.test(temp)) {\n res[LINE_HEIGHT] = [0, AUTO];\n }\n // lineHeight默认数字,想要px必须强制带单位\n else if(/^[\\d.]+/i.test(temp)) {\n let v = calUnit(temp);\n if([DEG].indexOf(v[1]) > -1) {\n v[1] = 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] = [null, AUTO];\n }\n else {\n res[LINE_HEIGHT] = [n, NUMBER];\n }\n }\n }\n temp = style.letterSpacing;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[LETTER_SPACING] = [0, INHERIT];\n }\n else if(/normal/i.test(temp)) {\n res[LETTER_SPACING] = [0, PX];\n }\n else if(/^[-+]?[\\d.]/.test(temp)) {\n let v = calUnit(temp);\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n res[LETTER_SPACING] = v;\n }\n else {\n res[LETTER_SPACING] = [parseFloat(temp) || 0, PX];\n }\n }\n temp = style.whiteSpace;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[WHITE_SPACE] = [0, INHERIT];\n }\n else {\n res[WHITE_SPACE] = [temp, 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 temp = style.fill;\n if(temp !== undefined) {\n if(!temp) {\n res[FILL] = [['none', STRING]];\n }\n else if(Array.isArray(temp)) {\n if(temp.length) {\n res[FILL] = temp.map(item => {\n if(!item) {\n return ['none', STRING];\n }\n else if(reg.gradient.test(item)) {\n return [gradient.parseGradient(item), GRADIENT];\n }\n else {\n return [rgba2int(item), RGBA];\n }\n });\n }\n else {\n res[FILL] = [['none', STRING]];\n }\n }\n else if(reg.gradient.test(temp)) {\n res[FILL] = [[gradient.parseGradient(temp), GRADIENT]];\n }\n else {\n res[FILL] = [[rgba2int(temp), RGBA]];\n }\n }\n temp = style.stroke;\n if(temp !== undefined) {\n if(!temp) {\n res[STROKE] = [['none', STRING]];\n }\n else if(Array.isArray(temp)) {\n if(temp.length) {\n res[STROKE] = temp.map(item => {\n if(!item) {\n return ['none', STRING];\n }\n else if(reg.gradient.test(item)) {\n return [gradient.parseGradient(item), GRADIENT];\n }\n else {\n return [rgba2int(item), RGBA];\n }\n });\n }\n else {\n res[STROKE] = [['none', STRING]];\n }\n }\n else if(reg.gradient.test(temp)) {\n res[STROKE] = [[gradient.parseGradient(temp), GRADIENT]];\n }\n else {\n res[STROKE] = [[rgba2int(temp), RGBA]];\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[1]) > -1) {\n v[1] = PX;\n }\n v[0] = Math.max(v[0], 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 = null;\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 f = f || [];\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[1]) > -1) {\n v[1] = PX;\n }\n // x/y可以负,blur和spread不行\n if(i > 2 && v[0] < 0) {\n v = 0;\n }\n res.push(v);\n }\n else {\n res.push([0, 1]);\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(['dropShadow', res]);\n }\n }\n else {\n let m2 = /([-+]?[\\d.]+\\s*[pxremvwhdg%]*)/i.exec(v);\n if(m2) {\n f = f || [];\n let v = calUnit(m2[0]);\n if(k === 'blur') {\n if([DEG, PERCENT].indexOf(v[1]) > -1) {\n return;\n }\n if(v[1] === NUMBER) {\n v[1] = PX;\n }\n v[0] = Math.max(v[0], 0);\n f.push([k, v]);\n }\n else if(k === 'hue-rotate' || k === 'huerotate') {\n if([NUMBER, DEG].indexOf(v[1]) === -1) {\n return;\n }\n v[1] = DEG;\n f.push(['hueRotate', v]);\n }\n else if(k === 'saturate' || k === 'brightness' || k === 'grayscale' || k === 'contrast' || k === 'sepia' || k === 'invert') {\n if([NUMBER, PERCENT].indexOf(v[1]) === -1) {\n return;\n }\n v[0] = Math.max(v[0], 0);\n v[1] = 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] = [0, INHERIT];\n }\n else {\n let v = reset.INHERIT.visibility;\n if(/hidden/i.test(temp)) {\n v = 'hidden';\n }\n res[VISIBILITY] = [v, STRING];\n }\n }\n temp = style.pointerEvents;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[POINTER_EVENTS] = [0, 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, STRING];\n }\n }\n temp = style.boxShadow;\n if(temp !== undefined) {\n let bs = null;\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 bs = bs || [];\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[1]) > -1) {\n v[1] = PX;\n }\n // x/y可以负,blur和spread不行\n if(i > 2 && v[0] < 0) {\n v = 0;\n }\n res.push(v);\n }\n else {\n res.push([0, 1]);\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[1] === AUTO) {\n if(k === WIDTH) {\n parent = parent.domParent;\n }\n else {\n break;\n }\n }\n else if(style[1] === PX) {\n return n * style[0];\n }\n else if(style[1] === PERCENT) {\n n *= style[0] * 0.01;\n parent = parent.domParent;\n }\n else if(style[1] === REM) {\n return n * style[0] * parent.root.computedStyle[FONT_SIZE];\n }\n else if(style[1] === VW) {\n return n * style[0] * parent.root.width * 0.01;\n }\n else if(style[1] === VH) {\n return n * style[0] * parent.root.height * 0.01;\n }\n else if(style[1] === VMAX) {\n return n * style[0] * Math.max(parent.root.width, parent.root.height) * 0.01;\n }\n else if(style[1] === VMIN) {\n return n * style[0] * 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[1] === AUTO) {\n v = 0;\n }\n else if([PX, NUMBER].indexOf(v[1]) > -1) {\n v = v[0];\n }\n else if(v[1] === PERCENT) {\n if(isWidth) {\n v = calRelativePercent(v[0], parent, WIDTH);\n }\n else {\n v = calRelativePercent(v[0], parent, HEIGHT);\n }\n }\n else if(v[1] === REM) {\n v = v[0] * parent.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * parent.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * parent.root.height * 0.01;\n }\n else if(v[1] === VMAX) {\n v = v[0] * Math.max(parent.root.width, parent.root.height) * 0.01;\n }\n else if(v[1] === VMIN) {\n v = v[0] * Math.min(parent.root.width, parent.root.height) * 0.01;\n }\n return v;\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[0] !== ob[0]) {\n return false;\n }\n // translate/matrix等都是数组\n if(!equalArr(oa[1], ob[1])) {\n return false;\n }\n }\n return true;\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 === BACKGROUND_SIZE) {\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][0] !== bb[0][0] || aa[0][1] !== bb[0][1] || aa[1][0] !== bb[1][0] || aa[1][1] !== bb[1][1]) {\n return false;\n }\n }\n return true;\n }\n if(k === TRANSFORM_ORIGIN || RADIUS_HASH.hasOwnProperty(k)) {\n return a[0][0] === b[0][0] && a[0][1] === b[0][1]\n && a[1][0] === b[1][0] && a[1][1] === b[1][1];\n }\n if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y\n || LENGTH_HASH.hasOwnProperty(k) || EXPAND_HASH.hasOwnProperty(k)) {\n return a[0] === b[0] && a[1] === b[1];\n }\n if(k === BOX_SHADOW) {\n return equalArr(a, b);\n }\n // color等是rgba颜色时\n if(k === COLOR || k === TEXT_STROKE_COLOR) {\n if(a[1] !== b[1]) {\n return false;\n }\n if(a[1] === RGBA) {\n return equalArr(a[0], b[0]);\n }\n else {}\n }\n if(COLOR_HASH.hasOwnProperty(k)) {\n return a[1] === b[1] && equalArr(a[0], b[0]);\n }\n // color/fill等是gradient时\n if(GRADIENT_HASH.hasOwnProperty(k) && a.k === b.k && GRADIENT_TYPE.hasOwnProperty(a.k)) {\n let av = a.v;\n let bv = b.v;\n if(a.d !== b.d || av.length !== bv.length) {\n return false;\n }\n for(let i = 0, len = av.length; i < len; i++) {\n let ai = av[i];\n let bi = bv[i];\n if(ai.length !== bi.length) {\n return false;\n }\n for(let j = 0; j < 4; j++) {\n if(ai[0][j] !== bi[0][j]) {\n return false;\n }\n }\n if(ai.length > 1) {\n if(ai[1][0] !== bi[1][0] || ai[1][1] !== bi[1][1]) {\n return false;\n }\n }\n }\n return true;\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 isRelativeOrAbsolute(node) {\n let position = node.currentStyle[POSITION];\n return position === 'relative' || position === 'absolute';\n}\n\nconst VALUE = {\n [POSITION]: true,\n [DISPLAY]: true,\n [STYLE_KEY.BACKGROUND_REPEAT]: true,\n [FLEX_DIRECTION]: true,\n [FLEX_GROW]: true,\n [FLEX_SHRINK]: true,\n [FLEX_WRAP]: true,\n [JUSTIFY_CONTENT]: true,\n [ALIGN_ITEMS]: true,\n [ALIGN_SELF]: true,\n [STYLE_KEY.OVERFLOW]: true,\n [STYLE_KEY.MIX_BLEND_MODE]: true,\n [STYLE_KEY.STROKE_LINECAP]: true,\n [STYLE_KEY.STROKE_LINEJOIN]: true,\n [STYLE_KEY.STROKE_MITERLIMIT]: true,\n [STYLE_KEY.FILL_RULE]: true,\n [OPACITY]: true,\n [Z_INDEX]: true,\n [BACKGROUND_CLIP]: true,\n [TEXT_OVERFLOW]: true,\n [LINE_CLAMP]: true,\n};\n// 仅1维数组\nconst ARRAY_0 = {\n [BACKGROUND_COLOR]: true,\n [STYLE_KEY.BORDER_TOP_COLOR]: true,\n [STYLE_KEY.BORDER_RIGHT_COLOR]: true,\n [STYLE_KEY.BORDER_BOTTOM_COLOR]: true,\n [STYLE_KEY.BORDER_LEFT_COLOR]: true,\n};\n// 仅2维数组且只有2个值\nconst ARRAY_0_1 = {\n [STYLE_KEY.BORDER_TOP_LEFT_RADIUS]: true,\n [STYLE_KEY.BORDER_TOP_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_LEFT_RADIUS]: true,\n [TRANSFORM_ORIGIN]: true,\n [PERSPECTIVE_ORIGIN]: true,\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 // 渐变特殊处理\n if(k === BACKGROUND_IMAGE) {\n res[k] = v.map(item => {\n if(item[1] === GRADIENT) {\n return [util.clone(item[0]), item[1]];\n }\n else {\n return item;\n }\n });\n }\n else if(k === FILL || k === STROKE) {\n res[k] = v.map(item => {\n // 渐变可能非法为空\n if(item[1] === GRADIENT) {\n return [util.clone(item[0]), item[1]];\n }\n // 颜色\n else if(item[1] === RGBA) {\n return [item[0].slice(0), item[1]];\n }\n // none\n else {\n return item;\n }\n });\n }\n else if(k === TRANSFORM) {\n if(v) {\n let n = v.slice(0);\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n n[i][1] = n[i][1].slice(0);\n }\n res[k] = n;\n }\n }\n else if(k === FILTER) {\n if(v) {\n let n = v.slice(0);\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n let k = n[i][0];\n n[i][1] = n[i][1].slice(0);\n if(k === 'dropShadow') {\n let temp = n[i][1];\n temp.forEach((item, j) => {\n temp[j] = temp[j].slice(0);\n });\n }\n }\n res[k] = n;\n }\n }\n else if(k === BOX_SHADOW) {\n if(v) {\n v = v.map(item => {\n let n = item.slice(0);\n n[4] = n[4].slice(0);\n return n;\n });\n res[k] = v;\n }\n }\n else if(k === TRANSLATE_PATH) {\n if(v) {\n res[k] = v.map(item => item.slice(0));\n }\n }\n else if(k === COLOR || k === TEXT_STROKE_COLOR) {\n if(v) {\n if(v[1] === GRADIENT) {\n res[k] = [util.clone(v[0]), v[1]];\n }\n else if(v[1] === RGBA) {\n res[k] = [v[0].slice(0), v[1]];\n }\n // inherit\n else {\n res[k] = v.slice(0);\n }\n }\n }\n // position等直接值类型赋值\n else if(VALUE.hasOwnProperty(k)) {\n res[k] = v;\n }\n // geom自定义属性\n else if(GEOM.hasOwnProperty(k)) {\n res[k] = util.clone(v);\n }\n // 其余皆是数组或空,默认是一维数组只需slice即可\n else if(v) {\n let n = res[k] = v.slice(0);\n // 特殊引用里数组某项再次clone\n if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n }\n }\n else if(k === BACKGROUND_SIZE) {\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n n[i][0] = n[i][0].slice(0);\n n[i][1] = n[i][1].slice(0);\n }\n }\n else if(ARRAY_0.hasOwnProperty(k)) {\n n[0] = n[0].slice(0);\n }\n else if(ARRAY_0_1.hasOwnProperty(k)) {\n n[0] = n[0].slice(0);\n n[1] = n[1].slice(0);\n }\n else if(k === TRANSFORM) {\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n }\n }\n else if(k === ROTATE_3D) {\n n[3] = n[3].slice(0);\n }\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 { PX, 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[0]);\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 [k, v] = item;\n let t = identity();\n calSingle(t, k, 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[1] === PERCENT) {\n return v[0] * ow * 0.01;\n }\n else if(v[1] === REM) {\n return v[0] * root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n return v[0] * root.width * 0.01;\n }\n else if(v[1] === VH) {\n return v[0] * root.height * 0.01;\n }\n else if(v[1] === VMAX) {\n return v[0] * Math.max(root.width, root.height) * 0.01;\n }\n else if(v[1] === VMIN) {\n return v[0] * Math.min(root.width, root.height) * 0.01;\n }\n }\n else if(k === TRANSLATE_Y) {\n if(v[1] === PERCENT) {\n return v[0] * oh * 0.01;\n }\n else if(v[1] === REM) {\n return v[0] * root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n return v[0] * root.width * 0.01;\n }\n else if(v[1] === VH) {\n return v[0] * root.height * 0.01;\n }\n else if(v[1] === VMAX) {\n return v[0] * Math.max(root.width, root.height) * 0.01;\n }\n else if(v[1] === VMIN) {\n return v[0] * 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[0];\n}\n\nfunction normalize(transform, ow, oh, root) {\n let res = [];\n transform.forEach(item => {\n let [k, v] = item;\n res.push([k, normalizeSingle(k, v, ow, oh, root)]);\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}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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{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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.parent;\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 [ROTATE_Z, [90, 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 NODE_KEY: {\n NODE_VIRTUAL_DOM,\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, lv, ctx, cache, 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 [ROTATE_Z, [90, 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.__config[NODE_VIRTUAL_DOM] = 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 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;\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 this.__isNew = true;\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 this.__isNew = true;\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 resetBbox(bbox) {}\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 get isNew() {\n return this.__isNew;\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, draw()}}\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.draw();\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, cb) {\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[0] += x + dbx + node.__sx1 - target.sx1;\n tfo[1] += y + dby + node.__sy1 - target.sy1;\n let inverse = tf.calMatrixByOrigin(transform, tfo);\n // 先将mask本身绘制到cache上,再设置模式绘制dom本身,因为都是img所以1个就够了\n list.forEach(item => {\n cb(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 cacheMask.draw(ctx);\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 cacheOverflow.draw(ctx);\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, transform, matrix, tfo, parentMatrix, inverse) {\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 if(transform && matrix && tfo) {\n tfo[0] += ox;\n tfo[1] += oy;\n let m = tf.calMatrixByOrigin(transform, tfo);\n matrix = mx.multiply(matrix, m);\n if(!mx.isE(parentMatrix)) {\n matrix = mx.multiply(parentMatrix, matrix);\n }\n if(inverse) {\n // 很多情况mask和target相同matrix,可简化计算\n if(util.equalArr(matrix, inverse)) {\n matrix = mx.identity();\n }\n else {\n inverse = mx.inverse(inverse);\n matrix = mx.multiply(inverse, matrix);\n }\n }\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n }\n ctx.drawImage(canvas, x, y, width, height, ox, oy, width, height);\n }\n\n static draw(ctx, opacity, matrix, cache) {\n ctx.globalAlpha = opacity;\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n let { x, y, canvas, sx1, sy1, dbx, dby, width, height } = cache;\n ctx.drawImage(canvas, x, y, width, height, sx1 - dbx, sy1 - dby, 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 static NA = 0; // 无缓存模式\n static LOCAL = 1; // 局部根节点\n static CHILD = 2; // 其子节点\n static SELF = 3; // webgl专用\n}\n\nexport default Cache;\n","import change from './change';\nimport enums from '../util/enums';\n\nconst { STYLE_KEY, STYLE_KEY: {\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n OPACITY,\n FILTER,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n} } = enums;\n\nconst ENUM = {\n // 低位表示 0;\n },\n /**\n * 得出等级\n * @param k\n * @returns {number|*}\n */\n getLevel(k) {\n if(change.isIgnore(k)) {\n return ENUM.NONE;\n }\n if(k === TRANSLATE_X) {\n return ENUM.TRANSLATE_X;\n }\n else if(k === TRANSLATE_Y) {\n return ENUM.TRANSLATE_Y;\n }\n else if(k === TRANSLATE_Z) {\n return ENUM.TRANSLATE_Z;\n }\n else if(TRANSFORMS.hasOwnProperty(k)) {\n return ENUM.TRANSFORM;\n }\n else if(k === OPACITY) {\n return ENUM.OPACITY;\n }\n else if(k === FILTER) {\n return ENUM.FILTER;\n }\n else if(k === PERSPECTIVE || k === PERSPECTIVE_ORIGIN) {\n return ENUM.PERSPECTIVE;\n }\n else if(change.isRepaint(k)) {\n return ENUM.REPAINT;\n }\n return ENUM.REFLOW;\n },\n isReflow(lv) {\n return !this.isRepaint(lv);\n },\n isRepaint(lv) {\n return lv < ENUM.REFLOW;\n },\n isRebuild(lv) {\n return lv >= ENUM.REBUILD;\n },\n}, ENUM);\no.TRANSFORMS = TRANSFORMS;\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 Cache from '../refresh/Cache';\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 NODE_KEY: {\n NODE_CACHE,\n NODE_LIMIT_CACHE,\n NODE_DOM_PARENT,\n NODE_MATRIX_EVENT,\n NODE_OPACITY,\n NODE_VIRTUAL_DOM,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_FOCUS,\n UPDATE_CONFIG,\n },\n ELLIPSIS,\n} = enums;\n\nconst { AUTO } = unit;\nconst { CANVAS, SVG, WEBGL } = mode;\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 }\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 __layout(data) {\n let __cache = this.__config[NODE_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 let __config = this.__config;\n __config[NODE_LIMIT_CACHE] = false;\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[1] === 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, lv, ctx, cache, dx = 0, dy = 0) {\n let { isDestroyed, computedStyle, textBoxes, cacheStyle, __config } = this;\n if(renderMode === SVG) {\n __config[NODE_VIRTUAL_DOM] = this.__virtualDom = {\n type: 'text',\n children: [],\n };\n }\n // >=REPAINT清空bbox\n if(lv >= level.REPAINT) {\n this.__bbox = null;\n this.__filterBbox = null;\n }\n if(isDestroyed || computedStyle[DISPLAY] === 'none' || computedStyle[VISIBILITY] === 'hidden'\n || !textBoxes.length) {\n return;\n }\n if(renderMode === CANVAS || renderMode === WEBGL) {\n // webgl借用离屏canvas绘制文本,cache标识为true是普通绘制,否则是超限降级情况\n if(renderMode === WEBGL) {\n if(cache) {\n let { sx, sy, bbox } = this;\n let __cache = __config[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 __config[NODE_CACHE] = __cache;\n __cache.__available = true;\n ctx = __cache.ctx;\n dx += __cache.dx;\n dy += __cache.dy;\n __config[NODE_LIMIT_CACHE] = false;\n }\n else {\n __config[NODE_LIMIT_CACHE] = true;\n return;\n }\n }\n else {\n let root = this.root;\n let c = inject.getCacheCanvas(root.width, root.height, '__$$OVERSIZE$$__');\n ctx = c.ctx;\n let {\n [NODE_DOM_PARENT]: {\n __config: {\n [NODE_MATRIX_EVENT]: m,\n [NODE_OPACITY]: opacity,\n },\n },\n } = __config;\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n ctx.globalAlpha = opacity;\n }\n }\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.__config[NODE_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 let self = this;\n if(s === self.__content) {\n if(util.isFunction(cb)) {\n cb(-1);\n }\n return;\n }\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__content = s;\n let res = {};\n let vd = self.domParent;\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_CONFIG] = vd.__config;\n let root = vd.root;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb(diff);\n }\n },\n });\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 root() {\n return this.domParent.root;\n }\n\n get currentStyle() {\n return this.domParent.currentStyle;\n }\n\n get style() {\n return this.__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 let { __sx1: sx, __sy1: sy, width, height,\n computedStyle: {\n [TEXT_STROKE_WIDTH]: textStrokeWidth,\n },\n } = this;\n // TODO: 文字描边暂时不清楚最大值是多少,影响不确定,先按描边宽算,因为会出现>>0.5宽的情况\n let half = textStrokeWidth;\n return [sx - half, sy - half, sx + width + half, sy + height + half];\n }\n\n get filterBbox() {\n if(!this.__filterBbox) {\n let 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\nText.prototype.__renderByMask = Text.prototype.render;\n\nexport default Text;\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 Text from '../node/Text';\nimport util from './util';\nimport $$type from './$$type';\nimport enums from './enums';\nimport flatten from './flatten';\n\nconst { NODE_KEY: {\n NODE_DOM_PARENT,\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n} } = enums;\nconst { TYPE_VD, TYPE_GM, TYPE_CP } = $$type;\n\nlet Xom, Dom, Img, Geom, Component;\n\nfunction initRoot(cd, root) {\n let c = flatten({\n tagName: root.tagName,\n props: {},\n children: cd,\n $$type: TYPE_VD,\n });\n root.__json = c;\n root.__host = root;\n let children = build(c.children, root, root);\n return relation(root, children);\n}\n\nfunction initDom(json, root, host, parent) {\n let vd = build(json, root, host);\n return relation(parent, vd);\n}\n\nfunction initCp(json, root, host) {\n if(util.isObject(json)) {\n // cp的flatten在__init中自己做\n return build(json, root, host);\n }\n // text的relation会由上层如Root设置\n else {\n return new Text(json);\n }\n}\n\nfunction initCp2(json, root, host, parent) {\n let vd = new json.klass(json.props);\n vd.__tagName = json.tagName || vd.__tagName;\n vd.__root = root;\n vd.__host = host;\n vd.__json = json;\n vd.__init();\n return relation(parent, vd);\n}\n\n/**\n * 将初始json文件生成virtualDom\n * @param json\n * @param root\n * @param host\n * @param hasP 出现过p标签\n * @returns vd\n */\nfunction build(json, root, host, hasP) {\n if(Array.isArray(json)) {\n return json.map(item => build(item, root, host, hasP));\n }\n let vd;\n if(util.isObject(json) && json.$$type) {\n let { tagName, props, children, klass, $$type, __inheritAnimate, __animateRecords } = json;\n // 更新过程中无变化的cp直接使用原来生成的\n if($$type === TYPE_CP && json.__placeholder) {\n return json.__placeholder;\n }\n if($$type === TYPE_VD) {\n if(tagName === 'img') {\n vd = new Img(tagName, props);\n if(Array.isArray(children) && children.length) {\n throw new Error('Img can not contain children');\n }\n }\n else {\n vd = new Dom(tagName, props);\n }\n // 检查p不能包含div\n if(tagName === 'p') {\n hasP = true;\n }\n else if(tagName === 'div' && hasP) {\n throw new Error('Markup p can not contain div');\n }\n if(Array.isArray(children)) {\n children = relation(vd, build(children, root, host, hasP));\n }\n else {\n children = [];\n }\n vd.__children = children;\n }\n else if($$type === TYPE_GM) {\n if(util.isString(tagName)) {\n let klass = Geom.getRegister(tagName);\n vd = new klass(tagName, props);\n }\n else if(tagName) {\n vd = new tagName('$', props);\n }\n }\n else if($$type === TYPE_CP) {\n vd = new klass(props);\n vd.__tagName = tagName || vd.__tagName;\n }\n else {\n return new Text(json);\n }\n // 根parse需要用到真正的vd引用,然后vd也要引用json,用以做domApi\n json.vd = vd;\n vd.__json = json;\n // 递归parse中的动画记录需特殊处理,将target改为真正的vd引用\n if(__animateRecords) {\n vd.__animateRecords = __animateRecords;\n __animateRecords.list.forEach(item => {\n item.target = item.target.vd;\n });\n delete json.__animateRecords;\n }\n // 更新过程中key相同或者普通相同的vd继承动画\n if(__inheritAnimate) {\n util.extendAnimate(__inheritAnimate, vd);\n delete json.__inheritAnimate;\n }\n vd.__root = root;\n vd.__host = host;\n if($$type === TYPE_CP) {\n vd.__init();\n }\n let ref = props.ref;\n if(util.isString(ref) && ref || util.isNumber(ref)) {\n host.ref[ref] = vd;\n }\n else if(util.isFunction(ref)) {\n ref(vd);\n }\n return vd;\n }\n return new Text(json);\n}\n\n/**\n * 设置关系,父子和兄弟\n * @param parent\n * @param children\n * @param options\n * @returns {Xom|Text|Component}\n */\nfunction relation(parent, children, options = {}) {\n if(Array.isArray(children)) {\n children.forEach(item => {\n relation(parent, item, options);\n });\n }\n else if(children instanceof Xom || children instanceof Component || children instanceof Text) {\n children.__parent = parent;\n children.__domParent = parent;\n // 极为恶心,为了v8的性能优化,text复用parent的__config部分,但domParent重设\n if(children instanceof Text) {\n [\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n ].forEach(k => {\n children.__config[k] = parent.__config[k];\n });\n }\n if(children.__config) {\n children.__config[NODE_DOM_PARENT] = parent;\n }\n if(options.prev) {\n options.prev.__next = children;\n children.__prev = options.prev;\n }\n options.prev = children;\n // 文字视作为父节点的直接文字子节点\n if(children instanceof Component) {\n let sr = children.shadowRoot;\n if(sr instanceof Text) {\n sr.__parent = parent;\n [\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n ].forEach(k => {\n children.__config[k] = parent.__config[k];\n });\n }\n sr.__domParent = parent;\n if(sr.__config) {\n sr.__config[NODE_DOM_PARENT] = parent;\n }\n }\n }\n return children;\n}\n\nexport default {\n ref(o) {\n Xom = o.Xom;\n Dom = o.Dom;\n Img = o.Img;\n Geom = o.Geom;\n Component = o.Component;\n },\n initRoot,\n initDom,\n initCp,\n initCp2,\n relation,\n};\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 builder from '../util/builder';\nimport Event from '../util/Event';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport flatten from '../util/flatten';\nimport css from '../style/css';\nimport change from '../refresh/change';\n\nconst { isNil, isFunction, clone, extend } = util;\n\nconst REGISTER = {};\n\n/**\n * 向上设置cp类型叶子节点,表明从root到本节点这条链路有更新,使得无链路更新的节约递归\n * 在check时树递归会用到,判断是否需要查找cp更新\n * @param cp\n */\nfunction setUpdateFlag(cp) {\n // 去重\n if(cp.__hasCpUpdate) {\n return;\n }\n cp.__hasCpUpdate = true;\n let host = cp.host;\n if(host) {\n setUpdateFlag(host);\n }\n}\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.state = {};\n this.__isMounted = false;\n this.__taskList = [];\n }\n\n setState(n, cb) {\n let self = this;\n if(isNil(n)) {\n n = {};\n }\n else if(isFunction(n)) {\n return;\n }\n else {\n if(Object.keys(n).length === 0) {\n if(isFunction(cb)) {\n cb.call(self);\n }\n return;\n }\n let state = clone(self.state);\n n = extend(state, n);\n }\n let root = self.root;\n if(root && self.__isMounted) {\n // 一帧之内多次调用,需合并\n if(self.__nextState) {\n Object.assign(self.__nextState, n);\n self.__taskList.push(cb);\n }\n else {\n self.__nextState = n;\n self.__taskList = [cb];\n // 回调更新列表,before执行时splice出来供after执行,防止中途产生的后续setState干扰\n let list = [];\n let t = self.__task = {\n __before: () => {\n list = self.__taskList.splice(0);\n // 标识更新\n setUpdateFlag(this);\n },\n __after: () => {\n // self.__nextState = null; 由updater.js每次refresh前同步执行清空,这里不能异步清除,否则frame动画会乱序\n list.forEach(cb => {\n if(isFunction(cb)) {\n cb.call(self);\n }\n });\n },\n };\n root.addRefreshCp(t);\n }\n }\n // 构造函数中调用还未render,\n else if(isFunction(cb)) {\n self.state = n;\n cb.call(self);\n }\n }\n\n /**\n * build中调用初始化,json有值时是update过程才有,且处理过flatten\n * @param json\n * @private\n */\n __init(json) {\n this.__ref = {};\n let root = this.root;\n let cd = json || flatten(this.render());\n let sr = builder.initCp(cd, root, this);\n this.__cd = cd;\n if(sr instanceof Text) {\n // 文字视作为父节点的直接文字子节点,在builder里做\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 else if(!(sr instanceof Component)) {\n // 本身build是递归的,子cp已经初始化了\n throw new Error('Component render() must return a dom/text: ' + this);\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 // shadow指向直接renderRoot,shadowRoot考虑到返回Component的递归即hoc高阶组件\n // host是直接所属,hostRoot同考虑到高阶组件\n this.__shadow = sr;\n sr.__host = this;\n // 递归下去,多层级时执行顺序由里到外,最终会被最上层执行替换\n while(sr instanceof Component) {\n sr.__hostRoot = this;\n sr.shadow.__host = sr;\n sr = sr.shadow;\n }\n this.__shadowRoot = sr;\n sr.__hostRoot = this;\n if(!this.__isMounted) {\n this.__isMounted = true;\n if(isFunction(this.componentDidMount)) {\n root.once(Event.REFRESH, () => {\n this.componentDidMount();\n });\n }\n }\n }\n\n render() {\n inject.warn('Component must 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 this.root.delRefreshTask(this.__task);\n if(this.shadowRoot) {\n this.shadowRoot.__destroy();\n }\n this.__parent = 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 'availableAnimating',\n 'effectiveAnimating',\n 'displayAnimating',\n 'visibilityAnimating',\n 'bbox',\n '__config',\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 '__layoutAbs',\n '__layoutNone',\n '__tryLayInline',\n '__offsetX',\n '__offsetY',\n '__calAutoBasis',\n '__computeReflow',\n '__renderAsMask',\n '__renderByMask',\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 [SCALE_X, [targetWidth / imgWidth, NUMBER]],\n [SCALE_Y, [targetHeight / imgHeight, 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 FONT_SIZE,\n },\n NODE_KEY: {\n NODE_DEFS_CACHE,\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.__config[NODE_DEFS_CACHE].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, __config, 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 __config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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 if(item[1]) {\n item[1](diff);\n }\n else {\n item.__after && item.__after(diff);\n }\n }\n }\n else {\n for(let i = 0; i < length; i++) {\n let item = list[i];\n if(item[0]) {\n item[0](diff);\n }\n else {\n item.__before && item.__before(diff);\n }\n }\n }\n}\n\nlet isPause;\n\nclass Frame {\n constructor() {\n this.__hookTask = []; // 动画刷新后,每个root注册的刷新回调执行\n this.__task = [];\n this.__taskCp = []; // 区别于task,component专用,和animate等其它不同流水线,在最后执行,防止混了 #122\n this.__now = null;\n }\n\n __init() {\n let self = this;\n let { task, taskCp } = 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 && !taskCp.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 cloneCp = taskCp.splice(0); // task要常驻,taskCp只1次直接splice清空\n let length = clone.length;\n let lengthCp = cloneCp.length;\n traversal(clone, length, diff, false);\n traversal(cloneCp, lengthCp, diff, false);\n // 执行动画造成的每个Root的刷新并清空\n let list = self.__hookTask.splice(0);\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n item && item();\n }\n // 普通的before/after\n traversal(clone, length, diff, true);\n traversal(cloneCp, lengthCp, diff, true);\n // 还有则继续,没有则停止节省性能\n if(task.length || taskCp.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 __nextFrameCp(handle) {\n let { task, taskCp } = this;\n if(!task.length && !taskCp.length) {\n this.__init();\n }\n taskCp.push(handle);\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 get taskCp() {\n return this.__taskCp;\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 },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_STYLE,\n UPDATE_KEYS,\n UPDATE_CONFIG,\n },\n KEY_FRAME_KEY: {\n FRAME_STYLE,\n FRAME_TIME,\n FRAME_EASING,\n FRAME_TRANSITION,\n },\n ANIMATE_KEY: {\n I_ASSIGNING,\n I_IN_FPS,\n I_IS_DELAY,\n I_BEGIN,\n I_END,\n I_FINISHED,\n I_NEXT_END,\n I_FIRST_PLAY,\n I_PLAY_CB,\n I_TARGET,\n I_ROOT,\n I_FRAMES,\n I_FRAMES_R,\n I_CURRENT_TIME,\n I_NEXT_TIME,\n I_STYLE,\n I_DURATION,\n I_ITERATIONS,\n I_FILL,\n I_PLAYBACK_RATE,\n I_PLAY_COUNT,\n I_PLAY_STATE,\n I_DESTROYED,\n I_START_TIME,\n I_FPS_TIME,\n I_EASING,\n I_ENTER_FRAME,\n I_DELAY,\n I_END_DELAY,\n I_KEYS,\n I_ORIGIN_STYLE,\n I_CURRENT_FRAMES,\n I_CURRENT_FRAME,\n I_SPF_LIMIT,\n I_FPS,\n I_DIRECTION,\n I_FIRST_ENTER,\n I_STAY_BEGIN,\n I_STAY_END,\n I_IS2,\n I_END_TIME,\n I_NODE_CONFIG,\n I_ROOT_CONFIG,\n I_OUT_BEGIN_DELAY,\n I_TIME_STAMP,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, INHERIT, RGBA, STRING, NUMBER, REM, VW, VH, VMAX, VMIN, GRADIENT, calUnit } = unit;\nconst { isNil, isFunction, isNumber, isObject, isString, clone, equalArr } = util;\nconst { linear } = easing;\nconst { cloneStyle } = css;\nconst { isGeom, GEOM } = change;\n\nconst {\n COLOR_HASH,\n LENGTH_HASH,\n RADIUS_HASH,\n GRADIENT_HASH,\n EXPAND_HASH,\n GRADIENT_TYPE,\n} = key;\n\nconst NUM_CAL_HASH = {\n};\nObject.assign(NUM_CAL_HASH, LENGTH_HASH);\nObject.assign(NUM_CAL_HASH, EXPAND_HASH);\n\nfunction unify(frames, target) {\n let hash = {};\n let keys = [];\n // 获取所有关键帧的属性\n frames.forEach(item => {\n let style = item[FRAME_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[FRAME_STYLE];\n keys.forEach(k => {\n if(!style.hasOwnProperty(k) || isNil(style[k])) {\n if(GEOM.hasOwnProperty(k)) {\n style[k] = target.getProps(k);\n }\n else {\n if(k === TRANSLATE_X && style.hasOwnProperty(TRANSLATE_PATH)) {\n style[k] = style[TRANSLATE_PATH][0];\n }\n else if(k === TRANSLATE_Y && style.hasOwnProperty(TRANSLATE_PATH)) {\n style[k] = style[TRANSLATE_PATH][1];\n }\n else {\n style[k] = target.currentStyle[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[FRAME_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] = [[MATRIX, m]];\n }\n else if(v[1] === INHERIT) {\n if(k === COLOR || k === TEXT_STROKE_COLOR) {\n style[k] = [util.rgba2int(computedStyle[k]), RGBA];\n }\n else if(LENGTH_HASH.hasOwnProperty(k)) {\n style[k] = [computedStyle[k], PX];\n }\n else if(k === FONT_WEIGHT) {\n style[k] = [computedStyle[k], NUMBER];\n }\n else if(k === FONT_STYLE || k === FONT_FAMILY || k === TEXT_ALIGN || k === TEXT_STROKE_OVER) {\n style[k] = [computedStyle[k], STRING];\n }\n }\n });\n });\n}\n\n/**\n * 通知root更新当前动画,需要根据frame的状态来决定是否是同步插入\n * 在异步时,因为动画本身是异步,需要addRefreshTask\n * 而如果此时frame在执行before过程中,说明帧动画本身是在before计算的,需要同步插入\n * @param style\n * @param keys 样式所有的key\n * @param __config\n * @param root\n * @param node\n */\nfunction genBeforeRefresh(style, keys, __config, root, node) {\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_STYLE] = style;\n res[UPDATE_KEYS] = keys;\n res[UPDATE_CONFIG] = __config[I_NODE_CONFIG];\n root.__addUpdate(node, __config[I_NODE_CONFIG], root, __config[I_ROOT_CONFIG], res);\n __config[I_STYLE] = style;\n __config[I_ASSIGNING] = true;\n // frame每帧回调时,下方先执行计算好变更的样式,这里特殊插入一个hook,让root增加一个刷新操作\n // 多个动画调用因为相同root也只会插入一个,这样在所有动画执行完毕后frame里检查同步进行刷新,解决单异步问题\n root.__frameHook();\n}\n\n/**\n * 将每帧的样式格式化,提取出offset属性并转化为时间,提取出缓动曲线easing\n * @param style 关键帧样式\n * @param duration 动画时间长度\n * @param es options的easing曲线控制,frame没有自定义则使用全局的\n * @returns {{style: *, time: number, easing: *, transition: []}}\n */\nfunction framing(style, duration, es) {\n let { offset, easing } = style;\n // 这两个特殊值提出来存储不干扰style\n delete style.offset;\n delete style.easing;\n // translatePath特殊对待,ae的曲线运动动画\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[1] === NUMBER) {\n v[1] = PX;\n }\n return v;\n });\n }\n let res = [];\n res[FRAME_STYLE] = style;\n res[FRAME_TIME] = offset * duration;\n res[FRAME_EASING] = easing || es;\n res[FRAME_TRANSITION] = [];\n return res;\n}\n\nfunction calByUnit(p, n, container, root) {\n if(p[1] === PX) {\n if(n[1] === PERCENT) {\n return n[0] * 0.01 * container - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width * 0.01 - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height * 0.01 - p[0];\n }\n else if(n[1] === VMAX) {\n return n[0] * Math.max(root.width, root.height) * 0.01 - p[0];\n }\n else if(n[1] === VMIN) {\n return n[0] * Math.min(root.width, root.height) * 0.01 - p[0];\n }\n }\n else if(p[1] === PERCENT) {\n if(n[1] === PX) {\n return n[0] * 100 / container - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * root.computedStyle[FONT_SIZE] * 100 / container - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width / container - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height / container - p[0];\n }\n else if(n[1] === VMAX) {\n return n[0] * Math.max(root.width, root.height) / container - p[0];\n }\n else if(n[1] === VMIN) {\n return n[0] * Math.min(root.width, root.height) / container - p[0];\n }\n }\n else if(p[1] === REM) {\n if(n[1] === PX) {\n return n[0] / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * 0.01 * container / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width * 0.01 / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height * 0.01 / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VMAX) {\n return n[0] * Math.max(root.width, root.height) * 0.01 / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VMIN) {\n return n[0] * Math.min(root.width, root.height) * 0.01 / root.computedStyle[FONT_SIZE] - p[0];\n }\n }\n else if(p[1] === VW) {\n if(n[1] === PX) {\n return n[0] * 100 / root.width - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * 100 * root.computedStyle[FONT_SIZE] / root.width - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * container / root.width - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height / root.width - p[0];\n }\n else if(n[1] === VMAX) {\n return n[0] * Math.max(root.width, root.height) / root.width - p[0];\n }\n else if(n[1] === VMIN) {\n return n[0] * Math.min(root.width, root.height) / root.width - p[0];\n }\n }\n else if(p[1] === VH) {\n if(n[1] === PX) {\n return n[0] * 100 / root.height - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * 100 * root.computedStyle[FONT_SIZE] / root.height - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width / root.height - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * container / root.height - p[0];\n }\n else if(n[1] === VMAX) {\n return n[0] * Math.max(root.width, root.height) / root.height - p[0];\n }\n else if(n[1] === VMIN) {\n return n[0] * Math.min(root.width, root.height) / root.height - p[0];\n }\n }\n else if(p[1] === VMAX) {\n if(n[1] === PX) {\n return n[0] * 100 / Math.max(root.width, root.height) - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * 100 * root.computedStyle[FONT_SIZE] / Math.max(root.width, root.height) - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * container / Math.max(root.width, root.height) - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width / Math.max(root.width, root.height) - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height / Math.max(root.width, root.height) - p[0];\n }\n else if(n[1] === VMIN) {\n return n[0] * Math.min(root.width, root.height) / Math.max(root.width, root.height) - p[0];\n }\n }\n else if(p[1] === VMIN) {\n if(n[1] === PX) {\n return n[0] * 100 / Math.min(root.width, root.height) - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * 100 * root.computedStyle[FONT_SIZE] / Math.min(root.width, root.height) - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * container / Math.min(root.width, root.height) - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width / Math.min(root.width, root.height) - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height / Math.min(root.width, root.height) - p[0];\n }\n else if(n[1] === VMAX) {\n return n[0] * Math.max(root.width, root.height) / Math.min(root.width, root.height) - p[0];\n }\n }\n}\n\n/**\n * 计算两帧之间的差,单位不同的以后面为准,返回的v表示差值\n * 没有变化返回空\n * auto等无法比较的不参与计算,不返回来标识无过度效果\n * @param prev 上一帧样式\n * @param next 下一帧样式\n * @param k 比较的样式名\n * @param target dom对象\n * @param tagName dom名\n * @returns {{k: *, v: *}}\n */\nfunction calDiff(prev, next, k, target, tagName) {\n let res = [k];\n let p = prev[k];\n let n = next[k];\n if(k === TRANSFORM) {\n // transform因默认值null很特殊,不存在时需给默认矩阵\n if(!p && !n) {\n return;\n }\n let pm, nm;\n if(p) {\n pm = p[0][1];\n }\n else {\n pm = mx.identity();\n }\n if(n) {\n nm = n[0][1];\n }\n else {\n nm = mx.identity();\n }\n // transform特殊被初始化转成matrix矩阵,直接计算差值\n if(equalArr(pm, nm)) {\n return;\n }\n res[1] = [\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 return res;\n }\n else if(k === ROTATE_3D) {\n if(equalArr(p, n)) {\n return;\n }\n res[1] = [n[0] - n[0], n[1] - p[1], n[2] - p[2], [n[3][0] - p[3][0], n[3][1]]];\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[0] !== nv[0]) {\n v.push(null);\n }\n else {\n let k = pv[0];\n if(k === 'blur') {\n if(pv[1][1] === nv[1][1]) {\n v.push(nv[1][0] - pv[1][0]);\n }\n else {\n let v2 = calByUnit(pv[1], nv[1], 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(nv[1][0] - pv[1][0]);\n }\n else if(k === 'dropShadow') {\n let v2 = [];\n for(let i = 0; i < 4; i++) {\n let a = pv[1][i], b = nv[1][i];\n if(a[1] === b[1]) {\n v2.push(b[0] - a[0]);\n }\n else {\n v2.push(calByUnit(a, b, i === 1 ? taraget.clientHeight: target.clientWidth, target.root));\n }\n }\n v2.push([\n nv[1][4][0] - pv[1][4][0],\n nv[1][4][1] - pv[1][4][1],\n nv[1][4][2] - pv[1][4][2],\n nv[1][4][3] - pv[1][4][3],\n ])\n v.push(v2);\n }\n }\n }\n res[1] = v;\n }\n else if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN) {\n res[1] = [];\n for(let i = 0; i < 2; i++) {\n let pi = p[i];\n let ni = n[i];\n if(pi[1] === ni[1]) {\n res[1].push(ni[0] - pi[0]);\n }\n else {\n let v = calByUnit(pi, ni, target[i ? 'outerHeight' : 'outerWidth'], target.root);\n res[1].push(v || 0);\n }\n }\n if(equalArr(res[1], [0, 0])) {\n return;\n }\n }\n else if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n res[1] = [];\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) {\n res[1].push(null);\n continue;\n }\n if(pi[1] === ni[1]) {\n let v = ni[0] - pi[0];\n if(!v) {\n res[1].push(null);\n return;\n }\n res[1].push(v);\n }\n else {\n let k2 = k === BACKGROUND_POSITION_X ? 'offsetWidth' : 'offsetHeight';\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 let v = calByUnit(pi, ni, target[k2], target.root);\n if(!v) {\n res[1].push(null);\n return;\n }\n res[1].push(v);\n }\n }\n }\n else if(k === BOX_SHADOW) {\n res[1] = [];\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 let v = [];\n // x/y/blur/spread\n for(let j = 0; j < 4; j++) {\n v.push(b[j] - a[j]);\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[1].push(v);\n }\n }\n else if(EXPAND_HASH.hasOwnProperty(k)) {\n if(p[1] === n[1]) {\n let v = n[0] - p[0];\n if(v === 0) {\n return;\n }\n res[1] = 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[1] = v;\n }\n }\n else if(k === BACKGROUND_SIZE) {\n res[1] = [];\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[1].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[1] === nn[1]) {\n temp.push(nn[0] - pp[0]);\n }\n else {\n let k2 = i ? 'offsetWidth' : 'offsetHeight';\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 let v = calByUnit(pp, nn, target[k2], target.root);\n temp.push(v || 0);\n }\n }\n if(equalArr(temp, [0, 0])) {\n res[1].push(null);\n }\n else {\n res[1].push(temp);\n has = true;\n }\n }\n if(!has) {\n return;\n }\n }\n else if(GRADIENT_HASH.hasOwnProperty(k)) {\n // backgroundImage发生了渐变色和图片的变化,fill发生渐变色和纯色的变化等\n res[1] = [];\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[1] !== ni[1]) {\n res[1].push(null);\n continue;\n }\n let isGradient = pi[1] === GRADIENT;\n pi = pi[0];\n ni = ni[0];\n let temp = [];\n // 渐变\n if(isGradient) {\n let r = calDiffGradient(pi, ni, target);\n if(!r) {\n res[1].push(null);\n continue;\n }\n temp = r;\n }\n // 纯色\n else {\n if(equalArr(ni, pi)) {\n res[1].push(null);\n }\n temp[0] = [\n ni[0] - pi[0],\n ni[1] - pi[1],\n ni[2] - pi[2],\n ni[3] - pi[3]\n ];\n }\n res[1].push(temp);\n }\n }\n else if(COLOR_HASH.hasOwnProperty(k)) {\n if(n[1] !== p[1]) {\n return;\n }\n // 特殊增加支持有gradient的先判断,仅color和textStrokeColor支持\n let isGradient = n[1] === GRADIENT;\n n = n[0];\n p = p[0];\n if(isGradient) {\n let r = calDiffGradient(p, n, target);\n if(!r) {\n return;\n }\n res[1] = r;\n }\n else {\n // 透明变化无视\n if(equalArr(n, p) || n[3] === 0 && p[3] === 0) {\n return;\n }\n res[1] = [\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(RADIUS_HASH.hasOwnProperty(k)) {\n // x/y都相等无需\n if(n[0][0] === p[0][0] && n[0][1] === p[0][1]\n && n[1][0] === p[1][0] && n[1][1] === p[1][1]) {\n return;\n }\n res[1] = [];\n for(let i = 0; i < 2; i++) {\n if(n[i][1] === p[i][1]) {\n res[1].push(n[i][0] - p[i][0]);\n }\n else {\n let v = calByUnit(p[i], n[i], target[i ? 'outerHeight' : 'outerWidth'], target.root);\n res[1].push(v || 0);\n }\n }\n }\n else if(LENGTH_HASH.hasOwnProperty(k)) {\n // auto不做动画\n if(p[1] === AUTO || n[1] === AUTO) {\n return;\n }\n let computedStyle = target.computedStyle;\n let parentComputedStyle = (target.domParent || target).computedStyle;\n let diff = 0;\n if(p[1] === n[1]) {\n diff = n[0] - p[0];\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[1] !== AUTO && n[1] !== AUTO) {\n diff = calByUnit(p, n, parentComputedStyle[HEIGHT], target.root);\n }\n }\n // 其余都是相对于父width的\n else {\n if(p[1] !== AUTO && n[1] !== 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[1] = diff;\n }\n else if(GEOM.hasOwnProperty(k)) {\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[1] = 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[1] = [];\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[1].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[1].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[1] = [];\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[1].push(null);\n }\n else {\n res[1].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[1] = 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[1] = [];\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[1].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[1].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[1] = [\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[1] = n - p;\n }\n }\n }\n else if(k === OPACITY || k === Z_INDEX) {\n if(n === p) {\n return;\n }\n res[1] = n - p;\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[1] = p.map((item, i) => {\n let [v, u] = item;\n if(u === PERCENT) {\n if(i % 2 === 0) {\n return [(parseFloat(v) || 0) * 0.01 * target[k1], PX];\n }\n else {\n return [(parseFloat(v) || 0) * 0.01 * target[k2], PX];\n }\n }\n else if(u === REM) {\n return [(parseFloat(v) || 0) * root.computedStyle[FONT_SIZE] * 100, PX];\n }\n else if(u === VW) {\n return [(parseFloat(v) || 0) * 0.01 * root.width, PX];\n }\n else if(u === VH) {\n return [(parseFloat(v) || 0) * 0.01 * root.height, PX];\n }\n else if(u === VMAX) {\n return [(parseFloat(v) || 0) * 0.01 * Math.max(root.width, root.height), PX];\n }\n else if(u === VMIN) {\n return [(parseFloat(v) || 0) * 0.01 * Math.min(root.width, root.height), PX];\n }\n else {\n return [parseFloat(v) || 0, PX];\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 || !GRADIENT_TYPE.hasOwnProperty(p.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][1] === b[1][1]) {\n t.push(b[1][0] - a[1][0]);\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[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 }\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// 计算两帧之间不相同的变化,存入transition,相同的忽略\nfunction calFrame(prev, next, keys, target, tagName) {\n keys.forEach(k => {\n let ts = calDiff(prev[FRAME_STYLE], next[FRAME_STYLE], k, target, tagName);\n // 可以形成过渡的才会产生结果返回\n if(ts) {\n prev[FRAME_TRANSITION].push(ts);\n }\n });\n return next;\n}\n\nfunction binarySearch(i, j, time, frames) {\n if(i === j) {\n let frame = frames[i];\n if(frame[FRAME_TIME] > time) {\n return i - 1;\n }\n return i;\n }\n else {\n let middle = i + ((j - i) >> 1);\n let frame = frames[middle];\n if(frame[FRAME_TIME] === time) {\n return middle;\n }\n else if(frame[FRAME_TIME] > time) {\n return binarySearch(i, Math.max(middle - 1, i), time, frames);\n }\n else {\n return binarySearch(Math.min(middle + 1, j), j, time, frames);\n }\n }\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 keys 所有样式key\n * @param percent 到下一帧时间的百分比\n * @param target vd\n * @returns {*}\n */\nfunction calIntermediateStyle(frame, keys, percent, target) {\n let style = cloneStyle(frame[FRAME_STYLE], keys);\n let timingFunction = getEasing(frame[FRAME_EASING]);\n if(timingFunction && timingFunction !== linear) {\n percent = timingFunction(percent);\n }\n let transition = frame[FRAME_TRANSITION];\n for(let i = 0, len = transition.length; i < len; i++) {\n let [k, v] = transition[i];\n let st = style[k];\n // transform特殊处理,只有1个matrix,有可能不存在,需给默认矩阵\n if(k === TRANSFORM) {\n if(!st) {\n st = style[k] = [[MATRIX, mx.identity()]];\n }\n for(let i = 0; i < 16; i++) {\n st[0][1][i] += v[i] * percent;\n }\n }\n // 特殊的曲线运动计算,转换为translateXY,出现在最后一定会覆盖原本的translate防重\n else if(k === TRANSLATE_PATH) {\n let t = 1 - percent;\n if(v.length === 8) {\n style[TRANSLATE_X] = [\n v[0][0] * t * t * t\n + 3 * v[2][0] * percent * t * t\n + 3 * v[4][0] * percent * percent * t\n + v[6][0] * percent * percent * percent,\n PX,\n ];\n style[TRANSLATE_Y] = [\n v[1][0] * t * t * t\n + 3 * v[3][0] * percent * t * t\n + 3 * v[5][0] * percent * percent * t\n + v[7][0] * percent * percent * percent,\n PX,\n ];\n }\n else if(v.length === 6) {\n style[TRANSLATE_X] = [\n v[0][0] * t * t\n + 2 * v[2][0] * percent * t\n + v[4][0] * percent * percent,\n PX,\n ];\n style[TRANSLATE_Y] = [\n v[1][0] * t * t\n + 3 * v[3][0] * percent * t\n + v[5][0] * percent * percent,\n PX,\n ];\n }\n }\n else if(k === ROTATE_3D) {\n st[0] += v[0] * percent;\n st[1] += v[1] * percent;\n st[2] += v[2] * percent;\n st[3][0] += v[3][0] * percent;\n }\n else if(NUM_CAL_HASH.hasOwnProperty(k)) {\n if(v) {\n st[0] += v * percent;\n }\n }\n else if(k === FILTER) {\n // 只有1个样式声明了filter另外一个为空,会造成无样式,需初始化数组并在下面计算出样式存入\n if(!st) {\n st = style[k] = [];\n }\n for(let i = 0, len = v.length; i < len; i++) {\n let item = v[i];\n if(item) {\n let k2 = st[i][0], v2 = st[i][1];\n // 只有dropShadow是多个数组,存放x/y/blur/spread/color\n if(k2 === 'dropShadow') {\n v2[0][0] += item[0] * percent;\n v2[1][0] += item[1] * percent;\n v2[2][0] += item[2] * percent;\n v2[3][0] += 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[0] += item * percent;\n }\n }\n }\n }\n else if(RADIUS_HASH.hasOwnProperty(k)) {\n for(let i = 0; i < 2; i++) {\n st[i][0] += v[i] * percent;\n }\n }\n else if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN) {\n if(v[0] !== 0) {\n st[0][0] += v[0] * percent;\n }\n if(v[1] !== 0) {\n st[1][0] += v[1] * percent;\n }\n }\n else if(k === BOX_SHADOW) {\n for(let i = 0, len = Math.min(st.length, v.length); i < len; i++) {\n // x/y/blur/spread\n for(let j = 0; j < 4; j++) {\n st[i][j] += v[i][j] * percent;\n }\n // rgba\n for(let j = 0; j < 4; j++) {\n st[i][4][j] += v[i][4][j] * percent;\n }\n }\n }\n else if(k === BACKGROUND_SIZE) {\n st.forEach((item, i) => {\n if(v[i]) {\n item[0][0] += v[i][0] * percent;\n item[1][0] += v[i][1] * percent;\n }\n });\n }\n else if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n st.forEach((item, i) => {\n if(v[i]) {\n item[0] += v[i] * percent;\n }\n });\n }\n else if(GRADIENT_HASH.hasOwnProperty(k)) {\n st.forEach((st2, i) => {\n let v2 = v[i];\n if(!v2) {\n return;\n }\n if(st2[1] === GRADIENT && GRADIENT_TYPE.hasOwnProperty(st2[0].k)) {\n st2 = st2[0];\n let [c, d, p, z] = v2;\n for(let i = 0, len = Math.min(st2.v.length, c.length); i < len; i++) {\n let a = st2.v[i];\n let b = c[i];\n a[0][0] += b[0][0] * percent;\n a[0][1] += b[0][1] * percent;\n a[0][2] += b[0][2] * percent;\n a[0][3] += b[0][3] * percent;\n if(a[1] && b[1]) {\n a[1][0] += b[1] * percent;\n }\n }\n if(st2.k === 'linear' && st2.d !== undefined && d !== undefined) {\n if(Array.isArray(d)) {\n st2.d[0] += d[0] * percent;\n st2.d[1] += d[1] * percent;\n st2.d[2] += d[2] * percent;\n st2.d[3] += d[3] * percent;\n }\n else {\n st2.d += d * percent;\n }\n }\n if(st2.k === 'radial') {\n if(st2.z !== undefined && z !== undefined) {\n st2.z[0] += z[0] * percent;\n st2.z[1] += z[1] * percent;\n st2.z[2] += z[2] * percent;\n st2.z[3] += z[3] * percent;\n st2.z[4] += z[4] * percent;\n }\n else if(st2.p !== undefined && p !== undefined) {\n st2.p[0][0] += p[0] * percent;\n st2.p[1][0] += p[1] * percent;\n }\n }\n else if(st2.k === 'conic' && st2.d !== undefined && d !== undefined) {\n st2.d += d * percent;\n st2.p[0][0] += p[0] * percent;\n st2.p[1][0] += p[1] * percent;\n }\n }\n // fill纯色\n else {\n st2 = st2[0];\n let c = v2[0];\n st2[0] += c[0] * percent;\n st2[1] += c[1] * percent;\n st2[2] += c[2] * percent;\n st2[3] += c[3] * percent;\n }\n });\n }\n // color可能超限[0,255],但浏览器已经做了限制,无需关心\n else if(COLOR_HASH.hasOwnProperty(k)) {\n st = st[0];\n st[0] += v[0] * percent;\n st[1] += v[1] * percent;\n st[2] += v[2] * percent;\n st[3] += v[3] * percent;\n }\n else if(GEOM.hasOwnProperty(k)) {\n let st = style[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 style[k] = st.map((item, i) => {\n return fn(item, v[i], percent);\n });\n }\n else {\n style[k] = 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 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] += 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) && !isNil(st2)) {\n for(let i = 0, len = Math.min(st2.length, item.length); i < len; i++) {\n let o = st2[i];\n let n = item[i];\n if(!isNil(o) && !isNil(n)) {\n st2[i] += n * percent;\n }\n }\n }\n });\n }\n else {\n v.forEach((item, i) => {\n if(!isNil(item) && !isNil(st[i])) {\n st[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] += 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] += v[0] * percent;\n }\n if(!isNil(st[1]) && !isNil(v[1])) {\n st[1] += v[1] * percent;\n }\n }\n else {\n if(!isNil(st) && !isNil(v)) {\n style[k] += v * percent;\n }\n }\n }\n }\n else if(k === OPACITY || k === Z_INDEX) {\n style[k] += v * percent;\n // 精度问题可能会超过[0,1]区间\n if(k === OPACITY) {\n if(style[k] < 0) {\n style[k] = 0;\n }\n else if(style[k] > 1) {\n style[k] = 1;\n }\n }\n }\n }\n return style;\n}\n\nfunction gotoOverload(options, cb) {\n if(isFunction(options)) {\n cb = options;\n options = {};\n }\n return [options || {}, cb];\n}\n\nfunction calDiffTime(__config, diff) {\n let playbackRate = __config[I_PLAYBACK_RATE];\n let spfLimit = __config[I_SPF_LIMIT];\n let fps = __config[I_FPS];\n let v = __config[I_CURRENT_TIME] = __config[I_NEXT_TIME];\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 __config[I_NEXT_TIME] += diff;\n return [v, diff];\n}\n\nfunction frameCb(self, __config, diff, isDelay) {\n self.emit(Event.FRAME, diff, isDelay);\n if(__config[I_FIRST_PLAY]) {\n __config[I_FIRST_PLAY] = false;\n self.emit(Event.PLAY);\n }\n let cb = __config[I_PLAY_CB];\n if(isFunction(cb)) {\n cb.call(self, diff, isDelay);\n // 清理要检查,gotoAndStop()这种cb回调中直接再次调用goto的话cb会不一致不能删除\n if(__config[I_PLAY_CB] === cb) {\n __config[I_PLAY_CB] = 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 let root = target.root;\n let config = this.__config = [\n false, // assigning\n false, // inFps\n false, // isDelay\n true, // begin\n false, // end\n false, // finished\n false, // nextBegin\n true, // firstPlay\n null, // playCb\n target,\n root,\n null, // frames\n null, // framesR\n 0, // currentTime\n 0, // nextTime\n {}, // style\n 0, // duration\n 1, // iterations\n 'none', // fill\n 1, // playbackRate\n 0, // playCount\n 'idle',\n false, // destroy\n 0, // startTime\n 0, // fpsTime\n op.easing,\n false, // enterFrame\n 0, // delay\n 0, // endDelay\n null, // keys,\n null, // originStyle,\n null, // currentFrames\n null, // currentFrame\n false, // spfLimit\n 60, // fps\n 'normal', // direction\n true, // firstEnter,\n false, // stayBegin\n false, // stayEnd\n false, // is2\n 0, // endTime\n target.__config, // nodeConfig\n root && root.__config, // rootConfig,destroy后root可能为空\n false, // outBeginDelay\n ];\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 config[I_FRAMES] = frames;\n config[I_FRAMES_R] = framesR;\n config[I_KEYS] = keys;\n config[I_ORIGIN_STYLE] = originStyle;\n if(frames.length === 2) {\n config[I_IS2] = true;\n config[I_END_TIME] = frames[1][FRAME_TIME];\n }\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 config[I_CURRENT_FRAMES] = {\n reverse: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(op.direction) ? framesR : frames;\n // 时间戳\n config[I_TIME_STAMP] = frame.__now;\n // 性能优化访问\n this[0] = this.__before;\n this[1] = this.__after;\n }\n\n __init(list, iterations, duration, easing, target) {\n if(list.length < 1) {\n return [[], [], [], {}];\n }\n // 过滤时间非法的,过滤后续offset<=前面的\n let offset = -1;\n let tagName = target.tagName;\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(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(tagName, k)) {\n originStyle[k] = props[k];\n }\n originStyle[k] = style[k];\n });\n // 再计算两帧之间的变化,存入transition属性\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, tagName);\n }\n // 反向存储帧的倒排结果\n framesR.forEach(item => {\n item[FRAME_TIME] = duration - item[FRAME_TIME];\n item[FRAME_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, tagName);\n }\n return [frames, framesR, keys, originStyle];\n }\n\n __clean(isFinish) {\n let __config = this.__config;\n this.__cancelTask();\n __config[I_NEXT_TIME] = 0;\n let restore;\n let style = __config[I_STYLE];\n let keys = __config[I_KEYS];\n let target = __config[I_TARGET];\n if(isFinish) {\n // gotoAndStop到一个很大的时间的话,也需要防止超过\n __config[I_CURRENT_TIME] = __config[I_DELAY] + __config[I_DURATION] * __config[I_ITERATIONS] + __config[I_END_DELAY];\n if(__config[I_PLAY_STATE] === 'finish') {\n return;\n }\n __config[I_PLAY_STATE] = 'finish';\n // cancel需要清除finish根据情况保留\n if(!__config[I_STAY_END]) {\n __config[I_STYLE] = {};\n restore = true;\n }\n }\n else {\n __config[I_PLAY_COUNT] = __config[I_CURRENT_TIME] = 0;\n if(__config[I_PLAY_STATE] === 'idle') {\n return;\n }\n __config[I_PLAY_STATE] = 'idle';\n __config[I_STYLE] = {};\n restore = true;\n }\n // 动画取消结束不停留在最后一帧需要还原target原本的样式,需要对比目前是否是由本动画赋值的\n if(restore) {\n keys.forEach(k => {\n if(GEOM.hasOwnProperty(k)) {\n if(target.__currentProps[k] === style[k]) {\n target.__currentProps[k] = target.props[k];\n }\n }\n else {\n if(target.__currentStyle[k] === style[k]) {\n target.__currentStyle[k] = target.style[k];\n }\n }\n });\n }\n }\n\n play(cb) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n let frames = __config[I_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 __config[I_PLAY_CB] = cb;\n __config[I_PLAY_STATE] = 'running';\n // 每次play调用标识第一次运行,需响应play事件和回调\n __config[I_FIRST_PLAY] = true;\n // 防止finish/cancel事件重复触发,每次播放重置\n this.__hasFin = false;\n this.__hasCancel = false;\n // 只有第一次调用会进初始化,另外finish/cancel视为销毁也会重新初始化\n if(!__config[I_ENTER_FRAME]) {\n __config[I_ENTER_FRAME] = true;\n let framesR = __config[I_FRAMES_R];\n let direction = __config[I_DIRECTION];\n // 初始化根据方向确定帧序列\n __config[I_CURRENT_FRAMES] = {\n reverse: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(direction) ? framesR : frames;\n __config[I_CURRENT_TIME] = __config[I_NEXT_TIME] = __config[I_FPS_TIME] = 0;\n }\n // 添加每帧回调且立刻执行,本次执行调用refreshTask也是下一帧再渲染,frame的每帧都是下一帧\n // frame.offFrame(this);\n frame.onFrame(this);\n __config[I_START_TIME] = frame.__now;\n __config[I_END] = false;\n return this;\n }\n\n __before(diff) {\n let __config = this.__config;\n __config[I_TIME_STAMP] = frame.__now;\n let target = __config[I_TARGET];\n let fps = __config[I_FPS];\n let playCount = 0;\n let currentFrames = __config[I_CURRENT_FRAMES];\n let iterations = __config[I_ITERATIONS];\n let stayBegin = __config[I_STAY_BEGIN];\n let stayEnd = __config[I_STAY_END];\n let delay = __config[I_DELAY];\n let root = __config[I_ROOT];\n let is2 = __config[I_IS2];\n let endTime = __config[I_END_TIME];\n let duration = __config[I_DURATION];\n let endDelay = __config[I_END_DELAY];\n let length = currentFrames.length;\n // 用本帧和上帧时间差,计算累加运行时间currentTime,以便定位当前应该处于哪个时刻\n let [currentTime, d] = calDiffTime(__config, diff);\n diff = d;\n // 增加的fps功能,当<60时计算跳帧,每帧运行依旧累加时间,达到fps时重置,第一帧强制不跳\n if(!__config[I_FIRST_ENTER] && fps < 60) {\n diff = __config[I_FPS_TIME] += diff;\n if(diff < 1000 / fps) {\n __config[I_IN_FPS] = true;\n return;\n }\n __config[I_FPS_TIME] = 0;\n }\n __config[I_FIRST_ENTER] = false;\n // delay仅第一次生效等待\n if(currentTime < delay) {\n if(stayBegin) {\n let currentFrame = __config[I_CURRENT_FRAME] = currentFrames[0];\n let current = currentFrame[FRAME_STYLE];\n genBeforeRefresh(current, __config[I_KEYS], __config, root, target);\n }\n __config[I_BEGIN] = false; // 默认是true,delay置false防触发\n // 即便不刷新,依旧执行帧回调,同时标明让后续第一帧响应begin\n __config[I_OUT_BEGIN_DELAY] = true;\n __config[I_IS_DELAY] = true;\n return;\n }\n // 减去delay,计算在哪一帧\n currentTime -= delay;\n if(__config[I_OUT_BEGIN_DELAY]) {\n __config[I_OUT_BEGIN_DELAY] = false;\n __config[I_BEGIN] = true;\n }\n // 超过duration非尾轮需处理回到开头,触发新一轮动画事件,这里可能时间间隔非常大直接跳过几轮\n let round;\n while(currentTime >= duration && playCount < iterations - 1) {\n currentTime -= duration;\n playCount++;\n }\n if(__config[I_PLAY_COUNT] < playCount) {\n __config[I_BEGIN] = true;\n round = true;\n }\n __config[I_PLAY_COUNT] = playCount;\n // 如果发生轮换,需重新确定正反向\n if(round) {\n let direction = __config[I_DIRECTION];\n let frames = __config[I_FRAMES];\n let framesR = __config[I_FRAMES_R];\n let isAlternate = {\n alternate: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(direction);\n // 有正反向播放需要重设帧序列\n if(isAlternate) {\n let isEven = playCount % 2 === 0;\n if(direction === 'alternate') {\n currentFrames = __config[I_CURRENT_FRAMES] = isEven ? frames : framesR;\n }\n else {\n currentFrames = __config[I_CURRENT_FRAMES] = isEven ? framesR : frames;\n }\n }\n }\n let isLastCount = playCount >= iterations - 1;\n // 只有2帧可优化,否则2分查找当前帧\n let i, frameTime;\n if(is2) {\n i = currentTime < endTime ? 0 : 1;\n frameTime = endTime;\n }\n else {\n i = binarySearch(0, length - 1, currentTime, currentFrames);\n frameTime = currentFrames[i][FRAME_TIME];\n }\n // 最后一帧结束动画,仅最后一轮才会进入,需处理endDelay\n let isLastFrame = isLastCount && i === length - 1;\n let percent = 0;\n if(isLastFrame) {\n // 无需任何处理\n }\n // 否则根据目前到下一帧的时间差,计算百分比,再反馈到变化数值上\n else if(is2) {\n percent = currentTime / duration;\n }\n else {\n let total = currentFrames[i + 1][FRAME_TIME] - frameTime;\n percent = (currentTime - frameTime) / total;\n }\n let inEndDelay, currentFrame = currentFrames[i], current;\n __config[I_CURRENT_FRAME] = currentFrame;\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 if(isLastFrame) {\n inEndDelay = currentTime < duration + endDelay;\n // 停留对比最后一帧,endDelay可能会多次进入这里,第二次进入样式相等不再重绘\n if(stayEnd) {\n current = cloneStyle(currentFrame[FRAME_STYLE], __config[I_KEYS]);\n }\n // 不停留或超过endDelay则计算还原,有endDelay且fill模式不停留会再次进入这里\n else {\n current = cloneStyle(__config[I_ORIGIN_STYLE], __config[I_KEYS]);\n }\n // 进入endDelay或结束阶段触发end事件,注意只触发一次,防重在触发的地方做\n __config[I_NEXT_END] = true;\n if(!inEndDelay) {\n __config[I_PLAY_COUNT]++;\n __config[I_FINISHED] = true;\n frame.offFrame(this);\n needClean = true;\n __config[I_NEXT_TIME] = 0;\n }\n }\n else {\n current = calIntermediateStyle(currentFrame, __config[I_KEYS], percent, target);\n }\n // 无论两帧之间是否有变化,都生成计算结果赋给style,去重在root做\n genBeforeRefresh(current, __config[I_KEYS], __config, root, target);\n if(needClean) {\n let playCb = __config[I_PLAY_CB];\n this.__clean(true);\n // 丑陋的做法,防止gotoAndStop()这样的cb被clean()掉\n if(playCb) {\n __config[I_PLAY_CB] = playCb;\n }\n }\n }\n\n __after(diff) {\n let __config = this.__config;\n __config[I_ASSIGNING] = false;\n if(__config[I_IN_FPS]) {\n __config[I_IN_FPS] = false;\n return;\n }\n frameCb(this, __config, diff, __config[I_IS_DELAY]);\n __config[I_IS_DELAY] = false;\n if(__config[I_BEGIN]) {\n __config[I_BEGIN] = false;\n this.emit(Event.BEGIN, __config[I_PLAY_COUNT]);\n }\n // end事件只触发一次,末轮进入endDelay或直接结束时\n if(__config[I_NEXT_END] && !__config[I_END]) {\n __config[I_END] = true;\n this.emit(Event.END, __config[I_PLAY_COUNT] - 1);\n }\n if(__config[I_FINISHED]) {\n __config[I_BEGIN] = __config[I_END] = __config[I_IS_DELAY] = __config[I_FINISHED]\n = __config[I_IN_FPS] = __config[I_ENTER_FRAME] = false;\n __config[I_PLAY_STATE] = 'finished';\n this.emit(Event.FINISH);\n }\n }\n\n pause(silence) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let { pending } = this;\n if(isDestroyed || duration <= 0 || pending) {\n return this;\n }\n __config[I_PLAY_STATE] = 'paused';\n this.__cancelTask();\n if(!silence) {\n this.emit(Event.PAUSE);\n }\n return this;\n }\n\n resume(cb) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n if(isDestroyed || duration <= 0 || playState !== 'paused') {\n return this;\n }\n return this.play(cb);\n }\n\n finish(cb) {\n let self = this;\n let __config = self.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n let frames = __config[I_FRAMES];\n if(isDestroyed || duration <= 0 || frames.length < 1 || playState === 'finished' || playState === 'idle') {\n return self;\n }\n // 先清除所有回调任务,多次调用finish也会清除只留最后一次\n self.__cancelTask();\n let root = __config[I_ROOT];\n let originStyle = __config[I_ORIGIN_STYLE];\n if(root) {\n let current;\n // 停留在最后一帧\n if(__config[I_STAY_END]) {\n __config[I_CURRENT_FRAME] = frames[frames.length - 1];\n current = frames[frames.length - 1][FRAME_STYLE];\n }\n else {\n current = originStyle;\n }\n root.addRefreshTask({\n __before() {\n __config[I_ASSIGNING] = true;\n genBeforeRefresh(current, __config[I_KEYS], __config, root, __config[I_TARGET]);\n self.__clean(true);\n },\n __after(diff) {\n if(!self.__hasFin) {\n self.__hasFin = true;\n __config[I_ASSIGNING] = false;\n frameCb(self, __config, diff);\n __config[I_BEGIN] = __config[I_END] = __config[I_IS_DELAY] = __config[I_FINISHED]\n = __config[I_IN_FPS] = __config[I_ENTER_FRAME] = false;\n self.emit(Event.FINISH);\n }\n if(isFunction(cb)) {\n cb.call(self, diff);\n }\n },\n });\n }\n return self;\n }\n\n cancel(cb) {\n let self = this;\n let __config = self.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n let frames = __config[I_FRAMES];\n if(isDestroyed || duration <= 0 || playState === 'idle' || frames.length < 1) {\n return self;\n }\n self.__cancelTask();\n let root = __config[I_ROOT];\n let originStyle = __config[I_ORIGIN_STYLE];\n if(root) {\n root.addRefreshTask({\n __before() {\n __config[I_ASSIGNING] = true;\n genBeforeRefresh(originStyle, __config[I_KEYS], __config, root, __config[I_TARGET]);\n self.__clean();\n },\n __after(diff) {\n if(!self.__hasCancel) {\n self.__hasCancel = true;\n __config[I_ASSIGNING] = false;\n frameCb(self, __config, diff);\n __config[I_BEGIN] = __config[I_END] = __config[I_IS_DELAY] = __config[I_FINISHED]\n = __config[I_IN_FPS] = __config[I_ENTER_FRAME] = false;\n self.emit(Event.CANCEL);\n }\n if(isFunction(cb)) {\n cb.call(self, diff);\n }\n },\n });\n }\n return self;\n }\n\n gotoAndPlay(v, options, cb) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let frames = __config[I_FRAMES];\n let delay = __config[I_DELAY];\n let endDelay = __config[I_END_DELAY];\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 __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let frames = __config[I_FRAMES];\n let delay = __config[I_DELAY];\n let endDelay = __config[I_END_DELAY];\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(diff => {\n __config[I_PLAY_STATE] = 'paused';\n this.__cancelTask();\n if(isFunction(cb)) {\n cb.call(this, diff);\n }\n });\n }\n\n // 同步赋予,用在extendAnimate\n assignCurrentStyle() {\n let __config = this.__config;\n let style = __config[I_STYLE];\n let target = __config[I_TARGET];\n let keys = __config[I_KEYS];\n keys.forEach(i => {\n if(style.hasOwnProperty(i)) {\n let v = style[i];\n // geom的属性变化\n if(GEOM.hasOwnProperty(i)) {\n target.currentProps[i] = v;\n }\n // 样式\n else {\n // 将动画样式直接赋给currentStyle\n target.currentStyle[i] = v;\n }\n }\n });\n }\n\n // 返回不包含delay且去除多轮的时间\n __goto(v, isFrame, excludeDelay) {\n let __config = this.__config;\n let iterations = __config[I_ITERATIONS];\n let duration = __config[I_DURATION];\n __config[I_PLAY_STATE] = '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 += __config[I_DELAY];\n }\n // 在时间范围内设置好时间,复用play直接跳到播放点\n __config[I_NEXT_TIME] = v;\n v -= __config[I_DELAY];\n // 超过时间长度需要累加次数,这里可以超过iterations,因为设定也许会非常大\n let playCount = 0;\n while(v >= duration && playCount < iterations - 1) {\n playCount++;\n v -= duration;\n }\n __config[I_PLAY_COUNT] = playCount;\n // 防止play()重置时间和当前帧组,提前计算好\n __config[I_ENTER_FRAME] = true;\n let frames = __config[I_FRAMES];\n let framesR = __config[I_FRAMES_R];\n let direction = __config[I_DIRECTION];\n if({\n alternate: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(direction)) {\n let isEven = playCount % 2 === 0;\n if(direction === 'alternate') {\n __config[I_CURRENT_FRAMES] = isEven ? frames : framesR;\n }\n else {\n __config[I_CURRENT_FRAMES] = 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 __stayBegin() {\n return {\n backwards: true,\n both: true,\n }.hasOwnProperty(this.fill);\n }\n\n __stayEnd() {\n return {\n forwards: true,\n both: true,\n }.hasOwnProperty(this.fill);\n }\n\n __setTarget(target) {\n this.__target = target;\n this.__config[I_TARGET] = target;\n this.__config[I_NODE_CONFIG] = target.__config;\n }\n\n __cancelTask() {\n frame.offFrame(this);\n this.__config[I_PLAY_CB] = null;\n }\n\n __destroy(sync) {\n let self = this;\n let __config = self.__config;\n if(__config[I_DESTROYED]) {\n return;\n }\n self.removeControl();\n // clean异步执行,因为里面的样式还原需要等到下一帧,否则同步执行清除后,紧接着的新同步动画获取不到currentStyle\n if(sync) {\n self.__clean();\n __config[I_TARGET] = null;\n }\n else {\n frame.nextFrame({\n __before() {\n self.__clean();\n __config[I_TARGET] = null;\n },\n });\n }\n __config[I_START_TIME] = 0;\n __config[I_DESTROYED] = true;\n }\n\n __checkModify() {\n let __config = this.__config;\n if(__config[I_PLAY_STATE] !== 'idle' && __config[I_PLAY_STATE] !== '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.__config[I_TARGET];\n }\n\n get root() {\n return this.__config[I_ROOT];\n }\n\n get keys() {\n return this.__config[I_KEYS];\n }\n\n get style() {\n return this.__config[I_STYLE];\n }\n\n get options() {\n return this.__options;\n }\n\n get duration() {\n return this.__config[I_DURATION];\n }\n\n set duration(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_DURATION] !== v) {\n __config[I_DURATION] = v;\n __config[I_END_TIME] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get delay() {\n return this.__config[I_DELAY];\n }\n\n set delay(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_DELAY] !== v) {\n __config[I_DELAY] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get endDelay() {\n return this.__config[I_END_DELAY];\n }\n\n set endDelay(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_END_DELAY] !== v) {\n __config[I_END_DELAY] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get fps() {\n return this.__config[I_FPS];\n }\n\n set fps(v) {\n v = parseInt(v) || 60;\n let __config = this.__config;\n if(__config[I_FPS] !== v) {\n if(v <= 0) {\n v = 60;\n }\n __config[I_FPS] = v;\n }\n return v;\n }\n\n get spf() {\n return 1 / this.fps;\n }\n\n get iterations() {\n return this.__config[I_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 let __config = this.__config;\n if(__config[I_ITERATIONS] !== v) {\n __config[I_ITERATIONS] = v;\n }\n return v;\n }\n\n get fill() {\n return this.__config[I_FILL];\n }\n\n set fill(v) {\n v = v || 'none';\n let __config = this.__config;\n if(__config[I_FILL] !== v) {\n __config[I_FILL] = v;\n this.__checkModify();\n }\n __config[I_STAY_BEGIN] = {\n backwards: true,\n both: true,\n }.hasOwnProperty(v);\n __config[I_STAY_END] = {\n forwards: true,\n both: true,\n }.hasOwnProperty(v);\n return v;\n }\n\n get direction() {\n return this.__config[I_DIRECTION];\n }\n\n set direction(v) {\n v = v || 'normal';\n let __config = this.__config;\n if(__config[I_DIRECTION] !== v) {\n __config[I_DIRECTION] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get frames() {\n return this.__config[I_FRAMES];\n }\n\n get framesR() {\n return this.__config[I_FRAMES_R];\n }\n\n get playbackRate() {\n return this.__config[I_PLAYBACK_RATE];\n }\n\n set playbackRate(v) {\n v = parseFloat(v) || 1;\n if(v <= 0) {\n v = 1;\n }\n let __config = this.__config;\n if(__config[I_PLAYBACK_RATE] !== v) {\n __config[I_PLAYBACK_RATE] = v;\n }\n return v;\n }\n\n get easing() {\n return this.__config[I_EASING];\n }\n\n get startTime() {\n return this.__config[I_START_TIME];\n }\n\n get currentTime() {\n return this.__config[I_CURRENT_TIME];\n }\n\n set currentTime(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_CURRENT_TIME] !== v) {\n __config[I_CURRENT_TIME] = v;\n __config[I_NEXT_TIME] = v;\n }\n return v;\n }\n\n get nextTime() {\n return this.__config[I_NEXT_TIME];\n }\n\n set nextTime(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_NEXT_TIME] !== v) {\n __config[I_NEXT_TIME] = v;\n }\n return v;\n }\n\n get timestamp() {\n return this.__config[I_TIME_STAMP];\n }\n\n get pending() {\n return this.__config[I_PLAY_STATE] !== 'running';\n }\n\n get finished() {\n return this.__config[I_PLAY_STATE] === 'finished';\n }\n\n get playState() {\n return this.__config[I_PLAY_STATE];\n }\n\n get playCount() {\n return this.__config[I_PLAY_COUNT];\n }\n\n set playCount(v) {\n v = Math.max(0, parseInt(v) || 0);\n let __config = this.__config;\n if(__config[I_PLAY_COUNT] !== v) {\n __config[I_PLAY_COUNT] = v;\n }\n return v;\n }\n\n get isDestroyed() {\n return this.__config[I_DESTROYED];\n }\n\n get animating() {\n let __config = this.__config;\n let playState = __config[I_PLAY_STATE];\n if(playState === 'idle') {\n return false;\n }\n return playState !== 'finished' || __config[I_STAY_END] || __config[I_STAY_BEGIN];\n }\n\n get spfLimit() {\n let __config = this.__config;\n return __config[I_SPF_LIMIT];\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 let __config = this.__config;\n if(__config[I_SPF_LIMIT] !== v) {\n __config[I_SPF_LIMIT] = v;\n }\n return v;\n }\n\n get assigning() {\n return this.__config[I_ASSIGNING];\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';\nimport enums from '../util/enums';\n\nconst {\n NODE_KEY: {\n NODE_DEFS_CACHE,\n }\n} = enums;\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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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 MBM_HASH = {\n multiply: true,\n screen: true,\n overlay: true,\n darken: true,\n lighten: true,\n colorDodge: true,\n colorBurn: true,\n hardLight: true,\n softLight: true,\n difference: true,\n exclusion: true,\n hue: true,\n saturation: true,\n color: true,\n luminosity: true,\n};\n\nfunction mbmName(v) {\n if(v) {\n return v.replace(/[A-Z]/, function($0) {\n return '-' + $0.toLowerCase();\n });\n }\n}\n\nfunction isValidMbm(v) {\n return MBM_HASH.hasOwnProperty(v);\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 Cache from '../refresh/Cache';\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 { LOCAL } = Cache;\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 UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_FOCUS,\n UPDATE_STYLE,\n UPDATE_OVERWRITE,\n UPDATE_KEYS,\n UPDATE_CONFIG,\n UPDATE_REMOVE_DOM,\n },\n STRUCT_KEY: {\n STRUCT_HAS_MASK,\n },\n NODE_KEY: {\n NODE_TAG_NAME,\n NODE_CACHE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_STYLE,\n NODE_STRUCT,\n NODE_OPACITY,\n NODE_MATRIX_EVENT,\n NODE_MATRIX,\n NODE_LIMIT_CACHE,\n NODE_HAS_CONTENT,\n NODE_REFRESH_LV,\n NODE_CACHE,\n NODE_CACHE_TOTAL,\n NODE_CACHE_FILTER,\n NODE_CACHE_MASK,\n NODE_CACHE_OVERFLOW,\n NODE_IS_DESTROYED,\n NODE_DEFS_CACHE,\n NODE_DOM_PARENT,\n NODE_IS_INLINE,\n NODE_PERSPECTIVE_MATRIX,\n NODE_IS_MASK,\n NODE_VIRTUAL_DOM,\n NODE_CACHE_AS_BITMAP,\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 NONE,\n TRANSFORM: TF,\n REFLOW,\n REPAINT,\n TRANSLATE_X: TX,\n TRANSLATE_Y: TY,\n TRANSLATE_Z: TZ,\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.__config[NODE_IS_INLINE]) {\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 let isMask = this.__isMask = isClip || !!this.props.mask;\n let config = this.__config;\n config[NODE_TAG_NAME] = tagName;\n config[NODE_CACHE_STYLE] = this.__cacheStyle;\n config[NODE_CURRENT_STYLE] = this.__currentStyle;\n config[NODE_COMPUTED_STYLE] = this.__computedStyle;\n config[NODE_REFRESH_LV] = REFLOW;\n config[NODE_STYLE] = this.__style;\n config[NODE_MATRIX] = [];\n config[NODE_MATRIX_EVENT] = [];\n config[NODE_DEFS_CACHE] = this.__cacheDefs;\n config[NODE_IS_MASK] = isMask;\n this.__frameAnimateList = [];\n this.__contentBoxList = []; // inline存储内容用\n // this.__json domApi需要获取生成时的json引用,builder过程添加,如appendChild时json也需要跟着变更\n config[NODE_CACHE_AS_BITMAP] = this.__cacheAsBitmap = !!this.props.cacheAsBitmap;\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(i, lv, j) {\n let res = super.__structure(i, lv, j);\n if(this.__hasMask) {\n res[STRUCT_HAS_MASK] = this.__hasMask;\n }\n this.__config[NODE_STRUCT] = res;\n return res;\n }\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[1] === PX) {\n return v[0];\n }\n else if(v[1] === PERCENT && includePercent) {\n return v[0] * w * 0.01;\n }\n else if(v[1] === REM) {\n return v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n return v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n return v[0] * this.root.height * 0.01;\n }\n else if(v[1] === VMAX) {\n return v[0] * Math.max(this.root.width, this.root.height) * 0.01;\n }\n else if(v[1] === VMIN) {\n return v[0] * 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, 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[1] === INHERIT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : parentComputedStyle[k];\n }\n else {\n computedStyle[k] = v[0];\n let ff = v[0].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[1] === INHERIT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : parentComputedStyle[k];\n }\n // 只有fontSize会有%\n else if(v[1] === PERCENT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (parentComputedStyle[k] * v[0] * 0.01);\n }\n else if(v[1] === REM) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (this.root.computedStyle[FONT_SIZE] * v[0]);\n }\n else if(v[1] === VW) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (this.root.width * 0.01 * v[0]);\n }\n else if(v[1] === VH) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (this.root.height * 0.01 * v[0]);\n }\n else if(v[1] === VMAX) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (Math.max(this.root.width, this.root.height) * 0.01 * v[0]);\n }\n else if(v[1] === VMIN) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (Math.min(this.root.width, this.root.height) * 0.01 * v[0]);\n }\n else {\n computedStyle[k] = v[0];\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[1] === INHERIT) {\n computedStyle[TEXT_ALIGN] = isRoot ? 'left' : parentComputedStyle[TEXT_ALIGN];\n }\n else {\n computedStyle[TEXT_ALIGN] = textAlign[0];\n }\n let fontSize = computedStyle[FONT_SIZE];\n let lineHeight = currentStyle[LINE_HEIGHT];\n // lineHeight继承很特殊,数字和normal不同于普通单位\n if(lineHeight[1] === 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[1] !== INHERIT) {\n break;\n }\n p = p.domParent;\n }\n // 到root还是inherit或normal,或者中途遇到了normal,使用normal\n if([AUTO, INHERIT].indexOf(ph[1]) > -1) {\n computedStyle[LINE_HEIGHT] = calNormalLineHeight(computedStyle);\n }\n // 数字继承\n else if(ph[1] === NUMBER) {\n computedStyle[LINE_HEIGHT] = Math.max(ph[0], 0) * fontSize;\n }\n // 单位继承\n else {\n computedStyle[LINE_HEIGHT] = parentComputedStyle[LINE_HEIGHT];\n }\n }\n }\n else if(lineHeight[1] === NUMBER) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight[0], 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[1] === 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[1] === INHERIT) {\n computedStyle[WHITE_SPACE] = isRoot ? 'normal' : parentComputedStyle[WHITE_SPACE];\n }\n else {\n computedStyle[WHITE_SPACE] = whiteSpace[0];\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, __config } = node;\n if(!root) {\n return;\n }\n let v = currentStyle[FONT_FAMILY];\n if(v[1] === INHERIT) {\n return;\n }\n let ff = v[0].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.addRefreshTask({\n __before() {\n if(__config[NODE_IS_DESTROYED]) {\n return;\n }\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_FOCUS] = level.REFLOW; // 强制执行\n res[UPDATE_CONFIG] = __config;\n root.__addUpdate(node, __config, root, root.__config, res);\n },\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 // absolute且无尺寸时,isAbs标明先假布局一次计算尺寸,还有flex列计算时isColumn假布局,flex横计算时writingMode垂直假布局\n __layout(data, isAbs, isColumn, isRow) {\n this.__computeReflow();\n let { w } = data;\n let { isDestroyed, currentStyle, computedStyle, __config, __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,\n h: data.h,\n lx: data.lx,\n ly: data.ly,\n isUpright: data.isUpright, // 从Root开始,父级的书写模式需每层传递\n };\n // 防止display:none不统计mask,isVirtual忽略,abs/flex布局后续会真正来走一遍\n if(!isAbs && !isColumn && !isRow) {\n this.clearCache();\n __config[NODE_REFRESH_LV] = REFLOW;\n __config[NODE_LIMIT_CACHE] = false;\n __config[NODE_IS_INLINE] = 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.__width = this.__height\n = this.__clientWidth = this.__clientHeight\n = this.__offsetWidth = this.__offsetHeight\n = this.__outerWidth = this.__outerHeight\n = computedStyle[WIDTH] = computedStyle[HEIGHT] = 0;\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, 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 // relative渲染时做偏移,百分比基于父元素,若父元素没有定高则为0\n if(!isAbs && !isColumn && !isRow) {\n if(position === 'relative') {\n let {[TOP]: top, [RIGHT]: right, [BOTTOM]: bottom, [LEFT]: left} = currentStyle;\n let {parent} = this;\n if(top[1] !== AUTO) {\n let n = calRelative(currentStyle, TOP, top, parent);\n this.__offsetY(n);\n computedStyle[TOP] = n;\n computedStyle[BOTTOM] = 'auto';\n }\n else if(bottom[1] !== AUTO) {\n let n = calRelative(currentStyle, BOTTOM, bottom, parent);\n this.__offsetY(-n);\n computedStyle[BOTTOM] = n;\n computedStyle[TOP] = 'auto';\n }\n else {\n computedStyle[TOP] = computedStyle[BOTTOM] = 'auto';\n }\n if(left[1] !== AUTO) {\n let n = calRelative(currentStyle, LEFT, left, parent, true);\n this.__offsetX(n);\n computedStyle[LEFT] = n;\n computedStyle[RIGHT] = 'auto';\n }\n else if (right[1] !== AUTO) {\n let n = calRelative(currentStyle, RIGHT, right, parent, true);\n this.__offsetX(-n);\n computedStyle[RIGHT] = n;\n computedStyle[LEFT] = 'auto';\n }\n else {\n computedStyle[LEFT] = computedStyle[RIGHT] = 'auto';\n }\n }\n else if (position !== 'absolute') {\n computedStyle[TOP] = computedStyle[BOTTOM] = computedStyle[LEFT] = computedStyle[RIGHT] = 'auto';\n }\n // 计算结果存入computedStyle和6个坐标,inline在其inlineSize特殊处理\n let x = this.__sx = this.x + this.ox;\n let y = this.__sy = this.y + this.oy;\n if(!__config[NODE_IS_INLINE]) {\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 __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 let { computedStyle } = this;\n computedStyle[DISPLAY] = 'none';\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 = 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 } = 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 {\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[1] !== AUTO && !isInline) {\n fixedWidth = true;\n w = this.__calSize(width, w, true);\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 else if(height[1] !== AUTO && !isInline) {\n fixedHeight = true;\n h = this.__calSize(height, h, true);\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[1] === AUTO || w3 !== undefined) {\n w -= borderLeftWidth + borderRightWidth + marginLeft + marginRight + paddingLeft + paddingRight;\n }\n if(height[1] === 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[1] !== AUTO || this.isReplaced) && marginTop[1] === AUTO && marginBottom[1] === AUTO) {\n let oh = this.outerHeight;\n if(oh < data.h) {\n this.__offsetY((data.h - oh) * 0.5, true);\n }\n }\n }\n else {\n if((width[1] !== AUTO || this.isReplaced) && marginLeft[1] === AUTO && marginRight[1] === AUTO) {\n let ow = this.outerWidth;\n if(ow < data.w) {\n this.__offsetX((data.w - ow) * 0.5, true);\n }\n }\n }\n }\n }\n\n __calMatrix(lv, __cacheStyle, currentStyle, computedStyle, __config, sx1, sy1, offsetWidth, offsetHeight) {\n if(__config[NODE_IS_INLINE]) {\n computedStyle[TRANSFORM_ORIGIN] = [sx1, sy1];\n return __cacheStyle[MATRIX] = mx.identity();\n }\n let matrixCache = __cacheStyle[MATRIX];\n // tx/ty变化特殊优化\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 // 不访问this.offsetWidth性能提升,暂时性\n else if(v[1] === PX) {\n v = v[0];\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[1] === PX) {\n v = v[0];\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(sx1 === undefined) {\n sx1 = this.__sx1;\n sy1 = this.__sy1;\n offsetWidth = this.offsetWidth;\n offsetHeight = this.offsetHeight;\n }\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]) {\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][0]];\n if(v[3][0] === 0) {\n return;\n }\n temp.push([k, v]);\n return;\n }\n computedStyle[k] = v[0];\n if(k === ROTATE_X || k === ROTATE_Y || k === ROTATE_Z) {\n temp.push([k, v]);\n return;\n }\n // scale为1和其它为0避免计算浪费\n let isScale = k === SCALE_X || k === SCALE_Y || k === SCALE_Z;\n if(v[0] === 1 && isScale || !isScale && v[0] === 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 matrixCache;\n }\n\n /**\n * 将currentStyle计算为computedStyle,同时存入cacheStyle可缓存的结果防止无变更重复计算\n * @param renderMode\n * @param ctx\n * @param parent\n * @param __cacheStyle\n * @param currentStyle\n * @param computedStyle\n * @param clientWidth\n * @param clientHeight\n * @param offsetWidth\n * @param offsetHeight\n * @param borderTopWidth\n * @param borderRightWidth\n * @param borderBottomWidth\n * @param borderLeftWidth\n * @param paddingTop\n * @param paddingRight\n * @param paddingBottom\n * @param paddingLeft\n * @param x1\n * @param x2\n * @param x3\n * @param x4\n * @param x5\n * @param x6\n * @param y1\n * @param y2\n * @param y3\n * @param y4\n * @param y5\n * @param y6\n * @returns {*[]}\n * @private\n */\n __calCache(renderMode, ctx, parent, __cacheStyle, currentStyle, computedStyle,\n clientWidth, clientHeight, offsetWidth, offsetHeight,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth,\n paddingTop, paddingRight, paddingBottom, paddingLeft,\n x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6) {\n let bx1 = x1, by1 = y1, bx2 = x6, by2 = y6;\n let backgroundClip = computedStyle[BACKGROUND_CLIP] = currentStyle[BACKGROUND_CLIP];\n // 默认border-box\n if(backgroundClip === 'paddingBox') {\n bx1 = x2;\n by1 = y2;\n bx2 = x5;\n by2 = y5;\n }\n else if(backgroundClip === 'contentBox') {\n bx1 = x3;\n by1 = y3;\n bx2 = x4;\n by2 = y4;\n }\n let isInline = this.__config[NODE_IS_INLINE];\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 __cacheStyle[FILTER] = true;\n this.__calFilter(currentStyle, computedStyle);\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[1] === PERCENT) {\n return item[0] + '%';\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[1] === PERCENT) {\n return item[0] + '%';\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[1] === AUTO) {\n return -1;\n }\n else if(item2[1] === STRING) {\n return item2[0] === '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[0];\n }\n return null;\n });\n __cacheStyle[BACKGROUND_IMAGE] = bgI.map((bgi, i) => {\n if(!bgi) {\n return null;\n }\n // 防止隐藏不加载背景图\n if(bgi[1] === STRING) {\n let loadBgi = this.__loadBgi[i] = this.__loadBgi[i] || {};\n let cache = inject.IMG[bgi[0]];\n if(cache && cache.state === inject.LOADED) {\n loadBgi.url = bgi[0];\n loadBgi.source = cache.source;\n loadBgi.width = cache.width;\n loadBgi.height = cache.height;\n }\n else if(loadBgi.url !== bgi[0]) {\n // 可能改变导致多次加载,每次清空,成功后还要比对url是否相同\n loadBgi.url = bgi[0];\n loadBgi.source = null;\n let node = this;\n let root = node.root;\n inject.measureImg(bgi[0], 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 root.delRefreshTask(loadBgi.cb);\n root.addRefreshTask(loadBgi.cb = {\n __before() {\n __cacheStyle[BACKGROUND_IMAGE] = undefined;\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_FOCUS] = REPAINT;\n res[UPDATE_CONFIG] = node.__config;\n root.__addUpdate(node, node.__config, root, root.__config, res);\n },\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[0] && bgi[1] === 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][0]);\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(offsetWidth, 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 ['Top', 'Right', 'Bottom', 'Left'].forEach(k => {\n k = 'border' + k;\n let k2 = STYLE_KEY[style2Upper(k)];\n let kw = STYLE_KEY[style2Upper(k + 'Width')];\n let ks = STYLE_KEY[style2Upper(k + 'Style')];\n // width/style变更影响border重新计算\n if(isNil(__cacheStyle[kw])) {\n __cacheStyle[kw] = true;\n __cacheStyle[k2] = undefined;\n }\n if(isNil(__cacheStyle[ks])) {\n __cacheStyle[ks] = true;\n __cacheStyle[k2] = undefined;\n }\n if(isNil(__cacheStyle[k2])) {\n if(k2 === BORDER_TOP) {\n if(borderTopWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderTopWidth / borderLeftWidth);\n let deg2 = Math.atan(borderTopWidth / borderRightWidth);\n __cacheStyle[k2] = border.calPoints(borderTopWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 0, btlr, btrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_RIGHT) {\n if(borderRightWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderRightWidth / borderTopWidth);\n let deg2 = Math.atan(borderRightWidth / borderBottomWidth);\n __cacheStyle[k2] = border.calPoints(borderRightWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 1, btrr, bbrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_BOTTOM) {\n if(borderBottomWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderBottomWidth / borderLeftWidth);\n let deg2 = Math.atan(borderBottomWidth / borderRightWidth);\n __cacheStyle[k2] = border.calPoints(borderBottomWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 2, bblr, bbrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_LEFT) {\n if(borderLeftWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderLeftWidth / borderTopWidth);\n let deg2 = Math.atan(borderLeftWidth / borderBottomWidth);\n __cacheStyle[k2] = border.calPoints(borderLeftWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 3, btlr, bblr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n }\n });\n // 强制计算继承性的\n let parentComputedStyle = parent && parent.computedStyle;\n if(currentStyle[FONT_STYLE][1] === 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][0];\n }\n __cacheStyle[FONT_STYLE] = computedStyle[FONT_STYLE];\n let color = currentStyle[COLOR];\n if(color[1] === 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[1] === GRADIENT) {\n __cacheStyle[COLOR] = computedStyle[COLOR] = color[0];\n }\n else if(color[1] === RGBA) {\n __cacheStyle[COLOR] = int2rgba(computedStyle[COLOR] = rgba2int(color[0]));\n }\n }\n let textStrokeColor = currentStyle[TEXT_STROKE_COLOR];\n if(textStrokeColor[1] === 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[1] === GRADIENT) {\n __cacheStyle[TEXT_STROKE_COLOR] = computedStyle[TEXT_STROKE_COLOR] = textStrokeColor[0];\n }\n else if(textStrokeColor[1] === RGBA) {\n __cacheStyle[TEXT_STROKE_COLOR] = int2rgba(computedStyle[TEXT_STROKE_COLOR] = rgba2int(textStrokeColor[0]));\n }\n }\n if(currentStyle[TEXT_STROKE_WIDTH][1] === 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[1] === REM) {\n v = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * this.root.height * 0.01;\n }\n else if(v[1] === VMAX) {\n v = v[0] * Math.max(this.root.width, this.root.height) * 0.01;\n }\n else if(v[1] === VMIN) {\n v = v[0] * Math.min(this.root.width, this.root.height) * 0.01;\n }\n else {\n v = v[0];\n }\n computedStyle[TEXT_STROKE_WIDTH] = v;\n __cacheStyle[TEXT_STROKE_WIDTH] = true;\n }\n if(currentStyle[TEXT_STROKE_OVER][1] === 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][0];\n }\n if(currentStyle[VISIBILITY][1] === INHERIT) {\n computedStyle[VISIBILITY] = parent ? parentComputedStyle[VISIBILITY] : 'visible';\n }\n else if(isNil(__cacheStyle[VISIBILITY])) {\n computedStyle[VISIBILITY] = currentStyle[VISIBILITY][0];\n }\n __cacheStyle[VISIBILITY] = computedStyle[VISIBILITY];\n if(currentStyle[POINTER_EVENTS][1] === 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][0];\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(__cacheStyle, currentStyle, computedStyle, __config, sx1, sy1) {\n let rebuild;\n if(isNil(__cacheStyle[PERSPECTIVE])) {\n __cacheStyle[PERSPECTIVE] = true;\n rebuild = true;\n let v = currentStyle[PERSPECTIVE];\n let ppt = this.__calSize(v, this.clientWidth, true);\n computedStyle[PERSPECTIVE] = ppt;\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 if(rebuild) {\n if(sx1 === undefined) {\n sx1 = this.__sx1;\n sy1 = this.__sy1;\n }\n let po = computedStyle[PERSPECTIVE_ORIGIN].slice(0);\n po[0] += sx1 || 0;\n po[1] += sy1 || 0;\n __config[NODE_PERSPECTIVE_MATRIX] = tf.calPerspectiveMatrix(computedStyle[PERSPECTIVE], po);\n }\n }\n\n __calFilter(currentStyle, computedStyle) {\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, v2];\n }\n else {\n // 部分%单位的滤镜强制使用数字\n if(v[1] === DEG || v[1] === PERCENT || v[1] === NUMBER) {\n v = v[0];\n }\n else {\n v = this.__calSize(v, this.root.width, false);\n }\n return [k, v];\n }\n });\n }\n\n __calContent(renderMode, lv, currentStyle, computedStyle) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n if(lv < REPAINT) {\n return this.__hasContent;\n }\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 true;\n }\n }\n }\n if(currentStyle[BACKGROUND_COLOR][0][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 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')]][0][3] > 0) {\n return 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 true;\n }\n }\n }\n }\n }\n return false;\n }\n\n /**\n * 渲染基础方法,Dom/Geom公用\n * @param renderMode\n * @see node/mode\n * @param lv\n * @see refresh/level\n * @param ctx canvas/svg/webgl共用\n * @param cache 是否是局部根节点缓存模式下的绘制\n * @see refresh/Cache.NA\n * @param dx cache时偏移x\n * @param dy cache时偏移y\n * @return Object\n * x1/x2/x3/x4/y1/y2/y3/y4 坐标\n * break svg判断无变化提前跳出\n * cacheError 离屏申请失败,仅canvas\n * offscreenBlend 无cache时的离屏canvas,仅canvas\n * offscreenFilter 无cache时的离屏canvas,仅canvas\n * offscreenOverflow 无cache时的离屏canvas,仅canvas\n * offscreenMask 无cache时的离屏canvas,仅canvas\n */\n render(renderMode, lv, ctx, cache, dx = 0, dy = 0) {\n let {\n isDestroyed,\n root,\n __config,\n } = this;\n let __cache = __config[NODE_CACHE];\n let __cacheStyle = __config[NODE_CACHE_STYLE];\n let currentStyle = __config[NODE_CURRENT_STYLE];\n let computedStyle = __config[NODE_COMPUTED_STYLE];\n // 渲染完认为完全无变更,等布局/动画/更新重置\n __config[NODE_REFRESH_LV] = NONE;\n // >=REPAINT清空bbox\n if(lv >= REPAINT) {\n this.__bbox = null;\n this.__filterBbox = null;\n }\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, __config, 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 __config[NODE_DEFS_CACHE].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 __config[NODE_DEFS_CACHE].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, __config, false, dx, dy);\n }\n }\n else if(bgi.k) {\n let gd = this.__gradient(renderMode, ctx, bx1, by1, bx2, by2, bgi, dx, dy);\n if(gd) {\n if(gd.k === 'conic') {\n gradient.renderConic(this, renderMode, ctx, gd.v, bx1, by1, bx2 - bx1, by2 - by1,\n btlr, btrr, bbrr, bblr);\n }\n else {\n bg.renderBgc(this, renderMode, ctx, gd.v, borderList,\n bx1, by1, bx2 - bx1, by2 - by1, btlr, btrr, bbrr, bblr, 'fill', false, dx, dy);\n }\n }\n }\n });\n }\n // boxShadow可能会有多个\n if(boxShadow) {\n boxShadow.forEach(item => {\n bs.renderBoxShadow(this, renderMode, ctx, item, x1, y1, x6, y6, x6 - x1, y6 - y1, dx, dy);\n });\n }\n // 边框需考虑尖角,两条相交边平分45°夹角\n if(borderTopWidth > 0 && borderTopColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_TOP], __cacheStyle[BORDER_TOP_COLOR], dx, dy);\n }\n if(borderRightWidth > 0 && borderRightColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_RIGHT], __cacheStyle[BORDER_RIGHT_COLOR], dx, dy);\n }\n if(borderBottomWidth > 0 && borderBottomColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_BOTTOM], __cacheStyle[BORDER_BOTTOM_COLOR], dx, dy);\n }\n if(borderLeftWidth > 0 && borderLeftColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_LEFT], __cacheStyle[BORDER_LEFT_COLOR], dx, dy);\n }\n return res;\n }\n\n __destroy() {\n if(this.isDestroyed) {\n return;\n }\n super.__destroy();\n let { root } = this;\n this.clearAnimate();\n this.clearFrameAnimate();\n // root在没有初始化到真实dom渲染的情况下没有\n root && root.delRefreshTask(this.__loadBgi.cb);\n root && root.delRefreshTask(this.__task);\n this.__task = null;\n this.__root = null;\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 }\n\n // 先查找到注册了事件的节点,再捕获冒泡判断增加性能\n __emitEvent(e, force) {\n let { isDestroyed, 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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].push(v);\n return 'url(#' + uuid + ')';\n }\n }\n\n __getCg(renderMode, ctx, gd) {\n let { stop } = gd;\n let len = stop.length - 1;\n if(stop[len][1] < 1) {\n stop.push([stop[len][0].slice(0), 1]);\n }\n if(stop[0][1] > 0) {\n stop.unshift([stop[0][0].slice(0), 0]);\n }\n // canvas采用点色值计算法,svg则分360度画块\n let res = [];\n if(renderMode === CANVAS || renderMode === WEBGL) {\n return gd;\n }\n return res;\n }\n\n // canvas清空自身cache,cacheTotal在Root的自底向上逻辑做,svg仅有cacheTotal\n clearCache(onlyTotal) {\n let __config = this.__config;\n let __cacheTotal = __config[NODE_CACHE_TOTAL];\n let __cacheFilter = __config[NODE_CACHE_FILTER];\n let __cacheMask = __config[NODE_CACHE_MASK];\n let __cacheOverflow = __config[NODE_CACHE_OVERFLOW];\n if(!onlyTotal) {\n __config[NODE_CACHE_STYLE] = this.__cacheStyle = {};\n let __cache = __config[NODE_CACHE];\n if(__cache) {\n __cache.release();\n }\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 }\n\n updateStyle(style, cb) {\n let node = this;\n let { root, __config } = node;\n let formatStyle = css.normalize(style);\n // 有root说明被添加渲染过了\n if(root) {\n root.addRefreshTask(node.__task = {\n __before() {\n node.__task = null;\n if(__config[NODE_IS_DESTROYED]) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_STYLE] = formatStyle;\n res[UPDATE_OVERWRITE] = style; // 标识盖原有style样式不仅仅是修改currentStyle,不同于animate\n res[UPDATE_KEYS] = Object.keys(formatStyle).map(i => {\n if(!GEOM.hasOwnProperty(i)) {\n i = parseInt(i);\n }\n return i;\n });\n res[UPDATE_CONFIG] = __config;\n root.__addUpdate(node, __config, root, root.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb.call(node, diff);\n }\n },\n });\n }\n // 没有是在如parse()还未添加的时候,可以直接同步覆盖\n else {\n Object.assign(this.currentStyle, formatStyle);\n if(isFunction(cb)) {\n cb.call(node, -1);\n }\n }\n }\n\n // 传入格式化好key/value的样式\n updateFormatStyle(style, cb) {\n let node = this;\n let { root, __config } = node;\n if(root) {\n root.addRefreshTask(node.__task = {\n __before() {\n node.__task = null; // 清除在before,防止after的回调增加新的task误删\n if(__config[NODE_IS_DESTROYED]) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_STYLE] = style;\n res[UPDATE_KEYS] = Object.keys(style).map(i => {\n if(!GEOM.hasOwnProperty(i)) {\n i = parseInt(i);\n }\n return i;\n });\n res[UPDATE_CONFIG] = __config;\n root.__addUpdate(node, __config, root, root.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb.call(node, diff);\n }\n },\n });\n }\n // 没有是在如parse()还未添加的时候,可以直接同步覆盖\n else {\n Object.assign(this.currentStyle, style);\n if(isFunction(cb)) {\n cb.call(node, -1);\n }\n }\n }\n\n animate(list, options = {}) {\n let animation = new Animation(this, list, options);\n if(this.isDestroyed) {\n animation.__destroy(true);\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/margin/flex/vertical等\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 if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\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 }\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 if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\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 }\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.__config[NODE_LIMIT_CACHE] = false;\n }\n if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\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.__config[NODE_LIMIT_CACHE] = false;\n }\n if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\n }\n this.clearCache();\n }\n\n __releaseWhenEmpty(__cache) {\n if(__cache && __cache.available) {\n __cache.release();\n }\n return true;\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 self = this;\n if(self.isDestroyed) {\n inject.warn('Remove target is destroyed.');\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n let { root, domParent } = self;\n let target = self.isShadowRoot ? self.hostRoot : self;\n // 特殊情况连续append/remove时候,还未被添加进来找不到所以无需删除\n if(domParent.children.indexOf(target) === -1) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null; // 清除在before,防止after的回调增加新的task误删\n let pJson = domParent.__json;\n let i = pJson.children.indexOf(self.isShadowRoot ? self.hostRoot.__json : self.__json);\n if(i === -1) {\n throw new Error('Remove index Exception.')\n }\n pJson.children.splice(i, 1);\n domParent.children.splice(i, 1);\n let zChildren = domParent.zIndexChildren;\n // 可能appendChild会清空没有\n if(zChildren) {\n let j = zChildren.indexOf(self.isShadowRoot ? self.hostRoot : self);\n if(j > -1) {\n zChildren.splice(j, 1);\n }\n }\n if(self.__prev) {\n self.__prev.__next = self.__next;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = REFLOW;\n res[UPDATE_REMOVE_DOM] = true;\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n __after(diff) {\n self.isShadowRoot ? self.hostRoot.__destroy() : self.__destroy();\n if(isFunction(cb)) {\n cb.call(self, diff);\n }\n },\n });\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;\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 matrix() {\n return this.__config[NODE_MATRIX];\n }\n\n get matrixEvent() {\n return this.__config[NODE_MATRIX_EVENT];\n }\n\n get perspectiveMatrix() {\n return this.__config[NODE_PERSPECTIVE_MATRIX];\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.__config[NODE_CACHE_AS_BITMAP] = 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 enums from '../util/enums';\nimport unit from '../style/unit';\nimport level from './level';\n\nconst {\n STYLE_KEY: {\n DISPLAY,\n TOP,\n BOTTOM,\n POSITION,\n HEIGHT,\n },\n} = enums;\nconst { AUTO, PX, PERCENT } = unit;\nconst { REFLOW } = level;\n\nfunction offsetAndResizeByNodeOnY(node, root, reflowHash, dy, inDirectAbsList) {\n if(dy) {\n let last;\n do {\n // component的sr没有next兄弟,视为component的next\n while(node.isShadowRoot) {\n node = node.host;\n }\n last = node;\n let isContainer, parent = node.domParent;\n if(parent) {\n let cs = parent.computedStyle;\n let ps = cs[POSITION];\n isContainer = parent === root || parent.isShadowRoot || ps === 'relative' || ps === 'absolute';\n }\n // 先偏移next,忽略有定位的absolute,本身非container也忽略\n let next = node.next;\n let container;\n while(next) {\n if(next.computedStyle[DISPLAY] !== 'none') {\n if(next.currentStyle[POSITION] === 'absolute') {\n let { [TOP]: top, [BOTTOM]: bottom, [HEIGHT]: height } = next.currentStyle;\n if(top[1] === AUTO) {\n if(bottom[1] === AUTO || bottom[1] === PX) {\n next.__offsetY(dy, true, REFLOW);\n next.clearCache();\n }\n else if(bottom[1] === PERCENT) {\n let v = (1 - bottom[0] * 0.01) * dy;\n next.__offsetY(v, true, REFLOW);\n next.clearCache();\n }\n }\n else if(top[1] === PERCENT) {\n let v = top[0] * 0.01 * dy;\n next.__offsetY(v, true, REFLOW);\n next.clearCache();\n }\n // 高度百分比需发生变化的重新布局,需要在容器内\n if(height[1] === PERCENT) {\n if(isContainer) {\n parent.__layoutAbs(parent, parent.__layoutData, next);\n }\n else {\n if(!container) {\n container = parent;\n while(container) {\n if(container === root || container.isShadowRoot) {\n break;\n }\n let cs = container.currentStyle;\n if(cs[POSITION] === 'absolute' || cs[POSITION] === 'relative') {\n break;\n }\n container = container.domParent;\n }\n }\n inDirectAbsList.push([parent, container, next]);\n }\n }\n }\n else {\n next.__offsetY(dy, true, REFLOW);\n next.clearCache();\n }\n }\n next = next.next;\n }\n // root本身没domParent\n if(!parent) {\n break;\n }\n node = parent;\n // parent判断是否要resize\n let { currentStyle } = node;\n let isAbs = currentStyle[POSITION] === 'absolute';\n let need;\n if(isAbs) {\n if(currentStyle[HEIGHT][1] === AUTO\n && (currentStyle[TOP][1] === AUTO || currentStyle[BOTTOM][1] === AUTO)) {\n need = true;\n }\n }\n // height不定则需要\n else if(currentStyle[HEIGHT][1] === AUTO) {\n need = true;\n }\n if(need) {\n node.__resizeY(dy, REFLOW);\n node.clearCache();\n }\n // abs或者高度不需要继续向上调整提前跳出\n else {\n break;\n }\n if(node === root) {\n break;\n }\n }\n while(true);\n // 最后一个递归向上取消总缓存,防止过程中重复next多次无用递归\n while(last) {\n last.clearCache(true);\n last = last.domParent;\n }\n }\n}\n\nfunction clearUniqueReflowId(hash) {\n for(let i in hash) {\n if(hash.hasOwnProperty(i)) {\n let { node } = hash[i];\n delete node.__uniqueReflowId;\n }\n }\n}\n\nfunction getMergeMargin(topList, bottomList) {\n let total = 0;\n let max = topList[0];\n let min = topList[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 diff = 0;\n if(max > 0 && min > 0) {\n diff = Math.max(max, min) - total;\n }\n else if(max < 0 && min < 0) {\n diff = Math.min(max, min) - total;\n }\n else if(max !== 0 || min !== 0) {\n diff = max + min - total;\n }\n return diff;\n}\n\nexport default {\n offsetAndResizeByNodeOnY,\n clearUniqueReflowId,\n getMergeMargin,\n};\n","import Xom from './Xom';\nimport Text from './Text';\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 $$type from '../util/$$type';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport reflow from '../refresh/reflow';\nimport builder from '../util/builder';\nimport mode from '../refresh/mode';\nimport level from '../refresh/level';\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 NODE_KEY: {\n NODE_CURRENT_STYLE,\n NODE_STYLE,\n NODE_STRUCT,\n NODE_DOM_PARENT,\n NODE_IS_INLINE,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_FOCUS,\n UPDATE_ADD_DOM,\n UPDATE_CONFIG,\n },\n STRUCT_KEY: {\n STRUCT_NUM,\n STRUCT_LV,\n STRUCT_TOTAL,\n STRUCT_CHILD_INDEX,\n STRUCT_INDEX,\n },\n ELLIPSIS,\n} = enums;\nconst { AUTO, PX, PERCENT, REM, VW, VH, VMAX, VMIN } = unit;\nconst { isRelativeOrAbsolute, getBaseline, getVerticalBaseline } = css;\nconst { extend, isNil, isFunction } = util;\nconst { CANVAS, SVG, WEBGL } = mode;\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 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 = children || [];\n this.__flexLine = []; // flex布局多行模式时存储行\n this.__ellipsis = null; // 虚拟节点,有的话渲染\n let config = this.__config;\n config[NODE_CURRENT_STYLE] = this.__currentStyle;\n config[NODE_STYLE] = this.__style;\n }\n\n __structure(i, lv, j) {\n let res = super.__structure(i++, lv, j);\n let arr = [res];\n let zIndexChildren = this.__zIndexChildren = this.__zIndexChildren || genZIndexChildren(this);\n zIndexChildren.forEach((child, j) => {\n let temp = child.__structure(i, lv + 1, j);\n if(Array.isArray(temp)) {\n i += temp.length;\n arr = arr.concat(temp);\n }\n else {\n i++;\n arr.push(temp);\n }\n });\n let total = arr.length - 1;\n res[STRUCT_NUM] = zIndexChildren.length;\n res[STRUCT_TOTAL] = total;\n return arr;\n }\n\n __modifyStruct(root, offset = 0) {\n let __config = this.__config;\n let struct = __config[NODE_STRUCT];\n let total = struct[STRUCT_TOTAL] || 0;\n // 新生成了struct,引用也变了\n let nss = this.__structure(struct[STRUCT_INDEX], struct[STRUCT_LV], struct[STRUCT_CHILD_INDEX]);\n root.__structs.splice(struct[STRUCT_INDEX] + offset, total + 1, ...nss);\n let d = 0;\n if(this !== root) {\n struct = __config[NODE_STRUCT];\n d = (struct[STRUCT_TOTAL] || 0) - total;\n let ps = __config[NODE_DOM_PARENT].__config[NODE_STRUCT];\n ps[STRUCT_TOTAL] = ps[STRUCT_TOTAL] || 0;\n ps[STRUCT_TOTAL] += d;\n }\n return [struct, d];\n }\n\n /**\n * 因为zIndex/abs的变化造成的更新,只需重排这一段顺序即可\n * 即便包含component造成的dom变化也不影响,component作为子节点reflow会再执行,这里重排老的vd\n * @param structs\n * @private\n */\n __updateStruct(structs) {\n let { [STRUCT_INDEX]: index, [STRUCT_TOTAL]: total = 0 } = this.__config[NODE_STRUCT];\n let zIndexChildren = this.__zIndexChildren = genZIndexChildren(this);\n let length = zIndexChildren.length;\n if(length === 1) {\n return;\n }\n zIndexChildren.forEach((child, i) => {\n let ns = child.__config[NODE_STRUCT];\n // 一般肯定有的,但是在zIndex更新和addChild同时发生时,新添加的尚无,zIndex更新会报错,临时解决\n if(ns) {\n ns[STRUCT_CHILD_INDEX] = i; // 仅后面排序用\n }\n });\n // 按直接子节点划分为相同数量的若干段进行排序\n let arr = [];\n let source = [];\n for(let i = index + 1; i <= index + total; i++) {\n let child = structs[i];\n // 同上防止\n if(child) {\n let o = {\n child,\n list: structs.slice(child[STRUCT_INDEX], child[STRUCT_INDEX] + (child[STRUCT_TOTAL] || 0) + 1),\n };\n arr.push(o);\n source.push(o);\n i += child[STRUCT_TOTAL] || 0;\n }\n }\n arr.sort(function(a, b) {\n return a.child[STRUCT_CHILD_INDEX] - b.child[STRUCT_CHILD_INDEX];\n });\n // 是否有变更,有才进行重新计算\n let needSort;\n for(let i = 0, len = source.length; i < len; i++) {\n if(source[i] !== arr[i]) {\n needSort = true;\n break;\n }\n }\n if(needSort) {\n let list = [];\n arr.forEach(item => {\n list = list.concat(item.list);\n });\n list.forEach((struct, i) => {\n struct[STRUCT_INDEX] = index + i + 1;\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[1] !== 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.__config[NODE_IS_INLINE] && 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 super.__offsetY(diff, isLayout, lv);\n let ep = this.__ellipsis;\n if(ep) {\n ep.__offsetY(diff, isLayout);\n }\n if(isLayout && !this.__config[NODE_IS_INLINE] && 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[1] === AUTO;\n let isFixed = [PX, PERCENT, REM, VW, VH, VMAX, VMIN].indexOf(flexBasis[1]) > -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[1]) > -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.__layout({\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.__layout({\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.__layout({\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 __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 * @private\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);\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.__layout({\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.__layout({\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.__layout({\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.__layout({\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);\n if(diff) {\n item.__offsetX(diff, true);\n x += diff;\n }\n }\n else {\n mergeMarginStartList.push(marginTop);\n let diff = reflow.getMergeMargin(mergeMarginStartList, mergeMarginEndList);\n if(diff) {\n item.__offsetY(diff, true);\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);\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.__layout({\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.__layout({\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.__layout({\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);\n }\n else if(!isUpright && !fixedHeight) {\n this.__resizeY(spread);\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);\n }\n else {\n item.__offsetY(spreadList[count], true);\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.__layout({\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);\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);\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);\n }\n else {\n item.__offsetX(diff, true);\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);\n }\n else {\n item.__offsetX(per, true);\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);\n }\n else {\n item.__offsetX(diff, true);\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);\n }\n else {\n item.__offsetX(between, true);\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);\n }\n else {\n item.__offsetX(around * (i + 1), true);\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);\n }\n else {\n item.__offsetX(per * i, true);\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.__layout({\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[1] !== AUTO || alignSelf === 'stretch') {\n needGenAr = true;\n }\n else if(alignSelf === 'auto' && alignItems === 'stretch') {\n needGenAr = true;\n }\n if(needGenAr) {\n item.__layout({\n x,\n y,\n w,\n h: main,\n h3: main, // 同w2\n isUpright,\n }, isAbs, isColumn, isRow);\n }\n else {\n item.__layout({\n x,\n y,\n w,\n h: main,\n h3: main, // 同w2\n isUpright,\n }, true, isColumn, isRow);\n item.__layout({\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.__layout({\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][1] === AUTO) {\n marginAutoCount++;\n }\n if(currentStyle[MARGIN_RIGHT][1] === AUTO) {\n marginAutoCount++;\n }\n }\n else {\n if(currentStyle[MARGIN_TOP][1] === AUTO) {\n marginAutoCount++;\n }\n if(currentStyle[MARGIN_BOTTOM][1] === 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.__layout({\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][1] === AUTO) {\n count += per;\n child.__offsetX(count, true);\n }\n else if(count) {\n child.__offsetX(count, true);\n }\n if(currentStyle[MARGIN_RIGHT][1] === AUTO) {\n count += per;\n }\n }\n else {\n if(currentStyle[MARGIN_TOP][1] === AUTO) {\n count += per;\n child.__offsetY(count, true);\n }\n else if(count) {\n child.__offsetY(count, true);\n }\n if(currentStyle[MARGIN_BOTTOM][1] === 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) : child.__offsetY(free, true);\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) : child.__offsetY(center, true);\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) : child.__offsetY(between * i, true);\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) : child.__offsetY(around * (i * 2 + 1), true);\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) : child.__offsetY(around * (i + 1), true);\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);\n }\n }\n else if(alignSelf === 'center') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff * 0.5, true);\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[1] === 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);\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);\n }\n }\n else if(alignItems === 'flexEnd') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff, true);\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseline - item.firstBaseline;\n if(diff !== 0) {\n item.__offsetY(diff, true);\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[1] === AUTO && item.outerHeight < maxCross) {\n item.__layout(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[1] === 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);\n }\n }\n else if(alignSelf === 'center') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff * 0.5, true);\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[1] === 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);\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);\n }\n }\n else if(alignItems === 'flexEnd') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff, true);\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseline - item.firstBaseline;\n if(diff !== 0) {\n item.__offsetX(diff, true);\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[1] === 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.__config[NODE_IS_INLINE] = 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.__layout({\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[1] === AUTO) {\n isUprightIbFull = true;\n }\n else if(!isUpright && w[1] === 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.__layout({\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.__layout({\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.__layout({\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[1] === AUTO && isUpright) {\n isUprightIbFull = true;\n }\n if(width[1] === 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.__layout({\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.__layout({\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[1] === AUTO && isUpright) {\n isUprightIbFull = true;\n }\n if(width[1] === 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);\n }\n else if(!isUpright && !fixedHeight) {\n this.__resizeY(spread);\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);\n }\n else {\n this.__offsetX(diff, true);\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, clientWidth, clientHeight, computedStyle } = container;\n let { 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[1] !== AUTO) {\n fixedLeft = true;\n computedStyle[LEFT] = this.__calSize(left, clientWidth, true);\n }\n else {\n computedStyle[LEFT] = 'auto';\n }\n if(right[1] !== AUTO) {\n fixedRight = true;\n computedStyle[RIGHT] = this.__calSize(right, clientWidth, true);\n }\n else {\n computedStyle[RIGHT] = 'auto';\n }\n if(top[1] !== AUTO) {\n fixedTop = true;\n computedStyle[TOP] = this.__calSize(top, clientHeight, true);\n }\n else {\n computedStyle[TOP] = 'auto';\n }\n if(bottom[1] !== 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[1] !== AUTO) {\n w2 = this.__calSize(width, clientWidth, true);\n }\n }\n else if(fixedRight) {\n if(width[1] !== 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[1] !== 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[1] !== AUTO) {\n h2 = this.__calSize(height, clientHeight, true);\n }\n }\n else if(fixedBottom) {\n if(height[1] !== 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;\n while(prev) {\n // 以前面的flow的最近的prev末尾为准\n if(prev instanceof Text || prev.computedStyle[POSITION] !== 'absolute') {\n y2 = prev.y + prev.outerHeight;\n break;\n }\n prev = prev.prev;\n }\n if(height[1] !== 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.__layout({\n x: x2,\n y: y2,\n w: widthLimit,\n h: heightLimit,\n isUpright: data.isUpright, // 父亲的\n }, true, false);\n widthLimit = item.outerWidth;\n }\n item.__layout({\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 }, false, false);\n if(onlyRight) {\n item.__offsetX(-item.outerWidth, true);\n }\n if(onlyBottom) {\n item.__offsetY(-item.outerHeight, true);\n }\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);\n }\n else if(item instanceof Component) {\n let sr = item.shadowRoot;\n if(sr instanceof Dom) {\n sr.__layoutAbs(sr, data);\n }\n }\n });\n // 根节点自己特殊执行,不在layout统一\n this.__execAr();\n }\n\n render(renderMode, lv, ctx, cache, dx, dy) {\n let res = super.render(renderMode, lv, ctx, cache, dx, dy);\n let ep = this.__ellipsis;\n if(ep) {\n ep.render(renderMode, lv, res.ctx, cache, 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, force) {\n if(force) {\n return super.__emitEvent(e, force);\n }\n let { isDestroyed, computedStyle, isMask } = 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 // 找到对应的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)) {\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);\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(json, cb) {\n let self = this;\n if(!isNil(json) && !self.isDestroyed) {\n let { root, host } = self;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, self);\n }\n else {\n vd = builder.initDom(json, root, host, self);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null; // 清除在before,防止after的回调增加新的task误删\n self.__json.children.push(json);\n let len = self.children.length;\n if(len) {\n let last = self.children[len - 1];\n last.__next = vd;\n vd.__prev = last;\n }\n self.children.push(vd);\n self.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in appendChild.');\n }\n }\n }\n\n prependChild(json, cb) {\n let self = this;\n if(!isNil(json) && !self.isDestroyed) {\n let { root, host } = self;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, self);\n }\n else {\n vd = builder.initDom(json, root, host, self);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null;\n self.__json.children.unshift(json);\n let len = self.children.length;\n if(len) {\n let first = self.children[0];\n first.__prev = vd;\n vd.__next = first;\n }\n self.children.unshift(vd);\n self.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in prependChild.');\n }\n }\n }\n\n insertBefore(json, cb) {\n let self = this;\n if(!isNil(json) && !self.isDestroyed && self.domParent) {\n let { root, domParent } = self;\n let host = domParent.hostRoot;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, domParent);\n }\n else {\n vd = builder.initDom(json, root, host, domParent);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null;\n let i = 0, has, __json = domParent.__json, children = __json.children, len = children.length;\n let pJson = self.isShadowRoot ? self.hostRoot.__json : self.__json;\n for(; i < len; i++) {\n if(children[i] === pJson) {\n has = true;\n break;\n }\n }\n if(!has) {\n throw new Error('InsertBefore exception.');\n }\n // 插入注意开头位置处理\n if(i) {\n children.splice(i, 0, json);\n vd.__next = self;\n vd.__prev = self.__prev;\n self.__prev = vd;\n domParent.children.splice(i, 0, vd);\n }\n else {\n if(len) {\n let first = domParent.children[0];\n first.__prev = vd;\n vd.__next = first;\n }\n children.unshift(json);\n domParent.children.unshift(vd);\n }\n domParent.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in insertBefore.');\n }\n }\n }\n\n insertAfter(json, cb) {\n let self = this;\n if(!isNil(json) && !self.isDestroyed && self.domParent) {\n let { root, domParent } = self;\n let host = domParent.hostRoot;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, domParent);\n }\n else {\n vd = builder.initDom(json, root, host, domParent);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null;\n let i = 0, has, __json = domParent.__json, children = __json.children, len = children.length;\n let pJson = self.isShadowRoot ? self.hostRoot.__json : self.__json;\n for(; i < len; i++) {\n if(children[i] === pJson) {\n has = true;\n break;\n }\n }\n if(!has) {\n throw new Error('insertAfter exception.');\n }\n // 插入注意末尾位置处理\n if(i < len - 1) {\n children.splice(i + 1, 0, json);\n vd.__prev = self;\n vd.__next = self.__next;\n self.__next = vd;\n domParent.children.splice(i + 1, 0, vd);\n }\n else {\n if(len) {\n let last = domParent.children[len - 1];\n last.__next = vd;\n vd.__prev = last;\n }\n children.push(json);\n domParent.children.push(vd);\n }\n domParent.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in insertAfter.');\n }\n }\n }\n\n removeChild(target, cb) {\n if(target.parent === this && (target instanceof Xom || target instanceof Component)) {\n if(this.isDestroyed) {\n inject.warn('Remove parent is destroyed.');\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n target.remove(cb);\n }\n else {\n inject.error('Invalid parameter in 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';\nimport css from '../style/css';\n\nconst {\n STYLE_KEY: {\n WIDTH,\n HEIGHT,\n DISPLAY,\n BORDER_TOP_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n VISIBILITY,\n BACKGROUND_IMAGE,\n BACKGROUND_COLOR,\n BOX_SHADOW,\n MIX_BLEND_MODE,\n MARGIN_RIGHT,\n MARGIN_LEFT,\n PADDING_RIGHT,\n PADDING_LEFT,\n FONT_SIZE,\n FLEX_BASIS,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_FOCUS,\n UPDATE_CONFIG,\n },\n NODE_KEY: {\n NODE_CACHE,\n NODE_DEFS_CACHE,\n NODE_IS_MASK,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, REM, VW, VH, VMAX, VMIN, RGBA } = 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 && ca.state === inject.LOADED) {\n loadImg.source = ca.source;\n loadImg.width = ca.width;\n loadImg.height = ca.height;\n }\n }\n let config = this.__config;\n if(config[NODE_IS_MASK]) {\n let { style, currentStyle } = this;\n style[BACKGROUND_IMAGE] = currentStyle[BACKGROUND_IMAGE] = [null];\n style[BACKGROUND_COLOR] = currentStyle[BACKGROUND_COLOR] = [[0, 0, 0, 0], RGBA];\n style[BORDER_TOP_WIDTH] = currentStyle[BORDER_TOP_WIDTH] = [0, PX];\n style[BORDER_RIGHT_WIDTH] = currentStyle[BORDER_RIGHT_WIDTH] = [0, PX];\n style[BORDER_LEFT_WIDTH] = currentStyle[BORDER_LEFT_WIDTH] = [0, PX];\n style[BORDER_BOTTOM_WIDTH] = currentStyle[BORDER_BOTTOM_WIDTH] = [0, PX];\n style[BOX_SHADOW] = currentStyle[BOX_SHADOW] = null;\n style[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE] = 'normal';\n }\n }\n\n /**\n * 覆盖xom的方法,在__layout()3个分支中会首先被调用\n * 当样式中固定宽高时,图片按样式尺寸,加载后重新绘制即可\n * 只固定宽高一个时,加载完要计算缩放比,重新布局绘制\n * 都没有固定,按照图片尺寸,重新布局绘制\n * 这里计算非固定的情况,将其改为固定供布局渲染使用,未加载完成为0\n * @param data\n * @param isInline\n * @returns {{fixedWidth: boolean, w: *, x: *, h: *, y: *, fixedHeight: boolean}}\n * @private\n */\n __preLayout(data, isInline) {\n let res = super.__preLayout(data, false);\n let loadImg = this.__loadImg;\n // 可能已提前加载好了,或有缓存,为减少刷新直接使用\n if(!loadImg.error) {\n let src = loadImg.src;\n let cache = inject.IMG[src];\n if(cache && cache.state === inject.LOADED) {\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(renderMode, lv, currentStyle, computedStyle) {\n let res = super.__calContent(renderMode, lv, currentStyle, computedStyle);\n if(!res) {\n let {\n __loadImg: loadImg,\n } = this;\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, lv, ctx, cache, dx = 0, dy = 0) {\n let res = super.render(renderMode, lv, ctx, cache, dx, dy);\n if(renderMode === mode.WEBGL) {\n dx = res.dx;\n dy = res.dy;\n }\n let {\n offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow,\n } = res;\n let {\n width, height, isDestroyed,\n props: {\n placeholder,\n },\n computedStyle,\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 __config,\n __loadImg: loadImg,\n root,\n } = this;\n if(offscreenBlend) {\n ctx = offscreenBlend.target.ctx;\n }\n if(offscreenMask) {\n ctx = offscreenMask.target.ctx;\n }\n if(offscreenFilter) {\n ctx = offscreenFilter.target.ctx;\n }\n if(offscreenOverflow) {\n ctx = offscreenOverflow.target.ctx;\n }\n // 没source且不error时加载图片\n if(!loadImg.source && !loadImg.error && !loadImg.loading) {\n this.__loadAndRefresh(loadImg, root, ctx, placeholder, computedStyle, width, height);\n }\n if(isDestroyed || display === 'none' || visibility === 'hidden') {\n return res;\n }\n let __cache = __config[NODE_CACHE];\n if(cache && __cache && __cache.enabled) {\n ctx = __cache.ctx;\n }\n let originX, originY;\n originX = res.x3 + dx;\n originY = res.y3 + dy;\n // 根据配置以及占位图显示error\n let source = loadImg.source;\n if(loadImg.error && !placeholder && Img.showError) {\n let strokeWidth = Math.min(width, height) * 0.02;\n let stroke = '#CCC';\n let fill = '#DDD';\n let cx = originX + width * 0.7;\n let cy = originY + height * 0.3;\n let r = strokeWidth * 5;\n let pts = [\n [originX + width * 0.15, originY + height * 0.7],\n [originX + width * 0.3, originY + height * 0.4],\n [originX + width * 0.5, originY + height * 0.6],\n [originX + width * 0.6, originY + height * 0.5],\n [originX + width * 0.9, originY + height * 0.8],\n [originX + width * 0.15, originY + height * 0.8]\n ];\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n ctx.strokeStyle = stroke;\n ctx.lineWidth = strokeWidth;\n ctx.fillStyle = fill;\n ctx.beginPath();\n ctx.moveTo(originX, originY);\n ctx.lineTo(originX + width, originY);\n ctx.lineTo(originX + width, originY + height);\n ctx.lineTo(originX, originY + height);\n ctx.lineTo(originX, originY);\n ctx.stroke();\n ctx.closePath();\n ctx.beginPath();\n let points = geom.ellipsePoints(cx, cy, r, r);\n painter.canvasPolygon(ctx, points, 0, 0);\n ctx.fill();\n ctx.closePath();\n ctx.beginPath();\n ctx.moveTo(pts[0][0], pts[0][1]);\n for(let i = 1, len = pts.length; i < len; i++) {\n let point = pts[i];\n ctx.lineTo(point[0], point[1]);\n }\n ctx.lineTo(pts[0][0], pts[0][1]);\n ctx.fill();\n ctx.closePath();\n }\n else if(renderMode === mode.SVG) {\n this.__addGeom('rect', [\n ['x', originX],\n ['y', originY],\n ['width', width],\n ['height', height],\n ['stroke', stroke],\n ['stroke-width', strokeWidth],\n ['fill', 'rgba(0,0,0,0)']\n ]);\n this.__addGeom('circle', [\n ['cx', cx],\n ['cy', cy],\n ['r', r],\n ['fill', fill],\n ]);\n let s = '';\n for(let i = 0, len = pts.length; i < len; i++) {\n let point = pts[i];\n if(i) {\n s += ' ';\n }\n s += point[0] + ',' + point[1];\n }\n this.__addGeom('polygon', [\n ['points', s],\n ['fill', fill]\n ]);\n }\n }\n else if(source) {\n // 圆角需要生成一个mask\n let list = border.calRadius(originX, originY, width, height,\n borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius);\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n // 有border-radius需模拟遮罩裁剪\n if(list) {\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, list, dx, dy);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(source, originX, originY, width, height);\n ctx.restore();\n }\n else {\n ctx.drawImage(source, originX, originY, width, height);\n }\n }\n else if(renderMode === mode.SVG) {\n // img没有变化无需diff,直接用上次的vd\n if(loadImg.cache) {\n loadImg.cache.cache = true;\n virtualDom.children = [loadImg.cache];\n // 但是还是要校验是否有borderRadius变化,引发img的圆角遮罩\n if(!virtualDom.cache && list) {\n let d = svgPolygon(list);\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', '#FFF'],\n ],\n }\n ],\n };\n let id = ctx.add(v);\n __config[NODE_DEFS_CACHE].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 __config[NODE_DEFS_CACHE].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 // img没加载时,清空,这样Xom就认为没内容不生成cache,防止img先绘制cache再绘制主屏,重复\n __releaseWhenEmpty(__cache) {\n if(!this.__loadImg.error && !this.__loadImg.source) {\n return super.__releaseWhenEmpty(__cache);\n }\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[1] !== AUTO) {\n w -= this.__calSize(width, total, true);\n }\n else {\n let loadImg = this.__loadImg;\n // 加载成功计算缩放后的宽度\n if(loadImg.source) {\n if(height[1] === PX) {\n w -= loadImg.width * height[0] / loadImg.height;\n }\n else if(height[1] === PERCENT) {\n w -= loadImg.width * height[0] * total * 0.01 / loadImg.height;\n }\n else if(height[1] === REM) {\n w -= loadImg.width * height[0] * this.root.computedStyle[FONT_SIZE] / loadImg.height;\n }\n else if(height[1] === VW) {\n w -= loadImg.width * height[0] * this.root.width * 0.01 / loadImg.height;\n }\n else if(height[1] === VH) {\n w -= loadImg.width * height[0] * this.root.height * 0.01 / loadImg.height;\n }\n else if(height[1] === VMAX) {\n w -= height[0] * Math.max(this.root.width, this.root.height) * 0.01 / loadImg.height;\n }\n else if(height[1] === VMIN) {\n w -= height[0] * 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[1]) > -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[1]) > -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[1] !== 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, root, ctx, placeholder, computedStyle, width, height, cb) {\n let self = this;\n // 先清空之前可能的\n if(loadImg.source || loadImg.error) {\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null; // 清除在before,防止after的回调增加新的task误删\n if(self.isDestroyed) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REFLOW; // 没有样式变化但内容尺寸发生了变化强制执行\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n });\n loadImg.source = null;\n }\n loadImg.loading = true;\n // 再测量,可能瞬间完成替换掉上面的\n inject.measureImg(loadImg.src, data => {\n // 还需判断url,防止重复加载时老的替换新的,失败走error绘制\n if(data.url === loadImg.src && !self.isDestroyed) {\n loadImg.cache && (loadImg.cache.cache = false);\n loadImg.loading = false;\n function reload() {\n let { currentStyle: { [WIDTH]: width, [HEIGHT]: height } } = self;\n root.delRefreshTask(self.__task);\n if(width[1] !== AUTO && height[1] !== AUTO) {\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null;\n if(self.isDestroyed) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REPAINT;\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n __after() {\n if(isFunction(cb)) {\n cb.call(self);\n }\n },\n });\n }\n else {\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null;\n if(self.isDestroyed) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REFLOW; // 没有样式变化但内容尺寸发生了变化强制执行\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n __after() {\n if(isFunction(cb)) {\n cb.call(self);\n }\n },\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 inject.measureImg(placeholder, data => {\n if(data.success) {\n loadImg.error = true;\n loadImg.source = data.source;\n loadImg.width = data.width;\n loadImg.height = data.height;\n reload();\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') {\n reload();\n }\n }\n }, {\n ctx,\n root,\n width,\n height,\n });\n }\n\n updateSrc(v, cb) {\n let self = this;\n let loadImg = self.__loadImg;\n let root = this.root;\n // 相等或空且当前error直接返回\n if(v === loadImg.src || !v && loadImg.error) {\n if(isFunction(cb)) {\n cb(-1);\n }\n }\n else if(v) {\n loadImg.src = v;\n self.__loadAndRefresh(loadImg, root, root.ctx, self.props.placeholder, self.computedStyle, self.width, self.height, cb);\n }\n else {\n loadImg.src = v;\n loadImg.source = null;\n loadImg.error = true;\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null;\n if(self.isDestroyed) {\n return;\n }\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, self.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb(diff);\n }\n },\n });\n }\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 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';\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 NODE_KEY: {\n NODE_CACHE_PROPS,\n NODE_CURRENT_PROPS,\n NODE_CURRENT_STYLE,\n NODE_STYLE,\n NODE_DEFS_CACHE,\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 let config = this.__config;\n config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n config[NODE_CURRENT_PROPS] = this.__currentProps;\n config[NODE_CURRENT_STYLE] = this.__currentStyle;\n config[NODE_STYLE] = this.__style;\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[1]) > -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[1]) > -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 __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.__config[NODE_CACHE_PROPS] = 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.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __calCache(renderMode, ctx, parent, __cacheStyle, currentStyle, computedStyle,\n clientWidth, clientHeight, offsetWidth, offsetHeight,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth,\n paddingTop, paddingRight, paddingBottom, paddingLeft,\n x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6) {\n let res = super.__calCache(renderMode, ctx, parent, __cacheStyle, currentStyle, computedStyle,\n clientWidth, clientHeight, offsetWidth, offsetHeight,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth,\n paddingTop, paddingRight, paddingBottom, paddingLeft,\n x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6);\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[1] === GRADIENT) {\n // let t = this.__gradient(renderMode, ctx, x3, y3, x4, y4, item[0], 0, 0);\n cs.push(item[0]);\n res.push(true);\n }\n else if(item && item[1] === RGBA && item[0][3] > 0) {\n cs.push(item[0]);\n res.push(int2rgba(item[0]));\n }\n else {\n cs.push('none');\n res.push('none');\n }\n });\n }\n }\n });\n return res;\n }\n\n __calContent(renderMode, lv, 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.x3, res.y3, res.x4, res.y4, item, res.dx, res.dy);\n }\n return int2rgba(item);\n });\n fill = fill.map(item => {\n if(item.k) {\n return this.__gradient(renderMode, res.ctx, res.x3, res.y3, res.x4, res.y4, item, res.dx, res.dy);\n }\n return int2rgba(item);\n });\n return {\n cx,\n cy,\n stroke,\n strokeWidth,\n strokeDasharray,\n strokeDasharrayStr,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n fill,\n fillRule,\n };\n }\n\n __preSetCanvas(renderMode, ctx, res) {\n let {\n stroke,\n strokeWidth,\n strokeDasharray,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n fill,\n } = res;\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\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, lv, ctx, cache, dx, dy) {\n let res = super.render(renderMode, lv, ctx, cache, dx, dy);\n if(renderMode === mode.SVG) {\n this.virtualDom.type = 'geom';\n }\n // 无论canvas/svg,break可提前跳出省略计算\n if(res.break) {\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 || renderMode === mode.WEBGL) {\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 || renderMode === mode.WEBGL) {\n if(matrix) {\n ctx.save();\n // 临时解决方案,webgl和cacheCanvas的渲染忽略世界matrix\n if(renderMode === mode.CANVAS) {\n let me = this.matrixEvent;\n matrix = mx.multiply(me, matrix);\n }\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 || renderMode === mode.WEBGL) {\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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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 // geom的cache无内容也不清除,因为子类不清楚内容,除非看不见\n __releaseWhenEmpty(cache, computedStyle) {\n return computedStyle[VISIBILITY] === 'hidden';\n }\n\n // offset/resize时要多一步清空props上记录的缓存\n __offsetX(diff, isLayout, lv) {\n super.__offsetX(diff, isLayout, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __offsetY(diff, isLayout, lv) {\n super.__offsetY(diff, isLayout, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __resizeX(diff, lv) {\n super.__resizeX(diff, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __resizeY(diff, lv) {\n super.__resizeY(diff, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\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.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 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';\nimport enums from './enums';\n\nconst {\n NODE_KEY: {\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_DOM_PARENT,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n NODE_STRUCT,\n },\n} = enums;\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 = sr.__config[NODE_COMPUTED_STYLE] = oldSr.computedStyle;\n }\n else {\n let domParent = cp.domParent;\n [\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n ].forEach(k => {\n sr.__config[k] = domParent.__config[k];\n });\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.__config[NODE_DOM_PARENT] = oldSr.domParent;\n sr.__config[NODE_STRUCT] = oldSr.__config[NODE_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 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';\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[1] === b[1]) {\n if(a[0] === b[0]) {\n return a[2] - b[2];\n }\n return b[0] - a[0];\n }\n return b[1] - a[1];\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 target.draw();\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 ctx.draw && ctx.draw(true);\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\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 apply.draw();\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 target.draw();\n apply.ctx.setTransform(1, 0, 0, 1, 0, 0);\n apply.ctx.clearRect(0, 0, width, height);\n apply.draw();\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 ctx.draw && ctx.draw(true);\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.globalAlpha = 1;\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\n inject.releaseCacheCanvas(target.canvas);\n }\n else if(type === OFFSCREEN_MASK) {\n let { mask, isClip } = offscreen;\n if(isClip) {\n offscreen.target.draw();\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 mask.draw();\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 offscreen.target.draw();\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 ctx.draw && ctx.draw(true);\n mask.ctx.setTransform(1, 0, 0, 1, 0, 0);\n mask.ctx.clearRect(0, 0, width, height);\n mask.draw();\n inject.releaseCacheCanvas(mask.canvas);\n }\n else {\n mask.draw();\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 target.draw();\n mask.ctx.setTransform(1, 0, 0, 1, 0, 0);\n mask.ctx.clearRect(0, 0, width, height);\n mask.draw();\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 ctx.draw && ctx.draw(true);\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\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 target.draw();\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 ctx.draw && ctx.draw(true);\n target.ctx.globalAlpha = 1;\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\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 get page() {\n return this.__page;\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 { NA, LOCAL, CHILD, SELF, 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 PADDING_LEFT,\n PADDING_RIGHT,\n PADDING_TOP,\n PADDING_BOTTOM,\n BORDER_TOP_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n MATRIX,\n },\n NODE_KEY: {\n NODE_CACHE,\n NODE_CACHE_TOTAL,\n NODE_CACHE_OVERFLOW,\n NODE_CACHE_MASK,\n NODE_CACHE_FILTER,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n NODE_OPACITY,\n NODE_COMPUTED_STYLE,\n NODE_CURRENT_STYLE,\n NODE_LIMIT_CACHE,\n NODE_REFRESH_LV,\n NODE_CACHE_STYLE,\n NODE_DEFS_CACHE,\n NODE_IS_MASK,\n NODE_DOM_PARENT,\n NODE_PERSPECTIVE_MATRIX,\n NODE_VIRTUAL_DOM,\n NODE_CACHE_AS_BITMAP,\n NODE_STRUCT,\n },\n STRUCT_KEY: {\n STRUCT_NODE,\n STRUCT_INDEX,\n STRUCT_TOTAL,\n STRUCT_HAS_MASK,\n STRUCT_LV,\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} = 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, __config } = node;\n let {\n [NODE_CACHE]: cache,\n [NODE_COMPUTED_STYLE]: {\n [FILTER]: filter,\n [PERSPECTIVE]: perspective,\n [PERSPECTIVE_ORIGIN]: perspectiveOrigin,\n },\n } = __config;\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][STRUCT_TOTAL] || 0;\n for(let i = parentIndex + 1, len = parentIndex + total + 1; i < len; i++) {\n let {\n [STRUCT_NODE]: node2,\n [STRUCT_TOTAL]: total,\n } = __structs[i];\n // mask也不占bbox位置\n if(node2.isMask) {\n continue;\n }\n let {\n __sx1,\n __sy1,\n __config: {\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n [OPACITY]: opacity,\n },\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 config\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, config, index, lv, total, __structs, hasMask, width, height) {\n let {\n [NODE_CACHE_TOTAL]: cacheTotal,\n [NODE_CACHE_FILTER]: cacheFilter,\n [NODE_CACHE_MASK]: cacheMask,\n [NODE_CACHE_OVERFLOW]: cacheOverflow,\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = config;\n let needGen;\n // 先绘制形成基础的total,有可能已经存在无变化,就可省略\n if(!cacheTotal || !cacheTotal.available) {\n needGen = true; // total重新生成了,其它基于的也一定需要重新生成\n let bboxTotal, baseMatrix;\n let { __sx1: sx1, __sy1: sy1 } = node;\n // 栈代替递归,存父节点的matrix/opacity,matrix为E时存null省略计算\n let matrixList = [];\n let parentMatrix;\n let opacityList = [];\n let parentOpacity = 1;\n let lastConfig;\n let lastLv = lv;\n // 先遍历每个节点,以局部根节点左上角为原点,求得所占的总的bbox,即合并所有bbox\n for(let i = index, len = index + (total || 0) + 1; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n // 排除Text\n if(node instanceof Text) {\n let bbox = node.bbox; // 文字节点不能算filter\n if(!isE(parentMatrix)) {\n bbox = transformBbox(bbox, parentMatrix, 0, 0);\n }\n mergeBbox(bboxTotal, bbox, 0, 0);\n continue;\n }\n let __config = node.__config;\n let {\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_IS_MASK]: isMask,\n } = __config;\n // 跳过display:none元素和它的所有子节点和mask\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n continue;\n }\n // mask不占bbox,本身除外\n if(i !== index && isMask) {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n continue;\n }\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,根节点是第一个特殊处理\n if(i === index) {}\n else if(lv > lastLv) {\n parentMatrix = lastConfig[NODE_MATRIX_EVENT];\n if(isE(parentMatrix)) {\n parentMatrix = null;\n }\n matrixList.push(parentMatrix);\n parentOpacity = lastConfig[NODE_OPACITY];\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 lastConfig = __config;\n lastLv = lv;\n let {\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_CACHE_STYLE]: __cacheStyle,\n } = __config;\n let matrix, opacity;\n /**\n * lv=REPAINT重新渲染,bbox重新生成,matrix重新生成,filter重新生成\n */\n else {\n node.__bbox = null;\n node.__filterBbox = null;\n if(i === index) {\n node.__calFilter(currentStyle, computedStyle);\n }\n matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n assignMatrix(__config[NODE_MATRIX], matrix);\n opacity = computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n // opacity可临时赋值下面循环渲染用,matrixEvent可能需重新计算,因为局部根节点为E没考虑继承,这里仅计算bbox用\n if(i === index) {\n opacity = 1;\n baseMatrix = matrix;\n matrix = mx.identity();\n }\n else if(!isE(parentMatrix)) {\n matrix = multiply(parentMatrix, matrix);\n }\n assignMatrix(__config[NODE_MATRIX_EVENT], matrix);\n __config[NODE_OPACITY] = parentOpacity * opacity;\n let bbox;\n // 子元素有cacheTotal优先使用,一定是子元素,局部根节点available为false不会进\n let target = i > index && getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal]);\n // 局部根节点的total不需要考虑filter,子节点要\n if(target) {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n bbox = target.bbox;\n }\n else {\n bbox = i === index ? node.bbox : node.filterBbox;\n }\n // 老的不变,新的会各自重新生成,根据matrixEvent合并bboxTotal\n bbox = transformBbox(bbox, matrix, 0, 0);\n if(i === index) {\n bboxTotal = bbox.slice(0);\n }\n else {\n mergeBbox(bboxTotal, bbox, 0, 0);\n }\n }\n // 生成cacheTotal,获取偏移dx/dy\n config[NODE_CACHE_TOTAL] = cacheTotal = Cache.getInstance(bboxTotal, sx1, sy1);\n if(!cacheTotal || !cacheTotal.enabled) {\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 * 每个子节点的opacity有父继承计算在上面循环已经做好了,直接获取\n * 但matrixEvent可能需要重算,因为原点不一定是根节点的原点,影响tfo\n * 另外每个节点的refreshLevel需要设置REPAINT\n * 这样cacheTotal取消时子节点需确保重新计算一次matrix/opacity/filter,保证下次和父元素继承正确\n */\n parentMatrix = null;\n let lastMatrix;\n 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 [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n // 排除Text\n if(node instanceof Text) {\n node.render(renderMode, REPAINT, ctxTotal, CHILD, dx, dy);\n if(offscreenHash.hasOwnProperty(i)) {\n ctxTotal = applyOffscreen(ctxTotal, offscreenHash[i], width, height);\n }\n }\n else {\n let __config = node.__config;\n let {\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = __config;\n if(maskStartHash.hasOwnProperty(i)) {\n let [idx, n, 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(--n) {\n let { [STRUCT_TOTAL]: total } = __structs[j];\n j += (total || 0) + 1;\n }\n j--;\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([idx, lv, OFFSCREEN_MASK, offscreenMask]);\n list.push([j, lv, OFFSCREEN_MASK2, {\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 let {\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n [DISPLAY]: display,\n } = computedStyle;\n // 特殊渲染的matrix,局部根节点为原点考虑,当需要计算时再计算\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 else {\n m = null;\n }\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 lastLv = lv;\n lastMatrix = m;\n // 子元素有cacheTotal优先使用,也一定是子元素,局部根节点不会进\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal]);\n if(i !== index && target) {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n // 跳过display:none元素和它的所有子节点\n if(display === 'none') {\n continue;\n }\n let mixBlendMode = computedStyle[MIX_BLEND_MODE];\n if(isValidMbm(mixBlendMode)) {\n ctxTotal.globalCompositeOperation = mbmName(mixBlendMode);\n }\n else {\n ctxTotal.globalCompositeOperation = 'source-over';\n }\n ctxTotal.globalAlpha = __config[NODE_OPACITY];\n Cache.drawCache(target, cacheTotal);\n ctxTotal.globalCompositeOperation = 'source-over';\n }\n else {\n if(refreshLevel >= REPAINT) {\n // 手动计算cacheStyle和根据border-box的坐标再渲染\n node.__calCache(renderMode, ctxTotal, __config[NODE_DOM_PARENT],\n __config[NODE_CACHE_STYLE], __config[NODE_CURRENT_STYLE], computedStyle,\n node.clientWidth, node.clientHeight, node.offsetWidth, node.offsetHeight,\n computedStyle[BORDER_TOP_WIDTH], computedStyle[BORDER_RIGHT_WIDTH],\n computedStyle[BORDER_BOTTOM_WIDTH], computedStyle[BORDER_LEFT_WIDTH],\n computedStyle[PADDING_TOP], computedStyle[PADDING_RIGHT],\n computedStyle[PADDING_BOTTOM], computedStyle[PADDING_LEFT],\n node.__sx1, node.__sx2, node.__sx3, node.__sx4, node.__sx5, node.__sx6,\n node.__sy1, node.__sy2, node.__sy3, node.__sy4, node.__sy5, node.__sy6);\n }\n let res = node.render(renderMode, refreshLevel, ctxTotal, i === index ? LOCAL : CHILD, dx, dy);\n let { offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow } = res || {};\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_BLEND, offscreenBlend]);\n ctxTotal = offscreenBlend.target.ctx;\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n // 最后一个遮罩索引因数量不好计算,放在maskStartHash做\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = [i, hasMask, offscreenMask];\n ctxTotal = offscreenMask.target.ctx;\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_FILTER, offscreenFilter]);\n ctxTotal = offscreenFilter.target.ctx;\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_OVERFLOW, offscreenOverflow]);\n ctxTotal = offscreenOverflow.target.ctx;\n }\n // 离屏应用,按照lv从大到小即子节点在前先应用,同一个节点多个效果按offscreen优先级从小到大来,\n // 由于mask特殊索引影响,所有离屏都在最后一个mask索引判断,此时mask本身优先结算,以index序大到小判断\n if(offscreenHash.hasOwnProperty(i)) {\n ctxTotal = applyOffscreen(ctxTotal, offscreenHash[i], width, height);\n }\n // render后判断可见状态,此时computedStyle才有值\n if(display === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n }\n }\n }\n }\n // 恢复,且局部根节点设置NONE\n assignMatrix(config[NODE_MATRIX_EVENT], baseMatrix);\n config[NODE_REFRESH_LV] = NONE;\n }\n // cacheTotal仍在说明 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 [DISPLAY]: display,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n } = computedStyle;\n // 特殊渲染的matrix,局部根节点为原点考虑,本节点需inverse反向\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal]);\n if(target) {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n // 跳过display:none元素和它的所有子节点\n if(display === 'none') {\n continue;\n }\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 ctx.globalAlpha = __config[NODE_OPACITY];\n Cache.drawCache(target, cacheMask, transform, mx.identity(), tfo.slice(0), parentMatrix, inverse);\n ctx.globalCompositeOperation = 'source-over';\n }\n // 等于将外面bbox计算和渲染合一的过程,但不需要bbox本身的内容\n else {\n let {\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_CACHE_STYLE]: __cacheStyle,\n } = __config;\n let matrix, opacity;\n if(refreshLevel < REPAINT) {\n if(contain(refreshLevel, TRANSFORM_ALL)) {\n matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n assignMatrix(__config[NODE_MATRIX], matrix);\n }\n else {\n matrix = __config[NODE_MATRIX];\n }\n if(contain(refreshLevel, OP)) {\n computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n opacity = computedStyle[OPACITY];\n if(contain(refreshLevel, FT)) {\n node.__bbox = null;\n node.__filterBbox = null;\n node.__calFilter(currentStyle, computedStyle);\n }\n matrix = __config[NODE_MATRIX];\n if(contain(refreshLevel, MBM)) {\n computedStyle[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE];\n }\n }\n else {\n node.__bbox = null;\n node.__filterBbox = null;\n if(i === index) {\n node.__calFilter(currentStyle, computedStyle);\n }\n matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n assignMatrix(__config[NODE_MATRIX], matrix);\n opacity = computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n // opacity可临时赋值下面循环渲染用,matrixEvent可能需重新计算,因为局部根节点为E没考虑继承,这里仅计算bbox用\n if(i === index) {\n opacity = 1;\n matrix = mx.identity();\n }\n else if(parentMatrix) {\n matrix = multiply(parentMatrix, matrix);\n }\n assignMatrix(__config[NODE_MATRIX_EVENT], matrix);\n lastOpacity = __config[NODE_OPACITY] = parentOpacity * opacity;\n // 特殊渲染的matrix,局部根节点为原点考虑,当需要计算时再计算\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 else {\n m = null;\n }\n lastMatrix = m;\n if(m) {\n // 很多情况mask和target相同matrix,可简化计算\n if(util.equalArr(m, inverse)) {\n m = mx.identity();\n }\n else {\n inverse = mx.inverse(inverse);\n m = mx.multiply(inverse, m);\n }\n }\n if(m) {\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n }\n else {\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n }\n if(refreshLevel >= REPAINT) {\n // 手动计算cacheStyle和根据border-box的坐标再渲染\n node.__calCache(renderMode, ctx, __config[NODE_DOM_PARENT],\n __config[NODE_CACHE_STYLE], __config[NODE_CURRENT_STYLE], computedStyle,\n node.clientWidth, node.clientHeight, node.offsetWidth, node.offsetHeight,\n computedStyle[BORDER_TOP_WIDTH], computedStyle[BORDER_RIGHT_WIDTH],\n computedStyle[BORDER_BOTTOM_WIDTH], computedStyle[BORDER_LEFT_WIDTH],\n computedStyle[PADDING_TOP], computedStyle[PADDING_RIGHT],\n computedStyle[PADDING_BOTTOM], computedStyle[PADDING_LEFT],\n node.__sx1, node.__sx2, node.__sx3, node.__sx4, node.__sx5, node.__sx6,\n node.__sy1, node.__sy2, node.__sy3, node.__sy4, node.__sy5, node.__sy6);\n }\n let res = node.render(renderMode, refreshLevel, ctx, CHILD, dx, dy);\n let { offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow } = res || {};\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_BLEND, offscreenBlend]);\n ctx = offscreenBlend.target.ctx;\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n // 最后一个遮罩索引因数量不好计算,放在maskStartHash做\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = [i, hasMask, offscreenMask];\n ctx = offscreenMask.target.ctx;\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_FILTER, offscreenFilter]);\n ctx = offscreenFilter.target.ctx;\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_OVERFLOW, offscreenOverflow]);\n ctx = offscreenOverflow.target.ctx;\n }\n // 离屏应用,按照lv从大到小即子节点在前先应用,同一个节点多个效果按offscreen优先级从小到大来,\n // 由于mask特殊索引影响,所有离屏都在最后一个mask索引判断,此时mask本身优先结算,以index序大到小判断\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n // render后判断可见状态,此时computedStyle才有值\n if(display === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n }\n }\n }\n }\n });\n }\n }\n}\n\nfunction resetMatrixCacheTotal(__structs, index, total, lv, matrixEvent) {\n let matrixList = [];\n let parentMatrix;\n let lastMatrix = matrixEvent;\n let lastLv = lv;\n for(let i = index + 1, len = index + (total || 0) + 1; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n // 排除Text\n if(node instanceof Text) {\n continue;\n }\n let __config = node.__config;\n let {\n [NODE_MATRIX_EVENT]: old,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_CACHE_STYLE]: cacheStyle,\n } = __config;\n // 跳过display:none元素和它的所有子节点和mask\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n continue;\n }\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树\n 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 old = old.slice(0);\n // 计算真正的相对于root原点的matrix\n cacheStyle[MATRIX] = null;\n let matrix = node.__calMatrix(REPAINT, cacheStyle, currentStyle, computedStyle, __config);\n assignMatrix(__config[NODE_MATRIX], matrix);\n if(!isE(parentMatrix)) {\n matrix = multiply(parentMatrix, matrix);\n }\n assignMatrix(__config[NODE_MATRIX_EVENT], matrix);\n lastMatrix = matrix;\n // 深度遍历递归进行\n if(__cacheTotal && __cacheTotal.available) {\n let needReset = __cacheTotal.isNew;\n if(!needReset && !util.equalArr(old, matrix)) {\n needReset = true;\n }\n if(needReset) {\n resetMatrixCacheTotal(__structs, i, total || 0, lv, matrix);\n }\n __cacheTotal.__isNew = false;\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n }\n }\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 {\n [STRUCT_TOTAL]: total,\n } = __structs[start];\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 gl\n * @param texCache\n * @param node\n * @param __config\n * @param index\n * @param total\n * @param __structs\n * @param cache\n * @param limitCache\n * @param hasMbm\n * @param W\n * @param H\n * @returns {*}\n */\nfunction genTotalWebgl(gl, texCache, node, __config, index, total, __structs, cache, limitCache, hasMbm, 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.WEBGL, 0, gl, NA, 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 [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let __config = node.__config;\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, __config[NODE_CACHE], opacity, matrix, cx, cy, dx, dy, false);\n }\n // 再看total缓存/cache,都没有的是无内容的Xom节点\n else {\n let {\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_IS_MASK]: isMask,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n [MIX_BLEND_MODE]: mixBlendMode,\n },\n } = __config;\n if(display === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n continue;\n }\n // mask和不可见不能被汇总到top上\n if((visibility === 'hidden' || isMask) && !node.hookGlRender) {\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) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n }\n }\n // webgl特殊的外部钩子,比如粒子组件自定义渲染时调用\n if(node.hookGlRender) {\n node.hookGlRender(gl, opacity, matrix, cx, cy, dx, dy, false);\n }\n }\n }\n if(node.hookGlRender) {\n node.hookGlRender(gl, 1, null, cx, cy, dx, dy, false);\n }\n // 绘制到fbo的纹理对象上并删除fbo恢复\n texCache.refresh(gl, cx, cy);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.viewport(0, 0, W, H);\n gl.deleteFramebuffer(frameBuffer);\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, __config, 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 [NODE_COMPUTED_STYLE]: {\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n },\n } = __config;\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 {\n [STRUCT_INDEX]: index,\n [STRUCT_TOTAL]: total,\n } = item.__config[NODE_STRUCT];\n // 可以忽略mbm,因为只有透明遮罩\n for(let i = index, len = index + (total || 0) + 1; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let __config = node.__config;\n let {\n [NODE_CACHE]: __cache,\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_LIMIT_CACHE]: limitCache,\n } = __config;\n // 跳过display:none元素和它的所有子节点和mask\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\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 [NODE_CACHE]: __cache,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_COMPUTED_STYLE]: {\n [OPACITY]: opacity,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n },\n } = __config;\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) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\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.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 [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let {\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_DEFS_CACHE]: defsCache,\n } = node.__config;\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 defsCache.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 lastConfig;\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n [STRUCT_LV]: lv,\n } = __structs[i];\n let __config = node.__config;\n let {\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_DEFS_CACHE]: defsCache,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = __config;\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][STRUCT_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(lastConfig[NODE_MATRIX]);\n let vd = lastConfig[NODE_VIRTUAL_DOM];\n vdList.push(vd);\n parentVd = vd;\n }\n lastConfig = __config;\n let virtualDom;\n // svg小刷新等级时直接修改vd,这样Geom不再感知\n if(refreshLevel < REPAINT && !(node instanceof Text)) {\n __config[NODE_REFRESH_LV] = NONE;\n virtualDom = __config[NODE_VIRTUAL_DOM];\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 = __config[NODE_VIRTUAL_DOM] = 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 {\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_CACHE_STYLE]: __cacheStyle,\n } = __config;\n if(contain(refreshLevel, TRANSFORM_ALL)) {\n let matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n // 恶心的v8性能优化\n let m = __config[NODE_MATRIX];\n assignMatrix(m, 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 // 恶心的v8性能优化\n m = __config[NODE_MATRIX_EVENT];\n assignMatrix(m, matrix);\n }\n if(contain(refreshLevel, OP)) {\n let opacity = computedStyle[OPACITY] = currentStyle[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 = node.__calFilter(currentStyle, computedStyle);\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] = currentStyle[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 __config[NODE_DEFS_CACHE] && __config[NODE_DEFS_CACHE].splice(0);\n node.render(renderMode, refreshLevel, ctx, NA, 0, 0);\n virtualDom = __config[NODE_VIRTUAL_DOM];\n // 渲染后更新取值\n display = computedStyle[DISPLAY];\n if(display === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += hasMask;\n }\n }\n }\n /**\n * mask会在join时过滤掉,这里将假设正常渲染的vd的内容获取出来组成defs的mask内容\n * 另外最初遍历时记录了会影响的mask,在=REPAINT始终重新设置\n * 本身有matrix也需要重设\n */\n if(maskHash.hasOwnProperty(i) && (maskEffectHash.hasOwnProperty(i) || refreshLevel >= REPAINT || contain(refreshLevel, TRANSFORM_ALL | OP))) {\n let { index, start, end, isClip } = maskHash[i];\n let target = __structs[index];\n let dom = target[STRUCT_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][STRUCT_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 = defsCache.length - 1; i >= 0; i--) {\n let item = defsCache[i];\n if(item.tagName === 'mask') {\n defsCache.splice(i, 1);\n }\n }\n let o = {\n tagName: 'mask',\n props: [],\n children: mChildren,\n };\n let id = ctx.add(o);\n defsCache.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 = __config[NODE_MATRIX];\n parentVd = virtualDom;\n }\n lastLv = lv;\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 matrixList = [];\n let parentMatrix;\n let opacityList = [];\n let parentOpacity = 1;\n let pmList = [];\n let parentPm;\n let lastRefreshLevel;\n let lastConfig;\n let lastLv = 0;\n let mergeList = [];\n let hasMbm; // 是否有混合模式出现\n /**\n * 先一遍先序遍历每个节点绘制到自己__cache上,排除Text和已有的缓存以及局部根缓存,\n * 根据refreshLevel进行等级区分,可能是=REPAINT,REFLOW布局已前置处理完。\n * 首次绘制没有catchTotal等,后续则可能会有,在= REPAINT) {\n node.render(renderMode, REPAINT, gl, SELF, 0, 0);\n }\n continue;\n }\n let __config = node.__config;\n let refreshLevel = __config[NODE_REFRESH_LV];\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,Root节点是第一个特殊处理\n if(i === 0) {}\n else if(lv > lastLv) {\n parentMatrix = lastConfig[NODE_MATRIX_EVENT];\n if(isE(parentMatrix)) {\n parentMatrix = null;\n }\n matrixList.push(parentMatrix);\n parentOpacity = lastConfig[NODE_OPACITY];\n opacityList.push(parentOpacity);\n parentPm = lastConfig[NODE_PERSPECTIVE_MATRIX];\n if(isE(parentPm)) {\n parentPm = null;\n }\n pmList.push(parentPm);\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 pmList.splice(-diff);\n parentPm = pmList[lv - 1];\n }\n // 不变是同级兄弟,无需特殊处理 else {}\n lastRefreshLevel = refreshLevel;\n lastConfig = __config;\n lastLv = lv;\n let {\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = __config;\n // 跳过display:none元素和它的所有子节点\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n // 只跳过自身不能跳过后面的mask,mask要渲染自身并进行缓存cache,以备对象切换display用\n continue;\n }\n let hasRecordAsMask;\n /**\n * lv=REPAINT那里,小变化不动\n * 当有遮罩时,如果被遮罩节点本身无变更,需要检查其next的遮罩节点有无变更,\n * 但其实不用检查,因为next变更一定会清空cacheMask,只要检查cacheMask即可\n * 如果没有或无效,直接添加,无视节点本身变化,后面防重即可\n */\n if(refreshLevel < REPAINT) {\n __config[NODE_REFRESH_LV] = NONE;\n let {\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_CACHE_STYLE]: __cacheStyle,\n [NODE_MATRIX_EVENT]: matrixEvent,\n } = __config;\n if(contain(refreshLevel, PPT)) {\n node.__calPerspective(__cacheStyle, currentStyle, computedStyle, __config);\n }\n // transform变化,父元素的perspective变化也会在Root特殊处理重新计算\n let matrix;\n if(contain(refreshLevel, TRANSFORM_ALL)) {\n matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n assignMatrix(__config[NODE_MATRIX], matrix);\n }\n else {\n matrix = __config[NODE_MATRIX];\n }\n // 先左乘perspective的矩阵,再左乘父级的总矩阵\n if(parentPm) {\n matrix = multiply(parentPm, matrix);\n }\n if(parentMatrix) {\n matrix = multiply(parentMatrix, matrix);\n }\n // 恶心的v8性能优化\n assignMatrix(matrixEvent, matrix);\n let opacity;\n if(contain(refreshLevel, OP)) {\n opacity = computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n else {\n opacity = computedStyle[OPACITY];\n }\n __config[NODE_OPACITY] = parentOpacity * opacity;\n // filter会改变bbox范围\n if(contain(refreshLevel, FT)) {\n node.__bbox = null;\n node.__filterBbox = null;\n node.__calFilter(currentStyle, computedStyle);\n }\n if(contain(refreshLevel, MBM)) {\n computedStyle[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE];\n }\n // total可以跳过所有孩子节点省略循环,filter/mask等的强制前提是有total\n if(__cacheTotal && __cacheTotal.available) {\n i += (total || 0);\n }\n }\n /**\n * >=REPAINT重新渲染,并根据结果判断是否离屏限制错误\n * Geom没有子节点无需汇总局部根,Dom中Img也是,它们的局部根等于自身的cache,其它符合条件的Dom需要生成\n */\n else {\n let res = node.render(renderMode, refreshLevel, gl, SELF, 0, 0);\n // geom可返回texture纹理,替代原有xom的__cache纹理\n if(res && inject.isWebGLTexture(res.texture)) {\n let { __sx1: sx1, __sy1: sy1, offsetWidth: w, offsetHeight: h, bbox } = node;\n __config[NODE_CACHE] = new MockCache(gl, res.texture, sx1, sy1, w, h, bbox);\n gl.viewport(0, 0, width, height);\n gl.useProgram(gl.program);\n }\n }\n // 每个元素检查cacheTotal生成,已有的上面会continue跳过\n let {\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_CACHE_AS_BITMAP]: cacheAsBitmap,\n } = __config;\n let {\n [OVERFLOW]: overflow,\n [FILTER]: filter,\n [MIX_BLEND_MODE]: mixBlendMode,\n [TRANSFORM]: transform,\n } = computedStyle;\n let validMbm = isValidMbm(mixBlendMode);\n // 3d渲染上下文\n let isPerspective = tf.isPerspectiveMatrix(transform) || parentPm;\n if(cacheAsBitmap || hasMask || filter.length || (overflow === 'hidden' && total) || validMbm || isPerspective) {\n if(validMbm) {\n hasMbm = true;\n }\n if(hasRecordAsMask) {\n hasRecordAsMask[5] = limitCache;\n hasRecordAsMask[7] = filter;\n hasRecordAsMask[8] = overflow;\n hasRecordAsMask[9] = isPerspective;\n hasRecordAsMask[10] = cacheAsBitmap;\n }\n else {\n mergeList.push([i, lv, total, node, __config, limitCache, hasMask, filter, overflow, isPerspective, cacheAsBitmap]);\n }\n }\n }\n let limitHash = {};\n // 根据收集的需要合并局部根的索引,尝试合并,按照层级从大到小,索引从大到小的顺序,\n // 这样保证子节点在前,后节点在前,后节点是为了mask先应用自身如filter之后再进行遮罩\n if(mergeList.length) {\n mergeList.sort(function(a, b) {\n if(a[1] === b[1]) {\n return b[0] - a[0];\n }\n return b[1] - a[1];\n });\n // ppt只有嵌套才需要生成,最下面的孩子节点的ppt无需,因此记录一个hash存index,\n // 同时因为是后序遍历,孩子先存所有父亲的index即可保证父亲才能生成cacheTotal\n let pptHash = {};\n mergeList.forEach(item => {\n let [i, lv, total, node, __config, limitCache, hasMask, filter, overflow, isPerspective, cacheAsBitmap] = item;\n // 有ppt的,向上查找所有父亲index记录,可能出现重复记得提前跳出\n if(isPerspective) {\n let parent = __config[NODE_DOM_PARENT];\n while(parent) {\n let config = parent.__config;\n let idx = config[NODE_STRUCT][STRUCT_INDEX];\n if(pptHash[idx]) {\n break;\n }\n if(tf.isPerspectiveMatrix(config[NODE_MATRIX]) || config[NODE_PERSPECTIVE_MATRIX]) {\n pptHash[idx] = true;\n }\n parent = config[NODE_DOM_PARENT];\n }\n if(!pptHash[i] && !hasMask && !filter.length && overflow !== 'hidden' && !cacheAsBitmap) {\n return;\n }\n }\n let {\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n } = __config;\n let needGen;\n // 可能没变化,比如被遮罩节点、filter变更等\n if(!__cacheTotal || !__cacheTotal.available) {\n let [limit, res] = genTotalWebgl(gl, texCache, node, __config, i, total || 0, __structs, __cache, limitCache, hasMbm, width, height);\n __cacheTotal = res;\n needGen = true;\n limitCache = limit;\n // 返回的limit包含各种情况超限,一旦超限,只能生成临时cacheTotal不能保存\n if(!limitCache) {\n __config[NODE_CACHE_TOTAL] = 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 __config[NODE_CACHE_OVERFLOW] = target;\n }\n }\n }\n else {\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 __config[NODE_CACHE_FILTER] = target;\n }\n }\n }\n else {\n target = __cacheFilter;\n }\n }\n if(hasMask && (!__cacheMask || !__cacheMask.available || needGen)) {\n target = genMaskWebgl(gl, texCache, node, __config, target, width, height, lv, __structs);\n if(!limitCache) {\n __config[NODE_CACHE_MASK] = 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 [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let __config = node.__config;\n // text如果display不可见,parent会直接跳过,不会走到这里,这里一定是直接绘制到root的,visibility在其内部判断\n if(node instanceof Text) {\n // text特殊之处,__config部分是复用parent的\n let {\n [NODE_CACHE]: __cache,\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_DOM_PARENT]: {\n __config: {\n [NODE_MATRIX_EVENT]: matrixEvent,\n [NODE_OPACITY]: opacity,\n },\n },\n } = __config;\n if(__cache && __cache.available) {\n texCache.addTexAndDrawWhenLimit(gl, __cache, opacity, matrixEvent, cx, cy, 0, 0,true);\n }\n // 超限特殊处理,先生成画布尺寸大小的纹理然后原始位置绘制\n else if(limitCache) {\n let c = inject.getCacheCanvas(width, height, '__$$OVERSIZE$$__');\n node.render(renderMode, 0, gl, NA, 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, 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 {\n [NODE_OPACITY]: opacity,\n [NODE_MATRIX_EVENT]: matrixEvent,\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [MIX_BLEND_MODE]: mixBlendMode,\n },\n } = __config;\n if(display === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n continue;\n }\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, matrixEvent, 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, matrixEvent, cx, cy, 0, 0, true);\n }\n if(target !== __cache) {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\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, matrixEvent, 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, matrixEvent, cx, cy, 0, 0, true);\n }\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n }\n // 超限的情况,这里是普通单节点超限,没有合成total后再合成特殊cache如filter/mask/mbm之类的,\n // 直接按原始位置绘制到离屏canvas,再作为纹理绘制即可,特殊的在total那做过降级了\n else if(limitCache && display !== 'none' && visibility !== 'hidden') {\n let c = inject.getCacheCanvas(width, height, '__$$OVERSIZE$$__');\n node.render(renderMode, refreshLevel, gl, NA, 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, 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 // webgl特殊的外部钩子,比如粒子组件自定义渲染时调用\n if(node.hookGlRender) {\n node.hookGlRender(gl, opacity, matrixEvent, cx, cy, 0, 0, true);\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 [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n // 排除Text,要么根节点直接绘制,要么被局部根节点汇总,自身并不缓存(fillText比位图更快)\n if(node instanceof Text) {\n continue;\n }\n let __config = node.__config;\n let {\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_CACHE_AS_BITMAP]: cacheAsBitmap,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = __config;\n if(refreshLevel >= REPAINT) {\n node.__calCache(renderMode, ctx, __config[NODE_DOM_PARENT],\n __config[NODE_CACHE_STYLE], __config[NODE_CURRENT_STYLE], computedStyle,\n node.clientWidth, node.clientHeight, node.offsetWidth, node.offsetHeight,\n computedStyle[BORDER_TOP_WIDTH], computedStyle[BORDER_RIGHT_WIDTH],\n computedStyle[BORDER_BOTTOM_WIDTH], computedStyle[BORDER_LEFT_WIDTH],\n computedStyle[PADDING_TOP], computedStyle[PADDING_RIGHT],\n computedStyle[PADDING_BOTTOM], computedStyle[PADDING_LEFT],\n node.__sx1, node.__sx2, node.__sx3, node.__sx4, node.__sx5, node.__sx6,\n node.__sy1, node.__sy2, node.__sy3, node.__sy4, node.__sy5, node.__sy6);\n }\n if(cacheAsBitmap) {\n // 跳过display:none元素和它的所有子节点\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n continue;\n }\n mergeList.push([i, lv, total, node, __config, hasMask]);\n }\n }\n /**\n * 根据收集的需要合并局部根的索引,尝试合并,按照层级从大到小,索引从大到小的顺序,\n * 这样保证子节点在前,后节点在前(mask在后面),渲染顺序正确\n */\n if(mergeList.length) {\n mergeList.sort(function(a, b) {\n if(a[1] === b[1]) {\n return b[0] - a[0];\n }\n return b[1] - a[1];\n });\n mergeList.forEach(item => {\n let [i, lv, total, node, __config, hasMask] = item;\n genTotal(renderMode, node, __config, i, lv, total || 0, __structs, hasMask, width, height);\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 [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n // text如果display不可见,parent会直接跳过,不会走到这里,这里一定是直接绘制到root的,visibility在其内部判断\n if(node instanceof Text) {\n node.render(renderMode, REPAINT, ctx, NA, 0, 0);\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n }\n else {\n let __config = node.__config;\n let {\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [MIX_BLEND_MODE]: mixBlendMode,\n [OPACITY]: opacity,\n },\n } = __config;\n // 遮罩对象申请了个离屏,其第一个mask申请另外一个离屏mask2,开始聚集所有mask元素的绘制,\n // 这是一个十分特殊的逻辑,保存的index是最后一个节点的索引,OFFSCREEN_MASK2是最低优先级,\n // 这样当mask本身有filter时优先自身,然后才是OFFSCREEN_MASK2\n if(maskStartHash.hasOwnProperty(i)) {\n let [idx, n, 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(--n) {\n let { [STRUCT_TOTAL]: total } = __structs[j];\n j += (total || 0) + 1;\n }\n j--;\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([idx, lv, OFFSCREEN_MASK, offscreenMask]);\n list.push([j, lv, OFFSCREEN_MASK2, {\n ctx, // 保存等待OFFSCREEN_MASK2时还原\n target,\n }]);\n ctx = target.ctx;\n }\n // 有cache声明从而有total的可以直接绘制并跳过子节点索,total生成可能会因超限而失败\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal]);\n if(target) {\n let j = i;\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n // total的none直接跳过\n if(display === 'none') {\n continue;\n }\n if(isValidMbm(mixBlendMode)) {\n ctx.globalCompositeOperation = mbmName(mixBlendMode);\n }\n else {\n ctx.globalCompositeOperation = 'source-over';\n }\n // cache需要计算matrixEvent,因为局部根节点临时视为E,根据refreshLevel决定\n let matrix = __config[NODE_MATRIX], matrixEvent = __config[NODE_MATRIX_EVENT];\n let old = matrixEvent.slice(0);\n let parentMatrix = __config[NODE_DOM_PARENT].matrixEvent;\n if(parentMatrix && !isE(parentMatrix)) {\n matrix = multiply(parentMatrix, matrix);\n }\n util.assignMatrix(matrixEvent, matrix);\n Cache.draw(ctx, opacity, matrixEvent, target);\n // total应用后记得设置回来\n ctx.globalCompositeOperation = 'source-over';\n // 父超限但子有total的时候,i此时已经增加到了末尾,也需要检查\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n // 有cache的可以跳过子节点,但如果matrixEvent变化还是需要遍历计算一下的,虽然跳过了渲染\n // 如果cache是新的,则需要完整遍历设置一次\n // 如果isNew为false,则计算下局部根节点再对比下看是否有变化,无变化可省略\n let needReset = __cacheTotal.isNew;\n if(!needReset && !util.equalArr(old, matrixEvent)) {\n needReset = true;\n }\n if(needReset) {\n resetMatrixCacheTotal(__structs, j, total || 0, lv, matrixEvent);\n }\n __cacheTotal.__isNew = false;\n }\n // 没有cacheTotal是普通节点绘制\n else {\n let res = node.render(renderMode, refreshLevel, ctx, NA, 0, 0);\n let { offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow } = res || {};\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_BLEND, offscreenBlend]);\n ctx = offscreenBlend.target.ctx;\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n // 最后一个遮罩索引因数量不好计算,放在maskStartHash做\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = [i, hasMask, offscreenMask];\n ctx = offscreenMask.target.ctx;\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_FILTER, offscreenFilter]);\n ctx = offscreenFilter.target.ctx;\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_OVERFLOW, offscreenOverflow]);\n ctx = offscreenOverflow.target.ctx;\n }\n // 离屏应用,按照lv从大到小即子节点在前先应用,同一个节点多个效果按offscreen优先级从小到大来,\n // 由于mask特殊索引影响,所有离屏都在最后一个mask索引判断,此时mask本身优先结算,以index序大到小判断\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n // render后判断可见状态,此时computedStyle才有值,none可以忽略渲染,但是可能会跳过offscreenHash预置的索引\n if(display === 'none') {\n let add = (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n for(let j = i + 1; j <= i + add; j++) {\n if(offscreenHash.hasOwnProperty(j)) {\n ctx = applyOffscreen(ctx, offscreenHash[j], width, height);\n }\n }\n i += add;\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 Xom from './Xom';\nimport Component from './Component';\nimport Defs from './Defs';\nimport Geom from './geom/Geom';\nimport builder from '../util/builder';\nimport updater from '../util/updater';\nimport util from '../util/util';\nimport domDiff from '../util/diff';\nimport css from '../style/css';\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 MARGIN_TOP,\n MARGIN_LEFT,\n MARGIN_BOTTOM,\n PADDING_TOP,\n PADDING_LEFT,\n PADDING_BOTTOM,\n BORDER_TOP_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n POINTER_EVENTS,\n WRITING_MODE,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_STYLE,\n UPDATE_KEYS,\n UPDATE_COMPONENT,\n UPDATE_FOCUS,\n UPDATE_OVERWRITE,\n UPDATE_LIST,\n UPDATE_CONFIG,\n UPDATE_ADD_DOM,\n UPDATE_REMOVE_DOM,\n },\n NODE_KEY: {\n NODE_TAG_NAME,\n NODE_CACHE_STYLE,\n NODE_CACHE_PROPS,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_CURRENT_PROPS,\n NODE_DOM_PARENT,\n NODE_IS_MASK,\n NODE_REFRESH_LV,\n NODE_IS_DESTROYED,\n NODE_STYLE,\n NODE_UPDATE_HASH,\n NODE_UNIQUE_UPDATE_ID,\n NODE_CACHE,\n NODE_CACHE_TOTAL,\n NODE_CACHE_FILTER,\n NODE_CACHE_OVERFLOW,\n NODE_CACHE_MASK,\n NODE_STRUCT,\n },\n STRUCT_KEY: {\n STRUCT_INDEX,\n STRUCT_TOTAL,\n STRUCT_NODE,\n }\n} = enums;\nconst DIRECTION_HASH = {\n [TOP]: true,\n [RIGHT]: true,\n [BOTTOM]: true,\n [LEFT]: true,\n};\nconst { isNil, isObject, isFunction } = util;\nconst { AUTO, PX, PERCENT, INHERIT } = unit;\nconst { isRelativeOrAbsolute, equalStyle } = css;\nconst { contain, getLevel, isRepaint, NONE, FILTER, PERSPECTIVE, REPAINT, REFLOW, REBUILD } = level;\nconst { isIgnore, 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, 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\n// 提取出对比节点尺寸是否固定非AUTO\nfunction isFixedWidthOrHeight(node, k) {\n let c = node.currentStyle[k];\n return c[1] !== AUTO;\n}\n// 除了固定尺寸,父级也不能是flex或变化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.currentStyle[DISPLAY] === 'flex' || parent.computedStyle[DISPLAY] === 'flex') {\n return false;\n }\n }\n }\n return res;\n}\n\nfunction isLAYOUT(node) {\n return node.hasOwnProperty('__uniqueReflowId');\n}\n\nlet __uniqueReflowId = 0;\nfunction setLAYOUT(node, hash, component, addDom) {\n if(!node.hasOwnProperty('__uniqueReflowId')) {\n node.__uniqueReflowId = __uniqueReflowId;\n hash[__uniqueReflowId++] = {\n node,\n component,\n addDom,\n };\n }\n}\n\n/**\n * 单独提出共用检测影响的函数,从节点本身开始向上分析影响,找到最上层的影响节点设置其重新布局\n * 过程即__checkReflow中所提及的,各种情况\n * 将影响升至最近的父级节点,并添加布局标识,这样后面的深度遍历会以父级为准忽略本身\n * 如果最终是root,则返回true标识,直接整个重新开始布局\n * ====\n * addDom情况下的特殊影响检测,类似checkInfluence\n * 添加的是absolute则只影响自己,大部分交互游戏情况属于此类型优化\n * 添加的是inline/inlineBlock的话,影响最近非inline父节点\n * 父为flex则直接影响父节点,不管添加情况如何\n * 添加block/flex的话,上下都block/flex则只影响自己,否则还是影响父节点\n * 如果最终是root,则返回true标识,直接整个重新开始布局\n * @returns {boolean}\n */\nfunction checkInfluence(root, reflowHash, node, component, addDom) {\n // add情况abs节点特殊对待不影响其它节点,不能判断display,因为inline会强制block\n if(addDom && node.currentStyle[POSITION] === 'absolute') {\n return;\n }\n let target = node;\n // inline新老都影响,节点变为最近的父非inline\n if(['inline', 'inlineBlock'].indexOf(target.currentStyle[DISPLAY]) > -1\n || ['inline', 'inlineBlock'].indexOf(target.computedStyle[DISPLAY]) > -1) {\n do {\n target = target.domParent;\n // 父到root提前跳出\n if(target === root) {\n return true;\n }\n // 父已有LAYOUT跳出防重\n if(isLAYOUT(target)) {\n return;\n }\n // 遇到absolute跳出,设置其布局;如果absolute不变化普通处理,如果absolute发生变化,一定会存在于列表中,不用考虑\n if(target.currentStyle[POSITION] === 'absolute' || target.computedStyle[POSITION] === 'absolute') {\n setLAYOUT(target, reflowHash, component, addDom);\n return;\n }\n }\n while(target && (['inline', 'inlineBlock'].indexOf(target.currentStyle[DISPLAY]) > -1\n || ['inline', 'inlineBlock'].indexOf(target.computedStyle[DISPLAY]) > -1));\n // target已不是inline,父固定宽高跳出直接父进行LAYOUT即可,不影响上下文,但不能是flex孩子,此时固定尺寸无用\n if(isFixedSize(target, true)) {\n setLAYOUT(target, reflowHash, component, addDom);\n return;\n }\n }\n // 此时target指向node,如果原本是inline则是其flow的非inline父\n let parent = target.domParent;\n // parent有LAYOUT跳出,已被包含\n if(isLAYOUT(parent)) {\n return;\n }\n // 向上检查flex,如果父级中有flex,以最上层的flex视作其更改,node本身flex不进入\n let topFlex;\n do {\n // 父已有LAYOUT跳出防重\n if(isLAYOUT(parent)) {\n return;\n }\n // flex相关,包含变化或不变化\n if(parent.computedStyle[DISPLAY] === 'flex' || parent.currentStyle[DISPLAY] === 'flex') {\n topFlex = parent;\n }\n // 遇到absolute跳出,如果absolute不变化普通处理,如果absolute发生变化,一定会存在于列表中,不用考虑\n if(parent.currentStyle[POSITION] === 'absolute' || parent.computedStyle[POSITION] === 'absolute') {\n break;\n }\n // 父固定宽高跳出\n if(isFixedSize(parent, true)) {\n break;\n }\n parent = parent.domParent;\n }\n while(parent);\n // 找到最上层flex,视作其更改\n if(topFlex) {\n target = topFlex;\n }\n if(target === root) {\n return true;\n }\n parent = target;\n // 向上检查非固定尺寸的absolute,找到则视为其变更,上面过程中一定没有出现absolute\n while(parent) {\n // 无论新老absolute,不变化则设置,变化一定会出现在列表中\n if(parent.currentStyle[POSITION] === 'absolute' || parent.computedStyle[POSITION] === 'absolute') {\n if(parent === root) {\n break;\n }\n // 固定尺寸的不用设置,需要跳出循环\n if(isFixedSize(parent)) {\n break;\n }\n else {\n setLAYOUT(parent, reflowHash, component, addDom);\n return;\n }\n }\n parent = parent.domParent;\n }\n // 向上查找了并且没提前跳出的target如果不等于自身则重新布局,自身外面设置过了\n if(target !== node) {\n setLAYOUT(target, reflowHash, component, addDom);\n }\n else if(addDom) {\n // 前后必须都是block,否则还是视为父布局\n let isSiblingBlock = true;\n let { prev, next } = node;\n if(prev && ['inline', 'inlineBlock'].indexOf(prev.currentStyle[DISPLAY]) > -1) {\n isSiblingBlock = false;\n }\n else if(next && ['inline', 'inlineBlock'].indexOf(next.currentStyle[DISPLAY]) > -1) {\n isSiblingBlock = false;\n }\n if(!isSiblingBlock) {\n target = node.domParent;\n if(target === root) {\n return true;\n }\n setLAYOUT(target, reflowHash, false, true);\n }\n }\n}\n\nlet uniqueUpdateId = 0;\nfunction parseUpdate(renderMode, root, target, reflowList, cacheHash, cacheList, zHash, zList) {\n let {\n [UPDATE_NODE]: node,\n [UPDATE_STYLE]: style,\n [UPDATE_OVERWRITE]: overwrite,\n [UPDATE_FOCUS]: focus,\n [UPDATE_COMPONENT]: component,\n [UPDATE_LIST]: list,\n [UPDATE_KEYS]: keys,\n [UPDATE_CONFIG]: __config,\n [UPDATE_ADD_DOM]: addDom,\n [UPDATE_REMOVE_DOM]: removeDom,\n } = target;\n if(__config[NODE_IS_DESTROYED]) {\n return;\n }\n // updateStyle()这样的调用需要覆盖原有样式,因为是按顺序遍历,后面的优先级自动更高不怕重复\n if(overwrite) {\n Object.assign(__config[NODE_STYLE], overwrite);\n }\n // 多次调用更新才会有list,一般没有,优化;component无需,因为多次都是它自己\n if(list && !component) {\n keys = (keys || []).slice(0); // 防止原始值被更改\n let hash = {};\n keys.forEach(k => {\n hash[k] = true;\n });\n list.forEach(item => {\n let { [UPDATE_STYLE]: style2, [UPDATE_OVERWRITE]: overwrite, [UPDATE_KEYS]: keys2 } = item;\n (keys2 || []).forEach(k2 => {\n if(!hash.hasOwnProperty(k2)) {\n hash[k2] = true;\n keys.push(k2);\n }\n });\n if(overwrite) {\n Object.assign(__config[NODE_STYLE], overwrite);\n }\n if(style2) {\n if(style) {\n Object.assign(style, style2);\n }\n else {\n style = style2;\n }\n }\n });\n }\n // 按节点合并完style后判断改变等级\n let {\n [NODE_TAG_NAME]: tagName,\n [NODE_CACHE_STYLE]: __cacheStyle,\n [NODE_CACHE_PROPS]: __cacheProps,\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_CURRENT_PROPS]: currentProps,\n [NODE_DOM_PARENT]: domParent,\n [NODE_IS_MASK]: isMask,\n } = __config;\n let lv = focus || NONE;\n let hasZ, hasVisibility, hasColor, hasDisplay, hasTsColor, hasTsWidth, hasTsOver;\n // component无需遍历直接赋值,img重新加载等情况没有样式更新\n if(!component && style && keys) {\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n let v = style[k];\n // 只有geom的props和style2种可能\n if(node instanceof Geom && isGeom(tagName, k)) {\n if(!equalStyle(k, v, currentProps[k], node)) {\n lv |= REPAINT;\n __cacheProps[k] = undefined;\n currentProps[k] = v;\n }\n }\n else {\n // 需和现在不等,且不是pointerEvents这种无关的\n if(!equalStyle(k, v, currentStyle[k], node)) {\n // pointerEvents这种无关的只需更新\n if(isIgnore(k)) {\n __cacheStyle[k] = undefined;\n currentStyle[k] = v;\n }\n else {\n // TRBL变化只对relative/absolute起作用,其它忽视\n if(DIRECTION_HASH.hasOwnProperty(k)) {\n let position = currentStyle[POSITION];\n if(position !== 'relative' && position !== 'absolute') {\n delete style[k];\n continue;\n }\n }\n else if(k === DISPLAY) {\n hasDisplay = true;\n }\n // repaint细化等级,reflow在checkReflow()\n lv |= getLevel(k);\n // repaint置空,如果reflow会重新生成空的\n __cacheStyle[k] = undefined;\n currentStyle[k] = v;\n if(k === Z_INDEX && node !== root) {\n hasZ = true;\n }\n else if(k === VISIBILITY) {\n hasVisibility = true;\n }\n else if(k === COLOR) {\n hasColor = true;\n }\n else if(k === TEXT_STROKE_COLOR) {\n hasTsColor = true;\n }\n else if(k === TEXT_STROKE_WIDTH) {\n hasTsWidth = true;\n }\n else if(k === TEXT_STROKE_OVER) {\n hasTsOver = true;\n }\n }\n }\n }\n }\n }\n // 无任何改变处理的去除记录,如pointerEvents、无效的left\n // 但是perspective需考虑进来,虽然不影响自己但影响别人,要返回true表明有变更\n if(lv === NONE && !component) {\n delete __config[NODE_UNIQUE_UPDATE_ID];\n return;\n }\n // 由于父节点中有display:none,或本身节点也为none,执行普通动画是无效的,此时没有display变化\n if(computedStyle[DISPLAY] === 'none' && !hasDisplay) {\n return;\n }\n // 记录下来清除parent的zIndexChildren缓存\n if(hasZ && domParent) {\n delete domParent.__zIndexChildren;\n }\n // 影响子继承REPAINT的变化,如果被cache住需要清除\n if(hasVisibility || hasColor || hasTsColor || hasTsWidth || hasTsOver) {\n for(let __structs = root.__structs, __struct = node.__config[NODE_STRUCT], i = __struct[STRUCT_INDEX] + 1, len = i + __struct[STRUCT_TOTAL]; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n } = __structs[i];\n // text的style指向parent,不用管\n if(node instanceof Text) {\n continue;\n }\n let __config = node.__config;\n let currentStyle = __config[NODE_CURRENT_STYLE];\n let need;\n if(hasVisibility && currentStyle[VISIBILITY][1] === INHERIT) {\n need = true;\n }\n else if(hasColor && currentStyle[COLOR][1] === INHERIT) {\n need = true;\n }\n else if(hasTsColor && currentStyle[TEXT_STROKE_COLOR][1] === INHERIT) {\n need = true;\n }\n else if(hasTsWidth && currentStyle[TEXT_STROKE_WIDTH][1] === INHERIT) {\n need = true;\n }\n else if(hasTsOver && currentStyle[TEXT_STROKE_OVER][1] === INHERIT) {\n need = true;\n }\n if(need) {\n __config[NODE_REFRESH_LV] |= REPAINT;\n node.clearCache();\n }\n else {\n i += total || 0;\n }\n }\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.__config[NODE_CACHE_MASK]) {\n prev.__config[NODE_CACHE_MASK].release();\n }\n }\n // 特殊情况,父节点display:none,子节点进行任意变更,应视为无效\n // 如果父节点由none变block,这里也return false,因为父节点会重新layout+render\n // 如果父节点由block变none,同上,所以只要current/computed里有none就return false\n let parent = domParent;\n if(hasDisplay && parent) {\n let __config = parent.__config;\n if(__config[NODE_CURRENT_STYLE][DISPLAY] === 'none' || __config[NODE_COMPUTED_STYLE][DISPLAY] === 'none') {\n computedStyle[DISPLAY] = 'none';\n return;\n }\n }\n // reflow/repaint相关的记录下来\n let isRp = !component && isRepaint(lv);\n if(isRp) {\n // zIndex变化需清空svg缓存\n if(hasZ && renderMode === mode.SVG) {\n lv |= REPAINT;\n domParent && cleanSvgCache(domParent);\n }\n // z改变影响struct局部重排,它的数量不会变因此不影响外围,此处先收集,最后统一对局部根节点进行更新\n if(hasZ && !component && zHash) {\n if(domParent && !domParent.hasOwnProperty('__uniqueZId')) {\n zHash[uniqueUpdateId] = true;\n domParent.__uniqueZId = uniqueUpdateId++;\n zList.push(domParent);\n }\n }\n }\n // reflow在root的refresh中做\n else {\n reflowList.push({\n node,\n style,\n component,\n addDom,\n removeDom,\n });\n }\n // 这里也需|运算,每次刷新会置0,但是如果父元素进行继承变更,会在此元素分析前更改,比如visibility,此时不能直接赋值\n __config[NODE_REFRESH_LV] |= lv;\n if(component || addDom || removeDom) {\n root.__rlv = REBUILD;\n }\n else {\n root.__rlv = Math.max(root.__rlv, lv);\n }\n // dom在>=REPAINT时total失效,svg的Geom比较特殊\n let need = lv >= REPAINT || renderMode === mode.SVG && node instanceof Geom;\n if(need) {\n if(__config[NODE_CACHE]) {\n __config[NODE_CACHE].release();\n }\n }\n // perspective也特殊只清空total的cache,和>=REPAINT清空total共用\n if(need || contain(lv, PERSPECTIVE)) {\n if(__config[NODE_CACHE_TOTAL]) {\n __config[NODE_CACHE_TOTAL].release();\n }\n if(__config[NODE_CACHE_MASK]) {\n __config[NODE_CACHE_MASK].release();\n }\n if(__config[NODE_CACHE_OVERFLOW]) {\n __config[NODE_CACHE_OVERFLOW].release();\n }\n }\n // 特殊的filter清除cache\n if((need || contain(lv, FILTER)) && __config[NODE_CACHE_FILTER]) {\n __config[NODE_CACHE_FILTER].release();\n }\n // 向上清除等级>=REPAINT的汇总缓存信息,过程中可能会出现重复,因此节点上记录一个临时标防止重复递归\n while(parent) {\n let __config = parent.__config;\n // 向上查找,出现重复跳出\n if(__config.hasOwnProperty(NODE_UNIQUE_UPDATE_ID)) {\n let id = __config[NODE_UNIQUE_UPDATE_ID];\n if(cacheHash.hasOwnProperty(id)) {\n break;\n }\n cacheHash[id] = true;\n }\n // 没有的需要设置一个标识\n else {\n cacheHash[uniqueUpdateId] = true;\n __config[NODE_UNIQUE_UPDATE_ID] = uniqueUpdateId++;\n cacheList.push(__config);\n }\n let lv = __config[NODE_REFRESH_LV];\n let need = lv >= REPAINT;\n if(need && __config[NODE_CACHE]) {\n __config[NODE_CACHE].release();\n }\n // 前面已经过滤了无改变NONE的,只要孩子有任何改变父亲就要清除\n if(__config[NODE_CACHE_TOTAL]) {\n __config[NODE_CACHE_TOTAL].release();\n }\n if(__config[NODE_CACHE_FILTER]) {\n __config[NODE_CACHE_FILTER].release();\n }\n if(__config[NODE_CACHE_MASK]) {\n __config[NODE_CACHE_MASK].release();\n }\n if(__config[NODE_CACHE_OVERFLOW]) {\n __config[NODE_CACHE_OVERFLOW].release();\n }\n parent = __config[NODE_DOM_PARENT];\n }\n return true;\n}\n\nfunction cleanSvgCache(node, child) {\n let __config = node.__config;\n if(child) {\n __config[NODE_REFRESH_LV] |= REPAINT;\n }\n else {\n __config[NODE_CACHE_TOTAL].release();\n }\n if(Array.isArray(node.children)) {\n node.children.forEach(child => {\n if(child instanceof Component) {\n child = child.shadowRoot;\n }\n if(!(child instanceof Text)) {\n cleanSvgCache(child, true);\n }\n });\n }\n}\n\nlet uuid = 0;\n\nclass Root extends Dom {\n constructor(tagName, props, children) {\n super(tagName, props);\n this.__cd = children || []; // 原始children,再初始化过程中生成真正的dom\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.__taskCp = [];\n this.__ref = {};\n this.__reflowList = [{ node: this }]; // 初始化填自己,第一次布局时复用逻辑完全重新布局\n this.__animateController = new Controller();\n Event.mix(this);\n this.__config[NODE_UPDATE_HASH] = this.__updateHash = {};\n this.__uuid = uuid++;\n this.__rlv = REBUILD; // 每次刷新最大lv\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 += `>${domName}>`;\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);\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.__initProps();\n this.__root = this;\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(null, 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 refresh(cb, isFirst) {\n this.__hookTask = null;\n let { isDestroyed, renderMode, ctx, defs, width, height } = this;\n if(isDestroyed) {\n return;\n }\n defs.clear();\n // 首次递归测量整树的继承,后续更改各自更新机制做,防止每次整树遍历;root检查首次直接做,后续在checkUpdate()中插入\n if(isFirst) {\n this.__checkRoot(renderMode, width, height);\n }\n // 非首次刷新如果没有更新则无需继续\n else if(!this.__checkUpdate(renderMode, ctx, width, height)) {\n return;\n }\n this.__checkReflow(width, height);\n if(renderMode === mode.CANVAS && !this.props.noRender) {\n this.__clear(ctx, renderMode);\n struct.renderCanvas(renderMode, ctx, this);\n }\n // svg的特殊diff需要\n else if(renderMode === mode.SVG && !this.props.noRender) {\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 && !this.props.noRender) {\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 /**\n * 为component的setState更新专门开辟个独立的流水线,root/frame中以taskCp存储更新列表\n * 普通的动画、img加载等都走普通的refresh的task,component走这里,frame中的结构同样\n * 在frame的每帧调用中,先执行普通的动画task,再执行component的task\n * 这样动画执行完后,某个cp的sr及子节点依旧先进行了动画变更,进入__addUpdate()环节\n * 然后此cp再更新sr及子节点,这样会被__addUpdate()添加到尾部,依赖目前浏览器默认实现\n * 上一行cp更新过程中是updater.check()进行的,如果有新老交换且有动画,动画的assigning是true,进行继承\n * root刷新parseUpdate()时,老的sr及子节点先进行,随后新的sr后进行且有component标识,sr子节点不会有更新\n * @param cb\n */\n addRefreshCp(cb) {\n let { taskCp, isDestroyed } = this;\n if(isDestroyed) {\n return;\n }\n // 每次只执行1次\n if(!taskCp.length) {\n let clone;\n frame.__nextFrameCp({\n __before: diff => {\n if(this.isDestroyed) {\n return;\n }\n clone = taskCp.splice(0);\n if(clone.length) {\n clone.forEach(item => {\n item.__before(diff);\n });\n updater.check(this);\n let len = updater.updateList.length;\n if(len) {\n updater.updateList.forEach(cp => {\n let root = cp.root; // 多个root并存时可能cp的引用不相同,需分别获取\n let sr = cp.shadowRoot;\n // 可能返回text,需视为其parentNode\n if(sr instanceof Text) {\n sr = sr.domParent;\n }\n let res = {};\n res[UPDATE_NODE] = sr;\n res[UPDATE_STYLE] = sr.currentStyle;\n res[UPDATE_FOCUS] = REFLOW;\n res[UPDATE_COMPONENT] = cp;\n res[UPDATE_CONFIG] = sr.__config;\n this.__addUpdate(sr, sr.__config, root, root.__config, res);\n });\n }\n }\n },\n __after: diff => {\n if(this.isDestroyed) {\n return;\n }\n clone.forEach(item => {\n item.__after(diff);\n });\n // 触发didUpdate\n updater.did();\n },\n });\n this.__frameHook();\n }\n if(taskCp.indexOf(cb) === -1) {\n taskCp.push(cb);\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] = [width, PX];\n currentStyle[HEIGHT] = [height, 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 * 添加更新入口,按节点汇总更新信息\n * @private\n */\n __addUpdate(node, nodeConfig, root, rootConfig, o) {\n let updateHash = rootConfig[NODE_UPDATE_HASH];\n // root特殊处理,检查变更时优先看继承信息\n if(node === root) {\n updateHash = root.__updateRoot;\n if(updateHash) {\n if(o[UPDATE_FOCUS]) {\n updateHash[UPDATE_FOCUS] |= o[UPDATE_FOCUS];\n }\n // 后续存在新建list上,需增加遍历逻辑\n if(o[UPDATE_STYLE]) {\n let list = updateHash[UPDATE_LIST] = updateHash[UPDATE_LIST] || [];\n list.push({\n [UPDATE_STYLE]: o[UPDATE_STYLE],\n [UPDATE_OVERWRITE]: o[UPDATE_OVERWRITE],\n [UPDATE_KEYS]: o[UPDATE_KEYS],\n });\n }\n }\n else {\n root.__updateRoot = o;\n }\n }\n else if(!nodeConfig.hasOwnProperty(NODE_UNIQUE_UPDATE_ID)) {\n nodeConfig[NODE_UNIQUE_UPDATE_ID] = uniqueUpdateId;\n // 大多数情况节点都只有一次更新,所以优化首次直接存在style上,后续存在list\n updateHash[uniqueUpdateId++] = o;\n }\n else if(updateHash.hasOwnProperty(nodeConfig[NODE_UNIQUE_UPDATE_ID])) {\n let target = updateHash[nodeConfig[NODE_UNIQUE_UPDATE_ID]];\n if(o[UPDATE_FOCUS]) {\n target[UPDATE_FOCUS] |= o[UPDATE_FOCUS];\n }\n // 后续存在新建list上,需增加遍历逻辑\n if(o[UPDATE_STYLE]) {\n let list = target[UPDATE_LIST] = target[UPDATE_LIST] || [];\n list.push({\n [UPDATE_STYLE]: o[UPDATE_STYLE],\n [UPDATE_OVERWRITE]: o[UPDATE_OVERWRITE],\n [UPDATE_KEYS]: o[UPDATE_KEYS],\n });\n }\n }\n else {\n inject.error('Update process miss uniqueUpdateId');\n }\n }\n\n /**\n * 除首次外每次刷新前检查更新列表,计算样式变化,以及测量信息\n * @private\n */\n __checkUpdate(renderMode, ctx, width, height) {\n let root = this;\n let reflowList = [];\n let cacheHash = {};\n let cacheList = [];\n let zHash = {};\n let zList = [];\n let updateRoot = root.__updateRoot;\n let updateHash = root.__updateHash;\n // 给个方式使得外部可以强制刷新\n let hasUpdate = root.__hasRootUpdate;\n root.__hasRootUpdate = false;\n // root更新特殊提前,因为有继承因素\n if(updateRoot) {\n root.__updateRoot = null;\n hasUpdate = parseUpdate(renderMode, root, updateRoot,\n reflowList, cacheHash, cacheList);\n // 此时做root检查,防止root出现继承等无效样式,或者发生resize()\n if(hasUpdate) {\n root.__checkRoot(renderMode, width, height);\n }\n }\n // 汇总处理每个节点,k是递增数字直接循环遍历\n let keys = Object.keys(updateHash);\n for(let i = 0, len = keys.length; i < len; i++) {\n let t = parseUpdate(renderMode, root, updateHash[keys[i]],\n reflowList, cacheHash, cacheList, zHash, zList);\n hasUpdate = hasUpdate || t;\n }\n // 先做一部分reset避免下面measureList干扰,cacheList的是专门收集新增的额外节点\n root.__reflowList = reflowList;\n uniqueUpdateId = 0;\n root.__updateHash = root.__config[NODE_UPDATE_HASH] = {};\n cacheList.forEach(__config => {\n delete __config[NODE_UNIQUE_UPDATE_ID];\n });\n // zIndex改变的汇总修改,防止重复操作,有个注意点,有新增的child时,\n // 会在后面的reflow重新build父节点的struct,这里提前更新会报错,里面进行判断\n zList.forEach(item => {\n if(item.hasOwnProperty('__uniqueZId')) {\n delete item.__uniqueZId;\n item.__updateStruct(root.__structs);\n }\n });\n // 做完清空留待下次刷新重来\n for(let i = 0, len = keys.length; i < len; i++) {\n delete updateHash[keys[i]][UPDATE_CONFIG][NODE_UNIQUE_UPDATE_ID];\n }\n return hasUpdate;\n }\n\n /**\n * 除首次外每次刷新前检查reflow列表,计算需要reflow的节点局部重新布局\n * 当一个元素absolute不变时,其变化不会影响父元素和兄弟元素,直接自己重新局部LAYOUT包含子节点\n * 当absolute发生改变时,其变化会影响父和兄弟,视作父重新布局\n * 当inline变化时,视为其最近block/flex父变化\n * 当block变化时,往上查找最上层flex视为其变化,如不是则影响后面兄弟offset和父resize\n * 当flex变化时,往上查找最上层flex视为其变化,如不是则影响所有递归子节点layout和父resize\n * 以上3种情况向上查找时遇到absolute父均提前跳出,并标记absolute父LAYOUT\n * 上面所有情况即便结束还得额外看是否处于absolute中,是还是标记absolute重新布局\n * 当relative只变化left/top/right/bottom时,自己重新layout\n * 检测节点时记录影响的所有节点,最终形成一棵或n棵局部树\n * 需要重新布局的记作LAYOUT,被兄弟影响只需偏移的记作OFFSET,OFFSET可能会重复变为LAYOUT\n * 上述情况倘若发生包含重复,去掉子树,因子树视为被包含的重新布局\n * 如果有从root开始的,直接重新布局像首次那样即可\n * 如果非root,所有树根按先根顺序记录下来,依次执行局部布局\n * =========================\n * addDom比较特殊,是向已有节点中添加新的节点,检查影响与普通domDiff变化不同\n * @private\n */\n __checkReflow(width, height) {\n let { __reflowList: reflowList } = this;\n if(!reflowList.length) {\n return;\n }\n let root = this;\n let uniqueList = [];\n let hasRoot;\n __uniqueReflowId = 0;\n let reflowHash = {};\n // 遍历检查发生布局改变的节点列表,此时computedStyle还是老的,currentStyle是新的\n for(let i = 0, len = reflowList.length; i < len; i++) {\n let item = reflowList[i];\n let { node, component, addDom, removeDom } = item;\n // root提前跳出,完全重新布局\n if(node === this) {\n hasRoot = true;\n break;\n }\n // 添加时如果是cp则node取sr来布局\n if(addDom && node instanceof Component) {\n node = node.shadowRoot;\n }\n // 每个节点生成唯一的布局识别id存入hash防止重复\n if(!node.hasOwnProperty('__uniqueReflowId')) {\n node.__uniqueReflowId = __uniqueReflowId;\n reflowHash[__uniqueReflowId++] = item;\n }\n // 每个节点都向上检查影响,以及是否从root开始完全重新,remove特殊对待,影响父节点视为普通父节点relay\n if(checkInfluence(root, reflowHash, node, component, addDom)) {\n hasRoot = true;\n if(addDom) {\n this.__zIndexChildren = null;\n }\n break;\n }\n // remove的要特殊对待,因为提前删除了父子兄弟关系,下面deepScan不会出现\n else if(removeDom) {\n uniqueList.push(item);\n }\n }\n __uniqueReflowId = 0;\n this.__reflowList = [];\n // 有root提前跳出\n if(hasRoot) {\n reflow.clearUniqueReflowId(reflowHash);\n let isUpright = this.currentStyle[WRITING_MODE].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 });\n this.__structs = this.__structure(0, 0);\n return true;\n }\n /**\n * 修剪树,自顶向下深度遍历\n * LAYOUT节点作为局部根,其递归子节点无需重复任何操作,直接去重\n * OFFSET节点作为局部根,其递归子节点先执行任何操作,后续根节点再偏移一次\n */\n else {\n this.__deepScan(function(node, options) {\n if(node.hasOwnProperty('__uniqueReflowId')) {\n let o = reflowHash[node.__uniqueReflowId];\n options.uniqueList.push(o);\n // 返回true即可提前结束深度遍历,在reflowHash有记录时提前跳出,子节点交由上面逻辑执行\n return true;\n }\n // reflowHash没有记录则无返回继续递归执行\n }, { uniqueList });\n /**\n * 按顺序执行列表即可,上层LAYOUT先执行且停止递归子节点,上层OFFSET后执行等子节点先LAYOUT/OFFSET\n * 同级按先后顺序排列,过程中记录diff在结束后进行structs更新\n * 这里要注意margin合并的逻辑,因为最终都是block(flex等同),需要进行合并\n * 在处理一个block时,先判断是否是空block,同时看后面紧邻的有没有在uniqueList的下一个\n * 单独空block处理、2个相邻的非block处理直接可以进行判断\n * 中间的空block(即非空block的下一个是空block,且下一个不是最后一个),先记录下来list,合并后一并offset\n * 合并margin和Dom的逻辑一样,抽离共有方法\n **/\n let diffList = [];\n let diffI = 0;\n let mergeOffsetList = [];\n let __uniqueMergeOffsetId = 0;\n uniqueList.forEach(item => {\n let { node, component, addDom, removeDom } = item;\n // 重新layout的w/h数据使用之前parent暂存的,x使用parent,y使用prev或者parent的\n let cps = node.computedStyle, cts = node.currentStyle;\n let zIndex = cps[Z_INDEX], position = cps[POSITION], display = cps[DISPLAY];\n let isLastAbs = position === 'absolute';\n let isNowAbs = cts[POSITION] === 'absolute';\n let isLastNone = display === 'none';\n let isNowNone = cts[DISPLAY] === 'none';\n // none不可见布局无效可以无视\n if(isLastNone && isNowNone) {\n return;\n }\n let parent = node.domParent;\n let { __layoutData: { x, y, h }, width, computedStyle } = parent;\n let current = node;\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 if(ref instanceof Text\n || (ref.computedStyle[POSITION] !== 'absolute' && ref.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 if(!removeDom) {\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 }\n // 找到最上层容器,如果是组件的子节点,以sr为container,sr本身往上找\n let container = node;\n // remove的节点本身无需再次布局\n if(!removeDom) {\n if(isNowAbs) {\n container = container.domParent;\n while(container && container !== root) {\n if(isRelativeOrAbsolute(container)) {\n break;\n }\n // 不能用domParent,必须在组件环境内\n if(container.parent) {\n container = container.parent;\n }\n else if(container.host) {\n break;\n }\n }\n if(!container) {\n container = root;\n }\n // 由setState引发的要检查是cp自身还是更上层,如果cp被abs包含,那么node是cp的父亲,否则node是cp的sr\n // 而这种情况下传cp或node都一样,所以最终统一传node\n parent.__layoutAbs(container, parent.__layoutData, node);\n // 优先判断dom变更\n if(addDom) {\n let arr = parent.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n parent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n return;\n }\n // 前后都是abs无需偏移后面兄弟和parent调整,component变化节点需更新struct\n else if(isLastAbs) {\n if(component) {\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n if((position !== cts[POSITION] && (position === 'static' || cts[POSITION] === 'static'))\n || zIndex !== cts[Z_INDEX]) {\n parent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n }\n }\n else if(isLastNone || isNowNone) {\n node.__zIndexChildren = null;\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n }\n return;\n }\n // 标识flow变abs,可能引发zIndex变更,重设struct和svg\n parent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n }\n // 现在是普通流,不管之前是啥直接布局,排除remove删除的\n else {\n node.__layout({\n x,\n y,\n w: width,\n h,\n }, false, false, false);\n y += node.outerHeight;\n if(component) {\n container = node;\n }\n else {\n container = container.domParent;\n while(container && container !== root) {\n if(isRelativeOrAbsolute(container)) {\n break;\n }\n // 不能用domParent,必须在组件环境内\n if(container.parent) {\n container = container.parent;\n }\n else if(container.host) {\n break;\n }\n }\n }\n if(!container) {\n container = root;\n }\n // 防止geom\n if(node instanceof Dom) {\n node.__layoutAbs(container, {\n x,\n y,\n w: width,\n h,\n });\n }\n }\n }\n\n // 向上查找最近的parent是relative,需再次累加ox/oy,无需继续向上递归,因为parent已经递归包含了\n // 这样node重新布局后再次设置其使用parent的偏移\n let p = node;\n while(p && p !== root) {\n p = p.domParent;\n computedStyle = p.computedStyle;\n if(computedStyle[POSITION] === 'relative') {\n let { ox, oy } = p;\n ox && node.__offsetX(ox);\n oy && node.__offsetY(oy);\n break;\n }\n }\n\n // 向下调整next的flow位置,遇到重复LAYOUT的跳出等待其调用并处理其next,忽视掉abs,margin和abs在merge中做\n if(node.isShadowRoot) {\n node = node.hostRoot;\n }\n let next = node.next;\n while(next && !next.hasOwnProperty('__uniqueReflowId')) {\n if(next.computedStyle[POSITION] === 'absolute') {\n next = next.next;\n continue;\n }\n let { y: oy } = next;\n let diff = y - oy;\n if(diff) {\n while(next && !next.hasOwnProperty('__uniqueReflowId')) {\n let target = next;\n if(target instanceof Component) {\n target = target.shadowRoot;\n }\n let cs = target.computedStyle;\n if(cs[POSITION] !== 'absolute' && cs[DISPLAY] !== 'none') {\n target.__offsetY(diff, true, REPAINT);\n }\n next = next.next;\n }\n }\n break;\n }\n\n // 去重防止abs并记录parent,整个结束后按先序顺序进行margin合并以及偏移,注意忽略有display:none变block同时为absolute的\n if(!parent.hasOwnProperty('__uniqueMergeOffsetId') && !(isNowAbs && isLastNone)) {\n parent.__uniqueMergeOffsetId = __uniqueMergeOffsetId++;\n mergeOffsetList.push(parent);\n }\n\n // add和remove都需父节点重新生成struct,zIndexChildren已在对应api操作的before()侦听做了\n if(addDom || removeDom) {\n let arr = parent.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n }\n // component未知dom变化,所以强制重新struct,text则为其父节点,同时防止zIndex变更影响父节点\n else if(component) {\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n if((position !== cts[POSITION] && (position === 'static' || cts[POSITION] === 'static'))\n || zIndex !== cts[Z_INDEX]) {\n node.domParent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(node.domParent);\n }\n }\n }\n // display有none变化,重置struct和zIndexChildren\n else if(isLastNone || isNowNone) {\n node.__zIndexChildren = null;\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n }\n });\n /**\n * mergeMargin后续调整,记录的是变更节点的父节点,因此每个节点内部直接遍历孩子进行\n * 由于保持先根遍历的顺序,因此会从最上最里的节点开始,先进行margin合并\n * 由于之前忽略掉abs节点,因此再检查直接abs是否要调整\n * 完成后对此父节点的后续兄弟节点进行调整,多次不会干扰影响\n * 然后继续往上循环,直到root结束\n */\n let inDirectAbsList = [];\n mergeOffsetList.forEach(parent => {\n delete parent.__uniqueMergeOffsetId;\n let flowChildren = parent.flowChildren, absChildren = parent.absChildren;\n let mergeMarginBottomList = [], mergeMarginTopList = [];\n let length = flowChildren.length, lastChild;\n let isStart, startIndex, startNode;\n // 遍历flow孩子,从开始变化的节点开始,看变化造成的影响,对其后面节点进行偏移,并统计总偏移量\n for(let i = 0; i < length; i++) {\n let item = flowChildren[i];\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n let isXom = item instanceof Xom;\n // 忽略掉前面没有变更的节点,不能合并\n if(!isStart && isXom) {\n if(item.hasOwnProperty('__uniqueReflowId')) {\n isStart = true;\n startIndex = i;\n startNode = item;\n }\n }\n // 开始变更的节点,至少不是第0个\n let cs = isXom && item.currentStyle;\n let isInline = isXom && cs[DISPLAY] === 'inline';\n let isInlineBlock = isXom && cs[DISPLAY] === 'inlineBlock';\n lastChild = item;\n // 每次循环开始前,这次不是block的话,看之前遗留的,可能是以空block结束,需要特殊处理,单独一个空block也包含\n if((!isXom || isInline || isInlineBlock)) {\n if(mergeMarginBottomList.length && mergeMarginTopList.length && isStart) {\n let diff = reflow.getMergeMargin(mergeMarginTopList, mergeMarginBottomList);\n if(diff) {\n for(let j = Math.max(startIndex, i - mergeMarginBottomList.length + 1); j < length; j++) {\n flowChildren[j].__offsetY(diff, true, REPAINT);\n }\n }\n }\n mergeMarginTopList = [];\n mergeMarginBottomList = [];\n }\n // 和普通布局类似,只是不用重新布局只需处理合并margin再根据差值偏移\n if(isXom && !isInline) {\n let isNone = isXom && cs[DISPLAY] === 'none';\n let isEmptyBlock;\n if(!isNone && item.flowChildren && item.flowChildren.length === 0) {\n let {\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n [HEIGHT]: height,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n } = item.computedStyle;\n // 无内容高度为0的空block特殊情况,记录2个margin下来等后续循环判断处理\n if(paddingTop <= 0 && paddingBottom <= 0 && height <= 0 && borderTopWidth <= 0 && borderBottomWidth <= 0) {\n mergeMarginBottomList.push(marginBottom);\n mergeMarginTopList.push(marginTop);\n isEmptyBlock = true;\n }\n }\n // 空block要留下轮循环看,除非是最后一个,非空本轮处理掉看是否要合并\n if(!isNone && !isEmptyBlock) {\n let { [MARGIN_TOP]: marginTop, [MARGIN_BOTTOM]: marginBottom } = item.computedStyle;\n // 有bottom值说明之前有紧邻的block,任意个甚至空block,自己有个top所以无需判断top\n // 如果是只有紧邻的2个非空block,也被包含在情况内,取上下各1合并\n if(mergeMarginBottomList.length) {\n mergeMarginTopList.push(marginTop);\n if(isStart) {\n let diff = reflow.getMergeMargin(mergeMarginTopList, mergeMarginBottomList);\n // 需要合并的情况,根据记录数和索引向上向下遍历节点设置偏移,同时设置总偏移量供父级使用\n if(diff) {\n for(let j = Math.max(startIndex, i - mergeMarginBottomList.length + 1); j < length; j++) {\n flowChildren[j].__offsetY(diff, true, REPAINT);\n }\n }\n }\n }\n // 同时自己保存bottom,为后续block准备\n mergeMarginTopList = [];\n mergeMarginBottomList = [marginBottom];\n }\n // 最后一个空block当是正正和负负时要处理,正负在outHeight处理了结果是0,最后一个一定有不必判断isStart\n else if(i === length - 1) {\n let diff = reflow.getMergeMargin(mergeMarginTopList, mergeMarginBottomList);\n if(diff) {\n for(let j = Math.max(startIndex, i - mergeMarginBottomList.length + 1); j < length; j++) {\n flowChildren[j].__offsetY(diff, true, REPAINT);\n }\n }\n }\n }\n }\n // 先检查parent的尺寸是否发生了变化,从而决定是否调整next以及向上递归调整\n let cs = parent.currentStyle;\n let height = cs[HEIGHT];\n let isContainer = parent === root || parent.isShadowRoot || cs[POSITION] === 'absolute' || cs[POSITION] === 'relative';\n if(height[1] === AUTO && lastChild) {\n let oldH = parent.height + parent.computedStyle[PADDING_TOP];\n let nowH = lastChild.y + lastChild.outerHeight - parent.y;\n let diff = nowH - oldH;\n // 调整next以及非固定PX的abs,再递归向上\n if(diff) {\n parent.__resizeY(diff, REPAINT);\n let container;\n for(let i = 0, len = absChildren.length; i < len; i++) {\n let item = absChildren[i];\n let { [TOP]: top, [BOTTOM]: bottom, [HEIGHT]: height } = item.currentStyle;\n // 是容器,所有的都调整,不是容器,其偏移是上级parent的某一个,根据情况具体不同\n if(top[1] === AUTO) {\n if(bottom[1] === AUTO) {\n let prev = item.prev;\n while(prev) {\n let target = prev;\n if(target instanceof Component) {\n target = target.shadowRoot;\n }\n let isXom = target instanceof Xom;\n let cs = isXom && target.currentStyle;\n let isAbs = isXom && cs[POSITION] === 'absolute';\n if(!isAbs) {\n let y = target.y + target.outerHeight;\n let d = y - item.y;\n if(d) {\n item.__offsetY(d, true, REPAINT);\n }\n break;\n }\n prev = prev.prev;\n }\n }\n else if(bottom[1] === PX) {\n item.__offsetY(diff, true, REPAINT);\n }\n else if(bottom[1] === PERCENT) {\n let v = (1 - bottom[0] * 0.01) * diff;\n item.__offsetY(v, true, REPAINT);\n }\n }\n else if(top[1] === PERCENT) {\n if(isContainer) {\n let v = top[0] * 0.01 * diff;\n item.__offsetY(v, true, REPAINT);\n }\n // 非容器的特殊处理\n else {\n if(!container) {\n container = parent.domParent;\n while(container) {\n if(container === root || container.isShadowRoot) {\n break;\n }\n let cs = container.currentStyle;\n if(cs[POSITION] === 'absolute' || cs[POSITION] === 'relative') {\n break;\n }\n container = container.domParent;\n }\n }\n if(container.currentStyle[HEIGHT][1] !== PX) {\n let v = top[0] * 0.01 * diff;\n item.__offsetY(v, true, REPAINT);\n }\n }\n }\n // 高度百分比需发生变化的重新布局,需要在容器内\n if(height[1] === PERCENT) {\n if(isContainer) {\n parent.__layoutAbs(parent, parent.__layoutData, item);\n }\n // 不在容器内说明在上级,存入等结束后统一重新布局\n else {\n if(!container) {\n container = parent.domParent;\n while(container) {\n if(container === root || container.isShadowRoot) {\n break;\n }\n let cs = container.currentStyle;\n if(cs[POSITION] === 'absolute' || cs[POSITION] === 'relative') {\n break;\n }\n container = container.domParent;\n }\n }\n inDirectAbsList.push([parent, container, item]);\n }\n }\n }\n reflow.offsetAndResizeByNodeOnY(parent, root, reflowHash, diff, inDirectAbsList);\n return;\n }\n }\n // 没有diff变化或者固定尺寸,可能内部发生变化,调整AUTO的abs,不递归向上\n for(let i = 0, len = absChildren.length; i < len; i++) {\n let item = absChildren[i];\n let { [TOP]: top, [BOTTOM]: bottom } = item.currentStyle;\n if(top[1] === AUTO && bottom[1] === AUTO) {\n let prev = item.prev;\n while(prev) {\n let target = prev;\n if(target instanceof Component) {\n target = target.shadowRoot;\n }\n let isXom = target instanceof Xom;\n let cs = isXom && target.currentStyle;\n let isAbs = isXom && cs[POSITION] === 'absolute';\n if(!isAbs) {\n let y = target.y + target.outerHeight;\n let d = y - item.y;\n if(d) {\n item.__offsetY(d, true, REPAINT);\n }\n break;\n }\n prev = prev.prev;\n }\n }\n }\n });\n // merge过程中需要重新布局的abs\n inDirectAbsList.forEach(arr => {\n arr[0].__layoutAbs(arr[1], arr[0].__layoutData, arr[2]);\n });\n\n // 调整因reflow造成的原struct数据索引数量偏差,纯zIndex的已经在repaint里面重新生成过了\n // 这里因为和update保持一致的顺序,因此一定是先根顺序且互不包含\n let diff = 0, lastIndex = 0, isFirst = true, structs = root.__structs;\n diffList.forEach(item => {\n let [ns, d] = item;\n // 第一个有变化的,及后面无论有无变化都需更新\n // 第1个变化区域无需更改前面一段\n if(isFirst) {\n isFirst = false;\n lastIndex = ns[STRUCT_INDEX] + (ns[STRUCT_TOTAL] || 0) + 1;\n diff += d;\n }\n // 第2+个变化区域看是否和前面一个相连,有不变的段则先偏移它,然后再偏移自己\n else {\n let j = ns[STRUCT_INDEX] + (ns[STRUCT_TOTAL] || 0) + 1 + diff;\n for(let i = lastIndex; i < j; i++) {\n structs[i][STRUCT_INDEX] += diff;\n }\n lastIndex = j;\n diff += d;\n }\n });\n // 后面的要根据偏移量校正索引\n if(diff) {\n for(let i = lastIndex, len = structs.length; i < len; i++) {\n structs[i][STRUCT_INDEX] += diff;\n }\n }\n // 清除id\n reflow.clearUniqueReflowId(reflowHash);\n }\n }\n\n // 每个root拥有一个刷新hook,多个root塞到frame的__hookTask里\n // frame在所有的帧刷新逻辑执行后检查hook列表,进行root刷新操作\n __frameHook() {\n if(!this.__hookTask) {\n let r = this.__hookTask = (() => {\n this.refresh();\n });\n frame.__hookTask.push(r);\n }\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 taskCp() {\n return this.__taskCp;\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, lv, ctx, cache, dx2, dy2) {\n let res = super.render(renderMode, lv, ctx, cache, dx2, dy2);\n if(res.break) {\n return res;\n }\n ctx = res.ctx;\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';\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, lv, ctx, cache, dx, dy) {\n let res = super.render(renderMode, lv, ctx, cache, dx, dy);\n if(res.break) {\n return res;\n }\n this.buildCache(res.sx3, res.sy3);\n ctx = res.ctx;\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';\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, lv, ctx, cache, dx2, dy2) {\n let res = super.render(renderMode, lv, ctx, cache, dx2, dy2);\n if(res.break) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n ctx = res.ctx;\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';\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, lv, ctx, cache, dx, dy) {\n let res = super.render(renderMode, lv, ctx, cache, dx, dy);\n if(res.break) {\n return res;\n }\n this.buildCache(res.sx3, res.sy3);\n ctx = res.ctx;\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';\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, lv, ctx, cache, dx, dy) {\n let res = super.render(renderMode, lv, ctx, cache, dx, dy);\n if(res.break) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n ctx = res.ctx;\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';\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, lv, ctx, cache, dx, dy) {\n let res = super.render(renderMode, lv, ctx, cache, dx, dy);\n if(res.break) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n ctx = res.ctx;\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 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 $$type from './util/$$type';\nimport builder from './util/builder';\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 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 return {\n tagName,\n props,\n $$type: $$type.TYPE_GM,\n };\n },\n createCp(klass, props, children = []) {\n props.children = 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 builder,\n updater,\n refresh,\n enums,\n set debug(v) {\n debug.flag = !!v;\n },\n};\n\nbuilder.ref({\n Xom,\n Dom,\n Img,\n Geom,\n Component,\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":["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","s","res","toLowerCase","replace","$0","$1","toUpperCase","STYLE2UPPER_MAP","style2Upper","$2","STYLE_R_KEY","STYLE_RV_KEY","STYLE_V_KEY","Object","keys","forEach","k","k2","l","UPDATE_KEY","UPDATE_NODE","UPDATE_STYLE","UPDATE_FOCUS","UPDATE_COMPONENT","UPDATE_OVERWRITE","UPDATE_KEYS","UPDATE_LIST","UPDATE_CONFIG","UPDATE_ADD_DOM","UPDATE_REMOVE_DOM","KEY_FRAME_KEY","FRAME_STYLE","FRAME_TIME","FRAME_EASING","FRAME_TRANSITION","NODE_KEY","NODE_DOM_PARENT","NODE_OPACITY","NODE_MATRIX","NODE_MATRIX_EVENT","NODE_CACHE","NODE_CACHE_TOTAL","NODE_CACHE_FILTER","NODE_CACHE_MASK","NODE_CACHE_OVERFLOW","NODE_STRUCT","NODE_TAG_NAME","NODE_CURRENT_STYLE","NODE_CURRENT_PROPS","NODE_COMPUTED_STYLE","NODE_CACHE_STYLE","NODE_CACHE_PROPS","NODE_LIMIT_CACHE","NODE_IS_MASK","NODE_IS_INLINE","NODE_HAS_CONTENT","NODE_REFRESH_LV","NODE_IS_DESTROYED","NODE_STYLE","NODE_UPDATE_HASH","NODE_UNIQUE_UPDATE_ID","NODE_DEFS_CACHE","NODE_PERSPECTIVE_MATRIX","NODE_VIRTUAL_DOM","NODE_CACHE_AS_BITMAP","STRUCT_KEY","STRUCT_NODE","STRUCT_INDEX","STRUCT_CHILD_INDEX","STRUCT_LV","STRUCT_NUM","STRUCT_TOTAL","STRUCT_HAS_MASK","ANIMATE_KEY","I_ASSIGNING","I_IN_FPS","I_IS_DELAY","I_BEGIN","I_END","I_FINISHED","I_NEXT_END","I_FIRST_PLAY","I_PLAY_CB","I_TARGET","I_ROOT","I_FRAMES","I_FRAMES_R","I_CURRENT_TIME","I_NEXT_TIME","I_STYLE","I_DURATION","I_ITERATIONS","I_FILL","I_PLAYBACK_RATE","I_PLAY_COUNT","I_PLAY_STATE","I_DESTROYED","I_START_TIME","I_FPS_TIME","I_EASING","I_ENTER_FRAME","I_DELAY","I_END_DELAY","I_KEYS","I_ORIGIN_STYLE","I_CURRENT_FRAMES","I_CURRENT_FRAME","I_SPF_LIMIT","I_FPS","I_DIRECTION","I_FIRST_ENTER","I_STAY_BEGIN","I_STAY_END","I_IS2","I_END_TIME","I_NODE_CONFIG","I_ROOT_CONFIG","I_OUT_BEGIN_DELAY","I_TIME_STAMP","ELLIPSIS","enums","Node","__x","__y","__ox","__oy","__sx","__sy","__width","__height","__baseline","__verticalBaseline","__config","__prev","__next","__parent","__domParent","__root","__host","__virtualDom","__bbox","__filterBbox","i","lv","j","root","struct","diff","isLayout","x","ox","y","oy","__hostRoot","CANVAS","SVG","WEBGL","o","AUTO","PX","PERCENT","NUMBER","INHERIT","DEG","STRING","RGBA","REM","EM","VW","VH","VMAX","VMIN","GRADIENT","calUnit","v","n","parseFloat","test","TYPE_VD","Symbol","TYPE_GM","TYPE_CP","identity","multiply","a","b","isE","c","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","inv","det","m2m6","point2d","slice","toString","isType","type","obj","call","isObject","isString","isFunction","isNumber","isBoolean","isDate","hasOwn","hasOwnProperty","fnToString","ObjectFunctionString","isNil","joinSourceArray","arr","len","item","Array","isArray","stringify","encodeHtml","prop","joinVirtualDom","vd","defs","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","hash2arr","clone","$$type","util","Date","isPlainObject","equalArr","ai","bi","isArrayA","isArrayB","equal","getTime","extend","target","source","split","extendAnimate","ovd","nvd","__animationList","animationList","splice","__setTarget","assigning","finished","__stayEnd","assignCurrentStyle","__frameAnimateList","transformBbox","bbox","matrix","dx","dy","mx","x1","y1","x2","y2","xa","ya","xb","yb","min","proto","getPrototypeOf","Ctor","constructor","assignMatrix","t","prefixHex","replaceRgba2Hex","$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","draw","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","node","measureImg","url","cb","state","success","task","img","Image","onload","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","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","sqrt","vector","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","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","KEY_COLOR","KEY_LENGTH","KEY_GRADIENT","KEY_RADIUS","COLOR_HASH","LENGTH_HASH","RADIUS_HASH","GRADIENT_HASH","GRADIENT_TYPE","linear","radial","conic","KEY_EXPAND","EXPAND_HASH","RESET_DOM","reset","RESET_GEOM","IGNORE","REPAINT","addGeom","ks","isIgnore","isGeom","isRepaint","kernelSize","sigma","outerSize","outerSizeByD","gaussianWeight","E","change","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","equalStyle","oa","ob","aa","av","bv","isMulti","isRelativeOrAbsolute","VALUE","ARRAY_0","ARRAY_0_1","cloneStyle","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","ac","bc","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","SIZE","MAX","HASH_CANVAS","Page","number","__size","__number","__free","__total","__canvas","__offscreen","__grid","__uuid","__update","time","grid","pos","genSingle","bboxNew","dbx","dby","Cache","__init","__page","__pos","getCoords","__appendData","__isNew","__enabled","globalAlpha","update","__available","clear","del","getInstance","oldX1","cacheMask","isClip","tf","globalCompositeOperation","drawCache","clientWidth","clientHeight","xe","ye","cacheOverflow","rect","parentMatrix","dbx2","dby2","ENUM","NONE","TRANSFORM_ALL","REFLOW","REBUILD","TRANSFORMS","contain","getLevel","isReflow","isRebuild","measureLineWidth","perW","rw","newLine","mw","hypotheticalNum","round","getFontKey","Text","__textBoxes","__charWidth","__textWidth","__bp","__widthHash","__cache","ly","lineBoxManager","endSpace","lineClampCount","isDestroyed","textBoxes","maxW","beginSpace","bp","lineCount","mainCoords","isTextOverflow","textWidth","containerSize","__lineBack","textBox","addItem","verticalLineHeight","ew","lineBox","isNewLine","tb","__layoutNone","__resetLb","ep","tbs","mbp","__offsetX","__offsetY","firstCharWidth","level","lineWidth","strokeStyle","render","delRefreshTask","__task","addRefreshTask","__before","__addUpdate","__after","fontKey","charWidth","__style","__cacheStyle","__renderByMask","flattenJson","traverseJson","lastText","options","Xom","Dom","Img","Geom","Component","initRoot","cd","flatten","__json","build","relation","initDom","json","initCp","initCp2","klass","__tagName","hasP","__inheritAnimate","__animateRecords","__placeholder","__children","getRegister","ref","shadowRoot","Event","__eHash","handle","on","apply","off","__karasEventCb","once","emit","event","fns","fn","REGISTER","setUpdateFlag","cp","__hasCpUpdate","__ref","__isMounted","__taskList","__nextState","addRefreshCp","builder","__cd","listener","__shadow","shadow","__shadowRoot","componentDidMount","REFRESH","__isDestroyed","componentWillUnmount","__destroy","force","__emitEvent","__state","defineProperty","get","getInlineBox","leading","bcStart","bcEnd","pbStart","pbEnd","getInlineWidth","contentBox","matrixResize","imgWidth","imgHeight","targetWidth","targetHeight","renderBgc","method","renderImage","loadBgi","bgW","bgH","bgX","bgY","needMask","xnl","xnr","ynt","ynb","image","needResize","copy","traversal","after","isPause","Frame","__hookTask","__taskCp","__now","taskCp","cloneCp","lengthCp","__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","easeIn","easeOut","ease","easeInOut","cubicBezier","getEasing","timingFunction","NUM_CAL_HASH","unify","frames","getProps","inherit","genBeforeRefresh","__frameHook","framing","duration","es","translatePath","calByUnit","container","calDiff","nm","pv","nv","taraget","pi","ni","has","pp","nn","isGradient","calDiffGradient","parentComputedStyle","len2","pv2","nv2","len3","pv3","nv3","u","eq","isArrP","isArrN","pz","nz","np","calFrame","ts","binarySearch","frame","middle","ea","steps","stepsD","calIntermediateStyle","transition","st2","calIncrease","o2","n2","gotoOverload","calDiffTime","playbackRate","spfLimit","fps","frameCb","isDelay","FRAME","PLAY","Animation","__id","nl","__options","op","config","iterations","framesR","originStyle","delay","endDelay","current","isFinish","__cancelTask","__currentProps","__currentStyle","playState","__hasFin","__hasCancel","playCount","currentFrames","stayBegin","stayEnd","is2","endTime","currentTime","currentFrame","isAlternate","alternate","isEven","isLastCount","frameTime","isLastFrame","inEndDelay","needClean","playCb","__clean","BEGIN","END","FINISH","silence","pending","PAUSE","play","CANCEL","__goto","isFrame","excludeDelay","finish","currentProps","spf","animateController","remove","backwards","both","forwards","__target","sync","removeControl","nextFrame","__checkModify","renderBoxShadow","box","spreadBox","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","blurBox","MBM_HASH","screen","overlay","darken","lighten","colorDodge","colorBurn","hardLight","softLight","difference","exclusion","hue","saturation","luminosity","mbmName","isValidMbm","LOCAL","mbm","TF","TX","TY","TZ","getFirstEmptyInlineWidth","flowChildren","child","getLastEmptyInlineWidth","__computedStyle","__listener","__loadBgi","__cacheDefs","__isClip","__isMask","__contentBoxList","__cacheAsBitmap","cacheAsBitmap","__layoutData","__hasComputeReflow","__fontRegister","__hasMask","__calSize","includePercent","isRoot","ph","fontRegister","__clientWidth","__offsetWidth","__outerWidth","__clientHeight","__offsetHeight","__outerHeight","isDirectionRow","isDirectItem","isAbs","isColumn","isRow","__computeReflow","__isIbFull","__isUprightIbFull","clearCache","__mp","__layoutFlex","__layoutInline","__layoutBlock","__sx2","__sx3","__sx4","__sx5","__sx6","__sy2","__sy3","__sy4","__sy5","__sy6","__execAr","ar","controller","autoPlay","__records2","init","list2","__records","__playAuto","h3","isParentVertical","fixedWidth","fixedHeight","selfEndSpace","isReplaced","offsetWidth","offsetHeight","matrixCache","isScale","x5","x6","y5","y6","__calFilter","bgI","kw","rebuild","__hasContent","isRealInline","sx4","sx5","sx6","sy4","sy5","sy6","__calPerspective","__calMatrix","__calCache","hasContent","__calContent","__releaseWhenEmpty","limitCache","perspectiveMatrix","offscreenBlend","offscreenMask","hasFilter","offscreenFilter","offscreenOverflow","borderList","hasBgi","some","svgBgSymbol","inline","bg","isFirst","lastContentBox","lastLineBox","parentLineBox","ix1","iy1","ix2","iy2","symbol","clearAnimate","clearFrameAnimate","__stopPropagation","__stopImmediatePropagation","willResponseEvent","hasEmitMask","ignore","inThis","__touchstartTarget","__getLg","__getRg","__getCg","lg","createLinearGradient","addColorStop","rg","createRadialGradient","onlyTotal","__cacheTotal","__cacheFilter","__cacheMask","__cacheOverflow","formatStyle","animation","cancel","enter","includeBbox","isShadowRoot","hostRoot","pJson","zChildren","zIndexChildren","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","offsetAndResizeByNodeOnY","reflowHash","inDirectAbsList","isContainer","cs","__layoutAbs","__resizeY","clearUniqueReflowId","__uniqueReflowId","getMergeMargin","topList","bottomList","genZIndexChildren","hasMc","mcHash","lastMaskIndex","__iIndex","__zIndex","__aIndex","genOrderChildren","__order","backtrack","text","__backtrack","block","inlineBlock","none","tag","__flexLine","__zIndexChildren","__structure","nss","__structs","structs","needSort","__tryLayInline","isDirectChild","main","isFixed","isContent","fixedSize","countMin","countMax","isR","__calBasis","min2","max2","__lineBoxManager","__layout","__addMBP","__preLayout","__ioSize","maxSize","countSize","mergeMarginEndList","mergeMarginStartList","ignoreNextLine","ignoreNextWrap","isXom","isInlineBlock","__isRealInline","lastLineClampCount","reflow","setNotEnd","setNewLine","isNone","isEmptyBlock","tw","th","__resizeX","isLastBlock","hasStart","isBlock","horizonAlign","__inlineSize","domList","__marginAuto","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","loadImg","__loadImg","placeholder","loading","__loadAndRefresh","showError","__addGeom","reload","Defs","cacheHash","__isMulti","multi","__cacheProps","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","updateList","removeList","KEY_FLAG","check","checkCp","nextProps","forceCheckUpdate","shouldUpdate","shouldComponentUpdate","updateCp","oldS","oldSr","oldJson","diffSr","oj","nj","ojk","getKeyHash","njk","keyList","cpList","diffCp","diffChildren","diffChild","removeCpFromOldTree","oc","ol","of","nf","exist","ex","did","componentDidUpdate","elem","diffDefs","diffBb","diffD2D","od","nd","diffDef","removeAt","insertAt","insertAdjacentHTML","parentNode","removeAttribute","diffItem","diffD2G","replaceWith","diffT2T","diffG2D","diffG2G","diffItemSelf","diffX2X","diffByLessLv","firstChild","lastChild","obb","nbb","isText","html","svg","where","insertBefore","Controller","__list2","__onList","__lastTime","args","records","animate","offsetTime","onList","timestamp","__action","__mergeAuto","__on","__set","OFFSCREEN_OVERFLOW","OFFSCREEN_FILTER","OFFSCREEN_MASK","OFFSCREEN_BLEND","OFFSCREEN_MASK2","applyOffscreen","origin","MockPage","genUuid","MockCache","reOffset","NA","CHILD","SELF","getCache","OP","FT","MBM","PPT","genBboxTotal","parentIndexHash","opacityHash","includeLimitCache","bboxTotal","filterBbox","matrixHash","parentIndex","node2","hasTotal","mergeBbox","genTotal","hasMask","cacheTotal","cacheFilter","needGen","baseMatrix","matrixList","opacityList","parentOpacity","lastConfig","lastLv","refreshLevel","countMaskNum","ctxTotal","lastMatrix","maskStartHash","offscreenHash","genOverflow","genFilter","genMask","lastOpacity","resetMatrixCacheTotal","isNew","genFrameBufferWithTexture","texCache","lockOneChannel","webgl","createFramebuffer","bindFramebuffer","checkFramebufferStatus","FRAMEBUFFER_COMPLETE","viewport","clearColor","COLOR_BUFFER_BIT","genTotalWebgl","hasMbm","getParameter","MAX_TEXTURE_SIZE","parentPm","totalLimitCache","addTexAndDrawWhenLimit","mockCache","refresh","releaseLockChannel","hookGlRender","frameBuffer2","texture2","genMbmWebgl","deleteFramebuffer","genFilterWebgl","genBlurWebgl","genDropShadowWebgl","rotation","cosR","sinR","genColorMatrixWebgl","amount","oneMinusAmount","useProgram","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","defsCache","hasEffectMask","addCache","maskHash","vdList","parentVd","mChildren","ivs","hasTransform","renderWebgl","pmList","lastRefreshLevel","mergeList","hasRecordAsMask","validMbm","isPerspective","limitHash","pptHash","renderCanvas","TexCache","units","__units","__pages","__channels","__locks","__lockUnits","pages","channels","locks","lastHash","oldList","newList","fullSize","setToChannel","DIRECTION_HASH","ROOT_DOM_NAME","getDom","querySelector","renderProp","EVENT_LIST","initEvent","Root","__wrapEvent","__cb","addEventListener","removeEvent","removeEventListener","isFixedWidthOrHeight","isFixedSize","includeParentFlex","isLAYOUT","setLAYOUT","component","addDom","checkInfluence","topFlex","isSiblingBlock","uniqueUpdateId","parseUpdate","reflowList","cacheList","zHash","zList","overwrite","focus","removeDom","style2","keys2","hasZ","hasVisibility","hasColor","hasDisplay","hasTsColor","hasTsWidth","hasTsOver","__struct","isRp","cleanSvgCache","__uniqueZId","__rlv","__dom","__mw","__mh","__taskUp","__reflowList","__animateController","mix","__updateHash","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","__checkUpdate","__checkReflow","noRender","__clear","__vd","domDiff","updateStyle","taskUp","__hasRootUpdate","__nextFrameCp","updater","includeIgnore","scan","path","zPath","__index__","karas","path2","zPath2","nodeConfig","rootConfig","updateHash","__updateRoot","updateRoot","hasUpdate","__updateStruct","uniqueList","hasRoot","diffList","diffI","mergeOffsetList","__uniqueMergeOffsetId","cps","cts","isLastAbs","isNowAbs","isLastNone","isNowNone","hasFlowPrev","__modifyStruct","mergeMarginBottomList","mergeMarginTopList","startIndex","oldH","nowH","lastIndex","reBuild","base","reBuildC","curveNum","getNewPoint","Line","__x1","__y1","__x2","__y2","__controlA","__controlB","__start","__end","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","__begin","__r","edge","__edge","closure","__closure","sList","r2","__renderOneSector","genVertex","Rect","__rx","__ry","Circle","Ellipse","my","parse","animateRecords","opt","oft","JSON","createGm","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","callback","version","appendTo","parser"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,WAAS,GAAG;AAChBC,EAAAA,QAAQ,EAAE,CADM;AAEhBC,EAAAA,OAAO,EAAE,CAFO;AAGhBC,EAAAA,GAAG,EAAE,CAHW;AAIhBC,EAAAA,KAAK,EAAE,CAJS;AAKhBC,EAAAA,MAAM,EAAE,CALQ;AAMhBC,EAAAA,IAAI,EAAE,CANU;AAOhBC,EAAAA,UAAU,EAAE,CAPI;AAQhBC,EAAAA,YAAY,EAAE,CARE;AAShBC,EAAAA,aAAa,EAAE,CATC;AAUhBC,EAAAA,WAAW,EAAE,CAVG;AAWhBC,EAAAA,WAAW,EAAE,EAXG;AAYhBC,EAAAA,aAAa,EAAE,EAZC;AAahBC,EAAAA,cAAc,EAAE,EAbA;AAchBC,EAAAA,YAAY,EAAE,EAdE;AAehBC,EAAAA,SAAS,EAAE,EAfK;AAgBhBC,EAAAA,WAAW,EAAE,EAhBG;AAiBhBC,EAAAA,KAAK,EAAE,EAjBS;AAkBhBC,EAAAA,UAAU,EAAE,EAlBI;AAmBhBC,EAAAA,WAAW,EAAE,EAnBG;AAoBhBC,EAAAA,WAAW,EAAE,EApBG;AAqBhBC,EAAAA,gBAA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EAAJA,IAnFU;AAoFVkO,EAAAA,OAAO,EAAPA,OApFU;AAqFV47B,EAAAA,OAAO,EAAPA,OArFU;AAsFV7L,EAAAA,OAAO,EAAPA,OAtFU;AAuFVhzE,EAAAA,KAAK,EAALA,KAvFU;;EAwFV,IAAIqX,KAAJ,CAAU/T,CAAV,EAAa;AACX+T,IAAAA,KAAK,CAACxJ,IAAN,GAAa,CAAC,CAACvK,CAAf,CAAA;AACD,GAAA;;AA1FS,EAAZ;AA6FA2/C,OAAO,CAACvB,GAAR,CAAY;AACVvB,EAAAA,GAAG,EAAHA,GADU;AAEVC,EAAAA,GAAG,EAAHA,GAFU;AAGVC,EAAAA,GAAG,EAAHA,GAHU;AAIVC,EAAAA,IAAI,EAAJA,IAJU;AAKVC,EAAAA,SAAS,EAATA,SAAAA;AALU,CAAZ,CAAA,CAAA;;AAQA,IAAG,OAAOxmC,MAAP,KAAkB,WAArB,EAAkC;EAChCA,MAAM,CAAColE,KAAP,GAAeA,OAAf,CAAA;AACD,CAFD,MAGK,IAAG,OAAOziE,IAAP,KAAgB,WAAnB,EAAgC;EACnCA,IAAI,CAACyiE,KAAL,GAAaA,OAAb,CAAA;AACD;;;;"}
\ No newline at end of file
diff --git a/index.js b/index.js
index b74433a72..174ee7db5 100644
--- a/index.js
+++ b/index.js
@@ -310,19 +310,29 @@
var STYLE2LOWER_MAP = {};
function style2Lower(s) {
- STYLE2LOWER_MAP[s] = STYLE2LOWER_MAP[s] || s.toLowerCase().replace(/_([a-z])/g, function ($0, $1) {
- return $1.toUpperCase();
- });
- return STYLE2LOWER_MAP[s];
+ var res = STYLE2LOWER_MAP[s];
+
+ if (!res) {
+ res = STYLE2LOWER_MAP[s] = s.toLowerCase().replace(/_([a-z])/g, function ($0, $1) {
+ return $1.toUpperCase();
+ });
+ }
+
+ return res;
}
var STYLE2UPPER_MAP = {};
function style2Upper$2(s) {
- STYLE2UPPER_MAP[s] = STYLE2UPPER_MAP[s] || s.replace(/([a-z\d_])([A-Z])/g, function ($0, $1, $2) {
- return $1 + '_' + $2;
- }).toUpperCase();
- return STYLE2UPPER_MAP[s];
+ var res = STYLE2UPPER_MAP[s];
+
+ if (!res) {
+ res = STYLE2UPPER_MAP[s] = s.replace(/([a-z\d_])([A-Z])/g, function ($0, $1, $2) {
+ return $1 + '_' + $2;
+ }).toUpperCase();
+ }
+
+ return res;
}
var STYLE_R_KEY = {};
@@ -1147,17 +1157,26 @@
function int2rgba$4(color) {
if (Array.isArray(color)) {
- if (color.length === 4) {
- color = color.map(function (c, i) {
- return i === 3 ? c : Math.floor(Math.max(0, c));
- });
- return 'rgba(' + joinArr$3(color, ',') + ')';
- } else if (color.length === 3) {
- color = color.map(function (c) {
- return Math.floor(c);
- });
- return 'rgba(' + joinArr$3(color, ',') + ',1)';
- }
+ if (color.length === 3 || color.length === 4) {
+ color[0] = Math.floor(Math.max(color[0], 0));
+ color[1] = Math.floor(Math.max(color[1], 0));
+ color[2] = Math.floor(Math.max(color[2], 0));
+
+ if (color.length === 4) {
+ color[3] = Math.max(color[3], 0);
+ return 'rgba(' + color[0] + ',' + color[1] + ',' + color[2] + ',' + color[3] + ')';
+ }
+
+ return 'rgba(' + color[0] + ',' + color[1] + ',' + color[2] + ',1)';
+ } // if(color.length === 4) {
+ // color = color.map((c, i) => i === 3 ? c : Math.floor(Math.max(0, c)));
+ // return 'rgba(' + joinArr(color, ',') + ')';
+ // }
+ // else if(color.length === 3) {
+ // color = color.map(c => Math.floor(c));
+ // return 'rgba(' + joinArr(color, ',') + ',1)';
+ // }
+
}
return color || 'rgba(0,0,0,0)';
@@ -14998,7 +15017,7 @@
REBUILD: 1024 // 10000000000
};
- var TRANSFORMS = (_TRANSFORMS = {}, _defineProperty(_TRANSFORMS, STYLE_KEY$1.SCALE_X, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.SCALE_Y, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.SCALE_Z, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.ROTATE_X, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.ROTATE_Y, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.ROTATE_Z, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.SKEW_X, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.SKEW_Y, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.ROTATE_3D, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.TRANSFORM, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.TRANSFORM_ORIGIN, true), _TRANSFORMS);
+ var TRANSFORMS = (_TRANSFORMS = {}, _defineProperty(_TRANSFORMS, STYLE_KEY$1.SCALE_X, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.SCALE_Y, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.SCALE_Z, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.ROTATE_X, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.ROTATE_Y, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.ROTATE_Z, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.SKEW_X, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.SKEW_Y, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.ROTATE_3D, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.TRANSFORM, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.TRANSFORM_ORIGIN, true), _defineProperty(_TRANSFORMS, STYLE_KEY$1.TRANSLATE_PATH, true), _TRANSFORMS);
var o$1 = Object.assign({
contain: function contain(lv, value) {
return (lv & value) > 0;
@@ -32420,8 +32439,18 @@
if (list2.length && onList.length) {
list2.forEach(function (item) {
onList.forEach(function (arr) {
+ var cb = function cb() {
+ var time = item.timestamp;
+
+ if (time !== _this.__lastTime[arr[0]]) {
+ _this.__lastTime[arr[0]] = time;
+ arr[1] && arr[1]();
+ }
+ };
+
+ cb.__karasEventCb = arr[1];
item.off(arr[0], arr[1]);
- item.on(arr[0], arr[1]);
+ item.on(arr[0], cb);
});
});
}
@@ -32597,7 +32626,7 @@
if (time !== _this2.__lastTime[id]) {
_this2.__lastTime[id] = time;
- handle();
+ handle && handle();
}
};
@@ -41895,7 +41924,7 @@
Cache: Cache
};
- var version = "0.78.1";
+ var version = "0.78.2";
Geom.register('$line', Line);
Geom.register('$polyline', Polyline);
diff --git a/index.js.map b/index.js.map
index ae2125503..839b78806 100644
--- a/index.js.map
+++ b/index.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.js","sources":["src/util/enums.js","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/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/Page.js","src/refresh/Cache.js","src/refresh/level.js","src/node/Text.js","src/util/flatten.js","src/util/builder.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/refresh/reflow.js","src/node/Dom.js","src/node/Img.js","src/node/Defs.js","src/node/geom/Geom.js","src/util/updater.js","src/util/diff.js","src/animate/Controller.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/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":["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 STYLE2LOWER_MAP[s] = STYLE2LOWER_MAP[s] || s.toLowerCase().replace(/_([a-z])/g, function($0, $1) {\n return $1.toUpperCase();\n });\n\n return STYLE2LOWER_MAP[s];\n}\n\nconst STYLE2UPPER_MAP = {};\nfunction style2Upper(s) {\n STYLE2UPPER_MAP[s] = STYLE2UPPER_MAP[s] || s.replace(/([a-z\\d_])([A-Z])/g, function($0, $1, $2) {\n return $1 + '_' + $2;\n }).toUpperCase();\n\n return STYLE2UPPER_MAP[s];\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\n// Root的update过程使用\nconst UPDATE_KEY = {\n UPDATE_NODE: 0,\n UPDATE_STYLE: 1,\n UPDATE_FOCUS: 2,\n UPDATE_COMPONENT: 3,\n UPDATE_OVERWRITE: 4,\n UPDATE_KEYS: 5,\n UPDATE_LIST: 6,\n UPDATE_CONFIG: 7,\n UPDATE_ADD_DOM: 8,\n UPDATE_REMOVE_DOM: 9,\n};\n\n// animation计算每帧使用\nconst KEY_FRAME_KEY = {\n FRAME_STYLE: 0,\n FRAME_TIME: 1,\n FRAME_EASING: 2,\n FRAME_TRANSITION: 3,\n};\n\n// 节点使用\nconst NODE_KEY = {\n NODE_DOM_PARENT: 0,\n NODE_OPACITY: 1,\n NODE_MATRIX: 2,\n NODE_MATRIX_EVENT: 3,\n NODE_CACHE: 4,\n NODE_CACHE_TOTAL: 5,\n NODE_CACHE_FILTER: 6,\n NODE_CACHE_MASK: 7,\n NODE_CACHE_OVERFLOW: 8,\n NODE_STRUCT: 9,\n NODE_TAG_NAME: 10,\n NODE_CURRENT_STYLE: 11,\n NODE_CURRENT_PROPS: 12,\n NODE_COMPUTED_STYLE: 13,\n NODE_CACHE_STYLE: 14,\n NODE_CACHE_PROPS: 15,\n NODE_LIMIT_CACHE: 16,\n NODE_IS_MASK: 17,\n NODE_IS_INLINE: 18,\n NODE_HAS_CONTENT: 19,\n NODE_REFRESH_LV: 20,\n NODE_IS_DESTROYED: 21,\n NODE_STYLE: 22,\n NODE_UPDATE_HASH: 23,\n NODE_UNIQUE_UPDATE_ID: 24,\n NODE_DEFS_CACHE: 25,\n NODE_PERSPECTIVE_MATRIX: 26,\n NODE_VIRTUAL_DOM: 27,\n NODE_CACHE_AS_BITMAP: 28,\n};\n\n// struct用\nconst STRUCT_KEY = {\n STRUCT_NODE: 0,\n STRUCT_INDEX: 1,\n STRUCT_CHILD_INDEX: 2,\n STRUCT_LV: 3,\n STRUCT_NUM: 4,\n STRUCT_TOTAL: 5,\n STRUCT_HAS_MASK: 6,\n};\n\nconst ANIMATE_KEY = {\n I_ASSIGNING: 0,\n I_IN_FPS: 1,\n I_IS_DELAY: 2,\n I_BEGIN: 3,\n I_END: 4,\n I_FINISHED: 5,\n I_NEXT_END: 6,\n I_FIRST_PLAY: 7,\n I_PLAY_CB: 8,\n I_TARGET: 9,\n I_ROOT: 10,\n I_FRAMES: 11,\n I_FRAMES_R: 12,\n I_CURRENT_TIME: 13,\n I_NEXT_TIME: 14,\n I_STYLE: 15,\n I_DURATION: 16,\n I_ITERATIONS: 17,\n I_FILL: 18,\n I_PLAYBACK_RATE: 19,\n I_PLAY_COUNT: 20,\n I_PLAY_STATE: 21,\n I_DESTROYED: 22,\n I_START_TIME: 23,\n I_FPS_TIME: 24,\n I_EASING: 25,\n I_ENTER_FRAME: 26,\n I_DELAY: 27,\n I_END_DELAY: 28,\n I_KEYS: 29,\n I_ORIGIN_STYLE: 30,\n I_CURRENT_FRAMES: 31,\n I_CURRENT_FRAME: 32,\n I_SPF_LIMIT: 33,\n I_FPS: 34,\n I_DIRECTION: 35,\n I_FIRST_ENTER: 36,\n I_STAY_BEGIN: 37,\n I_STAY_END: 38,\n I_IS2: 39,\n I_END_TIME: 40,\n I_NODE_CONFIG: 41,\n I_ROOT_CONFIG: 42,\n I_OUT_BEGIN_DELAY: 43,\n I_TIME_STAMP: 44,\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 UPDATE_KEY,\n KEY_FRAME_KEY,\n NODE_KEY,\n STRUCT_KEY,\n ANIMATE_KEY,\n ELLIPSIS: '…',\n};\n","import enums from '../util/enums';\n\nconst {\n STRUCT_KEY: {\n STRUCT_NODE,\n STRUCT_INDEX,\n STRUCT_CHILD_INDEX,\n STRUCT_LV,\n },\n NODE_KEY: {\n NODE_IS_DESTROYED,\n NODE_STRUCT,\n },\n} = enums;\n\nclass 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.__config = {};\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.__virtualDom = null;\n this.__bbox = null;\n this.__filterBbox = null;\n }\n\n __structure(i, lv, j) {\n return this.__config[NODE_STRUCT] = {\n [STRUCT_NODE]: this,\n [STRUCT_INDEX]: i,\n [STRUCT_CHILD_INDEX]: j,\n [STRUCT_LV]: lv,\n };\n }\n\n __modifyStruct(root, offset = 0) {\n let struct = this.__config[NODE_STRUCT];\n return [struct, 0];\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.__config[NODE_IS_DESTROYED] = 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.__config[NODE_IS_DESTROYED];\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","let o = {\n AUTO: 0,\n PX: 1,\n PERCENT: 2,\n NUMBER: 3,\n INHERIT: 4,\n DEG: 5,\n STRING: 6,\n RGBA: 7,\n REM: 8,\n EM: 9,\n VW: 10,\n VH: 11,\n VMAX: 12,\n VMIN: 13,\n GRADIENT: 14, // 特殊格式,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, o.PERCENT];\n }\n else if(/px$/i.test(v)) {\n return [n, o.PX];\n }\n else if(/deg$/i.test(v)) {\n return [n, o.DEG];\n }\n else if(/rem$/i.test(v)) {\n return [n, o.REM];\n }\n else if(/vw$/i.test(v)) {\n return [n, o.VW];\n }\n else if(/vh$/i.test(v)) {\n return [n, o.VH];\n }\n else if(/em$/i.test(v)) {\n return [n, o.EM];\n }\n else if(/vw$/i.test(v)) {\n return [n, o.VW];\n }\n else if(/vh$/i.test(v)) {\n return [n, o.VH];\n }\n else if(/vmax$/i.test(v)) {\n return [n, o.VMAX];\n }\n else if(/vmin$/i.test(v)) {\n return [n, o.VMIN];\n }\n return [n, o.NUMBER];\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(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 vd.defs.forEach(item => {\n s += joinDef(item);\n });\n s += '';\n vd.bb.forEach(item => {\n s += joinVd(item);\n });\n s += '';\n (vd.children || []).forEach(item => {\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 (vd.children || []).forEach(item => {\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 += '' + def.tagName + '>';\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 += '>' + item.tagName + '>';\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 === 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 extendAnimate(ovd, nvd) {\n let list = nvd.__animationList = ovd.animationList.splice(0);\n list.forEach(item => {\n item.__setTarget(nvd);\n // 事件队列的缘故,可能动画本帧刚执行过,然后再继承,就会缺失,需再次赋值一遍;也有可能停留最后\n if(item.assigning || item.finished && item.__stayEnd()) {\n item.assignCurrentStyle();\n }\n });\n // 帧动画继承\n nvd.__frameAnimateList = ovd.__frameAnimateList.splice(0);\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 extendAnimate,\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 draw() {\n // 空函数,仅对小程序提供hook特殊处理,flush缓冲\n },\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(/' + str.charAt(i).replace('<', '<').replace(/[ \\n]/, ' ') + '';\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();\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(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 canvas.draw();\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 canvas.draw();\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","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[0] > 0) {\n noRadius = false;\n }\n else {\n return 0;\n }\n if(item[1] === PX) {\n return Math.max(0, item[0]);\n }\n else if(item[1] === PERCENT) {\n return Math.max(0, item[0] * (i ? h : w) * 0.01);\n }\n else if(item[1] === REM) {\n return Math.max(0, item[0] * root.computedStyle[FONT_SIZE]);\n }\n else if(item[1] === VW) {\n return Math.max(0, item[0] * root.width * 0.01);\n }\n else if(item[1] === VH) {\n return Math.max(0, item[0] * root.height * 0.01);\n }\n else if(item[1] === VMAX) {\n return Math.max(0, item[0] * Math.max(root.width, root.height) * 0.01);\n }\n else if(item[1] === VMIN) {\n return Math.max(0, item[0] * 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[1] === PX) {\n v = Math.max(0, item[0]);\n v = Math.min(i ? h : w, v);\n }\n else {\n v = Math.max(0, item[0] * (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[1] === PX) {\n v = Math.max(0, item[0]);\n v = Math.min(i ? h : w, v);\n }\n else {\n v = Math.max(0, item[0] * (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[1]) > -1) {\n v[1] = PX;\n }\n return v;\n }\n else {\n return [\n {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[data] || 50,\n 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[1] === PERCENT) {\n list.push([item[0], p[0] * 0.01]);\n }\n else if(p[1] === REM) {\n list.push([item[0], p[0] * root.computedStyle[FONT_SIZE] / length]);\n }\n else if(p[1] === VW) {\n list.push([item[0], p[0] * root.width / length]);\n }\n else if(p[1] === VH) {\n list.push([item[0], p[0] * root.height / length]);\n }\n else if(p[1] === VMAX) {\n list.push([item[0], p[0] * Math.max(root.width, root.height) / length]);\n }\n else if(p[1] === VMIN) {\n list.push([item[0], p[0] * Math.min(root.width, root.height) / length]);\n }\n else {\n list.push([item[0], p[0] / 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[1] === PERCENT) {\n cx = x1 + positionX[0] * iw * 0.01;\n }\n else if(positionX[1] === REM) {\n cx = x1 + positionX[0] * root.computedStyle[FONT_SIZE];\n }\n else if(positionX[1] === VW) {\n cx = x1 + positionX[0] * root.width * 0.01;\n }\n else if(positionX[1] === VH) {\n cx = x1 + positionX[0] * root.height * 0.01;\n }\n else if(positionX[1] === VMAX) {\n cx = x1 + positionX[0] * Math.max(root.width, root.height) * 0.01;\n }\n else if(positionX[1] === VMIN) {\n cx = x1 + positionX[0] * Math.min(root.width, root.height) * 0.01;\n }\n else {\n cx = x1 + positionX[0];\n }\n if(positionY[1] === PERCENT) {\n cy = y1 + positionY[0] * ih * 0.01;\n }\n else if(positionY[1] === REM) {\n cy = y1 + positionY[0] * root.computedStyle[FONT_SIZE];\n }\n else if(positionY[1] === VW) {\n cy = y1 + positionY[0] * root.width * 0.01;\n }\n else if(positionY[1] === VH) {\n cy = y1 + positionY[0] * root.height * 0.01;\n }\n else if(positionY[1] === VH) {\n cy = y1 + positionY[0] * Math.max(root.width, root.height) * 0.01;\n }\n else if(positionY[1] === VH) {\n cy = y1 + positionY[0] * Math.min(root.width, root.height) * 0.01;\n }\n else {\n cy = y1 + positionY[0];\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 = [[50, PERCENT], [50, 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 = [[50, PERCENT], [50, 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[1]) > -1) {\n v[1] = 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 KEY_COLOR = [\n [STYLE_KEY.BACKGROUND_COLOR],\n [STYLE_KEY.BORDER_BOTTOM_COLOR],\n [STYLE_KEY.BORDER_LEFT_COLOR],\n [STYLE_KEY.BORDER_RIGHT_COLOR],\n [STYLE_KEY.BORDER_TOP_COLOR],\n [STYLE_KEY.COLOR], // 这2个特殊,新增GRADIENT渐变色\n [STYLE_KEY.TEXT_STROKE_COLOR],\n];\n\nconst KEY_LENGTH = [\n [STYLE_KEY.FONT_SIZE],\n [STYLE_KEY.BORDER_BOTTOM_WIDTH],\n [STYLE_KEY.BORDER_LEFT_WIDTH],\n [STYLE_KEY.BORDER_RIGHT_WIDTH],\n [STYLE_KEY.BORDER_TOP_WIDTH],\n [STYLE_KEY.LEFT],\n [STYLE_KEY.TOP],\n [STYLE_KEY.RIGHT],\n [STYLE_KEY.BOTTOM],\n [STYLE_KEY.FLEX_BASIS],\n [STYLE_KEY.WIDTH],\n [STYLE_KEY.HEIGHT],\n [STYLE_KEY.LINE_HEIGHT],\n [STYLE_KEY.MARGIN_BOTTOM],\n [STYLE_KEY.MARGIN_LEFT],\n [STYLE_KEY.MARGIN_TOP],\n [STYLE_KEY.MARGIN_RIGHT],\n [STYLE_KEY.PADDING_TOP],\n [STYLE_KEY.PADDING_RIGHT],\n [STYLE_KEY.PADDING_BOTTOM],\n [STYLE_KEY.PADDING_LEFT],\n [STYLE_KEY.STROKE_WIDTH],\n [STYLE_KEY.STROKE_MITERLIMIT],\n [STYLE_KEY.LETTER_SPACING],\n [STYLE_KEY.PERSPECTIVE],\n [STYLE_KEY.TEXT_STROKE_WIDTH],\n];\n\nconst KEY_GRADIENT = [\n [STYLE_KEY.BACKGROUND_IMAGE],\n [STYLE_KEY.FILL],\n [STYLE_KEY.STROKE],\n];\n\nconst KEY_RADIUS = [\n [STYLE_KEY.BORDER_TOP_LEFT_RADIUS],\n [STYLE_KEY.BORDER_TOP_RIGHT_RADIUS],\n [STYLE_KEY.BORDER_BOTTOM_RIGHT_RADIUS],\n [STYLE_KEY.BORDER_BOTTOM_LEFT_RADIUS],\n];\n\nconst COLOR_HASH = {};\nKEY_COLOR.forEach(k => {\n COLOR_HASH[k] = true;\n});\n\nconst LENGTH_HASH = {};\nKEY_LENGTH.forEach(k => {\n LENGTH_HASH[k] = true;\n});\n\nconst RADIUS_HASH = {};\nKEY_RADIUS.forEach(k => {\n RADIUS_HASH[k] = true;\n});\n\nconst GRADIENT_HASH = {};\nKEY_GRADIENT.forEach(k => {\n GRADIENT_HASH[k] = true;\n});\n\nconst GRADIENT_TYPE = {\n linear: true,\n radial: true,\n conic: true,\n};\n\nconst KEY_EXPAND = [\n [STYLE_KEY.TRANSLATE_X],\n [STYLE_KEY.TRANSLATE_Y],\n [STYLE_KEY.TRANSLATE_Z],\n [STYLE_KEY.SKEW_X],\n [STYLE_KEY.SKEW_Y],\n [STYLE_KEY.SCALE_X],\n [STYLE_KEY.SCALE_Y],\n [STYLE_KEY.SCALE_Z],\n [STYLE_KEY.ROTATE_X],\n [STYLE_KEY.ROTATE_Y],\n [STYLE_KEY.ROTATE_Z],\n];\n\nconst EXPAND_HASH = {};\nKEY_EXPAND.forEach(k => {\n EXPAND_HASH[k] = true;\n});\n\nexport default {\n KEY_COLOR,\n KEY_EXPAND,\n KEY_GRADIENT,\n KEY_LENGTH,\n KEY_RADIUS,\n COLOR_HASH,\n EXPAND_HASH,\n GRADIENT_HASH,\n LENGTH_HASH,\n RADIUS_HASH,\n GRADIENT_TYPE,\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;\n\nconst GEOM = {};\nconst GEOM_KEY_SET = [];\nconst IGNORE = {\n [STYLE_KEY.POINTER_EVENTS]: true,\n};\nconst REPAINT = {\n [STYLE_KEY.TRANSFORM]: true,\n [STYLE_KEY.TRANSLATE_X]: true,\n [STYLE_KEY.TRANSLATE_Y]: true,\n [STYLE_KEY.SKEW_X]: true,\n [STYLE_KEY.SKEW_Y]: true,\n [STYLE_KEY.SCALE_X]: true,\n [STYLE_KEY.SCALE_Y]: true,\n [STYLE_KEY.ROTATE_Z]: true,\n [STYLE_KEY.COLOR]: true,\n [STYLE_KEY.FONT_STYLE]: true,\n [STYLE_KEY.STROKE_WIDTH]: true,\n [STYLE_KEY.FILL]: true,\n [STYLE_KEY.STROKE_DASHARRAY]: true,\n [STYLE_KEY.STROKE_LINECAP]: true,\n [STYLE_KEY.STROKE_LINEJOIN]: true,\n [STYLE_KEY.STROKE_MITERLIMIT]: true,\n [STYLE_KEY.BACKGROUND_COLOR]: true,\n [STYLE_KEY.BACKGROUND_IMAGE]: true,\n [STYLE_KEY.BACKGROUND_POSITION_X]: true,\n [STYLE_KEY.BACKGROUND_POSITION_Y]: true,\n [STYLE_KEY.BACKGROUND_REPEAT]: true,\n [STYLE_KEY.BACKGROUND_SIZE]: true,\n [STYLE_KEY.STROKE]: true,\n [STYLE_KEY.BORDER_BOTTOM_COLOR]: true,\n [STYLE_KEY.BORDER_LEFT_COLOR]: true,\n [STYLE_KEY.BORDER_RIGHT_COLOR]: true,\n [STYLE_KEY.BORDER_TOP_COLOR]: true,\n [STYLE_KEY.BORDER_TOP_LEFT_RADIUS]: true,\n [STYLE_KEY.BORDER_TOP_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_LEFT_RADIUS]: true,\n [STYLE_KEY.VISIBILITY]: true,\n [STYLE_KEY.OPACITY]: true,\n [STYLE_KEY.Z_INDEX]: true,\n [STYLE_KEY.FILTER]: true,\n [STYLE_KEY.BOX_SHADOW]: true,\n [STYLE_KEY.OVERFLOW]: true,\n [STYLE_KEY.BACKGROUND_CLIP]: true,\n [STYLE_KEY.TEXT_STROKE_WIDTH]: true,\n [STYLE_KEY.TEXT_STROKE_COLOR]: true,\n [STYLE_KEY.TEXT_STROKE_OVER]: true,\n};\n\nlet o = {\n GEOM,\n GEOM_KEY_SET,\n IGNORE,\n REPAINT,\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 IGNORE.hasOwnProperty(k);\n },\n isGeom(tagName, k) {\n return tagName && k && GEOM.hasOwnProperty(k) && GEOM[k].hasOwnProperty(tagName);\n },\n isRepaint(k, tagName) {\n return REPAINT.hasOwnProperty(k) || 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 DISPLAY,\n FLEX_DIRECTION,\n FLEX_GROW,\n FLEX_SHRINK,\n FLEX_BASIS,\n JUSTIFY_CONTENT,\n ALIGN_SELF,\n ALIGN_ITEMS,\n MATRIX,\n LETTER_SPACING,\n BACKGROUND_CLIP,\n WHITE_SPACE,\n TEXT_OVERFLOW,\n LINE_CLAMP,\n ORDER,\n FLEX_WRAP,\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 COLOR_HASH,\n LENGTH_HASH,\n RADIUS_HASH,\n GRADIENT_HASH,\n EXPAND_HASH,\n GRADIENT_TYPE,\n} = key;\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[1] = NUMBER;\n }\n else if(k === TRANSLATE_X || k === TRANSLATE_Y || k === TRANSLATE_Z) {\n if(arr[1] === NUMBER) {\n arr[1] = PX;\n }\n }\n else if(k === PERSPECTIVE) {\n if([NUMBER, PERCENT, DEG].indexOf(arr[1]) > -1) {\n arr[1] = PX;\n }\n }\n else {\n if(arr[1] === NUMBER) {\n arr[1] = 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] = [null];\n }\n else if(Array.isArray(temp)) {\n res[BACKGROUND_IMAGE] = temp.map(item => {\n if(!item) {\n return null;\n }\n if(reg.gradient.test(item)) {\n return [gradient.parseGradient(item), GRADIENT];\n }\n if(reg.img.test(item)) {\n return [reg.img.exec(item)[2], STRING];\n }\n return null;\n });\n }\n // 区分是渐变色还是图\n else if(reg.gradient.test(temp)) {\n res[BACKGROUND_IMAGE] = [[gradient.parseGradient(temp), GRADIENT]];\n }\n else if(reg.img.test(temp)) {\n res[BACKGROUND_IMAGE] = [[reg.img.exec(temp)[2], STRING]];\n }\n else {\n res[BACKGROUND_IMAGE] = [null];\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] = [rgba2int(bgc[0]), RGBA];\n }\n else {\n bgc = /rgba?\\s*\\(.+\\)/i.exec(temp);\n res[BACKGROUND_COLOR] = [rgba2int(bgc ? bgc[0] : [0, 0, 0, 0]), 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[1]) > -1) {\n v[1] = PX;\n }\n return v;\n }\n else {\n return [\n {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[item] || 0,\n 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 [0, AUTO],\n [0, 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[1]) > -1) {\n n[1] = PX;\n }\n v.push(n);\n }\n else if(item === 'contain' || item === 'cover') {\n v.push([item, STRING]);\n }\n else {\n v.push([0, AUTO]);\n }\n }\n return v;\n }\n else {\n return [\n [0, AUTO],\n [0, 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)]] = [rgba2int(v || 'transparent'), 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[1]) > -1) {\n n[1] = PX;\n }\n if(n[0] < 0) {\n n[0] = 0;\n }\n arr[i] = n;\n }\n else {\n arr[i] = [0, PX];\n }\n }\n res[STYLE_KEY[style2Upper(k)]] = arr;\n }\n });\n temp = style.transform;\n if(temp === null) {\n res[TRANSFORM] = null;\n }\n else 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([MATRIX, [\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([MATRIX, arr]);\n }\n }\n else if(k === 'perspective') {\n let arr = calUnit(v);\n if(arr[0] < 0) {\n arr[0] = 0;\n }\n compatibleTransform(PERSPECTIVE, arr);\n transform.push([PERSPECTIVE, 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([ROTATE_3D, 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([k2, 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([k1, arr1]);\n transform.push([k2, 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([k1, arr1]);\n transform.push([k2, arr2]);\n transform.push([k3, arr3]);\n }\n }\n });\n }\n }\n temp = style.perspective;\n if(temp !== undefined) {\n let arr = calUnit(temp || 0);\n if(arr[0] < 0) {\n arr[0] = 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[1]) > -1) {\n n[1] = PX;\n }\n arr.push(n);\n }\n else {\n arr.push([\n {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[item],\n PERCENT,\n ]);\n // 不规范的写法变默认值50%\n if(isNil(arr[i][0])) {\n arr[i][0] = 50;\n }\n }\n }\n }\n else {\n arr.push([50, PERCENT]);\n arr.push([50, 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 = [0, AUTO];\n }\n else {\n v = calUnit(v || 0);\n // 无单位视为px\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = 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[0] < 0) {\n v[0] = 0;\n }\n });\n temp = style.flexBasis;\n if(temp !== undefined) {\n if(/content/i.test(temp)) {\n res[FLEX_BASIS] = [temp, STRING];\n }\n else if(/^[\\d.]/.test(temp)) {\n let v = res[FLEX_BASIS] = calUnit(temp);\n v[0] = Math.max(v[0], 0);\n // 无单位视为px\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n }\n else {\n res[FLEX_BASIS] = [0, 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] = [[], INHERIT];\n }\n else if(reg.gradient.test(temp)) {\n res[COLOR] = [gradient.parseGradient(temp), GRADIENT];\n }\n else {\n res[COLOR] = [rgba2int(temp), RGBA];\n }\n }\n temp = style.textStrokeColor;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[TEXT_STROKE_COLOR] = [[], INHERIT];\n }\n else if(reg.gradient.test(temp)) {\n res[TEXT_STROKE_COLOR] = [gradient.parseGradient(temp), GRADIENT];\n }\n else {\n res[TEXT_STROKE_COLOR] = [rgba2int(temp), RGBA];\n }\n }\n temp = style.fontSize;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[FONT_SIZE] = [0, INHERIT];\n }\n else {\n let v = calUnit(temp);\n // fontSize不能为负数,否则为继承\n if(v < 0) {\n res[FONT_SIZE] = [0, INHERIT];\n }\n else {\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = 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] = [0, INHERIT];\n }\n else {\n let v = calUnit(temp);\n // textStrokeWidth不能为负数,否则为继承\n if(v < 0) {\n res[TEXT_STROKE_WIDTH] = [0, INHERIT];\n }\n else {\n if([NUMBER, DEG, PERCENT].indexOf(v[1]) > -1) {\n v[1] = 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] = [0, 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, STRING];\n }\n }\n temp = style.fontWeight;\n if(temp !== undefined) {\n if(/bold/i.test(temp)) {\n res[FONT_WEIGHT] = [700, NUMBER];\n }\n else if(/normal/i.test(temp)) {\n res[FONT_WEIGHT] = [400, NUMBER];\n }\n else if(/lighter/i.test(temp)) {\n res[FONT_WEIGHT] = [200, NUMBER];\n }\n else if(/inherit/i.test(temp)) {\n res[FONT_WEIGHT] = [0, INHERIT];\n }\n else {\n res[FONT_WEIGHT] = [Math.max(0, parseInt(temp)) || 400, NUMBER];\n }\n }\n temp = style.fontStyle;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[FONT_STYLE] = [0, 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, STRING];\n }\n }\n temp = style.fontFamily;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[FONT_FAMILY] = [0, INHERIT];\n }\n else {\n // 统一文字声明格式\n res[FONT_FAMILY] = [temp.toString().toLowerCase().replace(/['\"]/, '').replace(/\\s*,\\s*/g, ','), STRING];\n }\n }\n temp = style.writingMode;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[WRITING_MODE] = [0, 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, STRING];\n }\n }\n temp = style.textAlign;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[TEXT_ALIGN] = [0, 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, STRING];\n }\n }\n temp = style.lineHeight;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[LINE_HEIGHT] = [0, INHERIT];\n }\n else if(/normal/i.test(temp)) {\n res[LINE_HEIGHT] = [0, AUTO];\n }\n // lineHeight默认数字,想要px必须强制带单位\n else if(/^[\\d.]+/i.test(temp)) {\n let v = calUnit(temp);\n if([DEG].indexOf(v[1]) > -1) {\n v[1] = 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] = [null, AUTO];\n }\n else {\n res[LINE_HEIGHT] = [n, NUMBER];\n }\n }\n }\n temp = style.letterSpacing;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[LETTER_SPACING] = [0, INHERIT];\n }\n else if(/normal/i.test(temp)) {\n res[LETTER_SPACING] = [0, PX];\n }\n else if(/^[-+]?[\\d.]/.test(temp)) {\n let v = calUnit(temp);\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n res[LETTER_SPACING] = v;\n }\n else {\n res[LETTER_SPACING] = [parseFloat(temp) || 0, PX];\n }\n }\n temp = style.whiteSpace;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[WHITE_SPACE] = [0, INHERIT];\n }\n else {\n res[WHITE_SPACE] = [temp, 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 temp = style.fill;\n if(temp !== undefined) {\n if(!temp) {\n res[FILL] = [['none', STRING]];\n }\n else if(Array.isArray(temp)) {\n if(temp.length) {\n res[FILL] = temp.map(item => {\n if(!item) {\n return ['none', STRING];\n }\n else if(reg.gradient.test(item)) {\n return [gradient.parseGradient(item), GRADIENT];\n }\n else {\n return [rgba2int(item), RGBA];\n }\n });\n }\n else {\n res[FILL] = [['none', STRING]];\n }\n }\n else if(reg.gradient.test(temp)) {\n res[FILL] = [[gradient.parseGradient(temp), GRADIENT]];\n }\n else {\n res[FILL] = [[rgba2int(temp), RGBA]];\n }\n }\n temp = style.stroke;\n if(temp !== undefined) {\n if(!temp) {\n res[STROKE] = [['none', STRING]];\n }\n else if(Array.isArray(temp)) {\n if(temp.length) {\n res[STROKE] = temp.map(item => {\n if(!item) {\n return ['none', STRING];\n }\n else if(reg.gradient.test(item)) {\n return [gradient.parseGradient(item), GRADIENT];\n }\n else {\n return [rgba2int(item), RGBA];\n }\n });\n }\n else {\n res[STROKE] = [['none', STRING]];\n }\n }\n else if(reg.gradient.test(temp)) {\n res[STROKE] = [[gradient.parseGradient(temp), GRADIENT]];\n }\n else {\n res[STROKE] = [[rgba2int(temp), RGBA]];\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[1]) > -1) {\n v[1] = PX;\n }\n v[0] = Math.max(v[0], 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 = null;\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 f = f || [];\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[1]) > -1) {\n v[1] = PX;\n }\n // x/y可以负,blur和spread不行\n if(i > 2 && v[0] < 0) {\n v = 0;\n }\n res.push(v);\n }\n else {\n res.push([0, 1]);\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(['dropShadow', res]);\n }\n }\n else {\n let m2 = /([-+]?[\\d.]+\\s*[pxremvwhdg%]*)/i.exec(v);\n if(m2) {\n f = f || [];\n let v = calUnit(m2[0]);\n if(k === 'blur') {\n if([DEG, PERCENT].indexOf(v[1]) > -1) {\n return;\n }\n if(v[1] === NUMBER) {\n v[1] = PX;\n }\n v[0] = Math.max(v[0], 0);\n f.push([k, v]);\n }\n else if(k === 'hue-rotate' || k === 'huerotate') {\n if([NUMBER, DEG].indexOf(v[1]) === -1) {\n return;\n }\n v[1] = DEG;\n f.push(['hueRotate', v]);\n }\n else if(k === 'saturate' || k === 'brightness' || k === 'grayscale' || k === 'contrast' || k === 'sepia' || k === 'invert') {\n if([NUMBER, PERCENT].indexOf(v[1]) === -1) {\n return;\n }\n v[0] = Math.max(v[0], 0);\n v[1] = 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] = [0, INHERIT];\n }\n else {\n let v = reset.INHERIT.visibility;\n if(/hidden/i.test(temp)) {\n v = 'hidden';\n }\n res[VISIBILITY] = [v, STRING];\n }\n }\n temp = style.pointerEvents;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[POINTER_EVENTS] = [0, 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, STRING];\n }\n }\n temp = style.boxShadow;\n if(temp !== undefined) {\n let bs = null;\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 bs = bs || [];\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[1]) > -1) {\n v[1] = PX;\n }\n // x/y可以负,blur和spread不行\n if(i > 2 && v[0] < 0) {\n v = 0;\n }\n res.push(v);\n }\n else {\n res.push([0, 1]);\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[1] === AUTO) {\n if(k === WIDTH) {\n parent = parent.domParent;\n }\n else {\n break;\n }\n }\n else if(style[1] === PX) {\n return n * style[0];\n }\n else if(style[1] === PERCENT) {\n n *= style[0] * 0.01;\n parent = parent.domParent;\n }\n else if(style[1] === REM) {\n return n * style[0] * parent.root.computedStyle[FONT_SIZE];\n }\n else if(style[1] === VW) {\n return n * style[0] * parent.root.width * 0.01;\n }\n else if(style[1] === VH) {\n return n * style[0] * parent.root.height * 0.01;\n }\n else if(style[1] === VMAX) {\n return n * style[0] * Math.max(parent.root.width, parent.root.height) * 0.01;\n }\n else if(style[1] === VMIN) {\n return n * style[0] * 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[1] === AUTO) {\n v = 0;\n }\n else if([PX, NUMBER].indexOf(v[1]) > -1) {\n v = v[0];\n }\n else if(v[1] === PERCENT) {\n if(isWidth) {\n v = calRelativePercent(v[0], parent, WIDTH);\n }\n else {\n v = calRelativePercent(v[0], parent, HEIGHT);\n }\n }\n else if(v[1] === REM) {\n v = v[0] * parent.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * parent.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * parent.root.height * 0.01;\n }\n else if(v[1] === VMAX) {\n v = v[0] * Math.max(parent.root.width, parent.root.height) * 0.01;\n }\n else if(v[1] === VMIN) {\n v = v[0] * Math.min(parent.root.width, parent.root.height) * 0.01;\n }\n return v;\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[0] !== ob[0]) {\n return false;\n }\n // translate/matrix等都是数组\n if(!equalArr(oa[1], ob[1])) {\n return false;\n }\n }\n return true;\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 === BACKGROUND_SIZE) {\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][0] !== bb[0][0] || aa[0][1] !== bb[0][1] || aa[1][0] !== bb[1][0] || aa[1][1] !== bb[1][1]) {\n return false;\n }\n }\n return true;\n }\n if(k === TRANSFORM_ORIGIN || RADIUS_HASH.hasOwnProperty(k)) {\n return a[0][0] === b[0][0] && a[0][1] === b[0][1]\n && a[1][0] === b[1][0] && a[1][1] === b[1][1];\n }\n if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y\n || LENGTH_HASH.hasOwnProperty(k) || EXPAND_HASH.hasOwnProperty(k)) {\n return a[0] === b[0] && a[1] === b[1];\n }\n if(k === BOX_SHADOW) {\n return equalArr(a, b);\n }\n // color等是rgba颜色时\n if(k === COLOR || k === TEXT_STROKE_COLOR) {\n if(a[1] !== b[1]) {\n return false;\n }\n if(a[1] === RGBA) {\n return equalArr(a[0], b[0]);\n }\n else {}\n }\n if(COLOR_HASH.hasOwnProperty(k)) {\n return a[1] === b[1] && equalArr(a[0], b[0]);\n }\n // color/fill等是gradient时\n if(GRADIENT_HASH.hasOwnProperty(k) && a.k === b.k && GRADIENT_TYPE.hasOwnProperty(a.k)) {\n let av = a.v;\n let bv = b.v;\n if(a.d !== b.d || av.length !== bv.length) {\n return false;\n }\n for(let i = 0, len = av.length; i < len; i++) {\n let ai = av[i];\n let bi = bv[i];\n if(ai.length !== bi.length) {\n return false;\n }\n for(let j = 0; j < 4; j++) {\n if(ai[0][j] !== bi[0][j]) {\n return false;\n }\n }\n if(ai.length > 1) {\n if(ai[1][0] !== bi[1][0] || ai[1][1] !== bi[1][1]) {\n return false;\n }\n }\n }\n return true;\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 isRelativeOrAbsolute(node) {\n let position = node.currentStyle[POSITION];\n return position === 'relative' || position === 'absolute';\n}\n\nconst VALUE = {\n [POSITION]: true,\n [DISPLAY]: true,\n [STYLE_KEY.BACKGROUND_REPEAT]: true,\n [FLEX_DIRECTION]: true,\n [FLEX_GROW]: true,\n [FLEX_SHRINK]: true,\n [FLEX_WRAP]: true,\n [JUSTIFY_CONTENT]: true,\n [ALIGN_ITEMS]: true,\n [ALIGN_SELF]: true,\n [STYLE_KEY.OVERFLOW]: true,\n [STYLE_KEY.MIX_BLEND_MODE]: true,\n [STYLE_KEY.STROKE_LINECAP]: true,\n [STYLE_KEY.STROKE_LINEJOIN]: true,\n [STYLE_KEY.STROKE_MITERLIMIT]: true,\n [STYLE_KEY.FILL_RULE]: true,\n [OPACITY]: true,\n [Z_INDEX]: true,\n [BACKGROUND_CLIP]: true,\n [TEXT_OVERFLOW]: true,\n [LINE_CLAMP]: true,\n};\n// 仅1维数组\nconst ARRAY_0 = {\n [BACKGROUND_COLOR]: true,\n [STYLE_KEY.BORDER_TOP_COLOR]: true,\n [STYLE_KEY.BORDER_RIGHT_COLOR]: true,\n [STYLE_KEY.BORDER_BOTTOM_COLOR]: true,\n [STYLE_KEY.BORDER_LEFT_COLOR]: true,\n};\n// 仅2维数组且只有2个值\nconst ARRAY_0_1 = {\n [STYLE_KEY.BORDER_TOP_LEFT_RADIUS]: true,\n [STYLE_KEY.BORDER_TOP_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_LEFT_RADIUS]: true,\n [TRANSFORM_ORIGIN]: true,\n [PERSPECTIVE_ORIGIN]: true,\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 // 渐变特殊处理\n if(k === BACKGROUND_IMAGE) {\n res[k] = v.map(item => {\n if(item[1] === GRADIENT) {\n return [util.clone(item[0]), item[1]];\n }\n else {\n return item;\n }\n });\n }\n else if(k === FILL || k === STROKE) {\n res[k] = v.map(item => {\n // 渐变可能非法为空\n if(item[1] === GRADIENT) {\n return [util.clone(item[0]), item[1]];\n }\n // 颜色\n else if(item[1] === RGBA) {\n return [item[0].slice(0), item[1]];\n }\n // none\n else {\n return item;\n }\n });\n }\n else if(k === TRANSFORM) {\n if(v) {\n let n = v.slice(0);\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n n[i][1] = n[i][1].slice(0);\n }\n res[k] = n;\n }\n }\n else if(k === FILTER) {\n if(v) {\n let n = v.slice(0);\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n let k = n[i][0];\n n[i][1] = n[i][1].slice(0);\n if(k === 'dropShadow') {\n let temp = n[i][1];\n temp.forEach((item, j) => {\n temp[j] = temp[j].slice(0);\n });\n }\n }\n res[k] = n;\n }\n }\n else if(k === BOX_SHADOW) {\n if(v) {\n v = v.map(item => {\n let n = item.slice(0);\n n[4] = n[4].slice(0);\n return n;\n });\n res[k] = v;\n }\n }\n else if(k === TRANSLATE_PATH) {\n if(v) {\n res[k] = v.map(item => item.slice(0));\n }\n }\n else if(k === COLOR || k === TEXT_STROKE_COLOR) {\n if(v) {\n if(v[1] === GRADIENT) {\n res[k] = [util.clone(v[0]), v[1]];\n }\n else if(v[1] === RGBA) {\n res[k] = [v[0].slice(0), v[1]];\n }\n // inherit\n else {\n res[k] = v.slice(0);\n }\n }\n }\n // position等直接值类型赋值\n else if(VALUE.hasOwnProperty(k)) {\n res[k] = v;\n }\n // geom自定义属性\n else if(GEOM.hasOwnProperty(k)) {\n res[k] = util.clone(v);\n }\n // 其余皆是数组或空,默认是一维数组只需slice即可\n else if(v) {\n let n = res[k] = v.slice(0);\n // 特殊引用里数组某项再次clone\n if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n }\n }\n else if(k === BACKGROUND_SIZE) {\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n n[i][0] = n[i][0].slice(0);\n n[i][1] = n[i][1].slice(0);\n }\n }\n else if(ARRAY_0.hasOwnProperty(k)) {\n n[0] = n[0].slice(0);\n }\n else if(ARRAY_0_1.hasOwnProperty(k)) {\n n[0] = n[0].slice(0);\n n[1] = n[1].slice(0);\n }\n else if(k === TRANSFORM) {\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n }\n }\n else if(k === ROTATE_3D) {\n n[3] = n[3].slice(0);\n }\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 { PX, 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[0]);\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 [k, v] = item;\n let t = identity();\n calSingle(t, k, 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[1] === PERCENT) {\n return v[0] * ow * 0.01;\n }\n else if(v[1] === REM) {\n return v[0] * root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n return v[0] * root.width * 0.01;\n }\n else if(v[1] === VH) {\n return v[0] * root.height * 0.01;\n }\n else if(v[1] === VMAX) {\n return v[0] * Math.max(root.width, root.height) * 0.01;\n }\n else if(v[1] === VMIN) {\n return v[0] * Math.min(root.width, root.height) * 0.01;\n }\n }\n else if(k === TRANSLATE_Y) {\n if(v[1] === PERCENT) {\n return v[0] * oh * 0.01;\n }\n else if(v[1] === REM) {\n return v[0] * root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n return v[0] * root.width * 0.01;\n }\n else if(v[1] === VH) {\n return v[0] * root.height * 0.01;\n }\n else if(v[1] === VMAX) {\n return v[0] * Math.max(root.width, root.height) * 0.01;\n }\n else if(v[1] === VMIN) {\n return v[0] * 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[0];\n}\n\nfunction normalize(transform, ow, oh, root) {\n let res = [];\n transform.forEach(item => {\n let [k, v] = item;\n res.push([k, normalizeSingle(k, v, ow, oh, root)]);\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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\u{FFE7}\\u{FFF0}-\\u{FFF8}\\u{FFFC}-\\u{FFFD}\\u{10980}-\\u{1099F}\\u{11580}-\\u{115AE}\\u{115AF}-\\u{115B1}\\u{115B2}-\\u{115B5}\\u{115B6}-\\u{115B7}\\u{115B8}-\\u{115BB}\\u{115BC}-\\u{115BD}\\u{115BE}\\u{115BF}-\\u{115C0}\\u{115C1}-\\u{115D7}\\u{115D8}-\\u{115DB}\\u{115DC}-\\u{115DD}\\u{115DE}-\\u{115FF}\\u{11A00}\\u{11A01}-\\u{11A0A}\\u{11A0B}-\\u{11A32}\\u{11A33}-\\u{11A38}\\u{11A39}\\u{11A3A}\\u{11A3B}-\\u{11A3E}\\u{11A3F}-\\u{11A46}\\u{11A47}\\u{11A48}-\\u{11A4F}\\u{11A50}\\u{11A51}-\\u{11A56}\\u{11A57}-\\u{11A58}\\u{11A59}-\\u{11A5B}\\u{11A5C}-\\u{11A89}\\u{11A8A}-\\u{11A96}\\u{11A97}\\u{11A98}-\\u{11A99}\\u{11A9A}-\\u{11A9C}\\u{11A9D}\\u{11A9E}-\\u{11AA2}\\u{11AA3}-\\u{11AAF}\\u{11AB0}-\\u{11ABF}\\u{13000}-\\u{1342E}\\u{1342F}\\u{13430}-\\u{13438}\\u{13439}-\\u{1343F}\\u{14400}-\\u{14646}\\u{14647}-\\u{1467F}\\u{16FE0}-\\u{16FE1}\\u{16FE2}\\u{16FE3}\\u{16FE4}\\u{16FE5}-\\u{16FEF}\\u{16FF0}-\\u{16FF1}\\u{16FF2}-\\u{16FFF}\\u{17000}-\\u{187F7}\\u{187F8}-\\u{187FF}\\u{18800}-\\u{18AFF}\\u{18B00}-\\u{18CD5}\\u{18CD6}-\\u{18CFF}\\u{18D00}-\\u{18D08}\\u{18D09}-\\u{18D7F}\\u{1AFF0}-\\u{1AFF3}\\u{1AFF4}\\u{1AFF5}-\\u{1AFFB}\\u{1AFFC}\\u{1AFFD}-\\u{1AFFE}\\u{1AFFF}\\u{1B000}-\\u{1B0FF}\\u{1B100}-\\u{1B122}\\u{1B123}-\\u{1B12F}\\u{1B130}-\\u{1B14F}\\u{1B150}-\\u{1B152}\\u{1B153}-\\u{1B163}\\u{1B164}-\\u{1B167}\\u{1B168}-\\u{1B16F}\\u{1B170}-\\u{1B2FB}\\u{1B2FC}-\\u{1B2FF}\\u{1CF00}-\\u{1CF2D}\\u{1CF2E}-\\u{1CF2F}\\u{1CF30}-\\u{1CF46}\\u{1CF47}-\\u{1CF4F}\\u{1CF50}-\\u{1CFC3}\\u{1CFC4}-\\u{1CFCF}\\u{1D000}-\\u{1D0F5}\\u{1D0F6}-\\u{1D0FF}\\u{1D100}-\\u{1D126}\\u{1D127}-\\u{1D128}\\u{1D129}-\\u{1D164}\\u{1D165}-\\u{1D166}\\u{1D167}-\\u{1D169}\\u{1D16A}-\\u{1D16C}\\u{1D16D}-\\u{1D172}\\u{1D173}-\\u{1D17A}\\u{1D17B}-\\u{1D182}\\u{1D183}-\\u{1D184}\\u{1D185}-\\u{1D18B}\\u{1D18C}-\\u{1D1A9}\\u{1D1AA}-\\u{1D1AD}\\u{1D1AE}-\\u{1D1EA}\\u{1D1EB}-\\u{1D1FF}\\u{1D2E0}-\\u{1D2F3}\\u{1D2F4}-\\u{1D2FF}\\u{1D300}-\\u{1D356}\\u{1D357}-\\u{1D35F}\\u{1D360}-\\u{1D378}\\u{1D379}-\\u{1D37F}\\u{1D800}-\\u{1D9FF}\\u{1DA00}-\\u{1DA36}\\u{1DA37}-\\u{1DA3A}\\u{1DA3B}-\\u{1DA6C}\\u{1DA6D}-\\u{1DA74}\\u{1DA75}\\u{1DA76}-\\u{1DA83}\\u{1DA84}\\u{1DA85}-\\u{1DA86}\\u{1DA87}-\\u{1DA8B}\\u{1DA8C}-\\u{1DA9A}\\u{1DA9B}-\\u{1DA9F}\\u{1DAA0}\\u{1DAA1}-\\u{1DAAF}\\u{1F000}-\\u{1F02B}\\u{1F02C}-\\u{1F02F}\\u{1F030}-\\u{1F093}\\u{1F094}-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}\\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.parent;\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 [ROTATE_Z, [90, 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 NODE_KEY: {\n NODE_VIRTUAL_DOM,\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, lv, ctx, cache, 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 [ROTATE_Z, [90, 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.__config[NODE_VIRTUAL_DOM] = 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 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;\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 this.__isNew = true;\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 this.__isNew = true;\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 resetBbox(bbox) {}\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 get isNew() {\n return this.__isNew;\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, draw()}}\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.draw();\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, cb) {\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[0] += x + dbx + node.__sx1 - target.sx1;\n tfo[1] += y + dby + node.__sy1 - target.sy1;\n let inverse = tf.calMatrixByOrigin(transform, tfo);\n // 先将mask本身绘制到cache上,再设置模式绘制dom本身,因为都是img所以1个就够了\n list.forEach(item => {\n cb(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 cacheMask.draw(ctx);\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 cacheOverflow.draw(ctx);\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, transform, matrix, tfo, parentMatrix, inverse) {\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 if(transform && matrix && tfo) {\n tfo[0] += ox;\n tfo[1] += oy;\n let m = tf.calMatrixByOrigin(transform, tfo);\n matrix = mx.multiply(matrix, m);\n if(!mx.isE(parentMatrix)) {\n matrix = mx.multiply(parentMatrix, matrix);\n }\n if(inverse) {\n // 很多情况mask和target相同matrix,可简化计算\n if(util.equalArr(matrix, inverse)) {\n matrix = mx.identity();\n }\n else {\n inverse = mx.inverse(inverse);\n matrix = mx.multiply(inverse, matrix);\n }\n }\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n }\n ctx.drawImage(canvas, x, y, width, height, ox, oy, width, height);\n }\n\n static draw(ctx, opacity, matrix, cache) {\n ctx.globalAlpha = opacity;\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n let { x, y, canvas, sx1, sy1, dbx, dby, width, height } = cache;\n ctx.drawImage(canvas, x, y, width, height, sx1 - dbx, sy1 - dby, 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 static NA = 0; // 无缓存模式\n static LOCAL = 1; // 局部根节点\n static CHILD = 2; // 其子节点\n static SELF = 3; // webgl专用\n}\n\nexport default Cache;\n","import change from './change';\nimport enums from '../util/enums';\n\nconst { STYLE_KEY, STYLE_KEY: {\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n OPACITY,\n FILTER,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n} } = enums;\n\nconst ENUM = {\n // 低位表示 0;\n },\n /**\n * 得出等级\n * @param k\n * @returns {number|*}\n */\n getLevel(k) {\n if(change.isIgnore(k)) {\n return ENUM.NONE;\n }\n if(k === TRANSLATE_X) {\n return ENUM.TRANSLATE_X;\n }\n else if(k === TRANSLATE_Y) {\n return ENUM.TRANSLATE_Y;\n }\n else if(k === TRANSLATE_Z) {\n return ENUM.TRANSLATE_Z;\n }\n else if(TRANSFORMS.hasOwnProperty(k)) {\n return ENUM.TRANSFORM;\n }\n else if(k === OPACITY) {\n return ENUM.OPACITY;\n }\n else if(k === FILTER) {\n return ENUM.FILTER;\n }\n else if(k === PERSPECTIVE || k === PERSPECTIVE_ORIGIN) {\n return ENUM.PERSPECTIVE;\n }\n else if(change.isRepaint(k)) {\n return ENUM.REPAINT;\n }\n return ENUM.REFLOW;\n },\n isReflow(lv) {\n return !this.isRepaint(lv);\n },\n isRepaint(lv) {\n return lv < ENUM.REFLOW;\n },\n isRebuild(lv) {\n return lv >= ENUM.REBUILD;\n },\n}, ENUM);\no.TRANSFORMS = TRANSFORMS;\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 Cache from '../refresh/Cache';\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 NODE_KEY: {\n NODE_CACHE,\n NODE_LIMIT_CACHE,\n NODE_DOM_PARENT,\n NODE_MATRIX_EVENT,\n NODE_OPACITY,\n NODE_VIRTUAL_DOM,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_FOCUS,\n UPDATE_CONFIG,\n },\n ELLIPSIS,\n} = enums;\n\nconst { AUTO } = unit;\nconst { CANVAS, SVG, WEBGL } = mode;\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 }\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 __layout(data) {\n let __cache = this.__config[NODE_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 let __config = this.__config;\n __config[NODE_LIMIT_CACHE] = false;\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[1] === 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, lv, ctx, cache, dx = 0, dy = 0) {\n let { isDestroyed, computedStyle, textBoxes, cacheStyle, __config } = this;\n if(renderMode === SVG) {\n __config[NODE_VIRTUAL_DOM] = this.__virtualDom = {\n type: 'text',\n children: [],\n };\n }\n // >=REPAINT清空bbox\n if(lv >= level.REPAINT) {\n this.__bbox = null;\n this.__filterBbox = null;\n }\n if(isDestroyed || computedStyle[DISPLAY] === 'none' || computedStyle[VISIBILITY] === 'hidden'\n || !textBoxes.length) {\n return;\n }\n if(renderMode === CANVAS || renderMode === WEBGL) {\n // webgl借用离屏canvas绘制文本,cache标识为true是普通绘制,否则是超限降级情况\n if(renderMode === WEBGL) {\n if(cache) {\n let { sx, sy, bbox } = this;\n let __cache = __config[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 __config[NODE_CACHE] = __cache;\n __cache.__available = true;\n ctx = __cache.ctx;\n dx += __cache.dx;\n dy += __cache.dy;\n __config[NODE_LIMIT_CACHE] = false;\n }\n else {\n __config[NODE_LIMIT_CACHE] = true;\n return;\n }\n }\n else {\n let root = this.root;\n let c = inject.getCacheCanvas(root.width, root.height, '__$$OVERSIZE$$__');\n ctx = c.ctx;\n let {\n [NODE_DOM_PARENT]: {\n __config: {\n [NODE_MATRIX_EVENT]: m,\n [NODE_OPACITY]: opacity,\n },\n },\n } = __config;\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n ctx.globalAlpha = opacity;\n }\n }\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.__config[NODE_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 let self = this;\n if(s === self.__content) {\n if(util.isFunction(cb)) {\n cb(-1);\n }\n return;\n }\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__content = s;\n let res = {};\n let vd = self.domParent;\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_CONFIG] = vd.__config;\n let root = vd.root;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb(diff);\n }\n },\n });\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 root() {\n return this.domParent.root;\n }\n\n get currentStyle() {\n return this.domParent.currentStyle;\n }\n\n get style() {\n return this.__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 let { __sx1: sx, __sy1: sy, width, height,\n computedStyle: {\n [TEXT_STROKE_WIDTH]: textStrokeWidth,\n },\n } = this;\n // TODO: 文字描边暂时不清楚最大值是多少,影响不确定,先按描边宽算,因为会出现>>0.5宽的情况\n let half = textStrokeWidth;\n return [sx - half, sy - half, sx + width + half, sy + height + half];\n }\n\n get filterBbox() {\n if(!this.__filterBbox) {\n let 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\nText.prototype.__renderByMask = Text.prototype.render;\n\nexport default Text;\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 Text from '../node/Text';\nimport util from './util';\nimport $$type from './$$type';\nimport enums from './enums';\nimport flatten from './flatten';\n\nconst { NODE_KEY: {\n NODE_DOM_PARENT,\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n} } = enums;\nconst { TYPE_VD, TYPE_GM, TYPE_CP } = $$type;\n\nlet Xom, Dom, Img, Geom, Component;\n\nfunction initRoot(cd, root) {\n let c = flatten({\n tagName: root.tagName,\n props: {},\n children: cd,\n $$type: TYPE_VD,\n });\n root.__json = c;\n root.__host = root;\n let children = build(c.children, root, root);\n return relation(root, children);\n}\n\nfunction initDom(json, root, host, parent) {\n let vd = build(json, root, host);\n return relation(parent, vd);\n}\n\nfunction initCp(json, root, host) {\n if(util.isObject(json)) {\n // cp的flatten在__init中自己做\n return build(json, root, host);\n }\n // text的relation会由上层如Root设置\n else {\n return new Text(json);\n }\n}\n\nfunction initCp2(json, root, host, parent) {\n let vd = new json.klass(json.props);\n vd.__tagName = json.tagName || vd.__tagName;\n vd.__root = root;\n vd.__host = host;\n vd.__json = json;\n vd.__init();\n return relation(parent, vd);\n}\n\n/**\n * 将初始json文件生成virtualDom\n * @param json\n * @param root\n * @param host\n * @param hasP 出现过p标签\n * @returns vd\n */\nfunction build(json, root, host, hasP) {\n if(Array.isArray(json)) {\n return json.map(item => build(item, root, host, hasP));\n }\n let vd;\n if(util.isObject(json) && json.$$type) {\n let { tagName, props, children, klass, $$type, __inheritAnimate, __animateRecords } = json;\n // 更新过程中无变化的cp直接使用原来生成的\n if($$type === TYPE_CP && json.__placeholder) {\n return json.__placeholder;\n }\n if($$type === TYPE_VD) {\n if(tagName === 'img') {\n vd = new Img(tagName, props);\n if(Array.isArray(children) && children.length) {\n throw new Error('Img can not contain children');\n }\n }\n else {\n vd = new Dom(tagName, props);\n }\n // 检查p不能包含div\n if(tagName === 'p') {\n hasP = true;\n }\n else if(tagName === 'div' && hasP) {\n throw new Error('Markup p can not contain div');\n }\n if(Array.isArray(children)) {\n children = relation(vd, build(children, root, host, hasP));\n }\n else {\n children = [];\n }\n vd.__children = children;\n }\n else if($$type === TYPE_GM) {\n if(util.isString(tagName)) {\n let klass = Geom.getRegister(tagName);\n vd = new klass(tagName, props);\n }\n else if(tagName) {\n vd = new tagName('$', props);\n }\n }\n else if($$type === TYPE_CP) {\n vd = new klass(props);\n vd.__tagName = tagName || vd.__tagName;\n }\n else {\n return new Text(json);\n }\n // 根parse需要用到真正的vd引用,然后vd也要引用json,用以做domApi\n json.vd = vd;\n vd.__json = json;\n // 递归parse中的动画记录需特殊处理,将target改为真正的vd引用\n if(__animateRecords) {\n vd.__animateRecords = __animateRecords;\n __animateRecords.list.forEach(item => {\n item.target = item.target.vd;\n });\n delete json.__animateRecords;\n }\n // 更新过程中key相同或者普通相同的vd继承动画\n if(__inheritAnimate) {\n util.extendAnimate(__inheritAnimate, vd);\n delete json.__inheritAnimate;\n }\n vd.__root = root;\n vd.__host = host;\n if($$type === TYPE_CP) {\n vd.__init();\n }\n let ref = props.ref;\n if(util.isString(ref) && ref || util.isNumber(ref)) {\n host.ref[ref] = vd;\n }\n else if(util.isFunction(ref)) {\n ref(vd);\n }\n return vd;\n }\n return new Text(json);\n}\n\n/**\n * 设置关系,父子和兄弟\n * @param parent\n * @param children\n * @param options\n * @returns {Xom|Text|Component}\n */\nfunction relation(parent, children, options = {}) {\n if(Array.isArray(children)) {\n children.forEach(item => {\n relation(parent, item, options);\n });\n }\n else if(children instanceof Xom || children instanceof Component || children instanceof Text) {\n children.__parent = parent;\n children.__domParent = parent;\n // 极为恶心,为了v8的性能优化,text复用parent的__config部分,但domParent重设\n if(children instanceof Text) {\n [\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n ].forEach(k => {\n children.__config[k] = parent.__config[k];\n });\n }\n if(children.__config) {\n children.__config[NODE_DOM_PARENT] = parent;\n }\n if(options.prev) {\n options.prev.__next = children;\n children.__prev = options.prev;\n }\n options.prev = children;\n // 文字视作为父节点的直接文字子节点\n if(children instanceof Component) {\n let sr = children.shadowRoot;\n if(sr instanceof Text) {\n sr.__parent = parent;\n [\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n ].forEach(k => {\n children.__config[k] = parent.__config[k];\n });\n }\n sr.__domParent = parent;\n if(sr.__config) {\n sr.__config[NODE_DOM_PARENT] = parent;\n }\n }\n }\n return children;\n}\n\nexport default {\n ref(o) {\n Xom = o.Xom;\n Dom = o.Dom;\n Img = o.Img;\n Geom = o.Geom;\n Component = o.Component;\n },\n initRoot,\n initDom,\n initCp,\n initCp2,\n relation,\n};\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 builder from '../util/builder';\nimport Event from '../util/Event';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport flatten from '../util/flatten';\nimport css from '../style/css';\nimport change from '../refresh/change';\n\nconst { isNil, isFunction, clone, extend } = util;\n\nconst REGISTER = {};\n\n/**\n * 向上设置cp类型叶子节点,表明从root到本节点这条链路有更新,使得无链路更新的节约递归\n * 在check时树递归会用到,判断是否需要查找cp更新\n * @param cp\n */\nfunction setUpdateFlag(cp) {\n // 去重\n if(cp.__hasCpUpdate) {\n return;\n }\n cp.__hasCpUpdate = true;\n let host = cp.host;\n if(host) {\n setUpdateFlag(host);\n }\n}\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.state = {};\n this.__isMounted = false;\n this.__taskList = [];\n }\n\n setState(n, cb) {\n let self = this;\n if(isNil(n)) {\n n = {};\n }\n else if(isFunction(n)) {\n return;\n }\n else {\n if(Object.keys(n).length === 0) {\n if(isFunction(cb)) {\n cb.call(self);\n }\n return;\n }\n let state = clone(self.state);\n n = extend(state, n);\n }\n let root = self.root;\n if(root && self.__isMounted) {\n // 一帧之内多次调用,需合并\n if(self.__nextState) {\n Object.assign(self.__nextState, n);\n self.__taskList.push(cb);\n }\n else {\n self.__nextState = n;\n self.__taskList = [cb];\n // 回调更新列表,before执行时splice出来供after执行,防止中途产生的后续setState干扰\n let list = [];\n let t = self.__task = {\n __before: () => {\n list = self.__taskList.splice(0);\n // 标识更新\n setUpdateFlag(this);\n },\n __after: () => {\n // self.__nextState = null; 由updater.js每次refresh前同步执行清空,这里不能异步清除,否则frame动画会乱序\n list.forEach(cb => {\n if(isFunction(cb)) {\n cb.call(self);\n }\n });\n },\n };\n root.addRefreshCp(t);\n }\n }\n // 构造函数中调用还未render,\n else if(isFunction(cb)) {\n self.state = n;\n cb.call(self);\n }\n }\n\n /**\n * build中调用初始化,json有值时是update过程才有,且处理过flatten\n * @param json\n * @private\n */\n __init(json) {\n this.__ref = {};\n let root = this.root;\n let cd = json || flatten(this.render());\n let sr = builder.initCp(cd, root, this);\n this.__cd = cd;\n if(sr instanceof Text) {\n // 文字视作为父节点的直接文字子节点,在builder里做\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 else if(!(sr instanceof Component)) {\n // 本身build是递归的,子cp已经初始化了\n throw new Error('Component render() must return a dom/text: ' + this);\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 // shadow指向直接renderRoot,shadowRoot考虑到返回Component的递归即hoc高阶组件\n // host是直接所属,hostRoot同考虑到高阶组件\n this.__shadow = sr;\n sr.__host = this;\n // 递归下去,多层级时执行顺序由里到外,最终会被最上层执行替换\n while(sr instanceof Component) {\n sr.__hostRoot = this;\n sr.shadow.__host = sr;\n sr = sr.shadow;\n }\n this.__shadowRoot = sr;\n sr.__hostRoot = this;\n if(!this.__isMounted) {\n this.__isMounted = true;\n if(isFunction(this.componentDidMount)) {\n root.once(Event.REFRESH, () => {\n this.componentDidMount();\n });\n }\n }\n }\n\n render() {\n inject.warn('Component must 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 this.root.delRefreshTask(this.__task);\n if(this.shadowRoot) {\n this.shadowRoot.__destroy();\n }\n this.__parent = 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 'availableAnimating',\n 'effectiveAnimating',\n 'displayAnimating',\n 'visibilityAnimating',\n 'bbox',\n '__config',\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 '__layoutAbs',\n '__layoutNone',\n '__tryLayInline',\n '__offsetX',\n '__offsetY',\n '__calAutoBasis',\n '__computeReflow',\n '__renderAsMask',\n '__renderByMask',\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 [SCALE_X, [targetWidth / imgWidth, NUMBER]],\n [SCALE_Y, [targetHeight / imgHeight, 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 FONT_SIZE,\n },\n NODE_KEY: {\n NODE_DEFS_CACHE,\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.__config[NODE_DEFS_CACHE].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, __config, 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 __config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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 if(item[1]) {\n item[1](diff);\n }\n else {\n item.__after && item.__after(diff);\n }\n }\n }\n else {\n for(let i = 0; i < length; i++) {\n let item = list[i];\n if(item[0]) {\n item[0](diff);\n }\n else {\n item.__before && item.__before(diff);\n }\n }\n }\n}\n\nlet isPause;\n\nclass Frame {\n constructor() {\n this.__hookTask = []; // 动画刷新后,每个root注册的刷新回调执行\n this.__task = [];\n this.__taskCp = []; // 区别于task,component专用,和animate等其它不同流水线,在最后执行,防止混了 #122\n this.__now = null;\n }\n\n __init() {\n let self = this;\n let { task, taskCp } = 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 && !taskCp.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 cloneCp = taskCp.splice(0); // task要常驻,taskCp只1次直接splice清空\n let length = clone.length;\n let lengthCp = cloneCp.length;\n traversal(clone, length, diff, false);\n traversal(cloneCp, lengthCp, diff, false);\n // 执行动画造成的每个Root的刷新并清空\n let list = self.__hookTask.splice(0);\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n item && item();\n }\n // 普通的before/after\n traversal(clone, length, diff, true);\n traversal(cloneCp, lengthCp, diff, true);\n // 还有则继续,没有则停止节省性能\n if(task.length || taskCp.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 __nextFrameCp(handle) {\n let { task, taskCp } = this;\n if(!task.length && !taskCp.length) {\n this.__init();\n }\n taskCp.push(handle);\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 get taskCp() {\n return this.__taskCp;\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 },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_STYLE,\n UPDATE_KEYS,\n UPDATE_CONFIG,\n },\n KEY_FRAME_KEY: {\n FRAME_STYLE,\n FRAME_TIME,\n FRAME_EASING,\n FRAME_TRANSITION,\n },\n ANIMATE_KEY: {\n I_ASSIGNING,\n I_IN_FPS,\n I_IS_DELAY,\n I_BEGIN,\n I_END,\n I_FINISHED,\n I_NEXT_END,\n I_FIRST_PLAY,\n I_PLAY_CB,\n I_TARGET,\n I_ROOT,\n I_FRAMES,\n I_FRAMES_R,\n I_CURRENT_TIME,\n I_NEXT_TIME,\n I_STYLE,\n I_DURATION,\n I_ITERATIONS,\n I_FILL,\n I_PLAYBACK_RATE,\n I_PLAY_COUNT,\n I_PLAY_STATE,\n I_DESTROYED,\n I_START_TIME,\n I_FPS_TIME,\n I_EASING,\n I_ENTER_FRAME,\n I_DELAY,\n I_END_DELAY,\n I_KEYS,\n I_ORIGIN_STYLE,\n I_CURRENT_FRAMES,\n I_CURRENT_FRAME,\n I_SPF_LIMIT,\n I_FPS,\n I_DIRECTION,\n I_FIRST_ENTER,\n I_STAY_BEGIN,\n I_STAY_END,\n I_IS2,\n I_END_TIME,\n I_NODE_CONFIG,\n I_ROOT_CONFIG,\n I_OUT_BEGIN_DELAY,\n I_TIME_STAMP,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, INHERIT, RGBA, STRING, NUMBER, REM, VW, VH, VMAX, VMIN, GRADIENT, calUnit } = unit;\nconst { isNil, isFunction, isNumber, isObject, isString, clone, equalArr } = util;\nconst { linear } = easing;\nconst { cloneStyle } = css;\nconst { isGeom, GEOM } = change;\n\nconst {\n COLOR_HASH,\n LENGTH_HASH,\n RADIUS_HASH,\n GRADIENT_HASH,\n EXPAND_HASH,\n GRADIENT_TYPE,\n} = key;\n\nconst NUM_CAL_HASH = {\n};\nObject.assign(NUM_CAL_HASH, LENGTH_HASH);\nObject.assign(NUM_CAL_HASH, EXPAND_HASH);\n\nfunction unify(frames, target) {\n let hash = {};\n let keys = [];\n // 获取所有关键帧的属性\n frames.forEach(item => {\n let style = item[FRAME_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[FRAME_STYLE];\n keys.forEach(k => {\n if(!style.hasOwnProperty(k) || isNil(style[k])) {\n if(GEOM.hasOwnProperty(k)) {\n style[k] = target.getProps(k);\n }\n else {\n if(k === TRANSLATE_X && style.hasOwnProperty(TRANSLATE_PATH)) {\n style[k] = style[TRANSLATE_PATH][0];\n }\n else if(k === TRANSLATE_Y && style.hasOwnProperty(TRANSLATE_PATH)) {\n style[k] = style[TRANSLATE_PATH][1];\n }\n else {\n style[k] = target.currentStyle[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[FRAME_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] = [[MATRIX, m]];\n }\n else if(v[1] === INHERIT) {\n if(k === COLOR || k === TEXT_STROKE_COLOR) {\n style[k] = [util.rgba2int(computedStyle[k]), RGBA];\n }\n else if(LENGTH_HASH.hasOwnProperty(k)) {\n style[k] = [computedStyle[k], PX];\n }\n else if(k === FONT_WEIGHT) {\n style[k] = [computedStyle[k], NUMBER];\n }\n else if(k === FONT_STYLE || k === FONT_FAMILY || k === TEXT_ALIGN || k === TEXT_STROKE_OVER) {\n style[k] = [computedStyle[k], STRING];\n }\n }\n });\n });\n}\n\n/**\n * 通知root更新当前动画,需要根据frame的状态来决定是否是同步插入\n * 在异步时,因为动画本身是异步,需要addRefreshTask\n * 而如果此时frame在执行before过程中,说明帧动画本身是在before计算的,需要同步插入\n * @param style\n * @param keys 样式所有的key\n * @param __config\n * @param root\n * @param node\n */\nfunction genBeforeRefresh(style, keys, __config, root, node) {\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_STYLE] = style;\n res[UPDATE_KEYS] = keys;\n res[UPDATE_CONFIG] = __config[I_NODE_CONFIG];\n root.__addUpdate(node, __config[I_NODE_CONFIG], root, __config[I_ROOT_CONFIG], res);\n __config[I_STYLE] = style;\n __config[I_ASSIGNING] = true;\n // frame每帧回调时,下方先执行计算好变更的样式,这里特殊插入一个hook,让root增加一个刷新操作\n // 多个动画调用因为相同root也只会插入一个,这样在所有动画执行完毕后frame里检查同步进行刷新,解决单异步问题\n root.__frameHook();\n}\n\n/**\n * 将每帧的样式格式化,提取出offset属性并转化为时间,提取出缓动曲线easing\n * @param style 关键帧样式\n * @param duration 动画时间长度\n * @param es options的easing曲线控制,frame没有自定义则使用全局的\n * @returns {{style: *, time: number, easing: *, transition: []}}\n */\nfunction framing(style, duration, es) {\n let { offset, easing } = style;\n // 这两个特殊值提出来存储不干扰style\n delete style.offset;\n delete style.easing;\n // translatePath特殊对待,ae的曲线运动动画\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[1] === NUMBER) {\n v[1] = PX;\n }\n return v;\n });\n }\n let res = [];\n res[FRAME_STYLE] = style;\n res[FRAME_TIME] = offset * duration;\n res[FRAME_EASING] = easing || es;\n res[FRAME_TRANSITION] = [];\n return res;\n}\n\nfunction calByUnit(p, n, container, root) {\n if(p[1] === PX) {\n if(n[1] === PERCENT) {\n return n[0] * 0.01 * container - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width * 0.01 - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height * 0.01 - p[0];\n }\n else if(n[1] === VMAX) {\n return n[0] * Math.max(root.width, root.height) * 0.01 - p[0];\n }\n else if(n[1] === VMIN) {\n return n[0] * Math.min(root.width, root.height) * 0.01 - p[0];\n }\n }\n else if(p[1] === PERCENT) {\n if(n[1] === PX) {\n return n[0] * 100 / container - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * root.computedStyle[FONT_SIZE] * 100 / container - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width / container - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height / container - p[0];\n }\n else if(n[1] === VMAX) {\n return n[0] * Math.max(root.width, root.height) / container - p[0];\n }\n else if(n[1] === VMIN) {\n return n[0] * Math.min(root.width, root.height) / container - p[0];\n }\n }\n else if(p[1] === REM) {\n if(n[1] === PX) {\n return n[0] / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * 0.01 * container / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width * 0.01 / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height * 0.01 / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VMAX) {\n return n[0] * Math.max(root.width, root.height) * 0.01 / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VMIN) {\n return n[0] * Math.min(root.width, root.height) * 0.01 / root.computedStyle[FONT_SIZE] - p[0];\n }\n }\n else if(p[1] === VW) {\n if(n[1] === PX) {\n return n[0] * 100 / root.width - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * 100 * root.computedStyle[FONT_SIZE] / root.width - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * container / root.width - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height / root.width - p[0];\n }\n else if(n[1] === VMAX) {\n return n[0] * Math.max(root.width, root.height) / root.width - p[0];\n }\n else if(n[1] === VMIN) {\n return n[0] * Math.min(root.width, root.height) / root.width - p[0];\n }\n }\n else if(p[1] === VH) {\n if(n[1] === PX) {\n return n[0] * 100 / root.height - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * 100 * root.computedStyle[FONT_SIZE] / root.height - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width / root.height - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * container / root.height - p[0];\n }\n else if(n[1] === VMAX) {\n return n[0] * Math.max(root.width, root.height) / root.height - p[0];\n }\n else if(n[1] === VMIN) {\n return n[0] * Math.min(root.width, root.height) / root.height - p[0];\n }\n }\n else if(p[1] === VMAX) {\n if(n[1] === PX) {\n return n[0] * 100 / Math.max(root.width, root.height) - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * 100 * root.computedStyle[FONT_SIZE] / Math.max(root.width, root.height) - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * container / Math.max(root.width, root.height) - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width / Math.max(root.width, root.height) - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height / Math.max(root.width, root.height) - p[0];\n }\n else if(n[1] === VMIN) {\n return n[0] * Math.min(root.width, root.height) / Math.max(root.width, root.height) - p[0];\n }\n }\n else if(p[1] === VMIN) {\n if(n[1] === PX) {\n return n[0] * 100 / Math.min(root.width, root.height) - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * 100 * root.computedStyle[FONT_SIZE] / Math.min(root.width, root.height) - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * container / Math.min(root.width, root.height) - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width / Math.min(root.width, root.height) - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height / Math.min(root.width, root.height) - p[0];\n }\n else if(n[1] === VMAX) {\n return n[0] * Math.max(root.width, root.height) / Math.min(root.width, root.height) - p[0];\n }\n }\n}\n\n/**\n * 计算两帧之间的差,单位不同的以后面为准,返回的v表示差值\n * 没有变化返回空\n * auto等无法比较的不参与计算,不返回来标识无过度效果\n * @param prev 上一帧样式\n * @param next 下一帧样式\n * @param k 比较的样式名\n * @param target dom对象\n * @param tagName dom名\n * @returns {{k: *, v: *}}\n */\nfunction calDiff(prev, next, k, target, tagName) {\n let res = [k];\n let p = prev[k];\n let n = next[k];\n if(k === TRANSFORM) {\n // transform因默认值null很特殊,不存在时需给默认矩阵\n if(!p && !n) {\n return;\n }\n let pm, nm;\n if(p) {\n pm = p[0][1];\n }\n else {\n pm = mx.identity();\n }\n if(n) {\n nm = n[0][1];\n }\n else {\n nm = mx.identity();\n }\n // transform特殊被初始化转成matrix矩阵,直接计算差值\n if(equalArr(pm, nm)) {\n return;\n }\n res[1] = [\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 return res;\n }\n else if(k === ROTATE_3D) {\n if(equalArr(p, n)) {\n return;\n }\n res[1] = [n[0] - n[0], n[1] - p[1], n[2] - p[2], [n[3][0] - p[3][0], n[3][1]]];\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[0] !== nv[0]) {\n v.push(null);\n }\n else {\n let k = pv[0];\n if(k === 'blur') {\n if(pv[1][1] === nv[1][1]) {\n v.push(nv[1][0] - pv[1][0]);\n }\n else {\n let v2 = calByUnit(pv[1], nv[1], 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(nv[1][0] - pv[1][0]);\n }\n else if(k === 'dropShadow') {\n let v2 = [];\n for(let i = 0; i < 4; i++) {\n let a = pv[1][i], b = nv[1][i];\n if(a[1] === b[1]) {\n v2.push(b[0] - a[0]);\n }\n else {\n v2.push(calByUnit(a, b, i === 1 ? taraget.clientHeight: target.clientWidth, target.root));\n }\n }\n v2.push([\n nv[1][4][0] - pv[1][4][0],\n nv[1][4][1] - pv[1][4][1],\n nv[1][4][2] - pv[1][4][2],\n nv[1][4][3] - pv[1][4][3],\n ])\n v.push(v2);\n }\n }\n }\n res[1] = v;\n }\n else if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN) {\n res[1] = [];\n for(let i = 0; i < 2; i++) {\n let pi = p[i];\n let ni = n[i];\n if(pi[1] === ni[1]) {\n res[1].push(ni[0] - pi[0]);\n }\n else {\n let v = calByUnit(pi, ni, target[i ? 'outerHeight' : 'outerWidth'], target.root);\n res[1].push(v || 0);\n }\n }\n if(equalArr(res[1], [0, 0])) {\n return;\n }\n }\n else if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n res[1] = [];\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) {\n res[1].push(null);\n continue;\n }\n if(pi[1] === ni[1]) {\n let v = ni[0] - pi[0];\n if(!v) {\n res[1].push(null);\n return;\n }\n res[1].push(v);\n }\n else {\n let k2 = k === BACKGROUND_POSITION_X ? 'offsetWidth' : 'offsetHeight';\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 let v = calByUnit(pi, ni, target[k2], target.root);\n if(!v) {\n res[1].push(null);\n return;\n }\n res[1].push(v);\n }\n }\n }\n else if(k === BOX_SHADOW) {\n res[1] = [];\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 let v = [];\n // x/y/blur/spread\n for(let j = 0; j < 4; j++) {\n v.push(b[j] - a[j]);\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[1].push(v);\n }\n }\n else if(EXPAND_HASH.hasOwnProperty(k)) {\n if(p[1] === n[1]) {\n let v = n[0] - p[0];\n if(v === 0) {\n return;\n }\n res[1] = 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[1] = v;\n }\n }\n else if(k === BACKGROUND_SIZE) {\n res[1] = [];\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[1].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[1] === nn[1]) {\n temp.push(nn[0] - pp[0]);\n }\n else {\n let k2 = i ? 'offsetWidth' : 'offsetHeight';\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 let v = calByUnit(pp, nn, target[k2], target.root);\n temp.push(v || 0);\n }\n }\n if(equalArr(temp, [0, 0])) {\n res[1].push(null);\n }\n else {\n res[1].push(temp);\n has = true;\n }\n }\n if(!has) {\n return;\n }\n }\n else if(GRADIENT_HASH.hasOwnProperty(k)) {\n // backgroundImage发生了渐变色和图片的变化,fill发生渐变色和纯色的变化等\n res[1] = [];\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[1] !== ni[1]) {\n res[1].push(null);\n continue;\n }\n let isGradient = pi[1] === GRADIENT;\n pi = pi[0];\n ni = ni[0];\n let temp = [];\n // 渐变\n if(isGradient) {\n let r = calDiffGradient(pi, ni, target);\n if(!r) {\n res[1].push(null);\n continue;\n }\n temp = r;\n }\n // 纯色\n else {\n if(equalArr(ni, pi)) {\n res[1].push(null);\n }\n temp[0] = [\n ni[0] - pi[0],\n ni[1] - pi[1],\n ni[2] - pi[2],\n ni[3] - pi[3]\n ];\n }\n res[1].push(temp);\n }\n }\n else if(COLOR_HASH.hasOwnProperty(k)) {\n if(n[1] !== p[1]) {\n return;\n }\n // 特殊增加支持有gradient的先判断,仅color和textStrokeColor支持\n let isGradient = n[1] === GRADIENT;\n n = n[0];\n p = p[0];\n if(isGradient) {\n let r = calDiffGradient(p, n, target);\n if(!r) {\n return;\n }\n res[1] = r;\n }\n else {\n // 透明变化无视\n if(equalArr(n, p) || n[3] === 0 && p[3] === 0) {\n return;\n }\n res[1] = [\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(RADIUS_HASH.hasOwnProperty(k)) {\n // x/y都相等无需\n if(n[0][0] === p[0][0] && n[0][1] === p[0][1]\n && n[1][0] === p[1][0] && n[1][1] === p[1][1]) {\n return;\n }\n res[1] = [];\n for(let i = 0; i < 2; i++) {\n if(n[i][1] === p[i][1]) {\n res[1].push(n[i][0] - p[i][0]);\n }\n else {\n let v = calByUnit(p[i], n[i], target[i ? 'outerHeight' : 'outerWidth'], target.root);\n res[1].push(v || 0);\n }\n }\n }\n else if(LENGTH_HASH.hasOwnProperty(k)) {\n // auto不做动画\n if(p[1] === AUTO || n[1] === AUTO) {\n return;\n }\n let computedStyle = target.computedStyle;\n let parentComputedStyle = (target.domParent || target).computedStyle;\n let diff = 0;\n if(p[1] === n[1]) {\n diff = n[0] - p[0];\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[1] !== AUTO && n[1] !== AUTO) {\n diff = calByUnit(p, n, parentComputedStyle[HEIGHT], target.root);\n }\n }\n // 其余都是相对于父width的\n else {\n if(p[1] !== AUTO && n[1] !== 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[1] = diff;\n }\n else if(GEOM.hasOwnProperty(k)) {\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[1] = 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[1] = [];\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[1].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[1].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[1] = [];\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[1].push(null);\n }\n else {\n res[1].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[1] = 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[1] = [];\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[1].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[1].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[1] = [\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[1] = n - p;\n }\n }\n }\n else if(k === OPACITY || k === Z_INDEX) {\n if(n === p) {\n return;\n }\n res[1] = n - p;\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[1] = p.map((item, i) => {\n let [v, u] = item;\n if(u === PERCENT) {\n if(i % 2 === 0) {\n return [(parseFloat(v) || 0) * 0.01 * target[k1], PX];\n }\n else {\n return [(parseFloat(v) || 0) * 0.01 * target[k2], PX];\n }\n }\n else if(u === REM) {\n return [(parseFloat(v) || 0) * root.computedStyle[FONT_SIZE] * 100, PX];\n }\n else if(u === VW) {\n return [(parseFloat(v) || 0) * 0.01 * root.width, PX];\n }\n else if(u === VH) {\n return [(parseFloat(v) || 0) * 0.01 * root.height, PX];\n }\n else if(u === VMAX) {\n return [(parseFloat(v) || 0) * 0.01 * Math.max(root.width, root.height), PX];\n }\n else if(u === VMIN) {\n return [(parseFloat(v) || 0) * 0.01 * Math.min(root.width, root.height), PX];\n }\n else {\n return [parseFloat(v) || 0, PX];\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 || !GRADIENT_TYPE.hasOwnProperty(p.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][1] === b[1][1]) {\n t.push(b[1][0] - a[1][0]);\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[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 }\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// 计算两帧之间不相同的变化,存入transition,相同的忽略\nfunction calFrame(prev, next, keys, target, tagName) {\n keys.forEach(k => {\n let ts = calDiff(prev[FRAME_STYLE], next[FRAME_STYLE], k, target, tagName);\n // 可以形成过渡的才会产生结果返回\n if(ts) {\n prev[FRAME_TRANSITION].push(ts);\n }\n });\n return next;\n}\n\nfunction binarySearch(i, j, time, frames) {\n if(i === j) {\n let frame = frames[i];\n if(frame[FRAME_TIME] > time) {\n return i - 1;\n }\n return i;\n }\n else {\n let middle = i + ((j - i) >> 1);\n let frame = frames[middle];\n if(frame[FRAME_TIME] === time) {\n return middle;\n }\n else if(frame[FRAME_TIME] > time) {\n return binarySearch(i, Math.max(middle - 1, i), time, frames);\n }\n else {\n return binarySearch(Math.min(middle + 1, j), j, time, frames);\n }\n }\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 keys 所有样式key\n * @param percent 到下一帧时间的百分比\n * @param target vd\n * @returns {*}\n */\nfunction calIntermediateStyle(frame, keys, percent, target) {\n let style = cloneStyle(frame[FRAME_STYLE], keys);\n let timingFunction = getEasing(frame[FRAME_EASING]);\n if(timingFunction && timingFunction !== linear) {\n percent = timingFunction(percent);\n }\n let transition = frame[FRAME_TRANSITION];\n for(let i = 0, len = transition.length; i < len; i++) {\n let [k, v] = transition[i];\n let st = style[k];\n // transform特殊处理,只有1个matrix,有可能不存在,需给默认矩阵\n if(k === TRANSFORM) {\n if(!st) {\n st = style[k] = [[MATRIX, mx.identity()]];\n }\n for(let i = 0; i < 16; i++) {\n st[0][1][i] += v[i] * percent;\n }\n }\n // 特殊的曲线运动计算,转换为translateXY,出现在最后一定会覆盖原本的translate防重\n else if(k === TRANSLATE_PATH) {\n let t = 1 - percent;\n if(v.length === 8) {\n style[TRANSLATE_X] = [\n v[0][0] * t * t * t\n + 3 * v[2][0] * percent * t * t\n + 3 * v[4][0] * percent * percent * t\n + v[6][0] * percent * percent * percent,\n PX,\n ];\n style[TRANSLATE_Y] = [\n v[1][0] * t * t * t\n + 3 * v[3][0] * percent * t * t\n + 3 * v[5][0] * percent * percent * t\n + v[7][0] * percent * percent * percent,\n PX,\n ];\n }\n else if(v.length === 6) {\n style[TRANSLATE_X] = [\n v[0][0] * t * t\n + 2 * v[2][0] * percent * t\n + v[4][0] * percent * percent,\n PX,\n ];\n style[TRANSLATE_Y] = [\n v[1][0] * t * t\n + 3 * v[3][0] * percent * t\n + v[5][0] * percent * percent,\n PX,\n ];\n }\n }\n else if(k === ROTATE_3D) {\n st[0] += v[0] * percent;\n st[1] += v[1] * percent;\n st[2] += v[2] * percent;\n st[3][0] += v[3][0] * percent;\n }\n else if(NUM_CAL_HASH.hasOwnProperty(k)) {\n if(v) {\n st[0] += v * percent;\n }\n }\n else if(k === FILTER) {\n // 只有1个样式声明了filter另外一个为空,会造成无样式,需初始化数组并在下面计算出样式存入\n if(!st) {\n st = style[k] = [];\n }\n for(let i = 0, len = v.length; i < len; i++) {\n let item = v[i];\n if(item) {\n let k2 = st[i][0], v2 = st[i][1];\n // 只有dropShadow是多个数组,存放x/y/blur/spread/color\n if(k2 === 'dropShadow') {\n v2[0][0] += item[0] * percent;\n v2[1][0] += item[1] * percent;\n v2[2][0] += item[2] * percent;\n v2[3][0] += 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[0] += item * percent;\n }\n }\n }\n }\n else if(RADIUS_HASH.hasOwnProperty(k)) {\n for(let i = 0; i < 2; i++) {\n st[i][0] += v[i] * percent;\n }\n }\n else if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN) {\n if(v[0] !== 0) {\n st[0][0] += v[0] * percent;\n }\n if(v[1] !== 0) {\n st[1][0] += v[1] * percent;\n }\n }\n else if(k === BOX_SHADOW) {\n for(let i = 0, len = Math.min(st.length, v.length); i < len; i++) {\n // x/y/blur/spread\n for(let j = 0; j < 4; j++) {\n st[i][j] += v[i][j] * percent;\n }\n // rgba\n for(let j = 0; j < 4; j++) {\n st[i][4][j] += v[i][4][j] * percent;\n }\n }\n }\n else if(k === BACKGROUND_SIZE) {\n st.forEach((item, i) => {\n if(v[i]) {\n item[0][0] += v[i][0] * percent;\n item[1][0] += v[i][1] * percent;\n }\n });\n }\n else if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n st.forEach((item, i) => {\n if(v[i]) {\n item[0] += v[i] * percent;\n }\n });\n }\n else if(GRADIENT_HASH.hasOwnProperty(k)) {\n st.forEach((st2, i) => {\n let v2 = v[i];\n if(!v2) {\n return;\n }\n if(st2[1] === GRADIENT && GRADIENT_TYPE.hasOwnProperty(st2[0].k)) {\n st2 = st2[0];\n let [c, d, p, z] = v2;\n for(let i = 0, len = Math.min(st2.v.length, c.length); i < len; i++) {\n let a = st2.v[i];\n let b = c[i];\n a[0][0] += b[0][0] * percent;\n a[0][1] += b[0][1] * percent;\n a[0][2] += b[0][2] * percent;\n a[0][3] += b[0][3] * percent;\n if(a[1] && b[1]) {\n a[1][0] += b[1] * percent;\n }\n }\n if(st2.k === 'linear' && st2.d !== undefined && d !== undefined) {\n if(Array.isArray(d)) {\n st2.d[0] += d[0] * percent;\n st2.d[1] += d[1] * percent;\n st2.d[2] += d[2] * percent;\n st2.d[3] += d[3] * percent;\n }\n else {\n st2.d += d * percent;\n }\n }\n if(st2.k === 'radial') {\n if(st2.z !== undefined && z !== undefined) {\n st2.z[0] += z[0] * percent;\n st2.z[1] += z[1] * percent;\n st2.z[2] += z[2] * percent;\n st2.z[3] += z[3] * percent;\n st2.z[4] += z[4] * percent;\n }\n else if(st2.p !== undefined && p !== undefined) {\n st2.p[0][0] += p[0] * percent;\n st2.p[1][0] += p[1] * percent;\n }\n }\n else if(st2.k === 'conic' && st2.d !== undefined && d !== undefined) {\n st2.d += d * percent;\n st2.p[0][0] += p[0] * percent;\n st2.p[1][0] += p[1] * percent;\n }\n }\n // fill纯色\n else {\n st2 = st2[0];\n let c = v2[0];\n st2[0] += c[0] * percent;\n st2[1] += c[1] * percent;\n st2[2] += c[2] * percent;\n st2[3] += c[3] * percent;\n }\n });\n }\n // color可能超限[0,255],但浏览器已经做了限制,无需关心\n else if(COLOR_HASH.hasOwnProperty(k)) {\n st = st[0];\n st[0] += v[0] * percent;\n st[1] += v[1] * percent;\n st[2] += v[2] * percent;\n st[3] += v[3] * percent;\n }\n else if(GEOM.hasOwnProperty(k)) {\n let st = style[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 style[k] = st.map((item, i) => {\n return fn(item, v[i], percent);\n });\n }\n else {\n style[k] = 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 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] += 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) && !isNil(st2)) {\n for(let i = 0, len = Math.min(st2.length, item.length); i < len; i++) {\n let o = st2[i];\n let n = item[i];\n if(!isNil(o) && !isNil(n)) {\n st2[i] += n * percent;\n }\n }\n }\n });\n }\n else {\n v.forEach((item, i) => {\n if(!isNil(item) && !isNil(st[i])) {\n st[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] += 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] += v[0] * percent;\n }\n if(!isNil(st[1]) && !isNil(v[1])) {\n st[1] += v[1] * percent;\n }\n }\n else {\n if(!isNil(st) && !isNil(v)) {\n style[k] += v * percent;\n }\n }\n }\n }\n else if(k === OPACITY || k === Z_INDEX) {\n style[k] += v * percent;\n // 精度问题可能会超过[0,1]区间\n if(k === OPACITY) {\n if(style[k] < 0) {\n style[k] = 0;\n }\n else if(style[k] > 1) {\n style[k] = 1;\n }\n }\n }\n }\n return style;\n}\n\nfunction gotoOverload(options, cb) {\n if(isFunction(options)) {\n cb = options;\n options = {};\n }\n return [options || {}, cb];\n}\n\nfunction calDiffTime(__config, diff) {\n let playbackRate = __config[I_PLAYBACK_RATE];\n let spfLimit = __config[I_SPF_LIMIT];\n let fps = __config[I_FPS];\n let v = __config[I_CURRENT_TIME] = __config[I_NEXT_TIME];\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 __config[I_NEXT_TIME] += diff;\n return [v, diff];\n}\n\nfunction frameCb(self, __config, diff, isDelay) {\n self.emit(Event.FRAME, diff, isDelay);\n if(__config[I_FIRST_PLAY]) {\n __config[I_FIRST_PLAY] = false;\n self.emit(Event.PLAY);\n }\n let cb = __config[I_PLAY_CB];\n if(isFunction(cb)) {\n cb.call(self, diff, isDelay);\n // 清理要检查,gotoAndStop()这种cb回调中直接再次调用goto的话cb会不一致不能删除\n if(__config[I_PLAY_CB] === cb) {\n __config[I_PLAY_CB] = 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 let root = target.root;\n let config = this.__config = [\n false, // assigning\n false, // inFps\n false, // isDelay\n true, // begin\n false, // end\n false, // finished\n false, // nextBegin\n true, // firstPlay\n null, // playCb\n target,\n root,\n null, // frames\n null, // framesR\n 0, // currentTime\n 0, // nextTime\n {}, // style\n 0, // duration\n 1, // iterations\n 'none', // fill\n 1, // playbackRate\n 0, // playCount\n 'idle',\n false, // destroy\n 0, // startTime\n 0, // fpsTime\n op.easing,\n false, // enterFrame\n 0, // delay\n 0, // endDelay\n null, // keys,\n null, // originStyle,\n null, // currentFrames\n null, // currentFrame\n false, // spfLimit\n 60, // fps\n 'normal', // direction\n true, // firstEnter,\n false, // stayBegin\n false, // stayEnd\n false, // is2\n 0, // endTime\n target.__config, // nodeConfig\n root && root.__config, // rootConfig,destroy后root可能为空\n false, // outBeginDelay\n ];\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 config[I_FRAMES] = frames;\n config[I_FRAMES_R] = framesR;\n config[I_KEYS] = keys;\n config[I_ORIGIN_STYLE] = originStyle;\n if(frames.length === 2) {\n config[I_IS2] = true;\n config[I_END_TIME] = frames[1][FRAME_TIME];\n }\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 config[I_CURRENT_FRAMES] = {\n reverse: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(op.direction) ? framesR : frames;\n // 时间戳\n config[I_TIME_STAMP] = frame.__now;\n // 性能优化访问\n this[0] = this.__before;\n this[1] = this.__after;\n }\n\n __init(list, iterations, duration, easing, target) {\n if(list.length < 1) {\n return [[], [], [], {}];\n }\n // 过滤时间非法的,过滤后续offset<=前面的\n let offset = -1;\n let tagName = target.tagName;\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(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(tagName, k)) {\n originStyle[k] = props[k];\n }\n originStyle[k] = style[k];\n });\n // 再计算两帧之间的变化,存入transition属性\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, tagName);\n }\n // 反向存储帧的倒排结果\n framesR.forEach(item => {\n item[FRAME_TIME] = duration - item[FRAME_TIME];\n item[FRAME_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, tagName);\n }\n return [frames, framesR, keys, originStyle];\n }\n\n __clean(isFinish) {\n let __config = this.__config;\n this.__cancelTask();\n __config[I_NEXT_TIME] = 0;\n let restore;\n let style = __config[I_STYLE];\n let keys = __config[I_KEYS];\n let target = __config[I_TARGET];\n if(isFinish) {\n // gotoAndStop到一个很大的时间的话,也需要防止超过\n __config[I_CURRENT_TIME] = __config[I_DELAY] + __config[I_DURATION] * __config[I_ITERATIONS] + __config[I_END_DELAY];\n if(__config[I_PLAY_STATE] === 'finish') {\n return;\n }\n __config[I_PLAY_STATE] = 'finish';\n // cancel需要清除finish根据情况保留\n if(!__config[I_STAY_END]) {\n __config[I_STYLE] = {};\n restore = true;\n }\n }\n else {\n __config[I_PLAY_COUNT] = __config[I_CURRENT_TIME] = 0;\n if(__config[I_PLAY_STATE] === 'idle') {\n return;\n }\n __config[I_PLAY_STATE] = 'idle';\n __config[I_STYLE] = {};\n restore = true;\n }\n // 动画取消结束不停留在最后一帧需要还原target原本的样式,需要对比目前是否是由本动画赋值的\n if(restore) {\n keys.forEach(k => {\n if(GEOM.hasOwnProperty(k)) {\n if(target.__currentProps[k] === style[k]) {\n target.__currentProps[k] = target.props[k];\n }\n }\n else {\n if(target.__currentStyle[k] === style[k]) {\n target.__currentStyle[k] = target.style[k];\n }\n }\n });\n }\n }\n\n play(cb) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n let frames = __config[I_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 __config[I_PLAY_CB] = cb;\n __config[I_PLAY_STATE] = 'running';\n // 每次play调用标识第一次运行,需响应play事件和回调\n __config[I_FIRST_PLAY] = true;\n // 防止finish/cancel事件重复触发,每次播放重置\n this.__hasFin = false;\n this.__hasCancel = false;\n // 只有第一次调用会进初始化,另外finish/cancel视为销毁也会重新初始化\n if(!__config[I_ENTER_FRAME]) {\n __config[I_ENTER_FRAME] = true;\n let framesR = __config[I_FRAMES_R];\n let direction = __config[I_DIRECTION];\n // 初始化根据方向确定帧序列\n __config[I_CURRENT_FRAMES] = {\n reverse: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(direction) ? framesR : frames;\n __config[I_CURRENT_TIME] = __config[I_NEXT_TIME] = __config[I_FPS_TIME] = 0;\n }\n // 添加每帧回调且立刻执行,本次执行调用refreshTask也是下一帧再渲染,frame的每帧都是下一帧\n // frame.offFrame(this);\n frame.onFrame(this);\n __config[I_START_TIME] = frame.__now;\n __config[I_END] = false;\n return this;\n }\n\n __before(diff) {\n let __config = this.__config;\n __config[I_TIME_STAMP] = frame.__now;\n let target = __config[I_TARGET];\n let fps = __config[I_FPS];\n let playCount = 0;\n let currentFrames = __config[I_CURRENT_FRAMES];\n let iterations = __config[I_ITERATIONS];\n let stayBegin = __config[I_STAY_BEGIN];\n let stayEnd = __config[I_STAY_END];\n let delay = __config[I_DELAY];\n let root = __config[I_ROOT];\n let is2 = __config[I_IS2];\n let endTime = __config[I_END_TIME];\n let duration = __config[I_DURATION];\n let endDelay = __config[I_END_DELAY];\n let length = currentFrames.length;\n // 用本帧和上帧时间差,计算累加运行时间currentTime,以便定位当前应该处于哪个时刻\n let [currentTime, d] = calDiffTime(__config, diff);\n diff = d;\n // 增加的fps功能,当<60时计算跳帧,每帧运行依旧累加时间,达到fps时重置,第一帧强制不跳\n if(!__config[I_FIRST_ENTER] && fps < 60) {\n diff = __config[I_FPS_TIME] += diff;\n if(diff < 1000 / fps) {\n __config[I_IN_FPS] = true;\n return;\n }\n __config[I_FPS_TIME] = 0;\n }\n __config[I_FIRST_ENTER] = false;\n // delay仅第一次生效等待\n if(currentTime < delay) {\n if(stayBegin) {\n let currentFrame = __config[I_CURRENT_FRAME] = currentFrames[0];\n let current = currentFrame[FRAME_STYLE];\n genBeforeRefresh(current, __config[I_KEYS], __config, root, target);\n }\n __config[I_BEGIN] = false; // 默认是true,delay置false防触发\n // 即便不刷新,依旧执行帧回调,同时标明让后续第一帧响应begin\n __config[I_OUT_BEGIN_DELAY] = true;\n __config[I_IS_DELAY] = true;\n return;\n }\n // 减去delay,计算在哪一帧\n currentTime -= delay;\n if(__config[I_OUT_BEGIN_DELAY]) {\n __config[I_OUT_BEGIN_DELAY] = false;\n __config[I_BEGIN] = true;\n }\n // 超过duration非尾轮需处理回到开头,触发新一轮动画事件,这里可能时间间隔非常大直接跳过几轮\n let round;\n while(currentTime >= duration && playCount < iterations - 1) {\n currentTime -= duration;\n playCount++;\n }\n if(__config[I_PLAY_COUNT] < playCount) {\n __config[I_BEGIN] = true;\n round = true;\n }\n __config[I_PLAY_COUNT] = playCount;\n // 如果发生轮换,需重新确定正反向\n if(round) {\n let direction = __config[I_DIRECTION];\n let frames = __config[I_FRAMES];\n let framesR = __config[I_FRAMES_R];\n let isAlternate = {\n alternate: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(direction);\n // 有正反向播放需要重设帧序列\n if(isAlternate) {\n let isEven = playCount % 2 === 0;\n if(direction === 'alternate') {\n currentFrames = __config[I_CURRENT_FRAMES] = isEven ? frames : framesR;\n }\n else {\n currentFrames = __config[I_CURRENT_FRAMES] = isEven ? framesR : frames;\n }\n }\n }\n let isLastCount = playCount >= iterations - 1;\n // 只有2帧可优化,否则2分查找当前帧\n let i, frameTime;\n if(is2) {\n i = currentTime < endTime ? 0 : 1;\n frameTime = endTime;\n }\n else {\n i = binarySearch(0, length - 1, currentTime, currentFrames);\n frameTime = currentFrames[i][FRAME_TIME];\n }\n // 最后一帧结束动画,仅最后一轮才会进入,需处理endDelay\n let isLastFrame = isLastCount && i === length - 1;\n let percent = 0;\n if(isLastFrame) {\n // 无需任何处理\n }\n // 否则根据目前到下一帧的时间差,计算百分比,再反馈到变化数值上\n else if(is2) {\n percent = currentTime / duration;\n }\n else {\n let total = currentFrames[i + 1][FRAME_TIME] - frameTime;\n percent = (currentTime - frameTime) / total;\n }\n let inEndDelay, currentFrame = currentFrames[i], current;\n __config[I_CURRENT_FRAME] = currentFrame;\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 if(isLastFrame) {\n inEndDelay = currentTime < duration + endDelay;\n // 停留对比最后一帧,endDelay可能会多次进入这里,第二次进入样式相等不再重绘\n if(stayEnd) {\n current = cloneStyle(currentFrame[FRAME_STYLE], __config[I_KEYS]);\n }\n // 不停留或超过endDelay则计算还原,有endDelay且fill模式不停留会再次进入这里\n else {\n current = cloneStyle(__config[I_ORIGIN_STYLE], __config[I_KEYS]);\n }\n // 进入endDelay或结束阶段触发end事件,注意只触发一次,防重在触发的地方做\n __config[I_NEXT_END] = true;\n if(!inEndDelay) {\n __config[I_PLAY_COUNT]++;\n __config[I_FINISHED] = true;\n frame.offFrame(this);\n needClean = true;\n __config[I_NEXT_TIME] = 0;\n }\n }\n else {\n current = calIntermediateStyle(currentFrame, __config[I_KEYS], percent, target);\n }\n // 无论两帧之间是否有变化,都生成计算结果赋给style,去重在root做\n genBeforeRefresh(current, __config[I_KEYS], __config, root, target);\n if(needClean) {\n let playCb = __config[I_PLAY_CB];\n this.__clean(true);\n // 丑陋的做法,防止gotoAndStop()这样的cb被clean()掉\n if(playCb) {\n __config[I_PLAY_CB] = playCb;\n }\n }\n }\n\n __after(diff) {\n let __config = this.__config;\n __config[I_ASSIGNING] = false;\n if(__config[I_IN_FPS]) {\n __config[I_IN_FPS] = false;\n return;\n }\n frameCb(this, __config, diff, __config[I_IS_DELAY]);\n __config[I_IS_DELAY] = false;\n if(__config[I_BEGIN]) {\n __config[I_BEGIN] = false;\n this.emit(Event.BEGIN, __config[I_PLAY_COUNT]);\n }\n // end事件只触发一次,末轮进入endDelay或直接结束时\n if(__config[I_NEXT_END] && !__config[I_END]) {\n __config[I_END] = true;\n this.emit(Event.END, __config[I_PLAY_COUNT] - 1);\n }\n if(__config[I_FINISHED]) {\n __config[I_BEGIN] = __config[I_END] = __config[I_IS_DELAY] = __config[I_FINISHED]\n = __config[I_IN_FPS] = __config[I_ENTER_FRAME] = false;\n __config[I_PLAY_STATE] = 'finished';\n this.emit(Event.FINISH);\n }\n }\n\n pause(silence) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let { pending } = this;\n if(isDestroyed || duration <= 0 || pending) {\n return this;\n }\n __config[I_PLAY_STATE] = 'paused';\n this.__cancelTask();\n if(!silence) {\n this.emit(Event.PAUSE);\n }\n return this;\n }\n\n resume(cb) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n if(isDestroyed || duration <= 0 || playState !== 'paused') {\n return this;\n }\n return this.play(cb);\n }\n\n finish(cb) {\n let self = this;\n let __config = self.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n let frames = __config[I_FRAMES];\n if(isDestroyed || duration <= 0 || frames.length < 1 || playState === 'finished' || playState === 'idle') {\n return self;\n }\n // 先清除所有回调任务,多次调用finish也会清除只留最后一次\n self.__cancelTask();\n let root = __config[I_ROOT];\n let originStyle = __config[I_ORIGIN_STYLE];\n if(root) {\n let current;\n // 停留在最后一帧\n if(__config[I_STAY_END]) {\n __config[I_CURRENT_FRAME] = frames[frames.length - 1];\n current = frames[frames.length - 1][FRAME_STYLE];\n }\n else {\n current = originStyle;\n }\n root.addRefreshTask({\n __before() {\n __config[I_ASSIGNING] = true;\n genBeforeRefresh(current, __config[I_KEYS], __config, root, __config[I_TARGET]);\n self.__clean(true);\n },\n __after(diff) {\n if(!self.__hasFin) {\n self.__hasFin = true;\n __config[I_ASSIGNING] = false;\n frameCb(self, __config, diff);\n __config[I_BEGIN] = __config[I_END] = __config[I_IS_DELAY] = __config[I_FINISHED]\n = __config[I_IN_FPS] = __config[I_ENTER_FRAME] = false;\n self.emit(Event.FINISH);\n }\n if(isFunction(cb)) {\n cb.call(self, diff);\n }\n },\n });\n }\n return self;\n }\n\n cancel(cb) {\n let self = this;\n let __config = self.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n let frames = __config[I_FRAMES];\n if(isDestroyed || duration <= 0 || playState === 'idle' || frames.length < 1) {\n return self;\n }\n self.__cancelTask();\n let root = __config[I_ROOT];\n let originStyle = __config[I_ORIGIN_STYLE];\n if(root) {\n root.addRefreshTask({\n __before() {\n __config[I_ASSIGNING] = true;\n genBeforeRefresh(originStyle, __config[I_KEYS], __config, root, __config[I_TARGET]);\n self.__clean();\n },\n __after(diff) {\n if(!self.__hasCancel) {\n self.__hasCancel = true;\n __config[I_ASSIGNING] = false;\n frameCb(self, __config, diff);\n __config[I_BEGIN] = __config[I_END] = __config[I_IS_DELAY] = __config[I_FINISHED]\n = __config[I_IN_FPS] = __config[I_ENTER_FRAME] = false;\n self.emit(Event.CANCEL);\n }\n if(isFunction(cb)) {\n cb.call(self, diff);\n }\n },\n });\n }\n return self;\n }\n\n gotoAndPlay(v, options, cb) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let frames = __config[I_FRAMES];\n let delay = __config[I_DELAY];\n let endDelay = __config[I_END_DELAY];\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 __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let frames = __config[I_FRAMES];\n let delay = __config[I_DELAY];\n let endDelay = __config[I_END_DELAY];\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(diff => {\n __config[I_PLAY_STATE] = 'paused';\n this.__cancelTask();\n if(isFunction(cb)) {\n cb.call(this, diff);\n }\n });\n }\n\n // 同步赋予,用在extendAnimate\n assignCurrentStyle() {\n let __config = this.__config;\n let style = __config[I_STYLE];\n let target = __config[I_TARGET];\n let keys = __config[I_KEYS];\n keys.forEach(i => {\n if(style.hasOwnProperty(i)) {\n let v = style[i];\n // geom的属性变化\n if(GEOM.hasOwnProperty(i)) {\n target.currentProps[i] = v;\n }\n // 样式\n else {\n // 将动画样式直接赋给currentStyle\n target.currentStyle[i] = v;\n }\n }\n });\n }\n\n // 返回不包含delay且去除多轮的时间\n __goto(v, isFrame, excludeDelay) {\n let __config = this.__config;\n let iterations = __config[I_ITERATIONS];\n let duration = __config[I_DURATION];\n __config[I_PLAY_STATE] = '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 += __config[I_DELAY];\n }\n // 在时间范围内设置好时间,复用play直接跳到播放点\n __config[I_NEXT_TIME] = v;\n v -= __config[I_DELAY];\n // 超过时间长度需要累加次数,这里可以超过iterations,因为设定也许会非常大\n let playCount = 0;\n while(v >= duration && playCount < iterations - 1) {\n playCount++;\n v -= duration;\n }\n __config[I_PLAY_COUNT] = playCount;\n // 防止play()重置时间和当前帧组,提前计算好\n __config[I_ENTER_FRAME] = true;\n let frames = __config[I_FRAMES];\n let framesR = __config[I_FRAMES_R];\n let direction = __config[I_DIRECTION];\n if({\n alternate: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(direction)) {\n let isEven = playCount % 2 === 0;\n if(direction === 'alternate') {\n __config[I_CURRENT_FRAMES] = isEven ? frames : framesR;\n }\n else {\n __config[I_CURRENT_FRAMES] = 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 __stayBegin() {\n return {\n backwards: true,\n both: true,\n }.hasOwnProperty(this.fill);\n }\n\n __stayEnd() {\n return {\n forwards: true,\n both: true,\n }.hasOwnProperty(this.fill);\n }\n\n __setTarget(target) {\n this.__target = target;\n this.__config[I_TARGET] = target;\n this.__config[I_NODE_CONFIG] = target.__config;\n }\n\n __cancelTask() {\n frame.offFrame(this);\n this.__config[I_PLAY_CB] = null;\n }\n\n __destroy(sync) {\n let self = this;\n let __config = self.__config;\n if(__config[I_DESTROYED]) {\n return;\n }\n self.removeControl();\n // clean异步执行,因为里面的样式还原需要等到下一帧,否则同步执行清除后,紧接着的新同步动画获取不到currentStyle\n if(sync) {\n self.__clean();\n __config[I_TARGET] = null;\n }\n else {\n frame.nextFrame({\n __before() {\n self.__clean();\n __config[I_TARGET] = null;\n },\n });\n }\n __config[I_START_TIME] = 0;\n __config[I_DESTROYED] = true;\n }\n\n __checkModify() {\n let __config = this.__config;\n if(__config[I_PLAY_STATE] !== 'idle' && __config[I_PLAY_STATE] !== '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.__config[I_TARGET];\n }\n\n get root() {\n return this.__config[I_ROOT];\n }\n\n get keys() {\n return this.__config[I_KEYS];\n }\n\n get style() {\n return this.__config[I_STYLE];\n }\n\n get options() {\n return this.__options;\n }\n\n get duration() {\n return this.__config[I_DURATION];\n }\n\n set duration(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_DURATION] !== v) {\n __config[I_DURATION] = v;\n __config[I_END_TIME] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get delay() {\n return this.__config[I_DELAY];\n }\n\n set delay(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_DELAY] !== v) {\n __config[I_DELAY] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get endDelay() {\n return this.__config[I_END_DELAY];\n }\n\n set endDelay(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_END_DELAY] !== v) {\n __config[I_END_DELAY] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get fps() {\n return this.__config[I_FPS];\n }\n\n set fps(v) {\n v = parseInt(v) || 60;\n let __config = this.__config;\n if(__config[I_FPS] !== v) {\n if(v <= 0) {\n v = 60;\n }\n __config[I_FPS] = v;\n }\n return v;\n }\n\n get spf() {\n return 1 / this.fps;\n }\n\n get iterations() {\n return this.__config[I_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 let __config = this.__config;\n if(__config[I_ITERATIONS] !== v) {\n __config[I_ITERATIONS] = v;\n }\n return v;\n }\n\n get fill() {\n return this.__config[I_FILL];\n }\n\n set fill(v) {\n v = v || 'none';\n let __config = this.__config;\n if(__config[I_FILL] !== v) {\n __config[I_FILL] = v;\n this.__checkModify();\n }\n __config[I_STAY_BEGIN] = {\n backwards: true,\n both: true,\n }.hasOwnProperty(v);\n __config[I_STAY_END] = {\n forwards: true,\n both: true,\n }.hasOwnProperty(v);\n return v;\n }\n\n get direction() {\n return this.__config[I_DIRECTION];\n }\n\n set direction(v) {\n v = v || 'normal';\n let __config = this.__config;\n if(__config[I_DIRECTION] !== v) {\n __config[I_DIRECTION] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get frames() {\n return this.__config[I_FRAMES];\n }\n\n get framesR() {\n return this.__config[I_FRAMES_R];\n }\n\n get playbackRate() {\n return this.__config[I_PLAYBACK_RATE];\n }\n\n set playbackRate(v) {\n v = parseFloat(v) || 1;\n if(v <= 0) {\n v = 1;\n }\n let __config = this.__config;\n if(__config[I_PLAYBACK_RATE] !== v) {\n __config[I_PLAYBACK_RATE] = v;\n }\n return v;\n }\n\n get easing() {\n return this.__config[I_EASING];\n }\n\n get startTime() {\n return this.__config[I_START_TIME];\n }\n\n get currentTime() {\n return this.__config[I_CURRENT_TIME];\n }\n\n set currentTime(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_CURRENT_TIME] !== v) {\n __config[I_CURRENT_TIME] = v;\n __config[I_NEXT_TIME] = v;\n }\n return v;\n }\n\n get nextTime() {\n return this.__config[I_NEXT_TIME];\n }\n\n set nextTime(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_NEXT_TIME] !== v) {\n __config[I_NEXT_TIME] = v;\n }\n return v;\n }\n\n get timestamp() {\n return this.__config[I_TIME_STAMP];\n }\n\n get pending() {\n return this.__config[I_PLAY_STATE] !== 'running';\n }\n\n get finished() {\n return this.__config[I_PLAY_STATE] === 'finished';\n }\n\n get playState() {\n return this.__config[I_PLAY_STATE];\n }\n\n get playCount() {\n return this.__config[I_PLAY_COUNT];\n }\n\n set playCount(v) {\n v = Math.max(0, parseInt(v) || 0);\n let __config = this.__config;\n if(__config[I_PLAY_COUNT] !== v) {\n __config[I_PLAY_COUNT] = v;\n }\n return v;\n }\n\n get isDestroyed() {\n return this.__config[I_DESTROYED];\n }\n\n get animating() {\n let __config = this.__config;\n let playState = __config[I_PLAY_STATE];\n if(playState === 'idle') {\n return false;\n }\n return playState !== 'finished' || __config[I_STAY_END] || __config[I_STAY_BEGIN];\n }\n\n get spfLimit() {\n let __config = this.__config;\n return __config[I_SPF_LIMIT];\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 let __config = this.__config;\n if(__config[I_SPF_LIMIT] !== v) {\n __config[I_SPF_LIMIT] = v;\n }\n return v;\n }\n\n get assigning() {\n return this.__config[I_ASSIGNING];\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';\nimport enums from '../util/enums';\n\nconst {\n NODE_KEY: {\n NODE_DEFS_CACHE,\n }\n} = enums;\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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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 MBM_HASH = {\n multiply: true,\n screen: true,\n overlay: true,\n darken: true,\n lighten: true,\n colorDodge: true,\n colorBurn: true,\n hardLight: true,\n softLight: true,\n difference: true,\n exclusion: true,\n hue: true,\n saturation: true,\n color: true,\n luminosity: true,\n};\n\nfunction mbmName(v) {\n if(v) {\n return v.replace(/[A-Z]/, function($0) {\n return '-' + $0.toLowerCase();\n });\n }\n}\n\nfunction isValidMbm(v) {\n return MBM_HASH.hasOwnProperty(v);\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 Cache from '../refresh/Cache';\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 { LOCAL } = Cache;\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 UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_FOCUS,\n UPDATE_STYLE,\n UPDATE_OVERWRITE,\n UPDATE_KEYS,\n UPDATE_CONFIG,\n UPDATE_REMOVE_DOM,\n },\n STRUCT_KEY: {\n STRUCT_HAS_MASK,\n },\n NODE_KEY: {\n NODE_TAG_NAME,\n NODE_CACHE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_STYLE,\n NODE_STRUCT,\n NODE_OPACITY,\n NODE_MATRIX_EVENT,\n NODE_MATRIX,\n NODE_LIMIT_CACHE,\n NODE_HAS_CONTENT,\n NODE_REFRESH_LV,\n NODE_CACHE,\n NODE_CACHE_TOTAL,\n NODE_CACHE_FILTER,\n NODE_CACHE_MASK,\n NODE_CACHE_OVERFLOW,\n NODE_IS_DESTROYED,\n NODE_DEFS_CACHE,\n NODE_DOM_PARENT,\n NODE_IS_INLINE,\n NODE_PERSPECTIVE_MATRIX,\n NODE_IS_MASK,\n NODE_VIRTUAL_DOM,\n NODE_CACHE_AS_BITMAP,\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 NONE,\n TRANSFORM: TF,\n REFLOW,\n REPAINT,\n TRANSLATE_X: TX,\n TRANSLATE_Y: TY,\n TRANSLATE_Z: TZ,\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.__config[NODE_IS_INLINE]) {\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 let isMask = this.__isMask = isClip || !!this.props.mask;\n let config = this.__config;\n config[NODE_TAG_NAME] = tagName;\n config[NODE_CACHE_STYLE] = this.__cacheStyle;\n config[NODE_CURRENT_STYLE] = this.__currentStyle;\n config[NODE_COMPUTED_STYLE] = this.__computedStyle;\n config[NODE_REFRESH_LV] = REFLOW;\n config[NODE_STYLE] = this.__style;\n config[NODE_MATRIX] = [];\n config[NODE_MATRIX_EVENT] = [];\n config[NODE_DEFS_CACHE] = this.__cacheDefs;\n config[NODE_IS_MASK] = isMask;\n this.__frameAnimateList = [];\n this.__contentBoxList = []; // inline存储内容用\n // this.__json domApi需要获取生成时的json引用,builder过程添加,如appendChild时json也需要跟着变更\n config[NODE_CACHE_AS_BITMAP] = this.__cacheAsBitmap = !!this.props.cacheAsBitmap;\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(i, lv, j) {\n let res = super.__structure(i, lv, j);\n if(this.__hasMask) {\n res[STRUCT_HAS_MASK] = this.__hasMask;\n }\n this.__config[NODE_STRUCT] = res;\n return res;\n }\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[1] === PX) {\n return v[0];\n }\n else if(v[1] === PERCENT && includePercent) {\n return v[0] * w * 0.01;\n }\n else if(v[1] === REM) {\n return v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n return v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n return v[0] * this.root.height * 0.01;\n }\n else if(v[1] === VMAX) {\n return v[0] * Math.max(this.root.width, this.root.height) * 0.01;\n }\n else if(v[1] === VMIN) {\n return v[0] * 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, 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[1] === INHERIT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : parentComputedStyle[k];\n }\n else {\n computedStyle[k] = v[0];\n let ff = v[0].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[1] === INHERIT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : parentComputedStyle[k];\n }\n // 只有fontSize会有%\n else if(v[1] === PERCENT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (parentComputedStyle[k] * v[0] * 0.01);\n }\n else if(v[1] === REM) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (this.root.computedStyle[FONT_SIZE] * v[0]);\n }\n else if(v[1] === VW) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (this.root.width * 0.01 * v[0]);\n }\n else if(v[1] === VH) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (this.root.height * 0.01 * v[0]);\n }\n else if(v[1] === VMAX) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (Math.max(this.root.width, this.root.height) * 0.01 * v[0]);\n }\n else if(v[1] === VMIN) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (Math.min(this.root.width, this.root.height) * 0.01 * v[0]);\n }\n else {\n computedStyle[k] = v[0];\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[1] === INHERIT) {\n computedStyle[TEXT_ALIGN] = isRoot ? 'left' : parentComputedStyle[TEXT_ALIGN];\n }\n else {\n computedStyle[TEXT_ALIGN] = textAlign[0];\n }\n let fontSize = computedStyle[FONT_SIZE];\n let lineHeight = currentStyle[LINE_HEIGHT];\n // lineHeight继承很特殊,数字和normal不同于普通单位\n if(lineHeight[1] === 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[1] !== INHERIT) {\n break;\n }\n p = p.domParent;\n }\n // 到root还是inherit或normal,或者中途遇到了normal,使用normal\n if([AUTO, INHERIT].indexOf(ph[1]) > -1) {\n computedStyle[LINE_HEIGHT] = calNormalLineHeight(computedStyle);\n }\n // 数字继承\n else if(ph[1] === NUMBER) {\n computedStyle[LINE_HEIGHT] = Math.max(ph[0], 0) * fontSize;\n }\n // 单位继承\n else {\n computedStyle[LINE_HEIGHT] = parentComputedStyle[LINE_HEIGHT];\n }\n }\n }\n else if(lineHeight[1] === NUMBER) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight[0], 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[1] === 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[1] === INHERIT) {\n computedStyle[WHITE_SPACE] = isRoot ? 'normal' : parentComputedStyle[WHITE_SPACE];\n }\n else {\n computedStyle[WHITE_SPACE] = whiteSpace[0];\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, __config } = node;\n if(!root) {\n return;\n }\n let v = currentStyle[FONT_FAMILY];\n if(v[1] === INHERIT) {\n return;\n }\n let ff = v[0].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.addRefreshTask({\n __before() {\n if(__config[NODE_IS_DESTROYED]) {\n return;\n }\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_FOCUS] = level.REFLOW; // 强制执行\n res[UPDATE_CONFIG] = __config;\n root.__addUpdate(node, __config, root, root.__config, res);\n },\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 // absolute且无尺寸时,isAbs标明先假布局一次计算尺寸,还有flex列计算时isColumn假布局,flex横计算时writingMode垂直假布局\n __layout(data, isAbs, isColumn, isRow) {\n this.__computeReflow();\n let { w } = data;\n let { isDestroyed, currentStyle, computedStyle, __config, __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,\n h: data.h,\n lx: data.lx,\n ly: data.ly,\n isUpright: data.isUpright, // 从Root开始,父级的书写模式需每层传递\n };\n // 防止display:none不统计mask,isVirtual忽略,abs/flex布局后续会真正来走一遍\n if(!isAbs && !isColumn && !isRow) {\n this.clearCache();\n __config[NODE_REFRESH_LV] = REFLOW;\n __config[NODE_LIMIT_CACHE] = false;\n __config[NODE_IS_INLINE] = 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.__width = this.__height\n = this.__clientWidth = this.__clientHeight\n = this.__offsetWidth = this.__offsetHeight\n = this.__outerWidth = this.__outerHeight\n = computedStyle[WIDTH] = computedStyle[HEIGHT] = 0;\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, 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 // relative渲染时做偏移,百分比基于父元素,若父元素没有定高则为0\n if(!isAbs && !isColumn && !isRow) {\n if(position === 'relative') {\n let {[TOP]: top, [RIGHT]: right, [BOTTOM]: bottom, [LEFT]: left} = currentStyle;\n let {parent} = this;\n if(top[1] !== AUTO) {\n let n = calRelative(currentStyle, TOP, top, parent);\n this.__offsetY(n);\n computedStyle[TOP] = n;\n computedStyle[BOTTOM] = 'auto';\n }\n else if(bottom[1] !== AUTO) {\n let n = calRelative(currentStyle, BOTTOM, bottom, parent);\n this.__offsetY(-n);\n computedStyle[BOTTOM] = n;\n computedStyle[TOP] = 'auto';\n }\n else {\n computedStyle[TOP] = computedStyle[BOTTOM] = 'auto';\n }\n if(left[1] !== AUTO) {\n let n = calRelative(currentStyle, LEFT, left, parent, true);\n this.__offsetX(n);\n computedStyle[LEFT] = n;\n computedStyle[RIGHT] = 'auto';\n }\n else if (right[1] !== AUTO) {\n let n = calRelative(currentStyle, RIGHT, right, parent, true);\n this.__offsetX(-n);\n computedStyle[RIGHT] = n;\n computedStyle[LEFT] = 'auto';\n }\n else {\n computedStyle[LEFT] = computedStyle[RIGHT] = 'auto';\n }\n }\n else if (position !== 'absolute') {\n computedStyle[TOP] = computedStyle[BOTTOM] = computedStyle[LEFT] = computedStyle[RIGHT] = 'auto';\n }\n // 计算结果存入computedStyle和6个坐标,inline在其inlineSize特殊处理\n let x = this.__sx = this.x + this.ox;\n let y = this.__sy = this.y + this.oy;\n if(!__config[NODE_IS_INLINE]) {\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 __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 let { computedStyle } = this;\n computedStyle[DISPLAY] = 'none';\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 = 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 } = 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 {\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[1] !== AUTO && !isInline) {\n fixedWidth = true;\n w = this.__calSize(width, w, true);\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 else if(height[1] !== AUTO && !isInline) {\n fixedHeight = true;\n h = this.__calSize(height, h, true);\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[1] === AUTO || w3 !== undefined) {\n w -= borderLeftWidth + borderRightWidth + marginLeft + marginRight + paddingLeft + paddingRight;\n }\n if(height[1] === 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[1] !== AUTO || this.isReplaced) && marginTop[1] === AUTO && marginBottom[1] === AUTO) {\n let oh = this.outerHeight;\n if(oh < data.h) {\n this.__offsetY((data.h - oh) * 0.5, true);\n }\n }\n }\n else {\n if((width[1] !== AUTO || this.isReplaced) && marginLeft[1] === AUTO && marginRight[1] === AUTO) {\n let ow = this.outerWidth;\n if(ow < data.w) {\n this.__offsetX((data.w - ow) * 0.5, true);\n }\n }\n }\n }\n }\n\n __calMatrix(lv, __cacheStyle, currentStyle, computedStyle, __config, sx1, sy1, offsetWidth, offsetHeight) {\n if(__config[NODE_IS_INLINE]) {\n computedStyle[TRANSFORM_ORIGIN] = [sx1, sy1];\n return __cacheStyle[MATRIX] = mx.identity();\n }\n let matrixCache = __cacheStyle[MATRIX];\n // tx/ty变化特殊优化\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 // 不访问this.offsetWidth性能提升,暂时性\n else if(v[1] === PX) {\n v = v[0];\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[1] === PX) {\n v = v[0];\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(sx1 === undefined) {\n sx1 = this.__sx1;\n sy1 = this.__sy1;\n offsetWidth = this.offsetWidth;\n offsetHeight = this.offsetHeight;\n }\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]) {\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][0]];\n if(v[3][0] === 0) {\n return;\n }\n temp.push([k, v]);\n return;\n }\n computedStyle[k] = v[0];\n if(k === ROTATE_X || k === ROTATE_Y || k === ROTATE_Z) {\n temp.push([k, v]);\n return;\n }\n // scale为1和其它为0避免计算浪费\n let isScale = k === SCALE_X || k === SCALE_Y || k === SCALE_Z;\n if(v[0] === 1 && isScale || !isScale && v[0] === 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 matrixCache;\n }\n\n /**\n * 将currentStyle计算为computedStyle,同时存入cacheStyle可缓存的结果防止无变更重复计算\n * @param renderMode\n * @param ctx\n * @param parent\n * @param __cacheStyle\n * @param currentStyle\n * @param computedStyle\n * @param clientWidth\n * @param clientHeight\n * @param offsetWidth\n * @param offsetHeight\n * @param borderTopWidth\n * @param borderRightWidth\n * @param borderBottomWidth\n * @param borderLeftWidth\n * @param paddingTop\n * @param paddingRight\n * @param paddingBottom\n * @param paddingLeft\n * @param x1\n * @param x2\n * @param x3\n * @param x4\n * @param x5\n * @param x6\n * @param y1\n * @param y2\n * @param y3\n * @param y4\n * @param y5\n * @param y6\n * @returns {*[]}\n * @private\n */\n __calCache(renderMode, ctx, parent, __cacheStyle, currentStyle, computedStyle,\n clientWidth, clientHeight, offsetWidth, offsetHeight,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth,\n paddingTop, paddingRight, paddingBottom, paddingLeft,\n x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6) {\n let bx1 = x1, by1 = y1, bx2 = x6, by2 = y6;\n let backgroundClip = computedStyle[BACKGROUND_CLIP] = currentStyle[BACKGROUND_CLIP];\n // 默认border-box\n if(backgroundClip === 'paddingBox') {\n bx1 = x2;\n by1 = y2;\n bx2 = x5;\n by2 = y5;\n }\n else if(backgroundClip === 'contentBox') {\n bx1 = x3;\n by1 = y3;\n bx2 = x4;\n by2 = y4;\n }\n let isInline = this.__config[NODE_IS_INLINE];\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 __cacheStyle[FILTER] = true;\n this.__calFilter(currentStyle, computedStyle);\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[1] === PERCENT) {\n return item[0] + '%';\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[1] === PERCENT) {\n return item[0] + '%';\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[1] === AUTO) {\n return -1;\n }\n else if(item2[1] === STRING) {\n return item2[0] === '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[0];\n }\n return null;\n });\n __cacheStyle[BACKGROUND_IMAGE] = bgI.map((bgi, i) => {\n if(!bgi) {\n return null;\n }\n // 防止隐藏不加载背景图\n if(bgi[1] === STRING) {\n let loadBgi = this.__loadBgi[i] = this.__loadBgi[i] || {};\n let cache = inject.IMG[bgi[0]];\n if(cache && cache.state === inject.LOADED) {\n loadBgi.url = bgi[0];\n loadBgi.source = cache.source;\n loadBgi.width = cache.width;\n loadBgi.height = cache.height;\n }\n else if(loadBgi.url !== bgi[0]) {\n // 可能改变导致多次加载,每次清空,成功后还要比对url是否相同\n loadBgi.url = bgi[0];\n loadBgi.source = null;\n let node = this;\n let root = node.root;\n inject.measureImg(bgi[0], 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 root.delRefreshTask(loadBgi.cb);\n root.addRefreshTask(loadBgi.cb = {\n __before() {\n __cacheStyle[BACKGROUND_IMAGE] = undefined;\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_FOCUS] = REPAINT;\n res[UPDATE_CONFIG] = node.__config;\n root.__addUpdate(node, node.__config, root, root.__config, res);\n },\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[0] && bgi[1] === 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][0]);\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(offsetWidth, 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 ['Top', 'Right', 'Bottom', 'Left'].forEach(k => {\n k = 'border' + k;\n let k2 = STYLE_KEY[style2Upper(k)];\n let kw = STYLE_KEY[style2Upper(k + 'Width')];\n let ks = STYLE_KEY[style2Upper(k + 'Style')];\n // width/style变更影响border重新计算\n if(isNil(__cacheStyle[kw])) {\n __cacheStyle[kw] = true;\n __cacheStyle[k2] = undefined;\n }\n if(isNil(__cacheStyle[ks])) {\n __cacheStyle[ks] = true;\n __cacheStyle[k2] = undefined;\n }\n if(isNil(__cacheStyle[k2])) {\n if(k2 === BORDER_TOP) {\n if(borderTopWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderTopWidth / borderLeftWidth);\n let deg2 = Math.atan(borderTopWidth / borderRightWidth);\n __cacheStyle[k2] = border.calPoints(borderTopWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 0, btlr, btrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_RIGHT) {\n if(borderRightWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderRightWidth / borderTopWidth);\n let deg2 = Math.atan(borderRightWidth / borderBottomWidth);\n __cacheStyle[k2] = border.calPoints(borderRightWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 1, btrr, bbrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_BOTTOM) {\n if(borderBottomWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderBottomWidth / borderLeftWidth);\n let deg2 = Math.atan(borderBottomWidth / borderRightWidth);\n __cacheStyle[k2] = border.calPoints(borderBottomWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 2, bblr, bbrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_LEFT) {\n if(borderLeftWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderLeftWidth / borderTopWidth);\n let deg2 = Math.atan(borderLeftWidth / borderBottomWidth);\n __cacheStyle[k2] = border.calPoints(borderLeftWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 3, btlr, bblr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n }\n });\n // 强制计算继承性的\n let parentComputedStyle = parent && parent.computedStyle;\n if(currentStyle[FONT_STYLE][1] === 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][0];\n }\n __cacheStyle[FONT_STYLE] = computedStyle[FONT_STYLE];\n let color = currentStyle[COLOR];\n if(color[1] === 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[1] === GRADIENT) {\n __cacheStyle[COLOR] = computedStyle[COLOR] = color[0];\n }\n else if(color[1] === RGBA) {\n __cacheStyle[COLOR] = int2rgba(computedStyle[COLOR] = rgba2int(color[0]));\n }\n }\n let textStrokeColor = currentStyle[TEXT_STROKE_COLOR];\n if(textStrokeColor[1] === 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[1] === GRADIENT) {\n __cacheStyle[TEXT_STROKE_COLOR] = computedStyle[TEXT_STROKE_COLOR] = textStrokeColor[0];\n }\n else if(textStrokeColor[1] === RGBA) {\n __cacheStyle[TEXT_STROKE_COLOR] = int2rgba(computedStyle[TEXT_STROKE_COLOR] = rgba2int(textStrokeColor[0]));\n }\n }\n if(currentStyle[TEXT_STROKE_WIDTH][1] === 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[1] === REM) {\n v = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * this.root.height * 0.01;\n }\n else if(v[1] === VMAX) {\n v = v[0] * Math.max(this.root.width, this.root.height) * 0.01;\n }\n else if(v[1] === VMIN) {\n v = v[0] * Math.min(this.root.width, this.root.height) * 0.01;\n }\n else {\n v = v[0];\n }\n computedStyle[TEXT_STROKE_WIDTH] = v;\n __cacheStyle[TEXT_STROKE_WIDTH] = true;\n }\n if(currentStyle[TEXT_STROKE_OVER][1] === 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][0];\n }\n if(currentStyle[VISIBILITY][1] === INHERIT) {\n computedStyle[VISIBILITY] = parent ? parentComputedStyle[VISIBILITY] : 'visible';\n }\n else if(isNil(__cacheStyle[VISIBILITY])) {\n computedStyle[VISIBILITY] = currentStyle[VISIBILITY][0];\n }\n __cacheStyle[VISIBILITY] = computedStyle[VISIBILITY];\n if(currentStyle[POINTER_EVENTS][1] === 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][0];\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(__cacheStyle, currentStyle, computedStyle, __config, sx1, sy1) {\n let rebuild;\n if(isNil(__cacheStyle[PERSPECTIVE])) {\n __cacheStyle[PERSPECTIVE] = true;\n rebuild = true;\n let v = currentStyle[PERSPECTIVE];\n let ppt = this.__calSize(v, this.clientWidth, true);\n computedStyle[PERSPECTIVE] = ppt;\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 if(rebuild) {\n if(sx1 === undefined) {\n sx1 = this.__sx1;\n sy1 = this.__sy1;\n }\n let po = computedStyle[PERSPECTIVE_ORIGIN].slice(0);\n po[0] += sx1 || 0;\n po[1] += sy1 || 0;\n __config[NODE_PERSPECTIVE_MATRIX] = tf.calPerspectiveMatrix(computedStyle[PERSPECTIVE], po);\n }\n }\n\n __calFilter(currentStyle, computedStyle) {\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, v2];\n }\n else {\n // 部分%单位的滤镜强制使用数字\n if(v[1] === DEG || v[1] === PERCENT || v[1] === NUMBER) {\n v = v[0];\n }\n else {\n v = this.__calSize(v, this.root.width, false);\n }\n return [k, v];\n }\n });\n }\n\n __calContent(renderMode, lv, currentStyle, computedStyle) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n if(lv < REPAINT) {\n return this.__hasContent;\n }\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 true;\n }\n }\n }\n if(currentStyle[BACKGROUND_COLOR][0][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 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')]][0][3] > 0) {\n return 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 true;\n }\n }\n }\n }\n }\n return false;\n }\n\n /**\n * 渲染基础方法,Dom/Geom公用\n * @param renderMode\n * @see node/mode\n * @param lv\n * @see refresh/level\n * @param ctx canvas/svg/webgl共用\n * @param cache 是否是局部根节点缓存模式下的绘制\n * @see refresh/Cache.NA\n * @param dx cache时偏移x\n * @param dy cache时偏移y\n * @return Object\n * x1/x2/x3/x4/y1/y2/y3/y4 坐标\n * break svg判断无变化提前跳出\n * cacheError 离屏申请失败,仅canvas\n * offscreenBlend 无cache时的离屏canvas,仅canvas\n * offscreenFilter 无cache时的离屏canvas,仅canvas\n * offscreenOverflow 无cache时的离屏canvas,仅canvas\n * offscreenMask 无cache时的离屏canvas,仅canvas\n */\n render(renderMode, lv, ctx, cache, dx = 0, dy = 0) {\n let {\n isDestroyed,\n root,\n __config,\n } = this;\n let __cache = __config[NODE_CACHE];\n let __cacheStyle = __config[NODE_CACHE_STYLE];\n let currentStyle = __config[NODE_CURRENT_STYLE];\n let computedStyle = __config[NODE_COMPUTED_STYLE];\n // 渲染完认为完全无变更,等布局/动画/更新重置\n __config[NODE_REFRESH_LV] = NONE;\n // >=REPAINT清空bbox\n if(lv >= REPAINT) {\n this.__bbox = null;\n this.__filterBbox = null;\n }\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, __config, 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 __config[NODE_DEFS_CACHE].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 __config[NODE_DEFS_CACHE].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, __config, false, dx, dy);\n }\n }\n else if(bgi.k) {\n let gd = this.__gradient(renderMode, ctx, bx1, by1, bx2, by2, bgi, dx, dy);\n if(gd) {\n if(gd.k === 'conic') {\n gradient.renderConic(this, renderMode, ctx, gd.v, bx1, by1, bx2 - bx1, by2 - by1,\n btlr, btrr, bbrr, bblr);\n }\n else {\n bg.renderBgc(this, renderMode, ctx, gd.v, borderList,\n bx1, by1, bx2 - bx1, by2 - by1, btlr, btrr, bbrr, bblr, 'fill', false, dx, dy);\n }\n }\n }\n });\n }\n // boxShadow可能会有多个\n if(boxShadow) {\n boxShadow.forEach(item => {\n bs.renderBoxShadow(this, renderMode, ctx, item, x1, y1, x6, y6, x6 - x1, y6 - y1, dx, dy);\n });\n }\n // 边框需考虑尖角,两条相交边平分45°夹角\n if(borderTopWidth > 0 && borderTopColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_TOP], __cacheStyle[BORDER_TOP_COLOR], dx, dy);\n }\n if(borderRightWidth > 0 && borderRightColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_RIGHT], __cacheStyle[BORDER_RIGHT_COLOR], dx, dy);\n }\n if(borderBottomWidth > 0 && borderBottomColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_BOTTOM], __cacheStyle[BORDER_BOTTOM_COLOR], dx, dy);\n }\n if(borderLeftWidth > 0 && borderLeftColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_LEFT], __cacheStyle[BORDER_LEFT_COLOR], dx, dy);\n }\n return res;\n }\n\n __destroy() {\n if(this.isDestroyed) {\n return;\n }\n super.__destroy();\n let { root } = this;\n this.clearAnimate();\n this.clearFrameAnimate();\n // root在没有初始化到真实dom渲染的情况下没有\n root && root.delRefreshTask(this.__loadBgi.cb);\n root && root.delRefreshTask(this.__task);\n this.__task = null;\n this.__root = null;\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 }\n\n // 先查找到注册了事件的节点,再捕获冒泡判断增加性能\n __emitEvent(e, force) {\n let { isDestroyed, 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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].push(v);\n return 'url(#' + uuid + ')';\n }\n }\n\n __getCg(renderMode, ctx, gd) {\n let { stop } = gd;\n let len = stop.length - 1;\n if(stop[len][1] < 1) {\n stop.push([stop[len][0].slice(0), 1]);\n }\n if(stop[0][1] > 0) {\n stop.unshift([stop[0][0].slice(0), 0]);\n }\n // canvas采用点色值计算法,svg则分360度画块\n let res = [];\n if(renderMode === CANVAS || renderMode === WEBGL) {\n return gd;\n }\n return res;\n }\n\n // canvas清空自身cache,cacheTotal在Root的自底向上逻辑做,svg仅有cacheTotal\n clearCache(onlyTotal) {\n let __config = this.__config;\n let __cacheTotal = __config[NODE_CACHE_TOTAL];\n let __cacheFilter = __config[NODE_CACHE_FILTER];\n let __cacheMask = __config[NODE_CACHE_MASK];\n let __cacheOverflow = __config[NODE_CACHE_OVERFLOW];\n if(!onlyTotal) {\n __config[NODE_CACHE_STYLE] = this.__cacheStyle = {};\n let __cache = __config[NODE_CACHE];\n if(__cache) {\n __cache.release();\n }\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 }\n\n updateStyle(style, cb) {\n let node = this;\n let { root, __config } = node;\n let formatStyle = css.normalize(style);\n // 有root说明被添加渲染过了\n if(root) {\n root.addRefreshTask(node.__task = {\n __before() {\n node.__task = null;\n if(__config[NODE_IS_DESTROYED]) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_STYLE] = formatStyle;\n res[UPDATE_OVERWRITE] = style; // 标识盖原有style样式不仅仅是修改currentStyle,不同于animate\n res[UPDATE_KEYS] = Object.keys(formatStyle).map(i => {\n if(!GEOM.hasOwnProperty(i)) {\n i = parseInt(i);\n }\n return i;\n });\n res[UPDATE_CONFIG] = __config;\n root.__addUpdate(node, __config, root, root.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb.call(node, diff);\n }\n },\n });\n }\n // 没有是在如parse()还未添加的时候,可以直接同步覆盖\n else {\n Object.assign(this.currentStyle, formatStyle);\n if(isFunction(cb)) {\n cb.call(node, -1);\n }\n }\n }\n\n // 传入格式化好key/value的样式\n updateFormatStyle(style, cb) {\n let node = this;\n let { root, __config } = node;\n if(root) {\n root.addRefreshTask(node.__task = {\n __before() {\n node.__task = null; // 清除在before,防止after的回调增加新的task误删\n if(__config[NODE_IS_DESTROYED]) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_STYLE] = style;\n res[UPDATE_KEYS] = Object.keys(style).map(i => {\n if(!GEOM.hasOwnProperty(i)) {\n i = parseInt(i);\n }\n return i;\n });\n res[UPDATE_CONFIG] = __config;\n root.__addUpdate(node, __config, root, root.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb.call(node, diff);\n }\n },\n });\n }\n // 没有是在如parse()还未添加的时候,可以直接同步覆盖\n else {\n Object.assign(this.currentStyle, style);\n if(isFunction(cb)) {\n cb.call(node, -1);\n }\n }\n }\n\n animate(list, options = {}) {\n let animation = new Animation(this, list, options);\n if(this.isDestroyed) {\n animation.__destroy(true);\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/margin/flex/vertical等\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 if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\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 }\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 if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\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 }\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.__config[NODE_LIMIT_CACHE] = false;\n }\n if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\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.__config[NODE_LIMIT_CACHE] = false;\n }\n if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\n }\n this.clearCache();\n }\n\n __releaseWhenEmpty(__cache) {\n if(__cache && __cache.available) {\n __cache.release();\n }\n return true;\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 self = this;\n if(self.isDestroyed) {\n inject.warn('Remove target is destroyed.');\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n let { root, domParent } = self;\n let target = self.isShadowRoot ? self.hostRoot : self;\n // 特殊情况连续append/remove时候,还未被添加进来找不到所以无需删除\n if(domParent.children.indexOf(target) === -1) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null; // 清除在before,防止after的回调增加新的task误删\n let pJson = domParent.__json;\n let i = pJson.children.indexOf(self.isShadowRoot ? self.hostRoot.__json : self.__json);\n if(i === -1) {\n throw new Error('Remove index Exception.')\n }\n pJson.children.splice(i, 1);\n domParent.children.splice(i, 1);\n let zChildren = domParent.zIndexChildren;\n // 可能appendChild会清空没有\n if(zChildren) {\n let j = zChildren.indexOf(self.isShadowRoot ? self.hostRoot : self);\n if(j > -1) {\n zChildren.splice(j, 1);\n }\n }\n if(self.__prev) {\n self.__prev.__next = self.__next;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = REFLOW;\n res[UPDATE_REMOVE_DOM] = true;\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n __after(diff) {\n self.isShadowRoot ? self.hostRoot.__destroy() : self.__destroy();\n if(isFunction(cb)) {\n cb.call(self, diff);\n }\n },\n });\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;\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 matrix() {\n return this.__config[NODE_MATRIX];\n }\n\n get matrixEvent() {\n return this.__config[NODE_MATRIX_EVENT];\n }\n\n get perspectiveMatrix() {\n return this.__config[NODE_PERSPECTIVE_MATRIX];\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.__config[NODE_CACHE_AS_BITMAP] = 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 enums from '../util/enums';\nimport unit from '../style/unit';\nimport level from './level';\n\nconst {\n STYLE_KEY: {\n DISPLAY,\n TOP,\n BOTTOM,\n POSITION,\n HEIGHT,\n },\n} = enums;\nconst { AUTO, PX, PERCENT } = unit;\nconst { REFLOW } = level;\n\nfunction offsetAndResizeByNodeOnY(node, root, reflowHash, dy, inDirectAbsList) {\n if(dy) {\n let last;\n do {\n // component的sr没有next兄弟,视为component的next\n while(node.isShadowRoot) {\n node = node.host;\n }\n last = node;\n let isContainer, parent = node.domParent;\n if(parent) {\n let cs = parent.computedStyle;\n let ps = cs[POSITION];\n isContainer = parent === root || parent.isShadowRoot || ps === 'relative' || ps === 'absolute';\n }\n // 先偏移next,忽略有定位的absolute,本身非container也忽略\n let next = node.next;\n let container;\n while(next) {\n if(next.computedStyle[DISPLAY] !== 'none') {\n if(next.currentStyle[POSITION] === 'absolute') {\n let { [TOP]: top, [BOTTOM]: bottom, [HEIGHT]: height } = next.currentStyle;\n if(top[1] === AUTO) {\n if(bottom[1] === AUTO || bottom[1] === PX) {\n next.__offsetY(dy, true, REFLOW);\n next.clearCache();\n }\n else if(bottom[1] === PERCENT) {\n let v = (1 - bottom[0] * 0.01) * dy;\n next.__offsetY(v, true, REFLOW);\n next.clearCache();\n }\n }\n else if(top[1] === PERCENT) {\n let v = top[0] * 0.01 * dy;\n next.__offsetY(v, true, REFLOW);\n next.clearCache();\n }\n // 高度百分比需发生变化的重新布局,需要在容器内\n if(height[1] === PERCENT) {\n if(isContainer) {\n parent.__layoutAbs(parent, parent.__layoutData, next);\n }\n else {\n if(!container) {\n container = parent;\n while(container) {\n if(container === root || container.isShadowRoot) {\n break;\n }\n let cs = container.currentStyle;\n if(cs[POSITION] === 'absolute' || cs[POSITION] === 'relative') {\n break;\n }\n container = container.domParent;\n }\n }\n inDirectAbsList.push([parent, container, next]);\n }\n }\n }\n else {\n next.__offsetY(dy, true, REFLOW);\n next.clearCache();\n }\n }\n next = next.next;\n }\n // root本身没domParent\n if(!parent) {\n break;\n }\n node = parent;\n // parent判断是否要resize\n let { currentStyle } = node;\n let isAbs = currentStyle[POSITION] === 'absolute';\n let need;\n if(isAbs) {\n if(currentStyle[HEIGHT][1] === AUTO\n && (currentStyle[TOP][1] === AUTO || currentStyle[BOTTOM][1] === AUTO)) {\n need = true;\n }\n }\n // height不定则需要\n else if(currentStyle[HEIGHT][1] === AUTO) {\n need = true;\n }\n if(need) {\n node.__resizeY(dy, REFLOW);\n node.clearCache();\n }\n // abs或者高度不需要继续向上调整提前跳出\n else {\n break;\n }\n if(node === root) {\n break;\n }\n }\n while(true);\n // 最后一个递归向上取消总缓存,防止过程中重复next多次无用递归\n while(last) {\n last.clearCache(true);\n last = last.domParent;\n }\n }\n}\n\nfunction clearUniqueReflowId(hash) {\n for(let i in hash) {\n if(hash.hasOwnProperty(i)) {\n let { node } = hash[i];\n delete node.__uniqueReflowId;\n }\n }\n}\n\nfunction getMergeMargin(topList, bottomList) {\n let total = 0;\n let max = topList[0];\n let min = topList[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 diff = 0;\n if(max > 0 && min > 0) {\n diff = Math.max(max, min) - total;\n }\n else if(max < 0 && min < 0) {\n diff = Math.min(max, min) - total;\n }\n else if(max !== 0 || min !== 0) {\n diff = max + min - total;\n }\n return diff;\n}\n\nexport default {\n offsetAndResizeByNodeOnY,\n clearUniqueReflowId,\n getMergeMargin,\n};\n","import Xom from './Xom';\nimport Text from './Text';\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 $$type from '../util/$$type';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport reflow from '../refresh/reflow';\nimport builder from '../util/builder';\nimport mode from '../refresh/mode';\nimport level from '../refresh/level';\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 NODE_KEY: {\n NODE_CURRENT_STYLE,\n NODE_STYLE,\n NODE_STRUCT,\n NODE_DOM_PARENT,\n NODE_IS_INLINE,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_FOCUS,\n UPDATE_ADD_DOM,\n UPDATE_CONFIG,\n },\n STRUCT_KEY: {\n STRUCT_NUM,\n STRUCT_LV,\n STRUCT_TOTAL,\n STRUCT_CHILD_INDEX,\n STRUCT_INDEX,\n },\n ELLIPSIS,\n} = enums;\nconst { AUTO, PX, PERCENT, REM, VW, VH, VMAX, VMIN } = unit;\nconst { isRelativeOrAbsolute, getBaseline, getVerticalBaseline } = css;\nconst { extend, isNil, isFunction } = util;\nconst { CANVAS, SVG, WEBGL } = mode;\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 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 = children || [];\n this.__flexLine = []; // flex布局多行模式时存储行\n this.__ellipsis = null; // 虚拟节点,有的话渲染\n let config = this.__config;\n config[NODE_CURRENT_STYLE] = this.__currentStyle;\n config[NODE_STYLE] = this.__style;\n }\n\n __structure(i, lv, j) {\n let res = super.__structure(i++, lv, j);\n let arr = [res];\n let zIndexChildren = this.__zIndexChildren = this.__zIndexChildren || genZIndexChildren(this);\n zIndexChildren.forEach((child, j) => {\n let temp = child.__structure(i, lv + 1, j);\n if(Array.isArray(temp)) {\n i += temp.length;\n arr = arr.concat(temp);\n }\n else {\n i++;\n arr.push(temp);\n }\n });\n let total = arr.length - 1;\n res[STRUCT_NUM] = zIndexChildren.length;\n res[STRUCT_TOTAL] = total;\n return arr;\n }\n\n __modifyStruct(root, offset = 0) {\n let __config = this.__config;\n let struct = __config[NODE_STRUCT];\n let total = struct[STRUCT_TOTAL] || 0;\n // 新生成了struct,引用也变了\n let nss = this.__structure(struct[STRUCT_INDEX], struct[STRUCT_LV], struct[STRUCT_CHILD_INDEX]);\n root.__structs.splice(struct[STRUCT_INDEX] + offset, total + 1, ...nss);\n let d = 0;\n if(this !== root) {\n struct = __config[NODE_STRUCT];\n d = (struct[STRUCT_TOTAL] || 0) - total;\n let ps = __config[NODE_DOM_PARENT].__config[NODE_STRUCT];\n ps[STRUCT_TOTAL] = ps[STRUCT_TOTAL] || 0;\n ps[STRUCT_TOTAL] += d;\n }\n return [struct, d];\n }\n\n /**\n * 因为zIndex/abs的变化造成的更新,只需重排这一段顺序即可\n * 即便包含component造成的dom变化也不影响,component作为子节点reflow会再执行,这里重排老的vd\n * @param structs\n * @private\n */\n __updateStruct(structs) {\n let { [STRUCT_INDEX]: index, [STRUCT_TOTAL]: total = 0 } = this.__config[NODE_STRUCT];\n let zIndexChildren = this.__zIndexChildren = genZIndexChildren(this);\n let length = zIndexChildren.length;\n if(length === 1) {\n return;\n }\n zIndexChildren.forEach((child, i) => {\n let ns = child.__config[NODE_STRUCT];\n // 一般肯定有的,但是在zIndex更新和addChild同时发生时,新添加的尚无,zIndex更新会报错,临时解决\n if(ns) {\n ns[STRUCT_CHILD_INDEX] = i; // 仅后面排序用\n }\n });\n // 按直接子节点划分为相同数量的若干段进行排序\n let arr = [];\n let source = [];\n for(let i = index + 1; i <= index + total; i++) {\n let child = structs[i];\n // 同上防止\n if(child) {\n let o = {\n child,\n list: structs.slice(child[STRUCT_INDEX], child[STRUCT_INDEX] + (child[STRUCT_TOTAL] || 0) + 1),\n };\n arr.push(o);\n source.push(o);\n i += child[STRUCT_TOTAL] || 0;\n }\n }\n arr.sort(function(a, b) {\n return a.child[STRUCT_CHILD_INDEX] - b.child[STRUCT_CHILD_INDEX];\n });\n // 是否有变更,有才进行重新计算\n let needSort;\n for(let i = 0, len = source.length; i < len; i++) {\n if(source[i] !== arr[i]) {\n needSort = true;\n break;\n }\n }\n if(needSort) {\n let list = [];\n arr.forEach(item => {\n list = list.concat(item.list);\n });\n list.forEach((struct, i) => {\n struct[STRUCT_INDEX] = index + i + 1;\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[1] !== 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.__config[NODE_IS_INLINE] && 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 super.__offsetY(diff, isLayout, lv);\n let ep = this.__ellipsis;\n if(ep) {\n ep.__offsetY(diff, isLayout);\n }\n if(isLayout && !this.__config[NODE_IS_INLINE] && 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[1] === AUTO;\n let isFixed = [PX, PERCENT, REM, VW, VH, VMAX, VMIN].indexOf(flexBasis[1]) > -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[1]) > -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.__layout({\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.__layout({\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.__layout({\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 __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 * @private\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);\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.__layout({\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.__layout({\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.__layout({\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.__layout({\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);\n if(diff) {\n item.__offsetX(diff, true);\n x += diff;\n }\n }\n else {\n mergeMarginStartList.push(marginTop);\n let diff = reflow.getMergeMargin(mergeMarginStartList, mergeMarginEndList);\n if(diff) {\n item.__offsetY(diff, true);\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);\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.__layout({\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.__layout({\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.__layout({\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);\n }\n else if(!isUpright && !fixedHeight) {\n this.__resizeY(spread);\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);\n }\n else {\n item.__offsetY(spreadList[count], true);\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.__layout({\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);\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);\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);\n }\n else {\n item.__offsetX(diff, true);\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);\n }\n else {\n item.__offsetX(per, true);\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);\n }\n else {\n item.__offsetX(diff, true);\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);\n }\n else {\n item.__offsetX(between, true);\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);\n }\n else {\n item.__offsetX(around * (i + 1), true);\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);\n }\n else {\n item.__offsetX(per * i, true);\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.__layout({\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[1] !== AUTO || alignSelf === 'stretch') {\n needGenAr = true;\n }\n else if(alignSelf === 'auto' && alignItems === 'stretch') {\n needGenAr = true;\n }\n if(needGenAr) {\n item.__layout({\n x,\n y,\n w,\n h: main,\n h3: main, // 同w2\n isUpright,\n }, isAbs, isColumn, isRow);\n }\n else {\n item.__layout({\n x,\n y,\n w,\n h: main,\n h3: main, // 同w2\n isUpright,\n }, true, isColumn, isRow);\n item.__layout({\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.__layout({\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][1] === AUTO) {\n marginAutoCount++;\n }\n if(currentStyle[MARGIN_RIGHT][1] === AUTO) {\n marginAutoCount++;\n }\n }\n else {\n if(currentStyle[MARGIN_TOP][1] === AUTO) {\n marginAutoCount++;\n }\n if(currentStyle[MARGIN_BOTTOM][1] === 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.__layout({\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][1] === AUTO) {\n count += per;\n child.__offsetX(count, true);\n }\n else if(count) {\n child.__offsetX(count, true);\n }\n if(currentStyle[MARGIN_RIGHT][1] === AUTO) {\n count += per;\n }\n }\n else {\n if(currentStyle[MARGIN_TOP][1] === AUTO) {\n count += per;\n child.__offsetY(count, true);\n }\n else if(count) {\n child.__offsetY(count, true);\n }\n if(currentStyle[MARGIN_BOTTOM][1] === 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) : child.__offsetY(free, true);\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) : child.__offsetY(center, true);\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) : child.__offsetY(between * i, true);\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) : child.__offsetY(around * (i * 2 + 1), true);\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) : child.__offsetY(around * (i + 1), true);\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);\n }\n }\n else if(alignSelf === 'center') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff * 0.5, true);\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[1] === 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);\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);\n }\n }\n else if(alignItems === 'flexEnd') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff, true);\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseline - item.firstBaseline;\n if(diff !== 0) {\n item.__offsetY(diff, true);\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[1] === AUTO && item.outerHeight < maxCross) {\n item.__layout(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[1] === 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);\n }\n }\n else if(alignSelf === 'center') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff * 0.5, true);\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[1] === 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);\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);\n }\n }\n else if(alignItems === 'flexEnd') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff, true);\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseline - item.firstBaseline;\n if(diff !== 0) {\n item.__offsetX(diff, true);\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[1] === 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.__config[NODE_IS_INLINE] = 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.__layout({\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[1] === AUTO) {\n isUprightIbFull = true;\n }\n else if(!isUpright && w[1] === 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.__layout({\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.__layout({\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.__layout({\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[1] === AUTO && isUpright) {\n isUprightIbFull = true;\n }\n if(width[1] === 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.__layout({\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.__layout({\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[1] === AUTO && isUpright) {\n isUprightIbFull = true;\n }\n if(width[1] === 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);\n }\n else if(!isUpright && !fixedHeight) {\n this.__resizeY(spread);\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);\n }\n else {\n this.__offsetX(diff, true);\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, clientWidth, clientHeight, computedStyle } = container;\n let { 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[1] !== AUTO) {\n fixedLeft = true;\n computedStyle[LEFT] = this.__calSize(left, clientWidth, true);\n }\n else {\n computedStyle[LEFT] = 'auto';\n }\n if(right[1] !== AUTO) {\n fixedRight = true;\n computedStyle[RIGHT] = this.__calSize(right, clientWidth, true);\n }\n else {\n computedStyle[RIGHT] = 'auto';\n }\n if(top[1] !== AUTO) {\n fixedTop = true;\n computedStyle[TOP] = this.__calSize(top, clientHeight, true);\n }\n else {\n computedStyle[TOP] = 'auto';\n }\n if(bottom[1] !== 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[1] !== AUTO) {\n w2 = this.__calSize(width, clientWidth, true);\n }\n }\n else if(fixedRight) {\n if(width[1] !== 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[1] !== 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[1] !== AUTO) {\n h2 = this.__calSize(height, clientHeight, true);\n }\n }\n else if(fixedBottom) {\n if(height[1] !== 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;\n while(prev) {\n // 以前面的flow的最近的prev末尾为准\n if(prev instanceof Text || prev.computedStyle[POSITION] !== 'absolute') {\n y2 = prev.y + prev.outerHeight;\n break;\n }\n prev = prev.prev;\n }\n if(height[1] !== 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.__layout({\n x: x2,\n y: y2,\n w: widthLimit,\n h: heightLimit,\n isUpright: data.isUpright, // 父亲的\n }, true, false);\n widthLimit = item.outerWidth;\n }\n item.__layout({\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 }, false, false);\n if(onlyRight) {\n item.__offsetX(-item.outerWidth, true);\n }\n if(onlyBottom) {\n item.__offsetY(-item.outerHeight, true);\n }\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);\n }\n else if(item instanceof Component) {\n let sr = item.shadowRoot;\n if(sr instanceof Dom) {\n sr.__layoutAbs(sr, data);\n }\n }\n });\n // 根节点自己特殊执行,不在layout统一\n this.__execAr();\n }\n\n render(renderMode, lv, ctx, cache, dx, dy) {\n let res = super.render(renderMode, lv, ctx, cache, dx, dy);\n let ep = this.__ellipsis;\n if(ep) {\n ep.render(renderMode, lv, res.ctx, cache, 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, force) {\n if(force) {\n return super.__emitEvent(e, force);\n }\n let { isDestroyed, computedStyle, isMask } = 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 // 找到对应的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)) {\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);\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(json, cb) {\n let self = this;\n if(!isNil(json) && !self.isDestroyed) {\n let { root, host } = self;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, self);\n }\n else {\n vd = builder.initDom(json, root, host, self);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null; // 清除在before,防止after的回调增加新的task误删\n self.__json.children.push(json);\n let len = self.children.length;\n if(len) {\n let last = self.children[len - 1];\n last.__next = vd;\n vd.__prev = last;\n }\n self.children.push(vd);\n self.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in appendChild.');\n }\n }\n }\n\n prependChild(json, cb) {\n let self = this;\n if(!isNil(json) && !self.isDestroyed) {\n let { root, host } = self;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, self);\n }\n else {\n vd = builder.initDom(json, root, host, self);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null;\n self.__json.children.unshift(json);\n let len = self.children.length;\n if(len) {\n let first = self.children[0];\n first.__prev = vd;\n vd.__next = first;\n }\n self.children.unshift(vd);\n self.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in prependChild.');\n }\n }\n }\n\n insertBefore(json, cb) {\n let self = this;\n if(!isNil(json) && !self.isDestroyed && self.domParent) {\n let { root, domParent } = self;\n let host = domParent.hostRoot;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, domParent);\n }\n else {\n vd = builder.initDom(json, root, host, domParent);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null;\n let i = 0, has, __json = domParent.__json, children = __json.children, len = children.length;\n let pJson = self.isShadowRoot ? self.hostRoot.__json : self.__json;\n for(; i < len; i++) {\n if(children[i] === pJson) {\n has = true;\n break;\n }\n }\n if(!has) {\n throw new Error('InsertBefore exception.');\n }\n // 插入注意开头位置处理\n if(i) {\n children.splice(i, 0, json);\n vd.__next = self;\n vd.__prev = self.__prev;\n self.__prev = vd;\n domParent.children.splice(i, 0, vd);\n }\n else {\n if(len) {\n let first = domParent.children[0];\n first.__prev = vd;\n vd.__next = first;\n }\n children.unshift(json);\n domParent.children.unshift(vd);\n }\n domParent.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in insertBefore.');\n }\n }\n }\n\n insertAfter(json, cb) {\n let self = this;\n if(!isNil(json) && !self.isDestroyed && self.domParent) {\n let { root, domParent } = self;\n let host = domParent.hostRoot;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, domParent);\n }\n else {\n vd = builder.initDom(json, root, host, domParent);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null;\n let i = 0, has, __json = domParent.__json, children = __json.children, len = children.length;\n let pJson = self.isShadowRoot ? self.hostRoot.__json : self.__json;\n for(; i < len; i++) {\n if(children[i] === pJson) {\n has = true;\n break;\n }\n }\n if(!has) {\n throw new Error('insertAfter exception.');\n }\n // 插入注意末尾位置处理\n if(i < len - 1) {\n children.splice(i + 1, 0, json);\n vd.__prev = self;\n vd.__next = self.__next;\n self.__next = vd;\n domParent.children.splice(i + 1, 0, vd);\n }\n else {\n if(len) {\n let last = domParent.children[len - 1];\n last.__next = vd;\n vd.__prev = last;\n }\n children.push(json);\n domParent.children.push(vd);\n }\n domParent.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in insertAfter.');\n }\n }\n }\n\n removeChild(target, cb) {\n if(target.parent === this && (target instanceof Xom || target instanceof Component)) {\n if(this.isDestroyed) {\n inject.warn('Remove parent is destroyed.');\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n target.remove(cb);\n }\n else {\n inject.error('Invalid parameter in 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';\nimport css from '../style/css';\n\nconst {\n STYLE_KEY: {\n WIDTH,\n HEIGHT,\n DISPLAY,\n BORDER_TOP_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n VISIBILITY,\n BACKGROUND_IMAGE,\n BACKGROUND_COLOR,\n BOX_SHADOW,\n MIX_BLEND_MODE,\n MARGIN_RIGHT,\n MARGIN_LEFT,\n PADDING_RIGHT,\n PADDING_LEFT,\n FONT_SIZE,\n FLEX_BASIS,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_FOCUS,\n UPDATE_CONFIG,\n },\n NODE_KEY: {\n NODE_CACHE,\n NODE_DEFS_CACHE,\n NODE_IS_MASK,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, REM, VW, VH, VMAX, VMIN, RGBA } = 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 && ca.state === inject.LOADED) {\n loadImg.source = ca.source;\n loadImg.width = ca.width;\n loadImg.height = ca.height;\n }\n }\n let config = this.__config;\n if(config[NODE_IS_MASK]) {\n let { style, currentStyle } = this;\n style[BACKGROUND_IMAGE] = currentStyle[BACKGROUND_IMAGE] = [null];\n style[BACKGROUND_COLOR] = currentStyle[BACKGROUND_COLOR] = [[0, 0, 0, 0], RGBA];\n style[BORDER_TOP_WIDTH] = currentStyle[BORDER_TOP_WIDTH] = [0, PX];\n style[BORDER_RIGHT_WIDTH] = currentStyle[BORDER_RIGHT_WIDTH] = [0, PX];\n style[BORDER_LEFT_WIDTH] = currentStyle[BORDER_LEFT_WIDTH] = [0, PX];\n style[BORDER_BOTTOM_WIDTH] = currentStyle[BORDER_BOTTOM_WIDTH] = [0, PX];\n style[BOX_SHADOW] = currentStyle[BOX_SHADOW] = null;\n style[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE] = 'normal';\n }\n }\n\n /**\n * 覆盖xom的方法,在__layout()3个分支中会首先被调用\n * 当样式中固定宽高时,图片按样式尺寸,加载后重新绘制即可\n * 只固定宽高一个时,加载完要计算缩放比,重新布局绘制\n * 都没有固定,按照图片尺寸,重新布局绘制\n * 这里计算非固定的情况,将其改为固定供布局渲染使用,未加载完成为0\n * @param data\n * @param isInline\n * @returns {{fixedWidth: boolean, w: *, x: *, h: *, y: *, fixedHeight: boolean}}\n * @private\n */\n __preLayout(data, isInline) {\n let res = super.__preLayout(data, false);\n let loadImg = this.__loadImg;\n // 可能已提前加载好了,或有缓存,为减少刷新直接使用\n if(!loadImg.error) {\n let src = loadImg.src;\n let cache = inject.IMG[src];\n if(cache && cache.state === inject.LOADED) {\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(renderMode, lv, currentStyle, computedStyle) {\n let res = super.__calContent(renderMode, lv, currentStyle, computedStyle);\n if(!res) {\n let {\n __loadImg: loadImg,\n } = this;\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, lv, ctx, cache, dx = 0, dy = 0) {\n let res = super.render(renderMode, lv, ctx, cache, dx, dy);\n if(renderMode === mode.WEBGL) {\n dx = res.dx;\n dy = res.dy;\n }\n let {\n offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow,\n } = res;\n let {\n width, height, isDestroyed,\n props: {\n placeholder,\n },\n computedStyle,\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 __config,\n __loadImg: loadImg,\n root,\n } = this;\n if(offscreenBlend) {\n ctx = offscreenBlend.target.ctx;\n }\n if(offscreenMask) {\n ctx = offscreenMask.target.ctx;\n }\n if(offscreenFilter) {\n ctx = offscreenFilter.target.ctx;\n }\n if(offscreenOverflow) {\n ctx = offscreenOverflow.target.ctx;\n }\n // 没source且不error时加载图片\n if(!loadImg.source && !loadImg.error && !loadImg.loading) {\n this.__loadAndRefresh(loadImg, root, ctx, placeholder, computedStyle, width, height);\n }\n if(isDestroyed || display === 'none' || visibility === 'hidden') {\n return res;\n }\n let __cache = __config[NODE_CACHE];\n if(cache && __cache && __cache.enabled) {\n ctx = __cache.ctx;\n }\n let originX, originY;\n originX = res.x3 + dx;\n originY = res.y3 + dy;\n // 根据配置以及占位图显示error\n let source = loadImg.source;\n if(loadImg.error && !placeholder && Img.showError) {\n let strokeWidth = Math.min(width, height) * 0.02;\n let stroke = '#CCC';\n let fill = '#DDD';\n let cx = originX + width * 0.7;\n let cy = originY + height * 0.3;\n let r = strokeWidth * 5;\n let pts = [\n [originX + width * 0.15, originY + height * 0.7],\n [originX + width * 0.3, originY + height * 0.4],\n [originX + width * 0.5, originY + height * 0.6],\n [originX + width * 0.6, originY + height * 0.5],\n [originX + width * 0.9, originY + height * 0.8],\n [originX + width * 0.15, originY + height * 0.8]\n ];\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n ctx.strokeStyle = stroke;\n ctx.lineWidth = strokeWidth;\n ctx.fillStyle = fill;\n ctx.beginPath();\n ctx.moveTo(originX, originY);\n ctx.lineTo(originX + width, originY);\n ctx.lineTo(originX + width, originY + height);\n ctx.lineTo(originX, originY + height);\n ctx.lineTo(originX, originY);\n ctx.stroke();\n ctx.closePath();\n ctx.beginPath();\n let points = geom.ellipsePoints(cx, cy, r, r);\n painter.canvasPolygon(ctx, points, 0, 0);\n ctx.fill();\n ctx.closePath();\n ctx.beginPath();\n ctx.moveTo(pts[0][0], pts[0][1]);\n for(let i = 1, len = pts.length; i < len; i++) {\n let point = pts[i];\n ctx.lineTo(point[0], point[1]);\n }\n ctx.lineTo(pts[0][0], pts[0][1]);\n ctx.fill();\n ctx.closePath();\n }\n else if(renderMode === mode.SVG) {\n this.__addGeom('rect', [\n ['x', originX],\n ['y', originY],\n ['width', width],\n ['height', height],\n ['stroke', stroke],\n ['stroke-width', strokeWidth],\n ['fill', 'rgba(0,0,0,0)']\n ]);\n this.__addGeom('circle', [\n ['cx', cx],\n ['cy', cy],\n ['r', r],\n ['fill', fill],\n ]);\n let s = '';\n for(let i = 0, len = pts.length; i < len; i++) {\n let point = pts[i];\n if(i) {\n s += ' ';\n }\n s += point[0] + ',' + point[1];\n }\n this.__addGeom('polygon', [\n ['points', s],\n ['fill', fill]\n ]);\n }\n }\n else if(source) {\n // 圆角需要生成一个mask\n let list = border.calRadius(originX, originY, width, height,\n borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius);\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n // 有border-radius需模拟遮罩裁剪\n if(list) {\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, list, dx, dy);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(source, originX, originY, width, height);\n ctx.restore();\n }\n else {\n ctx.drawImage(source, originX, originY, width, height);\n }\n }\n else if(renderMode === mode.SVG) {\n // img没有变化无需diff,直接用上次的vd\n if(loadImg.cache) {\n loadImg.cache.cache = true;\n virtualDom.children = [loadImg.cache];\n // 但是还是要校验是否有borderRadius变化,引发img的圆角遮罩\n if(!virtualDom.cache && list) {\n let d = svgPolygon(list);\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', '#FFF'],\n ],\n }\n ],\n };\n let id = ctx.add(v);\n __config[NODE_DEFS_CACHE].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 __config[NODE_DEFS_CACHE].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 // img没加载时,清空,这样Xom就认为没内容不生成cache,防止img先绘制cache再绘制主屏,重复\n __releaseWhenEmpty(__cache) {\n if(!this.__loadImg.error && !this.__loadImg.source) {\n return super.__releaseWhenEmpty(__cache);\n }\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[1] !== AUTO) {\n w -= this.__calSize(width, total, true);\n }\n else {\n let loadImg = this.__loadImg;\n // 加载成功计算缩放后的宽度\n if(loadImg.source) {\n if(height[1] === PX) {\n w -= loadImg.width * height[0] / loadImg.height;\n }\n else if(height[1] === PERCENT) {\n w -= loadImg.width * height[0] * total * 0.01 / loadImg.height;\n }\n else if(height[1] === REM) {\n w -= loadImg.width * height[0] * this.root.computedStyle[FONT_SIZE] / loadImg.height;\n }\n else if(height[1] === VW) {\n w -= loadImg.width * height[0] * this.root.width * 0.01 / loadImg.height;\n }\n else if(height[1] === VH) {\n w -= loadImg.width * height[0] * this.root.height * 0.01 / loadImg.height;\n }\n else if(height[1] === VMAX) {\n w -= height[0] * Math.max(this.root.width, this.root.height) * 0.01 / loadImg.height;\n }\n else if(height[1] === VMIN) {\n w -= height[0] * 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[1]) > -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[1]) > -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[1] !== 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, root, ctx, placeholder, computedStyle, width, height, cb) {\n let self = this;\n // 先清空之前可能的\n if(loadImg.source || loadImg.error) {\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null; // 清除在before,防止after的回调增加新的task误删\n if(self.isDestroyed) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REFLOW; // 没有样式变化但内容尺寸发生了变化强制执行\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n });\n loadImg.source = null;\n }\n loadImg.loading = true;\n // 再测量,可能瞬间完成替换掉上面的\n inject.measureImg(loadImg.src, data => {\n // 还需判断url,防止重复加载时老的替换新的,失败走error绘制\n if(data.url === loadImg.src && !self.isDestroyed) {\n loadImg.cache && (loadImg.cache.cache = false);\n loadImg.loading = false;\n function reload() {\n let { currentStyle: { [WIDTH]: width, [HEIGHT]: height } } = self;\n root.delRefreshTask(self.__task);\n if(width[1] !== AUTO && height[1] !== AUTO) {\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null;\n if(self.isDestroyed) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REPAINT;\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n __after() {\n if(isFunction(cb)) {\n cb.call(self);\n }\n },\n });\n }\n else {\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null;\n if(self.isDestroyed) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REFLOW; // 没有样式变化但内容尺寸发生了变化强制执行\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n __after() {\n if(isFunction(cb)) {\n cb.call(self);\n }\n },\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 inject.measureImg(placeholder, data => {\n if(data.success) {\n loadImg.error = true;\n loadImg.source = data.source;\n loadImg.width = data.width;\n loadImg.height = data.height;\n reload();\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') {\n reload();\n }\n }\n }, {\n ctx,\n root,\n width,\n height,\n });\n }\n\n updateSrc(v, cb) {\n let self = this;\n let loadImg = self.__loadImg;\n let root = this.root;\n // 相等或空且当前error直接返回\n if(v === loadImg.src || !v && loadImg.error) {\n if(isFunction(cb)) {\n cb(-1);\n }\n }\n else if(v) {\n loadImg.src = v;\n self.__loadAndRefresh(loadImg, root, root.ctx, self.props.placeholder, self.computedStyle, self.width, self.height, cb);\n }\n else {\n loadImg.src = v;\n loadImg.source = null;\n loadImg.error = true;\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null;\n if(self.isDestroyed) {\n return;\n }\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, self.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb(diff);\n }\n },\n });\n }\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 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';\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 NODE_KEY: {\n NODE_CACHE_PROPS,\n NODE_CURRENT_PROPS,\n NODE_CURRENT_STYLE,\n NODE_STYLE,\n NODE_DEFS_CACHE,\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 let config = this.__config;\n config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n config[NODE_CURRENT_PROPS] = this.__currentProps;\n config[NODE_CURRENT_STYLE] = this.__currentStyle;\n config[NODE_STYLE] = this.__style;\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[1]) > -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[1]) > -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 __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.__config[NODE_CACHE_PROPS] = 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.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __calCache(renderMode, ctx, parent, __cacheStyle, currentStyle, computedStyle,\n clientWidth, clientHeight, offsetWidth, offsetHeight,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth,\n paddingTop, paddingRight, paddingBottom, paddingLeft,\n x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6) {\n let res = super.__calCache(renderMode, ctx, parent, __cacheStyle, currentStyle, computedStyle,\n clientWidth, clientHeight, offsetWidth, offsetHeight,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth,\n paddingTop, paddingRight, paddingBottom, paddingLeft,\n x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6);\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[1] === GRADIENT) {\n // let t = this.__gradient(renderMode, ctx, x3, y3, x4, y4, item[0], 0, 0);\n cs.push(item[0]);\n res.push(true);\n }\n else if(item && item[1] === RGBA && item[0][3] > 0) {\n cs.push(item[0]);\n res.push(int2rgba(item[0]));\n }\n else {\n cs.push('none');\n res.push('none');\n }\n });\n }\n }\n });\n return res;\n }\n\n __calContent(renderMode, lv, 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.x3, res.y3, res.x4, res.y4, item, res.dx, res.dy);\n }\n return int2rgba(item);\n });\n fill = fill.map(item => {\n if(item.k) {\n return this.__gradient(renderMode, res.ctx, res.x3, res.y3, res.x4, res.y4, item, res.dx, res.dy);\n }\n return int2rgba(item);\n });\n return {\n cx,\n cy,\n stroke,\n strokeWidth,\n strokeDasharray,\n strokeDasharrayStr,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n fill,\n fillRule,\n };\n }\n\n __preSetCanvas(renderMode, ctx, res) {\n let {\n stroke,\n strokeWidth,\n strokeDasharray,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n fill,\n } = res;\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\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, lv, ctx, cache, dx, dy) {\n let res = super.render(renderMode, lv, ctx, cache, dx, dy);\n if(renderMode === mode.SVG) {\n this.virtualDom.type = 'geom';\n }\n // 无论canvas/svg,break可提前跳出省略计算\n if(res.break) {\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 || renderMode === mode.WEBGL) {\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 || renderMode === mode.WEBGL) {\n if(matrix) {\n ctx.save();\n // 临时解决方案,webgl和cacheCanvas的渲染忽略世界matrix\n if(renderMode === mode.CANVAS) {\n let me = this.matrixEvent;\n matrix = mx.multiply(me, matrix);\n }\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 || renderMode === mode.WEBGL) {\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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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 // geom的cache无内容也不清除,因为子类不清楚内容,除非看不见\n __releaseWhenEmpty(cache, computedStyle) {\n return computedStyle[VISIBILITY] === 'hidden';\n }\n\n // offset/resize时要多一步清空props上记录的缓存\n __offsetX(diff, isLayout, lv) {\n super.__offsetX(diff, isLayout, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __offsetY(diff, isLayout, lv) {\n super.__offsetY(diff, isLayout, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __resizeX(diff, lv) {\n super.__resizeX(diff, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __resizeY(diff, lv) {\n super.__resizeY(diff, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\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.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 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';\nimport enums from './enums';\n\nconst {\n NODE_KEY: {\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_DOM_PARENT,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n NODE_STRUCT,\n },\n} = enums;\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 = sr.__config[NODE_COMPUTED_STYLE] = oldSr.computedStyle;\n }\n else {\n let domParent = cp.domParent;\n [\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n ].forEach(k => {\n sr.__config[k] = domParent.__config[k];\n });\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.__config[NODE_DOM_PARENT] = oldSr.domParent;\n sr.__config[NODE_STRUCT] = oldSr.__config[NODE_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 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 item.off(arr[0], arr[1]);\n item.on(arr[0], arr[1]);\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();\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';\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[1] === b[1]) {\n if(a[0] === b[0]) {\n return a[2] - b[2];\n }\n return b[0] - a[0];\n }\n return b[1] - a[1];\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 target.draw();\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 ctx.draw && ctx.draw(true);\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\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 apply.draw();\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 target.draw();\n apply.ctx.setTransform(1, 0, 0, 1, 0, 0);\n apply.ctx.clearRect(0, 0, width, height);\n apply.draw();\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 ctx.draw && ctx.draw(true);\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.globalAlpha = 1;\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\n inject.releaseCacheCanvas(target.canvas);\n }\n else if(type === OFFSCREEN_MASK) {\n let { mask, isClip } = offscreen;\n if(isClip) {\n offscreen.target.draw();\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 mask.draw();\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 offscreen.target.draw();\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 ctx.draw && ctx.draw(true);\n mask.ctx.setTransform(1, 0, 0, 1, 0, 0);\n mask.ctx.clearRect(0, 0, width, height);\n mask.draw();\n inject.releaseCacheCanvas(mask.canvas);\n }\n else {\n mask.draw();\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 target.draw();\n mask.ctx.setTransform(1, 0, 0, 1, 0, 0);\n mask.ctx.clearRect(0, 0, width, height);\n mask.draw();\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 ctx.draw && ctx.draw(true);\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\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 target.draw();\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 ctx.draw && ctx.draw(true);\n target.ctx.globalAlpha = 1;\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\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 get page() {\n return this.__page;\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 { NA, LOCAL, CHILD, SELF, 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 PADDING_LEFT,\n PADDING_RIGHT,\n PADDING_TOP,\n PADDING_BOTTOM,\n BORDER_TOP_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n MATRIX,\n },\n NODE_KEY: {\n NODE_CACHE,\n NODE_CACHE_TOTAL,\n NODE_CACHE_OVERFLOW,\n NODE_CACHE_MASK,\n NODE_CACHE_FILTER,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n NODE_OPACITY,\n NODE_COMPUTED_STYLE,\n NODE_CURRENT_STYLE,\n NODE_LIMIT_CACHE,\n NODE_REFRESH_LV,\n NODE_CACHE_STYLE,\n NODE_DEFS_CACHE,\n NODE_IS_MASK,\n NODE_DOM_PARENT,\n NODE_PERSPECTIVE_MATRIX,\n NODE_VIRTUAL_DOM,\n NODE_CACHE_AS_BITMAP,\n NODE_STRUCT,\n },\n STRUCT_KEY: {\n STRUCT_NODE,\n STRUCT_INDEX,\n STRUCT_TOTAL,\n STRUCT_HAS_MASK,\n STRUCT_LV,\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} = 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, __config } = node;\n let {\n [NODE_CACHE]: cache,\n [NODE_COMPUTED_STYLE]: {\n [FILTER]: filter,\n [PERSPECTIVE]: perspective,\n [PERSPECTIVE_ORIGIN]: perspectiveOrigin,\n },\n } = __config;\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][STRUCT_TOTAL] || 0;\n for(let i = parentIndex + 1, len = parentIndex + total + 1; i < len; i++) {\n let {\n [STRUCT_NODE]: node2,\n [STRUCT_TOTAL]: total,\n } = __structs[i];\n // mask也不占bbox位置\n if(node2.isMask) {\n continue;\n }\n let {\n __sx1,\n __sy1,\n __config: {\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n [OPACITY]: opacity,\n },\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 config\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, config, index, lv, total, __structs, hasMask, width, height) {\n let {\n [NODE_CACHE_TOTAL]: cacheTotal,\n [NODE_CACHE_FILTER]: cacheFilter,\n [NODE_CACHE_MASK]: cacheMask,\n [NODE_CACHE_OVERFLOW]: cacheOverflow,\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = config;\n let needGen;\n // 先绘制形成基础的total,有可能已经存在无变化,就可省略\n if(!cacheTotal || !cacheTotal.available) {\n needGen = true; // total重新生成了,其它基于的也一定需要重新生成\n let bboxTotal, baseMatrix;\n let { __sx1: sx1, __sy1: sy1 } = node;\n // 栈代替递归,存父节点的matrix/opacity,matrix为E时存null省略计算\n let matrixList = [];\n let parentMatrix;\n let opacityList = [];\n let parentOpacity = 1;\n let lastConfig;\n let lastLv = lv;\n // 先遍历每个节点,以局部根节点左上角为原点,求得所占的总的bbox,即合并所有bbox\n for(let i = index, len = index + (total || 0) + 1; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n // 排除Text\n if(node instanceof Text) {\n let bbox = node.bbox; // 文字节点不能算filter\n if(!isE(parentMatrix)) {\n bbox = transformBbox(bbox, parentMatrix, 0, 0);\n }\n mergeBbox(bboxTotal, bbox, 0, 0);\n continue;\n }\n let __config = node.__config;\n let {\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_IS_MASK]: isMask,\n } = __config;\n // 跳过display:none元素和它的所有子节点和mask\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n continue;\n }\n // mask不占bbox,本身除外\n if(i !== index && isMask) {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n continue;\n }\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,根节点是第一个特殊处理\n if(i === index) {}\n else if(lv > lastLv) {\n parentMatrix = lastConfig[NODE_MATRIX_EVENT];\n if(isE(parentMatrix)) {\n parentMatrix = null;\n }\n matrixList.push(parentMatrix);\n parentOpacity = lastConfig[NODE_OPACITY];\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 lastConfig = __config;\n lastLv = lv;\n let {\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_CACHE_STYLE]: __cacheStyle,\n } = __config;\n let matrix, opacity;\n /**\n * lv=REPAINT重新渲染,bbox重新生成,matrix重新生成,filter重新生成\n */\n else {\n node.__bbox = null;\n node.__filterBbox = null;\n if(i === index) {\n node.__calFilter(currentStyle, computedStyle);\n }\n matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n assignMatrix(__config[NODE_MATRIX], matrix);\n opacity = computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n // opacity可临时赋值下面循环渲染用,matrixEvent可能需重新计算,因为局部根节点为E没考虑继承,这里仅计算bbox用\n if(i === index) {\n opacity = 1;\n baseMatrix = matrix;\n matrix = mx.identity();\n }\n else if(!isE(parentMatrix)) {\n matrix = multiply(parentMatrix, matrix);\n }\n assignMatrix(__config[NODE_MATRIX_EVENT], matrix);\n __config[NODE_OPACITY] = parentOpacity * opacity;\n let bbox;\n // 子元素有cacheTotal优先使用,一定是子元素,局部根节点available为false不会进\n let target = i > index && getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal]);\n // 局部根节点的total不需要考虑filter,子节点要\n if(target) {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n bbox = target.bbox;\n }\n else {\n bbox = i === index ? node.bbox : node.filterBbox;\n }\n // 老的不变,新的会各自重新生成,根据matrixEvent合并bboxTotal\n bbox = transformBbox(bbox, matrix, 0, 0);\n if(i === index) {\n bboxTotal = bbox.slice(0);\n }\n else {\n mergeBbox(bboxTotal, bbox, 0, 0);\n }\n }\n // 生成cacheTotal,获取偏移dx/dy\n config[NODE_CACHE_TOTAL] = cacheTotal = Cache.getInstance(bboxTotal, sx1, sy1);\n if(!cacheTotal || !cacheTotal.enabled) {\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 * 每个子节点的opacity有父继承计算在上面循环已经做好了,直接获取\n * 但matrixEvent可能需要重算,因为原点不一定是根节点的原点,影响tfo\n * 另外每个节点的refreshLevel需要设置REPAINT\n * 这样cacheTotal取消时子节点需确保重新计算一次matrix/opacity/filter,保证下次和父元素继承正确\n */\n parentMatrix = null;\n let lastMatrix;\n 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 [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n // 排除Text\n if(node instanceof Text) {\n node.render(renderMode, REPAINT, ctxTotal, CHILD, dx, dy);\n if(offscreenHash.hasOwnProperty(i)) {\n ctxTotal = applyOffscreen(ctxTotal, offscreenHash[i], width, height);\n }\n }\n else {\n let __config = node.__config;\n let {\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = __config;\n if(maskStartHash.hasOwnProperty(i)) {\n let [idx, n, 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(--n) {\n let { [STRUCT_TOTAL]: total } = __structs[j];\n j += (total || 0) + 1;\n }\n j--;\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([idx, lv, OFFSCREEN_MASK, offscreenMask]);\n list.push([j, lv, OFFSCREEN_MASK2, {\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 let {\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n [DISPLAY]: display,\n } = computedStyle;\n // 特殊渲染的matrix,局部根节点为原点考虑,当需要计算时再计算\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 else {\n m = null;\n }\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 lastLv = lv;\n lastMatrix = m;\n // 子元素有cacheTotal优先使用,也一定是子元素,局部根节点不会进\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal]);\n if(i !== index && target) {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n // 跳过display:none元素和它的所有子节点\n if(display === 'none') {\n continue;\n }\n let mixBlendMode = computedStyle[MIX_BLEND_MODE];\n if(isValidMbm(mixBlendMode)) {\n ctxTotal.globalCompositeOperation = mbmName(mixBlendMode);\n }\n else {\n ctxTotal.globalCompositeOperation = 'source-over';\n }\n ctxTotal.globalAlpha = __config[NODE_OPACITY];\n Cache.drawCache(target, cacheTotal);\n ctxTotal.globalCompositeOperation = 'source-over';\n }\n else {\n if(refreshLevel >= REPAINT) {\n // 手动计算cacheStyle和根据border-box的坐标再渲染\n node.__calCache(renderMode, ctxTotal, __config[NODE_DOM_PARENT],\n __config[NODE_CACHE_STYLE], __config[NODE_CURRENT_STYLE], computedStyle,\n node.clientWidth, node.clientHeight, node.offsetWidth, node.offsetHeight,\n computedStyle[BORDER_TOP_WIDTH], computedStyle[BORDER_RIGHT_WIDTH],\n computedStyle[BORDER_BOTTOM_WIDTH], computedStyle[BORDER_LEFT_WIDTH],\n computedStyle[PADDING_TOP], computedStyle[PADDING_RIGHT],\n computedStyle[PADDING_BOTTOM], computedStyle[PADDING_LEFT],\n node.__sx1, node.__sx2, node.__sx3, node.__sx4, node.__sx5, node.__sx6,\n node.__sy1, node.__sy2, node.__sy3, node.__sy4, node.__sy5, node.__sy6);\n }\n let res = node.render(renderMode, refreshLevel, ctxTotal, i === index ? LOCAL : CHILD, dx, dy);\n let { offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow } = res || {};\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_BLEND, offscreenBlend]);\n ctxTotal = offscreenBlend.target.ctx;\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n // 最后一个遮罩索引因数量不好计算,放在maskStartHash做\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = [i, hasMask, offscreenMask];\n ctxTotal = offscreenMask.target.ctx;\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_FILTER, offscreenFilter]);\n ctxTotal = offscreenFilter.target.ctx;\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_OVERFLOW, offscreenOverflow]);\n ctxTotal = offscreenOverflow.target.ctx;\n }\n // 离屏应用,按照lv从大到小即子节点在前先应用,同一个节点多个效果按offscreen优先级从小到大来,\n // 由于mask特殊索引影响,所有离屏都在最后一个mask索引判断,此时mask本身优先结算,以index序大到小判断\n if(offscreenHash.hasOwnProperty(i)) {\n ctxTotal = applyOffscreen(ctxTotal, offscreenHash[i], width, height);\n }\n // render后判断可见状态,此时computedStyle才有值\n if(display === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n }\n }\n }\n }\n // 恢复,且局部根节点设置NONE\n assignMatrix(config[NODE_MATRIX_EVENT], baseMatrix);\n config[NODE_REFRESH_LV] = NONE;\n }\n // cacheTotal仍在说明 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 [DISPLAY]: display,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n } = computedStyle;\n // 特殊渲染的matrix,局部根节点为原点考虑,本节点需inverse反向\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal]);\n if(target) {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n // 跳过display:none元素和它的所有子节点\n if(display === 'none') {\n continue;\n }\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 ctx.globalAlpha = __config[NODE_OPACITY];\n Cache.drawCache(target, cacheMask, transform, mx.identity(), tfo.slice(0), parentMatrix, inverse);\n ctx.globalCompositeOperation = 'source-over';\n }\n // 等于将外面bbox计算和渲染合一的过程,但不需要bbox本身的内容\n else {\n let {\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_CACHE_STYLE]: __cacheStyle,\n } = __config;\n let matrix, opacity;\n if(refreshLevel < REPAINT) {\n if(contain(refreshLevel, TRANSFORM_ALL)) {\n matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n assignMatrix(__config[NODE_MATRIX], matrix);\n }\n else {\n matrix = __config[NODE_MATRIX];\n }\n if(contain(refreshLevel, OP)) {\n computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n opacity = computedStyle[OPACITY];\n if(contain(refreshLevel, FT)) {\n node.__bbox = null;\n node.__filterBbox = null;\n node.__calFilter(currentStyle, computedStyle);\n }\n matrix = __config[NODE_MATRIX];\n if(contain(refreshLevel, MBM)) {\n computedStyle[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE];\n }\n }\n else {\n node.__bbox = null;\n node.__filterBbox = null;\n if(i === index) {\n node.__calFilter(currentStyle, computedStyle);\n }\n matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n assignMatrix(__config[NODE_MATRIX], matrix);\n opacity = computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n // opacity可临时赋值下面循环渲染用,matrixEvent可能需重新计算,因为局部根节点为E没考虑继承,这里仅计算bbox用\n if(i === index) {\n opacity = 1;\n matrix = mx.identity();\n }\n else if(parentMatrix) {\n matrix = multiply(parentMatrix, matrix);\n }\n assignMatrix(__config[NODE_MATRIX_EVENT], matrix);\n lastOpacity = __config[NODE_OPACITY] = parentOpacity * opacity;\n // 特殊渲染的matrix,局部根节点为原点考虑,当需要计算时再计算\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 else {\n m = null;\n }\n lastMatrix = m;\n if(m) {\n // 很多情况mask和target相同matrix,可简化计算\n if(util.equalArr(m, inverse)) {\n m = mx.identity();\n }\n else {\n inverse = mx.inverse(inverse);\n m = mx.multiply(inverse, m);\n }\n }\n if(m) {\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n }\n else {\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n }\n if(refreshLevel >= REPAINT) {\n // 手动计算cacheStyle和根据border-box的坐标再渲染\n node.__calCache(renderMode, ctx, __config[NODE_DOM_PARENT],\n __config[NODE_CACHE_STYLE], __config[NODE_CURRENT_STYLE], computedStyle,\n node.clientWidth, node.clientHeight, node.offsetWidth, node.offsetHeight,\n computedStyle[BORDER_TOP_WIDTH], computedStyle[BORDER_RIGHT_WIDTH],\n computedStyle[BORDER_BOTTOM_WIDTH], computedStyle[BORDER_LEFT_WIDTH],\n computedStyle[PADDING_TOP], computedStyle[PADDING_RIGHT],\n computedStyle[PADDING_BOTTOM], computedStyle[PADDING_LEFT],\n node.__sx1, node.__sx2, node.__sx3, node.__sx4, node.__sx5, node.__sx6,\n node.__sy1, node.__sy2, node.__sy3, node.__sy4, node.__sy5, node.__sy6);\n }\n let res = node.render(renderMode, refreshLevel, ctx, CHILD, dx, dy);\n let { offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow } = res || {};\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_BLEND, offscreenBlend]);\n ctx = offscreenBlend.target.ctx;\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n // 最后一个遮罩索引因数量不好计算,放在maskStartHash做\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = [i, hasMask, offscreenMask];\n ctx = offscreenMask.target.ctx;\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_FILTER, offscreenFilter]);\n ctx = offscreenFilter.target.ctx;\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_OVERFLOW, offscreenOverflow]);\n ctx = offscreenOverflow.target.ctx;\n }\n // 离屏应用,按照lv从大到小即子节点在前先应用,同一个节点多个效果按offscreen优先级从小到大来,\n // 由于mask特殊索引影响,所有离屏都在最后一个mask索引判断,此时mask本身优先结算,以index序大到小判断\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n // render后判断可见状态,此时computedStyle才有值\n if(display === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n }\n }\n }\n }\n });\n }\n }\n}\n\nfunction resetMatrixCacheTotal(__structs, index, total, lv, matrixEvent) {\n let matrixList = [];\n let parentMatrix;\n let lastMatrix = matrixEvent;\n let lastLv = lv;\n for(let i = index + 1, len = index + (total || 0) + 1; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n // 排除Text\n if(node instanceof Text) {\n continue;\n }\n let __config = node.__config;\n let {\n [NODE_MATRIX_EVENT]: old,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_CACHE_STYLE]: cacheStyle,\n } = __config;\n // 跳过display:none元素和它的所有子节点和mask\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n continue;\n }\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树\n 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 old = old.slice(0);\n // 计算真正的相对于root原点的matrix\n cacheStyle[MATRIX] = null;\n let matrix = node.__calMatrix(REPAINT, cacheStyle, currentStyle, computedStyle, __config);\n assignMatrix(__config[NODE_MATRIX], matrix);\n if(!isE(parentMatrix)) {\n matrix = multiply(parentMatrix, matrix);\n }\n assignMatrix(__config[NODE_MATRIX_EVENT], matrix);\n lastMatrix = matrix;\n // 深度遍历递归进行\n if(__cacheTotal && __cacheTotal.available) {\n let needReset = __cacheTotal.isNew;\n if(!needReset && !util.equalArr(old, matrix)) {\n needReset = true;\n }\n if(needReset) {\n resetMatrixCacheTotal(__structs, i, total || 0, lv, matrix);\n }\n __cacheTotal.__isNew = false;\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n }\n }\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 {\n [STRUCT_TOTAL]: total,\n } = __structs[start];\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 gl\n * @param texCache\n * @param node\n * @param __config\n * @param index\n * @param total\n * @param __structs\n * @param cache\n * @param limitCache\n * @param hasMbm\n * @param W\n * @param H\n * @returns {*}\n */\nfunction genTotalWebgl(gl, texCache, node, __config, index, total, __structs, cache, limitCache, hasMbm, 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.WEBGL, 0, gl, NA, 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 [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let __config = node.__config;\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, __config[NODE_CACHE], opacity, matrix, cx, cy, dx, dy, false);\n }\n // 再看total缓存/cache,都没有的是无内容的Xom节点\n else {\n let {\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_IS_MASK]: isMask,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n [MIX_BLEND_MODE]: mixBlendMode,\n },\n } = __config;\n if(display === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n continue;\n }\n // mask和不可见不能被汇总到top上\n if((visibility === 'hidden' || isMask) && !node.hookGlRender) {\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) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n }\n }\n // webgl特殊的外部钩子,比如粒子组件自定义渲染时调用\n if(node.hookGlRender) {\n node.hookGlRender(gl, opacity, matrix, cx, cy, dx, dy, false);\n }\n }\n }\n if(node.hookGlRender) {\n node.hookGlRender(gl, 1, null, cx, cy, dx, dy, false);\n }\n // 绘制到fbo的纹理对象上并删除fbo恢复\n texCache.refresh(gl, cx, cy);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.viewport(0, 0, W, H);\n gl.deleteFramebuffer(frameBuffer);\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, __config, 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 [NODE_COMPUTED_STYLE]: {\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n },\n } = __config;\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 {\n [STRUCT_INDEX]: index,\n [STRUCT_TOTAL]: total,\n } = item.__config[NODE_STRUCT];\n // 可以忽略mbm,因为只有透明遮罩\n for(let i = index, len = index + (total || 0) + 1; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let __config = node.__config;\n let {\n [NODE_CACHE]: __cache,\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_LIMIT_CACHE]: limitCache,\n } = __config;\n // 跳过display:none元素和它的所有子节点和mask\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\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 [NODE_CACHE]: __cache,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_COMPUTED_STYLE]: {\n [OPACITY]: opacity,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n },\n } = __config;\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) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\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.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 [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let {\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_DEFS_CACHE]: defsCache,\n } = node.__config;\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 defsCache.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 lastConfig;\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n [STRUCT_LV]: lv,\n } = __structs[i];\n let __config = node.__config;\n let {\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_DEFS_CACHE]: defsCache,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = __config;\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][STRUCT_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(lastConfig[NODE_MATRIX]);\n let vd = lastConfig[NODE_VIRTUAL_DOM];\n vdList.push(vd);\n parentVd = vd;\n }\n lastConfig = __config;\n let virtualDom;\n // svg小刷新等级时直接修改vd,这样Geom不再感知\n if(refreshLevel < REPAINT && !(node instanceof Text)) {\n __config[NODE_REFRESH_LV] = NONE;\n virtualDom = __config[NODE_VIRTUAL_DOM];\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 = __config[NODE_VIRTUAL_DOM] = 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 {\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_CACHE_STYLE]: __cacheStyle,\n } = __config;\n if(contain(refreshLevel, TRANSFORM_ALL)) {\n let matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n // 恶心的v8性能优化\n let m = __config[NODE_MATRIX];\n assignMatrix(m, 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 // 恶心的v8性能优化\n m = __config[NODE_MATRIX_EVENT];\n assignMatrix(m, matrix);\n }\n if(contain(refreshLevel, OP)) {\n let opacity = computedStyle[OPACITY] = currentStyle[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 = node.__calFilter(currentStyle, computedStyle);\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] = currentStyle[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 __config[NODE_DEFS_CACHE] && __config[NODE_DEFS_CACHE].splice(0);\n node.render(renderMode, refreshLevel, ctx, NA, 0, 0);\n virtualDom = __config[NODE_VIRTUAL_DOM];\n // 渲染后更新取值\n display = computedStyle[DISPLAY];\n if(display === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += hasMask;\n }\n }\n }\n /**\n * mask会在join时过滤掉,这里将假设正常渲染的vd的内容获取出来组成defs的mask内容\n * 另外最初遍历时记录了会影响的mask,在=REPAINT始终重新设置\n * 本身有matrix也需要重设\n */\n if(maskHash.hasOwnProperty(i) && (maskEffectHash.hasOwnProperty(i) || refreshLevel >= REPAINT || contain(refreshLevel, TRANSFORM_ALL | OP))) {\n let { index, start, end, isClip } = maskHash[i];\n let target = __structs[index];\n let dom = target[STRUCT_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][STRUCT_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 = defsCache.length - 1; i >= 0; i--) {\n let item = defsCache[i];\n if(item.tagName === 'mask') {\n defsCache.splice(i, 1);\n }\n }\n let o = {\n tagName: 'mask',\n props: [],\n children: mChildren,\n };\n let id = ctx.add(o);\n defsCache.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 = __config[NODE_MATRIX];\n parentVd = virtualDom;\n }\n lastLv = lv;\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 matrixList = [];\n let parentMatrix;\n let opacityList = [];\n let parentOpacity = 1;\n let pmList = [];\n let parentPm;\n let lastRefreshLevel;\n let lastConfig;\n let lastLv = 0;\n let mergeList = [];\n let hasMbm; // 是否有混合模式出现\n /**\n * 先一遍先序遍历每个节点绘制到自己__cache上,排除Text和已有的缓存以及局部根缓存,\n * 根据refreshLevel进行等级区分,可能是=REPAINT,REFLOW布局已前置处理完。\n * 首次绘制没有catchTotal等,后续则可能会有,在= REPAINT) {\n node.render(renderMode, REPAINT, gl, SELF, 0, 0);\n }\n continue;\n }\n let __config = node.__config;\n let refreshLevel = __config[NODE_REFRESH_LV];\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,Root节点是第一个特殊处理\n if(i === 0) {}\n else if(lv > lastLv) {\n parentMatrix = lastConfig[NODE_MATRIX_EVENT];\n if(isE(parentMatrix)) {\n parentMatrix = null;\n }\n matrixList.push(parentMatrix);\n parentOpacity = lastConfig[NODE_OPACITY];\n opacityList.push(parentOpacity);\n parentPm = lastConfig[NODE_PERSPECTIVE_MATRIX];\n if(isE(parentPm)) {\n parentPm = null;\n }\n pmList.push(parentPm);\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 pmList.splice(-diff);\n parentPm = pmList[lv - 1];\n }\n // 不变是同级兄弟,无需特殊处理 else {}\n lastRefreshLevel = refreshLevel;\n lastConfig = __config;\n lastLv = lv;\n let {\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = __config;\n // 跳过display:none元素和它的所有子节点\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n // 只跳过自身不能跳过后面的mask,mask要渲染自身并进行缓存cache,以备对象切换display用\n continue;\n }\n let hasRecordAsMask;\n /**\n * lv=REPAINT那里,小变化不动\n * 当有遮罩时,如果被遮罩节点本身无变更,需要检查其next的遮罩节点有无变更,\n * 但其实不用检查,因为next变更一定会清空cacheMask,只要检查cacheMask即可\n * 如果没有或无效,直接添加,无视节点本身变化,后面防重即可\n */\n if(refreshLevel < REPAINT) {\n __config[NODE_REFRESH_LV] = NONE;\n let {\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_CACHE_STYLE]: __cacheStyle,\n [NODE_MATRIX_EVENT]: matrixEvent,\n } = __config;\n if(contain(refreshLevel, PPT)) {\n node.__calPerspective(__cacheStyle, currentStyle, computedStyle, __config);\n }\n // transform变化,父元素的perspective变化也会在Root特殊处理重新计算\n let matrix;\n if(contain(refreshLevel, TRANSFORM_ALL)) {\n matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n assignMatrix(__config[NODE_MATRIX], matrix);\n }\n else {\n matrix = __config[NODE_MATRIX];\n }\n // 先左乘perspective的矩阵,再左乘父级的总矩阵\n if(parentPm) {\n matrix = multiply(parentPm, matrix);\n }\n if(parentMatrix) {\n matrix = multiply(parentMatrix, matrix);\n }\n // 恶心的v8性能优化\n assignMatrix(matrixEvent, matrix);\n let opacity;\n if(contain(refreshLevel, OP)) {\n opacity = computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n else {\n opacity = computedStyle[OPACITY];\n }\n __config[NODE_OPACITY] = parentOpacity * opacity;\n // filter会改变bbox范围\n if(contain(refreshLevel, FT)) {\n node.__bbox = null;\n node.__filterBbox = null;\n node.__calFilter(currentStyle, computedStyle);\n }\n if(contain(refreshLevel, MBM)) {\n computedStyle[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE];\n }\n // total可以跳过所有孩子节点省略循环,filter/mask等的强制前提是有total\n if(__cacheTotal && __cacheTotal.available) {\n i += (total || 0);\n }\n }\n /**\n * >=REPAINT重新渲染,并根据结果判断是否离屏限制错误\n * Geom没有子节点无需汇总局部根,Dom中Img也是,它们的局部根等于自身的cache,其它符合条件的Dom需要生成\n */\n else {\n let res = node.render(renderMode, refreshLevel, gl, SELF, 0, 0);\n // geom可返回texture纹理,替代原有xom的__cache纹理\n if(res && inject.isWebGLTexture(res.texture)) {\n let { __sx1: sx1, __sy1: sy1, offsetWidth: w, offsetHeight: h, bbox } = node;\n __config[NODE_CACHE] = new MockCache(gl, res.texture, sx1, sy1, w, h, bbox);\n gl.viewport(0, 0, width, height);\n gl.useProgram(gl.program);\n }\n }\n // 每个元素检查cacheTotal生成,已有的上面会continue跳过\n let {\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_CACHE_AS_BITMAP]: cacheAsBitmap,\n } = __config;\n let {\n [OVERFLOW]: overflow,\n [FILTER]: filter,\n [MIX_BLEND_MODE]: mixBlendMode,\n [TRANSFORM]: transform,\n } = computedStyle;\n let validMbm = isValidMbm(mixBlendMode);\n // 3d渲染上下文\n let isPerspective = tf.isPerspectiveMatrix(transform) || parentPm;\n if(cacheAsBitmap || hasMask || filter.length || (overflow === 'hidden' && total) || validMbm || isPerspective) {\n if(validMbm) {\n hasMbm = true;\n }\n if(hasRecordAsMask) {\n hasRecordAsMask[5] = limitCache;\n hasRecordAsMask[7] = filter;\n hasRecordAsMask[8] = overflow;\n hasRecordAsMask[9] = isPerspective;\n hasRecordAsMask[10] = cacheAsBitmap;\n }\n else {\n mergeList.push([i, lv, total, node, __config, limitCache, hasMask, filter, overflow, isPerspective, cacheAsBitmap]);\n }\n }\n }\n let limitHash = {};\n // 根据收集的需要合并局部根的索引,尝试合并,按照层级从大到小,索引从大到小的顺序,\n // 这样保证子节点在前,后节点在前,后节点是为了mask先应用自身如filter之后再进行遮罩\n if(mergeList.length) {\n mergeList.sort(function(a, b) {\n if(a[1] === b[1]) {\n return b[0] - a[0];\n }\n return b[1] - a[1];\n });\n // ppt只有嵌套才需要生成,最下面的孩子节点的ppt无需,因此记录一个hash存index,\n // 同时因为是后序遍历,孩子先存所有父亲的index即可保证父亲才能生成cacheTotal\n let pptHash = {};\n mergeList.forEach(item => {\n let [i, lv, total, node, __config, limitCache, hasMask, filter, overflow, isPerspective, cacheAsBitmap] = item;\n // 有ppt的,向上查找所有父亲index记录,可能出现重复记得提前跳出\n if(isPerspective) {\n let parent = __config[NODE_DOM_PARENT];\n while(parent) {\n let config = parent.__config;\n let idx = config[NODE_STRUCT][STRUCT_INDEX];\n if(pptHash[idx]) {\n break;\n }\n if(tf.isPerspectiveMatrix(config[NODE_MATRIX]) || config[NODE_PERSPECTIVE_MATRIX]) {\n pptHash[idx] = true;\n }\n parent = config[NODE_DOM_PARENT];\n }\n if(!pptHash[i] && !hasMask && !filter.length && overflow !== 'hidden' && !cacheAsBitmap) {\n return;\n }\n }\n let {\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n } = __config;\n let needGen;\n // 可能没变化,比如被遮罩节点、filter变更等\n if(!__cacheTotal || !__cacheTotal.available) {\n let [limit, res] = genTotalWebgl(gl, texCache, node, __config, i, total || 0, __structs, __cache, limitCache, hasMbm, width, height);\n __cacheTotal = res;\n needGen = true;\n limitCache = limit;\n // 返回的limit包含各种情况超限,一旦超限,只能生成临时cacheTotal不能保存\n if(!limitCache) {\n __config[NODE_CACHE_TOTAL] = 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 __config[NODE_CACHE_OVERFLOW] = target;\n }\n }\n }\n else {\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 __config[NODE_CACHE_FILTER] = target;\n }\n }\n }\n else {\n target = __cacheFilter;\n }\n }\n if(hasMask && (!__cacheMask || !__cacheMask.available || needGen)) {\n target = genMaskWebgl(gl, texCache, node, __config, target, width, height, lv, __structs);\n if(!limitCache) {\n __config[NODE_CACHE_MASK] = 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 [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let __config = node.__config;\n // text如果display不可见,parent会直接跳过,不会走到这里,这里一定是直接绘制到root的,visibility在其内部判断\n if(node instanceof Text) {\n // text特殊之处,__config部分是复用parent的\n let {\n [NODE_CACHE]: __cache,\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_DOM_PARENT]: {\n __config: {\n [NODE_MATRIX_EVENT]: matrixEvent,\n [NODE_OPACITY]: opacity,\n },\n },\n } = __config;\n if(__cache && __cache.available) {\n texCache.addTexAndDrawWhenLimit(gl, __cache, opacity, matrixEvent, cx, cy, 0, 0,true);\n }\n // 超限特殊处理,先生成画布尺寸大小的纹理然后原始位置绘制\n else if(limitCache) {\n let c = inject.getCacheCanvas(width, height, '__$$OVERSIZE$$__');\n node.render(renderMode, 0, gl, NA, 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, 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 {\n [NODE_OPACITY]: opacity,\n [NODE_MATRIX_EVENT]: matrixEvent,\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [MIX_BLEND_MODE]: mixBlendMode,\n },\n } = __config;\n if(display === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n continue;\n }\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, matrixEvent, 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, matrixEvent, cx, cy, 0, 0, true);\n }\n if(target !== __cache) {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\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, matrixEvent, 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, matrixEvent, cx, cy, 0, 0, true);\n }\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n }\n // 超限的情况,这里是普通单节点超限,没有合成total后再合成特殊cache如filter/mask/mbm之类的,\n // 直接按原始位置绘制到离屏canvas,再作为纹理绘制即可,特殊的在total那做过降级了\n else if(limitCache && display !== 'none' && visibility !== 'hidden') {\n let c = inject.getCacheCanvas(width, height, '__$$OVERSIZE$$__');\n node.render(renderMode, refreshLevel, gl, NA, 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, 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 // webgl特殊的外部钩子,比如粒子组件自定义渲染时调用\n if(node.hookGlRender) {\n node.hookGlRender(gl, opacity, matrixEvent, cx, cy, 0, 0, true);\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 [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n // 排除Text,要么根节点直接绘制,要么被局部根节点汇总,自身并不缓存(fillText比位图更快)\n if(node instanceof Text) {\n continue;\n }\n let __config = node.__config;\n let {\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_CACHE_AS_BITMAP]: cacheAsBitmap,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = __config;\n if(refreshLevel >= REPAINT) {\n node.__calCache(renderMode, ctx, __config[NODE_DOM_PARENT],\n __config[NODE_CACHE_STYLE], __config[NODE_CURRENT_STYLE], computedStyle,\n node.clientWidth, node.clientHeight, node.offsetWidth, node.offsetHeight,\n computedStyle[BORDER_TOP_WIDTH], computedStyle[BORDER_RIGHT_WIDTH],\n computedStyle[BORDER_BOTTOM_WIDTH], computedStyle[BORDER_LEFT_WIDTH],\n computedStyle[PADDING_TOP], computedStyle[PADDING_RIGHT],\n computedStyle[PADDING_BOTTOM], computedStyle[PADDING_LEFT],\n node.__sx1, node.__sx2, node.__sx3, node.__sx4, node.__sx5, node.__sx6,\n node.__sy1, node.__sy2, node.__sy3, node.__sy4, node.__sy5, node.__sy6);\n }\n if(cacheAsBitmap) {\n // 跳过display:none元素和它的所有子节点\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n continue;\n }\n mergeList.push([i, lv, total, node, __config, hasMask]);\n }\n }\n /**\n * 根据收集的需要合并局部根的索引,尝试合并,按照层级从大到小,索引从大到小的顺序,\n * 这样保证子节点在前,后节点在前(mask在后面),渲染顺序正确\n */\n if(mergeList.length) {\n mergeList.sort(function(a, b) {\n if(a[1] === b[1]) {\n return b[0] - a[0];\n }\n return b[1] - a[1];\n });\n mergeList.forEach(item => {\n let [i, lv, total, node, __config, hasMask] = item;\n genTotal(renderMode, node, __config, i, lv, total || 0, __structs, hasMask, width, height);\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 [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n // text如果display不可见,parent会直接跳过,不会走到这里,这里一定是直接绘制到root的,visibility在其内部判断\n if(node instanceof Text) {\n node.render(renderMode, REPAINT, ctx, NA, 0, 0);\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n }\n else {\n let __config = node.__config;\n let {\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [MIX_BLEND_MODE]: mixBlendMode,\n [OPACITY]: opacity,\n },\n } = __config;\n // 遮罩对象申请了个离屏,其第一个mask申请另外一个离屏mask2,开始聚集所有mask元素的绘制,\n // 这是一个十分特殊的逻辑,保存的index是最后一个节点的索引,OFFSCREEN_MASK2是最低优先级,\n // 这样当mask本身有filter时优先自身,然后才是OFFSCREEN_MASK2\n if(maskStartHash.hasOwnProperty(i)) {\n let [idx, n, 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(--n) {\n let { [STRUCT_TOTAL]: total } = __structs[j];\n j += (total || 0) + 1;\n }\n j--;\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([idx, lv, OFFSCREEN_MASK, offscreenMask]);\n list.push([j, lv, OFFSCREEN_MASK2, {\n ctx, // 保存等待OFFSCREEN_MASK2时还原\n target,\n }]);\n ctx = target.ctx;\n }\n // 有cache声明从而有total的可以直接绘制并跳过子节点索,total生成可能会因超限而失败\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal]);\n if(target) {\n let j = i;\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n // total的none直接跳过\n if(display === 'none') {\n continue;\n }\n if(isValidMbm(mixBlendMode)) {\n ctx.globalCompositeOperation = mbmName(mixBlendMode);\n }\n else {\n ctx.globalCompositeOperation = 'source-over';\n }\n // cache需要计算matrixEvent,因为局部根节点临时视为E,根据refreshLevel决定\n let matrix = __config[NODE_MATRIX], matrixEvent = __config[NODE_MATRIX_EVENT];\n let old = matrixEvent.slice(0);\n let parentMatrix = __config[NODE_DOM_PARENT].matrixEvent;\n if(parentMatrix && !isE(parentMatrix)) {\n matrix = multiply(parentMatrix, matrix);\n }\n util.assignMatrix(matrixEvent, matrix);\n Cache.draw(ctx, opacity, matrixEvent, target);\n // total应用后记得设置回来\n ctx.globalCompositeOperation = 'source-over';\n // 父超限但子有total的时候,i此时已经增加到了末尾,也需要检查\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n // 有cache的可以跳过子节点,但如果matrixEvent变化还是需要遍历计算一下的,虽然跳过了渲染\n // 如果cache是新的,则需要完整遍历设置一次\n // 如果isNew为false,则计算下局部根节点再对比下看是否有变化,无变化可省略\n let needReset = __cacheTotal.isNew;\n if(!needReset && !util.equalArr(old, matrixEvent)) {\n needReset = true;\n }\n if(needReset) {\n resetMatrixCacheTotal(__structs, j, total || 0, lv, matrixEvent);\n }\n __cacheTotal.__isNew = false;\n }\n // 没有cacheTotal是普通节点绘制\n else {\n let res = node.render(renderMode, refreshLevel, ctx, NA, 0, 0);\n let { offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow } = res || {};\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_BLEND, offscreenBlend]);\n ctx = offscreenBlend.target.ctx;\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n // 最后一个遮罩索引因数量不好计算,放在maskStartHash做\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = [i, hasMask, offscreenMask];\n ctx = offscreenMask.target.ctx;\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_FILTER, offscreenFilter]);\n ctx = offscreenFilter.target.ctx;\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_OVERFLOW, offscreenOverflow]);\n ctx = offscreenOverflow.target.ctx;\n }\n // 离屏应用,按照lv从大到小即子节点在前先应用,同一个节点多个效果按offscreen优先级从小到大来,\n // 由于mask特殊索引影响,所有离屏都在最后一个mask索引判断,此时mask本身优先结算,以index序大到小判断\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n // render后判断可见状态,此时computedStyle才有值,none可以忽略渲染,但是可能会跳过offscreenHash预置的索引\n if(display === 'none') {\n let add = (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n for(let j = i + 1; j <= i + add; j++) {\n if(offscreenHash.hasOwnProperty(j)) {\n ctx = applyOffscreen(ctx, offscreenHash[j], width, height);\n }\n }\n i += add;\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 Xom from './Xom';\nimport Component from './Component';\nimport Defs from './Defs';\nimport Geom from './geom/Geom';\nimport builder from '../util/builder';\nimport updater from '../util/updater';\nimport util from '../util/util';\nimport domDiff from '../util/diff';\nimport css from '../style/css';\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 MARGIN_TOP,\n MARGIN_LEFT,\n MARGIN_BOTTOM,\n PADDING_TOP,\n PADDING_LEFT,\n PADDING_BOTTOM,\n BORDER_TOP_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n POINTER_EVENTS,\n WRITING_MODE,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_STYLE,\n UPDATE_KEYS,\n UPDATE_COMPONENT,\n UPDATE_FOCUS,\n UPDATE_OVERWRITE,\n UPDATE_LIST,\n UPDATE_CONFIG,\n UPDATE_ADD_DOM,\n UPDATE_REMOVE_DOM,\n },\n NODE_KEY: {\n NODE_TAG_NAME,\n NODE_CACHE_STYLE,\n NODE_CACHE_PROPS,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_CURRENT_PROPS,\n NODE_DOM_PARENT,\n NODE_IS_MASK,\n NODE_REFRESH_LV,\n NODE_IS_DESTROYED,\n NODE_STYLE,\n NODE_UPDATE_HASH,\n NODE_UNIQUE_UPDATE_ID,\n NODE_CACHE,\n NODE_CACHE_TOTAL,\n NODE_CACHE_FILTER,\n NODE_CACHE_OVERFLOW,\n NODE_CACHE_MASK,\n NODE_STRUCT,\n },\n STRUCT_KEY: {\n STRUCT_INDEX,\n STRUCT_TOTAL,\n STRUCT_NODE,\n }\n} = enums;\nconst DIRECTION_HASH = {\n [TOP]: true,\n [RIGHT]: true,\n [BOTTOM]: true,\n [LEFT]: true,\n};\nconst { isNil, isObject, isFunction } = util;\nconst { AUTO, PX, PERCENT, INHERIT } = unit;\nconst { isRelativeOrAbsolute, equalStyle } = css;\nconst { contain, getLevel, isRepaint, NONE, FILTER, PERSPECTIVE, REPAINT, REFLOW, REBUILD } = level;\nconst { isIgnore, 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, 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\n// 提取出对比节点尺寸是否固定非AUTO\nfunction isFixedWidthOrHeight(node, k) {\n let c = node.currentStyle[k];\n return c[1] !== AUTO;\n}\n// 除了固定尺寸,父级也不能是flex或变化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.currentStyle[DISPLAY] === 'flex' || parent.computedStyle[DISPLAY] === 'flex') {\n return false;\n }\n }\n }\n return res;\n}\n\nfunction isLAYOUT(node) {\n return node.hasOwnProperty('__uniqueReflowId');\n}\n\nlet __uniqueReflowId = 0;\nfunction setLAYOUT(node, hash, component, addDom) {\n if(!node.hasOwnProperty('__uniqueReflowId')) {\n node.__uniqueReflowId = __uniqueReflowId;\n hash[__uniqueReflowId++] = {\n node,\n component,\n addDom,\n };\n }\n}\n\n/**\n * 单独提出共用检测影响的函数,从节点本身开始向上分析影响,找到最上层的影响节点设置其重新布局\n * 过程即__checkReflow中所提及的,各种情况\n * 将影响升至最近的父级节点,并添加布局标识,这样后面的深度遍历会以父级为准忽略本身\n * 如果最终是root,则返回true标识,直接整个重新开始布局\n * ====\n * addDom情况下的特殊影响检测,类似checkInfluence\n * 添加的是absolute则只影响自己,大部分交互游戏情况属于此类型优化\n * 添加的是inline/inlineBlock的话,影响最近非inline父节点\n * 父为flex则直接影响父节点,不管添加情况如何\n * 添加block/flex的话,上下都block/flex则只影响自己,否则还是影响父节点\n * 如果最终是root,则返回true标识,直接整个重新开始布局\n * @returns {boolean}\n */\nfunction checkInfluence(root, reflowHash, node, component, addDom) {\n // add情况abs节点特殊对待不影响其它节点,不能判断display,因为inline会强制block\n if(addDom && node.currentStyle[POSITION] === 'absolute') {\n return;\n }\n let target = node;\n // inline新老都影响,节点变为最近的父非inline\n if(['inline', 'inlineBlock'].indexOf(target.currentStyle[DISPLAY]) > -1\n || ['inline', 'inlineBlock'].indexOf(target.computedStyle[DISPLAY]) > -1) {\n do {\n target = target.domParent;\n // 父到root提前跳出\n if(target === root) {\n return true;\n }\n // 父已有LAYOUT跳出防重\n if(isLAYOUT(target)) {\n return;\n }\n // 遇到absolute跳出,设置其布局;如果absolute不变化普通处理,如果absolute发生变化,一定会存在于列表中,不用考虑\n if(target.currentStyle[POSITION] === 'absolute' || target.computedStyle[POSITION] === 'absolute') {\n setLAYOUT(target, reflowHash, component, addDom);\n return;\n }\n }\n while(target && (['inline', 'inlineBlock'].indexOf(target.currentStyle[DISPLAY]) > -1\n || ['inline', 'inlineBlock'].indexOf(target.computedStyle[DISPLAY]) > -1));\n // target已不是inline,父固定宽高跳出直接父进行LAYOUT即可,不影响上下文,但不能是flex孩子,此时固定尺寸无用\n if(isFixedSize(target, true)) {\n setLAYOUT(target, reflowHash, component, addDom);\n return;\n }\n }\n // 此时target指向node,如果原本是inline则是其flow的非inline父\n let parent = target.domParent;\n // parent有LAYOUT跳出,已被包含\n if(isLAYOUT(parent)) {\n return;\n }\n // 向上检查flex,如果父级中有flex,以最上层的flex视作其更改,node本身flex不进入\n let topFlex;\n do {\n // 父已有LAYOUT跳出防重\n if(isLAYOUT(parent)) {\n return;\n }\n // flex相关,包含变化或不变化\n if(parent.computedStyle[DISPLAY] === 'flex' || parent.currentStyle[DISPLAY] === 'flex') {\n topFlex = parent;\n }\n // 遇到absolute跳出,如果absolute不变化普通处理,如果absolute发生变化,一定会存在于列表中,不用考虑\n if(parent.currentStyle[POSITION] === 'absolute' || parent.computedStyle[POSITION] === 'absolute') {\n break;\n }\n // 父固定宽高跳出\n if(isFixedSize(parent, true)) {\n break;\n }\n parent = parent.domParent;\n }\n while(parent);\n // 找到最上层flex,视作其更改\n if(topFlex) {\n target = topFlex;\n }\n if(target === root) {\n return true;\n }\n parent = target;\n // 向上检查非固定尺寸的absolute,找到则视为其变更,上面过程中一定没有出现absolute\n while(parent) {\n // 无论新老absolute,不变化则设置,变化一定会出现在列表中\n if(parent.currentStyle[POSITION] === 'absolute' || parent.computedStyle[POSITION] === 'absolute') {\n if(parent === root) {\n break;\n }\n // 固定尺寸的不用设置,需要跳出循环\n if(isFixedSize(parent)) {\n break;\n }\n else {\n setLAYOUT(parent, reflowHash, component, addDom);\n return;\n }\n }\n parent = parent.domParent;\n }\n // 向上查找了并且没提前跳出的target如果不等于自身则重新布局,自身外面设置过了\n if(target !== node) {\n setLAYOUT(target, reflowHash, component, addDom);\n }\n else if(addDom) {\n // 前后必须都是block,否则还是视为父布局\n let isSiblingBlock = true;\n let { prev, next } = node;\n if(prev && ['inline', 'inlineBlock'].indexOf(prev.currentStyle[DISPLAY]) > -1) {\n isSiblingBlock = false;\n }\n else if(next && ['inline', 'inlineBlock'].indexOf(next.currentStyle[DISPLAY]) > -1) {\n isSiblingBlock = false;\n }\n if(!isSiblingBlock) {\n target = node.domParent;\n if(target === root) {\n return true;\n }\n setLAYOUT(target, reflowHash, false, true);\n }\n }\n}\n\nlet uniqueUpdateId = 0;\nfunction parseUpdate(renderMode, root, target, reflowList, cacheHash, cacheList, zHash, zList) {\n let {\n [UPDATE_NODE]: node,\n [UPDATE_STYLE]: style,\n [UPDATE_OVERWRITE]: overwrite,\n [UPDATE_FOCUS]: focus,\n [UPDATE_COMPONENT]: component,\n [UPDATE_LIST]: list,\n [UPDATE_KEYS]: keys,\n [UPDATE_CONFIG]: __config,\n [UPDATE_ADD_DOM]: addDom,\n [UPDATE_REMOVE_DOM]: removeDom,\n } = target;\n if(__config[NODE_IS_DESTROYED]) {\n return;\n }\n // updateStyle()这样的调用需要覆盖原有样式,因为是按顺序遍历,后面的优先级自动更高不怕重复\n if(overwrite) {\n Object.assign(__config[NODE_STYLE], overwrite);\n }\n // 多次调用更新才会有list,一般没有,优化;component无需,因为多次都是它自己\n if(list && !component) {\n keys = (keys || []).slice(0); // 防止原始值被更改\n let hash = {};\n keys.forEach(k => {\n hash[k] = true;\n });\n list.forEach(item => {\n let { [UPDATE_STYLE]: style2, [UPDATE_OVERWRITE]: overwrite, [UPDATE_KEYS]: keys2 } = item;\n (keys2 || []).forEach(k2 => {\n if(!hash.hasOwnProperty(k2)) {\n hash[k2] = true;\n keys.push(k2);\n }\n });\n if(overwrite) {\n Object.assign(__config[NODE_STYLE], overwrite);\n }\n if(style2) {\n if(style) {\n Object.assign(style, style2);\n }\n else {\n style = style2;\n }\n }\n });\n }\n // 按节点合并完style后判断改变等级\n let {\n [NODE_TAG_NAME]: tagName,\n [NODE_CACHE_STYLE]: __cacheStyle,\n [NODE_CACHE_PROPS]: __cacheProps,\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_CURRENT_PROPS]: currentProps,\n [NODE_DOM_PARENT]: domParent,\n [NODE_IS_MASK]: isMask,\n } = __config;\n let lv = focus || NONE;\n let hasZ, hasVisibility, hasColor, hasDisplay, hasTsColor, hasTsWidth, hasTsOver;\n // component无需遍历直接赋值,img重新加载等情况没有样式更新\n if(!component && style && keys) {\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n let v = style[k];\n // 只有geom的props和style2种可能\n if(node instanceof Geom && isGeom(tagName, k)) {\n if(!equalStyle(k, v, currentProps[k], node)) {\n lv |= REPAINT;\n __cacheProps[k] = undefined;\n currentProps[k] = v;\n }\n }\n else {\n // 需和现在不等,且不是pointerEvents这种无关的\n if(!equalStyle(k, v, currentStyle[k], node)) {\n // pointerEvents这种无关的只需更新\n if(isIgnore(k)) {\n __cacheStyle[k] = undefined;\n currentStyle[k] = v;\n }\n else {\n // TRBL变化只对relative/absolute起作用,其它忽视\n if(DIRECTION_HASH.hasOwnProperty(k)) {\n let position = currentStyle[POSITION];\n if(position !== 'relative' && position !== 'absolute') {\n delete style[k];\n continue;\n }\n }\n else if(k === DISPLAY) {\n hasDisplay = true;\n }\n // repaint细化等级,reflow在checkReflow()\n lv |= getLevel(k);\n // repaint置空,如果reflow会重新生成空的\n __cacheStyle[k] = undefined;\n currentStyle[k] = v;\n if(k === Z_INDEX && node !== root) {\n hasZ = true;\n }\n else if(k === VISIBILITY) {\n hasVisibility = true;\n }\n else if(k === COLOR) {\n hasColor = true;\n }\n else if(k === TEXT_STROKE_COLOR) {\n hasTsColor = true;\n }\n else if(k === TEXT_STROKE_WIDTH) {\n hasTsWidth = true;\n }\n else if(k === TEXT_STROKE_OVER) {\n hasTsOver = true;\n }\n }\n }\n }\n }\n }\n // 无任何改变处理的去除记录,如pointerEvents、无效的left\n // 但是perspective需考虑进来,虽然不影响自己但影响别人,要返回true表明有变更\n if(lv === NONE && !component) {\n delete __config[NODE_UNIQUE_UPDATE_ID];\n return;\n }\n // 由于父节点中有display:none,或本身节点也为none,执行普通动画是无效的,此时没有display变化\n if(computedStyle[DISPLAY] === 'none' && !hasDisplay) {\n return;\n }\n // 记录下来清除parent的zIndexChildren缓存\n if(hasZ && domParent) {\n delete domParent.__zIndexChildren;\n }\n // 影响子继承REPAINT的变化,如果被cache住需要清除\n if(hasVisibility || hasColor || hasTsColor || hasTsWidth || hasTsOver) {\n for(let __structs = root.__structs, __struct = node.__config[NODE_STRUCT], i = __struct[STRUCT_INDEX] + 1, len = i + __struct[STRUCT_TOTAL]; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n } = __structs[i];\n // text的style指向parent,不用管\n if(node instanceof Text) {\n continue;\n }\n let __config = node.__config;\n let currentStyle = __config[NODE_CURRENT_STYLE];\n let need;\n if(hasVisibility && currentStyle[VISIBILITY][1] === INHERIT) {\n need = true;\n }\n else if(hasColor && currentStyle[COLOR][1] === INHERIT) {\n need = true;\n }\n else if(hasTsColor && currentStyle[TEXT_STROKE_COLOR][1] === INHERIT) {\n need = true;\n }\n else if(hasTsWidth && currentStyle[TEXT_STROKE_WIDTH][1] === INHERIT) {\n need = true;\n }\n else if(hasTsOver && currentStyle[TEXT_STROKE_OVER][1] === INHERIT) {\n need = true;\n }\n if(need) {\n __config[NODE_REFRESH_LV] |= REPAINT;\n node.clearCache();\n }\n else {\n i += total || 0;\n }\n }\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.__config[NODE_CACHE_MASK]) {\n prev.__config[NODE_CACHE_MASK].release();\n }\n }\n // 特殊情况,父节点display:none,子节点进行任意变更,应视为无效\n // 如果父节点由none变block,这里也return false,因为父节点会重新layout+render\n // 如果父节点由block变none,同上,所以只要current/computed里有none就return false\n let parent = domParent;\n if(hasDisplay && parent) {\n let __config = parent.__config;\n if(__config[NODE_CURRENT_STYLE][DISPLAY] === 'none' || __config[NODE_COMPUTED_STYLE][DISPLAY] === 'none') {\n computedStyle[DISPLAY] = 'none';\n return;\n }\n }\n // reflow/repaint相关的记录下来\n let isRp = !component && isRepaint(lv);\n if(isRp) {\n // zIndex变化需清空svg缓存\n if(hasZ && renderMode === mode.SVG) {\n lv |= REPAINT;\n domParent && cleanSvgCache(domParent);\n }\n // z改变影响struct局部重排,它的数量不会变因此不影响外围,此处先收集,最后统一对局部根节点进行更新\n if(hasZ && !component && zHash) {\n if(domParent && !domParent.hasOwnProperty('__uniqueZId')) {\n zHash[uniqueUpdateId] = true;\n domParent.__uniqueZId = uniqueUpdateId++;\n zList.push(domParent);\n }\n }\n }\n // reflow在root的refresh中做\n else {\n reflowList.push({\n node,\n style,\n component,\n addDom,\n removeDom,\n });\n }\n // 这里也需|运算,每次刷新会置0,但是如果父元素进行继承变更,会在此元素分析前更改,比如visibility,此时不能直接赋值\n __config[NODE_REFRESH_LV] |= lv;\n if(component || addDom || removeDom) {\n root.__rlv = REBUILD;\n }\n else {\n root.__rlv = Math.max(root.__rlv, lv);\n }\n // dom在>=REPAINT时total失效,svg的Geom比较特殊\n let need = lv >= REPAINT || renderMode === mode.SVG && node instanceof Geom;\n if(need) {\n if(__config[NODE_CACHE]) {\n __config[NODE_CACHE].release();\n }\n }\n // perspective也特殊只清空total的cache,和>=REPAINT清空total共用\n if(need || contain(lv, PERSPECTIVE)) {\n if(__config[NODE_CACHE_TOTAL]) {\n __config[NODE_CACHE_TOTAL].release();\n }\n if(__config[NODE_CACHE_MASK]) {\n __config[NODE_CACHE_MASK].release();\n }\n if(__config[NODE_CACHE_OVERFLOW]) {\n __config[NODE_CACHE_OVERFLOW].release();\n }\n }\n // 特殊的filter清除cache\n if((need || contain(lv, FILTER)) && __config[NODE_CACHE_FILTER]) {\n __config[NODE_CACHE_FILTER].release();\n }\n // 向上清除等级>=REPAINT的汇总缓存信息,过程中可能会出现重复,因此节点上记录一个临时标防止重复递归\n while(parent) {\n let __config = parent.__config;\n // 向上查找,出现重复跳出\n if(__config.hasOwnProperty(NODE_UNIQUE_UPDATE_ID)) {\n let id = __config[NODE_UNIQUE_UPDATE_ID];\n if(cacheHash.hasOwnProperty(id)) {\n break;\n }\n cacheHash[id] = true;\n }\n // 没有的需要设置一个标识\n else {\n cacheHash[uniqueUpdateId] = true;\n __config[NODE_UNIQUE_UPDATE_ID] = uniqueUpdateId++;\n cacheList.push(__config);\n }\n let lv = __config[NODE_REFRESH_LV];\n let need = lv >= REPAINT;\n if(need && __config[NODE_CACHE]) {\n __config[NODE_CACHE].release();\n }\n // 前面已经过滤了无改变NONE的,只要孩子有任何改变父亲就要清除\n if(__config[NODE_CACHE_TOTAL]) {\n __config[NODE_CACHE_TOTAL].release();\n }\n if(__config[NODE_CACHE_FILTER]) {\n __config[NODE_CACHE_FILTER].release();\n }\n if(__config[NODE_CACHE_MASK]) {\n __config[NODE_CACHE_MASK].release();\n }\n if(__config[NODE_CACHE_OVERFLOW]) {\n __config[NODE_CACHE_OVERFLOW].release();\n }\n parent = __config[NODE_DOM_PARENT];\n }\n return true;\n}\n\nfunction cleanSvgCache(node, child) {\n let __config = node.__config;\n if(child) {\n __config[NODE_REFRESH_LV] |= REPAINT;\n }\n else {\n __config[NODE_CACHE_TOTAL].release();\n }\n if(Array.isArray(node.children)) {\n node.children.forEach(child => {\n if(child instanceof Component) {\n child = child.shadowRoot;\n }\n if(!(child instanceof Text)) {\n cleanSvgCache(child, true);\n }\n });\n }\n}\n\nlet uuid = 0;\n\nclass Root extends Dom {\n constructor(tagName, props, children) {\n super(tagName, props);\n this.__cd = children || []; // 原始children,再初始化过程中生成真正的dom\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.__taskCp = [];\n this.__ref = {};\n this.__reflowList = [{ node: this }]; // 初始化填自己,第一次布局时复用逻辑完全重新布局\n this.__animateController = new Controller();\n Event.mix(this);\n this.__config[NODE_UPDATE_HASH] = this.__updateHash = {};\n this.__uuid = uuid++;\n this.__rlv = REBUILD; // 每次刷新最大lv\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 += `>${domName}>`;\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);\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.__initProps();\n this.__root = this;\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(null, 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 refresh(cb, isFirst) {\n this.__hookTask = null;\n let { isDestroyed, renderMode, ctx, defs, width, height } = this;\n if(isDestroyed) {\n return;\n }\n defs.clear();\n // 首次递归测量整树的继承,后续更改各自更新机制做,防止每次整树遍历;root检查首次直接做,后续在checkUpdate()中插入\n if(isFirst) {\n this.__checkRoot(renderMode, width, height);\n }\n // 非首次刷新如果没有更新则无需继续\n else if(!this.__checkUpdate(renderMode, ctx, width, height)) {\n return;\n }\n this.__checkReflow(width, height);\n if(renderMode === mode.CANVAS && !this.props.noRender) {\n this.__clear(ctx, renderMode);\n struct.renderCanvas(renderMode, ctx, this);\n }\n // svg的特殊diff需要\n else if(renderMode === mode.SVG && !this.props.noRender) {\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 && !this.props.noRender) {\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 /**\n * 为component的setState更新专门开辟个独立的流水线,root/frame中以taskCp存储更新列表\n * 普通的动画、img加载等都走普通的refresh的task,component走这里,frame中的结构同样\n * 在frame的每帧调用中,先执行普通的动画task,再执行component的task\n * 这样动画执行完后,某个cp的sr及子节点依旧先进行了动画变更,进入__addUpdate()环节\n * 然后此cp再更新sr及子节点,这样会被__addUpdate()添加到尾部,依赖目前浏览器默认实现\n * 上一行cp更新过程中是updater.check()进行的,如果有新老交换且有动画,动画的assigning是true,进行继承\n * root刷新parseUpdate()时,老的sr及子节点先进行,随后新的sr后进行且有component标识,sr子节点不会有更新\n * @param cb\n */\n addRefreshCp(cb) {\n let { taskCp, isDestroyed } = this;\n if(isDestroyed) {\n return;\n }\n // 每次只执行1次\n if(!taskCp.length) {\n let clone;\n frame.__nextFrameCp({\n __before: diff => {\n if(this.isDestroyed) {\n return;\n }\n clone = taskCp.splice(0);\n if(clone.length) {\n clone.forEach(item => {\n item.__before(diff);\n });\n updater.check(this);\n let len = updater.updateList.length;\n if(len) {\n updater.updateList.forEach(cp => {\n let root = cp.root; // 多个root并存时可能cp的引用不相同,需分别获取\n let sr = cp.shadowRoot;\n // 可能返回text,需视为其parentNode\n if(sr instanceof Text) {\n sr = sr.domParent;\n }\n let res = {};\n res[UPDATE_NODE] = sr;\n res[UPDATE_STYLE] = sr.currentStyle;\n res[UPDATE_FOCUS] = REFLOW;\n res[UPDATE_COMPONENT] = cp;\n res[UPDATE_CONFIG] = sr.__config;\n this.__addUpdate(sr, sr.__config, root, root.__config, res);\n });\n }\n }\n },\n __after: diff => {\n if(this.isDestroyed) {\n return;\n }\n clone.forEach(item => {\n item.__after(diff);\n });\n // 触发didUpdate\n updater.did();\n },\n });\n this.__frameHook();\n }\n if(taskCp.indexOf(cb) === -1) {\n taskCp.push(cb);\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] = [width, PX];\n currentStyle[HEIGHT] = [height, 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 * 添加更新入口,按节点汇总更新信息\n * @private\n */\n __addUpdate(node, nodeConfig, root, rootConfig, o) {\n let updateHash = rootConfig[NODE_UPDATE_HASH];\n // root特殊处理,检查变更时优先看继承信息\n if(node === root) {\n updateHash = root.__updateRoot;\n if(updateHash) {\n if(o[UPDATE_FOCUS]) {\n updateHash[UPDATE_FOCUS] |= o[UPDATE_FOCUS];\n }\n // 后续存在新建list上,需增加遍历逻辑\n if(o[UPDATE_STYLE]) {\n let list = updateHash[UPDATE_LIST] = updateHash[UPDATE_LIST] || [];\n list.push({\n [UPDATE_STYLE]: o[UPDATE_STYLE],\n [UPDATE_OVERWRITE]: o[UPDATE_OVERWRITE],\n [UPDATE_KEYS]: o[UPDATE_KEYS],\n });\n }\n }\n else {\n root.__updateRoot = o;\n }\n }\n else if(!nodeConfig.hasOwnProperty(NODE_UNIQUE_UPDATE_ID)) {\n nodeConfig[NODE_UNIQUE_UPDATE_ID] = uniqueUpdateId;\n // 大多数情况节点都只有一次更新,所以优化首次直接存在style上,后续存在list\n updateHash[uniqueUpdateId++] = o;\n }\n else if(updateHash.hasOwnProperty(nodeConfig[NODE_UNIQUE_UPDATE_ID])) {\n let target = updateHash[nodeConfig[NODE_UNIQUE_UPDATE_ID]];\n if(o[UPDATE_FOCUS]) {\n target[UPDATE_FOCUS] |= o[UPDATE_FOCUS];\n }\n // 后续存在新建list上,需增加遍历逻辑\n if(o[UPDATE_STYLE]) {\n let list = target[UPDATE_LIST] = target[UPDATE_LIST] || [];\n list.push({\n [UPDATE_STYLE]: o[UPDATE_STYLE],\n [UPDATE_OVERWRITE]: o[UPDATE_OVERWRITE],\n [UPDATE_KEYS]: o[UPDATE_KEYS],\n });\n }\n }\n else {\n inject.error('Update process miss uniqueUpdateId');\n }\n }\n\n /**\n * 除首次外每次刷新前检查更新列表,计算样式变化,以及测量信息\n * @private\n */\n __checkUpdate(renderMode, ctx, width, height) {\n let root = this;\n let reflowList = [];\n let cacheHash = {};\n let cacheList = [];\n let zHash = {};\n let zList = [];\n let updateRoot = root.__updateRoot;\n let updateHash = root.__updateHash;\n // 给个方式使得外部可以强制刷新\n let hasUpdate = root.__hasRootUpdate;\n root.__hasRootUpdate = false;\n // root更新特殊提前,因为有继承因素\n if(updateRoot) {\n root.__updateRoot = null;\n hasUpdate = parseUpdate(renderMode, root, updateRoot,\n reflowList, cacheHash, cacheList);\n // 此时做root检查,防止root出现继承等无效样式,或者发生resize()\n if(hasUpdate) {\n root.__checkRoot(renderMode, width, height);\n }\n }\n // 汇总处理每个节点,k是递增数字直接循环遍历\n let keys = Object.keys(updateHash);\n for(let i = 0, len = keys.length; i < len; i++) {\n let t = parseUpdate(renderMode, root, updateHash[keys[i]],\n reflowList, cacheHash, cacheList, zHash, zList);\n hasUpdate = hasUpdate || t;\n }\n // 先做一部分reset避免下面measureList干扰,cacheList的是专门收集新增的额外节点\n root.__reflowList = reflowList;\n uniqueUpdateId = 0;\n root.__updateHash = root.__config[NODE_UPDATE_HASH] = {};\n cacheList.forEach(__config => {\n delete __config[NODE_UNIQUE_UPDATE_ID];\n });\n // zIndex改变的汇总修改,防止重复操作,有个注意点,有新增的child时,\n // 会在后面的reflow重新build父节点的struct,这里提前更新会报错,里面进行判断\n zList.forEach(item => {\n if(item.hasOwnProperty('__uniqueZId')) {\n delete item.__uniqueZId;\n item.__updateStruct(root.__structs);\n }\n });\n // 做完清空留待下次刷新重来\n for(let i = 0, len = keys.length; i < len; i++) {\n delete updateHash[keys[i]][UPDATE_CONFIG][NODE_UNIQUE_UPDATE_ID];\n }\n return hasUpdate;\n }\n\n /**\n * 除首次外每次刷新前检查reflow列表,计算需要reflow的节点局部重新布局\n * 当一个元素absolute不变时,其变化不会影响父元素和兄弟元素,直接自己重新局部LAYOUT包含子节点\n * 当absolute发生改变时,其变化会影响父和兄弟,视作父重新布局\n * 当inline变化时,视为其最近block/flex父变化\n * 当block变化时,往上查找最上层flex视为其变化,如不是则影响后面兄弟offset和父resize\n * 当flex变化时,往上查找最上层flex视为其变化,如不是则影响所有递归子节点layout和父resize\n * 以上3种情况向上查找时遇到absolute父均提前跳出,并标记absolute父LAYOUT\n * 上面所有情况即便结束还得额外看是否处于absolute中,是还是标记absolute重新布局\n * 当relative只变化left/top/right/bottom时,自己重新layout\n * 检测节点时记录影响的所有节点,最终形成一棵或n棵局部树\n * 需要重新布局的记作LAYOUT,被兄弟影响只需偏移的记作OFFSET,OFFSET可能会重复变为LAYOUT\n * 上述情况倘若发生包含重复,去掉子树,因子树视为被包含的重新布局\n * 如果有从root开始的,直接重新布局像首次那样即可\n * 如果非root,所有树根按先根顺序记录下来,依次执行局部布局\n * =========================\n * addDom比较特殊,是向已有节点中添加新的节点,检查影响与普通domDiff变化不同\n * @private\n */\n __checkReflow(width, height) {\n let { __reflowList: reflowList } = this;\n if(!reflowList.length) {\n return;\n }\n let root = this;\n let uniqueList = [];\n let hasRoot;\n __uniqueReflowId = 0;\n let reflowHash = {};\n // 遍历检查发生布局改变的节点列表,此时computedStyle还是老的,currentStyle是新的\n for(let i = 0, len = reflowList.length; i < len; i++) {\n let item = reflowList[i];\n let { node, component, addDom, removeDom } = item;\n // root提前跳出,完全重新布局\n if(node === this) {\n hasRoot = true;\n break;\n }\n // 添加时如果是cp则node取sr来布局\n if(addDom && node instanceof Component) {\n node = node.shadowRoot;\n }\n // 每个节点生成唯一的布局识别id存入hash防止重复\n if(!node.hasOwnProperty('__uniqueReflowId')) {\n node.__uniqueReflowId = __uniqueReflowId;\n reflowHash[__uniqueReflowId++] = item;\n }\n // 每个节点都向上检查影响,以及是否从root开始完全重新,remove特殊对待,影响父节点视为普通父节点relay\n if(checkInfluence(root, reflowHash, node, component, addDom)) {\n hasRoot = true;\n if(addDom) {\n this.__zIndexChildren = null;\n }\n break;\n }\n // remove的要特殊对待,因为提前删除了父子兄弟关系,下面deepScan不会出现\n else if(removeDom) {\n uniqueList.push(item);\n }\n }\n __uniqueReflowId = 0;\n this.__reflowList = [];\n // 有root提前跳出\n if(hasRoot) {\n reflow.clearUniqueReflowId(reflowHash);\n let isUpright = this.currentStyle[WRITING_MODE].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 });\n this.__structs = this.__structure(0, 0);\n return true;\n }\n /**\n * 修剪树,自顶向下深度遍历\n * LAYOUT节点作为局部根,其递归子节点无需重复任何操作,直接去重\n * OFFSET节点作为局部根,其递归子节点先执行任何操作,后续根节点再偏移一次\n */\n else {\n this.__deepScan(function(node, options) {\n if(node.hasOwnProperty('__uniqueReflowId')) {\n let o = reflowHash[node.__uniqueReflowId];\n options.uniqueList.push(o);\n // 返回true即可提前结束深度遍历,在reflowHash有记录时提前跳出,子节点交由上面逻辑执行\n return true;\n }\n // reflowHash没有记录则无返回继续递归执行\n }, { uniqueList });\n /**\n * 按顺序执行列表即可,上层LAYOUT先执行且停止递归子节点,上层OFFSET后执行等子节点先LAYOUT/OFFSET\n * 同级按先后顺序排列,过程中记录diff在结束后进行structs更新\n * 这里要注意margin合并的逻辑,因为最终都是block(flex等同),需要进行合并\n * 在处理一个block时,先判断是否是空block,同时看后面紧邻的有没有在uniqueList的下一个\n * 单独空block处理、2个相邻的非block处理直接可以进行判断\n * 中间的空block(即非空block的下一个是空block,且下一个不是最后一个),先记录下来list,合并后一并offset\n * 合并margin和Dom的逻辑一样,抽离共有方法\n **/\n let diffList = [];\n let diffI = 0;\n let mergeOffsetList = [];\n let __uniqueMergeOffsetId = 0;\n uniqueList.forEach(item => {\n let { node, component, addDom, removeDom } = item;\n // 重新layout的w/h数据使用之前parent暂存的,x使用parent,y使用prev或者parent的\n let cps = node.computedStyle, cts = node.currentStyle;\n let zIndex = cps[Z_INDEX], position = cps[POSITION], display = cps[DISPLAY];\n let isLastAbs = position === 'absolute';\n let isNowAbs = cts[POSITION] === 'absolute';\n let isLastNone = display === 'none';\n let isNowNone = cts[DISPLAY] === 'none';\n // none不可见布局无效可以无视\n if(isLastNone && isNowNone) {\n return;\n }\n let parent = node.domParent;\n let { __layoutData: { x, y, h }, width, computedStyle } = parent;\n let current = node;\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 if(ref instanceof Text\n || (ref.computedStyle[POSITION] !== 'absolute' && ref.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 if(!removeDom) {\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 }\n // 找到最上层容器,如果是组件的子节点,以sr为container,sr本身往上找\n let container = node;\n // remove的节点本身无需再次布局\n if(!removeDom) {\n if(isNowAbs) {\n container = container.domParent;\n while(container && container !== root) {\n if(isRelativeOrAbsolute(container)) {\n break;\n }\n // 不能用domParent,必须在组件环境内\n if(container.parent) {\n container = container.parent;\n }\n else if(container.host) {\n break;\n }\n }\n if(!container) {\n container = root;\n }\n // 由setState引发的要检查是cp自身还是更上层,如果cp被abs包含,那么node是cp的父亲,否则node是cp的sr\n // 而这种情况下传cp或node都一样,所以最终统一传node\n parent.__layoutAbs(container, parent.__layoutData, node);\n // 优先判断dom变更\n if(addDom) {\n let arr = parent.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n parent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n return;\n }\n // 前后都是abs无需偏移后面兄弟和parent调整,component变化节点需更新struct\n else if(isLastAbs) {\n if(component) {\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n if((position !== cts[POSITION] && (position === 'static' || cts[POSITION] === 'static'))\n || zIndex !== cts[Z_INDEX]) {\n parent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n }\n }\n else if(isLastNone || isNowNone) {\n node.__zIndexChildren = null;\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n }\n return;\n }\n // 标识flow变abs,可能引发zIndex变更,重设struct和svg\n parent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n }\n // 现在是普通流,不管之前是啥直接布局,排除remove删除的\n else {\n node.__layout({\n x,\n y,\n w: width,\n h,\n }, false, false, false);\n y += node.outerHeight;\n if(component) {\n container = node;\n }\n else {\n container = container.domParent;\n while(container && container !== root) {\n if(isRelativeOrAbsolute(container)) {\n break;\n }\n // 不能用domParent,必须在组件环境内\n if(container.parent) {\n container = container.parent;\n }\n else if(container.host) {\n break;\n }\n }\n }\n if(!container) {\n container = root;\n }\n // 防止geom\n if(node instanceof Dom) {\n node.__layoutAbs(container, {\n x,\n y,\n w: width,\n h,\n });\n }\n }\n }\n\n // 向上查找最近的parent是relative,需再次累加ox/oy,无需继续向上递归,因为parent已经递归包含了\n // 这样node重新布局后再次设置其使用parent的偏移\n let p = node;\n while(p && p !== root) {\n p = p.domParent;\n computedStyle = p.computedStyle;\n if(computedStyle[POSITION] === 'relative') {\n let { ox, oy } = p;\n ox && node.__offsetX(ox);\n oy && node.__offsetY(oy);\n break;\n }\n }\n\n // 向下调整next的flow位置,遇到重复LAYOUT的跳出等待其调用并处理其next,忽视掉abs,margin和abs在merge中做\n if(node.isShadowRoot) {\n node = node.hostRoot;\n }\n let next = node.next;\n while(next && !next.hasOwnProperty('__uniqueReflowId')) {\n if(next.computedStyle[POSITION] === 'absolute') {\n next = next.next;\n continue;\n }\n let { y: oy } = next;\n let diff = y - oy;\n if(diff) {\n while(next && !next.hasOwnProperty('__uniqueReflowId')) {\n let target = next;\n if(target instanceof Component) {\n target = target.shadowRoot;\n }\n let cs = target.computedStyle;\n if(cs[POSITION] !== 'absolute' && cs[DISPLAY] !== 'none') {\n target.__offsetY(diff, true, REPAINT);\n }\n next = next.next;\n }\n }\n break;\n }\n\n // 去重防止abs并记录parent,整个结束后按先序顺序进行margin合并以及偏移,注意忽略有display:none变block同时为absolute的\n if(!parent.hasOwnProperty('__uniqueMergeOffsetId') && !(isNowAbs && isLastNone)) {\n parent.__uniqueMergeOffsetId = __uniqueMergeOffsetId++;\n mergeOffsetList.push(parent);\n }\n\n // add和remove都需父节点重新生成struct,zIndexChildren已在对应api操作的before()侦听做了\n if(addDom || removeDom) {\n let arr = parent.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n }\n // component未知dom变化,所以强制重新struct,text则为其父节点,同时防止zIndex变更影响父节点\n else if(component) {\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n if((position !== cts[POSITION] && (position === 'static' || cts[POSITION] === 'static'))\n || zIndex !== cts[Z_INDEX]) {\n node.domParent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(node.domParent);\n }\n }\n }\n // display有none变化,重置struct和zIndexChildren\n else if(isLastNone || isNowNone) {\n node.__zIndexChildren = null;\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n }\n });\n /**\n * mergeMargin后续调整,记录的是变更节点的父节点,因此每个节点内部直接遍历孩子进行\n * 由于保持先根遍历的顺序,因此会从最上最里的节点开始,先进行margin合并\n * 由于之前忽略掉abs节点,因此再检查直接abs是否要调整\n * 完成后对此父节点的后续兄弟节点进行调整,多次不会干扰影响\n * 然后继续往上循环,直到root结束\n */\n let inDirectAbsList = [];\n mergeOffsetList.forEach(parent => {\n delete parent.__uniqueMergeOffsetId;\n let flowChildren = parent.flowChildren, absChildren = parent.absChildren;\n let mergeMarginBottomList = [], mergeMarginTopList = [];\n let length = flowChildren.length, lastChild;\n let isStart, startIndex, startNode;\n // 遍历flow孩子,从开始变化的节点开始,看变化造成的影响,对其后面节点进行偏移,并统计总偏移量\n for(let i = 0; i < length; i++) {\n let item = flowChildren[i];\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n let isXom = item instanceof Xom;\n // 忽略掉前面没有变更的节点,不能合并\n if(!isStart && isXom) {\n if(item.hasOwnProperty('__uniqueReflowId')) {\n isStart = true;\n startIndex = i;\n startNode = item;\n }\n }\n // 开始变更的节点,至少不是第0个\n let cs = isXom && item.currentStyle;\n let isInline = isXom && cs[DISPLAY] === 'inline';\n let isInlineBlock = isXom && cs[DISPLAY] === 'inlineBlock';\n lastChild = item;\n // 每次循环开始前,这次不是block的话,看之前遗留的,可能是以空block结束,需要特殊处理,单独一个空block也包含\n if((!isXom || isInline || isInlineBlock)) {\n if(mergeMarginBottomList.length && mergeMarginTopList.length && isStart) {\n let diff = reflow.getMergeMargin(mergeMarginTopList, mergeMarginBottomList);\n if(diff) {\n for(let j = Math.max(startIndex, i - mergeMarginBottomList.length + 1); j < length; j++) {\n flowChildren[j].__offsetY(diff, true, REPAINT);\n }\n }\n }\n mergeMarginTopList = [];\n mergeMarginBottomList = [];\n }\n // 和普通布局类似,只是不用重新布局只需处理合并margin再根据差值偏移\n if(isXom && !isInline) {\n let isNone = isXom && cs[DISPLAY] === 'none';\n let isEmptyBlock;\n if(!isNone && item.flowChildren && item.flowChildren.length === 0) {\n let {\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n [HEIGHT]: height,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n } = item.computedStyle;\n // 无内容高度为0的空block特殊情况,记录2个margin下来等后续循环判断处理\n if(paddingTop <= 0 && paddingBottom <= 0 && height <= 0 && borderTopWidth <= 0 && borderBottomWidth <= 0) {\n mergeMarginBottomList.push(marginBottom);\n mergeMarginTopList.push(marginTop);\n isEmptyBlock = true;\n }\n }\n // 空block要留下轮循环看,除非是最后一个,非空本轮处理掉看是否要合并\n if(!isNone && !isEmptyBlock) {\n let { [MARGIN_TOP]: marginTop, [MARGIN_BOTTOM]: marginBottom } = item.computedStyle;\n // 有bottom值说明之前有紧邻的block,任意个甚至空block,自己有个top所以无需判断top\n // 如果是只有紧邻的2个非空block,也被包含在情况内,取上下各1合并\n if(mergeMarginBottomList.length) {\n mergeMarginTopList.push(marginTop);\n if(isStart) {\n let diff = reflow.getMergeMargin(mergeMarginTopList, mergeMarginBottomList);\n // 需要合并的情况,根据记录数和索引向上向下遍历节点设置偏移,同时设置总偏移量供父级使用\n if(diff) {\n for(let j = Math.max(startIndex, i - mergeMarginBottomList.length + 1); j < length; j++) {\n flowChildren[j].__offsetY(diff, true, REPAINT);\n }\n }\n }\n }\n // 同时自己保存bottom,为后续block准备\n mergeMarginTopList = [];\n mergeMarginBottomList = [marginBottom];\n }\n // 最后一个空block当是正正和负负时要处理,正负在outHeight处理了结果是0,最后一个一定有不必判断isStart\n else if(i === length - 1) {\n let diff = reflow.getMergeMargin(mergeMarginTopList, mergeMarginBottomList);\n if(diff) {\n for(let j = Math.max(startIndex, i - mergeMarginBottomList.length + 1); j < length; j++) {\n flowChildren[j].__offsetY(diff, true, REPAINT);\n }\n }\n }\n }\n }\n // 先检查parent的尺寸是否发生了变化,从而决定是否调整next以及向上递归调整\n let cs = parent.currentStyle;\n let height = cs[HEIGHT];\n let isContainer = parent === root || parent.isShadowRoot || cs[POSITION] === 'absolute' || cs[POSITION] === 'relative';\n if(height[1] === AUTO && lastChild) {\n let oldH = parent.height + parent.computedStyle[PADDING_TOP];\n let nowH = lastChild.y + lastChild.outerHeight - parent.y;\n let diff = nowH - oldH;\n // 调整next以及非固定PX的abs,再递归向上\n if(diff) {\n parent.__resizeY(diff, REPAINT);\n let container;\n for(let i = 0, len = absChildren.length; i < len; i++) {\n let item = absChildren[i];\n let { [TOP]: top, [BOTTOM]: bottom, [HEIGHT]: height } = item.currentStyle;\n // 是容器,所有的都调整,不是容器,其偏移是上级parent的某一个,根据情况具体不同\n if(top[1] === AUTO) {\n if(bottom[1] === AUTO) {\n let prev = item.prev;\n while(prev) {\n let target = prev;\n if(target instanceof Component) {\n target = target.shadowRoot;\n }\n let isXom = target instanceof Xom;\n let cs = isXom && target.currentStyle;\n let isAbs = isXom && cs[POSITION] === 'absolute';\n if(!isAbs) {\n let y = target.y + target.outerHeight;\n let d = y - item.y;\n if(d) {\n item.__offsetY(d, true, REPAINT);\n }\n break;\n }\n prev = prev.prev;\n }\n }\n else if(bottom[1] === PX) {\n item.__offsetY(diff, true, REPAINT);\n }\n else if(bottom[1] === PERCENT) {\n let v = (1 - bottom[0] * 0.01) * diff;\n item.__offsetY(v, true, REPAINT);\n }\n }\n else if(top[1] === PERCENT) {\n if(isContainer) {\n let v = top[0] * 0.01 * diff;\n item.__offsetY(v, true, REPAINT);\n }\n // 非容器的特殊处理\n else {\n if(!container) {\n container = parent.domParent;\n while(container) {\n if(container === root || container.isShadowRoot) {\n break;\n }\n let cs = container.currentStyle;\n if(cs[POSITION] === 'absolute' || cs[POSITION] === 'relative') {\n break;\n }\n container = container.domParent;\n }\n }\n if(container.currentStyle[HEIGHT][1] !== PX) {\n let v = top[0] * 0.01 * diff;\n item.__offsetY(v, true, REPAINT);\n }\n }\n }\n // 高度百分比需发生变化的重新布局,需要在容器内\n if(height[1] === PERCENT) {\n if(isContainer) {\n parent.__layoutAbs(parent, parent.__layoutData, item);\n }\n // 不在容器内说明在上级,存入等结束后统一重新布局\n else {\n if(!container) {\n container = parent.domParent;\n while(container) {\n if(container === root || container.isShadowRoot) {\n break;\n }\n let cs = container.currentStyle;\n if(cs[POSITION] === 'absolute' || cs[POSITION] === 'relative') {\n break;\n }\n container = container.domParent;\n }\n }\n inDirectAbsList.push([parent, container, item]);\n }\n }\n }\n reflow.offsetAndResizeByNodeOnY(parent, root, reflowHash, diff, inDirectAbsList);\n return;\n }\n }\n // 没有diff变化或者固定尺寸,可能内部发生变化,调整AUTO的abs,不递归向上\n for(let i = 0, len = absChildren.length; i < len; i++) {\n let item = absChildren[i];\n let { [TOP]: top, [BOTTOM]: bottom } = item.currentStyle;\n if(top[1] === AUTO && bottom[1] === AUTO) {\n let prev = item.prev;\n while(prev) {\n let target = prev;\n if(target instanceof Component) {\n target = target.shadowRoot;\n }\n let isXom = target instanceof Xom;\n let cs = isXom && target.currentStyle;\n let isAbs = isXom && cs[POSITION] === 'absolute';\n if(!isAbs) {\n let y = target.y + target.outerHeight;\n let d = y - item.y;\n if(d) {\n item.__offsetY(d, true, REPAINT);\n }\n break;\n }\n prev = prev.prev;\n }\n }\n }\n });\n // merge过程中需要重新布局的abs\n inDirectAbsList.forEach(arr => {\n arr[0].__layoutAbs(arr[1], arr[0].__layoutData, arr[2]);\n });\n\n // 调整因reflow造成的原struct数据索引数量偏差,纯zIndex的已经在repaint里面重新生成过了\n // 这里因为和update保持一致的顺序,因此一定是先根顺序且互不包含\n let diff = 0, lastIndex = 0, isFirst = true, structs = root.__structs;\n diffList.forEach(item => {\n let [ns, d] = item;\n // 第一个有变化的,及后面无论有无变化都需更新\n // 第1个变化区域无需更改前面一段\n if(isFirst) {\n isFirst = false;\n lastIndex = ns[STRUCT_INDEX] + (ns[STRUCT_TOTAL] || 0) + 1;\n diff += d;\n }\n // 第2+个变化区域看是否和前面一个相连,有不变的段则先偏移它,然后再偏移自己\n else {\n let j = ns[STRUCT_INDEX] + (ns[STRUCT_TOTAL] || 0) + 1 + diff;\n for(let i = lastIndex; i < j; i++) {\n structs[i][STRUCT_INDEX] += diff;\n }\n lastIndex = j;\n diff += d;\n }\n });\n // 后面的要根据偏移量校正索引\n if(diff) {\n for(let i = lastIndex, len = structs.length; i < len; i++) {\n structs[i][STRUCT_INDEX] += diff;\n }\n }\n // 清除id\n reflow.clearUniqueReflowId(reflowHash);\n }\n }\n\n // 每个root拥有一个刷新hook,多个root塞到frame的__hookTask里\n // frame在所有的帧刷新逻辑执行后检查hook列表,进行root刷新操作\n __frameHook() {\n if(!this.__hookTask) {\n let r = this.__hookTask = (() => {\n this.refresh();\n });\n frame.__hookTask.push(r);\n }\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 taskCp() {\n return this.__taskCp;\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, lv, ctx, cache, dx2, dy2) {\n let res = super.render(renderMode, lv, ctx, cache, dx2, dy2);\n if(res.break) {\n return res;\n }\n ctx = res.ctx;\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';\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, lv, ctx, cache, dx, dy) {\n let res = super.render(renderMode, lv, ctx, cache, dx, dy);\n if(res.break) {\n return res;\n }\n this.buildCache(res.sx3, res.sy3);\n ctx = res.ctx;\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';\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, lv, ctx, cache, dx2, dy2) {\n let res = super.render(renderMode, lv, ctx, cache, dx2, dy2);\n if(res.break) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n ctx = res.ctx;\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';\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, lv, ctx, cache, dx, dy) {\n let res = super.render(renderMode, lv, ctx, cache, dx, dy);\n if(res.break) {\n return res;\n }\n this.buildCache(res.sx3, res.sy3);\n ctx = res.ctx;\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';\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, lv, ctx, cache, dx, dy) {\n let res = super.render(renderMode, lv, ctx, cache, dx, dy);\n if(res.break) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n ctx = res.ctx;\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';\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, lv, ctx, cache, dx, dy) {\n let res = super.render(renderMode, lv, ctx, cache, dx, dy);\n if(res.break) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n ctx = res.ctx;\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 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 $$type from './util/$$type';\nimport builder from './util/builder';\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 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 return {\n tagName,\n props,\n $$type: $$type.TYPE_GM,\n };\n },\n createCp(klass, props, children = []) {\n props.children = 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 builder,\n updater,\n refresh,\n enums,\n set debug(v) {\n debug.flag = !!v;\n },\n};\n\nbuilder.ref({\n Xom,\n Dom,\n Img,\n Geom,\n Component,\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":["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","s","toLowerCase","replace","$0","$1","toUpperCase","STYLE2UPPER_MAP","style2Upper","$2","STYLE_R_KEY","STYLE_RV_KEY","STYLE_V_KEY","Object","keys","forEach","k","k2","l","UPDATE_KEY","UPDATE_NODE","UPDATE_STYLE","UPDATE_FOCUS","UPDATE_COMPONENT","UPDATE_OVERWRITE","UPDATE_KEYS","UPDATE_LIST","UPDATE_CONFIG","UPDATE_ADD_DOM","UPDATE_REMOVE_DOM","KEY_FRAME_KEY","FRAME_STYLE","FRAME_TIME","FRAME_EASING","FRAME_TRANSITION","NODE_KEY","NODE_DOM_PARENT","NODE_OPACITY","NODE_MATRIX","NODE_MATRIX_EVENT","NODE_CACHE","NODE_CACHE_TOTAL","NODE_CACHE_FILTER","NODE_CACHE_MASK","NODE_CACHE_OVERFLOW","NODE_STRUCT","NODE_TAG_NAME","NODE_CURRENT_STYLE","NODE_CURRENT_PROPS","NODE_COMPUTED_STYLE","NODE_CACHE_STYLE","NODE_CACHE_PROPS","NODE_LIMIT_CACHE","NODE_IS_MASK","NODE_IS_INLINE","NODE_HAS_CONTENT","NODE_REFRESH_LV","NODE_IS_DESTROYED","NODE_STYLE","NODE_UPDATE_HASH","NODE_UNIQUE_UPDATE_ID","NODE_DEFS_CACHE","NODE_PERSPECTIVE_MATRIX","NODE_VIRTUAL_DOM","NODE_CACHE_AS_BITMAP","STRUCT_KEY","STRUCT_NODE","STRUCT_INDEX","STRUCT_CHILD_INDEX","STRUCT_LV","STRUCT_NUM","STRUCT_TOTAL","STRUCT_HAS_MASK","ANIMATE_KEY","I_ASSIGNING","I_IN_FPS","I_IS_DELAY","I_BEGIN","I_END","I_FINISHED","I_NEXT_END","I_FIRST_PLAY","I_PLAY_CB","I_TARGET","I_ROOT","I_FRAMES","I_FRAMES_R","I_CURRENT_TIME","I_NEXT_TIME","I_STYLE","I_DURATION","I_ITERATIONS","I_FILL","I_PLAYBACK_RATE","I_PLAY_COUNT","I_PLAY_STATE","I_DESTROYED","I_START_TIME","I_FPS_TIME","I_EASING","I_ENTER_FRAME","I_DELAY","I_END_DELAY","I_KEYS","I_ORIGIN_STYLE","I_CURRENT_FRAMES","I_CURRENT_FRAME","I_SPF_LIMIT","I_FPS","I_DIRECTION","I_FIRST_ENTER","I_STAY_BEGIN","I_STAY_END","I_IS2","I_END_TIME","I_NODE_CONFIG","I_ROOT_CONFIG","I_OUT_BEGIN_DELAY","I_TIME_STAMP","ELLIPSIS","enums","Node","__x","__y","__ox","__oy","__sx","__sy","__width","__height","__baseline","__verticalBaseline","__config","__prev","__next","__parent","__domParent","__root","__host","__virtualDom","__bbox","__filterBbox","i","lv","j","root","struct","diff","isLayout","x","ox","y","oy","__hostRoot","CANVAS","SVG","WEBGL","o","AUTO","PX","PERCENT","NUMBER","INHERIT","DEG","STRING","RGBA","REM","EM","VW","VH","VMAX","VMIN","GRADIENT","calUnit","v","n","parseFloat","test","TYPE_VD","Symbol","TYPE_GM","TYPE_CP","identity","multiply","a","b","isE","c","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","inv","det","m2m6","point2d","slice","toString","isType","type","obj","call","isObject","isString","isFunction","isNumber","isBoolean","isDate","hasOwn","hasOwnProperty","fnToString","ObjectFunctionString","isNil","joinSourceArray","arr","res","len","item","Array","isArray","stringify","encodeHtml","prop","joinVirtualDom","vd","defs","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","map","Math","floor","max","joinArr","int2invert","arr2hash","hash","list","hash2arr","clone","$$type","util","Date","isPlainObject","equalArr","ai","bi","isArrayA","isArrayB","equal","getTime","extend","target","source","split","extendAnimate","ovd","nvd","__animationList","animationList","splice","__setTarget","assigning","finished","__stayEnd","assignCurrentStyle","__frameAnimateList","transformBbox","bbox","matrix","dx","dy","mx","x1","y1","x2","y2","xa","ya","xb","yb","min","proto","getPrototypeOf","Ctor","constructor","assignMatrix","t","prefixHex","replaceRgba2Hex","$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","draw","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","node","measureImg","url","cb","state","success","task","img","Image","onload","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","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","sqrt","vector","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","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","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","KEY_COLOR","KEY_LENGTH","KEY_GRADIENT","KEY_RADIUS","COLOR_HASH","LENGTH_HASH","RADIUS_HASH","GRADIENT_HASH","GRADIENT_TYPE","linear","radial","conic","KEY_EXPAND","EXPAND_HASH","RESET_DOM","reset","RESET_GEOM","IGNORE","REPAINT","addGeom","ks","isIgnore","isGeom","isRepaint","kernelSize","sigma","outerSize","outerSizeByD","gaussianWeight","E","change","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","equalStyle","oa","ob","aa","av","bv","isMulti","isRelativeOrAbsolute","VALUE","ARRAY_0","ARRAY_0_1","cloneStyle","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","ac","bc","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","SIZE","MAX","HASH_CANVAS","Page","number","__size","__number","__free","__total","__canvas","__offscreen","__grid","__uuid","__update","time","grid","pos","genSingle","bboxNew","dbx","dby","Cache","__init","__page","__pos","getCoords","__appendData","__isNew","__enabled","globalAlpha","update","__available","clear","del","getInstance","oldX1","cacheMask","isClip","tf","globalCompositeOperation","drawCache","clientWidth","clientHeight","xe","ye","cacheOverflow","rect","parentMatrix","dbx2","dby2","ENUM","NONE","TRANSFORM_ALL","REFLOW","REBUILD","TRANSFORMS","contain","getLevel","isReflow","isRebuild","measureLineWidth","perW","rw","newLine","mw","hypotheticalNum","round","getFontKey","Text","__textBoxes","__charWidth","__textWidth","__bp","__widthHash","__cache","ly","lineBoxManager","endSpace","lineClampCount","isDestroyed","textBoxes","maxW","beginSpace","bp","lineCount","mainCoords","isTextOverflow","textWidth","containerSize","__lineBack","textBox","addItem","verticalLineHeight","ew","lineBox","isNewLine","tb","__layoutNone","__resetLb","ep","tbs","mbp","__offsetX","__offsetY","firstCharWidth","level","lineWidth","strokeStyle","render","delRefreshTask","__task","addRefreshTask","__before","__addUpdate","__after","fontKey","charWidth","__style","__cacheStyle","__renderByMask","flattenJson","traverseJson","lastText","options","Xom","Dom","Img","Geom","Component","initRoot","cd","flatten","__json","build","relation","initDom","json","initCp","initCp2","klass","__tagName","hasP","__inheritAnimate","__animateRecords","__placeholder","__children","getRegister","ref","shadowRoot","Event","__eHash","handle","on","apply","off","__karasEventCb","once","emit","event","fns","fn","REGISTER","setUpdateFlag","cp","__hasCpUpdate","__ref","__isMounted","__taskList","__nextState","addRefreshCp","builder","__cd","listener","__shadow","shadow","__shadowRoot","componentDidMount","REFRESH","__isDestroyed","componentWillUnmount","__destroy","force","__emitEvent","__state","defineProperty","get","getInlineBox","leading","bcStart","bcEnd","pbStart","pbEnd","getInlineWidth","contentBox","matrixResize","imgWidth","imgHeight","targetWidth","targetHeight","renderBgc","method","renderImage","loadBgi","bgW","bgH","bgX","bgY","needMask","xnl","xnr","ynt","ynb","image","needResize","copy","traversal","after","isPause","Frame","__hookTask","__taskCp","__now","taskCp","cloneCp","lengthCp","__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","easeIn","easeOut","ease","easeInOut","cubicBezier","getEasing","timingFunction","NUM_CAL_HASH","unify","frames","getProps","inherit","genBeforeRefresh","__frameHook","framing","duration","es","translatePath","calByUnit","container","calDiff","nm","pv","nv","taraget","pi","ni","has","pp","nn","isGradient","calDiffGradient","parentComputedStyle","len2","pv2","nv2","len3","pv3","nv3","u","eq","isArrP","isArrN","pz","nz","np","calFrame","ts","binarySearch","frame","middle","ea","steps","stepsD","calIntermediateStyle","transition","st2","calIncrease","o2","n2","gotoOverload","calDiffTime","playbackRate","spfLimit","fps","frameCb","isDelay","FRAME","PLAY","Animation","__id","nl","__options","op","config","iterations","framesR","originStyle","delay","endDelay","current","isFinish","__cancelTask","__currentProps","__currentStyle","playState","__hasFin","__hasCancel","playCount","currentFrames","stayBegin","stayEnd","is2","endTime","currentTime","currentFrame","isAlternate","alternate","isEven","isLastCount","frameTime","isLastFrame","inEndDelay","needClean","playCb","__clean","BEGIN","END","FINISH","silence","pending","PAUSE","play","CANCEL","__goto","isFrame","excludeDelay","finish","currentProps","spf","animateController","remove","backwards","both","forwards","__target","sync","removeControl","nextFrame","__checkModify","renderBoxShadow","box","spreadBox","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","blurBox","MBM_HASH","screen","overlay","darken","lighten","colorDodge","colorBurn","hardLight","softLight","difference","exclusion","hue","saturation","luminosity","mbmName","isValidMbm","LOCAL","mbm","TF","TX","TY","TZ","getFirstEmptyInlineWidth","flowChildren","child","getLastEmptyInlineWidth","__computedStyle","__listener","__loadBgi","__cacheDefs","__isClip","__isMask","__contentBoxList","__cacheAsBitmap","cacheAsBitmap","__layoutData","__hasComputeReflow","__fontRegister","__hasMask","__calSize","includePercent","isRoot","ph","fontRegister","__clientWidth","__offsetWidth","__outerWidth","__clientHeight","__offsetHeight","__outerHeight","isDirectionRow","isDirectItem","isAbs","isColumn","isRow","__computeReflow","__isIbFull","__isUprightIbFull","clearCache","__mp","__layoutFlex","__layoutInline","__layoutBlock","__sx2","__sx3","__sx4","__sx5","__sx6","__sy2","__sy3","__sy4","__sy5","__sy6","__execAr","ar","controller","autoPlay","__records2","init","list2","__records","__playAuto","h3","isParentVertical","fixedWidth","fixedHeight","selfEndSpace","isReplaced","offsetWidth","offsetHeight","matrixCache","isScale","x5","x6","y5","y6","__calFilter","bgI","kw","rebuild","__hasContent","isRealInline","sx4","sx5","sx6","sy4","sy5","sy6","__calPerspective","__calMatrix","__calCache","hasContent","__calContent","__releaseWhenEmpty","limitCache","perspectiveMatrix","offscreenBlend","offscreenMask","hasFilter","offscreenFilter","offscreenOverflow","borderList","hasBgi","some","svgBgSymbol","inline","bg","isFirst","lastContentBox","lastLineBox","parentLineBox","ix1","iy1","ix2","iy2","symbol","clearAnimate","clearFrameAnimate","__stopPropagation","__stopImmediatePropagation","willResponseEvent","hasEmitMask","ignore","inThis","__touchstartTarget","__getLg","__getRg","__getCg","lg","createLinearGradient","addColorStop","rg","createRadialGradient","onlyTotal","__cacheTotal","__cacheFilter","__cacheMask","__cacheOverflow","formatStyle","animation","cancel","enter","includeBbox","isShadowRoot","hostRoot","pJson","zChildren","zIndexChildren","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","offsetAndResizeByNodeOnY","reflowHash","inDirectAbsList","isContainer","cs","__layoutAbs","__resizeY","clearUniqueReflowId","__uniqueReflowId","getMergeMargin","topList","bottomList","genZIndexChildren","hasMc","mcHash","lastMaskIndex","__iIndex","__zIndex","__aIndex","genOrderChildren","__order","backtrack","text","__backtrack","block","inlineBlock","none","tag","__flexLine","__zIndexChildren","__structure","nss","__structs","structs","needSort","__tryLayInline","isDirectChild","main","isFixed","isContent","fixedSize","countMin","countMax","isR","__calBasis","min2","max2","__lineBoxManager","__layout","__addMBP","__preLayout","__ioSize","maxSize","countSize","mergeMarginEndList","mergeMarginStartList","ignoreNextLine","ignoreNextWrap","isXom","isInlineBlock","__isRealInline","lastLineClampCount","reflow","setNotEnd","setNewLine","isNone","isEmptyBlock","tw","th","__resizeX","isLastBlock","hasStart","isBlock","horizonAlign","__inlineSize","domList","__marginAuto","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","loadImg","__loadImg","placeholder","loading","__loadAndRefresh","showError","__addGeom","reload","Defs","cacheHash","__isMulti","multi","__cacheProps","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","updateList","removeList","KEY_FLAG","check","checkCp","nextProps","forceCheckUpdate","shouldUpdate","shouldComponentUpdate","updateCp","oldS","oldSr","oldJson","diffSr","oj","nj","ojk","getKeyHash","njk","keyList","cpList","diffCp","diffChildren","diffChild","removeCpFromOldTree","oc","ol","of","nf","exist","ex","did","componentDidUpdate","elem","diffDefs","diffBb","diffD2D","od","nd","diffDef","removeAt","insertAt","insertAdjacentHTML","parentNode","removeAttribute","diffItem","diffD2G","replaceWith","diffT2T","diffG2D","diffG2G","diffItemSelf","diffX2X","diffByLessLv","firstChild","lastChild","obb","nbb","isText","html","svg","where","insertBefore","Controller","__list2","__onList","__lastTime","args","records","animate","offsetTime","onList","__action","__mergeAuto","__on","timestamp","__set","OFFSCREEN_OVERFLOW","OFFSCREEN_FILTER","OFFSCREEN_MASK","OFFSCREEN_BLEND","OFFSCREEN_MASK2","applyOffscreen","origin","MockPage","genUuid","MockCache","reOffset","NA","CHILD","SELF","getCache","OP","FT","MBM","PPT","genBboxTotal","parentIndexHash","opacityHash","includeLimitCache","bboxTotal","filterBbox","matrixHash","parentIndex","node2","hasTotal","mergeBbox","genTotal","hasMask","cacheTotal","cacheFilter","needGen","baseMatrix","matrixList","opacityList","parentOpacity","lastConfig","lastLv","refreshLevel","countMaskNum","ctxTotal","lastMatrix","maskStartHash","offscreenHash","genOverflow","genFilter","genMask","lastOpacity","resetMatrixCacheTotal","isNew","genFrameBufferWithTexture","texCache","lockOneChannel","webgl","createFramebuffer","bindFramebuffer","checkFramebufferStatus","FRAMEBUFFER_COMPLETE","viewport","clearColor","COLOR_BUFFER_BIT","genTotalWebgl","hasMbm","getParameter","MAX_TEXTURE_SIZE","parentPm","totalLimitCache","addTexAndDrawWhenLimit","mockCache","refresh","releaseLockChannel","hookGlRender","frameBuffer2","texture2","genMbmWebgl","deleteFramebuffer","genFilterWebgl","genBlurWebgl","genDropShadowWebgl","rotation","cosR","sinR","genColorMatrixWebgl","amount","oneMinusAmount","useProgram","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","defsCache","hasEffectMask","addCache","maskHash","vdList","parentVd","mChildren","ivs","hasTransform","renderWebgl","pmList","lastRefreshLevel","mergeList","hasRecordAsMask","validMbm","isPerspective","limitHash","pptHash","renderCanvas","TexCache","units","__units","__pages","__channels","__locks","__lockUnits","pages","channels","locks","lastHash","oldList","newList","fullSize","setToChannel","DIRECTION_HASH","ROOT_DOM_NAME","getDom","querySelector","renderProp","EVENT_LIST","initEvent","Root","__wrapEvent","__cb","addEventListener","removeEvent","removeEventListener","isFixedWidthOrHeight","isFixedSize","includeParentFlex","isLAYOUT","setLAYOUT","component","addDom","checkInfluence","topFlex","isSiblingBlock","uniqueUpdateId","parseUpdate","reflowList","cacheList","zHash","zList","overwrite","focus","removeDom","style2","keys2","hasZ","hasVisibility","hasColor","hasDisplay","hasTsColor","hasTsWidth","hasTsOver","__struct","isRp","cleanSvgCache","__uniqueZId","__rlv","__dom","__mw","__mh","__taskUp","__reflowList","__animateController","mix","__updateHash","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","__checkUpdate","__checkReflow","noRender","__clear","__vd","domDiff","updateStyle","taskUp","__hasRootUpdate","__nextFrameCp","updater","includeIgnore","scan","path","zPath","__index__","karas","path2","zPath2","nodeConfig","rootConfig","updateHash","__updateRoot","updateRoot","hasUpdate","__updateStruct","uniqueList","hasRoot","diffList","diffI","mergeOffsetList","__uniqueMergeOffsetId","cps","cts","isLastAbs","isNowAbs","isLastNone","isNowNone","hasFlowPrev","__modifyStruct","mergeMarginBottomList","mergeMarginTopList","startIndex","oldH","nowH","lastIndex","reBuild","base","reBuildC","curveNum","getNewPoint","Line","__x1","__y1","__x2","__y2","__controlA","__controlB","__start","__end","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","__begin","__r","edge","__edge","closure","__closure","sList","r2","__renderOneSector","genVertex","Rect","__rx","__ry","Circle","Ellipse","my","parse","animateRecords","opt","oft","JSON","createGm","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","callback","version","appendTo","parser"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA,IAAMA,WAAS,GAAG;EAChBC,EAAAA,QAAQ,EAAE,CADM;EAEhBC,EAAAA,OAAO,EAAE,CAFO;EAGhBC,EAAAA,GAAG,EAAE,CAHW;EAIhBC,EAAAA,KAAK,EAAE,CAJS;EAKhBC,EAAAA,MAAM,EAAE,CALQ;EAMhBC,EAAAA,IAAI,EAAE,CANU;EAOhBC,EAAAA,UAAU,EAAE,CAPI;EAQhBC,EAAAA,YAAY,EAAE,CARE;EAShBC,EAAAA,aAAa,EAAE,CATC;EAUhBC,EAAAA,WAAW,EAAE,CAVG;EAWhBC,EAAAA,WAAW,EAAE,EAXG;EAYhBC,EAAAA,aAAa,EAAE,EAZC;EAahBC,EAAAA,cAAc,EAAE,EAbA;EAchBC,EAAAA,YAAY,EAAE,EAdE;EAehBC,EAAAA,SAAS,EAAE,EAfK;EAgBhBC,EAAAA,WAAW,EAAE,EAhBG;EAiBhBC,EAAAA,KAAK,EAAE,EAjBS;EAkBhBC,EAAAA,UAAU,EAAE,EAlBI;EAmBhBC,EAAAA,WAAW,EAAE,EAnBG;EAoBhBC,EAAAA,WAAW,EAAE,EApBG;EAqBhBC,EAAAA,gBAAgB,EAAE,EArBF;EAsBhBC,EAAAA,gBAAgB,EAAE,EAtBF;EAuBhBC,EAAAA,eAAe,EAAE,EAvBD;EAwBhBC,EAAAA,iBAAiB,EAAE,EAxBH;EAyBhBC,EAAAA,qBAAqB,EAAE,EAzBP;EA0BhBC,EAAAA,qBAAqB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EAGVC,EAAAA,GAAG,EAAHA,GAHU;EAIVC,EAAAA,IAAI,EAAJA,IAJU;EAKVC,EAAAA,SAAS,EAATA,SAAAA;EALU,CAAZ,CAAA,CAAA;;EAQA,IAAG,OAAOvmC,MAAP,KAAkB,WAArB,EAAkC;IAChCA,MAAM,CAACmlE,KAAP,GAAeA,OAAf,CAAA;EACD,CAFD,MAGK,IAAG,OAAOxiE,IAAP,KAAgB,WAAnB,EAAgC;IACnCA,IAAI,CAACwiE,KAAL,GAAaA,OAAb,CAAA;EACD;;;;;;;;"}
\ No newline at end of file
+{"version":3,"file":"index.js","sources":["src/util/enums.js","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/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/Page.js","src/refresh/Cache.js","src/refresh/level.js","src/node/Text.js","src/util/flatten.js","src/util/builder.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/refresh/reflow.js","src/node/Dom.js","src/node/Img.js","src/node/Defs.js","src/node/geom/Geom.js","src/util/updater.js","src/util/diff.js","src/animate/Controller.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/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":["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\n// Root的update过程使用\nconst UPDATE_KEY = {\n UPDATE_NODE: 0,\n UPDATE_STYLE: 1,\n UPDATE_FOCUS: 2,\n UPDATE_COMPONENT: 3,\n UPDATE_OVERWRITE: 4,\n UPDATE_KEYS: 5,\n UPDATE_LIST: 6,\n UPDATE_CONFIG: 7,\n UPDATE_ADD_DOM: 8,\n UPDATE_REMOVE_DOM: 9,\n};\n\n// animation计算每帧使用\nconst KEY_FRAME_KEY = {\n FRAME_STYLE: 0,\n FRAME_TIME: 1,\n FRAME_EASING: 2,\n FRAME_TRANSITION: 3,\n};\n\n// 节点使用\nconst NODE_KEY = {\n NODE_DOM_PARENT: 0,\n NODE_OPACITY: 1,\n NODE_MATRIX: 2,\n NODE_MATRIX_EVENT: 3,\n NODE_CACHE: 4,\n NODE_CACHE_TOTAL: 5,\n NODE_CACHE_FILTER: 6,\n NODE_CACHE_MASK: 7,\n NODE_CACHE_OVERFLOW: 8,\n NODE_STRUCT: 9,\n NODE_TAG_NAME: 10,\n NODE_CURRENT_STYLE: 11,\n NODE_CURRENT_PROPS: 12,\n NODE_COMPUTED_STYLE: 13,\n NODE_CACHE_STYLE: 14,\n NODE_CACHE_PROPS: 15,\n NODE_LIMIT_CACHE: 16,\n NODE_IS_MASK: 17,\n NODE_IS_INLINE: 18,\n NODE_HAS_CONTENT: 19,\n NODE_REFRESH_LV: 20,\n NODE_IS_DESTROYED: 21,\n NODE_STYLE: 22,\n NODE_UPDATE_HASH: 23,\n NODE_UNIQUE_UPDATE_ID: 24,\n NODE_DEFS_CACHE: 25,\n NODE_PERSPECTIVE_MATRIX: 26,\n NODE_VIRTUAL_DOM: 27,\n NODE_CACHE_AS_BITMAP: 28,\n};\n\n// struct用\nconst STRUCT_KEY = {\n STRUCT_NODE: 0,\n STRUCT_INDEX: 1,\n STRUCT_CHILD_INDEX: 2,\n STRUCT_LV: 3,\n STRUCT_NUM: 4,\n STRUCT_TOTAL: 5,\n STRUCT_HAS_MASK: 6,\n};\n\nconst ANIMATE_KEY = {\n I_ASSIGNING: 0,\n I_IN_FPS: 1,\n I_IS_DELAY: 2,\n I_BEGIN: 3,\n I_END: 4,\n I_FINISHED: 5,\n I_NEXT_END: 6,\n I_FIRST_PLAY: 7,\n I_PLAY_CB: 8,\n I_TARGET: 9,\n I_ROOT: 10,\n I_FRAMES: 11,\n I_FRAMES_R: 12,\n I_CURRENT_TIME: 13,\n I_NEXT_TIME: 14,\n I_STYLE: 15,\n I_DURATION: 16,\n I_ITERATIONS: 17,\n I_FILL: 18,\n I_PLAYBACK_RATE: 19,\n I_PLAY_COUNT: 20,\n I_PLAY_STATE: 21,\n I_DESTROYED: 22,\n I_START_TIME: 23,\n I_FPS_TIME: 24,\n I_EASING: 25,\n I_ENTER_FRAME: 26,\n I_DELAY: 27,\n I_END_DELAY: 28,\n I_KEYS: 29,\n I_ORIGIN_STYLE: 30,\n I_CURRENT_FRAMES: 31,\n I_CURRENT_FRAME: 32,\n I_SPF_LIMIT: 33,\n I_FPS: 34,\n I_DIRECTION: 35,\n I_FIRST_ENTER: 36,\n I_STAY_BEGIN: 37,\n I_STAY_END: 38,\n I_IS2: 39,\n I_END_TIME: 40,\n I_NODE_CONFIG: 41,\n I_ROOT_CONFIG: 42,\n I_OUT_BEGIN_DELAY: 43,\n I_TIME_STAMP: 44,\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 UPDATE_KEY,\n KEY_FRAME_KEY,\n NODE_KEY,\n STRUCT_KEY,\n ANIMATE_KEY,\n ELLIPSIS: '…',\n};\n","import enums from '../util/enums';\n\nconst {\n STRUCT_KEY: {\n STRUCT_NODE,\n STRUCT_INDEX,\n STRUCT_CHILD_INDEX,\n STRUCT_LV,\n },\n NODE_KEY: {\n NODE_IS_DESTROYED,\n NODE_STRUCT,\n },\n} = enums;\n\nclass 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.__config = {};\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.__virtualDom = null;\n this.__bbox = null;\n this.__filterBbox = null;\n }\n\n __structure(i, lv, j) {\n return this.__config[NODE_STRUCT] = {\n [STRUCT_NODE]: this,\n [STRUCT_INDEX]: i,\n [STRUCT_CHILD_INDEX]: j,\n [STRUCT_LV]: lv,\n };\n }\n\n __modifyStruct(root, offset = 0) {\n let struct = this.__config[NODE_STRUCT];\n return [struct, 0];\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.__config[NODE_IS_DESTROYED] = 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.__config[NODE_IS_DESTROYED];\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","let o = {\n AUTO: 0,\n PX: 1,\n PERCENT: 2,\n NUMBER: 3,\n INHERIT: 4,\n DEG: 5,\n STRING: 6,\n RGBA: 7,\n REM: 8,\n EM: 9,\n VW: 10,\n VH: 11,\n VMAX: 12,\n VMIN: 13,\n GRADIENT: 14, // 特殊格式,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, o.PERCENT];\n }\n else if(/px$/i.test(v)) {\n return [n, o.PX];\n }\n else if(/deg$/i.test(v)) {\n return [n, o.DEG];\n }\n else if(/rem$/i.test(v)) {\n return [n, o.REM];\n }\n else if(/vw$/i.test(v)) {\n return [n, o.VW];\n }\n else if(/vh$/i.test(v)) {\n return [n, o.VH];\n }\n else if(/em$/i.test(v)) {\n return [n, o.EM];\n }\n else if(/vw$/i.test(v)) {\n return [n, o.VW];\n }\n else if(/vh$/i.test(v)) {\n return [n, o.VH];\n }\n else if(/vmax$/i.test(v)) {\n return [n, o.VMAX];\n }\n else if(/vmin$/i.test(v)) {\n return [n, o.VMIN];\n }\n return [n, o.NUMBER];\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(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 vd.defs.forEach(item => {\n s += joinDef(item);\n });\n s += '';\n vd.bb.forEach(item => {\n s += joinVd(item);\n });\n s += '';\n (vd.children || []).forEach(item => {\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 (vd.children || []).forEach(item => {\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 += '' + def.tagName + '>';\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 += '>' + item.tagName + '>';\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 extendAnimate(ovd, nvd) {\n let list = nvd.__animationList = ovd.animationList.splice(0);\n list.forEach(item => {\n item.__setTarget(nvd);\n // 事件队列的缘故,可能动画本帧刚执行过,然后再继承,就会缺失,需再次赋值一遍;也有可能停留最后\n if(item.assigning || item.finished && item.__stayEnd()) {\n item.assignCurrentStyle();\n }\n });\n // 帧动画继承\n nvd.__frameAnimateList = ovd.__frameAnimateList.splice(0);\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 extendAnimate,\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 draw() {\n // 空函数,仅对小程序提供hook特殊处理,flush缓冲\n },\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(/' + str.charAt(i).replace('<', '<').replace(/[ \\n]/, ' ') + '';\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();\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(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 canvas.draw();\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 canvas.draw();\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","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[0] > 0) {\n noRadius = false;\n }\n else {\n return 0;\n }\n if(item[1] === PX) {\n return Math.max(0, item[0]);\n }\n else if(item[1] === PERCENT) {\n return Math.max(0, item[0] * (i ? h : w) * 0.01);\n }\n else if(item[1] === REM) {\n return Math.max(0, item[0] * root.computedStyle[FONT_SIZE]);\n }\n else if(item[1] === VW) {\n return Math.max(0, item[0] * root.width * 0.01);\n }\n else if(item[1] === VH) {\n return Math.max(0, item[0] * root.height * 0.01);\n }\n else if(item[1] === VMAX) {\n return Math.max(0, item[0] * Math.max(root.width, root.height) * 0.01);\n }\n else if(item[1] === VMIN) {\n return Math.max(0, item[0] * 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[1] === PX) {\n v = Math.max(0, item[0]);\n v = Math.min(i ? h : w, v);\n }\n else {\n v = Math.max(0, item[0] * (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[1] === PX) {\n v = Math.max(0, item[0]);\n v = Math.min(i ? h : w, v);\n }\n else {\n v = Math.max(0, item[0] * (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[1]) > -1) {\n v[1] = PX;\n }\n return v;\n }\n else {\n return [\n {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[data] || 50,\n 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[1] === PERCENT) {\n list.push([item[0], p[0] * 0.01]);\n }\n else if(p[1] === REM) {\n list.push([item[0], p[0] * root.computedStyle[FONT_SIZE] / length]);\n }\n else if(p[1] === VW) {\n list.push([item[0], p[0] * root.width / length]);\n }\n else if(p[1] === VH) {\n list.push([item[0], p[0] * root.height / length]);\n }\n else if(p[1] === VMAX) {\n list.push([item[0], p[0] * Math.max(root.width, root.height) / length]);\n }\n else if(p[1] === VMIN) {\n list.push([item[0], p[0] * Math.min(root.width, root.height) / length]);\n }\n else {\n list.push([item[0], p[0] / 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[1] === PERCENT) {\n cx = x1 + positionX[0] * iw * 0.01;\n }\n else if(positionX[1] === REM) {\n cx = x1 + positionX[0] * root.computedStyle[FONT_SIZE];\n }\n else if(positionX[1] === VW) {\n cx = x1 + positionX[0] * root.width * 0.01;\n }\n else if(positionX[1] === VH) {\n cx = x1 + positionX[0] * root.height * 0.01;\n }\n else if(positionX[1] === VMAX) {\n cx = x1 + positionX[0] * Math.max(root.width, root.height) * 0.01;\n }\n else if(positionX[1] === VMIN) {\n cx = x1 + positionX[0] * Math.min(root.width, root.height) * 0.01;\n }\n else {\n cx = x1 + positionX[0];\n }\n if(positionY[1] === PERCENT) {\n cy = y1 + positionY[0] * ih * 0.01;\n }\n else if(positionY[1] === REM) {\n cy = y1 + positionY[0] * root.computedStyle[FONT_SIZE];\n }\n else if(positionY[1] === VW) {\n cy = y1 + positionY[0] * root.width * 0.01;\n }\n else if(positionY[1] === VH) {\n cy = y1 + positionY[0] * root.height * 0.01;\n }\n else if(positionY[1] === VH) {\n cy = y1 + positionY[0] * Math.max(root.width, root.height) * 0.01;\n }\n else if(positionY[1] === VH) {\n cy = y1 + positionY[0] * Math.min(root.width, root.height) * 0.01;\n }\n else {\n cy = y1 + positionY[0];\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 = [[50, PERCENT], [50, 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 = [[50, PERCENT], [50, 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[1]) > -1) {\n v[1] = 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 KEY_COLOR = [\n [STYLE_KEY.BACKGROUND_COLOR],\n [STYLE_KEY.BORDER_BOTTOM_COLOR],\n [STYLE_KEY.BORDER_LEFT_COLOR],\n [STYLE_KEY.BORDER_RIGHT_COLOR],\n [STYLE_KEY.BORDER_TOP_COLOR],\n [STYLE_KEY.COLOR], // 这2个特殊,新增GRADIENT渐变色\n [STYLE_KEY.TEXT_STROKE_COLOR],\n];\n\nconst KEY_LENGTH = [\n [STYLE_KEY.FONT_SIZE],\n [STYLE_KEY.BORDER_BOTTOM_WIDTH],\n [STYLE_KEY.BORDER_LEFT_WIDTH],\n [STYLE_KEY.BORDER_RIGHT_WIDTH],\n [STYLE_KEY.BORDER_TOP_WIDTH],\n [STYLE_KEY.LEFT],\n [STYLE_KEY.TOP],\n [STYLE_KEY.RIGHT],\n [STYLE_KEY.BOTTOM],\n [STYLE_KEY.FLEX_BASIS],\n [STYLE_KEY.WIDTH],\n [STYLE_KEY.HEIGHT],\n [STYLE_KEY.LINE_HEIGHT],\n [STYLE_KEY.MARGIN_BOTTOM],\n [STYLE_KEY.MARGIN_LEFT],\n [STYLE_KEY.MARGIN_TOP],\n [STYLE_KEY.MARGIN_RIGHT],\n [STYLE_KEY.PADDING_TOP],\n [STYLE_KEY.PADDING_RIGHT],\n [STYLE_KEY.PADDING_BOTTOM],\n [STYLE_KEY.PADDING_LEFT],\n [STYLE_KEY.STROKE_WIDTH],\n [STYLE_KEY.STROKE_MITERLIMIT],\n [STYLE_KEY.LETTER_SPACING],\n [STYLE_KEY.PERSPECTIVE],\n [STYLE_KEY.TEXT_STROKE_WIDTH],\n];\n\nconst KEY_GRADIENT = [\n [STYLE_KEY.BACKGROUND_IMAGE],\n [STYLE_KEY.FILL],\n [STYLE_KEY.STROKE],\n];\n\nconst KEY_RADIUS = [\n [STYLE_KEY.BORDER_TOP_LEFT_RADIUS],\n [STYLE_KEY.BORDER_TOP_RIGHT_RADIUS],\n [STYLE_KEY.BORDER_BOTTOM_RIGHT_RADIUS],\n [STYLE_KEY.BORDER_BOTTOM_LEFT_RADIUS],\n];\n\nconst COLOR_HASH = {};\nKEY_COLOR.forEach(k => {\n COLOR_HASH[k] = true;\n});\n\nconst LENGTH_HASH = {};\nKEY_LENGTH.forEach(k => {\n LENGTH_HASH[k] = true;\n});\n\nconst RADIUS_HASH = {};\nKEY_RADIUS.forEach(k => {\n RADIUS_HASH[k] = true;\n});\n\nconst GRADIENT_HASH = {};\nKEY_GRADIENT.forEach(k => {\n GRADIENT_HASH[k] = true;\n});\n\nconst GRADIENT_TYPE = {\n linear: true,\n radial: true,\n conic: true,\n};\n\nconst KEY_EXPAND = [\n [STYLE_KEY.TRANSLATE_X],\n [STYLE_KEY.TRANSLATE_Y],\n [STYLE_KEY.TRANSLATE_Z],\n [STYLE_KEY.SKEW_X],\n [STYLE_KEY.SKEW_Y],\n [STYLE_KEY.SCALE_X],\n [STYLE_KEY.SCALE_Y],\n [STYLE_KEY.SCALE_Z],\n [STYLE_KEY.ROTATE_X],\n [STYLE_KEY.ROTATE_Y],\n [STYLE_KEY.ROTATE_Z],\n];\n\nconst EXPAND_HASH = {};\nKEY_EXPAND.forEach(k => {\n EXPAND_HASH[k] = true;\n});\n\nexport default {\n KEY_COLOR,\n KEY_EXPAND,\n KEY_GRADIENT,\n KEY_LENGTH,\n KEY_RADIUS,\n COLOR_HASH,\n EXPAND_HASH,\n GRADIENT_HASH,\n LENGTH_HASH,\n RADIUS_HASH,\n GRADIENT_TYPE,\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;\n\nconst GEOM = {};\nconst GEOM_KEY_SET = [];\nconst IGNORE = {\n [STYLE_KEY.POINTER_EVENTS]: true,\n};\nconst REPAINT = {\n [STYLE_KEY.TRANSFORM]: true,\n [STYLE_KEY.TRANSLATE_X]: true,\n [STYLE_KEY.TRANSLATE_Y]: true,\n [STYLE_KEY.SKEW_X]: true,\n [STYLE_KEY.SKEW_Y]: true,\n [STYLE_KEY.SCALE_X]: true,\n [STYLE_KEY.SCALE_Y]: true,\n [STYLE_KEY.ROTATE_Z]: true,\n [STYLE_KEY.COLOR]: true,\n [STYLE_KEY.FONT_STYLE]: true,\n [STYLE_KEY.STROKE_WIDTH]: true,\n [STYLE_KEY.FILL]: true,\n [STYLE_KEY.STROKE_DASHARRAY]: true,\n [STYLE_KEY.STROKE_LINECAP]: true,\n [STYLE_KEY.STROKE_LINEJOIN]: true,\n [STYLE_KEY.STROKE_MITERLIMIT]: true,\n [STYLE_KEY.BACKGROUND_COLOR]: true,\n [STYLE_KEY.BACKGROUND_IMAGE]: true,\n [STYLE_KEY.BACKGROUND_POSITION_X]: true,\n [STYLE_KEY.BACKGROUND_POSITION_Y]: true,\n [STYLE_KEY.BACKGROUND_REPEAT]: true,\n [STYLE_KEY.BACKGROUND_SIZE]: true,\n [STYLE_KEY.STROKE]: true,\n [STYLE_KEY.BORDER_BOTTOM_COLOR]: true,\n [STYLE_KEY.BORDER_LEFT_COLOR]: true,\n [STYLE_KEY.BORDER_RIGHT_COLOR]: true,\n [STYLE_KEY.BORDER_TOP_COLOR]: true,\n [STYLE_KEY.BORDER_TOP_LEFT_RADIUS]: true,\n [STYLE_KEY.BORDER_TOP_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_LEFT_RADIUS]: true,\n [STYLE_KEY.VISIBILITY]: true,\n [STYLE_KEY.OPACITY]: true,\n [STYLE_KEY.Z_INDEX]: true,\n [STYLE_KEY.FILTER]: true,\n [STYLE_KEY.BOX_SHADOW]: true,\n [STYLE_KEY.OVERFLOW]: true,\n [STYLE_KEY.BACKGROUND_CLIP]: true,\n [STYLE_KEY.TEXT_STROKE_WIDTH]: true,\n [STYLE_KEY.TEXT_STROKE_COLOR]: true,\n [STYLE_KEY.TEXT_STROKE_OVER]: true,\n};\n\nlet o = {\n GEOM,\n GEOM_KEY_SET,\n IGNORE,\n REPAINT,\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 IGNORE.hasOwnProperty(k);\n },\n isGeom(tagName, k) {\n return tagName && k && GEOM.hasOwnProperty(k) && GEOM[k].hasOwnProperty(tagName);\n },\n isRepaint(k, tagName) {\n return REPAINT.hasOwnProperty(k) || 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 DISPLAY,\n FLEX_DIRECTION,\n FLEX_GROW,\n FLEX_SHRINK,\n FLEX_BASIS,\n JUSTIFY_CONTENT,\n ALIGN_SELF,\n ALIGN_ITEMS,\n MATRIX,\n LETTER_SPACING,\n BACKGROUND_CLIP,\n WHITE_SPACE,\n TEXT_OVERFLOW,\n LINE_CLAMP,\n ORDER,\n FLEX_WRAP,\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 COLOR_HASH,\n LENGTH_HASH,\n RADIUS_HASH,\n GRADIENT_HASH,\n EXPAND_HASH,\n GRADIENT_TYPE,\n} = key;\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[1] = NUMBER;\n }\n else if(k === TRANSLATE_X || k === TRANSLATE_Y || k === TRANSLATE_Z) {\n if(arr[1] === NUMBER) {\n arr[1] = PX;\n }\n }\n else if(k === PERSPECTIVE) {\n if([NUMBER, PERCENT, DEG].indexOf(arr[1]) > -1) {\n arr[1] = PX;\n }\n }\n else {\n if(arr[1] === NUMBER) {\n arr[1] = 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] = [null];\n }\n else if(Array.isArray(temp)) {\n res[BACKGROUND_IMAGE] = temp.map(item => {\n if(!item) {\n return null;\n }\n if(reg.gradient.test(item)) {\n return [gradient.parseGradient(item), GRADIENT];\n }\n if(reg.img.test(item)) {\n return [reg.img.exec(item)[2], STRING];\n }\n return null;\n });\n }\n // 区分是渐变色还是图\n else if(reg.gradient.test(temp)) {\n res[BACKGROUND_IMAGE] = [[gradient.parseGradient(temp), GRADIENT]];\n }\n else if(reg.img.test(temp)) {\n res[BACKGROUND_IMAGE] = [[reg.img.exec(temp)[2], STRING]];\n }\n else {\n res[BACKGROUND_IMAGE] = [null];\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] = [rgba2int(bgc[0]), RGBA];\n }\n else {\n bgc = /rgba?\\s*\\(.+\\)/i.exec(temp);\n res[BACKGROUND_COLOR] = [rgba2int(bgc ? bgc[0] : [0, 0, 0, 0]), 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[1]) > -1) {\n v[1] = PX;\n }\n return v;\n }\n else {\n return [\n {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[item] || 0,\n 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 [0, AUTO],\n [0, 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[1]) > -1) {\n n[1] = PX;\n }\n v.push(n);\n }\n else if(item === 'contain' || item === 'cover') {\n v.push([item, STRING]);\n }\n else {\n v.push([0, AUTO]);\n }\n }\n return v;\n }\n else {\n return [\n [0, AUTO],\n [0, 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)]] = [rgba2int(v || 'transparent'), 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[1]) > -1) {\n n[1] = PX;\n }\n if(n[0] < 0) {\n n[0] = 0;\n }\n arr[i] = n;\n }\n else {\n arr[i] = [0, PX];\n }\n }\n res[STYLE_KEY[style2Upper(k)]] = arr;\n }\n });\n temp = style.transform;\n if(temp === null) {\n res[TRANSFORM] = null;\n }\n else 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([MATRIX, [\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([MATRIX, arr]);\n }\n }\n else if(k === 'perspective') {\n let arr = calUnit(v);\n if(arr[0] < 0) {\n arr[0] = 0;\n }\n compatibleTransform(PERSPECTIVE, arr);\n transform.push([PERSPECTIVE, 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([ROTATE_3D, 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([k2, 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([k1, arr1]);\n transform.push([k2, 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([k1, arr1]);\n transform.push([k2, arr2]);\n transform.push([k3, arr3]);\n }\n }\n });\n }\n }\n temp = style.perspective;\n if(temp !== undefined) {\n let arr = calUnit(temp || 0);\n if(arr[0] < 0) {\n arr[0] = 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[1]) > -1) {\n n[1] = PX;\n }\n arr.push(n);\n }\n else {\n arr.push([\n {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[item],\n PERCENT,\n ]);\n // 不规范的写法变默认值50%\n if(isNil(arr[i][0])) {\n arr[i][0] = 50;\n }\n }\n }\n }\n else {\n arr.push([50, PERCENT]);\n arr.push([50, 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 = [0, AUTO];\n }\n else {\n v = calUnit(v || 0);\n // 无单位视为px\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = 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[0] < 0) {\n v[0] = 0;\n }\n });\n temp = style.flexBasis;\n if(temp !== undefined) {\n if(/content/i.test(temp)) {\n res[FLEX_BASIS] = [temp, STRING];\n }\n else if(/^[\\d.]/.test(temp)) {\n let v = res[FLEX_BASIS] = calUnit(temp);\n v[0] = Math.max(v[0], 0);\n // 无单位视为px\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n }\n else {\n res[FLEX_BASIS] = [0, 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] = [[], INHERIT];\n }\n else if(reg.gradient.test(temp)) {\n res[COLOR] = [gradient.parseGradient(temp), GRADIENT];\n }\n else {\n res[COLOR] = [rgba2int(temp), RGBA];\n }\n }\n temp = style.textStrokeColor;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[TEXT_STROKE_COLOR] = [[], INHERIT];\n }\n else if(reg.gradient.test(temp)) {\n res[TEXT_STROKE_COLOR] = [gradient.parseGradient(temp), GRADIENT];\n }\n else {\n res[TEXT_STROKE_COLOR] = [rgba2int(temp), RGBA];\n }\n }\n temp = style.fontSize;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[FONT_SIZE] = [0, INHERIT];\n }\n else {\n let v = calUnit(temp);\n // fontSize不能为负数,否则为继承\n if(v < 0) {\n res[FONT_SIZE] = [0, INHERIT];\n }\n else {\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = 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] = [0, INHERIT];\n }\n else {\n let v = calUnit(temp);\n // textStrokeWidth不能为负数,否则为继承\n if(v < 0) {\n res[TEXT_STROKE_WIDTH] = [0, INHERIT];\n }\n else {\n if([NUMBER, DEG, PERCENT].indexOf(v[1]) > -1) {\n v[1] = 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] = [0, 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, STRING];\n }\n }\n temp = style.fontWeight;\n if(temp !== undefined) {\n if(/bold/i.test(temp)) {\n res[FONT_WEIGHT] = [700, NUMBER];\n }\n else if(/normal/i.test(temp)) {\n res[FONT_WEIGHT] = [400, NUMBER];\n }\n else if(/lighter/i.test(temp)) {\n res[FONT_WEIGHT] = [200, NUMBER];\n }\n else if(/inherit/i.test(temp)) {\n res[FONT_WEIGHT] = [0, INHERIT];\n }\n else {\n res[FONT_WEIGHT] = [Math.max(0, parseInt(temp)) || 400, NUMBER];\n }\n }\n temp = style.fontStyle;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[FONT_STYLE] = [0, 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, STRING];\n }\n }\n temp = style.fontFamily;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[FONT_FAMILY] = [0, INHERIT];\n }\n else {\n // 统一文字声明格式\n res[FONT_FAMILY] = [temp.toString().toLowerCase().replace(/['\"]/, '').replace(/\\s*,\\s*/g, ','), STRING];\n }\n }\n temp = style.writingMode;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[WRITING_MODE] = [0, 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, STRING];\n }\n }\n temp = style.textAlign;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[TEXT_ALIGN] = [0, 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, STRING];\n }\n }\n temp = style.lineHeight;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[LINE_HEIGHT] = [0, INHERIT];\n }\n else if(/normal/i.test(temp)) {\n res[LINE_HEIGHT] = [0, AUTO];\n }\n // lineHeight默认数字,想要px必须强制带单位\n else if(/^[\\d.]+/i.test(temp)) {\n let v = calUnit(temp);\n if([DEG].indexOf(v[1]) > -1) {\n v[1] = 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] = [null, AUTO];\n }\n else {\n res[LINE_HEIGHT] = [n, NUMBER];\n }\n }\n }\n temp = style.letterSpacing;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[LETTER_SPACING] = [0, INHERIT];\n }\n else if(/normal/i.test(temp)) {\n res[LETTER_SPACING] = [0, PX];\n }\n else if(/^[-+]?[\\d.]/.test(temp)) {\n let v = calUnit(temp);\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n res[LETTER_SPACING] = v;\n }\n else {\n res[LETTER_SPACING] = [parseFloat(temp) || 0, PX];\n }\n }\n temp = style.whiteSpace;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[WHITE_SPACE] = [0, INHERIT];\n }\n else {\n res[WHITE_SPACE] = [temp, 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 temp = style.fill;\n if(temp !== undefined) {\n if(!temp) {\n res[FILL] = [['none', STRING]];\n }\n else if(Array.isArray(temp)) {\n if(temp.length) {\n res[FILL] = temp.map(item => {\n if(!item) {\n return ['none', STRING];\n }\n else if(reg.gradient.test(item)) {\n return [gradient.parseGradient(item), GRADIENT];\n }\n else {\n return [rgba2int(item), RGBA];\n }\n });\n }\n else {\n res[FILL] = [['none', STRING]];\n }\n }\n else if(reg.gradient.test(temp)) {\n res[FILL] = [[gradient.parseGradient(temp), GRADIENT]];\n }\n else {\n res[FILL] = [[rgba2int(temp), RGBA]];\n }\n }\n temp = style.stroke;\n if(temp !== undefined) {\n if(!temp) {\n res[STROKE] = [['none', STRING]];\n }\n else if(Array.isArray(temp)) {\n if(temp.length) {\n res[STROKE] = temp.map(item => {\n if(!item) {\n return ['none', STRING];\n }\n else if(reg.gradient.test(item)) {\n return [gradient.parseGradient(item), GRADIENT];\n }\n else {\n return [rgba2int(item), RGBA];\n }\n });\n }\n else {\n res[STROKE] = [['none', STRING]];\n }\n }\n else if(reg.gradient.test(temp)) {\n res[STROKE] = [[gradient.parseGradient(temp), GRADIENT]];\n }\n else {\n res[STROKE] = [[rgba2int(temp), RGBA]];\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[1]) > -1) {\n v[1] = PX;\n }\n v[0] = Math.max(v[0], 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 = null;\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 f = f || [];\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[1]) > -1) {\n v[1] = PX;\n }\n // x/y可以负,blur和spread不行\n if(i > 2 && v[0] < 0) {\n v = 0;\n }\n res.push(v);\n }\n else {\n res.push([0, 1]);\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(['dropShadow', res]);\n }\n }\n else {\n let m2 = /([-+]?[\\d.]+\\s*[pxremvwhdg%]*)/i.exec(v);\n if(m2) {\n f = f || [];\n let v = calUnit(m2[0]);\n if(k === 'blur') {\n if([DEG, PERCENT].indexOf(v[1]) > -1) {\n return;\n }\n if(v[1] === NUMBER) {\n v[1] = PX;\n }\n v[0] = Math.max(v[0], 0);\n f.push([k, v]);\n }\n else if(k === 'hue-rotate' || k === 'huerotate') {\n if([NUMBER, DEG].indexOf(v[1]) === -1) {\n return;\n }\n v[1] = DEG;\n f.push(['hueRotate', v]);\n }\n else if(k === 'saturate' || k === 'brightness' || k === 'grayscale' || k === 'contrast' || k === 'sepia' || k === 'invert') {\n if([NUMBER, PERCENT].indexOf(v[1]) === -1) {\n return;\n }\n v[0] = Math.max(v[0], 0);\n v[1] = 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] = [0, INHERIT];\n }\n else {\n let v = reset.INHERIT.visibility;\n if(/hidden/i.test(temp)) {\n v = 'hidden';\n }\n res[VISIBILITY] = [v, STRING];\n }\n }\n temp = style.pointerEvents;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[POINTER_EVENTS] = [0, 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, STRING];\n }\n }\n temp = style.boxShadow;\n if(temp !== undefined) {\n let bs = null;\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 bs = bs || [];\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[1]) > -1) {\n v[1] = PX;\n }\n // x/y可以负,blur和spread不行\n if(i > 2 && v[0] < 0) {\n v = 0;\n }\n res.push(v);\n }\n else {\n res.push([0, 1]);\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[1] === AUTO) {\n if(k === WIDTH) {\n parent = parent.domParent;\n }\n else {\n break;\n }\n }\n else if(style[1] === PX) {\n return n * style[0];\n }\n else if(style[1] === PERCENT) {\n n *= style[0] * 0.01;\n parent = parent.domParent;\n }\n else if(style[1] === REM) {\n return n * style[0] * parent.root.computedStyle[FONT_SIZE];\n }\n else if(style[1] === VW) {\n return n * style[0] * parent.root.width * 0.01;\n }\n else if(style[1] === VH) {\n return n * style[0] * parent.root.height * 0.01;\n }\n else if(style[1] === VMAX) {\n return n * style[0] * Math.max(parent.root.width, parent.root.height) * 0.01;\n }\n else if(style[1] === VMIN) {\n return n * style[0] * 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[1] === AUTO) {\n v = 0;\n }\n else if([PX, NUMBER].indexOf(v[1]) > -1) {\n v = v[0];\n }\n else if(v[1] === PERCENT) {\n if(isWidth) {\n v = calRelativePercent(v[0], parent, WIDTH);\n }\n else {\n v = calRelativePercent(v[0], parent, HEIGHT);\n }\n }\n else if(v[1] === REM) {\n v = v[0] * parent.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * parent.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * parent.root.height * 0.01;\n }\n else if(v[1] === VMAX) {\n v = v[0] * Math.max(parent.root.width, parent.root.height) * 0.01;\n }\n else if(v[1] === VMIN) {\n v = v[0] * Math.min(parent.root.width, parent.root.height) * 0.01;\n }\n return v;\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[0] !== ob[0]) {\n return false;\n }\n // translate/matrix等都是数组\n if(!equalArr(oa[1], ob[1])) {\n return false;\n }\n }\n return true;\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 === BACKGROUND_SIZE) {\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][0] !== bb[0][0] || aa[0][1] !== bb[0][1] || aa[1][0] !== bb[1][0] || aa[1][1] !== bb[1][1]) {\n return false;\n }\n }\n return true;\n }\n if(k === TRANSFORM_ORIGIN || RADIUS_HASH.hasOwnProperty(k)) {\n return a[0][0] === b[0][0] && a[0][1] === b[0][1]\n && a[1][0] === b[1][0] && a[1][1] === b[1][1];\n }\n if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y\n || LENGTH_HASH.hasOwnProperty(k) || EXPAND_HASH.hasOwnProperty(k)) {\n return a[0] === b[0] && a[1] === b[1];\n }\n if(k === BOX_SHADOW) {\n return equalArr(a, b);\n }\n // color等是rgba颜色时\n if(k === COLOR || k === TEXT_STROKE_COLOR) {\n if(a[1] !== b[1]) {\n return false;\n }\n if(a[1] === RGBA) {\n return equalArr(a[0], b[0]);\n }\n else {}\n }\n if(COLOR_HASH.hasOwnProperty(k)) {\n return a[1] === b[1] && equalArr(a[0], b[0]);\n }\n // color/fill等是gradient时\n if(GRADIENT_HASH.hasOwnProperty(k) && a.k === b.k && GRADIENT_TYPE.hasOwnProperty(a.k)) {\n let av = a.v;\n let bv = b.v;\n if(a.d !== b.d || av.length !== bv.length) {\n return false;\n }\n for(let i = 0, len = av.length; i < len; i++) {\n let ai = av[i];\n let bi = bv[i];\n if(ai.length !== bi.length) {\n return false;\n }\n for(let j = 0; j < 4; j++) {\n if(ai[0][j] !== bi[0][j]) {\n return false;\n }\n }\n if(ai.length > 1) {\n if(ai[1][0] !== bi[1][0] || ai[1][1] !== bi[1][1]) {\n return false;\n }\n }\n }\n return true;\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 isRelativeOrAbsolute(node) {\n let position = node.currentStyle[POSITION];\n return position === 'relative' || position === 'absolute';\n}\n\nconst VALUE = {\n [POSITION]: true,\n [DISPLAY]: true,\n [STYLE_KEY.BACKGROUND_REPEAT]: true,\n [FLEX_DIRECTION]: true,\n [FLEX_GROW]: true,\n [FLEX_SHRINK]: true,\n [FLEX_WRAP]: true,\n [JUSTIFY_CONTENT]: true,\n [ALIGN_ITEMS]: true,\n [ALIGN_SELF]: true,\n [STYLE_KEY.OVERFLOW]: true,\n [STYLE_KEY.MIX_BLEND_MODE]: true,\n [STYLE_KEY.STROKE_LINECAP]: true,\n [STYLE_KEY.STROKE_LINEJOIN]: true,\n [STYLE_KEY.STROKE_MITERLIMIT]: true,\n [STYLE_KEY.FILL_RULE]: true,\n [OPACITY]: true,\n [Z_INDEX]: true,\n [BACKGROUND_CLIP]: true,\n [TEXT_OVERFLOW]: true,\n [LINE_CLAMP]: true,\n};\n// 仅1维数组\nconst ARRAY_0 = {\n [BACKGROUND_COLOR]: true,\n [STYLE_KEY.BORDER_TOP_COLOR]: true,\n [STYLE_KEY.BORDER_RIGHT_COLOR]: true,\n [STYLE_KEY.BORDER_BOTTOM_COLOR]: true,\n [STYLE_KEY.BORDER_LEFT_COLOR]: true,\n};\n// 仅2维数组且只有2个值\nconst ARRAY_0_1 = {\n [STYLE_KEY.BORDER_TOP_LEFT_RADIUS]: true,\n [STYLE_KEY.BORDER_TOP_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_LEFT_RADIUS]: true,\n [TRANSFORM_ORIGIN]: true,\n [PERSPECTIVE_ORIGIN]: true,\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 // 渐变特殊处理\n if(k === BACKGROUND_IMAGE) {\n res[k] = v.map(item => {\n if(item[1] === GRADIENT) {\n return [util.clone(item[0]), item[1]];\n }\n else {\n return item;\n }\n });\n }\n else if(k === FILL || k === STROKE) {\n res[k] = v.map(item => {\n // 渐变可能非法为空\n if(item[1] === GRADIENT) {\n return [util.clone(item[0]), item[1]];\n }\n // 颜色\n else if(item[1] === RGBA) {\n return [item[0].slice(0), item[1]];\n }\n // none\n else {\n return item;\n }\n });\n }\n else if(k === TRANSFORM) {\n if(v) {\n let n = v.slice(0);\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n n[i][1] = n[i][1].slice(0);\n }\n res[k] = n;\n }\n }\n else if(k === FILTER) {\n if(v) {\n let n = v.slice(0);\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n let k = n[i][0];\n n[i][1] = n[i][1].slice(0);\n if(k === 'dropShadow') {\n let temp = n[i][1];\n temp.forEach((item, j) => {\n temp[j] = temp[j].slice(0);\n });\n }\n }\n res[k] = n;\n }\n }\n else if(k === BOX_SHADOW) {\n if(v) {\n v = v.map(item => {\n let n = item.slice(0);\n n[4] = n[4].slice(0);\n return n;\n });\n res[k] = v;\n }\n }\n else if(k === TRANSLATE_PATH) {\n if(v) {\n res[k] = v.map(item => item.slice(0));\n }\n }\n else if(k === COLOR || k === TEXT_STROKE_COLOR) {\n if(v) {\n if(v[1] === GRADIENT) {\n res[k] = [util.clone(v[0]), v[1]];\n }\n else if(v[1] === RGBA) {\n res[k] = [v[0].slice(0), v[1]];\n }\n // inherit\n else {\n res[k] = v.slice(0);\n }\n }\n }\n // position等直接值类型赋值\n else if(VALUE.hasOwnProperty(k)) {\n res[k] = v;\n }\n // geom自定义属性\n else if(GEOM.hasOwnProperty(k)) {\n res[k] = util.clone(v);\n }\n // 其余皆是数组或空,默认是一维数组只需slice即可\n else if(v) {\n let n = res[k] = v.slice(0);\n // 特殊引用里数组某项再次clone\n if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n }\n }\n else if(k === BACKGROUND_SIZE) {\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n n[i][0] = n[i][0].slice(0);\n n[i][1] = n[i][1].slice(0);\n }\n }\n else if(ARRAY_0.hasOwnProperty(k)) {\n n[0] = n[0].slice(0);\n }\n else if(ARRAY_0_1.hasOwnProperty(k)) {\n n[0] = n[0].slice(0);\n n[1] = n[1].slice(0);\n }\n else if(k === TRANSFORM) {\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n }\n }\n else if(k === ROTATE_3D) {\n n[3] = n[3].slice(0);\n }\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 { PX, 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[0]);\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 [k, v] = item;\n let t = identity();\n calSingle(t, k, 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[1] === PERCENT) {\n return v[0] * ow * 0.01;\n }\n else if(v[1] === REM) {\n return v[0] * root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n return v[0] * root.width * 0.01;\n }\n else if(v[1] === VH) {\n return v[0] * root.height * 0.01;\n }\n else if(v[1] === VMAX) {\n return v[0] * Math.max(root.width, root.height) * 0.01;\n }\n else if(v[1] === VMIN) {\n return v[0] * Math.min(root.width, root.height) * 0.01;\n }\n }\n else if(k === TRANSLATE_Y) {\n if(v[1] === PERCENT) {\n return v[0] * oh * 0.01;\n }\n else if(v[1] === REM) {\n return v[0] * root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n return v[0] * root.width * 0.01;\n }\n else if(v[1] === VH) {\n return v[0] * root.height * 0.01;\n }\n else if(v[1] === VMAX) {\n return v[0] * Math.max(root.width, root.height) * 0.01;\n }\n else if(v[1] === VMIN) {\n return v[0] * 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[0];\n}\n\nfunction normalize(transform, ow, oh, root) {\n let res = [];\n transform.forEach(item => {\n let [k, v] = item;\n res.push([k, normalizeSingle(k, v, ow, oh, root)]);\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}-\\u{1D2FF}\\u{1D300}-\\u{1D356}\\u{1D357}-\\u{1D35F}\\u{1D360}-\\u{1D378}\\u{1D379}-\\u{1D37F}\\u{1D800}-\\u{1D9FF}\\u{1DA00}-\\u{1DA36}\\u{1DA37}-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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.parent;\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 [ROTATE_Z, [90, 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 NODE_KEY: {\n NODE_VIRTUAL_DOM,\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, lv, ctx, cache, 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 [ROTATE_Z, [90, 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.__config[NODE_VIRTUAL_DOM] = 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 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;\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 this.__isNew = true;\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 this.__isNew = true;\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 resetBbox(bbox) {}\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 get isNew() {\n return this.__isNew;\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, draw()}}\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.draw();\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, cb) {\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[0] += x + dbx + node.__sx1 - target.sx1;\n tfo[1] += y + dby + node.__sy1 - target.sy1;\n let inverse = tf.calMatrixByOrigin(transform, tfo);\n // 先将mask本身绘制到cache上,再设置模式绘制dom本身,因为都是img所以1个就够了\n list.forEach(item => {\n cb(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 cacheMask.draw(ctx);\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 cacheOverflow.draw(ctx);\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, transform, matrix, tfo, parentMatrix, inverse) {\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 if(transform && matrix && tfo) {\n tfo[0] += ox;\n tfo[1] += oy;\n let m = tf.calMatrixByOrigin(transform, tfo);\n matrix = mx.multiply(matrix, m);\n if(!mx.isE(parentMatrix)) {\n matrix = mx.multiply(parentMatrix, matrix);\n }\n if(inverse) {\n // 很多情况mask和target相同matrix,可简化计算\n if(util.equalArr(matrix, inverse)) {\n matrix = mx.identity();\n }\n else {\n inverse = mx.inverse(inverse);\n matrix = mx.multiply(inverse, matrix);\n }\n }\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n }\n ctx.drawImage(canvas, x, y, width, height, ox, oy, width, height);\n }\n\n static draw(ctx, opacity, matrix, cache) {\n ctx.globalAlpha = opacity;\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n let { x, y, canvas, sx1, sy1, dbx, dby, width, height } = cache;\n ctx.drawImage(canvas, x, y, width, height, sx1 - dbx, sy1 - dby, 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 static NA = 0; // 无缓存模式\n static LOCAL = 1; // 局部根节点\n static CHILD = 2; // 其子节点\n static SELF = 3; // webgl专用\n}\n\nexport default Cache;\n","import change from './change';\nimport enums from '../util/enums';\n\nconst { STYLE_KEY, STYLE_KEY: {\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n OPACITY,\n FILTER,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n} } = enums;\n\nconst ENUM = {\n // 低位表示 0;\n },\n /**\n * 得出等级\n * @param k\n * @returns {number|*}\n */\n getLevel(k) {\n if(change.isIgnore(k)) {\n return ENUM.NONE;\n }\n if(k === TRANSLATE_X) {\n return ENUM.TRANSLATE_X;\n }\n else if(k === TRANSLATE_Y) {\n return ENUM.TRANSLATE_Y;\n }\n else if(k === TRANSLATE_Z) {\n return ENUM.TRANSLATE_Z;\n }\n else if(TRANSFORMS.hasOwnProperty(k)) {\n return ENUM.TRANSFORM;\n }\n else if(k === OPACITY) {\n return ENUM.OPACITY;\n }\n else if(k === FILTER) {\n return ENUM.FILTER;\n }\n else if(k === PERSPECTIVE || k === PERSPECTIVE_ORIGIN) {\n return ENUM.PERSPECTIVE;\n }\n else if(change.isRepaint(k)) {\n return ENUM.REPAINT;\n }\n return ENUM.REFLOW;\n },\n isReflow(lv) {\n return !this.isRepaint(lv);\n },\n isRepaint(lv) {\n return lv < ENUM.REFLOW;\n },\n isRebuild(lv) {\n return lv >= ENUM.REBUILD;\n },\n}, ENUM);\no.TRANSFORMS = TRANSFORMS;\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 Cache from '../refresh/Cache';\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 NODE_KEY: {\n NODE_CACHE,\n NODE_LIMIT_CACHE,\n NODE_DOM_PARENT,\n NODE_MATRIX_EVENT,\n NODE_OPACITY,\n NODE_VIRTUAL_DOM,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_FOCUS,\n UPDATE_CONFIG,\n },\n ELLIPSIS,\n} = enums;\n\nconst { AUTO } = unit;\nconst { CANVAS, SVG, WEBGL } = mode;\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 }\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 __layout(data) {\n let __cache = this.__config[NODE_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 let __config = this.__config;\n __config[NODE_LIMIT_CACHE] = false;\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[1] === 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, lv, ctx, cache, dx = 0, dy = 0) {\n let { isDestroyed, computedStyle, textBoxes, cacheStyle, __config } = this;\n if(renderMode === SVG) {\n __config[NODE_VIRTUAL_DOM] = this.__virtualDom = {\n type: 'text',\n children: [],\n };\n }\n // >=REPAINT清空bbox\n if(lv >= level.REPAINT) {\n this.__bbox = null;\n this.__filterBbox = null;\n }\n if(isDestroyed || computedStyle[DISPLAY] === 'none' || computedStyle[VISIBILITY] === 'hidden'\n || !textBoxes.length) {\n return;\n }\n if(renderMode === CANVAS || renderMode === WEBGL) {\n // webgl借用离屏canvas绘制文本,cache标识为true是普通绘制,否则是超限降级情况\n if(renderMode === WEBGL) {\n if(cache) {\n let { sx, sy, bbox } = this;\n let __cache = __config[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 __config[NODE_CACHE] = __cache;\n __cache.__available = true;\n ctx = __cache.ctx;\n dx += __cache.dx;\n dy += __cache.dy;\n __config[NODE_LIMIT_CACHE] = false;\n }\n else {\n __config[NODE_LIMIT_CACHE] = true;\n return;\n }\n }\n else {\n let root = this.root;\n let c = inject.getCacheCanvas(root.width, root.height, '__$$OVERSIZE$$__');\n ctx = c.ctx;\n let {\n [NODE_DOM_PARENT]: {\n __config: {\n [NODE_MATRIX_EVENT]: m,\n [NODE_OPACITY]: opacity,\n },\n },\n } = __config;\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n ctx.globalAlpha = opacity;\n }\n }\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.__config[NODE_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 let self = this;\n if(s === self.__content) {\n if(util.isFunction(cb)) {\n cb(-1);\n }\n return;\n }\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__content = s;\n let res = {};\n let vd = self.domParent;\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_CONFIG] = vd.__config;\n let root = vd.root;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb(diff);\n }\n },\n });\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 root() {\n return this.domParent.root;\n }\n\n get currentStyle() {\n return this.domParent.currentStyle;\n }\n\n get style() {\n return this.__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 let { __sx1: sx, __sy1: sy, width, height,\n computedStyle: {\n [TEXT_STROKE_WIDTH]: textStrokeWidth,\n },\n } = this;\n // TODO: 文字描边暂时不清楚最大值是多少,影响不确定,先按描边宽算,因为会出现>>0.5宽的情况\n let half = textStrokeWidth;\n return [sx - half, sy - half, sx + width + half, sy + height + half];\n }\n\n get filterBbox() {\n if(!this.__filterBbox) {\n let 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\nText.prototype.__renderByMask = Text.prototype.render;\n\nexport default Text;\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 Text from '../node/Text';\nimport util from './util';\nimport $$type from './$$type';\nimport enums from './enums';\nimport flatten from './flatten';\n\nconst { NODE_KEY: {\n NODE_DOM_PARENT,\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n} } = enums;\nconst { TYPE_VD, TYPE_GM, TYPE_CP } = $$type;\n\nlet Xom, Dom, Img, Geom, Component;\n\nfunction initRoot(cd, root) {\n let c = flatten({\n tagName: root.tagName,\n props: {},\n children: cd,\n $$type: TYPE_VD,\n });\n root.__json = c;\n root.__host = root;\n let children = build(c.children, root, root);\n return relation(root, children);\n}\n\nfunction initDom(json, root, host, parent) {\n let vd = build(json, root, host);\n return relation(parent, vd);\n}\n\nfunction initCp(json, root, host) {\n if(util.isObject(json)) {\n // cp的flatten在__init中自己做\n return build(json, root, host);\n }\n // text的relation会由上层如Root设置\n else {\n return new Text(json);\n }\n}\n\nfunction initCp2(json, root, host, parent) {\n let vd = new json.klass(json.props);\n vd.__tagName = json.tagName || vd.__tagName;\n vd.__root = root;\n vd.__host = host;\n vd.__json = json;\n vd.__init();\n return relation(parent, vd);\n}\n\n/**\n * 将初始json文件生成virtualDom\n * @param json\n * @param root\n * @param host\n * @param hasP 出现过p标签\n * @returns vd\n */\nfunction build(json, root, host, hasP) {\n if(Array.isArray(json)) {\n return json.map(item => build(item, root, host, hasP));\n }\n let vd;\n if(util.isObject(json) && json.$$type) {\n let { tagName, props, children, klass, $$type, __inheritAnimate, __animateRecords } = json;\n // 更新过程中无变化的cp直接使用原来生成的\n if($$type === TYPE_CP && json.__placeholder) {\n return json.__placeholder;\n }\n if($$type === TYPE_VD) {\n if(tagName === 'img') {\n vd = new Img(tagName, props);\n if(Array.isArray(children) && children.length) {\n throw new Error('Img can not contain children');\n }\n }\n else {\n vd = new Dom(tagName, props);\n }\n // 检查p不能包含div\n if(tagName === 'p') {\n hasP = true;\n }\n else if(tagName === 'div' && hasP) {\n throw new Error('Markup p can not contain div');\n }\n if(Array.isArray(children)) {\n children = relation(vd, build(children, root, host, hasP));\n }\n else {\n children = [];\n }\n vd.__children = children;\n }\n else if($$type === TYPE_GM) {\n if(util.isString(tagName)) {\n let klass = Geom.getRegister(tagName);\n vd = new klass(tagName, props);\n }\n else if(tagName) {\n vd = new tagName('$', props);\n }\n }\n else if($$type === TYPE_CP) {\n vd = new klass(props);\n vd.__tagName = tagName || vd.__tagName;\n }\n else {\n return new Text(json);\n }\n // 根parse需要用到真正的vd引用,然后vd也要引用json,用以做domApi\n json.vd = vd;\n vd.__json = json;\n // 递归parse中的动画记录需特殊处理,将target改为真正的vd引用\n if(__animateRecords) {\n vd.__animateRecords = __animateRecords;\n __animateRecords.list.forEach(item => {\n item.target = item.target.vd;\n });\n delete json.__animateRecords;\n }\n // 更新过程中key相同或者普通相同的vd继承动画\n if(__inheritAnimate) {\n util.extendAnimate(__inheritAnimate, vd);\n delete json.__inheritAnimate;\n }\n vd.__root = root;\n vd.__host = host;\n if($$type === TYPE_CP) {\n vd.__init();\n }\n let ref = props.ref;\n if(util.isString(ref) && ref || util.isNumber(ref)) {\n host.ref[ref] = vd;\n }\n else if(util.isFunction(ref)) {\n ref(vd);\n }\n return vd;\n }\n return new Text(json);\n}\n\n/**\n * 设置关系,父子和兄弟\n * @param parent\n * @param children\n * @param options\n * @returns {Xom|Text|Component}\n */\nfunction relation(parent, children, options = {}) {\n if(Array.isArray(children)) {\n children.forEach(item => {\n relation(parent, item, options);\n });\n }\n else if(children instanceof Xom || children instanceof Component || children instanceof Text) {\n children.__parent = parent;\n children.__domParent = parent;\n // 极为恶心,为了v8的性能优化,text复用parent的__config部分,但domParent重设\n if(children instanceof Text) {\n [\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n ].forEach(k => {\n children.__config[k] = parent.__config[k];\n });\n }\n if(children.__config) {\n children.__config[NODE_DOM_PARENT] = parent;\n }\n if(options.prev) {\n options.prev.__next = children;\n children.__prev = options.prev;\n }\n options.prev = children;\n // 文字视作为父节点的直接文字子节点\n if(children instanceof Component) {\n let sr = children.shadowRoot;\n if(sr instanceof Text) {\n sr.__parent = parent;\n [\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n ].forEach(k => {\n children.__config[k] = parent.__config[k];\n });\n }\n sr.__domParent = parent;\n if(sr.__config) {\n sr.__config[NODE_DOM_PARENT] = parent;\n }\n }\n }\n return children;\n}\n\nexport default {\n ref(o) {\n Xom = o.Xom;\n Dom = o.Dom;\n Img = o.Img;\n Geom = o.Geom;\n Component = o.Component;\n },\n initRoot,\n initDom,\n initCp,\n initCp2,\n relation,\n};\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 builder from '../util/builder';\nimport Event from '../util/Event';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport flatten from '../util/flatten';\nimport css from '../style/css';\nimport change from '../refresh/change';\n\nconst { isNil, isFunction, clone, extend } = util;\n\nconst REGISTER = {};\n\n/**\n * 向上设置cp类型叶子节点,表明从root到本节点这条链路有更新,使得无链路更新的节约递归\n * 在check时树递归会用到,判断是否需要查找cp更新\n * @param cp\n */\nfunction setUpdateFlag(cp) {\n // 去重\n if(cp.__hasCpUpdate) {\n return;\n }\n cp.__hasCpUpdate = true;\n let host = cp.host;\n if(host) {\n setUpdateFlag(host);\n }\n}\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.state = {};\n this.__isMounted = false;\n this.__taskList = [];\n }\n\n setState(n, cb) {\n let self = this;\n if(isNil(n)) {\n n = {};\n }\n else if(isFunction(n)) {\n return;\n }\n else {\n if(Object.keys(n).length === 0) {\n if(isFunction(cb)) {\n cb.call(self);\n }\n return;\n }\n let state = clone(self.state);\n n = extend(state, n);\n }\n let root = self.root;\n if(root && self.__isMounted) {\n // 一帧之内多次调用,需合并\n if(self.__nextState) {\n Object.assign(self.__nextState, n);\n self.__taskList.push(cb);\n }\n else {\n self.__nextState = n;\n self.__taskList = [cb];\n // 回调更新列表,before执行时splice出来供after执行,防止中途产生的后续setState干扰\n let list = [];\n let t = self.__task = {\n __before: () => {\n list = self.__taskList.splice(0);\n // 标识更新\n setUpdateFlag(this);\n },\n __after: () => {\n // self.__nextState = null; 由updater.js每次refresh前同步执行清空,这里不能异步清除,否则frame动画会乱序\n list.forEach(cb => {\n if(isFunction(cb)) {\n cb.call(self);\n }\n });\n },\n };\n root.addRefreshCp(t);\n }\n }\n // 构造函数中调用还未render,\n else if(isFunction(cb)) {\n self.state = n;\n cb.call(self);\n }\n }\n\n /**\n * build中调用初始化,json有值时是update过程才有,且处理过flatten\n * @param json\n * @private\n */\n __init(json) {\n this.__ref = {};\n let root = this.root;\n let cd = json || flatten(this.render());\n let sr = builder.initCp(cd, root, this);\n this.__cd = cd;\n if(sr instanceof Text) {\n // 文字视作为父节点的直接文字子节点,在builder里做\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 else if(!(sr instanceof Component)) {\n // 本身build是递归的,子cp已经初始化了\n throw new Error('Component render() must return a dom/text: ' + this);\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 // shadow指向直接renderRoot,shadowRoot考虑到返回Component的递归即hoc高阶组件\n // host是直接所属,hostRoot同考虑到高阶组件\n this.__shadow = sr;\n sr.__host = this;\n // 递归下去,多层级时执行顺序由里到外,最终会被最上层执行替换\n while(sr instanceof Component) {\n sr.__hostRoot = this;\n sr.shadow.__host = sr;\n sr = sr.shadow;\n }\n this.__shadowRoot = sr;\n sr.__hostRoot = this;\n if(!this.__isMounted) {\n this.__isMounted = true;\n if(isFunction(this.componentDidMount)) {\n root.once(Event.REFRESH, () => {\n this.componentDidMount();\n });\n }\n }\n }\n\n render() {\n inject.warn('Component must 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 this.root.delRefreshTask(this.__task);\n if(this.shadowRoot) {\n this.shadowRoot.__destroy();\n }\n this.__parent = 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 'availableAnimating',\n 'effectiveAnimating',\n 'displayAnimating',\n 'visibilityAnimating',\n 'bbox',\n '__config',\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 '__layoutAbs',\n '__layoutNone',\n '__tryLayInline',\n '__offsetX',\n '__offsetY',\n '__calAutoBasis',\n '__computeReflow',\n '__renderAsMask',\n '__renderByMask',\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 [SCALE_X, [targetWidth / imgWidth, NUMBER]],\n [SCALE_Y, [targetHeight / imgHeight, 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 FONT_SIZE,\n },\n NODE_KEY: {\n NODE_DEFS_CACHE,\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.__config[NODE_DEFS_CACHE].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, __config, 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 __config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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 if(item[1]) {\n item[1](diff);\n }\n else {\n item.__after && item.__after(diff);\n }\n }\n }\n else {\n for(let i = 0; i < length; i++) {\n let item = list[i];\n if(item[0]) {\n item[0](diff);\n }\n else {\n item.__before && item.__before(diff);\n }\n }\n }\n}\n\nlet isPause;\n\nclass Frame {\n constructor() {\n this.__hookTask = []; // 动画刷新后,每个root注册的刷新回调执行\n this.__task = [];\n this.__taskCp = []; // 区别于task,component专用,和animate等其它不同流水线,在最后执行,防止混了 #122\n this.__now = null;\n }\n\n __init() {\n let self = this;\n let { task, taskCp } = 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 && !taskCp.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 cloneCp = taskCp.splice(0); // task要常驻,taskCp只1次直接splice清空\n let length = clone.length;\n let lengthCp = cloneCp.length;\n traversal(clone, length, diff, false);\n traversal(cloneCp, lengthCp, diff, false);\n // 执行动画造成的每个Root的刷新并清空\n let list = self.__hookTask.splice(0);\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n item && item();\n }\n // 普通的before/after\n traversal(clone, length, diff, true);\n traversal(cloneCp, lengthCp, diff, true);\n // 还有则继续,没有则停止节省性能\n if(task.length || taskCp.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 __nextFrameCp(handle) {\n let { task, taskCp } = this;\n if(!task.length && !taskCp.length) {\n this.__init();\n }\n taskCp.push(handle);\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 get taskCp() {\n return this.__taskCp;\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 },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_STYLE,\n UPDATE_KEYS,\n UPDATE_CONFIG,\n },\n KEY_FRAME_KEY: {\n FRAME_STYLE,\n FRAME_TIME,\n FRAME_EASING,\n FRAME_TRANSITION,\n },\n ANIMATE_KEY: {\n I_ASSIGNING,\n I_IN_FPS,\n I_IS_DELAY,\n I_BEGIN,\n I_END,\n I_FINISHED,\n I_NEXT_END,\n I_FIRST_PLAY,\n I_PLAY_CB,\n I_TARGET,\n I_ROOT,\n I_FRAMES,\n I_FRAMES_R,\n I_CURRENT_TIME,\n I_NEXT_TIME,\n I_STYLE,\n I_DURATION,\n I_ITERATIONS,\n I_FILL,\n I_PLAYBACK_RATE,\n I_PLAY_COUNT,\n I_PLAY_STATE,\n I_DESTROYED,\n I_START_TIME,\n I_FPS_TIME,\n I_EASING,\n I_ENTER_FRAME,\n I_DELAY,\n I_END_DELAY,\n I_KEYS,\n I_ORIGIN_STYLE,\n I_CURRENT_FRAMES,\n I_CURRENT_FRAME,\n I_SPF_LIMIT,\n I_FPS,\n I_DIRECTION,\n I_FIRST_ENTER,\n I_STAY_BEGIN,\n I_STAY_END,\n I_IS2,\n I_END_TIME,\n I_NODE_CONFIG,\n I_ROOT_CONFIG,\n I_OUT_BEGIN_DELAY,\n I_TIME_STAMP,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, INHERIT, RGBA, STRING, NUMBER, REM, VW, VH, VMAX, VMIN, GRADIENT, calUnit } = unit;\nconst { isNil, isFunction, isNumber, isObject, isString, clone, equalArr } = util;\nconst { linear } = easing;\nconst { cloneStyle } = css;\nconst { isGeom, GEOM } = change;\n\nconst {\n COLOR_HASH,\n LENGTH_HASH,\n RADIUS_HASH,\n GRADIENT_HASH,\n EXPAND_HASH,\n GRADIENT_TYPE,\n} = key;\n\nconst NUM_CAL_HASH = {\n};\nObject.assign(NUM_CAL_HASH, LENGTH_HASH);\nObject.assign(NUM_CAL_HASH, EXPAND_HASH);\n\nfunction unify(frames, target) {\n let hash = {};\n let keys = [];\n // 获取所有关键帧的属性\n frames.forEach(item => {\n let style = item[FRAME_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[FRAME_STYLE];\n keys.forEach(k => {\n if(!style.hasOwnProperty(k) || isNil(style[k])) {\n if(GEOM.hasOwnProperty(k)) {\n style[k] = target.getProps(k);\n }\n else {\n if(k === TRANSLATE_X && style.hasOwnProperty(TRANSLATE_PATH)) {\n style[k] = style[TRANSLATE_PATH][0];\n }\n else if(k === TRANSLATE_Y && style.hasOwnProperty(TRANSLATE_PATH)) {\n style[k] = style[TRANSLATE_PATH][1];\n }\n else {\n style[k] = target.currentStyle[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[FRAME_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] = [[MATRIX, m]];\n }\n else if(v[1] === INHERIT) {\n if(k === COLOR || k === TEXT_STROKE_COLOR) {\n style[k] = [util.rgba2int(computedStyle[k]), RGBA];\n }\n else if(LENGTH_HASH.hasOwnProperty(k)) {\n style[k] = [computedStyle[k], PX];\n }\n else if(k === FONT_WEIGHT) {\n style[k] = [computedStyle[k], NUMBER];\n }\n else if(k === FONT_STYLE || k === FONT_FAMILY || k === TEXT_ALIGN || k === TEXT_STROKE_OVER) {\n style[k] = [computedStyle[k], STRING];\n }\n }\n });\n });\n}\n\n/**\n * 通知root更新当前动画,需要根据frame的状态来决定是否是同步插入\n * 在异步时,因为动画本身是异步,需要addRefreshTask\n * 而如果此时frame在执行before过程中,说明帧动画本身是在before计算的,需要同步插入\n * @param style\n * @param keys 样式所有的key\n * @param __config\n * @param root\n * @param node\n */\nfunction genBeforeRefresh(style, keys, __config, root, node) {\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_STYLE] = style;\n res[UPDATE_KEYS] = keys;\n res[UPDATE_CONFIG] = __config[I_NODE_CONFIG];\n root.__addUpdate(node, __config[I_NODE_CONFIG], root, __config[I_ROOT_CONFIG], res);\n __config[I_STYLE] = style;\n __config[I_ASSIGNING] = true;\n // frame每帧回调时,下方先执行计算好变更的样式,这里特殊插入一个hook,让root增加一个刷新操作\n // 多个动画调用因为相同root也只会插入一个,这样在所有动画执行完毕后frame里检查同步进行刷新,解决单异步问题\n root.__frameHook();\n}\n\n/**\n * 将每帧的样式格式化,提取出offset属性并转化为时间,提取出缓动曲线easing\n * @param style 关键帧样式\n * @param duration 动画时间长度\n * @param es options的easing曲线控制,frame没有自定义则使用全局的\n * @returns {{style: *, time: number, easing: *, transition: []}}\n */\nfunction framing(style, duration, es) {\n let { offset, easing } = style;\n // 这两个特殊值提出来存储不干扰style\n delete style.offset;\n delete style.easing;\n // translatePath特殊对待,ae的曲线运动动画\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[1] === NUMBER) {\n v[1] = PX;\n }\n return v;\n });\n }\n let res = [];\n res[FRAME_STYLE] = style;\n res[FRAME_TIME] = offset * duration;\n res[FRAME_EASING] = easing || es;\n res[FRAME_TRANSITION] = [];\n return res;\n}\n\nfunction calByUnit(p, n, container, root) {\n if(p[1] === PX) {\n if(n[1] === PERCENT) {\n return n[0] * 0.01 * container - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width * 0.01 - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height * 0.01 - p[0];\n }\n else if(n[1] === VMAX) {\n return n[0] * Math.max(root.width, root.height) * 0.01 - p[0];\n }\n else if(n[1] === VMIN) {\n return n[0] * Math.min(root.width, root.height) * 0.01 - p[0];\n }\n }\n else if(p[1] === PERCENT) {\n if(n[1] === PX) {\n return n[0] * 100 / container - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * root.computedStyle[FONT_SIZE] * 100 / container - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width / container - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height / container - p[0];\n }\n else if(n[1] === VMAX) {\n return n[0] * Math.max(root.width, root.height) / container - p[0];\n }\n else if(n[1] === VMIN) {\n return n[0] * Math.min(root.width, root.height) / container - p[0];\n }\n }\n else if(p[1] === REM) {\n if(n[1] === PX) {\n return n[0] / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * 0.01 * container / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width * 0.01 / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height * 0.01 / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VMAX) {\n return n[0] * Math.max(root.width, root.height) * 0.01 / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VMIN) {\n return n[0] * Math.min(root.width, root.height) * 0.01 / root.computedStyle[FONT_SIZE] - p[0];\n }\n }\n else if(p[1] === VW) {\n if(n[1] === PX) {\n return n[0] * 100 / root.width - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * 100 * root.computedStyle[FONT_SIZE] / root.width - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * container / root.width - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height / root.width - p[0];\n }\n else if(n[1] === VMAX) {\n return n[0] * Math.max(root.width, root.height) / root.width - p[0];\n }\n else if(n[1] === VMIN) {\n return n[0] * Math.min(root.width, root.height) / root.width - p[0];\n }\n }\n else if(p[1] === VH) {\n if(n[1] === PX) {\n return n[0] * 100 / root.height - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * 100 * root.computedStyle[FONT_SIZE] / root.height - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width / root.height - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * container / root.height - p[0];\n }\n else if(n[1] === VMAX) {\n return n[0] * Math.max(root.width, root.height) / root.height - p[0];\n }\n else if(n[1] === VMIN) {\n return n[0] * Math.min(root.width, root.height) / root.height - p[0];\n }\n }\n else if(p[1] === VMAX) {\n if(n[1] === PX) {\n return n[0] * 100 / Math.max(root.width, root.height) - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * 100 * root.computedStyle[FONT_SIZE] / Math.max(root.width, root.height) - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * container / Math.max(root.width, root.height) - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width / Math.max(root.width, root.height) - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height / Math.max(root.width, root.height) - p[0];\n }\n else if(n[1] === VMIN) {\n return n[0] * Math.min(root.width, root.height) / Math.max(root.width, root.height) - p[0];\n }\n }\n else if(p[1] === VMIN) {\n if(n[1] === PX) {\n return n[0] * 100 / Math.min(root.width, root.height) - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * 100 * root.computedStyle[FONT_SIZE] / Math.min(root.width, root.height) - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * container / Math.min(root.width, root.height) - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width / Math.min(root.width, root.height) - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height / Math.min(root.width, root.height) - p[0];\n }\n else if(n[1] === VMAX) {\n return n[0] * Math.max(root.width, root.height) / Math.min(root.width, root.height) - p[0];\n }\n }\n}\n\n/**\n * 计算两帧之间的差,单位不同的以后面为准,返回的v表示差值\n * 没有变化返回空\n * auto等无法比较的不参与计算,不返回来标识无过度效果\n * @param prev 上一帧样式\n * @param next 下一帧样式\n * @param k 比较的样式名\n * @param target dom对象\n * @param tagName dom名\n * @returns {{k: *, v: *}}\n */\nfunction calDiff(prev, next, k, target, tagName) {\n let res = [k];\n let p = prev[k];\n let n = next[k];\n if(k === TRANSFORM) {\n // transform因默认值null很特殊,不存在时需给默认矩阵\n if(!p && !n) {\n return;\n }\n let pm, nm;\n if(p) {\n pm = p[0][1];\n }\n else {\n pm = mx.identity();\n }\n if(n) {\n nm = n[0][1];\n }\n else {\n nm = mx.identity();\n }\n // transform特殊被初始化转成matrix矩阵,直接计算差值\n if(equalArr(pm, nm)) {\n return;\n }\n res[1] = [\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 return res;\n }\n else if(k === ROTATE_3D) {\n if(equalArr(p, n)) {\n return;\n }\n res[1] = [n[0] - n[0], n[1] - p[1], n[2] - p[2], [n[3][0] - p[3][0], n[3][1]]];\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[0] !== nv[0]) {\n v.push(null);\n }\n else {\n let k = pv[0];\n if(k === 'blur') {\n if(pv[1][1] === nv[1][1]) {\n v.push(nv[1][0] - pv[1][0]);\n }\n else {\n let v2 = calByUnit(pv[1], nv[1], 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(nv[1][0] - pv[1][0]);\n }\n else if(k === 'dropShadow') {\n let v2 = [];\n for(let i = 0; i < 4; i++) {\n let a = pv[1][i], b = nv[1][i];\n if(a[1] === b[1]) {\n v2.push(b[0] - a[0]);\n }\n else {\n v2.push(calByUnit(a, b, i === 1 ? taraget.clientHeight: target.clientWidth, target.root));\n }\n }\n v2.push([\n nv[1][4][0] - pv[1][4][0],\n nv[1][4][1] - pv[1][4][1],\n nv[1][4][2] - pv[1][4][2],\n nv[1][4][3] - pv[1][4][3],\n ])\n v.push(v2);\n }\n }\n }\n res[1] = v;\n }\n else if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN) {\n res[1] = [];\n for(let i = 0; i < 2; i++) {\n let pi = p[i];\n let ni = n[i];\n if(pi[1] === ni[1]) {\n res[1].push(ni[0] - pi[0]);\n }\n else {\n let v = calByUnit(pi, ni, target[i ? 'outerHeight' : 'outerWidth'], target.root);\n res[1].push(v || 0);\n }\n }\n if(equalArr(res[1], [0, 0])) {\n return;\n }\n }\n else if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n res[1] = [];\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) {\n res[1].push(null);\n continue;\n }\n if(pi[1] === ni[1]) {\n let v = ni[0] - pi[0];\n if(!v) {\n res[1].push(null);\n return;\n }\n res[1].push(v);\n }\n else {\n let k2 = k === BACKGROUND_POSITION_X ? 'offsetWidth' : 'offsetHeight';\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 let v = calByUnit(pi, ni, target[k2], target.root);\n if(!v) {\n res[1].push(null);\n return;\n }\n res[1].push(v);\n }\n }\n }\n else if(k === BOX_SHADOW) {\n res[1] = [];\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 let v = [];\n // x/y/blur/spread\n for(let j = 0; j < 4; j++) {\n v.push(b[j] - a[j]);\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[1].push(v);\n }\n }\n else if(EXPAND_HASH.hasOwnProperty(k)) {\n if(p[1] === n[1]) {\n let v = n[0] - p[0];\n if(v === 0) {\n return;\n }\n res[1] = 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[1] = v;\n }\n }\n else if(k === BACKGROUND_SIZE) {\n res[1] = [];\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[1].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[1] === nn[1]) {\n temp.push(nn[0] - pp[0]);\n }\n else {\n let k2 = i ? 'offsetWidth' : 'offsetHeight';\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 let v = calByUnit(pp, nn, target[k2], target.root);\n temp.push(v || 0);\n }\n }\n if(equalArr(temp, [0, 0])) {\n res[1].push(null);\n }\n else {\n res[1].push(temp);\n has = true;\n }\n }\n if(!has) {\n return;\n }\n }\n else if(GRADIENT_HASH.hasOwnProperty(k)) {\n // backgroundImage发生了渐变色和图片的变化,fill发生渐变色和纯色的变化等\n res[1] = [];\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[1] !== ni[1]) {\n res[1].push(null);\n continue;\n }\n let isGradient = pi[1] === GRADIENT;\n pi = pi[0];\n ni = ni[0];\n let temp = [];\n // 渐变\n if(isGradient) {\n let r = calDiffGradient(pi, ni, target);\n if(!r) {\n res[1].push(null);\n continue;\n }\n temp = r;\n }\n // 纯色\n else {\n if(equalArr(ni, pi)) {\n res[1].push(null);\n }\n temp[0] = [\n ni[0] - pi[0],\n ni[1] - pi[1],\n ni[2] - pi[2],\n ni[3] - pi[3]\n ];\n }\n res[1].push(temp);\n }\n }\n else if(COLOR_HASH.hasOwnProperty(k)) {\n if(n[1] !== p[1]) {\n return;\n }\n // 特殊增加支持有gradient的先判断,仅color和textStrokeColor支持\n let isGradient = n[1] === GRADIENT;\n n = n[0];\n p = p[0];\n if(isGradient) {\n let r = calDiffGradient(p, n, target);\n if(!r) {\n return;\n }\n res[1] = r;\n }\n else {\n // 透明变化无视\n if(equalArr(n, p) || n[3] === 0 && p[3] === 0) {\n return;\n }\n res[1] = [\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(RADIUS_HASH.hasOwnProperty(k)) {\n // x/y都相等无需\n if(n[0][0] === p[0][0] && n[0][1] === p[0][1]\n && n[1][0] === p[1][0] && n[1][1] === p[1][1]) {\n return;\n }\n res[1] = [];\n for(let i = 0; i < 2; i++) {\n if(n[i][1] === p[i][1]) {\n res[1].push(n[i][0] - p[i][0]);\n }\n else {\n let v = calByUnit(p[i], n[i], target[i ? 'outerHeight' : 'outerWidth'], target.root);\n res[1].push(v || 0);\n }\n }\n }\n else if(LENGTH_HASH.hasOwnProperty(k)) {\n // auto不做动画\n if(p[1] === AUTO || n[1] === AUTO) {\n return;\n }\n let computedStyle = target.computedStyle;\n let parentComputedStyle = (target.domParent || target).computedStyle;\n let diff = 0;\n if(p[1] === n[1]) {\n diff = n[0] - p[0];\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[1] !== AUTO && n[1] !== AUTO) {\n diff = calByUnit(p, n, parentComputedStyle[HEIGHT], target.root);\n }\n }\n // 其余都是相对于父width的\n else {\n if(p[1] !== AUTO && n[1] !== 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[1] = diff;\n }\n else if(GEOM.hasOwnProperty(k)) {\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[1] = 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[1] = [];\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[1].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[1].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[1] = [];\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[1].push(null);\n }\n else {\n res[1].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[1] = 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[1] = [];\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[1].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[1].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[1] = [\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[1] = n - p;\n }\n }\n }\n else if(k === OPACITY || k === Z_INDEX) {\n if(n === p) {\n return;\n }\n res[1] = n - p;\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[1] = p.map((item, i) => {\n let [v, u] = item;\n if(u === PERCENT) {\n if(i % 2 === 0) {\n return [(parseFloat(v) || 0) * 0.01 * target[k1], PX];\n }\n else {\n return [(parseFloat(v) || 0) * 0.01 * target[k2], PX];\n }\n }\n else if(u === REM) {\n return [(parseFloat(v) || 0) * root.computedStyle[FONT_SIZE] * 100, PX];\n }\n else if(u === VW) {\n return [(parseFloat(v) || 0) * 0.01 * root.width, PX];\n }\n else if(u === VH) {\n return [(parseFloat(v) || 0) * 0.01 * root.height, PX];\n }\n else if(u === VMAX) {\n return [(parseFloat(v) || 0) * 0.01 * Math.max(root.width, root.height), PX];\n }\n else if(u === VMIN) {\n return [(parseFloat(v) || 0) * 0.01 * Math.min(root.width, root.height), PX];\n }\n else {\n return [parseFloat(v) || 0, PX];\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 || !GRADIENT_TYPE.hasOwnProperty(p.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][1] === b[1][1]) {\n t.push(b[1][0] - a[1][0]);\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[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 }\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// 计算两帧之间不相同的变化,存入transition,相同的忽略\nfunction calFrame(prev, next, keys, target, tagName) {\n keys.forEach(k => {\n let ts = calDiff(prev[FRAME_STYLE], next[FRAME_STYLE], k, target, tagName);\n // 可以形成过渡的才会产生结果返回\n if(ts) {\n prev[FRAME_TRANSITION].push(ts);\n }\n });\n return next;\n}\n\nfunction binarySearch(i, j, time, frames) {\n if(i === j) {\n let frame = frames[i];\n if(frame[FRAME_TIME] > time) {\n return i - 1;\n }\n return i;\n }\n else {\n let middle = i + ((j - i) >> 1);\n let frame = frames[middle];\n if(frame[FRAME_TIME] === time) {\n return middle;\n }\n else if(frame[FRAME_TIME] > time) {\n return binarySearch(i, Math.max(middle - 1, i), time, frames);\n }\n else {\n return binarySearch(Math.min(middle + 1, j), j, time, frames);\n }\n }\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 keys 所有样式key\n * @param percent 到下一帧时间的百分比\n * @param target vd\n * @returns {*}\n */\nfunction calIntermediateStyle(frame, keys, percent, target) {\n let style = cloneStyle(frame[FRAME_STYLE], keys);\n let timingFunction = getEasing(frame[FRAME_EASING]);\n if(timingFunction && timingFunction !== linear) {\n percent = timingFunction(percent);\n }\n let transition = frame[FRAME_TRANSITION];\n for(let i = 0, len = transition.length; i < len; i++) {\n let [k, v] = transition[i];\n let st = style[k];\n // transform特殊处理,只有1个matrix,有可能不存在,需给默认矩阵\n if(k === TRANSFORM) {\n if(!st) {\n st = style[k] = [[MATRIX, mx.identity()]];\n }\n for(let i = 0; i < 16; i++) {\n st[0][1][i] += v[i] * percent;\n }\n }\n // 特殊的曲线运动计算,转换为translateXY,出现在最后一定会覆盖原本的translate防重\n else if(k === TRANSLATE_PATH) {\n let t = 1 - percent;\n if(v.length === 8) {\n style[TRANSLATE_X] = [\n v[0][0] * t * t * t\n + 3 * v[2][0] * percent * t * t\n + 3 * v[4][0] * percent * percent * t\n + v[6][0] * percent * percent * percent,\n PX,\n ];\n style[TRANSLATE_Y] = [\n v[1][0] * t * t * t\n + 3 * v[3][0] * percent * t * t\n + 3 * v[5][0] * percent * percent * t\n + v[7][0] * percent * percent * percent,\n PX,\n ];\n }\n else if(v.length === 6) {\n style[TRANSLATE_X] = [\n v[0][0] * t * t\n + 2 * v[2][0] * percent * t\n + v[4][0] * percent * percent,\n PX,\n ];\n style[TRANSLATE_Y] = [\n v[1][0] * t * t\n + 3 * v[3][0] * percent * t\n + v[5][0] * percent * percent,\n PX,\n ];\n }\n }\n else if(k === ROTATE_3D) {\n st[0] += v[0] * percent;\n st[1] += v[1] * percent;\n st[2] += v[2] * percent;\n st[3][0] += v[3][0] * percent;\n }\n else if(NUM_CAL_HASH.hasOwnProperty(k)) {\n if(v) {\n st[0] += v * percent;\n }\n }\n else if(k === FILTER) {\n // 只有1个样式声明了filter另外一个为空,会造成无样式,需初始化数组并在下面计算出样式存入\n if(!st) {\n st = style[k] = [];\n }\n for(let i = 0, len = v.length; i < len; i++) {\n let item = v[i];\n if(item) {\n let k2 = st[i][0], v2 = st[i][1];\n // 只有dropShadow是多个数组,存放x/y/blur/spread/color\n if(k2 === 'dropShadow') {\n v2[0][0] += item[0] * percent;\n v2[1][0] += item[1] * percent;\n v2[2][0] += item[2] * percent;\n v2[3][0] += 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[0] += item * percent;\n }\n }\n }\n }\n else if(RADIUS_HASH.hasOwnProperty(k)) {\n for(let i = 0; i < 2; i++) {\n st[i][0] += v[i] * percent;\n }\n }\n else if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN) {\n if(v[0] !== 0) {\n st[0][0] += v[0] * percent;\n }\n if(v[1] !== 0) {\n st[1][0] += v[1] * percent;\n }\n }\n else if(k === BOX_SHADOW) {\n for(let i = 0, len = Math.min(st.length, v.length); i < len; i++) {\n // x/y/blur/spread\n for(let j = 0; j < 4; j++) {\n st[i][j] += v[i][j] * percent;\n }\n // rgba\n for(let j = 0; j < 4; j++) {\n st[i][4][j] += v[i][4][j] * percent;\n }\n }\n }\n else if(k === BACKGROUND_SIZE) {\n st.forEach((item, i) => {\n if(v[i]) {\n item[0][0] += v[i][0] * percent;\n item[1][0] += v[i][1] * percent;\n }\n });\n }\n else if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n st.forEach((item, i) => {\n if(v[i]) {\n item[0] += v[i] * percent;\n }\n });\n }\n else if(GRADIENT_HASH.hasOwnProperty(k)) {\n st.forEach((st2, i) => {\n let v2 = v[i];\n if(!v2) {\n return;\n }\n if(st2[1] === GRADIENT && GRADIENT_TYPE.hasOwnProperty(st2[0].k)) {\n st2 = st2[0];\n let [c, d, p, z] = v2;\n for(let i = 0, len = Math.min(st2.v.length, c.length); i < len; i++) {\n let a = st2.v[i];\n let b = c[i];\n a[0][0] += b[0][0] * percent;\n a[0][1] += b[0][1] * percent;\n a[0][2] += b[0][2] * percent;\n a[0][3] += b[0][3] * percent;\n if(a[1] && b[1]) {\n a[1][0] += b[1] * percent;\n }\n }\n if(st2.k === 'linear' && st2.d !== undefined && d !== undefined) {\n if(Array.isArray(d)) {\n st2.d[0] += d[0] * percent;\n st2.d[1] += d[1] * percent;\n st2.d[2] += d[2] * percent;\n st2.d[3] += d[3] * percent;\n }\n else {\n st2.d += d * percent;\n }\n }\n if(st2.k === 'radial') {\n if(st2.z !== undefined && z !== undefined) {\n st2.z[0] += z[0] * percent;\n st2.z[1] += z[1] * percent;\n st2.z[2] += z[2] * percent;\n st2.z[3] += z[3] * percent;\n st2.z[4] += z[4] * percent;\n }\n else if(st2.p !== undefined && p !== undefined) {\n st2.p[0][0] += p[0] * percent;\n st2.p[1][0] += p[1] * percent;\n }\n }\n else if(st2.k === 'conic' && st2.d !== undefined && d !== undefined) {\n st2.d += d * percent;\n st2.p[0][0] += p[0] * percent;\n st2.p[1][0] += p[1] * percent;\n }\n }\n // fill纯色\n else {\n st2 = st2[0];\n let c = v2[0];\n st2[0] += c[0] * percent;\n st2[1] += c[1] * percent;\n st2[2] += c[2] * percent;\n st2[3] += c[3] * percent;\n }\n });\n }\n // color可能超限[0,255],但浏览器已经做了限制,无需关心\n else if(COLOR_HASH.hasOwnProperty(k)) {\n st = st[0];\n st[0] += v[0] * percent;\n st[1] += v[1] * percent;\n st[2] += v[2] * percent;\n st[3] += v[3] * percent;\n }\n else if(GEOM.hasOwnProperty(k)) {\n let st = style[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 style[k] = st.map((item, i) => {\n return fn(item, v[i], percent);\n });\n }\n else {\n style[k] = 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 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] += 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) && !isNil(st2)) {\n for(let i = 0, len = Math.min(st2.length, item.length); i < len; i++) {\n let o = st2[i];\n let n = item[i];\n if(!isNil(o) && !isNil(n)) {\n st2[i] += n * percent;\n }\n }\n }\n });\n }\n else {\n v.forEach((item, i) => {\n if(!isNil(item) && !isNil(st[i])) {\n st[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] += 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] += v[0] * percent;\n }\n if(!isNil(st[1]) && !isNil(v[1])) {\n st[1] += v[1] * percent;\n }\n }\n else {\n if(!isNil(st) && !isNil(v)) {\n style[k] += v * percent;\n }\n }\n }\n }\n else if(k === OPACITY || k === Z_INDEX) {\n style[k] += v * percent;\n // 精度问题可能会超过[0,1]区间\n if(k === OPACITY) {\n if(style[k] < 0) {\n style[k] = 0;\n }\n else if(style[k] > 1) {\n style[k] = 1;\n }\n }\n }\n }\n return style;\n}\n\nfunction gotoOverload(options, cb) {\n if(isFunction(options)) {\n cb = options;\n options = {};\n }\n return [options || {}, cb];\n}\n\nfunction calDiffTime(__config, diff) {\n let playbackRate = __config[I_PLAYBACK_RATE];\n let spfLimit = __config[I_SPF_LIMIT];\n let fps = __config[I_FPS];\n let v = __config[I_CURRENT_TIME] = __config[I_NEXT_TIME];\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 __config[I_NEXT_TIME] += diff;\n return [v, diff];\n}\n\nfunction frameCb(self, __config, diff, isDelay) {\n self.emit(Event.FRAME, diff, isDelay);\n if(__config[I_FIRST_PLAY]) {\n __config[I_FIRST_PLAY] = false;\n self.emit(Event.PLAY);\n }\n let cb = __config[I_PLAY_CB];\n if(isFunction(cb)) {\n cb.call(self, diff, isDelay);\n // 清理要检查,gotoAndStop()这种cb回调中直接再次调用goto的话cb会不一致不能删除\n if(__config[I_PLAY_CB] === cb) {\n __config[I_PLAY_CB] = 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 let root = target.root;\n let config = this.__config = [\n false, // assigning\n false, // inFps\n false, // isDelay\n true, // begin\n false, // end\n false, // finished\n false, // nextBegin\n true, // firstPlay\n null, // playCb\n target,\n root,\n null, // frames\n null, // framesR\n 0, // currentTime\n 0, // nextTime\n {}, // style\n 0, // duration\n 1, // iterations\n 'none', // fill\n 1, // playbackRate\n 0, // playCount\n 'idle',\n false, // destroy\n 0, // startTime\n 0, // fpsTime\n op.easing,\n false, // enterFrame\n 0, // delay\n 0, // endDelay\n null, // keys,\n null, // originStyle,\n null, // currentFrames\n null, // currentFrame\n false, // spfLimit\n 60, // fps\n 'normal', // direction\n true, // firstEnter,\n false, // stayBegin\n false, // stayEnd\n false, // is2\n 0, // endTime\n target.__config, // nodeConfig\n root && root.__config, // rootConfig,destroy后root可能为空\n false, // outBeginDelay\n ];\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 config[I_FRAMES] = frames;\n config[I_FRAMES_R] = framesR;\n config[I_KEYS] = keys;\n config[I_ORIGIN_STYLE] = originStyle;\n if(frames.length === 2) {\n config[I_IS2] = true;\n config[I_END_TIME] = frames[1][FRAME_TIME];\n }\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 config[I_CURRENT_FRAMES] = {\n reverse: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(op.direction) ? framesR : frames;\n // 时间戳\n config[I_TIME_STAMP] = frame.__now;\n // 性能优化访问\n this[0] = this.__before;\n this[1] = this.__after;\n }\n\n __init(list, iterations, duration, easing, target) {\n if(list.length < 1) {\n return [[], [], [], {}];\n }\n // 过滤时间非法的,过滤后续offset<=前面的\n let offset = -1;\n let tagName = target.tagName;\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(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(tagName, k)) {\n originStyle[k] = props[k];\n }\n originStyle[k] = style[k];\n });\n // 再计算两帧之间的变化,存入transition属性\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, tagName);\n }\n // 反向存储帧的倒排结果\n framesR.forEach(item => {\n item[FRAME_TIME] = duration - item[FRAME_TIME];\n item[FRAME_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, tagName);\n }\n return [frames, framesR, keys, originStyle];\n }\n\n __clean(isFinish) {\n let __config = this.__config;\n this.__cancelTask();\n __config[I_NEXT_TIME] = 0;\n let restore;\n let style = __config[I_STYLE];\n let keys = __config[I_KEYS];\n let target = __config[I_TARGET];\n if(isFinish) {\n // gotoAndStop到一个很大的时间的话,也需要防止超过\n __config[I_CURRENT_TIME] = __config[I_DELAY] + __config[I_DURATION] * __config[I_ITERATIONS] + __config[I_END_DELAY];\n if(__config[I_PLAY_STATE] === 'finish') {\n return;\n }\n __config[I_PLAY_STATE] = 'finish';\n // cancel需要清除finish根据情况保留\n if(!__config[I_STAY_END]) {\n __config[I_STYLE] = {};\n restore = true;\n }\n }\n else {\n __config[I_PLAY_COUNT] = __config[I_CURRENT_TIME] = 0;\n if(__config[I_PLAY_STATE] === 'idle') {\n return;\n }\n __config[I_PLAY_STATE] = 'idle';\n __config[I_STYLE] = {};\n restore = true;\n }\n // 动画取消结束不停留在最后一帧需要还原target原本的样式,需要对比目前是否是由本动画赋值的\n if(restore) {\n keys.forEach(k => {\n if(GEOM.hasOwnProperty(k)) {\n if(target.__currentProps[k] === style[k]) {\n target.__currentProps[k] = target.props[k];\n }\n }\n else {\n if(target.__currentStyle[k] === style[k]) {\n target.__currentStyle[k] = target.style[k];\n }\n }\n });\n }\n }\n\n play(cb) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n let frames = __config[I_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 __config[I_PLAY_CB] = cb;\n __config[I_PLAY_STATE] = 'running';\n // 每次play调用标识第一次运行,需响应play事件和回调\n __config[I_FIRST_PLAY] = true;\n // 防止finish/cancel事件重复触发,每次播放重置\n this.__hasFin = false;\n this.__hasCancel = false;\n // 只有第一次调用会进初始化,另外finish/cancel视为销毁也会重新初始化\n if(!__config[I_ENTER_FRAME]) {\n __config[I_ENTER_FRAME] = true;\n let framesR = __config[I_FRAMES_R];\n let direction = __config[I_DIRECTION];\n // 初始化根据方向确定帧序列\n __config[I_CURRENT_FRAMES] = {\n reverse: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(direction) ? framesR : frames;\n __config[I_CURRENT_TIME] = __config[I_NEXT_TIME] = __config[I_FPS_TIME] = 0;\n }\n // 添加每帧回调且立刻执行,本次执行调用refreshTask也是下一帧再渲染,frame的每帧都是下一帧\n // frame.offFrame(this);\n frame.onFrame(this);\n __config[I_START_TIME] = frame.__now;\n __config[I_END] = false;\n return this;\n }\n\n __before(diff) {\n let __config = this.__config;\n __config[I_TIME_STAMP] = frame.__now;\n let target = __config[I_TARGET];\n let fps = __config[I_FPS];\n let playCount = 0;\n let currentFrames = __config[I_CURRENT_FRAMES];\n let iterations = __config[I_ITERATIONS];\n let stayBegin = __config[I_STAY_BEGIN];\n let stayEnd = __config[I_STAY_END];\n let delay = __config[I_DELAY];\n let root = __config[I_ROOT];\n let is2 = __config[I_IS2];\n let endTime = __config[I_END_TIME];\n let duration = __config[I_DURATION];\n let endDelay = __config[I_END_DELAY];\n let length = currentFrames.length;\n // 用本帧和上帧时间差,计算累加运行时间currentTime,以便定位当前应该处于哪个时刻\n let [currentTime, d] = calDiffTime(__config, diff);\n diff = d;\n // 增加的fps功能,当<60时计算跳帧,每帧运行依旧累加时间,达到fps时重置,第一帧强制不跳\n if(!__config[I_FIRST_ENTER] && fps < 60) {\n diff = __config[I_FPS_TIME] += diff;\n if(diff < 1000 / fps) {\n __config[I_IN_FPS] = true;\n return;\n }\n __config[I_FPS_TIME] = 0;\n }\n __config[I_FIRST_ENTER] = false;\n // delay仅第一次生效等待\n if(currentTime < delay) {\n if(stayBegin) {\n let currentFrame = __config[I_CURRENT_FRAME] = currentFrames[0];\n let current = currentFrame[FRAME_STYLE];\n genBeforeRefresh(current, __config[I_KEYS], __config, root, target);\n }\n __config[I_BEGIN] = false; // 默认是true,delay置false防触发\n // 即便不刷新,依旧执行帧回调,同时标明让后续第一帧响应begin\n __config[I_OUT_BEGIN_DELAY] = true;\n __config[I_IS_DELAY] = true;\n return;\n }\n // 减去delay,计算在哪一帧\n currentTime -= delay;\n if(__config[I_OUT_BEGIN_DELAY]) {\n __config[I_OUT_BEGIN_DELAY] = false;\n __config[I_BEGIN] = true;\n }\n // 超过duration非尾轮需处理回到开头,触发新一轮动画事件,这里可能时间间隔非常大直接跳过几轮\n let round;\n while(currentTime >= duration && playCount < iterations - 1) {\n currentTime -= duration;\n playCount++;\n }\n if(__config[I_PLAY_COUNT] < playCount) {\n __config[I_BEGIN] = true;\n round = true;\n }\n __config[I_PLAY_COUNT] = playCount;\n // 如果发生轮换,需重新确定正反向\n if(round) {\n let direction = __config[I_DIRECTION];\n let frames = __config[I_FRAMES];\n let framesR = __config[I_FRAMES_R];\n let isAlternate = {\n alternate: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(direction);\n // 有正反向播放需要重设帧序列\n if(isAlternate) {\n let isEven = playCount % 2 === 0;\n if(direction === 'alternate') {\n currentFrames = __config[I_CURRENT_FRAMES] = isEven ? frames : framesR;\n }\n else {\n currentFrames = __config[I_CURRENT_FRAMES] = isEven ? framesR : frames;\n }\n }\n }\n let isLastCount = playCount >= iterations - 1;\n // 只有2帧可优化,否则2分查找当前帧\n let i, frameTime;\n if(is2) {\n i = currentTime < endTime ? 0 : 1;\n frameTime = endTime;\n }\n else {\n i = binarySearch(0, length - 1, currentTime, currentFrames);\n frameTime = currentFrames[i][FRAME_TIME];\n }\n // 最后一帧结束动画,仅最后一轮才会进入,需处理endDelay\n let isLastFrame = isLastCount && i === length - 1;\n let percent = 0;\n if(isLastFrame) {\n // 无需任何处理\n }\n // 否则根据目前到下一帧的时间差,计算百分比,再反馈到变化数值上\n else if(is2) {\n percent = currentTime / duration;\n }\n else {\n let total = currentFrames[i + 1][FRAME_TIME] - frameTime;\n percent = (currentTime - frameTime) / total;\n }\n let inEndDelay, currentFrame = currentFrames[i], current;\n __config[I_CURRENT_FRAME] = currentFrame;\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 if(isLastFrame) {\n inEndDelay = currentTime < duration + endDelay;\n // 停留对比最后一帧,endDelay可能会多次进入这里,第二次进入样式相等不再重绘\n if(stayEnd) {\n current = cloneStyle(currentFrame[FRAME_STYLE], __config[I_KEYS]);\n }\n // 不停留或超过endDelay则计算还原,有endDelay且fill模式不停留会再次进入这里\n else {\n current = cloneStyle(__config[I_ORIGIN_STYLE], __config[I_KEYS]);\n }\n // 进入endDelay或结束阶段触发end事件,注意只触发一次,防重在触发的地方做\n __config[I_NEXT_END] = true;\n if(!inEndDelay) {\n __config[I_PLAY_COUNT]++;\n __config[I_FINISHED] = true;\n frame.offFrame(this);\n needClean = true;\n __config[I_NEXT_TIME] = 0;\n }\n }\n else {\n current = calIntermediateStyle(currentFrame, __config[I_KEYS], percent, target);\n }\n // 无论两帧之间是否有变化,都生成计算结果赋给style,去重在root做\n genBeforeRefresh(current, __config[I_KEYS], __config, root, target);\n if(needClean) {\n let playCb = __config[I_PLAY_CB];\n this.__clean(true);\n // 丑陋的做法,防止gotoAndStop()这样的cb被clean()掉\n if(playCb) {\n __config[I_PLAY_CB] = playCb;\n }\n }\n }\n\n __after(diff) {\n let __config = this.__config;\n __config[I_ASSIGNING] = false;\n if(__config[I_IN_FPS]) {\n __config[I_IN_FPS] = false;\n return;\n }\n frameCb(this, __config, diff, __config[I_IS_DELAY]);\n __config[I_IS_DELAY] = false;\n if(__config[I_BEGIN]) {\n __config[I_BEGIN] = false;\n this.emit(Event.BEGIN, __config[I_PLAY_COUNT]);\n }\n // end事件只触发一次,末轮进入endDelay或直接结束时\n if(__config[I_NEXT_END] && !__config[I_END]) {\n __config[I_END] = true;\n this.emit(Event.END, __config[I_PLAY_COUNT] - 1);\n }\n if(__config[I_FINISHED]) {\n __config[I_BEGIN] = __config[I_END] = __config[I_IS_DELAY] = __config[I_FINISHED]\n = __config[I_IN_FPS] = __config[I_ENTER_FRAME] = false;\n __config[I_PLAY_STATE] = 'finished';\n this.emit(Event.FINISH);\n }\n }\n\n pause(silence) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let { pending } = this;\n if(isDestroyed || duration <= 0 || pending) {\n return this;\n }\n __config[I_PLAY_STATE] = 'paused';\n this.__cancelTask();\n if(!silence) {\n this.emit(Event.PAUSE);\n }\n return this;\n }\n\n resume(cb) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n if(isDestroyed || duration <= 0 || playState !== 'paused') {\n return this;\n }\n return this.play(cb);\n }\n\n finish(cb) {\n let self = this;\n let __config = self.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n let frames = __config[I_FRAMES];\n if(isDestroyed || duration <= 0 || frames.length < 1 || playState === 'finished' || playState === 'idle') {\n return self;\n }\n // 先清除所有回调任务,多次调用finish也会清除只留最后一次\n self.__cancelTask();\n let root = __config[I_ROOT];\n let originStyle = __config[I_ORIGIN_STYLE];\n if(root) {\n let current;\n // 停留在最后一帧\n if(__config[I_STAY_END]) {\n __config[I_CURRENT_FRAME] = frames[frames.length - 1];\n current = frames[frames.length - 1][FRAME_STYLE];\n }\n else {\n current = originStyle;\n }\n root.addRefreshTask({\n __before() {\n __config[I_ASSIGNING] = true;\n genBeforeRefresh(current, __config[I_KEYS], __config, root, __config[I_TARGET]);\n self.__clean(true);\n },\n __after(diff) {\n if(!self.__hasFin) {\n self.__hasFin = true;\n __config[I_ASSIGNING] = false;\n frameCb(self, __config, diff);\n __config[I_BEGIN] = __config[I_END] = __config[I_IS_DELAY] = __config[I_FINISHED]\n = __config[I_IN_FPS] = __config[I_ENTER_FRAME] = false;\n self.emit(Event.FINISH);\n }\n if(isFunction(cb)) {\n cb.call(self, diff);\n }\n },\n });\n }\n return self;\n }\n\n cancel(cb) {\n let self = this;\n let __config = self.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n let frames = __config[I_FRAMES];\n if(isDestroyed || duration <= 0 || playState === 'idle' || frames.length < 1) {\n return self;\n }\n self.__cancelTask();\n let root = __config[I_ROOT];\n let originStyle = __config[I_ORIGIN_STYLE];\n if(root) {\n root.addRefreshTask({\n __before() {\n __config[I_ASSIGNING] = true;\n genBeforeRefresh(originStyle, __config[I_KEYS], __config, root, __config[I_TARGET]);\n self.__clean();\n },\n __after(diff) {\n if(!self.__hasCancel) {\n self.__hasCancel = true;\n __config[I_ASSIGNING] = false;\n frameCb(self, __config, diff);\n __config[I_BEGIN] = __config[I_END] = __config[I_IS_DELAY] = __config[I_FINISHED]\n = __config[I_IN_FPS] = __config[I_ENTER_FRAME] = false;\n self.emit(Event.CANCEL);\n }\n if(isFunction(cb)) {\n cb.call(self, diff);\n }\n },\n });\n }\n return self;\n }\n\n gotoAndPlay(v, options, cb) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let frames = __config[I_FRAMES];\n let delay = __config[I_DELAY];\n let endDelay = __config[I_END_DELAY];\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 __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let frames = __config[I_FRAMES];\n let delay = __config[I_DELAY];\n let endDelay = __config[I_END_DELAY];\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(diff => {\n __config[I_PLAY_STATE] = 'paused';\n this.__cancelTask();\n if(isFunction(cb)) {\n cb.call(this, diff);\n }\n });\n }\n\n // 同步赋予,用在extendAnimate\n assignCurrentStyle() {\n let __config = this.__config;\n let style = __config[I_STYLE];\n let target = __config[I_TARGET];\n let keys = __config[I_KEYS];\n keys.forEach(i => {\n if(style.hasOwnProperty(i)) {\n let v = style[i];\n // geom的属性变化\n if(GEOM.hasOwnProperty(i)) {\n target.currentProps[i] = v;\n }\n // 样式\n else {\n // 将动画样式直接赋给currentStyle\n target.currentStyle[i] = v;\n }\n }\n });\n }\n\n // 返回不包含delay且去除多轮的时间\n __goto(v, isFrame, excludeDelay) {\n let __config = this.__config;\n let iterations = __config[I_ITERATIONS];\n let duration = __config[I_DURATION];\n __config[I_PLAY_STATE] = '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 += __config[I_DELAY];\n }\n // 在时间范围内设置好时间,复用play直接跳到播放点\n __config[I_NEXT_TIME] = v;\n v -= __config[I_DELAY];\n // 超过时间长度需要累加次数,这里可以超过iterations,因为设定也许会非常大\n let playCount = 0;\n while(v >= duration && playCount < iterations - 1) {\n playCount++;\n v -= duration;\n }\n __config[I_PLAY_COUNT] = playCount;\n // 防止play()重置时间和当前帧组,提前计算好\n __config[I_ENTER_FRAME] = true;\n let frames = __config[I_FRAMES];\n let framesR = __config[I_FRAMES_R];\n let direction = __config[I_DIRECTION];\n if({\n alternate: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(direction)) {\n let isEven = playCount % 2 === 0;\n if(direction === 'alternate') {\n __config[I_CURRENT_FRAMES] = isEven ? frames : framesR;\n }\n else {\n __config[I_CURRENT_FRAMES] = 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 __stayBegin() {\n return {\n backwards: true,\n both: true,\n }.hasOwnProperty(this.fill);\n }\n\n __stayEnd() {\n return {\n forwards: true,\n both: true,\n }.hasOwnProperty(this.fill);\n }\n\n __setTarget(target) {\n this.__target = target;\n this.__config[I_TARGET] = target;\n this.__config[I_NODE_CONFIG] = target.__config;\n }\n\n __cancelTask() {\n frame.offFrame(this);\n this.__config[I_PLAY_CB] = null;\n }\n\n __destroy(sync) {\n let self = this;\n let __config = self.__config;\n if(__config[I_DESTROYED]) {\n return;\n }\n self.removeControl();\n // clean异步执行,因为里面的样式还原需要等到下一帧,否则同步执行清除后,紧接着的新同步动画获取不到currentStyle\n if(sync) {\n self.__clean();\n __config[I_TARGET] = null;\n }\n else {\n frame.nextFrame({\n __before() {\n self.__clean();\n __config[I_TARGET] = null;\n },\n });\n }\n __config[I_START_TIME] = 0;\n __config[I_DESTROYED] = true;\n }\n\n __checkModify() {\n let __config = this.__config;\n if(__config[I_PLAY_STATE] !== 'idle' && __config[I_PLAY_STATE] !== '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.__config[I_TARGET];\n }\n\n get root() {\n return this.__config[I_ROOT];\n }\n\n get keys() {\n return this.__config[I_KEYS];\n }\n\n get style() {\n return this.__config[I_STYLE];\n }\n\n get options() {\n return this.__options;\n }\n\n get duration() {\n return this.__config[I_DURATION];\n }\n\n set duration(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_DURATION] !== v) {\n __config[I_DURATION] = v;\n __config[I_END_TIME] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get delay() {\n return this.__config[I_DELAY];\n }\n\n set delay(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_DELAY] !== v) {\n __config[I_DELAY] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get endDelay() {\n return this.__config[I_END_DELAY];\n }\n\n set endDelay(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_END_DELAY] !== v) {\n __config[I_END_DELAY] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get fps() {\n return this.__config[I_FPS];\n }\n\n set fps(v) {\n v = parseInt(v) || 60;\n let __config = this.__config;\n if(__config[I_FPS] !== v) {\n if(v <= 0) {\n v = 60;\n }\n __config[I_FPS] = v;\n }\n return v;\n }\n\n get spf() {\n return 1 / this.fps;\n }\n\n get iterations() {\n return this.__config[I_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 let __config = this.__config;\n if(__config[I_ITERATIONS] !== v) {\n __config[I_ITERATIONS] = v;\n }\n return v;\n }\n\n get fill() {\n return this.__config[I_FILL];\n }\n\n set fill(v) {\n v = v || 'none';\n let __config = this.__config;\n if(__config[I_FILL] !== v) {\n __config[I_FILL] = v;\n this.__checkModify();\n }\n __config[I_STAY_BEGIN] = {\n backwards: true,\n both: true,\n }.hasOwnProperty(v);\n __config[I_STAY_END] = {\n forwards: true,\n both: true,\n }.hasOwnProperty(v);\n return v;\n }\n\n get direction() {\n return this.__config[I_DIRECTION];\n }\n\n set direction(v) {\n v = v || 'normal';\n let __config = this.__config;\n if(__config[I_DIRECTION] !== v) {\n __config[I_DIRECTION] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get frames() {\n return this.__config[I_FRAMES];\n }\n\n get framesR() {\n return this.__config[I_FRAMES_R];\n }\n\n get playbackRate() {\n return this.__config[I_PLAYBACK_RATE];\n }\n\n set playbackRate(v) {\n v = parseFloat(v) || 1;\n if(v <= 0) {\n v = 1;\n }\n let __config = this.__config;\n if(__config[I_PLAYBACK_RATE] !== v) {\n __config[I_PLAYBACK_RATE] = v;\n }\n return v;\n }\n\n get easing() {\n return this.__config[I_EASING];\n }\n\n get startTime() {\n return this.__config[I_START_TIME];\n }\n\n get currentTime() {\n return this.__config[I_CURRENT_TIME];\n }\n\n set currentTime(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_CURRENT_TIME] !== v) {\n __config[I_CURRENT_TIME] = v;\n __config[I_NEXT_TIME] = v;\n }\n return v;\n }\n\n get nextTime() {\n return this.__config[I_NEXT_TIME];\n }\n\n set nextTime(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_NEXT_TIME] !== v) {\n __config[I_NEXT_TIME] = v;\n }\n return v;\n }\n\n get timestamp() {\n return this.__config[I_TIME_STAMP];\n }\n\n get pending() {\n return this.__config[I_PLAY_STATE] !== 'running';\n }\n\n get finished() {\n return this.__config[I_PLAY_STATE] === 'finished';\n }\n\n get playState() {\n return this.__config[I_PLAY_STATE];\n }\n\n get playCount() {\n return this.__config[I_PLAY_COUNT];\n }\n\n set playCount(v) {\n v = Math.max(0, parseInt(v) || 0);\n let __config = this.__config;\n if(__config[I_PLAY_COUNT] !== v) {\n __config[I_PLAY_COUNT] = v;\n }\n return v;\n }\n\n get isDestroyed() {\n return this.__config[I_DESTROYED];\n }\n\n get animating() {\n let __config = this.__config;\n let playState = __config[I_PLAY_STATE];\n if(playState === 'idle') {\n return false;\n }\n return playState !== 'finished' || __config[I_STAY_END] || __config[I_STAY_BEGIN];\n }\n\n get spfLimit() {\n let __config = this.__config;\n return __config[I_SPF_LIMIT];\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 let __config = this.__config;\n if(__config[I_SPF_LIMIT] !== v) {\n __config[I_SPF_LIMIT] = v;\n }\n return v;\n }\n\n get assigning() {\n return this.__config[I_ASSIGNING];\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';\nimport enums from '../util/enums';\n\nconst {\n NODE_KEY: {\n NODE_DEFS_CACHE,\n }\n} = enums;\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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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 MBM_HASH = {\n multiply: true,\n screen: true,\n overlay: true,\n darken: true,\n lighten: true,\n colorDodge: true,\n colorBurn: true,\n hardLight: true,\n softLight: true,\n difference: true,\n exclusion: true,\n hue: true,\n saturation: true,\n color: true,\n luminosity: true,\n};\n\nfunction mbmName(v) {\n if(v) {\n return v.replace(/[A-Z]/, function($0) {\n return '-' + $0.toLowerCase();\n });\n }\n}\n\nfunction isValidMbm(v) {\n return MBM_HASH.hasOwnProperty(v);\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 Cache from '../refresh/Cache';\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 { LOCAL } = Cache;\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 UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_FOCUS,\n UPDATE_STYLE,\n UPDATE_OVERWRITE,\n UPDATE_KEYS,\n UPDATE_CONFIG,\n UPDATE_REMOVE_DOM,\n },\n STRUCT_KEY: {\n STRUCT_HAS_MASK,\n },\n NODE_KEY: {\n NODE_TAG_NAME,\n NODE_CACHE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_STYLE,\n NODE_STRUCT,\n NODE_OPACITY,\n NODE_MATRIX_EVENT,\n NODE_MATRIX,\n NODE_LIMIT_CACHE,\n NODE_HAS_CONTENT,\n NODE_REFRESH_LV,\n NODE_CACHE,\n NODE_CACHE_TOTAL,\n NODE_CACHE_FILTER,\n NODE_CACHE_MASK,\n NODE_CACHE_OVERFLOW,\n NODE_IS_DESTROYED,\n NODE_DEFS_CACHE,\n NODE_DOM_PARENT,\n NODE_IS_INLINE,\n NODE_PERSPECTIVE_MATRIX,\n NODE_IS_MASK,\n NODE_VIRTUAL_DOM,\n NODE_CACHE_AS_BITMAP,\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 NONE,\n TRANSFORM: TF,\n REFLOW,\n REPAINT,\n TRANSLATE_X: TX,\n TRANSLATE_Y: TY,\n TRANSLATE_Z: TZ,\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.__config[NODE_IS_INLINE]) {\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 let isMask = this.__isMask = isClip || !!this.props.mask;\n let config = this.__config;\n config[NODE_TAG_NAME] = tagName;\n config[NODE_CACHE_STYLE] = this.__cacheStyle;\n config[NODE_CURRENT_STYLE] = this.__currentStyle;\n config[NODE_COMPUTED_STYLE] = this.__computedStyle;\n config[NODE_REFRESH_LV] = REFLOW;\n config[NODE_STYLE] = this.__style;\n config[NODE_MATRIX] = [];\n config[NODE_MATRIX_EVENT] = [];\n config[NODE_DEFS_CACHE] = this.__cacheDefs;\n config[NODE_IS_MASK] = isMask;\n this.__frameAnimateList = [];\n this.__contentBoxList = []; // inline存储内容用\n // this.__json domApi需要获取生成时的json引用,builder过程添加,如appendChild时json也需要跟着变更\n config[NODE_CACHE_AS_BITMAP] = this.__cacheAsBitmap = !!this.props.cacheAsBitmap;\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(i, lv, j) {\n let res = super.__structure(i, lv, j);\n if(this.__hasMask) {\n res[STRUCT_HAS_MASK] = this.__hasMask;\n }\n this.__config[NODE_STRUCT] = res;\n return res;\n }\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[1] === PX) {\n return v[0];\n }\n else if(v[1] === PERCENT && includePercent) {\n return v[0] * w * 0.01;\n }\n else if(v[1] === REM) {\n return v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n return v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n return v[0] * this.root.height * 0.01;\n }\n else if(v[1] === VMAX) {\n return v[0] * Math.max(this.root.width, this.root.height) * 0.01;\n }\n else if(v[1] === VMIN) {\n return v[0] * 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, 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[1] === INHERIT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : parentComputedStyle[k];\n }\n else {\n computedStyle[k] = v[0];\n let ff = v[0].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[1] === INHERIT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : parentComputedStyle[k];\n }\n // 只有fontSize会有%\n else if(v[1] === PERCENT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (parentComputedStyle[k] * v[0] * 0.01);\n }\n else if(v[1] === REM) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (this.root.computedStyle[FONT_SIZE] * v[0]);\n }\n else if(v[1] === VW) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (this.root.width * 0.01 * v[0]);\n }\n else if(v[1] === VH) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (this.root.height * 0.01 * v[0]);\n }\n else if(v[1] === VMAX) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (Math.max(this.root.width, this.root.height) * 0.01 * v[0]);\n }\n else if(v[1] === VMIN) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (Math.min(this.root.width, this.root.height) * 0.01 * v[0]);\n }\n else {\n computedStyle[k] = v[0];\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[1] === INHERIT) {\n computedStyle[TEXT_ALIGN] = isRoot ? 'left' : parentComputedStyle[TEXT_ALIGN];\n }\n else {\n computedStyle[TEXT_ALIGN] = textAlign[0];\n }\n let fontSize = computedStyle[FONT_SIZE];\n let lineHeight = currentStyle[LINE_HEIGHT];\n // lineHeight继承很特殊,数字和normal不同于普通单位\n if(lineHeight[1] === 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[1] !== INHERIT) {\n break;\n }\n p = p.domParent;\n }\n // 到root还是inherit或normal,或者中途遇到了normal,使用normal\n if([AUTO, INHERIT].indexOf(ph[1]) > -1) {\n computedStyle[LINE_HEIGHT] = calNormalLineHeight(computedStyle);\n }\n // 数字继承\n else if(ph[1] === NUMBER) {\n computedStyle[LINE_HEIGHT] = Math.max(ph[0], 0) * fontSize;\n }\n // 单位继承\n else {\n computedStyle[LINE_HEIGHT] = parentComputedStyle[LINE_HEIGHT];\n }\n }\n }\n else if(lineHeight[1] === NUMBER) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight[0], 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[1] === 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[1] === INHERIT) {\n computedStyle[WHITE_SPACE] = isRoot ? 'normal' : parentComputedStyle[WHITE_SPACE];\n }\n else {\n computedStyle[WHITE_SPACE] = whiteSpace[0];\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, __config } = node;\n if(!root) {\n return;\n }\n let v = currentStyle[FONT_FAMILY];\n if(v[1] === INHERIT) {\n return;\n }\n let ff = v[0].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.addRefreshTask({\n __before() {\n if(__config[NODE_IS_DESTROYED]) {\n return;\n }\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_FOCUS] = level.REFLOW; // 强制执行\n res[UPDATE_CONFIG] = __config;\n root.__addUpdate(node, __config, root, root.__config, res);\n },\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 // absolute且无尺寸时,isAbs标明先假布局一次计算尺寸,还有flex列计算时isColumn假布局,flex横计算时writingMode垂直假布局\n __layout(data, isAbs, isColumn, isRow) {\n this.__computeReflow();\n let { w } = data;\n let { isDestroyed, currentStyle, computedStyle, __config, __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,\n h: data.h,\n lx: data.lx,\n ly: data.ly,\n isUpright: data.isUpright, // 从Root开始,父级的书写模式需每层传递\n };\n // 防止display:none不统计mask,isVirtual忽略,abs/flex布局后续会真正来走一遍\n if(!isAbs && !isColumn && !isRow) {\n this.clearCache();\n __config[NODE_REFRESH_LV] = REFLOW;\n __config[NODE_LIMIT_CACHE] = false;\n __config[NODE_IS_INLINE] = 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.__width = this.__height\n = this.__clientWidth = this.__clientHeight\n = this.__offsetWidth = this.__offsetHeight\n = this.__outerWidth = this.__outerHeight\n = computedStyle[WIDTH] = computedStyle[HEIGHT] = 0;\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, 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 // relative渲染时做偏移,百分比基于父元素,若父元素没有定高则为0\n if(!isAbs && !isColumn && !isRow) {\n if(position === 'relative') {\n let {[TOP]: top, [RIGHT]: right, [BOTTOM]: bottom, [LEFT]: left} = currentStyle;\n let {parent} = this;\n if(top[1] !== AUTO) {\n let n = calRelative(currentStyle, TOP, top, parent);\n this.__offsetY(n);\n computedStyle[TOP] = n;\n computedStyle[BOTTOM] = 'auto';\n }\n else if(bottom[1] !== AUTO) {\n let n = calRelative(currentStyle, BOTTOM, bottom, parent);\n this.__offsetY(-n);\n computedStyle[BOTTOM] = n;\n computedStyle[TOP] = 'auto';\n }\n else {\n computedStyle[TOP] = computedStyle[BOTTOM] = 'auto';\n }\n if(left[1] !== AUTO) {\n let n = calRelative(currentStyle, LEFT, left, parent, true);\n this.__offsetX(n);\n computedStyle[LEFT] = n;\n computedStyle[RIGHT] = 'auto';\n }\n else if (right[1] !== AUTO) {\n let n = calRelative(currentStyle, RIGHT, right, parent, true);\n this.__offsetX(-n);\n computedStyle[RIGHT] = n;\n computedStyle[LEFT] = 'auto';\n }\n else {\n computedStyle[LEFT] = computedStyle[RIGHT] = 'auto';\n }\n }\n else if (position !== 'absolute') {\n computedStyle[TOP] = computedStyle[BOTTOM] = computedStyle[LEFT] = computedStyle[RIGHT] = 'auto';\n }\n // 计算结果存入computedStyle和6个坐标,inline在其inlineSize特殊处理\n let x = this.__sx = this.x + this.ox;\n let y = this.__sy = this.y + this.oy;\n if(!__config[NODE_IS_INLINE]) {\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 __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 let { computedStyle } = this;\n computedStyle[DISPLAY] = 'none';\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 = 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 } = 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 {\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[1] !== AUTO && !isInline) {\n fixedWidth = true;\n w = this.__calSize(width, w, true);\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 else if(height[1] !== AUTO && !isInline) {\n fixedHeight = true;\n h = this.__calSize(height, h, true);\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[1] === AUTO || w3 !== undefined) {\n w -= borderLeftWidth + borderRightWidth + marginLeft + marginRight + paddingLeft + paddingRight;\n }\n if(height[1] === 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[1] !== AUTO || this.isReplaced) && marginTop[1] === AUTO && marginBottom[1] === AUTO) {\n let oh = this.outerHeight;\n if(oh < data.h) {\n this.__offsetY((data.h - oh) * 0.5, true);\n }\n }\n }\n else {\n if((width[1] !== AUTO || this.isReplaced) && marginLeft[1] === AUTO && marginRight[1] === AUTO) {\n let ow = this.outerWidth;\n if(ow < data.w) {\n this.__offsetX((data.w - ow) * 0.5, true);\n }\n }\n }\n }\n }\n\n __calMatrix(lv, __cacheStyle, currentStyle, computedStyle, __config, sx1, sy1, offsetWidth, offsetHeight) {\n if(__config[NODE_IS_INLINE]) {\n computedStyle[TRANSFORM_ORIGIN] = [sx1, sy1];\n return __cacheStyle[MATRIX] = mx.identity();\n }\n let matrixCache = __cacheStyle[MATRIX];\n // tx/ty变化特殊优化\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 // 不访问this.offsetWidth性能提升,暂时性\n else if(v[1] === PX) {\n v = v[0];\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[1] === PX) {\n v = v[0];\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(sx1 === undefined) {\n sx1 = this.__sx1;\n sy1 = this.__sy1;\n offsetWidth = this.offsetWidth;\n offsetHeight = this.offsetHeight;\n }\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]) {\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][0]];\n if(v[3][0] === 0) {\n return;\n }\n temp.push([k, v]);\n return;\n }\n computedStyle[k] = v[0];\n if(k === ROTATE_X || k === ROTATE_Y || k === ROTATE_Z) {\n temp.push([k, v]);\n return;\n }\n // scale为1和其它为0避免计算浪费\n let isScale = k === SCALE_X || k === SCALE_Y || k === SCALE_Z;\n if(v[0] === 1 && isScale || !isScale && v[0] === 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 matrixCache;\n }\n\n /**\n * 将currentStyle计算为computedStyle,同时存入cacheStyle可缓存的结果防止无变更重复计算\n * @param renderMode\n * @param ctx\n * @param parent\n * @param __cacheStyle\n * @param currentStyle\n * @param computedStyle\n * @param clientWidth\n * @param clientHeight\n * @param offsetWidth\n * @param offsetHeight\n * @param borderTopWidth\n * @param borderRightWidth\n * @param borderBottomWidth\n * @param borderLeftWidth\n * @param paddingTop\n * @param paddingRight\n * @param paddingBottom\n * @param paddingLeft\n * @param x1\n * @param x2\n * @param x3\n * @param x4\n * @param x5\n * @param x6\n * @param y1\n * @param y2\n * @param y3\n * @param y4\n * @param y5\n * @param y6\n * @returns {*[]}\n * @private\n */\n __calCache(renderMode, ctx, parent, __cacheStyle, currentStyle, computedStyle,\n clientWidth, clientHeight, offsetWidth, offsetHeight,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth,\n paddingTop, paddingRight, paddingBottom, paddingLeft,\n x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6) {\n let bx1 = x1, by1 = y1, bx2 = x6, by2 = y6;\n let backgroundClip = computedStyle[BACKGROUND_CLIP] = currentStyle[BACKGROUND_CLIP];\n // 默认border-box\n if(backgroundClip === 'paddingBox') {\n bx1 = x2;\n by1 = y2;\n bx2 = x5;\n by2 = y5;\n }\n else if(backgroundClip === 'contentBox') {\n bx1 = x3;\n by1 = y3;\n bx2 = x4;\n by2 = y4;\n }\n let isInline = this.__config[NODE_IS_INLINE];\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 __cacheStyle[FILTER] = true;\n this.__calFilter(currentStyle, computedStyle);\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[1] === PERCENT) {\n return item[0] + '%';\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[1] === PERCENT) {\n return item[0] + '%';\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[1] === AUTO) {\n return -1;\n }\n else if(item2[1] === STRING) {\n return item2[0] === '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[0];\n }\n return null;\n });\n __cacheStyle[BACKGROUND_IMAGE] = bgI.map((bgi, i) => {\n if(!bgi) {\n return null;\n }\n // 防止隐藏不加载背景图\n if(bgi[1] === STRING) {\n let loadBgi = this.__loadBgi[i] = this.__loadBgi[i] || {};\n let cache = inject.IMG[bgi[0]];\n if(cache && cache.state === inject.LOADED) {\n loadBgi.url = bgi[0];\n loadBgi.source = cache.source;\n loadBgi.width = cache.width;\n loadBgi.height = cache.height;\n }\n else if(loadBgi.url !== bgi[0]) {\n // 可能改变导致多次加载,每次清空,成功后还要比对url是否相同\n loadBgi.url = bgi[0];\n loadBgi.source = null;\n let node = this;\n let root = node.root;\n inject.measureImg(bgi[0], 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 root.delRefreshTask(loadBgi.cb);\n root.addRefreshTask(loadBgi.cb = {\n __before() {\n __cacheStyle[BACKGROUND_IMAGE] = undefined;\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_FOCUS] = REPAINT;\n res[UPDATE_CONFIG] = node.__config;\n root.__addUpdate(node, node.__config, root, root.__config, res);\n },\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[0] && bgi[1] === 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][0]);\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(offsetWidth, 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 ['Top', 'Right', 'Bottom', 'Left'].forEach(k => {\n k = 'border' + k;\n let k2 = STYLE_KEY[style2Upper(k)];\n let kw = STYLE_KEY[style2Upper(k + 'Width')];\n let ks = STYLE_KEY[style2Upper(k + 'Style')];\n // width/style变更影响border重新计算\n if(isNil(__cacheStyle[kw])) {\n __cacheStyle[kw] = true;\n __cacheStyle[k2] = undefined;\n }\n if(isNil(__cacheStyle[ks])) {\n __cacheStyle[ks] = true;\n __cacheStyle[k2] = undefined;\n }\n if(isNil(__cacheStyle[k2])) {\n if(k2 === BORDER_TOP) {\n if(borderTopWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderTopWidth / borderLeftWidth);\n let deg2 = Math.atan(borderTopWidth / borderRightWidth);\n __cacheStyle[k2] = border.calPoints(borderTopWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 0, btlr, btrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_RIGHT) {\n if(borderRightWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderRightWidth / borderTopWidth);\n let deg2 = Math.atan(borderRightWidth / borderBottomWidth);\n __cacheStyle[k2] = border.calPoints(borderRightWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 1, btrr, bbrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_BOTTOM) {\n if(borderBottomWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderBottomWidth / borderLeftWidth);\n let deg2 = Math.atan(borderBottomWidth / borderRightWidth);\n __cacheStyle[k2] = border.calPoints(borderBottomWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 2, bblr, bbrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_LEFT) {\n if(borderLeftWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderLeftWidth / borderTopWidth);\n let deg2 = Math.atan(borderLeftWidth / borderBottomWidth);\n __cacheStyle[k2] = border.calPoints(borderLeftWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 3, btlr, bblr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n }\n });\n // 强制计算继承性的\n let parentComputedStyle = parent && parent.computedStyle;\n if(currentStyle[FONT_STYLE][1] === 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][0];\n }\n __cacheStyle[FONT_STYLE] = computedStyle[FONT_STYLE];\n let color = currentStyle[COLOR];\n if(color[1] === 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[1] === GRADIENT) {\n __cacheStyle[COLOR] = computedStyle[COLOR] = color[0];\n }\n else if(color[1] === RGBA) {\n __cacheStyle[COLOR] = int2rgba(computedStyle[COLOR] = rgba2int(color[0]));\n }\n }\n let textStrokeColor = currentStyle[TEXT_STROKE_COLOR];\n if(textStrokeColor[1] === 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[1] === GRADIENT) {\n __cacheStyle[TEXT_STROKE_COLOR] = computedStyle[TEXT_STROKE_COLOR] = textStrokeColor[0];\n }\n else if(textStrokeColor[1] === RGBA) {\n __cacheStyle[TEXT_STROKE_COLOR] = int2rgba(computedStyle[TEXT_STROKE_COLOR] = rgba2int(textStrokeColor[0]));\n }\n }\n if(currentStyle[TEXT_STROKE_WIDTH][1] === 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[1] === REM) {\n v = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * this.root.height * 0.01;\n }\n else if(v[1] === VMAX) {\n v = v[0] * Math.max(this.root.width, this.root.height) * 0.01;\n }\n else if(v[1] === VMIN) {\n v = v[0] * Math.min(this.root.width, this.root.height) * 0.01;\n }\n else {\n v = v[0];\n }\n computedStyle[TEXT_STROKE_WIDTH] = v;\n __cacheStyle[TEXT_STROKE_WIDTH] = true;\n }\n if(currentStyle[TEXT_STROKE_OVER][1] === 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][0];\n }\n if(currentStyle[VISIBILITY][1] === INHERIT) {\n computedStyle[VISIBILITY] = parent ? parentComputedStyle[VISIBILITY] : 'visible';\n }\n else if(isNil(__cacheStyle[VISIBILITY])) {\n computedStyle[VISIBILITY] = currentStyle[VISIBILITY][0];\n }\n __cacheStyle[VISIBILITY] = computedStyle[VISIBILITY];\n if(currentStyle[POINTER_EVENTS][1] === 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][0];\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(__cacheStyle, currentStyle, computedStyle, __config, sx1, sy1) {\n let rebuild;\n if(isNil(__cacheStyle[PERSPECTIVE])) {\n __cacheStyle[PERSPECTIVE] = true;\n rebuild = true;\n let v = currentStyle[PERSPECTIVE];\n let ppt = this.__calSize(v, this.clientWidth, true);\n computedStyle[PERSPECTIVE] = ppt;\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 if(rebuild) {\n if(sx1 === undefined) {\n sx1 = this.__sx1;\n sy1 = this.__sy1;\n }\n let po = computedStyle[PERSPECTIVE_ORIGIN].slice(0);\n po[0] += sx1 || 0;\n po[1] += sy1 || 0;\n __config[NODE_PERSPECTIVE_MATRIX] = tf.calPerspectiveMatrix(computedStyle[PERSPECTIVE], po);\n }\n }\n\n __calFilter(currentStyle, computedStyle) {\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, v2];\n }\n else {\n // 部分%单位的滤镜强制使用数字\n if(v[1] === DEG || v[1] === PERCENT || v[1] === NUMBER) {\n v = v[0];\n }\n else {\n v = this.__calSize(v, this.root.width, false);\n }\n return [k, v];\n }\n });\n }\n\n __calContent(renderMode, lv, currentStyle, computedStyle) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n if(lv < REPAINT) {\n return this.__hasContent;\n }\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 true;\n }\n }\n }\n if(currentStyle[BACKGROUND_COLOR][0][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 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')]][0][3] > 0) {\n return 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 true;\n }\n }\n }\n }\n }\n return false;\n }\n\n /**\n * 渲染基础方法,Dom/Geom公用\n * @param renderMode\n * @see node/mode\n * @param lv\n * @see refresh/level\n * @param ctx canvas/svg/webgl共用\n * @param cache 是否是局部根节点缓存模式下的绘制\n * @see refresh/Cache.NA\n * @param dx cache时偏移x\n * @param dy cache时偏移y\n * @return Object\n * x1/x2/x3/x4/y1/y2/y3/y4 坐标\n * break svg判断无变化提前跳出\n * cacheError 离屏申请失败,仅canvas\n * offscreenBlend 无cache时的离屏canvas,仅canvas\n * offscreenFilter 无cache时的离屏canvas,仅canvas\n * offscreenOverflow 无cache时的离屏canvas,仅canvas\n * offscreenMask 无cache时的离屏canvas,仅canvas\n */\n render(renderMode, lv, ctx, cache, dx = 0, dy = 0) {\n let {\n isDestroyed,\n root,\n __config,\n } = this;\n let __cache = __config[NODE_CACHE];\n let __cacheStyle = __config[NODE_CACHE_STYLE];\n let currentStyle = __config[NODE_CURRENT_STYLE];\n let computedStyle = __config[NODE_COMPUTED_STYLE];\n // 渲染完认为完全无变更,等布局/动画/更新重置\n __config[NODE_REFRESH_LV] = NONE;\n // >=REPAINT清空bbox\n if(lv >= REPAINT) {\n this.__bbox = null;\n this.__filterBbox = null;\n }\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, __config, 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 __config[NODE_DEFS_CACHE].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 __config[NODE_DEFS_CACHE].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, __config, false, dx, dy);\n }\n }\n else if(bgi.k) {\n let gd = this.__gradient(renderMode, ctx, bx1, by1, bx2, by2, bgi, dx, dy);\n if(gd) {\n if(gd.k === 'conic') {\n gradient.renderConic(this, renderMode, ctx, gd.v, bx1, by1, bx2 - bx1, by2 - by1,\n btlr, btrr, bbrr, bblr);\n }\n else {\n bg.renderBgc(this, renderMode, ctx, gd.v, borderList,\n bx1, by1, bx2 - bx1, by2 - by1, btlr, btrr, bbrr, bblr, 'fill', false, dx, dy);\n }\n }\n }\n });\n }\n // boxShadow可能会有多个\n if(boxShadow) {\n boxShadow.forEach(item => {\n bs.renderBoxShadow(this, renderMode, ctx, item, x1, y1, x6, y6, x6 - x1, y6 - y1, dx, dy);\n });\n }\n // 边框需考虑尖角,两条相交边平分45°夹角\n if(borderTopWidth > 0 && borderTopColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_TOP], __cacheStyle[BORDER_TOP_COLOR], dx, dy);\n }\n if(borderRightWidth > 0 && borderRightColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_RIGHT], __cacheStyle[BORDER_RIGHT_COLOR], dx, dy);\n }\n if(borderBottomWidth > 0 && borderBottomColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_BOTTOM], __cacheStyle[BORDER_BOTTOM_COLOR], dx, dy);\n }\n if(borderLeftWidth > 0 && borderLeftColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_LEFT], __cacheStyle[BORDER_LEFT_COLOR], dx, dy);\n }\n return res;\n }\n\n __destroy() {\n if(this.isDestroyed) {\n return;\n }\n super.__destroy();\n let { root } = this;\n this.clearAnimate();\n this.clearFrameAnimate();\n // root在没有初始化到真实dom渲染的情况下没有\n root && root.delRefreshTask(this.__loadBgi.cb);\n root && root.delRefreshTask(this.__task);\n this.__task = null;\n this.__root = null;\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 }\n\n // 先查找到注册了事件的节点,再捕获冒泡判断增加性能\n __emitEvent(e, force) {\n let { isDestroyed, 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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].push(v);\n return 'url(#' + uuid + ')';\n }\n }\n\n __getCg(renderMode, ctx, gd) {\n let { stop } = gd;\n let len = stop.length - 1;\n if(stop[len][1] < 1) {\n stop.push([stop[len][0].slice(0), 1]);\n }\n if(stop[0][1] > 0) {\n stop.unshift([stop[0][0].slice(0), 0]);\n }\n // canvas采用点色值计算法,svg则分360度画块\n let res = [];\n if(renderMode === CANVAS || renderMode === WEBGL) {\n return gd;\n }\n return res;\n }\n\n // canvas清空自身cache,cacheTotal在Root的自底向上逻辑做,svg仅有cacheTotal\n clearCache(onlyTotal) {\n let __config = this.__config;\n let __cacheTotal = __config[NODE_CACHE_TOTAL];\n let __cacheFilter = __config[NODE_CACHE_FILTER];\n let __cacheMask = __config[NODE_CACHE_MASK];\n let __cacheOverflow = __config[NODE_CACHE_OVERFLOW];\n if(!onlyTotal) {\n __config[NODE_CACHE_STYLE] = this.__cacheStyle = {};\n let __cache = __config[NODE_CACHE];\n if(__cache) {\n __cache.release();\n }\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 }\n\n updateStyle(style, cb) {\n let node = this;\n let { root, __config } = node;\n let formatStyle = css.normalize(style);\n // 有root说明被添加渲染过了\n if(root) {\n root.addRefreshTask(node.__task = {\n __before() {\n node.__task = null;\n if(__config[NODE_IS_DESTROYED]) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_STYLE] = formatStyle;\n res[UPDATE_OVERWRITE] = style; // 标识盖原有style样式不仅仅是修改currentStyle,不同于animate\n res[UPDATE_KEYS] = Object.keys(formatStyle).map(i => {\n if(!GEOM.hasOwnProperty(i)) {\n i = parseInt(i);\n }\n return i;\n });\n res[UPDATE_CONFIG] = __config;\n root.__addUpdate(node, __config, root, root.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb.call(node, diff);\n }\n },\n });\n }\n // 没有是在如parse()还未添加的时候,可以直接同步覆盖\n else {\n Object.assign(this.currentStyle, formatStyle);\n if(isFunction(cb)) {\n cb.call(node, -1);\n }\n }\n }\n\n // 传入格式化好key/value的样式\n updateFormatStyle(style, cb) {\n let node = this;\n let { root, __config } = node;\n if(root) {\n root.addRefreshTask(node.__task = {\n __before() {\n node.__task = null; // 清除在before,防止after的回调增加新的task误删\n if(__config[NODE_IS_DESTROYED]) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_STYLE] = style;\n res[UPDATE_KEYS] = Object.keys(style).map(i => {\n if(!GEOM.hasOwnProperty(i)) {\n i = parseInt(i);\n }\n return i;\n });\n res[UPDATE_CONFIG] = __config;\n root.__addUpdate(node, __config, root, root.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb.call(node, diff);\n }\n },\n });\n }\n // 没有是在如parse()还未添加的时候,可以直接同步覆盖\n else {\n Object.assign(this.currentStyle, style);\n if(isFunction(cb)) {\n cb.call(node, -1);\n }\n }\n }\n\n animate(list, options = {}) {\n let animation = new Animation(this, list, options);\n if(this.isDestroyed) {\n animation.__destroy(true);\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/margin/flex/vertical等\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 if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\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 }\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 if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\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 }\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.__config[NODE_LIMIT_CACHE] = false;\n }\n if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\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.__config[NODE_LIMIT_CACHE] = false;\n }\n if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\n }\n this.clearCache();\n }\n\n __releaseWhenEmpty(__cache) {\n if(__cache && __cache.available) {\n __cache.release();\n }\n return true;\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 self = this;\n if(self.isDestroyed) {\n inject.warn('Remove target is destroyed.');\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n let { root, domParent } = self;\n let target = self.isShadowRoot ? self.hostRoot : self;\n // 特殊情况连续append/remove时候,还未被添加进来找不到所以无需删除\n if(domParent.children.indexOf(target) === -1) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null; // 清除在before,防止after的回调增加新的task误删\n let pJson = domParent.__json;\n let i = pJson.children.indexOf(self.isShadowRoot ? self.hostRoot.__json : self.__json);\n if(i === -1) {\n throw new Error('Remove index Exception.')\n }\n pJson.children.splice(i, 1);\n domParent.children.splice(i, 1);\n let zChildren = domParent.zIndexChildren;\n // 可能appendChild会清空没有\n if(zChildren) {\n let j = zChildren.indexOf(self.isShadowRoot ? self.hostRoot : self);\n if(j > -1) {\n zChildren.splice(j, 1);\n }\n }\n if(self.__prev) {\n self.__prev.__next = self.__next;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = REFLOW;\n res[UPDATE_REMOVE_DOM] = true;\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n __after(diff) {\n self.isShadowRoot ? self.hostRoot.__destroy() : self.__destroy();\n if(isFunction(cb)) {\n cb.call(self, diff);\n }\n },\n });\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;\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 matrix() {\n return this.__config[NODE_MATRIX];\n }\n\n get matrixEvent() {\n return this.__config[NODE_MATRIX_EVENT];\n }\n\n get perspectiveMatrix() {\n return this.__config[NODE_PERSPECTIVE_MATRIX];\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.__config[NODE_CACHE_AS_BITMAP] = 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 enums from '../util/enums';\nimport unit from '../style/unit';\nimport level from './level';\n\nconst {\n STYLE_KEY: {\n DISPLAY,\n TOP,\n BOTTOM,\n POSITION,\n HEIGHT,\n },\n} = enums;\nconst { AUTO, PX, PERCENT } = unit;\nconst { REFLOW } = level;\n\nfunction offsetAndResizeByNodeOnY(node, root, reflowHash, dy, inDirectAbsList) {\n if(dy) {\n let last;\n do {\n // component的sr没有next兄弟,视为component的next\n while(node.isShadowRoot) {\n node = node.host;\n }\n last = node;\n let isContainer, parent = node.domParent;\n if(parent) {\n let cs = parent.computedStyle;\n let ps = cs[POSITION];\n isContainer = parent === root || parent.isShadowRoot || ps === 'relative' || ps === 'absolute';\n }\n // 先偏移next,忽略有定位的absolute,本身非container也忽略\n let next = node.next;\n let container;\n while(next) {\n if(next.computedStyle[DISPLAY] !== 'none') {\n if(next.currentStyle[POSITION] === 'absolute') {\n let { [TOP]: top, [BOTTOM]: bottom, [HEIGHT]: height } = next.currentStyle;\n if(top[1] === AUTO) {\n if(bottom[1] === AUTO || bottom[1] === PX) {\n next.__offsetY(dy, true, REFLOW);\n next.clearCache();\n }\n else if(bottom[1] === PERCENT) {\n let v = (1 - bottom[0] * 0.01) * dy;\n next.__offsetY(v, true, REFLOW);\n next.clearCache();\n }\n }\n else if(top[1] === PERCENT) {\n let v = top[0] * 0.01 * dy;\n next.__offsetY(v, true, REFLOW);\n next.clearCache();\n }\n // 高度百分比需发生变化的重新布局,需要在容器内\n if(height[1] === PERCENT) {\n if(isContainer) {\n parent.__layoutAbs(parent, parent.__layoutData, next);\n }\n else {\n if(!container) {\n container = parent;\n while(container) {\n if(container === root || container.isShadowRoot) {\n break;\n }\n let cs = container.currentStyle;\n if(cs[POSITION] === 'absolute' || cs[POSITION] === 'relative') {\n break;\n }\n container = container.domParent;\n }\n }\n inDirectAbsList.push([parent, container, next]);\n }\n }\n }\n else {\n next.__offsetY(dy, true, REFLOW);\n next.clearCache();\n }\n }\n next = next.next;\n }\n // root本身没domParent\n if(!parent) {\n break;\n }\n node = parent;\n // parent判断是否要resize\n let { currentStyle } = node;\n let isAbs = currentStyle[POSITION] === 'absolute';\n let need;\n if(isAbs) {\n if(currentStyle[HEIGHT][1] === AUTO\n && (currentStyle[TOP][1] === AUTO || currentStyle[BOTTOM][1] === AUTO)) {\n need = true;\n }\n }\n // height不定则需要\n else if(currentStyle[HEIGHT][1] === AUTO) {\n need = true;\n }\n if(need) {\n node.__resizeY(dy, REFLOW);\n node.clearCache();\n }\n // abs或者高度不需要继续向上调整提前跳出\n else {\n break;\n }\n if(node === root) {\n break;\n }\n }\n while(true);\n // 最后一个递归向上取消总缓存,防止过程中重复next多次无用递归\n while(last) {\n last.clearCache(true);\n last = last.domParent;\n }\n }\n}\n\nfunction clearUniqueReflowId(hash) {\n for(let i in hash) {\n if(hash.hasOwnProperty(i)) {\n let { node } = hash[i];\n delete node.__uniqueReflowId;\n }\n }\n}\n\nfunction getMergeMargin(topList, bottomList) {\n let total = 0;\n let max = topList[0];\n let min = topList[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 diff = 0;\n if(max > 0 && min > 0) {\n diff = Math.max(max, min) - total;\n }\n else if(max < 0 && min < 0) {\n diff = Math.min(max, min) - total;\n }\n else if(max !== 0 || min !== 0) {\n diff = max + min - total;\n }\n return diff;\n}\n\nexport default {\n offsetAndResizeByNodeOnY,\n clearUniqueReflowId,\n getMergeMargin,\n};\n","import Xom from './Xom';\nimport Text from './Text';\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 $$type from '../util/$$type';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport reflow from '../refresh/reflow';\nimport builder from '../util/builder';\nimport mode from '../refresh/mode';\nimport level from '../refresh/level';\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 NODE_KEY: {\n NODE_CURRENT_STYLE,\n NODE_STYLE,\n NODE_STRUCT,\n NODE_DOM_PARENT,\n NODE_IS_INLINE,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_FOCUS,\n UPDATE_ADD_DOM,\n UPDATE_CONFIG,\n },\n STRUCT_KEY: {\n STRUCT_NUM,\n STRUCT_LV,\n STRUCT_TOTAL,\n STRUCT_CHILD_INDEX,\n STRUCT_INDEX,\n },\n ELLIPSIS,\n} = enums;\nconst { AUTO, PX, PERCENT, REM, VW, VH, VMAX, VMIN } = unit;\nconst { isRelativeOrAbsolute, getBaseline, getVerticalBaseline } = css;\nconst { extend, isNil, isFunction } = util;\nconst { CANVAS, SVG, WEBGL } = mode;\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 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 = children || [];\n this.__flexLine = []; // flex布局多行模式时存储行\n this.__ellipsis = null; // 虚拟节点,有的话渲染\n let config = this.__config;\n config[NODE_CURRENT_STYLE] = this.__currentStyle;\n config[NODE_STYLE] = this.__style;\n }\n\n __structure(i, lv, j) {\n let res = super.__structure(i++, lv, j);\n let arr = [res];\n let zIndexChildren = this.__zIndexChildren = this.__zIndexChildren || genZIndexChildren(this);\n zIndexChildren.forEach((child, j) => {\n let temp = child.__structure(i, lv + 1, j);\n if(Array.isArray(temp)) {\n i += temp.length;\n arr = arr.concat(temp);\n }\n else {\n i++;\n arr.push(temp);\n }\n });\n let total = arr.length - 1;\n res[STRUCT_NUM] = zIndexChildren.length;\n res[STRUCT_TOTAL] = total;\n return arr;\n }\n\n __modifyStruct(root, offset = 0) {\n let __config = this.__config;\n let struct = __config[NODE_STRUCT];\n let total = struct[STRUCT_TOTAL] || 0;\n // 新生成了struct,引用也变了\n let nss = this.__structure(struct[STRUCT_INDEX], struct[STRUCT_LV], struct[STRUCT_CHILD_INDEX]);\n root.__structs.splice(struct[STRUCT_INDEX] + offset, total + 1, ...nss);\n let d = 0;\n if(this !== root) {\n struct = __config[NODE_STRUCT];\n d = (struct[STRUCT_TOTAL] || 0) - total;\n let ps = __config[NODE_DOM_PARENT].__config[NODE_STRUCT];\n ps[STRUCT_TOTAL] = ps[STRUCT_TOTAL] || 0;\n ps[STRUCT_TOTAL] += d;\n }\n return [struct, d];\n }\n\n /**\n * 因为zIndex/abs的变化造成的更新,只需重排这一段顺序即可\n * 即便包含component造成的dom变化也不影响,component作为子节点reflow会再执行,这里重排老的vd\n * @param structs\n * @private\n */\n __updateStruct(structs) {\n let { [STRUCT_INDEX]: index, [STRUCT_TOTAL]: total = 0 } = this.__config[NODE_STRUCT];\n let zIndexChildren = this.__zIndexChildren = genZIndexChildren(this);\n let length = zIndexChildren.length;\n if(length === 1) {\n return;\n }\n zIndexChildren.forEach((child, i) => {\n let ns = child.__config[NODE_STRUCT];\n // 一般肯定有的,但是在zIndex更新和addChild同时发生时,新添加的尚无,zIndex更新会报错,临时解决\n if(ns) {\n ns[STRUCT_CHILD_INDEX] = i; // 仅后面排序用\n }\n });\n // 按直接子节点划分为相同数量的若干段进行排序\n let arr = [];\n let source = [];\n for(let i = index + 1; i <= index + total; i++) {\n let child = structs[i];\n // 同上防止\n if(child) {\n let o = {\n child,\n list: structs.slice(child[STRUCT_INDEX], child[STRUCT_INDEX] + (child[STRUCT_TOTAL] || 0) + 1),\n };\n arr.push(o);\n source.push(o);\n i += child[STRUCT_TOTAL] || 0;\n }\n }\n arr.sort(function(a, b) {\n return a.child[STRUCT_CHILD_INDEX] - b.child[STRUCT_CHILD_INDEX];\n });\n // 是否有变更,有才进行重新计算\n let needSort;\n for(let i = 0, len = source.length; i < len; i++) {\n if(source[i] !== arr[i]) {\n needSort = true;\n break;\n }\n }\n if(needSort) {\n let list = [];\n arr.forEach(item => {\n list = list.concat(item.list);\n });\n list.forEach((struct, i) => {\n struct[STRUCT_INDEX] = index + i + 1;\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[1] !== 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.__config[NODE_IS_INLINE] && 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 super.__offsetY(diff, isLayout, lv);\n let ep = this.__ellipsis;\n if(ep) {\n ep.__offsetY(diff, isLayout);\n }\n if(isLayout && !this.__config[NODE_IS_INLINE] && 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[1] === AUTO;\n let isFixed = [PX, PERCENT, REM, VW, VH, VMAX, VMIN].indexOf(flexBasis[1]) > -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[1]) > -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.__layout({\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.__layout({\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.__layout({\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 __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 * @private\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);\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.__layout({\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.__layout({\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.__layout({\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.__layout({\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);\n if(diff) {\n item.__offsetX(diff, true);\n x += diff;\n }\n }\n else {\n mergeMarginStartList.push(marginTop);\n let diff = reflow.getMergeMargin(mergeMarginStartList, mergeMarginEndList);\n if(diff) {\n item.__offsetY(diff, true);\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);\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.__layout({\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.__layout({\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.__layout({\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);\n }\n else if(!isUpright && !fixedHeight) {\n this.__resizeY(spread);\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);\n }\n else {\n item.__offsetY(spreadList[count], true);\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.__layout({\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);\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);\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);\n }\n else {\n item.__offsetX(diff, true);\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);\n }\n else {\n item.__offsetX(per, true);\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);\n }\n else {\n item.__offsetX(diff, true);\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);\n }\n else {\n item.__offsetX(between, true);\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);\n }\n else {\n item.__offsetX(around * (i + 1), true);\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);\n }\n else {\n item.__offsetX(per * i, true);\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.__layout({\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[1] !== AUTO || alignSelf === 'stretch') {\n needGenAr = true;\n }\n else if(alignSelf === 'auto' && alignItems === 'stretch') {\n needGenAr = true;\n }\n if(needGenAr) {\n item.__layout({\n x,\n y,\n w,\n h: main,\n h3: main, // 同w2\n isUpright,\n }, isAbs, isColumn, isRow);\n }\n else {\n item.__layout({\n x,\n y,\n w,\n h: main,\n h3: main, // 同w2\n isUpright,\n }, true, isColumn, isRow);\n item.__layout({\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.__layout({\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][1] === AUTO) {\n marginAutoCount++;\n }\n if(currentStyle[MARGIN_RIGHT][1] === AUTO) {\n marginAutoCount++;\n }\n }\n else {\n if(currentStyle[MARGIN_TOP][1] === AUTO) {\n marginAutoCount++;\n }\n if(currentStyle[MARGIN_BOTTOM][1] === 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.__layout({\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][1] === AUTO) {\n count += per;\n child.__offsetX(count, true);\n }\n else if(count) {\n child.__offsetX(count, true);\n }\n if(currentStyle[MARGIN_RIGHT][1] === AUTO) {\n count += per;\n }\n }\n else {\n if(currentStyle[MARGIN_TOP][1] === AUTO) {\n count += per;\n child.__offsetY(count, true);\n }\n else if(count) {\n child.__offsetY(count, true);\n }\n if(currentStyle[MARGIN_BOTTOM][1] === 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) : child.__offsetY(free, true);\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) : child.__offsetY(center, true);\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) : child.__offsetY(between * i, true);\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) : child.__offsetY(around * (i * 2 + 1), true);\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) : child.__offsetY(around * (i + 1), true);\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);\n }\n }\n else if(alignSelf === 'center') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff * 0.5, true);\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[1] === 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);\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);\n }\n }\n else if(alignItems === 'flexEnd') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff, true);\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseline - item.firstBaseline;\n if(diff !== 0) {\n item.__offsetY(diff, true);\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[1] === AUTO && item.outerHeight < maxCross) {\n item.__layout(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[1] === 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);\n }\n }\n else if(alignSelf === 'center') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff * 0.5, true);\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[1] === 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);\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);\n }\n }\n else if(alignItems === 'flexEnd') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff, true);\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseline - item.firstBaseline;\n if(diff !== 0) {\n item.__offsetX(diff, true);\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[1] === 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.__config[NODE_IS_INLINE] = 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.__layout({\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[1] === AUTO) {\n isUprightIbFull = true;\n }\n else if(!isUpright && w[1] === 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.__layout({\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.__layout({\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.__layout({\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[1] === AUTO && isUpright) {\n isUprightIbFull = true;\n }\n if(width[1] === 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.__layout({\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.__layout({\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[1] === AUTO && isUpright) {\n isUprightIbFull = true;\n }\n if(width[1] === 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);\n }\n else if(!isUpright && !fixedHeight) {\n this.__resizeY(spread);\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);\n }\n else {\n this.__offsetX(diff, true);\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, clientWidth, clientHeight, computedStyle } = container;\n let { 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[1] !== AUTO) {\n fixedLeft = true;\n computedStyle[LEFT] = this.__calSize(left, clientWidth, true);\n }\n else {\n computedStyle[LEFT] = 'auto';\n }\n if(right[1] !== AUTO) {\n fixedRight = true;\n computedStyle[RIGHT] = this.__calSize(right, clientWidth, true);\n }\n else {\n computedStyle[RIGHT] = 'auto';\n }\n if(top[1] !== AUTO) {\n fixedTop = true;\n computedStyle[TOP] = this.__calSize(top, clientHeight, true);\n }\n else {\n computedStyle[TOP] = 'auto';\n }\n if(bottom[1] !== 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[1] !== AUTO) {\n w2 = this.__calSize(width, clientWidth, true);\n }\n }\n else if(fixedRight) {\n if(width[1] !== 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[1] !== 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[1] !== AUTO) {\n h2 = this.__calSize(height, clientHeight, true);\n }\n }\n else if(fixedBottom) {\n if(height[1] !== 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;\n while(prev) {\n // 以前面的flow的最近的prev末尾为准\n if(prev instanceof Text || prev.computedStyle[POSITION] !== 'absolute') {\n y2 = prev.y + prev.outerHeight;\n break;\n }\n prev = prev.prev;\n }\n if(height[1] !== 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.__layout({\n x: x2,\n y: y2,\n w: widthLimit,\n h: heightLimit,\n isUpright: data.isUpright, // 父亲的\n }, true, false);\n widthLimit = item.outerWidth;\n }\n item.__layout({\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 }, false, false);\n if(onlyRight) {\n item.__offsetX(-item.outerWidth, true);\n }\n if(onlyBottom) {\n item.__offsetY(-item.outerHeight, true);\n }\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);\n }\n else if(item instanceof Component) {\n let sr = item.shadowRoot;\n if(sr instanceof Dom) {\n sr.__layoutAbs(sr, data);\n }\n }\n });\n // 根节点自己特殊执行,不在layout统一\n this.__execAr();\n }\n\n render(renderMode, lv, ctx, cache, dx, dy) {\n let res = super.render(renderMode, lv, ctx, cache, dx, dy);\n let ep = this.__ellipsis;\n if(ep) {\n ep.render(renderMode, lv, res.ctx, cache, 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, force) {\n if(force) {\n return super.__emitEvent(e, force);\n }\n let { isDestroyed, computedStyle, isMask } = 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 // 找到对应的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)) {\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);\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(json, cb) {\n let self = this;\n if(!isNil(json) && !self.isDestroyed) {\n let { root, host } = self;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, self);\n }\n else {\n vd = builder.initDom(json, root, host, self);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null; // 清除在before,防止after的回调增加新的task误删\n self.__json.children.push(json);\n let len = self.children.length;\n if(len) {\n let last = self.children[len - 1];\n last.__next = vd;\n vd.__prev = last;\n }\n self.children.push(vd);\n self.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in appendChild.');\n }\n }\n }\n\n prependChild(json, cb) {\n let self = this;\n if(!isNil(json) && !self.isDestroyed) {\n let { root, host } = self;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, self);\n }\n else {\n vd = builder.initDom(json, root, host, self);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null;\n self.__json.children.unshift(json);\n let len = self.children.length;\n if(len) {\n let first = self.children[0];\n first.__prev = vd;\n vd.__next = first;\n }\n self.children.unshift(vd);\n self.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in prependChild.');\n }\n }\n }\n\n insertBefore(json, cb) {\n let self = this;\n if(!isNil(json) && !self.isDestroyed && self.domParent) {\n let { root, domParent } = self;\n let host = domParent.hostRoot;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, domParent);\n }\n else {\n vd = builder.initDom(json, root, host, domParent);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null;\n let i = 0, has, __json = domParent.__json, children = __json.children, len = children.length;\n let pJson = self.isShadowRoot ? self.hostRoot.__json : self.__json;\n for(; i < len; i++) {\n if(children[i] === pJson) {\n has = true;\n break;\n }\n }\n if(!has) {\n throw new Error('InsertBefore exception.');\n }\n // 插入注意开头位置处理\n if(i) {\n children.splice(i, 0, json);\n vd.__next = self;\n vd.__prev = self.__prev;\n self.__prev = vd;\n domParent.children.splice(i, 0, vd);\n }\n else {\n if(len) {\n let first = domParent.children[0];\n first.__prev = vd;\n vd.__next = first;\n }\n children.unshift(json);\n domParent.children.unshift(vd);\n }\n domParent.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in insertBefore.');\n }\n }\n }\n\n insertAfter(json, cb) {\n let self = this;\n if(!isNil(json) && !self.isDestroyed && self.domParent) {\n let { root, domParent } = self;\n let host = domParent.hostRoot;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, domParent);\n }\n else {\n vd = builder.initDom(json, root, host, domParent);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null;\n let i = 0, has, __json = domParent.__json, children = __json.children, len = children.length;\n let pJson = self.isShadowRoot ? self.hostRoot.__json : self.__json;\n for(; i < len; i++) {\n if(children[i] === pJson) {\n has = true;\n break;\n }\n }\n if(!has) {\n throw new Error('insertAfter exception.');\n }\n // 插入注意末尾位置处理\n if(i < len - 1) {\n children.splice(i + 1, 0, json);\n vd.__prev = self;\n vd.__next = self.__next;\n self.__next = vd;\n domParent.children.splice(i + 1, 0, vd);\n }\n else {\n if(len) {\n let last = domParent.children[len - 1];\n last.__next = vd;\n vd.__prev = last;\n }\n children.push(json);\n domParent.children.push(vd);\n }\n domParent.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in insertAfter.');\n }\n }\n }\n\n removeChild(target, cb) {\n if(target.parent === this && (target instanceof Xom || target instanceof Component)) {\n if(this.isDestroyed) {\n inject.warn('Remove parent is destroyed.');\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n target.remove(cb);\n }\n else {\n inject.error('Invalid parameter in 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';\nimport css from '../style/css';\n\nconst {\n STYLE_KEY: {\n WIDTH,\n HEIGHT,\n DISPLAY,\n BORDER_TOP_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n VISIBILITY,\n BACKGROUND_IMAGE,\n BACKGROUND_COLOR,\n BOX_SHADOW,\n MIX_BLEND_MODE,\n MARGIN_RIGHT,\n MARGIN_LEFT,\n PADDING_RIGHT,\n PADDING_LEFT,\n FONT_SIZE,\n FLEX_BASIS,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_FOCUS,\n UPDATE_CONFIG,\n },\n NODE_KEY: {\n NODE_CACHE,\n NODE_DEFS_CACHE,\n NODE_IS_MASK,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, REM, VW, VH, VMAX, VMIN, RGBA } = 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 && ca.state === inject.LOADED) {\n loadImg.source = ca.source;\n loadImg.width = ca.width;\n loadImg.height = ca.height;\n }\n }\n let config = this.__config;\n if(config[NODE_IS_MASK]) {\n let { style, currentStyle } = this;\n style[BACKGROUND_IMAGE] = currentStyle[BACKGROUND_IMAGE] = [null];\n style[BACKGROUND_COLOR] = currentStyle[BACKGROUND_COLOR] = [[0, 0, 0, 0], RGBA];\n style[BORDER_TOP_WIDTH] = currentStyle[BORDER_TOP_WIDTH] = [0, PX];\n style[BORDER_RIGHT_WIDTH] = currentStyle[BORDER_RIGHT_WIDTH] = [0, PX];\n style[BORDER_LEFT_WIDTH] = currentStyle[BORDER_LEFT_WIDTH] = [0, PX];\n style[BORDER_BOTTOM_WIDTH] = currentStyle[BORDER_BOTTOM_WIDTH] = [0, PX];\n style[BOX_SHADOW] = currentStyle[BOX_SHADOW] = null;\n style[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE] = 'normal';\n }\n }\n\n /**\n * 覆盖xom的方法,在__layout()3个分支中会首先被调用\n * 当样式中固定宽高时,图片按样式尺寸,加载后重新绘制即可\n * 只固定宽高一个时,加载完要计算缩放比,重新布局绘制\n * 都没有固定,按照图片尺寸,重新布局绘制\n * 这里计算非固定的情况,将其改为固定供布局渲染使用,未加载完成为0\n * @param data\n * @param isInline\n * @returns {{fixedWidth: boolean, w: *, x: *, h: *, y: *, fixedHeight: boolean}}\n * @private\n */\n __preLayout(data, isInline) {\n let res = super.__preLayout(data, false);\n let loadImg = this.__loadImg;\n // 可能已提前加载好了,或有缓存,为减少刷新直接使用\n if(!loadImg.error) {\n let src = loadImg.src;\n let cache = inject.IMG[src];\n if(cache && cache.state === inject.LOADED) {\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(renderMode, lv, currentStyle, computedStyle) {\n let res = super.__calContent(renderMode, lv, currentStyle, computedStyle);\n if(!res) {\n let {\n __loadImg: loadImg,\n } = this;\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, lv, ctx, cache, dx = 0, dy = 0) {\n let res = super.render(renderMode, lv, ctx, cache, dx, dy);\n if(renderMode === mode.WEBGL) {\n dx = res.dx;\n dy = res.dy;\n }\n let {\n offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow,\n } = res;\n let {\n width, height, isDestroyed,\n props: {\n placeholder,\n },\n computedStyle,\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 __config,\n __loadImg: loadImg,\n root,\n } = this;\n if(offscreenBlend) {\n ctx = offscreenBlend.target.ctx;\n }\n if(offscreenMask) {\n ctx = offscreenMask.target.ctx;\n }\n if(offscreenFilter) {\n ctx = offscreenFilter.target.ctx;\n }\n if(offscreenOverflow) {\n ctx = offscreenOverflow.target.ctx;\n }\n // 没source且不error时加载图片\n if(!loadImg.source && !loadImg.error && !loadImg.loading) {\n this.__loadAndRefresh(loadImg, root, ctx, placeholder, computedStyle, width, height);\n }\n if(isDestroyed || display === 'none' || visibility === 'hidden') {\n return res;\n }\n let __cache = __config[NODE_CACHE];\n if(cache && __cache && __cache.enabled) {\n ctx = __cache.ctx;\n }\n let originX, originY;\n originX = res.x3 + dx;\n originY = res.y3 + dy;\n // 根据配置以及占位图显示error\n let source = loadImg.source;\n if(loadImg.error && !placeholder && Img.showError) {\n let strokeWidth = Math.min(width, height) * 0.02;\n let stroke = '#CCC';\n let fill = '#DDD';\n let cx = originX + width * 0.7;\n let cy = originY + height * 0.3;\n let r = strokeWidth * 5;\n let pts = [\n [originX + width * 0.15, originY + height * 0.7],\n [originX + width * 0.3, originY + height * 0.4],\n [originX + width * 0.5, originY + height * 0.6],\n [originX + width * 0.6, originY + height * 0.5],\n [originX + width * 0.9, originY + height * 0.8],\n [originX + width * 0.15, originY + height * 0.8]\n ];\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n ctx.strokeStyle = stroke;\n ctx.lineWidth = strokeWidth;\n ctx.fillStyle = fill;\n ctx.beginPath();\n ctx.moveTo(originX, originY);\n ctx.lineTo(originX + width, originY);\n ctx.lineTo(originX + width, originY + height);\n ctx.lineTo(originX, originY + height);\n ctx.lineTo(originX, originY);\n ctx.stroke();\n ctx.closePath();\n ctx.beginPath();\n let points = geom.ellipsePoints(cx, cy, r, r);\n painter.canvasPolygon(ctx, points, 0, 0);\n ctx.fill();\n ctx.closePath();\n ctx.beginPath();\n ctx.moveTo(pts[0][0], pts[0][1]);\n for(let i = 1, len = pts.length; i < len; i++) {\n let point = pts[i];\n ctx.lineTo(point[0], point[1]);\n }\n ctx.lineTo(pts[0][0], pts[0][1]);\n ctx.fill();\n ctx.closePath();\n }\n else if(renderMode === mode.SVG) {\n this.__addGeom('rect', [\n ['x', originX],\n ['y', originY],\n ['width', width],\n ['height', height],\n ['stroke', stroke],\n ['stroke-width', strokeWidth],\n ['fill', 'rgba(0,0,0,0)']\n ]);\n this.__addGeom('circle', [\n ['cx', cx],\n ['cy', cy],\n ['r', r],\n ['fill', fill],\n ]);\n let s = '';\n for(let i = 0, len = pts.length; i < len; i++) {\n let point = pts[i];\n if(i) {\n s += ' ';\n }\n s += point[0] + ',' + point[1];\n }\n this.__addGeom('polygon', [\n ['points', s],\n ['fill', fill]\n ]);\n }\n }\n else if(source) {\n // 圆角需要生成一个mask\n let list = border.calRadius(originX, originY, width, height,\n borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius);\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n // 有border-radius需模拟遮罩裁剪\n if(list) {\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, list, dx, dy);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(source, originX, originY, width, height);\n ctx.restore();\n }\n else {\n ctx.drawImage(source, originX, originY, width, height);\n }\n }\n else if(renderMode === mode.SVG) {\n // img没有变化无需diff,直接用上次的vd\n if(loadImg.cache) {\n loadImg.cache.cache = true;\n virtualDom.children = [loadImg.cache];\n // 但是还是要校验是否有borderRadius变化,引发img的圆角遮罩\n if(!virtualDom.cache && list) {\n let d = svgPolygon(list);\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', '#FFF'],\n ],\n }\n ],\n };\n let id = ctx.add(v);\n __config[NODE_DEFS_CACHE].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 __config[NODE_DEFS_CACHE].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 // img没加载时,清空,这样Xom就认为没内容不生成cache,防止img先绘制cache再绘制主屏,重复\n __releaseWhenEmpty(__cache) {\n if(!this.__loadImg.error && !this.__loadImg.source) {\n return super.__releaseWhenEmpty(__cache);\n }\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[1] !== AUTO) {\n w -= this.__calSize(width, total, true);\n }\n else {\n let loadImg = this.__loadImg;\n // 加载成功计算缩放后的宽度\n if(loadImg.source) {\n if(height[1] === PX) {\n w -= loadImg.width * height[0] / loadImg.height;\n }\n else if(height[1] === PERCENT) {\n w -= loadImg.width * height[0] * total * 0.01 / loadImg.height;\n }\n else if(height[1] === REM) {\n w -= loadImg.width * height[0] * this.root.computedStyle[FONT_SIZE] / loadImg.height;\n }\n else if(height[1] === VW) {\n w -= loadImg.width * height[0] * this.root.width * 0.01 / loadImg.height;\n }\n else if(height[1] === VH) {\n w -= loadImg.width * height[0] * this.root.height * 0.01 / loadImg.height;\n }\n else if(height[1] === VMAX) {\n w -= height[0] * Math.max(this.root.width, this.root.height) * 0.01 / loadImg.height;\n }\n else if(height[1] === VMIN) {\n w -= height[0] * 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[1]) > -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[1]) > -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[1] !== 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, root, ctx, placeholder, computedStyle, width, height, cb) {\n let self = this;\n // 先清空之前可能的\n if(loadImg.source || loadImg.error) {\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null; // 清除在before,防止after的回调增加新的task误删\n if(self.isDestroyed) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REFLOW; // 没有样式变化但内容尺寸发生了变化强制执行\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n });\n loadImg.source = null;\n }\n loadImg.loading = true;\n // 再测量,可能瞬间完成替换掉上面的\n inject.measureImg(loadImg.src, data => {\n // 还需判断url,防止重复加载时老的替换新的,失败走error绘制\n if(data.url === loadImg.src && !self.isDestroyed) {\n loadImg.cache && (loadImg.cache.cache = false);\n loadImg.loading = false;\n function reload() {\n let { currentStyle: { [WIDTH]: width, [HEIGHT]: height } } = self;\n root.delRefreshTask(self.__task);\n if(width[1] !== AUTO && height[1] !== AUTO) {\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null;\n if(self.isDestroyed) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REPAINT;\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n __after() {\n if(isFunction(cb)) {\n cb.call(self);\n }\n },\n });\n }\n else {\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null;\n if(self.isDestroyed) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REFLOW; // 没有样式变化但内容尺寸发生了变化强制执行\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n __after() {\n if(isFunction(cb)) {\n cb.call(self);\n }\n },\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 inject.measureImg(placeholder, data => {\n if(data.success) {\n loadImg.error = true;\n loadImg.source = data.source;\n loadImg.width = data.width;\n loadImg.height = data.height;\n reload();\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') {\n reload();\n }\n }\n }, {\n ctx,\n root,\n width,\n height,\n });\n }\n\n updateSrc(v, cb) {\n let self = this;\n let loadImg = self.__loadImg;\n let root = this.root;\n // 相等或空且当前error直接返回\n if(v === loadImg.src || !v && loadImg.error) {\n if(isFunction(cb)) {\n cb(-1);\n }\n }\n else if(v) {\n loadImg.src = v;\n self.__loadAndRefresh(loadImg, root, root.ctx, self.props.placeholder, self.computedStyle, self.width, self.height, cb);\n }\n else {\n loadImg.src = v;\n loadImg.source = null;\n loadImg.error = true;\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null;\n if(self.isDestroyed) {\n return;\n }\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, self.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb(diff);\n }\n },\n });\n }\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 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';\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 NODE_KEY: {\n NODE_CACHE_PROPS,\n NODE_CURRENT_PROPS,\n NODE_CURRENT_STYLE,\n NODE_STYLE,\n NODE_DEFS_CACHE,\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 let config = this.__config;\n config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n config[NODE_CURRENT_PROPS] = this.__currentProps;\n config[NODE_CURRENT_STYLE] = this.__currentStyle;\n config[NODE_STYLE] = this.__style;\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[1]) > -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[1]) > -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 __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.__config[NODE_CACHE_PROPS] = 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.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __calCache(renderMode, ctx, parent, __cacheStyle, currentStyle, computedStyle,\n clientWidth, clientHeight, offsetWidth, offsetHeight,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth,\n paddingTop, paddingRight, paddingBottom, paddingLeft,\n x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6) {\n let res = super.__calCache(renderMode, ctx, parent, __cacheStyle, currentStyle, computedStyle,\n clientWidth, clientHeight, offsetWidth, offsetHeight,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth,\n paddingTop, paddingRight, paddingBottom, paddingLeft,\n x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6);\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[1] === GRADIENT) {\n // let t = this.__gradient(renderMode, ctx, x3, y3, x4, y4, item[0], 0, 0);\n cs.push(item[0]);\n res.push(true);\n }\n else if(item && item[1] === RGBA && item[0][3] > 0) {\n cs.push(item[0]);\n res.push(int2rgba(item[0]));\n }\n else {\n cs.push('none');\n res.push('none');\n }\n });\n }\n }\n });\n return res;\n }\n\n __calContent(renderMode, lv, 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.x3, res.y3, res.x4, res.y4, item, res.dx, res.dy);\n }\n return int2rgba(item);\n });\n fill = fill.map(item => {\n if(item.k) {\n return this.__gradient(renderMode, res.ctx, res.x3, res.y3, res.x4, res.y4, item, res.dx, res.dy);\n }\n return int2rgba(item);\n });\n return {\n cx,\n cy,\n stroke,\n strokeWidth,\n strokeDasharray,\n strokeDasharrayStr,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n fill,\n fillRule,\n };\n }\n\n __preSetCanvas(renderMode, ctx, res) {\n let {\n stroke,\n strokeWidth,\n strokeDasharray,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n fill,\n } = res;\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\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, lv, ctx, cache, dx, dy) {\n let res = super.render(renderMode, lv, ctx, cache, dx, dy);\n if(renderMode === mode.SVG) {\n this.virtualDom.type = 'geom';\n }\n // 无论canvas/svg,break可提前跳出省略计算\n if(res.break) {\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 || renderMode === mode.WEBGL) {\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 || renderMode === mode.WEBGL) {\n if(matrix) {\n ctx.save();\n // 临时解决方案,webgl和cacheCanvas的渲染忽略世界matrix\n if(renderMode === mode.CANVAS) {\n let me = this.matrixEvent;\n matrix = mx.multiply(me, matrix);\n }\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 || renderMode === mode.WEBGL) {\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.__config[NODE_DEFS_CACHE].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.__config[NODE_DEFS_CACHE].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 // geom的cache无内容也不清除,因为子类不清楚内容,除非看不见\n __releaseWhenEmpty(cache, computedStyle) {\n return computedStyle[VISIBILITY] === 'hidden';\n }\n\n // offset/resize时要多一步清空props上记录的缓存\n __offsetX(diff, isLayout, lv) {\n super.__offsetX(diff, isLayout, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __offsetY(diff, isLayout, lv) {\n super.__offsetY(diff, isLayout, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __resizeX(diff, lv) {\n super.__resizeX(diff, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __resizeY(diff, lv) {\n super.__resizeY(diff, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\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.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 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';\nimport enums from './enums';\n\nconst {\n NODE_KEY: {\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_DOM_PARENT,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n NODE_STRUCT,\n },\n} = enums;\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 = sr.__config[NODE_COMPUTED_STYLE] = oldSr.computedStyle;\n }\n else {\n let domParent = cp.domParent;\n [\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n ].forEach(k => {\n sr.__config[k] = domParent.__config[k];\n });\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.__config[NODE_DOM_PARENT] = oldSr.domParent;\n sr.__config[NODE_STRUCT] = oldSr.__config[NODE_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 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';\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[1] === b[1]) {\n if(a[0] === b[0]) {\n return a[2] - b[2];\n }\n return b[0] - a[0];\n }\n return b[1] - a[1];\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 target.draw();\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 ctx.draw && ctx.draw(true);\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\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 apply.draw();\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 target.draw();\n apply.ctx.setTransform(1, 0, 0, 1, 0, 0);\n apply.ctx.clearRect(0, 0, width, height);\n apply.draw();\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 ctx.draw && ctx.draw(true);\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.globalAlpha = 1;\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\n inject.releaseCacheCanvas(target.canvas);\n }\n else if(type === OFFSCREEN_MASK) {\n let { mask, isClip } = offscreen;\n if(isClip) {\n offscreen.target.draw();\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 mask.draw();\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 offscreen.target.draw();\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 ctx.draw && ctx.draw(true);\n mask.ctx.setTransform(1, 0, 0, 1, 0, 0);\n mask.ctx.clearRect(0, 0, width, height);\n mask.draw();\n inject.releaseCacheCanvas(mask.canvas);\n }\n else {\n mask.draw();\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 target.draw();\n mask.ctx.setTransform(1, 0, 0, 1, 0, 0);\n mask.ctx.clearRect(0, 0, width, height);\n mask.draw();\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 ctx.draw && ctx.draw(true);\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\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 target.draw();\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 ctx.draw && ctx.draw(true);\n target.ctx.globalAlpha = 1;\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\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 get page() {\n return this.__page;\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 { NA, LOCAL, CHILD, SELF, 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 PADDING_LEFT,\n PADDING_RIGHT,\n PADDING_TOP,\n PADDING_BOTTOM,\n BORDER_TOP_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n MATRIX,\n },\n NODE_KEY: {\n NODE_CACHE,\n NODE_CACHE_TOTAL,\n NODE_CACHE_OVERFLOW,\n NODE_CACHE_MASK,\n NODE_CACHE_FILTER,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n NODE_OPACITY,\n NODE_COMPUTED_STYLE,\n NODE_CURRENT_STYLE,\n NODE_LIMIT_CACHE,\n NODE_REFRESH_LV,\n NODE_CACHE_STYLE,\n NODE_DEFS_CACHE,\n NODE_IS_MASK,\n NODE_DOM_PARENT,\n NODE_PERSPECTIVE_MATRIX,\n NODE_VIRTUAL_DOM,\n NODE_CACHE_AS_BITMAP,\n NODE_STRUCT,\n },\n STRUCT_KEY: {\n STRUCT_NODE,\n STRUCT_INDEX,\n STRUCT_TOTAL,\n STRUCT_HAS_MASK,\n STRUCT_LV,\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} = 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, __config } = node;\n let {\n [NODE_CACHE]: cache,\n [NODE_COMPUTED_STYLE]: {\n [FILTER]: filter,\n [PERSPECTIVE]: perspective,\n [PERSPECTIVE_ORIGIN]: perspectiveOrigin,\n },\n } = __config;\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][STRUCT_TOTAL] || 0;\n for(let i = parentIndex + 1, len = parentIndex + total + 1; i < len; i++) {\n let {\n [STRUCT_NODE]: node2,\n [STRUCT_TOTAL]: total,\n } = __structs[i];\n // mask也不占bbox位置\n if(node2.isMask) {\n continue;\n }\n let {\n __sx1,\n __sy1,\n __config: {\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n [OPACITY]: opacity,\n },\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 config\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, config, index, lv, total, __structs, hasMask, width, height) {\n let {\n [NODE_CACHE_TOTAL]: cacheTotal,\n [NODE_CACHE_FILTER]: cacheFilter,\n [NODE_CACHE_MASK]: cacheMask,\n [NODE_CACHE_OVERFLOW]: cacheOverflow,\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = config;\n let needGen;\n // 先绘制形成基础的total,有可能已经存在无变化,就可省略\n if(!cacheTotal || !cacheTotal.available) {\n needGen = true; // total重新生成了,其它基于的也一定需要重新生成\n let bboxTotal, baseMatrix;\n let { __sx1: sx1, __sy1: sy1 } = node;\n // 栈代替递归,存父节点的matrix/opacity,matrix为E时存null省略计算\n let matrixList = [];\n let parentMatrix;\n let opacityList = [];\n let parentOpacity = 1;\n let lastConfig;\n let lastLv = lv;\n // 先遍历每个节点,以局部根节点左上角为原点,求得所占的总的bbox,即合并所有bbox\n for(let i = index, len = index + (total || 0) + 1; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n // 排除Text\n if(node instanceof Text) {\n let bbox = node.bbox; // 文字节点不能算filter\n if(!isE(parentMatrix)) {\n bbox = transformBbox(bbox, parentMatrix, 0, 0);\n }\n mergeBbox(bboxTotal, bbox, 0, 0);\n continue;\n }\n let __config = node.__config;\n let {\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_IS_MASK]: isMask,\n } = __config;\n // 跳过display:none元素和它的所有子节点和mask\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n continue;\n }\n // mask不占bbox,本身除外\n if(i !== index && isMask) {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n continue;\n }\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,根节点是第一个特殊处理\n if(i === index) {}\n else if(lv > lastLv) {\n parentMatrix = lastConfig[NODE_MATRIX_EVENT];\n if(isE(parentMatrix)) {\n parentMatrix = null;\n }\n matrixList.push(parentMatrix);\n parentOpacity = lastConfig[NODE_OPACITY];\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 lastConfig = __config;\n lastLv = lv;\n let {\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_CACHE_STYLE]: __cacheStyle,\n } = __config;\n let matrix, opacity;\n /**\n * lv=REPAINT重新渲染,bbox重新生成,matrix重新生成,filter重新生成\n */\n else {\n node.__bbox = null;\n node.__filterBbox = null;\n if(i === index) {\n node.__calFilter(currentStyle, computedStyle);\n }\n matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n assignMatrix(__config[NODE_MATRIX], matrix);\n opacity = computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n // opacity可临时赋值下面循环渲染用,matrixEvent可能需重新计算,因为局部根节点为E没考虑继承,这里仅计算bbox用\n if(i === index) {\n opacity = 1;\n baseMatrix = matrix;\n matrix = mx.identity();\n }\n else if(!isE(parentMatrix)) {\n matrix = multiply(parentMatrix, matrix);\n }\n assignMatrix(__config[NODE_MATRIX_EVENT], matrix);\n __config[NODE_OPACITY] = parentOpacity * opacity;\n let bbox;\n // 子元素有cacheTotal优先使用,一定是子元素,局部根节点available为false不会进\n let target = i > index && getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal]);\n // 局部根节点的total不需要考虑filter,子节点要\n if(target) {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n bbox = target.bbox;\n }\n else {\n bbox = i === index ? node.bbox : node.filterBbox;\n }\n // 老的不变,新的会各自重新生成,根据matrixEvent合并bboxTotal\n bbox = transformBbox(bbox, matrix, 0, 0);\n if(i === index) {\n bboxTotal = bbox.slice(0);\n }\n else {\n mergeBbox(bboxTotal, bbox, 0, 0);\n }\n }\n // 生成cacheTotal,获取偏移dx/dy\n config[NODE_CACHE_TOTAL] = cacheTotal = Cache.getInstance(bboxTotal, sx1, sy1);\n if(!cacheTotal || !cacheTotal.enabled) {\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 * 每个子节点的opacity有父继承计算在上面循环已经做好了,直接获取\n * 但matrixEvent可能需要重算,因为原点不一定是根节点的原点,影响tfo\n * 另外每个节点的refreshLevel需要设置REPAINT\n * 这样cacheTotal取消时子节点需确保重新计算一次matrix/opacity/filter,保证下次和父元素继承正确\n */\n parentMatrix = null;\n let lastMatrix;\n 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 [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n // 排除Text\n if(node instanceof Text) {\n node.render(renderMode, REPAINT, ctxTotal, CHILD, dx, dy);\n if(offscreenHash.hasOwnProperty(i)) {\n ctxTotal = applyOffscreen(ctxTotal, offscreenHash[i], width, height);\n }\n }\n else {\n let __config = node.__config;\n let {\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = __config;\n if(maskStartHash.hasOwnProperty(i)) {\n let [idx, n, 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(--n) {\n let { [STRUCT_TOTAL]: total } = __structs[j];\n j += (total || 0) + 1;\n }\n j--;\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([idx, lv, OFFSCREEN_MASK, offscreenMask]);\n list.push([j, lv, OFFSCREEN_MASK2, {\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 let {\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n [DISPLAY]: display,\n } = computedStyle;\n // 特殊渲染的matrix,局部根节点为原点考虑,当需要计算时再计算\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 else {\n m = null;\n }\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 lastLv = lv;\n lastMatrix = m;\n // 子元素有cacheTotal优先使用,也一定是子元素,局部根节点不会进\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal]);\n if(i !== index && target) {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n // 跳过display:none元素和它的所有子节点\n if(display === 'none') {\n continue;\n }\n let mixBlendMode = computedStyle[MIX_BLEND_MODE];\n if(isValidMbm(mixBlendMode)) {\n ctxTotal.globalCompositeOperation = mbmName(mixBlendMode);\n }\n else {\n ctxTotal.globalCompositeOperation = 'source-over';\n }\n ctxTotal.globalAlpha = __config[NODE_OPACITY];\n Cache.drawCache(target, cacheTotal);\n ctxTotal.globalCompositeOperation = 'source-over';\n }\n else {\n if(refreshLevel >= REPAINT) {\n // 手动计算cacheStyle和根据border-box的坐标再渲染\n node.__calCache(renderMode, ctxTotal, __config[NODE_DOM_PARENT],\n __config[NODE_CACHE_STYLE], __config[NODE_CURRENT_STYLE], computedStyle,\n node.clientWidth, node.clientHeight, node.offsetWidth, node.offsetHeight,\n computedStyle[BORDER_TOP_WIDTH], computedStyle[BORDER_RIGHT_WIDTH],\n computedStyle[BORDER_BOTTOM_WIDTH], computedStyle[BORDER_LEFT_WIDTH],\n computedStyle[PADDING_TOP], computedStyle[PADDING_RIGHT],\n computedStyle[PADDING_BOTTOM], computedStyle[PADDING_LEFT],\n node.__sx1, node.__sx2, node.__sx3, node.__sx4, node.__sx5, node.__sx6,\n node.__sy1, node.__sy2, node.__sy3, node.__sy4, node.__sy5, node.__sy6);\n }\n let res = node.render(renderMode, refreshLevel, ctxTotal, i === index ? LOCAL : CHILD, dx, dy);\n let { offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow } = res || {};\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_BLEND, offscreenBlend]);\n ctxTotal = offscreenBlend.target.ctx;\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n // 最后一个遮罩索引因数量不好计算,放在maskStartHash做\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = [i, hasMask, offscreenMask];\n ctxTotal = offscreenMask.target.ctx;\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_FILTER, offscreenFilter]);\n ctxTotal = offscreenFilter.target.ctx;\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_OVERFLOW, offscreenOverflow]);\n ctxTotal = offscreenOverflow.target.ctx;\n }\n // 离屏应用,按照lv从大到小即子节点在前先应用,同一个节点多个效果按offscreen优先级从小到大来,\n // 由于mask特殊索引影响,所有离屏都在最后一个mask索引判断,此时mask本身优先结算,以index序大到小判断\n if(offscreenHash.hasOwnProperty(i)) {\n ctxTotal = applyOffscreen(ctxTotal, offscreenHash[i], width, height);\n }\n // render后判断可见状态,此时computedStyle才有值\n if(display === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n }\n }\n }\n }\n // 恢复,且局部根节点设置NONE\n assignMatrix(config[NODE_MATRIX_EVENT], baseMatrix);\n config[NODE_REFRESH_LV] = NONE;\n }\n // cacheTotal仍在说明 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 [DISPLAY]: display,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n } = computedStyle;\n // 特殊渲染的matrix,局部根节点为原点考虑,本节点需inverse反向\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal]);\n if(target) {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n // 跳过display:none元素和它的所有子节点\n if(display === 'none') {\n continue;\n }\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 ctx.globalAlpha = __config[NODE_OPACITY];\n Cache.drawCache(target, cacheMask, transform, mx.identity(), tfo.slice(0), parentMatrix, inverse);\n ctx.globalCompositeOperation = 'source-over';\n }\n // 等于将外面bbox计算和渲染合一的过程,但不需要bbox本身的内容\n else {\n let {\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_CACHE_STYLE]: __cacheStyle,\n } = __config;\n let matrix, opacity;\n if(refreshLevel < REPAINT) {\n if(contain(refreshLevel, TRANSFORM_ALL)) {\n matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n assignMatrix(__config[NODE_MATRIX], matrix);\n }\n else {\n matrix = __config[NODE_MATRIX];\n }\n if(contain(refreshLevel, OP)) {\n computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n opacity = computedStyle[OPACITY];\n if(contain(refreshLevel, FT)) {\n node.__bbox = null;\n node.__filterBbox = null;\n node.__calFilter(currentStyle, computedStyle);\n }\n matrix = __config[NODE_MATRIX];\n if(contain(refreshLevel, MBM)) {\n computedStyle[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE];\n }\n }\n else {\n node.__bbox = null;\n node.__filterBbox = null;\n if(i === index) {\n node.__calFilter(currentStyle, computedStyle);\n }\n matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n assignMatrix(__config[NODE_MATRIX], matrix);\n opacity = computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n // opacity可临时赋值下面循环渲染用,matrixEvent可能需重新计算,因为局部根节点为E没考虑继承,这里仅计算bbox用\n if(i === index) {\n opacity = 1;\n matrix = mx.identity();\n }\n else if(parentMatrix) {\n matrix = multiply(parentMatrix, matrix);\n }\n assignMatrix(__config[NODE_MATRIX_EVENT], matrix);\n lastOpacity = __config[NODE_OPACITY] = parentOpacity * opacity;\n // 特殊渲染的matrix,局部根节点为原点考虑,当需要计算时再计算\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 else {\n m = null;\n }\n lastMatrix = m;\n if(m) {\n // 很多情况mask和target相同matrix,可简化计算\n if(util.equalArr(m, inverse)) {\n m = mx.identity();\n }\n else {\n inverse = mx.inverse(inverse);\n m = mx.multiply(inverse, m);\n }\n }\n if(m) {\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n }\n else {\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n }\n if(refreshLevel >= REPAINT) {\n // 手动计算cacheStyle和根据border-box的坐标再渲染\n node.__calCache(renderMode, ctx, __config[NODE_DOM_PARENT],\n __config[NODE_CACHE_STYLE], __config[NODE_CURRENT_STYLE], computedStyle,\n node.clientWidth, node.clientHeight, node.offsetWidth, node.offsetHeight,\n computedStyle[BORDER_TOP_WIDTH], computedStyle[BORDER_RIGHT_WIDTH],\n computedStyle[BORDER_BOTTOM_WIDTH], computedStyle[BORDER_LEFT_WIDTH],\n computedStyle[PADDING_TOP], computedStyle[PADDING_RIGHT],\n computedStyle[PADDING_BOTTOM], computedStyle[PADDING_LEFT],\n node.__sx1, node.__sx2, node.__sx3, node.__sx4, node.__sx5, node.__sx6,\n node.__sy1, node.__sy2, node.__sy3, node.__sy4, node.__sy5, node.__sy6);\n }\n let res = node.render(renderMode, refreshLevel, ctx, CHILD, dx, dy);\n let { offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow } = res || {};\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_BLEND, offscreenBlend]);\n ctx = offscreenBlend.target.ctx;\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n // 最后一个遮罩索引因数量不好计算,放在maskStartHash做\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = [i, hasMask, offscreenMask];\n ctx = offscreenMask.target.ctx;\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_FILTER, offscreenFilter]);\n ctx = offscreenFilter.target.ctx;\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_OVERFLOW, offscreenOverflow]);\n ctx = offscreenOverflow.target.ctx;\n }\n // 离屏应用,按照lv从大到小即子节点在前先应用,同一个节点多个效果按offscreen优先级从小到大来,\n // 由于mask特殊索引影响,所有离屏都在最后一个mask索引判断,此时mask本身优先结算,以index序大到小判断\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n // render后判断可见状态,此时computedStyle才有值\n if(display === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n }\n }\n }\n }\n });\n }\n }\n}\n\nfunction resetMatrixCacheTotal(__structs, index, total, lv, matrixEvent) {\n let matrixList = [];\n let parentMatrix;\n let lastMatrix = matrixEvent;\n let lastLv = lv;\n for(let i = index + 1, len = index + (total || 0) + 1; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n // 排除Text\n if(node instanceof Text) {\n continue;\n }\n let __config = node.__config;\n let {\n [NODE_MATRIX_EVENT]: old,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_CACHE_STYLE]: cacheStyle,\n } = __config;\n // 跳过display:none元素和它的所有子节点和mask\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n continue;\n }\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树\n 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 old = old.slice(0);\n // 计算真正的相对于root原点的matrix\n cacheStyle[MATRIX] = null;\n let matrix = node.__calMatrix(REPAINT, cacheStyle, currentStyle, computedStyle, __config);\n assignMatrix(__config[NODE_MATRIX], matrix);\n if(!isE(parentMatrix)) {\n matrix = multiply(parentMatrix, matrix);\n }\n assignMatrix(__config[NODE_MATRIX_EVENT], matrix);\n lastMatrix = matrix;\n // 深度遍历递归进行\n if(__cacheTotal && __cacheTotal.available) {\n let needReset = __cacheTotal.isNew;\n if(!needReset && !util.equalArr(old, matrix)) {\n needReset = true;\n }\n if(needReset) {\n resetMatrixCacheTotal(__structs, i, total || 0, lv, matrix);\n }\n __cacheTotal.__isNew = false;\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n }\n }\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 {\n [STRUCT_TOTAL]: total,\n } = __structs[start];\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 gl\n * @param texCache\n * @param node\n * @param __config\n * @param index\n * @param total\n * @param __structs\n * @param cache\n * @param limitCache\n * @param hasMbm\n * @param W\n * @param H\n * @returns {*}\n */\nfunction genTotalWebgl(gl, texCache, node, __config, index, total, __structs, cache, limitCache, hasMbm, 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.WEBGL, 0, gl, NA, 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 [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let __config = node.__config;\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, __config[NODE_CACHE], opacity, matrix, cx, cy, dx, dy, false);\n }\n // 再看total缓存/cache,都没有的是无内容的Xom节点\n else {\n let {\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_IS_MASK]: isMask,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n [MIX_BLEND_MODE]: mixBlendMode,\n },\n } = __config;\n if(display === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n continue;\n }\n // mask和不可见不能被汇总到top上\n if((visibility === 'hidden' || isMask) && !node.hookGlRender) {\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) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n }\n }\n // webgl特殊的外部钩子,比如粒子组件自定义渲染时调用\n if(node.hookGlRender) {\n node.hookGlRender(gl, opacity, matrix, cx, cy, dx, dy, false);\n }\n }\n }\n if(node.hookGlRender) {\n node.hookGlRender(gl, 1, null, cx, cy, dx, dy, false);\n }\n // 绘制到fbo的纹理对象上并删除fbo恢复\n texCache.refresh(gl, cx, cy);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.viewport(0, 0, W, H);\n gl.deleteFramebuffer(frameBuffer);\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, __config, 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 [NODE_COMPUTED_STYLE]: {\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n },\n } = __config;\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 {\n [STRUCT_INDEX]: index,\n [STRUCT_TOTAL]: total,\n } = item.__config[NODE_STRUCT];\n // 可以忽略mbm,因为只有透明遮罩\n for(let i = index, len = index + (total || 0) + 1; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let __config = node.__config;\n let {\n [NODE_CACHE]: __cache,\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_LIMIT_CACHE]: limitCache,\n } = __config;\n // 跳过display:none元素和它的所有子节点和mask\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\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 [NODE_CACHE]: __cache,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_COMPUTED_STYLE]: {\n [OPACITY]: opacity,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n },\n } = __config;\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) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\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.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 [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let {\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_DEFS_CACHE]: defsCache,\n } = node.__config;\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 defsCache.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 lastConfig;\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n [STRUCT_LV]: lv,\n } = __structs[i];\n let __config = node.__config;\n let {\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_DEFS_CACHE]: defsCache,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = __config;\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][STRUCT_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(lastConfig[NODE_MATRIX]);\n let vd = lastConfig[NODE_VIRTUAL_DOM];\n vdList.push(vd);\n parentVd = vd;\n }\n lastConfig = __config;\n let virtualDom;\n // svg小刷新等级时直接修改vd,这样Geom不再感知\n if(refreshLevel < REPAINT && !(node instanceof Text)) {\n __config[NODE_REFRESH_LV] = NONE;\n virtualDom = __config[NODE_VIRTUAL_DOM];\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 = __config[NODE_VIRTUAL_DOM] = 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 {\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_CACHE_STYLE]: __cacheStyle,\n } = __config;\n if(contain(refreshLevel, TRANSFORM_ALL)) {\n let matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n // 恶心的v8性能优化\n let m = __config[NODE_MATRIX];\n assignMatrix(m, 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 // 恶心的v8性能优化\n m = __config[NODE_MATRIX_EVENT];\n assignMatrix(m, matrix);\n }\n if(contain(refreshLevel, OP)) {\n let opacity = computedStyle[OPACITY] = currentStyle[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 = node.__calFilter(currentStyle, computedStyle);\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] = currentStyle[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 __config[NODE_DEFS_CACHE] && __config[NODE_DEFS_CACHE].splice(0);\n node.render(renderMode, refreshLevel, ctx, NA, 0, 0);\n virtualDom = __config[NODE_VIRTUAL_DOM];\n // 渲染后更新取值\n display = computedStyle[DISPLAY];\n if(display === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += hasMask;\n }\n }\n }\n /**\n * mask会在join时过滤掉,这里将假设正常渲染的vd的内容获取出来组成defs的mask内容\n * 另外最初遍历时记录了会影响的mask,在=REPAINT始终重新设置\n * 本身有matrix也需要重设\n */\n if(maskHash.hasOwnProperty(i) && (maskEffectHash.hasOwnProperty(i) || refreshLevel >= REPAINT || contain(refreshLevel, TRANSFORM_ALL | OP))) {\n let { index, start, end, isClip } = maskHash[i];\n let target = __structs[index];\n let dom = target[STRUCT_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][STRUCT_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 = defsCache.length - 1; i >= 0; i--) {\n let item = defsCache[i];\n if(item.tagName === 'mask') {\n defsCache.splice(i, 1);\n }\n }\n let o = {\n tagName: 'mask',\n props: [],\n children: mChildren,\n };\n let id = ctx.add(o);\n defsCache.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 = __config[NODE_MATRIX];\n parentVd = virtualDom;\n }\n lastLv = lv;\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 matrixList = [];\n let parentMatrix;\n let opacityList = [];\n let parentOpacity = 1;\n let pmList = [];\n let parentPm;\n let lastRefreshLevel;\n let lastConfig;\n let lastLv = 0;\n let mergeList = [];\n let hasMbm; // 是否有混合模式出现\n /**\n * 先一遍先序遍历每个节点绘制到自己__cache上,排除Text和已有的缓存以及局部根缓存,\n * 根据refreshLevel进行等级区分,可能是=REPAINT,REFLOW布局已前置处理完。\n * 首次绘制没有catchTotal等,后续则可能会有,在= REPAINT) {\n node.render(renderMode, REPAINT, gl, SELF, 0, 0);\n }\n continue;\n }\n let __config = node.__config;\n let refreshLevel = __config[NODE_REFRESH_LV];\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,Root节点是第一个特殊处理\n if(i === 0) {}\n else if(lv > lastLv) {\n parentMatrix = lastConfig[NODE_MATRIX_EVENT];\n if(isE(parentMatrix)) {\n parentMatrix = null;\n }\n matrixList.push(parentMatrix);\n parentOpacity = lastConfig[NODE_OPACITY];\n opacityList.push(parentOpacity);\n parentPm = lastConfig[NODE_PERSPECTIVE_MATRIX];\n if(isE(parentPm)) {\n parentPm = null;\n }\n pmList.push(parentPm);\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 pmList.splice(-diff);\n parentPm = pmList[lv - 1];\n }\n // 不变是同级兄弟,无需特殊处理 else {}\n lastRefreshLevel = refreshLevel;\n lastConfig = __config;\n lastLv = lv;\n let {\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = __config;\n // 跳过display:none元素和它的所有子节点\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n // 只跳过自身不能跳过后面的mask,mask要渲染自身并进行缓存cache,以备对象切换display用\n continue;\n }\n let hasRecordAsMask;\n /**\n * lv=REPAINT那里,小变化不动\n * 当有遮罩时,如果被遮罩节点本身无变更,需要检查其next的遮罩节点有无变更,\n * 但其实不用检查,因为next变更一定会清空cacheMask,只要检查cacheMask即可\n * 如果没有或无效,直接添加,无视节点本身变化,后面防重即可\n */\n if(refreshLevel < REPAINT) {\n __config[NODE_REFRESH_LV] = NONE;\n let {\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_CACHE_STYLE]: __cacheStyle,\n [NODE_MATRIX_EVENT]: matrixEvent,\n } = __config;\n if(contain(refreshLevel, PPT)) {\n node.__calPerspective(__cacheStyle, currentStyle, computedStyle, __config);\n }\n // transform变化,父元素的perspective变化也会在Root特殊处理重新计算\n let matrix;\n if(contain(refreshLevel, TRANSFORM_ALL)) {\n matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n assignMatrix(__config[NODE_MATRIX], matrix);\n }\n else {\n matrix = __config[NODE_MATRIX];\n }\n // 先左乘perspective的矩阵,再左乘父级的总矩阵\n if(parentPm) {\n matrix = multiply(parentPm, matrix);\n }\n if(parentMatrix) {\n matrix = multiply(parentMatrix, matrix);\n }\n // 恶心的v8性能优化\n assignMatrix(matrixEvent, matrix);\n let opacity;\n if(contain(refreshLevel, OP)) {\n opacity = computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n else {\n opacity = computedStyle[OPACITY];\n }\n __config[NODE_OPACITY] = parentOpacity * opacity;\n // filter会改变bbox范围\n if(contain(refreshLevel, FT)) {\n node.__bbox = null;\n node.__filterBbox = null;\n node.__calFilter(currentStyle, computedStyle);\n }\n if(contain(refreshLevel, MBM)) {\n computedStyle[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE];\n }\n // total可以跳过所有孩子节点省略循环,filter/mask等的强制前提是有total\n if(__cacheTotal && __cacheTotal.available) {\n i += (total || 0);\n }\n }\n /**\n * >=REPAINT重新渲染,并根据结果判断是否离屏限制错误\n * Geom没有子节点无需汇总局部根,Dom中Img也是,它们的局部根等于自身的cache,其它符合条件的Dom需要生成\n */\n else {\n let res = node.render(renderMode, refreshLevel, gl, SELF, 0, 0);\n // geom可返回texture纹理,替代原有xom的__cache纹理\n if(res && inject.isWebGLTexture(res.texture)) {\n let { __sx1: sx1, __sy1: sy1, offsetWidth: w, offsetHeight: h, bbox } = node;\n __config[NODE_CACHE] = new MockCache(gl, res.texture, sx1, sy1, w, h, bbox);\n gl.viewport(0, 0, width, height);\n gl.useProgram(gl.program);\n }\n }\n // 每个元素检查cacheTotal生成,已有的上面会continue跳过\n let {\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_CACHE_AS_BITMAP]: cacheAsBitmap,\n } = __config;\n let {\n [OVERFLOW]: overflow,\n [FILTER]: filter,\n [MIX_BLEND_MODE]: mixBlendMode,\n [TRANSFORM]: transform,\n } = computedStyle;\n let validMbm = isValidMbm(mixBlendMode);\n // 3d渲染上下文\n let isPerspective = tf.isPerspectiveMatrix(transform) || parentPm;\n if(cacheAsBitmap || hasMask || filter.length || (overflow === 'hidden' && total) || validMbm || isPerspective) {\n if(validMbm) {\n hasMbm = true;\n }\n if(hasRecordAsMask) {\n hasRecordAsMask[5] = limitCache;\n hasRecordAsMask[7] = filter;\n hasRecordAsMask[8] = overflow;\n hasRecordAsMask[9] = isPerspective;\n hasRecordAsMask[10] = cacheAsBitmap;\n }\n else {\n mergeList.push([i, lv, total, node, __config, limitCache, hasMask, filter, overflow, isPerspective, cacheAsBitmap]);\n }\n }\n }\n let limitHash = {};\n // 根据收集的需要合并局部根的索引,尝试合并,按照层级从大到小,索引从大到小的顺序,\n // 这样保证子节点在前,后节点在前,后节点是为了mask先应用自身如filter之后再进行遮罩\n if(mergeList.length) {\n mergeList.sort(function(a, b) {\n if(a[1] === b[1]) {\n return b[0] - a[0];\n }\n return b[1] - a[1];\n });\n // ppt只有嵌套才需要生成,最下面的孩子节点的ppt无需,因此记录一个hash存index,\n // 同时因为是后序遍历,孩子先存所有父亲的index即可保证父亲才能生成cacheTotal\n let pptHash = {};\n mergeList.forEach(item => {\n let [i, lv, total, node, __config, limitCache, hasMask, filter, overflow, isPerspective, cacheAsBitmap] = item;\n // 有ppt的,向上查找所有父亲index记录,可能出现重复记得提前跳出\n if(isPerspective) {\n let parent = __config[NODE_DOM_PARENT];\n while(parent) {\n let config = parent.__config;\n let idx = config[NODE_STRUCT][STRUCT_INDEX];\n if(pptHash[idx]) {\n break;\n }\n if(tf.isPerspectiveMatrix(config[NODE_MATRIX]) || config[NODE_PERSPECTIVE_MATRIX]) {\n pptHash[idx] = true;\n }\n parent = config[NODE_DOM_PARENT];\n }\n if(!pptHash[i] && !hasMask && !filter.length && overflow !== 'hidden' && !cacheAsBitmap) {\n return;\n }\n }\n let {\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n } = __config;\n let needGen;\n // 可能没变化,比如被遮罩节点、filter变更等\n if(!__cacheTotal || !__cacheTotal.available) {\n let [limit, res] = genTotalWebgl(gl, texCache, node, __config, i, total || 0, __structs, __cache, limitCache, hasMbm, width, height);\n __cacheTotal = res;\n needGen = true;\n limitCache = limit;\n // 返回的limit包含各种情况超限,一旦超限,只能生成临时cacheTotal不能保存\n if(!limitCache) {\n __config[NODE_CACHE_TOTAL] = 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 __config[NODE_CACHE_OVERFLOW] = target;\n }\n }\n }\n else {\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 __config[NODE_CACHE_FILTER] = target;\n }\n }\n }\n else {\n target = __cacheFilter;\n }\n }\n if(hasMask && (!__cacheMask || !__cacheMask.available || needGen)) {\n target = genMaskWebgl(gl, texCache, node, __config, target, width, height, lv, __structs);\n if(!limitCache) {\n __config[NODE_CACHE_MASK] = 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 [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let __config = node.__config;\n // text如果display不可见,parent会直接跳过,不会走到这里,这里一定是直接绘制到root的,visibility在其内部判断\n if(node instanceof Text) {\n // text特殊之处,__config部分是复用parent的\n let {\n [NODE_CACHE]: __cache,\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_DOM_PARENT]: {\n __config: {\n [NODE_MATRIX_EVENT]: matrixEvent,\n [NODE_OPACITY]: opacity,\n },\n },\n } = __config;\n if(__cache && __cache.available) {\n texCache.addTexAndDrawWhenLimit(gl, __cache, opacity, matrixEvent, cx, cy, 0, 0,true);\n }\n // 超限特殊处理,先生成画布尺寸大小的纹理然后原始位置绘制\n else if(limitCache) {\n let c = inject.getCacheCanvas(width, height, '__$$OVERSIZE$$__');\n node.render(renderMode, 0, gl, NA, 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, 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 {\n [NODE_OPACITY]: opacity,\n [NODE_MATRIX_EVENT]: matrixEvent,\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [MIX_BLEND_MODE]: mixBlendMode,\n },\n } = __config;\n if(display === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n continue;\n }\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, matrixEvent, 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, matrixEvent, cx, cy, 0, 0, true);\n }\n if(target !== __cache) {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\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, matrixEvent, 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, matrixEvent, cx, cy, 0, 0, true);\n }\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n }\n // 超限的情况,这里是普通单节点超限,没有合成total后再合成特殊cache如filter/mask/mbm之类的,\n // 直接按原始位置绘制到离屏canvas,再作为纹理绘制即可,特殊的在total那做过降级了\n else if(limitCache && display !== 'none' && visibility !== 'hidden') {\n let c = inject.getCacheCanvas(width, height, '__$$OVERSIZE$$__');\n node.render(renderMode, refreshLevel, gl, NA, 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, 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 // webgl特殊的外部钩子,比如粒子组件自定义渲染时调用\n if(node.hookGlRender) {\n node.hookGlRender(gl, opacity, matrixEvent, cx, cy, 0, 0, true);\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 [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n // 排除Text,要么根节点直接绘制,要么被局部根节点汇总,自身并不缓存(fillText比位图更快)\n if(node instanceof Text) {\n continue;\n }\n let __config = node.__config;\n let {\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_CACHE_AS_BITMAP]: cacheAsBitmap,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = __config;\n if(refreshLevel >= REPAINT) {\n node.__calCache(renderMode, ctx, __config[NODE_DOM_PARENT],\n __config[NODE_CACHE_STYLE], __config[NODE_CURRENT_STYLE], computedStyle,\n node.clientWidth, node.clientHeight, node.offsetWidth, node.offsetHeight,\n computedStyle[BORDER_TOP_WIDTH], computedStyle[BORDER_RIGHT_WIDTH],\n computedStyle[BORDER_BOTTOM_WIDTH], computedStyle[BORDER_LEFT_WIDTH],\n computedStyle[PADDING_TOP], computedStyle[PADDING_RIGHT],\n computedStyle[PADDING_BOTTOM], computedStyle[PADDING_LEFT],\n node.__sx1, node.__sx2, node.__sx3, node.__sx4, node.__sx5, node.__sx6,\n node.__sy1, node.__sy2, node.__sy3, node.__sy4, node.__sy5, node.__sy6);\n }\n if(cacheAsBitmap) {\n // 跳过display:none元素和它的所有子节点\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n continue;\n }\n mergeList.push([i, lv, total, node, __config, hasMask]);\n }\n }\n /**\n * 根据收集的需要合并局部根的索引,尝试合并,按照层级从大到小,索引从大到小的顺序,\n * 这样保证子节点在前,后节点在前(mask在后面),渲染顺序正确\n */\n if(mergeList.length) {\n mergeList.sort(function(a, b) {\n if(a[1] === b[1]) {\n return b[0] - a[0];\n }\n return b[1] - a[1];\n });\n mergeList.forEach(item => {\n let [i, lv, total, node, __config, hasMask] = item;\n genTotal(renderMode, node, __config, i, lv, total || 0, __structs, hasMask, width, height);\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 [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n // text如果display不可见,parent会直接跳过,不会走到这里,这里一定是直接绘制到root的,visibility在其内部判断\n if(node instanceof Text) {\n node.render(renderMode, REPAINT, ctx, NA, 0, 0);\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n }\n else {\n let __config = node.__config;\n let {\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [MIX_BLEND_MODE]: mixBlendMode,\n [OPACITY]: opacity,\n },\n } = __config;\n // 遮罩对象申请了个离屏,其第一个mask申请另外一个离屏mask2,开始聚集所有mask元素的绘制,\n // 这是一个十分特殊的逻辑,保存的index是最后一个节点的索引,OFFSCREEN_MASK2是最低优先级,\n // 这样当mask本身有filter时优先自身,然后才是OFFSCREEN_MASK2\n if(maskStartHash.hasOwnProperty(i)) {\n let [idx, n, 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(--n) {\n let { [STRUCT_TOTAL]: total } = __structs[j];\n j += (total || 0) + 1;\n }\n j--;\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([idx, lv, OFFSCREEN_MASK, offscreenMask]);\n list.push([j, lv, OFFSCREEN_MASK2, {\n ctx, // 保存等待OFFSCREEN_MASK2时还原\n target,\n }]);\n ctx = target.ctx;\n }\n // 有cache声明从而有total的可以直接绘制并跳过子节点索,total生成可能会因超限而失败\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal]);\n if(target) {\n let j = i;\n i += (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n // total的none直接跳过\n if(display === 'none') {\n continue;\n }\n if(isValidMbm(mixBlendMode)) {\n ctx.globalCompositeOperation = mbmName(mixBlendMode);\n }\n else {\n ctx.globalCompositeOperation = 'source-over';\n }\n // cache需要计算matrixEvent,因为局部根节点临时视为E,根据refreshLevel决定\n let matrix = __config[NODE_MATRIX], matrixEvent = __config[NODE_MATRIX_EVENT];\n let old = matrixEvent.slice(0);\n let parentMatrix = __config[NODE_DOM_PARENT].matrixEvent;\n if(parentMatrix && !isE(parentMatrix)) {\n matrix = multiply(parentMatrix, matrix);\n }\n util.assignMatrix(matrixEvent, matrix);\n Cache.draw(ctx, opacity, matrixEvent, target);\n // total应用后记得设置回来\n ctx.globalCompositeOperation = 'source-over';\n // 父超限但子有total的时候,i此时已经增加到了末尾,也需要检查\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n // 有cache的可以跳过子节点,但如果matrixEvent变化还是需要遍历计算一下的,虽然跳过了渲染\n // 如果cache是新的,则需要完整遍历设置一次\n // 如果isNew为false,则计算下局部根节点再对比下看是否有变化,无变化可省略\n let needReset = __cacheTotal.isNew;\n if(!needReset && !util.equalArr(old, matrixEvent)) {\n needReset = true;\n }\n if(needReset) {\n resetMatrixCacheTotal(__structs, j, total || 0, lv, matrixEvent);\n }\n __cacheTotal.__isNew = false;\n }\n // 没有cacheTotal是普通节点绘制\n else {\n let res = node.render(renderMode, refreshLevel, ctx, NA, 0, 0);\n let { offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow } = res || {};\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_BLEND, offscreenBlend]);\n ctx = offscreenBlend.target.ctx;\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n // 最后一个遮罩索引因数量不好计算,放在maskStartHash做\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = [i, hasMask, offscreenMask];\n ctx = offscreenMask.target.ctx;\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_FILTER, offscreenFilter]);\n ctx = offscreenFilter.target.ctx;\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_OVERFLOW, offscreenOverflow]);\n ctx = offscreenOverflow.target.ctx;\n }\n // 离屏应用,按照lv从大到小即子节点在前先应用,同一个节点多个效果按offscreen优先级从小到大来,\n // 由于mask特殊索引影响,所有离屏都在最后一个mask索引判断,此时mask本身优先结算,以index序大到小判断\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n // render后判断可见状态,此时computedStyle才有值,none可以忽略渲染,但是可能会跳过offscreenHash预置的索引\n if(display === 'none') {\n let add = (total || 0) + countMaskNum(__structs, i + (total || 0) + 1, hasMask || 0);\n for(let j = i + 1; j <= i + add; j++) {\n if(offscreenHash.hasOwnProperty(j)) {\n ctx = applyOffscreen(ctx, offscreenHash[j], width, height);\n }\n }\n i += add;\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 Xom from './Xom';\nimport Component from './Component';\nimport Defs from './Defs';\nimport Geom from './geom/Geom';\nimport builder from '../util/builder';\nimport updater from '../util/updater';\nimport util from '../util/util';\nimport domDiff from '../util/diff';\nimport css from '../style/css';\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 MARGIN_TOP,\n MARGIN_LEFT,\n MARGIN_BOTTOM,\n PADDING_TOP,\n PADDING_LEFT,\n PADDING_BOTTOM,\n BORDER_TOP_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n POINTER_EVENTS,\n WRITING_MODE,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_STYLE,\n UPDATE_KEYS,\n UPDATE_COMPONENT,\n UPDATE_FOCUS,\n UPDATE_OVERWRITE,\n UPDATE_LIST,\n UPDATE_CONFIG,\n UPDATE_ADD_DOM,\n UPDATE_REMOVE_DOM,\n },\n NODE_KEY: {\n NODE_TAG_NAME,\n NODE_CACHE_STYLE,\n NODE_CACHE_PROPS,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_CURRENT_PROPS,\n NODE_DOM_PARENT,\n NODE_IS_MASK,\n NODE_REFRESH_LV,\n NODE_IS_DESTROYED,\n NODE_STYLE,\n NODE_UPDATE_HASH,\n NODE_UNIQUE_UPDATE_ID,\n NODE_CACHE,\n NODE_CACHE_TOTAL,\n NODE_CACHE_FILTER,\n NODE_CACHE_OVERFLOW,\n NODE_CACHE_MASK,\n NODE_STRUCT,\n },\n STRUCT_KEY: {\n STRUCT_INDEX,\n STRUCT_TOTAL,\n STRUCT_NODE,\n }\n} = enums;\nconst DIRECTION_HASH = {\n [TOP]: true,\n [RIGHT]: true,\n [BOTTOM]: true,\n [LEFT]: true,\n};\nconst { isNil, isObject, isFunction } = util;\nconst { AUTO, PX, PERCENT, INHERIT } = unit;\nconst { isRelativeOrAbsolute, equalStyle } = css;\nconst { contain, getLevel, isRepaint, NONE, FILTER, PERSPECTIVE, REPAINT, REFLOW, REBUILD } = level;\nconst { isIgnore, 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, 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\n// 提取出对比节点尺寸是否固定非AUTO\nfunction isFixedWidthOrHeight(node, k) {\n let c = node.currentStyle[k];\n return c[1] !== AUTO;\n}\n// 除了固定尺寸,父级也不能是flex或变化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.currentStyle[DISPLAY] === 'flex' || parent.computedStyle[DISPLAY] === 'flex') {\n return false;\n }\n }\n }\n return res;\n}\n\nfunction isLAYOUT(node) {\n return node.hasOwnProperty('__uniqueReflowId');\n}\n\nlet __uniqueReflowId = 0;\nfunction setLAYOUT(node, hash, component, addDom) {\n if(!node.hasOwnProperty('__uniqueReflowId')) {\n node.__uniqueReflowId = __uniqueReflowId;\n hash[__uniqueReflowId++] = {\n node,\n component,\n addDom,\n };\n }\n}\n\n/**\n * 单独提出共用检测影响的函数,从节点本身开始向上分析影响,找到最上层的影响节点设置其重新布局\n * 过程即__checkReflow中所提及的,各种情况\n * 将影响升至最近的父级节点,并添加布局标识,这样后面的深度遍历会以父级为准忽略本身\n * 如果最终是root,则返回true标识,直接整个重新开始布局\n * ====\n * addDom情况下的特殊影响检测,类似checkInfluence\n * 添加的是absolute则只影响自己,大部分交互游戏情况属于此类型优化\n * 添加的是inline/inlineBlock的话,影响最近非inline父节点\n * 父为flex则直接影响父节点,不管添加情况如何\n * 添加block/flex的话,上下都block/flex则只影响自己,否则还是影响父节点\n * 如果最终是root,则返回true标识,直接整个重新开始布局\n * @returns {boolean}\n */\nfunction checkInfluence(root, reflowHash, node, component, addDom) {\n // add情况abs节点特殊对待不影响其它节点,不能判断display,因为inline会强制block\n if(addDom && node.currentStyle[POSITION] === 'absolute') {\n return;\n }\n let target = node;\n // inline新老都影响,节点变为最近的父非inline\n if(['inline', 'inlineBlock'].indexOf(target.currentStyle[DISPLAY]) > -1\n || ['inline', 'inlineBlock'].indexOf(target.computedStyle[DISPLAY]) > -1) {\n do {\n target = target.domParent;\n // 父到root提前跳出\n if(target === root) {\n return true;\n }\n // 父已有LAYOUT跳出防重\n if(isLAYOUT(target)) {\n return;\n }\n // 遇到absolute跳出,设置其布局;如果absolute不变化普通处理,如果absolute发生变化,一定会存在于列表中,不用考虑\n if(target.currentStyle[POSITION] === 'absolute' || target.computedStyle[POSITION] === 'absolute') {\n setLAYOUT(target, reflowHash, component, addDom);\n return;\n }\n }\n while(target && (['inline', 'inlineBlock'].indexOf(target.currentStyle[DISPLAY]) > -1\n || ['inline', 'inlineBlock'].indexOf(target.computedStyle[DISPLAY]) > -1));\n // target已不是inline,父固定宽高跳出直接父进行LAYOUT即可,不影响上下文,但不能是flex孩子,此时固定尺寸无用\n if(isFixedSize(target, true)) {\n setLAYOUT(target, reflowHash, component, addDom);\n return;\n }\n }\n // 此时target指向node,如果原本是inline则是其flow的非inline父\n let parent = target.domParent;\n // parent有LAYOUT跳出,已被包含\n if(isLAYOUT(parent)) {\n return;\n }\n // 向上检查flex,如果父级中有flex,以最上层的flex视作其更改,node本身flex不进入\n let topFlex;\n do {\n // 父已有LAYOUT跳出防重\n if(isLAYOUT(parent)) {\n return;\n }\n // flex相关,包含变化或不变化\n if(parent.computedStyle[DISPLAY] === 'flex' || parent.currentStyle[DISPLAY] === 'flex') {\n topFlex = parent;\n }\n // 遇到absolute跳出,如果absolute不变化普通处理,如果absolute发生变化,一定会存在于列表中,不用考虑\n if(parent.currentStyle[POSITION] === 'absolute' || parent.computedStyle[POSITION] === 'absolute') {\n break;\n }\n // 父固定宽高跳出\n if(isFixedSize(parent, true)) {\n break;\n }\n parent = parent.domParent;\n }\n while(parent);\n // 找到最上层flex,视作其更改\n if(topFlex) {\n target = topFlex;\n }\n if(target === root) {\n return true;\n }\n parent = target;\n // 向上检查非固定尺寸的absolute,找到则视为其变更,上面过程中一定没有出现absolute\n while(parent) {\n // 无论新老absolute,不变化则设置,变化一定会出现在列表中\n if(parent.currentStyle[POSITION] === 'absolute' || parent.computedStyle[POSITION] === 'absolute') {\n if(parent === root) {\n break;\n }\n // 固定尺寸的不用设置,需要跳出循环\n if(isFixedSize(parent)) {\n break;\n }\n else {\n setLAYOUT(parent, reflowHash, component, addDom);\n return;\n }\n }\n parent = parent.domParent;\n }\n // 向上查找了并且没提前跳出的target如果不等于自身则重新布局,自身外面设置过了\n if(target !== node) {\n setLAYOUT(target, reflowHash, component, addDom);\n }\n else if(addDom) {\n // 前后必须都是block,否则还是视为父布局\n let isSiblingBlock = true;\n let { prev, next } = node;\n if(prev && ['inline', 'inlineBlock'].indexOf(prev.currentStyle[DISPLAY]) > -1) {\n isSiblingBlock = false;\n }\n else if(next && ['inline', 'inlineBlock'].indexOf(next.currentStyle[DISPLAY]) > -1) {\n isSiblingBlock = false;\n }\n if(!isSiblingBlock) {\n target = node.domParent;\n if(target === root) {\n return true;\n }\n setLAYOUT(target, reflowHash, false, true);\n }\n }\n}\n\nlet uniqueUpdateId = 0;\nfunction parseUpdate(renderMode, root, target, reflowList, cacheHash, cacheList, zHash, zList) {\n let {\n [UPDATE_NODE]: node,\n [UPDATE_STYLE]: style,\n [UPDATE_OVERWRITE]: overwrite,\n [UPDATE_FOCUS]: focus,\n [UPDATE_COMPONENT]: component,\n [UPDATE_LIST]: list,\n [UPDATE_KEYS]: keys,\n [UPDATE_CONFIG]: __config,\n [UPDATE_ADD_DOM]: addDom,\n [UPDATE_REMOVE_DOM]: removeDom,\n } = target;\n if(__config[NODE_IS_DESTROYED]) {\n return;\n }\n // updateStyle()这样的调用需要覆盖原有样式,因为是按顺序遍历,后面的优先级自动更高不怕重复\n if(overwrite) {\n Object.assign(__config[NODE_STYLE], overwrite);\n }\n // 多次调用更新才会有list,一般没有,优化;component无需,因为多次都是它自己\n if(list && !component) {\n keys = (keys || []).slice(0); // 防止原始值被更改\n let hash = {};\n keys.forEach(k => {\n hash[k] = true;\n });\n list.forEach(item => {\n let { [UPDATE_STYLE]: style2, [UPDATE_OVERWRITE]: overwrite, [UPDATE_KEYS]: keys2 } = item;\n (keys2 || []).forEach(k2 => {\n if(!hash.hasOwnProperty(k2)) {\n hash[k2] = true;\n keys.push(k2);\n }\n });\n if(overwrite) {\n Object.assign(__config[NODE_STYLE], overwrite);\n }\n if(style2) {\n if(style) {\n Object.assign(style, style2);\n }\n else {\n style = style2;\n }\n }\n });\n }\n // 按节点合并完style后判断改变等级\n let {\n [NODE_TAG_NAME]: tagName,\n [NODE_CACHE_STYLE]: __cacheStyle,\n [NODE_CACHE_PROPS]: __cacheProps,\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_CURRENT_PROPS]: currentProps,\n [NODE_DOM_PARENT]: domParent,\n [NODE_IS_MASK]: isMask,\n } = __config;\n let lv = focus || NONE;\n let hasZ, hasVisibility, hasColor, hasDisplay, hasTsColor, hasTsWidth, hasTsOver;\n // component无需遍历直接赋值,img重新加载等情况没有样式更新\n if(!component && style && keys) {\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n let v = style[k];\n // 只有geom的props和style2种可能\n if(node instanceof Geom && isGeom(tagName, k)) {\n if(!equalStyle(k, v, currentProps[k], node)) {\n lv |= REPAINT;\n __cacheProps[k] = undefined;\n currentProps[k] = v;\n }\n }\n else {\n // 需和现在不等,且不是pointerEvents这种无关的\n if(!equalStyle(k, v, currentStyle[k], node)) {\n // pointerEvents这种无关的只需更新\n if(isIgnore(k)) {\n __cacheStyle[k] = undefined;\n currentStyle[k] = v;\n }\n else {\n // TRBL变化只对relative/absolute起作用,其它忽视\n if(DIRECTION_HASH.hasOwnProperty(k)) {\n let position = currentStyle[POSITION];\n if(position !== 'relative' && position !== 'absolute') {\n delete style[k];\n continue;\n }\n }\n else if(k === DISPLAY) {\n hasDisplay = true;\n }\n // repaint细化等级,reflow在checkReflow()\n lv |= getLevel(k);\n // repaint置空,如果reflow会重新生成空的\n __cacheStyle[k] = undefined;\n currentStyle[k] = v;\n if(k === Z_INDEX && node !== root) {\n hasZ = true;\n }\n else if(k === VISIBILITY) {\n hasVisibility = true;\n }\n else if(k === COLOR) {\n hasColor = true;\n }\n else if(k === TEXT_STROKE_COLOR) {\n hasTsColor = true;\n }\n else if(k === TEXT_STROKE_WIDTH) {\n hasTsWidth = true;\n }\n else if(k === TEXT_STROKE_OVER) {\n hasTsOver = true;\n }\n }\n }\n }\n }\n }\n // 无任何改变处理的去除记录,如pointerEvents、无效的left\n // 但是perspective需考虑进来,虽然不影响自己但影响别人,要返回true表明有变更\n if(lv === NONE && !component) {\n delete __config[NODE_UNIQUE_UPDATE_ID];\n return;\n }\n // 由于父节点中有display:none,或本身节点也为none,执行普通动画是无效的,此时没有display变化\n if(computedStyle[DISPLAY] === 'none' && !hasDisplay) {\n return;\n }\n // 记录下来清除parent的zIndexChildren缓存\n if(hasZ && domParent) {\n delete domParent.__zIndexChildren;\n }\n // 影响子继承REPAINT的变化,如果被cache住需要清除\n if(hasVisibility || hasColor || hasTsColor || hasTsWidth || hasTsOver) {\n for(let __structs = root.__structs, __struct = node.__config[NODE_STRUCT], i = __struct[STRUCT_INDEX] + 1, len = i + __struct[STRUCT_TOTAL]; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n } = __structs[i];\n // text的style指向parent,不用管\n if(node instanceof Text) {\n continue;\n }\n let __config = node.__config;\n let currentStyle = __config[NODE_CURRENT_STYLE];\n let need;\n if(hasVisibility && currentStyle[VISIBILITY][1] === INHERIT) {\n need = true;\n }\n else if(hasColor && currentStyle[COLOR][1] === INHERIT) {\n need = true;\n }\n else if(hasTsColor && currentStyle[TEXT_STROKE_COLOR][1] === INHERIT) {\n need = true;\n }\n else if(hasTsWidth && currentStyle[TEXT_STROKE_WIDTH][1] === INHERIT) {\n need = true;\n }\n else if(hasTsOver && currentStyle[TEXT_STROKE_OVER][1] === INHERIT) {\n need = true;\n }\n if(need) {\n __config[NODE_REFRESH_LV] |= REPAINT;\n node.clearCache();\n }\n else {\n i += total || 0;\n }\n }\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.__config[NODE_CACHE_MASK]) {\n prev.__config[NODE_CACHE_MASK].release();\n }\n }\n // 特殊情况,父节点display:none,子节点进行任意变更,应视为无效\n // 如果父节点由none变block,这里也return false,因为父节点会重新layout+render\n // 如果父节点由block变none,同上,所以只要current/computed里有none就return false\n let parent = domParent;\n if(hasDisplay && parent) {\n let __config = parent.__config;\n if(__config[NODE_CURRENT_STYLE][DISPLAY] === 'none' || __config[NODE_COMPUTED_STYLE][DISPLAY] === 'none') {\n computedStyle[DISPLAY] = 'none';\n return;\n }\n }\n // reflow/repaint相关的记录下来\n let isRp = !component && isRepaint(lv);\n if(isRp) {\n // zIndex变化需清空svg缓存\n if(hasZ && renderMode === mode.SVG) {\n lv |= REPAINT;\n domParent && cleanSvgCache(domParent);\n }\n // z改变影响struct局部重排,它的数量不会变因此不影响外围,此处先收集,最后统一对局部根节点进行更新\n if(hasZ && !component && zHash) {\n if(domParent && !domParent.hasOwnProperty('__uniqueZId')) {\n zHash[uniqueUpdateId] = true;\n domParent.__uniqueZId = uniqueUpdateId++;\n zList.push(domParent);\n }\n }\n }\n // reflow在root的refresh中做\n else {\n reflowList.push({\n node,\n style,\n component,\n addDom,\n removeDom,\n });\n }\n // 这里也需|运算,每次刷新会置0,但是如果父元素进行继承变更,会在此元素分析前更改,比如visibility,此时不能直接赋值\n __config[NODE_REFRESH_LV] |= lv;\n if(component || addDom || removeDom) {\n root.__rlv = REBUILD;\n }\n else {\n root.__rlv = Math.max(root.__rlv, lv);\n }\n // dom在>=REPAINT时total失效,svg的Geom比较特殊\n let need = lv >= REPAINT || renderMode === mode.SVG && node instanceof Geom;\n if(need) {\n if(__config[NODE_CACHE]) {\n __config[NODE_CACHE].release();\n }\n }\n // perspective也特殊只清空total的cache,和>=REPAINT清空total共用\n if(need || contain(lv, PERSPECTIVE)) {\n if(__config[NODE_CACHE_TOTAL]) {\n __config[NODE_CACHE_TOTAL].release();\n }\n if(__config[NODE_CACHE_MASK]) {\n __config[NODE_CACHE_MASK].release();\n }\n if(__config[NODE_CACHE_OVERFLOW]) {\n __config[NODE_CACHE_OVERFLOW].release();\n }\n }\n // 特殊的filter清除cache\n if((need || contain(lv, FILTER)) && __config[NODE_CACHE_FILTER]) {\n __config[NODE_CACHE_FILTER].release();\n }\n // 向上清除等级>=REPAINT的汇总缓存信息,过程中可能会出现重复,因此节点上记录一个临时标防止重复递归\n while(parent) {\n let __config = parent.__config;\n // 向上查找,出现重复跳出\n if(__config.hasOwnProperty(NODE_UNIQUE_UPDATE_ID)) {\n let id = __config[NODE_UNIQUE_UPDATE_ID];\n if(cacheHash.hasOwnProperty(id)) {\n break;\n }\n cacheHash[id] = true;\n }\n // 没有的需要设置一个标识\n else {\n cacheHash[uniqueUpdateId] = true;\n __config[NODE_UNIQUE_UPDATE_ID] = uniqueUpdateId++;\n cacheList.push(__config);\n }\n let lv = __config[NODE_REFRESH_LV];\n let need = lv >= REPAINT;\n if(need && __config[NODE_CACHE]) {\n __config[NODE_CACHE].release();\n }\n // 前面已经过滤了无改变NONE的,只要孩子有任何改变父亲就要清除\n if(__config[NODE_CACHE_TOTAL]) {\n __config[NODE_CACHE_TOTAL].release();\n }\n if(__config[NODE_CACHE_FILTER]) {\n __config[NODE_CACHE_FILTER].release();\n }\n if(__config[NODE_CACHE_MASK]) {\n __config[NODE_CACHE_MASK].release();\n }\n if(__config[NODE_CACHE_OVERFLOW]) {\n __config[NODE_CACHE_OVERFLOW].release();\n }\n parent = __config[NODE_DOM_PARENT];\n }\n return true;\n}\n\nfunction cleanSvgCache(node, child) {\n let __config = node.__config;\n if(child) {\n __config[NODE_REFRESH_LV] |= REPAINT;\n }\n else {\n __config[NODE_CACHE_TOTAL].release();\n }\n if(Array.isArray(node.children)) {\n node.children.forEach(child => {\n if(child instanceof Component) {\n child = child.shadowRoot;\n }\n if(!(child instanceof Text)) {\n cleanSvgCache(child, true);\n }\n });\n }\n}\n\nlet uuid = 0;\n\nclass Root extends Dom {\n constructor(tagName, props, children) {\n super(tagName, props);\n this.__cd = children || []; // 原始children,再初始化过程中生成真正的dom\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.__taskCp = [];\n this.__ref = {};\n this.__reflowList = [{ node: this }]; // 初始化填自己,第一次布局时复用逻辑完全重新布局\n this.__animateController = new Controller();\n Event.mix(this);\n this.__config[NODE_UPDATE_HASH] = this.__updateHash = {};\n this.__uuid = uuid++;\n this.__rlv = REBUILD; // 每次刷新最大lv\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 += `>${domName}>`;\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);\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.__initProps();\n this.__root = this;\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(null, 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 refresh(cb, isFirst) {\n this.__hookTask = null;\n let { isDestroyed, renderMode, ctx, defs, width, height } = this;\n if(isDestroyed) {\n return;\n }\n defs.clear();\n // 首次递归测量整树的继承,后续更改各自更新机制做,防止每次整树遍历;root检查首次直接做,后续在checkUpdate()中插入\n if(isFirst) {\n this.__checkRoot(renderMode, width, height);\n }\n // 非首次刷新如果没有更新则无需继续\n else if(!this.__checkUpdate(renderMode, ctx, width, height)) {\n return;\n }\n this.__checkReflow(width, height);\n if(renderMode === mode.CANVAS && !this.props.noRender) {\n this.__clear(ctx, renderMode);\n struct.renderCanvas(renderMode, ctx, this);\n }\n // svg的特殊diff需要\n else if(renderMode === mode.SVG && !this.props.noRender) {\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 && !this.props.noRender) {\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 /**\n * 为component的setState更新专门开辟个独立的流水线,root/frame中以taskCp存储更新列表\n * 普通的动画、img加载等都走普通的refresh的task,component走这里,frame中的结构同样\n * 在frame的每帧调用中,先执行普通的动画task,再执行component的task\n * 这样动画执行完后,某个cp的sr及子节点依旧先进行了动画变更,进入__addUpdate()环节\n * 然后此cp再更新sr及子节点,这样会被__addUpdate()添加到尾部,依赖目前浏览器默认实现\n * 上一行cp更新过程中是updater.check()进行的,如果有新老交换且有动画,动画的assigning是true,进行继承\n * root刷新parseUpdate()时,老的sr及子节点先进行,随后新的sr后进行且有component标识,sr子节点不会有更新\n * @param cb\n */\n addRefreshCp(cb) {\n let { taskCp, isDestroyed } = this;\n if(isDestroyed) {\n return;\n }\n // 每次只执行1次\n if(!taskCp.length) {\n let clone;\n frame.__nextFrameCp({\n __before: diff => {\n if(this.isDestroyed) {\n return;\n }\n clone = taskCp.splice(0);\n if(clone.length) {\n clone.forEach(item => {\n item.__before(diff);\n });\n updater.check(this);\n let len = updater.updateList.length;\n if(len) {\n updater.updateList.forEach(cp => {\n let root = cp.root; // 多个root并存时可能cp的引用不相同,需分别获取\n let sr = cp.shadowRoot;\n // 可能返回text,需视为其parentNode\n if(sr instanceof Text) {\n sr = sr.domParent;\n }\n let res = {};\n res[UPDATE_NODE] = sr;\n res[UPDATE_STYLE] = sr.currentStyle;\n res[UPDATE_FOCUS] = REFLOW;\n res[UPDATE_COMPONENT] = cp;\n res[UPDATE_CONFIG] = sr.__config;\n this.__addUpdate(sr, sr.__config, root, root.__config, res);\n });\n }\n }\n },\n __after: diff => {\n if(this.isDestroyed) {\n return;\n }\n clone.forEach(item => {\n item.__after(diff);\n });\n // 触发didUpdate\n updater.did();\n },\n });\n this.__frameHook();\n }\n if(taskCp.indexOf(cb) === -1) {\n taskCp.push(cb);\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] = [width, PX];\n currentStyle[HEIGHT] = [height, 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 * 添加更新入口,按节点汇总更新信息\n * @private\n */\n __addUpdate(node, nodeConfig, root, rootConfig, o) {\n let updateHash = rootConfig[NODE_UPDATE_HASH];\n // root特殊处理,检查变更时优先看继承信息\n if(node === root) {\n updateHash = root.__updateRoot;\n if(updateHash) {\n if(o[UPDATE_FOCUS]) {\n updateHash[UPDATE_FOCUS] |= o[UPDATE_FOCUS];\n }\n // 后续存在新建list上,需增加遍历逻辑\n if(o[UPDATE_STYLE]) {\n let list = updateHash[UPDATE_LIST] = updateHash[UPDATE_LIST] || [];\n list.push({\n [UPDATE_STYLE]: o[UPDATE_STYLE],\n [UPDATE_OVERWRITE]: o[UPDATE_OVERWRITE],\n [UPDATE_KEYS]: o[UPDATE_KEYS],\n });\n }\n }\n else {\n root.__updateRoot = o;\n }\n }\n else if(!nodeConfig.hasOwnProperty(NODE_UNIQUE_UPDATE_ID)) {\n nodeConfig[NODE_UNIQUE_UPDATE_ID] = uniqueUpdateId;\n // 大多数情况节点都只有一次更新,所以优化首次直接存在style上,后续存在list\n updateHash[uniqueUpdateId++] = o;\n }\n else if(updateHash.hasOwnProperty(nodeConfig[NODE_UNIQUE_UPDATE_ID])) {\n let target = updateHash[nodeConfig[NODE_UNIQUE_UPDATE_ID]];\n if(o[UPDATE_FOCUS]) {\n target[UPDATE_FOCUS] |= o[UPDATE_FOCUS];\n }\n // 后续存在新建list上,需增加遍历逻辑\n if(o[UPDATE_STYLE]) {\n let list = target[UPDATE_LIST] = target[UPDATE_LIST] || [];\n list.push({\n [UPDATE_STYLE]: o[UPDATE_STYLE],\n [UPDATE_OVERWRITE]: o[UPDATE_OVERWRITE],\n [UPDATE_KEYS]: o[UPDATE_KEYS],\n });\n }\n }\n else {\n inject.error('Update process miss uniqueUpdateId');\n }\n }\n\n /**\n * 除首次外每次刷新前检查更新列表,计算样式变化,以及测量信息\n * @private\n */\n __checkUpdate(renderMode, ctx, width, height) {\n let root = this;\n let reflowList = [];\n let cacheHash = {};\n let cacheList = [];\n let zHash = {};\n let zList = [];\n let updateRoot = root.__updateRoot;\n let updateHash = root.__updateHash;\n // 给个方式使得外部可以强制刷新\n let hasUpdate = root.__hasRootUpdate;\n root.__hasRootUpdate = false;\n // root更新特殊提前,因为有继承因素\n if(updateRoot) {\n root.__updateRoot = null;\n hasUpdate = parseUpdate(renderMode, root, updateRoot,\n reflowList, cacheHash, cacheList);\n // 此时做root检查,防止root出现继承等无效样式,或者发生resize()\n if(hasUpdate) {\n root.__checkRoot(renderMode, width, height);\n }\n }\n // 汇总处理每个节点,k是递增数字直接循环遍历\n let keys = Object.keys(updateHash);\n for(let i = 0, len = keys.length; i < len; i++) {\n let t = parseUpdate(renderMode, root, updateHash[keys[i]],\n reflowList, cacheHash, cacheList, zHash, zList);\n hasUpdate = hasUpdate || t;\n }\n // 先做一部分reset避免下面measureList干扰,cacheList的是专门收集新增的额外节点\n root.__reflowList = reflowList;\n uniqueUpdateId = 0;\n root.__updateHash = root.__config[NODE_UPDATE_HASH] = {};\n cacheList.forEach(__config => {\n delete __config[NODE_UNIQUE_UPDATE_ID];\n });\n // zIndex改变的汇总修改,防止重复操作,有个注意点,有新增的child时,\n // 会在后面的reflow重新build父节点的struct,这里提前更新会报错,里面进行判断\n zList.forEach(item => {\n if(item.hasOwnProperty('__uniqueZId')) {\n delete item.__uniqueZId;\n item.__updateStruct(root.__structs);\n }\n });\n // 做完清空留待下次刷新重来\n for(let i = 0, len = keys.length; i < len; i++) {\n delete updateHash[keys[i]][UPDATE_CONFIG][NODE_UNIQUE_UPDATE_ID];\n }\n return hasUpdate;\n }\n\n /**\n * 除首次外每次刷新前检查reflow列表,计算需要reflow的节点局部重新布局\n * 当一个元素absolute不变时,其变化不会影响父元素和兄弟元素,直接自己重新局部LAYOUT包含子节点\n * 当absolute发生改变时,其变化会影响父和兄弟,视作父重新布局\n * 当inline变化时,视为其最近block/flex父变化\n * 当block变化时,往上查找最上层flex视为其变化,如不是则影响后面兄弟offset和父resize\n * 当flex变化时,往上查找最上层flex视为其变化,如不是则影响所有递归子节点layout和父resize\n * 以上3种情况向上查找时遇到absolute父均提前跳出,并标记absolute父LAYOUT\n * 上面所有情况即便结束还得额外看是否处于absolute中,是还是标记absolute重新布局\n * 当relative只变化left/top/right/bottom时,自己重新layout\n * 检测节点时记录影响的所有节点,最终形成一棵或n棵局部树\n * 需要重新布局的记作LAYOUT,被兄弟影响只需偏移的记作OFFSET,OFFSET可能会重复变为LAYOUT\n * 上述情况倘若发生包含重复,去掉子树,因子树视为被包含的重新布局\n * 如果有从root开始的,直接重新布局像首次那样即可\n * 如果非root,所有树根按先根顺序记录下来,依次执行局部布局\n * =========================\n * addDom比较特殊,是向已有节点中添加新的节点,检查影响与普通domDiff变化不同\n * @private\n */\n __checkReflow(width, height) {\n let { __reflowList: reflowList } = this;\n if(!reflowList.length) {\n return;\n }\n let root = this;\n let uniqueList = [];\n let hasRoot;\n __uniqueReflowId = 0;\n let reflowHash = {};\n // 遍历检查发生布局改变的节点列表,此时computedStyle还是老的,currentStyle是新的\n for(let i = 0, len = reflowList.length; i < len; i++) {\n let item = reflowList[i];\n let { node, component, addDom, removeDom } = item;\n // root提前跳出,完全重新布局\n if(node === this) {\n hasRoot = true;\n break;\n }\n // 添加时如果是cp则node取sr来布局\n if(addDom && node instanceof Component) {\n node = node.shadowRoot;\n }\n // 每个节点生成唯一的布局识别id存入hash防止重复\n if(!node.hasOwnProperty('__uniqueReflowId')) {\n node.__uniqueReflowId = __uniqueReflowId;\n reflowHash[__uniqueReflowId++] = item;\n }\n // 每个节点都向上检查影响,以及是否从root开始完全重新,remove特殊对待,影响父节点视为普通父节点relay\n if(checkInfluence(root, reflowHash, node, component, addDom)) {\n hasRoot = true;\n if(addDom) {\n this.__zIndexChildren = null;\n }\n break;\n }\n // remove的要特殊对待,因为提前删除了父子兄弟关系,下面deepScan不会出现\n else if(removeDom) {\n uniqueList.push(item);\n }\n }\n __uniqueReflowId = 0;\n this.__reflowList = [];\n // 有root提前跳出\n if(hasRoot) {\n reflow.clearUniqueReflowId(reflowHash);\n let isUpright = this.currentStyle[WRITING_MODE].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 });\n this.__structs = this.__structure(0, 0);\n return true;\n }\n /**\n * 修剪树,自顶向下深度遍历\n * LAYOUT节点作为局部根,其递归子节点无需重复任何操作,直接去重\n * OFFSET节点作为局部根,其递归子节点先执行任何操作,后续根节点再偏移一次\n */\n else {\n this.__deepScan(function(node, options) {\n if(node.hasOwnProperty('__uniqueReflowId')) {\n let o = reflowHash[node.__uniqueReflowId];\n options.uniqueList.push(o);\n // 返回true即可提前结束深度遍历,在reflowHash有记录时提前跳出,子节点交由上面逻辑执行\n return true;\n }\n // reflowHash没有记录则无返回继续递归执行\n }, { uniqueList });\n /**\n * 按顺序执行列表即可,上层LAYOUT先执行且停止递归子节点,上层OFFSET后执行等子节点先LAYOUT/OFFSET\n * 同级按先后顺序排列,过程中记录diff在结束后进行structs更新\n * 这里要注意margin合并的逻辑,因为最终都是block(flex等同),需要进行合并\n * 在处理一个block时,先判断是否是空block,同时看后面紧邻的有没有在uniqueList的下一个\n * 单独空block处理、2个相邻的非block处理直接可以进行判断\n * 中间的空block(即非空block的下一个是空block,且下一个不是最后一个),先记录下来list,合并后一并offset\n * 合并margin和Dom的逻辑一样,抽离共有方法\n **/\n let diffList = [];\n let diffI = 0;\n let mergeOffsetList = [];\n let __uniqueMergeOffsetId = 0;\n uniqueList.forEach(item => {\n let { node, component, addDom, removeDom } = item;\n // 重新layout的w/h数据使用之前parent暂存的,x使用parent,y使用prev或者parent的\n let cps = node.computedStyle, cts = node.currentStyle;\n let zIndex = cps[Z_INDEX], position = cps[POSITION], display = cps[DISPLAY];\n let isLastAbs = position === 'absolute';\n let isNowAbs = cts[POSITION] === 'absolute';\n let isLastNone = display === 'none';\n let isNowNone = cts[DISPLAY] === 'none';\n // none不可见布局无效可以无视\n if(isLastNone && isNowNone) {\n return;\n }\n let parent = node.domParent;\n let { __layoutData: { x, y, h }, width, computedStyle } = parent;\n let current = node;\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 if(ref instanceof Text\n || (ref.computedStyle[POSITION] !== 'absolute' && ref.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 if(!removeDom) {\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 }\n // 找到最上层容器,如果是组件的子节点,以sr为container,sr本身往上找\n let container = node;\n // remove的节点本身无需再次布局\n if(!removeDom) {\n if(isNowAbs) {\n container = container.domParent;\n while(container && container !== root) {\n if(isRelativeOrAbsolute(container)) {\n break;\n }\n // 不能用domParent,必须在组件环境内\n if(container.parent) {\n container = container.parent;\n }\n else if(container.host) {\n break;\n }\n }\n if(!container) {\n container = root;\n }\n // 由setState引发的要检查是cp自身还是更上层,如果cp被abs包含,那么node是cp的父亲,否则node是cp的sr\n // 而这种情况下传cp或node都一样,所以最终统一传node\n parent.__layoutAbs(container, parent.__layoutData, node);\n // 优先判断dom变更\n if(addDom) {\n let arr = parent.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n parent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n return;\n }\n // 前后都是abs无需偏移后面兄弟和parent调整,component变化节点需更新struct\n else if(isLastAbs) {\n if(component) {\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n if((position !== cts[POSITION] && (position === 'static' || cts[POSITION] === 'static'))\n || zIndex !== cts[Z_INDEX]) {\n parent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n }\n }\n else if(isLastNone || isNowNone) {\n node.__zIndexChildren = null;\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n }\n return;\n }\n // 标识flow变abs,可能引发zIndex变更,重设struct和svg\n parent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n }\n // 现在是普通流,不管之前是啥直接布局,排除remove删除的\n else {\n node.__layout({\n x,\n y,\n w: width,\n h,\n }, false, false, false);\n y += node.outerHeight;\n if(component) {\n container = node;\n }\n else {\n container = container.domParent;\n while(container && container !== root) {\n if(isRelativeOrAbsolute(container)) {\n break;\n }\n // 不能用domParent,必须在组件环境内\n if(container.parent) {\n container = container.parent;\n }\n else if(container.host) {\n break;\n }\n }\n }\n if(!container) {\n container = root;\n }\n // 防止geom\n if(node instanceof Dom) {\n node.__layoutAbs(container, {\n x,\n y,\n w: width,\n h,\n });\n }\n }\n }\n\n // 向上查找最近的parent是relative,需再次累加ox/oy,无需继续向上递归,因为parent已经递归包含了\n // 这样node重新布局后再次设置其使用parent的偏移\n let p = node;\n while(p && p !== root) {\n p = p.domParent;\n computedStyle = p.computedStyle;\n if(computedStyle[POSITION] === 'relative') {\n let { ox, oy } = p;\n ox && node.__offsetX(ox);\n oy && node.__offsetY(oy);\n break;\n }\n }\n\n // 向下调整next的flow位置,遇到重复LAYOUT的跳出等待其调用并处理其next,忽视掉abs,margin和abs在merge中做\n if(node.isShadowRoot) {\n node = node.hostRoot;\n }\n let next = node.next;\n while(next && !next.hasOwnProperty('__uniqueReflowId')) {\n if(next.computedStyle[POSITION] === 'absolute') {\n next = next.next;\n continue;\n }\n let { y: oy } = next;\n let diff = y - oy;\n if(diff) {\n while(next && !next.hasOwnProperty('__uniqueReflowId')) {\n let target = next;\n if(target instanceof Component) {\n target = target.shadowRoot;\n }\n let cs = target.computedStyle;\n if(cs[POSITION] !== 'absolute' && cs[DISPLAY] !== 'none') {\n target.__offsetY(diff, true, REPAINT);\n }\n next = next.next;\n }\n }\n break;\n }\n\n // 去重防止abs并记录parent,整个结束后按先序顺序进行margin合并以及偏移,注意忽略有display:none变block同时为absolute的\n if(!parent.hasOwnProperty('__uniqueMergeOffsetId') && !(isNowAbs && isLastNone)) {\n parent.__uniqueMergeOffsetId = __uniqueMergeOffsetId++;\n mergeOffsetList.push(parent);\n }\n\n // add和remove都需父节点重新生成struct,zIndexChildren已在对应api操作的before()侦听做了\n if(addDom || removeDom) {\n let arr = parent.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n }\n // component未知dom变化,所以强制重新struct,text则为其父节点,同时防止zIndex变更影响父节点\n else if(component) {\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n if((position !== cts[POSITION] && (position === 'static' || cts[POSITION] === 'static'))\n || zIndex !== cts[Z_INDEX]) {\n node.domParent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(node.domParent);\n }\n }\n }\n // display有none变化,重置struct和zIndexChildren\n else if(isLastNone || isNowNone) {\n node.__zIndexChildren = null;\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n }\n });\n /**\n * mergeMargin后续调整,记录的是变更节点的父节点,因此每个节点内部直接遍历孩子进行\n * 由于保持先根遍历的顺序,因此会从最上最里的节点开始,先进行margin合并\n * 由于之前忽略掉abs节点,因此再检查直接abs是否要调整\n * 完成后对此父节点的后续兄弟节点进行调整,多次不会干扰影响\n * 然后继续往上循环,直到root结束\n */\n let inDirectAbsList = [];\n mergeOffsetList.forEach(parent => {\n delete parent.__uniqueMergeOffsetId;\n let flowChildren = parent.flowChildren, absChildren = parent.absChildren;\n let mergeMarginBottomList = [], mergeMarginTopList = [];\n let length = flowChildren.length, lastChild;\n let isStart, startIndex, startNode;\n // 遍历flow孩子,从开始变化的节点开始,看变化造成的影响,对其后面节点进行偏移,并统计总偏移量\n for(let i = 0; i < length; i++) {\n let item = flowChildren[i];\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n let isXom = item instanceof Xom;\n // 忽略掉前面没有变更的节点,不能合并\n if(!isStart && isXom) {\n if(item.hasOwnProperty('__uniqueReflowId')) {\n isStart = true;\n startIndex = i;\n startNode = item;\n }\n }\n // 开始变更的节点,至少不是第0个\n let cs = isXom && item.currentStyle;\n let isInline = isXom && cs[DISPLAY] === 'inline';\n let isInlineBlock = isXom && cs[DISPLAY] === 'inlineBlock';\n lastChild = item;\n // 每次循环开始前,这次不是block的话,看之前遗留的,可能是以空block结束,需要特殊处理,单独一个空block也包含\n if((!isXom || isInline || isInlineBlock)) {\n if(mergeMarginBottomList.length && mergeMarginTopList.length && isStart) {\n let diff = reflow.getMergeMargin(mergeMarginTopList, mergeMarginBottomList);\n if(diff) {\n for(let j = Math.max(startIndex, i - mergeMarginBottomList.length + 1); j < length; j++) {\n flowChildren[j].__offsetY(diff, true, REPAINT);\n }\n }\n }\n mergeMarginTopList = [];\n mergeMarginBottomList = [];\n }\n // 和普通布局类似,只是不用重新布局只需处理合并margin再根据差值偏移\n if(isXom && !isInline) {\n let isNone = isXom && cs[DISPLAY] === 'none';\n let isEmptyBlock;\n if(!isNone && item.flowChildren && item.flowChildren.length === 0) {\n let {\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n [HEIGHT]: height,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n } = item.computedStyle;\n // 无内容高度为0的空block特殊情况,记录2个margin下来等后续循环判断处理\n if(paddingTop <= 0 && paddingBottom <= 0 && height <= 0 && borderTopWidth <= 0 && borderBottomWidth <= 0) {\n mergeMarginBottomList.push(marginBottom);\n mergeMarginTopList.push(marginTop);\n isEmptyBlock = true;\n }\n }\n // 空block要留下轮循环看,除非是最后一个,非空本轮处理掉看是否要合并\n if(!isNone && !isEmptyBlock) {\n let { [MARGIN_TOP]: marginTop, [MARGIN_BOTTOM]: marginBottom } = item.computedStyle;\n // 有bottom值说明之前有紧邻的block,任意个甚至空block,自己有个top所以无需判断top\n // 如果是只有紧邻的2个非空block,也被包含在情况内,取上下各1合并\n if(mergeMarginBottomList.length) {\n mergeMarginTopList.push(marginTop);\n if(isStart) {\n let diff = reflow.getMergeMargin(mergeMarginTopList, mergeMarginBottomList);\n // 需要合并的情况,根据记录数和索引向上向下遍历节点设置偏移,同时设置总偏移量供父级使用\n if(diff) {\n for(let j = Math.max(startIndex, i - mergeMarginBottomList.length + 1); j < length; j++) {\n flowChildren[j].__offsetY(diff, true, REPAINT);\n }\n }\n }\n }\n // 同时自己保存bottom,为后续block准备\n mergeMarginTopList = [];\n mergeMarginBottomList = [marginBottom];\n }\n // 最后一个空block当是正正和负负时要处理,正负在outHeight处理了结果是0,最后一个一定有不必判断isStart\n else if(i === length - 1) {\n let diff = reflow.getMergeMargin(mergeMarginTopList, mergeMarginBottomList);\n if(diff) {\n for(let j = Math.max(startIndex, i - mergeMarginBottomList.length + 1); j < length; j++) {\n flowChildren[j].__offsetY(diff, true, REPAINT);\n }\n }\n }\n }\n }\n // 先检查parent的尺寸是否发生了变化,从而决定是否调整next以及向上递归调整\n let cs = parent.currentStyle;\n let height = cs[HEIGHT];\n let isContainer = parent === root || parent.isShadowRoot || cs[POSITION] === 'absolute' || cs[POSITION] === 'relative';\n if(height[1] === AUTO && lastChild) {\n let oldH = parent.height + parent.computedStyle[PADDING_TOP];\n let nowH = lastChild.y + lastChild.outerHeight - parent.y;\n let diff = nowH - oldH;\n // 调整next以及非固定PX的abs,再递归向上\n if(diff) {\n parent.__resizeY(diff, REPAINT);\n let container;\n for(let i = 0, len = absChildren.length; i < len; i++) {\n let item = absChildren[i];\n let { [TOP]: top, [BOTTOM]: bottom, [HEIGHT]: height } = item.currentStyle;\n // 是容器,所有的都调整,不是容器,其偏移是上级parent的某一个,根据情况具体不同\n if(top[1] === AUTO) {\n if(bottom[1] === AUTO) {\n let prev = item.prev;\n while(prev) {\n let target = prev;\n if(target instanceof Component) {\n target = target.shadowRoot;\n }\n let isXom = target instanceof Xom;\n let cs = isXom && target.currentStyle;\n let isAbs = isXom && cs[POSITION] === 'absolute';\n if(!isAbs) {\n let y = target.y + target.outerHeight;\n let d = y - item.y;\n if(d) {\n item.__offsetY(d, true, REPAINT);\n }\n break;\n }\n prev = prev.prev;\n }\n }\n else if(bottom[1] === PX) {\n item.__offsetY(diff, true, REPAINT);\n }\n else if(bottom[1] === PERCENT) {\n let v = (1 - bottom[0] * 0.01) * diff;\n item.__offsetY(v, true, REPAINT);\n }\n }\n else if(top[1] === PERCENT) {\n if(isContainer) {\n let v = top[0] * 0.01 * diff;\n item.__offsetY(v, true, REPAINT);\n }\n // 非容器的特殊处理\n else {\n if(!container) {\n container = parent.domParent;\n while(container) {\n if(container === root || container.isShadowRoot) {\n break;\n }\n let cs = container.currentStyle;\n if(cs[POSITION] === 'absolute' || cs[POSITION] === 'relative') {\n break;\n }\n container = container.domParent;\n }\n }\n if(container.currentStyle[HEIGHT][1] !== PX) {\n let v = top[0] * 0.01 * diff;\n item.__offsetY(v, true, REPAINT);\n }\n }\n }\n // 高度百分比需发生变化的重新布局,需要在容器内\n if(height[1] === PERCENT) {\n if(isContainer) {\n parent.__layoutAbs(parent, parent.__layoutData, item);\n }\n // 不在容器内说明在上级,存入等结束后统一重新布局\n else {\n if(!container) {\n container = parent.domParent;\n while(container) {\n if(container === root || container.isShadowRoot) {\n break;\n }\n let cs = container.currentStyle;\n if(cs[POSITION] === 'absolute' || cs[POSITION] === 'relative') {\n break;\n }\n container = container.domParent;\n }\n }\n inDirectAbsList.push([parent, container, item]);\n }\n }\n }\n reflow.offsetAndResizeByNodeOnY(parent, root, reflowHash, diff, inDirectAbsList);\n return;\n }\n }\n // 没有diff变化或者固定尺寸,可能内部发生变化,调整AUTO的abs,不递归向上\n for(let i = 0, len = absChildren.length; i < len; i++) {\n let item = absChildren[i];\n let { [TOP]: top, [BOTTOM]: bottom } = item.currentStyle;\n if(top[1] === AUTO && bottom[1] === AUTO) {\n let prev = item.prev;\n while(prev) {\n let target = prev;\n if(target instanceof Component) {\n target = target.shadowRoot;\n }\n let isXom = target instanceof Xom;\n let cs = isXom && target.currentStyle;\n let isAbs = isXom && cs[POSITION] === 'absolute';\n if(!isAbs) {\n let y = target.y + target.outerHeight;\n let d = y - item.y;\n if(d) {\n item.__offsetY(d, true, REPAINT);\n }\n break;\n }\n prev = prev.prev;\n }\n }\n }\n });\n // merge过程中需要重新布局的abs\n inDirectAbsList.forEach(arr => {\n arr[0].__layoutAbs(arr[1], arr[0].__layoutData, arr[2]);\n });\n\n // 调整因reflow造成的原struct数据索引数量偏差,纯zIndex的已经在repaint里面重新生成过了\n // 这里因为和update保持一致的顺序,因此一定是先根顺序且互不包含\n let diff = 0, lastIndex = 0, isFirst = true, structs = root.__structs;\n diffList.forEach(item => {\n let [ns, d] = item;\n // 第一个有变化的,及后面无论有无变化都需更新\n // 第1个变化区域无需更改前面一段\n if(isFirst) {\n isFirst = false;\n lastIndex = ns[STRUCT_INDEX] + (ns[STRUCT_TOTAL] || 0) + 1;\n diff += d;\n }\n // 第2+个变化区域看是否和前面一个相连,有不变的段则先偏移它,然后再偏移自己\n else {\n let j = ns[STRUCT_INDEX] + (ns[STRUCT_TOTAL] || 0) + 1 + diff;\n for(let i = lastIndex; i < j; i++) {\n structs[i][STRUCT_INDEX] += diff;\n }\n lastIndex = j;\n diff += d;\n }\n });\n // 后面的要根据偏移量校正索引\n if(diff) {\n for(let i = lastIndex, len = structs.length; i < len; i++) {\n structs[i][STRUCT_INDEX] += diff;\n }\n }\n // 清除id\n reflow.clearUniqueReflowId(reflowHash);\n }\n }\n\n // 每个root拥有一个刷新hook,多个root塞到frame的__hookTask里\n // frame在所有的帧刷新逻辑执行后检查hook列表,进行root刷新操作\n __frameHook() {\n if(!this.__hookTask) {\n let r = this.__hookTask = (() => {\n this.refresh();\n });\n frame.__hookTask.push(r);\n }\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 taskCp() {\n return this.__taskCp;\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, lv, ctx, cache, dx2, dy2) {\n let res = super.render(renderMode, lv, ctx, cache, dx2, dy2);\n if(res.break) {\n return res;\n }\n ctx = res.ctx;\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';\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, lv, ctx, cache, dx, dy) {\n let res = super.render(renderMode, lv, ctx, cache, dx, dy);\n if(res.break) {\n return res;\n }\n this.buildCache(res.sx3, res.sy3);\n ctx = res.ctx;\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';\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, lv, ctx, cache, dx2, dy2) {\n let res = super.render(renderMode, lv, ctx, cache, dx2, dy2);\n if(res.break) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n ctx = res.ctx;\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';\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, lv, ctx, cache, dx, dy) {\n let res = super.render(renderMode, lv, ctx, cache, dx, dy);\n if(res.break) {\n return res;\n }\n this.buildCache(res.sx3, res.sy3);\n ctx = res.ctx;\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';\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, lv, ctx, cache, dx, dy) {\n let res = super.render(renderMode, lv, ctx, cache, dx, dy);\n if(res.break) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n ctx = res.ctx;\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';\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, lv, ctx, cache, dx, dy) {\n let res = super.render(renderMode, lv, ctx, cache, dx, dy);\n if(res.break) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n ctx = res.ctx;\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 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 $$type from './util/$$type';\nimport builder from './util/builder';\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 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 return {\n tagName,\n props,\n $$type: $$type.TYPE_GM,\n };\n },\n createCp(klass, props, children = []) {\n props.children = 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 builder,\n updater,\n refresh,\n enums,\n set debug(v) {\n debug.flag = !!v;\n },\n};\n\nbuilder.ref({\n Xom,\n Dom,\n Img,\n Geom,\n Component,\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":["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","s","res","toLowerCase","replace","$0","$1","toUpperCase","STYLE2UPPER_MAP","style2Upper","$2","STYLE_R_KEY","STYLE_RV_KEY","STYLE_V_KEY","Object","keys","forEach","k","k2","l","UPDATE_KEY","UPDATE_NODE","UPDATE_STYLE","UPDATE_FOCUS","UPDATE_COMPONENT","UPDATE_OVERWRITE","UPDATE_KEYS","UPDATE_LIST","UPDATE_CONFIG","UPDATE_ADD_DOM","UPDATE_REMOVE_DOM","KEY_FRAME_KEY","FRAME_STYLE","FRAME_TIME","FRAME_EASING","FRAME_TRANSITION","NODE_KEY","NODE_DOM_PARENT","NODE_OPACITY","NODE_MATRIX","NODE_MATRIX_EVENT","NODE_CACHE","NODE_CACHE_TOTAL","NODE_CACHE_FILTER","NODE_CACHE_MASK","NODE_CACHE_OVERFLOW","NODE_STRUCT","NODE_TAG_NAME","NODE_CURRENT_STYLE","NODE_CURRENT_PROPS","NODE_COMPUTED_STYLE","NODE_CACHE_STYLE","NODE_CACHE_PROPS","NODE_LIMIT_CACHE","NODE_IS_MASK","NODE_IS_INLINE","NODE_HAS_CONTENT","NODE_REFRESH_LV","NODE_IS_DESTROYED","NODE_STYLE","NODE_UPDATE_HASH","NODE_UNIQUE_UPDATE_ID","NODE_DEFS_CACHE","NODE_PERSPECTIVE_MATRIX","NODE_VIRTUAL_DOM","NODE_CACHE_AS_BITMAP","STRUCT_KEY","STRUCT_NODE","STRUCT_INDEX","STRUCT_CHILD_INDEX","STRUCT_LV","STRUCT_NUM","STRUCT_TOTAL","STRUCT_HAS_MASK","ANIMATE_KEY","I_ASSIGNING","I_IN_FPS","I_IS_DELAY","I_BEGIN","I_END","I_FINISHED","I_NEXT_END","I_FIRST_PLAY","I_PLAY_CB","I_TARGET","I_ROOT","I_FRAMES","I_FRAMES_R","I_CURRENT_TIME","I_NEXT_TIME","I_STYLE","I_DURATION","I_ITERATIONS","I_FILL","I_PLAYBACK_RATE","I_PLAY_COUNT","I_PLAY_STATE","I_DESTROYED","I_START_TIME","I_FPS_TIME","I_EASING","I_ENTER_FRAME","I_DELAY","I_END_DELAY","I_KEYS","I_ORIGIN_STYLE","I_CURRENT_FRAMES","I_CURRENT_FRAME","I_SPF_LIMIT","I_FPS","I_DIRECTION","I_FIRST_ENTER","I_STAY_BEGIN","I_STAY_END","I_IS2","I_END_TIME","I_NODE_CONFIG","I_ROOT_CONFIG","I_OUT_BEGIN_DELAY","I_TIME_STAMP","ELLIPSIS","enums","Node","__x","__y","__ox","__oy","__sx","__sy","__width","__height","__baseline","__verticalBaseline","__config","__prev","__next","__parent","__domParent","__root","__host","__virtualDom","__bbox","__filterBbox","i","lv","j","root","struct","diff","isLayout","x","ox","y","oy","__hostRoot","CANVAS","SVG","WEBGL","o","AUTO","PX","PERCENT","NUMBER","INHERIT","DEG","STRING","RGBA","REM","EM","VW","VH","VMAX","VMIN","GRADIENT","calUnit","v","n","parseFloat","test","TYPE_VD","Symbol","TYPE_GM","TYPE_CP","identity","multiply","a","b","isE","c","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","inv","det","m2m6","point2d","slice","toString","isType","type","obj","call","isObject","isString","isFunction","isNumber","isBoolean","isDate","hasOwn","hasOwnProperty","fnToString","ObjectFunctionString","isNil","joinSourceArray","arr","len","item","Array","isArray","stringify","encodeHtml","prop","joinVirtualDom","vd","defs","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","hash2arr","clone","$$type","util","Date","isPlainObject","equalArr","ai","bi","isArrayA","isArrayB","equal","getTime","extend","target","source","split","extendAnimate","ovd","nvd","__animationList","animationList","splice","__setTarget","assigning","finished","__stayEnd","assignCurrentStyle","__frameAnimateList","transformBbox","bbox","matrix","dx","dy","mx","x1","y1","x2","y2","xa","ya","xb","yb","min","proto","getPrototypeOf","Ctor","constructor","assignMatrix","t","prefixHex","replaceRgba2Hex","$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","draw","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","node","measureImg","url","cb","state","success","task","img","Image","onload","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","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","sqrt","vector","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","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","KEY_COLOR","KEY_LENGTH","KEY_GRADIENT","KEY_RADIUS","COLOR_HASH","LENGTH_HASH","RADIUS_HASH","GRADIENT_HASH","GRADIENT_TYPE","linear","radial","conic","KEY_EXPAND","EXPAND_HASH","RESET_DOM","reset","RESET_GEOM","IGNORE","REPAINT","addGeom","ks","isIgnore","isGeom","isRepaint","kernelSize","sigma","outerSize","outerSizeByD","gaussianWeight","E","change","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","equalStyle","oa","ob","aa","av","bv","isMulti","isRelativeOrAbsolute","VALUE","ARRAY_0","ARRAY_0_1","cloneStyle","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","ac","bc","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","SIZE","MAX","HASH_CANVAS","Page","number","__size","__number","__free","__total","__canvas","__offscreen","__grid","__uuid","__update","time","grid","pos","genSingle","bboxNew","dbx","dby","Cache","__init","__page","__pos","getCoords","__appendData","__isNew","__enabled","globalAlpha","update","__available","clear","del","getInstance","oldX1","cacheMask","isClip","tf","globalCompositeOperation","drawCache","clientWidth","clientHeight","xe","ye","cacheOverflow","rect","parentMatrix","dbx2","dby2","ENUM","NONE","TRANSFORM_ALL","REFLOW","REBUILD","TRANSFORMS","contain","getLevel","isReflow","isRebuild","measureLineWidth","perW","rw","newLine","mw","hypotheticalNum","round","getFontKey","Text","__textBoxes","__charWidth","__textWidth","__bp","__widthHash","__cache","ly","lineBoxManager","endSpace","lineClampCount","isDestroyed","textBoxes","maxW","beginSpace","bp","lineCount","mainCoords","isTextOverflow","textWidth","containerSize","__lineBack","textBox","addItem","verticalLineHeight","ew","lineBox","isNewLine","tb","__layoutNone","__resetLb","ep","tbs","mbp","__offsetX","__offsetY","firstCharWidth","level","lineWidth","strokeStyle","render","delRefreshTask","__task","addRefreshTask","__before","__addUpdate","__after","fontKey","charWidth","__style","__cacheStyle","__renderByMask","flattenJson","traverseJson","lastText","options","Xom","Dom","Img","Geom","Component","initRoot","cd","flatten","__json","build","relation","initDom","json","initCp","initCp2","klass","__tagName","hasP","__inheritAnimate","__animateRecords","__placeholder","__children","getRegister","ref","shadowRoot","Event","__eHash","handle","on","apply","off","__karasEventCb","once","emit","event","fns","fn","REGISTER","setUpdateFlag","cp","__hasCpUpdate","__ref","__isMounted","__taskList","__nextState","addRefreshCp","builder","__cd","listener","__shadow","shadow","__shadowRoot","componentDidMount","REFRESH","__isDestroyed","componentWillUnmount","__destroy","force","__emitEvent","__state","defineProperty","get","getInlineBox","leading","bcStart","bcEnd","pbStart","pbEnd","getInlineWidth","contentBox","matrixResize","imgWidth","imgHeight","targetWidth","targetHeight","renderBgc","method","renderImage","loadBgi","bgW","bgH","bgX","bgY","needMask","xnl","xnr","ynt","ynb","image","needResize","copy","traversal","after","isPause","Frame","__hookTask","__taskCp","__now","taskCp","cloneCp","lengthCp","__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","easeIn","easeOut","ease","easeInOut","cubicBezier","getEasing","timingFunction","NUM_CAL_HASH","unify","frames","getProps","inherit","genBeforeRefresh","__frameHook","framing","duration","es","translatePath","calByUnit","container","calDiff","nm","pv","nv","taraget","pi","ni","has","pp","nn","isGradient","calDiffGradient","parentComputedStyle","len2","pv2","nv2","len3","pv3","nv3","u","eq","isArrP","isArrN","pz","nz","np","calFrame","ts","binarySearch","frame","middle","ea","steps","stepsD","calIntermediateStyle","transition","st2","calIncrease","o2","n2","gotoOverload","calDiffTime","playbackRate","spfLimit","fps","frameCb","isDelay","FRAME","PLAY","Animation","__id","nl","__options","op","config","iterations","framesR","originStyle","delay","endDelay","current","isFinish","__cancelTask","__currentProps","__currentStyle","playState","__hasFin","__hasCancel","playCount","currentFrames","stayBegin","stayEnd","is2","endTime","currentTime","currentFrame","isAlternate","alternate","isEven","isLastCount","frameTime","isLastFrame","inEndDelay","needClean","playCb","__clean","BEGIN","END","FINISH","silence","pending","PAUSE","play","CANCEL","__goto","isFrame","excludeDelay","finish","currentProps","spf","animateController","remove","backwards","both","forwards","__target","sync","removeControl","nextFrame","__checkModify","renderBoxShadow","box","spreadBox","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","blurBox","MBM_HASH","screen","overlay","darken","lighten","colorDodge","colorBurn","hardLight","softLight","difference","exclusion","hue","saturation","luminosity","mbmName","isValidMbm","LOCAL","mbm","TF","TX","TY","TZ","getFirstEmptyInlineWidth","flowChildren","child","getLastEmptyInlineWidth","__computedStyle","__listener","__loadBgi","__cacheDefs","__isClip","__isMask","__contentBoxList","__cacheAsBitmap","cacheAsBitmap","__layoutData","__hasComputeReflow","__fontRegister","__hasMask","__calSize","includePercent","isRoot","ph","fontRegister","__clientWidth","__offsetWidth","__outerWidth","__clientHeight","__offsetHeight","__outerHeight","isDirectionRow","isDirectItem","isAbs","isColumn","isRow","__computeReflow","__isIbFull","__isUprightIbFull","clearCache","__mp","__layoutFlex","__layoutInline","__layoutBlock","__sx2","__sx3","__sx4","__sx5","__sx6","__sy2","__sy3","__sy4","__sy5","__sy6","__execAr","ar","controller","autoPlay","__records2","init","list2","__records","__playAuto","h3","isParentVertical","fixedWidth","fixedHeight","selfEndSpace","isReplaced","offsetWidth","offsetHeight","matrixCache","isScale","x5","x6","y5","y6","__calFilter","bgI","kw","rebuild","__hasContent","isRealInline","sx4","sx5","sx6","sy4","sy5","sy6","__calPerspective","__calMatrix","__calCache","hasContent","__calContent","__releaseWhenEmpty","limitCache","perspectiveMatrix","offscreenBlend","offscreenMask","hasFilter","offscreenFilter","offscreenOverflow","borderList","hasBgi","some","svgBgSymbol","inline","bg","isFirst","lastContentBox","lastLineBox","parentLineBox","ix1","iy1","ix2","iy2","symbol","clearAnimate","clearFrameAnimate","__stopPropagation","__stopImmediatePropagation","willResponseEvent","hasEmitMask","ignore","inThis","__touchstartTarget","__getLg","__getRg","__getCg","lg","createLinearGradient","addColorStop","rg","createRadialGradient","onlyTotal","__cacheTotal","__cacheFilter","__cacheMask","__cacheOverflow","formatStyle","animation","cancel","enter","includeBbox","isShadowRoot","hostRoot","pJson","zChildren","zIndexChildren","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","offsetAndResizeByNodeOnY","reflowHash","inDirectAbsList","isContainer","cs","__layoutAbs","__resizeY","clearUniqueReflowId","__uniqueReflowId","getMergeMargin","topList","bottomList","genZIndexChildren","hasMc","mcHash","lastMaskIndex","__iIndex","__zIndex","__aIndex","genOrderChildren","__order","backtrack","text","__backtrack","block","inlineBlock","none","tag","__flexLine","__zIndexChildren","__structure","nss","__structs","structs","needSort","__tryLayInline","isDirectChild","main","isFixed","isContent","fixedSize","countMin","countMax","isR","__calBasis","min2","max2","__lineBoxManager","__layout","__addMBP","__preLayout","__ioSize","maxSize","countSize","mergeMarginEndList","mergeMarginStartList","ignoreNextLine","ignoreNextWrap","isXom","isInlineBlock","__isRealInline","lastLineClampCount","reflow","setNotEnd","setNewLine","isNone","isEmptyBlock","tw","th","__resizeX","isLastBlock","hasStart","isBlock","horizonAlign","__inlineSize","domList","__marginAuto","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","loadImg","__loadImg","placeholder","loading","__loadAndRefresh","showError","__addGeom","reload","Defs","cacheHash","__isMulti","multi","__cacheProps","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","updateList","removeList","KEY_FLAG","check","checkCp","nextProps","forceCheckUpdate","shouldUpdate","shouldComponentUpdate","updateCp","oldS","oldSr","oldJson","diffSr","oj","nj","ojk","getKeyHash","njk","keyList","cpList","diffCp","diffChildren","diffChild","removeCpFromOldTree","oc","ol","of","nf","exist","ex","did","componentDidUpdate","elem","diffDefs","diffBb","diffD2D","od","nd","diffDef","removeAt","insertAt","insertAdjacentHTML","parentNode","removeAttribute","diffItem","diffD2G","replaceWith","diffT2T","diffG2D","diffG2G","diffItemSelf","diffX2X","diffByLessLv","firstChild","lastChild","obb","nbb","isText","html","svg","where","insertBefore","Controller","__list2","__onList","__lastTime","args","records","animate","offsetTime","onList","timestamp","__action","__mergeAuto","__on","__set","OFFSCREEN_OVERFLOW","OFFSCREEN_FILTER","OFFSCREEN_MASK","OFFSCREEN_BLEND","OFFSCREEN_MASK2","applyOffscreen","origin","MockPage","genUuid","MockCache","reOffset","NA","CHILD","SELF","getCache","OP","FT","MBM","PPT","genBboxTotal","parentIndexHash","opacityHash","includeLimitCache","bboxTotal","filterBbox","matrixHash","parentIndex","node2","hasTotal","mergeBbox","genTotal","hasMask","cacheTotal","cacheFilter","needGen","baseMatrix","matrixList","opacityList","parentOpacity","lastConfig","lastLv","refreshLevel","countMaskNum","ctxTotal","lastMatrix","maskStartHash","offscreenHash","genOverflow","genFilter","genMask","lastOpacity","resetMatrixCacheTotal","isNew","genFrameBufferWithTexture","texCache","lockOneChannel","webgl","createFramebuffer","bindFramebuffer","checkFramebufferStatus","FRAMEBUFFER_COMPLETE","viewport","clearColor","COLOR_BUFFER_BIT","genTotalWebgl","hasMbm","getParameter","MAX_TEXTURE_SIZE","parentPm","totalLimitCache","addTexAndDrawWhenLimit","mockCache","refresh","releaseLockChannel","hookGlRender","frameBuffer2","texture2","genMbmWebgl","deleteFramebuffer","genFilterWebgl","genBlurWebgl","genDropShadowWebgl","rotation","cosR","sinR","genColorMatrixWebgl","amount","oneMinusAmount","useProgram","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","defsCache","hasEffectMask","addCache","maskHash","vdList","parentVd","mChildren","ivs","hasTransform","renderWebgl","pmList","lastRefreshLevel","mergeList","hasRecordAsMask","validMbm","isPerspective","limitHash","pptHash","renderCanvas","TexCache","units","__units","__pages","__channels","__locks","__lockUnits","pages","channels","locks","lastHash","oldList","newList","fullSize","setToChannel","DIRECTION_HASH","ROOT_DOM_NAME","getDom","querySelector","renderProp","EVENT_LIST","initEvent","Root","__wrapEvent","__cb","addEventListener","removeEvent","removeEventListener","isFixedWidthOrHeight","isFixedSize","includeParentFlex","isLAYOUT","setLAYOUT","component","addDom","checkInfluence","topFlex","isSiblingBlock","uniqueUpdateId","parseUpdate","reflowList","cacheList","zHash","zList","overwrite","focus","removeDom","style2","keys2","hasZ","hasVisibility","hasColor","hasDisplay","hasTsColor","hasTsWidth","hasTsOver","__struct","isRp","cleanSvgCache","__uniqueZId","__rlv","__dom","__mw","__mh","__taskUp","__reflowList","__animateController","mix","__updateHash","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","__checkUpdate","__checkReflow","noRender","__clear","__vd","domDiff","updateStyle","taskUp","__hasRootUpdate","__nextFrameCp","updater","includeIgnore","scan","path","zPath","__index__","karas","path2","zPath2","nodeConfig","rootConfig","updateHash","__updateRoot","updateRoot","hasUpdate","__updateStruct","uniqueList","hasRoot","diffList","diffI","mergeOffsetList","__uniqueMergeOffsetId","cps","cts","isLastAbs","isNowAbs","isLastNone","isNowNone","hasFlowPrev","__modifyStruct","mergeMarginBottomList","mergeMarginTopList","startIndex","oldH","nowH","lastIndex","reBuild","base","reBuildC","curveNum","getNewPoint","Line","__x1","__y1","__x2","__y2","__controlA","__controlB","__start","__end","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","__begin","__r","edge","__edge","closure","__closure","sList","r2","__renderOneSector","genVertex","Rect","__rx","__ry","Circle","Ellipse","my","parse","animateRecords","opt","oft","JSON","createGm","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","callback","version","appendTo","parser"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA,IAAMA,WAAS,GAAG;EAChBC,EAAAA,QAAQ,EAAE,CADM;EAEhBC,EAAAA,OAAO,EAAE,CAFO;EAGhBC,EAAAA,GAAG,EAAE,CAHW;EAIhBC,EAAAA,KAAK,EAAE,CAJS;EAKhBC,EAAAA,MAAM,EAAE,CALQ;EAMhBC,EAAAA,IAAI,EAAE,CANU;EAOhBC,EAAAA,UAAU,EAAE,CAPI;EAQhBC,EAAAA,YAAY,EAAE,CARE;EAShBC,EAAAA,aAAa,EAAE,CATC;EAUhBC,EAAAA,WAAW,EAAE,CAVG;EAWhBC,EAAAA,WAAW,EAAE,EAXG;EAYhBC,EAAAA,aAAa,EAAE,EAZC;EAahBC,EAAAA,cAAc,EAAE,EAbA;EAchBC,EAAAA,YAAY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,MAAM,CAAColE,KAAP,GAAeA,OAAf,CAAA;EACD,CAFD,MAGK,IAAG,OAAOziE,IAAP,KAAgB,WAAnB,EAAgC;IACnCA,IAAI,CAACyiE,KAAL,GAAaA,OAAb,CAAA;EACD;;;;;;;;"}
\ No newline at end of file
diff --git a/package.json b/package.json
index e6f1b16b7..343d6b050 100755
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "karas",
- "version": "0.78.1",
+ "version": "0.78.2",
"description": "A flexible JavaScript framework for RIA on Canvas/Svg/Webgl.",
"maintainers": [
{
diff --git a/src/animate/Controller.js b/src/animate/Controller.js
index 30b175c8a..bf1b3e32f 100644
--- a/src/animate/Controller.js
+++ b/src/animate/Controller.js
@@ -70,8 +70,16 @@ class Controller {
if(list2.length && onList.length) {
list2.forEach(item => {
onList.forEach(arr => {
+ let cb = () => {
+ let time = item.timestamp;
+ if(time !== this.__lastTime[arr[0]]) {
+ this.__lastTime[arr[0]] = time;
+ arr[1] && arr[1]();
+ }
+ };
+ cb.__karasEventCb = arr[1];
item.off(arr[0], arr[1]);
- item.on(arr[0], arr[1]);
+ item.on(arr[0], cb);
});
});
}
@@ -208,7 +216,7 @@ class Controller {
let time = item.timestamp;
if(time !== this.__lastTime[id]) {
this.__lastTime[id] = time;
- handle();
+ handle && handle();
}
};
cb.__karasEventCb = handle;
diff --git a/src/refresh/level.js b/src/refresh/level.js
index b4e4f3fed..cfa3de9e8 100644
--- a/src/refresh/level.js
+++ b/src/refresh/level.js
@@ -46,6 +46,7 @@ const TRANSFORMS = {
[STYLE_KEY.ROTATE_3D]: true,
[STYLE_KEY.TRANSFORM]: true,
[STYLE_KEY.TRANSFORM_ORIGIN]: true,
+ [STYLE_KEY.TRANSLATE_PATH]: true,
};
let o = Object.assign({
diff --git a/src/util/enums.js b/src/util/enums.js
index 20493641d..c97cde81a 100644
--- a/src/util/enums.js
+++ b/src/util/enums.js
@@ -108,20 +108,24 @@ const STYLE_KEY = {
const STYLE2LOWER_MAP = {};
function style2Lower(s) {
- STYLE2LOWER_MAP[s] = STYLE2LOWER_MAP[s] || s.toLowerCase().replace(/_([a-z])/g, function($0, $1) {
- return $1.toUpperCase();
- });
-
- return STYLE2LOWER_MAP[s];
+ let res = STYLE2LOWER_MAP[s];
+ if(!res) {
+ res = STYLE2LOWER_MAP[s] = s.toLowerCase().replace(/_([a-z])/g, function($0, $1) {
+ return $1.toUpperCase();
+ });
+ }
+ return res;
}
const STYLE2UPPER_MAP = {};
function style2Upper(s) {
- STYLE2UPPER_MAP[s] = STYLE2UPPER_MAP[s] || s.replace(/([a-z\d_])([A-Z])/g, function($0, $1, $2) {
- return $1 + '_' + $2;
- }).toUpperCase();
-
- return STYLE2UPPER_MAP[s];
+ let res = STYLE2UPPER_MAP[s];
+ if(!res) {
+ res = STYLE2UPPER_MAP[s] = s.replace(/([a-z\d_])([A-Z])/g, function($0, $1, $2) {
+ return $1 + '_' + $2;
+ }).toUpperCase();
+ }
+ return res;
}
const STYLE_R_KEY = {};
diff --git a/src/util/util.js b/src/util/util.js
index 6e72852bb..9823cdcda 100644
--- a/src/util/util.js
+++ b/src/util/util.js
@@ -212,14 +212,24 @@ function rgba2int(color) {
function int2rgba(color) {
if(Array.isArray(color)) {
- if(color.length === 4) {
- color = color.map((c, i) => i === 3 ? c : Math.floor(Math.max(0, c)));
- return 'rgba(' + joinArr(color, ',') + ')';
- }
- else if(color.length === 3) {
- color = color.map(c => Math.floor(c));
- return 'rgba(' + joinArr(color, ',') + ',1)';
+ if(color.length === 3 || color.length === 4) {
+ color[0] = Math.floor(Math.max(color[0], 0));
+ color[1] = Math.floor(Math.max(color[1], 0));
+ color[2] = Math.floor(Math.max(color[2], 0));
+ if(color.length === 4) {
+ color[3] = Math.max(color[3], 0);
+ return 'rgba(' + color[0] + ',' + color[1] + ',' + color[2] + ',' + color[3] + ')';
+ }
+ return 'rgba(' + color[0] + ',' + color[1] + ',' + color[2] + ',1)';
}
+ // if(color.length === 4) {
+ // color = color.map((c, i) => i === 3 ? c : Math.floor(Math.max(0, c)));
+ // return 'rgba(' + joinArr(color, ',') + ')';
+ // }
+ // else if(color.length === 3) {
+ // color = color.map(c => Math.floor(c));
+ // return 'rgba(' + joinArr(color, ',') + ',1)';
+ // }
}
return color || 'rgba(0,0,0,0)';
}
diff --git a/test/group1/animate-gotostop-fill-svg/test.js b/test/group1/animate-gotostop-fill-svg/test.js
index cff673ea1..ef191ada4 100644
--- a/test/group1/animate-gotostop-fill-svg/test.js
+++ b/test/group1/animate-gotostop-fill-svg/test.js
@@ -7,7 +7,7 @@ module.exports = {
.url('file://' + path.join(__dirname, 'index.html'))
.waitForElementVisible('body', 1000)
.pause(300)
- .assert.value('input', '[{"k":"linear","d":180,"v":[[[127.5,127.5,0,1]],[[0,0,255,1]]]}]')
+ .assert.value('input', '[{"k":"linear","d":180,"v":[[[127,127,0,1]],[[0,0,255,1]]]}]')
.end();
}
};