1 | !function(e){var t={}
|
2 | function n(i){if(t[i])return t[i].exports
|
3 | var a=t[i]={i,l:!1,exports:{}}
|
4 | e[i].call(a.exports,a,a.exports,n)
|
5 | a.l=!0
|
6 | return a.exports}n.m=e
|
7 | n.c=t
|
8 | n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})}
|
9 | n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})
|
10 | Object.defineProperty(e,"__esModule",{value:!0})}
|
11 | n.t=function(e,t){1&t&&(e=n(e))
|
12 | if(8&t)return e
|
13 | if(4&t&&"object"==typeof e&&e&&e.__esModule)return e
|
14 | var i=Object.create(null)
|
15 | n.r(i)
|
16 | Object.defineProperty(i,"default",{enumerable:!0,value:e})
|
17 | if(2&t&&"string"!=typeof e)for(var a in e)n.d(i,a,function(t){return e[t]}.bind(null,a))
|
18 | return i}
|
19 | n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e}
|
20 | n.d(t,"a",t)
|
21 | return t}
|
22 | n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}
|
23 | n.p=""
|
24 | n(n.s=55)}([function(e,t){e.exports=require("fs")},function(e,t){e.exports=require("util")},function(e,t){e.exports=require("path")},function(e,t){e.exports=require("url")},function(e,t){e.exports=require("os")},function(e,t){e.exports=require("crypto")},function(e,t,n){"undefined"==typeof process||"renderer"===process.type?e.exports=n(105):e.exports=n(104)},function(e,t){e.exports=require("events")},function(e,t){e.exports=require("http")},function(e,t){e.exports=require("zlib")},function(e,t,n){var i=n(87)
|
25 | var a=i.Buffer
|
26 | function o(e,t){for(var n in e)t[n]=e[n]}if(a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow)e.exports=i
|
27 | else{o(i,t)
|
28 | t.Buffer=s}function s(e,t,n){return a(e,t,n)}o(a,s)
|
29 | s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number")
|
30 | return a(e,t,n)}
|
31 | s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number")
|
32 | var i=a(e)
|
33 | void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0)
|
34 | return i}
|
35 | s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number")
|
36 | return a(e)}
|
37 | s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number")
|
38 | return i.SlowBuffer(e)}},function(e,t,n){"use strict"
|
39 | var i=/development/i.test("production")||/\bredis\b/i.test(process.env.NODE_DEBUG)
|
40 | e.exports=function(e,t,n,a){this.command=e
|
41 | this.args=t
|
42 | this.buffer_args=!1
|
43 | this.callback=n
|
44 | this.call_on_write=a
|
45 | i&&(this.error=new Error)}},function(e,t,n){"use strict"
|
46 | var i
|
47 | function a(e,t,n,i){t?t(n,i):n&&e.emit("error",n)}e.exports={reply_to_strings:function e(t){if(t instanceof Buffer)return t.toString()
|
48 | if(t instanceof Array){var n=new Array(t.length)
|
49 | for(var i=0;i<t.length;i++)n[i]=e(t[i])
|
50 | return n}return t},reply_to_object:function(e){if(0===e.length||!(e instanceof Array))return null
|
51 | var t={}
|
52 | for(var n=0;n<e.length;n+=2)t[e[n].toString("binary")]=e[n+1]
|
53 | return t},print:function(e,t){e?console.log(e.toString()):console.log("Reply: "+t)},err_code:/^([A-Z]+)\s+(.+)$/,monitor_regex:/^[0-9]{10,11}\.[0-9]+ \[[0-9]+ .+\]( ".+?")+$/,clone:function(e){i=!1
|
54 | e=function e(t){var n
|
55 | if(Array.isArray(t)){n=new Array(t.length)
|
56 | for(var a=0;a<t.length;a++)n[a]=e(t[a])
|
57 | return n}if("[object Object]"===Object.prototype.toString.call(t)){n={}
|
58 | var o=Object.keys(t)
|
59 | var s
|
60 | for(;s=o.pop();)if("tls"!==s){var r=s.replace(/[A-Z][^A-Z]/g,"_$&").toLowerCase()
|
61 | r!==s.toLowerCase()&&(i=!0)
|
62 | n[r]=e(t[s])}else n[s]=t[s]
|
63 | return n}return t}(e)||{}
|
64 | i&&(e.camel_case=!0)
|
65 | return e},callback_or_emit:a,reply_in_order:function(e,t,n,i,o){var s
|
66 | if(s=o?o.peekBack():e.offline_queue.peekBack()||e.command_queue.peekBack()){var r=s.callback
|
67 | s.callback=r?function(o,s){r(o,s)
|
68 | a(e,t,n,i)}:function(o,s){o&&e.emit("error",o)
|
69 | a(e,t,n,i)}}else process.nextTick(function(){a(e,t,n,i)})}}},function(e,t,n){"use strict"
|
70 | var i=n(33)
|
71 | var a=n(72)
|
72 | var o=n(1)
|
73 | var s=n(12)
|
74 | var r=n(11)
|
75 | var c=n(32)
|
76 | var p=n(71)
|
77 | var l=n(7)
|
78 | var u=n(30)
|
79 | var d=n(28)
|
80 | var f=n(21)
|
81 | var h=n(65)
|
82 | var m={subscribe:!0,unsubscribe:!0,psubscribe:!0,punsubscribe:!0}
|
83 | "function"!=typeof l&&(l=l.EventEmitter)
|
84 | function v(){}function g(e,t,n){(!1===n||this.message_buffers)&&(e=s.reply_to_strings(e))
|
85 | "hgetall"===t&&(e=s.reply_to_object(e))
|
86 | return e}t.debug_mode=/\bredis\b/i.test(process.env.NODE_DEBUG)
|
87 | function y(e,t){e=s.clone(e)
|
88 | l.call(this)
|
89 | var n={}
|
90 | for(var a in e.tls){n[a]=e.tls[a]
|
91 | "port"!==a&&"host"!==a&&"path"!==a&&"family"!==a||(e[a]=e.tls[a])}if(t){e.stream=t
|
92 | this.address='"Private stream"'}else if(e.path){n.path=e.path
|
93 | this.address=e.path}else{n.port=+e.port||6379
|
94 | n.host=e.host||"127.0.0.1"
|
95 | n.family=!e.family&&i.isIP(n.host)||("IPv6"===e.family?6:4)
|
96 | this.address=n.host+":"+n.port}if("function"==typeof e.retry_strategy){if("max_attempts"in e){this.warn("WARNING: You activated the retry_strategy and max_attempts at the same time. This is not possible and max_attempts will be ignored.")
|
97 | delete e.max_attempts}if("retry_max_delay"in e){this.warn("WARNING: You activated the retry_strategy and retry_max_delay at the same time. This is not possible and retry_max_delay will be ignored.")
|
98 | delete e.retry_max_delay}}this.connection_options=n
|
99 | this.connection_id=y.connection_id++
|
100 | this.connected=!1
|
101 | this.ready=!1
|
102 | void 0===e.socket_nodelay?e.socket_nodelay=!0:e.socket_nodelay||this.warn("socket_nodelay is deprecated and will be removed in v.3.0.0.\nSetting socket_nodelay to false likely results in a reduced throughput. Please use .batch for pipelining instead.\nIf you are sure you rely on the NAGLE-algorithm you can activate it by calling client.stream.setNoDelay(false) instead.")
|
103 | void 0===e.socket_keepalive&&(e.socket_keepalive=!0)
|
104 | for(var o in e.rename_commands)e.rename_commands[o.toLowerCase()]=e.rename_commands[o]
|
105 | e.return_buffers=!!e.return_buffers
|
106 | e.detect_buffers=!!e.detect_buffers
|
107 | if(e.return_buffers&&e.detect_buffers){this.warn("WARNING: You activated return_buffers and detect_buffers at the same time. The return value is always going to be a buffer.")
|
108 | e.detect_buffers=!1}e.detect_buffers&&(this.handle_reply=g)
|
109 | this.should_buffer=!1
|
110 | this.max_attempts=0|e.max_attempts
|
111 | "max_attempts"in e&&this.warn("max_attempts is deprecated and will be removed in v.3.0.0.\nTo reduce the number of options and to improve the reconnection handling please use the new `retry_strategy` option instead.\nThis replaces the max_attempts and retry_max_delay option.")
|
112 | this.command_queue=new c
|
113 | this.offline_queue=new c
|
114 | this.pipeline_queue=new c
|
115 | this.connect_timeout=+e.connect_timeout||36e5
|
116 | this.enable_offline_queue=!1!==e.enable_offline_queue
|
117 | this.retry_max_delay=+e.retry_max_delay||null
|
118 | "retry_max_delay"in e&&this.warn("retry_max_delay is deprecated and will be removed in v.3.0.0.\nTo reduce the amount of options and the improve the reconnection handling please use the new `retry_strategy` option instead.\nThis replaces the max_attempts and retry_max_delay option.")
|
119 | this.initialize_retry_vars()
|
120 | this.pub_sub_mode=0
|
121 | this.subscription_set={}
|
122 | this.monitoring=!1
|
123 | this.message_buffers=!1
|
124 | this.closing=!1
|
125 | this.server_info={}
|
126 | this.auth_pass=e.auth_pass||e.password
|
127 | this.selected_db=e.db
|
128 | this.old_state=null
|
129 | this.fire_strings=!0
|
130 | this.pipeline=!1
|
131 | this.sub_commands_left=0
|
132 | this.times_connected=0
|
133 | this.buffers=e.return_buffers||e.detect_buffers
|
134 | this.options=e
|
135 | this.reply="ON"
|
136 | this.create_stream()
|
137 | this.on("newListener",function(e){if("idle"===e)this.warn("The idle event listener is deprecated and will likely be removed in v.3.0.0.\nIf you rely on this feature please open a new ticket in node_redis with your use case")
|
138 | else if("drain"===e)this.warn("The drain event listener is deprecated and will be removed in v.3.0.0.\nIf you want to keep on listening to this event please listen to the stream drain event directly.")
|
139 | else if(!("message_buffer"!==e&&"pmessage_buffer"!==e&&"messageBuffer"!==e&&"pmessageBuffer"!==e||this.buffers||this.message_buffers)){if("javascript"!==this.reply_parser.name)return this.warn('You attached the "'+e+'" listener without the returnBuffers option set to true.\nPlease use the JavaScript parser or set the returnBuffers option to true to return buffers.')
|
140 | this.reply_parser.optionReturnBuffers=!0
|
141 | this.message_buffers=!0
|
142 | this.handle_reply=g}})}o.inherits(y,l)
|
143 | y.connection_id=0
|
144 | y.prototype.create_stream=function(){var e=this
|
145 | this.reply_parser=function(e){return new u({returnReply:function(t){e.return_reply(t)},returnError:function(t){e.return_error(t)},returnFatalError:function(t){t.message+=". Please report this."
|
146 | e.ready=!1
|
147 | e.flush_and_error({message:"Fatal error encountert. Command aborted.",code:"NR_FATAL"},{error:t,queues:["command_queue"]})
|
148 | e.emit("error",t)
|
149 | e.create_stream()},returnBuffers:e.buffers||e.message_buffers,name:e.options.parser||"javascript",stringNumbers:e.options.string_numbers||!1})}(this)
|
150 | if(this.options.stream){if(this.stream)return
|
151 | this.stream=this.options.stream}else{if(this.stream){this.stream.removeAllListeners()
|
152 | this.stream.destroy()}this.options.tls?this.stream=a.connect(this.connection_options):this.stream=i.createConnection(this.connection_options)}this.options.connect_timeout&&this.stream.setTimeout(this.connect_timeout,function(){e.retry_totaltime=e.connect_timeout
|
153 | e.connection_gone("timeout")})
|
154 | var t=this.options.tls?"secureConnect":"connect"
|
155 | this.stream.once(t,function(){this.removeAllListeners("timeout")
|
156 | e.times_connected++
|
157 | e.on_connect()})
|
158 | this.stream.on("data",function(t){f("Net read "+e.address+" id "+e.connection_id)
|
159 | e.reply_parser.execute(t)
|
160 | e.emit_idle()})
|
161 | this.stream.on("error",function(t){e.on_error(t)})
|
162 | this.stream.on("clientError",function(t){f("clientError occured")
|
163 | e.on_error(t)})
|
164 | this.stream.once("close",function(t){e.connection_gone("close")})
|
165 | this.stream.once("end",function(){e.connection_gone("end")})
|
166 | this.stream.on("drain",function(){e.drain()})
|
167 | this.options.socket_nodelay&&this.stream.setNoDelay()
|
168 | if(void 0!==this.auth_pass){this.ready=!0
|
169 | this.auth(this.auth_pass,function(t){t&&"UNCERTAIN_STATE"!==t.code&&e.emit("error",t)})
|
170 | this.ready=!1}}
|
171 | y.prototype.handle_reply=function(e,t){"hgetall"===t&&(e=s.reply_to_object(e))
|
172 | return e}
|
173 | y.prototype.cork=v
|
174 | y.prototype.uncork=v
|
175 | y.prototype.initialize_retry_vars=function(){this.retry_timer=null
|
176 | this.retry_totaltime=0
|
177 | this.retry_delay=200
|
178 | this.retry_backoff=1.7
|
179 | this.attempts=1}
|
180 | y.prototype.warn=function(e){var t=this
|
181 | process.nextTick(function(){0!==t.listeners("warning").length?t.emit("warning",e):console.warn("node_redis:",e)})}
|
182 | y.prototype.flush_and_error=function(e,n){var i=[]
|
183 | var a=(n=n||{}).queues||["command_queue","offline_queue"]
|
184 | for(var o=0;o<a.length;o++){"command_queue"===a[o]?e.message+=" It might have been processed.":e.message=e.message.replace(" It might have been processed.","")
|
185 | for(var s=this[a[o]].shift();s;s=this[a[o]].shift()){var r=new p.AbortError(e)
|
186 | s.error&&(r.stack=r.stack+s.error.stack.replace(/^Error.*?\n/,"\n"))
|
187 | r.command=s.command.toUpperCase()
|
188 | s.args&&s.args.length&&(r.args=s.args)
|
189 | n.error&&(r.origin=n.error)
|
190 | "function"==typeof s.callback?s.callback(r):i.push(r)}}if(t.debug_mode&&i.length){var c
|
191 | if(1===i.length)c=i[0]
|
192 | else{e.message=e.message.replace("It","They").replace(/command/i,"$&s");(c=new p.AggregateError(e)).errors=i}this.emit("error",c)}}
|
193 | y.prototype.on_error=function(e){if(!this.closing){e.message="Redis connection to "+this.address+" failed - "+e.message
|
194 | f(e.message)
|
195 | this.connected=!1
|
196 | this.ready=!1
|
197 | this.options.retry_strategy||this.emit("error",e)
|
198 | this.connection_gone("error",e)}}
|
199 | y.prototype.on_connect=function(){f("Stream connected "+this.address+" id "+this.connection_id)
|
200 | this.connected=!0
|
201 | this.ready=!1
|
202 | this.emitted_end=!1
|
203 | this.stream.setKeepAlive(this.options.socket_keepalive)
|
204 | this.stream.setTimeout(0)
|
205 | this.emit("connect")
|
206 | this.initialize_retry_vars()
|
207 | this.options.no_ready_check?this.on_ready():this.ready_check()}
|
208 | y.prototype.on_ready=function(){var e=this
|
209 | f("on_ready called "+this.address+" id "+this.connection_id)
|
210 | this.ready=!0
|
211 | this.cork=function(){e.pipeline=!0
|
212 | e.stream.cork&&e.stream.cork()}
|
213 | this.uncork=function(){e.fire_strings?e.write_strings():e.write_buffers()
|
214 | e.pipeline=!1
|
215 | e.fire_strings=!0
|
216 | e.stream.uncork&&e.stream.uncork()}
|
217 | void 0!==this.selected_db&&this.internal_send_command(new r("select",[this.selected_db]))
|
218 | this.monitoring&&this.internal_send_command(new r("monitor",[]))
|
219 | var t=Object.keys(this.subscription_set).length
|
220 | if(this.options.disable_resubscribing||!t){this.send_offline_queue()
|
221 | this.emit("ready")}else{var n=function(){0===--t&&e.emit("ready")}
|
222 | f("Sending pub/sub on_ready commands")
|
223 | for(var i in this.subscription_set){var a=i.slice(0,i.indexOf("_"))
|
224 | var o=this.subscription_set[i]
|
225 | this[a]([o],n)}this.send_offline_queue()}}
|
226 | y.prototype.on_info_cmd=function(e,t){if(e){if("ERR unknown command 'info'"===e.message){this.on_ready()
|
227 | return}e.message="Ready check failed: "+e.message
|
228 | this.emit("error",e)}else if(t){if(!this.server_info.loading||"0"===this.server_info.loading){if(!this.server_info.master_link_status||"up"===this.server_info.master_link_status){f("Redis server ready.")
|
229 | this.on_ready()
|
230 | return}this.server_info.loading_eta_seconds=.05}var n=1e3*+this.server_info.loading_eta_seconds
|
231 | n>1e3&&(n=1e3)
|
232 | f("Redis server still loading, trying again in "+n)
|
233 | setTimeout(function(e){e.ready_check()},n,this)}else{f("The info command returned without any data.")
|
234 | this.on_ready()}}
|
235 | y.prototype.ready_check=function(){var e=this
|
236 | f("Checking server ready state...")
|
237 | this.ready=!0
|
238 | this.info(function(t,n){e.on_info_cmd(t,n)})
|
239 | this.ready=!1}
|
240 | y.prototype.send_offline_queue=function(){for(var e=this.offline_queue.shift();e;e=this.offline_queue.shift()){f("Sending offline command: "+e.command)
|
241 | this.internal_send_command(e)}this.drain()}
|
242 | var x=function(e,t){f("Retrying connection...")
|
243 | var n={delay:e.retry_delay,attempt:e.attempts,error:t}
|
244 | if(e.options.camel_case){n.totalRetryTime=e.retry_totaltime
|
245 | n.timesConnected=e.times_connected}else{n.total_retry_time=e.retry_totaltime
|
246 | n.times_connected=e.times_connected}e.emit("reconnecting",n)
|
247 | e.retry_totaltime+=e.retry_delay
|
248 | e.attempts+=1
|
249 | e.retry_delay=Math.round(e.retry_delay*e.retry_backoff)
|
250 | e.create_stream()
|
251 | e.retry_timer=null}
|
252 | y.prototype.connection_gone=function(e,t){if(!this.retry_timer){t=t||null
|
253 | f("Redis connection is gone from "+e+" event.")
|
254 | this.connected=!1
|
255 | this.ready=!1
|
256 | this.cork=v
|
257 | this.uncork=v
|
258 | this.pipeline=!1
|
259 | this.pub_sub_mode=0
|
260 | if(!this.emitted_end){this.emit("end")
|
261 | this.emitted_end=!0}if(this.closing){f("Connection ended by quit / end command, not retrying.")
|
262 | this.flush_and_error({message:"Stream connection ended and command aborted.",code:"NR_CLOSED"},{error:t})}else{if("function"==typeof this.options.retry_strategy){var n={attempt:this.attempts,error:t}
|
263 | if(this.options.camel_case){n.totalRetryTime=this.retry_totaltime
|
264 | n.timesConnected=this.times_connected}else{n.total_retry_time=this.retry_totaltime
|
265 | n.times_connected=this.times_connected}this.retry_delay=this.options.retry_strategy(n)
|
266 | if("number"!=typeof this.retry_delay){this.retry_delay instanceof Error&&(t=this.retry_delay)
|
267 | this.flush_and_error({message:"Stream connection ended and command aborted.",code:"NR_CLOSED"},{error:t})
|
268 | this.end(!1)
|
269 | return}}if(0!==this.max_attempts&&this.attempts>=this.max_attempts||this.retry_totaltime>=this.connect_timeout){var i="Redis connection in broken state: "
|
270 | this.retry_totaltime>=this.connect_timeout?i+="connection timeout exceeded.":i+="maximum connection attempts exceeded."
|
271 | this.flush_and_error({message:i,code:"CONNECTION_BROKEN"},{error:t})
|
272 | var a=new Error(i)
|
273 | a.code="CONNECTION_BROKEN"
|
274 | t&&(a.origin=t)
|
275 | this.emit("error",a)
|
276 | this.end(!1)}else{if(this.options.retry_unfulfilled_commands){this.offline_queue.unshift.apply(this.offline_queue,this.command_queue.toArray())
|
277 | this.command_queue.clear()}else 0!==this.command_queue.length&&this.flush_and_error({message:"Redis connection lost and command aborted.",code:"UNCERTAIN_STATE"},{error:t,queues:["command_queue"]})
|
278 | null!==this.retry_max_delay&&this.retry_delay>this.retry_max_delay?this.retry_delay=this.retry_max_delay:this.retry_totaltime+this.retry_delay>this.connect_timeout&&(this.retry_delay=this.connect_timeout-this.retry_totaltime)
|
279 | f("Retry connection in "+this.retry_delay+" ms")
|
280 | this.retry_timer=setTimeout(x,this.retry_delay,this,t)}}}}
|
281 | y.prototype.return_error=function(e){var t=this.command_queue.shift()
|
282 | t.error&&(e.stack=t.error.stack.replace(/^Error.*?\n/,"ReplyError: "+e.message+"\n"))
|
283 | e.command=t.command.toUpperCase()
|
284 | t.args&&t.args.length&&(e.args=t.args)
|
285 | this.pub_sub_mode>1&&this.pub_sub_mode--
|
286 | var n=e.message.match(s.err_code)
|
287 | n&&(e.code=n[1])
|
288 | s.callback_or_emit(this,t.callback,e)}
|
289 | y.prototype.drain=function(){this.emit("drain")
|
290 | this.should_buffer=!1}
|
291 | y.prototype.emit_idle=function(){0===this.command_queue.length&&0===this.pub_sub_mode&&this.emit("idle")}
|
292 | function b(e,t){var n=e.command_queue.shift()
|
293 | if("function"==typeof n.callback){"exec"!==n.command&&(t=e.handle_reply(t,n.command,n.buffer_args))
|
294 | n.callback(null,t)}else f("No callback for reply")}function w(e,t){var n=t[0].toString()
|
295 | if("message"===n)if(!e.options.return_buffers||e.message_buffers){e.emit("message",t[1].toString(),t[2].toString())
|
296 | e.emit("message_buffer",t[1],t[2])
|
297 | e.emit("messageBuffer",t[1],t[2])}else e.emit("message",t[1],t[2])
|
298 | else if("pmessage"===n)if(!e.options.return_buffers||e.message_buffers){e.emit("pmessage",t[1].toString(),t[2].toString(),t[3].toString())
|
299 | e.emit("pmessage_buffer",t[1],t[2],t[3])
|
300 | e.emit("pmessageBuffer",t[1],t[2],t[3])}else e.emit("pmessage",t[1],t[2],t[3])
|
301 | else!function(e,t,n){var i=e.command_queue.get(0)
|
302 | var a=e.options.return_buffers||e.options.detect_buffers&&i.buffer_args||null===t[1]?t[1]:t[1].toString()
|
303 | var o=+t[2]
|
304 | f(n,a)
|
305 | if(null!==a){e.emit(n,a,o)
|
306 | if("subscribe"===n||"psubscribe"===n)e.subscription_set[n+"_"+a]=a
|
307 | else{n="unsubscribe"===n?"subscribe":"psubscribe"
|
308 | delete e.subscription_set[n+"_"+a]}}if(1===i.args.length||1===e.sub_commands_left||0===i.args.length&&(0===o||null===a)){if(0===o){var s
|
309 | var r=1
|
310 | e.pub_sub_mode=0
|
311 | for(;s=e.command_queue.get(r);){if(m[s.command]){e.pub_sub_mode=r
|
312 | break}r++}}e.command_queue.shift()
|
313 | "function"==typeof i.callback&&i.callback(null,a)
|
314 | e.sub_commands_left=0}else 0!==e.sub_commands_left?e.sub_commands_left--:e.sub_commands_left=i.args.length?i.args.length-1:o}(e,t,n)}y.prototype.return_reply=function(e){if(this.monitoring){var t
|
315 | if("string"==typeof(t=this.buffers&&Buffer.isBuffer(e)?e.toString():e)&&s.monitor_regex.test(t)){var n=t.slice(0,t.indexOf(" "))
|
316 | var i=t.slice(t.indexOf('"')+1,-1).split('" "').map(function(e){return e.replace(/\\"/g,'"')})
|
317 | this.emit("monitor",n,i,t)
|
318 | return}}if(0===this.pub_sub_mode)b(this,e)
|
319 | else if(1!==this.pub_sub_mode){this.pub_sub_mode--
|
320 | b(this,e)}else!(e instanceof Array)||e.length<=2?b(this,e):w(this,e)}
|
321 | y.prototype.internal_send_command=function(e){var t,n
|
322 | var i=0
|
323 | var a=""
|
324 | var o=e.args
|
325 | var r=e.command
|
326 | var c=o.length
|
327 | var l=!1
|
328 | var u=new Array(c)
|
329 | process.domain&&e.callback&&(e.callback=process.domain.bind(e.callback))
|
330 | if(!1===this.ready||!1===this.stream.writable){!function(e,t){var n=t.command
|
331 | var i,a
|
332 | if(e.closing||!e.enable_offline_queue){n=n.toUpperCase()
|
333 | a=e.closing?"The connection is already closed.":e.stream.writable?"The connection is not yet established and the offline queue is deactivated.":"Stream not writeable."
|
334 | i=new p.AbortError({message:n+" can't be processed. "+a,code:"NR_CLOSED",command:n})
|
335 | t.args.length&&(i.args=t.args)
|
336 | s.reply_in_order(e,t.callback,i)}else{f("Queueing "+n+" for next server connection.")
|
337 | e.offline_queue.push(t)}e.should_buffer=!0}(this,e)
|
338 | return!1}for(i=0;i<c;i+=1)if("string"==typeof o[i])if(o[i].length>3e4){l=!0
|
339 | u[i]=new Buffer(o[i],"utf8")}else u[i]=o[i]
|
340 | else if("object"==typeof o[i])if(o[i]instanceof Date)u[i]=o[i].toString()
|
341 | else if(null===o[i]){this.warn("Deprecated: The "+r.toUpperCase()+' command contains a "null" argument.\nThis is converted to a "null" string now and will return an error from v.3.0 on.\nPlease handle this in your code to make sure everything works as you intended it to.')
|
342 | u[i]="null"}else if(Buffer.isBuffer(o[i])){u[i]=o[i]
|
343 | e.buffer_args=!0
|
344 | l=!0}else{this.warn("Deprecated: The "+r.toUpperCase()+" command contains a argument of type "+o[i].constructor.name+'.\nThis is converted to "'+o[i].toString()+'" by using .toString() now and will return an error from v.3.0 on.\nPlease handle this in your code to make sure everything works as you intended it to.')
|
345 | u[i]=o[i].toString()}else if(void 0===o[i]){this.warn("Deprecated: The "+r.toUpperCase()+' command contains a "undefined" argument.\nThis is converted to a "undefined" string now and will return an error from v.3.0 on.\nPlease handle this in your code to make sure everything works as you intended it to.')
|
346 | u[i]="undefined"}else u[i]=""+o[i]
|
347 | if(this.options.prefix)for(i=(n=d.getKeyIndexes(r,u)).pop();void 0!==i;i=n.pop())u[i]=this.options.prefix+u[i]
|
348 | this.options.rename_commands&&this.options.rename_commands[r]&&(r=this.options.rename_commands[r])
|
349 | a="*"+(c+1)+"\r\n$"+r.length+"\r\n"+r+"\r\n"
|
350 | if(!1===l){for(i=0;i<c;i+=1){t=u[i]
|
351 | a+="$"+Buffer.byteLength(t)+"\r\n"+t+"\r\n"}f("Send "+this.address+" id "+this.connection_id+": "+a)
|
352 | this.write(a)}else{f("Send command ("+a+") has Buffer arguments")
|
353 | this.fire_strings=!1
|
354 | this.write(a)
|
355 | for(i=0;i<c;i+=1){if("string"==typeof(t=u[i]))this.write("$"+Buffer.byteLength(t)+"\r\n"+t+"\r\n")
|
356 | else{this.write("$"+t.length+"\r\n")
|
357 | this.write(t)
|
358 | this.write("\r\n")}f("send_command: buffer send "+t.length+" bytes")}}e.call_on_write&&e.call_on_write()
|
359 | if("ON"===this.reply)this.command_queue.push(e)
|
360 | else{e.callback&&s.reply_in_order(this,e.callback,null,void 0,this.command_queue)
|
361 | "SKIP"===this.reply?this.reply="SKIP_ONE_MORE":"SKIP_ONE_MORE"===this.reply&&(this.reply="ON")}return!this.should_buffer}
|
362 | y.prototype.write_strings=function(){var e=""
|
363 | for(var t=this.pipeline_queue.shift();t;t=this.pipeline_queue.shift()){if(e.length+t.length>4194304){this.should_buffer=!this.stream.write(e)
|
364 | e=""}e+=t}""!==e&&(this.should_buffer=!this.stream.write(e))}
|
365 | y.prototype.write_buffers=function(){for(var e=this.pipeline_queue.shift();e;e=this.pipeline_queue.shift())this.should_buffer=!this.stream.write(e)}
|
366 | y.prototype.write=function(e){!1!==this.pipeline?this.pipeline_queue.push(e):this.should_buffer=!this.stream.write(e)}
|
367 | Object.defineProperty(t,"debugMode",{get:function(){return this.debug_mode},set:function(e){this.debug_mode=e}})
|
368 | Object.defineProperty(y.prototype,"command_queue_length",{get:function(){return this.command_queue.length}})
|
369 | Object.defineProperty(y.prototype,"offline_queue_length",{get:function(){return this.offline_queue.length}})
|
370 | Object.defineProperty(y.prototype,"retryDelay",{get:function(){return this.retry_delay}})
|
371 | Object.defineProperty(y.prototype,"retryBackoff",{get:function(){return this.retry_backoff}})
|
372 | Object.defineProperty(y.prototype,"commandQueueLength",{get:function(){return this.command_queue.length}})
|
373 | Object.defineProperty(y.prototype,"offlineQueueLength",{get:function(){return this.offline_queue.length}})
|
374 | Object.defineProperty(y.prototype,"shouldBuffer",{get:function(){return this.should_buffer}})
|
375 | Object.defineProperty(y.prototype,"connectionId",{get:function(){return this.connection_id}})
|
376 | Object.defineProperty(y.prototype,"serverInfo",{get:function(){return this.server_info}})
|
377 | t.createClient=function(){return new y(h.apply(null,arguments))}
|
378 | t.RedisClient=y
|
379 | t.print=s.print
|
380 | t.Multi=n(20)
|
381 | t.AbortError=p.AbortError
|
382 | t.RedisError=u.RedisError
|
383 | t.ParserError=u.ParserError
|
384 | t.ReplyError=u.ReplyError
|
385 | t.AggregateError=p.AggregateError
|
386 | n(64)
|
387 | n(63)
|
388 | t.addCommand=t.add_command=n(62)},function(e,t){e.exports=require("https")},function(e,t,n){"use strict"
|
389 | function i(e,t){Object.defineProperty(this,"message",{value:e||"",configurable:!0,writable:!0});(t||void 0===t)&&Error.captureStackTrace(this,i)}n(1).inherits(i,Error)
|
390 | Object.defineProperty(i.prototype,"name",{value:"RedisError",configurable:!0,writable:!0})
|
391 | e.exports=i},function(e,t,n){var i=n(6)("socket.io-parser")
|
392 | var a=n(78)
|
393 | var o=n(77)
|
394 | var s=n(37)
|
395 | var r=n(36)
|
396 | t.protocol=4
|
397 | t.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"]
|
398 | t.CONNECT=0
|
399 | t.DISCONNECT=1
|
400 | t.EVENT=2
|
401 | t.ACK=3
|
402 | t.ERROR=4
|
403 | t.BINARY_EVENT=5
|
404 | t.BINARY_ACK=6
|
405 | t.Encoder=c
|
406 | t.Decoder=u
|
407 | function c(){}var p=t.ERROR+'"encode error"'
|
408 | c.prototype.encode=function(e,n){i("encoding packet %j",e)
|
409 | if(t.BINARY_EVENT===e.type||t.BINARY_ACK===e.type)!function(e,t){o.removeBlobs(e,function(e){var n=o.deconstructPacket(e)
|
410 | var i=l(n.packet)
|
411 | var a=n.buffers
|
412 | a.unshift(i)
|
413 | t(a)})}(e,n)
|
414 | else{n([l(e)])}}
|
415 | function l(e){var n=""+e.type
|
416 | t.BINARY_EVENT!==e.type&&t.BINARY_ACK!==e.type||(n+=e.attachments+"-")
|
417 | e.nsp&&"/"!==e.nsp&&(n+=e.nsp+",")
|
418 | null!=e.id&&(n+=e.id)
|
419 | if(null!=e.data){var a=function(e){try{return JSON.stringify(e)}catch(e){return!1}}(e.data)
|
420 | if(!1===a)return p
|
421 | n+=a}i("encoded %j as %s",e,n)
|
422 | return n}function u(){this.reconstructor=null}a(u.prototype)
|
423 | u.prototype.add=function(e){var n
|
424 | if("string"==typeof e){n=function(e){var n=0
|
425 | var a={type:Number(e.charAt(0))}
|
426 | if(null==t.types[a.type])return f("unknown packet type "+a.type)
|
427 | if(t.BINARY_EVENT===a.type||t.BINARY_ACK===a.type){var o=""
|
428 | for(;"-"!==e.charAt(++n);){o+=e.charAt(n)
|
429 | if(n==e.length)break}if(o!=Number(o)||"-"!==e.charAt(n))throw new Error("Illegal attachments")
|
430 | a.attachments=Number(o)}if("/"===e.charAt(n+1)){a.nsp=""
|
431 | for(;++n;){var r=e.charAt(n)
|
432 | if(","===r)break
|
433 | a.nsp+=r
|
434 | if(n===e.length)break}}else a.nsp="/"
|
435 | var c=e.charAt(n+1)
|
436 | if(""!==c&&Number(c)==c){a.id=""
|
437 | for(;++n;){var r=e.charAt(n)
|
438 | if(null==r||Number(r)!=r){--n
|
439 | break}a.id+=e.charAt(n)
|
440 | if(n===e.length)break}a.id=Number(a.id)}if(e.charAt(++n)){var p=function(e){try{return JSON.parse(e)}catch(e){return!1}}(e.substr(n))
|
441 | var l=!1!==p&&(a.type===t.ERROR||s(p))
|
442 | if(!l)return f("invalid payload")
|
443 | a.data=p}i("decoded %s as %j",e,a)
|
444 | return a}(e)
|
445 | if(t.BINARY_EVENT===n.type||t.BINARY_ACK===n.type){this.reconstructor=new d(n)
|
446 | 0===this.reconstructor.reconPack.attachments&&this.emit("decoded",n)}else this.emit("decoded",n)}else{if(!r(e)&&!e.base64)throw new Error("Unknown type: "+e)
|
447 | if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet")
|
448 | if(n=this.reconstructor.takeBinaryData(e)){this.reconstructor=null
|
449 | this.emit("decoded",n)}}}
|
450 | u.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()}
|
451 | function d(e){this.reconPack=e
|
452 | this.buffers=[]}d.prototype.takeBinaryData=function(e){this.buffers.push(e)
|
453 | if(this.buffers.length===this.reconPack.attachments){var t=o.reconstructPacket(this.reconPack,this.buffers)
|
454 | this.finishedReconstruction()
|
455 | return t}return null}
|
456 | d.prototype.finishedReconstruction=function(){this.reconPack=null
|
457 | this.buffers=[]}
|
458 | function f(e){return{type:t.ERROR,data:"parser error: "+e}}},function(e,t,n){"use strict"
|
459 | const i=n(10).Buffer
|
460 | t.BINARY_TYPES=["nodebuffer","arraybuffer","fragments"]
|
461 | t.GUID="258EAFA5-E914-47DA-95CA-C5AB0DC85B11"
|
462 | t.EMPTY_BUFFER=i.alloc(0)
|
463 | t.NOOP=(()=>{})},function(e,t,n){"use strict"
|
464 | const i=n(10)
|
465 | const a=n(86)
|
466 | const o=n(9)
|
467 | const s=n(23)
|
468 | const r=i.Buffer
|
469 | const c=r.from([0,0,255,255])
|
470 | const p=r.from([0])
|
471 | const l=Symbol("write-in-progress")
|
472 | const u=Symbol("pending-close")
|
473 | const d=Symbol("total-length")
|
474 | const f=Symbol("callback")
|
475 | const h=Symbol("buffers")
|
476 | const m=Symbol("error")
|
477 | const v=Symbol("owner")
|
478 | let g
|
479 | e.exports=class{constructor(e,t,n){this._maxPayload=0|n
|
480 | this._options=e||{}
|
481 | this._threshold=void 0!==this._options.threshold?this._options.threshold:1024
|
482 | this._isServer=!!t
|
483 | this._deflate=null
|
484 | this._inflate=null
|
485 | this.params=null
|
486 | if(!g){const e=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10
|
487 | g=new a({concurrency:e})}}static get extensionName(){return"permessage-deflate"}offer(){const e={}
|
488 | this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0)
|
489 | this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0)
|
490 | this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits)
|
491 | this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(e.client_max_window_bits=!0)
|
492 | return e}accept(e){e=this.normalizeParams(e)
|
493 | var t
|
494 | t=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e)
|
495 | this.params=t
|
496 | return t}cleanup(){if(this._inflate)if(this._inflate[l])this._inflate[u]=!0
|
497 | else{this._inflate.close()
|
498 | this._inflate=null}if(this._deflate)if(this._deflate[l])this._deflate[u]=!0
|
499 | else{this._deflate.close()
|
500 | this._deflate=null}}acceptAsServer(e){const t={}
|
501 | if(!e.some(e=>{if(!(!1===this._options.serverNoContextTakeover&&e.server_no_context_takeover||!1===this._options.serverMaxWindowBits&&e.server_max_window_bits||"number"==typeof this._options.serverMaxWindowBits&&"number"==typeof e.server_max_window_bits&&this._options.serverMaxWindowBits>e.server_max_window_bits||"number"==typeof this._options.clientMaxWindowBits&&!e.client_max_window_bits)){(this._options.serverNoContextTakeover||e.server_no_context_takeover)&&(t.server_no_context_takeover=!0);(this._options.clientNoContextTakeover||!1!==this._options.clientNoContextTakeover&&e.client_no_context_takeover)&&(t.client_no_context_takeover=!0)
|
502 | "number"==typeof this._options.serverMaxWindowBits?t.server_max_window_bits=this._options.serverMaxWindowBits:"number"==typeof e.server_max_window_bits&&(t.server_max_window_bits=e.server_max_window_bits)
|
503 | "number"==typeof this._options.clientMaxWindowBits?t.client_max_window_bits=this._options.clientMaxWindowBits:!1!==this._options.clientMaxWindowBits&&"number"==typeof e.client_max_window_bits&&(t.client_max_window_bits=e.client_max_window_bits)
|
504 | return!0}}))throw new Error("Doesn't support the offered configuration")
|
505 | return t}acceptAsClient(e){const t=e[0]
|
506 | if(!1===this._options.clientNoContextTakeover&&t.client_no_context_takeover)throw new Error('Invalid value for "client_no_context_takeover"')
|
507 | if("number"==typeof this._options.clientMaxWindowBits&&(!t.client_max_window_bits||t.client_max_window_bits>this._options.clientMaxWindowBits)||!1===this._options.clientMaxWindowBits&&t.client_max_window_bits)throw new Error('Invalid value for "client_max_window_bits"')
|
508 | return t}normalizeParams(e){return e.map(e=>{Object.keys(e).forEach(t=>{var n=e[t]
|
509 | if(n.length>1)throw new Error(`Multiple extension parameters for ${t}`)
|
510 | n=n[0]
|
511 | switch(t){case"server_no_context_takeover":case"client_no_context_takeover":if(!0!==n)throw new Error(`invalid extension parameter value for ${t} (${n})`)
|
512 | e[t]=!0
|
513 | break
|
514 | case"server_max_window_bits":case"client_max_window_bits":if("string"==typeof n){n=parseInt(n,10)
|
515 | if(Number.isNaN(n)||n<o.Z_MIN_WINDOWBITS||n>o.Z_MAX_WINDOWBITS)throw new Error(`invalid extension parameter value for ${t} (${n})`)}if(!this._isServer&&!0===n)throw new Error(`Missing extension parameter value for ${t}`)
|
516 | e[t]=n
|
517 | break
|
518 | default:throw new Error(`Not defined extension parameter (${t})`)}})
|
519 | return e})}decompress(e,t,n){g.push(i=>{this._decompress(e,t,(e,t)=>{i()
|
520 | n(e,t)})})}compress(e,t,n){g.push(i=>{this._compress(e,t,(e,t)=>{i()
|
521 | n(e,t)})})}_decompress(e,t,n){const i=this._isServer?"client":"server"
|
522 | if(!this._inflate){const e=`${i}_max_window_bits`
|
523 | const t="number"!=typeof this.params[e]?o.Z_DEFAULT_WINDOWBITS:this.params[e]
|
524 | this._inflate=o.createInflateRaw({windowBits:t})
|
525 | this._inflate[d]=0
|
526 | this._inflate[h]=[]
|
527 | this._inflate[v]=this
|
528 | this._inflate.on("error",b)
|
529 | this._inflate.on("data",x)}this._inflate[f]=n
|
530 | this._inflate[l]=!0
|
531 | this._inflate.write(e)
|
532 | t&&this._inflate.write(c)
|
533 | this._inflate.flush(()=>{const e=this._inflate[m]
|
534 | if(e){this._inflate.close()
|
535 | this._inflate=null
|
536 | n(e)
|
537 | return}const a=s.concat(this._inflate[h],this._inflate[d])
|
538 | if(t&&this.params[`${i}_no_context_takeover`]||this._inflate[u]){this._inflate.close()
|
539 | this._inflate=null}else{this._inflate[l]=!1
|
540 | this._inflate[d]=0
|
541 | this._inflate[h]=[]}n(null,a)})}_compress(e,t,n){if(!e||0===e.length){process.nextTick(n,null,p)
|
542 | return}const i=this._isServer?"server":"client"
|
543 | if(!this._deflate){const e=`${i}_max_window_bits`
|
544 | const t="number"!=typeof this.params[e]?o.Z_DEFAULT_WINDOWBITS:this.params[e]
|
545 | this._deflate=o.createDeflateRaw({memLevel:this._options.memLevel,level:this._options.level,flush:o.Z_SYNC_FLUSH,windowBits:t})
|
546 | this._deflate[d]=0
|
547 | this._deflate[h]=[]
|
548 | this._deflate.on("data",y)}this._deflate[l]=!0
|
549 | this._deflate.write(e)
|
550 | this._deflate.flush(o.Z_SYNC_FLUSH,()=>{var e=s.concat(this._deflate[h],this._deflate[d])
|
551 | t&&(e=e.slice(0,e.length-4))
|
552 | if(t&&this.params[`${i}_no_context_takeover`]||this._deflate[u]){this._deflate.close()
|
553 | this._deflate=null}else{this._deflate[l]=!1
|
554 | this._deflate[d]=0
|
555 | this._deflate[h]=[]}n(null,e)})}}
|
556 | function y(e){this[h].push(e)
|
557 | this[d]+=e.length}function x(e){this[d]+=e.length
|
558 | if(this[v]._maxPayload<1||this[d]<=this[v]._maxPayload)this[h].push(e)
|
559 | else{this[m]=new Error("max payload size exceeded")
|
560 | this[m].closeCode=1009
|
561 | this.removeListener("data",x)
|
562 | this.reset()}}function b(e){this[v]._inflate=null
|
563 | this[f](e)}},function(e,t,n){var i=n(110)
|
564 | var a=n(24)
|
565 | var o=n(107)
|
566 | var s=n(106)
|
567 | t.protocol=3
|
568 | var r=t.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6}
|
569 | var c=s(r)
|
570 | var p={type:"error",data:"parser error"}
|
571 | t.encodePacket=function(e,t,n,a){if("function"==typeof t){a=t
|
572 | t=null}if("function"==typeof n){a=n
|
573 | n=null}if(Buffer.isBuffer(e.data))return l(e,t,a)
|
574 | if(e.data&&(e.data.buffer||e.data)instanceof ArrayBuffer){e.data=f(e.data)
|
575 | return l(e,t,a)}var o=r[e.type]
|
576 | void 0!==e.data&&(o+=n?i.encode(String(e.data),{strict:!1}):String(e.data))
|
577 | return a(""+o)}
|
578 | function l(e,n,i){if(!n)return t.encodeBase64Packet(e,i)
|
579 | var a=e.data
|
580 | var o=new Buffer(1)
|
581 | o[0]=r[e.type]
|
582 | return i(Buffer.concat([o,a]))}t.encodeBase64Packet=function(e,t){Buffer.isBuffer(e.data)||(e.data=f(e.data))
|
583 | var n="b"+r[e.type]
|
584 | return t(n+=e.data.toString("base64"))}
|
585 | t.decodePacket=function(e,n,a){if(void 0===e)return p
|
586 | var o
|
587 | if("string"==typeof e)return"b"===(o=e.charAt(0))?t.decodeBase64Packet(e.substr(1),n):a&&!1===(e=function(e){try{e=i.decode(e,{strict:!1})}catch(e){return!1}return e}(e))?p:Number(o)==o&&c[o]?e.length>1?{type:c[o],data:e.substring(1)}:{type:c[o]}:p
|
588 | if("arraybuffer"===n){var s=new Uint8Array(e)
|
589 | o=s[0]
|
590 | return{type:c[o],data:s.buffer.slice(1)}}e instanceof ArrayBuffer&&(e=f(e))
|
591 | o=e[0]
|
592 | return{type:c[o],data:e.slice(1)}}
|
593 | t.decodeBase64Packet=function(e,t){var n=c[e.charAt(0)]
|
594 | var i=new Buffer(e.substr(1),"base64")
|
595 | if("arraybuffer"===t){var a=new Uint8Array(i.length)
|
596 | for(var o=0;o<a.length;o++)a[o]=i[o]
|
597 | i=a.buffer}return{type:n,data:i}}
|
598 | t.encodePayload=function(e,n,i){if("function"==typeof n){i=n
|
599 | n=null}if(n&&a(e))return t.encodePayloadAsBinary(e,i)
|
600 | if(!e.length)return i("0:")
|
601 | u(e,function(e,i){t.encodePacket(e,n,!1,function(e){i(null,function(e){return e.length+":"+e}(e))})},function(e,t){return i(t.join(""))})}
|
602 | function u(e,t,n){var i=new Array(e.length)
|
603 | var a=o(e.length,n)
|
604 | for(var s=0;s<e.length;s++)t(e[s],function(e,t){i[s]=t
|
605 | a(e,i)})}t.decodePayload=function(e,n,i){if("string"!=typeof e)return t.decodePayloadAsBinary(e,n,i)
|
606 | if("function"==typeof n){i=n
|
607 | n=null}if(""===e)return i(p,0,1)
|
608 | var a,o,s,r=""
|
609 | for(var c=0,l=e.length;c<l;c++){var u=e.charAt(c)
|
610 | if(":"===u){if(""===r||r!=(a=Number(r)))return i(p,0,1)
|
611 | if(r!=(o=e.substr(c+1,a)).length)return i(p,0,1)
|
612 | if(o.length){s=t.decodePacket(o,n,!1)
|
613 | if(p.type===s.type&&p.data===s.data)return i(p,0,1)
|
614 | if(!1===i(s,c+a,l))return}c+=a
|
615 | r=""}else r+=u}return""!==r?i(p,0,1):void 0}
|
616 | function d(e){var t=""
|
617 | for(var n=0,i=e.length;n<i;n++)t+=String.fromCharCode(e[n])
|
618 | return t}function f(e){var t=new Uint8Array(e.buffer||e)
|
619 | var n=e.byteLength||e.length
|
620 | var i=e.byteOffset||0
|
621 | var a=new Buffer(n)
|
622 | for(var o=0;o<n;o++)a[o]=t[i+o]
|
623 | return a}t.encodePayloadAsBinary=function(e,t){if(!e.length)return t(new Buffer(0))
|
624 | u(e,h,function(e,n){return t(Buffer.concat(n))})}
|
625 | function h(e,n){t.encodePacket(e,!0,!0,function(e){var t=""+e.length
|
626 | var i
|
627 | if("string"==typeof e){(i=new Buffer(t.length+2))[0]=0
|
628 | for(var a=0;a<t.length;a++)i[a+1]=parseInt(t[a],10)
|
629 | i[i.length-1]=255
|
630 | return n(null,Buffer.concat([i,function(e){var t=new Buffer(e.length)
|
631 | for(var n=0,i=e.length;n<i;n++)t.writeUInt8(e.charCodeAt(n),n)
|
632 | return t}(e)]))}(i=new Buffer(t.length+2))[0]=1
|
633 | for(a=0;a<t.length;a++)i[a+1]=parseInt(t[a],10)
|
634 | i[i.length-1]=255
|
635 | n(null,Buffer.concat([i,e]))})}t.decodePayloadAsBinary=function(e,n,i){if("function"==typeof n){i=n
|
636 | n=null}var a=e
|
637 | var o=[]
|
638 | var s
|
639 | for(;a.length>0;){var r=""
|
640 | var c=0===a[0]
|
641 | for(s=1;255!==a[s];s++){if(r.length>310)return i(p,0,1)
|
642 | r+=""+a[s]}a=a.slice(r.length+1)
|
643 | var l=parseInt(r,10)
|
644 | var u=a.slice(1,l+1)
|
645 | c&&(u=d(u))
|
646 | o.push(u)
|
647 | a=a.slice(l+1)}var f=o.length
|
648 | for(s=0;s<f;s++){var h=o[s]
|
649 | i(t.decodePacket(h,n,!0),s,f)}}},function(e,t,n){"use strict"
|
650 | var i=n(32)
|
651 | var a=n(12)
|
652 | var o=n(11)
|
653 | function s(e,t){this._client=e
|
654 | this.queue=new i
|
655 | var n,a
|
656 | if(t)for(var o=0;o<t.length;o++){n=t[o][0]
|
657 | a=t[o].slice(1)
|
658 | Array.isArray(n)?this[n[0]].apply(this,n.slice(1).concat(a)):this[n].apply(this,a)}}function r(e,t,n){var i=t.callback
|
659 | t.callback=function(a,o){if(a&&-1!==n){i&&i(a)
|
660 | a.position=n
|
661 | e.errors.push(a)}e.wants_buffers[n]=t.buffer_args
|
662 | t.callback=i}
|
663 | e._client.internal_send_command(t)}s.prototype.exec_atomic=s.prototype.EXEC_ATOMIC=s.prototype.execAtomic=function(e){return this.queue.length<2?this.exec_batch(e):this.exec(e)}
|
664 | s.prototype.exec_transaction=function(e){if(this.monitoring||this._client.monitoring){var t=new RangeError("Using transaction with a client that is in monitor mode does not work due to faulty return values of Redis.")
|
665 | t.command="EXEC"
|
666 | t.code="EXECABORT"
|
667 | return a.reply_in_order(this._client,e,t)}var n=this
|
668 | var i=n.queue.length
|
669 | n.errors=[]
|
670 | n.callback=e
|
671 | n._client.cork()
|
672 | n.wants_buffers=new Array(i)
|
673 | r(n,new o("multi",[]),-1)
|
674 | for(var s=0;s<i;s++)r(n,n.queue.get(s),s)
|
675 | n._client.internal_send_command(new o("exec",[],function(e,t){!function(e,t,n){var i,o=0
|
676 | if(t){t.errors=e.errors
|
677 | e.callback?e.callback(t):"CONNECTION_BROKEN"!==t.code&&e._client.emit("error",t)}else{if(n)for(;i=e.queue.shift();){if(n[o]instanceof Error){var s=n[o].message.match(a.err_code)
|
678 | s&&(n[o].code=s[1])
|
679 | n[o].command=i.command.toUpperCase()
|
680 | "function"==typeof i.callback&&i.callback(n[o])}else{n[o]=e._client.handle_reply(n[o],i.command,e.wants_buffers[o])
|
681 | "function"==typeof i.callback&&i.callback(null,n[o])}o++}e.callback&&e.callback(null,n)}}(n,e,t)}))
|
682 | n._client.uncork()
|
683 | return!n._client.should_buffer}
|
684 | function c(e,t,n){return function(i,a){if(i){e.results[n]=i
|
685 | e.results[n].position=n}else e.results[n]=a
|
686 | t(i,a)}}s.prototype.exec=s.prototype.EXEC=s.prototype.exec_batch=function(e){var t=this
|
687 | var n=t.queue.length
|
688 | var i=0
|
689 | var o
|
690 | if(0===n){a.reply_in_order(t._client,e,null,[])
|
691 | return!t._client.should_buffer}t._client.cork()
|
692 | if(!e){for(;o=t.queue.shift();)t._client.internal_send_command(o)
|
693 | t._client.uncork()
|
694 | return!t._client.should_buffer}var s=function(e,n){if(e){t.results.push(e)
|
695 | var i=t.results.length-1
|
696 | t.results[i].position=i}else t.results.push(n)}
|
697 | var r=function(n){return function(i,a){n(i,a)
|
698 | e(null,t.results)}}
|
699 | t.results=[]
|
700 | for(;o=t.queue.shift();){"function"==typeof o.callback?o.callback=c(t,o.callback,i):o.callback=s
|
701 | "function"==typeof e&&i===n-1&&(o.callback=r(o.callback))
|
702 | this._client.internal_send_command(o)
|
703 | i++}t._client.uncork()
|
704 | return!t._client.should_buffer}
|
705 | e.exports=s},function(e,t,n){"use strict"
|
706 | var i=n(13)
|
707 | e.exports=function(){i.debug_mode&&console.error.apply(null,arguments)}},function(e,t,n){"use strict"
|
708 | var i=n(1)
|
709 | var a=n(15)
|
710 | var o=!1
|
711 | function s(e){var t=Error.stackTraceLimit
|
712 | Error.stackTraceLimit=2
|
713 | a.call(this,e,o)
|
714 | Error.captureStackTrace(this,s)
|
715 | Error.stackTraceLimit=t}i.inherits(s,a)
|
716 | Object.defineProperty(s.prototype,"name",{value:"ReplyError",configurable:!0,writable:!0})
|
717 | e.exports=s},function(e,t,n){"use strict"
|
718 | const i=n(10).Buffer
|
719 | const a=(e,t)=>{const n=i.allocUnsafe(t)
|
720 | var a=0
|
721 | for(var o=0;o<e.length;o++){const t=e[o]
|
722 | t.copy(n,a)
|
723 | a+=t.length}return n}
|
724 | try{const t=n(85)
|
725 | e.exports=Object.assign({concat:a},t.BufferUtil||t)}catch(t){const n=(e,t,n,i,a)=>{for(var o=0;o<a;o++)n[i+o]=e[o]^t[3&o]}
|
726 | const i=(e,t)=>{const n=e.length
|
727 | for(var i=0;i<n;i++)e[i]^=t[3&i]}
|
728 | e.exports={concat:a,mask:n,unmask:i}}},function(e,t,n){var i=n(108)
|
729 | var a=Object.prototype.toString
|
730 | var o="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===a.call(Blob)
|
731 | var s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===a.call(File)
|
732 | e.exports=function e(t){if(!t||"object"!=typeof t)return!1
|
733 | if(i(t)){for(var n=0,a=t.length;n<a;n++)if(e(t[n]))return!0
|
734 | return!1}if("function"==typeof Buffer&&Buffer.isBuffer&&Buffer.isBuffer(t)||"function"==typeof ArrayBuffer&&t instanceof ArrayBuffer||o&&t instanceof Blob||s&&t instanceof File)return!0
|
735 | if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return e(t.toJSON(),!0)
|
736 | for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&e(t[r]))return!0
|
737 | return!1}},function(e,t,n){var i=n(7).EventEmitter
|
738 | var a=n(19)
|
739 | var o=n(1)
|
740 | var s=n(6)("engine:transport")
|
741 | e.exports=c
|
742 | function r(){}function c(e){this.readyState="open"
|
743 | this.discarded=!1}o.inherits(c,i)
|
744 | c.prototype.discard=function(){this.discarded=!0}
|
745 | c.prototype.onRequest=function(e){s("setting request")
|
746 | this.req=e}
|
747 | c.prototype.close=function(e){if("closed"!==this.readyState&&"closing"!==this.readyState){this.readyState="closing"
|
748 | this.doClose(e||r)}}
|
749 | c.prototype.onError=function(e,t){if(this.listeners("error").length){var n=new Error(e)
|
750 | n.type="TransportError"
|
751 | n.description=t
|
752 | this.emit("error",n)}else s("ignored transport error %s (%s)",e,t)}
|
753 | c.prototype.onPacket=function(e){this.emit("packet",e)}
|
754 | c.prototype.onData=function(e){this.onPacket(a.decodePacket(e))}
|
755 | c.prototype.onClose=function(){this.readyState="closed"
|
756 | this.emit("close")}},function(e){e.exports={a:"imock-socket",b:"0.0.12"}},function(e,t,n){(t=e.exports=a.debug=a.default=a).coerce=function(e){return e instanceof Error?e.stack||e.message:e}
|
757 | t.disable=function(){t.enable("")}
|
758 | t.enable=function(e){t.save(e)
|
759 | t.names=[]
|
760 | t.skips=[]
|
761 | var n=("string"==typeof e?e:"").split(/[\s,]+/)
|
762 | var i=n.length
|
763 | for(var a=0;a<i;a++)n[a]&&("-"===(e=n[a].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))}
|
764 | t.enabled=function(e){var n,i
|
765 | for(n=0,i=t.skips.length;n<i;n++)if(t.skips[n].test(e))return!1
|
766 | for(n=0,i=t.names.length;n<i;n++)if(t.names[n].test(e))return!0
|
767 | return!1}
|
768 | t.humanize=n(46)
|
769 | t.names=[]
|
770 | t.skips=[]
|
771 | t.formatters={}
|
772 | var i
|
773 | function a(e){function n(){if(n.enabled){var e=n
|
774 | var a=+new Date
|
775 | var o=a-(i||a)
|
776 | e.diff=o
|
777 | e.prev=i
|
778 | e.curr=a
|
779 | i=a
|
780 | var s=new Array(arguments.length)
|
781 | for(var r=0;r<s.length;r++)s[r]=arguments[r]
|
782 | s[0]=t.coerce(s[0])
|
783 | "string"!=typeof s[0]&&s.unshift("%O")
|
784 | var c=0
|
785 | s[0]=s[0].replace(/%([a-zA-Z%])/g,function(n,i){if("%%"===n)return n
|
786 | c++
|
787 | var a=t.formatters[i]
|
788 | if("function"==typeof a){var o=s[c]
|
789 | n=a.call(e,o)
|
790 | s.splice(c,1)
|
791 | c--}return n})
|
792 | t.formatArgs.call(e,s);(n.log||t.log||console.log.bind(console)).apply(e,s)}}n.namespace=e
|
793 | n.enabled=t.enabled(e)
|
794 | n.useColors=t.useColors()
|
795 | n.color=function(e){var n,i=0
|
796 | for(n in e){i=(i<<5)-i+e.charCodeAt(n)
|
797 | i|=0}return t.colors[Math.abs(i)%t.colors.length]}(e)
|
798 | "function"==typeof t.init&&t.init(n)
|
799 | return n}},function(e,t,n){"use strict"
|
800 | var i=n(66)
|
801 | t.list=Object.keys(i)
|
802 | var a={}
|
803 | t.list.forEach(function(e){a[e]=i[e].flags.reduce(function(e,t){e[t]=!0
|
804 | return e},{})})
|
805 | t.exists=function(e){return Boolean(i[e])}
|
806 | t.hasFlag=function(e,t){if(!a[e])throw new Error("Unknown command "+e)
|
807 | return Boolean(a[e][t])}
|
808 | t.getKeyIndexes=function(e,t,n){var a=i[e]
|
809 | if(!a)throw new Error("Unknown command "+e)
|
810 | if(!Array.isArray(t))throw new Error("Expect args to be an array")
|
811 | var s=[]
|
812 | var r,c,p,l
|
813 | switch(e){case"zunionstore":case"zinterstore":s.push(0)
|
814 | case"eval":case"evalsha":p=Number(t[1])+2
|
815 | for(r=2;r<p;r++)s.push(r)
|
816 | break
|
817 | case"sort":l=n&&n.parseExternalKey
|
818 | s.push(0)
|
819 | for(r=1;r<t.length-1;r++)if("string"==typeof t[r]){var u=t[r].toUpperCase()
|
820 | if("GET"===u)"#"!==t[r+=1]&&(l?s.push([r,o(t[r])]):s.push(r))
|
821 | else if("BY"===u){r+=1
|
822 | l?s.push([r,o(t[r])]):s.push(r)}else if("STORE"===u){r+=1
|
823 | s.push(r)}}break
|
824 | case"migrate":if(""===t[2]){for(r=5;r<t.length-1;r++)if("KEYS"===t[r].toUpperCase()){for(var d=r+1;d<t.length;d++)s.push(d)
|
825 | break}}else s.push(2)
|
826 | break
|
827 | default:if(a.step>0){c=a.keyStart-1
|
828 | p=a.keyStop>0?a.keyStop:t.length+a.keyStop+1
|
829 | for(r=c;r<p;r+=a.step)s.push(r)}}return s}
|
830 | function o(e){"string"!=typeof e&&(e=String(e))
|
831 | var t=e.indexOf("->")
|
832 | return-1===t?e.length:t}},function(e,t,n){"use strict"
|
833 | var i=n(1)
|
834 | var a=n(31)
|
835 | var o=n(15)
|
836 | var s=!1
|
837 | function r(e,t,n){a(t)
|
838 | a.strictEqual(typeof n,"number")
|
839 | o.call(this,e,s)
|
840 | this.offset=n
|
841 | this.buffer=t
|
842 | Error.captureStackTrace(this,r)}i.inherits(r,o)
|
843 | Object.defineProperty(r.prototype,"name",{value:"ParserError",configurable:!0,writable:!0})
|
844 | e.exports=r},function(e,t,n){"use strict"
|
845 | e.exports=n(70)
|
846 | e.exports.ReplyError=n(22)
|
847 | e.exports.RedisError=n(15)
|
848 | e.exports.ParserError=n(15)},function(e,t){e.exports=require("assert")},function(e,t,n){"use strict"
|
849 | function i(e){this._capacity=o(e)
|
850 | this._length=0
|
851 | this._front=0
|
852 | if(a(e)){var t=e.length
|
853 | for(var n=0;n<t;++n)this[n]=e[n]
|
854 | this._length=t}}i.prototype.toArray=function(){var e=this._length
|
855 | var t=new Array(e)
|
856 | var n=this._front
|
857 | var i=this._capacity
|
858 | for(var a=0;a<e;++a)t[a]=this[n+a&i-1]
|
859 | return t}
|
860 | i.prototype.push=function(e){var t=arguments.length
|
861 | var n=this._length
|
862 | if(t>1){var i=this._capacity
|
863 | if(n+t>i){for(var a=0;a<t;++a){this._checkCapacity(n+1)
|
864 | this[o=this._front+n&this._capacity-1]=arguments[a]
|
865 | n++
|
866 | this._length=n}return n}var o=this._front
|
867 | for(a=0;a<t;++a){this[o+n&i-1]=arguments[a]
|
868 | o++}this._length=n+t
|
869 | return n+t}if(0===t)return n
|
870 | this._checkCapacity(n+1)
|
871 | this[a=this._front+n&this._capacity-1]=e
|
872 | this._length=n+1
|
873 | return n+1}
|
874 | i.prototype.pop=function(){var e=this._length
|
875 | if(0!==e){var t=this._front+e-1&this._capacity-1
|
876 | var n=this[t]
|
877 | this[t]=void 0
|
878 | this._length=e-1
|
879 | return n}}
|
880 | i.prototype.shift=function(){var e=this._length
|
881 | if(0!==e){var t=this._front
|
882 | var n=this[t]
|
883 | this[t]=void 0
|
884 | this._front=t+1&this._capacity-1
|
885 | this._length=e-1
|
886 | return n}}
|
887 | i.prototype.unshift=function(e){var t=this._length
|
888 | var n=arguments.length
|
889 | if(n>1){if(t+n>(a=this._capacity)){for(var i=n-1;i>=0;i--){this._checkCapacity(t+1)
|
890 | var a=this._capacity
|
891 | this[s=(this._front-1&a-1^a)-a]=arguments[i]
|
892 | t++
|
893 | this._length=t
|
894 | this._front=s}return t}var o=this._front
|
895 | for(i=n-1;i>=0;i--){var s
|
896 | this[s=(o-1&a-1^a)-a]=arguments[i]
|
897 | o=s}this._front=o
|
898 | this._length=t+n
|
899 | return t+n}if(0===n)return t
|
900 | this._checkCapacity(t+1)
|
901 | a=this._capacity
|
902 | this[i=(this._front-1&a-1^a)-a]=e
|
903 | this._length=t+1
|
904 | this._front=i
|
905 | return t+1}
|
906 | i.prototype.peekBack=function(){var e=this._length
|
907 | if(0!==e){return this[this._front+e-1&this._capacity-1]}}
|
908 | i.prototype.peekFront=function(){if(0!==this._length)return this[this._front]}
|
909 | i.prototype.get=function(e){var t=e
|
910 | if(t===(0|t)){var n=this._length
|
911 | t<0&&(t+=n)
|
912 | if(!(t<0||t>=n))return this[this._front+t&this._capacity-1]}}
|
913 | i.prototype.isEmpty=function(){return 0===this._length}
|
914 | i.prototype.clear=function(){var e=this._length
|
915 | var t=this._front
|
916 | var n=this._capacity
|
917 | for(var i=0;i<e;++i)this[t+i&n-1]=void 0
|
918 | this._length=0
|
919 | this._front=0}
|
920 | i.prototype.toString=function(){return this.toArray().toString()}
|
921 | i.prototype.valueOf=i.prototype.toString
|
922 | i.prototype.removeFront=i.prototype.shift
|
923 | i.prototype.removeBack=i.prototype.pop
|
924 | i.prototype.insertFront=i.prototype.unshift
|
925 | i.prototype.insertBack=i.prototype.push
|
926 | i.prototype.enqueue=i.prototype.push
|
927 | i.prototype.dequeue=i.prototype.shift
|
928 | i.prototype.toJSON=i.prototype.toArray
|
929 | Object.defineProperty(i.prototype,"length",{get:function(){return this._length},set:function(){throw new RangeError("")}})
|
930 | i.prototype._checkCapacity=function(e){this._capacity<e&&this._resizeTo(o(1.5*this._capacity+16))}
|
931 | i.prototype._resizeTo=function(e){var t=this._capacity
|
932 | this._capacity=e
|
933 | var n=this._front
|
934 | var i=this._length
|
935 | if(n+i>t){!function(e,t,n,i,a){for(var o=0;o<a;++o){n[o+i]=e[o+t]
|
936 | e[o+t]=void 0}}(this,0,this,t,n+i&t-1)}}
|
937 | var a=Array.isArray
|
938 | function o(e){if("number"!=typeof e){if(!a(e))return 16
|
939 | e=e.length}return function(e){e>>>=0
|
940 | e-=1
|
941 | e|=e>>1
|
942 | e|=e>>2
|
943 | e|=e>>4
|
944 | e|=e>>8
|
945 | return 1+(e|=e>>16)}(Math.min(Math.max(16,e),1073741824))}e.exports=i},function(e,t){e.exports=require("net")},function(e,t,n){var i=n(7).EventEmitter
|
946 | e.exports=a
|
947 | function a(e){this.nsp=e
|
948 | this.rooms={}
|
949 | this.sids={}
|
950 | this.encoder=e.server.encoder}a.prototype.__proto__=i.prototype
|
951 | a.prototype.add=function(e,t,n){return this.addAll(e,[t],n)}
|
952 | a.prototype.addAll=function(e,t,n){for(var i=0;i<t.length;i++){var a=t[i]
|
953 | this.sids[e]=this.sids[e]||{}
|
954 | this.sids[e][a]=!0
|
955 | this.rooms[a]=this.rooms[a]||o()
|
956 | this.rooms[a].add(e)}n&&process.nextTick(n.bind(null,null))}
|
957 | a.prototype.del=function(e,t,n){this.sids[e]=this.sids[e]||{}
|
958 | delete this.sids[e][t]
|
959 | if(this.rooms.hasOwnProperty(t)){this.rooms[t].del(e)
|
960 | 0===this.rooms[t].length&&delete this.rooms[t]}n&&process.nextTick(n.bind(null,null))}
|
961 | a.prototype.delAll=function(e,t){var n=this.sids[e]
|
962 | if(n)for(var i in n)if(this.rooms.hasOwnProperty(i)){this.rooms[i].del(e)
|
963 | 0===this.rooms[i].length&&delete this.rooms[i]}delete this.sids[e]
|
964 | t&&process.nextTick(t.bind(null,null))}
|
965 | a.prototype.broadcast=function(e,t){var n=t.rooms||[]
|
966 | var i=t.except||[]
|
967 | var a=t.flags||{}
|
968 | var o={preEncoded:!0,volatile:a.volatile,compress:a.compress}
|
969 | var s={}
|
970 | var r=this
|
971 | var c
|
972 | e.nsp=this.nsp.name
|
973 | this.encoder.encode(e,function(e){if(n.length)for(var t=0;t<n.length;t++){var a=r.rooms[n[t]]
|
974 | if(a){var p=a.sockets
|
975 | for(var l in p)if(p.hasOwnProperty(l)){if(s[l]||~i.indexOf(l))continue
|
976 | if(c=r.nsp.connected[l]){c.packet(e,o)
|
977 | s[l]=!0}}}}else for(var l in r.sids)if(r.sids.hasOwnProperty(l)){if(~i.indexOf(l))continue;(c=r.nsp.connected[l])&&c.packet(e,o)}})}
|
978 | a.prototype.clients=function(e,t){if("function"==typeof e){t=e
|
979 | e=null}var n={}
|
980 | var i=[]
|
981 | if((e=e||[]).length)for(var a=0;a<e.length;a++){var o=this.rooms[e[a]]
|
982 | if(o){var s=o.sockets
|
983 | for(var r in s)if(s.hasOwnProperty(r)){if(n[r])continue
|
984 | if(this.nsp.connected[r]){i.push(r)
|
985 | n[r]=!0}}}}else for(var r in this.sids)this.sids.hasOwnProperty(r)&&this.nsp.connected[r]&&i.push(r)
|
986 | t&&process.nextTick(t.bind(null,null,i))}
|
987 | a.prototype.clientRooms=function(e,t){var n=this.sids[e]
|
988 | t&&process.nextTick(t.bind(null,null,n?Object.keys(n):null))}
|
989 | function o(){if(!(this instanceof o))return new o
|
990 | this.sockets={}
|
991 | this.length=0}o.prototype.add=function(e){if(!this.sockets.hasOwnProperty(e)){this.sockets[e]=!0
|
992 | this.length++}}
|
993 | o.prototype.del=function(e){if(this.sockets.hasOwnProperty(e)){delete this.sockets[e]
|
994 | this.length--}}},function(e,t,n){var i=n(76)
|
995 | var a=n(7).EventEmitter
|
996 | var o=n(16)
|
997 | var s=n(24)
|
998 | var r=n(6)("socket.io:namespace")
|
999 | e.exports=t=p
|
1000 | t.events=["connect","connection","newListener"]
|
1001 | t.flags=["json","volatile","local"]
|
1002 | var c=a.prototype.emit
|
1003 | function p(e,t){this.name=t
|
1004 | this.server=e
|
1005 | this.sockets={}
|
1006 | this.connected={}
|
1007 | this.fns=[]
|
1008 | this.ids=0
|
1009 | this.rooms=[]
|
1010 | this.flags={}
|
1011 | this.initAdapter()}p.prototype.__proto__=a.prototype
|
1012 | t.flags.forEach(function(e){Object.defineProperty(p.prototype,e,{get:function(){this.flags[e]=!0
|
1013 | return this}})})
|
1014 | p.prototype.initAdapter=function(){this.adapter=new(this.server.adapter())(this)}
|
1015 | p.prototype.use=function(e){if(this.server.eio&&"/"===this.name){r("removing initial packet")
|
1016 | delete this.server.eio.initialPacket}this.fns.push(e)
|
1017 | return this}
|
1018 | p.prototype.run=function(e,t){var n=this.fns.slice(0)
|
1019 | if(!n.length)return t(null)
|
1020 | !function i(a){n[a](e,function(e){if(e)return t(e)
|
1021 | if(!n[a+1])return t(null)
|
1022 | i(a+1)})}(0)}
|
1023 | p.prototype.to=p.prototype.in=function(e){~this.rooms.indexOf(e)||this.rooms.push(e)
|
1024 | return this}
|
1025 | p.prototype.add=function(e,t,n){r("adding socket to nsp %s",this.name)
|
1026 | var a=new i(this,e,t)
|
1027 | var o=this
|
1028 | this.run(a,function(t){process.nextTick(function(){if("open"==e.conn.readyState){if(t)return a.error(t.data||t.message)
|
1029 | o.sockets[a.id]=a
|
1030 | a.onconnect()
|
1031 | n&&n()
|
1032 | o.emit("connect",a)
|
1033 | o.emit("connection",a)}else r("next called after client was closed - ignoring socket")})})
|
1034 | return a}
|
1035 | p.prototype.remove=function(e){this.sockets.hasOwnProperty(e.id)?delete this.sockets[e.id]:r("ignoring remove for %s",e.id)}
|
1036 | p.prototype.emit=function(e){if(~t.events.indexOf(e)){c.apply(this,arguments)
|
1037 | return this}var n=Array.prototype.slice.call(arguments)
|
1038 | var i={type:(void 0!==this.flags.binary?this.flags.binary:s(n))?o.BINARY_EVENT:o.EVENT,data:n}
|
1039 | if("function"==typeof n[n.length-1])throw new Error("Callbacks are not supported when broadcasting")
|
1040 | var a=this.rooms.slice(0)
|
1041 | var r=Object.assign({},this.flags)
|
1042 | this.rooms=[]
|
1043 | this.flags={}
|
1044 | this.adapter.broadcast(i,{rooms:a,flags:r})
|
1045 | return this}
|
1046 | p.prototype.send=p.prototype.write=function(){var e=Array.prototype.slice.call(arguments)
|
1047 | e.unshift("message")
|
1048 | this.emit.apply(this,e)
|
1049 | return this}
|
1050 | p.prototype.clients=function(e){this.adapter.clients(this.rooms,e)
|
1051 | this.rooms=[]
|
1052 | return this}
|
1053 | p.prototype.compress=function(e){this.flags.compress=e
|
1054 | return this}
|
1055 | p.prototype.binary=function(e){this.flags.binary=e
|
1056 | return this}},function(e,t){e.exports=function(e){return n&&global.Buffer.isBuffer(e)||i&&(e instanceof global.ArrayBuffer||a(e))}
|
1057 | var n="function"==typeof global.Buffer&&"function"==typeof global.Buffer.isBuffer
|
1058 | var i="function"==typeof global.ArrayBuffer
|
1059 | var a=function(){return i&&"function"==typeof global.ArrayBuffer.isView?global.ArrayBuffer.isView:function(e){return e.buffer instanceof global.ArrayBuffer}}()},function(e,t){var n={}.toString
|
1060 | e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict"
|
1061 | const i=n(10)
|
1062 | const a=n(5)
|
1063 | const o=n(18)
|
1064 | const s=n(23)
|
1065 | const r=n(39)
|
1066 | const c=n(17)
|
1067 | const p=i.Buffer
|
1068 | class l{constructor(e,t){this._extensions=t||{}
|
1069 | this._socket=e
|
1070 | this._firstFragment=!0
|
1071 | this._compress=!1
|
1072 | this._bufferedBytes=0
|
1073 | this._deflating=!1
|
1074 | this._queue=[]}static frame(e,t){const n=e.length<1024||t.mask&&t.readOnly
|
1075 | var i=t.mask?6:2
|
1076 | var o=e.length
|
1077 | if(e.length>=65536){i+=8
|
1078 | o=127}else if(e.length>125){i+=2
|
1079 | o=126}const r=p.allocUnsafe(n?e.length+i:i)
|
1080 | r[0]=t.fin?128|t.opcode:t.opcode
|
1081 | t.rsv1&&(r[0]|=64)
|
1082 | if(126===o)r.writeUInt16BE(e.length,2,!0)
|
1083 | else if(127===o){r.writeUInt32BE(0,2,!0)
|
1084 | r.writeUInt32BE(e.length,6,!0)}if(!t.mask){r[1]=o
|
1085 | if(n){e.copy(r,i)
|
1086 | return[r]}return[r,e]}const c=a.randomBytes(4)
|
1087 | r[1]=128|o
|
1088 | r[i-4]=c[0]
|
1089 | r[i-3]=c[1]
|
1090 | r[i-2]=c[2]
|
1091 | r[i-1]=c[3]
|
1092 | if(n){s.mask(e,c,r,i,e.length)
|
1093 | return[r]}s.mask(e,c,e,0,e.length)
|
1094 | return[r,e]}close(e,t,n,i){var a
|
1095 | if(void 0===e)e=1e3
|
1096 | else if("number"!=typeof e||!r.isValidErrorCode(e))throw new Error("first argument must be a valid error code number")
|
1097 | if(void 0===t||""===t)1e3===e?a=c.EMPTY_BUFFER:(a=p.allocUnsafe(2)).writeUInt16BE(e,0,!0)
|
1098 | else{(a=p.allocUnsafe(2+p.byteLength(t))).writeUInt16BE(e,0,!0)
|
1099 | a.write(t,2)}this._deflating?this.enqueue([this.doClose,a,n,i]):this.doClose(a,n,i)}doClose(e,t,n){this.sendFrame(l.frame(e,{fin:!0,rsv1:!1,opcode:8,mask:t,readOnly:!1}),n)}ping(e,t){var n=!0
|
1100 | if(!p.isBuffer(e))if(e instanceof ArrayBuffer)e=p.from(e)
|
1101 | else if(ArrayBuffer.isView(e))e=u(e)
|
1102 | else{e=p.from(e)
|
1103 | n=!1}this._deflating?this.enqueue([this.doPing,e,t,n]):this.doPing(e,t,n)}doPing(e,t,n){this.sendFrame(l.frame(e,{fin:!0,rsv1:!1,opcode:9,mask:t,readOnly:n}))}pong(e,t){var n=!0
|
1104 | if(!p.isBuffer(e))if(e instanceof ArrayBuffer)e=p.from(e)
|
1105 | else if(ArrayBuffer.isView(e))e=u(e)
|
1106 | else{e=p.from(e)
|
1107 | n=!1}this._deflating?this.enqueue([this.doPong,e,t,n]):this.doPong(e,t,n)}doPong(e,t,n){this.sendFrame(l.frame(e,{fin:!0,rsv1:!1,opcode:10,mask:t,readOnly:n}))}send(e,t,n){var i=t.binary?2:1
|
1108 | var a=t.compress
|
1109 | var s=!0
|
1110 | if(!p.isBuffer(e))if(e instanceof ArrayBuffer)e=p.from(e)
|
1111 | else if(ArrayBuffer.isView(e))e=u(e)
|
1112 | else{e=p.from(e)
|
1113 | s=!1}const r=this._extensions[o.extensionName]
|
1114 | if(this._firstFragment){this._firstFragment=!1
|
1115 | a&&r&&(a=e.length>=r._threshold)
|
1116 | this._compress=a}else{a=!1
|
1117 | i=0}t.fin&&(this._firstFragment=!0)
|
1118 | if(r){const o={fin:t.fin,rsv1:a,opcode:i,mask:t.mask,readOnly:s}
|
1119 | this._deflating?this.enqueue([this.dispatch,e,this._compress,o,n]):this.dispatch(e,this._compress,o,n)}else this.sendFrame(l.frame(e,{fin:t.fin,rsv1:!1,opcode:i,mask:t.mask,readOnly:s}),n)}dispatch(e,t,n,i){if(!t){this.sendFrame(l.frame(e,n),i)
|
1120 | return}const a=this._extensions[o.extensionName]
|
1121 | this._deflating=!0
|
1122 | a.compress(e,n.fin,(e,t)=>{n.readOnly=!1
|
1123 | this.sendFrame(l.frame(t,n),i)
|
1124 | this._deflating=!1
|
1125 | this.dequeue()})}dequeue(){for(;!this._deflating&&this._queue.length;){const e=this._queue.shift()
|
1126 | this._bufferedBytes-=e[1].length
|
1127 | e[0].apply(this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[1].length
|
1128 | this._queue.push(e)}sendFrame(e,t){if(2===e.length){this._socket.write(e[0])
|
1129 | this._socket.write(e[1],t)}else this._socket.write(e[0],t)}}e.exports=l
|
1130 | function u(e){const t=p.from(e.buffer)
|
1131 | return e.byteLength!==e.buffer.byteLength?t.slice(e.byteOffset,e.byteOffset+e.byteLength):t}},function(e,t,n){"use strict"
|
1132 | e.exports={isValidErrorCode:function(e){return e>=1e3&&e<=1013&&1004!==e&&1005!==e&&1006!==e||e>=3e3&&e<=4999},1000:"normal",1001:"going away",1002:"protocol error",1003:"unsupported data",1004:"reserved",1005:"reserved for extensions",1006:"reserved for extensions",1007:"inconsistent or invalid data",1008:"policy violation",1009:"message too big",1010:"extension handshake missing",1011:"an unexpected condition prevented the request from being fulfilled",1012:"service restart",1013:"try again later"}},function(e,t,n){"use strict"
|
1133 | const i=n(10)
|
1134 | const a=n(18)
|
1135 | const o=n(83)
|
1136 | const s=n(23)
|
1137 | const r=n(39)
|
1138 | const c=n(17)
|
1139 | const p=i.Buffer
|
1140 | const l=0
|
1141 | const u=1
|
1142 | const d=2
|
1143 | const f=3
|
1144 | const h=4
|
1145 | const m=5
|
1146 | e.exports=class{constructor(e,t,n){this._binaryType=n||c.BINARY_TYPES[0]
|
1147 | this._extensions=e||{}
|
1148 | this._maxPayload=0|t
|
1149 | this._bufferedBytes=0
|
1150 | this._buffers=[]
|
1151 | this._compressed=!1
|
1152 | this._payloadLength=0
|
1153 | this._fragmented=0
|
1154 | this._masked=!1
|
1155 | this._fin=!1
|
1156 | this._mask=null
|
1157 | this._opcode=0
|
1158 | this._totalPayloadLength=0
|
1159 | this._messageLength=0
|
1160 | this._fragments=[]
|
1161 | this._cleanupCallback=null
|
1162 | this._hadError=!1
|
1163 | this._dead=!1
|
1164 | this._loop=!1
|
1165 | this.onmessage=null
|
1166 | this.onclose=null
|
1167 | this.onerror=null
|
1168 | this.onping=null
|
1169 | this.onpong=null
|
1170 | this._state=l}readBuffer(e){var t=0
|
1171 | var n
|
1172 | var i
|
1173 | this._bufferedBytes-=e
|
1174 | if(e===this._buffers[0].length)return this._buffers.shift()
|
1175 | if(e<this._buffers[0].length){n=this._buffers[0].slice(0,e)
|
1176 | this._buffers[0]=this._buffers[0].slice(e)
|
1177 | return n}n=p.allocUnsafe(e)
|
1178 | for(;e>0;){if(e>=(i=this._buffers[0].length)){this._buffers[0].copy(n,t)
|
1179 | t+=i
|
1180 | this._buffers.shift()}else{this._buffers[0].copy(n,t,0,e)
|
1181 | this._buffers[0]=this._buffers[0].slice(e)}e-=i}return n}hasBufferedBytes(e){if(this._bufferedBytes>=e)return!0
|
1182 | this._loop=!1
|
1183 | this._dead&&this.cleanup(this._cleanupCallback)
|
1184 | return!1}add(e){if(!this._dead){this._bufferedBytes+=e.length
|
1185 | this._buffers.push(e)
|
1186 | this.startLoop()}}startLoop(){this._loop=!0
|
1187 | for(;this._loop;)switch(this._state){case l:this.getInfo()
|
1188 | break
|
1189 | case u:this.getPayloadLength16()
|
1190 | break
|
1191 | case d:this.getPayloadLength64()
|
1192 | break
|
1193 | case f:this.getMask()
|
1194 | break
|
1195 | case h:this.getData()
|
1196 | break
|
1197 | default:this._loop=!1}}getInfo(){if(!this.hasBufferedBytes(2))return
|
1198 | const e=this.readBuffer(2)
|
1199 | if(0!=(48&e[0])){this.error(new Error("RSV2 and RSV3 must be clear"),1002)
|
1200 | return}const t=64==(64&e[0])
|
1201 | if(!t||this._extensions[a.extensionName]){this._fin=128==(128&e[0])
|
1202 | this._opcode=15&e[0]
|
1203 | this._payloadLength=127&e[1]
|
1204 | if(0===this._opcode){if(t){this.error(new Error("RSV1 must be clear"),1002)
|
1205 | return}if(!this._fragmented){this.error(new Error(`invalid opcode: ${this._opcode}`),1002)
|
1206 | return}this._opcode=this._fragmented}else if(1===this._opcode||2===this._opcode){if(this._fragmented){this.error(new Error(`invalid opcode: ${this._opcode}`),1002)
|
1207 | return}this._compressed=t}else{if(!(this._opcode>7&&this._opcode<11)){this.error(new Error(`invalid opcode: ${this._opcode}`),1002)
|
1208 | return}if(!this._fin){this.error(new Error("FIN must be set"),1002)
|
1209 | return}if(t){this.error(new Error("RSV1 must be clear"),1002)
|
1210 | return}if(this._payloadLength>125){this.error(new Error("invalid payload length"),1002)
|
1211 | return}}this._fin||this._fragmented||(this._fragmented=this._opcode)
|
1212 | this._masked=128==(128&e[1])
|
1213 | 126===this._payloadLength?this._state=u:127===this._payloadLength?this._state=d:this.haveLength()}else this.error(new Error("RSV1 must be clear"),1002)}getPayloadLength16(){if(this.hasBufferedBytes(2)){this._payloadLength=this.readBuffer(2).readUInt16BE(0,!0)
|
1214 | this.haveLength()}}getPayloadLength64(){if(!this.hasBufferedBytes(8))return
|
1215 | const e=this.readBuffer(8)
|
1216 | const t=e.readUInt32BE(0,!0)
|
1217 | if(t>Math.pow(2,21)-1)this.error(new Error("max payload size exceeded"),1009)
|
1218 | else{this._payloadLength=t*Math.pow(2,32)+e.readUInt32BE(4,!0)
|
1219 | this.haveLength()}}haveLength(){this._opcode<8&&this.maxPayloadExceeded(this._payloadLength)||(this._masked?this._state=f:this._state=h)}getMask(){if(this.hasBufferedBytes(4)){this._mask=this.readBuffer(4)
|
1220 | this._state=h}}getData(){var e=c.EMPTY_BUFFER
|
1221 | if(this._payloadLength){if(!this.hasBufferedBytes(this._payloadLength))return
|
1222 | e=this.readBuffer(this._payloadLength)
|
1223 | this._masked&&s.unmask(e,this._mask)}if(this._opcode>7)this.controlMessage(e)
|
1224 | else if(this._compressed){this._state=m
|
1225 | this.decompress(e)}else this.pushFragment(e)&&this.dataMessage()}decompress(e){this._extensions[a.extensionName].decompress(e,this._fin,(e,t)=>{if(e)this.error(e,1009===e.closeCode?1009:1007)
|
1226 | else{this.pushFragment(t)&&this.dataMessage()
|
1227 | this.startLoop()}})}dataMessage(){if(this._fin){const t=this._messageLength
|
1228 | const n=this._fragments
|
1229 | this._totalPayloadLength=0
|
1230 | this._messageLength=0
|
1231 | this._fragmented=0
|
1232 | this._fragments=[]
|
1233 | if(2===this._opcode){var e
|
1234 | e="nodebuffer"===this._binaryType?v(n,t):"arraybuffer"===this._binaryType?function(e){return 0===e.byteOffset&&e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}(v(n,t)):n
|
1235 | this.onmessage(e)}else{const e=v(n,t)
|
1236 | if(!o(e)){this.error(new Error("invalid utf8 sequence"),1007)
|
1237 | return}this.onmessage(e.toString())}}this._state=l}controlMessage(e){if(8!==this._opcode){9===this._opcode?this.onping(e):this.onpong(e)
|
1238 | this._state=l}else if(0===e.length){this.onclose(1e3,"")
|
1239 | this._loop=!1
|
1240 | this.cleanup(this._cleanupCallback)}else if(1===e.length)this.error(new Error("invalid payload length"),1002)
|
1241 | else{const t=e.readUInt16BE(0,!0)
|
1242 | if(!r.isValidErrorCode(t)){this.error(new Error(`invalid status code: ${t}`),1002)
|
1243 | return}const n=e.slice(2)
|
1244 | if(!o(n)){this.error(new Error("invalid utf8 sequence"),1007)
|
1245 | return}this.onclose(t,n.toString())
|
1246 | this._loop=!1
|
1247 | this.cleanup(this._cleanupCallback)}}error(e,t){this.onerror(e,t)
|
1248 | this._hadError=!0
|
1249 | this._loop=!1
|
1250 | this.cleanup(this._cleanupCallback)}maxPayloadExceeded(e){if(0===e||this._maxPayload<1)return!1
|
1251 | const t=this._totalPayloadLength+e
|
1252 | if(t<=this._maxPayload){this._totalPayloadLength=t
|
1253 | return!1}this.error(new Error("max payload size exceeded"),1009)
|
1254 | return!0}pushFragment(e){if(0===e.length)return!0
|
1255 | const t=this._messageLength+e.length
|
1256 | if(this._maxPayload<1||t<=this._maxPayload){this._messageLength=t
|
1257 | this._fragments.push(e)
|
1258 | return!0}this.error(new Error("max payload size exceeded"),1009)
|
1259 | return!1}cleanup(e){this._dead=!0
|
1260 | if(this._hadError||!this._loop&&this._state!==m){this._extensions=null
|
1261 | this._fragments=null
|
1262 | this._buffers=null
|
1263 | this._mask=null
|
1264 | this._cleanupCallback=null
|
1265 | this.onmessage=null
|
1266 | this.onclose=null
|
1267 | this.onerror=null
|
1268 | this.onping=null
|
1269 | this.onpong=null
|
1270 | e&&e()}else this._cleanupCallback=e}}
|
1271 | function v(e,t){return 1===e.length?e[0]:e.length>1?s.concat(e,t):c.EMPTY_BUFFER}},function(e,t,n){"use strict"
|
1272 | const i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0]
|
1273 | function a(e,t,n){Object.prototype.hasOwnProperty.call(e,t)?e[t].push(n):e[t]=[n]}e.exports={format:function(e){return Object.keys(e).map(t=>{var n=e[t]
|
1274 | Array.isArray(n)||(n=[n])
|
1275 | return n.map(e=>[t].concat(Object.keys(e).map(t=>{var n=e[t]
|
1276 | Array.isArray(n)||(n=[n])
|
1277 | return n.map(e=>!0===e?t:`${t}=${e}`).join("; ")})).join("; ")).join(", ")}).join(", ")},parse:function(e){const t={}
|
1278 | if(void 0===e||""===e)return t
|
1279 | var n={}
|
1280 | var o=!1
|
1281 | var s=!1
|
1282 | var r=!1
|
1283 | var c
|
1284 | var p
|
1285 | var l=-1
|
1286 | var u=-1
|
1287 | for(var d=0;d<e.length;d++){const h=e.charCodeAt(d)
|
1288 | if(void 0===c)if(-1===u&&1===i[h])-1===l&&(l=d)
|
1289 | else if(32===h||9===h)-1===u&&-1!==l&&(u=d)
|
1290 | else{if(59!==h&&44!==h)throw new Error(`unexpected character at index ${d}`)
|
1291 | {if(-1===l)throw new Error(`unexpected character at index ${d}`);-1===u&&(u=d)
|
1292 | const i=e.slice(l,u)
|
1293 | if(44===h){a(t,i,n)
|
1294 | n={}}else c=i
|
1295 | l=u=-1}}else if(void 0===p)if(-1===u&&1===i[h])-1===l&&(l=d)
|
1296 | else if(32===h||9===h)-1===u&&-1!==l&&(u=d)
|
1297 | else if(59===h||44===h){if(-1===l)throw new Error(`unexpected character at index ${d}`);-1===u&&(u=d)
|
1298 | a(n,e.slice(l,u),!0)
|
1299 | if(44===h){a(t,c,n)
|
1300 | n={}
|
1301 | c=void 0}l=u=-1}else{if(61!==h||-1===l||-1!==u)throw new Error(`unexpected character at index ${d}`)
|
1302 | p=e.slice(l,d)
|
1303 | l=u=-1}else if(s){if(1!==i[h])throw new Error(`unexpected character at index ${d}`);-1===l?l=d:o||(o=!0)
|
1304 | s=!1}else if(r)if(1===i[h])-1===l&&(l=d)
|
1305 | else if(34===h&&-1!==l){r=!1
|
1306 | u=d}else{if(92!==h)throw new Error(`unexpected character at index ${d}`)
|
1307 | s=!0}else if(34===h&&61===e.charCodeAt(d-1))r=!0
|
1308 | else if(-1===u&&1===i[h])-1===l&&(l=d)
|
1309 | else if(-1===l||32!==h&&9!==h){if(59!==h&&44!==h)throw new Error(`unexpected character at index ${d}`)
|
1310 | if(-1===l)throw new Error(`unexpected character at index ${d}`);-1===u&&(u=d)
|
1311 | var f=e.slice(l,u)
|
1312 | if(o){f=f.replace(/\\/g,"")
|
1313 | o=!1}a(n,p,f)
|
1314 | if(44===h){a(t,c,n)
|
1315 | n={}
|
1316 | c=void 0}p=void 0
|
1317 | l=u=-1}else-1===u&&(u=d)}if(-1===l||r)throw new Error("unexpected end of input");-1===u&&(u=d)
|
1318 | const h=e.slice(l,u)
|
1319 | if(void 0===c)a(t,h,{})
|
1320 | else{void 0===p?a(n,h,!0):a(n,p,o?h.replace(/\\/g,""):h)
|
1321 | a(t,c,n)}return t}}},function(e,t,n){"use strict"
|
1322 | var i=Object.prototype.hasOwnProperty
|
1323 | var a=0
|
1324 | function o(e){if(!(this instanceof o))return new o(e)
|
1325 | this.id=a++
|
1326 | this.ee=e}o.prototype.on=function(e,t,n){t.__ultron=this.id
|
1327 | this.ee.on(e,t,n)
|
1328 | return this}
|
1329 | o.prototype.once=function(e,t,n){t.__ultron=this.id
|
1330 | this.ee.once(e,t,n)
|
1331 | return this}
|
1332 | o.prototype.remove=function(){var e,t=arguments,n=this.ee
|
1333 | if(1===t.length&&"string"==typeof t[0])t=t[0].split(/[, ]+/)
|
1334 | else if(!t.length)if(n.eventNames)t=n.eventNames()
|
1335 | else if(n._events){t=[]
|
1336 | for(e in n._events)i.call(n._events,e)&&t.push(e)
|
1337 | Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(n._events)))}for(var a=0;a<t.length;a++){var o=n.listeners(t[a])
|
1338 | for(var s=0;s<o.length;s++){if((e=o[s]).listener){if(e.listener.__ultron!==this.id)continue}else if(e.__ultron!==this.id)continue
|
1339 | n.removeListener(t[a],e)}}return this}
|
1340 | o.prototype.destroy=function(){if(!this.ee)return!1
|
1341 | this.remove()
|
1342 | this.ee=null
|
1343 | return!0}
|
1344 | e.exports=o},function(e,t,n){"use strict"
|
1345 | const i=n(7)
|
1346 | const a=n(5)
|
1347 | const o=n(42)
|
1348 | const s=n(14)
|
1349 | const r=n(8)
|
1350 | const c=n(3)
|
1351 | const p=n(18)
|
1352 | const l=n(84)
|
1353 | const u=n(41)
|
1354 | const d=n(17)
|
1355 | const f=n(40)
|
1356 | const h=n(38)
|
1357 | const m=[8,13]
|
1358 | const v=3e4
|
1359 | class g extends i{constructor(e,t,n){super()
|
1360 | if(t){if("string"==typeof t)t=[t]
|
1361 | else if(!Array.isArray(t)){n=t
|
1362 | t=[]}}else t=[]
|
1363 | this.readyState=g.CONNECTING
|
1364 | this.bytesReceived=0
|
1365 | this.extensions={}
|
1366 | this.protocol=""
|
1367 | this._binaryType=d.BINARY_TYPES[0]
|
1368 | this._finalize=this.finalize.bind(this)
|
1369 | this._closeFrameReceived=!1
|
1370 | this._closeFrameSent=!1
|
1371 | this._closeMessage=""
|
1372 | this._closeTimer=null
|
1373 | this._finalized=!1
|
1374 | this._closeCode=1006
|
1375 | this._receiver=null
|
1376 | this._sender=null
|
1377 | this._socket=null
|
1378 | this._ultron=null
|
1379 | Array.isArray(e)?function(e,t,n){this.protocolVersion=n.protocolVersion
|
1380 | this._maxPayload=n.maxPayload
|
1381 | this.extensions=n.extensions
|
1382 | this.protocol=n.protocol
|
1383 | this._isServer=!0
|
1384 | this.setSocket(e,t)}.call(this,e[0],e[1],n):function(e,t,n){n=Object.assign({protocolVersion:m[1],protocol:t.join(","),perMessageDeflate:!0,handshakeTimeout:null,localAddress:null,headers:null,family:null,origin:null,agent:null,host:null,checkServerIdentity:null,rejectUnauthorized:null,passphrase:null,ciphers:null,ecdhCurve:null,cert:null,key:null,pfx:null,ca:null},n)
|
1385 | if(-1===m.indexOf(n.protocolVersion))throw new Error(`unsupported protocol version: ${n.protocolVersion} `+`(supported versions: ${m.join(", ")})`)
|
1386 | this.protocolVersion=n.protocolVersion
|
1387 | this._isServer=!1
|
1388 | this.url=e
|
1389 | const i=c.parse(e)
|
1390 | const o="ws+unix:"===i.protocol
|
1391 | if(!(i.host||o&&i.path))throw new Error("invalid url")
|
1392 | const l="wss:"===i.protocol||"https:"===i.protocol
|
1393 | const f=a.randomBytes(16).toString("base64")
|
1394 | const h=l?s:r
|
1395 | var v
|
1396 | const y={port:i.port||(l?443:80),host:i.hostname,path:"/",headers:{"Sec-WebSocket-Version":n.protocolVersion,"Sec-WebSocket-Key":f,Connection:"Upgrade",Upgrade:"websocket"}}
|
1397 | n.headers&&Object.assign(y.headers,n.headers)
|
1398 | if(n.perMessageDeflate){v=new p(!0!==n.perMessageDeflate?n.perMessageDeflate:{},!1)
|
1399 | y.headers["Sec-WebSocket-Extensions"]=u.format({[p.extensionName]:v.offer()})}n.protocol&&(y.headers["Sec-WebSocket-Protocol"]=n.protocol)
|
1400 | n.origin&&(n.protocolVersion<13?y.headers["Sec-WebSocket-Origin"]=n.origin:y.headers.Origin=n.origin)
|
1401 | n.host&&(y.headers.Host=n.host)
|
1402 | i.auth&&(y.auth=i.auth)
|
1403 | n.localAddress&&(y.localAddress=n.localAddress)
|
1404 | n.family&&(y.family=n.family)
|
1405 | if(o){const e=i.path.split(":")
|
1406 | y.socketPath=e[0]
|
1407 | y.path=e[1]}else i.path&&("/"!==i.path.charAt(0)?y.path=`/${i.path}`:y.path=i.path)
|
1408 | var x=n.agent
|
1409 | if(null!=n.rejectUnauthorized||n.checkServerIdentity||n.passphrase||n.ciphers||n.ecdhCurve||n.cert||n.key||n.pfx||n.ca){n.passphrase&&(y.passphrase=n.passphrase)
|
1410 | n.ciphers&&(y.ciphers=n.ciphers)
|
1411 | n.ecdhCurve&&(y.ecdhCurve=n.ecdhCurve)
|
1412 | n.cert&&(y.cert=n.cert)
|
1413 | n.key&&(y.key=n.key)
|
1414 | n.pfx&&(y.pfx=n.pfx)
|
1415 | n.ca&&(y.ca=n.ca)
|
1416 | n.checkServerIdentity&&(y.checkServerIdentity=n.checkServerIdentity)
|
1417 | null!=n.rejectUnauthorized&&(y.rejectUnauthorized=n.rejectUnauthorized)
|
1418 | x||(x=new h.Agent(y))}x&&(y.agent=x)
|
1419 | this._req=h.get(y)
|
1420 | n.handshakeTimeout&&this._req.setTimeout(n.handshakeTimeout,()=>{this._req.abort()
|
1421 | this.finalize(new Error("opening handshake has timed out"))})
|
1422 | this._req.on("error",e=>{if(!this._req.aborted){this._req=null
|
1423 | this.finalize(e)}})
|
1424 | this._req.on("response",e=>{if(!this.emit("unexpected-response",this._req,e)){this._req.abort()
|
1425 | this.finalize(new Error(`unexpected server response (${e.statusCode})`))}})
|
1426 | this._req.on("upgrade",(e,t,i)=>{this.emit("headers",e.headers,e)
|
1427 | if(this.readyState!==g.CONNECTING)return
|
1428 | this._req=null
|
1429 | const o=a.createHash("sha1").update(f+d.GUID,"binary").digest("base64")
|
1430 | if(e.headers["sec-websocket-accept"]!==o){t.destroy()
|
1431 | return this.finalize(new Error("invalid server key"))}const s=e.headers["sec-websocket-protocol"]
|
1432 | const r=(n.protocol||"").split(/, */)
|
1433 | var c
|
1434 | !n.protocol&&s?c="server sent a subprotocol even though none requested":n.protocol&&!s?c="server sent no subprotocol even though requested":s&&-1===r.indexOf(s)&&(c="server responded with an invalid protocol")
|
1435 | if(c){t.destroy()
|
1436 | return this.finalize(new Error(c))}s&&(this.protocol=s)
|
1437 | if(v)try{const n=u.parse(e.headers["sec-websocket-extensions"])
|
1438 | if(n[p.extensionName]){v.accept(n[p.extensionName])
|
1439 | this.extensions[p.extensionName]=v}}catch(e){t.destroy()
|
1440 | this.finalize(new Error("invalid Sec-WebSocket-Extensions header"))
|
1441 | return}this.setSocket(t,i)})}.call(this,e,t,n)}get CONNECTING(){return g.CONNECTING}get CLOSING(){return g.CLOSING}get CLOSED(){return g.CLOSED}get OPEN(){return g.OPEN}get bufferedAmount(){var e=0
|
1442 | this._socket&&(e=this._socket.bufferSize+this._sender._bufferedBytes)
|
1443 | return e}get binaryType(){return this._binaryType}set binaryType(e){if(!(d.BINARY_TYPES.indexOf(e)<0)){this._binaryType=e
|
1444 | this._receiver&&(this._receiver._binaryType=e)}}setSocket(e,t){e.setTimeout(0)
|
1445 | e.setNoDelay()
|
1446 | this._receiver=new f(this.extensions,this._maxPayload,this.binaryType)
|
1447 | this._sender=new h(e,this.extensions)
|
1448 | this._ultron=new o(e)
|
1449 | this._socket=e
|
1450 | this._ultron.on("close",this._finalize)
|
1451 | this._ultron.on("error",this._finalize)
|
1452 | this._ultron.on("end",this._finalize)
|
1453 | t.length>0&&e.unshift(t)
|
1454 | this._ultron.on("data",e=>{this.bytesReceived+=e.length
|
1455 | this._receiver.add(e)})
|
1456 | this._receiver.onmessage=(e=>this.emit("message",e))
|
1457 | this._receiver.onping=(e=>{this.pong(e,!this._isServer,!0)
|
1458 | this.emit("ping",e)})
|
1459 | this._receiver.onpong=(e=>this.emit("pong",e))
|
1460 | this._receiver.onclose=((e,t)=>{this._closeFrameReceived=!0
|
1461 | this._closeMessage=t
|
1462 | this._closeCode=e
|
1463 | this._finalized||this.close(e,t)})
|
1464 | this._receiver.onerror=((e,t)=>{this._closeMessage=""
|
1465 | this._closeCode=t
|
1466 | this.readyState=g.CLOSING
|
1467 | this.emit("error",e)
|
1468 | this.finalize(!0)})
|
1469 | this.readyState=g.OPEN
|
1470 | this.emit("open")}finalize(e){if(!this._finalized){this.readyState=g.CLOSING
|
1471 | this._finalized=!0
|
1472 | "object"==typeof e&&this.emit("error",e)
|
1473 | if(!this._socket)return this.emitClose()
|
1474 | clearTimeout(this._closeTimer)
|
1475 | this._closeTimer=null
|
1476 | this._ultron.destroy()
|
1477 | this._ultron=null
|
1478 | this._socket.on("error",d.NOOP)
|
1479 | e?this._socket.destroy():this._socket.end()
|
1480 | this._socket=null
|
1481 | this._sender=null
|
1482 | this._receiver.cleanup(()=>this.emitClose())
|
1483 | this._receiver=null}}emitClose(){this.readyState=g.CLOSED
|
1484 | this.emit("close",this._closeCode,this._closeMessage)
|
1485 | this.extensions[p.extensionName]&&this.extensions[p.extensionName].cleanup()
|
1486 | this.extensions=null
|
1487 | this.removeAllListeners()}pause(){if(this.readyState!==g.OPEN)throw new Error("not opened")
|
1488 | this._socket.pause()}resume(){if(this.readyState!==g.OPEN)throw new Error("not opened")
|
1489 | this._socket.resume()}close(e,t){if(this.readyState!==g.CLOSED)if(this.readyState!==g.CONNECTING)if(this.readyState!==g.CLOSING){this.readyState=g.CLOSING
|
1490 | this._sender.close(e,t,!this._isServer,e=>{if(!e){this._closeFrameSent=!0
|
1491 | if(!this._finalized){this._closeFrameReceived&&this._socket.end()
|
1492 | this._closeTimer=setTimeout(this._finalize,v,!0)}}})}else this._closeFrameSent&&this._closeFrameReceived&&this._socket.end()
|
1493 | else{this._req.abort()
|
1494 | this.finalize(new Error("closed before the connection is established"))}}ping(e,t,n){if(this.readyState!==g.OPEN){if(n)return
|
1495 | throw new Error("not opened")}"number"==typeof e&&(e=e.toString())
|
1496 | void 0===t&&(t=!this._isServer)
|
1497 | this._sender.ping(e||d.EMPTY_BUFFER,t)}pong(e,t,n){if(this.readyState!==g.OPEN){if(n)return
|
1498 | throw new Error("not opened")}"number"==typeof e&&(e=e.toString())
|
1499 | void 0===t&&(t=!this._isServer)
|
1500 | this._sender.pong(e||d.EMPTY_BUFFER,t)}send(e,t,n){if("function"==typeof t){n=t
|
1501 | t={}}if(this.readyState!==g.OPEN){if(!n)throw new Error("not opened")
|
1502 | n(new Error("not opened"))
|
1503 | return}"number"==typeof e&&(e=e.toString())
|
1504 | const i=Object.assign({binary:"string"!=typeof e,mask:!this._isServer,compress:!0,fin:!0},t)
|
1505 | this.extensions[p.extensionName]||(i.compress=!1)
|
1506 | this._sender.send(e||d.EMPTY_BUFFER,i,n)}terminate(){if(this.readyState!==g.CLOSED)if(this.readyState!==g.CONNECTING)this.finalize(!0)
|
1507 | else{this._req.abort()
|
1508 | this.finalize(new Error("closed before the connection is established"))}}}g.CONNECTING=0
|
1509 | g.OPEN=1
|
1510 | g.CLOSING=2
|
1511 | g.CLOSED=3;["open","error","close","message"].forEach(e=>{Object.defineProperty(g.prototype,`on${e}`,{get(){const t=this.listeners(e)
|
1512 | for(var n=0;n<t.length;n++)if(t[n]._listener)return t[n]._listener},set(t){const n=this.listeners(e)
|
1513 | for(var i=0;i<n.length;i++)n[i]._listener&&this.removeListener(e,n[i])
|
1514 | this.addEventListener(e,t)}})})
|
1515 | g.prototype.addEventListener=l.addEventListener
|
1516 | g.prototype.removeEventListener=l.removeEventListener
|
1517 | e.exports=g},function(e,t,n){var i=n(7).EventEmitter
|
1518 | var a=n(1)
|
1519 | var o=n(6)("engine:socket")
|
1520 | e.exports=s
|
1521 | function s(e,t,n,i){this.id=e
|
1522 | this.server=t
|
1523 | this.upgrading=!1
|
1524 | this.upgraded=!1
|
1525 | this.readyState="opening"
|
1526 | this.writeBuffer=[]
|
1527 | this.packetsFn=[]
|
1528 | this.sentCallbackFn=[]
|
1529 | this.cleanupFn=[]
|
1530 | this.request=i
|
1531 | i.websocket&&i.websocket._socket?this.remoteAddress=i.websocket._socket.remoteAddress:this.remoteAddress=i.connection.remoteAddress
|
1532 | this.checkIntervalTimer=null
|
1533 | this.upgradeTimeoutTimer=null
|
1534 | this.pingTimeoutTimer=null
|
1535 | this.setTransport(n)
|
1536 | this.onOpen()}a.inherits(s,i)
|
1537 | s.prototype.onOpen=function(){this.readyState="open"
|
1538 | this.transport.sid=this.id
|
1539 | this.sendPacket("open",JSON.stringify({sid:this.id,upgrades:this.getAvailableUpgrades(),pingInterval:this.server.pingInterval,pingTimeout:this.server.pingTimeout}))
|
1540 | this.server.initialPacket&&this.sendPacket("message",this.server.initialPacket)
|
1541 | this.emit("open")
|
1542 | this.setPingTimeout()}
|
1543 | s.prototype.onPacket=function(e){if("open"===this.readyState){o("packet")
|
1544 | this.emit("packet",e)
|
1545 | this.setPingTimeout()
|
1546 | switch(e.type){case"ping":o("got ping")
|
1547 | this.sendPacket("pong")
|
1548 | this.emit("heartbeat")
|
1549 | break
|
1550 | case"error":this.onClose("parse error")
|
1551 | break
|
1552 | case"message":this.emit("data",e.data)
|
1553 | this.emit("message",e.data)}}else o("packet received with closed socket")}
|
1554 | s.prototype.onError=function(e){o("transport error")
|
1555 | this.onClose("transport error",e)}
|
1556 | s.prototype.setPingTimeout=function(){var e=this
|
1557 | clearTimeout(e.pingTimeoutTimer)
|
1558 | e.pingTimeoutTimer=setTimeout(function(){e.onClose("ping timeout")},e.server.pingInterval+e.server.pingTimeout)}
|
1559 | s.prototype.setTransport=function(e){var t=this.onError.bind(this)
|
1560 | var n=this.onPacket.bind(this)
|
1561 | var i=this.flush.bind(this)
|
1562 | var a=this.onClose.bind(this,"transport close")
|
1563 | this.transport=e
|
1564 | this.transport.once("error",t)
|
1565 | this.transport.on("packet",n)
|
1566 | this.transport.on("drain",i)
|
1567 | this.transport.once("close",a)
|
1568 | this.setupSendCallback()
|
1569 | this.cleanupFn.push(function(){e.removeListener("error",t)
|
1570 | e.removeListener("packet",n)
|
1571 | e.removeListener("drain",i)
|
1572 | e.removeListener("close",a)})}
|
1573 | s.prototype.maybeUpgrade=function(e){o('might upgrade socket transport from "%s" to "%s"',this.transport.name,e.name)
|
1574 | this.upgrading=!0
|
1575 | var t=this
|
1576 | t.upgradeTimeoutTimer=setTimeout(function(){o("client did not complete upgrade - closing transport")
|
1577 | a()
|
1578 | "open"===e.readyState&&e.close()},this.server.upgradeTimeout)
|
1579 | function n(n){if("ping"===n.type&&"probe"===n.data){e.send([{type:"pong",data:"probe"}])
|
1580 | t.emit("upgrading",e)
|
1581 | clearInterval(t.checkIntervalTimer)
|
1582 | t.checkIntervalTimer=setInterval(i,100)}else if("upgrade"===n.type&&"closed"!==t.readyState){o("got upgrade packet - upgrading")
|
1583 | a()
|
1584 | t.transport.discard()
|
1585 | t.upgraded=!0
|
1586 | t.clearTransport()
|
1587 | t.setTransport(e)
|
1588 | t.emit("upgrade",e)
|
1589 | t.setPingTimeout()
|
1590 | t.flush()
|
1591 | "closing"===t.readyState&&e.close(function(){t.onClose("forced close")})}else{a()
|
1592 | e.close()}}function i(){if("polling"===t.transport.name&&t.transport.writable){o("writing a noop packet to polling for fast upgrade")
|
1593 | t.transport.send([{type:"noop"}])}}function a(){t.upgrading=!1
|
1594 | clearInterval(t.checkIntervalTimer)
|
1595 | t.checkIntervalTimer=null
|
1596 | clearTimeout(t.upgradeTimeoutTimer)
|
1597 | t.upgradeTimeoutTimer=null
|
1598 | e.removeListener("packet",n)
|
1599 | e.removeListener("close",r)
|
1600 | e.removeListener("error",s)
|
1601 | t.removeListener("close",c)}function s(t){o("client did not complete upgrade - %s",t)
|
1602 | a()
|
1603 | e.close()
|
1604 | e=null}function r(){s("transport closed")}function c(){s("socket closed")}e.on("packet",n)
|
1605 | e.once("close",r)
|
1606 | e.once("error",s)
|
1607 | t.once("close",c)}
|
1608 | s.prototype.clearTransport=function(){var e=this.cleanupFn.length
|
1609 | for(var t=0;t<e;t++)this.cleanupFn.shift()()
|
1610 | this.transport.on("error",function(){o("error triggered by discarded transport")})
|
1611 | this.transport.close()
|
1612 | clearTimeout(this.pingTimeoutTimer)}
|
1613 | s.prototype.onClose=function(e,t){if("closed"!==this.readyState){this.readyState="closed"
|
1614 | clearTimeout(this.pingTimeoutTimer)
|
1615 | clearInterval(this.checkIntervalTimer)
|
1616 | this.checkIntervalTimer=null
|
1617 | clearTimeout(this.upgradeTimeoutTimer)
|
1618 | var n=this
|
1619 | process.nextTick(function(){n.writeBuffer=[]})
|
1620 | this.packetsFn=[]
|
1621 | this.sentCallbackFn=[]
|
1622 | this.clearTransport()
|
1623 | this.emit("close",e,t)}}
|
1624 | s.prototype.setupSendCallback=function(){var e=this
|
1625 | this.transport.on("drain",t)
|
1626 | this.cleanupFn.push(function(){e.transport.removeListener("drain",t)})
|
1627 | function t(){if(e.sentCallbackFn.length>0){var t=e.sentCallbackFn.splice(0,1)[0]
|
1628 | if("function"==typeof t){o("executing send callback")
|
1629 | t(e.transport)}else if(Array.isArray(t)){o("executing batch send callback")
|
1630 | for(var n=t.length,i=0;i<n;i++)"function"==typeof t[i]&&t[i](e.transport)}}}}
|
1631 | s.prototype.send=s.prototype.write=function(e,t,n){this.sendPacket("message",e,t,n)
|
1632 | return this}
|
1633 | s.prototype.sendPacket=function(e,t,n,i){if("function"==typeof n){i=n
|
1634 | n=null}(n=n||{}).compress=!1!==n.compress
|
1635 | if("closing"!==this.readyState&&"closed"!==this.readyState){o('sending packet "%s" (%s)',e,t)
|
1636 | var a={type:e,options:n}
|
1637 | t&&(a.data=t)
|
1638 | this.emit("packetCreate",a)
|
1639 | this.writeBuffer.push(a)
|
1640 | i&&this.packetsFn.push(i)
|
1641 | this.flush()}}
|
1642 | s.prototype.flush=function(){if("closed"!==this.readyState&&this.transport.writable&&this.writeBuffer.length){o("flushing buffer to transport")
|
1643 | this.emit("flush",this.writeBuffer)
|
1644 | this.server.emit("flush",this,this.writeBuffer)
|
1645 | var e=this.writeBuffer
|
1646 | this.writeBuffer=[]
|
1647 | this.transport.supportsFraming?this.sentCallbackFn.push.apply(this.sentCallbackFn,this.packetsFn):this.sentCallbackFn.push(this.packetsFn)
|
1648 | this.packetsFn=[]
|
1649 | this.transport.send(e)
|
1650 | this.emit("drain")
|
1651 | this.server.emit("drain",this)}}
|
1652 | s.prototype.getAvailableUpgrades=function(){var e=[]
|
1653 | var t=this.server.upgrades(this.transport.name)
|
1654 | for(var n=0,i=t.length;n<i;++n){var a=t[n];-1!==this.server.transports.indexOf(a)&&e.push(a)}return e}
|
1655 | s.prototype.close=function(e){if("open"===this.readyState){this.readyState="closing"
|
1656 | this.writeBuffer.length?this.once("drain",this.closeTransport.bind(this,e)):this.closeTransport(e)}}
|
1657 | s.prototype.closeTransport=function(e){e&&this.transport.discard()
|
1658 | this.transport.close(this.onClose.bind(this,"forced close"))}},function(e,t){e.exports=require("tty")},function(e,t){var n=1e3
|
1659 | var i=60*n
|
1660 | var a=60*i
|
1661 | var o=24*a
|
1662 | var s=365.25*o
|
1663 | e.exports=function(e,t){t=t||{}
|
1664 | var c=typeof e
|
1665 | if("string"===c&&e.length>0)return function(e){if((e=String(e)).length>100)return
|
1666 | var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e)
|
1667 | if(!t)return
|
1668 | var r=parseFloat(t[1])
|
1669 | switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*s
|
1670 | case"days":case"day":case"d":return r*o
|
1671 | case"hours":case"hour":case"hrs":case"hr":case"h":return r*a
|
1672 | case"minutes":case"minute":case"mins":case"min":case"m":return r*i
|
1673 | case"seconds":case"second":case"secs":case"sec":case"s":return r*n
|
1674 | case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r
|
1675 | default:return}}(e)
|
1676 | if("number"===c&&!1===isNaN(e))return t.long?function(e){return r(e,o,"day")||r(e,a,"hour")||r(e,i,"minute")||r(e,n,"second")||e+" ms"}(e):function(e){if(e>=o)return Math.round(e/o)+"d"
|
1677 | if(e>=a)return Math.round(e/a)+"h"
|
1678 | if(e>=i)return Math.round(e/i)+"m"
|
1679 | if(e>=n)return Math.round(e/n)+"s"
|
1680 | return e+"ms"}(e)
|
1681 | throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}
|
1682 | function r(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}},function(e,t,n){(t=e.exports=i.debug=i.default=i).coerce=function(e){return e instanceof Error?e.stack||e.message:e}
|
1683 | t.disable=function(){t.enable("")}
|
1684 | t.enable=function(e){t.save(e)
|
1685 | t.names=[]
|
1686 | t.skips=[]
|
1687 | var n
|
1688 | var i=("string"==typeof e?e:"").split(/[\s,]+/)
|
1689 | var a=i.length
|
1690 | for(n=0;n<a;n++)i[n]&&("-"===(e=i[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))
|
1691 | for(n=0;n<t.instances.length;n++){var o=t.instances[n]
|
1692 | o.enabled=t.enabled(o.namespace)}}
|
1693 | t.enabled=function(e){if("*"===e[e.length-1])return!0
|
1694 | var n,i
|
1695 | for(n=0,i=t.skips.length;n<i;n++)if(t.skips[n].test(e))return!1
|
1696 | for(n=0,i=t.names.length;n<i;n++)if(t.names[n].test(e))return!0
|
1697 | return!1}
|
1698 | t.humanize=n(46)
|
1699 | t.instances=[]
|
1700 | t.names=[]
|
1701 | t.skips=[]
|
1702 | t.formatters={}
|
1703 | function i(e){var n
|
1704 | function i(){if(i.enabled){var e=i
|
1705 | var a=+new Date
|
1706 | var o=a-(n||a)
|
1707 | e.diff=o
|
1708 | e.prev=n
|
1709 | e.curr=a
|
1710 | n=a
|
1711 | var s=new Array(arguments.length)
|
1712 | for(var r=0;r<s.length;r++)s[r]=arguments[r]
|
1713 | s[0]=t.coerce(s[0])
|
1714 | "string"!=typeof s[0]&&s.unshift("%O")
|
1715 | var c=0
|
1716 | s[0]=s[0].replace(/%([a-zA-Z%])/g,function(n,i){if("%%"===n)return n
|
1717 | c++
|
1718 | var a=t.formatters[i]
|
1719 | if("function"==typeof a){var o=s[c]
|
1720 | n=a.call(e,o)
|
1721 | s.splice(c,1)
|
1722 | c--}return n})
|
1723 | t.formatArgs.call(e,s);(i.log||t.log||console.log.bind(console)).apply(e,s)}}i.namespace=e
|
1724 | i.enabled=t.enabled(e)
|
1725 | i.useColors=t.useColors()
|
1726 | i.color=function(e){var n,i=0
|
1727 | for(n in e){i=(i<<5)-i+e.charCodeAt(n)
|
1728 | i|=0}return t.colors[Math.abs(i)%t.colors.length]}(e)
|
1729 | i.destroy=a
|
1730 | "function"==typeof t.init&&t.init(i)
|
1731 | t.instances.push(i)
|
1732 | return i}function a(){var e=t.instances.indexOf(this)
|
1733 | if(-1!==e){t.instances.splice(e,1)
|
1734 | return!0}return!1}},function(e,t,n){var i=n(25)
|
1735 | var a=n(19)
|
1736 | var o=n(9)
|
1737 | var s=n(101)
|
1738 | var r=n(1)
|
1739 | var c=n(6)("engine:polling")
|
1740 | var p={gzip:o.createGzip,deflate:o.createDeflate}
|
1741 | e.exports=l
|
1742 | function l(e){i.call(this,e)
|
1743 | this.closeTimeout=3e4
|
1744 | this.maxHttpBufferSize=null
|
1745 | this.httpCompression=null}r.inherits(l,i)
|
1746 | l.prototype.name="polling"
|
1747 | l.prototype.onRequest=function(e){var t=e.res
|
1748 | if("GET"===e.method)this.onPollRequest(e,t)
|
1749 | else if("POST"===e.method)this.onDataRequest(e,t)
|
1750 | else{t.writeHead(500)
|
1751 | t.end()}}
|
1752 | l.prototype.onPollRequest=function(e,t){if(this.req){c("request overlap")
|
1753 | this.onError("overlap from client")
|
1754 | t.writeHead(500)
|
1755 | t.end()}else{c("setting request")
|
1756 | this.req=e
|
1757 | this.res=t
|
1758 | var n=this
|
1759 | e.cleanup=function(){e.removeListener("close",i)
|
1760 | n.req=n.res=null}
|
1761 | e.on("close",i)
|
1762 | this.writable=!0
|
1763 | this.emit("drain")
|
1764 | if(this.writable&&this.shouldClose){c("triggering empty send to append close packet")
|
1765 | this.send([{type:"noop"}])}}function i(){n.onError("poll connection closed prematurely")}}
|
1766 | l.prototype.onDataRequest=function(e,t){if(this.dataReq){this.onError("data request overlap from client")
|
1767 | t.writeHead(500)
|
1768 | t.end()}else{var n="application/octet-stream"===e.headers["content-type"]
|
1769 | this.dataReq=e
|
1770 | this.dataRes=t
|
1771 | var i=n?Buffer.concat([]):""
|
1772 | var a=this
|
1773 | e.on("close",s)
|
1774 | n||e.setEncoding("utf8")
|
1775 | e.on("data",r)
|
1776 | e.on("end",c)}function o(){e.removeListener("data",r)
|
1777 | e.removeListener("end",c)
|
1778 | e.removeListener("close",s)
|
1779 | a.dataReq=a.dataRes=i=null}function s(){o()
|
1780 | a.onError("data request connection closed prematurely")}function r(t){var o
|
1781 | if(n)o=(i=Buffer.concat([i,t])).length
|
1782 | else{i+=t
|
1783 | o=Buffer.byteLength(i)}if(o>a.maxHttpBufferSize){i=n?Buffer.concat([]):""
|
1784 | e.connection.destroy()}}function c(){a.onData(i)
|
1785 | t.writeHead(200,a.headers(e,{"Content-Type":"text/html","Content-Length":2}))
|
1786 | t.end("ok")
|
1787 | o()}}
|
1788 | l.prototype.onData=function(e){c('received "%s"',e)
|
1789 | var t=this
|
1790 | a.decodePayload(e,function(e){if("close"===e.type){c("got xhr close packet")
|
1791 | t.onClose()
|
1792 | return!1}t.onPacket(e)})}
|
1793 | l.prototype.onClose=function(){this.writable&&this.send([{type:"noop"}])
|
1794 | i.prototype.onClose.call(this)}
|
1795 | l.prototype.send=function(e){this.writable=!1
|
1796 | if(this.shouldClose){c("appending close packet to payload")
|
1797 | e.push({type:"close"})
|
1798 | this.shouldClose()
|
1799 | this.shouldClose=null}var t=this
|
1800 | a.encodePayload(e,this.supportsBinary,function(n){var i=e.some(function(e){return e.options&&e.options.compress})
|
1801 | t.write(n,{compress:i})})}
|
1802 | l.prototype.write=function(e,t){c('writing "%s"',e)
|
1803 | var n=this
|
1804 | this.doWrite(e,t,function(){n.req.cleanup()})}
|
1805 | l.prototype.doWrite=function(e,t,n){var i=this
|
1806 | var a="string"==typeof e
|
1807 | var o={"Content-Type":a?"text/plain; charset=UTF-8":"application/octet-stream"}
|
1808 | if(this.httpCompression&&t.compress){if((a?Buffer.byteLength(e):e.length)<this.httpCompression.threshold)c(e)
|
1809 | else{var r=s(this.req).encodings(["gzip","deflate"])
|
1810 | r?this.compress(e,r,function(e,t){if(e){i.res.writeHead(500)
|
1811 | i.res.end()
|
1812 | n(e)}else{o["Content-Encoding"]=r
|
1813 | c(t)}}):c(e)}}else c(e)
|
1814 | function c(e){o["Content-Length"]="string"==typeof e?Buffer.byteLength(e):e.length
|
1815 | i.res.writeHead(200,i.headers(i.req,o))
|
1816 | i.res.end(e)
|
1817 | n()}}
|
1818 | l.prototype.compress=function(e,t,n){c("compressing")
|
1819 | var i=[]
|
1820 | var a=0
|
1821 | p[t](this.httpCompression).on("error",n).on("data",function(e){i.push(e)
|
1822 | a+=e.length}).on("end",function(){n(null,Buffer.concat(i,a))}).end(e)}
|
1823 | l.prototype.doClose=function(e){c("closing")
|
1824 | var t=this
|
1825 | var n
|
1826 | if(this.dataReq){c("aborting ongoing data request")
|
1827 | this.dataReq.destroy()}if(this.writable){c("transport writable - closing right away")
|
1828 | this.send([{type:"close"}])
|
1829 | i()}else if(this.discarded){c("transport discarded - closing right away")
|
1830 | i()}else{c("transport not writable - buffering orderly close")
|
1831 | this.shouldClose=i
|
1832 | n=setTimeout(i,this.closeTimeout)}function i(){clearTimeout(n)
|
1833 | e()
|
1834 | t.onClose()}}
|
1835 | l.prototype.headers=function(e,t){t=t||{}
|
1836 | var n=e.headers["user-agent"]
|
1837 | n&&(~n.indexOf(";MSIE")||~n.indexOf("Trident/"))&&(t["X-XSS-Protection"]="0")
|
1838 | this.emit("headers",t)
|
1839 | return t}},function(e,t,n){var i=n(111)
|
1840 | var a=n(92)
|
1841 | e.exports=t={polling:function(e){return"string"==typeof e._query.j?new a(e):new i(e)},websocket:n(91)}
|
1842 | t.polling.upgradesTo=["websocket"]},function(e,t){e.exports=require("querystring")},function(e,t){e.exports=require("stream")},function(e,t,n){var i=n(73)
|
1843 | var a=n(13).createClient
|
1844 | var o=n(61)
|
1845 | var s=n(34)
|
1846 | var r=n(58)("socket.io-redis")
|
1847 | e.exports=function(e,t){t=t||{}
|
1848 | if("object"==typeof e){t=e
|
1849 | e=null}var n=t.pubClient
|
1850 | var p=t.subClient
|
1851 | var l=t.key||"socket.io"
|
1852 | var u=t.requestsTimeout||5e3
|
1853 | function d(){return e?a(e,t):a(t)}n||(n=d())
|
1854 | p||(p=d())
|
1855 | var f=i(6)
|
1856 | function h(e){s.call(this,e)
|
1857 | this.uid=f
|
1858 | this.prefix=l
|
1859 | this.requestsTimeout=u
|
1860 | this.channel=l+"#"+e.name+"#"
|
1861 | this.requestChannel=l+"-request#"+this.nsp.name+"#"
|
1862 | this.responseChannel=l+"-response#"+this.nsp.name+"#"
|
1863 | this.requests={}
|
1864 | this.customHook=function(e,t){t(null)}
|
1865 | String.prototype.startsWith?this.channelMatches=function(e,t){return e.startsWith(t)}:this.channelMatches=function(e,t){return e.substr(0,t.length)===t}
|
1866 | this.pubClient=n
|
1867 | this.subClient=p
|
1868 | var t=this
|
1869 | p.psubscribe(this.channel+"*",function(e){e&&t.emit("error",e)})
|
1870 | p.on("pmessageBuffer",this.onmessage.bind(this))
|
1871 | p.subscribe([this.requestChannel,this.responseChannel],function(e){e&&t.emit("error",e)})
|
1872 | p.on("messageBuffer",this.onrequest.bind(this))
|
1873 | function i(e){t.emit("error",e)}n.on("error",i)
|
1874 | p.on("error",i)}h.prototype.__proto__=s.prototype
|
1875 | h.prototype.onmessage=function(e,t,n){t=t.toString()
|
1876 | if(!this.channelMatches(t,this.channel))return r("ignore different channel")
|
1877 | var i=t.slice(this.channel.length,-1)
|
1878 | if(""!==i&&!this.rooms.hasOwnProperty(i))return r("ignore unknown room %s",i)
|
1879 | var a=o.decode(n)
|
1880 | var s
|
1881 | if(f===a.shift())return r("ignore same uid");(s=a[0])&&void 0===s.nsp&&(s.nsp="/")
|
1882 | if(!s||s.nsp!=this.nsp.name)return r("ignore different namespace")
|
1883 | a.push(!0)
|
1884 | this.broadcast.apply(this,a)}
|
1885 | h.prototype.onrequest=function(e,t){e=e.toString()
|
1886 | if(this.channelMatches(e,this.responseChannel))return this.onresponse(e,t)
|
1887 | if(!this.channelMatches(e,this.requestChannel))return r("ignore different channel")
|
1888 | var i=this
|
1889 | var a
|
1890 | try{a=JSON.parse(t)}catch(e){i.emit("error",e)
|
1891 | return}r("received request %j",a)
|
1892 | switch(a.type){case c.clients:s.prototype.clients.call(i,a.rooms,function(e,t){if(e)i.emit("error",e)
|
1893 | else{var o=JSON.stringify({requestid:a.requestid,clients:t})
|
1894 | n.publish(i.responseChannel,o)}})
|
1895 | break
|
1896 | case c.clientRooms:s.prototype.clientRooms.call(i,a.sid,function(e,t){if(e)i.emit("error",e)
|
1897 | else if(t){var o=JSON.stringify({requestid:a.requestid,rooms:t})
|
1898 | n.publish(i.responseChannel,o)}})
|
1899 | break
|
1900 | case c.allRooms:var o=JSON.stringify({requestid:a.requestid,rooms:Object.keys(this.rooms)})
|
1901 | n.publish(i.responseChannel,o)
|
1902 | break
|
1903 | case c.remoteJoin:var p=this.nsp.connected[a.sid]
|
1904 | if(!p)return
|
1905 | p.join(a.room,function(){var e=JSON.stringify({requestid:a.requestid})
|
1906 | n.publish(i.responseChannel,e)})
|
1907 | break
|
1908 | case c.remoteLeave:var p=this.nsp.connected[a.sid]
|
1909 | if(!p)return
|
1910 | p.leave(a.room,function(){var e=JSON.stringify({requestid:a.requestid})
|
1911 | n.publish(i.responseChannel,e)})
|
1912 | break
|
1913 | case c.remoteDisconnect:var p=this.nsp.connected[a.sid]
|
1914 | if(!p)return
|
1915 | p.disconnect(a.close)
|
1916 | var o=JSON.stringify({requestid:a.requestid})
|
1917 | n.publish(i.responseChannel,o)
|
1918 | break
|
1919 | case c.customRequest:this.customHook(a.data,function(e){var t=JSON.stringify({requestid:a.requestid,data:e})
|
1920 | n.publish(i.responseChannel,t)})
|
1921 | break
|
1922 | default:r("ignoring unknown request type: %s",a.type)}}
|
1923 | h.prototype.onresponse=function(e,t){var n
|
1924 | try{n=JSON.parse(t)}catch(e){this.emit("error",e)
|
1925 | return}var i=n.requestid
|
1926 | if(i&&this.requests[i]){r("received response %j",n)
|
1927 | var a=this.requests[i]
|
1928 | switch(a.type){case c.clients:a.msgCount++
|
1929 | if(!n.clients||!Array.isArray(n.clients))return
|
1930 | for(var o=0;o<n.clients.length;o++)a.clients[n.clients[o]]=!0
|
1931 | if(a.msgCount===a.numsub){clearTimeout(a.timeout)
|
1932 | a.callback&&process.nextTick(a.callback.bind(null,null,Object.keys(a.clients)))
|
1933 | delete this.requests[i]}break
|
1934 | case c.clientRooms:clearTimeout(a.timeout)
|
1935 | a.callback&&process.nextTick(a.callback.bind(null,null,n.rooms))
|
1936 | delete this.requests[i]
|
1937 | break
|
1938 | case c.allRooms:a.msgCount++
|
1939 | if(!n.rooms||!Array.isArray(n.rooms))return
|
1940 | for(var o=0;o<n.rooms.length;o++)a.rooms[n.rooms[o]]=!0
|
1941 | if(a.msgCount===a.numsub){clearTimeout(a.timeout)
|
1942 | a.callback&&process.nextTick(a.callback.bind(null,null,Object.keys(a.rooms)))
|
1943 | delete this.requests[i]}break
|
1944 | case c.remoteJoin:case c.remoteLeave:case c.remoteDisconnect:clearTimeout(a.timeout)
|
1945 | a.callback&&process.nextTick(a.callback.bind(null,null))
|
1946 | delete this.requests[i]
|
1947 | break
|
1948 | case c.customRequest:a.msgCount++
|
1949 | a.replies.push(n.data)
|
1950 | if(a.msgCount===a.numsub){clearTimeout(a.timeout)
|
1951 | a.callback&&process.nextTick(a.callback.bind(null,null,a.replies))
|
1952 | delete this.requests[i]}break
|
1953 | default:r("ignoring unknown request type: %s",a.type)}}else r("ignoring unknown request")}
|
1954 | h.prototype.broadcast=function(e,t,i){e.nsp=this.nsp.name
|
1955 | if(!(i||t&&t.flags&&t.flags.local)){var a=o.encode([f,e,t])
|
1956 | var c=this.channel
|
1957 | t.rooms&&1===t.rooms.length&&(c+=t.rooms[0]+"#")
|
1958 | r("publishing message to channel %s",c)
|
1959 | n.publish(c,a)}s.prototype.broadcast.call(this,e,t)}
|
1960 | h.prototype.clients=function(e,t){if("function"==typeof e){t=e
|
1961 | e=null}e=e||[]
|
1962 | var a=this
|
1963 | var o=i(6)
|
1964 | n.send_command("pubsub",["numsub",a.requestChannel],function(i,s){if(i){a.emit("error",i)
|
1965 | t&&t(i)}else{s=parseInt(s[1],10)
|
1966 | r('waiting for %d responses to "clients" request',s)
|
1967 | var p=JSON.stringify({requestid:o,type:c.clients,rooms:e})
|
1968 | var l=setTimeout(function(){var e=a.requests[o]
|
1969 | t&&process.nextTick(t.bind(null,new Error("timeout reached while waiting for clients response"),Object.keys(e.clients)))
|
1970 | delete a.requests[o]},a.requestsTimeout)
|
1971 | a.requests[o]={type:c.clients,numsub:s,msgCount:0,clients:{},callback:t,timeout:l}
|
1972 | n.publish(a.requestChannel,p)}})}
|
1973 | h.prototype.clientRooms=function(e,t){var a=this
|
1974 | var o=i(6)
|
1975 | var s=this.sids[e]
|
1976 | if(s)t&&process.nextTick(t.bind(null,null,Object.keys(s)))
|
1977 | else{var r=JSON.stringify({requestid:o,type:c.clientRooms,sid:e})
|
1978 | var p=setTimeout(function(){t&&process.nextTick(t.bind(null,new Error("timeout reached while waiting for rooms response")))
|
1979 | delete a.requests[o]},a.requestsTimeout)
|
1980 | a.requests[o]={type:c.clientRooms,callback:t,timeout:p}
|
1981 | n.publish(a.requestChannel,r)}}
|
1982 | h.prototype.allRooms=function(e){var t=this
|
1983 | var a=i(6)
|
1984 | n.send_command("pubsub",["numsub",t.requestChannel],function(i,o){if(i){t.emit("error",i)
|
1985 | e&&e(i)}else{o=parseInt(o[1],10)
|
1986 | r('waiting for %d responses to "allRooms" request',o)
|
1987 | var s=JSON.stringify({requestid:a,type:c.allRooms})
|
1988 | var p=setTimeout(function(){var n=t.requests[a]
|
1989 | e&&process.nextTick(e.bind(null,new Error("timeout reached while waiting for allRooms response"),Object.keys(n.rooms)))
|
1990 | delete t.requests[a]},t.requestsTimeout)
|
1991 | t.requests[a]={type:c.allRooms,numsub:o,msgCount:0,rooms:{},callback:e,timeout:p}
|
1992 | n.publish(t.requestChannel,s)}})}
|
1993 | h.prototype.remoteJoin=function(e,t,a){var o=this
|
1994 | var s=i(6)
|
1995 | var r=this.nsp.connected[e]
|
1996 | if(r)r.join(t,a)
|
1997 | else{var p=JSON.stringify({requestid:s,type:c.remoteJoin,sid:e,room:t})
|
1998 | var l=setTimeout(function(){a&&process.nextTick(a.bind(null,new Error("timeout reached while waiting for remoteJoin response")))
|
1999 | delete o.requests[s]},o.requestsTimeout)
|
2000 | o.requests[s]={type:c.remoteJoin,callback:a,timeout:l}
|
2001 | n.publish(o.requestChannel,p)}}
|
2002 | h.prototype.remoteLeave=function(e,t,a){var o=this
|
2003 | var s=i(6)
|
2004 | var r=this.nsp.connected[e]
|
2005 | if(r)r.leave(t,a)
|
2006 | else{var p=JSON.stringify({requestid:s,type:c.remoteLeave,sid:e,room:t})
|
2007 | var l=setTimeout(function(){a&&process.nextTick(a.bind(null,new Error("timeout reached while waiting for remoteLeave response")))
|
2008 | delete o.requests[s]},o.requestsTimeout)
|
2009 | o.requests[s]={type:c.remoteLeave,callback:a,timeout:l}
|
2010 | n.publish(o.requestChannel,p)}}
|
2011 | h.prototype.remoteDisconnect=function(e,t,a){var o=this
|
2012 | var s=i(6)
|
2013 | var r=this.nsp.connected[e]
|
2014 | if(r){r.disconnect(t)
|
2015 | a&&process.nextTick(a.bind(null,null))}else{var p=JSON.stringify({requestid:s,type:c.remoteDisconnect,sid:e,close:t})
|
2016 | var l=setTimeout(function(){a&&process.nextTick(a.bind(null,new Error("timeout reached while waiting for remoteDisconnect response")))
|
2017 | delete o.requests[s]},o.requestsTimeout)
|
2018 | o.requests[s]={type:c.remoteDisconnect,callback:a,timeout:l}
|
2019 | n.publish(o.requestChannel,p)}}
|
2020 | h.prototype.customRequest=function(e,t){if("function"==typeof e){t=e
|
2021 | e=null}var a=this
|
2022 | var o=i(6)
|
2023 | n.send_command("pubsub",["numsub",a.requestChannel],function(i,s){if(i){a.emit("error",i)
|
2024 | t&&t(i)}else{s=parseInt(s[1],10)
|
2025 | r('waiting for %d responses to "customRequest" request',s)
|
2026 | var p=JSON.stringify({requestid:o,type:c.customRequest,data:e})
|
2027 | var l=setTimeout(function(){var e=a.requests[o]
|
2028 | t&&process.nextTick(t.bind(null,new Error("timeout reached while waiting for customRequest response"),e.replies))
|
2029 | delete a.requests[o]},a.requestsTimeout)
|
2030 | a.requests[o]={type:c.customRequest,numsub:s,msgCount:0,replies:[],callback:t,timeout:l}
|
2031 | n.publish(a.requestChannel,p)}})}
|
2032 | h.uid=f
|
2033 | h.pubClient=n
|
2034 | h.subClient=p
|
2035 | h.prefix=l
|
2036 | h.requestsTimeout=u
|
2037 | return h}
|
2038 | var c={clients:0,clientRooms:1,allRooms:2,remoteJoin:3,remoteLeave:4,customRequest:5,remoteDisconnect:6}},function(e,t,n){"use strict";(function(t){var i=n(8)
|
2039 | var a=n(0).readFileSync
|
2040 | var o=n(2)
|
2041 | var s=n(0).existsSync
|
2042 | var r=n(114)
|
2043 | var c=n(80).version
|
2044 | var p=n(79)
|
2045 | var l=n(7).EventEmitter
|
2046 | var u=n(35)
|
2047 | var d=n(75)
|
2048 | var f=n(34)
|
2049 | var h=n(16)
|
2050 | var m=n(6)("socket.io:server")
|
2051 | var v=n(3)
|
2052 | e.exports=x
|
2053 | var g=void 0
|
2054 | var y=void 0
|
2055 | function x(e,t){if(!(this instanceof x))return new x(e,t)
|
2056 | if("object"==typeof e&&e instanceof Object&&!e.listen){t=e
|
2057 | e=null}t=t||{}
|
2058 | this.nsps={}
|
2059 | this.parentNsps=new Map
|
2060 | this.path(t.path||"/socket.io")
|
2061 | this.serveClient(!1!==t.serveClient)
|
2062 | this.parser=t.parser||h
|
2063 | this.encoder=new this.parser.Encoder
|
2064 | this.adapter(t.adapter||f)
|
2065 | this.origins(t.origins||"*:*")
|
2066 | this.sockets=this.of("/")
|
2067 | e&&this.attach(e,t)}x.prototype.checkRequest=function(e,t){var n=e.headers.origin||e.headers.referer
|
2068 | "null"!=n&&null!=n||(n="*")
|
2069 | if(n&&"function"==typeof this._origins)return this._origins(n,t)
|
2070 | if(-1!==this._origins.indexOf("*:*"))return t(null,!0)
|
2071 | if(n)try{var i=v.parse(n)
|
2072 | var a="https:"==i.protocol?443:80
|
2073 | i.port=null!=i.port?i.port:a
|
2074 | var o=~this._origins.indexOf(i.protocol+"//"+i.hostname+":"+i.port)||~this._origins.indexOf(i.hostname+":"+i.port)||~this._origins.indexOf(i.hostname+":*")||~this._origins.indexOf("*:"+i.port)
|
2075 | m("origin %s is %svalid",n,o?"":"not ")
|
2076 | return t(null,!!o)}catch(e){}t(null,!1)}
|
2077 | x.prototype.serveClient=function(e){if(!arguments.length)return this._serveClient
|
2078 | this._serveClient=e
|
2079 | var i=function(e){var i=o.resolve(t,"./../../",e)
|
2080 | return s(i)?i:n(74).resolve(e)}
|
2081 | if(e&&!g){g=a(i("socket.io-client/dist/socket.io.js"),"utf-8")
|
2082 | try{y=a(i("socket.io-client/dist/socket.io.js.map"),"utf-8")}catch(e){m("could not load sourcemap file")}}return this}
|
2083 | var b={transports:"transports","heartbeat timeout":"pingTimeout","heartbeat interval":"pingInterval","destroy buffer size":"maxHttpBufferSize"}
|
2084 | x.prototype.set=function(e,t){"authorization"==e&&t?this.use(function(e,n){t(e.request,function(e,t){if(e)return n(new Error(e))
|
2085 | if(!t)return n(new Error("Not authorized"))
|
2086 | n()})}):"origins"==e&&t?this.origins(t):"resource"==e?this.path(t):b[e]&&this.eio[b[e]]?this.eio[b[e]]=t:console.error("Option %s is not valid. Please refer to the README.",e)
|
2087 | return this}
|
2088 | x.prototype.checkNamespace=function(e,t,n){if(0===this.parentNsps.size)return n(!1)
|
2089 | const i=this.parentNsps.keys()
|
2090 | const a=()=>{let o=i.next()
|
2091 | if(o.done)return n(!1)
|
2092 | o.value(e,t,(t,i)=>{t||!i?a():n(this.parentNsps.get(o.value).createChild(e))})}
|
2093 | a()}
|
2094 | x.prototype.path=function(e){if(!arguments.length)return this._path
|
2095 | this._path=e.replace(/\/$/,"")
|
2096 | return this}
|
2097 | x.prototype.adapter=function(e){if(!arguments.length)return this._adapter
|
2098 | this._adapter=e
|
2099 | for(var t in this.nsps)this.nsps.hasOwnProperty(t)&&this.nsps[t].initAdapter()
|
2100 | return this}
|
2101 | x.prototype.origins=function(e){if(!arguments.length)return this._origins
|
2102 | this._origins=e
|
2103 | return this}
|
2104 | x.prototype.listen=x.prototype.attach=function(e,t){if("function"==typeof e){throw new Error("You are trying to attach socket.io to an express request handler function. Please pass a http.Server instance.")}Number(e)==e&&(e=Number(e))
|
2105 | if("number"==typeof e){m("creating http server and binding to %d",e)
|
2106 | var n=e;(e=i.Server(function(e,t){t.writeHead(404)
|
2107 | t.end()})).listen(n)}(t=t||{}).path=t.path||this.path()
|
2108 | t.allowRequest=t.allowRequest||this.checkRequest.bind(this)
|
2109 | if(this.sockets.fns.length>0){this.initEngine(e,t)
|
2110 | return this}var a=this
|
2111 | var o={type:h.CONNECT,nsp:"/"}
|
2112 | this.encoder.encode(o,function(n){t.initialPacket=n
|
2113 | a.initEngine(e,t)})
|
2114 | return this}
|
2115 | x.prototype.initEngine=function(e,t){m("creating engine.io instance with opts %j",t)
|
2116 | this.eio=r.attach(e,t)
|
2117 | this._serveClient&&this.attachServe(e)
|
2118 | this.httpServer=e
|
2119 | this.bind(this.eio)}
|
2120 | x.prototype.attachServe=function(e){m("attaching client serving req handler")
|
2121 | var t=this._path+"/socket.io.js"
|
2122 | var n=this._path+"/socket.io.js.map"
|
2123 | var i=e.listeners("request").slice(0)
|
2124 | var a=this
|
2125 | e.removeAllListeners("request")
|
2126 | e.on("request",function(o,s){if(0===o.url.indexOf(n))a.serveMap(o,s)
|
2127 | else if(0===o.url.indexOf(t))a.serve(o,s)
|
2128 | else for(var r=0;r<i.length;r++)i[r].call(e,o,s)})}
|
2129 | x.prototype.serve=function(e,t){var n='"'+c+'"'
|
2130 | var i=e.headers["if-none-match"]
|
2131 | if(i&&n==i){m("serve client 304")
|
2132 | t.writeHead(304)
|
2133 | t.end()}else{m("serve client source")
|
2134 | t.setHeader("Content-Type","application/javascript")
|
2135 | t.setHeader("ETag",n)
|
2136 | t.writeHead(200)
|
2137 | t.end(g)}}
|
2138 | x.prototype.serveMap=function(e,t){var n='"'+c+'"'
|
2139 | var i=e.headers["if-none-match"]
|
2140 | if(i&&n==i){m("serve client 304")
|
2141 | t.writeHead(304)
|
2142 | t.end()}else{m("serve client sourcemap")
|
2143 | t.setHeader("Content-Type","application/json")
|
2144 | t.setHeader("ETag",n)
|
2145 | t.writeHead(200)
|
2146 | t.end(y)}}
|
2147 | x.prototype.bind=function(e){this.engine=e
|
2148 | this.engine.on("connection",this.onconnection.bind(this))
|
2149 | return this}
|
2150 | x.prototype.onconnection=function(e){m("incoming connection with id %s",e.id)
|
2151 | new p(this,e).connect("/")
|
2152 | return this}
|
2153 | x.prototype.of=function(e,t){if("function"==typeof e||e instanceof RegExp){const n=new d(this)
|
2154 | m("initializing parent namespace %s",n.name)
|
2155 | "function"==typeof e?this.parentNsps.set(e,n):this.parentNsps.set((t,n,i)=>i(null,e.test(t)),n)
|
2156 | t&&n.on("connect",t)
|
2157 | return n}"/"!==String(e)[0]&&(e="/"+e)
|
2158 | var n=this.nsps[e]
|
2159 | if(!n){m("initializing namespace %s",e)
|
2160 | n=new u(this,e)
|
2161 | this.nsps[e]=n}t&&n.on("connect",t)
|
2162 | return n}
|
2163 | x.prototype.close=function(e){for(var t in this.nsps["/"].sockets)this.nsps["/"].sockets.hasOwnProperty(t)&&this.nsps["/"].sockets[t].onclose()
|
2164 | this.engine.close()
|
2165 | this.httpServer?this.httpServer.close(e):e&&e()}
|
2166 | Object.keys(l.prototype).filter(function(e){return"function"==typeof l.prototype[e]}).concat(["to","in","use","send","write","clients","compress","binary"]).forEach(function(e){x.prototype[e]=function(){return this.sockets[e].apply(this.sockets,arguments)}})
|
2167 | u.flags.forEach(function(e){Object.defineProperty(x.prototype,e,{get:function(){this.sockets.flags=this.sockets.flags||{}
|
2168 | this.sockets.flags[e]=!0
|
2169 | return this}})})
|
2170 | x.listen=x}).call(this,"/")},function(e,t){e.exports=require("readline")},function(e,t,n){"use strict"
|
2171 | n.r(t)
|
2172 | var i=n(2)
|
2173 | var a=n(0)
|
2174 | var o=n(1)
|
2175 | n(54)
|
2176 | Object(o.promisify)(a.stat)
|
2177 | const s=Object(o.promisify)(a.lstat)
|
2178 | Object(o.promisify)(a.rename)
|
2179 | Object(o.promisify)(a.unlink)
|
2180 | Object(o.promisify)(a.access)
|
2181 | const r=Object(o.promisify)(a.mkdir)
|
2182 | Object(o.promisify)(a.rmdir)
|
2183 | Object(o.promisify)(a.readdir)
|
2184 | const c=Object(o.promisify)(a.readFile)
|
2185 | const p=Object(o.promisify)(a.writeFile)
|
2186 | a.copyFile?Object(o.promisify)(a.copyFile):(()=>{const e=Object(o.promisify)(a.open)
|
2187 | const t=Object(o.promisify)(a.fstat)})()
|
2188 | i.sep
|
2189 | const l="File",u="Directory",d="SymbolicLink",f="Other",h="Error"
|
2190 | const m=e=>e.isDirectory()?u:e.isFile()?l:e.isSymbolicLink()?d:f
|
2191 | const v=e=>h
|
2192 | const g=e=>s(e).then(m,v)
|
2193 | const y=async(e,t)=>{void 0===t&&(t=await g(e))
|
2194 | if(t===u)return
|
2195 | if(t!==h)throw new Error("[createDirectory] path already taken by non-directory")
|
2196 | const n=Object(i.dirname)(e)
|
2197 | const a=await g(n)
|
2198 | a!==u&&await y(n,a)
|
2199 | t!==u&&await r(e)}
|
2200 | const x=e=>{console.warn(e)
|
2201 | throw e}
|
2202 | const b=(e,t,...n)=>{try{return e[t](...n)}catch(e){}}
|
2203 | const w=(e,...t)=>{let n,i
|
2204 | try{n=e(...t)}catch(e){i=e}return{result:n,error:i}}
|
2205 | const k=async(e,...t)=>{let n,i
|
2206 | try{n=await e(...t)}catch(e){i=e}return{result:n,error:i}}
|
2207 | const _=({queueLengthThreshold:e,...t})=>(({outputStream:e,queueLengthThreshold:t=1024})=>{const n=[]
|
2208 | const i=()=>{n.push("")
|
2209 | const e=n.join("\n")
|
2210 | n.length=0
|
2211 | return e}
|
2212 | const a=()=>{0!==n.length&&e.write(i())}
|
2213 | return{add:e=>{n.push(e)
|
2214 | n.length>t&&a()},save:a,end:()=>{0!==n.length&&e.write(i())
|
2215 | e.end()}}})({outputStream:(({pathOutputFile:e,flag:t="w",mode:n=438,onError:i=x})=>{let o=Object(a.openSync)(e,t,n)
|
2216 | let s=[]
|
2217 | let r=[]
|
2218 | const c=e=>e?i(e):s.length=0
|
2219 | const p=e=>o&&Object(a.write)(o,e,c)
|
2220 | return{write:e=>{if(e){r.push(e)
|
2221 | if(0===s.length){[s,r]=[r,[]]
|
2222 | process.nextTick(p,s.join(""))}}},end:()=>{const e=[...s,...r]
|
2223 | 0!==e.length&&Object(a.writeSync)(o,e.join(""))
|
2224 | Object(a.closeSync)(o)
|
2225 | o=null
|
2226 | r.length=s.length=0}}})(t),queueLengthThreshold:e})
|
2227 | const S=[{event:"exit",listener:e=>O({eventType:"exit",code:e})},{event:"uncaughtException",listener:e=>j({eventType:"uncaughtException",error:e})},{event:"unhandledRejection",listener:(e,t)=>j({eventType:"unhandledRejection",error:e,promise:t})},...["SIGINT","SIGHUP","SIGQUIT","SIGTERM"].map(e=>({event:e,listener:()=>j({eventType:"signal",signalEventType:e})}))]
|
2228 | const E=new Set
|
2229 | const C=new Set
|
2230 | const O=e=>{for(const t of Array.from(E))w(t,e)}
|
2231 | const j=async e=>{A()
|
2232 | for(const t of Array.from(C))await k(t,e)
|
2233 | O(e)
|
2234 | process.exit(e.code||(e.error?-1:0))}
|
2235 | let q=!1
|
2236 | const T=()=>{q=!0
|
2237 | S.forEach(({event:e,listener:t})=>process.on(e,t))}
|
2238 | const A=()=>{q=!1
|
2239 | S.forEach(({event:e,listener:t})=>process.removeListener(e,t))}
|
2240 | const N=(...e)=>{e.forEach(e=>E.add(e))
|
2241 | !q&&T()}
|
2242 | const B=()=>{}
|
2243 | const L=async({pathLogDirectory:e,prefixLogFile:t})=>{const n=(({add:e,...t})=>({...t,add:(...t)=>e((new Date).toISOString(),...t)}))(e?await(async({pathLogDirectory:e,prefixLogFile:t="",getLogFileName:n=(()=>`${t}${(new Date).toISOString().replace(/\W/g,"-")}.log`),saveInterval:a=3e5,splitInterval:o=864e5,...s})=>{let r
|
2244 | let c
|
2245 | let p
|
2246 | const l=()=>{f()
|
2247 | const t=Object(i.resolve)(e,n())
|
2248 | r=_({...s,pathOutputFile:t})
|
2249 | c=a&&setInterval(u,a)
|
2250 | p=o&&setTimeout(d,o)}
|
2251 | const u=()=>{r&&r.save()}
|
2252 | const d=()=>{r&&l()}
|
2253 | const f=()=>{r&&r.end()
|
2254 | c&&clearInterval(c)
|
2255 | p&&clearTimeout(p)
|
2256 | r=null
|
2257 | c=null
|
2258 | p=null}
|
2259 | await y(e)
|
2260 | l()
|
2261 | return{add:(...e)=>{r&&r.add(e.join(" "))},save:u,split:d,end:f}})({pathLogDirectory:e,prefixLogFile:t,flags:"a"}):{add:console.log,save:B,split:B,end:B});((...e)=>{e.forEach(e=>C.add(e))
|
2262 | !q&&T()})(e=>{n.add(`[EXITING] ${JSON.stringify(e)}`)})
|
2263 | N(e=>{n.add(`[EXIT] ${JSON.stringify(e)}`)
|
2264 | e.error&&n.add(`[EXIT][ERROR] ${e.error.stack||e.error}`)
|
2265 | n.end()})
|
2266 | return n}
|
2267 | var R=n(5)
|
2268 | var I=n(8)
|
2269 | var P=n(14)
|
2270 | const z=()=>"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0
|
2271 | const F=z()
|
2272 | Math.floor(.001*Date.now())
|
2273 | const $=(()=>{try{const e=F.performance.now
|
2274 | if(e()<=e())return e}catch(e){}try{const e=F.performance.now.bind(F.performance)
|
2275 | if(e()<=e())return e}catch(e){}try{const e=()=>{const[e,t]=F.process.hrtime()
|
2276 | return 1e3*e+1e-6*t}
|
2277 | if(e()<=e())return e}catch(e){}return Date.now})()
|
2278 | const[U,M]=F.requestAnimationFrame?[F.requestAnimationFrame,F.cancelAnimationFrame]:[e=>setTimeout(e,1e3/60),clearTimeout]
|
2279 | const D=(e,t=null,n=null)=>({value:e,prev:t,next:n})
|
2280 | const H=(e,t,n,i)=>({...D(t),key:e,size:n,expireAt:i})
|
2281 | const J=({valueSizeSumMax:e,valueSizeSingleMax:t=Math.max(.05*e,1)})=>{const{clear:n,subscribe:i,unsubscribe:a,send:o}=(()=>{let e=new Set
|
2282 | return{clear:()=>e.clear(),subscribe:t=>{e.add(t)},unsubscribe:t=>{e.delete(t)},send:t=>e.forEach(e=>e(t))}})()
|
2283 | const s=new Map
|
2284 | const r=(()=>{let e,t,n
|
2285 | const i=()=>{e=new Set
|
2286 | t=D(null)
|
2287 | n=D(null)
|
2288 | t.next=n
|
2289 | n.prev=t}
|
2290 | i()
|
2291 | const a=(t,n)=>{const{next:i}=n
|
2292 | n.next=i.prev=t
|
2293 | t.prev=n
|
2294 | t.next=i
|
2295 | e.add(t)}
|
2296 | const o=(t,n)=>{const{prev:i}=n
|
2297 | n.prev=i.next=t
|
2298 | t.prev=i
|
2299 | t.next=n
|
2300 | e.add(t)}
|
2301 | const s=t=>{const{prev:n,next:i}=t
|
2302 | n.next=i
|
2303 | i.prev=n
|
2304 | t.prev=t.next=null
|
2305 | e.delete(t)}
|
2306 | return{clear:i,getHead:()=>t,getTail:()=>n,getLength:()=>e.size,insertAfter:a,insertBefore:o,remove:s,removeBetween:(t,n)=>{const{prev:i}=t
|
2307 | const{next:a}=n
|
2308 | i.next=a
|
2309 | a.prev=i
|
2310 | t.prev=n.next=null
|
2311 | let o=t
|
2312 | for(;o;){e.delete(o)
|
2313 | o=o.next}},forEach:e=>{let i=t.next
|
2314 | let a=0
|
2315 | for(;i!==n;){e(i,a)
|
2316 | i=i.next
|
2317 | a++}},forEachReverse:i=>{let a=n.prev
|
2318 | let o=e.size-1
|
2319 | for(;a!==t;){i(a,o)
|
2320 | a=a.prev
|
2321 | o--}},reverse:()=>{let e=t.next
|
2322 | for(;e!==n;){const{prev:t,next:n}=e
|
2323 | e.prev=n
|
2324 | e.next=t
|
2325 | e=n}const{next:i}=t
|
2326 | const{prev:a}=n
|
2327 | t.next=a
|
2328 | n.prev=i
|
2329 | a.prev=t
|
2330 | i.next=n},setFirst:e=>{if(e===t.next)return
|
2331 | const{prev:n,next:i}=e
|
2332 | n.next=i
|
2333 | i.prev=n
|
2334 | e.prev=t
|
2335 | e.next=t.next
|
2336 | t.next=e},setLast:e=>{if(e===n.prev)return
|
2337 | const{prev:t,next:i}=e
|
2338 | t.next=i
|
2339 | i.prev=t
|
2340 | e.prev=n.prev
|
2341 | e.next=n
|
2342 | n.prev=e},push:e=>o(e,n),pop:()=>s(n.prev),unshift:e=>a(e,t),shift:()=>s(t.next)}})()
|
2343 | let c=0
|
2344 | const p=e=>{s.set(e.key,e)
|
2345 | r.unshift(e)
|
2346 | c+=e.size
|
2347 | o({type:"add",key:e.key,payload:e.value})}
|
2348 | const l=e=>{s.delete(e.key)
|
2349 | r.remove(e)
|
2350 | c-=e.size
|
2351 | o({type:"delete",key:e.key,payload:e.value})}
|
2352 | return{clearHub:n,subscribe:i,unsubscribe:a,getSize:()=>s.size,clear:()=>s.forEach(l),set:(n,i,a=1,o=Date.now()+6e4)=>{const u=s.get(n)
|
2353 | u&&l(u)
|
2354 | if(!(a>t)){for(;a+c>e;)l(r.getTail().prev)
|
2355 | p(H(n,i,a,o))}},get:(e,t=Date.now())=>{const n=s.get(e)
|
2356 | if(n){if(n.expireAt<=t)return l(n)
|
2357 | r.setFirst(n)
|
2358 | return n.value}},touch:(e,t=Date.now()+6e4)=>{const n=s.get(e)
|
2359 | if(n){n.expireAt=t
|
2360 | r.setFirst(n)
|
2361 | return n.value}},delete:e=>{const t=s.get(e)
|
2362 | t&&l(t)
|
2363 | return t&&t.value},packList:()=>{const e=[]
|
2364 | r.forEachReverse(({key:t,value:n,size:i,expireAt:a})=>e.push({key:t,value:n,size:i,expireAt:a}))
|
2365 | return e},parseList:(e,t=Date.now())=>e.forEach(({key:e,value:n,size:i,expireAt:a})=>{const o=H(e,n,i,a)
|
2366 | o.expireAt<=t?l(o):p(o)})}}
|
2367 | const V=Number.isInteger
|
2368 | const G=e=>"object"==typeof e&&null!==e&&!Array.isArray(e)
|
2369 | const W=Array.isArray
|
2370 | const Y=e=>{const t=typeof e
|
2371 | let n
|
2372 | if("function"===t)n="() => { ... }"
|
2373 | else try{n=JSON.stringify(e)}catch(e){n="{ ... }"}return`<${t}> ${n}`}
|
2374 | const K=e=>`${(100*e).toFixed(2)}%`
|
2375 | Math.pow(10,-12)
|
2376 | Math.pow(10,-9)
|
2377 | Math.pow(10,-6)
|
2378 | Math.pow(10,-3)
|
2379 | Math.pow(10,0)
|
2380 | Math.pow(10,3)
|
2381 | Math.pow(10,6)
|
2382 | Math.pow(10,9)
|
2383 | Math.pow(10,12)
|
2384 | Math.pow(10,15)
|
2385 | Math.pow(10,18)
|
2386 | const Z=e=>{const t=.75*Math.abs(e)
|
2387 | return t<1e3?`${Math.floor(e)}ms`:t<6e4?`${(e/1e3).toFixed(2)}s`:t<36e5?`${(e/6e4).toFixed(2)}m`:t<864e5?`${(e/36e5).toFixed(2)}h`:`${(e/864e5).toFixed(2)}d`}
|
2388 | const Q=Math.pow(2,10)
|
2389 | const X=Math.pow(2,20)
|
2390 | const ee=Math.pow(2,30)
|
2391 | const te=Math.pow(2,40)
|
2392 | const ne=e=>{const t=.75*Math.abs(e)
|
2393 | return t<Q?`${Math.floor(e)}`:t<X?`${(e/Q).toFixed(2)}Ki`:t<ee?`${(e/X).toFixed(2)}Mi`:t<te?`${(e/ee).toFixed(2)}Gi`:`${(e/te).toFixed(2)}Ti`}
|
2394 | const ie=(e,t=" ")=>`${t}${e.replace(/\n/g,`\n${t}`)}`
|
2395 | const ae=(e,t,n)=>{throw new Error(`[verify|${e}]${t?` ${t};`:""} ${n}`)}
|
2396 | const oe=(e,t)=>(n,i)=>t(n)||ae(e,i,`get: ${Y(n)}`)
|
2397 | const se=oe("String",e=>"string"==typeof e)
|
2398 | const re=oe("Number",e=>"number"==typeof e)
|
2399 | const ce=oe("Integer",V)
|
2400 | oe("BasicObject",G)
|
2401 | oe("Array",W)
|
2402 | const pe=(e,t,n)=>((e,t)=>W(e)&&e.length===t)(e,t)||ae("ArrayLength",n,`expect length: ${t}, get: ${e.length}`)
|
2403 | oe("Function",e=>"function"==typeof e)
|
2404 | var le=n(3)
|
2405 | const ue=e=>{if(e.response.finished)return e
|
2406 | const{error:t}=e.getState()
|
2407 | !e.response.headersSent&&e.response.writeHead(t?500:400)
|
2408 | e.response.end()}
|
2409 | const de=({url:e,method:t,headers:{host:n=""},socket:{remoteAddress:i,remotePort:a}})=>`[${t}] ${n}${e} (${i}:${a})`
|
2410 | const fe={protocol:"https:",hostname:"localhost",port:443,isSecure:!0,secureOptions:R.constants.SSL_OP_NO_SSLv3|R.constants.SSL_OP_NO_SSLv2}
|
2411 | const he={protocol:"http:",hostname:"localhost",port:80,isSecure:!1}
|
2412 | const me=new Set([fe.protocol,he.protocol])
|
2413 | const ve=ue
|
2414 | const ge=async({protocol:e="http:",hostname:t="localhost",port:n,fileSSLKey:i,fileSSLCert:a,fileSSLChain:o,fileSSLDHParam:s})=>{const r="https:"===e
|
2415 | return(({protocol:e,...t})=>{if(!me.has(e))throw new Error(`[createServer] invalid protocol: ${e}`);(t={..."https:"===e?fe:he,...t}).baseUrl=`${e}//${t.hostname}:${t.port}`
|
2416 | const n=t.isSecure?Object(P.createServer)(t):Object(I.createServer)()
|
2417 | t.isSecure&&(e=>{const t=J({valueSizeSumMax:4096})
|
2418 | e.on("newSession",(e,n,i)=>{t.set(e.toString("hex"),n,1,Date.now()+6e5)
|
2419 | i()})
|
2420 | e.on("resumeSession",(e,n)=>{n(null,t.get(e.toString("hex"))||null)})})(n)
|
2421 | return{server:n,option:t,start:()=>{!n.listening&&n.listen(t.port,t.hostname)},stop:()=>{n.listening&&n.close()}}})({protocol:e,hostname:t,port:n,key:r&&i?await c(i):null,cert:r&&a?await c(a):null,ca:r&&o?await c(o):null,dhparam:r&&s?await c(s):null})}
|
2422 | const ye={name:"",nameENV:"",nameJSON:"",shortName:"",aliasNameList:[],optional:!1,argumentCount:"0",argumentLengthMin:0,argumentLengthMax:0,argumentListNormalize:e=>e,argumentListVerify:e=>{},description:"",extendFormatList:[]}
|
2423 | const xe=/^(\d+)(-)?(\d+)?$/
|
2424 | const be=(e,t)=>{"function"!=typeof e&&(e=!!e&&we)
|
2425 | return t?(n,i,a)=>e&&e(n,i,a)||!i.has(t):e}
|
2426 | const we=()=>!0
|
2427 | const ke=(e,t,n)=>{e={...ye,...e}
|
2428 | !_e.test(e.name)&&Ee(`name '${e.name}'`,e,t,n)
|
2429 | e.shortName&&!Se.test(e.shortName)&&Ee(`shortName '${e.shortName}'`,e,t,n)
|
2430 | {const i=e.aliasNameList.findIndex(e=>!_e.test(e));-1!==i&&Ee(`aliasNameList #${i} '${e.aliasNameList[i]}'`,e,t,n)}{!xe.test(e.argumentCount)&&Ee(`argumentCount '${e.argumentCount}'`,e,t,n)
|
2431 | const[,i,,a]=xe.exec(e.argumentCount)
|
2432 | a&&parseInt(a)<parseInt(i)&&Ee(`argumentCount '${e.argumentCount}'`,e,t,n)}e.extendFormatList.length&&(e.extendFormatList=e.extendFormatList.map((t,n)=>ke(t,n,e)))
|
2433 | return e}
|
2434 | const _e=/^[A-Za-z][A-Za-z0-9-]*$/
|
2435 | const Se=/^[A-Za-z]$/
|
2436 | const Ee=(e,t,n,i)=>{throw new Error(`[Format] ${Re(t)} #${n}${i?` of ${Re(i)}`:""} | ${e}`)}
|
2437 | const Ce=(e,t)=>n=>{const i=[]
|
2438 | const a=()=>i[i.length-1].argumentList
|
2439 | for(let o=0,s=n.length;o<s;o++){const s=n[o]
|
2440 | if(Oe.test(s)){const[,t,,n]=Oe.exec(s)
|
2441 | const o=e.get(t)
|
2442 | !o&&qe(t)
|
2443 | i.push({format:o,argumentList:[]})
|
2444 | n&&a().push(n)}else if(je.test(s)){const[,e,,n]=je.exec(s)
|
2445 | e.split("").forEach(n=>{const a=t.get(n)
|
2446 | !a&&qe(n,`from '${e}'`)
|
2447 | i.push({format:a,argumentList:[]})})
|
2448 | n&&a().push(n)}else{!i.length&&qe(s,"no leading option found")
|
2449 | "--"===s?a().push(...n.slice(o)):a().push(s)}}return i}
|
2450 | const Oe=/^--([A-Za-z][A-Za-z0-9-]*)(=(.*))?$/
|
2451 | const je=/^-([A-Za-z]+)(=(.*))?$/
|
2452 | const qe=(e,t="invalid option")=>{throw new Error(`[ParseArgv] unexpected '${e}', ${t}`)}
|
2453 | const Te=e=>(t,n={})=>e(t).reduce((e,{format:t,argumentList:n})=>{e[t.name]?e[t.name].argumentList.push(...n):e[t.name]={format:t,argumentList:n,source:"CLI"}
|
2454 | return e},n)
|
2455 | const Ae=e=>(t,n={})=>{e.forEach((e,i)=>{let a=t[i]
|
2456 | if(a){try{a=JSON.parse(a)}catch(e){}n[e.name]={format:e,argumentList:Array.isArray(a)?a:[a],source:"ENV"}}})
|
2457 | return n}
|
2458 | const Ne=e=>(t,n={})=>{e.forEach((e,i)=>{const a=t[i]
|
2459 | a&&(n[e.name]={format:e,argumentList:Array.isArray(a)?a:[a],source:"JSON"})})
|
2460 | return n}
|
2461 | const Be=(e,t)=>(n,i)=>{const a=new Set
|
2462 | Object.entries(n).forEach(([e,t])=>{const{format:n,argumentList:o}=t
|
2463 | n.argumentLengthMin>o.length&&Le(`expected ${n.argumentLengthMin-o.length} more argument`,n)
|
2464 | n.argumentLengthMax<o.length&&Le(`expected ${o.length-n.argumentLengthMax} less argument`,n)
|
2465 | t.argumentList=n.argumentListNormalize(o,i)
|
2466 | n.argumentListVerify(t.argumentList,i)
|
2467 | a.add(n)})
|
2468 | e.forEach(e=>!a.has(e)&&Le("non-optional option",e))
|
2469 | t.forEach(({format:e,checkOptional:t})=>!t(n,a,e)&&!a.has(e)&&Le("non-optional option",e))
|
2470 | return n}
|
2471 | const Le=(e,t)=>{throw new Error(`[Process] ${Re(t)} | ${e}`)}
|
2472 | const Re=({name:e,shortName:t,aliasNameList:n})=>`${e}${n.length?`|${n.join("|")}`:""}${t?` [-${t}]`:""}`
|
2473 | const Ie=e=>Je(e,Pe)
|
2474 | const Pe=e=>Ve(Me(e,`--${e.name}${e.aliasNameList.length?` --${e.aliasNameList.join(" --")}`:""}`,e.shortName&&`-${e.shortName}`),e.description&&Ge(e.description,4),De(e.extendFormatList,Pe,2))
|
2475 | const ze=e=>Ve('"',Ge(`#!/usr/bin/env bash\n${Je(e,Fe)}`),'"')
|
2476 | const Fe=e=>Ve(`export ${e.nameENV}="${Me(e)}"`,De(e.extendFormatList,Fe,0))
|
2477 | const $e=e=>Ve("{",Ge(Je(e,Ue)),"}")
|
2478 | const Ue=e=>Ve(`"${e.nameJSON}": [ "${Me(e)}" ],`,De(e.extendFormatList,Ue,0))
|
2479 | const Me=({optional:e,argumentLengthMin:t,argumentLengthMax:n},...i)=>[...i,e&&(e===we?"[OPTIONAL]":"[OPTIONAL-CHECK]"),(t||n)&&`[ARGUMENT=${He(t,n)}]`].filter(Boolean).join(" ")
|
2480 | const De=(e,t,n)=>e.length&&Ge(Je(e,t),n)
|
2481 | const He=(e,t)=>`${e}${t===1/0?"+":t>e?`-${t}`:""}`
|
2482 | const Je=(e,t)=>Ve(...e.map(t))
|
2483 | const Ve=(...e)=>e.filter(Boolean).join("\n")
|
2484 | const Ge=(e,t=2)=>t?ie(e," ".repeat(t)):e
|
2485 | const We=e=>pe(e,1,"single argument expected")
|
2486 | const Ye=(e,t)=>n=>{We(n)
|
2487 | e(n[0],`single ${t} argument expected`)}
|
2488 | const Ke=(e,t)=>n=>{n.forEach((n,i)=>e(n,`${t} expected at #${i}`))}
|
2489 | const Ze=Ke(se,"String")
|
2490 | const Qe=Ke(re,"Number")
|
2491 | const Xe=Ke(ce,"Integer")
|
2492 | const et=e=>e.map(String)
|
2493 | const tt=e=>e.map(Number)
|
2494 | const nt=e=>e.map(parseInt)
|
2495 | const it=(e,t=(e=>e),n=(()=>{}),i="",a=!1)=>({argumentCount:e,argumentListNormalize:t,argumentListVerify:n,description:i,optional:a})
|
2496 | const at=(e,t)=>n=>{t(n)
|
2497 | return it(1,e,(e=>t=>{We(t);((e,t,n)=>((e,t)=>t.includes(e))(e,t)||ae("OneOf",n,`expect one of: [${t}], get: ${Y(e)}`))(t[0],e)})(n),`one of:\n ${((e,t)=>{const n=[]
|
2498 | for(let i=0,a=e.length;i<a;i+=t)n.push(e.slice(i,i+t))
|
2499 | return n})(n,4).map(e=>e.join(" ")).join("\n ")}`)}
|
2500 | const ot={SingleString:it(1,et,Ye(se,"String")),SingleNumber:it(1,tt,Ye(re,"Number")),SingleInteger:it(1,nt,Ye(ce,"Integer")),AllString:it("1-",et,Ze),AllNumber:it("1-",tt,Qe),AllInteger:it("1-",nt,Xe),OneOfString:at(et,Ze),OneOfNumber:at(tt,Qe),OneOfInteger:at(nt,Xe),BooleanFlag:it("0-",()=>[!0],void 0,"set to enable",!0),Any:it("0-",void 0,void 0,"optional",!0)}
|
2501 | const st={...ot,SinglePath:{...ot.SingleString,isPath:!0},AllPath:{...ot.AllString,isPath:!0},Config:{...ot.SingleString,description:"# from JSON: set to 'path/to/config.json'\n# from ENV: set to 'env'",optional:!0,name:"config",shortName:"c"}}
|
2502 | const rt=(e,t)=>{Object.values(e).forEach(({format:{isPath:e},argumentList:n})=>e&&n.forEach((e,a)=>n[a]=Object(i.resolve)(t,e)))
|
2503 | return e}
|
2504 | const{SingleString:ct,SingleInteger:pt,SinglePath:lt,BooleanFlag:ut}=st
|
2505 | const{SingleString:dt,SingleInteger:ft,BooleanFlag:ht,Config:mt}=st
|
2506 | const vt={prefixENV:"imock-socket",formatList:[mt,{...ht,name:"help",shortName:"h"},{...ht,name:"version",shortName:"v"},((e=[])=>({...ct,optional:!0,name:"hostname",shortName:"H",extendFormatList:[{...pt,name:"port",shortName:"P"},{...ut,name:"https",shortName:"S",extendFormatList:[{...lt,name:"file-SSL-key"},{...lt,name:"file-SSL-cert"},{...lt,name:"file-SSL-chain"},{...lt,name:"file-SSL-dhparam"}]},{...lt,optional:!0,name:"path-log",extendFormatList:[{...ct,optional:!0,name:"prefix-log-file"}]},{...lt,optional:!0,name:"file-pid",extendFormatList:[{...ut,name:"pid-ignore-exist"}]},...e]}))([{...ft,optional:!0,name:"port-admin-server"},{...dt,optional:!0,name:"socket-path"},{...dt,name:"url-server-socket-action"},{...ht,name:"cluster",shortName:"r",extendFormatList:[{...dt,optional:!0,name:"redis-host"},{...ft,optional:!0,name:"redis-port"}]}])]}
|
2507 | const{parseOption:gt,formatUsage:yt}=(e=>{const{parseCLI:t,parseENV:n,parseJSON:a,processOptionMap:o,formatUsage:s}=(({formatList:e,prefixENV:t="",prefixJSON:n=""})=>{const i=new Map
|
2508 | const a=new Map
|
2509 | const o=new Map
|
2510 | const s=new Map
|
2511 | const r=new Set
|
2512 | const c=new Set
|
2513 | const p=(e,l,u)=>{const{name:d,shortName:f,aliasNameList:h,argumentCount:m}=e
|
2514 | const[,v,g,y]=xe.exec(m.toString())
|
2515 | e.nameENV=(t?`${t}-${d}`:d).split("-").join("_").toUpperCase()
|
2516 | e.nameJSON=((e,t=1)=>e.reduce((e,n,i)=>i>=t?e+n[0].toUpperCase()+n.slice(1):e+n,""))((n?`${n}-${d}`:d).split("-"))
|
2517 | e.optional=be(e.optional,u)
|
2518 | e.argumentLengthMin=parseInt(v)
|
2519 | e.argumentLengthMax=g?y?parseInt(y):1/0:e.argumentLengthMin
|
2520 | i.has(d)&&Ee(`duplicate name '${d}'`,e,l,u)
|
2521 | i.set(d,e)
|
2522 | f&&a.has(f)&&Ee(`duplicate shortName '${f}'`,e,l,u)
|
2523 | f&&a.set(f,e)
|
2524 | {const t=h.find(e=>i.has(e))
|
2525 | t&&Ee(`duplicate aliasName '${t}'`,e,l,u)
|
2526 | h.forEach(t=>i.set(t,e))}o.set(e.nameENV,e)
|
2527 | s.set(e.nameJSON,e)
|
2528 | e.optional?e.optional!==we&&c.add({format:e,checkOptional:e.optional}):r.add(e)
|
2529 | e.extendFormatList.forEach((t,n)=>p(t,n,e))};(e=e.map((e,t)=>ke(e,t,null))).forEach((e,t)=>p(e,t,null))
|
2530 | return{parseCLI:Te(Ce(i,a)),parseENV:Ae(o),parseJSON:Ne(s),processOptionMap:Be(r,c),formatUsage:(t,n=!1)=>Ve(t&&`Message:\n${Ge(t.toString())}`,`CLI Usage:\n${Ge(Ie(e))}`,!n&&`ENV Usage:\n${Ge(ze(e))}`,!n&&`JSON Usage:\n${Ge($e(e))}`)}})(e)
|
2531 | return{parseOption:async()=>(e=>{const t=t=>e[t]?e[t].argumentList:void 0
|
2532 | const n=(e,n)=>{const i=t(e)
|
2533 | if(!i)throw new Error(`[getOption] expecting option ${e}`)
|
2534 | if(void 0!==n&&i.length!==n)throw new Error(`[getOption] expecting option ${e} has ${n} value instead of ${i.length}`)
|
2535 | return i}
|
2536 | return{optionMap:e,getOptionOptional:t,getOption:n,getSingleOptionOptional:t=>e[t]?e[t].argumentList[0]:void 0,getSingleOption:e=>n(e,1)[0]}})(await(async({parseCLI:e,parseENV:t,parseJSON:n,processOptionMap:a})=>{const o=rt(e(process.argv.slice(2)),process.cwd())
|
2537 | const s=o.config&&o.config.argumentList.length&&o.config.argumentList[0]
|
2538 | return a({...s?"env"===s?rt(t(process.env),process.cwd()):rt(n(JSON.parse(await c(s,"utf8"))),Object(i.dirname)(s)):null,...o})})({parseCLI:t,parseENV:n,parseJSON:a,processOptionMap:o})),formatUsage:s}})(vt)
|
2539 | var xt=n(53)
|
2540 | var bt=n.n(xt)
|
2541 | var wt=n(52)
|
2542 | var kt=n.n(wt)
|
2543 | var _t=n(9)
|
2544 | const St=e=>new Promise((t,n)=>{const i=[]
|
2545 | e.on("error",n)
|
2546 | e.on("data",e=>i.push(e))
|
2547 | e.on("end",()=>{e.removeListener("error",n)
|
2548 | t(Buffer.concat(i))})})
|
2549 | const Et=(e,t)=>new Promise((n,i)=>{e.on("error",i)
|
2550 | e.write(t,()=>{e.removeListener("error",i)
|
2551 | n()})})
|
2552 | const Ct=({protocol:e,hostname:t,hash:n,search:i,pathname:a,href:o,port:s,username:r,password:c})=>{const p={protocol:e,hostname:t,hash:n,search:i,pathname:a,href:o,path:`${a}${i}`}
|
2553 | ""!==s&&(p.port=Number(s));(r||c)&&(p.auth=`${r}:${c}`)
|
2554 | return p}
|
2555 | const Ot=(e,t=null)=>new Promise((n,i)=>{const a=("https:"===e.protocol?P.request:I.request)(e,n)
|
2556 | const o=t=>{a.destroy()
|
2557 | t.option=e
|
2558 | i(t)}
|
2559 | a.on("timeout",()=>o(new Error("request timeout")))
|
2560 | a.on("error",o)
|
2561 | a.end(t)})
|
2562 | const jt=1e4
|
2563 | const qt=async(e,t={})=>{const{method:n,headers:i,body:a,timeout:o=jt}=t
|
2564 | const s={...Ct(new le.URL(e)),method:n,headers:{"accept-encoding":"gzip",...i},timeout:o}
|
2565 | const r=await Ot(s,a)
|
2566 | const c=r.headers
|
2567 | const p=r.statusCode
|
2568 | const l=p>=200&&p<300
|
2569 | let u=!1
|
2570 | let d
|
2571 | process.nextTick(()=>{if(!d){r.destroy()
|
2572 | u=!0}})
|
2573 | const f=async()=>{if(void 0===d){if(u)throw new Error("[fetch] data already dropped, should call receive data immediately")
|
2574 | d=St("gzip"===r.headers["content-encoding"]?r.pipe(Object(_t.createGunzip)()):r)}return d}
|
2575 | const h=()=>f().then(e=>e.toString())
|
2576 | return{headers:c,status:p,ok:l,buffer:f,text:h,json:()=>h().then(e=>JSON.parse(e))}}
|
2577 | const Tt="application/octet-stream"
|
2578 | const At=["application/javascript:js;mjs","application/json:json","application/pdf:pdf","application/xml:xml","audio/midi:mid;midi","audio/mpeg:mp3","audio/ogg:ogg","audio/wav:wav","audio/webm:weba","audio/x-flac:flac","font/ttf:ttf","font/woff:woff","font/woff2:woff2","image/bmp:bmp","image/gif:gif","image/jpeg:jpeg;jpg","image/png:png","image/svg+xml:svg","image/webp:webp","image/x-icon:ico","text/css:css","text/csv:csv","text/html:html;htm","text/plain:txt;text;conf;log;ini","text/rtf:rtf","text/xml:xml","video/mp4:mp4;mp4v;mpg4","video/mpeg:mpeg;mpg","video/webm:webm","video/x-flv:flv","video/x-ms-wmv:wmv","video/x-msvideo:avi"].reduce((e,t)=>{const[n,i]=t.split(":")
|
2579 | i.split(";").forEach(t=>e[t]=n)
|
2580 | return e},{})
|
2581 | const Nt=e=>({INFO:e.INFO,id:e.id,rooms:Object.keys(e.rooms)})
|
2582 | const Bt=e=>`USER:${Buffer.from(String(e)).toString("base64")}`
|
2583 | const Lt=e=>`PROJECT:${Buffer.from(String(e)).toString("base64")}`
|
2584 | const Rt=async(e,{type:t="",payload:n={},cookie:i=""})=>{try{const a=await qt(e,{method:"POST",headers:{cookie:i,"content-type":At.json},body:JSON.stringify({type:t,payload:n})})
|
2585 | if(!a.ok)return{response:a,responseText:"",error:new Error(`[postServerActionAsync] get unexpected status: ${a.status}`)}
|
2586 | return{response:a,responseText:await a.text(),error:null}}catch(e){return{response:null,responseText:"",error:e}}}
|
2587 | const It={serveClient:!1,transports:["websocket"],pingInterval:25e3,pingTimeout:5e3,upgradeTimeout:1e4,cookie:!1}
|
2588 | const Pt=({socketIoServerUser:e,urlServerSocketAction:t,logger:n})=>{const i=e.of("/")
|
2589 | i.use(async(e,i)=>{const{address:a,headers:{cookie:o=""},query:{userId:s=""}}=e.handshake
|
2590 | const r=String(s)
|
2591 | n.add("pre-connect",a,{cookie:o,userId:r})
|
2592 | const{response:c,responseText:p,error:l}=await Rt(t,{type:"verify:user",payload:{userId:r},cookie:o})
|
2593 | if(l)throw l
|
2594 | const u=o||(c.headers["set-cookie"]||[]).map(e=>e.split(";")[0]).join(";")
|
2595 | const d=Boolean(JSON.parse(p).isAllowRequest)
|
2596 | e.INFO={tag:r,userId:r,userAuthCookie:u,isAllowRequest:d,urlServerSocketAction:t}
|
2597 | return i()})
|
2598 | i.on("connect",e=>{const{tag:t}=e.INFO
|
2599 | zt({socket:e,tag:t,logger:n})
|
2600 | Ft({socket:e,...e.INFO,logger:n})})}
|
2601 | const zt=({socket:e,tag:t,logger:n})=>{e.on("disconnect",e=>{n.add("disconnect",t,e)})
|
2602 | e.on("error",e=>{n.add("error",t,e)})
|
2603 | e.on("request:close",()=>{n.add("request:close",t)
|
2604 | e.disconnect(!0)})}
|
2605 | const Ft=({socket:e,tag:t,userId:n,userAuthCookie:i,isAllowRequest:a,urlServerSocketAction:o,logger:s})=>{e.join(Bt(n))
|
2606 | e.on("join:projects",async({projectCidList:t=[]},a)=>{const{error:s}=await Rt(o,{type:"verify:user-project",payload:{userId:n,projectCidList:t},cookie:i})
|
2607 | if(!s){t.forEach(t=>e.join(Lt(t)))
|
2608 | a("done")}})
|
2609 | e.on("leave:projects",({projectCidList:t=[]},n)=>{t.forEach(t=>e.leave(Lt(t)))
|
2610 | n("done")})
|
2611 | a&&e.on("request:project:batch-save",async({batchSaveQueue:t=[],rootProjectCid:a="",fromUser:r={}},c)=>{if(String(r.id)!==String(n)){s.add(`[ERROR][request:project:batch-save] user mismatch, expect: ${n}, get: ${JSON.stringify(r)}`)
|
2612 | return c({responseText:"",error:`[Error] user mismatch, get: ${JSON.stringify(r)}`})}const{responseText:p,error:l}=await(async(e,t,n,i,a)=>{a.add(`[devBatchSavePatch] userId: ${t}, batchSaveQueue: ${i.length}`)
|
2613 | try{for(const{url:o,method:s,body:r}of i){const i=new le.URL(o,e).toString()
|
2614 | const{ok:c,status:p}=await qt(i,{method:s,headers:{cookie:n,accept:"*/*","content-type":At.json},body:r})
|
2615 | if(!c){a.add(`[ERROR][devBatchSavePatch] get unexpected status: ${p}, userId: ${t}, saveUrl: ${i}`)
|
2616 | return{responseText:"",error:new Error(`[devBatchSavePatch] get unexpected status: ${p}, saveUrl: ${i}`)}}}return{responseText:"",error:null}}catch(e){a.add(`[ERROR][devBatchSavePatch] error: ${e}, userId: ${t}`)
|
2617 | return{responseText:"",error:e}}})(o,n,i,t,s)
|
2618 | l&&s.add(`[ERROR][request:project:batch-save] ${l.toString()}`)
|
2619 | c({responseText:p,error:l&&l.toString()})
|
2620 | !l&&e.broadcast.to(Lt(a)).emit("broadcast:project:batch-save",{fromUserId:n,fromUser:r,rootProjectCid:a,batchSaveQueue:t})})}
|
2621 | n(51)
|
2622 | const $t=Object(o.promisify)(_t.gzip)
|
2623 | const Ut=(e,t,n,i)=>{t&&e.response.setHeader("etag",t)
|
2624 | const a=!t||!e.request.headers["if-none-match"]||!e.request.headers["if-none-match"].includes(t)
|
2625 | a?e.response.writeHead(200,{"content-type":n,"content-length":i}):e.response.writeHead(304,{"content-type":n})
|
2626 | return a}
|
2627 | const Mt=async(e,{buffer:t,bufferGzip:n,entityTag:i,type:a=Tt,length:o=t.length})=>{i&&e.response.setHeader("etag",i)
|
2628 | const s=!i||!e.request.headers["if-none-match"]||!e.request.headers["if-none-match"].includes(i)
|
2629 | const r=s&&o&&e.request.headers["accept-encoding"]&&e.request.headers["accept-encoding"].includes("gzip")
|
2630 | const c=r?n||await $t(t):t
|
2631 | s?e.response.writeHead(200,r?{"content-type":a,"content-length":c.length,"content-encoding":"gzip"}:{"content-type":a,"content-length":o}):e.response.writeHead(304,{"content-type":a})
|
2632 | return s&&o&&Et(e.response,c)}
|
2633 | const Dt=(e,{object:t,entityTag:n})=>((e,{buffer:t,entityTag:n,type:i=Tt,length:a=t.length})=>Ut(e,n,i,a)&&a&&Et(e.response,t))(e,{buffer:Buffer.from(JSON.stringify(t)),type:At.json,entityTag:n})
|
2634 | const Ht=(e,t)=>void 0===e[t]?e[t]={}:e[t]
|
2635 | const Jt=(e,t)=>{const n=[]
|
2636 | return{routeNode:e=t.split("/").reduce((e,i)=>{if("*"===i){n.push("/*")
|
2637 | return Ht(e,"/*")}if(":"===i[0]){const a=i.slice(1)
|
2638 | if(!a||n.includes(a))throw new Error(`[parseRouteToMap] invalid frag [${i}] for route: ${t}`)
|
2639 | n.push(a)
|
2640 | return Ht(e,"/:PARAM")}return Ht(e,i)},e),paramNameList:n}}
|
2641 | const Vt=(e,t)=>{const n=[]
|
2642 | const i=t.split("/")
|
2643 | for(let a=0,o=i.length;a<o;a++){const o=i[a]
|
2644 | if(e[o])e=e[o]
|
2645 | else{if(!e["/:PARAM"]){if(e["/*"]){n.push(i.slice(a).join("/"))
|
2646 | e=e["/*"]
|
2647 | break}throw new Error(`[findRouteFromMap] stuck at [${o}] for route: ${t}`)}n.push(o)
|
2648 | e=e["/:PARAM"]}}return{routeNode:e,paramValueList:n}}
|
2649 | const Gt={GET:"/GET",POST:"/POST",PUT:"/PUT",PATCH:"/PATCH",DELETE:"/DELETE",HEAD:"/HEAD",OPTIONS:"/OPTIONS",CONNECT:"/CONNECT",TRACE:"/TRACE"}
|
2650 | const Wt=(e,t="/",n="GET",i)=>{if(Array.isArray(t))return t.reduce((t,a)=>Wt(e,a,n,i),e)
|
2651 | if(Array.isArray(n))return n.reduce((n,a)=>Wt(e,t,a,i),e)
|
2652 | const{routeNode:a,paramNameList:o}=Jt(e,t)
|
2653 | if(!Gt[n])throw new Error(`[appendRouteMap] invalid method [${n}] for route: ${t}`)
|
2654 | if(a[Gt[n]])throw new Error(`[appendRouteMap] duplicate method [${n}] for route: ${t}`)
|
2655 | if("function"!=typeof i)throw new Error(`[appendRouteMap] invalid routeResponder for route: ${t}`)
|
2656 | a[Gt[n]]={route:t,paramNameList:o,routeResponder:i}
|
2657 | return e}
|
2658 | var Yt=n(4)
|
2659 | const Kt=()=>({platform:Object(Yt.platform)(),arch:Object(Yt.arch)(),release:Object(Yt.release)()})
|
2660 | const Zt=()=>Object(Yt.cpus)()||[{model:"N/A",speed:"N/A",times:{user:0,nice:0,sys:0,idle:0,irq:0}}]
|
2661 | const Qt=()=>({total:Object(Yt.totalmem)(),free:Object(Yt.freemem)()})
|
2662 | const Xt=()=>({hostname:Object(Yt.hostname)(),networkInterface:Object(Yt.networkInterfaces)()})
|
2663 | const en=()=>({uptime:1e3*Object(Yt.uptime)(),loadAverageList:Object(Yt.loadavg)()})
|
2664 | const tn=()=>({platform:Kt(),processor:Zt(),memory:Qt(),network:Xt(),activity:en()})
|
2665 | const nn=({platform:e,processor:t,memory:n,network:i,activity:a}=tn())=>Object.entries({platform:(({platform:e,arch:t,release:n}=Kt())=>`${e} ${t} [${n}]`)(e),processor:((e=Zt())=>e.map(({model:e,speed:t,times:n})=>`[${e}] speed:${t}MHz ${Object.entries(n).map(([e,t])=>`${e}:${Z(t)}`).join(" ")}`).join("\n"))(t),memory:(({total:e,free:t}=Qt())=>[`Used: ${K((e-t)/e)}`,`Total: ${ne(e)}B`,`Free: ${ne(t)}B`].join("\n"))(n),network:(({hostname:e,networkInterface:t}=Xt())=>[`[hostname] ${e}`,"[interface]",...Object.entries(t).reduce((e,[t,n])=>{e.push(` ${t}`)
|
2666 | return e.concat(n.map(({address:e,netmask:t,mac:n,internal:i,family:a,cidr:o})=>` - [${a}${i?"|INTERNAL":""}] ${o||e} (${n})`))},[])].join("\n"))(i),activity:(({uptime:e,loadAverageList:t}=en())=>[`[uptime] ${Z(e)}`,"win32"!==Object(Yt.platform)()&&`[load average] ${t.map(K).join(", ")} (1min, 5min, 15min)`].filter(Boolean).join("\n"))(a)}).map(([e,t])=>`[${e}]\n${ie(t)}`).join("\n")
|
2667 | const an=e=>({isTTY:Boolean(process[e].isTTY)})
|
2668 | const on=(e,t,n)=>t.reduce((e,t)=>e.to(n(t)),e)
|
2669 | const sn=e=>async t=>{await e(JSON.parse(await St(t.request)))
|
2670 | return((e,{statusCode:t=500,headerMap:n})=>{if(e.response.finished)return e
|
2671 | !e.response.headersSent&&e.response.writeHead(t,n)
|
2672 | e.response.end()})(t,{statusCode:200})}
|
2673 | const rn=({socketIoServerUser:e},{server:t,option:n,logger:i})=>{const a=e.of("/")
|
2674 | const o=(e=>t=>{const{time:n,error:i}=t.getState()
|
2675 | e(de(t.request),"|",i?"[ERROR]":"[END]",Z($()-n),t.response.statusCode,i?i.stack||i:"")})(i.add)
|
2676 | const s=(e=>e.reduce((e,[t,n,i])=>Wt(e,t,n,i),{}))([["/emit-to-users","POST",sn(({userIdList:e=[],eventName:t,eventData:n})=>on(a,e,Bt).emit(t,n))],["/emit-to-projects","POST",sn(({projectCidList:e=[],eventName:t,eventData:n})=>on(a,e,Lt).emit(t,n))],["/system-status","GET",async e=>{const t={...tn(),...(()=>({title:process.title,pid:process.pid,ppid:process.ppid,uid:b(process,"getuid"),gid:b(process,"getgid"),groups:b(process,"getgroups")||[],euid:b(process,"geteuid"),egid:b(process,"getegid"),stdio:{stdin:an("stdin"),stdout:an("stdout"),stderr:an("stderr")},isConnectedIPC:Boolean(process.connected),execPath:process.execPath,execArgv:process.execArgv,argv:process.argv,cwd:process.cwd(),uptime:1e3*process.uptime(),cpuUsage:process.cpuUsage(),memoryUsage:process.memoryUsage()}))()}
|
2677 | i.add("[system-status]",t)
|
2678 | return Dt(e,{object:t})}],["/system-status-lite","GET",async e=>{const t=nn()
|
2679 | i.add("[system-status-lite]",t)
|
2680 | return Mt(e,{buffer:Buffer.from(t),type:At.text})}],[["/","/socket-status"],"GET",async e=>{const t=(e=>Object.entries(e.connected).reduce((e,[t,n])=>{e[t]=Nt(n)
|
2681 | return e},{}))(a)
|
2682 | i.add("[socket-status]",t)
|
2683 | return Dt(e,{object:t})}]].filter(Boolean))
|
2684 | t.on("request",(({responderList:e=[],responderEnd:t=ve,responderError:n=((e,t)=>e.setState({error:t}))})=>async(i,a)=>{const o=(e=>({getState:()=>e,setState:t=>e={...e,...t}}))({time:$(),error:null})
|
2685 | o.request=i
|
2686 | o.response=a
|
2687 | try{for(const t of e)await t(o)}catch(e){await n(o,e)}await t(o)})({responderList:[(({baseUrl:e="",baseUrlObject:t=new le.URL(e)})=>e=>{const{url:n,method:i}=e.request
|
2688 | e.setState({url:new le.URL(n,t),method:i})})(n),(e=>t=>{e(de(t.request),"|",t.request.headers["user-agent"]||"no-user-agent")})(i.add),e=>e.response.setHeader("access-control-allow-origin","*"),(e=>t=>{const{url:n,method:i}=t.getState()
|
2689 | if(!n||!i)throw new Error(`[responderRouter] missing state: ${JSON.stringify({url:n,method:i})}`)
|
2690 | if(!Gt[i])throw new Error(`[responderRouter] invalid method [${i}] from route: ${n.pathname}`)
|
2691 | const{routeNode:a,paramValueList:o}=Vt(e,n.pathname)
|
2692 | if(!a[Gt[i]])throw new Error(`[responderRouter] invalid method [${i}] for route: ${n.pathname}`)
|
2693 | const{route:s,paramNameList:r,routeResponder:c}=a[Gt[i]]
|
2694 | const p=r.reduce((e,t,n)=>{e[t]=o[n]
|
2695 | return e},{})
|
2696 | return c(t,t.setState({route:s,paramMap:p}))})(s)],responderEnd:e=>{ue(e)
|
2697 | o(e)}}))}
|
2698 | var cn=n(26)
|
2699 | const pn=async({getOptionOptional:e,getSingleOption:t,getSingleOptionOptional:n})=>{await(async({filePid:e,shouldIgnoreExistPid:t=!1})=>{if(e){!t&&w(()=>{const t=Object(a.readFileSync)(e,{encoding:"utf8"})
|
2700 | if(t){console.warn(`[FilePid] get existing pid: ${t}, exit process...`)
|
2701 | return process.exit(-1)}})
|
2702 | await y(Object(i.dirname)(e))
|
2703 | await p(e,`${process.pid}`)
|
2704 | N(t=>{w(a.unlinkSync,e)})}})({filePid:n("file-pid"),shouldIgnoreExistPid:e("pid-ignore-exist")})
|
2705 | const o=await L({pathLogDirectory:n("path-log"),prefixLogFile:n("log-file-prefix")})
|
2706 | const s=n("socket-path")
|
2707 | const r=n("port-admin-server")
|
2708 | const c={protocol:e("https")?"https:":"http:",hostname:t("hostname"),fileSSLKey:n("file-SSL-key"),fileSSLCert:n("file-SSL-cert"),fileSSLChain:n("file-SSL-chain"),fileSSLDHParam:n("file-SSL-dhparam")}
|
2709 | const{server:l,start:u,option:d}=await ge({...c,port:t("port")})
|
2710 | const{socketIoServerUser:f}=(({requestAdminActionAsync:e,socketPath:t="/S",urlServerSocketAction:n,isRedisEnabled:i=!1,redisHost:a="localhost",redisPort:o=6379},{server:s,option:r,logger:c})=>{const p=new bt.a(s,{...It,path:t,adapter:i?kt()({host:a,port:o}):void 0})
|
2711 | Pt({socketIoServerUser:p,urlServerSocketAction:n,logger:c})
|
2712 | c.add(["[createSocketIoServer]",`socket-path: ${t}`,`url-server-socket-action: ${n}`,`${i?`with redis at: ${a}:${o}`:"without redis"}`].join("\n - "))
|
2713 | return{socketIoServerUser:p}})({socketPath:s,urlServerSocketAction:t("url-server-socket-action"),isRedisEnabled:Boolean(e("cluster")),redisHost:n("redis-host"),redisPort:n("redis-port")},{server:l,option:d,logger:o})
|
2714 | if(r){const{server:e,start:t,option:n}=await ge({...c,port:r})
|
2715 | rn({socketIoServerUser:f},{server:e,option:n,logger:o})
|
2716 | t()
|
2717 | o.add(`[ADMIN SERVER UP] ${n.baseUrl}`)}u()
|
2718 | o.add(`[USER SERVER UP] ${d.baseUrl}`)};(async()=>{const e=await gt()
|
2719 | e.getSingleOptionOptional("port")?await pn(e).catch(e=>{console.warn("[Error]",e.stack||e)
|
2720 | process.exit(2)}):e.getSingleOptionOptional("version")?console.log(JSON.stringify({packageName:cn.a,packageVersion:cn.b},null," ")):console.log(yt())})().catch(e=>{console.warn(yt(e.stack||e,"simple"))
|
2721 | process.exit(1)})},function(e,t,n){var i=n(45)
|
2722 | var a=n(1);(t=e.exports=n(27)).init=function(e){e.inspectOpts={}
|
2723 | var n=Object.keys(t.inspectOpts)
|
2724 | for(var i=0;i<n.length;i++)e.inspectOpts[n[i]]=t.inspectOpts[n[i]]}
|
2725 | t.log=function(){return s.write(a.format.apply(a,arguments)+"\n")}
|
2726 | t.formatArgs=function(e){var n=this.namespace
|
2727 | if(this.useColors){var i=this.color
|
2728 | var a=" [3"+i+";1m"+n+" [0m"
|
2729 | e[0]=a+e[0].split("\n").join("\n"+a)
|
2730 | e.push("[3"+i+"m+"+t.humanize(this.diff)+"[0m")}else e[0]=(new Date).toUTCString()+" "+n+" "+e[0]}
|
2731 | t.save=function(e){null==e?delete process.env.DEBUG:process.env.DEBUG=e}
|
2732 | t.load=r
|
2733 | t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):i.isatty(o)}
|
2734 | t.colors=[6,2,3,4,5,1]
|
2735 | t.inspectOpts=Object.keys(process.env).filter(function(e){return/^debug_/i.test(e)}).reduce(function(e,t){var n=t.substring(6).toLowerCase().replace(/_([a-z])/g,function(e,t){return t.toUpperCase()})
|
2736 | var i=process.env[t]
|
2737 | i=!!/^(yes|on|true|enabled)$/i.test(i)||!/^(no|off|false|disabled)$/i.test(i)&&("null"===i?null:Number(i))
|
2738 | e[n]=i
|
2739 | return e},{})
|
2740 | var o=parseInt(process.env.DEBUG_FD,10)||2
|
2741 | 1!==o&&2!==o&&a.deprecate(function(){},"except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)")()
|
2742 | var s=1===o?process.stdout:2===o?process.stderr:function(e){var t
|
2743 | switch(process.binding("tty_wrap").guessHandleType(e)){case"TTY":(t=new i.WriteStream(e))._type="tty"
|
2744 | t._handle&&t._handle.unref&&t._handle.unref()
|
2745 | break
|
2746 | case"FILE":var a=n(0);(t=new a.SyncWriteStream(e,{autoClose:!1}))._type="fs"
|
2747 | break
|
2748 | case"PIPE":case"TCP":var o=n(33);(t=new o.Socket({fd:e,readable:!1,writable:!0})).readable=!1
|
2749 | t.read=null
|
2750 | t._type="pipe"
|
2751 | t._handle&&t._handle.unref&&t._handle.unref()
|
2752 | break
|
2753 | default:throw new Error("Implement me. Unknown stream file type!")}t.fd=e
|
2754 | t._isStdio=!0
|
2755 | return t}(o)
|
2756 | t.formatters.o=function(e){this.inspectOpts.colors=this.useColors
|
2757 | return a.inspect(e,this.inspectOpts).split("\n").map(function(e){return e.trim()}).join(" ")}
|
2758 | t.formatters.O=function(e){this.inspectOpts.colors=this.useColors
|
2759 | return a.inspect(e,this.inspectOpts)}
|
2760 | function r(){return process.env.DEBUG}t.enable(r())},function(e,t,n){(t=e.exports=n(27)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}
|
2761 | t.formatArgs=function(e){var n=this.useColors
|
2762 | e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff)
|
2763 | if(!n)return
|
2764 | var i="color: "+this.color
|
2765 | e.splice(1,0,i,"color: inherit")
|
2766 | var a=0
|
2767 | var o=0
|
2768 | e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&"%c"===e&&(o=++a)})
|
2769 | e.splice(o,0,i)}
|
2770 | t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}}
|
2771 | t.load=i
|
2772 | t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0
|
2773 | return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}
|
2774 | t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}()
|
2775 | t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"]
|
2776 | t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}
|
2777 | function i(){var e
|
2778 | try{e=t.storage.debug}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG)
|
2779 | return e}t.enable(i())},function(e,t,n){"undefined"!=typeof process&&"renderer"===process.type?e.exports=n(57):e.exports=n(56)},function(e,t,n){"use strict"
|
2780 | function i(e){this.offset=0
|
2781 | this.buffer=e}i.prototype.array=function(e){var t=new Array(e)
|
2782 | for(var n=0;n<e;n++)t[n]=this.parse()
|
2783 | return t}
|
2784 | i.prototype.map=function(e){var t={}
|
2785 | for(var n=0;n<e;n++)t[this.parse()]=this.parse()
|
2786 | return t}
|
2787 | i.prototype.str=function(e){var t=this.buffer.toString("utf8",this.offset,this.offset+e)
|
2788 | this.offset+=e
|
2789 | return t}
|
2790 | i.prototype.bin=function(e){var t=this.buffer.slice(this.offset,this.offset+e)
|
2791 | this.offset+=e
|
2792 | return t}
|
2793 | i.prototype.arraybuffer=function(e){var t=new ArrayBuffer(e)
|
2794 | var n=new Uint8Array(t)
|
2795 | for(var i=0;i<e;i++)n[i]=this.buffer[this.offset+i]
|
2796 | this.offset+=e
|
2797 | return t}
|
2798 | i.prototype.parse=function(){var e=this.buffer[this.offset++]
|
2799 | var t,n=0,i=0,a=0,o=0
|
2800 | if(e<192)return e<128?e:e<144?this.map(15&e):e<160?this.array(15&e):this.str(31&e)
|
2801 | if(e>223)return-1*(255-e+1)
|
2802 | switch(e){case 192:return null
|
2803 | case 194:return!1
|
2804 | case 195:return!0
|
2805 | case 196:n=this.buffer.readUInt8(this.offset)
|
2806 | this.offset+=1
|
2807 | return this.bin(n)
|
2808 | case 197:n=this.buffer.readUInt16BE(this.offset)
|
2809 | this.offset+=2
|
2810 | return this.bin(n)
|
2811 | case 198:n=this.buffer.readUInt32BE(this.offset)
|
2812 | this.offset+=4
|
2813 | return this.bin(n)
|
2814 | case 199:n=this.buffer.readUInt8(this.offset)
|
2815 | i=this.buffer.readInt8(this.offset+1)
|
2816 | this.offset+=2
|
2817 | return 0===i?this.arraybuffer(n):[i,this.bin(n)]
|
2818 | case 200:n=this.buffer.readUInt16BE(this.offset)
|
2819 | i=this.buffer.readInt8(this.offset+2)
|
2820 | this.offset+=3
|
2821 | return 0===i?this.arraybuffer(n):[i,this.bin(n)]
|
2822 | case 201:n=this.buffer.readUInt32BE(this.offset)
|
2823 | i=this.buffer.readInt8(this.offset+4)
|
2824 | this.offset+=5
|
2825 | return 0===i?this.arraybuffer(n):[i,this.bin(n)]
|
2826 | case 202:t=this.buffer.readFloatBE(this.offset)
|
2827 | this.offset+=4
|
2828 | return t
|
2829 | case 203:t=this.buffer.readDoubleBE(this.offset)
|
2830 | this.offset+=8
|
2831 | return t
|
2832 | case 204:t=this.buffer.readUInt8(this.offset)
|
2833 | this.offset+=1
|
2834 | return t
|
2835 | case 205:t=this.buffer.readUInt16BE(this.offset)
|
2836 | this.offset+=2
|
2837 | return t
|
2838 | case 206:t=this.buffer.readUInt32BE(this.offset)
|
2839 | this.offset+=4
|
2840 | return t
|
2841 | case 207:a=this.buffer.readUInt32BE(this.offset)*Math.pow(2,32)
|
2842 | o=this.buffer.readUInt32BE(this.offset+4)
|
2843 | this.offset+=8
|
2844 | return a+o
|
2845 | case 208:t=this.buffer.readInt8(this.offset)
|
2846 | this.offset+=1
|
2847 | return t
|
2848 | case 209:t=this.buffer.readInt16BE(this.offset)
|
2849 | this.offset+=2
|
2850 | return t
|
2851 | case 210:t=this.buffer.readInt32BE(this.offset)
|
2852 | this.offset+=4
|
2853 | return t
|
2854 | case 211:a=this.buffer.readInt32BE(this.offset)*Math.pow(2,32)
|
2855 | o=this.buffer.readUInt32BE(this.offset+4)
|
2856 | this.offset+=8
|
2857 | return a+o
|
2858 | case 212:i=this.buffer.readInt8(this.offset)
|
2859 | this.offset+=1
|
2860 | if(0===i){this.offset+=1
|
2861 | return}return[i,this.bin(1)]
|
2862 | case 213:i=this.buffer.readInt8(this.offset)
|
2863 | this.offset+=1
|
2864 | return[i,this.bin(2)]
|
2865 | case 214:i=this.buffer.readInt8(this.offset)
|
2866 | this.offset+=1
|
2867 | return[i,this.bin(4)]
|
2868 | case 215:i=this.buffer.readInt8(this.offset)
|
2869 | this.offset+=1
|
2870 | if(0===i){a=this.buffer.readInt32BE(this.offset)*Math.pow(2,32)
|
2871 | o=this.buffer.readUInt32BE(this.offset+4)
|
2872 | this.offset+=8
|
2873 | return new Date(a+o)}return[i,this.bin(8)]
|
2874 | case 216:i=this.buffer.readInt8(this.offset)
|
2875 | this.offset+=1
|
2876 | return[i,this.bin(16)]
|
2877 | case 217:n=this.buffer.readUInt8(this.offset)
|
2878 | this.offset+=1
|
2879 | return this.str(n)
|
2880 | case 218:n=this.buffer.readUInt16BE(this.offset)
|
2881 | this.offset+=2
|
2882 | return this.str(n)
|
2883 | case 219:n=this.buffer.readUInt32BE(this.offset)
|
2884 | this.offset+=4
|
2885 | return this.str(n)
|
2886 | case 220:n=this.buffer.readUInt16BE(this.offset)
|
2887 | this.offset+=2
|
2888 | return this.array(n)
|
2889 | case 221:n=this.buffer.readUInt32BE(this.offset)
|
2890 | this.offset+=4
|
2891 | return this.array(n)
|
2892 | case 222:n=this.buffer.readUInt16BE(this.offset)
|
2893 | this.offset+=2
|
2894 | return this.map(n)
|
2895 | case 223:n=this.buffer.readUInt32BE(this.offset)
|
2896 | this.offset+=4
|
2897 | return this.map(n)}throw new Error("Could not parse")}
|
2898 | e.exports=function(e){var t=new i(e)
|
2899 | var n=t.parse()
|
2900 | if(t.offset!==e.length)throw new Error(e.length-t.offset+" trailing bytes")
|
2901 | return n}},function(e,t,n){"use strict"
|
2902 | var i=32
|
2903 | function a(e,t,n){var i=0
|
2904 | for(var a=0,o=n.length;a<o;a++)if((i=n.charCodeAt(a))<128)e[t++]=i
|
2905 | else if(i<2048){e[t++]=192|i>>6
|
2906 | e[t++]=128|63&i}else if(i<55296||i>=57344){e[t++]=224|i>>12
|
2907 | e[t++]=128|i>>6&63
|
2908 | e[t++]=128|63&i}else{a++
|
2909 | i=65536+((1023&i)<<10|1023&n.charCodeAt(a))
|
2910 | e[t++]=240|i>>18
|
2911 | e[t++]=128|i>>12&63
|
2912 | e[t++]=128|i>>6&63
|
2913 | e[t++]=128|63&i}}e.exports=function(e){var t=[]
|
2914 | var n=[]
|
2915 | var o=function e(t,n,a){var o=typeof a,s=0,r=0,c=0,p=0,l=0,u=0
|
2916 | if("string"===o){if((l=a.length>i?Buffer.byteLength(a):function(e){var t=0,n=0
|
2917 | for(var i=0,a=e.length;i<a;i++)if((t=e.charCodeAt(i))<128)n+=1
|
2918 | else if(t<2048)n+=2
|
2919 | else if(t<55296||t>=57344)n+=3
|
2920 | else{i++
|
2921 | n+=4}return n}(a))<32){t.push(160|l)
|
2922 | u=1}else if(l<256){t.push(217,l)
|
2923 | u=2}else if(l<65536){t.push(218,l>>8,l)
|
2924 | u=3}else{if(!(l<4294967296))throw new Error("String too long")
|
2925 | t.push(219,l>>24,l>>16,l>>8,l)
|
2926 | u=5}n.push({str:a,length:l,offset:t.length})
|
2927 | return u+l}if("number"===o){if(Math.floor(a)!==a||!isFinite(a)){t.push(203)
|
2928 | n.push({float:a,length:8,offset:t.length})
|
2929 | return 9}if(a>=0){if(a<128){t.push(a)
|
2930 | return 1}if(a<256){t.push(204,a)
|
2931 | return 2}if(a<65536){t.push(205,a>>8,a)
|
2932 | return 3}if(a<4294967296){t.push(206,a>>24,a>>16,a>>8,a)
|
2933 | return 5}c=a/Math.pow(2,32)>>0
|
2934 | p=a>>>0
|
2935 | t.push(207,c>>24,c>>16,c>>8,c,p>>24,p>>16,p>>8,p)
|
2936 | return 9}if(a>=-32){t.push(a)
|
2937 | return 1}if(a>=-128){t.push(208,a)
|
2938 | return 2}if(a>=-32768){t.push(209,a>>8,a)
|
2939 | return 3}if(a>=-2147483648){t.push(210,a>>24,a>>16,a>>8,a)
|
2940 | return 5}c=Math.floor(a/Math.pow(2,32))
|
2941 | p=a>>>0
|
2942 | t.push(211,c>>24,c>>16,c>>8,c,p>>24,p>>16,p>>8,p)
|
2943 | return 9}if("object"===o){if(null===a){t.push(192)
|
2944 | return 1}if(Array.isArray(a)){if((l=a.length)<16){t.push(144|l)
|
2945 | u=1}else if(l<65536){t.push(220,l>>8,l)
|
2946 | u=3}else{if(!(l<4294967296))throw new Error("Array too large")
|
2947 | t.push(221,l>>24,l>>16,l>>8,l)
|
2948 | u=5}for(s=0;s<l;s++)u+=e(t,n,a[s])
|
2949 | return u}if(a instanceof Date){var d=a.getTime()
|
2950 | c=Math.floor(d/Math.pow(2,32))
|
2951 | p=d>>>0
|
2952 | t.push(215,0,c>>24,c>>16,c>>8,c,p>>24,p>>16,p>>8,p)
|
2953 | return 10}if(a instanceof Buffer){if((l=a.length)<256){t.push(196,l)
|
2954 | u=2}else if(l<65536){t.push(197,l>>8,l)
|
2955 | u=3}else{if(!(l<4294967296))throw new Error("Buffer too large")
|
2956 | t.push(198,l>>24,l>>16,l>>8,l)
|
2957 | u=5}n.push({bin:a,length:l,offset:t.length})
|
2958 | return u+l}if(a instanceof ArrayBuffer||ArrayBuffer.isView(a)){var f=a.buffer||a
|
2959 | if((l=f.byteLength)<256){t.push(199,l,0)
|
2960 | u=3}else if(l<65536){t.push(200,l>>8,l,0)
|
2961 | u=4}else{if(!(l<4294967296))throw new Error("ArrayBuffer too large")
|
2962 | t.push(201,l>>24,l>>16,l>>8,l,0)
|
2963 | u=6}n.push({arraybuffer:f,length:l,offset:t.length})
|
2964 | return u+l}if("function"==typeof a.toJSON)return e(t,n,a.toJSON())
|
2965 | var h=[],m=""
|
2966 | var v=Object.keys(a)
|
2967 | for(s=0,r=v.length;s<r;s++)"function"!=typeof a[m=v[s]]&&h.push(m)
|
2968 | if((l=h.length)<16){t.push(128|l)
|
2969 | u=1}else if(l<65536){t.push(222,l>>8,l)
|
2970 | u=3}else{if(!(l<4294967296))throw new Error("Object too large")
|
2971 | t.push(223,l>>24,l>>16,l>>8,l)
|
2972 | u=5}for(s=0;s<l;s++){u+=e(t,n,m=h[s])
|
2973 | u+=e(t,n,a[m])}return u}if("boolean"===o){t.push(a?195:194)
|
2974 | return 1}if("undefined"===o){t.push(212,0,0)
|
2975 | return 3}throw new Error("Could not encode")}(t,n,e)
|
2976 | var s=new Buffer(o)
|
2977 | var r=0
|
2978 | var c=0
|
2979 | var p=-1
|
2980 | n.length>0&&(p=n[0].offset)
|
2981 | var l,u=0,d=0
|
2982 | for(var f=0,h=t.length;f<h;f++){s[c+f]=t[f]
|
2983 | if(f+1===p){u=(l=n[r]).length
|
2984 | d=c+p
|
2985 | if(l.bin)if(u>i)l.bin.copy(s,d,0,u)
|
2986 | else{var m=l.bin
|
2987 | for(var v=0;v<u;v++)s[d+v]=m[v]}else if(l.str)u>i?s.write(l.str,d,u,"utf8"):a(s,d,l.str)
|
2988 | else if(void 0!==l.float)s.writeDoubleBE(l.float,d)
|
2989 | else if(l.arraybuffer){var g=new Uint8Array(l.arraybuffer)
|
2990 | for(var y=0;y<u;y++)s[d+y]=g[y]}c+=u
|
2991 | n[++r]&&(p=n[r].offset)}}return s}},function(e,t,n){t.encode=n(60)
|
2992 | t.decode=n(59)},function(e,t,n){"use strict"
|
2993 | var i=n(28)
|
2994 | var a=n(20)
|
2995 | var o=n(13).RedisClient
|
2996 | var s=n(11)
|
2997 | var r=function(){try{Object.defineProperty(function(){},"name",{value:"foobar"})
|
2998 | return!0}catch(e){return!1}}()
|
2999 | var c=function(e){var t=e.replace(/(?:^([0-9])|[^a-zA-Z0-9_$])/g,"_$1")
|
3000 | if(!o.prototype[e]){o.prototype[e.toUpperCase()]=o.prototype[e]=function(){var t
|
3001 | var n=arguments.length
|
3002 | var i
|
3003 | var a=0
|
3004 | if(Array.isArray(arguments[0])){t=arguments[0]
|
3005 | 2===n&&(i=arguments[1])}else if(n>1&&Array.isArray(arguments[1])){3===n&&(i=arguments[2])
|
3006 | n=arguments[1].length;(t=new Array(n+1))[0]=arguments[0]
|
3007 | for(;a<n;a+=1)t[a+1]=arguments[1][a]}else{0===n||"function"!=typeof arguments[n-1]&&void 0!==arguments[n-1]||(i=arguments[--n])
|
3008 | t=new Array(n)
|
3009 | for(;a<n;a+=1)t[a]=arguments[a]}return this.internal_send_command(new s(e,t,i))}
|
3010 | t!==e&&(o.prototype[t.toUpperCase()]=o.prototype[t]=o.prototype[e])
|
3011 | r&&Object.defineProperty(o.prototype[e],"name",{value:t})}if(!a.prototype[e]){a.prototype[e.toUpperCase()]=a.prototype[e]=function(){var t
|
3012 | var n=arguments.length
|
3013 | var i
|
3014 | var a=0
|
3015 | if(Array.isArray(arguments[0])){t=arguments[0]
|
3016 | 2===n&&(i=arguments[1])}else if(n>1&&Array.isArray(arguments[1])){3===n&&(i=arguments[2])
|
3017 | n=arguments[1].length;(t=new Array(n+1))[0]=arguments[0]
|
3018 | for(;a<n;a+=1)t[a+1]=arguments[1][a]}else{0===n||"function"!=typeof arguments[n-1]&&void 0!==arguments[n-1]||(i=arguments[--n])
|
3019 | t=new Array(n)
|
3020 | for(;a<n;a+=1)t[a]=arguments[a]}this.queue.push(new s(e,t,i))
|
3021 | return this}
|
3022 | t!==e&&(a.prototype[t.toUpperCase()]=a.prototype[t]=a.prototype[e])
|
3023 | r&&Object.defineProperty(a.prototype[e],"name",{value:t})}}
|
3024 | i.list.forEach(c)
|
3025 | e.exports=c},function(e,t,n){"use strict"
|
3026 | var i=n(12)
|
3027 | var a=n(21)
|
3028 | var o=n(13).RedisClient
|
3029 | var s=n(11)
|
3030 | var r=function(){}
|
3031 | o.prototype.send_command=o.prototype.sendCommand=function(e,t,n){if("string"!=typeof e)throw new TypeError('Wrong input type "'+(null!==e&&void 0!==e?e.constructor.name:e)+'" for command name')
|
3032 | e=e.toLowerCase()
|
3033 | if(!Array.isArray(t))if(void 0===t||null===t)t=[]
|
3034 | else{if("function"!=typeof t||void 0!==n)throw new TypeError('Wrong input type "'+t.constructor.name+'" for args')
|
3035 | n=t
|
3036 | t=[]}if("function"!=typeof n&&void 0!==n)throw new TypeError('Wrong input type "'+(null!==n?n.constructor.name:"null")+'" for callback function')
|
3037 | if("multi"===e||"function"!=typeof this[e])return this.internal_send_command(new s(e,t,n))
|
3038 | "function"==typeof n&&(t=t.concat([n]))
|
3039 | return this[e].apply(this,t)}
|
3040 | o.prototype.end=function(e){e?this.flush_and_error({message:"Connection forcefully ended and command aborted.",code:"NR_CLOSED"}):0===arguments.length&&this.warn("Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on.\nPlease check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush.")
|
3041 | if(this.retry_timer){clearTimeout(this.retry_timer)
|
3042 | this.retry_timer=null}this.stream.removeAllListeners()
|
3043 | this.stream.on("error",r)
|
3044 | this.connected=!1
|
3045 | this.ready=!1
|
3046 | this.closing=!0
|
3047 | return this.stream.destroySoon()}
|
3048 | o.prototype.unref=function(){if(this.connected){a("Unref'ing the socket connection")
|
3049 | this.stream.unref()}else{a("Not connected yet, will unref later")
|
3050 | this.once("connect",function(){this.unref()})}}
|
3051 | o.prototype.duplicate=function(e,t){if("function"==typeof e){t=e
|
3052 | e=null}var n=i.clone(this.options)
|
3053 | e=i.clone(e)
|
3054 | for(var a in e)n[a]=e[a]
|
3055 | var s=new o(n)
|
3056 | s.selected_db=this.selected_db
|
3057 | if("function"!=typeof t)return s
|
3058 | var r=function(e){t(e)
|
3059 | s.end(!0)}
|
3060 | s.once("ready",function(){t(null,s)
|
3061 | s.removeAllListeners(r)})
|
3062 | s.once("error",r)}},function(e,t,n){"use strict"
|
3063 | var i=n(12)
|
3064 | var a=n(21)
|
3065 | var o=n(20)
|
3066 | var s=n(11)
|
3067 | var r=/no password is set/
|
3068 | var c=/LOADING/
|
3069 | var p=n(13).RedisClient
|
3070 | p.prototype.multi=p.prototype.MULTI=function(e){var t=new o(this,e)
|
3071 | t.exec=t.EXEC=t.exec_transaction
|
3072 | return t}
|
3073 | p.prototype.batch=p.prototype.BATCH=function(e){return new o(this,e)}
|
3074 | function l(e,t,n){return function(a,o){null===a&&(e.selected_db=t)
|
3075 | i.callback_or_emit(e,n,a,o)}}p.prototype.select=p.prototype.SELECT=function(e,t){return this.internal_send_command(new s("select",[e],l(this,e,t)))}
|
3076 | o.prototype.select=o.prototype.SELECT=function(e,t){this.queue.push(new s("select",[e],l(this._client,e,t)))
|
3077 | return this}
|
3078 | p.prototype.monitor=p.prototype.MONITOR=function(e){var t=this
|
3079 | return this.internal_send_command(new s("monitor",[],e,function(){t.monitoring=!0}))}
|
3080 | o.prototype.monitor=o.prototype.MONITOR=function(e){if(this.exec!==this.exec_transaction){var t=this
|
3081 | this.queue.push(new s("monitor",[],e,function(){t._client.monitoring=!0}))
|
3082 | return this}this.monitoring=!0
|
3083 | return this}
|
3084 | function u(e,t){return function(n,a){if(n&&"NR_CLOSED"===n.code){n=null
|
3085 | a="OK"}i.callback_or_emit(e,t,n,a)
|
3086 | e.stream.writable&&e.stream.destroy()}}p.prototype.QUIT=p.prototype.quit=function(e){var t=this.internal_send_command(new s("quit",[],u(this,e)))
|
3087 | this.closing=!0
|
3088 | this.ready=!1
|
3089 | return t}
|
3090 | o.prototype.QUIT=o.prototype.quit=function(e){var t=this._client
|
3091 | this.queue.push(new s("quit",[],u(t,e),function(){t.closing=!0
|
3092 | t.ready=!1}))
|
3093 | return this}
|
3094 | function d(e,t){return function(n,a){if(a){var o={}
|
3095 | var s=a.toString().split("\r\n")
|
3096 | var r,c,p
|
3097 | for(var l=0;l<s.length;l++)if((c=s[l].split(":"))[1])if(0===c[0].indexOf("db")){p=c[1].split(",")
|
3098 | o[c[0]]={}
|
3099 | for(;r=p.pop();){r=r.split("=")
|
3100 | o[c[0]][r[0]]=+r[1]}}else o[c[0]]=c[1]
|
3101 | o.versions=[]
|
3102 | o.redis_version&&o.redis_version.split(".").forEach(function(e){o.versions.push(+e)})
|
3103 | e.server_info=o}else e.server_info={}
|
3104 | i.callback_or_emit(e,t,n,a)}}p.prototype.info=p.prototype.INFO=function(e,t){var n=[]
|
3105 | "function"==typeof e?t=e:void 0!==e&&(n=Array.isArray(e)?e:[e])
|
3106 | return this.internal_send_command(new s("info",n,d(this,t)))}
|
3107 | o.prototype.info=o.prototype.INFO=function(e,t){var n=[]
|
3108 | "function"==typeof e?t=e:void 0!==e&&(n=Array.isArray(e)?e:[e])
|
3109 | this.queue.push(new s("info",n,d(this._client,t)))
|
3110 | return this}
|
3111 | function f(e,t,n){return function(o,s){if(o)if(r.test(o.message)){e.warn("Warning: Redis server does not require a password, but a password was supplied.")
|
3112 | o=null
|
3113 | s="OK"}else if(c.test(o.message)){a("Redis still loading, trying to authenticate later")
|
3114 | setTimeout(function(){e.auth(t,n)},100)
|
3115 | return}i.callback_or_emit(e,n,o,s)}}p.prototype.auth=p.prototype.AUTH=function(e,t){a("Sending auth to "+this.address+" id "+this.connection_id)
|
3116 | this.auth_pass=e
|
3117 | var n=this.ready
|
3118 | this.ready=n||0===this.offline_queue.length
|
3119 | var i=this.internal_send_command(new s("auth",[e],f(this,e,t)))
|
3120 | this.ready=n
|
3121 | return i}
|
3122 | o.prototype.auth=o.prototype.AUTH=function(e,t){a("Sending auth to "+this.address+" id "+this.connection_id)
|
3123 | this.auth_pass=e
|
3124 | this.queue.push(new s("auth",[e],f(this._client,t)))
|
3125 | return this}
|
3126 | p.prototype.client=p.prototype.CLIENT=function(){var e,t,n=arguments.length,i=0
|
3127 | if(Array.isArray(arguments[0])){e=arguments[0]
|
3128 | t=arguments[1]}else if(Array.isArray(arguments[1])){3===n&&(t=arguments[2])
|
3129 | n=arguments[1].length;(e=new Array(n+1))[0]=arguments[0]
|
3130 | for(;i<n;i+=1)e[i+1]=arguments[1][i]}else{0===(n=arguments.length)||"function"!=typeof arguments[n-1]&&void 0!==arguments[n-1]||(t=arguments[--n])
|
3131 | e=new Array(n)
|
3132 | for(;i<n;i+=1)e[i]=arguments[i]}var a=this
|
3133 | var o=void 0
|
3134 | if(2===e.length&&"REPLY"===e[0].toString().toUpperCase()){var r=e[1].toString().toUpperCase()
|
3135 | "ON"!==r&&"OFF"!==r&&"SKIP"!==r||(o=function(){a.reply=r})}return this.internal_send_command(new s("client",e,t,o))}
|
3136 | o.prototype.client=o.prototype.CLIENT=function(){var e,t,n=arguments.length,i=0
|
3137 | if(Array.isArray(arguments[0])){e=arguments[0]
|
3138 | t=arguments[1]}else if(Array.isArray(arguments[1])){3===n&&(t=arguments[2])
|
3139 | n=arguments[1].length;(e=new Array(n+1))[0]=arguments[0]
|
3140 | for(;i<n;i+=1)e[i+1]=arguments[1][i]}else{0===(n=arguments.length)||"function"!=typeof arguments[n-1]&&void 0!==arguments[n-1]||(t=arguments[--n])
|
3141 | e=new Array(n)
|
3142 | for(;i<n;i+=1)e[i]=arguments[i]}var a=this._client
|
3143 | var o=void 0
|
3144 | if(2===e.length&&"REPLY"===e[0].toString().toUpperCase()){var r=e[1].toString().toUpperCase()
|
3145 | "ON"!==r&&"OFF"!==r&&"SKIP"!==r||(o=function(){a.reply=r})}this.queue.push(new s("client",e,t,o))
|
3146 | return this}
|
3147 | p.prototype.hmset=p.prototype.HMSET=function(){var e,t,n=arguments.length,i=0
|
3148 | if(Array.isArray(arguments[0])){e=arguments[0]
|
3149 | t=arguments[1]}else if(Array.isArray(arguments[1])){3===n&&(t=arguments[2])
|
3150 | n=arguments[1].length;(e=new Array(n+1))[0]=arguments[0]
|
3151 | for(;i<n;i+=1)e[i+1]=arguments[1][i]}else if("object"!=typeof arguments[1]||2!==arguments.length&&(3!==arguments.length||"function"!=typeof arguments[2]&&void 0!==arguments[2])){0===(n=arguments.length)||"function"!=typeof arguments[n-1]&&void 0!==arguments[n-1]||(t=arguments[--n])
|
3152 | e=new Array(n)
|
3153 | for(;i<n;i+=1)e[i]=arguments[i]}else{e=[arguments[0]]
|
3154 | for(var a in arguments[1])e.push(a,arguments[1][a])
|
3155 | t=arguments[2]}return this.internal_send_command(new s("hmset",e,t))}
|
3156 | o.prototype.hmset=o.prototype.HMSET=function(){var e,t,n=arguments.length,i=0
|
3157 | if(Array.isArray(arguments[0])){e=arguments[0]
|
3158 | t=arguments[1]}else if(Array.isArray(arguments[1])){3===n&&(t=arguments[2])
|
3159 | n=arguments[1].length;(e=new Array(n+1))[0]=arguments[0]
|
3160 | for(;i<n;i+=1)e[i+1]=arguments[1][i]}else if("object"!=typeof arguments[1]||2!==arguments.length&&(3!==arguments.length||"function"!=typeof arguments[2]&&void 0!==arguments[2])){0===(n=arguments.length)||"function"!=typeof arguments[n-1]&&void 0!==arguments[n-1]||(t=arguments[--n])
|
3161 | e=new Array(n)
|
3162 | for(;i<n;i+=1)e[i]=arguments[i]}else{e=[arguments[0]]
|
3163 | for(var a in arguments[1])e.push(a,arguments[1][a])
|
3164 | t=arguments[2]}this.queue.push(new s("hmset",e,t))
|
3165 | return this}
|
3166 | p.prototype.subscribe=p.prototype.SUBSCRIBE=function(){var e,t,n=arguments.length,i=0
|
3167 | if(Array.isArray(arguments[0])){e=arguments[0].slice(0)
|
3168 | t=arguments[1]}else{0===(n=arguments.length)||"function"!=typeof arguments[n-1]&&void 0!==arguments[n-1]||(t=arguments[--n])
|
3169 | e=new Array(n)
|
3170 | for(;i<n;i+=1)e[i]=arguments[i]}var a=this
|
3171 | return this.internal_send_command(new s("subscribe",e,t,function(){a.pub_sub_mode=a.pub_sub_mode||a.command_queue.length+1}))}
|
3172 | o.prototype.subscribe=o.prototype.SUBSCRIBE=function(){var e,t,n=arguments.length,i=0
|
3173 | if(Array.isArray(arguments[0])){e=arguments[0].slice(0)
|
3174 | t=arguments[1]}else{0===(n=arguments.length)||"function"!=typeof arguments[n-1]&&void 0!==arguments[n-1]||(t=arguments[--n])
|
3175 | e=new Array(n)
|
3176 | for(;i<n;i+=1)e[i]=arguments[i]}var a=this._client
|
3177 | this.queue.push(new s("subscribe",e,t,function(){a.pub_sub_mode=a.pub_sub_mode||a.command_queue.length+1}))
|
3178 | return this}
|
3179 | p.prototype.unsubscribe=p.prototype.UNSUBSCRIBE=function(){var e,t,n=arguments.length,i=0
|
3180 | if(Array.isArray(arguments[0])){e=arguments[0].slice(0)
|
3181 | t=arguments[1]}else{0===(n=arguments.length)||"function"!=typeof arguments[n-1]&&void 0!==arguments[n-1]||(t=arguments[--n])
|
3182 | e=new Array(n)
|
3183 | for(;i<n;i+=1)e[i]=arguments[i]}var a=this
|
3184 | return this.internal_send_command(new s("unsubscribe",e,t,function(){a.pub_sub_mode=a.pub_sub_mode||a.command_queue.length+1}))}
|
3185 | o.prototype.unsubscribe=o.prototype.UNSUBSCRIBE=function(){var e,t,n=arguments.length,i=0
|
3186 | if(Array.isArray(arguments[0])){e=arguments[0].slice(0)
|
3187 | t=arguments[1]}else{0===(n=arguments.length)||"function"!=typeof arguments[n-1]&&void 0!==arguments[n-1]||(t=arguments[--n])
|
3188 | e=new Array(n)
|
3189 | for(;i<n;i+=1)e[i]=arguments[i]}var a=this._client
|
3190 | this.queue.push(new s("unsubscribe",e,t,function(){a.pub_sub_mode=a.pub_sub_mode||a.command_queue.length+1}))
|
3191 | return this}
|
3192 | p.prototype.psubscribe=p.prototype.PSUBSCRIBE=function(){var e,t,n=arguments.length,i=0
|
3193 | if(Array.isArray(arguments[0])){e=arguments[0].slice(0)
|
3194 | t=arguments[1]}else{0===(n=arguments.length)||"function"!=typeof arguments[n-1]&&void 0!==arguments[n-1]||(t=arguments[--n])
|
3195 | e=new Array(n)
|
3196 | for(;i<n;i+=1)e[i]=arguments[i]}var a=this
|
3197 | return this.internal_send_command(new s("psubscribe",e,t,function(){a.pub_sub_mode=a.pub_sub_mode||a.command_queue.length+1}))}
|
3198 | o.prototype.psubscribe=o.prototype.PSUBSCRIBE=function(){var e,t,n=arguments.length,i=0
|
3199 | if(Array.isArray(arguments[0])){e=arguments[0].slice(0)
|
3200 | t=arguments[1]}else{0===(n=arguments.length)||"function"!=typeof arguments[n-1]&&void 0!==arguments[n-1]||(t=arguments[--n])
|
3201 | e=new Array(n)
|
3202 | for(;i<n;i+=1)e[i]=arguments[i]}var a=this._client
|
3203 | this.queue.push(new s("psubscribe",e,t,function(){a.pub_sub_mode=a.pub_sub_mode||a.command_queue.length+1}))
|
3204 | return this}
|
3205 | p.prototype.punsubscribe=p.prototype.PUNSUBSCRIBE=function(){var e,t,n=arguments.length,i=0
|
3206 | if(Array.isArray(arguments[0])){e=arguments[0].slice(0)
|
3207 | t=arguments[1]}else{0===(n=arguments.length)||"function"!=typeof arguments[n-1]&&void 0!==arguments[n-1]||(t=arguments[--n])
|
3208 | e=new Array(n)
|
3209 | for(;i<n;i+=1)e[i]=arguments[i]}var a=this
|
3210 | return this.internal_send_command(new s("punsubscribe",e,t,function(){a.pub_sub_mode=a.pub_sub_mode||a.command_queue.length+1}))}
|
3211 | o.prototype.punsubscribe=o.prototype.PUNSUBSCRIBE=function(){var e,t,n=arguments.length,i=0
|
3212 | if(Array.isArray(arguments[0])){e=arguments[0].slice(0)
|
3213 | t=arguments[1]}else{0===(n=arguments.length)||"function"!=typeof arguments[n-1]&&void 0!==arguments[n-1]||(t=arguments[--n])
|
3214 | e=new Array(n)
|
3215 | for(;i<n;i+=1)e[i]=arguments[i]}var a=this._client
|
3216 | this.queue.push(new s("punsubscribe",e,t,function(){a.pub_sub_mode=a.pub_sub_mode||a.command_queue.length+1}))
|
3217 | return this}},function(e,t,n){"use strict"
|
3218 | var i=n(12)
|
3219 | var a=n(3)
|
3220 | e.exports=function(e,t,n){if("number"==typeof e||"string"==typeof e&&/^\d+$/.test(e)){var o
|
3221 | if("string"==typeof t)o=t
|
3222 | else{if(n&&t)throw new TypeError("Unknown type of connection in createClient()")
|
3223 | n=n||t}(n=i.clone(n)).host=o||n.host
|
3224 | n.port=e}else if("string"==typeof e||e&&e.url){n=i.clone(e.url?e:t||n)
|
3225 | var s=e.url||e
|
3226 | var r=a.parse(s,!0,!0)
|
3227 | if(r.slashes){r.auth&&(n.password=r.auth.split(":")[1])
|
3228 | r.protocol&&"redis:"!==r.protocol&&console.warn('node_redis: WARNING: You passed "'+r.protocol.substring(0,r.protocol.length-1)+'" as protocol instead of the "redis" protocol!')
|
3229 | r.pathname&&"/"!==r.pathname&&(n.db=r.pathname.substr(1))
|
3230 | r.hostname&&(n.host=r.hostname)
|
3231 | r.port&&(n.port=r.port)
|
3232 | if(""!==r.search){var c
|
3233 | for(c in r.query){if(c in n){if(n[c]!==r.query[c])throw new RangeError("The "+c+" option is added twice and does not match")
|
3234 | console.warn("node_redis: WARNING: You passed the "+c+" option twice!")}n[c]=r.query[c]}}}else{if(r.hostname)throw new RangeError('The redis url must begin with slashes "//" or contain slashes after the redis protocol')
|
3235 | n.path=s}}else if("object"==typeof e||void 0===e){(n=i.clone(e||n)).host=n.host||t
|
3236 | if(e&&1!==arguments.length)throw new TypeError("To many arguments passed to createClient. Please only pass the options object")}if(!n)throw new TypeError("Unknown type of connection in createClient()")
|
3237 | return n}},function(e){e.exports={append:{arity:3,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},asking:{arity:1,flags:["fast"],keyStart:0,keyStop:0,step:0},auth:{arity:2,flags:["noscript","loading","stale","fast"],keyStart:0,keyStop:0,step:0},bgrewriteaof:{arity:1,flags:["admin"],keyStart:0,keyStop:0,step:0},bgsave:{arity:-1,flags:["admin"],keyStart:0,keyStop:0,step:0},bitcount:{arity:-2,flags:["readonly"],keyStart:1,keyStop:1,step:1},bitfield:{arity:-2,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},bitop:{arity:-4,flags:["write","denyoom"],keyStart:2,keyStop:-1,step:1},bitpos:{arity:-3,flags:["readonly"],keyStart:1,keyStop:1,step:1},blpop:{arity:-3,flags:["write","noscript"],keyStart:1,keyStop:-2,step:1},brpop:{arity:-3,flags:["write","noscript"],keyStart:1,keyStop:-2,step:1},brpoplpush:{arity:4,flags:["write","denyoom","noscript"],keyStart:1,keyStop:2,step:1},client:{arity:-2,flags:["admin","noscript"],keyStart:0,keyStop:0,step:0},cluster:{arity:-2,flags:["admin"],keyStart:0,keyStop:0,step:0},command:{arity:1,flags:["loading","stale"],keyStart:0,keyStop:0,step:0},config:{arity:-2,flags:["admin","loading","stale"],keyStart:0,keyStop:0,step:0},dbsize:{arity:1,flags:["readonly","fast"],keyStart:0,keyStop:0,step:0},debug:{arity:-1,flags:["admin","noscript"],keyStart:0,keyStop:0,step:0},decr:{arity:2,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},decrby:{arity:3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},del:{arity:-2,flags:["write"],keyStart:1,keyStop:-1,step:1},discard:{arity:1,flags:["noscript","fast"],keyStart:0,keyStop:0,step:0},dump:{arity:2,flags:["readonly"],keyStart:1,keyStop:1,step:1},echo:{arity:2,flags:["fast"],keyStart:0,keyStop:0,step:0},eval:{arity:-3,flags:["noscript","movablekeys"],keyStart:0,keyStop:0,step:0},evalsha:{arity:-3,flags:["noscript","movablekeys"],keyStart:0,keyStop:0,step:0},exec:{arity:1,flags:["noscript","skip_monitor"],keyStart:0,keyStop:0,step:0},exists:{arity:-2,flags:["readonly","fast"],keyStart:1,keyStop:-1,step:1},expire:{arity:3,flags:["write","fast"],keyStart:1,keyStop:1,step:1},expireat:{arity:3,flags:["write","fast"],keyStart:1,keyStop:1,step:1},flushall:{arity:-1,flags:["write"],keyStart:0,keyStop:0,step:0},flushdb:{arity:-1,flags:["write"],keyStart:0,keyStop:0,step:0},geoadd:{arity:-5,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},geodist:{arity:-4,flags:["readonly"],keyStart:1,keyStop:1,step:1},geohash:{arity:-2,flags:["readonly"],keyStart:1,keyStop:1,step:1},geopos:{arity:-2,flags:["readonly"],keyStart:1,keyStop:1,step:1},georadius:{arity:-6,flags:["write","movablekeys"],keyStart:1,keyStop:1,step:1},georadius_ro:{arity:-6,flags:["readonly","movablekeys"],keyStart:1,keyStop:1,step:1},georadiusbymember:{arity:-5,flags:["write","movablekeys"],keyStart:1,keyStop:1,step:1},georadiusbymember_ro:{arity:-5,flags:["readonly","movablekeys"],keyStart:1,keyStop:1,step:1},get:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},getbit:{arity:3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},getrange:{arity:4,flags:["readonly"],keyStart:1,keyStop:1,step:1},getset:{arity:3,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},hdel:{arity:-3,flags:["write","fast"],keyStart:1,keyStop:1,step:1},hexists:{arity:3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},hget:{arity:3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},hgetall:{arity:2,flags:["readonly"],keyStart:1,keyStop:1,step:1},hincrby:{arity:4,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},hincrbyfloat:{arity:4,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},hkeys:{arity:2,flags:["readonly","sort_for_script"],keyStart:1,keyStop:1,step:1},hlen:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},hmget:{arity:-3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},hmset:{arity:-4,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},"host:":{arity:-1,flags:["loading","stale"],keyStart:0,keyStop:0,step:0},hscan:{arity:-3,flags:["readonly","random"],keyStart:1,keyStop:1,step:1},hset:{arity:-4,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},hsetnx:{arity:4,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},hstrlen:{arity:3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},hvals:{arity:2,flags:["readonly","sort_for_script"],keyStart:1,keyStop:1,step:1},incr:{arity:2,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},incrby:{arity:3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},incrbyfloat:{arity:3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},info:{arity:-1,flags:["loading","stale"],keyStart:0,keyStop:0,step:0},keys:{arity:2,flags:["readonly","sort_for_script"],keyStart:0,keyStop:0,step:0},lastsave:{arity:1,flags:["random","fast"],keyStart:0,keyStop:0,step:0},latency:{arity:-2,flags:["admin","noscript","loading","stale"],keyStart:0,keyStop:0,step:0},lindex:{arity:3,flags:["readonly"],keyStart:1,keyStop:1,step:1},linsert:{arity:5,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},llen:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},lpop:{arity:2,flags:["write","fast"],keyStart:1,keyStop:1,step:1},lpush:{arity:-3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},lpushx:{arity:-3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},lrange:{arity:4,flags:["readonly"],keyStart:1,keyStop:1,step:1},lrem:{arity:4,flags:["write"],keyStart:1,keyStop:1,step:1},lset:{arity:4,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},ltrim:{arity:4,flags:["write"],keyStart:1,keyStop:1,step:1},memory:{arity:-2,flags:["readonly"],keyStart:0,keyStop:0,step:0},mget:{arity:-2,flags:["readonly","fast"],keyStart:1,keyStop:-1,step:1},migrate:{arity:-6,flags:["write","movablekeys"],keyStart:0,keyStop:0,step:0},module:{arity:-2,flags:["admin","noscript"],keyStart:0,keyStop:0,step:0},monitor:{arity:1,flags:["admin","noscript"],keyStart:0,keyStop:0,step:0},move:{arity:3,flags:["write","fast"],keyStart:1,keyStop:1,step:1},mset:{arity:-3,flags:["write","denyoom"],keyStart:1,keyStop:-1,step:2},msetnx:{arity:-3,flags:["write","denyoom"],keyStart:1,keyStop:-1,step:2},multi:{arity:1,flags:["noscript","fast"],keyStart:0,keyStop:0,step:0},object:{arity:-2,flags:["readonly"],keyStart:2,keyStop:2,step:2},persist:{arity:2,flags:["write","fast"],keyStart:1,keyStop:1,step:1},pexpire:{arity:3,flags:["write","fast"],keyStart:1,keyStop:1,step:1},pexpireat:{arity:3,flags:["write","fast"],keyStart:1,keyStop:1,step:1},pfadd:{arity:-2,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},pfcount:{arity:-2,flags:["readonly"],keyStart:1,keyStop:-1,step:1},pfdebug:{arity:-3,flags:["write"],keyStart:0,keyStop:0,step:0},pfmerge:{arity:-2,flags:["write","denyoom"],keyStart:1,keyStop:-1,step:1},pfselftest:{arity:1,flags:["admin"],keyStart:0,keyStop:0,step:0},ping:{arity:-1,flags:["stale","fast"],keyStart:0,keyStop:0,step:0},post:{arity:-1,flags:["loading","stale"],keyStart:0,keyStop:0,step:0},psetex:{arity:4,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},psubscribe:{arity:-2,flags:["pubsub","noscript","loading","stale"],keyStart:0,keyStop:0,step:0},psync:{arity:3,flags:["readonly","admin","noscript"],keyStart:0,keyStop:0,step:0},pttl:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},publish:{arity:3,flags:["pubsub","loading","stale","fast"],keyStart:0,keyStop:0,step:0},pubsub:{arity:-2,flags:["pubsub","random","loading","stale"],keyStart:0,keyStop:0,step:0},punsubscribe:{arity:-1,flags:["pubsub","noscript","loading","stale"],keyStart:0,keyStop:0,step:0},quit:{arity:1,flags:["loading","stale","readonly"],keyStart:0,keyStop:0,step:0},randomkey:{arity:1,flags:["readonly","random"],keyStart:0,keyStop:0,step:0},readonly:{arity:1,flags:["fast"],keyStart:0,keyStop:0,step:0},readwrite:{arity:1,flags:["fast"],keyStart:0,keyStop:0,step:0},rename:{arity:3,flags:["write"],keyStart:1,keyStop:2,step:1},renamenx:{arity:3,flags:["write","fast"],keyStart:1,keyStop:2,step:1},replconf:{arity:-1,flags:["admin","noscript","loading","stale"],keyStart:0,keyStop:0,step:0},restore:{arity:-4,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},"restore-asking":{arity:-4,flags:["write","denyoom","asking"],keyStart:1,keyStop:1,step:1},role:{arity:1,flags:["noscript","loading","stale"],keyStart:0,keyStop:0,step:0},rpop:{arity:2,flags:["write","fast"],keyStart:1,keyStop:1,step:1},rpoplpush:{arity:3,flags:["write","denyoom"],keyStart:1,keyStop:2,step:1},rpush:{arity:-3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},rpushx:{arity:-3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},sadd:{arity:-3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},save:{arity:1,flags:["admin","noscript"],keyStart:0,keyStop:0,step:0},scan:{arity:-2,flags:["readonly","random"],keyStart:0,keyStop:0,step:0},scard:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},script:{arity:-2,flags:["noscript"],keyStart:0,keyStop:0,step:0},sdiff:{arity:-2,flags:["readonly","sort_for_script"],keyStart:1,keyStop:-1,step:1},sdiffstore:{arity:-3,flags:["write","denyoom"],keyStart:1,keyStop:-1,step:1},select:{arity:2,flags:["loading","fast"],keyStart:0,keyStop:0,step:0},set:{arity:-3,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},setbit:{arity:4,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},setex:{arity:4,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},setnx:{arity:3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},setrange:{arity:4,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},shutdown:{arity:-1,flags:["admin","loading","stale"],keyStart:0,keyStop:0,step:0},sinter:{arity:-2,flags:["readonly","sort_for_script"],keyStart:1,keyStop:-1,step:1},sinterstore:{arity:-3,flags:["write","denyoom"],keyStart:1,keyStop:-1,step:1},sismember:{arity:3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},slaveof:{arity:3,flags:["admin","noscript","stale"],keyStart:0,keyStop:0,step:0},slowlog:{arity:-2,flags:["admin"],keyStart:0,keyStop:0,step:0},smembers:{arity:2,flags:["readonly","sort_for_script"],keyStart:1,keyStop:1,step:1},smove:{arity:4,flags:["write","fast"],keyStart:1,keyStop:2,step:1},sort:{arity:-2,flags:["write","denyoom","movablekeys"],keyStart:1,keyStop:1,step:1},spop:{arity:-2,flags:["write","random","fast"],keyStart:1,keyStop:1,step:1},srandmember:{arity:-2,flags:["readonly","random"],keyStart:1,keyStop:1,step:1},srem:{arity:-3,flags:["write","fast"],keyStart:1,keyStop:1,step:1},sscan:{arity:-3,flags:["readonly","random"],keyStart:1,keyStop:1,step:1},strlen:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},subscribe:{arity:-2,flags:["pubsub","noscript","loading","stale"],keyStart:0,keyStop:0,step:0},substr:{arity:4,flags:["readonly"],keyStart:1,keyStop:1,step:1},sunion:{arity:-2,flags:["readonly","sort_for_script"],keyStart:1,keyStop:-1,step:1},sunionstore:{arity:-3,flags:["write","denyoom"],keyStart:1,keyStop:-1,step:1},swapdb:{arity:3,flags:["write","fast"],keyStart:0,keyStop:0,step:0},sync:{arity:1,flags:["readonly","admin","noscript"],keyStart:0,keyStop:0,step:0},time:{arity:1,flags:["random","fast"],keyStart:0,keyStop:0,step:0},touch:{arity:-2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},ttl:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},type:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},unlink:{arity:-2,flags:["write","fast"],keyStart:1,keyStop:-1,step:1},unsubscribe:{arity:-1,flags:["pubsub","noscript","loading","stale"],keyStart:0,keyStop:0,step:0},unwatch:{arity:1,flags:["noscript","fast"],keyStart:0,keyStop:0,step:0},wait:{arity:3,flags:["noscript"],keyStart:0,keyStop:0,step:0},watch:{arity:-2,flags:["noscript","fast"],keyStart:1,keyStop:-1,step:1},zadd:{arity:-4,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},zcard:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},zcount:{arity:4,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},zincrby:{arity:4,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},zinterstore:{arity:-4,flags:["write","denyoom","movablekeys"],keyStart:0,keyStop:0,step:0},zlexcount:{arity:4,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},zrange:{arity:-4,flags:["readonly"],keyStart:1,keyStop:1,step:1},zrangebylex:{arity:-4,flags:["readonly"],keyStart:1,keyStop:1,step:1},zrangebyscore:{arity:-4,flags:["readonly"],keyStart:1,keyStop:1,step:1},zrank:{arity:3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},zrem:{arity:-3,flags:["write","fast"],keyStart:1,keyStop:1,step:1},zremrangebylex:{arity:4,flags:["write"],keyStart:1,keyStop:1,step:1},zremrangebyrank:{arity:4,flags:["write"],keyStart:1,keyStop:1,step:1},zremrangebyscore:{arity:4,flags:["write"],keyStart:1,keyStop:1,step:1},zrevrange:{arity:-4,flags:["readonly"],keyStart:1,keyStop:1,step:1},zrevrangebylex:{arity:-4,flags:["readonly"],keyStart:1,keyStop:1,step:1},zrevrangebyscore:{arity:-4,flags:["readonly"],keyStart:1,keyStop:1,step:1},zrevrank:{arity:3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},zscan:{arity:-3,flags:["readonly","random"],keyStart:1,keyStop:1,step:1},zscore:{arity:3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},zunionstore:{arity:-4,flags:["write","denyoom","movablekeys"],keyStart:0,keyStop:0,step:0}}},function(e,t){e.exports=hiredis},function(e,t,n){"use strict"
|
3238 | var i=n(67)
|
3239 | var a=n(22)
|
3240 | var o=n(29)
|
3241 | function s(e,t){try{return e.reader.get()}catch(n){e.reader=new i.Reader(e.options)
|
3242 | e.returnFatalError(new o(n.message,JSON.stringify(t),-1))}}function r(e){this.returnError=e.returnError
|
3243 | this.returnFatalError=e.returnFatalError||e.returnError
|
3244 | this.returnReply=e.returnReply
|
3245 | this.name="hiredis"
|
3246 | this.options={return_buffers:!!e.returnBuffers}
|
3247 | this.reader=new i.Reader(this.options)}r.prototype.execute=function(e){this.reader.feed(e)
|
3248 | var t=s(this,e)
|
3249 | for(;void 0!==t;){t&&"Error"===t.name?this.returnError(new a(t.message)):this.returnReply(t)
|
3250 | t=s(this,e)}}
|
3251 | r.prototype.reset=function(){this.reader=new i.Reader(this.options)}
|
3252 | e.exports=r},function(e,t){e.exports=require("string_decoder")},function(e,t,n){"use strict"
|
3253 | var i=new(0,n(69).StringDecoder)
|
3254 | var a=n(22)
|
3255 | var o=n(29)
|
3256 | var s=d(32768)
|
3257 | var r=0
|
3258 | var c=null
|
3259 | var p=0
|
3260 | var l=0
|
3261 | var u="function"==typeof Buffer.allocUnsafe
|
3262 | function d(e){return u?Buffer.allocUnsafe(e):new Buffer(e)}function f(e){var t=e.offset
|
3263 | var n=e.buffer.length-1
|
3264 | var i=0
|
3265 | var a=1
|
3266 | if(45===e.buffer[t]){a=-1
|
3267 | t++}for(;t<n;){var o=e.buffer[t++]
|
3268 | if(13===o){e.offset=t+1
|
3269 | return a*i}i=10*i+(o-48)}}function h(e,t,n){e.offset=n+2
|
3270 | return!0===e.optionReturnBuffers?e.buffer.slice(t,n):e.buffer.toString("utf-8",t,n)}function m(e){var t=e.offset
|
3271 | var n=t
|
3272 | var i=e.buffer
|
3273 | var a=i.length-1
|
3274 | for(;n<a;)if(13===i[n++])return h(e,t,n-1)}function v(e){var t=f(e)
|
3275 | if(void 0!==t)return t}function g(e,t,n){e.arrayCache.push(t)
|
3276 | e.arrayPos.push(n)}function y(e){var t=e.arrayCache.pop()
|
3277 | var n=e.arrayPos.pop()
|
3278 | if(e.arrayCache.length){var i=y(e)
|
3279 | if(!i){g(e,t,n)
|
3280 | return}t[n++]=i}return x(e,t,n)}function x(e,t,n){var i=e.buffer.length
|
3281 | for(;n<t.length;){var a=e.offset
|
3282 | if(e.offset>=i){g(e,t,n)
|
3283 | return}var o=b(e,e.buffer[e.offset++])
|
3284 | if(void 0===o){e.arrayCache.length||(e.offset=a)
|
3285 | g(e,t,n)
|
3286 | return}t[n]=o
|
3287 | n++}return t}function b(e,t){switch(t){case 36:return function(e){var t=v(e)
|
3288 | if(void 0!==t){if(-1===t)return null
|
3289 | var n=e.offset+t
|
3290 | if(!(n+2>e.buffer.length))return h(e,e.offset,n)
|
3291 | e.bigStrSize=n+2
|
3292 | e.bigOffset=e.offset
|
3293 | e.totalChunkSize=e.buffer.length
|
3294 | e.bufferCache.push(e.buffer)}}(e)
|
3295 | case 58:return function(e){return e.optionStringNumbers?function(e){var t=e.offset
|
3296 | var n=e.buffer.length-1
|
3297 | var i=0
|
3298 | var a=""
|
3299 | if(45===e.buffer[t]){a+="-"
|
3300 | t++}for(;t<n;){var o=e.buffer[t++]
|
3301 | if(13===o){e.offset=t+1
|
3302 | 0!==i&&(a+=i)
|
3303 | return a}if(i>429496728){a+=10*i+(o-48)
|
3304 | i=0}else 48===o&&0===i?a+=0:i=10*i+(o-48)}}(e):f(e)}(e)
|
3305 | case 43:return m(e)
|
3306 | case 42:return function(e){var t=v(e)
|
3307 | if(void 0!==t)return-1===t?null:x(e,new Array(t),0)}(e)
|
3308 | case 45:return function(e){var t=m(e)
|
3309 | if(void 0!==t){!0===e.optionReturnBuffers&&(t=t.toString())
|
3310 | return new a(t)}}(e)
|
3311 | default:return function(e,t){e.buffer=null
|
3312 | e.returnFatalError(t)}(e,new o("Protocol error, got "+JSON.stringify(String.fromCharCode(t))+" as reply type byte",JSON.stringify(e.buffer),e.offset))}}var w={returnError:"function",returnFatalError:"function",returnReply:"function",returnBuffers:"boolean",stringNumbers:"boolean",name:"string"}
|
3313 | function k(e){if(!(this instanceof k))return new k(e)
|
3314 | if(!e||!e.returnError||!e.returnReply)throw new TypeError("Please provide all return functions while initiating the parser")
|
3315 | for(var t in e)if(w.hasOwnProperty(t)&&typeof e[t]!==w[t])throw new TypeError('The options argument contains the property "'+t+'" that is either unknown or of a wrong type')
|
3316 | if("hiredis"===e.name)try{var i=n(68)
|
3317 | console.error(new TypeError("Using hiredis is discouraged. Please use the faster JS parser by removing the name option.").stack.replace("Error","Warning"))
|
3318 | return new i(e)}catch(e){console.error(new TypeError("Hiredis is not installed. Please remove the `name` option. The (faster) JS parser is used instead.").stack.replace("Error","Warning"))}this.optionReturnBuffers=!!e.returnBuffers
|
3319 | this.optionStringNumbers=!!e.stringNumbers
|
3320 | this.returnError=e.returnError
|
3321 | this.returnFatalError=e.returnFatalError||e.returnError
|
3322 | this.returnReply=e.returnReply
|
3323 | this.name="javascript"
|
3324 | this.reset()}k.prototype.reset=function(){this.offset=0
|
3325 | this.buffer=null
|
3326 | this.bigStrSize=0
|
3327 | this.bigOffset=0
|
3328 | this.totalChunkSize=0
|
3329 | this.bufferCache=[]
|
3330 | this.arrayCache=[]
|
3331 | this.arrayPos=[]}
|
3332 | k.prototype.setReturnBuffers=function(e){if("boolean"!=typeof e)throw new TypeError("The returnBuffers argument has to be a boolean")
|
3333 | this.optionReturnBuffers=e}
|
3334 | k.prototype.setStringNumbers=function(e){if("boolean"!=typeof e)throw new TypeError("The stringNumbers argument has to be a boolean")
|
3335 | this.optionStringNumbers=e}
|
3336 | function _(){if(s.length>51200)if(1===p||l>2*p){var e=Math.floor(s.length/10)
|
3337 | r<=e?r=0:r-=e
|
3338 | s=s.slice(e,s.length)}else{l++
|
3339 | p--}else{clearInterval(c)
|
3340 | p=0
|
3341 | l=0
|
3342 | c=null}}function S(e){var t=e.bufferCache
|
3343 | var n=t.length
|
3344 | var i=e.bigStrSize-e.bigOffset-2
|
3345 | var a=e.bigStrSize-e.totalChunkSize
|
3346 | e.offset=a
|
3347 | if(a<=2){if(2===n)return t[0].slice(e.bigOffset,t[0].length+a-2)
|
3348 | n--
|
3349 | a=t[t.length-2].length+a}!function(e){if(s.length<e+r){r>116391936&&(r=52428800)
|
3350 | s=d(e*(e>78643200?2:3)+r)
|
3351 | r=0
|
3352 | p++
|
3353 | null===c&&(c=setInterval(_,50))}}(i)
|
3354 | var o=r
|
3355 | t[0].copy(s,o,e.bigOffset,t[0].length)
|
3356 | r+=t[0].length-e.bigOffset
|
3357 | for(var l=1;l<n-1;l++){t[l].copy(s,r)
|
3358 | r+=t[l].length}t[l].copy(s,r,0,a-2)
|
3359 | r+=a-2
|
3360 | return s.slice(o,r)}k.prototype.execute=function(e){if(null===this.buffer){this.buffer=e
|
3361 | this.offset=0}else if(0===this.bigStrSize){var t=this.buffer.length
|
3362 | var n=t-this.offset
|
3363 | var a=d(n+e.length)
|
3364 | this.buffer.copy(a,0,this.offset,t)
|
3365 | e.copy(a,n,0,e.length)
|
3366 | this.buffer=a
|
3367 | this.offset=0
|
3368 | if(this.arrayCache.length){var o=y(this)
|
3369 | if(!o)return
|
3370 | this.returnReply(o)}}else{if(!(this.totalChunkSize+e.length>=this.bigStrSize)){this.bufferCache.push(e)
|
3371 | this.totalChunkSize+=e.length
|
3372 | return}this.bufferCache.push(e)
|
3373 | var s=this.optionReturnBuffers?S(this):function(e){var t=e.bufferCache
|
3374 | var n=t.length
|
3375 | var a=e.bigStrSize-e.totalChunkSize
|
3376 | e.offset=a
|
3377 | if(a<=2){if(2===n)return t[0].toString("utf8",e.bigOffset,t[0].length+a-2)
|
3378 | n--
|
3379 | a=t[t.length-2].length+a}var o=i.write(t[0].slice(e.bigOffset))
|
3380 | for(var s=1;s<n-1;s++)o+=i.write(t[s])
|
3381 | return o+=i.end(t[s].slice(0,a-2))}(this)
|
3382 | this.bigStrSize=0
|
3383 | this.bufferCache=[]
|
3384 | this.buffer=e
|
3385 | if(this.arrayCache.length){this.arrayCache[0][this.arrayPos[0]++]=s
|
3386 | if(!(s=y(this)))return}this.returnReply(s)}for(;this.offset<this.buffer.length;){var r=this.offset
|
3387 | var c=this.buffer[this.offset++]
|
3388 | var p=b(this,c)
|
3389 | if(void 0===p){this.arrayCache.length||(this.offset=r)
|
3390 | return}45===c?this.returnError(p):this.returnReply(p)}this.buffer=null}
|
3391 | e.exports=k},function(e,t,n){"use strict"
|
3392 | var i=n(1)
|
3393 | var a=n(31)
|
3394 | var o=n(30).RedisError
|
3395 | var s=!1
|
3396 | function r(e,t){a(e,"The options argument is required")
|
3397 | a.strictEqual(typeof e,"object","The options argument has to be of type object")
|
3398 | o.call(this,e.message,s)
|
3399 | Object.defineProperty(this,"message",{value:e.message||"",configurable:!0,writable:!0});(t||void 0===t)&&Error.captureStackTrace(this,r)
|
3400 | for(var n=Object.keys(e),i=n.pop();i;i=n.pop())this[i]=e[i]}function c(e){a(e,"The options argument is required")
|
3401 | a.strictEqual(typeof e,"object","The options argument has to be of type object")
|
3402 | r.call(this,e,s)
|
3403 | Object.defineProperty(this,"message",{value:e.message||"",configurable:!0,writable:!0})
|
3404 | Error.captureStackTrace(this,c)
|
3405 | for(var t=Object.keys(e),n=t.pop();n;n=t.pop())this[n]=e[n]}i.inherits(r,o)
|
3406 | i.inherits(c,r)
|
3407 | Object.defineProperty(r.prototype,"name",{value:"AbortError",configurable:!0,writable:!0})
|
3408 | Object.defineProperty(c.prototype,"name",{value:"AggregateError",configurable:!0,writable:!0})
|
3409 | e.exports={AbortError:r,AggregateError:c}},function(e,t){e.exports=require("tls")},function(e,t,n){var i=n(5)
|
3410 | var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
|
3411 | function o(e){var t,n
|
3412 | t=[]
|
3413 | for(n=0;n<e.length;n++)t.push(a[e[n]%a.length])
|
3414 | return t.join("")}e.exports=function(e,t){if(void 0===t)return o(i.pseudoRandomBytes(e))
|
3415 | i.pseudoRandomBytes(e,function(e,n){if(e)return t(e)
|
3416 | t(null,o(n))})}},function(e,t){function n(e){var t=new Error("Cannot find module '"+e+"'")
|
3417 | t.code="MODULE_NOT_FOUND"
|
3418 | throw t}n.keys=function(){return[]}
|
3419 | n.resolve=n
|
3420 | e.exports=n
|
3421 | n.id=74},function(e,t,n){"use strict"
|
3422 | const i=n(35)
|
3423 | let a=0
|
3424 | e.exports=class extends i{constructor(e){super(e,"/_"+a++)
|
3425 | this.children=new Set}initAdapter(){}emit(){const e=Array.prototype.slice.call(arguments)
|
3426 | this.children.forEach(t=>{t.rooms=this.rooms
|
3427 | t.flags=this.flags
|
3428 | t.emit.apply(t,e)})
|
3429 | this.rooms=[]
|
3430 | this.flags={}}createChild(e){const t=new i(this.server,e)
|
3431 | t.fns=this.fns.slice(0)
|
3432 | this.listeners("connect").forEach(e=>t.on("connect",e))
|
3433 | this.listeners("connection").forEach(e=>t.on("connection",e))
|
3434 | this.children.add(t)
|
3435 | this.server.nsps[e]=t
|
3436 | return t}}},function(e,t,n){var i=n(7).EventEmitter
|
3437 | var a=n(16)
|
3438 | var o=n(24)
|
3439 | var s=n(3)
|
3440 | var r=n(6)("socket.io:socket")
|
3441 | e.exports=t=p
|
3442 | t.events=["error","connect","disconnect","disconnecting","newListener","removeListener"]
|
3443 | var c=i.prototype.emit
|
3444 | function p(e,t,n){this.nsp=e
|
3445 | this.server=e.server
|
3446 | this.adapter=this.nsp.adapter
|
3447 | this.id="/"!==e.name?e.name+"#"+t.id:t.id
|
3448 | this.client=t
|
3449 | this.conn=t.conn
|
3450 | this.rooms={}
|
3451 | this.acks={}
|
3452 | this.connected=!0
|
3453 | this.disconnected=!1
|
3454 | this.handshake=this.buildHandshake(n)
|
3455 | this.fns=[]
|
3456 | this.flags={}
|
3457 | this._rooms=[]}p.prototype.__proto__=i.prototype;["json","volatile","broadcast","local"].forEach(function(e){Object.defineProperty(p.prototype,e,{get:function(){this.flags[e]=!0
|
3458 | return this}})})
|
3459 | Object.defineProperty(p.prototype,"request",{get:function(){return this.conn.request}})
|
3460 | p.prototype.buildHandshake=function(e){var t=this
|
3461 | return{headers:this.request.headers,time:new Date+"",address:this.conn.remoteAddress,xdomain:!!this.request.headers.origin,secure:!!this.request.connection.encrypted,issued:+new Date,url:this.request.url,query:function(){var n=s.parse(t.request.url,!0).query
|
3462 | return Object.assign({},e,n)}()}}
|
3463 | p.prototype.emit=function(e){if(~t.events.indexOf(e)){c.apply(this,arguments)
|
3464 | return this}var n=Array.prototype.slice.call(arguments)
|
3465 | var i={type:(void 0!==this.flags.binary?this.flags.binary:o(n))?a.BINARY_EVENT:a.EVENT,data:n}
|
3466 | if("function"==typeof n[n.length-1]){if(this._rooms.length||this.flags.broadcast)throw new Error("Callbacks are not supported when broadcasting")
|
3467 | r("emitting packet with ack id %d",this.nsp.ids)
|
3468 | this.acks[this.nsp.ids]=n.pop()
|
3469 | i.id=this.nsp.ids++}var s=this._rooms.slice(0)
|
3470 | var p=Object.assign({},this.flags)
|
3471 | this._rooms=[]
|
3472 | this.flags={}
|
3473 | s.length||p.broadcast?this.adapter.broadcast(i,{except:[this.id],rooms:s,flags:p}):this.packet(i,p)
|
3474 | return this}
|
3475 | p.prototype.to=p.prototype.in=function(e){~this._rooms.indexOf(e)||this._rooms.push(e)
|
3476 | return this}
|
3477 | p.prototype.send=p.prototype.write=function(){var e=Array.prototype.slice.call(arguments)
|
3478 | e.unshift("message")
|
3479 | this.emit.apply(this,e)
|
3480 | return this}
|
3481 | p.prototype.packet=function(e,t){e.nsp=this.nsp.name;(t=t||{}).compress=!1!==t.compress
|
3482 | this.client.packet(e,t)}
|
3483 | p.prototype.join=function(e,t){r("joining room %s",e)
|
3484 | var n=this
|
3485 | Array.isArray(e)||(e=[e])
|
3486 | if(!(e=e.filter(function(e){return!n.rooms.hasOwnProperty(e)})).length){t&&t(null)
|
3487 | return this}this.adapter.addAll(this.id,e,function(i){if(i)return t&&t(i)
|
3488 | r("joined room %s",e)
|
3489 | e.forEach(function(e){n.rooms[e]=e})
|
3490 | t&&t(null)})
|
3491 | return this}
|
3492 | p.prototype.leave=function(e,t){r("leave room %s",e)
|
3493 | var n=this
|
3494 | this.adapter.del(this.id,e,function(i){if(i)return t&&t(i)
|
3495 | r("left room %s",e)
|
3496 | delete n.rooms[e]
|
3497 | t&&t(null)})
|
3498 | return this}
|
3499 | p.prototype.leaveAll=function(){this.adapter.delAll(this.id)
|
3500 | this.rooms={}}
|
3501 | p.prototype.onconnect=function(){r("socket connected - writing packet")
|
3502 | this.nsp.connected[this.id]=this
|
3503 | this.join(this.id)
|
3504 | "/"===this.nsp.name&&0===this.nsp.fns.length?r("packet already sent in initial handshake"):this.packet({type:a.CONNECT})}
|
3505 | p.prototype.onpacket=function(e){r("got packet %j",e)
|
3506 | switch(e.type){case a.EVENT:case a.BINARY_EVENT:this.onevent(e)
|
3507 | break
|
3508 | case a.ACK:case a.BINARY_ACK:this.onack(e)
|
3509 | break
|
3510 | case a.DISCONNECT:this.ondisconnect()
|
3511 | break
|
3512 | case a.ERROR:this.onerror(new Error(e.data))}}
|
3513 | p.prototype.onevent=function(e){var t=e.data||[]
|
3514 | r("emitting event %j",t)
|
3515 | if(null!=e.id){r("attaching ack callback to event")
|
3516 | t.push(this.ack(e.id))}this.dispatch(t)}
|
3517 | p.prototype.ack=function(e){var t=this
|
3518 | var n=!1
|
3519 | return function(){if(!n){var i=Array.prototype.slice.call(arguments)
|
3520 | r("sending ack %j",i)
|
3521 | t.packet({id:e,type:o(i)?a.BINARY_ACK:a.ACK,data:i})
|
3522 | n=!0}}}
|
3523 | p.prototype.onack=function(e){var t=this.acks[e.id]
|
3524 | if("function"==typeof t){r("calling ack %s with %j",e.id,e.data)
|
3525 | t.apply(this,e.data)
|
3526 | delete this.acks[e.id]}else r("bad ack %s",e.id)}
|
3527 | p.prototype.ondisconnect=function(){r("got disconnect packet")
|
3528 | this.onclose("client namespace disconnect")}
|
3529 | p.prototype.onerror=function(e){if(this.listeners("error").length)this.emit("error",e)
|
3530 | else{console.error("Missing error handler on `socket`.")
|
3531 | console.error(e.stack)}}
|
3532 | p.prototype.onclose=function(e){if(!this.connected)return this
|
3533 | r("closing socket - reason %s",e)
|
3534 | this.emit("disconnecting",e)
|
3535 | this.leaveAll()
|
3536 | this.nsp.remove(this)
|
3537 | this.client.remove(this)
|
3538 | this.connected=!1
|
3539 | this.disconnected=!0
|
3540 | delete this.nsp.connected[this.id]
|
3541 | this.emit("disconnect",e)}
|
3542 | p.prototype.error=function(e){this.packet({type:a.ERROR,data:e})}
|
3543 | p.prototype.disconnect=function(e){if(!this.connected)return this
|
3544 | if(e)this.client.disconnect()
|
3545 | else{this.packet({type:a.DISCONNECT})
|
3546 | this.onclose("server namespace disconnect")}return this}
|
3547 | p.prototype.compress=function(e){this.flags.compress=e
|
3548 | return this}
|
3549 | p.prototype.binary=function(e){this.flags.binary=e
|
3550 | return this}
|
3551 | p.prototype.dispatch=function(e){r("dispatching an event %j",e)
|
3552 | var t=this
|
3553 | this.run(e,function(n){process.nextTick(function(){if(n)return t.error(n.data||n.message)
|
3554 | c.apply(t,e)})})}
|
3555 | p.prototype.use=function(e){this.fns.push(e)
|
3556 | return this}
|
3557 | p.prototype.run=function(e,t){var n=this.fns.slice(0)
|
3558 | if(!n.length)return t(null)
|
3559 | !function i(a){n[a](e,function(e){if(e)return t(e)
|
3560 | if(!n[a+1])return t(null)
|
3561 | i(a+1)})}(0)}},function(e,t,n){var i=n(37)
|
3562 | var a=n(36)
|
3563 | var o=Object.prototype.toString
|
3564 | var s="function"==typeof global.Blob||"[object BlobConstructor]"===o.call(global.Blob)
|
3565 | var r="function"==typeof global.File||"[object FileConstructor]"===o.call(global.File)
|
3566 | t.deconstructPacket=function(e){var t=[]
|
3567 | var n=e.data
|
3568 | var o=e
|
3569 | o.data=function e(t,n){if(!t)return t
|
3570 | if(a(t)){var o={_placeholder:!0,num:n.length}
|
3571 | n.push(t)
|
3572 | return o}if(i(t)){var s=new Array(t.length)
|
3573 | for(var r=0;r<t.length;r++)s[r]=e(t[r],n)
|
3574 | return s}if("object"==typeof t&&!(t instanceof Date)){var s={}
|
3575 | for(var c in t)s[c]=e(t[c],n)
|
3576 | return s}return t}(n,t)
|
3577 | o.attachments=t.length
|
3578 | return{packet:o,buffers:t}}
|
3579 | t.reconstructPacket=function(e,t){e.data=function e(t,n){if(!t)return t
|
3580 | if(t&&t._placeholder)return n[t.num]
|
3581 | if(i(t))for(var a=0;a<t.length;a++)t[a]=e(t[a],n)
|
3582 | else if("object"==typeof t)for(var o in t)t[o]=e(t[o],n)
|
3583 | return t}(e.data,t)
|
3584 | e.attachments=void 0
|
3585 | return e}
|
3586 | t.removeBlobs=function(e,t){var n=0
|
3587 | var o=e
|
3588 | !function e(c,p,l){if(!c)return c
|
3589 | if(s&&c instanceof Blob||r&&c instanceof File){n++
|
3590 | var u=new FileReader
|
3591 | u.onload=function(){l?l[p]=this.result:o=this.result;--n||t(o)}
|
3592 | u.readAsArrayBuffer(c)}else if(i(c))for(var d=0;d<c.length;d++)e(c[d],d,c)
|
3593 | else if("object"==typeof c&&!a(c))for(var f in c)e(c[f],f,c)}(o)
|
3594 | n||t(o)}},function(e,t,n){e.exports=i
|
3595 | function i(e){if(e)return function(e){for(var t in i.prototype)e[t]=i.prototype[t]
|
3596 | return e}(e)}i.prototype.on=i.prototype.addEventListener=function(e,t){this._callbacks=this._callbacks||{};(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t)
|
3597 | return this}
|
3598 | i.prototype.once=function(e,t){function n(){this.off(e,n)
|
3599 | t.apply(this,arguments)}n.fn=t
|
3600 | this.on(e,n)
|
3601 | return this}
|
3602 | i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.prototype.removeEventListener=function(e,t){this._callbacks=this._callbacks||{}
|
3603 | if(0==arguments.length){this._callbacks={}
|
3604 | return this}var n=this._callbacks["$"+e]
|
3605 | if(!n)return this
|
3606 | if(1==arguments.length){delete this._callbacks["$"+e]
|
3607 | return this}var i
|
3608 | for(var a=0;a<n.length;a++)if((i=n[a])===t||i.fn===t){n.splice(a,1)
|
3609 | break}return this}
|
3610 | i.prototype.emit=function(e){this._callbacks=this._callbacks||{}
|
3611 | var t=[].slice.call(arguments,1),n=this._callbacks["$"+e]
|
3612 | if(n)for(var i=0,a=(n=n.slice(0)).length;i<a;++i)n[i].apply(this,t)
|
3613 | return this}
|
3614 | i.prototype.listeners=function(e){this._callbacks=this._callbacks||{}
|
3615 | return this._callbacks["$"+e]||[]}
|
3616 | i.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t,n){var i=n(16)
|
3617 | var a=n(6)("socket.io:client")
|
3618 | var o=n(3)
|
3619 | e.exports=s
|
3620 | function s(e,t){this.server=e
|
3621 | this.conn=t
|
3622 | this.encoder=e.encoder
|
3623 | this.decoder=new e.parser.Decoder
|
3624 | this.id=t.id
|
3625 | this.request=t.request
|
3626 | this.setup()
|
3627 | this.sockets={}
|
3628 | this.nsps={}
|
3629 | this.connectBuffer=[]}s.prototype.setup=function(){this.onclose=this.onclose.bind(this)
|
3630 | this.ondata=this.ondata.bind(this)
|
3631 | this.onerror=this.onerror.bind(this)
|
3632 | this.ondecoded=this.ondecoded.bind(this)
|
3633 | this.decoder.on("decoded",this.ondecoded)
|
3634 | this.conn.on("data",this.ondata)
|
3635 | this.conn.on("error",this.onerror)
|
3636 | this.conn.on("close",this.onclose)}
|
3637 | s.prototype.connect=function(e,t){if(this.server.nsps[e]){a("connecting to namespace %s",e)
|
3638 | return this.doConnect(e,t)}this.server.checkNamespace(e,t,n=>{if(n){a("dynamic namespace %s was created",n.name)
|
3639 | this.doConnect(e,t)}else{a("creation of namespace %s was denied",e)
|
3640 | this.packet({type:i.ERROR,nsp:e,data:"Invalid namespace"})}})}
|
3641 | s.prototype.doConnect=function(e,t){var n=this.server.of(e)
|
3642 | if("/"==e||this.nsps["/"]){var i=this
|
3643 | var a=n.add(this,t,function(){i.sockets[a.id]=a
|
3644 | i.nsps[n.name]=a
|
3645 | if("/"==n.name&&i.connectBuffer.length>0){i.connectBuffer.forEach(i.connect,i)
|
3646 | i.connectBuffer=[]}})}else this.connectBuffer.push(e)}
|
3647 | s.prototype.disconnect=function(){for(var e in this.sockets)this.sockets.hasOwnProperty(e)&&this.sockets[e].disconnect()
|
3648 | this.sockets={}
|
3649 | this.close()}
|
3650 | s.prototype.remove=function(e){if(this.sockets.hasOwnProperty(e.id)){var t=this.sockets[e.id].nsp.name
|
3651 | delete this.sockets[e.id]
|
3652 | delete this.nsps[t]}else a("ignoring remove for %s",e.id)}
|
3653 | s.prototype.close=function(){if("open"==this.conn.readyState){a("forcing transport close")
|
3654 | this.conn.close()
|
3655 | this.onclose("forced server close")}}
|
3656 | s.prototype.packet=function(e,t){t=t||{}
|
3657 | var n=this
|
3658 | function i(e){if(!t.volatile||n.conn.transport.writable)for(var i=0;i<e.length;i++)n.conn.write(e[i],{compress:t.compress})}if("open"==this.conn.readyState){a("writing packet %j",e)
|
3659 | t.preEncoded?i(e):this.encoder.encode(e,i)}else a("ignoring packet write %j",e)}
|
3660 | s.prototype.ondata=function(e){try{this.decoder.add(e)}catch(e){this.onerror(e)}}
|
3661 | s.prototype.ondecoded=function(e){if(i.CONNECT==e.type)this.connect(o.parse(e.nsp).pathname,o.parse(e.nsp,!0).query)
|
3662 | else{var t=this.nsps[e.nsp]
|
3663 | t?process.nextTick(function(){t.onpacket(e)}):a("no socket for namespace %s",e.nsp)}}
|
3664 | s.prototype.onerror=function(e){for(var t in this.sockets)this.sockets.hasOwnProperty(t)&&this.sockets[t].onerror(e)
|
3665 | this.conn.close()}
|
3666 | s.prototype.onclose=function(e){a("client close with reason %s",e)
|
3667 | this.destroy()
|
3668 | for(var t in this.sockets)this.sockets.hasOwnProperty(t)&&this.sockets[t].onclose(e)
|
3669 | this.sockets={}
|
3670 | this.decoder.destroy()}
|
3671 | s.prototype.destroy=function(){this.conn.removeListener("data",this.ondata)
|
3672 | this.conn.removeListener("error",this.onerror)
|
3673 | this.conn.removeListener("close",this.onclose)
|
3674 | this.decoder.removeListener("decoded",this.ondecoded)}},function(e){e.exports={_from:"socket.io-client@^2.1.1",_id:"socket.io-client@2.1.1",_inBundle:!1,_integrity:"sha512-jxnFyhAuFxYfjqIgduQlhzqTcOEQSn+OHKVfAxWaNWa7ecP7xSNk2Dx/3UEsDcY7NcFafxvNvKPmmO7HTwTxGQ==",_location:"/socket.io-client",_phantomChildren:{},_requested:{type:"range",registry:!0,raw:"socket.io-client@^2.1.1",name:"socket.io-client",escapedName:"socket.io-client",rawSpec:"^2.1.1",saveSpec:null,fetchSpec:"^2.1.1"},_requiredBy:["/","/socket.io"],_resolved:"https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.1.1.tgz",_shasum:"dcb38103436ab4578ddb026638ae2f21b623671f",_spec:"socket.io-client@^2.1.1",_where:"C:\\Users\\Dr\\Documents\\GitHub\\imock-socket",bugs:{url:"https://github.com/Automattic/socket.io-client/issues"},bundleDependencies:!1,contributors:[{name:"Guillermo Rauch",email:"rauchg@gmail.com"},{name:"Arnout Kazemier",email:"info@3rd-eden.com"},{name:"Vladimir Dronnikov",email:"dronnikov@gmail.com"},{name:"Einar Otto Stangvik",email:"einaros@gmail.com"}],dependencies:{backo2:"1.0.2","base64-arraybuffer":"0.1.5","component-bind":"1.0.0","component-emitter":"1.2.1",debug:"~3.1.0","engine.io-client":"~3.2.0","has-binary2":"~1.0.2","has-cors":"1.1.0",indexof:"0.0.1","object-component":"0.0.3",parseqs:"0.0.5",parseuri:"0.0.5","socket.io-parser":"~3.2.0","to-array":"0.1.4"},deprecated:!1,description:"[![Build Status](https://secure.travis-ci.org/socketio/socket.io-client.svg?branch=master)](http://travis-ci.org/socketio/socket.io-client) [![Dependency Status](https://david-dm.org/socketio/socket.io-client.svg)](https://david-dm.org/socketio/socket.io-client) [![devDependency Status](https://david-dm.org/socketio/socket.io-client/dev-status.svg)](https://david-dm.org/socketio/socket.io-client#info=devDependencies) [![NPM version](https://badge.fury.io/js/socket.io-client.svg)](https://www.npmjs.com/package/socket.io-client) ![Downloads](http://img.shields.io/npm/dm/socket.io-client.svg?style=flat) [![](http://slack.socket.io/badge.svg?)](http://slack.socket.io)",devDependencies:{"babel-core":"^6.24.1","babel-eslint":"4.1.7","babel-loader":"7.0.0","babel-preset-es2015":"6.24.1","concat-stream":"^1.6.0",derequire:"^2.0.6","eslint-config-standard":"4.4.0","eslint-plugin-standard":"1.3.1","expect.js":"0.3.1",gulp:"^3.9.1","gulp-eslint":"1.1.1","gulp-file":"^0.3.0","gulp-istanbul":"^1.1.1","gulp-mocha":"^4.3.1","gulp-task-listing":"1.0.1","imports-loader":"^0.7.1",istanbul:"^0.4.5",mocha:"^3.3.0","socket.io":"2.1.1","socket.io-browsers":"^1.0.0","strip-loader":"0.1.2","text-blob-builder":"0.0.1","webpack-merge":"4.1.2","webpack-stream":"3.2.0",zuul:"^3.11.1 ","zuul-builder-webpack":"^1.2.0","zuul-ngrok":"4.0.0"},files:["lib/","dist/"],homepage:"https://github.com/Automattic/socket.io-client#readme",keywords:["realtime","framework","websocket","tcp","events","client"],license:"MIT",main:"./lib/index",name:"socket.io-client",repository:{type:"git",url:"git+https://github.com/Automattic/socket.io-client.git"},scripts:{test:"gulp test"},version:"2.1.1"}},function(e,t,n){"use strict"
|
3675 | const i=n(10)
|
3676 | const a=n(7)
|
3677 | const o=n(5)
|
3678 | const s=n(42)
|
3679 | const r=n(8)
|
3680 | const c=n(3)
|
3681 | const p=n(18)
|
3682 | const l=n(41)
|
3683 | const u=n(17)
|
3684 | const d=n(43)
|
3685 | const f=i.Buffer
|
3686 | e.exports=class extends a{constructor(e,t){super()
|
3687 | if(null==(e=Object.assign({maxPayload:104857600,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null},e)).port&&!e.server&&!e.noServer)throw new TypeError("missing or invalid options")
|
3688 | if(null!=e.port){this._server=r.createServer((e,t)=>{const n=r.STATUS_CODES[426]
|
3689 | t.writeHead(426,{"Content-Length":n.length,"Content-Type":"text/plain"})
|
3690 | t.end(n)})
|
3691 | this._server.listen(e.port,e.host,e.backlog,t)}else e.server&&(this._server=e.server)
|
3692 | if(this._server){this._ultron=new s(this._server)
|
3693 | this._ultron.on("listening",()=>this.emit("listening"))
|
3694 | this._ultron.on("error",e=>this.emit("error",e))
|
3695 | this._ultron.on("upgrade",(e,t,n)=>{this.handleUpgrade(e,t,n,t=>{this.emit("connection",t,e)})})}!0===e.perMessageDeflate&&(e.perMessageDeflate={})
|
3696 | e.clientTracking&&(this.clients=new Set)
|
3697 | this.options=e}close(e){if(this.clients)for(const e of this.clients)e.terminate()
|
3698 | const t=this._server
|
3699 | if(t){this._ultron.destroy()
|
3700 | this._ultron=this._server=null
|
3701 | if(null!=this.options.port)return t.close(e)}e&&e()}shouldHandle(e){return!this.options.path||c.parse(e.url).pathname===this.options.path}handleUpgrade(e,t,n,i){t.on("error",h)
|
3702 | const a=+e.headers["sec-websocket-version"]
|
3703 | const o={}
|
3704 | if("GET"!==e.method||"websocket"!==e.headers.upgrade.toLowerCase()||!e.headers["sec-websocket-key"]||8!==a&&13!==a||!this.shouldHandle(e))return m(t,400)
|
3705 | if(this.options.perMessageDeflate){const n=new p(this.options.perMessageDeflate,!0,this.options.maxPayload)
|
3706 | try{const i=l.parse(e.headers["sec-websocket-extensions"])
|
3707 | if(i[p.extensionName]){n.accept(i[p.extensionName])
|
3708 | o[p.extensionName]=n}}catch(e){return m(t,400)}}var s=(e.headers["sec-websocket-protocol"]||"").split(/, */)
|
3709 | if(this.options.handleProtocols){if(!1===(s=this.options.handleProtocols(s,e)))return m(t,401)}else s=s[0]
|
3710 | if(this.options.verifyClient){const r={origin:e.headers[`${8===a?"sec-websocket-origin":"origin"}`],secure:!(!e.connection.authorized&&!e.connection.encrypted),req:e}
|
3711 | if(2===this.options.verifyClient.length){this.options.verifyClient(r,(r,c,p)=>{if(!r)return m(t,c||401,p)
|
3712 | this.completeUpgrade(s,o,a,e,t,n,i)})
|
3713 | return}if(!this.options.verifyClient(r))return m(t,401)}this.completeUpgrade(s,o,a,e,t,n,i)}completeUpgrade(e,t,n,i,a,s,r){if(!a.readable||!a.writable)return a.destroy()
|
3714 | const c=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${o.createHash("sha1").update(i.headers["sec-websocket-key"]+u.GUID,"binary").digest("base64")}`]
|
3715 | e&&c.push(`Sec-WebSocket-Protocol: ${e}`)
|
3716 | if(t[p.extensionName]){const e=t[p.extensionName].params
|
3717 | const n=l.format({[p.extensionName]:[e]})
|
3718 | c.push(`Sec-WebSocket-Extensions: ${n}`)}this.emit("headers",c,i)
|
3719 | a.write(c.concat("\r\n").join("\r\n"))
|
3720 | const f=new d([a,s],null,{maxPayload:this.options.maxPayload,protocolVersion:n,extensions:t,protocol:e})
|
3721 | if(this.clients){this.clients.add(f)
|
3722 | f.on("close",()=>this.clients.delete(f))}a.removeListener("error",h)
|
3723 | r(f)}}
|
3724 | function h(){this.destroy()}function m(e,t,n){if(e.writable){n=n||r.STATUS_CODES[t]
|
3725 | e.write(`HTTP/1.1 ${t} ${r.STATUS_CODES[t]}\r\n`+"Connection: close\r\nContent-type: text/html\r\n"+`Content-Length: ${f.byteLength(n)}\r\n`+"\r\n"+n)}e.removeListener("error",h)
|
3726 | e.destroy()}},function(e,t){if(typeof utf-8-validate==="undefined"){var n=new Error("Cannot find module 'utf-8-validate'")
|
3727 | n.code="MODULE_NOT_FOUND"
|
3728 | throw n}e.exports=utf-8-validate},function(e,t,n){"use strict"
|
3729 | try{const t=n(82)
|
3730 | e.exports="object"==typeof t?t.Validation.isValidUTF8:t}catch(t){e.exports=(()=>!0)}},function(e,t,n){"use strict"
|
3731 | class i{constructor(e,t){this.target=t
|
3732 | this.type=e}}class a extends i{constructor(e,t){super("message",t)
|
3733 | this.data=e}}class o extends i{constructor(e,t,n){super("close",n)
|
3734 | this.wasClean=n._closeFrameReceived&&n._closeFrameSent
|
3735 | this.reason=t
|
3736 | this.code=e}}class s extends i{constructor(e){super("open",e)}}const r={addEventListener(e,t){if("function"==typeof t)if("message"===e){n._listener=t
|
3737 | this.on(e,n)}else if("close"===e){i._listener=t
|
3738 | this.on(e,i)}else if("error"===e){r._listener=t
|
3739 | this.on(e,r)}else if("open"===e){c._listener=t
|
3740 | this.on(e,c)}else this.on(e,t)
|
3741 | function n(e){t.call(this,new a(e,this))}function i(e,n){t.call(this,new o(e,n,this))}function r(e){e.type="error"
|
3742 | e.target=this
|
3743 | t.call(this,e)}function c(){t.call(this,new s(this))}},removeEventListener(e,t){const n=this.listeners(e)
|
3744 | for(var i=0;i<n.length;i++)n[i]!==t&&n[i]._listener!==t||this.removeListener(e,n[i])}}
|
3745 | e.exports=r},function(e,t){if("undefined"==typeof bufferutil){var n=new Error("Cannot find module 'bufferutil'")
|
3746 | n.code="MODULE_NOT_FOUND"
|
3747 | throw n}e.exports=bufferutil},function(e,t,n){"use strict"
|
3748 | function i(e){if(!(this instanceof i))return new i(e)
|
3749 | e=e||{}
|
3750 | this.concurrency=e.concurrency||1/0
|
3751 | this.pending=0
|
3752 | this.jobs=[]
|
3753 | this.cbs=[]
|
3754 | this._done=function(){this.pending--
|
3755 | this._run()}.bind(this)}["push","unshift","splice"].forEach(function(e){i.prototype[e]=function(){var t=Array.prototype[e].apply(this.jobs,arguments)
|
3756 | this._run()
|
3757 | return t}})
|
3758 | Object.defineProperty(i.prototype,"length",{get:function(){return this.pending+this.jobs.length}})
|
3759 | i.prototype._run=function(){if(this.pending!==this.concurrency){if(this.jobs.length){var e=this.jobs.shift()
|
3760 | this.pending++
|
3761 | e(this._done)
|
3762 | this._run()}if(0===this.pending)for(;0!==this.cbs.length;){var t=this.cbs.pop()
|
3763 | process.nextTick(t)}}}
|
3764 | i.prototype.onDone=function(e){if("function"==typeof e){this.cbs.push(e)
|
3765 | this._run()}}
|
3766 | e.exports=i},function(e,t){e.exports=require("buffer")},function(e,t,n){"use strict"
|
3767 | const i=n(43)
|
3768 | i.Server=n(81)
|
3769 | i.Receiver=n(40)
|
3770 | i.Sender=n(38)
|
3771 | e.exports=i},function(e,t){e.exports=uws},function(e,t,n){"use strict"
|
3772 | t.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string")
|
3773 | var n={}
|
3774 | var a=t||{}
|
3775 | var s=e.split(o)
|
3776 | var c=a.decode||i
|
3777 | for(var p=0;p<s.length;p++){var l=s[p]
|
3778 | var u=l.indexOf("=")
|
3779 | if(!(u<0)){var d=l.substr(0,u).trim()
|
3780 | var f=l.substr(++u,l.length).trim()
|
3781 | '"'==f[0]&&(f=f.slice(1,-1))
|
3782 | void 0==n[d]&&(n[d]=r(f,c))}}return n}
|
3783 | t.serialize=function(e,t,n){var i=n||{}
|
3784 | var o=i.encode||a
|
3785 | if("function"!=typeof o)throw new TypeError("option encode is invalid")
|
3786 | if(!s.test(e))throw new TypeError("argument name is invalid")
|
3787 | var r=o(t)
|
3788 | if(r&&!s.test(r))throw new TypeError("argument val is invalid")
|
3789 | var c=e+"="+r
|
3790 | if(null!=i.maxAge){var p=i.maxAge-0
|
3791 | if(isNaN(p))throw new Error("maxAge should be a Number")
|
3792 | c+="; Max-Age="+Math.floor(p)}if(i.domain){if(!s.test(i.domain))throw new TypeError("option domain is invalid")
|
3793 | c+="; Domain="+i.domain}if(i.path){if(!s.test(i.path))throw new TypeError("option path is invalid")
|
3794 | c+="; Path="+i.path}if(i.expires){if("function"!=typeof i.expires.toUTCString)throw new TypeError("option expires is invalid")
|
3795 | c+="; Expires="+i.expires.toUTCString()}i.httpOnly&&(c+="; HttpOnly")
|
3796 | i.secure&&(c+="; Secure")
|
3797 | if(i.sameSite){var l="string"==typeof i.sameSite?i.sameSite.toLowerCase():i.sameSite
|
3798 | switch(l){case!0:c+="; SameSite=Strict"
|
3799 | break
|
3800 | case"lax":c+="; SameSite=Lax"
|
3801 | break
|
3802 | case"strict":c+="; SameSite=Strict"
|
3803 | break
|
3804 | default:throw new TypeError("option sameSite is invalid")}}return c}
|
3805 | var i=decodeURIComponent
|
3806 | var a=encodeURIComponent
|
3807 | var o=/; */
|
3808 | var s=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/
|
3809 | function r(e,t){try{return t(e)}catch(t){return e}}},function(e,t,n){var i=n(25)
|
3810 | var a=n(19)
|
3811 | var o=n(1)
|
3812 | var s=n(6)("engine:ws")
|
3813 | e.exports=r
|
3814 | function r(e){i.call(this,e)
|
3815 | var t=this
|
3816 | this.socket=e.websocket
|
3817 | this.socket.on("message",this.onData.bind(this))
|
3818 | this.socket.once("close",this.onClose.bind(this))
|
3819 | this.socket.on("error",this.onError.bind(this))
|
3820 | this.socket.on("headers",function(e){t.emit("headers",e)})
|
3821 | this.writable=!0
|
3822 | this.perMessageDeflate=null}o.inherits(r,i)
|
3823 | r.prototype.name="websocket"
|
3824 | r.prototype.handlesUpgrades=!0
|
3825 | r.prototype.supportsFraming=!0
|
3826 | r.prototype.onData=function(e){s('received "%s"',e)
|
3827 | i.prototype.onData.call(this,e)}
|
3828 | r.prototype.send=function(e){var t=this
|
3829 | for(var n=0;n<e.length;n++){var i=e[n]
|
3830 | a.encodePacket(i,t.supportsBinary,o)}function o(e){s('writing "%s"',e)
|
3831 | var n={}
|
3832 | i.options&&(n.compress=i.options.compress)
|
3833 | if(t.perMessageDeflate){("string"==typeof e?Buffer.byteLength(e):e.length)<t.perMessageDeflate.threshold&&(n.compress=!1)}t.writable=!1
|
3834 | t.socket.send(e,n,r)}function r(e){if(e)return t.onError("write error",e.stack)
|
3835 | t.writable=!0
|
3836 | t.emit("drain")}}
|
3837 | r.prototype.doClose=function(e){s("closing")
|
3838 | this.socket.close()
|
3839 | e&&e()}},function(e,t,n){var i=n(48)
|
3840 | var a=n(50)
|
3841 | var o=/\\\\n/g
|
3842 | var s=/(\\)?\\n/g
|
3843 | var r=n(1)
|
3844 | e.exports=c
|
3845 | function c(e){i.call(this,e)
|
3846 | this.head="___eio["+(e._query.j||"").replace(/[^0-9]/g,"")+"]("
|
3847 | this.foot=");"}r.inherits(c,i)
|
3848 | c.prototype.onData=function(e){if("string"==typeof(e=a.parse(e).d)){e=e.replace(s,function(e,t){return t?e:"\n"})
|
3849 | i.prototype.onData.call(this,e.replace(o,"\\n"))}}
|
3850 | c.prototype.doWrite=function(e,t,n){var a=JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")
|
3851 | e=this.head+a+this.foot
|
3852 | i.prototype.doWrite.call(this,e,t,n)}},function(e){e.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana"},"application/3gpp-ims+xml":{source:"iana"},"application/a2l":{source:"iana"},"application/activemessage":{source:"iana"},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana"},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",extensions:["atomsvc"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana"},"application/bacnet-xdd+zip":{source:"iana"},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana"},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana"},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/cbor":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana"},"application/ccxml+xml":{source:"iana",extensions:["ccxml"]},"application/cdfx+xml":{source:"iana"},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana"},"application/cellml+xml":{source:"iana"},"application/cfw":{source:"iana"},"application/clue_info+xml":{source:"iana"},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana"},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana"},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana"},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana"},"application/cstadata+xml":{source:"iana"},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",extensions:["mpd"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana"},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana"},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/docbook+xml":{source:"apache",extensions:["dbk"]},"application/dskpp+xml":{source:"iana"},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/emergencycalldata.comment+xml":{source:"iana"},"application/emergencycalldata.control+xml":{source:"iana"},"application/emergencycalldata.deviceinfo+xml":{source:"iana"},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana"},"application/emergencycalldata.serviceinfo+xml":{source:"iana"},"application/emergencycalldata.subscriberinfo+xml":{source:"iana"},"application/emergencycalldata.veds+xml":{source:"iana"},"application/emma+xml":{source:"iana",extensions:["emma"]},"application/emotionml+xml":{source:"iana"},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana"},"application/epub+zip":{source:"iana",extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana"},"application/fhir+xml":{source:"iana"},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1,extensions:["woff"]},"application/framework-attributes+xml":{source:"iana"},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geoxacml+xml":{source:"iana"},"application/gml+xml":{source:"iana",extensions:["gml"]},"application/gpx+xml":{source:"apache",extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana"},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana"},"application/ibe-pkg-reply+xml":{source:"iana"},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana"},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana"},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana"},"application/kpml-response+xml":{source:"iana"},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana"},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana"},"application/lost+xml":{source:"iana",extensions:["lostxml"]},"application/lostsync+xml":{source:"iana"},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",extensions:["mads"]},"application/manifest+json":{charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",extensions:["mathml"]},"application/mathml-content+xml":{source:"iana"},"application/mathml-presentation+xml":{source:"iana"},"application/mbms-associated-procedure-description+xml":{source:"iana"},"application/mbms-deregister+xml":{source:"iana"},"application/mbms-envelope+xml":{source:"iana"},"application/mbms-msk+xml":{source:"iana"},"application/mbms-msk-response+xml":{source:"iana"},"application/mbms-protection-description+xml":{source:"iana"},"application/mbms-reception-report+xml":{source:"iana"},"application/mbms-register+xml":{source:"iana"},"application/mbms-register-response+xml":{source:"iana"},"application/mbms-schedule+xml":{source:"iana"},"application/mbms-user-service-description+xml":{source:"iana"},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana"},"application/media_control+xml":{source:"iana"},"application/mediaservercontrol+xml":{source:"iana",extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",extensions:["metalink"]},"application/metalink4+xml":{source:"iana",extensions:["meta4"]},"application/mets+xml":{source:"iana",extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mmt-usd+xml":{source:"iana"},"application/mods+xml":{source:"iana",extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana"},"application/mrb-publish+xml":{source:"iana"},"application/msc-ivr+xml":{source:"iana"},"application/msc-mixer+xml":{source:"iana"},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana"},"application/n-triples":{source:"iana"},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana"},"application/news-groupinfo":{source:"iana"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana"},"application/node":{source:"iana"},"application/nss":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p2p-overlay+xml":{source:"iana"},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana"},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana"},"application/pidf-diff+xml":{source:"iana"},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",extensions:["pls"]},"application/poc-settings+xml":{source:"iana"},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana"},"application/provenance+xml":{source:"iana"},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.hpub+zip":{source:"iana"},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana"},"application/pskc+xml":{source:"iana",extensions:["pskcxml"]},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf"]},"application/reginfo+xml":{source:"iana",extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",extensions:["rld"]},"application/rfc+xml":{source:"iana"},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana"},"application/rls-services+xml":{source:"iana",extensions:["rs"]},"application/route-apd+xml":{source:"iana"},"application/route-s-tsid+xml":{source:"iana"},"application/route-usd+xml":{source:"iana"},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana"},"application/samlmetadata+xml":{source:"iana"},"application/sbml+xml":{source:"iana",extensions:["sbml"]},"application/scaip+xml":{source:"iana"},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/sep+xml":{source:"iana"},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",extensions:["shf"]},"application/sieve":{source:"iana"},"application/simple-filter+xml":{source:"iana"},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",extensions:["srx"]},"application/spirits-event+xml":{source:"iana"},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",extensions:["grxml"]},"application/sru+xml":{source:"iana",extensions:["sru"]},"application/ssdl+xml":{source:"apache",extensions:["ssdl"]},"application/ssml+xml":{source:"iana",extensions:["ssml"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/tei+xml":{source:"iana",extensions:["tei","teicorpus"]},"application/thraud+xml":{source:"iana",extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tnauthlist":{source:"iana"},"application/trig":{source:"iana"},"application/ttml+xml":{source:"iana"},"application/tve-trigger":{source:"iana"},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana"},"application/urc-ressheet+xml":{source:"iana"},"application/urc-targetdesc+xml":{source:"iana"},"application/urc-uisocketdesc+xml":{source:"iana"},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana"},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana"},"application/vnd.3gpp-prose+xml":{source:"iana"},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana"},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana"},"application/vnd.3gpp.bsf+xml":{source:"iana"},"application/vnd.3gpp.gmop+xml":{source:"iana"},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana"},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana"},"application/vnd.3gpp.mcptt-info+xml":{source:"iana"},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana"},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana"},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana"},"application/vnd.3gpp.mid-call+xml":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana"},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana"},"application/vnd.3gpp.srvcc-info+xml":{source:"iana"},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana"},"application/vnd.3gpp.ussd+xml":{source:"iana"},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana"},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",extensions:["mpkg"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana"},"application/vnd.balsamiq.bmml+xml":{source:"iana"},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana"},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana"},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana"},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",extensions:["wbs"]},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana"},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana"},"application/vnd.cybank":{source:"iana"},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume-movie":{source:"iana"},"application/vnd.desmume.movie":{source:"apache"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana"},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana"},"application/vnd.dvb.notif-container+xml":{source:"iana"},"application/vnd.dvb.notif-generic+xml":{source:"iana"},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana"},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana"},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana"},"application/vnd.dvb.notif-init+xml":{source:"iana"},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana"},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana"},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana"},"application/vnd.eszigno3+xml":{source:"iana",extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana"},"application/vnd.etsi.asic-e+zip":{source:"iana"},"application/vnd.etsi.asic-s+zip":{source:"iana"},"application/vnd.etsi.cug+xml":{source:"iana"},"application/vnd.etsi.iptvcommand+xml":{source:"iana"},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana"},"application/vnd.etsi.iptvprofile+xml":{source:"iana"},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana"},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana"},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana"},"application/vnd.etsi.iptvservice+xml":{source:"iana"},"application/vnd.etsi.iptvsync+xml":{source:"iana"},"application/vnd.etsi.iptvueprofile+xml":{source:"iana"},"application/vnd.etsi.mcid+xml":{source:"iana"},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana"},"application/vnd.etsi.pstn+xml":{source:"iana"},"application/vnd.etsi.sci+xml":{source:"iana"},"application/vnd.etsi.simservs+xml":{source:"iana"},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana"},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana"},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana"},"application/vnd.gov.sk.e-form+zip":{source:"iana"},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana"},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana"},"application/vnd.imagemeter.image+zip":{source:"iana"},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana"},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana"},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana"},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana"},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana"},"application/vnd.iptc.g2.newsitem+xml":{source:"iana"},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana"},"application/vnd.iptc.g2.packageitem+xml":{source:"iana"},"application/vnd.iptc.g2.planningitem+xml":{source:"iana"},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",extensions:["lasxml"]},"application/vnd.liberty-request+xml":{source:"iana"},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",extensions:["lbe"]},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana"},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana"},"application/vnd.marlin.drm.conftoken+xml":{source:"iana"},"application/vnd.marlin.drm.license+xml":{source:"iana"},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana"},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana"},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana"},"application/vnd.ms-printing.printticket+xml":{source:"apache"},"application/vnd.ms-printschematicket+xml":{source:"iana"},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana"},"application/vnd.nokia.iptv.config+xml":{source:"iana"},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana"},"application/vnd.nokia.landmarkcollection+xml":{source:"iana"},"application/vnd.nokia.n-gage.ac+xml":{source:"iana"},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana"},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana"},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana"},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana"},"application/vnd.oipf.dae.xhtml+xml":{source:"iana"},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana"},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana"},"application/vnd.oipf.spdlist+xml":{source:"iana"},"application/vnd.oipf.ueprofile+xml":{source:"iana"},"application/vnd.oipf.userprofile+xml":{source:"iana"},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana"},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana"},"application/vnd.oma.bcast.imd+xml":{source:"iana"},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana"},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana"},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana"},"application/vnd.oma.bcast.sprov+xml":{source:"iana"},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana"},"application/vnd.oma.cab-feature-handler+xml":{source:"iana"},"application/vnd.oma.cab-pcc+xml":{source:"iana"},"application/vnd.oma.cab-subs-invite+xml":{source:"iana"},"application/vnd.oma.cab-user-prefs+xml":{source:"iana"},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana"},"application/vnd.oma.group-usage-list+xml":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana"},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana"},"application/vnd.oma.poc.final-report+xml":{source:"iana"},"application/vnd.oma.poc.groups+xml":{source:"iana"},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana"},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana"},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana"},"application/vnd.oma.xcap-directory+xml":{source:"iana"},"application/vnd.omads-email+xml":{source:"iana"},"application/vnd.omads-file+xml":{source:"iana"},"application/vnd.omads-folder+xml":{source:"iana"},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana"},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana"},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana"},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana"},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana"},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana"},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos+xml":{source:"iana"},"application/vnd.paos.xml":{source:"apache"},"application/vnd.patentdive":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana"},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana"},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana"},"application/vnd.radisys.msml+xml":{source:"iana"},"application/vnd.radisys.msml-audit+xml":{source:"iana"},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana"},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana"},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana"},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana"},"application/vnd.radisys.msml-conf+xml":{source:"iana"},"application/vnd.radisys.msml-dialog+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana"},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana"},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.software602.filler.form+xml":{source:"iana"},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana"},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana"},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.tmd.mediaflex.api+xml":{source:"iana"},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana"},"application/vnd.wv.ssp+xml":{source:"iana"},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana"},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",extensions:["zaz"]},"application/voicexml+xml":{source:"iana",extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana"},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"apache",extensions:["der","crt","pem"]},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana"},"application/xaml+xml":{source:"apache",extensions:["xaml"]},"application/xcap-att+xml":{source:"iana"},"application/xcap-caps+xml":{source:"iana"},"application/xcap-diff+xml":{source:"iana",extensions:["xdf"]},"application/xcap-el+xml":{source:"iana"},"application/xcap-error+xml":{source:"iana"},"application/xcap-ns+xml":{source:"iana"},"application/xcon-conference-info+xml":{source:"iana"},"application/xcon-conference-info-diff+xml":{source:"iana"},"application/xenc+xml":{source:"iana",extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache"},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana"},"application/xmpp+xml":{source:"iana"},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",extensions:["xpl"]},"application/xslt+xml":{source:"iana",extensions:["xslt"]},"application/xspf+xml":{source:"apache",extensions:["xspf"]},"application/xv+xml":{source:"iana",extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana"},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana"},"application/yin+xml":{source:"iana",extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana"},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana"},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tone":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana"},"image/apng":{compressible:!1,extensions:["apng"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana"},"image/emf":{source:"iana"},"image/fits":{source:"iana"},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana"},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana"},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana"},"image/tiff":{source:"iana",compressible:!1,extensions:["tiff","tif"]},"image/tiff-fx":{source:"iana"},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana"},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana"},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana"},"image/vnd.valve.source.texture":{source:"iana"},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana"},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana"},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/vnd.collada+xml":{source:"iana",extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana"},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana"},"model/vnd.parasolid.transmit.binary":{source:"iana"},"model/vnd.parasolid.transmit.text":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.valve.source.compiled-map":{source:"iana"},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana"},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana"},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana",compressible:!1},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fwdred":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shex":{extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana"},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vp8":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}},function(e,t,n){e.exports=n(93)},function(e,t,n){"use strict"
|
3853 | var i=n(94)
|
3854 | var a=n(2).extname
|
3855 | var o=/^\s*([^;\s]*)(?:;|\s|$)/
|
3856 | var s=/^text\//i
|
3857 | t.charset=r
|
3858 | t.charsets={lookup:r}
|
3859 | t.contentType=function(e){if(!e||"string"!=typeof e)return!1
|
3860 | var n=-1===e.indexOf("/")?t.lookup(e):e
|
3861 | if(!n)return!1
|
3862 | if(-1===n.indexOf("charset")){var i=t.charset(n)
|
3863 | i&&(n+="; charset="+i.toLowerCase())}return n}
|
3864 | t.extension=function(e){if(!e||"string"!=typeof e)return!1
|
3865 | var n=o.exec(e)
|
3866 | var i=n&&t.extensions[n[1].toLowerCase()]
|
3867 | if(!i||!i.length)return!1
|
3868 | return i[0]}
|
3869 | t.extensions=Object.create(null)
|
3870 | t.lookup=function(e){if(!e||"string"!=typeof e)return!1
|
3871 | var n=a("x."+e).toLowerCase().substr(1)
|
3872 | if(!n)return!1
|
3873 | return t.types[n]||!1}
|
3874 | t.types=Object.create(null)
|
3875 | !function(e,t){var n=["nginx","apache",void 0,"iana"]
|
3876 | Object.keys(i).forEach(function(a){var o=i[a]
|
3877 | var s=o.extensions
|
3878 | if(s&&s.length){e[a]=s
|
3879 | for(var r=0;r<s.length;r++){var c=s[r]
|
3880 | if(t[c]){var p=n.indexOf(i[t[c]].source)
|
3881 | var l=n.indexOf(o.source)
|
3882 | if("application/octet-stream"!==t[c]&&(p>l||p===l&&"application/"===t[c].substr(0,12)))continue}t[c]=a}}})}(t.extensions,t.types)
|
3883 | function r(e){if(!e||"string"!=typeof e)return!1
|
3884 | var t=o.exec(e)
|
3885 | var n=t&&i[t[1].toLowerCase()]
|
3886 | return n&&n.charset?n.charset:!(!t||!s.test(t[1]))&&"UTF-8"}},function(e,t,n){"use strict"
|
3887 | e.exports=r
|
3888 | e.exports.preferredMediaTypes=r
|
3889 | var i=/^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/
|
3890 | function a(e){var t=function(e){var t=e.split(",")
|
3891 | for(var n=1,i=0;n<t.length;n++)u(t[i])%2==0?t[++i]=t[n]:t[i]+=","+t[n]
|
3892 | t.length=i+1
|
3893 | return t}(e)
|
3894 | for(var n=0,i=0;n<t.length;n++){var a=o(t[n].trim(),n)
|
3895 | a&&(t[i++]=a)}t.length=i
|
3896 | return t}function o(e,t){var n=i.exec(e)
|
3897 | if(!n)return null
|
3898 | var a=Object.create(null)
|
3899 | var o=1
|
3900 | var s=n[2]
|
3901 | var r=n[1]
|
3902 | if(n[3]){var c=function(e){var t=e.split(";")
|
3903 | for(var n=1,i=0;n<t.length;n++)u(t[i])%2==0?t[++i]=t[n]:t[i]+=";"+t[n]
|
3904 | t.length=i+1
|
3905 | for(var n=0;n<t.length;n++)t[n]=t[n].trim()
|
3906 | return t}(n[3]).map(d)
|
3907 | for(var p=0;p<c.length;p++){var l=c[p]
|
3908 | var f=l[0].toLowerCase()
|
3909 | var h=l[1]
|
3910 | var m=h&&'"'===h[0]&&'"'===h[h.length-1]?h.substr(1,h.length-2):h
|
3911 | if("q"===f){o=parseFloat(m)
|
3912 | break}a[f]=m}}return{type:r,subtype:s,params:a,q:o,i:t}}function s(e,t,n){var i=o(e)
|
3913 | var a=0
|
3914 | if(!i)return null
|
3915 | if(t.type.toLowerCase()==i.type.toLowerCase())a|=4
|
3916 | else if("*"!=t.type)return null
|
3917 | if(t.subtype.toLowerCase()==i.subtype.toLowerCase())a|=2
|
3918 | else if("*"!=t.subtype)return null
|
3919 | var s=Object.keys(t.params)
|
3920 | if(s.length>0){if(!s.every(function(e){return"*"==t.params[e]||(t.params[e]||"").toLowerCase()==(i.params[e]||"").toLowerCase()}))return null
|
3921 | a|=1}return{i:n,o:t.i,q:t.q,s:a}}function r(e,t){var n=a(void 0===e?"*/*":e||"")
|
3922 | if(!t)return n.filter(l).sort(c).map(p)
|
3923 | var i=t.map(function(e,t){return function(e,t,n){var i={o:-1,q:0,s:0}
|
3924 | for(var a=0;a<t.length;a++){var o=s(e,t[a],n)
|
3925 | o&&(i.s-o.s||i.q-o.q||i.o-o.o)<0&&(i=o)}return i}(e,n,t)})
|
3926 | return i.filter(l).sort(c).map(function(e){return t[i.indexOf(e)]})}function c(e,t){return t.q-e.q||t.s-e.s||e.o-t.o||e.i-t.i||0}function p(e){return e.type+"/"+e.subtype}function l(e){return e.q>0}function u(e){var t=0
|
3927 | var n=0
|
3928 | for(;-1!==(n=e.indexOf('"',n));){t++
|
3929 | n++}return t}function d(e){var t=e.indexOf("=")
|
3930 | var n
|
3931 | var i
|
3932 | if(-1===t)n=e
|
3933 | else{n=e.substr(0,t)
|
3934 | i=e.substr(t+1)}return[n,i]}},function(e,t,n){"use strict"
|
3935 | e.exports=s
|
3936 | e.exports.preferredLanguages=s
|
3937 | var i=/^\s*([^\s\-;]+)(?:-([^\s;]+))?\s*(?:;(.*))?$/
|
3938 | function a(e,t){var n=i.exec(e)
|
3939 | if(!n)return null
|
3940 | var a=n[1],o=n[2],s=a
|
3941 | o&&(s+="-"+o)
|
3942 | var r=1
|
3943 | if(n[3]){var c=n[3].split(";")
|
3944 | for(t=0;t<c.length;t++){var p=c[t].split("=")
|
3945 | "q"===p[0]&&(r=parseFloat(p[1]))}}return{prefix:a,suffix:o,q:r,i:t,full:s}}function o(e,t,n){var i=a(e)
|
3946 | if(!i)return null
|
3947 | var o=0
|
3948 | if(t.full.toLowerCase()===i.full.toLowerCase())o|=4
|
3949 | else if(t.prefix.toLowerCase()===i.full.toLowerCase())o|=2
|
3950 | else if(t.full.toLowerCase()===i.prefix.toLowerCase())o|=1
|
3951 | else if("*"!==t.full)return null
|
3952 | return{i:n,o:t.i,q:t.q,s:o}}function s(e,t){var n=function(e){var t=e.split(",")
|
3953 | for(var n=0,i=0;n<t.length;n++){var o=a(t[n].trim(),n)
|
3954 | o&&(t[i++]=o)}t.length=i
|
3955 | return t}(void 0===e?"*":e||"")
|
3956 | if(!t)return n.filter(p).sort(r).map(c)
|
3957 | var i=t.map(function(e,t){return function(e,t,n){var i={o:-1,q:0,s:0}
|
3958 | for(var a=0;a<t.length;a++){var s=o(e,t[a],n)
|
3959 | s&&(i.s-s.s||i.q-s.q||i.o-s.o)<0&&(i=s)}return i}(e,n,t)})
|
3960 | return i.filter(p).sort(r).map(function(e){return t[i.indexOf(e)]})}function r(e,t){return t.q-e.q||t.s-e.s||e.o-t.o||e.i-t.i||0}function c(e){return e.full}function p(e){return e.q>0}},function(e,t,n){"use strict"
|
3961 | e.exports=s
|
3962 | e.exports.preferredEncodings=s
|
3963 | var i=/^\s*([^\s;]+)\s*(?:;(.*))?$/
|
3964 | function a(e,t){var n=i.exec(e)
|
3965 | if(!n)return null
|
3966 | var a=n[1]
|
3967 | var o=1
|
3968 | if(n[2]){var s=n[2].split(";")
|
3969 | for(t=0;t<s.length;t++){var r=s[t].trim().split("=")
|
3970 | if("q"===r[0]){o=parseFloat(r[1])
|
3971 | break}}}return{encoding:a,q:o,i:t}}function o(e,t,n){var i=0
|
3972 | if(t.encoding.toLowerCase()===e.toLowerCase())i|=1
|
3973 | else if("*"!==t.encoding)return null
|
3974 | return{i:n,o:t.i,q:t.q,s:i}}function s(e,t){var n=function(e){var t=e.split(",")
|
3975 | var n=!1
|
3976 | var i=1
|
3977 | for(var s=0,r=0;s<t.length;s++){var c=a(t[s].trim(),s)
|
3978 | if(c){t[r++]=c
|
3979 | n=n||o("identity",c)
|
3980 | i=Math.min(i,c.q||1)}}n||(t[r++]={encoding:"identity",q:i,i:s})
|
3981 | t.length=r
|
3982 | return t}(e||"")
|
3983 | if(!t)return n.filter(p).sort(r).map(c)
|
3984 | var i=t.map(function(e,t){return function(e,t,n){var i={o:-1,q:0,s:0}
|
3985 | for(var a=0;a<t.length;a++){var s=o(e,t[a],n)
|
3986 | s&&(i.s-s.s||i.q-s.q||i.o-s.o)<0&&(i=s)}return i}(e,n,t)})
|
3987 | return i.filter(p).sort(r).map(function(e){return t[i.indexOf(e)]})}function r(e,t){return t.q-e.q||t.s-e.s||e.o-t.o||e.i-t.i||0}function c(e){return e.encoding}function p(e){return e.q>0}},function(e,t,n){"use strict"
|
3988 | e.exports=s
|
3989 | e.exports.preferredCharsets=s
|
3990 | var i=/^\s*([^\s;]+)\s*(?:;(.*))?$/
|
3991 | function a(e,t){var n=i.exec(e)
|
3992 | if(!n)return null
|
3993 | var a=n[1]
|
3994 | var o=1
|
3995 | if(n[2]){var s=n[2].split(";")
|
3996 | for(t=0;t<s.length;t++){var r=s[t].trim().split("=")
|
3997 | if("q"===r[0]){o=parseFloat(r[1])
|
3998 | break}}}return{charset:a,q:o,i:t}}function o(e,t,n){var i=0
|
3999 | if(t.charset.toLowerCase()===e.toLowerCase())i|=1
|
4000 | else if("*"!==t.charset)return null
|
4001 | return{i:n,o:t.i,q:t.q,s:i}}function s(e,t){var n=function(e){var t=e.split(",")
|
4002 | for(var n=0,i=0;n<t.length;n++){var o=a(t[n].trim(),n)
|
4003 | o&&(t[i++]=o)}t.length=i
|
4004 | return t}(void 0===e?"*":e||"")
|
4005 | if(!t)return n.filter(p).sort(r).map(c)
|
4006 | var i=t.map(function(e,t){return function(e,t,n){var i={o:-1,q:0,s:0}
|
4007 | for(var a=0;a<t.length;a++){var s=o(e,t[a],n)
|
4008 | s&&(i.s-s.s||i.q-s.q||i.o-s.o)<0&&(i=s)}return i}(e,n,t)})
|
4009 | return i.filter(p).sort(r).map(function(e){return t[i.indexOf(e)]})}function r(e,t){return t.q-e.q||t.s-e.s||e.o-t.o||e.i-t.i||0}function c(e){return e.charset}function p(e){return e.q>0}},function(e,t,n){"use strict"
|
4010 | var i=Object.create(null)
|
4011 | e.exports=a
|
4012 | e.exports.Negotiator=a
|
4013 | function a(e){if(!(this instanceof a))return new a(e)
|
4014 | this.request=e}a.prototype.charset=function(e){var t=this.charsets(e)
|
4015 | return t&&t[0]}
|
4016 | a.prototype.charsets=function(e){return(0,o("charset").preferredCharsets)(this.request.headers["accept-charset"],e)}
|
4017 | a.prototype.encoding=function(e){var t=this.encodings(e)
|
4018 | return t&&t[0]}
|
4019 | a.prototype.encodings=function(e){return(0,o("encoding").preferredEncodings)(this.request.headers["accept-encoding"],e)}
|
4020 | a.prototype.language=function(e){var t=this.languages(e)
|
4021 | return t&&t[0]}
|
4022 | a.prototype.languages=function(e){return(0,o("language").preferredLanguages)(this.request.headers["accept-language"],e)}
|
4023 | a.prototype.mediaType=function(e){var t=this.mediaTypes(e)
|
4024 | return t&&t[0]}
|
4025 | a.prototype.mediaTypes=function(e){return(0,o("mediaType").preferredMediaTypes)(this.request.headers.accept,e)}
|
4026 | a.prototype.preferredCharset=a.prototype.charset
|
4027 | a.prototype.preferredCharsets=a.prototype.charsets
|
4028 | a.prototype.preferredEncoding=a.prototype.encoding
|
4029 | a.prototype.preferredEncodings=a.prototype.encodings
|
4030 | a.prototype.preferredLanguage=a.prototype.language
|
4031 | a.prototype.preferredLanguages=a.prototype.languages
|
4032 | a.prototype.preferredMediaType=a.prototype.mediaType
|
4033 | a.prototype.preferredMediaTypes=a.prototype.mediaTypes
|
4034 | function o(e){var t=i[e]
|
4035 | if(void 0!==t)return t
|
4036 | switch(e){case"charset":t=n(99)
|
4037 | break
|
4038 | case"encoding":t=n(98)
|
4039 | break
|
4040 | case"language":t=n(97)
|
4041 | break
|
4042 | case"mediaType":t=n(96)
|
4043 | break
|
4044 | default:throw new Error("Cannot find module '"+e+"'")}i[e]=t
|
4045 | return t}},function(e,t,n){"use strict"
|
4046 | var i=n(100)
|
4047 | var a=n(95)
|
4048 | e.exports=o
|
4049 | function o(e){if(!(this instanceof o))return new o(e)
|
4050 | this.headers=e.headers
|
4051 | this.negotiator=new i(e)}o.prototype.type=o.prototype.types=function(e){var t=e
|
4052 | if(t&&!Array.isArray(t)){t=new Array(arguments.length)
|
4053 | for(var n=0;n<t.length;n++)t[n]=arguments[n]}if(!t||0===t.length)return this.negotiator.mediaTypes()
|
4054 | if(!this.headers.accept)return t[0]
|
4055 | var i=t.map(s)
|
4056 | var a=this.negotiator.mediaTypes(i.filter(r))[0]
|
4057 | return!!a&&t[i.indexOf(a)]}
|
4058 | o.prototype.encoding=o.prototype.encodings=function(e){var t=e
|
4059 | if(t&&!Array.isArray(t)){t=new Array(arguments.length)
|
4060 | for(var n=0;n<t.length;n++)t[n]=arguments[n]}return t&&0!==t.length?this.negotiator.encodings(t)[0]||!1:this.negotiator.encodings()}
|
4061 | o.prototype.charset=o.prototype.charsets=function(e){var t=e
|
4062 | if(t&&!Array.isArray(t)){t=new Array(arguments.length)
|
4063 | for(var n=0;n<t.length;n++)t[n]=arguments[n]}return t&&0!==t.length?this.negotiator.charsets(t)[0]||!1:this.negotiator.charsets()}
|
4064 | o.prototype.lang=o.prototype.langs=o.prototype.language=o.prototype.languages=function(e){var t=e
|
4065 | if(t&&!Array.isArray(t)){t=new Array(arguments.length)
|
4066 | for(var n=0;n<t.length;n++)t[n]=arguments[n]}return t&&0!==t.length?this.negotiator.languages(t)[0]||!1:this.negotiator.languages()}
|
4067 | function s(e){return-1===e.indexOf("/")?a.lookup(e):e}function r(e){return"string"==typeof e}},function(e,t,n){"use strict"
|
4068 | e.exports=((e,t)=>{t=t||process.argv
|
4069 | const n=e.startsWith("-")?"":1===e.length?"-":"--"
|
4070 | const i=t.indexOf(n+e)
|
4071 | const a=t.indexOf("--")
|
4072 | return-1!==i&&(-1===a||i<a)})},function(e,t,n){"use strict"
|
4073 | const i=n(4)
|
4074 | const a=n(102)
|
4075 | const o=process.env
|
4076 | let s
|
4077 | a("no-color")||a("no-colors")||a("color=false")?s=!1:(a("color")||a("colors")||a("color=true")||a("color=always"))&&(s=!0)
|
4078 | "FORCE_COLOR"in o&&(s=0===o.FORCE_COLOR.length||0!==parseInt(o.FORCE_COLOR,10))
|
4079 | function r(e){return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(function(e){if(!1===s)return 0
|
4080 | if(a("color=16m")||a("color=full")||a("color=truecolor"))return 3
|
4081 | if(a("color=256"))return 2
|
4082 | if(e&&!e.isTTY&&!0!==s)return 0
|
4083 | const t=s?1:0
|
4084 | if("win32"===process.platform){const e=i.release().split(".")
|
4085 | return Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in o)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(e=>e in o)||"codeship"===o.CI_NAME?1:t
|
4086 | if("TEAMCITY_VERSION"in o)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0
|
4087 | if("truecolor"===o.COLORTERM)return 3
|
4088 | if("TERM_PROGRAM"in o){const e=parseInt((o.TERM_PROGRAM_VERSION||"").split(".")[0],10)
|
4089 | switch(o.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2
|
4090 | case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(o.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)?1:"COLORTERM"in o?1:(o.TERM,t)}(e))}e.exports={supportsColor:r,stdout:r(process.stdout),stderr:r(process.stderr)}},function(e,t,n){var i=n(45)
|
4091 | var a=n(1);(t=e.exports=n(47)).init=function(e){e.inspectOpts={}
|
4092 | var n=Object.keys(t.inspectOpts)
|
4093 | for(var i=0;i<n.length;i++)e.inspectOpts[n[i]]=t.inspectOpts[n[i]]}
|
4094 | t.log=function(){return process.stderr.write(a.format.apply(a,arguments)+"\n")}
|
4095 | t.formatArgs=function(e){var n=this.namespace
|
4096 | if(this.useColors){var i=this.color
|
4097 | var a="[3"+(i<8?i:"8;5;"+i)
|
4098 | var o=" "+a+";1m"+n+" [0m"
|
4099 | e[0]=o+e[0].split("\n").join("\n"+o)
|
4100 | e.push(a+"m+"+t.humanize(this.diff)+"[0m")}else e[0]=function(){return t.inspectOpts.hideDate?"":(new Date).toISOString()+" "}()+n+" "+e[0]}
|
4101 | t.save=function(e){null==e?delete process.env.DEBUG:process.env.DEBUG=e}
|
4102 | t.load=s
|
4103 | t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):i.isatty(process.stderr.fd)}
|
4104 | t.colors=[6,2,3,4,5,1]
|
4105 | try{var o=n(103)
|
4106 | o&&o.level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter(function(e){return/^debug_/i.test(e)}).reduce(function(e,t){var n=t.substring(6).toLowerCase().replace(/_([a-z])/g,function(e,t){return t.toUpperCase()})
|
4107 | var i=process.env[t]
|
4108 | i=!!/^(yes|on|true|enabled)$/i.test(i)||!/^(no|off|false|disabled)$/i.test(i)&&("null"===i?null:Number(i))
|
4109 | e[n]=i
|
4110 | return e},{})
|
4111 | t.formatters.o=function(e){this.inspectOpts.colors=this.useColors
|
4112 | return a.inspect(e,this.inspectOpts).split("\n").map(function(e){return e.trim()}).join(" ")}
|
4113 | t.formatters.O=function(e){this.inspectOpts.colors=this.useColors
|
4114 | return a.inspect(e,this.inspectOpts)}
|
4115 | function s(){return process.env.DEBUG}t.enable(s())},function(e,t,n){(t=e.exports=n(47)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}
|
4116 | t.formatArgs=function(e){var n=this.useColors
|
4117 | e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff)
|
4118 | if(!n)return
|
4119 | var i="color: "+this.color
|
4120 | e.splice(1,0,i,"color: inherit")
|
4121 | var a=0
|
4122 | var o=0
|
4123 | e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&"%c"===e&&(o=++a)})
|
4124 | e.splice(o,0,i)}
|
4125 | t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}}
|
4126 | t.load=i
|
4127 | t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0
|
4128 | if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1
|
4129 | return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}
|
4130 | t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}()
|
4131 | t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"]
|
4132 | t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}
|
4133 | function i(){var e
|
4134 | try{e=t.storage.debug}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG)
|
4135 | return e}t.enable(i())},function(e,t){e.exports=Object.keys||function(e){var t=[]
|
4136 | var n=Object.prototype.hasOwnProperty
|
4137 | for(var i in e)n.call(e,i)&&t.push(i)
|
4138 | return t}},function(e,t){e.exports=function(e,t,i){var a=!1
|
4139 | i=i||n
|
4140 | o.count=e
|
4141 | return 0===e?t():o
|
4142 | function o(e,n){if(o.count<=0)throw new Error("after called too many times");--o.count
|
4143 | if(e){a=!0
|
4144 | t(e)
|
4145 | t=i}else 0!==o.count||a||t(null,n)}}
|
4146 | function n(){}},function(e,t){var n={}.toString
|
4147 | e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){e.deprecate=function(){}
|
4148 | e.paths=[]
|
4149 | e.children||(e.children=[])
|
4150 | Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}})
|
4151 | Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}})
|
4152 | e.webpackPolyfill=1}return e}},function(e,t,n){(function(e){var i
|
4153 | !function(a){var o="object"==typeof t&&t
|
4154 | "object"==typeof e&&e&&e.exports
|
4155 | var s="object"==typeof global&&global
|
4156 | s.global!==s&&s.window!==s||s
|
4157 | var r=String.fromCharCode
|
4158 | function c(e){var t=[]
|
4159 | var n=0
|
4160 | var i=e.length
|
4161 | var a
|
4162 | var o
|
4163 | for(;n<i;)if((a=e.charCodeAt(n++))>=55296&&a<=56319&&n<i)if(56320==(64512&(o=e.charCodeAt(n++))))t.push(((1023&a)<<10)+(1023&o)+65536)
|
4164 | else{t.push(a)
|
4165 | n--}else t.push(a)
|
4166 | return t}function p(e,t){if(e>=55296&&e<=57343){if(t)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")
|
4167 | return!1}return!0}function l(e,t){return r(e>>t&63|128)}function u(e,t){if(0==(4294967168&e))return r(e)
|
4168 | var n=""
|
4169 | if(0==(4294965248&e))n=r(e>>6&31|192)
|
4170 | else if(0==(4294901760&e)){p(e,t)||(e=65533)
|
4171 | n=r(e>>12&15|224)
|
4172 | n+=l(e,6)}else if(0==(4292870144&e)){n=r(e>>18&7|240)
|
4173 | n+=l(e,12)
|
4174 | n+=l(e,6)}return n+=r(63&e|128)}function d(){if(v>=m)throw Error("Invalid byte index")
|
4175 | var e=255&h[v]
|
4176 | v++
|
4177 | if(128==(192&e))return 63&e
|
4178 | throw Error("Invalid continuation byte")}function f(e){var t
|
4179 | var n
|
4180 | if(v>m)throw Error("Invalid byte index")
|
4181 | if(v==m)return!1
|
4182 | t=255&h[v]
|
4183 | v++
|
4184 | if(0==(128&t))return t
|
4185 | if(192==(224&t)){if((n=(31&t)<<6|d())>=128)return n
|
4186 | throw Error("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|d()<<6|d())>=2048)return p(n,e)?n:65533
|
4187 | throw Error("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|d()<<12|d()<<6|d())>=65536&&n<=1114111)return n
|
4188 | throw Error("Invalid UTF-8 detected")}var h
|
4189 | var m
|
4190 | var v
|
4191 | var g={version:"2.1.2",encode:function(e,t){var n=!1!==(t=t||{}).strict
|
4192 | var i=c(e)
|
4193 | var a=i.length
|
4194 | var o=-1
|
4195 | var s=""
|
4196 | for(;++o<a;)s+=u(i[o],n)
|
4197 | return s},decode:function(e,t){var n=!1!==(t=t||{}).strict
|
4198 | h=c(e)
|
4199 | m=h.length
|
4200 | v=0
|
4201 | var i=[]
|
4202 | var a
|
4203 | for(;!1!==(a=f(n));)i.push(a)
|
4204 | return function(e){var t=e.length
|
4205 | var n=-1
|
4206 | var i
|
4207 | var a=""
|
4208 | for(;++n<t;){if((i=e[n])>65535){a+=r((i-=65536)>>>10&1023|55296)
|
4209 | i=56320|1023&i}a+=r(i)}return a}(i)}}
|
4210 | void 0!==(i=function(){return g}.call(t,n,t,e))&&(e.exports=i)}()}).call(this,n(109)(e))},function(e,t,n){var i=n(48)
|
4211 | var a=n(1)
|
4212 | e.exports=o
|
4213 | function o(e){i.call(this,e)}a.inherits(o,i)
|
4214 | o.prototype.onRequest=function(e){if("OPTIONS"===e.method){var t=e.res
|
4215 | var n=this.headers(e)
|
4216 | n["Access-Control-Allow-Headers"]="Content-Type"
|
4217 | t.writeHead(200,n)
|
4218 | t.end()}else i.prototype.onRequest.call(this,e)}
|
4219 | o.prototype.headers=function(e,t){t=t||{}
|
4220 | if(e.headers.origin){t["Access-Control-Allow-Credentials"]="true"
|
4221 | t["Access-Control-Allow-Origin"]=e.headers.origin}else t["Access-Control-Allow-Origin"]="*"
|
4222 | return i.prototype.headers.call(this,e,t)}},function(e,t,n){var i=n(5)
|
4223 | var a=function(){}
|
4224 | a.prototype.getRandomBytes=function(e){var t=this
|
4225 | if((e=e||12)>4096)return i.randomBytes(e)
|
4226 | var n=parseInt(4096/e)
|
4227 | var a=parseInt(.85*n)
|
4228 | if(!a)return i.randomBytes(e)
|
4229 | null==this.bytesBufferIndex&&(this.bytesBufferIndex=-1)
|
4230 | if(this.bytesBufferIndex==n){this.bytesBuffer=null
|
4231 | this.bytesBufferIndex=-1}if(-1==this.bytesBufferIndex||this.bytesBufferIndex>a){if(!this.isGeneratingBytes){this.isGeneratingBytes=!0
|
4232 | i.randomBytes(4096,function(e,n){t.bytesBuffer=n
|
4233 | t.bytesBufferIndex=0
|
4234 | t.isGeneratingBytes=!1})}if(-1==this.bytesBufferIndex)return i.randomBytes(e)}var o=this.bytesBuffer.slice(e*this.bytesBufferIndex,e*(this.bytesBufferIndex+1))
|
4235 | this.bytesBufferIndex++
|
4236 | return o}
|
4237 | a.prototype.generateId=function(){var e=new Buffer(15)
|
4238 | if(!e.writeInt32BE)return Math.abs(Math.random()*Math.random()*Date.now()|0).toString()+Math.abs(Math.random()*Math.random()*Date.now()|0).toString()
|
4239 | this.sequenceNumber=this.sequenceNumber+1|0
|
4240 | e.writeInt32BE(this.sequenceNumber,11)
|
4241 | i.randomBytes?this.getRandomBytes(12).copy(e):[0,4,8].forEach(function(t){e.writeInt32BE(Math.random()*Math.pow(2,32)|0,t)})
|
4242 | return e.toString("base64").replace(/\//g,"_").replace(/\+/g,"-")}
|
4243 | e.exports=new a},function(e,t,n){var i=n(50)
|
4244 | var a=n(3).parse
|
4245 | var o=n(112)
|
4246 | var s=n(49)
|
4247 | var r=n(7).EventEmitter
|
4248 | var c=n(44)
|
4249 | var p=n(1)
|
4250 | var l=n(6)("engine")
|
4251 | var u=n(90)
|
4252 | e.exports=d
|
4253 | function d(e){if(!(this instanceof d))return new d(e)
|
4254 | this.clients={}
|
4255 | this.clientsCount=0
|
4256 | e=e||{}
|
4257 | this.wsEngine=e.wsEngine||process.env.EIO_WS_ENGINE||"ws"
|
4258 | this.pingTimeout=e.pingTimeout||5e3
|
4259 | this.pingInterval=e.pingInterval||25e3
|
4260 | this.upgradeTimeout=e.upgradeTimeout||1e4
|
4261 | this.maxHttpBufferSize=e.maxHttpBufferSize||1e8
|
4262 | this.transports=e.transports||Object.keys(s)
|
4263 | this.allowUpgrades=!1!==e.allowUpgrades
|
4264 | this.allowRequest=e.allowRequest
|
4265 | this.cookie=!1!==e.cookie&&(e.cookie||"io")
|
4266 | this.cookiePath=!1!==e.cookiePath&&(e.cookiePath||"/")
|
4267 | this.cookieHttpOnly=!1!==e.cookieHttpOnly
|
4268 | this.perMessageDeflate=!1!==e.perMessageDeflate&&(e.perMessageDeflate||!0)
|
4269 | this.httpCompression=!1!==e.httpCompression&&(e.httpCompression||{})
|
4270 | this.initialPacket=e.initialPacket
|
4271 | var t=this;["perMessageDeflate","httpCompression"].forEach(function(e){var n=t[e]
|
4272 | !0===n&&(t[e]=n={})
|
4273 | n&&null==n.threshold&&(n.threshold=1024)})
|
4274 | this.init()}d.errors={UNKNOWN_TRANSPORT:0,UNKNOWN_SID:1,BAD_HANDSHAKE_METHOD:2,BAD_REQUEST:3,FORBIDDEN:4}
|
4275 | d.errorMessages={0:"Transport unknown",1:"Session ID unknown",2:"Bad handshake method",3:"Bad request",4:"Forbidden"}
|
4276 | p.inherits(d,r)
|
4277 | d.prototype.init=function(){if(~this.transports.indexOf("websocket")){this.ws&&this.ws.close()
|
4278 | var e
|
4279 | switch(this.wsEngine){case"uws":e=n(89)
|
4280 | break
|
4281 | case"ws":e=n(88)
|
4282 | break
|
4283 | default:throw new Error("unknown wsEngine")}this.ws=new e.Server({noServer:!0,clientTracking:!1,perMessageDeflate:this.perMessageDeflate,maxPayload:this.maxHttpBufferSize})}}
|
4284 | d.prototype.upgrades=function(e){return this.allowUpgrades&&s[e].upgradesTo||[]}
|
4285 | d.prototype.verify=function(e,t,n){var i=e._query.transport
|
4286 | if(!~this.transports.indexOf(i)){l('unknown transport "%s"',i)
|
4287 | return n(d.errors.UNKNOWN_TRANSPORT,!1)}if(function(e){if((e+="").length<1)return!1
|
4288 | if(!h[e.charCodeAt(0)])return!0
|
4289 | if(e.length<2)return!1
|
4290 | if(!h[e.charCodeAt(1)])return!0
|
4291 | if(e.length<3)return!1
|
4292 | if(!h[e.charCodeAt(2)])return!0
|
4293 | if(e.length<4)return!1
|
4294 | if(!h[e.charCodeAt(3)])return!0
|
4295 | for(var t=4;t<e.length;++t)if(!h[e.charCodeAt(t)])return!0
|
4296 | return!1}(e.headers.origin)){e.headers.origin=null
|
4297 | return n(d.errors.BAD_REQUEST,!1)}var a=e._query.sid
|
4298 | if(!a)return"GET"!==e.method?n(d.errors.BAD_HANDSHAKE_METHOD,!1):this.allowRequest?this.allowRequest(e,n):n(null,!0)
|
4299 | if(!this.clients.hasOwnProperty(a))return n(d.errors.UNKNOWN_SID,!1)
|
4300 | if(!t&&this.clients[a].transport.name!==i){l("bad request: unexpected transport without upgrade")
|
4301 | return n(d.errors.BAD_REQUEST,!1)}n(null,!0)}
|
4302 | d.prototype.prepare=function(e){e._query||(e._query=~e.url.indexOf("?")?i.parse(a(e.url).query):{})}
|
4303 | d.prototype.close=function(){l("closing all open clients")
|
4304 | for(var e in this.clients)this.clients.hasOwnProperty(e)&&this.clients[e].close(!0)
|
4305 | if(this.ws){l("closing webSocketServer")
|
4306 | this.ws.close()}return this}
|
4307 | d.prototype.handleRequest=function(e,t){l('handling "%s" http request "%s"',e.method,e.url)
|
4308 | this.prepare(e)
|
4309 | e.res=t
|
4310 | var n=this
|
4311 | this.verify(e,!1,function(i,a){if(a)if(e._query.sid){l("setting new request for existing client")
|
4312 | n.clients[e._query.sid].transport.onRequest(e)}else n.handshake(e._query.transport,e)
|
4313 | else f(e,t,i)})}
|
4314 | function f(e,t,n){var i={"Content-Type":"application/json"}
|
4315 | if(!d.errorMessages.hasOwnProperty(n)){t.writeHead(403,i)
|
4316 | t.end(JSON.stringify({code:d.errors.FORBIDDEN,message:n||d.errorMessages[d.errors.FORBIDDEN]}))}else{if(e.headers.origin){i["Access-Control-Allow-Credentials"]="true"
|
4317 | i["Access-Control-Allow-Origin"]=e.headers.origin}else i["Access-Control-Allow-Origin"]="*"
|
4318 | if(void 0!==t){t.writeHead(400,i)
|
4319 | t.end(JSON.stringify({code:n,message:d.errorMessages[n]}))}}}d.prototype.generateId=function(e){return o.generateId()}
|
4320 | d.prototype.handshake=function(e,t){var n=this.generateId(t)
|
4321 | l('handshaking client "%s"',n)
|
4322 | try{var i=new s[e](t)
|
4323 | if("polling"===e){i.maxHttpBufferSize=this.maxHttpBufferSize
|
4324 | i.httpCompression=this.httpCompression}else"websocket"===e&&(i.perMessageDeflate=this.perMessageDeflate)
|
4325 | t._query&&t._query.b64?i.supportsBinary=!1:i.supportsBinary=!0}catch(e){f(t,t.res,d.errors.BAD_REQUEST)
|
4326 | return}var a=new c(n,this,i,t)
|
4327 | var o=this
|
4328 | !1!==this.cookie&&i.on("headers",function(e){e["Set-Cookie"]=u.serialize(o.cookie,n,{path:o.cookiePath,httpOnly:!!o.cookiePath&&o.cookieHttpOnly})})
|
4329 | i.onRequest(t)
|
4330 | this.clients[n]=a
|
4331 | this.clientsCount++
|
4332 | a.once("close",function(){delete o.clients[n]
|
4333 | o.clientsCount--})
|
4334 | this.emit("connection",a)}
|
4335 | d.prototype.handleUpgrade=function(e,t,n){this.prepare(e)
|
4336 | var i=this
|
4337 | this.verify(e,!0,function(a,o){if(o){var s=new Buffer(n.length)
|
4338 | n.copy(s)
|
4339 | n=null
|
4340 | i.ws.handleUpgrade(e,t,s,function(t){i.onWebSocket(e,t)})}else!function(e,t){if(e.writable){var n=d.errorMessages.hasOwnProperty(t)?d.errorMessages[t]:t||""
|
4341 | var i=Buffer.byteLength(n)
|
4342 | e.write("HTTP/1.1 400 Bad Request\r\nConnection: close\r\nContent-type: text/html\r\nContent-Length: "+i+"\r\n\r\n"+n)}e.destroy()}(t,a)})}
|
4343 | d.prototype.onWebSocket=function(e,t){t.on("error",o)
|
4344 | if(void 0===s[e._query.transport]||s[e._query.transport].prototype.handlesUpgrades){var n=e._query.sid
|
4345 | e.websocket=t
|
4346 | if(n){var i=this.clients[n]
|
4347 | if(i)if(i.upgrading){l("transport has already been trying to upgrade")
|
4348 | t.close()}else if(i.upgraded){l("transport had already been upgraded")
|
4349 | t.close()}else{l("upgrading existing transport")
|
4350 | t.removeListener("error",o)
|
4351 | var a=new s[e._query.transport](e)
|
4352 | e._query&&e._query.b64?a.supportsBinary=!1:a.supportsBinary=!0
|
4353 | a.perMessageDeflate=this.perMessageDeflate
|
4354 | i.maybeUpgrade(a)}else{l("upgrade attempt for closed client")
|
4355 | t.close()}}else{t.removeListener("error",o)
|
4356 | this.handshake(e._query.transport,e)}}else{l("transport doesnt handle upgraded requests")
|
4357 | t.close()}function o(){l("websocket error before upgrade")}}
|
4358 | d.prototype.attach=function(e,t){var n=this
|
4359 | var i=((t=t||{}).path||"/engine.io").replace(/\/$/,"")
|
4360 | var a=t.destroyUpgradeTimeout||1e3
|
4361 | i+="/"
|
4362 | function o(e){return("OPTIONS"!==e.method||!1!==t.handlePreflightRequest)&&i===e.url.substr(0,i.length)}var s=e.listeners("request").slice(0)
|
4363 | e.removeAllListeners("request")
|
4364 | e.on("close",n.close.bind(n))
|
4365 | e.on("listening",n.init.bind(n))
|
4366 | e.on("request",function(a,r){if(o(a)){l('intercepting request for path "%s"',i)
|
4367 | "OPTIONS"===a.method&&"function"==typeof t.handlePreflightRequest?t.handlePreflightRequest.call(e,a,r):n.handleRequest(a,r)}else for(var c=0,p=s.length;c<p;c++)s[c].call(e,a,r)})
|
4368 | ~n.transports.indexOf("websocket")&&e.on("upgrade",function(e,i,s){o(e)?n.handleUpgrade(e,i,s):!1!==t.destroyUpgrade&&setTimeout(function(){if(i.writable&&i.bytesWritten<=0)return i.end()},a)})}
|
4369 | var h=[0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]},function(e,t,n){var i=n(8);(t=e.exports=function(){return arguments.length&&arguments[0]instanceof i.Server?a.apply(this,arguments):t.Server.apply(null,arguments)}).protocol=1
|
4370 | t.Server=n(113)
|
4371 | t.Socket=n(44)
|
4372 | t.Transport=n(25)
|
4373 | t.transports=n(49)
|
4374 | t.parser=n(19)
|
4375 | t.listen=function(e,n,a){if("function"==typeof n){a=n
|
4376 | n={}}var o=i.createServer(function(e,t){t.writeHead(501)
|
4377 | t.end("Not Implemented")})
|
4378 | var s=t.attach(o,n)
|
4379 | s.httpServer=o
|
4380 | o.listen(e,a)
|
4381 | return s}
|
4382 | t.attach=a
|
4383 | function a(e,n){var i=new t.Server(n)
|
4384 | i.attach(e,n)
|
4385 | return i}}])
|