@wabot-dev/framework 0.0.14 → 0.0.17

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 (370) hide show
  1. package/dist/src/ai/deepseek/DeepSeekChatBotAdapter.js +108 -0
  2. package/dist/src/channels/cmd/@cmd.js +1 -1
  3. package/dist/src/channels/cmd/CmdChannel.js +1 -1
  4. package/dist/src/channels/socket-io/@socket.js +24 -0
  5. package/dist/src/channels/socket-io/SocketChannel.js +78 -0
  6. package/dist/src/channels/socket-io/SocketChannelConfig.js +15 -0
  7. package/dist/src/channels/telegram/@telegram.js +1 -1
  8. package/dist/src/channels/telegram/TelegramChannel.js +1 -1
  9. package/dist/src/channels/whatsapp/@whatsapp.js +1 -1
  10. package/dist/src/channels/whatsapp/WhatsAppChannel.js +1 -1
  11. package/dist/src/channels/whatsapp/WhatsAppConnection.js +1 -1
  12. package/dist/src/channels/whatsapp/WhatsAppDevConnection.js +11 -3
  13. package/dist/src/channels/whatsapp/{whatsAppDevSocketContracts.js → WhatsAppDevSocketContracts.js} +1 -0
  14. package/dist/src/channels/whatsapp/WhatsAppProdConnection.js +4 -1
  15. package/dist/src/channels/whatsapp/WhatsAppSender.js +23 -0
  16. package/dist/src/controller/socket.io/SocketIO.js +1 -1
  17. package/dist/src/index.d.ts +82 -9
  18. package/dist/src/index.js +9 -1
  19. package/dist/src/logger/Logger.js +1 -1
  20. package/dist/src/mindset/MindsetOperator.js +1 -1
  21. package/dist/src/server/runChannel.js +1 -1
  22. package/dist/src/server/runServer.js +4 -4
  23. package/package.json +2 -1
  24. package/dist/src/_virtual/XMLHttpRequest.js +0 -7
  25. package/dist/src/_virtual/_commonjsHelpers.js +0 -32
  26. package/dist/src/_virtual/base64id.js +0 -3
  27. package/dist/src/_virtual/binary.js +0 -3
  28. package/dist/src/_virtual/bom-handling.js +0 -3
  29. package/dist/src/_virtual/broadcast-operator.js +0 -3
  30. package/dist/src/_virtual/browser.js +0 -3
  31. package/dist/src/_virtual/browser2.js +0 -3
  32. package/dist/src/_virtual/browser3.js +0 -3
  33. package/dist/src/_virtual/browser4.js +0 -3
  34. package/dist/src/_virtual/browser5.js +0 -3
  35. package/dist/src/_virtual/buffer-util.js +0 -3
  36. package/dist/src/_virtual/buffer-util2.js +0 -3
  37. package/dist/src/_virtual/buffer-util3.js +0 -3
  38. package/dist/src/_virtual/charset.js +0 -3
  39. package/dist/src/_virtual/charset2.js +0 -3
  40. package/dist/src/_virtual/client.js +0 -3
  41. package/dist/src/_virtual/cluster-adapter.js +0 -3
  42. package/dist/src/_virtual/commons.js +0 -3
  43. package/dist/src/_virtual/dbcs-codec.js +0 -3
  44. package/dist/src/_virtual/decodePacket.js +0 -3
  45. package/dist/src/_virtual/encodePacket.js +0 -3
  46. package/dist/src/_virtual/encoding.js +0 -3
  47. package/dist/src/_virtual/encoding2.js +0 -3
  48. package/dist/src/_virtual/engine.io.js +0 -3
  49. package/dist/src/_virtual/in-memory-adapter.js +0 -3
  50. package/dist/src/_virtual/index.js +0 -7
  51. package/dist/src/_virtual/index10.js +0 -3
  52. package/dist/src/_virtual/index11.js +0 -3
  53. package/dist/src/_virtual/index12.js +0 -3
  54. package/dist/src/_virtual/index13.js +0 -3
  55. package/dist/src/_virtual/index14.js +0 -3
  56. package/dist/src/_virtual/index15.js +0 -3
  57. package/dist/src/_virtual/index16.js +0 -3
  58. package/dist/src/_virtual/index17.js +0 -3
  59. package/dist/src/_virtual/index18.js +0 -3
  60. package/dist/src/_virtual/index19.js +0 -3
  61. package/dist/src/_virtual/index2.js +0 -7
  62. package/dist/src/_virtual/index20.js +0 -3
  63. package/dist/src/_virtual/index21.js +0 -3
  64. package/dist/src/_virtual/index22.js +0 -3
  65. package/dist/src/_virtual/index23.js +0 -3
  66. package/dist/src/_virtual/index24.js +0 -3
  67. package/dist/src/_virtual/index25.js +0 -3
  68. package/dist/src/_virtual/index26.js +0 -3
  69. package/dist/src/_virtual/index27.js +0 -3
  70. package/dist/src/_virtual/index28.js +0 -3
  71. package/dist/src/_virtual/index29.js +0 -3
  72. package/dist/src/_virtual/index3.js +0 -7
  73. package/dist/src/_virtual/index30.js +0 -3
  74. package/dist/src/_virtual/index31.js +0 -3
  75. package/dist/src/_virtual/index32.js +0 -3
  76. package/dist/src/_virtual/index33.js +0 -3
  77. package/dist/src/_virtual/index4.js +0 -3
  78. package/dist/src/_virtual/index5.js +0 -3
  79. package/dist/src/_virtual/index6.js +0 -3
  80. package/dist/src/_virtual/index7.js +0 -3
  81. package/dist/src/_virtual/index8.js +0 -6
  82. package/dist/src/_virtual/index9.js +0 -3
  83. package/dist/src/_virtual/inherits.js +0 -3
  84. package/dist/src/_virtual/inherits_browser.js +0 -3
  85. package/dist/src/_virtual/is-binary.js +0 -3
  86. package/dist/src/_virtual/language.js +0 -3
  87. package/dist/src/_virtual/language2.js +0 -3
  88. package/dist/src/_virtual/mediaType.js +0 -3
  89. package/dist/src/_virtual/mediaType2.js +0 -3
  90. package/dist/src/_virtual/namespace.js +0 -3
  91. package/dist/src/_virtual/node.js +0 -3
  92. package/dist/src/_virtual/node2.js +0 -3
  93. package/dist/src/_virtual/node3.js +0 -3
  94. package/dist/src/_virtual/node4.js +0 -3
  95. package/dist/src/_virtual/node5.js +0 -3
  96. package/dist/src/_virtual/parent-namespace.js +0 -3
  97. package/dist/src/_virtual/polling-jsonp.js +0 -3
  98. package/dist/src/_virtual/polling.js +0 -3
  99. package/dist/src/_virtual/polling2.js +0 -3
  100. package/dist/src/_virtual/receiver.js +0 -3
  101. package/dist/src/_virtual/sbcs-codec.js +0 -3
  102. package/dist/src/_virtual/sender.js +0 -3
  103. package/dist/src/_virtual/server.js +0 -3
  104. package/dist/src/_virtual/socket-types.js +0 -3
  105. package/dist/src/_virtual/socket.js +0 -3
  106. package/dist/src/_virtual/socket2.js +0 -3
  107. package/dist/src/_virtual/stream.js +0 -3
  108. package/dist/src/_virtual/transport.js +0 -3
  109. package/dist/src/_virtual/typed-events.js +0 -3
  110. package/dist/src/_virtual/userver.js +0 -3
  111. package/dist/src/_virtual/utf16.js +0 -3
  112. package/dist/src/_virtual/utf32.js +0 -3
  113. package/dist/src/_virtual/utf7.js +0 -3
  114. package/dist/src/_virtual/uws.js +0 -3
  115. package/dist/src/_virtual/validation.js +0 -3
  116. package/dist/src/_virtual/validation2.js +0 -3
  117. package/dist/src/_virtual/validation3.js +0 -3
  118. package/dist/src/_virtual/websocket-server.js +0 -3
  119. package/dist/src/_virtual/websocket.js +0 -7
  120. package/dist/src/_virtual/websocket2.js +0 -3
  121. package/dist/src/_virtual/websocket3.js +0 -3
  122. package/dist/src/_virtual/webtransport.js +0 -3
  123. package/dist/src/_virtual/yeast.js +0 -3
  124. package/dist/src/node_modules/@socket.io/component-emitter/lib/esm/index.js +0 -171
  125. package/dist/src/node_modules/base64id/lib/base64id.js +0 -117
  126. package/dist/src/node_modules/body-parser/index.js +0 -96
  127. package/dist/src/node_modules/body-parser/lib/read.js +0 -225
  128. package/dist/src/node_modules/body-parser/lib/types/json.js +0 -222
  129. package/dist/src/node_modules/body-parser/lib/types/raw.js +0 -90
  130. package/dist/src/node_modules/body-parser/lib/types/text.js +0 -95
  131. package/dist/src/node_modules/body-parser/lib/types/urlencoded.js +0 -194
  132. package/dist/src/node_modules/body-parser/lib/utils.js +0 -96
  133. package/dist/src/node_modules/bytes/index.js +0 -180
  134. package/dist/src/node_modules/call-bind-apply-helpers/actualApply.js +0 -24
  135. package/dist/src/node_modules/call-bind-apply-helpers/functionApply.js +0 -13
  136. package/dist/src/node_modules/call-bind-apply-helpers/functionCall.js +0 -13
  137. package/dist/src/node_modules/call-bind-apply-helpers/index.js +0 -29
  138. package/dist/src/node_modules/call-bind-apply-helpers/reflectApply.js +0 -13
  139. package/dist/src/node_modules/call-bound/index.js +0 -31
  140. package/dist/src/node_modules/content-type/index.js +0 -235
  141. package/dist/src/node_modules/cookie/index.js +0 -345
  142. package/dist/src/node_modules/cors/lib/index.js +0 -249
  143. package/dist/src/node_modules/debug/src/browser.js +0 -286
  144. package/dist/src/node_modules/debug/src/common.js +0 -303
  145. package/dist/src/node_modules/debug/src/index.js +0 -23
  146. package/dist/src/node_modules/debug/src/node.js +0 -279
  147. package/dist/src/node_modules/depd/index.js +0 -550
  148. package/dist/src/node_modules/dunder-proto/get.js +0 -42
  149. package/dist/src/node_modules/ee-first/index.js +0 -104
  150. package/dist/src/node_modules/engine.io/build/engine.io.js +0 -73
  151. package/dist/src/node_modules/engine.io/build/parser-v3/index.js +0 -429
  152. package/dist/src/node_modules/engine.io/build/parser-v3/utf8.js +0 -198
  153. package/dist/src/node_modules/engine.io/build/server.js +0 -808
  154. package/dist/src/node_modules/engine.io/build/socket.js +0 -469
  155. package/dist/src/node_modules/engine.io/build/transport.js +0 -131
  156. package/dist/src/node_modules/engine.io/build/transports/index.js +0 -37
  157. package/dist/src/node_modules/engine.io/build/transports/polling-jsonp.js +0 -53
  158. package/dist/src/node_modules/engine.io/build/transports/polling.js +0 -346
  159. package/dist/src/node_modules/engine.io/build/transports/websocket.js +0 -106
  160. package/dist/src/node_modules/engine.io/build/transports/webtransport.js +0 -76
  161. package/dist/src/node_modules/engine.io/build/transports-uws/index.js +0 -20
  162. package/dist/src/node_modules/engine.io/build/transports-uws/polling.js +0 -378
  163. package/dist/src/node_modules/engine.io/build/transports-uws/websocket.js +0 -85
  164. package/dist/src/node_modules/engine.io/build/userver.js +0 -292
  165. package/dist/src/node_modules/engine.io/node_modules/accepts/index.js +0 -250
  166. package/dist/src/node_modules/engine.io/node_modules/debug/src/browser.js +0 -285
  167. package/dist/src/node_modules/engine.io/node_modules/debug/src/common.js +0 -285
  168. package/dist/src/node_modules/engine.io/node_modules/debug/src/index.js +0 -23
  169. package/dist/src/node_modules/engine.io/node_modules/debug/src/node.js +0 -279
  170. package/dist/src/node_modules/engine.io/node_modules/mime-db/db.json.js +0 -10704
  171. package/dist/src/node_modules/engine.io/node_modules/mime-db/index.js +0 -24
  172. package/dist/src/node_modules/engine.io/node_modules/mime-types/index.js +0 -202
  173. package/dist/src/node_modules/engine.io/node_modules/negotiator/index.js +0 -96
  174. package/dist/src/node_modules/engine.io/node_modules/negotiator/lib/charset.js +0 -179
  175. package/dist/src/node_modules/engine.io/node_modules/negotiator/lib/encoding.js +0 -193
  176. package/dist/src/node_modules/engine.io/node_modules/negotiator/lib/language.js +0 -188
  177. package/dist/src/node_modules/engine.io/node_modules/negotiator/lib/mediaType.js +0 -304
  178. package/dist/src/node_modules/engine.io/node_modules/ws/index.js +0 -28
  179. package/dist/src/node_modules/engine.io/node_modules/ws/lib/buffer-util.js +0 -142
  180. package/dist/src/node_modules/engine.io/node_modules/ws/lib/constants.js +0 -21
  181. package/dist/src/node_modules/engine.io/node_modules/ws/lib/event-target.js +0 -303
  182. package/dist/src/node_modules/engine.io/node_modules/ws/lib/extension.js +0 -214
  183. package/dist/src/node_modules/engine.io/node_modules/ws/lib/limiter.js +0 -64
  184. package/dist/src/node_modules/engine.io/node_modules/ws/lib/permessage-deflate.js +0 -528
  185. package/dist/src/node_modules/engine.io/node_modules/ws/lib/receiver.js +0 -719
  186. package/dist/src/node_modules/engine.io/node_modules/ws/lib/sender.js +0 -513
  187. package/dist/src/node_modules/engine.io/node_modules/ws/lib/stream.js +0 -170
  188. package/dist/src/node_modules/engine.io/node_modules/ws/lib/subprotocol.js +0 -73
  189. package/dist/src/node_modules/engine.io/node_modules/ws/lib/validation.js +0 -141
  190. package/dist/src/node_modules/engine.io/node_modules/ws/lib/websocket-server.js +0 -559
  191. package/dist/src/node_modules/engine.io/node_modules/ws/lib/websocket.js +0 -1363
  192. package/dist/src/node_modules/engine.io-client/build/esm/contrib/has-cors.js +0 -13
  193. package/dist/src/node_modules/engine.io-client/build/esm/contrib/parseqs.js +0 -36
  194. package/dist/src/node_modules/engine.io-client/build/esm/contrib/parseuri.js +0 -66
  195. package/dist/src/node_modules/engine.io-client/build/esm/globals.node.js +0 -92
  196. package/dist/src/node_modules/engine.io-client/build/esm/index.js +0 -17
  197. package/dist/src/node_modules/engine.io-client/build/esm/socket.js +0 -728
  198. package/dist/src/node_modules/engine.io-client/build/esm/transport.js +0 -143
  199. package/dist/src/node_modules/engine.io-client/build/esm/transports/index.js +0 -11
  200. package/dist/src/node_modules/engine.io-client/build/esm/transports/polling-xhr.js +0 -256
  201. package/dist/src/node_modules/engine.io-client/build/esm/transports/polling-xhr.node.js +0 -21
  202. package/dist/src/node_modules/engine.io-client/build/esm/transports/polling.js +0 -146
  203. package/dist/src/node_modules/engine.io-client/build/esm/transports/websocket.js +0 -107
  204. package/dist/src/node_modules/engine.io-client/build/esm/transports/websocket.node.js +0 -48
  205. package/dist/src/node_modules/engine.io-client/build/esm/transports/webtransport.js +0 -83
  206. package/dist/src/node_modules/engine.io-client/build/esm/util.js +0 -62
  207. package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/buffer-util.js +0 -142
  208. package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/constants.js +0 -21
  209. package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/event-target.js +0 -303
  210. package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/extension.js +0 -214
  211. package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/limiter.js +0 -64
  212. package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/permessage-deflate.js +0 -528
  213. package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/receiver.js +0 -719
  214. package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/sender.js +0 -513
  215. package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/stream.js +0 -170
  216. package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/subprotocol.js +0 -73
  217. package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/validation.js +0 -141
  218. package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/websocket-server.js +0 -559
  219. package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/websocket.js +0 -1363
  220. package/dist/src/node_modules/engine.io-parser/build/cjs/commons.js +0 -29
  221. package/dist/src/node_modules/engine.io-parser/build/cjs/decodePacket.js +0 -70
  222. package/dist/src/node_modules/engine.io-parser/build/cjs/encodePacket.js +0 -51
  223. package/dist/src/node_modules/engine.io-parser/build/cjs/index.js +0 -179
  224. package/dist/src/node_modules/engine.io-parser/build/esm/commons.js +0 -15
  225. package/dist/src/node_modules/engine.io-parser/build/esm/decodePacket.js +0 -58
  226. package/dist/src/node_modules/engine.io-parser/build/esm/encodePacket.js +0 -36
  227. package/dist/src/node_modules/engine.io-parser/build/esm/index.js +0 -158
  228. package/dist/src/node_modules/es-define-property/index.js +0 -23
  229. package/dist/src/node_modules/es-errors/eval.js +0 -13
  230. package/dist/src/node_modules/es-errors/index.js +0 -13
  231. package/dist/src/node_modules/es-errors/range.js +0 -13
  232. package/dist/src/node_modules/es-errors/ref.js +0 -13
  233. package/dist/src/node_modules/es-errors/syntax.js +0 -13
  234. package/dist/src/node_modules/es-errors/type.js +0 -13
  235. package/dist/src/node_modules/es-errors/uri.js +0 -13
  236. package/dist/src/node_modules/es-object-atoms/index.js +0 -13
  237. package/dist/src/node_modules/function-bind/implementation.js +0 -93
  238. package/dist/src/node_modules/function-bind/index.js +0 -16
  239. package/dist/src/node_modules/get-intrinsic/index.js +0 -413
  240. package/dist/src/node_modules/get-proto/Object.getPrototypeOf.js +0 -17
  241. package/dist/src/node_modules/get-proto/Reflect.getPrototypeOf.js +0 -13
  242. package/dist/src/node_modules/get-proto/index.js +0 -40
  243. package/dist/src/node_modules/gopd/gOPD.js +0 -13
  244. package/dist/src/node_modules/gopd/index.js +0 -26
  245. package/dist/src/node_modules/has-symbols/index.js +0 -25
  246. package/dist/src/node_modules/has-symbols/shams.js +0 -54
  247. package/dist/src/node_modules/hasown/index.js +0 -19
  248. package/dist/src/node_modules/http-errors/index.js +0 -306
  249. package/dist/src/node_modules/iconv-lite/encodings/dbcs-codec.js +0 -598
  250. package/dist/src/node_modules/iconv-lite/encodings/dbcs-data.js +0 -206
  251. package/dist/src/node_modules/iconv-lite/encodings/index.js +0 -44
  252. package/dist/src/node_modules/iconv-lite/encodings/internal.js +0 -210
  253. package/dist/src/node_modules/iconv-lite/encodings/sbcs-codec.js +0 -83
  254. package/dist/src/node_modules/iconv-lite/encodings/sbcs-data-generated.js +0 -460
  255. package/dist/src/node_modules/iconv-lite/encodings/sbcs-data.js +0 -187
  256. package/dist/src/node_modules/iconv-lite/encodings/tables/big5-added.json.js +0 -506
  257. package/dist/src/node_modules/iconv-lite/encodings/tables/cp936.json.js +0 -2621
  258. package/dist/src/node_modules/iconv-lite/encodings/tables/cp949.json.js +0 -2380
  259. package/dist/src/node_modules/iconv-lite/encodings/tables/cp950.json.js +0 -729
  260. package/dist/src/node_modules/iconv-lite/encodings/tables/eucjp.json.js +0 -822
  261. package/dist/src/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json.js +0 -424
  262. package/dist/src/node_modules/iconv-lite/encodings/tables/gbk-added.json.js +0 -264
  263. package/dist/src/node_modules/iconv-lite/encodings/tables/shiftjis.json.js +0 -548
  264. package/dist/src/node_modules/iconv-lite/encodings/utf16.js +0 -206
  265. package/dist/src/node_modules/iconv-lite/encodings/utf32.js +0 -329
  266. package/dist/src/node_modules/iconv-lite/encodings/utf7.js +0 -297
  267. package/dist/src/node_modules/iconv-lite/lib/bom-handling.js +0 -61
  268. package/dist/src/node_modules/iconv-lite/lib/index.js +0 -192
  269. package/dist/src/node_modules/iconv-lite/lib/streams.js +0 -120
  270. package/dist/src/node_modules/inherits/inherits.js +0 -21
  271. package/dist/src/node_modules/inherits/inherits_browser.js +0 -38
  272. package/dist/src/node_modules/math-intrinsics/abs.js +0 -13
  273. package/dist/src/node_modules/math-intrinsics/floor.js +0 -13
  274. package/dist/src/node_modules/math-intrinsics/isNaN.js +0 -15
  275. package/dist/src/node_modules/math-intrinsics/max.js +0 -13
  276. package/dist/src/node_modules/math-intrinsics/min.js +0 -13
  277. package/dist/src/node_modules/math-intrinsics/pow.js +0 -13
  278. package/dist/src/node_modules/math-intrinsics/round.js +0 -13
  279. package/dist/src/node_modules/math-intrinsics/sign.js +0 -22
  280. package/dist/src/node_modules/media-typer/index.js +0 -153
  281. package/dist/src/node_modules/mime-db/db.json.js +0 -11656
  282. package/dist/src/node_modules/mime-db/index.js +0 -24
  283. package/dist/src/node_modules/mime-types/index.js +0 -226
  284. package/dist/src/node_modules/mime-types/mimeScore.js +0 -62
  285. package/dist/src/node_modules/ms/index.js +0 -172
  286. package/dist/src/node_modules/object-assign/index.js +0 -99
  287. package/dist/src/node_modules/object-inspect/index.js +0 -557
  288. package/dist/src/node_modules/object-inspect/util.inspect.js +0 -13
  289. package/dist/src/node_modules/on-finished/index.js +0 -245
  290. package/dist/src/node_modules/qs/lib/formats.js +0 -32
  291. package/dist/src/node_modules/qs/lib/index.js +0 -24
  292. package/dist/src/node_modules/qs/lib/parse.js +0 -339
  293. package/dist/src/node_modules/qs/lib/stringify.js +0 -369
  294. package/dist/src/node_modules/qs/lib/utils.js +0 -279
  295. package/dist/src/node_modules/raw-body/index.js +0 -351
  296. package/dist/src/node_modules/safer-buffer/safer.js +0 -88
  297. package/dist/src/node_modules/setprototypeof/index.js +0 -26
  298. package/dist/src/node_modules/side-channel/index.js +0 -58
  299. package/dist/src/node_modules/side-channel-list/index.js +0 -125
  300. package/dist/src/node_modules/side-channel-map/index.js +0 -82
  301. package/dist/src/node_modules/side-channel-weakmap/index.js +0 -99
  302. package/dist/src/node_modules/socket.io/dist/broadcast-operator.js +0 -448
  303. package/dist/src/node_modules/socket.io/dist/client.js +0 -281
  304. package/dist/src/node_modules/socket.io/dist/index.js +0 -837
  305. package/dist/src/node_modules/socket.io/dist/namespace.js +0 -597
  306. package/dist/src/node_modules/socket.io/dist/parent-namespace.js +0 -101
  307. package/dist/src/node_modules/socket.io/dist/socket-types.js +0 -21
  308. package/dist/src/node_modules/socket.io/dist/socket.js +0 -993
  309. package/dist/src/node_modules/socket.io/dist/typed-events.js +0 -92
  310. package/dist/src/node_modules/socket.io/dist/uws.js +0 -149
  311. package/dist/src/node_modules/socket.io/node_modules/accepts/index.js +0 -250
  312. package/dist/src/node_modules/socket.io/node_modules/debug/src/browser.js +0 -285
  313. package/dist/src/node_modules/socket.io/node_modules/debug/src/common.js +0 -285
  314. package/dist/src/node_modules/socket.io/node_modules/debug/src/index.js +0 -23
  315. package/dist/src/node_modules/socket.io/node_modules/debug/src/node.js +0 -279
  316. package/dist/src/node_modules/socket.io/node_modules/mime-db/db.json.js +0 -10704
  317. package/dist/src/node_modules/socket.io/node_modules/mime-db/index.js +0 -24
  318. package/dist/src/node_modules/socket.io/node_modules/mime-types/index.js +0 -202
  319. package/dist/src/node_modules/socket.io/node_modules/negotiator/index.js +0 -96
  320. package/dist/src/node_modules/socket.io/node_modules/negotiator/lib/charset.js +0 -179
  321. package/dist/src/node_modules/socket.io/node_modules/negotiator/lib/encoding.js +0 -193
  322. package/dist/src/node_modules/socket.io/node_modules/negotiator/lib/language.js +0 -188
  323. package/dist/src/node_modules/socket.io/node_modules/negotiator/lib/mediaType.js +0 -304
  324. package/dist/src/node_modules/socket.io/package.json.js +0 -5
  325. package/dist/src/node_modules/socket.io/wrapper.js +0 -5
  326. package/dist/src/node_modules/socket.io-adapter/dist/cluster-adapter.js +0 -689
  327. package/dist/src/node_modules/socket.io-adapter/dist/contrib/yeast.js +0 -64
  328. package/dist/src/node_modules/socket.io-adapter/dist/in-memory-adapter.js +0 -407
  329. package/dist/src/node_modules/socket.io-adapter/dist/index.js +0 -24
  330. package/dist/src/node_modules/socket.io-adapter/node_modules/debug/src/browser.js +0 -285
  331. package/dist/src/node_modules/socket.io-adapter/node_modules/debug/src/common.js +0 -285
  332. package/dist/src/node_modules/socket.io-adapter/node_modules/debug/src/index.js +0 -23
  333. package/dist/src/node_modules/socket.io-adapter/node_modules/debug/src/node.js +0 -279
  334. package/dist/src/node_modules/socket.io-adapter/node_modules/ws/index.js +0 -28
  335. package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/buffer-util.js +0 -142
  336. package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/constants.js +0 -21
  337. package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/event-target.js +0 -303
  338. package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/extension.js +0 -214
  339. package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/limiter.js +0 -64
  340. package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/permessage-deflate.js +0 -528
  341. package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/receiver.js +0 -719
  342. package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/sender.js +0 -513
  343. package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/stream.js +0 -170
  344. package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/subprotocol.js +0 -73
  345. package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/validation.js +0 -141
  346. package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/websocket-server.js +0 -559
  347. package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/websocket.js +0 -1363
  348. package/dist/src/node_modules/socket.io-client/build/esm/contrib/backo2.js +0 -68
  349. package/dist/src/node_modules/socket.io-client/build/esm/index.js +0 -50
  350. package/dist/src/node_modules/socket.io-client/build/esm/manager.js +0 -373
  351. package/dist/src/node_modules/socket.io-client/build/esm/on.js +0 -8
  352. package/dist/src/node_modules/socket.io-client/build/esm/socket.js +0 -884
  353. package/dist/src/node_modules/socket.io-client/build/esm/url.js +0 -63
  354. package/dist/src/node_modules/socket.io-parser/build/cjs/binary.js +0 -99
  355. package/dist/src/node_modules/socket.io-parser/build/cjs/index.js +0 -337
  356. package/dist/src/node_modules/socket.io-parser/build/cjs/is-binary.js +0 -65
  357. package/dist/src/node_modules/socket.io-parser/build/esm/binary.js +0 -86
  358. package/dist/src/node_modules/socket.io-parser/build/esm/index.js +0 -314
  359. package/dist/src/node_modules/socket.io-parser/build/esm/is-binary.js +0 -52
  360. package/dist/src/node_modules/socket.io-parser/node_modules/debug/src/browser.js +0 -285
  361. package/dist/src/node_modules/socket.io-parser/node_modules/debug/src/common.js +0 -285
  362. package/dist/src/node_modules/socket.io-parser/node_modules/debug/src/index.js +0 -23
  363. package/dist/src/node_modules/socket.io-parser/node_modules/debug/src/node.js +0 -279
  364. package/dist/src/node_modules/statuses/codes.json.js +0 -67
  365. package/dist/src/node_modules/statuses/index.js +0 -157
  366. package/dist/src/node_modules/toidentifier/index.js +0 -41
  367. package/dist/src/node_modules/type-is/index.js +0 -263
  368. package/dist/src/node_modules/unpipe/index.js +0 -78
  369. package/dist/src/node_modules/vary/index.js +0 -159
  370. package/dist/src/node_modules/xmlhttprequest-ssl/lib/XMLHttpRequest.js +0 -702
@@ -1,245 +0,0 @@
1
- import { __module as onFinished } from '../../_virtual/index10.js';
2
- import { __require as requireEeFirst } from '../ee-first/index.js';
3
-
4
- /*!
5
- * on-finished
6
- * Copyright(c) 2013 Jonathan Ong
7
- * Copyright(c) 2014 Douglas Christopher Wilson
8
- * MIT Licensed
9
- */
10
-
11
- var hasRequiredOnFinished;
12
-
13
- function requireOnFinished () {
14
- if (hasRequiredOnFinished) return onFinished.exports;
15
- hasRequiredOnFinished = 1;
16
-
17
- /**
18
- * Module exports.
19
- * @public
20
- */
21
-
22
- onFinished.exports = onFinished$1;
23
- onFinished.exports.isFinished = isFinished;
24
-
25
- /**
26
- * Module dependencies.
27
- * @private
28
- */
29
-
30
- var asyncHooks = tryRequireAsyncHooks();
31
- var first = requireEeFirst();
32
-
33
- /**
34
- * Variables.
35
- * @private
36
- */
37
-
38
- /* istanbul ignore next */
39
- var defer = typeof setImmediate === 'function'
40
- ? setImmediate
41
- : function (fn) { process.nextTick(fn.bind.apply(fn, arguments)); };
42
-
43
- /**
44
- * Invoke callback when the response has finished, useful for
45
- * cleaning up resources afterwards.
46
- *
47
- * @param {object} msg
48
- * @param {function} listener
49
- * @return {object}
50
- * @public
51
- */
52
-
53
- function onFinished$1 (msg, listener) {
54
- if (isFinished(msg) !== false) {
55
- defer(listener, null, msg);
56
- return msg
57
- }
58
-
59
- // attach the listener to the message
60
- attachListener(msg, wrap(listener));
61
-
62
- return msg
63
- }
64
-
65
- /**
66
- * Determine if message is already finished.
67
- *
68
- * @param {object} msg
69
- * @return {boolean}
70
- * @public
71
- */
72
-
73
- function isFinished (msg) {
74
- var socket = msg.socket;
75
-
76
- if (typeof msg.finished === 'boolean') {
77
- // OutgoingMessage
78
- return Boolean(msg.finished || (socket && !socket.writable))
79
- }
80
-
81
- if (typeof msg.complete === 'boolean') {
82
- // IncomingMessage
83
- return Boolean(msg.upgrade || !socket || !socket.readable || (msg.complete && !msg.readable))
84
- }
85
-
86
- // don't know
87
- return undefined
88
- }
89
-
90
- /**
91
- * Attach a finished listener to the message.
92
- *
93
- * @param {object} msg
94
- * @param {function} callback
95
- * @private
96
- */
97
-
98
- function attachFinishedListener (msg, callback) {
99
- var eeMsg;
100
- var eeSocket;
101
- var finished = false;
102
-
103
- function onFinish (error) {
104
- eeMsg.cancel();
105
- eeSocket.cancel();
106
-
107
- finished = true;
108
- callback(error);
109
- }
110
-
111
- // finished on first message event
112
- eeMsg = eeSocket = first([[msg, 'end', 'finish']], onFinish);
113
-
114
- function onSocket (socket) {
115
- // remove listener
116
- msg.removeListener('socket', onSocket);
117
-
118
- if (finished) return
119
- if (eeMsg !== eeSocket) return
120
-
121
- // finished on first socket event
122
- eeSocket = first([[socket, 'error', 'close']], onFinish);
123
- }
124
-
125
- if (msg.socket) {
126
- // socket already assigned
127
- onSocket(msg.socket);
128
- return
129
- }
130
-
131
- // wait for socket to be assigned
132
- msg.on('socket', onSocket);
133
-
134
- if (msg.socket === undefined) {
135
- // istanbul ignore next: node.js 0.8 patch
136
- patchAssignSocket(msg, onSocket);
137
- }
138
- }
139
-
140
- /**
141
- * Attach the listener to the message.
142
- *
143
- * @param {object} msg
144
- * @return {function}
145
- * @private
146
- */
147
-
148
- function attachListener (msg, listener) {
149
- var attached = msg.__onFinished;
150
-
151
- // create a private single listener with queue
152
- if (!attached || !attached.queue) {
153
- attached = msg.__onFinished = createListener(msg);
154
- attachFinishedListener(msg, attached);
155
- }
156
-
157
- attached.queue.push(listener);
158
- }
159
-
160
- /**
161
- * Create listener on message.
162
- *
163
- * @param {object} msg
164
- * @return {function}
165
- * @private
166
- */
167
-
168
- function createListener (msg) {
169
- function listener (err) {
170
- if (msg.__onFinished === listener) msg.__onFinished = null;
171
- if (!listener.queue) return
172
-
173
- var queue = listener.queue;
174
- listener.queue = null;
175
-
176
- for (var i = 0; i < queue.length; i++) {
177
- queue[i](err, msg);
178
- }
179
- }
180
-
181
- listener.queue = [];
182
-
183
- return listener
184
- }
185
-
186
- /**
187
- * Patch ServerResponse.prototype.assignSocket for node.js 0.8.
188
- *
189
- * @param {ServerResponse} res
190
- * @param {function} callback
191
- * @private
192
- */
193
-
194
- // istanbul ignore next: node.js 0.8 patch
195
- function patchAssignSocket (res, callback) {
196
- var assignSocket = res.assignSocket;
197
-
198
- if (typeof assignSocket !== 'function') return
199
-
200
- // res.on('socket', callback) is broken in 0.8
201
- res.assignSocket = function _assignSocket (socket) {
202
- assignSocket.call(this, socket);
203
- callback(socket);
204
- };
205
- }
206
-
207
- /**
208
- * Try to require async_hooks
209
- * @private
210
- */
211
-
212
- function tryRequireAsyncHooks () {
213
- try {
214
- return require('async_hooks')
215
- } catch (e) {
216
- return {}
217
- }
218
- }
219
-
220
- /**
221
- * Wrap function with async resource, if possible.
222
- * AsyncResource.bind static method backported.
223
- * @private
224
- */
225
-
226
- function wrap (fn) {
227
- var res;
228
-
229
- // create anonymous resource
230
- if (asyncHooks.AsyncResource) {
231
- res = new asyncHooks.AsyncResource(fn.name || 'bound-anonymous-fn');
232
- }
233
-
234
- // incompatible node.js
235
- if (!res || !res.runInAsyncScope) {
236
- return fn
237
- }
238
-
239
- // return bound function
240
- return res.runInAsyncScope.bind(res, fn, null)
241
- }
242
- return onFinished.exports;
243
- }
244
-
245
- export { requireOnFinished as __require };
@@ -1,32 +0,0 @@
1
- var formats;
2
- var hasRequiredFormats;
3
-
4
- function requireFormats () {
5
- if (hasRequiredFormats) return formats;
6
- hasRequiredFormats = 1;
7
-
8
- var replace = String.prototype.replace;
9
- var percentTwenties = /%20/g;
10
-
11
- var Format = {
12
- RFC1738: 'RFC1738',
13
- RFC3986: 'RFC3986'
14
- };
15
-
16
- formats = {
17
- 'default': Format.RFC3986,
18
- formatters: {
19
- RFC1738: function (value) {
20
- return replace.call(value, percentTwenties, '+');
21
- },
22
- RFC3986: function (value) {
23
- return String(value);
24
- }
25
- },
26
- RFC1738: Format.RFC1738,
27
- RFC3986: Format.RFC3986
28
- };
29
- return formats;
30
- }
31
-
32
- export { requireFormats as __require };
@@ -1,24 +0,0 @@
1
- import { __require as requireStringify } from './stringify.js';
2
- import { __require as requireParse } from './parse.js';
3
- import { __require as requireFormats } from './formats.js';
4
-
5
- var lib;
6
- var hasRequiredLib;
7
-
8
- function requireLib () {
9
- if (hasRequiredLib) return lib;
10
- hasRequiredLib = 1;
11
-
12
- var stringify = /*@__PURE__*/ requireStringify();
13
- var parse = /*@__PURE__*/ requireParse();
14
- var formats = /*@__PURE__*/ requireFormats();
15
-
16
- lib = {
17
- formats: formats,
18
- parse: parse,
19
- stringify: stringify
20
- };
21
- return lib;
22
- }
23
-
24
- export { requireLib as __require };
@@ -1,339 +0,0 @@
1
- import { __require as requireUtils } from './utils.js';
2
-
3
- var parse;
4
- var hasRequiredParse;
5
-
6
- function requireParse () {
7
- if (hasRequiredParse) return parse;
8
- hasRequiredParse = 1;
9
-
10
- var utils = /*@__PURE__*/ requireUtils();
11
-
12
- var has = Object.prototype.hasOwnProperty;
13
- var isArray = Array.isArray;
14
-
15
- var defaults = {
16
- allowDots: false,
17
- allowEmptyArrays: false,
18
- allowPrototypes: false,
19
- allowSparse: false,
20
- arrayLimit: 20,
21
- charset: 'utf-8',
22
- charsetSentinel: false,
23
- comma: false,
24
- decodeDotInKeys: false,
25
- decoder: utils.decode,
26
- delimiter: '&',
27
- depth: 5,
28
- duplicates: 'combine',
29
- ignoreQueryPrefix: false,
30
- interpretNumericEntities: false,
31
- parameterLimit: 1000,
32
- parseArrays: true,
33
- plainObjects: false,
34
- strictDepth: false,
35
- strictNullHandling: false,
36
- throwOnLimitExceeded: false
37
- };
38
-
39
- var interpretNumericEntities = function (str) {
40
- return str.replace(/&#(\d+);/g, function ($0, numberStr) {
41
- return String.fromCharCode(parseInt(numberStr, 10));
42
- });
43
- };
44
-
45
- var parseArrayValue = function (val, options, currentArrayLength) {
46
- if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
47
- return val.split(',');
48
- }
49
-
50
- if (options.throwOnLimitExceeded && currentArrayLength >= options.arrayLimit) {
51
- throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (options.arrayLimit === 1 ? '' : 's') + ' allowed in an array.');
52
- }
53
-
54
- return val;
55
- };
56
-
57
- // This is what browsers will submit when the ✓ character occurs in an
58
- // application/x-www-form-urlencoded body and the encoding of the page containing
59
- // the form is iso-8859-1, or when the submitted form has an accept-charset
60
- // attribute of iso-8859-1. Presumably also with other charsets that do not contain
61
- // the ✓ character, such as us-ascii.
62
- var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')
63
-
64
- // These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
65
- var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
66
-
67
- var parseValues = function parseQueryStringValues(str, options) {
68
- var obj = { __proto__: null };
69
-
70
- var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
71
- cleanStr = cleanStr.replace(/%5B/gi, '[').replace(/%5D/gi, ']');
72
-
73
- var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
74
- var parts = cleanStr.split(
75
- options.delimiter,
76
- options.throwOnLimitExceeded ? limit + 1 : limit
77
- );
78
-
79
- if (options.throwOnLimitExceeded && parts.length > limit) {
80
- throw new RangeError('Parameter limit exceeded. Only ' + limit + ' parameter' + (limit === 1 ? '' : 's') + ' allowed.');
81
- }
82
-
83
- var skipIndex = -1; // Keep track of where the utf8 sentinel was found
84
- var i;
85
-
86
- var charset = options.charset;
87
- if (options.charsetSentinel) {
88
- for (i = 0; i < parts.length; ++i) {
89
- if (parts[i].indexOf('utf8=') === 0) {
90
- if (parts[i] === charsetSentinel) {
91
- charset = 'utf-8';
92
- } else if (parts[i] === isoSentinel) {
93
- charset = 'iso-8859-1';
94
- }
95
- skipIndex = i;
96
- i = parts.length; // The eslint settings do not allow break;
97
- }
98
- }
99
- }
100
-
101
- for (i = 0; i < parts.length; ++i) {
102
- if (i === skipIndex) {
103
- continue;
104
- }
105
- var part = parts[i];
106
-
107
- var bracketEqualsPos = part.indexOf(']=');
108
- var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
109
-
110
- var key;
111
- var val;
112
- if (pos === -1) {
113
- key = options.decoder(part, defaults.decoder, charset, 'key');
114
- val = options.strictNullHandling ? null : '';
115
- } else {
116
- key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
117
-
118
- val = utils.maybeMap(
119
- parseArrayValue(
120
- part.slice(pos + 1),
121
- options,
122
- isArray(obj[key]) ? obj[key].length : 0
123
- ),
124
- function (encodedVal) {
125
- return options.decoder(encodedVal, defaults.decoder, charset, 'value');
126
- }
127
- );
128
- }
129
-
130
- if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
131
- val = interpretNumericEntities(String(val));
132
- }
133
-
134
- if (part.indexOf('[]=') > -1) {
135
- val = isArray(val) ? [val] : val;
136
- }
137
-
138
- var existing = has.call(obj, key);
139
- if (existing && options.duplicates === 'combine') {
140
- obj[key] = utils.combine(obj[key], val);
141
- } else if (!existing || options.duplicates === 'last') {
142
- obj[key] = val;
143
- }
144
- }
145
-
146
- return obj;
147
- };
148
-
149
- var parseObject = function (chain, val, options, valuesParsed) {
150
- var currentArrayLength = 0;
151
- if (chain.length > 0 && chain[chain.length - 1] === '[]') {
152
- var parentKey = chain.slice(0, -1).join('');
153
- currentArrayLength = Array.isArray(val) && val[parentKey] ? val[parentKey].length : 0;
154
- }
155
-
156
- var leaf = valuesParsed ? val : parseArrayValue(val, options, currentArrayLength);
157
-
158
- for (var i = chain.length - 1; i >= 0; --i) {
159
- var obj;
160
- var root = chain[i];
161
-
162
- if (root === '[]' && options.parseArrays) {
163
- obj = options.allowEmptyArrays && (leaf === '' || (options.strictNullHandling && leaf === null))
164
- ? []
165
- : utils.combine([], leaf);
166
- } else {
167
- obj = options.plainObjects ? { __proto__: null } : {};
168
- var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
169
- var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, '.') : cleanRoot;
170
- var index = parseInt(decodedRoot, 10);
171
- if (!options.parseArrays && decodedRoot === '') {
172
- obj = { 0: leaf };
173
- } else if (
174
- !isNaN(index)
175
- && root !== decodedRoot
176
- && String(index) === decodedRoot
177
- && index >= 0
178
- && (options.parseArrays && index <= options.arrayLimit)
179
- ) {
180
- obj = [];
181
- obj[index] = leaf;
182
- } else if (decodedRoot !== '__proto__') {
183
- obj[decodedRoot] = leaf;
184
- }
185
- }
186
-
187
- leaf = obj;
188
- }
189
-
190
- return leaf;
191
- };
192
-
193
- var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
194
- if (!givenKey) {
195
- return;
196
- }
197
-
198
- // Transform dot notation to bracket notation
199
- var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
200
-
201
- // The regex chunks
202
-
203
- var brackets = /(\[[^[\]]*])/;
204
- var child = /(\[[^[\]]*])/g;
205
-
206
- // Get the parent
207
-
208
- var segment = options.depth > 0 && brackets.exec(key);
209
- var parent = segment ? key.slice(0, segment.index) : key;
210
-
211
- // Stash the parent if it exists
212
-
213
- var keys = [];
214
- if (parent) {
215
- // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
216
- if (!options.plainObjects && has.call(Object.prototype, parent)) {
217
- if (!options.allowPrototypes) {
218
- return;
219
- }
220
- }
221
-
222
- keys.push(parent);
223
- }
224
-
225
- // Loop through children appending to the array until we hit depth
226
-
227
- var i = 0;
228
- while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
229
- i += 1;
230
- if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
231
- if (!options.allowPrototypes) {
232
- return;
233
- }
234
- }
235
- keys.push(segment[1]);
236
- }
237
-
238
- // If there's a remainder, check strictDepth option for throw, else just add whatever is left
239
-
240
- if (segment) {
241
- if (options.strictDepth === true) {
242
- throw new RangeError('Input depth exceeded depth option of ' + options.depth + ' and strictDepth is true');
243
- }
244
- keys.push('[' + key.slice(segment.index) + ']');
245
- }
246
-
247
- return parseObject(keys, val, options, valuesParsed);
248
- };
249
-
250
- var normalizeParseOptions = function normalizeParseOptions(opts) {
251
- if (!opts) {
252
- return defaults;
253
- }
254
-
255
- if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') {
256
- throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');
257
- }
258
-
259
- if (typeof opts.decodeDotInKeys !== 'undefined' && typeof opts.decodeDotInKeys !== 'boolean') {
260
- throw new TypeError('`decodeDotInKeys` option can only be `true` or `false`, when provided');
261
- }
262
-
263
- if (opts.decoder !== null && typeof opts.decoder !== 'undefined' && typeof opts.decoder !== 'function') {
264
- throw new TypeError('Decoder has to be a function.');
265
- }
266
-
267
- if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
268
- throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
269
- }
270
-
271
- if (typeof opts.throwOnLimitExceeded !== 'undefined' && typeof opts.throwOnLimitExceeded !== 'boolean') {
272
- throw new TypeError('`throwOnLimitExceeded` option must be a boolean');
273
- }
274
-
275
- var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
276
-
277
- var duplicates = typeof opts.duplicates === 'undefined' ? defaults.duplicates : opts.duplicates;
278
-
279
- if (duplicates !== 'combine' && duplicates !== 'first' && duplicates !== 'last') {
280
- throw new TypeError('The duplicates option must be either combine, first, or last');
281
- }
282
-
283
- var allowDots = typeof opts.allowDots === 'undefined' ? opts.decodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;
284
-
285
- return {
286
- allowDots: allowDots,
287
- allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,
288
- allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
289
- allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
290
- arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
291
- charset: charset,
292
- charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
293
- comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
294
- decodeDotInKeys: typeof opts.decodeDotInKeys === 'boolean' ? opts.decodeDotInKeys : defaults.decodeDotInKeys,
295
- decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
296
- delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
297
- // eslint-disable-next-line no-implicit-coercion, no-extra-parens
298
- depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
299
- duplicates: duplicates,
300
- ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
301
- interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
302
- parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
303
- parseArrays: opts.parseArrays !== false,
304
- plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
305
- strictDepth: typeof opts.strictDepth === 'boolean' ? !!opts.strictDepth : defaults.strictDepth,
306
- strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling,
307
- throwOnLimitExceeded: typeof opts.throwOnLimitExceeded === 'boolean' ? opts.throwOnLimitExceeded : false
308
- };
309
- };
310
-
311
- parse = function (str, opts) {
312
- var options = normalizeParseOptions(opts);
313
-
314
- if (str === '' || str === null || typeof str === 'undefined') {
315
- return options.plainObjects ? { __proto__: null } : {};
316
- }
317
-
318
- var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
319
- var obj = options.plainObjects ? { __proto__: null } : {};
320
-
321
- // Iterate over the keys and setup the new object
322
-
323
- var keys = Object.keys(tempObj);
324
- for (var i = 0; i < keys.length; ++i) {
325
- var key = keys[i];
326
- var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
327
- obj = utils.merge(obj, newObj, options);
328
- }
329
-
330
- if (options.allowSparse === true) {
331
- return obj;
332
- }
333
-
334
- return utils.compact(obj);
335
- };
336
- return parse;
337
- }
338
-
339
- export { requireParse as __require };