Element.js 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. "use strict";
  2. var __assign = (this && this.__assign) || function () {
  3. __assign = Object.assign || function(t) {
  4. for (var s, i = 1, n = arguments.length; i < n; i++) {
  5. s = arguments[i];
  6. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
  7. t[p] = s[p];
  8. }
  9. return t;
  10. };
  11. return __assign.apply(this, arguments);
  12. };
  13. var __read = (this && this.__read) || function (o, n) {
  14. var m = typeof Symbol === "function" && o[Symbol.iterator];
  15. if (!m) return o;
  16. var i = m.call(o), r, ar = [], e;
  17. try {
  18. while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
  19. }
  20. catch (error) { e = { error: error }; }
  21. finally {
  22. try {
  23. if (r && !r.done && (m = i["return"])) m.call(i);
  24. }
  25. finally { if (e) throw e.error; }
  26. }
  27. return ar;
  28. };
  29. var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
  30. if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
  31. if (ar || !(i in from)) {
  32. if (!ar) ar = Array.prototype.slice.call(from, 0, i);
  33. ar[i] = from[i];
  34. }
  35. }
  36. return to.concat(ar || Array.prototype.slice.call(from));
  37. };
  38. var __values = (this && this.__values) || function(o) {
  39. var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
  40. if (m) return m.call(o);
  41. if (o && typeof o.length === "number") return {
  42. next: function () {
  43. if (o && i >= o.length) o = void 0;
  44. return { value: o && o[i++], done: !o };
  45. }
  46. };
  47. throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
  48. };
  49. Object.defineProperty(exports, "__esModule", { value: true });
  50. exports.LiteElement = void 0;
  51. var LiteElement = (function () {
  52. function LiteElement(kind, attributes, children) {
  53. var e_1, _a;
  54. if (attributes === void 0) { attributes = {}; }
  55. if (children === void 0) { children = []; }
  56. this.kind = kind;
  57. this.attributes = __assign({}, attributes);
  58. this.children = __spreadArray([], __read(children), false);
  59. try {
  60. for (var _b = __values(this.children), _c = _b.next(); !_c.done; _c = _b.next()) {
  61. var child = _c.value;
  62. child.parent = this;
  63. }
  64. }
  65. catch (e_1_1) { e_1 = { error: e_1_1 }; }
  66. finally {
  67. try {
  68. if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
  69. }
  70. finally { if (e_1) throw e_1.error; }
  71. }
  72. this.styles = null;
  73. }
  74. return LiteElement;
  75. }());
  76. exports.LiteElement = LiteElement;
  77. //# sourceMappingURL=Element.js.map