maplestory-openapi 2.13.1 → 3.1.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.
Files changed (548) hide show
  1. package/README.md +37 -6
  2. package/dist/cjs/_virtual/_commonjsHelpers.js +7 -0
  3. package/dist/cjs/_virtual/index.js_commonjs-exports.js +7 -0
  4. package/dist/cjs/_virtual/index.js_commonjs-exports2.js +7 -0
  5. package/dist/cjs/_virtual/index.js_commonjs-exports3.js +7 -0
  6. package/dist/cjs/_virtual/timezone.js_commonjs-module.js +7 -0
  7. package/dist/cjs/_virtual/utc.js_commonjs-module.js +7 -0
  8. package/dist/cjs/index.js +133 -0
  9. package/dist/cjs/maplestory/api/common/dto/character/character.js +8 -0
  10. package/dist/cjs/maplestory/api/common/dto/character/characterAbility.js +14 -0
  11. package/dist/cjs/maplestory/api/common/dto/character/characterAndroidEquipment.js +29 -0
  12. package/dist/cjs/maplestory/api/common/dto/character/characterBasic.js +14 -0
  13. package/dist/cjs/maplestory/api/common/dto/character/characterBeautyEquipment.js +17 -0
  14. package/dist/cjs/maplestory/api/common/dto/character/characterCashItemEquipment.js +17 -0
  15. package/dist/cjs/maplestory/api/common/dto/character/characterDojang.js +8 -0
  16. package/dist/cjs/maplestory/api/common/dto/character/characterHexaMatrix.js +14 -0
  17. package/dist/cjs/maplestory/api/common/dto/character/characterHexaMatrixStat.js +11 -0
  18. package/dist/cjs/maplestory/api/common/dto/character/characterHyperStat.js +11 -0
  19. package/dist/cjs/maplestory/api/common/dto/character/characterImage.js +8 -0
  20. package/dist/cjs/maplestory/api/common/dto/character/characterItemEquipment.js +38 -0
  21. package/dist/cjs/maplestory/api/common/dto/character/characterLinkSkill.js +11 -0
  22. package/dist/cjs/maplestory/api/common/dto/character/characterList.js +14 -0
  23. package/dist/cjs/maplestory/api/common/dto/character/characterPetEquipment.js +17 -0
  24. package/dist/cjs/maplestory/api/common/dto/character/characterPopularity.js +8 -0
  25. package/dist/cjs/maplestory/api/common/dto/character/characterPropensity.js +8 -0
  26. package/dist/cjs/maplestory/api/common/dto/character/characterSetEffect.js +17 -0
  27. package/dist/cjs/maplestory/api/common/dto/character/characterSkill.js +11 -0
  28. package/dist/cjs/maplestory/api/common/dto/character/characterStat.js +11 -0
  29. package/dist/cjs/maplestory/api/common/dto/character/characterSymbolEquipment.js +11 -0
  30. package/dist/cjs/maplestory/api/common/dto/character/characterVMatrix.js +11 -0
  31. package/dist/cjs/maplestory/api/common/dto/guild/guild.js +8 -0
  32. package/dist/cjs/maplestory/api/common/dto/guild/guildBasic.js +11 -0
  33. package/dist/cjs/maplestory/api/common/dto/union/union.js +8 -0
  34. package/dist/cjs/maplestory/api/common/dto/union/unionArtifact.js +14 -0
  35. package/dist/cjs/maplestory/api/common/dto/union/unionRaider.js +23 -0
  36. package/dist/cjs/maplestory/api/common/enum/characterImage.js +94 -0
  37. package/dist/cjs/maplestory/api/common/enum/potentialOptionGrade.js +11 -0
  38. package/dist/cjs/maplestory/api/common/lib.js +26 -0
  39. package/dist/cjs/maplestory/api/common/mapleStoryApi.js +121 -0
  40. package/dist/cjs/maplestory/api/common/mapleStoryApiError.js +50 -0
  41. package/dist/cjs/maplestory/api/kms/dto/character/character.js +22 -0
  42. package/dist/cjs/maplestory/api/kms/dto/character/characterAbility.js +108 -0
  43. package/dist/cjs/maplestory/api/kms/dto/character/characterAndroidEquipment.js +456 -0
  44. package/dist/cjs/maplestory/api/kms/dto/character/characterBasic.js +99 -0
  45. package/dist/cjs/maplestory/api/kms/dto/character/characterBeautyEquipment.js +194 -0
  46. package/dist/cjs/maplestory/api/kms/dto/character/characterCashItemEquipment.js +239 -0
  47. package/dist/cjs/maplestory/api/kms/dto/character/characterDojang.js +49 -0
  48. package/dist/cjs/maplestory/api/kms/dto/character/characterHexaMatrix.js +73 -0
  49. package/dist/cjs/maplestory/api/kms/dto/character/characterHexaMatrixStat.js +113 -0
  50. package/dist/cjs/maplestory/api/kms/dto/character/characterHyperStat.js +97 -0
  51. package/dist/cjs/maplestory/api/kms/dto/character/characterImage.js +81 -0
  52. package/dist/cjs/maplestory/api/kms/dto/character/characterItemEquipment.js +1206 -0
  53. package/dist/cjs/maplestory/api/kms/dto/character/characterLinkSkill.js +115 -0
  54. package/dist/cjs/maplestory/api/kms/dto/character/characterList.js +77 -0
  55. package/dist/cjs/maplestory/api/kms/dto/character/characterPetEquipment.js +332 -0
  56. package/dist/cjs/maplestory/api/kms/dto/character/characterPopularity.js +27 -0
  57. package/dist/cjs/maplestory/api/kms/dto/character/characterPropensity.js +52 -0
  58. package/dist/cjs/maplestory/api/kms/dto/character/characterSetEffect.js +97 -0
  59. package/dist/cjs/maplestory/api/kms/dto/character/characterSkill.js +77 -0
  60. package/dist/cjs/maplestory/api/kms/dto/character/characterStat.js +57 -0
  61. package/dist/cjs/maplestory/api/kms/dto/character/characterSymbolEquipment.js +119 -0
  62. package/dist/cjs/maplestory/api/kms/dto/character/characterVMatrix.js +88 -0
  63. package/dist/cjs/maplestory/api/kms/dto/guild/guild.js +22 -0
  64. package/dist/cjs/maplestory/api/kms/dto/guild/guildBasic.js +107 -0
  65. package/dist/cjs/maplestory/api/kms/dto/history/cubeHistory.js +165 -0
  66. package/dist/cjs/maplestory/api/kms/dto/history/potentialHistory.js +160 -0
  67. package/dist/cjs/maplestory/api/kms/dto/history/starforceHistory.js +159 -0
  68. package/dist/cjs/maplestory/api/kms/dto/inspectionInfo.js +34 -0
  69. package/dist/cjs/maplestory/api/kms/dto/notice/cashshopNoticeDetail.js +55 -0
  70. package/dist/cjs/maplestory/api/kms/dto/notice/cashshopNoticeList.js +69 -0
  71. package/dist/cjs/maplestory/api/kms/dto/notice/eventNoticeDetail.js +44 -0
  72. package/dist/cjs/maplestory/api/kms/dto/notice/eventNoticeList.js +58 -0
  73. package/dist/cjs/maplestory/api/kms/dto/notice/noticeDetail.js +34 -0
  74. package/dist/cjs/maplestory/api/kms/dto/notice/noticeList.js +48 -0
  75. package/dist/cjs/maplestory/api/kms/dto/notice/updateNoticeDetail.js +34 -0
  76. package/dist/cjs/maplestory/api/kms/dto/notice/updateNoticeList.js +48 -0
  77. package/dist/cjs/maplestory/api/kms/dto/ranking/achievementRanking.js +68 -0
  78. package/dist/cjs/maplestory/api/kms/dto/ranking/dojangRanking.js +73 -0
  79. package/dist/cjs/maplestory/api/kms/dto/ranking/guildRanking.js +68 -0
  80. package/dist/cjs/maplestory/api/kms/dto/ranking/overallRanking.js +78 -0
  81. package/dist/cjs/maplestory/api/kms/dto/ranking/theSeedRanking.js +73 -0
  82. package/dist/cjs/maplestory/api/kms/dto/ranking/unionRanking.js +68 -0
  83. package/dist/cjs/maplestory/api/kms/dto/union/union.js +47 -0
  84. package/dist/cjs/maplestory/api/kms/dto/union/unionArtifact.js +111 -0
  85. package/dist/cjs/maplestory/api/kms/dto/union/unionChampion.js +77 -0
  86. package/dist/cjs/maplestory/api/kms/dto/union/unionRaider.js +209 -0
  87. package/dist/cjs/maplestory/api/kms/kms.js +170 -0
  88. package/dist/cjs/maplestory/api/kms/mapleStoryApi.js +1321 -0
  89. package/dist/cjs/maplestory/api/msea/dto/character/character.js +22 -0
  90. package/dist/cjs/maplestory/api/msea/dto/character/characterAbility.js +108 -0
  91. package/dist/cjs/maplestory/api/msea/dto/character/characterAndroidEquipment.js +424 -0
  92. package/dist/cjs/maplestory/api/msea/dto/character/characterBasic.js +99 -0
  93. package/dist/cjs/maplestory/api/msea/dto/character/characterBeautyEquipment.js +172 -0
  94. package/dist/cjs/maplestory/api/msea/dto/character/characterCashItemEquipment.js +223 -0
  95. package/dist/cjs/maplestory/api/msea/dto/character/characterDojang.js +49 -0
  96. package/dist/cjs/maplestory/api/msea/dto/character/characterHexaMatrix.js +73 -0
  97. package/dist/cjs/maplestory/api/msea/dto/character/characterHexaMatrixStat.js +113 -0
  98. package/dist/cjs/maplestory/api/msea/dto/character/characterHyperStat.js +97 -0
  99. package/dist/cjs/maplestory/api/msea/dto/character/characterImage.js +81 -0
  100. package/dist/cjs/maplestory/api/msea/dto/character/characterItemEquipment.js +1112 -0
  101. package/dist/cjs/maplestory/api/msea/dto/character/characterLinkSkill.js +115 -0
  102. package/dist/cjs/maplestory/api/msea/dto/character/characterPetEquipment.js +332 -0
  103. package/dist/cjs/maplestory/api/msea/dto/character/characterPopularity.js +27 -0
  104. package/dist/cjs/maplestory/api/msea/dto/character/characterPropensity.js +52 -0
  105. package/dist/cjs/maplestory/api/msea/dto/character/characterSetEffect.js +97 -0
  106. package/dist/cjs/maplestory/api/msea/dto/character/characterSkill.js +77 -0
  107. package/dist/cjs/maplestory/api/msea/dto/character/characterStat.js +57 -0
  108. package/dist/cjs/maplestory/api/msea/dto/character/characterSymbolEquipment.js +119 -0
  109. package/dist/cjs/maplestory/api/msea/dto/character/characterVMatrix.js +88 -0
  110. package/dist/cjs/maplestory/api/msea/dto/guild/guild.js +22 -0
  111. package/dist/cjs/maplestory/api/msea/dto/guild/guildBasic.js +107 -0
  112. package/dist/cjs/maplestory/api/msea/dto/union/union.js +47 -0
  113. package/dist/cjs/maplestory/api/msea/dto/union/unionArtifact.js +111 -0
  114. package/dist/cjs/maplestory/api/msea/dto/union/unionRaider.js +214 -0
  115. package/dist/cjs/maplestory/api/msea/mapleStoryApi.js +802 -0
  116. package/dist/cjs/maplestory/api/msea/msea.js +109 -0
  117. package/dist/cjs/node_modules/base64-js/index.js +154 -0
  118. package/dist/cjs/node_modules/buffer/index.js +2116 -0
  119. package/dist/cjs/node_modules/dayjs/plugin/timezone.js +12 -0
  120. package/dist/cjs/node_modules/dayjs/plugin/utc.js +12 -0
  121. package/dist/cjs/node_modules/ieee754/index.js +92 -0
  122. package/dist/esm/_virtual/_commonjsHelpers.js +3 -0
  123. package/dist/esm/_virtual/index.js_commonjs-exports.js +3 -0
  124. package/dist/esm/_virtual/index.js_commonjs-exports2.js +3 -0
  125. package/dist/esm/_virtual/index.js_commonjs-exports3.js +3 -0
  126. package/dist/esm/_virtual/timezone.js_commonjs-module.js +3 -0
  127. package/dist/esm/_virtual/utc.js_commonjs-module.js +3 -0
  128. package/dist/esm/index.js +30 -0
  129. package/dist/esm/maplestory/api/common/dto/character/character.js +4 -0
  130. package/dist/esm/maplestory/api/common/dto/character/characterAbility.js +8 -0
  131. package/dist/esm/maplestory/api/common/dto/character/characterAndroidEquipment.js +18 -0
  132. package/dist/esm/maplestory/api/common/dto/character/characterBasic.js +10 -0
  133. package/dist/esm/maplestory/api/common/dto/character/characterBeautyEquipment.js +10 -0
  134. package/dist/esm/maplestory/api/common/dto/character/characterCashItemEquipment.js +10 -0
  135. package/dist/esm/maplestory/api/common/dto/character/characterDojang.js +4 -0
  136. package/dist/esm/maplestory/api/common/dto/character/characterHexaMatrix.js +8 -0
  137. package/dist/esm/maplestory/api/common/dto/character/characterHexaMatrixStat.js +6 -0
  138. package/dist/esm/maplestory/api/common/dto/character/characterHyperStat.js +6 -0
  139. package/dist/esm/maplestory/api/common/dto/character/characterImage.js +4 -0
  140. package/dist/esm/maplestory/api/common/dto/character/characterItemEquipment.js +24 -0
  141. package/dist/esm/maplestory/api/common/dto/character/characterLinkSkill.js +6 -0
  142. package/dist/esm/maplestory/api/common/dto/character/characterList.js +8 -0
  143. package/dist/esm/maplestory/api/common/dto/character/characterPetEquipment.js +10 -0
  144. package/dist/esm/maplestory/api/common/dto/character/characterPopularity.js +4 -0
  145. package/dist/esm/maplestory/api/common/dto/character/characterPropensity.js +4 -0
  146. package/dist/esm/maplestory/api/common/dto/character/characterSetEffect.js +10 -0
  147. package/dist/esm/maplestory/api/common/dto/character/characterSkill.js +6 -0
  148. package/dist/esm/maplestory/api/common/dto/character/characterStat.js +6 -0
  149. package/dist/esm/maplestory/api/common/dto/character/characterSymbolEquipment.js +6 -0
  150. package/dist/esm/maplestory/api/common/dto/character/characterVMatrix.js +6 -0
  151. package/dist/esm/maplestory/api/common/dto/guild/guild.js +4 -0
  152. package/dist/esm/maplestory/api/common/dto/guild/guildBasic.js +6 -0
  153. package/dist/esm/maplestory/api/common/dto/union/union.js +4 -0
  154. package/dist/esm/maplestory/api/common/dto/union/unionArtifact.js +8 -0
  155. package/dist/esm/maplestory/api/common/dto/union/unionRaider.js +14 -0
  156. package/dist/esm/maplestory/api/common/enum/characterImage.js +92 -0
  157. package/dist/esm/maplestory/api/common/enum/potentialOptionGrade.js +9 -0
  158. package/dist/esm/maplestory/api/common/lib.js +22 -0
  159. package/dist/esm/maplestory/api/common/mapleStoryApi.js +112 -0
  160. package/dist/esm/maplestory/api/common/mapleStoryApiError.js +46 -0
  161. package/dist/esm/maplestory/api/kms/dto/character/character.js +18 -0
  162. package/dist/esm/maplestory/api/kms/dto/character/characterAbility.js +102 -0
  163. package/dist/esm/maplestory/api/kms/dto/character/characterAndroidEquipment.js +445 -0
  164. package/dist/esm/maplestory/api/kms/dto/character/characterBasic.js +95 -0
  165. package/dist/esm/maplestory/api/kms/dto/character/characterBeautyEquipment.js +187 -0
  166. package/dist/esm/maplestory/api/kms/dto/character/characterCashItemEquipment.js +232 -0
  167. package/dist/esm/maplestory/api/kms/dto/character/characterDojang.js +45 -0
  168. package/dist/esm/maplestory/api/kms/dto/character/characterHexaMatrix.js +67 -0
  169. package/dist/esm/maplestory/api/kms/dto/character/characterHexaMatrixStat.js +108 -0
  170. package/dist/esm/maplestory/api/kms/dto/character/characterHyperStat.js +92 -0
  171. package/dist/esm/maplestory/api/kms/dto/character/characterImage.js +77 -0
  172. package/dist/esm/maplestory/api/kms/dto/character/characterItemEquipment.js +1191 -0
  173. package/dist/esm/maplestory/api/kms/dto/character/characterLinkSkill.js +110 -0
  174. package/dist/esm/maplestory/api/kms/dto/character/characterList.js +71 -0
  175. package/dist/esm/maplestory/api/kms/dto/character/characterPetEquipment.js +325 -0
  176. package/dist/esm/maplestory/api/kms/dto/character/characterPopularity.js +23 -0
  177. package/dist/esm/maplestory/api/kms/dto/character/characterPropensity.js +48 -0
  178. package/dist/esm/maplestory/api/kms/dto/character/characterSetEffect.js +90 -0
  179. package/dist/esm/maplestory/api/kms/dto/character/characterSkill.js +72 -0
  180. package/dist/esm/maplestory/api/kms/dto/character/characterStat.js +52 -0
  181. package/dist/esm/maplestory/api/kms/dto/character/characterSymbolEquipment.js +114 -0
  182. package/dist/esm/maplestory/api/kms/dto/character/characterVMatrix.js +83 -0
  183. package/dist/esm/maplestory/api/kms/dto/guild/guild.js +18 -0
  184. package/dist/esm/maplestory/api/kms/dto/guild/guildBasic.js +102 -0
  185. package/dist/esm/maplestory/api/kms/dto/history/cubeHistory.js +159 -0
  186. package/dist/esm/maplestory/api/kms/dto/history/potentialHistory.js +154 -0
  187. package/dist/esm/maplestory/api/kms/dto/history/starforceHistory.js +153 -0
  188. package/dist/esm/maplestory/api/kms/dto/inspectionInfo.js +30 -0
  189. package/dist/esm/maplestory/api/kms/dto/notice/cashshopNoticeDetail.js +51 -0
  190. package/dist/esm/maplestory/api/kms/dto/notice/cashshopNoticeList.js +64 -0
  191. package/dist/esm/maplestory/api/kms/dto/notice/eventNoticeDetail.js +40 -0
  192. package/dist/esm/maplestory/api/kms/dto/notice/eventNoticeList.js +53 -0
  193. package/dist/esm/maplestory/api/kms/dto/notice/noticeDetail.js +30 -0
  194. package/dist/esm/maplestory/api/kms/dto/notice/noticeList.js +43 -0
  195. package/dist/esm/maplestory/api/kms/dto/notice/updateNoticeDetail.js +30 -0
  196. package/dist/esm/maplestory/api/kms/dto/notice/updateNoticeList.js +43 -0
  197. package/dist/esm/maplestory/api/kms/dto/ranking/achievementRanking.js +63 -0
  198. package/dist/esm/maplestory/api/kms/dto/ranking/dojangRanking.js +68 -0
  199. package/dist/esm/maplestory/api/kms/dto/ranking/guildRanking.js +63 -0
  200. package/dist/esm/maplestory/api/kms/dto/ranking/overallRanking.js +73 -0
  201. package/dist/esm/maplestory/api/kms/dto/ranking/theSeedRanking.js +68 -0
  202. package/dist/esm/maplestory/api/kms/dto/ranking/unionRanking.js +63 -0
  203. package/dist/esm/maplestory/api/kms/dto/union/union.js +43 -0
  204. package/dist/esm/maplestory/api/kms/dto/union/unionArtifact.js +105 -0
  205. package/dist/esm/maplestory/api/kms/dto/union/unionChampion.js +71 -0
  206. package/dist/esm/maplestory/api/kms/dto/union/unionRaider.js +200 -0
  207. package/dist/esm/maplestory/api/kms/kms.js +47 -0
  208. package/dist/esm/maplestory/api/kms/mapleStoryApi.js +1312 -0
  209. package/dist/esm/maplestory/api/msea/dto/character/character.js +18 -0
  210. package/dist/esm/maplestory/api/msea/dto/character/characterAbility.js +102 -0
  211. package/dist/esm/maplestory/api/msea/dto/character/characterAndroidEquipment.js +413 -0
  212. package/dist/esm/maplestory/api/msea/dto/character/characterBasic.js +95 -0
  213. package/dist/esm/maplestory/api/msea/dto/character/characterBeautyEquipment.js +165 -0
  214. package/dist/esm/maplestory/api/msea/dto/character/characterCashItemEquipment.js +216 -0
  215. package/dist/esm/maplestory/api/msea/dto/character/characterDojang.js +45 -0
  216. package/dist/esm/maplestory/api/msea/dto/character/characterHexaMatrix.js +67 -0
  217. package/dist/esm/maplestory/api/msea/dto/character/characterHexaMatrixStat.js +108 -0
  218. package/dist/esm/maplestory/api/msea/dto/character/characterHyperStat.js +92 -0
  219. package/dist/esm/maplestory/api/msea/dto/character/characterImage.js +77 -0
  220. package/dist/esm/maplestory/api/msea/dto/character/characterItemEquipment.js +1098 -0
  221. package/dist/esm/maplestory/api/msea/dto/character/characterLinkSkill.js +110 -0
  222. package/dist/esm/maplestory/api/msea/dto/character/characterPetEquipment.js +325 -0
  223. package/dist/esm/maplestory/api/msea/dto/character/characterPopularity.js +23 -0
  224. package/dist/esm/maplestory/api/msea/dto/character/characterPropensity.js +48 -0
  225. package/dist/esm/maplestory/api/msea/dto/character/characterSetEffect.js +90 -0
  226. package/dist/esm/maplestory/api/msea/dto/character/characterSkill.js +72 -0
  227. package/dist/esm/maplestory/api/msea/dto/character/characterStat.js +52 -0
  228. package/dist/esm/maplestory/api/msea/dto/character/characterSymbolEquipment.js +114 -0
  229. package/dist/esm/maplestory/api/msea/dto/character/characterVMatrix.js +83 -0
  230. package/dist/esm/maplestory/api/msea/dto/guild/guild.js +18 -0
  231. package/dist/esm/maplestory/api/msea/dto/guild/guildBasic.js +102 -0
  232. package/dist/esm/maplestory/api/msea/dto/union/union.js +43 -0
  233. package/dist/esm/maplestory/api/msea/dto/union/unionArtifact.js +105 -0
  234. package/dist/esm/maplestory/api/msea/dto/union/unionRaider.js +205 -0
  235. package/dist/esm/maplestory/api/msea/mapleStoryApi.js +794 -0
  236. package/dist/esm/maplestory/api/msea/msea.js +27 -0
  237. package/dist/esm/node_modules/base64-js/index.js +151 -0
  238. package/dist/esm/node_modules/buffer/index.js +2113 -0
  239. package/dist/esm/node_modules/dayjs/plugin/timezone.js +10 -0
  240. package/dist/esm/node_modules/dayjs/plugin/utc.js +10 -0
  241. package/dist/esm/node_modules/ieee754/index.js +89 -0
  242. package/dist/index.min.js +1 -10
  243. package/package.json +14 -3
  244. package/types/index.d.ts +30 -111
  245. package/types/maplestory/api/common/dto/character/character.d.ts +3 -0
  246. package/types/maplestory/api/common/dto/character/characterAbility.d.ts +19 -0
  247. package/types/maplestory/api/common/dto/character/characterAndroidEquipment.d.ts +78 -0
  248. package/types/maplestory/api/common/dto/character/characterBasic.d.ts +18 -0
  249. package/types/maplestory/api/common/dto/character/characterBeautyEquipment.d.ts +30 -0
  250. package/types/maplestory/api/common/dto/character/characterCashItemEquipment.d.ts +40 -0
  251. package/types/maplestory/api/common/dto/character/characterDojang.d.ts +8 -0
  252. package/types/maplestory/api/common/dto/character/characterHexaMatrix.d.ts +13 -0
  253. package/types/maplestory/api/common/dto/character/characterHexaMatrixStat.d.ts +20 -0
  254. package/types/maplestory/api/common/dto/character/characterHyperStat.d.ts +18 -0
  255. package/types/maplestory/api/common/dto/character/characterImage.d.ts +16 -0
  256. package/types/maplestory/api/common/dto/character/characterItemEquipment.d.ts +216 -0
  257. package/types/maplestory/api/common/dto/character/characterLinkSkill.d.ts +20 -0
  258. package/types/maplestory/api/common/dto/character/characterList.d.ts +14 -0
  259. package/types/maplestory/api/common/dto/character/characterPetEquipment.d.ts +59 -0
  260. package/types/maplestory/api/common/dto/character/characterPopularity.d.ts +4 -0
  261. package/types/maplestory/api/common/dto/character/characterPropensity.d.ts +9 -0
  262. package/types/maplestory/api/common/dto/character/characterSetEffect.d.ts +18 -0
  263. package/types/maplestory/api/common/dto/character/characterSkill.d.ts +14 -0
  264. package/types/maplestory/api/common/dto/character/characterStat.d.ts +10 -0
  265. package/types/maplestory/api/common/dto/character/characterSymbolEquipment.d.ts +22 -0
  266. package/types/maplestory/api/common/dto/character/characterVMatrix.d.ts +16 -0
  267. package/types/maplestory/api/common/dto/guild/guild.d.ts +3 -0
  268. package/types/maplestory/api/common/dto/guild/guildBasic.d.ts +20 -0
  269. package/types/maplestory/api/common/dto/union/union.d.ts +8 -0
  270. package/types/maplestory/api/common/dto/union/unionArtifact.d.ts +20 -0
  271. package/types/maplestory/api/common/dto/union/unionRaider.d.ts +38 -0
  272. package/types/maplestory/api/common/enum/characterImage.d.ts +87 -0
  273. package/types/maplestory/api/common/enum/potentialOptionGrade.d.ts +6 -0
  274. package/types/maplestory/api/common/lib.d.ts +7 -0
  275. package/types/maplestory/api/common/mapleStoryApi.d.ts +140 -0
  276. package/types/maplestory/api/{mapleStoryApiError.d.ts → common/mapleStoryApiError.d.ts} +3 -4
  277. package/types/maplestory/api/common/mapleStoryApiErrorBody.d.ts +6 -0
  278. package/types/maplestory/api/kms/dto/character/character.d.ts +12 -0
  279. package/types/maplestory/api/kms/dto/character/characterAbility.d.ts +72 -0
  280. package/types/maplestory/api/kms/dto/character/characterAndroidEquipment.d.ts +322 -0
  281. package/types/maplestory/api/{dto/character/characterBasicDto.d.ts → kms/dto/character/characterBasic.d.ts} +7 -4
  282. package/types/maplestory/api/kms/dto/character/characterBeautyEquipment.d.ts +133 -0
  283. package/types/maplestory/api/kms/dto/character/characterCashItemEquipment.d.ts +166 -0
  284. package/types/maplestory/api/{dto/character/characterDojangDto.d.ts → kms/dto/character/characterDojang.d.ts} +6 -6
  285. package/types/maplestory/api/kms/dto/character/characterHexaMatrix.d.ts +48 -0
  286. package/types/maplestory/api/kms/dto/character/characterHexaMatrixStat.d.ts +78 -0
  287. package/types/maplestory/api/{dto/character/characterHyperStatDto.d.ts → kms/dto/character/characterHyperStat.d.ts} +27 -6
  288. package/types/maplestory/api/kms/dto/character/characterImage.d.ts +74 -0
  289. package/types/maplestory/api/kms/dto/character/characterItemEquipment.d.ts +914 -0
  290. package/types/maplestory/api/{dto/character/characterLinkSkillDto.d.ts → kms/dto/character/characterLinkSkill.d.ts} +35 -6
  291. package/types/maplestory/api/kms/dto/character/characterList.d.ts +52 -0
  292. package/types/maplestory/api/{dto/character/characterPetEquipmentDto.d.ts → kms/dto/character/characterPetEquipment.d.ts} +79 -7
  293. package/types/maplestory/api/kms/dto/character/characterPopularity.d.ts +16 -0
  294. package/types/maplestory/api/{dto/character/characterPropensityDto.d.ts → kms/dto/character/characterPropensity.d.ts} +7 -4
  295. package/types/maplestory/api/kms/dto/character/characterSetEffect.d.ts +66 -0
  296. package/types/maplestory/api/kms/dto/character/characterSkill.d.ts +54 -0
  297. package/types/maplestory/api/kms/dto/character/characterStat.d.ts +38 -0
  298. package/types/maplestory/api/{dto/character/characterSymbolEquipmentInfoDto.d.ts → kms/dto/character/characterSymbolEquipment.d.ts} +22 -4
  299. package/types/maplestory/api/kms/dto/character/characterVMatrix.d.ts +62 -0
  300. package/types/maplestory/api/kms/dto/guild/guild.d.ts +12 -0
  301. package/types/maplestory/api/kms/dto/guild/guildBasic.d.ts +78 -0
  302. package/types/maplestory/api/{dto/history/cubeHistoryDto.d.ts → kms/dto/history/cubeHistory.d.ts} +37 -6
  303. package/types/maplestory/api/{dto/history/potentialHistoryDto.d.ts → kms/dto/history/potentialHistory.d.ts} +37 -6
  304. package/types/maplestory/api/{dto/history/starforceHistoryDto.d.ts → kms/dto/history/starforceHistory.d.ts} +47 -5
  305. package/types/maplestory/api/{dto/inspectionInfoDto.d.ts → kms/dto/inspectionInfo.d.ts} +1 -2
  306. package/types/maplestory/api/{dto/notice/cashshopNoticeDetailDto.d.ts → kms/dto/notice/cashshopNoticeDetail.d.ts} +3 -4
  307. package/types/maplestory/api/{dto/notice/cashshopNoticeListItemDto.d.ts → kms/dto/notice/cashshopNoticeList.d.ts} +13 -4
  308. package/types/maplestory/api/{dto/notice/eventNoticeDetailDto.d.ts → kms/dto/notice/eventNoticeDetail.d.ts} +3 -4
  309. package/types/maplestory/api/kms/dto/notice/eventNoticeList.d.ts +41 -0
  310. package/types/maplestory/api/{dto/notice/noticeDetailDto.d.ts → kms/dto/notice/noticeDetail.d.ts} +3 -4
  311. package/types/maplestory/api/kms/dto/notice/noticeList.d.ts +33 -0
  312. package/types/maplestory/api/{dto/notice/updateNoticeDetailDto.d.ts → kms/dto/notice/updateNoticeDetail.d.ts} +3 -4
  313. package/types/maplestory/api/kms/dto/notice/updateNoticeList.d.ts +33 -0
  314. package/types/maplestory/api/{dto/ranking/achievementRankingDto.d.ts → kms/dto/ranking/achievementRanking.d.ts} +13 -4
  315. package/types/maplestory/api/{dto/ranking/dojangRankingDto.d.ts → kms/dto/ranking/dojangRanking.d.ts} +13 -4
  316. package/types/maplestory/api/{dto/ranking/guildRankingDto.d.ts → kms/dto/ranking/guildRanking.d.ts} +13 -4
  317. package/types/maplestory/api/{dto/ranking/overallRankingDto.d.ts → kms/dto/ranking/overallRanking.d.ts} +13 -4
  318. package/types/maplestory/api/{dto/ranking/theSeedRankingDto.d.ts → kms/dto/ranking/theSeedRanking.d.ts} +13 -4
  319. package/types/maplestory/api/{dto/ranking/unionRankingDto.d.ts → kms/dto/ranking/unionRanking.d.ts} +13 -4
  320. package/types/maplestory/api/{dto/union/unionDto.d.ts → kms/dto/union/union.d.ts} +5 -5
  321. package/types/maplestory/api/kms/dto/union/unionArtifact.d.ts +76 -0
  322. package/types/maplestory/api/kms/dto/union/unionChampion.d.ts +55 -0
  323. package/types/maplestory/api/kms/dto/union/unionRaider.d.ts +142 -0
  324. package/types/maplestory/api/kms/index.d.ts +47 -0
  325. package/types/maplestory/api/{mapleStoryApi.d.ts → kms/mapleStoryApi.d.ts} +83 -78
  326. package/types/maplestory/api/kms/response/character/characterAbilityBody.d.ts +19 -0
  327. package/types/maplestory/api/{response/character/characterAndroidEquipmentDtoBody.d.ts → kms/response/character/characterAndroidEquipmentBody.d.ts} +24 -21
  328. package/types/maplestory/api/{response/character/characterBasicDtoBody.d.ts → kms/response/character/characterBasicBody.d.ts} +1 -2
  329. package/types/maplestory/api/kms/response/character/characterBeautyEquipmentBody.d.ts +32 -0
  330. package/types/maplestory/api/kms/response/character/characterBody.d.ts +3 -0
  331. package/types/maplestory/api/{response/character/characterCashItemEquipmentDtoBody.d.ts → kms/response/character/characterCashItemEquipmentBody.d.ts} +15 -15
  332. package/types/maplestory/api/{response/character/characterDojangDtoBody.d.ts → kms/response/character/characterDojangBody.d.ts} +1 -2
  333. package/types/maplestory/api/kms/response/character/characterHexaMatrixBody.d.ts +13 -0
  334. package/types/maplestory/api/kms/response/character/characterHexaMatrixStatBody.d.ts +20 -0
  335. package/types/maplestory/api/{response/character/characterHyperStatDtoBody.d.ts → kms/response/character/characterHyperStatBody.d.ts} +5 -6
  336. package/types/maplestory/api/{response/character/characterItemEquipmentDtoBody.d.ts → kms/response/character/characterItemEquipmentBody.d.ts} +35 -34
  337. package/types/maplestory/api/kms/response/character/characterLinkSkillBody.d.ts +20 -0
  338. package/types/maplestory/api/kms/response/character/characterListBody.d.ts +14 -0
  339. package/types/maplestory/api/{response/character/characterPetEquipmentDtoBody.d.ts → kms/response/character/characterPetEquipmentBody.d.ts} +11 -12
  340. package/types/maplestory/api/kms/response/character/characterPopularityBody.d.ts +4 -0
  341. package/types/maplestory/api/{response/character/characterPropensityDtoBody.d.ts → kms/response/character/characterPropensityBody.d.ts} +1 -2
  342. package/types/maplestory/api/kms/response/character/characterSetEffectBody.d.ts +18 -0
  343. package/types/maplestory/api/{response/character/characterSkillDtoBody.d.ts → kms/response/character/characterSkillBody.d.ts} +3 -4
  344. package/types/maplestory/api/kms/response/character/characterStatBody.d.ts +10 -0
  345. package/types/maplestory/api/{response/character/characterSymbolEquipmentDtoBody.d.ts → kms/response/character/characterSymbolEquipmentBody.d.ts} +3 -4
  346. package/types/maplestory/api/{response/character/characterVMatrixDtoBody.d.ts → kms/response/character/characterVMatrixBody.d.ts} +2 -3
  347. package/types/maplestory/api/{response/guild/guildBasicDtoBody.d.ts → kms/response/guild/guildBasicBody.d.ts} +4 -5
  348. package/types/maplestory/api/kms/response/guild/guildBody.d.ts +3 -0
  349. package/types/maplestory/api/kms/response/history/cubeHistoryBody.d.ts +29 -0
  350. package/types/maplestory/api/kms/response/history/potentialHistoryBody.d.ts +28 -0
  351. package/types/maplestory/api/{response/history/starforceHistoryDtoBody.d.ts → kms/response/history/starforceHistoryBody.d.ts} +14 -4
  352. package/types/maplestory/api/{response → kms/response}/inspectionInfoSoapBody.d.ts +1 -2
  353. package/types/maplestory/api/{response/notice/cashshopNoticeDetailDtoBody.d.ts → kms/response/notice/cashshopNoticeDetailBody.d.ts} +1 -2
  354. package/types/maplestory/api/kms/response/notice/cashshopNoticeListBody.d.ts +12 -0
  355. package/types/maplestory/api/{response/notice/eventNoticeDetailDtoBody.d.ts → kms/response/notice/eventNoticeDetailBody.d.ts} +1 -2
  356. package/types/maplestory/api/kms/response/notice/eventNoticeListBody.d.ts +11 -0
  357. package/types/maplestory/api/{response/notice/noticeDetailDtoBody.d.ts → kms/response/notice/noticeDetailBody.d.ts} +1 -2
  358. package/types/maplestory/api/kms/response/notice/noticeListBody.d.ts +9 -0
  359. package/types/maplestory/api/{response/notice/updateNoticeDetailDtoBody.d.ts → kms/response/notice/updateNoticeDetailBody.d.ts} +1 -2
  360. package/types/maplestory/api/kms/response/notice/updateNoticeListBody.d.ts +9 -0
  361. package/types/maplestory/api/kms/response/ranking/achievementRankingBody.d.ts +12 -0
  362. package/types/maplestory/api/kms/response/ranking/dojangRankingBody.d.ts +13 -0
  363. package/types/maplestory/api/kms/response/ranking/guildRankingBody.d.ts +12 -0
  364. package/types/maplestory/api/{response/ranking/overallRankingResponseDtoBody.d.ts → kms/response/ranking/overallRankingBody.d.ts} +3 -4
  365. package/types/maplestory/api/kms/response/ranking/rankingResponseBody.d.ts +6 -0
  366. package/types/maplestory/api/kms/response/ranking/theSeedRankingBody.d.ts +13 -0
  367. package/types/maplestory/api/kms/response/ranking/unionRankingBody.d.ts +12 -0
  368. package/types/maplestory/api/kms/response/union/unionArtifactBody.d.ts +19 -0
  369. package/types/maplestory/api/{response/union/unionDtoBody.d.ts → kms/response/union/unionBody.d.ts} +1 -2
  370. package/types/maplestory/api/kms/response/union/unionChampionBody.d.ts +15 -0
  371. package/types/maplestory/api/kms/response/union/unionRaiderBody.d.ts +38 -0
  372. package/types/maplestory/api/msea/dto/character/character.d.ts +12 -0
  373. package/types/maplestory/api/msea/dto/character/characterAbility.d.ts +72 -0
  374. package/types/maplestory/api/msea/dto/character/characterAndroidEquipment.d.ts +299 -0
  375. package/types/maplestory/api/msea/dto/character/characterBasic.d.ts +72 -0
  376. package/types/maplestory/api/msea/dto/character/characterBeautyEquipment.d.ts +117 -0
  377. package/types/maplestory/api/msea/dto/character/characterCashItemEquipment.d.ts +154 -0
  378. package/types/maplestory/api/msea/dto/character/characterDojang.d.ts +32 -0
  379. package/types/maplestory/api/msea/dto/character/characterHexaMatrix.d.ts +48 -0
  380. package/types/maplestory/api/msea/dto/character/characterHexaMatrixStat.d.ts +78 -0
  381. package/types/maplestory/api/msea/dto/character/characterHyperStat.d.ts +70 -0
  382. package/types/maplestory/api/msea/dto/character/characterImage.d.ts +74 -0
  383. package/types/maplestory/api/msea/dto/character/characterItemEquipment.d.ts +844 -0
  384. package/types/maplestory/api/msea/dto/character/characterLinkSkill.d.ts +78 -0
  385. package/types/maplestory/api/msea/dto/character/characterPetEquipment.d.ts +230 -0
  386. package/types/maplestory/api/msea/dto/character/characterPopularity.d.ts +16 -0
  387. package/types/maplestory/api/msea/dto/character/characterPropensity.d.ts +36 -0
  388. package/types/maplestory/api/msea/dto/character/characterSetEffect.d.ts +66 -0
  389. package/types/maplestory/api/msea/dto/character/characterSkill.d.ts +54 -0
  390. package/types/maplestory/api/msea/dto/character/characterStat.d.ts +38 -0
  391. package/types/maplestory/api/msea/dto/character/characterSymbolEquipment.d.ts +86 -0
  392. package/types/maplestory/api/msea/dto/character/characterVMatrix.d.ts +62 -0
  393. package/types/maplestory/api/msea/dto/guild/guild.d.ts +12 -0
  394. package/types/maplestory/api/msea/dto/guild/guildBasic.d.ts +78 -0
  395. package/types/maplestory/api/msea/dto/union/union.d.ts +32 -0
  396. package/types/maplestory/api/msea/dto/union/unionArtifact.d.ts +76 -0
  397. package/types/maplestory/api/msea/dto/union/unionRaider.d.ts +147 -0
  398. package/types/maplestory/api/msea/index.d.ts +27 -0
  399. package/types/maplestory/api/msea/mapleStoryApi.d.ts +364 -0
  400. package/types/maplestory/api/msea/response/character/characterAbilityBody.d.ts +19 -0
  401. package/types/maplestory/api/msea/response/character/characterAndroidEquipmentBody.d.ts +76 -0
  402. package/types/maplestory/api/msea/response/character/characterBasicBody.d.ts +16 -0
  403. package/types/maplestory/api/msea/response/character/characterBeautyEquipmentBody.d.ts +30 -0
  404. package/types/maplestory/api/msea/response/character/characterBody.d.ts +3 -0
  405. package/types/maplestory/api/msea/response/character/characterCashItemEquipmentBody.d.ts +38 -0
  406. package/types/maplestory/api/msea/response/character/characterDojangBody.d.ts +8 -0
  407. package/types/maplestory/api/msea/response/character/characterHexaMatrixBody.d.ts +13 -0
  408. package/types/maplestory/api/msea/response/character/characterHexaMatrixStatBody.d.ts +20 -0
  409. package/types/maplestory/api/msea/response/character/characterHyperStatBody.d.ts +18 -0
  410. package/types/maplestory/api/msea/response/character/characterItemEquipmentBody.d.ts +190 -0
  411. package/types/maplestory/api/msea/response/character/characterLinkSkillBody.d.ts +20 -0
  412. package/types/maplestory/api/msea/response/character/characterPetEquipmentBody.d.ts +56 -0
  413. package/types/maplestory/api/msea/response/character/characterPopularityBody.d.ts +4 -0
  414. package/types/maplestory/api/msea/response/character/characterPropensityBody.d.ts +9 -0
  415. package/types/maplestory/api/msea/response/character/characterSetEffectBody.d.ts +18 -0
  416. package/types/maplestory/api/msea/response/character/characterSkillBody.d.ts +14 -0
  417. package/types/maplestory/api/msea/response/character/characterStatBody.d.ts +10 -0
  418. package/types/maplestory/api/msea/response/character/characterSymbolEquipmentBody.d.ts +22 -0
  419. package/types/maplestory/api/msea/response/character/characterVMatrixBody.d.ts +16 -0
  420. package/types/maplestory/api/msea/response/guild/guildBasicBody.d.ts +20 -0
  421. package/types/maplestory/api/msea/response/guild/guildBody.d.ts +3 -0
  422. package/types/maplestory/api/msea/response/union/unionArtifactBody.d.ts +19 -0
  423. package/types/maplestory/api/msea/response/union/unionBody.d.ts +8 -0
  424. package/types/maplestory/api/msea/response/union/unionRaiderBody.d.ts +38 -0
  425. package/dist/index.js +0 -9120
  426. package/dist/index.mjs +0 -9002
  427. package/types/maplestory/api/dto/character/characterAbilityDto.d.ts +0 -42
  428. package/types/maplestory/api/dto/character/characterAbilityInfoDto.d.ts +0 -20
  429. package/types/maplestory/api/dto/character/characterAbilityPresetDto.d.ts +0 -17
  430. package/types/maplestory/api/dto/character/characterAndroidCashItemEquipmentColoringPrismDto.d.ts +0 -24
  431. package/types/maplestory/api/dto/character/characterAndroidCashItemEquipmentDto.d.ts +0 -58
  432. package/types/maplestory/api/dto/character/characterAndroidCashItemEquipmentOptionDto.d.ts +0 -16
  433. package/types/maplestory/api/dto/character/characterAndroidEquipmentDto.d.ts +0 -85
  434. package/types/maplestory/api/dto/character/characterAndroidEquipmentFaceDto.d.ts +0 -24
  435. package/types/maplestory/api/dto/character/characterAndroidEquipmentHairDto.d.ts +0 -24
  436. package/types/maplestory/api/dto/character/characterAndroidEquipmentPresetDto.d.ts +0 -59
  437. package/types/maplestory/api/dto/character/characterAndroidEquipmentSkinDto.d.ts +0 -28
  438. package/types/maplestory/api/dto/character/characterBeautyEquipmentDto.d.ts +0 -50
  439. package/types/maplestory/api/dto/character/characterBeautyEquipmentFaceDto.d.ts +0 -24
  440. package/types/maplestory/api/dto/character/characterBeautyEquipmentHairDto.d.ts +0 -24
  441. package/types/maplestory/api/dto/character/characterBeautyEquipmentSkinDto.d.ts +0 -28
  442. package/types/maplestory/api/dto/character/characterCashItemEquipmentColoringPrismDto.d.ts +0 -24
  443. package/types/maplestory/api/dto/character/characterCashItemEquipmentDto.d.ts +0 -61
  444. package/types/maplestory/api/dto/character/characterCashItemEquipmentOptionDto.d.ts +0 -16
  445. package/types/maplestory/api/dto/character/characterCashItemEquipmentPresetDto.d.ts +0 -66
  446. package/types/maplestory/api/dto/character/characterDto.d.ts +0 -12
  447. package/types/maplestory/api/dto/character/characterHexaMatrixDto.d.ts +0 -17
  448. package/types/maplestory/api/dto/character/characterHexaMatrixEquipmentDto.d.ts +0 -25
  449. package/types/maplestory/api/dto/character/characterHexaMatrixEquipmentLinkedSkillDto.d.ts +0 -12
  450. package/types/maplestory/api/dto/character/characterHexaMatrixStatCoreDto.d.ts +0 -40
  451. package/types/maplestory/api/dto/character/characterHexaMatrixStatDto.d.ts +0 -41
  452. package/types/maplestory/api/dto/character/characterHyperStatPresetDto.d.ts +0 -24
  453. package/types/maplestory/api/dto/character/characterImageDto.d.ts +0 -160
  454. package/types/maplestory/api/dto/character/characterItemEquipmentAddOptionDto.d.ts +0 -68
  455. package/types/maplestory/api/dto/character/characterItemEquipmentBaseOptionDto.d.ts +0 -76
  456. package/types/maplestory/api/dto/character/characterItemEquipmentDragonInfoDto.d.ts +0 -130
  457. package/types/maplestory/api/dto/character/characterItemEquipmentDto.d.ts +0 -61
  458. package/types/maplestory/api/dto/character/characterItemEquipmentEtcOptionDto.d.ts +0 -52
  459. package/types/maplestory/api/dto/character/characterItemEquipmentExceptionalOptionDto.d.ts +0 -44
  460. package/types/maplestory/api/dto/character/characterItemEquipmentInfoDto.d.ts +0 -162
  461. package/types/maplestory/api/dto/character/characterItemEquipmentMechanicInfoDto.d.ts +0 -130
  462. package/types/maplestory/api/dto/character/characterItemEquipmentMedalShapeDto.d.ts +0 -32
  463. package/types/maplestory/api/dto/character/characterItemEquipmentStarforceOptionDto.d.ts +0 -52
  464. package/types/maplestory/api/dto/character/characterItemEquipmentTitleDto.d.ts +0 -48
  465. package/types/maplestory/api/dto/character/characterItemEquipmentTotalOptionDto.d.ts +0 -80
  466. package/types/maplestory/api/dto/character/characterLinkSkillInfoDto.d.ts +0 -32
  467. package/types/maplestory/api/dto/character/characterListAccountCharacterDto.d.ts +0 -28
  468. package/types/maplestory/api/dto/character/characterListAccountDto.d.ts +0 -17
  469. package/types/maplestory/api/dto/character/characterListDto.d.ts +0 -13
  470. package/types/maplestory/api/dto/character/characterPetEquipmentAutoSkillDto.d.ts +0 -24
  471. package/types/maplestory/api/dto/character/characterPetEquipmentItemDto.d.ts +0 -41
  472. package/types/maplestory/api/dto/character/characterPetEquipmentItemOptionDto.d.ts +0 -16
  473. package/types/maplestory/api/dto/character/characterPopularityDto.d.ts +0 -16
  474. package/types/maplestory/api/dto/character/characterSetEffectDto.d.ts +0 -17
  475. package/types/maplestory/api/dto/character/characterSetEffectInfoDto.d.ts +0 -16
  476. package/types/maplestory/api/dto/character/characterSetEffectOptionFullDto.d.ts +0 -16
  477. package/types/maplestory/api/dto/character/characterSetEffectSetDto.d.ts +0 -26
  478. package/types/maplestory/api/dto/character/characterSkillDto.d.ts +0 -25
  479. package/types/maplestory/api/dto/character/characterSkillInfoDto.d.ts +0 -32
  480. package/types/maplestory/api/dto/character/characterStatDto.d.ts +0 -27
  481. package/types/maplestory/api/dto/character/characterSymbolEquipmentDto.d.ts +0 -21
  482. package/types/maplestory/api/dto/character/characterVMatrixCoreEquipmentDto.d.ts +0 -40
  483. package/types/maplestory/api/dto/character/characterVMatrixDto.d.ts +0 -25
  484. package/types/maplestory/api/dto/guild/guildBasicDto.d.ts +0 -53
  485. package/types/maplestory/api/dto/guild/guildDto.d.ts +0 -12
  486. package/types/maplestory/api/dto/guild/guildSkillDto.d.ts +0 -28
  487. package/types/maplestory/api/dto/history/cubeHistoryResponseDto.d.ts +0 -21
  488. package/types/maplestory/api/dto/history/cubeResultOptionDto.d.ts +0 -18
  489. package/types/maplestory/api/dto/history/potentialHistoryResponseDto.d.ts +0 -21
  490. package/types/maplestory/api/dto/history/potentialResultOptionDto.d.ts +0 -18
  491. package/types/maplestory/api/dto/history/starforceEventDto.d.ts +0 -28
  492. package/types/maplestory/api/dto/history/starforceHistoryResponseDto.d.ts +0 -21
  493. package/types/maplestory/api/dto/notice/cashshopNoticeListDto.d.ts +0 -13
  494. package/types/maplestory/api/dto/notice/eventNoticeListDto.d.ts +0 -13
  495. package/types/maplestory/api/dto/notice/eventNoticeListItemDto.d.ts +0 -32
  496. package/types/maplestory/api/dto/notice/noticeListDto.d.ts +0 -13
  497. package/types/maplestory/api/dto/notice/noticeListItemDto.d.ts +0 -24
  498. package/types/maplestory/api/dto/notice/updateNoticeListDto.d.ts +0 -13
  499. package/types/maplestory/api/dto/notice/updateNoticeListItemDto.d.ts +0 -24
  500. package/types/maplestory/api/dto/potentialOptionGrade.d.ts +0 -13
  501. package/types/maplestory/api/dto/ranking/achievementRankingResponseDto.d.ts +0 -13
  502. package/types/maplestory/api/dto/ranking/dojangRankingResponseDto.d.ts +0 -13
  503. package/types/maplestory/api/dto/ranking/guildRankingResponseDto.d.ts +0 -13
  504. package/types/maplestory/api/dto/ranking/overallRankingResponseDto.d.ts +0 -13
  505. package/types/maplestory/api/dto/ranking/theSeedRankingResponseDto.d.ts +0 -13
  506. package/types/maplestory/api/dto/ranking/unionRankingResponseDto.d.ts +0 -13
  507. package/types/maplestory/api/dto/union/unionArtifactCrystalDto.d.ts +0 -40
  508. package/types/maplestory/api/dto/union/unionArtifactDto.d.ts +0 -26
  509. package/types/maplestory/api/dto/union/unionArtifactEffectDto.d.ts +0 -16
  510. package/types/maplestory/api/dto/union/unionChampionBadgeInfoDto.d.ts +0 -12
  511. package/types/maplestory/api/dto/union/unionChampionDto.d.ts +0 -22
  512. package/types/maplestory/api/dto/union/unionChampionInfoDto.d.ts +0 -29
  513. package/types/maplestory/api/dto/union/unionRaiderBlockDto.d.ts +0 -30
  514. package/types/maplestory/api/dto/union/unionRaiderBlockPositionDto.d.ts +0 -16
  515. package/types/maplestory/api/dto/union/unionRaiderControlPointDto.d.ts +0 -16
  516. package/types/maplestory/api/dto/union/unionRaiderDto.d.ts +0 -52
  517. package/types/maplestory/api/dto/union/unionRaiderInnerStatDto.d.ts +0 -16
  518. package/types/maplestory/api/dto/union/unionRaiderPresetDto.d.ts +0 -26
  519. package/types/maplestory/api/response/character/characterAbilityDtoBody.d.ts +0 -20
  520. package/types/maplestory/api/response/character/characterBeautyEquipmentDtoBody.d.ts +0 -31
  521. package/types/maplestory/api/response/character/characterDtoBody.d.ts +0 -4
  522. package/types/maplestory/api/response/character/characterHexaMatrixDtoBody.d.ts +0 -14
  523. package/types/maplestory/api/response/character/characterHexaMatrixStatDtoBody.d.ts +0 -21
  524. package/types/maplestory/api/response/character/characterLinkSkillDtoBody.d.ts +0 -21
  525. package/types/maplestory/api/response/character/characterListDtoBody.d.ts +0 -15
  526. package/types/maplestory/api/response/character/characterPopularityDtoBody.d.ts +0 -5
  527. package/types/maplestory/api/response/character/characterSetEffectDtoBody.d.ts +0 -19
  528. package/types/maplestory/api/response/character/characterStatDtoBody.d.ts +0 -10
  529. package/types/maplestory/api/response/guild/guildDtoBody.d.ts +0 -4
  530. package/types/maplestory/api/response/history/cubeHistoryDtoBody.d.ts +0 -22
  531. package/types/maplestory/api/response/history/cubeHistoryResponseDtoBody.d.ts +0 -7
  532. package/types/maplestory/api/response/history/cubeResultOptionDtoBody.d.ts +0 -5
  533. package/types/maplestory/api/response/history/potentialHistoryResponseDtoBody.d.ts +0 -29
  534. package/types/maplestory/api/response/history/starforceEventDtoBody.d.ts +0 -8
  535. package/types/maplestory/api/response/history/starforceHistoryResponseDtoBody.d.ts +0 -7
  536. package/types/maplestory/api/response/notice/cashshopNoticeListDtoBody.d.ts +0 -13
  537. package/types/maplestory/api/response/notice/eventNoticeListDtoBody.d.ts +0 -12
  538. package/types/maplestory/api/response/notice/noticeListDtoBody.d.ts +0 -10
  539. package/types/maplestory/api/response/notice/updateNoticeListDtoBody.d.ts +0 -10
  540. package/types/maplestory/api/response/ranking/achievementRankingResponseDtoBody.d.ts +0 -13
  541. package/types/maplestory/api/response/ranking/dojangRankingResponseDtoBody.d.ts +0 -14
  542. package/types/maplestory/api/response/ranking/guildRankingResponseDtoBody.d.ts +0 -13
  543. package/types/maplestory/api/response/ranking/rankingResponseDtoBody.d.ts +0 -7
  544. package/types/maplestory/api/response/ranking/theSeedRankingResponseDtoBody.d.ts +0 -14
  545. package/types/maplestory/api/response/ranking/unionRankingResponseDtoBody.d.ts +0 -13
  546. package/types/maplestory/api/response/union/unionArtifactDtoBody.d.ts +0 -20
  547. package/types/maplestory/api/response/union/unionChampionDtoBody.d.ts +0 -16
  548. package/types/maplestory/api/response/union/unionRaiderDtoBody.d.ts +0 -39
@@ -0,0 +1,2113 @@
1
+ import { __exports as buffer } from '../../_virtual/index.js_commonjs-exports.js';
2
+ export { __exports as default } from '../../_virtual/index.js_commonjs-exports.js';
3
+ import '../base64-js/index.js';
4
+ import '../ieee754/index.js';
5
+ import { __exports as base64Js } from '../../_virtual/index.js_commonjs-exports3.js';
6
+ import { __exports as ieee754 } from '../../_virtual/index.js_commonjs-exports2.js';
7
+
8
+ /*!
9
+ * The buffer module from node.js, for the browser.
10
+ *
11
+ * @author Feross Aboukhadijeh <https://feross.org>
12
+ * @license MIT
13
+ */
14
+
15
+ (function (exports) {
16
+
17
+ const base64 = base64Js;
18
+ const ieee754$1 = ieee754;
19
+ const customInspectSymbol =
20
+ (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation
21
+ ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation
22
+ : null;
23
+
24
+ exports.Buffer = Buffer;
25
+ exports.SlowBuffer = SlowBuffer;
26
+ exports.INSPECT_MAX_BYTES = 50;
27
+
28
+ const K_MAX_LENGTH = 0x7fffffff;
29
+ exports.kMaxLength = K_MAX_LENGTH;
30
+
31
+ /**
32
+ * If `Buffer.TYPED_ARRAY_SUPPORT`:
33
+ * === true Use Uint8Array implementation (fastest)
34
+ * === false Print warning and recommend using `buffer` v4.x which has an Object
35
+ * implementation (most compatible, even IE6)
36
+ *
37
+ * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
38
+ * Opera 11.6+, iOS 4.2+.
39
+ *
40
+ * We report that the browser does not support typed arrays if the are not subclassable
41
+ * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`
42
+ * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support
43
+ * for __proto__ and has a buggy typed array implementation.
44
+ */
45
+ Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport();
46
+
47
+ if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&
48
+ typeof console.error === 'function') {
49
+ console.error(
50
+ 'This browser lacks typed array (Uint8Array) support which is required by ' +
51
+ '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'
52
+ );
53
+ }
54
+
55
+ function typedArraySupport () {
56
+ // Can typed array instances can be augmented?
57
+ try {
58
+ const arr = new Uint8Array(1);
59
+ const proto = { foo: function () { return 42 } };
60
+ Object.setPrototypeOf(proto, Uint8Array.prototype);
61
+ Object.setPrototypeOf(arr, proto);
62
+ return arr.foo() === 42
63
+ } catch (e) {
64
+ return false
65
+ }
66
+ }
67
+
68
+ Object.defineProperty(Buffer.prototype, 'parent', {
69
+ enumerable: true,
70
+ get: function () {
71
+ if (!Buffer.isBuffer(this)) return undefined
72
+ return this.buffer
73
+ }
74
+ });
75
+
76
+ Object.defineProperty(Buffer.prototype, 'offset', {
77
+ enumerable: true,
78
+ get: function () {
79
+ if (!Buffer.isBuffer(this)) return undefined
80
+ return this.byteOffset
81
+ }
82
+ });
83
+
84
+ function createBuffer (length) {
85
+ if (length > K_MAX_LENGTH) {
86
+ throw new RangeError('The value "' + length + '" is invalid for option "size"')
87
+ }
88
+ // Return an augmented `Uint8Array` instance
89
+ const buf = new Uint8Array(length);
90
+ Object.setPrototypeOf(buf, Buffer.prototype);
91
+ return buf
92
+ }
93
+
94
+ /**
95
+ * The Buffer constructor returns instances of `Uint8Array` that have their
96
+ * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
97
+ * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
98
+ * and the `Uint8Array` methods. Square bracket notation works as expected -- it
99
+ * returns a single octet.
100
+ *
101
+ * The `Uint8Array` prototype remains unmodified.
102
+ */
103
+
104
+ function Buffer (arg, encodingOrOffset, length) {
105
+ // Common case.
106
+ if (typeof arg === 'number') {
107
+ if (typeof encodingOrOffset === 'string') {
108
+ throw new TypeError(
109
+ 'The "string" argument must be of type string. Received type number'
110
+ )
111
+ }
112
+ return allocUnsafe(arg)
113
+ }
114
+ return from(arg, encodingOrOffset, length)
115
+ }
116
+
117
+ Buffer.poolSize = 8192; // not used by this implementation
118
+
119
+ function from (value, encodingOrOffset, length) {
120
+ if (typeof value === 'string') {
121
+ return fromString(value, encodingOrOffset)
122
+ }
123
+
124
+ if (ArrayBuffer.isView(value)) {
125
+ return fromArrayView(value)
126
+ }
127
+
128
+ if (value == null) {
129
+ throw new TypeError(
130
+ 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +
131
+ 'or Array-like Object. Received type ' + (typeof value)
132
+ )
133
+ }
134
+
135
+ if (isInstance(value, ArrayBuffer) ||
136
+ (value && isInstance(value.buffer, ArrayBuffer))) {
137
+ return fromArrayBuffer(value, encodingOrOffset, length)
138
+ }
139
+
140
+ if (typeof SharedArrayBuffer !== 'undefined' &&
141
+ (isInstance(value, SharedArrayBuffer) ||
142
+ (value && isInstance(value.buffer, SharedArrayBuffer)))) {
143
+ return fromArrayBuffer(value, encodingOrOffset, length)
144
+ }
145
+
146
+ if (typeof value === 'number') {
147
+ throw new TypeError(
148
+ 'The "value" argument must not be of type number. Received type number'
149
+ )
150
+ }
151
+
152
+ const valueOf = value.valueOf && value.valueOf();
153
+ if (valueOf != null && valueOf !== value) {
154
+ return Buffer.from(valueOf, encodingOrOffset, length)
155
+ }
156
+
157
+ const b = fromObject(value);
158
+ if (b) return b
159
+
160
+ if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&
161
+ typeof value[Symbol.toPrimitive] === 'function') {
162
+ return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)
163
+ }
164
+
165
+ throw new TypeError(
166
+ 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +
167
+ 'or Array-like Object. Received type ' + (typeof value)
168
+ )
169
+ }
170
+
171
+ /**
172
+ * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
173
+ * if value is a number.
174
+ * Buffer.from(str[, encoding])
175
+ * Buffer.from(array)
176
+ * Buffer.from(buffer)
177
+ * Buffer.from(arrayBuffer[, byteOffset[, length]])
178
+ **/
179
+ Buffer.from = function (value, encodingOrOffset, length) {
180
+ return from(value, encodingOrOffset, length)
181
+ };
182
+
183
+ // Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:
184
+ // https://github.com/feross/buffer/pull/148
185
+ Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype);
186
+ Object.setPrototypeOf(Buffer, Uint8Array);
187
+
188
+ function assertSize (size) {
189
+ if (typeof size !== 'number') {
190
+ throw new TypeError('"size" argument must be of type number')
191
+ } else if (size < 0) {
192
+ throw new RangeError('The value "' + size + '" is invalid for option "size"')
193
+ }
194
+ }
195
+
196
+ function alloc (size, fill, encoding) {
197
+ assertSize(size);
198
+ if (size <= 0) {
199
+ return createBuffer(size)
200
+ }
201
+ if (fill !== undefined) {
202
+ // Only pay attention to encoding if it's a string. This
203
+ // prevents accidentally sending in a number that would
204
+ // be interpreted as a start offset.
205
+ return typeof encoding === 'string'
206
+ ? createBuffer(size).fill(fill, encoding)
207
+ : createBuffer(size).fill(fill)
208
+ }
209
+ return createBuffer(size)
210
+ }
211
+
212
+ /**
213
+ * Creates a new filled Buffer instance.
214
+ * alloc(size[, fill[, encoding]])
215
+ **/
216
+ Buffer.alloc = function (size, fill, encoding) {
217
+ return alloc(size, fill, encoding)
218
+ };
219
+
220
+ function allocUnsafe (size) {
221
+ assertSize(size);
222
+ return createBuffer(size < 0 ? 0 : checked(size) | 0)
223
+ }
224
+
225
+ /**
226
+ * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
227
+ * */
228
+ Buffer.allocUnsafe = function (size) {
229
+ return allocUnsafe(size)
230
+ };
231
+ /**
232
+ * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
233
+ */
234
+ Buffer.allocUnsafeSlow = function (size) {
235
+ return allocUnsafe(size)
236
+ };
237
+
238
+ function fromString (string, encoding) {
239
+ if (typeof encoding !== 'string' || encoding === '') {
240
+ encoding = 'utf8';
241
+ }
242
+
243
+ if (!Buffer.isEncoding(encoding)) {
244
+ throw new TypeError('Unknown encoding: ' + encoding)
245
+ }
246
+
247
+ const length = byteLength(string, encoding) | 0;
248
+ let buf = createBuffer(length);
249
+
250
+ const actual = buf.write(string, encoding);
251
+
252
+ if (actual !== length) {
253
+ // Writing a hex string, for example, that contains invalid characters will
254
+ // cause everything after the first invalid character to be ignored. (e.g.
255
+ // 'abxxcd' will be treated as 'ab')
256
+ buf = buf.slice(0, actual);
257
+ }
258
+
259
+ return buf
260
+ }
261
+
262
+ function fromArrayLike (array) {
263
+ const length = array.length < 0 ? 0 : checked(array.length) | 0;
264
+ const buf = createBuffer(length);
265
+ for (let i = 0; i < length; i += 1) {
266
+ buf[i] = array[i] & 255;
267
+ }
268
+ return buf
269
+ }
270
+
271
+ function fromArrayView (arrayView) {
272
+ if (isInstance(arrayView, Uint8Array)) {
273
+ const copy = new Uint8Array(arrayView);
274
+ return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)
275
+ }
276
+ return fromArrayLike(arrayView)
277
+ }
278
+
279
+ function fromArrayBuffer (array, byteOffset, length) {
280
+ if (byteOffset < 0 || array.byteLength < byteOffset) {
281
+ throw new RangeError('"offset" is outside of buffer bounds')
282
+ }
283
+
284
+ if (array.byteLength < byteOffset + (length || 0)) {
285
+ throw new RangeError('"length" is outside of buffer bounds')
286
+ }
287
+
288
+ let buf;
289
+ if (byteOffset === undefined && length === undefined) {
290
+ buf = new Uint8Array(array);
291
+ } else if (length === undefined) {
292
+ buf = new Uint8Array(array, byteOffset);
293
+ } else {
294
+ buf = new Uint8Array(array, byteOffset, length);
295
+ }
296
+
297
+ // Return an augmented `Uint8Array` instance
298
+ Object.setPrototypeOf(buf, Buffer.prototype);
299
+
300
+ return buf
301
+ }
302
+
303
+ function fromObject (obj) {
304
+ if (Buffer.isBuffer(obj)) {
305
+ const len = checked(obj.length) | 0;
306
+ const buf = createBuffer(len);
307
+
308
+ if (buf.length === 0) {
309
+ return buf
310
+ }
311
+
312
+ obj.copy(buf, 0, 0, len);
313
+ return buf
314
+ }
315
+
316
+ if (obj.length !== undefined) {
317
+ if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {
318
+ return createBuffer(0)
319
+ }
320
+ return fromArrayLike(obj)
321
+ }
322
+
323
+ if (obj.type === 'Buffer' && Array.isArray(obj.data)) {
324
+ return fromArrayLike(obj.data)
325
+ }
326
+ }
327
+
328
+ function checked (length) {
329
+ // Note: cannot use `length < K_MAX_LENGTH` here because that fails when
330
+ // length is NaN (which is otherwise coerced to zero.)
331
+ if (length >= K_MAX_LENGTH) {
332
+ throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
333
+ 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')
334
+ }
335
+ return length | 0
336
+ }
337
+
338
+ function SlowBuffer (length) {
339
+ if (+length != length) { // eslint-disable-line eqeqeq
340
+ length = 0;
341
+ }
342
+ return Buffer.alloc(+length)
343
+ }
344
+
345
+ Buffer.isBuffer = function isBuffer (b) {
346
+ return b != null && b._isBuffer === true &&
347
+ b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false
348
+ };
349
+
350
+ Buffer.compare = function compare (a, b) {
351
+ if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength);
352
+ if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength);
353
+ if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
354
+ throw new TypeError(
355
+ 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
356
+ )
357
+ }
358
+
359
+ if (a === b) return 0
360
+
361
+ let x = a.length;
362
+ let y = b.length;
363
+
364
+ for (let i = 0, len = Math.min(x, y); i < len; ++i) {
365
+ if (a[i] !== b[i]) {
366
+ x = a[i];
367
+ y = b[i];
368
+ break
369
+ }
370
+ }
371
+
372
+ if (x < y) return -1
373
+ if (y < x) return 1
374
+ return 0
375
+ };
376
+
377
+ Buffer.isEncoding = function isEncoding (encoding) {
378
+ switch (String(encoding).toLowerCase()) {
379
+ case 'hex':
380
+ case 'utf8':
381
+ case 'utf-8':
382
+ case 'ascii':
383
+ case 'latin1':
384
+ case 'binary':
385
+ case 'base64':
386
+ case 'ucs2':
387
+ case 'ucs-2':
388
+ case 'utf16le':
389
+ case 'utf-16le':
390
+ return true
391
+ default:
392
+ return false
393
+ }
394
+ };
395
+
396
+ Buffer.concat = function concat (list, length) {
397
+ if (!Array.isArray(list)) {
398
+ throw new TypeError('"list" argument must be an Array of Buffers')
399
+ }
400
+
401
+ if (list.length === 0) {
402
+ return Buffer.alloc(0)
403
+ }
404
+
405
+ let i;
406
+ if (length === undefined) {
407
+ length = 0;
408
+ for (i = 0; i < list.length; ++i) {
409
+ length += list[i].length;
410
+ }
411
+ }
412
+
413
+ const buffer = Buffer.allocUnsafe(length);
414
+ let pos = 0;
415
+ for (i = 0; i < list.length; ++i) {
416
+ let buf = list[i];
417
+ if (isInstance(buf, Uint8Array)) {
418
+ if (pos + buf.length > buffer.length) {
419
+ if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf);
420
+ buf.copy(buffer, pos);
421
+ } else {
422
+ Uint8Array.prototype.set.call(
423
+ buffer,
424
+ buf,
425
+ pos
426
+ );
427
+ }
428
+ } else if (!Buffer.isBuffer(buf)) {
429
+ throw new TypeError('"list" argument must be an Array of Buffers')
430
+ } else {
431
+ buf.copy(buffer, pos);
432
+ }
433
+ pos += buf.length;
434
+ }
435
+ return buffer
436
+ };
437
+
438
+ function byteLength (string, encoding) {
439
+ if (Buffer.isBuffer(string)) {
440
+ return string.length
441
+ }
442
+ if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {
443
+ return string.byteLength
444
+ }
445
+ if (typeof string !== 'string') {
446
+ throw new TypeError(
447
+ 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' +
448
+ 'Received type ' + typeof string
449
+ )
450
+ }
451
+
452
+ const len = string.length;
453
+ const mustMatch = (arguments.length > 2 && arguments[2] === true);
454
+ if (!mustMatch && len === 0) return 0
455
+
456
+ // Use a for loop to avoid recursion
457
+ let loweredCase = false;
458
+ for (;;) {
459
+ switch (encoding) {
460
+ case 'ascii':
461
+ case 'latin1':
462
+ case 'binary':
463
+ return len
464
+ case 'utf8':
465
+ case 'utf-8':
466
+ return utf8ToBytes(string).length
467
+ case 'ucs2':
468
+ case 'ucs-2':
469
+ case 'utf16le':
470
+ case 'utf-16le':
471
+ return len * 2
472
+ case 'hex':
473
+ return len >>> 1
474
+ case 'base64':
475
+ return base64ToBytes(string).length
476
+ default:
477
+ if (loweredCase) {
478
+ return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8
479
+ }
480
+ encoding = ('' + encoding).toLowerCase();
481
+ loweredCase = true;
482
+ }
483
+ }
484
+ }
485
+ Buffer.byteLength = byteLength;
486
+
487
+ function slowToString (encoding, start, end) {
488
+ let loweredCase = false;
489
+
490
+ // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
491
+ // property of a typed array.
492
+
493
+ // This behaves neither like String nor Uint8Array in that we set start/end
494
+ // to their upper/lower bounds if the value passed is out of range.
495
+ // undefined is handled specially as per ECMA-262 6th Edition,
496
+ // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
497
+ if (start === undefined || start < 0) {
498
+ start = 0;
499
+ }
500
+ // Return early if start > this.length. Done here to prevent potential uint32
501
+ // coercion fail below.
502
+ if (start > this.length) {
503
+ return ''
504
+ }
505
+
506
+ if (end === undefined || end > this.length) {
507
+ end = this.length;
508
+ }
509
+
510
+ if (end <= 0) {
511
+ return ''
512
+ }
513
+
514
+ // Force coercion to uint32. This will also coerce falsey/NaN values to 0.
515
+ end >>>= 0;
516
+ start >>>= 0;
517
+
518
+ if (end <= start) {
519
+ return ''
520
+ }
521
+
522
+ if (!encoding) encoding = 'utf8';
523
+
524
+ while (true) {
525
+ switch (encoding) {
526
+ case 'hex':
527
+ return hexSlice(this, start, end)
528
+
529
+ case 'utf8':
530
+ case 'utf-8':
531
+ return utf8Slice(this, start, end)
532
+
533
+ case 'ascii':
534
+ return asciiSlice(this, start, end)
535
+
536
+ case 'latin1':
537
+ case 'binary':
538
+ return latin1Slice(this, start, end)
539
+
540
+ case 'base64':
541
+ return base64Slice(this, start, end)
542
+
543
+ case 'ucs2':
544
+ case 'ucs-2':
545
+ case 'utf16le':
546
+ case 'utf-16le':
547
+ return utf16leSlice(this, start, end)
548
+
549
+ default:
550
+ if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
551
+ encoding = (encoding + '').toLowerCase();
552
+ loweredCase = true;
553
+ }
554
+ }
555
+ }
556
+
557
+ // This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)
558
+ // to detect a Buffer instance. It's not possible to use `instanceof Buffer`
559
+ // reliably in a browserify context because there could be multiple different
560
+ // copies of the 'buffer' package in use. This method works even for Buffer
561
+ // instances that were created from another copy of the `buffer` package.
562
+ // See: https://github.com/feross/buffer/issues/154
563
+ Buffer.prototype._isBuffer = true;
564
+
565
+ function swap (b, n, m) {
566
+ const i = b[n];
567
+ b[n] = b[m];
568
+ b[m] = i;
569
+ }
570
+
571
+ Buffer.prototype.swap16 = function swap16 () {
572
+ const len = this.length;
573
+ if (len % 2 !== 0) {
574
+ throw new RangeError('Buffer size must be a multiple of 16-bits')
575
+ }
576
+ for (let i = 0; i < len; i += 2) {
577
+ swap(this, i, i + 1);
578
+ }
579
+ return this
580
+ };
581
+
582
+ Buffer.prototype.swap32 = function swap32 () {
583
+ const len = this.length;
584
+ if (len % 4 !== 0) {
585
+ throw new RangeError('Buffer size must be a multiple of 32-bits')
586
+ }
587
+ for (let i = 0; i < len; i += 4) {
588
+ swap(this, i, i + 3);
589
+ swap(this, i + 1, i + 2);
590
+ }
591
+ return this
592
+ };
593
+
594
+ Buffer.prototype.swap64 = function swap64 () {
595
+ const len = this.length;
596
+ if (len % 8 !== 0) {
597
+ throw new RangeError('Buffer size must be a multiple of 64-bits')
598
+ }
599
+ for (let i = 0; i < len; i += 8) {
600
+ swap(this, i, i + 7);
601
+ swap(this, i + 1, i + 6);
602
+ swap(this, i + 2, i + 5);
603
+ swap(this, i + 3, i + 4);
604
+ }
605
+ return this
606
+ };
607
+
608
+ Buffer.prototype.toString = function toString () {
609
+ const length = this.length;
610
+ if (length === 0) return ''
611
+ if (arguments.length === 0) return utf8Slice(this, 0, length)
612
+ return slowToString.apply(this, arguments)
613
+ };
614
+
615
+ Buffer.prototype.toLocaleString = Buffer.prototype.toString;
616
+
617
+ Buffer.prototype.equals = function equals (b) {
618
+ if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
619
+ if (this === b) return true
620
+ return Buffer.compare(this, b) === 0
621
+ };
622
+
623
+ Buffer.prototype.inspect = function inspect () {
624
+ let str = '';
625
+ const max = exports.INSPECT_MAX_BYTES;
626
+ str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim();
627
+ if (this.length > max) str += ' ... ';
628
+ return '<Buffer ' + str + '>'
629
+ };
630
+ if (customInspectSymbol) {
631
+ Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect;
632
+ }
633
+
634
+ Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
635
+ if (isInstance(target, Uint8Array)) {
636
+ target = Buffer.from(target, target.offset, target.byteLength);
637
+ }
638
+ if (!Buffer.isBuffer(target)) {
639
+ throw new TypeError(
640
+ 'The "target" argument must be one of type Buffer or Uint8Array. ' +
641
+ 'Received type ' + (typeof target)
642
+ )
643
+ }
644
+
645
+ if (start === undefined) {
646
+ start = 0;
647
+ }
648
+ if (end === undefined) {
649
+ end = target ? target.length : 0;
650
+ }
651
+ if (thisStart === undefined) {
652
+ thisStart = 0;
653
+ }
654
+ if (thisEnd === undefined) {
655
+ thisEnd = this.length;
656
+ }
657
+
658
+ if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
659
+ throw new RangeError('out of range index')
660
+ }
661
+
662
+ if (thisStart >= thisEnd && start >= end) {
663
+ return 0
664
+ }
665
+ if (thisStart >= thisEnd) {
666
+ return -1
667
+ }
668
+ if (start >= end) {
669
+ return 1
670
+ }
671
+
672
+ start >>>= 0;
673
+ end >>>= 0;
674
+ thisStart >>>= 0;
675
+ thisEnd >>>= 0;
676
+
677
+ if (this === target) return 0
678
+
679
+ let x = thisEnd - thisStart;
680
+ let y = end - start;
681
+ const len = Math.min(x, y);
682
+
683
+ const thisCopy = this.slice(thisStart, thisEnd);
684
+ const targetCopy = target.slice(start, end);
685
+
686
+ for (let i = 0; i < len; ++i) {
687
+ if (thisCopy[i] !== targetCopy[i]) {
688
+ x = thisCopy[i];
689
+ y = targetCopy[i];
690
+ break
691
+ }
692
+ }
693
+
694
+ if (x < y) return -1
695
+ if (y < x) return 1
696
+ return 0
697
+ };
698
+
699
+ // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
700
+ // OR the last index of `val` in `buffer` at offset <= `byteOffset`.
701
+ //
702
+ // Arguments:
703
+ // - buffer - a Buffer to search
704
+ // - val - a string, Buffer, or number
705
+ // - byteOffset - an index into `buffer`; will be clamped to an int32
706
+ // - encoding - an optional encoding, relevant is val is a string
707
+ // - dir - true for indexOf, false for lastIndexOf
708
+ function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
709
+ // Empty buffer means no match
710
+ if (buffer.length === 0) return -1
711
+
712
+ // Normalize byteOffset
713
+ if (typeof byteOffset === 'string') {
714
+ encoding = byteOffset;
715
+ byteOffset = 0;
716
+ } else if (byteOffset > 0x7fffffff) {
717
+ byteOffset = 0x7fffffff;
718
+ } else if (byteOffset < -0x80000000) {
719
+ byteOffset = -0x80000000;
720
+ }
721
+ byteOffset = +byteOffset; // Coerce to Number.
722
+ if (numberIsNaN(byteOffset)) {
723
+ // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
724
+ byteOffset = dir ? 0 : (buffer.length - 1);
725
+ }
726
+
727
+ // Normalize byteOffset: negative offsets start from the end of the buffer
728
+ if (byteOffset < 0) byteOffset = buffer.length + byteOffset;
729
+ if (byteOffset >= buffer.length) {
730
+ if (dir) return -1
731
+ else byteOffset = buffer.length - 1;
732
+ } else if (byteOffset < 0) {
733
+ if (dir) byteOffset = 0;
734
+ else return -1
735
+ }
736
+
737
+ // Normalize val
738
+ if (typeof val === 'string') {
739
+ val = Buffer.from(val, encoding);
740
+ }
741
+
742
+ // Finally, search either indexOf (if dir is true) or lastIndexOf
743
+ if (Buffer.isBuffer(val)) {
744
+ // Special case: looking for empty string/buffer always fails
745
+ if (val.length === 0) {
746
+ return -1
747
+ }
748
+ return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
749
+ } else if (typeof val === 'number') {
750
+ val = val & 0xFF; // Search for a byte value [0-255]
751
+ if (typeof Uint8Array.prototype.indexOf === 'function') {
752
+ if (dir) {
753
+ return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
754
+ } else {
755
+ return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
756
+ }
757
+ }
758
+ return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)
759
+ }
760
+
761
+ throw new TypeError('val must be string, number or Buffer')
762
+ }
763
+
764
+ function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
765
+ let indexSize = 1;
766
+ let arrLength = arr.length;
767
+ let valLength = val.length;
768
+
769
+ if (encoding !== undefined) {
770
+ encoding = String(encoding).toLowerCase();
771
+ if (encoding === 'ucs2' || encoding === 'ucs-2' ||
772
+ encoding === 'utf16le' || encoding === 'utf-16le') {
773
+ if (arr.length < 2 || val.length < 2) {
774
+ return -1
775
+ }
776
+ indexSize = 2;
777
+ arrLength /= 2;
778
+ valLength /= 2;
779
+ byteOffset /= 2;
780
+ }
781
+ }
782
+
783
+ function read (buf, i) {
784
+ if (indexSize === 1) {
785
+ return buf[i]
786
+ } else {
787
+ return buf.readUInt16BE(i * indexSize)
788
+ }
789
+ }
790
+
791
+ let i;
792
+ if (dir) {
793
+ let foundIndex = -1;
794
+ for (i = byteOffset; i < arrLength; i++) {
795
+ if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
796
+ if (foundIndex === -1) foundIndex = i;
797
+ if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
798
+ } else {
799
+ if (foundIndex !== -1) i -= i - foundIndex;
800
+ foundIndex = -1;
801
+ }
802
+ }
803
+ } else {
804
+ if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
805
+ for (i = byteOffset; i >= 0; i--) {
806
+ let found = true;
807
+ for (let j = 0; j < valLength; j++) {
808
+ if (read(arr, i + j) !== read(val, j)) {
809
+ found = false;
810
+ break
811
+ }
812
+ }
813
+ if (found) return i
814
+ }
815
+ }
816
+
817
+ return -1
818
+ }
819
+
820
+ Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
821
+ return this.indexOf(val, byteOffset, encoding) !== -1
822
+ };
823
+
824
+ Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
825
+ return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
826
+ };
827
+
828
+ Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
829
+ return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
830
+ };
831
+
832
+ function hexWrite (buf, string, offset, length) {
833
+ offset = Number(offset) || 0;
834
+ const remaining = buf.length - offset;
835
+ if (!length) {
836
+ length = remaining;
837
+ } else {
838
+ length = Number(length);
839
+ if (length > remaining) {
840
+ length = remaining;
841
+ }
842
+ }
843
+
844
+ const strLen = string.length;
845
+
846
+ if (length > strLen / 2) {
847
+ length = strLen / 2;
848
+ }
849
+ let i;
850
+ for (i = 0; i < length; ++i) {
851
+ const parsed = parseInt(string.substr(i * 2, 2), 16);
852
+ if (numberIsNaN(parsed)) return i
853
+ buf[offset + i] = parsed;
854
+ }
855
+ return i
856
+ }
857
+
858
+ function utf8Write (buf, string, offset, length) {
859
+ return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
860
+ }
861
+
862
+ function asciiWrite (buf, string, offset, length) {
863
+ return blitBuffer(asciiToBytes(string), buf, offset, length)
864
+ }
865
+
866
+ function base64Write (buf, string, offset, length) {
867
+ return blitBuffer(base64ToBytes(string), buf, offset, length)
868
+ }
869
+
870
+ function ucs2Write (buf, string, offset, length) {
871
+ return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
872
+ }
873
+
874
+ Buffer.prototype.write = function write (string, offset, length, encoding) {
875
+ // Buffer#write(string)
876
+ if (offset === undefined) {
877
+ encoding = 'utf8';
878
+ length = this.length;
879
+ offset = 0;
880
+ // Buffer#write(string, encoding)
881
+ } else if (length === undefined && typeof offset === 'string') {
882
+ encoding = offset;
883
+ length = this.length;
884
+ offset = 0;
885
+ // Buffer#write(string, offset[, length][, encoding])
886
+ } else if (isFinite(offset)) {
887
+ offset = offset >>> 0;
888
+ if (isFinite(length)) {
889
+ length = length >>> 0;
890
+ if (encoding === undefined) encoding = 'utf8';
891
+ } else {
892
+ encoding = length;
893
+ length = undefined;
894
+ }
895
+ } else {
896
+ throw new Error(
897
+ 'Buffer.write(string, encoding, offset[, length]) is no longer supported'
898
+ )
899
+ }
900
+
901
+ const remaining = this.length - offset;
902
+ if (length === undefined || length > remaining) length = remaining;
903
+
904
+ if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
905
+ throw new RangeError('Attempt to write outside buffer bounds')
906
+ }
907
+
908
+ if (!encoding) encoding = 'utf8';
909
+
910
+ let loweredCase = false;
911
+ for (;;) {
912
+ switch (encoding) {
913
+ case 'hex':
914
+ return hexWrite(this, string, offset, length)
915
+
916
+ case 'utf8':
917
+ case 'utf-8':
918
+ return utf8Write(this, string, offset, length)
919
+
920
+ case 'ascii':
921
+ case 'latin1':
922
+ case 'binary':
923
+ return asciiWrite(this, string, offset, length)
924
+
925
+ case 'base64':
926
+ // Warning: maxLength not taken into account in base64Write
927
+ return base64Write(this, string, offset, length)
928
+
929
+ case 'ucs2':
930
+ case 'ucs-2':
931
+ case 'utf16le':
932
+ case 'utf-16le':
933
+ return ucs2Write(this, string, offset, length)
934
+
935
+ default:
936
+ if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
937
+ encoding = ('' + encoding).toLowerCase();
938
+ loweredCase = true;
939
+ }
940
+ }
941
+ };
942
+
943
+ Buffer.prototype.toJSON = function toJSON () {
944
+ return {
945
+ type: 'Buffer',
946
+ data: Array.prototype.slice.call(this._arr || this, 0)
947
+ }
948
+ };
949
+
950
+ function base64Slice (buf, start, end) {
951
+ if (start === 0 && end === buf.length) {
952
+ return base64.fromByteArray(buf)
953
+ } else {
954
+ return base64.fromByteArray(buf.slice(start, end))
955
+ }
956
+ }
957
+
958
+ function utf8Slice (buf, start, end) {
959
+ end = Math.min(buf.length, end);
960
+ const res = [];
961
+
962
+ let i = start;
963
+ while (i < end) {
964
+ const firstByte = buf[i];
965
+ let codePoint = null;
966
+ let bytesPerSequence = (firstByte > 0xEF)
967
+ ? 4
968
+ : (firstByte > 0xDF)
969
+ ? 3
970
+ : (firstByte > 0xBF)
971
+ ? 2
972
+ : 1;
973
+
974
+ if (i + bytesPerSequence <= end) {
975
+ let secondByte, thirdByte, fourthByte, tempCodePoint;
976
+
977
+ switch (bytesPerSequence) {
978
+ case 1:
979
+ if (firstByte < 0x80) {
980
+ codePoint = firstByte;
981
+ }
982
+ break
983
+ case 2:
984
+ secondByte = buf[i + 1];
985
+ if ((secondByte & 0xC0) === 0x80) {
986
+ tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F);
987
+ if (tempCodePoint > 0x7F) {
988
+ codePoint = tempCodePoint;
989
+ }
990
+ }
991
+ break
992
+ case 3:
993
+ secondByte = buf[i + 1];
994
+ thirdByte = buf[i + 2];
995
+ if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
996
+ tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F);
997
+ if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
998
+ codePoint = tempCodePoint;
999
+ }
1000
+ }
1001
+ break
1002
+ case 4:
1003
+ secondByte = buf[i + 1];
1004
+ thirdByte = buf[i + 2];
1005
+ fourthByte = buf[i + 3];
1006
+ if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
1007
+ tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F);
1008
+ if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
1009
+ codePoint = tempCodePoint;
1010
+ }
1011
+ }
1012
+ }
1013
+ }
1014
+
1015
+ if (codePoint === null) {
1016
+ // we did not generate a valid codePoint so insert a
1017
+ // replacement char (U+FFFD) and advance only 1 byte
1018
+ codePoint = 0xFFFD;
1019
+ bytesPerSequence = 1;
1020
+ } else if (codePoint > 0xFFFF) {
1021
+ // encode to utf16 (surrogate pair dance)
1022
+ codePoint -= 0x10000;
1023
+ res.push(codePoint >>> 10 & 0x3FF | 0xD800);
1024
+ codePoint = 0xDC00 | codePoint & 0x3FF;
1025
+ }
1026
+
1027
+ res.push(codePoint);
1028
+ i += bytesPerSequence;
1029
+ }
1030
+
1031
+ return decodeCodePointsArray(res)
1032
+ }
1033
+
1034
+ // Based on http://stackoverflow.com/a/22747272/680742, the browser with
1035
+ // the lowest limit is Chrome, with 0x10000 args.
1036
+ // We go 1 magnitude less, for safety
1037
+ const MAX_ARGUMENTS_LENGTH = 0x1000;
1038
+
1039
+ function decodeCodePointsArray (codePoints) {
1040
+ const len = codePoints.length;
1041
+ if (len <= MAX_ARGUMENTS_LENGTH) {
1042
+ return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
1043
+ }
1044
+
1045
+ // Decode in chunks to avoid "call stack size exceeded".
1046
+ let res = '';
1047
+ let i = 0;
1048
+ while (i < len) {
1049
+ res += String.fromCharCode.apply(
1050
+ String,
1051
+ codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
1052
+ );
1053
+ }
1054
+ return res
1055
+ }
1056
+
1057
+ function asciiSlice (buf, start, end) {
1058
+ let ret = '';
1059
+ end = Math.min(buf.length, end);
1060
+
1061
+ for (let i = start; i < end; ++i) {
1062
+ ret += String.fromCharCode(buf[i] & 0x7F);
1063
+ }
1064
+ return ret
1065
+ }
1066
+
1067
+ function latin1Slice (buf, start, end) {
1068
+ let ret = '';
1069
+ end = Math.min(buf.length, end);
1070
+
1071
+ for (let i = start; i < end; ++i) {
1072
+ ret += String.fromCharCode(buf[i]);
1073
+ }
1074
+ return ret
1075
+ }
1076
+
1077
+ function hexSlice (buf, start, end) {
1078
+ const len = buf.length;
1079
+
1080
+ if (!start || start < 0) start = 0;
1081
+ if (!end || end < 0 || end > len) end = len;
1082
+
1083
+ let out = '';
1084
+ for (let i = start; i < end; ++i) {
1085
+ out += hexSliceLookupTable[buf[i]];
1086
+ }
1087
+ return out
1088
+ }
1089
+
1090
+ function utf16leSlice (buf, start, end) {
1091
+ const bytes = buf.slice(start, end);
1092
+ let res = '';
1093
+ // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)
1094
+ for (let i = 0; i < bytes.length - 1; i += 2) {
1095
+ res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256));
1096
+ }
1097
+ return res
1098
+ }
1099
+
1100
+ Buffer.prototype.slice = function slice (start, end) {
1101
+ const len = this.length;
1102
+ start = ~~start;
1103
+ end = end === undefined ? len : ~~end;
1104
+
1105
+ if (start < 0) {
1106
+ start += len;
1107
+ if (start < 0) start = 0;
1108
+ } else if (start > len) {
1109
+ start = len;
1110
+ }
1111
+
1112
+ if (end < 0) {
1113
+ end += len;
1114
+ if (end < 0) end = 0;
1115
+ } else if (end > len) {
1116
+ end = len;
1117
+ }
1118
+
1119
+ if (end < start) end = start;
1120
+
1121
+ const newBuf = this.subarray(start, end);
1122
+ // Return an augmented `Uint8Array` instance
1123
+ Object.setPrototypeOf(newBuf, Buffer.prototype);
1124
+
1125
+ return newBuf
1126
+ };
1127
+
1128
+ /*
1129
+ * Need to make sure that buffer isn't trying to write out of bounds.
1130
+ */
1131
+ function checkOffset (offset, ext, length) {
1132
+ if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
1133
+ if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
1134
+ }
1135
+
1136
+ Buffer.prototype.readUintLE =
1137
+ Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
1138
+ offset = offset >>> 0;
1139
+ byteLength = byteLength >>> 0;
1140
+ if (!noAssert) checkOffset(offset, byteLength, this.length);
1141
+
1142
+ let val = this[offset];
1143
+ let mul = 1;
1144
+ let i = 0;
1145
+ while (++i < byteLength && (mul *= 0x100)) {
1146
+ val += this[offset + i] * mul;
1147
+ }
1148
+
1149
+ return val
1150
+ };
1151
+
1152
+ Buffer.prototype.readUintBE =
1153
+ Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
1154
+ offset = offset >>> 0;
1155
+ byteLength = byteLength >>> 0;
1156
+ if (!noAssert) {
1157
+ checkOffset(offset, byteLength, this.length);
1158
+ }
1159
+
1160
+ let val = this[offset + --byteLength];
1161
+ let mul = 1;
1162
+ while (byteLength > 0 && (mul *= 0x100)) {
1163
+ val += this[offset + --byteLength] * mul;
1164
+ }
1165
+
1166
+ return val
1167
+ };
1168
+
1169
+ Buffer.prototype.readUint8 =
1170
+ Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
1171
+ offset = offset >>> 0;
1172
+ if (!noAssert) checkOffset(offset, 1, this.length);
1173
+ return this[offset]
1174
+ };
1175
+
1176
+ Buffer.prototype.readUint16LE =
1177
+ Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
1178
+ offset = offset >>> 0;
1179
+ if (!noAssert) checkOffset(offset, 2, this.length);
1180
+ return this[offset] | (this[offset + 1] << 8)
1181
+ };
1182
+
1183
+ Buffer.prototype.readUint16BE =
1184
+ Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
1185
+ offset = offset >>> 0;
1186
+ if (!noAssert) checkOffset(offset, 2, this.length);
1187
+ return (this[offset] << 8) | this[offset + 1]
1188
+ };
1189
+
1190
+ Buffer.prototype.readUint32LE =
1191
+ Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
1192
+ offset = offset >>> 0;
1193
+ if (!noAssert) checkOffset(offset, 4, this.length);
1194
+
1195
+ return ((this[offset]) |
1196
+ (this[offset + 1] << 8) |
1197
+ (this[offset + 2] << 16)) +
1198
+ (this[offset + 3] * 0x1000000)
1199
+ };
1200
+
1201
+ Buffer.prototype.readUint32BE =
1202
+ Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
1203
+ offset = offset >>> 0;
1204
+ if (!noAssert) checkOffset(offset, 4, this.length);
1205
+
1206
+ return (this[offset] * 0x1000000) +
1207
+ ((this[offset + 1] << 16) |
1208
+ (this[offset + 2] << 8) |
1209
+ this[offset + 3])
1210
+ };
1211
+
1212
+ Buffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {
1213
+ offset = offset >>> 0;
1214
+ validateNumber(offset, 'offset');
1215
+ const first = this[offset];
1216
+ const last = this[offset + 7];
1217
+ if (first === undefined || last === undefined) {
1218
+ boundsError(offset, this.length - 8);
1219
+ }
1220
+
1221
+ const lo = first +
1222
+ this[++offset] * 2 ** 8 +
1223
+ this[++offset] * 2 ** 16 +
1224
+ this[++offset] * 2 ** 24;
1225
+
1226
+ const hi = this[++offset] +
1227
+ this[++offset] * 2 ** 8 +
1228
+ this[++offset] * 2 ** 16 +
1229
+ last * 2 ** 24;
1230
+
1231
+ return BigInt(lo) + (BigInt(hi) << BigInt(32))
1232
+ });
1233
+
1234
+ Buffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {
1235
+ offset = offset >>> 0;
1236
+ validateNumber(offset, 'offset');
1237
+ const first = this[offset];
1238
+ const last = this[offset + 7];
1239
+ if (first === undefined || last === undefined) {
1240
+ boundsError(offset, this.length - 8);
1241
+ }
1242
+
1243
+ const hi = first * 2 ** 24 +
1244
+ this[++offset] * 2 ** 16 +
1245
+ this[++offset] * 2 ** 8 +
1246
+ this[++offset];
1247
+
1248
+ const lo = this[++offset] * 2 ** 24 +
1249
+ this[++offset] * 2 ** 16 +
1250
+ this[++offset] * 2 ** 8 +
1251
+ last;
1252
+
1253
+ return (BigInt(hi) << BigInt(32)) + BigInt(lo)
1254
+ });
1255
+
1256
+ Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
1257
+ offset = offset >>> 0;
1258
+ byteLength = byteLength >>> 0;
1259
+ if (!noAssert) checkOffset(offset, byteLength, this.length);
1260
+
1261
+ let val = this[offset];
1262
+ let mul = 1;
1263
+ let i = 0;
1264
+ while (++i < byteLength && (mul *= 0x100)) {
1265
+ val += this[offset + i] * mul;
1266
+ }
1267
+ mul *= 0x80;
1268
+
1269
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength);
1270
+
1271
+ return val
1272
+ };
1273
+
1274
+ Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
1275
+ offset = offset >>> 0;
1276
+ byteLength = byteLength >>> 0;
1277
+ if (!noAssert) checkOffset(offset, byteLength, this.length);
1278
+
1279
+ let i = byteLength;
1280
+ let mul = 1;
1281
+ let val = this[offset + --i];
1282
+ while (i > 0 && (mul *= 0x100)) {
1283
+ val += this[offset + --i] * mul;
1284
+ }
1285
+ mul *= 0x80;
1286
+
1287
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength);
1288
+
1289
+ return val
1290
+ };
1291
+
1292
+ Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
1293
+ offset = offset >>> 0;
1294
+ if (!noAssert) checkOffset(offset, 1, this.length);
1295
+ if (!(this[offset] & 0x80)) return (this[offset])
1296
+ return ((0xff - this[offset] + 1) * -1)
1297
+ };
1298
+
1299
+ Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
1300
+ offset = offset >>> 0;
1301
+ if (!noAssert) checkOffset(offset, 2, this.length);
1302
+ const val = this[offset] | (this[offset + 1] << 8);
1303
+ return (val & 0x8000) ? val | 0xFFFF0000 : val
1304
+ };
1305
+
1306
+ Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
1307
+ offset = offset >>> 0;
1308
+ if (!noAssert) checkOffset(offset, 2, this.length);
1309
+ const val = this[offset + 1] | (this[offset] << 8);
1310
+ return (val & 0x8000) ? val | 0xFFFF0000 : val
1311
+ };
1312
+
1313
+ Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
1314
+ offset = offset >>> 0;
1315
+ if (!noAssert) checkOffset(offset, 4, this.length);
1316
+
1317
+ return (this[offset]) |
1318
+ (this[offset + 1] << 8) |
1319
+ (this[offset + 2] << 16) |
1320
+ (this[offset + 3] << 24)
1321
+ };
1322
+
1323
+ Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
1324
+ offset = offset >>> 0;
1325
+ if (!noAssert) checkOffset(offset, 4, this.length);
1326
+
1327
+ return (this[offset] << 24) |
1328
+ (this[offset + 1] << 16) |
1329
+ (this[offset + 2] << 8) |
1330
+ (this[offset + 3])
1331
+ };
1332
+
1333
+ Buffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {
1334
+ offset = offset >>> 0;
1335
+ validateNumber(offset, 'offset');
1336
+ const first = this[offset];
1337
+ const last = this[offset + 7];
1338
+ if (first === undefined || last === undefined) {
1339
+ boundsError(offset, this.length - 8);
1340
+ }
1341
+
1342
+ const val = this[offset + 4] +
1343
+ this[offset + 5] * 2 ** 8 +
1344
+ this[offset + 6] * 2 ** 16 +
1345
+ (last << 24); // Overflow
1346
+
1347
+ return (BigInt(val) << BigInt(32)) +
1348
+ BigInt(first +
1349
+ this[++offset] * 2 ** 8 +
1350
+ this[++offset] * 2 ** 16 +
1351
+ this[++offset] * 2 ** 24)
1352
+ });
1353
+
1354
+ Buffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {
1355
+ offset = offset >>> 0;
1356
+ validateNumber(offset, 'offset');
1357
+ const first = this[offset];
1358
+ const last = this[offset + 7];
1359
+ if (first === undefined || last === undefined) {
1360
+ boundsError(offset, this.length - 8);
1361
+ }
1362
+
1363
+ const val = (first << 24) + // Overflow
1364
+ this[++offset] * 2 ** 16 +
1365
+ this[++offset] * 2 ** 8 +
1366
+ this[++offset];
1367
+
1368
+ return (BigInt(val) << BigInt(32)) +
1369
+ BigInt(this[++offset] * 2 ** 24 +
1370
+ this[++offset] * 2 ** 16 +
1371
+ this[++offset] * 2 ** 8 +
1372
+ last)
1373
+ });
1374
+
1375
+ Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
1376
+ offset = offset >>> 0;
1377
+ if (!noAssert) checkOffset(offset, 4, this.length);
1378
+ return ieee754$1.read(this, offset, true, 23, 4)
1379
+ };
1380
+
1381
+ Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
1382
+ offset = offset >>> 0;
1383
+ if (!noAssert) checkOffset(offset, 4, this.length);
1384
+ return ieee754$1.read(this, offset, false, 23, 4)
1385
+ };
1386
+
1387
+ Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
1388
+ offset = offset >>> 0;
1389
+ if (!noAssert) checkOffset(offset, 8, this.length);
1390
+ return ieee754$1.read(this, offset, true, 52, 8)
1391
+ };
1392
+
1393
+ Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
1394
+ offset = offset >>> 0;
1395
+ if (!noAssert) checkOffset(offset, 8, this.length);
1396
+ return ieee754$1.read(this, offset, false, 52, 8)
1397
+ };
1398
+
1399
+ function checkInt (buf, value, offset, ext, max, min) {
1400
+ if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
1401
+ if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
1402
+ if (offset + ext > buf.length) throw new RangeError('Index out of range')
1403
+ }
1404
+
1405
+ Buffer.prototype.writeUintLE =
1406
+ Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
1407
+ value = +value;
1408
+ offset = offset >>> 0;
1409
+ byteLength = byteLength >>> 0;
1410
+ if (!noAssert) {
1411
+ const maxBytes = Math.pow(2, 8 * byteLength) - 1;
1412
+ checkInt(this, value, offset, byteLength, maxBytes, 0);
1413
+ }
1414
+
1415
+ let mul = 1;
1416
+ let i = 0;
1417
+ this[offset] = value & 0xFF;
1418
+ while (++i < byteLength && (mul *= 0x100)) {
1419
+ this[offset + i] = (value / mul) & 0xFF;
1420
+ }
1421
+
1422
+ return offset + byteLength
1423
+ };
1424
+
1425
+ Buffer.prototype.writeUintBE =
1426
+ Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
1427
+ value = +value;
1428
+ offset = offset >>> 0;
1429
+ byteLength = byteLength >>> 0;
1430
+ if (!noAssert) {
1431
+ const maxBytes = Math.pow(2, 8 * byteLength) - 1;
1432
+ checkInt(this, value, offset, byteLength, maxBytes, 0);
1433
+ }
1434
+
1435
+ let i = byteLength - 1;
1436
+ let mul = 1;
1437
+ this[offset + i] = value & 0xFF;
1438
+ while (--i >= 0 && (mul *= 0x100)) {
1439
+ this[offset + i] = (value / mul) & 0xFF;
1440
+ }
1441
+
1442
+ return offset + byteLength
1443
+ };
1444
+
1445
+ Buffer.prototype.writeUint8 =
1446
+ Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
1447
+ value = +value;
1448
+ offset = offset >>> 0;
1449
+ if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);
1450
+ this[offset] = (value & 0xff);
1451
+ return offset + 1
1452
+ };
1453
+
1454
+ Buffer.prototype.writeUint16LE =
1455
+ Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
1456
+ value = +value;
1457
+ offset = offset >>> 0;
1458
+ if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
1459
+ this[offset] = (value & 0xff);
1460
+ this[offset + 1] = (value >>> 8);
1461
+ return offset + 2
1462
+ };
1463
+
1464
+ Buffer.prototype.writeUint16BE =
1465
+ Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
1466
+ value = +value;
1467
+ offset = offset >>> 0;
1468
+ if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
1469
+ this[offset] = (value >>> 8);
1470
+ this[offset + 1] = (value & 0xff);
1471
+ return offset + 2
1472
+ };
1473
+
1474
+ Buffer.prototype.writeUint32LE =
1475
+ Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
1476
+ value = +value;
1477
+ offset = offset >>> 0;
1478
+ if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
1479
+ this[offset + 3] = (value >>> 24);
1480
+ this[offset + 2] = (value >>> 16);
1481
+ this[offset + 1] = (value >>> 8);
1482
+ this[offset] = (value & 0xff);
1483
+ return offset + 4
1484
+ };
1485
+
1486
+ Buffer.prototype.writeUint32BE =
1487
+ Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
1488
+ value = +value;
1489
+ offset = offset >>> 0;
1490
+ if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
1491
+ this[offset] = (value >>> 24);
1492
+ this[offset + 1] = (value >>> 16);
1493
+ this[offset + 2] = (value >>> 8);
1494
+ this[offset + 3] = (value & 0xff);
1495
+ return offset + 4
1496
+ };
1497
+
1498
+ function wrtBigUInt64LE (buf, value, offset, min, max) {
1499
+ checkIntBI(value, min, max, buf, offset, 7);
1500
+
1501
+ let lo = Number(value & BigInt(0xffffffff));
1502
+ buf[offset++] = lo;
1503
+ lo = lo >> 8;
1504
+ buf[offset++] = lo;
1505
+ lo = lo >> 8;
1506
+ buf[offset++] = lo;
1507
+ lo = lo >> 8;
1508
+ buf[offset++] = lo;
1509
+ let hi = Number(value >> BigInt(32) & BigInt(0xffffffff));
1510
+ buf[offset++] = hi;
1511
+ hi = hi >> 8;
1512
+ buf[offset++] = hi;
1513
+ hi = hi >> 8;
1514
+ buf[offset++] = hi;
1515
+ hi = hi >> 8;
1516
+ buf[offset++] = hi;
1517
+ return offset
1518
+ }
1519
+
1520
+ function wrtBigUInt64BE (buf, value, offset, min, max) {
1521
+ checkIntBI(value, min, max, buf, offset, 7);
1522
+
1523
+ let lo = Number(value & BigInt(0xffffffff));
1524
+ buf[offset + 7] = lo;
1525
+ lo = lo >> 8;
1526
+ buf[offset + 6] = lo;
1527
+ lo = lo >> 8;
1528
+ buf[offset + 5] = lo;
1529
+ lo = lo >> 8;
1530
+ buf[offset + 4] = lo;
1531
+ let hi = Number(value >> BigInt(32) & BigInt(0xffffffff));
1532
+ buf[offset + 3] = hi;
1533
+ hi = hi >> 8;
1534
+ buf[offset + 2] = hi;
1535
+ hi = hi >> 8;
1536
+ buf[offset + 1] = hi;
1537
+ hi = hi >> 8;
1538
+ buf[offset] = hi;
1539
+ return offset + 8
1540
+ }
1541
+
1542
+ Buffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {
1543
+ return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))
1544
+ });
1545
+
1546
+ Buffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {
1547
+ return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))
1548
+ });
1549
+
1550
+ Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
1551
+ value = +value;
1552
+ offset = offset >>> 0;
1553
+ if (!noAssert) {
1554
+ const limit = Math.pow(2, (8 * byteLength) - 1);
1555
+
1556
+ checkInt(this, value, offset, byteLength, limit - 1, -limit);
1557
+ }
1558
+
1559
+ let i = 0;
1560
+ let mul = 1;
1561
+ let sub = 0;
1562
+ this[offset] = value & 0xFF;
1563
+ while (++i < byteLength && (mul *= 0x100)) {
1564
+ if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
1565
+ sub = 1;
1566
+ }
1567
+ this[offset + i] = ((value / mul) >> 0) - sub & 0xFF;
1568
+ }
1569
+
1570
+ return offset + byteLength
1571
+ };
1572
+
1573
+ Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
1574
+ value = +value;
1575
+ offset = offset >>> 0;
1576
+ if (!noAssert) {
1577
+ const limit = Math.pow(2, (8 * byteLength) - 1);
1578
+
1579
+ checkInt(this, value, offset, byteLength, limit - 1, -limit);
1580
+ }
1581
+
1582
+ let i = byteLength - 1;
1583
+ let mul = 1;
1584
+ let sub = 0;
1585
+ this[offset + i] = value & 0xFF;
1586
+ while (--i >= 0 && (mul *= 0x100)) {
1587
+ if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
1588
+ sub = 1;
1589
+ }
1590
+ this[offset + i] = ((value / mul) >> 0) - sub & 0xFF;
1591
+ }
1592
+
1593
+ return offset + byteLength
1594
+ };
1595
+
1596
+ Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
1597
+ value = +value;
1598
+ offset = offset >>> 0;
1599
+ if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);
1600
+ if (value < 0) value = 0xff + value + 1;
1601
+ this[offset] = (value & 0xff);
1602
+ return offset + 1
1603
+ };
1604
+
1605
+ Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
1606
+ value = +value;
1607
+ offset = offset >>> 0;
1608
+ if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
1609
+ this[offset] = (value & 0xff);
1610
+ this[offset + 1] = (value >>> 8);
1611
+ return offset + 2
1612
+ };
1613
+
1614
+ Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
1615
+ value = +value;
1616
+ offset = offset >>> 0;
1617
+ if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
1618
+ this[offset] = (value >>> 8);
1619
+ this[offset + 1] = (value & 0xff);
1620
+ return offset + 2
1621
+ };
1622
+
1623
+ Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
1624
+ value = +value;
1625
+ offset = offset >>> 0;
1626
+ if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
1627
+ this[offset] = (value & 0xff);
1628
+ this[offset + 1] = (value >>> 8);
1629
+ this[offset + 2] = (value >>> 16);
1630
+ this[offset + 3] = (value >>> 24);
1631
+ return offset + 4
1632
+ };
1633
+
1634
+ Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
1635
+ value = +value;
1636
+ offset = offset >>> 0;
1637
+ if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
1638
+ if (value < 0) value = 0xffffffff + value + 1;
1639
+ this[offset] = (value >>> 24);
1640
+ this[offset + 1] = (value >>> 16);
1641
+ this[offset + 2] = (value >>> 8);
1642
+ this[offset + 3] = (value & 0xff);
1643
+ return offset + 4
1644
+ };
1645
+
1646
+ Buffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {
1647
+ return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))
1648
+ });
1649
+
1650
+ Buffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {
1651
+ return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))
1652
+ });
1653
+
1654
+ function checkIEEE754 (buf, value, offset, ext, max, min) {
1655
+ if (offset + ext > buf.length) throw new RangeError('Index out of range')
1656
+ if (offset < 0) throw new RangeError('Index out of range')
1657
+ }
1658
+
1659
+ function writeFloat (buf, value, offset, littleEndian, noAssert) {
1660
+ value = +value;
1661
+ offset = offset >>> 0;
1662
+ if (!noAssert) {
1663
+ checkIEEE754(buf, value, offset, 4);
1664
+ }
1665
+ ieee754$1.write(buf, value, offset, littleEndian, 23, 4);
1666
+ return offset + 4
1667
+ }
1668
+
1669
+ Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
1670
+ return writeFloat(this, value, offset, true, noAssert)
1671
+ };
1672
+
1673
+ Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
1674
+ return writeFloat(this, value, offset, false, noAssert)
1675
+ };
1676
+
1677
+ function writeDouble (buf, value, offset, littleEndian, noAssert) {
1678
+ value = +value;
1679
+ offset = offset >>> 0;
1680
+ if (!noAssert) {
1681
+ checkIEEE754(buf, value, offset, 8);
1682
+ }
1683
+ ieee754$1.write(buf, value, offset, littleEndian, 52, 8);
1684
+ return offset + 8
1685
+ }
1686
+
1687
+ Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
1688
+ return writeDouble(this, value, offset, true, noAssert)
1689
+ };
1690
+
1691
+ Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
1692
+ return writeDouble(this, value, offset, false, noAssert)
1693
+ };
1694
+
1695
+ // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
1696
+ Buffer.prototype.copy = function copy (target, targetStart, start, end) {
1697
+ if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')
1698
+ if (!start) start = 0;
1699
+ if (!end && end !== 0) end = this.length;
1700
+ if (targetStart >= target.length) targetStart = target.length;
1701
+ if (!targetStart) targetStart = 0;
1702
+ if (end > 0 && end < start) end = start;
1703
+
1704
+ // Copy 0 bytes; we're done
1705
+ if (end === start) return 0
1706
+ if (target.length === 0 || this.length === 0) return 0
1707
+
1708
+ // Fatal error conditions
1709
+ if (targetStart < 0) {
1710
+ throw new RangeError('targetStart out of bounds')
1711
+ }
1712
+ if (start < 0 || start >= this.length) throw new RangeError('Index out of range')
1713
+ if (end < 0) throw new RangeError('sourceEnd out of bounds')
1714
+
1715
+ // Are we oob?
1716
+ if (end > this.length) end = this.length;
1717
+ if (target.length - targetStart < end - start) {
1718
+ end = target.length - targetStart + start;
1719
+ }
1720
+
1721
+ const len = end - start;
1722
+
1723
+ if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {
1724
+ // Use built-in when available, missing from IE11
1725
+ this.copyWithin(targetStart, start, end);
1726
+ } else {
1727
+ Uint8Array.prototype.set.call(
1728
+ target,
1729
+ this.subarray(start, end),
1730
+ targetStart
1731
+ );
1732
+ }
1733
+
1734
+ return len
1735
+ };
1736
+
1737
+ // Usage:
1738
+ // buffer.fill(number[, offset[, end]])
1739
+ // buffer.fill(buffer[, offset[, end]])
1740
+ // buffer.fill(string[, offset[, end]][, encoding])
1741
+ Buffer.prototype.fill = function fill (val, start, end, encoding) {
1742
+ // Handle string cases:
1743
+ if (typeof val === 'string') {
1744
+ if (typeof start === 'string') {
1745
+ encoding = start;
1746
+ start = 0;
1747
+ end = this.length;
1748
+ } else if (typeof end === 'string') {
1749
+ encoding = end;
1750
+ end = this.length;
1751
+ }
1752
+ if (encoding !== undefined && typeof encoding !== 'string') {
1753
+ throw new TypeError('encoding must be a string')
1754
+ }
1755
+ if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
1756
+ throw new TypeError('Unknown encoding: ' + encoding)
1757
+ }
1758
+ if (val.length === 1) {
1759
+ const code = val.charCodeAt(0);
1760
+ if ((encoding === 'utf8' && code < 128) ||
1761
+ encoding === 'latin1') {
1762
+ // Fast path: If `val` fits into a single byte, use that numeric value.
1763
+ val = code;
1764
+ }
1765
+ }
1766
+ } else if (typeof val === 'number') {
1767
+ val = val & 255;
1768
+ } else if (typeof val === 'boolean') {
1769
+ val = Number(val);
1770
+ }
1771
+
1772
+ // Invalid ranges are not set to a default, so can range check early.
1773
+ if (start < 0 || this.length < start || this.length < end) {
1774
+ throw new RangeError('Out of range index')
1775
+ }
1776
+
1777
+ if (end <= start) {
1778
+ return this
1779
+ }
1780
+
1781
+ start = start >>> 0;
1782
+ end = end === undefined ? this.length : end >>> 0;
1783
+
1784
+ if (!val) val = 0;
1785
+
1786
+ let i;
1787
+ if (typeof val === 'number') {
1788
+ for (i = start; i < end; ++i) {
1789
+ this[i] = val;
1790
+ }
1791
+ } else {
1792
+ const bytes = Buffer.isBuffer(val)
1793
+ ? val
1794
+ : Buffer.from(val, encoding);
1795
+ const len = bytes.length;
1796
+ if (len === 0) {
1797
+ throw new TypeError('The value "' + val +
1798
+ '" is invalid for argument "value"')
1799
+ }
1800
+ for (i = 0; i < end - start; ++i) {
1801
+ this[i + start] = bytes[i % len];
1802
+ }
1803
+ }
1804
+
1805
+ return this
1806
+ };
1807
+
1808
+ // CUSTOM ERRORS
1809
+ // =============
1810
+
1811
+ // Simplified versions from Node, changed for Buffer-only usage
1812
+ const errors = {};
1813
+ function E (sym, getMessage, Base) {
1814
+ errors[sym] = class NodeError extends Base {
1815
+ constructor () {
1816
+ super();
1817
+
1818
+ Object.defineProperty(this, 'message', {
1819
+ value: getMessage.apply(this, arguments),
1820
+ writable: true,
1821
+ configurable: true
1822
+ });
1823
+
1824
+ // Add the error code to the name to include it in the stack trace.
1825
+ this.name = `${this.name} [${sym}]`;
1826
+ // Access the stack to generate the error message including the error code
1827
+ // from the name.
1828
+ this.stack; // eslint-disable-line no-unused-expressions
1829
+ // Reset the name to the actual name.
1830
+ delete this.name;
1831
+ }
1832
+
1833
+ get code () {
1834
+ return sym
1835
+ }
1836
+
1837
+ set code (value) {
1838
+ Object.defineProperty(this, 'code', {
1839
+ configurable: true,
1840
+ enumerable: true,
1841
+ value,
1842
+ writable: true
1843
+ });
1844
+ }
1845
+
1846
+ toString () {
1847
+ return `${this.name} [${sym}]: ${this.message}`
1848
+ }
1849
+ };
1850
+ }
1851
+
1852
+ E('ERR_BUFFER_OUT_OF_BOUNDS',
1853
+ function (name) {
1854
+ if (name) {
1855
+ return `${name} is outside of buffer bounds`
1856
+ }
1857
+
1858
+ return 'Attempt to access memory outside buffer bounds'
1859
+ }, RangeError);
1860
+ E('ERR_INVALID_ARG_TYPE',
1861
+ function (name, actual) {
1862
+ return `The "${name}" argument must be of type number. Received type ${typeof actual}`
1863
+ }, TypeError);
1864
+ E('ERR_OUT_OF_RANGE',
1865
+ function (str, range, input) {
1866
+ let msg = `The value of "${str}" is out of range.`;
1867
+ let received = input;
1868
+ if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {
1869
+ received = addNumericalSeparator(String(input));
1870
+ } else if (typeof input === 'bigint') {
1871
+ received = String(input);
1872
+ if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {
1873
+ received = addNumericalSeparator(received);
1874
+ }
1875
+ received += 'n';
1876
+ }
1877
+ msg += ` It must be ${range}. Received ${received}`;
1878
+ return msg
1879
+ }, RangeError);
1880
+
1881
+ function addNumericalSeparator (val) {
1882
+ let res = '';
1883
+ let i = val.length;
1884
+ const start = val[0] === '-' ? 1 : 0;
1885
+ for (; i >= start + 4; i -= 3) {
1886
+ res = `_${val.slice(i - 3, i)}${res}`;
1887
+ }
1888
+ return `${val.slice(0, i)}${res}`
1889
+ }
1890
+
1891
+ // CHECK FUNCTIONS
1892
+ // ===============
1893
+
1894
+ function checkBounds (buf, offset, byteLength) {
1895
+ validateNumber(offset, 'offset');
1896
+ if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {
1897
+ boundsError(offset, buf.length - (byteLength + 1));
1898
+ }
1899
+ }
1900
+
1901
+ function checkIntBI (value, min, max, buf, offset, byteLength) {
1902
+ if (value > max || value < min) {
1903
+ const n = typeof min === 'bigint' ? 'n' : '';
1904
+ let range;
1905
+ if (byteLength > 3) {
1906
+ if (min === 0 || min === BigInt(0)) {
1907
+ range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`;
1908
+ } else {
1909
+ range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +
1910
+ `${(byteLength + 1) * 8 - 1}${n}`;
1911
+ }
1912
+ } else {
1913
+ range = `>= ${min}${n} and <= ${max}${n}`;
1914
+ }
1915
+ throw new errors.ERR_OUT_OF_RANGE('value', range, value)
1916
+ }
1917
+ checkBounds(buf, offset, byteLength);
1918
+ }
1919
+
1920
+ function validateNumber (value, name) {
1921
+ if (typeof value !== 'number') {
1922
+ throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)
1923
+ }
1924
+ }
1925
+
1926
+ function boundsError (value, length, type) {
1927
+ if (Math.floor(value) !== value) {
1928
+ validateNumber(value, type);
1929
+ throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)
1930
+ }
1931
+
1932
+ if (length < 0) {
1933
+ throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()
1934
+ }
1935
+
1936
+ throw new errors.ERR_OUT_OF_RANGE(type || 'offset',
1937
+ `>= ${type ? 1 : 0} and <= ${length}`,
1938
+ value)
1939
+ }
1940
+
1941
+ // HELPER FUNCTIONS
1942
+ // ================
1943
+
1944
+ const INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;
1945
+
1946
+ function base64clean (str) {
1947
+ // Node takes equal signs as end of the Base64 encoding
1948
+ str = str.split('=')[0];
1949
+ // Node strips out invalid characters like \n and \t from the string, base64-js does not
1950
+ str = str.trim().replace(INVALID_BASE64_RE, '');
1951
+ // Node converts strings with length < 2 to ''
1952
+ if (str.length < 2) return ''
1953
+ // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
1954
+ while (str.length % 4 !== 0) {
1955
+ str = str + '=';
1956
+ }
1957
+ return str
1958
+ }
1959
+
1960
+ function utf8ToBytes (string, units) {
1961
+ units = units || Infinity;
1962
+ let codePoint;
1963
+ const length = string.length;
1964
+ let leadSurrogate = null;
1965
+ const bytes = [];
1966
+
1967
+ for (let i = 0; i < length; ++i) {
1968
+ codePoint = string.charCodeAt(i);
1969
+
1970
+ // is surrogate component
1971
+ if (codePoint > 0xD7FF && codePoint < 0xE000) {
1972
+ // last char was a lead
1973
+ if (!leadSurrogate) {
1974
+ // no lead yet
1975
+ if (codePoint > 0xDBFF) {
1976
+ // unexpected trail
1977
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
1978
+ continue
1979
+ } else if (i + 1 === length) {
1980
+ // unpaired lead
1981
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
1982
+ continue
1983
+ }
1984
+
1985
+ // valid lead
1986
+ leadSurrogate = codePoint;
1987
+
1988
+ continue
1989
+ }
1990
+
1991
+ // 2 leads in a row
1992
+ if (codePoint < 0xDC00) {
1993
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
1994
+ leadSurrogate = codePoint;
1995
+ continue
1996
+ }
1997
+
1998
+ // valid surrogate pair
1999
+ codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;
2000
+ } else if (leadSurrogate) {
2001
+ // valid bmp char, but last char was a lead
2002
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
2003
+ }
2004
+
2005
+ leadSurrogate = null;
2006
+
2007
+ // encode utf8
2008
+ if (codePoint < 0x80) {
2009
+ if ((units -= 1) < 0) break
2010
+ bytes.push(codePoint);
2011
+ } else if (codePoint < 0x800) {
2012
+ if ((units -= 2) < 0) break
2013
+ bytes.push(
2014
+ codePoint >> 0x6 | 0xC0,
2015
+ codePoint & 0x3F | 0x80
2016
+ );
2017
+ } else if (codePoint < 0x10000) {
2018
+ if ((units -= 3) < 0) break
2019
+ bytes.push(
2020
+ codePoint >> 0xC | 0xE0,
2021
+ codePoint >> 0x6 & 0x3F | 0x80,
2022
+ codePoint & 0x3F | 0x80
2023
+ );
2024
+ } else if (codePoint < 0x110000) {
2025
+ if ((units -= 4) < 0) break
2026
+ bytes.push(
2027
+ codePoint >> 0x12 | 0xF0,
2028
+ codePoint >> 0xC & 0x3F | 0x80,
2029
+ codePoint >> 0x6 & 0x3F | 0x80,
2030
+ codePoint & 0x3F | 0x80
2031
+ );
2032
+ } else {
2033
+ throw new Error('Invalid code point')
2034
+ }
2035
+ }
2036
+
2037
+ return bytes
2038
+ }
2039
+
2040
+ function asciiToBytes (str) {
2041
+ const byteArray = [];
2042
+ for (let i = 0; i < str.length; ++i) {
2043
+ // Node's code seems to be doing this and not & 0x7F..
2044
+ byteArray.push(str.charCodeAt(i) & 0xFF);
2045
+ }
2046
+ return byteArray
2047
+ }
2048
+
2049
+ function utf16leToBytes (str, units) {
2050
+ let c, hi, lo;
2051
+ const byteArray = [];
2052
+ for (let i = 0; i < str.length; ++i) {
2053
+ if ((units -= 2) < 0) break
2054
+
2055
+ c = str.charCodeAt(i);
2056
+ hi = c >> 8;
2057
+ lo = c % 256;
2058
+ byteArray.push(lo);
2059
+ byteArray.push(hi);
2060
+ }
2061
+
2062
+ return byteArray
2063
+ }
2064
+
2065
+ function base64ToBytes (str) {
2066
+ return base64.toByteArray(base64clean(str))
2067
+ }
2068
+
2069
+ function blitBuffer (src, dst, offset, length) {
2070
+ let i;
2071
+ for (i = 0; i < length; ++i) {
2072
+ if ((i + offset >= dst.length) || (i >= src.length)) break
2073
+ dst[i + offset] = src[i];
2074
+ }
2075
+ return i
2076
+ }
2077
+
2078
+ // ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass
2079
+ // the `instanceof` check but they should be treated as of that type.
2080
+ // See: https://github.com/feross/buffer/issues/166
2081
+ function isInstance (obj, type) {
2082
+ return obj instanceof type ||
2083
+ (obj != null && obj.constructor != null && obj.constructor.name != null &&
2084
+ obj.constructor.name === type.name)
2085
+ }
2086
+ function numberIsNaN (obj) {
2087
+ // For IE11 support
2088
+ return obj !== obj // eslint-disable-line no-self-compare
2089
+ }
2090
+
2091
+ // Create lookup table for `toString('hex')`
2092
+ // See: https://github.com/feross/buffer/issues/219
2093
+ const hexSliceLookupTable = (function () {
2094
+ const alphabet = '0123456789abcdef';
2095
+ const table = new Array(256);
2096
+ for (let i = 0; i < 16; ++i) {
2097
+ const i16 = i * 16;
2098
+ for (let j = 0; j < 16; ++j) {
2099
+ table[i16 + j] = alphabet[i] + alphabet[j];
2100
+ }
2101
+ }
2102
+ return table
2103
+ })();
2104
+
2105
+ // Return not function with Error if BigInt not supported
2106
+ function defineBigIntMethod (fn) {
2107
+ return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn
2108
+ }
2109
+
2110
+ function BufferBigIntNotDefined () {
2111
+ throw new Error('BigInt not supported')
2112
+ }
2113
+ }(buffer));