Nav apraksta

style-inject.es-7b2c2b1b.js 5.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. 'use strict';
  2. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  3. function unwrapExports (x) {
  4. return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
  5. }
  6. function createCommonjsModule(fn, module) {
  7. return module = { exports: {} }, fn(module, module.exports), module.exports;
  8. }
  9. function getCjsExportFromNamespace (n) {
  10. return n && n['default'] || n;
  11. }
  12. function _classCallCheck(instance, Constructor) {
  13. if (!(instance instanceof Constructor)) {
  14. throw new TypeError("Cannot call a class as a function");
  15. }
  16. }
  17. function _defineProperties(target, props) {
  18. for (var i = 0; i < props.length; i++) {
  19. var descriptor = props[i];
  20. descriptor.enumerable = descriptor.enumerable || false;
  21. descriptor.configurable = true;
  22. if ("value" in descriptor) descriptor.writable = true;
  23. Object.defineProperty(target, descriptor.key, descriptor);
  24. }
  25. }
  26. function _createClass(Constructor, protoProps, staticProps) {
  27. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  28. if (staticProps) _defineProperties(Constructor, staticProps);
  29. return Constructor;
  30. }
  31. function _defineProperty(obj, key, value) {
  32. if (key in obj) {
  33. Object.defineProperty(obj, key, {
  34. value: value,
  35. enumerable: true,
  36. configurable: true,
  37. writable: true
  38. });
  39. } else {
  40. obj[key] = value;
  41. }
  42. return obj;
  43. }
  44. function ownKeys(object, enumerableOnly) {
  45. var keys = Object.keys(object);
  46. if (Object.getOwnPropertySymbols) {
  47. var symbols = Object.getOwnPropertySymbols(object);
  48. if (enumerableOnly) symbols = symbols.filter(function (sym) {
  49. return Object.getOwnPropertyDescriptor(object, sym).enumerable;
  50. });
  51. keys.push.apply(keys, symbols);
  52. }
  53. return keys;
  54. }
  55. function _objectSpread2(target) {
  56. for (var i = 1; i < arguments.length; i++) {
  57. var source = arguments[i] != null ? arguments[i] : {};
  58. if (i % 2) {
  59. ownKeys(Object(source), true).forEach(function (key) {
  60. _defineProperty(target, key, source[key]);
  61. });
  62. } else if (Object.getOwnPropertyDescriptors) {
  63. Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
  64. } else {
  65. ownKeys(Object(source)).forEach(function (key) {
  66. Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
  67. });
  68. }
  69. }
  70. return target;
  71. }
  72. function _inherits(subClass, superClass) {
  73. if (typeof superClass !== "function" && superClass !== null) {
  74. throw new TypeError("Super expression must either be null or a function");
  75. }
  76. subClass.prototype = Object.create(superClass && superClass.prototype, {
  77. constructor: {
  78. value: subClass,
  79. writable: true,
  80. configurable: true
  81. }
  82. });
  83. if (superClass) _setPrototypeOf(subClass, superClass);
  84. }
  85. function _getPrototypeOf(o) {
  86. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  87. return o.__proto__ || Object.getPrototypeOf(o);
  88. };
  89. return _getPrototypeOf(o);
  90. }
  91. function _setPrototypeOf(o, p) {
  92. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  93. o.__proto__ = p;
  94. return o;
  95. };
  96. return _setPrototypeOf(o, p);
  97. }
  98. function _assertThisInitialized(self) {
  99. if (self === void 0) {
  100. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  101. }
  102. return self;
  103. }
  104. function _possibleConstructorReturn(self, call) {
  105. if (call && (typeof call === "object" || typeof call === "function")) {
  106. return call;
  107. }
  108. return _assertThisInitialized(self);
  109. }
  110. function _slicedToArray(arr, i) {
  111. return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
  112. }
  113. function _arrayWithHoles(arr) {
  114. if (Array.isArray(arr)) return arr;
  115. }
  116. function _iterableToArrayLimit(arr, i) {
  117. if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
  118. return;
  119. }
  120. var _arr = [];
  121. var _n = true;
  122. var _d = false;
  123. var _e = undefined;
  124. try {
  125. for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
  126. _arr.push(_s.value);
  127. if (i && _arr.length === i) break;
  128. }
  129. } catch (err) {
  130. _d = true;
  131. _e = err;
  132. } finally {
  133. try {
  134. if (!_n && _i["return"] != null) _i["return"]();
  135. } finally {
  136. if (_d) throw _e;
  137. }
  138. }
  139. return _arr;
  140. }
  141. function _nonIterableRest() {
  142. throw new TypeError("Invalid attempt to destructure non-iterable instance");
  143. }
  144. function styleInject(css, ref) {
  145. if ( ref === void 0 ) ref = {};
  146. var insertAt = ref.insertAt;
  147. if (!css || typeof document === 'undefined') { return; }
  148. var head = document.head || document.getElementsByTagName('head')[0];
  149. var style = document.createElement('style');
  150. style.type = 'text/css';
  151. if (insertAt === 'top') {
  152. if (head.firstChild) {
  153. head.insertBefore(style, head.firstChild);
  154. } else {
  155. head.appendChild(style);
  156. }
  157. } else {
  158. head.appendChild(style);
  159. }
  160. if (style.styleSheet) {
  161. style.styleSheet.cssText = css;
  162. } else {
  163. style.appendChild(document.createTextNode(css));
  164. }
  165. }
  166. exports._assertThisInitialized = _assertThisInitialized;
  167. exports._classCallCheck = _classCallCheck;
  168. exports._createClass = _createClass;
  169. exports._defineProperty = _defineProperty;
  170. exports._getPrototypeOf = _getPrototypeOf;
  171. exports._inherits = _inherits;
  172. exports._objectSpread2 = _objectSpread2;
  173. exports._possibleConstructorReturn = _possibleConstructorReturn;
  174. exports._slicedToArray = _slicedToArray;
  175. exports.commonjsGlobal = commonjsGlobal;
  176. exports.createCommonjsModule = createCommonjsModule;
  177. exports.getCjsExportFromNamespace = getCjsExportFromNamespace;
  178. exports.styleInject = styleInject;
  179. exports.unwrapExports = unwrapExports;
  180. //# sourceMappingURL=style-inject.es-7b2c2b1b.js.map