manim-web 0.3.20 → 0.3.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. package/README.md +20 -0
  2. package/dist/AmsConfiguration-OUoC_kJ0.js +847 -0
  3. package/dist/AmsConfiguration-tdje_HlF.js +847 -0
  4. package/dist/ConfigMacrosConfiguration-4OaQYvlr.js +46 -0
  5. package/dist/ConfigMacrosConfiguration-DM3-S5M8.js +46 -0
  6. package/dist/Entities-Dw6381dl.js +429 -0
  7. package/dist/Entities-bJKKDYjE.js +429 -0
  8. package/dist/Factory-Ba6Nqb3M.js +107 -0
  9. package/dist/HtmlNode-1mFtYQ9G.js +981 -0
  10. package/dist/HtmlNode-CQqo5we-.js +981 -0
  11. package/dist/InputJax-D5R2pqUk.js +41 -0
  12. package/dist/InputJax-jNvwWU5P.js +41 -0
  13. package/dist/NewcommandConfiguration-BN_OlLcO.js +32 -0
  14. package/dist/NewcommandConfiguration-DZ3mSCpD.js +32 -0
  15. package/dist/NewcommandMethods-D5bueYYE.js +187 -0
  16. package/dist/NewcommandMethods-DTf_dan5.js +187 -0
  17. package/dist/Options-DMK2wYar.js +63 -0
  18. package/dist/ParseMethods-Deqa7kJ6.js +2636 -0
  19. package/dist/ParseMethods-Dt5bYDSZ.js +2636 -0
  20. package/dist/Styles-BILrGVps.js +293 -0
  21. package/dist/Styles-DQSruwWe.js +293 -0
  22. package/dist/animation/Animation.d.ts +15 -0
  23. package/dist/animation/Animation.d.ts.map +1 -1
  24. package/dist/animation/MasterTimeline.d.ts +88 -1
  25. package/dist/animation/MasterTimeline.d.ts.map +1 -1
  26. package/dist/animation/movement/Rotate.d.ts +2 -7
  27. package/dist/animation/movement/Rotate.d.ts.map +1 -1
  28. package/dist/animation/transform/FadeMorphStrategy.d.ts +18 -0
  29. package/dist/animation/transform/FadeMorphStrategy.d.ts.map +1 -0
  30. package/dist/animation/transform/FadeTransforms.d.ts +2 -0
  31. package/dist/animation/transform/FadeTransforms.d.ts.map +1 -1
  32. package/dist/animation/transform/MorphStrategy.d.ts +8 -0
  33. package/dist/animation/transform/MorphStrategy.d.ts.map +1 -0
  34. package/dist/animation/transform/MovementTransforms.d.ts.map +1 -1
  35. package/dist/animation/transform/PointMorphStrategy.d.ts +36 -0
  36. package/dist/animation/transform/PointMorphStrategy.d.ts.map +1 -0
  37. package/dist/animation/transform/ShapeMorphStrategy.d.ts +39 -0
  38. package/dist/animation/transform/ShapeMorphStrategy.d.ts.map +1 -0
  39. package/dist/animation/transform/Transform.d.ts +9 -91
  40. package/dist/animation/transform/Transform.d.ts.map +1 -1
  41. package/dist/animation/transform/TransformMatching.d.ts.map +1 -1
  42. package/dist/animation/transform/TransformMatchingBase.d.ts +1 -0
  43. package/dist/animation/transform/TransformMatchingBase.d.ts.map +1 -1
  44. package/dist/animation/transform/TransformMatchingShared.d.ts +37 -0
  45. package/dist/animation/transform/TransformMatchingShared.d.ts.map +1 -0
  46. package/dist/animation/transform/TransformPairing.d.ts +19 -0
  47. package/dist/animation/transform/TransformPairing.d.ts.map +1 -0
  48. package/dist/core/AnimateProxy.d.ts +4 -5
  49. package/dist/core/AnimateProxy.d.ts.map +1 -1
  50. package/dist/core/Camera.d.ts +37 -0
  51. package/dist/core/Camera.d.ts.map +1 -1
  52. package/dist/core/CameraExtensions.d.ts +33 -1
  53. package/dist/core/CameraExtensions.d.ts.map +1 -1
  54. package/dist/core/Group.d.ts +5 -11
  55. package/dist/core/Group.d.ts.map +1 -1
  56. package/dist/core/Mobject.d.ts +39 -7
  57. package/dist/core/Mobject.d.ts.map +1 -1
  58. package/dist/core/MobjectPositioning.d.ts +2 -5
  59. package/dist/core/MobjectPositioning.d.ts.map +1 -1
  60. package/dist/core/MobjectTypes.d.ts +21 -4
  61. package/dist/core/MobjectTypes.d.ts.map +1 -1
  62. package/dist/core/Renderer.d.ts +3 -0
  63. package/dist/core/Renderer.d.ts.map +1 -1
  64. package/dist/core/Scene.d.ts +50 -0
  65. package/dist/core/Scene.d.ts.map +1 -1
  66. package/dist/core/TexturedMobject.d.ts +38 -0
  67. package/dist/core/TexturedMobject.d.ts.map +1 -0
  68. package/dist/core/ThreeDScene.d.ts +18 -3
  69. package/dist/core/ThreeDScene.d.ts.map +1 -1
  70. package/dist/core/VGroup.d.ts +11 -19
  71. package/dist/core/VGroup.d.ts.map +1 -1
  72. package/dist/core/VMobject.d.ts +48 -110
  73. package/dist/core/VMobject.d.ts.map +1 -1
  74. package/dist/core/VMobjectCurveUtils.d.ts +106 -0
  75. package/dist/core/VMobjectCurveUtils.d.ts.map +1 -0
  76. package/dist/core/VMobjectGeometry.d.ts +22 -25
  77. package/dist/core/VMobjectGeometry.d.ts.map +1 -1
  78. package/dist/core/VMobjectRendering.d.ts +5 -0
  79. package/dist/core/VMobjectRendering.d.ts.map +1 -1
  80. package/dist/core/VMobjectStrokeGeometry.d.ts +20 -0
  81. package/dist/core/VMobjectStrokeGeometry.d.ts.map +1 -0
  82. package/dist/core/VMobjectTransformAlignment.d.ts +20 -0
  83. package/dist/core/VMobjectTransformAlignment.d.ts.map +1 -0
  84. package/dist/html-Bza5WY1y.js +829 -0
  85. package/dist/html-bhzMuE8p.js +829 -0
  86. package/dist/index.d.ts +4 -3
  87. package/dist/index.d.ts.map +1 -1
  88. package/dist/index.js +2 -4
  89. package/dist/integrations/react.js +16 -18
  90. package/dist/integrations/vue.js +15 -17
  91. package/dist/interaction/Draggable.d.ts +2 -0
  92. package/dist/interaction/Draggable.d.ts.map +1 -1
  93. package/dist/interaction/OrbitControls.d.ts +1 -1
  94. package/dist/interaction/OrbitControls.d.ts.map +1 -1
  95. package/dist/lengths-D2zTYMUu.js +54 -0
  96. package/dist/liteAdaptor-BkxB5CGC.js +616 -0
  97. package/dist/liteAdaptor-LMKuWwg1.js +616 -0
  98. package/dist/manim-web.browser.js +35821 -30916
  99. package/dist/mathjax-CPQWkQEv.js +121 -0
  100. package/dist/mathjax-b-GTdZgw.js +121 -0
  101. package/dist/mo-D4wFHS6V.js +2675 -0
  102. package/dist/mo-hAX79Dzl.js +2675 -0
  103. package/dist/mobjects/geometry/AngleShapes.d.ts +0 -4
  104. package/dist/mobjects/geometry/AngleShapes.d.ts.map +1 -1
  105. package/dist/mobjects/geometry/BooleanOperations.d.ts +1 -1
  106. package/dist/mobjects/geometry/BooleanOperations.d.ts.map +1 -1
  107. package/dist/mobjects/geometry/CubicBezier.d.ts.map +1 -1
  108. package/dist/mobjects/geometry/PolygonExtensions.d.ts +1 -1
  109. package/dist/mobjects/geometry/PolygonExtensions.d.ts.map +1 -1
  110. package/dist/mobjects/graphing/ComplexPlane.d.ts +59 -1
  111. package/dist/mobjects/graphing/ComplexPlane.d.ts.map +1 -1
  112. package/dist/mobjects/graphing/Vector.d.ts.map +1 -1
  113. package/dist/mobjects/image/index.d.ts +9 -2
  114. package/dist/mobjects/image/index.d.ts.map +1 -1
  115. package/dist/mobjects/point/Mobject1D.d.ts.map +1 -1
  116. package/dist/mobjects/point/Mobject2D.d.ts.map +1 -1
  117. package/dist/mobjects/point/PMobject.d.ts +8 -2
  118. package/dist/mobjects/point/PMobject.d.ts.map +1 -1
  119. package/dist/mobjects/point/PointMobject.d.ts.map +1 -1
  120. package/dist/mobjects/text/Code.d.ts.map +1 -1
  121. package/dist/mobjects/text/MarkupText.d.ts.map +1 -1
  122. package/dist/mobjects/text/MathJaxRenderer.d.ts.map +1 -1
  123. package/dist/mobjects/text/MathTex.d.ts +9 -0
  124. package/dist/mobjects/text/MathTex.d.ts.map +1 -1
  125. package/dist/mobjects/text/MathTexImage.d.ts +9 -3
  126. package/dist/mobjects/text/MathTexImage.d.ts.map +1 -1
  127. package/dist/mobjects/text/Text.d.ts +8 -3
  128. package/dist/mobjects/text/Text.d.ts.map +1 -1
  129. package/dist/mobjects/text/TextGlyphGroup.d.ts.map +1 -1
  130. package/dist/mobjects/text/svgPathParser.d.ts.map +1 -1
  131. package/dist/mobjects/three-d/Line3D.d.ts +10 -56
  132. package/dist/mobjects/three-d/Line3D.d.ts.map +1 -1
  133. package/dist/mobjects/three-d/ThreeDAxes.d.ts +8 -0
  134. package/dist/mobjects/three-d/ThreeDAxes.d.ts.map +1 -1
  135. package/dist/player/Player.d.ts +36 -29
  136. package/dist/player/Player.d.ts.map +1 -1
  137. package/dist/player/PlayerUI.d.ts.map +1 -1
  138. package/dist/player/RecordingScene.d.ts +37 -0
  139. package/dist/player/RecordingScene.d.ts.map +1 -0
  140. package/dist/{src-Db7QTr4S.js → src-BlTk3Bta.js} +34386 -29482
  141. package/dist/svg-DNS5Hwhk.js +28713 -0
  142. package/dist/svg-DVUoAdmC.js +28713 -0
  143. package/dist/test-setup/vitest-setup.d.ts +20 -0
  144. package/dist/test-setup/vitest-setup.d.ts.map +1 -0
  145. package/dist/tex-BQCLd0dF.js +1427 -0
  146. package/dist/tex-Cd_bTYKG.js +1427 -0
  147. package/dist/utils/axis.d.ts +4 -0
  148. package/dist/utils/axis.d.ts.map +1 -0
  149. package/dist/utils/logger.d.ts +37 -0
  150. package/dist/utils/logger.d.ts.map +1 -1
  151. package/dist/utils/math.d.ts +11 -0
  152. package/dist/utils/math.d.ts.map +1 -1
  153. package/dist/utils/vectors.d.ts +54 -1
  154. package/dist/utils/vectors.d.ts.map +1 -1
  155. package/package.json +10 -8
  156. package/dist/AllPackages-B0GtkYjD.js +0 -7912
  157. package/dist/AllPackages-BIAELuhU.js +0 -7912
  158. package/dist/BaseConfiguration-CDf44lxS.js +0 -4402
  159. package/dist/BaseConfiguration-Chcqjv9L.js +0 -4402
  160. package/dist/Entities-B_gwJfrn.js +0 -458
  161. package/dist/Entities-CmJkmuw_.js +0 -458
  162. package/dist/GifExporter-C9lP34Iu.js +0 -338
  163. package/dist/GifExporter-DBak5Vk7.js +0 -338
  164. package/dist/InputJax-C5sGfjJ8.js +0 -43
  165. package/dist/InputJax-Jb4hSThK.js +0 -43
  166. package/dist/MathItem-BmK41eqe.js +0 -77
  167. package/dist/MathItem-C_mZyaeT.js +0 -77
  168. package/dist/Options-Ch1vGsgd.js +0 -188
  169. package/dist/Options-V6ag48Dv.js +0 -188
  170. package/dist/PrioritizedList-DkoCmqPk.js +0 -36
  171. package/dist/PrioritizedList-eKTii0tW.js +0 -36
  172. package/dist/Styles-De4BjKiV.js +0 -411
  173. package/dist/Styles-DgoiBrzf.js +0 -411
  174. package/dist/TeXAtom-DT2wCvcU.js +0 -2025
  175. package/dist/TeXAtom-JogI0lus.js +0 -2025
  176. package/dist/VideoExporter-Bdtz_pWv.js +0 -102
  177. package/dist/VideoExporter-Vjfsnv1h.js +0 -102
  178. package/dist/chunk-3e0lkp8x.js +0 -23
  179. package/dist/html-53__O8r2.js +0 -1587
  180. package/dist/html-DfHFh5II.js +0 -1587
  181. package/dist/lengths-3epoqRj7.js +0 -65
  182. package/dist/lengths-B-bX9Tfk.js +0 -65
  183. package/dist/liteAdaptor-BxFvlO-q.js +0 -828
  184. package/dist/liteAdaptor-CsOIKw2g.js +0 -828
  185. package/dist/mathjax-Bkrmftxh.js +0 -102
  186. package/dist/mathjax-DBrTNl9C.js +0 -102
  187. package/dist/mo-AzagC5AD.js +0 -3271
  188. package/dist/mo-I_6dyJsk.js +0 -3271
  189. package/dist/svg-CoGQ_sAt.js +0 -23880
  190. package/dist/svg-DiIG93Lr.js +0 -23880
  191. package/dist/tex-ChPKMfdv.js +0 -401
  192. package/dist/tex-hYZcjadW.js +0 -401
@@ -1,411 +0,0 @@
1
- import { t as e } from "./chunk-3e0lkp8x.js";
2
- //#region node_modules/mathjax-full/js/util/Styles.js
3
- var t = /* @__PURE__ */ e(((e) => {
4
- var t = e && e.__values || function(e) {
5
- var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
6
- if (n) return n.call(e);
7
- if (e && typeof e.length == "number") return { next: function() {
8
- return e && r >= e.length && (e = void 0), {
9
- value: e && e[r++],
10
- done: !e
11
- };
12
- } };
13
- throw TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
14
- }, n = e && e.__read || function(e, t) {
15
- var n = typeof Symbol == "function" && e[Symbol.iterator];
16
- if (!n) return e;
17
- var r = n.call(e), i, a = [], o;
18
- try {
19
- for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
20
- } catch (e) {
21
- o = { error: e };
22
- } finally {
23
- try {
24
- i && !i.done && (n = r.return) && n.call(r);
25
- } finally {
26
- if (o) throw o.error;
27
- }
28
- }
29
- return a;
30
- }, r = e && e.__spreadArray || function(e, t, n) {
31
- if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
32
- return e.concat(a || Array.prototype.slice.call(t));
33
- };
34
- Object.defineProperty(e, "__esModule", { value: !0 }), e.Styles = void 0;
35
- var i = [
36
- "top",
37
- "right",
38
- "bottom",
39
- "left"
40
- ], a = [
41
- "width",
42
- "style",
43
- "color"
44
- ];
45
- function o(e) {
46
- for (var t = e.split(/((?:'[^']*'|"[^"]*"|,[\s\n]|[^\s\n])*)/g), n = []; t.length > 1;) t.shift(), n.push(t.shift());
47
- return n;
48
- }
49
- function s(e) {
50
- var n, r, i = o(this.styles[e]);
51
- i.length === 0 && i.push(""), i.length === 1 && i.push(i[0]), i.length === 2 && i.push(i[0]), i.length === 3 && i.push(i[1]);
52
- try {
53
- for (var a = t(v.connect[e].children), s = a.next(); !s.done; s = a.next()) {
54
- var c = s.value;
55
- this.setStyle(this.childName(e, c), i.shift());
56
- }
57
- } catch (e) {
58
- n = { error: e };
59
- } finally {
60
- try {
61
- s && !s.done && (r = a.return) && r.call(a);
62
- } finally {
63
- if (n) throw n.error;
64
- }
65
- }
66
- }
67
- function c(e) {
68
- var n, r, i = v.connect[e].children, a = [];
69
- try {
70
- for (var o = t(i), s = o.next(); !s.done; s = o.next()) {
71
- var c = s.value, l = this.styles[e + "-" + c];
72
- if (!l) {
73
- delete this.styles[e];
74
- return;
75
- }
76
- a.push(l);
77
- }
78
- } catch (e) {
79
- n = { error: e };
80
- } finally {
81
- try {
82
- s && !s.done && (r = o.return) && r.call(o);
83
- } finally {
84
- if (n) throw n.error;
85
- }
86
- }
87
- a[3] === a[1] && (a.pop(), a[2] === a[0] && (a.pop(), a[1] === a[0] && a.pop())), this.styles[e] = a.join(" ");
88
- }
89
- function l(e) {
90
- var n, r;
91
- try {
92
- for (var i = t(v.connect[e].children), a = i.next(); !a.done; a = i.next()) {
93
- var o = a.value;
94
- this.setStyle(this.childName(e, o), this.styles[e]);
95
- }
96
- } catch (e) {
97
- n = { error: e };
98
- } finally {
99
- try {
100
- a && !a.done && (r = i.return) && r.call(i);
101
- } finally {
102
- if (n) throw n.error;
103
- }
104
- }
105
- }
106
- function u(e) {
107
- var i, a, o = r([], n(v.connect[e].children), !1), s = this.styles[this.childName(e, o.shift())];
108
- try {
109
- for (var c = t(o), l = c.next(); !l.done; l = c.next()) {
110
- var u = l.value;
111
- if (this.styles[this.childName(e, u)] !== s) {
112
- delete this.styles[e];
113
- return;
114
- }
115
- }
116
- } catch (e) {
117
- i = { error: e };
118
- } finally {
119
- try {
120
- l && !l.done && (a = c.return) && a.call(c);
121
- } finally {
122
- if (i) throw i.error;
123
- }
124
- }
125
- this.styles[e] = s;
126
- }
127
- var d = {
128
- width: /^(?:[\d.]+(?:[a-z]+)|thin|medium|thick|inherit|initial|unset)$/,
129
- style: /^(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|inherit|initial|unset)$/
130
- };
131
- function f(e) {
132
- var n, r, i, a, s = {
133
- width: "",
134
- style: "",
135
- color: ""
136
- };
137
- try {
138
- for (var c = t(o(this.styles[e])), l = c.next(); !l.done; l = c.next()) {
139
- var u = l.value;
140
- u.match(d.width) && s.width === "" ? s.width = u : u.match(d.style) && s.style === "" ? s.style = u : s.color = u;
141
- }
142
- } catch (e) {
143
- n = { error: e };
144
- } finally {
145
- try {
146
- l && !l.done && (r = c.return) && r.call(c);
147
- } finally {
148
- if (n) throw n.error;
149
- }
150
- }
151
- try {
152
- for (var f = t(v.connect[e].children), p = f.next(); !p.done; p = f.next()) {
153
- var m = p.value;
154
- this.setStyle(this.childName(e, m), s[m]);
155
- }
156
- } catch (e) {
157
- i = { error: e };
158
- } finally {
159
- try {
160
- p && !p.done && (a = f.return) && a.call(f);
161
- } finally {
162
- if (i) throw i.error;
163
- }
164
- }
165
- }
166
- function p(e) {
167
- var n, r, i = [];
168
- try {
169
- for (var a = t(v.connect[e].children), o = a.next(); !o.done; o = a.next()) {
170
- var s = o.value, c = this.styles[this.childName(e, s)];
171
- c && i.push(c);
172
- }
173
- } catch (e) {
174
- n = { error: e };
175
- } finally {
176
- try {
177
- o && !o.done && (r = a.return) && r.call(a);
178
- } finally {
179
- if (n) throw n.error;
180
- }
181
- }
182
- i.length ? this.styles[e] = i.join(" ") : delete this.styles[e];
183
- }
184
- var m = {
185
- style: /^(?:normal|italic|oblique|inherit|initial|unset)$/,
186
- variant: RegExp("^(?:" + [
187
- "normal|none",
188
- "inherit|initial|unset",
189
- "common-ligatures|no-common-ligatures",
190
- "discretionary-ligatures|no-discretionary-ligatures",
191
- "historical-ligatures|no-historical-ligatures",
192
- "contextual|no-contextual",
193
- "(?:stylistic|character-variant|swash|ornaments|annotation)\\([^)]*\\)",
194
- "small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps",
195
- "lining-nums|oldstyle-nums|proportional-nums|tabular-nums",
196
- "diagonal-fractions|stacked-fractions",
197
- "ordinal|slashed-zero",
198
- "jis78|jis83|jis90|jis04|simplified|traditional",
199
- "full-width|proportional-width",
200
- "ruby"
201
- ].join("|") + ")$"),
202
- weight: /^(?:normal|bold|bolder|lighter|[1-9]00|inherit|initial|unset)$/,
203
- stretch: RegExp("^(?:" + [
204
- "normal",
205
- "(?:(?:ultra|extra|semi)-)?condensed",
206
- "(?:(?:semi|extra|ulta)-)?expanded",
207
- "inherit|initial|unset"
208
- ].join("|") + ")$"),
209
- size: RegExp("^(?:" + [
210
- "xx-small|x-small|small|medium|large|x-large|xx-large|larger|smaller",
211
- "[d.]+%|[d.]+[a-z]+",
212
- "inherit|initial|unset"
213
- ].join("|") + ")(?:/(?:normal|[d.+](?:%|[a-z]+)?))?$")
214
- };
215
- function h(e) {
216
- var r, i, a, s, c = o(this.styles[e]), l = {
217
- style: "",
218
- variant: [],
219
- weight: "",
220
- stretch: "",
221
- size: "",
222
- family: "",
223
- "line-height": ""
224
- };
225
- try {
226
- for (var u = t(c), d = u.next(); !d.done; d = u.next()) {
227
- var f = d.value;
228
- l.family = f;
229
- try {
230
- for (var p = (a = void 0, t(Object.keys(m))), h = p.next(); !h.done; h = p.next()) {
231
- var _ = h.value;
232
- if ((Array.isArray(l[_]) || l[_] === "") && f.match(m[_])) if (_ === "size") {
233
- var v = n(f.split(/\//), 2), y = v[0], b = v[1];
234
- l[_] = y, b && (l["line-height"] = b);
235
- } else l.size === "" && (Array.isArray(l[_]) ? l[_].push(f) : l[_] = f);
236
- }
237
- } catch (e) {
238
- a = { error: e };
239
- } finally {
240
- try {
241
- h && !h.done && (s = p.return) && s.call(p);
242
- } finally {
243
- if (a) throw a.error;
244
- }
245
- }
246
- }
247
- } catch (e) {
248
- r = { error: e };
249
- } finally {
250
- try {
251
- d && !d.done && (i = u.return) && i.call(u);
252
- } finally {
253
- if (r) throw r.error;
254
- }
255
- }
256
- g(e, l), delete this.styles[e];
257
- }
258
- function g(e, n) {
259
- var r, i;
260
- try {
261
- for (var a = t(v.connect[e].children), o = a.next(); !o.done; o = a.next()) {
262
- var s = o.value, c = this.childName(e, s);
263
- if (Array.isArray(n[s])) {
264
- var l = n[s];
265
- l.length && (this.styles[c] = l.join(" "));
266
- } else n[s] !== "" && (this.styles[c] = n[s]);
267
- }
268
- } catch (e) {
269
- r = { error: e };
270
- } finally {
271
- try {
272
- o && !o.done && (i = a.return) && i.call(a);
273
- } finally {
274
- if (r) throw r.error;
275
- }
276
- }
277
- }
278
- function _(e) {}
279
- var v = function() {
280
- function e(e) {
281
- e === void 0 && (e = ""), this.parse(e);
282
- }
283
- return Object.defineProperty(e.prototype, "cssText", {
284
- get: function() {
285
- var e, n, r = [];
286
- try {
287
- for (var i = t(Object.keys(this.styles)), a = i.next(); !a.done; a = i.next()) {
288
- var o = a.value, s = this.parentName(o);
289
- this.styles[s] || r.push(o + ": " + this.styles[o] + ";");
290
- }
291
- } catch (t) {
292
- e = { error: t };
293
- } finally {
294
- try {
295
- a && !a.done && (n = i.return) && n.call(i);
296
- } finally {
297
- if (e) throw e.error;
298
- }
299
- }
300
- return r.join(" ");
301
- },
302
- enumerable: !1,
303
- configurable: !0
304
- }), e.prototype.set = function(t, n) {
305
- for (t = this.normalizeName(t), this.setStyle(t, n), e.connect[t] && !e.connect[t].combine && (this.combineChildren(t), delete this.styles[t]); t.match(/-/) && (t = this.parentName(t), e.connect[t]);) e.connect[t].combine.call(this, t);
306
- }, e.prototype.get = function(e) {
307
- return e = this.normalizeName(e), this.styles.hasOwnProperty(e) ? this.styles[e] : "";
308
- }, e.prototype.setStyle = function(t, n) {
309
- this.styles[t] = n, e.connect[t] && e.connect[t].children && e.connect[t].split.call(this, t), n === "" && delete this.styles[t];
310
- }, e.prototype.combineChildren = function(n) {
311
- var r, i, a = this.parentName(n);
312
- try {
313
- for (var o = t(e.connect[n].children), s = o.next(); !s.done; s = o.next()) {
314
- var c = s.value, l = this.childName(a, c);
315
- e.connect[l].combine.call(this, l);
316
- }
317
- } catch (e) {
318
- r = { error: e };
319
- } finally {
320
- try {
321
- s && !s.done && (i = o.return) && i.call(o);
322
- } finally {
323
- if (r) throw r.error;
324
- }
325
- }
326
- }, e.prototype.parentName = function(e) {
327
- var t = e.replace(/-[^-]*$/, "");
328
- return e === t ? "" : t;
329
- }, e.prototype.childName = function(t, n) {
330
- return n.match(/-/) ? n : (e.connect[t] && !e.connect[t].combine && (n += t.replace(/.*-/, "-"), t = this.parentName(t)), t + "-" + n);
331
- }, e.prototype.normalizeName = function(e) {
332
- return e.replace(/[A-Z]/g, function(e) {
333
- return "-" + e.toLowerCase();
334
- });
335
- }, e.prototype.parse = function(e) {
336
- e === void 0 && (e = "");
337
- var t = this.constructor.pattern;
338
- this.styles = {};
339
- for (var r = e.replace(t.comment, "").split(t.style); r.length > 1;) {
340
- var i = n(r.splice(0, 3), 3), a = i[0], o = i[1], s = i[2];
341
- if (a.match(/[^\s\n]/)) return;
342
- this.set(o, s);
343
- }
344
- }, e.pattern = {
345
- style: /([-a-z]+)[\s\n]*:[\s\n]*((?:'[^']*'|"[^"]*"|\n|.)*?)[\s\n]*(?:;|$)/g,
346
- comment: /\/\*[^]*?\*\//g
347
- }, e.connect = {
348
- padding: {
349
- children: i,
350
- split: s,
351
- combine: c
352
- },
353
- border: {
354
- children: i,
355
- split: l,
356
- combine: u
357
- },
358
- "border-top": {
359
- children: a,
360
- split: f,
361
- combine: p
362
- },
363
- "border-right": {
364
- children: a,
365
- split: f,
366
- combine: p
367
- },
368
- "border-bottom": {
369
- children: a,
370
- split: f,
371
- combine: p
372
- },
373
- "border-left": {
374
- children: a,
375
- split: f,
376
- combine: p
377
- },
378
- "border-width": {
379
- children: i,
380
- split: s,
381
- combine: null
382
- },
383
- "border-style": {
384
- children: i,
385
- split: s,
386
- combine: null
387
- },
388
- "border-color": {
389
- children: i,
390
- split: s,
391
- combine: null
392
- },
393
- font: {
394
- children: [
395
- "style",
396
- "variant",
397
- "weight",
398
- "stretch",
399
- "line-height",
400
- "size",
401
- "family"
402
- ],
403
- split: h,
404
- combine: _
405
- }
406
- }, e;
407
- }();
408
- e.Styles = v;
409
- }));
410
- //#endregion
411
- export { t };