@wabot-dev/framework 0.0.12 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/_virtual/XMLHttpRequest.js +7 -0
- package/dist/src/_virtual/_commonjsHelpers.js +32 -0
- package/dist/src/_virtual/base64id.js +3 -0
- package/dist/src/_virtual/binary.js +3 -0
- package/dist/src/_virtual/bom-handling.js +3 -0
- package/dist/src/_virtual/broadcast-operator.js +3 -0
- package/dist/src/_virtual/browser.js +3 -0
- package/dist/src/_virtual/browser2.js +3 -0
- package/dist/src/_virtual/browser3.js +3 -0
- package/dist/src/_virtual/browser4.js +3 -0
- package/dist/src/_virtual/browser5.js +3 -0
- package/dist/src/_virtual/buffer-util.js +3 -0
- package/dist/src/_virtual/buffer-util2.js +3 -0
- package/dist/src/_virtual/buffer-util3.js +3 -0
- package/dist/src/_virtual/charset.js +3 -0
- package/dist/src/_virtual/charset2.js +3 -0
- package/dist/src/_virtual/client.js +3 -0
- package/dist/src/_virtual/cluster-adapter.js +3 -0
- package/dist/src/_virtual/commons.js +3 -0
- package/dist/src/_virtual/dbcs-codec.js +3 -0
- package/dist/src/_virtual/decodePacket.js +3 -0
- package/dist/src/_virtual/encodePacket.js +3 -0
- package/dist/src/_virtual/encoding.js +3 -0
- package/dist/src/_virtual/encoding2.js +3 -0
- package/dist/src/_virtual/engine.io.js +3 -0
- package/dist/src/_virtual/in-memory-adapter.js +3 -0
- package/dist/src/_virtual/index.js +7 -0
- package/dist/src/_virtual/index10.js +3 -0
- package/dist/src/_virtual/index11.js +3 -0
- package/dist/src/_virtual/index12.js +3 -0
- package/dist/src/_virtual/index13.js +3 -0
- package/dist/src/_virtual/index14.js +3 -0
- package/dist/src/_virtual/index15.js +3 -0
- package/dist/src/_virtual/index16.js +3 -0
- package/dist/src/_virtual/index17.js +3 -0
- package/dist/src/_virtual/index18.js +3 -0
- package/dist/src/_virtual/index19.js +3 -0
- package/dist/src/_virtual/index2.js +7 -0
- package/dist/src/_virtual/index20.js +3 -0
- package/dist/src/_virtual/index21.js +3 -0
- package/dist/src/_virtual/index22.js +3 -0
- package/dist/src/_virtual/index23.js +3 -0
- package/dist/src/_virtual/index24.js +3 -0
- package/dist/src/_virtual/index25.js +3 -0
- package/dist/src/_virtual/index26.js +3 -0
- package/dist/src/_virtual/index27.js +3 -0
- package/dist/src/_virtual/index28.js +3 -0
- package/dist/src/_virtual/index29.js +3 -0
- package/dist/src/_virtual/index3.js +7 -0
- package/dist/src/_virtual/index30.js +3 -0
- package/dist/src/_virtual/index31.js +3 -0
- package/dist/src/_virtual/index32.js +3 -0
- package/dist/src/_virtual/index33.js +3 -0
- package/dist/src/_virtual/index4.js +3 -0
- package/dist/src/_virtual/index5.js +3 -0
- package/dist/src/_virtual/index6.js +3 -0
- package/dist/src/_virtual/index7.js +3 -0
- package/dist/src/_virtual/index8.js +6 -0
- package/dist/src/_virtual/index9.js +3 -0
- package/dist/src/_virtual/inherits.js +3 -0
- package/dist/src/_virtual/inherits_browser.js +3 -0
- package/dist/src/_virtual/is-binary.js +3 -0
- package/dist/src/_virtual/language.js +3 -0
- package/dist/src/_virtual/language2.js +3 -0
- package/dist/src/_virtual/mediaType.js +3 -0
- package/dist/src/_virtual/mediaType2.js +3 -0
- package/dist/src/_virtual/namespace.js +3 -0
- package/dist/src/_virtual/node.js +3 -0
- package/dist/src/_virtual/node2.js +3 -0
- package/dist/src/_virtual/node3.js +3 -0
- package/dist/src/_virtual/node4.js +3 -0
- package/dist/src/_virtual/node5.js +3 -0
- package/dist/src/_virtual/parent-namespace.js +3 -0
- package/dist/src/_virtual/polling-jsonp.js +3 -0
- package/dist/src/_virtual/polling.js +3 -0
- package/dist/src/_virtual/polling2.js +3 -0
- package/dist/src/_virtual/receiver.js +3 -0
- package/dist/src/_virtual/sbcs-codec.js +3 -0
- package/dist/src/_virtual/sender.js +3 -0
- package/dist/src/_virtual/server.js +3 -0
- package/dist/src/_virtual/socket-types.js +3 -0
- package/dist/src/_virtual/socket.js +3 -0
- package/dist/src/_virtual/socket2.js +3 -0
- package/dist/src/_virtual/stream.js +3 -0
- package/dist/src/_virtual/transport.js +3 -0
- package/dist/src/_virtual/typed-events.js +3 -0
- package/dist/src/_virtual/userver.js +3 -0
- package/dist/src/_virtual/utf16.js +3 -0
- package/dist/src/_virtual/utf32.js +3 -0
- package/dist/src/_virtual/utf7.js +3 -0
- package/dist/src/_virtual/uws.js +3 -0
- package/dist/src/_virtual/validation.js +3 -0
- package/dist/src/_virtual/validation2.js +3 -0
- package/dist/src/_virtual/validation3.js +3 -0
- package/dist/src/_virtual/websocket-server.js +3 -0
- package/dist/src/_virtual/websocket.js +7 -0
- package/dist/src/_virtual/websocket2.js +3 -0
- package/dist/src/_virtual/websocket3.js +3 -0
- package/dist/src/_virtual/webtransport.js +3 -0
- package/dist/src/_virtual/yeast.js +3 -0
- package/dist/src/channels/cmd/@cmd.js +2 -0
- package/dist/src/channels/cmd/CmdChannel.js +2 -0
- package/dist/src/channels/telegram/@telegram.js +2 -0
- package/dist/src/channels/telegram/TelegramChannel.js +2 -0
- package/dist/src/channels/whatsapp/@whatsapp.js +24 -0
- package/dist/src/channels/whatsapp/WhatsAppChannel.js +63 -0
- package/dist/src/channels/whatsapp/WhatsAppChannelConfig.js +8 -0
- package/dist/src/channels/whatsapp/WhatsAppConnection.js +61 -0
- package/dist/src/channels/whatsapp/WhatsAppDevConnection.js +61 -0
- package/dist/src/channels/whatsapp/WhatsAppProdConnection.js +36 -0
- package/dist/src/channels/whatsapp/whatsAppDevSocketContracts.js +9 -0
- package/dist/src/controller/express/Express.js +5 -0
- package/dist/src/controller/socket.io/SocketIO.js +5 -0
- package/dist/src/env/WabotEnv.js +21 -0
- package/dist/src/index.d.ts +168 -1
- package/dist/src/index.js +12 -0
- package/dist/src/logger/Logger.js +65 -0
- package/dist/src/node_modules/@socket.io/component-emitter/lib/esm/index.js +171 -0
- package/dist/src/node_modules/base64id/lib/base64id.js +117 -0
- package/dist/src/node_modules/body-parser/index.js +96 -0
- package/dist/src/node_modules/body-parser/lib/read.js +225 -0
- package/dist/src/node_modules/body-parser/lib/types/json.js +222 -0
- package/dist/src/node_modules/body-parser/lib/types/raw.js +90 -0
- package/dist/src/node_modules/body-parser/lib/types/text.js +95 -0
- package/dist/src/node_modules/body-parser/lib/types/urlencoded.js +194 -0
- package/dist/src/node_modules/body-parser/lib/utils.js +96 -0
- package/dist/src/node_modules/bytes/index.js +180 -0
- package/dist/src/node_modules/call-bind-apply-helpers/actualApply.js +24 -0
- package/dist/src/node_modules/call-bind-apply-helpers/functionApply.js +13 -0
- package/dist/src/node_modules/call-bind-apply-helpers/functionCall.js +13 -0
- package/dist/src/node_modules/call-bind-apply-helpers/index.js +29 -0
- package/dist/src/node_modules/call-bind-apply-helpers/reflectApply.js +13 -0
- package/dist/src/node_modules/call-bound/index.js +31 -0
- package/dist/src/node_modules/content-type/index.js +235 -0
- package/dist/src/node_modules/cookie/index.js +345 -0
- package/dist/src/node_modules/cors/lib/index.js +249 -0
- package/dist/src/node_modules/debug/src/browser.js +286 -0
- package/dist/src/node_modules/debug/src/common.js +303 -0
- package/dist/src/node_modules/debug/src/index.js +23 -0
- package/dist/src/node_modules/debug/src/node.js +279 -0
- package/dist/src/node_modules/depd/index.js +550 -0
- package/dist/src/node_modules/dunder-proto/get.js +42 -0
- package/dist/src/node_modules/ee-first/index.js +104 -0
- package/dist/src/node_modules/engine.io/build/engine.io.js +73 -0
- package/dist/src/node_modules/engine.io/build/parser-v3/index.js +429 -0
- package/dist/src/node_modules/engine.io/build/parser-v3/utf8.js +198 -0
- package/dist/src/node_modules/engine.io/build/server.js +808 -0
- package/dist/src/node_modules/engine.io/build/socket.js +469 -0
- package/dist/src/node_modules/engine.io/build/transport.js +131 -0
- package/dist/src/node_modules/engine.io/build/transports/index.js +37 -0
- package/dist/src/node_modules/engine.io/build/transports/polling-jsonp.js +53 -0
- package/dist/src/node_modules/engine.io/build/transports/polling.js +346 -0
- package/dist/src/node_modules/engine.io/build/transports/websocket.js +106 -0
- package/dist/src/node_modules/engine.io/build/transports/webtransport.js +76 -0
- package/dist/src/node_modules/engine.io/build/transports-uws/index.js +20 -0
- package/dist/src/node_modules/engine.io/build/transports-uws/polling.js +378 -0
- package/dist/src/node_modules/engine.io/build/transports-uws/websocket.js +85 -0
- package/dist/src/node_modules/engine.io/build/userver.js +292 -0
- package/dist/src/node_modules/engine.io/node_modules/accepts/index.js +250 -0
- package/dist/src/node_modules/engine.io/node_modules/debug/src/browser.js +285 -0
- package/dist/src/node_modules/engine.io/node_modules/debug/src/common.js +285 -0
- package/dist/src/node_modules/engine.io/node_modules/debug/src/index.js +23 -0
- package/dist/src/node_modules/engine.io/node_modules/debug/src/node.js +279 -0
- package/dist/src/node_modules/engine.io/node_modules/mime-db/db.json.js +10704 -0
- package/dist/src/node_modules/engine.io/node_modules/mime-db/index.js +24 -0
- package/dist/src/node_modules/engine.io/node_modules/mime-types/index.js +202 -0
- package/dist/src/node_modules/engine.io/node_modules/negotiator/index.js +96 -0
- package/dist/src/node_modules/engine.io/node_modules/negotiator/lib/charset.js +179 -0
- package/dist/src/node_modules/engine.io/node_modules/negotiator/lib/encoding.js +193 -0
- package/dist/src/node_modules/engine.io/node_modules/negotiator/lib/language.js +188 -0
- package/dist/src/node_modules/engine.io/node_modules/negotiator/lib/mediaType.js +304 -0
- package/dist/src/node_modules/engine.io/node_modules/ws/index.js +28 -0
- package/dist/src/node_modules/engine.io/node_modules/ws/lib/buffer-util.js +142 -0
- package/dist/src/node_modules/engine.io/node_modules/ws/lib/constants.js +21 -0
- package/dist/src/node_modules/engine.io/node_modules/ws/lib/event-target.js +303 -0
- package/dist/src/node_modules/engine.io/node_modules/ws/lib/extension.js +214 -0
- package/dist/src/node_modules/engine.io/node_modules/ws/lib/limiter.js +64 -0
- package/dist/src/node_modules/engine.io/node_modules/ws/lib/permessage-deflate.js +528 -0
- package/dist/src/node_modules/engine.io/node_modules/ws/lib/receiver.js +719 -0
- package/dist/src/node_modules/engine.io/node_modules/ws/lib/sender.js +513 -0
- package/dist/src/node_modules/engine.io/node_modules/ws/lib/stream.js +170 -0
- package/dist/src/node_modules/engine.io/node_modules/ws/lib/subprotocol.js +73 -0
- package/dist/src/node_modules/engine.io/node_modules/ws/lib/validation.js +141 -0
- package/dist/src/node_modules/engine.io/node_modules/ws/lib/websocket-server.js +559 -0
- package/dist/src/node_modules/engine.io/node_modules/ws/lib/websocket.js +1363 -0
- package/dist/src/node_modules/engine.io-client/build/esm/contrib/has-cors.js +13 -0
- package/dist/src/node_modules/engine.io-client/build/esm/contrib/parseqs.js +36 -0
- package/dist/src/node_modules/engine.io-client/build/esm/contrib/parseuri.js +66 -0
- package/dist/src/node_modules/engine.io-client/build/esm/globals.node.js +92 -0
- package/dist/src/node_modules/engine.io-client/build/esm/index.js +17 -0
- package/dist/src/node_modules/engine.io-client/build/esm/socket.js +728 -0
- package/dist/src/node_modules/engine.io-client/build/esm/transport.js +143 -0
- package/dist/src/node_modules/engine.io-client/build/esm/transports/index.js +11 -0
- package/dist/src/node_modules/engine.io-client/build/esm/transports/polling-xhr.js +256 -0
- package/dist/src/node_modules/engine.io-client/build/esm/transports/polling-xhr.node.js +21 -0
- package/dist/src/node_modules/engine.io-client/build/esm/transports/polling.js +146 -0
- package/dist/src/node_modules/engine.io-client/build/esm/transports/websocket.js +107 -0
- package/dist/src/node_modules/engine.io-client/build/esm/transports/websocket.node.js +48 -0
- package/dist/src/node_modules/engine.io-client/build/esm/transports/webtransport.js +83 -0
- package/dist/src/node_modules/engine.io-client/build/esm/util.js +62 -0
- package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/buffer-util.js +142 -0
- package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/constants.js +21 -0
- package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/event-target.js +303 -0
- package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/extension.js +214 -0
- package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/limiter.js +64 -0
- package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/permessage-deflate.js +528 -0
- package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/receiver.js +719 -0
- package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/sender.js +513 -0
- package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/stream.js +170 -0
- package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/subprotocol.js +73 -0
- package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/validation.js +141 -0
- package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/websocket-server.js +559 -0
- package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/websocket.js +1363 -0
- package/dist/src/node_modules/engine.io-parser/build/cjs/commons.js +29 -0
- package/dist/src/node_modules/engine.io-parser/build/cjs/decodePacket.js +70 -0
- package/dist/src/node_modules/engine.io-parser/build/cjs/encodePacket.js +51 -0
- package/dist/src/node_modules/engine.io-parser/build/cjs/index.js +179 -0
- package/dist/src/node_modules/engine.io-parser/build/esm/commons.js +15 -0
- package/dist/src/node_modules/engine.io-parser/build/esm/decodePacket.js +58 -0
- package/dist/src/node_modules/engine.io-parser/build/esm/encodePacket.js +36 -0
- package/dist/src/node_modules/engine.io-parser/build/esm/index.js +158 -0
- package/dist/src/node_modules/es-define-property/index.js +23 -0
- package/dist/src/node_modules/es-errors/eval.js +13 -0
- package/dist/src/node_modules/es-errors/index.js +13 -0
- package/dist/src/node_modules/es-errors/range.js +13 -0
- package/dist/src/node_modules/es-errors/ref.js +13 -0
- package/dist/src/node_modules/es-errors/syntax.js +13 -0
- package/dist/src/node_modules/es-errors/type.js +13 -0
- package/dist/src/node_modules/es-errors/uri.js +13 -0
- package/dist/src/node_modules/es-object-atoms/index.js +13 -0
- package/dist/src/node_modules/function-bind/implementation.js +93 -0
- package/dist/src/node_modules/function-bind/index.js +16 -0
- package/dist/src/node_modules/get-intrinsic/index.js +413 -0
- package/dist/src/node_modules/get-proto/Object.getPrototypeOf.js +17 -0
- package/dist/src/node_modules/get-proto/Reflect.getPrototypeOf.js +13 -0
- package/dist/src/node_modules/get-proto/index.js +40 -0
- package/dist/src/node_modules/gopd/gOPD.js +13 -0
- package/dist/src/node_modules/gopd/index.js +26 -0
- package/dist/src/node_modules/has-symbols/index.js +25 -0
- package/dist/src/node_modules/has-symbols/shams.js +54 -0
- package/dist/src/node_modules/hasown/index.js +19 -0
- package/dist/src/node_modules/http-errors/index.js +306 -0
- package/dist/src/node_modules/iconv-lite/encodings/dbcs-codec.js +598 -0
- package/dist/src/node_modules/iconv-lite/encodings/dbcs-data.js +206 -0
- package/dist/src/node_modules/iconv-lite/encodings/index.js +44 -0
- package/dist/src/node_modules/iconv-lite/encodings/internal.js +210 -0
- package/dist/src/node_modules/iconv-lite/encodings/sbcs-codec.js +83 -0
- package/dist/src/node_modules/iconv-lite/encodings/sbcs-data-generated.js +460 -0
- package/dist/src/node_modules/iconv-lite/encodings/sbcs-data.js +187 -0
- package/dist/src/node_modules/iconv-lite/encodings/tables/big5-added.json.js +506 -0
- package/dist/src/node_modules/iconv-lite/encodings/tables/cp936.json.js +2621 -0
- package/dist/src/node_modules/iconv-lite/encodings/tables/cp949.json.js +2380 -0
- package/dist/src/node_modules/iconv-lite/encodings/tables/cp950.json.js +729 -0
- package/dist/src/node_modules/iconv-lite/encodings/tables/eucjp.json.js +822 -0
- package/dist/src/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json.js +424 -0
- package/dist/src/node_modules/iconv-lite/encodings/tables/gbk-added.json.js +264 -0
- package/dist/src/node_modules/iconv-lite/encodings/tables/shiftjis.json.js +548 -0
- package/dist/src/node_modules/iconv-lite/encodings/utf16.js +206 -0
- package/dist/src/node_modules/iconv-lite/encodings/utf32.js +329 -0
- package/dist/src/node_modules/iconv-lite/encodings/utf7.js +297 -0
- package/dist/src/node_modules/iconv-lite/lib/bom-handling.js +61 -0
- package/dist/src/node_modules/iconv-lite/lib/index.js +192 -0
- package/dist/src/node_modules/iconv-lite/lib/streams.js +120 -0
- package/dist/src/node_modules/inherits/inherits.js +21 -0
- package/dist/src/node_modules/inherits/inherits_browser.js +38 -0
- package/dist/src/node_modules/math-intrinsics/abs.js +13 -0
- package/dist/src/node_modules/math-intrinsics/floor.js +13 -0
- package/dist/src/node_modules/math-intrinsics/isNaN.js +15 -0
- package/dist/src/node_modules/math-intrinsics/max.js +13 -0
- package/dist/src/node_modules/math-intrinsics/min.js +13 -0
- package/dist/src/node_modules/math-intrinsics/pow.js +13 -0
- package/dist/src/node_modules/math-intrinsics/round.js +13 -0
- package/dist/src/node_modules/math-intrinsics/sign.js +22 -0
- package/dist/src/node_modules/media-typer/index.js +153 -0
- package/dist/src/node_modules/mime-db/db.json.js +11656 -0
- package/dist/src/node_modules/mime-db/index.js +24 -0
- package/dist/src/node_modules/mime-types/index.js +226 -0
- package/dist/src/node_modules/mime-types/mimeScore.js +62 -0
- package/dist/src/node_modules/ms/index.js +172 -0
- package/dist/src/node_modules/object-assign/index.js +99 -0
- package/dist/src/node_modules/object-inspect/index.js +557 -0
- package/dist/src/node_modules/object-inspect/util.inspect.js +13 -0
- package/dist/src/node_modules/on-finished/index.js +245 -0
- package/dist/src/node_modules/qs/lib/formats.js +32 -0
- package/dist/src/node_modules/qs/lib/index.js +24 -0
- package/dist/src/node_modules/qs/lib/parse.js +339 -0
- package/dist/src/node_modules/qs/lib/stringify.js +369 -0
- package/dist/src/node_modules/qs/lib/utils.js +279 -0
- package/dist/src/node_modules/raw-body/index.js +351 -0
- package/dist/src/node_modules/safer-buffer/safer.js +88 -0
- package/dist/src/node_modules/setprototypeof/index.js +26 -0
- package/dist/src/node_modules/side-channel/index.js +58 -0
- package/dist/src/node_modules/side-channel-list/index.js +125 -0
- package/dist/src/node_modules/side-channel-map/index.js +82 -0
- package/dist/src/node_modules/side-channel-weakmap/index.js +99 -0
- package/dist/src/node_modules/socket.io/dist/broadcast-operator.js +448 -0
- package/dist/src/node_modules/socket.io/dist/client.js +281 -0
- package/dist/src/node_modules/socket.io/dist/index.js +837 -0
- package/dist/src/node_modules/socket.io/dist/namespace.js +597 -0
- package/dist/src/node_modules/socket.io/dist/parent-namespace.js +101 -0
- package/dist/src/node_modules/socket.io/dist/socket-types.js +21 -0
- package/dist/src/node_modules/socket.io/dist/socket.js +993 -0
- package/dist/src/node_modules/socket.io/dist/typed-events.js +92 -0
- package/dist/src/node_modules/socket.io/dist/uws.js +149 -0
- package/dist/src/node_modules/socket.io/node_modules/accepts/index.js +250 -0
- package/dist/src/node_modules/socket.io/node_modules/debug/src/browser.js +285 -0
- package/dist/src/node_modules/socket.io/node_modules/debug/src/common.js +285 -0
- package/dist/src/node_modules/socket.io/node_modules/debug/src/index.js +23 -0
- package/dist/src/node_modules/socket.io/node_modules/debug/src/node.js +279 -0
- package/dist/src/node_modules/socket.io/node_modules/mime-db/db.json.js +10704 -0
- package/dist/src/node_modules/socket.io/node_modules/mime-db/index.js +24 -0
- package/dist/src/node_modules/socket.io/node_modules/mime-types/index.js +202 -0
- package/dist/src/node_modules/socket.io/node_modules/negotiator/index.js +96 -0
- package/dist/src/node_modules/socket.io/node_modules/negotiator/lib/charset.js +179 -0
- package/dist/src/node_modules/socket.io/node_modules/negotiator/lib/encoding.js +193 -0
- package/dist/src/node_modules/socket.io/node_modules/negotiator/lib/language.js +188 -0
- package/dist/src/node_modules/socket.io/node_modules/negotiator/lib/mediaType.js +304 -0
- package/dist/src/node_modules/socket.io/package.json.js +5 -0
- package/dist/src/node_modules/socket.io/wrapper.js +5 -0
- package/dist/src/node_modules/socket.io-adapter/dist/cluster-adapter.js +689 -0
- package/dist/src/node_modules/socket.io-adapter/dist/contrib/yeast.js +64 -0
- package/dist/src/node_modules/socket.io-adapter/dist/in-memory-adapter.js +407 -0
- package/dist/src/node_modules/socket.io-adapter/dist/index.js +24 -0
- package/dist/src/node_modules/socket.io-adapter/node_modules/debug/src/browser.js +285 -0
- package/dist/src/node_modules/socket.io-adapter/node_modules/debug/src/common.js +285 -0
- package/dist/src/node_modules/socket.io-adapter/node_modules/debug/src/index.js +23 -0
- package/dist/src/node_modules/socket.io-adapter/node_modules/debug/src/node.js +279 -0
- package/dist/src/node_modules/socket.io-adapter/node_modules/ws/index.js +28 -0
- package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/buffer-util.js +142 -0
- package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/constants.js +21 -0
- package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/event-target.js +303 -0
- package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/extension.js +214 -0
- package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/limiter.js +64 -0
- package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/permessage-deflate.js +528 -0
- package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/receiver.js +719 -0
- package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/sender.js +513 -0
- package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/stream.js +170 -0
- package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/subprotocol.js +73 -0
- package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/validation.js +141 -0
- package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/websocket-server.js +559 -0
- package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/websocket.js +1363 -0
- package/dist/src/node_modules/socket.io-client/build/esm/contrib/backo2.js +68 -0
- package/dist/src/node_modules/socket.io-client/build/esm/index.js +50 -0
- package/dist/src/node_modules/socket.io-client/build/esm/manager.js +373 -0
- package/dist/src/node_modules/socket.io-client/build/esm/on.js +8 -0
- package/dist/src/node_modules/socket.io-client/build/esm/socket.js +884 -0
- package/dist/src/node_modules/socket.io-client/build/esm/url.js +63 -0
- package/dist/src/node_modules/socket.io-parser/build/cjs/binary.js +99 -0
- package/dist/src/node_modules/socket.io-parser/build/cjs/index.js +337 -0
- package/dist/src/node_modules/socket.io-parser/build/cjs/is-binary.js +65 -0
- package/dist/src/node_modules/socket.io-parser/build/esm/binary.js +86 -0
- package/dist/src/node_modules/socket.io-parser/build/esm/index.js +314 -0
- package/dist/src/node_modules/socket.io-parser/build/esm/is-binary.js +52 -0
- package/dist/src/node_modules/socket.io-parser/node_modules/debug/src/browser.js +285 -0
- package/dist/src/node_modules/socket.io-parser/node_modules/debug/src/common.js +285 -0
- package/dist/src/node_modules/socket.io-parser/node_modules/debug/src/index.js +23 -0
- package/dist/src/node_modules/socket.io-parser/node_modules/debug/src/node.js +279 -0
- package/dist/src/node_modules/statuses/codes.json.js +67 -0
- package/dist/src/node_modules/statuses/index.js +157 -0
- package/dist/src/node_modules/toidentifier/index.js +41 -0
- package/dist/src/node_modules/type-is/index.js +263 -0
- package/dist/src/node_modules/unpipe/index.js +78 -0
- package/dist/src/node_modules/vary/index.js +159 -0
- package/dist/src/node_modules/xmlhttprequest-ssl/lib/XMLHttpRequest.js +702 -0
- package/dist/src/server/runChannel.js +8 -8
- package/dist/src/server/runServer.js +41 -2
- package/package.json +7 -3
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
import { __require as requireSideChannel } from '../../side-channel/index.js';
|
|
2
|
+
import { __require as requireUtils } from './utils.js';
|
|
3
|
+
import { __require as requireFormats } from './formats.js';
|
|
4
|
+
|
|
5
|
+
var stringify_1;
|
|
6
|
+
var hasRequiredStringify;
|
|
7
|
+
|
|
8
|
+
function requireStringify () {
|
|
9
|
+
if (hasRequiredStringify) return stringify_1;
|
|
10
|
+
hasRequiredStringify = 1;
|
|
11
|
+
|
|
12
|
+
var getSideChannel = requireSideChannel();
|
|
13
|
+
var utils = /*@__PURE__*/ requireUtils();
|
|
14
|
+
var formats = /*@__PURE__*/ requireFormats();
|
|
15
|
+
var has = Object.prototype.hasOwnProperty;
|
|
16
|
+
|
|
17
|
+
var arrayPrefixGenerators = {
|
|
18
|
+
brackets: function brackets(prefix) {
|
|
19
|
+
return prefix + '[]';
|
|
20
|
+
},
|
|
21
|
+
comma: 'comma',
|
|
22
|
+
indices: function indices(prefix, key) {
|
|
23
|
+
return prefix + '[' + key + ']';
|
|
24
|
+
},
|
|
25
|
+
repeat: function repeat(prefix) {
|
|
26
|
+
return prefix;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
var isArray = Array.isArray;
|
|
31
|
+
var push = Array.prototype.push;
|
|
32
|
+
var pushToArray = function (arr, valueOrArray) {
|
|
33
|
+
push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
var toISO = Date.prototype.toISOString;
|
|
37
|
+
|
|
38
|
+
var defaultFormat = formats['default'];
|
|
39
|
+
var defaults = {
|
|
40
|
+
addQueryPrefix: false,
|
|
41
|
+
allowDots: false,
|
|
42
|
+
allowEmptyArrays: false,
|
|
43
|
+
arrayFormat: 'indices',
|
|
44
|
+
charset: 'utf-8',
|
|
45
|
+
charsetSentinel: false,
|
|
46
|
+
commaRoundTrip: false,
|
|
47
|
+
delimiter: '&',
|
|
48
|
+
encode: true,
|
|
49
|
+
encodeDotInKeys: false,
|
|
50
|
+
encoder: utils.encode,
|
|
51
|
+
encodeValuesOnly: false,
|
|
52
|
+
filter: void 0,
|
|
53
|
+
format: defaultFormat,
|
|
54
|
+
formatter: formats.formatters[defaultFormat],
|
|
55
|
+
// deprecated
|
|
56
|
+
indices: false,
|
|
57
|
+
serializeDate: function serializeDate(date) {
|
|
58
|
+
return toISO.call(date);
|
|
59
|
+
},
|
|
60
|
+
skipNulls: false,
|
|
61
|
+
strictNullHandling: false
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
|
|
65
|
+
return typeof v === 'string'
|
|
66
|
+
|| typeof v === 'number'
|
|
67
|
+
|| typeof v === 'boolean'
|
|
68
|
+
|| typeof v === 'symbol'
|
|
69
|
+
|| typeof v === 'bigint';
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
var sentinel = {};
|
|
73
|
+
|
|
74
|
+
var stringify = function stringify(
|
|
75
|
+
object,
|
|
76
|
+
prefix,
|
|
77
|
+
generateArrayPrefix,
|
|
78
|
+
commaRoundTrip,
|
|
79
|
+
allowEmptyArrays,
|
|
80
|
+
strictNullHandling,
|
|
81
|
+
skipNulls,
|
|
82
|
+
encodeDotInKeys,
|
|
83
|
+
encoder,
|
|
84
|
+
filter,
|
|
85
|
+
sort,
|
|
86
|
+
allowDots,
|
|
87
|
+
serializeDate,
|
|
88
|
+
format,
|
|
89
|
+
formatter,
|
|
90
|
+
encodeValuesOnly,
|
|
91
|
+
charset,
|
|
92
|
+
sideChannel
|
|
93
|
+
) {
|
|
94
|
+
var obj = object;
|
|
95
|
+
|
|
96
|
+
var tmpSc = sideChannel;
|
|
97
|
+
var step = 0;
|
|
98
|
+
var findFlag = false;
|
|
99
|
+
while ((tmpSc = tmpSc.get(sentinel)) !== void 0 && !findFlag) {
|
|
100
|
+
// Where object last appeared in the ref tree
|
|
101
|
+
var pos = tmpSc.get(object);
|
|
102
|
+
step += 1;
|
|
103
|
+
if (typeof pos !== 'undefined') {
|
|
104
|
+
if (pos === step) {
|
|
105
|
+
throw new RangeError('Cyclic object value');
|
|
106
|
+
} else {
|
|
107
|
+
findFlag = true; // Break while
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
if (typeof tmpSc.get(sentinel) === 'undefined') {
|
|
111
|
+
step = 0;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if (typeof filter === 'function') {
|
|
116
|
+
obj = filter(prefix, obj);
|
|
117
|
+
} else if (obj instanceof Date) {
|
|
118
|
+
obj = serializeDate(obj);
|
|
119
|
+
} else if (generateArrayPrefix === 'comma' && isArray(obj)) {
|
|
120
|
+
obj = utils.maybeMap(obj, function (value) {
|
|
121
|
+
if (value instanceof Date) {
|
|
122
|
+
return serializeDate(value);
|
|
123
|
+
}
|
|
124
|
+
return value;
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (obj === null) {
|
|
129
|
+
if (strictNullHandling) {
|
|
130
|
+
return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
obj = '';
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
|
|
137
|
+
if (encoder) {
|
|
138
|
+
var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);
|
|
139
|
+
return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];
|
|
140
|
+
}
|
|
141
|
+
return [formatter(prefix) + '=' + formatter(String(obj))];
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
var values = [];
|
|
145
|
+
|
|
146
|
+
if (typeof obj === 'undefined') {
|
|
147
|
+
return values;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
var objKeys;
|
|
151
|
+
if (generateArrayPrefix === 'comma' && isArray(obj)) {
|
|
152
|
+
// we need to join elements in
|
|
153
|
+
if (encodeValuesOnly && encoder) {
|
|
154
|
+
obj = utils.maybeMap(obj, encoder);
|
|
155
|
+
}
|
|
156
|
+
objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void 0 }];
|
|
157
|
+
} else if (isArray(filter)) {
|
|
158
|
+
objKeys = filter;
|
|
159
|
+
} else {
|
|
160
|
+
var keys = Object.keys(obj);
|
|
161
|
+
objKeys = sort ? keys.sort(sort) : keys;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
var encodedPrefix = encodeDotInKeys ? String(prefix).replace(/\./g, '%2E') : String(prefix);
|
|
165
|
+
|
|
166
|
+
var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encodedPrefix + '[]' : encodedPrefix;
|
|
167
|
+
|
|
168
|
+
if (allowEmptyArrays && isArray(obj) && obj.length === 0) {
|
|
169
|
+
return adjustedPrefix + '[]';
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
for (var j = 0; j < objKeys.length; ++j) {
|
|
173
|
+
var key = objKeys[j];
|
|
174
|
+
var value = typeof key === 'object' && key && typeof key.value !== 'undefined'
|
|
175
|
+
? key.value
|
|
176
|
+
: obj[key];
|
|
177
|
+
|
|
178
|
+
if (skipNulls && value === null) {
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
var encodedKey = allowDots && encodeDotInKeys ? String(key).replace(/\./g, '%2E') : String(key);
|
|
183
|
+
var keyPrefix = isArray(obj)
|
|
184
|
+
? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix
|
|
185
|
+
: adjustedPrefix + (allowDots ? '.' + encodedKey : '[' + encodedKey + ']');
|
|
186
|
+
|
|
187
|
+
sideChannel.set(object, step);
|
|
188
|
+
var valueSideChannel = getSideChannel();
|
|
189
|
+
valueSideChannel.set(sentinel, sideChannel);
|
|
190
|
+
pushToArray(values, stringify(
|
|
191
|
+
value,
|
|
192
|
+
keyPrefix,
|
|
193
|
+
generateArrayPrefix,
|
|
194
|
+
commaRoundTrip,
|
|
195
|
+
allowEmptyArrays,
|
|
196
|
+
strictNullHandling,
|
|
197
|
+
skipNulls,
|
|
198
|
+
encodeDotInKeys,
|
|
199
|
+
generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder,
|
|
200
|
+
filter,
|
|
201
|
+
sort,
|
|
202
|
+
allowDots,
|
|
203
|
+
serializeDate,
|
|
204
|
+
format,
|
|
205
|
+
formatter,
|
|
206
|
+
encodeValuesOnly,
|
|
207
|
+
charset,
|
|
208
|
+
valueSideChannel
|
|
209
|
+
));
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
return values;
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
|
|
216
|
+
if (!opts) {
|
|
217
|
+
return defaults;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') {
|
|
221
|
+
throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
if (typeof opts.encodeDotInKeys !== 'undefined' && typeof opts.encodeDotInKeys !== 'boolean') {
|
|
225
|
+
throw new TypeError('`encodeDotInKeys` option can only be `true` or `false`, when provided');
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
|
|
229
|
+
throw new TypeError('Encoder has to be a function.');
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
var charset = opts.charset || defaults.charset;
|
|
233
|
+
if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
|
|
234
|
+
throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
var format = formats['default'];
|
|
238
|
+
if (typeof opts.format !== 'undefined') {
|
|
239
|
+
if (!has.call(formats.formatters, opts.format)) {
|
|
240
|
+
throw new TypeError('Unknown format option provided.');
|
|
241
|
+
}
|
|
242
|
+
format = opts.format;
|
|
243
|
+
}
|
|
244
|
+
var formatter = formats.formatters[format];
|
|
245
|
+
|
|
246
|
+
var filter = defaults.filter;
|
|
247
|
+
if (typeof opts.filter === 'function' || isArray(opts.filter)) {
|
|
248
|
+
filter = opts.filter;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
var arrayFormat;
|
|
252
|
+
if (opts.arrayFormat in arrayPrefixGenerators) {
|
|
253
|
+
arrayFormat = opts.arrayFormat;
|
|
254
|
+
} else if ('indices' in opts) {
|
|
255
|
+
arrayFormat = opts.indices ? 'indices' : 'repeat';
|
|
256
|
+
} else {
|
|
257
|
+
arrayFormat = defaults.arrayFormat;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
if ('commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
|
|
261
|
+
throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
var allowDots = typeof opts.allowDots === 'undefined' ? opts.encodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;
|
|
265
|
+
|
|
266
|
+
return {
|
|
267
|
+
addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,
|
|
268
|
+
allowDots: allowDots,
|
|
269
|
+
allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,
|
|
270
|
+
arrayFormat: arrayFormat,
|
|
271
|
+
charset: charset,
|
|
272
|
+
charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
|
|
273
|
+
commaRoundTrip: !!opts.commaRoundTrip,
|
|
274
|
+
delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,
|
|
275
|
+
encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,
|
|
276
|
+
encodeDotInKeys: typeof opts.encodeDotInKeys === 'boolean' ? opts.encodeDotInKeys : defaults.encodeDotInKeys,
|
|
277
|
+
encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,
|
|
278
|
+
encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
|
|
279
|
+
filter: filter,
|
|
280
|
+
format: format,
|
|
281
|
+
formatter: formatter,
|
|
282
|
+
serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,
|
|
283
|
+
skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,
|
|
284
|
+
sort: typeof opts.sort === 'function' ? opts.sort : null,
|
|
285
|
+
strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
stringify_1 = function (object, opts) {
|
|
290
|
+
var obj = object;
|
|
291
|
+
var options = normalizeStringifyOptions(opts);
|
|
292
|
+
|
|
293
|
+
var objKeys;
|
|
294
|
+
var filter;
|
|
295
|
+
|
|
296
|
+
if (typeof options.filter === 'function') {
|
|
297
|
+
filter = options.filter;
|
|
298
|
+
obj = filter('', obj);
|
|
299
|
+
} else if (isArray(options.filter)) {
|
|
300
|
+
filter = options.filter;
|
|
301
|
+
objKeys = filter;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
var keys = [];
|
|
305
|
+
|
|
306
|
+
if (typeof obj !== 'object' || obj === null) {
|
|
307
|
+
return '';
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat];
|
|
311
|
+
var commaRoundTrip = generateArrayPrefix === 'comma' && options.commaRoundTrip;
|
|
312
|
+
|
|
313
|
+
if (!objKeys) {
|
|
314
|
+
objKeys = Object.keys(obj);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
if (options.sort) {
|
|
318
|
+
objKeys.sort(options.sort);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
var sideChannel = getSideChannel();
|
|
322
|
+
for (var i = 0; i < objKeys.length; ++i) {
|
|
323
|
+
var key = objKeys[i];
|
|
324
|
+
var value = obj[key];
|
|
325
|
+
|
|
326
|
+
if (options.skipNulls && value === null) {
|
|
327
|
+
continue;
|
|
328
|
+
}
|
|
329
|
+
pushToArray(keys, stringify(
|
|
330
|
+
value,
|
|
331
|
+
key,
|
|
332
|
+
generateArrayPrefix,
|
|
333
|
+
commaRoundTrip,
|
|
334
|
+
options.allowEmptyArrays,
|
|
335
|
+
options.strictNullHandling,
|
|
336
|
+
options.skipNulls,
|
|
337
|
+
options.encodeDotInKeys,
|
|
338
|
+
options.encode ? options.encoder : null,
|
|
339
|
+
options.filter,
|
|
340
|
+
options.sort,
|
|
341
|
+
options.allowDots,
|
|
342
|
+
options.serializeDate,
|
|
343
|
+
options.format,
|
|
344
|
+
options.formatter,
|
|
345
|
+
options.encodeValuesOnly,
|
|
346
|
+
options.charset,
|
|
347
|
+
sideChannel
|
|
348
|
+
));
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
var joined = keys.join(options.delimiter);
|
|
352
|
+
var prefix = options.addQueryPrefix === true ? '?' : '';
|
|
353
|
+
|
|
354
|
+
if (options.charsetSentinel) {
|
|
355
|
+
if (options.charset === 'iso-8859-1') {
|
|
356
|
+
// encodeURIComponent('✓'), the "numeric entity" representation of a checkmark
|
|
357
|
+
prefix += 'utf8=%26%2310003%3B&';
|
|
358
|
+
} else {
|
|
359
|
+
// encodeURIComponent('✓')
|
|
360
|
+
prefix += 'utf8=%E2%9C%93&';
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
return joined.length > 0 ? prefix + joined : '';
|
|
365
|
+
};
|
|
366
|
+
return stringify_1;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
export { requireStringify as __require };
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { __require as requireFormats } from './formats.js';
|
|
2
|
+
|
|
3
|
+
var utils;
|
|
4
|
+
var hasRequiredUtils;
|
|
5
|
+
|
|
6
|
+
function requireUtils () {
|
|
7
|
+
if (hasRequiredUtils) return utils;
|
|
8
|
+
hasRequiredUtils = 1;
|
|
9
|
+
|
|
10
|
+
var formats = /*@__PURE__*/ requireFormats();
|
|
11
|
+
|
|
12
|
+
var has = Object.prototype.hasOwnProperty;
|
|
13
|
+
var isArray = Array.isArray;
|
|
14
|
+
|
|
15
|
+
var hexTable = (function () {
|
|
16
|
+
var array = [];
|
|
17
|
+
for (var i = 0; i < 256; ++i) {
|
|
18
|
+
array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return array;
|
|
22
|
+
}());
|
|
23
|
+
|
|
24
|
+
var compactQueue = function compactQueue(queue) {
|
|
25
|
+
while (queue.length > 1) {
|
|
26
|
+
var item = queue.pop();
|
|
27
|
+
var obj = item.obj[item.prop];
|
|
28
|
+
|
|
29
|
+
if (isArray(obj)) {
|
|
30
|
+
var compacted = [];
|
|
31
|
+
|
|
32
|
+
for (var j = 0; j < obj.length; ++j) {
|
|
33
|
+
if (typeof obj[j] !== 'undefined') {
|
|
34
|
+
compacted.push(obj[j]);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
item.obj[item.prop] = compacted;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
var arrayToObject = function arrayToObject(source, options) {
|
|
44
|
+
var obj = options && options.plainObjects ? { __proto__: null } : {};
|
|
45
|
+
for (var i = 0; i < source.length; ++i) {
|
|
46
|
+
if (typeof source[i] !== 'undefined') {
|
|
47
|
+
obj[i] = source[i];
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return obj;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
var merge = function merge(target, source, options) {
|
|
55
|
+
/* eslint no-param-reassign: 0 */
|
|
56
|
+
if (!source) {
|
|
57
|
+
return target;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (typeof source !== 'object' && typeof source !== 'function') {
|
|
61
|
+
if (isArray(target)) {
|
|
62
|
+
target.push(source);
|
|
63
|
+
} else if (target && typeof target === 'object') {
|
|
64
|
+
if (
|
|
65
|
+
(options && (options.plainObjects || options.allowPrototypes))
|
|
66
|
+
|| !has.call(Object.prototype, source)
|
|
67
|
+
) {
|
|
68
|
+
target[source] = true;
|
|
69
|
+
}
|
|
70
|
+
} else {
|
|
71
|
+
return [target, source];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return target;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (!target || typeof target !== 'object') {
|
|
78
|
+
return [target].concat(source);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
var mergeTarget = target;
|
|
82
|
+
if (isArray(target) && !isArray(source)) {
|
|
83
|
+
mergeTarget = arrayToObject(target, options);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (isArray(target) && isArray(source)) {
|
|
87
|
+
source.forEach(function (item, i) {
|
|
88
|
+
if (has.call(target, i)) {
|
|
89
|
+
var targetItem = target[i];
|
|
90
|
+
if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
|
|
91
|
+
target[i] = merge(targetItem, item, options);
|
|
92
|
+
} else {
|
|
93
|
+
target.push(item);
|
|
94
|
+
}
|
|
95
|
+
} else {
|
|
96
|
+
target[i] = item;
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
return target;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return Object.keys(source).reduce(function (acc, key) {
|
|
103
|
+
var value = source[key];
|
|
104
|
+
|
|
105
|
+
if (has.call(acc, key)) {
|
|
106
|
+
acc[key] = merge(acc[key], value, options);
|
|
107
|
+
} else {
|
|
108
|
+
acc[key] = value;
|
|
109
|
+
}
|
|
110
|
+
return acc;
|
|
111
|
+
}, mergeTarget);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
var assign = function assignSingleSource(target, source) {
|
|
115
|
+
return Object.keys(source).reduce(function (acc, key) {
|
|
116
|
+
acc[key] = source[key];
|
|
117
|
+
return acc;
|
|
118
|
+
}, target);
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
var decode = function (str, defaultDecoder, charset) {
|
|
122
|
+
var strWithoutPlus = str.replace(/\+/g, ' ');
|
|
123
|
+
if (charset === 'iso-8859-1') {
|
|
124
|
+
// unescape never throws, no try...catch needed:
|
|
125
|
+
return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
126
|
+
}
|
|
127
|
+
// utf-8
|
|
128
|
+
try {
|
|
129
|
+
return decodeURIComponent(strWithoutPlus);
|
|
130
|
+
} catch (e) {
|
|
131
|
+
return strWithoutPlus;
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
var limit = 1024;
|
|
136
|
+
|
|
137
|
+
/* eslint operator-linebreak: [2, "before"] */
|
|
138
|
+
|
|
139
|
+
var encode = function encode(str, defaultEncoder, charset, kind, format) {
|
|
140
|
+
// This code was originally written by Brian White (mscdex) for the io.js core querystring library.
|
|
141
|
+
// It has been adapted here for stricter adherence to RFC 3986
|
|
142
|
+
if (str.length === 0) {
|
|
143
|
+
return str;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
var string = str;
|
|
147
|
+
if (typeof str === 'symbol') {
|
|
148
|
+
string = Symbol.prototype.toString.call(str);
|
|
149
|
+
} else if (typeof str !== 'string') {
|
|
150
|
+
string = String(str);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
if (charset === 'iso-8859-1') {
|
|
154
|
+
return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
|
|
155
|
+
return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
var out = '';
|
|
160
|
+
for (var j = 0; j < string.length; j += limit) {
|
|
161
|
+
var segment = string.length >= limit ? string.slice(j, j + limit) : string;
|
|
162
|
+
var arr = [];
|
|
163
|
+
|
|
164
|
+
for (var i = 0; i < segment.length; ++i) {
|
|
165
|
+
var c = segment.charCodeAt(i);
|
|
166
|
+
if (
|
|
167
|
+
c === 0x2D // -
|
|
168
|
+
|| c === 0x2E // .
|
|
169
|
+
|| c === 0x5F // _
|
|
170
|
+
|| c === 0x7E // ~
|
|
171
|
+
|| (c >= 0x30 && c <= 0x39) // 0-9
|
|
172
|
+
|| (c >= 0x41 && c <= 0x5A) // a-z
|
|
173
|
+
|| (c >= 0x61 && c <= 0x7A) // A-Z
|
|
174
|
+
|| (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
|
|
175
|
+
) {
|
|
176
|
+
arr[arr.length] = segment.charAt(i);
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
if (c < 0x80) {
|
|
181
|
+
arr[arr.length] = hexTable[c];
|
|
182
|
+
continue;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
if (c < 0x800) {
|
|
186
|
+
arr[arr.length] = hexTable[0xC0 | (c >> 6)]
|
|
187
|
+
+ hexTable[0x80 | (c & 0x3F)];
|
|
188
|
+
continue;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
if (c < 0xD800 || c >= 0xE000) {
|
|
192
|
+
arr[arr.length] = hexTable[0xE0 | (c >> 12)]
|
|
193
|
+
+ hexTable[0x80 | ((c >> 6) & 0x3F)]
|
|
194
|
+
+ hexTable[0x80 | (c & 0x3F)];
|
|
195
|
+
continue;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
i += 1;
|
|
199
|
+
c = 0x10000 + (((c & 0x3FF) << 10) | (segment.charCodeAt(i) & 0x3FF));
|
|
200
|
+
|
|
201
|
+
arr[arr.length] = hexTable[0xF0 | (c >> 18)]
|
|
202
|
+
+ hexTable[0x80 | ((c >> 12) & 0x3F)]
|
|
203
|
+
+ hexTable[0x80 | ((c >> 6) & 0x3F)]
|
|
204
|
+
+ hexTable[0x80 | (c & 0x3F)];
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
out += arr.join('');
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
return out;
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
var compact = function compact(value) {
|
|
214
|
+
var queue = [{ obj: { o: value }, prop: 'o' }];
|
|
215
|
+
var refs = [];
|
|
216
|
+
|
|
217
|
+
for (var i = 0; i < queue.length; ++i) {
|
|
218
|
+
var item = queue[i];
|
|
219
|
+
var obj = item.obj[item.prop];
|
|
220
|
+
|
|
221
|
+
var keys = Object.keys(obj);
|
|
222
|
+
for (var j = 0; j < keys.length; ++j) {
|
|
223
|
+
var key = keys[j];
|
|
224
|
+
var val = obj[key];
|
|
225
|
+
if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
|
|
226
|
+
queue.push({ obj: obj, prop: key });
|
|
227
|
+
refs.push(val);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
compactQueue(queue);
|
|
233
|
+
|
|
234
|
+
return value;
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
var isRegExp = function isRegExp(obj) {
|
|
238
|
+
return Object.prototype.toString.call(obj) === '[object RegExp]';
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
var isBuffer = function isBuffer(obj) {
|
|
242
|
+
if (!obj || typeof obj !== 'object') {
|
|
243
|
+
return false;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
var combine = function combine(a, b) {
|
|
250
|
+
return [].concat(a, b);
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
var maybeMap = function maybeMap(val, fn) {
|
|
254
|
+
if (isArray(val)) {
|
|
255
|
+
var mapped = [];
|
|
256
|
+
for (var i = 0; i < val.length; i += 1) {
|
|
257
|
+
mapped.push(fn(val[i]));
|
|
258
|
+
}
|
|
259
|
+
return mapped;
|
|
260
|
+
}
|
|
261
|
+
return fn(val);
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
utils = {
|
|
265
|
+
arrayToObject: arrayToObject,
|
|
266
|
+
assign: assign,
|
|
267
|
+
combine: combine,
|
|
268
|
+
compact: compact,
|
|
269
|
+
decode: decode,
|
|
270
|
+
encode: encode,
|
|
271
|
+
isBuffer: isBuffer,
|
|
272
|
+
isRegExp: isRegExp,
|
|
273
|
+
maybeMap: maybeMap,
|
|
274
|
+
merge: merge
|
|
275
|
+
};
|
|
276
|
+
return utils;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export { requireUtils as __require };
|