openportal 0.1.1 → 0.1.3

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 (182) hide show
  1. package/README.md +113 -0
  2. package/package.json +1 -1
  3. package/web/.next/static/{A7pW-dtFIbPCSkvE8uenX → Im7EdK1Q3oOmTznohTOr5}/_buildManifest.js +4 -9
  4. package/web/.next/static/chunks/{2e7bfb90c343ca96.js → 35cc9dbdc670c73c.js} +4 -4
  5. package/web/.next/static/chunks/4147ffc67a7b837c.css +1 -0
  6. package/web/.next/static/chunks/{21ab2574b84ad2d1.js → 52b90bc1740162c2.js} +2 -2
  7. package/web/.next/static/chunks/{9b265e2198b5525f.js → 8644d68bf325ff24.js} +3 -3
  8. package/web/.next/static/chunks/{03e1846335a31354.js → 9865709466b09f79.js} +3 -3
  9. package/web/.next/static/chunks/{c20ae04df8cc28be.js → 9ba9a5774c9421bd.js} +3 -3
  10. package/web/.next/static/chunks/{967a1e0002fe9ae6.js → b5caad256518cb33.js} +3 -3
  11. package/web/.next/static/chunks/{turbopack-27558c851386934e.js → turbopack-26af71e419c11487.js} +1 -1
  12. package/web/.next/static/chunks/{turbopack-f4c0881f9723f5a5.js → turbopack-4ad0df7330c00c8d.js} +1 -1
  13. package/web/.next/static/chunks/{turbopack-26688626142ac58f.js → turbopack-8e653f3ad3a8ed18.js} +1 -1
  14. package/web/.next/static/chunks/{turbopack-c40ec6674624f1d7.js → turbopack-d5098189d63fd7b8.js} +1 -1
  15. package/web/apps/web/.next/BUILD_ID +1 -1
  16. package/web/apps/web/.next/build-manifest.json +14 -24
  17. package/web/apps/web/.next/routes-manifest.json +0 -12
  18. package/web/apps/web/.next/server/chunks/[root-of-the-server]__f366ca98._.js +358 -0
  19. package/web/apps/web/.next/server/chunks/ssr/{[root-of-the-server]__dfeaf8cf._.js → [root-of-the-server]__1a54ba1e._.js} +3 -3
  20. package/web/apps/web/.next/server/middleware-build-manifest.js +12 -22
  21. package/web/apps/web/.next/server/next-font-manifest.js +1 -1
  22. package/web/apps/web/.next/server/next-font-manifest.json +0 -4
  23. package/web/apps/web/.next/server/pages/404.html +1 -1
  24. package/web/apps/web/.next/server/pages/500.html +1 -1
  25. package/web/apps/web/.next/server/pages/_app/build-manifest.json +3 -3
  26. package/web/apps/web/.next/server/pages/_app/client-build-manifest.json +1 -1
  27. package/web/apps/web/.next/server/pages/api/[[...slugs]].js +1 -2
  28. package/web/apps/web/.next/server/pages/api/[[...slugs]].js.nft.json +1 -1
  29. package/web/apps/web/.next/server/pages/index/build-manifest.json +3 -3
  30. package/web/apps/web/.next/server/pages/index/client-build-manifest.json +1 -1
  31. package/web/apps/web/.next/server/pages/index.html +1 -1
  32. package/web/apps/web/.next/server/pages/index.js.nft.json +1 -1
  33. package/web/apps/web/.next/server/pages/session/[id]/build-manifest.json +4 -4
  34. package/web/apps/web/.next/server/pages/session/[id]/client-build-manifest.json +1 -1
  35. package/web/apps/web/.next/server/pages/session/[id].html +1 -1
  36. package/web/apps/web/.next/server/pages/session/[id].js.nft.json +1 -1
  37. package/web/apps/web/.next/server/pages/settings/build-manifest.json +3 -3
  38. package/web/apps/web/.next/server/pages/settings/client-build-manifest.json +1 -1
  39. package/web/apps/web/.next/server/pages/settings.html +1 -1
  40. package/web/apps/web/.next/server/pages/settings.js.nft.json +1 -1
  41. package/web/apps/web/.next/server/pages-manifest.json +0 -2
  42. package/web/apps/web/package.json +1 -9
  43. package/web/.next/static/chunks/04d4692d75696297.css +0 -1
  44. package/web/.next/static/chunks/553710f60e2f2b11.js +0 -1
  45. package/web/.next/static/chunks/58acbbb4090e3362.js +0 -3
  46. package/web/.next/static/chunks/6ce1e2f08f961db5.js +0 -2
  47. package/web/.next/static/chunks/d316d63225992c76.js +0 -10
  48. package/web/.next/static/chunks/e0c97552ba7a9e3d.js +0 -1
  49. package/web/.next/static/chunks/fc9c4f2dabfb4e0e.css +0 -1
  50. package/web/.next/static/chunks/turbopack-1837909a677d116b.js +0 -3
  51. package/web/apps/web/.next/server/chunks/[root-of-the-server]__0f75905d._.js +0 -3
  52. package/web/apps/web/.next/server/chunks/[root-of-the-server]__89e85365._.js +0 -358
  53. package/web/apps/web/.next/server/chunks/[root-of-the-server]__ae1361d0._.js +0 -3
  54. package/web/apps/web/.next/server/pages/api/terminal/ws/pages-manifest.json +0 -3
  55. package/web/apps/web/.next/server/pages/api/terminal/ws.js +0 -5
  56. package/web/apps/web/.next/server/pages/api/terminal/ws.js.map +0 -5
  57. package/web/apps/web/.next/server/pages/api/terminal/ws.js.nft.json +0 -1
  58. package/web/apps/web/.next/server/pages/terminal/build-manifest.json +0 -20
  59. package/web/apps/web/.next/server/pages/terminal/client-build-manifest.json +0 -5
  60. package/web/apps/web/.next/server/pages/terminal/next-font-manifest.json +0 -11
  61. package/web/apps/web/.next/server/pages/terminal/pages-manifest.json +0 -3
  62. package/web/apps/web/.next/server/pages/terminal/react-loadable-manifest.json +0 -1
  63. package/web/apps/web/.next/server/pages/terminal.html +0 -1
  64. package/web/apps/web/.next/server/pages/terminal.js.map +0 -5
  65. package/web/apps/web/.next/server/pages/terminal.js.nft.json +0 -1
  66. package/web/node_modules/.bun/@socket.io+component-emitter@3.1.2/node_modules/@socket.io/component-emitter/lib/cjs/index.js +0 -176
  67. package/web/node_modules/.bun/@socket.io+component-emitter@3.1.2/node_modules/@socket.io/component-emitter/lib/cjs/package.json +0 -4
  68. package/web/node_modules/.bun/@socket.io+component-emitter@3.1.2/node_modules/@socket.io/component-emitter/package.json +0 -28
  69. package/web/node_modules/.bun/accepts@1.3.8/node_modules/accepts/index.js +0 -238
  70. package/web/node_modules/.bun/accepts@1.3.8/node_modules/accepts/package.json +0 -47
  71. package/web/node_modules/.bun/base64id@2.0.0/node_modules/base64id/lib/base64id.js +0 -103
  72. package/web/node_modules/.bun/base64id@2.0.0/node_modules/base64id/package.json +0 -13
  73. package/web/node_modules/.bun/cookie@0.7.2/node_modules/cookie/index.js +0 -335
  74. package/web/node_modules/.bun/cookie@0.7.2/node_modules/cookie/package.json +0 -44
  75. package/web/node_modules/.bun/cookie@1.1.1/node_modules/cookie/package.json +0 -47
  76. package/web/node_modules/.bun/cors@2.8.5/node_modules/cors/lib/index.js +0 -238
  77. package/web/node_modules/.bun/cors@2.8.5/node_modules/cors/package.json +0 -41
  78. package/web/node_modules/.bun/debug@4.3.7/node_modules/debug/package.json +0 -60
  79. package/web/node_modules/.bun/debug@4.3.7/node_modules/debug/src/browser.js +0 -271
  80. package/web/node_modules/.bun/debug@4.3.7/node_modules/debug/src/common.js +0 -274
  81. package/web/node_modules/.bun/debug@4.3.7/node_modules/debug/src/index.js +0 -10
  82. package/web/node_modules/.bun/debug@4.3.7/node_modules/debug/src/node.js +0 -263
  83. package/web/node_modules/.bun/engine.io-parser@5.2.3/node_modules/engine.io-parser/build/cjs/commons.js +0 -19
  84. package/web/node_modules/.bun/engine.io-parser@5.2.3/node_modules/engine.io-parser/build/cjs/decodePacket.js +0 -59
  85. package/web/node_modules/.bun/engine.io-parser@5.2.3/node_modules/engine.io-parser/build/cjs/encodePacket.js +0 -38
  86. package/web/node_modules/.bun/engine.io-parser@5.2.3/node_modules/engine.io-parser/build/cjs/index.js +0 -164
  87. package/web/node_modules/.bun/engine.io-parser@5.2.3/node_modules/engine.io-parser/build/cjs/package.json +0 -8
  88. package/web/node_modules/.bun/engine.io-parser@5.2.3/node_modules/engine.io-parser/package.json +0 -46
  89. package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/engine.io.js +0 -54
  90. package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/parser-v3/index.js +0 -424
  91. package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/parser-v3/utf8.js +0 -187
  92. package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/server.js +0 -786
  93. package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/socket.js +0 -460
  94. package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/transport.js +0 -117
  95. package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/transports/index.js +0 -23
  96. package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/transports/polling-jsonp.js +0 -41
  97. package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/transports/polling.js +0 -332
  98. package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/transports/websocket.js +0 -94
  99. package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/transports/webtransport.js +0 -63
  100. package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/transports-uws/index.js +0 -8
  101. package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/transports-uws/polling.js +0 -364
  102. package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/transports-uws/websocket.js +0 -73
  103. package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/userver.js +0 -279
  104. package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/package.json +0 -70
  105. package/web/node_modules/.bun/has-flag@4.0.0/node_modules/has-flag/index.js +0 -8
  106. package/web/node_modules/.bun/has-flag@4.0.0/node_modules/has-flag/package.json +0 -46
  107. package/web/node_modules/.bun/mime-db@1.52.0/node_modules/mime-db/db.json +0 -8519
  108. package/web/node_modules/.bun/mime-db@1.52.0/node_modules/mime-db/index.js +0 -12
  109. package/web/node_modules/.bun/mime-db@1.52.0/node_modules/mime-db/package.json +0 -60
  110. package/web/node_modules/.bun/mime-types@2.1.35/node_modules/mime-types/index.js +0 -188
  111. package/web/node_modules/.bun/mime-types@2.1.35/node_modules/mime-types/package.json +0 -44
  112. package/web/node_modules/.bun/ms@2.1.3/node_modules/ms/index.js +0 -162
  113. package/web/node_modules/.bun/ms@2.1.3/node_modules/ms/package.json +0 -38
  114. package/web/node_modules/.bun/negotiator@0.6.3/node_modules/negotiator/index.js +0 -82
  115. package/web/node_modules/.bun/negotiator@0.6.3/node_modules/negotiator/lib/charset.js +0 -169
  116. package/web/node_modules/.bun/negotiator@0.6.3/node_modules/negotiator/lib/encoding.js +0 -184
  117. package/web/node_modules/.bun/negotiator@0.6.3/node_modules/negotiator/lib/language.js +0 -179
  118. package/web/node_modules/.bun/negotiator@0.6.3/node_modules/negotiator/lib/mediaType.js +0 -294
  119. package/web/node_modules/.bun/negotiator@0.6.3/node_modules/negotiator/package.json +0 -42
  120. package/web/node_modules/.bun/object-assign@4.1.1/node_modules/object-assign/index.js +0 -90
  121. package/web/node_modules/.bun/object-assign@4.1.1/node_modules/object-assign/package.json +0 -42
  122. package/web/node_modules/.bun/socket.io-adapter@2.5.5/node_modules/socket.io-adapter/dist/cluster-adapter.js +0 -674
  123. package/web/node_modules/.bun/socket.io-adapter@2.5.5/node_modules/socket.io-adapter/dist/contrib/yeast.js +0 -55
  124. package/web/node_modules/.bun/socket.io-adapter@2.5.5/node_modules/socket.io-adapter/dist/in-memory-adapter.js +0 -394
  125. package/web/node_modules/.bun/socket.io-adapter@2.5.5/node_modules/socket.io-adapter/dist/index.js +0 -10
  126. package/web/node_modules/.bun/socket.io-adapter@2.5.5/node_modules/socket.io-adapter/package.json +0 -39
  127. package/web/node_modules/.bun/socket.io-parser@4.2.4/node_modules/socket.io-parser/build/cjs/binary.js +0 -88
  128. package/web/node_modules/.bun/socket.io-parser@4.2.4/node_modules/socket.io-parser/build/cjs/index.js +0 -321
  129. package/web/node_modules/.bun/socket.io-parser@4.2.4/node_modules/socket.io-parser/build/cjs/is-binary.js +0 -55
  130. package/web/node_modules/.bun/socket.io-parser@4.2.4/node_modules/socket.io-parser/build/cjs/package.json +0 -3
  131. package/web/node_modules/.bun/socket.io-parser@4.2.4/node_modules/socket.io-parser/package.json +0 -58
  132. package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/client-dist/socket.io.esm.min.js +0 -7
  133. package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/client-dist/socket.io.js +0 -4908
  134. package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/client-dist/socket.io.min.js +0 -7
  135. package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/client-dist/socket.io.msgpack.min.js +0 -7
  136. package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/dist/broadcast-operator.js +0 -436
  137. package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/dist/client.js +0 -268
  138. package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/dist/index.js +0 -804
  139. package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/dist/namespace.js +0 -581
  140. package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/dist/parent-namespace.js +0 -88
  141. package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/dist/socket-types.js +0 -11
  142. package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/dist/socket.js +0 -977
  143. package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/dist/typed-events.js +0 -81
  144. package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/dist/uws.js +0 -136
  145. package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/package.json +0 -85
  146. package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/wrapper.mjs +0 -3
  147. package/web/node_modules/.bun/supports-color@7.2.0/node_modules/supports-color/index.js +0 -135
  148. package/web/node_modules/.bun/supports-color@7.2.0/node_modules/supports-color/package.json +0 -53
  149. package/web/node_modules/.bun/vary@1.1.2/node_modules/vary/index.js +0 -149
  150. package/web/node_modules/.bun/vary@1.1.2/node_modules/vary/package.json +0 -43
  151. package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/index.js +0 -13
  152. package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/lib/buffer-util.js +0 -131
  153. package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/lib/constants.js +0 -12
  154. package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/lib/event-target.js +0 -292
  155. package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/lib/extension.js +0 -203
  156. package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/lib/limiter.js +0 -55
  157. package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/lib/permessage-deflate.js +0 -514
  158. package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/lib/receiver.js +0 -704
  159. package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/lib/sender.js +0 -497
  160. package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/lib/stream.js +0 -159
  161. package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/lib/subprotocol.js +0 -62
  162. package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/lib/validation.js +0 -130
  163. package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/lib/websocket-server.js +0 -540
  164. package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/lib/websocket.js +0 -1338
  165. package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/package.json +0 -69
  166. package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/lib/buffer-util.js +0 -131
  167. package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/lib/constants.js +0 -18
  168. package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/lib/event-target.js +0 -292
  169. package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/lib/extension.js +0 -203
  170. package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/lib/limiter.js +0 -55
  171. package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/lib/permessage-deflate.js +0 -528
  172. package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/lib/receiver.js +0 -706
  173. package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/lib/sender.js +0 -602
  174. package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/lib/stream.js +0 -161
  175. package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/lib/subprotocol.js +0 -62
  176. package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/lib/validation.js +0 -152
  177. package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/lib/websocket-server.js +0 -550
  178. package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/lib/websocket.js +0 -1388
  179. package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/package.json +0 -69
  180. package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/wrapper.mjs +0 -8
  181. /package/web/.next/static/{A7pW-dtFIbPCSkvE8uenX → Im7EdK1Q3oOmTznohTOr5}/_clientMiddlewareManifest.json +0 -0
  182. /package/web/.next/static/{A7pW-dtFIbPCSkvE8uenX → Im7EdK1Q3oOmTznohTOr5}/_ssgManifest.js +0 -0
@@ -1,7 +0,0 @@
1
- /*!
2
- * Socket.IO v4.8.1
3
- * (c) 2014-2024 Guillermo Rauch
4
- * Released under the MIT License.
5
- */
6
- !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t="undefined"!=typeof globalThis?globalThis:t||self).io=n()}(this,(function(){"use strict";function t(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,r=Array(n);i<n;i++)r[i]=t[i];return r}function n(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,f(r.key),r)}}function i(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function r(n,i){var r="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!r){if(Array.isArray(n)||(r=function(n,i){if(n){if("string"==typeof n)return t(n,i);var r={}.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(n,i):void 0}}(n))||i&&n&&"number"==typeof n.length){r&&(n=r);var e=0,o=function(){};return{s:o,n:function(){return e>=n.length?{done:!0}:{done:!1,value:n[e++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,u=!0,h=!1;return{s:function(){r=r.call(n)},n:function(){var t=r.next();return u=t.done,t},e:function(t){h=!0,s=t},f:function(){try{u||null==r.return||r.return()}finally{if(h)throw s}}}}function e(){return e=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var r in i)({}).hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},e.apply(null,arguments)}function o(t){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},o(t)}function s(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n)}function u(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(u=function(){return!!t})()}function h(t,n){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},h(t,n)}function f(t){var n=function(t,n){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==typeof n?n:n+""}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function a(t){var n="function"==typeof Map?new Map:void 0;return a=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(n){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,i)}function i(){return function(t,n,i){if(u())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,n);var e=new(t.bind.apply(t,r));return i&&h(e,i.prototype),e}(t,arguments,o(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),h(i,t)},a(t)}var v=Object.create(null);v.open="0",v.close="1",v.ping="2",v.pong="3",v.message="4",v.upgrade="5",v.noop="6";var l=Object.create(null);Object.keys(v).forEach((function(t){l[v[t]]=t}));var p,d={type:"error",data:"parser error"},y="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),b="function"==typeof ArrayBuffer,w=function(t){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer},g=function(t,n,i){var r=t.type,e=t.data;return y&&e instanceof Blob?n?i(e):m(e,i):b&&(e instanceof ArrayBuffer||w(e))?n?i(e):m(new Blob([e]),i):i(v[r]+(e||""))},m=function(t,n){var i=new FileReader;return i.onload=function(){var t=i.result.split(",")[1];n("b"+(t||""))},i.readAsDataURL(t)};function k(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}for(var A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",j="undefined"==typeof Uint8Array?[]:new Uint8Array(256),E=0;E<64;E++)j[A.charCodeAt(E)]=E;var O,B="function"==typeof ArrayBuffer,S=function(t,n){if("string"!=typeof t)return{type:"message",data:C(t,n)};var i=t.charAt(0);return"b"===i?{type:"message",data:N(t.substring(1),n)}:l[i]?t.length>1?{type:l[i],data:t.substring(1)}:{type:l[i]}:d},N=function(t,n){if(B){var i=function(t){var n,i,r,e,o,s=.75*t.length,u=t.length,h=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var f=new ArrayBuffer(s),c=new Uint8Array(f);for(n=0;n<u;n+=4)i=j[t.charCodeAt(n)],r=j[t.charCodeAt(n+1)],e=j[t.charCodeAt(n+2)],o=j[t.charCodeAt(n+3)],c[h++]=i<<2|r>>4,c[h++]=(15&r)<<4|e>>2,c[h++]=(3&e)<<6|63&o;return f}(t);return C(i,n)}return{base64:!0,data:t}},C=function(t,n){return"blob"===n?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer},T=String.fromCharCode(30);function U(){return new TransformStream({transform:function(t,n){!function(t,n){y&&t.data instanceof Blob?t.data.arrayBuffer().then(k).then(n):b&&(t.data instanceof ArrayBuffer||w(t.data))?n(k(t.data)):g(t,!1,(function(t){p||(p=new TextEncoder),n(p.encode(t))}))}(t,(function(i){var r,e=i.length;if(e<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,e);else if(e<65536){r=new Uint8Array(3);var o=new DataView(r.buffer);o.setUint8(0,126),o.setUint16(1,e)}else{r=new Uint8Array(9);var s=new DataView(r.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(e))}t.data&&"string"!=typeof t.data&&(r[0]|=128),n.enqueue(r),n.enqueue(i)}))}})}function M(t){return t.reduce((function(t,n){return t+n.length}),0)}function x(t,n){if(t[0].length===n)return t.shift();for(var i=new Uint8Array(n),r=0,e=0;e<n;e++)i[e]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),i}function I(t){if(t)return function(t){for(var n in I.prototype)t[n]=I.prototype[n];return t}(t)}I.prototype.on=I.prototype.addEventListener=function(t,n){return this.t=this.t||{},(this.t["$"+t]=this.t["$"+t]||[]).push(n),this},I.prototype.once=function(t,n){function i(){this.off(t,i),n.apply(this,arguments)}return i.fn=n,this.on(t,i),this},I.prototype.off=I.prototype.removeListener=I.prototype.removeAllListeners=I.prototype.removeEventListener=function(t,n){if(this.t=this.t||{},0==arguments.length)return this.t={},this;var i,r=this.t["$"+t];if(!r)return this;if(1==arguments.length)return delete this.t["$"+t],this;for(var e=0;e<r.length;e++)if((i=r[e])===n||i.fn===n){r.splice(e,1);break}return 0===r.length&&delete this.t["$"+t],this},I.prototype.emit=function(t){this.t=this.t||{};for(var n=new Array(arguments.length-1),i=this.t["$"+t],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(i){r=0;for(var e=(i=i.slice(0)).length;r<e;++r)i[r].apply(this,n)}return this},I.prototype.emitReserved=I.prototype.emit,I.prototype.listeners=function(t){return this.t=this.t||{},this.t["$"+t]||[]},I.prototype.hasListeners=function(t){return!!this.listeners(t).length};var R="function"==typeof Promise&&"function"==typeof Promise.resolve?function(t){return Promise.resolve().then(t)}:function(t,n){return n(t,0)},L="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function _(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return i.reduce((function(n,i){return t.hasOwnProperty(i)&&(n[i]=t[i]),n}),{})}var D=L.setTimeout,P=L.clearTimeout;function $(t,n){n.useNativeTimers?(t.setTimeoutFn=D.bind(L),t.clearTimeoutFn=P.bind(L)):(t.setTimeoutFn=L.setTimeout.bind(L),t.clearTimeoutFn=L.clearTimeout.bind(L))}function F(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}var V=function(t){function n(n,i,r){var e;return(e=t.call(this,n)||this).description=i,e.context=r,e.type="TransportError",e}return s(n,t),n}(a(Error)),q=function(t){function n(n){var i;return(i=t.call(this)||this).writable=!1,$(i,n),i.opts=n,i.query=n.query,i.socket=n.socket,i.supportsBinary=!n.forceBase64,i}s(n,t);var i=n.prototype;return i.onError=function(n,i,r){return t.prototype.emitReserved.call(this,"error",new V(n,i,r)),this},i.open=function(){return this.readyState="opening",this.doOpen(),this},i.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},i.send=function(t){"open"===this.readyState&&this.write(t)},i.onOpen=function(){this.readyState="open",this.writable=!0,t.prototype.emitReserved.call(this,"open")},i.onData=function(t){var n=S(t,this.socket.binaryType);this.onPacket(n)},i.onPacket=function(n){t.prototype.emitReserved.call(this,"packet",n)},i.onClose=function(n){this.readyState="closed",t.prototype.emitReserved.call(this,"close",n)},i.pause=function(t){},i.createUri=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t+"://"+this.i()+this.o()+this.opts.path+this.u(n)},i.i=function(){var t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"},i.o=function(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""},i.u=function(t){var n=function(t){var n="";for(var i in t)t.hasOwnProperty(i)&&(n.length&&(n+="&"),n+=encodeURIComponent(i)+"="+encodeURIComponent(t[i]));return n}(t);return n.length?"?"+n:""},n}(I),X=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).h=!1,n}s(n,t);var r=n.prototype;return r.doOpen=function(){this.v()},r.pause=function(t){var n=this;this.readyState="pausing";var i=function(){n.readyState="paused",t()};if(this.h||!this.writable){var r=0;this.h&&(r++,this.once("pollComplete",(function(){--r||i()}))),this.writable||(r++,this.once("drain",(function(){--r||i()})))}else i()},r.v=function(){this.h=!0,this.doPoll(),this.emitReserved("poll")},r.onData=function(t){var n=this;(function(t,n){for(var i=t.split(T),r=[],e=0;e<i.length;e++){var o=S(i[e],n);if(r.push(o),"error"===o.type)break}return r})(t,this.socket.binaryType).forEach((function(t){if("opening"===n.readyState&&"open"===t.type&&n.onOpen(),"close"===t.type)return n.onClose({description:"transport closed by the server"}),!1;n.onPacket(t)})),"closed"!==this.readyState&&(this.h=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.v())},r.doClose=function(){var t=this,n=function(){t.write([{type:"close"}])};"open"===this.readyState?n():this.once("open",n)},r.write=function(t){var n=this;this.writable=!1,function(t,n){var i=t.length,r=new Array(i),e=0;t.forEach((function(t,o){g(t,!1,(function(t){r[o]=t,++e===i&&n(r.join(T))}))}))}(t,(function(t){n.doWrite(t,(function(){n.writable=!0,n.emitReserved("drain")}))}))},r.uri=function(){var t=this.opts.secure?"https":"http",n=this.query||{};return!1!==this.opts.timestampRequests&&(n[this.opts.timestampParam]=F()),this.supportsBinary||n.sid||(n.b64=1),this.createUri(t,n)},i(n,[{key:"name",get:function(){return"polling"}}])}(q),H=!1;try{H="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}var z=H;function J(){}var K=function(t){function n(n){var i;if(i=t.call(this,n)||this,"undefined"!=typeof location){var r="https:"===location.protocol,e=location.port;e||(e=r?"443":"80"),i.xd="undefined"!=typeof location&&n.hostname!==location.hostname||e!==n.port}return i}s(n,t);var i=n.prototype;return i.doWrite=function(t,n){var i=this,r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(function(t,n){i.onError("xhr post error",t,n)}))},i.doPoll=function(){var t=this,n=this.request();n.on("data",this.onData.bind(this)),n.on("error",(function(n,i){t.onError("xhr poll error",n,i)})),this.pollXhr=n},n}(X),Y=function(t){function n(n,i,r){var e;return(e=t.call(this)||this).createRequest=n,$(e,r),e.l=r,e.p=r.method||"GET",e.m=i,e.k=void 0!==r.data?r.data:null,e.A(),e}s(n,t);var i=n.prototype;return i.A=function(){var t,i=this,r=_(this.l,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this.l.xd;var e=this.j=this.createRequest(r);try{e.open(this.p,this.m,!0);try{if(this.l.extraHeaders)for(var o in e.setDisableHeaderCheck&&e.setDisableHeaderCheck(!0),this.l.extraHeaders)this.l.extraHeaders.hasOwnProperty(o)&&e.setRequestHeader(o,this.l.extraHeaders[o])}catch(t){}if("POST"===this.p)try{e.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{e.setRequestHeader("Accept","*/*")}catch(t){}null===(t=this.l.cookieJar)||void 0===t||t.addCookies(e),"withCredentials"in e&&(e.withCredentials=this.l.withCredentials),this.l.requestTimeout&&(e.timeout=this.l.requestTimeout),e.onreadystatechange=function(){var t;3===e.readyState&&(null===(t=i.l.cookieJar)||void 0===t||t.parseCookies(e.getResponseHeader("set-cookie"))),4===e.readyState&&(200===e.status||1223===e.status?i.O():i.setTimeoutFn((function(){i.B("number"==typeof e.status?e.status:0)}),0))},e.send(this.k)}catch(t){return void this.setTimeoutFn((function(){i.B(t)}),0)}"undefined"!=typeof document&&(this.S=n.requestsCount++,n.requests[this.S]=this)},i.B=function(t){this.emitReserved("error",t,this.j),this.N(!0)},i.N=function(t){if(void 0!==this.j&&null!==this.j){if(this.j.onreadystatechange=J,t)try{this.j.abort()}catch(t){}"undefined"!=typeof document&&delete n.requests[this.S],this.j=null}},i.O=function(){var t=this.j.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.N())},i.abort=function(){this.N()},n}(I);if(Y.requestsCount=0,Y.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",G);else if("function"==typeof addEventListener){addEventListener("onpagehide"in L?"pagehide":"unload",G,!1)}function G(){for(var t in Y.requests)Y.requests.hasOwnProperty(t)&&Y.requests[t].abort()}var Q,W=(Q=tt({xdomain:!1}))&&null!==Q.responseType,Z=function(t){function n(n){var i;i=t.call(this,n)||this;var r=n&&n.forceBase64;return i.supportsBinary=W&&!r,i}return s(n,t),n.prototype.request=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e(t,{xd:this.xd},this.opts),new Y(tt,this.uri(),t)},n}(K);function tt(t){var n=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!n||z))return new XMLHttpRequest}catch(t){}if(!n)try{return new(L[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}var nt="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),it=function(t){function n(){return t.apply(this,arguments)||this}s(n,t);var r=n.prototype;return r.doOpen=function(){var t=this.uri(),n=this.opts.protocols,i=nt?{}:_(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,i)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()},r.addEventListeners=function(){var t=this;this.ws.onopen=function(){t.opts.autoUnref&&t.ws.C.unref(),t.onOpen()},this.ws.onclose=function(n){return t.onClose({description:"websocket connection closed",context:n})},this.ws.onmessage=function(n){return t.onData(n.data)},this.ws.onerror=function(n){return t.onError("websocket error",n)}},r.write=function(t){var n=this;this.writable=!1;for(var i=function(){var i=t[r],e=r===t.length-1;g(i,n.supportsBinary,(function(t){try{n.doWrite(i,t)}catch(t){}e&&R((function(){n.writable=!0,n.emitReserved("drain")}),n.setTimeoutFn)}))},r=0;r<t.length;r++)i()},r.doClose=function(){void 0!==this.ws&&(this.ws.onerror=function(){},this.ws.close(),this.ws=null)},r.uri=function(){var t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=F()),this.supportsBinary||(n.b64=1),this.createUri(t,n)},i(n,[{key:"name",get:function(){return"websocket"}}])}(q),rt=L.WebSocket||L.MozWebSocket,et=function(t){function n(){return t.apply(this,arguments)||this}s(n,t);var i=n.prototype;return i.createSocket=function(t,n,i){return nt?new rt(t,n,i):n?new rt(t,n):new rt(t)},i.doWrite=function(t,n){this.ws.send(n)},n}(it),ot=function(t){function n(){return t.apply(this,arguments)||this}s(n,t);var r=n.prototype;return r.doOpen=function(){var t=this;try{this.T=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this.T.closed.then((function(){t.onClose()})).catch((function(n){t.onError("webtransport error",n)})),this.T.ready.then((function(){t.T.createBidirectionalStream().then((function(n){var i=function(t,n){O||(O=new TextDecoder);var i=[],r=0,e=-1,o=!1;return new TransformStream({transform:function(s,u){for(i.push(s);;){if(0===r){if(M(i)<1)break;var h=x(i,1);o=!(128&~h[0]),e=127&h[0],r=e<126?3:126===e?1:2}else if(1===r){if(M(i)<2)break;var f=x(i,2);e=new DataView(f.buffer,f.byteOffset,f.length).getUint16(0),r=3}else if(2===r){if(M(i)<8)break;var c=x(i,8),a=new DataView(c.buffer,c.byteOffset,c.length),v=a.getUint32(0);if(v>Math.pow(2,21)-1){u.enqueue(d);break}e=v*Math.pow(2,32)+a.getUint32(4),r=3}else{if(M(i)<e)break;var l=x(i,e);u.enqueue(S(o?l:O.decode(l),n)),r=0}if(0===e||e>t){u.enqueue(d);break}}}})}(Number.MAX_SAFE_INTEGER,t.socket.binaryType),r=n.readable.pipeThrough(i).getReader(),e=U();e.readable.pipeTo(n.writable),t.U=e.writable.getWriter();!function n(){r.read().then((function(i){var r=i.done,e=i.value;r||(t.onPacket(e),n())})).catch((function(t){}))}();var o={type:"open"};t.query.sid&&(o.data='{"sid":"'.concat(t.query.sid,'"}')),t.U.write(o).then((function(){return t.onOpen()}))}))}))},r.write=function(t){var n=this;this.writable=!1;for(var i=function(){var i=t[r],e=r===t.length-1;n.U.write(i).then((function(){e&&R((function(){n.writable=!0,n.emitReserved("drain")}),n.setTimeoutFn)}))},r=0;r<t.length;r++)i()},r.doClose=function(){var t;null===(t=this.T)||void 0===t||t.close()},i(n,[{key:"name",get:function(){return"webtransport"}}])}(q),st={websocket:et,webtransport:ot,polling:Z},ut=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,ht=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ft(t){if(t.length>8e3)throw"URI too long";var n=t,i=t.indexOf("["),r=t.indexOf("]");-1!=i&&-1!=r&&(t=t.substring(0,i)+t.substring(i,r).replace(/:/g,";")+t.substring(r,t.length));for(var e,o,s=ut.exec(t||""),u={},h=14;h--;)u[ht[h]]=s[h]||"";return-1!=i&&-1!=r&&(u.source=n,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=function(t,n){var i=/\/{2,9}/g,r=n.replace(i,"/").split("/");"/"!=n.slice(0,1)&&0!==n.length||r.splice(0,1);"/"==n.slice(-1)&&r.splice(r.length-1,1);return r}(0,u.path),u.queryKey=(e=u.query,o={},e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,n,i){n&&(o[n]=i)})),o),u}var ct="function"==typeof addEventListener&&"function"==typeof removeEventListener,at=[];ct&&addEventListener("offline",(function(){at.forEach((function(t){return t()}))}),!1);var vt=function(t){function n(n,i){var r;if((r=t.call(this)||this).binaryType="arraybuffer",r.writeBuffer=[],r.M=0,r.I=-1,r.R=-1,r.L=-1,r._=1/0,n&&"object"===c(n)&&(i=n,n=null),n){var o=ft(n);i.hostname=o.host,i.secure="https"===o.protocol||"wss"===o.protocol,i.port=o.port,o.query&&(i.query=o.query)}else i.host&&(i.hostname=ft(i.host).host);return $(r,i),r.secure=null!=i.secure?i.secure:"undefined"!=typeof location&&"https:"===location.protocol,i.hostname&&!i.port&&(i.port=r.secure?"443":"80"),r.hostname=i.hostname||("undefined"!=typeof location?location.hostname:"localhost"),r.port=i.port||("undefined"!=typeof location&&location.port?location.port:r.secure?"443":"80"),r.transports=[],r.D={},i.transports.forEach((function(t){var n=t.prototype.name;r.transports.push(n),r.D[n]=t})),r.opts=e({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},i),r.opts.path=r.opts.path.replace(/\/$/,"")+(r.opts.addTrailingSlash?"/":""),"string"==typeof r.opts.query&&(r.opts.query=function(t){for(var n={},i=t.split("&"),r=0,e=i.length;r<e;r++){var o=i[r].split("=");n[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return n}(r.opts.query)),ct&&(r.opts.closeOnBeforeunload&&(r.P=function(){r.transport&&(r.transport.removeAllListeners(),r.transport.close())},addEventListener("beforeunload",r.P,!1)),"localhost"!==r.hostname&&(r.$=function(){r.F("transport close",{description:"network connection lost"})},at.push(r.$))),r.opts.withCredentials&&(r.V=void 0),r.q(),r}s(n,t);var i=n.prototype;return i.createTransport=function(t){var n=e({},this.opts.query);n.EIO=4,n.transport=t,this.id&&(n.sid=this.id);var i=e({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this.D[t](i)},i.q=function(){var t=this;if(0!==this.transports.length){var i=this.opts.rememberUpgrade&&n.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";var r=this.createTransport(i);r.open(),this.setTransport(r)}else this.setTimeoutFn((function(){t.emitReserved("error","No transports available")}),0)},i.setTransport=function(t){var n=this;this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.X.bind(this)).on("packet",this.H.bind(this)).on("error",this.B.bind(this)).on("close",(function(t){return n.F("transport close",t)}))},i.onOpen=function(){this.readyState="open",n.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()},i.H=function(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.J("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this.K();break;case"error":var n=new Error("server error");n.code=t.data,this.B(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}},i.onHandshake=function(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.I=t.pingInterval,this.R=t.pingTimeout,this.L=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.K()},i.K=function(){var t=this;this.clearTimeoutFn(this.Y);var n=this.I+this.R;this._=Date.now()+n,this.Y=this.setTimeoutFn((function(){t.F("ping timeout")}),n),this.opts.autoUnref&&this.Y.unref()},i.X=function(){this.writeBuffer.splice(0,this.M),this.M=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()},i.flush=function(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){var t=this.G();this.transport.send(t),this.M=t.length,this.emitReserved("flush")}},i.G=function(){if(!(this.L&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;for(var t,n=1,i=0;i<this.writeBuffer.length;i++){var r=this.writeBuffer[i].data;if(r&&(n+="string"==typeof(t=r)?function(t){for(var n=0,i=0,r=0,e=t.length;r<e;r++)(n=t.charCodeAt(r))<128?i+=1:n<2048?i+=2:n<55296||n>=57344?i+=3:(r++,i+=4);return i}(t):Math.ceil(1.33*(t.byteLength||t.size))),i>0&&n>this.L)return this.writeBuffer.slice(0,i);n+=2}return this.writeBuffer},i.W=function(){var t=this;if(!this._)return!0;var n=Date.now()>this._;return n&&(this._=0,R((function(){t.F("ping timeout")}),this.setTimeoutFn)),n},i.write=function(t,n,i){return this.J("message",t,n,i),this},i.send=function(t,n,i){return this.J("message",t,n,i),this},i.J=function(t,n,i,r){if("function"==typeof n&&(r=n,n=void 0),"function"==typeof i&&(r=i,i=null),"closing"!==this.readyState&&"closed"!==this.readyState){(i=i||{}).compress=!1!==i.compress;var e={type:t,data:n,options:i};this.emitReserved("packetCreate",e),this.writeBuffer.push(e),r&&this.once("flush",r),this.flush()}},i.close=function(){var t=this,n=function(){t.F("forced close"),t.transport.close()},i=function i(){t.off("upgrade",i),t.off("upgradeError",i),n()},r=function(){t.once("upgrade",i),t.once("upgradeError",i)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(function(){t.upgrading?r():n()})):this.upgrading?r():n()),this},i.B=function(t){if(n.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this.q();this.emitReserved("error",t),this.F("transport error",t)},i.F=function(t,n){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this.Y),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),ct&&(this.P&&removeEventListener("beforeunload",this.P,!1),this.$)){var i=at.indexOf(this.$);-1!==i&&at.splice(i,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.M=0}},n}(I);vt.protocol=4;var lt=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Z=[],n}s(n,t);var i=n.prototype;return i.onOpen=function(){if(t.prototype.onOpen.call(this),"open"===this.readyState&&this.opts.upgrade)for(var n=0;n<this.Z.length;n++)this.tt(this.Z[n])},i.tt=function(t){var n=this,i=this.createTransport(t),r=!1;vt.priorWebsocketSuccess=!1;var e=function(){r||(i.send([{type:"ping",data:"probe"}]),i.once("packet",(function(t){if(!r)if("pong"===t.type&&"probe"===t.data){if(n.upgrading=!0,n.emitReserved("upgrading",i),!i)return;vt.priorWebsocketSuccess="websocket"===i.name,n.transport.pause((function(){r||"closed"!==n.readyState&&(c(),n.setTransport(i),i.send([{type:"upgrade"}]),n.emitReserved("upgrade",i),i=null,n.upgrading=!1,n.flush())}))}else{var e=new Error("probe error");e.transport=i.name,n.emitReserved("upgradeError",e)}})))};function o(){r||(r=!0,c(),i.close(),i=null)}var s=function(t){var r=new Error("probe error: "+t);r.transport=i.name,o(),n.emitReserved("upgradeError",r)};function u(){s("transport closed")}function h(){s("socket closed")}function f(t){i&&t.name!==i.name&&o()}var c=function(){i.removeListener("open",e),i.removeListener("error",s),i.removeListener("close",u),n.off("close",h),n.off("upgrading",f)};i.once("open",e),i.once("error",s),i.once("close",u),this.once("close",h),this.once("upgrading",f),-1!==this.Z.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn((function(){r||i.open()}),200):i.open()},i.onHandshake=function(n){this.Z=this.nt(n.upgrades),t.prototype.onHandshake.call(this,n)},i.nt=function(t){for(var n=[],i=0;i<t.length;i++)~this.transports.indexOf(t[i])&&n.push(t[i]);return n},n}(vt),pt=function(t){function n(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="object"===c(n)?n:i;return(!r.transports||r.transports&&"string"==typeof r.transports[0])&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map((function(t){return st[t]})).filter((function(t){return!!t}))),t.call(this,n,r)||this}return s(n,t),n}(lt);pt.protocol;var dt="function"==typeof ArrayBuffer,yt=function(t){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer},bt=Object.prototype.toString,wt="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===bt.call(Blob),gt="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===bt.call(File);function mt(t){return dt&&(t instanceof ArrayBuffer||yt(t))||wt&&t instanceof Blob||gt&&t instanceof File}function kt(t,n){if(!t||"object"!==c(t))return!1;if(Array.isArray(t)){for(var i=0,r=t.length;i<r;i++)if(kt(t[i]))return!0;return!1}if(mt(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return kt(t.toJSON(),!0);for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&kt(t[e]))return!0;return!1}function At(t){var n=[],i=t.data,r=t;return r.data=jt(i,n),r.attachments=n.length,{packet:r,buffers:n}}function jt(t,n){if(!t)return t;if(mt(t)){var i={_placeholder:!0,num:n.length};return n.push(t),i}if(Array.isArray(t)){for(var r=new Array(t.length),e=0;e<t.length;e++)r[e]=jt(t[e],n);return r}if("object"===c(t)&&!(t instanceof Date)){var o={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(o[s]=jt(t[s],n));return o}return t}function Et(t,n){return t.data=Ot(t.data,n),delete t.attachments,t}function Ot(t,n){if(!t)return t;if(t&&!0===t._placeholder){if("number"==typeof t.num&&t.num>=0&&t.num<n.length)return n[t.num];throw new Error("illegal attachments")}if(Array.isArray(t))for(var i=0;i<t.length;i++)t[i]=Ot(t[i],n);else if("object"===c(t))for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=Ot(t[r],n));return t}var Bt,St=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];!function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}(Bt||(Bt={}));var Nt=function(){function t(t){this.replacer=t}var n=t.prototype;return n.encode=function(t){return t.type!==Bt.EVENT&&t.type!==Bt.ACK||!kt(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===Bt.EVENT?Bt.BINARY_EVENT:Bt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})},n.encodeAsString=function(t){var n=""+t.type;return t.type!==Bt.BINARY_EVENT&&t.type!==Bt.BINARY_ACK||(n+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(n+=t.nsp+","),null!=t.id&&(n+=t.id),null!=t.data&&(n+=JSON.stringify(t.data,this.replacer)),n},n.encodeAsBinary=function(t){var n=At(t),i=this.encodeAsString(n.packet),r=n.buffers;return r.unshift(i),r},t}(),Ct=function(t){function n(n){var i;return(i=t.call(this)||this).reviver=n,i}s(n,t);var i=n.prototype;return i.add=function(n){var i;if("string"==typeof n){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");var r=(i=this.decodeString(n)).type===Bt.BINARY_EVENT;r||i.type===Bt.BINARY_ACK?(i.type=r?Bt.EVENT:Bt.ACK,this.reconstructor=new Tt(i),0===i.attachments&&t.prototype.emitReserved.call(this,"decoded",i)):t.prototype.emitReserved.call(this,"decoded",i)}else{if(!mt(n)&&!n.base64)throw new Error("Unknown type: "+n);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(i=this.reconstructor.takeBinaryData(n))&&(this.reconstructor=null,t.prototype.emitReserved.call(this,"decoded",i))}},i.decodeString=function(t){var i=0,r={type:Number(t.charAt(0))};if(void 0===Bt[r.type])throw new Error("unknown packet type "+r.type);if(r.type===Bt.BINARY_EVENT||r.type===Bt.BINARY_ACK){for(var e=i+1;"-"!==t.charAt(++i)&&i!=t.length;);var o=t.substring(e,i);if(o!=Number(o)||"-"!==t.charAt(i))throw new Error("Illegal attachments");r.attachments=Number(o)}if("/"===t.charAt(i+1)){for(var s=i+1;++i;){if(","===t.charAt(i))break;if(i===t.length)break}r.nsp=t.substring(s,i)}else r.nsp="/";var u=t.charAt(i+1);if(""!==u&&Number(u)==u){for(var h=i+1;++i;){var f=t.charAt(i);if(null==f||Number(f)!=f){--i;break}if(i===t.length)break}r.id=Number(t.substring(h,i+1))}if(t.charAt(++i)){var c=this.tryParse(t.substr(i));if(!n.isPayloadValid(r.type,c))throw new Error("invalid payload");r.data=c}return r},i.tryParse=function(t){try{return JSON.parse(t,this.reviver)}catch(t){return!1}},n.isPayloadValid=function(t,n){switch(t){case Bt.CONNECT:return Mt(n);case Bt.DISCONNECT:return void 0===n;case Bt.CONNECT_ERROR:return"string"==typeof n||Mt(n);case Bt.EVENT:case Bt.BINARY_EVENT:return Array.isArray(n)&&("number"==typeof n[0]||"string"==typeof n[0]&&-1===St.indexOf(n[0]));case Bt.ACK:case Bt.BINARY_ACK:return Array.isArray(n)}},i.destroy=function(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)},n}(I),Tt=function(){function t(t){this.packet=t,this.buffers=[],this.reconPack=t}var n=t.prototype;return n.takeBinaryData=function(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){var n=Et(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null},n.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]},t}();var Ut=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t};function Mt(t){return"[object Object]"===Object.prototype.toString.call(t)}var xt=Object.freeze({__proto__:null,protocol:5,get PacketType(){return Bt},Encoder:Nt,Decoder:Ct,isPacketValid:function(t){return"string"==typeof t.nsp&&(void 0===(n=t.id)||Ut(n))&&function(t,n){switch(t){case Bt.CONNECT:return void 0===n||Mt(n);case Bt.DISCONNECT:return void 0===n;case Bt.EVENT:return Array.isArray(n)&&("number"==typeof n[0]||"string"==typeof n[0]&&-1===St.indexOf(n[0]));case Bt.ACK:return Array.isArray(n);case Bt.CONNECT_ERROR:return"string"==typeof n||Mt(n);default:return!1}}(t.type,t.data);var n}});function It(t,n,i){return t.on(n,i),function(){t.off(n,i)}}var Rt=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Lt=function(t){function n(n,i,r){var o;return(o=t.call(this)||this).connected=!1,o.recovered=!1,o.receiveBuffer=[],o.sendBuffer=[],o.it=[],o.rt=0,o.ids=0,o.acks={},o.flags={},o.io=n,o.nsp=i,r&&r.auth&&(o.auth=r.auth),o.l=e({},r),o.io.et&&o.open(),o}s(n,t);var o=n.prototype;return o.subEvents=function(){if(!this.subs){var t=this.io;this.subs=[It(t,"open",this.onopen.bind(this)),It(t,"packet",this.onpacket.bind(this)),It(t,"error",this.onerror.bind(this)),It(t,"close",this.onclose.bind(this))]}},o.connect=function(){return this.connected||(this.subEvents(),this.io.ot||this.io.open(),"open"===this.io.st&&this.onopen()),this},o.open=function(){return this.connect()},o.send=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return n.unshift("message"),this.emit.apply(this,n),this},o.emit=function(t){var n,i,r;if(Rt.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');for(var e=arguments.length,o=new Array(e>1?e-1:0),s=1;s<e;s++)o[s-1]=arguments[s];if(o.unshift(t),this.l.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this.ut(o),this;var u={type:Bt.EVENT,data:o,options:{}};if(u.options.compress=!1!==this.flags.compress,"function"==typeof o[o.length-1]){var h=this.ids++,f=o.pop();this.ht(h,f),u.id=h}var c=null===(i=null===(n=this.io.engine)||void 0===n?void 0:n.transport)||void 0===i?void 0:i.writable,a=this.connected&&!(null===(r=this.io.engine)||void 0===r?void 0:r.W());return this.flags.volatile&&!c||(a?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this},o.ht=function(t,n){var i,r=this,e=null!==(i=this.flags.timeout)&&void 0!==i?i:this.l.ackTimeout;if(void 0!==e){var o=this.io.setTimeoutFn((function(){delete r.acks[t];for(var i=0;i<r.sendBuffer.length;i++)r.sendBuffer[i].id===t&&r.sendBuffer.splice(i,1);n.call(r,new Error("operation has timed out"))}),e),s=function(){r.io.clearTimeoutFn(o);for(var t=arguments.length,i=new Array(t),e=0;e<t;e++)i[e]=arguments[e];n.apply(r,i)};s.withError=!0,this.acks[t]=s}else this.acks[t]=n},o.emitWithAck=function(t){for(var n=this,i=arguments.length,r=new Array(i>1?i-1:0),e=1;e<i;e++)r[e-1]=arguments[e];return new Promise((function(i,e){var o=function(t,n){return t?e(t):i(n)};o.withError=!0,r.push(o),n.emit.apply(n,[t].concat(r))}))},o.ut=function(t){var n,i=this;"function"==typeof t[t.length-1]&&(n=t.pop());var r={id:this.rt++,tryCount:0,pending:!1,args:t,flags:e({fromQueue:!0},this.flags)};t.push((function(t){if(r===i.it[0]){if(null!==t)r.tryCount>i.l.retries&&(i.it.shift(),n&&n(t));else if(i.it.shift(),n){for(var e=arguments.length,o=new Array(e>1?e-1:0),s=1;s<e;s++)o[s-1]=arguments[s];n.apply(void 0,[null].concat(o))}return r.pending=!1,i.ft()}})),this.it.push(r),this.ft()},o.ft=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.connected&&0!==this.it.length){var n=this.it[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}},o.packet=function(t){t.nsp=this.nsp,this.io.ct(t)},o.onopen=function(){var t=this;"function"==typeof this.auth?this.auth((function(n){t.vt(n)})):this.vt(this.auth)},o.vt=function(t){this.packet({type:Bt.CONNECT,data:this.lt?e({pid:this.lt,offset:this.dt},t):t})},o.onerror=function(t){this.connected||this.emitReserved("connect_error",t)},o.onclose=function(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this.yt()},o.yt=function(){var t=this;Object.keys(this.acks).forEach((function(n){if(!t.sendBuffer.some((function(t){return String(t.id)===n}))){var i=t.acks[n];delete t.acks[n],i.withError&&i.call(t,new Error("socket has been disconnected"))}}))},o.onpacket=function(t){if(t.nsp===this.nsp)switch(t.type){case Bt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Bt.EVENT:case Bt.BINARY_EVENT:this.onevent(t);break;case Bt.ACK:case Bt.BINARY_ACK:this.onack(t);break;case Bt.DISCONNECT:this.ondisconnect();break;case Bt.CONNECT_ERROR:this.destroy();var n=new Error(t.data.message);n.data=t.data.data,this.emitReserved("connect_error",n)}},o.onevent=function(t){var n=t.data||[];null!=t.id&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))},o.emitEvent=function(n){if(this.bt&&this.bt.length){var i,e=r(this.bt.slice());try{for(e.s();!(i=e.n()).done;){i.value.apply(this,n)}}catch(t){e.e(t)}finally{e.f()}}t.prototype.emit.apply(this,n),this.lt&&n.length&&"string"==typeof n[n.length-1]&&(this.dt=n[n.length-1])},o.ack=function(t){var n=this,i=!1;return function(){if(!i){i=!0;for(var r=arguments.length,e=new Array(r),o=0;o<r;o++)e[o]=arguments[o];n.packet({type:Bt.ACK,id:t,data:e})}}},o.onack=function(t){var n=this.acks[t.id];"function"==typeof n&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))},o.onconnect=function(t,n){this.id=t,this.recovered=n&&this.lt===n,this.lt=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this.ft(!0)},o.emitBuffered=function(){var t=this;this.receiveBuffer.forEach((function(n){return t.emitEvent(n)})),this.receiveBuffer=[],this.sendBuffer.forEach((function(n){t.notifyOutgoingListeners(n),t.packet(n)})),this.sendBuffer=[]},o.ondisconnect=function(){this.destroy(),this.onclose("io server disconnect")},o.destroy=function(){this.subs&&(this.subs.forEach((function(t){return t()})),this.subs=void 0),this.io.wt(this)},o.disconnect=function(){return this.connected&&this.packet({type:Bt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},o.close=function(){return this.disconnect()},o.compress=function(t){return this.flags.compress=t,this},o.timeout=function(t){return this.flags.timeout=t,this},o.onAny=function(t){return this.bt=this.bt||[],this.bt.push(t),this},o.prependAny=function(t){return this.bt=this.bt||[],this.bt.unshift(t),this},o.offAny=function(t){if(!this.bt)return this;if(t){for(var n=this.bt,i=0;i<n.length;i++)if(t===n[i])return n.splice(i,1),this}else this.bt=[];return this},o.listenersAny=function(){return this.bt||[]},o.onAnyOutgoing=function(t){return this.gt=this.gt||[],this.gt.push(t),this},o.prependAnyOutgoing=function(t){return this.gt=this.gt||[],this.gt.unshift(t),this},o.offAnyOutgoing=function(t){if(!this.gt)return this;if(t){for(var n=this.gt,i=0;i<n.length;i++)if(t===n[i])return n.splice(i,1),this}else this.gt=[];return this},o.listenersAnyOutgoing=function(){return this.gt||[]},o.notifyOutgoingListeners=function(t){if(this.gt&&this.gt.length){var n,i=r(this.gt.slice());try{for(i.s();!(n=i.n()).done;){n.value.apply(this,t.data)}}catch(t){i.e(t)}finally{i.f()}}},i(n,[{key:"disconnected",get:function(){return!this.connected}},{key:"active",get:function(){return!!this.subs}},{key:"volatile",get:function(){return this.flags.volatile=!0,this}}])}(I);function _t(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}_t.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var n=Math.random(),i=Math.floor(n*this.jitter*t);t=1&Math.floor(10*n)?t+i:t-i}return 0|Math.min(t,this.max)},_t.prototype.reset=function(){this.attempts=0},_t.prototype.setMin=function(t){this.ms=t},_t.prototype.setMax=function(t){this.max=t},_t.prototype.setJitter=function(t){this.jitter=t};var Dt=function(t){function n(n,i){var r,e;(r=t.call(this)||this).nsps={},r.subs=[],n&&"object"===c(n)&&(i=n,n=void 0),(i=i||{}).path=i.path||"/socket.io",r.opts=i,$(r,i),r.reconnection(!1!==i.reconnection),r.reconnectionAttempts(i.reconnectionAttempts||1/0),r.reconnectionDelay(i.reconnectionDelay||1e3),r.reconnectionDelayMax(i.reconnectionDelayMax||5e3),r.randomizationFactor(null!==(e=i.randomizationFactor)&&void 0!==e?e:.5),r.backoff=new _t({min:r.reconnectionDelay(),max:r.reconnectionDelayMax(),jitter:r.randomizationFactor()}),r.timeout(null==i.timeout?2e4:i.timeout),r.st="closed",r.uri=n;var o=i.parser||xt;return r.encoder=new o.Encoder,r.decoder=new o.Decoder,r.et=!1!==i.autoConnect,r.et&&r.open(),r}s(n,t);var i=n.prototype;return i.reconnection=function(t){return arguments.length?(this.kt=!!t,t||(this.skipReconnect=!0),this):this.kt},i.reconnectionAttempts=function(t){return void 0===t?this.At:(this.At=t,this)},i.reconnectionDelay=function(t){var n;return void 0===t?this.jt:(this.jt=t,null===(n=this.backoff)||void 0===n||n.setMin(t),this)},i.randomizationFactor=function(t){var n;return void 0===t?this.Et:(this.Et=t,null===(n=this.backoff)||void 0===n||n.setJitter(t),this)},i.reconnectionDelayMax=function(t){var n;return void 0===t?this.Ot:(this.Ot=t,null===(n=this.backoff)||void 0===n||n.setMax(t),this)},i.timeout=function(t){return arguments.length?(this.Bt=t,this):this.Bt},i.maybeReconnectOnOpen=function(){!this.ot&&this.kt&&0===this.backoff.attempts&&this.reconnect()},i.open=function(t){var n=this;if(~this.st.indexOf("open"))return this;this.engine=new pt(this.uri,this.opts);var i=this.engine,r=this;this.st="opening",this.skipReconnect=!1;var e=It(i,"open",(function(){r.onopen(),t&&t()})),o=function(i){n.cleanup(),n.st="closed",n.emitReserved("error",i),t?t(i):n.maybeReconnectOnOpen()},s=It(i,"error",o);if(!1!==this.Bt){var u=this.Bt,h=this.setTimeoutFn((function(){e(),o(new Error("timeout")),i.close()}),u);this.opts.autoUnref&&h.unref(),this.subs.push((function(){n.clearTimeoutFn(h)}))}return this.subs.push(e),this.subs.push(s),this},i.connect=function(t){return this.open(t)},i.onopen=function(){this.cleanup(),this.st="open",this.emitReserved("open");var t=this.engine;this.subs.push(It(t,"ping",this.onping.bind(this)),It(t,"data",this.ondata.bind(this)),It(t,"error",this.onerror.bind(this)),It(t,"close",this.onclose.bind(this)),It(this.decoder,"decoded",this.ondecoded.bind(this)))},i.onping=function(){this.emitReserved("ping")},i.ondata=function(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}},i.ondecoded=function(t){var n=this;R((function(){n.emitReserved("packet",t)}),this.setTimeoutFn)},i.onerror=function(t){this.emitReserved("error",t)},i.socket=function(t,n){var i=this.nsps[t];return i?this.et&&!i.active&&i.connect():(i=new Lt(this,t,n),this.nsps[t]=i),i},i.wt=function(t){for(var n=0,i=Object.keys(this.nsps);n<i.length;n++){var r=i[n];if(this.nsps[r].active)return}this.St()},i.ct=function(t){for(var n=this.encoder.encode(t),i=0;i<n.length;i++)this.engine.write(n[i],t.options)},i.cleanup=function(){this.subs.forEach((function(t){return t()})),this.subs.length=0,this.decoder.destroy()},i.St=function(){this.skipReconnect=!0,this.ot=!1,this.onclose("forced close")},i.disconnect=function(){return this.St()},i.onclose=function(t,n){var i;this.cleanup(),null===(i=this.engine)||void 0===i||i.close(),this.backoff.reset(),this.st="closed",this.emitReserved("close",t,n),this.kt&&!this.skipReconnect&&this.reconnect()},i.reconnect=function(){var t=this;if(this.ot||this.skipReconnect)return this;var n=this;if(this.backoff.attempts>=this.At)this.backoff.reset(),this.emitReserved("reconnect_failed"),this.ot=!1;else{var i=this.backoff.duration();this.ot=!0;var r=this.setTimeoutFn((function(){n.skipReconnect||(t.emitReserved("reconnect_attempt",n.backoff.attempts),n.skipReconnect||n.open((function(i){i?(n.ot=!1,n.reconnect(),t.emitReserved("reconnect_error",i)):n.onreconnect()})))}),i);this.opts.autoUnref&&r.unref(),this.subs.push((function(){t.clearTimeoutFn(r)}))}},i.onreconnect=function(){var t=this.backoff.attempts;this.ot=!1,this.backoff.reset(),this.emitReserved("reconnect",t)},n}(I),Pt={};function $t(t,n){"object"===c(t)&&(n=t,t=void 0);var i,r=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,r=t;i=i||"undefined"!=typeof location&&location,null==t&&(t=i.protocol+"//"+i.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?i.protocol+t:i.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==i?i.protocol+"//"+t:"https://"+t),r=ft(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";var e=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+e+":"+r.port+n,r.href=r.protocol+"://"+e+(i&&i.port===r.port?"":":"+r.port),r}(t,(n=n||{}).path||"/socket.io"),e=r.source,o=r.id,s=r.path,u=Pt[o]&&s in Pt[o].nsps;return n.forceNew||n["force new connection"]||!1===n.multiplex||u?i=new Dt(e,n):(Pt[o]||(Pt[o]=new Dt(e,n)),i=Pt[o]),r.query&&!n.query&&(n.query=r.queryKey),i.socket(r.path,n)}return e($t,{Manager:Dt,Socket:Lt,io:$t,connect:$t}),$t}));
7
- //# sourceMappingURL=socket.io.min.js.map
@@ -1,7 +0,0 @@
1
- /*!
2
- * Socket.IO v4.8.1
3
- * (c) 2014-2024 Guillermo Rauch
4
- * Released under the MIT License.
5
- */
6
- !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):(t="undefined"!=typeof globalThis?globalThis:t||self).io=i()}(this,(function(){"use strict";function t(t,i){return i.forEach((function(i){i&&"string"!=typeof i&&!Array.isArray(i)&&Object.keys(i).forEach((function(n){if("default"!==n&&!(n in t)){var r=Object.getOwnPropertyDescriptor(i,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return i[n]}})}}))})),Object.freeze(t)}function i(t,i){(null==i||i>t.length)&&(i=t.length);for(var n=0,r=Array(i);n<i;n++)r[n]=t[n];return r}function n(t,i){for(var n=0;n<i.length;n++){var r=i[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,c(r.key),r)}}function r(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function e(t,n){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,n){if(t){if("string"==typeof t)return i(t,n);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,n):void 0}}(t))||n&&t&&"number"==typeof t.length){r&&(t=r);var e=0,s=function(){};return{s:s,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,h=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return h=t.done,t},e:function(t){u=!0,o=t},f:function(){try{h||null==r.return||r.return()}finally{if(u)throw o}}}}function s(){return s=Object.assign?Object.assign.bind():function(t){for(var i=1;i<arguments.length;i++){var n=arguments[i];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},s.apply(null,arguments)}function o(t){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},o(t)}function h(t,i){t.prototype=Object.create(i.prototype),t.prototype.constructor=t,f(t,i)}function u(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(u=function(){return!!t})()}function f(t,i){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},f(t,i)}function c(t){var i=function(t,i){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,i||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===i?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function v(t){var i="function"==typeof Map?new Map:void 0;return v=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(i){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==i){if(i.has(t))return i.get(t);i.set(t,n)}function n(){return function(t,i,n){if(u())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,i);var e=new(t.bind.apply(t,r));return n&&f(e,n.prototype),e}(t,arguments,o(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),f(n,t)},v(t)}var l=Object.create(null);l.open="0",l.close="1",l.ping="2",l.pong="3",l.message="4",l.upgrade="5",l.noop="6";var d=Object.create(null);Object.keys(l).forEach((function(t){d[l[t]]=t}));var p,y={type:"error",data:"parser error"},w="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),b="function"==typeof ArrayBuffer,g=function(t){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer},m=function(t,i,n){var r=t.type,e=t.data;return w&&e instanceof Blob?i?n(e):k(e,n):b&&(e instanceof ArrayBuffer||g(e))?i?n(e):k(new Blob([e]),n):n(l[r]+(e||""))},k=function(t,i){var n=new FileReader;return n.onload=function(){var t=n.result.split(",")[1];i("b"+(t||""))},n.readAsDataURL(t)};function A(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}for(var E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",j="undefined"==typeof Uint8Array?[]:new Uint8Array(256),O=0;O<64;O++)j[E.charCodeAt(O)]=O;var M,S="function"==typeof ArrayBuffer,B=function(t,i){if("string"!=typeof t)return{type:"message",data:T(t,i)};var n=t.charAt(0);return"b"===n?{type:"message",data:C(t.substring(1),i)}:d[n]?t.length>1?{type:d[n],data:t.substring(1)}:{type:d[n]}:y},C=function(t,i){if(S){var n=function(t){var i,n,r,e,s,o=.75*t.length,h=t.length,u=0;"="===t[t.length-1]&&(o--,"="===t[t.length-2]&&o--);var f=new ArrayBuffer(o),c=new Uint8Array(f);for(i=0;i<h;i+=4)n=j[t.charCodeAt(i)],r=j[t.charCodeAt(i+1)],e=j[t.charCodeAt(i+2)],s=j[t.charCodeAt(i+3)],c[u++]=n<<2|r>>4,c[u++]=(15&r)<<4|e>>2,c[u++]=(3&e)<<6|63&s;return f}(t);return T(n,i)}return{base64:!0,data:t}},T=function(t,i){return"blob"===i?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer},U=String.fromCharCode(30);function _(){return new TransformStream({transform:function(t,i){!function(t,i){w&&t.data instanceof Blob?t.data.arrayBuffer().then(A).then(i):b&&(t.data instanceof ArrayBuffer||g(t.data))?i(A(t.data)):m(t,!1,(function(t){p||(p=new TextEncoder),i(p.encode(t))}))}(t,(function(n){var r,e=n.length;if(e<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,e);else if(e<65536){r=new Uint8Array(3);var s=new DataView(r.buffer);s.setUint8(0,126),s.setUint16(1,e)}else{r=new Uint8Array(9);var o=new DataView(r.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(e))}t.data&&"string"!=typeof t.data&&(r[0]|=128),i.enqueue(r),i.enqueue(n)}))}})}function x(t){return t.reduce((function(t,i){return t+i.length}),0)}function D(t,i){if(t[0].length===i)return t.shift();for(var n=new Uint8Array(i),r=0,e=0;e<i;e++)n[e]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),n}function $(t){if(t)return function(t){for(var i in $.prototype)t[i]=$.prototype[i];return t}(t)}$.prototype.on=$.prototype.addEventListener=function(t,i){return this.t=this.t||{},(this.t["$"+t]=this.t["$"+t]||[]).push(i),this},$.prototype.once=function(t,i){function n(){this.off(t,n),i.apply(this,arguments)}return n.fn=i,this.on(t,n),this},$.prototype.off=$.prototype.removeListener=$.prototype.removeAllListeners=$.prototype.removeEventListener=function(t,i){if(this.t=this.t||{},0==arguments.length)return this.t={},this;var n,r=this.t["$"+t];if(!r)return this;if(1==arguments.length)return delete this.t["$"+t],this;for(var e=0;e<r.length;e++)if((n=r[e])===i||n.fn===i){r.splice(e,1);break}return 0===r.length&&delete this.t["$"+t],this},$.prototype.emit=function(t){this.t=this.t||{};for(var i=new Array(arguments.length-1),n=this.t["$"+t],r=1;r<arguments.length;r++)i[r-1]=arguments[r];if(n){r=0;for(var e=(n=n.slice(0)).length;r<e;++r)n[r].apply(this,i)}return this},$.prototype.emitReserved=$.prototype.emit,$.prototype.listeners=function(t){return this.t=this.t||{},this.t["$"+t]||[]},$.prototype.hasListeners=function(t){return!!this.listeners(t).length};var I="function"==typeof Promise&&"function"==typeof Promise.resolve?function(t){return Promise.resolve().then(t)}:function(t,i){return i(t,0)},R="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function L(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];return n.reduce((function(i,n){return t.hasOwnProperty(n)&&(i[n]=t[n]),i}),{})}var N=R.setTimeout,P=R.clearTimeout;function V(t,i){i.useNativeTimers?(t.setTimeoutFn=N.bind(R),t.clearTimeoutFn=P.bind(R)):(t.setTimeoutFn=R.setTimeout.bind(R),t.clearTimeoutFn=R.clearTimeout.bind(R))}function q(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}var F=function(t){function i(i,n,r){var e;return(e=t.call(this,i)||this).description=n,e.context=r,e.type="TransportError",e}return h(i,t),i}(v(Error)),X=function(t){function i(i){var n;return(n=t.call(this)||this).writable=!1,V(n,i),n.opts=i,n.query=i.query,n.socket=i.socket,n.supportsBinary=!i.forceBase64,n}h(i,t);var n=i.prototype;return n.onError=function(i,n,r){return t.prototype.emitReserved.call(this,"error",new F(i,n,r)),this},n.open=function(){return this.readyState="opening",this.doOpen(),this},n.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},n.send=function(t){"open"===this.readyState&&this.write(t)},n.onOpen=function(){this.readyState="open",this.writable=!0,t.prototype.emitReserved.call(this,"open")},n.onData=function(t){var i=B(t,this.socket.binaryType);this.onPacket(i)},n.onPacket=function(i){t.prototype.emitReserved.call(this,"packet",i)},n.onClose=function(i){this.readyState="closed",t.prototype.emitReserved.call(this,"close",i)},n.pause=function(t){},n.createUri=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t+"://"+this.i()+this.o()+this.opts.path+this.h(i)},n.i=function(){var t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"},n.o=function(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""},n.h=function(t){var i=function(t){var i="";for(var n in t)t.hasOwnProperty(n)&&(i.length&&(i+="&"),i+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return i}(t);return i.length?"?"+i:""},i}($),H=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).u=!1,i}h(i,t);var n=i.prototype;return n.doOpen=function(){this.v()},n.pause=function(t){var i=this;this.readyState="pausing";var n=function(){i.readyState="paused",t()};if(this.u||!this.writable){var r=0;this.u&&(r++,this.once("pollComplete",(function(){--r||n()}))),this.writable||(r++,this.once("drain",(function(){--r||n()})))}else n()},n.v=function(){this.u=!0,this.doPoll(),this.emitReserved("poll")},n.onData=function(t){var i=this;(function(t,i){for(var n=t.split(U),r=[],e=0;e<n.length;e++){var s=B(n[e],i);if(r.push(s),"error"===s.type)break}return r})(t,this.socket.binaryType).forEach((function(t){if("opening"===i.readyState&&"open"===t.type&&i.onOpen(),"close"===t.type)return i.onClose({description:"transport closed by the server"}),!1;i.onPacket(t)})),"closed"!==this.readyState&&(this.u=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.v())},n.doClose=function(){var t=this,i=function(){t.write([{type:"close"}])};"open"===this.readyState?i():this.once("open",i)},n.write=function(t){var i=this;this.writable=!1,function(t,i){var n=t.length,r=new Array(n),e=0;t.forEach((function(t,s){m(t,!1,(function(t){r[s]=t,++e===n&&i(r.join(U))}))}))}(t,(function(t){i.doWrite(t,(function(){i.writable=!0,i.emitReserved("drain")}))}))},n.uri=function(){var t=this.opts.secure?"https":"http",i=this.query||{};return!1!==this.opts.timestampRequests&&(i[this.opts.timestampParam]=q()),this.supportsBinary||i.sid||(i.b64=1),this.createUri(t,i)},r(i,[{key:"name",get:function(){return"polling"}}])}(X),z=!1;try{z="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}var G=z;function J(){}var K=function(t){function i(i){var n;if(n=t.call(this,i)||this,"undefined"!=typeof location){var r="https:"===location.protocol,e=location.port;e||(e=r?"443":"80"),n.xd="undefined"!=typeof location&&i.hostname!==location.hostname||e!==i.port}return n}h(i,t);var n=i.prototype;return n.doWrite=function(t,i){var n=this,r=this.request({method:"POST",data:t});r.on("success",i),r.on("error",(function(t,i){n.onError("xhr post error",t,i)}))},n.doPoll=function(){var t=this,i=this.request();i.on("data",this.onData.bind(this)),i.on("error",(function(i,n){t.onError("xhr poll error",i,n)})),this.pollXhr=i},i}(H),Q=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).createRequest=i,V(e,r),e.l=r,e.p=r.method||"GET",e.m=n,e.k=void 0!==r.data?r.data:null,e.A(),e}h(i,t);var n=i.prototype;return n.A=function(){var t,n=this,r=L(this.l,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this.l.xd;var e=this.j=this.createRequest(r);try{e.open(this.p,this.m,!0);try{if(this.l.extraHeaders)for(var s in e.setDisableHeaderCheck&&e.setDisableHeaderCheck(!0),this.l.extraHeaders)this.l.extraHeaders.hasOwnProperty(s)&&e.setRequestHeader(s,this.l.extraHeaders[s])}catch(t){}if("POST"===this.p)try{e.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{e.setRequestHeader("Accept","*/*")}catch(t){}null===(t=this.l.cookieJar)||void 0===t||t.addCookies(e),"withCredentials"in e&&(e.withCredentials=this.l.withCredentials),this.l.requestTimeout&&(e.timeout=this.l.requestTimeout),e.onreadystatechange=function(){var t;3===e.readyState&&(null===(t=n.l.cookieJar)||void 0===t||t.parseCookies(e.getResponseHeader("set-cookie"))),4===e.readyState&&(200===e.status||1223===e.status?n.O():n.setTimeoutFn((function(){n.M("number"==typeof e.status?e.status:0)}),0))},e.send(this.k)}catch(t){return void this.setTimeoutFn((function(){n.M(t)}),0)}"undefined"!=typeof document&&(this.S=i.requestsCount++,i.requests[this.S]=this)},n.M=function(t){this.emitReserved("error",t,this.j),this.B(!0)},n.B=function(t){if(void 0!==this.j&&null!==this.j){if(this.j.onreadystatechange=J,t)try{this.j.abort()}catch(t){}"undefined"!=typeof document&&delete i.requests[this.S],this.j=null}},n.O=function(){var t=this.j.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.B())},n.abort=function(){this.B()},i}($);if(Q.requestsCount=0,Q.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",W);else if("function"==typeof addEventListener){addEventListener("onpagehide"in R?"pagehide":"unload",W,!1)}function W(){for(var t in Q.requests)Q.requests.hasOwnProperty(t)&&Q.requests[t].abort()}var Y,Z=(Y=it({xdomain:!1}))&&null!==Y.responseType,tt=function(t){function i(i){var n;n=t.call(this,i)||this;var r=i&&i.forceBase64;return n.supportsBinary=Z&&!r,n}return h(i,t),i.prototype.request=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s(t,{xd:this.xd},this.opts),new Q(it,this.uri(),t)},i}(K);function it(t){var i=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!i||G))return new XMLHttpRequest}catch(t){}if(!i)try{return new(R[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}var nt="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),rt=function(t){function i(){return t.apply(this,arguments)||this}h(i,t);var n=i.prototype;return n.doOpen=function(){var t=this.uri(),i=this.opts.protocols,n=nt?{}:L(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,i,n)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()},n.addEventListeners=function(){var t=this;this.ws.onopen=function(){t.opts.autoUnref&&t.ws.C.unref(),t.onOpen()},this.ws.onclose=function(i){return t.onClose({description:"websocket connection closed",context:i})},this.ws.onmessage=function(i){return t.onData(i.data)},this.ws.onerror=function(i){return t.onError("websocket error",i)}},n.write=function(t){var i=this;this.writable=!1;for(var n=function(){var n=t[r],e=r===t.length-1;m(n,i.supportsBinary,(function(t){try{i.doWrite(n,t)}catch(t){}e&&I((function(){i.writable=!0,i.emitReserved("drain")}),i.setTimeoutFn)}))},r=0;r<t.length;r++)n()},n.doClose=function(){void 0!==this.ws&&(this.ws.onerror=function(){},this.ws.close(),this.ws=null)},n.uri=function(){var t=this.opts.secure?"wss":"ws",i=this.query||{};return this.opts.timestampRequests&&(i[this.opts.timestampParam]=q()),this.supportsBinary||(i.b64=1),this.createUri(t,i)},r(i,[{key:"name",get:function(){return"websocket"}}])}(X),et=R.WebSocket||R.MozWebSocket,st=function(t){function i(){return t.apply(this,arguments)||this}h(i,t);var n=i.prototype;return n.createSocket=function(t,i,n){return nt?new et(t,i,n):i?new et(t,i):new et(t)},n.doWrite=function(t,i){this.ws.send(i)},i}(rt),ot=function(t){function i(){return t.apply(this,arguments)||this}h(i,t);var n=i.prototype;return n.doOpen=function(){var t=this;try{this.T=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this.T.closed.then((function(){t.onClose()})).catch((function(i){t.onError("webtransport error",i)})),this.T.ready.then((function(){t.T.createBidirectionalStream().then((function(i){var n=function(t,i){M||(M=new TextDecoder);var n=[],r=0,e=-1,s=!1;return new TransformStream({transform:function(o,h){for(n.push(o);;){if(0===r){if(x(n)<1)break;var u=D(n,1);s=!(128&~u[0]),e=127&u[0],r=e<126?3:126===e?1:2}else if(1===r){if(x(n)<2)break;var f=D(n,2);e=new DataView(f.buffer,f.byteOffset,f.length).getUint16(0),r=3}else if(2===r){if(x(n)<8)break;var c=D(n,8),a=new DataView(c.buffer,c.byteOffset,c.length),v=a.getUint32(0);if(v>Math.pow(2,21)-1){h.enqueue(y);break}e=v*Math.pow(2,32)+a.getUint32(4),r=3}else{if(x(n)<e)break;var l=D(n,e);h.enqueue(B(s?l:M.decode(l),i)),r=0}if(0===e||e>t){h.enqueue(y);break}}}})}(Number.MAX_SAFE_INTEGER,t.socket.binaryType),r=i.readable.pipeThrough(n).getReader(),e=_();e.readable.pipeTo(i.writable),t.U=e.writable.getWriter();!function i(){r.read().then((function(n){var r=n.done,e=n.value;r||(t.onPacket(e),i())})).catch((function(t){}))}();var s={type:"open"};t.query.sid&&(s.data='{"sid":"'.concat(t.query.sid,'"}')),t.U.write(s).then((function(){return t.onOpen()}))}))}))},n.write=function(t){var i=this;this.writable=!1;for(var n=function(){var n=t[r],e=r===t.length-1;i.U.write(n).then((function(){e&&I((function(){i.writable=!0,i.emitReserved("drain")}),i.setTimeoutFn)}))},r=0;r<t.length;r++)n()},n.doClose=function(){var t;null===(t=this.T)||void 0===t||t.close()},r(i,[{key:"name",get:function(){return"webtransport"}}])}(X),ht={websocket:st,webtransport:ot,polling:tt},ut=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,ft=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ct(t){if(t.length>8e3)throw"URI too long";var i=t,n=t.indexOf("["),r=t.indexOf("]");-1!=n&&-1!=r&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));for(var e,s,o=ut.exec(t||""),h={},u=14;u--;)h[ft[u]]=o[u]||"";return-1!=n&&-1!=r&&(h.source=i,h.host=h.host.substring(1,h.host.length-1).replace(/;/g,":"),h.authority=h.authority.replace("[","").replace("]","").replace(/;/g,":"),h.ipv6uri=!0),h.pathNames=function(t,i){var n=/\/{2,9}/g,r=i.replace(n,"/").split("/");"/"!=i.slice(0,1)&&0!==i.length||r.splice(0,1);"/"==i.slice(-1)&&r.splice(r.length-1,1);return r}(0,h.path),h.queryKey=(e=h.query,s={},e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,i,n){i&&(s[i]=n)})),s),h}var at="function"==typeof addEventListener&&"function"==typeof removeEventListener,vt=[];at&&addEventListener("offline",(function(){vt.forEach((function(t){return t()}))}),!1);var lt=function(t){function i(i,n){var r;if((r=t.call(this)||this).binaryType="arraybuffer",r.writeBuffer=[],r._=0,r.D=-1,r.$=-1,r.I=-1,r.R=1/0,i&&"object"===a(i)&&(n=i,i=null),i){var e=ct(i);n.hostname=e.host,n.secure="https"===e.protocol||"wss"===e.protocol,n.port=e.port,e.query&&(n.query=e.query)}else n.host&&(n.hostname=ct(n.host).host);return V(r,n),r.secure=null!=n.secure?n.secure:"undefined"!=typeof location&&"https:"===location.protocol,n.hostname&&!n.port&&(n.port=r.secure?"443":"80"),r.hostname=n.hostname||("undefined"!=typeof location?location.hostname:"localhost"),r.port=n.port||("undefined"!=typeof location&&location.port?location.port:r.secure?"443":"80"),r.transports=[],r.L={},n.transports.forEach((function(t){var i=t.prototype.name;r.transports.push(i),r.L[i]=t})),r.opts=s({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),r.opts.path=r.opts.path.replace(/\/$/,"")+(r.opts.addTrailingSlash?"/":""),"string"==typeof r.opts.query&&(r.opts.query=function(t){for(var i={},n=t.split("&"),r=0,e=n.length;r<e;r++){var s=n[r].split("=");i[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return i}(r.opts.query)),at&&(r.opts.closeOnBeforeunload&&(r.N=function(){r.transport&&(r.transport.removeAllListeners(),r.transport.close())},addEventListener("beforeunload",r.N,!1)),"localhost"!==r.hostname&&(r.P=function(){r.V("transport close",{description:"network connection lost"})},vt.push(r.P))),r.opts.withCredentials&&(r.q=void 0),r.F(),r}h(i,t);var n=i.prototype;return n.createTransport=function(t){var i=s({},this.opts.query);i.EIO=4,i.transport=t,this.id&&(i.sid=this.id);var n=s({},this.opts,{query:i,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this.L[t](n)},n.F=function(){var t=this;if(0!==this.transports.length){var n=this.opts.rememberUpgrade&&i.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";var r=this.createTransport(n);r.open(),this.setTransport(r)}else this.setTimeoutFn((function(){t.emitReserved("error","No transports available")}),0)},n.setTransport=function(t){var i=this;this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.X.bind(this)).on("packet",this.H.bind(this)).on("error",this.M.bind(this)).on("close",(function(t){return i.V("transport close",t)}))},n.onOpen=function(){this.readyState="open",i.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()},n.H=function(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.G("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this.J();break;case"error":var i=new Error("server error");i.code=t.data,this.M(i);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}},n.onHandshake=function(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.D=t.pingInterval,this.$=t.pingTimeout,this.I=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.J()},n.J=function(){var t=this;this.clearTimeoutFn(this.K);var i=this.D+this.$;this.R=Date.now()+i,this.K=this.setTimeoutFn((function(){t.V("ping timeout")}),i),this.opts.autoUnref&&this.K.unref()},n.X=function(){this.writeBuffer.splice(0,this._),this._=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()},n.flush=function(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){var t=this.W();this.transport.send(t),this._=t.length,this.emitReserved("flush")}},n.W=function(){if(!(this.I&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;for(var t,i=1,n=0;n<this.writeBuffer.length;n++){var r=this.writeBuffer[n].data;if(r&&(i+="string"==typeof(t=r)?function(t){for(var i=0,n=0,r=0,e=t.length;r<e;r++)(i=t.charCodeAt(r))<128?n+=1:i<2048?n+=2:i<55296||i>=57344?n+=3:(r++,n+=4);return n}(t):Math.ceil(1.33*(t.byteLength||t.size))),n>0&&i>this.I)return this.writeBuffer.slice(0,n);i+=2}return this.writeBuffer},n.Y=function(){var t=this;if(!this.R)return!0;var i=Date.now()>this.R;return i&&(this.R=0,I((function(){t.V("ping timeout")}),this.setTimeoutFn)),i},n.write=function(t,i,n){return this.G("message",t,i,n),this},n.send=function(t,i,n){return this.G("message",t,i,n),this},n.G=function(t,i,n,r){if("function"==typeof i&&(r=i,i=void 0),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var e={type:t,data:i,options:n};this.emitReserved("packetCreate",e),this.writeBuffer.push(e),r&&this.once("flush",r),this.flush()}},n.close=function(){var t=this,i=function(){t.V("forced close"),t.transport.close()},n=function n(){t.off("upgrade",n),t.off("upgradeError",n),i()},r=function(){t.once("upgrade",n),t.once("upgradeError",n)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(function(){t.upgrading?r():i()})):this.upgrading?r():i()),this},n.M=function(t){if(i.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this.F();this.emitReserved("error",t),this.V("transport error",t)},n.V=function(t,i){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this.K),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),at&&(this.N&&removeEventListener("beforeunload",this.N,!1),this.P)){var n=vt.indexOf(this.P);-1!==n&&vt.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,i),this.writeBuffer=[],this._=0}},i}($);lt.protocol=4;var dt=function(t){function i(){var i;return(i=t.apply(this,arguments)||this).Z=[],i}h(i,t);var n=i.prototype;return n.onOpen=function(){if(t.prototype.onOpen.call(this),"open"===this.readyState&&this.opts.upgrade)for(var i=0;i<this.Z.length;i++)this.tt(this.Z[i])},n.tt=function(t){var i=this,n=this.createTransport(t),r=!1;lt.priorWebsocketSuccess=!1;var e=function(){r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",(function(t){if(!r)if("pong"===t.type&&"probe"===t.data){if(i.upgrading=!0,i.emitReserved("upgrading",n),!n)return;lt.priorWebsocketSuccess="websocket"===n.name,i.transport.pause((function(){r||"closed"!==i.readyState&&(c(),i.setTransport(n),n.send([{type:"upgrade"}]),i.emitReserved("upgrade",n),n=null,i.upgrading=!1,i.flush())}))}else{var e=new Error("probe error");e.transport=n.name,i.emitReserved("upgradeError",e)}})))};function s(){r||(r=!0,c(),n.close(),n=null)}var o=function(t){var r=new Error("probe error: "+t);r.transport=n.name,s(),i.emitReserved("upgradeError",r)};function h(){o("transport closed")}function u(){o("socket closed")}function f(t){n&&t.name!==n.name&&s()}var c=function(){n.removeListener("open",e),n.removeListener("error",o),n.removeListener("close",h),i.off("close",u),i.off("upgrading",f)};n.once("open",e),n.once("error",o),n.once("close",h),this.once("close",u),this.once("upgrading",f),-1!==this.Z.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn((function(){r||n.open()}),200):n.open()},n.onHandshake=function(i){this.Z=this.it(i.upgrades),t.prototype.onHandshake.call(this,i)},n.it=function(t){for(var i=[],n=0;n<t.length;n++)~this.transports.indexOf(t[n])&&i.push(t[n]);return i},i}(lt),pt=function(t){function i(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="object"===a(i)?i:n;return(!r.transports||r.transports&&"string"==typeof r.transports[0])&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map((function(t){return ht[t]})).filter((function(t){return!!t}))),t.call(this,i,r)||this}return h(i,t),i}(dt);pt.protocol;var yt={},wt={};function bt(t,i,n){for(var r=0,e=0,s=n.length;e<s;e++)(r=n.charCodeAt(e))<128?t.setUint8(i++,r):r<2048?(t.setUint8(i++,192|r>>6),t.setUint8(i++,128|63&r)):r<55296||r>=57344?(t.setUint8(i++,224|r>>12),t.setUint8(i++,128|r>>6&63),t.setUint8(i++,128|63&r)):(e++,r=65536+((1023&r)<<10|1023&n.charCodeAt(e)),t.setUint8(i++,240|r>>18),t.setUint8(i++,128|r>>12&63),t.setUint8(i++,128|r>>6&63),t.setUint8(i++,128|63&r))}function gt(t,i,n){var r=a(n),e=0,s=0,o=0,h=0,u=0,f=0;if("string"===r){if(u=function(t){for(var i=0,n=0,r=0,e=t.length;r<e;r++)(i=t.charCodeAt(r))<128?n+=1:i<2048?n+=2:i<55296||i>=57344?n+=3:(r++,n+=4);return n}(n),u<32)t.push(160|u),f=1;else if(u<256)t.push(217,u),f=2;else if(u<65536)t.push(218,u>>8,u),f=3;else{if(!(u<4294967296))throw new Error("String too long");t.push(219,u>>24,u>>16,u>>8,u),f=5}return i.push({nt:n,rt:u,et:t.length}),f+u}if("number"===r)return Math.floor(n)===n&&isFinite(n)?n>=0?n<128?(t.push(n),1):n<256?(t.push(204,n),2):n<65536?(t.push(205,n>>8,n),3):n<4294967296?(t.push(206,n>>24,n>>16,n>>8,n),5):(o=n/Math.pow(2,32)|0,h=n>>>0,t.push(207,o>>24,o>>16,o>>8,o,h>>24,h>>16,h>>8,h),9):n>=-32?(t.push(n),1):n>=-128?(t.push(208,n),2):n>=-32768?(t.push(209,n>>8,n),3):n>=-2147483648?(t.push(210,n>>24,n>>16,n>>8,n),5):(o=Math.floor(n/Math.pow(2,32)),h=n>>>0,t.push(211,o>>24,o>>16,o>>8,o,h>>24,h>>16,h>>8,h),9):(t.push(203),i.push({st:n,rt:8,et:t.length}),9);if("object"===r){if(null===n)return t.push(192),1;if(Array.isArray(n)){if((u=n.length)<16)t.push(144|u),f=1;else if(u<65536)t.push(220,u>>8,u),f=3;else{if(!(u<4294967296))throw new Error("Array too large");t.push(221,u>>24,u>>16,u>>8,u),f=5}for(e=0;e<u;e++)f+=gt(t,i,n[e]);return f}if(n instanceof Date){var c=n.getTime();return o=Math.floor(c/Math.pow(2,32)),h=c>>>0,t.push(215,0,o>>24,o>>16,o>>8,o,h>>24,h>>16,h>>8,h),10}if(n instanceof ArrayBuffer){if((u=n.byteLength)<256)t.push(196,u),f=2;else if(u<65536)t.push(197,u>>8,u),f=3;else{if(!(u<4294967296))throw new Error("Buffer too large");t.push(198,u>>24,u>>16,u>>8,u),f=5}return i.push({ot:n,rt:u,et:t.length}),f+u}if("function"==typeof n.toJSON)return gt(t,i,n.toJSON());var v=[],l="",d=Object.keys(n);for(e=0,s=d.length;e<s;e++)"function"!=typeof n[l=d[e]]&&v.push(l);if((u=v.length)<16)t.push(128|u),f=1;else if(u<65536)t.push(222,u>>8,u),f=3;else{if(!(u<4294967296))throw new Error("Object too large");t.push(223,u>>24,u>>16,u>>8,u),f=5}for(e=0;e<u;e++)f+=gt(t,i,l=v[e]),f+=gt(t,i,n[l]);return f}if("boolean"===r)return t.push(n?195:194),1;if("undefined"===r)return t.push(212,0,0),3;throw new Error("Could not encode")}var mt=function(t){var i=[],n=[],r=gt(i,n,t),e=new ArrayBuffer(r),s=new DataView(e),o=0,h=0,u=-1;n.length>0&&(u=n[0].et);for(var f,c=0,a=0,v=0,l=i.length;v<l;v++)if(s.setUint8(h+v,i[v]),v+1===u){if(c=(f=n[o]).rt,a=h+u,f.ot)for(var d=new Uint8Array(f.ot),p=0;p<c;p++)s.setUint8(a+p,d[p]);else f.nt?bt(s,a,f.nt):void 0!==f.st&&s.setFloat64(a,f.st);h+=c,n[++o]&&(u=n[o].et)}return e};function kt(t){if(this.et=0,t instanceof ArrayBuffer)this.ht=t,this.ut=new DataView(this.ht);else{if(!ArrayBuffer.isView(t))throw new Error("Invalid argument");this.ht=t.buffer,this.ut=new DataView(this.ht,t.byteOffset,t.byteLength)}}kt.prototype.ft=function(t){for(var i=new Array(t),n=0;n<t;n++)i[n]=this.ct();return i},kt.prototype.vt=function(t){for(var i={},n=0;n<t;n++)i[this.ct()]=this.ct();return i},kt.prototype.nt=function(t){var i=function(t,i,n){for(var r="",e=0,s=i,o=i+n;s<o;s++){var h=t.getUint8(s);if(128&h)if(192!=(224&h))if(224!=(240&h)){if(240!=(248&h))throw new Error("Invalid byte "+h.toString(16));(e=(7&h)<<18|(63&t.getUint8(++s))<<12|(63&t.getUint8(++s))<<6|63&t.getUint8(++s))>=65536?(e-=65536,r+=String.fromCharCode(55296+(e>>>10),56320+(1023&e))):r+=String.fromCharCode(e)}else r+=String.fromCharCode((15&h)<<12|(63&t.getUint8(++s))<<6|63&t.getUint8(++s));else r+=String.fromCharCode((31&h)<<6|63&t.getUint8(++s));else r+=String.fromCharCode(h)}return r}(this.ut,this.et,t);return this.et+=t,i},kt.prototype.ot=function(t){var i=this.ht.slice(this.et,this.et+t);return this.et+=t,i},kt.prototype.ct=function(){var t,i=this.ut.getUint8(this.et++),n=0,r=0,e=0,s=0;if(i<192)return i<128?i:i<144?this.vt(15&i):i<160?this.ft(15&i):this.nt(31&i);if(i>223)return-1*(255-i+1);switch(i){case 192:return null;case 194:return!1;case 195:return!0;case 196:return n=this.ut.getUint8(this.et),this.et+=1,this.ot(n);case 197:return n=this.ut.getUint16(this.et),this.et+=2,this.ot(n);case 198:return n=this.ut.getUint32(this.et),this.et+=4,this.ot(n);case 199:return n=this.ut.getUint8(this.et),r=this.ut.getInt8(this.et+1),this.et+=2,[r,this.ot(n)];case 200:return n=this.ut.getUint16(this.et),r=this.ut.getInt8(this.et+2),this.et+=3,[r,this.ot(n)];case 201:return n=this.ut.getUint32(this.et),r=this.ut.getInt8(this.et+4),this.et+=5,[r,this.ot(n)];case 202:return t=this.ut.getFloat32(this.et),this.et+=4,t;case 203:return t=this.ut.getFloat64(this.et),this.et+=8,t;case 204:return t=this.ut.getUint8(this.et),this.et+=1,t;case 205:return t=this.ut.getUint16(this.et),this.et+=2,t;case 206:return t=this.ut.getUint32(this.et),this.et+=4,t;case 207:return e=this.ut.getUint32(this.et)*Math.pow(2,32),s=this.ut.getUint32(this.et+4),this.et+=8,e+s;case 208:return t=this.ut.getInt8(this.et),this.et+=1,t;case 209:return t=this.ut.getInt16(this.et),this.et+=2,t;case 210:return t=this.ut.getInt32(this.et),this.et+=4,t;case 211:return e=this.ut.getInt32(this.et)*Math.pow(2,32),s=this.ut.getUint32(this.et+4),this.et+=8,e+s;case 212:return r=this.ut.getInt8(this.et),this.et+=1,0===r?void(this.et+=1):[r,this.ot(1)];case 213:return r=this.ut.getInt8(this.et),this.et+=1,[r,this.ot(2)];case 214:return r=this.ut.getInt8(this.et),this.et+=1,[r,this.ot(4)];case 215:return r=this.ut.getInt8(this.et),this.et+=1,0===r?(e=this.ut.getInt32(this.et)*Math.pow(2,32),s=this.ut.getUint32(this.et+4),this.et+=8,new Date(e+s)):[r,this.ot(8)];case 216:return r=this.ut.getInt8(this.et),this.et+=1,[r,this.ot(16)];case 217:return n=this.ut.getUint8(this.et),this.et+=1,this.nt(n);case 218:return n=this.ut.getUint16(this.et),this.et+=2,this.nt(n);case 219:return n=this.ut.getUint32(this.et),this.et+=4,this.nt(n);case 220:return n=this.ut.getUint16(this.et),this.et+=2,this.ft(n);case 221:return n=this.ut.getUint32(this.et),this.et+=4,this.ft(n);case 222:return n=this.ut.getUint16(this.et),this.et+=2,this.vt(n);case 223:return n=this.ut.getUint32(this.et),this.et+=4,this.vt(n)}throw new Error("Could not parse")};var At=function(t){var i=new kt(t),n=i.ct();if(i.et!==t.byteLength)throw new Error(t.byteLength-i.et+" trailing bytes");return n};wt.encode=mt,wt.decode=At;var Et={exports:{}};!function(t){function i(t){if(t)return function(t){for(var n in i.prototype)t[n]=i.prototype[n];return t}(t)}t.exports=i,i.prototype.on=i.prototype.addEventListener=function(t,i){return this.t=this.t||{},(this.t["$"+t]=this.t["$"+t]||[]).push(i),this},i.prototype.once=function(t,i){function n(){this.off(t,n),i.apply(this,arguments)}return n.fn=i,this.on(t,n),this},i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.prototype.removeEventListener=function(t,i){if(this.t=this.t||{},0==arguments.length)return this.t={},this;var n,r=this.t["$"+t];if(!r)return this;if(1==arguments.length)return delete this.t["$"+t],this;for(var e=0;e<r.length;e++)if((n=r[e])===i||n.fn===i){r.splice(e,1);break}return 0===r.length&&delete this.t["$"+t],this},i.prototype.emit=function(t){this.t=this.t||{};for(var i=new Array(arguments.length-1),n=this.t["$"+t],r=1;r<arguments.length;r++)i[r-1]=arguments[r];if(n){r=0;for(var e=(n=n.slice(0)).length;r<e;++r)n[r].apply(this,i)}return this},i.prototype.listeners=function(t){return this.t=this.t||{},this.t["$"+t]||[]},i.prototype.hasListeners=function(t){return!!this.listeners(t).length}}(Et);var jt,Ot=wt,Mt=Et.exports,St=yt.protocol=5,Bt=jt=yt.PacketType={CONNECT:0,DISCONNECT:1,EVENT:2,ACK:3,CONNECT_ERROR:4},Ct=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},Tt=function(t){return"string"==typeof t},Ut=function(t){return"[object Object]"===Object.prototype.toString.call(t)};function _t(){}function xt(){}_t.prototype.encode=function(t){return[Ot.encode(t)]},Mt(xt.prototype),xt.prototype.add=function(t){var i=Ot.decode(t);this.checkPacket(i),this.emit("decoded",i)},xt.prototype.checkPacket=function(t){if(!(Ct(t.type)&&t.type>=Bt.CONNECT&&t.type<=Bt.CONNECT_ERROR))throw new Error("invalid packet type");if(!Tt(t.nsp))throw new Error("invalid namespace");if(!function(t){switch(t.type){case Bt.CONNECT:return void 0===t.data||Ut(t.data);case Bt.DISCONNECT:return void 0===t.data;case Bt.CONNECT_ERROR:return Tt(t.data)||Ut(t.data);default:return Array.isArray(t.data)}}(t))throw new Error("invalid payload");if(!(void 0===t.id||Ct(t.id)))throw new Error("invalid packet id")},xt.prototype.destroy=function(){};var Dt=yt.Encoder=_t,$t=yt.Decoder=xt,It=t({__proto__:null,protocol:St,get PacketType(){return jt},Encoder:Dt,Decoder:$t,default:yt},[yt]);function Rt(t,i,n){return t.on(i,n),function(){t.off(i,n)}}var Lt=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Nt=function(t){function i(i,n,r){var e;return(e=t.call(this)||this).connected=!1,e.recovered=!1,e.receiveBuffer=[],e.sendBuffer=[],e.lt=[],e.dt=0,e.ids=0,e.acks={},e.flags={},e.io=i,e.nsp=n,r&&r.auth&&(e.auth=r.auth),e.l=s({},r),e.io.yt&&e.open(),e}h(i,t);var n=i.prototype;return n.subEvents=function(){if(!this.subs){var t=this.io;this.subs=[Rt(t,"open",this.onopen.bind(this)),Rt(t,"packet",this.onpacket.bind(this)),Rt(t,"error",this.onerror.bind(this)),Rt(t,"close",this.onclose.bind(this))]}},n.connect=function(){return this.connected||(this.subEvents(),this.io.wt||this.io.open(),"open"===this.io.bt&&this.onopen()),this},n.open=function(){return this.connect()},n.send=function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return i.unshift("message"),this.emit.apply(this,i),this},n.emit=function(t){var i,n,r;if(Lt.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');for(var e=arguments.length,s=new Array(e>1?e-1:0),o=1;o<e;o++)s[o-1]=arguments[o];if(s.unshift(t),this.l.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this.gt(s),this;var h={type:jt.EVENT,data:s,options:{}};if(h.options.compress=!1!==this.flags.compress,"function"==typeof s[s.length-1]){var u=this.ids++,f=s.pop();this.kt(u,f),h.id=u}var c=null===(n=null===(i=this.io.engine)||void 0===i?void 0:i.transport)||void 0===n?void 0:n.writable,a=this.connected&&!(null===(r=this.io.engine)||void 0===r?void 0:r.Y());return this.flags.volatile&&!c||(a?(this.notifyOutgoingListeners(h),this.packet(h)):this.sendBuffer.push(h)),this.flags={},this},n.kt=function(t,i){var n,r=this,e=null!==(n=this.flags.timeout)&&void 0!==n?n:this.l.ackTimeout;if(void 0!==e){var s=this.io.setTimeoutFn((function(){delete r.acks[t];for(var n=0;n<r.sendBuffer.length;n++)r.sendBuffer[n].id===t&&r.sendBuffer.splice(n,1);i.call(r,new Error("operation has timed out"))}),e),o=function(){r.io.clearTimeoutFn(s);for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];i.apply(r,n)};o.withError=!0,this.acks[t]=o}else this.acks[t]=i},n.emitWithAck=function(t){for(var i=this,n=arguments.length,r=new Array(n>1?n-1:0),e=1;e<n;e++)r[e-1]=arguments[e];return new Promise((function(n,e){var s=function(t,i){return t?e(t):n(i)};s.withError=!0,r.push(s),i.emit.apply(i,[t].concat(r))}))},n.gt=function(t){var i,n=this;"function"==typeof t[t.length-1]&&(i=t.pop());var r={id:this.dt++,tryCount:0,pending:!1,args:t,flags:s({fromQueue:!0},this.flags)};t.push((function(t){if(r===n.lt[0]){if(null!==t)r.tryCount>n.l.retries&&(n.lt.shift(),i&&i(t));else if(n.lt.shift(),i){for(var e=arguments.length,s=new Array(e>1?e-1:0),o=1;o<e;o++)s[o-1]=arguments[o];i.apply(void 0,[null].concat(s))}return r.pending=!1,n.At()}})),this.lt.push(r),this.At()},n.At=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.connected&&0!==this.lt.length){var i=this.lt[0];i.pending&&!t||(i.pending=!0,i.tryCount++,this.flags=i.flags,this.emit.apply(this,i.args))}},n.packet=function(t){t.nsp=this.nsp,this.io.Et(t)},n.onopen=function(){var t=this;"function"==typeof this.auth?this.auth((function(i){t.jt(i)})):this.jt(this.auth)},n.jt=function(t){this.packet({type:jt.CONNECT,data:this.Ot?s({pid:this.Ot,offset:this.Mt},t):t})},n.onerror=function(t){this.connected||this.emitReserved("connect_error",t)},n.onclose=function(t,i){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,i),this.St()},n.St=function(){var t=this;Object.keys(this.acks).forEach((function(i){if(!t.sendBuffer.some((function(t){return String(t.id)===i}))){var n=t.acks[i];delete t.acks[i],n.withError&&n.call(t,new Error("socket has been disconnected"))}}))},n.onpacket=function(t){if(t.nsp===this.nsp)switch(t.type){case jt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case jt.EVENT:case jt.BINARY_EVENT:this.onevent(t);break;case jt.ACK:case jt.BINARY_ACK:this.onack(t);break;case jt.DISCONNECT:this.ondisconnect();break;case jt.CONNECT_ERROR:this.destroy();var i=new Error(t.data.message);i.data=t.data.data,this.emitReserved("connect_error",i)}},n.onevent=function(t){var i=t.data||[];null!=t.id&&i.push(this.ack(t.id)),this.connected?this.emitEvent(i):this.receiveBuffer.push(Object.freeze(i))},n.emitEvent=function(i){if(this.Bt&&this.Bt.length){var n,r=e(this.Bt.slice());try{for(r.s();!(n=r.n()).done;){n.value.apply(this,i)}}catch(t){r.e(t)}finally{r.f()}}t.prototype.emit.apply(this,i),this.Ot&&i.length&&"string"==typeof i[i.length-1]&&(this.Mt=i[i.length-1])},n.ack=function(t){var i=this,n=!1;return function(){if(!n){n=!0;for(var r=arguments.length,e=new Array(r),s=0;s<r;s++)e[s]=arguments[s];i.packet({type:jt.ACK,id:t,data:e})}}},n.onack=function(t){var i=this.acks[t.id];"function"==typeof i&&(delete this.acks[t.id],i.withError&&t.data.unshift(null),i.apply(this,t.data))},n.onconnect=function(t,i){this.id=t,this.recovered=i&&this.Ot===i,this.Ot=i,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this.At(!0)},n.emitBuffered=function(){var t=this;this.receiveBuffer.forEach((function(i){return t.emitEvent(i)})),this.receiveBuffer=[],this.sendBuffer.forEach((function(i){t.notifyOutgoingListeners(i),t.packet(i)})),this.sendBuffer=[]},n.ondisconnect=function(){this.destroy(),this.onclose("io server disconnect")},n.destroy=function(){this.subs&&(this.subs.forEach((function(t){return t()})),this.subs=void 0),this.io.Ct(this)},n.disconnect=function(){return this.connected&&this.packet({type:jt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},n.close=function(){return this.disconnect()},n.compress=function(t){return this.flags.compress=t,this},n.timeout=function(t){return this.flags.timeout=t,this},n.onAny=function(t){return this.Bt=this.Bt||[],this.Bt.push(t),this},n.prependAny=function(t){return this.Bt=this.Bt||[],this.Bt.unshift(t),this},n.offAny=function(t){if(!this.Bt)return this;if(t){for(var i=this.Bt,n=0;n<i.length;n++)if(t===i[n])return i.splice(n,1),this}else this.Bt=[];return this},n.listenersAny=function(){return this.Bt||[]},n.onAnyOutgoing=function(t){return this.Tt=this.Tt||[],this.Tt.push(t),this},n.prependAnyOutgoing=function(t){return this.Tt=this.Tt||[],this.Tt.unshift(t),this},n.offAnyOutgoing=function(t){if(!this.Tt)return this;if(t){for(var i=this.Tt,n=0;n<i.length;n++)if(t===i[n])return i.splice(n,1),this}else this.Tt=[];return this},n.listenersAnyOutgoing=function(){return this.Tt||[]},n.notifyOutgoingListeners=function(t){if(this.Tt&&this.Tt.length){var i,n=e(this.Tt.slice());try{for(n.s();!(i=n.n()).done;){i.value.apply(this,t.data)}}catch(t){n.e(t)}finally{n.f()}}},r(i,[{key:"disconnected",get:function(){return!this.connected}},{key:"active",get:function(){return!!this.subs}},{key:"volatile",get:function(){return this.flags.volatile=!0,this}}])}($);function Pt(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Pt.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var i=Math.random(),n=Math.floor(i*this.jitter*t);t=1&Math.floor(10*i)?t+n:t-n}return 0|Math.min(t,this.max)},Pt.prototype.reset=function(){this.attempts=0},Pt.prototype.setMin=function(t){this.ms=t},Pt.prototype.setMax=function(t){this.max=t},Pt.prototype.setJitter=function(t){this.jitter=t};var Vt=function(t){function i(i,n){var r,e;(r=t.call(this)||this).nsps={},r.subs=[],i&&"object"===a(i)&&(n=i,i=void 0),(n=n||{}).path=n.path||"/socket.io",r.opts=n,V(r,n),r.reconnection(!1!==n.reconnection),r.reconnectionAttempts(n.reconnectionAttempts||1/0),r.reconnectionDelay(n.reconnectionDelay||1e3),r.reconnectionDelayMax(n.reconnectionDelayMax||5e3),r.randomizationFactor(null!==(e=n.randomizationFactor)&&void 0!==e?e:.5),r.backoff=new Pt({min:r.reconnectionDelay(),max:r.reconnectionDelayMax(),jitter:r.randomizationFactor()}),r.timeout(null==n.timeout?2e4:n.timeout),r.bt="closed",r.uri=i;var s=n.parser||It;return r.encoder=new s.Encoder,r.decoder=new s.Decoder,r.yt=!1!==n.autoConnect,r.yt&&r.open(),r}h(i,t);var n=i.prototype;return n.reconnection=function(t){return arguments.length?(this.Ut=!!t,t||(this.skipReconnect=!0),this):this.Ut},n.reconnectionAttempts=function(t){return void 0===t?this._t:(this._t=t,this)},n.reconnectionDelay=function(t){var i;return void 0===t?this.xt:(this.xt=t,null===(i=this.backoff)||void 0===i||i.setMin(t),this)},n.randomizationFactor=function(t){var i;return void 0===t?this.Dt:(this.Dt=t,null===(i=this.backoff)||void 0===i||i.setJitter(t),this)},n.reconnectionDelayMax=function(t){var i;return void 0===t?this.$t:(this.$t=t,null===(i=this.backoff)||void 0===i||i.setMax(t),this)},n.timeout=function(t){return arguments.length?(this.It=t,this):this.It},n.maybeReconnectOnOpen=function(){!this.wt&&this.Ut&&0===this.backoff.attempts&&this.reconnect()},n.open=function(t){var i=this;if(~this.bt.indexOf("open"))return this;this.engine=new pt(this.uri,this.opts);var n=this.engine,r=this;this.bt="opening",this.skipReconnect=!1;var e=Rt(n,"open",(function(){r.onopen(),t&&t()})),s=function(n){i.cleanup(),i.bt="closed",i.emitReserved("error",n),t?t(n):i.maybeReconnectOnOpen()},o=Rt(n,"error",s);if(!1!==this.It){var h=this.It,u=this.setTimeoutFn((function(){e(),s(new Error("timeout")),n.close()}),h);this.opts.autoUnref&&u.unref(),this.subs.push((function(){i.clearTimeoutFn(u)}))}return this.subs.push(e),this.subs.push(o),this},n.connect=function(t){return this.open(t)},n.onopen=function(){this.cleanup(),this.bt="open",this.emitReserved("open");var t=this.engine;this.subs.push(Rt(t,"ping",this.onping.bind(this)),Rt(t,"data",this.ondata.bind(this)),Rt(t,"error",this.onerror.bind(this)),Rt(t,"close",this.onclose.bind(this)),Rt(this.decoder,"decoded",this.ondecoded.bind(this)))},n.onping=function(){this.emitReserved("ping")},n.ondata=function(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}},n.ondecoded=function(t){var i=this;I((function(){i.emitReserved("packet",t)}),this.setTimeoutFn)},n.onerror=function(t){this.emitReserved("error",t)},n.socket=function(t,i){var n=this.nsps[t];return n?this.yt&&!n.active&&n.connect():(n=new Nt(this,t,i),this.nsps[t]=n),n},n.Ct=function(t){for(var i=0,n=Object.keys(this.nsps);i<n.length;i++){var r=n[i];if(this.nsps[r].active)return}this.Rt()},n.Et=function(t){for(var i=this.encoder.encode(t),n=0;n<i.length;n++)this.engine.write(i[n],t.options)},n.cleanup=function(){this.subs.forEach((function(t){return t()})),this.subs.length=0,this.decoder.destroy()},n.Rt=function(){this.skipReconnect=!0,this.wt=!1,this.onclose("forced close")},n.disconnect=function(){return this.Rt()},n.onclose=function(t,i){var n;this.cleanup(),null===(n=this.engine)||void 0===n||n.close(),this.backoff.reset(),this.bt="closed",this.emitReserved("close",t,i),this.Ut&&!this.skipReconnect&&this.reconnect()},n.reconnect=function(){var t=this;if(this.wt||this.skipReconnect)return this;var i=this;if(this.backoff.attempts>=this._t)this.backoff.reset(),this.emitReserved("reconnect_failed"),this.wt=!1;else{var n=this.backoff.duration();this.wt=!0;var r=this.setTimeoutFn((function(){i.skipReconnect||(t.emitReserved("reconnect_attempt",i.backoff.attempts),i.skipReconnect||i.open((function(n){n?(i.wt=!1,i.reconnect(),t.emitReserved("reconnect_error",n)):i.onreconnect()})))}),n);this.opts.autoUnref&&r.unref(),this.subs.push((function(){t.clearTimeoutFn(r)}))}},n.onreconnect=function(){var t=this.backoff.attempts;this.wt=!1,this.backoff.reset(),this.emitReserved("reconnect",t)},i}($),qt={};function Ft(t,i){"object"===a(t)&&(i=t,t=void 0);var n,r=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=t;n=n||"undefined"!=typeof location&&location,null==t&&(t=n.protocol+"//"+n.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?n.protocol+t:n.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==n?n.protocol+"//"+t:"https://"+t),r=ct(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";var e=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+e+":"+r.port+i,r.href=r.protocol+"://"+e+(n&&n.port===r.port?"":":"+r.port),r}(t,(i=i||{}).path||"/socket.io"),e=r.source,s=r.id,o=r.path,h=qt[s]&&o in qt[s].nsps;return i.forceNew||i["force new connection"]||!1===i.multiplex||h?n=new Vt(e,i):(qt[s]||(qt[s]=new Vt(e,i)),n=qt[s]),r.query&&!i.query&&(i.query=r.queryKey),n.socket(r.path,i)}return s(Ft,{Manager:Vt,Socket:Nt,io:Ft,connect:Ft}),Ft}));
7
- //# sourceMappingURL=socket.io.msgpack.min.js.map