@rspack/dev-server 1.1.4 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -17
- package/client/clients/SockJSClient.js +34 -0
- package/client/clients/WebSocketClient.js +32 -0
- package/client/index.js +131 -214
- package/client/modules/logger/index.js +725 -0
- package/client/modules/sockjs-client/index.js +4506 -0
- package/client/overlay.js +503 -0
- package/client/progress.js +130 -0
- package/client/socket.js +60 -0
- package/client/utils/ansiHTML.js +63 -64
- package/client/utils/log.js +21 -0
- package/client/utils/sendMessage.js +17 -0
- package/dist/config.d.ts +14 -15
- package/dist/getPort.d.ts +10 -0
- package/dist/getPort.js +131 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -1
- package/dist/options.json +1034 -0
- package/dist/server.d.ts +106 -23
- package/dist/server.js +2195 -46
- package/dist/servers/BaseServer.d.ts +17 -0
- package/dist/servers/BaseServer.js +20 -0
- package/dist/servers/SockJSServer.d.ts +10 -0
- package/dist/servers/SockJSServer.js +110 -0
- package/dist/servers/WebsocketServer.d.ts +10 -0
- package/dist/servers/WebsocketServer.js +72 -0
- package/dist/types.d.ts +158 -0
- package/dist/types.js +5 -0
- package/package.json +66 -29
- package/dist/patch.d.ts +0 -3
- package/dist/patch.js +0 -32
|
@@ -0,0 +1,4506 @@
|
|
|
1
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
|
+
|
|
3
|
+
if(typeof exports === 'object' && typeof module === 'object') {
|
|
4
|
+
module.exports = factory();
|
|
5
|
+
}else if(typeof define === 'function' && define.amd) {
|
|
6
|
+
|
|
7
|
+
define([], factory);
|
|
8
|
+
|
|
9
|
+
} else if(typeof exports === 'object'){
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
exports["SockJS"] = factory();
|
|
13
|
+
|
|
14
|
+
} else {
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
root["SockJS"] = factory();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
})((typeof self !== 'undefined' ? self : this), function() {
|
|
21
|
+
return (function() {
|
|
22
|
+
var __webpack_modules__ = ({
|
|
23
|
+
"../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js": (function (module, exports, __webpack_require__) {
|
|
24
|
+
"use strict";
|
|
25
|
+
|
|
26
|
+
function _type_of(obj) {
|
|
27
|
+
"@swc/helpers - typeof";
|
|
28
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
29
|
+
}
|
|
30
|
+
function _typeof(obj) {
|
|
31
|
+
if (typeof Symbol === "function" && _type_of(Symbol.iterator) === "symbol") {
|
|
32
|
+
_typeof = function _typeof(obj) {
|
|
33
|
+
return typeof obj === "undefined" ? "undefined" : _type_of(obj);
|
|
34
|
+
};
|
|
35
|
+
} else {
|
|
36
|
+
_typeof = function _typeof(obj) {
|
|
37
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _type_of(obj);
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
return _typeof(obj);
|
|
41
|
+
}
|
|
42
|
+
/* eslint-env browser */ /**
|
|
43
|
+
* This is the web browser implementation of `debug()`.
|
|
44
|
+
*/ exports.log = log;
|
|
45
|
+
exports.formatArgs = formatArgs;
|
|
46
|
+
exports.save = save;
|
|
47
|
+
exports.load = load;
|
|
48
|
+
exports.useColors = useColors;
|
|
49
|
+
exports.storage = localstorage();
|
|
50
|
+
/**
|
|
51
|
+
* Colors.
|
|
52
|
+
*/ exports.colors = [
|
|
53
|
+
'#0000CC',
|
|
54
|
+
'#0000FF',
|
|
55
|
+
'#0033CC',
|
|
56
|
+
'#0033FF',
|
|
57
|
+
'#0066CC',
|
|
58
|
+
'#0066FF',
|
|
59
|
+
'#0099CC',
|
|
60
|
+
'#0099FF',
|
|
61
|
+
'#00CC00',
|
|
62
|
+
'#00CC33',
|
|
63
|
+
'#00CC66',
|
|
64
|
+
'#00CC99',
|
|
65
|
+
'#00CCCC',
|
|
66
|
+
'#00CCFF',
|
|
67
|
+
'#3300CC',
|
|
68
|
+
'#3300FF',
|
|
69
|
+
'#3333CC',
|
|
70
|
+
'#3333FF',
|
|
71
|
+
'#3366CC',
|
|
72
|
+
'#3366FF',
|
|
73
|
+
'#3399CC',
|
|
74
|
+
'#3399FF',
|
|
75
|
+
'#33CC00',
|
|
76
|
+
'#33CC33',
|
|
77
|
+
'#33CC66',
|
|
78
|
+
'#33CC99',
|
|
79
|
+
'#33CCCC',
|
|
80
|
+
'#33CCFF',
|
|
81
|
+
'#6600CC',
|
|
82
|
+
'#6600FF',
|
|
83
|
+
'#6633CC',
|
|
84
|
+
'#6633FF',
|
|
85
|
+
'#66CC00',
|
|
86
|
+
'#66CC33',
|
|
87
|
+
'#9900CC',
|
|
88
|
+
'#9900FF',
|
|
89
|
+
'#9933CC',
|
|
90
|
+
'#9933FF',
|
|
91
|
+
'#99CC00',
|
|
92
|
+
'#99CC33',
|
|
93
|
+
'#CC0000',
|
|
94
|
+
'#CC0033',
|
|
95
|
+
'#CC0066',
|
|
96
|
+
'#CC0099',
|
|
97
|
+
'#CC00CC',
|
|
98
|
+
'#CC00FF',
|
|
99
|
+
'#CC3300',
|
|
100
|
+
'#CC3333',
|
|
101
|
+
'#CC3366',
|
|
102
|
+
'#CC3399',
|
|
103
|
+
'#CC33CC',
|
|
104
|
+
'#CC33FF',
|
|
105
|
+
'#CC6600',
|
|
106
|
+
'#CC6633',
|
|
107
|
+
'#CC9900',
|
|
108
|
+
'#CC9933',
|
|
109
|
+
'#CCCC00',
|
|
110
|
+
'#CCCC33',
|
|
111
|
+
'#FF0000',
|
|
112
|
+
'#FF0033',
|
|
113
|
+
'#FF0066',
|
|
114
|
+
'#FF0099',
|
|
115
|
+
'#FF00CC',
|
|
116
|
+
'#FF00FF',
|
|
117
|
+
'#FF3300',
|
|
118
|
+
'#FF3333',
|
|
119
|
+
'#FF3366',
|
|
120
|
+
'#FF3399',
|
|
121
|
+
'#FF33CC',
|
|
122
|
+
'#FF33FF',
|
|
123
|
+
'#FF6600',
|
|
124
|
+
'#FF6633',
|
|
125
|
+
'#FF9900',
|
|
126
|
+
'#FF9933',
|
|
127
|
+
'#FFCC00',
|
|
128
|
+
'#FFCC33'
|
|
129
|
+
];
|
|
130
|
+
/**
|
|
131
|
+
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
|
132
|
+
* and the Firebug extension (any Firefox version) are known
|
|
133
|
+
* to support "%c" CSS customizations.
|
|
134
|
+
*
|
|
135
|
+
* TODO: add a `localStorage` variable to explicitly enable/disable colors
|
|
136
|
+
*/ // eslint-disable-next-line complexity
|
|
137
|
+
function useColors() {
|
|
138
|
+
// NB: In an Electron preload script, document will be defined but not fully
|
|
139
|
+
// initialized. Since we know we're in Chrome, we'll just detect this case
|
|
140
|
+
// explicitly
|
|
141
|
+
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
|
|
142
|
+
return true;
|
|
143
|
+
} // Internet Explorer and Edge do not support colors.
|
|
144
|
+
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
145
|
+
return false;
|
|
146
|
+
} // Is webkit? http://stackoverflow.com/a/16459606/376773
|
|
147
|
+
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
|
148
|
+
return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
|
149
|
+
typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
150
|
+
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
151
|
+
typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
|
152
|
+
typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Colorize log arguments if enabled.
|
|
156
|
+
*
|
|
157
|
+
* @api public
|
|
158
|
+
*/ function formatArgs(args) {
|
|
159
|
+
args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
|
|
160
|
+
if (!this.useColors) {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
var c = 'color: ' + this.color;
|
|
164
|
+
args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other
|
|
165
|
+
// arguments passed either before or after the %c, so we need to
|
|
166
|
+
// figure out the correct index to insert the CSS into
|
|
167
|
+
var index = 0;
|
|
168
|
+
var lastC = 0;
|
|
169
|
+
args[0].replace(/%[a-zA-Z%]/g, function(match) {
|
|
170
|
+
if (match === '%%') {
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
index++;
|
|
174
|
+
if (match === '%c') {
|
|
175
|
+
// We only are interested in the *last* %c
|
|
176
|
+
// (the user may have provided their own)
|
|
177
|
+
lastC = index;
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
args.splice(lastC, 0, c);
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Invokes `console.log()` when available.
|
|
184
|
+
* No-op when `console.log` is not a "function".
|
|
185
|
+
*
|
|
186
|
+
* @api public
|
|
187
|
+
*/ function log() {
|
|
188
|
+
var _console;
|
|
189
|
+
// This hackery is required for IE8/9, where
|
|
190
|
+
// the `console.log` function doesn't have 'apply'
|
|
191
|
+
return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments);
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Save `namespaces`.
|
|
195
|
+
*
|
|
196
|
+
* @param {String} namespaces
|
|
197
|
+
* @api private
|
|
198
|
+
*/ function save(namespaces) {
|
|
199
|
+
try {
|
|
200
|
+
if (namespaces) {
|
|
201
|
+
exports.storage.setItem('debug', namespaces);
|
|
202
|
+
} else {
|
|
203
|
+
exports.storage.removeItem('debug');
|
|
204
|
+
}
|
|
205
|
+
} catch (error) {
|
|
206
|
+
// XXX (@Qix-) should we be logging these?
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Load `namespaces`.
|
|
211
|
+
*
|
|
212
|
+
* @return {String} returns the previously persisted debug modes
|
|
213
|
+
* @api private
|
|
214
|
+
*/ function load() {
|
|
215
|
+
var r;
|
|
216
|
+
try {
|
|
217
|
+
r = exports.storage.getItem('debug');
|
|
218
|
+
} catch (error) {} // Swallow
|
|
219
|
+
// XXX (@Qix-) should we be logging these?
|
|
220
|
+
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
|
221
|
+
if (!r && typeof process !== 'undefined' && 'env' in process) {
|
|
222
|
+
r = process.env.DEBUG;
|
|
223
|
+
}
|
|
224
|
+
return r;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Localstorage attempts to return the localstorage.
|
|
228
|
+
*
|
|
229
|
+
* This is necessary because safari throws
|
|
230
|
+
* when a user disables cookies/localstorage
|
|
231
|
+
* and you attempt to access it.
|
|
232
|
+
*
|
|
233
|
+
* @return {LocalStorage}
|
|
234
|
+
* @api private
|
|
235
|
+
*/ function localstorage() {
|
|
236
|
+
try {
|
|
237
|
+
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
|
|
238
|
+
// The Browser also has localStorage in the global context.
|
|
239
|
+
return localStorage;
|
|
240
|
+
} catch (error) {
|
|
241
|
+
// XXX (@Qix-) should we be logging these?
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
module.exports = __webpack_require__("../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/common.js")(exports);
|
|
245
|
+
var formatters = module.exports.formatters;
|
|
246
|
+
/**
|
|
247
|
+
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
|
248
|
+
*/ formatters.j = function(v) {
|
|
249
|
+
try {
|
|
250
|
+
return JSON.stringify(v);
|
|
251
|
+
} catch (error) {
|
|
252
|
+
return '[UnexpectedJSONParseError]: ' + error.message;
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
}),
|
|
258
|
+
"../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/common.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
259
|
+
"use strict";
|
|
260
|
+
|
|
261
|
+
function _instanceof(left, right) {
|
|
262
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
263
|
+
return !!right[Symbol.hasInstance](left);
|
|
264
|
+
} else {
|
|
265
|
+
return left instanceof right;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* This is the common logic for both the Node.js and web browser
|
|
270
|
+
* implementations of `debug()`.
|
|
271
|
+
*/ function setup(env) {
|
|
272
|
+
createDebug.debug = createDebug;
|
|
273
|
+
createDebug.default = createDebug;
|
|
274
|
+
createDebug.coerce = coerce;
|
|
275
|
+
createDebug.disable = disable;
|
|
276
|
+
createDebug.enable = enable;
|
|
277
|
+
createDebug.enabled = enabled;
|
|
278
|
+
createDebug.humanize = __webpack_require__("../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js");
|
|
279
|
+
Object.keys(env).forEach(function(key) {
|
|
280
|
+
createDebug[key] = env[key];
|
|
281
|
+
});
|
|
282
|
+
/**
|
|
283
|
+
* Active `debug` instances.
|
|
284
|
+
*/ createDebug.instances = [];
|
|
285
|
+
/**
|
|
286
|
+
* The currently active debug mode names, and names to skip.
|
|
287
|
+
*/ createDebug.names = [];
|
|
288
|
+
createDebug.skips = [];
|
|
289
|
+
/**
|
|
290
|
+
* Map of special "%n" handling functions, for the debug "format" argument.
|
|
291
|
+
*
|
|
292
|
+
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
|
293
|
+
*/ createDebug.formatters = {};
|
|
294
|
+
/**
|
|
295
|
+
* Selects a color for a debug namespace
|
|
296
|
+
* @param {String} namespace The namespace string for the for the debug instance to be colored
|
|
297
|
+
* @return {Number|String} An ANSI color code for the given namespace
|
|
298
|
+
* @api private
|
|
299
|
+
*/ function selectColor(namespace) {
|
|
300
|
+
var hash = 0;
|
|
301
|
+
for(var i = 0; i < namespace.length; i++){
|
|
302
|
+
hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
|
303
|
+
hash |= 0; // Convert to 32bit integer
|
|
304
|
+
}
|
|
305
|
+
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
|
306
|
+
}
|
|
307
|
+
createDebug.selectColor = selectColor;
|
|
308
|
+
/**
|
|
309
|
+
* Create a debugger with the given `namespace`.
|
|
310
|
+
*
|
|
311
|
+
* @param {String} namespace
|
|
312
|
+
* @return {Function}
|
|
313
|
+
* @api public
|
|
314
|
+
*/ function createDebug(namespace) {
|
|
315
|
+
var prevTime;
|
|
316
|
+
function debug() {
|
|
317
|
+
// Disabled?
|
|
318
|
+
if (!debug.enabled) {
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
322
|
+
args[_key] = arguments[_key];
|
|
323
|
+
}
|
|
324
|
+
var self = debug; // Set `diff` timestamp
|
|
325
|
+
var curr = Number(new Date());
|
|
326
|
+
var ms = curr - (prevTime || curr);
|
|
327
|
+
self.diff = ms;
|
|
328
|
+
self.prev = prevTime;
|
|
329
|
+
self.curr = curr;
|
|
330
|
+
prevTime = curr;
|
|
331
|
+
args[0] = createDebug.coerce(args[0]);
|
|
332
|
+
if (typeof args[0] !== 'string') {
|
|
333
|
+
// Anything else let's inspect with %O
|
|
334
|
+
args.unshift('%O');
|
|
335
|
+
} // Apply any `formatters` transformations
|
|
336
|
+
var index = 0;
|
|
337
|
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
|
|
338
|
+
// If we encounter an escaped % then don't increase the array index
|
|
339
|
+
if (match === '%%') {
|
|
340
|
+
return match;
|
|
341
|
+
}
|
|
342
|
+
index++;
|
|
343
|
+
var formatter = createDebug.formatters[format];
|
|
344
|
+
if (typeof formatter === 'function') {
|
|
345
|
+
var val = args[index];
|
|
346
|
+
match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format`
|
|
347
|
+
args.splice(index, 1);
|
|
348
|
+
index--;
|
|
349
|
+
}
|
|
350
|
+
return match;
|
|
351
|
+
}); // Apply env-specific formatting (colors, etc.)
|
|
352
|
+
createDebug.formatArgs.call(self, args);
|
|
353
|
+
var logFn = self.log || createDebug.log;
|
|
354
|
+
logFn.apply(self, args);
|
|
355
|
+
}
|
|
356
|
+
debug.namespace = namespace;
|
|
357
|
+
debug.enabled = createDebug.enabled(namespace);
|
|
358
|
+
debug.useColors = createDebug.useColors();
|
|
359
|
+
debug.color = selectColor(namespace);
|
|
360
|
+
debug.destroy = destroy;
|
|
361
|
+
debug.extend = extend; // Debug.formatArgs = formatArgs;
|
|
362
|
+
// debug.rawLog = rawLog;
|
|
363
|
+
// env-specific initialization logic for debug instances
|
|
364
|
+
if (typeof createDebug.init === 'function') {
|
|
365
|
+
createDebug.init(debug);
|
|
366
|
+
}
|
|
367
|
+
createDebug.instances.push(debug);
|
|
368
|
+
return debug;
|
|
369
|
+
}
|
|
370
|
+
function destroy() {
|
|
371
|
+
var index = createDebug.instances.indexOf(this);
|
|
372
|
+
if (index !== -1) {
|
|
373
|
+
createDebug.instances.splice(index, 1);
|
|
374
|
+
return true;
|
|
375
|
+
}
|
|
376
|
+
return false;
|
|
377
|
+
}
|
|
378
|
+
function extend(namespace, delimiter) {
|
|
379
|
+
return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Enables a debug mode by namespaces. This can include modes
|
|
383
|
+
* separated by a colon and wildcards.
|
|
384
|
+
*
|
|
385
|
+
* @param {String} namespaces
|
|
386
|
+
* @api public
|
|
387
|
+
*/ function enable(namespaces) {
|
|
388
|
+
createDebug.save(namespaces);
|
|
389
|
+
createDebug.names = [];
|
|
390
|
+
createDebug.skips = [];
|
|
391
|
+
var i;
|
|
392
|
+
var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
|
|
393
|
+
var len = split.length;
|
|
394
|
+
for(i = 0; i < len; i++){
|
|
395
|
+
if (!split[i]) {
|
|
396
|
+
continue;
|
|
397
|
+
}
|
|
398
|
+
namespaces = split[i].replace(/\*/g, '.*?');
|
|
399
|
+
if (namespaces[0] === '-') {
|
|
400
|
+
createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
|
|
401
|
+
} else {
|
|
402
|
+
createDebug.names.push(new RegExp('^' + namespaces + '$'));
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
for(i = 0; i < createDebug.instances.length; i++){
|
|
406
|
+
var instance = createDebug.instances[i];
|
|
407
|
+
instance.enabled = createDebug.enabled(instance.namespace);
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Disable debug output.
|
|
412
|
+
*
|
|
413
|
+
* @api public
|
|
414
|
+
*/ function disable() {
|
|
415
|
+
createDebug.enable('');
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Returns true if the given mode name is enabled, false otherwise.
|
|
419
|
+
*
|
|
420
|
+
* @param {String} name
|
|
421
|
+
* @return {Boolean}
|
|
422
|
+
* @api public
|
|
423
|
+
*/ function enabled(name) {
|
|
424
|
+
if (name[name.length - 1] === '*') {
|
|
425
|
+
return true;
|
|
426
|
+
}
|
|
427
|
+
var i;
|
|
428
|
+
var len;
|
|
429
|
+
for(i = 0, len = createDebug.skips.length; i < len; i++){
|
|
430
|
+
if (createDebug.skips[i].test(name)) {
|
|
431
|
+
return false;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
for(i = 0, len = createDebug.names.length; i < len; i++){
|
|
435
|
+
if (createDebug.names[i].test(name)) {
|
|
436
|
+
return true;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
return false;
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* Coerce `val`.
|
|
443
|
+
*
|
|
444
|
+
* @param {Mixed} val
|
|
445
|
+
* @return {Mixed}
|
|
446
|
+
* @api private
|
|
447
|
+
*/ function coerce(val) {
|
|
448
|
+
if (_instanceof(val, Error)) {
|
|
449
|
+
return val.stack || val.message;
|
|
450
|
+
}
|
|
451
|
+
return val;
|
|
452
|
+
}
|
|
453
|
+
createDebug.enable(createDebug.load());
|
|
454
|
+
return createDebug;
|
|
455
|
+
}
|
|
456
|
+
module.exports = setup;
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
}),
|
|
460
|
+
"../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js": (function (module) {
|
|
461
|
+
if (typeof Object.create === 'function') {
|
|
462
|
+
// implementation from standard node.js 'util' module
|
|
463
|
+
module.exports = function inherits(ctor, superCtor) {
|
|
464
|
+
if (superCtor) {
|
|
465
|
+
ctor.super_ = superCtor;
|
|
466
|
+
ctor.prototype = Object.create(superCtor.prototype, {
|
|
467
|
+
constructor: {
|
|
468
|
+
value: ctor,
|
|
469
|
+
enumerable: false,
|
|
470
|
+
writable: true,
|
|
471
|
+
configurable: true
|
|
472
|
+
}
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
};
|
|
476
|
+
} else {
|
|
477
|
+
// old school shim for old browsers
|
|
478
|
+
module.exports = function inherits(ctor, superCtor) {
|
|
479
|
+
if (superCtor) {
|
|
480
|
+
ctor.super_ = superCtor;
|
|
481
|
+
var TempCtor = function TempCtor() {};
|
|
482
|
+
TempCtor.prototype = superCtor.prototype;
|
|
483
|
+
ctor.prototype = new TempCtor();
|
|
484
|
+
ctor.prototype.constructor = ctor;
|
|
485
|
+
}
|
|
486
|
+
};
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
}),
|
|
491
|
+
"../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js": (function (module) {
|
|
492
|
+
function _type_of(obj) {
|
|
493
|
+
"@swc/helpers - typeof";
|
|
494
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* Helpers.
|
|
498
|
+
*/ var s = 1000;
|
|
499
|
+
var m = s * 60;
|
|
500
|
+
var h = m * 60;
|
|
501
|
+
var d = h * 24;
|
|
502
|
+
var w = d * 7;
|
|
503
|
+
var y = d * 365.25;
|
|
504
|
+
/**
|
|
505
|
+
* Parse or format the given `val`.
|
|
506
|
+
*
|
|
507
|
+
* Options:
|
|
508
|
+
*
|
|
509
|
+
* - `long` verbose formatting [false]
|
|
510
|
+
*
|
|
511
|
+
* @param {String|Number} val
|
|
512
|
+
* @param {Object} [options]
|
|
513
|
+
* @throws {Error} throw an error if val is not a non-empty string or a number
|
|
514
|
+
* @return {String|Number}
|
|
515
|
+
* @api public
|
|
516
|
+
*/ module.exports = function(val, options) {
|
|
517
|
+
options = options || {};
|
|
518
|
+
var type = typeof val === "undefined" ? "undefined" : _type_of(val);
|
|
519
|
+
if (type === 'string' && val.length > 0) {
|
|
520
|
+
return parse(val);
|
|
521
|
+
} else if (type === 'number' && isFinite(val)) {
|
|
522
|
+
return options.long ? fmtLong(val) : fmtShort(val);
|
|
523
|
+
}
|
|
524
|
+
throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
|
|
525
|
+
};
|
|
526
|
+
/**
|
|
527
|
+
* Parse the given `str` and return milliseconds.
|
|
528
|
+
*
|
|
529
|
+
* @param {String} str
|
|
530
|
+
* @return {Number}
|
|
531
|
+
* @api private
|
|
532
|
+
*/ function parse(str) {
|
|
533
|
+
str = String(str);
|
|
534
|
+
if (str.length > 100) {
|
|
535
|
+
return;
|
|
536
|
+
}
|
|
537
|
+
var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
|
|
538
|
+
if (!match) {
|
|
539
|
+
return;
|
|
540
|
+
}
|
|
541
|
+
var n = parseFloat(match[1]);
|
|
542
|
+
var type = (match[2] || 'ms').toLowerCase();
|
|
543
|
+
switch(type){
|
|
544
|
+
case 'years':
|
|
545
|
+
case 'year':
|
|
546
|
+
case 'yrs':
|
|
547
|
+
case 'yr':
|
|
548
|
+
case 'y':
|
|
549
|
+
return n * y;
|
|
550
|
+
case 'weeks':
|
|
551
|
+
case 'week':
|
|
552
|
+
case 'w':
|
|
553
|
+
return n * w;
|
|
554
|
+
case 'days':
|
|
555
|
+
case 'day':
|
|
556
|
+
case 'd':
|
|
557
|
+
return n * d;
|
|
558
|
+
case 'hours':
|
|
559
|
+
case 'hour':
|
|
560
|
+
case 'hrs':
|
|
561
|
+
case 'hr':
|
|
562
|
+
case 'h':
|
|
563
|
+
return n * h;
|
|
564
|
+
case 'minutes':
|
|
565
|
+
case 'minute':
|
|
566
|
+
case 'mins':
|
|
567
|
+
case 'min':
|
|
568
|
+
case 'm':
|
|
569
|
+
return n * m;
|
|
570
|
+
case 'seconds':
|
|
571
|
+
case 'second':
|
|
572
|
+
case 'secs':
|
|
573
|
+
case 'sec':
|
|
574
|
+
case 's':
|
|
575
|
+
return n * s;
|
|
576
|
+
case 'milliseconds':
|
|
577
|
+
case 'millisecond':
|
|
578
|
+
case 'msecs':
|
|
579
|
+
case 'msec':
|
|
580
|
+
case 'ms':
|
|
581
|
+
return n;
|
|
582
|
+
default:
|
|
583
|
+
return undefined;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* Short format for `ms`.
|
|
588
|
+
*
|
|
589
|
+
* @param {Number} ms
|
|
590
|
+
* @return {String}
|
|
591
|
+
* @api private
|
|
592
|
+
*/ function fmtShort(ms) {
|
|
593
|
+
var msAbs = Math.abs(ms);
|
|
594
|
+
if (msAbs >= d) {
|
|
595
|
+
return Math.round(ms / d) + 'd';
|
|
596
|
+
}
|
|
597
|
+
if (msAbs >= h) {
|
|
598
|
+
return Math.round(ms / h) + 'h';
|
|
599
|
+
}
|
|
600
|
+
if (msAbs >= m) {
|
|
601
|
+
return Math.round(ms / m) + 'm';
|
|
602
|
+
}
|
|
603
|
+
if (msAbs >= s) {
|
|
604
|
+
return Math.round(ms / s) + 's';
|
|
605
|
+
}
|
|
606
|
+
return ms + 'ms';
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* Long format for `ms`.
|
|
610
|
+
*
|
|
611
|
+
* @param {Number} ms
|
|
612
|
+
* @return {String}
|
|
613
|
+
* @api private
|
|
614
|
+
*/ function fmtLong(ms) {
|
|
615
|
+
var msAbs = Math.abs(ms);
|
|
616
|
+
if (msAbs >= d) {
|
|
617
|
+
return plural(ms, msAbs, d, 'day');
|
|
618
|
+
}
|
|
619
|
+
if (msAbs >= h) {
|
|
620
|
+
return plural(ms, msAbs, h, 'hour');
|
|
621
|
+
}
|
|
622
|
+
if (msAbs >= m) {
|
|
623
|
+
return plural(ms, msAbs, m, 'minute');
|
|
624
|
+
}
|
|
625
|
+
if (msAbs >= s) {
|
|
626
|
+
return plural(ms, msAbs, s, 'second');
|
|
627
|
+
}
|
|
628
|
+
return ms + ' ms';
|
|
629
|
+
}
|
|
630
|
+
/**
|
|
631
|
+
* Pluralization helper.
|
|
632
|
+
*/ function plural(ms, msAbs, n, name) {
|
|
633
|
+
var isPlural = msAbs >= n * 1.5;
|
|
634
|
+
return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
|
|
638
|
+
}),
|
|
639
|
+
"../node_modules/.pnpm/querystringify@2.2.0/node_modules/querystringify/index.js": (function (__unused_rspack_module, exports) {
|
|
640
|
+
"use strict";
|
|
641
|
+
|
|
642
|
+
var has = Object.prototype.hasOwnProperty, undef;
|
|
643
|
+
/**
|
|
644
|
+
* Decode a URI encoded string.
|
|
645
|
+
*
|
|
646
|
+
* @param {String} input The URI encoded string.
|
|
647
|
+
* @returns {String|Null} The decoded string.
|
|
648
|
+
* @api private
|
|
649
|
+
*/ function decode(input) {
|
|
650
|
+
try {
|
|
651
|
+
return decodeURIComponent(input.replace(/\+/g, ' '));
|
|
652
|
+
} catch (e) {
|
|
653
|
+
return null;
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
/**
|
|
657
|
+
* Attempts to encode a given input.
|
|
658
|
+
*
|
|
659
|
+
* @param {String} input The string that needs to be encoded.
|
|
660
|
+
* @returns {String|Null} The encoded string.
|
|
661
|
+
* @api private
|
|
662
|
+
*/ function encode(input) {
|
|
663
|
+
try {
|
|
664
|
+
return encodeURIComponent(input);
|
|
665
|
+
} catch (e) {
|
|
666
|
+
return null;
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
/**
|
|
670
|
+
* Simple query string parser.
|
|
671
|
+
*
|
|
672
|
+
* @param {String} query The query string that needs to be parsed.
|
|
673
|
+
* @returns {Object}
|
|
674
|
+
* @api public
|
|
675
|
+
*/ function querystring(query) {
|
|
676
|
+
var parser = /([^=?#&]+)=?([^&]*)/g, result = {}, part;
|
|
677
|
+
while(part = parser.exec(query)){
|
|
678
|
+
var key = decode(part[1]), value = decode(part[2]);
|
|
679
|
+
//
|
|
680
|
+
// Prevent overriding of existing properties. This ensures that build-in
|
|
681
|
+
// methods like `toString` or __proto__ are not overriden by malicious
|
|
682
|
+
// querystrings.
|
|
683
|
+
//
|
|
684
|
+
// In the case if failed decoding, we want to omit the key/value pairs
|
|
685
|
+
// from the result.
|
|
686
|
+
//
|
|
687
|
+
if (key === null || value === null || key in result) continue;
|
|
688
|
+
result[key] = value;
|
|
689
|
+
}
|
|
690
|
+
return result;
|
|
691
|
+
}
|
|
692
|
+
/**
|
|
693
|
+
* Transform a query string to an object.
|
|
694
|
+
*
|
|
695
|
+
* @param {Object} obj Object that should be transformed.
|
|
696
|
+
* @param {String} prefix Optional prefix.
|
|
697
|
+
* @returns {String}
|
|
698
|
+
* @api public
|
|
699
|
+
*/ function querystringify(obj, prefix) {
|
|
700
|
+
prefix = prefix || '';
|
|
701
|
+
var pairs = [], value, key;
|
|
702
|
+
//
|
|
703
|
+
// Optionally prefix with a '?' if needed
|
|
704
|
+
//
|
|
705
|
+
if ('string' !== typeof prefix) prefix = '?';
|
|
706
|
+
for(key in obj){
|
|
707
|
+
if (has.call(obj, key)) {
|
|
708
|
+
value = obj[key];
|
|
709
|
+
//
|
|
710
|
+
// Edge cases where we actually want to encode the value to an empty
|
|
711
|
+
// string instead of the stringified value.
|
|
712
|
+
//
|
|
713
|
+
if (!value && (value === null || value === undef || isNaN(value))) {
|
|
714
|
+
value = '';
|
|
715
|
+
}
|
|
716
|
+
key = encode(key);
|
|
717
|
+
value = encode(value);
|
|
718
|
+
//
|
|
719
|
+
// If we failed to encode the strings, we should bail out as we don't
|
|
720
|
+
// want to add invalid strings to the query.
|
|
721
|
+
//
|
|
722
|
+
if (key === null || value === null) continue;
|
|
723
|
+
pairs.push(key + '=' + value);
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
return pairs.length ? prefix + pairs.join('&') : '';
|
|
727
|
+
}
|
|
728
|
+
//
|
|
729
|
+
// Expose the module.
|
|
730
|
+
//
|
|
731
|
+
exports.stringify = querystringify;
|
|
732
|
+
exports.parse = querystring;
|
|
733
|
+
|
|
734
|
+
|
|
735
|
+
}),
|
|
736
|
+
"../node_modules/.pnpm/requires-port@1.0.0/node_modules/requires-port/index.js": (function (module) {
|
|
737
|
+
"use strict";
|
|
738
|
+
|
|
739
|
+
/**
|
|
740
|
+
* Check if we're required to add a port number.
|
|
741
|
+
*
|
|
742
|
+
* @see https://url.spec.whatwg.org/#default-port
|
|
743
|
+
* @param {Number|String} port Port number we need to check
|
|
744
|
+
* @param {String} protocol Protocol we need to check against.
|
|
745
|
+
* @returns {Boolean} Is it a default port for the given protocol
|
|
746
|
+
* @api private
|
|
747
|
+
*/ module.exports = function required(port, protocol) {
|
|
748
|
+
protocol = protocol.split(':')[0];
|
|
749
|
+
port = +port;
|
|
750
|
+
if (!port) return false;
|
|
751
|
+
switch(protocol){
|
|
752
|
+
case 'http':
|
|
753
|
+
case 'ws':
|
|
754
|
+
return port !== 80;
|
|
755
|
+
case 'https':
|
|
756
|
+
case 'wss':
|
|
757
|
+
return port !== 443;
|
|
758
|
+
case 'ftp':
|
|
759
|
+
return port !== 21;
|
|
760
|
+
case 'gopher':
|
|
761
|
+
return port !== 70;
|
|
762
|
+
case 'file':
|
|
763
|
+
return false;
|
|
764
|
+
}
|
|
765
|
+
return port !== 0;
|
|
766
|
+
};
|
|
767
|
+
|
|
768
|
+
|
|
769
|
+
}),
|
|
770
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/entry.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
771
|
+
"use strict";
|
|
772
|
+
|
|
773
|
+
var transportList = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport-list.js");
|
|
774
|
+
module.exports = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/main.js")(transportList);
|
|
775
|
+
// TODO can't get rid of this until all servers do
|
|
776
|
+
if ('_sockjs_onload' in __webpack_require__.g) {
|
|
777
|
+
setTimeout(__webpack_require__.g._sockjs_onload, 1);
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
|
|
781
|
+
}),
|
|
782
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/event/close.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
783
|
+
"use strict";
|
|
784
|
+
|
|
785
|
+
var inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), Event = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/event/event.js");
|
|
786
|
+
function CloseEvent() {
|
|
787
|
+
Event.call(this);
|
|
788
|
+
this.initEvent('close', false, false);
|
|
789
|
+
this.wasClean = false;
|
|
790
|
+
this.code = 0;
|
|
791
|
+
this.reason = '';
|
|
792
|
+
}
|
|
793
|
+
inherits(CloseEvent, Event);
|
|
794
|
+
module.exports = CloseEvent;
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
}),
|
|
798
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/event/emitter.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
799
|
+
"use strict";
|
|
800
|
+
|
|
801
|
+
var inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), EventTarget = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/event/eventtarget.js");
|
|
802
|
+
function EventEmitter() {
|
|
803
|
+
EventTarget.call(this);
|
|
804
|
+
}
|
|
805
|
+
inherits(EventEmitter, EventTarget);
|
|
806
|
+
EventEmitter.prototype.removeAllListeners = function(type) {
|
|
807
|
+
if (type) {
|
|
808
|
+
delete this._listeners[type];
|
|
809
|
+
} else {
|
|
810
|
+
this._listeners = {};
|
|
811
|
+
}
|
|
812
|
+
};
|
|
813
|
+
EventEmitter.prototype.once = function(type, listener) {
|
|
814
|
+
var self = this, fired = false;
|
|
815
|
+
function g() {
|
|
816
|
+
self.removeListener(type, g);
|
|
817
|
+
if (!fired) {
|
|
818
|
+
fired = true;
|
|
819
|
+
listener.apply(this, arguments);
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
this.on(type, g);
|
|
823
|
+
};
|
|
824
|
+
EventEmitter.prototype.emit = function() {
|
|
825
|
+
var type = arguments[0];
|
|
826
|
+
var listeners = this._listeners[type];
|
|
827
|
+
if (!listeners) {
|
|
828
|
+
return;
|
|
829
|
+
}
|
|
830
|
+
// equivalent of Array.prototype.slice.call(arguments, 1);
|
|
831
|
+
var l = arguments.length;
|
|
832
|
+
var args = new Array(l - 1);
|
|
833
|
+
for(var ai = 1; ai < l; ai++){
|
|
834
|
+
args[ai - 1] = arguments[ai];
|
|
835
|
+
}
|
|
836
|
+
for(var i = 0; i < listeners.length; i++){
|
|
837
|
+
listeners[i].apply(this, args);
|
|
838
|
+
}
|
|
839
|
+
};
|
|
840
|
+
EventEmitter.prototype.on = EventEmitter.prototype.addListener = EventTarget.prototype.addEventListener;
|
|
841
|
+
EventEmitter.prototype.removeListener = EventTarget.prototype.removeEventListener;
|
|
842
|
+
module.exports.EventEmitter = EventEmitter;
|
|
843
|
+
|
|
844
|
+
|
|
845
|
+
}),
|
|
846
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/event/event.js": (function (module) {
|
|
847
|
+
"use strict";
|
|
848
|
+
|
|
849
|
+
function Event(eventType) {
|
|
850
|
+
this.type = eventType;
|
|
851
|
+
}
|
|
852
|
+
Event.prototype.initEvent = function(eventType, canBubble, cancelable) {
|
|
853
|
+
this.type = eventType;
|
|
854
|
+
this.bubbles = canBubble;
|
|
855
|
+
this.cancelable = cancelable;
|
|
856
|
+
this.timeStamp = +new Date();
|
|
857
|
+
return this;
|
|
858
|
+
};
|
|
859
|
+
Event.prototype.stopPropagation = function() {};
|
|
860
|
+
Event.prototype.preventDefault = function() {};
|
|
861
|
+
Event.CAPTURING_PHASE = 1;
|
|
862
|
+
Event.AT_TARGET = 2;
|
|
863
|
+
Event.BUBBLING_PHASE = 3;
|
|
864
|
+
module.exports = Event;
|
|
865
|
+
|
|
866
|
+
|
|
867
|
+
}),
|
|
868
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/event/eventtarget.js": (function (module) {
|
|
869
|
+
"use strict";
|
|
870
|
+
|
|
871
|
+
/* Simplified implementation of DOM2 EventTarget.
|
|
872
|
+
* http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget
|
|
873
|
+
*/ function EventTarget() {
|
|
874
|
+
this._listeners = {};
|
|
875
|
+
}
|
|
876
|
+
EventTarget.prototype.addEventListener = function(eventType, listener) {
|
|
877
|
+
if (!(eventType in this._listeners)) {
|
|
878
|
+
this._listeners[eventType] = [];
|
|
879
|
+
}
|
|
880
|
+
var arr = this._listeners[eventType];
|
|
881
|
+
// #4
|
|
882
|
+
if (arr.indexOf(listener) === -1) {
|
|
883
|
+
// Make a copy so as not to interfere with a current dispatchEvent.
|
|
884
|
+
arr = arr.concat([
|
|
885
|
+
listener
|
|
886
|
+
]);
|
|
887
|
+
}
|
|
888
|
+
this._listeners[eventType] = arr;
|
|
889
|
+
};
|
|
890
|
+
EventTarget.prototype.removeEventListener = function(eventType, listener) {
|
|
891
|
+
var arr = this._listeners[eventType];
|
|
892
|
+
if (!arr) {
|
|
893
|
+
return;
|
|
894
|
+
}
|
|
895
|
+
var idx = arr.indexOf(listener);
|
|
896
|
+
if (idx !== -1) {
|
|
897
|
+
if (arr.length > 1) {
|
|
898
|
+
// Make a copy so as not to interfere with a current dispatchEvent.
|
|
899
|
+
this._listeners[eventType] = arr.slice(0, idx).concat(arr.slice(idx + 1));
|
|
900
|
+
} else {
|
|
901
|
+
delete this._listeners[eventType];
|
|
902
|
+
}
|
|
903
|
+
return;
|
|
904
|
+
}
|
|
905
|
+
};
|
|
906
|
+
EventTarget.prototype.dispatchEvent = function() {
|
|
907
|
+
var event = arguments[0];
|
|
908
|
+
var t = event.type;
|
|
909
|
+
// equivalent of Array.prototype.slice.call(arguments, 0);
|
|
910
|
+
var args = arguments.length === 1 ? [
|
|
911
|
+
event
|
|
912
|
+
] : Array.apply(null, arguments);
|
|
913
|
+
// TODO: This doesn't match the real behavior; per spec, onfoo get
|
|
914
|
+
// their place in line from the /first/ time they're set from
|
|
915
|
+
// non-null. Although WebKit bumps it to the end every time it's
|
|
916
|
+
// set.
|
|
917
|
+
if (this['on' + t]) {
|
|
918
|
+
this['on' + t].apply(this, args);
|
|
919
|
+
}
|
|
920
|
+
if (t in this._listeners) {
|
|
921
|
+
// Grab a reference to the listeners list. removeEventListener may alter the list.
|
|
922
|
+
var listeners = this._listeners[t];
|
|
923
|
+
for(var i = 0; i < listeners.length; i++){
|
|
924
|
+
listeners[i].apply(this, args);
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
};
|
|
928
|
+
module.exports = EventTarget;
|
|
929
|
+
|
|
930
|
+
|
|
931
|
+
}),
|
|
932
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/event/trans-message.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
933
|
+
"use strict";
|
|
934
|
+
|
|
935
|
+
var inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), Event = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/event/event.js");
|
|
936
|
+
function TransportMessageEvent(data) {
|
|
937
|
+
Event.call(this);
|
|
938
|
+
this.initEvent('message', false, false);
|
|
939
|
+
this.data = data;
|
|
940
|
+
}
|
|
941
|
+
inherits(TransportMessageEvent, Event);
|
|
942
|
+
module.exports = TransportMessageEvent;
|
|
943
|
+
|
|
944
|
+
|
|
945
|
+
}),
|
|
946
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/facade.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
947
|
+
"use strict";
|
|
948
|
+
|
|
949
|
+
var iframeUtils = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/iframe.js");
|
|
950
|
+
function FacadeJS(transport) {
|
|
951
|
+
this._transport = transport;
|
|
952
|
+
transport.on('message', this._transportMessage.bind(this));
|
|
953
|
+
transport.on('close', this._transportClose.bind(this));
|
|
954
|
+
}
|
|
955
|
+
FacadeJS.prototype._transportClose = function(code, reason) {
|
|
956
|
+
iframeUtils.postMessage('c', JSON.stringify([
|
|
957
|
+
code,
|
|
958
|
+
reason
|
|
959
|
+
]));
|
|
960
|
+
};
|
|
961
|
+
FacadeJS.prototype._transportMessage = function(frame) {
|
|
962
|
+
iframeUtils.postMessage('t', frame);
|
|
963
|
+
};
|
|
964
|
+
FacadeJS.prototype._send = function(data) {
|
|
965
|
+
this._transport.send(data);
|
|
966
|
+
};
|
|
967
|
+
FacadeJS.prototype._close = function() {
|
|
968
|
+
this._transport.close();
|
|
969
|
+
this._transport.removeAllListeners();
|
|
970
|
+
};
|
|
971
|
+
module.exports = FacadeJS;
|
|
972
|
+
|
|
973
|
+
|
|
974
|
+
}),
|
|
975
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/iframe-bootstrap.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
976
|
+
"use strict";
|
|
977
|
+
|
|
978
|
+
var urlUtils = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/url.js"), eventUtils = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/event.js"), FacadeJS = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/facade.js"), InfoIframeReceiver = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/info-iframe-receiver.js"), iframeUtils = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/iframe.js"), loc = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/location.js");
|
|
979
|
+
var debug = function debug() {};
|
|
980
|
+
if (true) {
|
|
981
|
+
debug = __webpack_require__("../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js")('sockjs-client:iframe-bootstrap');
|
|
982
|
+
}
|
|
983
|
+
module.exports = function(SockJS, availableTransports) {
|
|
984
|
+
var transportMap = {};
|
|
985
|
+
availableTransports.forEach(function(at) {
|
|
986
|
+
if (at.facadeTransport) {
|
|
987
|
+
transportMap[at.facadeTransport.transportName] = at.facadeTransport;
|
|
988
|
+
}
|
|
989
|
+
});
|
|
990
|
+
// hard-coded for the info iframe
|
|
991
|
+
// TODO see if we can make this more dynamic
|
|
992
|
+
transportMap[InfoIframeReceiver.transportName] = InfoIframeReceiver;
|
|
993
|
+
var parentOrigin;
|
|
994
|
+
/* eslint-disable camelcase */ SockJS.bootstrap_iframe = function() {
|
|
995
|
+
/* eslint-enable camelcase */ var facade;
|
|
996
|
+
iframeUtils.currentWindowId = loc.hash.slice(1);
|
|
997
|
+
var onMessage = function onMessage(e) {
|
|
998
|
+
if (e.source !== parent) {
|
|
999
|
+
return;
|
|
1000
|
+
}
|
|
1001
|
+
if (typeof parentOrigin === 'undefined') {
|
|
1002
|
+
parentOrigin = e.origin;
|
|
1003
|
+
}
|
|
1004
|
+
if (e.origin !== parentOrigin) {
|
|
1005
|
+
return;
|
|
1006
|
+
}
|
|
1007
|
+
var iframeMessage;
|
|
1008
|
+
try {
|
|
1009
|
+
iframeMessage = JSON.parse(e.data);
|
|
1010
|
+
} catch (ignored) {
|
|
1011
|
+
debug('bad json', e.data);
|
|
1012
|
+
return;
|
|
1013
|
+
}
|
|
1014
|
+
if (iframeMessage.windowId !== iframeUtils.currentWindowId) {
|
|
1015
|
+
return;
|
|
1016
|
+
}
|
|
1017
|
+
switch(iframeMessage.type){
|
|
1018
|
+
case 's':
|
|
1019
|
+
var p;
|
|
1020
|
+
try {
|
|
1021
|
+
p = JSON.parse(iframeMessage.data);
|
|
1022
|
+
} catch (ignored) {
|
|
1023
|
+
debug('bad json', iframeMessage.data);
|
|
1024
|
+
break;
|
|
1025
|
+
}
|
|
1026
|
+
var version = p[0];
|
|
1027
|
+
var transport = p[1];
|
|
1028
|
+
var transUrl = p[2];
|
|
1029
|
+
var baseUrl = p[3];
|
|
1030
|
+
debug(version, transport, transUrl, baseUrl);
|
|
1031
|
+
// change this to semver logic
|
|
1032
|
+
if (version !== SockJS.version) {
|
|
1033
|
+
throw new Error('Incompatible SockJS! Main site uses:' + ' "' + version + '", the iframe:' + ' "' + SockJS.version + '".');
|
|
1034
|
+
}
|
|
1035
|
+
if (!urlUtils.isOriginEqual(transUrl, loc.href) || !urlUtils.isOriginEqual(baseUrl, loc.href)) {
|
|
1036
|
+
throw new Error('Can\'t connect to different domain from within an ' + 'iframe. (' + loc.href + ', ' + transUrl + ', ' + baseUrl + ')');
|
|
1037
|
+
}
|
|
1038
|
+
facade = new FacadeJS(new transportMap[transport](transUrl, baseUrl));
|
|
1039
|
+
break;
|
|
1040
|
+
case 'm':
|
|
1041
|
+
facade._send(iframeMessage.data);
|
|
1042
|
+
break;
|
|
1043
|
+
case 'c':
|
|
1044
|
+
if (facade) {
|
|
1045
|
+
facade._close();
|
|
1046
|
+
}
|
|
1047
|
+
facade = null;
|
|
1048
|
+
break;
|
|
1049
|
+
}
|
|
1050
|
+
};
|
|
1051
|
+
eventUtils.attachEvent('message', onMessage);
|
|
1052
|
+
// Start
|
|
1053
|
+
iframeUtils.postMessage('s');
|
|
1054
|
+
};
|
|
1055
|
+
};
|
|
1056
|
+
|
|
1057
|
+
|
|
1058
|
+
}),
|
|
1059
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/info-ajax.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
1060
|
+
"use strict";
|
|
1061
|
+
|
|
1062
|
+
var EventEmitter = (__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/event/emitter.js")/* .EventEmitter */.EventEmitter), inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), objectUtils = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/object.js");
|
|
1063
|
+
var debug = function debug() {};
|
|
1064
|
+
if (true) {
|
|
1065
|
+
debug = __webpack_require__("../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js")('sockjs-client:info-ajax');
|
|
1066
|
+
}
|
|
1067
|
+
function InfoAjax(url, AjaxObject) {
|
|
1068
|
+
EventEmitter.call(this);
|
|
1069
|
+
var self = this;
|
|
1070
|
+
var t0 = +new Date();
|
|
1071
|
+
this.xo = new AjaxObject('GET', url);
|
|
1072
|
+
this.xo.once('finish', function(status, text) {
|
|
1073
|
+
var info, rtt;
|
|
1074
|
+
if (status === 200) {
|
|
1075
|
+
rtt = +new Date() - t0;
|
|
1076
|
+
if (text) {
|
|
1077
|
+
try {
|
|
1078
|
+
info = JSON.parse(text);
|
|
1079
|
+
} catch (e) {
|
|
1080
|
+
debug('bad json', text);
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
if (!objectUtils.isObject(info)) {
|
|
1084
|
+
info = {};
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
self.emit('finish', info, rtt);
|
|
1088
|
+
self.removeAllListeners();
|
|
1089
|
+
});
|
|
1090
|
+
}
|
|
1091
|
+
inherits(InfoAjax, EventEmitter);
|
|
1092
|
+
InfoAjax.prototype.close = function() {
|
|
1093
|
+
this.removeAllListeners();
|
|
1094
|
+
this.xo.close();
|
|
1095
|
+
};
|
|
1096
|
+
module.exports = InfoAjax;
|
|
1097
|
+
|
|
1098
|
+
|
|
1099
|
+
}),
|
|
1100
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/info-iframe-receiver.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
1101
|
+
"use strict";
|
|
1102
|
+
|
|
1103
|
+
var inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), EventEmitter = (__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/event/emitter.js")/* .EventEmitter */.EventEmitter), XHRLocalObject = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/sender/xhr-local.js"), InfoAjax = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/info-ajax.js");
|
|
1104
|
+
function InfoReceiverIframe(transUrl) {
|
|
1105
|
+
var self = this;
|
|
1106
|
+
EventEmitter.call(this);
|
|
1107
|
+
this.ir = new InfoAjax(transUrl, XHRLocalObject);
|
|
1108
|
+
this.ir.once('finish', function(info, rtt) {
|
|
1109
|
+
self.ir = null;
|
|
1110
|
+
self.emit('message', JSON.stringify([
|
|
1111
|
+
info,
|
|
1112
|
+
rtt
|
|
1113
|
+
]));
|
|
1114
|
+
});
|
|
1115
|
+
}
|
|
1116
|
+
inherits(InfoReceiverIframe, EventEmitter);
|
|
1117
|
+
InfoReceiverIframe.transportName = 'iframe-info-receiver';
|
|
1118
|
+
InfoReceiverIframe.prototype.close = function() {
|
|
1119
|
+
if (this.ir) {
|
|
1120
|
+
this.ir.close();
|
|
1121
|
+
this.ir = null;
|
|
1122
|
+
}
|
|
1123
|
+
this.removeAllListeners();
|
|
1124
|
+
};
|
|
1125
|
+
module.exports = InfoReceiverIframe;
|
|
1126
|
+
|
|
1127
|
+
|
|
1128
|
+
}),
|
|
1129
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/info-iframe.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
1130
|
+
"use strict";
|
|
1131
|
+
|
|
1132
|
+
var EventEmitter = (__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/event/emitter.js")/* .EventEmitter */.EventEmitter), inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), utils = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/event.js"), IframeTransport = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/iframe.js"), InfoReceiverIframe = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/info-iframe-receiver.js");
|
|
1133
|
+
var debug = function debug() {};
|
|
1134
|
+
if (true) {
|
|
1135
|
+
debug = __webpack_require__("../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js")('sockjs-client:info-iframe');
|
|
1136
|
+
}
|
|
1137
|
+
function InfoIframe(baseUrl, url) {
|
|
1138
|
+
var self = this;
|
|
1139
|
+
EventEmitter.call(this);
|
|
1140
|
+
var go = function go() {
|
|
1141
|
+
var ifr = self.ifr = new IframeTransport(InfoReceiverIframe.transportName, url, baseUrl);
|
|
1142
|
+
ifr.once('message', function(msg) {
|
|
1143
|
+
if (msg) {
|
|
1144
|
+
var d;
|
|
1145
|
+
try {
|
|
1146
|
+
d = JSON.parse(msg);
|
|
1147
|
+
} catch (e) {
|
|
1148
|
+
debug('bad json', msg);
|
|
1149
|
+
self.emit('finish');
|
|
1150
|
+
self.close();
|
|
1151
|
+
return;
|
|
1152
|
+
}
|
|
1153
|
+
var info = d[0], rtt = d[1];
|
|
1154
|
+
self.emit('finish', info, rtt);
|
|
1155
|
+
}
|
|
1156
|
+
self.close();
|
|
1157
|
+
});
|
|
1158
|
+
ifr.once('close', function() {
|
|
1159
|
+
self.emit('finish');
|
|
1160
|
+
self.close();
|
|
1161
|
+
});
|
|
1162
|
+
};
|
|
1163
|
+
// TODO this seems the same as the 'needBody' from transports
|
|
1164
|
+
if (!__webpack_require__.g.document.body) {
|
|
1165
|
+
utils.attachEvent('load', go);
|
|
1166
|
+
} else {
|
|
1167
|
+
go();
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
inherits(InfoIframe, EventEmitter);
|
|
1171
|
+
InfoIframe.enabled = function() {
|
|
1172
|
+
return IframeTransport.enabled();
|
|
1173
|
+
};
|
|
1174
|
+
InfoIframe.prototype.close = function() {
|
|
1175
|
+
if (this.ifr) {
|
|
1176
|
+
this.ifr.close();
|
|
1177
|
+
}
|
|
1178
|
+
this.removeAllListeners();
|
|
1179
|
+
this.ifr = null;
|
|
1180
|
+
};
|
|
1181
|
+
module.exports = InfoIframe;
|
|
1182
|
+
|
|
1183
|
+
|
|
1184
|
+
}),
|
|
1185
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/info-receiver.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
1186
|
+
"use strict";
|
|
1187
|
+
|
|
1188
|
+
var EventEmitter = (__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/event/emitter.js")/* .EventEmitter */.EventEmitter), inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), urlUtils = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/url.js"), XDR = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/sender/xdr.js"), XHRCors = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/sender/xhr-cors.js"), XHRLocal = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/sender/xhr-local.js"), XHRFake = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/sender/xhr-fake.js"), InfoIframe = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/info-iframe.js"), InfoAjax = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/info-ajax.js");
|
|
1189
|
+
var debug = function debug() {};
|
|
1190
|
+
if (true) {
|
|
1191
|
+
debug = __webpack_require__("../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js")('sockjs-client:info-receiver');
|
|
1192
|
+
}
|
|
1193
|
+
function InfoReceiver(baseUrl, urlInfo) {
|
|
1194
|
+
debug(baseUrl);
|
|
1195
|
+
var self = this;
|
|
1196
|
+
EventEmitter.call(this);
|
|
1197
|
+
setTimeout(function() {
|
|
1198
|
+
self.doXhr(baseUrl, urlInfo);
|
|
1199
|
+
}, 0);
|
|
1200
|
+
}
|
|
1201
|
+
inherits(InfoReceiver, EventEmitter);
|
|
1202
|
+
// TODO this is currently ignoring the list of available transports and the whitelist
|
|
1203
|
+
InfoReceiver._getReceiver = function(baseUrl, url, urlInfo) {
|
|
1204
|
+
// determine method of CORS support (if needed)
|
|
1205
|
+
if (urlInfo.sameOrigin) {
|
|
1206
|
+
return new InfoAjax(url, XHRLocal);
|
|
1207
|
+
}
|
|
1208
|
+
if (XHRCors.enabled) {
|
|
1209
|
+
return new InfoAjax(url, XHRCors);
|
|
1210
|
+
}
|
|
1211
|
+
if (XDR.enabled && urlInfo.sameScheme) {
|
|
1212
|
+
return new InfoAjax(url, XDR);
|
|
1213
|
+
}
|
|
1214
|
+
if (InfoIframe.enabled()) {
|
|
1215
|
+
return new InfoIframe(baseUrl, url);
|
|
1216
|
+
}
|
|
1217
|
+
return new InfoAjax(url, XHRFake);
|
|
1218
|
+
};
|
|
1219
|
+
InfoReceiver.prototype.doXhr = function(baseUrl, urlInfo) {
|
|
1220
|
+
var self = this, url = urlUtils.addPath(baseUrl, '/info');
|
|
1221
|
+
debug('doXhr', url);
|
|
1222
|
+
this.xo = InfoReceiver._getReceiver(baseUrl, url, urlInfo);
|
|
1223
|
+
this.timeoutRef = setTimeout(function() {
|
|
1224
|
+
debug('timeout');
|
|
1225
|
+
self._cleanup(false);
|
|
1226
|
+
self.emit('finish');
|
|
1227
|
+
}, InfoReceiver.timeout);
|
|
1228
|
+
this.xo.once('finish', function(info, rtt) {
|
|
1229
|
+
debug('finish', info, rtt);
|
|
1230
|
+
self._cleanup(true);
|
|
1231
|
+
self.emit('finish', info, rtt);
|
|
1232
|
+
});
|
|
1233
|
+
};
|
|
1234
|
+
InfoReceiver.prototype._cleanup = function(wasClean) {
|
|
1235
|
+
debug('_cleanup');
|
|
1236
|
+
clearTimeout(this.timeoutRef);
|
|
1237
|
+
this.timeoutRef = null;
|
|
1238
|
+
if (!wasClean && this.xo) {
|
|
1239
|
+
this.xo.close();
|
|
1240
|
+
}
|
|
1241
|
+
this.xo = null;
|
|
1242
|
+
};
|
|
1243
|
+
InfoReceiver.prototype.close = function() {
|
|
1244
|
+
debug('close');
|
|
1245
|
+
this.removeAllListeners();
|
|
1246
|
+
this._cleanup(false);
|
|
1247
|
+
};
|
|
1248
|
+
InfoReceiver.timeout = 8000;
|
|
1249
|
+
module.exports = InfoReceiver;
|
|
1250
|
+
|
|
1251
|
+
|
|
1252
|
+
}),
|
|
1253
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/location.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
1254
|
+
"use strict";
|
|
1255
|
+
|
|
1256
|
+
module.exports = __webpack_require__.g.location || {
|
|
1257
|
+
origin: 'http://localhost:80',
|
|
1258
|
+
protocol: 'http:',
|
|
1259
|
+
host: 'localhost',
|
|
1260
|
+
port: 80,
|
|
1261
|
+
href: 'http://localhost/',
|
|
1262
|
+
hash: ''
|
|
1263
|
+
};
|
|
1264
|
+
|
|
1265
|
+
|
|
1266
|
+
}),
|
|
1267
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/main.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
1268
|
+
"use strict";
|
|
1269
|
+
|
|
1270
|
+
function _instanceof(left, right) {
|
|
1271
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
1272
|
+
return !!right[Symbol.hasInstance](left);
|
|
1273
|
+
} else {
|
|
1274
|
+
return left instanceof right;
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/shims.js");
|
|
1278
|
+
var URL = __webpack_require__("../node_modules/.pnpm/url-parse@1.5.10/node_modules/url-parse/index.js"), inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), random = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/random.js"), escape = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/escape.js"), urlUtils = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/url.js"), eventUtils = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/event.js"), transport = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/transport.js"), objectUtils = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/object.js"), browser = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/browser.js"), log = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/log.js"), Event = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/event/event.js"), EventTarget = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/event/eventtarget.js"), loc = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/location.js"), CloseEvent = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/event/close.js"), TransportMessageEvent = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/event/trans-message.js"), InfoReceiver = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/info-receiver.js");
|
|
1279
|
+
var debug = function debug() {};
|
|
1280
|
+
if (true) {
|
|
1281
|
+
debug = __webpack_require__("../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js")('sockjs-client:main');
|
|
1282
|
+
}
|
|
1283
|
+
var transports;
|
|
1284
|
+
// follow constructor steps defined at http://dev.w3.org/html5/websockets/#the-websocket-interface
|
|
1285
|
+
function SockJS(url, protocols, options) {
|
|
1286
|
+
if (!_instanceof(this, SockJS)) {
|
|
1287
|
+
return new SockJS(url, protocols, options);
|
|
1288
|
+
}
|
|
1289
|
+
if (arguments.length < 1) {
|
|
1290
|
+
throw new TypeError("Failed to construct 'SockJS: 1 argument required, but only 0 present");
|
|
1291
|
+
}
|
|
1292
|
+
EventTarget.call(this);
|
|
1293
|
+
this.readyState = SockJS.CONNECTING;
|
|
1294
|
+
this.extensions = '';
|
|
1295
|
+
this.protocol = '';
|
|
1296
|
+
// non-standard extension
|
|
1297
|
+
options = options || {};
|
|
1298
|
+
if (options.protocols_whitelist) {
|
|
1299
|
+
log.warn("'protocols_whitelist' is DEPRECATED. Use 'transports' instead.");
|
|
1300
|
+
}
|
|
1301
|
+
this._transportsWhitelist = options.transports;
|
|
1302
|
+
this._transportOptions = options.transportOptions || {};
|
|
1303
|
+
this._timeout = options.timeout || 0;
|
|
1304
|
+
var sessionId = options.sessionId || 8;
|
|
1305
|
+
if (typeof sessionId === 'function') {
|
|
1306
|
+
this._generateSessionId = sessionId;
|
|
1307
|
+
} else if (typeof sessionId === 'number') {
|
|
1308
|
+
this._generateSessionId = function() {
|
|
1309
|
+
return random.string(sessionId);
|
|
1310
|
+
};
|
|
1311
|
+
} else {
|
|
1312
|
+
throw new TypeError('If sessionId is used in the options, it needs to be a number or a function.');
|
|
1313
|
+
}
|
|
1314
|
+
this._server = options.server || random.numberString(1000);
|
|
1315
|
+
// Step 1 of WS spec - parse and validate the url. Issue #8
|
|
1316
|
+
var parsedUrl = new URL(url);
|
|
1317
|
+
if (!parsedUrl.host || !parsedUrl.protocol) {
|
|
1318
|
+
throw new SyntaxError("The URL '" + url + "' is invalid");
|
|
1319
|
+
} else if (parsedUrl.hash) {
|
|
1320
|
+
throw new SyntaxError('The URL must not contain a fragment');
|
|
1321
|
+
} else if (parsedUrl.protocol !== 'http:' && parsedUrl.protocol !== 'https:') {
|
|
1322
|
+
throw new SyntaxError("The URL's scheme must be either 'http:' or 'https:'. '" + parsedUrl.protocol + "' is not allowed.");
|
|
1323
|
+
}
|
|
1324
|
+
var secure = parsedUrl.protocol === 'https:';
|
|
1325
|
+
// Step 2 - don't allow secure origin with an insecure protocol
|
|
1326
|
+
if (loc.protocol === 'https:' && !secure) {
|
|
1327
|
+
// exception is 127.0.0.0/8 and ::1 urls
|
|
1328
|
+
if (!urlUtils.isLoopbackAddr(parsedUrl.hostname)) {
|
|
1329
|
+
throw new Error('SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS');
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
// Step 3 - check port access - no need here
|
|
1333
|
+
// Step 4 - parse protocols argument
|
|
1334
|
+
if (!protocols) {
|
|
1335
|
+
protocols = [];
|
|
1336
|
+
} else if (!Array.isArray(protocols)) {
|
|
1337
|
+
protocols = [
|
|
1338
|
+
protocols
|
|
1339
|
+
];
|
|
1340
|
+
}
|
|
1341
|
+
// Step 5 - check protocols argument
|
|
1342
|
+
var sortedProtocols = protocols.sort();
|
|
1343
|
+
sortedProtocols.forEach(function(proto, i) {
|
|
1344
|
+
if (!proto) {
|
|
1345
|
+
throw new SyntaxError("The protocols entry '" + proto + "' is invalid.");
|
|
1346
|
+
}
|
|
1347
|
+
if (i < sortedProtocols.length - 1 && proto === sortedProtocols[i + 1]) {
|
|
1348
|
+
throw new SyntaxError("The protocols entry '" + proto + "' is duplicated.");
|
|
1349
|
+
}
|
|
1350
|
+
});
|
|
1351
|
+
// Step 6 - convert origin
|
|
1352
|
+
var o = urlUtils.getOrigin(loc.href);
|
|
1353
|
+
this._origin = o ? o.toLowerCase() : null;
|
|
1354
|
+
// remove the trailing slash
|
|
1355
|
+
parsedUrl.set('pathname', parsedUrl.pathname.replace(/\/+$/, ''));
|
|
1356
|
+
// store the sanitized url
|
|
1357
|
+
this.url = parsedUrl.href;
|
|
1358
|
+
debug('using url', this.url);
|
|
1359
|
+
// Step 7 - start connection in background
|
|
1360
|
+
// obtain server info
|
|
1361
|
+
// http://sockjs.github.io/sockjs-protocol/sockjs-protocol-0.3.3.html#section-26
|
|
1362
|
+
this._urlInfo = {
|
|
1363
|
+
nullOrigin: !browser.hasDomain(),
|
|
1364
|
+
sameOrigin: urlUtils.isOriginEqual(this.url, loc.href),
|
|
1365
|
+
sameScheme: urlUtils.isSchemeEqual(this.url, loc.href)
|
|
1366
|
+
};
|
|
1367
|
+
this._ir = new InfoReceiver(this.url, this._urlInfo);
|
|
1368
|
+
this._ir.once('finish', this._receiveInfo.bind(this));
|
|
1369
|
+
}
|
|
1370
|
+
inherits(SockJS, EventTarget);
|
|
1371
|
+
function userSetCode(code) {
|
|
1372
|
+
return code === 1000 || code >= 3000 && code <= 4999;
|
|
1373
|
+
}
|
|
1374
|
+
SockJS.prototype.close = function(code, reason) {
|
|
1375
|
+
// Step 1
|
|
1376
|
+
if (code && !userSetCode(code)) {
|
|
1377
|
+
throw new Error('InvalidAccessError: Invalid code');
|
|
1378
|
+
}
|
|
1379
|
+
// Step 2.4 states the max is 123 bytes, but we are just checking length
|
|
1380
|
+
if (reason && reason.length > 123) {
|
|
1381
|
+
throw new SyntaxError('reason argument has an invalid length');
|
|
1382
|
+
}
|
|
1383
|
+
// Step 3.1
|
|
1384
|
+
if (this.readyState === SockJS.CLOSING || this.readyState === SockJS.CLOSED) {
|
|
1385
|
+
return;
|
|
1386
|
+
}
|
|
1387
|
+
// TODO look at docs to determine how to set this
|
|
1388
|
+
var wasClean = true;
|
|
1389
|
+
this._close(code || 1000, reason || 'Normal closure', wasClean);
|
|
1390
|
+
};
|
|
1391
|
+
SockJS.prototype.send = function(data) {
|
|
1392
|
+
// #13 - convert anything non-string to string
|
|
1393
|
+
// TODO this currently turns objects into [object Object]
|
|
1394
|
+
if (typeof data !== 'string') {
|
|
1395
|
+
data = '' + data;
|
|
1396
|
+
}
|
|
1397
|
+
if (this.readyState === SockJS.CONNECTING) {
|
|
1398
|
+
throw new Error('InvalidStateError: The connection has not been established yet');
|
|
1399
|
+
}
|
|
1400
|
+
if (this.readyState !== SockJS.OPEN) {
|
|
1401
|
+
return;
|
|
1402
|
+
}
|
|
1403
|
+
this._transport.send(escape.quote(data));
|
|
1404
|
+
};
|
|
1405
|
+
SockJS.version = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/version.js");
|
|
1406
|
+
SockJS.CONNECTING = 0;
|
|
1407
|
+
SockJS.OPEN = 1;
|
|
1408
|
+
SockJS.CLOSING = 2;
|
|
1409
|
+
SockJS.CLOSED = 3;
|
|
1410
|
+
SockJS.prototype._receiveInfo = function(info, rtt) {
|
|
1411
|
+
debug('_receiveInfo', rtt);
|
|
1412
|
+
this._ir = null;
|
|
1413
|
+
if (!info) {
|
|
1414
|
+
this._close(1002, 'Cannot connect to server');
|
|
1415
|
+
return;
|
|
1416
|
+
}
|
|
1417
|
+
// establish a round-trip timeout (RTO) based on the
|
|
1418
|
+
// round-trip time (RTT)
|
|
1419
|
+
this._rto = this.countRTO(rtt);
|
|
1420
|
+
// allow server to override url used for the actual transport
|
|
1421
|
+
this._transUrl = info.base_url ? info.base_url : this.url;
|
|
1422
|
+
info = objectUtils.extend(info, this._urlInfo);
|
|
1423
|
+
debug('info', info);
|
|
1424
|
+
// determine list of desired and supported transports
|
|
1425
|
+
var enabledTransports = transports.filterToEnabled(this._transportsWhitelist, info);
|
|
1426
|
+
this._transports = enabledTransports.main;
|
|
1427
|
+
debug(this._transports.length + ' enabled transports');
|
|
1428
|
+
this._connect();
|
|
1429
|
+
};
|
|
1430
|
+
SockJS.prototype._connect = function() {
|
|
1431
|
+
for(var Transport = this._transports.shift(); Transport; Transport = this._transports.shift()){
|
|
1432
|
+
debug('attempt', Transport.transportName);
|
|
1433
|
+
if (Transport.needBody) {
|
|
1434
|
+
if (!__webpack_require__.g.document.body || typeof __webpack_require__.g.document.readyState !== 'undefined' && __webpack_require__.g.document.readyState !== 'complete' && __webpack_require__.g.document.readyState !== 'interactive') {
|
|
1435
|
+
debug('waiting for body');
|
|
1436
|
+
this._transports.unshift(Transport);
|
|
1437
|
+
eventUtils.attachEvent('load', this._connect.bind(this));
|
|
1438
|
+
return;
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
// calculate timeout based on RTO and round trips. Default to 5s
|
|
1442
|
+
var timeoutMs = Math.max(this._timeout, this._rto * Transport.roundTrips || 5000);
|
|
1443
|
+
this._transportTimeoutId = setTimeout(this._transportTimeout.bind(this), timeoutMs);
|
|
1444
|
+
debug('using timeout', timeoutMs);
|
|
1445
|
+
var transportUrl = urlUtils.addPath(this._transUrl, '/' + this._server + '/' + this._generateSessionId());
|
|
1446
|
+
var options = this._transportOptions[Transport.transportName];
|
|
1447
|
+
debug('transport url', transportUrl);
|
|
1448
|
+
var transportObj = new Transport(transportUrl, this._transUrl, options);
|
|
1449
|
+
transportObj.on('message', this._transportMessage.bind(this));
|
|
1450
|
+
transportObj.once('close', this._transportClose.bind(this));
|
|
1451
|
+
transportObj.transportName = Transport.transportName;
|
|
1452
|
+
this._transport = transportObj;
|
|
1453
|
+
return;
|
|
1454
|
+
}
|
|
1455
|
+
this._close(2000, 'All transports failed', false);
|
|
1456
|
+
};
|
|
1457
|
+
SockJS.prototype._transportTimeout = function() {
|
|
1458
|
+
debug('_transportTimeout');
|
|
1459
|
+
if (this.readyState === SockJS.CONNECTING) {
|
|
1460
|
+
if (this._transport) {
|
|
1461
|
+
this._transport.close();
|
|
1462
|
+
}
|
|
1463
|
+
this._transportClose(2007, 'Transport timed out');
|
|
1464
|
+
}
|
|
1465
|
+
};
|
|
1466
|
+
SockJS.prototype._transportMessage = function(msg) {
|
|
1467
|
+
debug('_transportMessage', msg);
|
|
1468
|
+
var self = this, type = msg.slice(0, 1), content = msg.slice(1), payload;
|
|
1469
|
+
// first check for messages that don't need a payload
|
|
1470
|
+
switch(type){
|
|
1471
|
+
case 'o':
|
|
1472
|
+
this._open();
|
|
1473
|
+
return;
|
|
1474
|
+
case 'h':
|
|
1475
|
+
this.dispatchEvent(new Event('heartbeat'));
|
|
1476
|
+
debug('heartbeat', this.transport);
|
|
1477
|
+
return;
|
|
1478
|
+
}
|
|
1479
|
+
if (content) {
|
|
1480
|
+
try {
|
|
1481
|
+
payload = JSON.parse(content);
|
|
1482
|
+
} catch (e) {
|
|
1483
|
+
debug('bad json', content);
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
if (typeof payload === 'undefined') {
|
|
1487
|
+
debug('empty payload', content);
|
|
1488
|
+
return;
|
|
1489
|
+
}
|
|
1490
|
+
switch(type){
|
|
1491
|
+
case 'a':
|
|
1492
|
+
if (Array.isArray(payload)) {
|
|
1493
|
+
payload.forEach(function(p) {
|
|
1494
|
+
debug('message', self.transport, p);
|
|
1495
|
+
self.dispatchEvent(new TransportMessageEvent(p));
|
|
1496
|
+
});
|
|
1497
|
+
}
|
|
1498
|
+
break;
|
|
1499
|
+
case 'm':
|
|
1500
|
+
debug('message', this.transport, payload);
|
|
1501
|
+
this.dispatchEvent(new TransportMessageEvent(payload));
|
|
1502
|
+
break;
|
|
1503
|
+
case 'c':
|
|
1504
|
+
if (Array.isArray(payload) && payload.length === 2) {
|
|
1505
|
+
this._close(payload[0], payload[1], true);
|
|
1506
|
+
}
|
|
1507
|
+
break;
|
|
1508
|
+
}
|
|
1509
|
+
};
|
|
1510
|
+
SockJS.prototype._transportClose = function(code, reason) {
|
|
1511
|
+
debug('_transportClose', this.transport, code, reason);
|
|
1512
|
+
if (this._transport) {
|
|
1513
|
+
this._transport.removeAllListeners();
|
|
1514
|
+
this._transport = null;
|
|
1515
|
+
this.transport = null;
|
|
1516
|
+
}
|
|
1517
|
+
if (!userSetCode(code) && code !== 2000 && this.readyState === SockJS.CONNECTING) {
|
|
1518
|
+
this._connect();
|
|
1519
|
+
return;
|
|
1520
|
+
}
|
|
1521
|
+
this._close(code, reason);
|
|
1522
|
+
};
|
|
1523
|
+
SockJS.prototype._open = function() {
|
|
1524
|
+
debug('_open', this._transport && this._transport.transportName, this.readyState);
|
|
1525
|
+
if (this.readyState === SockJS.CONNECTING) {
|
|
1526
|
+
if (this._transportTimeoutId) {
|
|
1527
|
+
clearTimeout(this._transportTimeoutId);
|
|
1528
|
+
this._transportTimeoutId = null;
|
|
1529
|
+
}
|
|
1530
|
+
this.readyState = SockJS.OPEN;
|
|
1531
|
+
this.transport = this._transport.transportName;
|
|
1532
|
+
this.dispatchEvent(new Event('open'));
|
|
1533
|
+
debug('connected', this.transport);
|
|
1534
|
+
} else {
|
|
1535
|
+
// The server might have been restarted, and lost track of our
|
|
1536
|
+
// connection.
|
|
1537
|
+
this._close(1006, 'Server lost session');
|
|
1538
|
+
}
|
|
1539
|
+
};
|
|
1540
|
+
SockJS.prototype._close = function(code, reason, wasClean) {
|
|
1541
|
+
debug('_close', this.transport, code, reason, wasClean, this.readyState);
|
|
1542
|
+
var forceFail = false;
|
|
1543
|
+
if (this._ir) {
|
|
1544
|
+
forceFail = true;
|
|
1545
|
+
this._ir.close();
|
|
1546
|
+
this._ir = null;
|
|
1547
|
+
}
|
|
1548
|
+
if (this._transport) {
|
|
1549
|
+
this._transport.close();
|
|
1550
|
+
this._transport = null;
|
|
1551
|
+
this.transport = null;
|
|
1552
|
+
}
|
|
1553
|
+
if (this.readyState === SockJS.CLOSED) {
|
|
1554
|
+
throw new Error('InvalidStateError: SockJS has already been closed');
|
|
1555
|
+
}
|
|
1556
|
+
this.readyState = SockJS.CLOSING;
|
|
1557
|
+
setTimeout((function() {
|
|
1558
|
+
this.readyState = SockJS.CLOSED;
|
|
1559
|
+
if (forceFail) {
|
|
1560
|
+
this.dispatchEvent(new Event('error'));
|
|
1561
|
+
}
|
|
1562
|
+
var e = new CloseEvent('close');
|
|
1563
|
+
e.wasClean = wasClean || false;
|
|
1564
|
+
e.code = code || 1000;
|
|
1565
|
+
e.reason = reason;
|
|
1566
|
+
this.dispatchEvent(e);
|
|
1567
|
+
this.onmessage = this.onclose = this.onerror = null;
|
|
1568
|
+
debug('disconnected');
|
|
1569
|
+
}).bind(this), 0);
|
|
1570
|
+
};
|
|
1571
|
+
// See: http://www.erg.abdn.ac.uk/~gerrit/dccp/notes/ccid2/rto_estimator/
|
|
1572
|
+
// and RFC 2988.
|
|
1573
|
+
SockJS.prototype.countRTO = function(rtt) {
|
|
1574
|
+
// In a local environment, when using IE8/9 and the `jsonp-polling`
|
|
1575
|
+
// transport the time needed to establish a connection (the time that pass
|
|
1576
|
+
// from the opening of the transport to the call of `_dispatchOpen`) is
|
|
1577
|
+
// around 200msec (the lower bound used in the article above) and this
|
|
1578
|
+
// causes spurious timeouts. For this reason we calculate a value slightly
|
|
1579
|
+
// larger than that used in the article.
|
|
1580
|
+
if (rtt > 100) {
|
|
1581
|
+
return 4 * rtt; // rto > 400msec
|
|
1582
|
+
}
|
|
1583
|
+
return 300 + rtt; // 300msec < rto <= 400msec
|
|
1584
|
+
};
|
|
1585
|
+
module.exports = function(availableTransports) {
|
|
1586
|
+
transports = transport(availableTransports);
|
|
1587
|
+
__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/iframe-bootstrap.js")(SockJS, availableTransports);
|
|
1588
|
+
return SockJS;
|
|
1589
|
+
};
|
|
1590
|
+
|
|
1591
|
+
|
|
1592
|
+
}),
|
|
1593
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/shims.js": (function () {
|
|
1594
|
+
"use strict";
|
|
1595
|
+
/* eslint-disable */ /* jscs: disable */
|
|
1596
|
+
function _instanceof(left, right) {
|
|
1597
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
1598
|
+
return !!right[Symbol.hasInstance](left);
|
|
1599
|
+
} else {
|
|
1600
|
+
return left instanceof right;
|
|
1601
|
+
}
|
|
1602
|
+
}
|
|
1603
|
+
function _type_of(obj) {
|
|
1604
|
+
"@swc/helpers - typeof";
|
|
1605
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
1606
|
+
}
|
|
1607
|
+
// pulled specific shims from https://github.com/es-shims/es5-shim
|
|
1608
|
+
var ArrayPrototype = Array.prototype;
|
|
1609
|
+
var ObjectPrototype = Object.prototype;
|
|
1610
|
+
var FunctionPrototype = Function.prototype;
|
|
1611
|
+
var StringPrototype = String.prototype;
|
|
1612
|
+
var array_slice = ArrayPrototype.slice;
|
|
1613
|
+
var _toString = ObjectPrototype.toString;
|
|
1614
|
+
var isFunction = function isFunction(val) {
|
|
1615
|
+
return ObjectPrototype.toString.call(val) === '[object Function]';
|
|
1616
|
+
};
|
|
1617
|
+
var isArray = function isArray(obj) {
|
|
1618
|
+
return _toString.call(obj) === '[object Array]';
|
|
1619
|
+
};
|
|
1620
|
+
var isString = function isString(obj) {
|
|
1621
|
+
return _toString.call(obj) === '[object String]';
|
|
1622
|
+
};
|
|
1623
|
+
var supportsDescriptors = Object.defineProperty && function() {
|
|
1624
|
+
try {
|
|
1625
|
+
Object.defineProperty({}, 'x', {});
|
|
1626
|
+
return true;
|
|
1627
|
+
} catch (e) {
|
|
1628
|
+
return false;
|
|
1629
|
+
}
|
|
1630
|
+
}();
|
|
1631
|
+
// Define configurable, writable and non-enumerable props
|
|
1632
|
+
// if they don't exist.
|
|
1633
|
+
var defineProperty;
|
|
1634
|
+
if (supportsDescriptors) {
|
|
1635
|
+
defineProperty = function defineProperty(object, name, method, forceAssign) {
|
|
1636
|
+
if (!forceAssign && name in object) {
|
|
1637
|
+
return;
|
|
1638
|
+
}
|
|
1639
|
+
Object.defineProperty(object, name, {
|
|
1640
|
+
configurable: true,
|
|
1641
|
+
enumerable: false,
|
|
1642
|
+
writable: true,
|
|
1643
|
+
value: method
|
|
1644
|
+
});
|
|
1645
|
+
};
|
|
1646
|
+
} else {
|
|
1647
|
+
defineProperty = function defineProperty(object, name, method, forceAssign) {
|
|
1648
|
+
if (!forceAssign && name in object) {
|
|
1649
|
+
return;
|
|
1650
|
+
}
|
|
1651
|
+
object[name] = method;
|
|
1652
|
+
};
|
|
1653
|
+
}
|
|
1654
|
+
var defineProperties = function defineProperties(object, map, forceAssign) {
|
|
1655
|
+
for(var name in map){
|
|
1656
|
+
if (ObjectPrototype.hasOwnProperty.call(map, name)) {
|
|
1657
|
+
defineProperty(object, name, map[name], forceAssign);
|
|
1658
|
+
}
|
|
1659
|
+
}
|
|
1660
|
+
};
|
|
1661
|
+
var toObject = function toObject(o) {
|
|
1662
|
+
if (o == null) {
|
|
1663
|
+
throw new TypeError("can't convert " + o + ' to object');
|
|
1664
|
+
}
|
|
1665
|
+
return Object(o);
|
|
1666
|
+
};
|
|
1667
|
+
//
|
|
1668
|
+
// Util
|
|
1669
|
+
// ======
|
|
1670
|
+
//
|
|
1671
|
+
// ES5 9.4
|
|
1672
|
+
// http://es5.github.com/#x9.4
|
|
1673
|
+
// http://jsperf.com/to-integer
|
|
1674
|
+
function toInteger(num) {
|
|
1675
|
+
var n = +num;
|
|
1676
|
+
if (n !== n) {
|
|
1677
|
+
n = 0;
|
|
1678
|
+
} else if (n !== 0 && n !== 1 / 0 && n !== -1 / 0) {
|
|
1679
|
+
n = (n > 0 || -1) * Math.floor(Math.abs(n));
|
|
1680
|
+
}
|
|
1681
|
+
return n;
|
|
1682
|
+
}
|
|
1683
|
+
function ToUint32(x) {
|
|
1684
|
+
return x >>> 0;
|
|
1685
|
+
}
|
|
1686
|
+
//
|
|
1687
|
+
// Function
|
|
1688
|
+
// ========
|
|
1689
|
+
//
|
|
1690
|
+
// ES-5 15.3.4.5
|
|
1691
|
+
// http://es5.github.com/#x15.3.4.5
|
|
1692
|
+
function Empty() {}
|
|
1693
|
+
defineProperties(FunctionPrototype, {
|
|
1694
|
+
bind: function bind(that) {
|
|
1695
|
+
// 1. Let Target be the this value.
|
|
1696
|
+
var target = this;
|
|
1697
|
+
// 2. If IsCallable(Target) is false, throw a TypeError exception.
|
|
1698
|
+
if (!isFunction(target)) {
|
|
1699
|
+
throw new TypeError('Function.prototype.bind called on incompatible ' + target);
|
|
1700
|
+
}
|
|
1701
|
+
// 3. Let A be a new (possibly empty) internal list of all of the
|
|
1702
|
+
// argument values provided after thisArg (arg1, arg2 etc), in order.
|
|
1703
|
+
// XXX slicedArgs will stand in for "A" if used
|
|
1704
|
+
var args = array_slice.call(arguments, 1); // for normal call
|
|
1705
|
+
// 4. Let F be a new native ECMAScript object.
|
|
1706
|
+
// 11. Set the [[Prototype]] internal property of F to the standard
|
|
1707
|
+
// built-in Function prototype object as specified in 15.3.3.1.
|
|
1708
|
+
// 12. Set the [[Call]] internal property of F as described in
|
|
1709
|
+
// 15.3.4.5.1.
|
|
1710
|
+
// 13. Set the [[Construct]] internal property of F as described in
|
|
1711
|
+
// 15.3.4.5.2.
|
|
1712
|
+
// 14. Set the [[HasInstance]] internal property of F as described in
|
|
1713
|
+
// 15.3.4.5.3.
|
|
1714
|
+
var binder = function binder() {
|
|
1715
|
+
if (_instanceof(this, bound)) {
|
|
1716
|
+
// 15.3.4.5.2 [[Construct]]
|
|
1717
|
+
// When the [[Construct]] internal method of a function object,
|
|
1718
|
+
// F that was created using the bind function is called with a
|
|
1719
|
+
// list of arguments ExtraArgs, the following steps are taken:
|
|
1720
|
+
// 1. Let target be the value of F's [[TargetFunction]]
|
|
1721
|
+
// internal property.
|
|
1722
|
+
// 2. If target has no [[Construct]] internal method, a
|
|
1723
|
+
// TypeError exception is thrown.
|
|
1724
|
+
// 3. Let boundArgs be the value of F's [[BoundArgs]] internal
|
|
1725
|
+
// property.
|
|
1726
|
+
// 4. Let args be a new list containing the same values as the
|
|
1727
|
+
// list boundArgs in the same order followed by the same
|
|
1728
|
+
// values as the list ExtraArgs in the same order.
|
|
1729
|
+
// 5. Return the result of calling the [[Construct]] internal
|
|
1730
|
+
// method of target providing args as the arguments.
|
|
1731
|
+
var result = target.apply(this, args.concat(array_slice.call(arguments)));
|
|
1732
|
+
if (Object(result) === result) {
|
|
1733
|
+
return result;
|
|
1734
|
+
}
|
|
1735
|
+
return this;
|
|
1736
|
+
} else {
|
|
1737
|
+
// 15.3.4.5.1 [[Call]]
|
|
1738
|
+
// When the [[Call]] internal method of a function object, F,
|
|
1739
|
+
// which was created using the bind function is called with a
|
|
1740
|
+
// this value and a list of arguments ExtraArgs, the following
|
|
1741
|
+
// steps are taken:
|
|
1742
|
+
// 1. Let boundArgs be the value of F's [[BoundArgs]] internal
|
|
1743
|
+
// property.
|
|
1744
|
+
// 2. Let boundThis be the value of F's [[BoundThis]] internal
|
|
1745
|
+
// property.
|
|
1746
|
+
// 3. Let target be the value of F's [[TargetFunction]] internal
|
|
1747
|
+
// property.
|
|
1748
|
+
// 4. Let args be a new list containing the same values as the
|
|
1749
|
+
// list boundArgs in the same order followed by the same
|
|
1750
|
+
// values as the list ExtraArgs in the same order.
|
|
1751
|
+
// 5. Return the result of calling the [[Call]] internal method
|
|
1752
|
+
// of target providing boundThis as the this value and
|
|
1753
|
+
// providing args as the arguments.
|
|
1754
|
+
// equiv: target.call(this, ...boundArgs, ...args)
|
|
1755
|
+
return target.apply(that, args.concat(array_slice.call(arguments)));
|
|
1756
|
+
}
|
|
1757
|
+
};
|
|
1758
|
+
// 15. If the [[Class]] internal property of Target is "Function", then
|
|
1759
|
+
// a. Let L be the length property of Target minus the length of A.
|
|
1760
|
+
// b. Set the length own property of F to either 0 or L, whichever is
|
|
1761
|
+
// larger.
|
|
1762
|
+
// 16. Else set the length own property of F to 0.
|
|
1763
|
+
var boundLength = Math.max(0, target.length - args.length);
|
|
1764
|
+
// 17. Set the attributes of the length own property of F to the values
|
|
1765
|
+
// specified in 15.3.5.1.
|
|
1766
|
+
var boundArgs = [];
|
|
1767
|
+
for(var i = 0; i < boundLength; i++){
|
|
1768
|
+
boundArgs.push('$' + i);
|
|
1769
|
+
}
|
|
1770
|
+
// XXX Build a dynamic function with desired amount of arguments is the only
|
|
1771
|
+
// way to set the length property of a function.
|
|
1772
|
+
// In environments where Content Security Policies enabled (Chrome extensions,
|
|
1773
|
+
// for ex.) all use of eval or Function costructor throws an exception.
|
|
1774
|
+
// However in all of these environments Function.prototype.bind exists
|
|
1775
|
+
// and so this code will never be executed.
|
|
1776
|
+
var bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this, arguments); }')(binder);
|
|
1777
|
+
if (target.prototype) {
|
|
1778
|
+
Empty.prototype = target.prototype;
|
|
1779
|
+
bound.prototype = new Empty();
|
|
1780
|
+
// Clean up dangling references.
|
|
1781
|
+
Empty.prototype = null;
|
|
1782
|
+
}
|
|
1783
|
+
// TODO
|
|
1784
|
+
// 18. Set the [[Extensible]] internal property of F to true.
|
|
1785
|
+
// TODO
|
|
1786
|
+
// 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).
|
|
1787
|
+
// 20. Call the [[DefineOwnProperty]] internal method of F with
|
|
1788
|
+
// arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]:
|
|
1789
|
+
// thrower, [[Enumerable]]: false, [[Configurable]]: false}, and
|
|
1790
|
+
// false.
|
|
1791
|
+
// 21. Call the [[DefineOwnProperty]] internal method of F with
|
|
1792
|
+
// arguments "arguments", PropertyDescriptor {[[Get]]: thrower,
|
|
1793
|
+
// [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},
|
|
1794
|
+
// and false.
|
|
1795
|
+
// TODO
|
|
1796
|
+
// NOTE Function objects created using Function.prototype.bind do not
|
|
1797
|
+
// have a prototype property or the [[Code]], [[FormalParameters]], and
|
|
1798
|
+
// [[Scope]] internal properties.
|
|
1799
|
+
// XXX can't delete prototype in pure-js.
|
|
1800
|
+
// 22. Return F.
|
|
1801
|
+
return bound;
|
|
1802
|
+
}
|
|
1803
|
+
});
|
|
1804
|
+
//
|
|
1805
|
+
// Array
|
|
1806
|
+
// =====
|
|
1807
|
+
//
|
|
1808
|
+
// ES5 15.4.3.2
|
|
1809
|
+
// http://es5.github.com/#x15.4.3.2
|
|
1810
|
+
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray
|
|
1811
|
+
defineProperties(Array, {
|
|
1812
|
+
isArray: isArray
|
|
1813
|
+
});
|
|
1814
|
+
var boxedString = Object('a');
|
|
1815
|
+
var splitString = boxedString[0] !== 'a' || !(0 in boxedString);
|
|
1816
|
+
var properlyBoxesContext = function properlyBoxed(method) {
|
|
1817
|
+
// Check node 0.6.21 bug where third parameter is not boxed
|
|
1818
|
+
var properlyBoxesNonStrict = true;
|
|
1819
|
+
var properlyBoxesStrict = true;
|
|
1820
|
+
if (method) {
|
|
1821
|
+
method.call('foo', function(_, __, context) {
|
|
1822
|
+
if ((typeof context === "undefined" ? "undefined" : _type_of(context)) !== 'object') {
|
|
1823
|
+
properlyBoxesNonStrict = false;
|
|
1824
|
+
}
|
|
1825
|
+
});
|
|
1826
|
+
method.call([
|
|
1827
|
+
1
|
|
1828
|
+
], function() {
|
|
1829
|
+
'use strict';
|
|
1830
|
+
properlyBoxesStrict = typeof this === 'string';
|
|
1831
|
+
}, 'x');
|
|
1832
|
+
}
|
|
1833
|
+
return !!method && properlyBoxesNonStrict && properlyBoxesStrict;
|
|
1834
|
+
};
|
|
1835
|
+
defineProperties(ArrayPrototype, {
|
|
1836
|
+
forEach: function forEach(fun /*, thisp*/ ) {
|
|
1837
|
+
var object = toObject(this), self = splitString && isString(this) ? this.split('') : object, thisp = arguments[1], i = -1, length = self.length >>> 0;
|
|
1838
|
+
// If no callback function or if callback is not a callable function
|
|
1839
|
+
if (!isFunction(fun)) {
|
|
1840
|
+
throw new TypeError(); // TODO message
|
|
1841
|
+
}
|
|
1842
|
+
while(++i < length){
|
|
1843
|
+
if (i in self) {
|
|
1844
|
+
// Invoke the callback function with call, passing arguments:
|
|
1845
|
+
// context, property value, property key, thisArg object
|
|
1846
|
+
// context
|
|
1847
|
+
fun.call(thisp, self[i], i, object);
|
|
1848
|
+
}
|
|
1849
|
+
}
|
|
1850
|
+
}
|
|
1851
|
+
}, !properlyBoxesContext(ArrayPrototype.forEach));
|
|
1852
|
+
// ES5 15.4.4.14
|
|
1853
|
+
// http://es5.github.com/#x15.4.4.14
|
|
1854
|
+
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf
|
|
1855
|
+
var hasFirefox2IndexOfBug = Array.prototype.indexOf && [
|
|
1856
|
+
0,
|
|
1857
|
+
1
|
|
1858
|
+
].indexOf(1, 2) !== -1;
|
|
1859
|
+
defineProperties(ArrayPrototype, {
|
|
1860
|
+
indexOf: function indexOf(sought /*, fromIndex */ ) {
|
|
1861
|
+
var self = splitString && isString(this) ? this.split('') : toObject(this), length = self.length >>> 0;
|
|
1862
|
+
if (!length) {
|
|
1863
|
+
return -1;
|
|
1864
|
+
}
|
|
1865
|
+
var i = 0;
|
|
1866
|
+
if (arguments.length > 1) {
|
|
1867
|
+
i = toInteger(arguments[1]);
|
|
1868
|
+
}
|
|
1869
|
+
// handle negative indices
|
|
1870
|
+
i = i >= 0 ? i : Math.max(0, length + i);
|
|
1871
|
+
for(; i < length; i++){
|
|
1872
|
+
if (i in self && self[i] === sought) {
|
|
1873
|
+
return i;
|
|
1874
|
+
}
|
|
1875
|
+
}
|
|
1876
|
+
return -1;
|
|
1877
|
+
}
|
|
1878
|
+
}, hasFirefox2IndexOfBug);
|
|
1879
|
+
//
|
|
1880
|
+
// String
|
|
1881
|
+
// ======
|
|
1882
|
+
//
|
|
1883
|
+
// ES5 15.5.4.14
|
|
1884
|
+
// http://es5.github.com/#x15.5.4.14
|
|
1885
|
+
// [bugfix, IE lt 9, firefox 4, Konqueror, Opera, obscure browsers]
|
|
1886
|
+
// Many browsers do not split properly with regular expressions or they
|
|
1887
|
+
// do not perform the split correctly under obscure conditions.
|
|
1888
|
+
// See http://blog.stevenlevithan.com/archives/cross-browser-split
|
|
1889
|
+
// I've tested in many browsers and this seems to cover the deviant ones:
|
|
1890
|
+
// 'ab'.split(/(?:ab)*/) should be ["", ""], not [""]
|
|
1891
|
+
// '.'.split(/(.?)(.?)/) should be ["", ".", "", ""], not ["", ""]
|
|
1892
|
+
// 'tesst'.split(/(s)*/) should be ["t", undefined, "e", "s", "t"], not
|
|
1893
|
+
// [undefined, "t", undefined, "e", ...]
|
|
1894
|
+
// ''.split(/.?/) should be [], not [""]
|
|
1895
|
+
// '.'.split(/()()/) should be ["."], not ["", "", "."]
|
|
1896
|
+
var string_split = StringPrototype.split;
|
|
1897
|
+
if ('ab'.split(/(?:ab)*/).length !== 2 || '.'.split(/(.?)(.?)/).length !== 4 || 'tesst'.split(/(s)*/)[1] === 't' || 'test'.split(/(?:)/, -1).length !== 4 || ''.split(/.?/).length || '.'.split(/()()/).length > 1) {
|
|
1898
|
+
(function() {
|
|
1899
|
+
var compliantExecNpcg = /()??/.exec('')[1] === void 0; // NPCG: nonparticipating capturing group
|
|
1900
|
+
StringPrototype.split = function(separator, limit) {
|
|
1901
|
+
var string = this;
|
|
1902
|
+
if (separator === void 0 && limit === 0) {
|
|
1903
|
+
return [];
|
|
1904
|
+
}
|
|
1905
|
+
// If `separator` is not a regex, use native split
|
|
1906
|
+
if (_toString.call(separator) !== '[object RegExp]') {
|
|
1907
|
+
return string_split.call(this, separator, limit);
|
|
1908
|
+
}
|
|
1909
|
+
var output = [], flags = (separator.ignoreCase ? 'i' : '') + (separator.multiline ? 'm' : '') + (separator.extended ? 'x' : '') + // Proposed for ES6
|
|
1910
|
+
(separator.sticky ? 'y' : ''), lastLastIndex = 0, // Make `global` and avoid `lastIndex` issues by working with a copy
|
|
1911
|
+
separator2, match, lastIndex, lastLength;
|
|
1912
|
+
separator = new RegExp(separator.source, flags + 'g');
|
|
1913
|
+
string += ''; // Type-convert
|
|
1914
|
+
if (!compliantExecNpcg) {
|
|
1915
|
+
// Doesn't need flags gy, but they don't hurt
|
|
1916
|
+
separator2 = new RegExp('^' + separator.source + '$(?!\\s)', flags);
|
|
1917
|
+
}
|
|
1918
|
+
/* Values for `limit`, per the spec:
|
|
1919
|
+
* If undefined: 4294967295 // Math.pow(2, 32) - 1
|
|
1920
|
+
* If 0, Infinity, or NaN: 0
|
|
1921
|
+
* If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296;
|
|
1922
|
+
* If negative number: 4294967296 - Math.floor(Math.abs(limit))
|
|
1923
|
+
* If other: Type-convert, then use the above rules
|
|
1924
|
+
*/ limit = limit === void 0 ? -1 >>> 0 : ToUint32(limit);
|
|
1925
|
+
while(match = separator.exec(string)){
|
|
1926
|
+
// `separator.lastIndex` is not reliable cross-browser
|
|
1927
|
+
lastIndex = match.index + match[0].length;
|
|
1928
|
+
if (lastIndex > lastLastIndex) {
|
|
1929
|
+
output.push(string.slice(lastLastIndex, match.index));
|
|
1930
|
+
// Fix browsers whose `exec` methods don't consistently return `undefined` for
|
|
1931
|
+
// nonparticipating capturing groups
|
|
1932
|
+
if (!compliantExecNpcg && match.length > 1) {
|
|
1933
|
+
match[0].replace(separator2, function() {
|
|
1934
|
+
for(var i = 1; i < arguments.length - 2; i++){
|
|
1935
|
+
if (arguments[i] === void 0) {
|
|
1936
|
+
match[i] = void 0;
|
|
1937
|
+
}
|
|
1938
|
+
}
|
|
1939
|
+
});
|
|
1940
|
+
}
|
|
1941
|
+
if (match.length > 1 && match.index < string.length) {
|
|
1942
|
+
ArrayPrototype.push.apply(output, match.slice(1));
|
|
1943
|
+
}
|
|
1944
|
+
lastLength = match[0].length;
|
|
1945
|
+
lastLastIndex = lastIndex;
|
|
1946
|
+
if (output.length >= limit) {
|
|
1947
|
+
break;
|
|
1948
|
+
}
|
|
1949
|
+
}
|
|
1950
|
+
if (separator.lastIndex === match.index) {
|
|
1951
|
+
separator.lastIndex++; // Avoid an infinite loop
|
|
1952
|
+
}
|
|
1953
|
+
}
|
|
1954
|
+
if (lastLastIndex === string.length) {
|
|
1955
|
+
if (lastLength || !separator.test('')) {
|
|
1956
|
+
output.push('');
|
|
1957
|
+
}
|
|
1958
|
+
} else {
|
|
1959
|
+
output.push(string.slice(lastLastIndex));
|
|
1960
|
+
}
|
|
1961
|
+
return output.length > limit ? output.slice(0, limit) : output;
|
|
1962
|
+
};
|
|
1963
|
+
})();
|
|
1964
|
+
// [bugfix, chrome]
|
|
1965
|
+
// If separator is undefined, then the result array contains just one String,
|
|
1966
|
+
// which is the this value (converted to a String). If limit is not undefined,
|
|
1967
|
+
// then the output array is truncated so that it contains no more than limit
|
|
1968
|
+
// elements.
|
|
1969
|
+
// "0".split(undefined, 0) -> []
|
|
1970
|
+
} else if ('0'.split(void 0, 0).length) {
|
|
1971
|
+
StringPrototype.split = function split(separator, limit) {
|
|
1972
|
+
if (separator === void 0 && limit === 0) {
|
|
1973
|
+
return [];
|
|
1974
|
+
}
|
|
1975
|
+
return string_split.call(this, separator, limit);
|
|
1976
|
+
};
|
|
1977
|
+
}
|
|
1978
|
+
// ECMA-262, 3rd B.2.3
|
|
1979
|
+
// Not an ECMAScript standard, although ECMAScript 3rd Edition has a
|
|
1980
|
+
// non-normative section suggesting uniform semantics and it should be
|
|
1981
|
+
// normalized across all browsers
|
|
1982
|
+
// [bugfix, IE lt 9] IE < 9 substr() with negative value not working in IE
|
|
1983
|
+
var string_substr = StringPrototype.substr;
|
|
1984
|
+
var hasNegativeSubstrBug = ''.substr && '0b'.substr(-1) !== 'b';
|
|
1985
|
+
defineProperties(StringPrototype, {
|
|
1986
|
+
substr: function substr(start, length) {
|
|
1987
|
+
return string_substr.call(this, start < 0 ? (start = this.length + start) < 0 ? 0 : start : start, length);
|
|
1988
|
+
}
|
|
1989
|
+
}, hasNegativeSubstrBug);
|
|
1990
|
+
|
|
1991
|
+
|
|
1992
|
+
}),
|
|
1993
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport-list.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
1994
|
+
"use strict";
|
|
1995
|
+
|
|
1996
|
+
module.exports = [
|
|
1997
|
+
// streaming transports
|
|
1998
|
+
__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/websocket.js"),
|
|
1999
|
+
__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/xhr-streaming.js"),
|
|
2000
|
+
__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/xdr-streaming.js"),
|
|
2001
|
+
__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/eventsource.js"),
|
|
2002
|
+
__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js")(__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/eventsource.js")),
|
|
2003
|
+
__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/htmlfile.js"),
|
|
2004
|
+
__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js")(__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/htmlfile.js")),
|
|
2005
|
+
__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/xhr-polling.js"),
|
|
2006
|
+
__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/xdr-polling.js"),
|
|
2007
|
+
__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js")(__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/xhr-polling.js")),
|
|
2008
|
+
__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/jsonp-polling.js")
|
|
2009
|
+
];
|
|
2010
|
+
|
|
2011
|
+
|
|
2012
|
+
}),
|
|
2013
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/browser/abstract-xhr.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
2014
|
+
"use strict";
|
|
2015
|
+
|
|
2016
|
+
var EventEmitter = (__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/event/emitter.js")/* .EventEmitter */.EventEmitter), inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), utils = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/event.js"), urlUtils = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/url.js"), XHR = __webpack_require__.g.XMLHttpRequest;
|
|
2017
|
+
var debug = function debug() {};
|
|
2018
|
+
if (true) {
|
|
2019
|
+
debug = __webpack_require__("../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js")('sockjs-client:browser:xhr');
|
|
2020
|
+
}
|
|
2021
|
+
function AbstractXHRObject(method, url, payload, opts) {
|
|
2022
|
+
debug(method, url);
|
|
2023
|
+
var self = this;
|
|
2024
|
+
EventEmitter.call(this);
|
|
2025
|
+
setTimeout(function() {
|
|
2026
|
+
self._start(method, url, payload, opts);
|
|
2027
|
+
}, 0);
|
|
2028
|
+
}
|
|
2029
|
+
inherits(AbstractXHRObject, EventEmitter);
|
|
2030
|
+
AbstractXHRObject.prototype._start = function(method, url, payload, opts) {
|
|
2031
|
+
var self = this;
|
|
2032
|
+
try {
|
|
2033
|
+
this.xhr = new XHR();
|
|
2034
|
+
} catch (x) {
|
|
2035
|
+
// intentionally empty
|
|
2036
|
+
}
|
|
2037
|
+
if (!this.xhr) {
|
|
2038
|
+
debug('no xhr');
|
|
2039
|
+
this.emit('finish', 0, 'no xhr support');
|
|
2040
|
+
this._cleanup();
|
|
2041
|
+
return;
|
|
2042
|
+
}
|
|
2043
|
+
// several browsers cache POSTs
|
|
2044
|
+
url = urlUtils.addQuery(url, 't=' + +new Date());
|
|
2045
|
+
// Explorer tends to keep connection open, even after the
|
|
2046
|
+
// tab gets closed: http://bugs.jquery.com/ticket/5280
|
|
2047
|
+
this.unloadRef = utils.unloadAdd(function() {
|
|
2048
|
+
debug('unload cleanup');
|
|
2049
|
+
self._cleanup(true);
|
|
2050
|
+
});
|
|
2051
|
+
try {
|
|
2052
|
+
this.xhr.open(method, url, true);
|
|
2053
|
+
if (this.timeout && 'timeout' in this.xhr) {
|
|
2054
|
+
this.xhr.timeout = this.timeout;
|
|
2055
|
+
this.xhr.ontimeout = function() {
|
|
2056
|
+
debug('xhr timeout');
|
|
2057
|
+
self.emit('finish', 0, '');
|
|
2058
|
+
self._cleanup(false);
|
|
2059
|
+
};
|
|
2060
|
+
}
|
|
2061
|
+
} catch (e) {
|
|
2062
|
+
debug('exception', e);
|
|
2063
|
+
// IE raises an exception on wrong port.
|
|
2064
|
+
this.emit('finish', 0, '');
|
|
2065
|
+
this._cleanup(false);
|
|
2066
|
+
return;
|
|
2067
|
+
}
|
|
2068
|
+
if ((!opts || !opts.noCredentials) && AbstractXHRObject.supportsCORS) {
|
|
2069
|
+
debug('withCredentials');
|
|
2070
|
+
// Mozilla docs says https://developer.mozilla.org/en/XMLHttpRequest :
|
|
2071
|
+
// "This never affects same-site requests."
|
|
2072
|
+
this.xhr.withCredentials = true;
|
|
2073
|
+
}
|
|
2074
|
+
if (opts && opts.headers) {
|
|
2075
|
+
for(var key in opts.headers){
|
|
2076
|
+
this.xhr.setRequestHeader(key, opts.headers[key]);
|
|
2077
|
+
}
|
|
2078
|
+
}
|
|
2079
|
+
this.xhr.onreadystatechange = function() {
|
|
2080
|
+
if (self.xhr) {
|
|
2081
|
+
var x = self.xhr;
|
|
2082
|
+
var text, status;
|
|
2083
|
+
debug('readyState', x.readyState);
|
|
2084
|
+
switch(x.readyState){
|
|
2085
|
+
case 3:
|
|
2086
|
+
// IE doesn't like peeking into responseText or status
|
|
2087
|
+
// on Microsoft.XMLHTTP and readystate=3
|
|
2088
|
+
try {
|
|
2089
|
+
status = x.status;
|
|
2090
|
+
text = x.responseText;
|
|
2091
|
+
} catch (e) {
|
|
2092
|
+
// intentionally empty
|
|
2093
|
+
}
|
|
2094
|
+
debug('status', status);
|
|
2095
|
+
// IE returns 1223 for 204: http://bugs.jquery.com/ticket/1450
|
|
2096
|
+
if (status === 1223) {
|
|
2097
|
+
status = 204;
|
|
2098
|
+
}
|
|
2099
|
+
// IE does return readystate == 3 for 404 answers.
|
|
2100
|
+
if (status === 200 && text && text.length > 0) {
|
|
2101
|
+
debug('chunk');
|
|
2102
|
+
self.emit('chunk', status, text);
|
|
2103
|
+
}
|
|
2104
|
+
break;
|
|
2105
|
+
case 4:
|
|
2106
|
+
status = x.status;
|
|
2107
|
+
debug('status', status);
|
|
2108
|
+
// IE returns 1223 for 204: http://bugs.jquery.com/ticket/1450
|
|
2109
|
+
if (status === 1223) {
|
|
2110
|
+
status = 204;
|
|
2111
|
+
}
|
|
2112
|
+
// IE returns this for a bad port
|
|
2113
|
+
// http://msdn.microsoft.com/en-us/library/windows/desktop/aa383770(v=vs.85).aspx
|
|
2114
|
+
if (status === 12005 || status === 12029) {
|
|
2115
|
+
status = 0;
|
|
2116
|
+
}
|
|
2117
|
+
debug('finish', status, x.responseText);
|
|
2118
|
+
self.emit('finish', status, x.responseText);
|
|
2119
|
+
self._cleanup(false);
|
|
2120
|
+
break;
|
|
2121
|
+
}
|
|
2122
|
+
}
|
|
2123
|
+
};
|
|
2124
|
+
try {
|
|
2125
|
+
self.xhr.send(payload);
|
|
2126
|
+
} catch (e) {
|
|
2127
|
+
self.emit('finish', 0, '');
|
|
2128
|
+
self._cleanup(false);
|
|
2129
|
+
}
|
|
2130
|
+
};
|
|
2131
|
+
AbstractXHRObject.prototype._cleanup = function(abort) {
|
|
2132
|
+
debug('cleanup');
|
|
2133
|
+
if (!this.xhr) {
|
|
2134
|
+
return;
|
|
2135
|
+
}
|
|
2136
|
+
this.removeAllListeners();
|
|
2137
|
+
utils.unloadDel(this.unloadRef);
|
|
2138
|
+
// IE needs this field to be a function
|
|
2139
|
+
this.xhr.onreadystatechange = function() {};
|
|
2140
|
+
if (this.xhr.ontimeout) {
|
|
2141
|
+
this.xhr.ontimeout = null;
|
|
2142
|
+
}
|
|
2143
|
+
if (abort) {
|
|
2144
|
+
try {
|
|
2145
|
+
this.xhr.abort();
|
|
2146
|
+
} catch (x) {
|
|
2147
|
+
// intentionally empty
|
|
2148
|
+
}
|
|
2149
|
+
}
|
|
2150
|
+
this.unloadRef = this.xhr = null;
|
|
2151
|
+
};
|
|
2152
|
+
AbstractXHRObject.prototype.close = function() {
|
|
2153
|
+
debug('close');
|
|
2154
|
+
this._cleanup(true);
|
|
2155
|
+
};
|
|
2156
|
+
AbstractXHRObject.enabled = !!XHR;
|
|
2157
|
+
// override XMLHttpRequest for IE6/7
|
|
2158
|
+
// obfuscate to avoid firewalls
|
|
2159
|
+
var axo = [
|
|
2160
|
+
'Active'
|
|
2161
|
+
].concat('Object').join('X');
|
|
2162
|
+
if (!AbstractXHRObject.enabled && axo in __webpack_require__.g) {
|
|
2163
|
+
debug('overriding xmlhttprequest');
|
|
2164
|
+
XHR = function XHR() {
|
|
2165
|
+
try {
|
|
2166
|
+
return new __webpack_require__.g[axo]('Microsoft.XMLHTTP');
|
|
2167
|
+
} catch (e) {
|
|
2168
|
+
return null;
|
|
2169
|
+
}
|
|
2170
|
+
};
|
|
2171
|
+
AbstractXHRObject.enabled = !!new XHR();
|
|
2172
|
+
}
|
|
2173
|
+
var cors = false;
|
|
2174
|
+
try {
|
|
2175
|
+
cors = 'withCredentials' in new XHR();
|
|
2176
|
+
} catch (ignored) {
|
|
2177
|
+
// intentionally empty
|
|
2178
|
+
}
|
|
2179
|
+
AbstractXHRObject.supportsCORS = cors;
|
|
2180
|
+
module.exports = AbstractXHRObject;
|
|
2181
|
+
|
|
2182
|
+
|
|
2183
|
+
}),
|
|
2184
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/browser/eventsource.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
2185
|
+
module.exports = __webpack_require__.g.EventSource;
|
|
2186
|
+
|
|
2187
|
+
|
|
2188
|
+
}),
|
|
2189
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/browser/websocket.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
2190
|
+
"use strict";
|
|
2191
|
+
|
|
2192
|
+
var Driver = __webpack_require__.g.WebSocket || __webpack_require__.g.MozWebSocket;
|
|
2193
|
+
if (Driver) {
|
|
2194
|
+
module.exports = function WebSocketBrowserDriver(url) {
|
|
2195
|
+
return new Driver(url);
|
|
2196
|
+
};
|
|
2197
|
+
} else {
|
|
2198
|
+
module.exports = undefined;
|
|
2199
|
+
}
|
|
2200
|
+
|
|
2201
|
+
|
|
2202
|
+
}),
|
|
2203
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/eventsource.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
2204
|
+
"use strict";
|
|
2205
|
+
|
|
2206
|
+
var inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), AjaxBasedTransport = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/lib/ajax-based.js"), EventSourceReceiver = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/receiver/eventsource.js"), XHRCorsObject = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/sender/xhr-cors.js"), EventSourceDriver = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/browser/eventsource.js");
|
|
2207
|
+
function EventSourceTransport(transUrl) {
|
|
2208
|
+
if (!EventSourceTransport.enabled()) {
|
|
2209
|
+
throw new Error('Transport created when disabled');
|
|
2210
|
+
}
|
|
2211
|
+
AjaxBasedTransport.call(this, transUrl, '/eventsource', EventSourceReceiver, XHRCorsObject);
|
|
2212
|
+
}
|
|
2213
|
+
inherits(EventSourceTransport, AjaxBasedTransport);
|
|
2214
|
+
EventSourceTransport.enabled = function() {
|
|
2215
|
+
return !!EventSourceDriver;
|
|
2216
|
+
};
|
|
2217
|
+
EventSourceTransport.transportName = 'eventsource';
|
|
2218
|
+
EventSourceTransport.roundTrips = 2;
|
|
2219
|
+
module.exports = EventSourceTransport;
|
|
2220
|
+
|
|
2221
|
+
|
|
2222
|
+
}),
|
|
2223
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/htmlfile.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
2224
|
+
"use strict";
|
|
2225
|
+
|
|
2226
|
+
var inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), HtmlfileReceiver = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/receiver/htmlfile.js"), XHRLocalObject = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/sender/xhr-local.js"), AjaxBasedTransport = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/lib/ajax-based.js");
|
|
2227
|
+
function HtmlFileTransport(transUrl) {
|
|
2228
|
+
if (!HtmlfileReceiver.enabled) {
|
|
2229
|
+
throw new Error('Transport created when disabled');
|
|
2230
|
+
}
|
|
2231
|
+
AjaxBasedTransport.call(this, transUrl, '/htmlfile', HtmlfileReceiver, XHRLocalObject);
|
|
2232
|
+
}
|
|
2233
|
+
inherits(HtmlFileTransport, AjaxBasedTransport);
|
|
2234
|
+
HtmlFileTransport.enabled = function(info) {
|
|
2235
|
+
return HtmlfileReceiver.enabled && info.sameOrigin;
|
|
2236
|
+
};
|
|
2237
|
+
HtmlFileTransport.transportName = 'htmlfile';
|
|
2238
|
+
HtmlFileTransport.roundTrips = 2;
|
|
2239
|
+
module.exports = HtmlFileTransport;
|
|
2240
|
+
|
|
2241
|
+
|
|
2242
|
+
}),
|
|
2243
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/iframe.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
2244
|
+
"use strict";
|
|
2245
|
+
|
|
2246
|
+
// Few cool transports do work only for same-origin. In order to make
|
|
2247
|
+
// them work cross-domain we shall use iframe, served from the
|
|
2248
|
+
// remote domain. New browsers have capabilities to communicate with
|
|
2249
|
+
// cross domain iframe using postMessage(). In IE it was implemented
|
|
2250
|
+
// from IE 8+, but of course, IE got some details wrong:
|
|
2251
|
+
// http://msdn.microsoft.com/en-us/library/cc197015(v=VS.85).aspx
|
|
2252
|
+
// http://stevesouders.com/misc/test-postmessage.php
|
|
2253
|
+
var inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), EventEmitter = (__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/event/emitter.js")/* .EventEmitter */.EventEmitter), version = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/version.js"), urlUtils = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/url.js"), iframeUtils = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/iframe.js"), eventUtils = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/event.js"), random = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/random.js");
|
|
2254
|
+
var debug = function debug() {};
|
|
2255
|
+
if (true) {
|
|
2256
|
+
debug = __webpack_require__("../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js")('sockjs-client:transport:iframe');
|
|
2257
|
+
}
|
|
2258
|
+
function IframeTransport(transport, transUrl, baseUrl) {
|
|
2259
|
+
if (!IframeTransport.enabled()) {
|
|
2260
|
+
throw new Error('Transport created when disabled');
|
|
2261
|
+
}
|
|
2262
|
+
EventEmitter.call(this);
|
|
2263
|
+
var self = this;
|
|
2264
|
+
this.origin = urlUtils.getOrigin(baseUrl);
|
|
2265
|
+
this.baseUrl = baseUrl;
|
|
2266
|
+
this.transUrl = transUrl;
|
|
2267
|
+
this.transport = transport;
|
|
2268
|
+
this.windowId = random.string(8);
|
|
2269
|
+
var iframeUrl = urlUtils.addPath(baseUrl, '/iframe.html') + '#' + this.windowId;
|
|
2270
|
+
debug(transport, transUrl, iframeUrl);
|
|
2271
|
+
this.iframeObj = iframeUtils.createIframe(iframeUrl, function(r) {
|
|
2272
|
+
debug('err callback');
|
|
2273
|
+
self.emit('close', 1006, 'Unable to load an iframe (' + r + ')');
|
|
2274
|
+
self.close();
|
|
2275
|
+
});
|
|
2276
|
+
this.onmessageCallback = this._message.bind(this);
|
|
2277
|
+
eventUtils.attachEvent('message', this.onmessageCallback);
|
|
2278
|
+
}
|
|
2279
|
+
inherits(IframeTransport, EventEmitter);
|
|
2280
|
+
IframeTransport.prototype.close = function() {
|
|
2281
|
+
debug('close');
|
|
2282
|
+
this.removeAllListeners();
|
|
2283
|
+
if (this.iframeObj) {
|
|
2284
|
+
eventUtils.detachEvent('message', this.onmessageCallback);
|
|
2285
|
+
try {
|
|
2286
|
+
// When the iframe is not loaded, IE raises an exception
|
|
2287
|
+
// on 'contentWindow'.
|
|
2288
|
+
this.postMessage('c');
|
|
2289
|
+
} catch (x) {
|
|
2290
|
+
// intentionally empty
|
|
2291
|
+
}
|
|
2292
|
+
this.iframeObj.cleanup();
|
|
2293
|
+
this.iframeObj = null;
|
|
2294
|
+
this.onmessageCallback = this.iframeObj = null;
|
|
2295
|
+
}
|
|
2296
|
+
};
|
|
2297
|
+
IframeTransport.prototype._message = function(e) {
|
|
2298
|
+
debug('message', e.data);
|
|
2299
|
+
if (!urlUtils.isOriginEqual(e.origin, this.origin)) {
|
|
2300
|
+
debug('not same origin', e.origin, this.origin);
|
|
2301
|
+
return;
|
|
2302
|
+
}
|
|
2303
|
+
var iframeMessage;
|
|
2304
|
+
try {
|
|
2305
|
+
iframeMessage = JSON.parse(e.data);
|
|
2306
|
+
} catch (ignored) {
|
|
2307
|
+
debug('bad json', e.data);
|
|
2308
|
+
return;
|
|
2309
|
+
}
|
|
2310
|
+
if (iframeMessage.windowId !== this.windowId) {
|
|
2311
|
+
debug('mismatched window id', iframeMessage.windowId, this.windowId);
|
|
2312
|
+
return;
|
|
2313
|
+
}
|
|
2314
|
+
switch(iframeMessage.type){
|
|
2315
|
+
case 's':
|
|
2316
|
+
this.iframeObj.loaded();
|
|
2317
|
+
// window global dependency
|
|
2318
|
+
this.postMessage('s', JSON.stringify([
|
|
2319
|
+
version,
|
|
2320
|
+
this.transport,
|
|
2321
|
+
this.transUrl,
|
|
2322
|
+
this.baseUrl
|
|
2323
|
+
]));
|
|
2324
|
+
break;
|
|
2325
|
+
case 't':
|
|
2326
|
+
this.emit('message', iframeMessage.data);
|
|
2327
|
+
break;
|
|
2328
|
+
case 'c':
|
|
2329
|
+
var cdata;
|
|
2330
|
+
try {
|
|
2331
|
+
cdata = JSON.parse(iframeMessage.data);
|
|
2332
|
+
} catch (ignored) {
|
|
2333
|
+
debug('bad json', iframeMessage.data);
|
|
2334
|
+
return;
|
|
2335
|
+
}
|
|
2336
|
+
this.emit('close', cdata[0], cdata[1]);
|
|
2337
|
+
this.close();
|
|
2338
|
+
break;
|
|
2339
|
+
}
|
|
2340
|
+
};
|
|
2341
|
+
IframeTransport.prototype.postMessage = function(type, data) {
|
|
2342
|
+
debug('postMessage', type, data);
|
|
2343
|
+
this.iframeObj.post(JSON.stringify({
|
|
2344
|
+
windowId: this.windowId,
|
|
2345
|
+
type: type,
|
|
2346
|
+
data: data || ''
|
|
2347
|
+
}), this.origin);
|
|
2348
|
+
};
|
|
2349
|
+
IframeTransport.prototype.send = function(message) {
|
|
2350
|
+
debug('send', message);
|
|
2351
|
+
this.postMessage('m', message);
|
|
2352
|
+
};
|
|
2353
|
+
IframeTransport.enabled = function() {
|
|
2354
|
+
return iframeUtils.iframeEnabled;
|
|
2355
|
+
};
|
|
2356
|
+
IframeTransport.transportName = 'iframe';
|
|
2357
|
+
IframeTransport.roundTrips = 2;
|
|
2358
|
+
module.exports = IframeTransport;
|
|
2359
|
+
|
|
2360
|
+
|
|
2361
|
+
}),
|
|
2362
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/jsonp-polling.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
2363
|
+
"use strict";
|
|
2364
|
+
|
|
2365
|
+
// The simplest and most robust transport, using the well-know cross
|
|
2366
|
+
// domain hack - JSONP. This transport is quite inefficient - one
|
|
2367
|
+
// message could use up to one http request. But at least it works almost
|
|
2368
|
+
// everywhere.
|
|
2369
|
+
// Known limitations:
|
|
2370
|
+
// o you will get a spinning cursor
|
|
2371
|
+
// o for Konqueror a dumb timer is needed to detect errors
|
|
2372
|
+
var inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), SenderReceiver = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/lib/sender-receiver.js"), JsonpReceiver = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/receiver/jsonp.js"), jsonpSender = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/sender/jsonp.js");
|
|
2373
|
+
function JsonPTransport(transUrl) {
|
|
2374
|
+
if (!JsonPTransport.enabled()) {
|
|
2375
|
+
throw new Error('Transport created when disabled');
|
|
2376
|
+
}
|
|
2377
|
+
SenderReceiver.call(this, transUrl, '/jsonp', jsonpSender, JsonpReceiver);
|
|
2378
|
+
}
|
|
2379
|
+
inherits(JsonPTransport, SenderReceiver);
|
|
2380
|
+
JsonPTransport.enabled = function() {
|
|
2381
|
+
return !!__webpack_require__.g.document;
|
|
2382
|
+
};
|
|
2383
|
+
JsonPTransport.transportName = 'jsonp-polling';
|
|
2384
|
+
JsonPTransport.roundTrips = 1;
|
|
2385
|
+
JsonPTransport.needBody = true;
|
|
2386
|
+
module.exports = JsonPTransport;
|
|
2387
|
+
|
|
2388
|
+
|
|
2389
|
+
}),
|
|
2390
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/lib/ajax-based.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
2391
|
+
"use strict";
|
|
2392
|
+
|
|
2393
|
+
var inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), urlUtils = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/url.js"), SenderReceiver = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/lib/sender-receiver.js");
|
|
2394
|
+
var debug = function debug() {};
|
|
2395
|
+
if (true) {
|
|
2396
|
+
debug = __webpack_require__("../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js")('sockjs-client:ajax-based');
|
|
2397
|
+
}
|
|
2398
|
+
function createAjaxSender(AjaxObject) {
|
|
2399
|
+
return function(url, payload, callback) {
|
|
2400
|
+
debug('create ajax sender', url, payload);
|
|
2401
|
+
var opt = {};
|
|
2402
|
+
if (typeof payload === 'string') {
|
|
2403
|
+
opt.headers = {
|
|
2404
|
+
'Content-type': 'text/plain'
|
|
2405
|
+
};
|
|
2406
|
+
}
|
|
2407
|
+
var ajaxUrl = urlUtils.addPath(url, '/xhr_send');
|
|
2408
|
+
var xo = new AjaxObject('POST', ajaxUrl, payload, opt);
|
|
2409
|
+
xo.once('finish', function(status) {
|
|
2410
|
+
debug('finish', status);
|
|
2411
|
+
xo = null;
|
|
2412
|
+
if (status !== 200 && status !== 204) {
|
|
2413
|
+
return callback(new Error('http status ' + status));
|
|
2414
|
+
}
|
|
2415
|
+
callback();
|
|
2416
|
+
});
|
|
2417
|
+
return function() {
|
|
2418
|
+
debug('abort');
|
|
2419
|
+
xo.close();
|
|
2420
|
+
xo = null;
|
|
2421
|
+
var err = new Error('Aborted');
|
|
2422
|
+
err.code = 1000;
|
|
2423
|
+
callback(err);
|
|
2424
|
+
};
|
|
2425
|
+
};
|
|
2426
|
+
}
|
|
2427
|
+
function AjaxBasedTransport(transUrl, urlSuffix, Receiver, AjaxObject) {
|
|
2428
|
+
SenderReceiver.call(this, transUrl, urlSuffix, createAjaxSender(AjaxObject), Receiver, AjaxObject);
|
|
2429
|
+
}
|
|
2430
|
+
inherits(AjaxBasedTransport, SenderReceiver);
|
|
2431
|
+
module.exports = AjaxBasedTransport;
|
|
2432
|
+
|
|
2433
|
+
|
|
2434
|
+
}),
|
|
2435
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/lib/buffered-sender.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
2436
|
+
"use strict";
|
|
2437
|
+
|
|
2438
|
+
var inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), EventEmitter = (__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/event/emitter.js")/* .EventEmitter */.EventEmitter);
|
|
2439
|
+
var debug = function debug() {};
|
|
2440
|
+
if (true) {
|
|
2441
|
+
debug = __webpack_require__("../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js")('sockjs-client:buffered-sender');
|
|
2442
|
+
}
|
|
2443
|
+
function BufferedSender(url, sender) {
|
|
2444
|
+
debug(url);
|
|
2445
|
+
EventEmitter.call(this);
|
|
2446
|
+
this.sendBuffer = [];
|
|
2447
|
+
this.sender = sender;
|
|
2448
|
+
this.url = url;
|
|
2449
|
+
}
|
|
2450
|
+
inherits(BufferedSender, EventEmitter);
|
|
2451
|
+
BufferedSender.prototype.send = function(message) {
|
|
2452
|
+
debug('send', message);
|
|
2453
|
+
this.sendBuffer.push(message);
|
|
2454
|
+
if (!this.sendStop) {
|
|
2455
|
+
this.sendSchedule();
|
|
2456
|
+
}
|
|
2457
|
+
};
|
|
2458
|
+
// For polling transports in a situation when in the message callback,
|
|
2459
|
+
// new message is being send. If the sending connection was started
|
|
2460
|
+
// before receiving one, it is possible to saturate the network and
|
|
2461
|
+
// timeout due to the lack of receiving socket. To avoid that we delay
|
|
2462
|
+
// sending messages by some small time, in order to let receiving
|
|
2463
|
+
// connection be started beforehand. This is only a halfmeasure and
|
|
2464
|
+
// does not fix the big problem, but it does make the tests go more
|
|
2465
|
+
// stable on slow networks.
|
|
2466
|
+
BufferedSender.prototype.sendScheduleWait = function() {
|
|
2467
|
+
debug('sendScheduleWait');
|
|
2468
|
+
var self = this;
|
|
2469
|
+
var tref;
|
|
2470
|
+
this.sendStop = function() {
|
|
2471
|
+
debug('sendStop');
|
|
2472
|
+
self.sendStop = null;
|
|
2473
|
+
clearTimeout(tref);
|
|
2474
|
+
};
|
|
2475
|
+
tref = setTimeout(function() {
|
|
2476
|
+
debug('timeout');
|
|
2477
|
+
self.sendStop = null;
|
|
2478
|
+
self.sendSchedule();
|
|
2479
|
+
}, 25);
|
|
2480
|
+
};
|
|
2481
|
+
BufferedSender.prototype.sendSchedule = function() {
|
|
2482
|
+
debug('sendSchedule', this.sendBuffer.length);
|
|
2483
|
+
var self = this;
|
|
2484
|
+
if (this.sendBuffer.length > 0) {
|
|
2485
|
+
var payload = '[' + this.sendBuffer.join(',') + ']';
|
|
2486
|
+
this.sendStop = this.sender(this.url, payload, function(err) {
|
|
2487
|
+
self.sendStop = null;
|
|
2488
|
+
if (err) {
|
|
2489
|
+
debug('error', err);
|
|
2490
|
+
self.emit('close', err.code || 1006, 'Sending error: ' + err);
|
|
2491
|
+
self.close();
|
|
2492
|
+
} else {
|
|
2493
|
+
self.sendScheduleWait();
|
|
2494
|
+
}
|
|
2495
|
+
});
|
|
2496
|
+
this.sendBuffer = [];
|
|
2497
|
+
}
|
|
2498
|
+
};
|
|
2499
|
+
BufferedSender.prototype._cleanup = function() {
|
|
2500
|
+
debug('_cleanup');
|
|
2501
|
+
this.removeAllListeners();
|
|
2502
|
+
};
|
|
2503
|
+
BufferedSender.prototype.close = function() {
|
|
2504
|
+
debug('close');
|
|
2505
|
+
this._cleanup();
|
|
2506
|
+
if (this.sendStop) {
|
|
2507
|
+
this.sendStop();
|
|
2508
|
+
this.sendStop = null;
|
|
2509
|
+
}
|
|
2510
|
+
};
|
|
2511
|
+
module.exports = BufferedSender;
|
|
2512
|
+
|
|
2513
|
+
|
|
2514
|
+
}),
|
|
2515
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
2516
|
+
"use strict";
|
|
2517
|
+
|
|
2518
|
+
var inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), IframeTransport = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/iframe.js"), objectUtils = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/object.js");
|
|
2519
|
+
module.exports = function(transport) {
|
|
2520
|
+
function IframeWrapTransport(transUrl, baseUrl) {
|
|
2521
|
+
IframeTransport.call(this, transport.transportName, transUrl, baseUrl);
|
|
2522
|
+
}
|
|
2523
|
+
inherits(IframeWrapTransport, IframeTransport);
|
|
2524
|
+
IframeWrapTransport.enabled = function(url, info) {
|
|
2525
|
+
if (!__webpack_require__.g.document) {
|
|
2526
|
+
return false;
|
|
2527
|
+
}
|
|
2528
|
+
var iframeInfo = objectUtils.extend({}, info);
|
|
2529
|
+
iframeInfo.sameOrigin = true;
|
|
2530
|
+
return transport.enabled(iframeInfo) && IframeTransport.enabled();
|
|
2531
|
+
};
|
|
2532
|
+
IframeWrapTransport.transportName = 'iframe-' + transport.transportName;
|
|
2533
|
+
IframeWrapTransport.needBody = true;
|
|
2534
|
+
IframeWrapTransport.roundTrips = IframeTransport.roundTrips + transport.roundTrips - 1; // html, javascript (2) + transport - no CORS (1)
|
|
2535
|
+
IframeWrapTransport.facadeTransport = transport;
|
|
2536
|
+
return IframeWrapTransport;
|
|
2537
|
+
};
|
|
2538
|
+
|
|
2539
|
+
|
|
2540
|
+
}),
|
|
2541
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/lib/polling.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
2542
|
+
"use strict";
|
|
2543
|
+
|
|
2544
|
+
var inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), EventEmitter = (__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/event/emitter.js")/* .EventEmitter */.EventEmitter);
|
|
2545
|
+
var debug = function debug() {};
|
|
2546
|
+
if (true) {
|
|
2547
|
+
debug = __webpack_require__("../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js")('sockjs-client:polling');
|
|
2548
|
+
}
|
|
2549
|
+
function Polling(Receiver, receiveUrl, AjaxObject) {
|
|
2550
|
+
debug(receiveUrl);
|
|
2551
|
+
EventEmitter.call(this);
|
|
2552
|
+
this.Receiver = Receiver;
|
|
2553
|
+
this.receiveUrl = receiveUrl;
|
|
2554
|
+
this.AjaxObject = AjaxObject;
|
|
2555
|
+
this._scheduleReceiver();
|
|
2556
|
+
}
|
|
2557
|
+
inherits(Polling, EventEmitter);
|
|
2558
|
+
Polling.prototype._scheduleReceiver = function() {
|
|
2559
|
+
debug('_scheduleReceiver');
|
|
2560
|
+
var self = this;
|
|
2561
|
+
var poll = this.poll = new this.Receiver(this.receiveUrl, this.AjaxObject);
|
|
2562
|
+
poll.on('message', function(msg) {
|
|
2563
|
+
debug('message', msg);
|
|
2564
|
+
self.emit('message', msg);
|
|
2565
|
+
});
|
|
2566
|
+
poll.once('close', function(code, reason) {
|
|
2567
|
+
debug('close', code, reason, self.pollIsClosing);
|
|
2568
|
+
self.poll = poll = null;
|
|
2569
|
+
if (!self.pollIsClosing) {
|
|
2570
|
+
if (reason === 'network') {
|
|
2571
|
+
self._scheduleReceiver();
|
|
2572
|
+
} else {
|
|
2573
|
+
self.emit('close', code || 1006, reason);
|
|
2574
|
+
self.removeAllListeners();
|
|
2575
|
+
}
|
|
2576
|
+
}
|
|
2577
|
+
});
|
|
2578
|
+
};
|
|
2579
|
+
Polling.prototype.abort = function() {
|
|
2580
|
+
debug('abort');
|
|
2581
|
+
this.removeAllListeners();
|
|
2582
|
+
this.pollIsClosing = true;
|
|
2583
|
+
if (this.poll) {
|
|
2584
|
+
this.poll.abort();
|
|
2585
|
+
}
|
|
2586
|
+
};
|
|
2587
|
+
module.exports = Polling;
|
|
2588
|
+
|
|
2589
|
+
|
|
2590
|
+
}),
|
|
2591
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/lib/sender-receiver.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
2592
|
+
"use strict";
|
|
2593
|
+
|
|
2594
|
+
var inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), urlUtils = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/url.js"), BufferedSender = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/lib/buffered-sender.js"), Polling = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/lib/polling.js");
|
|
2595
|
+
var debug = function debug() {};
|
|
2596
|
+
if (true) {
|
|
2597
|
+
debug = __webpack_require__("../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js")('sockjs-client:sender-receiver');
|
|
2598
|
+
}
|
|
2599
|
+
function SenderReceiver(transUrl, urlSuffix, senderFunc, Receiver, AjaxObject) {
|
|
2600
|
+
var pollUrl = urlUtils.addPath(transUrl, urlSuffix);
|
|
2601
|
+
debug(pollUrl);
|
|
2602
|
+
var self = this;
|
|
2603
|
+
BufferedSender.call(this, transUrl, senderFunc);
|
|
2604
|
+
this.poll = new Polling(Receiver, pollUrl, AjaxObject);
|
|
2605
|
+
this.poll.on('message', function(msg) {
|
|
2606
|
+
debug('poll message', msg);
|
|
2607
|
+
self.emit('message', msg);
|
|
2608
|
+
});
|
|
2609
|
+
this.poll.once('close', function(code, reason) {
|
|
2610
|
+
debug('poll close', code, reason);
|
|
2611
|
+
self.poll = null;
|
|
2612
|
+
self.emit('close', code, reason);
|
|
2613
|
+
self.close();
|
|
2614
|
+
});
|
|
2615
|
+
}
|
|
2616
|
+
inherits(SenderReceiver, BufferedSender);
|
|
2617
|
+
SenderReceiver.prototype.close = function() {
|
|
2618
|
+
BufferedSender.prototype.close.call(this);
|
|
2619
|
+
debug('close');
|
|
2620
|
+
this.removeAllListeners();
|
|
2621
|
+
if (this.poll) {
|
|
2622
|
+
this.poll.abort();
|
|
2623
|
+
this.poll = null;
|
|
2624
|
+
}
|
|
2625
|
+
};
|
|
2626
|
+
module.exports = SenderReceiver;
|
|
2627
|
+
|
|
2628
|
+
|
|
2629
|
+
}),
|
|
2630
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/receiver/eventsource.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
2631
|
+
"use strict";
|
|
2632
|
+
|
|
2633
|
+
var inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), EventEmitter = (__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/event/emitter.js")/* .EventEmitter */.EventEmitter), EventSourceDriver = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/browser/eventsource.js");
|
|
2634
|
+
var debug = function debug() {};
|
|
2635
|
+
if (true) {
|
|
2636
|
+
debug = __webpack_require__("../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js")('sockjs-client:receiver:eventsource');
|
|
2637
|
+
}
|
|
2638
|
+
function EventSourceReceiver(url) {
|
|
2639
|
+
debug(url);
|
|
2640
|
+
EventEmitter.call(this);
|
|
2641
|
+
var self = this;
|
|
2642
|
+
var es = this.es = new EventSourceDriver(url);
|
|
2643
|
+
es.onmessage = function(e) {
|
|
2644
|
+
debug('message', e.data);
|
|
2645
|
+
self.emit('message', decodeURI(e.data));
|
|
2646
|
+
};
|
|
2647
|
+
es.onerror = function(e) {
|
|
2648
|
+
debug('error', es.readyState, e);
|
|
2649
|
+
// ES on reconnection has readyState = 0 or 1.
|
|
2650
|
+
// on network error it's CLOSED = 2
|
|
2651
|
+
var reason = es.readyState !== 2 ? 'network' : 'permanent';
|
|
2652
|
+
self._cleanup();
|
|
2653
|
+
self._close(reason);
|
|
2654
|
+
};
|
|
2655
|
+
}
|
|
2656
|
+
inherits(EventSourceReceiver, EventEmitter);
|
|
2657
|
+
EventSourceReceiver.prototype.abort = function() {
|
|
2658
|
+
debug('abort');
|
|
2659
|
+
this._cleanup();
|
|
2660
|
+
this._close('user');
|
|
2661
|
+
};
|
|
2662
|
+
EventSourceReceiver.prototype._cleanup = function() {
|
|
2663
|
+
debug('cleanup');
|
|
2664
|
+
var es = this.es;
|
|
2665
|
+
if (es) {
|
|
2666
|
+
es.onmessage = es.onerror = null;
|
|
2667
|
+
es.close();
|
|
2668
|
+
this.es = null;
|
|
2669
|
+
}
|
|
2670
|
+
};
|
|
2671
|
+
EventSourceReceiver.prototype._close = function(reason) {
|
|
2672
|
+
debug('close', reason);
|
|
2673
|
+
var self = this;
|
|
2674
|
+
// Safari and chrome < 15 crash if we close window before
|
|
2675
|
+
// waiting for ES cleanup. See:
|
|
2676
|
+
// https://code.google.com/p/chromium/issues/detail?id=89155
|
|
2677
|
+
setTimeout(function() {
|
|
2678
|
+
self.emit('close', null, reason);
|
|
2679
|
+
self.removeAllListeners();
|
|
2680
|
+
}, 200);
|
|
2681
|
+
};
|
|
2682
|
+
module.exports = EventSourceReceiver;
|
|
2683
|
+
|
|
2684
|
+
|
|
2685
|
+
}),
|
|
2686
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/receiver/htmlfile.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
2687
|
+
"use strict";
|
|
2688
|
+
|
|
2689
|
+
var inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), iframeUtils = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/iframe.js"), urlUtils = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/url.js"), EventEmitter = (__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/event/emitter.js")/* .EventEmitter */.EventEmitter), random = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/random.js");
|
|
2690
|
+
var debug = function debug() {};
|
|
2691
|
+
if (true) {
|
|
2692
|
+
debug = __webpack_require__("../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js")('sockjs-client:receiver:htmlfile');
|
|
2693
|
+
}
|
|
2694
|
+
function HtmlfileReceiver(url) {
|
|
2695
|
+
debug(url);
|
|
2696
|
+
EventEmitter.call(this);
|
|
2697
|
+
var self = this;
|
|
2698
|
+
iframeUtils.polluteGlobalNamespace();
|
|
2699
|
+
this.id = 'a' + random.string(6);
|
|
2700
|
+
url = urlUtils.addQuery(url, 'c=' + decodeURIComponent(iframeUtils.WPrefix + '.' + this.id));
|
|
2701
|
+
debug('using htmlfile', HtmlfileReceiver.htmlfileEnabled);
|
|
2702
|
+
var constructFunc = HtmlfileReceiver.htmlfileEnabled ? iframeUtils.createHtmlfile : iframeUtils.createIframe;
|
|
2703
|
+
__webpack_require__.g[iframeUtils.WPrefix][this.id] = {
|
|
2704
|
+
start: function start() {
|
|
2705
|
+
debug('start');
|
|
2706
|
+
self.iframeObj.loaded();
|
|
2707
|
+
},
|
|
2708
|
+
message: function message(data) {
|
|
2709
|
+
debug('message', data);
|
|
2710
|
+
self.emit('message', data);
|
|
2711
|
+
},
|
|
2712
|
+
stop: function stop() {
|
|
2713
|
+
debug('stop');
|
|
2714
|
+
self._cleanup();
|
|
2715
|
+
self._close('network');
|
|
2716
|
+
}
|
|
2717
|
+
};
|
|
2718
|
+
this.iframeObj = constructFunc(url, function() {
|
|
2719
|
+
debug('callback');
|
|
2720
|
+
self._cleanup();
|
|
2721
|
+
self._close('permanent');
|
|
2722
|
+
});
|
|
2723
|
+
}
|
|
2724
|
+
inherits(HtmlfileReceiver, EventEmitter);
|
|
2725
|
+
HtmlfileReceiver.prototype.abort = function() {
|
|
2726
|
+
debug('abort');
|
|
2727
|
+
this._cleanup();
|
|
2728
|
+
this._close('user');
|
|
2729
|
+
};
|
|
2730
|
+
HtmlfileReceiver.prototype._cleanup = function() {
|
|
2731
|
+
debug('_cleanup');
|
|
2732
|
+
if (this.iframeObj) {
|
|
2733
|
+
this.iframeObj.cleanup();
|
|
2734
|
+
this.iframeObj = null;
|
|
2735
|
+
}
|
|
2736
|
+
delete __webpack_require__.g[iframeUtils.WPrefix][this.id];
|
|
2737
|
+
};
|
|
2738
|
+
HtmlfileReceiver.prototype._close = function(reason) {
|
|
2739
|
+
debug('_close', reason);
|
|
2740
|
+
this.emit('close', null, reason);
|
|
2741
|
+
this.removeAllListeners();
|
|
2742
|
+
};
|
|
2743
|
+
HtmlfileReceiver.htmlfileEnabled = false;
|
|
2744
|
+
// obfuscate to avoid firewalls
|
|
2745
|
+
var axo = [
|
|
2746
|
+
'Active'
|
|
2747
|
+
].concat('Object').join('X');
|
|
2748
|
+
if (axo in __webpack_require__.g) {
|
|
2749
|
+
try {
|
|
2750
|
+
HtmlfileReceiver.htmlfileEnabled = !!new __webpack_require__.g[axo]('htmlfile');
|
|
2751
|
+
} catch (x) {
|
|
2752
|
+
// intentionally empty
|
|
2753
|
+
}
|
|
2754
|
+
}
|
|
2755
|
+
HtmlfileReceiver.enabled = HtmlfileReceiver.htmlfileEnabled || iframeUtils.iframeEnabled;
|
|
2756
|
+
module.exports = HtmlfileReceiver;
|
|
2757
|
+
|
|
2758
|
+
|
|
2759
|
+
}),
|
|
2760
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/receiver/jsonp.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
2761
|
+
"use strict";
|
|
2762
|
+
|
|
2763
|
+
var utils = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/iframe.js"), random = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/random.js"), browser = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/browser.js"), urlUtils = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/url.js"), inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), EventEmitter = (__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/event/emitter.js")/* .EventEmitter */.EventEmitter);
|
|
2764
|
+
var debug = function debug() {};
|
|
2765
|
+
if (true) {
|
|
2766
|
+
debug = __webpack_require__("../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js")('sockjs-client:receiver:jsonp');
|
|
2767
|
+
}
|
|
2768
|
+
function JsonpReceiver(url) {
|
|
2769
|
+
debug(url);
|
|
2770
|
+
var self = this;
|
|
2771
|
+
EventEmitter.call(this);
|
|
2772
|
+
utils.polluteGlobalNamespace();
|
|
2773
|
+
this.id = 'a' + random.string(6);
|
|
2774
|
+
var urlWithId = urlUtils.addQuery(url, 'c=' + encodeURIComponent(utils.WPrefix + '.' + this.id));
|
|
2775
|
+
__webpack_require__.g[utils.WPrefix][this.id] = this._callback.bind(this);
|
|
2776
|
+
this._createScript(urlWithId);
|
|
2777
|
+
// Fallback mostly for Konqueror - stupid timer, 35 seconds shall be plenty.
|
|
2778
|
+
this.timeoutId = setTimeout(function() {
|
|
2779
|
+
debug('timeout');
|
|
2780
|
+
self._abort(new Error('JSONP script loaded abnormally (timeout)'));
|
|
2781
|
+
}, JsonpReceiver.timeout);
|
|
2782
|
+
}
|
|
2783
|
+
inherits(JsonpReceiver, EventEmitter);
|
|
2784
|
+
JsonpReceiver.prototype.abort = function() {
|
|
2785
|
+
debug('abort');
|
|
2786
|
+
if (__webpack_require__.g[utils.WPrefix][this.id]) {
|
|
2787
|
+
var err = new Error('JSONP user aborted read');
|
|
2788
|
+
err.code = 1000;
|
|
2789
|
+
this._abort(err);
|
|
2790
|
+
}
|
|
2791
|
+
};
|
|
2792
|
+
JsonpReceiver.timeout = 35000;
|
|
2793
|
+
JsonpReceiver.scriptErrorTimeout = 1000;
|
|
2794
|
+
JsonpReceiver.prototype._callback = function(data) {
|
|
2795
|
+
debug('_callback', data);
|
|
2796
|
+
this._cleanup();
|
|
2797
|
+
if (this.aborting) {
|
|
2798
|
+
return;
|
|
2799
|
+
}
|
|
2800
|
+
if (data) {
|
|
2801
|
+
debug('message', data);
|
|
2802
|
+
this.emit('message', data);
|
|
2803
|
+
}
|
|
2804
|
+
this.emit('close', null, 'network');
|
|
2805
|
+
this.removeAllListeners();
|
|
2806
|
+
};
|
|
2807
|
+
JsonpReceiver.prototype._abort = function(err) {
|
|
2808
|
+
debug('_abort', err);
|
|
2809
|
+
this._cleanup();
|
|
2810
|
+
this.aborting = true;
|
|
2811
|
+
this.emit('close', err.code, err.message);
|
|
2812
|
+
this.removeAllListeners();
|
|
2813
|
+
};
|
|
2814
|
+
JsonpReceiver.prototype._cleanup = function() {
|
|
2815
|
+
debug('_cleanup');
|
|
2816
|
+
clearTimeout(this.timeoutId);
|
|
2817
|
+
if (this.script2) {
|
|
2818
|
+
this.script2.parentNode.removeChild(this.script2);
|
|
2819
|
+
this.script2 = null;
|
|
2820
|
+
}
|
|
2821
|
+
if (this.script) {
|
|
2822
|
+
var script = this.script;
|
|
2823
|
+
// Unfortunately, you can't really abort script loading of
|
|
2824
|
+
// the script.
|
|
2825
|
+
script.parentNode.removeChild(script);
|
|
2826
|
+
script.onreadystatechange = script.onerror = script.onload = script.onclick = null;
|
|
2827
|
+
this.script = null;
|
|
2828
|
+
}
|
|
2829
|
+
delete __webpack_require__.g[utils.WPrefix][this.id];
|
|
2830
|
+
};
|
|
2831
|
+
JsonpReceiver.prototype._scriptError = function() {
|
|
2832
|
+
debug('_scriptError');
|
|
2833
|
+
var self = this;
|
|
2834
|
+
if (this.errorTimer) {
|
|
2835
|
+
return;
|
|
2836
|
+
}
|
|
2837
|
+
this.errorTimer = setTimeout(function() {
|
|
2838
|
+
if (!self.loadedOkay) {
|
|
2839
|
+
self._abort(new Error('JSONP script loaded abnormally (onerror)'));
|
|
2840
|
+
}
|
|
2841
|
+
}, JsonpReceiver.scriptErrorTimeout);
|
|
2842
|
+
};
|
|
2843
|
+
JsonpReceiver.prototype._createScript = function(url) {
|
|
2844
|
+
debug('_createScript', url);
|
|
2845
|
+
var self = this;
|
|
2846
|
+
var script = this.script = __webpack_require__.g.document.createElement('script');
|
|
2847
|
+
var script2; // Opera synchronous load trick.
|
|
2848
|
+
script.id = 'a' + random.string(8);
|
|
2849
|
+
script.src = url;
|
|
2850
|
+
script.type = 'text/javascript';
|
|
2851
|
+
script.charset = 'UTF-8';
|
|
2852
|
+
script.onerror = this._scriptError.bind(this);
|
|
2853
|
+
script.onload = function() {
|
|
2854
|
+
debug('onload');
|
|
2855
|
+
self._abort(new Error('JSONP script loaded abnormally (onload)'));
|
|
2856
|
+
};
|
|
2857
|
+
// IE9 fires 'error' event after onreadystatechange or before, in random order.
|
|
2858
|
+
// Use loadedOkay to determine if actually errored
|
|
2859
|
+
script.onreadystatechange = function() {
|
|
2860
|
+
debug('onreadystatechange', script.readyState);
|
|
2861
|
+
if (/loaded|closed/.test(script.readyState)) {
|
|
2862
|
+
if (script && script.htmlFor && script.onclick) {
|
|
2863
|
+
self.loadedOkay = true;
|
|
2864
|
+
try {
|
|
2865
|
+
// In IE, actually execute the script.
|
|
2866
|
+
script.onclick();
|
|
2867
|
+
} catch (x) {
|
|
2868
|
+
// intentionally empty
|
|
2869
|
+
}
|
|
2870
|
+
}
|
|
2871
|
+
if (script) {
|
|
2872
|
+
self._abort(new Error('JSONP script loaded abnormally (onreadystatechange)'));
|
|
2873
|
+
}
|
|
2874
|
+
}
|
|
2875
|
+
};
|
|
2876
|
+
// IE: event/htmlFor/onclick trick.
|
|
2877
|
+
// One can't rely on proper order for onreadystatechange. In order to
|
|
2878
|
+
// make sure, set a 'htmlFor' and 'event' properties, so that
|
|
2879
|
+
// script code will be installed as 'onclick' handler for the
|
|
2880
|
+
// script object. Later, onreadystatechange, manually execute this
|
|
2881
|
+
// code. FF and Chrome doesn't work with 'event' and 'htmlFor'
|
|
2882
|
+
// set. For reference see:
|
|
2883
|
+
// http://jaubourg.net/2010/07/loading-script-as-onclick-handler-of.html
|
|
2884
|
+
// Also, read on that about script ordering:
|
|
2885
|
+
// http://wiki.whatwg.org/wiki/Dynamic_Script_Execution_Order
|
|
2886
|
+
if (typeof script.async === 'undefined' && __webpack_require__.g.document.attachEvent) {
|
|
2887
|
+
// According to mozilla docs, in recent browsers script.async defaults
|
|
2888
|
+
// to 'true', so we may use it to detect a good browser:
|
|
2889
|
+
// https://developer.mozilla.org/en/HTML/Element/script
|
|
2890
|
+
if (!browser.isOpera()) {
|
|
2891
|
+
// Naively assume we're in IE
|
|
2892
|
+
try {
|
|
2893
|
+
script.htmlFor = script.id;
|
|
2894
|
+
script.event = 'onclick';
|
|
2895
|
+
} catch (x) {
|
|
2896
|
+
// intentionally empty
|
|
2897
|
+
}
|
|
2898
|
+
script.async = true;
|
|
2899
|
+
} else {
|
|
2900
|
+
// Opera, second sync script hack
|
|
2901
|
+
script2 = this.script2 = __webpack_require__.g.document.createElement('script');
|
|
2902
|
+
script2.text = "try{var a = document.getElementById('" + script.id + "'); if(a)a.onerror();}catch(x){};";
|
|
2903
|
+
script.async = script2.async = false;
|
|
2904
|
+
}
|
|
2905
|
+
}
|
|
2906
|
+
if (typeof script.async !== 'undefined') {
|
|
2907
|
+
script.async = true;
|
|
2908
|
+
}
|
|
2909
|
+
var head = __webpack_require__.g.document.getElementsByTagName('head')[0];
|
|
2910
|
+
head.insertBefore(script, head.firstChild);
|
|
2911
|
+
if (script2) {
|
|
2912
|
+
head.insertBefore(script2, head.firstChild);
|
|
2913
|
+
}
|
|
2914
|
+
};
|
|
2915
|
+
module.exports = JsonpReceiver;
|
|
2916
|
+
|
|
2917
|
+
|
|
2918
|
+
}),
|
|
2919
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/receiver/xhr.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
2920
|
+
"use strict";
|
|
2921
|
+
|
|
2922
|
+
var inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), EventEmitter = (__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/event/emitter.js")/* .EventEmitter */.EventEmitter);
|
|
2923
|
+
var debug = function debug() {};
|
|
2924
|
+
if (true) {
|
|
2925
|
+
debug = __webpack_require__("../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js")('sockjs-client:receiver:xhr');
|
|
2926
|
+
}
|
|
2927
|
+
function XhrReceiver(url, AjaxObject) {
|
|
2928
|
+
debug(url);
|
|
2929
|
+
EventEmitter.call(this);
|
|
2930
|
+
var self = this;
|
|
2931
|
+
this.bufferPosition = 0;
|
|
2932
|
+
this.xo = new AjaxObject('POST', url, null);
|
|
2933
|
+
this.xo.on('chunk', this._chunkHandler.bind(this));
|
|
2934
|
+
this.xo.once('finish', function(status, text) {
|
|
2935
|
+
debug('finish', status, text);
|
|
2936
|
+
self._chunkHandler(status, text);
|
|
2937
|
+
self.xo = null;
|
|
2938
|
+
var reason = status === 200 ? 'network' : 'permanent';
|
|
2939
|
+
debug('close', reason);
|
|
2940
|
+
self.emit('close', null, reason);
|
|
2941
|
+
self._cleanup();
|
|
2942
|
+
});
|
|
2943
|
+
}
|
|
2944
|
+
inherits(XhrReceiver, EventEmitter);
|
|
2945
|
+
XhrReceiver.prototype._chunkHandler = function(status, text) {
|
|
2946
|
+
debug('_chunkHandler', status);
|
|
2947
|
+
if (status !== 200 || !text) {
|
|
2948
|
+
return;
|
|
2949
|
+
}
|
|
2950
|
+
for(var idx = -1;; this.bufferPosition += idx + 1){
|
|
2951
|
+
var buf = text.slice(this.bufferPosition);
|
|
2952
|
+
idx = buf.indexOf('\n');
|
|
2953
|
+
if (idx === -1) {
|
|
2954
|
+
break;
|
|
2955
|
+
}
|
|
2956
|
+
var msg = buf.slice(0, idx);
|
|
2957
|
+
if (msg) {
|
|
2958
|
+
debug('message', msg);
|
|
2959
|
+
this.emit('message', msg);
|
|
2960
|
+
}
|
|
2961
|
+
}
|
|
2962
|
+
};
|
|
2963
|
+
XhrReceiver.prototype._cleanup = function() {
|
|
2964
|
+
debug('_cleanup');
|
|
2965
|
+
this.removeAllListeners();
|
|
2966
|
+
};
|
|
2967
|
+
XhrReceiver.prototype.abort = function() {
|
|
2968
|
+
debug('abort');
|
|
2969
|
+
if (this.xo) {
|
|
2970
|
+
this.xo.close();
|
|
2971
|
+
debug('close');
|
|
2972
|
+
this.emit('close', null, 'user');
|
|
2973
|
+
this.xo = null;
|
|
2974
|
+
}
|
|
2975
|
+
this._cleanup();
|
|
2976
|
+
};
|
|
2977
|
+
module.exports = XhrReceiver;
|
|
2978
|
+
|
|
2979
|
+
|
|
2980
|
+
}),
|
|
2981
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/sender/jsonp.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
2982
|
+
"use strict";
|
|
2983
|
+
|
|
2984
|
+
var random = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/random.js"), urlUtils = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/url.js");
|
|
2985
|
+
var debug = function debug() {};
|
|
2986
|
+
if (true) {
|
|
2987
|
+
debug = __webpack_require__("../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js")('sockjs-client:sender:jsonp');
|
|
2988
|
+
}
|
|
2989
|
+
var form, area;
|
|
2990
|
+
function createIframe(id) {
|
|
2991
|
+
debug('createIframe', id);
|
|
2992
|
+
try {
|
|
2993
|
+
// ie6 dynamic iframes with target="" support (thanks Chris Lambacher)
|
|
2994
|
+
return __webpack_require__.g.document.createElement('<iframe name="' + id + '">');
|
|
2995
|
+
} catch (x) {
|
|
2996
|
+
var iframe = __webpack_require__.g.document.createElement('iframe');
|
|
2997
|
+
iframe.name = id;
|
|
2998
|
+
return iframe;
|
|
2999
|
+
}
|
|
3000
|
+
}
|
|
3001
|
+
function createForm() {
|
|
3002
|
+
debug('createForm');
|
|
3003
|
+
form = __webpack_require__.g.document.createElement('form');
|
|
3004
|
+
form.style.display = 'none';
|
|
3005
|
+
form.style.position = 'absolute';
|
|
3006
|
+
form.method = 'POST';
|
|
3007
|
+
form.enctype = 'application/x-www-form-urlencoded';
|
|
3008
|
+
form.acceptCharset = 'UTF-8';
|
|
3009
|
+
area = __webpack_require__.g.document.createElement('textarea');
|
|
3010
|
+
area.name = 'd';
|
|
3011
|
+
form.appendChild(area);
|
|
3012
|
+
__webpack_require__.g.document.body.appendChild(form);
|
|
3013
|
+
}
|
|
3014
|
+
module.exports = function(url, payload, callback) {
|
|
3015
|
+
debug(url, payload);
|
|
3016
|
+
if (!form) {
|
|
3017
|
+
createForm();
|
|
3018
|
+
}
|
|
3019
|
+
var id = 'a' + random.string(8);
|
|
3020
|
+
form.target = id;
|
|
3021
|
+
form.action = urlUtils.addQuery(urlUtils.addPath(url, '/jsonp_send'), 'i=' + id);
|
|
3022
|
+
var iframe = createIframe(id);
|
|
3023
|
+
iframe.id = id;
|
|
3024
|
+
iframe.style.display = 'none';
|
|
3025
|
+
form.appendChild(iframe);
|
|
3026
|
+
try {
|
|
3027
|
+
area.value = payload;
|
|
3028
|
+
} catch (e) {
|
|
3029
|
+
// seriously broken browsers get here
|
|
3030
|
+
}
|
|
3031
|
+
form.submit();
|
|
3032
|
+
var completed = function completed(err) {
|
|
3033
|
+
debug('completed', id, err);
|
|
3034
|
+
if (!iframe.onerror) {
|
|
3035
|
+
return;
|
|
3036
|
+
}
|
|
3037
|
+
iframe.onreadystatechange = iframe.onerror = iframe.onload = null;
|
|
3038
|
+
// Opera mini doesn't like if we GC iframe
|
|
3039
|
+
// immediately, thus this timeout.
|
|
3040
|
+
setTimeout(function() {
|
|
3041
|
+
debug('cleaning up', id);
|
|
3042
|
+
iframe.parentNode.removeChild(iframe);
|
|
3043
|
+
iframe = null;
|
|
3044
|
+
}, 500);
|
|
3045
|
+
area.value = '';
|
|
3046
|
+
// It is not possible to detect if the iframe succeeded or
|
|
3047
|
+
// failed to submit our form.
|
|
3048
|
+
callback(err);
|
|
3049
|
+
};
|
|
3050
|
+
iframe.onerror = function() {
|
|
3051
|
+
debug('onerror', id);
|
|
3052
|
+
completed();
|
|
3053
|
+
};
|
|
3054
|
+
iframe.onload = function() {
|
|
3055
|
+
debug('onload', id);
|
|
3056
|
+
completed();
|
|
3057
|
+
};
|
|
3058
|
+
iframe.onreadystatechange = function(e) {
|
|
3059
|
+
debug('onreadystatechange', id, iframe.readyState, e);
|
|
3060
|
+
if (iframe.readyState === 'complete') {
|
|
3061
|
+
completed();
|
|
3062
|
+
}
|
|
3063
|
+
};
|
|
3064
|
+
return function() {
|
|
3065
|
+
debug('aborted', id);
|
|
3066
|
+
completed(new Error('Aborted'));
|
|
3067
|
+
};
|
|
3068
|
+
};
|
|
3069
|
+
|
|
3070
|
+
|
|
3071
|
+
}),
|
|
3072
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/sender/xdr.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
3073
|
+
"use strict";
|
|
3074
|
+
|
|
3075
|
+
var EventEmitter = (__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/event/emitter.js")/* .EventEmitter */.EventEmitter), inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), eventUtils = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/event.js"), browser = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/browser.js"), urlUtils = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/url.js");
|
|
3076
|
+
var debug = function debug() {};
|
|
3077
|
+
if (true) {
|
|
3078
|
+
debug = __webpack_require__("../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js")('sockjs-client:sender:xdr');
|
|
3079
|
+
}
|
|
3080
|
+
// References:
|
|
3081
|
+
// http://ajaxian.com/archives/100-line-ajax-wrapper
|
|
3082
|
+
// http://msdn.microsoft.com/en-us/library/cc288060(v=VS.85).aspx
|
|
3083
|
+
function XDRObject(method, url, payload) {
|
|
3084
|
+
debug(method, url);
|
|
3085
|
+
var self = this;
|
|
3086
|
+
EventEmitter.call(this);
|
|
3087
|
+
setTimeout(function() {
|
|
3088
|
+
self._start(method, url, payload);
|
|
3089
|
+
}, 0);
|
|
3090
|
+
}
|
|
3091
|
+
inherits(XDRObject, EventEmitter);
|
|
3092
|
+
XDRObject.prototype._start = function(method, url, payload) {
|
|
3093
|
+
debug('_start');
|
|
3094
|
+
var self = this;
|
|
3095
|
+
var xdr = new __webpack_require__.g.XDomainRequest();
|
|
3096
|
+
// IE caches even POSTs
|
|
3097
|
+
url = urlUtils.addQuery(url, 't=' + +new Date());
|
|
3098
|
+
xdr.onerror = function() {
|
|
3099
|
+
debug('onerror');
|
|
3100
|
+
self._error();
|
|
3101
|
+
};
|
|
3102
|
+
xdr.ontimeout = function() {
|
|
3103
|
+
debug('ontimeout');
|
|
3104
|
+
self._error();
|
|
3105
|
+
};
|
|
3106
|
+
xdr.onprogress = function() {
|
|
3107
|
+
debug('progress', xdr.responseText);
|
|
3108
|
+
self.emit('chunk', 200, xdr.responseText);
|
|
3109
|
+
};
|
|
3110
|
+
xdr.onload = function() {
|
|
3111
|
+
debug('load');
|
|
3112
|
+
self.emit('finish', 200, xdr.responseText);
|
|
3113
|
+
self._cleanup(false);
|
|
3114
|
+
};
|
|
3115
|
+
this.xdr = xdr;
|
|
3116
|
+
this.unloadRef = eventUtils.unloadAdd(function() {
|
|
3117
|
+
self._cleanup(true);
|
|
3118
|
+
});
|
|
3119
|
+
try {
|
|
3120
|
+
// Fails with AccessDenied if port number is bogus
|
|
3121
|
+
this.xdr.open(method, url);
|
|
3122
|
+
if (this.timeout) {
|
|
3123
|
+
this.xdr.timeout = this.timeout;
|
|
3124
|
+
}
|
|
3125
|
+
this.xdr.send(payload);
|
|
3126
|
+
} catch (x) {
|
|
3127
|
+
this._error();
|
|
3128
|
+
}
|
|
3129
|
+
};
|
|
3130
|
+
XDRObject.prototype._error = function() {
|
|
3131
|
+
this.emit('finish', 0, '');
|
|
3132
|
+
this._cleanup(false);
|
|
3133
|
+
};
|
|
3134
|
+
XDRObject.prototype._cleanup = function(abort) {
|
|
3135
|
+
debug('cleanup', abort);
|
|
3136
|
+
if (!this.xdr) {
|
|
3137
|
+
return;
|
|
3138
|
+
}
|
|
3139
|
+
this.removeAllListeners();
|
|
3140
|
+
eventUtils.unloadDel(this.unloadRef);
|
|
3141
|
+
this.xdr.ontimeout = this.xdr.onerror = this.xdr.onprogress = this.xdr.onload = null;
|
|
3142
|
+
if (abort) {
|
|
3143
|
+
try {
|
|
3144
|
+
this.xdr.abort();
|
|
3145
|
+
} catch (x) {
|
|
3146
|
+
// intentionally empty
|
|
3147
|
+
}
|
|
3148
|
+
}
|
|
3149
|
+
this.unloadRef = this.xdr = null;
|
|
3150
|
+
};
|
|
3151
|
+
XDRObject.prototype.close = function() {
|
|
3152
|
+
debug('close');
|
|
3153
|
+
this._cleanup(true);
|
|
3154
|
+
};
|
|
3155
|
+
// IE 8/9 if the request target uses the same scheme - #79
|
|
3156
|
+
XDRObject.enabled = !!(__webpack_require__.g.XDomainRequest && browser.hasDomain());
|
|
3157
|
+
module.exports = XDRObject;
|
|
3158
|
+
|
|
3159
|
+
|
|
3160
|
+
}),
|
|
3161
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/sender/xhr-cors.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
3162
|
+
"use strict";
|
|
3163
|
+
|
|
3164
|
+
var inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), XhrDriver = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/browser/abstract-xhr.js");
|
|
3165
|
+
function XHRCorsObject(method, url, payload, opts) {
|
|
3166
|
+
XhrDriver.call(this, method, url, payload, opts);
|
|
3167
|
+
}
|
|
3168
|
+
inherits(XHRCorsObject, XhrDriver);
|
|
3169
|
+
XHRCorsObject.enabled = XhrDriver.enabled && XhrDriver.supportsCORS;
|
|
3170
|
+
module.exports = XHRCorsObject;
|
|
3171
|
+
|
|
3172
|
+
|
|
3173
|
+
}),
|
|
3174
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/sender/xhr-fake.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
3175
|
+
"use strict";
|
|
3176
|
+
|
|
3177
|
+
var EventEmitter = (__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/event/emitter.js")/* .EventEmitter */.EventEmitter), inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js");
|
|
3178
|
+
function XHRFake() {
|
|
3179
|
+
var self = this;
|
|
3180
|
+
EventEmitter.call(this);
|
|
3181
|
+
this.to = setTimeout(function() {
|
|
3182
|
+
self.emit('finish', 200, '{}');
|
|
3183
|
+
}, XHRFake.timeout);
|
|
3184
|
+
}
|
|
3185
|
+
inherits(XHRFake, EventEmitter);
|
|
3186
|
+
XHRFake.prototype.close = function() {
|
|
3187
|
+
clearTimeout(this.to);
|
|
3188
|
+
};
|
|
3189
|
+
XHRFake.timeout = 2000;
|
|
3190
|
+
module.exports = XHRFake;
|
|
3191
|
+
|
|
3192
|
+
|
|
3193
|
+
}),
|
|
3194
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/sender/xhr-local.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
3195
|
+
"use strict";
|
|
3196
|
+
|
|
3197
|
+
var inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), XhrDriver = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/browser/abstract-xhr.js");
|
|
3198
|
+
function XHRLocalObject(method, url, payload /*, opts */ ) {
|
|
3199
|
+
XhrDriver.call(this, method, url, payload, {
|
|
3200
|
+
noCredentials: true
|
|
3201
|
+
});
|
|
3202
|
+
}
|
|
3203
|
+
inherits(XHRLocalObject, XhrDriver);
|
|
3204
|
+
XHRLocalObject.enabled = XhrDriver.enabled;
|
|
3205
|
+
module.exports = XHRLocalObject;
|
|
3206
|
+
|
|
3207
|
+
|
|
3208
|
+
}),
|
|
3209
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/websocket.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
3210
|
+
"use strict";
|
|
3211
|
+
|
|
3212
|
+
var utils = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/event.js"), urlUtils = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/url.js"), inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), EventEmitter = (__webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/event/emitter.js")/* .EventEmitter */.EventEmitter), WebsocketDriver = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/browser/websocket.js");
|
|
3213
|
+
var debug = function debug() {};
|
|
3214
|
+
if (true) {
|
|
3215
|
+
debug = __webpack_require__("../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js")('sockjs-client:websocket');
|
|
3216
|
+
}
|
|
3217
|
+
function WebSocketTransport(transUrl, ignore, options) {
|
|
3218
|
+
if (!WebSocketTransport.enabled()) {
|
|
3219
|
+
throw new Error('Transport created when disabled');
|
|
3220
|
+
}
|
|
3221
|
+
EventEmitter.call(this);
|
|
3222
|
+
debug('constructor', transUrl);
|
|
3223
|
+
var self = this;
|
|
3224
|
+
var url = urlUtils.addPath(transUrl, '/websocket');
|
|
3225
|
+
if (url.slice(0, 5) === 'https') {
|
|
3226
|
+
url = 'wss' + url.slice(5);
|
|
3227
|
+
} else {
|
|
3228
|
+
url = 'ws' + url.slice(4);
|
|
3229
|
+
}
|
|
3230
|
+
this.url = url;
|
|
3231
|
+
this.ws = new WebsocketDriver(this.url, [], options);
|
|
3232
|
+
this.ws.onmessage = function(e) {
|
|
3233
|
+
debug('message event', e.data);
|
|
3234
|
+
self.emit('message', e.data);
|
|
3235
|
+
};
|
|
3236
|
+
// Firefox has an interesting bug. If a websocket connection is
|
|
3237
|
+
// created after onunload, it stays alive even when user
|
|
3238
|
+
// navigates away from the page. In such situation let's lie -
|
|
3239
|
+
// let's not open the ws connection at all. See:
|
|
3240
|
+
// https://github.com/sockjs/sockjs-client/issues/28
|
|
3241
|
+
// https://bugzilla.mozilla.org/show_bug.cgi?id=696085
|
|
3242
|
+
this.unloadRef = utils.unloadAdd(function() {
|
|
3243
|
+
debug('unload');
|
|
3244
|
+
self.ws.close();
|
|
3245
|
+
});
|
|
3246
|
+
this.ws.onclose = function(e) {
|
|
3247
|
+
debug('close event', e.code, e.reason);
|
|
3248
|
+
self.emit('close', e.code, e.reason);
|
|
3249
|
+
self._cleanup();
|
|
3250
|
+
};
|
|
3251
|
+
this.ws.onerror = function(e) {
|
|
3252
|
+
debug('error event', e);
|
|
3253
|
+
self.emit('close', 1006, 'WebSocket connection broken');
|
|
3254
|
+
self._cleanup();
|
|
3255
|
+
};
|
|
3256
|
+
}
|
|
3257
|
+
inherits(WebSocketTransport, EventEmitter);
|
|
3258
|
+
WebSocketTransport.prototype.send = function(data) {
|
|
3259
|
+
var msg = '[' + data + ']';
|
|
3260
|
+
debug('send', msg);
|
|
3261
|
+
this.ws.send(msg);
|
|
3262
|
+
};
|
|
3263
|
+
WebSocketTransport.prototype.close = function() {
|
|
3264
|
+
debug('close');
|
|
3265
|
+
var ws = this.ws;
|
|
3266
|
+
this._cleanup();
|
|
3267
|
+
if (ws) {
|
|
3268
|
+
ws.close();
|
|
3269
|
+
}
|
|
3270
|
+
};
|
|
3271
|
+
WebSocketTransport.prototype._cleanup = function() {
|
|
3272
|
+
debug('_cleanup');
|
|
3273
|
+
var ws = this.ws;
|
|
3274
|
+
if (ws) {
|
|
3275
|
+
ws.onmessage = ws.onclose = ws.onerror = null;
|
|
3276
|
+
}
|
|
3277
|
+
utils.unloadDel(this.unloadRef);
|
|
3278
|
+
this.unloadRef = this.ws = null;
|
|
3279
|
+
this.removeAllListeners();
|
|
3280
|
+
};
|
|
3281
|
+
WebSocketTransport.enabled = function() {
|
|
3282
|
+
debug('enabled');
|
|
3283
|
+
return !!WebsocketDriver;
|
|
3284
|
+
};
|
|
3285
|
+
WebSocketTransport.transportName = 'websocket';
|
|
3286
|
+
// In theory, ws should require 1 round trip. But in chrome, this is
|
|
3287
|
+
// not very stable over SSL. Most likely a ws connection requires a
|
|
3288
|
+
// separate SSL connection, in which case 2 round trips are an
|
|
3289
|
+
// absolute minumum.
|
|
3290
|
+
WebSocketTransport.roundTrips = 2;
|
|
3291
|
+
module.exports = WebSocketTransport;
|
|
3292
|
+
|
|
3293
|
+
|
|
3294
|
+
}),
|
|
3295
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/xdr-polling.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
3296
|
+
"use strict";
|
|
3297
|
+
|
|
3298
|
+
var inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), AjaxBasedTransport = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/lib/ajax-based.js"), XdrStreamingTransport = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/xdr-streaming.js"), XhrReceiver = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/receiver/xhr.js"), XDRObject = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/sender/xdr.js");
|
|
3299
|
+
function XdrPollingTransport(transUrl) {
|
|
3300
|
+
if (!XDRObject.enabled) {
|
|
3301
|
+
throw new Error('Transport created when disabled');
|
|
3302
|
+
}
|
|
3303
|
+
AjaxBasedTransport.call(this, transUrl, '/xhr', XhrReceiver, XDRObject);
|
|
3304
|
+
}
|
|
3305
|
+
inherits(XdrPollingTransport, AjaxBasedTransport);
|
|
3306
|
+
XdrPollingTransport.enabled = XdrStreamingTransport.enabled;
|
|
3307
|
+
XdrPollingTransport.transportName = 'xdr-polling';
|
|
3308
|
+
XdrPollingTransport.roundTrips = 2; // preflight, ajax
|
|
3309
|
+
module.exports = XdrPollingTransport;
|
|
3310
|
+
|
|
3311
|
+
|
|
3312
|
+
}),
|
|
3313
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/xdr-streaming.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
3314
|
+
"use strict";
|
|
3315
|
+
|
|
3316
|
+
var inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), AjaxBasedTransport = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/lib/ajax-based.js"), XhrReceiver = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/receiver/xhr.js"), XDRObject = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/sender/xdr.js");
|
|
3317
|
+
// According to:
|
|
3318
|
+
// http://stackoverflow.com/questions/1641507/detect-browser-support-for-cross-domain-xmlhttprequests
|
|
3319
|
+
// http://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/
|
|
3320
|
+
function XdrStreamingTransport(transUrl) {
|
|
3321
|
+
if (!XDRObject.enabled) {
|
|
3322
|
+
throw new Error('Transport created when disabled');
|
|
3323
|
+
}
|
|
3324
|
+
AjaxBasedTransport.call(this, transUrl, '/xhr_streaming', XhrReceiver, XDRObject);
|
|
3325
|
+
}
|
|
3326
|
+
inherits(XdrStreamingTransport, AjaxBasedTransport);
|
|
3327
|
+
XdrStreamingTransport.enabled = function(info) {
|
|
3328
|
+
if (info.cookie_needed || info.nullOrigin) {
|
|
3329
|
+
return false;
|
|
3330
|
+
}
|
|
3331
|
+
return XDRObject.enabled && info.sameScheme;
|
|
3332
|
+
};
|
|
3333
|
+
XdrStreamingTransport.transportName = 'xdr-streaming';
|
|
3334
|
+
XdrStreamingTransport.roundTrips = 2; // preflight, ajax
|
|
3335
|
+
module.exports = XdrStreamingTransport;
|
|
3336
|
+
|
|
3337
|
+
|
|
3338
|
+
}),
|
|
3339
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/xhr-polling.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
3340
|
+
"use strict";
|
|
3341
|
+
|
|
3342
|
+
var inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), AjaxBasedTransport = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/lib/ajax-based.js"), XhrReceiver = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/receiver/xhr.js"), XHRCorsObject = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/sender/xhr-cors.js"), XHRLocalObject = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/sender/xhr-local.js");
|
|
3343
|
+
function XhrPollingTransport(transUrl) {
|
|
3344
|
+
if (!XHRLocalObject.enabled && !XHRCorsObject.enabled) {
|
|
3345
|
+
throw new Error('Transport created when disabled');
|
|
3346
|
+
}
|
|
3347
|
+
AjaxBasedTransport.call(this, transUrl, '/xhr', XhrReceiver, XHRCorsObject);
|
|
3348
|
+
}
|
|
3349
|
+
inherits(XhrPollingTransport, AjaxBasedTransport);
|
|
3350
|
+
XhrPollingTransport.enabled = function(info) {
|
|
3351
|
+
if (info.nullOrigin) {
|
|
3352
|
+
return false;
|
|
3353
|
+
}
|
|
3354
|
+
if (XHRLocalObject.enabled && info.sameOrigin) {
|
|
3355
|
+
return true;
|
|
3356
|
+
}
|
|
3357
|
+
return XHRCorsObject.enabled;
|
|
3358
|
+
};
|
|
3359
|
+
XhrPollingTransport.transportName = 'xhr-polling';
|
|
3360
|
+
XhrPollingTransport.roundTrips = 2; // preflight, ajax
|
|
3361
|
+
module.exports = XhrPollingTransport;
|
|
3362
|
+
|
|
3363
|
+
|
|
3364
|
+
}),
|
|
3365
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/xhr-streaming.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
3366
|
+
"use strict";
|
|
3367
|
+
|
|
3368
|
+
var inherits = __webpack_require__("../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"), AjaxBasedTransport = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/lib/ajax-based.js"), XhrReceiver = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/receiver/xhr.js"), XHRCorsObject = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/sender/xhr-cors.js"), XHRLocalObject = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/transport/sender/xhr-local.js"), browser = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/browser.js");
|
|
3369
|
+
function XhrStreamingTransport(transUrl) {
|
|
3370
|
+
if (!XHRLocalObject.enabled && !XHRCorsObject.enabled) {
|
|
3371
|
+
throw new Error('Transport created when disabled');
|
|
3372
|
+
}
|
|
3373
|
+
AjaxBasedTransport.call(this, transUrl, '/xhr_streaming', XhrReceiver, XHRCorsObject);
|
|
3374
|
+
}
|
|
3375
|
+
inherits(XhrStreamingTransport, AjaxBasedTransport);
|
|
3376
|
+
XhrStreamingTransport.enabled = function(info) {
|
|
3377
|
+
if (info.nullOrigin) {
|
|
3378
|
+
return false;
|
|
3379
|
+
}
|
|
3380
|
+
// Opera doesn't support xhr-streaming #60
|
|
3381
|
+
// But it might be able to #92
|
|
3382
|
+
if (browser.isOpera()) {
|
|
3383
|
+
return false;
|
|
3384
|
+
}
|
|
3385
|
+
return XHRCorsObject.enabled;
|
|
3386
|
+
};
|
|
3387
|
+
XhrStreamingTransport.transportName = 'xhr-streaming';
|
|
3388
|
+
XhrStreamingTransport.roundTrips = 2; // preflight, ajax
|
|
3389
|
+
// Safari gets confused when a streaming ajax request is started
|
|
3390
|
+
// before onload. This causes the load indicator to spin indefinetely.
|
|
3391
|
+
// Only require body when used in a browser
|
|
3392
|
+
XhrStreamingTransport.needBody = !!__webpack_require__.g.document;
|
|
3393
|
+
module.exports = XhrStreamingTransport;
|
|
3394
|
+
|
|
3395
|
+
|
|
3396
|
+
}),
|
|
3397
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/browser-crypto.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
3398
|
+
"use strict";
|
|
3399
|
+
|
|
3400
|
+
if (__webpack_require__.g.crypto && __webpack_require__.g.crypto.getRandomValues) {
|
|
3401
|
+
module.exports.randomBytes = function(length) {
|
|
3402
|
+
var bytes = new Uint8Array(length);
|
|
3403
|
+
__webpack_require__.g.crypto.getRandomValues(bytes);
|
|
3404
|
+
return bytes;
|
|
3405
|
+
};
|
|
3406
|
+
} else {
|
|
3407
|
+
module.exports.randomBytes = function(length) {
|
|
3408
|
+
var bytes = new Array(length);
|
|
3409
|
+
for(var i = 0; i < length; i++){
|
|
3410
|
+
bytes[i] = Math.floor(Math.random() * 256);
|
|
3411
|
+
}
|
|
3412
|
+
return bytes;
|
|
3413
|
+
};
|
|
3414
|
+
}
|
|
3415
|
+
|
|
3416
|
+
|
|
3417
|
+
}),
|
|
3418
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/browser.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
3419
|
+
"use strict";
|
|
3420
|
+
|
|
3421
|
+
module.exports = {
|
|
3422
|
+
isOpera: function isOpera() {
|
|
3423
|
+
return __webpack_require__.g.navigator && /opera/i.test(__webpack_require__.g.navigator.userAgent);
|
|
3424
|
+
},
|
|
3425
|
+
isKonqueror: function isKonqueror() {
|
|
3426
|
+
return __webpack_require__.g.navigator && /konqueror/i.test(__webpack_require__.g.navigator.userAgent);
|
|
3427
|
+
},
|
|
3428
|
+
hasDomain: function hasDomain() {
|
|
3429
|
+
// non-browser client always has a domain
|
|
3430
|
+
if (!__webpack_require__.g.document) {
|
|
3431
|
+
return true;
|
|
3432
|
+
}
|
|
3433
|
+
try {
|
|
3434
|
+
return !!__webpack_require__.g.document.domain;
|
|
3435
|
+
} catch (e) {
|
|
3436
|
+
return false;
|
|
3437
|
+
}
|
|
3438
|
+
}
|
|
3439
|
+
};
|
|
3440
|
+
|
|
3441
|
+
|
|
3442
|
+
}),
|
|
3443
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/escape.js": (function (module) {
|
|
3444
|
+
"use strict";
|
|
3445
|
+
|
|
3446
|
+
// Some extra characters that Chrome gets wrong, and substitutes with
|
|
3447
|
+
// something else on the wire.
|
|
3448
|
+
// eslint-disable-next-line no-control-regex, no-misleading-character-class
|
|
3449
|
+
var extraEscapable = /[\x00-\x1f\ud800-\udfff\ufffe\uffff\u0300-\u0333\u033d-\u0346\u034a-\u034c\u0350-\u0352\u0357-\u0358\u035c-\u0362\u0374\u037e\u0387\u0591-\u05af\u05c4\u0610-\u0617\u0653-\u0654\u0657-\u065b\u065d-\u065e\u06df-\u06e2\u06eb-\u06ec\u0730\u0732-\u0733\u0735-\u0736\u073a\u073d\u073f-\u0741\u0743\u0745\u0747\u07eb-\u07f1\u0951\u0958-\u095f\u09dc-\u09dd\u09df\u0a33\u0a36\u0a59-\u0a5b\u0a5e\u0b5c-\u0b5d\u0e38-\u0e39\u0f43\u0f4d\u0f52\u0f57\u0f5c\u0f69\u0f72-\u0f76\u0f78\u0f80-\u0f83\u0f93\u0f9d\u0fa2\u0fa7\u0fac\u0fb9\u1939-\u193a\u1a17\u1b6b\u1cda-\u1cdb\u1dc0-\u1dcf\u1dfc\u1dfe\u1f71\u1f73\u1f75\u1f77\u1f79\u1f7b\u1f7d\u1fbb\u1fbe\u1fc9\u1fcb\u1fd3\u1fdb\u1fe3\u1feb\u1fee-\u1fef\u1ff9\u1ffb\u1ffd\u2000-\u2001\u20d0-\u20d1\u20d4-\u20d7\u20e7-\u20e9\u2126\u212a-\u212b\u2329-\u232a\u2adc\u302b-\u302c\uaab2-\uaab3\uf900-\ufa0d\ufa10\ufa12\ufa15-\ufa1e\ufa20\ufa22\ufa25-\ufa26\ufa2a-\ufa2d\ufa30-\ufa6d\ufa70-\ufad9\ufb1d\ufb1f\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufb4e\ufff0-\uffff]/g, extraLookup;
|
|
3450
|
+
// This may be quite slow, so let's delay until user actually uses bad
|
|
3451
|
+
// characters.
|
|
3452
|
+
var unrollLookup = function unrollLookup(escapable) {
|
|
3453
|
+
var i;
|
|
3454
|
+
var unrolled = {};
|
|
3455
|
+
var c = [];
|
|
3456
|
+
for(i = 0; i < 65536; i++){
|
|
3457
|
+
c.push(String.fromCharCode(i));
|
|
3458
|
+
}
|
|
3459
|
+
escapable.lastIndex = 0;
|
|
3460
|
+
c.join('').replace(escapable, function(a) {
|
|
3461
|
+
unrolled[a] = '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
|
|
3462
|
+
return '';
|
|
3463
|
+
});
|
|
3464
|
+
escapable.lastIndex = 0;
|
|
3465
|
+
return unrolled;
|
|
3466
|
+
};
|
|
3467
|
+
// Quote string, also taking care of unicode characters that browsers
|
|
3468
|
+
// often break. Especially, take care of unicode surrogates:
|
|
3469
|
+
// http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Surrogates
|
|
3470
|
+
module.exports = {
|
|
3471
|
+
quote: function quote(string) {
|
|
3472
|
+
var quoted = JSON.stringify(string);
|
|
3473
|
+
// In most cases this should be very fast and good enough.
|
|
3474
|
+
extraEscapable.lastIndex = 0;
|
|
3475
|
+
if (!extraEscapable.test(quoted)) {
|
|
3476
|
+
return quoted;
|
|
3477
|
+
}
|
|
3478
|
+
if (!extraLookup) {
|
|
3479
|
+
extraLookup = unrollLookup(extraEscapable);
|
|
3480
|
+
}
|
|
3481
|
+
return quoted.replace(extraEscapable, function(a) {
|
|
3482
|
+
return extraLookup[a];
|
|
3483
|
+
});
|
|
3484
|
+
}
|
|
3485
|
+
};
|
|
3486
|
+
|
|
3487
|
+
|
|
3488
|
+
}),
|
|
3489
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/event.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
3490
|
+
"use strict";
|
|
3491
|
+
|
|
3492
|
+
var random = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/random.js");
|
|
3493
|
+
var onUnload = {}, afterUnload = false, isChromePackagedApp = __webpack_require__.g.chrome && __webpack_require__.g.chrome.app && __webpack_require__.g.chrome.app.runtime;
|
|
3494
|
+
module.exports = {
|
|
3495
|
+
attachEvent: function attachEvent(event, listener) {
|
|
3496
|
+
if (typeof __webpack_require__.g.addEventListener !== 'undefined') {
|
|
3497
|
+
__webpack_require__.g.addEventListener(event, listener, false);
|
|
3498
|
+
} else if (__webpack_require__.g.document && __webpack_require__.g.attachEvent) {
|
|
3499
|
+
// IE quirks.
|
|
3500
|
+
// According to: http://stevesouders.com/misc/test-postmessage.php
|
|
3501
|
+
// the message gets delivered only to 'document', not 'window'.
|
|
3502
|
+
__webpack_require__.g.document.attachEvent('on' + event, listener);
|
|
3503
|
+
// I get 'window' for ie8.
|
|
3504
|
+
__webpack_require__.g.attachEvent('on' + event, listener);
|
|
3505
|
+
}
|
|
3506
|
+
},
|
|
3507
|
+
detachEvent: function detachEvent(event, listener) {
|
|
3508
|
+
if (typeof __webpack_require__.g.addEventListener !== 'undefined') {
|
|
3509
|
+
__webpack_require__.g.removeEventListener(event, listener, false);
|
|
3510
|
+
} else if (__webpack_require__.g.document && __webpack_require__.g.detachEvent) {
|
|
3511
|
+
__webpack_require__.g.document.detachEvent('on' + event, listener);
|
|
3512
|
+
__webpack_require__.g.detachEvent('on' + event, listener);
|
|
3513
|
+
}
|
|
3514
|
+
},
|
|
3515
|
+
unloadAdd: function unloadAdd(listener) {
|
|
3516
|
+
if (isChromePackagedApp) {
|
|
3517
|
+
return null;
|
|
3518
|
+
}
|
|
3519
|
+
var ref = random.string(8);
|
|
3520
|
+
onUnload[ref] = listener;
|
|
3521
|
+
if (afterUnload) {
|
|
3522
|
+
setTimeout(this.triggerUnloadCallbacks, 0);
|
|
3523
|
+
}
|
|
3524
|
+
return ref;
|
|
3525
|
+
},
|
|
3526
|
+
unloadDel: function unloadDel(ref) {
|
|
3527
|
+
if (ref in onUnload) {
|
|
3528
|
+
delete onUnload[ref];
|
|
3529
|
+
}
|
|
3530
|
+
},
|
|
3531
|
+
triggerUnloadCallbacks: function triggerUnloadCallbacks() {
|
|
3532
|
+
for(var ref in onUnload){
|
|
3533
|
+
onUnload[ref]();
|
|
3534
|
+
delete onUnload[ref];
|
|
3535
|
+
}
|
|
3536
|
+
}
|
|
3537
|
+
};
|
|
3538
|
+
var unloadTriggered = function unloadTriggered() {
|
|
3539
|
+
if (afterUnload) {
|
|
3540
|
+
return;
|
|
3541
|
+
}
|
|
3542
|
+
afterUnload = true;
|
|
3543
|
+
module.exports.triggerUnloadCallbacks();
|
|
3544
|
+
};
|
|
3545
|
+
// 'unload' alone is not reliable in opera within an iframe, but we
|
|
3546
|
+
// can't use `beforeunload` as IE fires it on javascript: links.
|
|
3547
|
+
if (!isChromePackagedApp) {
|
|
3548
|
+
module.exports.attachEvent('unload', unloadTriggered);
|
|
3549
|
+
}
|
|
3550
|
+
|
|
3551
|
+
|
|
3552
|
+
}),
|
|
3553
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/iframe.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
3554
|
+
"use strict";
|
|
3555
|
+
|
|
3556
|
+
function _type_of(obj) {
|
|
3557
|
+
"@swc/helpers - typeof";
|
|
3558
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
3559
|
+
}
|
|
3560
|
+
var eventUtils = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/event.js"), browser = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/browser.js");
|
|
3561
|
+
var debug = function debug() {};
|
|
3562
|
+
if (true) {
|
|
3563
|
+
debug = __webpack_require__("../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js")('sockjs-client:utils:iframe');
|
|
3564
|
+
}
|
|
3565
|
+
module.exports = {
|
|
3566
|
+
WPrefix: '_jp',
|
|
3567
|
+
currentWindowId: null,
|
|
3568
|
+
polluteGlobalNamespace: function polluteGlobalNamespace() {
|
|
3569
|
+
if (!(module.exports.WPrefix in __webpack_require__.g)) {
|
|
3570
|
+
__webpack_require__.g[module.exports.WPrefix] = {};
|
|
3571
|
+
}
|
|
3572
|
+
},
|
|
3573
|
+
postMessage: function postMessage(type, data) {
|
|
3574
|
+
if (__webpack_require__.g.parent !== __webpack_require__.g) {
|
|
3575
|
+
__webpack_require__.g.parent.postMessage(JSON.stringify({
|
|
3576
|
+
windowId: module.exports.currentWindowId,
|
|
3577
|
+
type: type,
|
|
3578
|
+
data: data || ''
|
|
3579
|
+
}), '*');
|
|
3580
|
+
} else {
|
|
3581
|
+
debug('Cannot postMessage, no parent window.', type, data);
|
|
3582
|
+
}
|
|
3583
|
+
},
|
|
3584
|
+
createIframe: function createIframe(iframeUrl, errorCallback) {
|
|
3585
|
+
var iframe = __webpack_require__.g.document.createElement('iframe');
|
|
3586
|
+
var tref, unloadRef;
|
|
3587
|
+
var unattach = function unattach() {
|
|
3588
|
+
debug('unattach');
|
|
3589
|
+
clearTimeout(tref);
|
|
3590
|
+
// Explorer had problems with that.
|
|
3591
|
+
try {
|
|
3592
|
+
iframe.onload = null;
|
|
3593
|
+
} catch (x) {
|
|
3594
|
+
// intentionally empty
|
|
3595
|
+
}
|
|
3596
|
+
iframe.onerror = null;
|
|
3597
|
+
};
|
|
3598
|
+
var cleanup = function cleanup() {
|
|
3599
|
+
debug('cleanup');
|
|
3600
|
+
if (iframe) {
|
|
3601
|
+
unattach();
|
|
3602
|
+
// This timeout makes chrome fire onbeforeunload event
|
|
3603
|
+
// within iframe. Without the timeout it goes straight to
|
|
3604
|
+
// onunload.
|
|
3605
|
+
setTimeout(function() {
|
|
3606
|
+
if (iframe) {
|
|
3607
|
+
iframe.parentNode.removeChild(iframe);
|
|
3608
|
+
}
|
|
3609
|
+
iframe = null;
|
|
3610
|
+
}, 0);
|
|
3611
|
+
eventUtils.unloadDel(unloadRef);
|
|
3612
|
+
}
|
|
3613
|
+
};
|
|
3614
|
+
var onerror = function onerror(err) {
|
|
3615
|
+
debug('onerror', err);
|
|
3616
|
+
if (iframe) {
|
|
3617
|
+
cleanup();
|
|
3618
|
+
errorCallback(err);
|
|
3619
|
+
}
|
|
3620
|
+
};
|
|
3621
|
+
var post = function post(msg, origin) {
|
|
3622
|
+
debug('post', msg, origin);
|
|
3623
|
+
setTimeout(function() {
|
|
3624
|
+
try {
|
|
3625
|
+
// When the iframe is not loaded, IE raises an exception
|
|
3626
|
+
// on 'contentWindow'.
|
|
3627
|
+
if (iframe && iframe.contentWindow) {
|
|
3628
|
+
iframe.contentWindow.postMessage(msg, origin);
|
|
3629
|
+
}
|
|
3630
|
+
} catch (x) {
|
|
3631
|
+
// intentionally empty
|
|
3632
|
+
}
|
|
3633
|
+
}, 0);
|
|
3634
|
+
};
|
|
3635
|
+
iframe.src = iframeUrl;
|
|
3636
|
+
iframe.style.display = 'none';
|
|
3637
|
+
iframe.style.position = 'absolute';
|
|
3638
|
+
iframe.onerror = function() {
|
|
3639
|
+
onerror('onerror');
|
|
3640
|
+
};
|
|
3641
|
+
iframe.onload = function() {
|
|
3642
|
+
debug('onload');
|
|
3643
|
+
// `onload` is triggered before scripts on the iframe are
|
|
3644
|
+
// executed. Give it few seconds to actually load stuff.
|
|
3645
|
+
clearTimeout(tref);
|
|
3646
|
+
tref = setTimeout(function() {
|
|
3647
|
+
onerror('onload timeout');
|
|
3648
|
+
}, 2000);
|
|
3649
|
+
};
|
|
3650
|
+
__webpack_require__.g.document.body.appendChild(iframe);
|
|
3651
|
+
tref = setTimeout(function() {
|
|
3652
|
+
onerror('timeout');
|
|
3653
|
+
}, 15000);
|
|
3654
|
+
unloadRef = eventUtils.unloadAdd(cleanup);
|
|
3655
|
+
return {
|
|
3656
|
+
post: post,
|
|
3657
|
+
cleanup: cleanup,
|
|
3658
|
+
loaded: unattach
|
|
3659
|
+
};
|
|
3660
|
+
},
|
|
3661
|
+
createHtmlfile: function createHtmlfile(iframeUrl, errorCallback) {
|
|
3662
|
+
var axo = [
|
|
3663
|
+
'Active'
|
|
3664
|
+
].concat('Object').join('X');
|
|
3665
|
+
var doc = new __webpack_require__.g[axo]('htmlfile');
|
|
3666
|
+
var tref, unloadRef;
|
|
3667
|
+
var iframe;
|
|
3668
|
+
var unattach = function unattach() {
|
|
3669
|
+
clearTimeout(tref);
|
|
3670
|
+
iframe.onerror = null;
|
|
3671
|
+
};
|
|
3672
|
+
var cleanup = function cleanup() {
|
|
3673
|
+
if (doc) {
|
|
3674
|
+
unattach();
|
|
3675
|
+
eventUtils.unloadDel(unloadRef);
|
|
3676
|
+
iframe.parentNode.removeChild(iframe);
|
|
3677
|
+
iframe = doc = null;
|
|
3678
|
+
CollectGarbage();
|
|
3679
|
+
}
|
|
3680
|
+
};
|
|
3681
|
+
var onerror = function onerror(r) {
|
|
3682
|
+
debug('onerror', r);
|
|
3683
|
+
if (doc) {
|
|
3684
|
+
cleanup();
|
|
3685
|
+
errorCallback(r);
|
|
3686
|
+
}
|
|
3687
|
+
};
|
|
3688
|
+
var post = function post(msg, origin) {
|
|
3689
|
+
try {
|
|
3690
|
+
// When the iframe is not loaded, IE raises an exception
|
|
3691
|
+
// on 'contentWindow'.
|
|
3692
|
+
setTimeout(function() {
|
|
3693
|
+
if (iframe && iframe.contentWindow) {
|
|
3694
|
+
iframe.contentWindow.postMessage(msg, origin);
|
|
3695
|
+
}
|
|
3696
|
+
}, 0);
|
|
3697
|
+
} catch (x) {
|
|
3698
|
+
// intentionally empty
|
|
3699
|
+
}
|
|
3700
|
+
};
|
|
3701
|
+
doc.open();
|
|
3702
|
+
doc.write('<html><s' + 'cript>' + 'document.domain="' + __webpack_require__.g.document.domain + '";' + '</s' + 'cript></html>');
|
|
3703
|
+
doc.close();
|
|
3704
|
+
doc.parentWindow[module.exports.WPrefix] = __webpack_require__.g[module.exports.WPrefix];
|
|
3705
|
+
var c = doc.createElement('div');
|
|
3706
|
+
doc.body.appendChild(c);
|
|
3707
|
+
iframe = doc.createElement('iframe');
|
|
3708
|
+
c.appendChild(iframe);
|
|
3709
|
+
iframe.src = iframeUrl;
|
|
3710
|
+
iframe.onerror = function() {
|
|
3711
|
+
onerror('onerror');
|
|
3712
|
+
};
|
|
3713
|
+
tref = setTimeout(function() {
|
|
3714
|
+
onerror('timeout');
|
|
3715
|
+
}, 15000);
|
|
3716
|
+
unloadRef = eventUtils.unloadAdd(cleanup);
|
|
3717
|
+
return {
|
|
3718
|
+
post: post,
|
|
3719
|
+
cleanup: cleanup,
|
|
3720
|
+
loaded: unattach
|
|
3721
|
+
};
|
|
3722
|
+
}
|
|
3723
|
+
};
|
|
3724
|
+
module.exports.iframeEnabled = false;
|
|
3725
|
+
if (__webpack_require__.g.document) {
|
|
3726
|
+
// postMessage misbehaves in konqueror 4.6.5 - the messages are delivered with
|
|
3727
|
+
// huge delay, or not at all.
|
|
3728
|
+
module.exports.iframeEnabled = (typeof __webpack_require__.g.postMessage === 'function' || _type_of(__webpack_require__.g.postMessage) === 'object') && !browser.isKonqueror();
|
|
3729
|
+
}
|
|
3730
|
+
|
|
3731
|
+
|
|
3732
|
+
}),
|
|
3733
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/log.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
3734
|
+
"use strict";
|
|
3735
|
+
|
|
3736
|
+
var logObject = {};
|
|
3737
|
+
[
|
|
3738
|
+
'log',
|
|
3739
|
+
'debug',
|
|
3740
|
+
'warn'
|
|
3741
|
+
].forEach(function(level) {
|
|
3742
|
+
var levelExists;
|
|
3743
|
+
try {
|
|
3744
|
+
levelExists = __webpack_require__.g.console && __webpack_require__.g.console[level] && __webpack_require__.g.console[level].apply;
|
|
3745
|
+
} catch (e) {
|
|
3746
|
+
// do nothing
|
|
3747
|
+
}
|
|
3748
|
+
logObject[level] = levelExists ? function() {
|
|
3749
|
+
return __webpack_require__.g.console[level].apply(__webpack_require__.g.console, arguments);
|
|
3750
|
+
} : level === 'log' ? function() {} : logObject.log;
|
|
3751
|
+
});
|
|
3752
|
+
module.exports = logObject;
|
|
3753
|
+
|
|
3754
|
+
|
|
3755
|
+
}),
|
|
3756
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/object.js": (function (module) {
|
|
3757
|
+
"use strict";
|
|
3758
|
+
|
|
3759
|
+
function _type_of(obj) {
|
|
3760
|
+
"@swc/helpers - typeof";
|
|
3761
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
3762
|
+
}
|
|
3763
|
+
module.exports = {
|
|
3764
|
+
isObject: function isObject(obj) {
|
|
3765
|
+
var type = typeof obj === "undefined" ? "undefined" : _type_of(obj);
|
|
3766
|
+
return type === 'function' || type === 'object' && !!obj;
|
|
3767
|
+
},
|
|
3768
|
+
extend: function extend(obj) {
|
|
3769
|
+
if (!this.isObject(obj)) {
|
|
3770
|
+
return obj;
|
|
3771
|
+
}
|
|
3772
|
+
var source, prop;
|
|
3773
|
+
for(var i = 1, length = arguments.length; i < length; i++){
|
|
3774
|
+
source = arguments[i];
|
|
3775
|
+
for(prop in source){
|
|
3776
|
+
if (Object.prototype.hasOwnProperty.call(source, prop)) {
|
|
3777
|
+
obj[prop] = source[prop];
|
|
3778
|
+
}
|
|
3779
|
+
}
|
|
3780
|
+
}
|
|
3781
|
+
return obj;
|
|
3782
|
+
}
|
|
3783
|
+
};
|
|
3784
|
+
|
|
3785
|
+
|
|
3786
|
+
}),
|
|
3787
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/random.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
3788
|
+
"use strict";
|
|
3789
|
+
|
|
3790
|
+
var crypto = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/browser-crypto.js");
|
|
3791
|
+
// This string has length 32, a power of 2, so the modulus doesn't introduce a
|
|
3792
|
+
// bias.
|
|
3793
|
+
var _randomStringChars = 'abcdefghijklmnopqrstuvwxyz012345';
|
|
3794
|
+
module.exports = {
|
|
3795
|
+
string: function string(length) {
|
|
3796
|
+
var max = _randomStringChars.length;
|
|
3797
|
+
var bytes = crypto.randomBytes(length);
|
|
3798
|
+
var ret = [];
|
|
3799
|
+
for(var i = 0; i < length; i++){
|
|
3800
|
+
ret.push(_randomStringChars.substr(bytes[i] % max, 1));
|
|
3801
|
+
}
|
|
3802
|
+
return ret.join('');
|
|
3803
|
+
},
|
|
3804
|
+
number: function number(max) {
|
|
3805
|
+
return Math.floor(Math.random() * max);
|
|
3806
|
+
},
|
|
3807
|
+
numberString: function numberString(max) {
|
|
3808
|
+
var t = ('' + (max - 1)).length;
|
|
3809
|
+
var p = new Array(t + 1).join('0');
|
|
3810
|
+
return (p + this.number(max)).slice(-t);
|
|
3811
|
+
}
|
|
3812
|
+
};
|
|
3813
|
+
|
|
3814
|
+
|
|
3815
|
+
}),
|
|
3816
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/transport.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
3817
|
+
"use strict";
|
|
3818
|
+
|
|
3819
|
+
var debug = function debug() {};
|
|
3820
|
+
if (true) {
|
|
3821
|
+
debug = __webpack_require__("../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js")('sockjs-client:utils:transport');
|
|
3822
|
+
}
|
|
3823
|
+
module.exports = function(availableTransports) {
|
|
3824
|
+
return {
|
|
3825
|
+
filterToEnabled: function filterToEnabled(transportsWhitelist, info) {
|
|
3826
|
+
var transports = {
|
|
3827
|
+
main: [],
|
|
3828
|
+
facade: []
|
|
3829
|
+
};
|
|
3830
|
+
if (!transportsWhitelist) {
|
|
3831
|
+
transportsWhitelist = [];
|
|
3832
|
+
} else if (typeof transportsWhitelist === 'string') {
|
|
3833
|
+
transportsWhitelist = [
|
|
3834
|
+
transportsWhitelist
|
|
3835
|
+
];
|
|
3836
|
+
}
|
|
3837
|
+
availableTransports.forEach(function(trans) {
|
|
3838
|
+
if (!trans) {
|
|
3839
|
+
return;
|
|
3840
|
+
}
|
|
3841
|
+
if (trans.transportName === 'websocket' && info.websocket === false) {
|
|
3842
|
+
debug('disabled from server', 'websocket');
|
|
3843
|
+
return;
|
|
3844
|
+
}
|
|
3845
|
+
if (transportsWhitelist.length && transportsWhitelist.indexOf(trans.transportName) === -1) {
|
|
3846
|
+
debug('not in whitelist', trans.transportName);
|
|
3847
|
+
return;
|
|
3848
|
+
}
|
|
3849
|
+
if (trans.enabled(info)) {
|
|
3850
|
+
debug('enabled', trans.transportName);
|
|
3851
|
+
transports.main.push(trans);
|
|
3852
|
+
if (trans.facadeTransport) {
|
|
3853
|
+
transports.facade.push(trans.facadeTransport);
|
|
3854
|
+
}
|
|
3855
|
+
} else {
|
|
3856
|
+
debug('disabled', trans.transportName);
|
|
3857
|
+
}
|
|
3858
|
+
});
|
|
3859
|
+
return transports;
|
|
3860
|
+
}
|
|
3861
|
+
};
|
|
3862
|
+
};
|
|
3863
|
+
|
|
3864
|
+
|
|
3865
|
+
}),
|
|
3866
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/utils/url.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
3867
|
+
"use strict";
|
|
3868
|
+
|
|
3869
|
+
var URL = __webpack_require__("../node_modules/.pnpm/url-parse@1.5.10/node_modules/url-parse/index.js");
|
|
3870
|
+
var debug = function debug() {};
|
|
3871
|
+
if (true) {
|
|
3872
|
+
debug = __webpack_require__("../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js")('sockjs-client:utils:url');
|
|
3873
|
+
}
|
|
3874
|
+
module.exports = {
|
|
3875
|
+
getOrigin: function getOrigin(url) {
|
|
3876
|
+
if (!url) {
|
|
3877
|
+
return null;
|
|
3878
|
+
}
|
|
3879
|
+
var p = new URL(url);
|
|
3880
|
+
if (p.protocol === 'file:') {
|
|
3881
|
+
return null;
|
|
3882
|
+
}
|
|
3883
|
+
var port = p.port;
|
|
3884
|
+
if (!port) {
|
|
3885
|
+
port = p.protocol === 'https:' ? '443' : '80';
|
|
3886
|
+
}
|
|
3887
|
+
return p.protocol + '//' + p.hostname + ':' + port;
|
|
3888
|
+
},
|
|
3889
|
+
isOriginEqual: function isOriginEqual(a, b) {
|
|
3890
|
+
var res = this.getOrigin(a) === this.getOrigin(b);
|
|
3891
|
+
debug('same', a, b, res);
|
|
3892
|
+
return res;
|
|
3893
|
+
},
|
|
3894
|
+
isSchemeEqual: function isSchemeEqual(a, b) {
|
|
3895
|
+
return a.split(':')[0] === b.split(':')[0];
|
|
3896
|
+
},
|
|
3897
|
+
addPath: function addPath(url, path) {
|
|
3898
|
+
var qs = url.split('?');
|
|
3899
|
+
return qs[0] + path + (qs[1] ? '?' + qs[1] : '');
|
|
3900
|
+
},
|
|
3901
|
+
addQuery: function addQuery(url, q) {
|
|
3902
|
+
return url + (url.indexOf('?') === -1 ? '?' + q : '&' + q);
|
|
3903
|
+
},
|
|
3904
|
+
isLoopbackAddr: function isLoopbackAddr(addr) {
|
|
3905
|
+
return /^127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) || /^\[::1\]$/.test(addr);
|
|
3906
|
+
}
|
|
3907
|
+
};
|
|
3908
|
+
|
|
3909
|
+
|
|
3910
|
+
}),
|
|
3911
|
+
"../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/version.js": (function (module) {
|
|
3912
|
+
module.exports = '1.6.1';
|
|
3913
|
+
|
|
3914
|
+
|
|
3915
|
+
}),
|
|
3916
|
+
"../node_modules/.pnpm/url-parse@1.5.10/node_modules/url-parse/index.js": (function (module, __unused_rspack_exports, __webpack_require__) {
|
|
3917
|
+
"use strict";
|
|
3918
|
+
|
|
3919
|
+
function _instanceof(left, right) {
|
|
3920
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
3921
|
+
return !!right[Symbol.hasInstance](left);
|
|
3922
|
+
} else {
|
|
3923
|
+
return left instanceof right;
|
|
3924
|
+
}
|
|
3925
|
+
}
|
|
3926
|
+
function _type_of(obj) {
|
|
3927
|
+
"@swc/helpers - typeof";
|
|
3928
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
3929
|
+
}
|
|
3930
|
+
var required = __webpack_require__("../node_modules/.pnpm/requires-port@1.0.0/node_modules/requires-port/index.js"), qs = __webpack_require__("../node_modules/.pnpm/querystringify@2.2.0/node_modules/querystringify/index.js"), controlOrWhitespace = /^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/, CRHTLF = /[\n\r\t]/g, slashes = /^[A-Za-z][A-Za-z0-9+-.]*:\/\//, port = /:\d+$/, protocolre = /^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i, windowsDriveLetter = /^[a-zA-Z]:/;
|
|
3931
|
+
/**
|
|
3932
|
+
* Remove control characters and whitespace from the beginning of a string.
|
|
3933
|
+
*
|
|
3934
|
+
* @param {Object|String} str String to trim.
|
|
3935
|
+
* @returns {String} A new string representing `str` stripped of control
|
|
3936
|
+
* characters and whitespace from its beginning.
|
|
3937
|
+
* @public
|
|
3938
|
+
*/ function trimLeft(str) {
|
|
3939
|
+
return (str ? str : '').toString().replace(controlOrWhitespace, '');
|
|
3940
|
+
}
|
|
3941
|
+
/**
|
|
3942
|
+
* These are the parse rules for the URL parser, it informs the parser
|
|
3943
|
+
* about:
|
|
3944
|
+
*
|
|
3945
|
+
* 0. The char it Needs to parse, if it's a string it should be done using
|
|
3946
|
+
* indexOf, RegExp using exec and NaN means set as current value.
|
|
3947
|
+
* 1. The property we should set when parsing this value.
|
|
3948
|
+
* 2. Indication if it's backwards or forward parsing, when set as number it's
|
|
3949
|
+
* the value of extra chars that should be split off.
|
|
3950
|
+
* 3. Inherit from location if non existing in the parser.
|
|
3951
|
+
* 4. `toLowerCase` the resulting value.
|
|
3952
|
+
*/ var rules = [
|
|
3953
|
+
[
|
|
3954
|
+
'#',
|
|
3955
|
+
'hash'
|
|
3956
|
+
],
|
|
3957
|
+
[
|
|
3958
|
+
'?',
|
|
3959
|
+
'query'
|
|
3960
|
+
],
|
|
3961
|
+
function sanitize(address, url) {
|
|
3962
|
+
return isSpecial(url.protocol) ? address.replace(/\\/g, '/') : address;
|
|
3963
|
+
},
|
|
3964
|
+
[
|
|
3965
|
+
'/',
|
|
3966
|
+
'pathname'
|
|
3967
|
+
],
|
|
3968
|
+
[
|
|
3969
|
+
'@',
|
|
3970
|
+
'auth',
|
|
3971
|
+
1
|
|
3972
|
+
],
|
|
3973
|
+
[
|
|
3974
|
+
NaN,
|
|
3975
|
+
'host',
|
|
3976
|
+
undefined,
|
|
3977
|
+
1,
|
|
3978
|
+
1
|
|
3979
|
+
],
|
|
3980
|
+
[
|
|
3981
|
+
/:(\d*)$/,
|
|
3982
|
+
'port',
|
|
3983
|
+
undefined,
|
|
3984
|
+
1
|
|
3985
|
+
],
|
|
3986
|
+
[
|
|
3987
|
+
NaN,
|
|
3988
|
+
'hostname',
|
|
3989
|
+
undefined,
|
|
3990
|
+
1,
|
|
3991
|
+
1
|
|
3992
|
+
] // Set left over.
|
|
3993
|
+
];
|
|
3994
|
+
/**
|
|
3995
|
+
* These properties should not be copied or inherited from. This is only needed
|
|
3996
|
+
* for all non blob URL's as a blob URL does not include a hash, only the
|
|
3997
|
+
* origin.
|
|
3998
|
+
*
|
|
3999
|
+
* @type {Object}
|
|
4000
|
+
* @private
|
|
4001
|
+
*/ var ignore = {
|
|
4002
|
+
hash: 1,
|
|
4003
|
+
query: 1
|
|
4004
|
+
};
|
|
4005
|
+
/**
|
|
4006
|
+
* The location object differs when your code is loaded through a normal page,
|
|
4007
|
+
* Worker or through a worker using a blob. And with the blobble begins the
|
|
4008
|
+
* trouble as the location object will contain the URL of the blob, not the
|
|
4009
|
+
* location of the page where our code is loaded in. The actual origin is
|
|
4010
|
+
* encoded in the `pathname` so we can thankfully generate a good "default"
|
|
4011
|
+
* location from it so we can generate proper relative URL's again.
|
|
4012
|
+
*
|
|
4013
|
+
* @param {Object|String} loc Optional default location object.
|
|
4014
|
+
* @returns {Object} lolcation object.
|
|
4015
|
+
* @public
|
|
4016
|
+
*/ function lolcation(loc) {
|
|
4017
|
+
var globalVar;
|
|
4018
|
+
if (typeof window !== 'undefined') globalVar = window;
|
|
4019
|
+
else if (typeof __webpack_require__.g !== 'undefined') globalVar = __webpack_require__.g;
|
|
4020
|
+
else if (typeof self !== 'undefined') globalVar = self;
|
|
4021
|
+
else globalVar = {};
|
|
4022
|
+
var location = globalVar.location || {};
|
|
4023
|
+
loc = loc || location;
|
|
4024
|
+
var finaldestination = {}, type = typeof loc === "undefined" ? "undefined" : _type_of(loc), key;
|
|
4025
|
+
if ('blob:' === loc.protocol) {
|
|
4026
|
+
finaldestination = new Url(unescape(loc.pathname), {});
|
|
4027
|
+
} else if ('string' === type) {
|
|
4028
|
+
finaldestination = new Url(loc, {});
|
|
4029
|
+
for(key in ignore)delete finaldestination[key];
|
|
4030
|
+
} else if ('object' === type) {
|
|
4031
|
+
for(key in loc){
|
|
4032
|
+
if (key in ignore) continue;
|
|
4033
|
+
finaldestination[key] = loc[key];
|
|
4034
|
+
}
|
|
4035
|
+
if (finaldestination.slashes === undefined) {
|
|
4036
|
+
finaldestination.slashes = slashes.test(loc.href);
|
|
4037
|
+
}
|
|
4038
|
+
}
|
|
4039
|
+
return finaldestination;
|
|
4040
|
+
}
|
|
4041
|
+
/**
|
|
4042
|
+
* Check whether a protocol scheme is special.
|
|
4043
|
+
*
|
|
4044
|
+
* @param {String} The protocol scheme of the URL
|
|
4045
|
+
* @return {Boolean} `true` if the protocol scheme is special, else `false`
|
|
4046
|
+
* @private
|
|
4047
|
+
*/ function isSpecial(scheme) {
|
|
4048
|
+
return scheme === 'file:' || scheme === 'ftp:' || scheme === 'http:' || scheme === 'https:' || scheme === 'ws:' || scheme === 'wss:';
|
|
4049
|
+
}
|
|
4050
|
+
/**
|
|
4051
|
+
* @typedef ProtocolExtract
|
|
4052
|
+
* @type Object
|
|
4053
|
+
* @property {String} protocol Protocol matched in the URL, in lowercase.
|
|
4054
|
+
* @property {Boolean} slashes `true` if protocol is followed by "//", else `false`.
|
|
4055
|
+
* @property {String} rest Rest of the URL that is not part of the protocol.
|
|
4056
|
+
*/ /**
|
|
4057
|
+
* Extract protocol information from a URL with/without double slash ("//").
|
|
4058
|
+
*
|
|
4059
|
+
* @param {String} address URL we want to extract from.
|
|
4060
|
+
* @param {Object} location
|
|
4061
|
+
* @return {ProtocolExtract} Extracted information.
|
|
4062
|
+
* @private
|
|
4063
|
+
*/ function extractProtocol(address, location) {
|
|
4064
|
+
address = trimLeft(address);
|
|
4065
|
+
address = address.replace(CRHTLF, '');
|
|
4066
|
+
location = location || {};
|
|
4067
|
+
var match = protocolre.exec(address);
|
|
4068
|
+
var protocol = match[1] ? match[1].toLowerCase() : '';
|
|
4069
|
+
var forwardSlashes = !!match[2];
|
|
4070
|
+
var otherSlashes = !!match[3];
|
|
4071
|
+
var slashesCount = 0;
|
|
4072
|
+
var rest;
|
|
4073
|
+
if (forwardSlashes) {
|
|
4074
|
+
if (otherSlashes) {
|
|
4075
|
+
rest = match[2] + match[3] + match[4];
|
|
4076
|
+
slashesCount = match[2].length + match[3].length;
|
|
4077
|
+
} else {
|
|
4078
|
+
rest = match[2] + match[4];
|
|
4079
|
+
slashesCount = match[2].length;
|
|
4080
|
+
}
|
|
4081
|
+
} else {
|
|
4082
|
+
if (otherSlashes) {
|
|
4083
|
+
rest = match[3] + match[4];
|
|
4084
|
+
slashesCount = match[3].length;
|
|
4085
|
+
} else {
|
|
4086
|
+
rest = match[4];
|
|
4087
|
+
}
|
|
4088
|
+
}
|
|
4089
|
+
if (protocol === 'file:') {
|
|
4090
|
+
if (slashesCount >= 2) {
|
|
4091
|
+
rest = rest.slice(2);
|
|
4092
|
+
}
|
|
4093
|
+
} else if (isSpecial(protocol)) {
|
|
4094
|
+
rest = match[4];
|
|
4095
|
+
} else if (protocol) {
|
|
4096
|
+
if (forwardSlashes) {
|
|
4097
|
+
rest = rest.slice(2);
|
|
4098
|
+
}
|
|
4099
|
+
} else if (slashesCount >= 2 && isSpecial(location.protocol)) {
|
|
4100
|
+
rest = match[4];
|
|
4101
|
+
}
|
|
4102
|
+
return {
|
|
4103
|
+
protocol: protocol,
|
|
4104
|
+
slashes: forwardSlashes || isSpecial(protocol),
|
|
4105
|
+
slashesCount: slashesCount,
|
|
4106
|
+
rest: rest
|
|
4107
|
+
};
|
|
4108
|
+
}
|
|
4109
|
+
/**
|
|
4110
|
+
* Resolve a relative URL pathname against a base URL pathname.
|
|
4111
|
+
*
|
|
4112
|
+
* @param {String} relative Pathname of the relative URL.
|
|
4113
|
+
* @param {String} base Pathname of the base URL.
|
|
4114
|
+
* @return {String} Resolved pathname.
|
|
4115
|
+
* @private
|
|
4116
|
+
*/ function resolve(relative, base) {
|
|
4117
|
+
if (relative === '') return base;
|
|
4118
|
+
var path = (base || '/').split('/').slice(0, -1).concat(relative.split('/')), i = path.length, last = path[i - 1], unshift = false, up = 0;
|
|
4119
|
+
while(i--){
|
|
4120
|
+
if (path[i] === '.') {
|
|
4121
|
+
path.splice(i, 1);
|
|
4122
|
+
} else if (path[i] === '..') {
|
|
4123
|
+
path.splice(i, 1);
|
|
4124
|
+
up++;
|
|
4125
|
+
} else if (up) {
|
|
4126
|
+
if (i === 0) unshift = true;
|
|
4127
|
+
path.splice(i, 1);
|
|
4128
|
+
up--;
|
|
4129
|
+
}
|
|
4130
|
+
}
|
|
4131
|
+
if (unshift) path.unshift('');
|
|
4132
|
+
if (last === '.' || last === '..') path.push('');
|
|
4133
|
+
return path.join('/');
|
|
4134
|
+
}
|
|
4135
|
+
/**
|
|
4136
|
+
* The actual URL instance. Instead of returning an object we've opted-in to
|
|
4137
|
+
* create an actual constructor as it's much more memory efficient and
|
|
4138
|
+
* faster and it pleases my OCD.
|
|
4139
|
+
*
|
|
4140
|
+
* It is worth noting that we should not use `URL` as class name to prevent
|
|
4141
|
+
* clashes with the global URL instance that got introduced in browsers.
|
|
4142
|
+
*
|
|
4143
|
+
* @constructor
|
|
4144
|
+
* @param {String} address URL we want to parse.
|
|
4145
|
+
* @param {Object|String} [location] Location defaults for relative paths.
|
|
4146
|
+
* @param {Boolean|Function} [parser] Parser for the query string.
|
|
4147
|
+
* @private
|
|
4148
|
+
*/ function Url(address, location, parser) {
|
|
4149
|
+
address = trimLeft(address);
|
|
4150
|
+
address = address.replace(CRHTLF, '');
|
|
4151
|
+
if (!_instanceof(this, Url)) {
|
|
4152
|
+
return new Url(address, location, parser);
|
|
4153
|
+
}
|
|
4154
|
+
var relative, extracted, parse, instruction, index, key, instructions = rules.slice(), type = typeof location === "undefined" ? "undefined" : _type_of(location), url = this, i = 0;
|
|
4155
|
+
//
|
|
4156
|
+
// The following if statements allows this module two have compatibility with
|
|
4157
|
+
// 2 different API:
|
|
4158
|
+
//
|
|
4159
|
+
// 1. Node.js's `url.parse` api which accepts a URL, boolean as arguments
|
|
4160
|
+
// where the boolean indicates that the query string should also be parsed.
|
|
4161
|
+
//
|
|
4162
|
+
// 2. The `URL` interface of the browser which accepts a URL, object as
|
|
4163
|
+
// arguments. The supplied object will be used as default values / fall-back
|
|
4164
|
+
// for relative paths.
|
|
4165
|
+
//
|
|
4166
|
+
if ('object' !== type && 'string' !== type) {
|
|
4167
|
+
parser = location;
|
|
4168
|
+
location = null;
|
|
4169
|
+
}
|
|
4170
|
+
if (parser && 'function' !== typeof parser) parser = qs.parse;
|
|
4171
|
+
location = lolcation(location);
|
|
4172
|
+
//
|
|
4173
|
+
// Extract protocol information before running the instructions.
|
|
4174
|
+
//
|
|
4175
|
+
extracted = extractProtocol(address || '', location);
|
|
4176
|
+
relative = !extracted.protocol && !extracted.slashes;
|
|
4177
|
+
url.slashes = extracted.slashes || relative && location.slashes;
|
|
4178
|
+
url.protocol = extracted.protocol || location.protocol || '';
|
|
4179
|
+
address = extracted.rest;
|
|
4180
|
+
//
|
|
4181
|
+
// When the authority component is absent the URL starts with a path
|
|
4182
|
+
// component.
|
|
4183
|
+
//
|
|
4184
|
+
if (extracted.protocol === 'file:' && (extracted.slashesCount !== 2 || windowsDriveLetter.test(address)) || !extracted.slashes && (extracted.protocol || extracted.slashesCount < 2 || !isSpecial(url.protocol))) {
|
|
4185
|
+
instructions[3] = [
|
|
4186
|
+
/(.*)/,
|
|
4187
|
+
'pathname'
|
|
4188
|
+
];
|
|
4189
|
+
}
|
|
4190
|
+
for(; i < instructions.length; i++){
|
|
4191
|
+
instruction = instructions[i];
|
|
4192
|
+
if (typeof instruction === 'function') {
|
|
4193
|
+
address = instruction(address, url);
|
|
4194
|
+
continue;
|
|
4195
|
+
}
|
|
4196
|
+
parse = instruction[0];
|
|
4197
|
+
key = instruction[1];
|
|
4198
|
+
if (parse !== parse) {
|
|
4199
|
+
url[key] = address;
|
|
4200
|
+
} else if ('string' === typeof parse) {
|
|
4201
|
+
index = parse === '@' ? address.lastIndexOf(parse) : address.indexOf(parse);
|
|
4202
|
+
if (~index) {
|
|
4203
|
+
if ('number' === typeof instruction[2]) {
|
|
4204
|
+
url[key] = address.slice(0, index);
|
|
4205
|
+
address = address.slice(index + instruction[2]);
|
|
4206
|
+
} else {
|
|
4207
|
+
url[key] = address.slice(index);
|
|
4208
|
+
address = address.slice(0, index);
|
|
4209
|
+
}
|
|
4210
|
+
}
|
|
4211
|
+
} else if (index = parse.exec(address)) {
|
|
4212
|
+
url[key] = index[1];
|
|
4213
|
+
address = address.slice(0, index.index);
|
|
4214
|
+
}
|
|
4215
|
+
url[key] = url[key] || (relative && instruction[3] ? location[key] || '' : '');
|
|
4216
|
+
//
|
|
4217
|
+
// Hostname, host and protocol should be lowercased so they can be used to
|
|
4218
|
+
// create a proper `origin`.
|
|
4219
|
+
//
|
|
4220
|
+
if (instruction[4]) url[key] = url[key].toLowerCase();
|
|
4221
|
+
}
|
|
4222
|
+
//
|
|
4223
|
+
// Also parse the supplied query string in to an object. If we're supplied
|
|
4224
|
+
// with a custom parser as function use that instead of the default build-in
|
|
4225
|
+
// parser.
|
|
4226
|
+
//
|
|
4227
|
+
if (parser) url.query = parser(url.query);
|
|
4228
|
+
//
|
|
4229
|
+
// If the URL is relative, resolve the pathname against the base URL.
|
|
4230
|
+
//
|
|
4231
|
+
if (relative && location.slashes && url.pathname.charAt(0) !== '/' && (url.pathname !== '' || location.pathname !== '')) {
|
|
4232
|
+
url.pathname = resolve(url.pathname, location.pathname);
|
|
4233
|
+
}
|
|
4234
|
+
//
|
|
4235
|
+
// Default to a / for pathname if none exists. This normalizes the URL
|
|
4236
|
+
// to always have a /
|
|
4237
|
+
//
|
|
4238
|
+
if (url.pathname.charAt(0) !== '/' && isSpecial(url.protocol)) {
|
|
4239
|
+
url.pathname = '/' + url.pathname;
|
|
4240
|
+
}
|
|
4241
|
+
//
|
|
4242
|
+
// We should not add port numbers if they are already the default port number
|
|
4243
|
+
// for a given protocol. As the host also contains the port number we're going
|
|
4244
|
+
// override it with the hostname which contains no port number.
|
|
4245
|
+
//
|
|
4246
|
+
if (!required(url.port, url.protocol)) {
|
|
4247
|
+
url.host = url.hostname;
|
|
4248
|
+
url.port = '';
|
|
4249
|
+
}
|
|
4250
|
+
//
|
|
4251
|
+
// Parse down the `auth` for the username and password.
|
|
4252
|
+
//
|
|
4253
|
+
url.username = url.password = '';
|
|
4254
|
+
if (url.auth) {
|
|
4255
|
+
index = url.auth.indexOf(':');
|
|
4256
|
+
if (~index) {
|
|
4257
|
+
url.username = url.auth.slice(0, index);
|
|
4258
|
+
url.username = encodeURIComponent(decodeURIComponent(url.username));
|
|
4259
|
+
url.password = url.auth.slice(index + 1);
|
|
4260
|
+
url.password = encodeURIComponent(decodeURIComponent(url.password));
|
|
4261
|
+
} else {
|
|
4262
|
+
url.username = encodeURIComponent(decodeURIComponent(url.auth));
|
|
4263
|
+
}
|
|
4264
|
+
url.auth = url.password ? url.username + ':' + url.password : url.username;
|
|
4265
|
+
}
|
|
4266
|
+
url.origin = url.protocol !== 'file:' && isSpecial(url.protocol) && url.host ? url.protocol + '//' + url.host : 'null';
|
|
4267
|
+
//
|
|
4268
|
+
// The href is just the compiled result.
|
|
4269
|
+
//
|
|
4270
|
+
url.href = url.toString();
|
|
4271
|
+
}
|
|
4272
|
+
/**
|
|
4273
|
+
* This is convenience method for changing properties in the URL instance to
|
|
4274
|
+
* insure that they all propagate correctly.
|
|
4275
|
+
*
|
|
4276
|
+
* @param {String} part Property we need to adjust.
|
|
4277
|
+
* @param {Mixed} value The newly assigned value.
|
|
4278
|
+
* @param {Boolean|Function} fn When setting the query, it will be the function
|
|
4279
|
+
* used to parse the query.
|
|
4280
|
+
* When setting the protocol, double slash will be
|
|
4281
|
+
* removed from the final url if it is true.
|
|
4282
|
+
* @returns {URL} URL instance for chaining.
|
|
4283
|
+
* @public
|
|
4284
|
+
*/ function set(part, value, fn) {
|
|
4285
|
+
var url = this;
|
|
4286
|
+
switch(part){
|
|
4287
|
+
case 'query':
|
|
4288
|
+
if ('string' === typeof value && value.length) {
|
|
4289
|
+
value = (fn || qs.parse)(value);
|
|
4290
|
+
}
|
|
4291
|
+
url[part] = value;
|
|
4292
|
+
break;
|
|
4293
|
+
case 'port':
|
|
4294
|
+
url[part] = value;
|
|
4295
|
+
if (!required(value, url.protocol)) {
|
|
4296
|
+
url.host = url.hostname;
|
|
4297
|
+
url[part] = '';
|
|
4298
|
+
} else if (value) {
|
|
4299
|
+
url.host = url.hostname + ':' + value;
|
|
4300
|
+
}
|
|
4301
|
+
break;
|
|
4302
|
+
case 'hostname':
|
|
4303
|
+
url[part] = value;
|
|
4304
|
+
if (url.port) value += ':' + url.port;
|
|
4305
|
+
url.host = value;
|
|
4306
|
+
break;
|
|
4307
|
+
case 'host':
|
|
4308
|
+
url[part] = value;
|
|
4309
|
+
if (port.test(value)) {
|
|
4310
|
+
value = value.split(':');
|
|
4311
|
+
url.port = value.pop();
|
|
4312
|
+
url.hostname = value.join(':');
|
|
4313
|
+
} else {
|
|
4314
|
+
url.hostname = value;
|
|
4315
|
+
url.port = '';
|
|
4316
|
+
}
|
|
4317
|
+
break;
|
|
4318
|
+
case 'protocol':
|
|
4319
|
+
url.protocol = value.toLowerCase();
|
|
4320
|
+
url.slashes = !fn;
|
|
4321
|
+
break;
|
|
4322
|
+
case 'pathname':
|
|
4323
|
+
case 'hash':
|
|
4324
|
+
if (value) {
|
|
4325
|
+
var char = part === 'pathname' ? '/' : '#';
|
|
4326
|
+
url[part] = value.charAt(0) !== char ? char + value : value;
|
|
4327
|
+
} else {
|
|
4328
|
+
url[part] = value;
|
|
4329
|
+
}
|
|
4330
|
+
break;
|
|
4331
|
+
case 'username':
|
|
4332
|
+
case 'password':
|
|
4333
|
+
url[part] = encodeURIComponent(value);
|
|
4334
|
+
break;
|
|
4335
|
+
case 'auth':
|
|
4336
|
+
var index = value.indexOf(':');
|
|
4337
|
+
if (~index) {
|
|
4338
|
+
url.username = value.slice(0, index);
|
|
4339
|
+
url.username = encodeURIComponent(decodeURIComponent(url.username));
|
|
4340
|
+
url.password = value.slice(index + 1);
|
|
4341
|
+
url.password = encodeURIComponent(decodeURIComponent(url.password));
|
|
4342
|
+
} else {
|
|
4343
|
+
url.username = encodeURIComponent(decodeURIComponent(value));
|
|
4344
|
+
}
|
|
4345
|
+
}
|
|
4346
|
+
for(var i = 0; i < rules.length; i++){
|
|
4347
|
+
var ins = rules[i];
|
|
4348
|
+
if (ins[4]) url[ins[1]] = url[ins[1]].toLowerCase();
|
|
4349
|
+
}
|
|
4350
|
+
url.auth = url.password ? url.username + ':' + url.password : url.username;
|
|
4351
|
+
url.origin = url.protocol !== 'file:' && isSpecial(url.protocol) && url.host ? url.protocol + '//' + url.host : 'null';
|
|
4352
|
+
url.href = url.toString();
|
|
4353
|
+
return url;
|
|
4354
|
+
}
|
|
4355
|
+
/**
|
|
4356
|
+
* Transform the properties back in to a valid and full URL string.
|
|
4357
|
+
*
|
|
4358
|
+
* @param {Function} stringify Optional query stringify function.
|
|
4359
|
+
* @returns {String} Compiled version of the URL.
|
|
4360
|
+
* @public
|
|
4361
|
+
*/ function toString(stringify) {
|
|
4362
|
+
if (!stringify || 'function' !== typeof stringify) stringify = qs.stringify;
|
|
4363
|
+
var query, url = this, host = url.host, protocol = url.protocol;
|
|
4364
|
+
if (protocol && protocol.charAt(protocol.length - 1) !== ':') protocol += ':';
|
|
4365
|
+
var result = protocol + (url.protocol && url.slashes || isSpecial(url.protocol) ? '//' : '');
|
|
4366
|
+
if (url.username) {
|
|
4367
|
+
result += url.username;
|
|
4368
|
+
if (url.password) result += ':' + url.password;
|
|
4369
|
+
result += '@';
|
|
4370
|
+
} else if (url.password) {
|
|
4371
|
+
result += ':' + url.password;
|
|
4372
|
+
result += '@';
|
|
4373
|
+
} else if (url.protocol !== 'file:' && isSpecial(url.protocol) && !host && url.pathname !== '/') {
|
|
4374
|
+
//
|
|
4375
|
+
// Add back the empty userinfo, otherwise the original invalid URL
|
|
4376
|
+
// might be transformed into a valid one with `url.pathname` as host.
|
|
4377
|
+
//
|
|
4378
|
+
result += '@';
|
|
4379
|
+
}
|
|
4380
|
+
//
|
|
4381
|
+
// Trailing colon is removed from `url.host` when it is parsed. If it still
|
|
4382
|
+
// ends with a colon, then add back the trailing colon that was removed. This
|
|
4383
|
+
// prevents an invalid URL from being transformed into a valid one.
|
|
4384
|
+
//
|
|
4385
|
+
if (host[host.length - 1] === ':' || port.test(url.hostname) && !url.port) {
|
|
4386
|
+
host += ':';
|
|
4387
|
+
}
|
|
4388
|
+
result += host + url.pathname;
|
|
4389
|
+
query = 'object' === _type_of(url.query) ? stringify(url.query) : url.query;
|
|
4390
|
+
if (query) result += '?' !== query.charAt(0) ? '?' + query : query;
|
|
4391
|
+
if (url.hash) result += url.hash;
|
|
4392
|
+
return result;
|
|
4393
|
+
}
|
|
4394
|
+
Url.prototype = {
|
|
4395
|
+
set: set,
|
|
4396
|
+
toString: toString
|
|
4397
|
+
};
|
|
4398
|
+
//
|
|
4399
|
+
// Expose the URL parser and some additional properties that might be useful for
|
|
4400
|
+
// others or testing.
|
|
4401
|
+
//
|
|
4402
|
+
Url.extractProtocol = extractProtocol;
|
|
4403
|
+
Url.location = lolcation;
|
|
4404
|
+
Url.trimLeft = trimLeft;
|
|
4405
|
+
Url.qs = qs;
|
|
4406
|
+
module.exports = Url;
|
|
4407
|
+
|
|
4408
|
+
|
|
4409
|
+
}),
|
|
4410
|
+
|
|
4411
|
+
});
|
|
4412
|
+
// The module cache
|
|
4413
|
+
var __webpack_module_cache__ = {};
|
|
4414
|
+
|
|
4415
|
+
// The require function
|
|
4416
|
+
function __webpack_require__(moduleId) {
|
|
4417
|
+
|
|
4418
|
+
// Check if module is in cache
|
|
4419
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
4420
|
+
if (cachedModule !== undefined) {
|
|
4421
|
+
return cachedModule.exports;
|
|
4422
|
+
}
|
|
4423
|
+
// Create a new module (and put it into the cache)
|
|
4424
|
+
var module = (__webpack_module_cache__[moduleId] = {
|
|
4425
|
+
exports: {}
|
|
4426
|
+
});
|
|
4427
|
+
// Execute the module function
|
|
4428
|
+
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
4429
|
+
|
|
4430
|
+
// Return the exports of the module
|
|
4431
|
+
return module.exports;
|
|
4432
|
+
|
|
4433
|
+
}
|
|
4434
|
+
|
|
4435
|
+
// webpack/runtime/compat_get_default_export
|
|
4436
|
+
!function() {
|
|
4437
|
+
// getDefaultExport function for compatibility with non-ESM modules
|
|
4438
|
+
__webpack_require__.n = function(module) {
|
|
4439
|
+
var getter = module && module.__esModule ?
|
|
4440
|
+
function() { return module['default']; } :
|
|
4441
|
+
function() { return module; };
|
|
4442
|
+
__webpack_require__.d(getter, { a: getter });
|
|
4443
|
+
return getter;
|
|
4444
|
+
};
|
|
4445
|
+
|
|
4446
|
+
}();
|
|
4447
|
+
// webpack/runtime/define_property_getters
|
|
4448
|
+
!function() {
|
|
4449
|
+
__webpack_require__.d = function(exports, definition) {
|
|
4450
|
+
for(var key in definition) {
|
|
4451
|
+
if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
4452
|
+
Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
4453
|
+
}
|
|
4454
|
+
}
|
|
4455
|
+
};
|
|
4456
|
+
}();
|
|
4457
|
+
// webpack/runtime/global
|
|
4458
|
+
!function() {
|
|
4459
|
+
__webpack_require__.g = (function() {
|
|
4460
|
+
if (typeof globalThis === 'object') return globalThis;
|
|
4461
|
+
try {
|
|
4462
|
+
return this || new Function('return this')();
|
|
4463
|
+
} catch (e) {
|
|
4464
|
+
if (typeof window === 'object') return window;
|
|
4465
|
+
}
|
|
4466
|
+
})();
|
|
4467
|
+
}();
|
|
4468
|
+
// webpack/runtime/has_own_property
|
|
4469
|
+
!function() {
|
|
4470
|
+
__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
|
|
4471
|
+
}();
|
|
4472
|
+
// webpack/runtime/make_namespace_object
|
|
4473
|
+
!function() {
|
|
4474
|
+
// define __esModule on exports
|
|
4475
|
+
__webpack_require__.r = function(exports) {
|
|
4476
|
+
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
4477
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4478
|
+
}
|
|
4479
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4480
|
+
};
|
|
4481
|
+
}();
|
|
4482
|
+
var __webpack_exports__ = {};
|
|
4483
|
+
// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
|
|
4484
|
+
!function() {
|
|
4485
|
+
"use strict";
|
|
4486
|
+
__webpack_require__.r(__webpack_exports__);
|
|
4487
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
4488
|
+
"default": function() { return /* reexport default from dynamic */ sockjs_client__rspack_import_0_default.a; }
|
|
4489
|
+
});
|
|
4490
|
+
/* import */ var sockjs_client__rspack_import_0 = __webpack_require__("../node_modules/.pnpm/sockjs-client@1.6.1/node_modules/sockjs-client/lib/entry.js");
|
|
4491
|
+
/* import */ var sockjs_client__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(sockjs_client__rspack_import_0);
|
|
4492
|
+
/**
|
|
4493
|
+
* The following code is modified based on
|
|
4494
|
+
* https://github.com/webpack/webpack-dev-server
|
|
4495
|
+
*
|
|
4496
|
+
* MIT Licensed
|
|
4497
|
+
* Author Tobias Koppers @sokra
|
|
4498
|
+
* Copyright (c) JS Foundation and other contributors
|
|
4499
|
+
* https://github.com/webpack/webpack-dev-server/blob/main/LICENSE
|
|
4500
|
+
*/
|
|
4501
|
+
|
|
4502
|
+
}();
|
|
4503
|
+
return __webpack_exports__;
|
|
4504
|
+
})()
|
|
4505
|
+
|
|
4506
|
+
});
|