qauMaWeb/node_modules/.cache/babel-loader/9f8b2874bb46191246b783a941f...

1 line
76 KiB
JSON
Raw Normal View History

2024-10-13 18:02:27 +08:00
{"ast":null,"code":"import \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.typed-array.float32-array.js\";\nimport \"core-js/modules/es.typed-array.at.js\";\nimport \"core-js/modules/es.typed-array.copy-within.js\";\nimport \"core-js/modules/es.typed-array.every.js\";\nimport \"core-js/modules/es.typed-array.fill.js\";\nimport \"core-js/modules/es.typed-array.filter.js\";\nimport \"core-js/modules/es.typed-array.find.js\";\nimport \"core-js/modules/es.typed-array.find-index.js\";\nimport \"core-js/modules/es.typed-array.for-each.js\";\nimport \"core-js/modules/es.typed-array.includes.js\";\nimport \"core-js/modules/es.typed-array.index-of.js\";\nimport \"core-js/modules/es.typed-array.iterator.js\";\nimport \"core-js/modules/es.typed-array.join.js\";\nimport \"core-js/modules/es.typed-array.last-index-of.js\";\nimport \"core-js/modules/es.typed-array.map.js\";\nimport \"core-js/modules/es.typed-array.reduce.js\";\nimport \"core-js/modules/es.typed-array.reduce-right.js\";\nimport \"core-js/modules/es.typed-array.reverse.js\";\nimport \"core-js/modules/es.typed-array.set.js\";\nimport \"core-js/modules/es.typed-array.slice.js\";\nimport \"core-js/modules/es.typed-array.some.js\";\nimport \"core-js/modules/es.typed-array.sort.js\";\nimport \"core-js/modules/es.typed-array.subarray.js\";\nimport \"core-js/modules/es.typed-array.to-locale-string.js\";\nimport \"core-js/modules/es.typed-array.to-string.js\";\nimport \"core-js/modules/es.array.fill.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport * as vec2 from './vector.js';\nimport BoundingRect from './BoundingRect.js';\nimport { devicePixelRatio as dpr } from '../config.js';\nimport { fromLine, fromCubic, fromQuadratic, fromArc } from './bbox.js';\nimport { cubicLength, cubicSubdivide, quadraticLength, quadraticSubdivide } from './curve.js';\nvar CMD = {\n M: 1,\n L: 2,\n C: 3,\n Q: 4,\n A: 5,\n Z: 6,\n R: 7\n};\nvar tmpOutX = [];\nvar tmpOutY = [];\nvar min = [];\nvar max = [];\nvar min2 = [];\nvar max2 = [];\nvar mathMin = Math.min;\nvar mathMax = Math.max;\nvar mathCos = Math.cos;\nvar mathSin = Math.sin;\nvar mathAbs = Math.abs;\nvar PI = Math.PI;\nvar PI2 = PI * 2;\nvar hasTypedArray = typeof Float32Array !== 'undefined';\nvar tmpAngles = [];\n\nfunction modPI2(radian) {\n var n = Math.round(radian / PI * 1e8) / 1e8;\n return n % 2 * PI;\n}\n\nexport function normalizeArcAngles(angles, anticlockwise) {\n var newStartAngle = modPI2(angles[0]);\n\n if (newStartAngle < 0) {\n newStartAngle += PI2;\n }\n\n var delta = newStartAngle - angles[0];\n var newEndAngle = angles[1];\n newEndAngle += delta;\n\n if (!anticlockwise && newEndAngle - newStartAngle >= PI2) {\n newEndAngle = newStartAngle + PI2;\n } else if (anticlockwise && newStartAngle - newEndAngle >= PI2) {\n newEndAngle = newStartAngle - PI2;\n } else if (!anticlockwise && newStartAngle > newEndAngle) {\n newEndAngle = newStartAngle + (PI2 - modPI2(newStartAngle - newEndAngle));\n } else if (anticlockwise && newStartAngle < newEndAngle) {\n newEndAngle = newStartAngle - (PI2 - modPI2(newEndAngle - newStartAngle));\n }\n\n angles[0] = newStartAngle;\n angles[1] = newEndAngle;\n}\n\nvar PathProxy = function () {\n function PathProxy(notSaveData) {\n this.dpr = 1;\n this._xi = 0;\n this._yi = 0;\n this._x0 = 0;\n this._y0 = 0;\n this._len = 0;\n\n if (notSaveData) {\n this._saveData = false;\n }\n\n if (this._saveData) {\n this.data = [];\n }\n }\n\n PathProxy.prototype.increaseVersion = function () {\n this._version++;\n };\n\n PathProxy.prototype.getVersion = function () {\n return this._version;\n };\n\n PathProxy.prototype.setScale = function (sx, sy, segmentIgnoreThreshold) {\n segmentIgnoreThreshold = segmentIgnoreThreshold || 0;\n\n if (segmentIgnoreThreshold > 0) {\n this._ux = mathAbs(segmentIgnoreThreshold / dpr / sx) || 0;\n this._uy = mathAbs(segmentIgnoreThreshold / dpr / sy) || 0;\n }\n };\n\n PathProxy.p