Leon4gr45 commited on
Commit
ebc68ce
·
verified ·
1 Parent(s): 48f784b

Upload folder using huggingface_hub (part 6)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. node_modules/html2canvas/dist/lib/dom/text-container.js +32 -0
  2. node_modules/html2canvas/dist/lib/dom/text-container.js.map +1 -0
  3. node_modules/html2canvas/dist/lib/index.js +181 -0
  4. node_modules/html2canvas/dist/lib/index.js.map +1 -0
  5. node_modules/html2canvas/dist/lib/invariant.js +10 -0
  6. node_modules/html2canvas/dist/lib/invariant.js.map +1 -0
  7. node_modules/html2canvas/dist/lib/render/background.js +187 -0
  8. node_modules/html2canvas/dist/lib/render/background.js.map +1 -0
  9. node_modules/html2canvas/dist/lib/render/bezier-curve.js +36 -0
  10. node_modules/html2canvas/dist/lib/render/bezier-curve.js.map +1 -0
  11. node_modules/html2canvas/dist/lib/render/border.js +105 -0
  12. node_modules/html2canvas/dist/lib/render/border.js.map +1 -0
  13. node_modules/html2canvas/dist/lib/render/bound-curves.js +190 -0
  14. node_modules/html2canvas/dist/lib/render/bound-curves.js.map +1 -0
  15. node_modules/html2canvas/dist/lib/render/box-sizing.js +21 -0
  16. node_modules/html2canvas/dist/lib/render/box-sizing.js.map +1 -0
  17. node_modules/html2canvas/dist/lib/render/canvas/canvas-renderer.js +1030 -0
  18. node_modules/html2canvas/dist/lib/render/canvas/canvas-renderer.js.map +1 -0
  19. node_modules/html2canvas/dist/lib/render/canvas/foreignobject-renderer.js +108 -0
  20. node_modules/html2canvas/dist/lib/render/canvas/foreignobject-renderer.js.map +1 -0
  21. node_modules/html2canvas/dist/lib/render/effects.js +41 -0
  22. node_modules/html2canvas/dist/lib/render/effects.js.map +1 -0
  23. node_modules/html2canvas/dist/lib/render/font-metrics.js +55 -0
  24. node_modules/html2canvas/dist/lib/render/font-metrics.js.map +1 -0
  25. node_modules/html2canvas/dist/lib/render/path.js +27 -0
  26. node_modules/html2canvas/dist/lib/render/path.js.map +1 -0
  27. node_modules/html2canvas/dist/lib/render/renderer.js +12 -0
  28. node_modules/html2canvas/dist/lib/render/renderer.js.map +1 -0
  29. node_modules/html2canvas/dist/lib/render/stacking-context.js +172 -0
  30. node_modules/html2canvas/dist/lib/render/stacking-context.js.map +1 -0
  31. node_modules/html2canvas/dist/lib/render/vector.js +18 -0
  32. node_modules/html2canvas/dist/lib/render/vector.js.map +1 -0
  33. node_modules/html2canvas/dist/types/__tests__/index.d.ts +1 -0
  34. node_modules/html2canvas/dist/types/core/__mocks__/cache-storage.d.ts +2 -0
  35. node_modules/html2canvas/dist/types/core/__mocks__/context.d.ts +9 -0
  36. node_modules/html2canvas/dist/types/core/__mocks__/features.d.ts +8 -0
  37. node_modules/html2canvas/dist/types/core/__mocks__/logger.d.ts +9 -0
  38. node_modules/html2canvas/dist/types/core/__tests__/cache-storage.d.ts +1 -0
  39. node_modules/html2canvas/dist/types/core/__tests__/logger.d.ts +1 -0
  40. node_modules/html2canvas/dist/types/core/bitwise.d.ts +1 -0
  41. node_modules/html2canvas/dist/types/core/cache-storage.d.ts +26 -0
  42. node_modules/html2canvas/dist/types/core/context.d.ts +15 -0
  43. node_modules/html2canvas/dist/types/core/debugger.d.ts +8 -0
  44. node_modules/html2canvas/dist/types/core/features.d.ts +12 -0
  45. node_modules/html2canvas/dist/types/core/logger.d.ts +18 -0
  46. node_modules/html2canvas/dist/types/core/util.d.ts +1 -0
  47. node_modules/html2canvas/dist/types/css/IPropertyDescriptor.d.ts +36 -0
  48. node_modules/html2canvas/dist/types/css/ITypeDescriptor.d.ts +6 -0
  49. node_modules/html2canvas/dist/types/css/index.d.ts +132 -0
  50. node_modules/html2canvas/dist/types/css/layout/__mocks__/bounds.d.ts +2 -0
node_modules/html2canvas/dist/lib/dom/text-container.js ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TextContainer = void 0;
4
+ var text_1 = require("../css/layout/text");
5
+ var TextContainer = /** @class */ (function () {
6
+ function TextContainer(context, node, styles) {
7
+ this.text = transform(node.data, styles.textTransform);
8
+ this.textBounds = text_1.parseTextBounds(context, this.text, styles, node);
9
+ }
10
+ return TextContainer;
11
+ }());
12
+ exports.TextContainer = TextContainer;
13
+ var transform = function (text, transform) {
14
+ switch (transform) {
15
+ case 1 /* LOWERCASE */:
16
+ return text.toLowerCase();
17
+ case 3 /* CAPITALIZE */:
18
+ return text.replace(CAPITALIZE, capitalize);
19
+ case 2 /* UPPERCASE */:
20
+ return text.toUpperCase();
21
+ default:
22
+ return text;
23
+ }
24
+ };
25
+ var CAPITALIZE = /(^|\s|:|-|\(|\))([a-z])/g;
26
+ var capitalize = function (m, p1, p2) {
27
+ if (m.length > 0) {
28
+ return p1 + p2.toUpperCase();
29
+ }
30
+ return m;
31
+ };
32
+ //# sourceMappingURL=text-container.js.map
node_modules/html2canvas/dist/lib/dom/text-container.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"text-container.js","sourceRoot":"","sources":["../../../src/dom/text-container.ts"],"names":[],"mappings":";;;AAEA,2CAA+D;AAG/D;IAII,uBAAY,OAAgB,EAAE,IAAU,EAAE,MAA4B;QAClE,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;QACvD,IAAI,CAAC,UAAU,GAAG,sBAAe,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IACxE,CAAC;IACL,oBAAC;AAAD,CAAC,AARD,IAQC;AARY,sCAAa;AAU1B,IAAM,SAAS,GAAG,UAAC,IAAY,EAAE,SAAyB;IACtD,QAAQ,SAAS,EAAE;QACf;YACI,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;QAC9B;YACI,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QAChD;YACI,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;QAC9B;YACI,OAAO,IAAI,CAAC;KACnB;AACL,CAAC,CAAC;AAEF,IAAM,UAAU,GAAG,0BAA0B,CAAC;AAE9C,IAAM,UAAU,GAAG,UAAC,CAAS,EAAE,EAAU,EAAE,EAAU;IACjD,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;QACd,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC;KAChC;IAED,OAAO,CAAC,CAAC;AACb,CAAC,CAAC"}
node_modules/html2canvas/dist/lib/index.js ADDED
@@ -0,0 +1,181 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
14
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15
+ return new (P || (P = Promise))(function (resolve, reject) {
16
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
17
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
18
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
19
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
20
+ });
21
+ };
22
+ var __generator = (this && this.__generator) || function (thisArg, body) {
23
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
24
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
25
+ function verb(n) { return function (v) { return step([n, v]); }; }
26
+ function step(op) {
27
+ if (f) throw new TypeError("Generator is already executing.");
28
+ while (_) try {
29
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
30
+ if (y = 0, t) op = [op[0] & 2, t.value];
31
+ switch (op[0]) {
32
+ case 0: case 1: t = op; break;
33
+ case 4: _.label++; return { value: op[1], done: false };
34
+ case 5: _.label++; y = op[1]; op = [0]; continue;
35
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
36
+ default:
37
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
38
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
39
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
40
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
41
+ if (t[2]) _.ops.pop();
42
+ _.trys.pop(); continue;
43
+ }
44
+ op = body.call(thisArg, _);
45
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
46
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
47
+ }
48
+ };
49
+ Object.defineProperty(exports, "__esModule", { value: true });
50
+ var bounds_1 = require("./css/layout/bounds");
51
+ var color_1 = require("./css/types/color");
52
+ var document_cloner_1 = require("./dom/document-cloner");
53
+ var node_parser_1 = require("./dom/node-parser");
54
+ var cache_storage_1 = require("./core/cache-storage");
55
+ var canvas_renderer_1 = require("./render/canvas/canvas-renderer");
56
+ var foreignobject_renderer_1 = require("./render/canvas/foreignobject-renderer");
57
+ var context_1 = require("./core/context");
58
+ var html2canvas = function (element, options) {
59
+ if (options === void 0) { options = {}; }
60
+ return renderElement(element, options);
61
+ };
62
+ exports.default = html2canvas;
63
+ if (typeof window !== 'undefined') {
64
+ cache_storage_1.CacheStorage.setContext(window);
65
+ }
66
+ var renderElement = function (element, opts) { return __awaiter(void 0, void 0, void 0, function () {
67
+ var ownerDocument, defaultView, resourceOptions, contextOptions, windowOptions, windowBounds, context, foreignObjectRendering, cloneOptions, documentCloner, clonedElement, container, _a, width, height, left, top, backgroundColor, renderOptions, canvas, renderer, root, renderer;
68
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
69
+ return __generator(this, function (_u) {
70
+ switch (_u.label) {
71
+ case 0:
72
+ if (!element || typeof element !== 'object') {
73
+ return [2 /*return*/, Promise.reject('Invalid element provided as first argument')];
74
+ }
75
+ ownerDocument = element.ownerDocument;
76
+ if (!ownerDocument) {
77
+ throw new Error("Element is not attached to a Document");
78
+ }
79
+ defaultView = ownerDocument.defaultView;
80
+ if (!defaultView) {
81
+ throw new Error("Document is not attached to a Window");
82
+ }
83
+ resourceOptions = {
84
+ allowTaint: (_b = opts.allowTaint) !== null && _b !== void 0 ? _b : false,
85
+ imageTimeout: (_c = opts.imageTimeout) !== null && _c !== void 0 ? _c : 15000,
86
+ proxy: opts.proxy,
87
+ useCORS: (_d = opts.useCORS) !== null && _d !== void 0 ? _d : false
88
+ };
89
+ contextOptions = __assign({ logging: (_e = opts.logging) !== null && _e !== void 0 ? _e : true, cache: opts.cache }, resourceOptions);
90
+ windowOptions = {
91
+ windowWidth: (_f = opts.windowWidth) !== null && _f !== void 0 ? _f : defaultView.innerWidth,
92
+ windowHeight: (_g = opts.windowHeight) !== null && _g !== void 0 ? _g : defaultView.innerHeight,
93
+ scrollX: (_h = opts.scrollX) !== null && _h !== void 0 ? _h : defaultView.pageXOffset,
94
+ scrollY: (_j = opts.scrollY) !== null && _j !== void 0 ? _j : defaultView.pageYOffset
95
+ };
96
+ windowBounds = new bounds_1.Bounds(windowOptions.scrollX, windowOptions.scrollY, windowOptions.windowWidth, windowOptions.windowHeight);
97
+ context = new context_1.Context(contextOptions, windowBounds);
98
+ foreignObjectRendering = (_k = opts.foreignObjectRendering) !== null && _k !== void 0 ? _k : false;
99
+ cloneOptions = {
100
+ allowTaint: (_l = opts.allowTaint) !== null && _l !== void 0 ? _l : false,
101
+ onclone: opts.onclone,
102
+ ignoreElements: opts.ignoreElements,
103
+ inlineImages: foreignObjectRendering,
104
+ copyStyles: foreignObjectRendering
105
+ };
106
+ context.logger.debug("Starting document clone with size " + windowBounds.width + "x" + windowBounds.height + " scrolled to " + -windowBounds.left + "," + -windowBounds.top);
107
+ documentCloner = new document_cloner_1.DocumentCloner(context, element, cloneOptions);
108
+ clonedElement = documentCloner.clonedReferenceElement;
109
+ if (!clonedElement) {
110
+ return [2 /*return*/, Promise.reject("Unable to find element in cloned iframe")];
111
+ }
112
+ return [4 /*yield*/, documentCloner.toIFrame(ownerDocument, windowBounds)];
113
+ case 1:
114
+ container = _u.sent();
115
+ _a = node_parser_1.isBodyElement(clonedElement) || node_parser_1.isHTMLElement(clonedElement)
116
+ ? bounds_1.parseDocumentSize(clonedElement.ownerDocument)
117
+ : bounds_1.parseBounds(context, clonedElement), width = _a.width, height = _a.height, left = _a.left, top = _a.top;
118
+ backgroundColor = parseBackgroundColor(context, clonedElement, opts.backgroundColor);
119
+ renderOptions = {
120
+ canvas: opts.canvas,
121
+ backgroundColor: backgroundColor,
122
+ scale: (_o = (_m = opts.scale) !== null && _m !== void 0 ? _m : defaultView.devicePixelRatio) !== null && _o !== void 0 ? _o : 1,
123
+ x: ((_p = opts.x) !== null && _p !== void 0 ? _p : 0) + left,
124
+ y: ((_q = opts.y) !== null && _q !== void 0 ? _q : 0) + top,
125
+ width: (_r = opts.width) !== null && _r !== void 0 ? _r : Math.ceil(width),
126
+ height: (_s = opts.height) !== null && _s !== void 0 ? _s : Math.ceil(height)
127
+ };
128
+ if (!foreignObjectRendering) return [3 /*break*/, 3];
129
+ context.logger.debug("Document cloned, using foreign object rendering");
130
+ renderer = new foreignobject_renderer_1.ForeignObjectRenderer(context, renderOptions);
131
+ return [4 /*yield*/, renderer.render(clonedElement)];
132
+ case 2:
133
+ canvas = _u.sent();
134
+ return [3 /*break*/, 5];
135
+ case 3:
136
+ context.logger.debug("Document cloned, element located at " + left + "," + top + " with size " + width + "x" + height + " using computed rendering");
137
+ context.logger.debug("Starting DOM parsing");
138
+ root = node_parser_1.parseTree(context, clonedElement);
139
+ if (backgroundColor === root.styles.backgroundColor) {
140
+ root.styles.backgroundColor = color_1.COLORS.TRANSPARENT;
141
+ }
142
+ context.logger.debug("Starting renderer for element at " + renderOptions.x + "," + renderOptions.y + " with size " + renderOptions.width + "x" + renderOptions.height);
143
+ renderer = new canvas_renderer_1.CanvasRenderer(context, renderOptions);
144
+ return [4 /*yield*/, renderer.render(root)];
145
+ case 4:
146
+ canvas = _u.sent();
147
+ _u.label = 5;
148
+ case 5:
149
+ if ((_t = opts.removeContainer) !== null && _t !== void 0 ? _t : true) {
150
+ if (!document_cloner_1.DocumentCloner.destroy(container)) {
151
+ context.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore");
152
+ }
153
+ }
154
+ context.logger.debug("Finished rendering");
155
+ return [2 /*return*/, canvas];
156
+ }
157
+ });
158
+ }); };
159
+ var parseBackgroundColor = function (context, element, backgroundColorOverride) {
160
+ var ownerDocument = element.ownerDocument;
161
+ // http://www.w3.org/TR/css3-background/#special-backgrounds
162
+ var documentBackgroundColor = ownerDocument.documentElement
163
+ ? color_1.parseColor(context, getComputedStyle(ownerDocument.documentElement).backgroundColor)
164
+ : color_1.COLORS.TRANSPARENT;
165
+ var bodyBackgroundColor = ownerDocument.body
166
+ ? color_1.parseColor(context, getComputedStyle(ownerDocument.body).backgroundColor)
167
+ : color_1.COLORS.TRANSPARENT;
168
+ var defaultBackgroundColor = typeof backgroundColorOverride === 'string'
169
+ ? color_1.parseColor(context, backgroundColorOverride)
170
+ : backgroundColorOverride === null
171
+ ? color_1.COLORS.TRANSPARENT
172
+ : 0xffffffff;
173
+ return element === ownerDocument.documentElement
174
+ ? color_1.isTransparent(documentBackgroundColor)
175
+ ? color_1.isTransparent(bodyBackgroundColor)
176
+ ? defaultBackgroundColor
177
+ : bodyBackgroundColor
178
+ : documentBackgroundColor
179
+ : defaultBackgroundColor;
180
+ };
181
+ //# sourceMappingURL=index.js.map
node_modules/html2canvas/dist/lib/index.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAA2E;AAC3E,2CAAoE;AACpE,yDAAuG;AACvG,iDAA0E;AAC1E,sDAAkD;AAClD,mEAAoG;AACpG,iFAA6E;AAC7E,0CAAuD;AAWvD,IAAM,WAAW,GAAG,UAAC,OAAoB,EAAE,OAA8B;IAA9B,wBAAA,EAAA,YAA8B;IACrE,OAAO,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAC3C,CAAC,CAAC;AAEF,kBAAe,WAAW,CAAC;AAE3B,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,4BAAY,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;CACnC;AAED,IAAM,aAAa,GAAG,UAAO,OAAoB,EAAE,IAAsB;;;;;;gBACrE,IAAI,CAAC,OAAO,IAAI,OA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AC,eAAe;QAC5C,CAAC,CAAC,qBAAa,CAAC,uBAAuB,CAAC;YACpC,CAAC,CAAC,qBAAa,CAAC,mBAAmB,CAAC;gBAChC,CAAC,CAAC,sBAAsB;gBACxB,CAAC,CAAC,mBAAmB;YACzB,CAAC,CAAC,uBAAuB;QAC7B,CAAC,CAAC,sBAAsB,CAAC;AACjC,CAAC,CAAC"}
node_modules/html2canvas/dist/lib/invariant.js ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.invariant = void 0;
4
+ var invariant = function (assertion, error) {
5
+ if (!assertion) {
6
+ console.error(error);
7
+ }
8
+ };
9
+ exports.invariant = invariant;
10
+ //# sourceMappingURL=invariant.js.map
node_modules/html2canvas/dist/lib/invariant.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"invariant.js","sourceRoot":"","sources":["../../src/invariant.ts"],"names":[],"mappings":";;;AAAO,IAAM,SAAS,GAAG,UAAC,SAAkB,EAAE,KAAa;IACvD,IAAI,CAAC,SAAS,EAAE;QACZ,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;KACxB;AACL,CAAC,CAAC;AAJW,QAAA,SAAS,aAIpB"}
node_modules/html2canvas/dist/lib/render/background.js ADDED
@@ -0,0 +1,187 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.calculateBackgroundRepeatPath = exports.getBackgroundValueForIndex = exports.calculateBackgroundSize = exports.isAuto = exports.calculateBackgroundRendering = exports.calculateBackgroundPaintingArea = exports.calculateBackgroundPositioningArea = void 0;
4
+ var background_size_1 = require("../css/property-descriptors/background-size");
5
+ var vector_1 = require("./vector");
6
+ var length_percentage_1 = require("../css/types/length-percentage");
7
+ var parser_1 = require("../css/syntax/parser");
8
+ var box_sizing_1 = require("./box-sizing");
9
+ var calculateBackgroundPositioningArea = function (backgroundOrigin, element) {
10
+ if (backgroundOrigin === 0 /* BORDER_BOX */) {
11
+ return element.bounds;
12
+ }
13
+ if (backgroundOrigin === 2 /* CONTENT_BOX */) {
14
+ return box_sizing_1.contentBox(element);
15
+ }
16
+ return box_sizing_1.paddingBox(element);
17
+ };
18
+ exports.calculateBackgroundPositioningArea = calculateBackgroundPositioningArea;
19
+ var calculateBackgroundPaintingArea = function (backgroundClip, element) {
20
+ if (backgroundClip === 0 /* BORDER_BOX */) {
21
+ return element.bounds;
22
+ }
23
+ if (backgroundClip === 2 /* CONTENT_BOX */) {
24
+ return box_sizing_1.contentBox(element);
25
+ }
26
+ return box_sizing_1.paddingBox(element);
27
+ };
28
+ exports.calculateBackgroundPaintingArea = calculateBackgroundPaintingArea;
29
+ var calculateBackgroundRendering = function (container, index, intrinsicSize) {
30
+ var backgroundPositioningArea = exports.calculateBackgroundPositioningArea(exports.getBackgroundValueForIndex(container.styles.backgroundOrigin, index), container);
31
+ var backgroundPaintingArea = exports.calculateBackgroundPaintingArea(exports.getBackgroundValueForIndex(container.styles.backgroundClip, index), container);
32
+ var backgroundImageSize = exports.calculateBackgroundSize(exports.getBackgroundValueForIndex(container.styles.backgroundSize, index), intrinsicSize, backgroundPositioningArea);
33
+ var sizeWidth = backgroundImageSize[0], sizeHeight = backgroundImageSize[1];
34
+ var position = length_percentage_1.getAbsoluteValueForTuple(exports.getBackgroundValueForIndex(container.styles.backgroundPosition, index), backgroundPositioningArea.width - sizeWidth, backgroundPositioningArea.height - sizeHeight);
35
+ var path = exports.calculateBackgroundRepeatPath(exports.getBackgroundValueForIndex(container.styles.backgroundRepeat, index), position, backgroundImageSize, backgroundPositioningArea, backgroundPaintingArea);
36
+ var offsetX = Math.round(backgroundPositioningArea.left + position[0]);
37
+ var offsetY = Math.round(backgroundPositioningArea.top + position[1]);
38
+ return [path, offsetX, offsetY, sizeWidth, sizeHeight];
39
+ };
40
+ exports.calculateBackgroundRendering = calculateBackgroundRendering;
41
+ var isAuto = function (token) { return parser_1.isIdentToken(token) && token.value === background_size_1.BACKGROUND_SIZE.AUTO; };
42
+ exports.isAuto = isAuto;
43
+ var hasIntrinsicValue = function (value) { return typeof value === 'number'; };
44
+ var calculateBackgroundSize = function (size, _a, bounds) {
45
+ var intrinsicWidth = _a[0], intrinsicHeight = _a[1], intrinsicProportion = _a[2];
46
+ var first = size[0], second = size[1];
47
+ if (!first) {
48
+ return [0, 0];
49
+ }
50
+ if (length_percentage_1.isLengthPercentage(first) && second && length_percentage_1.isLengthPercentage(second)) {
51
+ return [length_percentage_1.getAbsoluteValue(first, bounds.width), length_percentage_1.getAbsoluteValue(second, bounds.height)];
52
+ }
53
+ var hasIntrinsicProportion = hasIntrinsicValue(intrinsicProportion);
54
+ if (parser_1.isIdentToken(first) && (first.value === background_size_1.BACKGROUND_SIZE.CONTAIN || first.value === background_size_1.BACKGROUND_SIZE.COVER)) {
55
+ if (hasIntrinsicValue(intrinsicProportion)) {
56
+ var targetRatio = bounds.width / bounds.height;
57
+ return targetRatio < intrinsicProportion !== (first.value === background_size_1.BACKGROUND_SIZE.COVER)
58
+ ? [bounds.width, bounds.width / intrinsicProportion]
59
+ : [bounds.height * intrinsicProportion, bounds.height];
60
+ }
61
+ return [bounds.width, bounds.height];
62
+ }
63
+ var hasIntrinsicWidth = hasIntrinsicValue(intrinsicWidth);
64
+ var hasIntrinsicHeight = hasIntrinsicValue(intrinsicHeight);
65
+ var hasIntrinsicDimensions = hasIntrinsicWidth || hasIntrinsicHeight;
66
+ // If the background-size is auto or auto auto:
67
+ if (exports.isAuto(first) && (!second || exports.isAuto(second))) {
68
+ // If the image has both horizontal and vertical intrinsic dimensions, it's rendered at that size.
69
+ if (hasIntrinsicWidth && hasIntrinsicHeight) {
70
+ return [intrinsicWidth, intrinsicHeight];
71
+ }
72
+ // If the image has no intrinsic dimensions and has no intrinsic proportions,
73
+ // it's rendered at the size of the background positioning area.
74
+ if (!hasIntrinsicProportion && !hasIntrinsicDimensions) {
75
+ return [bounds.width, bounds.height];
76
+ }
77
+ // TODO If the image has no intrinsic dimensions but has intrinsic proportions, it's rendered as if contain had been specified instead.
78
+ // If the image has only one intrinsic dimension and has intrinsic proportions, it's rendered at the size corresponding to that one dimension.
79
+ // The other dimension is computed using the specified dimension and the intrinsic proportions.
80
+ if (hasIntrinsicDimensions && hasIntrinsicProportion) {
81
+ var width_1 = hasIntrinsicWidth
82
+ ? intrinsicWidth
83
+ : intrinsicHeight * intrinsicProportion;
84
+ var height_1 = hasIntrinsicHeight
85
+ ? intrinsicHeight
86
+ : intrinsicWidth / intrinsicProportion;
87
+ return [width_1, height_1];
88
+ }
89
+ // If the image has only one intrinsic dimension but has no intrinsic proportions,
90
+ // it's rendered using the specified dimension and the other dimension of the background positioning area.
91
+ var width_2 = hasIntrinsicWidth ? intrinsicWidth : bounds.width;
92
+ var height_2 = hasIntrinsicHeight ? intrinsicHeight : bounds.height;
93
+ return [width_2, height_2];
94
+ }
95
+ // If the image has intrinsic proportions, it's stretched to the specified dimension.
96
+ // The unspecified dimension is computed using the specified dimension and the intrinsic proportions.
97
+ if (hasIntrinsicProportion) {
98
+ var width_3 = 0;
99
+ var height_3 = 0;
100
+ if (length_percentage_1.isLengthPercentage(first)) {
101
+ width_3 = length_percentage_1.getAbsoluteValue(first, bounds.width);
102
+ }
103
+ else if (length_percentage_1.isLengthPercentage(second)) {
104
+ height_3 = length_percentage_1.getAbsoluteValue(second, bounds.height);
105
+ }
106
+ if (exports.isAuto(first)) {
107
+ width_3 = height_3 * intrinsicProportion;
108
+ }
109
+ else if (!second || exports.isAuto(second)) {
110
+ height_3 = width_3 / intrinsicProportion;
111
+ }
112
+ return [width_3, height_3];
113
+ }
114
+ // If the image has no intrinsic proportions, it's stretched to the specified dimension.
115
+ // The unspecified dimension is computed using the image's corresponding intrinsic dimension,
116
+ // if there is one. If there is no such intrinsic dimension,
117
+ // it becomes the corresponding dimension of the background positioning area.
118
+ var width = null;
119
+ var height = null;
120
+ if (length_percentage_1.isLengthPercentage(first)) {
121
+ width = length_percentage_1.getAbsoluteValue(first, bounds.width);
122
+ }
123
+ else if (second && length_percentage_1.isLengthPercentage(second)) {
124
+ height = length_percentage_1.getAbsoluteValue(second, bounds.height);
125
+ }
126
+ if (width !== null && (!second || exports.isAuto(second))) {
127
+ height =
128
+ hasIntrinsicWidth && hasIntrinsicHeight
129
+ ? (width / intrinsicWidth) * intrinsicHeight
130
+ : bounds.height;
131
+ }
132
+ if (height !== null && exports.isAuto(first)) {
133
+ width =
134
+ hasIntrinsicWidth && hasIntrinsicHeight
135
+ ? (height / intrinsicHeight) * intrinsicWidth
136
+ : bounds.width;
137
+ }
138
+ if (width !== null && height !== null) {
139
+ return [width, height];
140
+ }
141
+ throw new Error("Unable to calculate background-size for element");
142
+ };
143
+ exports.calculateBackgroundSize = calculateBackgroundSize;
144
+ var getBackgroundValueForIndex = function (values, index) {
145
+ var value = values[index];
146
+ if (typeof value === 'undefined') {
147
+ return values[0];
148
+ }
149
+ return value;
150
+ };
151
+ exports.getBackgroundValueForIndex = getBackgroundValueForIndex;
152
+ var calculateBackgroundRepeatPath = function (repeat, _a, _b, backgroundPositioningArea, backgroundPaintingArea) {
153
+ var x = _a[0], y = _a[1];
154
+ var width = _b[0], height = _b[1];
155
+ switch (repeat) {
156
+ case 2 /* REPEAT_X */:
157
+ return [
158
+ new vector_1.Vector(Math.round(backgroundPositioningArea.left), Math.round(backgroundPositioningArea.top + y)),
159
+ new vector_1.Vector(Math.round(backgroundPositioningArea.left + backgroundPositioningArea.width), Math.round(backgroundPositioningArea.top + y)),
160
+ new vector_1.Vector(Math.round(backgroundPositioningArea.left + backgroundPositioningArea.width), Math.round(height + backgroundPositioningArea.top + y)),
161
+ new vector_1.Vector(Math.round(backgroundPositioningArea.left), Math.round(height + backgroundPositioningArea.top + y))
162
+ ];
163
+ case 3 /* REPEAT_Y */:
164
+ return [
165
+ new vector_1.Vector(Math.round(backgroundPositioningArea.left + x), Math.round(backgroundPositioningArea.top)),
166
+ new vector_1.Vector(Math.round(backgroundPositioningArea.left + x + width), Math.round(backgroundPositioningArea.top)),
167
+ new vector_1.Vector(Math.round(backgroundPositioningArea.left + x + width), Math.round(backgroundPositioningArea.height + backgroundPositioningArea.top)),
168
+ new vector_1.Vector(Math.round(backgroundPositioningArea.left + x), Math.round(backgroundPositioningArea.height + backgroundPositioningArea.top))
169
+ ];
170
+ case 1 /* NO_REPEAT */:
171
+ return [
172
+ new vector_1.Vector(Math.round(backgroundPositioningArea.left + x), Math.round(backgroundPositioningArea.top + y)),
173
+ new vector_1.Vector(Math.round(backgroundPositioningArea.left + x + width), Math.round(backgroundPositioningArea.top + y)),
174
+ new vector_1.Vector(Math.round(backgroundPositioningArea.left + x + width), Math.round(backgroundPositioningArea.top + y + height)),
175
+ new vector_1.Vector(Math.round(backgroundPositioningArea.left + x), Math.round(backgroundPositioningArea.top + y + height))
176
+ ];
177
+ default:
178
+ return [
179
+ new vector_1.Vector(Math.round(backgroundPaintingArea.left), Math.round(backgroundPaintingArea.top)),
180
+ new vector_1.Vector(Math.round(backgroundPaintingArea.left + backgroundPaintingArea.width), Math.round(backgroundPaintingArea.top)),
181
+ new vector_1.Vector(Math.round(backgroundPaintingArea.left + backgroundPaintingArea.width), Math.round(backgroundPaintingArea.height + backgroundPaintingArea.top)),
182
+ new vector_1.Vector(Math.round(backgroundPaintingArea.left), Math.round(backgroundPaintingArea.height + backgroundPaintingArea.top))
183
+ ];
184
+ }
185
+ };
186
+ exports.calculateBackgroundRepeatPath = calculateBackgroundRepeatPath;
187
+ //# sourceMappingURL=background.js.map
node_modules/html2canvas/dist/lib/render/background.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"background.js","sourceRoot":"","sources":["../../../src/render/background.ts"],"names":[],"mappings":";;;AAGA,+EAAgG;AAChG,mCAAgC;AAEhC,oEAA8G;AAC9G,+CAA4D;AAC5D,2CAAoD;AAI7C,IAAM,kCAAkC,GAAG,UAC9C,gBAAmC,EACnC,OAAyB;IAEzB,IAAI,gBAAgB,uBAAiC,EAAE;QACnD,OAAO,OAAO,CAAC,MAAM,CAAC;KACzB;IAED,IAAI,gBAAgB,wBAAkC,EAAE;QACpD,OAAO,uBAAU,CAAC,OAAO,CAAC,CAAC;KAC9B;IAED,OAAO,uBAAU,CAAC,OAAO,CAAC,CAAC;AAC/B,CAAC,CAAC;AAbW,QAAA,kCAAkC,sCAa7C;AAEK,IAAM,+BAA+B,GAAG,UAAC,cAA+B,EAAE,OAAyB;IACtG,IAAI,cAAc,uBAA+B,EAAE;QAC/C,OAAO,OAAO,CAAC,MAAM,CAAC;KACzB;IAED,IAAI,cAAc,wBAAgC,EAAE;QAChD,OAAO,uBAAU,CAAC,OAAO,CAAC,CAAC;KAC9B;IAED,OAAO,uBAAU,CAAC,OAAO,CAAC,CAAC;AAC/B,CAAC,CAAC;AAVW,QAAA,+BAA+B,mCAU1C;AAEK,IAAM,4BAA4B,GAAG,UACxC,SAA2B,EAC3B,KAAa,EACb,aAA4D;IAE5D,IAAM,yBAAyB,GAAG,0CAAkC,CAChE,kCAA0B,CAAC,SAAS,CAAC,MAAM,CAAC,gBAAgB,EAAE,KAAK,CAAC,EACpE,SAAS,CACZ,CAAC;IAEF,IAAM,sBAAsB,GAAG,uCAA+B,CAC1D,kCAA0B,C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BAAsB,CAAC,MAAM,GAAG,sBAAsB,CAAC,GAAG,CAAC,CACzE;aACJ,CAAC;KACT;AACL,CAAC,CAAC;AA5EW,QAAA,6BAA6B,iCA4ExC"}
node_modules/html2canvas/dist/lib/render/bezier-curve.js ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isBezierCurve = exports.BezierCurve = void 0;
4
+ var vector_1 = require("./vector");
5
+ var lerp = function (a, b, t) {
6
+ return new vector_1.Vector(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t);
7
+ };
8
+ var BezierCurve = /** @class */ (function () {
9
+ function BezierCurve(start, startControl, endControl, end) {
10
+ this.type = 1 /* BEZIER_CURVE */;
11
+ this.start = start;
12
+ this.startControl = startControl;
13
+ this.endControl = endControl;
14
+ this.end = end;
15
+ }
16
+ BezierCurve.prototype.subdivide = function (t, firstHalf) {
17
+ var ab = lerp(this.start, this.startControl, t);
18
+ var bc = lerp(this.startControl, this.endControl, t);
19
+ var cd = lerp(this.endControl, this.end, t);
20
+ var abbc = lerp(ab, bc, t);
21
+ var bccd = lerp(bc, cd, t);
22
+ var dest = lerp(abbc, bccd, t);
23
+ return firstHalf ? new BezierCurve(this.start, ab, abbc, dest) : new BezierCurve(dest, bccd, cd, this.end);
24
+ };
25
+ BezierCurve.prototype.add = function (deltaX, deltaY) {
26
+ return new BezierCurve(this.start.add(deltaX, deltaY), this.startControl.add(deltaX, deltaY), this.endControl.add(deltaX, deltaY), this.end.add(deltaX, deltaY));
27
+ };
28
+ BezierCurve.prototype.reverse = function () {
29
+ return new BezierCurve(this.end, this.endControl, this.startControl, this.start);
30
+ };
31
+ return BezierCurve;
32
+ }());
33
+ exports.BezierCurve = BezierCurve;
34
+ var isBezierCurve = function (path) { return path.type === 1 /* BEZIER_CURVE */; };
35
+ exports.isBezierCurve = isBezierCurve;
36
+ //# sourceMappingURL=bezier-curve.js.map
node_modules/html2canvas/dist/lib/render/bezier-curve.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"bezier-curve.js","sourceRoot":"","sources":["../../../src/render/bezier-curve.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAGhC,IAAM,IAAI,GAAG,UAAC,CAAS,EAAE,CAAS,EAAE,CAAS;IACzC,OAAO,IAAI,eAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AACpE,CAAC,CAAC;AAEF;IAOI,qBAAY,KAAa,EAAE,YAAoB,EAAE,UAAkB,EAAE,GAAW;QAC5E,IAAI,CAAC,IAAI,uBAAwB,CAAC;QAClC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACnB,CAAC;IAED,+BAAS,GAAT,UAAU,CAAS,EAAE,SAAkB;QACnC,IAAM,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;QAClD,IAAM,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;QACvD,IAAM,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QAC9C,IAAM,IAAI,GAAG,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAA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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parsePathForBorderStroke = exports.parsePathForBorderDoubleInner = exports.parsePathForBorderDoubleOuter = exports.parsePathForBorder = void 0;
4
+ var bezier_curve_1 = require("./bezier-curve");
5
+ var parsePathForBorder = function (curves, borderSide) {
6
+ switch (borderSide) {
7
+ case 0:
8
+ return createPathFromCurves(curves.topLeftBorderBox, curves.topLeftPaddingBox, curves.topRightBorderBox, curves.topRightPaddingBox);
9
+ case 1:
10
+ return createPathFromCurves(curves.topRightBorderBox, curves.topRightPaddingBox, curves.bottomRightBorderBox, curves.bottomRightPaddingBox);
11
+ case 2:
12
+ return createPathFromCurves(curves.bottomRightBorderBox, curves.bottomRightPaddingBox, curves.bottomLeftBorderBox, curves.bottomLeftPaddingBox);
13
+ case 3:
14
+ default:
15
+ return createPathFromCurves(curves.bottomLeftBorderBox, curves.bottomLeftPaddingBox, curves.topLeftBorderBox, curves.topLeftPaddingBox);
16
+ }
17
+ };
18
+ exports.parsePathForBorder = parsePathForBorder;
19
+ var parsePathForBorderDoubleOuter = function (curves, borderSide) {
20
+ switch (borderSide) {
21
+ case 0:
22
+ return createPathFromCurves(curves.topLeftBorderBox, curves.topLeftBorderDoubleOuterBox, curves.topRightBorderBox, curves.topRightBorderDoubleOuterBox);
23
+ case 1:
24
+ return createPathFromCurves(curves.topRightBorderBox, curves.topRightBorderDoubleOuterBox, curves.bottomRightBorderBox, curves.bottomRightBorderDoubleOuterBox);
25
+ case 2:
26
+ return createPathFromCurves(curves.bottomRightBorderBox, curves.bottomRightBorderDoubleOuterBox, curves.bottomLeftBorderBox, curves.bottomLeftBorderDoubleOuterBox);
27
+ case 3:
28
+ default:
29
+ return createPathFromCurves(curves.bottomLeftBorderBox, curves.bottomLeftBorderDoubleOuterBox, curves.topLeftBorderBox, curves.topLeftBorderDoubleOuterBox);
30
+ }
31
+ };
32
+ exports.parsePathForBorderDoubleOuter = parsePathForBorderDoubleOuter;
33
+ var parsePathForBorderDoubleInner = function (curves, borderSide) {
34
+ switch (borderSide) {
35
+ case 0:
36
+ return createPathFromCurves(curves.topLeftBorderDoubleInnerBox, curves.topLeftPaddingBox, curves.topRightBorderDoubleInnerBox, curves.topRightPaddingBox);
37
+ case 1:
38
+ return createPathFromCurves(curves.topRightBorderDoubleInnerBox, curves.topRightPaddingBox, curves.bottomRightBorderDoubleInnerBox, curves.bottomRightPaddingBox);
39
+ case 2:
40
+ return createPathFromCurves(curves.bottomRightBorderDoubleInnerBox, curves.bottomRightPaddingBox, curves.bottomLeftBorderDoubleInnerBox, curves.bottomLeftPaddingBox);
41
+ case 3:
42
+ default:
43
+ return createPathFromCurves(curves.bottomLeftBorderDoubleInnerBox, curves.bottomLeftPaddingBox, curves.topLeftBorderDoubleInnerBox, curves.topLeftPaddingBox);
44
+ }
45
+ };
46
+ exports.parsePathForBorderDoubleInner = parsePathForBorderDoubleInner;
47
+ var parsePathForBorderStroke = function (curves, borderSide) {
48
+ switch (borderSide) {
49
+ case 0:
50
+ return createStrokePathFromCurves(curves.topLeftBorderStroke, curves.topRightBorderStroke);
51
+ case 1:
52
+ return createStrokePathFromCurves(curves.topRightBorderStroke, curves.bottomRightBorderStroke);
53
+ case 2:
54
+ return createStrokePathFromCurves(curves.bottomRightBorderStroke, curves.bottomLeftBorderStroke);
55
+ case 3:
56
+ default:
57
+ return createStrokePathFromCurves(curves.bottomLeftBorderStroke, curves.topLeftBorderStroke);
58
+ }
59
+ };
60
+ exports.parsePathForBorderStroke = parsePathForBorderStroke;
61
+ var createStrokePathFromCurves = function (outer1, outer2) {
62
+ var path = [];
63
+ if (bezier_curve_1.isBezierCurve(outer1)) {
64
+ path.push(outer1.subdivide(0.5, false));
65
+ }
66
+ else {
67
+ path.push(outer1);
68
+ }
69
+ if (bezier_curve_1.isBezierCurve(outer2)) {
70
+ path.push(outer2.subdivide(0.5, true));
71
+ }
72
+ else {
73
+ path.push(outer2);
74
+ }
75
+ return path;
76
+ };
77
+ var createPathFromCurves = function (outer1, inner1, outer2, inner2) {
78
+ var path = [];
79
+ if (bezier_curve_1.isBezierCurve(outer1)) {
80
+ path.push(outer1.subdivide(0.5, false));
81
+ }
82
+ else {
83
+ path.push(outer1);
84
+ }
85
+ if (bezier_curve_1.isBezierCurve(outer2)) {
86
+ path.push(outer2.subdivide(0.5, true));
87
+ }
88
+ else {
89
+ path.push(outer2);
90
+ }
91
+ if (bezier_curve_1.isBezierCurve(inner2)) {
92
+ path.push(inner2.subdivide(0.5, true).reverse());
93
+ }
94
+ else {
95
+ path.push(inner2);
96
+ }
97
+ if (bezier_curve_1.isBezierCurve(inner1)) {
98
+ path.push(inner1.subdivide(0.5, false).reverse());
99
+ }
100
+ else {
101
+ path.push(inner1);
102
+ }
103
+ return path;
104
+ };
105
+ //# sourceMappingURL=border.js.map
node_modules/html2canvas/dist/lib/render/border.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"border.js","sourceRoot":"","sources":["../../../src/render/border.ts"],"names":[],"mappings":";;;AAEA,+CAA6C;AAEtC,IAAM,kBAAkB,GAAG,UAAC,MAAmB,EAAE,UAAkB;IACtE,QAAQ,UAAU,EAAE;QAChB,KAAK,CAAC;YACF,OAAO,oBAAoB,CACvB,MAAM,CAAC,gBAAgB,EACvB,MAAM,CAAC,iBAAiB,EACxB,MAAM,CAAC,iBAAiB,EACxB,MAAM,CAAC,kBAAkB,CAC5B,CAAC;QACN,KAAK,CAAC;YACF,OAAO,oBAAoB,CACvB,MAAM,CAAC,iBAAiB,EACxB,MAAM,CAAC,kBAAkB,EACzB,MAAM,CAAC,oBAAoB,EAC3B,MAAM,CAAC,qBAAqB,CAC/B,CAAC;QACN,KAAK,CAAC;YACF,OA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AAI,4BAAa,CAAC,MAAM,CAAC,EAAE;QACvB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KACrD;SAAM;QACH,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KACrB;IAED,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC"}
node_modules/html2canvas/dist/lib/render/bound-curves.js ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.calculatePaddingBoxPath = exports.calculateContentBoxPath = exports.calculateBorderBoxPath = exports.BoundCurves = void 0;
4
+ var length_percentage_1 = require("../css/types/length-percentage");
5
+ var vector_1 = require("./vector");
6
+ var bezier_curve_1 = require("./bezier-curve");
7
+ var BoundCurves = /** @class */ (function () {
8
+ function BoundCurves(element) {
9
+ var styles = element.styles;
10
+ var bounds = element.bounds;
11
+ var _a = length_percentage_1.getAbsoluteValueForTuple(styles.borderTopLeftRadius, bounds.width, bounds.height), tlh = _a[0], tlv = _a[1];
12
+ var _b = length_percentage_1.getAbsoluteValueForTuple(styles.borderTopRightRadius, bounds.width, bounds.height), trh = _b[0], trv = _b[1];
13
+ var _c = length_percentage_1.getAbsoluteValueForTuple(styles.borderBottomRightRadius, bounds.width, bounds.height), brh = _c[0], brv = _c[1];
14
+ var _d = length_percentage_1.getAbsoluteValueForTuple(styles.borderBottomLeftRadius, bounds.width, bounds.height), blh = _d[0], blv = _d[1];
15
+ var factors = [];
16
+ factors.push((tlh + trh) / bounds.width);
17
+ factors.push((blh + brh) / bounds.width);
18
+ factors.push((tlv + blv) / bounds.height);
19
+ factors.push((trv + brv) / bounds.height);
20
+ var maxFactor = Math.max.apply(Math, factors);
21
+ if (maxFactor > 1) {
22
+ tlh /= maxFactor;
23
+ tlv /= maxFactor;
24
+ trh /= maxFactor;
25
+ trv /= maxFactor;
26
+ brh /= maxFactor;
27
+ brv /= maxFactor;
28
+ blh /= maxFactor;
29
+ blv /= maxFactor;
30
+ }
31
+ var topWidth = bounds.width - trh;
32
+ var rightHeight = bounds.height - brv;
33
+ var bottomWidth = bounds.width - brh;
34
+ var leftHeight = bounds.height - blv;
35
+ var borderTopWidth = styles.borderTopWidth;
36
+ var borderRightWidth = styles.borderRightWidth;
37
+ var borderBottomWidth = styles.borderBottomWidth;
38
+ var borderLeftWidth = styles.borderLeftWidth;
39
+ var paddingTop = length_percentage_1.getAbsoluteValue(styles.paddingTop, element.bounds.width);
40
+ var paddingRight = length_percentage_1.getAbsoluteValue(styles.paddingRight, element.bounds.width);
41
+ var paddingBottom = length_percentage_1.getAbsoluteValue(styles.paddingBottom, element.bounds.width);
42
+ var paddingLeft = length_percentage_1.getAbsoluteValue(styles.paddingLeft, element.bounds.width);
43
+ this.topLeftBorderDoubleOuterBox =
44
+ tlh > 0 || tlv > 0
45
+ ? getCurvePoints(bounds.left + borderLeftWidth / 3, bounds.top + borderTopWidth / 3, tlh - borderLeftWidth / 3, tlv - borderTopWidth / 3, CORNER.TOP_LEFT)
46
+ : new vector_1.Vector(bounds.left + borderLeftWidth / 3, bounds.top + borderTopWidth / 3);
47
+ this.topRightBorderDoubleOuterBox =
48
+ tlh > 0 || tlv > 0
49
+ ? getCurvePoints(bounds.left + topWidth, bounds.top + borderTopWidth / 3, trh - borderRightWidth / 3, trv - borderTopWidth / 3, CORNER.TOP_RIGHT)
50
+ : new vector_1.Vector(bounds.left + bounds.width - borderRightWidth / 3, bounds.top + borderTopWidth / 3);
51
+ this.bottomRightBorderDoubleOuterBox =
52
+ brh > 0 || brv > 0
53
+ ? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh - borderRightWidth / 3, brv - borderBottomWidth / 3, CORNER.BOTTOM_RIGHT)
54
+ : new vector_1.Vector(bounds.left + bounds.width - borderRightWidth / 3, bounds.top + bounds.height - borderBottomWidth / 3);
55
+ this.bottomLeftBorderDoubleOuterBox =
56
+ blh > 0 || blv > 0
57
+ ? getCurvePoints(bounds.left + borderLeftWidth / 3, bounds.top + leftHeight, blh - borderLeftWidth / 3, blv - borderBottomWidth / 3, CORNER.BOTTOM_LEFT)
58
+ : new vector_1.Vector(bounds.left + borderLeftWidth / 3, bounds.top + bounds.height - borderBottomWidth / 3);
59
+ this.topLeftBorderDoubleInnerBox =
60
+ tlh > 0 || tlv > 0
61
+ ? getCurvePoints(bounds.left + (borderLeftWidth * 2) / 3, bounds.top + (borderTopWidth * 2) / 3, tlh - (borderLeftWidth * 2) / 3, tlv - (borderTopWidth * 2) / 3, CORNER.TOP_LEFT)
62
+ : new vector_1.Vector(bounds.left + (borderLeftWidth * 2) / 3, bounds.top + (borderTopWidth * 2) / 3);
63
+ this.topRightBorderDoubleInnerBox =
64
+ tlh > 0 || tlv > 0
65
+ ? getCurvePoints(bounds.left + topWidth, bounds.top + (borderTopWidth * 2) / 3, trh - (borderRightWidth * 2) / 3, trv - (borderTopWidth * 2) / 3, CORNER.TOP_RIGHT)
66
+ : new vector_1.Vector(bounds.left + bounds.width - (borderRightWidth * 2) / 3, bounds.top + (borderTopWidth * 2) / 3);
67
+ this.bottomRightBorderDoubleInnerBox =
68
+ brh > 0 || brv > 0
69
+ ? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh - (borderRightWidth * 2) / 3, brv - (borderBottomWidth * 2) / 3, CORNER.BOTTOM_RIGHT)
70
+ : new vector_1.Vector(bounds.left + bounds.width - (borderRightWidth * 2) / 3, bounds.top + bounds.height - (borderBottomWidth * 2) / 3);
71
+ this.bottomLeftBorderDoubleInnerBox =
72
+ blh > 0 || blv > 0
73
+ ? getCurvePoints(bounds.left + (borderLeftWidth * 2) / 3, bounds.top + leftHeight, blh - (borderLeftWidth * 2) / 3, blv - (borderBottomWidth * 2) / 3, CORNER.BOTTOM_LEFT)
74
+ : new vector_1.Vector(bounds.left + (borderLeftWidth * 2) / 3, bounds.top + bounds.height - (borderBottomWidth * 2) / 3);
75
+ this.topLeftBorderStroke =
76
+ tlh > 0 || tlv > 0
77
+ ? getCurvePoints(bounds.left + borderLeftWidth / 2, bounds.top + borderTopWidth / 2, tlh - borderLeftWidth / 2, tlv - borderTopWidth / 2, CORNER.TOP_LEFT)
78
+ : new vector_1.Vector(bounds.left + borderLeftWidth / 2, bounds.top + borderTopWidth / 2);
79
+ this.topRightBorderStroke =
80
+ tlh > 0 || tlv > 0
81
+ ? getCurvePoints(bounds.left + topWidth, bounds.top + borderTopWidth / 2, trh - borderRightWidth / 2, trv - borderTopWidth / 2, CORNER.TOP_RIGHT)
82
+ : new vector_1.Vector(bounds.left + bounds.width - borderRightWidth / 2, bounds.top + borderTopWidth / 2);
83
+ this.bottomRightBorderStroke =
84
+ brh > 0 || brv > 0
85
+ ? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh - borderRightWidth / 2, brv - borderBottomWidth / 2, CORNER.BOTTOM_RIGHT)
86
+ : new vector_1.Vector(bounds.left + bounds.width - borderRightWidth / 2, bounds.top + bounds.height - borderBottomWidth / 2);
87
+ this.bottomLeftBorderStroke =
88
+ blh > 0 || blv > 0
89
+ ? getCurvePoints(bounds.left + borderLeftWidth / 2, bounds.top + leftHeight, blh - borderLeftWidth / 2, blv - borderBottomWidth / 2, CORNER.BOTTOM_LEFT)
90
+ : new vector_1.Vector(bounds.left + borderLeftWidth / 2, bounds.top + bounds.height - borderBottomWidth / 2);
91
+ this.topLeftBorderBox =
92
+ tlh > 0 || tlv > 0
93
+ ? getCurvePoints(bounds.left, bounds.top, tlh, tlv, CORNER.TOP_LEFT)
94
+ : new vector_1.Vector(bounds.left, bounds.top);
95
+ this.topRightBorderBox =
96
+ trh > 0 || trv > 0
97
+ ? getCurvePoints(bounds.left + topWidth, bounds.top, trh, trv, CORNER.TOP_RIGHT)
98
+ : new vector_1.Vector(bounds.left + bounds.width, bounds.top);
99
+ this.bottomRightBorderBox =
100
+ brh > 0 || brv > 0
101
+ ? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh, brv, CORNER.BOTTOM_RIGHT)
102
+ : new vector_1.Vector(bounds.left + bounds.width, bounds.top + bounds.height);
103
+ this.bottomLeftBorderBox =
104
+ blh > 0 || blv > 0
105
+ ? getCurvePoints(bounds.left, bounds.top + leftHeight, blh, blv, CORNER.BOTTOM_LEFT)
106
+ : new vector_1.Vector(bounds.left, bounds.top + bounds.height);
107
+ this.topLeftPaddingBox =
108
+ tlh > 0 || tlv > 0
109
+ ? getCurvePoints(bounds.left + borderLeftWidth, bounds.top + borderTopWidth, Math.max(0, tlh - borderLeftWidth), Math.max(0, tlv - borderTopWidth), CORNER.TOP_LEFT)
110
+ : new vector_1.Vector(bounds.left + borderLeftWidth, bounds.top + borderTopWidth);
111
+ this.topRightPaddingBox =
112
+ trh > 0 || trv > 0
113
+ ? getCurvePoints(bounds.left + Math.min(topWidth, bounds.width - borderRightWidth), bounds.top + borderTopWidth, topWidth > bounds.width + borderRightWidth ? 0 : Math.max(0, trh - borderRightWidth), Math.max(0, trv - borderTopWidth), CORNER.TOP_RIGHT)
114
+ : new vector_1.Vector(bounds.left + bounds.width - borderRightWidth, bounds.top + borderTopWidth);
115
+ this.bottomRightPaddingBox =
116
+ brh > 0 || brv > 0
117
+ ? getCurvePoints(bounds.left + Math.min(bottomWidth, bounds.width - borderLeftWidth), bounds.top + Math.min(rightHeight, bounds.height - borderBottomWidth), Math.max(0, brh - borderRightWidth), Math.max(0, brv - borderBottomWidth), CORNER.BOTTOM_RIGHT)
118
+ : new vector_1.Vector(bounds.left + bounds.width - borderRightWidth, bounds.top + bounds.height - borderBottomWidth);
119
+ this.bottomLeftPaddingBox =
120
+ blh > 0 || blv > 0
121
+ ? getCurvePoints(bounds.left + borderLeftWidth, bounds.top + Math.min(leftHeight, bounds.height - borderBottomWidth), Math.max(0, blh - borderLeftWidth), Math.max(0, blv - borderBottomWidth), CORNER.BOTTOM_LEFT)
122
+ : new vector_1.Vector(bounds.left + borderLeftWidth, bounds.top + bounds.height - borderBottomWidth);
123
+ this.topLeftContentBox =
124
+ tlh > 0 || tlv > 0
125
+ ? getCurvePoints(bounds.left + borderLeftWidth + paddingLeft, bounds.top + borderTopWidth + paddingTop, Math.max(0, tlh - (borderLeftWidth + paddingLeft)), Math.max(0, tlv - (borderTopWidth + paddingTop)), CORNER.TOP_LEFT)
126
+ : new vector_1.Vector(bounds.left + borderLeftWidth + paddingLeft, bounds.top + borderTopWidth + paddingTop);
127
+ this.topRightContentBox =
128
+ trh > 0 || trv > 0
129
+ ? getCurvePoints(bounds.left + Math.min(topWidth, bounds.width + borderLeftWidth + paddingLeft), bounds.top + borderTopWidth + paddingTop, topWidth > bounds.width + borderLeftWidth + paddingLeft ? 0 : trh - borderLeftWidth + paddingLeft, trv - (borderTopWidth + paddingTop), CORNER.TOP_RIGHT)
130
+ : new vector_1.Vector(bounds.left + bounds.width - (borderRightWidth + paddingRight), bounds.top + borderTopWidth + paddingTop);
131
+ this.bottomRightContentBox =
132
+ brh > 0 || brv > 0
133
+ ? getCurvePoints(bounds.left + Math.min(bottomWidth, bounds.width - (borderLeftWidth + paddingLeft)), bounds.top + Math.min(rightHeight, bounds.height + borderTopWidth + paddingTop), Math.max(0, brh - (borderRightWidth + paddingRight)), brv - (borderBottomWidth + paddingBottom), CORNER.BOTTOM_RIGHT)
134
+ : new vector_1.Vector(bounds.left + bounds.width - (borderRightWidth + paddingRight), bounds.top + bounds.height - (borderBottomWidth + paddingBottom));
135
+ this.bottomLeftContentBox =
136
+ blh > 0 || blv > 0
137
+ ? getCurvePoints(bounds.left + borderLeftWidth + paddingLeft, bounds.top + leftHeight, Math.max(0, blh - (borderLeftWidth + paddingLeft)), blv - (borderBottomWidth + paddingBottom), CORNER.BOTTOM_LEFT)
138
+ : new vector_1.Vector(bounds.left + borderLeftWidth + paddingLeft, bounds.top + bounds.height - (borderBottomWidth + paddingBottom));
139
+ }
140
+ return BoundCurves;
141
+ }());
142
+ exports.BoundCurves = BoundCurves;
143
+ var CORNER;
144
+ (function (CORNER) {
145
+ CORNER[CORNER["TOP_LEFT"] = 0] = "TOP_LEFT";
146
+ CORNER[CORNER["TOP_RIGHT"] = 1] = "TOP_RIGHT";
147
+ CORNER[CORNER["BOTTOM_RIGHT"] = 2] = "BOTTOM_RIGHT";
148
+ CORNER[CORNER["BOTTOM_LEFT"] = 3] = "BOTTOM_LEFT";
149
+ })(CORNER || (CORNER = {}));
150
+ var getCurvePoints = function (x, y, r1, r2, position) {
151
+ var kappa = 4 * ((Math.sqrt(2) - 1) / 3);
152
+ var ox = r1 * kappa; // control point offset horizontal
153
+ var oy = r2 * kappa; // control point offset vertical
154
+ var xm = x + r1; // x-middle
155
+ var ym = y + r2; // y-middle
156
+ switch (position) {
157
+ case CORNER.TOP_LEFT:
158
+ return new bezier_curve_1.BezierCurve(new vector_1.Vector(x, ym), new vector_1.Vector(x, ym - oy), new vector_1.Vector(xm - ox, y), new vector_1.Vector(xm, y));
159
+ case CORNER.TOP_RIGHT:
160
+ return new bezier_curve_1.BezierCurve(new vector_1.Vector(x, y), new vector_1.Vector(x + ox, y), new vector_1.Vector(xm, ym - oy), new vector_1.Vector(xm, ym));
161
+ case CORNER.BOTTOM_RIGHT:
162
+ return new bezier_curve_1.BezierCurve(new vector_1.Vector(xm, y), new vector_1.Vector(xm, y + oy), new vector_1.Vector(x + ox, ym), new vector_1.Vector(x, ym));
163
+ case CORNER.BOTTOM_LEFT:
164
+ default:
165
+ return new bezier_curve_1.BezierCurve(new vector_1.Vector(xm, ym), new vector_1.Vector(xm - ox, ym), new vector_1.Vector(x, y + oy), new vector_1.Vector(x, y));
166
+ }
167
+ };
168
+ var calculateBorderBoxPath = function (curves) {
169
+ return [curves.topLeftBorderBox, curves.topRightBorderBox, curves.bottomRightBorderBox, curves.bottomLeftBorderBox];
170
+ };
171
+ exports.calculateBorderBoxPath = calculateBorderBoxPath;
172
+ var calculateContentBoxPath = function (curves) {
173
+ return [
174
+ curves.topLeftContentBox,
175
+ curves.topRightContentBox,
176
+ curves.bottomRightContentBox,
177
+ curves.bottomLeftContentBox
178
+ ];
179
+ };
180
+ exports.calculateContentBoxPath = calculateContentBoxPath;
181
+ var calculatePaddingBoxPath = function (curves) {
182
+ return [
183
+ curves.topLeftPaddingBox,
184
+ curves.topRightPaddingBox,
185
+ curves.bottomRightPaddingBox,
186
+ curves.bottomLeftPaddingBox
187
+ ];
188
+ };
189
+ exports.calculatePaddingBoxPath = calculatePaddingBoxPath;
190
+ //# sourceMappingURL=bound-curves.js.map
node_modules/html2canvas/dist/lib/render/bound-curves.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"bound-curves.js","sourceRoot":"","sources":["../../../src/render/bound-curves.ts"],"names":[],"mappings":";;;AACA,oEAA0F;AAC1F,mCAAgC;AAChC,+CAA2C;AAG3C;IA0BI,qBAAY,OAAyB;QACjC,IAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC9B,IAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAE1B,IAAA,KAAa,4CAAwB,CAAC,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,EAA7F,GAAG,QAAA,EAAE,GAAG,QAAqF,CAAC;QAC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AAC,gBAAgB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAAC,mBAAmB,CAAC,CAAC;AACxH,CAAC,CAAC;AAFW,QAAA,sBAAsB,0BAEjC;AAEK,IAAM,uBAAuB,GAAG,UAAC,MAAmB;IACvD,OAAO;QACH,MAAM,CAAC,iBAAiB;QACxB,MAAM,CAAC,kBAAkB;QACzB,MAAM,CAAC,qBAAqB;QAC5B,MAAM,CAAC,oBAAoB;KAC9B,CAAC;AACN,CAAC,CAAC;AAPW,QAAA,uBAAuB,2BAOlC;AAEK,IAAM,uBAAuB,GAAG,UAAC,MAAmB;IACvD,OAAO;QACH,MAAM,CAAC,iBAAiB;QACxB,MAAM,CAAC,kBAAkB;QACzB,MAAM,CAAC,qBAAqB;QAC5B,MAAM,CAAC,oBAAoB;KAC9B,CAAC;AACN,CAAC,CAAC;AAPW,QAAA,uBAAuB,2BAOlC"}
node_modules/html2canvas/dist/lib/render/box-sizing.js ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.contentBox = exports.paddingBox = void 0;
4
+ var length_percentage_1 = require("../css/types/length-percentage");
5
+ var paddingBox = function (element) {
6
+ var bounds = element.bounds;
7
+ var styles = element.styles;
8
+ return bounds.add(styles.borderLeftWidth, styles.borderTopWidth, -(styles.borderRightWidth + styles.borderLeftWidth), -(styles.borderTopWidth + styles.borderBottomWidth));
9
+ };
10
+ exports.paddingBox = paddingBox;
11
+ var contentBox = function (element) {
12
+ var styles = element.styles;
13
+ var bounds = element.bounds;
14
+ var paddingLeft = length_percentage_1.getAbsoluteValue(styles.paddingLeft, bounds.width);
15
+ var paddingRight = length_percentage_1.getAbsoluteValue(styles.paddingRight, bounds.width);
16
+ var paddingTop = length_percentage_1.getAbsoluteValue(styles.paddingTop, bounds.width);
17
+ var paddingBottom = length_percentage_1.getAbsoluteValue(styles.paddingBottom, bounds.width);
18
+ return bounds.add(paddingLeft + styles.borderLeftWidth, paddingTop + styles.borderTopWidth, -(styles.borderRightWidth + styles.borderLeftWidth + paddingLeft + paddingRight), -(styles.borderTopWidth + styles.borderBottomWidth + paddingTop + paddingBottom));
19
+ };
20
+ exports.contentBox = contentBox;
21
+ //# sourceMappingURL=box-sizing.js.map
node_modules/html2canvas/dist/lib/render/box-sizing.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"box-sizing.js","sourceRoot":"","sources":["../../../src/render/box-sizing.ts"],"names":[],"mappings":";;;AAAA,oEAAgE;AAIzD,IAAM,UAAU,GAAG,UAAC,OAAyB;IAChD,IAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC9B,IAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC9B,OAAO,MAAM,CAAC,GAAG,CACb,MAAM,CAAC,eAAe,EACtB,MAAM,CAAC,cAAc,EACrB,CAAC,CAAC,MAAM,CAAC,gBAAgB,GAAG,MAAM,CAAC,eAAe,CAAC,EACnD,CAAC,CAAC,MAAM,CAAC,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC,CACtD,CAAC;AACN,CAAC,CAAC;AATW,QAAA,UAAU,cASrB;AAEK,IAAM,UAAU,GAAG,UAAC,OAAyB;IAChD,IAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC9B,IAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAE9B,IAAM,WAAW,GAAG,oCAAgB,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IACvE,IAAM,YAAY,GAAG,oCAAgB,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IACzE,IAAM,UAAU,GAAG,oCAAgB,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IACrE,IAAM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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
+ return new (P || (P = Promise))(function (resolve, reject) {
20
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
21
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
24
+ });
25
+ };
26
+ var __generator = (this && this.__generator) || function (thisArg, body) {
27
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
28
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
+ function verb(n) { return function (v) { return step([n, v]); }; }
30
+ function step(op) {
31
+ if (f) throw new TypeError("Generator is already executing.");
32
+ while (_) try {
33
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
34
+ if (y = 0, t) op = [op[0] & 2, t.value];
35
+ switch (op[0]) {
36
+ case 0: case 1: t = op; break;
37
+ case 4: _.label++; return { value: op[1], done: false };
38
+ case 5: _.label++; y = op[1]; op = [0]; continue;
39
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
40
+ default:
41
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
42
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
43
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
44
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
45
+ if (t[2]) _.ops.pop();
46
+ _.trys.pop(); continue;
47
+ }
48
+ op = body.call(thisArg, _);
49
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
50
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
+ }
52
+ };
53
+ Object.defineProperty(exports, "__esModule", { value: true });
54
+ exports.CanvasRenderer = void 0;
55
+ var stacking_context_1 = require("../stacking-context");
56
+ var color_1 = require("../../css/types/color");
57
+ var path_1 = require("../path");
58
+ var bound_curves_1 = require("../bound-curves");
59
+ var bezier_curve_1 = require("../bezier-curve");
60
+ var vector_1 = require("../vector");
61
+ var image_1 = require("../../css/types/image");
62
+ var border_1 = require("../border");
63
+ var background_1 = require("../background");
64
+ var parser_1 = require("../../css/syntax/parser");
65
+ var text_1 = require("../../css/layout/text");
66
+ var image_element_container_1 = require("../../dom/replaced-elements/image-element-container");
67
+ var box_sizing_1 = require("../box-sizing");
68
+ var canvas_element_container_1 = require("../../dom/replaced-elements/canvas-element-container");
69
+ var svg_element_container_1 = require("../../dom/replaced-elements/svg-element-container");
70
+ var effects_1 = require("../effects");
71
+ var bitwise_1 = require("../../core/bitwise");
72
+ var gradient_1 = require("../../css/types/functions/gradient");
73
+ var length_percentage_1 = require("../../css/types/length-percentage");
74
+ var font_metrics_1 = require("../font-metrics");
75
+ var bounds_1 = require("../../css/layout/bounds");
76
+ var line_height_1 = require("../../css/property-descriptors/line-height");
77
+ var input_element_container_1 = require("../../dom/replaced-elements/input-element-container");
78
+ var textarea_element_container_1 = require("../../dom/elements/textarea-element-container");
79
+ var select_element_container_1 = require("../../dom/elements/select-element-container");
80
+ var iframe_element_container_1 = require("../../dom/replaced-elements/iframe-element-container");
81
+ var renderer_1 = require("../renderer");
82
+ var MASK_OFFSET = 10000;
83
+ var CanvasRenderer = /** @class */ (function (_super) {
84
+ __extends(CanvasRenderer, _super);
85
+ function CanvasRenderer(context, options) {
86
+ var _this = _super.call(this, context, options) || this;
87
+ _this._activeEffects = [];
88
+ _this.canvas = options.canvas ? options.canvas : document.createElement('canvas');
89
+ _this.ctx = _this.canvas.getContext('2d');
90
+ if (!options.canvas) {
91
+ _this.canvas.width = Math.floor(options.width * options.scale);
92
+ _this.canvas.height = Math.floor(options.height * options.scale);
93
+ _this.canvas.style.width = options.width + "px";
94
+ _this.canvas.style.height = options.height + "px";
95
+ }
96
+ _this.fontMetrics = new font_metrics_1.FontMetrics(document);
97
+ _this.ctx.scale(_this.options.scale, _this.options.scale);
98
+ _this.ctx.translate(-options.x, -options.y);
99
+ _this.ctx.textBaseline = 'bottom';
100
+ _this._activeEffects = [];
101
+ _this.context.logger.debug("Canvas renderer initialized (" + options.width + "x" + options.height + ") with scale " + options.scale);
102
+ return _this;
103
+ }
104
+ CanvasRenderer.prototype.applyEffects = function (effects) {
105
+ var _this = this;
106
+ while (this._activeEffects.length) {
107
+ this.popEffect();
108
+ }
109
+ effects.forEach(function (effect) { return _this.applyEffect(effect); });
110
+ };
111
+ CanvasRenderer.prototype.applyEffect = function (effect) {
112
+ this.ctx.save();
113
+ if (effects_1.isOpacityEffect(effect)) {
114
+ this.ctx.globalAlpha = effect.opacity;
115
+ }
116
+ if (effects_1.isTransformEffect(effect)) {
117
+ this.ctx.translate(effect.offsetX, effect.offsetY);
118
+ this.ctx.transform(effect.matrix[0], effect.matrix[1], effect.matrix[2], effect.matrix[3], effect.matrix[4], effect.matrix[5]);
119
+ this.ctx.translate(-effect.offsetX, -effect.offsetY);
120
+ }
121
+ if (effects_1.isClipEffect(effect)) {
122
+ this.path(effect.path);
123
+ this.ctx.clip();
124
+ }
125
+ this._activeEffects.push(effect);
126
+ };
127
+ CanvasRenderer.prototype.popEffect = function () {
128
+ this._activeEffects.pop();
129
+ this.ctx.restore();
130
+ };
131
+ CanvasRenderer.prototype.renderStack = function (stack) {
132
+ return __awaiter(this, void 0, void 0, function () {
133
+ var styles;
134
+ return __generator(this, function (_a) {
135
+ switch (_a.label) {
136
+ case 0:
137
+ styles = stack.element.container.styles;
138
+ if (!styles.isVisible()) return [3 /*break*/, 2];
139
+ return [4 /*yield*/, this.renderStackContent(stack)];
140
+ case 1:
141
+ _a.sent();
142
+ _a.label = 2;
143
+ case 2: return [2 /*return*/];
144
+ }
145
+ });
146
+ });
147
+ };
148
+ CanvasRenderer.prototype.renderNode = function (paint) {
149
+ return __awaiter(this, void 0, void 0, function () {
150
+ return __generator(this, function (_a) {
151
+ switch (_a.label) {
152
+ case 0:
153
+ if (bitwise_1.contains(paint.container.flags, 16 /* DEBUG_RENDER */)) {
154
+ debugger;
155
+ }
156
+ if (!paint.container.styles.isVisible()) return [3 /*break*/, 3];
157
+ return [4 /*yield*/, this.renderNodeBackgroundAndBorders(paint)];
158
+ case 1:
159
+ _a.sent();
160
+ return [4 /*yield*/, this.renderNodeContent(paint)];
161
+ case 2:
162
+ _a.sent();
163
+ _a.label = 3;
164
+ case 3: return [2 /*return*/];
165
+ }
166
+ });
167
+ });
168
+ };
169
+ CanvasRenderer.prototype.renderTextWithLetterSpacing = function (text, letterSpacing, baseline) {
170
+ var _this = this;
171
+ if (letterSpacing === 0) {
172
+ this.ctx.fillText(text.text, text.bounds.left, text.bounds.top + baseline);
173
+ }
174
+ else {
175
+ var letters = text_1.segmentGraphemes(text.text);
176
+ letters.reduce(function (left, letter) {
177
+ _this.ctx.fillText(letter, left, text.bounds.top + baseline);
178
+ return left + _this.ctx.measureText(letter).width;
179
+ }, text.bounds.left);
180
+ }
181
+ };
182
+ CanvasRenderer.prototype.createFontStyle = function (styles) {
183
+ var fontVariant = styles.fontVariant
184
+ .filter(function (variant) { return variant === 'normal' || variant === 'small-caps'; })
185
+ .join('');
186
+ var fontFamily = fixIOSSystemFonts(styles.fontFamily).join(', ');
187
+ var fontSize = parser_1.isDimensionToken(styles.fontSize)
188
+ ? "" + styles.fontSize.number + styles.fontSize.unit
189
+ : styles.fontSize.number + "px";
190
+ return [
191
+ [styles.fontStyle, fontVariant, styles.fontWeight, fontSize, fontFamily].join(' '),
192
+ fontFamily,
193
+ fontSize
194
+ ];
195
+ };
196
+ CanvasRenderer.prototype.renderTextNode = function (text, styles) {
197
+ return __awaiter(this, void 0, void 0, function () {
198
+ var _a, font, fontFamily, fontSize, _b, baseline, middle, paintOrder;
199
+ var _this = this;
200
+ return __generator(this, function (_c) {
201
+ _a = this.createFontStyle(styles), font = _a[0], fontFamily = _a[1], fontSize = _a[2];
202
+ this.ctx.font = font;
203
+ this.ctx.direction = styles.direction === 1 /* RTL */ ? 'rtl' : 'ltr';
204
+ this.ctx.textAlign = 'left';
205
+ this.ctx.textBaseline = 'alphabetic';
206
+ _b = this.fontMetrics.getMetrics(fontFamily, fontSize), baseline = _b.baseline, middle = _b.middle;
207
+ paintOrder = styles.paintOrder;
208
+ text.textBounds.forEach(function (text) {
209
+ paintOrder.forEach(function (paintOrderLayer) {
210
+ switch (paintOrderLayer) {
211
+ case 0 /* FILL */:
212
+ _this.ctx.fillStyle = color_1.asString(styles.color);
213
+ _this.renderTextWithLetterSpacing(text, styles.letterSpacing, baseline);
214
+ var textShadows = styles.textShadow;
215
+ if (textShadows.length && text.text.trim().length) {
216
+ textShadows
217
+ .slice(0)
218
+ .reverse()
219
+ .forEach(function (textShadow) {
220
+ _this.ctx.shadowColor = color_1.asString(textShadow.color);
221
+ _this.ctx.shadowOffsetX = textShadow.offsetX.number * _this.options.scale;
222
+ _this.ctx.shadowOffsetY = textShadow.offsetY.number * _this.options.scale;
223
+ _this.ctx.shadowBlur = textShadow.blur.number;
224
+ _this.renderTextWithLetterSpacing(text, styles.letterSpacing, baseline);
225
+ });
226
+ _this.ctx.shadowColor = '';
227
+ _this.ctx.shadowOffsetX = 0;
228
+ _this.ctx.shadowOffsetY = 0;
229
+ _this.ctx.shadowBlur = 0;
230
+ }
231
+ if (styles.textDecorationLine.length) {
232
+ _this.ctx.fillStyle = color_1.asString(styles.textDecorationColor || styles.color);
233
+ styles.textDecorationLine.forEach(function (textDecorationLine) {
234
+ switch (textDecorationLine) {
235
+ case 1 /* UNDERLINE */:
236
+ // Draws a line at the baseline of the font
237
+ // TODO As some browsers display the line as more than 1px if the font-size is big,
238
+ // need to take that into account both in position and size
239
+ _this.ctx.fillRect(text.bounds.left, Math.round(text.bounds.top + baseline), text.bounds.width, 1);
240
+ break;
241
+ case 2 /* OVERLINE */:
242
+ _this.ctx.fillRect(text.bounds.left, Math.round(text.bounds.top), text.bounds.width, 1);
243
+ break;
244
+ case 3 /* LINE_THROUGH */:
245
+ // TODO try and find exact position for line-through
246
+ _this.ctx.fillRect(text.bounds.left, Math.ceil(text.bounds.top + middle), text.bounds.width, 1);
247
+ break;
248
+ }
249
+ });
250
+ }
251
+ break;
252
+ case 1 /* STROKE */:
253
+ if (styles.webkitTextStrokeWidth && text.text.trim().length) {
254
+ _this.ctx.strokeStyle = color_1.asString(styles.webkitTextStrokeColor);
255
+ _this.ctx.lineWidth = styles.webkitTextStrokeWidth;
256
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
257
+ _this.ctx.lineJoin = !!window.chrome ? 'miter' : 'round';
258
+ _this.ctx.strokeText(text.text, text.bounds.left, text.bounds.top + baseline);
259
+ }
260
+ _this.ctx.strokeStyle = '';
261
+ _this.ctx.lineWidth = 0;
262
+ _this.ctx.lineJoin = 'miter';
263
+ break;
264
+ }
265
+ });
266
+ });
267
+ return [2 /*return*/];
268
+ });
269
+ });
270
+ };
271
+ CanvasRenderer.prototype.renderReplacedElement = function (container, curves, image) {
272
+ if (image && container.intrinsicWidth > 0 && container.intrinsicHeight > 0) {
273
+ var box = box_sizing_1.contentBox(container);
274
+ var path = bound_curves_1.calculatePaddingBoxPath(curves);
275
+ this.path(path);
276
+ this.ctx.save();
277
+ this.ctx.clip();
278
+ this.ctx.drawImage(image, 0, 0, container.intrinsicWidth, container.intrinsicHeight, box.left, box.top, box.width, box.height);
279
+ this.ctx.restore();
280
+ }
281
+ };
282
+ CanvasRenderer.prototype.renderNodeContent = function (paint) {
283
+ return __awaiter(this, void 0, void 0, function () {
284
+ var container, curves, styles, _i, _a, child, image, e_1, image, e_2, iframeRenderer, canvas, size, _b, fontFamily, fontSize, baseline, bounds, x, textBounds, img, image, url, e_3, fontFamily, bounds;
285
+ return __generator(this, function (_c) {
286
+ switch (_c.label) {
287
+ case 0:
288
+ this.applyEffects(paint.getEffects(4 /* CONTENT */));
289
+ container = paint.container;
290
+ curves = paint.curves;
291
+ styles = container.styles;
292
+ _i = 0, _a = container.textNodes;
293
+ _c.label = 1;
294
+ case 1:
295
+ if (!(_i < _a.length)) return [3 /*break*/, 4];
296
+ child = _a[_i];
297
+ return [4 /*yield*/, this.renderTextNode(child, styles)];
298
+ case 2:
299
+ _c.sent();
300
+ _c.label = 3;
301
+ case 3:
302
+ _i++;
303
+ return [3 /*break*/, 1];
304
+ case 4:
305
+ if (!(container instanceof image_element_container_1.ImageElementContainer)) return [3 /*break*/, 8];
306
+ _c.label = 5;
307
+ case 5:
308
+ _c.trys.push([5, 7, , 8]);
309
+ return [4 /*yield*/, this.context.cache.match(container.src)];
310
+ case 6:
311
+ image = _c.sent();
312
+ this.renderReplacedElement(container, curves, image);
313
+ return [3 /*break*/, 8];
314
+ case 7:
315
+ e_1 = _c.sent();
316
+ this.context.logger.error("Error loading image " + container.src);
317
+ return [3 /*break*/, 8];
318
+ case 8:
319
+ if (container instanceof canvas_element_container_1.CanvasElementContainer) {
320
+ this.renderReplacedElement(container, curves, container.canvas);
321
+ }
322
+ if (!(container instanceof svg_element_container_1.SVGElementContainer)) return [3 /*break*/, 12];
323
+ _c.label = 9;
324
+ case 9:
325
+ _c.trys.push([9, 11, , 12]);
326
+ return [4 /*yield*/, this.context.cache.match(container.svg)];
327
+ case 10:
328
+ image = _c.sent();
329
+ this.renderReplacedElement(container, curves, image);
330
+ return [3 /*break*/, 12];
331
+ case 11:
332
+ e_2 = _c.sent();
333
+ this.context.logger.error("Error loading svg " + container.svg.substring(0, 255));
334
+ return [3 /*break*/, 12];
335
+ case 12:
336
+ if (!(container instanceof iframe_element_container_1.IFrameElementContainer && container.tree)) return [3 /*break*/, 14];
337
+ iframeRenderer = new CanvasRenderer(this.context, {
338
+ scale: this.options.scale,
339
+ backgroundColor: container.backgroundColor,
340
+ x: 0,
341
+ y: 0,
342
+ width: container.width,
343
+ height: container.height
344
+ });
345
+ return [4 /*yield*/, iframeRenderer.render(container.tree)];
346
+ case 13:
347
+ canvas = _c.sent();
348
+ if (container.width && container.height) {
349
+ this.ctx.drawImage(canvas, 0, 0, container.width, container.height, container.bounds.left, container.bounds.top, container.bounds.width, container.bounds.height);
350
+ }
351
+ _c.label = 14;
352
+ case 14:
353
+ if (container instanceof input_element_container_1.InputElementContainer) {
354
+ size = Math.min(container.bounds.width, container.bounds.height);
355
+ if (container.type === input_element_container_1.CHECKBOX) {
356
+ if (container.checked) {
357
+ this.ctx.save();
358
+ this.path([
359
+ new vector_1.Vector(container.bounds.left + size * 0.39363, container.bounds.top + size * 0.79),
360
+ new vector_1.Vector(container.bounds.left + size * 0.16, container.bounds.top + size * 0.5549),
361
+ new vector_1.Vector(container.bounds.left + size * 0.27347, container.bounds.top + size * 0.44071),
362
+ new vector_1.Vector(container.bounds.left + size * 0.39694, container.bounds.top + size * 0.5649),
363
+ new vector_1.Vector(container.bounds.left + size * 0.72983, container.bounds.top + size * 0.23),
364
+ new vector_1.Vector(container.bounds.left + size * 0.84, container.bounds.top + size * 0.34085),
365
+ new vector_1.Vector(container.bounds.left + size * 0.39363, container.bounds.top + size * 0.79)
366
+ ]);
367
+ this.ctx.fillStyle = color_1.asString(input_element_container_1.INPUT_COLOR);
368
+ this.ctx.fill();
369
+ this.ctx.restore();
370
+ }
371
+ }
372
+ else if (container.type === input_element_container_1.RADIO) {
373
+ if (container.checked) {
374
+ this.ctx.save();
375
+ this.ctx.beginPath();
376
+ this.ctx.arc(container.bounds.left + size / 2, container.bounds.top + size / 2, size / 4, 0, Math.PI * 2, true);
377
+ this.ctx.fillStyle = color_1.asString(input_element_container_1.INPUT_COLOR);
378
+ this.ctx.fill();
379
+ this.ctx.restore();
380
+ }
381
+ }
382
+ }
383
+ if (isTextInputElement(container) && container.value.length) {
384
+ _b = this.createFontStyle(styles), fontFamily = _b[0], fontSize = _b[1];
385
+ baseline = this.fontMetrics.getMetrics(fontFamily, fontSize).baseline;
386
+ this.ctx.font = fontFamily;
387
+ this.ctx.fillStyle = color_1.asString(styles.color);
388
+ this.ctx.textBaseline = 'alphabetic';
389
+ this.ctx.textAlign = canvasTextAlign(container.styles.textAlign);
390
+ bounds = box_sizing_1.contentBox(container);
391
+ x = 0;
392
+ switch (container.styles.textAlign) {
393
+ case 1 /* CENTER */:
394
+ x += bounds.width / 2;
395
+ break;
396
+ case 2 /* RIGHT */:
397
+ x += bounds.width;
398
+ break;
399
+ }
400
+ textBounds = bounds.add(x, 0, 0, -bounds.height / 2 + 1);
401
+ this.ctx.save();
402
+ this.path([
403
+ new vector_1.Vector(bounds.left, bounds.top),
404
+ new vector_1.Vector(bounds.left + bounds.width, bounds.top),
405
+ new vector_1.Vector(bounds.left + bounds.width, bounds.top + bounds.height),
406
+ new vector_1.Vector(bounds.left, bounds.top + bounds.height)
407
+ ]);
408
+ this.ctx.clip();
409
+ this.renderTextWithLetterSpacing(new text_1.TextBounds(container.value, textBounds), styles.letterSpacing, baseline);
410
+ this.ctx.restore();
411
+ this.ctx.textBaseline = 'alphabetic';
412
+ this.ctx.textAlign = 'left';
413
+ }
414
+ if (!bitwise_1.contains(container.styles.display, 2048 /* LIST_ITEM */)) return [3 /*break*/, 20];
415
+ if (!(container.styles.listStyleImage !== null)) return [3 /*break*/, 19];
416
+ img = container.styles.listStyleImage;
417
+ if (!(img.type === 0 /* URL */)) return [3 /*break*/, 18];
418
+ image = void 0;
419
+ url = img.url;
420
+ _c.label = 15;
421
+ case 15:
422
+ _c.trys.push([15, 17, , 18]);
423
+ return [4 /*yield*/, this.context.cache.match(url)];
424
+ case 16:
425
+ image = _c.sent();
426
+ this.ctx.drawImage(image, container.bounds.left - (image.width + 10), container.bounds.top);
427
+ return [3 /*break*/, 18];
428
+ case 17:
429
+ e_3 = _c.sent();
430
+ this.context.logger.error("Error loading list-style-image " + url);
431
+ return [3 /*break*/, 18];
432
+ case 18: return [3 /*break*/, 20];
433
+ case 19:
434
+ if (paint.listValue && container.styles.listStyleType !== -1 /* NONE */) {
435
+ fontFamily = this.createFontStyle(styles)[0];
436
+ this.ctx.font = fontFamily;
437
+ this.ctx.fillStyle = color_1.asString(styles.color);
438
+ this.ctx.textBaseline = 'middle';
439
+ this.ctx.textAlign = 'right';
440
+ bounds = new bounds_1.Bounds(container.bounds.left, container.bounds.top + length_percentage_1.getAbsoluteValue(container.styles.paddingTop, container.bounds.width), container.bounds.width, line_height_1.computeLineHeight(styles.lineHeight, styles.fontSize.number) / 2 + 1);
441
+ this.renderTextWithLetterSpacing(new text_1.TextBounds(paint.listValue, bounds), styles.letterSpacing, line_height_1.computeLineHeight(styles.lineHeight, styles.fontSize.number) / 2 + 2);
442
+ this.ctx.textBaseline = 'bottom';
443
+ this.ctx.textAlign = 'left';
444
+ }
445
+ _c.label = 20;
446
+ case 20: return [2 /*return*/];
447
+ }
448
+ });
449
+ });
450
+ };
451
+ CanvasRenderer.prototype.renderStackContent = function (stack) {
452
+ return __awaiter(this, void 0, void 0, function () {
453
+ var _i, _a, child, _b, _c, child, _d, _e, child, _f, _g, child, _h, _j, child, _k, _l, child, _m, _o, child;
454
+ return __generator(this, function (_p) {
455
+ switch (_p.label) {
456
+ case 0:
457
+ if (bitwise_1.contains(stack.element.container.flags, 16 /* DEBUG_RENDER */)) {
458
+ debugger;
459
+ }
460
+ // https://www.w3.org/TR/css-position-3/#painting-order
461
+ // 1. the background and borders of the element forming the stacking context.
462
+ return [4 /*yield*/, this.renderNodeBackgroundAndBorders(stack.element)];
463
+ case 1:
464
+ // https://www.w3.org/TR/css-position-3/#painting-order
465
+ // 1. the background and borders of the element forming the stacking context.
466
+ _p.sent();
467
+ _i = 0, _a = stack.negativeZIndex;
468
+ _p.label = 2;
469
+ case 2:
470
+ if (!(_i < _a.length)) return [3 /*break*/, 5];
471
+ child = _a[_i];
472
+ return [4 /*yield*/, this.renderStack(child)];
473
+ case 3:
474
+ _p.sent();
475
+ _p.label = 4;
476
+ case 4:
477
+ _i++;
478
+ return [3 /*break*/, 2];
479
+ case 5:
480
+ // 3. For all its in-flow, non-positioned, block-level descendants in tree order:
481
+ return [4 /*yield*/, this.renderNodeContent(stack.element)];
482
+ case 6:
483
+ // 3. For all its in-flow, non-positioned, block-level descendants in tree order:
484
+ _p.sent();
485
+ _b = 0, _c = stack.nonInlineLevel;
486
+ _p.label = 7;
487
+ case 7:
488
+ if (!(_b < _c.length)) return [3 /*break*/, 10];
489
+ child = _c[_b];
490
+ return [4 /*yield*/, this.renderNode(child)];
491
+ case 8:
492
+ _p.sent();
493
+ _p.label = 9;
494
+ case 9:
495
+ _b++;
496
+ return [3 /*break*/, 7];
497
+ case 10:
498
+ _d = 0, _e = stack.nonPositionedFloats;
499
+ _p.label = 11;
500
+ case 11:
501
+ if (!(_d < _e.length)) return [3 /*break*/, 14];
502
+ child = _e[_d];
503
+ return [4 /*yield*/, this.renderStack(child)];
504
+ case 12:
505
+ _p.sent();
506
+ _p.label = 13;
507
+ case 13:
508
+ _d++;
509
+ return [3 /*break*/, 11];
510
+ case 14:
511
+ _f = 0, _g = stack.nonPositionedInlineLevel;
512
+ _p.label = 15;
513
+ case 15:
514
+ if (!(_f < _g.length)) return [3 /*break*/, 18];
515
+ child = _g[_f];
516
+ return [4 /*yield*/, this.renderStack(child)];
517
+ case 16:
518
+ _p.sent();
519
+ _p.label = 17;
520
+ case 17:
521
+ _f++;
522
+ return [3 /*break*/, 15];
523
+ case 18:
524
+ _h = 0, _j = stack.inlineLevel;
525
+ _p.label = 19;
526
+ case 19:
527
+ if (!(_h < _j.length)) return [3 /*break*/, 22];
528
+ child = _j[_h];
529
+ return [4 /*yield*/, this.renderNode(child)];
530
+ case 20:
531
+ _p.sent();
532
+ _p.label = 21;
533
+ case 21:
534
+ _h++;
535
+ return [3 /*break*/, 19];
536
+ case 22:
537
+ _k = 0, _l = stack.zeroOrAutoZIndexOrTransformedOrOpacity;
538
+ _p.label = 23;
539
+ case 23:
540
+ if (!(_k < _l.length)) return [3 /*break*/, 26];
541
+ child = _l[_k];
542
+ return [4 /*yield*/, this.renderStack(child)];
543
+ case 24:
544
+ _p.sent();
545
+ _p.label = 25;
546
+ case 25:
547
+ _k++;
548
+ return [3 /*break*/, 23];
549
+ case 26:
550
+ _m = 0, _o = stack.positiveZIndex;
551
+ _p.label = 27;
552
+ case 27:
553
+ if (!(_m < _o.length)) return [3 /*break*/, 30];
554
+ child = _o[_m];
555
+ return [4 /*yield*/, this.renderStack(child)];
556
+ case 28:
557
+ _p.sent();
558
+ _p.label = 29;
559
+ case 29:
560
+ _m++;
561
+ return [3 /*break*/, 27];
562
+ case 30: return [2 /*return*/];
563
+ }
564
+ });
565
+ });
566
+ };
567
+ CanvasRenderer.prototype.mask = function (paths) {
568
+ this.ctx.beginPath();
569
+ this.ctx.moveTo(0, 0);
570
+ this.ctx.lineTo(this.canvas.width, 0);
571
+ this.ctx.lineTo(this.canvas.width, this.canvas.height);
572
+ this.ctx.lineTo(0, this.canvas.height);
573
+ this.ctx.lineTo(0, 0);
574
+ this.formatPath(paths.slice(0).reverse());
575
+ this.ctx.closePath();
576
+ };
577
+ CanvasRenderer.prototype.path = function (paths) {
578
+ this.ctx.beginPath();
579
+ this.formatPath(paths);
580
+ this.ctx.closePath();
581
+ };
582
+ CanvasRenderer.prototype.formatPath = function (paths) {
583
+ var _this = this;
584
+ paths.forEach(function (point, index) {
585
+ var start = bezier_curve_1.isBezierCurve(point) ? point.start : point;
586
+ if (index === 0) {
587
+ _this.ctx.moveTo(start.x, start.y);
588
+ }
589
+ else {
590
+ _this.ctx.lineTo(start.x, start.y);
591
+ }
592
+ if (bezier_curve_1.isBezierCurve(point)) {
593
+ _this.ctx.bezierCurveTo(point.startControl.x, point.startControl.y, point.endControl.x, point.endControl.y, point.end.x, point.end.y);
594
+ }
595
+ });
596
+ };
597
+ CanvasRenderer.prototype.renderRepeat = function (path, pattern, offsetX, offsetY) {
598
+ this.path(path);
599
+ this.ctx.fillStyle = pattern;
600
+ this.ctx.translate(offsetX, offsetY);
601
+ this.ctx.fill();
602
+ this.ctx.translate(-offsetX, -offsetY);
603
+ };
604
+ CanvasRenderer.prototype.resizeImage = function (image, width, height) {
605
+ var _a;
606
+ if (image.width === width && image.height === height) {
607
+ return image;
608
+ }
609
+ var ownerDocument = (_a = this.canvas.ownerDocument) !== null && _a !== void 0 ? _a : document;
610
+ var canvas = ownerDocument.createElement('canvas');
611
+ canvas.width = Math.max(1, width);
612
+ canvas.height = Math.max(1, height);
613
+ var ctx = canvas.getContext('2d');
614
+ ctx.drawImage(image, 0, 0, image.width, image.height, 0, 0, width, height);
615
+ return canvas;
616
+ };
617
+ CanvasRenderer.prototype.renderBackgroundImage = function (container) {
618
+ return __awaiter(this, void 0, void 0, function () {
619
+ var index, _loop_1, this_1, _i, _a, backgroundImage;
620
+ return __generator(this, function (_b) {
621
+ switch (_b.label) {
622
+ case 0:
623
+ index = container.styles.backgroundImage.length - 1;
624
+ _loop_1 = function (backgroundImage) {
625
+ var image, url, e_4, _c, path, x, y, width, height, pattern, _d, path, x, y, width, height, _e, lineLength, x0, x1, y0, y1, canvas, ctx, gradient_2, pattern, _f, path, left, top_1, width, height, position, x, y, _g, rx, ry, radialGradient_1, midX, midY, f, invF;
626
+ return __generator(this, function (_h) {
627
+ switch (_h.label) {
628
+ case 0:
629
+ if (!(backgroundImage.type === 0 /* URL */)) return [3 /*break*/, 5];
630
+ image = void 0;
631
+ url = backgroundImage.url;
632
+ _h.label = 1;
633
+ case 1:
634
+ _h.trys.push([1, 3, , 4]);
635
+ return [4 /*yield*/, this_1.context.cache.match(url)];
636
+ case 2:
637
+ image = _h.sent();
638
+ return [3 /*break*/, 4];
639
+ case 3:
640
+ e_4 = _h.sent();
641
+ this_1.context.logger.error("Error loading background-image " + url);
642
+ return [3 /*break*/, 4];
643
+ case 4:
644
+ if (image) {
645
+ _c = background_1.calculateBackgroundRendering(container, index, [
646
+ image.width,
647
+ image.height,
648
+ image.width / image.height
649
+ ]), path = _c[0], x = _c[1], y = _c[2], width = _c[3], height = _c[4];
650
+ pattern = this_1.ctx.createPattern(this_1.resizeImage(image, width, height), 'repeat');
651
+ this_1.renderRepeat(path, pattern, x, y);
652
+ }
653
+ return [3 /*break*/, 6];
654
+ case 5:
655
+ if (image_1.isLinearGradient(backgroundImage)) {
656
+ _d = background_1.calculateBackgroundRendering(container, index, [null, null, null]), path = _d[0], x = _d[1], y = _d[2], width = _d[3], height = _d[4];
657
+ _e = gradient_1.calculateGradientDirection(backgroundImage.angle, width, height), lineLength = _e[0], x0 = _e[1], x1 = _e[2], y0 = _e[3], y1 = _e[4];
658
+ canvas = document.createElement('canvas');
659
+ canvas.width = width;
660
+ canvas.height = height;
661
+ ctx = canvas.getContext('2d');
662
+ gradient_2 = ctx.createLinearGradient(x0, y0, x1, y1);
663
+ gradient_1.processColorStops(backgroundImage.stops, lineLength).forEach(function (colorStop) {
664
+ return gradient_2.addColorStop(colorStop.stop, color_1.asString(colorStop.color));
665
+ });
666
+ ctx.fillStyle = gradient_2;
667
+ ctx.fillRect(0, 0, width, height);
668
+ if (width > 0 && height > 0) {
669
+ pattern = this_1.ctx.createPattern(canvas, 'repeat');
670
+ this_1.renderRepeat(path, pattern, x, y);
671
+ }
672
+ }
673
+ else if (image_1.isRadialGradient(backgroundImage)) {
674
+ _f = background_1.calculateBackgroundRendering(container, index, [
675
+ null,
676
+ null,
677
+ null
678
+ ]), path = _f[0], left = _f[1], top_1 = _f[2], width = _f[3], height = _f[4];
679
+ position = backgroundImage.position.length === 0 ? [length_percentage_1.FIFTY_PERCENT] : backgroundImage.position;
680
+ x = length_percentage_1.getAbsoluteValue(position[0], width);
681
+ y = length_percentage_1.getAbsoluteValue(position[position.length - 1], height);
682
+ _g = gradient_1.calculateRadius(backgroundImage, x, y, width, height), rx = _g[0], ry = _g[1];
683
+ if (rx > 0 && ry > 0) {
684
+ radialGradient_1 = this_1.ctx.createRadialGradient(left + x, top_1 + y, 0, left + x, top_1 + y, rx);
685
+ gradient_1.processColorStops(backgroundImage.stops, rx * 2).forEach(function (colorStop) {
686
+ return radialGradient_1.addColorStop(colorStop.stop, color_1.asString(colorStop.color));
687
+ });
688
+ this_1.path(path);
689
+ this_1.ctx.fillStyle = radialGradient_1;
690
+ if (rx !== ry) {
691
+ midX = container.bounds.left + 0.5 * container.bounds.width;
692
+ midY = container.bounds.top + 0.5 * container.bounds.height;
693
+ f = ry / rx;
694
+ invF = 1 / f;
695
+ this_1.ctx.save();
696
+ this_1.ctx.translate(midX, midY);
697
+ this_1.ctx.transform(1, 0, 0, f, 0, 0);
698
+ this_1.ctx.translate(-midX, -midY);
699
+ this_1.ctx.fillRect(left, invF * (top_1 - midY) + midY, width, height * invF);
700
+ this_1.ctx.restore();
701
+ }
702
+ else {
703
+ this_1.ctx.fill();
704
+ }
705
+ }
706
+ }
707
+ _h.label = 6;
708
+ case 6:
709
+ index--;
710
+ return [2 /*return*/];
711
+ }
712
+ });
713
+ };
714
+ this_1 = this;
715
+ _i = 0, _a = container.styles.backgroundImage.slice(0).reverse();
716
+ _b.label = 1;
717
+ case 1:
718
+ if (!(_i < _a.length)) return [3 /*break*/, 4];
719
+ backgroundImage = _a[_i];
720
+ return [5 /*yield**/, _loop_1(backgroundImage)];
721
+ case 2:
722
+ _b.sent();
723
+ _b.label = 3;
724
+ case 3:
725
+ _i++;
726
+ return [3 /*break*/, 1];
727
+ case 4: return [2 /*return*/];
728
+ }
729
+ });
730
+ });
731
+ };
732
+ CanvasRenderer.prototype.renderSolidBorder = function (color, side, curvePoints) {
733
+ return __awaiter(this, void 0, void 0, function () {
734
+ return __generator(this, function (_a) {
735
+ this.path(border_1.parsePathForBorder(curvePoints, side));
736
+ this.ctx.fillStyle = color_1.asString(color);
737
+ this.ctx.fill();
738
+ return [2 /*return*/];
739
+ });
740
+ });
741
+ };
742
+ CanvasRenderer.prototype.renderDoubleBorder = function (color, width, side, curvePoints) {
743
+ return __awaiter(this, void 0, void 0, function () {
744
+ var outerPaths, innerPaths;
745
+ return __generator(this, function (_a) {
746
+ switch (_a.label) {
747
+ case 0:
748
+ if (!(width < 3)) return [3 /*break*/, 2];
749
+ return [4 /*yield*/, this.renderSolidBorder(color, side, curvePoints)];
750
+ case 1:
751
+ _a.sent();
752
+ return [2 /*return*/];
753
+ case 2:
754
+ outerPaths = border_1.parsePathForBorderDoubleOuter(curvePoints, side);
755
+ this.path(outerPaths);
756
+ this.ctx.fillStyle = color_1.asString(color);
757
+ this.ctx.fill();
758
+ innerPaths = border_1.parsePathForBorderDoubleInner(curvePoints, side);
759
+ this.path(innerPaths);
760
+ this.ctx.fill();
761
+ return [2 /*return*/];
762
+ }
763
+ });
764
+ });
765
+ };
766
+ CanvasRenderer.prototype.renderNodeBackgroundAndBorders = function (paint) {
767
+ return __awaiter(this, void 0, void 0, function () {
768
+ var styles, hasBackground, borders, backgroundPaintingArea, side, _i, borders_1, border;
769
+ var _this = this;
770
+ return __generator(this, function (_a) {
771
+ switch (_a.label) {
772
+ case 0:
773
+ this.applyEffects(paint.getEffects(2 /* BACKGROUND_BORDERS */));
774
+ styles = paint.container.styles;
775
+ hasBackground = !color_1.isTransparent(styles.backgroundColor) || styles.backgroundImage.length;
776
+ borders = [
777
+ { style: styles.borderTopStyle, color: styles.borderTopColor, width: styles.borderTopWidth },
778
+ { style: styles.borderRightStyle, color: styles.borderRightColor, width: styles.borderRightWidth },
779
+ { style: styles.borderBottomStyle, color: styles.borderBottomColor, width: styles.borderBottomWidth },
780
+ { style: styles.borderLeftStyle, color: styles.borderLeftColor, width: styles.borderLeftWidth }
781
+ ];
782
+ backgroundPaintingArea = calculateBackgroundCurvedPaintingArea(background_1.getBackgroundValueForIndex(styles.backgroundClip, 0), paint.curves);
783
+ if (!(hasBackground || styles.boxShadow.length)) return [3 /*break*/, 2];
784
+ this.ctx.save();
785
+ this.path(backgroundPaintingArea);
786
+ this.ctx.clip();
787
+ if (!color_1.isTransparent(styles.backgroundColor)) {
788
+ this.ctx.fillStyle = color_1.asString(styles.backgroundColor);
789
+ this.ctx.fill();
790
+ }
791
+ return [4 /*yield*/, this.renderBackgroundImage(paint.container)];
792
+ case 1:
793
+ _a.sent();
794
+ this.ctx.restore();
795
+ styles.boxShadow
796
+ .slice(0)
797
+ .reverse()
798
+ .forEach(function (shadow) {
799
+ _this.ctx.save();
800
+ var borderBoxArea = bound_curves_1.calculateBorderBoxPath(paint.curves);
801
+ var maskOffset = shadow.inset ? 0 : MASK_OFFSET;
802
+ var shadowPaintingArea = path_1.transformPath(borderBoxArea, -maskOffset + (shadow.inset ? 1 : -1) * shadow.spread.number, (shadow.inset ? 1 : -1) * shadow.spread.number, shadow.spread.number * (shadow.inset ? -2 : 2), shadow.spread.number * (shadow.inset ? -2 : 2));
803
+ if (shadow.inset) {
804
+ _this.path(borderBoxArea);
805
+ _this.ctx.clip();
806
+ _this.mask(shadowPaintingArea);
807
+ }
808
+ else {
809
+ _this.mask(borderBoxArea);
810
+ _this.ctx.clip();
811
+ _this.path(shadowPaintingArea);
812
+ }
813
+ _this.ctx.shadowOffsetX = shadow.offsetX.number + maskOffset;
814
+ _this.ctx.shadowOffsetY = shadow.offsetY.number;
815
+ _this.ctx.shadowColor = color_1.asString(shadow.color);
816
+ _this.ctx.shadowBlur = shadow.blur.number;
817
+ _this.ctx.fillStyle = shadow.inset ? color_1.asString(shadow.color) : 'rgba(0,0,0,1)';
818
+ _this.ctx.fill();
819
+ _this.ctx.restore();
820
+ });
821
+ _a.label = 2;
822
+ case 2:
823
+ side = 0;
824
+ _i = 0, borders_1 = borders;
825
+ _a.label = 3;
826
+ case 3:
827
+ if (!(_i < borders_1.length)) return [3 /*break*/, 13];
828
+ border = borders_1[_i];
829
+ if (!(border.style !== 0 /* NONE */ && !color_1.isTransparent(border.color) && border.width > 0)) return [3 /*break*/, 11];
830
+ if (!(border.style === 2 /* DASHED */)) return [3 /*break*/, 5];
831
+ return [4 /*yield*/, this.renderDashedDottedBorder(border.color, border.width, side, paint.curves, 2 /* DASHED */)];
832
+ case 4:
833
+ _a.sent();
834
+ return [3 /*break*/, 11];
835
+ case 5:
836
+ if (!(border.style === 3 /* DOTTED */)) return [3 /*break*/, 7];
837
+ return [4 /*yield*/, this.renderDashedDottedBorder(border.color, border.width, side, paint.curves, 3 /* DOTTED */)];
838
+ case 6:
839
+ _a.sent();
840
+ return [3 /*break*/, 11];
841
+ case 7:
842
+ if (!(border.style === 4 /* DOUBLE */)) return [3 /*break*/, 9];
843
+ return [4 /*yield*/, this.renderDoubleBorder(border.color, border.width, side, paint.curves)];
844
+ case 8:
845
+ _a.sent();
846
+ return [3 /*break*/, 11];
847
+ case 9: return [4 /*yield*/, this.renderSolidBorder(border.color, side, paint.curves)];
848
+ case 10:
849
+ _a.sent();
850
+ _a.label = 11;
851
+ case 11:
852
+ side++;
853
+ _a.label = 12;
854
+ case 12:
855
+ _i++;
856
+ return [3 /*break*/, 3];
857
+ case 13: return [2 /*return*/];
858
+ }
859
+ });
860
+ });
861
+ };
862
+ CanvasRenderer.prototype.renderDashedDottedBorder = function (color, width, side, curvePoints, style) {
863
+ return __awaiter(this, void 0, void 0, function () {
864
+ var strokePaths, boxPaths, startX, startY, endX, endY, length, dashLength, spaceLength, useLineDash, multiplier, numberOfDashes, minSpace, maxSpace, path1, path2, path1, path2;
865
+ return __generator(this, function (_a) {
866
+ this.ctx.save();
867
+ strokePaths = border_1.parsePathForBorderStroke(curvePoints, side);
868
+ boxPaths = border_1.parsePathForBorder(curvePoints, side);
869
+ if (style === 2 /* DASHED */) {
870
+ this.path(boxPaths);
871
+ this.ctx.clip();
872
+ }
873
+ if (bezier_curve_1.isBezierCurve(boxPaths[0])) {
874
+ startX = boxPaths[0].start.x;
875
+ startY = boxPaths[0].start.y;
876
+ }
877
+ else {
878
+ startX = boxPaths[0].x;
879
+ startY = boxPaths[0].y;
880
+ }
881
+ if (bezier_curve_1.isBezierCurve(boxPaths[1])) {
882
+ endX = boxPaths[1].end.x;
883
+ endY = boxPaths[1].end.y;
884
+ }
885
+ else {
886
+ endX = boxPaths[1].x;
887
+ endY = boxPaths[1].y;
888
+ }
889
+ if (side === 0 || side === 2) {
890
+ length = Math.abs(startX - endX);
891
+ }
892
+ else {
893
+ length = Math.abs(startY - endY);
894
+ }
895
+ this.ctx.beginPath();
896
+ if (style === 3 /* DOTTED */) {
897
+ this.formatPath(strokePaths);
898
+ }
899
+ else {
900
+ this.formatPath(boxPaths.slice(0, 2));
901
+ }
902
+ dashLength = width < 3 ? width * 3 : width * 2;
903
+ spaceLength = width < 3 ? width * 2 : width;
904
+ if (style === 3 /* DOTTED */) {
905
+ dashLength = width;
906
+ spaceLength = width;
907
+ }
908
+ useLineDash = true;
909
+ if (length <= dashLength * 2) {
910
+ useLineDash = false;
911
+ }
912
+ else if (length <= dashLength * 2 + spaceLength) {
913
+ multiplier = length / (2 * dashLength + spaceLength);
914
+ dashLength *= multiplier;
915
+ spaceLength *= multiplier;
916
+ }
917
+ else {
918
+ numberOfDashes = Math.floor((length + spaceLength) / (dashLength + spaceLength));
919
+ minSpace = (length - numberOfDashes * dashLength) / (numberOfDashes - 1);
920
+ maxSpace = (length - (numberOfDashes + 1) * dashLength) / numberOfDashes;
921
+ spaceLength =
922
+ maxSpace <= 0 || Math.abs(spaceLength - minSpace) < Math.abs(spaceLength - maxSpace)
923
+ ? minSpace
924
+ : maxSpace;
925
+ }
926
+ if (useLineDash) {
927
+ if (style === 3 /* DOTTED */) {
928
+ this.ctx.setLineDash([0, dashLength + spaceLength]);
929
+ }
930
+ else {
931
+ this.ctx.setLineDash([dashLength, spaceLength]);
932
+ }
933
+ }
934
+ if (style === 3 /* DOTTED */) {
935
+ this.ctx.lineCap = 'round';
936
+ this.ctx.lineWidth = width;
937
+ }
938
+ else {
939
+ this.ctx.lineWidth = width * 2 + 1.1;
940
+ }
941
+ this.ctx.strokeStyle = color_1.asString(color);
942
+ this.ctx.stroke();
943
+ this.ctx.setLineDash([]);
944
+ // dashed round edge gap
945
+ if (style === 2 /* DASHED */) {
946
+ if (bezier_curve_1.isBezierCurve(boxPaths[0])) {
947
+ path1 = boxPaths[3];
948
+ path2 = boxPaths[0];
949
+ this.ctx.beginPath();
950
+ this.formatPath([new vector_1.Vector(path1.end.x, path1.end.y), new vector_1.Vector(path2.start.x, path2.start.y)]);
951
+ this.ctx.stroke();
952
+ }
953
+ if (bezier_curve_1.isBezierCurve(boxPaths[1])) {
954
+ path1 = boxPaths[1];
955
+ path2 = boxPaths[2];
956
+ this.ctx.beginPath();
957
+ this.formatPath([new vector_1.Vector(path1.end.x, path1.end.y), new vector_1.Vector(path2.start.x, path2.start.y)]);
958
+ this.ctx.stroke();
959
+ }
960
+ }
961
+ this.ctx.restore();
962
+ return [2 /*return*/];
963
+ });
964
+ });
965
+ };
966
+ CanvasRenderer.prototype.render = function (element) {
967
+ return __awaiter(this, void 0, void 0, function () {
968
+ var stack;
969
+ return __generator(this, function (_a) {
970
+ switch (_a.label) {
971
+ case 0:
972
+ if (this.options.backgroundColor) {
973
+ this.ctx.fillStyle = color_1.asString(this.options.backgroundColor);
974
+ this.ctx.fillRect(this.options.x, this.options.y, this.options.width, this.options.height);
975
+ }
976
+ stack = stacking_context_1.parseStackingContexts(element);
977
+ return [4 /*yield*/, this.renderStack(stack)];
978
+ case 1:
979
+ _a.sent();
980
+ this.applyEffects([]);
981
+ return [2 /*return*/, this.canvas];
982
+ }
983
+ });
984
+ });
985
+ };
986
+ return CanvasRenderer;
987
+ }(renderer_1.Renderer));
988
+ exports.CanvasRenderer = CanvasRenderer;
989
+ var isTextInputElement = function (container) {
990
+ if (container instanceof textarea_element_container_1.TextareaElementContainer) {
991
+ return true;
992
+ }
993
+ else if (container instanceof select_element_container_1.SelectElementContainer) {
994
+ return true;
995
+ }
996
+ else if (container instanceof input_element_container_1.InputElementContainer && container.type !== input_element_container_1.RADIO && container.type !== input_element_container_1.CHECKBOX) {
997
+ return true;
998
+ }
999
+ return false;
1000
+ };
1001
+ var calculateBackgroundCurvedPaintingArea = function (clip, curves) {
1002
+ switch (clip) {
1003
+ case 0 /* BORDER_BOX */:
1004
+ return bound_curves_1.calculateBorderBoxPath(curves);
1005
+ case 2 /* CONTENT_BOX */:
1006
+ return bound_curves_1.calculateContentBoxPath(curves);
1007
+ case 1 /* PADDING_BOX */:
1008
+ default:
1009
+ return bound_curves_1.calculatePaddingBoxPath(curves);
1010
+ }
1011
+ };
1012
+ var canvasTextAlign = function (textAlign) {
1013
+ switch (textAlign) {
1014
+ case 1 /* CENTER */:
1015
+ return 'center';
1016
+ case 2 /* RIGHT */:
1017
+ return 'right';
1018
+ case 0 /* LEFT */:
1019
+ default:
1020
+ return 'left';
1021
+ }
1022
+ };
1023
+ // see https://github.com/niklasvh/html2canvas/pull/2645
1024
+ var iOSBrokenFonts = ['-apple-system', 'system-ui'];
1025
+ var fixIOSSystemFonts = function (fontFamilies) {
1026
+ return /iPhone OS 15_(0|1)/.test(window.navigator.userAgent)
1027
+ ? fontFamilies.filter(function (fontFamily) { return iOSBrokenFonts.indexOf(fontFamily) === -1; })
1028
+ : fontFamilies;
1029
+ };
1030
+ //# sourceMappingURL=canvas-renderer.js.map
node_modules/html2canvas/dist/lib/render/canvas/canvas-renderer.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"canvas-renderer.js","sourceRoot":"","sources":["../../../../src/render/canvas/canvas-renderer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wDAAyF;AACzF,+CAAqE;AAKrE,gCAA4C;AAE5C,gDAAsH;AACtH,gDAA2D;AAC3D,oCAAiC;AACjC,+CAAoG;AACpG,oCAKmB;AACnB,4CAAuF;AACvF,kDAAyD;AACzD,8CAAmE;AACnE,+FAA0F;AAC1F,4CAAyC;AACzC,iGAA4F;AAC5F,2FAAsF;AAEtF,sCAA0G;AAC1G,8CAA4C;AAC5C,+DAAkH;AAClH,uEAAkF;AAElF,gDAA4C;AAE5C,kDAA+C;AAE/C,0EAA6E;AAC7E,+FAAwH;AAExH,4FAAuF;AACvF,wFAAmF;AACnF,iGAA4F;AAG5F,wCAAqC;AAiBrC,IAAM,WAAW,GAAG,KAAK,CAAC;AAE1B;IAAoC,kCAAQ;IAMxC,wBAAY,OAAgB,EAAE,OAA6B;QAA3D,YACI,kBAAM,OAAO,EAAE,OAAO,CAAC,SAiB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,CAAC,CAAC;AAEtD,IAAM,iBAAiB,GAAG,UAAC,YAAsB;IAC7C,OAAO,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC;QACxD,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,UAAC,UAAU,IAAK,OAAA,cAAc,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAzC,CAAyC,CAAC;QAChF,CAAC,CAAC,YAAY,CAAC;AACvB,CAAC,CAAC"}
node_modules/html2canvas/dist/lib/render/canvas/foreignobject-renderer.js ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
+ return new (P || (P = Promise))(function (resolve, reject) {
20
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
21
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
24
+ });
25
+ };
26
+ var __generator = (this && this.__generator) || function (thisArg, body) {
27
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
28
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
+ function verb(n) { return function (v) { return step([n, v]); }; }
30
+ function step(op) {
31
+ if (f) throw new TypeError("Generator is already executing.");
32
+ while (_) try {
33
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
34
+ if (y = 0, t) op = [op[0] & 2, t.value];
35
+ switch (op[0]) {
36
+ case 0: case 1: t = op; break;
37
+ case 4: _.label++; return { value: op[1], done: false };
38
+ case 5: _.label++; y = op[1]; op = [0]; continue;
39
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
40
+ default:
41
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
42
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
43
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
44
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
45
+ if (t[2]) _.ops.pop();
46
+ _.trys.pop(); continue;
47
+ }
48
+ op = body.call(thisArg, _);
49
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
50
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
+ }
52
+ };
53
+ Object.defineProperty(exports, "__esModule", { value: true });
54
+ exports.loadSerializedSVG = exports.ForeignObjectRenderer = void 0;
55
+ var features_1 = require("../../core/features");
56
+ var color_1 = require("../../css/types/color");
57
+ var renderer_1 = require("../renderer");
58
+ var ForeignObjectRenderer = /** @class */ (function (_super) {
59
+ __extends(ForeignObjectRenderer, _super);
60
+ function ForeignObjectRenderer(context, options) {
61
+ var _this = _super.call(this, context, options) || this;
62
+ _this.canvas = options.canvas ? options.canvas : document.createElement('canvas');
63
+ _this.ctx = _this.canvas.getContext('2d');
64
+ _this.options = options;
65
+ _this.canvas.width = Math.floor(options.width * options.scale);
66
+ _this.canvas.height = Math.floor(options.height * options.scale);
67
+ _this.canvas.style.width = options.width + "px";
68
+ _this.canvas.style.height = options.height + "px";
69
+ _this.ctx.scale(_this.options.scale, _this.options.scale);
70
+ _this.ctx.translate(-options.x, -options.y);
71
+ _this.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized (" + options.width + "x" + options.height + " at " + options.x + "," + options.y + ") with scale " + options.scale);
72
+ return _this;
73
+ }
74
+ ForeignObjectRenderer.prototype.render = function (element) {
75
+ return __awaiter(this, void 0, void 0, function () {
76
+ var svg, img;
77
+ return __generator(this, function (_a) {
78
+ switch (_a.label) {
79
+ case 0:
80
+ svg = features_1.createForeignObjectSVG(this.options.width * this.options.scale, this.options.height * this.options.scale, this.options.scale, this.options.scale, element);
81
+ return [4 /*yield*/, exports.loadSerializedSVG(svg)];
82
+ case 1:
83
+ img = _a.sent();
84
+ if (this.options.backgroundColor) {
85
+ this.ctx.fillStyle = color_1.asString(this.options.backgroundColor);
86
+ this.ctx.fillRect(0, 0, this.options.width * this.options.scale, this.options.height * this.options.scale);
87
+ }
88
+ this.ctx.drawImage(img, -this.options.x * this.options.scale, -this.options.y * this.options.scale);
89
+ return [2 /*return*/, this.canvas];
90
+ }
91
+ });
92
+ });
93
+ };
94
+ return ForeignObjectRenderer;
95
+ }(renderer_1.Renderer));
96
+ exports.ForeignObjectRenderer = ForeignObjectRenderer;
97
+ var loadSerializedSVG = function (svg) {
98
+ return new Promise(function (resolve, reject) {
99
+ var img = new Image();
100
+ img.onload = function () {
101
+ resolve(img);
102
+ };
103
+ img.onerror = reject;
104
+ img.src = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(new XMLSerializer().serializeToString(svg));
105
+ });
106
+ };
107
+ exports.loadSerializedSVG = loadSerializedSVG;
108
+ //# sourceMappingURL=foreignobject-renderer.js.map
node_modules/html2canvas/dist/lib/render/canvas/foreignobject-renderer.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"foreignobject-renderer.js","sourceRoot":"","sources":["../../../../src/render/canvas/foreignobject-renderer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,gDAA2D;AAC3D,+CAA+C;AAC/C,wCAAqC;AAGrC;IAA2C,yCAAQ;IAK/C,+BAAY,OAAgB,EAAE,OAA6B;QAA3D,YACI,kBAAM,OAAO,EAAE,OAAO,CAAC,SAc1B;QAbG,KAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QACjF,KAAI,CAAC,GAAG,GAAG,KAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAA6B,CAAC;QACpE,KAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,KAAI,CAAC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;QAC9D,KAAI,CAAC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;QAChE,KAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,GAAM,OAAO,CAAC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O,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;yBAC9G;wBAED,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;wBAEpG,sBAAO,IAAI,CAAC,MAAM,EAAC;;;;KACtB;IACL,4BAAC;AAAD,CAAC,AA1CD,CAA2C,mBAAQ,GA0ClD;AA1CY,sDAAqB;AA4C3B,IAAM,iBAAiB,GAAG,UAAC,GAAS;IACvC,OAAA,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;QACxB,IAAM,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC;QACxB,GAAG,CAAC,MAAM,GAAG;YACT,OAAO,CAAC,GAAG,CAAC,CAAC;QACjB,CAAC,CAAC;QACF,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC;QAErB,GAAG,CAAC,GAAG,GAAG,sCAAoC,kBAAkB,CAAC,IAAI,aAAa,EAAE,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAG,CAAC;IACnH,CAAC,CAAC;AARF,CAQE,CAAC;AATM,QAAA,iBAAiB,qBASvB"}
node_modules/html2canvas/dist/lib/render/effects.js ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isOpacityEffect = exports.isClipEffect = exports.isTransformEffect = exports.OpacityEffect = exports.ClipEffect = exports.TransformEffect = void 0;
4
+ var TransformEffect = /** @class */ (function () {
5
+ function TransformEffect(offsetX, offsetY, matrix) {
6
+ this.offsetX = offsetX;
7
+ this.offsetY = offsetY;
8
+ this.matrix = matrix;
9
+ this.type = 0 /* TRANSFORM */;
10
+ this.target = 2 /* BACKGROUND_BORDERS */ | 4 /* CONTENT */;
11
+ }
12
+ return TransformEffect;
13
+ }());
14
+ exports.TransformEffect = TransformEffect;
15
+ var ClipEffect = /** @class */ (function () {
16
+ function ClipEffect(path, target) {
17
+ this.path = path;
18
+ this.target = target;
19
+ this.type = 1 /* CLIP */;
20
+ }
21
+ return ClipEffect;
22
+ }());
23
+ exports.ClipEffect = ClipEffect;
24
+ var OpacityEffect = /** @class */ (function () {
25
+ function OpacityEffect(opacity) {
26
+ this.opacity = opacity;
27
+ this.type = 2 /* OPACITY */;
28
+ this.target = 2 /* BACKGROUND_BORDERS */ | 4 /* CONTENT */;
29
+ }
30
+ return OpacityEffect;
31
+ }());
32
+ exports.OpacityEffect = OpacityEffect;
33
+ var isTransformEffect = function (effect) {
34
+ return effect.type === 0 /* TRANSFORM */;
35
+ };
36
+ exports.isTransformEffect = isTransformEffect;
37
+ var isClipEffect = function (effect) { return effect.type === 1 /* CLIP */; };
38
+ exports.isClipEffect = isClipEffect;
39
+ var isOpacityEffect = function (effect) { return effect.type === 2 /* OPACITY */; };
40
+ exports.isOpacityEffect = isOpacityEffect;
41
+ //# sourceMappingURL=effects.js.map
node_modules/html2canvas/dist/lib/render/effects.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"effects.js","sourceRoot":"","sources":["../../../src/render/effects.ts"],"names":[],"mappings":";;;AAmBA;IAII,yBAAqB,OAAe,EAAW,OAAe,EAAW,MAAc;QAAlE,YAAO,GAAP,OAAO,CAAQ;QAAW,YAAO,GAAP,OAAO,CAAQ;QAAW,WAAM,GAAN,MAAM,CAAQ;QAH9E,SAAI,qBAAoC;QACxC,WAAM,GAAW,4CAAsD,CAAC;IAES,CAAC;IAC/F,sBAAC;AAAD,CAAC,AALD,IAKC;AALY,0CAAe;AAO5B;IAGI,oBAAqB,IAAY,EAAW,MAAoB;QAA3C,SAAI,GAAJ,IAAI,CAAQ;QAAW,WAAM,GAAN,MAAM,CAAc;QAFvD,SAAI,gBAA+B;IAEuB,CAAC;IACxE,iBAAC;AAAD,CAAC,AAJD,IAIC;AAJY,gCAAU;AAMvB;IAII,uBAAqB,OAAe;QAAf,YAAO,GAAP,OAAO,CAAQ;QAH3B,SAAI,mBAAkC;QACtC,WAAM,GAAW,4CAAsD,CAAC;IAE1C,CAAC;IAC5C,oBAAC;AAAD,CAAC,AALD,IAKC;AALY,sCAAa;AAOnB,IAAM,iBAAiB,GAAG,UAAC,MAAsB;IACpD,OAAA,MAAM,CAAC,IAAI,sBAAyB;AAApC,CAAoC,CAAC;AAD5B,QAAA,iBAAiB,qBACW;AAClC,IAAM,YAAY,GAAG,UAAC,MAAsB,IAA2B,OAAA,MAAM,CAAC,IAAI,iBAAoB,EAA/B,CAA+B,CAAC;AAAjG,QAAA,YAAY,gBAAqF;AACvG,IAAM,eAAe,GAAG,UAAC,MAAsB,IAA8B,OAAA,MAAM,CAAC,IAAI,oBAAuB,EAAlC,CAAkC,CAAC;AAA1G,QAAA,eAAe,mBAA2F"}
node_modules/html2canvas/dist/lib/render/font-metrics.js ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FontMetrics = void 0;
4
+ var util_1 = require("../core/util");
5
+ var SAMPLE_TEXT = 'Hidden Text';
6
+ var FontMetrics = /** @class */ (function () {
7
+ function FontMetrics(document) {
8
+ this._data = {};
9
+ this._document = document;
10
+ }
11
+ FontMetrics.prototype.parseMetrics = function (fontFamily, fontSize) {
12
+ var container = this._document.createElement('div');
13
+ var img = this._document.createElement('img');
14
+ var span = this._document.createElement('span');
15
+ var body = this._document.body;
16
+ container.style.visibility = 'hidden';
17
+ container.style.fontFamily = fontFamily;
18
+ container.style.fontSize = fontSize;
19
+ container.style.margin = '0';
20
+ container.style.padding = '0';
21
+ container.style.whiteSpace = 'nowrap';
22
+ body.appendChild(container);
23
+ img.src = util_1.SMALL_IMAGE;
24
+ img.width = 1;
25
+ img.height = 1;
26
+ img.style.margin = '0';
27
+ img.style.padding = '0';
28
+ img.style.verticalAlign = 'baseline';
29
+ span.style.fontFamily = fontFamily;
30
+ span.style.fontSize = fontSize;
31
+ span.style.margin = '0';
32
+ span.style.padding = '0';
33
+ span.appendChild(this._document.createTextNode(SAMPLE_TEXT));
34
+ container.appendChild(span);
35
+ container.appendChild(img);
36
+ var baseline = img.offsetTop - span.offsetTop + 2;
37
+ container.removeChild(span);
38
+ container.appendChild(this._document.createTextNode(SAMPLE_TEXT));
39
+ container.style.lineHeight = 'normal';
40
+ img.style.verticalAlign = 'super';
41
+ var middle = img.offsetTop - container.offsetTop + 2;
42
+ body.removeChild(container);
43
+ return { baseline: baseline, middle: middle };
44
+ };
45
+ FontMetrics.prototype.getMetrics = function (fontFamily, fontSize) {
46
+ var key = fontFamily + " " + fontSize;
47
+ if (typeof this._data[key] === 'undefined') {
48
+ this._data[key] = this.parseMetrics(fontFamily, fontSize);
49
+ }
50
+ return this._data[key];
51
+ };
52
+ return FontMetrics;
53
+ }());
54
+ exports.FontMetrics = FontMetrics;
55
+ //# sourceMappingURL=font-metrics.js.map
node_modules/html2canvas/dist/lib/render/font-metrics.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"font-metrics.js","sourceRoot":"","sources":["../../../src/render/font-metrics.ts"],"names":[],"mappings":";;;AAAA,qCAAyC;AAMzC,IAAM,WAAW,GAAG,aAAa,CAAC;AAElC;IAII,qBAAY,QAAkB;QAC1B,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC9B,CAAC;IAEO,kCAAY,GAApB,UAAqB,U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+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.transformPath = exports.equalPath = void 0;
4
+ var equalPath = function (a, b) {
5
+ if (a.length === b.length) {
6
+ return a.some(function (v, i) { return v === b[i]; });
7
+ }
8
+ return false;
9
+ };
10
+ exports.equalPath = equalPath;
11
+ var transformPath = function (path, deltaX, deltaY, deltaW, deltaH) {
12
+ return path.map(function (point, index) {
13
+ switch (index) {
14
+ case 0:
15
+ return point.add(deltaX, deltaY);
16
+ case 1:
17
+ return point.add(deltaX + deltaW, deltaY);
18
+ case 2:
19
+ return point.add(deltaX + deltaW, deltaY + deltaH);
20
+ case 3:
21
+ return point.add(deltaX, deltaY + deltaH);
22
+ }
23
+ return point;
24
+ });
25
+ };
26
+ exports.transformPath = transformPath;
27
+ //# sourceMappingURL=path.js.map
node_modules/html2canvas/dist/lib/render/path.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"path.js","sourceRoot":"","sources":["../../../src/render/path.ts"],"names":[],"mappings":";;;AAYO,IAAM,SAAS,GAAG,UAAC,CAAS,EAAE,CAAS;IAC1C,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,EAAE;QACvB,OAAO,CAAC,CAAC,IAAI,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAV,CAAU,CAAC,CAAC;KACvC;IAED,OAAO,KAAK,CAAC;AACjB,CAAC,CAAC;AANW,QAAA,SAAS,aAMpB;AAEK,IAAM,aAAa,GAAG,UAAC,IAAY,EAAE,MAAc,EAAE,MAAc,EAAE,MAAc,EAAE,MAAc;IACtG,OAAO,IAAI,CAAC,GAAG,CAAC,UAAC,KAAK,EAAE,KAAK;QACzB,QAAQ,KAAK,EAAE;YACX,KAAK,CAAC;gBACF,OAAO,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YACrC,KAAK,CAAC;gBACF,OAAO,KAAK,CAAC,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,MAAM,CAAC,CAAC;YAC9C,KAAK,CAAC;gBACF,OAAO,KAAK,CAAC,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;YACvD,KAAK,CAAC;gBACF,OAAO,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;SACjD;QACD,OAAO,KAAK,CAAC;IACjB,CAAC,CAAC,CAAC;AACP,CAAC,CAAC;AAdW,QAAA,aAAa,iBAcxB"}
node_modules/html2canvas/dist/lib/render/renderer.js ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Renderer = void 0;
4
+ var Renderer = /** @class */ (function () {
5
+ function Renderer(context, options) {
6
+ this.context = context;
7
+ this.options = options;
8
+ }
9
+ return Renderer;
10
+ }());
11
+ exports.Renderer = Renderer;
12
+ //# sourceMappingURL=renderer.js.map
node_modules/html2canvas/dist/lib/render/renderer.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"renderer.js","sourceRoot":"","sources":["../../../src/render/renderer.ts"],"names":[],"mappings":";;;AAGA;IACI,kBAA+B,OAAgB,EAAqB,OAA6B;QAAlE,YAAO,GAAP,OAAO,CAAS;QAAqB,YAAO,GAAP,OAAO,CAAsB;IAAG,CAAC;IACzG,eAAC;AAAD,CAAC,AAFD,IAEC;AAFY,4BAAQ"}
node_modules/html2canvas/dist/lib/render/stacking-context.js ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseStackingContexts = exports.ElementPaint = exports.StackingContext = void 0;
4
+ var bitwise_1 = require("../core/bitwise");
5
+ var bound_curves_1 = require("./bound-curves");
6
+ var effects_1 = require("./effects");
7
+ var path_1 = require("./path");
8
+ var ol_element_container_1 = require("../dom/elements/ol-element-container");
9
+ var li_element_container_1 = require("../dom/elements/li-element-container");
10
+ var counter_1 = require("../css/types/functions/counter");
11
+ var StackingContext = /** @class */ (function () {
12
+ function StackingContext(container) {
13
+ this.element = container;
14
+ this.inlineLevel = [];
15
+ this.nonInlineLevel = [];
16
+ this.negativeZIndex = [];
17
+ this.zeroOrAutoZIndexOrTransformedOrOpacity = [];
18
+ this.positiveZIndex = [];
19
+ this.nonPositionedFloats = [];
20
+ this.nonPositionedInlineLevel = [];
21
+ }
22
+ return StackingContext;
23
+ }());
24
+ exports.StackingContext = StackingContext;
25
+ var ElementPaint = /** @class */ (function () {
26
+ function ElementPaint(container, parent) {
27
+ this.container = container;
28
+ this.parent = parent;
29
+ this.effects = [];
30
+ this.curves = new bound_curves_1.BoundCurves(this.container);
31
+ if (this.container.styles.opacity < 1) {
32
+ this.effects.push(new effects_1.OpacityEffect(this.container.styles.opacity));
33
+ }
34
+ if (this.container.styles.transform !== null) {
35
+ var offsetX = this.container.bounds.left + this.container.styles.transformOrigin[0].number;
36
+ var offsetY = this.container.bounds.top + this.container.styles.transformOrigin[1].number;
37
+ var matrix = this.container.styles.transform;
38
+ this.effects.push(new effects_1.TransformEffect(offsetX, offsetY, matrix));
39
+ }
40
+ if (this.container.styles.overflowX !== 0 /* VISIBLE */) {
41
+ var borderBox = bound_curves_1.calculateBorderBoxPath(this.curves);
42
+ var paddingBox = bound_curves_1.calculatePaddingBoxPath(this.curves);
43
+ if (path_1.equalPath(borderBox, paddingBox)) {
44
+ this.effects.push(new effects_1.ClipEffect(borderBox, 2 /* BACKGROUND_BORDERS */ | 4 /* CONTENT */));
45
+ }
46
+ else {
47
+ this.effects.push(new effects_1.ClipEffect(borderBox, 2 /* BACKGROUND_BORDERS */));
48
+ this.effects.push(new effects_1.ClipEffect(paddingBox, 4 /* CONTENT */));
49
+ }
50
+ }
51
+ }
52
+ ElementPaint.prototype.getEffects = function (target) {
53
+ var inFlow = [2 /* ABSOLUTE */, 3 /* FIXED */].indexOf(this.container.styles.position) === -1;
54
+ var parent = this.parent;
55
+ var effects = this.effects.slice(0);
56
+ while (parent) {
57
+ var croplessEffects = parent.effects.filter(function (effect) { return !effects_1.isClipEffect(effect); });
58
+ if (inFlow || parent.container.styles.position !== 0 /* STATIC */ || !parent.parent) {
59
+ effects.unshift.apply(effects, croplessEffects);
60
+ inFlow = [2 /* ABSOLUTE */, 3 /* FIXED */].indexOf(parent.container.styles.position) === -1;
61
+ if (parent.container.styles.overflowX !== 0 /* VISIBLE */) {
62
+ var borderBox = bound_curves_1.calculateBorderBoxPath(parent.curves);
63
+ var paddingBox = bound_curves_1.calculatePaddingBoxPath(parent.curves);
64
+ if (!path_1.equalPath(borderBox, paddingBox)) {
65
+ effects.unshift(new effects_1.ClipEffect(paddingBox, 2 /* BACKGROUND_BORDERS */ | 4 /* CONTENT */));
66
+ }
67
+ }
68
+ }
69
+ else {
70
+ effects.unshift.apply(effects, croplessEffects);
71
+ }
72
+ parent = parent.parent;
73
+ }
74
+ return effects.filter(function (effect) { return bitwise_1.contains(effect.target, target); });
75
+ };
76
+ return ElementPaint;
77
+ }());
78
+ exports.ElementPaint = ElementPaint;
79
+ var parseStackTree = function (parent, stackingContext, realStackingContext, listItems) {
80
+ parent.container.elements.forEach(function (child) {
81
+ var treatAsRealStackingContext = bitwise_1.contains(child.flags, 4 /* CREATES_REAL_STACKING_CONTEXT */);
82
+ var createsStackingContext = bitwise_1.contains(child.flags, 2 /* CREATES_STACKING_CONTEXT */);
83
+ var paintContainer = new ElementPaint(child, parent);
84
+ if (bitwise_1.contains(child.styles.display, 2048 /* LIST_ITEM */)) {
85
+ listItems.push(paintContainer);
86
+ }
87
+ var listOwnerItems = bitwise_1.contains(child.flags, 8 /* IS_LIST_OWNER */) ? [] : listItems;
88
+ if (treatAsRealStackingContext || createsStackingContext) {
89
+ var parentStack = treatAsRealStackingContext || child.styles.isPositioned() ? realStackingContext : stackingContext;
90
+ var stack = new StackingContext(paintContainer);
91
+ if (child.styles.isPositioned() || child.styles.opacity < 1 || child.styles.isTransformed()) {
92
+ var order_1 = child.styles.zIndex.order;
93
+ if (order_1 < 0) {
94
+ var index_1 = 0;
95
+ parentStack.negativeZIndex.some(function (current, i) {
96
+ if (order_1 > current.element.container.styles.zIndex.order) {
97
+ index_1 = i;
98
+ return false;
99
+ }
100
+ else if (index_1 > 0) {
101
+ return true;
102
+ }
103
+ return false;
104
+ });
105
+ parentStack.negativeZIndex.splice(index_1, 0, stack);
106
+ }
107
+ else if (order_1 > 0) {
108
+ var index_2 = 0;
109
+ parentStack.positiveZIndex.some(function (current, i) {
110
+ if (order_1 >= current.element.container.styles.zIndex.order) {
111
+ index_2 = i + 1;
112
+ return false;
113
+ }
114
+ else if (index_2 > 0) {
115
+ return true;
116
+ }
117
+ return false;
118
+ });
119
+ parentStack.positiveZIndex.splice(index_2, 0, stack);
120
+ }
121
+ else {
122
+ parentStack.zeroOrAutoZIndexOrTransformedOrOpacity.push(stack);
123
+ }
124
+ }
125
+ else {
126
+ if (child.styles.isFloating()) {
127
+ parentStack.nonPositionedFloats.push(stack);
128
+ }
129
+ else {
130
+ parentStack.nonPositionedInlineLevel.push(stack);
131
+ }
132
+ }
133
+ parseStackTree(paintContainer, stack, treatAsRealStackingContext ? stack : realStackingContext, listOwnerItems);
134
+ }
135
+ else {
136
+ if (child.styles.isInlineLevel()) {
137
+ stackingContext.inlineLevel.push(paintContainer);
138
+ }
139
+ else {
140
+ stackingContext.nonInlineLevel.push(paintContainer);
141
+ }
142
+ parseStackTree(paintContainer, stackingContext, realStackingContext, listOwnerItems);
143
+ }
144
+ if (bitwise_1.contains(child.flags, 8 /* IS_LIST_OWNER */)) {
145
+ processListItems(child, listOwnerItems);
146
+ }
147
+ });
148
+ };
149
+ var processListItems = function (owner, elements) {
150
+ var numbering = owner instanceof ol_element_container_1.OLElementContainer ? owner.start : 1;
151
+ var reversed = owner instanceof ol_element_container_1.OLElementContainer ? owner.reversed : false;
152
+ for (var i = 0; i < elements.length; i++) {
153
+ var item = elements[i];
154
+ if (item.container instanceof li_element_container_1.LIElementContainer &&
155
+ typeof item.container.value === 'number' &&
156
+ item.container.value !== 0) {
157
+ numbering = item.container.value;
158
+ }
159
+ item.listValue = counter_1.createCounterText(numbering, item.container.styles.listStyleType, true);
160
+ numbering += reversed ? -1 : 1;
161
+ }
162
+ };
163
+ var parseStackingContexts = function (container) {
164
+ var paintContainer = new ElementPaint(container, null);
165
+ var root = new StackingContext(paintContainer);
166
+ var listItems = [];
167
+ parseStackTree(paintContainer, root, root, listItems);
168
+ processListItems(paintContainer.container, listItems);
169
+ return root;
170
+ };
171
+ exports.parseStackingContexts = parseStackingContexts;
172
+ //# sourceMappingURL=stacking-context.js.map
node_modules/html2canvas/dist/lib/render/stacking-context.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"stacking-context.js","sourceRoot":"","sources":["../../../src/render/stacking-context.ts"],"names":[],"mappings":";;;AACA,2CAAyC;AACzC,+CAA4F;AAC5F,qCAAiH;AAEjH,+BAAiC;AAEjC,6EAAwE;AACxE,6EAAwE;AACxE,0DAAiE;AAGjE;IAUI,yBAAY,SAAuB;QAC/B,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;QACzB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;Q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AI,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;IACtD,gBAAgB,CAAC,cAAc,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACtD,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC;AAPW,QAAA,qBAAqB,yBAOhC"}
node_modules/html2canvas/dist/lib/render/vector.js ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isVector = exports.Vector = void 0;
4
+ var Vector = /** @class */ (function () {
5
+ function Vector(x, y) {
6
+ this.type = 0 /* VECTOR */;
7
+ this.x = x;
8
+ this.y = y;
9
+ }
10
+ Vector.prototype.add = function (deltaX, deltaY) {
11
+ return new Vector(this.x + deltaX, this.y + deltaY);
12
+ };
13
+ return Vector;
14
+ }());
15
+ exports.Vector = Vector;
16
+ var isVector = function (path) { return path.type === 0 /* VECTOR */; };
17
+ exports.isVector = isVector;
18
+ //# sourceMappingURL=vector.js.map
node_modules/html2canvas/dist/lib/render/vector.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"vector.js","sourceRoot":"","sources":["../../../src/render/vector.ts"],"names":[],"mappings":";;;AAEA;IAKI,gBAAY,CAAS,EAAE,CAAS;QAC5B,IAAI,CAAC,IAAI,iBAAkB,CAAC;QAC5B,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACf,CAAC;IAED,oBAAG,GAAH,UAAI,MAAc,EAAE,MAAc;QAC9B,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,MAAM,EAAE,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;IACxD,CAAC;IACL,aAAC;AAAD,CAAC,AAdD,IAcC;AAdY,wBAAM;AAgBZ,IAAM,QAAQ,GAAG,UAAC,IAAU,IAAqB,OAAA,IAAI,CAAC,IAAI,mBAAoB,EAA7B,CAA6B,CAAC;AAAzE,QAAA,QAAQ,YAAiE"}
node_modules/html2canvas/dist/types/__tests__/index.d.ts ADDED
@@ -0,0 +1 @@
 
 
1
+ export {};
node_modules/html2canvas/dist/types/core/__mocks__/cache-storage.d.ts ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ export declare class CacheStorage {
2
+ }
node_modules/html2canvas/dist/types/core/__mocks__/context.d.ts ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ import { Logger } from './logger';
2
+ export declare class Context {
3
+ readonly logger: Logger;
4
+ readonly _cache: {
5
+ [key: string]: Promise<any>;
6
+ };
7
+ readonly cache: any;
8
+ constructor();
9
+ }
node_modules/html2canvas/dist/types/core/__mocks__/features.d.ts ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ export declare const FEATURES: {
2
+ SUPPORT_RANGE_BOUNDS: boolean;
3
+ SUPPORT_SVG_DRAWING: boolean;
4
+ SUPPORT_FOREIGNOBJECT_DRAWING: boolean;
5
+ SUPPORT_CORS_IMAGES: boolean;
6
+ SUPPORT_RESPONSE_TYPE: boolean;
7
+ SUPPORT_CORS_XHR: boolean;
8
+ };
node_modules/html2canvas/dist/types/core/__mocks__/logger.d.ts ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ export declare class Logger {
2
+ debug(): void;
3
+ static create(): void;
4
+ static destroy(): void;
5
+ static getInstance(): Logger;
6
+ info(): void;
7
+ error(): void;
8
+ }
9
+ export declare const logger: Logger;
node_modules/html2canvas/dist/types/core/__tests__/cache-storage.d.ts ADDED
@@ -0,0 +1 @@
 
 
1
+ export {};
node_modules/html2canvas/dist/types/core/__tests__/logger.d.ts ADDED
@@ -0,0 +1 @@
 
 
1
+ export {};
node_modules/html2canvas/dist/types/core/bitwise.d.ts ADDED
@@ -0,0 +1 @@
 
 
1
+ export declare const contains: (bit: number, value: number) => boolean;
node_modules/html2canvas/dist/types/core/cache-storage.d.ts ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { Context } from './context';
2
+ export declare class CacheStorage {
3
+ private static _link?;
4
+ private static _origin;
5
+ static getOrigin(url: string): string;
6
+ static isSameOrigin(src: string): boolean;
7
+ static setContext(window: Window): void;
8
+ }
9
+ export interface ResourceOptions {
10
+ imageTimeout: number;
11
+ useCORS: boolean;
12
+ allowTaint: boolean;
13
+ proxy?: string;
14
+ }
15
+ export declare class Cache {
16
+ private readonly context;
17
+ private readonly _options;
18
+ private readonly _cache;
19
+ constructor(context: Context, _options: ResourceOptions);
20
+ addImage(src: string): Promise<void>;
21
+ match(src: string): Promise<any>;
22
+ private loadImage;
23
+ private has;
24
+ keys(): Promise<string[]>;
25
+ private proxy;
26
+ }
node_modules/html2canvas/dist/types/core/context.d.ts ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { Logger } from './logger';
2
+ import { Cache, ResourceOptions } from './cache-storage';
3
+ import { Bounds } from '../css/layout/bounds';
4
+ export declare type ContextOptions = {
5
+ logging: boolean;
6
+ cache?: Cache;
7
+ } & ResourceOptions;
8
+ export declare class Context {
9
+ windowBounds: Bounds;
10
+ private readonly instanceName;
11
+ readonly logger: Logger;
12
+ readonly cache: Cache;
13
+ private static instanceCount;
14
+ constructor(options: ContextOptions, windowBounds: Bounds);
15
+ }
node_modules/html2canvas/dist/types/core/debugger.d.ts ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ export declare const enum DebuggerType {
2
+ NONE = 0,
3
+ ALL = 1,
4
+ CLONE = 2,
5
+ PARSE = 3,
6
+ RENDER = 4
7
+ }
8
+ export declare const isDebugging: (element: Element, type: Omit<DebuggerType, DebuggerType.NONE>) => boolean;
node_modules/html2canvas/dist/types/core/features.d.ts ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export declare const createForeignObjectSVG: (width: number, height: number, x: number, y: number, node: Node) => SVGForeignObjectElement;
2
+ export declare const loadSerializedSVG: (svg: Node) => Promise<HTMLImageElement>;
3
+ export declare const FEATURES: {
4
+ readonly SUPPORT_RANGE_BOUNDS: boolean;
5
+ readonly SUPPORT_WORD_BREAKING: boolean;
6
+ readonly SUPPORT_SVG_DRAWING: boolean;
7
+ readonly SUPPORT_FOREIGNOBJECT_DRAWING: Promise<boolean>;
8
+ readonly SUPPORT_CORS_IMAGES: boolean;
9
+ readonly SUPPORT_RESPONSE_TYPE: boolean;
10
+ readonly SUPPORT_CORS_XHR: boolean;
11
+ readonly SUPPORT_NATIVE_TEXT_SEGMENTATION: boolean;
12
+ };
node_modules/html2canvas/dist/types/core/logger.d.ts ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export interface LoggerOptions {
2
+ id: string;
3
+ enabled: boolean;
4
+ }
5
+ export declare class Logger {
6
+ static instances: {
7
+ [key: string]: Logger;
8
+ };
9
+ private readonly id;
10
+ private readonly enabled;
11
+ private readonly start;
12
+ constructor({ id, enabled }: LoggerOptions);
13
+ debug(...args: unknown[]): void;
14
+ getTime(): number;
15
+ info(...args: unknown[]): void;
16
+ warn(...args: unknown[]): void;
17
+ error(...args: unknown[]): void;
18
+ }
node_modules/html2canvas/dist/types/core/util.d.ts ADDED
@@ -0,0 +1 @@
 
 
1
+ export declare const SMALL_IMAGE = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
node_modules/html2canvas/dist/types/css/IPropertyDescriptor.d.ts ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { CSSValue } from './syntax/parser';
2
+ import { CSSTypes } from './types';
3
+ import { Context } from '../core/context';
4
+ export declare const enum PropertyDescriptorParsingType {
5
+ VALUE = 0,
6
+ LIST = 1,
7
+ IDENT_VALUE = 2,
8
+ TYPE_VALUE = 3,
9
+ TOKEN_VALUE = 4
10
+ }
11
+ export interface IPropertyDescriptor {
12
+ name: string;
13
+ type: PropertyDescriptorParsingType;
14
+ initialValue: string;
15
+ prefix: boolean;
16
+ }
17
+ export interface IPropertyIdentValueDescriptor<T> extends IPropertyDescriptor {
18
+ type: PropertyDescriptorParsingType.IDENT_VALUE;
19
+ parse: (context: Context, token: string) => T;
20
+ }
21
+ export interface IPropertyTypeValueDescriptor extends IPropertyDescriptor {
22
+ type: PropertyDescriptorParsingType.TYPE_VALUE;
23
+ format: CSSTypes;
24
+ }
25
+ export interface IPropertyValueDescriptor<T> extends IPropertyDescriptor {
26
+ type: PropertyDescriptorParsingType.VALUE;
27
+ parse: (context: Context, token: CSSValue) => T;
28
+ }
29
+ export interface IPropertyListDescriptor<T> extends IPropertyDescriptor {
30
+ type: PropertyDescriptorParsingType.LIST;
31
+ parse: (context: Context, tokens: CSSValue[]) => T;
32
+ }
33
+ export interface IPropertyTokenValueDescriptor extends IPropertyDescriptor {
34
+ type: PropertyDescriptorParsingType.TOKEN_VALUE;
35
+ }
36
+ export declare type CSSPropertyDescriptor<T> = IPropertyValueDescriptor<T> | IPropertyListDescriptor<T> | IPropertyIdentValueDescriptor<T> | IPropertyTypeValueDescriptor | IPropertyTokenValueDescriptor;
node_modules/html2canvas/dist/types/css/ITypeDescriptor.d.ts ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ import { CSSValue } from './syntax/parser';
2
+ import { Context } from '../core/context';
3
+ export interface ITypeDescriptor<T> {
4
+ name: string;
5
+ parse: (context: Context, value: CSSValue) => T;
6
+ }
node_modules/html2canvas/dist/types/css/index.d.ts ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { backgroundClip } from './property-descriptors/background-clip';
2
+ import { backgroundImage } from './property-descriptors/background-image';
3
+ import { backgroundOrigin } from './property-descriptors/background-origin';
4
+ import { backgroundPosition } from './property-descriptors/background-position';
5
+ import { backgroundRepeat } from './property-descriptors/background-repeat';
6
+ import { backgroundSize } from './property-descriptors/background-size';
7
+ import { borderBottomLeftRadius, borderBottomRightRadius, borderTopLeftRadius, borderTopRightRadius } from './property-descriptors/border-radius';
8
+ import { borderBottomStyle, borderLeftStyle, borderRightStyle, borderTopStyle } from './property-descriptors/border-style';
9
+ import { borderBottomWidth, borderLeftWidth, borderRightWidth, borderTopWidth } from './property-descriptors/border-width';
10
+ import { direction } from './property-descriptors/direction';
11
+ import { display } from './property-descriptors/display';
12
+ import { float } from './property-descriptors/float';
13
+ import { letterSpacing } from './property-descriptors/letter-spacing';
14
+ import { lineBreak } from './property-descriptors/line-break';
15
+ import { listStyleImage } from './property-descriptors/list-style-image';
16
+ import { listStylePosition } from './property-descriptors/list-style-position';
17
+ import { listStyleType } from './property-descriptors/list-style-type';
18
+ import { OVERFLOW } from './property-descriptors/overflow';
19
+ import { overflowWrap } from './property-descriptors/overflow-wrap';
20
+ import { textAlign } from './property-descriptors/text-align';
21
+ import { position } from './property-descriptors/position';
22
+ import { textShadow } from './property-descriptors/text-shadow';
23
+ import { textTransform } from './property-descriptors/text-transform';
24
+ import { transform } from './property-descriptors/transform';
25
+ import { transformOrigin } from './property-descriptors/transform-origin';
26
+ import { visibility } from './property-descriptors/visibility';
27
+ import { wordBreak } from './property-descriptors/word-break';
28
+ import { zIndex } from './property-descriptors/z-index';
29
+ import { CSSValue } from './syntax/parser';
30
+ import { Color } from './types/color';
31
+ import { opacity } from './property-descriptors/opacity';
32
+ import { textDecorationLine } from './property-descriptors/text-decoration-line';
33
+ import { LengthPercentage } from './types/length-percentage';
34
+ import { fontFamily } from './property-descriptors/font-family';
35
+ import { fontWeight } from './property-descriptors/font-weight';
36
+ import { fontVariant } from './property-descriptors/font-variant';
37
+ import { fontStyle } from './property-descriptors/font-style';
38
+ import { content } from './property-descriptors/content';
39
+ import { counterIncrement } from './property-descriptors/counter-increment';
40
+ import { counterReset } from './property-descriptors/counter-reset';
41
+ import { duration } from './property-descriptors/duration';
42
+ import { quotes } from './property-descriptors/quotes';
43
+ import { boxShadow } from './property-descriptors/box-shadow';
44
+ import { paintOrder } from './property-descriptors/paint-order';
45
+ import { webkitTextStrokeWidth } from './property-descriptors/webkit-text-stroke-width';
46
+ import { Context } from '../core/context';
47
+ export declare class CSSParsedDeclaration {
48
+ animationDuration: ReturnType<typeof duration.parse>;
49
+ backgroundClip: ReturnType<typeof backgroundClip.parse>;
50
+ backgroundColor: Color;
51
+ backgroundImage: ReturnType<typeof backgroundImage.parse>;
52
+ backgroundOrigin: ReturnType<typeof backgroundOrigin.parse>;
53
+ backgroundPosition: ReturnType<typeof backgroundPosition.parse>;
54
+ backgroundRepeat: ReturnType<typeof backgroundRepeat.parse>;
55
+ backgroundSize: ReturnType<typeof backgroundSize.parse>;
56
+ borderTopColor: Color;
57
+ borderRightColor: Color;
58
+ borderBottomColor: Color;
59
+ borderLeftColor: Color;
60
+ borderTopLeftRadius: ReturnType<typeof borderTopLeftRadius.parse>;
61
+ borderTopRightRadius: ReturnType<typeof borderTopRightRadius.parse>;
62
+ borderBottomRightRadius: ReturnType<typeof borderBottomRightRadius.parse>;
63
+ borderBottomLeftRadius: ReturnType<typeof borderBottomLeftRadius.parse>;
64
+ borderTopStyle: ReturnType<typeof borderTopStyle.parse>;
65
+ borderRightStyle: ReturnType<typeof borderRightStyle.parse>;
66
+ borderBottomStyle: ReturnType<typeof borderBottomStyle.parse>;
67
+ borderLeftStyle: ReturnType<typeof borderLeftStyle.parse>;
68
+ borderTopWidth: ReturnType<typeof borderTopWidth.parse>;
69
+ borderRightWidth: ReturnType<typeof borderRightWidth.parse>;
70
+ borderBottomWidth: ReturnType<typeof borderBottomWidth.parse>;
71
+ borderLeftWidth: ReturnType<typeof borderLeftWidth.parse>;
72
+ boxShadow: ReturnType<typeof boxShadow.parse>;
73
+ color: Color;
74
+ direction: ReturnType<typeof direction.parse>;
75
+ display: ReturnType<typeof display.parse>;
76
+ float: ReturnType<typeof float.parse>;
77
+ fontFamily: ReturnType<typeof fontFamily.parse>;
78
+ fontSize: LengthPercentage;
79
+ fontStyle: ReturnType<typeof fontStyle.parse>;
80
+ fontVariant: ReturnType<typeof fontVariant.parse>;
81
+ fontWeight: ReturnType<typeof fontWeight.parse>;
82
+ letterSpacing: ReturnType<typeof letterSpacing.parse>;
83
+ lineBreak: ReturnType<typeof lineBreak.parse>;
84
+ lineHeight: CSSValue;
85
+ listStyleImage: ReturnType<typeof listStyleImage.parse>;
86
+ listStylePosition: ReturnType<typeof listStylePosition.parse>;
87
+ listStyleType: ReturnType<typeof listStyleType.parse>;
88
+ marginTop: CSSValue;
89
+ marginRight: CSSValue;
90
+ marginBottom: CSSValue;
91
+ marginLeft: CSSValue;
92
+ opacity: ReturnType<typeof opacity.parse>;
93
+ overflowX: OVERFLOW;
94
+ overflowY: OVERFLOW;
95
+ overflowWrap: ReturnType<typeof overflowWrap.parse>;
96
+ paddingTop: LengthPercentage;
97
+ paddingRight: LengthPercentage;
98
+ paddingBottom: LengthPercentage;
99
+ paddingLeft: LengthPercentage;
100
+ paintOrder: ReturnType<typeof paintOrder.parse>;
101
+ position: ReturnType<typeof position.parse>;
102
+ textAlign: ReturnType<typeof textAlign.parse>;
103
+ textDecorationColor: Color;
104
+ textDecorationLine: ReturnType<typeof textDecorationLine.parse>;
105
+ textShadow: ReturnType<typeof textShadow.parse>;
106
+ textTransform: ReturnType<typeof textTransform.parse>;
107
+ transform: ReturnType<typeof transform.parse>;
108
+ transformOrigin: ReturnType<typeof transformOrigin.parse>;
109
+ visibility: ReturnType<typeof visibility.parse>;
110
+ webkitTextStrokeColor: Color;
111
+ webkitTextStrokeWidth: ReturnType<typeof webkitTextStrokeWidth.parse>;
112
+ wordBreak: ReturnType<typeof wordBreak.parse>;
113
+ zIndex: ReturnType<typeof zIndex.parse>;
114
+ constructor(context: Context, declaration: CSSStyleDeclaration);
115
+ isVisible(): boolean;
116
+ isTransparent(): boolean;
117
+ isTransformed(): boolean;
118
+ isPositioned(): boolean;
119
+ isPositionedWithZIndex(): boolean;
120
+ isFloating(): boolean;
121
+ isInlineLevel(): boolean;
122
+ }
123
+ export declare class CSSParsedPseudoDeclaration {
124
+ content: ReturnType<typeof content.parse>;
125
+ quotes: ReturnType<typeof quotes.parse>;
126
+ constructor(context: Context, declaration: CSSStyleDeclaration);
127
+ }
128
+ export declare class CSSParsedCounterDeclaration {
129
+ counterIncrement: ReturnType<typeof counterIncrement.parse>;
130
+ counterReset: ReturnType<typeof counterReset.parse>;
131
+ constructor(context: Context, declaration: CSSStyleDeclaration);
132
+ }
node_modules/html2canvas/dist/types/css/layout/__mocks__/bounds.d.ts ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ export declare const Bounds: any;
2
+ export declare const parseBounds: () => typeof Bounds;