-
Notifications
You must be signed in to change notification settings - Fork 25
/
2159.0.58.0-dev.1733154060195.js.map
1 lines (1 loc) · 663 KB
/
2159.0.58.0-dev.1733154060195.js.map
1
{"version":3,"file":"2159.0.58.0-dev.1733154060195.js","mappings":"gLAgBA,IAAIA,cAAgB,SAASC,EAAGC,GAC5BF,cAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,CAAG,GAC1E,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAG,GAAIC,OAAOK,UAAUC,eAAeC,KAAKR,EAAGK,GAAIN,EAAEM,GAAKL,EAAEK,EAAI,EACpG,OAAOP,cAAcC,EAAGC,EAC5B,EAEO,SAASS,UAAUV,EAAGC,GACzB,UAAWA,IAAM,YAAcA,IAAM,KACjC,MAAM,IAAIU,UAAU,uBAAyBC,OAAOX,GAAK,iCAC7DF,cAAcC,EAAGC,GACjB,SAASY,KAAOC,KAAKC,YAAcf,CAAG,CACtCA,EAAEO,UAAYN,IAAM,KAAOC,OAAOc,OAAOf,IAAMY,GAAGN,UAAYN,EAAEM,UAAW,IAAIM,GACnF,CAEO,IAAII,SAAW,WAClBA,SAAWf,OAAOgB,QAAU,SAASD,SAASE,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAAK,CACjDD,EAAIG,UAAUF,GACd,IAAK,IAAIf,KAAKc,EAAG,GAAIlB,OAAOK,UAAUC,eAAeC,KAAKW,EAAGd,GAAIa,EAAEb,GAAKc,EAAEd,EAC9E,CACA,OAAOa,CACX,EACA,OAAOF,SAASQ,MAAMX,KAAMS,UAChC,EA6BO,SAASG,UAAUC,QAASC,WAAYC,EAAGC,WAC9C,SAASC,MAAMC,OAAS,OAAOA,iBAAiBH,EAAIG,MAAQ,IAAIH,GAAE,SAAUI,SAAWA,QAAQD,MAAQ,GAAI,CAC3G,OAAO,IAAKH,IAAMA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AAO,EACX,IAAK,SACD,OAAO,EACX,IAAK,SACD,OAAO,EACX,IAAK,UACD,OAAO,EACX,IAAK,cACD,OAAO,EACX,IAAK,uBACD,OAAO,EACX,IAAK,cACD,OAAO,EACX,IAAK,cACD,OAAO,EACX,IAAK,cACD,OAAO,EACX,IAAK,cACD,OAAO,EACX,IAAK,cACD,OAAO,GACX,IAAK,eACD,OAAO,GACX,IAAK,WACD,OAAO,GACX,IAAK,UACD,OAAO,GACX,IAAK,YACD,OAAO,GACX,IAAK,qBACD,OAAO,GACX,IAAK,oBACD,OAAO,GACX,IAAK,kBACD,OAAO,GACX,IAAK,aACD,OAAO,GACX,IAAK,mBACD,OAAO,GACX,IAAK,WACD,OAAO,GACX,IAAK,WACD,OAAO,GACX,IAAK,WACD,OAAO,GACX,IAAK,SACD,OAAO,GACX,IAAK,WACD,OAAO,GACX,IAAK,iBACD,OAAO,GACX,IAAK,kBACD,OAAO,GACX,IAAK,oBACD,OAAO,GACX,IAAK,UACD,OAAO,GACX,IAAK,WACD,OAAO,GACX,IAAK,iBACD,OAAO,GACX,IAAK,QACD,OAAO,GACX,IAAK,uBACD,OAAO,GACX,IAAK,sBACD,OAAO,GACX,IAAK,wBACD,OAAO,GACX,IAAK,MACD,OAAO,GACX,IAAK,iBACD,OAAO,GACX,IAAK,YACD,OAAO,GACX,IAAK,YACD,OAAO,GACX,IAAK,UACD,OAAO,GACX,IAAK,QACD,OAAO,GACX,IAAK,UACD,OAAO,GACX,IAAK,sBACD,OAAO,GACX,IAAK,wBACD,OAAO,GACX,IAAK,QACD,OAAO,GACX,IAAK,SACD,OAAO,GACX,IAAK,OACD,OAAO,GACX,IAAK,UACD,OAAO,GACX,IAAK,sBACD,OAAO,GACX,IAAK,wBACD,OAAO,GACX,IAAK,iBACD,OAAO,GACX,IAAK,kBACD,OAAO,GACX,IAAK,oBACD,OAAO,GACX,IAAK,OACL,QACI,S,GC5KhB,IAAMmhB,cAAgB,SAACpC,MAAgD,OACnE9S,KAAM,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C+b,WAAW7Z,QAASsxB,iBAAiB2G,cAAcn6B,MAAMslB,iBACzD5K,OAAOE,YAEb,IAAMylC,8BACKD,0BAA4B,SAC7BrkC,WAAW7Z,QAASk+C,yBACpBA,0BAA4B,KAC5B1lC,OAAOE,YACP,WAEV,OAAOkY,UAAYqH,cAAcn3B,gBAC3B6X,cAAckiB,yBACVliB,cAAcmiB,qBACVqjB,uBACArjB,oBACJD,wBACJsjB,sBACV,E","sources":["webpack:///../../node_modules/html2canvas/node_modules/tslib/tslib.es6.js","webpack:///../../node_modules/src/css/layout/bounds.ts","webpack:///../../node_modules/html2canvas/node_modules/src/Util.ts","webpack:///../../node_modules/html2canvas/node_modules/css-line-break/node_modules/src/Util.ts","webpack:///../../node_modules/html2canvas/node_modules/css-line-break/node_modules/src/Trie.ts","webpack:///../../node_modules/html2canvas/node_modules/css-line-break/node_modules/utrie/node_modules/src/index.ts","webpack:///../../node_modules/html2canvas/node_modules/src/linebreak-trie.ts","webpack:///../../node_modules/html2canvas/node_modules/src/LineBreak.ts","webpack:///../../node_modules/src/css/syntax/tokenizer.ts","webpack:///../../node_modules/src/css/syntax/parser.ts","webpack:///../../node_modules/src/css/types/length.ts","webpack:///../../node_modules/src/css/types/length-percentage.ts","webpack:///../../node_modules/src/css/types/angle.ts","webpack:///../../node_modules/src/css/types/color.ts","webpack:///../../node_modules/src/css/property-descriptors/background-clip.ts","webpack:///../../node_modules/src/css/property-descriptors/background-color.ts","webpack:///../../node_modules/src/css/types/functions/gradient.ts","webpack:///../../node_modules/src/css/types/functions/linear-gradient.ts","webpack:///../../node_modules/src/css/types/functions/-prefix-linear-gradient.ts","webpack:///../../node_modules/src/css/types/functions/-webkit-gradient.ts","webpack:///../../node_modules/src/css/types/functions/radial-gradient.ts","webpack:///../../node_modules/src/css/types/functions/-prefix-radial-gradient.ts","webpack:///../../node_modules/src/css/types/image.ts","webpack:///../../node_modules/src/css/property-descriptors/background-image.ts","webpack:///../../node_modules/src/css/property-descriptors/background-origin.ts","webpack:///../../node_modules/src/css/property-descriptors/background-position.ts","webpack:///../../node_modules/src/css/property-descriptors/background-repeat.ts","webpack:///../../node_modules/src/css/property-descriptors/background-size.ts","webpack:///../../node_modules/src/css/property-descriptors/border-color.ts","webpack:///../../node_modules/src/css/property-descriptors/border-radius.ts","webpack:///../../node_modules/src/css/property-descriptors/border-style.ts","webpack:///../../node_modules/src/css/property-descriptors/border-width.ts","webpack:///../../node_modules/src/css/property-descriptors/color.ts","webpack:///../../node_modules/src/css/property-descriptors/direction.ts","webpack:///../../node_modules/src/css/property-descriptors/display.ts","webpack:///../../node_modules/src/css/property-descriptors/float.ts","webpack:///../../node_modules/src/css/property-descriptors/letter-spacing.ts","webpack:///../../node_modules/src/css/property-descriptors/line-break.ts","webpack:///../../node_modules/src/css/property-descriptors/line-height.ts","webpack:///../../node_modules/src/css/property-descriptors/list-style-image.ts","webpack:///../../node_modules/src/css/property-descriptors/list-style-position.ts","webpack:///../../node_modules/src/css/property-descriptors/list-style-type.ts","webpack:///../../node_modules/src/css/property-descriptors/margin.ts","webpack:///../../node_modules/src/css/property-descriptors/overflow.ts","webpack:///../../node_modules/src/css/property-descriptors/overflow-wrap.ts","webpack:///../../node_modules/src/css/property-descriptors/padding.ts","webpack:///../../node_modules/src/css/property-descriptors/text-align.ts","webpack:///../../node_modules/src/css/property-descriptors/position.ts","webpack:///../../node_modules/src/css/property-descriptors/text-shadow.ts","webpack:///../../node_modules/src/css/property-descriptors/text-transform.ts","webpack:///../../node_modules/src/css/property-descriptors/transform.ts","webpack:///../../node_modules/src/css/property-descriptors/transform-origin.ts","webpack:///../../node_modules/src/css/property-descriptors/visibility.ts","webpack:///../../node_modules/src/css/property-descriptors/word-break.ts","webpack:///../../node_modules/src/css/property-descriptors/z-index.ts","webpack:///../../node_modules/src/css/types/time.ts","webpack:///../../node_modules/src/css/property-descriptors/opacity.ts","webpack:///../../node_modules/src/css/property-descriptors/text-decoration-color.ts","webpack:///../../node_modules/src/css/property-descriptors/text-decoration-line.ts","webpack:///../../node_modules/src/css/property-descriptors/font-family.ts","webpack:///../../node_modules/src/css/property-descriptors/font-size.ts","webpack:///../../node_modules/src/css/property-descriptors/font-weight.ts","webpack:///../../node_modules/src/css/property-descriptors/font-variant.ts","webpack:///../../node_modules/src/css/property-descriptors/font-style.ts","webpack:///../../node_modules/src/core/bitwise.ts","webpack:///../../node_modules/src/css/property-descriptors/content.ts","webpack:///../../node_modules/src/css/property-descriptors/counter-increment.ts","webpack:///../../node_modules/src/css/property-descriptors/counter-reset.ts","webpack:///../../node_modules/src/css/property-descriptors/duration.ts","webpack:///../../node_modules/src/css/property-descriptors/quotes.ts","webpack:///../../node_modules/src/css/property-descriptors/box-shadow.ts","webpack:///../../node_modules/src/css/property-descriptors/paint-order.ts","webpack:///../../node_modules/src/css/property-descriptors/webkit-text-stroke-color.ts","webpack:///../../node_modules/src/css/property-descriptors/webkit-text-stroke-width.ts","webpack:///../../node_modules/src/css/index.ts","webpack:///../../node_modules/src/core/debugger.ts","webpack:///../../node_modules/src/dom/element-container.ts","webpack:///../../node_modules/html2canvas/node_modules/src/grapheme-break-trie.ts","webpack:///../../node_modules/html2canvas/node_modules/text-segmentation/node_modules/src/Util.ts","webpack:///../../node_modules/html2canvas/node_modules/text-segmentation/node_modules/src/Trie.ts","webpack:///../../node_modules/html2canvas/node_modules/text-segmentation/node_modules/utrie/node_modules/src/index.ts","webpack:///../../node_modules/html2canvas/node_modules/src/GraphemeBreak.ts","webpack:///../../node_modules/src/core/features.ts","webpack:///../../node_modules/src/css/layout/text.ts","webpack:///../../node_modules/src/dom/text-container.ts","webpack:///../../node_modules/src/dom/replaced-elements/image-element-container.ts","webpack:///../../node_modules/src/dom/replaced-elements/canvas-element-container.ts","webpack:///../../node_modules/src/dom/replaced-elements/svg-element-container.ts","webpack:///../../node_modules/src/dom/elements/li-element-container.ts","webpack:///../../node_modules/src/dom/elements/ol-element-container.ts","webpack:///../../node_modules/src/dom/replaced-elements/input-element-container.ts","webpack:///../../node_modules/src/dom/elements/select-element-container.ts","webpack:///../../node_modules/src/dom/elements/textarea-element-container.ts","webpack:///../../node_modules/src/dom/replaced-elements/iframe-element-container.ts","webpack:///../../node_modules/src/dom/node-parser.ts","webpack:///../../node_modules/src/css/types/functions/counter.ts","webpack:///../../node_modules/src/dom/document-cloner.ts","webpack:///../../node_modules/src/core/cache-storage.ts","webpack:///../../node_modules/src/render/vector.ts","webpack:///../../node_modules/src/render/bezier-curve.ts","webpack:///../../node_modules/src/render/bound-curves.ts","webpack:///../../node_modules/src/render/effects.ts","webpack:///../../node_modules/src/render/path.ts","webpack:///../../node_modules/src/render/stacking-context.ts","webpack:///../../node_modules/src/render/border.ts","webpack:///../../node_modules/src/render/box-sizing.ts","webpack:///../../node_modules/src/render/background.ts","webpack:///../../node_modules/src/core/util.ts","webpack:///../../node_modules/src/render/font-metrics.ts","webpack:///../../node_modules/src/render/renderer.ts","webpack:///../../node_modules/src/render/canvas/canvas-renderer.ts","webpack:///../../node_modules/src/render/canvas/foreignobject-renderer.ts","webpack:///../../node_modules/src/core/logger.ts","webpack:///../../node_modules/src/core/context.ts","webpack:///../../node_modules/src/index.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n 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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || from);\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","import {Context} from '../../core/context';\n\nexport class Bounds {\n constructor(readonly left: number, readonly top: number, readonly width: number, readonly height: number) {}\n\n add(x: number, y: number, w: number, h: number): Bounds {\n return new Bounds(this.left + x, this.top + y, this.width + w, this.height + h);\n }\n\n static fromClientRect(context: Context, clientRect: ClientRect): Bounds {\n return new Bounds(\n clientRect.left + context.windowBounds.left,\n clientRect.top + context.windowBounds.top,\n clientRect.width,\n clientRect.height\n );\n }\n\n static fromDOMRectList(context: Context, domRectList: DOMRectList): Bounds {\n const domRect = Array.from(domRectList).find((rect) => rect.width !== 0);\n return domRect\n ? new Bounds(\n domRect.left + context.windowBounds.left,\n domRect.top + context.windowBounds.top,\n domRect.width,\n domRect.height\n )\n : Bounds.EMPTY;\n }\n\n static EMPTY = new Bounds(0, 0, 0, 0);\n}\n\nexport const parseBounds = (context: Context, node: Element): Bounds => {\n return Bounds.fromClientRect(context, node.getBoundingClientRect());\n};\n\nexport const parseDocumentSize = (document: Document): Bounds => {\n const body = document.body;\n const documentElement = document.documentElement;\n\n if (!body || !documentElement) {\n throw new Error(`Unable to get document size`);\n }\n const width = Math.max(\n Math.max(body.scrollWidth, documentElement.scrollWidth),\n Math.max(body.offsetWidth, documentElement.offsetWidth),\n Math.max(body.clientWidth, documentElement.clientWidth)\n );\n\n const height = Math.max(\n Math.max(body.scrollHeight, documentElement.scrollHeight),\n Math.max(body.offsetHeight, documentElement.offsetHeight),\n Math.max(body.clientHeight, documentElement.clientHeight)\n );\n\n return new Bounds(0, 0, width, height);\n};\n","export const toCodePoints = (str: string): number[] => {\n const codePoints = [];\n let i = 0;\n const length = str.length;\n while (i < length) {\n const value = str.charCodeAt(i++);\n if (value >= 0xd800 && value <= 0xdbff && i < length) {\n const extra = str.charCodeAt(i++);\n if ((extra & 0xfc00) === 0xdc00) {\n codePoints.push(((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000);\n } else {\n codePoints.push(value);\n i--;\n }\n } else {\n codePoints.push(value);\n }\n }\n return codePoints;\n};\n\nexport const fromCodePoint = (...codePoints: number[]): string => {\n if (String.fromCodePoint) {\n return String.fromCodePoint(...codePoints);\n }\n\n const length = codePoints.length;\n if (!length) {\n return '';\n }\n\n const codeUnits = [];\n\n let index = -1;\n let result = '';\n while (++index < length) {\n let codePoint = codePoints[index];\n if (codePoint <= 0xffff) {\n codeUnits.push(codePoint);\n } else {\n codePoint -= 0x10000;\n codeUnits.push((codePoint >> 10) + 0xd800, (codePoint % 0x400) + 0xdc00);\n }\n if (index + 1 === length || codeUnits.length > 0x4000) {\n result += String.fromCharCode(...codeUnits);\n codeUnits.length = 0;\n }\n }\n return result;\n};\n\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\n// Use a lookup table to find the index.\nconst lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\nfor (let i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\n\nexport const decode = (base64: string): ArrayBuffer | number[] => {\n let bufferLength = base64.length * 0.75,\n len = base64.length,\n i,\n p = 0,\n encoded1,\n encoded2,\n encoded3,\n encoded4;\n\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n const buffer =\n typeof ArrayBuffer !== 'undefined' &&\n typeof Uint8Array !== 'undefined' &&\n typeof Uint8Array.prototype.slice !== 'undefined'\n ? new ArrayBuffer(bufferLength)\n : new Array(bufferLength);\n const bytes = Array.isArray(buffer) ? buffer : new Uint8Array(buffer);\n\n for (i = 0; i < len; i += 4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i + 1)];\n encoded3 = lookup[base64.charCodeAt(i + 2)];\n encoded4 = lookup[base64.charCodeAt(i + 3)];\n\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n\n return buffer;\n};\n\nexport const polyUint16Array = (buffer: number[]): number[] => {\n const length = buffer.length;\n const bytes = [];\n for (let i = 0; i < length; i += 2) {\n bytes.push((buffer[i + 1] << 8) | buffer[i]);\n }\n return bytes;\n};\n\nexport const polyUint32Array = (buffer: number[]): number[] => {\n const length = buffer.length;\n const bytes = [];\n for (let i = 0; i < length; i += 4) {\n bytes.push((buffer[i + 3] << 24) | (buffer[i + 2] << 16) | (buffer[i + 1] << 8) | buffer[i]);\n }\n return bytes;\n};\n","const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\n// Use a lookup table to find the index.\nconst lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\nfor (let i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\n\nexport const decode = (base64: string): ArrayBuffer | number[] => {\n let bufferLength = base64.length * 0.75,\n len = base64.length,\n i,\n p = 0,\n encoded1,\n encoded2,\n encoded3,\n encoded4;\n\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n const buffer =\n typeof ArrayBuffer !== 'undefined' &&\n typeof Uint8Array !== 'undefined' &&\n typeof Uint8Array.prototype.slice !== 'undefined'\n ? new ArrayBuffer(bufferLength)\n : new Array(bufferLength);\n const bytes = Array.isArray(buffer) ? buffer : new Uint8Array(buffer);\n\n for (i = 0; i < len; i += 4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i + 1)];\n encoded3 = lookup[base64.charCodeAt(i + 2)];\n encoded4 = lookup[base64.charCodeAt(i + 3)];\n\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n\n return buffer;\n};\n\nexport const polyUint16Array = (buffer: number[]): number[] => {\n const length = buffer.length;\n const bytes = [];\n for (let i = 0; i < length; i += 2) {\n bytes.push((buffer[i + 1] << 8) | buffer[i]);\n }\n return bytes;\n};\n\nexport const polyUint32Array = (buffer: number[]): number[] => {\n const length = buffer.length;\n const bytes = [];\n for (let i = 0; i < length; i += 4) {\n bytes.push((buffer[i + 3] << 24) | (buffer[i + 2] << 16) | (buffer[i + 1] << 8) | buffer[i]);\n }\n return bytes;\n};\n","import {decode, polyUint16Array, polyUint32Array} from './Util';\n\nexport type int = number;\n\n/** Shift size for getting the index-2 table offset. */\nexport const UTRIE2_SHIFT_2 = 5;\n\n/** Shift size for getting the index-1 table offset. */\nexport const UTRIE2_SHIFT_1 = 6 + 5;\n\n/**\n * Shift size for shifting left the index array values.\n * Increases possible data size with 16-bit index values at the cost\n * of compactability.\n * This requires data blocks to be aligned by UTRIE2_DATA_GRANULARITY.\n */\nexport const UTRIE2_INDEX_SHIFT = 2;\n\n/**\n * Difference between the two shift sizes,\n * for getting an index-1 offset from an index-2 offset. 6=11-5\n */\nexport const UTRIE2_SHIFT_1_2 = UTRIE2_SHIFT_1 - UTRIE2_SHIFT_2;\n\n/**\n * The part of the index-2 table for U+D800..U+DBFF stores values for\n * lead surrogate code _units_ not code _points_.\n * Values for lead surrogate code _points_ are indexed with this portion of the table.\n * Length=32=0x20=0x400>>UTRIE2_SHIFT_2. (There are 1024=0x400 lead surrogates.)\n */\nexport const UTRIE2_LSCP_INDEX_2_OFFSET = 0x10000 >> UTRIE2_SHIFT_2;\n\n/** Number of entries in a data block. 32=0x20 */\nexport const UTRIE2_DATA_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_2;\n/** Mask for getting the lower bits for the in-data-block offset. */\nexport const UTRIE2_DATA_MASK = UTRIE2_DATA_BLOCK_LENGTH - 1;\n\nexport const UTRIE2_LSCP_INDEX_2_LENGTH = 0x400 >> UTRIE2_SHIFT_2;\n/** Count the lengths of both BMP pieces. 2080=0x820 */\nexport const UTRIE2_INDEX_2_BMP_LENGTH = UTRIE2_LSCP_INDEX_2_OFFSET + UTRIE2_LSCP_INDEX_2_LENGTH;\n/**\n * The 2-byte UTF-8 version of the index-2 table follows at offset 2080=0x820.\n * Length 32=0x20 for lead bytes C0..DF, regardless of UTRIE2_SHIFT_2.\n */\nexport const UTRIE2_UTF8_2B_INDEX_2_OFFSET = UTRIE2_INDEX_2_BMP_LENGTH;\nexport const UTRIE2_UTF8_2B_INDEX_2_LENGTH = 0x800 >> 6; /* U+0800 is the first code point after 2-byte UTF-8 */\n/**\n * The index-1 table, only used for supplementary code points, at offset 2112=0x840.\n * Variable length, for code points up to highStart, where the last single-value range starts.\n * Maximum length 512=0x200=0x100000>>UTRIE2_SHIFT_1.\n * (For 0x100000 supplementary code points U+10000..U+10ffff.)\n *\n * The part of the index-2 table for supplementary code points starts\n * after this index-1 table.\n *\n * Both the index-1 table and the following part of the index-2 table\n * are omitted completely if there is only BMP data.\n */\nexport const UTRIE2_INDEX_1_OFFSET = UTRIE2_UTF8_2B_INDEX_2_OFFSET + UTRIE2_UTF8_2B_INDEX_2_LENGTH;\n\n/**\n * Number of index-1 entries for the BMP. 32=0x20\n * This part of the index-1 table is omitted from the serialized form.\n */\nexport const UTRIE2_OMITTED_BMP_INDEX_1_LENGTH = 0x10000 >> UTRIE2_SHIFT_1;\n\n/** Number of entries in an index-2 block. 64=0x40 */\nexport const UTRIE2_INDEX_2_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_1_2;\n/** Mask for getting the lower bits for the in-index-2-block offset. */\nexport const UTRIE2_INDEX_2_MASK = UTRIE2_INDEX_2_BLOCK_LENGTH - 1;\n\nconst slice16 = (view: number[] | Uint16Array, start: number, end?: number) => {\n if (view.slice) {\n return view.slice(start, end);\n }\n\n return new Uint16Array(Array.prototype.slice.call(view, start, end));\n};\n\nconst slice32 = (view: number[] | Uint32Array, start: number, end?: number) => {\n if (view.slice) {\n return view.slice(start, end);\n }\n\n return new Uint32Array(Array.prototype.slice.call(view, start, end));\n};\n\nexport const createTrieFromBase64 = (base64: string, _byteLength: number): Trie => {\n const buffer = decode(base64);\n const view32 = Array.isArray(buffer) ? polyUint32Array(buffer) : new Uint32Array(buffer);\n const view16 = Array.isArray(buffer) ? polyUint16Array(buffer) : new Uint16Array(buffer);\n const headerLength = 24;\n\n const index = slice16(view16, headerLength / 2, view32[4] / 2);\n const data =\n view32[5] === 2\n ? slice16(view16, (headerLength + view32[4]) / 2)\n : slice32(view32, Math.ceil((headerLength + view32[4]) / 4));\n\n return new Trie(view32[0], view32[1], view32[2], view32[3], index, data);\n};\n\nexport class Trie {\n initialValue: int;\n errorValue: int;\n highStart: int;\n highValueIndex: int;\n index: Uint16Array | number[];\n data: Uint32Array | Uint16Array | number[];\n\n constructor(\n initialValue: int,\n errorValue: int,\n highStart: int,\n highValueIndex: int,\n index: Uint16Array | number[],\n data: Uint32Array | Uint16Array | number[]\n ) {\n this.initialValue = initialValue;\n this.errorValue = errorValue;\n this.highStart = highStart;\n this.highValueIndex = highValueIndex;\n this.index = index;\n this.data = data;\n }\n\n /**\n * Get the value for a code point as stored in the Trie.\n *\n * @param codePoint the code point\n * @return the value\n */\n get(codePoint: number): number {\n let ix;\n if (codePoint >= 0) {\n if (codePoint < 0x0d800 || (codePoint > 0x0dbff && codePoint <= 0x0ffff)) {\n // Ordinary BMP code point, excluding leading surrogates.\n // BMP uses a single level lookup. BMP index starts at offset 0 in the Trie2 index.\n // 16 bit data is stored in the index array itself.\n ix = this.index[codePoint >> UTRIE2_SHIFT_2];\n ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);\n return this.data[ix];\n }\n\n if (codePoint <= 0xffff) {\n // Lead Surrogate Code Point. A Separate index section is stored for\n // lead surrogate code units and code points.\n // The main index has the code unit data.\n // For this function, we need the code point data.\n // Note: this expression could be refactored for slightly improved efficiency, but\n // surrogate code points will be so rare in practice that it's not worth it.\n ix = this.index[UTRIE2_LSCP_INDEX_2_OFFSET + ((codePoint - 0xd800) >> UTRIE2_SHIFT_2)];\n ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);\n return this.data[ix];\n }\n\n if (codePoint < this.highStart) {\n // Supplemental code point, use two-level lookup.\n ix = UTRIE2_INDEX_1_OFFSET - UTRIE2_OMITTED_BMP_INDEX_1_LENGTH + (codePoint >> UTRIE2_SHIFT_1);\n ix = this.index[ix];\n ix += (codePoint >> UTRIE2_SHIFT_2) & UTRIE2_INDEX_2_MASK;\n ix = this.index[ix];\n ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);\n return this.data[ix];\n }\n if (codePoint <= 0x10ffff) {\n return this.data[this.highValueIndex];\n }\n }\n\n // Fall through. The code point is outside of the legal range of 0..0x10ffff.\n return this.errorValue;\n }\n}\n","const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\n// Use a lookup table to find the index.\nconst lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\nfor (let i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\n\nexport const encode = (arraybuffer: ArrayBuffer): string => {\n let bytes = new Uint8Array(arraybuffer),\n i,\n len = bytes.length,\n base64 = '';\n\n for (i = 0; i < len; i += 3) {\n base64 += chars[bytes[i] >> 2];\n base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\n base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\n base64 += chars[bytes[i + 2] & 63];\n }\n\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + '=';\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + '==';\n }\n\n return base64;\n};\n\nexport const decode = (base64: string): ArrayBuffer => {\n let bufferLength = base64.length * 0.75,\n len = base64.length,\n i,\n p = 0,\n encoded1,\n encoded2,\n encoded3,\n encoded4;\n\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n const arraybuffer = new ArrayBuffer(bufferLength),\n bytes = new Uint8Array(arraybuffer);\n\n for (i = 0; i < len; i += 4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i + 1)];\n encoded3 = lookup[base64.charCodeAt(i + 2)];\n encoded4 = lookup[base64.charCodeAt(i + 3)];\n\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n\n return arraybuffer;\n};\n","export const base64 =\n 'KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUA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sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB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AAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBh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BywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAE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QABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AH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eAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcA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ABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAE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QAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==';\nexport const byteLength = 39664;\n","'use strict';\n\nimport {createTrieFromBase64} from 'utrie';\nimport {base64, byteLength} from './linebreak-trie';\nimport {fromCodePoint, toCodePoints} from './Util';\n\nexport const LETTER_NUMBER_MODIFIER = 50;\n\n// Non-tailorable Line Breaking Classes\nconst BK = 1; // Cause a line break (after)\nconst CR = 2; // Cause a line break (after), except between CR and LF\nconst LF = 3; // Cause a line break (after)\nconst CM = 4; // Prohibit a line break between the character and the preceding character\nconst NL = 5; // Cause a line break (after)\nconst SG = 6; // Do not occur in well-formed text\nconst WJ = 7; // Prohibit line breaks before and after\nconst ZW = 8; // Provide a break opportunity\nconst GL = 9; // Prohibit line breaks before and after\nconst SP = 10; // Enable indirect line breaks\nconst ZWJ = 11; // Prohibit line breaks within joiner sequences\n// Break Opportunities\nconst B2 = 12; // Provide a line break opportunity before and after the character\nconst BA = 13; // Generally provide a line break opportunity after the character\nconst BB = 14; // Generally provide a line break opportunity before the character\nconst HY = 15; // Provide a line break opportunity after the character, except in numeric context\nconst CB = 16; // Provide a line break opportunity contingent on additional information\n// Characters Prohibiting Certain Breaks\nconst CL = 17; // Prohibit line breaks before\nconst CP = 18; // Prohibit line breaks before\nconst EX = 19; // Prohibit line breaks before\nconst IN = 20; // Allow only indirect line breaks between pairs\nconst NS = 21; // Allow only indirect line breaks before\nconst OP = 22; // Prohibit line breaks after\nconst QU = 23; // Act like they are both opening and closing\n// Numeric Context\nconst IS = 24; // Prevent breaks after any and before numeric\nconst NU = 25; // Form numeric expressions for line breaking purposes\nconst PO = 26; // Do not break following a numeric expression\nconst PR = 27; // Do not break in front of a numeric expression\nconst SY = 28; // Prevent a break before; and allow a break after\n// Other Characters\nconst AI = 29; // Act like AL when the resolvedEAW is N; otherwise; act as ID\nconst AL = 30; // Are alphabetic characters or symbols that are used with alphabetic characters\nconst CJ = 31; // Treat as NS or ID for strict or normal breaking.\nconst EB = 32; // Do not break from following Emoji Modifier\nconst EM = 33; // Do not break from preceding Emoji Base\nconst H2 = 34; // Form Korean syllable blocks\nconst H3 = 35; // Form Korean syllable blocks\nconst HL = 36; // Do not break around a following hyphen; otherwise act as Alphabetic\nconst ID = 37; // Break before or after; except in some numeric context\nconst JL = 38; // Form Korean syllable blocks\nconst JV = 39; // Form Korean syllable blocks\nconst JT = 40; // Form Korean syllable blocks\nconst RI = 41; // Keep pairs together. For pairs; break before and after other classes\nconst SA = 42; // Provide a line break opportunity contingent on additional, language-specific context analysis\nconst XX = 43; // Have as yet unknown line breaking behavior or unassigned code positions\n\nconst ea_OP = [0x2329, 0xff08];\n\nexport const classes: {[key: string]: number} = {\n BK,\n CR,\n LF,\n CM,\n NL,\n SG,\n WJ,\n ZW,\n GL,\n SP,\n ZWJ,\n B2,\n BA,\n BB,\n HY,\n CB,\n CL,\n CP,\n EX,\n IN,\n NS,\n OP,\n QU,\n IS,\n NU,\n PO,\n PR,\n SY,\n AI,\n AL,\n CJ,\n EB,\n EM,\n H2,\n H3,\n HL,\n ID,\n JL,\n JV,\n JT,\n RI,\n SA,\n XX,\n};\n\nexport const BREAK_MANDATORY = '!';\nexport const BREAK_NOT_ALLOWED = '×';\nexport const BREAK_ALLOWED = '÷';\nexport const UnicodeTrie = createTrieFromBase64(base64, byteLength);\n\nconst ALPHABETICS = [AL, HL];\nconst HARD_LINE_BREAKS = [BK, CR, LF, NL];\nconst SPACE = [SP, ZW];\nconst PREFIX_POSTFIX = [PR, PO];\nconst LINE_BREAKS = HARD_LINE_BREAKS.concat(SPACE);\nconst KOREAN_SYLLABLE_BLOCK = [JL, JV, JT, H2, H3];\nconst HYPHEN = [HY, BA];\n\nexport const codePointsToCharacterClasses = (\n codePoints: number[],\n lineBreak: string = 'strict'\n): [number[], number[], boolean[]] => {\n const types: number[] = [];\n const indices: number[] = [];\n const categories: boolean[] = [];\n codePoints.forEach((codePoint, index) => {\n let classType = UnicodeTrie.get(codePoint);\n if (classType > LETTER_NUMBER_MODIFIER) {\n categories.push(true);\n classType -= LETTER_NUMBER_MODIFIER;\n } else {\n categories.push(false);\n }\n\n if (['normal', 'auto', 'loose'].indexOf(lineBreak) !== -1) {\n // U+2010, – U+2013, 〜 U+301C, ゠ U+30A0\n if ([0x2010, 0x2013, 0x301c, 0x30a0].indexOf(codePoint) !== -1) {\n indices.push(index);\n return types.push(CB);\n }\n }\n\n if (classType === CM || classType === ZWJ) {\n // LB10 Treat any remaining combining mark or ZWJ as AL.\n if (index === 0) {\n indices.push(index);\n return types.push(AL);\n }\n\n // LB9 Do not break a combining character sequence; treat it as if it has the line breaking class of\n // the base character in all of the following rules. Treat ZWJ as if it were CM.\n const prev = types[index - 1];\n if (LINE_BREAKS.indexOf(prev) === -1) {\n indices.push(indices[index - 1]);\n return types.push(prev);\n }\n indices.push(index);\n return types.push(AL);\n }\n\n indices.push(index);\n\n if (classType === CJ) {\n return types.push(lineBreak === 'strict' ? NS : ID);\n }\n\n if (classType === SA) {\n return types.push(AL);\n }\n\n if (classType === AI) {\n return types.push(AL);\n }\n\n // For supplementary characters, a useful default is to treat characters in the range 10000..1FFFD as AL\n // and characters in the ranges 20000..2FFFD and 30000..3FFFD as ID, until the implementation can be revised\n // to take into account the actual line breaking properties for these characters.\n if (classType === XX) {\n if ((codePoint >= 0x20000 && codePoint <= 0x2fffd) || (codePoint >= 0x30000 && codePoint <= 0x3fffd)) {\n return types.push(ID);\n } else {\n return types.push(AL);\n }\n }\n\n types.push(classType);\n });\n\n return [indices, types, categories];\n};\n\nconst isAdjacentWithSpaceIgnored = (\n a: number[] | number,\n b: number,\n currentIndex: number,\n classTypes: number[]\n): boolean => {\n const current = classTypes[currentIndex];\n if (Array.isArray(a) ? a.indexOf(current) !== -1 : a === current) {\n let i = currentIndex;\n while (i <= classTypes.length) {\n i++;\n let next = classTypes[i];\n\n if (next === b) {\n return true;\n }\n\n if (next !== SP) {\n break;\n }\n }\n }\n\n if (current === SP) {\n let i = currentIndex;\n\n while (i > 0) {\n i--;\n const prev = classTypes[i];\n\n if (Array.isArray(a) ? a.indexOf(prev) !== -1 : a === prev) {\n let n = currentIndex;\n while (n <= classTypes.length) {\n n++;\n let next = classTypes[n];\n\n if (next === b) {\n return true;\n }\n\n if (next !== SP) {\n break;\n }\n }\n }\n\n if (prev !== SP) {\n break;\n }\n }\n }\n return false;\n};\n\nconst previousNonSpaceClassType = (currentIndex: number, classTypes: number[]): number => {\n let i = currentIndex;\n while (i >= 0) {\n let type = classTypes[i];\n if (type === SP) {\n i--;\n } else {\n return type;\n }\n }\n return 0;\n};\n\nexport type BREAK_OPPORTUNITIES = typeof BREAK_NOT_ALLOWED | typeof BREAK_ALLOWED | typeof BREAK_MANDATORY;\n\nconst _lineBreakAtIndex = (\n codePoints: number[],\n classTypes: number[],\n indicies: number[],\n index: number,\n forbiddenBreaks?: boolean[]\n): BREAK_OPPORTUNITIES => {\n if (indicies[index] === 0) {\n return BREAK_NOT_ALLOWED;\n }\n\n let currentIndex = index - 1;\n if (Array.isArray(forbiddenBreaks) && forbiddenBreaks[currentIndex] === true) {\n return BREAK_NOT_ALLOWED;\n }\n\n let beforeIndex = currentIndex - 1;\n let afterIndex = currentIndex + 1;\n let current = classTypes[currentIndex];\n\n // LB4 Always break after hard line breaks.\n // LB5 Treat CR followed by LF, as well as CR, LF, and NL as hard line breaks.\n let before = beforeIndex >= 0 ? classTypes[beforeIndex] : 0;\n let next = classTypes[afterIndex];\n\n if (current === CR && next === LF) {\n return BREAK_NOT_ALLOWED;\n }\n\n if (HARD_LINE_BREAKS.indexOf(current) !== -1) {\n return BREAK_MANDATORY;\n }\n\n // LB6 Do not break before hard line breaks.\n if (HARD_LINE_BREAKS.indexOf(next) !== -1) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB7 Do not break before spaces or zero width space.\n if (SPACE.indexOf(next) !== -1) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB8 Break before any character following a zero-width space, even if one or more spaces intervene.\n if (previousNonSpaceClassType(currentIndex, classTypes) === ZW) {\n return BREAK_ALLOWED;\n }\n\n // LB8a Do not break after a zero width joiner.\n if (UnicodeTrie.get(codePoints[currentIndex]) === ZWJ) {\n return BREAK_NOT_ALLOWED;\n }\n\n // zwj emojis\n if ((current === EB || current === EM) && UnicodeTrie.get(codePoints[afterIndex]) === ZWJ) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB11 Do not break before or after Word joiner and related characters.\n if (current === WJ || next === WJ) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB12 Do not break after NBSP and related characters.\n if (current === GL) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB12a Do not break before NBSP and related characters, except after spaces and hyphens.\n if ([SP, BA, HY].indexOf(current) === -1 && next === GL) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB13 Do not break before ‘]’ or ‘!’ or ‘;’ or ‘/’, even after spaces.\n if ([CL, CP, EX, IS, SY].indexOf(next) !== -1) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB14 Do not break after ‘[’, even after spaces.\n if (previousNonSpaceClassType(currentIndex, classTypes) === OP) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB15 Do not break within ‘”[’, even with intervening spaces.\n if (isAdjacentWithSpaceIgnored(QU, OP, currentIndex, classTypes)) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB16 Do not break between closing punctuation and a nonstarter (lb=NS), even with intervening spaces.\n if (isAdjacentWithSpaceIgnored([CL, CP], NS, currentIndex, classTypes)) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB17 Do not break within ‘——’, even with intervening spaces.\n if (isAdjacentWithSpaceIgnored(B2, B2, currentIndex, classTypes)) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB18 Break after spaces.\n if (current === SP) {\n return BREAK_ALLOWED;\n }\n\n // LB19 Do not break before or after quotation marks, such as ‘ ” ’.\n if (current === QU || next === QU) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB20 Break before and after unresolved CB.\n if (next === CB || current === CB) {\n return BREAK_ALLOWED;\n }\n\n // LB21 Do not break before hyphen-minus, other hyphens, fixed-width spaces, small kana, and other non-starters, or after acute accents.\n if ([BA, HY, NS].indexOf(next) !== -1 || current === BB) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB21a Don't break after Hebrew + Hyphen.\n if (before === HL && HYPHEN.indexOf(current) !== -1) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB21b Don’t break between Solidus and Hebrew letters.\n if (current === SY && next === HL) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB22 Do not break before ellipsis.\n if (next === IN) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB23 Do not break between digits and letters.\n if ((ALPHABETICS.indexOf(next) !== -1 && current === NU) || (ALPHABETICS.indexOf(current) !== -1 && next === NU)) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB23a Do not break between numeric prefixes and ideographs, or between ideographs and numeric postfixes.\n if (\n (current === PR && [ID, EB, EM].indexOf(next) !== -1) ||\n ([ID, EB, EM].indexOf(current) !== -1 && next === PO)\n ) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB24 Do not break between numeric prefix/postfix and letters, or between letters and prefix/postfix.\n if (\n (ALPHABETICS.indexOf(current) !== -1 && PREFIX_POSTFIX.indexOf(next) !== -1) ||\n (PREFIX_POSTFIX.indexOf(current) !== -1 && ALPHABETICS.indexOf(next) !== -1)\n ) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB25 Do not break between the following pairs of classes relevant to numbers:\n if (\n // (PR | PO) × ( OP | HY )? NU\n ([PR, PO].indexOf(current) !== -1 &&\n (next === NU || ([OP, HY].indexOf(next) !== -1 && classTypes[afterIndex + 1] === NU))) ||\n // ( OP | HY ) × NU\n ([OP, HY].indexOf(current) !== -1 && next === NU) ||\n // NU ×\t(NU | SY | IS)\n (current === NU && [NU, SY, IS].indexOf(next) !== -1)\n ) {\n return BREAK_NOT_ALLOWED;\n }\n\n // NU (NU | SY | IS)* × (NU | SY | IS | CL | CP)\n if ([NU, SY, IS, CL, CP].indexOf(next) !== -1) {\n let prevIndex = currentIndex;\n while (prevIndex >= 0) {\n let type = classTypes[prevIndex];\n if (type === NU) {\n return BREAK_NOT_ALLOWED;\n } else if ([SY, IS].indexOf(type) !== -1) {\n prevIndex--;\n } else {\n break;\n }\n }\n }\n\n // NU (NU | SY | IS)* (CL | CP)? × (PO | PR))\n if ([PR, PO].indexOf(next) !== -1) {\n let prevIndex = [CL, CP].indexOf(current) !== -1 ? beforeIndex : currentIndex;\n while (prevIndex >= 0) {\n let type = classTypes[prevIndex];\n if (type === NU) {\n return BREAK_NOT_ALLOWED;\n } else if ([SY, IS].indexOf(type) !== -1) {\n prevIndex--;\n } else {\n break;\n }\n }\n }\n\n // LB26 Do not break a Korean syllable.\n if (\n (JL === current && [JL, JV, H2, H3].indexOf(next) !== -1) ||\n ([JV, H2].indexOf(current) !== -1 && [JV, JT].indexOf(next) !== -1) ||\n ([JT, H3].indexOf(current) !== -1 && next === JT)\n ) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB27 Treat a Korean Syllable Block the same as ID.\n if (\n (KOREAN_SYLLABLE_BLOCK.indexOf(current) !== -1 && [IN, PO].indexOf(next) !== -1) ||\n (KOREAN_SYLLABLE_BLOCK.indexOf(next) !== -1 && current === PR)\n ) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB28 Do not break between alphabetics (“at”).\n if (ALPHABETICS.indexOf(current) !== -1 && ALPHABETICS.indexOf(next) !== -1) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB29 Do not break between numeric punctuation and alphabetics (“e.g.”).\n if (current === IS && ALPHABETICS.indexOf(next) !== -1) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB30 Do not break between letters, numbers, or ordinary symbols and opening or closing parentheses.\n if (\n (ALPHABETICS.concat(NU).indexOf(current) !== -1 &&\n next === OP &&\n ea_OP.indexOf(codePoints[afterIndex]) === -1) ||\n (ALPHABETICS.concat(NU).indexOf(next) !== -1 && current === CP)\n ) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB30a Break between two regional indicator symbols if and only if there are an even number of regional\n // indicators preceding the position of the break.\n if (current === RI && next === RI) {\n let i = indicies[currentIndex];\n let count = 1;\n while (i > 0) {\n i--;\n if (classTypes[i] === RI) {\n count++;\n } else {\n break;\n }\n }\n if (count % 2 !== 0) {\n return BREAK_NOT_ALLOWED;\n }\n }\n\n // LB30b Do not break between an emoji base and an emoji modifier.\n if (current === EB && next === EM) {\n return BREAK_NOT_ALLOWED;\n }\n\n return BREAK_ALLOWED;\n};\n\nexport const lineBreakAtIndex = (codePoints: number[], index: number): BREAK_OPPORTUNITIES => {\n // LB2 Never break at the start of text.\n if (index === 0) {\n return BREAK_NOT_ALLOWED;\n }\n\n // LB3 Always break at the end of text.\n if (index >= codePoints.length) {\n return BREAK_MANDATORY;\n }\n\n const [indices, classTypes] = codePointsToCharacterClasses(codePoints);\n\n return _lineBreakAtIndex(codePoints, classTypes, indices, index);\n};\n\nexport type LINE_BREAK = 'auto' | 'normal' | 'strict';\nexport type WORD_BREAK = 'normal' | 'break-all' | 'break-word' | 'keep-all';\n\ninterface IOptions {\n lineBreak?: LINE_BREAK;\n wordBreak?: WORD_BREAK;\n}\n\nconst cssFormattedClasses = (codePoints: number[], options?: IOptions): [number[], number[], boolean[] | undefined] => {\n if (!options) {\n options = {lineBreak: 'normal', wordBreak: 'normal'};\n }\n let [indicies, classTypes, isLetterNumber] = codePointsToCharacterClasses(codePoints, options.lineBreak);\n\n if (options.wordBreak === 'break-all' || options.wordBreak === 'break-word') {\n classTypes = classTypes.map((type) => ([NU, AL, SA].indexOf(type) !== -1 ? ID : type));\n }\n\n const forbiddenBreakpoints =\n options.wordBreak === 'keep-all'\n ? isLetterNumber.map((letterNumber, i) => {\n return letterNumber && codePoints[i] >= 0x4e00 && codePoints[i] <= 0x9fff;\n })\n : undefined;\n\n return [indicies, classTypes, forbiddenBreakpoints];\n};\n\nexport const inlineBreakOpportunities = (str: string, options?: IOptions): string => {\n const codePoints = toCodePoints(str);\n let output = BREAK_NOT_ALLOWED;\n const [indicies, classTypes, forbiddenBreakpoints] = cssFormattedClasses(codePoints, options);\n\n codePoints.forEach((codePoint, i) => {\n output +=\n fromCodePoint(codePoint) +\n (i >= codePoints.length - 1\n ? BREAK_MANDATORY\n : _lineBreakAtIndex(codePoints, classTypes, indicies, i + 1, forbiddenBreakpoints));\n });\n\n return output;\n};\n\nclass Break {\n private readonly codePoints: number[];\n readonly required: boolean;\n readonly start: number;\n readonly end: number;\n\n constructor(codePoints: number[], lineBreak: string, start: number, end: number) {\n this.codePoints = codePoints;\n this.required = lineBreak === BREAK_MANDATORY;\n this.start = start;\n this.end = end;\n }\n\n slice(): string {\n return fromCodePoint(...this.codePoints.slice(this.start, this.end));\n }\n}\n\nexport type LineBreak =\n | {\n done: true;\n value: null;\n }\n | {\n done: false;\n value: Break;\n };\n\ninterface ILineBreakIterator {\n next: () => LineBreak;\n}\n\nexport const LineBreaker = (str: string, options?: IOptions): ILineBreakIterator => {\n const codePoints = toCodePoints(str);\n const [indicies, classTypes, forbiddenBreakpoints] = cssFormattedClasses(codePoints, options);\n const length = codePoints.length;\n let lastEnd = 0;\n let nextIndex = 0;\n\n return {\n next: () => {\n if (nextIndex >= length) {\n return {done: true, value: null};\n }\n let lineBreak = BREAK_NOT_ALLOWED;\n while (\n nextIndex < length &&\n (lineBreak = _lineBreakAtIndex(codePoints, classTypes, indicies, ++nextIndex, forbiddenBreakpoints)) ===\n BREAK_NOT_ALLOWED\n ) {}\n\n if (lineBreak !== BREAK_NOT_ALLOWED || nextIndex === length) {\n const value = new Break(codePoints, lineBreak, lastEnd, nextIndex);\n lastEnd = nextIndex;\n return {value, done: false};\n }\n\n return {done: true, value: null};\n },\n };\n};\n","// https://www.w3.org/TR/css-syntax-3\n\nimport {fromCodePoint, toCodePoints} from 'css-line-break';\n\nexport const enum TokenType {\n STRING_TOKEN,\n BAD_STRING_TOKEN,\n LEFT_PARENTHESIS_TOKEN,\n RIGHT_PARENTHESIS_TOKEN,\n COMMA_TOKEN,\n HASH_TOKEN,\n DELIM_TOKEN,\n AT_KEYWORD_TOKEN,\n PREFIX_MATCH_TOKEN,\n DASH_MATCH_TOKEN,\n INCLUDE_MATCH_TOKEN,\n LEFT_CURLY_BRACKET_TOKEN,\n RIGHT_CURLY_BRACKET_TOKEN,\n SUFFIX_MATCH_TOKEN,\n SUBSTRING_MATCH_TOKEN,\n DIMENSION_TOKEN,\n PERCENTAGE_TOKEN,\n NUMBER_TOKEN,\n FUNCTION,\n FUNCTION_TOKEN,\n IDENT_TOKEN,\n COLUMN_TOKEN,\n URL_TOKEN,\n BAD_URL_TOKEN,\n CDC_TOKEN,\n CDO_TOKEN,\n COLON_TOKEN,\n SEMICOLON_TOKEN,\n LEFT_SQUARE_BRACKET_TOKEN,\n RIGHT_SQUARE_BRACKET_TOKEN,\n UNICODE_RANGE_TOKEN,\n WHITESPACE_TOKEN,\n EOF_TOKEN\n}\n\ninterface IToken {\n type: TokenType;\n}\n\nexport interface Token extends IToken {\n type:\n | TokenType.BAD_URL_TOKEN\n | TokenType.BAD_STRING_TOKEN\n | TokenType.LEFT_PARENTHESIS_TOKEN\n | TokenType.RIGHT_PARENTHESIS_TOKEN\n | TokenType.COMMA_TOKEN\n | TokenType.SUBSTRING_MATCH_TOKEN\n | TokenType.PREFIX_MATCH_TOKEN\n | TokenType.SUFFIX_MATCH_TOKEN\n | TokenType.COLON_TOKEN\n | TokenType.SEMICOLON_TOKEN\n | TokenType.LEFT_SQUARE_BRACKET_TOKEN\n | TokenType.RIGHT_SQUARE_BRACKET_TOKEN\n | TokenType.LEFT_CURLY_BRACKET_TOKEN\n | TokenType.RIGHT_CURLY_BRACKET_TOKEN\n | TokenType.DASH_MATCH_TOKEN\n | TokenType.INCLUDE_MATCH_TOKEN\n | TokenType.COLUMN_TOKEN\n | TokenType.WHITESPACE_TOKEN\n | TokenType.CDC_TOKEN\n | TokenType.CDO_TOKEN\n | TokenType.EOF_TOKEN;\n}\n\nexport interface StringValueToken extends IToken {\n type:\n | TokenType.STRING_TOKEN\n | TokenType.DELIM_TOKEN\n | TokenType.FUNCTION_TOKEN\n | TokenType.IDENT_TOKEN\n | TokenType.URL_TOKEN\n | TokenType.AT_KEYWORD_TOKEN;\n value: string;\n}\n\nexport interface HashToken extends IToken {\n type: TokenType.HASH_TOKEN;\n flags: number;\n value: string;\n}\n\nexport interface NumberValueToken extends IToken {\n type: TokenType.PERCENTAGE_TOKEN | TokenType.NUMBER_TOKEN;\n flags: number;\n number: number;\n}\n\nexport interface DimensionToken extends IToken {\n type: TokenType.DIMENSION_TOKEN;\n flags: number;\n unit: string;\n number: number;\n}\n\nexport interface UnicodeRangeToken extends IToken {\n type: TokenType.UNICODE_RANGE_TOKEN;\n start: number;\n end: number;\n}\n\nexport type CSSToken = Token | StringValueToken | NumberValueToken | DimensionToken | UnicodeRangeToken | HashToken;\n\nexport const FLAG_UNRESTRICTED = 1 << 0;\nexport const FLAG_ID = 1 << 1;\nexport const FLAG_INTEGER = 1 << 2;\nexport const FLAG_NUMBER = 1 << 3;\n\nconst LINE_FEED = 0x000a;\nconst SOLIDUS = 0x002f;\nconst REVERSE_SOLIDUS = 0x005c;\nconst CHARACTER_TABULATION = 0x0009;\nconst SPACE = 0x0020;\nconst QUOTATION_MARK = 0x0022;\nconst EQUALS_SIGN = 0x003d;\nconst NUMBER_SIGN = 0x0023;\nconst DOLLAR_SIGN = 0x0024;\nconst PERCENTAGE_SIGN = 0x0025;\nconst APOSTROPHE = 0x0027;\nconst LEFT_PARENTHESIS = 0x0028;\nconst RIGHT_PARENTHESIS = 0x0029;\nconst LOW_LINE = 0x005f;\nconst HYPHEN_MINUS = 0x002d;\nconst EXCLAMATION_MARK = 0x0021;\nconst LESS_THAN_SIGN = 0x003c;\nconst GREATER_THAN_SIGN = 0x003e;\nconst COMMERCIAL_AT = 0x0040;\nconst LEFT_SQUARE_BRACKET = 0x005b;\nconst RIGHT_SQUARE_BRACKET = 0x005d;\nconst CIRCUMFLEX_ACCENT = 0x003d;\nconst LEFT_CURLY_BRACKET = 0x007b;\nconst QUESTION_MARK = 0x003f;\nconst RIGHT_CURLY_BRACKET = 0x007d;\nconst VERTICAL_LINE = 0x007c;\nconst TILDE = 0x007e;\nconst CONTROL = 0x0080;\nconst REPLACEMENT_CHARACTER = 0xfffd;\nconst ASTERISK = 0x002a;\nconst PLUS_SIGN = 0x002b;\nconst COMMA = 0x002c;\nconst COLON = 0x003a;\nconst SEMICOLON = 0x003b;\nconst FULL_STOP = 0x002e;\nconst NULL = 0x0000;\nconst BACKSPACE = 0x0008;\nconst LINE_TABULATION = 0x000b;\nconst SHIFT_OUT = 0x000e;\nconst INFORMATION_SEPARATOR_ONE = 0x001f;\nconst DELETE = 0x007f;\nconst EOF = -1;\nconst ZERO = 0x0030;\nconst a = 0x0061;\nconst e = 0x0065;\nconst f = 0x0066;\nconst u = 0x0075;\nconst z = 0x007a;\nconst A = 0x0041;\nconst E = 0x0045;\nconst F = 0x0046;\nconst U = 0x0055;\nconst Z = 0x005a;\n\nconst isDigit = (codePoint: number) => codePoint >= ZERO && codePoint <= 0x0039;\nconst isSurrogateCodePoint = (codePoint: number) => codePoint >= 0xd800 && codePoint <= 0xdfff;\nconst isHex = (codePoint: number) =>\n isDigit(codePoint) || (codePoint >= A && codePoint <= F) || (codePoint >= a && codePoint <= f);\nconst isLowerCaseLetter = (codePoint: number) => codePoint >= a && codePoint <= z;\nconst isUpperCaseLetter = (codePoint: number) => codePoint >= A && codePoint <= Z;\nconst isLetter = (codePoint: number) => isLowerCaseLetter(codePoint) || isUpperCaseLetter(codePoint);\nconst isNonASCIICodePoint = (codePoint: number) => codePoint >= CONTROL;\nconst isWhiteSpace = (codePoint: number): boolean =>\n codePoint === LINE_FEED || codePoint === CHARACTER_TABULATION || codePoint === SPACE;\nconst isNameStartCodePoint = (codePoint: number): boolean =>\n isLetter(codePoint) || isNonASCIICodePoint(codePoint) || codePoint === LOW_LINE;\nconst isNameCodePoint = (codePoint: number): boolean =>\n isNameStartCodePoint(codePoint) || isDigit(codePoint) || codePoint === HYPHEN_MINUS;\nconst isNonPrintableCodePoint = (codePoint: number): boolean => {\n return (\n (codePoint >= NULL && codePoint <= BACKSPACE) ||\n codePoint === LINE_TABULATION ||\n (codePoint >= SHIFT_OUT && codePoint <= INFORMATION_SEPARATOR_ONE) ||\n codePoint === DELETE\n );\n};\nconst isValidEscape = (c1: number, c2: number): boolean => {\n if (c1 !== REVERSE_SOLIDUS) {\n return false;\n }\n\n return c2 !== LINE_FEED;\n};\nconst isIdentifierStart = (c1: number, c2: number, c3: number): boolean => {\n if (c1 === HYPHEN_MINUS) {\n return isNameStartCodePoint(c2) || isValidEscape(c2, c3);\n } else if (isNameStartCodePoint(c1)) {\n return true;\n } else if (c1 === REVERSE_SOLIDUS && isValidEscape(c1, c2)) {\n return true;\n }\n return false;\n};\n\nconst isNumberStart = (c1: number, c2: number, c3: number): boolean => {\n if (c1 === PLUS_SIGN || c1 === HYPHEN_MINUS) {\n if (isDigit(c2)) {\n return true;\n }\n\n return c2 === FULL_STOP && isDigit(c3);\n }\n\n if (c1 === FULL_STOP) {\n return isDigit(c2);\n }\n\n return isDigit(c1);\n};\n\nconst stringToNumber = (codePoints: number[]): number => {\n let c = 0;\n let sign = 1;\n if (codePoints[c] === PLUS_SIGN || codePoints[c] === HYPHEN_MINUS) {\n if (codePoints[c] === HYPHEN_MINUS) {\n sign = -1;\n }\n c++;\n }\n\n const integers = [];\n\n while (isDigit(codePoints[c])) {\n integers.push(codePoints[c++]);\n }\n\n const int = integers.length ? parseInt(fromCodePoint(...integers), 10) : 0;\n\n if (codePoints[c] === FULL_STOP) {\n c++;\n }\n\n const fraction = [];\n while (isDigit(codePoints[c])) {\n fraction.push(codePoints[c++]);\n }\n\n const fracd = fraction.length;\n const frac = fracd ? parseInt(fromCodePoint(...fraction), 10) : 0;\n\n if (codePoints[c] === E || codePoints[c] === e) {\n c++;\n }\n\n let expsign = 1;\n\n if (codePoints[c] === PLUS_SIGN || codePoints[c] === HYPHEN_MINUS) {\n if (codePoints[c] === HYPHEN_MINUS) {\n expsign = -1;\n }\n c++;\n }\n\n const exponent = [];\n\n while (isDigit(codePoints[c])) {\n exponent.push(codePoints[c++]);\n }\n\n const exp = exponent.length ? parseInt(fromCodePoint(...exponent), 10) : 0;\n\n return sign * (int + frac * Math.pow(10, -fracd)) * Math.pow(10, expsign * exp);\n};\n\nconst LEFT_PARENTHESIS_TOKEN: Token = {\n type: TokenType.LEFT_PARENTHESIS_TOKEN\n};\nconst RIGHT_PARENTHESIS_TOKEN: Token = {\n type: TokenType.RIGHT_PARENTHESIS_TOKEN\n};\nconst COMMA_TOKEN: Token = {type: TokenType.COMMA_TOKEN};\nconst SUFFIX_MATCH_TOKEN: Token = {type: TokenType.SUFFIX_MATCH_TOKEN};\nconst PREFIX_MATCH_TOKEN: Token = {type: TokenType.PREFIX_MATCH_TOKEN};\nconst COLUMN_TOKEN: Token = {type: TokenType.COLUMN_TOKEN};\nconst DASH_MATCH_TOKEN: Token = {type: TokenType.DASH_MATCH_TOKEN};\nconst INCLUDE_MATCH_TOKEN: Token = {type: TokenType.INCLUDE_MATCH_TOKEN};\nconst LEFT_CURLY_BRACKET_TOKEN: Token = {\n type: TokenType.LEFT_CURLY_BRACKET_TOKEN\n};\nconst RIGHT_CURLY_BRACKET_TOKEN: Token = {\n type: TokenType.RIGHT_CURLY_BRACKET_TOKEN\n};\nconst SUBSTRING_MATCH_TOKEN: Token = {type: TokenType.SUBSTRING_MATCH_TOKEN};\nconst BAD_URL_TOKEN: Token = {type: TokenType.BAD_URL_TOKEN};\nconst BAD_STRING_TOKEN: Token = {type: TokenType.BAD_STRING_TOKEN};\nconst CDO_TOKEN: Token = {type: TokenType.CDO_TOKEN};\nconst CDC_TOKEN: Token = {type: TokenType.CDC_TOKEN};\nconst COLON_TOKEN: Token = {type: TokenType.COLON_TOKEN};\nconst SEMICOLON_TOKEN: Token = {type: TokenType.SEMICOLON_TOKEN};\nconst LEFT_SQUARE_BRACKET_TOKEN: Token = {\n type: TokenType.LEFT_SQUARE_BRACKET_TOKEN\n};\nconst RIGHT_SQUARE_BRACKET_TOKEN: Token = {\n type: TokenType.RIGHT_SQUARE_BRACKET_TOKEN\n};\nconst WHITESPACE_TOKEN: Token = {type: TokenType.WHITESPACE_TOKEN};\nexport const EOF_TOKEN: Token = {type: TokenType.EOF_TOKEN};\n\nexport class Tokenizer {\n private _value: number[];\n\n constructor() {\n this._value = [];\n }\n\n write(chunk: string): void {\n this._value = this._value.concat(toCodePoints(chunk));\n }\n\n read(): CSSToken[] {\n const tokens = [];\n let token = this.consumeToken();\n while (token !== EOF_TOKEN) {\n tokens.push(token);\n token = this.consumeToken();\n }\n return tokens;\n }\n\n private consumeToken(): CSSToken {\n const codePoint = this.consumeCodePoint();\n\n switch (codePoint) {\n case QUOTATION_MARK:\n return this.consumeStringToken(QUOTATION_MARK);\n case NUMBER_SIGN:\n const c1 = this.peekCodePoint(0);\n const c2 = this.peekCodePoint(1);\n const c3 = this.peekCodePoint(2);\n if (isNameCodePoint(c1) || isValidEscape(c2, c3)) {\n const flags = isIdentifierStart(c1, c2, c3) ? FLAG_ID : FLAG_UNRESTRICTED;\n const value = this.consumeName();\n\n return {type: TokenType.HASH_TOKEN, value, flags};\n }\n break;\n case DOLLAR_SIGN:\n if (this.peekCodePoint(0) === EQUALS_SIGN) {\n this.consumeCodePoint();\n return SUFFIX_MATCH_TOKEN;\n }\n break;\n case APOSTROPHE:\n return this.consumeStringToken(APOSTROPHE);\n case LEFT_PARENTHESIS:\n return LEFT_PARENTHESIS_TOKEN;\n case RIGHT_PARENTHESIS:\n return RIGHT_PARENTHESIS_TOKEN;\n case ASTERISK:\n if (this.peekCodePoint(0) === EQUALS_SIGN) {\n this.consumeCodePoint();\n return SUBSTRING_MATCH_TOKEN;\n }\n break;\n case PLUS_SIGN:\n if (isNumberStart(codePoint, this.peekCodePoint(0), this.peekCodePoint(1))) {\n this.reconsumeCodePoint(codePoint);\n return this.consumeNumericToken();\n }\n break;\n case COMMA:\n return COMMA_TOKEN;\n case HYPHEN_MINUS:\n const e1 = codePoint;\n const e2 = this.peekCodePoint(0);\n const e3 = this.peekCodePoint(1);\n\n if (isNumberStart(e1, e2, e3)) {\n this.reconsumeCodePoint(codePoint);\n return this.consumeNumericToken();\n }\n\n if (isIdentifierStart(e1, e2, e3)) {\n this.reconsumeCodePoint(codePoint);\n return this.consumeIdentLikeToken();\n }\n\n if (e2 === HYPHEN_MINUS && e3 === GREATER_THAN_SIGN) {\n this.consumeCodePoint();\n this.consumeCodePoint();\n return CDC_TOKEN;\n }\n break;\n\n case FULL_STOP:\n if (isNumberStart(codePoint, this.peekCodePoint(0), this.peekCodePoint(1))) {\n this.reconsumeCodePoint(codePoint);\n return this.consumeNumericToken();\n }\n break;\n case SOLIDUS:\n if (this.peekCodePoint(0) === ASTERISK) {\n this.consumeCodePoint();\n while (true) {\n let c = this.consumeCodePoint();\n if (c === ASTERISK) {\n c = this.consumeCodePoint();\n if (c === SOLIDUS) {\n return this.consumeToken();\n }\n }\n if (c === EOF) {\n return this.consumeToken();\n }\n }\n }\n break;\n case COLON:\n return COLON_TOKEN;\n case SEMICOLON:\n return SEMICOLON_TOKEN;\n case LESS_THAN_SIGN:\n if (\n this.peekCodePoint(0) === EXCLAMATION_MARK &&\n this.peekCodePoint(1) === HYPHEN_MINUS &&\n this.peekCodePoint(2) === HYPHEN_MINUS\n ) {\n this.consumeCodePoint();\n this.consumeCodePoint();\n return CDO_TOKEN;\n }\n break;\n case COMMERCIAL_AT:\n const a1 = this.peekCodePoint(0);\n const a2 = this.peekCodePoint(1);\n const a3 = this.peekCodePoint(2);\n if (isIdentifierStart(a1, a2, a3)) {\n const value = this.consumeName();\n return {type: TokenType.AT_KEYWORD_TOKEN, value};\n }\n break;\n case LEFT_SQUARE_BRACKET:\n return LEFT_SQUARE_BRACKET_TOKEN;\n case REVERSE_SOLIDUS:\n if (isValidEscape(codePoint, this.peekCodePoint(0))) {\n this.reconsumeCodePoint(codePoint);\n return this.consumeIdentLikeToken();\n }\n break;\n case RIGHT_SQUARE_BRACKET:\n return RIGHT_SQUARE_BRACKET_TOKEN;\n case CIRCUMFLEX_ACCENT:\n if (this.peekCodePoint(0) === EQUALS_SIGN) {\n this.consumeCodePoint();\n return PREFIX_MATCH_TOKEN;\n }\n break;\n case LEFT_CURLY_BRACKET:\n return LEFT_CURLY_BRACKET_TOKEN;\n case RIGHT_CURLY_BRACKET:\n return RIGHT_CURLY_BRACKET_TOKEN;\n case u:\n case U:\n const u1 = this.peekCodePoint(0);\n const u2 = this.peekCodePoint(1);\n if (u1 === PLUS_SIGN && (isHex(u2) || u2 === QUESTION_MARK)) {\n this.consumeCodePoint();\n this.consumeUnicodeRangeToken();\n }\n this.reconsumeCodePoint(codePoint);\n return this.consumeIdentLikeToken();\n case VERTICAL_LINE:\n if (this.peekCodePoint(0) === EQUALS_SIGN) {\n this.consumeCodePoint();\n return DASH_MATCH_TOKEN;\n }\n if (this.peekCodePoint(0) === VERTICAL_LINE) {\n this.consumeCodePoint();\n return COLUMN_TOKEN;\n }\n break;\n case TILDE:\n if (this.peekCodePoint(0) === EQUALS_SIGN) {\n this.consumeCodePoint();\n return INCLUDE_MATCH_TOKEN;\n }\n break;\n case EOF:\n return EOF_TOKEN;\n }\n\n if (isWhiteSpace(codePoint)) {\n this.consumeWhiteSpace();\n return WHITESPACE_TOKEN;\n }\n\n if (isDigit(codePoint)) {\n this.reconsumeCodePoint(codePoint);\n return this.consumeNumericToken();\n }\n\n if (isNameStartCodePoint(codePoint)) {\n this.reconsumeCodePoint(codePoint);\n return this.consumeIdentLikeToken();\n }\n\n return {type: TokenType.DELIM_TOKEN, value: fromCodePoint(codePoint)};\n }\n\n private consumeCodePoint(): number {\n const value = this._value.shift();\n\n return typeof value === 'undefined' ? -1 : value;\n }\n\n private reconsumeCodePoint(codePoint: number) {\n this._value.unshift(codePoint);\n }\n\n private peekCodePoint(delta: number): number {\n if (delta >= this._value.length) {\n return -1;\n }\n\n return this._value[delta];\n }\n\n private consumeUnicodeRangeToken(): UnicodeRangeToken {\n const digits = [];\n let codePoint = this.consumeCodePoint();\n while (isHex(codePoint) && digits.length < 6) {\n digits.push(codePoint);\n codePoint = this.consumeCodePoint();\n }\n let questionMarks = false;\n while (codePoint === QUESTION_MARK && digits.length < 6) {\n digits.push(codePoint);\n codePoint = this.consumeCodePoint();\n questionMarks = true;\n }\n\n if (questionMarks) {\n const start = parseInt(\n fromCodePoint(...digits.map((digit) => (digit === QUESTION_MARK ? ZERO : digit))),\n 16\n );\n const end = parseInt(fromCodePoint(...digits.map((digit) => (digit === QUESTION_MARK ? F : digit))), 16);\n return {type: TokenType.UNICODE_RANGE_TOKEN, start, end};\n }\n\n const start = parseInt(fromCodePoint(...digits), 16);\n if (this.peekCodePoint(0) === HYPHEN_MINUS && isHex(this.peekCodePoint(1))) {\n this.consumeCodePoint();\n codePoint = this.consumeCodePoint();\n const endDigits = [];\n while (isHex(codePoint) && endDigits.length < 6) {\n endDigits.push(codePoint);\n codePoint = this.consumeCodePoint();\n }\n const end = parseInt(fromCodePoint(...endDigits), 16);\n\n return {type: TokenType.UNICODE_RANGE_TOKEN, start, end};\n } else {\n return {type: TokenType.UNICODE_RANGE_TOKEN, start, end: start};\n }\n }\n\n private consumeIdentLikeToken(): StringValueToken | Token {\n const value = this.consumeName();\n if (value.toLowerCase() === 'url' && this.peekCodePoint(0) === LEFT_PARENTHESIS) {\n this.consumeCodePoint();\n return this.consumeUrlToken();\n } else if (this.peekCodePoint(0) === LEFT_PARENTHESIS) {\n this.consumeCodePoint();\n return {type: TokenType.FUNCTION_TOKEN, value};\n }\n\n return {type: TokenType.IDENT_TOKEN, value};\n }\n\n private consumeUrlToken(): StringValueToken | Token {\n const value = [];\n this.consumeWhiteSpace();\n\n if (this.peekCodePoint(0) === EOF) {\n return {type: TokenType.URL_TOKEN, value: ''};\n }\n\n const next = this.peekCodePoint(0);\n if (next === APOSTROPHE || next === QUOTATION_MARK) {\n const stringToken = this.consumeStringToken(this.consumeCodePoint());\n if (stringToken.type === TokenType.STRING_TOKEN) {\n this.consumeWhiteSpace();\n\n if (this.peekCodePoint(0) === EOF || this.peekCodePoint(0) === RIGHT_PARENTHESIS) {\n this.consumeCodePoint();\n return {type: TokenType.URL_TOKEN, value: stringToken.value};\n }\n }\n\n this.consumeBadUrlRemnants();\n return BAD_URL_TOKEN;\n }\n\n while (true) {\n const codePoint = this.consumeCodePoint();\n if (codePoint === EOF || codePoint === RIGHT_PARENTHESIS) {\n return {type: TokenType.URL_TOKEN, value: fromCodePoint(...value)};\n } else if (isWhiteSpace(codePoint)) {\n this.consumeWhiteSpace();\n if (this.peekCodePoint(0) === EOF || this.peekCodePoint(0) === RIGHT_PARENTHESIS) {\n this.consumeCodePoint();\n return {type: TokenType.URL_TOKEN, value: fromCodePoint(...value)};\n }\n this.consumeBadUrlRemnants();\n return BAD_URL_TOKEN;\n } else if (\n codePoint === QUOTATION_MARK ||\n codePoint === APOSTROPHE ||\n codePoint === LEFT_PARENTHESIS ||\n isNonPrintableCodePoint(codePoint)\n ) {\n this.consumeBadUrlRemnants();\n return BAD_URL_TOKEN;\n } else if (codePoint === REVERSE_SOLIDUS) {\n if (isValidEscape(codePoint, this.peekCodePoint(0))) {\n value.push(this.consumeEscapedCodePoint());\n } else {\n this.consumeBadUrlRemnants();\n return BAD_URL_TOKEN;\n }\n } else {\n value.push(codePoint);\n }\n }\n }\n\n private consumeWhiteSpace(): void {\n while (isWhiteSpace(this.peekCodePoint(0))) {\n this.consumeCodePoint();\n }\n }\n\n private consumeBadUrlRemnants(): void {\n while (true) {\n const codePoint = this.consumeCodePoint();\n if (codePoint === RIGHT_PARENTHESIS || codePoint === EOF) {\n return;\n }\n\n if (isValidEscape(codePoint, this.peekCodePoint(0))) {\n this.consumeEscapedCodePoint();\n }\n }\n }\n\n private consumeStringSlice(count: number): string {\n const SLICE_STACK_SIZE = 50000;\n let value = '';\n while (count > 0) {\n const amount = Math.min(SLICE_STACK_SIZE, count);\n value += fromCodePoint(...this._value.splice(0, amount));\n count -= amount;\n }\n this._value.shift();\n\n return value;\n }\n\n private consumeStringToken(endingCodePoint: number): StringValueToken | Token {\n let value = '';\n let i = 0;\n\n do {\n const codePoint = this._value[i];\n if (codePoint === EOF || codePoint === undefined || codePoint === endingCodePoint) {\n value += this.consumeStringSlice(i);\n return {type: TokenType.STRING_TOKEN, value};\n }\n\n if (codePoint === LINE_FEED) {\n this._value.splice(0, i);\n return BAD_STRING_TOKEN;\n }\n\n if (codePoint === REVERSE_SOLIDUS) {\n const next = this._value[i + 1];\n if (next !== EOF && next !== undefined) {\n if (next === LINE_FEED) {\n value += this.consumeStringSlice(i);\n i = -1;\n this._value.shift();\n } else if (isValidEscape(codePoint, next)) {\n value += this.consumeStringSlice(i);\n value += fromCodePoint(this.consumeEscapedCodePoint());\n i = -1;\n }\n }\n }\n\n i++;\n } while (true);\n }\n\n private consumeNumber() {\n const repr = [];\n let type = FLAG_INTEGER;\n let c1 = this.peekCodePoint(0);\n if (c1 === PLUS_SIGN || c1 === HYPHEN_MINUS) {\n repr.push(this.consumeCodePoint());\n }\n\n while (isDigit(this.peekCodePoint(0))) {\n repr.push(this.consumeCodePoint());\n }\n c1 = this.peekCodePoint(0);\n let c2 = this.peekCodePoint(1);\n if (c1 === FULL_STOP && isDigit(c2)) {\n repr.push(this.consumeCodePoint(), this.consumeCodePoint());\n type = FLAG_NUMBER;\n while (isDigit(this.peekCodePoint(0))) {\n repr.push(this.consumeCodePoint());\n }\n }\n\n c1 = this.peekCodePoint(0);\n c2 = this.peekCodePoint(1);\n const c3 = this.peekCodePoint(2);\n if ((c1 === E || c1 === e) && (((c2 === PLUS_SIGN || c2 === HYPHEN_MINUS) && isDigit(c3)) || isDigit(c2))) {\n repr.push(this.consumeCodePoint(), this.consumeCodePoint());\n type = FLAG_NUMBER;\n while (isDigit(this.peekCodePoint(0))) {\n repr.push(this.consumeCodePoint());\n }\n }\n\n return [stringToNumber(repr), type];\n }\n\n private consumeNumericToken(): NumberValueToken | DimensionToken {\n const [number, flags] = this.consumeNumber();\n const c1 = this.peekCodePoint(0);\n const c2 = this.peekCodePoint(1);\n const c3 = this.peekCodePoint(2);\n\n if (isIdentifierStart(c1, c2, c3)) {\n const unit = this.consumeName();\n return {type: TokenType.DIMENSION_TOKEN, number, flags, unit};\n }\n\n if (c1 === PERCENTAGE_SIGN) {\n this.consumeCodePoint();\n return {type: TokenType.PERCENTAGE_TOKEN, number, flags};\n }\n\n return {type: TokenType.NUMBER_TOKEN, number, flags};\n }\n\n private consumeEscapedCodePoint(): number {\n const codePoint = this.consumeCodePoint();\n\n if (isHex(codePoint)) {\n let hex = fromCodePoint(codePoint);\n while (isHex(this.peekCodePoint(0)) && hex.length < 6) {\n hex += fromCodePoint(this.consumeCodePoint());\n }\n\n if (isWhiteSpace(this.peekCodePoint(0))) {\n this.consumeCodePoint();\n }\n\n const hexCodePoint = parseInt(hex, 16);\n\n if (hexCodePoint === 0 || isSurrogateCodePoint(hexCodePoint) || hexCodePoint > 0x10ffff) {\n return REPLACEMENT_CHARACTER;\n }\n\n return hexCodePoint;\n }\n\n if (codePoint === EOF) {\n return REPLACEMENT_CHARACTER;\n }\n\n return codePoint;\n }\n\n private consumeName(): string {\n let result = '';\n while (true) {\n const codePoint = this.consumeCodePoint();\n if (isNameCodePoint(codePoint)) {\n result += fromCodePoint(codePoint);\n } else if (isValidEscape(codePoint, this.peekCodePoint(0))) {\n result += fromCodePoint(this.consumeEscapedCodePoint());\n } else {\n this.reconsumeCodePoint(codePoint);\n return result;\n }\n }\n }\n}\n","import {\n CSSToken,\n DimensionToken,\n EOF_TOKEN,\n NumberValueToken,\n StringValueToken,\n Tokenizer,\n TokenType\n} from './tokenizer';\n\nexport type CSSBlockType =\n | TokenType.LEFT_PARENTHESIS_TOKEN\n | TokenType.LEFT_SQUARE_BRACKET_TOKEN\n | TokenType.LEFT_CURLY_BRACKET_TOKEN;\n\nexport interface CSSBlock {\n type: CSSBlockType;\n values: CSSValue[];\n}\n\nexport interface CSSFunction {\n type: TokenType.FUNCTION;\n name: string;\n values: CSSValue[];\n}\n\nexport type CSSValue = CSSFunction | CSSToken | CSSBlock;\n\nexport class Parser {\n private _tokens: CSSToken[];\n\n constructor(tokens: CSSToken[]) {\n this._tokens = tokens;\n }\n\n static create(value: string): Parser {\n const tokenizer = new Tokenizer();\n tokenizer.write(value);\n return new Parser(tokenizer.read());\n }\n\n static parseValue(value: string): CSSValue {\n return Parser.create(value).parseComponentValue();\n }\n\n static parseValues(value: string): CSSValue[] {\n return Parser.create(value).parseComponentValues();\n }\n\n parseComponentValue(): CSSValue {\n let token = this.consumeToken();\n while (token.type === TokenType.WHITESPACE_TOKEN) {\n token = this.consumeToken();\n }\n\n if (token.type === TokenType.EOF_TOKEN) {\n throw new SyntaxError(`Error parsing CSS component value, unexpected EOF`);\n }\n\n this.reconsumeToken(token);\n const value = this.consumeComponentValue();\n\n do {\n token = this.consumeToken();\n } while (token.type === TokenType.WHITESPACE_TOKEN);\n\n if (token.type === TokenType.EOF_TOKEN) {\n return value;\n }\n\n throw new SyntaxError(`Error parsing CSS component value, multiple values found when expecting only one`);\n }\n\n parseComponentValues(): CSSValue[] {\n const values = [];\n while (true) {\n const value = this.consumeComponentValue();\n if (value.type === TokenType.EOF_TOKEN) {\n return values;\n }\n values.push(value);\n values.push();\n }\n }\n\n private consumeComponentValue(): CSSValue {\n const token = this.consumeToken();\n\n switch (token.type) {\n case TokenType.LEFT_CURLY_BRACKET_TOKEN:\n case TokenType.LEFT_SQUARE_BRACKET_TOKEN:\n case TokenType.LEFT_PARENTHESIS_TOKEN:\n return this.consumeSimpleBlock(token.type);\n case TokenType.FUNCTION_TOKEN:\n return this.consumeFunction(token);\n }\n\n return token;\n }\n\n private consumeSimpleBlock(type: CSSBlockType): CSSBlock {\n const block: CSSBlock = {type, values: []};\n\n let token = this.consumeToken();\n while (true) {\n if (token.type === TokenType.EOF_TOKEN || isEndingTokenFor(token, type)) {\n return block;\n }\n\n this.reconsumeToken(token);\n block.values.push(this.consumeComponentValue());\n token = this.consumeToken();\n }\n }\n\n private consumeFunction(functionToken: StringValueToken): CSSFunction {\n const cssFunction: CSSFunction = {\n name: functionToken.value,\n values: [],\n type: TokenType.FUNCTION\n };\n\n while (true) {\n const token = this.consumeToken();\n if (token.type === TokenType.EOF_TOKEN || token.type === TokenType.RIGHT_PARENTHESIS_TOKEN) {\n return cssFunction;\n }\n\n this.reconsumeToken(token);\n cssFunction.values.push(this.consumeComponentValue());\n }\n }\n\n private consumeToken(): CSSToken {\n const token = this._tokens.shift();\n return typeof token === 'undefined' ? EOF_TOKEN : token;\n }\n\n private reconsumeToken(token: CSSToken): void {\n this._tokens.unshift(token);\n }\n}\n\nexport const isDimensionToken = (token: CSSValue): token is DimensionToken => token.type === TokenType.DIMENSION_TOKEN;\nexport const isNumberToken = (token: CSSValue): token is NumberValueToken => token.type === TokenType.NUMBER_TOKEN;\nexport const isIdentToken = (token: CSSValue): token is StringValueToken => token.type === TokenType.IDENT_TOKEN;\nexport const isStringToken = (token: CSSValue): token is StringValueToken => token.type === TokenType.STRING_TOKEN;\nexport const isIdentWithValue = (token: CSSValue, value: string): boolean =>\n isIdentToken(token) && token.value === value;\n\nexport const nonWhiteSpace = (token: CSSValue): boolean => token.type !== TokenType.WHITESPACE_TOKEN;\nexport const nonFunctionArgSeparator = (token: CSSValue): boolean =>\n token.type !== TokenType.WHITESPACE_TOKEN && token.type !== TokenType.COMMA_TOKEN;\n\nexport const parseFunctionArgs = (tokens: CSSValue[]): CSSValue[][] => {\n const args: CSSValue[][] = [];\n let arg: CSSValue[] = [];\n tokens.forEach((token) => {\n if (token.type === TokenType.COMMA_TOKEN) {\n if (arg.length === 0) {\n throw new Error(`Error parsing function args, zero tokens for arg`);\n }\n args.push(arg);\n arg = [];\n return;\n }\n\n if (token.type !== TokenType.WHITESPACE_TOKEN) {\n arg.push(token);\n }\n });\n if (arg.length) {\n args.push(arg);\n }\n\n return args;\n};\n\nconst isEndingTokenFor = (token: CSSToken, type: CSSBlockType): boolean => {\n if (type === TokenType.LEFT_CURLY_BRACKET_TOKEN && token.type === TokenType.RIGHT_CURLY_BRACKET_TOKEN) {\n return true;\n }\n if (type === TokenType.LEFT_SQUARE_BRACKET_TOKEN && token.type === TokenType.RIGHT_SQUARE_BRACKET_TOKEN) {\n return true;\n }\n\n return type === TokenType.LEFT_PARENTHESIS_TOKEN && token.type === TokenType.RIGHT_PARENTHESIS_TOKEN;\n};\n","import {CSSValue} from '../syntax/parser';\nimport {DimensionToken, NumberValueToken, TokenType} from '../syntax/tokenizer';\n\nexport type Length = DimensionToken | NumberValueToken;\n\nexport const isLength = (token: CSSValue): token is Length =>\n token.type === TokenType.NUMBER_TOKEN || token.type === TokenType.DIMENSION_TOKEN;\n","import {DimensionToken, FLAG_INTEGER, NumberValueToken, TokenType} from '../syntax/tokenizer';\nimport {CSSValue, isDimensionToken} from '../syntax/parser';\nimport {isLength} from './length';\nexport type LengthPercentage = DimensionToken | NumberValueToken;\nexport type LengthPercentageTuple = [LengthPercentage] | [LengthPercentage, LengthPercentage];\n\nexport const isLengthPercentage = (token: CSSValue): token is LengthPercentage =>\n token.type === TokenType.PERCENTAGE_TOKEN || isLength(token);\nexport const parseLengthPercentageTuple = (tokens: LengthPercentage[]): LengthPercentageTuple =>\n tokens.length > 1 ? [tokens[0], tokens[1]] : [tokens[0]];\nexport const ZERO_LENGTH: NumberValueToken = {\n type: TokenType.NUMBER_TOKEN,\n number: 0,\n flags: FLAG_INTEGER\n};\n\nexport const FIFTY_PERCENT: NumberValueToken = {\n type: TokenType.PERCENTAGE_TOKEN,\n number: 50,\n flags: FLAG_INTEGER\n};\n\nexport const HUNDRED_PERCENT: NumberValueToken = {\n type: TokenType.PERCENTAGE_TOKEN,\n number: 100,\n flags: FLAG_INTEGER\n};\n\nexport const getAbsoluteValueForTuple = (\n tuple: LengthPercentageTuple,\n width: number,\n height: number\n): [number, number] => {\n const [x, y] = tuple;\n return [getAbsoluteValue(x, width), getAbsoluteValue(typeof y !== 'undefined' ? y : x, height)];\n};\nexport const getAbsoluteValue = (token: LengthPercentage, parent: number): number => {\n if (token.type === TokenType.PERCENTAGE_TOKEN) {\n return (token.number / 100) * parent;\n }\n\n if (isDimensionToken(token)) {\n switch (token.unit) {\n case 'rem':\n case 'em':\n return 16 * token.number; // TODO use correct font-size\n case 'px':\n default:\n return token.number;\n }\n }\n\n return token.number;\n};\n","import {CSSValue, isIdentToken} from '../syntax/parser';\nimport {TokenType} from '../syntax/tokenizer';\nimport {ITypeDescriptor} from '../ITypeDescriptor';\nimport {HUNDRED_PERCENT, ZERO_LENGTH} from './length-percentage';\nimport {GradientCorner} from './image';\nimport {Context} from '../../core/context';\n\nconst DEG = 'deg';\nconst GRAD = 'grad';\nconst RAD = 'rad';\nconst TURN = 'turn';\n\nexport const angle: ITypeDescriptor<number> = {\n name: 'angle',\n parse: (_context: Context, value: CSSValue): number => {\n if (value.type === TokenType.DIMENSION_TOKEN) {\n switch (value.unit) {\n case DEG:\n return (Math.PI * value.number) / 180;\n case GRAD:\n return (Math.PI / 200) * value.number;\n case RAD:\n return value.number;\n case TURN:\n return Math.PI * 2 * value.number;\n }\n }\n\n throw new Error(`Unsupported angle type`);\n }\n};\n\nexport const isAngle = (value: CSSValue): boolean => {\n if (value.type === TokenType.DIMENSION_TOKEN) {\n if (value.unit === DEG || value.unit === GRAD || value.unit === RAD || value.unit === TURN) {\n return true;\n }\n }\n return false;\n};\n\nexport const parseNamedSide = (tokens: CSSValue[]): number | GradientCorner => {\n const sideOrCorner = tokens\n .filter(isIdentToken)\n .map((ident) => ident.value)\n .join(' ');\n\n switch (sideOrCorner) {\n case 'to bottom right':\n case 'to right bottom':\n case 'left top':\n case 'top left':\n return [ZERO_LENGTH, ZERO_LENGTH];\n case 'to top':\n case 'bottom':\n return deg(0);\n case 'to bottom left':\n case 'to left bottom':\n case 'right top':\n case 'top right':\n return [ZERO_LENGTH, HUNDRED_PERCENT];\n case 'to right':\n case 'left':\n return deg(90);\n case 'to top left':\n case 'to left top':\n case 'right bottom':\n case 'bottom right':\n return [HUNDRED_PERCENT, HUNDRED_PERCENT];\n case 'to bottom':\n case 'top':\n return deg(180);\n case 'to top right':\n case 'to right top':\n case 'left bottom':\n case 'bottom left':\n return [HUNDRED_PERCENT, ZERO_LENGTH];\n case 'to left':\n case 'right':\n return deg(270);\n }\n\n return 0;\n};\n\nexport const deg = (deg: number): number => (Math.PI * deg) / 180;\n","import {CSSValue, nonFunctionArgSeparator, Parser} from '../syntax/parser';\nimport {TokenType} from '../syntax/tokenizer';\nimport {ITypeDescriptor} from '../ITypeDescriptor';\nimport {angle, deg} from './angle';\nimport {getAbsoluteValue, isLengthPercentage} from './length-percentage';\nimport {Context} from '../../core/context';\nexport type Color = number;\n\nexport const color: ITypeDescriptor<Color> = {\n name: 'color',\n parse: (context: Context, value: CSSValue): Color => {\n if (value.type === TokenType.FUNCTION) {\n const colorFunction = SUPPORTED_COLOR_FUNCTIONS[value.name];\n if (typeof colorFunction === 'undefined') {\n throw new Error(`Attempting to parse an unsupported color function \"${value.name}\"`);\n }\n return colorFunction(context, value.values);\n }\n\n if (value.type === TokenType.HASH_TOKEN) {\n if (value.value.length === 3) {\n const r = value.value.substring(0, 1);\n const g = value.value.substring(1, 2);\n const b = value.value.substring(2, 3);\n return pack(parseInt(r + r, 16), parseInt(g + g, 16), parseInt(b + b, 16), 1);\n }\n\n if (value.value.length === 4) {\n const r = value.value.substring(0, 1);\n const g = value.value.substring(1, 2);\n const b = value.value.substring(2, 3);\n const a = value.value.substring(3, 4);\n return pack(parseInt(r + r, 16), parseInt(g + g, 16), parseInt(b + b, 16), parseInt(a + a, 16) / 255);\n }\n\n if (value.value.length === 6) {\n const r = value.value.substring(0, 2);\n const g = value.value.substring(2, 4);\n const b = value.value.substring(4, 6);\n return pack(parseInt(r, 16), parseInt(g, 16), parseInt(b, 16), 1);\n }\n\n if (value.value.length === 8) {\n const r = value.value.substring(0, 2);\n const g = value.value.substring(2, 4);\n const b = value.value.substring(4, 6);\n const a = value.value.substring(6, 8);\n return pack(parseInt(r, 16), parseInt(g, 16), parseInt(b, 16), parseInt(a, 16) / 255);\n }\n }\n\n if (value.type === TokenType.IDENT_TOKEN) {\n const namedColor = COLORS[value.value.toUpperCase()];\n if (typeof namedColor !== 'undefined') {\n return namedColor;\n }\n }\n\n return COLORS.TRANSPARENT;\n }\n};\n\nexport const isTransparent = (color: Color): boolean => (0xff & color) === 0;\n\nexport const asString = (color: Color): string => {\n const alpha = 0xff & color;\n const blue = 0xff & (color >> 8);\n const green = 0xff & (color >> 16);\n const red = 0xff & (color >> 24);\n return alpha < 255 ? `rgba(${red},${green},${blue},${alpha / 255})` : `rgb(${red},${green},${blue})`;\n};\n\nexport const pack = (r: number, g: number, b: number, a: number): Color =>\n ((r << 24) | (g << 16) | (b << 8) | (Math.round(a * 255) << 0)) >>> 0;\n\nconst getTokenColorValue = (token: CSSValue, i: number): number => {\n if (token.type === TokenType.NUMBER_TOKEN) {\n return token.number;\n }\n\n if (token.type === TokenType.PERCENTAGE_TOKEN) {\n const max = i === 3 ? 1 : 255;\n return i === 3 ? (token.number / 100) * max : Math.round((token.number / 100) * max);\n }\n\n return 0;\n};\n\nconst rgb = (_context: Context, args: CSSValue[]): number => {\n const tokens = args.filter(nonFunctionArgSeparator);\n\n if (tokens.length === 3) {\n const [r, g, b] = tokens.map(getTokenColorValue);\n return pack(r, g, b, 1);\n }\n\n if (tokens.length === 4) {\n const [r, g, b, a] = tokens.map(getTokenColorValue);\n return pack(r, g, b, a);\n }\n\n return 0;\n};\n\nfunction hue2rgb(t1: number, t2: number, hue: number): number {\n if (hue < 0) {\n hue += 1;\n }\n if (hue >= 1) {\n hue -= 1;\n }\n\n if (hue < 1 / 6) {\n return (t2 - t1) * hue * 6 + t1;\n } else if (hue < 1 / 2) {\n return t2;\n } else if (hue < 2 / 3) {\n return (t2 - t1) * 6 * (2 / 3 - hue) + t1;\n } else {\n return t1;\n }\n}\n\nconst hsl = (context: Context, args: CSSValue[]): number => {\n const tokens = args.filter(nonFunctionArgSeparator);\n const [hue, saturation, lightness, alpha] = tokens;\n\n const h = (hue.type === TokenType.NUMBER_TOKEN ? deg(hue.number) : angle.parse(context, hue)) / (Math.PI * 2);\n const s = isLengthPercentage(saturation) ? saturation.number / 100 : 0;\n const l = isLengthPercentage(lightness) ? lightness.number / 100 : 0;\n const a = typeof alpha !== 'undefined' && isLengthPercentage(alpha) ? getAbsoluteValue(alpha, 1) : 1;\n\n if (s === 0) {\n return pack(l * 255, l * 255, l * 255, 1);\n }\n\n const t2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;\n\n const t1 = l * 2 - t2;\n const r = hue2rgb(t1, t2, h + 1 / 3);\n const g = hue2rgb(t1, t2, h);\n const b = hue2rgb(t1, t2, h - 1 / 3);\n return pack(r * 255, g * 255, b * 255, a);\n};\n\nconst SUPPORTED_COLOR_FUNCTIONS: {\n [key: string]: (context: Context, args: CSSValue[]) => number;\n} = {\n hsl: hsl,\n hsla: hsl,\n rgb: rgb,\n rgba: rgb\n};\n\nexport const parseColor = (context: Context, value: string): Color =>\n color.parse(context, Parser.create(value).parseComponentValue());\n\nexport const COLORS: {[key: string]: Color} = {\n ALICEBLUE: 0xf0f8ffff,\n ANTIQUEWHITE: 0xfaebd7ff,\n AQUA: 0x00ffffff,\n AQUAMARINE: 0x7fffd4ff,\n AZURE: 0xf0ffffff,\n BEIGE: 0xf5f5dcff,\n BISQUE: 0xffe4c4ff,\n BLACK: 0x000000ff,\n BLANCHEDALMOND: 0xffebcdff,\n BLUE: 0x0000ffff,\n BLUEVIOLET: 0x8a2be2ff,\n BROWN: 0xa52a2aff,\n BURLYWOOD: 0xdeb887ff,\n CADETBLUE: 0x5f9ea0ff,\n CHARTREUSE: 0x7fff00ff,\n CHOCOLATE: 0xd2691eff,\n CORAL: 0xff7f50ff,\n CORNFLOWERBLUE: 0x6495edff,\n CORNSILK: 0xfff8dcff,\n CRIMSON: 0xdc143cff,\n CYAN: 0x00ffffff,\n DARKBLUE: 0x00008bff,\n DARKCYAN: 0x008b8bff,\n DARKGOLDENROD: 0xb886bbff,\n DARKGRAY: 0xa9a9a9ff,\n DARKGREEN: 0x006400ff,\n DARKGREY: 0xa9a9a9ff,\n DARKKHAKI: 0xbdb76bff,\n DARKMAGENTA: 0x8b008bff,\n DARKOLIVEGREEN: 0x556b2fff,\n DARKORANGE: 0xff8c00ff,\n DARKORCHID: 0x9932ccff,\n DARKRED: 0x8b0000ff,\n DARKSALMON: 0xe9967aff,\n DARKSEAGREEN: 0x8fbc8fff,\n DARKSLATEBLUE: 0x483d8bff,\n DARKSLATEGRAY: 0x2f4f4fff,\n DARKSLATEGREY: 0x2f4f4fff,\n DARKTURQUOISE: 0x00ced1ff,\n DARKVIOLET: 0x9400d3ff,\n DEEPPINK: 0xff1493ff,\n DEEPSKYBLUE: 0x00bfffff,\n DIMGRAY: 0x696969ff,\n DIMGREY: 0x696969ff,\n DODGERBLUE: 0x1e90ffff,\n FIREBRICK: 0xb22222ff,\n FLORALWHITE: 0xfffaf0ff,\n FORESTGREEN: 0x228b22ff,\n FUCHSIA: 0xff00ffff,\n GAINSBORO: 0xdcdcdcff,\n GHOSTWHITE: 0xf8f8ffff,\n GOLD: 0xffd700ff,\n GOLDENROD: 0xdaa520ff,\n GRAY: 0x808080ff,\n GREEN: 0x008000ff,\n GREENYELLOW: 0xadff2fff,\n GREY: 0x808080ff,\n HONEYDEW: 0xf0fff0ff,\n HOTPINK: 0xff69b4ff,\n INDIANRED: 0xcd5c5cff,\n INDIGO: 0x4b0082ff,\n IVORY: 0xfffff0ff,\n KHAKI: 0xf0e68cff,\n LAVENDER: 0xe6e6faff,\n LAVENDERBLUSH: 0xfff0f5ff,\n LAWNGREEN: 0x7cfc00ff,\n LEMONCHIFFON: 0xfffacdff,\n LIGHTBLUE: 0xadd8e6ff,\n LIGHTCORAL: 0xf08080ff,\n LIGHTCYAN: 0xe0ffffff,\n LIGHTGOLDENRODYELLOW: 0xfafad2ff,\n LIGHTGRAY: 0xd3d3d3ff,\n LIGHTGREEN: 0x90ee90ff,\n LIGHTGREY: 0xd3d3d3ff,\n LIGHTPINK: 0xffb6c1ff,\n LIGHTSALMON: 0xffa07aff,\n LIGHTSEAGREEN: 0x20b2aaff,\n LIGHTSKYBLUE: 0x87cefaff,\n LIGHTSLATEGRAY: 0x778899ff,\n LIGHTSLATEGREY: 0x778899ff,\n LIGHTSTEELBLUE: 0xb0c4deff,\n LIGHTYELLOW: 0xffffe0ff,\n LIME: 0x00ff00ff,\n LIMEGREEN: 0x32cd32ff,\n LINEN: 0xfaf0e6ff,\n MAGENTA: 0xff00ffff,\n MAROON: 0x800000ff,\n MEDIUMAQUAMARINE: 0x66cdaaff,\n MEDIUMBLUE: 0x0000cdff,\n MEDIUMORCHID: 0xba55d3ff,\n MEDIUMPURPLE: 0x9370dbff,\n MEDIUMSEAGREEN: 0x3cb371ff,\n MEDIUMSLATEBLUE: 0x7b68eeff,\n MEDIUMSPRINGGREEN: 0x00fa9aff,\n MEDIUMTURQUOISE: 0x48d1ccff,\n MEDIUMVIOLETRED: 0xc71585ff,\n MIDNIGHTBLUE: 0x191970ff,\n MINTCREAM: 0xf5fffaff,\n MISTYROSE: 0xffe4e1ff,\n MOCCASIN: 0xffe4b5ff,\n NAVAJOWHITE: 0xffdeadff,\n NAVY: 0x000080ff,\n OLDLACE: 0xfdf5e6ff,\n OLIVE: 0x808000ff,\n OLIVEDRAB: 0x6b8e23ff,\n ORANGE: 0xffa500ff,\n ORANGERED: 0xff4500ff,\n ORCHID: 0xda70d6ff,\n PALEGOLDENROD: 0xeee8aaff,\n PALEGREEN: 0x98fb98ff,\n PALETURQUOISE: 0xafeeeeff,\n PALEVIOLETRED: 0xdb7093ff,\n PAPAYAWHIP: 0xffefd5ff,\n PEACHPUFF: 0xffdab9ff,\n PERU: 0xcd853fff,\n PINK: 0xffc0cbff,\n PLUM: 0xdda0ddff,\n POWDERBLUE: 0xb0e0e6ff,\n PURPLE: 0x800080ff,\n REBECCAPURPLE: 0x663399ff,\n RED: 0xff0000ff,\n ROSYBROWN: 0xbc8f8fff,\n ROYALBLUE: 0x4169e1ff,\n SADDLEBROWN: 0x8b4513ff,\n SALMON: 0xfa8072ff,\n SANDYBROWN: 0xf4a460ff,\n SEAGREEN: 0x2e8b57ff,\n SEASHELL: 0xfff5eeff,\n SIENNA: 0xa0522dff,\n SILVER: 0xc0c0c0ff,\n SKYBLUE: 0x87ceebff,\n SLATEBLUE: 0x6a5acdff,\n SLATEGRAY: 0x708090ff,\n SLATEGREY: 0x708090ff,\n SNOW: 0xfffafaff,\n SPRINGGREEN: 0x00ff7fff,\n STEELBLUE: 0x4682b4ff,\n TAN: 0xd2b48cff,\n TEAL: 0x008080ff,\n THISTLE: 0xd8bfd8ff,\n TOMATO: 0xff6347ff,\n TRANSPARENT: 0x00000000,\n TURQUOISE: 0x40e0d0ff,\n VIOLET: 0xee82eeff,\n WHEAT: 0xf5deb3ff,\n WHITE: 0xffffffff,\n WHITESMOKE: 0xf5f5f5ff,\n YELLOW: 0xffff00ff,\n YELLOWGREEN: 0x9acd32ff\n};\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isIdentToken} from '../syntax/parser';\nimport {Context} from '../../core/context';\nexport const enum BACKGROUND_CLIP {\n BORDER_BOX = 0,\n PADDING_BOX = 1,\n CONTENT_BOX = 2\n}\n\nexport type BackgroundClip = BACKGROUND_CLIP[];\n\nexport const backgroundClip: IPropertyListDescriptor<BackgroundClip> = {\n name: 'background-clip',\n initialValue: 'border-box',\n prefix: false,\n type: PropertyDescriptorParsingType.LIST,\n parse: (_context: Context, tokens: CSSValue[]): BackgroundClip => {\n return tokens.map((token) => {\n if (isIdentToken(token)) {\n switch (token.value) {\n case 'padding-box':\n return BACKGROUND_CLIP.PADDING_BOX;\n case 'content-box':\n return BACKGROUND_CLIP.CONTENT_BOX;\n }\n }\n return BACKGROUND_CLIP.BORDER_BOX;\n });\n }\n};\n","import {IPropertyTypeValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\n\nexport const backgroundColor: IPropertyTypeValueDescriptor = {\n name: `background-color`,\n initialValue: 'transparent',\n prefix: false,\n type: PropertyDescriptorParsingType.TYPE_VALUE,\n format: 'color'\n};\n","import {CSSValue} from '../../syntax/parser';\nimport {\n CSSRadialExtent,\n CSSRadialGradientImage,\n CSSRadialShape,\n GradientColorStop,\n GradientCorner,\n UnprocessedGradientColorStop\n} from '../image';\nimport {color as colorType} from '../color';\nimport {getAbsoluteValue, HUNDRED_PERCENT, isLengthPercentage, ZERO_LENGTH} from '../length-percentage';\nimport {Context} from '../../../core/context';\n\nexport const parseColorStop = (context: Context, args: CSSValue[]): UnprocessedGradientColorStop => {\n const color = colorType.parse(context, args[0]);\n const stop = args[1];\n return stop && isLengthPercentage(stop) ? {color, stop} : {color, stop: null};\n};\n\nexport const processColorStops = (stops: UnprocessedGradientColorStop[], lineLength: number): GradientColorStop[] => {\n const first = stops[0];\n const last = stops[stops.length - 1];\n if (first.stop === null) {\n first.stop = ZERO_LENGTH;\n }\n\n if (last.stop === null) {\n last.stop = HUNDRED_PERCENT;\n }\n\n const processStops: (number | null)[] = [];\n let previous = 0;\n for (let i = 0; i < stops.length; i++) {\n const stop = stops[i].stop;\n if (stop !== null) {\n const absoluteValue = getAbsoluteValue(stop, lineLength);\n if (absoluteValue > previous) {\n processStops.push(absoluteValue);\n } else {\n processStops.push(previous);\n }\n previous = absoluteValue;\n } else {\n processStops.push(null);\n }\n }\n\n let gapBegin = null;\n for (let i = 0; i < processStops.length; i++) {\n const stop = processStops[i];\n if (stop === null) {\n if (gapBegin === null) {\n gapBegin = i;\n }\n } else if (gapBegin !== null) {\n const gapLength = i - gapBegin;\n const beforeGap = processStops[gapBegin - 1] as number;\n const gapValue = (stop - beforeGap) / (gapLength + 1);\n for (let g = 1; g <= gapLength; g++) {\n processStops[gapBegin + g - 1] = gapValue * g;\n }\n gapBegin = null;\n }\n }\n\n return stops.map(({color}, i) => {\n return {color, stop: Math.max(Math.min(1, (processStops[i] as number) / lineLength), 0)};\n });\n};\n\nconst getAngleFromCorner = (corner: GradientCorner, width: number, height: number): number => {\n const centerX = width / 2;\n const centerY = height / 2;\n const x = getAbsoluteValue(corner[0], width) - centerX;\n const y = centerY - getAbsoluteValue(corner[1], height);\n\n return (Math.atan2(y, x) + Math.PI * 2) % (Math.PI * 2);\n};\n\nexport const calculateGradientDirection = (\n angle: number | GradientCorner,\n width: number,\n height: number\n): [number, number, number, number, number] => {\n const radian = typeof angle === 'number' ? angle : getAngleFromCorner(angle, width, height);\n\n const lineLength = Math.abs(width * Math.sin(radian)) + Math.abs(height * Math.cos(radian));\n\n const halfWidth = width / 2;\n const halfHeight = height / 2;\n const halfLineLength = lineLength / 2;\n\n const yDiff = Math.sin(radian - Math.PI / 2) * halfLineLength;\n const xDiff = Math.cos(radian - Math.PI / 2) * halfLineLength;\n\n return [lineLength, halfWidth - xDiff, halfWidth + xDiff, halfHeight - yDiff, halfHeight + yDiff];\n};\n\nconst distance = (a: number, b: number): number => Math.sqrt(a * a + b * b);\n\nconst findCorner = (width: number, height: number, x: number, y: number, closest: boolean): [number, number] => {\n const corners = [\n [0, 0],\n [0, height],\n [width, 0],\n [width, height]\n ];\n\n return corners.reduce(\n (stat, corner) => {\n const [cx, cy] = corner;\n const d = distance(x - cx, y - cy);\n if (closest ? d < stat.optimumDistance : d > stat.optimumDistance) {\n return {\n optimumCorner: corner,\n optimumDistance: d\n };\n }\n\n return stat;\n },\n {\n optimumDistance: closest ? Infinity : -Infinity,\n optimumCorner: null\n }\n ).optimumCorner as [number, number];\n};\n\nexport const calculateRadius = (\n gradient: CSSRadialGradientImage,\n x: number,\n y: number,\n width: number,\n height: number\n): [number, number] => {\n let rx = 0;\n let ry = 0;\n\n switch (gradient.size) {\n case CSSRadialExtent.CLOSEST_SIDE:\n // The ending shape is sized so that that it exactly meets the side of the gradient box closest to the gradient’s center.\n // If the shape is an ellipse, it exactly meets the closest side in each dimension.\n if (gradient.shape === CSSRadialShape.CIRCLE) {\n rx = ry = Math.min(Math.abs(x), Math.abs(x - width), Math.abs(y), Math.abs(y - height));\n } else if (gradient.shape === CSSRadialShape.ELLIPSE) {\n rx = Math.min(Math.abs(x), Math.abs(x - width));\n ry = Math.min(Math.abs(y), Math.abs(y - height));\n }\n break;\n\n case CSSRadialExtent.CLOSEST_CORNER:\n // The ending shape is sized so that that it passes through the corner of the gradient box closest to the gradient’s center.\n // If the shape is an ellipse, the ending shape is given the same aspect-ratio it would have if closest-side were specified.\n if (gradient.shape === CSSRadialShape.CIRCLE) {\n rx = ry = Math.min(\n distance(x, y),\n distance(x, y - height),\n distance(x - width, y),\n distance(x - width, y - height)\n );\n } else if (gradient.shape === CSSRadialShape.ELLIPSE) {\n // Compute the ratio ry/rx (which is to be the same as for \"closest-side\")\n const c = Math.min(Math.abs(y), Math.abs(y - height)) / Math.min(Math.abs(x), Math.abs(x - width));\n const [cx, cy] = findCorner(width, height, x, y, true);\n rx = distance(cx - x, (cy - y) / c);\n ry = c * rx;\n }\n break;\n\n case CSSRadialExtent.FARTHEST_SIDE:\n // Same as closest-side, except the ending shape is sized based on the farthest side(s)\n if (gradient.shape === CSSRadialShape.CIRCLE) {\n rx = ry = Math.max(Math.abs(x), Math.abs(x - width), Math.abs(y), Math.abs(y - height));\n } else if (gradient.shape === CSSRadialShape.ELLIPSE) {\n rx = Math.max(Math.abs(x), Math.abs(x - width));\n ry = Math.max(Math.abs(y), Math.abs(y - height));\n }\n break;\n\n case CSSRadialExtent.FARTHEST_CORNER:\n // Same as closest-corner, except the ending shape is sized based on the farthest corner.\n // If the shape is an ellipse, the ending shape is given the same aspect ratio it would have if farthest-side were specified.\n if (gradient.shape === CSSRadialShape.CIRCLE) {\n rx = ry = Math.max(\n distance(x, y),\n distance(x, y - height),\n distance(x - width, y),\n distance(x - width, y - height)\n );\n } else if (gradient.shape === CSSRadialShape.ELLIPSE) {\n // Compute the ratio ry/rx (which is to be the same as for \"farthest-side\")\n const c = Math.max(Math.abs(y), Math.abs(y - height)) / Math.max(Math.abs(x), Math.abs(x - width));\n const [cx, cy] = findCorner(width, height, x, y, false);\n rx = distance(cx - x, (cy - y) / c);\n ry = c * rx;\n }\n break;\n }\n\n if (Array.isArray(gradient.size)) {\n rx = getAbsoluteValue(gradient.size[0], width);\n ry = gradient.size.length === 2 ? getAbsoluteValue(gradient.size[1], height) : rx;\n }\n\n return [rx, ry];\n};\n","import {CSSValue, parseFunctionArgs} from '../../syntax/parser';\nimport {TokenType} from '../../syntax/tokenizer';\nimport {isAngle, angle as angleType, parseNamedSide, deg} from '../angle';\nimport {CSSImageType, CSSLinearGradientImage, GradientCorner, UnprocessedGradientColorStop} from '../image';\nimport {parseColorStop} from './gradient';\nimport {Context} from '../../../core/context';\n\nexport const linearGradient = (context: Context, tokens: CSSValue[]): CSSLinearGradientImage => {\n let angle: number | GradientCorner = deg(180);\n const stops: UnprocessedGradientColorStop[] = [];\n\n parseFunctionArgs(tokens).forEach((arg, i) => {\n if (i === 0) {\n const firstToken = arg[0];\n if (firstToken.type === TokenType.IDENT_TOKEN && firstToken.value === 'to') {\n angle = parseNamedSide(arg);\n return;\n } else if (isAngle(firstToken)) {\n angle = angleType.parse(context, firstToken);\n return;\n }\n }\n const colorStop = parseColorStop(context, arg);\n stops.push(colorStop);\n });\n\n return {angle, stops, type: CSSImageType.LINEAR_GRADIENT};\n};\n","import {CSSValue, parseFunctionArgs} from '../../syntax/parser';\nimport {CSSImageType, CSSLinearGradientImage, GradientCorner, UnprocessedGradientColorStop} from '../image';\nimport {TokenType} from '../../syntax/tokenizer';\nimport {isAngle, angle as angleType, parseNamedSide, deg} from '../angle';\nimport {parseColorStop} from './gradient';\nimport {Context} from '../../../core/context';\n\nexport const prefixLinearGradient = (context: Context, tokens: CSSValue[]): CSSLinearGradientImage => {\n let angle: number | GradientCorner = deg(180);\n const stops: UnprocessedGradientColorStop[] = [];\n\n parseFunctionArgs(tokens).forEach((arg, i) => {\n if (i === 0) {\n const firstToken = arg[0];\n if (\n firstToken.type === TokenType.IDENT_TOKEN &&\n ['top', 'left', 'right', 'bottom'].indexOf(firstToken.value) !== -1\n ) {\n angle = parseNamedSide(arg);\n return;\n } else if (isAngle(firstToken)) {\n angle = (angleType.parse(context, firstToken) + deg(270)) % deg(360);\n return;\n }\n }\n const colorStop = parseColorStop(context, arg);\n stops.push(colorStop);\n });\n\n return {\n angle,\n stops,\n type: CSSImageType.LINEAR_GRADIENT\n };\n};\n","import {CSSValue, isIdentToken, isNumberToken, nonFunctionArgSeparator, parseFunctionArgs} from '../../syntax/parser';\nimport {\n CSSImageType,\n CSSLinearGradientImage,\n CSSRadialExtent,\n CSSRadialGradientImage,\n CSSRadialShape,\n CSSRadialSize,\n UnprocessedGradientColorStop\n} from '../image';\nimport {deg} from '../angle';\nimport {TokenType} from '../../syntax/tokenizer';\nimport {color as colorType} from '../color';\nimport {HUNDRED_PERCENT, LengthPercentage, ZERO_LENGTH} from '../length-percentage';\nimport {Context} from '../../../core/context';\n\nexport const webkitGradient = (\n context: Context,\n tokens: CSSValue[]\n): CSSLinearGradientImage | CSSRadialGradientImage => {\n const angle = deg(180);\n const stops: UnprocessedGradientColorStop[] = [];\n let type = CSSImageType.LINEAR_GRADIENT;\n const shape: CSSRadialShape = CSSRadialShape.CIRCLE;\n const size: CSSRadialSize = CSSRadialExtent.FARTHEST_CORNER;\n const position: LengthPercentage[] = [];\n parseFunctionArgs(tokens).forEach((arg, i) => {\n const firstToken = arg[0];\n if (i === 0) {\n if (isIdentToken(firstToken) && firstToken.value === 'linear') {\n type = CSSImageType.LINEAR_GRADIENT;\n return;\n } else if (isIdentToken(firstToken) && firstToken.value === 'radial') {\n type = CSSImageType.RADIAL_GRADIENT;\n return;\n }\n }\n\n if (firstToken.type === TokenType.FUNCTION) {\n if (firstToken.name === 'from') {\n const color = colorType.parse(context, firstToken.values[0]);\n stops.push({stop: ZERO_LENGTH, color});\n } else if (firstToken.name === 'to') {\n const color = colorType.parse(context, firstToken.values[0]);\n stops.push({stop: HUNDRED_PERCENT, color});\n } else if (firstToken.name === 'color-stop') {\n const values = firstToken.values.filter(nonFunctionArgSeparator);\n if (values.length === 2) {\n const color = colorType.parse(context, values[1]);\n const stop = values[0];\n if (isNumberToken(stop)) {\n stops.push({\n stop: {type: TokenType.PERCENTAGE_TOKEN, number: stop.number * 100, flags: stop.flags},\n color\n });\n }\n }\n }\n }\n });\n\n return type === CSSImageType.LINEAR_GRADIENT\n ? {\n angle: (angle + deg(180)) % deg(360),\n stops,\n type\n }\n : {size, shape, stops, position, type};\n};\n","import {CSSValue, isIdentToken, parseFunctionArgs} from '../../syntax/parser';\nimport {\n CSSImageType,\n CSSRadialExtent,\n CSSRadialGradientImage,\n CSSRadialShape,\n CSSRadialSize,\n UnprocessedGradientColorStop\n} from '../image';\nimport {parseColorStop} from './gradient';\nimport {FIFTY_PERCENT, HUNDRED_PERCENT, isLengthPercentage, LengthPercentage, ZERO_LENGTH} from '../length-percentage';\nimport {isLength} from '../length';\nimport {Context} from '../../../core/context';\nexport const CLOSEST_SIDE = 'closest-side';\nexport const FARTHEST_SIDE = 'farthest-side';\nexport const CLOSEST_CORNER = 'closest-corner';\nexport const FARTHEST_CORNER = 'farthest-corner';\nexport const CIRCLE = 'circle';\nexport const ELLIPSE = 'ellipse';\nexport const COVER = 'cover';\nexport const CONTAIN = 'contain';\n\nexport const radialGradient = (context: Context, tokens: CSSValue[]): CSSRadialGradientImage => {\n let shape: CSSRadialShape = CSSRadialShape.CIRCLE;\n let size: CSSRadialSize = CSSRadialExtent.FARTHEST_CORNER;\n const stops: UnprocessedGradientColorStop[] = [];\n const position: LengthPercentage[] = [];\n parseFunctionArgs(tokens).forEach((arg, i) => {\n let isColorStop = true;\n if (i === 0) {\n let isAtPosition = false;\n isColorStop = arg.reduce((acc, token) => {\n if (isAtPosition) {\n if (isIdentToken(token)) {\n switch (token.value) {\n case 'center':\n position.push(FIFTY_PERCENT);\n return acc;\n case 'top':\n case 'left':\n position.push(ZERO_LENGTH);\n return acc;\n case 'right':\n case 'bottom':\n position.push(HUNDRED_PERCENT);\n return acc;\n }\n } else if (isLengthPercentage(token) || isLength(token)) {\n position.push(token);\n }\n } else if (isIdentToken(token)) {\n switch (token.value) {\n case CIRCLE:\n shape = CSSRadialShape.CIRCLE;\n return false;\n case ELLIPSE:\n shape = CSSRadialShape.ELLIPSE;\n return false;\n case 'at':\n isAtPosition = true;\n return false;\n case CLOSEST_SIDE:\n size = CSSRadialExtent.CLOSEST_SIDE;\n return false;\n case COVER:\n case FARTHEST_SIDE:\n size = CSSRadialExtent.FARTHEST_SIDE;\n return false;\n case CONTAIN:\n case CLOSEST_CORNER:\n size = CSSRadialExtent.CLOSEST_CORNER;\n return false;\n case FARTHEST_CORNER:\n size = CSSRadialExtent.FARTHEST_CORNER;\n return false;\n }\n } else if (isLength(token) || isLengthPercentage(token)) {\n if (!Array.isArray(size)) {\n size = [];\n }\n size.push(token);\n return false;\n }\n return acc;\n }, isColorStop);\n }\n\n if (isColorStop) {\n const colorStop = parseColorStop(context, arg);\n stops.push(colorStop);\n }\n });\n\n return {size, shape, stops, position, type: CSSImageType.RADIAL_GRADIENT};\n};\n","import {CSSValue, isIdentToken, parseFunctionArgs} from '../../syntax/parser';\nimport {\n CSSImageType,\n CSSRadialExtent,\n CSSRadialGradientImage,\n CSSRadialShape,\n CSSRadialSize,\n UnprocessedGradientColorStop\n} from '../image';\nimport {parseColorStop} from './gradient';\nimport {FIFTY_PERCENT, HUNDRED_PERCENT, isLengthPercentage, LengthPercentage, ZERO_LENGTH} from '../length-percentage';\nimport {isLength} from '../length';\nimport {\n CIRCLE,\n CLOSEST_CORNER,\n CLOSEST_SIDE,\n CONTAIN,\n COVER,\n ELLIPSE,\n FARTHEST_CORNER,\n FARTHEST_SIDE\n} from './radial-gradient';\nimport {Context} from '../../../core/context';\n\nexport const prefixRadialGradient = (context: Context, tokens: CSSValue[]): CSSRadialGradientImage => {\n let shape: CSSRadialShape = CSSRadialShape.CIRCLE;\n let size: CSSRadialSize = CSSRadialExtent.FARTHEST_CORNER;\n const stops: UnprocessedGradientColorStop[] = [];\n const position: LengthPercentage[] = [];\n\n parseFunctionArgs(tokens).forEach((arg, i) => {\n let isColorStop = true;\n if (i === 0) {\n isColorStop = arg.reduce((acc, token) => {\n if (isIdentToken(token)) {\n switch (token.value) {\n case 'center':\n position.push(FIFTY_PERCENT);\n return false;\n case 'top':\n case 'left':\n position.push(ZERO_LENGTH);\n return false;\n case 'right':\n case 'bottom':\n position.push(HUNDRED_PERCENT);\n return false;\n }\n } else if (isLengthPercentage(token) || isLength(token)) {\n position.push(token);\n return false;\n }\n\n return acc;\n }, isColorStop);\n } else if (i === 1) {\n isColorStop = arg.reduce((acc, token) => {\n if (isIdentToken(token)) {\n switch (token.value) {\n case CIRCLE:\n shape = CSSRadialShape.CIRCLE;\n return false;\n case ELLIPSE:\n shape = CSSRadialShape.ELLIPSE;\n return false;\n case CONTAIN:\n case CLOSEST_SIDE:\n size = CSSRadialExtent.CLOSEST_SIDE;\n return false;\n case FARTHEST_SIDE:\n size = CSSRadialExtent.FARTHEST_SIDE;\n return false;\n case CLOSEST_CORNER:\n size = CSSRadialExtent.CLOSEST_CORNER;\n return false;\n case COVER:\n case FARTHEST_CORNER:\n size = CSSRadialExtent.FARTHEST_CORNER;\n return false;\n }\n } else if (isLength(token) || isLengthPercentage(token)) {\n if (!Array.isArray(size)) {\n size = [];\n }\n size.push(token);\n return false;\n }\n\n return acc;\n }, isColorStop);\n }\n\n if (isColorStop) {\n const colorStop = parseColorStop(context, arg);\n stops.push(colorStop);\n }\n });\n\n return {size, shape, stops, position, type: CSSImageType.RADIAL_GRADIENT};\n};\n","import {CSSValue} from '../syntax/parser';\nimport {TokenType} from '../syntax/tokenizer';\nimport {Color} from './color';\nimport {linearGradient} from './functions/linear-gradient';\nimport {prefixLinearGradient} from './functions/-prefix-linear-gradient';\nimport {ITypeDescriptor} from '../ITypeDescriptor';\nimport {LengthPercentage} from './length-percentage';\nimport {webkitGradient} from './functions/-webkit-gradient';\nimport {radialGradient} from './functions/radial-gradient';\nimport {prefixRadialGradient} from './functions/-prefix-radial-gradient';\nimport {Context} from '../../core/context';\n\nexport const enum CSSImageType {\n URL,\n LINEAR_GRADIENT,\n RADIAL_GRADIENT\n}\n\nexport const isLinearGradient = (background: ICSSImage): background is CSSLinearGradientImage => {\n return background.type === CSSImageType.LINEAR_GRADIENT;\n};\n\nexport const isRadialGradient = (background: ICSSImage): background is CSSRadialGradientImage => {\n return background.type === CSSImageType.RADIAL_GRADIENT;\n};\n\nexport interface UnprocessedGradientColorStop {\n color: Color;\n stop: LengthPercentage | null;\n}\n\nexport interface GradientColorStop {\n color: Color;\n stop: number;\n}\n\nexport interface ICSSImage {\n type: CSSImageType;\n}\n\nexport interface CSSURLImage extends ICSSImage {\n url: string;\n type: CSSImageType.URL;\n}\n\n// interface ICSSGeneratedImage extends ICSSImage {}\n\nexport type GradientCorner = [LengthPercentage, LengthPercentage];\n\ninterface ICSSGradientImage extends ICSSImage {\n stops: UnprocessedGradientColorStop[];\n}\n\nexport interface CSSLinearGradientImage extends ICSSGradientImage {\n angle: number | GradientCorner;\n type: CSSImageType.LINEAR_GRADIENT;\n}\n\nexport const enum CSSRadialShape {\n CIRCLE,\n ELLIPSE\n}\n\nexport const enum CSSRadialExtent {\n CLOSEST_SIDE,\n FARTHEST_SIDE,\n CLOSEST_CORNER,\n FARTHEST_CORNER\n}\n\nexport type CSSRadialSize = CSSRadialExtent | LengthPercentage[];\n\nexport interface CSSRadialGradientImage extends ICSSGradientImage {\n type: CSSImageType.RADIAL_GRADIENT;\n shape: CSSRadialShape;\n size: CSSRadialSize;\n position: LengthPercentage[];\n}\n\nexport const image: ITypeDescriptor<ICSSImage> = {\n name: 'image',\n parse: (context: Context, value: CSSValue): ICSSImage => {\n if (value.type === TokenType.URL_TOKEN) {\n const image: CSSURLImage = {url: value.value, type: CSSImageType.URL};\n context.cache.addImage(value.value);\n return image;\n }\n\n if (value.type === TokenType.FUNCTION) {\n const imageFunction = SUPPORTED_IMAGE_FUNCTIONS[value.name];\n if (typeof imageFunction === 'undefined') {\n throw new Error(`Attempting to parse an unsupported image function \"${value.name}\"`);\n }\n return imageFunction(context, value.values);\n }\n\n throw new Error(`Unsupported image type ${value.type}`);\n }\n};\n\nexport function isSupportedImage(value: CSSValue): boolean {\n return (\n !(value.type === TokenType.IDENT_TOKEN && value.value === 'none') &&\n (value.type !== TokenType.FUNCTION || !!SUPPORTED_IMAGE_FUNCTIONS[value.name])\n );\n}\n\nconst SUPPORTED_IMAGE_FUNCTIONS: Record<string, (context: Context, args: CSSValue[]) => ICSSImage> = {\n 'linear-gradient': linearGradient,\n '-moz-linear-gradient': prefixLinearGradient,\n '-ms-linear-gradient': prefixLinearGradient,\n '-o-linear-gradient': prefixLinearGradient,\n '-webkit-linear-gradient': prefixLinearGradient,\n 'radial-gradient': radialGradient,\n '-moz-radial-gradient': prefixRadialGradient,\n '-ms-radial-gradient': prefixRadialGradient,\n '-o-radial-gradient': prefixRadialGradient,\n '-webkit-radial-gradient': prefixRadialGradient,\n '-webkit-gradient': webkitGradient\n};\n","import {TokenType} from '../syntax/tokenizer';\nimport {ICSSImage, image, isSupportedImage} from '../types/image';\nimport {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, nonFunctionArgSeparator} from '../syntax/parser';\nimport {Context} from '../../core/context';\n\nexport const backgroundImage: IPropertyListDescriptor<ICSSImage[]> = {\n name: 'background-image',\n initialValue: 'none',\n type: PropertyDescriptorParsingType.LIST,\n prefix: false,\n parse: (context: Context, tokens: CSSValue[]) => {\n if (tokens.length === 0) {\n return [];\n }\n\n const first = tokens[0];\n\n if (first.type === TokenType.IDENT_TOKEN && first.value === 'none') {\n return [];\n }\n\n return tokens\n .filter((value) => nonFunctionArgSeparator(value) && isSupportedImage(value))\n .map((value) => image.parse(context, value));\n }\n};\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isIdentToken} from '../syntax/parser';\nimport {Context} from '../../core/context';\n\nexport const enum BACKGROUND_ORIGIN {\n BORDER_BOX = 0,\n PADDING_BOX = 1,\n CONTENT_BOX = 2\n}\n\nexport type BackgroundOrigin = BACKGROUND_ORIGIN[];\n\nexport const backgroundOrigin: IPropertyListDescriptor<BackgroundOrigin> = {\n name: 'background-origin',\n initialValue: 'border-box',\n prefix: false,\n type: PropertyDescriptorParsingType.LIST,\n parse: (_context: Context, tokens: CSSValue[]): BackgroundOrigin => {\n return tokens.map((token) => {\n if (isIdentToken(token)) {\n switch (token.value) {\n case 'padding-box':\n return BACKGROUND_ORIGIN.PADDING_BOX;\n case 'content-box':\n return BACKGROUND_ORIGIN.CONTENT_BOX;\n }\n }\n return BACKGROUND_ORIGIN.BORDER_BOX;\n });\n }\n};\n","import {PropertyDescriptorParsingType, IPropertyListDescriptor} from '../IPropertyDescriptor';\nimport {CSSValue, parseFunctionArgs} from '../syntax/parser';\nimport {isLengthPercentage, LengthPercentageTuple, parseLengthPercentageTuple} from '../types/length-percentage';\nimport {Context} from '../../core/context';\nexport type BackgroundPosition = BackgroundImagePosition[];\n\nexport type BackgroundImagePosition = LengthPercentageTuple;\n\nexport const backgroundPosition: IPropertyListDescriptor<BackgroundPosition> = {\n name: 'background-position',\n initialValue: '0% 0%',\n type: PropertyDescriptorParsingType.LIST,\n prefix: false,\n parse: (_context: Context, tokens: CSSValue[]): BackgroundPosition => {\n return parseFunctionArgs(tokens)\n .map((values: CSSValue[]) => values.filter(isLengthPercentage))\n .map(parseLengthPercentageTuple);\n }\n};\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isIdentToken, parseFunctionArgs} from '../syntax/parser';\nimport {Context} from '../../core/context';\nexport type BackgroundRepeat = BACKGROUND_REPEAT[];\n\nexport const enum BACKGROUND_REPEAT {\n REPEAT = 0,\n NO_REPEAT = 1,\n REPEAT_X = 2,\n REPEAT_Y = 3\n}\n\nexport const backgroundRepeat: IPropertyListDescriptor<BackgroundRepeat> = {\n name: 'background-repeat',\n initialValue: 'repeat',\n prefix: false,\n type: PropertyDescriptorParsingType.LIST,\n parse: (_context: Context, tokens: CSSValue[]): BackgroundRepeat => {\n return parseFunctionArgs(tokens)\n .map((values) =>\n values\n .filter(isIdentToken)\n .map((token) => token.value)\n .join(' ')\n )\n .map(parseBackgroundRepeat);\n }\n};\n\nconst parseBackgroundRepeat = (value: string): BACKGROUND_REPEAT => {\n switch (value) {\n case 'no-repeat':\n return BACKGROUND_REPEAT.NO_REPEAT;\n case 'repeat-x':\n case 'repeat no-repeat':\n return BACKGROUND_REPEAT.REPEAT_X;\n case 'repeat-y':\n case 'no-repeat repeat':\n return BACKGROUND_REPEAT.REPEAT_Y;\n case 'repeat':\n default:\n return BACKGROUND_REPEAT.REPEAT;\n }\n};\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isIdentToken, parseFunctionArgs} from '../syntax/parser';\nimport {isLengthPercentage, LengthPercentage} from '../types/length-percentage';\nimport {StringValueToken} from '../syntax/tokenizer';\nimport {Context} from '../../core/context';\n\nexport enum BACKGROUND_SIZE {\n AUTO = 'auto',\n CONTAIN = 'contain',\n COVER = 'cover'\n}\n\nexport type BackgroundSizeInfo = LengthPercentage | StringValueToken;\nexport type BackgroundSize = BackgroundSizeInfo[][];\n\nexport const backgroundSize: IPropertyListDescriptor<BackgroundSize> = {\n name: 'background-size',\n initialValue: '0',\n prefix: false,\n type: PropertyDescriptorParsingType.LIST,\n parse: (_context: Context, tokens: CSSValue[]): BackgroundSize => {\n return parseFunctionArgs(tokens).map((values) => values.filter(isBackgroundSizeInfoToken));\n }\n};\n\nconst isBackgroundSizeInfoToken = (value: CSSValue): value is BackgroundSizeInfo =>\n isIdentToken(value) || isLengthPercentage(value);\n","import {IPropertyTypeValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nconst borderColorForSide = (side: string): IPropertyTypeValueDescriptor => ({\n name: `border-${side}-color`,\n initialValue: 'transparent',\n prefix: false,\n type: PropertyDescriptorParsingType.TYPE_VALUE,\n format: 'color'\n});\n\nexport const borderTopColor: IPropertyTypeValueDescriptor = borderColorForSide('top');\nexport const borderRightColor: IPropertyTypeValueDescriptor = borderColorForSide('right');\nexport const borderBottomColor: IPropertyTypeValueDescriptor = borderColorForSide('bottom');\nexport const borderLeftColor: IPropertyTypeValueDescriptor = borderColorForSide('left');\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue} from '../syntax/parser';\nimport {isLengthPercentage, LengthPercentageTuple, parseLengthPercentageTuple} from '../types/length-percentage';\nimport {Context} from '../../core/context';\nexport type BorderRadius = LengthPercentageTuple;\n\nconst borderRadiusForSide = (side: string): IPropertyListDescriptor<BorderRadius> => ({\n name: `border-radius-${side}`,\n initialValue: '0 0',\n prefix: false,\n type: PropertyDescriptorParsingType.LIST,\n parse: (_context: Context, tokens: CSSValue[]): BorderRadius =>\n parseLengthPercentageTuple(tokens.filter(isLengthPercentage))\n});\n\nexport const borderTopLeftRadius: IPropertyListDescriptor<BorderRadius> = borderRadiusForSide('top-left');\nexport const borderTopRightRadius: IPropertyListDescriptor<BorderRadius> = borderRadiusForSide('top-right');\nexport const borderBottomRightRadius: IPropertyListDescriptor<BorderRadius> = borderRadiusForSide('bottom-right');\nexport const borderBottomLeftRadius: IPropertyListDescriptor<BorderRadius> = borderRadiusForSide('bottom-left');\n","import {IPropertyIdentValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\nexport const enum BORDER_STYLE {\n NONE = 0,\n SOLID = 1,\n DASHED = 2,\n DOTTED = 3,\n DOUBLE = 4\n}\n\nconst borderStyleForSide = (side: string): IPropertyIdentValueDescriptor<BORDER_STYLE> => ({\n name: `border-${side}-style`,\n initialValue: 'solid',\n prefix: false,\n type: PropertyDescriptorParsingType.IDENT_VALUE,\n parse: (_context: Context, style: string): BORDER_STYLE => {\n switch (style) {\n case 'none':\n return BORDER_STYLE.NONE;\n case 'dashed':\n return BORDER_STYLE.DASHED;\n case 'dotted':\n return BORDER_STYLE.DOTTED;\n case 'double':\n return BORDER_STYLE.DOUBLE;\n }\n return BORDER_STYLE.SOLID;\n }\n});\n\nexport const borderTopStyle: IPropertyIdentValueDescriptor<BORDER_STYLE> = borderStyleForSide('top');\nexport const borderRightStyle: IPropertyIdentValueDescriptor<BORDER_STYLE> = borderStyleForSide('right');\nexport const borderBottomStyle: IPropertyIdentValueDescriptor<BORDER_STYLE> = borderStyleForSide('bottom');\nexport const borderLeftStyle: IPropertyIdentValueDescriptor<BORDER_STYLE> = borderStyleForSide('left');\n","import {IPropertyValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isDimensionToken} from '../syntax/parser';\nimport {Context} from '../../core/context';\nconst borderWidthForSide = (side: string): IPropertyValueDescriptor<number> => ({\n name: `border-${side}-width`,\n initialValue: '0',\n type: PropertyDescriptorParsingType.VALUE,\n prefix: false,\n parse: (_context: Context, token: CSSValue): number => {\n if (isDimensionToken(token)) {\n return token.number;\n }\n return 0;\n }\n});\n\nexport const borderTopWidth: IPropertyValueDescriptor<number> = borderWidthForSide('top');\nexport const borderRightWidth: IPropertyValueDescriptor<number> = borderWidthForSide('right');\nexport const borderBottomWidth: IPropertyValueDescriptor<number> = borderWidthForSide('bottom');\nexport const borderLeftWidth: IPropertyValueDescriptor<number> = borderWidthForSide('left');\n","import {IPropertyTypeValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\n\nexport const color: IPropertyTypeValueDescriptor = {\n name: `color`,\n initialValue: 'transparent',\n prefix: false,\n type: PropertyDescriptorParsingType.TYPE_VALUE,\n format: 'color'\n};\n","import {IPropertyIdentValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\n\nexport const enum DIRECTION {\n LTR = 0,\n RTL = 1\n}\n\nexport const direction: IPropertyIdentValueDescriptor<DIRECTION> = {\n name: 'direction',\n initialValue: 'ltr',\n prefix: false,\n type: PropertyDescriptorParsingType.IDENT_VALUE,\n parse: (_context: Context, direction: string) => {\n switch (direction) {\n case 'rtl':\n return DIRECTION.RTL;\n case 'ltr':\n default:\n return DIRECTION.LTR;\n }\n }\n};\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isIdentToken} from '../syntax/parser';\nimport {Context} from '../../core/context';\nexport const enum DISPLAY {\n NONE = 0,\n BLOCK = 1 << 1,\n INLINE = 1 << 2,\n RUN_IN = 1 << 3,\n FLOW = 1 << 4,\n FLOW_ROOT = 1 << 5,\n TABLE = 1 << 6,\n FLEX = 1 << 7,\n GRID = 1 << 8,\n RUBY = 1 << 9,\n SUBGRID = 1 << 10,\n LIST_ITEM = 1 << 11,\n TABLE_ROW_GROUP = 1 << 12,\n TABLE_HEADER_GROUP = 1 << 13,\n TABLE_FOOTER_GROUP = 1 << 14,\n TABLE_ROW = 1 << 15,\n TABLE_CELL = 1 << 16,\n TABLE_COLUMN_GROUP = 1 << 17,\n TABLE_COLUMN = 1 << 18,\n TABLE_CAPTION = 1 << 19,\n RUBY_BASE = 1 << 20,\n RUBY_TEXT = 1 << 21,\n RUBY_BASE_CONTAINER = 1 << 22,\n RUBY_TEXT_CONTAINER = 1 << 23,\n CONTENTS = 1 << 24,\n INLINE_BLOCK = 1 << 25,\n INLINE_LIST_ITEM = 1 << 26,\n INLINE_TABLE = 1 << 27,\n INLINE_FLEX = 1 << 28,\n INLINE_GRID = 1 << 29\n}\n\nexport type Display = number;\n\nexport const display: IPropertyListDescriptor<Display> = {\n name: 'display',\n initialValue: 'inline-block',\n prefix: false,\n type: PropertyDescriptorParsingType.LIST,\n parse: (_context: Context, tokens: CSSValue[]): Display => {\n return tokens.filter(isIdentToken).reduce((bit, token) => {\n return bit | parseDisplayValue(token.value);\n }, DISPLAY.NONE);\n }\n};\n\nconst parseDisplayValue = (display: string): Display => {\n switch (display) {\n case 'block':\n case '-webkit-box':\n return DISPLAY.BLOCK;\n case 'inline':\n return DISPLAY.INLINE;\n case 'run-in':\n return DISPLAY.RUN_IN;\n case 'flow':\n return DISPLAY.FLOW;\n case 'flow-root':\n return DISPLAY.FLOW_ROOT;\n case 'table':\n return DISPLAY.TABLE;\n case 'flex':\n case '-webkit-flex':\n return DISPLAY.FLEX;\n case 'grid':\n case '-ms-grid':\n return DISPLAY.GRID;\n case 'ruby':\n return DISPLAY.RUBY;\n case 'subgrid':\n return DISPLAY.SUBGRID;\n case 'list-item':\n return DISPLAY.LIST_ITEM;\n case 'table-row-group':\n return DISPLAY.TABLE_ROW_GROUP;\n case 'table-header-group':\n return DISPLAY.TABLE_HEADER_GROUP;\n case 'table-footer-group':\n return DISPLAY.TABLE_FOOTER_GROUP;\n case 'table-row':\n return DISPLAY.TABLE_ROW;\n case 'table-cell':\n return DISPLAY.TABLE_CELL;\n case 'table-column-group':\n return DISPLAY.TABLE_COLUMN_GROUP;\n case 'table-column':\n return DISPLAY.TABLE_COLUMN;\n case 'table-caption':\n return DISPLAY.TABLE_CAPTION;\n case 'ruby-base':\n return DISPLAY.RUBY_BASE;\n case 'ruby-text':\n return DISPLAY.RUBY_TEXT;\n case 'ruby-base-container':\n return DISPLAY.RUBY_BASE_CONTAINER;\n case 'ruby-text-container':\n return DISPLAY.RUBY_TEXT_CONTAINER;\n case 'contents':\n return DISPLAY.CONTENTS;\n case 'inline-block':\n return DISPLAY.INLINE_BLOCK;\n case 'inline-list-item':\n return DISPLAY.INLINE_LIST_ITEM;\n case 'inline-table':\n return DISPLAY.INLINE_TABLE;\n case 'inline-flex':\n return DISPLAY.INLINE_FLEX;\n case 'inline-grid':\n return DISPLAY.INLINE_GRID;\n }\n\n return DISPLAY.NONE;\n};\n","import {IPropertyIdentValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\nexport const enum FLOAT {\n NONE = 0,\n LEFT = 1,\n RIGHT = 2,\n INLINE_START = 3,\n INLINE_END = 4\n}\n\nexport const float: IPropertyIdentValueDescriptor<FLOAT> = {\n name: 'float',\n initialValue: 'none',\n prefix: false,\n type: PropertyDescriptorParsingType.IDENT_VALUE,\n parse: (_context: Context, float: string) => {\n switch (float) {\n case 'left':\n return FLOAT.LEFT;\n case 'right':\n return FLOAT.RIGHT;\n case 'inline-start':\n return FLOAT.INLINE_START;\n case 'inline-end':\n return FLOAT.INLINE_END;\n }\n return FLOAT.NONE;\n }\n};\n","import {IPropertyValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue} from '../syntax/parser';\nimport {TokenType} from '../syntax/tokenizer';\nimport {Context} from '../../core/context';\nexport const letterSpacing: IPropertyValueDescriptor<number> = {\n name: 'letter-spacing',\n initialValue: '0',\n prefix: false,\n type: PropertyDescriptorParsingType.VALUE,\n parse: (_context: Context, token: CSSValue) => {\n if (token.type === TokenType.IDENT_TOKEN && token.value === 'normal') {\n return 0;\n }\n\n if (token.type === TokenType.NUMBER_TOKEN) {\n return token.number;\n }\n\n if (token.type === TokenType.DIMENSION_TOKEN) {\n return token.number;\n }\n\n return 0;\n }\n};\n","import {IPropertyIdentValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\nexport enum LINE_BREAK {\n NORMAL = 'normal',\n STRICT = 'strict'\n}\n\nexport const lineBreak: IPropertyIdentValueDescriptor<LINE_BREAK> = {\n name: 'line-break',\n initialValue: 'normal',\n prefix: false,\n type: PropertyDescriptorParsingType.IDENT_VALUE,\n parse: (_context: Context, lineBreak: string): LINE_BREAK => {\n switch (lineBreak) {\n case 'strict':\n return LINE_BREAK.STRICT;\n case 'normal':\n default:\n return LINE_BREAK.NORMAL;\n }\n }\n};\n","import {IPropertyTokenValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isIdentToken} from '../syntax/parser';\nimport {TokenType} from '../syntax/tokenizer';\nimport {getAbsoluteValue, isLengthPercentage} from '../types/length-percentage';\nexport const lineHeight: IPropertyTokenValueDescriptor = {\n name: 'line-height',\n initialValue: 'normal',\n prefix: false,\n type: PropertyDescriptorParsingType.TOKEN_VALUE\n};\n\nexport const computeLineHeight = (token: CSSValue, fontSize: number): number => {\n if (isIdentToken(token) && token.value === 'normal') {\n return 1.2 * fontSize;\n } else if (token.type === TokenType.NUMBER_TOKEN) {\n return fontSize * token.number;\n } else if (isLengthPercentage(token)) {\n return getAbsoluteValue(token, fontSize);\n }\n\n return fontSize;\n};\n","import {TokenType} from '../syntax/tokenizer';\nimport {ICSSImage, image} from '../types/image';\nimport {IPropertyValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue} from '../syntax/parser';\nimport {Context} from '../../core/context';\n\nexport const listStyleImage: IPropertyValueDescriptor<ICSSImage | null> = {\n name: 'list-style-image',\n initialValue: 'none',\n type: PropertyDescriptorParsingType.VALUE,\n prefix: false,\n parse: (context: Context, token: CSSValue) => {\n if (token.type === TokenType.IDENT_TOKEN && token.value === 'none') {\n return null;\n }\n\n return image.parse(context, token);\n }\n};\n","import {IPropertyIdentValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\nexport const enum LIST_STYLE_POSITION {\n INSIDE = 0,\n OUTSIDE = 1\n}\n\nexport const listStylePosition: IPropertyIdentValueDescriptor<LIST_STYLE_POSITION> = {\n name: 'list-style-position',\n initialValue: 'outside',\n prefix: false,\n type: PropertyDescriptorParsingType.IDENT_VALUE,\n parse: (_context: Context, position: string) => {\n switch (position) {\n case 'inside':\n return LIST_STYLE_POSITION.INSIDE;\n case 'outside':\n default:\n return LIST_STYLE_POSITION.OUTSIDE;\n }\n }\n};\n","import {IPropertyIdentValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\nexport const enum LIST_STYLE_TYPE {\n NONE = -1,\n DISC = 0,\n CIRCLE = 1,\n SQUARE = 2,\n DECIMAL = 3,\n CJK_DECIMAL = 4,\n DECIMAL_LEADING_ZERO = 5,\n LOWER_ROMAN = 6,\n UPPER_ROMAN = 7,\n LOWER_GREEK = 8,\n LOWER_ALPHA = 9,\n UPPER_ALPHA = 10,\n ARABIC_INDIC = 11,\n ARMENIAN = 12,\n BENGALI = 13,\n CAMBODIAN = 14,\n CJK_EARTHLY_BRANCH = 15,\n CJK_HEAVENLY_STEM = 16,\n CJK_IDEOGRAPHIC = 17,\n DEVANAGARI = 18,\n ETHIOPIC_NUMERIC = 19,\n GEORGIAN = 20,\n GUJARATI = 21,\n GURMUKHI = 22,\n HEBREW = 22,\n HIRAGANA = 23,\n HIRAGANA_IROHA = 24,\n JAPANESE_FORMAL = 25,\n JAPANESE_INFORMAL = 26,\n KANNADA = 27,\n KATAKANA = 28,\n KATAKANA_IROHA = 29,\n KHMER = 30,\n KOREAN_HANGUL_FORMAL = 31,\n KOREAN_HANJA_FORMAL = 32,\n KOREAN_HANJA_INFORMAL = 33,\n LAO = 34,\n LOWER_ARMENIAN = 35,\n MALAYALAM = 36,\n MONGOLIAN = 37,\n MYANMAR = 38,\n ORIYA = 39,\n PERSIAN = 40,\n SIMP_CHINESE_FORMAL = 41,\n SIMP_CHINESE_INFORMAL = 42,\n TAMIL = 43,\n TELUGU = 44,\n THAI = 45,\n TIBETAN = 46,\n TRAD_CHINESE_FORMAL = 47,\n TRAD_CHINESE_INFORMAL = 48,\n UPPER_ARMENIAN = 49,\n DISCLOSURE_OPEN = 50,\n DISCLOSURE_CLOSED = 51\n}\n\nexport const listStyleType: IPropertyIdentValueDescriptor<LIST_STYLE_TYPE> = {\n name: 'list-style-type',\n initialValue: 'none',\n prefix: false,\n type: PropertyDescriptorParsingType.IDENT_VALUE,\n parse: (_context: Context, type: string) => {\n switch (type) {\n case 'disc':\n return LIST_STYLE_TYPE.DISC;\n case 'circle':\n return LIST_STYLE_TYPE.CIRCLE;\n case 'square':\n return LIST_STYLE_TYPE.SQUARE;\n case 'decimal':\n return LIST_STYLE_TYPE.DECIMAL;\n case 'cjk-decimal':\n return LIST_STYLE_TYPE.CJK_DECIMAL;\n case 'decimal-leading-zero':\n return LIST_STYLE_TYPE.DECIMAL_LEADING_ZERO;\n case 'lower-roman':\n return LIST_STYLE_TYPE.LOWER_ROMAN;\n case 'upper-roman':\n return LIST_STYLE_TYPE.UPPER_ROMAN;\n case 'lower-greek':\n return LIST_STYLE_TYPE.LOWER_GREEK;\n case 'lower-alpha':\n return LIST_STYLE_TYPE.LOWER_ALPHA;\n case 'upper-alpha':\n return LIST_STYLE_TYPE.UPPER_ALPHA;\n case 'arabic-indic':\n return LIST_STYLE_TYPE.ARABIC_INDIC;\n case 'armenian':\n return LIST_STYLE_TYPE.ARMENIAN;\n case 'bengali':\n return LIST_STYLE_TYPE.BENGALI;\n case 'cambodian':\n return LIST_STYLE_TYPE.CAMBODIAN;\n case 'cjk-earthly-branch':\n return LIST_STYLE_TYPE.CJK_EARTHLY_BRANCH;\n case 'cjk-heavenly-stem':\n return LIST_STYLE_TYPE.CJK_HEAVENLY_STEM;\n case 'cjk-ideographic':\n return LIST_STYLE_TYPE.CJK_IDEOGRAPHIC;\n case 'devanagari':\n return LIST_STYLE_TYPE.DEVANAGARI;\n case 'ethiopic-numeric':\n return LIST_STYLE_TYPE.ETHIOPIC_NUMERIC;\n case 'georgian':\n return LIST_STYLE_TYPE.GEORGIAN;\n case 'gujarati':\n return LIST_STYLE_TYPE.GUJARATI;\n case 'gurmukhi':\n return LIST_STYLE_TYPE.GURMUKHI;\n case 'hebrew':\n return LIST_STYLE_TYPE.HEBREW;\n case 'hiragana':\n return LIST_STYLE_TYPE.HIRAGANA;\n case 'hiragana-iroha':\n return LIST_STYLE_TYPE.HIRAGANA_IROHA;\n case 'japanese-formal':\n return LIST_STYLE_TYPE.JAPANESE_FORMAL;\n case 'japanese-informal':\n return LIST_STYLE_TYPE.JAPANESE_INFORMAL;\n case 'kannada':\n return LIST_STYLE_TYPE.KANNADA;\n case 'katakana':\n return LIST_STYLE_TYPE.KATAKANA;\n case 'katakana-iroha':\n return LIST_STYLE_TYPE.KATAKANA_IROHA;\n case 'khmer':\n return LIST_STYLE_TYPE.KHMER;\n case 'korean-hangul-formal':\n return LIST_STYLE_TYPE.KOREAN_HANGUL_FORMAL;\n case 'korean-hanja-formal':\n return LIST_STYLE_TYPE.KOREAN_HANJA_FORMAL;\n case 'korean-hanja-informal':\n return LIST_STYLE_TYPE.KOREAN_HANJA_INFORMAL;\n case 'lao':\n return LIST_STYLE_TYPE.LAO;\n case 'lower-armenian':\n return LIST_STYLE_TYPE.LOWER_ARMENIAN;\n case 'malayalam':\n return LIST_STYLE_TYPE.MALAYALAM;\n case 'mongolian':\n return LIST_STYLE_TYPE.MONGOLIAN;\n case 'myanmar':\n return LIST_STYLE_TYPE.MYANMAR;\n case 'oriya':\n return LIST_STYLE_TYPE.ORIYA;\n case 'persian':\n return LIST_STYLE_TYPE.PERSIAN;\n case 'simp-chinese-formal':\n return LIST_STYLE_TYPE.SIMP_CHINESE_FORMAL;\n case 'simp-chinese-informal':\n return LIST_STYLE_TYPE.SIMP_CHINESE_INFORMAL;\n case 'tamil':\n return LIST_STYLE_TYPE.TAMIL;\n case 'telugu':\n return LIST_STYLE_TYPE.TELUGU;\n case 'thai':\n return LIST_STYLE_TYPE.THAI;\n case 'tibetan':\n return LIST_STYLE_TYPE.TIBETAN;\n case 'trad-chinese-formal':\n return LIST_STYLE_TYPE.TRAD_CHINESE_FORMAL;\n case 'trad-chinese-informal':\n return LIST_STYLE_TYPE.TRAD_CHINESE_INFORMAL;\n case 'upper-armenian':\n return LIST_STYLE_TYPE.UPPER_ARMENIAN;\n case 'disclosure-open':\n return LIST_STYLE_TYPE.DISCLOSURE_OPEN;\n case 'disclosure-closed':\n return LIST_STYLE_TYPE.DISCLOSURE_CLOSED;\n case 'none':\n default:\n return LIST_STYLE_TYPE.NONE;\n }\n }\n};\n","import {IPropertyTokenValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\n\nconst marginForSide = (side: string): IPropertyTokenValueDescriptor => ({\n name: `margin-${side}`,\n initialValue: '0',\n prefix: false,\n type: PropertyDescriptorParsingType.TOKEN_VALUE\n});\n\nexport const marginTop: IPropertyTokenValueDescriptor = marginForSide('top');\nexport const marginRight: IPropertyTokenValueDescriptor = marginForSide('right');\nexport const marginBottom: IPropertyTokenValueDescriptor = marginForSide('bottom');\nexport const marginLeft: IPropertyTokenValueDescriptor = marginForSide('left');\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isIdentToken} from '../syntax/parser';\nimport {Context} from '../../core/context';\nexport const enum OVERFLOW {\n VISIBLE = 0,\n HIDDEN = 1,\n SCROLL = 2,\n CLIP = 3,\n AUTO = 4\n}\n\nexport const overflow: IPropertyListDescriptor<OVERFLOW[]> = {\n name: 'overflow',\n initialValue: 'visible',\n prefix: false,\n type: PropertyDescriptorParsingType.LIST,\n parse: (_context: Context, tokens: CSSValue[]): OVERFLOW[] => {\n return tokens.filter(isIdentToken).map((overflow) => {\n switch (overflow.value) {\n case 'hidden':\n return OVERFLOW.HIDDEN;\n case 'scroll':\n return OVERFLOW.SCROLL;\n case 'clip':\n return OVERFLOW.CLIP;\n case 'auto':\n return OVERFLOW.AUTO;\n case 'visible':\n default:\n return OVERFLOW.VISIBLE;\n }\n });\n }\n};\n","import {IPropertyIdentValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\nexport const enum OVERFLOW_WRAP {\n NORMAL = 'normal',\n BREAK_WORD = 'break-word'\n}\n\nexport const overflowWrap: IPropertyIdentValueDescriptor<OVERFLOW_WRAP> = {\n name: 'overflow-wrap',\n initialValue: 'normal',\n prefix: false,\n type: PropertyDescriptorParsingType.IDENT_VALUE,\n parse: (_context: Context, overflow: string) => {\n switch (overflow) {\n case 'break-word':\n return OVERFLOW_WRAP.BREAK_WORD;\n case 'normal':\n default:\n return OVERFLOW_WRAP.NORMAL;\n }\n }\n};\n","import {IPropertyTypeValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\n\nconst paddingForSide = (side: string): IPropertyTypeValueDescriptor => ({\n name: `padding-${side}`,\n initialValue: '0',\n prefix: false,\n type: PropertyDescriptorParsingType.TYPE_VALUE,\n format: 'length-percentage'\n});\n\nexport const paddingTop: IPropertyTypeValueDescriptor = paddingForSide('top');\nexport const paddingRight: IPropertyTypeValueDescriptor = paddingForSide('right');\nexport const paddingBottom: IPropertyTypeValueDescriptor = paddingForSide('bottom');\nexport const paddingLeft: IPropertyTypeValueDescriptor = paddingForSide('left');\n","import {IPropertyIdentValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\nexport const enum TEXT_ALIGN {\n LEFT = 0,\n CENTER = 1,\n RIGHT = 2\n}\n\nexport const textAlign: IPropertyIdentValueDescriptor<TEXT_ALIGN> = {\n name: 'text-align',\n initialValue: 'left',\n prefix: false,\n type: PropertyDescriptorParsingType.IDENT_VALUE,\n parse: (_context: Context, textAlign: string) => {\n switch (textAlign) {\n case 'right':\n return TEXT_ALIGN.RIGHT;\n case 'center':\n case 'justify':\n return TEXT_ALIGN.CENTER;\n case 'left':\n default:\n return TEXT_ALIGN.LEFT;\n }\n }\n};\n","import {IPropertyIdentValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\nexport const enum POSITION {\n STATIC = 0,\n RELATIVE = 1,\n ABSOLUTE = 2,\n FIXED = 3,\n STICKY = 4\n}\n\nexport const position: IPropertyIdentValueDescriptor<POSITION> = {\n name: 'position',\n initialValue: 'static',\n prefix: false,\n type: PropertyDescriptorParsingType.IDENT_VALUE,\n parse: (_context: Context, position: string) => {\n switch (position) {\n case 'relative':\n return POSITION.RELATIVE;\n case 'absolute':\n return POSITION.ABSOLUTE;\n case 'fixed':\n return POSITION.FIXED;\n case 'sticky':\n return POSITION.STICKY;\n }\n\n return POSITION.STATIC;\n }\n};\n","import {PropertyDescriptorParsingType, IPropertyListDescriptor} from '../IPropertyDescriptor';\nimport {CSSValue, isIdentWithValue, parseFunctionArgs} from '../syntax/parser';\nimport {ZERO_LENGTH} from '../types/length-percentage';\nimport {color, Color, COLORS} from '../types/color';\nimport {isLength, Length} from '../types/length';\nimport {Context} from '../../core/context';\n\nexport type TextShadow = TextShadowItem[];\ninterface TextShadowItem {\n color: Color;\n offsetX: Length;\n offsetY: Length;\n blur: Length;\n}\n\nexport const textShadow: IPropertyListDescriptor<TextShadow> = {\n name: 'text-shadow',\n initialValue: 'none',\n type: PropertyDescriptorParsingType.LIST,\n prefix: false,\n parse: (context: Context, tokens: CSSValue[]): TextShadow => {\n if (tokens.length === 1 && isIdentWithValue(tokens[0], 'none')) {\n return [];\n }\n\n return parseFunctionArgs(tokens).map((values: CSSValue[]) => {\n const shadow: TextShadowItem = {\n color: COLORS.TRANSPARENT,\n offsetX: ZERO_LENGTH,\n offsetY: ZERO_LENGTH,\n blur: ZERO_LENGTH\n };\n let c = 0;\n for (let i = 0; i < values.length; i++) {\n const token = values[i];\n if (isLength(token)) {\n if (c === 0) {\n shadow.offsetX = token;\n } else if (c === 1) {\n shadow.offsetY = token;\n } else {\n shadow.blur = token;\n }\n c++;\n } else {\n shadow.color = color.parse(context, token);\n }\n }\n return shadow;\n });\n }\n};\n","import {IPropertyIdentValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\nexport const enum TEXT_TRANSFORM {\n NONE = 0,\n LOWERCASE = 1,\n UPPERCASE = 2,\n CAPITALIZE = 3\n}\n\nexport const textTransform: IPropertyIdentValueDescriptor<TEXT_TRANSFORM> = {\n name: 'text-transform',\n initialValue: 'none',\n prefix: false,\n type: PropertyDescriptorParsingType.IDENT_VALUE,\n parse: (_context: Context, textTransform: string) => {\n switch (textTransform) {\n case 'uppercase':\n return TEXT_TRANSFORM.UPPERCASE;\n case 'lowercase':\n return TEXT_TRANSFORM.LOWERCASE;\n case 'capitalize':\n return TEXT_TRANSFORM.CAPITALIZE;\n }\n\n return TEXT_TRANSFORM.NONE;\n }\n};\n","import {IPropertyValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue} from '../syntax/parser';\nimport {NumberValueToken, TokenType} from '../syntax/tokenizer';\nimport {Context} from '../../core/context';\nexport type Matrix = [number, number, number, number, number, number];\nexport type Transform = Matrix | null;\n\nexport const transform: IPropertyValueDescriptor<Transform> = {\n name: 'transform',\n initialValue: 'none',\n prefix: true,\n type: PropertyDescriptorParsingType.VALUE,\n parse: (_context: Context, token: CSSValue) => {\n if (token.type === TokenType.IDENT_TOKEN && token.value === 'none') {\n return null;\n }\n\n if (token.type === TokenType.FUNCTION) {\n const transformFunction = SUPPORTED_TRANSFORM_FUNCTIONS[token.name];\n if (typeof transformFunction === 'undefined') {\n throw new Error(`Attempting to parse an unsupported transform function \"${token.name}\"`);\n }\n return transformFunction(token.values);\n }\n\n return null;\n }\n};\n\nconst matrix = (args: CSSValue[]): Transform => {\n const values = args.filter((arg) => arg.type === TokenType.NUMBER_TOKEN).map((arg: NumberValueToken) => arg.number);\n\n return values.length === 6 ? (values as Matrix) : null;\n};\n\n// doesn't support 3D transforms at the moment\nconst matrix3d = (args: CSSValue[]): Transform => {\n const values = args.filter((arg) => arg.type === TokenType.NUMBER_TOKEN).map((arg: NumberValueToken) => arg.number);\n\n const [a1, b1, {}, {}, a2, b2, {}, {}, {}, {}, {}, {}, a4, b4, {}, {}] = values;\n\n return values.length === 16 ? [a1, b1, a2, b2, a4, b4] : null;\n};\n\nconst SUPPORTED_TRANSFORM_FUNCTIONS: {\n [key: string]: (args: CSSValue[]) => Transform;\n} = {\n matrix: matrix,\n matrix3d: matrix3d\n};\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue} from '../syntax/parser';\nimport {isLengthPercentage, LengthPercentage} from '../types/length-percentage';\nimport {FLAG_INTEGER, TokenType} from '../syntax/tokenizer';\nimport {Context} from '../../core/context';\nexport type TransformOrigin = [LengthPercentage, LengthPercentage];\n\nconst DEFAULT_VALUE: LengthPercentage = {\n type: TokenType.PERCENTAGE_TOKEN,\n number: 50,\n flags: FLAG_INTEGER\n};\nconst DEFAULT: TransformOrigin = [DEFAULT_VALUE, DEFAULT_VALUE];\n\nexport const transformOrigin: IPropertyListDescriptor<TransformOrigin> = {\n name: 'transform-origin',\n initialValue: '50% 50%',\n prefix: true,\n type: PropertyDescriptorParsingType.LIST,\n parse: (_context: Context, tokens: CSSValue[]) => {\n const origins: LengthPercentage[] = tokens.filter(isLengthPercentage);\n\n if (origins.length !== 2) {\n return DEFAULT;\n }\n\n return [origins[0], origins[1]];\n }\n};\n","import {IPropertyIdentValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\nexport const enum VISIBILITY {\n VISIBLE = 0,\n HIDDEN = 1,\n COLLAPSE = 2\n}\n\nexport const visibility: IPropertyIdentValueDescriptor<VISIBILITY> = {\n name: 'visible',\n initialValue: 'none',\n prefix: false,\n type: PropertyDescriptorParsingType.IDENT_VALUE,\n parse: (_context: Context, visibility: string) => {\n switch (visibility) {\n case 'hidden':\n return VISIBILITY.HIDDEN;\n case 'collapse':\n return VISIBILITY.COLLAPSE;\n case 'visible':\n default:\n return VISIBILITY.VISIBLE;\n }\n }\n};\n","import {IPropertyIdentValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\nexport enum WORD_BREAK {\n NORMAL = 'normal',\n BREAK_ALL = 'break-all',\n KEEP_ALL = 'keep-all'\n}\n\nexport const wordBreak: IPropertyIdentValueDescriptor<WORD_BREAK> = {\n name: 'word-break',\n initialValue: 'normal',\n prefix: false,\n type: PropertyDescriptorParsingType.IDENT_VALUE,\n parse: (_context: Context, wordBreak: string): WORD_BREAK => {\n switch (wordBreak) {\n case 'break-all':\n return WORD_BREAK.BREAK_ALL;\n case 'keep-all':\n return WORD_BREAK.KEEP_ALL;\n case 'normal':\n default:\n return WORD_BREAK.NORMAL;\n }\n }\n};\n","import {IPropertyValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isNumberToken} from '../syntax/parser';\nimport {TokenType} from '../syntax/tokenizer';\nimport {Context} from '../../core/context';\n\ninterface zIndex {\n order: number;\n auto: boolean;\n}\n\nexport const zIndex: IPropertyValueDescriptor<zIndex> = {\n name: 'z-index',\n initialValue: 'auto',\n prefix: false,\n type: PropertyDescriptorParsingType.VALUE,\n parse: (_context: Context, token: CSSValue): zIndex => {\n if (token.type === TokenType.IDENT_TOKEN) {\n return {auto: true, order: 0};\n }\n\n if (isNumberToken(token)) {\n return {auto: false, order: token.number};\n }\n\n throw new Error(`Invalid z-index number parsed`);\n }\n};\n","import {CSSValue} from '../syntax/parser';\nimport {TokenType} from '../syntax/tokenizer';\nimport {ITypeDescriptor} from '../ITypeDescriptor';\nimport {Context} from '../../core/context';\n\nexport const time: ITypeDescriptor<number> = {\n name: 'time',\n parse: (_context: Context, value: CSSValue): number => {\n if (value.type === TokenType.DIMENSION_TOKEN) {\n switch (value.unit.toLowerCase()) {\n case 's':\n return 1000 * value.number;\n case 'ms':\n return value.number;\n }\n }\n\n throw new Error(`Unsupported time type`);\n }\n};\n","import {IPropertyValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isNumberToken} from '../syntax/parser';\nimport {Context} from '../../core/context';\nexport const opacity: IPropertyValueDescriptor<number> = {\n name: 'opacity',\n initialValue: '1',\n type: PropertyDescriptorParsingType.VALUE,\n prefix: false,\n parse: (_context: Context, token: CSSValue): number => {\n if (isNumberToken(token)) {\n return token.number;\n }\n return 1;\n }\n};\n","import {IPropertyTypeValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\n\nexport const textDecorationColor: IPropertyTypeValueDescriptor = {\n name: `text-decoration-color`,\n initialValue: 'transparent',\n prefix: false,\n type: PropertyDescriptorParsingType.TYPE_VALUE,\n format: 'color'\n};\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isIdentToken} from '../syntax/parser';\nimport {Context} from '../../core/context';\n\nexport const enum TEXT_DECORATION_LINE {\n NONE = 0,\n UNDERLINE = 1,\n OVERLINE = 2,\n LINE_THROUGH = 3,\n BLINK = 4\n}\n\nexport type TextDecorationLine = TEXT_DECORATION_LINE[];\n\nexport const textDecorationLine: IPropertyListDescriptor<TextDecorationLine> = {\n name: 'text-decoration-line',\n initialValue: 'none',\n prefix: false,\n type: PropertyDescriptorParsingType.LIST,\n parse: (_context: Context, tokens: CSSValue[]): TextDecorationLine => {\n return tokens\n .filter(isIdentToken)\n .map((token) => {\n switch (token.value) {\n case 'underline':\n return TEXT_DECORATION_LINE.UNDERLINE;\n case 'overline':\n return TEXT_DECORATION_LINE.OVERLINE;\n case 'line-through':\n return TEXT_DECORATION_LINE.LINE_THROUGH;\n case 'none':\n return TEXT_DECORATION_LINE.BLINK;\n }\n return TEXT_DECORATION_LINE.NONE;\n })\n .filter((line) => line !== TEXT_DECORATION_LINE.NONE);\n }\n};\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue} from '../syntax/parser';\nimport {TokenType} from '../syntax/tokenizer';\nimport {Context} from '../../core/context';\n\nexport type FONT_FAMILY = string;\n\nexport type FontFamily = FONT_FAMILY[];\n\nexport const fontFamily: IPropertyListDescriptor<FontFamily> = {\n name: `font-family`,\n initialValue: '',\n prefix: false,\n type: PropertyDescriptorParsingType.LIST,\n parse: (_context: Context, tokens: CSSValue[]) => {\n const accumulator: string[] = [];\n const results: string[] = [];\n tokens.forEach((token) => {\n switch (token.type) {\n case TokenType.IDENT_TOKEN:\n case TokenType.STRING_TOKEN:\n accumulator.push(token.value);\n break;\n case TokenType.NUMBER_TOKEN:\n accumulator.push(token.number.toString());\n break;\n case TokenType.COMMA_TOKEN:\n results.push(accumulator.join(' '));\n accumulator.length = 0;\n break;\n }\n });\n if (accumulator.length) {\n results.push(accumulator.join(' '));\n }\n return results.map((result) => (result.indexOf(' ') === -1 ? result : `'${result}'`));\n }\n};\n","import {IPropertyTypeValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\n\nexport const fontSize: IPropertyTypeValueDescriptor = {\n name: `font-size`,\n initialValue: '0',\n prefix: false,\n type: PropertyDescriptorParsingType.TYPE_VALUE,\n format: 'length'\n};\n","import {IPropertyValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isIdentToken, isNumberToken} from '../syntax/parser';\nimport {Context} from '../../core/context';\nexport const fontWeight: IPropertyValueDescriptor<number> = {\n name: 'font-weight',\n initialValue: 'normal',\n type: PropertyDescriptorParsingType.VALUE,\n prefix: false,\n parse: (_context: Context, token: CSSValue): number => {\n if (isNumberToken(token)) {\n return token.number;\n }\n\n if (isIdentToken(token)) {\n switch (token.value) {\n case 'bold':\n return 700;\n case 'normal':\n default:\n return 400;\n }\n }\n\n return 400;\n }\n};\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isIdentToken} from '../syntax/parser';\nimport {Context} from '../../core/context';\nexport const fontVariant: IPropertyListDescriptor<string[]> = {\n name: 'font-variant',\n initialValue: 'none',\n type: PropertyDescriptorParsingType.LIST,\n prefix: false,\n parse: (_context: Context, tokens: CSSValue[]): string[] => {\n return tokens.filter(isIdentToken).map((token) => token.value);\n }\n};\n","import {IPropertyIdentValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\nexport const enum FONT_STYLE {\n NORMAL = 'normal',\n ITALIC = 'italic',\n OBLIQUE = 'oblique'\n}\n\nexport const fontStyle: IPropertyIdentValueDescriptor<FONT_STYLE> = {\n name: 'font-style',\n initialValue: 'normal',\n prefix: false,\n type: PropertyDescriptorParsingType.IDENT_VALUE,\n parse: (_context: Context, overflow: string) => {\n switch (overflow) {\n case 'oblique':\n return FONT_STYLE.OBLIQUE;\n case 'italic':\n return FONT_STYLE.ITALIC;\n case 'normal':\n default:\n return FONT_STYLE.NORMAL;\n }\n }\n};\n","export const contains = (bit: number, value: number): boolean => (bit & value) !== 0;\n","import {TokenType} from '../syntax/tokenizer';\nimport {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue} from '../syntax/parser';\nimport {Context} from '../../core/context';\n\nexport type Content = CSSValue[];\n\nexport const content: IPropertyListDescriptor<Content> = {\n name: 'content',\n initialValue: 'none',\n type: PropertyDescriptorParsingType.LIST,\n prefix: false,\n parse: (_context: Context, tokens: CSSValue[]) => {\n if (tokens.length === 0) {\n return [];\n }\n\n const first = tokens[0];\n\n if (first.type === TokenType.IDENT_TOKEN && first.value === 'none') {\n return [];\n }\n\n return tokens;\n }\n};\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isNumberToken, nonWhiteSpace} from '../syntax/parser';\nimport {TokenType} from '../syntax/tokenizer';\nimport {Context} from '../../core/context';\n\nexport interface COUNTER_INCREMENT {\n counter: string;\n increment: number;\n}\n\nexport type CounterIncrement = COUNTER_INCREMENT[] | null;\n\nexport const counterIncrement: IPropertyListDescriptor<CounterIncrement> = {\n name: 'counter-increment',\n initialValue: 'none',\n prefix: true,\n type: PropertyDescriptorParsingType.LIST,\n parse: (_context: Context, tokens: CSSValue[]) => {\n if (tokens.length === 0) {\n return null;\n }\n\n const first = tokens[0];\n\n if (first.type === TokenType.IDENT_TOKEN && first.value === 'none') {\n return null;\n }\n\n const increments = [];\n const filtered = tokens.filter(nonWhiteSpace);\n\n for (let i = 0; i < filtered.length; i++) {\n const counter = filtered[i];\n const next = filtered[i + 1];\n if (counter.type === TokenType.IDENT_TOKEN) {\n const increment = next && isNumberToken(next) ? next.number : 1;\n increments.push({counter: counter.value, increment});\n }\n }\n\n return increments;\n }\n};\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isIdentToken, isNumberToken, nonWhiteSpace} from '../syntax/parser';\nimport {Context} from '../../core/context';\n\nexport interface COUNTER_RESET {\n counter: string;\n reset: number;\n}\n\nexport type CounterReset = COUNTER_RESET[];\n\nexport const counterReset: IPropertyListDescriptor<CounterReset> = {\n name: 'counter-reset',\n initialValue: 'none',\n prefix: true,\n type: PropertyDescriptorParsingType.LIST,\n parse: (_context: Context, tokens: CSSValue[]) => {\n if (tokens.length === 0) {\n return [];\n }\n\n const resets = [];\n const filtered = tokens.filter(nonWhiteSpace);\n\n for (let i = 0; i < filtered.length; i++) {\n const counter = filtered[i];\n const next = filtered[i + 1];\n if (isIdentToken(counter) && counter.value !== 'none') {\n const reset = next && isNumberToken(next) ? next.number : 0;\n resets.push({counter: counter.value, reset});\n }\n }\n\n return resets;\n }\n};\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\nimport {CSSValue, isDimensionToken} from '../syntax/parser';\nimport {time} from '../types/time';\n\nexport const duration: IPropertyListDescriptor<number[]> = {\n name: 'duration',\n initialValue: '0s',\n prefix: false,\n type: PropertyDescriptorParsingType.LIST,\n parse: (context: Context, tokens: CSSValue[]) => {\n return tokens.filter(isDimensionToken).map((token) => time.parse(context, token));\n }\n};\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isStringToken} from '../syntax/parser';\nimport {TokenType} from '../syntax/tokenizer';\nimport {Context} from '../../core/context';\n\nexport interface QUOTE {\n open: string;\n close: string;\n}\n\nexport type Quotes = QUOTE[] | null;\n\nexport const quotes: IPropertyListDescriptor<Quotes> = {\n name: 'quotes',\n initialValue: 'none',\n prefix: true,\n type: PropertyDescriptorParsingType.LIST,\n parse: (_context: Context, tokens: CSSValue[]) => {\n if (tokens.length === 0) {\n return null;\n }\n\n const first = tokens[0];\n\n if (first.type === TokenType.IDENT_TOKEN && first.value === 'none') {\n return null;\n }\n\n const quotes = [];\n const filtered = tokens.filter(isStringToken);\n\n if (filtered.length % 2 !== 0) {\n return null;\n }\n\n for (let i = 0; i < filtered.length; i += 2) {\n const open = filtered[i].value;\n const close = filtered[i + 1].value;\n quotes.push({open, close});\n }\n\n return quotes;\n }\n};\n\nexport const getQuote = (quotes: Quotes, depth: number, open: boolean): string => {\n if (!quotes) {\n return '';\n }\n\n const quote = quotes[Math.min(depth, quotes.length - 1)];\n if (!quote) {\n return '';\n }\n\n return open ? quote.open : quote.close;\n};\n","import {PropertyDescriptorParsingType, IPropertyListDescriptor} from '../IPropertyDescriptor';\nimport {CSSValue, isIdentWithValue, parseFunctionArgs} from '../syntax/parser';\nimport {ZERO_LENGTH} from '../types/length-percentage';\nimport {color, Color} from '../types/color';\nimport {isLength, Length} from '../types/length';\nimport {Context} from '../../core/context';\n\nexport type BoxShadow = BoxShadowItem[];\ninterface BoxShadowItem {\n inset: boolean;\n color: Color;\n offsetX: Length;\n offsetY: Length;\n blur: Length;\n spread: Length;\n}\n\nexport const boxShadow: IPropertyListDescriptor<BoxShadow> = {\n name: 'box-shadow',\n initialValue: 'none',\n type: PropertyDescriptorParsingType.LIST,\n prefix: false,\n parse: (context: Context, tokens: CSSValue[]): BoxShadow => {\n if (tokens.length === 1 && isIdentWithValue(tokens[0], 'none')) {\n return [];\n }\n\n return parseFunctionArgs(tokens).map((values: CSSValue[]) => {\n const shadow: BoxShadowItem = {\n color: 0x000000ff,\n offsetX: ZERO_LENGTH,\n offsetY: ZERO_LENGTH,\n blur: ZERO_LENGTH,\n spread: ZERO_LENGTH,\n inset: false\n };\n let c = 0;\n for (let i = 0; i < values.length; i++) {\n const token = values[i];\n if (isIdentWithValue(token, 'inset')) {\n shadow.inset = true;\n } else if (isLength(token)) {\n if (c === 0) {\n shadow.offsetX = token;\n } else if (c === 1) {\n shadow.offsetY = token;\n } else if (c === 2) {\n shadow.blur = token;\n } else {\n shadow.spread = token;\n }\n c++;\n } else {\n shadow.color = color.parse(context, token);\n }\n }\n return shadow;\n });\n }\n};\n","import {IPropertyListDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {CSSValue, isIdentToken} from '../syntax/parser';\nimport {Context} from '../../core/context';\nexport const enum PAINT_ORDER_LAYER {\n FILL,\n STROKE,\n MARKERS\n}\n\nexport type PaintOrder = PAINT_ORDER_LAYER[];\n\nexport const paintOrder: IPropertyListDescriptor<PaintOrder> = {\n name: 'paint-order',\n initialValue: 'normal',\n prefix: false,\n type: PropertyDescriptorParsingType.LIST,\n parse: (_context: Context, tokens: CSSValue[]): PaintOrder => {\n const DEFAULT_VALUE = [PAINT_ORDER_LAYER.FILL, PAINT_ORDER_LAYER.STROKE, PAINT_ORDER_LAYER.MARKERS];\n const layers: PaintOrder = [];\n\n tokens.filter(isIdentToken).forEach((token) => {\n switch (token.value) {\n case 'stroke':\n layers.push(PAINT_ORDER_LAYER.STROKE);\n break;\n case 'fill':\n layers.push(PAINT_ORDER_LAYER.FILL);\n break;\n case 'markers':\n layers.push(PAINT_ORDER_LAYER.MARKERS);\n break;\n }\n });\n DEFAULT_VALUE.forEach((value) => {\n if (layers.indexOf(value) === -1) {\n layers.push(value);\n }\n });\n\n return layers;\n }\n};\n","import {IPropertyTypeValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nexport const webkitTextStrokeColor: IPropertyTypeValueDescriptor = {\n name: `-webkit-text-stroke-color`,\n initialValue: 'currentcolor',\n prefix: false,\n type: PropertyDescriptorParsingType.TYPE_VALUE,\n format: 'color'\n};\n","import {CSSValue, isDimensionToken} from '../syntax/parser';\nimport {IPropertyValueDescriptor, PropertyDescriptorParsingType} from '../IPropertyDescriptor';\nimport {Context} from '../../core/context';\nexport const webkitTextStrokeWidth: IPropertyValueDescriptor<number> = {\n name: `-webkit-text-stroke-width`,\n initialValue: '0',\n type: PropertyDescriptorParsingType.VALUE,\n prefix: false,\n parse: (_context: Context, token: CSSValue): number => {\n if (isDimensionToken(token)) {\n return token.number;\n }\n return 0;\n }\n};\n","import {CSSPropertyDescriptor, PropertyDescriptorParsingType} from './IPropertyDescriptor';\nimport {backgroundClip} from './property-descriptors/background-clip';\nimport {backgroundColor} from './property-descriptors/background-color';\nimport {backgroundImage} from './property-descriptors/background-image';\nimport {backgroundOrigin} from './property-descriptors/background-origin';\nimport {backgroundPosition} from './property-descriptors/background-position';\nimport {backgroundRepeat} from './property-descriptors/background-repeat';\nimport {backgroundSize} from './property-descriptors/background-size';\nimport {\n borderBottomColor,\n borderLeftColor,\n borderRightColor,\n borderTopColor\n} from './property-descriptors/border-color';\nimport {\n borderBottomLeftRadius,\n borderBottomRightRadius,\n borderTopLeftRadius,\n borderTopRightRadius\n} from './property-descriptors/border-radius';\nimport {\n borderBottomStyle,\n borderLeftStyle,\n borderRightStyle,\n borderTopStyle\n} from './property-descriptors/border-style';\nimport {\n borderBottomWidth,\n borderLeftWidth,\n borderRightWidth,\n borderTopWidth\n} from './property-descriptors/border-width';\nimport {color} from './property-descriptors/color';\nimport {direction} from './property-descriptors/direction';\nimport {display, DISPLAY} from './property-descriptors/display';\nimport {float, FLOAT} from './property-descriptors/float';\nimport {letterSpacing} from './property-descriptors/letter-spacing';\nimport {lineBreak} from './property-descriptors/line-break';\nimport {lineHeight} from './property-descriptors/line-height';\nimport {listStyleImage} from './property-descriptors/list-style-image';\nimport {listStylePosition} from './property-descriptors/list-style-position';\nimport {listStyleType} from './property-descriptors/list-style-type';\nimport {marginBottom, marginLeft, marginRight, marginTop} from './property-descriptors/margin';\nimport {overflow, OVERFLOW} from './property-descriptors/overflow';\nimport {overflowWrap} from './property-descriptors/overflow-wrap';\nimport {paddingBottom, paddingLeft, paddingRight, paddingTop} from './property-descriptors/padding';\nimport {textAlign} from './property-descriptors/text-align';\nimport {position, POSITION} from './property-descriptors/position';\nimport {textShadow} from './property-descriptors/text-shadow';\nimport {textTransform} from './property-descriptors/text-transform';\nimport {transform} from './property-descriptors/transform';\nimport {transformOrigin} from './property-descriptors/transform-origin';\nimport {visibility, VISIBILITY} from './property-descriptors/visibility';\nimport {wordBreak} from './property-descriptors/word-break';\nimport {zIndex} from './property-descriptors/z-index';\nimport {CSSValue, isIdentToken, Parser} from './syntax/parser';\nimport {Tokenizer} from './syntax/tokenizer';\nimport {Color, color as colorType, isTransparent} from './types/color';\nimport {angle} from './types/angle';\nimport {image} from './types/image';\nimport {time} from './types/time';\nimport {opacity} from './property-descriptors/opacity';\nimport {textDecorationColor} from './property-descriptors/text-decoration-color';\nimport {textDecorationLine} from './property-descriptors/text-decoration-line';\nimport {isLengthPercentage, LengthPercentage, ZERO_LENGTH} from './types/length-percentage';\nimport {fontFamily} from './property-descriptors/font-family';\nimport {fontSize} from './property-descriptors/font-size';\nimport {isLength} from './types/length';\nimport {fontWeight} from './property-descriptors/font-weight';\nimport {fontVariant} from './property-descriptors/font-variant';\nimport {fontStyle} from './property-descriptors/font-style';\nimport {contains} from '../core/bitwise';\nimport {content} from './property-descriptors/content';\nimport {counterIncrement} from './property-descriptors/counter-increment';\nimport {counterReset} from './property-descriptors/counter-reset';\nimport {duration} from './property-descriptors/duration';\nimport {quotes} from './property-descriptors/quotes';\nimport {boxShadow} from './property-descriptors/box-shadow';\nimport {paintOrder} from './property-descriptors/paint-order';\nimport {webkitTextStrokeColor} from './property-descriptors/webkit-text-stroke-color';\nimport {webkitTextStrokeWidth} from './property-descriptors/webkit-text-stroke-width';\nimport {Context} from '../core/context';\n\nexport class CSSParsedDeclaration {\n animationDuration: ReturnType<typeof duration.parse>;\n backgroundClip: ReturnType<typeof backgroundClip.parse>;\n backgroundColor: Color;\n backgroundImage: ReturnType<typeof backgroundImage.parse>;\n backgroundOrigin: ReturnType<typeof backgroundOrigin.parse>;\n backgroundPosition: ReturnType<typeof backgroundPosition.parse>;\n backgroundRepeat: ReturnType<typeof backgroundRepeat.parse>;\n backgroundSize: ReturnType<typeof backgroundSize.parse>;\n borderTopColor: Color;\n borderRightColor: Color;\n borderBottomColor: Color;\n borderLeftColor: Color;\n borderTopLeftRadius: ReturnType<typeof borderTopLeftRadius.parse>;\n borderTopRightRadius: ReturnType<typeof borderTopRightRadius.parse>;\n borderBottomRightRadius: ReturnType<typeof borderBottomRightRadius.parse>;\n borderBottomLeftRadius: ReturnType<typeof borderBottomLeftRadius.parse>;\n borderTopStyle: ReturnType<typeof borderTopStyle.parse>;\n borderRightStyle: ReturnType<typeof borderRightStyle.parse>;\n borderBottomStyle: ReturnType<typeof borderBottomStyle.parse>;\n borderLeftStyle: ReturnType<typeof borderLeftStyle.parse>;\n borderTopWidth: ReturnType<typeof borderTopWidth.parse>;\n borderRightWidth: ReturnType<typeof borderRightWidth.parse>;\n borderBottomWidth: ReturnType<typeof borderBottomWidth.parse>;\n borderLeftWidth: ReturnType<typeof borderLeftWidth.parse>;\n boxShadow: ReturnType<typeof boxShadow.parse>;\n color: Color;\n direction: ReturnType<typeof direction.parse>;\n display: ReturnType<typeof display.parse>;\n float: ReturnType<typeof float.parse>;\n fontFamily: ReturnType<typeof fontFamily.parse>;\n fontSize: LengthPercentage;\n fontStyle: ReturnType<typeof fontStyle.parse>;\n fontVariant: ReturnType<typeof fontVariant.parse>;\n fontWeight: ReturnType<typeof fontWeight.parse>;\n letterSpacing: ReturnType<typeof letterSpacing.parse>;\n lineBreak: ReturnType<typeof lineBreak.parse>;\n lineHeight: CSSValue;\n listStyleImage: ReturnType<typeof listStyleImage.parse>;\n listStylePosition: ReturnType<typeof listStylePosition.parse>;\n listStyleType: ReturnType<typeof listStyleType.parse>;\n marginTop: CSSValue;\n marginRight: CSSValue;\n marginBottom: CSSValue;\n marginLeft: CSSValue;\n opacity: ReturnType<typeof opacity.parse>;\n overflowX: OVERFLOW;\n overflowY: OVERFLOW;\n overflowWrap: ReturnType<typeof overflowWrap.parse>;\n paddingTop: LengthPercentage;\n paddingRight: LengthPercentage;\n paddingBottom: LengthPercentage;\n paddingLeft: LengthPercentage;\n paintOrder: ReturnType<typeof paintOrder.parse>;\n position: ReturnType<typeof position.parse>;\n textAlign: ReturnType<typeof textAlign.parse>;\n textDecorationColor: Color;\n textDecorationLine: ReturnType<typeof textDecorationLine.parse>;\n textShadow: ReturnType<typeof textShadow.parse>;\n textTransform: ReturnType<typeof textTransform.parse>;\n transform: ReturnType<typeof transform.parse>;\n transformOrigin: ReturnType<typeof transformOrigin.parse>;\n visibility: ReturnType<typeof visibility.parse>;\n webkitTextStrokeColor: Color;\n webkitTextStrokeWidth: ReturnType<typeof webkitTextStrokeWidth.parse>;\n wordBreak: ReturnType<typeof wordBreak.parse>;\n zIndex: ReturnType<typeof zIndex.parse>;\n\n constructor(context: Context, declaration: CSSStyleDeclaration) {\n this.animationDuration = parse(context, duration, declaration.animationDuration);\n this.backgroundClip = parse(context, backgroundClip, declaration.backgroundClip);\n this.backgroundColor = parse(context, backgroundColor, declaration.backgroundColor);\n this.backgroundImage = parse(context, backgroundImage, declaration.backgroundImage);\n this.backgroundOrigin = parse(context, backgroundOrigin, declaration.backgroundOrigin);\n this.backgroundPosition = parse(context, backgroundPosition, declaration.backgroundPosition);\n this.backgroundRepeat = parse(context, backgroundRepeat, declaration.backgroundRepeat);\n this.backgroundSize = parse(context, backgroundSize, declaration.backgroundSize);\n this.borderTopColor = parse(context, borderTopColor, declaration.borderTopColor);\n this.borderRightColor = parse(context, borderRightColor, declaration.borderRightColor);\n this.borderBottomColor = parse(context, borderBottomColor, declaration.borderBottomColor);\n this.borderLeftColor = parse(context, borderLeftColor, declaration.borderLeftColor);\n this.borderTopLeftRadius = parse(context, borderTopLeftRadius, declaration.borderTopLeftRadius);\n this.borderTopRightRadius = parse(context, borderTopRightRadius, declaration.borderTopRightRadius);\n this.borderBottomRightRadius = parse(context, borderBottomRightRadius, declaration.borderBottomRightRadius);\n this.borderBottomLeftRadius = parse(context, borderBottomLeftRadius, declaration.borderBottomLeftRadius);\n this.borderTopStyle = parse(context, borderTopStyle, declaration.borderTopStyle);\n this.borderRightStyle = parse(context, borderRightStyle, declaration.borderRightStyle);\n this.borderBottomStyle = parse(context, borderBottomStyle, declaration.borderBottomStyle);\n this.borderLeftStyle = parse(context, borderLeftStyle, declaration.borderLeftStyle);\n this.borderTopWidth = parse(context, borderTopWidth, declaration.borderTopWidth);\n this.borderRightWidth = parse(context, borderRightWidth, declaration.borderRightWidth);\n this.borderBottomWidth = parse(context, borderBottomWidth, declaration.borderBottomWidth);\n this.borderLeftWidth = parse(context, borderLeftWidth, declaration.borderLeftWidth);\n this.boxShadow = parse(context, boxShadow, declaration.boxShadow);\n this.color = parse(context, color, declaration.color);\n this.direction = parse(context, direction, declaration.direction);\n this.display = parse(context, display, declaration.display);\n this.float = parse(context, float, declaration.cssFloat);\n this.fontFamily = parse(context, fontFamily, declaration.fontFamily);\n this.fontSize = parse(context, fontSize, declaration.fontSize);\n this.fontStyle = parse(context, fontStyle, declaration.fontStyle);\n this.fontVariant = parse(context, fontVariant, declaration.fontVariant);\n this.fontWeight = parse(context, fontWeight, declaration.fontWeight);\n this.letterSpacing = parse(context, letterSpacing, declaration.letterSpacing);\n this.lineBreak = parse(context, lineBreak, declaration.lineBreak);\n this.lineHeight = parse(context, lineHeight, declaration.lineHeight);\n this.listStyleImage = parse(context, listStyleImage, declaration.listStyleImage);\n this.listStylePosition = parse(context, listStylePosition, declaration.listStylePosition);\n this.listStyleType = parse(context, listStyleType, declaration.listStyleType);\n this.marginTop = parse(context, marginTop, declaration.marginTop);\n this.marginRight = parse(context, marginRight, declaration.marginRight);\n this.marginBottom = parse(context, marginBottom, declaration.marginBottom);\n this.marginLeft = parse(context, marginLeft, declaration.marginLeft);\n this.opacity = parse(context, opacity, declaration.opacity);\n const overflowTuple = parse(context, overflow, declaration.overflow);\n this.overflowX = overflowTuple[0];\n this.overflowY = overflowTuple[overflowTuple.length > 1 ? 1 : 0];\n this.overflowWrap = parse(context, overflowWrap, declaration.overflowWrap);\n this.paddingTop = parse(context, paddingTop, declaration.paddingTop);\n this.paddingRight = parse(context, paddingRight, declaration.paddingRight);\n this.paddingBottom = parse(context, paddingBottom, declaration.paddingBottom);\n this.paddingLeft = parse(context, paddingLeft, declaration.paddingLeft);\n this.paintOrder = parse(context, paintOrder, declaration.paintOrder);\n this.position = parse(context, position, declaration.position);\n this.textAlign = parse(context, textAlign, declaration.textAlign);\n this.textDecorationColor = parse(\n context,\n textDecorationColor,\n declaration.textDecorationColor ?? declaration.color\n );\n this.textDecorationLine = parse(\n context,\n textDecorationLine,\n declaration.textDecorationLine ?? declaration.textDecoration\n );\n this.textShadow = parse(context, textShadow, declaration.textShadow);\n this.textTransform = parse(context, textTransform, declaration.textTransform);\n this.transform = parse(context, transform, declaration.transform);\n this.transformOrigin = parse(context, transformOrigin, declaration.transformOrigin);\n this.visibility = parse(context, visibility, declaration.visibility);\n this.webkitTextStrokeColor = parse(context, webkitTextStrokeColor, declaration.webkitTextStrokeColor);\n this.webkitTextStrokeWidth = parse(context, webkitTextStrokeWidth, declaration.webkitTextStrokeWidth);\n this.wordBreak = parse(context, wordBreak, declaration.wordBreak);\n this.zIndex = parse(context, zIndex, declaration.zIndex);\n }\n\n isVisible(): boolean {\n return this.display > 0 && this.opacity > 0 && this.visibility === VISIBILITY.VISIBLE;\n }\n\n isTransparent(): boolean {\n return isTransparent(this.backgroundColor);\n }\n\n isTransformed(): boolean {\n return this.transform !== null;\n }\n\n isPositioned(): boolean {\n return this.position !== POSITION.STATIC;\n }\n\n isPositionedWithZIndex(): boolean {\n return this.isPositioned() && !this.zIndex.auto;\n }\n\n isFloating(): boolean {\n return this.float !== FLOAT.NONE;\n }\n\n isInlineLevel(): boolean {\n return (\n contains(this.display, DISPLAY.INLINE) ||\n contains(this.display, DISPLAY.INLINE_BLOCK) ||\n contains(this.display, DISPLAY.INLINE_FLEX) ||\n contains(this.display, DISPLAY.INLINE_GRID) ||\n contains(this.display, DISPLAY.INLINE_LIST_ITEM) ||\n contains(this.display, DISPLAY.INLINE_TABLE)\n );\n }\n}\n\nexport class CSSParsedPseudoDeclaration {\n content: ReturnType<typeof content.parse>;\n quotes: ReturnType<typeof quotes.parse>;\n\n constructor(context: Context, declaration: CSSStyleDeclaration) {\n this.content = parse(context, content, declaration.content);\n this.quotes = parse(context, quotes, declaration.quotes);\n }\n}\n\nexport class CSSParsedCounterDeclaration {\n counterIncrement: ReturnType<typeof counterIncrement.parse>;\n counterReset: ReturnType<typeof counterReset.parse>;\n\n constructor(context: Context, declaration: CSSStyleDeclaration) {\n this.counterIncrement = parse(context, counterIncrement, declaration.counterIncrement);\n this.counterReset = parse(context, counterReset, declaration.counterReset);\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst parse = (context: Context, descriptor: CSSPropertyDescriptor<any>, style?: string | null) => {\n const tokenizer = new Tokenizer();\n const value = style !== null && typeof style !== 'undefined' ? style.toString() : descriptor.initialValue;\n tokenizer.write(value);\n const parser = new Parser(tokenizer.read());\n switch (descriptor.type) {\n case PropertyDescriptorParsingType.IDENT_VALUE:\n const token = parser.parseComponentValue();\n return descriptor.parse(context, isIdentToken(token) ? token.value : descriptor.initialValue);\n case PropertyDescriptorParsingType.VALUE:\n return descriptor.parse(context, parser.parseComponentValue());\n case PropertyDescriptorParsingType.LIST:\n return descriptor.parse(context, parser.parseComponentValues());\n case PropertyDescriptorParsingType.TOKEN_VALUE:\n return parser.parseComponentValue();\n case PropertyDescriptorParsingType.TYPE_VALUE:\n switch (descriptor.format) {\n case 'angle':\n return angle.parse(context, parser.parseComponentValue());\n case 'color':\n return colorType.parse(context, parser.parseComponentValue());\n case 'image':\n return image.parse(context, parser.parseComponentValue());\n case 'length':\n const length = parser.parseComponentValue();\n return isLength(length) ? length : ZERO_LENGTH;\n case 'length-percentage':\n const value = parser.parseComponentValue();\n return isLengthPercentage(value) ? value : ZERO_LENGTH;\n case 'time':\n return time.parse(context, parser.parseComponentValue());\n }\n break;\n }\n};\n","const elementDebuggerAttribute = 'data-html2canvas-debug';\nexport const enum DebuggerType {\n NONE,\n ALL,\n CLONE,\n PARSE,\n RENDER\n}\n\nconst getElementDebugType = (element: Element): DebuggerType => {\n const attribute = element.getAttribute(elementDebuggerAttribute);\n switch (attribute) {\n case 'all':\n return DebuggerType.ALL;\n case 'clone':\n return DebuggerType.CLONE;\n case 'parse':\n return DebuggerType.PARSE;\n case 'render':\n return DebuggerType.RENDER;\n default:\n return DebuggerType.NONE;\n }\n};\n\nexport const isDebugging = (element: Element, type: Omit<DebuggerType, DebuggerType.NONE>): boolean => {\n const elementType = getElementDebugType(element);\n return elementType === DebuggerType.ALL || type === elementType;\n};\n","import {CSSParsedDeclaration} from '../css/index';\nimport {TextContainer} from './text-container';\nimport {Bounds, parseBounds} from '../css/layout/bounds';\nimport {isHTMLElementNode} from './node-parser';\nimport {Context} from '../core/context';\nimport {DebuggerType, isDebugging} from '../core/debugger';\n\nexport const enum FLAGS {\n CREATES_STACKING_CONTEXT = 1 << 1,\n CREATES_REAL_STACKING_CONTEXT = 1 << 2,\n IS_LIST_OWNER = 1 << 3,\n DEBUG_RENDER = 1 << 4\n}\n\nexport class ElementContainer {\n readonly styles: CSSParsedDeclaration;\n readonly textNodes: TextContainer[] = [];\n readonly elements: ElementContainer[] = [];\n bounds: Bounds;\n flags = 0;\n\n constructor(protected readonly context: Context, element: Element) {\n if (isDebugging(element, DebuggerType.PARSE)) {\n debugger;\n }\n\n this.styles = new CSSParsedDeclaration(context, window.getComputedStyle(element, null));\n\n if (isHTMLElementNode(element)) {\n if (this.styles.animationDuration.some((duration) => duration > 0)) {\n element.style.animationDuration = '0s';\n }\n\n if (this.styles.transform !== null) {\n // getBoundingClientRect takes transforms into account\n element.style.transform = 'none';\n }\n }\n\n this.bounds = parseBounds(this.context, element);\n\n if (isDebugging(element, DebuggerType.RENDER)) {\n this.flags |= FLAGS.DEBUG_RENDER;\n }\n }\n}\n","export const base64 =\n 'AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2B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IAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgAC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AAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=';\nexport const byteLength = 19616;\n","const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\n// Use a lookup table to find the index.\nconst lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\nfor (let i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\n\nexport const decode = (base64: string): ArrayBuffer | number[] => {\n let bufferLength = base64.length * 0.75,\n len = base64.length,\n i,\n p = 0,\n encoded1,\n encoded2,\n encoded3,\n encoded4;\n\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n const buffer =\n typeof ArrayBuffer !== 'undefined' &&\n typeof Uint8Array !== 'undefined' &&\n typeof Uint8Array.prototype.slice !== 'undefined'\n ? new ArrayBuffer(bufferLength)\n : new Array(bufferLength);\n const bytes = Array.isArray(buffer) ? buffer : new Uint8Array(buffer);\n\n for (i = 0; i < len; i += 4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i + 1)];\n encoded3 = lookup[base64.charCodeAt(i + 2)];\n encoded4 = lookup[base64.charCodeAt(i + 3)];\n\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n\n return buffer;\n};\n\nexport const polyUint16Array = (buffer: number[]): number[] => {\n const length = buffer.length;\n const bytes = [];\n for (let i = 0; i < length; i += 2) {\n bytes.push((buffer[i + 1] << 8) | buffer[i]);\n }\n return bytes;\n};\n\nexport const polyUint32Array = (buffer: number[]): number[] => {\n const length = buffer.length;\n const bytes = [];\n for (let i = 0; i < length; i += 4) {\n bytes.push((buffer[i + 3] << 24) | (buffer[i + 2] << 16) | (buffer[i + 1] << 8) | buffer[i]);\n }\n return bytes;\n};\n","import {decode, polyUint16Array, polyUint32Array} from './Util';\n\nexport type int = number;\n\n/** Shift size for getting the index-2 table offset. */\nexport const UTRIE2_SHIFT_2 = 5;\n\n/** Shift size for getting the index-1 table offset. */\nexport const UTRIE2_SHIFT_1 = 6 + 5;\n\n/**\n * Shift size for shifting left the index array values.\n * Increases possible data size with 16-bit index values at the cost\n * of compactability.\n * This requires data blocks to be aligned by UTRIE2_DATA_GRANULARITY.\n */\nexport const UTRIE2_INDEX_SHIFT = 2;\n\n/**\n * Difference between the two shift sizes,\n * for getting an index-1 offset from an index-2 offset. 6=11-5\n */\nexport const UTRIE2_SHIFT_1_2 = UTRIE2_SHIFT_1 - UTRIE2_SHIFT_2;\n\n/**\n * The part of the index-2 table for U+D800..U+DBFF stores values for\n * lead surrogate code _units_ not code _points_.\n * Values for lead surrogate code _points_ are indexed with this portion of the table.\n * Length=32=0x20=0x400>>UTRIE2_SHIFT_2. (There are 1024=0x400 lead surrogates.)\n */\nexport const UTRIE2_LSCP_INDEX_2_OFFSET = 0x10000 >> UTRIE2_SHIFT_2;\n\n/** Number of entries in a data block. 32=0x20 */\nexport const UTRIE2_DATA_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_2;\n/** Mask for getting the lower bits for the in-data-block offset. */\nexport const UTRIE2_DATA_MASK = UTRIE2_DATA_BLOCK_LENGTH - 1;\n\nexport const UTRIE2_LSCP_INDEX_2_LENGTH = 0x400 >> UTRIE2_SHIFT_2;\n/** Count the lengths of both BMP pieces. 2080=0x820 */\nexport const UTRIE2_INDEX_2_BMP_LENGTH = UTRIE2_LSCP_INDEX_2_OFFSET + UTRIE2_LSCP_INDEX_2_LENGTH;\n/**\n * The 2-byte UTF-8 version of the index-2 table follows at offset 2080=0x820.\n * Length 32=0x20 for lead bytes C0..DF, regardless of UTRIE2_SHIFT_2.\n */\nexport const UTRIE2_UTF8_2B_INDEX_2_OFFSET = UTRIE2_INDEX_2_BMP_LENGTH;\nexport const UTRIE2_UTF8_2B_INDEX_2_LENGTH = 0x800 >> 6; /* U+0800 is the first code point after 2-byte UTF-8 */\n/**\n * The index-1 table, only used for supplementary code points, at offset 2112=0x840.\n * Variable length, for code points up to highStart, where the last single-value range starts.\n * Maximum length 512=0x200=0x100000>>UTRIE2_SHIFT_1.\n * (For 0x100000 supplementary code points U+10000..U+10ffff.)\n *\n * The part of the index-2 table for supplementary code points starts\n * after this index-1 table.\n *\n * Both the index-1 table and the following part of the index-2 table\n * are omitted completely if there is only BMP data.\n */\nexport const UTRIE2_INDEX_1_OFFSET = UTRIE2_UTF8_2B_INDEX_2_OFFSET + UTRIE2_UTF8_2B_INDEX_2_LENGTH;\n\n/**\n * Number of index-1 entries for the BMP. 32=0x20\n * This part of the index-1 table is omitted from the serialized form.\n */\nexport const UTRIE2_OMITTED_BMP_INDEX_1_LENGTH = 0x10000 >> UTRIE2_SHIFT_1;\n\n/** Number of entries in an index-2 block. 64=0x40 */\nexport const UTRIE2_INDEX_2_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_1_2;\n/** Mask for getting the lower bits for the in-index-2-block offset. */\nexport const UTRIE2_INDEX_2_MASK = UTRIE2_INDEX_2_BLOCK_LENGTH - 1;\n\nconst slice16 = (view: number[] | Uint16Array, start: number, end?: number) => {\n if (view.slice) {\n return view.slice(start, end);\n }\n\n return new Uint16Array(Array.prototype.slice.call(view, start, end));\n};\n\nconst slice32 = (view: number[] | Uint32Array, start: number, end?: number) => {\n if (view.slice) {\n return view.slice(start, end);\n }\n\n return new Uint32Array(Array.prototype.slice.call(view, start, end));\n};\n\nexport const createTrieFromBase64 = (base64: string, _byteLength: number): Trie => {\n const buffer = decode(base64);\n const view32 = Array.isArray(buffer) ? polyUint32Array(buffer) : new Uint32Array(buffer);\n const view16 = Array.isArray(buffer) ? polyUint16Array(buffer) : new Uint16Array(buffer);\n const headerLength = 24;\n\n const index = slice16(view16, headerLength / 2, view32[4] / 2);\n const data =\n view32[5] === 2\n ? slice16(view16, (headerLength + view32[4]) / 2)\n : slice32(view32, Math.ceil((headerLength + view32[4]) / 4));\n\n return new Trie(view32[0], view32[1], view32[2], view32[3], index, data);\n};\n\nexport class Trie {\n initialValue: int;\n errorValue: int;\n highStart: int;\n highValueIndex: int;\n index: Uint16Array | number[];\n data: Uint32Array | Uint16Array | number[];\n\n constructor(\n initialValue: int,\n errorValue: int,\n highStart: int,\n highValueIndex: int,\n index: Uint16Array | number[],\n data: Uint32Array | Uint16Array | number[]\n ) {\n this.initialValue = initialValue;\n this.errorValue = errorValue;\n this.highStart = highStart;\n this.highValueIndex = highValueIndex;\n this.index = index;\n this.data = data;\n }\n\n /**\n * Get the value for a code point as stored in the Trie.\n *\n * @param codePoint the code point\n * @return the value\n */\n get(codePoint: number): number {\n let ix;\n if (codePoint >= 0) {\n if (codePoint < 0x0d800 || (codePoint > 0x0dbff && codePoint <= 0x0ffff)) {\n // Ordinary BMP code point, excluding leading surrogates.\n // BMP uses a single level lookup. BMP index starts at offset 0 in the Trie2 index.\n // 16 bit data is stored in the index array itself.\n ix = this.index[codePoint >> UTRIE2_SHIFT_2];\n ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);\n return this.data[ix];\n }\n\n if (codePoint <= 0xffff) {\n // Lead Surrogate Code Point. A Separate index section is stored for\n // lead surrogate code units and code points.\n // The main index has the code unit data.\n // For this function, we need the code point data.\n // Note: this expression could be refactored for slightly improved efficiency, but\n // surrogate code points will be so rare in practice that it's not worth it.\n ix = this.index[UTRIE2_LSCP_INDEX_2_OFFSET + ((codePoint - 0xd800) >> UTRIE2_SHIFT_2)];\n ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);\n return this.data[ix];\n }\n\n if (codePoint < this.highStart) {\n // Supplemental code point, use two-level lookup.\n ix = UTRIE2_INDEX_1_OFFSET - UTRIE2_OMITTED_BMP_INDEX_1_LENGTH + (codePoint >> UTRIE2_SHIFT_1);\n ix = this.index[ix];\n ix += (codePoint >> UTRIE2_SHIFT_2) & UTRIE2_INDEX_2_MASK;\n ix = this.index[ix];\n ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);\n return this.data[ix];\n }\n if (codePoint <= 0x10ffff) {\n return this.data[this.highValueIndex];\n }\n }\n\n // Fall through. The code point is outside of the legal range of 0..0x10ffff.\n return this.errorValue;\n }\n}\n","const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\n// Use a lookup table to find the index.\nconst lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\nfor (let i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\n\nexport const encode = (arraybuffer: ArrayBuffer): string => {\n let bytes = new Uint8Array(arraybuffer),\n i,\n len = bytes.length,\n base64 = '';\n\n for (i = 0; i < len; i += 3) {\n base64 += chars[bytes[i] >> 2];\n base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\n base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\n base64 += chars[bytes[i + 2] & 63];\n }\n\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + '=';\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + '==';\n }\n\n return base64;\n};\n\nexport const decode = (base64: string): ArrayBuffer => {\n let bufferLength = base64.length * 0.75,\n len = base64.length,\n i,\n p = 0,\n encoded1,\n encoded2,\n encoded3,\n encoded4;\n\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n const arraybuffer = new ArrayBuffer(bufferLength),\n bytes = new Uint8Array(arraybuffer);\n\n for (i = 0; i < len; i += 4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i + 1)];\n encoded3 = lookup[base64.charCodeAt(i + 2)];\n encoded4 = lookup[base64.charCodeAt(i + 3)];\n\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n\n return arraybuffer;\n};\n","import {base64, byteLength} from './grapheme-break-trie';\nimport {createTrieFromBase64} from 'utrie';\n\nconst Other = 0;\nconst Prepend = 1;\nconst CR = 2;\nconst LF = 3;\nconst Control = 4;\nconst Extend = 5;\nconst Regional_Indicator = 6;\nconst SpacingMark = 7;\nconst L = 8;\nconst V = 9;\nconst T = 10;\nconst LV = 11;\nconst LVT = 12;\nconst ZWJ = 13;\nconst Extended_Pictographic = 14;\nconst RI = 15;\n\nexport const classes: {[key: string]: number} = {\n Other,\n Prepend,\n CR,\n LF,\n Control,\n Extend,\n Regional_Indicator,\n SpacingMark,\n L,\n V,\n T,\n LV,\n LVT,\n ZWJ,\n Extended_Pictographic,\n RI,\n};\n\nexport const toCodePoints = (str: string): number[] => {\n const codePoints = [];\n let i = 0;\n const length = str.length;\n while (i < length) {\n const value = str.charCodeAt(i++);\n if (value >= 0xd800 && value <= 0xdbff && i < length) {\n const extra = str.charCodeAt(i++);\n if ((extra & 0xfc00) === 0xdc00) {\n codePoints.push(((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000);\n } else {\n codePoints.push(value);\n i--;\n }\n } else {\n codePoints.push(value);\n }\n }\n return codePoints;\n};\n\nexport const fromCodePoint = (...codePoints: number[]): string => {\n if (String.fromCodePoint) {\n return String.fromCodePoint(...codePoints);\n }\n\n const length = codePoints.length;\n if (!length) {\n return '';\n }\n\n const codeUnits = [];\n\n let index = -1;\n let result = '';\n while (++index < length) {\n let codePoint = codePoints[index];\n if (codePoint <= 0xffff) {\n codeUnits.push(codePoint);\n } else {\n codePoint -= 0x10000;\n codeUnits.push((codePoint >> 10) + 0xd800, (codePoint % 0x400) + 0xdc00);\n }\n if (index + 1 === length || codeUnits.length > 0x4000) {\n result += String.fromCharCode(...codeUnits);\n codeUnits.length = 0;\n }\n }\n return result;\n};\n\nexport const UnicodeTrie = createTrieFromBase64(base64, byteLength);\n\nexport const BREAK_NOT_ALLOWED = '×';\nexport const BREAK_ALLOWED = '÷';\n\nexport type BREAK_OPPORTUNITIES = typeof BREAK_NOT_ALLOWED | typeof BREAK_ALLOWED;\n\nexport const codePointToClass = (codePoint: number): number => UnicodeTrie.get(codePoint);\n\nconst _graphemeBreakAtIndex = (_codePoints: number[], classTypes: number[], index: number): BREAK_OPPORTUNITIES => {\n let prevIndex = index - 2;\n let prev = classTypes[prevIndex];\n const current = classTypes[index - 1];\n const next = classTypes[index];\n // GB3 Do not break between a CR and LF\n if (current === CR && next === LF) {\n return BREAK_NOT_ALLOWED;\n }\n\n // GB4 Otherwise, break before and after controls.\n if (current === CR || current === LF || current === Control) {\n return BREAK_ALLOWED;\n }\n\n // GB5\n if (next === CR || next === LF || next === Control) {\n return BREAK_ALLOWED;\n }\n\n // Do not break Hangul syllable sequences.\n // GB6\n if (current === L && [L, V, LV, LVT].indexOf(next) !== -1) {\n return BREAK_NOT_ALLOWED;\n }\n\n // GB7\n if ((current === LV || current === V) && (next === V || next === T)) {\n return BREAK_NOT_ALLOWED;\n }\n\n // GB8\n if ((current === LVT || current === T) && next === T) {\n return BREAK_NOT_ALLOWED;\n }\n\n // GB9 Do not break before extending characters or ZWJ.\n if (next === ZWJ || next === Extend) {\n return BREAK_NOT_ALLOWED;\n }\n // Do not break before SpacingMarks, or after Prepend characters.\n // GB9a\n if (next === SpacingMark) {\n return BREAK_NOT_ALLOWED;\n }\n\n // GB9a\n if (current === Prepend) {\n return BREAK_NOT_ALLOWED;\n }\n\n // GB11 Do not break within emoji modifier sequences or emoji zwj sequences.\n if (current === ZWJ && next === Extended_Pictographic) {\n while (prev === Extend) {\n prev = classTypes[--prevIndex];\n }\n if (prev === Extended_Pictographic) {\n return BREAK_NOT_ALLOWED;\n }\n }\n\n // GB12 Do not break within emoji flag sequences.\n // That is, do not break between regional indicator (RI) symbols\n // if there is an odd number of RI characters before the break point.\n if (current === RI && next === RI) {\n let countRI = 0;\n while (prev === RI) {\n countRI++;\n prev = classTypes[--prevIndex];\n }\n if (countRI % 2 === 0) {\n return BREAK_NOT_ALLOWED;\n }\n }\n\n return BREAK_ALLOWED;\n};\n\nexport const graphemeBreakAtIndex = (codePoints: number[], index: number): BREAK_OPPORTUNITIES => {\n // GB1 Break at the start and end of text, unless the text is empty.\n if (index === 0) {\n return BREAK_ALLOWED;\n }\n\n // GB2\n if (index >= codePoints.length) {\n return BREAK_ALLOWED;\n }\n\n const classTypes = codePoints.map(codePointToClass);\n return _graphemeBreakAtIndex(codePoints, classTypes, index);\n};\n\nexport const GraphemeBreaker = (str: string) => {\n const codePoints = toCodePoints(str);\n const length = codePoints.length;\n let index = 0;\n let lastEnd = 0;\n const classTypes = codePoints.map(codePointToClass);\n\n return {\n next: () => {\n if (index >= length) {\n return {done: true, value: null};\n }\n\n let graphemeBreak = BREAK_NOT_ALLOWED;\n while (\n index < length &&\n (graphemeBreak = _graphemeBreakAtIndex(codePoints, classTypes, ++index)) === BREAK_NOT_ALLOWED\n ) {}\n\n if (graphemeBreak !== BREAK_NOT_ALLOWED || index === length) {\n const value = fromCodePoint.apply(null, codePoints.slice(lastEnd, index));\n lastEnd = index;\n return {value, done: false};\n }\n\n return {done: true, value: null};\n while (index < length) {}\n\n return {done: true, value: null};\n },\n };\n};\n\nexport const splitGraphemes = (str: string): string[] => {\n const breaker = GraphemeBreaker(str);\n\n const graphemes = [];\n let bk;\n\n while (!(bk = breaker.next()).done) {\n if (bk.value) {\n graphemes.push(bk.value.slice());\n }\n }\n\n return graphemes;\n};\n","import {fromCodePoint, toCodePoints} from 'css-line-break';\n\nconst testRangeBounds = (document: Document) => {\n const TEST_HEIGHT = 123;\n\n if (document.createRange) {\n const range = document.createRange();\n if (range.getBoundingClientRect) {\n const testElement = document.createElement('boundtest');\n testElement.style.height = `${TEST_HEIGHT}px`;\n testElement.style.display = 'block';\n document.body.appendChild(testElement);\n\n range.selectNode(testElement);\n const rangeBounds = range.getBoundingClientRect();\n const rangeHeight = Math.round(rangeBounds.height);\n document.body.removeChild(testElement);\n if (rangeHeight === TEST_HEIGHT) {\n return true;\n }\n }\n }\n\n return false;\n};\n\nconst testIOSLineBreak = (document: Document) => {\n const testElement = document.createElement('boundtest');\n testElement.style.width = '50px';\n testElement.style.display = 'block';\n testElement.style.fontSize = '12px';\n testElement.style.letterSpacing = '0px';\n testElement.style.wordSpacing = '0px';\n document.body.appendChild(testElement);\n const range = document.createRange();\n\n testElement.innerHTML = typeof ''.repeat === 'function' ? '👨'.repeat(10) : '';\n\n const node = testElement.firstChild as Text;\n\n const textList = toCodePoints(node.data).map((i) => fromCodePoint(i));\n let offset = 0;\n let prev: DOMRect = {} as DOMRect;\n\n // ios 13 does not handle range getBoundingClientRect line changes correctly #2177\n const supports = textList.every((text, i) => {\n range.setStart(node, offset);\n range.setEnd(node, offset + text.length);\n const rect = range.getBoundingClientRect();\n\n offset += text.length;\n const boundAhead = rect.x > prev.x || rect.y > prev.y;\n\n prev = rect;\n if (i === 0) {\n return true;\n }\n\n return boundAhead;\n });\n\n document.body.removeChild(testElement);\n return supports;\n};\n\nconst testCORS = (): boolean => typeof new Image().crossOrigin !== 'undefined';\n\nconst testResponseType = (): boolean => typeof new XMLHttpRequest().responseType === 'string';\n\nconst testSVG = (document: Document): boolean => {\n const img = new Image();\n const canvas = document.createElement('canvas');\n const ctx = canvas.getContext('2d');\n if (!ctx) {\n return false;\n }\n\n img.src = `data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>`;\n\n try {\n ctx.drawImage(img, 0, 0);\n canvas.toDataURL();\n } catch (e) {\n return false;\n }\n return true;\n};\n\nconst isGreenPixel = (data: Uint8ClampedArray): boolean =>\n data[0] === 0 && data[1] === 255 && data[2] === 0 && data[3] === 255;\n\nconst testForeignObject = (document: Document): Promise<boolean> => {\n const canvas = document.createElement('canvas');\n const size = 100;\n canvas.width = size;\n canvas.height = size;\n const ctx = canvas.getContext('2d');\n if (!ctx) {\n return Promise.reject(false);\n }\n ctx.fillStyle = 'rgb(0, 255, 0)';\n ctx.fillRect(0, 0, size, size);\n\n const img = new Image();\n const greenImageSrc = canvas.toDataURL();\n img.src = greenImageSrc;\n const svg = createForeignObjectSVG(size, size, 0, 0, img);\n ctx.fillStyle = 'red';\n ctx.fillRect(0, 0, size, size);\n\n return loadSerializedSVG(svg)\n .then((img: HTMLImageElement) => {\n ctx.drawImage(img, 0, 0);\n const data = ctx.getImageData(0, 0, size, size).data;\n ctx.fillStyle = 'red';\n ctx.fillRect(0, 0, size, size);\n\n const node = document.createElement('div');\n node.style.backgroundImage = `url(${greenImageSrc})`;\n node.style.height = `${size}px`;\n // Firefox 55 does not render inline <img /> tags\n return isGreenPixel(data)\n ? loadSerializedSVG(createForeignObjectSVG(size, size, 0, 0, node))\n : Promise.reject(false);\n })\n .then((img: HTMLImageElement) => {\n ctx.drawImage(img, 0, 0);\n // Edge does not render background-images\n return isGreenPixel(ctx.getImageData(0, 0, size, size).data);\n })\n .catch(() => false);\n};\n\nexport const createForeignObjectSVG = (\n width: number,\n height: number,\n x: number,\n y: number,\n node: Node\n): SVGForeignObjectElement => {\n const xmlns = 'http://www.w3.org/2000/svg';\n const svg = document.createElementNS(xmlns, 'svg');\n const foreignObject = document.createElementNS(xmlns, 'foreignObject');\n svg.setAttributeNS(null, 'width', width.toString());\n svg.setAttributeNS(null, 'height', height.toString());\n\n foreignObject.setAttributeNS(null, 'width', '100%');\n foreignObject.setAttributeNS(null, 'height', '100%');\n foreignObject.setAttributeNS(null, 'x', x.toString());\n foreignObject.setAttributeNS(null, 'y', y.toString());\n foreignObject.setAttributeNS(null, 'externalResourcesRequired', 'true');\n svg.appendChild(foreignObject);\n\n foreignObject.appendChild(node);\n\n return svg;\n};\n\nexport const loadSerializedSVG = (svg: Node): Promise<HTMLImageElement> => {\n return new Promise((resolve, reject) => {\n const img = new Image();\n img.onload = () => resolve(img);\n img.onerror = reject;\n\n img.src = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(new XMLSerializer().serializeToString(svg))}`;\n });\n};\n\nexport const FEATURES = {\n get SUPPORT_RANGE_BOUNDS(): boolean {\n 'use strict';\n const value = testRangeBounds(document);\n Object.defineProperty(FEATURES, 'SUPPORT_RANGE_BOUNDS', {value});\n return value;\n },\n get SUPPORT_WORD_BREAKING(): boolean {\n 'use strict';\n const value = FEATURES.SUPPORT_RANGE_BOUNDS && testIOSLineBreak(document);\n Object.defineProperty(FEATURES, 'SUPPORT_WORD_BREAKING', {value});\n return value;\n },\n get SUPPORT_SVG_DRAWING(): boolean {\n 'use strict';\n const value = testSVG(document);\n Object.defineProperty(FEATURES, 'SUPPORT_SVG_DRAWING', {value});\n return value;\n },\n get SUPPORT_FOREIGNOBJECT_DRAWING(): Promise<boolean> {\n 'use strict';\n const value =\n typeof Array.from === 'function' && typeof window.fetch === 'function'\n ? testForeignObject(document)\n : Promise.resolve(false);\n Object.defineProperty(FEATURES, 'SUPPORT_FOREIGNOBJECT_DRAWING', {value});\n return value;\n },\n get SUPPORT_CORS_IMAGES(): boolean {\n 'use strict';\n const value = testCORS();\n Object.defineProperty(FEATURES, 'SUPPORT_CORS_IMAGES', {value});\n return value;\n },\n get SUPPORT_RESPONSE_TYPE(): boolean {\n 'use strict';\n const value = testResponseType();\n Object.defineProperty(FEATURES, 'SUPPORT_RESPONSE_TYPE', {value});\n return value;\n },\n get SUPPORT_CORS_XHR(): boolean {\n 'use strict';\n const value = 'withCredentials' in new XMLHttpRequest();\n Object.defineProperty(FEATURES, 'SUPPORT_CORS_XHR', {value});\n return value;\n },\n get SUPPORT_NATIVE_TEXT_SEGMENTATION(): boolean {\n 'use strict';\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const value = !!(typeof Intl !== 'undefined' && (Intl as any).Segmenter);\n Object.defineProperty(FEATURES, 'SUPPORT_NATIVE_TEXT_SEGMENTATION', {value});\n return value;\n }\n};\n","import {OVERFLOW_WRAP} from '../property-descriptors/overflow-wrap';\nimport {CSSParsedDeclaration} from '../index';\nimport {fromCodePoint, LineBreaker, toCodePoints} from 'css-line-break';\nimport {splitGraphemes} from 'text-segmentation';\nimport {Bounds, parseBounds} from './bounds';\nimport {FEATURES} from '../../core/features';\nimport {Context} from '../../core/context';\n\nexport class TextBounds {\n readonly text: string;\n readonly bounds: Bounds;\n\n constructor(text: string, bounds: Bounds) {\n this.text = text;\n this.bounds = bounds;\n }\n}\n\nexport const parseTextBounds = (\n context: Context,\n value: string,\n styles: CSSParsedDeclaration,\n node: Text\n): TextBounds[] => {\n const textList = breakText(value, styles);\n const textBounds: TextBounds[] = [];\n let offset = 0;\n textList.forEach((text) => {\n if (styles.textDecorationLine.length || text.trim().length > 0) {\n if (FEATURES.SUPPORT_RANGE_BOUNDS) {\n const clientRects = createRange(node, offset, text.length).getClientRects();\n if (clientRects.length > 1) {\n const subSegments = segmentGraphemes(text);\n let subOffset = 0;\n subSegments.forEach((subSegment) => {\n textBounds.push(\n new TextBounds(\n subSegment,\n Bounds.fromDOMRectList(\n context,\n createRange(node, subOffset + offset, subSegment.length).getClientRects()\n )\n )\n );\n subOffset += subSegment.length;\n });\n } else {\n textBounds.push(new TextBounds(text, Bounds.fromDOMRectList(context, clientRects)));\n }\n } else {\n const replacementNode = node.splitText(text.length);\n textBounds.push(new TextBounds(text, getWrapperBounds(context, node)));\n node = replacementNode;\n }\n } else if (!FEATURES.SUPPORT_RANGE_BOUNDS) {\n node = node.splitText(text.length);\n }\n offset += text.length;\n });\n\n return textBounds;\n};\n\nconst getWrapperBounds = (context: Context, node: Text): Bounds => {\n const ownerDocument = node.ownerDocument;\n if (ownerDocument) {\n const wrapper = ownerDocument.createElement('html2canvaswrapper');\n wrapper.appendChild(node.cloneNode(true));\n const parentNode = node.parentNode;\n if (parentNode) {\n parentNode.replaceChild(wrapper, node);\n const bounds = parseBounds(context, wrapper);\n if (wrapper.firstChild) {\n parentNode.replaceChild(wrapper.firstChild, wrapper);\n }\n return bounds;\n }\n }\n\n return Bounds.EMPTY;\n};\n\nconst createRange = (node: Text, offset: number, length: number): Range => {\n const ownerDocument = node.ownerDocument;\n if (!ownerDocument) {\n throw new Error('Node has no owner document');\n }\n const range = ownerDocument.createRange();\n range.setStart(node, offset);\n range.setEnd(node, offset + length);\n return range;\n};\n\nexport const segmentGraphemes = (value: string): string[] => {\n if (FEATURES.SUPPORT_NATIVE_TEXT_SEGMENTATION) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const segmenter = new (Intl as any).Segmenter(void 0, {granularity: 'grapheme'});\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return Array.from(segmenter.segment(value)).map((segment: any) => segment.segment);\n }\n\n return splitGraphemes(value);\n};\n\nconst segmentWords = (value: string, styles: CSSParsedDeclaration): string[] => {\n if (FEATURES.SUPPORT_NATIVE_TEXT_SEGMENTATION) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const segmenter = new (Intl as any).Segmenter(void 0, {\n granularity: 'word'\n });\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return Array.from(segmenter.segment(value)).map((segment: any) => segment.segment);\n }\n\n return breakWords(value, styles);\n};\n\nconst breakText = (value: string, styles: CSSParsedDeclaration): string[] => {\n return styles.letterSpacing !== 0 ? segmentGraphemes(value) : segmentWords(value, styles);\n};\n\n// https://drafts.csswg.org/css-text/#word-separator\nconst wordSeparators = [0x0020, 0x00a0, 0x1361, 0x10100, 0x10101, 0x1039, 0x1091];\n\nconst breakWords = (str: string, styles: CSSParsedDeclaration): string[] => {\n const breaker = LineBreaker(str, {\n lineBreak: styles.lineBreak,\n wordBreak: styles.overflowWrap === OVERFLOW_WRAP.BREAK_WORD ? 'break-word' : styles.wordBreak\n });\n\n const words = [];\n let bk;\n\n while (!(bk = breaker.next()).done) {\n if (bk.value) {\n const value = bk.value.slice();\n const codePoints = toCodePoints(value);\n let word = '';\n codePoints.forEach((codePoint) => {\n if (wordSeparators.indexOf(codePoint) === -1) {\n word += fromCodePoint(codePoint);\n } else {\n if (word.length) {\n words.push(word);\n }\n words.push(fromCodePoint(codePoint));\n word = '';\n }\n });\n\n if (word.length) {\n words.push(word);\n }\n }\n }\n\n return words;\n};\n","import {CSSParsedDeclaration} from '../css/index';\nimport {TEXT_TRANSFORM} from '../css/property-descriptors/text-transform';\nimport {parseTextBounds, TextBounds} from '../css/layout/text';\nimport {Context} from '../core/context';\n\nexport class TextContainer {\n text: string;\n textBounds: TextBounds[];\n\n constructor(context: Context, node: Text, styles: CSSParsedDeclaration) {\n this.text = transform(node.data, styles.textTransform);\n this.textBounds = parseTextBounds(context, this.text, styles, node);\n }\n}\n\nconst transform = (text: string, transform: TEXT_TRANSFORM) => {\n switch (transform) {\n case TEXT_TRANSFORM.LOWERCASE:\n return text.toLowerCase();\n case TEXT_TRANSFORM.CAPITALIZE:\n return text.replace(CAPITALIZE, capitalize);\n case TEXT_TRANSFORM.UPPERCASE:\n return text.toUpperCase();\n default:\n return text;\n }\n};\n\nconst CAPITALIZE = /(^|\\s|:|-|\\(|\\))([a-z])/g;\n\nconst capitalize = (m: string, p1: string, p2: string) => {\n if (m.length > 0) {\n return p1 + p2.toUpperCase();\n }\n\n return m;\n};\n","import {ElementContainer} from '../element-container';\nimport {Context} from '../../core/context';\n\nexport class ImageElementContainer extends ElementContainer {\n src: string;\n intrinsicWidth: number;\n intrinsicHeight: number;\n\n constructor(context: Context, img: HTMLImageElement) {\n super(context, img);\n this.src = img.currentSrc || img.src;\n this.intrinsicWidth = img.naturalWidth;\n this.intrinsicHeight = img.naturalHeight;\n this.context.cache.addImage(this.src);\n }\n}\n","import {ElementContainer} from '../element-container';\nimport {Context} from '../../core/context';\n\nexport class CanvasElementContainer extends ElementContainer {\n canvas: HTMLCanvasElement;\n intrinsicWidth: number;\n intrinsicHeight: number;\n\n constructor(context: Context, canvas: HTMLCanvasElement) {\n super(context, canvas);\n this.canvas = canvas;\n this.intrinsicWidth = canvas.width;\n this.intrinsicHeight = canvas.height;\n }\n}\n","import {ElementContainer} from '../element-container';\nimport {parseBounds} from '../../css/layout/bounds';\nimport {Context} from '../../core/context';\n\nexport class SVGElementContainer extends ElementContainer {\n svg: string;\n intrinsicWidth: number;\n intrinsicHeight: number;\n\n constructor(context: Context, img: SVGSVGElement) {\n super(context, img);\n const s = new XMLSerializer();\n const bounds = parseBounds(context, img);\n img.setAttribute('width', `${bounds.width}px`);\n img.setAttribute('height', `${bounds.height}px`);\n\n this.svg = `data:image/svg+xml,${encodeURIComponent(s.serializeToString(img))}`;\n this.intrinsicWidth = img.width.baseVal.value;\n this.intrinsicHeight = img.height.baseVal.value;\n\n this.context.cache.addImage(this.svg);\n }\n}\n","import {ElementContainer} from '../element-container';\nimport {Context} from '../../core/context';\nexport class LIElementContainer extends ElementContainer {\n readonly value: number;\n\n constructor(context: Context, element: HTMLLIElement) {\n super(context, element);\n this.value = element.value;\n }\n}\n","import {ElementContainer} from '../element-container';\nimport {Context} from '../../core/context';\nexport class OLElementContainer extends ElementContainer {\n readonly start: number;\n readonly reversed: boolean;\n\n constructor(context: Context, element: HTMLOListElement) {\n super(context, element);\n this.start = element.start;\n this.reversed = typeof element.reversed === 'boolean' && element.reversed === true;\n }\n}\n","import {ElementContainer} from '../element-container';\nimport {BORDER_STYLE} from '../../css/property-descriptors/border-style';\nimport {BACKGROUND_CLIP} from '../../css/property-descriptors/background-clip';\nimport {BACKGROUND_ORIGIN} from '../../css/property-descriptors/background-origin';\nimport {TokenType} from '../../css/syntax/tokenizer';\nimport {LengthPercentageTuple} from '../../css/types/length-percentage';\nimport {Bounds} from '../../css/layout/bounds';\nimport {Context} from '../../core/context';\n\nconst CHECKBOX_BORDER_RADIUS: LengthPercentageTuple = [\n {\n type: TokenType.DIMENSION_TOKEN,\n flags: 0,\n unit: 'px',\n number: 3\n }\n];\n\nconst RADIO_BORDER_RADIUS: LengthPercentageTuple = [\n {\n type: TokenType.PERCENTAGE_TOKEN,\n flags: 0,\n number: 50\n }\n];\n\nconst reformatInputBounds = (bounds: Bounds): Bounds => {\n if (bounds.width > bounds.height) {\n return new Bounds(bounds.left + (bounds.width - bounds.height) / 2, bounds.top, bounds.height, bounds.height);\n } else if (bounds.width < bounds.height) {\n return new Bounds(bounds.left, bounds.top + (bounds.height - bounds.width) / 2, bounds.width, bounds.width);\n }\n return bounds;\n};\n\nconst getInputValue = (node: HTMLInputElement): string => {\n const value = node.type === PASSWORD ? new Array(node.value.length + 1).join('\\u2022') : node.value;\n\n return value.length === 0 ? node.placeholder || '' : value;\n};\n\nexport const CHECKBOX = 'checkbox';\nexport const RADIO = 'radio';\nexport const PASSWORD = 'password';\nexport const INPUT_COLOR = 0x2a2a2aff;\n\nexport class InputElementContainer extends ElementContainer {\n readonly type: string;\n readonly checked: boolean;\n readonly value: string;\n\n constructor(context: Context, input: HTMLInputElement) {\n super(context, input);\n this.type = input.type.toLowerCase();\n this.checked = input.checked;\n this.value = getInputValue(input);\n\n if (this.type === CHECKBOX || this.type === RADIO) {\n this.styles.backgroundColor = 0xdededeff;\n this.styles.borderTopColor =\n this.styles.borderRightColor =\n this.styles.borderBottomColor =\n this.styles.borderLeftColor =\n 0xa5a5a5ff;\n this.styles.borderTopWidth =\n this.styles.borderRightWidth =\n this.styles.borderBottomWidth =\n this.styles.borderLeftWidth =\n 1;\n this.styles.borderTopStyle =\n this.styles.borderRightStyle =\n this.styles.borderBottomStyle =\n this.styles.borderLeftStyle =\n BORDER_STYLE.SOLID;\n this.styles.backgroundClip = [BACKGROUND_CLIP.BORDER_BOX];\n this.styles.backgroundOrigin = [BACKGROUND_ORIGIN.BORDER_BOX];\n this.bounds = reformatInputBounds(this.bounds);\n }\n\n switch (this.type) {\n case CHECKBOX:\n this.styles.borderTopRightRadius =\n this.styles.borderTopLeftRadius =\n this.styles.borderBottomRightRadius =\n this.styles.borderBottomLeftRadius =\n CHECKBOX_BORDER_RADIUS;\n break;\n case RADIO:\n this.styles.borderTopRightRadius =\n this.styles.borderTopLeftRadius =\n this.styles.borderBottomRightRadius =\n this.styles.borderBottomLeftRadius =\n RADIO_BORDER_RADIUS;\n break;\n }\n }\n}\n","import {ElementContainer} from '../element-container';\nimport {Context} from '../../core/context';\nexport class SelectElementContainer extends ElementContainer {\n readonly value: string;\n constructor(context: Context, element: HTMLSelectElement) {\n super(context, element);\n const option = element.options[element.selectedIndex || 0];\n this.value = option ? option.text || '' : '';\n }\n}\n","import {ElementContainer} from '../element-container';\nimport {Context} from '../../core/context';\nexport class TextareaElementContainer extends ElementContainer {\n readonly value: string;\n constructor(context: Context, element: HTMLTextAreaElement) {\n super(context, element);\n this.value = element.value;\n }\n}\n","import {ElementContainer} from '../element-container';\nimport {parseTree} from '../node-parser';\nimport {Color, parseColor, COLORS, isTransparent} from '../../css/types/color';\nimport {Context} from '../../core/context';\n\nexport class IFrameElementContainer extends ElementContainer {\n src: string;\n width: number;\n height: number;\n tree?: ElementContainer;\n backgroundColor: Color;\n\n constructor(context: Context, iframe: HTMLIFrameElement) {\n super(context, iframe);\n this.src = iframe.src;\n this.width = parseInt(iframe.width, 10) || 0;\n this.height = parseInt(iframe.height, 10) || 0;\n this.backgroundColor = this.styles.backgroundColor;\n try {\n if (\n iframe.contentWindow &&\n iframe.contentWindow.document &&\n iframe.contentWindow.document.documentElement\n ) {\n this.tree = parseTree(context, iframe.contentWindow.document.documentElement);\n\n // http://www.w3.org/TR/css3-background/#special-backgrounds\n const documentBackgroundColor = iframe.contentWindow.document.documentElement\n ? parseColor(\n context,\n getComputedStyle(iframe.contentWindow.document.documentElement).backgroundColor as string\n )\n : COLORS.TRANSPARENT;\n const bodyBackgroundColor = iframe.contentWindow.document.body\n ? parseColor(\n context,\n getComputedStyle(iframe.contentWindow.document.body).backgroundColor as string\n )\n : COLORS.TRANSPARENT;\n\n this.backgroundColor = isTransparent(documentBackgroundColor)\n ? isTransparent(bodyBackgroundColor)\n ? this.styles.backgroundColor\n : bodyBackgroundColor\n : documentBackgroundColor;\n }\n } catch (e) {}\n }\n}\n","import {CSSParsedDeclaration} from '../css';\nimport {ElementContainer, FLAGS} from './element-container';\nimport {TextContainer} from './text-container';\nimport {ImageElementContainer} from './replaced-elements/image-element-container';\nimport {CanvasElementContainer} from './replaced-elements/canvas-element-container';\nimport {SVGElementContainer} from './replaced-elements/svg-element-container';\nimport {LIElementContainer} from './elements/li-element-container';\nimport {OLElementContainer} from './elements/ol-element-container';\nimport {InputElementContainer} from './replaced-elements/input-element-container';\nimport {SelectElementContainer} from './elements/select-element-container';\nimport {TextareaElementContainer} from './elements/textarea-element-container';\nimport {IFrameElementContainer} from './replaced-elements/iframe-element-container';\nimport {Context} from '../core/context';\n\nconst LIST_OWNERS = ['OL', 'UL', 'MENU'];\n\nconst parseNodeTree = (context: Context, node: Node, parent: ElementContainer, root: ElementContainer) => {\n for (let childNode = node.firstChild, nextNode; childNode; childNode = nextNode) {\n nextNode = childNode.nextSibling;\n\n if (isTextNode(childNode) && childNode.data.trim().length > 0) {\n parent.textNodes.push(new TextContainer(context, childNode, parent.styles));\n } else if (isElementNode(childNode)) {\n if (isSlotElement(childNode) && childNode.assignedNodes) {\n childNode.assignedNodes().forEach((childNode) => parseNodeTree(context, childNode, parent, root));\n } else {\n const container = createContainer(context, childNode);\n if (container.styles.isVisible()) {\n if (createsRealStackingContext(childNode, container, root)) {\n container.flags |= FLAGS.CREATES_REAL_STACKING_CONTEXT;\n } else if (createsStackingContext(container.styles)) {\n container.flags |= FLAGS.CREATES_STACKING_CONTEXT;\n }\n\n if (LIST_OWNERS.indexOf(childNode.tagName) !== -1) {\n container.flags |= FLAGS.IS_LIST_OWNER;\n }\n\n parent.elements.push(container);\n childNode.slot;\n if (childNode.shadowRoot) {\n parseNodeTree(context, childNode.shadowRoot, container, root);\n } else if (\n !isTextareaElement(childNode) &&\n !isSVGElement(childNode) &&\n !isSelectElement(childNode)\n ) {\n parseNodeTree(context, childNode, container, root);\n }\n }\n }\n }\n }\n};\n\nconst createContainer = (context: Context, element: Element): ElementContainer => {\n if (isImageElement(element)) {\n return new ImageElementContainer(context, element);\n }\n\n if (isCanvasElement(element)) {\n return new CanvasElementContainer(context, element);\n }\n\n if (isSVGElement(element)) {\n return new SVGElementContainer(context, element);\n }\n\n if (isLIElement(element)) {\n return new LIElementContainer(context, element);\n }\n\n if (isOLElement(element)) {\n return new OLElementContainer(context, element);\n }\n\n if (isInputElement(element)) {\n return new InputElementContainer(context, element);\n }\n\n if (isSelectElement(element)) {\n return new SelectElementContainer(context, element);\n }\n\n if (isTextareaElement(element)) {\n return new TextareaElementContainer(context, element);\n }\n\n if (isIFrameElement(element)) {\n return new IFrameElementContainer(context, element);\n }\n\n return new ElementContainer(context, element);\n};\n\nexport const parseTree = (context: Context, element: HTMLElement): ElementContainer => {\n const container = createContainer(context, element);\n container.flags |= FLAGS.CREATES_REAL_STACKING_CONTEXT;\n parseNodeTree(context, element, container, container);\n return container;\n};\n\nconst createsRealStackingContext = (node: Element, container: ElementContainer, root: ElementContainer): boolean => {\n return (\n container.styles.isPositionedWithZIndex() ||\n container.styles.opacity < 1 ||\n container.styles.isTransformed() ||\n (isBodyElement(node) && root.styles.isTransparent())\n );\n};\n\nconst createsStackingContext = (styles: CSSParsedDeclaration): boolean => styles.isPositioned() || styles.isFloating();\n\nexport const isTextNode = (node: Node): node is Text => node.nodeType === Node.TEXT_NODE;\nexport const isElementNode = (node: Node): node is Element => node.nodeType === Node.ELEMENT_NODE;\nexport const isHTMLElementNode = (node: Node): node is HTMLElement =>\n isElementNode(node) && typeof (node as HTMLElement).style !== 'undefined' && !isSVGElementNode(node);\nexport const isSVGElementNode = (element: Element): element is SVGElement =>\n typeof (element as SVGElement).className === 'object';\nexport const isLIElement = (node: Element): node is HTMLLIElement => node.tagName === 'LI';\nexport const isOLElement = (node: Element): node is HTMLOListElement => node.tagName === 'OL';\nexport const isInputElement = (node: Element): node is HTMLInputElement => node.tagName === 'INPUT';\nexport const isHTMLElement = (node: Element): node is HTMLHtmlElement => node.tagName === 'HTML';\nexport const isSVGElement = (node: Element): node is SVGSVGElement => node.tagName === 'svg';\nexport const isBodyElement = (node: Element): node is HTMLBodyElement => node.tagName === 'BODY';\nexport const isCanvasElement = (node: Element): node is HTMLCanvasElement => node.tagName === 'CANVAS';\nexport const isVideoElement = (node: Element): node is HTMLVideoElement => node.tagName === 'VIDEO';\nexport const isImageElement = (node: Element): node is HTMLImageElement => node.tagName === 'IMG';\nexport const isIFrameElement = (node: Element): node is HTMLIFrameElement => node.tagName === 'IFRAME';\nexport const isStyleElement = (node: Element): node is HTMLStyleElement => node.tagName === 'STYLE';\nexport const isScriptElement = (node: Element): node is HTMLScriptElement => node.tagName === 'SCRIPT';\nexport const isTextareaElement = (node: Element): node is HTMLTextAreaElement => node.tagName === 'TEXTAREA';\nexport const isSelectElement = (node: Element): node is HTMLSelectElement => node.tagName === 'SELECT';\nexport const isSlotElement = (node: Element): node is HTMLSlotElement => node.tagName === 'SLOT';\n// https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name\nexport const isCustomElement = (node: Element): node is HTMLElement => node.tagName.indexOf('-') > 0;\n","import {LIST_STYLE_TYPE} from '../../property-descriptors/list-style-type';\nimport {fromCodePoint} from 'css-line-break';\nimport {contains} from '../../../core/bitwise';\nimport {CSSParsedCounterDeclaration} from '../../index';\n\nexport class CounterState {\n private readonly counters: {[key: string]: number[]} = {};\n\n getCounterValue(name: string): number {\n const counter = this.counters[name];\n\n if (counter && counter.length) {\n return counter[counter.length - 1];\n }\n return 1;\n }\n\n getCounterValues(name: string): readonly number[] {\n const counter = this.counters[name];\n return counter ? counter : [];\n }\n\n pop(counters: string[]): void {\n counters.forEach((counter) => this.counters[counter].pop());\n }\n\n parse(style: CSSParsedCounterDeclaration): string[] {\n const counterIncrement = style.counterIncrement;\n const counterReset = style.counterReset;\n let canReset = true;\n\n if (counterIncrement !== null) {\n counterIncrement.forEach((entry) => {\n const counter = this.counters[entry.counter];\n if (counter && entry.increment !== 0) {\n canReset = false;\n if (!counter.length) {\n counter.push(1);\n }\n counter[Math.max(0, counter.length - 1)] += entry.increment;\n }\n });\n }\n\n const counterNames: string[] = [];\n if (canReset) {\n counterReset.forEach((entry) => {\n let counter = this.counters[entry.counter];\n counterNames.push(entry.counter);\n if (!counter) {\n counter = this.counters[entry.counter] = [];\n }\n counter.push(entry.reset);\n });\n }\n\n return counterNames;\n }\n}\n\ninterface CounterSymbols {\n integers: number[];\n values: string[];\n}\n\nconst ROMAN_UPPER: CounterSymbols = {\n integers: [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1],\n values: ['M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I']\n};\n\nconst ARMENIAN: CounterSymbols = {\n integers: [\n 9000, 8000, 7000, 6000, 5000, 4000, 3000, 2000, 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 90, 80, 70,\n 60, 50, 40, 30, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1\n ],\n values: [\n 'Ք',\n 'Փ',\n 'Ւ',\n 'Ց',\n 'Ր',\n 'Տ',\n 'Վ',\n 'Ս',\n 'Ռ',\n 'Ջ',\n 'Պ',\n 'Չ',\n 'Ո',\n 'Շ',\n 'Ն',\n 'Յ',\n 'Մ',\n 'Ճ',\n 'Ղ',\n 'Ձ',\n 'Հ',\n 'Կ',\n 'Ծ',\n 'Խ',\n 'Լ',\n 'Ի',\n 'Ժ',\n 'Թ',\n 'Ը',\n 'Է',\n 'Զ',\n 'Ե',\n 'Դ',\n 'Գ',\n 'Բ',\n 'Ա'\n ]\n};\n\nconst HEBREW: CounterSymbols = {\n integers: [\n 10000, 9000, 8000, 7000, 6000, 5000, 4000, 3000, 2000, 1000, 400, 300, 200, 100, 90, 80, 70, 60, 50, 40, 30, 20,\n 19, 18, 17, 16, 15, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1\n ],\n values: [\n 'י׳',\n 'ט׳',\n 'ח׳',\n 'ז׳',\n 'ו׳',\n 'ה׳',\n 'ד׳',\n 'ג׳',\n 'ב׳',\n 'א׳',\n 'ת',\n 'ש',\n 'ר',\n 'ק',\n 'צ',\n 'פ',\n 'ע',\n 'ס',\n 'נ',\n 'מ',\n 'ל',\n 'כ',\n 'יט',\n 'יח',\n 'יז',\n 'טז',\n 'טו',\n 'י',\n 'ט',\n 'ח',\n 'ז',\n 'ו',\n 'ה',\n 'ד',\n 'ג',\n 'ב',\n 'א'\n ]\n};\n\nconst GEORGIAN: CounterSymbols = {\n integers: [\n 10000, 9000, 8000, 7000, 6000, 5000, 4000, 3000, 2000, 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 90,\n 80, 70, 60, 50, 40, 30, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1\n ],\n values: [\n 'ჵ',\n 'ჰ',\n 'ჯ',\n 'ჴ',\n 'ხ',\n 'ჭ',\n 'წ',\n 'ძ',\n 'ც',\n 'ჩ',\n 'შ',\n 'ყ',\n 'ღ',\n 'ქ',\n 'ფ',\n 'ჳ',\n 'ტ',\n 'ს',\n 'რ',\n 'ჟ',\n 'პ',\n 'ო',\n 'ჲ',\n 'ნ',\n 'მ',\n 'ლ',\n 'კ',\n 'ი',\n 'თ',\n 'ჱ',\n 'ზ',\n 'ვ',\n 'ე',\n 'დ',\n 'გ',\n 'ბ',\n 'ა'\n ]\n};\n\nconst createAdditiveCounter = (\n value: number,\n min: number,\n max: number,\n symbols: CounterSymbols,\n fallback: LIST_STYLE_TYPE,\n suffix: string\n) => {\n if (value < min || value > max) {\n return createCounterText(value, fallback, suffix.length > 0);\n }\n\n return (\n symbols.integers.reduce((string, integer, index) => {\n while (value >= integer) {\n value -= integer;\n string += symbols.values[index];\n }\n return string;\n }, '') + suffix\n );\n};\n\nconst createCounterStyleWithSymbolResolver = (\n value: number,\n codePointRangeLength: number,\n isNumeric: boolean,\n resolver: (codePoint: number) => string\n): string => {\n let string = '';\n\n do {\n if (!isNumeric) {\n value--;\n }\n string = resolver(value) + string;\n value /= codePointRangeLength;\n } while (value * codePointRangeLength >= codePointRangeLength);\n\n return string;\n};\n\nconst createCounterStyleFromRange = (\n value: number,\n codePointRangeStart: number,\n codePointRangeEnd: number,\n isNumeric: boolean,\n suffix: string\n): string => {\n const codePointRangeLength = codePointRangeEnd - codePointRangeStart + 1;\n\n return (\n (value < 0 ? '-' : '') +\n (createCounterStyleWithSymbolResolver(Math.abs(value), codePointRangeLength, isNumeric, (codePoint) =>\n fromCodePoint(Math.floor(codePoint % codePointRangeLength) + codePointRangeStart)\n ) +\n suffix)\n );\n};\n\nconst createCounterStyleFromSymbols = (value: number, symbols: string, suffix = '. '): string => {\n const codePointRangeLength = symbols.length;\n return (\n createCounterStyleWithSymbolResolver(\n Math.abs(value),\n codePointRangeLength,\n false,\n (codePoint) => symbols[Math.floor(codePoint % codePointRangeLength)]\n ) + suffix\n );\n};\n\nconst CJK_ZEROS = 1 << 0;\nconst CJK_TEN_COEFFICIENTS = 1 << 1;\nconst CJK_TEN_HIGH_COEFFICIENTS = 1 << 2;\nconst CJK_HUNDRED_COEFFICIENTS = 1 << 3;\n\nconst createCJKCounter = (\n value: number,\n numbers: string,\n multipliers: string,\n negativeSign: string,\n suffix: string,\n flags: number\n): string => {\n if (value < -9999 || value > 9999) {\n return createCounterText(value, LIST_STYLE_TYPE.CJK_DECIMAL, suffix.length > 0);\n }\n let tmp = Math.abs(value);\n let string = suffix;\n\n if (tmp === 0) {\n return numbers[0] + string;\n }\n\n for (let digit = 0; tmp > 0 && digit <= 4; digit++) {\n const coefficient = tmp % 10;\n\n if (coefficient === 0 && contains(flags, CJK_ZEROS) && string !== '') {\n string = numbers[coefficient] + string;\n } else if (\n coefficient > 1 ||\n (coefficient === 1 && digit === 0) ||\n (coefficient === 1 && digit === 1 && contains(flags, CJK_TEN_COEFFICIENTS)) ||\n (coefficient === 1 && digit === 1 && contains(flags, CJK_TEN_HIGH_COEFFICIENTS) && value > 100) ||\n (coefficient === 1 && digit > 1 && contains(flags, CJK_HUNDRED_COEFFICIENTS))\n ) {\n string = numbers[coefficient] + (digit > 0 ? multipliers[digit - 1] : '') + string;\n } else if (coefficient === 1 && digit > 0) {\n string = multipliers[digit - 1] + string;\n }\n tmp = Math.floor(tmp / 10);\n }\n\n return (value < 0 ? negativeSign : '') + string;\n};\n\nconst CHINESE_INFORMAL_MULTIPLIERS = '十百千萬';\nconst CHINESE_FORMAL_MULTIPLIERS = '拾佰仟萬';\nconst JAPANESE_NEGATIVE = 'マイナス';\nconst KOREAN_NEGATIVE = '마이너스';\n\nexport const createCounterText = (value: number, type: LIST_STYLE_TYPE, appendSuffix: boolean): string => {\n const defaultSuffix = appendSuffix ? '. ' : '';\n const cjkSuffix = appendSuffix ? '、' : '';\n const koreanSuffix = appendSuffix ? ', ' : '';\n const spaceSuffix = appendSuffix ? ' ' : '';\n switch (type) {\n case LIST_STYLE_TYPE.DISC:\n return '•' + spaceSuffix;\n case LIST_STYLE_TYPE.CIRCLE:\n return '◦' + spaceSuffix;\n case LIST_STYLE_TYPE.SQUARE:\n return '◾' + spaceSuffix;\n case LIST_STYLE_TYPE.DECIMAL_LEADING_ZERO:\n const string = createCounterStyleFromRange(value, 48, 57, true, defaultSuffix);\n return string.length < 4 ? `0${string}` : string;\n case LIST_STYLE_TYPE.CJK_DECIMAL:\n return createCounterStyleFromSymbols(value, '〇一二三四五六七八九', cjkSuffix);\n case LIST_STYLE_TYPE.LOWER_ROMAN:\n return createAdditiveCounter(\n value,\n 1,\n 3999,\n ROMAN_UPPER,\n LIST_STYLE_TYPE.DECIMAL,\n defaultSuffix\n ).toLowerCase();\n case LIST_STYLE_TYPE.UPPER_ROMAN:\n return createAdditiveCounter(value, 1, 3999, ROMAN_UPPER, LIST_STYLE_TYPE.DECIMAL, defaultSuffix);\n case LIST_STYLE_TYPE.LOWER_GREEK:\n return createCounterStyleFromRange(value, 945, 969, false, defaultSuffix);\n case LIST_STYLE_TYPE.LOWER_ALPHA:\n return createCounterStyleFromRange(value, 97, 122, false, defaultSuffix);\n case LIST_STYLE_TYPE.UPPER_ALPHA:\n return createCounterStyleFromRange(value, 65, 90, false, defaultSuffix);\n case LIST_STYLE_TYPE.ARABIC_INDIC:\n return createCounterStyleFromRange(value, 1632, 1641, true, defaultSuffix);\n case LIST_STYLE_TYPE.ARMENIAN:\n case LIST_STYLE_TYPE.UPPER_ARMENIAN:\n return createAdditiveCounter(value, 1, 9999, ARMENIAN, LIST_STYLE_TYPE.DECIMAL, defaultSuffix);\n case LIST_STYLE_TYPE.LOWER_ARMENIAN:\n return createAdditiveCounter(\n value,\n 1,\n 9999,\n ARMENIAN,\n LIST_STYLE_TYPE.DECIMAL,\n defaultSuffix\n ).toLowerCase();\n case LIST_STYLE_TYPE.BENGALI:\n return createCounterStyleFromRange(value, 2534, 2543, true, defaultSuffix);\n case LIST_STYLE_TYPE.CAMBODIAN:\n case LIST_STYLE_TYPE.KHMER:\n return createCounterStyleFromRange(value, 6112, 6121, true, defaultSuffix);\n case LIST_STYLE_TYPE.CJK_EARTHLY_BRANCH:\n return createCounterStyleFromSymbols(value, '子丑寅卯辰巳午未申酉戌亥', cjkSuffix);\n case LIST_STYLE_TYPE.CJK_HEAVENLY_STEM:\n return createCounterStyleFromSymbols(value, '甲乙丙丁戊己庚辛壬癸', cjkSuffix);\n case LIST_STYLE_TYPE.CJK_IDEOGRAPHIC:\n case LIST_STYLE_TYPE.TRAD_CHINESE_INFORMAL:\n return createCJKCounter(\n value,\n '零一二三四五六七八九',\n CHINESE_INFORMAL_MULTIPLIERS,\n '負',\n cjkSuffix,\n CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS\n );\n case LIST_STYLE_TYPE.TRAD_CHINESE_FORMAL:\n return createCJKCounter(\n value,\n '零壹貳參肆伍陸柒捌玖',\n CHINESE_FORMAL_MULTIPLIERS,\n '負',\n cjkSuffix,\n CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS\n );\n case LIST_STYLE_TYPE.SIMP_CHINESE_INFORMAL:\n return createCJKCounter(\n value,\n '零一二三四五六七八九',\n CHINESE_INFORMAL_MULTIPLIERS,\n '负',\n cjkSuffix,\n CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS\n );\n case LIST_STYLE_TYPE.SIMP_CHINESE_FORMAL:\n return createCJKCounter(\n value,\n '零壹贰叁肆伍陆柒捌玖',\n CHINESE_FORMAL_MULTIPLIERS,\n '负',\n cjkSuffix,\n CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS\n );\n case LIST_STYLE_TYPE.JAPANESE_INFORMAL:\n return createCJKCounter(value, '〇一二三四五六七八九', '十百千万', JAPANESE_NEGATIVE, cjkSuffix, 0);\n case LIST_STYLE_TYPE.JAPANESE_FORMAL:\n return createCJKCounter(\n value,\n '零壱弐参四伍六七八九',\n '拾百千万',\n JAPANESE_NEGATIVE,\n cjkSuffix,\n CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS\n );\n case LIST_STYLE_TYPE.KOREAN_HANGUL_FORMAL:\n return createCJKCounter(\n value,\n '영일이삼사오육칠팔구',\n '십백천만',\n KOREAN_NEGATIVE,\n koreanSuffix,\n CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS\n );\n case LIST_STYLE_TYPE.KOREAN_HANJA_INFORMAL:\n return createCJKCounter(value, '零一二三四五六七八九', '十百千萬', KOREAN_NEGATIVE, koreanSuffix, 0);\n case LIST_STYLE_TYPE.KOREAN_HANJA_FORMAL:\n return createCJKCounter(\n value,\n '零壹貳參四五六七八九',\n '拾百千',\n KOREAN_NEGATIVE,\n koreanSuffix,\n CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS\n );\n case LIST_STYLE_TYPE.DEVANAGARI:\n return createCounterStyleFromRange(value, 0x966, 0x96f, true, defaultSuffix);\n case LIST_STYLE_TYPE.GEORGIAN:\n return createAdditiveCounter(value, 1, 19999, GEORGIAN, LIST_STYLE_TYPE.DECIMAL, defaultSuffix);\n case LIST_STYLE_TYPE.GUJARATI:\n return createCounterStyleFromRange(value, 0xae6, 0xaef, true, defaultSuffix);\n case LIST_STYLE_TYPE.GURMUKHI:\n return createCounterStyleFromRange(value, 0xa66, 0xa6f, true, defaultSuffix);\n case LIST_STYLE_TYPE.HEBREW:\n return createAdditiveCounter(value, 1, 10999, HEBREW, LIST_STYLE_TYPE.DECIMAL, defaultSuffix);\n case LIST_STYLE_TYPE.HIRAGANA:\n return createCounterStyleFromSymbols(\n value,\n 'あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん'\n );\n case LIST_STYLE_TYPE.HIRAGANA_IROHA:\n return createCounterStyleFromSymbols(\n value,\n 'いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす'\n );\n case LIST_STYLE_TYPE.KANNADA:\n return createCounterStyleFromRange(value, 0xce6, 0xcef, true, defaultSuffix);\n case LIST_STYLE_TYPE.KATAKANA:\n return createCounterStyleFromSymbols(\n value,\n 'アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン',\n cjkSuffix\n );\n case LIST_STYLE_TYPE.KATAKANA_IROHA:\n return createCounterStyleFromSymbols(\n value,\n 'イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス',\n cjkSuffix\n );\n case LIST_STYLE_TYPE.LAO:\n return createCounterStyleFromRange(value, 0xed0, 0xed9, true, defaultSuffix);\n case LIST_STYLE_TYPE.MONGOLIAN:\n return createCounterStyleFromRange(value, 0x1810, 0x1819, true, defaultSuffix);\n case LIST_STYLE_TYPE.MYANMAR:\n return createCounterStyleFromRange(value, 0x1040, 0x1049, true, defaultSuffix);\n case LIST_STYLE_TYPE.ORIYA:\n return createCounterStyleFromRange(value, 0xb66, 0xb6f, true, defaultSuffix);\n case LIST_STYLE_TYPE.PERSIAN:\n return createCounterStyleFromRange(value, 0x6f0, 0x6f9, true, defaultSuffix);\n case LIST_STYLE_TYPE.TAMIL:\n return createCounterStyleFromRange(value, 0xbe6, 0xbef, true, defaultSuffix);\n case LIST_STYLE_TYPE.TELUGU:\n return createCounterStyleFromRange(value, 0xc66, 0xc6f, true, defaultSuffix);\n case LIST_STYLE_TYPE.THAI:\n return createCounterStyleFromRange(value, 0xe50, 0xe59, true, defaultSuffix);\n case LIST_STYLE_TYPE.TIBETAN:\n return createCounterStyleFromRange(value, 0xf20, 0xf29, true, defaultSuffix);\n case LIST_STYLE_TYPE.DECIMAL:\n default:\n return createCounterStyleFromRange(value, 48, 57, true, defaultSuffix);\n }\n};\n","import {Bounds} from '../css/layout/bounds';\nimport {\n isBodyElement,\n isCanvasElement,\n isCustomElement,\n isElementNode,\n isHTMLElementNode,\n isIFrameElement,\n isImageElement,\n isScriptElement,\n isSelectElement,\n isSlotElement,\n isStyleElement,\n isSVGElementNode,\n isTextareaElement,\n isTextNode,\n isVideoElement\n} from './node-parser';\nimport {isIdentToken, nonFunctionArgSeparator} from '../css/syntax/parser';\nimport {TokenType} from '../css/syntax/tokenizer';\nimport {CounterState, createCounterText} from '../css/types/functions/counter';\nimport {LIST_STYLE_TYPE, listStyleType} from '../css/property-descriptors/list-style-type';\nimport {CSSParsedCounterDeclaration, CSSParsedPseudoDeclaration} from '../css/index';\nimport {getQuote} from '../css/property-descriptors/quotes';\nimport {Context} from '../core/context';\nimport {DebuggerType, isDebugging} from '../core/debugger';\n\nexport interface CloneOptions {\n ignoreElements?: (element: Element) => boolean;\n onclone?: (document: Document, element: HTMLElement) => void;\n allowTaint?: boolean;\n}\n\nexport interface WindowOptions {\n scrollX: number;\n scrollY: number;\n windowWidth: number;\n windowHeight: number;\n}\n\nexport type CloneConfigurations = CloneOptions & {\n inlineImages: boolean;\n copyStyles: boolean;\n};\n\nconst IGNORE_ATTRIBUTE = 'data-html2canvas-ignore';\n\nexport class DocumentCloner {\n private readonly scrolledElements: [Element, number, number][];\n private readonly referenceElement: HTMLElement;\n clonedReferenceElement?: HTMLElement;\n private readonly documentElement: HTMLElement;\n private readonly counters: CounterState;\n private quoteDepth: number;\n\n constructor(\n private readonly context: Context,\n element: HTMLElement,\n private readonly options: CloneConfigurations\n ) {\n this.scrolledElements = [];\n this.referenceElement = element;\n this.counters = new CounterState();\n this.quoteDepth = 0;\n if (!element.ownerDocument) {\n throw new Error('Cloned element does not have an owner document');\n }\n\n this.documentElement = this.cloneNode(element.ownerDocument.documentElement, false) as HTMLElement;\n }\n\n toIFrame(ownerDocument: Document, windowSize: Bounds): Promise<HTMLIFrameElement> {\n const iframe: HTMLIFrameElement = createIFrameContainer(ownerDocument, windowSize);\n\n if (!iframe.contentWindow) {\n return Promise.reject(`Unable to find iframe window`);\n }\n\n const scrollX = (ownerDocument.defaultView as Window).pageXOffset;\n const scrollY = (ownerDocument.defaultView as Window).pageYOffset;\n\n const cloneWindow = iframe.contentWindow;\n const documentClone: Document = cloneWindow.document;\n\n /* Chrome doesn't detect relative background-images assigned in inline <style> sheets when fetched through getComputedStyle\n if window url is about:blank, we can assign the url to current by writing onto the document\n */\n\n const iframeLoad = iframeLoader(iframe).then(async () => {\n this.scrolledElements.forEach(restoreNodeScroll);\n if (cloneWindow) {\n cloneWindow.scrollTo(windowSize.left, windowSize.top);\n if (\n /(iPad|iPhone|iPod)/g.test(navigator.userAgent) &&\n (cloneWindow.scrollY !== windowSize.top || cloneWindow.scrollX !== windowSize.left)\n ) {\n this.context.logger.warn('Unable to restore scroll position for cloned document');\n this.context.windowBounds = this.context.windowBounds.add(\n cloneWindow.scrollX - windowSize.left,\n cloneWindow.scrollY - windowSize.top,\n 0,\n 0\n );\n }\n }\n\n const onclone = this.options.onclone;\n\n const referenceElement = this.clonedReferenceElement;\n\n if (typeof referenceElement === 'undefined') {\n return Promise.reject(`Error finding the ${this.referenceElement.nodeName} in the cloned document`);\n }\n\n if (documentClone.fonts && documentClone.fonts.ready) {\n await documentClone.fonts.ready;\n }\n\n if (/(AppleWebKit)/g.test(navigator.userAgent)) {\n await imagesReady(documentClone);\n }\n\n if (typeof onclone === 'function') {\n return Promise.resolve()\n .then(() => onclone(documentClone, referenceElement))\n .then(() => iframe);\n }\n\n return iframe;\n });\n\n documentClone.open();\n documentClone.write(`${serializeDoctype(document.doctype)}<html></html>`);\n // Chrome scrolls the parent document for some reason after the write to the cloned window???\n restoreOwnerScroll(this.referenceElement.ownerDocument, scrollX, scrollY);\n documentClone.replaceChild(documentClone.adoptNode(this.documentElement), documentClone.documentElement);\n documentClone.close();\n\n return iframeLoad;\n }\n\n createElementClone<T extends HTMLElement | SVGElement>(node: T): HTMLElement | SVGElement {\n if (isDebugging(node, DebuggerType.CLONE)) {\n debugger;\n }\n if (isCanvasElement(node)) {\n return this.createCanvasClone(node);\n }\n if (isVideoElement(node)) {\n return this.createVideoClone(node);\n }\n if (isStyleElement(node)) {\n return this.createStyleClone(node);\n }\n\n const clone = node.cloneNode(false) as T;\n if (isImageElement(clone)) {\n if (isImageElement(node) && node.currentSrc && node.currentSrc !== node.src) {\n clone.src = node.currentSrc;\n clone.srcset = '';\n }\n\n if (clone.loading === 'lazy') {\n clone.loading = 'eager';\n }\n }\n\n if (isCustomElement(clone)) {\n return this.createCustomElementClone(clone);\n }\n\n return clone;\n }\n\n createCustomElementClone(node: HTMLElement): HTMLElement {\n const clone = document.createElement('html2canvascustomelement');\n copyCSSStyles(node.style, clone);\n\n return clone;\n }\n\n createStyleClone(node: HTMLStyleElement): HTMLStyleElement {\n try {\n const sheet = node.sheet as CSSStyleSheet | undefined;\n if (sheet && sheet.cssRules) {\n const css: string = [].slice.call(sheet.cssRules, 0).reduce((css: string, rule: CSSRule) => {\n if (rule && typeof rule.cssText === 'string') {\n return css + rule.cssText;\n }\n return css;\n }, '');\n const style = node.cloneNode(false) as HTMLStyleElement;\n style.textContent = css;\n return style;\n }\n } catch (e) {\n // accessing node.sheet.cssRules throws a DOMException\n this.context.logger.error('Unable to access cssRules property', e);\n if (e.name !== 'SecurityError') {\n throw e;\n }\n }\n return node.cloneNode(false) as HTMLStyleElement;\n }\n\n createCanvasClone(canvas: HTMLCanvasElement): HTMLImageElement | HTMLCanvasElement {\n if (this.options.inlineImages && canvas.ownerDocument) {\n const img = canvas.ownerDocument.createElement('img');\n try {\n img.src = canvas.toDataURL();\n return img;\n } catch (e) {\n this.context.logger.info(`Unable to inline canvas contents, canvas is tainted`, canvas);\n }\n }\n\n const clonedCanvas = canvas.cloneNode(false) as HTMLCanvasElement;\n\n try {\n clonedCanvas.width = canvas.width;\n clonedCanvas.height = canvas.height;\n const ctx = canvas.getContext('2d');\n const clonedCtx = clonedCanvas.getContext('2d');\n if (clonedCtx) {\n if (!this.options.allowTaint && ctx) {\n clonedCtx.putImageData(ctx.getImageData(0, 0, canvas.width, canvas.height), 0, 0);\n } else {\n const gl = canvas.getContext('webgl2') ?? canvas.getContext('webgl');\n if (gl) {\n const attribs = gl.getContextAttributes();\n if (attribs?.preserveDrawingBuffer === false) {\n this.context.logger.warn(\n 'Unable to clone WebGL context as it has preserveDrawingBuffer=false',\n canvas\n );\n }\n }\n\n clonedCtx.drawImage(canvas, 0, 0);\n }\n }\n return clonedCanvas;\n } catch (e) {\n this.context.logger.info(`Unable to clone canvas as it is tainted`, canvas);\n }\n\n return clonedCanvas;\n }\n\n createVideoClone(video: HTMLVideoElement): HTMLCanvasElement {\n const canvas = video.ownerDocument.createElement('canvas');\n\n canvas.width = video.offsetWidth;\n canvas.height = video.offsetHeight;\n const ctx = canvas.getContext('2d');\n\n try {\n if (ctx) {\n ctx.drawImage(video, 0, 0, canvas.width, canvas.height);\n if (!this.options.allowTaint) {\n ctx.getImageData(0, 0, canvas.width, canvas.height);\n }\n }\n return canvas;\n } catch (e) {\n this.context.logger.info(`Unable to clone video as it is tainted`, video);\n }\n\n const blankCanvas = video.ownerDocument.createElement('canvas');\n\n blankCanvas.width = video.offsetWidth;\n blankCanvas.height = video.offsetHeight;\n return blankCanvas;\n }\n\n appendChildNode(clone: HTMLElement | SVGElement, child: Node, copyStyles: boolean): void {\n if (\n !isElementNode(child) ||\n (!isScriptElement(child) &&\n !child.hasAttribute(IGNORE_ATTRIBUTE) &&\n (typeof this.options.ignoreElements !== 'function' || !this.options.ignoreElements(child)))\n ) {\n if (!this.options.copyStyles || !isElementNode(child) || !isStyleElement(child)) {\n clone.appendChild(this.cloneNode(child, copyStyles));\n }\n }\n }\n\n cloneChildNodes(node: Element, clone: HTMLElement | SVGElement, copyStyles: boolean): void {\n for (\n let child = node.shadowRoot ? node.shadowRoot.firstChild : node.firstChild;\n child;\n child = child.nextSibling\n ) {\n if (isElementNode(child) && isSlotElement(child) && typeof child.assignedNodes === 'function') {\n const assignedNodes = child.assignedNodes() as ChildNode[];\n if (assignedNodes.length) {\n assignedNodes.forEach((assignedNode) => this.appendChildNode(clone, assignedNode, copyStyles));\n }\n } else {\n this.appendChildNode(clone, child, copyStyles);\n }\n }\n }\n\n cloneNode(node: Node, copyStyles: boolean): Node {\n if (isTextNode(node)) {\n return document.createTextNode(node.data);\n }\n\n if (!node.ownerDocument) {\n return node.cloneNode(false);\n }\n\n const window = node.ownerDocument.defaultView;\n\n if (window && isElementNode(node) && (isHTMLElementNode(node) || isSVGElementNode(node))) {\n const clone = this.createElementClone(node);\n clone.style.transitionProperty = 'none';\n\n const style = window.getComputedStyle(node);\n const styleBefore = window.getComputedStyle(node, ':before');\n const styleAfter = window.getComputedStyle(node, ':after');\n\n if (this.referenceElement === node && isHTMLElementNode(clone)) {\n this.clonedReferenceElement = clone;\n }\n if (isBodyElement(clone)) {\n createPseudoHideStyles(clone);\n }\n\n const counters = this.counters.parse(new CSSParsedCounterDeclaration(this.context, style));\n const before = this.resolvePseudoContent(node, clone, styleBefore, PseudoElementType.BEFORE);\n\n if (isCustomElement(node)) {\n copyStyles = true;\n }\n\n if (!isVideoElement(node)) {\n this.cloneChildNodes(node, clone, copyStyles);\n }\n\n if (before) {\n clone.insertBefore(before, clone.firstChild);\n }\n\n const after = this.resolvePseudoContent(node, clone, styleAfter, PseudoElementType.AFTER);\n if (after) {\n clone.appendChild(after);\n }\n\n this.counters.pop(counters);\n\n if (\n (style && (this.options.copyStyles || isSVGElementNode(node)) && !isIFrameElement(node)) ||\n copyStyles\n ) {\n copyCSSStyles(style, clone);\n }\n\n if (node.scrollTop !== 0 || node.scrollLeft !== 0) {\n this.scrolledElements.push([clone, node.scrollLeft, node.scrollTop]);\n }\n\n if (\n (isTextareaElement(node) || isSelectElement(node)) &&\n (isTextareaElement(clone) || isSelectElement(clone))\n ) {\n clone.value = node.value;\n }\n\n return clone;\n }\n\n return node.cloneNode(false);\n }\n\n resolvePseudoContent(\n node: Element,\n clone: Element,\n style: CSSStyleDeclaration,\n pseudoElt: PseudoElementType\n ): HTMLElement | void {\n if (!style) {\n return;\n }\n\n const value = style.content;\n const document = clone.ownerDocument;\n if (!document || !value || value === 'none' || value === '-moz-alt-content' || style.display === 'none') {\n return;\n }\n\n this.counters.parse(new CSSParsedCounterDeclaration(this.context, style));\n const declaration = new CSSParsedPseudoDeclaration(this.context, style);\n\n const anonymousReplacedElement = document.createElement('html2canvaspseudoelement');\n copyCSSStyles(style, anonymousReplacedElement);\n\n declaration.content.forEach((token) => {\n if (token.type === TokenType.STRING_TOKEN) {\n anonymousReplacedElement.appendChild(document.createTextNode(token.value));\n } else if (token.type === TokenType.URL_TOKEN) {\n const img = document.createElement('img');\n img.src = token.value;\n img.style.opacity = '1';\n anonymousReplacedElement.appendChild(img);\n } else if (token.type === TokenType.FUNCTION) {\n if (token.name === 'attr') {\n const attr = token.values.filter(isIdentToken);\n if (attr.length) {\n anonymousReplacedElement.appendChild(\n document.createTextNode(node.getAttribute(attr[0].value) || '')\n );\n }\n } else if (token.name === 'counter') {\n const [counter, counterStyle] = token.values.filter(nonFunctionArgSeparator);\n if (counter && isIdentToken(counter)) {\n const counterState = this.counters.getCounterValue(counter.value);\n const counterType =\n counterStyle && isIdentToken(counterStyle)\n ? listStyleType.parse(this.context, counterStyle.value)\n : LIST_STYLE_TYPE.DECIMAL;\n\n anonymousReplacedElement.appendChild(\n document.createTextNode(createCounterText(counterState, counterType, false))\n );\n }\n } else if (token.name === 'counters') {\n const [counter, delim, counterStyle] = token.values.filter(nonFunctionArgSeparator);\n if (counter && isIdentToken(counter)) {\n const counterStates = this.counters.getCounterValues(counter.value);\n const counterType =\n counterStyle && isIdentToken(counterStyle)\n ? listStyleType.parse(this.context, counterStyle.value)\n : LIST_STYLE_TYPE.DECIMAL;\n const separator = delim && delim.type === TokenType.STRING_TOKEN ? delim.value : '';\n const text = counterStates\n .map((value) => createCounterText(value, counterType, false))\n .join(separator);\n\n anonymousReplacedElement.appendChild(document.createTextNode(text));\n }\n } else {\n // console.log('FUNCTION_TOKEN', token);\n }\n } else if (token.type === TokenType.IDENT_TOKEN) {\n switch (token.value) {\n case 'open-quote':\n anonymousReplacedElement.appendChild(\n document.createTextNode(getQuote(declaration.quotes, this.quoteDepth++, true))\n );\n break;\n case 'close-quote':\n anonymousReplacedElement.appendChild(\n document.createTextNode(getQuote(declaration.quotes, --this.quoteDepth, false))\n );\n break;\n default:\n // safari doesn't parse string tokens correctly because of lack of quotes\n anonymousReplacedElement.appendChild(document.createTextNode(token.value));\n }\n }\n });\n\n anonymousReplacedElement.className = `${PSEUDO_HIDE_ELEMENT_CLASS_BEFORE} ${PSEUDO_HIDE_ELEMENT_CLASS_AFTER}`;\n const newClassName =\n pseudoElt === PseudoElementType.BEFORE\n ? ` ${PSEUDO_HIDE_ELEMENT_CLASS_BEFORE}`\n : ` ${PSEUDO_HIDE_ELEMENT_CLASS_AFTER}`;\n\n if (isSVGElementNode(clone)) {\n clone.className.baseValue += newClassName;\n } else {\n clone.className += newClassName;\n }\n\n return anonymousReplacedElement;\n }\n\n static destroy(container: HTMLIFrameElement): boolean {\n if (container.parentNode) {\n container.parentNode.removeChild(container);\n return true;\n }\n return false;\n }\n}\n\nenum PseudoElementType {\n BEFORE,\n AFTER\n}\n\nconst createIFrameContainer = (ownerDocument: Document, bounds: Bounds): HTMLIFrameElement => {\n const cloneIframeContainer = ownerDocument.createElement('iframe');\n\n cloneIframeContainer.className = 'html2canvas-container';\n cloneIframeContainer.style.visibility = 'hidden';\n cloneIframeContainer.style.position = 'fixed';\n cloneIframeContainer.style.left = '-10000px';\n cloneIframeContainer.style.top = '0px';\n cloneIframeContainer.style.border = '0';\n cloneIframeContainer.width = bounds.width.toString();\n cloneIframeContainer.height = bounds.height.toString();\n cloneIframeContainer.scrolling = 'no'; // ios won't scroll without it\n cloneIframeContainer.setAttribute(IGNORE_ATTRIBUTE, 'true');\n ownerDocument.body.appendChild(cloneIframeContainer);\n\n return cloneIframeContainer;\n};\n\nconst imageReady = (img: HTMLImageElement): Promise<Event | void | string> => {\n return new Promise((resolve) => {\n if (img.complete) {\n resolve();\n return;\n }\n if (!img.src) {\n resolve();\n return;\n }\n img.onload = resolve;\n img.onerror = resolve;\n });\n};\n\nconst imagesReady = (document: HTMLDocument): Promise<unknown[]> => {\n return Promise.all([].slice.call(document.images, 0).map(imageReady));\n};\n\nconst iframeLoader = (iframe: HTMLIFrameElement): Promise<HTMLIFrameElement> => {\n return new Promise((resolve, reject) => {\n const cloneWindow = iframe.contentWindow;\n\n if (!cloneWindow) {\n return reject(`No window assigned for iframe`);\n }\n\n const documentClone = cloneWindow.document;\n\n cloneWindow.onload = iframe.onload = () => {\n cloneWindow.onload = iframe.onload = null;\n const interval = setInterval(() => {\n if (documentClone.body.childNodes.length > 0 && documentClone.readyState === 'complete') {\n clearInterval(interval);\n resolve(iframe);\n }\n }, 50);\n };\n });\n};\n\nconst ignoredStyleProperties = [\n 'all', // #2476\n 'd', // #2483\n 'content' // Safari shows pseudoelements if content is set\n];\n\nexport const copyCSSStyles = <T extends HTMLElement | SVGElement>(style: CSSStyleDeclaration, target: T): T => {\n // Edge does not provide value for cssText\n for (let i = style.length - 1; i >= 0; i--) {\n const property = style.item(i);\n if (ignoredStyleProperties.indexOf(property) === -1) {\n target.style.setProperty(property, style.getPropertyValue(property));\n }\n }\n return target;\n};\n\nconst serializeDoctype = (doctype?: DocumentType | null): string => {\n let str = '';\n if (doctype) {\n str += '<!DOCTYPE ';\n if (doctype.name) {\n str += doctype.name;\n }\n\n if (doctype.internalSubset) {\n str += doctype.internalSubset;\n }\n\n if (doctype.publicId) {\n str += `\"${doctype.publicId}\"`;\n }\n\n if (doctype.systemId) {\n str += `\"${doctype.systemId}\"`;\n }\n\n str += '>';\n }\n\n return str;\n};\n\nconst restoreOwnerScroll = (ownerDocument: Document | null, x: number, y: number) => {\n if (\n ownerDocument &&\n ownerDocument.defaultView &&\n (x !== ownerDocument.defaultView.pageXOffset || y !== ownerDocument.defaultView.pageYOffset)\n ) {\n ownerDocument.defaultView.scrollTo(x, y);\n }\n};\n\nconst restoreNodeScroll = ([element, x, y]: [HTMLElement, number, number]) => {\n element.scrollLeft = x;\n element.scrollTop = y;\n};\n\nconst PSEUDO_BEFORE = ':before';\nconst PSEUDO_AFTER = ':after';\nconst PSEUDO_HIDE_ELEMENT_CLASS_BEFORE = '___html2canvas___pseudoelement_before';\nconst PSEUDO_HIDE_ELEMENT_CLASS_AFTER = '___html2canvas___pseudoelement_after';\n\nconst PSEUDO_HIDE_ELEMENT_STYLE = `{\n content: \"\" !important;\n display: none !important;\n}`;\n\nconst createPseudoHideStyles = (body: HTMLElement) => {\n createStyles(\n body,\n `.${PSEUDO_HIDE_ELEMENT_CLASS_BEFORE}${PSEUDO_BEFORE}${PSEUDO_HIDE_ELEMENT_STYLE}\n .${PSEUDO_HIDE_ELEMENT_CLASS_AFTER}${PSEUDO_AFTER}${PSEUDO_HIDE_ELEMENT_STYLE}`\n );\n};\n\nconst createStyles = (body: HTMLElement, styles: string) => {\n const document = body.ownerDocument;\n if (document) {\n const style = document.createElement('style');\n style.textContent = styles;\n body.appendChild(style);\n }\n};\n","import {FEATURES} from './features';\nimport {Context} from './context';\n\nexport class CacheStorage {\n private static _link?: HTMLAnchorElement;\n private static _origin = 'about:blank';\n\n static getOrigin(url: string): string {\n const link = CacheStorage._link;\n if (!link) {\n return 'about:blank';\n }\n\n link.href = url;\n link.href = link.href; // IE9, LOL! - http://jsfiddle.net/niklasvh/2e48b/\n return link.protocol + link.hostname + link.port;\n }\n\n static isSameOrigin(src: string): boolean {\n return CacheStorage.getOrigin(src) === CacheStorage._origin;\n }\n\n static setContext(window: Window): void {\n CacheStorage._link = window.document.createElement('a');\n CacheStorage._origin = CacheStorage.getOrigin(window.location.href);\n }\n}\n\nexport interface ResourceOptions {\n imageTimeout: number;\n useCORS: boolean;\n allowTaint: boolean;\n proxy?: string;\n}\n\nexport class Cache {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly _cache: {[key: string]: Promise<any>} = {};\n\n constructor(private readonly context: Context, private readonly _options: ResourceOptions) {}\n\n addImage(src: string): Promise<void> {\n const result = Promise.resolve();\n if (this.has(src)) {\n return result;\n }\n\n if (isBlobImage(src) || isRenderable(src)) {\n (this._cache[src] = this.loadImage(src)).catch(() => {\n // prevent unhandled rejection\n });\n return result;\n }\n\n return result;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n match(src: string): Promise<any> {\n return this._cache[src];\n }\n\n private async loadImage(key: string) {\n const isSameOrigin = CacheStorage.isSameOrigin(key);\n const useCORS =\n !isInlineImage(key) && this._options.useCORS === true && FEATURES.SUPPORT_CORS_IMAGES && !isSameOrigin;\n const useProxy =\n !isInlineImage(key) &&\n !isSameOrigin &&\n !isBlobImage(key) &&\n typeof this._options.proxy === 'string' &&\n FEATURES.SUPPORT_CORS_XHR &&\n !useCORS;\n if (\n !isSameOrigin &&\n this._options.allowTaint === false &&\n !isInlineImage(key) &&\n !isBlobImage(key) &&\n !useProxy &&\n !useCORS\n ) {\n return;\n }\n\n let src = key;\n if (useProxy) {\n src = await this.proxy(src);\n }\n\n this.context.logger.debug(`Added image ${key.substring(0, 256)}`);\n\n return await new Promise((resolve, reject) => {\n const img = new Image();\n img.onload = () => resolve(img);\n img.onerror = reject;\n //ios safari 10.3 taints canvas with data urls unless crossOrigin is set to anonymous\n if (isInlineBase64Image(src) || useCORS) {\n img.crossOrigin = 'anonymous';\n }\n img.src = src;\n if (img.complete === true) {\n // Inline XML images may fail to parse, throwing an Error later on\n setTimeout(() => resolve(img), 500);\n }\n if (this._options.imageTimeout > 0) {\n setTimeout(\n () => reject(`Timed out (${this._options.imageTimeout}ms) loading image`),\n this._options.imageTimeout\n );\n }\n });\n }\n\n private has(key: string): boolean {\n return typeof this._cache[key] !== 'undefined';\n }\n\n keys(): Promise<string[]> {\n return Promise.resolve(Object.keys(this._cache));\n }\n\n private proxy(src: string): Promise<string> {\n const proxy = this._options.proxy;\n\n if (!proxy) {\n throw new Error('No proxy defined');\n }\n\n const key = src.substring(0, 256);\n\n return new Promise((resolve, reject) => {\n const responseType = FEATURES.SUPPORT_RESPONSE_TYPE ? 'blob' : 'text';\n const xhr = new XMLHttpRequest();\n xhr.onload = () => {\n if (xhr.status === 200) {\n if (responseType === 'text') {\n resolve(xhr.response);\n } else {\n const reader = new FileReader();\n reader.addEventListener('load', () => resolve(reader.result as string), false);\n reader.addEventListener('error', (e) => reject(e), false);\n reader.readAsDataURL(xhr.response);\n }\n } else {\n reject(`Failed to proxy resource ${key} with status code ${xhr.status}`);\n }\n };\n\n xhr.onerror = reject;\n const queryString = proxy.indexOf('?') > -1 ? '&' : '?';\n xhr.open('GET', `${proxy}${queryString}url=${encodeURIComponent(src)}&responseType=${responseType}`);\n\n if (responseType !== 'text' && xhr instanceof XMLHttpRequest) {\n xhr.responseType = responseType;\n }\n\n if (this._options.imageTimeout) {\n const timeout = this._options.imageTimeout;\n xhr.timeout = timeout;\n xhr.ontimeout = () => reject(`Timed out (${timeout}ms) proxying ${key}`);\n }\n\n xhr.send();\n });\n }\n}\n\nconst INLINE_SVG = /^data:image\\/svg\\+xml/i;\nconst INLINE_BASE64 = /^data:image\\/.*;base64,/i;\nconst INLINE_IMG = /^data:image\\/.*/i;\n\nconst isRenderable = (src: string): boolean => FEATURES.SUPPORT_SVG_DRAWING || !isSVG(src);\nconst isInlineImage = (src: string): boolean => INLINE_IMG.test(src);\nconst isInlineBase64Image = (src: string): boolean => INLINE_BASE64.test(src);\nconst isBlobImage = (src: string): boolean => src.substr(0, 4) === 'blob';\n\nconst isSVG = (src: string): boolean => src.substr(-3).toLowerCase() === 'svg' || INLINE_SVG.test(src);\n","import {IPath, Path, PathType} from './path';\n\nexport class Vector implements IPath {\n type: PathType;\n x: number;\n y: number;\n\n constructor(x: number, y: number) {\n this.type = PathType.VECTOR;\n this.x = x;\n this.y = y;\n }\n\n add(deltaX: number, deltaY: number): Vector {\n return new Vector(this.x + deltaX, this.y + deltaY);\n }\n}\n\nexport const isVector = (path: Path): path is Vector => path.type === PathType.VECTOR;\n","import {Vector} from './vector';\nimport {IPath, PathType, Path} from './path';\n\nconst lerp = (a: Vector, b: Vector, t: number): Vector => {\n return new Vector(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t);\n};\n\nexport class BezierCurve implements IPath {\n type: PathType;\n start: Vector;\n startControl: Vector;\n endControl: Vector;\n end: Vector;\n\n constructor(start: Vector, startControl: Vector, endControl: Vector, end: Vector) {\n this.type = PathType.BEZIER_CURVE;\n this.start = start;\n this.startControl = startControl;\n this.endControl = endControl;\n this.end = end;\n }\n\n subdivide(t: number, firstHalf: boolean): BezierCurve {\n const ab = lerp(this.start, this.startControl, t);\n const bc = lerp(this.startControl, this.endControl, t);\n const cd = lerp(this.endControl, this.end, t);\n const abbc = lerp(ab, bc, t);\n const bccd = lerp(bc, cd, t);\n const dest = lerp(abbc, bccd, t);\n return firstHalf ? new BezierCurve(this.start, ab, abbc, dest) : new BezierCurve(dest, bccd, cd, this.end);\n }\n\n add(deltaX: number, deltaY: number): BezierCurve {\n return new BezierCurve(\n this.start.add(deltaX, deltaY),\n this.startControl.add(deltaX, deltaY),\n this.endControl.add(deltaX, deltaY),\n this.end.add(deltaX, deltaY)\n );\n }\n\n reverse(): BezierCurve {\n return new BezierCurve(this.end, this.endControl, this.startControl, this.start);\n }\n}\n\nexport const isBezierCurve = (path: Path): path is BezierCurve => path.type === PathType.BEZIER_CURVE;\n","import {ElementContainer} from '../dom/element-container';\nimport {getAbsoluteValue, getAbsoluteValueForTuple} from '../css/types/length-percentage';\nimport {Vector} from './vector';\nimport {BezierCurve} from './bezier-curve';\nimport {Path} from './path';\n\nexport class BoundCurves {\n readonly topLeftBorderDoubleOuterBox: Path;\n readonly topRightBorderDoubleOuterBox: Path;\n readonly bottomRightBorderDoubleOuterBox: Path;\n readonly bottomLeftBorderDoubleOuterBox: Path;\n readonly topLeftBorderDoubleInnerBox: Path;\n readonly topRightBorderDoubleInnerBox: Path;\n readonly bottomRightBorderDoubleInnerBox: Path;\n readonly bottomLeftBorderDoubleInnerBox: Path;\n readonly topLeftBorderStroke: Path;\n readonly topRightBorderStroke: Path;\n readonly bottomRightBorderStroke: Path;\n readonly bottomLeftBorderStroke: Path;\n readonly topLeftBorderBox: Path;\n readonly topRightBorderBox: Path;\n readonly bottomRightBorderBox: Path;\n readonly bottomLeftBorderBox: Path;\n readonly topLeftPaddingBox: Path;\n readonly topRightPaddingBox: Path;\n readonly bottomRightPaddingBox: Path;\n readonly bottomLeftPaddingBox: Path;\n readonly topLeftContentBox: Path;\n readonly topRightContentBox: Path;\n readonly bottomRightContentBox: Path;\n readonly bottomLeftContentBox: Path;\n\n constructor(element: ElementContainer) {\n const styles = element.styles;\n const bounds = element.bounds;\n\n let [tlh, tlv] = getAbsoluteValueForTuple(styles.borderTopLeftRadius, bounds.width, bounds.height);\n let [trh, trv] = getAbsoluteValueForTuple(styles.borderTopRightRadius, bounds.width, bounds.height);\n let [brh, brv] = getAbsoluteValueForTuple(styles.borderBottomRightRadius, bounds.width, bounds.height);\n let [blh, blv] = getAbsoluteValueForTuple(styles.borderBottomLeftRadius, bounds.width, bounds.height);\n\n const factors = [];\n factors.push((tlh + trh) / bounds.width);\n factors.push((blh + brh) / bounds.width);\n factors.push((tlv + blv) / bounds.height);\n factors.push((trv + brv) / bounds.height);\n const maxFactor = Math.max(...factors);\n\n if (maxFactor > 1) {\n tlh /= maxFactor;\n tlv /= maxFactor;\n trh /= maxFactor;\n trv /= maxFactor;\n brh /= maxFactor;\n brv /= maxFactor;\n blh /= maxFactor;\n blv /= maxFactor;\n }\n\n const topWidth = bounds.width - trh;\n const rightHeight = bounds.height - brv;\n const bottomWidth = bounds.width - brh;\n const leftHeight = bounds.height - blv;\n\n const borderTopWidth = styles.borderTopWidth;\n const borderRightWidth = styles.borderRightWidth;\n const borderBottomWidth = styles.borderBottomWidth;\n const borderLeftWidth = styles.borderLeftWidth;\n\n const paddingTop = getAbsoluteValue(styles.paddingTop, element.bounds.width);\n const paddingRight = getAbsoluteValue(styles.paddingRight, element.bounds.width);\n const paddingBottom = getAbsoluteValue(styles.paddingBottom, element.bounds.width);\n const paddingLeft = getAbsoluteValue(styles.paddingLeft, element.bounds.width);\n\n this.topLeftBorderDoubleOuterBox =\n tlh > 0 || tlv > 0\n ? getCurvePoints(\n bounds.left + borderLeftWidth / 3,\n bounds.top + borderTopWidth / 3,\n tlh - borderLeftWidth / 3,\n tlv - borderTopWidth / 3,\n CORNER.TOP_LEFT\n )\n : new Vector(bounds.left + borderLeftWidth / 3, bounds.top + borderTopWidth / 3);\n this.topRightBorderDoubleOuterBox =\n tlh > 0 || tlv > 0\n ? getCurvePoints(\n bounds.left + topWidth,\n bounds.top + borderTopWidth / 3,\n trh - borderRightWidth / 3,\n trv - borderTopWidth / 3,\n CORNER.TOP_RIGHT\n )\n : new Vector(bounds.left + bounds.width - borderRightWidth / 3, bounds.top + borderTopWidth / 3);\n this.bottomRightBorderDoubleOuterBox =\n brh > 0 || brv > 0\n ? getCurvePoints(\n bounds.left + bottomWidth,\n bounds.top + rightHeight,\n brh - borderRightWidth / 3,\n brv - borderBottomWidth / 3,\n CORNER.BOTTOM_RIGHT\n )\n : new Vector(\n bounds.left + bounds.width - borderRightWidth / 3,\n bounds.top + bounds.height - borderBottomWidth / 3\n );\n this.bottomLeftBorderDoubleOuterBox =\n blh > 0 || blv > 0\n ? getCurvePoints(\n bounds.left + borderLeftWidth / 3,\n bounds.top + leftHeight,\n blh - borderLeftWidth / 3,\n blv - borderBottomWidth / 3,\n CORNER.BOTTOM_LEFT\n )\n : new Vector(bounds.left + borderLeftWidth / 3, bounds.top + bounds.height - borderBottomWidth / 3);\n this.topLeftBorderDoubleInnerBox =\n tlh > 0 || tlv > 0\n ? getCurvePoints(\n bounds.left + (borderLeftWidth * 2) / 3,\n bounds.top + (borderTopWidth * 2) / 3,\n tlh - (borderLeftWidth * 2) / 3,\n tlv - (borderTopWidth * 2) / 3,\n CORNER.TOP_LEFT\n )\n : new Vector(bounds.left + (borderLeftWidth * 2) / 3, bounds.top + (borderTopWidth * 2) / 3);\n this.topRightBorderDoubleInnerBox =\n tlh > 0 || tlv > 0\n ? getCurvePoints(\n bounds.left + topWidth,\n bounds.top + (borderTopWidth * 2) / 3,\n trh - (borderRightWidth * 2) / 3,\n trv - (borderTopWidth * 2) / 3,\n CORNER.TOP_RIGHT\n )\n : new Vector(\n bounds.left + bounds.width - (borderRightWidth * 2) / 3,\n bounds.top + (borderTopWidth * 2) / 3\n );\n this.bottomRightBorderDoubleInnerBox =\n brh > 0 || brv > 0\n ? getCurvePoints(\n bounds.left + bottomWidth,\n bounds.top + rightHeight,\n brh - (borderRightWidth * 2) / 3,\n brv - (borderBottomWidth * 2) / 3,\n CORNER.BOTTOM_RIGHT\n )\n : new Vector(\n bounds.left + bounds.width - (borderRightWidth * 2) / 3,\n bounds.top + bounds.height - (borderBottomWidth * 2) / 3\n );\n this.bottomLeftBorderDoubleInnerBox =\n blh > 0 || blv > 0\n ? getCurvePoints(\n bounds.left + (borderLeftWidth * 2) / 3,\n bounds.top + leftHeight,\n blh - (borderLeftWidth * 2) / 3,\n blv - (borderBottomWidth * 2) / 3,\n CORNER.BOTTOM_LEFT\n )\n : new Vector(\n bounds.left + (borderLeftWidth * 2) / 3,\n bounds.top + bounds.height - (borderBottomWidth * 2) / 3\n );\n this.topLeftBorderStroke =\n tlh > 0 || tlv > 0\n ? getCurvePoints(\n bounds.left + borderLeftWidth / 2,\n bounds.top + borderTopWidth / 2,\n tlh - borderLeftWidth / 2,\n tlv - borderTopWidth / 2,\n CORNER.TOP_LEFT\n )\n : new Vector(bounds.left + borderLeftWidth / 2, bounds.top + borderTopWidth / 2);\n this.topRightBorderStroke =\n tlh > 0 || tlv > 0\n ? getCurvePoints(\n bounds.left + topWidth,\n bounds.top + borderTopWidth / 2,\n trh - borderRightWidth / 2,\n trv - borderTopWidth / 2,\n CORNER.TOP_RIGHT\n )\n : new Vector(bounds.left + bounds.width - borderRightWidth / 2, bounds.top + borderTopWidth / 2);\n this.bottomRightBorderStroke =\n brh > 0 || brv > 0\n ? getCurvePoints(\n bounds.left + bottomWidth,\n bounds.top + rightHeight,\n brh - borderRightWidth / 2,\n brv - borderBottomWidth / 2,\n CORNER.BOTTOM_RIGHT\n )\n : new Vector(\n bounds.left + bounds.width - borderRightWidth / 2,\n bounds.top + bounds.height - borderBottomWidth / 2\n );\n this.bottomLeftBorderStroke =\n blh > 0 || blv > 0\n ? getCurvePoints(\n bounds.left + borderLeftWidth / 2,\n bounds.top + leftHeight,\n blh - borderLeftWidth / 2,\n blv - borderBottomWidth / 2,\n CORNER.BOTTOM_LEFT\n )\n : new Vector(bounds.left + borderLeftWidth / 2, bounds.top + bounds.height - borderBottomWidth / 2);\n this.topLeftBorderBox =\n tlh > 0 || tlv > 0\n ? getCurvePoints(bounds.left, bounds.top, tlh, tlv, CORNER.TOP_LEFT)\n : new Vector(bounds.left, bounds.top);\n this.topRightBorderBox =\n trh > 0 || trv > 0\n ? getCurvePoints(bounds.left + topWidth, bounds.top, trh, trv, CORNER.TOP_RIGHT)\n : new Vector(bounds.left + bounds.width, bounds.top);\n this.bottomRightBorderBox =\n brh > 0 || brv > 0\n ? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh, brv, CORNER.BOTTOM_RIGHT)\n : new Vector(bounds.left + bounds.width, bounds.top + bounds.height);\n this.bottomLeftBorderBox =\n blh > 0 || blv > 0\n ? getCurvePoints(bounds.left, bounds.top + leftHeight, blh, blv, CORNER.BOTTOM_LEFT)\n : new Vector(bounds.left, bounds.top + bounds.height);\n this.topLeftPaddingBox =\n tlh > 0 || tlv > 0\n ? getCurvePoints(\n bounds.left + borderLeftWidth,\n bounds.top + borderTopWidth,\n Math.max(0, tlh - borderLeftWidth),\n Math.max(0, tlv - borderTopWidth),\n CORNER.TOP_LEFT\n )\n : new Vector(bounds.left + borderLeftWidth, bounds.top + borderTopWidth);\n this.topRightPaddingBox =\n trh > 0 || trv > 0\n ? getCurvePoints(\n bounds.left + Math.min(topWidth, bounds.width - borderRightWidth),\n bounds.top + borderTopWidth,\n topWidth > bounds.width + borderRightWidth ? 0 : Math.max(0, trh - borderRightWidth),\n Math.max(0, trv - borderTopWidth),\n CORNER.TOP_RIGHT\n )\n : new Vector(bounds.left + bounds.width - borderRightWidth, bounds.top + borderTopWidth);\n this.bottomRightPaddingBox =\n brh > 0 || brv > 0\n ? getCurvePoints(\n bounds.left + Math.min(bottomWidth, bounds.width - borderLeftWidth),\n bounds.top + Math.min(rightHeight, bounds.height - borderBottomWidth),\n Math.max(0, brh - borderRightWidth),\n Math.max(0, brv - borderBottomWidth),\n CORNER.BOTTOM_RIGHT\n )\n : new Vector(\n bounds.left + bounds.width - borderRightWidth,\n bounds.top + bounds.height - borderBottomWidth\n );\n this.bottomLeftPaddingBox =\n blh > 0 || blv > 0\n ? getCurvePoints(\n bounds.left + borderLeftWidth,\n bounds.top + Math.min(leftHeight, bounds.height - borderBottomWidth),\n Math.max(0, blh - borderLeftWidth),\n Math.max(0, blv - borderBottomWidth),\n CORNER.BOTTOM_LEFT\n )\n : new Vector(bounds.left + borderLeftWidth, bounds.top + bounds.height - borderBottomWidth);\n this.topLeftContentBox =\n tlh > 0 || tlv > 0\n ? getCurvePoints(\n bounds.left + borderLeftWidth + paddingLeft,\n bounds.top + borderTopWidth + paddingTop,\n Math.max(0, tlh - (borderLeftWidth + paddingLeft)),\n Math.max(0, tlv - (borderTopWidth + paddingTop)),\n CORNER.TOP_LEFT\n )\n : new Vector(bounds.left + borderLeftWidth + paddingLeft, bounds.top + borderTopWidth + paddingTop);\n this.topRightContentBox =\n trh > 0 || trv > 0\n ? getCurvePoints(\n bounds.left + Math.min(topWidth, bounds.width + borderLeftWidth + paddingLeft),\n bounds.top + borderTopWidth + paddingTop,\n topWidth > bounds.width + borderLeftWidth + paddingLeft ? 0 : trh - borderLeftWidth + paddingLeft,\n trv - (borderTopWidth + paddingTop),\n CORNER.TOP_RIGHT\n )\n : new Vector(\n bounds.left + bounds.width - (borderRightWidth + paddingRight),\n bounds.top + borderTopWidth + paddingTop\n );\n this.bottomRightContentBox =\n brh > 0 || brv > 0\n ? getCurvePoints(\n bounds.left + Math.min(bottomWidth, bounds.width - (borderLeftWidth + paddingLeft)),\n bounds.top + Math.min(rightHeight, bounds.height + borderTopWidth + paddingTop),\n Math.max(0, brh - (borderRightWidth + paddingRight)),\n brv - (borderBottomWidth + paddingBottom),\n CORNER.BOTTOM_RIGHT\n )\n : new Vector(\n bounds.left + bounds.width - (borderRightWidth + paddingRight),\n bounds.top + bounds.height - (borderBottomWidth + paddingBottom)\n );\n this.bottomLeftContentBox =\n blh > 0 || blv > 0\n ? getCurvePoints(\n bounds.left + borderLeftWidth + paddingLeft,\n bounds.top + leftHeight,\n Math.max(0, blh - (borderLeftWidth + paddingLeft)),\n blv - (borderBottomWidth + paddingBottom),\n CORNER.BOTTOM_LEFT\n )\n : new Vector(\n bounds.left + borderLeftWidth + paddingLeft,\n bounds.top + bounds.height - (borderBottomWidth + paddingBottom)\n );\n }\n}\n\nenum CORNER {\n TOP_LEFT = 0,\n TOP_RIGHT = 1,\n BOTTOM_RIGHT = 2,\n BOTTOM_LEFT = 3\n}\n\nconst getCurvePoints = (x: number, y: number, r1: number, r2: number, position: CORNER): BezierCurve => {\n const kappa = 4 * ((Math.sqrt(2) - 1) / 3);\n const ox = r1 * kappa; // control point offset horizontal\n const oy = r2 * kappa; // control point offset vertical\n const xm = x + r1; // x-middle\n const ym = y + r2; // y-middle\n\n switch (position) {\n case CORNER.TOP_LEFT:\n return new BezierCurve(\n new Vector(x, ym),\n new Vector(x, ym - oy),\n new Vector(xm - ox, y),\n new Vector(xm, y)\n );\n case CORNER.TOP_RIGHT:\n return new BezierCurve(\n new Vector(x, y),\n new Vector(x + ox, y),\n new Vector(xm, ym - oy),\n new Vector(xm, ym)\n );\n case CORNER.BOTTOM_RIGHT:\n return new BezierCurve(\n new Vector(xm, y),\n new Vector(xm, y + oy),\n new Vector(x + ox, ym),\n new Vector(x, ym)\n );\n case CORNER.BOTTOM_LEFT:\n default:\n return new BezierCurve(\n new Vector(xm, ym),\n new Vector(xm - ox, ym),\n new Vector(x, y + oy),\n new Vector(x, y)\n );\n }\n};\n\nexport const calculateBorderBoxPath = (curves: BoundCurves): Path[] => {\n return [curves.topLeftBorderBox, curves.topRightBorderBox, curves.bottomRightBorderBox, curves.bottomLeftBorderBox];\n};\n\nexport const calculateContentBoxPath = (curves: BoundCurves): Path[] => {\n return [\n curves.topLeftContentBox,\n curves.topRightContentBox,\n curves.bottomRightContentBox,\n curves.bottomLeftContentBox\n ];\n};\n\nexport const calculatePaddingBoxPath = (curves: BoundCurves): Path[] => {\n return [\n curves.topLeftPaddingBox,\n curves.topRightPaddingBox,\n curves.bottomRightPaddingBox,\n curves.bottomLeftPaddingBox\n ];\n};\n","import {Matrix} from '../css/property-descriptors/transform';\nimport {Path} from './path';\n\nexport const enum EffectType {\n TRANSFORM = 0,\n CLIP = 1,\n OPACITY = 2\n}\n\nexport const enum EffectTarget {\n BACKGROUND_BORDERS = 1 << 1,\n CONTENT = 1 << 2\n}\n\nexport interface IElementEffect {\n readonly type: EffectType;\n readonly target: number;\n}\n\nexport class TransformEffect implements IElementEffect {\n readonly type: EffectType = EffectType.TRANSFORM;\n readonly target: number = EffectTarget.BACKGROUND_BORDERS | EffectTarget.CONTENT;\n\n constructor(readonly offsetX: number, readonly offsetY: number, readonly matrix: Matrix) {}\n}\n\nexport class ClipEffect implements IElementEffect {\n readonly type: EffectType = EffectType.CLIP;\n\n constructor(readonly path: Path[], readonly target: EffectTarget) {}\n}\n\nexport class OpacityEffect implements IElementEffect {\n readonly type: EffectType = EffectType.OPACITY;\n readonly target: number = EffectTarget.BACKGROUND_BORDERS | EffectTarget.CONTENT;\n\n constructor(readonly opacity: number) {}\n}\n\nexport const isTransformEffect = (effect: IElementEffect): effect is TransformEffect =>\n effect.type === EffectType.TRANSFORM;\nexport const isClipEffect = (effect: IElementEffect): effect is ClipEffect => effect.type === EffectType.CLIP;\nexport const isOpacityEffect = (effect: IElementEffect): effect is OpacityEffect => effect.type === EffectType.OPACITY;\n","import {BezierCurve} from './bezier-curve';\nimport {Vector} from './vector';\nexport const enum PathType {\n VECTOR = 0,\n BEZIER_CURVE = 1\n}\n\nexport interface IPath {\n type: PathType;\n add(deltaX: number, deltaY: number): IPath;\n}\n\nexport const equalPath = (a: Path[], b: Path[]): boolean => {\n if (a.length === b.length) {\n return a.some((v, i) => v === b[i]);\n }\n\n return false;\n};\n\nexport const transformPath = (path: Path[], deltaX: number, deltaY: number, deltaW: number, deltaH: number): Path[] => {\n return path.map((point, index) => {\n switch (index) {\n case 0:\n return point.add(deltaX, deltaY);\n case 1:\n return point.add(deltaX + deltaW, deltaY);\n case 2:\n return point.add(deltaX + deltaW, deltaY + deltaH);\n case 3:\n return point.add(deltaX, deltaY + deltaH);\n }\n return point;\n });\n};\n\nexport type Path = Vector | BezierCurve;\n","import {ElementContainer, FLAGS} from '../dom/element-container';\nimport {contains} from '../core/bitwise';\nimport {BoundCurves, calculateBorderBoxPath, calculatePaddingBoxPath} from './bound-curves';\nimport {ClipEffect, EffectTarget, IElementEffect, isClipEffect, OpacityEffect, TransformEffect} from './effects';\nimport {OVERFLOW} from '../css/property-descriptors/overflow';\nimport {equalPath} from './path';\nimport {DISPLAY} from '../css/property-descriptors/display';\nimport {OLElementContainer} from '../dom/elements/ol-element-container';\nimport {LIElementContainer} from '../dom/elements/li-element-container';\nimport {createCounterText} from '../css/types/functions/counter';\nimport {POSITION} from '../css/property-descriptors/position';\n\nexport class StackingContext {\n element: ElementPaint;\n negativeZIndex: StackingContext[];\n zeroOrAutoZIndexOrTransformedOrOpacity: StackingContext[];\n positiveZIndex: StackingContext[];\n nonPositionedFloats: StackingContext[];\n nonPositionedInlineLevel: StackingContext[];\n inlineLevel: ElementPaint[];\n nonInlineLevel: ElementPaint[];\n\n constructor(container: ElementPaint) {\n this.element = container;\n this.inlineLevel = [];\n this.nonInlineLevel = [];\n this.negativeZIndex = [];\n this.zeroOrAutoZIndexOrTransformedOrOpacity = [];\n this.positiveZIndex = [];\n this.nonPositionedFloats = [];\n this.nonPositionedInlineLevel = [];\n }\n}\n\nexport class ElementPaint {\n readonly effects: IElementEffect[] = [];\n readonly curves: BoundCurves;\n listValue?: string;\n\n constructor(readonly container: ElementContainer, readonly parent: ElementPaint | null) {\n this.curves = new BoundCurves(this.container);\n if (this.container.styles.opacity < 1) {\n this.effects.push(new OpacityEffect(this.container.styles.opacity));\n }\n\n if (this.container.styles.transform !== null) {\n const offsetX = this.container.bounds.left + this.container.styles.transformOrigin[0].number;\n const offsetY = this.container.bounds.top + this.container.styles.transformOrigin[1].number;\n const matrix = this.container.styles.transform;\n this.effects.push(new TransformEffect(offsetX, offsetY, matrix));\n }\n\n if (this.container.styles.overflowX !== OVERFLOW.VISIBLE) {\n const borderBox = calculateBorderBoxPath(this.curves);\n const paddingBox = calculatePaddingBoxPath(this.curves);\n\n if (equalPath(borderBox, paddingBox)) {\n this.effects.push(new ClipEffect(borderBox, EffectTarget.BACKGROUND_BORDERS | EffectTarget.CONTENT));\n } else {\n this.effects.push(new ClipEffect(borderBox, EffectTarget.BACKGROUND_BORDERS));\n this.effects.push(new ClipEffect(paddingBox, EffectTarget.CONTENT));\n }\n }\n }\n\n getEffects(target: EffectTarget): IElementEffect[] {\n let inFlow = [POSITION.ABSOLUTE, POSITION.FIXED].indexOf(this.container.styles.position) === -1;\n let parent = this.parent;\n const effects = this.effects.slice(0);\n while (parent) {\n const croplessEffects = parent.effects.filter((effect) => !isClipEffect(effect));\n if (inFlow || parent.container.styles.position !== POSITION.STATIC || !parent.parent) {\n effects.unshift(...croplessEffects);\n inFlow = [POSITION.ABSOLUTE, POSITION.FIXED].indexOf(parent.container.styles.position) === -1;\n if (parent.container.styles.overflowX !== OVERFLOW.VISIBLE) {\n const borderBox = calculateBorderBoxPath(parent.curves);\n const paddingBox = calculatePaddingBoxPath(parent.curves);\n if (!equalPath(borderBox, paddingBox)) {\n effects.unshift(\n new ClipEffect(paddingBox, EffectTarget.BACKGROUND_BORDERS | EffectTarget.CONTENT)\n );\n }\n }\n } else {\n effects.unshift(...croplessEffects);\n }\n\n parent = parent.parent;\n }\n\n return effects.filter((effect) => contains(effect.target, target));\n }\n}\n\nconst parseStackTree = (\n parent: ElementPaint,\n stackingContext: StackingContext,\n realStackingContext: StackingContext,\n listItems: ElementPaint[]\n) => {\n parent.container.elements.forEach((child) => {\n const treatAsRealStackingContext = contains(child.flags, FLAGS.CREATES_REAL_STACKING_CONTEXT);\n const createsStackingContext = contains(child.flags, FLAGS.CREATES_STACKING_CONTEXT);\n const paintContainer = new ElementPaint(child, parent);\n if (contains(child.styles.display, DISPLAY.LIST_ITEM)) {\n listItems.push(paintContainer);\n }\n\n const listOwnerItems = contains(child.flags, FLAGS.IS_LIST_OWNER) ? [] : listItems;\n\n if (treatAsRealStackingContext || createsStackingContext) {\n const parentStack =\n treatAsRealStackingContext || child.styles.isPositioned() ? realStackingContext : stackingContext;\n\n const stack = new StackingContext(paintContainer);\n\n if (child.styles.isPositioned() || child.styles.opacity < 1 || child.styles.isTransformed()) {\n const order = child.styles.zIndex.order;\n if (order < 0) {\n let index = 0;\n\n parentStack.negativeZIndex.some((current, i) => {\n if (order > current.element.container.styles.zIndex.order) {\n index = i;\n return false;\n } else if (index > 0) {\n return true;\n }\n\n return false;\n });\n parentStack.negativeZIndex.splice(index, 0, stack);\n } else if (order > 0) {\n let index = 0;\n parentStack.positiveZIndex.some((current, i) => {\n if (order >= current.element.container.styles.zIndex.order) {\n index = i + 1;\n return false;\n } else if (index > 0) {\n return true;\n }\n\n return false;\n });\n parentStack.positiveZIndex.splice(index, 0, stack);\n } else {\n parentStack.zeroOrAutoZIndexOrTransformedOrOpacity.push(stack);\n }\n } else {\n if (child.styles.isFloating()) {\n parentStack.nonPositionedFloats.push(stack);\n } else {\n parentStack.nonPositionedInlineLevel.push(stack);\n }\n }\n\n parseStackTree(\n paintContainer,\n stack,\n treatAsRealStackingContext ? stack : realStackingContext,\n listOwnerItems\n );\n } else {\n if (child.styles.isInlineLevel()) {\n stackingContext.inlineLevel.push(paintContainer);\n } else {\n stackingContext.nonInlineLevel.push(paintContainer);\n }\n\n parseStackTree(paintContainer, stackingContext, realStackingContext, listOwnerItems);\n }\n\n if (contains(child.flags, FLAGS.IS_LIST_OWNER)) {\n processListItems(child, listOwnerItems);\n }\n });\n};\n\nconst processListItems = (owner: ElementContainer, elements: ElementPaint[]) => {\n let numbering = owner instanceof OLElementContainer ? owner.start : 1;\n const reversed = owner instanceof OLElementContainer ? owner.reversed : false;\n for (let i = 0; i < elements.length; i++) {\n const item = elements[i];\n if (\n item.container instanceof LIElementContainer &&\n typeof item.container.value === 'number' &&\n item.container.value !== 0\n ) {\n numbering = item.container.value;\n }\n\n item.listValue = createCounterText(numbering, item.container.styles.listStyleType, true);\n\n numbering += reversed ? -1 : 1;\n }\n};\n\nexport const parseStackingContexts = (container: ElementContainer): StackingContext => {\n const paintContainer = new ElementPaint(container, null);\n const root = new StackingContext(paintContainer);\n const listItems: ElementPaint[] = [];\n parseStackTree(paintContainer, root, root, listItems);\n processListItems(paintContainer.container, listItems);\n return root;\n};\n","import {Path} from './path';\nimport {BoundCurves} from './bound-curves';\nimport {isBezierCurve} from './bezier-curve';\n\nexport const parsePathForBorder = (curves: BoundCurves, borderSide: number): Path[] => {\n switch (borderSide) {\n case 0:\n return createPathFromCurves(\n curves.topLeftBorderBox,\n curves.topLeftPaddingBox,\n curves.topRightBorderBox,\n curves.topRightPaddingBox\n );\n case 1:\n return createPathFromCurves(\n curves.topRightBorderBox,\n curves.topRightPaddingBox,\n curves.bottomRightBorderBox,\n curves.bottomRightPaddingBox\n );\n case 2:\n return createPathFromCurves(\n curves.bottomRightBorderBox,\n curves.bottomRightPaddingBox,\n curves.bottomLeftBorderBox,\n curves.bottomLeftPaddingBox\n );\n case 3:\n default:\n return createPathFromCurves(\n curves.bottomLeftBorderBox,\n curves.bottomLeftPaddingBox,\n curves.topLeftBorderBox,\n curves.topLeftPaddingBox\n );\n }\n};\n\nexport const parsePathForBorderDoubleOuter = (curves: BoundCurves, borderSide: number): Path[] => {\n switch (borderSide) {\n case 0:\n return createPathFromCurves(\n curves.topLeftBorderBox,\n curves.topLeftBorderDoubleOuterBox,\n curves.topRightBorderBox,\n curves.topRightBorderDoubleOuterBox\n );\n case 1:\n return createPathFromCurves(\n curves.topRightBorderBox,\n curves.topRightBorderDoubleOuterBox,\n curves.bottomRightBorderBox,\n curves.bottomRightBorderDoubleOuterBox\n );\n case 2:\n return createPathFromCurves(\n curves.bottomRightBorderBox,\n curves.bottomRightBorderDoubleOuterBox,\n curves.bottomLeftBorderBox,\n curves.bottomLeftBorderDoubleOuterBox\n );\n case 3:\n default:\n return createPathFromCurves(\n curves.bottomLeftBorderBox,\n curves.bottomLeftBorderDoubleOuterBox,\n curves.topLeftBorderBox,\n curves.topLeftBorderDoubleOuterBox\n );\n }\n};\n\nexport const parsePathForBorderDoubleInner = (curves: BoundCurves, borderSide: number): Path[] => {\n switch (borderSide) {\n case 0:\n return createPathFromCurves(\n curves.topLeftBorderDoubleInnerBox,\n curves.topLeftPaddingBox,\n curves.topRightBorderDoubleInnerBox,\n curves.topRightPaddingBox\n );\n case 1:\n return createPathFromCurves(\n curves.topRightBorderDoubleInnerBox,\n curves.topRightPaddingBox,\n curves.bottomRightBorderDoubleInnerBox,\n curves.bottomRightPaddingBox\n );\n case 2:\n return createPathFromCurves(\n curves.bottomRightBorderDoubleInnerBox,\n curves.bottomRightPaddingBox,\n curves.bottomLeftBorderDoubleInnerBox,\n curves.bottomLeftPaddingBox\n );\n case 3:\n default:\n return createPathFromCurves(\n curves.bottomLeftBorderDoubleInnerBox,\n curves.bottomLeftPaddingBox,\n curves.topLeftBorderDoubleInnerBox,\n curves.topLeftPaddingBox\n );\n }\n};\n\nexport const parsePathForBorderStroke = (curves: BoundCurves, borderSide: number): Path[] => {\n switch (borderSide) {\n case 0:\n return createStrokePathFromCurves(curves.topLeftBorderStroke, curves.topRightBorderStroke);\n case 1:\n return createStrokePathFromCurves(curves.topRightBorderStroke, curves.bottomRightBorderStroke);\n case 2:\n return createStrokePathFromCurves(curves.bottomRightBorderStroke, curves.bottomLeftBorderStroke);\n case 3:\n default:\n return createStrokePathFromCurves(curves.bottomLeftBorderStroke, curves.topLeftBorderStroke);\n }\n};\n\nconst createStrokePathFromCurves = (outer1: Path, outer2: Path): Path[] => {\n const path = [];\n if (isBezierCurve(outer1)) {\n path.push(outer1.subdivide(0.5, false));\n } else {\n path.push(outer1);\n }\n\n if (isBezierCurve(outer2)) {\n path.push(outer2.subdivide(0.5, true));\n } else {\n path.push(outer2);\n }\n\n return path;\n};\n\nconst createPathFromCurves = (outer1: Path, inner1: Path, outer2: Path, inner2: Path): Path[] => {\n const path = [];\n if (isBezierCurve(outer1)) {\n path.push(outer1.subdivide(0.5, false));\n } else {\n path.push(outer1);\n }\n\n if (isBezierCurve(outer2)) {\n path.push(outer2.subdivide(0.5, true));\n } else {\n path.push(outer2);\n }\n\n if (isBezierCurve(inner2)) {\n path.push(inner2.subdivide(0.5, true).reverse());\n } else {\n path.push(inner2);\n }\n\n if (isBezierCurve(inner1)) {\n path.push(inner1.subdivide(0.5, false).reverse());\n } else {\n path.push(inner1);\n }\n\n return path;\n};\n","import {getAbsoluteValue} from '../css/types/length-percentage';\nimport {Bounds} from '../css/layout/bounds';\nimport {ElementContainer} from '../dom/element-container';\n\nexport const paddingBox = (element: ElementContainer): Bounds => {\n const bounds = element.bounds;\n const styles = element.styles;\n return bounds.add(\n styles.borderLeftWidth,\n styles.borderTopWidth,\n -(styles.borderRightWidth + styles.borderLeftWidth),\n -(styles.borderTopWidth + styles.borderBottomWidth)\n );\n};\n\nexport const contentBox = (element: ElementContainer): Bounds => {\n const styles = element.styles;\n const bounds = element.bounds;\n\n const paddingLeft = getAbsoluteValue(styles.paddingLeft, bounds.width);\n const paddingRight = getAbsoluteValue(styles.paddingRight, bounds.width);\n const paddingTop = getAbsoluteValue(styles.paddingTop, bounds.width);\n const paddingBottom = getAbsoluteValue(styles.paddingBottom, bounds.width);\n\n return bounds.add(\n paddingLeft + styles.borderLeftWidth,\n paddingTop + styles.borderTopWidth,\n -(styles.borderRightWidth + styles.borderLeftWidth + paddingLeft + paddingRight),\n -(styles.borderTopWidth + styles.borderBottomWidth + paddingTop + paddingBottom)\n );\n};\n","import {Bounds} from '../css/layout/bounds';\nimport {BACKGROUND_ORIGIN} from '../css/property-descriptors/background-origin';\nimport {ElementContainer} from '../dom/element-container';\nimport {BACKGROUND_SIZE, BackgroundSizeInfo} from '../css/property-descriptors/background-size';\nimport {Vector} from './vector';\nimport {BACKGROUND_REPEAT} from '../css/property-descriptors/background-repeat';\nimport {getAbsoluteValue, getAbsoluteValueForTuple, isLengthPercentage} from '../css/types/length-percentage';\nimport {CSSValue, isIdentToken} from '../css/syntax/parser';\nimport {contentBox, paddingBox} from './box-sizing';\nimport {Path} from './path';\nimport {BACKGROUND_CLIP} from '../css/property-descriptors/background-clip';\n\nexport const calculateBackgroundPositioningArea = (\n backgroundOrigin: BACKGROUND_ORIGIN,\n element: ElementContainer\n): Bounds => {\n if (backgroundOrigin === BACKGROUND_ORIGIN.BORDER_BOX) {\n return element.bounds;\n }\n\n if (backgroundOrigin === BACKGROUND_ORIGIN.CONTENT_BOX) {\n return contentBox(element);\n }\n\n return paddingBox(element);\n};\n\nexport const calculateBackgroundPaintingArea = (backgroundClip: BACKGROUND_CLIP, element: ElementContainer): Bounds => {\n if (backgroundClip === BACKGROUND_CLIP.BORDER_BOX) {\n return element.bounds;\n }\n\n if (backgroundClip === BACKGROUND_CLIP.CONTENT_BOX) {\n return contentBox(element);\n }\n\n return paddingBox(element);\n};\n\nexport const calculateBackgroundRendering = (\n container: ElementContainer,\n index: number,\n intrinsicSize: [number | null, number | null, number | null]\n): [Path[], number, number, number, number] => {\n const backgroundPositioningArea = calculateBackgroundPositioningArea(\n getBackgroundValueForIndex(container.styles.backgroundOrigin, index),\n container\n );\n\n const backgroundPaintingArea = calculateBackgroundPaintingArea(\n getBackgroundValueForIndex(container.styles.backgroundClip, index),\n container\n );\n\n const backgroundImageSize = calculateBackgroundSize(\n getBackgroundValueForIndex(container.styles.backgroundSize, index),\n intrinsicSize,\n backgroundPositioningArea\n );\n\n const [sizeWidth, sizeHeight] = backgroundImageSize;\n\n const position = getAbsoluteValueForTuple(\n getBackgroundValueForIndex(container.styles.backgroundPosition, index),\n backgroundPositioningArea.width - sizeWidth,\n backgroundPositioningArea.height - sizeHeight\n );\n\n const path = calculateBackgroundRepeatPath(\n getBackgroundValueForIndex(container.styles.backgroundRepeat, index),\n position,\n backgroundImageSize,\n backgroundPositioningArea,\n backgroundPaintingArea\n );\n\n const offsetX = Math.round(backgroundPositioningArea.left + position[0]);\n const offsetY = Math.round(backgroundPositioningArea.top + position[1]);\n\n return [path, offsetX, offsetY, sizeWidth, sizeHeight];\n};\n\nexport const isAuto = (token: CSSValue): boolean => isIdentToken(token) && token.value === BACKGROUND_SIZE.AUTO;\n\nconst hasIntrinsicValue = (value: number | null): value is number => typeof value === 'number';\n\nexport const calculateBackgroundSize = (\n size: BackgroundSizeInfo[],\n [intrinsicWidth, intrinsicHeight, intrinsicProportion]: [number | null, number | null, number | null],\n bounds: Bounds\n): [number, number] => {\n const [first, second] = size;\n\n if (!first) {\n return [0, 0];\n }\n\n if (isLengthPercentage(first) && second && isLengthPercentage(second)) {\n return [getAbsoluteValue(first, bounds.width), getAbsoluteValue(second, bounds.height)];\n }\n\n const hasIntrinsicProportion = hasIntrinsicValue(intrinsicProportion);\n\n if (isIdentToken(first) && (first.value === BACKGROUND_SIZE.CONTAIN || first.value === BACKGROUND_SIZE.COVER)) {\n if (hasIntrinsicValue(intrinsicProportion)) {\n const targetRatio = bounds.width / bounds.height;\n\n return targetRatio < intrinsicProportion !== (first.value === BACKGROUND_SIZE.COVER)\n ? [bounds.width, bounds.width / intrinsicProportion]\n : [bounds.height * intrinsicProportion, bounds.height];\n }\n\n return [bounds.width, bounds.height];\n }\n\n const hasIntrinsicWidth = hasIntrinsicValue(intrinsicWidth);\n const hasIntrinsicHeight = hasIntrinsicValue(intrinsicHeight);\n const hasIntrinsicDimensions = hasIntrinsicWidth || hasIntrinsicHeight;\n\n // If the background-size is auto or auto auto:\n if (isAuto(first) && (!second || isAuto(second))) {\n // If the image has both horizontal and vertical intrinsic dimensions, it's rendered at that size.\n if (hasIntrinsicWidth && hasIntrinsicHeight) {\n return [intrinsicWidth as number, intrinsicHeight as number];\n }\n\n // If the image has no intrinsic dimensions and has no intrinsic proportions,\n // it's rendered at the size of the background positioning area.\n\n if (!hasIntrinsicProportion && !hasIntrinsicDimensions) {\n return [bounds.width, bounds.height];\n }\n\n // TODO If the image has no intrinsic dimensions but has intrinsic proportions, it's rendered as if contain had been specified instead.\n\n // If the image has only one intrinsic dimension and has intrinsic proportions, it's rendered at the size corresponding to that one dimension.\n // The other dimension is computed using the specified dimension and the intrinsic proportions.\n if (hasIntrinsicDimensions && hasIntrinsicProportion) {\n const width = hasIntrinsicWidth\n ? (intrinsicWidth as number)\n : (intrinsicHeight as number) * (intrinsicProportion as number);\n const height = hasIntrinsicHeight\n ? (intrinsicHeight as number)\n : (intrinsicWidth as number) / (intrinsicProportion as number);\n return [width, height];\n }\n\n // If the image has only one intrinsic dimension but has no intrinsic proportions,\n // it's rendered using the specified dimension and the other dimension of the background positioning area.\n const width = hasIntrinsicWidth ? (intrinsicWidth as number) : bounds.width;\n const height = hasIntrinsicHeight ? (intrinsicHeight as number) : bounds.height;\n return [width, height];\n }\n\n // If the image has intrinsic proportions, it's stretched to the specified dimension.\n // The unspecified dimension is computed using the specified dimension and the intrinsic proportions.\n if (hasIntrinsicProportion) {\n let width = 0;\n let height = 0;\n if (isLengthPercentage(first)) {\n width = getAbsoluteValue(first, bounds.width);\n } else if (isLengthPercentage(second)) {\n height = getAbsoluteValue(second, bounds.height);\n }\n\n if (isAuto(first)) {\n width = height * (intrinsicProportion as number);\n } else if (!second || isAuto(second)) {\n height = width / (intrinsicProportion as number);\n }\n\n return [width, height];\n }\n\n // If the image has no intrinsic proportions, it's stretched to the specified dimension.\n // The unspecified dimension is computed using the image's corresponding intrinsic dimension,\n // if there is one. If there is no such intrinsic dimension,\n // it becomes the corresponding dimension of the background positioning area.\n\n let width = null;\n let height = null;\n\n if (isLengthPercentage(first)) {\n width = getAbsoluteValue(first, bounds.width);\n } else if (second && isLengthPercentage(second)) {\n height = getAbsoluteValue(second, bounds.height);\n }\n\n if (width !== null && (!second || isAuto(second))) {\n height =\n hasIntrinsicWidth && hasIntrinsicHeight\n ? (width / (intrinsicWidth as number)) * (intrinsicHeight as number)\n : bounds.height;\n }\n\n if (height !== null && isAuto(first)) {\n width =\n hasIntrinsicWidth && hasIntrinsicHeight\n ? (height / (intrinsicHeight as number)) * (intrinsicWidth as number)\n : bounds.width;\n }\n\n if (width !== null && height !== null) {\n return [width, height];\n }\n\n throw new Error(`Unable to calculate background-size for element`);\n};\n\nexport const getBackgroundValueForIndex = <T>(values: T[], index: number): T => {\n const value = values[index];\n if (typeof value === 'undefined') {\n return values[0];\n }\n\n return value;\n};\n\nexport const calculateBackgroundRepeatPath = (\n repeat: BACKGROUND_REPEAT,\n [x, y]: [number, number],\n [width, height]: [number, number],\n backgroundPositioningArea: Bounds,\n backgroundPaintingArea: Bounds\n): [Vector, Vector, Vector, Vector] => {\n switch (repeat) {\n case BACKGROUND_REPEAT.REPEAT_X:\n return [\n new Vector(Math.round(backgroundPositioningArea.left), Math.round(backgroundPositioningArea.top + y)),\n new Vector(\n Math.round(backgroundPositioningArea.left + backgroundPositioningArea.width),\n Math.round(backgroundPositioningArea.top + y)\n ),\n new Vector(\n Math.round(backgroundPositioningArea.left + backgroundPositioningArea.width),\n Math.round(height + backgroundPositioningArea.top + y)\n ),\n new Vector(\n Math.round(backgroundPositioningArea.left),\n Math.round(height + backgroundPositioningArea.top + y)\n )\n ];\n case BACKGROUND_REPEAT.REPEAT_Y:\n return [\n new Vector(Math.round(backgroundPositioningArea.left + x), Math.round(backgroundPositioningArea.top)),\n new Vector(\n Math.round(backgroundPositioningArea.left + x + width),\n Math.round(backgroundPositioningArea.top)\n ),\n new Vector(\n Math.round(backgroundPositioningArea.left + x + width),\n Math.round(backgroundPositioningArea.height + backgroundPositioningArea.top)\n ),\n new Vector(\n Math.round(backgroundPositioningArea.left + x),\n Math.round(backgroundPositioningArea.height + backgroundPositioningArea.top)\n )\n ];\n case BACKGROUND_REPEAT.NO_REPEAT:\n return [\n new Vector(\n Math.round(backgroundPositioningArea.left + x),\n Math.round(backgroundPositioningArea.top + y)\n ),\n new Vector(\n Math.round(backgroundPositioningArea.left + x + width),\n Math.round(backgroundPositioningArea.top + y)\n ),\n new Vector(\n Math.round(backgroundPositioningArea.left + x + width),\n Math.round(backgroundPositioningArea.top + y + height)\n ),\n new Vector(\n Math.round(backgroundPositioningArea.left + x),\n Math.round(backgroundPositioningArea.top + y + height)\n )\n ];\n default:\n return [\n new Vector(Math.round(backgroundPaintingArea.left), Math.round(backgroundPaintingArea.top)),\n new Vector(\n Math.round(backgroundPaintingArea.left + backgroundPaintingArea.width),\n Math.round(backgroundPaintingArea.top)\n ),\n new Vector(\n Math.round(backgroundPaintingArea.left + backgroundPaintingArea.width),\n Math.round(backgroundPaintingArea.height + backgroundPaintingArea.top)\n ),\n new Vector(\n Math.round(backgroundPaintingArea.left),\n Math.round(backgroundPaintingArea.height + backgroundPaintingArea.top)\n )\n ];\n }\n};\n","export const SMALL_IMAGE = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';\n","import {SMALL_IMAGE} from '../core/util';\nexport interface FontMetric {\n baseline: number;\n middle: number;\n}\n\nconst SAMPLE_TEXT = 'Hidden Text';\n\nexport class FontMetrics {\n private readonly _data: {[key: string]: FontMetric};\n private readonly _document: Document;\n\n constructor(document: Document) {\n this._data = {};\n this._document = document;\n }\n\n private parseMetrics(fontFamily: string, fontSize: string): FontMetric {\n const container = this._document.createElement('div');\n const img = this._document.createElement('img');\n const span = this._document.createElement('span');\n\n const body = this._document.body as HTMLBodyElement;\n\n container.style.visibility = 'hidden';\n container.style.fontFamily = fontFamily;\n container.style.fontSize = fontSize;\n container.style.margin = '0';\n container.style.padding = '0';\n container.style.whiteSpace = 'nowrap';\n\n body.appendChild(container);\n\n img.src = SMALL_IMAGE;\n img.width = 1;\n img.height = 1;\n\n img.style.margin = '0';\n img.style.padding = '0';\n img.style.verticalAlign = 'baseline';\n\n span.style.fontFamily = fontFamily;\n span.style.fontSize = fontSize;\n span.style.margin = '0';\n span.style.padding = '0';\n\n span.appendChild(this._document.createTextNode(SAMPLE_TEXT));\n container.appendChild(span);\n container.appendChild(img);\n const baseline = img.offsetTop - span.offsetTop + 2;\n\n container.removeChild(span);\n container.appendChild(this._document.createTextNode(SAMPLE_TEXT));\n\n container.style.lineHeight = 'normal';\n img.style.verticalAlign = 'super';\n\n const middle = img.offsetTop - container.offsetTop + 2;\n\n body.removeChild(container);\n\n return {baseline, middle};\n }\n getMetrics(fontFamily: string, fontSize: string): FontMetric {\n const key = `${fontFamily} ${fontSize}`;\n if (typeof this._data[key] === 'undefined') {\n this._data[key] = this.parseMetrics(fontFamily, fontSize);\n }\n\n return this._data[key];\n }\n}\n","import {Context} from '../core/context';\nimport {RenderConfigurations} from './canvas/canvas-renderer';\n\nexport class Renderer {\n constructor(protected readonly context: Context, protected readonly options: RenderConfigurations) {}\n}\n","import {ElementPaint, parseStackingContexts, StackingContext} from '../stacking-context';\nimport {asString, Color, isTransparent} from '../../css/types/color';\nimport {ElementContainer, FLAGS} from '../../dom/element-container';\nimport {BORDER_STYLE} from '../../css/property-descriptors/border-style';\nimport {CSSParsedDeclaration} from '../../css';\nimport {TextContainer} from '../../dom/text-container';\nimport {Path, transformPath} from '../path';\nimport {BACKGROUND_CLIP} from '../../css/property-descriptors/background-clip';\nimport {BoundCurves, calculateBorderBoxPath, calculateContentBoxPath, calculatePaddingBoxPath} from '../bound-curves';\nimport {BezierCurve, isBezierCurve} from '../bezier-curve';\nimport {Vector} from '../vector';\nimport {CSSImageType, CSSURLImage, isLinearGradient, isRadialGradient} from '../../css/types/image';\nimport {\n parsePathForBorder,\n parsePathForBorderDoubleInner,\n parsePathForBorderDoubleOuter,\n parsePathForBorderStroke\n} from '../border';\nimport {calculateBackgroundRendering, getBackgroundValueForIndex} from '../background';\nimport {isDimensionToken} from '../../css/syntax/parser';\nimport {segmentGraphemes, TextBounds} from '../../css/layout/text';\nimport {ImageElementContainer} from '../../dom/replaced-elements/image-element-container';\nimport {contentBox} from '../box-sizing';\nimport {CanvasElementContainer} from '../../dom/replaced-elements/canvas-element-container';\nimport {SVGElementContainer} from '../../dom/replaced-elements/svg-element-container';\nimport {ReplacedElementContainer} from '../../dom/replaced-elements';\nimport {EffectTarget, IElementEffect, isClipEffect, isOpacityEffect, isTransformEffect} from '../effects';\nimport {contains} from '../../core/bitwise';\nimport {calculateGradientDirection, calculateRadius, processColorStops} from '../../css/types/functions/gradient';\nimport {FIFTY_PERCENT, getAbsoluteValue} from '../../css/types/length-percentage';\nimport {TEXT_DECORATION_LINE} from '../../css/property-descriptors/text-decoration-line';\nimport {FontMetrics} from '../font-metrics';\nimport {DISPLAY} from '../../css/property-descriptors/display';\nimport {Bounds} from '../../css/layout/bounds';\nimport {LIST_STYLE_TYPE} from '../../css/property-descriptors/list-style-type';\nimport {computeLineHeight} from '../../css/property-descriptors/line-height';\nimport {CHECKBOX, INPUT_COLOR, InputElementContainer, RADIO} from '../../dom/replaced-elements/input-element-container';\nimport {TEXT_ALIGN} from '../../css/property-descriptors/text-align';\nimport {TextareaElementContainer} from '../../dom/elements/textarea-element-container';\nimport {SelectElementContainer} from '../../dom/elements/select-element-container';\nimport {IFrameElementContainer} from '../../dom/replaced-elements/iframe-element-container';\nimport {TextShadow} from '../../css/property-descriptors/text-shadow';\nimport {PAINT_ORDER_LAYER} from '../../css/property-descriptors/paint-order';\nimport {Renderer} from '../renderer';\nimport {Context} from '../../core/context';\nimport {DIRECTION} from '../../css/property-descriptors/direction';\n\nexport type RenderConfigurations = RenderOptions & {\n backgroundColor: Color | null;\n};\n\nexport interface RenderOptions {\n scale: number;\n canvas?: HTMLCanvasElement;\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\nconst MASK_OFFSET = 10000;\n\nexport class CanvasRenderer extends Renderer {\n canvas: HTMLCanvasElement;\n ctx: CanvasRenderingContext2D;\n private readonly _activeEffects: IElementEffect[] = [];\n private readonly fontMetrics: FontMetrics;\n\n constructor(context: Context, options: RenderConfigurations) {\n super(context, options);\n this.canvas = options.canvas ? options.canvas : document.createElement('canvas');\n this.ctx = this.canvas.getContext('2d') as CanvasRenderingContext2D;\n if (!options.canvas) {\n this.canvas.width = Math.floor(options.width * options.scale);\n this.canvas.height = Math.floor(options.height * options.scale);\n this.canvas.style.width = `${options.width}px`;\n this.canvas.style.height = `${options.height}px`;\n }\n this.fontMetrics = new FontMetrics(document);\n this.ctx.scale(this.options.scale, this.options.scale);\n this.ctx.translate(-options.x, -options.y);\n this.ctx.textBaseline = 'bottom';\n this._activeEffects = [];\n this.context.logger.debug(\n `Canvas renderer initialized (${options.width}x${options.height}) with scale ${options.scale}`\n );\n }\n\n applyEffects(effects: IElementEffect[]): void {\n while (this._activeEffects.length) {\n this.popEffect();\n }\n\n effects.forEach((effect) => this.applyEffect(effect));\n }\n\n applyEffect(effect: IElementEffect): void {\n this.ctx.save();\n if (isOpacityEffect(effect)) {\n this.ctx.globalAlpha = effect.opacity;\n }\n\n if (isTransformEffect(effect)) {\n this.ctx.translate(effect.offsetX, effect.offsetY);\n this.ctx.transform(\n effect.matrix[0],\n effect.matrix[1],\n effect.matrix[2],\n effect.matrix[3],\n effect.matrix[4],\n effect.matrix[5]\n );\n this.ctx.translate(-effect.offsetX, -effect.offsetY);\n }\n\n if (isClipEffect(effect)) {\n this.path(effect.path);\n this.ctx.clip();\n }\n\n this._activeEffects.push(effect);\n }\n\n popEffect(): void {\n this._activeEffects.pop();\n this.ctx.restore();\n }\n\n async renderStack(stack: StackingContext): Promise<void> {\n const styles = stack.element.container.styles;\n if (styles.isVisible()) {\n await this.renderStackContent(stack);\n }\n }\n\n async renderNode(paint: ElementPaint): Promise<void> {\n if (contains(paint.container.flags, FLAGS.DEBUG_RENDER)) {\n debugger;\n }\n\n if (paint.container.styles.isVisible()) {\n await this.renderNodeBackgroundAndBorders(paint);\n await this.renderNodeContent(paint);\n }\n }\n\n renderTextWithLetterSpacing(text: TextBounds, letterSpacing: number, baseline: number): void {\n if (letterSpacing === 0) {\n this.ctx.fillText(text.text, text.bounds.left, text.bounds.top + baseline);\n } else {\n const letters = segmentGraphemes(text.text);\n letters.reduce((left, letter) => {\n this.ctx.fillText(letter, left, text.bounds.top + baseline);\n\n return left + this.ctx.measureText(letter).width;\n }, text.bounds.left);\n }\n }\n\n private createFontStyle(styles: CSSParsedDeclaration): string[] {\n const fontVariant = styles.fontVariant\n .filter((variant) => variant === 'normal' || variant === 'small-caps')\n .join('');\n const fontFamily = fixIOSSystemFonts(styles.fontFamily).join(', ');\n const fontSize = isDimensionToken(styles.fontSize)\n ? `${styles.fontSize.number}${styles.fontSize.unit}`\n : `${styles.fontSize.number}px`;\n\n return [\n [styles.fontStyle, fontVariant, styles.fontWeight, fontSize, fontFamily].join(' '),\n fontFamily,\n fontSize\n ];\n }\n\n async renderTextNode(text: TextContainer, styles: CSSParsedDeclaration): Promise<void> {\n const [font, fontFamily, fontSize] = this.createFontStyle(styles);\n\n this.ctx.font = font;\n\n this.ctx.direction = styles.direction === DIRECTION.RTL ? 'rtl' : 'ltr';\n this.ctx.textAlign = 'left';\n this.ctx.textBaseline = 'alphabetic';\n const {baseline, middle} = this.fontMetrics.getMetrics(fontFamily, fontSize);\n const paintOrder = styles.paintOrder;\n\n text.textBounds.forEach((text) => {\n paintOrder.forEach((paintOrderLayer) => {\n switch (paintOrderLayer) {\n case PAINT_ORDER_LAYER.FILL:\n this.ctx.fillStyle = asString(styles.color);\n this.renderTextWithLetterSpacing(text, styles.letterSpacing, baseline);\n const textShadows: TextShadow = styles.textShadow;\n\n if (textShadows.length && text.text.trim().length) {\n textShadows\n .slice(0)\n .reverse()\n .forEach((textShadow) => {\n this.ctx.shadowColor = asString(textShadow.color);\n this.ctx.shadowOffsetX = textShadow.offsetX.number * this.options.scale;\n this.ctx.shadowOffsetY = textShadow.offsetY.number * this.options.scale;\n this.ctx.shadowBlur = textShadow.blur.number;\n\n this.renderTextWithLetterSpacing(text, styles.letterSpacing, baseline);\n });\n\n this.ctx.shadowColor = '';\n this.ctx.shadowOffsetX = 0;\n this.ctx.shadowOffsetY = 0;\n this.ctx.shadowBlur = 0;\n }\n\n if (styles.textDecorationLine.length) {\n this.ctx.fillStyle = asString(styles.textDecorationColor || styles.color);\n styles.textDecorationLine.forEach((textDecorationLine) => {\n switch (textDecorationLine) {\n case TEXT_DECORATION_LINE.UNDERLINE:\n // Draws a line at the baseline of the font\n // TODO As some browsers display the line as more than 1px if the font-size is big,\n // need to take that into account both in position and size\n this.ctx.fillRect(\n text.bounds.left,\n Math.round(text.bounds.top + baseline),\n text.bounds.width,\n 1\n );\n\n break;\n case TEXT_DECORATION_LINE.OVERLINE:\n this.ctx.fillRect(\n text.bounds.left,\n Math.round(text.bounds.top),\n text.bounds.width,\n 1\n );\n break;\n case TEXT_DECORATION_LINE.LINE_THROUGH:\n // TODO try and find exact position for line-through\n this.ctx.fillRect(\n text.bounds.left,\n Math.ceil(text.bounds.top + middle),\n text.bounds.width,\n 1\n );\n break;\n }\n });\n }\n break;\n case PAINT_ORDER_LAYER.STROKE:\n if (styles.webkitTextStrokeWidth && text.text.trim().length) {\n this.ctx.strokeStyle = asString(styles.webkitTextStrokeColor);\n this.ctx.lineWidth = styles.webkitTextStrokeWidth;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.ctx.lineJoin = !!(window as any).chrome ? 'miter' : 'round';\n this.ctx.strokeText(text.text, text.bounds.left, text.bounds.top + baseline);\n }\n this.ctx.strokeStyle = '';\n this.ctx.lineWidth = 0;\n this.ctx.lineJoin = 'miter';\n break;\n }\n });\n });\n }\n\n renderReplacedElement(\n container: ReplacedElementContainer,\n curves: BoundCurves,\n image: HTMLImageElement | HTMLCanvasElement\n ): void {\n if (image && container.intrinsicWidth > 0 && container.intrinsicHeight > 0) {\n const box = contentBox(container);\n const path = calculatePaddingBoxPath(curves);\n this.path(path);\n this.ctx.save();\n this.ctx.clip();\n this.ctx.drawImage(\n image,\n 0,\n 0,\n container.intrinsicWidth,\n container.intrinsicHeight,\n box.left,\n box.top,\n box.width,\n box.height\n );\n this.ctx.restore();\n }\n }\n\n async renderNodeContent(paint: ElementPaint): Promise<void> {\n this.applyEffects(paint.getEffects(EffectTarget.CONTENT));\n const container = paint.container;\n const curves = paint.curves;\n const styles = container.styles;\n for (const child of container.textNodes) {\n await this.renderTextNode(child, styles);\n }\n\n if (container instanceof ImageElementContainer) {\n try {\n const image = await this.context.cache.match(container.src);\n this.renderReplacedElement(container, curves, image);\n } catch (e) {\n this.context.logger.error(`Error loading image ${container.src}`);\n }\n }\n\n if (container instanceof CanvasElementContainer) {\n this.renderReplacedElement(container, curves, container.canvas);\n }\n\n if (container instanceof SVGElementContainer) {\n try {\n const image = await this.context.cache.match(container.svg);\n this.renderReplacedElement(container, curves, image);\n } catch (e) {\n this.context.logger.error(`Error loading svg ${container.svg.substring(0, 255)}`);\n }\n }\n\n if (container instanceof IFrameElementContainer && container.tree) {\n const iframeRenderer = new CanvasRenderer(this.context, {\n scale: this.options.scale,\n backgroundColor: container.backgroundColor,\n x: 0,\n y: 0,\n width: container.width,\n height: container.height\n });\n\n const canvas = await iframeRenderer.render(container.tree);\n if (container.width && container.height) {\n this.ctx.drawImage(\n canvas,\n 0,\n 0,\n container.width,\n container.height,\n container.bounds.left,\n container.bounds.top,\n container.bounds.width,\n container.bounds.height\n );\n }\n }\n\n if (container instanceof InputElementContainer) {\n const size = Math.min(container.bounds.width, container.bounds.height);\n\n if (container.type === CHECKBOX) {\n if (container.checked) {\n this.ctx.save();\n this.path([\n new Vector(container.bounds.left + size * 0.39363, container.bounds.top + size * 0.79),\n new Vector(container.bounds.left + size * 0.16, container.bounds.top + size * 0.5549),\n new Vector(container.bounds.left + size * 0.27347, container.bounds.top + size * 0.44071),\n new Vector(container.bounds.left + size * 0.39694, container.bounds.top + size * 0.5649),\n new Vector(container.bounds.left + size * 0.72983, container.bounds.top + size * 0.23),\n new Vector(container.bounds.left + size * 0.84, container.bounds.top + size * 0.34085),\n new Vector(container.bounds.left + size * 0.39363, container.bounds.top + size * 0.79)\n ]);\n\n this.ctx.fillStyle = asString(INPUT_COLOR);\n this.ctx.fill();\n this.ctx.restore();\n }\n } else if (container.type === RADIO) {\n if (container.checked) {\n this.ctx.save();\n this.ctx.beginPath();\n this.ctx.arc(\n container.bounds.left + size / 2,\n container.bounds.top + size / 2,\n size / 4,\n 0,\n Math.PI * 2,\n true\n );\n this.ctx.fillStyle = asString(INPUT_COLOR);\n this.ctx.fill();\n this.ctx.restore();\n }\n }\n }\n\n if (isTextInputElement(container) && container.value.length) {\n const [fontFamily, fontSize] = this.createFontStyle(styles);\n const {baseline} = this.fontMetrics.getMetrics(fontFamily, fontSize);\n\n this.ctx.font = fontFamily;\n this.ctx.fillStyle = asString(styles.color);\n\n this.ctx.textBaseline = 'alphabetic';\n this.ctx.textAlign = canvasTextAlign(container.styles.textAlign);\n\n const bounds = contentBox(container);\n\n let x = 0;\n\n switch (container.styles.textAlign) {\n case TEXT_ALIGN.CENTER:\n x += bounds.width / 2;\n break;\n case TEXT_ALIGN.RIGHT:\n x += bounds.width;\n break;\n }\n\n const textBounds = bounds.add(x, 0, 0, -bounds.height / 2 + 1);\n\n this.ctx.save();\n this.path([\n new Vector(bounds.left, bounds.top),\n new Vector(bounds.left + bounds.width, bounds.top),\n new Vector(bounds.left + bounds.width, bounds.top + bounds.height),\n new Vector(bounds.left, bounds.top + bounds.height)\n ]);\n\n this.ctx.clip();\n this.renderTextWithLetterSpacing(\n new TextBounds(container.value, textBounds),\n styles.letterSpacing,\n baseline\n );\n this.ctx.restore();\n this.ctx.textBaseline = 'alphabetic';\n this.ctx.textAlign = 'left';\n }\n\n if (contains(container.styles.display, DISPLAY.LIST_ITEM)) {\n if (container.styles.listStyleImage !== null) {\n const img = container.styles.listStyleImage;\n if (img.type === CSSImageType.URL) {\n let image;\n const url = (img as CSSURLImage).url;\n try {\n image = await this.context.cache.match(url);\n this.ctx.drawImage(image, container.bounds.left - (image.width + 10), container.bounds.top);\n } catch (e) {\n this.context.logger.error(`Error loading list-style-image ${url}`);\n }\n }\n } else if (paint.listValue && container.styles.listStyleType !== LIST_STYLE_TYPE.NONE) {\n const [fontFamily] = this.createFontStyle(styles);\n\n this.ctx.font = fontFamily;\n this.ctx.fillStyle = asString(styles.color);\n\n this.ctx.textBaseline = 'middle';\n this.ctx.textAlign = 'right';\n const bounds = new Bounds(\n container.bounds.left,\n container.bounds.top + getAbsoluteValue(container.styles.paddingTop, container.bounds.width),\n container.bounds.width,\n computeLineHeight(styles.lineHeight, styles.fontSize.number) / 2 + 1\n );\n\n this.renderTextWithLetterSpacing(\n new TextBounds(paint.listValue, bounds),\n styles.letterSpacing,\n computeLineHeight(styles.lineHeight, styles.fontSize.number) / 2 + 2\n );\n this.ctx.textBaseline = 'bottom';\n this.ctx.textAlign = 'left';\n }\n }\n }\n\n async renderStackContent(stack: StackingContext): Promise<void> {\n if (contains(stack.element.container.flags, FLAGS.DEBUG_RENDER)) {\n debugger;\n }\n // https://www.w3.org/TR/css-position-3/#painting-order\n // 1. the background and borders of the element forming the stacking context.\n await this.renderNodeBackgroundAndBorders(stack.element);\n // 2. the child stacking contexts with negative stack levels (most negative first).\n for (const child of stack.negativeZIndex) {\n await this.renderStack(child);\n }\n // 3. For all its in-flow, non-positioned, block-level descendants in tree order:\n await this.renderNodeContent(stack.element);\n\n for (const child of stack.nonInlineLevel) {\n await this.renderNode(child);\n }\n // 4. All non-positioned floating descendants, in tree order. For each one of these,\n // treat the element as if it created a new stacking context, but any positioned descendants and descendants\n // which actually create a new stacking context should be considered part of the parent stacking context,\n // not this new one.\n for (const child of stack.nonPositionedFloats) {\n await this.renderStack(child);\n }\n // 5. the in-flow, inline-level, non-positioned descendants, including inline tables and inline blocks.\n for (const child of stack.nonPositionedInlineLevel) {\n await this.renderStack(child);\n }\n for (const child of stack.inlineLevel) {\n await this.renderNode(child);\n }\n // 6. All positioned, opacity or transform descendants, in tree order that fall into the following categories:\n // All positioned descendants with 'z-index: auto' or 'z-index: 0', in tree order.\n // For those with 'z-index: auto', treat the element as if it created a new stacking context,\n // but any positioned descendants and descendants which actually create a new stacking context should be\n // considered part of the parent stacking context, not this new one. For those with 'z-index: 0',\n // treat the stacking context generated atomically.\n //\n // All opacity descendants with opacity less than 1\n //\n // All transform descendants with transform other than none\n for (const child of stack.zeroOrAutoZIndexOrTransformedOrOpacity) {\n await this.renderStack(child);\n }\n // 7. Stacking contexts formed by positioned descendants with z-indices greater than or equal to 1 in z-index\n // order (smallest first) then tree order.\n for (const child of stack.positiveZIndex) {\n await this.renderStack(child);\n }\n }\n\n mask(paths: Path[]): void {\n this.ctx.beginPath();\n this.ctx.moveTo(0, 0);\n this.ctx.lineTo(this.canvas.width, 0);\n this.ctx.lineTo(this.canvas.width, this.canvas.height);\n this.ctx.lineTo(0, this.canvas.height);\n this.ctx.lineTo(0, 0);\n this.formatPath(paths.slice(0).reverse());\n this.ctx.closePath();\n }\n\n path(paths: Path[]): void {\n this.ctx.beginPath();\n this.formatPath(paths);\n this.ctx.closePath();\n }\n\n formatPath(paths: Path[]): void {\n paths.forEach((point, index) => {\n const start: Vector = isBezierCurve(point) ? point.start : point;\n if (index === 0) {\n this.ctx.moveTo(start.x, start.y);\n } else {\n this.ctx.lineTo(start.x, start.y);\n }\n\n if (isBezierCurve(point)) {\n this.ctx.bezierCurveTo(\n point.startControl.x,\n point.startControl.y,\n point.endControl.x,\n point.endControl.y,\n point.end.x,\n point.end.y\n );\n }\n });\n }\n\n renderRepeat(path: Path[], pattern: CanvasPattern | CanvasGradient, offsetX: number, offsetY: number): void {\n this.path(path);\n this.ctx.fillStyle = pattern;\n this.ctx.translate(offsetX, offsetY);\n this.ctx.fill();\n this.ctx.translate(-offsetX, -offsetY);\n }\n\n resizeImage(image: HTMLImageElement, width: number, height: number): HTMLCanvasElement | HTMLImageElement {\n if (image.width === width && image.height === height) {\n return image;\n }\n\n const ownerDocument = this.canvas.ownerDocument ?? document;\n const canvas = ownerDocument.createElement('canvas');\n canvas.width = Math.max(1, width);\n canvas.height = Math.max(1, height);\n const ctx = canvas.getContext('2d') as CanvasRenderingContext2D;\n ctx.drawImage(image, 0, 0, image.width, image.height, 0, 0, width, height);\n return canvas;\n }\n\n async renderBackgroundImage(container: ElementContainer): Promise<void> {\n let index = container.styles.backgroundImage.length - 1;\n for (const backgroundImage of container.styles.backgroundImage.slice(0).reverse()) {\n if (backgroundImage.type === CSSImageType.URL) {\n let image;\n const url = (backgroundImage as CSSURLImage).url;\n try {\n image = await this.context.cache.match(url);\n } catch (e) {\n this.context.logger.error(`Error loading background-image ${url}`);\n }\n\n if (image) {\n const [path, x, y, width, height] = calculateBackgroundRendering(container, index, [\n image.width,\n image.height,\n image.width / image.height\n ]);\n const pattern = this.ctx.createPattern(\n this.resizeImage(image, width, height),\n 'repeat'\n ) as CanvasPattern;\n this.renderRepeat(path, pattern, x, y);\n }\n } else if (isLinearGradient(backgroundImage)) {\n const [path, x, y, width, height] = calculateBackgroundRendering(container, index, [null, null, null]);\n const [lineLength, x0, x1, y0, y1] = calculateGradientDirection(backgroundImage.angle, width, height);\n\n const canvas = document.createElement('canvas');\n canvas.width = width;\n canvas.height = height;\n const ctx = canvas.getContext('2d') as CanvasRenderingContext2D;\n const gradient = ctx.createLinearGradient(x0, y0, x1, y1);\n\n processColorStops(backgroundImage.stops, lineLength).forEach((colorStop) =>\n gradient.addColorStop(colorStop.stop, asString(colorStop.color))\n );\n\n ctx.fillStyle = gradient;\n ctx.fillRect(0, 0, width, height);\n if (width > 0 && height > 0) {\n const pattern = this.ctx.createPattern(canvas, 'repeat') as CanvasPattern;\n this.renderRepeat(path, pattern, x, y);\n }\n } else if (isRadialGradient(backgroundImage)) {\n const [path, left, top, width, height] = calculateBackgroundRendering(container, index, [\n null,\n null,\n null\n ]);\n const position = backgroundImage.position.length === 0 ? [FIFTY_PERCENT] : backgroundImage.position;\n const x = getAbsoluteValue(position[0], width);\n const y = getAbsoluteValue(position[position.length - 1], height);\n\n const [rx, ry] = calculateRadius(backgroundImage, x, y, width, height);\n if (rx > 0 && ry > 0) {\n const radialGradient = this.ctx.createRadialGradient(left + x, top + y, 0, left + x, top + y, rx);\n\n processColorStops(backgroundImage.stops, rx * 2).forEach((colorStop) =>\n radialGradient.addColorStop(colorStop.stop, asString(colorStop.color))\n );\n\n this.path(path);\n this.ctx.fillStyle = radialGradient;\n if (rx !== ry) {\n // transforms for elliptical radial gradient\n const midX = container.bounds.left + 0.5 * container.bounds.width;\n const midY = container.bounds.top + 0.5 * container.bounds.height;\n const f = ry / rx;\n const invF = 1 / f;\n\n this.ctx.save();\n this.ctx.translate(midX, midY);\n this.ctx.transform(1, 0, 0, f, 0, 0);\n this.ctx.translate(-midX, -midY);\n\n this.ctx.fillRect(left, invF * (top - midY) + midY, width, height * invF);\n this.ctx.restore();\n } else {\n this.ctx.fill();\n }\n }\n }\n index--;\n }\n }\n\n async renderSolidBorder(color: Color, side: number, curvePoints: BoundCurves): Promise<void> {\n this.path(parsePathForBorder(curvePoints, side));\n this.ctx.fillStyle = asString(color);\n this.ctx.fill();\n }\n\n async renderDoubleBorder(color: Color, width: number, side: number, curvePoints: BoundCurves): Promise<void> {\n if (width < 3) {\n await this.renderSolidBorder(color, side, curvePoints);\n return;\n }\n\n const outerPaths = parsePathForBorderDoubleOuter(curvePoints, side);\n this.path(outerPaths);\n this.ctx.fillStyle = asString(color);\n this.ctx.fill();\n const innerPaths = parsePathForBorderDoubleInner(curvePoints, side);\n this.path(innerPaths);\n this.ctx.fill();\n }\n\n async renderNodeBackgroundAndBorders(paint: ElementPaint): Promise<void> {\n this.applyEffects(paint.getEffects(EffectTarget.BACKGROUND_BORDERS));\n const styles = paint.container.styles;\n const hasBackground = !isTransparent(styles.backgroundColor) || styles.backgroundImage.length;\n\n const borders = [\n {style: styles.borderTopStyle, color: styles.borderTopColor, width: styles.borderTopWidth},\n {style: styles.borderRightStyle, color: styles.borderRightColor, width: styles.borderRightWidth},\n {style: styles.borderBottomStyle, color: styles.borderBottomColor, width: styles.borderBottomWidth},\n {style: styles.borderLeftStyle, color: styles.borderLeftColor, width: styles.borderLeftWidth}\n ];\n\n const backgroundPaintingArea = calculateBackgroundCurvedPaintingArea(\n getBackgroundValueForIndex(styles.backgroundClip, 0),\n paint.curves\n );\n\n if (hasBackground || styles.boxShadow.length) {\n this.ctx.save();\n this.path(backgroundPaintingArea);\n this.ctx.clip();\n\n if (!isTransparent(styles.backgroundColor)) {\n this.ctx.fillStyle = asString(styles.backgroundColor);\n this.ctx.fill();\n }\n\n await this.renderBackgroundImage(paint.container);\n\n this.ctx.restore();\n\n styles.boxShadow\n .slice(0)\n .reverse()\n .forEach((shadow) => {\n this.ctx.save();\n const borderBoxArea = calculateBorderBoxPath(paint.curves);\n const maskOffset = shadow.inset ? 0 : MASK_OFFSET;\n const shadowPaintingArea = transformPath(\n borderBoxArea,\n -maskOffset + (shadow.inset ? 1 : -1) * shadow.spread.number,\n (shadow.inset ? 1 : -1) * shadow.spread.number,\n shadow.spread.number * (shadow.inset ? -2 : 2),\n shadow.spread.number * (shadow.inset ? -2 : 2)\n );\n\n if (shadow.inset) {\n this.path(borderBoxArea);\n this.ctx.clip();\n this.mask(shadowPaintingArea);\n } else {\n this.mask(borderBoxArea);\n this.ctx.clip();\n this.path(shadowPaintingArea);\n }\n\n this.ctx.shadowOffsetX = shadow.offsetX.number + maskOffset;\n this.ctx.shadowOffsetY = shadow.offsetY.number;\n this.ctx.shadowColor = asString(shadow.color);\n this.ctx.shadowBlur = shadow.blur.number;\n this.ctx.fillStyle = shadow.inset ? asString(shadow.color) : 'rgba(0,0,0,1)';\n\n this.ctx.fill();\n this.ctx.restore();\n });\n }\n\n let side = 0;\n for (const border of borders) {\n if (border.style !== BORDER_STYLE.NONE && !isTransparent(border.color) && border.width > 0) {\n if (border.style === BORDER_STYLE.DASHED) {\n await this.renderDashedDottedBorder(\n border.color,\n border.width,\n side,\n paint.curves,\n BORDER_STYLE.DASHED\n );\n } else if (border.style === BORDER_STYLE.DOTTED) {\n await this.renderDashedDottedBorder(\n border.color,\n border.width,\n side,\n paint.curves,\n BORDER_STYLE.DOTTED\n );\n } else if (border.style === BORDER_STYLE.DOUBLE) {\n await this.renderDoubleBorder(border.color, border.width, side, paint.curves);\n } else {\n await this.renderSolidBorder(border.color, side, paint.curves);\n }\n }\n side++;\n }\n }\n\n async renderDashedDottedBorder(\n color: Color,\n width: number,\n side: number,\n curvePoints: BoundCurves,\n style: BORDER_STYLE\n ): Promise<void> {\n this.ctx.save();\n\n const strokePaths = parsePathForBorderStroke(curvePoints, side);\n const boxPaths = parsePathForBorder(curvePoints, side);\n\n if (style === BORDER_STYLE.DASHED) {\n this.path(boxPaths);\n this.ctx.clip();\n }\n\n let startX, startY, endX, endY;\n if (isBezierCurve(boxPaths[0])) {\n startX = (boxPaths[0] as BezierCurve).start.x;\n startY = (boxPaths[0] as BezierCurve).start.y;\n } else {\n startX = (boxPaths[0] as Vector).x;\n startY = (boxPaths[0] as Vector).y;\n }\n if (isBezierCurve(boxPaths[1])) {\n endX = (boxPaths[1] as BezierCurve).end.x;\n endY = (boxPaths[1] as BezierCurve).end.y;\n } else {\n endX = (boxPaths[1] as Vector).x;\n endY = (boxPaths[1] as Vector).y;\n }\n\n let length;\n if (side === 0 || side === 2) {\n length = Math.abs(startX - endX);\n } else {\n length = Math.abs(startY - endY);\n }\n\n this.ctx.beginPath();\n if (style === BORDER_STYLE.DOTTED) {\n this.formatPath(strokePaths);\n } else {\n this.formatPath(boxPaths.slice(0, 2));\n }\n\n let dashLength = width < 3 ? width * 3 : width * 2;\n let spaceLength = width < 3 ? width * 2 : width;\n if (style === BORDER_STYLE.DOTTED) {\n dashLength = width;\n spaceLength = width;\n }\n\n let useLineDash = true;\n if (length <= dashLength * 2) {\n useLineDash = false;\n } else if (length <= dashLength * 2 + spaceLength) {\n const multiplier = length / (2 * dashLength + spaceLength);\n dashLength *= multiplier;\n spaceLength *= multiplier;\n } else {\n const numberOfDashes = Math.floor((length + spaceLength) / (dashLength + spaceLength));\n const minSpace = (length - numberOfDashes * dashLength) / (numberOfDashes - 1);\n const maxSpace = (length - (numberOfDashes + 1) * dashLength) / numberOfDashes;\n spaceLength =\n maxSpace <= 0 || Math.abs(spaceLength - minSpace) < Math.abs(spaceLength - maxSpace)\n ? minSpace\n : maxSpace;\n }\n\n if (useLineDash) {\n if (style === BORDER_STYLE.DOTTED) {\n this.ctx.setLineDash([0, dashLength + spaceLength]);\n } else {\n this.ctx.setLineDash([dashLength, spaceLength]);\n }\n }\n\n if (style === BORDER_STYLE.DOTTED) {\n this.ctx.lineCap = 'round';\n this.ctx.lineWidth = width;\n } else {\n this.ctx.lineWidth = width * 2 + 1.1;\n }\n this.ctx.strokeStyle = asString(color);\n this.ctx.stroke();\n this.ctx.setLineDash([]);\n\n // dashed round edge gap\n if (style === BORDER_STYLE.DASHED) {\n if (isBezierCurve(boxPaths[0])) {\n const path1 = boxPaths[3] as BezierCurve;\n const path2 = boxPaths[0] as BezierCurve;\n this.ctx.beginPath();\n this.formatPath([new Vector(path1.end.x, path1.end.y), new Vector(path2.start.x, path2.start.y)]);\n this.ctx.stroke();\n }\n if (isBezierCurve(boxPaths[1])) {\n const path1 = boxPaths[1] as BezierCurve;\n const path2 = boxPaths[2] as BezierCurve;\n this.ctx.beginPath();\n this.formatPath([new Vector(path1.end.x, path1.end.y), new Vector(path2.start.x, path2.start.y)]);\n this.ctx.stroke();\n }\n }\n\n this.ctx.restore();\n }\n\n async render(element: ElementContainer): Promise<HTMLCanvasElement> {\n if (this.options.backgroundColor) {\n this.ctx.fillStyle = asString(this.options.backgroundColor);\n this.ctx.fillRect(this.options.x, this.options.y, this.options.width, this.options.height);\n }\n\n const stack = parseStackingContexts(element);\n\n await this.renderStack(stack);\n this.applyEffects([]);\n return this.canvas;\n }\n}\n\nconst isTextInputElement = (\n container: ElementContainer\n): container is InputElementContainer | TextareaElementContainer | SelectElementContainer => {\n if (container instanceof TextareaElementContainer) {\n return true;\n } else if (container instanceof SelectElementContainer) {\n return true;\n } else if (container instanceof InputElementContainer && container.type !== RADIO && container.type !== CHECKBOX) {\n return true;\n }\n return false;\n};\n\nconst calculateBackgroundCurvedPaintingArea = (clip: BACKGROUND_CLIP, curves: BoundCurves): Path[] => {\n switch (clip) {\n case BACKGROUND_CLIP.BORDER_BOX:\n return calculateBorderBoxPath(curves);\n case BACKGROUND_CLIP.CONTENT_BOX:\n return calculateContentBoxPath(curves);\n case BACKGROUND_CLIP.PADDING_BOX:\n default:\n return calculatePaddingBoxPath(curves);\n }\n};\n\nconst canvasTextAlign = (textAlign: TEXT_ALIGN): CanvasTextAlign => {\n switch (textAlign) {\n case TEXT_ALIGN.CENTER:\n return 'center';\n case TEXT_ALIGN.RIGHT:\n return 'right';\n case TEXT_ALIGN.LEFT:\n default:\n return 'left';\n }\n};\n\n// see https://github.com/niklasvh/html2canvas/pull/2645\nconst iOSBrokenFonts = ['-apple-system', 'system-ui'];\n\nconst fixIOSSystemFonts = (fontFamilies: string[]): string[] => {\n return /iPhone OS 15_(0|1)/.test(window.navigator.userAgent)\n ? fontFamilies.filter((fontFamily) => iOSBrokenFonts.indexOf(fontFamily) === -1)\n : fontFamilies;\n};\n","import {RenderConfigurations} from './canvas-renderer';\nimport {createForeignObjectSVG} from '../../core/features';\nimport {asString} from '../../css/types/color';\nimport {Renderer} from '../renderer';\nimport {Context} from '../../core/context';\n\nexport class ForeignObjectRenderer extends Renderer {\n canvas: HTMLCanvasElement;\n ctx: CanvasRenderingContext2D;\n options: RenderConfigurations;\n\n constructor(context: Context, options: RenderConfigurations) {\n super(context, options);\n this.canvas = options.canvas ? options.canvas : document.createElement('canvas');\n this.ctx = this.canvas.getContext('2d') as CanvasRenderingContext2D;\n this.options = options;\n this.canvas.width = Math.floor(options.width * options.scale);\n this.canvas.height = Math.floor(options.height * options.scale);\n this.canvas.style.width = `${options.width}px`;\n this.canvas.style.height = `${options.height}px`;\n\n this.ctx.scale(this.options.scale, this.options.scale);\n this.ctx.translate(-options.x, -options.y);\n this.context.logger.debug(\n `EXPERIMENTAL ForeignObject renderer initialized (${options.width}x${options.height} at ${options.x},${options.y}) with scale ${options.scale}`\n );\n }\n\n async render(element: HTMLElement): Promise<HTMLCanvasElement> {\n const svg = createForeignObjectSVG(\n this.options.width * this.options.scale,\n this.options.height * this.options.scale,\n this.options.scale,\n this.options.scale,\n element\n );\n\n const img = await loadSerializedSVG(svg);\n\n if (this.options.backgroundColor) {\n this.ctx.fillStyle = asString(this.options.backgroundColor);\n this.ctx.fillRect(0, 0, this.options.width * this.options.scale, this.options.height * this.options.scale);\n }\n\n this.ctx.drawImage(img, -this.options.x * this.options.scale, -this.options.y * this.options.scale);\n\n return this.canvas;\n }\n}\n\nexport const loadSerializedSVG = (svg: Node): Promise<HTMLImageElement> =>\n new Promise((resolve, reject) => {\n const img = new Image();\n img.onload = () => {\n resolve(img);\n };\n img.onerror = reject;\n\n img.src = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(new XMLSerializer().serializeToString(svg))}`;\n });\n","export interface LoggerOptions {\n id: string;\n enabled: boolean;\n}\n\nexport class Logger {\n static instances: {[key: string]: Logger} = {};\n\n private readonly id: string;\n private readonly enabled: boolean;\n private readonly start: number;\n\n constructor({id, enabled}: LoggerOptions) {\n this.id = id;\n this.enabled = enabled;\n this.start = Date.now();\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n debug(...args: unknown[]): void {\n if (this.enabled) {\n // eslint-disable-next-line no-console\n if (typeof window !== 'undefined' && window.console && typeof console.debug === 'function') {\n // eslint-disable-next-line no-console\n console.debug(this.id, `${this.getTime()}ms`, ...args);\n } else {\n this.info(...args);\n }\n }\n }\n\n getTime(): number {\n return Date.now() - this.start;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n info(...args: unknown[]): void {\n if (this.enabled) {\n // eslint-disable-next-line no-console\n if (typeof window !== 'undefined' && window.console && typeof console.info === 'function') {\n // eslint-disable-next-line no-console\n console.info(this.id, `${this.getTime()}ms`, ...args);\n }\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n warn(...args: unknown[]): void {\n if (this.enabled) {\n // eslint-disable-next-line no-console\n if (typeof window !== 'undefined' && window.console && typeof console.warn === 'function') {\n // eslint-disable-next-line no-console\n console.warn(this.id, `${this.getTime()}ms`, ...args);\n } else {\n this.info(...args);\n }\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n error(...args: unknown[]): void {\n if (this.enabled) {\n // eslint-disable-next-line no-console\n if (typeof window !== 'undefined' && window.console && typeof console.error === 'function') {\n // eslint-disable-next-line no-console\n console.error(this.id, `${this.getTime()}ms`, ...args);\n } else {\n this.info(...args);\n }\n }\n }\n}\n","import {Logger} from './logger';\nimport {Cache, ResourceOptions} from './cache-storage';\nimport {Bounds} from '../css/layout/bounds';\n\nexport type ContextOptions = {\n logging: boolean;\n cache?: Cache;\n} & ResourceOptions;\n\nexport class Context {\n private readonly instanceName = `#${Context.instanceCount++}`;\n readonly logger: Logger;\n readonly cache: Cache;\n\n private static instanceCount = 1;\n\n constructor(options: ContextOptions, public windowBounds: Bounds) {\n this.logger = new Logger({id: this.instanceName, enabled: options.logging});\n this.cache = options.cache ?? new Cache(this, options);\n }\n}\n","import {Bounds, parseBounds, parseDocumentSize} from './css/layout/bounds';\nimport {COLORS, isTransparent, parseColor} from './css/types/color';\nimport {CloneConfigurations, CloneOptions, DocumentCloner, WindowOptions} from './dom/document-cloner';\nimport {isBodyElement, isHTMLElement, parseTree} from './dom/node-parser';\nimport {CacheStorage} from './core/cache-storage';\nimport {CanvasRenderer, RenderConfigurations, RenderOptions} from './render/canvas/canvas-renderer';\nimport {ForeignObjectRenderer} from './render/canvas/foreignobject-renderer';\nimport {Context, ContextOptions} from './core/context';\n\nexport type Options = CloneOptions &\n WindowOptions &\n RenderOptions &\n ContextOptions & {\n backgroundColor: string | null;\n foreignObjectRendering: boolean;\n removeContainer?: boolean;\n };\n\nconst html2canvas = (element: HTMLElement, options: Partial<Options> = {}): Promise<HTMLCanvasElement> => {\n return renderElement(element, options);\n};\n\nexport default html2canvas;\n\nif (typeof window !== 'undefined') {\n CacheStorage.setContext(window);\n}\n\nconst renderElement = async (element: HTMLElement, opts: Partial<Options>): Promise<HTMLCanvasElement> => {\n if (!element || typeof element !== 'object') {\n return Promise.reject('Invalid element provided as first argument');\n }\n const ownerDocument = element.ownerDocument;\n\n if (!ownerDocument) {\n throw new Error(`Element is not attached to a Document`);\n }\n\n const defaultView = ownerDocument.defaultView;\n\n if (!defaultView) {\n throw new Error(`Document is not attached to a Window`);\n }\n\n const resourceOptions = {\n allowTaint: opts.allowTaint ?? false,\n imageTimeout: opts.imageTimeout ?? 15000,\n proxy: opts.proxy,\n useCORS: opts.useCORS ?? false\n };\n\n const contextOptions = {\n logging: opts.logging ?? true,\n cache: opts.cache,\n ...resourceOptions\n };\n\n const windowOptions = {\n windowWidth: opts.windowWidth ?? defaultView.innerWidth,\n windowHeight: opts.windowHeight ?? defaultView.innerHeight,\n scrollX: opts.scrollX ?? defaultView.pageXOffset,\n scrollY: opts.scrollY ?? defaultView.pageYOffset\n };\n\n const windowBounds = new Bounds(\n windowOptions.scrollX,\n windowOptions.scrollY,\n windowOptions.windowWidth,\n windowOptions.windowHeight\n );\n\n const context = new Context(contextOptions, windowBounds);\n\n const foreignObjectRendering = opts.foreignObjectRendering ?? false;\n\n const cloneOptions: CloneConfigurations = {\n allowTaint: opts.allowTaint ?? false,\n onclone: opts.onclone,\n ignoreElements: opts.ignoreElements,\n inlineImages: foreignObjectRendering,\n copyStyles: foreignObjectRendering\n };\n\n context.logger.debug(\n `Starting document clone with size ${windowBounds.width}x${\n windowBounds.height\n } scrolled to ${-windowBounds.left},${-windowBounds.top}`\n );\n\n const documentCloner = new DocumentCloner(context, element, cloneOptions);\n const clonedElement = documentCloner.clonedReferenceElement;\n if (!clonedElement) {\n return Promise.reject(`Unable to find element in cloned iframe`);\n }\n\n const container = await documentCloner.toIFrame(ownerDocument, windowBounds);\n\n const {width, height, left, top} =\n isBodyElement(clonedElement) || isHTMLElement(clonedElement)\n ? parseDocumentSize(clonedElement.ownerDocument)\n : parseBounds(context, clonedElement);\n\n const backgroundColor = parseBackgroundColor(context, clonedElement, opts.backgroundColor);\n\n const renderOptions: RenderConfigurations = {\n canvas: opts.canvas,\n backgroundColor,\n scale: opts.scale ?? defaultView.devicePixelRatio ?? 1,\n x: (opts.x ?? 0) + left,\n y: (opts.y ?? 0) + top,\n width: opts.width ?? Math.ceil(width),\n height: opts.height ?? Math.ceil(height)\n };\n\n let canvas;\n\n if (foreignObjectRendering) {\n context.logger.debug(`Document cloned, using foreign object rendering`);\n const renderer = new ForeignObjectRenderer(context, renderOptions);\n canvas = await renderer.render(clonedElement);\n } else {\n context.logger.debug(\n `Document cloned, element located at ${left},${top} with size ${width}x${height} using computed rendering`\n );\n\n context.logger.debug(`Starting DOM parsing`);\n const root = parseTree(context, clonedElement);\n\n if (backgroundColor === root.styles.backgroundColor) {\n root.styles.backgroundColor = COLORS.TRANSPARENT;\n }\n\n context.logger.debug(\n `Starting renderer for element at ${renderOptions.x},${renderOptions.y} with size ${renderOptions.width}x${renderOptions.height}`\n );\n\n const renderer = new CanvasRenderer(context, renderOptions);\n canvas = await renderer.render(root);\n }\n\n if (opts.removeContainer ?? true) {\n if (!DocumentCloner.destroy(container)) {\n context.logger.error(`Cannot detach cloned iframe as it is not in the DOM anymore`);\n }\n }\n\n context.logger.debug(`Finished rendering`);\n return canvas;\n};\n\nconst parseBackgroundColor = (context: Context, element: HTMLElement, backgroundColorOverride?: string | null) => {\n const ownerDocument = element.ownerDocument;\n // http://www.w3.org/TR/css3-background/#special-backgrounds\n const documentBackgroundColor = ownerDocument.documentElement\n ? parseColor(context, getComputedStyle(ownerDocument.documentElement).backgroundColor as string)\n : COLORS.TRANSPARENT;\n const bodyBackgroundColor = ownerDocument.body\n ? parseColor(context, getComputedStyle(ownerDocument.body).backgroundColor as string)\n : COLORS.TRANSPARENT;\n\n const defaultBackgroundColor =\n typeof backgroundColorOverride === 'string'\n ? parseColor(context, backgroundColorOverride)\n : backgroundColorOverride === null\n ? COLORS.TRANSPARENT\n : 0xffffffff;\n\n return element === ownerDocument.documentElement\n ? isTransparent(documentBackgroundColor)\n ? isTransparent(bodyBackgroundColor)\n ? defaultBackgroundColor\n : bodyBackgroundColor\n : documentBackgroundColor\n : defaultBackgroundColor;\n};\n"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","__extends","TypeError","String","__","this","constructor","create","__assign","assign","t","s","i","n","arguments","length","apply","__awaiter","thisArg","_arguments","P","generator","adopt","value","resolve","Promise","reject","fulfilled","step","next","e","rejected","result","done","then","__generator","body","_","label","sent","trys","ops","f","y","g","verb","Symbol","iterator","v","op","pop","push","__spreadArray","to","from","pack","l","ar","slice","concat","left","top","width","height","add","x","w","h","Bounds","fromClientRect","context","clientRect","windowBounds","fromDOMRectList","domRectList","domRect","find","rect","EMPTY","parseBounds","node","getBoundingClientRect","parseDocumentSize","document","documentElement","Error","Math","max","scrollWidth","offsetWidth","clientWidth","scrollHeight","offsetHeight","clientHeight","toCodePoints","str","codePoints","charCodeAt","extra","fromCodePoint","codeUnits","index","codePoint","fromCharCode","chars","lookup","Uint8Array","decode","base64","bufferLength","len","encoded1","encoded2","encoded3","encoded4","buffer","ArrayBuffer","bytes","isArray","polyUint16Array","polyUint32Array","UTRIE2_SHIFT_2","UTRIE2_SHIFT_1","UTRIE2_INDEX_SHIFT","UTRIE2_SHIFT_1_2","UTRIE2_LSCP_INDEX_2_OFFSET","UTRIE2_DATA_BLOCK_LENGTH","UTRIE2_DATA_MASK","UTRIE2_LSCP_INDEX_2_LENGTH","UTRIE2_INDEX_2_BMP_LENGTH","UTRIE2_UTF8_2B_INDEX_2_OFFSET","UTRIE2_UTF8_2B_INDEX_2_LENGTH","UTRIE2_INDEX_1_OFFSET","UTRIE2_OMITTED_BMP_INDEX_1_LENGTH","UTRIE2_INDEX_2_BLOCK_LENGTH","UTRIE2_INDEX_2_MASK","slice16","view","start","end","Uint16Array","slice32","Uint32Array","createTrieFromBase64","_byteLength","view32","view16","headerLength","data","ceil","Trie","initialValue","errorValue","highStart","highValueIndex","get","ix","LETTER_NUMBER_MODIFIER","BK","CR","LF","CM","NL","WJ","ZW","GL","SP","ZWJ","B2","BA","BB","HY","CB","CL","CP","EX","IN","NS","OP","QU","IS","NU","PO","PR","SY","AI","AL","CJ","EB","EM","H2","H3","HL","ID","JL","JV","JT","RI","SA","XX","ea_OP","BREAK_MANDATORY","BREAK_NOT_ALLOWED","BREAK_ALLOWED","UnicodeTrie","ALPHABETICS","HARD_LINE_BREAKS","SPACE","PREFIX_POSTFIX","LINE_BREAKS","KOREAN_SYLLABLE_BLOCK","HYPHEN","codePointsToCharacterClasses","lineBreak","types","indices","categories","forEach","classType","indexOf","prev","isAdjacentWithSpaceIgnored","a","currentIndex","classTypes","current","previousNonSpaceClassType","type","_lineBreakAtIndex","indicies","forbiddenBreaks","beforeIndex","afterIndex","before","prevIndex","count","cssFormattedClasses","options","wordBreak","isLetterNumber","map","forbiddenBreakpoints","letterNumber","undefined","required","LineBreaker","lastEnd","nextIndex","Break","FLAG_UNRESTRICTED","FLAG_ID","FLAG_INTEGER","FLAG_NUMBER","LINE_FEED","SOLIDUS","REVERSE_SOLIDUS","CHARACTER_TABULATION","QUOTATION_MARK","EQUALS_SIGN","NUMBER_SIGN","DOLLAR_SIGN","PERCENTAGE_SIGN","APOSTROPHE","LEFT_PARENTHESIS","RIGHT_PARENTHESIS","LOW_LINE","HYPHEN_MINUS","EXCLAMATION_MARK","LESS_THAN_SIGN","GREATER_THAN_SIGN","COMMERCIAL_AT","LEFT_SQUARE_BRACKET","RIGHT_SQUARE_BRACKET","CIRCUMFLEX_ACCENT","LEFT_CURLY_BRACKET","QUESTION_MARK","RIGHT_CURLY_BRACKET","VERTICAL_LINE","TILDE","CONTROL","REPLACEMENT_CHARACTER","ASTERISK","PLUS_SIGN","COMMA","COLON","SEMICOLON","FULL_STOP","NULL","BACKSPACE","LINE_TABULATION","SHIFT_OUT","INFORMATION_SEPARATOR_ONE","DELETE","EOF","ZERO","u","z","A","E","F","U","Z","isDigit","isSurrogateCodePoint","isHex","isLowerCaseLetter","isUpperCaseLetter","isLetter","isNonASCIICodePoint","isWhiteSpace","isNameStartCodePoint","isNameCodePoint","isNonPrintableCodePoint","isValidEscape","c1","c2","isIdentifierStart","c3","isNumberStart","stringToNumber","c","sign","integers","int","parseInt","fraction","fracd","frac","expsign","exponent","exp","pow","LEFT_PARENTHESIS_TOKEN","RIGHT_PARENTHESIS_TOKEN","COMMA_TOKEN","SUFFIX_MATCH_TOKEN","PREFIX_MATCH_TOKEN","COLUMN_TOKEN","DASH_MATCH_TOKEN","INCLUDE_MATCH_TOKEN","LEFT_CURLY_BRACKET_TOKEN","RIGHT_CURLY_BRACKET_TOKEN","SUBSTRING_MATCH_TOKEN","BAD_URL_TOKEN","BAD_STRING_TOKEN","CDO_TOKEN","CDC_TOKEN","COLON_TOKEN","SEMICOLON_TOKEN","LEFT_SQUARE_BRACKET_TOKEN","RIGHT_SQUARE_BRACKET_TOKEN","WHITESPACE_TOKEN","EOF_TOKEN","_value","write","chunk","read","tokens","token","consumeToken","consumeCodePoint","consumeStringToken","peekCodePoint","flags","consumeName","reconsumeCodePoint","consumeNumericToken","e1","e2","e3","consumeIdentLikeToken","a1","a2","a3","u1","u2","consumeUnicodeRangeToken","consumeWhiteSpace","shift","unshift","delta","digits","questionMarks","digit","endDigits","toLowerCase","consumeUrlToken","stringToken","consumeBadUrlRemnants","consumeEscapedCodePoint","consumeStringSlice","SLICE_STACK_SIZE","amount","min","splice","endingCodePoint","consumeNumber","repr","number","unit","hex","hexCodePoint","_tokens","tokenizer","Tokenizer","Parser","parseValue","parseComponentValue","parseValues","parseComponentValues","SyntaxError","reconsumeToken","consumeComponentValue","values","consumeSimpleBlock","consumeFunction","block","isEndingTokenFor","functionToken","cssFunction","name","isDimensionToken","isNumberToken","isIdentToken","isStringToken","isIdentWithValue","nonWhiteSpace","nonFunctionArgSeparator","parseFunctionArgs","args","arg","isLength","isLengthPercentage","parseLengthPercentageTuple","ZERO_LENGTH","FIFTY_PERCENT","HUNDRED_PERCENT","getAbsoluteValueForTuple","tuple","getAbsoluteValue","parent","DEG","GRAD","RAD","TURN","angle","parse","_context","PI","isAngle","parseNamedSide","sideOrCorner","filter","ident","join","deg","color","colorFunction","SUPPORTED_COLOR_FUNCTIONS","r","substring","namedColor","COLORS","toUpperCase","TRANSPARENT","isTransparent","asString","alpha","blue","green","red","round","getTokenColorValue","rgb","hue2rgb","t1","t2","hue","hsl","saturation","lightness","hsla","rgba","parseColor","ALICEBLUE","ANTIQUEWHITE","AQUA","AQUAMARINE","AZURE","BEIGE","BISQUE","BLACK","BLANCHEDALMOND","BLUE","BLUEVIOLET","BROWN","BURLYWOOD","CADETBLUE","CHARTREUSE","CHOCOLATE","CORAL","CORNFLOWERBLUE","CORNSILK","CRIMSON","CYAN","DARKBLUE","DARKCYAN","DARKGOLDENROD","DARKGRAY","DARKGREEN","DARKGREY","DARKKHAKI","DARKMAGENTA","DARKOLIVEGREEN","DARKORANGE","DARKORCHID","DARKRED","DARKSALMON","DARKSEAGREEN","DARKSLATEBLUE","DARKSLATEGRAY","DARKSLATEGREY","DARKTURQUOISE","DARKVIOLET","DEEPPINK","DEEPSKYBLUE","DIMGRAY","DIMGREY","DODGERBLUE","FIREBRICK","FLORALWHITE","FORESTGREEN","FUCHSIA","GAINSBORO","GHOSTWHITE","GOLD","GOLDENROD","GRAY","GREEN","GREENYELLOW","GREY","HONEYDEW","HOTPINK","INDIANRED","INDIGO","IVORY","KHAKI","LAVENDER","LAVENDERBLUSH","LAWNGREEN","LEMONCHIFFON","LIGHTBLUE","LIGHTCORAL","LIGHTCYAN","LIGHTGOLDENRODYELLOW","LIGHTGRAY","LIGHTGREEN","LIGHTGREY","LIGHTPINK","LIGHTSALMON","LIGHTSEAGREEN","LIGHTSKYBLUE","LIGHTSLATEGRAY","LIGHTSLATEGREY","LIGHTSTEELBLUE","LIGHTYELLOW","LIME","LIMEGREEN","LINEN","MAGENTA","MAROON","MEDIUMAQUAMARINE","MEDIUMBLUE","MEDIUMORCHID","MEDIUMPURPLE","MEDIUMSEAGREEN","MEDIUMSLATEBLUE","MEDIUMSPRINGGREEN","MEDIUMTURQUOISE","MEDIUMVIOLETRED","MIDNIGHTBLUE","MINTCREAM","MISTYROSE","MOCCASIN","NAVAJOWHITE","NAVY","OLDLACE","OLIVE","OLIVEDRAB","ORANGE","ORANGERED","ORCHID","PALEGOLDENROD","PALEGREEN","PALETURQUOISE","PALEVIOLETRED","PAPAYAWHIP","PEACHPUFF","PERU","PINK","PLUM","POWDERBLUE","PURPLE","REBECCAPURPLE","RED","ROSYBROWN","ROYALBLUE","SADDLEBROWN","SALMON","SANDYBROWN","SEAGREEN","SEASHELL","SIENNA","SILVER","SKYBLUE","SLATEBLUE","SLATEGRAY","SLATEGREY","SNOW","SPRINGGREEN","STEELBLUE","TAN","TEAL","THISTLE","TOMATO","TURQUOISE","VIOLET","WHEAT","WHITE","WHITESMOKE","YELLOW","YELLOWGREEN","backgroundClip","prefix","backgroundColor","format","parseColorStop","colorType","stop","processColorStops","stops","lineLength","first","last","processStops","previous","absoluteValue","gapBegin","gapLength","beforeGap","gapValue","getAngleFromCorner","corner","centerX","centerY","atan2","calculateGradientDirection","radian","abs","sin","cos","halfWidth","halfHeight","halfLineLength","yDiff","xDiff","distance","sqrt","findCorner","closest","corners","reduce","stat","cx","cy","optimumDistance","optimumCorner","Infinity","calculateRadius","gradient","rx","ry","size","shape","linearGradient","firstToken","angleType","colorStop","prefixLinearGradient","webkitGradient","position","CLOSEST_SIDE","FARTHEST_SIDE","CLOSEST_CORNER","FARTHEST_CORNER","CIRCLE","ELLIPSE","COVER","CONTAIN","radialGradient","isColorStop","acc","prefixRadialGradient","isLinearGradient","background","isRadialGradient","image","url","cache","addImage","imageFunction","SUPPORTED_IMAGE_FUNCTIONS","isSupportedImage","backgroundImage","backgroundOrigin","backgroundPosition","backgroundRepeat","parseBackgroundRepeat","BACKGROUND_SIZE","backgroundSize","isBackgroundSizeInfoToken","borderColorForSide","side","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","borderRadiusForSide","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","borderStyleForSide","style","borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle","borderWidthForSide","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","direction","display","bit","parseDisplayValue","float","letterSpacing","LINE_BREAK","STRICT","NORMAL","lineHeight","computeLineHeight","fontSize","listStyleImage","listStylePosition","listStyleType","marginForSide","marginTop","marginRight","marginBottom","marginLeft","overflow","overflowWrap","paddingForSide","paddingTop","paddingRight","paddingBottom","paddingLeft","textAlign","textShadow","shadow","offsetX","offsetY","blur","textTransform","transform","transformFunction","SUPPORTED_TRANSFORM_FUNCTIONS","matrix","matrix3d","b1","b2","a4","b4","DEFAULT_VALUE","DEFAULT","transformOrigin","origins","visibility","WORD_BREAK","BREAK_ALL","KEEP_ALL","zIndex","auto","order","time","opacity","textDecorationColor","textDecorationLine","line","fontFamily","accumulator","results","toString","fontWeight","fontVariant","fontStyle","contains","content","counterIncrement","increments","filtered","counter","increment","counterReset","resets","reset","duration","quotes","open","close","getQuote","depth","quote","boxShadow","spread","inset","paintOrder","layers","webkitTextStrokeColor","webkitTextStrokeWidth","declaration","animationDuration","cssFloat","overflowTuple","overflowX","overflowY","textDecoration","isVisible","isTransformed","isPositioned","isPositionedWithZIndex","isFloating","isInlineLevel","descriptor","parser","elementDebuggerAttribute","getElementDebugType","element","attribute","getAttribute","isDebugging","elementType","textNodes","elements","styles","CSSParsedDeclaration","window","getComputedStyle","isHTMLElementNode","some","bounds","Prepend","Control","Extend","SpacingMark","L","V","T","LV","LVT","Extended_Pictographic","codePointToClass","_graphemeBreakAtIndex","_codePoints","countRI","GraphemeBreaker","graphemeBreak","splitGraphemes","breaker","graphemes","bk","testRangeBounds","TEST_HEIGHT","createRange","range","testElement","createElement","appendChild","selectNode","rangeBounds","rangeHeight","removeChild","testIOSLineBreak","wordSpacing","innerHTML","repeat","firstChild","textList","offset","supports","every","text","setStart","setEnd","boundAhead","testCORS","Image","crossOrigin","testResponseType","XMLHttpRequest","responseType","testSVG","img","canvas","ctx","getContext","src","drawImage","toDataURL","isGreenPixel","testForeignObject","fillStyle","fillRect","greenImageSrc","svg","createForeignObjectSVG","loadSerializedSVG","getImageData","catch","xmlns","createElementNS","foreignObject","setAttributeNS","onload","onerror","encodeURIComponent","XMLSerializer","serializeToString","FEATURES","SUPPORT_RANGE_BOUNDS","defineProperty","SUPPORT_WORD_BREAKING","SUPPORT_SVG_DRAWING","SUPPORT_FOREIGNOBJECT_DRAWING","fetch","SUPPORT_CORS_IMAGES","SUPPORT_RESPONSE_TYPE","SUPPORT_CORS_XHR","SUPPORT_NATIVE_TEXT_SEGMENTATION","Intl","Segmenter","parseTextBounds","breakText","textBounds","trim","clientRects","getClientRects","subSegments","segmentGraphemes","subSegment","TextBounds","replacementNode","splitText","getWrapperBounds","ownerDocument","wrapper","cloneNode","parentNode","replaceChild","segmenter","granularity","segment","segmentWords","breakWords","wordSeparators","words","replace","CAPITALIZE","capitalize","m","p1","p2","currentSrc","intrinsicWidth","naturalWidth","intrinsicHeight","naturalHeight","ElementContainer","setAttribute","baseVal","reversed","CHECKBOX_BORDER_RADIUS","RADIO_BORDER_RADIUS","reformatInputBounds","getInputValue","PASSWORD","placeholder","CHECKBOX","RADIO","INPUT_COLOR","input","checked","option","selectedIndex","iframe","contentWindow","tree","parseTree","documentBackgroundColor","bodyBackgroundColor","LIST_OWNERS","parseNodeTree","root","childNode","nextNode","nextSibling","isTextNode","TextContainer","isElementNode","isSlotElement","assignedNodes","container","createContainer","createsRealStackingContext","createsStackingContext","tagName","slot","shadowRoot","isTextareaElement","isSVGElement","isSelectElement","isImageElement","ImageElementContainer","isCanvasElement","CanvasElementContainer","SVGElementContainer","isLIElement","LIElementContainer","isOLElement","OLElementContainer","isInputElement","InputElementContainer","SelectElementContainer","TextareaElementContainer","isIFrameElement","IFrameElementContainer","isBodyElement","nodeType","Node","TEXT_NODE","ELEMENT_NODE","isSVGElementNode","className","isHTMLElement","isVideoElement","isStyleElement","isScriptElement","isCustomElement","counters","getCounterValue","getCounterValues","canReset","entry","counterNames","ROMAN_UPPER","ARMENIAN","HEBREW","GEORGIAN","createAdditiveCounter","symbols","fallback","suffix","createCounterText","string","integer","createCounterStyleWithSymbolResolver","codePointRangeLength","isNumeric","resolver","createCounterStyleFromRange","codePointRangeStart","codePointRangeEnd","floor","createCounterStyleFromSymbols","CJK_ZEROS","CJK_TEN_COEFFICIENTS","CJK_TEN_HIGH_COEFFICIENTS","CJK_HUNDRED_COEFFICIENTS","createCJKCounter","numbers","multipliers","negativeSign","tmp","coefficient","CHINESE_INFORMAL_MULTIPLIERS","CHINESE_FORMAL_MULTIPLIERS","JAPANESE_NEGATIVE","KOREAN_NEGATIVE","appendSuffix","defaultSuffix","cjkSuffix","koreanSuffix","spaceSuffix","IGNORE_ATTRIBUTE","scrolledElements","referenceElement","CounterState","quoteDepth","toIFrame","windowSize","createIFrameContainer","scrollX","defaultView","pageXOffset","scrollY","pageYOffset","cloneWindow","documentClone","iframeLoad","iframeLoader","restoreNodeScroll","scrollTo","test","navigator","userAgent","logger","warn","onclone","clonedReferenceElement","nodeName","fonts","ready","imagesReady","serializeDoctype","doctype","restoreOwnerScroll","adoptNode","createElementClone","createCanvasClone","createVideoClone","createStyleClone","clone","srcset","loading","createCustomElementClone","copyCSSStyles","sheet","cssRules","css","rule","cssText","textContent","error","inlineImages","info","clonedCanvas","clonedCtx","allowTaint","putImageData","gl","attribs","getContextAttributes","preserveDrawingBuffer","video","blankCanvas","appendChildNode","child","copyStyles","hasAttribute","ignoreElements","cloneChildNodes","assignedNode","createTextNode","transitionProperty","styleBefore","styleAfter","createPseudoHideStyles","CSSParsedCounterDeclaration","resolvePseudoContent","PseudoElementType","BEFORE","insertBefore","after","AFTER","scrollTop","scrollLeft","pseudoElt","CSSParsedPseudoDeclaration","anonymousReplacedElement","attr","counterStyle","counterState","counterType","delim","counterStates","separator","PSEUDO_HIDE_ELEMENT_CLASS_BEFORE","PSEUDO_HIDE_ELEMENT_CLASS_AFTER","newClassName","baseValue","destroy","cloneIframeContainer","border","scrolling","imageReady","complete","all","images","interval","setInterval","childNodes","readyState","clearInterval","ignoredStyleProperties","target","property","item","setProperty","getPropertyValue","internalSubset","publicId","systemId","PSEUDO_BEFORE","PSEUDO_AFTER","PSEUDO_HIDE_ELEMENT_STYLE","createStyles","getOrigin","link","CacheStorage","_link","href","protocol","hostname","port","isSameOrigin","_origin","setContext","location","_options","_cache","has","isBlobImage","isRenderable","loadImage","match","key","useCORS","isInlineImage","useProxy","proxy","debug","isInlineBase64Image","setTimeout","imageTimeout","keys","xhr","status","response","FileReader","addEventListener","readAsDataURL","queryString","timeout","ontimeout","send","INLINE_SVG","INLINE_BASE64","INLINE_IMG","isSVG","substr","deltaX","deltaY","Vector","lerp","startControl","endControl","subdivide","firstHalf","ab","bc","cd","abbc","bccd","dest","BezierCurve","reverse","isBezierCurve","path","tlh","tlv","trh","trv","brh","brv","blh","blv","factors","maxFactor","topWidth","rightHeight","bottomWidth","leftHeight","topLeftBorderDoubleOuterBox","getCurvePoints","CORNER","TOP_LEFT","topRightBorderDoubleOuterBox","TOP_RIGHT","bottomRightBorderDoubleOuterBox","BOTTOM_RIGHT","bottomLeftBorderDoubleOuterBox","BOTTOM_LEFT","topLeftBorderDoubleInnerBox","topRightBorderDoubleInnerBox","bottomRightBorderDoubleInnerBox","bottomLeftBorderDoubleInnerBox","topLeftBorderStroke","topRightBorderStroke","bottomRightBorderStroke","bottomLeftBorderStroke","topLeftBorderBox","topRightBorderBox","bottomRightBorderBox","bottomLeftBorderBox","topLeftPaddingBox","topRightPaddingBox","bottomRightPaddingBox","bottomLeftPaddingBox","topLeftContentBox","topRightContentBox","bottomRightContentBox","bottomLeftContentBox","r1","r2","kappa","ox","oy","xm","ym","calculateBorderBoxPath","curves","calculateContentBoxPath","calculatePaddingBoxPath","isTransformEffect","effect","isClipEffect","isOpacityEffect","equalPath","transformPath","deltaW","deltaH","point","inlineLevel","nonInlineLevel","negativeZIndex","zeroOrAutoZIndexOrTransformedOrOpacity","positiveZIndex","nonPositionedFloats","nonPositionedInlineLevel","effects","BoundCurves","OpacityEffect","TransformEffect","borderBox","paddingBox","ClipEffect","getEffects","inFlow","croplessEffects","parseStackTree","stackingContext","realStackingContext","listItems","treatAsRealStackingContext","paintContainer","ElementPaint","listOwnerItems","parentStack","stack","StackingContext","processListItems","owner","numbering","listValue","parseStackingContexts","parsePathForBorder","borderSide","createPathFromCurves","parsePathForBorderDoubleOuter","parsePathForBorderDoubleInner","parsePathForBorderStroke","createStrokePathFromCurves","outer1","outer2","inner1","inner2","contentBox","calculateBackgroundPositioningArea","calculateBackgroundPaintingArea","calculateBackgroundRendering","intrinsicSize","backgroundPositioningArea","getBackgroundValueForIndex","backgroundPaintingArea","backgroundImageSize","calculateBackgroundSize","sizeWidth","sizeHeight","calculateBackgroundRepeatPath","isAuto","AUTO","hasIntrinsicValue","intrinsicProportion","second","hasIntrinsicProportion","targetRatio","hasIntrinsicWidth","hasIntrinsicHeight","hasIntrinsicDimensions","SMALL_IMAGE","SAMPLE_TEXT","_data","_document","parseMetrics","span","margin","padding","whiteSpace","verticalAlign","baseline","offsetTop","middle","getMetrics","MASK_OFFSET","_activeEffects","scale","fontMetrics","FontMetrics","translate","textBaseline","applyEffects","popEffect","applyEffect","save","globalAlpha","clip","restore","renderStack","renderStackContent","renderNode","paint","renderNodeBackgroundAndBorders","renderNodeContent","renderTextWithLetterSpacing","fillText","letters","letter","measureText","createFontStyle","variant","fixIOSSystemFonts","renderTextNode","font","paintOrderLayer","textShadows","shadowColor","shadowOffsetX","shadowOffsetY","shadowBlur","strokeStyle","lineWidth","lineJoin","chrome","strokeText","renderReplacedElement","box","iframeRenderer","CanvasRenderer","render","fill","beginPath","arc","isTextInputElement","canvasTextAlign","mask","paths","moveTo","lineTo","formatPath","closePath","bezierCurveTo","renderRepeat","pattern","resizeImage","renderBackgroundImage","createPattern","x0","x1","y0","y1","createLinearGradient","addColorStop","createRadialGradient","midX","midY","invF","renderSolidBorder","curvePoints","renderDoubleBorder","outerPaths","innerPaths","hasBackground","borders","calculateBackgroundCurvedPaintingArea","borderBoxArea","maskOffset","shadowPaintingArea","renderDashedDottedBorder","strokePaths","boxPaths","startX","startY","endX","endY","dashLength","spaceLength","useLineDash","multiplier","numberOfDashes","minSpace","maxSpace","setLineDash","lineCap","stroke","path1","path2","Renderer","iOSBrokenFonts","fontFamilies","id","enabled","Date","now","console","getTime","instances","instanceName","Context","instanceCount","Logger","logging","Cache","html2canvas","renderElement","opts","resourceOptions","contextOptions","windowOptions","windowWidth","innerWidth","windowHeight","innerHeight","foreignObjectRendering","cloneOptions","documentCloner","DocumentCloner","clonedElement","parseBackgroundColor","renderOptions","devicePixelRatio","renderer","ForeignObjectRenderer","removeContainer","backgroundColorOverride","defaultBackgroundColor"],"sourceRoot":""}