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