Browse Source

add source code

刘清 2 months ago
parent
commit
0f2f70fbb1
100 changed files with 9598 additions and 0 deletions
  1. BIN
      DaoDao.zip.bak
  2. 11
    0
      DaoDaoBackend/StartBackend.py
  3. 0
    0
      DaoDaoBackend/app/__init__.py
  4. 12
    0
      DaoDaoBackend/app/api/v1/__init__.py
  5. 14
    0
      DaoDaoBackend/app/api/v1/book.py
  6. 75
    0
      DaoDaoBackend/app/api/v1/user.py
  7. 20
    0
      DaoDaoBackend/app/app.py
  8. 0
    0
      DaoDaoBackend/app/config/secure.py
  9. 6
    0
      DaoDaoBackend/app/config/setting.py
  10. 22
    0
      DaoDaoBackend/app/libs/redprint.py
  11. 27
    0
      DaoDaoFrontend/App.vue
  12. 8
    0
      DaoDaoFrontend/changelog.md
  13. 24
    0
      DaoDaoFrontend/index.html
  14. 23
    0
      DaoDaoFrontend/main.js
  15. 54
    0
      DaoDaoFrontend/manifest.json
  16. 16
    0
      DaoDaoFrontend/node_modules/.bin/semver
  17. 17
    0
      DaoDaoFrontend/node_modules/.bin/semver.cmd
  18. 28
    0
      DaoDaoFrontend/node_modules/.bin/semver.ps1
  19. 234
    0
      DaoDaoFrontend/node_modules/.package-lock.json
  20. 13
    0
      DaoDaoFrontend/node_modules/.vite/deps/_metadata.json
  21. 1
    0
      DaoDaoFrontend/node_modules/.vite/deps/package.json
  22. 2606
    0
      DaoDaoFrontend/node_modules/.vite/deps/socket_io-client.js
  23. 7
    0
      DaoDaoFrontend/node_modules/.vite/deps/socket_io-client.js.map
  24. 24
    0
      DaoDaoFrontend/node_modules/@socket.io/component-emitter/LICENSE
  25. 79
    0
      DaoDaoFrontend/node_modules/@socket.io/component-emitter/Readme.md
  26. 179
    0
      DaoDaoFrontend/node_modules/@socket.io/component-emitter/lib/cjs/index.d.ts
  27. 176
    0
      DaoDaoFrontend/node_modules/@socket.io/component-emitter/lib/cjs/index.js
  28. 4
    0
      DaoDaoFrontend/node_modules/@socket.io/component-emitter/lib/cjs/package.json
  29. 179
    0
      DaoDaoFrontend/node_modules/@socket.io/component-emitter/lib/esm/index.d.ts
  30. 169
    0
      DaoDaoFrontend/node_modules/@socket.io/component-emitter/lib/esm/index.js
  31. 4
    0
      DaoDaoFrontend/node_modules/@socket.io/component-emitter/lib/esm/package.json
  32. 28
    0
      DaoDaoFrontend/node_modules/@socket.io/component-emitter/package.json
  33. 2
    0
      DaoDaoFrontend/node_modules/buffer-equal-constant-time/.npmignore
  34. 4
    0
      DaoDaoFrontend/node_modules/buffer-equal-constant-time/.travis.yml
  35. 12
    0
      DaoDaoFrontend/node_modules/buffer-equal-constant-time/LICENSE.txt
  36. 50
    0
      DaoDaoFrontend/node_modules/buffer-equal-constant-time/README.md
  37. 41
    0
      DaoDaoFrontend/node_modules/buffer-equal-constant-time/index.js
  38. 21
    0
      DaoDaoFrontend/node_modules/buffer-equal-constant-time/package.json
  39. 42
    0
      DaoDaoFrontend/node_modules/buffer-equal-constant-time/test.js
  40. 20
    0
      DaoDaoFrontend/node_modules/debug/LICENSE
  41. 481
    0
      DaoDaoFrontend/node_modules/debug/README.md
  42. 60
    0
      DaoDaoFrontend/node_modules/debug/package.json
  43. 271
    0
      DaoDaoFrontend/node_modules/debug/src/browser.js
  44. 274
    0
      DaoDaoFrontend/node_modules/debug/src/common.js
  45. 10
    0
      DaoDaoFrontend/node_modules/debug/src/index.js
  46. 263
    0
      DaoDaoFrontend/node_modules/debug/src/node.js
  47. 1
    0
      DaoDaoFrontend/node_modules/ecdsa-sig-formatter/CODEOWNERS
  48. 201
    0
      DaoDaoFrontend/node_modules/ecdsa-sig-formatter/LICENSE
  49. 65
    0
      DaoDaoFrontend/node_modules/ecdsa-sig-formatter/README.md
  50. 46
    0
      DaoDaoFrontend/node_modules/ecdsa-sig-formatter/package.json
  51. 17
    0
      DaoDaoFrontend/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.d.ts
  52. 187
    0
      DaoDaoFrontend/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js
  53. 23
    0
      DaoDaoFrontend/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js
  54. 22
    0
      DaoDaoFrontend/node_modules/engine.io-client/LICENSE
  55. 331
    0
      DaoDaoFrontend/node_modules/engine.io-client/README.md
  56. 3
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/browser-entrypoint.d.ts
  57. 4
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/browser-entrypoint.js
  58. 1
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/contrib/has-cors.d.ts
  59. 14
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/contrib/has-cors.js
  60. 15
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/contrib/parseqs.d.ts
  61. 38
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/contrib/parseqs.js
  62. 1
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/contrib/parseuri.d.ts
  63. 67
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/contrib/parseuri.js
  64. 4
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/globals.d.ts
  65. 26
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/globals.js
  66. 21
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/globals.node.d.ts
  67. 97
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/globals.node.js
  68. 15
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/index.d.ts
  69. 32
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/index.js
  70. 10
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/package.json
  71. 482
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/socket.d.ts
  72. 765
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/socket.js
  73. 106
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transport.d.ts
  74. 153
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transport.js
  75. 8
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/index.d.ts
  76. 11
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/index.js
  77. 15
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/polling-fetch.d.ts
  78. 60
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/polling-fetch.js
  79. 108
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/polling-xhr.d.ts
  80. 285
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/polling-xhr.js
  81. 11
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/polling-xhr.node.d.ts
  82. 44
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/polling-xhr.node.js
  83. 52
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/polling.d.ts
  84. 165
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/polling.js
  85. 36
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/websocket.d.ts
  86. 135
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/websocket.js
  87. 14
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/websocket.node.d.ts
  88. 45
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/websocket.node.js
  89. 18
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/webtransport.d.ts
  90. 94
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/webtransport.js
  91. 7
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/util.d.ts
  92. 65
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/cjs/util.js
  93. 3
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/esm-debug/browser-entrypoint.d.ts
  94. 2
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/esm-debug/browser-entrypoint.js
  95. 1
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/esm-debug/contrib/has-cors.d.ts
  96. 11
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/esm-debug/contrib/has-cors.js
  97. 15
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/esm-debug/contrib/parseqs.d.ts
  98. 34
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/esm-debug/contrib/parseqs.js
  99. 1
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/esm-debug/contrib/parseuri.d.ts
  100. 0
    0
      DaoDaoFrontend/node_modules/engine.io-client/build/esm-debug/contrib/parseuri.js

BIN
DaoDao.zip.bak View File


+ 11
- 0
DaoDaoBackend/StartBackend.py View File

@@ -0,0 +1,11 @@
1
+
2
+from app.app import create_app
3
+#前面app指的是项目文件夹app,后面app指的是app文件夹下面的初始化文件__init__.py中创建的实例,实例名app
4
+ 
5
+app = create_app()
6
+#print(app)
7
+ 
8
+if __name__ == '__main__':
9
+    #app.run(debug=True)#若调试,可考虑开启debug模式,修改代码后服务自动重启,使修改生效,方便调试,生产环境
10
+	app.run(host="0.0.0.0", port=5569, debug=True)
11
+	

+ 0
- 0
DaoDaoBackend/app/__init__.py View File


+ 12
- 0
DaoDaoBackend/app/api/v1/__init__.py View File

@@ -0,0 +1,12 @@
1
+ 
2
+from flask import Blueprint
3
+from app.api.v1 import user, book
4
+ 
5
+ 
6
+def create_blueprint_v1():
7
+    # 初始化创建一个蓝图 在 V1 目录下
8
+    bp_v1 = Blueprint('v1', __name__)
9
+    # 将红图注册到蓝图当中
10
+    user.api.register(bp_v1)
11
+    book.api.register(bp_v1)
12
+    return bp_v1

+ 14
- 0
DaoDaoBackend/app/api/v1/book.py View File

@@ -0,0 +1,14 @@
1
+from app.libs.redprint import Redprint
2
+ 
3
+# 初始化红图
4
+api = Redprint('book')
5
+ 
6
+ 
7
+@api.route('/get')
8
+def get_user():
9
+    return "I am book get method"
10
+ 
11
+ 
12
+@api.route('/create')
13
+def get_book():
14
+    return "create book method"

+ 75
- 0
DaoDaoBackend/app/api/v1/user.py View File

@@ -0,0 +1,75 @@
1
+#user.py
2
+ 
3
+from app.libs.redprint import Redprint
4
+from app.app import db
5
+from flask import jsonify, request
6
+ 
7
+# 初始化红图
8
+api = Redprint('user')
9
+ 
10
+ 
11
+@api.route('/get')
12
+def get_user2():
13
+    return "I am user get method"
14
+ 
15
+ 
16
+@api.route('/create', methods=['POST'])
17
+def get_create_user():
18
+	user_info = request.get_json()
19
+	result = db.users.insert_one(user_info)
20
+    return jsonify({"_id": str(result.inserted_id)})
21
+	
22
+	
23
+@api.route('/getall')
24
+def get_all_user():
25
+	user_infos = list(db.users.find())
26
+	# 将ObjectId转换为字符串,以便于JSON序列化
27
+	for user_info in user_infos:
28
+		user_info['_id'] = str(user_info['_id'])
29
+	return jsonify(user_infos)
30
+	
31
+	
32
+@api.route('/modify/<user_id>', methods=['PUT'])
33
+def get_all_user(user_id):
34
+	item = request.get_json()
35
+	result = db.users.update_one({"_id": ObjectId(user_id)}, {"$set": item})
36
+	return jsonify({"modified_count": result.modified_count})
37
+	
38
+
39
+# @api.route('/items', methods=['POST'])
40
+# def add_item():
41
+#     item = request.get_json()
42
+#     result = db.items.insert_one(item)
43
+#     return jsonify({"_id": str(result.inserted_id)})
44
+
45
+# @api.route('/items/<item_id>', methods=['PUT'])
46
+# def update_item(item_id):
47
+#     item = request.get_json()
48
+#     result = db.items.update_one({"_id": ObjectId(item_id)}, {"$set": item})
49
+#     return jsonify({"modified_count": result.modified_count})
50
+
51
+# @api.route('/items/<item_id>', methods=['DELETE'])
52
+# def delete_item(item_id):
53
+#     result = db.items.delete_one({"_id": ObjectId(item_id)})
54
+#     return jsonify({"deleted_count": result.deleted_count})
55
+
56
+
57
+# @app.route('/login', methods=['GET', 'POST'])
58
+# def login_page():
59
+#     if request.method == 'POST':
60
+#         username = request.form['username']
61
+#         password = request.form['password']
62
+#         # 在此处验证用户凭据
63
+#         user = User()
64
+#         user.id = username
65
+#         login_user(user)
66
+#         return redirect(url_for('protected_page'))
67
+#     return render_template('login.html')
68
+ 
69
+# @app.route('/logout')
70
+# def logout_page():
71
+#     if current_user.is_active:
72
+#         logout_user()
73
+#         return 'Logged out'
74
+#     else:
75
+#         return "you aren't login"

+ 20
- 0
DaoDaoBackend/app/app.py View File

@@ -0,0 +1,20 @@
1
+from flask import Flask
2
+from pymongo import MongoClient
3
+ 
4
+ 
5
+def register_blueprints(app):
6
+    from app.api.v1 import create_blueprint_v1
7
+    app.register_blueprint(create_blueprint_v1(), url_prefix='/v1')
8
+ 
9
+ 
10
+def create_app():
11
+    app = Flask(__name__)
12
+    app.config.from_object('app.config.setting')
13
+    app.config.from_object('app.config.secure')
14
+	
15
+	# 初始化MongoDB连接
16
+	app.db = MongoClient(app.config['MONGO_URI']).get_database(app.config['MONGO_DBNAME'])
17
+	
18
+    # 将蓝图注册到app 上
19
+    register_blueprints(app)
20
+    return app

+ 0
- 0
DaoDaoBackend/app/config/secure.py View File


+ 6
- 0
DaoDaoBackend/app/config/setting.py View File

@@ -0,0 +1,6 @@
1
+# app/config/setting.py
2
+#MONGO_URI = 'mongodb://username:password@host:port'
3
+#MONGO_DBNAME = 'your_db_name'
4
+
5
+MONGO_URI = 'mongodb://127.0.0.1:27017/'
6
+MONGO_DBNAME = 'starter_db'

+ 22
- 0
DaoDaoBackend/app/libs/redprint.py View File

@@ -0,0 +1,22 @@
1
+class Redprint:
2
+    def __init__(self, name):
3
+        # name 是指视图类
4
+        self.name = name
5
+        # mound 是绑定路由方法 有多个
6
+        self.mound = []
7
+ 
8
+    # 重写路由 定义装饰器
9
+    def route(self, rule, **options):
10
+        def decorator(f):
11
+            self.mound.append((f, rule, options))
12
+            return f
13
+        return decorator
14
+ 
15
+    # 进行注册,传入蓝图和默认前缀
16
+    def register(self, bp, url_prefix=None):
17
+        if url_prefix is None:
18
+            url_prefix = '/'+ self.name
19
+        for f, rule, options in self.mound:
20
+            endpoint = options.pop("endpoint", f.__name__)
21
+            bp.add_url_rule(url_prefix+rule, endpoint, f, **options)
22
+			

+ 27
- 0
DaoDaoFrontend/App.vue View File

@@ -0,0 +1,27 @@
1
+<script>
2
+export default {
3
+	onLaunch: function() {
4
+		console.log('App Launch');
5
+
6
+		// setTimeout(() => {
7
+		// 	uni.setTabBarBadge({
8
+		// 		index: 1,
9
+		// 		text: '31'
10
+		// 	});
11
+		// 	uni.showTabBarRedDot({
12
+		// 		index: 3
13
+		// 	});
14
+		// }, 1000);
15
+	},
16
+	onShow: function() {
17
+		console.log('App Show');
18
+	},
19
+	onHide: function() {
20
+		console.log('App Hide');
21
+	}
22
+};
23
+</script>
24
+
25
+<style>
26
+/*每个页面公共css */ 
27
+</style>

+ 8
- 0
DaoDaoFrontend/changelog.md View File

@@ -0,0 +1,8 @@
1
+## 0.0.9(2022-06-30)
2
+- 新增 支持 ios 安全区
3
+## 0.0.8(2021-09-06)
4
+- 修复 VUE3 main.js 重复引用 app.vue 的问题
5
+## 0.0.7(2021-07-28)
6
+- 适配 VUE3 (需要 HBuilderX 3.2.0+)
7
+## 0.0.3(2020-11-18)
8
+- 去除无用权限

+ 24
- 0
DaoDaoFrontend/index.html View File

@@ -0,0 +1,24 @@
1
+<!DOCTYPE html>
2
+<html lang="en">
3
+  <head>
4
+    <meta charset="UTF-8" />
5
+    <meta name="apple-mobile-web-app-title" content="Q导岛">
6
+	<link rel="apple-touch-icon" href="/static/favicon.ico">
7
+	<!-- <link rel="apple-mobile-web-app-capable" content="yes">
8
+	<link rel="apple-mobile-web-app-status-bar-style" content="black-translucent"> -->
9
+	<script>
10
+	  var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
11
+		CSS.supports('top: constant(a)'))
12
+	  document.write(
13
+		'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
14
+		(coverSupport ? ', viewport-fit=cover' : '') + '" />')
15
+	</script>
16
+    <title>Cowards</title>
17
+    <!--preload-links-->
18
+    <!--app-context-->
19
+  </head>
20
+  <body>
21
+    <div id="app"><!--app-html--></div>
22
+    <script type="module" src="/main.js"></script>
23
+  </body>
24
+</html>

+ 23
- 0
DaoDaoFrontend/main.js View File

@@ -0,0 +1,23 @@
1
+import App from './App.vue';
2
+
3
+// #ifndef VUE3
4
+import Vue from 'vue'
5
+Vue.config.productionTip = false
6
+App.mpType = 'app'
7
+const app = new Vue({
8
+	...App
9
+})
10
+app.$mount()
11
+// #endif
12
+
13
+// #ifdef VUE3
14
+import {
15
+	createSSRApp
16
+} from 'vue'
17
+export function createApp() {
18
+	const app = createSSRApp(App);
19
+	return {
20
+		app
21
+	};
22
+}
23
+// #endif

+ 54
- 0
DaoDaoFrontend/manifest.json View File

@@ -0,0 +1,54 @@
1
+{
2
+    "name" : "Q导岛",
3
+    "appid" : "__UNI__A2B4B67",
4
+    "description" : "倒计时登录聊天室",
5
+    "versionName" : "1.0.0",
6
+    "versionCode" : "100",
7
+    "transformPx" : false,
8
+    "compatConfig" : {
9
+        "MODE" : 2
10
+    },
11
+    "app-plus" : {
12
+        "usingComponents" : true,
13
+        "compilerVersion" : 3,
14
+        "modules" : {},
15
+        "distribute" : {
16
+            "android" : {
17
+                "permissions" : [
18
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
19
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
20
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
21
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
22
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
23
+                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
24
+                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
25
+                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
26
+                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
27
+                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
28
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
29
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
30
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
31
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
32
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
33
+                ]
34
+            },
35
+            "ios" : {},
36
+            "sdkConfigs" : {}
37
+        }
38
+    },
39
+    "quickapp" : {},
40
+    "mp-weixin" : {
41
+        "appid" : "",
42
+        "setting" : {
43
+            "urlCheck" : true
44
+        },
45
+        "usingComponents" : true
46
+    },
47
+    "vueVersion" : "3",
48
+    "h5" : {
49
+        "router" : {
50
+            "base" : "./"
51
+        }
52
+    },
53
+    "locale" : "zh-Hans"
54
+}

+ 16
- 0
DaoDaoFrontend/node_modules/.bin/semver View File

@@ -0,0 +1,16 @@
1
+#!/bin/sh
2
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+case `uname` in
5
+    *CYGWIN*|*MINGW*|*MSYS*)
6
+        if command -v cygpath > /dev/null 2>&1; then
7
+            basedir=`cygpath -w "$basedir"`
8
+        fi
9
+    ;;
10
+esac
11
+
12
+if [ -x "$basedir/node" ]; then
13
+  exec "$basedir/node"  "$basedir/../semver/bin/semver.js" "$@"
14
+else 
15
+  exec node  "$basedir/../semver/bin/semver.js" "$@"
16
+fi

+ 17
- 0
DaoDaoFrontend/node_modules/.bin/semver.cmd View File

@@ -0,0 +1,17 @@
1
+@ECHO off
2
+GOTO start
3
+:find_dp0
4
+SET dp0=%~dp0
5
+EXIT /b
6
+:start
7
+SETLOCAL
8
+CALL :find_dp0
9
+
10
+IF EXIST "%dp0%\node.exe" (
11
+  SET "_prog=%dp0%\node.exe"
12
+) ELSE (
13
+  SET "_prog=node"
14
+  SET PATHEXT=%PATHEXT:;.JS;=;%
15
+)
16
+
17
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\semver\bin\semver.js" %*

+ 28
- 0
DaoDaoFrontend/node_modules/.bin/semver.ps1 View File

@@ -0,0 +1,28 @@
1
+#!/usr/bin/env pwsh
2
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
3
+
4
+$exe=""
5
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
6
+  # Fix case when both the Windows and Linux builds of Node
7
+  # are installed in the same directory
8
+  $exe=".exe"
9
+}
10
+$ret=0
11
+if (Test-Path "$basedir/node$exe") {
12
+  # Support pipeline input
13
+  if ($MyInvocation.ExpectingInput) {
14
+    $input | & "$basedir/node$exe"  "$basedir/../semver/bin/semver.js" $args
15
+  } else {
16
+    & "$basedir/node$exe"  "$basedir/../semver/bin/semver.js" $args
17
+  }
18
+  $ret=$LASTEXITCODE
19
+} else {
20
+  # Support pipeline input
21
+  if ($MyInvocation.ExpectingInput) {
22
+    $input | & "node$exe"  "$basedir/../semver/bin/semver.js" $args
23
+  } else {
24
+    & "node$exe"  "$basedir/../semver/bin/semver.js" $args
25
+  }
26
+  $ret=$LASTEXITCODE
27
+}
28
+exit $ret

+ 234
- 0
DaoDaoFrontend/node_modules/.package-lock.json View File

@@ -0,0 +1,234 @@
1
+{
2
+  "name": "底部选项卡模板",
3
+  "version": "0.0.9",
4
+  "lockfileVersion": 3,
5
+  "requires": true,
6
+  "packages": {
7
+    "node_modules/@socket.io/component-emitter": {
8
+      "version": "3.1.2",
9
+      "resolved": "https://registry.npmmirror.com/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz",
10
+      "integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA=="
11
+    },
12
+    "node_modules/buffer-equal-constant-time": {
13
+      "version": "1.0.1",
14
+      "resolved": "https://registry.npmmirror.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
15
+      "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA=="
16
+    },
17
+    "node_modules/debug": {
18
+      "version": "4.3.7",
19
+      "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.7.tgz",
20
+      "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
21
+      "dependencies": {
22
+        "ms": "^2.1.3"
23
+      },
24
+      "engines": {
25
+        "node": ">=6.0"
26
+      },
27
+      "peerDependenciesMeta": {
28
+        "supports-color": {
29
+          "optional": true
30
+        }
31
+      }
32
+    },
33
+    "node_modules/ecdsa-sig-formatter": {
34
+      "version": "1.0.11",
35
+      "resolved": "https://registry.npmmirror.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
36
+      "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",
37
+      "dependencies": {
38
+        "safe-buffer": "^5.0.1"
39
+      }
40
+    },
41
+    "node_modules/engine.io-client": {
42
+      "version": "6.6.1",
43
+      "resolved": "https://registry.npmmirror.com/engine.io-client/-/engine.io-client-6.6.1.tgz",
44
+      "integrity": "sha512-aYuoak7I+R83M/BBPIOs2to51BmFIpC1wZe6zZzMrT2llVsHy5cvcmdsJgP2Qz6smHu+sD9oexiSUAVd8OfBPw==",
45
+      "dependencies": {
46
+        "@socket.io/component-emitter": "~3.1.0",
47
+        "debug": "~4.3.1",
48
+        "engine.io-parser": "~5.2.1",
49
+        "ws": "~8.17.1",
50
+        "xmlhttprequest-ssl": "~2.1.1"
51
+      }
52
+    },
53
+    "node_modules/engine.io-parser": {
54
+      "version": "5.2.3",
55
+      "resolved": "https://registry.npmmirror.com/engine.io-parser/-/engine.io-parser-5.2.3.tgz",
56
+      "integrity": "sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==",
57
+      "engines": {
58
+        "node": ">=10.0.0"
59
+      }
60
+    },
61
+    "node_modules/jsonwebtoken": {
62
+      "version": "9.0.2",
63
+      "resolved": "https://registry.npmmirror.com/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz",
64
+      "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==",
65
+      "dependencies": {
66
+        "jws": "^3.2.2",
67
+        "lodash.includes": "^4.3.0",
68
+        "lodash.isboolean": "^3.0.3",
69
+        "lodash.isinteger": "^4.0.4",
70
+        "lodash.isnumber": "^3.0.3",
71
+        "lodash.isplainobject": "^4.0.6",
72
+        "lodash.isstring": "^4.0.1",
73
+        "lodash.once": "^4.0.0",
74
+        "ms": "^2.1.1",
75
+        "semver": "^7.5.4"
76
+      },
77
+      "engines": {
78
+        "node": ">=12",
79
+        "npm": ">=6"
80
+      }
81
+    },
82
+    "node_modules/jwa": {
83
+      "version": "1.4.1",
84
+      "resolved": "https://registry.npmmirror.com/jwa/-/jwa-1.4.1.tgz",
85
+      "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
86
+      "dependencies": {
87
+        "buffer-equal-constant-time": "1.0.1",
88
+        "ecdsa-sig-formatter": "1.0.11",
89
+        "safe-buffer": "^5.0.1"
90
+      }
91
+    },
92
+    "node_modules/jws": {
93
+      "version": "3.2.2",
94
+      "resolved": "https://registry.npmmirror.com/jws/-/jws-3.2.2.tgz",
95
+      "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
96
+      "dependencies": {
97
+        "jwa": "^1.4.1",
98
+        "safe-buffer": "^5.0.1"
99
+      }
100
+    },
101
+    "node_modules/jwt-decode": {
102
+      "version": "4.0.0",
103
+      "resolved": "https://registry.npmmirror.com/jwt-decode/-/jwt-decode-4.0.0.tgz",
104
+      "integrity": "sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==",
105
+      "engines": {
106
+        "node": ">=18"
107
+      }
108
+    },
109
+    "node_modules/lodash.includes": {
110
+      "version": "4.3.0",
111
+      "resolved": "https://registry.npmmirror.com/lodash.includes/-/lodash.includes-4.3.0.tgz",
112
+      "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w=="
113
+    },
114
+    "node_modules/lodash.isboolean": {
115
+      "version": "3.0.3",
116
+      "resolved": "https://registry.npmmirror.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
117
+      "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg=="
118
+    },
119
+    "node_modules/lodash.isinteger": {
120
+      "version": "4.0.4",
121
+      "resolved": "https://registry.npmmirror.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",
122
+      "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA=="
123
+    },
124
+    "node_modules/lodash.isnumber": {
125
+      "version": "3.0.3",
126
+      "resolved": "https://registry.npmmirror.com/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",
127
+      "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw=="
128
+    },
129
+    "node_modules/lodash.isplainobject": {
130
+      "version": "4.0.6",
131
+      "resolved": "https://registry.npmmirror.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
132
+      "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA=="
133
+    },
134
+    "node_modules/lodash.isstring": {
135
+      "version": "4.0.1",
136
+      "resolved": "https://registry.npmmirror.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
137
+      "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw=="
138
+    },
139
+    "node_modules/lodash.once": {
140
+      "version": "4.1.1",
141
+      "resolved": "https://registry.npmmirror.com/lodash.once/-/lodash.once-4.1.1.tgz",
142
+      "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg=="
143
+    },
144
+    "node_modules/ms": {
145
+      "version": "2.1.3",
146
+      "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz",
147
+      "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
148
+    },
149
+    "node_modules/safe-buffer": {
150
+      "version": "5.2.1",
151
+      "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz",
152
+      "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
153
+      "funding": [
154
+        {
155
+          "type": "github",
156
+          "url": "https://github.com/sponsors/feross"
157
+        },
158
+        {
159
+          "type": "patreon",
160
+          "url": "https://www.patreon.com/feross"
161
+        },
162
+        {
163
+          "type": "consulting",
164
+          "url": "https://feross.org/support"
165
+        }
166
+      ]
167
+    },
168
+    "node_modules/semver": {
169
+      "version": "7.6.3",
170
+      "resolved": "https://registry.npmmirror.com/semver/-/semver-7.6.3.tgz",
171
+      "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
172
+      "bin": {
173
+        "semver": "bin/semver.js"
174
+      },
175
+      "engines": {
176
+        "node": ">=10"
177
+      }
178
+    },
179
+    "node_modules/socket.io-client": {
180
+      "version": "4.8.0",
181
+      "resolved": "https://registry.npmmirror.com/socket.io-client/-/socket.io-client-4.8.0.tgz",
182
+      "integrity": "sha512-C0jdhD5yQahMws9alf/yvtsMGTaIDBnZ8Rb5HU56svyq0l5LIrGzIDZZD5pHQlmzxLuU91Gz+VpQMKgCTNYtkw==",
183
+      "dependencies": {
184
+        "@socket.io/component-emitter": "~3.1.0",
185
+        "debug": "~4.3.2",
186
+        "engine.io-client": "~6.6.1",
187
+        "socket.io-parser": "~4.2.4"
188
+      },
189
+      "engines": {
190
+        "node": ">=10.0.0"
191
+      }
192
+    },
193
+    "node_modules/socket.io-parser": {
194
+      "version": "4.2.4",
195
+      "resolved": "https://registry.npmmirror.com/socket.io-parser/-/socket.io-parser-4.2.4.tgz",
196
+      "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==",
197
+      "dependencies": {
198
+        "@socket.io/component-emitter": "~3.1.0",
199
+        "debug": "~4.3.1"
200
+      },
201
+      "engines": {
202
+        "node": ">=10.0.0"
203
+      }
204
+    },
205
+    "node_modules/ws": {
206
+      "version": "8.17.1",
207
+      "resolved": "https://registry.npmmirror.com/ws/-/ws-8.17.1.tgz",
208
+      "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==",
209
+      "engines": {
210
+        "node": ">=10.0.0"
211
+      },
212
+      "peerDependencies": {
213
+        "bufferutil": "^4.0.1",
214
+        "utf-8-validate": ">=5.0.2"
215
+      },
216
+      "peerDependenciesMeta": {
217
+        "bufferutil": {
218
+          "optional": true
219
+        },
220
+        "utf-8-validate": {
221
+          "optional": true
222
+        }
223
+      }
224
+    },
225
+    "node_modules/xmlhttprequest-ssl": {
226
+      "version": "2.1.1",
227
+      "resolved": "https://registry.npmmirror.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.1.1.tgz",
228
+      "integrity": "sha512-ptjR8YSJIXoA3Mbv5po7RtSYHO6mZr8s7i5VGmEk7QY2pQWyT1o0N+W1gKbOyJPUCGXGnuw0wqe8f0L6Y0ny7g==",
229
+      "engines": {
230
+        "node": ">=0.4.0"
231
+      }
232
+    }
233
+  }
234
+}

+ 13
- 0
DaoDaoFrontend/node_modules/.vite/deps/_metadata.json View File

@@ -0,0 +1,13 @@
1
+{
2
+  "hash": "5db2695a",
3
+  "browserHash": "ecca3361",
4
+  "optimized": {
5
+    "socket.io-client": {
6
+      "src": "../../socket.io-client/build/esm/index.js",
7
+      "file": "socket_io-client.js",
8
+      "fileHash": "9e1d6610",
9
+      "needsInterop": false
10
+    }
11
+  },
12
+  "chunks": {}
13
+}

+ 1
- 0
DaoDaoFrontend/node_modules/.vite/deps/package.json View File

@@ -0,0 +1 @@
1
+{"type":"module"}

+ 2606
- 0
DaoDaoFrontend/node_modules/.vite/deps/socket_io-client.js
File diff suppressed because it is too large
View File


+ 7
- 0
DaoDaoFrontend/node_modules/.vite/deps/socket_io-client.js.map
File diff suppressed because it is too large
View File


+ 24
- 0
DaoDaoFrontend/node_modules/@socket.io/component-emitter/LICENSE View File

@@ -0,0 +1,24 @@
1
+(The MIT License)
2
+
3
+Copyright (c) 2014 Component contributors <dev@component.io>
4
+
5
+Permission is hereby granted, free of charge, to any person
6
+obtaining a copy of this software and associated documentation
7
+files (the "Software"), to deal in the Software without
8
+restriction, including without limitation the rights to use,
9
+copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+copies of the Software, and to permit persons to whom the
11
+Software is furnished to do so, subject to the following
12
+conditions:
13
+
14
+The above copyright notice and this permission notice shall be
15
+included in all copies or substantial portions of the Software.
16
+
17
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24
+OTHER DEALINGS IN THE SOFTWARE.

+ 79
- 0
DaoDaoFrontend/node_modules/@socket.io/component-emitter/Readme.md View File

@@ -0,0 +1,79 @@
1
+# `@socket.io/component-emitter`
2
+
3
+  Event emitter component.
4
+
5
+This project is a fork of the [`component-emitter`](https://github.com/sindresorhus/component-emitter) project, with [Socket.IO](https://socket.io/)-specific TypeScript typings.
6
+
7
+## Installation
8
+
9
+```
10
+$ npm i @socket.io/component-emitter
11
+```
12
+
13
+## API
14
+
15
+### Emitter(obj)
16
+
17
+  The `Emitter` may also be used as a mixin. For example
18
+  a "plain" object may become an emitter, or you may
19
+  extend an existing prototype.
20
+
21
+  As an `Emitter` instance:
22
+
23
+```js
24
+import { Emitter } from '@socket.io/component-emitter';
25
+
26
+var emitter = new Emitter;
27
+emitter.emit('something');
28
+```
29
+
30
+  As a mixin:
31
+
32
+```js
33
+import { Emitter } from '@socket.io/component-emitter';
34
+
35
+var user = { name: 'tobi' };
36
+Emitter(user);
37
+
38
+user.emit('im a user');
39
+```
40
+
41
+  As a prototype mixin:
42
+
43
+```js
44
+import { Emitter } from '@socket.io/component-emitter';
45
+
46
+Emitter(User.prototype);
47
+```
48
+
49
+### Emitter#on(event, fn)
50
+
51
+  Register an `event` handler `fn`.
52
+
53
+### Emitter#once(event, fn)
54
+
55
+  Register a single-shot `event` handler `fn`,
56
+  removed immediately after it is invoked the
57
+  first time.
58
+
59
+### Emitter#off(event, fn)
60
+
61
+  * Pass `event` and `fn` to remove a listener.
62
+  * Pass `event` to remove all listeners on that event.
63
+  * Pass nothing to remove all listeners on all events.
64
+
65
+### Emitter#emit(event, ...)
66
+
67
+  Emit an `event` with variable option args.
68
+
69
+### Emitter#listeners(event)
70
+
71
+  Return an array of callbacks, or an empty array.
72
+
73
+### Emitter#hasListeners(event)
74
+
75
+  Check if this emitter has `event` handlers.
76
+
77
+## License
78
+
79
+MIT

+ 179
- 0
DaoDaoFrontend/node_modules/@socket.io/component-emitter/lib/cjs/index.d.ts View File

@@ -0,0 +1,179 @@
1
+/**
2
+ * An events map is an interface that maps event names to their value, which
3
+ * represents the type of the `on` listener.
4
+ */
5
+export interface EventsMap {
6
+    [event: string]: any;
7
+}
8
+
9
+/**
10
+ * The default events map, used if no EventsMap is given. Using this EventsMap
11
+ * is equivalent to accepting all event names, and any data.
12
+ */
13
+export interface DefaultEventsMap {
14
+    [event: string]: (...args: any[]) => void;
15
+}
16
+
17
+/**
18
+ * Returns a union type containing all the keys of an event map.
19
+ */
20
+export type EventNames<Map extends EventsMap> = keyof Map & (string | symbol);
21
+
22
+/** The tuple type representing the parameters of an event listener */
23
+export type EventParams<
24
+    Map extends EventsMap,
25
+    Ev extends EventNames<Map>
26
+    > = Parameters<Map[Ev]>;
27
+
28
+/**
29
+ * The event names that are either in ReservedEvents or in UserEvents
30
+ */
31
+export type ReservedOrUserEventNames<
32
+    ReservedEventsMap extends EventsMap,
33
+    UserEvents extends EventsMap
34
+    > = EventNames<ReservedEventsMap> | EventNames<UserEvents>;
35
+
36
+/**
37
+ * Type of a listener of a user event or a reserved event. If `Ev` is in
38
+ * `ReservedEvents`, the reserved event listener is returned.
39
+ */
40
+export type ReservedOrUserListener<
41
+    ReservedEvents extends EventsMap,
42
+    UserEvents extends EventsMap,
43
+    Ev extends ReservedOrUserEventNames<ReservedEvents, UserEvents>
44
+    > = FallbackToUntypedListener<
45
+    Ev extends EventNames<ReservedEvents>
46
+        ? ReservedEvents[Ev]
47
+        : Ev extends EventNames<UserEvents>
48
+        ? UserEvents[Ev]
49
+        : never
50
+    >;
51
+
52
+/**
53
+ * Returns an untyped listener type if `T` is `never`; otherwise, returns `T`.
54
+ *
55
+ * This is a hack to mitigate https://github.com/socketio/socket.io/issues/3833.
56
+ * Needed because of https://github.com/microsoft/TypeScript/issues/41778
57
+ */
58
+type FallbackToUntypedListener<T> = [T] extends [never]
59
+    ? (...args: any[]) => void | Promise<void>
60
+    : T;
61
+
62
+/**
63
+ * Strictly typed version of an `EventEmitter`. A `TypedEventEmitter` takes type
64
+ * parameters for mappings of event names to event data types, and strictly
65
+ * types method calls to the `EventEmitter` according to these event maps.
66
+ *
67
+ * @typeParam ListenEvents - `EventsMap` of user-defined events that can be
68
+ * listened to with `on` or `once`
69
+ * @typeParam EmitEvents - `EventsMap` of user-defined events that can be
70
+ * emitted with `emit`
71
+ * @typeParam ReservedEvents - `EventsMap` of reserved events, that can be
72
+ * emitted by socket.io with `emitReserved`, and can be listened to with
73
+ * `listen`.
74
+ */
75
+export class Emitter<
76
+    ListenEvents extends EventsMap,
77
+    EmitEvents extends EventsMap,
78
+    ReservedEvents extends EventsMap = {}
79
+    > {
80
+    /**
81
+     * Adds the `listener` function as an event listener for `ev`.
82
+     *
83
+     * @param ev Name of the event
84
+     * @param listener Callback function
85
+     */
86
+    on<Ev extends ReservedOrUserEventNames<ReservedEvents, ListenEvents>>(
87
+        ev: Ev,
88
+        listener: ReservedOrUserListener<ReservedEvents, ListenEvents, Ev>
89
+    ): this;
90
+
91
+    /**
92
+     * Adds a one-time `listener` function as an event listener for `ev`.
93
+     *
94
+     * @param ev Name of the event
95
+     * @param listener Callback function
96
+     */
97
+    once<Ev extends ReservedOrUserEventNames<ReservedEvents, ListenEvents>>(
98
+        ev: Ev,
99
+        listener: ReservedOrUserListener<ReservedEvents, ListenEvents, Ev>
100
+    ): this;
101
+
102
+    /**
103
+     * Removes the `listener` function as an event listener for `ev`.
104
+     *
105
+     * @param ev Name of the event
106
+     * @param listener Callback function
107
+     */
108
+    off<Ev extends ReservedOrUserEventNames<ReservedEvents, ListenEvents>>(
109
+        ev?: Ev,
110
+        listener?: ReservedOrUserListener<ReservedEvents, ListenEvents, Ev>
111
+    ): this;
112
+
113
+    /**
114
+     * Emits an event.
115
+     *
116
+     * @param ev Name of the event
117
+     * @param args Values to send to listeners of this event
118
+     */
119
+    emit<Ev extends EventNames<EmitEvents>>(
120
+        ev: Ev,
121
+        ...args: EventParams<EmitEvents, Ev>
122
+    ): this;
123
+
124
+    /**
125
+     * Emits a reserved event.
126
+     *
127
+     * This method is `protected`, so that only a class extending
128
+     * `StrictEventEmitter` can emit its own reserved events.
129
+     *
130
+     * @param ev Reserved event name
131
+     * @param args Arguments to emit along with the event
132
+     */
133
+    protected emitReserved<Ev extends EventNames<ReservedEvents>>(
134
+        ev: Ev,
135
+        ...args: EventParams<ReservedEvents, Ev>
136
+    ): this;
137
+
138
+    /**
139
+     * Returns the listeners listening to an event.
140
+     *
141
+     * @param event Event name
142
+     * @returns Array of listeners subscribed to `event`
143
+     */
144
+    listeners<Ev extends ReservedOrUserEventNames<ReservedEvents, ListenEvents>>(
145
+        event: Ev
146
+    ): ReservedOrUserListener<ReservedEvents, ListenEvents, Ev>[];
147
+
148
+    /**
149
+     * Returns true if there is a listener for this event.
150
+     *
151
+     * @param event Event name
152
+     * @returns boolean
153
+     */
154
+    hasListeners<
155
+        Ev extends ReservedOrUserEventNames<ReservedEvents, ListenEvents>
156
+        >(event: Ev): boolean;
157
+
158
+    /**
159
+     * Removes the `listener` function as an event listener for `ev`.
160
+     *
161
+     * @param ev Name of the event
162
+     * @param listener Callback function
163
+     */
164
+    removeListener<
165
+        Ev extends ReservedOrUserEventNames<ReservedEvents, ListenEvents>
166
+        >(
167
+        ev?: Ev,
168
+        listener?: ReservedOrUserListener<ReservedEvents, ListenEvents, Ev>
169
+    ): this;
170
+
171
+    /**
172
+     * Removes all `listener` function as an event listener for `ev`.
173
+     *
174
+     * @param ev Name of the event
175
+     */
176
+    removeAllListeners<
177
+        Ev extends ReservedOrUserEventNames<ReservedEvents, ListenEvents>
178
+        >(ev?: Ev): this;
179
+}

+ 176
- 0
DaoDaoFrontend/node_modules/@socket.io/component-emitter/lib/cjs/index.js View File

@@ -0,0 +1,176 @@
1
+
2
+/**
3
+ * Expose `Emitter`.
4
+ */
5
+
6
+exports.Emitter = Emitter;
7
+
8
+/**
9
+ * Initialize a new `Emitter`.
10
+ *
11
+ * @api public
12
+ */
13
+
14
+function Emitter(obj) {
15
+  if (obj) return mixin(obj);
16
+}
17
+
18
+/**
19
+ * Mixin the emitter properties.
20
+ *
21
+ * @param {Object} obj
22
+ * @return {Object}
23
+ * @api private
24
+ */
25
+
26
+function mixin(obj) {
27
+  for (var key in Emitter.prototype) {
28
+    obj[key] = Emitter.prototype[key];
29
+  }
30
+  return obj;
31
+}
32
+
33
+/**
34
+ * Listen on the given `event` with `fn`.
35
+ *
36
+ * @param {String} event
37
+ * @param {Function} fn
38
+ * @return {Emitter}
39
+ * @api public
40
+ */
41
+
42
+Emitter.prototype.on =
43
+Emitter.prototype.addEventListener = function(event, fn){
44
+  this._callbacks = this._callbacks || {};
45
+  (this._callbacks['$' + event] = this._callbacks['$' + event] || [])
46
+    .push(fn);
47
+  return this;
48
+};
49
+
50
+/**
51
+ * Adds an `event` listener that will be invoked a single
52
+ * time then automatically removed.
53
+ *
54
+ * @param {String} event
55
+ * @param {Function} fn
56
+ * @return {Emitter}
57
+ * @api public
58
+ */
59
+
60
+Emitter.prototype.once = function(event, fn){
61
+  function on() {
62
+    this.off(event, on);
63
+    fn.apply(this, arguments);
64
+  }
65
+
66
+  on.fn = fn;
67
+  this.on(event, on);
68
+  return this;
69
+};
70
+
71
+/**
72
+ * Remove the given callback for `event` or all
73
+ * registered callbacks.
74
+ *
75
+ * @param {String} event
76
+ * @param {Function} fn
77
+ * @return {Emitter}
78
+ * @api public
79
+ */
80
+
81
+Emitter.prototype.off =
82
+Emitter.prototype.removeListener =
83
+Emitter.prototype.removeAllListeners =
84
+Emitter.prototype.removeEventListener = function(event, fn){
85
+  this._callbacks = this._callbacks || {};
86
+
87
+  // all
88
+  if (0 == arguments.length) {
89
+    this._callbacks = {};
90
+    return this;
91
+  }
92
+
93
+  // specific event
94
+  var callbacks = this._callbacks['$' + event];
95
+  if (!callbacks) return this;
96
+
97
+  // remove all handlers
98
+  if (1 == arguments.length) {
99
+    delete this._callbacks['$' + event];
100
+    return this;
101
+  }
102
+
103
+  // remove specific handler
104
+  var cb;
105
+  for (var i = 0; i < callbacks.length; i++) {
106
+    cb = callbacks[i];
107
+    if (cb === fn || cb.fn === fn) {
108
+      callbacks.splice(i, 1);
109
+      break;
110
+    }
111
+  }
112
+
113
+  // Remove event specific arrays for event types that no
114
+  // one is subscribed for to avoid memory leak.
115
+  if (callbacks.length === 0) {
116
+    delete this._callbacks['$' + event];
117
+  }
118
+
119
+  return this;
120
+};
121
+
122
+/**
123
+ * Emit `event` with the given args.
124
+ *
125
+ * @param {String} event
126
+ * @param {Mixed} ...
127
+ * @return {Emitter}
128
+ */
129
+
130
+Emitter.prototype.emit = function(event){
131
+  this._callbacks = this._callbacks || {};
132
+
133
+  var args = new Array(arguments.length - 1)
134
+    , callbacks = this._callbacks['$' + event];
135
+
136
+  for (var i = 1; i < arguments.length; i++) {
137
+    args[i - 1] = arguments[i];
138
+  }
139
+
140
+  if (callbacks) {
141
+    callbacks = callbacks.slice(0);
142
+    for (var i = 0, len = callbacks.length; i < len; ++i) {
143
+      callbacks[i].apply(this, args);
144
+    }
145
+  }
146
+
147
+  return this;
148
+};
149
+
150
+// alias used for reserved events (protected method)
151
+Emitter.prototype.emitReserved = Emitter.prototype.emit;
152
+
153
+/**
154
+ * Return array of callbacks for `event`.
155
+ *
156
+ * @param {String} event
157
+ * @return {Array}
158
+ * @api public
159
+ */
160
+
161
+Emitter.prototype.listeners = function(event){
162
+  this._callbacks = this._callbacks || {};
163
+  return this._callbacks['$' + event] || [];
164
+};
165
+
166
+/**
167
+ * Check if this emitter has `event` handlers.
168
+ *
169
+ * @param {String} event
170
+ * @return {Boolean}
171
+ * @api public
172
+ */
173
+
174
+Emitter.prototype.hasListeners = function(event){
175
+  return !! this.listeners(event).length;
176
+};

+ 4
- 0
DaoDaoFrontend/node_modules/@socket.io/component-emitter/lib/cjs/package.json View File

@@ -0,0 +1,4 @@
1
+{
2
+  "name": "@socket.io/component-emitter",
3
+  "type": "commonjs"
4
+}

+ 179
- 0
DaoDaoFrontend/node_modules/@socket.io/component-emitter/lib/esm/index.d.ts View File

@@ -0,0 +1,179 @@
1
+/**
2
+ * An events map is an interface that maps event names to their value, which
3
+ * represents the type of the `on` listener.
4
+ */
5
+export interface EventsMap {
6
+    [event: string]: any;
7
+}
8
+
9
+/**
10
+ * The default events map, used if no EventsMap is given. Using this EventsMap
11
+ * is equivalent to accepting all event names, and any data.
12
+ */
13
+export interface DefaultEventsMap {
14
+    [event: string]: (...args: any[]) => void;
15
+}
16
+
17
+/**
18
+ * Returns a union type containing all the keys of an event map.
19
+ */
20
+export type EventNames<Map extends EventsMap> = keyof Map & (string | symbol);
21
+
22
+/** The tuple type representing the parameters of an event listener */
23
+export type EventParams<
24
+    Map extends EventsMap,
25
+    Ev extends EventNames<Map>
26
+    > = Parameters<Map[Ev]>;
27
+
28
+/**
29
+ * The event names that are either in ReservedEvents or in UserEvents
30
+ */
31
+export type ReservedOrUserEventNames<
32
+    ReservedEventsMap extends EventsMap,
33
+    UserEvents extends EventsMap
34
+    > = EventNames<ReservedEventsMap> | EventNames<UserEvents>;
35
+
36
+/**
37
+ * Type of a listener of a user event or a reserved event. If `Ev` is in
38
+ * `ReservedEvents`, the reserved event listener is returned.
39
+ */
40
+export type ReservedOrUserListener<
41
+    ReservedEvents extends EventsMap,
42
+    UserEvents extends EventsMap,
43
+    Ev extends ReservedOrUserEventNames<ReservedEvents, UserEvents>
44
+    > = FallbackToUntypedListener<
45
+    Ev extends EventNames<ReservedEvents>
46
+        ? ReservedEvents[Ev]
47
+        : Ev extends EventNames<UserEvents>
48
+        ? UserEvents[Ev]
49
+        : never
50
+    >;
51
+
52
+/**
53
+ * Returns an untyped listener type if `T` is `never`; otherwise, returns `T`.
54
+ *
55
+ * This is a hack to mitigate https://github.com/socketio/socket.io/issues/3833.
56
+ * Needed because of https://github.com/microsoft/TypeScript/issues/41778
57
+ */
58
+type FallbackToUntypedListener<T> = [T] extends [never]
59
+    ? (...args: any[]) => void | Promise<void>
60
+    : T;
61
+
62
+/**
63
+ * Strictly typed version of an `EventEmitter`. A `TypedEventEmitter` takes type
64
+ * parameters for mappings of event names to event data types, and strictly
65
+ * types method calls to the `EventEmitter` according to these event maps.
66
+ *
67
+ * @typeParam ListenEvents - `EventsMap` of user-defined events that can be
68
+ * listened to with `on` or `once`
69
+ * @typeParam EmitEvents - `EventsMap` of user-defined events that can be
70
+ * emitted with `emit`
71
+ * @typeParam ReservedEvents - `EventsMap` of reserved events, that can be
72
+ * emitted by socket.io with `emitReserved`, and can be listened to with
73
+ * `listen`.
74
+ */
75
+export class Emitter<
76
+    ListenEvents extends EventsMap,
77
+    EmitEvents extends EventsMap,
78
+    ReservedEvents extends EventsMap = {}
79
+    > {
80
+    /**
81
+     * Adds the `listener` function as an event listener for `ev`.
82
+     *
83
+     * @param ev Name of the event
84
+     * @param listener Callback function
85
+     */
86
+    on<Ev extends ReservedOrUserEventNames<ReservedEvents, ListenEvents>>(
87
+        ev: Ev,
88
+        listener: ReservedOrUserListener<ReservedEvents, ListenEvents, Ev>
89
+    ): this;
90
+
91
+    /**
92
+     * Adds a one-time `listener` function as an event listener for `ev`.
93
+     *
94
+     * @param ev Name of the event
95
+     * @param listener Callback function
96
+     */
97
+    once<Ev extends ReservedOrUserEventNames<ReservedEvents, ListenEvents>>(
98
+        ev: Ev,
99
+        listener: ReservedOrUserListener<ReservedEvents, ListenEvents, Ev>
100
+    ): this;
101
+
102
+    /**
103
+     * Removes the `listener` function as an event listener for `ev`.
104
+     *
105
+     * @param ev Name of the event
106
+     * @param listener Callback function
107
+     */
108
+    off<Ev extends ReservedOrUserEventNames<ReservedEvents, ListenEvents>>(
109
+        ev?: Ev,
110
+        listener?: ReservedOrUserListener<ReservedEvents, ListenEvents, Ev>
111
+    ): this;
112
+
113
+    /**
114
+     * Emits an event.
115
+     *
116
+     * @param ev Name of the event
117
+     * @param args Values to send to listeners of this event
118
+     */
119
+    emit<Ev extends EventNames<EmitEvents>>(
120
+        ev: Ev,
121
+        ...args: EventParams<EmitEvents, Ev>
122
+    ): this;
123
+
124
+    /**
125
+     * Emits a reserved event.
126
+     *
127
+     * This method is `protected`, so that only a class extending
128
+     * `StrictEventEmitter` can emit its own reserved events.
129
+     *
130
+     * @param ev Reserved event name
131
+     * @param args Arguments to emit along with the event
132
+     */
133
+    protected emitReserved<Ev extends EventNames<ReservedEvents>>(
134
+        ev: Ev,
135
+        ...args: EventParams<ReservedEvents, Ev>
136
+    ): this;
137
+
138
+    /**
139
+     * Returns the listeners listening to an event.
140
+     *
141
+     * @param event Event name
142
+     * @returns Array of listeners subscribed to `event`
143
+     */
144
+    listeners<Ev extends ReservedOrUserEventNames<ReservedEvents, ListenEvents>>(
145
+        event: Ev
146
+    ): ReservedOrUserListener<ReservedEvents, ListenEvents, Ev>[];
147
+
148
+    /**
149
+     * Returns true if there is a listener for this event.
150
+     *
151
+     * @param event Event name
152
+     * @returns boolean
153
+     */
154
+    hasListeners<
155
+        Ev extends ReservedOrUserEventNames<ReservedEvents, ListenEvents>
156
+        >(event: Ev): boolean;
157
+
158
+    /**
159
+     * Removes the `listener` function as an event listener for `ev`.
160
+     *
161
+     * @param ev Name of the event
162
+     * @param listener Callback function
163
+     */
164
+    removeListener<
165
+        Ev extends ReservedOrUserEventNames<ReservedEvents, ListenEvents>
166
+        >(
167
+        ev?: Ev,
168
+        listener?: ReservedOrUserListener<ReservedEvents, ListenEvents, Ev>
169
+    ): this;
170
+
171
+    /**
172
+     * Removes all `listener` function as an event listener for `ev`.
173
+     *
174
+     * @param ev Name of the event
175
+     */
176
+    removeAllListeners<
177
+        Ev extends ReservedOrUserEventNames<ReservedEvents, ListenEvents>
178
+        >(ev?: Ev): this;
179
+}

+ 169
- 0
DaoDaoFrontend/node_modules/@socket.io/component-emitter/lib/esm/index.js View File

@@ -0,0 +1,169 @@
1
+/**
2
+ * Initialize a new `Emitter`.
3
+ *
4
+ * @api public
5
+ */
6
+
7
+export function Emitter(obj) {
8
+  if (obj) return mixin(obj);
9
+}
10
+
11
+/**
12
+ * Mixin the emitter properties.
13
+ *
14
+ * @param {Object} obj
15
+ * @return {Object}
16
+ * @api private
17
+ */
18
+
19
+function mixin(obj) {
20
+  for (var key in Emitter.prototype) {
21
+    obj[key] = Emitter.prototype[key];
22
+  }
23
+  return obj;
24
+}
25
+
26
+/**
27
+ * Listen on the given `event` with `fn`.
28
+ *
29
+ * @param {String} event
30
+ * @param {Function} fn
31
+ * @return {Emitter}
32
+ * @api public
33
+ */
34
+
35
+Emitter.prototype.on =
36
+Emitter.prototype.addEventListener = function(event, fn){
37
+  this._callbacks = this._callbacks || {};
38
+  (this._callbacks['$' + event] = this._callbacks['$' + event] || [])
39
+    .push(fn);
40
+  return this;
41
+};
42
+
43
+/**
44
+ * Adds an `event` listener that will be invoked a single
45
+ * time then automatically removed.
46
+ *
47
+ * @param {String} event
48
+ * @param {Function} fn
49
+ * @return {Emitter}
50
+ * @api public
51
+ */
52
+
53
+Emitter.prototype.once = function(event, fn){
54
+  function on() {
55
+    this.off(event, on);
56
+    fn.apply(this, arguments);
57
+  }
58
+
59
+  on.fn = fn;
60
+  this.on(event, on);
61
+  return this;
62
+};
63
+
64
+/**
65
+ * Remove the given callback for `event` or all
66
+ * registered callbacks.
67
+ *
68
+ * @param {String} event
69
+ * @param {Function} fn
70
+ * @return {Emitter}
71
+ * @api public
72
+ */
73
+
74
+Emitter.prototype.off =
75
+Emitter.prototype.removeListener =
76
+Emitter.prototype.removeAllListeners =
77
+Emitter.prototype.removeEventListener = function(event, fn){
78
+  this._callbacks = this._callbacks || {};
79
+
80
+  // all
81
+  if (0 == arguments.length) {
82
+    this._callbacks = {};
83
+    return this;
84
+  }
85
+
86
+  // specific event
87
+  var callbacks = this._callbacks['$' + event];
88
+  if (!callbacks) return this;
89
+
90
+  // remove all handlers
91
+  if (1 == arguments.length) {
92
+    delete this._callbacks['$' + event];
93
+    return this;
94
+  }
95
+
96
+  // remove specific handler
97
+  var cb;
98
+  for (var i = 0; i < callbacks.length; i++) {
99
+    cb = callbacks[i];
100
+    if (cb === fn || cb.fn === fn) {
101
+      callbacks.splice(i, 1);
102
+      break;
103
+    }
104
+  }
105
+
106
+  // Remove event specific arrays for event types that no
107
+  // one is subscribed for to avoid memory leak.
108
+  if (callbacks.length === 0) {
109
+    delete this._callbacks['$' + event];
110
+  }
111
+
112
+  return this;
113
+};
114
+
115
+/**
116
+ * Emit `event` with the given args.
117
+ *
118
+ * @param {String} event
119
+ * @param {Mixed} ...
120
+ * @return {Emitter}
121
+ */
122
+
123
+Emitter.prototype.emit = function(event){
124
+  this._callbacks = this._callbacks || {};
125
+
126
+  var args = new Array(arguments.length - 1)
127
+    , callbacks = this._callbacks['$' + event];
128
+
129
+  for (var i = 1; i < arguments.length; i++) {
130
+    args[i - 1] = arguments[i];
131
+  }
132
+
133
+  if (callbacks) {
134
+    callbacks = callbacks.slice(0);
135
+    for (var i = 0, len = callbacks.length; i < len; ++i) {
136
+      callbacks[i].apply(this, args);
137
+    }
138
+  }
139
+
140
+  return this;
141
+};
142
+
143
+// alias used for reserved events (protected method)
144
+Emitter.prototype.emitReserved = Emitter.prototype.emit;
145
+
146
+/**
147
+ * Return array of callbacks for `event`.
148
+ *
149
+ * @param {String} event
150
+ * @return {Array}
151
+ * @api public
152
+ */
153
+
154
+Emitter.prototype.listeners = function(event){
155
+  this._callbacks = this._callbacks || {};
156
+  return this._callbacks['$' + event] || [];
157
+};
158
+
159
+/**
160
+ * Check if this emitter has `event` handlers.
161
+ *
162
+ * @param {String} event
163
+ * @return {Boolean}
164
+ * @api public
165
+ */
166
+
167
+Emitter.prototype.hasListeners = function(event){
168
+  return !! this.listeners(event).length;
169
+};

+ 4
- 0
DaoDaoFrontend/node_modules/@socket.io/component-emitter/lib/esm/package.json View File

@@ -0,0 +1,4 @@
1
+{
2
+  "name": "@socket.io/component-emitter",
3
+  "type": "module"
4
+}

+ 28
- 0
DaoDaoFrontend/node_modules/@socket.io/component-emitter/package.json View File

@@ -0,0 +1,28 @@
1
+{
2
+  "name": "@socket.io/component-emitter",
3
+  "description": "Event emitter",
4
+  "version": "3.1.2",
5
+  "license": "MIT",
6
+  "devDependencies": {
7
+    "mocha": "*",
8
+    "should": "*"
9
+  },
10
+  "component": {
11
+    "scripts": {
12
+      "emitter/index.js": "index.js"
13
+    }
14
+  },
15
+  "main": "./lib/cjs/index.js",
16
+  "module": "./lib/esm/index.js",
17
+  "types": "./lib/cjs/index.d.ts",
18
+  "repository": {
19
+    "type": "git",
20
+    "url": "https://github.com/socketio/emitter.git"
21
+  },
22
+  "scripts": {
23
+    "test": "make test"
24
+  },
25
+  "files": [
26
+    "lib/"
27
+  ]
28
+}

+ 2
- 0
DaoDaoFrontend/node_modules/buffer-equal-constant-time/.npmignore View File

@@ -0,0 +1,2 @@
1
+.*.sw[mnop]
2
+node_modules/

+ 4
- 0
DaoDaoFrontend/node_modules/buffer-equal-constant-time/.travis.yml View File

@@ -0,0 +1,4 @@
1
+language: node_js
2
+node_js:
3
+- "0.11"
4
+- "0.10"

+ 12
- 0
DaoDaoFrontend/node_modules/buffer-equal-constant-time/LICENSE.txt View File

@@ -0,0 +1,12 @@
1
+Copyright (c) 2013, GoInstant Inc., a salesforce.com company
2
+All rights reserved.
3
+
4
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5
+
6
+* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7
+
8
+* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9
+
10
+* Neither the name of salesforce.com, nor GoInstant, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
11
+
12
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 50
- 0
DaoDaoFrontend/node_modules/buffer-equal-constant-time/README.md View File

@@ -0,0 +1,50 @@
1
+# buffer-equal-constant-time
2
+
3
+Constant-time `Buffer` comparison for node.js.  Should work with browserify too.
4
+
5
+[![Build Status](https://travis-ci.org/goinstant/buffer-equal-constant-time.png?branch=master)](https://travis-ci.org/goinstant/buffer-equal-constant-time)
6
+
7
+```sh
8
+  npm install buffer-equal-constant-time
9
+```
10
+
11
+# Usage
12
+
13
+```js
14
+  var bufferEq = require('buffer-equal-constant-time');
15
+
16
+  var a = new Buffer('asdf');
17
+  var b = new Buffer('asdf');
18
+  if (bufferEq(a,b)) {
19
+    // the same!
20
+  } else {
21
+    // different in at least one byte!
22
+  }
23
+```
24
+
25
+If you'd like to install an `.equal()` method onto the node.js `Buffer` and
26
+`SlowBuffer` prototypes:
27
+
28
+```js
29
+  require('buffer-equal-constant-time').install();
30
+
31
+  var a = new Buffer('asdf');
32
+  var b = new Buffer('asdf');
33
+  if (a.equal(b)) {
34
+    // the same!
35
+  } else {
36
+    // different in at least one byte!
37
+  }
38
+```
39
+
40
+To get rid of the installed `.equal()` method, call `.restore()`:
41
+
42
+```js
43
+  require('buffer-equal-constant-time').restore();
44
+```
45
+
46
+# Legal
47
+
48
+&copy; 2013 GoInstant Inc., a salesforce.com company
49
+
50
+Licensed under the BSD 3-clause license.

+ 41
- 0
DaoDaoFrontend/node_modules/buffer-equal-constant-time/index.js View File

@@ -0,0 +1,41 @@
1
+/*jshint node:true */
2
+'use strict';
3
+var Buffer = require('buffer').Buffer; // browserify
4
+var SlowBuffer = require('buffer').SlowBuffer;
5
+
6
+module.exports = bufferEq;
7
+
8
+function bufferEq(a, b) {
9
+
10
+  // shortcutting on type is necessary for correctness
11
+  if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
12
+    return false;
13
+  }
14
+
15
+  // buffer sizes should be well-known information, so despite this
16
+  // shortcutting, it doesn't leak any information about the *contents* of the
17
+  // buffers.
18
+  if (a.length !== b.length) {
19
+    return false;
20
+  }
21
+
22
+  var c = 0;
23
+  for (var i = 0; i < a.length; i++) {
24
+    /*jshint bitwise:false */
25
+    c |= a[i] ^ b[i]; // XOR
26
+  }
27
+  return c === 0;
28
+}
29
+
30
+bufferEq.install = function() {
31
+  Buffer.prototype.equal = SlowBuffer.prototype.equal = function equal(that) {
32
+    return bufferEq(this, that);
33
+  };
34
+};
35
+
36
+var origBufEqual = Buffer.prototype.equal;
37
+var origSlowBufEqual = SlowBuffer.prototype.equal;
38
+bufferEq.restore = function() {
39
+  Buffer.prototype.equal = origBufEqual;
40
+  SlowBuffer.prototype.equal = origSlowBufEqual;
41
+};

+ 21
- 0
DaoDaoFrontend/node_modules/buffer-equal-constant-time/package.json View File

@@ -0,0 +1,21 @@
1
+{
2
+  "name": "buffer-equal-constant-time",
3
+  "version": "1.0.1",
4
+  "description": "Constant-time comparison of Buffers",
5
+  "main": "index.js",
6
+  "scripts": {
7
+    "test": "mocha test.js"
8
+  },
9
+  "repository": "git@github.com:goinstant/buffer-equal-constant-time.git",
10
+  "keywords": [
11
+    "buffer",
12
+    "equal",
13
+    "constant-time",
14
+    "crypto"
15
+  ],
16
+  "author": "GoInstant Inc., a salesforce.com company",
17
+  "license": "BSD-3-Clause",
18
+  "devDependencies": {
19
+    "mocha": "~1.15.1"
20
+  }
21
+}

+ 42
- 0
DaoDaoFrontend/node_modules/buffer-equal-constant-time/test.js View File

@@ -0,0 +1,42 @@
1
+/*jshint node:true */
2
+'use strict';
3
+
4
+var bufferEq = require('./index');
5
+var assert = require('assert');
6
+
7
+describe('buffer-equal-constant-time', function() {
8
+  var a = new Buffer('asdfasdf123456');
9
+  var b = new Buffer('asdfasdf123456');
10
+  var c = new Buffer('asdfasdf');
11
+
12
+  describe('bufferEq', function() {
13
+    it('says a == b', function() {
14
+      assert.strictEqual(bufferEq(a, b), true);
15
+    });
16
+
17
+    it('says a != c', function() {
18
+      assert.strictEqual(bufferEq(a, c), false);
19
+    });
20
+  });
21
+
22
+  describe('install/restore', function() {
23
+    before(function() {
24
+      bufferEq.install();
25
+    });
26
+    after(function() {
27
+      bufferEq.restore();
28
+    });
29
+
30
+    it('installed an .equal method', function() {
31
+      var SlowBuffer = require('buffer').SlowBuffer;
32
+      assert.ok(Buffer.prototype.equal);
33
+      assert.ok(SlowBuffer.prototype.equal);
34
+    });
35
+
36
+    it('infected existing Buffers', function() {
37
+      assert.strictEqual(a.equal(b), true);
38
+      assert.strictEqual(a.equal(c), false);
39
+    });
40
+  });
41
+
42
+});

+ 20
- 0
DaoDaoFrontend/node_modules/debug/LICENSE View File

@@ -0,0 +1,20 @@
1
+(The MIT License)
2
+
3
+Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
4
+Copyright (c) 2018-2021 Josh Junon
5
+
6
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software
7
+and associated documentation files (the 'Software'), to deal in the Software without restriction,
8
+including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
9
+and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
10
+subject to the following conditions:
11
+
12
+The above copyright notice and this permission notice shall be included in all copies or substantial
13
+portions of the Software.
14
+
15
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
16
+LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
18
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
19
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+

+ 481
- 0
DaoDaoFrontend/node_modules/debug/README.md View File

@@ -0,0 +1,481 @@
1
+# debug
2
+[![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers)
3
+[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors)
4
+
5
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
6
+
7
+A tiny JavaScript debugging utility modelled after Node.js core's debugging
8
+technique. Works in Node.js and web browsers.
9
+
10
+## Installation
11
+
12
+```bash
13
+$ npm install debug
14
+```
15
+
16
+## Usage
17
+
18
+`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
19
+
20
+Example [_app.js_](./examples/node/app.js):
21
+
22
+```js
23
+var debug = require('debug')('http')
24
+  , http = require('http')
25
+  , name = 'My App';
26
+
27
+// fake app
28
+
29
+debug('booting %o', name);
30
+
31
+http.createServer(function(req, res){
32
+  debug(req.method + ' ' + req.url);
33
+  res.end('hello\n');
34
+}).listen(3000, function(){
35
+  debug('listening');
36
+});
37
+
38
+// fake worker of some kind
39
+
40
+require('./worker');
41
+```
42
+
43
+Example [_worker.js_](./examples/node/worker.js):
44
+
45
+```js
46
+var a = require('debug')('worker:a')
47
+  , b = require('debug')('worker:b');
48
+
49
+function work() {
50
+  a('doing lots of uninteresting work');
51
+  setTimeout(work, Math.random() * 1000);
52
+}
53
+
54
+work();
55
+
56
+function workb() {
57
+  b('doing some work');
58
+  setTimeout(workb, Math.random() * 2000);
59
+}
60
+
61
+workb();
62
+```
63
+
64
+The `DEBUG` environment variable is then used to enable these based on space or
65
+comma-delimited names.
66
+
67
+Here are some examples:
68
+
69
+<img width="647" alt="screen shot 2017-08-08 at 12 53 04 pm" src="https://user-images.githubusercontent.com/71256/29091703-a6302cdc-7c38-11e7-8304-7c0b3bc600cd.png">
70
+<img width="647" alt="screen shot 2017-08-08 at 12 53 38 pm" src="https://user-images.githubusercontent.com/71256/29091700-a62a6888-7c38-11e7-800b-db911291ca2b.png">
71
+<img width="647" alt="screen shot 2017-08-08 at 12 53 25 pm" src="https://user-images.githubusercontent.com/71256/29091701-a62ea114-7c38-11e7-826a-2692bedca740.png">
72
+
73
+#### Windows command prompt notes
74
+
75
+##### CMD
76
+
77
+On Windows the environment variable is set using the `set` command.
78
+
79
+```cmd
80
+set DEBUG=*,-not_this
81
+```
82
+
83
+Example:
84
+
85
+```cmd
86
+set DEBUG=* & node app.js
87
+```
88
+
89
+##### PowerShell (VS Code default)
90
+
91
+PowerShell uses different syntax to set environment variables.
92
+
93
+```cmd
94
+$env:DEBUG = "*,-not_this"
95
+```
96
+
97
+Example:
98
+
99
+```cmd
100
+$env:DEBUG='app';node app.js
101
+```
102
+
103
+Then, run the program to be debugged as usual.
104
+
105
+npm script example:
106
+```js
107
+  "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js",
108
+```
109
+
110
+## Namespace Colors
111
+
112
+Every debug instance has a color generated for it based on its namespace name.
113
+This helps when visually parsing the debug output to identify which debug instance
114
+a debug line belongs to.
115
+
116
+#### Node.js
117
+
118
+In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
119
+the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
120
+otherwise debug will only use a small handful of basic colors.
121
+
122
+<img width="521" src="https://user-images.githubusercontent.com/71256/29092181-47f6a9e6-7c3a-11e7-9a14-1928d8a711cd.png">
123
+
124
+#### Web Browser
125
+
126
+Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
127
+option. These are WebKit web inspectors, Firefox ([since version
128
+31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
129
+and the Firebug plugin for Firefox (any version).
130
+
131
+<img width="524" src="https://user-images.githubusercontent.com/71256/29092033-b65f9f2e-7c39-11e7-8e32-f6f0d8e865c1.png">
132
+
133
+
134
+## Millisecond diff
135
+
136
+When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
137
+
138
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
139
+
140
+When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
141
+
142
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091956-6bd78372-7c39-11e7-8c55-c948396d6edd.png">
143
+
144
+
145
+## Conventions
146
+
147
+If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser".  If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable.  You can then use it for normal output as well as debug output.
148
+
149
+## Wildcards
150
+
151
+The `*` character may be used as a wildcard. Suppose for example your library has
152
+debuggers named "connect:bodyParser", "connect:compress", "connect:session",
153
+instead of listing all three with
154
+`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
155
+`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
156
+
157
+You can also exclude specific debuggers by prefixing them with a "-" character.
158
+For example, `DEBUG=*,-connect:*` would include all debuggers except those
159
+starting with "connect:".
160
+
161
+## Environment Variables
162
+
163
+When running through Node.js, you can set a few environment variables that will
164
+change the behavior of the debug logging:
165
+
166
+| Name      | Purpose                                         |
167
+|-----------|-------------------------------------------------|
168
+| `DEBUG`   | Enables/disables specific debugging namespaces. |
169
+| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY).  |
170
+| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
171
+| `DEBUG_DEPTH` | Object inspection depth.                    |
172
+| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
173
+
174
+
175
+__Note:__ The environment variables beginning with `DEBUG_` end up being
176
+converted into an Options object that gets used with `%o`/`%O` formatters.
177
+See the Node.js documentation for
178
+[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
179
+for the complete list.
180
+
181
+## Formatters
182
+
183
+Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
184
+Below are the officially supported formatters:
185
+
186
+| Formatter | Representation |
187
+|-----------|----------------|
188
+| `%O`      | Pretty-print an Object on multiple lines. |
189
+| `%o`      | Pretty-print an Object all on a single line. |
190
+| `%s`      | String. |
191
+| `%d`      | Number (both integer and float). |
192
+| `%j`      | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
193
+| `%%`      | Single percent sign ('%'). This does not consume an argument. |
194
+
195
+
196
+### Custom formatters
197
+
198
+You can add custom formatters by extending the `debug.formatters` object.
199
+For example, if you wanted to add support for rendering a Buffer as hex with
200
+`%h`, you could do something like:
201
+
202
+```js
203
+const createDebug = require('debug')
204
+createDebug.formatters.h = (v) => {
205
+  return v.toString('hex')
206
+}
207
+
208
+// …elsewhere
209
+const debug = createDebug('foo')
210
+debug('this is hex: %h', new Buffer('hello world'))
211
+//   foo this is hex: 68656c6c6f20776f726c6421 +0ms
212
+```
213
+
214
+
215
+## Browser Support
216
+
217
+You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
218
+or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
219
+if you don't want to build it yourself.
220
+
221
+Debug's enable state is currently persisted by `localStorage`.
222
+Consider the situation shown below where you have `worker:a` and `worker:b`,
223
+and wish to debug both. You can enable this using `localStorage.debug`:
224
+
225
+```js
226
+localStorage.debug = 'worker:*'
227
+```
228
+
229
+And then refresh the page.
230
+
231
+```js
232
+a = debug('worker:a');
233
+b = debug('worker:b');
234
+
235
+setInterval(function(){
236
+  a('doing some work');
237
+}, 1000);
238
+
239
+setInterval(function(){
240
+  b('doing some work');
241
+}, 1200);
242
+```
243
+
244
+In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_.
245
+
246
+<img width="647" src="https://user-images.githubusercontent.com/7143133/152083257-29034707-c42c-4959-8add-3cee850e6fcf.png">
247
+
248
+## Output streams
249
+
250
+  By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
251
+
252
+Example [_stdout.js_](./examples/node/stdout.js):
253
+
254
+```js
255
+var debug = require('debug');
256
+var error = debug('app:error');
257
+
258
+// by default stderr is used
259
+error('goes to stderr!');
260
+
261
+var log = debug('app:log');
262
+// set this namespace to log via console.log
263
+log.log = console.log.bind(console); // don't forget to bind to console!
264
+log('goes to stdout');
265
+error('still goes to stderr!');
266
+
267
+// set all output to go via console.info
268
+// overrides all per-namespace log settings
269
+debug.log = console.info.bind(console);
270
+error('now goes to stdout via console.info');
271
+log('still goes to stdout, but via console.info now');
272
+```
273
+
274
+## Extend
275
+You can simply extend debugger 
276
+```js
277
+const log = require('debug')('auth');
278
+
279
+//creates new debug instance with extended namespace
280
+const logSign = log.extend('sign');
281
+const logLogin = log.extend('login');
282
+
283
+log('hello'); // auth hello
284
+logSign('hello'); //auth:sign hello
285
+logLogin('hello'); //auth:login hello
286
+```
287
+
288
+## Set dynamically
289
+
290
+You can also enable debug dynamically by calling the `enable()` method :
291
+
292
+```js
293
+let debug = require('debug');
294
+
295
+console.log(1, debug.enabled('test'));
296
+
297
+debug.enable('test');
298
+console.log(2, debug.enabled('test'));
299
+
300
+debug.disable();
301
+console.log(3, debug.enabled('test'));
302
+
303
+```
304
+
305
+print :   
306
+```
307
+1 false
308
+2 true
309
+3 false
310
+```
311
+
312
+Usage :  
313
+`enable(namespaces)`  
314
+`namespaces` can include modes separated by a colon and wildcards.
315
+   
316
+Note that calling `enable()` completely overrides previously set DEBUG variable : 
317
+
318
+```
319
+$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))'
320
+=> false
321
+```
322
+
323
+`disable()`
324
+
325
+Will disable all namespaces. The functions returns the namespaces currently
326
+enabled (and skipped). This can be useful if you want to disable debugging
327
+temporarily without knowing what was enabled to begin with.
328
+
329
+For example:
330
+
331
+```js
332
+let debug = require('debug');
333
+debug.enable('foo:*,-foo:bar');
334
+let namespaces = debug.disable();
335
+debug.enable(namespaces);
336
+```
337
+
338
+Note: There is no guarantee that the string will be identical to the initial
339
+enable string, but semantically they will be identical.
340
+
341
+## Checking whether a debug target is enabled
342
+
343
+After you've created a debug instance, you can determine whether or not it is
344
+enabled by checking the `enabled` property:
345
+
346
+```javascript
347
+const debug = require('debug')('http');
348
+
349
+if (debug.enabled) {
350
+  // do stuff...
351
+}
352
+```
353
+
354
+You can also manually toggle this property to force the debug instance to be
355
+enabled or disabled.
356
+
357
+## Usage in child processes
358
+
359
+Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process.  
360
+For example:
361
+
362
+```javascript
363
+worker = fork(WORKER_WRAP_PATH, [workerPath], {
364
+  stdio: [
365
+    /* stdin: */ 0,
366
+    /* stdout: */ 'pipe',
367
+    /* stderr: */ 'pipe',
368
+    'ipc',
369
+  ],
370
+  env: Object.assign({}, process.env, {
371
+    DEBUG_COLORS: 1 // without this settings, colors won't be shown
372
+  }),
373
+});
374
+
375
+worker.stderr.pipe(process.stderr, { end: false });
376
+```
377
+
378
+
379
+## Authors
380
+
381
+ - TJ Holowaychuk
382
+ - Nathan Rajlich
383
+ - Andrew Rhyne
384
+ - Josh Junon
385
+
386
+## Backers
387
+
388
+Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
389
+
390
+<a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a>
391
+<a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a>
392
+<a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a>
393
+<a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a>
394
+<a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a>
395
+<a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a>
396
+<a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a>
397
+<a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a>
398
+<a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a>
399
+<a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a>
400
+<a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a>
401
+<a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a>
402
+<a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a>
403
+<a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a>
404
+<a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a>
405
+<a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a>
406
+<a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a>
407
+<a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a>
408
+<a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a>
409
+<a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a>
410
+<a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a>
411
+<a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a>
412
+<a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a>
413
+<a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a>
414
+<a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a>
415
+<a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a>
416
+<a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a>
417
+<a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a>
418
+<a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a>
419
+<a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a>
420
+
421
+
422
+## Sponsors
423
+
424
+Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
425
+
426
+<a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a>
427
+<a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a>
428
+<a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a>
429
+<a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a>
430
+<a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a>
431
+<a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a>
432
+<a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a>
433
+<a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a>
434
+<a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a>
435
+<a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a>
436
+<a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a>
437
+<a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a>
438
+<a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a>
439
+<a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a>
440
+<a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a>
441
+<a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a>
442
+<a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a>
443
+<a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a>
444
+<a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a>
445
+<a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a>
446
+<a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a>
447
+<a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a>
448
+<a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a>
449
+<a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a>
450
+<a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a>
451
+<a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a>
452
+<a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a>
453
+<a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/27/avatar.svg"></a>
454
+<a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a>
455
+<a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
456
+
457
+## License
458
+
459
+(The MIT License)
460
+
461
+Copyright (c) 2014-2017 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
462
+Copyright (c) 2018-2021 Josh Junon
463
+
464
+Permission is hereby granted, free of charge, to any person obtaining
465
+a copy of this software and associated documentation files (the
466
+'Software'), to deal in the Software without restriction, including
467
+without limitation the rights to use, copy, modify, merge, publish,
468
+distribute, sublicense, and/or sell copies of the Software, and to
469
+permit persons to whom the Software is furnished to do so, subject to
470
+the following conditions:
471
+
472
+The above copyright notice and this permission notice shall be
473
+included in all copies or substantial portions of the Software.
474
+
475
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
476
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
477
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
478
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
479
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
480
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
481
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 60
- 0
DaoDaoFrontend/node_modules/debug/package.json View File

@@ -0,0 +1,60 @@
1
+{
2
+  "name": "debug",
3
+  "version": "4.3.7",
4
+  "repository": {
5
+    "type": "git",
6
+    "url": "git://github.com/debug-js/debug.git"
7
+  },
8
+  "description": "Lightweight debugging utility for Node.js and the browser",
9
+  "keywords": [
10
+    "debug",
11
+    "log",
12
+    "debugger"
13
+  ],
14
+  "files": [
15
+    "src",
16
+    "LICENSE",
17
+    "README.md"
18
+  ],
19
+  "author": "Josh Junon (https://github.com/qix-)",
20
+  "contributors": [
21
+    "TJ Holowaychuk <tj@vision-media.ca>",
22
+    "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
23
+    "Andrew Rhyne <rhyneandrew@gmail.com>"
24
+  ],
25
+  "license": "MIT",
26
+  "scripts": {
27
+    "lint": "xo",
28
+    "test": "npm run test:node && npm run test:browser && npm run lint",
29
+    "test:node": "istanbul cover _mocha -- test.js test.node.js",
30
+    "test:browser": "karma start --single-run",
31
+    "test:coverage": "cat ./coverage/lcov.info | coveralls"
32
+  },
33
+  "dependencies": {
34
+    "ms": "^2.1.3"
35
+  },
36
+  "devDependencies": {
37
+    "brfs": "^2.0.1",
38
+    "browserify": "^16.2.3",
39
+    "coveralls": "^3.0.2",
40
+    "istanbul": "^0.4.5",
41
+    "karma": "^3.1.4",
42
+    "karma-browserify": "^6.0.0",
43
+    "karma-chrome-launcher": "^2.2.0",
44
+    "karma-mocha": "^1.3.0",
45
+    "mocha": "^5.2.0",
46
+    "mocha-lcov-reporter": "^1.2.0",
47
+    "sinon": "^14.0.0",
48
+    "xo": "^0.23.0"
49
+  },
50
+  "peerDependenciesMeta": {
51
+    "supports-color": {
52
+      "optional": true
53
+    }
54
+  },
55
+  "main": "./src/index.js",
56
+  "browser": "./src/browser.js",
57
+  "engines": {
58
+    "node": ">=6.0"
59
+  }
60
+}

+ 271
- 0
DaoDaoFrontend/node_modules/debug/src/browser.js View File

@@ -0,0 +1,271 @@
1
+/* eslint-env browser */
2
+
3
+/**
4
+ * This is the web browser implementation of `debug()`.
5
+ */
6
+
7
+exports.formatArgs = formatArgs;
8
+exports.save = save;
9
+exports.load = load;
10
+exports.useColors = useColors;
11
+exports.storage = localstorage();
12
+exports.destroy = (() => {
13
+	let warned = false;
14
+
15
+	return () => {
16
+		if (!warned) {
17
+			warned = true;
18
+			console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
19
+		}
20
+	};
21
+})();
22
+
23
+/**
24
+ * Colors.
25
+ */
26
+
27
+exports.colors = [
28
+	'#0000CC',
29
+	'#0000FF',
30
+	'#0033CC',
31
+	'#0033FF',
32
+	'#0066CC',
33
+	'#0066FF',
34
+	'#0099CC',
35
+	'#0099FF',
36
+	'#00CC00',
37
+	'#00CC33',
38
+	'#00CC66',
39
+	'#00CC99',
40
+	'#00CCCC',
41
+	'#00CCFF',
42
+	'#3300CC',
43
+	'#3300FF',
44
+	'#3333CC',
45
+	'#3333FF',
46
+	'#3366CC',
47
+	'#3366FF',
48
+	'#3399CC',
49
+	'#3399FF',
50
+	'#33CC00',
51
+	'#33CC33',
52
+	'#33CC66',
53
+	'#33CC99',
54
+	'#33CCCC',
55
+	'#33CCFF',
56
+	'#6600CC',
57
+	'#6600FF',
58
+	'#6633CC',
59
+	'#6633FF',
60
+	'#66CC00',
61
+	'#66CC33',
62
+	'#9900CC',
63
+	'#9900FF',
64
+	'#9933CC',
65
+	'#9933FF',
66
+	'#99CC00',
67
+	'#99CC33',
68
+	'#CC0000',
69
+	'#CC0033',
70
+	'#CC0066',
71
+	'#CC0099',
72
+	'#CC00CC',
73
+	'#CC00FF',
74
+	'#CC3300',
75
+	'#CC3333',
76
+	'#CC3366',
77
+	'#CC3399',
78
+	'#CC33CC',
79
+	'#CC33FF',
80
+	'#CC6600',
81
+	'#CC6633',
82
+	'#CC9900',
83
+	'#CC9933',
84
+	'#CCCC00',
85
+	'#CCCC33',
86
+	'#FF0000',
87
+	'#FF0033',
88
+	'#FF0066',
89
+	'#FF0099',
90
+	'#FF00CC',
91
+	'#FF00FF',
92
+	'#FF3300',
93
+	'#FF3333',
94
+	'#FF3366',
95
+	'#FF3399',
96
+	'#FF33CC',
97
+	'#FF33FF',
98
+	'#FF6600',
99
+	'#FF6633',
100
+	'#FF9900',
101
+	'#FF9933',
102
+	'#FFCC00',
103
+	'#FFCC33'
104
+];
105
+
106
+/**
107
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
108
+ * and the Firebug extension (any Firefox version) are known
109
+ * to support "%c" CSS customizations.
110
+ *
111
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
112
+ */
113
+
114
+// eslint-disable-next-line complexity
115
+function useColors() {
116
+	// NB: In an Electron preload script, document will be defined but not fully
117
+	// initialized. Since we know we're in Chrome, we'll just detect this case
118
+	// explicitly
119
+	if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
120
+		return true;
121
+	}
122
+
123
+	// Internet Explorer and Edge do not support colors.
124
+	if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
125
+		return false;
126
+	}
127
+
128
+	let m;
129
+
130
+	// Is webkit? http://stackoverflow.com/a/16459606/376773
131
+	// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
132
+	return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
133
+		// Is firebug? http://stackoverflow.com/a/398120/376773
134
+		(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
135
+		// Is firefox >= v31?
136
+		// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
137
+		(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) ||
138
+		// Double check webkit in userAgent just in case we are in a worker
139
+		(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
140
+}
141
+
142
+/**
143
+ * Colorize log arguments if enabled.
144
+ *
145
+ * @api public
146
+ */
147
+
148
+function formatArgs(args) {
149
+	args[0] = (this.useColors ? '%c' : '') +
150
+		this.namespace +
151
+		(this.useColors ? ' %c' : ' ') +
152
+		args[0] +
153
+		(this.useColors ? '%c ' : ' ') +
154
+		'+' + module.exports.humanize(this.diff);
155
+
156
+	if (!this.useColors) {
157
+		return;
158
+	}
159
+
160
+	const c = 'color: ' + this.color;
161
+	args.splice(1, 0, c, 'color: inherit');
162
+
163
+	// The final "%c" is somewhat tricky, because there could be other
164
+	// arguments passed either before or after the %c, so we need to
165
+	// figure out the correct index to insert the CSS into
166
+	let index = 0;
167
+	let lastC = 0;
168
+	args[0].replace(/%[a-zA-Z%]/g, match => {
169
+		if (match === '%%') {
170
+			return;
171
+		}
172
+		index++;
173
+		if (match === '%c') {
174
+			// We only are interested in the *last* %c
175
+			// (the user may have provided their own)
176
+			lastC = index;
177
+		}
178
+	});
179
+
180
+	args.splice(lastC, 0, c);
181
+}
182
+
183
+/**
184
+ * Invokes `console.debug()` when available.
185
+ * No-op when `console.debug` is not a "function".
186
+ * If `console.debug` is not available, falls back
187
+ * to `console.log`.
188
+ *
189
+ * @api public
190
+ */
191
+exports.log = console.debug || console.log || (() => {});
192
+
193
+/**
194
+ * Save `namespaces`.
195
+ *
196
+ * @param {String} namespaces
197
+ * @api private
198
+ */
199
+function save(namespaces) {
200
+	try {
201
+		if (namespaces) {
202
+			exports.storage.setItem('debug', namespaces);
203
+		} else {
204
+			exports.storage.removeItem('debug');
205
+		}
206
+	} catch (error) {
207
+		// Swallow
208
+		// XXX (@Qix-) should we be logging these?
209
+	}
210
+}
211
+
212
+/**
213
+ * Load `namespaces`.
214
+ *
215
+ * @return {String} returns the previously persisted debug modes
216
+ * @api private
217
+ */
218
+function load() {
219
+	let r;
220
+	try {
221
+		r = exports.storage.getItem('debug');
222
+	} catch (error) {
223
+		// Swallow
224
+		// XXX (@Qix-) should we be logging these?
225
+	}
226
+
227
+	// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
228
+	if (!r && typeof process !== 'undefined' && 'env' in process) {
229
+		r = process.env.DEBUG;
230
+	}
231
+
232
+	return r;
233
+}
234
+
235
+/**
236
+ * Localstorage attempts to return the localstorage.
237
+ *
238
+ * This is necessary because safari throws
239
+ * when a user disables cookies/localstorage
240
+ * and you attempt to access it.
241
+ *
242
+ * @return {LocalStorage}
243
+ * @api private
244
+ */
245
+
246
+function localstorage() {
247
+	try {
248
+		// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
249
+		// The Browser also has localStorage in the global context.
250
+		return localStorage;
251
+	} catch (error) {
252
+		// Swallow
253
+		// XXX (@Qix-) should we be logging these?
254
+	}
255
+}
256
+
257
+module.exports = require('./common')(exports);
258
+
259
+const {formatters} = module.exports;
260
+
261
+/**
262
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
263
+ */
264
+
265
+formatters.j = function (v) {
266
+	try {
267
+		return JSON.stringify(v);
268
+	} catch (error) {
269
+		return '[UnexpectedJSONParseError]: ' + error.message;
270
+	}
271
+};

+ 274
- 0
DaoDaoFrontend/node_modules/debug/src/common.js View File

@@ -0,0 +1,274 @@
1
+
2
+/**
3
+ * This is the common logic for both the Node.js and web browser
4
+ * implementations of `debug()`.
5
+ */
6
+
7
+function setup(env) {
8
+	createDebug.debug = createDebug;
9
+	createDebug.default = createDebug;
10
+	createDebug.coerce = coerce;
11
+	createDebug.disable = disable;
12
+	createDebug.enable = enable;
13
+	createDebug.enabled = enabled;
14
+	createDebug.humanize = require('ms');
15
+	createDebug.destroy = destroy;
16
+
17
+	Object.keys(env).forEach(key => {
18
+		createDebug[key] = env[key];
19
+	});
20
+
21
+	/**
22
+	* The currently active debug mode names, and names to skip.
23
+	*/
24
+
25
+	createDebug.names = [];
26
+	createDebug.skips = [];
27
+
28
+	/**
29
+	* Map of special "%n" handling functions, for the debug "format" argument.
30
+	*
31
+	* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
32
+	*/
33
+	createDebug.formatters = {};
34
+
35
+	/**
36
+	* Selects a color for a debug namespace
37
+	* @param {String} namespace The namespace string for the debug instance to be colored
38
+	* @return {Number|String} An ANSI color code for the given namespace
39
+	* @api private
40
+	*/
41
+	function selectColor(namespace) {
42
+		let hash = 0;
43
+
44
+		for (let i = 0; i < namespace.length; i++) {
45
+			hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
46
+			hash |= 0; // Convert to 32bit integer
47
+		}
48
+
49
+		return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
50
+	}
51
+	createDebug.selectColor = selectColor;
52
+
53
+	/**
54
+	* Create a debugger with the given `namespace`.
55
+	*
56
+	* @param {String} namespace
57
+	* @return {Function}
58
+	* @api public
59
+	*/
60
+	function createDebug(namespace) {
61
+		let prevTime;
62
+		let enableOverride = null;
63
+		let namespacesCache;
64
+		let enabledCache;
65
+
66
+		function debug(...args) {
67
+			// Disabled?
68
+			if (!debug.enabled) {
69
+				return;
70
+			}
71
+
72
+			const self = debug;
73
+
74
+			// Set `diff` timestamp
75
+			const curr = Number(new Date());
76
+			const ms = curr - (prevTime || curr);
77
+			self.diff = ms;
78
+			self.prev = prevTime;
79
+			self.curr = curr;
80
+			prevTime = curr;
81
+
82
+			args[0] = createDebug.coerce(args[0]);
83
+
84
+			if (typeof args[0] !== 'string') {
85
+				// Anything else let's inspect with %O
86
+				args.unshift('%O');
87
+			}
88
+
89
+			// Apply any `formatters` transformations
90
+			let index = 0;
91
+			args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
92
+				// If we encounter an escaped % then don't increase the array index
93
+				if (match === '%%') {
94
+					return '%';
95
+				}
96
+				index++;
97
+				const formatter = createDebug.formatters[format];
98
+				if (typeof formatter === 'function') {
99
+					const val = args[index];
100
+					match = formatter.call(self, val);
101
+
102
+					// Now we need to remove `args[index]` since it's inlined in the `format`
103
+					args.splice(index, 1);
104
+					index--;
105
+				}
106
+				return match;
107
+			});
108
+
109
+			// Apply env-specific formatting (colors, etc.)
110
+			createDebug.formatArgs.call(self, args);
111
+
112
+			const logFn = self.log || createDebug.log;
113
+			logFn.apply(self, args);
114
+		}
115
+
116
+		debug.namespace = namespace;
117
+		debug.useColors = createDebug.useColors();
118
+		debug.color = createDebug.selectColor(namespace);
119
+		debug.extend = extend;
120
+		debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
121
+
122
+		Object.defineProperty(debug, 'enabled', {
123
+			enumerable: true,
124
+			configurable: false,
125
+			get: () => {
126
+				if (enableOverride !== null) {
127
+					return enableOverride;
128
+				}
129
+				if (namespacesCache !== createDebug.namespaces) {
130
+					namespacesCache = createDebug.namespaces;
131
+					enabledCache = createDebug.enabled(namespace);
132
+				}
133
+
134
+				return enabledCache;
135
+			},
136
+			set: v => {
137
+				enableOverride = v;
138
+			}
139
+		});
140
+
141
+		// Env-specific initialization logic for debug instances
142
+		if (typeof createDebug.init === 'function') {
143
+			createDebug.init(debug);
144
+		}
145
+
146
+		return debug;
147
+	}
148
+
149
+	function extend(namespace, delimiter) {
150
+		const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
151
+		newDebug.log = this.log;
152
+		return newDebug;
153
+	}
154
+
155
+	/**
156
+	* Enables a debug mode by namespaces. This can include modes
157
+	* separated by a colon and wildcards.
158
+	*
159
+	* @param {String} namespaces
160
+	* @api public
161
+	*/
162
+	function enable(namespaces) {
163
+		createDebug.save(namespaces);
164
+		createDebug.namespaces = namespaces;
165
+
166
+		createDebug.names = [];
167
+		createDebug.skips = [];
168
+
169
+		let i;
170
+		const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
171
+		const len = split.length;
172
+
173
+		for (i = 0; i < len; i++) {
174
+			if (!split[i]) {
175
+				// ignore empty strings
176
+				continue;
177
+			}
178
+
179
+			namespaces = split[i].replace(/\*/g, '.*?');
180
+
181
+			if (namespaces[0] === '-') {
182
+				createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
183
+			} else {
184
+				createDebug.names.push(new RegExp('^' + namespaces + '$'));
185
+			}
186
+		}
187
+	}
188
+
189
+	/**
190
+	* Disable debug output.
191
+	*
192
+	* @return {String} namespaces
193
+	* @api public
194
+	*/
195
+	function disable() {
196
+		const namespaces = [
197
+			...createDebug.names.map(toNamespace),
198
+			...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
199
+		].join(',');
200
+		createDebug.enable('');
201
+		return namespaces;
202
+	}
203
+
204
+	/**
205
+	* Returns true if the given mode name is enabled, false otherwise.
206
+	*
207
+	* @param {String} name
208
+	* @return {Boolean}
209
+	* @api public
210
+	*/
211
+	function enabled(name) {
212
+		if (name[name.length - 1] === '*') {
213
+			return true;
214
+		}
215
+
216
+		let i;
217
+		let len;
218
+
219
+		for (i = 0, len = createDebug.skips.length; i < len; i++) {
220
+			if (createDebug.skips[i].test(name)) {
221
+				return false;
222
+			}
223
+		}
224
+
225
+		for (i = 0, len = createDebug.names.length; i < len; i++) {
226
+			if (createDebug.names[i].test(name)) {
227
+				return true;
228
+			}
229
+		}
230
+
231
+		return false;
232
+	}
233
+
234
+	/**
235
+	* Convert regexp to namespace
236
+	*
237
+	* @param {RegExp} regxep
238
+	* @return {String} namespace
239
+	* @api private
240
+	*/
241
+	function toNamespace(regexp) {
242
+		return regexp.toString()
243
+			.substring(2, regexp.toString().length - 2)
244
+			.replace(/\.\*\?$/, '*');
245
+	}
246
+
247
+	/**
248
+	* Coerce `val`.
249
+	*
250
+	* @param {Mixed} val
251
+	* @return {Mixed}
252
+	* @api private
253
+	*/
254
+	function coerce(val) {
255
+		if (val instanceof Error) {
256
+			return val.stack || val.message;
257
+		}
258
+		return val;
259
+	}
260
+
261
+	/**
262
+	* XXX DO NOT USE. This is a temporary stub function.
263
+	* XXX It WILL be removed in the next major release.
264
+	*/
265
+	function destroy() {
266
+		console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
267
+	}
268
+
269
+	createDebug.enable(createDebug.load());
270
+
271
+	return createDebug;
272
+}
273
+
274
+module.exports = setup;

+ 10
- 0
DaoDaoFrontend/node_modules/debug/src/index.js View File

@@ -0,0 +1,10 @@
1
+/**
2
+ * Detect Electron renderer / nwjs process, which is node, but we should
3
+ * treat as a browser.
4
+ */
5
+
6
+if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
7
+	module.exports = require('./browser.js');
8
+} else {
9
+	module.exports = require('./node.js');
10
+}

+ 263
- 0
DaoDaoFrontend/node_modules/debug/src/node.js View File

@@ -0,0 +1,263 @@
1
+/**
2
+ * Module dependencies.
3
+ */
4
+
5
+const tty = require('tty');
6
+const util = require('util');
7
+
8
+/**
9
+ * This is the Node.js implementation of `debug()`.
10
+ */
11
+
12
+exports.init = init;
13
+exports.log = log;
14
+exports.formatArgs = formatArgs;
15
+exports.save = save;
16
+exports.load = load;
17
+exports.useColors = useColors;
18
+exports.destroy = util.deprecate(
19
+	() => {},
20
+	'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
21
+);
22
+
23
+/**
24
+ * Colors.
25
+ */
26
+
27
+exports.colors = [6, 2, 3, 4, 5, 1];
28
+
29
+try {
30
+	// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
31
+	// eslint-disable-next-line import/no-extraneous-dependencies
32
+	const supportsColor = require('supports-color');
33
+
34
+	if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
35
+		exports.colors = [
36
+			20,
37
+			21,
38
+			26,
39
+			27,
40
+			32,
41
+			33,
42
+			38,
43
+			39,
44
+			40,
45
+			41,
46
+			42,
47
+			43,
48
+			44,
49
+			45,
50
+			56,
51
+			57,
52
+			62,
53
+			63,
54
+			68,
55
+			69,
56
+			74,
57
+			75,
58
+			76,
59
+			77,
60
+			78,
61
+			79,
62
+			80,
63
+			81,
64
+			92,
65
+			93,
66
+			98,
67
+			99,
68
+			112,
69
+			113,
70
+			128,
71
+			129,
72
+			134,
73
+			135,
74
+			148,
75
+			149,
76
+			160,
77
+			161,
78
+			162,
79
+			163,
80
+			164,
81
+			165,
82
+			166,
83
+			167,
84
+			168,
85
+			169,
86
+			170,
87
+			171,
88
+			172,
89
+			173,
90
+			178,
91
+			179,
92
+			184,
93
+			185,
94
+			196,
95
+			197,
96
+			198,
97
+			199,
98
+			200,
99
+			201,
100
+			202,
101
+			203,
102
+			204,
103
+			205,
104
+			206,
105
+			207,
106
+			208,
107
+			209,
108
+			214,
109
+			215,
110
+			220,
111
+			221
112
+		];
113
+	}
114
+} catch (error) {
115
+	// Swallow - we only care if `supports-color` is available; it doesn't have to be.
116
+}
117
+
118
+/**
119
+ * Build up the default `inspectOpts` object from the environment variables.
120
+ *
121
+ *   $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
122
+ */
123
+
124
+exports.inspectOpts = Object.keys(process.env).filter(key => {
125
+	return /^debug_/i.test(key);
126
+}).reduce((obj, key) => {
127
+	// Camel-case
128
+	const prop = key
129
+		.substring(6)
130
+		.toLowerCase()
131
+		.replace(/_([a-z])/g, (_, k) => {
132
+			return k.toUpperCase();
133
+		});
134
+
135
+	// Coerce string value into JS value
136
+	let val = process.env[key];
137
+	if (/^(yes|on|true|enabled)$/i.test(val)) {
138
+		val = true;
139
+	} else if (/^(no|off|false|disabled)$/i.test(val)) {
140
+		val = false;
141
+	} else if (val === 'null') {
142
+		val = null;
143
+	} else {
144
+		val = Number(val);
145
+	}
146
+
147
+	obj[prop] = val;
148
+	return obj;
149
+}, {});
150
+
151
+/**
152
+ * Is stdout a TTY? Colored output is enabled when `true`.
153
+ */
154
+
155
+function useColors() {
156
+	return 'colors' in exports.inspectOpts ?
157
+		Boolean(exports.inspectOpts.colors) :
158
+		tty.isatty(process.stderr.fd);
159
+}
160
+
161
+/**
162
+ * Adds ANSI color escape codes if enabled.
163
+ *
164
+ * @api public
165
+ */
166
+
167
+function formatArgs(args) {
168
+	const {namespace: name, useColors} = this;
169
+
170
+	if (useColors) {
171
+		const c = this.color;
172
+		const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
173
+		const prefix = `  ${colorCode};1m${name} \u001B[0m`;
174
+
175
+		args[0] = prefix + args[0].split('\n').join('\n' + prefix);
176
+		args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
177
+	} else {
178
+		args[0] = getDate() + name + ' ' + args[0];
179
+	}
180
+}
181
+
182
+function getDate() {
183
+	if (exports.inspectOpts.hideDate) {
184
+		return '';
185
+	}
186
+	return new Date().toISOString() + ' ';
187
+}
188
+
189
+/**
190
+ * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
191
+ */
192
+
193
+function log(...args) {
194
+	return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
195
+}
196
+
197
+/**
198
+ * Save `namespaces`.
199
+ *
200
+ * @param {String} namespaces
201
+ * @api private
202
+ */
203
+function save(namespaces) {
204
+	if (namespaces) {
205
+		process.env.DEBUG = namespaces;
206
+	} else {
207
+		// If you set a process.env field to null or undefined, it gets cast to the
208
+		// string 'null' or 'undefined'. Just delete instead.
209
+		delete process.env.DEBUG;
210
+	}
211
+}
212
+
213
+/**
214
+ * Load `namespaces`.
215
+ *
216
+ * @return {String} returns the previously persisted debug modes
217
+ * @api private
218
+ */
219
+
220
+function load() {
221
+	return process.env.DEBUG;
222
+}
223
+
224
+/**
225
+ * Init logic for `debug` instances.
226
+ *
227
+ * Create a new `inspectOpts` object in case `useColors` is set
228
+ * differently for a particular `debug` instance.
229
+ */
230
+
231
+function init(debug) {
232
+	debug.inspectOpts = {};
233
+
234
+	const keys = Object.keys(exports.inspectOpts);
235
+	for (let i = 0; i < keys.length; i++) {
236
+		debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
237
+	}
238
+}
239
+
240
+module.exports = require('./common')(exports);
241
+
242
+const {formatters} = module.exports;
243
+
244
+/**
245
+ * Map %o to `util.inspect()`, all on a single line.
246
+ */
247
+
248
+formatters.o = function (v) {
249
+	this.inspectOpts.colors = this.useColors;
250
+	return util.inspect(v, this.inspectOpts)
251
+		.split('\n')
252
+		.map(str => str.trim())
253
+		.join(' ');
254
+};
255
+
256
+/**
257
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
258
+ */
259
+
260
+formatters.O = function (v) {
261
+	this.inspectOpts.colors = this.useColors;
262
+	return util.inspect(v, this.inspectOpts);
263
+};

+ 1
- 0
DaoDaoFrontend/node_modules/ecdsa-sig-formatter/CODEOWNERS View File

@@ -0,0 +1 @@
1
+* @omsmith

+ 201
- 0
DaoDaoFrontend/node_modules/ecdsa-sig-formatter/LICENSE View File

@@ -0,0 +1,201 @@
1
+Apache License
2
+                           Version 2.0, January 2004
3
+                        http://www.apache.org/licenses/
4
+
5
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+   1. Definitions.
8
+
9
+      "License" shall mean the terms and conditions for use, reproduction,
10
+      and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+      "Licensor" shall mean the copyright owner or entity authorized by
13
+      the copyright owner that is granting the License.
14
+
15
+      "Legal Entity" shall mean the union of the acting entity and all
16
+      other entities that control, are controlled by, or are under common
17
+      control with that entity. For the purposes of this definition,
18
+      "control" means (i) the power, direct or indirect, to cause the
19
+      direction or management of such entity, whether by contract or
20
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+      outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+      "You" (or "Your") shall mean an individual or Legal Entity
24
+      exercising permissions granted by this License.
25
+
26
+      "Source" form shall mean the preferred form for making modifications,
27
+      including but not limited to software source code, documentation
28
+      source, and configuration files.
29
+
30
+      "Object" form shall mean any form resulting from mechanical
31
+      transformation or translation of a Source form, including but
32
+      not limited to compiled object code, generated documentation,
33
+      and conversions to other media types.
34
+
35
+      "Work" shall mean the work of authorship, whether in Source or
36
+      Object form, made available under the License, as indicated by a
37
+      copyright notice that is included in or attached to the work
38
+      (an example is provided in the Appendix below).
39
+
40
+      "Derivative Works" shall mean any work, whether in Source or Object
41
+      form, that is based on (or derived from) the Work and for which the
42
+      editorial revisions, annotations, elaborations, or other modifications
43
+      represent, as a whole, an original work of authorship. For the purposes
44
+      of this License, Derivative Works shall not include works that remain
45
+      separable from, or merely link (or bind by name) to the interfaces of,
46
+      the Work and Derivative Works thereof.
47
+
48
+      "Contribution" shall mean any work of authorship, including
49
+      the original version of the Work and any modifications or additions
50
+      to that Work or Derivative Works thereof, that is intentionally
51
+      submitted to Licensor for inclusion in the Work by the copyright owner
52
+      or by an individual or Legal Entity authorized to submit on behalf of
53
+      the copyright owner. For the purposes of this definition, "submitted"
54
+      means any form of electronic, verbal, or written communication sent
55
+      to the Licensor or its representatives, including but not limited to
56
+      communication on electronic mailing lists, source code control systems,
57
+      and issue tracking systems that are managed by, or on behalf of, the
58
+      Licensor for the purpose of discussing and improving the Work, but
59
+      excluding communication that is conspicuously marked or otherwise
60
+      designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+      "Contributor" shall mean Licensor and any individual or Legal Entity
63
+      on behalf of whom a Contribution has been received by Licensor and
64
+      subsequently incorporated within the Work.
65
+
66
+   2. Grant of Copyright License. Subject to the terms and conditions of
67
+      this License, each Contributor hereby grants to You a perpetual,
68
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+      copyright license to reproduce, prepare Derivative Works of,
70
+      publicly display, publicly perform, sublicense, and distribute the
71
+      Work and such Derivative Works in Source or Object form.
72
+
73
+   3. Grant of Patent License. Subject to the terms and conditions of
74
+      this License, each Contributor hereby grants to You a perpetual,
75
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+      (except as stated in this section) patent license to make, have made,
77
+      use, offer to sell, sell, import, and otherwise transfer the Work,
78
+      where such license applies only to those patent claims licensable
79
+      by such Contributor that are necessarily infringed by their
80
+      Contribution(s) alone or by combination of their Contribution(s)
81
+      with the Work to which such Contribution(s) was submitted. If You
82
+      institute patent litigation against any entity (including a
83
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+      or a Contribution incorporated within the Work constitutes direct
85
+      or contributory patent infringement, then any patent licenses
86
+      granted to You under this License for that Work shall terminate
87
+      as of the date such litigation is filed.
88
+
89
+   4. Redistribution. You may reproduce and distribute copies of the
90
+      Work or Derivative Works thereof in any medium, with or without
91
+      modifications, and in Source or Object form, provided that You
92
+      meet the following conditions:
93
+
94
+      (a) You must give any other recipients of the Work or
95
+          Derivative Works a copy of this License; and
96
+
97
+      (b) You must cause any modified files to carry prominent notices
98
+          stating that You changed the files; and
99
+
100
+      (c) You must retain, in the Source form of any Derivative Works
101
+          that You distribute, all copyright, patent, trademark, and
102
+          attribution notices from the Source form of the Work,
103
+          excluding those notices that do not pertain to any part of
104
+          the Derivative Works; and
105
+
106
+      (d) If the Work includes a "NOTICE" text file as part of its
107
+          distribution, then any Derivative Works that You distribute must
108
+          include a readable copy of the attribution notices contained
109
+          within such NOTICE file, excluding those notices that do not
110
+          pertain to any part of the Derivative Works, in at least one
111
+          of the following places: within a NOTICE text file distributed
112
+          as part of the Derivative Works; within the Source form or
113
+          documentation, if provided along with the Derivative Works; or,
114
+          within a display generated by the Derivative Works, if and
115
+          wherever such third-party notices normally appear. The contents
116
+          of the NOTICE file are for informational purposes only and
117
+          do not modify the License. You may add Your own attribution
118
+          notices within Derivative Works that You distribute, alongside
119
+          or as an addendum to the NOTICE text from the Work, provided
120
+          that such additional attribution notices cannot be construed
121
+          as modifying the License.
122
+
123
+      You may add Your own copyright statement to Your modifications and
124
+      may provide additional or different license terms and conditions
125
+      for use, reproduction, or distribution of Your modifications, or
126
+      for any such Derivative Works as a whole, provided Your use,
127
+      reproduction, and distribution of the Work otherwise complies with
128
+      the conditions stated in this License.
129
+
130
+   5. Submission of Contributions. Unless You explicitly state otherwise,
131
+      any Contribution intentionally submitted for inclusion in the Work
132
+      by You to the Licensor shall be under the terms and conditions of
133
+      this License, without any additional terms or conditions.
134
+      Notwithstanding the above, nothing herein shall supersede or modify
135
+      the terms of any separate license agreement you may have executed
136
+      with Licensor regarding such Contributions.
137
+
138
+   6. Trademarks. This License does not grant permission to use the trade
139
+      names, trademarks, service marks, or product names of the Licensor,
140
+      except as required for reasonable and customary use in describing the
141
+      origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+   7. Disclaimer of Warranty. Unless required by applicable law or
144
+      agreed to in writing, Licensor provides the Work (and each
145
+      Contributor provides its Contributions) on an "AS IS" BASIS,
146
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+      implied, including, without limitation, any warranties or conditions
148
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+      PARTICULAR PURPOSE. You are solely responsible for determining the
150
+      appropriateness of using or redistributing the Work and assume any
151
+      risks associated with Your exercise of permissions under this License.
152
+
153
+   8. Limitation of Liability. In no event and under no legal theory,
154
+      whether in tort (including negligence), contract, or otherwise,
155
+      unless required by applicable law (such as deliberate and grossly
156
+      negligent acts) or agreed to in writing, shall any Contributor be
157
+      liable to You for damages, including any direct, indirect, special,
158
+      incidental, or consequential damages of any character arising as a
159
+      result of this License or out of the use or inability to use the
160
+      Work (including but not limited to damages for loss of goodwill,
161
+      work stoppage, computer failure or malfunction, or any and all
162
+      other commercial damages or losses), even if such Contributor
163
+      has been advised of the possibility of such damages.
164
+
165
+   9. Accepting Warranty or Additional Liability. While redistributing
166
+      the Work or Derivative Works thereof, You may choose to offer,
167
+      and charge a fee for, acceptance of support, warranty, indemnity,
168
+      or other liability obligations and/or rights consistent with this
169
+      License. However, in accepting such obligations, You may act only
170
+      on Your own behalf and on Your sole responsibility, not on behalf
171
+      of any other Contributor, and only if You agree to indemnify,
172
+      defend, and hold each Contributor harmless for any liability
173
+      incurred by, or claims asserted against, such Contributor by reason
174
+      of your accepting any such warranty or additional liability.
175
+
176
+   END OF TERMS AND CONDITIONS
177
+
178
+   APPENDIX: How to apply the Apache License to your work.
179
+
180
+      To apply the Apache License to your work, attach the following
181
+      boilerplate notice, with the fields enclosed by brackets "{}"
182
+      replaced with your own identifying information. (Don't include
183
+      the brackets!)  The text should be enclosed in the appropriate
184
+      comment syntax for the file format. We also recommend that a
185
+      file or class name and description of purpose be included on the
186
+      same "printed page" as the copyright notice for easier
187
+      identification within third-party archives.
188
+
189
+   Copyright 2015 D2L Corporation
190
+
191
+   Licensed under the Apache License, Version 2.0 (the "License");
192
+   you may not use this file except in compliance with the License.
193
+   You may obtain a copy of the License at
194
+
195
+       http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+   Unless required by applicable law or agreed to in writing, software
198
+   distributed under the License is distributed on an "AS IS" BASIS,
199
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+   See the License for the specific language governing permissions and
201
+   limitations under the License.

+ 65
- 0
DaoDaoFrontend/node_modules/ecdsa-sig-formatter/README.md View File

@@ -0,0 +1,65 @@
1
+# ecdsa-sig-formatter
2
+
3
+[![Build Status](https://travis-ci.org/Brightspace/node-ecdsa-sig-formatter.svg?branch=master)](https://travis-ci.org/Brightspace/node-ecdsa-sig-formatter) [![Coverage Status](https://coveralls.io/repos/Brightspace/node-ecdsa-sig-formatter/badge.svg)](https://coveralls.io/r/Brightspace/node-ecdsa-sig-formatter)
4
+
5
+Translate between JOSE and ASN.1/DER encodings for ECDSA signatures
6
+
7
+## Install
8
+```sh
9
+npm install ecdsa-sig-formatter --save
10
+```
11
+
12
+## Usage
13
+```js
14
+var format = require('ecdsa-sig-formatter');
15
+
16
+var derSignature = '..'; // asn.1/DER encoded ecdsa signature
17
+
18
+var joseSignature = format.derToJose(derSignature);
19
+
20
+```
21
+
22
+### API
23
+
24
+---
25
+
26
+#### `.derToJose(Buffer|String signature, String alg)` -> `String`
27
+
28
+Convert the ASN.1/DER encoded signature to a JOSE-style concatenated signature.
29
+Returns a _base64 url_ encoded `String`.
30
+
31
+* If _signature_ is a `String`, it should be _base64_ encoded
32
+* _alg_ must be one of _ES256_, _ES384_ or _ES512_
33
+
34
+---
35
+
36
+#### `.joseToDer(Buffer|String signature, String alg)` -> `Buffer`
37
+
38
+Convert the JOSE-style concatenated signature to an ASN.1/DER encoded
39
+signature. Returns a `Buffer`
40
+
41
+* If _signature_ is a `String`, it should be _base64 url_ encoded
42
+* _alg_ must be one of _ES256_, _ES384_ or _ES512_
43
+
44
+## Contributing
45
+
46
+1. **Fork** the repository. Committing directly against this repository is
47
+   highly discouraged.
48
+
49
+2. Make your modifications in a branch, updating and writing new unit tests
50
+   as necessary in the `spec` directory.
51
+
52
+3. Ensure that all tests pass with `npm test`
53
+
54
+4. `rebase` your changes against master. *Do not merge*.
55
+
56
+5. Submit a pull request to this repository. Wait for tests to run and someone
57
+   to chime in.
58
+
59
+### Code Style
60
+
61
+This repository is configured with [EditorConfig][EditorConfig] and
62
+[ESLint][ESLint] rules.
63
+
64
+[EditorConfig]: http://editorconfig.org/
65
+[ESLint]: http://eslint.org

+ 46
- 0
DaoDaoFrontend/node_modules/ecdsa-sig-formatter/package.json View File

@@ -0,0 +1,46 @@
1
+{
2
+  "name": "ecdsa-sig-formatter",
3
+  "version": "1.0.11",
4
+  "description": "Translate ECDSA signatures between ASN.1/DER and JOSE-style concatenation",
5
+  "main": "src/ecdsa-sig-formatter.js",
6
+  "scripts": {
7
+    "check-style": "eslint .",
8
+    "pretest": "npm run check-style",
9
+    "test": "istanbul cover --root src _mocha -- spec",
10
+    "report-cov": "cat ./coverage/lcov.info | coveralls"
11
+  },
12
+  "typings": "./src/ecdsa-sig-formatter.d.ts",
13
+  "repository": {
14
+    "type": "git",
15
+    "url": "git+ssh://git@github.com/Brightspace/node-ecdsa-sig-formatter.git"
16
+  },
17
+  "keywords": [
18
+    "ecdsa",
19
+    "der",
20
+    "asn.1",
21
+    "jwt",
22
+    "jwa",
23
+    "jsonwebtoken",
24
+    "jose"
25
+  ],
26
+  "author": "D2L Corporation",
27
+  "license": "Apache-2.0",
28
+  "bugs": {
29
+    "url": "https://github.com/Brightspace/node-ecdsa-sig-formatter/issues"
30
+  },
31
+  "homepage": "https://github.com/Brightspace/node-ecdsa-sig-formatter#readme",
32
+  "dependencies": {
33
+    "safe-buffer": "^5.0.1"
34
+  },
35
+  "devDependencies": {
36
+    "bench": "^0.3.6",
37
+    "chai": "^3.5.0",
38
+    "coveralls": "^2.11.9",
39
+    "eslint": "^2.12.0",
40
+    "eslint-config-brightspace": "^0.2.1",
41
+    "istanbul": "^0.4.3",
42
+    "jwk-to-pem": "^1.2.5",
43
+    "mocha": "^2.5.3",
44
+    "native-crypto": "^1.7.0"
45
+  }
46
+}

+ 17
- 0
DaoDaoFrontend/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.d.ts View File

@@ -0,0 +1,17 @@
1
+/// <reference types="node" />
2
+
3
+declare module "ecdsa-sig-formatter" {
4
+	/**
5
+	 * Convert the ASN.1/DER encoded signature to a JOSE-style concatenated signature. Returns a base64 url encoded String.
6
+	 *    If signature is a String, it should be base64 encoded
7
+	 *    alg must be one of ES256, ES384 or ES512
8
+	 */
9
+	export function derToJose(signature: Buffer | string, alg: string): string;
10
+
11
+	/**
12
+	 * Convert the JOSE-style concatenated signature to an ASN.1/DER encoded signature. Returns a Buffer
13
+	 *     If signature is a String, it should be base64 url encoded
14
+	 *     alg must be one of ES256, ES384 or ES512
15
+	 */
16
+	export function joseToDer(signature: Buffer | string, alg: string): Buffer
17
+}

+ 187
- 0
DaoDaoFrontend/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js View File

@@ -0,0 +1,187 @@
1
+'use strict';
2
+
3
+var Buffer = require('safe-buffer').Buffer;
4
+
5
+var getParamBytesForAlg = require('./param-bytes-for-alg');
6
+
7
+var MAX_OCTET = 0x80,
8
+	CLASS_UNIVERSAL = 0,
9
+	PRIMITIVE_BIT = 0x20,
10
+	TAG_SEQ = 0x10,
11
+	TAG_INT = 0x02,
12
+	ENCODED_TAG_SEQ = (TAG_SEQ | PRIMITIVE_BIT) | (CLASS_UNIVERSAL << 6),
13
+	ENCODED_TAG_INT = TAG_INT | (CLASS_UNIVERSAL << 6);
14
+
15
+function base64Url(base64) {
16
+	return base64
17
+		.replace(/=/g, '')
18
+		.replace(/\+/g, '-')
19
+		.replace(/\//g, '_');
20
+}
21
+
22
+function signatureAsBuffer(signature) {
23
+	if (Buffer.isBuffer(signature)) {
24
+		return signature;
25
+	} else if ('string' === typeof signature) {
26
+		return Buffer.from(signature, 'base64');
27
+	}
28
+
29
+	throw new TypeError('ECDSA signature must be a Base64 string or a Buffer');
30
+}
31
+
32
+function derToJose(signature, alg) {
33
+	signature = signatureAsBuffer(signature);
34
+	var paramBytes = getParamBytesForAlg(alg);
35
+
36
+	// the DER encoded param should at most be the param size, plus a padding
37
+	// zero, since due to being a signed integer
38
+	var maxEncodedParamLength = paramBytes + 1;
39
+
40
+	var inputLength = signature.length;
41
+
42
+	var offset = 0;
43
+	if (signature[offset++] !== ENCODED_TAG_SEQ) {
44
+		throw new Error('Could not find expected "seq"');
45
+	}
46
+
47
+	var seqLength = signature[offset++];
48
+	if (seqLength === (MAX_OCTET | 1)) {
49
+		seqLength = signature[offset++];
50
+	}
51
+
52
+	if (inputLength - offset < seqLength) {
53
+		throw new Error('"seq" specified length of "' + seqLength + '", only "' + (inputLength - offset) + '" remaining');
54
+	}
55
+
56
+	if (signature[offset++] !== ENCODED_TAG_INT) {
57
+		throw new Error('Could not find expected "int" for "r"');
58
+	}
59
+
60
+	var rLength = signature[offset++];
61
+
62
+	if (inputLength - offset - 2 < rLength) {
63
+		throw new Error('"r" specified length of "' + rLength + '", only "' + (inputLength - offset - 2) + '" available');
64
+	}
65
+
66
+	if (maxEncodedParamLength < rLength) {
67
+		throw new Error('"r" specified length of "' + rLength + '", max of "' + maxEncodedParamLength + '" is acceptable');
68
+	}
69
+
70
+	var rOffset = offset;
71
+	offset += rLength;
72
+
73
+	if (signature[offset++] !== ENCODED_TAG_INT) {
74
+		throw new Error('Could not find expected "int" for "s"');
75
+	}
76
+
77
+	var sLength = signature[offset++];
78
+
79
+	if (inputLength - offset !== sLength) {
80
+		throw new Error('"s" specified length of "' + sLength + '", expected "' + (inputLength - offset) + '"');
81
+	}
82
+
83
+	if (maxEncodedParamLength < sLength) {
84
+		throw new Error('"s" specified length of "' + sLength + '", max of "' + maxEncodedParamLength + '" is acceptable');
85
+	}
86
+
87
+	var sOffset = offset;
88
+	offset += sLength;
89
+
90
+	if (offset !== inputLength) {
91
+		throw new Error('Expected to consume entire buffer, but "' + (inputLength - offset) + '" bytes remain');
92
+	}
93
+
94
+	var rPadding = paramBytes - rLength,
95
+		sPadding = paramBytes - sLength;
96
+
97
+	var dst = Buffer.allocUnsafe(rPadding + rLength + sPadding + sLength);
98
+
99
+	for (offset = 0; offset < rPadding; ++offset) {
100
+		dst[offset] = 0;
101
+	}
102
+	signature.copy(dst, offset, rOffset + Math.max(-rPadding, 0), rOffset + rLength);
103
+
104
+	offset = paramBytes;
105
+
106
+	for (var o = offset; offset < o + sPadding; ++offset) {
107
+		dst[offset] = 0;
108
+	}
109
+	signature.copy(dst, offset, sOffset + Math.max(-sPadding, 0), sOffset + sLength);
110
+
111
+	dst = dst.toString('base64');
112
+	dst = base64Url(dst);
113
+
114
+	return dst;
115
+}
116
+
117
+function countPadding(buf, start, stop) {
118
+	var padding = 0;
119
+	while (start + padding < stop && buf[start + padding] === 0) {
120
+		++padding;
121
+	}
122
+
123
+	var needsSign = buf[start + padding] >= MAX_OCTET;
124
+	if (needsSign) {
125
+		--padding;
126
+	}
127
+
128
+	return padding;
129
+}
130
+
131
+function joseToDer(signature, alg) {
132
+	signature = signatureAsBuffer(signature);
133
+	var paramBytes = getParamBytesForAlg(alg);
134
+
135
+	var signatureBytes = signature.length;
136
+	if (signatureBytes !== paramBytes * 2) {
137
+		throw new TypeError('"' + alg + '" signatures must be "' + paramBytes * 2 + '" bytes, saw "' + signatureBytes + '"');
138
+	}
139
+
140
+	var rPadding = countPadding(signature, 0, paramBytes);
141
+	var sPadding = countPadding(signature, paramBytes, signature.length);
142
+	var rLength = paramBytes - rPadding;
143
+	var sLength = paramBytes - sPadding;
144
+
145
+	var rsBytes = 1 + 1 + rLength + 1 + 1 + sLength;
146
+
147
+	var shortLength = rsBytes < MAX_OCTET;
148
+
149
+	var dst = Buffer.allocUnsafe((shortLength ? 2 : 3) + rsBytes);
150
+
151
+	var offset = 0;
152
+	dst[offset++] = ENCODED_TAG_SEQ;
153
+	if (shortLength) {
154
+		// Bit 8 has value "0"
155
+		// bits 7-1 give the length.
156
+		dst[offset++] = rsBytes;
157
+	} else {
158
+		// Bit 8 of first octet has value "1"
159
+		// bits 7-1 give the number of additional length octets.
160
+		dst[offset++] = MAX_OCTET	| 1;
161
+		// length, base 256
162
+		dst[offset++] = rsBytes & 0xff;
163
+	}
164
+	dst[offset++] = ENCODED_TAG_INT;
165
+	dst[offset++] = rLength;
166
+	if (rPadding < 0) {
167
+		dst[offset++] = 0;
168
+		offset += signature.copy(dst, offset, 0, paramBytes);
169
+	} else {
170
+		offset += signature.copy(dst, offset, rPadding, paramBytes);
171
+	}
172
+	dst[offset++] = ENCODED_TAG_INT;
173
+	dst[offset++] = sLength;
174
+	if (sPadding < 0) {
175
+		dst[offset++] = 0;
176
+		signature.copy(dst, offset, paramBytes);
177
+	} else {
178
+		signature.copy(dst, offset, paramBytes + sPadding);
179
+	}
180
+
181
+	return dst;
182
+}
183
+
184
+module.exports = {
185
+	derToJose: derToJose,
186
+	joseToDer: joseToDer
187
+};

+ 23
- 0
DaoDaoFrontend/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js View File

@@ -0,0 +1,23 @@
1
+'use strict';
2
+
3
+function getParamSize(keySize) {
4
+	var result = ((keySize / 8) | 0) + (keySize % 8 === 0 ? 0 : 1);
5
+	return result;
6
+}
7
+
8
+var paramBytesForAlg = {
9
+	ES256: getParamSize(256),
10
+	ES384: getParamSize(384),
11
+	ES512: getParamSize(521)
12
+};
13
+
14
+function getParamBytesForAlg(alg) {
15
+	var paramBytes = paramBytesForAlg[alg];
16
+	if (paramBytes) {
17
+		return paramBytes;
18
+	}
19
+
20
+	throw new Error('Unknown algorithm "' + alg + '"');
21
+}
22
+
23
+module.exports = getParamBytesForAlg;

+ 22
- 0
DaoDaoFrontend/node_modules/engine.io-client/LICENSE View File

@@ -0,0 +1,22 @@
1
+(The MIT License)
2
+
3
+Copyright (c) 2014-present Guillermo Rauch and Socket.IO contributors
4
+
5
+Permission is hereby granted, free of charge, to any person obtaining
6
+a copy of this software and associated documentation files (the
7
+'Software'), to deal in the Software without restriction, including
8
+without limitation the rights to use, copy, modify, merge, publish,
9
+distribute, sublicense, and/or sell copies of the Software, and to
10
+permit persons to whom the Software is furnished to do so, subject to
11
+the following conditions:
12
+
13
+The above copyright notice and this permission notice shall be
14
+included in all copies or substantial portions of the Software.
15
+
16
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 331
- 0
DaoDaoFrontend/node_modules/engine.io-client/README.md View File

@@ -0,0 +1,331 @@
1
+
2
+# Engine.IO client
3
+
4
+[![Build Status](https://github.com/socketio/engine.io-client/workflows/CI/badge.svg?branch=main)](https://github.com/socketio/engine.io-client/actions)
5
+[![NPM version](https://badge.fury.io/js/engine.io-client.svg)](http://badge.fury.io/js/engine.io-client)
6
+
7
+This is the client for [Engine.IO](http://github.com/socketio/engine.io),
8
+the implementation of transport-based cross-browser/cross-device
9
+bi-directional communication layer for [Socket.IO](http://github.com/socketio/socket.io).
10
+
11
+## How to use
12
+
13
+### Standalone
14
+
15
+You can find an `engine.io.js` file in this repository, which is a
16
+standalone build you can use as follows:
17
+
18
+```html
19
+<script src="/path/to/engine.io.js"></script>
20
+<script>
21
+  // eio = Socket
22
+  const socket = eio('ws://localhost');
23
+  socket.on('open', () => {
24
+    socket.on('message', (data) => {});
25
+    socket.on('close', () => {});
26
+  });
27
+</script>
28
+```
29
+
30
+### With browserify
31
+
32
+Engine.IO is a commonjs module, which means you can include it by using
33
+`require` on the browser and package using [browserify](http://browserify.org/):
34
+
35
+1. install the client package
36
+
37
+    ```bash
38
+    $ npm install engine.io-client
39
+    ```
40
+
41
+1. write your app code
42
+
43
+    ```js
44
+    const { Socket } = require('engine.io-client');
45
+    const socket = new Socket('ws://localhost');
46
+    socket.on('open', () => {
47
+      socket.on('message', (data) => {});
48
+      socket.on('close', () => {});
49
+    });
50
+    ```
51
+
52
+1. build your app bundle
53
+
54
+    ```bash
55
+    $ browserify app.js > bundle.js
56
+    ```
57
+
58
+1. include on your page
59
+
60
+    ```html
61
+    <script src="/path/to/bundle.js"></script>
62
+    ```
63
+
64
+### Sending and receiving binary
65
+
66
+```html
67
+<script src="/path/to/engine.io.js"></script>
68
+<script>
69
+  const socket = eio('ws://localhost/');
70
+  socket.binaryType = 'blob';
71
+  socket.on('open', () => {
72
+    socket.send(new Int8Array(5));
73
+    socket.on('message', (blob) => {});
74
+    socket.on('close', () => {});
75
+  });
76
+</script>
77
+```
78
+
79
+### Node.JS
80
+
81
+Add `engine.io-client` to your `package.json` and then:
82
+
83
+```js
84
+const { Socket } = require('engine.io-client');
85
+const socket = new Socket('ws://localhost');
86
+socket.on('open', () => {
87
+  socket.on('message', (data) => {});
88
+  socket.on('close', () => {});
89
+});
90
+```
91
+
92
+### Node.js with certificates
93
+```js
94
+const opts = {
95
+  key: fs.readFileSync('test/fixtures/client.key'),
96
+  cert: fs.readFileSync('test/fixtures/client.crt'),
97
+  ca: fs.readFileSync('test/fixtures/ca.crt')
98
+};
99
+
100
+const { Socket } = require('engine.io-client');
101
+const socket = new Socket('ws://localhost', opts);
102
+socket.on('open', () => {
103
+  socket.on('message', (data) => {});
104
+  socket.on('close', () => {});
105
+});
106
+```
107
+
108
+### Node.js with extraHeaders
109
+```js
110
+const opts = {
111
+  extraHeaders: {
112
+    'X-Custom-Header-For-My-Project': 'my-secret-access-token',
113
+    'Cookie': 'user_session=NI2JlCKF90aE0sJZD9ZzujtdsUqNYSBYxzlTsvdSUe35ZzdtVRGqYFr0kdGxbfc5gUOkR9RGp20GVKza; path=/; expires=Tue, 07-Apr-2015 18:18:08 GMT; secure; HttpOnly'
114
+  }
115
+};
116
+
117
+const { Socket } = require('engine.io-client');
118
+const socket = new Socket('ws://localhost', opts);
119
+socket.on('open', () => {
120
+  socket.on('message', (data) => {});
121
+  socket.on('close', () => {});
122
+});
123
+```
124
+
125
+In the browser, the [WebSocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) object does not support additional headers.
126
+In case you want to add some headers as part of some authentication mechanism, you can use the `transportOptions` attribute.
127
+Please note that in this case the headers won't be sent in the WebSocket upgrade request.
128
+
129
+```js
130
+// WILL NOT WORK in the browser
131
+const socket = new Socket('http://localhost', {
132
+  extraHeaders: {
133
+    'X-Custom-Header-For-My-Project': 'will not be sent'
134
+  }
135
+});
136
+// WILL NOT WORK
137
+const socket = new Socket('http://localhost', {
138
+  transports: ['websocket'], // polling is disabled
139
+  transportOptions: {
140
+    polling: {
141
+      extraHeaders: {
142
+        'X-Custom-Header-For-My-Project': 'will not be sent'
143
+      }
144
+    }
145
+  }
146
+});
147
+// WILL WORK
148
+const socket = new Socket('http://localhost', {
149
+  transports: ['polling', 'websocket'],
150
+  transportOptions: {
151
+    polling: {
152
+      extraHeaders: {
153
+        'X-Custom-Header-For-My-Project': 'will be used'
154
+      }
155
+    }
156
+  }
157
+});
158
+```
159
+
160
+## Features
161
+
162
+- Lightweight
163
+- Runs on browser and node.js seamlessly
164
+- Transports are independent of `Engine`
165
+  - Easy to debug
166
+  - Easy to unit test
167
+- Runs inside HTML5 WebWorker
168
+- Can send and receive binary data
169
+  - Receives as ArrayBuffer or Blob when in browser, and Buffer or ArrayBuffer
170
+    in Node
171
+  - When XHR2 or WebSockets are used, binary is emitted directly. Otherwise
172
+    binary is encoded into base64 strings, and decoded when binary types are
173
+    supported.
174
+  - With browsers that don't support ArrayBuffer, an object { base64: true,
175
+    data: dataAsBase64String } is emitted on the `message` event.
176
+
177
+## API
178
+
179
+### Socket
180
+
181
+The client class. Mixes in [Emitter](http://github.com/component/emitter).
182
+Exposed as `eio` in the browser standalone build.
183
+
184
+#### Properties
185
+
186
+- `protocol` _(Number)_: protocol revision number
187
+- `binaryType` _(String)_ : can be set to 'arraybuffer' or 'blob' in browsers,
188
+  and `buffer` or `arraybuffer` in Node. Blob is only used in browser if it's
189
+  supported.
190
+
191
+#### Events
192
+
193
+- `open`
194
+  - Fired upon successful connection.
195
+- `message`
196
+  - Fired when data is received from the server.
197
+  - **Arguments**
198
+    - `String` | `ArrayBuffer`: utf-8 encoded data or ArrayBuffer containing
199
+      binary data
200
+- `close`
201
+  - Fired upon disconnection. In compliance with the WebSocket API spec, this event may be
202
+    fired even if the `open` event does not occur (i.e. due to connection error or `close()`).
203
+- `error`
204
+  - Fired when an error occurs.
205
+- `flush`
206
+  - Fired upon completing a buffer flush
207
+- `drain`
208
+  - Fired after `drain` event of transport if writeBuffer is empty
209
+- `upgradeError`
210
+  - Fired if an error occurs with a transport we're trying to upgrade to.
211
+- `upgrade`
212
+  - Fired upon upgrade success, after the new transport is set
213
+- `ping`
214
+  - Fired upon receiving a ping packet.
215
+- `pong`
216
+  - Fired upon _flushing_ a pong packet (ie: actual packet write out)
217
+
218
+#### Methods
219
+
220
+- **constructor**
221
+    - Initializes the client
222
+    - **Parameters**
223
+      - `String` uri
224
+      - `Object`: optional, options object
225
+    - **Options**
226
+      - `agent` (`http.Agent`): `http.Agent` to use, defaults to `false` (NodeJS only)
227
+      - `upgrade` (`Boolean`): defaults to true, whether the client should try
228
+      to upgrade the transport from long-polling to something better.
229
+      - `forceBase64` (`Boolean`): forces base 64 encoding for polling transport even when XHR2 responseType is available and WebSocket even if the used standard supports binary.
230
+      - `withCredentials` (`Boolean`): defaults to `false`, whether to include credentials (cookies, authorization headers, TLS client certificates, etc.) with cross-origin XHR polling requests.
231
+      - `timestampRequests` (`Boolean`): whether to add the timestamp with each
232
+        transport request. Note: polling requests are always stamped unless this
233
+        option is explicitly set to `false` (`false`)
234
+      - `timestampParam` (`String`): timestamp parameter (`t`)
235
+      - `path` (`String`): path to connect to, default is `/engine.io`
236
+      - `transports` (`Array`): a list of transports to try (in order).
237
+      Defaults to `['polling', 'websocket', 'webtransport']`. `Engine`
238
+      always attempts to connect directly with the first one, provided the
239
+      feature detection test for it passes.
240
+      - `transportOptions` (`Object`): hash of options, indexed by transport name, overriding the common options for the given transport
241
+      - `rememberUpgrade` (`Boolean`): defaults to false.
242
+        If true and if the previous websocket connection to the server succeeded,
243
+        the connection attempt will bypass the normal upgrade process and will initially
244
+        try websocket. A connection attempt following a transport error will use the
245
+        normal upgrade process. It is recommended you turn this on only when using
246
+        SSL/TLS connections, or if you know that your network does not block websockets.
247
+      - `pfx` (`String`|`Buffer`): Certificate, Private key and CA certificates to use for SSL. Can be used in Node.js client environment to manually specify certificate information.
248
+      - `key` (`String`): Private key to use for SSL. Can be used in Node.js client environment to manually specify certificate information.
249
+      - `passphrase` (`String`): A string of passphrase for the private key or pfx. Can be used in Node.js client environment to manually specify certificate information.
250
+      - `cert` (`String`): Public x509 certificate to use. Can be used in Node.js client environment to manually specify certificate information.
251
+      - `ca` (`String`|`Array`): An authority certificate or array of authority certificates to check the remote host against.. Can be used in Node.js client environment to manually specify certificate information.
252
+      - `ciphers` (`String`): A string describing the ciphers to use or exclude. Consult the [cipher format list](http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT) for details on the format. Can be used in Node.js client environment to manually specify certificate information.
253
+      - `rejectUnauthorized` (`Boolean`): If true, the server certificate is verified against the list of supplied CAs. An 'error' event is emitted if verification fails. Verification happens at the connection level, before the HTTP request is sent. Can be used in Node.js client environment to manually specify certificate information.
254
+      - `perMessageDeflate` (`Object|Boolean`): parameters of the WebSocket permessage-deflate extension
255
+        (see [ws module](https://github.com/einaros/ws) api docs). Set to `false` to disable. (`true`)
256
+        - `threshold` (`Number`): data is compressed only if the byte size is above this value. This option is ignored on the browser. (`1024`)
257
+      - `extraHeaders` (`Object`): Headers that will be passed for each request to the server (via xhr-polling and via websockets). These values then can be used during handshake or for special proxies. Can only be used in Node.js client environment.
258
+      - `localAddress` (`String`): the local IP address to connect to
259
+      - `autoUnref` (`Boolean`): whether the transport should be `unref`'d upon creation. This calls `unref` on the underlying timers and sockets so that the program is allowed to exit if they are the only timers/sockets in the event system (Node.js only)
260
+      - `useNativeTimers` (`Boolean`): Whether to always use the native timeouts. This allows the client to reconnect when the native timeout functions are overridden, such as when mock clocks are installed with [`@sinonjs/fake-timers`](https://github.com/sinonjs/fake-timers).
261
+    - **Polling-only options**
262
+      - `requestTimeout` (`Number`): Timeout for xhr-polling requests in milliseconds (`0`)
263
+    - **Websocket-only options**
264
+      - `protocols` (`Array`): a list of subprotocols (see [MDN reference](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers#Subprotocols))
265
+      - `closeOnBeforeunload` (`Boolean`): whether to silently close the connection when the [`beforeunload`](https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event) event is emitted in the browser (defaults to `false`)
266
+- `send`
267
+    - Sends a message to the server
268
+    - **Parameters**
269
+      - `String` | `ArrayBuffer` | `ArrayBufferView` | `Blob`: data to send
270
+      - `Object`: optional, options object
271
+      - `Function`: optional, callback upon `drain`
272
+    - **Options**
273
+      - `compress` (`Boolean`): whether to compress sending data. This option is ignored and forced to be `true` on the browser. (`true`)
274
+- `close`
275
+    - Disconnects the client.
276
+
277
+### Transport
278
+
279
+The transport class. Private. _Inherits from EventEmitter_.
280
+
281
+#### Events
282
+
283
+- `poll`: emitted by polling transports upon starting a new request
284
+- `pollComplete`: emitted by polling transports upon completing a request
285
+- `drain`: emitted by polling transports upon a buffer drain
286
+
287
+## Tests
288
+
289
+`engine.io-client` is used to test
290
+[engine](http://github.com/socketio/engine.io). Running the `engine.io`
291
+test suite ensures the client works and vice-versa.
292
+
293
+Browser tests are run using [zuul](https://github.com/defunctzombie/zuul). You can
294
+run the tests locally using the following command.
295
+
296
+```
297
+./node_modules/.bin/zuul --local 8080 -- test/index.js
298
+```
299
+
300
+Additionally, `engine.io-client` has a standalone test suite you can run
301
+with `make test` which will run node.js and browser tests. You must have zuul setup with
302
+a saucelabs account.
303
+
304
+## Support
305
+
306
+The support channels for `engine.io-client` are the same as `socket.io`:
307
+  - irc.freenode.net **#socket.io**
308
+  - [Google Groups](http://groups.google.com/group/socket_io)
309
+  - [Website](http://socket.io)
310
+
311
+## Development
312
+
313
+To contribute patches, run tests or benchmarks, make sure to clone the
314
+repository:
315
+
316
+```bash
317
+git clone git://github.com/socketio/engine.io-client.git
318
+```
319
+
320
+Then:
321
+
322
+```bash
323
+cd engine.io-client
324
+npm install
325
+```
326
+
327
+See the `Tests` section above for how to run tests before submitting any patches.
328
+
329
+## License
330
+
331
+MIT - Copyright (c) 2014 Automattic, Inc.

+ 3
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/browser-entrypoint.d.ts View File

@@ -0,0 +1,3 @@
1
+import { Socket } from "./socket.js";
2
+declare const _default: (uri: any, opts: any) => Socket;
3
+export default _default;

+ 4
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/browser-entrypoint.js View File

@@ -0,0 +1,4 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const socket_js_1 = require("./socket.js");
4
+exports.default = (uri, opts) => new socket_js_1.Socket(uri, opts);

+ 1
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/contrib/has-cors.d.ts View File

@@ -0,0 +1 @@
1
+export declare const hasCORS: boolean;

+ 14
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/contrib/has-cors.js View File

@@ -0,0 +1,14 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.hasCORS = void 0;
4
+// imported from https://github.com/component/has-cors
5
+let value = false;
6
+try {
7
+    value = typeof XMLHttpRequest !== 'undefined' &&
8
+        'withCredentials' in new XMLHttpRequest();
9
+}
10
+catch (err) {
11
+    // if XMLHttp support is disabled in IE then it will throw
12
+    // when trying to create
13
+}
14
+exports.hasCORS = value;

+ 15
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/contrib/parseqs.d.ts View File

@@ -0,0 +1,15 @@
1
+/**
2
+ * Compiles a querystring
3
+ * Returns string representation of the object
4
+ *
5
+ * @param {Object}
6
+ * @api private
7
+ */
8
+export declare function encode(obj: any): string;
9
+/**
10
+ * Parses a simple querystring into an object
11
+ *
12
+ * @param {String} qs
13
+ * @api private
14
+ */
15
+export declare function decode(qs: any): {};

+ 38
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/contrib/parseqs.js View File

@@ -0,0 +1,38 @@
1
+"use strict";
2
+// imported from https://github.com/galkn/querystring
3
+/**
4
+ * Compiles a querystring
5
+ * Returns string representation of the object
6
+ *
7
+ * @param {Object}
8
+ * @api private
9
+ */
10
+Object.defineProperty(exports, "__esModule", { value: true });
11
+exports.encode = encode;
12
+exports.decode = decode;
13
+function encode(obj) {
14
+    let str = '';
15
+    for (let i in obj) {
16
+        if (obj.hasOwnProperty(i)) {
17
+            if (str.length)
18
+                str += '&';
19
+            str += encodeURIComponent(i) + '=' + encodeURIComponent(obj[i]);
20
+        }
21
+    }
22
+    return str;
23
+}
24
+/**
25
+ * Parses a simple querystring into an object
26
+ *
27
+ * @param {String} qs
28
+ * @api private
29
+ */
30
+function decode(qs) {
31
+    let qry = {};
32
+    let pairs = qs.split('&');
33
+    for (let i = 0, l = pairs.length; i < l; i++) {
34
+        let pair = pairs[i].split('=');
35
+        qry[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);
36
+    }
37
+    return qry;
38
+}

+ 1
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/contrib/parseuri.d.ts View File

@@ -0,0 +1 @@
1
+export declare function parse(str: string): any;

+ 67
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/contrib/parseuri.js View File

@@ -0,0 +1,67 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.parse = parse;
4
+// imported from https://github.com/galkn/parseuri
5
+/**
6
+ * Parses a URI
7
+ *
8
+ * Note: we could also have used the built-in URL object, but it isn't supported on all platforms.
9
+ *
10
+ * See:
11
+ * - https://developer.mozilla.org/en-US/docs/Web/API/URL
12
+ * - https://caniuse.com/url
13
+ * - https://www.rfc-editor.org/rfc/rfc3986#appendix-B
14
+ *
15
+ * History of the parse() method:
16
+ * - first commit: https://github.com/socketio/socket.io-client/commit/4ee1d5d94b3906a9c052b459f1a818b15f38f91c
17
+ * - export into its own module: https://github.com/socketio/engine.io-client/commit/de2c561e4564efeb78f1bdb1ba39ef81b2822cb3
18
+ * - reimport: https://github.com/socketio/engine.io-client/commit/df32277c3f6d622eec5ed09f493cae3f3391d242
19
+ *
20
+ * @author Steven Levithan <stevenlevithan.com> (MIT license)
21
+ * @api private
22
+ */
23
+const re = /^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/;
24
+const parts = [
25
+    'source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'
26
+];
27
+function parse(str) {
28
+    if (str.length > 8000) {
29
+        throw "URI too long";
30
+    }
31
+    const src = str, b = str.indexOf('['), e = str.indexOf(']');
32
+    if (b != -1 && e != -1) {
33
+        str = str.substring(0, b) + str.substring(b, e).replace(/:/g, ';') + str.substring(e, str.length);
34
+    }
35
+    let m = re.exec(str || ''), uri = {}, i = 14;
36
+    while (i--) {
37
+        uri[parts[i]] = m[i] || '';
38
+    }
39
+    if (b != -1 && e != -1) {
40
+        uri.source = src;
41
+        uri.host = uri.host.substring(1, uri.host.length - 1).replace(/;/g, ':');
42
+        uri.authority = uri.authority.replace('[', '').replace(']', '').replace(/;/g, ':');
43
+        uri.ipv6uri = true;
44
+    }
45
+    uri.pathNames = pathNames(uri, uri['path']);
46
+    uri.queryKey = queryKey(uri, uri['query']);
47
+    return uri;
48
+}
49
+function pathNames(obj, path) {
50
+    const regx = /\/{2,9}/g, names = path.replace(regx, "/").split("/");
51
+    if (path.slice(0, 1) == '/' || path.length === 0) {
52
+        names.splice(0, 1);
53
+    }
54
+    if (path.slice(-1) == '/') {
55
+        names.splice(names.length - 1, 1);
56
+    }
57
+    return names;
58
+}
59
+function queryKey(uri, query) {
60
+    const data = {};
61
+    query.replace(/(?:^|&)([^&=]*)=?([^&]*)/g, function ($0, $1, $2) {
62
+        if ($1) {
63
+            data[$1] = $2;
64
+        }
65
+    });
66
+    return data;
67
+}

+ 4
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/globals.d.ts View File

@@ -0,0 +1,4 @@
1
+export declare const nextTick: (cb: any, setTimeoutFn: any) => any;
2
+export declare const globalThisShim: any;
3
+export declare const defaultBinaryType = "arraybuffer";
4
+export declare function createCookieJar(): void;

+ 26
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/globals.js View File

@@ -0,0 +1,26 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.defaultBinaryType = exports.globalThisShim = exports.nextTick = void 0;
4
+exports.createCookieJar = createCookieJar;
5
+exports.nextTick = (() => {
6
+    const isPromiseAvailable = typeof Promise === "function" && typeof Promise.resolve === "function";
7
+    if (isPromiseAvailable) {
8
+        return (cb) => Promise.resolve().then(cb);
9
+    }
10
+    else {
11
+        return (cb, setTimeoutFn) => setTimeoutFn(cb, 0);
12
+    }
13
+})();
14
+exports.globalThisShim = (() => {
15
+    if (typeof self !== "undefined") {
16
+        return self;
17
+    }
18
+    else if (typeof window !== "undefined") {
19
+        return window;
20
+    }
21
+    else {
22
+        return Function("return this")();
23
+    }
24
+})();
25
+exports.defaultBinaryType = "arraybuffer";
26
+function createCookieJar() { }

+ 21
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/globals.node.d.ts View File

@@ -0,0 +1,21 @@
1
+export declare const nextTick: (callback: Function, ...args: any[]) => void;
2
+export declare const globalThisShim: typeof globalThis;
3
+export declare const defaultBinaryType = "nodebuffer";
4
+export declare function createCookieJar(): CookieJar;
5
+interface Cookie {
6
+    name: string;
7
+    value: string;
8
+    expires?: Date;
9
+}
10
+/**
11
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie
12
+ */
13
+export declare function parse(setCookieString: string): Cookie;
14
+export declare class CookieJar {
15
+    private _cookies;
16
+    parseCookies(values: string[]): void;
17
+    get cookies(): IterableIterator<[string, Cookie]>;
18
+    addCookies(xhr: any): void;
19
+    appendCookies(headers: Headers): void;
20
+}
21
+export {};

+ 97
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/globals.node.js View File

@@ -0,0 +1,97 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.CookieJar = exports.defaultBinaryType = exports.globalThisShim = exports.nextTick = void 0;
4
+exports.createCookieJar = createCookieJar;
5
+exports.parse = parse;
6
+exports.nextTick = process.nextTick;
7
+exports.globalThisShim = global;
8
+exports.defaultBinaryType = "nodebuffer";
9
+function createCookieJar() {
10
+    return new CookieJar();
11
+}
12
+/**
13
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie
14
+ */
15
+function parse(setCookieString) {
16
+    const parts = setCookieString.split("; ");
17
+    const i = parts[0].indexOf("=");
18
+    if (i === -1) {
19
+        return;
20
+    }
21
+    const name = parts[0].substring(0, i).trim();
22
+    if (!name.length) {
23
+        return;
24
+    }
25
+    let value = parts[0].substring(i + 1).trim();
26
+    if (value.charCodeAt(0) === 0x22) {
27
+        // remove double quotes
28
+        value = value.slice(1, -1);
29
+    }
30
+    const cookie = {
31
+        name,
32
+        value,
33
+    };
34
+    for (let j = 1; j < parts.length; j++) {
35
+        const subParts = parts[j].split("=");
36
+        if (subParts.length !== 2) {
37
+            continue;
38
+        }
39
+        const key = subParts[0].trim();
40
+        const value = subParts[1].trim();
41
+        switch (key) {
42
+            case "Expires":
43
+                cookie.expires = new Date(value);
44
+                break;
45
+            case "Max-Age":
46
+                const expiration = new Date();
47
+                expiration.setUTCSeconds(expiration.getUTCSeconds() + parseInt(value, 10));
48
+                cookie.expires = expiration;
49
+                break;
50
+            default:
51
+            // ignore other keys
52
+        }
53
+    }
54
+    return cookie;
55
+}
56
+class CookieJar {
57
+    constructor() {
58
+        this._cookies = new Map();
59
+    }
60
+    parseCookies(values) {
61
+        if (!values) {
62
+            return;
63
+        }
64
+        values.forEach((value) => {
65
+            const parsed = parse(value);
66
+            if (parsed) {
67
+                this._cookies.set(parsed.name, parsed);
68
+            }
69
+        });
70
+    }
71
+    get cookies() {
72
+        const now = Date.now();
73
+        this._cookies.forEach((cookie, name) => {
74
+            var _a;
75
+            if (((_a = cookie.expires) === null || _a === void 0 ? void 0 : _a.getTime()) < now) {
76
+                this._cookies.delete(name);
77
+            }
78
+        });
79
+        return this._cookies.entries();
80
+    }
81
+    addCookies(xhr) {
82
+        const cookies = [];
83
+        for (const [name, cookie] of this.cookies) {
84
+            cookies.push(`${name}=${cookie.value}`);
85
+        }
86
+        if (cookies.length) {
87
+            xhr.setDisableHeaderCheck(true);
88
+            xhr.setRequestHeader("cookie", cookies.join("; "));
89
+        }
90
+    }
91
+    appendCookies(headers) {
92
+        for (const [name, cookie] of this.cookies) {
93
+            headers.append("cookie", `${name}=${cookie.value}`);
94
+        }
95
+    }
96
+}
97
+exports.CookieJar = CookieJar;

+ 15
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/index.d.ts View File

@@ -0,0 +1,15 @@
1
+import { Socket } from "./socket.js";
2
+export { Socket };
3
+export { SocketOptions, SocketWithoutUpgrade, SocketWithUpgrade, } from "./socket.js";
4
+export declare const protocol: number;
5
+export { Transport, TransportError } from "./transport.js";
6
+export { transports } from "./transports/index.js";
7
+export { installTimerFunctions } from "./util.js";
8
+export { parse } from "./contrib/parseuri.js";
9
+export { nextTick } from "./globals.node.js";
10
+export { Fetch } from "./transports/polling-fetch.js";
11
+export { XHR as NodeXHR } from "./transports/polling-xhr.node.js";
12
+export { XHR } from "./transports/polling-xhr.js";
13
+export { WS as NodeWebSocket } from "./transports/websocket.node.js";
14
+export { WS as WebSocket } from "./transports/websocket.js";
15
+export { WT as WebTransport } from "./transports/webtransport.js";

+ 32
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/index.js View File

@@ -0,0 +1,32 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.WebTransport = exports.WebSocket = exports.NodeWebSocket = exports.XHR = exports.NodeXHR = exports.Fetch = exports.nextTick = exports.parse = exports.installTimerFunctions = exports.transports = exports.TransportError = exports.Transport = exports.protocol = exports.SocketWithUpgrade = exports.SocketWithoutUpgrade = exports.Socket = void 0;
4
+const socket_js_1 = require("./socket.js");
5
+Object.defineProperty(exports, "Socket", { enumerable: true, get: function () { return socket_js_1.Socket; } });
6
+var socket_js_2 = require("./socket.js");
7
+Object.defineProperty(exports, "SocketWithoutUpgrade", { enumerable: true, get: function () { return socket_js_2.SocketWithoutUpgrade; } });
8
+Object.defineProperty(exports, "SocketWithUpgrade", { enumerable: true, get: function () { return socket_js_2.SocketWithUpgrade; } });
9
+exports.protocol = socket_js_1.Socket.protocol;
10
+var transport_js_1 = require("./transport.js");
11
+Object.defineProperty(exports, "Transport", { enumerable: true, get: function () { return transport_js_1.Transport; } });
12
+Object.defineProperty(exports, "TransportError", { enumerable: true, get: function () { return transport_js_1.TransportError; } });
13
+var index_js_1 = require("./transports/index.js");
14
+Object.defineProperty(exports, "transports", { enumerable: true, get: function () { return index_js_1.transports; } });
15
+var util_js_1 = require("./util.js");
16
+Object.defineProperty(exports, "installTimerFunctions", { enumerable: true, get: function () { return util_js_1.installTimerFunctions; } });
17
+var parseuri_js_1 = require("./contrib/parseuri.js");
18
+Object.defineProperty(exports, "parse", { enumerable: true, get: function () { return parseuri_js_1.parse; } });
19
+var globals_node_js_1 = require("./globals.node.js");
20
+Object.defineProperty(exports, "nextTick", { enumerable: true, get: function () { return globals_node_js_1.nextTick; } });
21
+var polling_fetch_js_1 = require("./transports/polling-fetch.js");
22
+Object.defineProperty(exports, "Fetch", { enumerable: true, get: function () { return polling_fetch_js_1.Fetch; } });
23
+var polling_xhr_node_js_1 = require("./transports/polling-xhr.node.js");
24
+Object.defineProperty(exports, "NodeXHR", { enumerable: true, get: function () { return polling_xhr_node_js_1.XHR; } });
25
+var polling_xhr_js_1 = require("./transports/polling-xhr.js");
26
+Object.defineProperty(exports, "XHR", { enumerable: true, get: function () { return polling_xhr_js_1.XHR; } });
27
+var websocket_node_js_1 = require("./transports/websocket.node.js");
28
+Object.defineProperty(exports, "NodeWebSocket", { enumerable: true, get: function () { return websocket_node_js_1.WS; } });
29
+var websocket_js_1 = require("./transports/websocket.js");
30
+Object.defineProperty(exports, "WebSocket", { enumerable: true, get: function () { return websocket_js_1.WS; } });
31
+var webtransport_js_1 = require("./transports/webtransport.js");
32
+Object.defineProperty(exports, "WebTransport", { enumerable: true, get: function () { return webtransport_js_1.WT; } });

+ 10
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/package.json View File

@@ -0,0 +1,10 @@
1
+{
2
+  "name": "engine.io-client",
3
+  "type": "commonjs",
4
+  "browser": {
5
+    "ws": false,
6
+    "./transports/polling-xhr.node.js": "./transports/polling-xhr.js",
7
+    "./transports/websocket.node.js": "./transports/websocket.js",
8
+    "./globals.node.js": "./globals.js"
9
+  }
10
+}

+ 482
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/socket.d.ts View File

@@ -0,0 +1,482 @@
1
+import { Emitter } from "@socket.io/component-emitter";
2
+import type { Packet, BinaryType, RawData } from "engine.io-parser";
3
+import { CloseDetails, Transport } from "./transport.js";
4
+import { CookieJar } from "./globals.node.js";
5
+export interface SocketOptions {
6
+    /**
7
+     * The host that we're connecting to. Set from the URI passed when connecting
8
+     */
9
+    host?: string;
10
+    /**
11
+     * The hostname for our connection. Set from the URI passed when connecting
12
+     */
13
+    hostname?: string;
14
+    /**
15
+     * If this is a secure connection. Set from the URI passed when connecting
16
+     */
17
+    secure?: boolean;
18
+    /**
19
+     * The port for our connection. Set from the URI passed when connecting
20
+     */
21
+    port?: string | number;
22
+    /**
23
+     * Any query parameters in our uri. Set from the URI passed when connecting
24
+     */
25
+    query?: {
26
+        [key: string]: any;
27
+    };
28
+    /**
29
+     * `http.Agent` to use, defaults to `false` (NodeJS only)
30
+     *
31
+     * Note: the type should be "undefined | http.Agent | https.Agent | false", but this would break browser-only clients.
32
+     *
33
+     * @see https://nodejs.org/api/http.html#httprequestoptions-callback
34
+     */
35
+    agent?: string | boolean;
36
+    /**
37
+     * Whether the client should try to upgrade the transport from
38
+     * long-polling to something better.
39
+     * @default true
40
+     */
41
+    upgrade?: boolean;
42
+    /**
43
+     * Forces base 64 encoding for polling transport even when XHR2
44
+     * responseType is available and WebSocket even if the used standard
45
+     * supports binary.
46
+     */
47
+    forceBase64?: boolean;
48
+    /**
49
+     * The param name to use as our timestamp key
50
+     * @default 't'
51
+     */
52
+    timestampParam?: string;
53
+    /**
54
+     * Whether to add the timestamp with each transport request. Note: this
55
+     * is ignored if the browser is IE or Android, in which case requests
56
+     * are always stamped
57
+     * @default false
58
+     */
59
+    timestampRequests?: boolean;
60
+    /**
61
+     * A list of transports to try (in order). Engine.io always attempts to
62
+     * connect directly with the first one, provided the feature detection test
63
+     * for it passes.
64
+     *
65
+     * @default ['polling','websocket', 'webtransport']
66
+     */
67
+    transports?: ("polling" | "websocket" | "webtransport" | string)[] | TransportCtor[];
68
+    /**
69
+     * Whether all the transports should be tested, instead of just the first one.
70
+     *
71
+     * If set to `true`, the client will first try to connect with HTTP long-polling, and then with WebSocket in case of
72
+     * failure, and finally with WebTransport if the previous attempts have failed.
73
+     *
74
+     * If set to `false` (default), if the connection with HTTP long-polling fails, then the client will not test the
75
+     * other transports and will abort the connection.
76
+     *
77
+     * @default false
78
+     */
79
+    tryAllTransports?: boolean;
80
+    /**
81
+     * If true and if the previous websocket connection to the server succeeded,
82
+     * the connection attempt will bypass the normal upgrade process and will
83
+     * initially try websocket. A connection attempt following a transport error
84
+     * will use the normal upgrade process. It is recommended you turn this on
85
+     * only when using SSL/TLS connections, or if you know that your network does
86
+     * not block websockets.
87
+     * @default false
88
+     */
89
+    rememberUpgrade?: boolean;
90
+    /**
91
+     * Timeout for xhr-polling requests in milliseconds (0) (only for polling transport)
92
+     */
93
+    requestTimeout?: number;
94
+    /**
95
+     * Transport options for Node.js client (headers etc)
96
+     */
97
+    transportOptions?: Object;
98
+    /**
99
+     * (SSL) Certificate, Private key and CA certificates to use for SSL.
100
+     * Can be used in Node.js client environment to manually specify
101
+     * certificate information.
102
+     */
103
+    pfx?: string;
104
+    /**
105
+     * (SSL) Private key to use for SSL. Can be used in Node.js client
106
+     * environment to manually specify certificate information.
107
+     */
108
+    key?: string;
109
+    /**
110
+     * (SSL) A string or passphrase for the private key or pfx. Can be
111
+     * used in Node.js client environment to manually specify certificate
112
+     * information.
113
+     */
114
+    passphrase?: string;
115
+    /**
116
+     * (SSL) Public x509 certificate to use. Can be used in Node.js client
117
+     * environment to manually specify certificate information.
118
+     */
119
+    cert?: string;
120
+    /**
121
+     * (SSL) An authority certificate or array of authority certificates to
122
+     * check the remote host against.. Can be used in Node.js client
123
+     * environment to manually specify certificate information.
124
+     */
125
+    ca?: string | string[];
126
+    /**
127
+     * (SSL) A string describing the ciphers to use or exclude. Consult the
128
+     * [cipher format list]
129
+     * (http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT) for
130
+     * details on the format.. Can be used in Node.js client environment to
131
+     * manually specify certificate information.
132
+     */
133
+    ciphers?: string;
134
+    /**
135
+     * (SSL) If true, the server certificate is verified against the list of
136
+     * supplied CAs. An 'error' event is emitted if verification fails.
137
+     * Verification happens at the connection level, before the HTTP request
138
+     * is sent. Can be used in Node.js client environment to manually specify
139
+     * certificate information.
140
+     */
141
+    rejectUnauthorized?: boolean;
142
+    /**
143
+     * Headers that will be passed for each request to the server (via xhr-polling and via websockets).
144
+     * These values then can be used during handshake or for special proxies.
145
+     */
146
+    extraHeaders?: {
147
+        [header: string]: string;
148
+    };
149
+    /**
150
+     * Whether to include credentials (cookies, authorization headers, TLS
151
+     * client certificates, etc.) with cross-origin XHR polling requests
152
+     * @default false
153
+     */
154
+    withCredentials?: boolean;
155
+    /**
156
+     * Whether to automatically close the connection whenever the beforeunload event is received.
157
+     * @default false
158
+     */
159
+    closeOnBeforeunload?: boolean;
160
+    /**
161
+     * Whether to always use the native timeouts. This allows the client to
162
+     * reconnect when the native timeout functions are overridden, such as when
163
+     * mock clocks are installed.
164
+     * @default false
165
+     */
166
+    useNativeTimers?: boolean;
167
+    /**
168
+     * Whether the heartbeat timer should be unref'ed, in order not to keep the Node.js event loop active.
169
+     *
170
+     * @see https://nodejs.org/api/timers.html#timeoutunref
171
+     * @default false
172
+     */
173
+    autoUnref?: boolean;
174
+    /**
175
+     * parameters of the WebSocket permessage-deflate extension (see ws module api docs). Set to false to disable.
176
+     * @default false
177
+     */
178
+    perMessageDeflate?: {
179
+        threshold: number;
180
+    };
181
+    /**
182
+     * The path to get our client file from, in the case of the server
183
+     * serving it
184
+     * @default '/engine.io'
185
+     */
186
+    path?: string;
187
+    /**
188
+     * Whether we should add a trailing slash to the request path.
189
+     * @default true
190
+     */
191
+    addTrailingSlash?: boolean;
192
+    /**
193
+     * Either a single protocol string or an array of protocol strings. These strings are used to indicate sub-protocols,
194
+     * so that a single server can implement multiple WebSocket sub-protocols (for example, you might want one server to
195
+     * be able to handle different types of interactions depending on the specified protocol)
196
+     * @default []
197
+     */
198
+    protocols?: string | string[];
199
+}
200
+type TransportCtor = {
201
+    new (o: any): Transport;
202
+};
203
+type BaseSocketOptions = Omit<SocketOptions, "transports"> & {
204
+    transports: TransportCtor[];
205
+};
206
+interface HandshakeData {
207
+    sid: string;
208
+    upgrades: string[];
209
+    pingInterval: number;
210
+    pingTimeout: number;
211
+    maxPayload: number;
212
+}
213
+interface SocketReservedEvents {
214
+    open: () => void;
215
+    handshake: (data: HandshakeData) => void;
216
+    packet: (packet: Packet) => void;
217
+    packetCreate: (packet: Packet) => void;
218
+    data: (data: RawData) => void;
219
+    message: (data: RawData) => void;
220
+    drain: () => void;
221
+    flush: () => void;
222
+    heartbeat: () => void;
223
+    ping: () => void;
224
+    pong: () => void;
225
+    error: (err: string | Error) => void;
226
+    upgrading: (transport: Transport) => void;
227
+    upgrade: (transport: Transport) => void;
228
+    upgradeError: (err: Error) => void;
229
+    close: (reason: string, description?: CloseDetails | Error) => void;
230
+}
231
+type SocketState = "opening" | "open" | "closing" | "closed";
232
+interface WriteOptions {
233
+    compress?: boolean;
234
+}
235
+/**
236
+ * This class provides a WebSocket-like interface to connect to an Engine.IO server. The connection will be established
237
+ * with one of the available low-level transports, like HTTP long-polling, WebSocket or WebTransport.
238
+ *
239
+ * This class comes without upgrade mechanism, which means that it will keep the first low-level transport that
240
+ * successfully establishes the connection.
241
+ *
242
+ * In order to allow tree-shaking, there are no transports included, that's why the `transports` option is mandatory.
243
+ *
244
+ * @example
245
+ * import { SocketWithoutUpgrade, WebSocket } from "engine.io-client";
246
+ *
247
+ * const socket = new SocketWithoutUpgrade({
248
+ *   transports: [WebSocket]
249
+ * });
250
+ *
251
+ * socket.on("open", () => {
252
+ *   socket.send("hello");
253
+ * });
254
+ *
255
+ * @see SocketWithUpgrade
256
+ * @see Socket
257
+ */
258
+export declare class SocketWithoutUpgrade extends Emitter<Record<never, never>, Record<never, never>, SocketReservedEvents> {
259
+    id: string;
260
+    transport: Transport;
261
+    binaryType: BinaryType;
262
+    readyState: SocketState;
263
+    writeBuffer: Packet[];
264
+    protected readonly opts: BaseSocketOptions;
265
+    protected readonly transports: string[];
266
+    protected upgrading: boolean;
267
+    protected setTimeoutFn: typeof setTimeout;
268
+    private _prevBufferLen;
269
+    private _pingInterval;
270
+    private _pingTimeout;
271
+    private _maxPayload?;
272
+    private _pingTimeoutTimer;
273
+    /**
274
+     * The expiration timestamp of the {@link _pingTimeoutTimer} object is tracked, in case the timer is throttled and the
275
+     * callback is not fired on time. This can happen for example when a laptop is suspended or when a phone is locked.
276
+     */
277
+    private _pingTimeoutTime;
278
+    private clearTimeoutFn;
279
+    private readonly _beforeunloadEventListener;
280
+    private readonly _offlineEventListener;
281
+    private readonly secure;
282
+    private readonly hostname;
283
+    private readonly port;
284
+    private readonly _transportsByName;
285
+    /**
286
+     * The cookie jar will store the cookies sent by the server (Node. js only).
287
+     */
288
+    readonly _cookieJar: CookieJar;
289
+    static priorWebsocketSuccess: boolean;
290
+    static protocol: number;
291
+    /**
292
+     * Socket constructor.
293
+     *
294
+     * @param {String|Object} uri - uri or options
295
+     * @param {Object} opts - options
296
+     */
297
+    constructor(uri: string | BaseSocketOptions, opts: BaseSocketOptions);
298
+    /**
299
+     * Creates transport of the given type.
300
+     *
301
+     * @param {String} name - transport name
302
+     * @return {Transport}
303
+     * @private
304
+     */
305
+    protected createTransport(name: string): Transport;
306
+    /**
307
+     * Initializes transport to use and starts probe.
308
+     *
309
+     * @private
310
+     */
311
+    private _open;
312
+    /**
313
+     * Sets the current transport. Disables the existing one (if any).
314
+     *
315
+     * @private
316
+     */
317
+    protected setTransport(transport: Transport): void;
318
+    /**
319
+     * Called when connection is deemed open.
320
+     *
321
+     * @private
322
+     */
323
+    protected onOpen(): void;
324
+    /**
325
+     * Handles a packet.
326
+     *
327
+     * @private
328
+     */
329
+    private _onPacket;
330
+    /**
331
+     * Called upon handshake completion.
332
+     *
333
+     * @param {Object} data - handshake obj
334
+     * @private
335
+     */
336
+    protected onHandshake(data: HandshakeData): void;
337
+    /**
338
+     * Sets and resets ping timeout timer based on server pings.
339
+     *
340
+     * @private
341
+     */
342
+    private _resetPingTimeout;
343
+    /**
344
+     * Called on `drain` event
345
+     *
346
+     * @private
347
+     */
348
+    private _onDrain;
349
+    /**
350
+     * Flush write buffers.
351
+     *
352
+     * @private
353
+     */
354
+    protected flush(): void;
355
+    /**
356
+     * Ensure the encoded size of the writeBuffer is below the maxPayload value sent by the server (only for HTTP
357
+     * long-polling)
358
+     *
359
+     * @private
360
+     */
361
+    private _getWritablePackets;
362
+    /**
363
+     * Checks whether the heartbeat timer has expired but the socket has not yet been notified.
364
+     *
365
+     * Note: this method is private for now because it does not really fit the WebSocket API, but if we put it in the
366
+     * `write()` method then the message would not be buffered by the Socket.IO client.
367
+     *
368
+     * @return {boolean}
369
+     * @private
370
+     */
371
+    _hasPingExpired(): boolean;
372
+    /**
373
+     * Sends a message.
374
+     *
375
+     * @param {String} msg - message.
376
+     * @param {Object} options.
377
+     * @param {Function} fn - callback function.
378
+     * @return {Socket} for chaining.
379
+     */
380
+    write(msg: RawData, options?: WriteOptions, fn?: () => void): this;
381
+    /**
382
+     * Sends a message. Alias of {@link Socket#write}.
383
+     *
384
+     * @param {String} msg - message.
385
+     * @param {Object} options.
386
+     * @param {Function} fn - callback function.
387
+     * @return {Socket} for chaining.
388
+     */
389
+    send(msg: RawData, options?: WriteOptions, fn?: () => void): this;
390
+    /**
391
+     * Sends a packet.
392
+     *
393
+     * @param {String} type: packet type.
394
+     * @param {String} data.
395
+     * @param {Object} options.
396
+     * @param {Function} fn - callback function.
397
+     * @private
398
+     */
399
+    private _sendPacket;
400
+    /**
401
+     * Closes the connection.
402
+     */
403
+    close(): this;
404
+    /**
405
+     * Called upon transport error
406
+     *
407
+     * @private
408
+     */
409
+    private _onError;
410
+    /**
411
+     * Called upon transport close.
412
+     *
413
+     * @private
414
+     */
415
+    private _onClose;
416
+}
417
+/**
418
+ * This class provides a WebSocket-like interface to connect to an Engine.IO server. The connection will be established
419
+ * with one of the available low-level transports, like HTTP long-polling, WebSocket or WebTransport.
420
+ *
421
+ * This class comes with an upgrade mechanism, which means that once the connection is established with the first
422
+ * low-level transport, it will try to upgrade to a better transport.
423
+ *
424
+ * In order to allow tree-shaking, there are no transports included, that's why the `transports` option is mandatory.
425
+ *
426
+ * @example
427
+ * import { SocketWithUpgrade, WebSocket } from "engine.io-client";
428
+ *
429
+ * const socket = new SocketWithUpgrade({
430
+ *   transports: [WebSocket]
431
+ * });
432
+ *
433
+ * socket.on("open", () => {
434
+ *   socket.send("hello");
435
+ * });
436
+ *
437
+ * @see SocketWithoutUpgrade
438
+ * @see Socket
439
+ */
440
+export declare class SocketWithUpgrade extends SocketWithoutUpgrade {
441
+    private _upgrades;
442
+    onOpen(): void;
443
+    /**
444
+     * Probes a transport.
445
+     *
446
+     * @param {String} name - transport name
447
+     * @private
448
+     */
449
+    private _probe;
450
+    onHandshake(data: HandshakeData): void;
451
+    /**
452
+     * Filters upgrades, returning only those matching client transports.
453
+     *
454
+     * @param {Array} upgrades - server upgrades
455
+     * @private
456
+     */
457
+    private _filterUpgrades;
458
+}
459
+/**
460
+ * This class provides a WebSocket-like interface to connect to an Engine.IO server. The connection will be established
461
+ * with one of the available low-level transports, like HTTP long-polling, WebSocket or WebTransport.
462
+ *
463
+ * This class comes with an upgrade mechanism, which means that once the connection is established with the first
464
+ * low-level transport, it will try to upgrade to a better transport.
465
+ *
466
+ * @example
467
+ * import { Socket } from "engine.io-client";
468
+ *
469
+ * const socket = new Socket();
470
+ *
471
+ * socket.on("open", () => {
472
+ *   socket.send("hello");
473
+ * });
474
+ *
475
+ * @see SocketWithoutUpgrade
476
+ * @see SocketWithUpgrade
477
+ */
478
+export declare class Socket extends SocketWithUpgrade {
479
+    constructor(uri?: string, opts?: SocketOptions);
480
+    constructor(opts: SocketOptions);
481
+}
482
+export {};

+ 765
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/socket.js View File

@@ -0,0 +1,765 @@
1
+"use strict";
2
+var __importDefault = (this && this.__importDefault) || function (mod) {
3
+    return (mod && mod.__esModule) ? mod : { "default": mod };
4
+};
5
+Object.defineProperty(exports, "__esModule", { value: true });
6
+exports.Socket = exports.SocketWithUpgrade = exports.SocketWithoutUpgrade = void 0;
7
+const index_js_1 = require("./transports/index.js");
8
+const util_js_1 = require("./util.js");
9
+const parseqs_js_1 = require("./contrib/parseqs.js");
10
+const parseuri_js_1 = require("./contrib/parseuri.js");
11
+const component_emitter_1 = require("@socket.io/component-emitter");
12
+const engine_io_parser_1 = require("engine.io-parser");
13
+const globals_node_js_1 = require("./globals.node.js");
14
+const debug_1 = __importDefault(require("debug")); // debug()
15
+const debug = (0, debug_1.default)("engine.io-client:socket"); // debug()
16
+const withEventListeners = typeof addEventListener === "function" &&
17
+    typeof removeEventListener === "function";
18
+const OFFLINE_EVENT_LISTENERS = [];
19
+if (withEventListeners) {
20
+    // within a ServiceWorker, any event handler for the 'offline' event must be added on the initial evaluation of the
21
+    // script, so we create one single event listener here which will forward the event to the socket instances
22
+    addEventListener("offline", () => {
23
+        debug("closing %d connection(s) because the network was lost", OFFLINE_EVENT_LISTENERS.length);
24
+        OFFLINE_EVENT_LISTENERS.forEach((listener) => listener());
25
+    }, false);
26
+}
27
+/**
28
+ * This class provides a WebSocket-like interface to connect to an Engine.IO server. The connection will be established
29
+ * with one of the available low-level transports, like HTTP long-polling, WebSocket or WebTransport.
30
+ *
31
+ * This class comes without upgrade mechanism, which means that it will keep the first low-level transport that
32
+ * successfully establishes the connection.
33
+ *
34
+ * In order to allow tree-shaking, there are no transports included, that's why the `transports` option is mandatory.
35
+ *
36
+ * @example
37
+ * import { SocketWithoutUpgrade, WebSocket } from "engine.io-client";
38
+ *
39
+ * const socket = new SocketWithoutUpgrade({
40
+ *   transports: [WebSocket]
41
+ * });
42
+ *
43
+ * socket.on("open", () => {
44
+ *   socket.send("hello");
45
+ * });
46
+ *
47
+ * @see SocketWithUpgrade
48
+ * @see Socket
49
+ */
50
+class SocketWithoutUpgrade extends component_emitter_1.Emitter {
51
+    /**
52
+     * Socket constructor.
53
+     *
54
+     * @param {String|Object} uri - uri or options
55
+     * @param {Object} opts - options
56
+     */
57
+    constructor(uri, opts) {
58
+        super();
59
+        this.binaryType = globals_node_js_1.defaultBinaryType;
60
+        this.writeBuffer = [];
61
+        this._prevBufferLen = 0;
62
+        this._pingInterval = -1;
63
+        this._pingTimeout = -1;
64
+        this._maxPayload = -1;
65
+        /**
66
+         * The expiration timestamp of the {@link _pingTimeoutTimer} object is tracked, in case the timer is throttled and the
67
+         * callback is not fired on time. This can happen for example when a laptop is suspended or when a phone is locked.
68
+         */
69
+        this._pingTimeoutTime = Infinity;
70
+        if (uri && "object" === typeof uri) {
71
+            opts = uri;
72
+            uri = null;
73
+        }
74
+        if (uri) {
75
+            const parsedUri = (0, parseuri_js_1.parse)(uri);
76
+            opts.hostname = parsedUri.host;
77
+            opts.secure =
78
+                parsedUri.protocol === "https" || parsedUri.protocol === "wss";
79
+            opts.port = parsedUri.port;
80
+            if (parsedUri.query)
81
+                opts.query = parsedUri.query;
82
+        }
83
+        else if (opts.host) {
84
+            opts.hostname = (0, parseuri_js_1.parse)(opts.host).host;
85
+        }
86
+        (0, util_js_1.installTimerFunctions)(this, opts);
87
+        this.secure =
88
+            null != opts.secure
89
+                ? opts.secure
90
+                : typeof location !== "undefined" && "https:" === location.protocol;
91
+        if (opts.hostname && !opts.port) {
92
+            // if no port is specified manually, use the protocol default
93
+            opts.port = this.secure ? "443" : "80";
94
+        }
95
+        this.hostname =
96
+            opts.hostname ||
97
+                (typeof location !== "undefined" ? location.hostname : "localhost");
98
+        this.port =
99
+            opts.port ||
100
+                (typeof location !== "undefined" && location.port
101
+                    ? location.port
102
+                    : this.secure
103
+                        ? "443"
104
+                        : "80");
105
+        this.transports = [];
106
+        this._transportsByName = {};
107
+        opts.transports.forEach((t) => {
108
+            const transportName = t.prototype.name;
109
+            this.transports.push(transportName);
110
+            this._transportsByName[transportName] = t;
111
+        });
112
+        this.opts = Object.assign({
113
+            path: "/engine.io",
114
+            agent: false,
115
+            withCredentials: false,
116
+            upgrade: true,
117
+            timestampParam: "t",
118
+            rememberUpgrade: false,
119
+            addTrailingSlash: true,
120
+            rejectUnauthorized: true,
121
+            perMessageDeflate: {
122
+                threshold: 1024,
123
+            },
124
+            transportOptions: {},
125
+            closeOnBeforeunload: false,
126
+        }, opts);
127
+        this.opts.path =
128
+            this.opts.path.replace(/\/$/, "") +
129
+                (this.opts.addTrailingSlash ? "/" : "");
130
+        if (typeof this.opts.query === "string") {
131
+            this.opts.query = (0, parseqs_js_1.decode)(this.opts.query);
132
+        }
133
+        if (withEventListeners) {
134
+            if (this.opts.closeOnBeforeunload) {
135
+                // Firefox closes the connection when the "beforeunload" event is emitted but not Chrome. This event listener
136
+                // ensures every browser behaves the same (no "disconnect" event at the Socket.IO level when the page is
137
+                // closed/reloaded)
138
+                this._beforeunloadEventListener = () => {
139
+                    if (this.transport) {
140
+                        // silently close the transport
141
+                        this.transport.removeAllListeners();
142
+                        this.transport.close();
143
+                    }
144
+                };
145
+                addEventListener("beforeunload", this._beforeunloadEventListener, false);
146
+            }
147
+            if (this.hostname !== "localhost") {
148
+                debug("adding listener for the 'offline' event");
149
+                this._offlineEventListener = () => {
150
+                    this._onClose("transport close", {
151
+                        description: "network connection lost",
152
+                    });
153
+                };
154
+                OFFLINE_EVENT_LISTENERS.push(this._offlineEventListener);
155
+            }
156
+        }
157
+        if (this.opts.withCredentials) {
158
+            this._cookieJar = (0, globals_node_js_1.createCookieJar)();
159
+        }
160
+        this._open();
161
+    }
162
+    /**
163
+     * Creates transport of the given type.
164
+     *
165
+     * @param {String} name - transport name
166
+     * @return {Transport}
167
+     * @private
168
+     */
169
+    createTransport(name) {
170
+        debug('creating transport "%s"', name);
171
+        const query = Object.assign({}, this.opts.query);
172
+        // append engine.io protocol identifier
173
+        query.EIO = engine_io_parser_1.protocol;
174
+        // transport name
175
+        query.transport = name;
176
+        // session id if we already have one
177
+        if (this.id)
178
+            query.sid = this.id;
179
+        const opts = Object.assign({}, this.opts, {
180
+            query,
181
+            socket: this,
182
+            hostname: this.hostname,
183
+            secure: this.secure,
184
+            port: this.port,
185
+        }, this.opts.transportOptions[name]);
186
+        debug("options: %j", opts);
187
+        return new this._transportsByName[name](opts);
188
+    }
189
+    /**
190
+     * Initializes transport to use and starts probe.
191
+     *
192
+     * @private
193
+     */
194
+    _open() {
195
+        if (this.transports.length === 0) {
196
+            // Emit error on next tick so it can be listened to
197
+            this.setTimeoutFn(() => {
198
+                this.emitReserved("error", "No transports available");
199
+            }, 0);
200
+            return;
201
+        }
202
+        const transportName = this.opts.rememberUpgrade &&
203
+            SocketWithoutUpgrade.priorWebsocketSuccess &&
204
+            this.transports.indexOf("websocket") !== -1
205
+            ? "websocket"
206
+            : this.transports[0];
207
+        this.readyState = "opening";
208
+        const transport = this.createTransport(transportName);
209
+        transport.open();
210
+        this.setTransport(transport);
211
+    }
212
+    /**
213
+     * Sets the current transport. Disables the existing one (if any).
214
+     *
215
+     * @private
216
+     */
217
+    setTransport(transport) {
218
+        debug("setting transport %s", transport.name);
219
+        if (this.transport) {
220
+            debug("clearing existing transport %s", this.transport.name);
221
+            this.transport.removeAllListeners();
222
+        }
223
+        // set up transport
224
+        this.transport = transport;
225
+        // set up transport listeners
226
+        transport
227
+            .on("drain", this._onDrain.bind(this))
228
+            .on("packet", this._onPacket.bind(this))
229
+            .on("error", this._onError.bind(this))
230
+            .on("close", (reason) => this._onClose("transport close", reason));
231
+    }
232
+    /**
233
+     * Called when connection is deemed open.
234
+     *
235
+     * @private
236
+     */
237
+    onOpen() {
238
+        debug("socket open");
239
+        this.readyState = "open";
240
+        SocketWithoutUpgrade.priorWebsocketSuccess =
241
+            "websocket" === this.transport.name;
242
+        this.emitReserved("open");
243
+        this.flush();
244
+    }
245
+    /**
246
+     * Handles a packet.
247
+     *
248
+     * @private
249
+     */
250
+    _onPacket(packet) {
251
+        if ("opening" === this.readyState ||
252
+            "open" === this.readyState ||
253
+            "closing" === this.readyState) {
254
+            debug('socket receive: type "%s", data "%s"', packet.type, packet.data);
255
+            this.emitReserved("packet", packet);
256
+            // Socket is live - any packet counts
257
+            this.emitReserved("heartbeat");
258
+            switch (packet.type) {
259
+                case "open":
260
+                    this.onHandshake(JSON.parse(packet.data));
261
+                    break;
262
+                case "ping":
263
+                    this._sendPacket("pong");
264
+                    this.emitReserved("ping");
265
+                    this.emitReserved("pong");
266
+                    this._resetPingTimeout();
267
+                    break;
268
+                case "error":
269
+                    const err = new Error("server error");
270
+                    // @ts-ignore
271
+                    err.code = packet.data;
272
+                    this._onError(err);
273
+                    break;
274
+                case "message":
275
+                    this.emitReserved("data", packet.data);
276
+                    this.emitReserved("message", packet.data);
277
+                    break;
278
+            }
279
+        }
280
+        else {
281
+            debug('packet received with socket readyState "%s"', this.readyState);
282
+        }
283
+    }
284
+    /**
285
+     * Called upon handshake completion.
286
+     *
287
+     * @param {Object} data - handshake obj
288
+     * @private
289
+     */
290
+    onHandshake(data) {
291
+        this.emitReserved("handshake", data);
292
+        this.id = data.sid;
293
+        this.transport.query.sid = data.sid;
294
+        this._pingInterval = data.pingInterval;
295
+        this._pingTimeout = data.pingTimeout;
296
+        this._maxPayload = data.maxPayload;
297
+        this.onOpen();
298
+        // In case open handler closes socket
299
+        if ("closed" === this.readyState)
300
+            return;
301
+        this._resetPingTimeout();
302
+    }
303
+    /**
304
+     * Sets and resets ping timeout timer based on server pings.
305
+     *
306
+     * @private
307
+     */
308
+    _resetPingTimeout() {
309
+        this.clearTimeoutFn(this._pingTimeoutTimer);
310
+        const delay = this._pingInterval + this._pingTimeout;
311
+        this._pingTimeoutTime = Date.now() + delay;
312
+        this._pingTimeoutTimer = this.setTimeoutFn(() => {
313
+            this._onClose("ping timeout");
314
+        }, delay);
315
+        if (this.opts.autoUnref) {
316
+            this._pingTimeoutTimer.unref();
317
+        }
318
+    }
319
+    /**
320
+     * Called on `drain` event
321
+     *
322
+     * @private
323
+     */
324
+    _onDrain() {
325
+        this.writeBuffer.splice(0, this._prevBufferLen);
326
+        // setting prevBufferLen = 0 is very important
327
+        // for example, when upgrading, upgrade packet is sent over,
328
+        // and a nonzero prevBufferLen could cause problems on `drain`
329
+        this._prevBufferLen = 0;
330
+        if (0 === this.writeBuffer.length) {
331
+            this.emitReserved("drain");
332
+        }
333
+        else {
334
+            this.flush();
335
+        }
336
+    }
337
+    /**
338
+     * Flush write buffers.
339
+     *
340
+     * @private
341
+     */
342
+    flush() {
343
+        if ("closed" !== this.readyState &&
344
+            this.transport.writable &&
345
+            !this.upgrading &&
346
+            this.writeBuffer.length) {
347
+            const packets = this._getWritablePackets();
348
+            debug("flushing %d packets in socket", packets.length);
349
+            this.transport.send(packets);
350
+            // keep track of current length of writeBuffer
351
+            // splice writeBuffer and callbackBuffer on `drain`
352
+            this._prevBufferLen = packets.length;
353
+            this.emitReserved("flush");
354
+        }
355
+    }
356
+    /**
357
+     * Ensure the encoded size of the writeBuffer is below the maxPayload value sent by the server (only for HTTP
358
+     * long-polling)
359
+     *
360
+     * @private
361
+     */
362
+    _getWritablePackets() {
363
+        const shouldCheckPayloadSize = this._maxPayload &&
364
+            this.transport.name === "polling" &&
365
+            this.writeBuffer.length > 1;
366
+        if (!shouldCheckPayloadSize) {
367
+            return this.writeBuffer;
368
+        }
369
+        let payloadSize = 1; // first packet type
370
+        for (let i = 0; i < this.writeBuffer.length; i++) {
371
+            const data = this.writeBuffer[i].data;
372
+            if (data) {
373
+                payloadSize += (0, util_js_1.byteLength)(data);
374
+            }
375
+            if (i > 0 && payloadSize > this._maxPayload) {
376
+                debug("only send %d out of %d packets", i, this.writeBuffer.length);
377
+                return this.writeBuffer.slice(0, i);
378
+            }
379
+            payloadSize += 2; // separator + packet type
380
+        }
381
+        debug("payload size is %d (max: %d)", payloadSize, this._maxPayload);
382
+        return this.writeBuffer;
383
+    }
384
+    /**
385
+     * Checks whether the heartbeat timer has expired but the socket has not yet been notified.
386
+     *
387
+     * Note: this method is private for now because it does not really fit the WebSocket API, but if we put it in the
388
+     * `write()` method then the message would not be buffered by the Socket.IO client.
389
+     *
390
+     * @return {boolean}
391
+     * @private
392
+     */
393
+    /* private */ _hasPingExpired() {
394
+        if (!this._pingTimeoutTime)
395
+            return true;
396
+        const hasExpired = Date.now() > this._pingTimeoutTime;
397
+        if (hasExpired) {
398
+            debug("throttled timer detected, scheduling connection close");
399
+            this._pingTimeoutTime = 0;
400
+            (0, globals_node_js_1.nextTick)(() => {
401
+                this._onClose("ping timeout");
402
+            }, this.setTimeoutFn);
403
+        }
404
+        return hasExpired;
405
+    }
406
+    /**
407
+     * Sends a message.
408
+     *
409
+     * @param {String} msg - message.
410
+     * @param {Object} options.
411
+     * @param {Function} fn - callback function.
412
+     * @return {Socket} for chaining.
413
+     */
414
+    write(msg, options, fn) {
415
+        this._sendPacket("message", msg, options, fn);
416
+        return this;
417
+    }
418
+    /**
419
+     * Sends a message. Alias of {@link Socket#write}.
420
+     *
421
+     * @param {String} msg - message.
422
+     * @param {Object} options.
423
+     * @param {Function} fn - callback function.
424
+     * @return {Socket} for chaining.
425
+     */
426
+    send(msg, options, fn) {
427
+        this._sendPacket("message", msg, options, fn);
428
+        return this;
429
+    }
430
+    /**
431
+     * Sends a packet.
432
+     *
433
+     * @param {String} type: packet type.
434
+     * @param {String} data.
435
+     * @param {Object} options.
436
+     * @param {Function} fn - callback function.
437
+     * @private
438
+     */
439
+    _sendPacket(type, data, options, fn) {
440
+        if ("function" === typeof data) {
441
+            fn = data;
442
+            data = undefined;
443
+        }
444
+        if ("function" === typeof options) {
445
+            fn = options;
446
+            options = null;
447
+        }
448
+        if ("closing" === this.readyState || "closed" === this.readyState) {
449
+            return;
450
+        }
451
+        options = options || {};
452
+        options.compress = false !== options.compress;
453
+        const packet = {
454
+            type: type,
455
+            data: data,
456
+            options: options,
457
+        };
458
+        this.emitReserved("packetCreate", packet);
459
+        this.writeBuffer.push(packet);
460
+        if (fn)
461
+            this.once("flush", fn);
462
+        this.flush();
463
+    }
464
+    /**
465
+     * Closes the connection.
466
+     */
467
+    close() {
468
+        const close = () => {
469
+            this._onClose("forced close");
470
+            debug("socket closing - telling transport to close");
471
+            this.transport.close();
472
+        };
473
+        const cleanupAndClose = () => {
474
+            this.off("upgrade", cleanupAndClose);
475
+            this.off("upgradeError", cleanupAndClose);
476
+            close();
477
+        };
478
+        const waitForUpgrade = () => {
479
+            // wait for upgrade to finish since we can't send packets while pausing a transport
480
+            this.once("upgrade", cleanupAndClose);
481
+            this.once("upgradeError", cleanupAndClose);
482
+        };
483
+        if ("opening" === this.readyState || "open" === this.readyState) {
484
+            this.readyState = "closing";
485
+            if (this.writeBuffer.length) {
486
+                this.once("drain", () => {
487
+                    if (this.upgrading) {
488
+                        waitForUpgrade();
489
+                    }
490
+                    else {
491
+                        close();
492
+                    }
493
+                });
494
+            }
495
+            else if (this.upgrading) {
496
+                waitForUpgrade();
497
+            }
498
+            else {
499
+                close();
500
+            }
501
+        }
502
+        return this;
503
+    }
504
+    /**
505
+     * Called upon transport error
506
+     *
507
+     * @private
508
+     */
509
+    _onError(err) {
510
+        debug("socket error %j", err);
511
+        SocketWithoutUpgrade.priorWebsocketSuccess = false;
512
+        if (this.opts.tryAllTransports &&
513
+            this.transports.length > 1 &&
514
+            this.readyState === "opening") {
515
+            debug("trying next transport");
516
+            this.transports.shift();
517
+            return this._open();
518
+        }
519
+        this.emitReserved("error", err);
520
+        this._onClose("transport error", err);
521
+    }
522
+    /**
523
+     * Called upon transport close.
524
+     *
525
+     * @private
526
+     */
527
+    _onClose(reason, description) {
528
+        if ("opening" === this.readyState ||
529
+            "open" === this.readyState ||
530
+            "closing" === this.readyState) {
531
+            debug('socket close with reason: "%s"', reason);
532
+            // clear timers
533
+            this.clearTimeoutFn(this._pingTimeoutTimer);
534
+            // stop event from firing again for transport
535
+            this.transport.removeAllListeners("close");
536
+            // ensure transport won't stay open
537
+            this.transport.close();
538
+            // ignore further transport communication
539
+            this.transport.removeAllListeners();
540
+            if (withEventListeners) {
541
+                if (this._beforeunloadEventListener) {
542
+                    removeEventListener("beforeunload", this._beforeunloadEventListener, false);
543
+                }
544
+                if (this._offlineEventListener) {
545
+                    const i = OFFLINE_EVENT_LISTENERS.indexOf(this._offlineEventListener);
546
+                    if (i !== -1) {
547
+                        debug("removing listener for the 'offline' event");
548
+                        OFFLINE_EVENT_LISTENERS.splice(i, 1);
549
+                    }
550
+                }
551
+            }
552
+            // set ready state
553
+            this.readyState = "closed";
554
+            // clear session id
555
+            this.id = null;
556
+            // emit close event
557
+            this.emitReserved("close", reason, description);
558
+            // clean buffers after, so users can still
559
+            // grab the buffers on `close` event
560
+            this.writeBuffer = [];
561
+            this._prevBufferLen = 0;
562
+        }
563
+    }
564
+}
565
+exports.SocketWithoutUpgrade = SocketWithoutUpgrade;
566
+SocketWithoutUpgrade.protocol = engine_io_parser_1.protocol;
567
+/**
568
+ * This class provides a WebSocket-like interface to connect to an Engine.IO server. The connection will be established
569
+ * with one of the available low-level transports, like HTTP long-polling, WebSocket or WebTransport.
570
+ *
571
+ * This class comes with an upgrade mechanism, which means that once the connection is established with the first
572
+ * low-level transport, it will try to upgrade to a better transport.
573
+ *
574
+ * In order to allow tree-shaking, there are no transports included, that's why the `transports` option is mandatory.
575
+ *
576
+ * @example
577
+ * import { SocketWithUpgrade, WebSocket } from "engine.io-client";
578
+ *
579
+ * const socket = new SocketWithUpgrade({
580
+ *   transports: [WebSocket]
581
+ * });
582
+ *
583
+ * socket.on("open", () => {
584
+ *   socket.send("hello");
585
+ * });
586
+ *
587
+ * @see SocketWithoutUpgrade
588
+ * @see Socket
589
+ */
590
+class SocketWithUpgrade extends SocketWithoutUpgrade {
591
+    constructor() {
592
+        super(...arguments);
593
+        this._upgrades = [];
594
+    }
595
+    onOpen() {
596
+        super.onOpen();
597
+        if ("open" === this.readyState && this.opts.upgrade) {
598
+            debug("starting upgrade probes");
599
+            for (let i = 0; i < this._upgrades.length; i++) {
600
+                this._probe(this._upgrades[i]);
601
+            }
602
+        }
603
+    }
604
+    /**
605
+     * Probes a transport.
606
+     *
607
+     * @param {String} name - transport name
608
+     * @private
609
+     */
610
+    _probe(name) {
611
+        debug('probing transport "%s"', name);
612
+        let transport = this.createTransport(name);
613
+        let failed = false;
614
+        SocketWithoutUpgrade.priorWebsocketSuccess = false;
615
+        const onTransportOpen = () => {
616
+            if (failed)
617
+                return;
618
+            debug('probe transport "%s" opened', name);
619
+            transport.send([{ type: "ping", data: "probe" }]);
620
+            transport.once("packet", (msg) => {
621
+                if (failed)
622
+                    return;
623
+                if ("pong" === msg.type && "probe" === msg.data) {
624
+                    debug('probe transport "%s" pong', name);
625
+                    this.upgrading = true;
626
+                    this.emitReserved("upgrading", transport);
627
+                    if (!transport)
628
+                        return;
629
+                    SocketWithoutUpgrade.priorWebsocketSuccess =
630
+                        "websocket" === transport.name;
631
+                    debug('pausing current transport "%s"', this.transport.name);
632
+                    this.transport.pause(() => {
633
+                        if (failed)
634
+                            return;
635
+                        if ("closed" === this.readyState)
636
+                            return;
637
+                        debug("changing transport and sending upgrade packet");
638
+                        cleanup();
639
+                        this.setTransport(transport);
640
+                        transport.send([{ type: "upgrade" }]);
641
+                        this.emitReserved("upgrade", transport);
642
+                        transport = null;
643
+                        this.upgrading = false;
644
+                        this.flush();
645
+                    });
646
+                }
647
+                else {
648
+                    debug('probe transport "%s" failed', name);
649
+                    const err = new Error("probe error");
650
+                    // @ts-ignore
651
+                    err.transport = transport.name;
652
+                    this.emitReserved("upgradeError", err);
653
+                }
654
+            });
655
+        };
656
+        function freezeTransport() {
657
+            if (failed)
658
+                return;
659
+            // Any callback called by transport should be ignored since now
660
+            failed = true;
661
+            cleanup();
662
+            transport.close();
663
+            transport = null;
664
+        }
665
+        // Handle any error that happens while probing
666
+        const onerror = (err) => {
667
+            const error = new Error("probe error: " + err);
668
+            // @ts-ignore
669
+            error.transport = transport.name;
670
+            freezeTransport();
671
+            debug('probe transport "%s" failed because of error: %s', name, err);
672
+            this.emitReserved("upgradeError", error);
673
+        };
674
+        function onTransportClose() {
675
+            onerror("transport closed");
676
+        }
677
+        // When the socket is closed while we're probing
678
+        function onclose() {
679
+            onerror("socket closed");
680
+        }
681
+        // When the socket is upgraded while we're probing
682
+        function onupgrade(to) {
683
+            if (transport && to.name !== transport.name) {
684
+                debug('"%s" works - aborting "%s"', to.name, transport.name);
685
+                freezeTransport();
686
+            }
687
+        }
688
+        // Remove all listeners on the transport and on self
689
+        const cleanup = () => {
690
+            transport.removeListener("open", onTransportOpen);
691
+            transport.removeListener("error", onerror);
692
+            transport.removeListener("close", onTransportClose);
693
+            this.off("close", onclose);
694
+            this.off("upgrading", onupgrade);
695
+        };
696
+        transport.once("open", onTransportOpen);
697
+        transport.once("error", onerror);
698
+        transport.once("close", onTransportClose);
699
+        this.once("close", onclose);
700
+        this.once("upgrading", onupgrade);
701
+        if (this._upgrades.indexOf("webtransport") !== -1 &&
702
+            name !== "webtransport") {
703
+            // favor WebTransport
704
+            this.setTimeoutFn(() => {
705
+                if (!failed) {
706
+                    transport.open();
707
+                }
708
+            }, 200);
709
+        }
710
+        else {
711
+            transport.open();
712
+        }
713
+    }
714
+    onHandshake(data) {
715
+        this._upgrades = this._filterUpgrades(data.upgrades);
716
+        super.onHandshake(data);
717
+    }
718
+    /**
719
+     * Filters upgrades, returning only those matching client transports.
720
+     *
721
+     * @param {Array} upgrades - server upgrades
722
+     * @private
723
+     */
724
+    _filterUpgrades(upgrades) {
725
+        const filteredUpgrades = [];
726
+        for (let i = 0; i < upgrades.length; i++) {
727
+            if (~this.transports.indexOf(upgrades[i]))
728
+                filteredUpgrades.push(upgrades[i]);
729
+        }
730
+        return filteredUpgrades;
731
+    }
732
+}
733
+exports.SocketWithUpgrade = SocketWithUpgrade;
734
+/**
735
+ * This class provides a WebSocket-like interface to connect to an Engine.IO server. The connection will be established
736
+ * with one of the available low-level transports, like HTTP long-polling, WebSocket or WebTransport.
737
+ *
738
+ * This class comes with an upgrade mechanism, which means that once the connection is established with the first
739
+ * low-level transport, it will try to upgrade to a better transport.
740
+ *
741
+ * @example
742
+ * import { Socket } from "engine.io-client";
743
+ *
744
+ * const socket = new Socket();
745
+ *
746
+ * socket.on("open", () => {
747
+ *   socket.send("hello");
748
+ * });
749
+ *
750
+ * @see SocketWithoutUpgrade
751
+ * @see SocketWithUpgrade
752
+ */
753
+class Socket extends SocketWithUpgrade {
754
+    constructor(uri, opts = {}) {
755
+        const o = typeof uri === "object" ? uri : opts;
756
+        if (!o.transports ||
757
+            (o.transports && typeof o.transports[0] === "string")) {
758
+            o.transports = (o.transports || ["polling", "websocket", "webtransport"])
759
+                .map((transportName) => index_js_1.transports[transportName])
760
+                .filter((t) => !!t);
761
+        }
762
+        super(uri, o);
763
+    }
764
+}
765
+exports.Socket = Socket;

+ 106
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transport.d.ts View File

@@ -0,0 +1,106 @@
1
+import type { Packet, RawData } from "engine.io-parser";
2
+import { Emitter } from "@socket.io/component-emitter";
3
+import type { Socket, SocketOptions } from "./socket.js";
4
+export declare class TransportError extends Error {
5
+    readonly description: any;
6
+    readonly context: any;
7
+    readonly type = "TransportError";
8
+    constructor(reason: string, description: any, context: any);
9
+}
10
+export interface CloseDetails {
11
+    description: string;
12
+    context?: unknown;
13
+}
14
+interface TransportReservedEvents {
15
+    open: () => void;
16
+    error: (err: TransportError) => void;
17
+    packet: (packet: Packet) => void;
18
+    close: (details?: CloseDetails) => void;
19
+    poll: () => void;
20
+    pollComplete: () => void;
21
+    drain: () => void;
22
+}
23
+type TransportState = "opening" | "open" | "closed" | "pausing" | "paused";
24
+export declare abstract class Transport extends Emitter<Record<never, never>, Record<never, never>, TransportReservedEvents> {
25
+    query: Record<string, string>;
26
+    writable: boolean;
27
+    protected opts: SocketOptions;
28
+    protected supportsBinary: boolean;
29
+    protected readyState: TransportState;
30
+    protected socket: Socket;
31
+    protected setTimeoutFn: typeof setTimeout;
32
+    /**
33
+     * Transport abstract constructor.
34
+     *
35
+     * @param {Object} opts - options
36
+     * @protected
37
+     */
38
+    constructor(opts: any);
39
+    /**
40
+     * Emits an error.
41
+     *
42
+     * @param {String} reason
43
+     * @param description
44
+     * @param context - the error context
45
+     * @return {Transport} for chaining
46
+     * @protected
47
+     */
48
+    protected onError(reason: string, description: any, context?: any): this;
49
+    /**
50
+     * Opens the transport.
51
+     */
52
+    open(): this;
53
+    /**
54
+     * Closes the transport.
55
+     */
56
+    close(): this;
57
+    /**
58
+     * Sends multiple packets.
59
+     *
60
+     * @param {Array} packets
61
+     */
62
+    send(packets: any): void;
63
+    /**
64
+     * Called upon open
65
+     *
66
+     * @protected
67
+     */
68
+    protected onOpen(): void;
69
+    /**
70
+     * Called with data.
71
+     *
72
+     * @param {String} data
73
+     * @protected
74
+     */
75
+    protected onData(data: RawData): void;
76
+    /**
77
+     * Called with a decoded packet.
78
+     *
79
+     * @protected
80
+     */
81
+    protected onPacket(packet: Packet): void;
82
+    /**
83
+     * Called upon close.
84
+     *
85
+     * @protected
86
+     */
87
+    protected onClose(details?: CloseDetails): void;
88
+    /**
89
+     * The name of the transport
90
+     */
91
+    abstract get name(): string;
92
+    /**
93
+     * Pauses the transport, in order not to lose packets during an upgrade.
94
+     *
95
+     * @param onPause
96
+     */
97
+    pause(onPause: () => void): void;
98
+    protected createUri(schema: string, query?: Record<string, unknown>): string;
99
+    private _hostname;
100
+    private _port;
101
+    private _query;
102
+    protected abstract doOpen(): any;
103
+    protected abstract doClose(): any;
104
+    protected abstract write(packets: Packet[]): any;
105
+}
106
+export {};

+ 153
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transport.js View File

@@ -0,0 +1,153 @@
1
+"use strict";
2
+var __importDefault = (this && this.__importDefault) || function (mod) {
3
+    return (mod && mod.__esModule) ? mod : { "default": mod };
4
+};
5
+Object.defineProperty(exports, "__esModule", { value: true });
6
+exports.Transport = exports.TransportError = void 0;
7
+const engine_io_parser_1 = require("engine.io-parser");
8
+const component_emitter_1 = require("@socket.io/component-emitter");
9
+const util_js_1 = require("./util.js");
10
+const parseqs_js_1 = require("./contrib/parseqs.js");
11
+const debug_1 = __importDefault(require("debug")); // debug()
12
+const debug = (0, debug_1.default)("engine.io-client:transport"); // debug()
13
+class TransportError extends Error {
14
+    constructor(reason, description, context) {
15
+        super(reason);
16
+        this.description = description;
17
+        this.context = context;
18
+        this.type = "TransportError";
19
+    }
20
+}
21
+exports.TransportError = TransportError;
22
+class Transport extends component_emitter_1.Emitter {
23
+    /**
24
+     * Transport abstract constructor.
25
+     *
26
+     * @param {Object} opts - options
27
+     * @protected
28
+     */
29
+    constructor(opts) {
30
+        super();
31
+        this.writable = false;
32
+        (0, util_js_1.installTimerFunctions)(this, opts);
33
+        this.opts = opts;
34
+        this.query = opts.query;
35
+        this.socket = opts.socket;
36
+        this.supportsBinary = !opts.forceBase64;
37
+    }
38
+    /**
39
+     * Emits an error.
40
+     *
41
+     * @param {String} reason
42
+     * @param description
43
+     * @param context - the error context
44
+     * @return {Transport} for chaining
45
+     * @protected
46
+     */
47
+    onError(reason, description, context) {
48
+        super.emitReserved("error", new TransportError(reason, description, context));
49
+        return this;
50
+    }
51
+    /**
52
+     * Opens the transport.
53
+     */
54
+    open() {
55
+        this.readyState = "opening";
56
+        this.doOpen();
57
+        return this;
58
+    }
59
+    /**
60
+     * Closes the transport.
61
+     */
62
+    close() {
63
+        if (this.readyState === "opening" || this.readyState === "open") {
64
+            this.doClose();
65
+            this.onClose();
66
+        }
67
+        return this;
68
+    }
69
+    /**
70
+     * Sends multiple packets.
71
+     *
72
+     * @param {Array} packets
73
+     */
74
+    send(packets) {
75
+        if (this.readyState === "open") {
76
+            this.write(packets);
77
+        }
78
+        else {
79
+            // this might happen if the transport was silently closed in the beforeunload event handler
80
+            debug("transport is not open, discarding packets");
81
+        }
82
+    }
83
+    /**
84
+     * Called upon open
85
+     *
86
+     * @protected
87
+     */
88
+    onOpen() {
89
+        this.readyState = "open";
90
+        this.writable = true;
91
+        super.emitReserved("open");
92
+    }
93
+    /**
94
+     * Called with data.
95
+     *
96
+     * @param {String} data
97
+     * @protected
98
+     */
99
+    onData(data) {
100
+        const packet = (0, engine_io_parser_1.decodePacket)(data, this.socket.binaryType);
101
+        this.onPacket(packet);
102
+    }
103
+    /**
104
+     * Called with a decoded packet.
105
+     *
106
+     * @protected
107
+     */
108
+    onPacket(packet) {
109
+        super.emitReserved("packet", packet);
110
+    }
111
+    /**
112
+     * Called upon close.
113
+     *
114
+     * @protected
115
+     */
116
+    onClose(details) {
117
+        this.readyState = "closed";
118
+        super.emitReserved("close", details);
119
+    }
120
+    /**
121
+     * Pauses the transport, in order not to lose packets during an upgrade.
122
+     *
123
+     * @param onPause
124
+     */
125
+    pause(onPause) { }
126
+    createUri(schema, query = {}) {
127
+        return (schema +
128
+            "://" +
129
+            this._hostname() +
130
+            this._port() +
131
+            this.opts.path +
132
+            this._query(query));
133
+    }
134
+    _hostname() {
135
+        const hostname = this.opts.hostname;
136
+        return hostname.indexOf(":") === -1 ? hostname : "[" + hostname + "]";
137
+    }
138
+    _port() {
139
+        if (this.opts.port &&
140
+            ((this.opts.secure && Number(this.opts.port !== 443)) ||
141
+                (!this.opts.secure && Number(this.opts.port) !== 80))) {
142
+            return ":" + this.opts.port;
143
+        }
144
+        else {
145
+            return "";
146
+        }
147
+    }
148
+    _query(query) {
149
+        const encodedQuery = (0, parseqs_js_1.encode)(query);
150
+        return encodedQuery.length ? "?" + encodedQuery : "";
151
+    }
152
+}
153
+exports.Transport = Transport;

+ 8
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/index.d.ts View File

@@ -0,0 +1,8 @@
1
+import { XHR } from "./polling-xhr.node.js";
2
+import { WS } from "./websocket.node.js";
3
+import { WT } from "./webtransport.js";
4
+export declare const transports: {
5
+    websocket: typeof WS;
6
+    webtransport: typeof WT;
7
+    polling: typeof XHR;
8
+};

+ 11
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/index.js View File

@@ -0,0 +1,11 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.transports = void 0;
4
+const polling_xhr_node_js_1 = require("./polling-xhr.node.js");
5
+const websocket_node_js_1 = require("./websocket.node.js");
6
+const webtransport_js_1 = require("./webtransport.js");
7
+exports.transports = {
8
+    websocket: websocket_node_js_1.WS,
9
+    webtransport: webtransport_js_1.WT,
10
+    polling: polling_xhr_node_js_1.XHR,
11
+};

+ 15
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/polling-fetch.d.ts View File

@@ -0,0 +1,15 @@
1
+import { Polling } from "./polling.js";
2
+/**
3
+ * HTTP long-polling based on the built-in `fetch()` method.
4
+ *
5
+ * Usage: browser, Node.js (since v18), Deno, Bun
6
+ *
7
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/fetch
8
+ * @see https://caniuse.com/fetch
9
+ * @see https://nodejs.org/api/globals.html#fetch
10
+ */
11
+export declare class Fetch extends Polling {
12
+    doPoll(): void;
13
+    doWrite(data: string, callback: () => void): void;
14
+    private _fetch;
15
+}

+ 60
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/polling-fetch.js View File

@@ -0,0 +1,60 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.Fetch = void 0;
4
+const polling_js_1 = require("./polling.js");
5
+/**
6
+ * HTTP long-polling based on the built-in `fetch()` method.
7
+ *
8
+ * Usage: browser, Node.js (since v18), Deno, Bun
9
+ *
10
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/fetch
11
+ * @see https://caniuse.com/fetch
12
+ * @see https://nodejs.org/api/globals.html#fetch
13
+ */
14
+class Fetch extends polling_js_1.Polling {
15
+    doPoll() {
16
+        this._fetch()
17
+            .then((res) => {
18
+            if (!res.ok) {
19
+                return this.onError("fetch read error", res.status, res);
20
+            }
21
+            res.text().then((data) => this.onData(data));
22
+        })
23
+            .catch((err) => {
24
+            this.onError("fetch read error", err);
25
+        });
26
+    }
27
+    doWrite(data, callback) {
28
+        this._fetch(data)
29
+            .then((res) => {
30
+            if (!res.ok) {
31
+                return this.onError("fetch write error", res.status, res);
32
+            }
33
+            callback();
34
+        })
35
+            .catch((err) => {
36
+            this.onError("fetch write error", err);
37
+        });
38
+    }
39
+    _fetch(data) {
40
+        var _a;
41
+        const isPost = data !== undefined;
42
+        const headers = new Headers(this.opts.extraHeaders);
43
+        if (isPost) {
44
+            headers.set("content-type", "text/plain;charset=UTF-8");
45
+        }
46
+        (_a = this.socket._cookieJar) === null || _a === void 0 ? void 0 : _a.appendCookies(headers);
47
+        return fetch(this.uri(), {
48
+            method: isPost ? "POST" : "GET",
49
+            body: isPost ? data : null,
50
+            headers,
51
+            credentials: this.opts.withCredentials ? "include" : "omit",
52
+        }).then((res) => {
53
+            var _a;
54
+            // @ts-ignore getSetCookie() was added in Node.js v19.7.0
55
+            (_a = this.socket._cookieJar) === null || _a === void 0 ? void 0 : _a.parseCookies(res.headers.getSetCookie());
56
+            return res;
57
+        });
58
+    }
59
+}
60
+exports.Fetch = Fetch;

+ 108
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/polling-xhr.d.ts View File

@@ -0,0 +1,108 @@
1
+import { Polling } from "./polling.js";
2
+import { Emitter } from "@socket.io/component-emitter";
3
+import type { SocketOptions } from "../socket.js";
4
+import type { CookieJar } from "../globals.node.js";
5
+import type { RawData } from "engine.io-parser";
6
+export declare abstract class BaseXHR extends Polling {
7
+    protected readonly xd: boolean;
8
+    private pollXhr;
9
+    /**
10
+     * XHR Polling constructor.
11
+     *
12
+     * @param {Object} opts
13
+     * @package
14
+     */
15
+    constructor(opts: any);
16
+    /**
17
+     * Creates a request.
18
+     *
19
+     * @private
20
+     */
21
+    abstract request(opts?: Record<string, any>): any;
22
+    /**
23
+     * Sends data.
24
+     *
25
+     * @param {String} data to send.
26
+     * @param {Function} called upon flush.
27
+     * @private
28
+     */
29
+    doWrite(data: any, fn: any): void;
30
+    /**
31
+     * Starts a poll cycle.
32
+     *
33
+     * @private
34
+     */
35
+    doPoll(): void;
36
+}
37
+interface RequestReservedEvents {
38
+    success: () => void;
39
+    data: (data: RawData) => void;
40
+    error: (err: number | Error, context: unknown) => void;
41
+}
42
+export type RequestOptions = SocketOptions & {
43
+    method?: string;
44
+    data?: RawData;
45
+    xd: boolean;
46
+    cookieJar: CookieJar;
47
+};
48
+export declare class Request extends Emitter<Record<never, never>, Record<never, never>, RequestReservedEvents> {
49
+    private readonly createRequest;
50
+    private readonly _opts;
51
+    private readonly _method;
52
+    private readonly _uri;
53
+    private readonly _data;
54
+    private _xhr;
55
+    private setTimeoutFn;
56
+    private _index;
57
+    static requestsCount: number;
58
+    static requests: {};
59
+    /**
60
+     * Request constructor
61
+     *
62
+     * @param {Object} options
63
+     * @package
64
+     */
65
+    constructor(createRequest: (opts: RequestOptions) => XMLHttpRequest, uri: string, opts: RequestOptions);
66
+    /**
67
+     * Creates the XHR object and sends the request.
68
+     *
69
+     * @private
70
+     */
71
+    private _create;
72
+    /**
73
+     * Called upon error.
74
+     *
75
+     * @private
76
+     */
77
+    private _onError;
78
+    /**
79
+     * Cleans up house.
80
+     *
81
+     * @private
82
+     */
83
+    private _cleanup;
84
+    /**
85
+     * Called upon load.
86
+     *
87
+     * @private
88
+     */
89
+    private _onLoad;
90
+    /**
91
+     * Aborts the request.
92
+     *
93
+     * @package
94
+     */
95
+    abort(): void;
96
+}
97
+/**
98
+ * HTTP long-polling based on the built-in `XMLHttpRequest` object.
99
+ *
100
+ * Usage: browser
101
+ *
102
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
103
+ */
104
+export declare class XHR extends BaseXHR {
105
+    constructor(opts: any);
106
+    request(opts?: Record<string, any>): Request;
107
+}
108
+export {};

+ 285
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/polling-xhr.js View File

@@ -0,0 +1,285 @@
1
+"use strict";
2
+var __importDefault = (this && this.__importDefault) || function (mod) {
3
+    return (mod && mod.__esModule) ? mod : { "default": mod };
4
+};
5
+Object.defineProperty(exports, "__esModule", { value: true });
6
+exports.XHR = exports.Request = exports.BaseXHR = void 0;
7
+const polling_js_1 = require("./polling.js");
8
+const component_emitter_1 = require("@socket.io/component-emitter");
9
+const util_js_1 = require("../util.js");
10
+const globals_node_js_1 = require("../globals.node.js");
11
+const has_cors_js_1 = require("../contrib/has-cors.js");
12
+const debug_1 = __importDefault(require("debug")); // debug()
13
+const debug = (0, debug_1.default)("engine.io-client:polling"); // debug()
14
+function empty() { }
15
+class BaseXHR extends polling_js_1.Polling {
16
+    /**
17
+     * XHR Polling constructor.
18
+     *
19
+     * @param {Object} opts
20
+     * @package
21
+     */
22
+    constructor(opts) {
23
+        super(opts);
24
+        if (typeof location !== "undefined") {
25
+            const isSSL = "https:" === location.protocol;
26
+            let port = location.port;
27
+            // some user agents have empty `location.port`
28
+            if (!port) {
29
+                port = isSSL ? "443" : "80";
30
+            }
31
+            this.xd =
32
+                (typeof location !== "undefined" &&
33
+                    opts.hostname !== location.hostname) ||
34
+                    port !== opts.port;
35
+        }
36
+    }
37
+    /**
38
+     * Sends data.
39
+     *
40
+     * @param {String} data to send.
41
+     * @param {Function} called upon flush.
42
+     * @private
43
+     */
44
+    doWrite(data, fn) {
45
+        const req = this.request({
46
+            method: "POST",
47
+            data: data,
48
+        });
49
+        req.on("success", fn);
50
+        req.on("error", (xhrStatus, context) => {
51
+            this.onError("xhr post error", xhrStatus, context);
52
+        });
53
+    }
54
+    /**
55
+     * Starts a poll cycle.
56
+     *
57
+     * @private
58
+     */
59
+    doPoll() {
60
+        debug("xhr poll");
61
+        const req = this.request();
62
+        req.on("data", this.onData.bind(this));
63
+        req.on("error", (xhrStatus, context) => {
64
+            this.onError("xhr poll error", xhrStatus, context);
65
+        });
66
+        this.pollXhr = req;
67
+    }
68
+}
69
+exports.BaseXHR = BaseXHR;
70
+class Request extends component_emitter_1.Emitter {
71
+    /**
72
+     * Request constructor
73
+     *
74
+     * @param {Object} options
75
+     * @package
76
+     */
77
+    constructor(createRequest, uri, opts) {
78
+        super();
79
+        this.createRequest = createRequest;
80
+        (0, util_js_1.installTimerFunctions)(this, opts);
81
+        this._opts = opts;
82
+        this._method = opts.method || "GET";
83
+        this._uri = uri;
84
+        this._data = undefined !== opts.data ? opts.data : null;
85
+        this._create();
86
+    }
87
+    /**
88
+     * Creates the XHR object and sends the request.
89
+     *
90
+     * @private
91
+     */
92
+    _create() {
93
+        var _a;
94
+        const opts = (0, util_js_1.pick)(this._opts, "agent", "pfx", "key", "passphrase", "cert", "ca", "ciphers", "rejectUnauthorized", "autoUnref");
95
+        opts.xdomain = !!this._opts.xd;
96
+        const xhr = (this._xhr = this.createRequest(opts));
97
+        try {
98
+            debug("xhr open %s: %s", this._method, this._uri);
99
+            xhr.open(this._method, this._uri, true);
100
+            try {
101
+                if (this._opts.extraHeaders) {
102
+                    // @ts-ignore
103
+                    xhr.setDisableHeaderCheck && xhr.setDisableHeaderCheck(true);
104
+                    for (let i in this._opts.extraHeaders) {
105
+                        if (this._opts.extraHeaders.hasOwnProperty(i)) {
106
+                            xhr.setRequestHeader(i, this._opts.extraHeaders[i]);
107
+                        }
108
+                    }
109
+                }
110
+            }
111
+            catch (e) { }
112
+            if ("POST" === this._method) {
113
+                try {
114
+                    xhr.setRequestHeader("Content-type", "text/plain;charset=UTF-8");
115
+                }
116
+                catch (e) { }
117
+            }
118
+            try {
119
+                xhr.setRequestHeader("Accept", "*/*");
120
+            }
121
+            catch (e) { }
122
+            (_a = this._opts.cookieJar) === null || _a === void 0 ? void 0 : _a.addCookies(xhr);
123
+            // ie6 check
124
+            if ("withCredentials" in xhr) {
125
+                xhr.withCredentials = this._opts.withCredentials;
126
+            }
127
+            if (this._opts.requestTimeout) {
128
+                xhr.timeout = this._opts.requestTimeout;
129
+            }
130
+            xhr.onreadystatechange = () => {
131
+                var _a;
132
+                if (xhr.readyState === 3) {
133
+                    (_a = this._opts.cookieJar) === null || _a === void 0 ? void 0 : _a.parseCookies(
134
+                    // @ts-ignore
135
+                    xhr.getResponseHeader("set-cookie"));
136
+                }
137
+                if (4 !== xhr.readyState)
138
+                    return;
139
+                if (200 === xhr.status || 1223 === xhr.status) {
140
+                    this._onLoad();
141
+                }
142
+                else {
143
+                    // make sure the `error` event handler that's user-set
144
+                    // does not throw in the same tick and gets caught here
145
+                    this.setTimeoutFn(() => {
146
+                        this._onError(typeof xhr.status === "number" ? xhr.status : 0);
147
+                    }, 0);
148
+                }
149
+            };
150
+            debug("xhr data %s", this._data);
151
+            xhr.send(this._data);
152
+        }
153
+        catch (e) {
154
+            // Need to defer since .create() is called directly from the constructor
155
+            // and thus the 'error' event can only be only bound *after* this exception
156
+            // occurs.  Therefore, also, we cannot throw here at all.
157
+            this.setTimeoutFn(() => {
158
+                this._onError(e);
159
+            }, 0);
160
+            return;
161
+        }
162
+        if (typeof document !== "undefined") {
163
+            this._index = Request.requestsCount++;
164
+            Request.requests[this._index] = this;
165
+        }
166
+    }
167
+    /**
168
+     * Called upon error.
169
+     *
170
+     * @private
171
+     */
172
+    _onError(err) {
173
+        this.emitReserved("error", err, this._xhr);
174
+        this._cleanup(true);
175
+    }
176
+    /**
177
+     * Cleans up house.
178
+     *
179
+     * @private
180
+     */
181
+    _cleanup(fromError) {
182
+        if ("undefined" === typeof this._xhr || null === this._xhr) {
183
+            return;
184
+        }
185
+        this._xhr.onreadystatechange = empty;
186
+        if (fromError) {
187
+            try {
188
+                this._xhr.abort();
189
+            }
190
+            catch (e) { }
191
+        }
192
+        if (typeof document !== "undefined") {
193
+            delete Request.requests[this._index];
194
+        }
195
+        this._xhr = null;
196
+    }
197
+    /**
198
+     * Called upon load.
199
+     *
200
+     * @private
201
+     */
202
+    _onLoad() {
203
+        const data = this._xhr.responseText;
204
+        if (data !== null) {
205
+            this.emitReserved("data", data);
206
+            this.emitReserved("success");
207
+            this._cleanup();
208
+        }
209
+    }
210
+    /**
211
+     * Aborts the request.
212
+     *
213
+     * @package
214
+     */
215
+    abort() {
216
+        this._cleanup();
217
+    }
218
+}
219
+exports.Request = Request;
220
+Request.requestsCount = 0;
221
+Request.requests = {};
222
+/**
223
+ * Aborts pending requests when unloading the window. This is needed to prevent
224
+ * memory leaks (e.g. when using IE) and to ensure that no spurious error is
225
+ * emitted.
226
+ */
227
+if (typeof document !== "undefined") {
228
+    // @ts-ignore
229
+    if (typeof attachEvent === "function") {
230
+        // @ts-ignore
231
+        attachEvent("onunload", unloadHandler);
232
+    }
233
+    else if (typeof addEventListener === "function") {
234
+        const terminationEvent = "onpagehide" in globals_node_js_1.globalThisShim ? "pagehide" : "unload";
235
+        addEventListener(terminationEvent, unloadHandler, false);
236
+    }
237
+}
238
+function unloadHandler() {
239
+    for (let i in Request.requests) {
240
+        if (Request.requests.hasOwnProperty(i)) {
241
+            Request.requests[i].abort();
242
+        }
243
+    }
244
+}
245
+const hasXHR2 = (function () {
246
+    const xhr = newRequest({
247
+        xdomain: false,
248
+    });
249
+    return xhr && xhr.responseType !== null;
250
+})();
251
+/**
252
+ * HTTP long-polling based on the built-in `XMLHttpRequest` object.
253
+ *
254
+ * Usage: browser
255
+ *
256
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
257
+ */
258
+class XHR extends BaseXHR {
259
+    constructor(opts) {
260
+        super(opts);
261
+        const forceBase64 = opts && opts.forceBase64;
262
+        this.supportsBinary = hasXHR2 && !forceBase64;
263
+    }
264
+    request(opts = {}) {
265
+        Object.assign(opts, { xd: this.xd }, this.opts);
266
+        return new Request(newRequest, this.uri(), opts);
267
+    }
268
+}
269
+exports.XHR = XHR;
270
+function newRequest(opts) {
271
+    const xdomain = opts.xdomain;
272
+    // XMLHttpRequest can be disabled on IE
273
+    try {
274
+        if ("undefined" !== typeof XMLHttpRequest && (!xdomain || has_cors_js_1.hasCORS)) {
275
+            return new XMLHttpRequest();
276
+        }
277
+    }
278
+    catch (e) { }
279
+    if (!xdomain) {
280
+        try {
281
+            return new globals_node_js_1.globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP");
282
+        }
283
+        catch (e) { }
284
+    }
285
+}

+ 11
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/polling-xhr.node.d.ts View File

@@ -0,0 +1,11 @@
1
+import { BaseXHR, Request } from "./polling-xhr.js";
2
+/**
3
+ * HTTP long-polling based on the `XMLHttpRequest` object provided by the `xmlhttprequest-ssl` package.
4
+ *
5
+ * Usage: Node.js, Deno (compat), Bun (compat)
6
+ *
7
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
8
+ */
9
+export declare class XHR extends BaseXHR {
10
+    request(opts?: Record<string, any>): Request;
11
+}

+ 44
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/polling-xhr.node.js View File

@@ -0,0 +1,44 @@
1
+"use strict";
2
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+    if (k2 === undefined) k2 = k;
4
+    var desc = Object.getOwnPropertyDescriptor(m, k);
5
+    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+      desc = { enumerable: true, get: function() { return m[k]; } };
7
+    }
8
+    Object.defineProperty(o, k2, desc);
9
+}) : (function(o, m, k, k2) {
10
+    if (k2 === undefined) k2 = k;
11
+    o[k2] = m[k];
12
+}));
13
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+    Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+}) : function(o, v) {
16
+    o["default"] = v;
17
+});
18
+var __importStar = (this && this.__importStar) || function (mod) {
19
+    if (mod && mod.__esModule) return mod;
20
+    var result = {};
21
+    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+    __setModuleDefault(result, mod);
23
+    return result;
24
+};
25
+Object.defineProperty(exports, "__esModule", { value: true });
26
+exports.XHR = void 0;
27
+const XMLHttpRequestModule = __importStar(require("xmlhttprequest-ssl"));
28
+const polling_xhr_js_1 = require("./polling-xhr.js");
29
+const XMLHttpRequest = XMLHttpRequestModule.default || XMLHttpRequestModule;
30
+/**
31
+ * HTTP long-polling based on the `XMLHttpRequest` object provided by the `xmlhttprequest-ssl` package.
32
+ *
33
+ * Usage: Node.js, Deno (compat), Bun (compat)
34
+ *
35
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
36
+ */
37
+class XHR extends polling_xhr_js_1.BaseXHR {
38
+    request(opts = {}) {
39
+        var _a;
40
+        Object.assign(opts, { xd: this.xd, cookieJar: (_a = this.socket) === null || _a === void 0 ? void 0 : _a._cookieJar }, this.opts);
41
+        return new polling_xhr_js_1.Request((opts) => new XMLHttpRequest(opts), this.uri(), opts);
42
+    }
43
+}
44
+exports.XHR = XHR;

+ 52
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/polling.d.ts View File

@@ -0,0 +1,52 @@
1
+import { Transport } from "../transport.js";
2
+export declare abstract class Polling extends Transport {
3
+    private _polling;
4
+    get name(): string;
5
+    /**
6
+     * Opens the socket (triggers polling). We write a PING message to determine
7
+     * when the transport is open.
8
+     *
9
+     * @protected
10
+     */
11
+    doOpen(): void;
12
+    /**
13
+     * Pauses polling.
14
+     *
15
+     * @param {Function} onPause - callback upon buffers are flushed and transport is paused
16
+     * @package
17
+     */
18
+    pause(onPause: any): void;
19
+    /**
20
+     * Starts polling cycle.
21
+     *
22
+     * @private
23
+     */
24
+    private _poll;
25
+    /**
26
+     * Overloads onData to detect payloads.
27
+     *
28
+     * @protected
29
+     */
30
+    onData(data: any): void;
31
+    /**
32
+     * For polling, send a close packet.
33
+     *
34
+     * @protected
35
+     */
36
+    doClose(): void;
37
+    /**
38
+     * Writes a packets payload.
39
+     *
40
+     * @param {Array} packets - data packets
41
+     * @protected
42
+     */
43
+    write(packets: any): void;
44
+    /**
45
+     * Generates uri for connection.
46
+     *
47
+     * @private
48
+     */
49
+    protected uri(): string;
50
+    abstract doPoll(): any;
51
+    abstract doWrite(data: string, callback: () => void): any;
52
+}

+ 165
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/polling.js View File

@@ -0,0 +1,165 @@
1
+"use strict";
2
+var __importDefault = (this && this.__importDefault) || function (mod) {
3
+    return (mod && mod.__esModule) ? mod : { "default": mod };
4
+};
5
+Object.defineProperty(exports, "__esModule", { value: true });
6
+exports.Polling = void 0;
7
+const transport_js_1 = require("../transport.js");
8
+const util_js_1 = require("../util.js");
9
+const engine_io_parser_1 = require("engine.io-parser");
10
+const debug_1 = __importDefault(require("debug")); // debug()
11
+const debug = (0, debug_1.default)("engine.io-client:polling"); // debug()
12
+class Polling extends transport_js_1.Transport {
13
+    constructor() {
14
+        super(...arguments);
15
+        this._polling = false;
16
+    }
17
+    get name() {
18
+        return "polling";
19
+    }
20
+    /**
21
+     * Opens the socket (triggers polling). We write a PING message to determine
22
+     * when the transport is open.
23
+     *
24
+     * @protected
25
+     */
26
+    doOpen() {
27
+        this._poll();
28
+    }
29
+    /**
30
+     * Pauses polling.
31
+     *
32
+     * @param {Function} onPause - callback upon buffers are flushed and transport is paused
33
+     * @package
34
+     */
35
+    pause(onPause) {
36
+        this.readyState = "pausing";
37
+        const pause = () => {
38
+            debug("paused");
39
+            this.readyState = "paused";
40
+            onPause();
41
+        };
42
+        if (this._polling || !this.writable) {
43
+            let total = 0;
44
+            if (this._polling) {
45
+                debug("we are currently polling - waiting to pause");
46
+                total++;
47
+                this.once("pollComplete", function () {
48
+                    debug("pre-pause polling complete");
49
+                    --total || pause();
50
+                });
51
+            }
52
+            if (!this.writable) {
53
+                debug("we are currently writing - waiting to pause");
54
+                total++;
55
+                this.once("drain", function () {
56
+                    debug("pre-pause writing complete");
57
+                    --total || pause();
58
+                });
59
+            }
60
+        }
61
+        else {
62
+            pause();
63
+        }
64
+    }
65
+    /**
66
+     * Starts polling cycle.
67
+     *
68
+     * @private
69
+     */
70
+    _poll() {
71
+        debug("polling");
72
+        this._polling = true;
73
+        this.doPoll();
74
+        this.emitReserved("poll");
75
+    }
76
+    /**
77
+     * Overloads onData to detect payloads.
78
+     *
79
+     * @protected
80
+     */
81
+    onData(data) {
82
+        debug("polling got data %s", data);
83
+        const callback = (packet) => {
84
+            // if its the first message we consider the transport open
85
+            if ("opening" === this.readyState && packet.type === "open") {
86
+                this.onOpen();
87
+            }
88
+            // if its a close packet, we close the ongoing requests
89
+            if ("close" === packet.type) {
90
+                this.onClose({ description: "transport closed by the server" });
91
+                return false;
92
+            }
93
+            // otherwise bypass onData and handle the message
94
+            this.onPacket(packet);
95
+        };
96
+        // decode payload
97
+        (0, engine_io_parser_1.decodePayload)(data, this.socket.binaryType).forEach(callback);
98
+        // if an event did not trigger closing
99
+        if ("closed" !== this.readyState) {
100
+            // if we got data we're not polling
101
+            this._polling = false;
102
+            this.emitReserved("pollComplete");
103
+            if ("open" === this.readyState) {
104
+                this._poll();
105
+            }
106
+            else {
107
+                debug('ignoring poll - transport state "%s"', this.readyState);
108
+            }
109
+        }
110
+    }
111
+    /**
112
+     * For polling, send a close packet.
113
+     *
114
+     * @protected
115
+     */
116
+    doClose() {
117
+        const close = () => {
118
+            debug("writing close packet");
119
+            this.write([{ type: "close" }]);
120
+        };
121
+        if ("open" === this.readyState) {
122
+            debug("transport open - closing");
123
+            close();
124
+        }
125
+        else {
126
+            // in case we're trying to close while
127
+            // handshaking is in progress (GH-164)
128
+            debug("transport not open - deferring close");
129
+            this.once("open", close);
130
+        }
131
+    }
132
+    /**
133
+     * Writes a packets payload.
134
+     *
135
+     * @param {Array} packets - data packets
136
+     * @protected
137
+     */
138
+    write(packets) {
139
+        this.writable = false;
140
+        (0, engine_io_parser_1.encodePayload)(packets, (data) => {
141
+            this.doWrite(data, () => {
142
+                this.writable = true;
143
+                this.emitReserved("drain");
144
+            });
145
+        });
146
+    }
147
+    /**
148
+     * Generates uri for connection.
149
+     *
150
+     * @private
151
+     */
152
+    uri() {
153
+        const schema = this.opts.secure ? "https" : "http";
154
+        const query = this.query || {};
155
+        // cache busting is forced
156
+        if (false !== this.opts.timestampRequests) {
157
+            query[this.opts.timestampParam] = (0, util_js_1.randomString)();
158
+        }
159
+        if (!this.supportsBinary && !query.sid) {
160
+            query.b64 = 1;
161
+        }
162
+        return this.createUri(schema, query);
163
+    }
164
+}
165
+exports.Polling = Polling;

+ 36
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/websocket.d.ts View File

@@ -0,0 +1,36 @@
1
+import { Transport } from "../transport.js";
2
+import type { Packet, RawData } from "engine.io-parser";
3
+export declare abstract class BaseWS extends Transport {
4
+    protected ws: any;
5
+    get name(): string;
6
+    doOpen(): this;
7
+    abstract createSocket(uri: string, protocols: string | string[] | undefined, opts: Record<string, any>): any;
8
+    /**
9
+     * Adds event listeners to the socket
10
+     *
11
+     * @private
12
+     */
13
+    private addEventListeners;
14
+    write(packets: any): void;
15
+    abstract doWrite(packet: Packet, data: RawData): any;
16
+    doClose(): void;
17
+    /**
18
+     * Generates uri for connection.
19
+     *
20
+     * @private
21
+     */
22
+    private uri;
23
+}
24
+/**
25
+ * WebSocket transport based on the built-in `WebSocket` object.
26
+ *
27
+ * Usage: browser, Node.js (since v21), Deno, Bun
28
+ *
29
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/WebSocket
30
+ * @see https://caniuse.com/mdn-api_websocket
31
+ * @see https://nodejs.org/api/globals.html#websocket
32
+ */
33
+export declare class WS extends BaseWS {
34
+    createSocket(uri: string, protocols: string | string[] | undefined, opts: Record<string, any>): any;
35
+    doWrite(_packet: Packet, data: RawData): void;
36
+}

+ 135
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/websocket.js View File

@@ -0,0 +1,135 @@
1
+"use strict";
2
+var __importDefault = (this && this.__importDefault) || function (mod) {
3
+    return (mod && mod.__esModule) ? mod : { "default": mod };
4
+};
5
+Object.defineProperty(exports, "__esModule", { value: true });
6
+exports.WS = exports.BaseWS = void 0;
7
+const transport_js_1 = require("../transport.js");
8
+const util_js_1 = require("../util.js");
9
+const engine_io_parser_1 = require("engine.io-parser");
10
+const globals_node_js_1 = require("../globals.node.js");
11
+const debug_1 = __importDefault(require("debug")); // debug()
12
+const debug = (0, debug_1.default)("engine.io-client:websocket"); // debug()
13
+// detect ReactNative environment
14
+const isReactNative = typeof navigator !== "undefined" &&
15
+    typeof navigator.product === "string" &&
16
+    navigator.product.toLowerCase() === "reactnative";
17
+class BaseWS extends transport_js_1.Transport {
18
+    get name() {
19
+        return "websocket";
20
+    }
21
+    doOpen() {
22
+        const uri = this.uri();
23
+        const protocols = this.opts.protocols;
24
+        // React Native only supports the 'headers' option, and will print a warning if anything else is passed
25
+        const opts = isReactNative
26
+            ? {}
27
+            : (0, util_js_1.pick)(this.opts, "agent", "perMessageDeflate", "pfx", "key", "passphrase", "cert", "ca", "ciphers", "rejectUnauthorized", "localAddress", "protocolVersion", "origin", "maxPayload", "family", "checkServerIdentity");
28
+        if (this.opts.extraHeaders) {
29
+            opts.headers = this.opts.extraHeaders;
30
+        }
31
+        try {
32
+            this.ws = this.createSocket(uri, protocols, opts);
33
+        }
34
+        catch (err) {
35
+            return this.emitReserved("error", err);
36
+        }
37
+        this.ws.binaryType = this.socket.binaryType;
38
+        this.addEventListeners();
39
+    }
40
+    /**
41
+     * Adds event listeners to the socket
42
+     *
43
+     * @private
44
+     */
45
+    addEventListeners() {
46
+        this.ws.onopen = () => {
47
+            if (this.opts.autoUnref) {
48
+                this.ws._socket.unref();
49
+            }
50
+            this.onOpen();
51
+        };
52
+        this.ws.onclose = (closeEvent) => this.onClose({
53
+            description: "websocket connection closed",
54
+            context: closeEvent,
55
+        });
56
+        this.ws.onmessage = (ev) => this.onData(ev.data);
57
+        this.ws.onerror = (e) => this.onError("websocket error", e);
58
+    }
59
+    write(packets) {
60
+        this.writable = false;
61
+        // encodePacket efficient as it uses WS framing
62
+        // no need for encodePayload
63
+        for (let i = 0; i < packets.length; i++) {
64
+            const packet = packets[i];
65
+            const lastPacket = i === packets.length - 1;
66
+            (0, engine_io_parser_1.encodePacket)(packet, this.supportsBinary, (data) => {
67
+                // Sometimes the websocket has already been closed but the browser didn't
68
+                // have a chance of informing us about it yet, in that case send will
69
+                // throw an error
70
+                try {
71
+                    this.doWrite(packet, data);
72
+                }
73
+                catch (e) {
74
+                    debug("websocket closed before onclose event");
75
+                }
76
+                if (lastPacket) {
77
+                    // fake drain
78
+                    // defer to next tick to allow Socket to clear writeBuffer
79
+                    (0, globals_node_js_1.nextTick)(() => {
80
+                        this.writable = true;
81
+                        this.emitReserved("drain");
82
+                    }, this.setTimeoutFn);
83
+                }
84
+            });
85
+        }
86
+    }
87
+    doClose() {
88
+        if (typeof this.ws !== "undefined") {
89
+            this.ws.close();
90
+            this.ws = null;
91
+        }
92
+    }
93
+    /**
94
+     * Generates uri for connection.
95
+     *
96
+     * @private
97
+     */
98
+    uri() {
99
+        const schema = this.opts.secure ? "wss" : "ws";
100
+        const query = this.query || {};
101
+        // append timestamp to URI
102
+        if (this.opts.timestampRequests) {
103
+            query[this.opts.timestampParam] = (0, util_js_1.randomString)();
104
+        }
105
+        // communicate binary support capabilities
106
+        if (!this.supportsBinary) {
107
+            query.b64 = 1;
108
+        }
109
+        return this.createUri(schema, query);
110
+    }
111
+}
112
+exports.BaseWS = BaseWS;
113
+const WebSocketCtor = globals_node_js_1.globalThisShim.WebSocket || globals_node_js_1.globalThisShim.MozWebSocket;
114
+/**
115
+ * WebSocket transport based on the built-in `WebSocket` object.
116
+ *
117
+ * Usage: browser, Node.js (since v21), Deno, Bun
118
+ *
119
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/WebSocket
120
+ * @see https://caniuse.com/mdn-api_websocket
121
+ * @see https://nodejs.org/api/globals.html#websocket
122
+ */
123
+class WS extends BaseWS {
124
+    createSocket(uri, protocols, opts) {
125
+        return !isReactNative
126
+            ? protocols
127
+                ? new WebSocketCtor(uri, protocols)
128
+                : new WebSocketCtor(uri)
129
+            : new WebSocketCtor(uri, protocols, opts);
130
+    }
131
+    doWrite(_packet, data) {
132
+        this.ws.send(data);
133
+    }
134
+}
135
+exports.WS = WS;

+ 14
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/websocket.node.d.ts View File

@@ -0,0 +1,14 @@
1
+import type { Packet, RawData } from "engine.io-parser";
2
+import { BaseWS } from "./websocket.js";
3
+/**
4
+ * WebSocket transport based on the `WebSocket` object provided by the `ws` package.
5
+ *
6
+ * Usage: Node.js, Deno (compat), Bun (compat)
7
+ *
8
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/WebSocket
9
+ * @see https://caniuse.com/mdn-api_websocket
10
+ */
11
+export declare class WS extends BaseWS {
12
+    createSocket(uri: string, protocols: string | string[] | undefined, opts: Record<string, any>): import("ws");
13
+    doWrite(packet: Packet, data: RawData): void;
14
+}

+ 45
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/websocket.node.js View File

@@ -0,0 +1,45 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.WS = void 0;
4
+const ws_1 = require("ws");
5
+const websocket_js_1 = require("./websocket.js");
6
+/**
7
+ * WebSocket transport based on the `WebSocket` object provided by the `ws` package.
8
+ *
9
+ * Usage: Node.js, Deno (compat), Bun (compat)
10
+ *
11
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/WebSocket
12
+ * @see https://caniuse.com/mdn-api_websocket
13
+ */
14
+class WS extends websocket_js_1.BaseWS {
15
+    createSocket(uri, protocols, opts) {
16
+        var _a;
17
+        if ((_a = this.socket) === null || _a === void 0 ? void 0 : _a._cookieJar) {
18
+            opts.headers = opts.headers || {};
19
+            opts.headers.cookie =
20
+                typeof opts.headers.cookie === "string"
21
+                    ? [opts.headers.cookie]
22
+                    : opts.headers.cookie || [];
23
+            for (const [name, cookie] of this.socket._cookieJar.cookies) {
24
+                opts.headers.cookie.push(`${name}=${cookie.value}`);
25
+            }
26
+        }
27
+        return new ws_1.WebSocket(uri, protocols, opts);
28
+    }
29
+    doWrite(packet, data) {
30
+        const opts = {};
31
+        if (packet.options) {
32
+            opts.compress = packet.options.compress;
33
+        }
34
+        if (this.opts.perMessageDeflate) {
35
+            const len = 
36
+            // @ts-ignore
37
+            "string" === typeof data ? Buffer.byteLength(data) : data.length;
38
+            if (len < this.opts.perMessageDeflate.threshold) {
39
+                opts.compress = false;
40
+            }
41
+        }
42
+        this.ws.send(data, opts);
43
+    }
44
+}
45
+exports.WS = WS;

+ 18
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/webtransport.d.ts View File

@@ -0,0 +1,18 @@
1
+import { Transport } from "../transport.js";
2
+import { Packet } from "engine.io-parser";
3
+/**
4
+ * WebTransport transport based on the built-in `WebTransport` object.
5
+ *
6
+ * Usage: browser, Node.js (with the `@fails-components/webtransport` package)
7
+ *
8
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/WebTransport
9
+ * @see https://caniuse.com/webtransport
10
+ */
11
+export declare class WT extends Transport {
12
+    private _transport;
13
+    private _writer;
14
+    get name(): string;
15
+    protected doOpen(): this;
16
+    protected write(packets: Packet[]): void;
17
+    protected doClose(): void;
18
+}

+ 94
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/transports/webtransport.js View File

@@ -0,0 +1,94 @@
1
+"use strict";
2
+var __importDefault = (this && this.__importDefault) || function (mod) {
3
+    return (mod && mod.__esModule) ? mod : { "default": mod };
4
+};
5
+Object.defineProperty(exports, "__esModule", { value: true });
6
+exports.WT = void 0;
7
+const transport_js_1 = require("../transport.js");
8
+const globals_node_js_1 = require("../globals.node.js");
9
+const engine_io_parser_1 = require("engine.io-parser");
10
+const debug_1 = __importDefault(require("debug")); // debug()
11
+const debug = (0, debug_1.default)("engine.io-client:webtransport"); // debug()
12
+/**
13
+ * WebTransport transport based on the built-in `WebTransport` object.
14
+ *
15
+ * Usage: browser, Node.js (with the `@fails-components/webtransport` package)
16
+ *
17
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/WebTransport
18
+ * @see https://caniuse.com/webtransport
19
+ */
20
+class WT extends transport_js_1.Transport {
21
+    get name() {
22
+        return "webtransport";
23
+    }
24
+    doOpen() {
25
+        try {
26
+            // @ts-ignore
27
+            this._transport = new WebTransport(this.createUri("https"), this.opts.transportOptions[this.name]);
28
+        }
29
+        catch (err) {
30
+            return this.emitReserved("error", err);
31
+        }
32
+        this._transport.closed
33
+            .then(() => {
34
+            debug("transport closed gracefully");
35
+            this.onClose();
36
+        })
37
+            .catch((err) => {
38
+            debug("transport closed due to %s", err);
39
+            this.onError("webtransport error", err);
40
+        });
41
+        // note: we could have used async/await, but that would require some additional polyfills
42
+        this._transport.ready.then(() => {
43
+            this._transport.createBidirectionalStream().then((stream) => {
44
+                const decoderStream = (0, engine_io_parser_1.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER, this.socket.binaryType);
45
+                const reader = stream.readable.pipeThrough(decoderStream).getReader();
46
+                const encoderStream = (0, engine_io_parser_1.createPacketEncoderStream)();
47
+                encoderStream.readable.pipeTo(stream.writable);
48
+                this._writer = encoderStream.writable.getWriter();
49
+                const read = () => {
50
+                    reader
51
+                        .read()
52
+                        .then(({ done, value }) => {
53
+                        if (done) {
54
+                            debug("session is closed");
55
+                            return;
56
+                        }
57
+                        debug("received chunk: %o", value);
58
+                        this.onPacket(value);
59
+                        read();
60
+                    })
61
+                        .catch((err) => {
62
+                        debug("an error occurred while reading: %s", err);
63
+                    });
64
+                };
65
+                read();
66
+                const packet = { type: "open" };
67
+                if (this.query.sid) {
68
+                    packet.data = `{"sid":"${this.query.sid}"}`;
69
+                }
70
+                this._writer.write(packet).then(() => this.onOpen());
71
+            });
72
+        });
73
+    }
74
+    write(packets) {
75
+        this.writable = false;
76
+        for (let i = 0; i < packets.length; i++) {
77
+            const packet = packets[i];
78
+            const lastPacket = i === packets.length - 1;
79
+            this._writer.write(packet).then(() => {
80
+                if (lastPacket) {
81
+                    (0, globals_node_js_1.nextTick)(() => {
82
+                        this.writable = true;
83
+                        this.emitReserved("drain");
84
+                    }, this.setTimeoutFn);
85
+                }
86
+            });
87
+        }
88
+    }
89
+    doClose() {
90
+        var _a;
91
+        (_a = this._transport) === null || _a === void 0 ? void 0 : _a.close();
92
+    }
93
+}
94
+exports.WT = WT;

+ 7
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/util.d.ts View File

@@ -0,0 +1,7 @@
1
+export declare function pick(obj: any, ...attr: any[]): any;
2
+export declare function installTimerFunctions(obj: any, opts: any): void;
3
+export declare function byteLength(obj: any): number;
4
+/**
5
+ * Generates a random 8-characters string.
6
+ */
7
+export declare function randomString(): string;

+ 65
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/cjs/util.js View File

@@ -0,0 +1,65 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.pick = pick;
4
+exports.installTimerFunctions = installTimerFunctions;
5
+exports.byteLength = byteLength;
6
+exports.randomString = randomString;
7
+const globals_node_js_1 = require("./globals.node.js");
8
+function pick(obj, ...attr) {
9
+    return attr.reduce((acc, k) => {
10
+        if (obj.hasOwnProperty(k)) {
11
+            acc[k] = obj[k];
12
+        }
13
+        return acc;
14
+    }, {});
15
+}
16
+// Keep a reference to the real timeout functions so they can be used when overridden
17
+const NATIVE_SET_TIMEOUT = globals_node_js_1.globalThisShim.setTimeout;
18
+const NATIVE_CLEAR_TIMEOUT = globals_node_js_1.globalThisShim.clearTimeout;
19
+function installTimerFunctions(obj, opts) {
20
+    if (opts.useNativeTimers) {
21
+        obj.setTimeoutFn = NATIVE_SET_TIMEOUT.bind(globals_node_js_1.globalThisShim);
22
+        obj.clearTimeoutFn = NATIVE_CLEAR_TIMEOUT.bind(globals_node_js_1.globalThisShim);
23
+    }
24
+    else {
25
+        obj.setTimeoutFn = globals_node_js_1.globalThisShim.setTimeout.bind(globals_node_js_1.globalThisShim);
26
+        obj.clearTimeoutFn = globals_node_js_1.globalThisShim.clearTimeout.bind(globals_node_js_1.globalThisShim);
27
+    }
28
+}
29
+// base64 encoded buffers are about 33% bigger (https://en.wikipedia.org/wiki/Base64)
30
+const BASE64_OVERHEAD = 1.33;
31
+// we could also have used `new Blob([obj]).size`, but it isn't supported in IE9
32
+function byteLength(obj) {
33
+    if (typeof obj === "string") {
34
+        return utf8Length(obj);
35
+    }
36
+    // arraybuffer or blob
37
+    return Math.ceil((obj.byteLength || obj.size) * BASE64_OVERHEAD);
38
+}
39
+function utf8Length(str) {
40
+    let c = 0, length = 0;
41
+    for (let i = 0, l = str.length; i < l; i++) {
42
+        c = str.charCodeAt(i);
43
+        if (c < 0x80) {
44
+            length += 1;
45
+        }
46
+        else if (c < 0x800) {
47
+            length += 2;
48
+        }
49
+        else if (c < 0xd800 || c >= 0xe000) {
50
+            length += 3;
51
+        }
52
+        else {
53
+            i++;
54
+            length += 4;
55
+        }
56
+    }
57
+    return length;
58
+}
59
+/**
60
+ * Generates a random 8-characters string.
61
+ */
62
+function randomString() {
63
+    return (Date.now().toString(36).substring(3) +
64
+        Math.random().toString(36).substring(2, 5));
65
+}

+ 3
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/esm-debug/browser-entrypoint.d.ts View File

@@ -0,0 +1,3 @@
1
+import { Socket } from "./socket.js";
2
+declare const _default: (uri: any, opts: any) => Socket;
3
+export default _default;

+ 2
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/esm-debug/browser-entrypoint.js View File

@@ -0,0 +1,2 @@
1
+import { Socket } from "./socket.js";
2
+export default (uri, opts) => new Socket(uri, opts);

+ 1
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/esm-debug/contrib/has-cors.d.ts View File

@@ -0,0 +1 @@
1
+export declare const hasCORS: boolean;

+ 11
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/esm-debug/contrib/has-cors.js View File

@@ -0,0 +1,11 @@
1
+// imported from https://github.com/component/has-cors
2
+let value = false;
3
+try {
4
+    value = typeof XMLHttpRequest !== 'undefined' &&
5
+        'withCredentials' in new XMLHttpRequest();
6
+}
7
+catch (err) {
8
+    // if XMLHttp support is disabled in IE then it will throw
9
+    // when trying to create
10
+}
11
+export const hasCORS = value;

+ 15
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/esm-debug/contrib/parseqs.d.ts View File

@@ -0,0 +1,15 @@
1
+/**
2
+ * Compiles a querystring
3
+ * Returns string representation of the object
4
+ *
5
+ * @param {Object}
6
+ * @api private
7
+ */
8
+export declare function encode(obj: any): string;
9
+/**
10
+ * Parses a simple querystring into an object
11
+ *
12
+ * @param {String} qs
13
+ * @api private
14
+ */
15
+export declare function decode(qs: any): {};

+ 34
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/esm-debug/contrib/parseqs.js View File

@@ -0,0 +1,34 @@
1
+// imported from https://github.com/galkn/querystring
2
+/**
3
+ * Compiles a querystring
4
+ * Returns string representation of the object
5
+ *
6
+ * @param {Object}
7
+ * @api private
8
+ */
9
+export function encode(obj) {
10
+    let str = '';
11
+    for (let i in obj) {
12
+        if (obj.hasOwnProperty(i)) {
13
+            if (str.length)
14
+                str += '&';
15
+            str += encodeURIComponent(i) + '=' + encodeURIComponent(obj[i]);
16
+        }
17
+    }
18
+    return str;
19
+}
20
+/**
21
+ * Parses a simple querystring into an object
22
+ *
23
+ * @param {String} qs
24
+ * @api private
25
+ */
26
+export function decode(qs) {
27
+    let qry = {};
28
+    let pairs = qs.split('&');
29
+    for (let i = 0, l = pairs.length; i < l; i++) {
30
+        let pair = pairs[i].split('=');
31
+        qry[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);
32
+    }
33
+    return qry;
34
+}

+ 1
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/esm-debug/contrib/parseuri.d.ts View File

@@ -0,0 +1 @@
1
+export declare function parse(str: string): any;

+ 0
- 0
DaoDaoFrontend/node_modules/engine.io-client/build/esm-debug/contrib/parseuri.js View File


Some files were not shown because too many files changed in this diff