@thecb/components 11.0.2-beta.0 → 11.0.2

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.
package/dist/index.cjs.js CHANGED
@@ -21083,6 +21083,7 @@ function _wrapNativeSuper(Class) {
21083
21083
  }
21084
21084
 
21085
21085
  // based on https://github.com/styled-components/styled-components/blob/fcf6f3804c57a14dd7984dfab7bc06ee2edca044/src/utils/error.js
21086
+
21086
21087
  /**
21087
21088
  * Parse errors.md and turn it into a simple hash of code: message
21088
21089
  * @private
@@ -21167,71 +21168,84 @@ var ERRORS = {
21167
21168
  "77": "remToPx expects a value in \"rem\" but you provided it in \"%s\".\n\n",
21168
21169
  "78": "base must be set in \"px\" or \"%\" but you set it in \"%s\".\n"
21169
21170
  };
21170
-
21171
21171
  /**
21172
21172
  * super basic version of sprintf
21173
21173
  * @private
21174
21174
  */
21175
+
21175
21176
  function format() {
21176
21177
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
21177
21178
  args[_key] = arguments[_key];
21178
21179
  }
21180
+
21179
21181
  var a = args[0];
21180
21182
  var b = [];
21181
21183
  var c;
21184
+
21182
21185
  for (c = 1; c < args.length; c += 1) {
21183
21186
  b.push(args[c]);
21184
21187
  }
21188
+
21185
21189
  b.forEach(function (d) {
21186
21190
  a = a.replace(/%[a-z]/, d);
21187
21191
  });
21188
21192
  return a;
21189
21193
  }
21190
-
21191
21194
  /**
21192
21195
  * Create an error file out of errors.md for development and a simple web link to the full errors
21193
21196
  * in production mode.
21194
21197
  * @private
21195
21198
  */
21199
+
21200
+
21196
21201
  var PolishedError = /*#__PURE__*/function (_Error) {
21197
21202
  _inheritsLoose(PolishedError, _Error);
21203
+
21198
21204
  function PolishedError(code) {
21199
21205
  var _this;
21206
+
21200
21207
  if (process.env.NODE_ENV === 'production') {
21201
21208
  _this = _Error.call(this, "An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#" + code + " for more information.") || this;
21202
21209
  } else {
21203
21210
  for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
21204
21211
  args[_key2 - 1] = arguments[_key2];
21205
21212
  }
21213
+
21206
21214
  _this = _Error.call(this, format.apply(void 0, [ERRORS[code]].concat(args))) || this;
21207
21215
  }
21216
+
21208
21217
  return _assertThisInitialized(_this);
21209
21218
  }
21219
+
21210
21220
  return PolishedError;
21211
21221
  }( /*#__PURE__*/_wrapNativeSuper(Error));
21212
21222
 
21213
21223
  function colorToInt(color) {
21214
21224
  return Math.round(color * 255);
21215
21225
  }
21226
+
21216
21227
  function convertToInt(red, green, blue) {
21217
21228
  return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue);
21218
21229
  }
21230
+
21219
21231
  function hslToRgb(hue, saturation, lightness, convert) {
21220
21232
  if (convert === void 0) {
21221
21233
  convert = convertToInt;
21222
21234
  }
21235
+
21223
21236
  if (saturation === 0) {
21224
21237
  // achromatic
21225
21238
  return convert(lightness, lightness, lightness);
21226
- }
21239
+ } // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV
21240
+
21227
21241
 
21228
- // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV
21229
21242
  var huePrime = (hue % 360 + 360) % 360 / 60;
21230
21243
  var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;
21231
21244
  var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
21232
21245
  var red = 0;
21233
21246
  var green = 0;
21234
21247
  var blue = 0;
21248
+
21235
21249
  if (huePrime >= 0 && huePrime < 1) {
21236
21250
  red = chroma;
21237
21251
  green = secondComponent;
@@ -21251,6 +21265,7 @@ function hslToRgb(hue, saturation, lightness, convert) {
21251
21265
  red = chroma;
21252
21266
  blue = secondComponent;
21253
21267
  }
21268
+
21254
21269
  var lightnessModification = lightness - chroma / 2;
21255
21270
  var finalRed = red + lightnessModification;
21256
21271
  var finalGreen = green + lightnessModification;
@@ -21408,11 +21423,11 @@ var namedColorMap = {
21408
21423
  yellow: 'ff0',
21409
21424
  yellowgreen: '9acd32'
21410
21425
  };
21411
-
21412
21426
  /**
21413
21427
  * Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.
21414
21428
  * @private
21415
21429
  */
21430
+
21416
21431
  function nameToHex(color) {
21417
21432
  if (typeof color !== 'string') return color;
21418
21433
  var normalizedColorName = color.toLowerCase();
@@ -21427,7 +21442,6 @@ var rgbRegex = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\
21427
21442
  var rgbaRegex = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
21428
21443
  var hslRegex = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i;
21429
21444
  var hslaRegex = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
21430
-
21431
21445
  /**
21432
21446
  * Returns an RgbColor or RgbaColor object. This utility function is only useful
21433
21447
  * if want to extract a color component. With the color util `toColorString` you
@@ -21439,11 +21453,14 @@ var hslaRegex = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[
21439
21453
  * // Assigns `{ red: 92, green: 102, blue: 112, alpha: 0.75 }` to color2
21440
21454
  * const color2 = parseToRgb('hsla(210, 10%, 40%, 0.75)');
21441
21455
  */
21456
+
21442
21457
  function parseToRgb(color) {
21443
21458
  if (typeof color !== 'string') {
21444
21459
  throw new PolishedError(3);
21445
21460
  }
21461
+
21446
21462
  var normalizedColor = nameToHex(color);
21463
+
21447
21464
  if (normalizedColor.match(hexRegex)) {
21448
21465
  return {
21449
21466
  red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
@@ -21451,6 +21468,7 @@ function parseToRgb(color) {
21451
21468
  blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16)
21452
21469
  };
21453
21470
  }
21471
+
21454
21472
  if (normalizedColor.match(hexRgbaRegex)) {
21455
21473
  var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));
21456
21474
  return {
@@ -21460,6 +21478,7 @@ function parseToRgb(color) {
21460
21478
  alpha: alpha
21461
21479
  };
21462
21480
  }
21481
+
21463
21482
  if (normalizedColor.match(reducedHexRegex)) {
21464
21483
  return {
21465
21484
  red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
@@ -21467,8 +21486,10 @@ function parseToRgb(color) {
21467
21486
  blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16)
21468
21487
  };
21469
21488
  }
21489
+
21470
21490
  if (normalizedColor.match(reducedRgbaHexRegex)) {
21471
21491
  var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));
21492
+
21472
21493
  return {
21473
21494
  red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
21474
21495
  green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
@@ -21476,7 +21497,9 @@ function parseToRgb(color) {
21476
21497
  alpha: _alpha
21477
21498
  };
21478
21499
  }
21500
+
21479
21501
  var rgbMatched = rgbRegex.exec(normalizedColor);
21502
+
21480
21503
  if (rgbMatched) {
21481
21504
  return {
21482
21505
  red: parseInt("" + rgbMatched[1], 10),
@@ -21484,7 +21507,9 @@ function parseToRgb(color) {
21484
21507
  blue: parseInt("" + rgbMatched[3], 10)
21485
21508
  };
21486
21509
  }
21510
+
21487
21511
  var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));
21512
+
21488
21513
  if (rgbaMatched) {
21489
21514
  return {
21490
21515
  red: parseInt("" + rgbaMatched[1], 10),
@@ -21493,32 +21518,44 @@ function parseToRgb(color) {
21493
21518
  alpha: parseFloat("" + rgbaMatched[4]) > 1 ? parseFloat("" + rgbaMatched[4]) / 100 : parseFloat("" + rgbaMatched[4])
21494
21519
  };
21495
21520
  }
21521
+
21496
21522
  var hslMatched = hslRegex.exec(normalizedColor);
21523
+
21497
21524
  if (hslMatched) {
21498
21525
  var hue = parseInt("" + hslMatched[1], 10);
21499
21526
  var saturation = parseInt("" + hslMatched[2], 10) / 100;
21500
21527
  var lightness = parseInt("" + hslMatched[3], 10) / 100;
21501
21528
  var rgbColorString = "rgb(" + hslToRgb(hue, saturation, lightness) + ")";
21502
21529
  var hslRgbMatched = rgbRegex.exec(rgbColorString);
21530
+
21503
21531
  if (!hslRgbMatched) {
21504
21532
  throw new PolishedError(4, normalizedColor, rgbColorString);
21505
21533
  }
21534
+
21506
21535
  return {
21507
21536
  red: parseInt("" + hslRgbMatched[1], 10),
21508
21537
  green: parseInt("" + hslRgbMatched[2], 10),
21509
21538
  blue: parseInt("" + hslRgbMatched[3], 10)
21510
21539
  };
21511
21540
  }
21541
+
21512
21542
  var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));
21543
+
21513
21544
  if (hslaMatched) {
21514
21545
  var _hue = parseInt("" + hslaMatched[1], 10);
21546
+
21515
21547
  var _saturation = parseInt("" + hslaMatched[2], 10) / 100;
21548
+
21516
21549
  var _lightness = parseInt("" + hslaMatched[3], 10) / 100;
21550
+
21517
21551
  var _rgbColorString = "rgb(" + hslToRgb(_hue, _saturation, _lightness) + ")";
21552
+
21518
21553
  var _hslRgbMatched = rgbRegex.exec(_rgbColorString);
21554
+
21519
21555
  if (!_hslRgbMatched) {
21520
21556
  throw new PolishedError(4, normalizedColor, _rgbColorString);
21521
21557
  }
21558
+
21522
21559
  return {
21523
21560
  red: parseInt("" + _hslRgbMatched[1], 10),
21524
21561
  green: parseInt("" + _hslRgbMatched[2], 10),
@@ -21526,80 +21563,8 @@ function parseToRgb(color) {
21526
21563
  alpha: parseFloat("" + hslaMatched[4]) > 1 ? parseFloat("" + hslaMatched[4]) / 100 : parseFloat("" + hslaMatched[4])
21527
21564
  };
21528
21565
  }
21529
- throw new PolishedError(5);
21530
- }
21531
-
21532
- function rgbToHsl(color) {
21533
- // make sure rgb are contained in a set of [0, 255]
21534
- var red = color.red / 255;
21535
- var green = color.green / 255;
21536
- var blue = color.blue / 255;
21537
- var max = Math.max(red, green, blue);
21538
- var min = Math.min(red, green, blue);
21539
- var lightness = (max + min) / 2;
21540
- if (max === min) {
21541
- // achromatic
21542
- if (color.alpha !== undefined) {
21543
- return {
21544
- hue: 0,
21545
- saturation: 0,
21546
- lightness: lightness,
21547
- alpha: color.alpha
21548
- };
21549
- } else {
21550
- return {
21551
- hue: 0,
21552
- saturation: 0,
21553
- lightness: lightness
21554
- };
21555
- }
21556
- }
21557
- var hue;
21558
- var delta = max - min;
21559
- var saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);
21560
- switch (max) {
21561
- case red:
21562
- hue = (green - blue) / delta + (green < blue ? 6 : 0);
21563
- break;
21564
- case green:
21565
- hue = (blue - red) / delta + 2;
21566
- break;
21567
- default:
21568
- // blue case
21569
- hue = (red - green) / delta + 4;
21570
- break;
21571
- }
21572
- hue *= 60;
21573
- if (color.alpha !== undefined) {
21574
- return {
21575
- hue: hue,
21576
- saturation: saturation,
21577
- lightness: lightness,
21578
- alpha: color.alpha
21579
- };
21580
- }
21581
- return {
21582
- hue: hue,
21583
- saturation: saturation,
21584
- lightness: lightness
21585
- };
21586
- }
21587
21566
 
21588
- /**
21589
- * Returns an HslColor or HslaColor object. This utility function is only useful
21590
- * if want to extract a color component. With the color util `toColorString` you
21591
- * can convert a HslColor or HslaColor object back to a string.
21592
- *
21593
- * @example
21594
- * // Assigns `{ hue: 0, saturation: 1, lightness: 0.5 }` to color1
21595
- * const color1 = parseToHsl('rgb(255, 0, 0)');
21596
- * // Assigns `{ hue: 128, saturation: 1, lightness: 0.5, alpha: 0.75 }` to color2
21597
- * const color2 = parseToHsl('hsla(128, 100%, 50%, 0.75)');
21598
- */
21599
- function parseToHsl(color) {
21600
- // Note: At a later stage we can optimize this function as right now a hsl
21601
- // color would be parsed converted to rgb values and converted back to hsl.
21602
- return rgbToHsl(parseToRgb(color));
21567
+ throw new PolishedError(5);
21603
21568
  }
21604
21569
 
21605
21570
  /**
@@ -21610,8 +21575,10 @@ var reduceHexValue = function reduceHexValue(value) {
21610
21575
  if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {
21611
21576
  return "#" + value[1] + value[3] + value[5];
21612
21577
  }
21578
+
21613
21579
  return value;
21614
21580
  };
21581
+
21615
21582
  var reduceHexValue$1 = reduceHexValue;
21616
21583
 
21617
21584
  function numberToHex(value) {
@@ -21619,83 +21586,6 @@ function numberToHex(value) {
21619
21586
  return hex.length === 1 ? "0" + hex : hex;
21620
21587
  }
21621
21588
 
21622
- function colorToHex(color) {
21623
- return numberToHex(Math.round(color * 255));
21624
- }
21625
- function convertToHex(red, green, blue) {
21626
- return reduceHexValue$1("#" + colorToHex(red) + colorToHex(green) + colorToHex(blue));
21627
- }
21628
- function hslToHex(hue, saturation, lightness) {
21629
- return hslToRgb(hue, saturation, lightness, convertToHex);
21630
- }
21631
-
21632
- /**
21633
- * Returns a string value for the color. The returned result is the smallest possible hex notation.
21634
- *
21635
- * @example
21636
- * // Styles as object usage
21637
- * const styles = {
21638
- * background: hsl(359, 0.75, 0.4),
21639
- * background: hsl({ hue: 360, saturation: 0.75, lightness: 0.4 }),
21640
- * }
21641
- *
21642
- * // styled-components usage
21643
- * const div = styled.div`
21644
- * background: ${hsl(359, 0.75, 0.4)};
21645
- * background: ${hsl({ hue: 360, saturation: 0.75, lightness: 0.4 })};
21646
- * `
21647
- *
21648
- * // CSS in JS Output
21649
- *
21650
- * element {
21651
- * background: "#b3191c";
21652
- * background: "#b3191c";
21653
- * }
21654
- */
21655
- function hsl(value, saturation, lightness) {
21656
- if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number') {
21657
- return hslToHex(value, saturation, lightness);
21658
- } else if (typeof value === 'object' && saturation === undefined && lightness === undefined) {
21659
- return hslToHex(value.hue, value.saturation, value.lightness);
21660
- }
21661
- throw new PolishedError(1);
21662
- }
21663
-
21664
- /**
21665
- * Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.
21666
- *
21667
- * @example
21668
- * // Styles as object usage
21669
- * const styles = {
21670
- * background: hsla(359, 0.75, 0.4, 0.7),
21671
- * background: hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 }),
21672
- * background: hsla(359, 0.75, 0.4, 1),
21673
- * }
21674
- *
21675
- * // styled-components usage
21676
- * const div = styled.div`
21677
- * background: ${hsla(359, 0.75, 0.4, 0.7)};
21678
- * background: ${hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 })};
21679
- * background: ${hsla(359, 0.75, 0.4, 1)};
21680
- * `
21681
- *
21682
- * // CSS in JS Output
21683
- *
21684
- * element {
21685
- * background: "rgba(179,25,28,0.7)";
21686
- * background: "rgba(179,25,28,0.7)";
21687
- * background: "#b3191c";
21688
- * }
21689
- */
21690
- function hsla$1(value, saturation, lightness, alpha) {
21691
- if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number' && typeof alpha === 'number') {
21692
- return alpha >= 1 ? hslToHex(value, saturation, lightness) : "rgba(" + hslToRgb(value, saturation, lightness) + "," + alpha + ")";
21693
- } else if (typeof value === 'object' && saturation === undefined && lightness === undefined && alpha === undefined) {
21694
- return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : "rgba(" + hslToRgb(value.hue, value.saturation, value.lightness) + "," + value.alpha + ")";
21695
- }
21696
- throw new PolishedError(2);
21697
- }
21698
-
21699
21589
  /**
21700
21590
  * Returns a string value for the color. The returned result is the smallest possible hex notation.
21701
21591
  *
@@ -21725,6 +21615,7 @@ function rgb(value, green, blue) {
21725
21615
  } else if (typeof value === 'object' && green === undefined && blue === undefined) {
21726
21616
  return reduceHexValue$1("#" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));
21727
21617
  }
21618
+
21728
21619
  throw new PolishedError(6);
21729
21620
  }
21730
21621
 
@@ -21771,60 +21662,8 @@ function rgba$1(firstValue, secondValue, thirdValue, fourthValue) {
21771
21662
  } else if (typeof firstValue === 'object' && secondValue === undefined && thirdValue === undefined && fourthValue === undefined) {
21772
21663
  return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")";
21773
21664
  }
21774
- throw new PolishedError(7);
21775
- }
21776
21665
 
21777
- var isRgb = function isRgb(color) {
21778
- return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');
21779
- };
21780
- var isRgba$1 = function isRgba(color) {
21781
- return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && typeof color.alpha === 'number';
21782
- };
21783
- var isHsl = function isHsl(color) {
21784
- return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');
21785
- };
21786
- var isHsla$1 = function isHsla(color) {
21787
- return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && typeof color.alpha === 'number';
21788
- };
21789
-
21790
- /**
21791
- * Converts a RgbColor, RgbaColor, HslColor or HslaColor object to a color string.
21792
- * This util is useful in case you only know on runtime which color object is
21793
- * used. Otherwise we recommend to rely on `rgb`, `rgba`, `hsl` or `hsla`.
21794
- *
21795
- * @example
21796
- * // Styles as object usage
21797
- * const styles = {
21798
- * background: toColorString({ red: 255, green: 205, blue: 100 }),
21799
- * background: toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),
21800
- * background: toColorString({ hue: 240, saturation: 1, lightness: 0.5 }),
21801
- * background: toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),
21802
- * }
21803
- *
21804
- * // styled-components usage
21805
- * const div = styled.div`
21806
- * background: ${toColorString({ red: 255, green: 205, blue: 100 })};
21807
- * background: ${toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};
21808
- * background: ${toColorString({ hue: 240, saturation: 1, lightness: 0.5 })};
21809
- * background: ${toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};
21810
- * `
21811
- *
21812
- * // CSS in JS Output
21813
- * element {
21814
- * background: "#ffcd64";
21815
- * background: "rgba(255,205,100,0.72)";
21816
- * background: "#00f";
21817
- * background: "rgba(179,25,25,0.72)";
21818
- * }
21819
- */
21820
-
21821
- function toColorString(color) {
21822
- if (typeof color !== 'object') throw new PolishedError(8);
21823
- if (isRgba$1(color)) return rgba$1(color);
21824
- if (isRgb(color)) return rgb(color);
21825
- if (isHsla$1(color)) return hsla$1(color);
21826
- if (isHsl(color)) return hsl(color);
21827
- throw new PolishedError(8);
21666
+ throw new PolishedError(7);
21828
21667
  }
21829
21668
 
21830
21669
  // Type definitions taken from https://github.com/gcanti/flow-static-land/blob/master/src/Fun.js
@@ -21837,156 +21676,14 @@ function curried(f, length, acc) {
21837
21676
  var combined = acc.concat(Array.prototype.slice.call(arguments));
21838
21677
  return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);
21839
21678
  };
21840
- }
21679
+ } // eslint-disable-next-line no-redeclare
21680
+
21841
21681
 
21842
- // eslint-disable-next-line no-redeclare
21843
21682
  function curry(f) {
21844
21683
  // eslint-disable-line no-redeclare
21845
21684
  return curried(f, f.length, []);
21846
21685
  }
21847
21686
 
21848
- /**
21849
- * Changes the hue of the color. Hue is a number between 0 to 360. The first
21850
- * argument for adjustHue is the amount of degrees the color is rotated around
21851
- * the color wheel, always producing a positive hue value.
21852
- *
21853
- * @example
21854
- * // Styles as object usage
21855
- * const styles = {
21856
- * background: adjustHue(180, '#448'),
21857
- * background: adjustHue('180', 'rgba(101,100,205,0.7)'),
21858
- * }
21859
- *
21860
- * // styled-components usage
21861
- * const div = styled.div`
21862
- * background: ${adjustHue(180, '#448')};
21863
- * background: ${adjustHue('180', 'rgba(101,100,205,0.7)')};
21864
- * `
21865
- *
21866
- * // CSS in JS Output
21867
- * element {
21868
- * background: "#888844";
21869
- * background: "rgba(136,136,68,0.7)";
21870
- * }
21871
- */
21872
- function adjustHue(degree, color) {
21873
- if (color === 'transparent') return color;
21874
- var hslColor = parseToHsl(color);
21875
- return toColorString(_extends$1({}, hslColor, {
21876
- hue: hslColor.hue + parseFloat(degree)
21877
- }));
21878
- }
21879
-
21880
- // prettier-ignore
21881
- var curriedAdjustHue = curry /* ::<number | string, string, string> */(adjustHue);
21882
-
21883
- function guard(lowerBoundary, upperBoundary, value) {
21884
- return Math.max(lowerBoundary, Math.min(upperBoundary, value));
21885
- }
21886
-
21887
- /**
21888
- * Returns a string value for the darkened color.
21889
- *
21890
- * @example
21891
- * // Styles as object usage
21892
- * const styles = {
21893
- * background: darken(0.2, '#FFCD64'),
21894
- * background: darken('0.2', 'rgba(255,205,100,0.7)'),
21895
- * }
21896
- *
21897
- * // styled-components usage
21898
- * const div = styled.div`
21899
- * background: ${darken(0.2, '#FFCD64')};
21900
- * background: ${darken('0.2', 'rgba(255,205,100,0.7)')};
21901
- * `
21902
- *
21903
- * // CSS in JS Output
21904
- *
21905
- * element {
21906
- * background: "#ffbd31";
21907
- * background: "rgba(255,189,49,0.7)";
21908
- * }
21909
- */
21910
- function darken(amount, color) {
21911
- if (color === 'transparent') return color;
21912
- var hslColor = parseToHsl(color);
21913
- return toColorString(_extends$1({}, hslColor, {
21914
- lightness: guard(0, 1, hslColor.lightness - parseFloat(amount))
21915
- }));
21916
- }
21917
-
21918
- // prettier-ignore
21919
- var curriedDarken = curry /* ::<number | string, string, string> */(darken);
21920
-
21921
- /**
21922
- * Decreases the intensity of a color. Its range is between 0 to 1. The first
21923
- * argument of the desaturate function is the amount by how much the color
21924
- * intensity should be decreased.
21925
- *
21926
- * @example
21927
- * // Styles as object usage
21928
- * const styles = {
21929
- * background: desaturate(0.2, '#CCCD64'),
21930
- * background: desaturate('0.2', 'rgba(204,205,100,0.7)'),
21931
- * }
21932
- *
21933
- * // styled-components usage
21934
- * const div = styled.div`
21935
- * background: ${desaturate(0.2, '#CCCD64')};
21936
- * background: ${desaturate('0.2', 'rgba(204,205,100,0.7)')};
21937
- * `
21938
- *
21939
- * // CSS in JS Output
21940
- * element {
21941
- * background: "#b8b979";
21942
- * background: "rgba(184,185,121,0.7)";
21943
- * }
21944
- */
21945
- function desaturate(amount, color) {
21946
- if (color === 'transparent') return color;
21947
- var hslColor = parseToHsl(color);
21948
- return toColorString(_extends$1({}, hslColor, {
21949
- saturation: guard(0, 1, hslColor.saturation - parseFloat(amount))
21950
- }));
21951
- }
21952
-
21953
- // prettier-ignore
21954
- var curriedDesaturate = curry /* ::<number | string, string, string> */(desaturate);
21955
-
21956
- /**
21957
- * Returns a string value for the lightened color.
21958
- *
21959
- * @example
21960
- * // Styles as object usage
21961
- * const styles = {
21962
- * background: lighten(0.2, '#CCCD64'),
21963
- * background: lighten('0.2', 'rgba(204,205,100,0.7)'),
21964
- * }
21965
- *
21966
- * // styled-components usage
21967
- * const div = styled.div`
21968
- * background: ${lighten(0.2, '#FFCD64')};
21969
- * background: ${lighten('0.2', 'rgba(204,205,100,0.7)')};
21970
- * `
21971
- *
21972
- * // CSS in JS Output
21973
- *
21974
- * element {
21975
- * background: "#e5e6b1";
21976
- * background: "rgba(229,230,177,0.7)";
21977
- * }
21978
- */
21979
- function lighten(amount, color) {
21980
- if (color === 'transparent') return color;
21981
- var hslColor = parseToHsl(color);
21982
- return toColorString(_extends$1({}, hslColor, {
21983
- lightness: guard(0, 1, hslColor.lightness + parseFloat(amount))
21984
- }));
21985
- }
21986
-
21987
- // prettier-ignore
21988
- var curriedLighten = curry /* ::<number | string, string, string> */(lighten);
21989
-
21990
21687
  /**
21991
21688
  * Mixes the two provided colors together by calculating the average of each of the RGB components weighted to the first color by the provided weight.
21992
21689
  *
@@ -22013,21 +21710,25 @@ var curriedLighten = curry /* ::<number | string, string, string> */(lighten);
22013
21710
  * background: "rgba(63, 0, 191, 0.75)";
22014
21711
  * }
22015
21712
  */
21713
+
22016
21714
  function mix$1(weight, color, otherColor) {
22017
21715
  if (color === 'transparent') return otherColor;
22018
21716
  if (otherColor === 'transparent') return color;
22019
21717
  if (weight === 0) return otherColor;
22020
21718
  var parsedColor1 = parseToRgb(color);
21719
+
22021
21720
  var color1 = _extends$1({}, parsedColor1, {
22022
21721
  alpha: typeof parsedColor1.alpha === 'number' ? parsedColor1.alpha : 1
22023
21722
  });
21723
+
22024
21724
  var parsedColor2 = parseToRgb(otherColor);
21725
+
22025
21726
  var color2 = _extends$1({}, parsedColor2, {
22026
21727
  alpha: typeof parsedColor2.alpha === 'number' ? parsedColor2.alpha : 1
22027
- });
22028
-
22029
- // The formula is copied from the original Sass implementation:
21728
+ }); // The formula is copied from the original Sass implementation:
22030
21729
  // http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method
21730
+
21731
+
22031
21732
  var alphaDelta = color1.alpha - color2.alpha;
22032
21733
  var x = parseFloat(weight) * 2 - 1;
22033
21734
  var y = x * alphaDelta === -1 ? x : x + alphaDelta;
@@ -22041,217 +21742,13 @@ function mix$1(weight, color, otherColor) {
22041
21742
  alpha: color1.alpha * parseFloat(weight) + color2.alpha * (1 - parseFloat(weight))
22042
21743
  };
22043
21744
  return rgba$1(mixedColor);
22044
- }
22045
-
22046
- // prettier-ignore
22047
- var curriedMix = curry /* ::<number | string, string, string, string> */(mix$1);
22048
- var mix$1$1 = curriedMix;
22049
-
22050
- /**
22051
- * Increases the opacity of a color. Its range for the amount is between 0 to 1.
22052
- *
22053
- *
22054
- * @example
22055
- * // Styles as object usage
22056
- * const styles = {
22057
- * background: opacify(0.1, 'rgba(255, 255, 255, 0.9)');
22058
- * background: opacify(0.2, 'hsla(0, 0%, 100%, 0.5)'),
22059
- * background: opacify('0.5', 'rgba(255, 0, 0, 0.2)'),
22060
- * }
22061
- *
22062
- * // styled-components usage
22063
- * const div = styled.div`
22064
- * background: ${opacify(0.1, 'rgba(255, 255, 255, 0.9)')};
22065
- * background: ${opacify(0.2, 'hsla(0, 0%, 100%, 0.5)')},
22066
- * background: ${opacify('0.5', 'rgba(255, 0, 0, 0.2)')},
22067
- * `
22068
- *
22069
- * // CSS in JS Output
22070
- *
22071
- * element {
22072
- * background: "#fff";
22073
- * background: "rgba(255,255,255,0.7)";
22074
- * background: "rgba(255,0,0,0.7)";
22075
- * }
22076
- */
22077
- function opacify(amount, color) {
22078
- if (color === 'transparent') return color;
22079
- var parsedColor = parseToRgb(color);
22080
- var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;
22081
- var colorWithAlpha = _extends$1({}, parsedColor, {
22082
- alpha: guard(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100)
22083
- });
22084
- return rgba$1(colorWithAlpha);
22085
- }
22086
-
22087
- // prettier-ignore
22088
- var curriedOpacify = curry /* ::<number | string, string, string> */(opacify);
22089
-
22090
- /**
22091
- * Increases the intensity of a color. Its range is between 0 to 1. The first
22092
- * argument of the saturate function is the amount by how much the color
22093
- * intensity should be increased.
22094
- *
22095
- * @example
22096
- * // Styles as object usage
22097
- * const styles = {
22098
- * background: saturate(0.2, '#CCCD64'),
22099
- * background: saturate('0.2', 'rgba(204,205,100,0.7)'),
22100
- * }
22101
- *
22102
- * // styled-components usage
22103
- * const div = styled.div`
22104
- * background: ${saturate(0.2, '#FFCD64')};
22105
- * background: ${saturate('0.2', 'rgba(204,205,100,0.7)')};
22106
- * `
22107
- *
22108
- * // CSS in JS Output
22109
- *
22110
- * element {
22111
- * background: "#e0e250";
22112
- * background: "rgba(224,226,80,0.7)";
22113
- * }
22114
- */
22115
- function saturate(amount, color) {
22116
- if (color === 'transparent') return color;
22117
- var hslColor = parseToHsl(color);
22118
- return toColorString(_extends$1({}, hslColor, {
22119
- saturation: guard(0, 1, hslColor.saturation + parseFloat(amount))
22120
- }));
22121
- }
22122
-
22123
- // prettier-ignore
22124
- var curriedSaturate = curry /* ::<number | string, string, string> */(saturate);
22125
-
22126
- /**
22127
- * Sets the hue of a color to the provided value. The hue range can be
22128
- * from 0 and 359.
22129
- *
22130
- * @example
22131
- * // Styles as object usage
22132
- * const styles = {
22133
- * background: setHue(42, '#CCCD64'),
22134
- * background: setHue('244', 'rgba(204,205,100,0.7)'),
22135
- * }
22136
- *
22137
- * // styled-components usage
22138
- * const div = styled.div`
22139
- * background: ${setHue(42, '#CCCD64')};
22140
- * background: ${setHue('244', 'rgba(204,205,100,0.7)')};
22141
- * `
22142
- *
22143
- * // CSS in JS Output
22144
- * element {
22145
- * background: "#cdae64";
22146
- * background: "rgba(107,100,205,0.7)";
22147
- * }
22148
- */
22149
- function setHue(hue, color) {
22150
- if (color === 'transparent') return color;
22151
- return toColorString(_extends$1({}, parseToHsl(color), {
22152
- hue: parseFloat(hue)
22153
- }));
22154
- }
22155
-
22156
- // prettier-ignore
22157
- var curriedSetHue = curry /* ::<number | string, string, string> */(setHue);
22158
-
22159
- /**
22160
- * Sets the lightness of a color to the provided value. The lightness range can be
22161
- * from 0 and 1.
22162
- *
22163
- * @example
22164
- * // Styles as object usage
22165
- * const styles = {
22166
- * background: setLightness(0.2, '#CCCD64'),
22167
- * background: setLightness('0.75', 'rgba(204,205,100,0.7)'),
22168
- * }
22169
- *
22170
- * // styled-components usage
22171
- * const div = styled.div`
22172
- * background: ${setLightness(0.2, '#CCCD64')};
22173
- * background: ${setLightness('0.75', 'rgba(204,205,100,0.7)')};
22174
- * `
22175
- *
22176
- * // CSS in JS Output
22177
- * element {
22178
- * background: "#4d4d19";
22179
- * background: "rgba(223,224,159,0.7)";
22180
- * }
22181
- */
22182
- function setLightness(lightness, color) {
22183
- if (color === 'transparent') return color;
22184
- return toColorString(_extends$1({}, parseToHsl(color), {
22185
- lightness: parseFloat(lightness)
22186
- }));
22187
- }
22188
-
22189
- // prettier-ignore
22190
- var curriedSetLightness = curry /* ::<number | string, string, string> */(setLightness);
22191
-
22192
- /**
22193
- * Sets the saturation of a color to the provided value. The saturation range can be
22194
- * from 0 and 1.
22195
- *
22196
- * @example
22197
- * // Styles as object usage
22198
- * const styles = {
22199
- * background: setSaturation(0.2, '#CCCD64'),
22200
- * background: setSaturation('0.75', 'rgba(204,205,100,0.7)'),
22201
- * }
22202
- *
22203
- * // styled-components usage
22204
- * const div = styled.div`
22205
- * background: ${setSaturation(0.2, '#CCCD64')};
22206
- * background: ${setSaturation('0.75', 'rgba(204,205,100,0.7)')};
22207
- * `
22208
- *
22209
- * // CSS in JS Output
22210
- * element {
22211
- * background: "#adad84";
22212
- * background: "rgba(228,229,76,0.7)";
22213
- * }
22214
- */
22215
- function setSaturation(saturation, color) {
22216
- if (color === 'transparent') return color;
22217
- return toColorString(_extends$1({}, parseToHsl(color), {
22218
- saturation: parseFloat(saturation)
22219
- }));
22220
- }
22221
-
22222
- // prettier-ignore
22223
- var curriedSetSaturation = curry /* ::<number | string, string, string> */(setSaturation);
22224
-
22225
- /**
22226
- * Shades a color by mixing it with black. `shade` can produce
22227
- * hue shifts, where as `darken` manipulates the luminance channel and therefore
22228
- * doesn't produce hue shifts.
22229
- *
22230
- * @example
22231
- * // Styles as object usage
22232
- * const styles = {
22233
- * background: shade(0.25, '#00f')
22234
- * }
22235
- *
22236
- * // styled-components usage
22237
- * const div = styled.div`
22238
- * background: ${shade(0.25, '#00f')};
22239
- * `
22240
- *
22241
- * // CSS in JS Output
22242
- *
22243
- * element {
22244
- * background: "#00003f";
22245
- * }
22246
- */
21745
+ } // prettier-ignore
22247
21746
 
22248
- function shade(percentage, color) {
22249
- if (color === 'transparent') return color;
22250
- return mix$1$1(parseFloat(percentage), 'rgb(0, 0, 0)', color);
22251
- }
22252
21747
 
22253
- // prettier-ignore
22254
- var curriedShade = curry /* ::<number | string, string, string> */(shade);
21748
+ var curriedMix = /*#__PURE__*/curry
21749
+ /* ::<number | string, string, string, string> */
21750
+ (mix$1);
21751
+ var mix$1$1 = curriedMix;
22255
21752
 
22256
21753
  /**
22257
21754
  * Tints a color by mixing it with white. `tint` can produce
@@ -22279,51 +21776,13 @@ var curriedShade = curry /* ::<number | string, string, string> */(shade);
22279
21776
  function tint(percentage, color) {
22280
21777
  if (color === 'transparent') return color;
22281
21778
  return mix$1$1(parseFloat(percentage), 'rgb(255, 255, 255)', color);
22282
- }
21779
+ } // prettier-ignore
22283
21780
 
22284
- // prettier-ignore
22285
- var curriedTint = curry /* ::<number | string, string, string> */(tint);
22286
- var curriedTint$1 = curriedTint;
22287
21781
 
22288
- /**
22289
- * Decreases the opacity of a color. Its range for the amount is between 0 to 1.
22290
- *
22291
- *
22292
- * @example
22293
- * // Styles as object usage
22294
- * const styles = {
22295
- * background: transparentize(0.1, '#fff'),
22296
- * background: transparentize(0.2, 'hsl(0, 0%, 100%)'),
22297
- * background: transparentize('0.5', 'rgba(255, 0, 0, 0.8)'),
22298
- * }
22299
- *
22300
- * // styled-components usage
22301
- * const div = styled.div`
22302
- * background: ${transparentize(0.1, '#fff')};
22303
- * background: ${transparentize(0.2, 'hsl(0, 0%, 100%)')};
22304
- * background: ${transparentize('0.5', 'rgba(255, 0, 0, 0.8)')};
22305
- * `
22306
- *
22307
- * // CSS in JS Output
22308
- *
22309
- * element {
22310
- * background: "rgba(255,255,255,0.9)";
22311
- * background: "rgba(255,255,255,0.8)";
22312
- * background: "rgba(255,0,0,0.3)";
22313
- * }
22314
- */
22315
- function transparentize(amount, color) {
22316
- if (color === 'transparent') return color;
22317
- var parsedColor = parseToRgb(color);
22318
- var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;
22319
- var colorWithAlpha = _extends$1({}, parsedColor, {
22320
- alpha: guard(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100)
22321
- });
22322
- return rgba$1(colorWithAlpha);
22323
- }
22324
-
22325
- // prettier-ignore
22326
- var curriedTransparentize = curry /* ::<number | string, string, string> */(transparentize);
21782
+ var curriedTint = /*#__PURE__*/curry
21783
+ /* ::<number | string, string, string> */
21784
+ (tint);
21785
+ var curriedTint$1 = curriedTint;
22327
21786
 
22328
21787
  var linkColor = MATISSE_BLUE;
22329
21788
  var fallbackValues$8 = {
@@ -22458,6 +21917,8 @@ var ExternalLink = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
22458
21917
  extraStyles = _ref$extraStyles === void 0 ? "" : _ref$extraStyles,
22459
21918
  _ref$variant = _ref.variant,
22460
21919
  variant = _ref$variant === void 0 ? "primary" : _ref$variant,
21920
+ _ref$containerTabInde = _ref.containerTabIndex,
21921
+ containerTabIndex = _ref$containerTabInde === void 0 ? "-1" : _ref$containerTabInde,
22461
21922
  _ref$tabIndex = _ref.tabIndex,
22462
21923
  tabIndex = _ref$tabIndex === void 0 ? "0" : _ref$tabIndex,
22463
21924
  dataQa = _ref.dataQa,
@@ -22477,7 +21938,7 @@ var ExternalLink = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
22477
21938
  };
22478
21939
  return /*#__PURE__*/React__default.createElement(Box, {
22479
21940
  padding: "0",
22480
- tabIndex: tabIndex,
21941
+ tabIndex: containerTabIndex,
22481
21942
  onKeyDown: handleKeyDown
22482
21943
  }, /*#__PURE__*/React__default.createElement(StyledExternalLink, {
22483
21944
  href: href,
@@ -22489,7 +21950,7 @@ var ExternalLink = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
22489
21950
  hovercolor: themeValues.hoverColor,
22490
21951
  activeColor: themeValues.activeColor,
22491
21952
  fontFamily: themeValues.fontFamily,
22492
- tabIndex: "-1",
21953
+ tabIndex: tabIndex,
22493
21954
  extrastyles: extraStyles,
22494
21955
  rel: newTab ? "noopener" : "",
22495
21956
  "data-qa": dataQa,
@@ -23641,19 +23102,32 @@ var toIndexedObject = function (it) {
23641
23102
  return indexedObject(requireObjectCoercible(it));
23642
23103
  };
23643
23104
 
23644
- // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
23645
23105
  var documentAll = typeof document == 'object' && document.all;
23646
23106
 
23107
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
23108
+ // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
23109
+ var IS_HTMLDDA = typeof documentAll == 'undefined' && documentAll !== undefined;
23110
+
23111
+ var documentAll_1 = {
23112
+ all: documentAll,
23113
+ IS_HTMLDDA: IS_HTMLDDA
23114
+ };
23115
+
23116
+ var documentAll$1 = documentAll_1.all;
23117
+
23647
23118
  // `IsCallable` abstract operation
23648
23119
  // https://tc39.es/ecma262/#sec-iscallable
23649
- // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
23650
- var isCallable = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
23651
- return typeof argument == 'function' || argument === documentAll;
23120
+ var isCallable = documentAll_1.IS_HTMLDDA ? function (argument) {
23121
+ return typeof argument == 'function' || argument === documentAll$1;
23652
23122
  } : function (argument) {
23653
23123
  return typeof argument == 'function';
23654
23124
  };
23655
23125
 
23656
- var isObject = function (it) {
23126
+ var documentAll$2 = documentAll_1.all;
23127
+
23128
+ var isObject = documentAll_1.IS_HTMLDDA ? function (it) {
23129
+ return typeof it == 'object' ? it !== null : isCallable(it) || it === documentAll$2;
23130
+ } : function (it) {
23657
23131
  return typeof it == 'object' ? it !== null : isCallable(it);
23658
23132
  };
23659
23133
 
@@ -23789,10 +23263,10 @@ var shared = createCommonjsModule(function (module) {
23789
23263
  (module.exports = function (key, value) {
23790
23264
  return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
23791
23265
  })('versions', []).push({
23792
- version: '3.35.1',
23266
+ version: '3.33.3',
23793
23267
  mode: 'global',
23794
- copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
23795
- license: 'https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE',
23268
+ copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
23269
+ license: 'https://github.com/zloirock/core-js/blob/v3.33.3/LICENSE',
23796
23270
  source: 'https://github.com/zloirock/core-js'
23797
23271
  });
23798
23272
  });
@@ -24089,7 +23563,7 @@ var TEMPLATE = String(String).split('String');
24089
23563
 
24090
23564
  var makeBuiltIn = module.exports = function (value, name, options) {
24091
23565
  if (stringSlice($String(name), 0, 7) === 'Symbol(') {
24092
- name = '[' + replace($String(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
23566
+ name = '[' + replace($String(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
24093
23567
  }
24094
23568
  if (options && options.getter) name = 'get ' + name;
24095
23569
  if (options && options.setter) name = 'set ' + name;
@@ -24177,8 +23651,7 @@ var min$1 = Math.min;
24177
23651
  // `ToLength` abstract operation
24178
23652
  // https://tc39.es/ecma262/#sec-tolength
24179
23653
  var toLength = function (argument) {
24180
- var len = toIntegerOrInfinity(argument);
24181
- return len > 0 ? min$1(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
23654
+ return argument > 0 ? min$1(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
24182
23655
  };
24183
23656
 
24184
23657
  // `LengthOfArrayLike` abstract operation
@@ -24338,7 +23811,7 @@ var _export = function (options, source) {
24338
23811
  } else if (STATIC) {
24339
23812
  target = global_1[TARGET] || defineGlobalProperty(TARGET, {});
24340
23813
  } else {
24341
- target = global_1[TARGET] && global_1[TARGET].prototype;
23814
+ target = (global_1[TARGET] || {}).prototype;
24342
23815
  }
24343
23816
  if (target) for (key in source) {
24344
23817
  sourceProperty = source[key];
@@ -24601,15 +24074,11 @@ var functionUncurryThisAccessor = function (object, key, method) {
24601
24074
  } catch (error) { /* empty */ }
24602
24075
  };
24603
24076
 
24604
- var isPossiblePrototype = function (argument) {
24605
- return isObject(argument) || argument === null;
24606
- };
24607
-
24608
24077
  var $String$4 = String;
24609
24078
  var $TypeError$6 = TypeError;
24610
24079
 
24611
24080
  var aPossiblePrototype = function (argument) {
24612
- if (isPossiblePrototype(argument)) return argument;
24081
+ if (typeof argument == 'object' || isCallable(argument)) return argument;
24613
24082
  throw new $TypeError$6("Can't set " + $String$4(argument) + ' as a prototype');
24614
24083
  };
24615
24084