| Total Complexity | 269 |
| Complexity/F | 1.52 |
| Lines of Code | 1826 |
| Function Count | 177 |
| Duplicated Lines | 111 |
| Ratio | 6.08 % |
| Changes | 0 | ||
Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.
Common duplication problems, and corresponding solutions are:
Complex classes like node_modules/cssstyle/lib/properties.js often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
| 1 | 'use strict'; |
||
| 2 | |||
| 3 | // autogenerated - 7/15/2019 |
||
| 4 | |||
| 5 | /* |
||
| 6 | * |
||
| 7 | * https://www.w3.org/Style/CSS/all-properties.en.html |
||
| 8 | */ |
||
| 9 | |||
| 10 | var external_dependency_parsers_0 = require("./parsers.js"); |
||
| 11 | |||
| 12 | var external_dependency_constants_1 = require("./constants.js"); |
||
| 13 | |||
| 14 | var azimuth_export_definition; |
||
| 15 | azimuth_export_definition = { |
||
| 16 | set: function (v) { |
||
| 17 | var valueType = external_dependency_parsers_0.valueType(v); |
||
| 18 | |||
| 19 | if (valueType === external_dependency_parsers_0.TYPES.ANGLE) { |
||
| 20 | return this._setProperty('azimuth', external_dependency_parsers_0.parseAngle(v)); |
||
| 21 | } |
||
| 22 | |||
| 23 | if (valueType === external_dependency_parsers_0.TYPES.KEYWORD) { |
||
| 24 | var keywords = v.toLowerCase().trim().split(/\s+/); |
||
| 25 | var hasBehind = false; |
||
| 26 | |||
| 27 | if (keywords.length > 2) { |
||
| 28 | return; |
||
| 29 | } |
||
| 30 | |||
| 31 | var behindIndex = keywords.indexOf('behind'); |
||
| 32 | hasBehind = behindIndex !== -1; |
||
| 33 | |||
| 34 | if (keywords.length === 2) { |
||
| 35 | if (!hasBehind) { |
||
| 36 | return; |
||
| 37 | } |
||
| 38 | |||
| 39 | keywords.splice(behindIndex, 1); |
||
| 40 | } |
||
| 41 | |||
| 42 | if (keywords[0] === 'leftwards' || keywords[0] === 'rightwards') { |
||
| 43 | if (hasBehind) { |
||
| 44 | return; |
||
| 45 | } |
||
| 46 | |||
| 47 | return this._setProperty('azimuth', keywords[0]); |
||
| 48 | } |
||
| 49 | |||
| 50 | if (keywords[0] === 'behind') { |
||
| 51 | return this._setProperty('azimuth', '180deg'); |
||
| 52 | } |
||
| 53 | |||
| 54 | switch (keywords[0]) { |
||
| 55 | case 'left-side': |
||
| 56 | return this._setProperty('azimuth', '270deg'); |
||
| 57 | |||
| 58 | case 'far-left': |
||
| 59 | return this._setProperty('azimuth', (hasBehind ? 240 : 300) + 'deg'); |
||
| 60 | |||
| 61 | case 'left': |
||
| 62 | return this._setProperty('azimuth', (hasBehind ? 220 : 320) + 'deg'); |
||
| 63 | |||
| 64 | case 'center-left': |
||
| 65 | return this._setProperty('azimuth', (hasBehind ? 200 : 340) + 'deg'); |
||
| 66 | |||
| 67 | case 'center': |
||
| 68 | return this._setProperty('azimuth', (hasBehind ? 180 : 0) + 'deg'); |
||
| 69 | |||
| 70 | case 'center-right': |
||
| 71 | return this._setProperty('azimuth', (hasBehind ? 160 : 20) + 'deg'); |
||
| 72 | |||
| 73 | case 'right': |
||
| 74 | return this._setProperty('azimuth', (hasBehind ? 140 : 40) + 'deg'); |
||
| 75 | |||
| 76 | case 'far-right': |
||
| 77 | return this._setProperty('azimuth', (hasBehind ? 120 : 60) + 'deg'); |
||
| 78 | |||
| 79 | case 'right-side': |
||
| 80 | return this._setProperty('azimuth', '90deg'); |
||
| 81 | |||
| 82 | default: |
||
| 83 | return; |
||
| 84 | } |
||
| 85 | } |
||
| 86 | }, |
||
| 87 | get: function () { |
||
| 88 | return this.getPropertyValue('azimuth'); |
||
| 89 | }, |
||
| 90 | enumerable: true, |
||
| 91 | configurable: true |
||
| 92 | }; |
||
| 93 | var backgroundColor_export_isValid, backgroundColor_export_definition; |
||
| 94 | |||
| 95 | var backgroundColor_local_var_parse = function parse(v) { |
||
| 96 | var parsed = external_dependency_parsers_0.parseColor(v); |
||
| 97 | |||
| 98 | if (parsed !== undefined) { |
||
| 99 | return parsed; |
||
| 100 | } |
||
| 101 | |||
| 102 | if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'transparent' || v.toLowerCase() === 'inherit')) { |
||
| 103 | return v; |
||
| 104 | } |
||
| 105 | |||
| 106 | return undefined; |
||
| 107 | }; |
||
| 108 | |||
| 109 | backgroundColor_export_isValid = function isValid(v) { |
||
| 110 | return backgroundColor_local_var_parse(v) !== undefined; |
||
| 111 | }; |
||
| 112 | |||
| 113 | backgroundColor_export_definition = { |
||
| 114 | set: function (v) { |
||
| 115 | var parsed = backgroundColor_local_var_parse(v); |
||
| 116 | |||
| 117 | if (parsed === undefined) { |
||
| 118 | return; |
||
| 119 | } |
||
| 120 | |||
| 121 | this._setProperty('background-color', parsed); |
||
| 122 | }, |
||
| 123 | get: function () { |
||
| 124 | return this.getPropertyValue('background-color'); |
||
| 125 | }, |
||
| 126 | enumerable: true, |
||
| 127 | configurable: true |
||
| 128 | }; |
||
| 129 | var backgroundImage_export_isValid, backgroundImage_export_definition; |
||
| 130 | |||
| 131 | var backgroundImage_local_var_parse = function parse(v) { |
||
| 132 | var parsed = external_dependency_parsers_0.parseUrl(v); |
||
| 133 | |||
| 134 | if (parsed !== undefined) { |
||
| 135 | return parsed; |
||
| 136 | } |
||
| 137 | |||
| 138 | if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'none' || v.toLowerCase() === 'inherit')) { |
||
| 139 | return v; |
||
| 140 | } |
||
| 141 | |||
| 142 | return undefined; |
||
| 143 | }; |
||
| 144 | |||
| 145 | backgroundImage_export_isValid = function isValid(v) { |
||
| 146 | return backgroundImage_local_var_parse(v) !== undefined; |
||
| 147 | }; |
||
| 148 | |||
| 149 | backgroundImage_export_definition = { |
||
| 150 | set: function (v) { |
||
| 151 | this._setProperty('background-image', backgroundImage_local_var_parse(v)); |
||
| 152 | }, |
||
| 153 | get: function () { |
||
| 154 | return this.getPropertyValue('background-image'); |
||
| 155 | }, |
||
| 156 | enumerable: true, |
||
| 157 | configurable: true |
||
| 158 | }; |
||
| 159 | var backgroundRepeat_export_isValid, backgroundRepeat_export_definition; |
||
| 160 | |||
| 161 | var backgroundRepeat_local_var_parse = function parse(v) { |
||
| 162 | if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'repeat' || v.toLowerCase() === 'repeat-x' || v.toLowerCase() === 'repeat-y' || v.toLowerCase() === 'no-repeat' || v.toLowerCase() === 'inherit')) { |
||
| 163 | return v; |
||
| 164 | } |
||
| 165 | |||
| 166 | return undefined; |
||
| 167 | }; |
||
| 168 | |||
| 169 | backgroundRepeat_export_isValid = function isValid(v) { |
||
| 170 | return backgroundRepeat_local_var_parse(v) !== undefined; |
||
| 171 | }; |
||
| 172 | |||
| 173 | backgroundRepeat_export_definition = { |
||
| 174 | set: function (v) { |
||
| 175 | this._setProperty('background-repeat', backgroundRepeat_local_var_parse(v)); |
||
| 176 | }, |
||
| 177 | get: function () { |
||
| 178 | return this.getPropertyValue('background-repeat'); |
||
| 179 | }, |
||
| 180 | enumerable: true, |
||
| 181 | configurable: true |
||
| 182 | }; |
||
| 183 | var backgroundAttachment_export_isValid, backgroundAttachment_export_definition; |
||
| 184 | |||
| 185 | var backgroundAttachment_local_var_isValid = backgroundAttachment_export_isValid = function isValid(v) { |
||
| 186 | return external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'scroll' || v.toLowerCase() === 'fixed' || v.toLowerCase() === 'inherit'); |
||
| 187 | }; |
||
| 188 | |||
| 189 | backgroundAttachment_export_definition = { |
||
| 190 | set: function (v) { |
||
| 191 | if (!backgroundAttachment_local_var_isValid(v)) { |
||
| 192 | return; |
||
| 193 | } |
||
| 194 | |||
| 195 | this._setProperty('background-attachment', v); |
||
| 196 | }, |
||
| 197 | get: function () { |
||
| 198 | return this.getPropertyValue('background-attachment'); |
||
| 199 | }, |
||
| 200 | enumerable: true, |
||
| 201 | configurable: true |
||
| 202 | }; |
||
| 203 | var backgroundPosition_export_isValid, backgroundPosition_export_definition; |
||
| 204 | var backgroundPosition_local_var_valid_keywords = ['top', 'center', 'bottom', 'left', 'right']; |
||
| 205 | |||
| 206 | var backgroundPosition_local_var_parse = function parse(v) { |
||
| 207 | if (v === '' || v === null) { |
||
| 208 | return undefined; |
||
| 209 | } |
||
| 210 | |||
| 211 | var parts = v.split(/\s+/); |
||
| 212 | |||
| 213 | if (parts.length > 2 || parts.length < 1) { |
||
| 214 | return undefined; |
||
| 215 | } |
||
| 216 | |||
| 217 | var types = []; |
||
| 218 | parts.forEach(function (part, index) { |
||
| 219 | types[index] = external_dependency_parsers_0.valueType(part); |
||
| 220 | }); |
||
| 221 | |||
| 222 | if (parts.length === 1) { |
||
| 223 | if (types[0] === external_dependency_parsers_0.TYPES.LENGTH || types[0] === external_dependency_parsers_0.TYPES.PERCENT) { |
||
| 224 | return v; |
||
| 225 | } |
||
| 226 | |||
| 227 | if (types[0] === external_dependency_parsers_0.TYPES.KEYWORD) { |
||
| 228 | if (backgroundPosition_local_var_valid_keywords.indexOf(v.toLowerCase()) !== -1 || v.toLowerCase() === 'inherit') { |
||
| 229 | return v; |
||
| 230 | } |
||
| 231 | } |
||
| 232 | |||
| 233 | return undefined; |
||
| 234 | } |
||
| 235 | |||
| 236 | if ((types[0] === external_dependency_parsers_0.TYPES.LENGTH || types[0] === external_dependency_parsers_0.TYPES.PERCENT) && (types[1] === external_dependency_parsers_0.TYPES.LENGTH || types[1] === external_dependency_parsers_0.TYPES.PERCENT)) { |
||
| 237 | return v; |
||
| 238 | } |
||
| 239 | |||
| 240 | if (types[0] !== external_dependency_parsers_0.TYPES.KEYWORD || types[1] !== external_dependency_parsers_0.TYPES.KEYWORD) { |
||
| 241 | return undefined; |
||
| 242 | } |
||
| 243 | |||
| 244 | if (backgroundPosition_local_var_valid_keywords.indexOf(parts[0]) !== -1 && backgroundPosition_local_var_valid_keywords.indexOf(parts[1]) !== -1) { |
||
| 245 | return v; |
||
| 246 | } |
||
| 247 | |||
| 248 | return undefined; |
||
| 249 | }; |
||
| 250 | |||
| 251 | backgroundPosition_export_isValid = function isValid(v) { |
||
| 252 | return backgroundPosition_local_var_parse(v) !== undefined; |
||
| 253 | }; |
||
| 254 | |||
| 255 | backgroundPosition_export_definition = { |
||
| 256 | set: function (v) { |
||
| 257 | this._setProperty('background-position', backgroundPosition_local_var_parse(v)); |
||
| 258 | }, |
||
| 259 | get: function () { |
||
| 260 | return this.getPropertyValue('background-position'); |
||
| 261 | }, |
||
| 262 | enumerable: true, |
||
| 263 | configurable: true |
||
| 264 | }; |
||
| 265 | var background_export_definition; |
||
| 266 | var background_local_var_shorthand_for = { |
||
| 267 | 'background-color': { |
||
| 268 | isValid: backgroundColor_export_isValid, |
||
| 269 | definition: backgroundColor_export_definition |
||
| 270 | }, |
||
| 271 | 'background-image': { |
||
| 272 | isValid: backgroundImage_export_isValid, |
||
| 273 | definition: backgroundImage_export_definition |
||
| 274 | }, |
||
| 275 | 'background-repeat': { |
||
| 276 | isValid: backgroundRepeat_export_isValid, |
||
| 277 | definition: backgroundRepeat_export_definition |
||
| 278 | }, |
||
| 279 | 'background-attachment': { |
||
| 280 | isValid: backgroundAttachment_export_isValid, |
||
| 281 | definition: backgroundAttachment_export_definition |
||
| 282 | }, |
||
| 283 | 'background-position': { |
||
| 284 | isValid: backgroundPosition_export_isValid, |
||
| 285 | definition: backgroundPosition_export_definition |
||
| 286 | } |
||
| 287 | }; |
||
| 288 | background_export_definition = { |
||
| 289 | set: external_dependency_parsers_0.shorthandSetter('background', background_local_var_shorthand_for), |
||
| 290 | get: external_dependency_parsers_0.shorthandGetter('background', background_local_var_shorthand_for), |
||
| 291 | enumerable: true, |
||
| 292 | configurable: true |
||
| 293 | }; |
||
| 294 | var borderWidth_export_isValid, borderWidth_export_definition; |
||
| 295 | // the valid border-widths: |
||
| 296 | var borderWidth_local_var_widths = ['thin', 'medium', 'thick']; |
||
| 297 | |||
| 298 | borderWidth_export_isValid = function parse(v) { |
||
| 299 | var length = external_dependency_parsers_0.parseLength(v); |
||
| 300 | |||
| 301 | if (length !== undefined) { |
||
| 302 | return true; |
||
| 303 | } |
||
| 304 | |||
| 305 | if (typeof v !== 'string') { |
||
| 306 | return false; |
||
| 307 | } |
||
| 308 | |||
| 309 | if (v === '') { |
||
| 310 | return true; |
||
| 311 | } |
||
| 312 | |||
| 313 | v = v.toLowerCase(); |
||
| 314 | |||
| 315 | if (borderWidth_local_var_widths.indexOf(v) === -1) { |
||
| 316 | return false; |
||
| 317 | } |
||
| 318 | |||
| 319 | return true; |
||
| 320 | }; |
||
| 321 | |||
| 322 | var borderWidth_local_var_isValid = borderWidth_export_isValid; |
||
| 323 | |||
| 324 | var borderWidth_local_var_parser = function (v) { |
||
| 325 | var length = external_dependency_parsers_0.parseLength(v); |
||
| 326 | |||
| 327 | if (length !== undefined) { |
||
| 328 | return length; |
||
| 329 | } |
||
| 330 | |||
| 331 | if (borderWidth_local_var_isValid(v)) { |
||
| 332 | return v.toLowerCase(); |
||
| 333 | } |
||
| 334 | |||
| 335 | return undefined; |
||
| 336 | }; |
||
| 337 | |||
| 338 | borderWidth_export_definition = { |
||
| 339 | set: external_dependency_parsers_0.implicitSetter('border', 'width', borderWidth_local_var_isValid, borderWidth_local_var_parser), |
||
| 340 | get: function () { |
||
| 341 | return this.getPropertyValue('border-width'); |
||
| 342 | }, |
||
| 343 | enumerable: true, |
||
| 344 | configurable: true |
||
| 345 | }; |
||
| 346 | var borderStyle_export_isValid, borderStyle_export_definition; |
||
| 347 | // the valid border-styles: |
||
| 348 | var borderStyle_local_var_styles = ['none', 'hidden', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'outset']; |
||
| 349 | |||
| 350 | borderStyle_export_isValid = function parse(v) { |
||
| 351 | return typeof v === 'string' && (v === '' || borderStyle_local_var_styles.indexOf(v) !== -1); |
||
| 352 | }; |
||
| 353 | |||
| 354 | var borderStyle_local_var_isValid = borderStyle_export_isValid; |
||
| 355 | |||
| 356 | var borderStyle_local_var_parser = function (v) { |
||
| 357 | if (borderStyle_local_var_isValid(v)) { |
||
| 358 | return v.toLowerCase(); |
||
| 359 | } |
||
| 360 | |||
| 361 | return undefined; |
||
| 362 | }; |
||
| 363 | |||
| 364 | borderStyle_export_definition = { |
||
| 365 | set: external_dependency_parsers_0.implicitSetter('border', 'style', borderStyle_local_var_isValid, borderStyle_local_var_parser), |
||
| 366 | get: function () { |
||
| 367 | return this.getPropertyValue('border-style'); |
||
| 368 | }, |
||
| 369 | enumerable: true, |
||
| 370 | configurable: true |
||
| 371 | }; |
||
| 372 | var borderColor_export_isValid, borderColor_export_definition; |
||
| 373 | |||
| 374 | borderColor_export_isValid = function parse(v) { |
||
| 375 | if (typeof v !== 'string') { |
||
| 376 | return false; |
||
| 377 | } |
||
| 378 | |||
| 379 | return v === '' || v.toLowerCase() === 'transparent' || external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.COLOR; |
||
| 380 | }; |
||
| 381 | |||
| 382 | var borderColor_local_var_isValid = borderColor_export_isValid; |
||
| 383 | |||
| 384 | var borderColor_local_var_parser = function (v) { |
||
| 385 | if (borderColor_local_var_isValid(v)) { |
||
| 386 | return v.toLowerCase(); |
||
| 387 | } |
||
| 388 | |||
| 389 | return undefined; |
||
| 390 | }; |
||
| 391 | |||
| 392 | borderColor_export_definition = { |
||
| 393 | set: external_dependency_parsers_0.implicitSetter('border', 'color', borderColor_local_var_isValid, borderColor_local_var_parser), |
||
| 394 | get: function () { |
||
| 395 | return this.getPropertyValue('border-color'); |
||
| 396 | }, |
||
| 397 | enumerable: true, |
||
| 398 | configurable: true |
||
| 399 | }; |
||
| 400 | var border_export_definition; |
||
| 401 | var border_local_var_shorthand_for = { |
||
| 402 | 'border-width': { |
||
| 403 | isValid: borderWidth_export_isValid, |
||
| 404 | definition: borderWidth_export_definition |
||
| 405 | }, |
||
| 406 | 'border-style': { |
||
| 407 | isValid: borderStyle_export_isValid, |
||
| 408 | definition: borderStyle_export_definition |
||
| 409 | }, |
||
| 410 | 'border-color': { |
||
| 411 | isValid: borderColor_export_isValid, |
||
| 412 | definition: borderColor_export_definition |
||
| 413 | } |
||
| 414 | }; |
||
| 415 | var border_local_var_myShorthandSetter = external_dependency_parsers_0.shorthandSetter('border', border_local_var_shorthand_for); |
||
| 416 | var border_local_var_myShorthandGetter = external_dependency_parsers_0.shorthandGetter('border', border_local_var_shorthand_for); |
||
| 417 | border_export_definition = { |
||
| 418 | set: function (v) { |
||
| 419 | if (v.toString().toLowerCase() === 'none') { |
||
| 420 | v = ''; |
||
| 421 | } |
||
| 422 | |||
| 423 | border_local_var_myShorthandSetter.call(this, v); |
||
| 424 | this.removeProperty('border-top'); |
||
| 425 | this.removeProperty('border-left'); |
||
| 426 | this.removeProperty('border-right'); |
||
| 427 | this.removeProperty('border-bottom'); |
||
| 428 | this._values['border-top'] = this._values.border; |
||
| 429 | this._values['border-left'] = this._values.border; |
||
| 430 | this._values['border-right'] = this._values.border; |
||
| 431 | this._values['border-bottom'] = this._values.border; |
||
| 432 | }, |
||
| 433 | get: border_local_var_myShorthandGetter, |
||
| 434 | enumerable: true, |
||
| 435 | configurable: true |
||
| 436 | }; |
||
| 437 | var borderBottomWidth_export_isValid, borderBottomWidth_export_definition; |
||
| 438 | var borderBottomWidth_local_var_isValid = borderBottomWidth_export_isValid = borderWidth_export_isValid; |
||
| 439 | borderBottomWidth_export_definition = { |
||
| 440 | set: function (v) { |
||
| 441 | if (borderBottomWidth_local_var_isValid(v)) { |
||
| 442 | this._setProperty('border-bottom-width', v); |
||
| 443 | } |
||
| 444 | }, |
||
| 445 | get: function () { |
||
| 446 | return this.getPropertyValue('border-bottom-width'); |
||
| 447 | }, |
||
| 448 | enumerable: true, |
||
| 449 | configurable: true |
||
| 450 | }; |
||
| 451 | var borderBottomStyle_export_isValid, borderBottomStyle_export_definition; |
||
| 452 | borderBottomStyle_export_isValid = borderStyle_export_isValid; |
||
| 453 | borderBottomStyle_export_definition = { |
||
| 454 | set: function (v) { |
||
| 455 | if (borderStyle_export_isValid(v)) { |
||
| 456 | if (v.toLowerCase() === 'none') { |
||
| 457 | v = ''; |
||
| 458 | this.removeProperty('border-bottom-width'); |
||
| 459 | } |
||
| 460 | |||
| 461 | this._setProperty('border-bottom-style', v); |
||
| 462 | } |
||
| 463 | }, |
||
| 464 | get: function () { |
||
| 465 | return this.getPropertyValue('border-bottom-style'); |
||
| 466 | }, |
||
| 467 | enumerable: true, |
||
| 468 | configurable: true |
||
| 469 | }; |
||
| 470 | var borderBottomColor_export_isValid, borderBottomColor_export_definition; |
||
| 471 | var borderBottomColor_local_var_isValid = borderBottomColor_export_isValid = borderColor_export_isValid; |
||
| 472 | borderBottomColor_export_definition = { |
||
| 473 | set: function (v) { |
||
| 474 | if (borderBottomColor_local_var_isValid(v)) { |
||
| 475 | this._setProperty('border-bottom-color', v); |
||
| 476 | } |
||
| 477 | }, |
||
| 478 | get: function () { |
||
| 479 | return this.getPropertyValue('border-bottom-color'); |
||
| 480 | }, |
||
| 481 | enumerable: true, |
||
| 482 | configurable: true |
||
| 483 | }; |
||
| 484 | var borderBottom_export_definition; |
||
| 485 | var borderBottom_local_var_shorthand_for = { |
||
| 486 | 'border-bottom-width': { |
||
| 487 | isValid: borderBottomWidth_export_isValid, |
||
| 488 | definition: borderBottomWidth_export_definition |
||
| 489 | }, |
||
| 490 | 'border-bottom-style': { |
||
| 491 | isValid: borderBottomStyle_export_isValid, |
||
| 492 | definition: borderBottomStyle_export_definition |
||
| 493 | }, |
||
| 494 | 'border-bottom-color': { |
||
| 495 | isValid: borderBottomColor_export_isValid, |
||
| 496 | definition: borderBottomColor_export_definition |
||
| 497 | } |
||
| 498 | }; |
||
| 499 | borderBottom_export_definition = { |
||
| 500 | set: external_dependency_parsers_0.shorthandSetter('border-bottom', borderBottom_local_var_shorthand_for), |
||
| 501 | get: external_dependency_parsers_0.shorthandGetter('border-bottom', borderBottom_local_var_shorthand_for), |
||
| 502 | enumerable: true, |
||
| 503 | configurable: true |
||
| 504 | }; |
||
| 505 | var borderCollapse_export_definition; |
||
| 506 | |||
| 507 | var borderCollapse_local_var_parse = function parse(v) { |
||
| 508 | if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'collapse' || v.toLowerCase() === 'separate' || v.toLowerCase() === 'inherit')) { |
||
| 509 | return v; |
||
| 510 | } |
||
| 511 | |||
| 512 | return undefined; |
||
| 513 | }; |
||
| 514 | |||
| 515 | borderCollapse_export_definition = { |
||
| 516 | set: function (v) { |
||
| 517 | this._setProperty('border-collapse', borderCollapse_local_var_parse(v)); |
||
| 518 | }, |
||
| 519 | get: function () { |
||
| 520 | return this.getPropertyValue('border-collapse'); |
||
| 521 | }, |
||
| 522 | enumerable: true, |
||
| 523 | configurable: true |
||
| 524 | }; |
||
| 525 | var borderLeftWidth_export_isValid, borderLeftWidth_export_definition; |
||
| 526 | var borderLeftWidth_local_var_isValid = borderLeftWidth_export_isValid = borderWidth_export_isValid; |
||
| 527 | borderLeftWidth_export_definition = { |
||
| 528 | set: function (v) { |
||
| 529 | if (borderLeftWidth_local_var_isValid(v)) { |
||
| 530 | this._setProperty('border-left-width', v); |
||
| 531 | } |
||
| 532 | }, |
||
| 533 | get: function () { |
||
| 534 | return this.getPropertyValue('border-left-width'); |
||
| 535 | }, |
||
| 536 | enumerable: true, |
||
| 537 | configurable: true |
||
| 538 | }; |
||
| 539 | var borderLeftStyle_export_isValid, borderLeftStyle_export_definition; |
||
| 540 | borderLeftStyle_export_isValid = borderStyle_export_isValid; |
||
| 541 | borderLeftStyle_export_definition = { |
||
| 542 | set: function (v) { |
||
| 543 | if (borderStyle_export_isValid(v)) { |
||
| 544 | if (v.toLowerCase() === 'none') { |
||
| 545 | v = ''; |
||
| 546 | this.removeProperty('border-left-width'); |
||
| 547 | } |
||
| 548 | |||
| 549 | this._setProperty('border-left-style', v); |
||
| 550 | } |
||
| 551 | }, |
||
| 552 | get: function () { |
||
| 553 | return this.getPropertyValue('border-left-style'); |
||
| 554 | }, |
||
| 555 | enumerable: true, |
||
| 556 | configurable: true |
||
| 557 | }; |
||
| 558 | var borderLeftColor_export_isValid, borderLeftColor_export_definition; |
||
| 559 | var borderLeftColor_local_var_isValid = borderLeftColor_export_isValid = borderColor_export_isValid; |
||
| 560 | borderLeftColor_export_definition = { |
||
| 561 | set: function (v) { |
||
| 562 | if (borderLeftColor_local_var_isValid(v)) { |
||
| 563 | this._setProperty('border-left-color', v); |
||
| 564 | } |
||
| 565 | }, |
||
| 566 | get: function () { |
||
| 567 | return this.getPropertyValue('border-left-color'); |
||
| 568 | }, |
||
| 569 | enumerable: true, |
||
| 570 | configurable: true |
||
| 571 | }; |
||
| 572 | var borderLeft_export_definition; |
||
| 573 | var borderLeft_local_var_shorthand_for = { |
||
| 574 | 'border-left-width': { |
||
| 575 | isValid: borderLeftWidth_export_isValid, |
||
| 576 | definition: borderLeftWidth_export_definition |
||
| 577 | }, |
||
| 578 | 'border-left-style': { |
||
| 579 | isValid: borderLeftStyle_export_isValid, |
||
| 580 | definition: borderLeftStyle_export_definition |
||
| 581 | }, |
||
| 582 | 'border-left-color': { |
||
| 583 | isValid: borderLeftColor_export_isValid, |
||
| 584 | definition: borderLeftColor_export_definition |
||
| 585 | } |
||
| 586 | }; |
||
| 587 | borderLeft_export_definition = { |
||
| 588 | set: external_dependency_parsers_0.shorthandSetter('border-left', borderLeft_local_var_shorthand_for), |
||
| 589 | get: external_dependency_parsers_0.shorthandGetter('border-left', borderLeft_local_var_shorthand_for), |
||
| 590 | enumerable: true, |
||
| 591 | configurable: true |
||
| 592 | }; |
||
| 593 | var borderRightWidth_export_isValid, borderRightWidth_export_definition; |
||
| 594 | var borderRightWidth_local_var_isValid = borderRightWidth_export_isValid = borderWidth_export_isValid; |
||
| 595 | borderRightWidth_export_definition = { |
||
| 596 | set: function (v) { |
||
| 597 | if (borderRightWidth_local_var_isValid(v)) { |
||
| 598 | this._setProperty('border-right-width', v); |
||
| 599 | } |
||
| 600 | }, |
||
| 601 | get: function () { |
||
| 602 | return this.getPropertyValue('border-right-width'); |
||
| 603 | }, |
||
| 604 | enumerable: true, |
||
| 605 | configurable: true |
||
| 606 | }; |
||
| 607 | var borderRightStyle_export_isValid, borderRightStyle_export_definition; |
||
| 608 | borderRightStyle_export_isValid = borderStyle_export_isValid; |
||
| 609 | borderRightStyle_export_definition = { |
||
| 610 | set: function (v) { |
||
| 611 | if (borderStyle_export_isValid(v)) { |
||
| 612 | if (v.toLowerCase() === 'none') { |
||
| 613 | v = ''; |
||
| 614 | this.removeProperty('border-right-width'); |
||
| 615 | } |
||
| 616 | |||
| 617 | this._setProperty('border-right-style', v); |
||
| 618 | } |
||
| 619 | }, |
||
| 620 | get: function () { |
||
| 621 | return this.getPropertyValue('border-right-style'); |
||
| 622 | }, |
||
| 623 | enumerable: true, |
||
| 624 | configurable: true |
||
| 625 | }; |
||
| 626 | var borderRightColor_export_isValid, borderRightColor_export_definition; |
||
| 627 | var borderRightColor_local_var_isValid = borderRightColor_export_isValid = borderColor_export_isValid; |
||
| 628 | borderRightColor_export_definition = { |
||
| 629 | set: function (v) { |
||
| 630 | if (borderRightColor_local_var_isValid(v)) { |
||
| 631 | this._setProperty('border-right-color', v); |
||
| 632 | } |
||
| 633 | }, |
||
| 634 | get: function () { |
||
| 635 | return this.getPropertyValue('border-right-color'); |
||
| 636 | }, |
||
| 637 | enumerable: true, |
||
| 638 | configurable: true |
||
| 639 | }; |
||
| 640 | var borderRight_export_definition; |
||
| 641 | var borderRight_local_var_shorthand_for = { |
||
| 642 | 'border-right-width': { |
||
| 643 | isValid: borderRightWidth_export_isValid, |
||
| 644 | definition: borderRightWidth_export_definition |
||
| 645 | }, |
||
| 646 | 'border-right-style': { |
||
| 647 | isValid: borderRightStyle_export_isValid, |
||
| 648 | definition: borderRightStyle_export_definition |
||
| 649 | }, |
||
| 650 | 'border-right-color': { |
||
| 651 | isValid: borderRightColor_export_isValid, |
||
| 652 | definition: borderRightColor_export_definition |
||
| 653 | } |
||
| 654 | }; |
||
| 655 | borderRight_export_definition = { |
||
| 656 | set: external_dependency_parsers_0.shorthandSetter('border-right', borderRight_local_var_shorthand_for), |
||
| 657 | get: external_dependency_parsers_0.shorthandGetter('border-right', borderRight_local_var_shorthand_for), |
||
| 658 | enumerable: true, |
||
| 659 | configurable: true |
||
| 660 | }; |
||
| 661 | var borderSpacing_export_definition; |
||
| 662 | |||
| 663 | // <length> <length>? | inherit |
||
| 664 | // if one, it applies to both horizontal and verical spacing |
||
| 665 | // if two, the first applies to the horizontal and the second applies to vertical spacing |
||
| 666 | var borderSpacing_local_var_parse = function parse(v) { |
||
| 667 | if (v === '' || v === null) { |
||
| 668 | return undefined; |
||
| 669 | } |
||
| 670 | |||
| 671 | if (v === 0) { |
||
| 672 | return '0px'; |
||
| 673 | } |
||
| 674 | |||
| 675 | if (v.toLowerCase() === 'inherit') { |
||
| 676 | return v; |
||
| 677 | } |
||
| 678 | |||
| 679 | var parts = v.split(/\s+/); |
||
| 680 | |||
| 681 | if (parts.length !== 1 && parts.length !== 2) { |
||
| 682 | return undefined; |
||
| 683 | } |
||
| 684 | |||
| 685 | parts.forEach(function (part) { |
||
| 686 | if (external_dependency_parsers_0.valueType(part) !== external_dependency_parsers_0.TYPES.LENGTH) { |
||
| 687 | return undefined; |
||
| 688 | } |
||
| 689 | }); |
||
| 690 | return v; |
||
| 691 | }; |
||
| 692 | |||
| 693 | borderSpacing_export_definition = { |
||
| 694 | set: function (v) { |
||
| 695 | this._setProperty('border-spacing', borderSpacing_local_var_parse(v)); |
||
| 696 | }, |
||
| 697 | get: function () { |
||
| 698 | return this.getPropertyValue('border-spacing'); |
||
| 699 | }, |
||
| 700 | enumerable: true, |
||
| 701 | configurable: true |
||
| 702 | }; |
||
| 703 | var borderTopWidth_export_isValid, borderTopWidth_export_definition; |
||
| 704 | borderTopWidth_export_isValid = borderWidth_export_isValid; |
||
| 705 | borderTopWidth_export_definition = { |
||
| 706 | set: function (v) { |
||
| 707 | if (borderWidth_export_isValid(v)) { |
||
| 708 | this._setProperty('border-top-width', v); |
||
| 709 | } |
||
| 710 | }, |
||
| 711 | get: function () { |
||
| 712 | return this.getPropertyValue('border-top-width'); |
||
| 713 | }, |
||
| 714 | enumerable: true, |
||
| 715 | configurable: true |
||
| 716 | }; |
||
| 717 | var borderTopStyle_export_isValid, borderTopStyle_export_definition; |
||
| 718 | borderTopStyle_export_isValid = borderStyle_export_isValid; |
||
| 719 | borderTopStyle_export_definition = { |
||
| 720 | set: function (v) { |
||
| 721 | if (borderStyle_export_isValid(v)) { |
||
| 722 | if (v.toLowerCase() === 'none') { |
||
| 723 | v = ''; |
||
| 724 | this.removeProperty('border-top-width'); |
||
| 725 | } |
||
| 726 | |||
| 727 | this._setProperty('border-top-style', v); |
||
| 728 | } |
||
| 729 | }, |
||
| 730 | get: function () { |
||
| 731 | return this.getPropertyValue('border-top-style'); |
||
| 732 | }, |
||
| 733 | enumerable: true, |
||
| 734 | configurable: true |
||
| 735 | }; |
||
| 736 | var borderTopColor_export_isValid, borderTopColor_export_definition; |
||
| 737 | var borderTopColor_local_var_isValid = borderTopColor_export_isValid = borderColor_export_isValid; |
||
| 738 | borderTopColor_export_definition = { |
||
| 739 | set: function (v) { |
||
| 740 | if (borderTopColor_local_var_isValid(v)) { |
||
| 741 | this._setProperty('border-top-color', v); |
||
| 742 | } |
||
| 743 | }, |
||
| 744 | get: function () { |
||
| 745 | return this.getPropertyValue('border-top-color'); |
||
| 746 | }, |
||
| 747 | enumerable: true, |
||
| 748 | configurable: true |
||
| 749 | }; |
||
| 750 | var borderTop_export_definition; |
||
| 751 | var borderTop_local_var_shorthand_for = { |
||
| 752 | 'border-top-width': { |
||
| 753 | isValid: borderTopWidth_export_isValid, |
||
| 754 | definition: borderTopWidth_export_definition |
||
| 755 | }, |
||
| 756 | 'border-top-style': { |
||
| 757 | isValid: borderTopStyle_export_isValid, |
||
| 758 | definition: borderTopStyle_export_definition |
||
| 759 | }, |
||
| 760 | 'border-top-color': { |
||
| 761 | isValid: borderTopColor_export_isValid, |
||
| 762 | definition: borderTopColor_export_definition |
||
| 763 | } |
||
| 764 | }; |
||
| 765 | borderTop_export_definition = { |
||
| 766 | set: external_dependency_parsers_0.shorthandSetter('border-top', borderTop_local_var_shorthand_for), |
||
| 767 | get: external_dependency_parsers_0.shorthandGetter('border-top', borderTop_local_var_shorthand_for), |
||
| 768 | enumerable: true, |
||
| 769 | configurable: true |
||
| 770 | }; |
||
| 771 | var bottom_export_definition; |
||
| 772 | bottom_export_definition = { |
||
| 773 | set: function (v) { |
||
| 774 | this._setProperty('bottom', external_dependency_parsers_0.parseMeasurement(v)); |
||
| 775 | }, |
||
| 776 | get: function () { |
||
| 777 | return this.getPropertyValue('bottom'); |
||
| 778 | }, |
||
| 779 | enumerable: true, |
||
| 780 | configurable: true |
||
| 781 | }; |
||
| 782 | var clear_export_definition; |
||
| 783 | var clear_local_var_clear_keywords = ['none', 'left', 'right', 'both', 'inherit']; |
||
| 784 | clear_export_definition = { |
||
| 785 | set: function (v) { |
||
| 786 | this._setProperty('clear', external_dependency_parsers_0.parseKeyword(v, clear_local_var_clear_keywords)); |
||
| 787 | }, |
||
| 788 | get: function () { |
||
| 789 | return this.getPropertyValue('clear'); |
||
| 790 | }, |
||
| 791 | enumerable: true, |
||
| 792 | configurable: true |
||
| 793 | }; |
||
| 794 | var clip_export_definition; |
||
| 795 | var clip_local_var_shape_regex = /^rect\((.*)\)$/i; |
||
| 796 | |||
| 797 | var clip_local_var_parse = function (val) { |
||
| 798 | if (val === '' || val === null) { |
||
| 799 | return val; |
||
| 800 | } |
||
| 801 | |||
| 802 | if (typeof val !== 'string') { |
||
| 803 | return undefined; |
||
| 804 | } |
||
| 805 | |||
| 806 | val = val.toLowerCase(); |
||
| 807 | |||
| 808 | if (val === 'auto' || val === 'inherit') { |
||
| 809 | return val; |
||
| 810 | } |
||
| 811 | |||
| 812 | var matches = val.match(clip_local_var_shape_regex); |
||
| 813 | |||
| 814 | if (!matches) { |
||
| 815 | return undefined; |
||
| 816 | } |
||
| 817 | |||
| 818 | var parts = matches[1].split(/\s*,\s*/); |
||
| 819 | |||
| 820 | if (parts.length !== 4) { |
||
| 821 | return undefined; |
||
| 822 | } |
||
| 823 | |||
| 824 | var valid = parts.every(function (part, index) { |
||
| 825 | var measurement = external_dependency_parsers_0.parseMeasurement(part); |
||
| 826 | parts[index] = measurement; |
||
| 827 | return measurement !== undefined; |
||
| 828 | }); |
||
| 829 | |||
| 830 | if (!valid) { |
||
| 831 | return undefined; |
||
| 832 | } |
||
| 833 | |||
| 834 | parts = parts.join(', '); |
||
| 835 | return val.replace(matches[1], parts); |
||
| 836 | }; |
||
| 837 | |||
| 838 | clip_export_definition = { |
||
| 839 | set: function (v) { |
||
| 840 | this._setProperty('clip', clip_local_var_parse(v)); |
||
| 841 | }, |
||
| 842 | get: function () { |
||
| 843 | return this.getPropertyValue('clip'); |
||
| 844 | }, |
||
| 845 | enumerable: true, |
||
| 846 | configurable: true |
||
| 847 | }; |
||
| 848 | var color_export_definition; |
||
| 849 | color_export_definition = { |
||
| 850 | set: function (v) { |
||
| 851 | this._setProperty('color', external_dependency_parsers_0.parseColor(v)); |
||
| 852 | }, |
||
| 853 | get: function () { |
||
| 854 | return this.getPropertyValue('color'); |
||
| 855 | }, |
||
| 856 | enumerable: true, |
||
| 857 | configurable: true |
||
| 858 | }; |
||
| 859 | var cssFloat_export_definition; |
||
| 860 | cssFloat_export_definition = { |
||
| 861 | set: function (v) { |
||
| 862 | this._setProperty('float', v); |
||
| 863 | }, |
||
| 864 | get: function () { |
||
| 865 | return this.getPropertyValue('float'); |
||
| 866 | }, |
||
| 867 | enumerable: true, |
||
| 868 | configurable: true |
||
| 869 | }; |
||
| 870 | var flexGrow_export_isValid, flexGrow_export_definition; |
||
| 871 | |||
| 872 | flexGrow_export_isValid = function isValid(v, positionAtFlexShorthand) { |
||
| 873 | return external_dependency_parsers_0.parseNumber(v) !== undefined && positionAtFlexShorthand === external_dependency_constants_1.POSITION_AT_SHORTHAND.first; |
||
| 874 | }; |
||
| 875 | |||
| 876 | flexGrow_export_definition = { |
||
| 877 | set: function (v) { |
||
| 878 | this._setProperty('flex-grow', external_dependency_parsers_0.parseNumber(v)); |
||
| 879 | }, |
||
| 880 | get: function () { |
||
| 881 | return this.getPropertyValue('flex-grow'); |
||
| 882 | }, |
||
| 883 | enumerable: true, |
||
| 884 | configurable: true |
||
| 885 | }; |
||
| 886 | var flexShrink_export_isValid, flexShrink_export_definition; |
||
| 887 | |||
| 888 | flexShrink_export_isValid = function isValid(v, positionAtFlexShorthand) { |
||
| 889 | return external_dependency_parsers_0.parseNumber(v) !== undefined && positionAtFlexShorthand === external_dependency_constants_1.POSITION_AT_SHORTHAND.second; |
||
| 890 | }; |
||
| 891 | |||
| 892 | flexShrink_export_definition = { |
||
| 893 | set: function (v) { |
||
| 894 | this._setProperty('flex-shrink', external_dependency_parsers_0.parseNumber(v)); |
||
| 895 | }, |
||
| 896 | get: function () { |
||
| 897 | return this.getPropertyValue('flex-shrink'); |
||
| 898 | }, |
||
| 899 | enumerable: true, |
||
| 900 | configurable: true |
||
| 901 | }; |
||
| 902 | var flexBasis_export_isValid, flexBasis_export_definition; |
||
| 903 | |||
| 904 | function flexBasis_local_fn_parse(v) { |
||
| 905 | if (String(v).toLowerCase() === 'auto') { |
||
| 906 | return 'auto'; |
||
| 907 | } |
||
| 908 | |||
| 909 | if (String(v).toLowerCase() === 'inherit') { |
||
| 910 | return 'inherit'; |
||
| 911 | } |
||
| 912 | |||
| 913 | return external_dependency_parsers_0.parseMeasurement(v); |
||
| 914 | } |
||
| 915 | |||
| 916 | flexBasis_export_isValid = function isValid(v) { |
||
| 917 | return flexBasis_local_fn_parse(v) !== undefined; |
||
| 918 | }; |
||
| 919 | |||
| 920 | flexBasis_export_definition = { |
||
| 921 | set: function (v) { |
||
| 922 | this._setProperty('flex-basis', flexBasis_local_fn_parse(v)); |
||
| 923 | }, |
||
| 924 | get: function () { |
||
| 925 | return this.getPropertyValue('flex-basis'); |
||
| 926 | }, |
||
| 927 | enumerable: true, |
||
| 928 | configurable: true |
||
| 929 | }; |
||
| 930 | var flex_export_isValid, flex_export_definition; |
||
| 931 | var flex_local_var_shorthand_for = { |
||
| 932 | 'flex-grow': { |
||
| 933 | isValid: flexGrow_export_isValid, |
||
| 934 | definition: flexGrow_export_definition |
||
| 935 | }, |
||
| 936 | 'flex-shrink': { |
||
| 937 | isValid: flexShrink_export_isValid, |
||
| 938 | definition: flexShrink_export_definition |
||
| 939 | }, |
||
| 940 | 'flex-basis': { |
||
| 941 | isValid: flexBasis_export_isValid, |
||
| 942 | definition: flexBasis_export_definition |
||
| 943 | } |
||
| 944 | }; |
||
| 945 | var flex_local_var_myShorthandSetter = external_dependency_parsers_0.shorthandSetter('flex', flex_local_var_shorthand_for); |
||
| 946 | |||
| 947 | flex_export_isValid = function isValid(v) { |
||
| 948 | return external_dependency_parsers_0.shorthandParser(v, flex_local_var_shorthand_for) !== undefined; |
||
| 949 | }; |
||
| 950 | |||
| 951 | flex_export_definition = { |
||
| 952 | set: function (v) { |
||
| 953 | var normalizedValue = String(v).trim().toLowerCase(); |
||
| 954 | |||
| 955 | if (normalizedValue === 'none') { |
||
| 956 | flex_local_var_myShorthandSetter.call(this, '0 0 auto'); |
||
| 957 | return; |
||
| 958 | } |
||
| 959 | |||
| 960 | if (normalizedValue === 'initial') { |
||
| 961 | flex_local_var_myShorthandSetter.call(this, '0 1 auto'); |
||
| 962 | return; |
||
| 963 | } |
||
| 964 | |||
| 965 | if (normalizedValue === 'auto') { |
||
| 966 | this.removeProperty('flex-grow'); |
||
| 967 | this.removeProperty('flex-shrink'); |
||
| 968 | this.setProperty('flex-basis', normalizedValue); |
||
| 969 | return; |
||
| 970 | } |
||
| 971 | |||
| 972 | flex_local_var_myShorthandSetter.call(this, v); |
||
| 973 | }, |
||
| 974 | get: external_dependency_parsers_0.shorthandGetter('flex', flex_local_var_shorthand_for), |
||
| 975 | enumerable: true, |
||
| 976 | configurable: true |
||
| 977 | }; |
||
| 978 | var float_export_definition; |
||
| 979 | float_export_definition = { |
||
| 980 | set: function (v) { |
||
| 981 | this._setProperty('float', v); |
||
| 982 | }, |
||
| 983 | get: function () { |
||
| 984 | return this.getPropertyValue('float'); |
||
| 985 | }, |
||
| 986 | enumerable: true, |
||
| 987 | configurable: true |
||
| 988 | }; |
||
| 989 | var floodColor_export_definition; |
||
| 990 | floodColor_export_definition = { |
||
| 991 | set: function (v) { |
||
| 992 | this._setProperty('flood-color', external_dependency_parsers_0.parseColor(v)); |
||
| 993 | }, |
||
| 994 | get: function () { |
||
| 995 | return this.getPropertyValue('flood-color'); |
||
| 996 | }, |
||
| 997 | enumerable: true, |
||
| 998 | configurable: true |
||
| 999 | }; |
||
| 1000 | var fontFamily_export_isValid, fontFamily_export_definition; |
||
| 1001 | var fontFamily_local_var_partsRegEx = /\s*,\s*/; |
||
| 1002 | |||
| 1003 | fontFamily_export_isValid = function isValid(v) { |
||
| 1004 | if (v === '' || v === null) { |
||
| 1005 | return true; |
||
| 1006 | } |
||
| 1007 | |||
| 1008 | var parts = v.split(fontFamily_local_var_partsRegEx); |
||
| 1009 | var len = parts.length; |
||
| 1010 | var i; |
||
| 1011 | var type; |
||
| 1012 | |||
| 1013 | for (i = 0; i < len; i++) { |
||
| 1014 | type = external_dependency_parsers_0.valueType(parts[i]); |
||
| 1015 | |||
| 1016 | if (type === external_dependency_parsers_0.TYPES.STRING || type === external_dependency_parsers_0.TYPES.KEYWORD) { |
||
| 1017 | return true; |
||
| 1018 | } |
||
| 1019 | } |
||
| 1020 | |||
| 1021 | return false; |
||
| 1022 | }; |
||
| 1023 | |||
| 1024 | fontFamily_export_definition = { |
||
| 1025 | set: function (v) { |
||
| 1026 | this._setProperty('font-family', v); |
||
| 1027 | }, |
||
| 1028 | get: function () { |
||
| 1029 | return this.getPropertyValue('font-family'); |
||
| 1030 | }, |
||
| 1031 | enumerable: true, |
||
| 1032 | configurable: true |
||
| 1033 | }; |
||
| 1034 | var fontSize_export_isValid, fontSize_export_definition; |
||
| 1035 | var fontSize_local_var_absoluteSizes = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large']; |
||
| 1036 | var fontSize_local_var_relativeSizes = ['larger', 'smaller']; |
||
| 1037 | |||
| 1038 | fontSize_export_isValid = function (v) { |
||
| 1039 | var type = external_dependency_parsers_0.valueType(v.toLowerCase()); |
||
| 1040 | return type === external_dependency_parsers_0.TYPES.LENGTH || type === external_dependency_parsers_0.TYPES.PERCENT || type === external_dependency_parsers_0.TYPES.KEYWORD && fontSize_local_var_absoluteSizes.indexOf(v.toLowerCase()) !== -1 || type === external_dependency_parsers_0.TYPES.KEYWORD && fontSize_local_var_relativeSizes.indexOf(v.toLowerCase()) !== -1; |
||
| 1041 | }; |
||
| 1042 | |||
| 1043 | fontSize_export_definition = { |
||
| 1044 | set: function (v) { |
||
| 1045 | this._setProperty('font-size', v); |
||
| 1046 | }, |
||
| 1047 | get: function () { |
||
| 1048 | return this.getPropertyValue('font-size'); |
||
| 1049 | }, |
||
| 1050 | enumerable: true, |
||
| 1051 | configurable: true |
||
| 1052 | }; |
||
| 1053 | var fontStyle_export_isValid, fontStyle_export_definition; |
||
| 1054 | var fontStyle_local_var_valid_styles = ['normal', 'italic', 'oblique', 'inherit']; |
||
| 1055 | |||
| 1056 | fontStyle_export_isValid = function (v) { |
||
| 1057 | return fontStyle_local_var_valid_styles.indexOf(v.toLowerCase()) !== -1; |
||
| 1058 | }; |
||
| 1059 | |||
| 1060 | fontStyle_export_definition = { |
||
| 1061 | set: function (v) { |
||
| 1062 | this._setProperty('font-style', v); |
||
| 1063 | }, |
||
| 1064 | get: function () { |
||
| 1065 | return this.getPropertyValue('font-style'); |
||
| 1066 | }, |
||
| 1067 | enumerable: true, |
||
| 1068 | configurable: true |
||
| 1069 | }; |
||
| 1070 | var fontVariant_export_isValid, fontVariant_export_definition; |
||
| 1071 | var fontVariant_local_var_valid_variants = ['normal', 'small-caps', 'inherit']; |
||
| 1072 | |||
| 1073 | fontVariant_export_isValid = function isValid(v) { |
||
| 1074 | return fontVariant_local_var_valid_variants.indexOf(v.toLowerCase()) !== -1; |
||
| 1075 | }; |
||
| 1076 | |||
| 1077 | fontVariant_export_definition = { |
||
| 1078 | set: function (v) { |
||
| 1079 | this._setProperty('font-variant', v); |
||
| 1080 | }, |
||
| 1081 | get: function () { |
||
| 1082 | return this.getPropertyValue('font-variant'); |
||
| 1083 | }, |
||
| 1084 | enumerable: true, |
||
| 1085 | configurable: true |
||
| 1086 | }; |
||
| 1087 | var fontWeight_export_isValid, fontWeight_export_definition; |
||
| 1088 | var fontWeight_local_var_valid_weights = ['normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900', 'inherit']; |
||
| 1089 | |||
| 1090 | fontWeight_export_isValid = function isValid(v) { |
||
| 1091 | return fontWeight_local_var_valid_weights.indexOf(v.toLowerCase()) !== -1; |
||
| 1092 | }; |
||
| 1093 | |||
| 1094 | fontWeight_export_definition = { |
||
| 1095 | set: function (v) { |
||
| 1096 | this._setProperty('font-weight', v); |
||
| 1097 | }, |
||
| 1098 | get: function () { |
||
| 1099 | return this.getPropertyValue('font-weight'); |
||
| 1100 | }, |
||
| 1101 | enumerable: true, |
||
| 1102 | configurable: true |
||
| 1103 | }; |
||
| 1104 | var lineHeight_export_isValid, lineHeight_export_definition; |
||
| 1105 | |||
| 1106 | lineHeight_export_isValid = function isValid(v) { |
||
| 1107 | var type = external_dependency_parsers_0.valueType(v); |
||
| 1108 | return type === external_dependency_parsers_0.TYPES.KEYWORD && v.toLowerCase() === 'normal' || v.toLowerCase() === 'inherit' || type === external_dependency_parsers_0.TYPES.NUMBER || type === external_dependency_parsers_0.TYPES.LENGTH || type === external_dependency_parsers_0.TYPES.PERCENT; |
||
| 1109 | }; |
||
| 1110 | |||
| 1111 | lineHeight_export_definition = { |
||
| 1112 | set: function (v) { |
||
| 1113 | this._setProperty('line-height', v); |
||
| 1114 | }, |
||
| 1115 | get: function () { |
||
| 1116 | return this.getPropertyValue('line-height'); |
||
| 1117 | }, |
||
| 1118 | enumerable: true, |
||
| 1119 | configurable: true |
||
| 1120 | }; |
||
| 1121 | var font_export_definition; |
||
| 1122 | var font_local_var_shorthand_for = { |
||
| 1123 | 'font-family': { |
||
| 1124 | isValid: fontFamily_export_isValid, |
||
| 1125 | definition: fontFamily_export_definition |
||
| 1126 | }, |
||
| 1127 | 'font-size': { |
||
| 1128 | isValid: fontSize_export_isValid, |
||
| 1129 | definition: fontSize_export_definition |
||
| 1130 | }, |
||
| 1131 | 'font-style': { |
||
| 1132 | isValid: fontStyle_export_isValid, |
||
| 1133 | definition: fontStyle_export_definition |
||
| 1134 | }, |
||
| 1135 | 'font-variant': { |
||
| 1136 | isValid: fontVariant_export_isValid, |
||
| 1137 | definition: fontVariant_export_definition |
||
| 1138 | }, |
||
| 1139 | 'font-weight': { |
||
| 1140 | isValid: fontWeight_export_isValid, |
||
| 1141 | definition: fontWeight_export_definition |
||
| 1142 | }, |
||
| 1143 | 'line-height': { |
||
| 1144 | isValid: lineHeight_export_isValid, |
||
| 1145 | definition: lineHeight_export_definition |
||
| 1146 | } |
||
| 1147 | }; |
||
| 1148 | var font_local_var_static_fonts = ['caption', 'icon', 'menu', 'message-box', 'small-caption', 'status-bar', 'inherit']; |
||
| 1149 | var font_local_var_setter = external_dependency_parsers_0.shorthandSetter('font', font_local_var_shorthand_for); |
||
| 1150 | font_export_definition = { |
||
| 1151 | set: function (v) { |
||
| 1152 | var short = external_dependency_parsers_0.shorthandParser(v, font_local_var_shorthand_for); |
||
| 1153 | |||
| 1154 | if (short !== undefined) { |
||
| 1155 | return font_local_var_setter.call(this, v); |
||
| 1156 | } |
||
| 1157 | |||
| 1158 | if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && font_local_var_static_fonts.indexOf(v.toLowerCase()) !== -1) { |
||
| 1159 | this._setProperty('font', v); |
||
| 1160 | } |
||
| 1161 | }, |
||
| 1162 | get: external_dependency_parsers_0.shorthandGetter('font', font_local_var_shorthand_for), |
||
| 1163 | enumerable: true, |
||
| 1164 | configurable: true |
||
| 1165 | }; |
||
| 1166 | var height_export_definition; |
||
| 1167 | |||
| 1168 | function height_local_fn_parse(v) { |
||
| 1169 | if (String(v).toLowerCase() === 'auto') { |
||
| 1170 | return 'auto'; |
||
| 1171 | } |
||
| 1172 | |||
| 1173 | if (String(v).toLowerCase() === 'inherit') { |
||
| 1174 | return 'inherit'; |
||
| 1175 | } |
||
| 1176 | |||
| 1177 | return external_dependency_parsers_0.parseMeasurement(v); |
||
| 1178 | } |
||
| 1179 | |||
| 1180 | height_export_definition = { |
||
| 1181 | set: function (v) { |
||
| 1182 | this._setProperty('height', height_local_fn_parse(v)); |
||
| 1183 | }, |
||
| 1184 | get: function () { |
||
| 1185 | return this.getPropertyValue('height'); |
||
| 1186 | }, |
||
| 1187 | enumerable: true, |
||
| 1188 | configurable: true |
||
| 1189 | }; |
||
| 1190 | var left_export_definition; |
||
| 1191 | left_export_definition = { |
||
| 1192 | set: function (v) { |
||
| 1193 | this._setProperty('left', external_dependency_parsers_0.parseMeasurement(v)); |
||
| 1194 | }, |
||
| 1195 | get: function () { |
||
| 1196 | return this.getPropertyValue('left'); |
||
| 1197 | }, |
||
| 1198 | enumerable: true, |
||
| 1199 | configurable: true |
||
| 1200 | }; |
||
| 1201 | var lightingColor_export_definition; |
||
| 1202 | lightingColor_export_definition = { |
||
| 1203 | set: function (v) { |
||
| 1204 | this._setProperty('lighting-color', external_dependency_parsers_0.parseColor(v)); |
||
| 1205 | }, |
||
| 1206 | get: function () { |
||
| 1207 | return this.getPropertyValue('lighting-color'); |
||
| 1208 | }, |
||
| 1209 | enumerable: true, |
||
| 1210 | configurable: true |
||
| 1211 | }; |
||
| 1212 | var margin_export_definition, margin_export_isValid, margin_export_parser; |
||
| 1213 | var margin_local_var_TYPES = external_dependency_parsers_0.TYPES; |
||
| 1214 | |||
| 1215 | var margin_local_var_isValid = function (v) { |
||
| 1216 | if (v.toLowerCase() === 'auto') { |
||
| 1217 | return true; |
||
| 1218 | } |
||
| 1219 | |||
| 1220 | var type = external_dependency_parsers_0.valueType(v); |
||
| 1221 | return type === margin_local_var_TYPES.LENGTH || type === margin_local_var_TYPES.PERCENT || type === margin_local_var_TYPES.INTEGER && (v === '0' || v === 0); |
||
| 1222 | }; |
||
| 1223 | |||
| 1224 | var margin_local_var_parser = function (v) { |
||
| 1225 | var V = v.toLowerCase(); |
||
| 1226 | |||
| 1227 | if (V === 'auto') { |
||
| 1228 | return V; |
||
| 1229 | } |
||
| 1230 | |||
| 1231 | return external_dependency_parsers_0.parseMeasurement(v); |
||
| 1232 | }; |
||
| 1233 | |||
| 1234 | var margin_local_var_mySetter = external_dependency_parsers_0.implicitSetter('margin', '', margin_local_var_isValid, margin_local_var_parser); |
||
| 1235 | var margin_local_var_myGlobal = external_dependency_parsers_0.implicitSetter('margin', '', function () { |
||
| 1236 | return true; |
||
| 1237 | }, function (v) { |
||
| 1238 | return v; |
||
| 1239 | }); |
||
| 1240 | margin_export_definition = { |
||
| 1241 | set: function (v) { |
||
| 1242 | if (typeof v === 'number') { |
||
| 1243 | v = String(v); |
||
| 1244 | } |
||
| 1245 | |||
| 1246 | if (typeof v !== 'string') { |
||
| 1247 | return; |
||
| 1248 | } |
||
| 1249 | |||
| 1250 | var V = v.toLowerCase(); |
||
| 1251 | |||
| 1252 | switch (V) { |
||
| 1253 | case 'inherit': |
||
| 1254 | case 'initial': |
||
| 1255 | case 'unset': |
||
| 1256 | case '': |
||
| 1257 | margin_local_var_myGlobal.call(this, V); |
||
| 1258 | break; |
||
| 1259 | |||
| 1260 | default: |
||
| 1261 | margin_local_var_mySetter.call(this, v); |
||
| 1262 | break; |
||
| 1263 | } |
||
| 1264 | }, |
||
| 1265 | get: function () { |
||
| 1266 | return this.getPropertyValue('margin'); |
||
| 1267 | }, |
||
| 1268 | enumerable: true, |
||
| 1269 | configurable: true |
||
| 1270 | }; |
||
| 1271 | margin_export_isValid = margin_local_var_isValid; |
||
| 1272 | margin_export_parser = margin_local_var_parser; |
||
| 1273 | var marginBottom_export_definition; |
||
| 1274 | marginBottom_export_definition = { |
||
| 1275 | set: external_dependency_parsers_0.subImplicitSetter('margin', 'bottom', { |
||
| 1276 | definition: margin_export_definition, |
||
| 1277 | isValid: margin_export_isValid, |
||
| 1278 | parser: margin_export_parser |
||
| 1279 | }.isValid, { |
||
| 1280 | definition: margin_export_definition, |
||
| 1281 | isValid: margin_export_isValid, |
||
| 1282 | parser: margin_export_parser |
||
| 1283 | }.parser), |
||
| 1284 | get: function () { |
||
| 1285 | return this.getPropertyValue('margin-bottom'); |
||
| 1286 | }, |
||
| 1287 | enumerable: true, |
||
| 1288 | configurable: true |
||
| 1289 | }; |
||
| 1290 | var marginLeft_export_definition; |
||
| 1291 | marginLeft_export_definition = { |
||
| 1292 | set: external_dependency_parsers_0.subImplicitSetter('margin', 'left', { |
||
| 1293 | definition: margin_export_definition, |
||
| 1294 | isValid: margin_export_isValid, |
||
| 1295 | parser: margin_export_parser |
||
| 1296 | }.isValid, { |
||
| 1297 | definition: margin_export_definition, |
||
| 1298 | isValid: margin_export_isValid, |
||
| 1299 | parser: margin_export_parser |
||
| 1300 | }.parser), |
||
| 1301 | get: function () { |
||
| 1302 | return this.getPropertyValue('margin-left'); |
||
| 1303 | }, |
||
| 1304 | enumerable: true, |
||
| 1305 | configurable: true |
||
| 1306 | }; |
||
| 1307 | var marginRight_export_definition; |
||
| 1308 | marginRight_export_definition = { |
||
| 1309 | set: external_dependency_parsers_0.subImplicitSetter('margin', 'right', { |
||
| 1310 | definition: margin_export_definition, |
||
| 1311 | isValid: margin_export_isValid, |
||
| 1312 | parser: margin_export_parser |
||
| 1313 | }.isValid, { |
||
| 1314 | definition: margin_export_definition, |
||
| 1315 | isValid: margin_export_isValid, |
||
| 1316 | parser: margin_export_parser |
||
| 1317 | }.parser), |
||
| 1318 | get: function () { |
||
| 1319 | return this.getPropertyValue('margin-right'); |
||
| 1320 | }, |
||
| 1321 | enumerable: true, |
||
| 1322 | configurable: true |
||
| 1323 | }; |
||
| 1324 | var marginTop_export_definition; |
||
| 1325 | marginTop_export_definition = { |
||
| 1326 | set: external_dependency_parsers_0.subImplicitSetter('margin', 'top', { |
||
| 1327 | definition: margin_export_definition, |
||
| 1328 | isValid: margin_export_isValid, |
||
| 1329 | parser: margin_export_parser |
||
| 1330 | }.isValid, { |
||
| 1331 | definition: margin_export_definition, |
||
| 1332 | isValid: margin_export_isValid, |
||
| 1333 | parser: margin_export_parser |
||
| 1334 | }.parser), |
||
| 1335 | get: function () { |
||
| 1336 | return this.getPropertyValue('margin-top'); |
||
| 1337 | }, |
||
| 1338 | enumerable: true, |
||
| 1339 | configurable: true |
||
| 1340 | }; |
||
| 1341 | var opacity_export_definition; |
||
| 1342 | opacity_export_definition = { |
||
| 1343 | set: function (v) { |
||
| 1344 | this._setProperty('opacity', external_dependency_parsers_0.parseNumber(v)); |
||
| 1345 | }, |
||
| 1346 | get: function () { |
||
| 1347 | return this.getPropertyValue('opacity'); |
||
| 1348 | }, |
||
| 1349 | enumerable: true, |
||
| 1350 | configurable: true |
||
| 1351 | }; |
||
| 1352 | var outlineColor_export_definition; |
||
| 1353 | outlineColor_export_definition = { |
||
| 1354 | set: function (v) { |
||
| 1355 | this._setProperty('outline-color', external_dependency_parsers_0.parseColor(v)); |
||
| 1356 | }, |
||
| 1357 | get: function () { |
||
| 1358 | return this.getPropertyValue('outline-color'); |
||
| 1359 | }, |
||
| 1360 | enumerable: true, |
||
| 1361 | configurable: true |
||
| 1362 | }; |
||
| 1363 | var padding_export_definition, padding_export_isValid, padding_export_parser; |
||
| 1364 | var padding_local_var_TYPES = external_dependency_parsers_0.TYPES; |
||
| 1365 | |||
| 1366 | var padding_local_var_isValid = function (v) { |
||
| 1367 | var type = external_dependency_parsers_0.valueType(v); |
||
| 1368 | return type === padding_local_var_TYPES.LENGTH || type === padding_local_var_TYPES.PERCENT || type === padding_local_var_TYPES.INTEGER && (v === '0' || v === 0); |
||
| 1369 | }; |
||
| 1370 | |||
| 1371 | var padding_local_var_parser = function (v) { |
||
| 1372 | return external_dependency_parsers_0.parseMeasurement(v); |
||
| 1373 | }; |
||
| 1374 | |||
| 1375 | var padding_local_var_mySetter = external_dependency_parsers_0.implicitSetter('padding', '', padding_local_var_isValid, padding_local_var_parser); |
||
| 1376 | var padding_local_var_myGlobal = external_dependency_parsers_0.implicitSetter('padding', '', function () { |
||
| 1377 | return true; |
||
| 1378 | }, function (v) { |
||
| 1379 | return v; |
||
| 1380 | }); |
||
| 1381 | padding_export_definition = { |
||
| 1382 | set: function (v) { |
||
| 1383 | if (typeof v === 'number') { |
||
| 1384 | v = String(v); |
||
| 1385 | } |
||
| 1386 | |||
| 1387 | if (typeof v !== 'string') { |
||
| 1388 | return; |
||
| 1389 | } |
||
| 1390 | |||
| 1391 | var V = v.toLowerCase(); |
||
| 1392 | |||
| 1393 | switch (V) { |
||
| 1394 | case 'inherit': |
||
| 1395 | case 'initial': |
||
| 1396 | case 'unset': |
||
| 1397 | case '': |
||
| 1398 | padding_local_var_myGlobal.call(this, V); |
||
| 1399 | break; |
||
| 1400 | |||
| 1401 | default: |
||
| 1402 | padding_local_var_mySetter.call(this, v); |
||
| 1403 | break; |
||
| 1404 | } |
||
| 1405 | }, |
||
| 1406 | get: function () { |
||
| 1407 | return this.getPropertyValue('padding'); |
||
| 1408 | }, |
||
| 1409 | enumerable: true, |
||
| 1410 | configurable: true |
||
| 1411 | }; |
||
| 1412 | padding_export_isValid = padding_local_var_isValid; |
||
| 1413 | padding_export_parser = padding_local_var_parser; |
||
| 1414 | var paddingBottom_export_definition; |
||
| 1415 | paddingBottom_export_definition = { |
||
| 1416 | set: external_dependency_parsers_0.subImplicitSetter('padding', 'bottom', { |
||
| 1417 | definition: padding_export_definition, |
||
| 1418 | isValid: padding_export_isValid, |
||
| 1419 | parser: padding_export_parser |
||
| 1420 | }.isValid, { |
||
| 1421 | definition: padding_export_definition, |
||
| 1422 | isValid: padding_export_isValid, |
||
| 1423 | parser: padding_export_parser |
||
| 1424 | }.parser), |
||
| 1425 | get: function () { |
||
| 1426 | return this.getPropertyValue('padding-bottom'); |
||
| 1427 | }, |
||
| 1428 | enumerable: true, |
||
| 1429 | configurable: true |
||
| 1430 | }; |
||
| 1431 | var paddingLeft_export_definition; |
||
| 1432 | paddingLeft_export_definition = { |
||
| 1433 | set: external_dependency_parsers_0.subImplicitSetter('padding', 'left', { |
||
| 1434 | definition: padding_export_definition, |
||
| 1435 | isValid: padding_export_isValid, |
||
| 1436 | parser: padding_export_parser |
||
| 1437 | }.isValid, { |
||
| 1438 | definition: padding_export_definition, |
||
| 1439 | isValid: padding_export_isValid, |
||
| 1440 | parser: padding_export_parser |
||
| 1441 | }.parser), |
||
| 1442 | get: function () { |
||
| 1443 | return this.getPropertyValue('padding-left'); |
||
| 1444 | }, |
||
| 1445 | enumerable: true, |
||
| 1446 | configurable: true |
||
| 1447 | }; |
||
| 1448 | var paddingRight_export_definition; |
||
| 1449 | paddingRight_export_definition = { |
||
| 1450 | set: external_dependency_parsers_0.subImplicitSetter('padding', 'right', { |
||
| 1451 | definition: padding_export_definition, |
||
| 1452 | isValid: padding_export_isValid, |
||
| 1453 | parser: padding_export_parser |
||
| 1454 | }.isValid, { |
||
| 1455 | definition: padding_export_definition, |
||
| 1456 | isValid: padding_export_isValid, |
||
| 1457 | parser: padding_export_parser |
||
| 1458 | }.parser), |
||
| 1459 | get: function () { |
||
| 1460 | return this.getPropertyValue('padding-right'); |
||
| 1461 | }, |
||
| 1462 | enumerable: true, |
||
| 1463 | configurable: true |
||
| 1464 | }; |
||
| 1465 | var paddingTop_export_definition; |
||
| 1466 | paddingTop_export_definition = { |
||
| 1467 | set: external_dependency_parsers_0.subImplicitSetter('padding', 'top', { |
||
| 1468 | definition: padding_export_definition, |
||
| 1469 | isValid: padding_export_isValid, |
||
| 1470 | parser: padding_export_parser |
||
| 1471 | }.isValid, { |
||
| 1472 | definition: padding_export_definition, |
||
| 1473 | isValid: padding_export_isValid, |
||
| 1474 | parser: padding_export_parser |
||
| 1475 | }.parser), |
||
| 1476 | get: function () { |
||
| 1477 | return this.getPropertyValue('padding-top'); |
||
| 1478 | }, |
||
| 1479 | enumerable: true, |
||
| 1480 | configurable: true |
||
| 1481 | }; |
||
| 1482 | var right_export_definition; |
||
| 1483 | right_export_definition = { |
||
| 1484 | set: function (v) { |
||
| 1485 | this._setProperty('right', external_dependency_parsers_0.parseMeasurement(v)); |
||
| 1486 | }, |
||
| 1487 | get: function () { |
||
| 1488 | return this.getPropertyValue('right'); |
||
| 1489 | }, |
||
| 1490 | enumerable: true, |
||
| 1491 | configurable: true |
||
| 1492 | }; |
||
| 1493 | var stopColor_export_definition; |
||
| 1494 | stopColor_export_definition = { |
||
| 1495 | set: function (v) { |
||
| 1496 | this._setProperty('stop-color', external_dependency_parsers_0.parseColor(v)); |
||
| 1497 | }, |
||
| 1498 | get: function () { |
||
| 1499 | return this.getPropertyValue('stop-color'); |
||
| 1500 | }, |
||
| 1501 | enumerable: true, |
||
| 1502 | configurable: true |
||
| 1503 | }; |
||
| 1504 | var textLineThroughColor_export_definition; |
||
| 1505 | textLineThroughColor_export_definition = { |
||
| 1506 | set: function (v) { |
||
| 1507 | this._setProperty('text-line-through-color', external_dependency_parsers_0.parseColor(v)); |
||
| 1508 | }, |
||
| 1509 | get: function () { |
||
| 1510 | return this.getPropertyValue('text-line-through-color'); |
||
| 1511 | }, |
||
| 1512 | enumerable: true, |
||
| 1513 | configurable: true |
||
| 1514 | }; |
||
| 1515 | var textOverlineColor_export_definition; |
||
| 1516 | textOverlineColor_export_definition = { |
||
| 1517 | set: function (v) { |
||
| 1518 | this._setProperty('text-overline-color', external_dependency_parsers_0.parseColor(v)); |
||
| 1519 | }, |
||
| 1520 | get: function () { |
||
| 1521 | return this.getPropertyValue('text-overline-color'); |
||
| 1522 | }, |
||
| 1523 | enumerable: true, |
||
| 1524 | configurable: true |
||
| 1525 | }; |
||
| 1526 | var textUnderlineColor_export_definition; |
||
| 1527 | textUnderlineColor_export_definition = { |
||
| 1528 | set: function (v) { |
||
| 1529 | this._setProperty('text-underline-color', external_dependency_parsers_0.parseColor(v)); |
||
| 1530 | }, |
||
| 1531 | get: function () { |
||
| 1532 | return this.getPropertyValue('text-underline-color'); |
||
| 1533 | }, |
||
| 1534 | enumerable: true, |
||
| 1535 | configurable: true |
||
| 1536 | }; |
||
| 1537 | var top_export_definition; |
||
| 1538 | top_export_definition = { |
||
| 1539 | set: function (v) { |
||
| 1540 | this._setProperty('top', external_dependency_parsers_0.parseMeasurement(v)); |
||
| 1541 | }, |
||
| 1542 | get: function () { |
||
| 1543 | return this.getPropertyValue('top'); |
||
| 1544 | }, |
||
| 1545 | enumerable: true, |
||
| 1546 | configurable: true |
||
| 1547 | }; |
||
| 1548 | var webkitBorderAfterColor_export_definition; |
||
| 1549 | webkitBorderAfterColor_export_definition = { |
||
| 1550 | set: function (v) { |
||
| 1551 | this._setProperty('-webkit-border-after-color', external_dependency_parsers_0.parseColor(v)); |
||
| 1552 | }, |
||
| 1553 | get: function () { |
||
| 1554 | return this.getPropertyValue('-webkit-border-after-color'); |
||
| 1555 | }, |
||
| 1556 | enumerable: true, |
||
| 1557 | configurable: true |
||
| 1558 | }; |
||
| 1559 | var webkitBorderBeforeColor_export_definition; |
||
| 1560 | webkitBorderBeforeColor_export_definition = { |
||
| 1561 | set: function (v) { |
||
| 1562 | this._setProperty('-webkit-border-before-color', external_dependency_parsers_0.parseColor(v)); |
||
| 1563 | }, |
||
| 1564 | get: function () { |
||
| 1565 | return this.getPropertyValue('-webkit-border-before-color'); |
||
| 1566 | }, |
||
| 1567 | enumerable: true, |
||
| 1568 | configurable: true |
||
| 1569 | }; |
||
| 1570 | var webkitBorderEndColor_export_definition; |
||
| 1571 | webkitBorderEndColor_export_definition = { |
||
| 1572 | set: function (v) { |
||
| 1573 | this._setProperty('-webkit-border-end-color', external_dependency_parsers_0.parseColor(v)); |
||
| 1574 | }, |
||
| 1575 | get: function () { |
||
| 1576 | return this.getPropertyValue('-webkit-border-end-color'); |
||
| 1577 | }, |
||
| 1578 | enumerable: true, |
||
| 1579 | configurable: true |
||
| 1580 | }; |
||
| 1581 | var webkitBorderStartColor_export_definition; |
||
| 1582 | webkitBorderStartColor_export_definition = { |
||
| 1583 | set: function (v) { |
||
| 1584 | this._setProperty('-webkit-border-start-color', external_dependency_parsers_0.parseColor(v)); |
||
| 1585 | }, |
||
| 1586 | get: function () { |
||
| 1587 | return this.getPropertyValue('-webkit-border-start-color'); |
||
| 1588 | }, |
||
| 1589 | enumerable: true, |
||
| 1590 | configurable: true |
||
| 1591 | }; |
||
| 1592 | var webkitColumnRuleColor_export_definition; |
||
| 1593 | webkitColumnRuleColor_export_definition = { |
||
| 1594 | set: function (v) { |
||
| 1595 | this._setProperty('-webkit-column-rule-color', external_dependency_parsers_0.parseColor(v)); |
||
| 1596 | }, |
||
| 1597 | get: function () { |
||
| 1598 | return this.getPropertyValue('-webkit-column-rule-color'); |
||
| 1599 | }, |
||
| 1600 | enumerable: true, |
||
| 1601 | configurable: true |
||
| 1602 | }; |
||
| 1603 | var webkitMatchNearestMailBlockquoteColor_export_definition; |
||
| 1604 | webkitMatchNearestMailBlockquoteColor_export_definition = { |
||
| 1605 | set: function (v) { |
||
| 1606 | this._setProperty('-webkit-match-nearest-mail-blockquote-color', external_dependency_parsers_0.parseColor(v)); |
||
| 1607 | }, |
||
| 1608 | get: function () { |
||
| 1609 | return this.getPropertyValue('-webkit-match-nearest-mail-blockquote-color'); |
||
| 1610 | }, |
||
| 1611 | enumerable: true, |
||
| 1612 | configurable: true |
||
| 1613 | }; |
||
| 1614 | var webkitTapHighlightColor_export_definition; |
||
| 1615 | webkitTapHighlightColor_export_definition = { |
||
| 1616 | set: function (v) { |
||
| 1617 | this._setProperty('-webkit-tap-highlight-color', external_dependency_parsers_0.parseColor(v)); |
||
| 1618 | }, |
||
| 1619 | get: function () { |
||
| 1620 | return this.getPropertyValue('-webkit-tap-highlight-color'); |
||
| 1621 | }, |
||
| 1622 | enumerable: true, |
||
| 1623 | configurable: true |
||
| 1624 | }; |
||
| 1625 | var webkitTextEmphasisColor_export_definition; |
||
| 1626 | webkitTextEmphasisColor_export_definition = { |
||
| 1627 | set: function (v) { |
||
| 1628 | this._setProperty('-webkit-text-emphasis-color', external_dependency_parsers_0.parseColor(v)); |
||
| 1629 | }, |
||
| 1630 | get: function () { |
||
| 1631 | return this.getPropertyValue('-webkit-text-emphasis-color'); |
||
| 1632 | }, |
||
| 1633 | enumerable: true, |
||
| 1634 | configurable: true |
||
| 1635 | }; |
||
| 1636 | var webkitTextFillColor_export_definition; |
||
| 1637 | webkitTextFillColor_export_definition = { |
||
| 1638 | set: function (v) { |
||
| 1639 | this._setProperty('-webkit-text-fill-color', external_dependency_parsers_0.parseColor(v)); |
||
| 1640 | }, |
||
| 1641 | get: function () { |
||
| 1642 | return this.getPropertyValue('-webkit-text-fill-color'); |
||
| 1643 | }, |
||
| 1644 | enumerable: true, |
||
| 1645 | configurable: true |
||
| 1646 | }; |
||
| 1647 | var webkitTextStrokeColor_export_definition; |
||
| 1648 | webkitTextStrokeColor_export_definition = { |
||
| 1649 | set: function (v) { |
||
| 1650 | this._setProperty('-webkit-text-stroke-color', external_dependency_parsers_0.parseColor(v)); |
||
| 1651 | }, |
||
| 1652 | get: function () { |
||
| 1653 | return this.getPropertyValue('-webkit-text-stroke-color'); |
||
| 1654 | }, |
||
| 1655 | enumerable: true, |
||
| 1656 | configurable: true |
||
| 1657 | }; |
||
| 1658 | var width_export_definition; |
||
| 1659 | |||
| 1660 | function width_local_fn_parse(v) { |
||
| 1661 | if (String(v).toLowerCase() === 'auto') { |
||
| 1662 | return 'auto'; |
||
| 1663 | } |
||
| 1664 | |||
| 1665 | if (String(v).toLowerCase() === 'inherit') { |
||
| 1666 | return 'inherit'; |
||
| 1667 | } |
||
| 1668 | |||
| 1669 | return external_dependency_parsers_0.parseMeasurement(v); |
||
| 1670 | } |
||
| 1671 | |||
| 1672 | width_export_definition = { |
||
| 1673 | set: function (v) { |
||
| 1674 | this._setProperty('width', width_local_fn_parse(v)); |
||
| 1675 | }, |
||
| 1676 | get: function () { |
||
| 1677 | return this.getPropertyValue('width'); |
||
| 1678 | }, |
||
| 1679 | enumerable: true, |
||
| 1680 | configurable: true |
||
| 1681 | }; |
||
| 1682 | |||
| 1683 | module.exports = function (prototype) { |
||
| 1684 | Object.defineProperties(prototype, { |
||
| 1685 | azimuth: azimuth_export_definition, |
||
| 1686 | backgroundColor: backgroundColor_export_definition, |
||
| 1687 | "background-color": backgroundColor_export_definition, |
||
| 1688 | backgroundImage: backgroundImage_export_definition, |
||
| 1689 | "background-image": backgroundImage_export_definition, |
||
| 1690 | backgroundRepeat: backgroundRepeat_export_definition, |
||
| 1691 | "background-repeat": backgroundRepeat_export_definition, |
||
| 1692 | backgroundAttachment: backgroundAttachment_export_definition, |
||
| 1693 | "background-attachment": backgroundAttachment_export_definition, |
||
| 1694 | backgroundPosition: backgroundPosition_export_definition, |
||
| 1695 | "background-position": backgroundPosition_export_definition, |
||
| 1696 | background: background_export_definition, |
||
| 1697 | borderWidth: borderWidth_export_definition, |
||
| 1698 | "border-width": borderWidth_export_definition, |
||
| 1699 | borderStyle: borderStyle_export_definition, |
||
| 1700 | "border-style": borderStyle_export_definition, |
||
| 1701 | borderColor: borderColor_export_definition, |
||
| 1702 | "border-color": borderColor_export_definition, |
||
| 1703 | border: border_export_definition, |
||
| 1704 | borderBottomWidth: borderBottomWidth_export_definition, |
||
| 1705 | "border-bottom-width": borderBottomWidth_export_definition, |
||
| 1706 | borderBottomStyle: borderBottomStyle_export_definition, |
||
| 1707 | "border-bottom-style": borderBottomStyle_export_definition, |
||
| 1708 | borderBottomColor: borderBottomColor_export_definition, |
||
| 1709 | "border-bottom-color": borderBottomColor_export_definition, |
||
| 1710 | borderBottom: borderBottom_export_definition, |
||
| 1711 | "border-bottom": borderBottom_export_definition, |
||
| 1712 | borderCollapse: borderCollapse_export_definition, |
||
| 1713 | "border-collapse": borderCollapse_export_definition, |
||
| 1714 | borderLeftWidth: borderLeftWidth_export_definition, |
||
| 1715 | "border-left-width": borderLeftWidth_export_definition, |
||
| 1716 | borderLeftStyle: borderLeftStyle_export_definition, |
||
| 1717 | "border-left-style": borderLeftStyle_export_definition, |
||
| 1718 | borderLeftColor: borderLeftColor_export_definition, |
||
| 1719 | "border-left-color": borderLeftColor_export_definition, |
||
| 1720 | borderLeft: borderLeft_export_definition, |
||
| 1721 | "border-left": borderLeft_export_definition, |
||
| 1722 | borderRightWidth: borderRightWidth_export_definition, |
||
| 1723 | "border-right-width": borderRightWidth_export_definition, |
||
| 1724 | borderRightStyle: borderRightStyle_export_definition, |
||
| 1725 | "border-right-style": borderRightStyle_export_definition, |
||
| 1726 | borderRightColor: borderRightColor_export_definition, |
||
| 1727 | "border-right-color": borderRightColor_export_definition, |
||
| 1728 | borderRight: borderRight_export_definition, |
||
| 1729 | "border-right": borderRight_export_definition, |
||
| 1730 | borderSpacing: borderSpacing_export_definition, |
||
| 1731 | "border-spacing": borderSpacing_export_definition, |
||
| 1732 | borderTopWidth: borderTopWidth_export_definition, |
||
| 1733 | "border-top-width": borderTopWidth_export_definition, |
||
| 1734 | borderTopStyle: borderTopStyle_export_definition, |
||
| 1735 | "border-top-style": borderTopStyle_export_definition, |
||
| 1736 | borderTopColor: borderTopColor_export_definition, |
||
| 1737 | "border-top-color": borderTopColor_export_definition, |
||
| 1738 | borderTop: borderTop_export_definition, |
||
| 1739 | "border-top": borderTop_export_definition, |
||
| 1740 | bottom: bottom_export_definition, |
||
| 1741 | clear: clear_export_definition, |
||
| 1742 | clip: clip_export_definition, |
||
| 1743 | color: color_export_definition, |
||
| 1744 | cssFloat: cssFloat_export_definition, |
||
| 1745 | "css-float": cssFloat_export_definition, |
||
| 1746 | flexGrow: flexGrow_export_definition, |
||
| 1747 | "flex-grow": flexGrow_export_definition, |
||
| 1748 | flexShrink: flexShrink_export_definition, |
||
| 1749 | "flex-shrink": flexShrink_export_definition, |
||
| 1750 | flexBasis: flexBasis_export_definition, |
||
| 1751 | "flex-basis": flexBasis_export_definition, |
||
| 1752 | flex: flex_export_definition, |
||
| 1753 | float: float_export_definition, |
||
| 1754 | floodColor: floodColor_export_definition, |
||
| 1755 | "flood-color": floodColor_export_definition, |
||
| 1756 | fontFamily: fontFamily_export_definition, |
||
| 1757 | "font-family": fontFamily_export_definition, |
||
| 1758 | fontSize: fontSize_export_definition, |
||
| 1759 | "font-size": fontSize_export_definition, |
||
| 1760 | fontStyle: fontStyle_export_definition, |
||
| 1761 | "font-style": fontStyle_export_definition, |
||
| 1762 | fontVariant: fontVariant_export_definition, |
||
| 1763 | "font-variant": fontVariant_export_definition, |
||
| 1764 | fontWeight: fontWeight_export_definition, |
||
| 1765 | "font-weight": fontWeight_export_definition, |
||
| 1766 | lineHeight: lineHeight_export_definition, |
||
| 1767 | "line-height": lineHeight_export_definition, |
||
| 1768 | font: font_export_definition, |
||
| 1769 | height: height_export_definition, |
||
| 1770 | left: left_export_definition, |
||
| 1771 | lightingColor: lightingColor_export_definition, |
||
| 1772 | "lighting-color": lightingColor_export_definition, |
||
| 1773 | margin: margin_export_definition, |
||
| 1774 | marginBottom: marginBottom_export_definition, |
||
| 1775 | "margin-bottom": marginBottom_export_definition, |
||
| 1776 | marginLeft: marginLeft_export_definition, |
||
| 1777 | "margin-left": marginLeft_export_definition, |
||
| 1778 | marginRight: marginRight_export_definition, |
||
| 1779 | "margin-right": marginRight_export_definition, |
||
| 1780 | marginTop: marginTop_export_definition, |
||
| 1781 | "margin-top": marginTop_export_definition, |
||
| 1782 | opacity: opacity_export_definition, |
||
| 1783 | outlineColor: outlineColor_export_definition, |
||
| 1784 | "outline-color": outlineColor_export_definition, |
||
| 1785 | padding: padding_export_definition, |
||
| 1786 | paddingBottom: paddingBottom_export_definition, |
||
| 1787 | "padding-bottom": paddingBottom_export_definition, |
||
| 1788 | paddingLeft: paddingLeft_export_definition, |
||
| 1789 | "padding-left": paddingLeft_export_definition, |
||
| 1790 | paddingRight: paddingRight_export_definition, |
||
| 1791 | "padding-right": paddingRight_export_definition, |
||
| 1792 | paddingTop: paddingTop_export_definition, |
||
| 1793 | "padding-top": paddingTop_export_definition, |
||
| 1794 | right: right_export_definition, |
||
| 1795 | stopColor: stopColor_export_definition, |
||
| 1796 | "stop-color": stopColor_export_definition, |
||
| 1797 | textLineThroughColor: textLineThroughColor_export_definition, |
||
| 1798 | "text-line-through-color": textLineThroughColor_export_definition, |
||
| 1799 | textOverlineColor: textOverlineColor_export_definition, |
||
| 1800 | "text-overline-color": textOverlineColor_export_definition, |
||
| 1801 | textUnderlineColor: textUnderlineColor_export_definition, |
||
| 1802 | "text-underline-color": textUnderlineColor_export_definition, |
||
| 1803 | top: top_export_definition, |
||
| 1804 | webkitBorderAfterColor: webkitBorderAfterColor_export_definition, |
||
| 1805 | "webkit-border-after-color": webkitBorderAfterColor_export_definition, |
||
| 1806 | webkitBorderBeforeColor: webkitBorderBeforeColor_export_definition, |
||
| 1807 | "webkit-border-before-color": webkitBorderBeforeColor_export_definition, |
||
| 1808 | webkitBorderEndColor: webkitBorderEndColor_export_definition, |
||
| 1809 | "webkit-border-end-color": webkitBorderEndColor_export_definition, |
||
| 1810 | webkitBorderStartColor: webkitBorderStartColor_export_definition, |
||
| 1811 | "webkit-border-start-color": webkitBorderStartColor_export_definition, |
||
| 1812 | webkitColumnRuleColor: webkitColumnRuleColor_export_definition, |
||
| 1813 | "webkit-column-rule-color": webkitColumnRuleColor_export_definition, |
||
| 1814 | webkitMatchNearestMailBlockquoteColor: webkitMatchNearestMailBlockquoteColor_export_definition, |
||
| 1815 | "webkit-match-nearest-mail-blockquote-color": webkitMatchNearestMailBlockquoteColor_export_definition, |
||
| 1816 | webkitTapHighlightColor: webkitTapHighlightColor_export_definition, |
||
| 1817 | "webkit-tap-highlight-color": webkitTapHighlightColor_export_definition, |
||
| 1818 | webkitTextEmphasisColor: webkitTextEmphasisColor_export_definition, |
||
| 1819 | "webkit-text-emphasis-color": webkitTextEmphasisColor_export_definition, |
||
| 1820 | webkitTextFillColor: webkitTextFillColor_export_definition, |
||
| 1821 | "webkit-text-fill-color": webkitTextFillColor_export_definition, |
||
| 1822 | webkitTextStrokeColor: webkitTextStrokeColor_export_definition, |
||
| 1823 | "webkit-text-stroke-color": webkitTextStrokeColor_export_definition, |
||
| 1824 | width: width_export_definition |
||
| 1825 | }); |
||
| 1826 | }; |
||
| 1827 |