@reachfive/identity-ui 1.20.1 → 1.21.0

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.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('Buffer')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'Buffer'], factory) :
4
- (global = global || self, factory(global.reach5Widgets = {}, global.Buffer$2));
5
- }(this, (function (exports, Buffer$2) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
+ (global = global || self, factory(global.reach5Widgets = {}));
5
+ }(this, (function (exports) { 'use strict';
6
6
 
7
7
  function ownKeys(object, enumerableOnly) {
8
8
  var keys = Object.keys(object);
@@ -30993,75 +30993,88 @@
30993
30993
  icon: icon$e
30994
30994
  };
30995
30995
 
30996
- var icon$f = "data:image/svg+xml,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M270%20806q-8-19-8-52%200-20%2011-49t24-45q-1-22%207.5-53t22.5-43q0-139%2092.5-288.5t217.5-209.5q139-66%20324-66%20133%200%20266%2055%2049%2021%2090%2048t71%2056%2055%2068%2042%2074%2032.5%2084.5%2025.5%2089.5%2022%2098l1%205q55%2083%2055%20150%200%2014-9%2040t-9%2038q0%201%201.5%203.5t3.5%205%202%203.5q77%20114%20120.5%20214.5t43.5%20208.5q0%2043-19.5%20100t-55.5%2057q-9%200-19.5-7.5t-19-17.5-19-26-16-26.5-13.5-26-9-17.5q-1-1-3-1l-5%204q-59%20154-132%20223%2020%2020%2061.5%2038.5t69%2041.5%2035.5%2065q-2%204-4%2016t-7%2018q-64%2097-302%2097-53%200-110.5-9t-98-20-104.5-30q-15-5-23-7-14-4-46-4.5t-40-1.5q-41%2045-127.5%2065t-168.5%2020q-35%200-69-1.5t-93-9-101-20.5-74.5-40-32.5-64q0-40%2010-59.5t41-48.5q11-2%2040.5-13t49.5-12q4%200%2014-2%202-2%202-4l-2-3q-48-11-108-105.5t-73-156.5l-5-3q-4%200-12%2020-18%2041-54.5%2074.5t-77.5%2037.5h-1q-4%200-6-4.5t-5-5.5q-23-54-23-100%200-275%20252-466z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E";
30996
+ var icon$f = "data:image/svg+xml,%3Csvg%20width%3D%22800px%22%20height%3D%22800px%22%20viewBox%3D%220%200%20128%20128%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20aria-hidden%3D%22true%22%20role%3D%22img%22%20class%3D%22iconify%20iconify--noto%22%20preserveAspectRatio%3D%22xMidYMid%20meet%22%3E%3Cpath%20d%3D%22M72.51%2015.42H34.65c-.15%200-.28.06-.42.08h-6.47c-1.24%200-2.24%201-2.24%202.24v100.97c0%201.24%201%202.24%202.24%202.24h21.9c1.24%200%202.24-1%202.24-2.24V86.63h20.61c19.83%200%2035.96-15.97%2035.96-35.6c.01-19.63-16.13-35.61-35.96-35.61zm-1.72%2050.22c-.35.03-.7.06-1.06.06H52.28c-.05%200-.09-.04-.14-.06a.513.513%200%200%201-.24-.1a.577.577%200%200%201-.21-.43V36.94c0-.18.09-.32.21-.43c.06-.06.14-.07.22-.09c.06-.02.09-.06.15-.06h17.45c.4%200%20.8.03%201.19.06c7.25.63%2012.97%206.94%2012.97%2014.61c.01%207.71-5.77%2014.05-13.09%2014.61z%22%20fill%3D%22%23fff%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E";
30997
+
30998
+ var ping = {
30999
+ key: 'ping',
31000
+ name: 'Ping',
31001
+ color: '#c90917',
31002
+ icon: icon$f,
31003
+ windowSize: {
31004
+ width: 450,
31005
+ height: 400
31006
+ }
31007
+ };
31008
+
31009
+ var icon$g = "data:image/svg+xml,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M270%20806q-8-19-8-52%200-20%2011-49t24-45q-1-22%207.5-53t22.5-43q0-139%2092.5-288.5t217.5-209.5q139-66%20324-66%20133%200%20266%2055%2049%2021%2090%2048t71%2056%2055%2068%2042%2074%2032.5%2084.5%2025.5%2089.5%2022%2098l1%205q55%2083%2055%20150%200%2014-9%2040t-9%2038q0%201%201.5%203.5t3.5%205%202%203.5q77%20114%20120.5%20214.5t43.5%20208.5q0%2043-19.5%20100t-55.5%2057q-9%200-19.5-7.5t-19-17.5-19-26-16-26.5-13.5-26-9-17.5q-1-1-3-1l-5%204q-59%20154-132%20223%2020%2020%2061.5%2038.5t69%2041.5%2035.5%2065q-2%204-4%2016t-7%2018q-64%2097-302%2097-53%200-110.5-9t-98-20-104.5-30q-15-5-23-7-14-4-46-4.5t-40-1.5q-41%2045-127.5%2065t-168.5%2020q-35%200-69-1.5t-93-9-101-20.5-74.5-40-32.5-64q0-40%2010-59.5t41-48.5q11-2%2040.5-13t49.5-12q4%200%2014-2%202-2%202-4l-2-3q-48-11-108-105.5t-73-156.5l-5-3q-4%200-12%2020-18%2041-54.5%2074.5t-77.5%2037.5h-1q-4%200-6-4.5t-5-5.5q-23-54-23-100%200-275%20252-466z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E";
30997
31010
 
30998
31011
  var qq = {
30999
31012
  key: 'qq',
31000
31013
  name: 'QQ',
31001
31014
  color: '#0071c3',
31002
- icon: icon$f,
31015
+ icon: icon$g,
31003
31016
  windowSize: {
31004
31017
  width: 450,
31005
31018
  height: 400
31006
31019
  }
31007
31020
  };
31008
31021
 
31009
- var icon$g = "data:image/svg+xml,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M1684%20408q-67%2098-162%20167%201%2014%201%2042%200%20130-38%20259.5t-115.5%20248.5-184.5%20210.5-258%20146-323%2054.5q-271%200-496-145%2035%204%2078%204%20225%200%20401-138-105-2-188-64.5t-114-159.5q33%205%2061%205%2043%200%2085-11-112-23-185.5-111.5t-73.5-205.5v-4q68%2038%20146%2041-66-44-105-115t-39-154q0-88%2044-163%20121%20149%20294.5%20238.5t371.5%2099.5q-8-38-8-74%200-134%2094.5-228.5t228.5-94.5q140%200%20236%20102%20109-21%20205-78-37%20115-142%20178%2093-10%20186-50z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E";
31022
+ var icon$h = "data:image/svg+xml,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M1684%20408q-67%2098-162%20167%201%2014%201%2042%200%20130-38%20259.5t-115.5%20248.5-184.5%20210.5-258%20146-323%2054.5q-271%200-496-145%2035%204%2078%204%20225%200%20401-138-105-2-188-64.5t-114-159.5q33%205%2061%205%2043%200%2085-11-112-23-185.5-111.5t-73.5-205.5v-4q68%2038%20146%2041-66-44-105-115t-39-154q0-88%2044-163%20121%20149%20294.5%20238.5t371.5%2099.5q-8-38-8-74%200-134%2094.5-228.5t228.5-94.5q140%200%20236%20102%20109-21%20205-78-37%20115-142%20178%2093-10%20186-50z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E";
31010
31023
 
31011
31024
  var twitter = {
31012
31025
  key: 'twitter',
31013
31026
  name: 'Twitter',
31014
31027
  color: '#55acee',
31015
- icon: icon$g,
31028
+ icon: icon$h,
31016
31029
  windowSize: {
31017
31030
  width: 800,
31018
31031
  height: 440
31019
31032
  }
31020
31033
  };
31021
31034
 
31022
- var icon$h = "data:image/svg+xml,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M1853%20520q23%2064-150%20294-24%2032-65%2085-78%20100-90%20131-17%2041%2014%2081%2017%2021%2081%2082h1l1%201%201%201%202%202q141%20131%20191%20221%203%205%206.5%2012.5t7%2026.5-.5%2034-25%2027.5-59%2012.5l-256%204q-24%205-56-5t-52-22l-20-12q-30-21-70-64t-68.5-77.5-61-58-56.5-15.5q-3%201-8%203.5t-17%2014.5-21.5%2029.5-17%2052-6.5%2077.5q0%2015-3.5%2027.5t-7.5%2018.5l-4%205q-18%2019-53%2022h-115q-71%204-146-16.5t-131.5-53-103-66-70.5-57.5l-25-24q-10-10-27.5-30t-71.5-91-106-151-122.5-211-130.5-272q-6-16-6-27t3-16l4-6q15-19%2057-19l274-2q12%202%2023%206.5t16%208.5l5%203q16%2011%2024%2032%2020%2050%2046%20103.5t41%2081.5l16%2029q29%2060%2056%20104t48.5%2068.5%2041.5%2038.5%2034%2014%2027-5q2-1%205-5t12-22%2013.5-47%209.5-81%200-125q-2-40-9-73t-14-46l-6-12q-25-34-85-43-13-2%205-24%2017-19%2038-30%2053-26%20239-24%2082%201%20135%2013%2020%205%2033.5%2013.5t20.5%2024%2010.5%2032%203.5%2045.5-1%2055-2.5%2070.5-1.5%2082.5q0%2011-1%2042t-.5%2048%203.5%2040.5%2011.5%2039%2022.5%2024.5q8%202%2017%204t26-11%2038-34.5%2052-67%2068-107.5q60-104%20107-225%204-10%2010-17.5t11-10.5l4-3%205-2.5%2013-3%2020-.5%20288-2q39-5%2064%202.5t31%2016.5z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E";
31035
+ var icon$i = "data:image/svg+xml,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M1853%20520q23%2064-150%20294-24%2032-65%2085-78%20100-90%20131-17%2041%2014%2081%2017%2021%2081%2082h1l1%201%201%201%202%202q141%20131%20191%20221%203%205%206.5%2012.5t7%2026.5-.5%2034-25%2027.5-59%2012.5l-256%204q-24%205-56-5t-52-22l-20-12q-30-21-70-64t-68.5-77.5-61-58-56.5-15.5q-3%201-8%203.5t-17%2014.5-21.5%2029.5-17%2052-6.5%2077.5q0%2015-3.5%2027.5t-7.5%2018.5l-4%205q-18%2019-53%2022h-115q-71%204-146-16.5t-131.5-53-103-66-70.5-57.5l-25-24q-10-10-27.5-30t-71.5-91-106-151-122.5-211-130.5-272q-6-16-6-27t3-16l4-6q15-19%2057-19l274-2q12%202%2023%206.5t16%208.5l5%203q16%2011%2024%2032%2020%2050%2046%20103.5t41%2081.5l16%2029q29%2060%2056%20104t48.5%2068.5%2041.5%2038.5%2034%2014%2027-5q2-1%205-5t12-22%2013.5-47%209.5-81%200-125q-2-40-9-73t-14-46l-6-12q-25-34-85-43-13-2%205-24%2017-19%2038-30%2053-26%20239-24%2082%201%20135%2013%2020%205%2033.5%2013.5t20.5%2024%2010.5%2032%203.5%2045.5-1%2055-2.5%2070.5-1.5%2082.5q0%2011-1%2042t-.5%2048%203.5%2040.5%2011.5%2039%2022.5%2024.5q8%202%2017%204t26-11%2038-34.5%2052-67%2068-107.5q60-104%20107-225%204-10%2010-17.5t11-10.5l4-3%205-2.5%2013-3%2020-.5%20288-2q39-5%2064%202.5t31%2016.5z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E";
31023
31036
 
31024
31037
  var vkontakte = {
31025
31038
  key: 'vkontakte',
31026
31039
  fontKey: 'vk',
31027
31040
  name: 'VKontakte',
31028
31041
  color: '#45668e',
31029
- icon: icon$h,
31042
+ icon: icon$i,
31030
31043
  windowSize: {
31031
31044
  width: 655,
31032
31045
  height: 430
31033
31046
  }
31034
31047
  };
31035
31048
 
31036
- var icon$i = "data:image/svg+xml,%3Csvg%20width%3D%222048%22%20height%3D%221792%22%20viewBox%3D%220%200%202048%201792%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M580%20461q0-41-25-66t-66-25q-43%200-76%2025.5t-33%2065.5q0%2039%2033%2064.5t76%2025.5q41%200%2066-24.5t25-65.5zm743%20507q0-28-25.5-50t-65.5-22q-27%200-49.5%2022.5t-22.5%2049.5q0%2028%2022.5%2050.5t49.5%2022.5q40%200%2065.5-22t25.5-51zm-236-507q0-41-24.5-66t-65.5-25q-43%200-76%2025.5t-33%2065.5q0%2039%2033%2064.5t76%2025.5q41%200%2065.5-24.5t24.5-65.5zm635%20507q0-28-26-50t-65-22q-27%200-49.5%2022.5t-22.5%2049.5q0%2028%2022.5%2050.5t49.5%2022.5q39%200%2065-22t26-51zm-266-397q-31-4-70-4-169%200-311%2077t-223.5%20208.5-81.5%20287.5q0%2078%2023%20152-35%203-68%203-26%200-50-1.5t-55-6.5-44.5-7-54.5-10.5-50-10.5l-253%20127%2072-218q-290-203-290-490%200-169%2097.5-311t264-223.5%20363.5-81.5q176%200%20332.5%2066t262%20182.5%20136.5%20260.5zm592%20561q0%20117-68.5%20223.5t-185.5%20193.5l55%20181-199-109q-150%2037-218%2037-169%200-311-70.5t-223.5-191.5-81.5-264%2081.5-264%20223.5-191.5%20311-70.5q161%200%20303%2070.5t227.5%20192%2085.5%20263.5z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E";
31049
+ var icon$j = "data:image/svg+xml,%3Csvg%20width%3D%222048%22%20height%3D%221792%22%20viewBox%3D%220%200%202048%201792%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M580%20461q0-41-25-66t-66-25q-43%200-76%2025.5t-33%2065.5q0%2039%2033%2064.5t76%2025.5q41%200%2066-24.5t25-65.5zm743%20507q0-28-25.5-50t-65.5-22q-27%200-49.5%2022.5t-22.5%2049.5q0%2028%2022.5%2050.5t49.5%2022.5q40%200%2065.5-22t25.5-51zm-236-507q0-41-24.5-66t-65.5-25q-43%200-76%2025.5t-33%2065.5q0%2039%2033%2064.5t76%2025.5q41%200%2065.5-24.5t24.5-65.5zm635%20507q0-28-26-50t-65-22q-27%200-49.5%2022.5t-22.5%2049.5q0%2028%2022.5%2050.5t49.5%2022.5q39%200%2065-22t26-51zm-266-397q-31-4-70-4-169%200-311%2077t-223.5%20208.5-81.5%20287.5q0%2078%2023%20152-35%203-68%203-26%200-50-1.5t-55-6.5-44.5-7-54.5-10.5-50-10.5l-253%20127%2072-218q-290-203-290-490%200-169%2097.5-311t264-223.5%20363.5-81.5q176%200%20332.5%2066t262%20182.5%20136.5%20260.5zm592%20561q0%20117-68.5%20223.5t-185.5%20193.5l55%20181-199-109q-150%2037-218%2037-169%200-311-70.5t-223.5-191.5-81.5-264%2081.5-264%20223.5-191.5%20311-70.5q161%200%20303%2070.5t227.5%20192%2085.5%20263.5z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E";
31037
31050
 
31038
31051
  var wechat = {
31039
31052
  key: 'wechat',
31040
31053
  name: 'WeChat',
31041
31054
  color: '#44b549',
31042
- icon: icon$i,
31055
+ icon: icon$j,
31043
31056
  windowSize: {
31044
31057
  width: 450,
31045
31058
  height: 400
31046
31059
  }
31047
31060
  };
31048
31061
 
31049
- var icon$j = "data:image/svg+xml,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M675%201284q21-34%2011-69t-45-50q-34-14-73-1t-60%2046q-22%2034-13%2068.5t43%2050.5%2074.5%202.5%2062.5-47.5zm94-121q8-13%203.5-26.5t-17.5-18.5q-14-5-28.5.5t-21.5%2018.5q-17%2031%2013%2045%2014%205%2029-.5t22-18.5zm174%20107q-45%20102-158%20150t-224%2012q-107-34-147.5-126.5t6.5-187.5q47-93%20151.5-139t210.5-19q111%2029%20158.5%20119.5t2.5%20190.5zm312-160q-9-96-89-170t-208.5-109-274.5-21q-223%2023-369.5%20141.5t-132.5%20264.5q9%2096%2089%20170t208.5%20109%20274.5%2021q223-23%20369.5-141.5t132.5-264.5zm308%204q0%2068-37%20139.5t-109%20137-168.5%20117.5-226%2083-270.5%2031-275-33.5-240.5-93-171.5-151-65-199.5q0-115%2069.5-245t197.5-258q169-169%20341.5-236t246.5%207q65%2064%2020%20209-4%2014-1%2020t10%207%2014.5-.5%2013.5-3.5l6-2q139-59%20246-59t153%2061q45%2063%200%20178-2%2013-4.5%2020t4.5%2012.5%2012%207.5%2017%206q57%2018%20103%2047t80%2081.5%2034%20116.5zm-74-624q42%2047%2054.5%20108.5t-6.5%20117.5q-8%2023-29.5%2034t-44.5%204q-23-8-34-29.5t-4-44.5q20-63-24-111t-107-35q-24%205-45-8t-25-37q-5-24%208-44.5t37-25.5q60-13%20119%205.5t101%2065.5zm181-163q87%2096%20112.5%20222.5t-13.5%20241.5q-9%2027-34%2040t-52%204-40-34-5-52q28-82%2010-172t-80-158q-62-69-148-95.5t-173-8.5q-28%206-52-9.5t-30-43.5%209.5-51.5%2043.5-29.5q123-26%20244%2011.5t208%20134.5z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E";
31062
+ var icon$k = "data:image/svg+xml,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M675%201284q21-34%2011-69t-45-50q-34-14-73-1t-60%2046q-22%2034-13%2068.5t43%2050.5%2074.5%202.5%2062.5-47.5zm94-121q8-13%203.5-26.5t-17.5-18.5q-14-5-28.5.5t-21.5%2018.5q-17%2031%2013%2045%2014%205%2029-.5t22-18.5zm174%20107q-45%20102-158%20150t-224%2012q-107-34-147.5-126.5t6.5-187.5q47-93%20151.5-139t210.5-19q111%2029%20158.5%20119.5t2.5%20190.5zm312-160q-9-96-89-170t-208.5-109-274.5-21q-223%2023-369.5%20141.5t-132.5%20264.5q9%2096%2089%20170t208.5%20109%20274.5%2021q223-23%20369.5-141.5t132.5-264.5zm308%204q0%2068-37%20139.5t-109%20137-168.5%20117.5-226%2083-270.5%2031-275-33.5-240.5-93-171.5-151-65-199.5q0-115%2069.5-245t197.5-258q169-169%20341.5-236t246.5%207q65%2064%2020%20209-4%2014-1%2020t10%207%2014.5-.5%2013.5-3.5l6-2q139-59%20246-59t153%2061q45%2063%200%20178-2%2013-4.5%2020t4.5%2012.5%2012%207.5%2017%206q57%2018%20103%2047t80%2081.5%2034%20116.5zm-74-624q42%2047%2054.5%20108.5t-6.5%20117.5q-8%2023-29.5%2034t-44.5%204q-23-8-34-29.5t-4-44.5q20-63-24-111t-107-35q-24%205-45-8t-25-37q-5-24%208-44.5t37-25.5q60-13%20119%205.5t101%2065.5zm181-163q87%2096%20112.5%20222.5t-13.5%20241.5q-9%2027-34%2040t-52%204-40-34-5-52q28-82%2010-172t-80-158q-62-69-148-95.5t-173-8.5q-28%206-52-9.5t-30-43.5%209.5-51.5%2043.5-29.5q123-26%20244%2011.5t208%20134.5z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E";
31050
31063
 
31051
31064
  var weibo = {
31052
31065
  key: 'weibo',
31053
31066
  name: 'Weibo',
31054
31067
  color: '#e71d34',
31055
- icon: icon$j
31068
+ icon: icon$k
31056
31069
  };
31057
31070
 
31058
- var icon$k = "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M937%201004l266-499h-112l-157%20312q-24%2048-44%2092l-42-92-155-312h-120l263%20493v324h101v-318zm727-588v960q0%20119-84.5%20203.5t-203.5%2084.5h-960q-119%200-203.5-84.5t-84.5-203.5v-960q0-119%2084.5-203.5t203.5-84.5h960q119%200%20203.5%2084.5t84.5%20203.5z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E";
31071
+ var icon$l = "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M937%201004l266-499h-112l-157%20312q-24%2048-44%2092l-42-92-155-312h-120l263%20493v324h101v-318zm727-588v960q0%20119-84.5%20203.5t-203.5%2084.5h-960q-119%200-203.5-84.5t-84.5-203.5v-960q0-119%2084.5-203.5t203.5-84.5h960q119%200%20203.5%2084.5t84.5%20203.5z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E";
31059
31072
 
31060
31073
  var yandex = {
31061
31074
  key: 'yandex',
31062
31075
  name: 'Yandex',
31063
31076
  color: '#d43b2f',
31064
- icon: icon$k,
31077
+ icon: icon$l,
31065
31078
  windowSize: {
31066
31079
  width: 655,
31067
31080
  height: 700
@@ -31085,6 +31098,7 @@
31085
31098
  oney: oney,
31086
31099
  orange: orange,
31087
31100
  paypal: paypal,
31101
+ ping: ping,
31088
31102
  qq: qq,
31089
31103
  twitter: twitter,
31090
31104
  vkontakte: vkontakte,
@@ -38402,7 +38416,7 @@
38402
38416
  module.exports = exports["default"];
38403
38417
  module.exports["default"] = exports["default"];
38404
38418
  });
38405
- var isISO8601 = /*@__PURE__*/unwrapExports(validator_1);
38419
+ var validator = /*@__PURE__*/unwrapExports(validator_1);
38406
38420
 
38407
38421
  // This file is a workaround for a bug in web browsers' "native"
38408
38422
  // ES6 importing system which is uncapable of importing "*.json" files.
@@ -45122,15 +45136,15 @@
45122
45136
  hint: 'checked'
45123
45137
  });
45124
45138
  var email = new Validator({
45125
- rule: isISO8601.isEmail,
45139
+ rule: validator.isEmail,
45126
45140
  hint: 'email'
45127
45141
  });
45128
45142
  var integer = new Validator({
45129
- rule: isISO8601.isInt,
45143
+ rule: validator.isInt,
45130
45144
  hint: 'integer'
45131
45145
  });
45132
45146
  var _float = new Validator({
45133
- rule: isISO8601.isFloat,
45147
+ rule: validator.isFloat,
45134
45148
  hint: 'float'
45135
45149
  });
45136
45150
 
@@ -46412,6 +46426,7 @@
46412
46426
  var _this$props$value = this.props.value,
46413
46427
  userInput = _this$props$value.userInput,
46414
46428
  country = _this$props$value.country;
46429
+ if (!userInput) return;
46415
46430
  try {
46416
46431
  var parsed = parse$1(userInput, country);
46417
46432
  var phoneValue = country === parsed.country ? format(parsed, 'National') : userInput;
@@ -47666,7 +47681,7 @@
47666
47681
  validator: new Validator({
47667
47682
  rule: function rule(value) {
47668
47683
  var date = formatDate(value);
47669
- return !date || isISO8601(date);
47684
+ return !date || validator.isISO8601(date);
47670
47685
  },
47671
47686
  hint: 'date'
47672
47687
  })
@@ -56014,7 +56029,7 @@
56014
56029
  }, {})) : {};
56015
56030
  }
56016
56031
  if (isSubmitted || day.isDirty || month.isDirty || year.isDirty) {
56017
- if (!isISO8601.isNumeric(year.value.toString()) || !DateTime.fromObject({
56032
+ if (!validator.isNumeric(year.value.toString()) || !DateTime.fromObject({
56018
56033
  year: parseInt(year.value, 10)
56019
56034
  }).isValid) {
56020
56035
  return {
@@ -56023,13 +56038,13 @@
56023
56038
  };
56024
56039
  }
56025
56040
  var birthdate = format$1(state);
56026
- if (!birthdate || !isISO8601.isISO8601(birthdate)) {
56041
+ if (!birthdate || !validator.isISO8601(birthdate)) {
56027
56042
  return {
56028
56043
  error: i18n('validation.birthdate.dayOfMonth'),
56029
56044
  day: true
56030
56045
  };
56031
56046
  }
56032
- if (!(isISO8601.isNumeric(month.value.toString()) && isISO8601.isNumeric(day.value.toString())) || !DateTime.fromObject({
56047
+ if (!(validator.isNumeric(month.value.toString()) && validator.isNumeric(day.value.toString())) || !DateTime.fromObject({
56033
56048
  year: year.value,
56034
56049
  month: month.value,
56035
56050
  day: day.value
@@ -60437,6 +60452,1939 @@
60437
60452
  return UiClient;
60438
60453
  }();
60439
60454
 
60455
+ var byteLength_1$1 = byteLength$1;
60456
+ var toByteArray_1$1 = toByteArray$1;
60457
+ var fromByteArray_1$1 = fromByteArray$1;
60458
+ var lookup$1 = [];
60459
+ var revLookup$1 = [];
60460
+ var Arr$1 = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;
60461
+ var code$2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
60462
+ for (var i$2 = 0, len$1 = code$2.length; i$2 < len$1; ++i$2) {
60463
+ lookup$1[i$2] = code$2[i$2];
60464
+ revLookup$1[code$2.charCodeAt(i$2)] = i$2;
60465
+ }
60466
+
60467
+ // Support decoding URL-safe base64 strings, as Node.js does.
60468
+ // See: https://en.wikipedia.org/wiki/Base64#URL_applications
60469
+ revLookup$1['-'.charCodeAt(0)] = 62;
60470
+ revLookup$1['_'.charCodeAt(0)] = 63;
60471
+ function getLens$1(b64) {
60472
+ var len = b64.length;
60473
+ if (len % 4 > 0) {
60474
+ throw new Error('Invalid string. Length must be a multiple of 4');
60475
+ }
60476
+
60477
+ // Trim off extra bytes after placeholder bytes are found
60478
+ // See: https://github.com/beatgammit/base64-js/issues/42
60479
+ var validLen = b64.indexOf('=');
60480
+ if (validLen === -1) validLen = len;
60481
+ var placeHoldersLen = validLen === len ? 0 : 4 - validLen % 4;
60482
+ return [validLen, placeHoldersLen];
60483
+ }
60484
+
60485
+ // base64 is 4/3 + up to two characters of the original data
60486
+ function byteLength$1(b64) {
60487
+ var lens = getLens$1(b64);
60488
+ var validLen = lens[0];
60489
+ var placeHoldersLen = lens[1];
60490
+ return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
60491
+ }
60492
+ function _byteLength$1(b64, validLen, placeHoldersLen) {
60493
+ return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
60494
+ }
60495
+ function toByteArray$1(b64) {
60496
+ var tmp;
60497
+ var lens = getLens$1(b64);
60498
+ var validLen = lens[0];
60499
+ var placeHoldersLen = lens[1];
60500
+ var arr = new Arr$1(_byteLength$1(b64, validLen, placeHoldersLen));
60501
+ var curByte = 0;
60502
+
60503
+ // if there are placeholders, only get up to the last complete 4 chars
60504
+ var len = placeHoldersLen > 0 ? validLen - 4 : validLen;
60505
+ var i;
60506
+ for (i = 0; i < len; i += 4) {
60507
+ tmp = revLookup$1[b64.charCodeAt(i)] << 18 | revLookup$1[b64.charCodeAt(i + 1)] << 12 | revLookup$1[b64.charCodeAt(i + 2)] << 6 | revLookup$1[b64.charCodeAt(i + 3)];
60508
+ arr[curByte++] = tmp >> 16 & 0xFF;
60509
+ arr[curByte++] = tmp >> 8 & 0xFF;
60510
+ arr[curByte++] = tmp & 0xFF;
60511
+ }
60512
+ if (placeHoldersLen === 2) {
60513
+ tmp = revLookup$1[b64.charCodeAt(i)] << 2 | revLookup$1[b64.charCodeAt(i + 1)] >> 4;
60514
+ arr[curByte++] = tmp & 0xFF;
60515
+ }
60516
+ if (placeHoldersLen === 1) {
60517
+ tmp = revLookup$1[b64.charCodeAt(i)] << 10 | revLookup$1[b64.charCodeAt(i + 1)] << 4 | revLookup$1[b64.charCodeAt(i + 2)] >> 2;
60518
+ arr[curByte++] = tmp >> 8 & 0xFF;
60519
+ arr[curByte++] = tmp & 0xFF;
60520
+ }
60521
+ return arr;
60522
+ }
60523
+ function tripletToBase64$1(num) {
60524
+ return lookup$1[num >> 18 & 0x3F] + lookup$1[num >> 12 & 0x3F] + lookup$1[num >> 6 & 0x3F] + lookup$1[num & 0x3F];
60525
+ }
60526
+ function encodeChunk$1(uint8, start, end) {
60527
+ var tmp;
60528
+ var output = [];
60529
+ for (var i = start; i < end; i += 3) {
60530
+ tmp = (uint8[i] << 16 & 0xFF0000) + (uint8[i + 1] << 8 & 0xFF00) + (uint8[i + 2] & 0xFF);
60531
+ output.push(tripletToBase64$1(tmp));
60532
+ }
60533
+ return output.join('');
60534
+ }
60535
+ function fromByteArray$1(uint8) {
60536
+ var tmp;
60537
+ var len = uint8.length;
60538
+ var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes
60539
+ var parts = [];
60540
+ var maxChunkLength = 16383; // must be multiple of 3
60541
+
60542
+ // go through the array every three bytes, we'll deal with trailing stuff later
60543
+ for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
60544
+ parts.push(encodeChunk$1(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));
60545
+ }
60546
+
60547
+ // pad the end with zeros, but make sure to not forget the extra bytes
60548
+ if (extraBytes === 1) {
60549
+ tmp = uint8[len - 1];
60550
+ parts.push(lookup$1[tmp >> 2] + lookup$1[tmp << 4 & 0x3F] + '==');
60551
+ } else if (extraBytes === 2) {
60552
+ tmp = (uint8[len - 2] << 8) + uint8[len - 1];
60553
+ parts.push(lookup$1[tmp >> 10] + lookup$1[tmp >> 4 & 0x3F] + lookup$1[tmp << 2 & 0x3F] + '=');
60554
+ }
60555
+ return parts.join('');
60556
+ }
60557
+ var base64Js$1 = {
60558
+ byteLength: byteLength_1$1,
60559
+ toByteArray: toByteArray_1$1,
60560
+ fromByteArray: fromByteArray_1$1
60561
+ };
60562
+
60563
+ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
60564
+ var read$1 = function read(buffer, offset, isLE, mLen, nBytes) {
60565
+ var e, m;
60566
+ var eLen = nBytes * 8 - mLen - 1;
60567
+ var eMax = (1 << eLen) - 1;
60568
+ var eBias = eMax >> 1;
60569
+ var nBits = -7;
60570
+ var i = isLE ? nBytes - 1 : 0;
60571
+ var d = isLE ? -1 : 1;
60572
+ var s = buffer[offset + i];
60573
+ i += d;
60574
+ e = s & (1 << -nBits) - 1;
60575
+ s >>= -nBits;
60576
+ nBits += eLen;
60577
+ for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
60578
+ m = e & (1 << -nBits) - 1;
60579
+ e >>= -nBits;
60580
+ nBits += mLen;
60581
+ for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
60582
+ if (e === 0) {
60583
+ e = 1 - eBias;
60584
+ } else if (e === eMax) {
60585
+ return m ? NaN : (s ? -1 : 1) * Infinity;
60586
+ } else {
60587
+ m = m + Math.pow(2, mLen);
60588
+ e = e - eBias;
60589
+ }
60590
+ return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
60591
+ };
60592
+ var write$1 = function write(buffer, value, offset, isLE, mLen, nBytes) {
60593
+ var e, m, c;
60594
+ var eLen = nBytes * 8 - mLen - 1;
60595
+ var eMax = (1 << eLen) - 1;
60596
+ var eBias = eMax >> 1;
60597
+ var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
60598
+ var i = isLE ? 0 : nBytes - 1;
60599
+ var d = isLE ? 1 : -1;
60600
+ var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
60601
+ value = Math.abs(value);
60602
+ if (isNaN(value) || value === Infinity) {
60603
+ m = isNaN(value) ? 1 : 0;
60604
+ e = eMax;
60605
+ } else {
60606
+ e = Math.floor(Math.log(value) / Math.LN2);
60607
+ if (value * (c = Math.pow(2, -e)) < 1) {
60608
+ e--;
60609
+ c *= 2;
60610
+ }
60611
+ if (e + eBias >= 1) {
60612
+ value += rt / c;
60613
+ } else {
60614
+ value += rt * Math.pow(2, 1 - eBias);
60615
+ }
60616
+ if (value * c >= 2) {
60617
+ e++;
60618
+ c /= 2;
60619
+ }
60620
+ if (e + eBias >= eMax) {
60621
+ m = 0;
60622
+ e = eMax;
60623
+ } else if (e + eBias >= 1) {
60624
+ m = (value * c - 1) * Math.pow(2, mLen);
60625
+ e = e + eBias;
60626
+ } else {
60627
+ m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
60628
+ e = 0;
60629
+ }
60630
+ }
60631
+ for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
60632
+ e = e << mLen | m;
60633
+ eLen += mLen;
60634
+ for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
60635
+ buffer[offset + i - d] |= s * 128;
60636
+ };
60637
+ var ieee754$2 = {
60638
+ read: read$1,
60639
+ write: write$1
60640
+ };
60641
+
60642
+ var buffer$1 = createCommonjsModule(function (module, exports) {
60643
+
60644
+ var customInspectSymbol = typeof Symbol === 'function' && typeof Symbol['for'] === 'function' // eslint-disable-line dot-notation
60645
+ ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation
60646
+ : null;
60647
+ exports.Buffer = Buffer;
60648
+ exports.SlowBuffer = SlowBuffer;
60649
+ exports.INSPECT_MAX_BYTES = 50;
60650
+ var K_MAX_LENGTH = 0x7fffffff;
60651
+ exports.kMaxLength = K_MAX_LENGTH;
60652
+
60653
+ /**
60654
+ * If `Buffer.TYPED_ARRAY_SUPPORT`:
60655
+ * === true Use Uint8Array implementation (fastest)
60656
+ * === false Print warning and recommend using `buffer` v4.x which has an Object
60657
+ * implementation (most compatible, even IE6)
60658
+ *
60659
+ * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
60660
+ * Opera 11.6+, iOS 4.2+.
60661
+ *
60662
+ * We report that the browser does not support typed arrays if the are not subclassable
60663
+ * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`
60664
+ * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support
60665
+ * for __proto__ and has a buggy typed array implementation.
60666
+ */
60667
+ Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport();
60668
+ if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && typeof console.error === 'function') {
60669
+ console.error('This browser lacks typed array (Uint8Array) support which is required by ' + '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.');
60670
+ }
60671
+ function typedArraySupport() {
60672
+ // Can typed array instances can be augmented?
60673
+ try {
60674
+ var arr = new Uint8Array(1);
60675
+ var proto = {
60676
+ foo: function foo() {
60677
+ return 42;
60678
+ }
60679
+ };
60680
+ Object.setPrototypeOf(proto, Uint8Array.prototype);
60681
+ Object.setPrototypeOf(arr, proto);
60682
+ return arr.foo() === 42;
60683
+ } catch (e) {
60684
+ return false;
60685
+ }
60686
+ }
60687
+ Object.defineProperty(Buffer.prototype, 'parent', {
60688
+ enumerable: true,
60689
+ get: function get() {
60690
+ if (!Buffer.isBuffer(this)) return undefined;
60691
+ return this.buffer;
60692
+ }
60693
+ });
60694
+ Object.defineProperty(Buffer.prototype, 'offset', {
60695
+ enumerable: true,
60696
+ get: function get() {
60697
+ if (!Buffer.isBuffer(this)) return undefined;
60698
+ return this.byteOffset;
60699
+ }
60700
+ });
60701
+ function createBuffer(length) {
60702
+ if (length > K_MAX_LENGTH) {
60703
+ throw new RangeError('The value "' + length + '" is invalid for option "size"');
60704
+ }
60705
+ // Return an augmented `Uint8Array` instance
60706
+ var buf = new Uint8Array(length);
60707
+ Object.setPrototypeOf(buf, Buffer.prototype);
60708
+ return buf;
60709
+ }
60710
+
60711
+ /**
60712
+ * The Buffer constructor returns instances of `Uint8Array` that have their
60713
+ * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
60714
+ * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
60715
+ * and the `Uint8Array` methods. Square bracket notation works as expected -- it
60716
+ * returns a single octet.
60717
+ *
60718
+ * The `Uint8Array` prototype remains unmodified.
60719
+ */
60720
+
60721
+ function Buffer(arg, encodingOrOffset, length) {
60722
+ // Common case.
60723
+ if (typeof arg === 'number') {
60724
+ if (typeof encodingOrOffset === 'string') {
60725
+ throw new TypeError('The "string" argument must be of type string. Received type number');
60726
+ }
60727
+ return allocUnsafe(arg);
60728
+ }
60729
+ return from(arg, encodingOrOffset, length);
60730
+ }
60731
+ Buffer.poolSize = 8192; // not used by this implementation
60732
+
60733
+ function from(value, encodingOrOffset, length) {
60734
+ if (typeof value === 'string') {
60735
+ return fromString(value, encodingOrOffset);
60736
+ }
60737
+ if (ArrayBuffer.isView(value)) {
60738
+ return fromArrayView(value);
60739
+ }
60740
+ if (value == null) {
60741
+ throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + 'or Array-like Object. Received type ' + _typeof(value));
60742
+ }
60743
+ if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) {
60744
+ return fromArrayBuffer(value, encodingOrOffset, length);
60745
+ }
60746
+ if (typeof SharedArrayBuffer !== 'undefined' && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) {
60747
+ return fromArrayBuffer(value, encodingOrOffset, length);
60748
+ }
60749
+ if (typeof value === 'number') {
60750
+ throw new TypeError('The "value" argument must not be of type number. Received type number');
60751
+ }
60752
+ var valueOf = value.valueOf && value.valueOf();
60753
+ if (valueOf != null && valueOf !== value) {
60754
+ return Buffer.from(valueOf, encodingOrOffset, length);
60755
+ }
60756
+ var b = fromObject(value);
60757
+ if (b) return b;
60758
+ if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === 'function') {
60759
+ return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length);
60760
+ }
60761
+ throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + 'or Array-like Object. Received type ' + _typeof(value));
60762
+ }
60763
+
60764
+ /**
60765
+ * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
60766
+ * if value is a number.
60767
+ * Buffer.from(str[, encoding])
60768
+ * Buffer.from(array)
60769
+ * Buffer.from(buffer)
60770
+ * Buffer.from(arrayBuffer[, byteOffset[, length]])
60771
+ **/
60772
+ Buffer.from = function (value, encodingOrOffset, length) {
60773
+ return from(value, encodingOrOffset, length);
60774
+ };
60775
+
60776
+ // Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:
60777
+ // https://github.com/feross/buffer/pull/148
60778
+ Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype);
60779
+ Object.setPrototypeOf(Buffer, Uint8Array);
60780
+ function assertSize(size) {
60781
+ if (typeof size !== 'number') {
60782
+ throw new TypeError('"size" argument must be of type number');
60783
+ } else if (size < 0) {
60784
+ throw new RangeError('The value "' + size + '" is invalid for option "size"');
60785
+ }
60786
+ }
60787
+ function alloc(size, fill, encoding) {
60788
+ assertSize(size);
60789
+ if (size <= 0) {
60790
+ return createBuffer(size);
60791
+ }
60792
+ if (fill !== undefined) {
60793
+ // Only pay attention to encoding if it's a string. This
60794
+ // prevents accidentally sending in a number that would
60795
+ // be interpreted as a start offset.
60796
+ return typeof encoding === 'string' ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill);
60797
+ }
60798
+ return createBuffer(size);
60799
+ }
60800
+
60801
+ /**
60802
+ * Creates a new filled Buffer instance.
60803
+ * alloc(size[, fill[, encoding]])
60804
+ **/
60805
+ Buffer.alloc = function (size, fill, encoding) {
60806
+ return alloc(size, fill, encoding);
60807
+ };
60808
+ function allocUnsafe(size) {
60809
+ assertSize(size);
60810
+ return createBuffer(size < 0 ? 0 : checked(size) | 0);
60811
+ }
60812
+
60813
+ /**
60814
+ * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
60815
+ * */
60816
+ Buffer.allocUnsafe = function (size) {
60817
+ return allocUnsafe(size);
60818
+ };
60819
+ /**
60820
+ * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
60821
+ */
60822
+ Buffer.allocUnsafeSlow = function (size) {
60823
+ return allocUnsafe(size);
60824
+ };
60825
+ function fromString(string, encoding) {
60826
+ if (typeof encoding !== 'string' || encoding === '') {
60827
+ encoding = 'utf8';
60828
+ }
60829
+ if (!Buffer.isEncoding(encoding)) {
60830
+ throw new TypeError('Unknown encoding: ' + encoding);
60831
+ }
60832
+ var length = byteLength(string, encoding) | 0;
60833
+ var buf = createBuffer(length);
60834
+ var actual = buf.write(string, encoding);
60835
+ if (actual !== length) {
60836
+ // Writing a hex string, for example, that contains invalid characters will
60837
+ // cause everything after the first invalid character to be ignored. (e.g.
60838
+ // 'abxxcd' will be treated as 'ab')
60839
+ buf = buf.slice(0, actual);
60840
+ }
60841
+ return buf;
60842
+ }
60843
+ function fromArrayLike(array) {
60844
+ var length = array.length < 0 ? 0 : checked(array.length) | 0;
60845
+ var buf = createBuffer(length);
60846
+ for (var i = 0; i < length; i += 1) {
60847
+ buf[i] = array[i] & 255;
60848
+ }
60849
+ return buf;
60850
+ }
60851
+ function fromArrayView(arrayView) {
60852
+ if (isInstance(arrayView, Uint8Array)) {
60853
+ var copy = new Uint8Array(arrayView);
60854
+ return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength);
60855
+ }
60856
+ return fromArrayLike(arrayView);
60857
+ }
60858
+ function fromArrayBuffer(array, byteOffset, length) {
60859
+ if (byteOffset < 0 || array.byteLength < byteOffset) {
60860
+ throw new RangeError('"offset" is outside of buffer bounds');
60861
+ }
60862
+ if (array.byteLength < byteOffset + (length || 0)) {
60863
+ throw new RangeError('"length" is outside of buffer bounds');
60864
+ }
60865
+ var buf;
60866
+ if (byteOffset === undefined && length === undefined) {
60867
+ buf = new Uint8Array(array);
60868
+ } else if (length === undefined) {
60869
+ buf = new Uint8Array(array, byteOffset);
60870
+ } else {
60871
+ buf = new Uint8Array(array, byteOffset, length);
60872
+ }
60873
+
60874
+ // Return an augmented `Uint8Array` instance
60875
+ Object.setPrototypeOf(buf, Buffer.prototype);
60876
+ return buf;
60877
+ }
60878
+ function fromObject(obj) {
60879
+ if (Buffer.isBuffer(obj)) {
60880
+ var len = checked(obj.length) | 0;
60881
+ var buf = createBuffer(len);
60882
+ if (buf.length === 0) {
60883
+ return buf;
60884
+ }
60885
+ obj.copy(buf, 0, 0, len);
60886
+ return buf;
60887
+ }
60888
+ if (obj.length !== undefined) {
60889
+ if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {
60890
+ return createBuffer(0);
60891
+ }
60892
+ return fromArrayLike(obj);
60893
+ }
60894
+ if (obj.type === 'Buffer' && Array.isArray(obj.data)) {
60895
+ return fromArrayLike(obj.data);
60896
+ }
60897
+ }
60898
+ function checked(length) {
60899
+ // Note: cannot use `length < K_MAX_LENGTH` here because that fails when
60900
+ // length is NaN (which is otherwise coerced to zero.)
60901
+ if (length >= K_MAX_LENGTH) {
60902
+ throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes');
60903
+ }
60904
+ return length | 0;
60905
+ }
60906
+ function SlowBuffer(length) {
60907
+ if (+length != length) {
60908
+ // eslint-disable-line eqeqeq
60909
+ length = 0;
60910
+ }
60911
+ return Buffer.alloc(+length);
60912
+ }
60913
+ Buffer.isBuffer = function isBuffer(b) {
60914
+ return b != null && b._isBuffer === true && b !== Buffer.prototype; // so Buffer.isBuffer(Buffer.prototype) will be false
60915
+ };
60916
+
60917
+ Buffer.compare = function compare(a, b) {
60918
+ if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength);
60919
+ if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength);
60920
+ if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
60921
+ throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
60922
+ }
60923
+ if (a === b) return 0;
60924
+ var x = a.length;
60925
+ var y = b.length;
60926
+ for (var i = 0, len = Math.min(x, y); i < len; ++i) {
60927
+ if (a[i] !== b[i]) {
60928
+ x = a[i];
60929
+ y = b[i];
60930
+ break;
60931
+ }
60932
+ }
60933
+ if (x < y) return -1;
60934
+ if (y < x) return 1;
60935
+ return 0;
60936
+ };
60937
+ Buffer.isEncoding = function isEncoding(encoding) {
60938
+ switch (String(encoding).toLowerCase()) {
60939
+ case 'hex':
60940
+ case 'utf8':
60941
+ case 'utf-8':
60942
+ case 'ascii':
60943
+ case 'latin1':
60944
+ case 'binary':
60945
+ case 'base64':
60946
+ case 'ucs2':
60947
+ case 'ucs-2':
60948
+ case 'utf16le':
60949
+ case 'utf-16le':
60950
+ return true;
60951
+ default:
60952
+ return false;
60953
+ }
60954
+ };
60955
+ Buffer.concat = function concat(list, length) {
60956
+ if (!Array.isArray(list)) {
60957
+ throw new TypeError('"list" argument must be an Array of Buffers');
60958
+ }
60959
+ if (list.length === 0) {
60960
+ return Buffer.alloc(0);
60961
+ }
60962
+ var i;
60963
+ if (length === undefined) {
60964
+ length = 0;
60965
+ for (i = 0; i < list.length; ++i) {
60966
+ length += list[i].length;
60967
+ }
60968
+ }
60969
+ var buffer = Buffer.allocUnsafe(length);
60970
+ var pos = 0;
60971
+ for (i = 0; i < list.length; ++i) {
60972
+ var buf = list[i];
60973
+ if (isInstance(buf, Uint8Array)) {
60974
+ if (pos + buf.length > buffer.length) {
60975
+ if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf);
60976
+ buf.copy(buffer, pos);
60977
+ } else {
60978
+ Uint8Array.prototype.set.call(buffer, buf, pos);
60979
+ }
60980
+ } else if (!Buffer.isBuffer(buf)) {
60981
+ throw new TypeError('"list" argument must be an Array of Buffers');
60982
+ } else {
60983
+ buf.copy(buffer, pos);
60984
+ }
60985
+ pos += buf.length;
60986
+ }
60987
+ return buffer;
60988
+ };
60989
+ function byteLength(string, encoding) {
60990
+ if (Buffer.isBuffer(string)) {
60991
+ return string.length;
60992
+ }
60993
+ if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {
60994
+ return string.byteLength;
60995
+ }
60996
+ if (typeof string !== 'string') {
60997
+ throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + 'Received type ' + _typeof(string));
60998
+ }
60999
+ var len = string.length;
61000
+ var mustMatch = arguments.length > 2 && arguments[2] === true;
61001
+ if (!mustMatch && len === 0) return 0;
61002
+
61003
+ // Use a for loop to avoid recursion
61004
+ var loweredCase = false;
61005
+ for (;;) {
61006
+ switch (encoding) {
61007
+ case 'ascii':
61008
+ case 'latin1':
61009
+ case 'binary':
61010
+ return len;
61011
+ case 'utf8':
61012
+ case 'utf-8':
61013
+ return utf8ToBytes(string).length;
61014
+ case 'ucs2':
61015
+ case 'ucs-2':
61016
+ case 'utf16le':
61017
+ case 'utf-16le':
61018
+ return len * 2;
61019
+ case 'hex':
61020
+ return len >>> 1;
61021
+ case 'base64':
61022
+ return base64ToBytes(string).length;
61023
+ default:
61024
+ if (loweredCase) {
61025
+ return mustMatch ? -1 : utf8ToBytes(string).length; // assume utf8
61026
+ }
61027
+
61028
+ encoding = ('' + encoding).toLowerCase();
61029
+ loweredCase = true;
61030
+ }
61031
+ }
61032
+ }
61033
+ Buffer.byteLength = byteLength;
61034
+ function slowToString(encoding, start, end) {
61035
+ var loweredCase = false;
61036
+
61037
+ // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
61038
+ // property of a typed array.
61039
+
61040
+ // This behaves neither like String nor Uint8Array in that we set start/end
61041
+ // to their upper/lower bounds if the value passed is out of range.
61042
+ // undefined is handled specially as per ECMA-262 6th Edition,
61043
+ // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
61044
+ if (start === undefined || start < 0) {
61045
+ start = 0;
61046
+ }
61047
+ // Return early if start > this.length. Done here to prevent potential uint32
61048
+ // coercion fail below.
61049
+ if (start > this.length) {
61050
+ return '';
61051
+ }
61052
+ if (end === undefined || end > this.length) {
61053
+ end = this.length;
61054
+ }
61055
+ if (end <= 0) {
61056
+ return '';
61057
+ }
61058
+
61059
+ // Force coercion to uint32. This will also coerce falsey/NaN values to 0.
61060
+ end >>>= 0;
61061
+ start >>>= 0;
61062
+ if (end <= start) {
61063
+ return '';
61064
+ }
61065
+ if (!encoding) encoding = 'utf8';
61066
+ while (true) {
61067
+ switch (encoding) {
61068
+ case 'hex':
61069
+ return hexSlice(this, start, end);
61070
+ case 'utf8':
61071
+ case 'utf-8':
61072
+ return utf8Slice(this, start, end);
61073
+ case 'ascii':
61074
+ return asciiSlice(this, start, end);
61075
+ case 'latin1':
61076
+ case 'binary':
61077
+ return latin1Slice(this, start, end);
61078
+ case 'base64':
61079
+ return base64Slice(this, start, end);
61080
+ case 'ucs2':
61081
+ case 'ucs-2':
61082
+ case 'utf16le':
61083
+ case 'utf-16le':
61084
+ return utf16leSlice(this, start, end);
61085
+ default:
61086
+ if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
61087
+ encoding = (encoding + '').toLowerCase();
61088
+ loweredCase = true;
61089
+ }
61090
+ }
61091
+ }
61092
+
61093
+ // This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)
61094
+ // to detect a Buffer instance. It's not possible to use `instanceof Buffer`
61095
+ // reliably in a browserify context because there could be multiple different
61096
+ // copies of the 'buffer' package in use. This method works even for Buffer
61097
+ // instances that were created from another copy of the `buffer` package.
61098
+ // See: https://github.com/feross/buffer/issues/154
61099
+ Buffer.prototype._isBuffer = true;
61100
+ function swap(b, n, m) {
61101
+ var i = b[n];
61102
+ b[n] = b[m];
61103
+ b[m] = i;
61104
+ }
61105
+ Buffer.prototype.swap16 = function swap16() {
61106
+ var len = this.length;
61107
+ if (len % 2 !== 0) {
61108
+ throw new RangeError('Buffer size must be a multiple of 16-bits');
61109
+ }
61110
+ for (var i = 0; i < len; i += 2) {
61111
+ swap(this, i, i + 1);
61112
+ }
61113
+ return this;
61114
+ };
61115
+ Buffer.prototype.swap32 = function swap32() {
61116
+ var len = this.length;
61117
+ if (len % 4 !== 0) {
61118
+ throw new RangeError('Buffer size must be a multiple of 32-bits');
61119
+ }
61120
+ for (var i = 0; i < len; i += 4) {
61121
+ swap(this, i, i + 3);
61122
+ swap(this, i + 1, i + 2);
61123
+ }
61124
+ return this;
61125
+ };
61126
+ Buffer.prototype.swap64 = function swap64() {
61127
+ var len = this.length;
61128
+ if (len % 8 !== 0) {
61129
+ throw new RangeError('Buffer size must be a multiple of 64-bits');
61130
+ }
61131
+ for (var i = 0; i < len; i += 8) {
61132
+ swap(this, i, i + 7);
61133
+ swap(this, i + 1, i + 6);
61134
+ swap(this, i + 2, i + 5);
61135
+ swap(this, i + 3, i + 4);
61136
+ }
61137
+ return this;
61138
+ };
61139
+ Buffer.prototype.toString = function toString() {
61140
+ var length = this.length;
61141
+ if (length === 0) return '';
61142
+ if (arguments.length === 0) return utf8Slice(this, 0, length);
61143
+ return slowToString.apply(this, arguments);
61144
+ };
61145
+ Buffer.prototype.toLocaleString = Buffer.prototype.toString;
61146
+ Buffer.prototype.equals = function equals(b) {
61147
+ if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer');
61148
+ if (this === b) return true;
61149
+ return Buffer.compare(this, b) === 0;
61150
+ };
61151
+ Buffer.prototype.inspect = function inspect() {
61152
+ var str = '';
61153
+ var max = exports.INSPECT_MAX_BYTES;
61154
+ str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim();
61155
+ if (this.length > max) str += ' ... ';
61156
+ return '<Buffer ' + str + '>';
61157
+ };
61158
+ if (customInspectSymbol) {
61159
+ Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect;
61160
+ }
61161
+ Buffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {
61162
+ if (isInstance(target, Uint8Array)) {
61163
+ target = Buffer.from(target, target.offset, target.byteLength);
61164
+ }
61165
+ if (!Buffer.isBuffer(target)) {
61166
+ throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. ' + 'Received type ' + _typeof(target));
61167
+ }
61168
+ if (start === undefined) {
61169
+ start = 0;
61170
+ }
61171
+ if (end === undefined) {
61172
+ end = target ? target.length : 0;
61173
+ }
61174
+ if (thisStart === undefined) {
61175
+ thisStart = 0;
61176
+ }
61177
+ if (thisEnd === undefined) {
61178
+ thisEnd = this.length;
61179
+ }
61180
+ if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
61181
+ throw new RangeError('out of range index');
61182
+ }
61183
+ if (thisStart >= thisEnd && start >= end) {
61184
+ return 0;
61185
+ }
61186
+ if (thisStart >= thisEnd) {
61187
+ return -1;
61188
+ }
61189
+ if (start >= end) {
61190
+ return 1;
61191
+ }
61192
+ start >>>= 0;
61193
+ end >>>= 0;
61194
+ thisStart >>>= 0;
61195
+ thisEnd >>>= 0;
61196
+ if (this === target) return 0;
61197
+ var x = thisEnd - thisStart;
61198
+ var y = end - start;
61199
+ var len = Math.min(x, y);
61200
+ var thisCopy = this.slice(thisStart, thisEnd);
61201
+ var targetCopy = target.slice(start, end);
61202
+ for (var i = 0; i < len; ++i) {
61203
+ if (thisCopy[i] !== targetCopy[i]) {
61204
+ x = thisCopy[i];
61205
+ y = targetCopy[i];
61206
+ break;
61207
+ }
61208
+ }
61209
+ if (x < y) return -1;
61210
+ if (y < x) return 1;
61211
+ return 0;
61212
+ };
61213
+
61214
+ // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
61215
+ // OR the last index of `val` in `buffer` at offset <= `byteOffset`.
61216
+ //
61217
+ // Arguments:
61218
+ // - buffer - a Buffer to search
61219
+ // - val - a string, Buffer, or number
61220
+ // - byteOffset - an index into `buffer`; will be clamped to an int32
61221
+ // - encoding - an optional encoding, relevant is val is a string
61222
+ // - dir - true for indexOf, false for lastIndexOf
61223
+ function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {
61224
+ // Empty buffer means no match
61225
+ if (buffer.length === 0) return -1;
61226
+
61227
+ // Normalize byteOffset
61228
+ if (typeof byteOffset === 'string') {
61229
+ encoding = byteOffset;
61230
+ byteOffset = 0;
61231
+ } else if (byteOffset > 0x7fffffff) {
61232
+ byteOffset = 0x7fffffff;
61233
+ } else if (byteOffset < -0x80000000) {
61234
+ byteOffset = -0x80000000;
61235
+ }
61236
+ byteOffset = +byteOffset; // Coerce to Number.
61237
+ if (numberIsNaN(byteOffset)) {
61238
+ // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
61239
+ byteOffset = dir ? 0 : buffer.length - 1;
61240
+ }
61241
+
61242
+ // Normalize byteOffset: negative offsets start from the end of the buffer
61243
+ if (byteOffset < 0) byteOffset = buffer.length + byteOffset;
61244
+ if (byteOffset >= buffer.length) {
61245
+ if (dir) return -1;else byteOffset = buffer.length - 1;
61246
+ } else if (byteOffset < 0) {
61247
+ if (dir) byteOffset = 0;else return -1;
61248
+ }
61249
+
61250
+ // Normalize val
61251
+ if (typeof val === 'string') {
61252
+ val = Buffer.from(val, encoding);
61253
+ }
61254
+
61255
+ // Finally, search either indexOf (if dir is true) or lastIndexOf
61256
+ if (Buffer.isBuffer(val)) {
61257
+ // Special case: looking for empty string/buffer always fails
61258
+ if (val.length === 0) {
61259
+ return -1;
61260
+ }
61261
+ return arrayIndexOf(buffer, val, byteOffset, encoding, dir);
61262
+ } else if (typeof val === 'number') {
61263
+ val = val & 0xFF; // Search for a byte value [0-255]
61264
+ if (typeof Uint8Array.prototype.indexOf === 'function') {
61265
+ if (dir) {
61266
+ return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);
61267
+ } else {
61268
+ return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);
61269
+ }
61270
+ }
61271
+ return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);
61272
+ }
61273
+ throw new TypeError('val must be string, number or Buffer');
61274
+ }
61275
+ function arrayIndexOf(arr, val, byteOffset, encoding, dir) {
61276
+ var indexSize = 1;
61277
+ var arrLength = arr.length;
61278
+ var valLength = val.length;
61279
+ if (encoding !== undefined) {
61280
+ encoding = String(encoding).toLowerCase();
61281
+ if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') {
61282
+ if (arr.length < 2 || val.length < 2) {
61283
+ return -1;
61284
+ }
61285
+ indexSize = 2;
61286
+ arrLength /= 2;
61287
+ valLength /= 2;
61288
+ byteOffset /= 2;
61289
+ }
61290
+ }
61291
+ function read(buf, i) {
61292
+ if (indexSize === 1) {
61293
+ return buf[i];
61294
+ } else {
61295
+ return buf.readUInt16BE(i * indexSize);
61296
+ }
61297
+ }
61298
+ var i;
61299
+ if (dir) {
61300
+ var foundIndex = -1;
61301
+ for (i = byteOffset; i < arrLength; i++) {
61302
+ if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
61303
+ if (foundIndex === -1) foundIndex = i;
61304
+ if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;
61305
+ } else {
61306
+ if (foundIndex !== -1) i -= i - foundIndex;
61307
+ foundIndex = -1;
61308
+ }
61309
+ }
61310
+ } else {
61311
+ if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
61312
+ for (i = byteOffset; i >= 0; i--) {
61313
+ var found = true;
61314
+ for (var j = 0; j < valLength; j++) {
61315
+ if (read(arr, i + j) !== read(val, j)) {
61316
+ found = false;
61317
+ break;
61318
+ }
61319
+ }
61320
+ if (found) return i;
61321
+ }
61322
+ }
61323
+ return -1;
61324
+ }
61325
+ Buffer.prototype.includes = function includes(val, byteOffset, encoding) {
61326
+ return this.indexOf(val, byteOffset, encoding) !== -1;
61327
+ };
61328
+ Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) {
61329
+ return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
61330
+ };
61331
+ Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
61332
+ return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
61333
+ };
61334
+ function hexWrite(buf, string, offset, length) {
61335
+ offset = Number(offset) || 0;
61336
+ var remaining = buf.length - offset;
61337
+ if (!length) {
61338
+ length = remaining;
61339
+ } else {
61340
+ length = Number(length);
61341
+ if (length > remaining) {
61342
+ length = remaining;
61343
+ }
61344
+ }
61345
+ var strLen = string.length;
61346
+ if (length > strLen / 2) {
61347
+ length = strLen / 2;
61348
+ }
61349
+ var i;
61350
+ for (i = 0; i < length; ++i) {
61351
+ var parsed = parseInt(string.substr(i * 2, 2), 16);
61352
+ if (numberIsNaN(parsed)) return i;
61353
+ buf[offset + i] = parsed;
61354
+ }
61355
+ return i;
61356
+ }
61357
+ function utf8Write(buf, string, offset, length) {
61358
+ return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);
61359
+ }
61360
+ function asciiWrite(buf, string, offset, length) {
61361
+ return blitBuffer(asciiToBytes(string), buf, offset, length);
61362
+ }
61363
+ function base64Write(buf, string, offset, length) {
61364
+ return blitBuffer(base64ToBytes(string), buf, offset, length);
61365
+ }
61366
+ function ucs2Write(buf, string, offset, length) {
61367
+ return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);
61368
+ }
61369
+ Buffer.prototype.write = function write(string, offset, length, encoding) {
61370
+ // Buffer#write(string)
61371
+ if (offset === undefined) {
61372
+ encoding = 'utf8';
61373
+ length = this.length;
61374
+ offset = 0;
61375
+ // Buffer#write(string, encoding)
61376
+ } else if (length === undefined && typeof offset === 'string') {
61377
+ encoding = offset;
61378
+ length = this.length;
61379
+ offset = 0;
61380
+ // Buffer#write(string, offset[, length][, encoding])
61381
+ } else if (isFinite(offset)) {
61382
+ offset = offset >>> 0;
61383
+ if (isFinite(length)) {
61384
+ length = length >>> 0;
61385
+ if (encoding === undefined) encoding = 'utf8';
61386
+ } else {
61387
+ encoding = length;
61388
+ length = undefined;
61389
+ }
61390
+ } else {
61391
+ throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');
61392
+ }
61393
+ var remaining = this.length - offset;
61394
+ if (length === undefined || length > remaining) length = remaining;
61395
+ if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {
61396
+ throw new RangeError('Attempt to write outside buffer bounds');
61397
+ }
61398
+ if (!encoding) encoding = 'utf8';
61399
+ var loweredCase = false;
61400
+ for (;;) {
61401
+ switch (encoding) {
61402
+ case 'hex':
61403
+ return hexWrite(this, string, offset, length);
61404
+ case 'utf8':
61405
+ case 'utf-8':
61406
+ return utf8Write(this, string, offset, length);
61407
+ case 'ascii':
61408
+ case 'latin1':
61409
+ case 'binary':
61410
+ return asciiWrite(this, string, offset, length);
61411
+ case 'base64':
61412
+ // Warning: maxLength not taken into account in base64Write
61413
+ return base64Write(this, string, offset, length);
61414
+ case 'ucs2':
61415
+ case 'ucs-2':
61416
+ case 'utf16le':
61417
+ case 'utf-16le':
61418
+ return ucs2Write(this, string, offset, length);
61419
+ default:
61420
+ if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
61421
+ encoding = ('' + encoding).toLowerCase();
61422
+ loweredCase = true;
61423
+ }
61424
+ }
61425
+ };
61426
+ Buffer.prototype.toJSON = function toJSON() {
61427
+ return {
61428
+ type: 'Buffer',
61429
+ data: Array.prototype.slice.call(this._arr || this, 0)
61430
+ };
61431
+ };
61432
+ function base64Slice(buf, start, end) {
61433
+ if (start === 0 && end === buf.length) {
61434
+ return base64Js$1.fromByteArray(buf);
61435
+ } else {
61436
+ return base64Js$1.fromByteArray(buf.slice(start, end));
61437
+ }
61438
+ }
61439
+ function utf8Slice(buf, start, end) {
61440
+ end = Math.min(buf.length, end);
61441
+ var res = [];
61442
+ var i = start;
61443
+ while (i < end) {
61444
+ var firstByte = buf[i];
61445
+ var codePoint = null;
61446
+ var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1;
61447
+ if (i + bytesPerSequence <= end) {
61448
+ var secondByte = void 0,
61449
+ thirdByte = void 0,
61450
+ fourthByte = void 0,
61451
+ tempCodePoint = void 0;
61452
+ switch (bytesPerSequence) {
61453
+ case 1:
61454
+ if (firstByte < 0x80) {
61455
+ codePoint = firstByte;
61456
+ }
61457
+ break;
61458
+ case 2:
61459
+ secondByte = buf[i + 1];
61460
+ if ((secondByte & 0xC0) === 0x80) {
61461
+ tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F;
61462
+ if (tempCodePoint > 0x7F) {
61463
+ codePoint = tempCodePoint;
61464
+ }
61465
+ }
61466
+ break;
61467
+ case 3:
61468
+ secondByte = buf[i + 1];
61469
+ thirdByte = buf[i + 2];
61470
+ if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
61471
+ tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F;
61472
+ if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
61473
+ codePoint = tempCodePoint;
61474
+ }
61475
+ }
61476
+ break;
61477
+ case 4:
61478
+ secondByte = buf[i + 1];
61479
+ thirdByte = buf[i + 2];
61480
+ fourthByte = buf[i + 3];
61481
+ if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
61482
+ tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F;
61483
+ if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
61484
+ codePoint = tempCodePoint;
61485
+ }
61486
+ }
61487
+ }
61488
+ }
61489
+ if (codePoint === null) {
61490
+ // we did not generate a valid codePoint so insert a
61491
+ // replacement char (U+FFFD) and advance only 1 byte
61492
+ codePoint = 0xFFFD;
61493
+ bytesPerSequence = 1;
61494
+ } else if (codePoint > 0xFFFF) {
61495
+ // encode to utf16 (surrogate pair dance)
61496
+ codePoint -= 0x10000;
61497
+ res.push(codePoint >>> 10 & 0x3FF | 0xD800);
61498
+ codePoint = 0xDC00 | codePoint & 0x3FF;
61499
+ }
61500
+ res.push(codePoint);
61501
+ i += bytesPerSequence;
61502
+ }
61503
+ return decodeCodePointsArray(res);
61504
+ }
61505
+
61506
+ // Based on http://stackoverflow.com/a/22747272/680742, the browser with
61507
+ // the lowest limit is Chrome, with 0x10000 args.
61508
+ // We go 1 magnitude less, for safety
61509
+ var MAX_ARGUMENTS_LENGTH = 0x1000;
61510
+ function decodeCodePointsArray(codePoints) {
61511
+ var len = codePoints.length;
61512
+ if (len <= MAX_ARGUMENTS_LENGTH) {
61513
+ return String.fromCharCode.apply(String, codePoints); // avoid extra slice()
61514
+ }
61515
+
61516
+ // Decode in chunks to avoid "call stack size exceeded".
61517
+ var res = '';
61518
+ var i = 0;
61519
+ while (i < len) {
61520
+ res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));
61521
+ }
61522
+ return res;
61523
+ }
61524
+ function asciiSlice(buf, start, end) {
61525
+ var ret = '';
61526
+ end = Math.min(buf.length, end);
61527
+ for (var i = start; i < end; ++i) {
61528
+ ret += String.fromCharCode(buf[i] & 0x7F);
61529
+ }
61530
+ return ret;
61531
+ }
61532
+ function latin1Slice(buf, start, end) {
61533
+ var ret = '';
61534
+ end = Math.min(buf.length, end);
61535
+ for (var i = start; i < end; ++i) {
61536
+ ret += String.fromCharCode(buf[i]);
61537
+ }
61538
+ return ret;
61539
+ }
61540
+ function hexSlice(buf, start, end) {
61541
+ var len = buf.length;
61542
+ if (!start || start < 0) start = 0;
61543
+ if (!end || end < 0 || end > len) end = len;
61544
+ var out = '';
61545
+ for (var i = start; i < end; ++i) {
61546
+ out += hexSliceLookupTable[buf[i]];
61547
+ }
61548
+ return out;
61549
+ }
61550
+ function utf16leSlice(buf, start, end) {
61551
+ var bytes = buf.slice(start, end);
61552
+ var res = '';
61553
+ // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)
61554
+ for (var i = 0; i < bytes.length - 1; i += 2) {
61555
+ res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);
61556
+ }
61557
+ return res;
61558
+ }
61559
+ Buffer.prototype.slice = function slice(start, end) {
61560
+ var len = this.length;
61561
+ start = ~~start;
61562
+ end = end === undefined ? len : ~~end;
61563
+ if (start < 0) {
61564
+ start += len;
61565
+ if (start < 0) start = 0;
61566
+ } else if (start > len) {
61567
+ start = len;
61568
+ }
61569
+ if (end < 0) {
61570
+ end += len;
61571
+ if (end < 0) end = 0;
61572
+ } else if (end > len) {
61573
+ end = len;
61574
+ }
61575
+ if (end < start) end = start;
61576
+ var newBuf = this.subarray(start, end);
61577
+ // Return an augmented `Uint8Array` instance
61578
+ Object.setPrototypeOf(newBuf, Buffer.prototype);
61579
+ return newBuf;
61580
+ };
61581
+
61582
+ /*
61583
+ * Need to make sure that buffer isn't trying to write out of bounds.
61584
+ */
61585
+ function checkOffset(offset, ext, length) {
61586
+ if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint');
61587
+ if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length');
61588
+ }
61589
+ Buffer.prototype.readUintLE = Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) {
61590
+ offset = offset >>> 0;
61591
+ byteLength = byteLength >>> 0;
61592
+ if (!noAssert) checkOffset(offset, byteLength, this.length);
61593
+ var val = this[offset];
61594
+ var mul = 1;
61595
+ var i = 0;
61596
+ while (++i < byteLength && (mul *= 0x100)) {
61597
+ val += this[offset + i] * mul;
61598
+ }
61599
+ return val;
61600
+ };
61601
+ Buffer.prototype.readUintBE = Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) {
61602
+ offset = offset >>> 0;
61603
+ byteLength = byteLength >>> 0;
61604
+ if (!noAssert) {
61605
+ checkOffset(offset, byteLength, this.length);
61606
+ }
61607
+ var val = this[offset + --byteLength];
61608
+ var mul = 1;
61609
+ while (byteLength > 0 && (mul *= 0x100)) {
61610
+ val += this[offset + --byteLength] * mul;
61611
+ }
61612
+ return val;
61613
+ };
61614
+ Buffer.prototype.readUint8 = Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) {
61615
+ offset = offset >>> 0;
61616
+ if (!noAssert) checkOffset(offset, 1, this.length);
61617
+ return this[offset];
61618
+ };
61619
+ Buffer.prototype.readUint16LE = Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {
61620
+ offset = offset >>> 0;
61621
+ if (!noAssert) checkOffset(offset, 2, this.length);
61622
+ return this[offset] | this[offset + 1] << 8;
61623
+ };
61624
+ Buffer.prototype.readUint16BE = Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {
61625
+ offset = offset >>> 0;
61626
+ if (!noAssert) checkOffset(offset, 2, this.length);
61627
+ return this[offset] << 8 | this[offset + 1];
61628
+ };
61629
+ Buffer.prototype.readUint32LE = Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {
61630
+ offset = offset >>> 0;
61631
+ if (!noAssert) checkOffset(offset, 4, this.length);
61632
+ return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000;
61633
+ };
61634
+ Buffer.prototype.readUint32BE = Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {
61635
+ offset = offset >>> 0;
61636
+ if (!noAssert) checkOffset(offset, 4, this.length);
61637
+ return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
61638
+ };
61639
+ Buffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset) {
61640
+ offset = offset >>> 0;
61641
+ validateNumber(offset, 'offset');
61642
+ var first = this[offset];
61643
+ var last = this[offset + 7];
61644
+ if (first === undefined || last === undefined) {
61645
+ boundsError(offset, this.length - 8);
61646
+ }
61647
+ var lo = first + this[++offset] * Math.pow(2, 8) + this[++offset] * Math.pow(2, 16) + this[++offset] * Math.pow(2, 24);
61648
+ var hi = this[++offset] + this[++offset] * Math.pow(2, 8) + this[++offset] * Math.pow(2, 16) + last * Math.pow(2, 24);
61649
+ return BigInt(lo) + (BigInt(hi) << BigInt(32));
61650
+ });
61651
+ Buffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset) {
61652
+ offset = offset >>> 0;
61653
+ validateNumber(offset, 'offset');
61654
+ var first = this[offset];
61655
+ var last = this[offset + 7];
61656
+ if (first === undefined || last === undefined) {
61657
+ boundsError(offset, this.length - 8);
61658
+ }
61659
+ var hi = first * Math.pow(2, 24) + this[++offset] * Math.pow(2, 16) + this[++offset] * Math.pow(2, 8) + this[++offset];
61660
+ var lo = this[++offset] * Math.pow(2, 24) + this[++offset] * Math.pow(2, 16) + this[++offset] * Math.pow(2, 8) + last;
61661
+ return (BigInt(hi) << BigInt(32)) + BigInt(lo);
61662
+ });
61663
+ Buffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) {
61664
+ offset = offset >>> 0;
61665
+ byteLength = byteLength >>> 0;
61666
+ if (!noAssert) checkOffset(offset, byteLength, this.length);
61667
+ var val = this[offset];
61668
+ var mul = 1;
61669
+ var i = 0;
61670
+ while (++i < byteLength && (mul *= 0x100)) {
61671
+ val += this[offset + i] * mul;
61672
+ }
61673
+ mul *= 0x80;
61674
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength);
61675
+ return val;
61676
+ };
61677
+ Buffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) {
61678
+ offset = offset >>> 0;
61679
+ byteLength = byteLength >>> 0;
61680
+ if (!noAssert) checkOffset(offset, byteLength, this.length);
61681
+ var i = byteLength;
61682
+ var mul = 1;
61683
+ var val = this[offset + --i];
61684
+ while (i > 0 && (mul *= 0x100)) {
61685
+ val += this[offset + --i] * mul;
61686
+ }
61687
+ mul *= 0x80;
61688
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength);
61689
+ return val;
61690
+ };
61691
+ Buffer.prototype.readInt8 = function readInt8(offset, noAssert) {
61692
+ offset = offset >>> 0;
61693
+ if (!noAssert) checkOffset(offset, 1, this.length);
61694
+ if (!(this[offset] & 0x80)) return this[offset];
61695
+ return (0xff - this[offset] + 1) * -1;
61696
+ };
61697
+ Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) {
61698
+ offset = offset >>> 0;
61699
+ if (!noAssert) checkOffset(offset, 2, this.length);
61700
+ var val = this[offset] | this[offset + 1] << 8;
61701
+ return val & 0x8000 ? val | 0xFFFF0000 : val;
61702
+ };
61703
+ Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) {
61704
+ offset = offset >>> 0;
61705
+ if (!noAssert) checkOffset(offset, 2, this.length);
61706
+ var val = this[offset + 1] | this[offset] << 8;
61707
+ return val & 0x8000 ? val | 0xFFFF0000 : val;
61708
+ };
61709
+ Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) {
61710
+ offset = offset >>> 0;
61711
+ if (!noAssert) checkOffset(offset, 4, this.length);
61712
+ return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
61713
+ };
61714
+ Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) {
61715
+ offset = offset >>> 0;
61716
+ if (!noAssert) checkOffset(offset, 4, this.length);
61717
+ return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
61718
+ };
61719
+ Buffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset) {
61720
+ offset = offset >>> 0;
61721
+ validateNumber(offset, 'offset');
61722
+ var first = this[offset];
61723
+ var last = this[offset + 7];
61724
+ if (first === undefined || last === undefined) {
61725
+ boundsError(offset, this.length - 8);
61726
+ }
61727
+ var val = this[offset + 4] + this[offset + 5] * Math.pow(2, 8) + this[offset + 6] * Math.pow(2, 16) + (last << 24); // Overflow
61728
+
61729
+ return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset] * Math.pow(2, 8) + this[++offset] * Math.pow(2, 16) + this[++offset] * Math.pow(2, 24));
61730
+ });
61731
+ Buffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset) {
61732
+ offset = offset >>> 0;
61733
+ validateNumber(offset, 'offset');
61734
+ var first = this[offset];
61735
+ var last = this[offset + 7];
61736
+ if (first === undefined || last === undefined) {
61737
+ boundsError(offset, this.length - 8);
61738
+ }
61739
+ var val = (first << 24) +
61740
+ // Overflow
61741
+ this[++offset] * Math.pow(2, 16) + this[++offset] * Math.pow(2, 8) + this[++offset];
61742
+ return (BigInt(val) << BigInt(32)) + BigInt(this[++offset] * Math.pow(2, 24) + this[++offset] * Math.pow(2, 16) + this[++offset] * Math.pow(2, 8) + last);
61743
+ });
61744
+ Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) {
61745
+ offset = offset >>> 0;
61746
+ if (!noAssert) checkOffset(offset, 4, this.length);
61747
+ return ieee754$2.read(this, offset, true, 23, 4);
61748
+ };
61749
+ Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) {
61750
+ offset = offset >>> 0;
61751
+ if (!noAssert) checkOffset(offset, 4, this.length);
61752
+ return ieee754$2.read(this, offset, false, 23, 4);
61753
+ };
61754
+ Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {
61755
+ offset = offset >>> 0;
61756
+ if (!noAssert) checkOffset(offset, 8, this.length);
61757
+ return ieee754$2.read(this, offset, true, 52, 8);
61758
+ };
61759
+ Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {
61760
+ offset = offset >>> 0;
61761
+ if (!noAssert) checkOffset(offset, 8, this.length);
61762
+ return ieee754$2.read(this, offset, false, 52, 8);
61763
+ };
61764
+ function checkInt(buf, value, offset, ext, max, min) {
61765
+ if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance');
61766
+ if (value > max || value < min) throw new RangeError('"value" argument is out of bounds');
61767
+ if (offset + ext > buf.length) throw new RangeError('Index out of range');
61768
+ }
61769
+ Buffer.prototype.writeUintLE = Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) {
61770
+ value = +value;
61771
+ offset = offset >>> 0;
61772
+ byteLength = byteLength >>> 0;
61773
+ if (!noAssert) {
61774
+ var maxBytes = Math.pow(2, 8 * byteLength) - 1;
61775
+ checkInt(this, value, offset, byteLength, maxBytes, 0);
61776
+ }
61777
+ var mul = 1;
61778
+ var i = 0;
61779
+ this[offset] = value & 0xFF;
61780
+ while (++i < byteLength && (mul *= 0x100)) {
61781
+ this[offset + i] = value / mul & 0xFF;
61782
+ }
61783
+ return offset + byteLength;
61784
+ };
61785
+ Buffer.prototype.writeUintBE = Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) {
61786
+ value = +value;
61787
+ offset = offset >>> 0;
61788
+ byteLength = byteLength >>> 0;
61789
+ if (!noAssert) {
61790
+ var maxBytes = Math.pow(2, 8 * byteLength) - 1;
61791
+ checkInt(this, value, offset, byteLength, maxBytes, 0);
61792
+ }
61793
+ var i = byteLength - 1;
61794
+ var mul = 1;
61795
+ this[offset + i] = value & 0xFF;
61796
+ while (--i >= 0 && (mul *= 0x100)) {
61797
+ this[offset + i] = value / mul & 0xFF;
61798
+ }
61799
+ return offset + byteLength;
61800
+ };
61801
+ Buffer.prototype.writeUint8 = Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {
61802
+ value = +value;
61803
+ offset = offset >>> 0;
61804
+ if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);
61805
+ this[offset] = value & 0xff;
61806
+ return offset + 1;
61807
+ };
61808
+ Buffer.prototype.writeUint16LE = Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {
61809
+ value = +value;
61810
+ offset = offset >>> 0;
61811
+ if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
61812
+ this[offset] = value & 0xff;
61813
+ this[offset + 1] = value >>> 8;
61814
+ return offset + 2;
61815
+ };
61816
+ Buffer.prototype.writeUint16BE = Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {
61817
+ value = +value;
61818
+ offset = offset >>> 0;
61819
+ if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
61820
+ this[offset] = value >>> 8;
61821
+ this[offset + 1] = value & 0xff;
61822
+ return offset + 2;
61823
+ };
61824
+ Buffer.prototype.writeUint32LE = Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {
61825
+ value = +value;
61826
+ offset = offset >>> 0;
61827
+ if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
61828
+ this[offset + 3] = value >>> 24;
61829
+ this[offset + 2] = value >>> 16;
61830
+ this[offset + 1] = value >>> 8;
61831
+ this[offset] = value & 0xff;
61832
+ return offset + 4;
61833
+ };
61834
+ Buffer.prototype.writeUint32BE = Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {
61835
+ value = +value;
61836
+ offset = offset >>> 0;
61837
+ if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
61838
+ this[offset] = value >>> 24;
61839
+ this[offset + 1] = value >>> 16;
61840
+ this[offset + 2] = value >>> 8;
61841
+ this[offset + 3] = value & 0xff;
61842
+ return offset + 4;
61843
+ };
61844
+ function wrtBigUInt64LE(buf, value, offset, min, max) {
61845
+ checkIntBI(value, min, max, buf, offset, 7);
61846
+ var lo = Number(value & BigInt(0xffffffff));
61847
+ buf[offset++] = lo;
61848
+ lo = lo >> 8;
61849
+ buf[offset++] = lo;
61850
+ lo = lo >> 8;
61851
+ buf[offset++] = lo;
61852
+ lo = lo >> 8;
61853
+ buf[offset++] = lo;
61854
+ var hi = Number(value >> BigInt(32) & BigInt(0xffffffff));
61855
+ buf[offset++] = hi;
61856
+ hi = hi >> 8;
61857
+ buf[offset++] = hi;
61858
+ hi = hi >> 8;
61859
+ buf[offset++] = hi;
61860
+ hi = hi >> 8;
61861
+ buf[offset++] = hi;
61862
+ return offset;
61863
+ }
61864
+ function wrtBigUInt64BE(buf, value, offset, min, max) {
61865
+ checkIntBI(value, min, max, buf, offset, 7);
61866
+ var lo = Number(value & BigInt(0xffffffff));
61867
+ buf[offset + 7] = lo;
61868
+ lo = lo >> 8;
61869
+ buf[offset + 6] = lo;
61870
+ lo = lo >> 8;
61871
+ buf[offset + 5] = lo;
61872
+ lo = lo >> 8;
61873
+ buf[offset + 4] = lo;
61874
+ var hi = Number(value >> BigInt(32) & BigInt(0xffffffff));
61875
+ buf[offset + 3] = hi;
61876
+ hi = hi >> 8;
61877
+ buf[offset + 2] = hi;
61878
+ hi = hi >> 8;
61879
+ buf[offset + 1] = hi;
61880
+ hi = hi >> 8;
61881
+ buf[offset] = hi;
61882
+ return offset + 8;
61883
+ }
61884
+ Buffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value) {
61885
+ var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
61886
+ return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'));
61887
+ });
61888
+ Buffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value) {
61889
+ var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
61890
+ return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'));
61891
+ });
61892
+ Buffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) {
61893
+ value = +value;
61894
+ offset = offset >>> 0;
61895
+ if (!noAssert) {
61896
+ var limit = Math.pow(2, 8 * byteLength - 1);
61897
+ checkInt(this, value, offset, byteLength, limit - 1, -limit);
61898
+ }
61899
+ var i = 0;
61900
+ var mul = 1;
61901
+ var sub = 0;
61902
+ this[offset] = value & 0xFF;
61903
+ while (++i < byteLength && (mul *= 0x100)) {
61904
+ if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
61905
+ sub = 1;
61906
+ }
61907
+ this[offset + i] = (value / mul >> 0) - sub & 0xFF;
61908
+ }
61909
+ return offset + byteLength;
61910
+ };
61911
+ Buffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) {
61912
+ value = +value;
61913
+ offset = offset >>> 0;
61914
+ if (!noAssert) {
61915
+ var limit = Math.pow(2, 8 * byteLength - 1);
61916
+ checkInt(this, value, offset, byteLength, limit - 1, -limit);
61917
+ }
61918
+ var i = byteLength - 1;
61919
+ var mul = 1;
61920
+ var sub = 0;
61921
+ this[offset + i] = value & 0xFF;
61922
+ while (--i >= 0 && (mul *= 0x100)) {
61923
+ if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
61924
+ sub = 1;
61925
+ }
61926
+ this[offset + i] = (value / mul >> 0) - sub & 0xFF;
61927
+ }
61928
+ return offset + byteLength;
61929
+ };
61930
+ Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {
61931
+ value = +value;
61932
+ offset = offset >>> 0;
61933
+ if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);
61934
+ if (value < 0) value = 0xff + value + 1;
61935
+ this[offset] = value & 0xff;
61936
+ return offset + 1;
61937
+ };
61938
+ Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {
61939
+ value = +value;
61940
+ offset = offset >>> 0;
61941
+ if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
61942
+ this[offset] = value & 0xff;
61943
+ this[offset + 1] = value >>> 8;
61944
+ return offset + 2;
61945
+ };
61946
+ Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {
61947
+ value = +value;
61948
+ offset = offset >>> 0;
61949
+ if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
61950
+ this[offset] = value >>> 8;
61951
+ this[offset + 1] = value & 0xff;
61952
+ return offset + 2;
61953
+ };
61954
+ Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {
61955
+ value = +value;
61956
+ offset = offset >>> 0;
61957
+ if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
61958
+ this[offset] = value & 0xff;
61959
+ this[offset + 1] = value >>> 8;
61960
+ this[offset + 2] = value >>> 16;
61961
+ this[offset + 3] = value >>> 24;
61962
+ return offset + 4;
61963
+ };
61964
+ Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {
61965
+ value = +value;
61966
+ offset = offset >>> 0;
61967
+ if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
61968
+ if (value < 0) value = 0xffffffff + value + 1;
61969
+ this[offset] = value >>> 24;
61970
+ this[offset + 1] = value >>> 16;
61971
+ this[offset + 2] = value >>> 8;
61972
+ this[offset + 3] = value & 0xff;
61973
+ return offset + 4;
61974
+ };
61975
+ Buffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value) {
61976
+ var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
61977
+ return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'));
61978
+ });
61979
+ Buffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value) {
61980
+ var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
61981
+ return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'));
61982
+ });
61983
+ function checkIEEE754(buf, value, offset, ext, max, min) {
61984
+ if (offset + ext > buf.length) throw new RangeError('Index out of range');
61985
+ if (offset < 0) throw new RangeError('Index out of range');
61986
+ }
61987
+ function writeFloat(buf, value, offset, littleEndian, noAssert) {
61988
+ value = +value;
61989
+ offset = offset >>> 0;
61990
+ if (!noAssert) {
61991
+ checkIEEE754(buf, value, offset, 4);
61992
+ }
61993
+ ieee754$2.write(buf, value, offset, littleEndian, 23, 4);
61994
+ return offset + 4;
61995
+ }
61996
+ Buffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {
61997
+ return writeFloat(this, value, offset, true, noAssert);
61998
+ };
61999
+ Buffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {
62000
+ return writeFloat(this, value, offset, false, noAssert);
62001
+ };
62002
+ function writeDouble(buf, value, offset, littleEndian, noAssert) {
62003
+ value = +value;
62004
+ offset = offset >>> 0;
62005
+ if (!noAssert) {
62006
+ checkIEEE754(buf, value, offset, 8);
62007
+ }
62008
+ ieee754$2.write(buf, value, offset, littleEndian, 52, 8);
62009
+ return offset + 8;
62010
+ }
62011
+ Buffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {
62012
+ return writeDouble(this, value, offset, true, noAssert);
62013
+ };
62014
+ Buffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {
62015
+ return writeDouble(this, value, offset, false, noAssert);
62016
+ };
62017
+
62018
+ // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
62019
+ Buffer.prototype.copy = function copy(target, targetStart, start, end) {
62020
+ if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer');
62021
+ if (!start) start = 0;
62022
+ if (!end && end !== 0) end = this.length;
62023
+ if (targetStart >= target.length) targetStart = target.length;
62024
+ if (!targetStart) targetStart = 0;
62025
+ if (end > 0 && end < start) end = start;
62026
+
62027
+ // Copy 0 bytes; we're done
62028
+ if (end === start) return 0;
62029
+ if (target.length === 0 || this.length === 0) return 0;
62030
+
62031
+ // Fatal error conditions
62032
+ if (targetStart < 0) {
62033
+ throw new RangeError('targetStart out of bounds');
62034
+ }
62035
+ if (start < 0 || start >= this.length) throw new RangeError('Index out of range');
62036
+ if (end < 0) throw new RangeError('sourceEnd out of bounds');
62037
+
62038
+ // Are we oob?
62039
+ if (end > this.length) end = this.length;
62040
+ if (target.length - targetStart < end - start) {
62041
+ end = target.length - targetStart + start;
62042
+ }
62043
+ var len = end - start;
62044
+ if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {
62045
+ // Use built-in when available, missing from IE11
62046
+ this.copyWithin(targetStart, start, end);
62047
+ } else {
62048
+ Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart);
62049
+ }
62050
+ return len;
62051
+ };
62052
+
62053
+ // Usage:
62054
+ // buffer.fill(number[, offset[, end]])
62055
+ // buffer.fill(buffer[, offset[, end]])
62056
+ // buffer.fill(string[, offset[, end]][, encoding])
62057
+ Buffer.prototype.fill = function fill(val, start, end, encoding) {
62058
+ // Handle string cases:
62059
+ if (typeof val === 'string') {
62060
+ if (typeof start === 'string') {
62061
+ encoding = start;
62062
+ start = 0;
62063
+ end = this.length;
62064
+ } else if (typeof end === 'string') {
62065
+ encoding = end;
62066
+ end = this.length;
62067
+ }
62068
+ if (encoding !== undefined && typeof encoding !== 'string') {
62069
+ throw new TypeError('encoding must be a string');
62070
+ }
62071
+ if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
62072
+ throw new TypeError('Unknown encoding: ' + encoding);
62073
+ }
62074
+ if (val.length === 1) {
62075
+ var code = val.charCodeAt(0);
62076
+ if (encoding === 'utf8' && code < 128 || encoding === 'latin1') {
62077
+ // Fast path: If `val` fits into a single byte, use that numeric value.
62078
+ val = code;
62079
+ }
62080
+ }
62081
+ } else if (typeof val === 'number') {
62082
+ val = val & 255;
62083
+ } else if (typeof val === 'boolean') {
62084
+ val = Number(val);
62085
+ }
62086
+
62087
+ // Invalid ranges are not set to a default, so can range check early.
62088
+ if (start < 0 || this.length < start || this.length < end) {
62089
+ throw new RangeError('Out of range index');
62090
+ }
62091
+ if (end <= start) {
62092
+ return this;
62093
+ }
62094
+ start = start >>> 0;
62095
+ end = end === undefined ? this.length : end >>> 0;
62096
+ if (!val) val = 0;
62097
+ var i;
62098
+ if (typeof val === 'number') {
62099
+ for (i = start; i < end; ++i) {
62100
+ this[i] = val;
62101
+ }
62102
+ } else {
62103
+ var bytes = Buffer.isBuffer(val) ? val : Buffer.from(val, encoding);
62104
+ var len = bytes.length;
62105
+ if (len === 0) {
62106
+ throw new TypeError('The value "' + val + '" is invalid for argument "value"');
62107
+ }
62108
+ for (i = 0; i < end - start; ++i) {
62109
+ this[i + start] = bytes[i % len];
62110
+ }
62111
+ }
62112
+ return this;
62113
+ };
62114
+
62115
+ // CUSTOM ERRORS
62116
+ // =============
62117
+
62118
+ // Simplified versions from Node, changed for Buffer-only usage
62119
+ var errors = {};
62120
+ function E(sym, getMessage, Base) {
62121
+ errors[sym] = /*#__PURE__*/function (_Base) {
62122
+ _inherits(NodeError, _Base);
62123
+ var _super = _createSuper(NodeError);
62124
+ function NodeError() {
62125
+ var _this;
62126
+ _classCallCheck(this, NodeError);
62127
+ _this = _super.call(this);
62128
+ Object.defineProperty(_assertThisInitialized(_this), 'message', {
62129
+ value: getMessage.apply(_assertThisInitialized(_this), arguments),
62130
+ writable: true,
62131
+ configurable: true
62132
+ });
62133
+
62134
+ // Add the error code to the name to include it in the stack trace.
62135
+ _this.name = "".concat(_this.name, " [").concat(sym, "]");
62136
+ // Access the stack to generate the error message including the error code
62137
+ // from the name.
62138
+ _this.stack; // eslint-disable-line no-unused-expressions
62139
+ // Reset the name to the actual name.
62140
+ delete _this.name;
62141
+ return _this;
62142
+ }
62143
+ _createClass(NodeError, [{
62144
+ key: "code",
62145
+ get: function get() {
62146
+ return sym;
62147
+ },
62148
+ set: function set(value) {
62149
+ Object.defineProperty(this, 'code', {
62150
+ configurable: true,
62151
+ enumerable: true,
62152
+ value: value,
62153
+ writable: true
62154
+ });
62155
+ }
62156
+ }, {
62157
+ key: "toString",
62158
+ value: function toString() {
62159
+ return "".concat(this.name, " [").concat(sym, "]: ").concat(this.message);
62160
+ }
62161
+ }]);
62162
+ return NodeError;
62163
+ }(Base);
62164
+ }
62165
+ E('ERR_BUFFER_OUT_OF_BOUNDS', function (name) {
62166
+ if (name) {
62167
+ return "".concat(name, " is outside of buffer bounds");
62168
+ }
62169
+ return 'Attempt to access memory outside buffer bounds';
62170
+ }, RangeError);
62171
+ E('ERR_INVALID_ARG_TYPE', function (name, actual) {
62172
+ return "The \"".concat(name, "\" argument must be of type number. Received type ").concat(_typeof(actual));
62173
+ }, TypeError);
62174
+ E('ERR_OUT_OF_RANGE', function (str, range, input) {
62175
+ var msg = "The value of \"".concat(str, "\" is out of range.");
62176
+ var received = input;
62177
+ if (Number.isInteger(input) && Math.abs(input) > Math.pow(2, 32)) {
62178
+ received = addNumericalSeparator(String(input));
62179
+ } else if (typeof input === 'bigint') {
62180
+ received = String(input);
62181
+ if (input > Math.pow(BigInt(2), BigInt(32)) || input < -Math.pow(BigInt(2), BigInt(32))) {
62182
+ received = addNumericalSeparator(received);
62183
+ }
62184
+ received += 'n';
62185
+ }
62186
+ msg += " It must be ".concat(range, ". Received ").concat(received);
62187
+ return msg;
62188
+ }, RangeError);
62189
+ function addNumericalSeparator(val) {
62190
+ var res = '';
62191
+ var i = val.length;
62192
+ var start = val[0] === '-' ? 1 : 0;
62193
+ for (; i >= start + 4; i -= 3) {
62194
+ res = "_".concat(val.slice(i - 3, i)).concat(res);
62195
+ }
62196
+ return "".concat(val.slice(0, i)).concat(res);
62197
+ }
62198
+
62199
+ // CHECK FUNCTIONS
62200
+ // ===============
62201
+
62202
+ function checkBounds(buf, offset, byteLength) {
62203
+ validateNumber(offset, 'offset');
62204
+ if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {
62205
+ boundsError(offset, buf.length - (byteLength + 1));
62206
+ }
62207
+ }
62208
+ function checkIntBI(value, min, max, buf, offset, byteLength) {
62209
+ if (value > max || value < min) {
62210
+ var n = typeof min === 'bigint' ? 'n' : '';
62211
+ var range;
62212
+ if (byteLength > 3) {
62213
+ if (min === 0 || min === BigInt(0)) {
62214
+ range = ">= 0".concat(n, " and < 2").concat(n, " ** ").concat((byteLength + 1) * 8).concat(n);
62215
+ } else {
62216
+ range = ">= -(2".concat(n, " ** ").concat((byteLength + 1) * 8 - 1).concat(n, ") and < 2 ** ") + "".concat((byteLength + 1) * 8 - 1).concat(n);
62217
+ }
62218
+ } else {
62219
+ range = ">= ".concat(min).concat(n, " and <= ").concat(max).concat(n);
62220
+ }
62221
+ throw new errors.ERR_OUT_OF_RANGE('value', range, value);
62222
+ }
62223
+ checkBounds(buf, offset, byteLength);
62224
+ }
62225
+ function validateNumber(value, name) {
62226
+ if (typeof value !== 'number') {
62227
+ throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value);
62228
+ }
62229
+ }
62230
+ function boundsError(value, length, type) {
62231
+ if (Math.floor(value) !== value) {
62232
+ validateNumber(value, type);
62233
+ throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value);
62234
+ }
62235
+ if (length < 0) {
62236
+ throw new errors.ERR_BUFFER_OUT_OF_BOUNDS();
62237
+ }
62238
+ throw new errors.ERR_OUT_OF_RANGE(type || 'offset', ">= ".concat(type ? 1 : 0, " and <= ").concat(length), value);
62239
+ }
62240
+
62241
+ // HELPER FUNCTIONS
62242
+ // ================
62243
+
62244
+ var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;
62245
+ function base64clean(str) {
62246
+ // Node takes equal signs as end of the Base64 encoding
62247
+ str = str.split('=')[0];
62248
+ // Node strips out invalid characters like \n and \t from the string, base64-js does not
62249
+ str = str.trim().replace(INVALID_BASE64_RE, '');
62250
+ // Node converts strings with length < 2 to ''
62251
+ if (str.length < 2) return '';
62252
+ // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
62253
+ while (str.length % 4 !== 0) {
62254
+ str = str + '=';
62255
+ }
62256
+ return str;
62257
+ }
62258
+ function utf8ToBytes(string, units) {
62259
+ units = units || Infinity;
62260
+ var codePoint;
62261
+ var length = string.length;
62262
+ var leadSurrogate = null;
62263
+ var bytes = [];
62264
+ for (var i = 0; i < length; ++i) {
62265
+ codePoint = string.charCodeAt(i);
62266
+
62267
+ // is surrogate component
62268
+ if (codePoint > 0xD7FF && codePoint < 0xE000) {
62269
+ // last char was a lead
62270
+ if (!leadSurrogate) {
62271
+ // no lead yet
62272
+ if (codePoint > 0xDBFF) {
62273
+ // unexpected trail
62274
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
62275
+ continue;
62276
+ } else if (i + 1 === length) {
62277
+ // unpaired lead
62278
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
62279
+ continue;
62280
+ }
62281
+
62282
+ // valid lead
62283
+ leadSurrogate = codePoint;
62284
+ continue;
62285
+ }
62286
+
62287
+ // 2 leads in a row
62288
+ if (codePoint < 0xDC00) {
62289
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
62290
+ leadSurrogate = codePoint;
62291
+ continue;
62292
+ }
62293
+
62294
+ // valid surrogate pair
62295
+ codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;
62296
+ } else if (leadSurrogate) {
62297
+ // valid bmp char, but last char was a lead
62298
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
62299
+ }
62300
+ leadSurrogate = null;
62301
+
62302
+ // encode utf8
62303
+ if (codePoint < 0x80) {
62304
+ if ((units -= 1) < 0) break;
62305
+ bytes.push(codePoint);
62306
+ } else if (codePoint < 0x800) {
62307
+ if ((units -= 2) < 0) break;
62308
+ bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80);
62309
+ } else if (codePoint < 0x10000) {
62310
+ if ((units -= 3) < 0) break;
62311
+ bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);
62312
+ } else if (codePoint < 0x110000) {
62313
+ if ((units -= 4) < 0) break;
62314
+ bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);
62315
+ } else {
62316
+ throw new Error('Invalid code point');
62317
+ }
62318
+ }
62319
+ return bytes;
62320
+ }
62321
+ function asciiToBytes(str) {
62322
+ var byteArray = [];
62323
+ for (var i = 0; i < str.length; ++i) {
62324
+ // Node's code seems to be doing this and not & 0x7F..
62325
+ byteArray.push(str.charCodeAt(i) & 0xFF);
62326
+ }
62327
+ return byteArray;
62328
+ }
62329
+ function utf16leToBytes(str, units) {
62330
+ var c, hi, lo;
62331
+ var byteArray = [];
62332
+ for (var i = 0; i < str.length; ++i) {
62333
+ if ((units -= 2) < 0) break;
62334
+ c = str.charCodeAt(i);
62335
+ hi = c >> 8;
62336
+ lo = c % 256;
62337
+ byteArray.push(lo);
62338
+ byteArray.push(hi);
62339
+ }
62340
+ return byteArray;
62341
+ }
62342
+ function base64ToBytes(str) {
62343
+ return base64Js$1.toByteArray(base64clean(str));
62344
+ }
62345
+ function blitBuffer(src, dst, offset, length) {
62346
+ var i;
62347
+ for (i = 0; i < length; ++i) {
62348
+ if (i + offset >= dst.length || i >= src.length) break;
62349
+ dst[i + offset] = src[i];
62350
+ }
62351
+ return i;
62352
+ }
62353
+
62354
+ // ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass
62355
+ // the `instanceof` check but they should be treated as of that type.
62356
+ // See: https://github.com/feross/buffer/issues/166
62357
+ function isInstance(obj, type) {
62358
+ return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;
62359
+ }
62360
+ function numberIsNaN(obj) {
62361
+ // For IE11 support
62362
+ return obj !== obj; // eslint-disable-line no-self-compare
62363
+ }
62364
+
62365
+ // Create lookup table for `toString('hex')`
62366
+ // See: https://github.com/feross/buffer/issues/219
62367
+ var hexSliceLookupTable = function () {
62368
+ var alphabet = '0123456789abcdef';
62369
+ var table = new Array(256);
62370
+ for (var i = 0; i < 16; ++i) {
62371
+ var i16 = i * 16;
62372
+ for (var j = 0; j < 16; ++j) {
62373
+ table[i16 + j] = alphabet[i] + alphabet[j];
62374
+ }
62375
+ }
62376
+ return table;
62377
+ }();
62378
+
62379
+ // Return not function with Error if BigInt not supported
62380
+ function defineBigIntMethod(fn) {
62381
+ return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn;
62382
+ }
62383
+ function BufferBigIntNotDefined() {
62384
+ throw new Error('BigInt not supported');
62385
+ }
62386
+ });
62387
+
60440
62388
  /**
60441
62389
  * return an decoded URL Safe Base64 as UTF-8 encoded string
60442
62390
  */