forked from json-schema-faker/json-schema-faker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
json-schema-faker.min.js
619 lines (609 loc) · 286 KB
/
json-schema-faker.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
/*
MIT
json-schema-faker library v0.5.0-rc10
http://json-schema-faker.js.org
Copyright (c) 2014-2017 Alvaro Cabrera & Tomasz Ducin
Released under the MIT license
Date: 2017-07-08 01:12:12.776Z
The buffer module from node.js, for the browser.
@author Feross Aboukhadijeh <[email protected]> <http://feross.org>
@license MIT
@overview es6-promise - a tiny implementation of Promises/A+.
@copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
@license Licensed under MIT license
See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE
@version 3.1.2
https://mths.be/punycode v1.4.1 by @mathias @description Recursive object extending
@author Viacheslav Lotsmanov <[email protected]>
@license MIT
The MIT License (MIT)
Copyright (c) 2013-2015 Viacheslav Lotsmanov
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
*****************************************************************************/
(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?module.exports=factory():typeof define==="function"&&define.amd?define(factory):global.JSONSchemaFaker=factory()})(this,function(){var jsonSchemaRefParser=createCommonjsModule(function(module,exports){(function(f){if(typeof exports==="object"&&typeof module!=="undefined")module.exports=f();else if(typeof define==="function"&&define.amd)define([],f);else{var g;if(typeof window!=="undefined")g=window;else if(typeof global!==
"undefined")g=global;else if(typeof self!=="undefined")g=self;else g=this;g.$RefParser=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof _dereq_=="function"&&_dereq_;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f;}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof _dereq_==
"function"&&_dereq_;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(_dereq_,module,exports){var $Ref=_dereq_("./ref"),Pointer=_dereq_("./pointer"),debug=_dereq_("./util/debug"),url=_dereq_("./util/url");module.exports=bundle;function bundle(parser,options){debug("Bundling $ref pointers in %s",parser.$refs._root$Ref.path);var inventory=[];crawl(parser,"schema",parser.$refs._root$Ref.path+"#","#",inventory,parser.$refs,options);remap(inventory)}function crawl(parent,key,path,pathFromRoot,
inventory,$refs,options){var obj=key===null?parent:parent[key];if(obj&&typeof obj==="object")if($Ref.is$Ref(obj))inventory$Ref(parent,key,path,pathFromRoot,inventory,$refs,options);else{var keys=Object.keys(obj);var defs=keys.indexOf("definitions");if(defs>0)keys.splice(0,0,keys.splice(defs,1)[0]);keys.forEach(function(key){var keyPath=Pointer.join(path,key);var keyPathFromRoot=Pointer.join(pathFromRoot,key);var value=obj[key];if($Ref.is$Ref(value))inventory$Ref(obj,key,path,keyPathFromRoot,inventory,
$refs,options);else crawl(obj,key,keyPath,keyPathFromRoot,inventory,$refs,options)})}}function inventory$Ref($refParent,$refKey,path,pathFromRoot,inventory,$refs,options){if(inventory.some(function(i){return i.parent===$refParent&&i.key===$refKey}))return;var $ref=$refKey===null?$refParent:$refParent[$refKey];var $refPath=url.resolve(path,$ref.$ref);var pointer=$refs._resolve($refPath,options);var depth=Pointer.parse(pathFromRoot).length;var file=url.stripHash(pointer.path);var hash=url.getHash(pointer.path);
var external=file!==$refs._root$Ref.path;var extended=$Ref.isExtended$Ref($ref);inventory.push({$ref:$ref,parent:$refParent,key:$refKey,pathFromRoot:pathFromRoot,depth:depth,file:file,hash:hash,value:pointer.value,circular:pointer.circular,extended:extended,external:external});crawl(pointer.value,null,pointer.path,pathFromRoot,inventory,$refs,options)}function remap(inventory){inventory.sort(function(a,b){if(a.file!==b.file)return a.file<b.file?-1:+1;else if(a.hash!==b.hash)return a.hash<b.hash?-1:
+1;else if(a.circular!==b.circular)return a.circular?-1:+1;else if(a.extended!==b.extended)return a.extended?+1:-1;else if(a.depth!==b.depth)return a.depth-b.depth;else return b.pathFromRoot.lastIndexOf("/definitions")-a.pathFromRoot.lastIndexOf("/definitions")});var file,hash,pathFromRoot;inventory.forEach(function(i){debug('Re-mapping $ref pointer "%s" at %s',i.$ref.$ref,i.pathFromRoot);if(!i.external)i.$ref.$ref=i.hash;else if(i.file===file&&i.hash===hash)i.$ref.$ref=pathFromRoot;else if(i.file===
file&&i.hash.indexOf(hash+"/")===0)i.$ref.$ref=Pointer.join(pathFromRoot,Pointer.parse(i.hash));else{file=i.file;hash=i.hash;pathFromRoot=i.pathFromRoot;i.$ref=i.parent[i.key]=$Ref.dereference(i.$ref,i.value);if(i.circular)i.$ref.$ref=i.pathFromRoot}debug(" new value: %s",i.$ref&&i.$ref.$ref?i.$ref.$ref:"[object Object]")})}},{"./pointer":10,"./ref":11,"./util/debug":16,"./util/url":19}],2:[function(_dereq_,module,exports){var $Ref=_dereq_("./ref"),Pointer=_dereq_("./pointer"),ono=_dereq_("ono"),
debug=_dereq_("./util/debug"),url=_dereq_("./util/url");module.exports=dereference;function dereference(parser,options){debug("Dereferencing $ref pointers in %s",parser.$refs._root$Ref.path);var dereferenced=crawl(parser.schema,parser.$refs._root$Ref.path,"#",[],parser.$refs,options);parser.$refs.circular=dereferenced.circular;parser.schema=dereferenced.value}function crawl(obj,path,pathFromRoot,parents,$refs,options){var dereferenced;var result={value:obj,circular:false};if(obj&&typeof obj==="object"){parents.push(obj);
if($Ref.isAllowed$Ref(obj,options)){dereferenced=dereference$Ref(obj,path,pathFromRoot,parents,$refs,options);result.circular=dereferenced.circular;result.value=dereferenced.value}else Object.keys(obj).forEach(function(key){var keyPath=Pointer.join(path,key);var keyPathFromRoot=Pointer.join(pathFromRoot,key);var value=obj[key];var circular=false;if($Ref.isAllowed$Ref(value,options)){dereferenced=dereference$Ref(value,keyPath,keyPathFromRoot,parents,$refs,options);circular=dereferenced.circular;obj[key]=
dereferenced.value}else if(parents.indexOf(value)===-1){dereferenced=crawl(value,keyPath,keyPathFromRoot,parents,$refs,options);circular=dereferenced.circular;obj[key]=dereferenced.value}else circular=foundCircularReference(keyPath,$refs,options);result.circular=result.circular||circular});parents.pop()}return result}function dereference$Ref($ref,path,pathFromRoot,parents,$refs,options){debug('Dereferencing $ref pointer "%s" at %s',$ref.$ref,path);var $refPath=url.resolve(path,$ref.$ref);var pointer=
$refs._resolve($refPath,options);var directCircular=pointer.circular;var circular=directCircular||parents.indexOf(pointer.value)!==-1;circular&&foundCircularReference(path,$refs,options);var dereferencedValue=$Ref.dereference($ref,pointer.value);if(!circular){var dereferenced=crawl(dereferencedValue,pointer.path,pathFromRoot,parents,$refs,options);circular=dereferenced.circular;dereferencedValue=dereferenced.value}if(circular&&!directCircular&&options.dereference.circular==="ignore")dereferencedValue=
$ref;if(directCircular)dereferencedValue.$ref=pathFromRoot;return{circular:circular,value:dereferencedValue}}function foundCircularReference(keyPath,$refs,options){$refs.circular=true;if(!options.dereference.circular)throw ono.reference("Circular $ref pointer found at %s",keyPath);return true}},{"./pointer":10,"./ref":11,"./util/debug":16,"./util/url":19,"ono":69}],3:[function(_dereq_,module,exports){(function(Buffer){var Promise=_dereq_("./util/promise"),Options=_dereq_("./options"),$Refs=_dereq_("./refs"),
parse=_dereq_("./parse"),resolveExternal=_dereq_("./resolve-external"),bundle=_dereq_("./bundle"),dereference=_dereq_("./dereference"),url=_dereq_("./util/url"),maybe=_dereq_("call-me-maybe"),ono=_dereq_("ono");module.exports=$RefParser;module.exports.YAML=_dereq_("./util/yaml");function $RefParser(){this.schema=null;this.$refs=new $Refs}$RefParser.parse=function(schema,options,callback){var Class=this;var instance=new Class;return instance.parse.apply(instance,arguments)};$RefParser.prototype.parse=
function(schema,options,callback){var args=normalizeArgs(arguments);var promise;if(!args.path&&!args.schema){var err=ono("Expected a file path, URL, or object. Got %s",args.path||args.schema);return maybe(args.callback,Promise.reject(err))}this.schema=null;this.$refs=new $Refs;if(url.isFileSystemPath(args.path))args.path=url.fromFileSystemPath(args.path);args.path=url.resolve(url.cwd(),args.path);if(args.schema&&typeof args.schema==="object"){this.$refs._add(args.path,args.schema);promise=Promise.resolve(args.schema)}else promise=
parse(args.path,this.$refs,args.options);var me=this;return promise.then(function(result){if(!result||typeof result!=="object"||Buffer.isBuffer(result))throw ono.syntax('"%s" is not a valid JSON Schema',me.$refs._root$Ref.path||result);else{me.schema=result;return maybe(args.callback,Promise.resolve(me.schema))}}).catch(function(e){return maybe(args.callback,Promise.reject(e))})};$RefParser.resolve=function(schema,options,callback){var Class=this;var instance=new Class;return instance.resolve.apply(instance,
arguments)};$RefParser.prototype.resolve=function(schema,options,callback){var me=this;var args=normalizeArgs(arguments);return this.parse(args.path,args.schema,args.options).then(function(){return resolveExternal(me,args.options)}).then(function(){return maybe(args.callback,Promise.resolve(me.$refs))}).catch(function(err){return maybe(args.callback,Promise.reject(err))})};$RefParser.bundle=function(schema,options,callback){var Class=this;var instance=new Class;return instance.bundle.apply(instance,
arguments)};$RefParser.prototype.bundle=function(schema,options,callback){var me=this;var args=normalizeArgs(arguments);return this.resolve(args.path,args.schema,args.options).then(function(){bundle(me,args.options);return maybe(args.callback,Promise.resolve(me.schema))}).catch(function(err){return maybe(args.callback,Promise.reject(err))})};$RefParser.dereference=function(schema,options,callback){var Class=this;var instance=new Class;return instance.dereference.apply(instance,arguments)};$RefParser.prototype.dereference=
function(schema,options,callback){var me=this;var args=normalizeArgs(arguments);return this.resolve(args.path,args.schema,args.options).then(function(){dereference(me,args.options);return maybe(args.callback,Promise.resolve(me.schema))}).catch(function(err){return maybe(args.callback,Promise.reject(err))})};function normalizeArgs(args){var path,schema,options,callback;args=Array.prototype.slice.call(args);if(typeof args[args.length-1]==="function")callback=args.pop();if(typeof args[0]==="string"){path=
args[0];if(typeof args[2]==="object"){schema=args[1];options=args[2]}else{schema=undefined;options=args[1]}}else{path="";schema=args[0];options=args[1]}if(!(options instanceof Options))options=new Options(options);return{path:path,schema:schema,options:options,callback:callback}}}).call(this,{"isBuffer":_dereq_("../node_modules/is-buffer/index.js")})},{"../node_modules/is-buffer/index.js":36,"./bundle":1,"./dereference":2,"./options":4,"./parse":5,"./refs":12,"./resolve-external":13,"./util/promise":18,
"./util/url":19,"./util/yaml":20,"call-me-maybe":27,"ono":69}],4:[function(_dereq_,module,exports){var jsonParser=_dereq_("./parsers/json"),yamlParser=_dereq_("./parsers/yaml"),textParser=_dereq_("./parsers/text"),binaryParser=_dereq_("./parsers/binary"),fileResolver=_dereq_("./resolvers/file"),httpResolver=_dereq_("./resolvers/http"),zschemaValidator=_dereq_("./validators/z-schema");module.exports=$RefParserOptions;function $RefParserOptions(options){merge(this,$RefParserOptions.defaults);merge(this,
options)}$RefParserOptions.defaults={parse:{json:jsonParser,yaml:yamlParser,text:textParser,binary:binaryParser},resolve:{file:fileResolver,http:httpResolver,external:true},dereference:{circular:true},validate:{zschema:zschemaValidator}};function merge(target,source){if(isMergeable(source)){var keys=Object.keys(source);for(var i=0;i<keys.length;i++){var key=keys[i];var sourceSetting=source[key];var targetSetting=target[key];if(isMergeable(sourceSetting))target[key]=merge(targetSetting||{},sourceSetting);
else if(sourceSetting!==undefined)target[key]=sourceSetting}}return target}function isMergeable(val){return val&&typeof val==="object"&&!Array.isArray(val)&&!(val instanceof RegExp)&&!(val instanceof Date)}},{"./parsers/binary":6,"./parsers/json":7,"./parsers/text":8,"./parsers/yaml":9,"./resolvers/file":14,"./resolvers/http":15,"./validators/z-schema":21}],5:[function(_dereq_,module,exports){(function(Buffer){var ono=_dereq_("ono"),debug=_dereq_("./util/debug"),url=_dereq_("./util/url"),plugins=
_dereq_("./util/plugins"),Promise=_dereq_("./util/promise");module.exports=parse;function parse(path,$refs,options){try{path=url.stripHash(path);var $ref=$refs._add(path);var file={url:path,extension:url.getExtension(path)};return readFile(file,options).then(function(resolver){$ref.pathType=resolver.plugin.name;file.data=resolver.result;return parseFile(file,options)}).then(function(parser){$ref.value=parser.result;return parser.result})}catch(e){return Promise.reject(e)}}function readFile(file,options){return new Promise(function(resolve,
reject){debug("Reading %s",file.url);var resolvers=plugins.all(options.resolve);resolvers=plugins.filter(resolvers,"canRead",file);plugins.sort(resolvers);plugins.run(resolvers,"read",file).then(resolve,onError);function onError(err){if(err&&!(err instanceof SyntaxError))reject(err);else reject(ono.syntax('Unable to resolve $ref pointer "%s"',file.url))}})}function parseFile(file,options){return new Promise(function(resolve,reject){debug("Parsing %s",file.url);var allParsers=plugins.all(options.parse);
var filteredParsers=plugins.filter(allParsers,"canParse",file);var parsers=filteredParsers.length>0?filteredParsers:allParsers;plugins.sort(parsers);plugins.run(parsers,"parse",file).then(onParsed,onError);function onParsed(parser){if(!parser.plugin.allowEmpty&&isEmpty(parser.result))reject(ono.syntax('Error parsing "%s" as %s. \nParsed value is empty',file.url,parser.plugin.name));else resolve(parser)}function onError(err){if(err){err=err instanceof Error?err:new Error(err);reject(ono.syntax(err,
"Error parsing %s",file.url))}else reject(ono.syntax("Unable to parse %s",file.url))}})}function isEmpty(value){return value===undefined||typeof value==="object"&&Object.keys(value).length===0||typeof value==="string"&&value.trim().length===0||Buffer.isBuffer(value)&&value.length===0}}).call(this,{"isBuffer":_dereq_("../node_modules/is-buffer/index.js")})},{"../node_modules/is-buffer/index.js":36,"./util/debug":16,"./util/plugins":17,"./util/promise":18,"./util/url":19,"ono":69}],6:[function(_dereq_,
module,exports){(function(Buffer){var BINARY_REGEXP=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;module.exports={order:400,allowEmpty:true,canParse:function isBinary(file){return Buffer.isBuffer(file.data)&&BINARY_REGEXP.test(file.url)},parse:function parseBinary(file){if(Buffer.isBuffer(file.data))return file.data;else return new Buffer(file.data)}}}).call(this,_dereq_("buffer").Buffer)},{"buffer":25}],7:[function(_dereq_,module,exports){(function(Buffer){var Promise=_dereq_("../util/promise");module.exports=
{order:100,allowEmpty:true,canParse:".json",parse:function parseJSON(file){return new Promise(function(resolve,reject){var data=file.data;if(Buffer.isBuffer(data))data=data.toString();if(typeof data==="string")if(data.trim().length===0)resolve(undefined);else resolve(JSON.parse(data));else resolve(data)})}}}).call(this,{"isBuffer":_dereq_("../../node_modules/is-buffer/index.js")})},{"../../node_modules/is-buffer/index.js":36,"../util/promise":18}],8:[function(_dereq_,module,exports){(function(Buffer){var TEXT_REGEXP=
/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;module.exports={order:300,allowEmpty:true,encoding:"utf8",canParse:function isText(file){return(typeof file.data==="string"||Buffer.isBuffer(file.data))&&TEXT_REGEXP.test(file.url)},parse:function parseText(file){if(typeof file.data==="string")return file.data;else if(Buffer.isBuffer(file.data))return file.data.toString(this.encoding);else throw new Error("data is not text");}}}).call(this,{"isBuffer":_dereq_("../../node_modules/is-buffer/index.js")})},
{"../../node_modules/is-buffer/index.js":36}],9:[function(_dereq_,module,exports){(function(Buffer){var Promise=_dereq_("../util/promise"),YAML=_dereq_("../util/yaml");module.exports={order:200,allowEmpty:true,canParse:[".yaml",".yml",".json"],parse:function parseYAML(file){return new Promise(function(resolve,reject){var data=file.data;if(Buffer.isBuffer(data))data=data.toString();if(typeof data==="string")resolve(YAML.parse(data));else resolve(data)})}}}).call(this,{"isBuffer":_dereq_("../../node_modules/is-buffer/index.js")})},
{"../../node_modules/is-buffer/index.js":36,"../util/promise":18,"../util/yaml":20}],10:[function(_dereq_,module,exports){module.exports=Pointer;var $Ref=_dereq_("./ref"),url=_dereq_("./util/url"),ono=_dereq_("ono"),slashes=/\//g,tildes=/~/g,escapedSlash=/~1/g,escapedTilde=/~0/g;function Pointer($ref,path){this.$ref=$ref;this.path=path;this.value=undefined;this.circular=false}Pointer.prototype.resolve=function(obj,options){var tokens=Pointer.parse(this.path);this.value=obj;for(var i=0;i<tokens.length;i++){if(resolveIf$Ref(this,
options))this.path=Pointer.join(this.path,tokens.slice(i));var token=tokens[i];if(this.value[token]===undefined)throw ono.syntax('Error resolving $ref pointer "%s". \nToken "%s" does not exist.',this.path,token);else this.value=this.value[token]}resolveIf$Ref(this,options);return this};Pointer.prototype.set=function(obj,value,options){var tokens=Pointer.parse(this.path);var token;if(tokens.length===0){this.value=value;return value}this.value=obj;for(var i=0;i<tokens.length-1;i++){resolveIf$Ref(this,
options);token=tokens[i];if(this.value&&this.value[token]!==undefined)this.value=this.value[token];else this.value=setValue(this,token,{})}resolveIf$Ref(this,options);token=tokens[tokens.length-1];setValue(this,token,value);return obj};Pointer.parse=function(path){var pointer=url.getHash(path).substr(1);if(!pointer)return[];pointer=pointer.split("/");for(var i=0;i<pointer.length;i++)pointer[i]=decodeURI(pointer[i].replace(escapedSlash,"/").replace(escapedTilde,"~"));if(pointer[0]!=="")throw ono.syntax('Invalid $ref pointer "%s". Pointers must begin with "#/"',
pointer);return pointer.slice(1)};Pointer.join=function(base,tokens){if(base.indexOf("#")===-1)base+="#";tokens=Array.isArray(tokens)?tokens:[tokens];for(var i=0;i<tokens.length;i++){var token=tokens[i];base+="/"+encodeURI(token.replace(tildes,"~0").replace(slashes,"~1"))}return base};function resolveIf$Ref(pointer,options){if($Ref.isAllowed$Ref(pointer.value,options)){var $refPath=url.resolve(pointer.path,pointer.value.$ref);if($refPath===pointer.path)pointer.circular=true;else{var resolved=pointer.$ref.$refs._resolve($refPath,
options);if($Ref.isExtended$Ref(pointer.value))pointer.value=$Ref.dereference(pointer.value,resolved.value);else{pointer.$ref=resolved.$ref;pointer.path=resolved.path;pointer.value=resolved.value}return true}}}function setValue(pointer,token,value){if(pointer.value&&typeof pointer.value==="object")if(token==="-"&&Array.isArray(pointer.value))pointer.value.push(value);else pointer.value[token]=value;else throw ono.syntax('Error assigning $ref pointer "%s". \nCannot set "%s" of a non-object.',pointer.path,
token);return value}},{"./ref":11,"./util/url":19,"ono":69}],11:[function(_dereq_,module,exports){module.exports=$Ref;var Pointer=_dereq_("./pointer");function $Ref(){this.path=undefined;this.value=undefined;this.$refs=undefined;this.pathType=undefined}$Ref.prototype.exists=function(path,options){try{this.resolve(path,options);return true}catch(e){return false}};$Ref.prototype.get=function(path,options){return this.resolve(path,options).value};$Ref.prototype.resolve=function(path,options){var pointer=
new Pointer(this,path);return pointer.resolve(this.value,options)};$Ref.prototype.set=function(path,value){var pointer=new Pointer(this,path);this.value=pointer.set(this.value,value)};$Ref.is$Ref=function(value){return value&&typeof value==="object"&&typeof value.$ref==="string"&&value.$ref.length>0};$Ref.isExternal$Ref=function(value){return $Ref.is$Ref(value)&&value.$ref[0]!=="#"};$Ref.isAllowed$Ref=function(value,options){if($Ref.is$Ref(value))if(value.$ref[0]==="#"||!options||options.resolve.external)return true};
$Ref.isExtended$Ref=function(value){return $Ref.is$Ref(value)&&Object.keys(value).length>1};$Ref.dereference=function($ref,resolvedValue){if(resolvedValue&&typeof resolvedValue==="object"&&$Ref.isExtended$Ref($ref)){var merged={};Object.keys($ref).forEach(function(key){if(key!=="$ref")merged[key]=$ref[key]});Object.keys(resolvedValue).forEach(function(key){if(!(key in merged))merged[key]=resolvedValue[key]});return merged}else return resolvedValue}},{"./pointer":10}],12:[function(_dereq_,module,exports){var ono=
_dereq_("ono"),$Ref=_dereq_("./ref"),url=_dereq_("./util/url");module.exports=$Refs;function $Refs(){this.circular=false;this._$refs={};this._root$Ref=null}$Refs.prototype.paths=function(types){var paths=getPaths(this._$refs,arguments);return paths.map(function(path){return path.decoded})};$Refs.prototype.values=function(types){var $refs=this._$refs;var paths=getPaths($refs,arguments);return paths.reduce(function(obj,path){obj[path.decoded]=$refs[path.encoded].value;return obj},{})};$Refs.prototype.toJSON=
$Refs.prototype.values;$Refs.prototype.exists=function(path,options){try{this._resolve(path,options);return true}catch(e){return false}};$Refs.prototype.get=function(path,options){return this._resolve(path,options).value};$Refs.prototype.set=function(path,value){path=url.resolve(this._root$Ref.path,path);var withoutHash=url.stripHash(path);var $ref=this._$refs[withoutHash];if(!$ref)throw ono('Error resolving $ref pointer "%s". \n"%s" not found.',path,withoutHash);$ref.set(path,value)};$Refs.prototype._add=
function(path,value){var withoutHash=url.stripHash(path);var $ref=new $Ref;$ref.path=withoutHash;$ref.value=value;$ref.$refs=this;this._$refs[withoutHash]=$ref;this._root$Ref=this._root$Ref||$ref;return $ref};$Refs.prototype._resolve=function(path,options){path=url.resolve(this._root$Ref.path,path);var withoutHash=url.stripHash(path);var $ref=this._$refs[withoutHash];if(!$ref)throw ono('Error resolving $ref pointer "%s". \n"%s" not found.',path,withoutHash);return $ref.resolve(path,options)};$Refs.prototype._get$Ref=
function(path){path=url.resolve(this._root$Ref.path,path);var withoutHash=url.stripHash(path);return this._$refs[withoutHash]};function getPaths($refs,types){var paths=Object.keys($refs);types=Array.isArray(types[0])?types[0]:Array.prototype.slice.call(types);if(types.length>0&&types[0])paths=paths.filter(function(key){return types.indexOf($refs[key].pathType)!==-1});return paths.map(function(path){return{encoded:path,decoded:$refs[path].pathType==="file"?url.toFileSystemPath(path,true):path}})}},
{"./ref":11,"./util/url":19,"ono":69}],13:[function(_dereq_,module,exports){var Promise=_dereq_("./util/promise"),$Ref=_dereq_("./ref"),Pointer=_dereq_("./pointer"),parse=_dereq_("./parse"),debug=_dereq_("./util/debug"),url=_dereq_("./util/url");module.exports=resolveExternal;function resolveExternal(parser,options){if(!options.resolve.external)return Promise.resolve();try{debug("Resolving $ref pointers in %s",parser.$refs._root$Ref.path);var promises=crawl(parser.schema,parser.$refs._root$Ref.path+
"#",parser.$refs,options);return Promise.all(promises)}catch(e){return Promise.reject(e)}}function crawl(obj,path,$refs,options){var promises=[];if(obj&&typeof obj==="object")if($Ref.isExternal$Ref(obj))promises.push(resolve$Ref(obj,path,$refs,options));else Object.keys(obj).forEach(function(key){var keyPath=Pointer.join(path,key);var value=obj[key];if($Ref.isExternal$Ref(value))promises.push(resolve$Ref(value,keyPath,$refs,options));else promises=promises.concat(crawl(value,keyPath,$refs,options))});
return promises}function resolve$Ref($ref,path,$refs,options){debug('Resolving $ref pointer "%s" at %s',$ref.$ref,path);var resolvedPath=url.resolve(path,$ref.$ref);var withoutHash=url.stripHash(resolvedPath);$ref=$refs._$refs[withoutHash];if($ref)return Promise.resolve($ref.value);return parse(resolvedPath,$refs,options).then(function(result){debug("Resolving $ref pointers in %s",withoutHash);var promises=crawl(result,withoutHash+"#",$refs,options);return Promise.all(promises)})}},{"./parse":5,"./pointer":10,
"./ref":11,"./util/debug":16,"./util/promise":18,"./util/url":19}],14:[function(_dereq_,module,exports){var fs=_dereq_("fs"),ono=_dereq_("ono"),Promise=_dereq_("../util/promise"),url=_dereq_("../util/url"),debug=_dereq_("../util/debug");module.exports={order:100,canRead:function isFile(file){return url.isFileSystemPath(file.url)},read:function readFile(file){return new Promise(function(resolve,reject){var path;try{path=url.toFileSystemPath(file.url)}catch(err){reject(ono.uri(err,"Malformed URI: %s",
file.url))}debug("Opening file: %s",path);try{fs.readFile(path,function(err,data){if(err)reject(ono(err,'Error opening file "%s"',path));else resolve(data)})}catch(err){reject(ono(err,'Error opening file "%s"',path))}})}}},{"../util/debug":16,"../util/promise":18,"../util/url":19,"fs":24,"ono":69}],15:[function(_dereq_,module,exports){(function(process,Buffer){var http=_dereq_("http"),https=_dereq_("https"),ono=_dereq_("ono"),url=_dereq_("../util/url"),debug=_dereq_("../util/debug"),Promise=_dereq_("../util/promise");
module.exports={order:200,headers:null,timeout:5E3,redirects:5,withCredentials:false,canRead:function isHttp(file){return url.isHttp(file.url)},read:function readHttp(file){var u=url.parse(file.url);if(process.browser&&!u.protocol)u.protocol=url.parse(location.href).protocol;return download(u,this)}};function download(u,httpOptions,redirects){return new Promise(function(resolve,reject){u=url.parse(u);redirects=redirects||[];redirects.push(u.href);get(u,httpOptions).then(function(res){if(res.statusCode>=
400)throw ono({status:res.statusCode},"HTTP ERROR %d",res.statusCode);else if(res.statusCode>=300)if(redirects.length>httpOptions.redirects)reject(ono({status:res.statusCode},"Error downloading %s. \nToo many redirects: \n %s",redirects[0],redirects.join(" \n ")));else if(!res.headers.location)throw ono({status:res.statusCode},"HTTP %d redirect with no location header",res.statusCode);else{debug("HTTP %d redirect %s -\x3e %s",res.statusCode,u.href,res.headers.location);var redirectTo=url.resolve(u,
res.headers.location);download(redirectTo,httpOptions,redirects).then(resolve,reject)}else resolve(res.body||new Buffer(0))}).catch(function(err){reject(ono(err,"Error downloading",u.href))})})}function get(u,httpOptions){return new Promise(function(resolve,reject){debug("GET",u.href);var protocol=u.protocol==="https:"?https:http;var req=protocol.get({hostname:u.hostname,port:u.port,path:u.path,auth:u.auth,headers:httpOptions.headers||{},withCredentials:httpOptions.withCredentials});if(typeof req.setTimeout===
"function")req.setTimeout(httpOptions.timeout);req.on("timeout",function(){req.abort()});req.on("error",reject);req.once("response",function(res){res.body=new Buffer(0);res.on("data",function(data){res.body=Buffer.concat([res.body,new Buffer(data)])});res.on("error",reject);res.on("end",function(){resolve(res)})})})}}).call(this,_dereq_("_process"),_dereq_("buffer").Buffer)},{"../util/debug":16,"../util/promise":18,"../util/url":19,"_process":71,"buffer":25,"http":87,"https":33,"ono":69}],16:[function(_dereq_,
module,exports){var debug=_dereq_("debug");module.exports=debug("json-schema-ref-parser")},{"debug":29}],17:[function(_dereq_,module,exports){var Promise=_dereq_("./promise"),debug=_dereq_("./debug");exports.all=function(plugins){return Object.keys(plugins).filter(function(key){return typeof plugins[key]==="object"}).map(function(key){plugins[key].name=key;return plugins[key]})};exports.filter=function(plugins,method,file){return plugins.filter(function(plugin){return!!getResult(plugin,method,file)})};
exports.sort=function(plugins){plugins.forEach(function(plugin){plugin.order=plugin.order||Number.MAX_SAFE_INTEGER});return plugins.sort(function(a,b){return a.order-b.order})};exports.run=function(plugins,method,file){var plugin,lastError,index=0;return new Promise(function(resolve,reject){runNextPlugin();function runNextPlugin(){plugin=plugins[index++];if(!plugin)return reject(lastError);try{debug(" %s",plugin.name);var result=getResult(plugin,method,file,callback);if(result&&typeof result.then===
"function")result.then(onSuccess,onError);else if(result!==undefined)onSuccess(result)}catch(e){onError(e)}}function callback(err,result){if(err)onError(err);else onSuccess(result)}function onSuccess(result){debug(" success");resolve({plugin:plugin,result:result})}function onError(err){debug(" %s",err.message||err);lastError=err;runNextPlugin()}})};function getResult(obj,prop,file,callback){var value=obj[prop];if(typeof value==="function")return value.apply(obj,[file,callback]);if(!callback)if(value instanceof
RegExp)return value.test(file.url);else if(typeof value==="string")return value===file.extension;else if(Array.isArray(value))return value.indexOf(file.extension)!==-1;return value}},{"./debug":16,"./promise":18}],18:[function(_dereq_,module,exports){module.exports=typeof Promise==="function"?Promise:_dereq_("es6-promise").Promise},{"es6-promise":31}],19:[function(_dereq_,module,exports){(function(process){var isWindows=/^win/.test(process.platform),forwardSlashPattern=/\//g,protocolPattern=/^([a-z0-9.+-]+):\/\//i,
url=module.exports;var urlEncodePatterns=[/\?/g,"%3F",/\#/g,"%23",isWindows?/\\/g:/\//,"/"];var urlDecodePatterns=[/\%23/g,"#",/\%24/g,"$",/\%26/g,"\x26",/\%2C/g,",",/\%40/g,"@"];exports.parse=_dereq_("url").parse;exports.resolve=_dereq_("url").resolve;exports.cwd=function cwd(){return process.browser?location.href:process.cwd()+"/"};exports.getProtocol=function getProtocol(path){var match=protocolPattern.exec(path);if(match)return match[1].toLowerCase()};exports.getExtension=function getExtension(path){var lastDot=
path.lastIndexOf(".");if(lastDot>=0)return path.substr(lastDot).toLowerCase();return""};exports.getHash=function getHash(path){var hashIndex=path.indexOf("#");if(hashIndex>=0)return path.substr(hashIndex);return"#"};exports.stripHash=function stripHash(path){var hashIndex=path.indexOf("#");if(hashIndex>=0)path=path.substr(0,hashIndex);return path};exports.isHttp=function isHttp(path){var protocol=url.getProtocol(path);if(protocol==="http"||protocol==="https")return true;else if(protocol===undefined)return process.browser;
else return false};exports.isFileSystemPath=function isFileSystemPath(path){if(process.browser)return false;var protocol=url.getProtocol(path);return protocol===undefined||protocol==="file"};exports.fromFileSystemPath=function fromFileSystemPath(path){for(var i=0;i<urlEncodePatterns.length;i+=2)path=path.replace(urlEncodePatterns[i],urlEncodePatterns[i+1]);return encodeURI(path)};exports.toFileSystemPath=function toFileSystemPath(path,keepFileProtocol){path=decodeURI(path);for(var i=0;i<urlDecodePatterns.length;i+=
2)path=path.replace(urlDecodePatterns[i],urlDecodePatterns[i+1]);var isFileUrl=path.substr(0,7).toLowerCase()==="file://";if(isFileUrl){path=path[7]==="/"?path.substr(8):path.substr(7);if(isWindows&&path[1]==="/")path=path[0]+":"+path.substr(1);if(keepFileProtocol)path="file:///"+path;else{isFileUrl=false;path=isWindows?path:"/"+path}}if(isWindows&&!isFileUrl)path=path.replace(forwardSlashPattern,"\\");return path}}).call(this,_dereq_("_process"))},{"_process":71,"url":93}],20:[function(_dereq_,module,
exports){var yaml=_dereq_("js-yaml"),ono=_dereq_("ono");module.exports={parse:function yamlParse(text,reviver){try{return yaml.safeLoad(text)}catch(e){if(e instanceof Error)throw e;else throw ono(e,e.message);}},stringify:function yamlStringify(value,replacer,space){try{var indent=(typeof space==="string"?space.length:space)||2;return yaml.safeDump(value,{indent:indent})}catch(e){if(e instanceof Error)throw e;else throw ono(e,e.message);}}}},{"js-yaml":38,"ono":69}],21:[function(_dereq_,module,exports){module.exports=
{order:100,canValidate:function canValidate(file){return!!file.resolved},validate:function validate(file){}}},{}],22:[function(_dereq_,module,exports){var lookup="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";(function(exports){var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;var PLUS="+".charCodeAt(0);var SLASH="/".charCodeAt(0);var NUMBER="0".charCodeAt(0);var LOWER="a".charCodeAt(0);var UPPER="A".charCodeAt(0);var PLUS_URL_SAFE="-".charCodeAt(0);var SLASH_URL_SAFE="_".charCodeAt(0);
function decode(elt){var code=elt.charCodeAt(0);if(code===PLUS||code===PLUS_URL_SAFE)return 62;if(code===SLASH||code===SLASH_URL_SAFE)return 63;if(code<NUMBER)return-1;if(code<NUMBER+10)return code-NUMBER+26+26;if(code<UPPER+26)return code-UPPER;if(code<LOWER+26)return code-LOWER+26}function b64ToByteArray(b64){var i,j,l,tmp,placeHolders,arr;if(b64.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var len=b64.length;placeHolders="\x3d"===b64.charAt(len-2)?2:"\x3d"===b64.charAt(len-
1)?1:0;arr=new Arr(b64.length*3/4-placeHolders);l=placeHolders>0?b64.length-4:b64.length;var L=0;function push(v){arr[L++]=v}for(i=0,j=0;i<l;i+=4,j+=3){tmp=decode(b64.charAt(i))<<18|decode(b64.charAt(i+1))<<12|decode(b64.charAt(i+2))<<6|decode(b64.charAt(i+3));push((tmp&16711680)>>16);push((tmp&65280)>>8);push(tmp&255)}if(placeHolders===2){tmp=decode(b64.charAt(i))<<2|decode(b64.charAt(i+1))>>4;push(tmp&255)}else if(placeHolders===1){tmp=decode(b64.charAt(i))<<10|decode(b64.charAt(i+1))<<4|decode(b64.charAt(i+
2))>>2;push(tmp>>8&255);push(tmp&255)}return arr}function uint8ToBase64(uint8){var i,extraBytes=uint8.length%3,output="",temp,length;function encode(num){return lookup.charAt(num)}function tripletToBase64(num){return encode(num>>18&63)+encode(num>>12&63)+encode(num>>6&63)+encode(num&63)}for(i=0,length=uint8.length-extraBytes;i<length;i+=3){temp=(uint8[i]<<16)+(uint8[i+1]<<8)+uint8[i+2];output+=tripletToBase64(temp)}switch(extraBytes){case 1:temp=uint8[uint8.length-1];output+=encode(temp>>2);output+=
encode(temp<<4&63);output+="\x3d\x3d";break;case 2:temp=(uint8[uint8.length-2]<<8)+uint8[uint8.length-1];output+=encode(temp>>10);output+=encode(temp>>4&63);output+=encode(temp<<2&63);output+="\x3d";break}return output}exports.toByteArray=b64ToByteArray;exports.fromByteArray=uint8ToBase64})(typeof exports==="undefined"?this.base64js={}:exports)},{}],23:[function(_dereq_,module,exports){},{}],24:[function(_dereq_,module,exports){arguments[4][23][0].apply(exports,arguments)},{"dup":23}],25:[function(_dereq_,
module,exports){(function(global){var base64=_dereq_("base64-js");var ieee754=_dereq_("ieee754");var isArray=_dereq_("isarray");exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;Buffer.poolSize=8192;var rootParent={};Buffer.TYPED_ARRAY_SUPPORT=global.TYPED_ARRAY_SUPPORT!==undefined?global.TYPED_ARRAY_SUPPORT:typedArraySupport();function typedArraySupport(){function Bar(){}try{var arr=new Uint8Array(1);arr.foo=function(){return 42};arr.constructor=Bar;return arr.foo()===
42&&arr.constructor===Bar&&typeof arr.subarray==="function"&&arr.subarray(1,1).byteLength===0}catch(e){return false}}function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Buffer(arg){if(!(this instanceof Buffer)){if(arguments.length>1)return new Buffer(arg,arguments[1]);return new Buffer(arg)}if(!Buffer.TYPED_ARRAY_SUPPORT){this.length=0;this.parent=undefined}if(typeof arg==="number")return fromNumber(this,arg);if(typeof arg==="string")return fromString(this,arg,arguments.length>
1?arguments[1]:"utf8");return fromObject(this,arg)}function fromNumber(that,length){that=allocate(that,length<0?0:checked(length)|0);if(!Buffer.TYPED_ARRAY_SUPPORT)for(var i=0;i<length;i++)that[i]=0;return that}function fromString(that,string,encoding){if(typeof encoding!=="string"||encoding==="")encoding="utf8";var length=byteLength(string,encoding)|0;that=allocate(that,length);that.write(string,encoding);return that}function fromObject(that,object){if(Buffer.isBuffer(object))return fromBuffer(that,
object);if(isArray(object))return fromArray(that,object);if(object==null)throw new TypeError("must start with number, buffer, array or string");if(typeof ArrayBuffer!=="undefined"){if(object.buffer instanceof ArrayBuffer)return fromTypedArray(that,object);if(object instanceof ArrayBuffer)return fromArrayBuffer(that,object)}if(object.length)return fromArrayLike(that,object);return fromJsonObject(that,object)}function fromBuffer(that,buffer){var length=checked(buffer.length)|0;that=allocate(that,length);
buffer.copy(that,0,0,length);return that}function fromArray(that,array){var length=checked(array.length)|0;that=allocate(that,length);for(var i=0;i<length;i+=1)that[i]=array[i]&255;return that}function fromTypedArray(that,array){var length=checked(array.length)|0;that=allocate(that,length);for(var i=0;i<length;i+=1)that[i]=array[i]&255;return that}function fromArrayBuffer(that,array){if(Buffer.TYPED_ARRAY_SUPPORT){JSCOMPILER_PRESERVE(array.byteLength);that=Buffer._augment(new Uint8Array(array))}else that=
fromTypedArray(that,new Uint8Array(array));return that}function fromArrayLike(that,array){var length=checked(array.length)|0;that=allocate(that,length);for(var i=0;i<length;i+=1)that[i]=array[i]&255;return that}function fromJsonObject(that,object){var array;var length=0;if(object.type==="Buffer"&&isArray(object.data)){array=object.data;length=checked(array.length)|0}that=allocate(that,length);for(var i=0;i<length;i+=1)that[i]=array[i]&255;return that}if(Buffer.TYPED_ARRAY_SUPPORT){Buffer.prototype.__proto__=
Uint8Array.prototype;Buffer.__proto__=Uint8Array}else{Buffer.prototype.length=undefined;Buffer.prototype.parent=undefined}function allocate(that,length){if(Buffer.TYPED_ARRAY_SUPPORT){that=Buffer._augment(new Uint8Array(length));that.__proto__=Buffer.prototype}else{that.length=length;that._isBuffer=true}var fromPool=length!==0&&length<=Buffer.poolSize>>>1;if(fromPool)that.parent=rootParent;return that}function checked(length){if(length>=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum "+
"size: 0x"+kMaxLength().toString(16)+" bytes");return length|0}function SlowBuffer(subject,encoding){if(!(this instanceof SlowBuffer))return new SlowBuffer(subject,encoding);var buf=new Buffer(subject,encoding);delete buf.parent;return buf}Buffer.isBuffer=function isBuffer(b){return!!(b!=null&&b._isBuffer)};Buffer.compare=function compare(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;var x=a.length;var y=b.length;var i=0;var len=
Math.min(x,y);while(i<len){if(a[i]!==b[i])break;++i}if(i!==len){x=a[i];y=b[i]}if(x<y)return-1;if(y<x)return 1;return 0};Buffer.isEncoding=function isEncoding(encoding){switch(String(encoding).toLowerCase()){case "hex":case "utf8":case "utf-8":case "ascii":case "binary":case "base64":case "raw":case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return true;default:return false}};Buffer.concat=function concat(list,length){if(!isArray(list))throw new TypeError("list argument must be an Array of Buffers.");
if(list.length===0)return new Buffer(0);var i;if(length===undefined){length=0;for(i=0;i<list.length;i++)length+=list[i].length}var buf=new Buffer(length);var pos=0;for(i=0;i<list.length;i++){var item=list[i];item.copy(buf,pos);pos+=item.length}return buf};function byteLength(string,encoding){if(typeof string!=="string")string=""+string;var len=string.length;if(len===0)return 0;var loweredCase=false;for(;;)switch(encoding){case "ascii":case "binary":case "raw":case "raws":return len;case "utf8":case "utf-8":return utf8ToBytes(string).length;
case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return len*2;case "hex":return len>>>1;case "base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase();loweredCase=true}}Buffer.byteLength=byteLength;function slowToString(encoding,start,end){var loweredCase=false;start=start|0;end=end===undefined||end===Infinity?this.length:end|0;if(!encoding)encoding="utf8";if(start<0)start=0;if(end>this.length)end=this.length;
if(end<=start)return"";while(true)switch(encoding){case "hex":return hexSlice(this,start,end);case "utf8":case "utf-8":return utf8Slice(this,start,end);case "ascii":return asciiSlice(this,start,end);case "binary":return binarySlice(this,start,end);case "base64":return base64Slice(this,start,end);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=
true}}Buffer.prototype.toString=function toString(){var length=this.length|0;if(length===0)return"";if(arguments.length===0)return utf8Slice(this,0,length);return slowToString.apply(this,arguments)};Buffer.prototype.equals=function equals(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return true;return Buffer.compare(this,b)===0};Buffer.prototype.inspect=function inspect(){var str="";var max=exports.INSPECT_MAX_BYTES;if(this.length>0){str=this.toString("hex",
0,max).match(/.{2}/g).join(" ");if(this.length>max)str+=" ... "}return"\x3cBuffer "+str+"\x3e"};Buffer.prototype.compare=function compare(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return 0;return Buffer.compare(this,b)};Buffer.prototype.indexOf=function indexOf(val,byteOffset){if(byteOffset>2147483647)byteOffset=2147483647;else if(byteOffset<-2147483648)byteOffset=-2147483648;byteOffset>>=0;if(this.length===0)return-1;if(byteOffset>=this.length)return-1;
if(byteOffset<0)byteOffset=Math.max(this.length+byteOffset,0);if(typeof val==="string"){if(val.length===0)return-1;return String.prototype.indexOf.call(this,val,byteOffset)}if(Buffer.isBuffer(val))return arrayIndexOf(this,val,byteOffset);if(typeof val==="number"){if(Buffer.TYPED_ARRAY_SUPPORT&&Uint8Array.prototype.indexOf==="function")return Uint8Array.prototype.indexOf.call(this,val,byteOffset);return arrayIndexOf(this,[val],byteOffset)}function arrayIndexOf(arr,val,byteOffset){var foundIndex=-1;
for(var i=0;byteOffset+i<arr.length;i++)if(arr[byteOffset+i]===val[foundIndex===-1?0:i-foundIndex]){if(foundIndex===-1)foundIndex=i;if(i-foundIndex+1===val.length)return byteOffset+foundIndex}else foundIndex=-1;return-1}throw new TypeError("val must be string, number or Buffer");};Buffer.prototype.get=function get(offset){console.log(".get() is deprecated. Access using array indexes instead.");return this.readUInt8(offset)};Buffer.prototype.set=function set(v,offset){console.log(".set() is deprecated. Access using array indexes instead.");
return this.writeUInt8(v,offset)};function hexWrite(buf,string,offset,length){offset=Number(offset)||0;var remaining=buf.length-offset;if(!length)length=remaining;else{length=Number(length);if(length>remaining)length=remaining}var strLen=string.length;if(strLen%2!==0)throw new Error("Invalid hex string");if(length>strLen/2)length=strLen/2;for(var i=0;i<length;i++){var parsed=parseInt(string.substr(i*2,2),16);if(isNaN(parsed))throw new Error("Invalid hex string");buf[offset+i]=parsed}return i}function utf8Write(buf,
string,offset,length){return blitBuffer(utf8ToBytes(string,buf.length-offset),buf,offset,length)}function asciiWrite(buf,string,offset,length){return blitBuffer(asciiToBytes(string),buf,offset,length)}function binaryWrite(buf,string,offset,length){return asciiWrite(buf,string,offset,length)}function base64Write(buf,string,offset,length){return blitBuffer(base64ToBytes(string),buf,offset,length)}function ucs2Write(buf,string,offset,length){return blitBuffer(utf16leToBytes(string,buf.length-offset),
buf,offset,length)}Buffer.prototype.write=function write(string,offset,length,encoding){if(offset===undefined){encoding="utf8";length=this.length;offset=0}else if(length===undefined&&typeof offset==="string"){encoding=offset;length=this.length;offset=0}else if(isFinite(offset)){offset=offset|0;if(isFinite(length)){length=length|0;if(encoding===undefined)encoding="utf8"}else{encoding=length;length=undefined}}else{var swap=encoding;encoding=offset;offset=length|0;length=swap}var remaining=this.length-
offset;if(length===undefined||length>remaining)length=remaining;if(string.length>0&&(length<0||offset<0)||offset>this.length)throw new RangeError("attempt to write outside buffer bounds");if(!encoding)encoding="utf8";var loweredCase=false;for(;;)switch(encoding){case "hex":return hexWrite(this,string,offset,length);case "utf8":case "utf-8":return utf8Write(this,string,offset,length);case "ascii":return asciiWrite(this,string,offset,length);case "binary":return binaryWrite(this,string,offset,length);
case "base64":return base64Write(this,string,offset,length);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase();loweredCase=true}};Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start,end){if(start===0&&end===buf.length)return base64.fromByteArray(buf);
else return base64.fromByteArray(buf.slice(start,end))}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);var res=[];var i=start;while(i<end){var firstByte=buf[i];var codePoint=null;var bytesPerSequence=firstByte>239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:if(firstByte<128)codePoint=firstByte;break;case 2:secondByte=buf[i+1];if((secondByte&192)===128){tempCodePoint=(firstByte&31)<<
6|secondByte&63;if(tempCodePoint>127)codePoint=tempCodePoint}break;case 3:secondByte=buf[i+1];thirdByte=buf[i+2];if((secondByte&192)===128&&(thirdByte&192)===128){tempCodePoint=(firstByte&15)<<12|(secondByte&63)<<6|thirdByte&63;if(tempCodePoint>2047&&(tempCodePoint<55296||tempCodePoint>57343))codePoint=tempCodePoint}break;case 4:secondByte=buf[i+1];thirdByte=buf[i+2];fourthByte=buf[i+3];if((secondByte&192)===128&&(thirdByte&192)===128&&(fourthByte&192)===128){tempCodePoint=(firstByte&15)<<18|(secondByte&
63)<<12|(thirdByte&63)<<6|fourthByte&63;if(tempCodePoint>65535&&tempCodePoint<1114112)codePoint=tempCodePoint}}}if(codePoint===null){codePoint=65533;bytesPerSequence=1}else if(codePoint>65535){codePoint-=65536;res.push(codePoint>>>10&1023|55296);codePoint=56320|codePoint&1023}res.push(codePoint);i+=bytesPerSequence}return decodeCodePointsArray(res)}var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,
codePoints);var res="";var i=0;while(i<len)res+=String.fromCharCode.apply(String,codePoints.slice(i,i+=MAX_ARGUMENTS_LENGTH));return res}function asciiSlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;i++)ret+=String.fromCharCode(buf[i]&127);return ret}function binarySlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;i++)ret+=String.fromCharCode(buf[i]);return ret}function hexSlice(buf,start,end){var len=buf.length;if(!start||start<
0)start=0;if(!end||end<0||end>len)end=len;var out="";for(var i=start;i<end;i++)out+=toHex(buf[i]);return out}function utf16leSlice(buf,start,end){var bytes=buf.slice(start,end);var res="";for(var i=0;i<bytes.length;i+=2)res+=String.fromCharCode(bytes[i]+bytes[i+1]*256);return res}Buffer.prototype.slice=function slice(start,end){var len=this.length;start=~~start;end=end===undefined?len:~~end;if(start<0){start+=len;if(start<0)start=0}else if(start>len)start=len;if(end<0){end+=len;if(end<0)end=0}else if(end>
len)end=len;if(end<start)end=start;var newBuf;if(Buffer.TYPED_ARRAY_SUPPORT)newBuf=Buffer._augment(this.subarray(start,end));else{var sliceLen=end-start;newBuf=new Buffer(sliceLen,undefined);for(var i=0;i<sliceLen;i++)newBuf[i]=this[i+start]}if(newBuf.length)newBuf.parent=this.parent||this;return newBuf};function checkOffset(offset,ext,length){if(offset%1!==0||offset<0)throw new RangeError("offset is not uint");if(offset+ext>length)throw new RangeError("Trying to access beyond buffer length");}Buffer.prototype.readUIntLE=
function readUIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i<byteLength&&(mul*=256))val+=this[offset+i]*mul;return val};Buffer.prototype.readUIntBE=function readUIntBE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset+--byteLength];var mul=1;while(byteLength>0&&(mul*=256))val+=
this[offset+--byteLength]*mul;return val};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=
function readUInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,
byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i<byteLength&&(mul*=256))val+=this[offset+i]*mul;mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=256))val+=this[offset+--i]*mul;mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);
return val};Buffer.prototype.readInt8=function readInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=
this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function readFloatLE(offset,
noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){if(!noAssert)checkOffset(offset,
8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError("buffer must be a Buffer instance");if(value>max||value<min)throw new RangeError("value is out of bounds");if(offset+ext>buf.length)throw new RangeError("index out of range");}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkInt(this,value,offset,
byteLength,Math.pow(2,8*byteLength),0);var mul=1;var i=0;this[offset]=value&255;while(++i<byteLength&&(mul*=256))this[offset+i]=value/mul&255;return offset+byteLength};Buffer.prototype.writeUIntBE=function writeUIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength),0);var i=byteLength-1;var mul=1;this[offset+i]=value&255;while(--i>=0&&(mul*=256))this[offset+i]=value/mul&255;return offset+
byteLength};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,255,0);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);this[offset]=value&255;return offset+1};function objectWriteUInt16(buf,value,offset,littleEndian){if(value<0)value=65535+value+1;for(var i=0,j=Math.min(buf.length-offset,2);i<j;i++)buf[offset+i]=(value&255<<8*(littleEndian?i:1-i))>>>(littleEndian?i:1-i)*8}Buffer.prototype.writeUInt16LE=
function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8}else objectWriteUInt16(this,value,offset,true);return offset+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value&
255}else objectWriteUInt16(this,value,offset,false);return offset+2};function objectWriteUInt32(buf,value,offset,littleEndian){if(value<0)value=4294967295+value+1;for(var i=0,j=Math.min(buf.length-offset,4);i<j;i++)buf[offset+i]=value>>>(littleEndian?i:3-i)*8&255}Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset+3]=value>>>24;this[offset+2]=value>>>
16;this[offset+1]=value>>>8;this[offset]=value&255}else objectWriteUInt32(this,value,offset,true);return offset+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255}else objectWriteUInt32(this,value,offset,false);return offset+4};Buffer.prototype.writeIntLE=
function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0;var mul=1;var sub=value<0?1:0;this[offset]=value&255;while(++i<byteLength&&(mul*=256))this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength};Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-
1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1;var mul=1;var sub=value<0?1:0;this[offset+i]=value&255;while(--i>=0&&(mul*=256))this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);if(value<0)value=255+value+1;this[offset]=value&255;return offset+1};Buffer.prototype.writeInt16LE=
function writeInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8}else objectWriteUInt16(this,value,offset,true);return offset+2};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=
value&255}else objectWriteUInt16(this,value,offset,false);return offset+2};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24}else objectWriteUInt32(this,value,offset,true);return offset+4};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,
noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=4294967295+value+1;if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255}else objectWriteUInt32(this,value,offset,false);return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(value>max||value<min)throw new RangeError("value is out of bounds");if(offset+ext>buf.length)throw new RangeError("index out of range");
if(offset<0)throw new RangeError("index out of range");}function writeFloat(buf,value,offset,littleEndian,noAssert){if(!noAssert)checkIEEE754(buf,value,offset,4,3.4028234663852886e+38,-3.4028234663852886e+38);ieee754.write(buf,value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,
offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){if(!noAssert)checkIEEE754(buf,value,offset,8,1.7976931348623157e+308,-1.7976931348623157e+308);ieee754.write(buf,value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};
Buffer.prototype.copy=function copy(target,targetStart,start,end){if(!start)start=0;if(!end&&end!==0)end=this.length;if(targetStart>=target.length)targetStart=target.length;if(!targetStart)targetStart=0;if(end>0&&end<start)end=start;if(end===start)return 0;if(target.length===0||this.length===0)return 0;if(targetStart<0)throw new RangeError("targetStart out of bounds");if(start<0||start>=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");
if(end>this.length)end=this.length;if(target.length-targetStart<end-start)end=target.length-targetStart+start;var len=end-start;var i;if(this===target&&start<targetStart&&targetStart<end)for(i=len-1;i>=0;i--)target[i+targetStart]=this[i+start];else if(len<1E3||!Buffer.TYPED_ARRAY_SUPPORT)for(i=0;i<len;i++)target[i+targetStart]=this[i+start];else target._set(this.subarray(start,start+len),targetStart);return len};Buffer.prototype.fill=function fill(value,start,end){if(!value)value=0;if(!start)start=
0;if(!end)end=this.length;if(end<start)throw new RangeError("end \x3c start");if(end===start)return;if(this.length===0)return;if(start<0||start>=this.length)throw new RangeError("start out of bounds");if(end<0||end>this.length)throw new RangeError("end out of bounds");var i;if(typeof value==="number")for(i=start;i<end;i++)this[i]=value;else{var bytes=utf8ToBytes(value.toString());var len=bytes.length;for(i=start;i<end;i++)this[i]=bytes[i%len]}return this};Buffer.prototype.toArrayBuffer=function toArrayBuffer(){if(typeof Uint8Array!==
"undefined")if(Buffer.TYPED_ARRAY_SUPPORT)return(new Buffer(this)).buffer;else{var buf=new Uint8Array(this.length);for(var i=0,len=buf.length;i<len;i+=1)buf[i]=this[i];return buf.buffer}else throw new TypeError("Buffer.toArrayBuffer not supported in this browser");};var BP=Buffer.prototype;Buffer._augment=function _augment(arr){arr.constructor=Buffer;arr._isBuffer=true;arr._set=arr.set;arr.get=BP.get;arr.set=BP.set;arr.write=BP.write;arr.toString=BP.toString;arr.toLocaleString=BP.toString;arr.toJSON=
BP.toJSON;arr.equals=BP.equals;arr.compare=BP.compare;arr.indexOf=BP.indexOf;arr.copy=BP.copy;arr.slice=BP.slice;arr.readUIntLE=BP.readUIntLE;arr.readUIntBE=BP.readUIntBE;arr.readUInt8=BP.readUInt8;arr.readUInt16LE=BP.readUInt16LE;arr.readUInt16BE=BP.readUInt16BE;arr.readUInt32LE=BP.readUInt32LE;arr.readUInt32BE=BP.readUInt32BE;arr.readIntLE=BP.readIntLE;arr.readIntBE=BP.readIntBE;arr.readInt8=BP.readInt8;arr.readInt16LE=BP.readInt16LE;arr.readInt16BE=BP.readInt16BE;arr.readInt32LE=BP.readInt32LE;
arr.readInt32BE=BP.readInt32BE;arr.readFloatLE=BP.readFloatLE;arr.readFloatBE=BP.readFloatBE;arr.readDoubleLE=BP.readDoubleLE;arr.readDoubleBE=BP.readDoubleBE;arr.writeUInt8=BP.writeUInt8;arr.writeUIntLE=BP.writeUIntLE;arr.writeUIntBE=BP.writeUIntBE;arr.writeUInt16LE=BP.writeUInt16LE;arr.writeUInt16BE=BP.writeUInt16BE;arr.writeUInt32LE=BP.writeUInt32LE;arr.writeUInt32BE=BP.writeUInt32BE;arr.writeIntLE=BP.writeIntLE;arr.writeIntBE=BP.writeIntBE;arr.writeInt8=BP.writeInt8;arr.writeInt16LE=BP.writeInt16LE;
arr.writeInt16BE=BP.writeInt16BE;arr.writeInt32LE=BP.writeInt32LE;arr.writeInt32BE=BP.writeInt32BE;arr.writeFloatLE=BP.writeFloatLE;arr.writeFloatBE=BP.writeFloatBE;arr.writeDoubleLE=BP.writeDoubleLE;arr.writeDoubleBE=BP.writeDoubleBE;arr.fill=BP.fill;arr.inspect=BP.inspect;arr.toArrayBuffer=BP.toArrayBuffer;return arr};var INVALID_BASE64_RE=/[^+\/0-9A-Za-z-_]/g;function base64clean(str){str=stringtrim(str).replace(INVALID_BASE64_RE,"");if(str.length<2)return"";while(str.length%4!==0)str=str+"\x3d";
return str}function stringtrim(str){if(str.trim)return str.trim();return str.replace(/^\s+|\s+$/g,"")}function toHex(n){if(n<16)return"0"+n.toString(16);return n.toString(16)}function utf8ToBytes(string,units){units=units||Infinity;var codePoint;var length=string.length;var leadSurrogate=null;var bytes=[];for(var i=0;i<length;i++){codePoint=string.charCodeAt(i);if(codePoint>55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===
length){if((units-=3)>-1)bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else if(leadSurrogate)if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=null;if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=
3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<1114112){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else throw new Error("Invalid code point");}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i<str.length;i++)byteArray.push(str.charCodeAt(i)&255);return byteArray}function utf16leToBytes(str,units){var c,hi,lo;var byteArray=[];for(var i=0;i<str.length;i++){if((units-=
2)<0)break;c=str.charCodeAt(i);hi=c>>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i<length;i++){if(i+offset>=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"base64-js":22,"ieee754":34,"isarray":37}],26:[function(_dereq_,
module,exports){module.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",
404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",
429:"Too Many Requests",431:"Request Header Fields Too Large",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],27:[function(_dereq_,module,exports){(function(process,global){var next=global.process&&process.nextTick||global.setImmediate||
function(f){setTimeout(f,0)};module.exports=function maybe(cb,promise){if(cb){promise.then(function(result){next(function(){cb(null,result)})},function(err){next(function(){cb(err)})});return undefined}else return promise}}).call(this,_dereq_("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"_process":71}],28:[function(_dereq_,module,exports){(function(Buffer){function isArray(arg){if(Array.isArray)return Array.isArray(arg);return objectToString(arg)===
"[object Array]"}exports.isArray=isArray;function isBoolean(arg){return typeof arg==="boolean"}exports.isBoolean=isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg==="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg==="string"}exports.isString=isString;function isSymbol(arg){return typeof arg==="symbol"}exports.isSymbol=
isSymbol;function isUndefined(arg){return arg===void 0}exports.isUndefined=isUndefined;function isRegExp(re){return objectToString(re)==="[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return typeof arg==="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return objectToString(e)==="[object Error]"||e instanceof Error}exports.isError=isError;function isFunction(arg){return typeof arg===
"function"}exports.isFunction=isFunction;function isPrimitive(arg){return arg===null||typeof arg==="boolean"||typeof arg==="number"||typeof arg==="string"||typeof arg==="symbol"||typeof arg==="undefined"}exports.isPrimitive=isPrimitive;exports.isBuffer=Buffer.isBuffer;function objectToString(o){return Object.prototype.toString.call(o)}}).call(this,{"isBuffer":_dereq_("../../is-buffer/index.js")})},{"../../is-buffer/index.js":36}],29:[function(_dereq_,module,exports){exports=module.exports=_dereq_("./debug");
exports.log=log;exports.formatArgs=formatArgs;exports.save=save;exports.load=load;exports.useColors=useColors;exports.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:localstorage();exports.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function useColors(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&
parseInt(RegExp.$1,10)>=31}exports.formatters.j=function(v){return JSON.stringify(v)};function formatArgs(){var args=arguments;var useColors=this.useColors;args[0]=(useColors?"%c":"")+this.namespace+(useColors?" %c":" ")+args[0]+(useColors?"%c ":" ")+"+"+exports.humanize(this.diff);if(!useColors)return args;var c="color: "+this.color;args=[args[0],c,"color: inherit"].concat(Array.prototype.slice.call(args,1));var index=0;var lastC=0;args[0].replace(/%[a-z%]/g,function(match){if("%%"===match)return;
index++;if("%c"===match)lastC=index});args.splice(lastC,0,c);return args}function log(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function save(namespaces){try{if(null==namespaces)exports.storage.removeItem("debug");else exports.storage.debug=namespaces}catch(e){}}function load(){var r;try{r=exports.storage.debug}catch(e){}return r}exports.enable(load());function localstorage(){try{return window.localStorage}catch(e){}}},{"./debug":30}],
30:[function(_dereq_,module,exports){exports=module.exports=debug;exports.coerce=coerce;exports.disable=disable;exports.enable=enable;exports.enabled=enabled;exports.humanize=_dereq_("ms");exports.names=[];exports.skips=[];exports.formatters={};var prevColor=0;var prevTime;function selectColor(){return exports.colors[prevColor++%exports.colors.length]}function debug(namespace){function disabled(){}disabled.enabled=false;function enabled(){var self=enabled;var curr=+new Date;var ms=curr-(prevTime||
curr);self.diff=ms;self.prev=prevTime;self.curr=curr;prevTime=curr;if(null==self.useColors)self.useColors=exports.useColors();if(null==self.color&&self.useColors)self.color=selectColor();var args=Array.prototype.slice.call(arguments);args[0]=exports.coerce(args[0]);if("string"!==typeof args[0])args=["%o"].concat(args);var index=0;args[0]=args[0].replace(/%([a-z%])/g,function(match,format){if(match==="%%")return match;index++;var formatter=exports.formatters[format];if("function"===typeof formatter){var val=
args[index];match=formatter.call(self,val);args.splice(index,1);index--}return match});if("function"===typeof exports.formatArgs)args=exports.formatArgs.apply(self,args);var logFn=enabled.log||exports.log||console.log.bind(console);logFn.apply(self,args)}enabled.enabled=true;var fn=exports.enabled(namespace)?enabled:disabled;fn.namespace=namespace;return fn}function enable(namespaces){exports.save(namespaces);var split=(namespaces||"").split(/[\s,]+/);var len=split.length;for(var i=0;i<len;i++){if(!split[i])continue;
namespaces=split[i].replace(/\*/g,".*?");if(namespaces[0]==="-")exports.skips.push(new RegExp("^"+namespaces.substr(1)+"$"));else exports.names.push(new RegExp("^"+namespaces+"$"))}}function disable(){exports.enable("")}function enabled(name){var i,len;for(i=0,len=exports.skips.length;i<len;i++)if(exports.skips[i].test(name))return false;for(i=0,len=exports.names.length;i<len;i++)if(exports.names[i].test(name))return true;return false}function coerce(val){if(val instanceof Error)return val.stack||
val.message;return val}},{"ms":68}],31:[function(_dereq_,module,exports){(function(process,global){(function(){function lib$es6$promise$utils$$objectOrFunction(x){return typeof x==="function"||typeof x==="object"&&x!==null}function lib$es6$promise$utils$$isFunction(x){return typeof x==="function"}function lib$es6$promise$utils$$isMaybeThenable(x){return typeof x==="object"&&x!==null}var lib$es6$promise$utils$$_isArray;if(!Array.isArray)lib$es6$promise$utils$$_isArray=function(x){return Object.prototype.toString.call(x)===
"[object Array]"};else lib$es6$promise$utils$$_isArray=Array.isArray;var lib$es6$promise$utils$$isArray=lib$es6$promise$utils$$_isArray;var lib$es6$promise$asap$$len=0;var lib$es6$promise$asap$$vertxNext;var lib$es6$promise$asap$$customSchedulerFn;var lib$es6$promise$asap$$asap=function asap(callback,arg){lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len]=callback;lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len+1]=arg;lib$es6$promise$asap$$len+=2;if(lib$es6$promise$asap$$len===2)if(lib$es6$promise$asap$$customSchedulerFn)lib$es6$promise$asap$$customSchedulerFn(lib$es6$promise$asap$$flush);
else lib$es6$promise$asap$$scheduleFlush()};function lib$es6$promise$asap$$setScheduler(scheduleFn){lib$es6$promise$asap$$customSchedulerFn=scheduleFn}function lib$es6$promise$asap$$setAsap(asapFn){lib$es6$promise$asap$$asap=asapFn}var lib$es6$promise$asap$$browserWindow=typeof window!=="undefined"?window:undefined;var lib$es6$promise$asap$$browserGlobal=lib$es6$promise$asap$$browserWindow||{};var lib$es6$promise$asap$$BrowserMutationObserver=lib$es6$promise$asap$$browserGlobal.MutationObserver||
lib$es6$promise$asap$$browserGlobal.WebKitMutationObserver;var lib$es6$promise$asap$$isNode=typeof process!=="undefined"&&{}.toString.call(process)==="[object process]";var lib$es6$promise$asap$$isWorker=typeof Uint8ClampedArray!=="undefined"&&typeof importScripts!=="undefined"&&typeof MessageChannel!=="undefined";function lib$es6$promise$asap$$useNextTick(){return function(){process.nextTick(lib$es6$promise$asap$$flush)}}function lib$es6$promise$asap$$useVertxTimer(){return function(){lib$es6$promise$asap$$vertxNext(lib$es6$promise$asap$$flush)}}
function lib$es6$promise$asap$$useMutationObserver(){var iterations=0;var observer=new lib$es6$promise$asap$$BrowserMutationObserver(lib$es6$promise$asap$$flush);var node=document.createTextNode("");observer.observe(node,{characterData:true});return function(){node.data=iterations=++iterations%2}}function lib$es6$promise$asap$$useMessageChannel(){var channel=new MessageChannel;channel.port1.onmessage=lib$es6$promise$asap$$flush;return function(){channel.port2.postMessage(0)}}function lib$es6$promise$asap$$useSetTimeout(){return function(){setTimeout(lib$es6$promise$asap$$flush,
1)}}var lib$es6$promise$asap$$queue=new Array(1E3);function lib$es6$promise$asap$$flush(){for(var i=0;i<lib$es6$promise$asap$$len;i+=2){var callback=lib$es6$promise$asap$$queue[i];var arg=lib$es6$promise$asap$$queue[i+1];callback(arg);lib$es6$promise$asap$$queue[i]=undefined;lib$es6$promise$asap$$queue[i+1]=undefined}lib$es6$promise$asap$$len=0}function lib$es6$promise$asap$$attemptVertx(){try{var r=_dereq_;var vertx=r("vertx");lib$es6$promise$asap$$vertxNext=vertx.runOnLoop||vertx.runOnContext;return lib$es6$promise$asap$$useVertxTimer()}catch(e){return lib$es6$promise$asap$$useSetTimeout()}}
var lib$es6$promise$asap$$scheduleFlush;if(lib$es6$promise$asap$$isNode)lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useNextTick();else if(lib$es6$promise$asap$$BrowserMutationObserver)lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useMutationObserver();else if(lib$es6$promise$asap$$isWorker)lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useMessageChannel();else if(lib$es6$promise$asap$$browserWindow===undefined&&typeof _dereq_==="function")lib$es6$promise$asap$$scheduleFlush=
lib$es6$promise$asap$$attemptVertx();else lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useSetTimeout();function lib$es6$promise$then$$then(onFulfillment,onRejection){var parent=this;var state=parent._state;if(state===lib$es6$promise$$internal$$FULFILLED&&!onFulfillment||state===lib$es6$promise$$internal$$REJECTED&&!onRejection)return this;var child=new this.constructor(lib$es6$promise$$internal$$noop);var result=parent._result;if(state){var callback=arguments[state-1];lib$es6$promise$asap$$asap(function(){lib$es6$promise$$internal$$invokeCallback(state,
child,callback,result)})}else lib$es6$promise$$internal$$subscribe(parent,child,onFulfillment,onRejection);return child}var lib$es6$promise$then$$default=lib$es6$promise$then$$then;function lib$es6$promise$promise$resolve$$resolve(object){var Constructor=this;if(object&&typeof object==="object"&&object.constructor===Constructor)return object;var promise=new Constructor(lib$es6$promise$$internal$$noop);lib$es6$promise$$internal$$resolve(promise,object);return promise}var lib$es6$promise$promise$resolve$$default=
lib$es6$promise$promise$resolve$$resolve;function lib$es6$promise$$internal$$noop(){}var lib$es6$promise$$internal$$PENDING=void 0;var lib$es6$promise$$internal$$FULFILLED=1;var lib$es6$promise$$internal$$REJECTED=2;var lib$es6$promise$$internal$$GET_THEN_ERROR=new lib$es6$promise$$internal$$ErrorObject;function lib$es6$promise$$internal$$selfFulfillment(){return new TypeError("You cannot resolve a promise with itself")}function lib$es6$promise$$internal$$cannotReturnOwn(){return new TypeError("A promises callback cannot return that same promise.")}
function lib$es6$promise$$internal$$getThen(promise){try{return promise.then}catch(error){lib$es6$promise$$internal$$GET_THEN_ERROR.error=error;return lib$es6$promise$$internal$$GET_THEN_ERROR}}function lib$es6$promise$$internal$$tryThen(then,value,fulfillmentHandler,rejectionHandler){try{then.call(value,fulfillmentHandler,rejectionHandler)}catch(e){return e}}function lib$es6$promise$$internal$$handleForeignThenable(promise,thenable,then){lib$es6$promise$asap$$asap(function(promise){var sealed=false;
var error=lib$es6$promise$$internal$$tryThen(then,thenable,function(value){if(sealed)return;sealed=true;if(thenable!==value)lib$es6$promise$$internal$$resolve(promise,value);else lib$es6$promise$$internal$$fulfill(promise,value)},function(reason){if(sealed)return;sealed=true;lib$es6$promise$$internal$$reject(promise,reason)},"Settle: "+(promise._label||" unknown promise"));if(!sealed&&error){sealed=true;lib$es6$promise$$internal$$reject(promise,error)}},promise)}function lib$es6$promise$$internal$$handleOwnThenable(promise,
thenable){if(thenable._state===lib$es6$promise$$internal$$FULFILLED)lib$es6$promise$$internal$$fulfill(promise,thenable._result);else if(thenable._state===lib$es6$promise$$internal$$REJECTED)lib$es6$promise$$internal$$reject(promise,thenable._result);else lib$es6$promise$$internal$$subscribe(thenable,undefined,function(value){lib$es6$promise$$internal$$resolve(promise,value)},function(reason){lib$es6$promise$$internal$$reject(promise,reason)})}function lib$es6$promise$$internal$$handleMaybeThenable(promise,
maybeThenable,then){if(maybeThenable.constructor===promise.constructor&&then===lib$es6$promise$then$$default&&constructor.resolve===lib$es6$promise$promise$resolve$$default)lib$es6$promise$$internal$$handleOwnThenable(promise,maybeThenable);else if(then===lib$es6$promise$$internal$$GET_THEN_ERROR)lib$es6$promise$$internal$$reject(promise,lib$es6$promise$$internal$$GET_THEN_ERROR.error);else if(then===undefined)lib$es6$promise$$internal$$fulfill(promise,maybeThenable);else if(lib$es6$promise$utils$$isFunction(then))lib$es6$promise$$internal$$handleForeignThenable(promise,
maybeThenable,then);else lib$es6$promise$$internal$$fulfill(promise,maybeThenable)}function lib$es6$promise$$internal$$resolve(promise,value){if(promise===value)lib$es6$promise$$internal$$reject(promise,lib$es6$promise$$internal$$selfFulfillment());else if(lib$es6$promise$utils$$objectOrFunction(value))lib$es6$promise$$internal$$handleMaybeThenable(promise,value,lib$es6$promise$$internal$$getThen(value));else lib$es6$promise$$internal$$fulfill(promise,value)}function lib$es6$promise$$internal$$publishRejection(promise){if(promise._onerror)promise._onerror(promise._result);
lib$es6$promise$$internal$$publish(promise)}function lib$es6$promise$$internal$$fulfill(promise,value){if(promise._state!==lib$es6$promise$$internal$$PENDING)return;promise._result=value;promise._state=lib$es6$promise$$internal$$FULFILLED;if(promise._subscribers.length!==0)lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish,promise)}function lib$es6$promise$$internal$$reject(promise,reason){if(promise._state!==lib$es6$promise$$internal$$PENDING)return;promise._state=lib$es6$promise$$internal$$REJECTED;
promise._result=reason;lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publishRejection,promise)}function lib$es6$promise$$internal$$subscribe(parent,child,onFulfillment,onRejection){var subscribers=parent._subscribers;var length=subscribers.length;parent._onerror=null;subscribers[length]=child;subscribers[length+lib$es6$promise$$internal$$FULFILLED]=onFulfillment;subscribers[length+lib$es6$promise$$internal$$REJECTED]=onRejection;if(length===0&&parent._state)lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish,
parent)}function lib$es6$promise$$internal$$publish(promise){var subscribers=promise._subscribers;var settled=promise._state;if(subscribers.length===0)return;var child,callback,detail=promise._result;for(var i=0;i<subscribers.length;i+=3){child=subscribers[i];callback=subscribers[i+settled];if(child)lib$es6$promise$$internal$$invokeCallback(settled,child,callback,detail);else callback(detail)}promise._subscribers.length=0}function lib$es6$promise$$internal$$ErrorObject(){this.error=null}var lib$es6$promise$$internal$$TRY_CATCH_ERROR=
new lib$es6$promise$$internal$$ErrorObject;function lib$es6$promise$$internal$$tryCatch(callback,detail){try{return callback(detail)}catch(e){lib$es6$promise$$internal$$TRY_CATCH_ERROR.error=e;return lib$es6$promise$$internal$$TRY_CATCH_ERROR}}function lib$es6$promise$$internal$$invokeCallback(settled,promise,callback,detail){var hasCallback=lib$es6$promise$utils$$isFunction(callback),value,error,succeeded,failed;if(hasCallback){value=lib$es6$promise$$internal$$tryCatch(callback,detail);if(value===
lib$es6$promise$$internal$$TRY_CATCH_ERROR){failed=true;error=value.error;value=null}else succeeded=true;if(promise===value){lib$es6$promise$$internal$$reject(promise,lib$es6$promise$$internal$$cannotReturnOwn());return}}else{value=detail;succeeded=true}if(promise._state!==lib$es6$promise$$internal$$PENDING);else if(hasCallback&&succeeded)lib$es6$promise$$internal$$resolve(promise,value);else if(failed)lib$es6$promise$$internal$$reject(promise,error);else if(settled===lib$es6$promise$$internal$$FULFILLED)lib$es6$promise$$internal$$fulfill(promise,
value);else if(settled===lib$es6$promise$$internal$$REJECTED)lib$es6$promise$$internal$$reject(promise,value)}function lib$es6$promise$$internal$$initializePromise(promise,resolver){try{resolver(function resolvePromise(value){lib$es6$promise$$internal$$resolve(promise,value)},function rejectPromise(reason){lib$es6$promise$$internal$$reject(promise,reason)})}catch(e){lib$es6$promise$$internal$$reject(promise,e)}}function lib$es6$promise$promise$all$$all(entries){return(new lib$es6$promise$enumerator$$default(this,
entries)).promise}var lib$es6$promise$promise$all$$default=lib$es6$promise$promise$all$$all;function lib$es6$promise$promise$race$$race(entries){var Constructor=this;var promise=new Constructor(lib$es6$promise$$internal$$noop);if(!lib$es6$promise$utils$$isArray(entries)){lib$es6$promise$$internal$$reject(promise,new TypeError("You must pass an array to race."));return promise}var length=entries.length;function onFulfillment(value){lib$es6$promise$$internal$$resolve(promise,value)}function onRejection(reason){lib$es6$promise$$internal$$reject(promise,
reason)}for(var i=0;promise._state===lib$es6$promise$$internal$$PENDING&&i<length;i++)lib$es6$promise$$internal$$subscribe(Constructor.resolve(entries[i]),undefined,onFulfillment,onRejection);return promise}var lib$es6$promise$promise$race$$default=lib$es6$promise$promise$race$$race;function lib$es6$promise$promise$reject$$reject(reason){var Constructor=this;var promise=new Constructor(lib$es6$promise$$internal$$noop);lib$es6$promise$$internal$$reject(promise,reason);return promise}var lib$es6$promise$promise$reject$$default=
lib$es6$promise$promise$reject$$reject;var lib$es6$promise$promise$$counter=0;function lib$es6$promise$promise$$needsResolver(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");}function lib$es6$promise$promise$$needsNew(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");}var lib$es6$promise$promise$$default=lib$es6$promise$promise$$Promise;function lib$es6$promise$promise$$Promise(resolver){this._id=
lib$es6$promise$promise$$counter++;this._state=undefined;this._result=undefined;this._subscribers=[];if(lib$es6$promise$$internal$$noop!==resolver){typeof resolver!=="function"&&lib$es6$promise$promise$$needsResolver();this instanceof lib$es6$promise$promise$$Promise?lib$es6$promise$$internal$$initializePromise(this,resolver):lib$es6$promise$promise$$needsNew()}}lib$es6$promise$promise$$Promise.all=lib$es6$promise$promise$all$$default;lib$es6$promise$promise$$Promise.race=lib$es6$promise$promise$race$$default;
lib$es6$promise$promise$$Promise.resolve=lib$es6$promise$promise$resolve$$default;lib$es6$promise$promise$$Promise.reject=lib$es6$promise$promise$reject$$default;lib$es6$promise$promise$$Promise._setScheduler=lib$es6$promise$asap$$setScheduler;lib$es6$promise$promise$$Promise._setAsap=lib$es6$promise$asap$$setAsap;lib$es6$promise$promise$$Promise._asap=lib$es6$promise$asap$$asap;lib$es6$promise$promise$$Promise.prototype={constructor:lib$es6$promise$promise$$Promise,then:lib$es6$promise$then$$default,
"catch":function(onRejection){return this.then(null,onRejection)}};var lib$es6$promise$enumerator$$default=lib$es6$promise$enumerator$$Enumerator;function lib$es6$promise$enumerator$$Enumerator(Constructor,input){this._instanceConstructor=Constructor;this.promise=new Constructor(lib$es6$promise$$internal$$noop);if(Array.isArray(input)){this._input=input;this.length=input.length;this._remaining=input.length;this._result=new Array(this.length);if(this.length===0)lib$es6$promise$$internal$$fulfill(this.promise,
this._result);else{this.length=this.length||0;this._enumerate();if(this._remaining===0)lib$es6$promise$$internal$$fulfill(this.promise,this._result)}}else lib$es6$promise$$internal$$reject(this.promise,this._validationError())}lib$es6$promise$enumerator$$Enumerator.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")};lib$es6$promise$enumerator$$Enumerator.prototype._enumerate=function(){var length=this.length;var input=this._input;for(var i=0;this._state===
lib$es6$promise$$internal$$PENDING&&i<length;i++)this._eachEntry(input[i],i)};lib$es6$promise$enumerator$$Enumerator.prototype._eachEntry=function(entry,i){var c=this._instanceConstructor;var resolve=c.resolve;if(resolve===lib$es6$promise$promise$resolve$$default){var then=lib$es6$promise$$internal$$getThen(entry);if(then===lib$es6$promise$then$$default&&entry._state!==lib$es6$promise$$internal$$PENDING)this._settledAt(entry._state,i,entry._result);else if(typeof then!=="function"){this._remaining--;
this._result[i]=entry}else if(c===lib$es6$promise$promise$$default){var promise=new c(lib$es6$promise$$internal$$noop);lib$es6$promise$$internal$$handleMaybeThenable(promise,entry,then);this._willSettleAt(promise,i)}else this._willSettleAt(new c(function(resolve){resolve(entry)}),i)}else this._willSettleAt(resolve(entry),i)};lib$es6$promise$enumerator$$Enumerator.prototype._settledAt=function(state,i,value){var promise=this.promise;if(promise._state===lib$es6$promise$$internal$$PENDING){this._remaining--;
if(state===lib$es6$promise$$internal$$REJECTED)lib$es6$promise$$internal$$reject(promise,value);else this._result[i]=value}if(this._remaining===0)lib$es6$promise$$internal$$fulfill(promise,this._result)};lib$es6$promise$enumerator$$Enumerator.prototype._willSettleAt=function(promise,i){var enumerator=this;lib$es6$promise$$internal$$subscribe(promise,undefined,function(value){enumerator._settledAt(lib$es6$promise$$internal$$FULFILLED,i,value)},function(reason){enumerator._settledAt(lib$es6$promise$$internal$$REJECTED,
i,reason)})};function lib$es6$promise$polyfill$$polyfill(){var local;if(typeof global!=="undefined")local=global;else if(typeof self!=="undefined")local=self;else try{local=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment");}var P=local.Promise;if(P&&Object.prototype.toString.call(P.resolve())==="[object Promise]"&&!P.cast)return;local.Promise=lib$es6$promise$promise$$default}var lib$es6$promise$polyfill$$default=lib$es6$promise$polyfill$$polyfill;
var lib$es6$promise$umd$$ES6Promise={"Promise":lib$es6$promise$promise$$default,"polyfill":lib$es6$promise$polyfill$$default};if(typeof define==="function"&&define["amd"])define(function(){return lib$es6$promise$umd$$ES6Promise});else if(typeof module!=="undefined"&&module["exports"])module["exports"]=lib$es6$promise$umd$$ES6Promise;else if(typeof this!=="undefined")this["ES6Promise"]=lib$es6$promise$umd$$ES6Promise;lib$es6$promise$polyfill$$default()}).call(this)}).call(this,_dereq_("_process"),
typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"_process":71}],32:[function(_dereq_,module,exports){function EventEmitter(){this._events=this._events||{};this._maxListeners=this._maxListeners||undefined}module.exports=EventEmitter;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=undefined;EventEmitter.prototype._maxListeners=undefined;EventEmitter.defaultMaxListeners=10;EventEmitter.prototype.setMaxListeners=function(n){if(!isNumber(n)||
n<0||isNaN(n))throw TypeError("n must be a positive number");this._maxListeners=n;return this};EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(!this._events)this._events={};if(type==="error")if(!this._events.error||isObject(this._events.error)&&!this._events.error.length){er=arguments[1];if(er instanceof Error)throw er;throw TypeError('Uncaught, unspecified "error" event.');}handler=this._events[type];if(isUndefined(handler))return false;if(isFunction(handler))switch(arguments.length){case 1:handler.call(this);
break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:args=Array.prototype.slice.call(arguments,1);handler.apply(this,args)}else if(isObject(handler)){args=Array.prototype.slice.call(arguments,1);listeners=handler.slice();len=listeners.length;for(i=0;i<len;i++)listeners[i].apply(this,args)}return true};EventEmitter.prototype.addListener=function(type,listener){var m;if(!isFunction(listener))throw TypeError("listener must be a function");
if(!this._events)this._events={};if(this._events.newListener)this.emit("newListener",type,isFunction(listener.listener)?listener.listener:listener);if(!this._events[type])this._events[type]=listener;else if(isObject(this._events[type]))this._events[type].push(listener);else this._events[type]=[this._events[type],listener];if(isObject(this._events[type])&&!this._events[type].warned){if(!isUndefined(this._maxListeners))m=this._maxListeners;else m=EventEmitter.defaultMaxListeners;if(m&&m>0&&this._events[type].length>
m){this._events[type].warned=true;console.error("(node) warning: possible EventEmitter memory "+"leak detected. %d listeners added. "+"Use emitter.setMaxListeners() to increase limit.",this._events[type].length);if(typeof console.trace==="function")console.trace()}}return this};EventEmitter.prototype.on=EventEmitter.prototype.addListener;EventEmitter.prototype.once=function(type,listener){if(!isFunction(listener))throw TypeError("listener must be a function");var fired=false;function g(){this.removeListener(type,
g);if(!fired){fired=true;listener.apply(this,arguments)}}g.listener=listener;this.on(type,g);return this};EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;list=this._events[type];length=list.length;position=-1;if(list===listener||isFunction(list.listener)&&list.listener===listener){delete this._events[type];if(this._events.removeListener)this.emit("removeListener",
type,listener)}else if(isObject(list)){for(i=length;i-- >0;)if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}if(position<0)return this;if(list.length===1){list.length=0;delete this._events[type]}else list.splice(position,1);if(this._events.removeListener)this.emit("removeListener",type,listener)}return this};EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener){if(arguments.length===
0)this._events={};else if(this._events[type])delete this._events[type];return this}if(arguments.length===0){for(key in this._events){if(key==="removeListener")continue;this.removeAllListeners(key)}this.removeAllListeners("removeListener");this._events={};return this}listeners=this._events[type];if(isFunction(listeners))this.removeListener(type,listeners);else if(listeners)while(listeners.length)this.removeListener(type,listeners[listeners.length-1]);delete this._events[type];return this};EventEmitter.prototype.listeners=
function(type){var ret;if(!this._events||!this._events[type])ret=[];else if(isFunction(this._events[type]))ret=[this._events[type]];else ret=this._events[type].slice();return ret};EventEmitter.prototype.listenerCount=function(type){if(this._events){var evlistener=this._events[type];if(isFunction(evlistener))return 1;else if(evlistener)return evlistener.length}return 0};EventEmitter.listenerCount=function(emitter,type){return emitter.listenerCount(type)};function isFunction(arg){return typeof arg===
"function"}function isNumber(arg){return typeof arg==="number"}function isObject(arg){return typeof arg==="object"&&arg!==null}function isUndefined(arg){return arg===void 0}},{}],33:[function(_dereq_,module,exports){var http=_dereq_("http");var https=module.exports;for(var key in http)if(http.hasOwnProperty(key))https[key]=http[key];https.request=function(params,cb){if(!params)params={};params.scheme="https";params.protocol="https:";return http.request.call(this,params,cb)}},{"http":87}],34:[function(_dereq_,
module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m;var eLen=nBytes*8-mLen-1;var eMax=(1<<eLen)-1;var eBias=eMax>>1;var nBits=-7;var i=isLE?nBytes-1:0;var d=isLE?-1:1;var s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8);m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8);if(e===0)e=1-eBias;else if(e===eMax)return m?NaN:(s?-1:1)*Infinity;else{m=m+Math.pow(2,mLen);
e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c;var eLen=nBytes*8-mLen-1;var eMax=(1<<eLen)-1;var eBias=eMax>>1;var rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0;var i=isLE?0:nBytes-1;var d=isLE?1:-1;var s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1)value+=rt/
c;else value+=rt*Math.pow(2,1-eBias);if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8);e=e<<mLen|m;eLen+=mLen;for(;eLen>0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=s*128}},{}],35:[function(_dereq_,module,exports){if(typeof Object.create==="function")module.exports=function inherits(ctor,superCtor){ctor.super_=
superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})};else module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}},{}],36:[function(_dereq_,module,exports){module.exports=function(obj){return!!(obj!=null&&(obj._isBuffer||obj.constructor&&typeof obj.constructor.isBuffer==="function"&&
obj.constructor.isBuffer(obj)))}},{}],37:[function(_dereq_,module,exports){var toString={}.toString;module.exports=Array.isArray||function(arr){return toString.call(arr)=="[object Array]"}},{}],38:[function(_dereq_,module,exports){var yaml=_dereq_("./lib/js-yaml.js");module.exports=yaml},{"./lib/js-yaml.js":39}],39:[function(_dereq_,module,exports){var loader=_dereq_("./js-yaml/loader");var dumper=_dereq_("./js-yaml/dumper");function deprecated(name){return function(){throw new Error("Function "+
name+" is deprecated and cannot be used.");}}module.exports.Type=_dereq_("./js-yaml/type");module.exports.Schema=_dereq_("./js-yaml/schema");module.exports.FAILSAFE_SCHEMA=_dereq_("./js-yaml/schema/failsafe");module.exports.JSON_SCHEMA=_dereq_("./js-yaml/schema/json");module.exports.CORE_SCHEMA=_dereq_("./js-yaml/schema/core");module.exports.DEFAULT_SAFE_SCHEMA=_dereq_("./js-yaml/schema/default_safe");module.exports.DEFAULT_FULL_SCHEMA=_dereq_("./js-yaml/schema/default_full");module.exports.load=
loader.load;module.exports.loadAll=loader.loadAll;module.exports.safeLoad=loader.safeLoad;module.exports.safeLoadAll=loader.safeLoadAll;module.exports.dump=dumper.dump;module.exports.safeDump=dumper.safeDump;module.exports.YAMLException=_dereq_("./js-yaml/exception");module.exports.MINIMAL_SCHEMA=_dereq_("./js-yaml/schema/failsafe");module.exports.SAFE_SCHEMA=_dereq_("./js-yaml/schema/default_safe");module.exports.DEFAULT_SCHEMA=_dereq_("./js-yaml/schema/default_full");module.exports.scan=deprecated("scan");
module.exports.parse=deprecated("parse");module.exports.compose=deprecated("compose");module.exports.addConstructor=deprecated("addConstructor")},{"./js-yaml/dumper":41,"./js-yaml/exception":42,"./js-yaml/loader":43,"./js-yaml/schema":45,"./js-yaml/schema/core":46,"./js-yaml/schema/default_full":47,"./js-yaml/schema/default_safe":48,"./js-yaml/schema/failsafe":49,"./js-yaml/schema/json":50,"./js-yaml/type":51}],40:[function(_dereq_,module,exports){function isNothing(subject){return typeof subject===
"undefined"||subject===null}function isObject(subject){return typeof subject==="object"&&subject!==null}function toArray(sequence){if(Array.isArray(sequence))return sequence;else if(isNothing(sequence))return[];return[sequence]}function extend(target,source){var index,length,key,sourceKeys;if(source){sourceKeys=Object.keys(source);for(index=0,length=sourceKeys.length;index<length;index+=1){key=sourceKeys[index];target[key]=source[key]}}return target}function repeat(string,count){var result="",cycle;
for(cycle=0;cycle<count;cycle+=1)result+=string;return result}function isNegativeZero(number){return number===0&&Number.NEGATIVE_INFINITY===1/number}module.exports.isNothing=isNothing;module.exports.isObject=isObject;module.exports.toArray=toArray;module.exports.repeat=repeat;module.exports.isNegativeZero=isNegativeZero;module.exports.extend=extend},{}],41:[function(_dereq_,module,exports){var common=_dereq_("./common");var YAMLException=_dereq_("./exception");var DEFAULT_FULL_SCHEMA=_dereq_("./schema/default_full");
var DEFAULT_SAFE_SCHEMA=_dereq_("./schema/default_safe");var _toString=Object.prototype.toString;var _hasOwnProperty=Object.prototype.hasOwnProperty;var CHAR_TAB=9;var CHAR_LINE_FEED=10;var CHAR_SPACE=32;var CHAR_EXCLAMATION=33;var CHAR_DOUBLE_QUOTE=34;var CHAR_SHARP=35;var CHAR_PERCENT=37;var CHAR_AMPERSAND=38;var CHAR_SINGLE_QUOTE=39;var CHAR_ASTERISK=42;var CHAR_COMMA=44;var CHAR_MINUS=45;var CHAR_COLON=58;var CHAR_GREATER_THAN=62;var CHAR_QUESTION=63;var CHAR_COMMERCIAL_AT=64;var CHAR_LEFT_SQUARE_BRACKET=
91;var CHAR_RIGHT_SQUARE_BRACKET=93;var CHAR_GRAVE_ACCENT=96;var CHAR_LEFT_CURLY_BRACKET=123;var CHAR_VERTICAL_LINE=124;var CHAR_RIGHT_CURLY_BRACKET=125;var ESCAPE_SEQUENCES={};ESCAPE_SEQUENCES[0]="\\0";ESCAPE_SEQUENCES[7]="\\a";ESCAPE_SEQUENCES[8]="\\b";ESCAPE_SEQUENCES[9]="\\t";ESCAPE_SEQUENCES[10]="\\n";ESCAPE_SEQUENCES[11]="\\v";ESCAPE_SEQUENCES[12]="\\f";ESCAPE_SEQUENCES[13]="\\r";ESCAPE_SEQUENCES[27]="\\e";ESCAPE_SEQUENCES[34]='\\"';ESCAPE_SEQUENCES[92]="\\\\";ESCAPE_SEQUENCES[133]="\\N";ESCAPE_SEQUENCES[160]=
"\\_";ESCAPE_SEQUENCES[8232]="\\L";ESCAPE_SEQUENCES[8233]="\\P";var DEPRECATED_BOOLEANS_SYNTAX=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function compileStyleMap(schema,map){var result,keys,index,length,tag,style,type;if(map===null)return{};result={};keys=Object.keys(map);for(index=0,length=keys.length;index<length;index+=1){tag=keys[index];style=String(map[tag]);if(tag.slice(0,2)==="!!")tag="tag:yaml.org,2002:"+tag.slice(2);type=schema.compiledTypeMap[tag];
if(type&&_hasOwnProperty.call(type.styleAliases,style))style=type.styleAliases[style];result[tag]=style}return result}function encodeHex(character){var string,handle,length;string=character.toString(16).toUpperCase();if(character<=255){handle="x";length=2}else if(character<=65535){handle="u";length=4}else if(character<=4294967295){handle="U";length=8}else throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+handle+common.repeat("0",length-string.length)+
string}function State(options){this.schema=options["schema"]||DEFAULT_FULL_SCHEMA;this.indent=Math.max(1,options["indent"]||2);this.skipInvalid=options["skipInvalid"]||false;this.flowLevel=common.isNothing(options["flowLevel"])?-1:options["flowLevel"];this.styleMap=compileStyleMap(this.schema,options["styles"]||null);this.sortKeys=options["sortKeys"]||false;this.lineWidth=options["lineWidth"]||80;this.noRefs=options["noRefs"]||false;this.noCompatMode=options["noCompatMode"]||false;this.implicitTypes=
this.schema.compiledImplicit;this.explicitTypes=this.schema.compiledExplicit;this.tag=null;this.result="";this.duplicates=[];this.usedDuplicates=null}function indentString(string,spaces){var ind=common.repeat(" ",spaces),position=0,next=-1,result="",line,length=string.length;while(position<length){next=string.indexOf("\n",position);if(next===-1){line=string.slice(position);position=length}else{line=string.slice(position,next+1);position=next+1}if(line.length&&line!=="\n")result+=ind;result+=line}return result}
function generateNextLine(state,level){return"\n"+common.repeat(" ",state.indent*level)}function testImplicitResolving(state,str){var index,length,type;for(index=0,length=state.implicitTypes.length;index<length;index+=1){type=state.implicitTypes[index];if(type.resolve(str))return true}return false}function isWhitespace(c){return c===CHAR_SPACE||c===CHAR_TAB}function isPrintable(c){return 32<=c&&c<=126||161<=c&&c<=55295&&c!==8232&&c!==8233||57344<=c&&c<=65533&&c!==65279||65536<=c&&c<=1114111}function isPlainSafe(c){return isPrintable(c)&&
c!==65279&&c!==CHAR_COMMA&&c!==CHAR_LEFT_SQUARE_BRACKET&&c!==CHAR_RIGHT_SQUARE_BRACKET&&c!==CHAR_LEFT_CURLY_BRACKET&&c!==CHAR_RIGHT_CURLY_BRACKET&&c!==CHAR_COLON&&c!==CHAR_SHARP}function isPlainSafeFirst(c){return isPrintable(c)&&c!==65279&&!isWhitespace(c)&&c!==CHAR_MINUS&&c!==CHAR_QUESTION&&c!==CHAR_COLON&&c!==CHAR_COMMA&&c!==CHAR_LEFT_SQUARE_BRACKET&&c!==CHAR_RIGHT_SQUARE_BRACKET&&c!==CHAR_LEFT_CURLY_BRACKET&&c!==CHAR_RIGHT_CURLY_BRACKET&&c!==CHAR_SHARP&&c!==CHAR_AMPERSAND&&c!==CHAR_ASTERISK&&
c!==CHAR_EXCLAMATION&&c!==CHAR_VERTICAL_LINE&&c!==CHAR_GREATER_THAN&&c!==CHAR_SINGLE_QUOTE&&c!==CHAR_DOUBLE_QUOTE&&c!==CHAR_PERCENT&&c!==CHAR_COMMERCIAL_AT&&c!==CHAR_GRAVE_ACCENT}var STYLE_PLAIN=1,STYLE_SINGLE=2,STYLE_LITERAL=3,STYLE_FOLDED=4,STYLE_DOUBLE=5;function chooseScalarStyle(string,singleLineOnly,indentPerLevel,lineWidth,testAmbiguousType){var i;var char;var hasLineBreak=false;var hasFoldableLine=false;var shouldTrackWidth=lineWidth!==-1;var previousLineBreak=-1;var plain=isPlainSafeFirst(string.charCodeAt(0))&&
!isWhitespace(string.charCodeAt(string.length-1));if(singleLineOnly)for(i=0;i<string.length;i++){char=string.charCodeAt(i);if(!isPrintable(char))return STYLE_DOUBLE;plain=plain&&isPlainSafe(char)}else{for(i=0;i<string.length;i++){char=string.charCodeAt(i);if(char===CHAR_LINE_FEED){hasLineBreak=true;if(shouldTrackWidth){hasFoldableLine=hasFoldableLine||i-previousLineBreak-1>lineWidth&&string[previousLineBreak+1]!==" ";previousLineBreak=i}}else if(!isPrintable(char))return STYLE_DOUBLE;plain=plain&&
isPlainSafe(char)}hasFoldableLine=hasFoldableLine||shouldTrackWidth&&(i-previousLineBreak-1>lineWidth&&string[previousLineBreak+1]!==" ")}if(!hasLineBreak&&!hasFoldableLine)return plain&&!testAmbiguousType(string)?STYLE_PLAIN:STYLE_SINGLE;if(string[0]===" "&&indentPerLevel>9)return STYLE_DOUBLE;return hasFoldableLine?STYLE_FOLDED:STYLE_LITERAL}function writeScalar(state,string,level,iskey){state.dump=function(){if(string.length===0)return"''";if(!state.noCompatMode&&DEPRECATED_BOOLEANS_SYNTAX.indexOf(string)!==
-1)return"'"+string+"'";var indent=state.indent*Math.max(1,level);var lineWidth=state.lineWidth===-1?-1:Math.max(Math.min(state.lineWidth,40),state.lineWidth-indent);var singleLineOnly=iskey||state.flowLevel>-1&&level>=state.flowLevel;function testAmbiguity(string){return testImplicitResolving(state,string)}switch(chooseScalarStyle(string,singleLineOnly,state.indent,lineWidth,testAmbiguity)){case STYLE_PLAIN:return string;case STYLE_SINGLE:return"'"+string.replace(/'/g,"''")+"'";case STYLE_LITERAL:return"|"+
blockHeader(string,state.indent)+dropEndingNewline(indentString(string,indent));case STYLE_FOLDED:return"\x3e"+blockHeader(string,state.indent)+dropEndingNewline(indentString(foldString(string,lineWidth),indent));case STYLE_DOUBLE:return'"'+escapeString(string,lineWidth)+'"';default:throw new YAMLException("impossible error: invalid scalar style");}}()}function blockHeader(string,indentPerLevel){var indentIndicator=string[0]===" "?String(indentPerLevel):"";var clip=string[string.length-1]==="\n";
var keep=clip&&(string[string.length-2]==="\n"||string==="\n");var chomp=keep?"+":clip?"":"-";return indentIndicator+chomp+"\n"}function dropEndingNewline(string){return string[string.length-1]==="\n"?string.slice(0,-1):string}function foldString(string,width){var lineRe=/(\n+)([^\n]*)/g;var result=function(){var nextLF=string.indexOf("\n");nextLF=nextLF!==-1?nextLF:string.length;lineRe.lastIndex=nextLF;return foldLine(string.slice(0,nextLF),width)}();var prevMoreIndented=string[0]==="\n"||string[0]===
" ";var moreIndented;var match;while(match=lineRe.exec(string)){var prefix=match[1],line=match[2];moreIndented=line[0]===" ";result+=prefix+(!prevMoreIndented&&!moreIndented&&line!==""?"\n":"")+foldLine(line,width);prevMoreIndented=moreIndented}return result}function foldLine(line,width){if(line===""||line[0]===" ")return line;var breakRe=/ [^ ]/g;var match;var start=0,end,curr=0,next=0;var result="";while(match=breakRe.exec(line)){next=match.index;if(next-start>width){end=curr>start?curr:next;result+=
"\n"+line.slice(start,end);start=end+1}curr=next}result+="\n";if(line.length-start>width&&curr>start)result+=line.slice(start,curr)+"\n"+line.slice(curr+1);else result+=line.slice(start);return result.slice(1)}function escapeString(string){var result="";var char;var escapeSeq;for(var i=0;i<string.length;i++){char=string.charCodeAt(i);escapeSeq=ESCAPE_SEQUENCES[char];result+=!escapeSeq&&isPrintable(char)?string[i]:escapeSeq||encodeHex(char)}return result}function writeFlowSequence(state,level,object){var _result=
"",_tag=state.tag,index,length;for(index=0,length=object.length;index<length;index+=1)if(writeNode(state,level,object[index],false,false)){if(index!==0)_result+=", ";_result+=state.dump}state.tag=_tag;state.dump="["+_result+"]"}function writeBlockSequence(state,level,object,compact){var _result="",_tag=state.tag,index,length;for(index=0,length=object.length;index<length;index+=1)if(writeNode(state,level+1,object[index],true,true)){if(!compact||index!==0)_result+=generateNextLine(state,level);_result+=
"- "+state.dump}state.tag=_tag;state.dump=_result||"[]"}function writeFlowMapping(state,level,object){var _result="",_tag=state.tag,objectKeyList=Object.keys(object),index,length,objectKey,objectValue,pairBuffer;for(index=0,length=objectKeyList.length;index<length;index+=1){pairBuffer="";if(index!==0)pairBuffer+=", ";objectKey=objectKeyList[index];objectValue=object[objectKey];if(!writeNode(state,level,objectKey,false,false))continue;if(state.dump.length>1024)pairBuffer+="? ";pairBuffer+=state.dump+
": ";if(!writeNode(state,level,objectValue,false,false))continue;pairBuffer+=state.dump;_result+=pairBuffer}state.tag=_tag;state.dump="{"+_result+"}"}function writeBlockMapping(state,level,object,compact){var _result="",_tag=state.tag,objectKeyList=Object.keys(object),index,length,objectKey,objectValue,explicitPair,pairBuffer;if(state.sortKeys===true)objectKeyList.sort();else if(typeof state.sortKeys==="function")objectKeyList.sort(state.sortKeys);else if(state.sortKeys)throw new YAMLException("sortKeys must be a boolean or a function");
for(index=0,length=objectKeyList.length;index<length;index+=1){pairBuffer="";if(!compact||index!==0)pairBuffer+=generateNextLine(state,level);objectKey=objectKeyList[index];objectValue=object[objectKey];if(!writeNode(state,level+1,objectKey,true,true,true))continue;explicitPair=state.tag!==null&&state.tag!=="?"||state.dump&&state.dump.length>1024;if(explicitPair)if(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0))pairBuffer+="?";else pairBuffer+="? ";pairBuffer+=state.dump;if(explicitPair)pairBuffer+=
generateNextLine(state,level);if(!writeNode(state,level+1,objectValue,true,explicitPair))continue;if(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0))pairBuffer+=":";else pairBuffer+=": ";pairBuffer+=state.dump;_result+=pairBuffer}state.tag=_tag;state.dump=_result||"{}"}function detectType(state,object,explicit){var _result,typeList,index,length,type,style;typeList=explicit?state.explicitTypes:state.implicitTypes;for(index=0,length=typeList.length;index<length;index+=1){type=typeList[index];
if((type.instanceOf||type.predicate)&&(!type.instanceOf||typeof object==="object"&&object instanceof type.instanceOf)&&(!type.predicate||type.predicate(object))){state.tag=explicit?type.tag:"?";if(type.represent){style=state.styleMap[type.tag]||type.defaultStyle;if(_toString.call(type.represent)==="[object Function]")_result=type.represent(object,style);else if(_hasOwnProperty.call(type.represent,style))_result=type.represent[style](object,style);else throw new YAMLException("!\x3c"+type.tag+'\x3e tag resolver accepts not "'+
style+'" style');state.dump=_result}return true}}return false}function writeNode(state,level,object,block,compact,iskey){state.tag=null;state.dump=object;if(!detectType(state,object,false))detectType(state,object,true);var type=_toString.call(state.dump);if(block)block=state.flowLevel<0||state.flowLevel>level;var objectOrArray=type==="[object Object]"||type==="[object Array]",duplicateIndex,duplicate;if(objectOrArray){duplicateIndex=state.duplicates.indexOf(object);duplicate=duplicateIndex!==-1}if(state.tag!==
null&&state.tag!=="?"||duplicate||state.indent!==2&&level>0)compact=false;if(duplicate&&state.usedDuplicates[duplicateIndex])state.dump="*ref_"+duplicateIndex;else{if(objectOrArray&&duplicate&&!state.usedDuplicates[duplicateIndex])state.usedDuplicates[duplicateIndex]=true;if(type==="[object Object]")if(block&&Object.keys(state.dump).length!==0){writeBlockMapping(state,level,state.dump,compact);if(duplicate)state.dump="\x26ref_"+duplicateIndex+state.dump}else{writeFlowMapping(state,level,state.dump);
if(duplicate)state.dump="\x26ref_"+duplicateIndex+" "+state.dump}else if(type==="[object Array]")if(block&&state.dump.length!==0){writeBlockSequence(state,level,state.dump,compact);if(duplicate)state.dump="\x26ref_"+duplicateIndex+state.dump}else{writeFlowSequence(state,level,state.dump);if(duplicate)state.dump="\x26ref_"+duplicateIndex+" "+state.dump}else if(type==="[object String]"){if(state.tag!=="?")writeScalar(state,state.dump,level,iskey)}else{if(state.skipInvalid)return false;throw new YAMLException("unacceptable kind of an object to dump "+
type);}if(state.tag!==null&&state.tag!=="?")state.dump="!\x3c"+state.tag+"\x3e "+state.dump}return true}function getDuplicateReferences(object,state){var objects=[],duplicatesIndexes=[],index,length;inspectNode(object,objects,duplicatesIndexes);for(index=0,length=duplicatesIndexes.length;index<length;index+=1)state.duplicates.push(objects[duplicatesIndexes[index]]);state.usedDuplicates=new Array(length)}function inspectNode(object,objects,duplicatesIndexes){var objectKeyList,index,length;if(object!==
null&&typeof object==="object"){index=objects.indexOf(object);if(index!==-1){if(duplicatesIndexes.indexOf(index)===-1)duplicatesIndexes.push(index)}else{objects.push(object);if(Array.isArray(object))for(index=0,length=object.length;index<length;index+=1)inspectNode(object[index],objects,duplicatesIndexes);else{objectKeyList=Object.keys(object);for(index=0,length=objectKeyList.length;index<length;index+=1)inspectNode(object[objectKeyList[index]],objects,duplicatesIndexes)}}}}function dump(input,options){options=
options||{};var state=new State(options);if(!state.noRefs)getDuplicateReferences(input,state);if(writeNode(state,0,input,true,true))return state.dump+"\n";return""}function safeDump(input,options){return dump(input,common.extend({schema:DEFAULT_SAFE_SCHEMA},options))}module.exports.dump=dump;module.exports.safeDump=safeDump},{"./common":40,"./exception":42,"./schema/default_full":47,"./schema/default_safe":48}],42:[function(_dereq_,module,exports){function YAMLException(reason,mark){Error.call(this);
if(Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else this.stack=(new Error).stack||"";this.name="YAMLException";this.reason=reason;this.mark=mark;this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():"")}YAMLException.prototype=Object.create(Error.prototype);YAMLException.prototype.constructor=YAMLException;YAMLException.prototype.toString=function toString(compact){var result=this.name+": ";result+=this.reason||"(unknown reason)";if(!compact&&
this.mark)result+=" "+this.mark.toString();return result};module.exports=YAMLException},{}],43:[function(_dereq_,module,exports){var common=_dereq_("./common");var YAMLException=_dereq_("./exception");var Mark=_dereq_("./mark");var DEFAULT_SAFE_SCHEMA=_dereq_("./schema/default_safe");var DEFAULT_FULL_SCHEMA=_dereq_("./schema/default_full");var _hasOwnProperty=Object.prototype.hasOwnProperty;var CONTEXT_FLOW_IN=1;var CONTEXT_FLOW_OUT=2;var CONTEXT_BLOCK_IN=3;var CONTEXT_BLOCK_OUT=4;var CHOMPING_CLIP=
1;var CHOMPING_STRIP=2;var CHOMPING_KEEP=3;var PATTERN_NON_PRINTABLE=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var PATTERN_NON_ASCII_LINE_BREAKS=/[\x85\u2028\u2029]/;var PATTERN_FLOW_INDICATORS=/[,\[\]\{\}]/;var PATTERN_TAG_HANDLE=/^(?:!|!!|![a-z\-]+!)$/i;var PATTERN_TAG_URI=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function is_EOL(c){return c===10||c===13}function is_WHITE_SPACE(c){return c===
9||c===32}function is_WS_OR_EOL(c){return c===9||c===32||c===10||c===13}function is_FLOW_INDICATOR(c){return c===44||c===91||c===93||c===123||c===125}function fromHexCode(c){var lc;if(48<=c&&c<=57)return c-48;lc=c|32;if(97<=lc&&lc<=102)return lc-97+10;return-1}function escapedHexLen(c){if(c===120)return 2;if(c===117)return 4;if(c===85)return 8;return 0}function fromDecimalCode(c){if(48<=c&&c<=57)return c-48;return-1}function simpleEscapeSequence(c){return c===48?"\x00":c===97?"\u0007":c===98?"\b":
c===116?"\t":c===9?"\t":c===110?"\n":c===118?"\x0B":c===102?"\f":c===114?"\r":c===101?"\u001b":c===32?" ":c===34?'"':c===47?"/":c===92?"\\":c===78?"\u0085":c===95?"\u00a0":c===76?"\u2028":c===80?"\u2029":""}function charFromCodepoint(c){if(c<=65535)return String.fromCharCode(c);return String.fromCharCode((c-65536>>10)+55296,(c-65536&1023)+56320)}var simpleEscapeCheck=new Array(256);var simpleEscapeMap=new Array(256);for(var i=0;i<256;i++){simpleEscapeCheck[i]=simpleEscapeSequence(i)?1:0;simpleEscapeMap[i]=
simpleEscapeSequence(i)}function State(input,options){this.input=input;this.filename=options["filename"]||null;this.schema=options["schema"]||DEFAULT_FULL_SCHEMA;this.onWarning=options["onWarning"]||null;this.legacy=options["legacy"]||false;this.json=options["json"]||false;this.listener=options["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=input.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.documents=
[]}function generateError(state,message){return new YAMLException(message,new Mark(state.filename,state.input,state.position,state.line,state.position-state.lineStart))}function throwError(state,message){throw generateError(state,message);}function throwWarning(state,message){if(state.onWarning)state.onWarning.call(null,generateError(state,message))}var directiveHandlers={YAML:function handleYamlDirective(state,name,args){var match,major,minor;if(state.version!==null)throwError(state,"duplication of %YAML directive");
if(args.length!==1)throwError(state,"YAML directive accepts exactly one argument");match=/^([0-9]+)\.([0-9]+)$/.exec(args[0]);if(match===null)throwError(state,"ill-formed argument of the YAML directive");major=parseInt(match[1],10);minor=parseInt(match[2],10);if(major!==1)throwError(state,"unacceptable YAML version of the document");state.version=args[0];state.checkLineBreaks=minor<2;if(minor!==1&&minor!==2)throwWarning(state,"unsupported YAML version of the document")},TAG:function handleTagDirective(state,
name,args){var handle,prefix;if(args.length!==2)throwError(state,"TAG directive accepts exactly two arguments");handle=args[0];prefix=args[1];if(!PATTERN_TAG_HANDLE.test(handle))throwError(state,"ill-formed tag handle (first argument) of the TAG directive");if(_hasOwnProperty.call(state.tagMap,handle))throwError(state,'there is a previously declared suffix for "'+handle+'" tag handle');if(!PATTERN_TAG_URI.test(prefix))throwError(state,"ill-formed tag prefix (second argument) of the TAG directive");
state.tagMap[handle]=prefix}};function captureSegment(state,start,end,checkJson){var _position,_length,_character,_result;if(start<end){_result=state.input.slice(start,end);if(checkJson)for(_position=0,_length=_result.length;_position<_length;_position+=1){_character=_result.charCodeAt(_position);if(!(_character===9||32<=_character&&_character<=1114111))throwError(state,"expected valid JSON character")}else if(PATTERN_NON_PRINTABLE.test(_result))throwError(state,"the stream contains non-printable characters");
state.result+=_result}}function mergeMappings(state,destination,source,overridableKeys){var sourceKeys,key,index,quantity;if(!common.isObject(source))throwError(state,"cannot merge mappings; the provided source object is unacceptable");sourceKeys=Object.keys(source);for(index=0,quantity=sourceKeys.length;index<quantity;index+=1){key=sourceKeys[index];if(!_hasOwnProperty.call(destination,key)){destination[key]=source[key];overridableKeys[key]=true}}}function storeMappingPair(state,_result,overridableKeys,
keyTag,keyNode,valueNode){var index,quantity;keyNode=String(keyNode);if(_result===null)_result={};if(keyTag==="tag:yaml.org,2002:merge")if(Array.isArray(valueNode))for(index=0,quantity=valueNode.length;index<quantity;index+=1)mergeMappings(state,_result,valueNode[index],overridableKeys);else mergeMappings(state,_result,valueNode,overridableKeys);else{if(!state.json&&!_hasOwnProperty.call(overridableKeys,keyNode)&&_hasOwnProperty.call(_result,keyNode))throwError(state,"duplicated mapping key");_result[keyNode]=
valueNode;delete overridableKeys[keyNode]}return _result}function readLineBreak(state){var ch;ch=state.input.charCodeAt(state.position);if(ch===10)state.position++;else if(ch===13){state.position++;if(state.input.charCodeAt(state.position)===10)state.position++}else throwError(state,"a line break is expected");state.line+=1;state.lineStart=state.position}function skipSeparationSpace(state,allowComments,checkIndent){var lineBreaks=0,ch=state.input.charCodeAt(state.position);while(ch!==0){while(is_WHITE_SPACE(ch))ch=
state.input.charCodeAt(++state.position);if(allowComments&&ch===35){do ch=state.input.charCodeAt(++state.position);while(ch!==10&&ch!==13&&ch!==0)}if(is_EOL(ch)){readLineBreak(state);ch=state.input.charCodeAt(state.position);lineBreaks++;state.lineIndent=0;while(ch===32){state.lineIndent++;ch=state.input.charCodeAt(++state.position)}}else break}if(checkIndent!==-1&&lineBreaks!==0&&state.lineIndent<checkIndent)throwWarning(state,"deficient indentation");return lineBreaks}function testDocumentSeparator(state){var _position=
state.position,ch;ch=state.input.charCodeAt(_position);if((ch===45||ch===46)&&ch===state.input.charCodeAt(_position+1)&&ch===state.input.charCodeAt(_position+2)){_position+=3;ch=state.input.charCodeAt(_position);if(ch===0||is_WS_OR_EOL(ch))return true}return false}function writeFoldedLines(state,count){if(count===1)state.result+=" ";else if(count>1)state.result+=common.repeat("\n",count-1)}function readPlainScalar(state,nodeIndent,withinFlowCollection){var preceding,following,captureStart,captureEnd,
hasPendingContent,_line,_lineStart,_lineIndent,_kind=state.kind,_result=state.result,ch;ch=state.input.charCodeAt(state.position);if(is_WS_OR_EOL(ch)||is_FLOW_INDICATOR(ch)||ch===35||ch===38||ch===42||ch===33||ch===124||ch===62||ch===39||ch===34||ch===37||ch===64||ch===96)return false;if(ch===63||ch===45){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following))return false}state.kind="scalar";state.result="";captureStart=captureEnd=
state.position;hasPendingContent=false;while(ch!==0){if(ch===58){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following))break}else if(ch===35){preceding=state.input.charCodeAt(state.position-1);if(is_WS_OR_EOL(preceding))break}else if(state.position===state.lineStart&&testDocumentSeparator(state)||withinFlowCollection&&is_FLOW_INDICATOR(ch))break;else if(is_EOL(ch)){_line=state.line;_lineStart=state.lineStart;_lineIndent=state.lineIndent;
skipSeparationSpace(state,false,-1);if(state.lineIndent>=nodeIndent){hasPendingContent=true;ch=state.input.charCodeAt(state.position);continue}else{state.position=captureEnd;state.line=_line;state.lineStart=_lineStart;state.lineIndent=_lineIndent;break}}if(hasPendingContent){captureSegment(state,captureStart,captureEnd,false);writeFoldedLines(state,state.line-_line);captureStart=captureEnd=state.position;hasPendingContent=false}if(!is_WHITE_SPACE(ch))captureEnd=state.position+1;ch=state.input.charCodeAt(++state.position)}captureSegment(state,
captureStart,captureEnd,false);if(state.result)return true;state.kind=_kind;state.result=_result;return false}function readSingleQuotedScalar(state,nodeIndent){var ch,captureStart,captureEnd;ch=state.input.charCodeAt(state.position);if(ch!==39)return false;state.kind="scalar";state.result="";state.position++;captureStart=captureEnd=state.position;while((ch=state.input.charCodeAt(state.position))!==0)if(ch===39){captureSegment(state,captureStart,state.position,true);ch=state.input.charCodeAt(++state.position);
if(ch===39){captureStart=captureEnd=state.position;state.position++}else return true}else if(is_EOL(ch)){captureSegment(state,captureStart,captureEnd,true);writeFoldedLines(state,skipSeparationSpace(state,false,nodeIndent));captureStart=captureEnd=state.position}else if(state.position===state.lineStart&&testDocumentSeparator(state))throwError(state,"unexpected end of the document within a single quoted scalar");else{state.position++;captureEnd=state.position}throwError(state,"unexpected end of the stream within a single quoted scalar")}
function readDoubleQuotedScalar(state,nodeIndent){var captureStart,captureEnd,hexLength,hexResult,tmp,ch;ch=state.input.charCodeAt(state.position);if(ch!==34)return false;state.kind="scalar";state.result="";state.position++;captureStart=captureEnd=state.position;while((ch=state.input.charCodeAt(state.position))!==0)if(ch===34){captureSegment(state,captureStart,state.position,true);state.position++;return true}else if(ch===92){captureSegment(state,captureStart,state.position,true);ch=state.input.charCodeAt(++state.position);
if(is_EOL(ch))skipSeparationSpace(state,false,nodeIndent);else if(ch<256&&simpleEscapeCheck[ch]){state.result+=simpleEscapeMap[ch];state.position++}else if((tmp=escapedHexLen(ch))>0){hexLength=tmp;hexResult=0;for(;hexLength>0;hexLength--){ch=state.input.charCodeAt(++state.position);if((tmp=fromHexCode(ch))>=0)hexResult=(hexResult<<4)+tmp;else throwError(state,"expected hexadecimal character")}state.result+=charFromCodepoint(hexResult);state.position++}else throwError(state,"unknown escape sequence");
captureStart=captureEnd=state.position}else if(is_EOL(ch)){captureSegment(state,captureStart,captureEnd,true);writeFoldedLines(state,skipSeparationSpace(state,false,nodeIndent));captureStart=captureEnd=state.position}else if(state.position===state.lineStart&&testDocumentSeparator(state))throwError(state,"unexpected end of the document within a double quoted scalar");else{state.position++;captureEnd=state.position}throwError(state,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(state,
nodeIndent){var readNext=true,_line,_tag=state.tag,_result,_anchor=state.anchor,following,terminator,isPair,isExplicitPair,isMapping,overridableKeys={},keyNode,keyTag,valueNode,ch;ch=state.input.charCodeAt(state.position);if(ch===91){terminator=93;isMapping=false;_result=[]}else if(ch===123){terminator=125;isMapping=true;_result={}}else return false;if(state.anchor!==null)state.anchorMap[state.anchor]=_result;ch=state.input.charCodeAt(++state.position);while(ch!==0){skipSeparationSpace(state,true,
nodeIndent);ch=state.input.charCodeAt(state.position);if(ch===terminator){state.position++;state.tag=_tag;state.anchor=_anchor;state.kind=isMapping?"mapping":"sequence";state.result=_result;return true}else if(!readNext)throwError(state,"missed comma between flow collection entries");keyTag=keyNode=valueNode=null;isPair=isExplicitPair=false;if(ch===63){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)){isPair=isExplicitPair=true;state.position++;skipSeparationSpace(state,
true,nodeIndent)}}_line=state.line;composeNode(state,nodeIndent,CONTEXT_FLOW_IN,false,true);keyTag=state.tag;keyNode=state.result;skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if((isExplicitPair||state.line===_line)&&ch===58){isPair=true;ch=state.input.charCodeAt(++state.position);skipSeparationSpace(state,true,nodeIndent);composeNode(state,nodeIndent,CONTEXT_FLOW_IN,false,true);valueNode=state.result}if(isMapping)storeMappingPair(state,_result,overridableKeys,
keyTag,keyNode,valueNode);else if(isPair)_result.push(storeMappingPair(state,null,overridableKeys,keyTag,keyNode,valueNode));else _result.push(keyNode);skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if(ch===44){readNext=true;ch=state.input.charCodeAt(++state.position)}else readNext=false}throwError(state,"unexpected end of the stream within a flow collection")}function readBlockScalar(state,nodeIndent){var captureStart,folding,chomping=CHOMPING_CLIP,didReadContent=
false,detectedIndent=false,textIndent=nodeIndent,emptyLines=0,atMoreIndented=false,tmp,ch;ch=state.input.charCodeAt(state.position);if(ch===124)folding=false;else if(ch===62)folding=true;else return false;state.kind="scalar";state.result="";while(ch!==0){ch=state.input.charCodeAt(++state.position);if(ch===43||ch===45)if(CHOMPING_CLIP===chomping)chomping=ch===43?CHOMPING_KEEP:CHOMPING_STRIP;else throwError(state,"repeat of a chomping mode identifier");else if((tmp=fromDecimalCode(ch))>=0)if(tmp===
0)throwError(state,"bad explicit indentation width of a block scalar; it cannot be less than one");else if(!detectedIndent){textIndent=nodeIndent+tmp-1;detectedIndent=true}else throwError(state,"repeat of an indentation width identifier");else break}if(is_WHITE_SPACE(ch)){do ch=state.input.charCodeAt(++state.position);while(is_WHITE_SPACE(ch));if(ch===35){do ch=state.input.charCodeAt(++state.position);while(!is_EOL(ch)&&ch!==0)}}while(ch!==0){readLineBreak(state);state.lineIndent=0;ch=state.input.charCodeAt(state.position);
while((!detectedIndent||state.lineIndent<textIndent)&&ch===32){state.lineIndent++;ch=state.input.charCodeAt(++state.position)}if(!detectedIndent&&state.lineIndent>textIndent)textIndent=state.lineIndent;if(is_EOL(ch)){emptyLines++;continue}if(state.lineIndent<textIndent){if(chomping===CHOMPING_KEEP)state.result+=common.repeat("\n",didReadContent?1+emptyLines:emptyLines);else if(chomping===CHOMPING_CLIP)if(didReadContent)state.result+="\n";break}if(folding)if(is_WHITE_SPACE(ch)){atMoreIndented=true;
state.result+=common.repeat("\n",didReadContent?1+emptyLines:emptyLines)}else if(atMoreIndented){atMoreIndented=false;state.result+=common.repeat("\n",emptyLines+1)}else if(emptyLines===0){if(didReadContent)state.result+=" "}else state.result+=common.repeat("\n",emptyLines);else state.result+=common.repeat("\n",didReadContent?1+emptyLines:emptyLines);didReadContent=true;detectedIndent=true;emptyLines=0;captureStart=state.position;while(!is_EOL(ch)&&ch!==0)ch=state.input.charCodeAt(++state.position);
captureSegment(state,captureStart,state.position,false)}return true}function readBlockSequence(state,nodeIndent){var _line,_tag=state.tag,_anchor=state.anchor,_result=[],following,detected=false,ch;if(state.anchor!==null)state.anchorMap[state.anchor]=_result;ch=state.input.charCodeAt(state.position);while(ch!==0){if(ch!==45)break;following=state.input.charCodeAt(state.position+1);if(!is_WS_OR_EOL(following))break;detected=true;state.position++;if(skipSeparationSpace(state,true,-1))if(state.lineIndent<=
nodeIndent){_result.push(null);ch=state.input.charCodeAt(state.position);continue}_line=state.line;composeNode(state,nodeIndent,CONTEXT_BLOCK_IN,false,true);_result.push(state.result);skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position);if((state.line===_line||state.lineIndent>nodeIndent)&&ch!==0)throwError(state,"bad indentation of a sequence entry");else if(state.lineIndent<nodeIndent)break}if(detected){state.tag=_tag;state.anchor=_anchor;state.kind="sequence";state.result=
_result;return true}return false}function readBlockMapping(state,nodeIndent,flowIndent){var following,allowCompact,_line,_tag=state.tag,_anchor=state.anchor,_result={},overridableKeys={},keyTag=null,keyNode=null,valueNode=null,atExplicitKey=false,detected=false,ch;if(state.anchor!==null)state.anchorMap[state.anchor]=_result;ch=state.input.charCodeAt(state.position);while(ch!==0){following=state.input.charCodeAt(state.position+1);_line=state.line;if((ch===63||ch===58)&&is_WS_OR_EOL(following)){if(ch===
63){if(atExplicitKey){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,null);keyTag=keyNode=valueNode=null}detected=true;atExplicitKey=true;allowCompact=true}else if(atExplicitKey){atExplicitKey=false;allowCompact=true}else throwError(state,"incomplete explicit mapping pair; a key node is missed");state.position+=1;ch=following}else if(composeNode(state,flowIndent,CONTEXT_FLOW_OUT,false,true))if(state.line===_line){ch=state.input.charCodeAt(state.position);while(is_WHITE_SPACE(ch))ch=
state.input.charCodeAt(++state.position);if(ch===58){ch=state.input.charCodeAt(++state.position);if(!is_WS_OR_EOL(ch))throwError(state,"a whitespace character is expected after the key-value separator within a block mapping");if(atExplicitKey){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,null);keyTag=keyNode=valueNode=null}detected=true;atExplicitKey=false;allowCompact=false;keyTag=state.tag;keyNode=state.result}else if(detected)throwError(state,"can not read an implicit mapping pair; a colon is missed");
else{state.tag=_tag;state.anchor=_anchor;return true}}else if(detected)throwError(state,"can not read a block mapping entry; a multiline key may not be an implicit key");else{state.tag=_tag;state.anchor=_anchor;return true}else break;if(state.line===_line||state.lineIndent>nodeIndent){if(composeNode(state,nodeIndent,CONTEXT_BLOCK_OUT,true,allowCompact))if(atExplicitKey)keyNode=state.result;else valueNode=state.result;if(!atExplicitKey){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,
valueNode);keyTag=keyNode=valueNode=null}skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position)}if(state.lineIndent>nodeIndent&&ch!==0)throwError(state,"bad indentation of a mapping entry");else if(state.lineIndent<nodeIndent)break}if(atExplicitKey)storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,null);if(detected){state.tag=_tag;state.anchor=_anchor;state.kind="mapping";state.result=_result}return detected}function readTagProperty(state){var _position,isVerbatim=
false,isNamed=false,tagHandle,tagName,ch;ch=state.input.charCodeAt(state.position);if(ch!==33)return false;if(state.tag!==null)throwError(state,"duplication of a tag property");ch=state.input.charCodeAt(++state.position);if(ch===60){isVerbatim=true;ch=state.input.charCodeAt(++state.position)}else if(ch===33){isNamed=true;tagHandle="!!";ch=state.input.charCodeAt(++state.position)}else tagHandle="!";_position=state.position;if(isVerbatim){do ch=state.input.charCodeAt(++state.position);while(ch!==0&&
ch!==62);if(state.position<state.length){tagName=state.input.slice(_position,state.position);ch=state.input.charCodeAt(++state.position)}else throwError(state,"unexpected end of the stream within a verbatim tag")}else{while(ch!==0&&!is_WS_OR_EOL(ch)){if(ch===33)if(!isNamed){tagHandle=state.input.slice(_position-1,state.position+1);if(!PATTERN_TAG_HANDLE.test(tagHandle))throwError(state,"named tag handle cannot contain such characters");isNamed=true;_position=state.position+1}else throwError(state,
"tag suffix cannot contain exclamation marks");ch=state.input.charCodeAt(++state.position)}tagName=state.input.slice(_position,state.position);if(PATTERN_FLOW_INDICATORS.test(tagName))throwError(state,"tag suffix cannot contain flow indicator characters")}if(tagName&&!PATTERN_TAG_URI.test(tagName))throwError(state,"tag name cannot contain such characters: "+tagName);if(isVerbatim)state.tag=tagName;else if(_hasOwnProperty.call(state.tagMap,tagHandle))state.tag=state.tagMap[tagHandle]+tagName;else if(tagHandle===
"!")state.tag="!"+tagName;else if(tagHandle==="!!")state.tag="tag:yaml.org,2002:"+tagName;else throwError(state,'undeclared tag handle "'+tagHandle+'"');return true}function readAnchorProperty(state){var _position,ch;ch=state.input.charCodeAt(state.position);if(ch!==38)return false;if(state.anchor!==null)throwError(state,"duplication of an anchor property");ch=state.input.charCodeAt(++state.position);_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch)&&!is_FLOW_INDICATOR(ch))ch=state.input.charCodeAt(++state.position);
if(state.position===_position)throwError(state,"name of an anchor node must contain at least one character");state.anchor=state.input.slice(_position,state.position);return true}function readAlias(state){var _position,alias,ch;ch=state.input.charCodeAt(state.position);if(ch!==42)return false;ch=state.input.charCodeAt(++state.position);_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch)&&!is_FLOW_INDICATOR(ch))ch=state.input.charCodeAt(++state.position);if(state.position===_position)throwError(state,
"name of an alias node must contain at least one character");alias=state.input.slice(_position,state.position);if(!state.anchorMap.hasOwnProperty(alias))throwError(state,'unidentified alias "'+alias+'"');state.result=state.anchorMap[alias];skipSeparationSpace(state,true,-1);return true}function composeNode(state,parentIndent,nodeContext,allowToSeek,allowCompact){var allowBlockStyles,allowBlockScalars,allowBlockCollections,indentStatus=1,atNewLine=false,hasContent=false,typeIndex,typeQuantity,type,
flowIndent,blockIndent;if(state.listener!==null)state.listener("open",state);state.tag=null;state.anchor=null;state.kind=null;state.result=null;allowBlockStyles=allowBlockScalars=allowBlockCollections=CONTEXT_BLOCK_OUT===nodeContext||CONTEXT_BLOCK_IN===nodeContext;if(allowToSeek)if(skipSeparationSpace(state,true,-1)){atNewLine=true;if(state.lineIndent>parentIndent)indentStatus=1;else if(state.lineIndent===parentIndent)indentStatus=0;else if(state.lineIndent<parentIndent)indentStatus=-1}if(indentStatus===
1)while(readTagProperty(state)||readAnchorProperty(state))if(skipSeparationSpace(state,true,-1)){atNewLine=true;allowBlockCollections=allowBlockStyles;if(state.lineIndent>parentIndent)indentStatus=1;else if(state.lineIndent===parentIndent)indentStatus=0;else if(state.lineIndent<parentIndent)indentStatus=-1}else allowBlockCollections=false;if(allowBlockCollections)allowBlockCollections=atNewLine||allowCompact;if(indentStatus===1||CONTEXT_BLOCK_OUT===nodeContext){if(CONTEXT_FLOW_IN===nodeContext||CONTEXT_FLOW_OUT===
nodeContext)flowIndent=parentIndent;else flowIndent=parentIndent+1;blockIndent=state.position-state.lineStart;if(indentStatus===1)if(allowBlockCollections&&(readBlockSequence(state,blockIndent)||readBlockMapping(state,blockIndent,flowIndent))||readFlowCollection(state,flowIndent))hasContent=true;else{if(allowBlockScalars&&readBlockScalar(state,flowIndent)||readSingleQuotedScalar(state,flowIndent)||readDoubleQuotedScalar(state,flowIndent))hasContent=true;else if(readAlias(state)){hasContent=true;if(state.tag!==
null||state.anchor!==null)throwError(state,"alias node should not have any properties")}else if(readPlainScalar(state,flowIndent,CONTEXT_FLOW_IN===nodeContext)){hasContent=true;if(state.tag===null)state.tag="?"}if(state.anchor!==null)state.anchorMap[state.anchor]=state.result}else if(indentStatus===0)hasContent=allowBlockCollections&&readBlockSequence(state,blockIndent)}if(state.tag!==null&&state.tag!=="!")if(state.tag==="?")for(typeIndex=0,typeQuantity=state.implicitTypes.length;typeIndex<typeQuantity;typeIndex+=
1){type=state.implicitTypes[typeIndex];if(type.resolve(state.result)){state.result=type.construct(state.result);state.tag=type.tag;if(state.anchor!==null)state.anchorMap[state.anchor]=state.result;break}}else if(_hasOwnProperty.call(state.typeMap,state.tag)){type=state.typeMap[state.tag];if(state.result!==null&&type.kind!==state.kind)throwError(state,"unacceptable node kind for !\x3c"+state.tag+'\x3e tag; it should be "'+type.kind+'", not "'+state.kind+'"');if(!type.resolve(state.result))throwError(state,
"cannot resolve a node with !\x3c"+state.tag+"\x3e explicit tag");else{state.result=type.construct(state.result);if(state.anchor!==null)state.anchorMap[state.anchor]=state.result}}else throwError(state,"unknown tag !\x3c"+state.tag+"\x3e");if(state.listener!==null)state.listener("close",state);return state.tag!==null||state.anchor!==null||hasContent}function readDocument(state){var documentStart=state.position,_position,directiveName,directiveArgs,hasDirectives=false,ch;state.version=null;state.checkLineBreaks=
state.legacy;state.tagMap={};state.anchorMap={};while((ch=state.input.charCodeAt(state.position))!==0){skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position);if(state.lineIndent>0||ch!==37)break;hasDirectives=true;ch=state.input.charCodeAt(++state.position);_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch))ch=state.input.charCodeAt(++state.position);directiveName=state.input.slice(_position,state.position);directiveArgs=[];if(directiveName.length<1)throwError(state,"directive name must not be less than one character in length");
while(ch!==0){while(is_WHITE_SPACE(ch))ch=state.input.charCodeAt(++state.position);if(ch===35){do ch=state.input.charCodeAt(++state.position);while(ch!==0&&!is_EOL(ch));break}if(is_EOL(ch))break;_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch))ch=state.input.charCodeAt(++state.position);directiveArgs.push(state.input.slice(_position,state.position))}if(ch!==0)readLineBreak(state);if(_hasOwnProperty.call(directiveHandlers,directiveName))directiveHandlers[directiveName](state,directiveName,
directiveArgs);else throwWarning(state,'unknown document directive "'+directiveName+'"')}skipSeparationSpace(state,true,-1);if(state.lineIndent===0&&state.input.charCodeAt(state.position)===45&&state.input.charCodeAt(state.position+1)===45&&state.input.charCodeAt(state.position+2)===45){state.position+=3;skipSeparationSpace(state,true,-1)}else if(hasDirectives)throwError(state,"directives end mark is expected");composeNode(state,state.lineIndent-1,CONTEXT_BLOCK_OUT,false,true);skipSeparationSpace(state,
true,-1);if(state.checkLineBreaks&&PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart,state.position)))throwWarning(state,"non-ASCII line breaks are interpreted as content");state.documents.push(state.result);if(state.position===state.lineStart&&testDocumentSeparator(state)){if(state.input.charCodeAt(state.position)===46){state.position+=3;skipSeparationSpace(state,true,-1)}return}if(state.position<state.length-1)throwError(state,"end of the stream or a document separator is expected");
else return}function loadDocuments(input,options){input=String(input);options=options||{};if(input.length!==0){if(input.charCodeAt(input.length-1)!==10&&input.charCodeAt(input.length-1)!==13)input+="\n";if(input.charCodeAt(0)===65279)input=input.slice(1)}var state=new State(input,options);state.input+="\x00";while(state.input.charCodeAt(state.position)===32){state.lineIndent+=1;state.position+=1}while(state.position<state.length-1)readDocument(state);return state.documents}function loadAll(input,
iterator,options){var documents=loadDocuments(input,options),index,length;for(index=0,length=documents.length;index<length;index+=1)iterator(documents[index])}function load(input,options){var documents=loadDocuments(input,options);if(documents.length===0)return undefined;else if(documents.length===1)return documents[0];throw new YAMLException("expected a single document in the stream, but found more");}function safeLoadAll(input,output,options){loadAll(input,output,common.extend({schema:DEFAULT_SAFE_SCHEMA},
options))}function safeLoad(input,options){return load(input,common.extend({schema:DEFAULT_SAFE_SCHEMA},options))}module.exports.loadAll=loadAll;module.exports.load=load;module.exports.safeLoadAll=safeLoadAll;module.exports.safeLoad=safeLoad},{"./common":40,"./exception":42,"./mark":44,"./schema/default_full":47,"./schema/default_safe":48}],44:[function(_dereq_,module,exports){var common=_dereq_("./common");function Mark(name,buffer,position,line,column){this.name=name;this.buffer=buffer;this.position=
position;this.line=line;this.column=column}Mark.prototype.getSnippet=function getSnippet(indent,maxLength){var head,start,tail,end,snippet;if(!this.buffer)return null;indent=indent||4;maxLength=maxLength||75;head="";start=this.position;while(start>0&&"\x00\r\n\u0085\u2028\u2029".indexOf(this.buffer.charAt(start-1))===-1){start-=1;if(this.position-start>maxLength/2-1){head=" ... ";start+=5;break}}tail="";end=this.position;while(end<this.buffer.length&&"\x00\r\n\u0085\u2028\u2029".indexOf(this.buffer.charAt(end))===
-1){end+=1;if(end-this.position>maxLength/2-1){tail=" ... ";end-=5;break}}snippet=this.buffer.slice(start,end);return common.repeat(" ",indent)+head+snippet+tail+"\n"+common.repeat(" ",indent+this.position-start+head.length)+"^"};Mark.prototype.toString=function toString(compact){var snippet,where="";if(this.name)where+='in "'+this.name+'" ';where+="at line "+(this.line+1)+", column "+(this.column+1);if(!compact){snippet=this.getSnippet();if(snippet)where+=":\n"+snippet}return where};module.exports=
Mark},{"./common":40}],45:[function(_dereq_,module,exports){var common=_dereq_("./common");var YAMLException=_dereq_("./exception");var Type=_dereq_("./type");function compileList(schema,name,result){var exclude=[];schema.include.forEach(function(includedSchema){result=compileList(includedSchema,name,result)});schema[name].forEach(function(currentType){result.forEach(function(previousType,previousIndex){if(previousType.tag===currentType.tag)exclude.push(previousIndex)});result.push(currentType)});
return result.filter(function(type,index){return exclude.indexOf(index)===-1})}function compileMap(){var result={},index,length;function collectType(type){result[type.tag]=type}for(index=0,length=arguments.length;index<length;index+=1)arguments[index].forEach(collectType);return result}function Schema(definition){this.include=definition.include||[];this.implicit=definition.implicit||[];this.explicit=definition.explicit||[];this.implicit.forEach(function(type){if(type.loadKind&&type.loadKind!=="scalar")throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
});this.compiledImplicit=compileList(this,"implicit",[]);this.compiledExplicit=compileList(this,"explicit",[]);this.compiledTypeMap=compileMap(this.compiledImplicit,this.compiledExplicit)}Schema.DEFAULT=null;Schema.create=function createSchema(){var schemas,types;switch(arguments.length){case 1:schemas=Schema.DEFAULT;types=arguments[0];break;case 2:schemas=arguments[0];types=arguments[1];break;default:throw new YAMLException("Wrong number of arguments for Schema.create function");}schemas=common.toArray(schemas);
types=common.toArray(types);if(!schemas.every(function(schema){return schema instanceof Schema}))throw new YAMLException("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!types.every(function(type){return type instanceof Type}))throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new Schema({include:schemas,explicit:types})};module.exports=Schema},{"./common":40,"./exception":42,"./type":51}],
46:[function(_dereq_,module,exports){var Schema=_dereq_("../schema");module.exports=new Schema({include:[_dereq_("./json")]})},{"../schema":45,"./json":50}],47:[function(_dereq_,module,exports){var Schema=_dereq_("../schema");module.exports=Schema.DEFAULT=new Schema({include:[_dereq_("./default_safe")],explicit:[_dereq_("../type/js/undefined"),_dereq_("../type/js/regexp"),_dereq_("../type/js/function")]})},{"../schema":45,"../type/js/function":56,"../type/js/regexp":57,"../type/js/undefined":58,"./default_safe":48}],
48:[function(_dereq_,module,exports){var Schema=_dereq_("../schema");module.exports=new Schema({include:[_dereq_("./core")],implicit:[_dereq_("../type/timestamp"),_dereq_("../type/merge")],explicit:[_dereq_("../type/binary"),_dereq_("../type/omap"),_dereq_("../type/pairs"),_dereq_("../type/set")]})},{"../schema":45,"../type/binary":52,"../type/merge":60,"../type/omap":62,"../type/pairs":63,"../type/set":65,"../type/timestamp":67,"./core":46}],49:[function(_dereq_,module,exports){var Schema=_dereq_("../schema");
module.exports=new Schema({explicit:[_dereq_("../type/str"),_dereq_("../type/seq"),_dereq_("../type/map")]})},{"../schema":45,"../type/map":59,"../type/seq":64,"../type/str":66}],50:[function(_dereq_,module,exports){var Schema=_dereq_("../schema");module.exports=new Schema({include:[_dereq_("./failsafe")],implicit:[_dereq_("../type/null"),_dereq_("../type/bool"),_dereq_("../type/int"),_dereq_("../type/float")]})},{"../schema":45,"../type/bool":53,"../type/float":54,"../type/int":55,"../type/null":61,
"./failsafe":49}],51:[function(_dereq_,module,exports){var YAMLException=_dereq_("./exception");var TYPE_CONSTRUCTOR_OPTIONS=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"];var YAML_NODE_KINDS=["scalar","sequence","mapping"];function compileStyleAliases(map){var result={};if(map!==null)Object.keys(map).forEach(function(style){map[style].forEach(function(alias){result[String(alias)]=style})});return result}function Type(tag,options){options=options||
{};Object.keys(options).forEach(function(name){if(TYPE_CONSTRUCTOR_OPTIONS.indexOf(name)===-1)throw new YAMLException('Unknown option "'+name+'" is met in definition of "'+tag+'" YAML type.');});this.tag=tag;this.kind=options["kind"]||null;this.resolve=options["resolve"]||function(){return true};this.construct=options["construct"]||function(data){return data};this.instanceOf=options["instanceOf"]||null;this.predicate=options["predicate"]||null;this.represent=options["represent"]||null;this.defaultStyle=
options["defaultStyle"]||null;this.styleAliases=compileStyleAliases(options["styleAliases"]||null);if(YAML_NODE_KINDS.indexOf(this.kind)===-1)throw new YAMLException('Unknown kind "'+this.kind+'" is specified for "'+tag+'" YAML type.');}module.exports=Type},{"./exception":42}],52:[function(_dereq_,module,exports){var NodeBuffer;try{var _require=_dereq_;NodeBuffer=_require("buffer").Buffer}catch(__){}var Type=_dereq_("../type");var BASE64_MAP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d\n\r";
function resolveYamlBinary(data){if(data===null)return false;var code,idx,bitlen=0,max=data.length,map=BASE64_MAP;for(idx=0;idx<max;idx++){code=map.indexOf(data.charAt(idx));if(code>64)continue;if(code<0)return false;bitlen+=6}return bitlen%8===0}function constructYamlBinary(data){var idx,tailbits,input=data.replace(/[\r\n=]/g,""),max=input.length,map=BASE64_MAP,bits=0,result=[];for(idx=0;idx<max;idx++){if(idx%4===0&&idx){result.push(bits>>16&255);result.push(bits>>8&255);result.push(bits&255)}bits=
bits<<6|map.indexOf(input.charAt(idx))}tailbits=max%4*6;if(tailbits===0){result.push(bits>>16&255);result.push(bits>>8&255);result.push(bits&255)}else if(tailbits===18){result.push(bits>>10&255);result.push(bits>>2&255)}else if(tailbits===12)result.push(bits>>4&255);if(NodeBuffer)return new NodeBuffer(result);return result}function representYamlBinary(object){var result="",bits=0,idx,tail,max=object.length,map=BASE64_MAP;for(idx=0;idx<max;idx++){if(idx%3===0&&idx){result+=map[bits>>18&63];result+=
map[bits>>12&63];result+=map[bits>>6&63];result+=map[bits&63]}bits=(bits<<8)+object[idx]}tail=max%3;if(tail===0){result+=map[bits>>18&63];result+=map[bits>>12&63];result+=map[bits>>6&63];result+=map[bits&63]}else if(tail===2){result+=map[bits>>10&63];result+=map[bits>>4&63];result+=map[bits<<2&63];result+=map[64]}else if(tail===1){result+=map[bits>>2&63];result+=map[bits<<4&63];result+=map[64];result+=map[64]}return result}function isBinary(object){return NodeBuffer&&NodeBuffer.isBuffer(object)}module.exports=
new Type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary})},{"../type":51}],53:[function(_dereq_,module,exports){var Type=_dereq_("../type");function resolveYamlBoolean(data){if(data===null)return false;var max=data.length;return max===4&&(data==="true"||data==="True"||data==="TRUE")||max===5&&(data==="false"||data==="False"||data==="FALSE")}function constructYamlBoolean(data){return data==="true"||
data==="True"||data==="TRUE"}function isBoolean(object){return Object.prototype.toString.call(object)==="[object Boolean]"}module.exports=new Type("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(object){return object?"true":"false"},uppercase:function(object){return object?"TRUE":"FALSE"},camelcase:function(object){return object?"True":"False"}},defaultStyle:"lowercase"})},{"../type":51}],54:[function(_dereq_,
module,exports){var common=_dereq_("../common");var Type=_dereq_("../type");var YAML_FLOAT_PATTERN=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?"+"|\\.[0-9_]+(?:[eE][-+][0-9]+)?"+"|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*"+"|[-+]?\\.(?:inf|Inf|INF)"+"|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(data){if(data===null)return false;if(!YAML_FLOAT_PATTERN.test(data))return false;return true}function constructYamlFloat(data){var value,sign,base,digits;value=data.replace(/_/g,
"").toLowerCase();sign=value[0]==="-"?-1:1;digits=[];if("+-".indexOf(value[0])>=0)value=value.slice(1);if(value===".inf")return sign===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;else if(value===".nan")return NaN;else if(value.indexOf(":")>=0){value.split(":").forEach(function(v){digits.unshift(parseFloat(v,10))});value=0;base=1;digits.forEach(function(d){value+=d*base;base*=60});return sign*value}return sign*parseFloat(value,10)}var SCIENTIFIC_WITHOUT_DOT=/^[-+]?[0-9]+e/;function representYamlFloat(object,
style){var res;if(isNaN(object))switch(style){case "lowercase":return".nan";case "uppercase":return".NAN";case "camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===object)switch(style){case "lowercase":return".inf";case "uppercase":return".INF";case "camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===object)switch(style){case "lowercase":return"-.inf";case "uppercase":return"-.INF";case "camelcase":return"-.Inf"}else if(common.isNegativeZero(object))return"-0.0";res=object.toString(10);
return SCIENTIFIC_WITHOUT_DOT.test(res)?res.replace("e",".e"):res}function isFloat(object){return Object.prototype.toString.call(object)==="[object Number]"&&(object%1!==0||common.isNegativeZero(object))}module.exports=new Type("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"})},{"../common":40,"../type":51}],55:[function(_dereq_,module,exports){var common=_dereq_("../common");var Type=
_dereq_("../type");function isHexCode(c){return 48<=c&&c<=57||65<=c&&c<=70||97<=c&&c<=102}function isOctCode(c){return 48<=c&&c<=55}function isDecCode(c){return 48<=c&&c<=57}function resolveYamlInteger(data){if(data===null)return false;var max=data.length,index=0,hasDigits=false,ch;if(!max)return false;ch=data[index];if(ch==="-"||ch==="+")ch=data[++index];if(ch==="0"){if(index+1===max)return true;ch=data[++index];if(ch==="b"){index++;for(;index<max;index++){ch=data[index];if(ch==="_")continue;if(ch!==
"0"&&ch!=="1")return false;hasDigits=true}return hasDigits}if(ch==="x"){index++;for(;index<max;index++){ch=data[index];if(ch==="_")continue;if(!isHexCode(data.charCodeAt(index)))return false;hasDigits=true}return hasDigits}for(;index<max;index++){ch=data[index];if(ch==="_")continue;if(!isOctCode(data.charCodeAt(index)))return false;hasDigits=true}return hasDigits}for(;index<max;index++){ch=data[index];if(ch==="_")continue;if(ch===":")break;if(!isDecCode(data.charCodeAt(index)))return false;hasDigits=
true}if(!hasDigits)return false;if(ch!==":")return true;return/^(:[0-5]?[0-9])+$/.test(data.slice(index))}function constructYamlInteger(data){var value=data,sign=1,ch,base,digits=[];if(value.indexOf("_")!==-1)value=value.replace(/_/g,"");ch=value[0];if(ch==="-"||ch==="+"){if(ch==="-")sign=-1;value=value.slice(1);ch=value[0]}if(value==="0")return 0;if(ch==="0"){if(value[1]==="b")return sign*parseInt(value.slice(2),2);if(value[1]==="x")return sign*parseInt(value,16);return sign*parseInt(value,8)}if(value.indexOf(":")!==
-1){value.split(":").forEach(function(v){digits.unshift(parseInt(v,10))});value=0;base=1;digits.forEach(function(d){value+=d*base;base*=60});return sign*value}return sign*parseInt(value,10)}function isInteger(object){return Object.prototype.toString.call(object)==="[object Number]"&&(object%1===0&&!common.isNegativeZero(object))}module.exports=new Type("tag:yaml.org,2002:int",{kind:"scalar",resolve:resolveYamlInteger,construct:constructYamlInteger,predicate:isInteger,represent:{binary:function(object){return"0b"+
object.toString(2)},octal:function(object){return"0"+object.toString(8)},decimal:function(object){return object.toString(10)},hexadecimal:function(object){return"0x"+object.toString(16).toUpperCase()}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},{"../common":40,"../type":51}],56:[function(_dereq_,module,exports){var esprima;try{var _require=_dereq_;esprima=_require("esprima")}catch(_){if(typeof window!=="undefined")esprima=window.esprima}var Type=
_dereq_("../../type");function resolveJavascriptFunction(data){if(data===null)return false;try{var source="("+data+")",ast=esprima.parse(source,{range:true});if(ast.type!=="Program"||ast.body.length!==1||ast.body[0].type!=="ExpressionStatement"||ast.body[0].expression.type!=="FunctionExpression")return false;return true}catch(err){return false}}function constructJavascriptFunction(data){var source="("+data+")",ast=esprima.parse(source,{range:true}),params=[],body;if(ast.type!=="Program"||ast.body.length!==
1||ast.body[0].type!=="ExpressionStatement"||ast.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");ast.body[0].expression.params.forEach(function(param){params.push(param.name)});body=ast.body[0].expression.body.range;return new Function(params,source.slice(body[0]+1,body[1]-1))}function representJavascriptFunction(object){return object.toString()}function isFunction(object){return Object.prototype.toString.call(object)==="[object Function]"}module.exports=
new Type("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:resolveJavascriptFunction,construct:constructJavascriptFunction,predicate:isFunction,represent:representJavascriptFunction})},{"../../type":51}],57:[function(_dereq_,module,exports){var Type=_dereq_("../../type");function resolveJavascriptRegExp(data){if(data===null)return false;if(data.length===0)return false;var regexp=data,tail=/\/([gim]*)$/.exec(data),modifiers="";if(regexp[0]==="/"){if(tail)modifiers=tail[1];if(modifiers.length>
3)return false;if(regexp[regexp.length-modifiers.length-1]!=="/")return false}return true}function constructJavascriptRegExp(data){var regexp=data,tail=/\/([gim]*)$/.exec(data),modifiers="";if(regexp[0]==="/"){if(tail)modifiers=tail[1];regexp=regexp.slice(1,regexp.length-modifiers.length-1)}return new RegExp(regexp,modifiers)}function representJavascriptRegExp(object){var result="/"+object.source+"/";if(object.global)result+="g";if(object.multiline)result+="m";if(object.ignoreCase)result+="i";return result}
function isRegExp(object){return Object.prototype.toString.call(object)==="[object RegExp]"}module.exports=new Type("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:resolveJavascriptRegExp,construct:constructJavascriptRegExp,predicate:isRegExp,represent:representJavascriptRegExp})},{"../../type":51}],58:[function(_dereq_,module,exports){var Type=_dereq_("../../type");function resolveJavascriptUndefined(){return true}function constructJavascriptUndefined(){return undefined}function representJavascriptUndefined(){return""}
function isUndefined(object){return typeof object==="undefined"}module.exports=new Type("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:resolveJavascriptUndefined,construct:constructJavascriptUndefined,predicate:isUndefined,represent:representJavascriptUndefined})},{"../../type":51}],59:[function(_dereq_,module,exports){var Type=_dereq_("../type");module.exports=new Type("tag:yaml.org,2002:map",{kind:"mapping",construct:function(data){return data!==null?data:{}}})},{"../type":51}],60:[function(_dereq_,
module,exports){var Type=_dereq_("../type");function resolveYamlMerge(data){return data==="\x3c\x3c"||data===null}module.exports=new Type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge})},{"../type":51}],61:[function(_dereq_,module,exports){var Type=_dereq_("../type");function resolveYamlNull(data){if(data===null)return true;var max=data.length;return max===1&&data==="~"||max===4&&(data==="null"||data==="Null"||data==="NULL")}function constructYamlNull(){return null}function isNull(object){return object===
null}module.exports=new Type("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":51}],62:[function(_dereq_,module,exports){var Type=_dereq_("../type");var _hasOwnProperty=Object.prototype.hasOwnProperty;var _toString=Object.prototype.toString;function resolveYamlOmap(data){if(data===
null)return true;var objectKeys=[],index,length,pair,pairKey,pairHasKey,object=data;for(index=0,length=object.length;index<length;index+=1){pair=object[index];pairHasKey=false;if(_toString.call(pair)!=="[object Object]")return false;for(pairKey in pair)if(_hasOwnProperty.call(pair,pairKey))if(!pairHasKey)pairHasKey=true;else return false;if(!pairHasKey)return false;if(objectKeys.indexOf(pairKey)===-1)objectKeys.push(pairKey);else return false}return true}function constructYamlOmap(data){return data!==
null?data:[]}module.exports=new Type("tag:yaml.org,2002:omap",{kind:"sequence",resolve:resolveYamlOmap,construct:constructYamlOmap})},{"../type":51}],63:[function(_dereq_,module,exports){var Type=_dereq_("../type");var _toString=Object.prototype.toString;function resolveYamlPairs(data){if(data===null)return true;var index,length,pair,keys,result,object=data;result=new Array(object.length);for(index=0,length=object.length;index<length;index+=1){pair=object[index];if(_toString.call(pair)!=="[object Object]")return false;
keys=Object.keys(pair);if(keys.length!==1)return false;result[index]=[keys[0],pair[keys[0]]]}return true}function constructYamlPairs(data){if(data===null)return[];var index,length,pair,keys,result,object=data;result=new Array(object.length);for(index=0,length=object.length;index<length;index+=1){pair=object[index];keys=Object.keys(pair);result[index]=[keys[0],pair[keys[0]]]}return result}module.exports=new Type("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:resolveYamlPairs,construct:constructYamlPairs})},
{"../type":51}],64:[function(_dereq_,module,exports){var Type=_dereq_("../type");module.exports=new Type("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(data){return data!==null?data:[]}})},{"../type":51}],65:[function(_dereq_,module,exports){var Type=_dereq_("../type");var _hasOwnProperty=Object.prototype.hasOwnProperty;function resolveYamlSet(data){if(data===null)return true;var key,object=data;for(key in object)if(_hasOwnProperty.call(object,key))if(object[key]!==null)return false;
return true}function constructYamlSet(data){return data!==null?data:{}}module.exports=new Type("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet})},{"../type":51}],66:[function(_dereq_,module,exports){var Type=_dereq_("../type");module.exports=new Type("tag:yaml.org,2002:str",{kind:"scalar",construct:function(data){return data!==null?data:""}})},{"../type":51}],67:[function(_dereq_,module,exports){var Type=_dereq_("../type");var YAML_DATE_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])"+
"-([0-9][0-9])"+"-([0-9][0-9])$");var YAML_TIMESTAMP_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9]?)"+"-([0-9][0-9]?)"+"(?:[Tt]|[ \\t]+)"+"([0-9][0-9]?)"+":([0-9][0-9])"+":([0-9][0-9])"+"(?:\\.([0-9]*))?"+"(?:[ \\t]*(Z|([-+])([0-9][0-9]?)"+"(?::([0-9][0-9]))?))?$");function resolveYamlTimestamp(data){if(data===null)return false;if(YAML_DATE_REGEXP.exec(data)!==null)return true;if(YAML_TIMESTAMP_REGEXP.exec(data)!==null)return true;return false}function constructYamlTimestamp(data){var match,
year,month,day,hour,minute,second,fraction=0,delta=null,tz_hour,tz_minute,date;match=YAML_DATE_REGEXP.exec(data);if(match===null)match=YAML_TIMESTAMP_REGEXP.exec(data);if(match===null)throw new Error("Date resolve error");year=+match[1];month=+match[2]-1;day=+match[3];if(!match[4])return new Date(Date.UTC(year,month,day));hour=+match[4];minute=+match[5];second=+match[6];if(match[7]){fraction=match[7].slice(0,3);while(fraction.length<3)fraction+="0";fraction=+fraction}if(match[9]){tz_hour=+match[10];
tz_minute=+(match[11]||0);delta=(tz_hour*60+tz_minute)*6E4;if(match[9]==="-")delta=-delta}date=new Date(Date.UTC(year,month,day,hour,minute,second,fraction));if(delta)date.setTime(date.getTime()-delta);return date}function representYamlTimestamp(object){return object.toISOString()}module.exports=new Type("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp})},{"../type":51}],68:[function(_dereq_,
module,exports){var s=1E3;var m=s*60;var h=m*60;var d=h*24;var y=d*365.25;module.exports=function(val,options){options=options||{};if("string"==typeof val)return parse(val);return options.long?long(val):short(val)};function parse(str){str=""+str;if(str.length>1E4)return;var match=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);if(!match)return;var n=parseFloat(match[1]);var type=(match[2]||"ms").toLowerCase();switch(type){case "years":case "year":case "yrs":case "yr":case "y":return n*
y;case "days":case "day":case "d":return n*d;case "hours":case "hour":case "hrs":case "hr":case "h":return n*h;case "minutes":case "minute":case "mins":case "min":case "m":return n*m;case "seconds":case "second":case "secs":case "sec":case "s":return n*s;case "milliseconds":case "millisecond":case "msecs":case "msec":case "ms":return n}}function short(ms){if(ms>=d)return Math.round(ms/d)+"d";if(ms>=h)return Math.round(ms/h)+"h";if(ms>=m)return Math.round(ms/m)+"m";if(ms>=s)return Math.round(ms/s)+
"s";return ms+"ms"}function long(ms){return plural(ms,d,"day")||plural(ms,h,"hour")||plural(ms,m,"minute")||plural(ms,s,"second")||ms+" ms"}function plural(ms,n,name){if(ms<n)return;if(ms<n*1.5)return Math.floor(ms/n)+" "+name;return Math.ceil(ms/n)+" "+name+"s"}},{}],69:[function(_dereq_,module,exports){var util=_dereq_("util"),slice=Array.prototype.slice,vendorSpecificErrorProperties=["name","message","description","number","fileName","lineNumber","columnNumber","sourceURL","line","column","stack"];
module.exports=create(Error);module.exports.error=create(Error);module.exports.eval=create(EvalError);module.exports.range=create(RangeError);module.exports.reference=create(ReferenceError);module.exports.syntax=create(SyntaxError);module.exports.type=create(TypeError);module.exports.uri=create(URIError);module.exports.formatter=util.format;function create(Klass){return function ono(err,props,message,params){var formattedMessage;var formatter=module.exports.formatter;if(typeof err==="string"){formattedMessage=
formatter.apply(null,arguments);err=props=undefined}else if(typeof props==="string")formattedMessage=formatter.apply(null,slice.call(arguments,1));else formattedMessage=formatter.apply(null,slice.call(arguments,2));if(!(err instanceof Error)){props=err;err=undefined}if(err)formattedMessage+=(formattedMessage?" \n":"")+err.message;var newError=new Klass(formattedMessage);extendError(newError,err);extendToJSON(newError);extend(newError,props);return newError}}function extendError(targetError,sourceError){if(sourceError){extendStack(targetError,
sourceError);extend(targetError,sourceError,true)}}function extendToJSON(error){error.toJSON=errorToJSON;error.inspect=errorToString}function extend(target,source,omitVendorSpecificProperties){if(source&&typeof source==="object"){var keys=Object.keys(source);for(var i=0;i<keys.length;i++){var key=keys[i];if(omitVendorSpecificProperties&&vendorSpecificErrorProperties.indexOf(key)>=0)continue;try{target[key]=source[key]}catch(e){}}}}function errorToJSON(){var json={};var keys=Object.keys(this);keys=
keys.concat(vendorSpecificErrorProperties);for(var i=0;i<keys.length;i++){var key=keys[i];var value=this[key];var type=typeof value;if(type!=="undefined"&&type!=="function")json[key]=value}return json}function errorToString(){return JSON.stringify(this,null,2).replace(/\\n/g,"\n")}function extendStack(targetError,sourceError){if(hasLazyStack(sourceError))extendStackProperty(targetError,sourceError);else{var stack=sourceError.stack;if(stack)targetError.stack+=" \n\n"+sourceError.stack}}var supportsLazyStack=
function(){return!!(Object.getOwnPropertyDescriptor&&Object.defineProperty&&(typeof navigator==="undefined"||!/Android/.test(navigator.userAgent)))}();function hasLazyStack(err){if(!supportsLazyStack)return false;var descriptor=Object.getOwnPropertyDescriptor(err,"stack");if(!descriptor)return false;return typeof descriptor.get==="function"}function extendStackProperty(targetError,sourceError){var sourceStack=Object.getOwnPropertyDescriptor(sourceError,"stack");if(sourceStack){var targetStack=Object.getOwnPropertyDescriptor(targetError,
"stack");Object.defineProperty(targetError,"stack",{get:function(){return targetStack.get.apply(targetError)+" \n\n"+sourceError.stack},enumerable:false,configurable:true})}}},{"util":97}],70:[function(_dereq_,module,exports){(function(process){if(!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0)module.exports=nextTick;else module.exports=process.nextTick;function nextTick(fn){var args=new Array(arguments.length-1);var i=
0;while(i<args.length)args[i++]=arguments[i];process.nextTick(function afterTick(){fn.apply(null,args)})}}).call(this,_dereq_("_process"))},{"_process":71}],71:[function(_dereq_,module,exports){var process=module.exports={};var queue=[];var draining=false;var currentQueue;var queueIndex=-1;function cleanUpNextTick(){draining=false;if(currentQueue.length)queue=currentQueue.concat(queue);else queueIndex=-1;if(queue.length)drainQueue()}function drainQueue(){if(draining)return;var timeout=setTimeout(cleanUpNextTick);
draining=true;var len=queue.length;while(len){currentQueue=queue;queue=[];while(++queueIndex<len)if(currentQueue)currentQueue[queueIndex].run();queueIndex=-1;len=queue.length}currentQueue=null;draining=false;clearTimeout(timeout)}process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)args[i-1]=arguments[i];queue.push(new Item(fun,args));if(queue.length===1&&!draining)setTimeout(drainQueue,0)};function Item(fun,array){this.fun=
fun;this.array=array}Item.prototype.run=function(){this.fun.apply(null,this.array)};process.title="browser";process.browser=true;process.env={};process.argv=[];process.version="";process.versions={};function noop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.binding=function(name){throw new Error("process.binding is not supported");};process.cwd=function(){return"/"};process.chdir=
function(dir){throw new Error("process.chdir is not supported");};process.umask=function(){return 0}},{}],72:[function(_dereq_,module,exports){(function(global){(function(root){var freeExports=typeof exports=="object"&&exports&&!exports.nodeType&&exports;var freeModule=typeof module=="object"&&module&&!module.nodeType&&module;var freeGlobal=typeof global=="object"&&global;if(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal||freeGlobal.self===freeGlobal)root=freeGlobal;var punycode,maxInt=
2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexPunycode=/^xn--/,regexNonASCII=/[^\x20-\x7E]/,regexSeparators=/[\x2E\u3002\uFF0E\uFF61]/g,errors={"overflow":"Overflow: input needs wider integers to process","not-basic":"Illegal input \x3e\x3d 0x80 (not a basic code point)","invalid-input":"Invalid input"},baseMinusTMin=base-tMin,floor=Math.floor,stringFromCharCode=String.fromCharCode,key;function error(type){throw new RangeError(errors[type]);}function map(array,
fn){var length=array.length;var result=[];while(length--)result[length]=fn(array[length]);return result}function mapDomain(string,fn){var parts=string.split("@");var result="";if(parts.length>1){result=parts[0]+"@";string=parts[1]}string=string.replace(regexSeparators,".");var labels=string.split(".");var encoded=map(labels,fn).join(".");return result+encoded}function ucs2decode(string){var output=[],counter=0,length=string.length,value,extra;while(counter<length){value=string.charCodeAt(counter++);
if(value>=55296&&value<=56319&&counter<length){extra=string.charCodeAt(counter++);if((extra&64512)==56320)output.push(((value&1023)<<10)+(extra&1023)+65536);else{output.push(value);counter--}}else output.push(value)}return output}function ucs2encode(array){return map(array,function(value){var output="";if(value>65535){value-=65536;output+=stringFromCharCode(value>>>10&1023|55296);value=56320|value&1023}output+=stringFromCharCode(value);return output}).join("")}function basicToDigit(codePoint){if(codePoint-
48<10)return codePoint-22;if(codePoint-65<26)return codePoint-65;if(codePoint-97<26)return codePoint-97;return base}function digitToBasic(digit,flag){return digit+22+75*(digit<26)-((flag!=0)<<5)}function adapt(delta,numPoints,firstTime){var k=0;delta=firstTime?floor(delta/damp):delta>>1;delta+=floor(delta/numPoints);for(;delta>baseMinusTMin*tMax>>1;k+=base)delta=floor(delta/baseMinusTMin);return floor(k+(baseMinusTMin+1)*delta/(delta+skew))}function decode(input){var output=[],inputLength=input.length,
out,i=0,n=initialN,bias=initialBias,basic,j,index,oldi,w,k,digit,t,baseMinusT;basic=input.lastIndexOf(delimiter);if(basic<0)basic=0;for(j=0;j<basic;++j){if(input.charCodeAt(j)>=128)error("not-basic");output.push(input.charCodeAt(j))}for(index=basic>0?basic+1:0;index<inputLength;){for(oldi=i,w=1,k=base;;k+=base){if(index>=inputLength)error("invalid-input");digit=basicToDigit(input.charCodeAt(index++));if(digit>=base||digit>floor((maxInt-i)/w))error("overflow");i+=digit*w;t=k<=bias?tMin:k>=bias+tMax?
tMax:k-bias;if(digit<t)break;baseMinusT=base-t;if(w>floor(maxInt/baseMinusT))error("overflow");w*=baseMinusT}out=output.length+1;bias=adapt(i-oldi,out,oldi==0);if(floor(i/out)>maxInt-n)error("overflow");n+=floor(i/out);i%=out;output.splice(i++,0,n)}return ucs2encode(output)}function encode(input){var n,delta,handledCPCount,basicLength,bias,j,m,q,k,t,currentValue,output=[],inputLength,handledCPCountPlusOne,baseMinusT,qMinusT;input=ucs2decode(input);inputLength=input.length;n=initialN;delta=0;bias=
initialBias;for(j=0;j<inputLength;++j){currentValue=input[j];if(currentValue<128)output.push(stringFromCharCode(currentValue))}handledCPCount=basicLength=output.length;if(basicLength)output.push(delimiter);while(handledCPCount<inputLength){for(m=maxInt,j=0;j<inputLength;++j){currentValue=input[j];if(currentValue>=n&¤tValue<m)m=currentValue}handledCPCountPlusOne=handledCPCount+1;if(m-n>floor((maxInt-delta)/handledCPCountPlusOne))error("overflow");delta+=(m-n)*handledCPCountPlusOne;n=m;for(j=
0;j<inputLength;++j){currentValue=input[j];if(currentValue<n&&++delta>maxInt)error("overflow");if(currentValue==n){for(q=delta,k=base;;k+=base){t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(q<t)break;qMinusT=q-t;baseMinusT=base-t;output.push(stringFromCharCode(digitToBasic(t+qMinusT%baseMinusT,0)));q=floor(qMinusT/baseMinusT)}output.push(stringFromCharCode(digitToBasic(q,0)));bias=adapt(delta,handledCPCountPlusOne,handledCPCount==basicLength);delta=0;++handledCPCount}}++delta;++n}return output.join("")}
function toUnicode(input){return mapDomain(input,function(string){return regexPunycode.test(string)?decode(string.slice(4).toLowerCase()):string})}function toASCII(input){return mapDomain(input,function(string){return regexNonASCII.test(string)?"xn--"+encode(string):string})}punycode={"version":"1.4.1","ucs2":{"decode":ucs2decode,"encode":ucs2encode},"decode":decode,"encode":encode,"toASCII":toASCII,"toUnicode":toUnicode};if(typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",
function(){return punycode});else if(freeExports&&freeModule)if(module.exports==freeExports)freeModule.exports=punycode;else for(key in punycode)punycode.hasOwnProperty(key)&&(freeExports[key]=punycode[key]);else root.punycode=punycode})(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],73:[function(_dereq_,module,exports){function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}module.exports=
function(qs,sep,eq,options){sep=sep||"\x26";eq=eq||"\x3d";var obj={};if(typeof qs!=="string"||qs.length===0)return obj;var regexp=/\+/g;qs=qs.split(sep);var maxKeys=1E3;if(options&&typeof options.maxKeys==="number")maxKeys=options.maxKeys;var len=qs.length;if(maxKeys>0&&len>maxKeys)len=maxKeys;for(var i=0;i<len;++i){var x=qs[i].replace(regexp,"%20"),idx=x.indexOf(eq),kstr,vstr,k,v;if(idx>=0){kstr=x.substr(0,idx);vstr=x.substr(idx+1)}else{kstr=x;vstr=""}k=decodeURIComponent(kstr);v=decodeURIComponent(vstr);
if(!hasOwnProperty(obj,k))obj[k]=v;else if(isArray(obj[k]))obj[k].push(v);else obj[k]=[obj[k],v]}return obj};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==="[object Array]"}},{}],74:[function(_dereq_,module,exports){var stringifyPrimitive=function(v){switch(typeof v){case "string":return v;case "boolean":return v?"true":"false";case "number":return isFinite(v)?v:"";default:return""}};module.exports=function(obj,sep,eq,name){sep=sep||"\x26";eq=eq||"\x3d";if(obj===
null)obj=undefined;if(typeof obj==="object")return map(objectKeys(obj),function(k){var ks=encodeURIComponent(stringifyPrimitive(k))+eq;if(isArray(obj[k]))return map(obj[k],function(v){return ks+encodeURIComponent(stringifyPrimitive(v))}).join(sep);else return ks+encodeURIComponent(stringifyPrimitive(obj[k]))}).join(sep);if(!name)return"";return encodeURIComponent(stringifyPrimitive(name))+eq+encodeURIComponent(stringifyPrimitive(obj))};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)===
"[object Array]"};function map(xs,f){if(xs.map)return xs.map(f);var res=[];for(var i=0;i<xs.length;i++)res.push(f(xs[i],i));return res}var objectKeys=Object.keys||function(obj){var res=[];for(var key in obj)if(Object.prototype.hasOwnProperty.call(obj,key))res.push(key);return res}},{}],75:[function(_dereq_,module,exports){exports.decode=exports.parse=_dereq_("./decode");exports.encode=exports.stringify=_dereq_("./encode")},{"./decode":73,"./encode":74}],76:[function(_dereq_,module,exports){module.exports=
_dereq_("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":77}],77:[function(_dereq_,module,exports){var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)keys.push(key);return keys};module.exports=Duplex;var processNextTick=_dereq_("process-nextick-args");var util=_dereq_("core-util-is");util.inherits=_dereq_("inherits");var Readable=_dereq_("./_stream_readable");var Writable=_dereq_("./_stream_writable");util.inherits(Duplex,Readable);var keys=objectKeys(Writable.prototype);
for(var v=0;v<keys.length;v++){var method=keys[v];if(!Duplex.prototype[method])Duplex.prototype[method]=Writable.prototype[method]}function Duplex(options){if(!(this instanceof Duplex))return new Duplex(options);Readable.call(this,options);Writable.call(this,options);if(options&&options.readable===false)this.readable=false;if(options&&options.writable===false)this.writable=false;this.allowHalfOpen=true;if(options&&options.allowHalfOpen===false)this.allowHalfOpen=false;this.once("end",onend)}function onend(){if(this.allowHalfOpen||
this._writableState.ended)return;processNextTick(onEndNT,this)}function onEndNT(self){self.end()}function forEach(xs,f){for(var i=0,l=xs.length;i<l;i++)f(xs[i],i)}},{"./_stream_readable":79,"./_stream_writable":81,"core-util-is":28,"inherits":35,"process-nextick-args":70}],78:[function(_dereq_,module,exports){module.exports=PassThrough;var Transform=_dereq_("./_stream_transform");var util=_dereq_("core-util-is");util.inherits=_dereq_("inherits");util.inherits(PassThrough,Transform);function PassThrough(options){if(!(this instanceof
PassThrough))return new PassThrough(options);Transform.call(this,options)}PassThrough.prototype._transform=function(chunk,encoding,cb){cb(null,chunk)}},{"./_stream_transform":80,"core-util-is":28,"inherits":35}],79:[function(_dereq_,module,exports){(function(process){module.exports=Readable;var processNextTick=_dereq_("process-nextick-args");var isArray=_dereq_("isarray");var Buffer=_dereq_("buffer").Buffer;Readable.ReadableState=ReadableState;var EE=_dereq_("events");var EElistenerCount=function(emitter,
type){return emitter.listeners(type).length};var Stream;(function(){try{Stream=_dereq_("st"+"ream")}catch(_){}finally{if(!Stream)Stream=_dereq_("events").EventEmitter}})();var Buffer=_dereq_("buffer").Buffer;var util=_dereq_("core-util-is");util.inherits=_dereq_("inherits");var debugUtil=_dereq_("util");var debug=undefined;if(debugUtil&&debugUtil.debuglog)debug=debugUtil.debuglog("stream");else debug=function(){};var StringDecoder;util.inherits(Readable,Stream);var Duplex;function ReadableState(options,
stream){Duplex=Duplex||_dereq_("./_stream_duplex");options=options||{};this.objectMode=!!options.objectMode;if(stream instanceof Duplex)this.objectMode=this.objectMode||!!options.readableObjectMode;var hwm=options.highWaterMark;var defaultHwm=this.objectMode?16:16*1024;this.highWaterMark=hwm||hwm===0?hwm:defaultHwm;this.highWaterMark=~~this.highWaterMark;this.buffer=[];this.length=0;this.pipes=null;this.pipesCount=0;this.flowing=null;this.ended=false;this.endEmitted=false;this.reading=false;this.sync=
true;this.needReadable=false;this.emittedReadable=false;this.readableListening=false;this.resumeScheduled=false;this.defaultEncoding=options.defaultEncoding||"utf8";this.ranOut=false;this.awaitDrain=0;this.readingMore=false;this.decoder=null;this.encoding=null;if(options.encoding){if(!StringDecoder)StringDecoder=_dereq_("string_decoder/").StringDecoder;this.decoder=new StringDecoder(options.encoding);this.encoding=options.encoding}}var Duplex;function Readable(options){Duplex=Duplex||_dereq_("./_stream_duplex");
if(!(this instanceof Readable))return new Readable(options);this._readableState=new ReadableState(options,this);this.readable=true;if(options&&typeof options.read==="function")this._read=options.read;Stream.call(this)}Readable.prototype.push=function(chunk,encoding){var state=this._readableState;if(!state.objectMode&&typeof chunk==="string"){encoding=encoding||state.defaultEncoding;if(encoding!==state.encoding){chunk=new Buffer(chunk,encoding);encoding=""}}return readableAddChunk(this,state,chunk,
encoding,false)};Readable.prototype.unshift=function(chunk){var state=this._readableState;return readableAddChunk(this,state,chunk,"",true)};Readable.prototype.isPaused=function(){return this._readableState.flowing===false};function readableAddChunk(stream,state,chunk,encoding,addToFront){var er=chunkInvalid(state,chunk);if(er)stream.emit("error",er);else if(chunk===null){state.reading=false;onEofChunk(stream,state)}else if(state.objectMode||chunk&&chunk.length>0)if(state.ended&&!addToFront){var e=
new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var e=new Error("stream.unshift() after end event");stream.emit("error",e)}else{var skipAdd;if(state.decoder&&!addToFront&&!encoding){chunk=state.decoder.write(chunk);skipAdd=!state.objectMode&&chunk.length===0}if(!addToFront)state.reading=false;if(!skipAdd)if(state.flowing&&state.length===0&&!state.sync){stream.emit("data",chunk);stream.read(0)}else{state.length+=state.objectMode?1:chunk.length;if(addToFront)state.buffer.unshift(chunk);
else state.buffer.push(chunk);if(state.needReadable)emitReadable(stream)}maybeReadMore(stream,state)}else if(!addToFront)state.reading=false;return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0)}Readable.prototype.setEncoding=function(enc){if(!StringDecoder)StringDecoder=_dereq_("string_decoder/").StringDecoder;this._readableState.decoder=new StringDecoder(enc);this._readableState.encoding=enc;return this};
var MAX_HWM=8388608;function computeNewHighWaterMark(n){if(n>=MAX_HWM)n=MAX_HWM;else{n--;n|=n>>>1;n|=n>>>2;n|=n>>>4;n|=n>>>8;n|=n>>>16;n++}return n}function howMuchToRead(n,state){if(state.length===0&&state.ended)return 0;if(state.objectMode)return n===0?0:1;if(n===null||isNaN(n))if(state.flowing&&state.buffer.length)return state.buffer[0].length;else return state.length;if(n<=0)return 0;if(n>state.highWaterMark)state.highWaterMark=computeNewHighWaterMark(n);if(n>state.length)if(!state.ended){state.needReadable=
true;return 0}else return state.length;return n}Readable.prototype.read=function(n){debug("read",n);var state=this._readableState;var nOrig=n;if(typeof n!=="number"||n>0)state.emittedReadable=false;if(n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended)){debug("read: emitReadable",state.length,state.ended);if(state.length===0&&state.ended)endReadable(this);else emitReadable(this);return null}n=howMuchToRead(n,state);if(n===0&&state.ended){if(state.length===0)endReadable(this);
return null}var doRead=state.needReadable;debug("need readable",doRead);if(state.length===0||state.length-n<state.highWaterMark){doRead=true;debug("length less than watermark",doRead)}if(state.ended||state.reading){doRead=false;debug("reading or ended",doRead)}if(doRead){debug("do read");state.reading=true;state.sync=true;if(state.length===0)state.needReadable=true;this._read(state.highWaterMark);state.sync=false}if(doRead&&!state.reading)n=howMuchToRead(nOrig,state);var ret;if(n>0)ret=fromList(n,
state);else ret=null;if(ret===null){state.needReadable=true;n=0}state.length-=n;if(state.length===0&&!state.ended)state.needReadable=true;if(nOrig!==n&&state.ended&&state.length===0)endReadable(this);if(ret!==null)this.emit("data",ret);return ret};function chunkInvalid(state,chunk){var er=null;if(!Buffer.isBuffer(chunk)&&typeof chunk!=="string"&&chunk!==null&&chunk!==undefined&&!state.objectMode)er=new TypeError("Invalid non-string/buffer chunk");return er}function onEofChunk(stream,state){if(state.ended)return;
if(state.decoder){var chunk=state.decoder.end();if(chunk&&chunk.length){state.buffer.push(chunk);state.length+=state.objectMode?1:chunk.length}}state.ended=true;emitReadable(stream)}function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug("emitReadable",state.flowing);state.emittedReadable=true;if(state.sync)processNextTick(emitReadable_,stream);else emitReadable_(stream)}}function emitReadable_(stream){debug("emit readable");stream.emit("readable");
flow(stream)}function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;processNextTick(maybeReadMore_,stream,state)}}function maybeReadMore_(stream,state){var len=state.length;while(!state.reading&&!state.flowing&&!state.ended&&state.length<state.highWaterMark){debug("maybeReadMore read 0");stream.read(0);if(len===state.length)break;else len=state.length}state.readingMore=false}Readable.prototype._read=function(n){this.emit("error",new Error("not implemented"))};Readable.prototype.pipe=
function(dest,pipeOpts){var src=this;var state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest);break}state.pipesCount+=1;debug("pipe count\x3d%d opts\x3d%j",state.pipesCount,pipeOpts);var doEnd=(!pipeOpts||pipeOpts.end!==false)&&dest!==process.stdout&&dest!==process.stderr;var endFn=doEnd?onend:cleanup;if(state.endEmitted)processNextTick(endFn);else src.once("end",endFn);dest.on("unpipe",onunpipe);
function onunpipe(readable){debug("onunpipe");if(readable===src)cleanup()}function onend(){debug("onend");dest.end()}var ondrain=pipeOnDrain(src);dest.on("drain",ondrain);var cleanedUp=false;function cleanup(){debug("cleanup");dest.removeListener("close",onclose);dest.removeListener("finish",onfinish);dest.removeListener("drain",ondrain);dest.removeListener("error",onerror);dest.removeListener("unpipe",onunpipe);src.removeListener("end",onend);src.removeListener("end",cleanup);src.removeListener("data",
ondata);cleanedUp=true;if(state.awaitDrain&&(!dest._writableState||dest._writableState.needDrain))ondrain()}src.on("data",ondata);function ondata(chunk){debug("ondata");var ret=dest.write(chunk);if(false===ret){if(state.pipesCount===1&&state.pipes[0]===dest&&src.listenerCount("data")===1&&!cleanedUp){debug("false write response, pause",src._readableState.awaitDrain);src._readableState.awaitDrain++}src.pause()}}function onerror(er){debug("onerror",er);unpipe();dest.removeListener("error",onerror);
if(EElistenerCount(dest,"error")===0)dest.emit("error",er)}if(!dest._events||!dest._events.error)dest.on("error",onerror);else if(isArray(dest._events.error))dest._events.error.unshift(onerror);else dest._events.error=[onerror,dest._events.error];function onclose(){dest.removeListener("finish",onfinish);unpipe()}dest.once("close",onclose);function onfinish(){debug("onfinish");dest.removeListener("close",onclose);unpipe()}dest.once("finish",onfinish);function unpipe(){debug("unpipe");src.unpipe(dest)}
dest.emit("pipe",src);if(!state.flowing){debug("pipe resume");src.resume()}return dest};function pipeOnDrain(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain);if(state.awaitDrain)state.awaitDrain--;if(state.awaitDrain===0&&EElistenerCount(src,"data")){state.flowing=true;flow(src)}}}Readable.prototype.unpipe=function(dest){var state=this._readableState;if(state.pipesCount===0)return this;if(state.pipesCount===1){if(dest&&dest!==state.pipes)return this;if(!dest)dest=
state.pipes;state.pipes=null;state.pipesCount=0;state.flowing=false;if(dest)dest.emit("unpipe",this);return this}if(!dest){var dests=state.pipes;var len=state.pipesCount;state.pipes=null;state.pipesCount=0;state.flowing=false;for(var _i=0;_i<len;_i++)dests[_i].emit("unpipe",this);return this}var i=indexOf(state.pipes,dest);if(i===-1)return this;state.pipes.splice(i,1);state.pipesCount-=1;if(state.pipesCount===1)state.pipes=state.pipes[0];dest.emit("unpipe",this);return this};Readable.prototype.on=
function(ev,fn){var res=Stream.prototype.on.call(this,ev,fn);if(ev==="data"&&false!==this._readableState.flowing)this.resume();if(ev==="readable"&&!this._readableState.endEmitted){var state=this._readableState;if(!state.readableListening){state.readableListening=true;state.emittedReadable=false;state.needReadable=true;if(!state.reading)processNextTick(nReadingNextTick,this);else if(state.length)emitReadable(this,state)}}return res};Readable.prototype.addListener=Readable.prototype.on;function nReadingNextTick(self){debug("readable nexttick read 0");
self.read(0)}Readable.prototype.resume=function(){var state=this._readableState;if(!state.flowing){debug("resume");state.flowing=true;resume(this,state)}return this};function resume(stream,state){if(!state.resumeScheduled){state.resumeScheduled=true;processNextTick(resume_,stream,state)}}function resume_(stream,state){if(!state.reading){debug("resume read 0");stream.read(0)}state.resumeScheduled=false;stream.emit("resume");flow(stream);if(state.flowing&&!state.reading)stream.read(0)}Readable.prototype.pause=
function(){debug("call pause flowing\x3d%j",this._readableState.flowing);if(false!==this._readableState.flowing){debug("pause");this._readableState.flowing=false;this.emit("pause")}return this};function flow(stream){var state=stream._readableState;debug("flow",state.flowing);if(state.flowing){do var chunk=stream.read();while(null!==chunk&&state.flowing)}}Readable.prototype.wrap=function(stream){var state=this._readableState;var paused=false;var self=this;stream.on("end",function(){debug("wrapped end");
if(state.decoder&&!state.ended){var chunk=state.decoder.end();if(chunk&&chunk.length)self.push(chunk)}self.push(null)});stream.on("data",function(chunk){debug("wrapped data");if(state.decoder)chunk=state.decoder.write(chunk);if(state.objectMode&&(chunk===null||chunk===undefined))return;else if(!state.objectMode&&(!chunk||!chunk.length))return;var ret=self.push(chunk);if(!ret){paused=true;stream.pause()}});for(var i in stream)if(this[i]===undefined&&typeof stream[i]==="function")this[i]=function(method){return function(){return stream[method].apply(stream,
arguments)}}(i);var events=["error","close","destroy","pause","resume"];forEach(events,function(ev){stream.on(ev,self.emit.bind(self,ev))});self._read=function(n){debug("wrapped _read",n);if(paused){paused=false;stream.resume()}};return self};Readable._fromList=fromList;function fromList(n,state){var list=state.buffer;var length=state.length;var stringMode=!!state.decoder;var objectMode=!!state.objectMode;var ret;if(list.length===0)return null;if(length===0)ret=null;else if(objectMode)ret=list.shift();
else if(!n||n>=length){if(stringMode)ret=list.join("");else if(list.length===1)ret=list[0];else ret=Buffer.concat(list,length);list.length=0}else if(n<list[0].length){var buf=list[0];ret=buf.slice(0,n);list[0]=buf.slice(n)}else if(n===list[0].length)ret=list.shift();else{if(stringMode)ret="";else ret=new Buffer(n);var c=0;for(var i=0,l=list.length;i<l&&c<n;i++){var buf=list[0];var cpy=Math.min(n-c,buf.length);if(stringMode)ret+=buf.slice(0,cpy);else buf.copy(ret,c,0,cpy);if(cpy<buf.length)list[0]=
buf.slice(cpy);else list.shift();c+=cpy}}return ret}function endReadable(stream){var state=stream._readableState;if(state.length>0)throw new Error("endReadable called on non-empty stream");if(!state.endEmitted){state.ended=true;processNextTick(endReadableNT,state,stream)}}function endReadableNT(state,stream){if(!state.endEmitted&&state.length===0){state.endEmitted=true;stream.readable=false;stream.emit("end")}}function forEach(xs,f){for(var i=0,l=xs.length;i<l;i++)f(xs[i],i)}function indexOf(xs,x){for(var i=
0,l=xs.length;i<l;i++)if(xs[i]===x)return i;return-1}}).call(this,_dereq_("_process"))},{"./_stream_duplex":77,"_process":71,"buffer":25,"core-util-is":28,"events":32,"inherits":35,"isarray":37,"process-nextick-args":70,"string_decoder/":91,"util":23}],80:[function(_dereq_,module,exports){module.exports=Transform;var Duplex=_dereq_("./_stream_duplex");var util=_dereq_("core-util-is");util.inherits=_dereq_("inherits");util.inherits(Transform,Duplex);function TransformState(stream){this.afterTransform=
function(er,data){return afterTransform(stream,er,data)};this.needTransform=false;this.transforming=false;this.writecb=null;this.writechunk=null;this.writeencoding=null}function afterTransform(stream,er,data){var ts=stream._transformState;ts.transforming=false;var cb=ts.writecb;if(!cb)return stream.emit("error",new Error("no writecb in Transform class"));ts.writechunk=null;ts.writecb=null;if(data!==null&&data!==undefined)stream.push(data);cb(er);var rs=stream._readableState;rs.reading=false;if(rs.needReadable||
rs.length<rs.highWaterMark)stream._read(rs.highWaterMark)}function Transform(options){if(!(this instanceof Transform))return new Transform(options);Duplex.call(this,options);this._transformState=new TransformState(this);var stream=this;this._readableState.needReadable=true;this._readableState.sync=false;if(options){if(typeof options.transform==="function")this._transform=options.transform;if(typeof options.flush==="function")this._flush=options.flush}this.once("prefinish",function(){if(typeof this._flush===
"function")this._flush(function(er){done(stream,er)});else done(stream)})}Transform.prototype.push=function(chunk,encoding){this._transformState.needTransform=false;return Duplex.prototype.push.call(this,chunk,encoding)};Transform.prototype._transform=function(chunk,encoding,cb){throw new Error("not implemented");};Transform.prototype._write=function(chunk,encoding,cb){var ts=this._transformState;ts.writecb=cb;ts.writechunk=chunk;ts.writeencoding=encoding;if(!ts.transforming){var rs=this._readableState;
if(ts.needTransform||rs.needReadable||rs.length<rs.highWaterMark)this._read(rs.highWaterMark)}};Transform.prototype._read=function(n){var ts=this._transformState;if(ts.writechunk!==null&&ts.writecb&&!ts.transforming){ts.transforming=true;this._transform(ts.writechunk,ts.writeencoding,ts.afterTransform)}else ts.needTransform=true};function done(stream,er){if(er)return stream.emit("error",er);var ws=stream._writableState;var ts=stream._transformState;if(ws.length)throw new Error("calling transform done when ws.length !\x3d 0");
if(ts.transforming)throw new Error("calling transform done when still transforming");return stream.push(null)}},{"./_stream_duplex":77,"core-util-is":28,"inherits":35}],81:[function(_dereq_,module,exports){(function(process){module.exports=Writable;var processNextTick=_dereq_("process-nextick-args");var asyncWrite=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:processNextTick;var Buffer=_dereq_("buffer").Buffer;Writable.WritableState=WritableState;var util=
_dereq_("core-util-is");util.inherits=_dereq_("inherits");var internalUtil={deprecate:_dereq_("util-deprecate")};var Stream;(function(){try{Stream=_dereq_("st"+"ream")}catch(_){}finally{if(!Stream)Stream=_dereq_("events").EventEmitter}})();var Buffer=_dereq_("buffer").Buffer;util.inherits(Writable,Stream);function nop(){}function WriteReq(chunk,encoding,cb){this.chunk=chunk;this.encoding=encoding;this.callback=cb;this.next=null}var Duplex;function WritableState(options,stream){Duplex=Duplex||_dereq_("./_stream_duplex");
options=options||{};this.objectMode=!!options.objectMode;if(stream instanceof Duplex)this.objectMode=this.objectMode||!!options.writableObjectMode;var hwm=options.highWaterMark;var defaultHwm=this.objectMode?16:16*1024;this.highWaterMark=hwm||hwm===0?hwm:defaultHwm;this.highWaterMark=~~this.highWaterMark;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;var noDecode=options.decodeStrings===false;this.decodeStrings=!noDecode;this.defaultEncoding=options.defaultEncoding||"utf8";
this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(er){onwrite(stream,er)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.bufferedRequestCount=0;this.corkedRequestsFree=new CorkedRequest(this);this.corkedRequestsFree.next=new CorkedRequest(this)}WritableState.prototype.getBuffer=function writableStateGetBuffer(){var current=this.bufferedRequest;
var out=[];while(current){out.push(current);current=current.next}return out};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.")})}catch(_){}})();var Duplex;function Writable(options){Duplex=Duplex||_dereq_("./_stream_duplex");if(!(this instanceof Writable)&&!(this instanceof Duplex))return new Writable(options);this._writableState=new WritableState(options,
this);this.writable=true;if(options){if(typeof options.write==="function")this._write=options.write;if(typeof options.writev==="function")this._writev=options.writev}Stream.call(this)}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))};function writeAfterEnd(stream,cb){var er=new Error("write after end");stream.emit("error",er);processNextTick(cb,er)}function validChunk(stream,state,chunk,cb){var valid=true;if(!Buffer.isBuffer(chunk)&&typeof chunk!=="string"&&
chunk!==null&&chunk!==undefined&&!state.objectMode){var er=new TypeError("Invalid non-string/buffer chunk");stream.emit("error",er);processNextTick(cb,er);valid=false}return valid}Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState;var ret=false;if(typeof encoding==="function"){cb=encoding;encoding=null}if(Buffer.isBuffer(chunk))encoding="buffer";else if(!encoding)encoding=state.defaultEncoding;if(typeof cb!=="function")cb=nop;if(state.ended)writeAfterEnd(this,cb);else if(validChunk(this,
state,chunk,cb)){state.pendingcb++;ret=writeOrBuffer(this,state,chunk,encoding,cb)}return ret};Writable.prototype.cork=function(){var state=this._writableState;state.corked++};Writable.prototype.uncork=function(){var state=this._writableState;if(state.corked){state.corked--;if(!state.writing&&!state.corked&&!state.finished&&!state.bufferProcessing&&state.bufferedRequest)clearBuffer(this,state)}};Writable.prototype.setDefaultEncoding=function setDefaultEncoding(encoding){if(typeof encoding==="string")encoding=
encoding.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+encoding);this._writableState.defaultEncoding=encoding};function decodeChunk(state,chunk,encoding){if(!state.objectMode&&state.decodeStrings!==false&&typeof chunk==="string")chunk=new Buffer(chunk,encoding);return chunk}function writeOrBuffer(stream,state,chunk,encoding,cb){chunk=decodeChunk(state,chunk,
encoding);if(Buffer.isBuffer(chunk))encoding="buffer";var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;if(!ret)state.needDrain=true;if(state.writing||state.corked){var last=state.lastBufferedRequest;state.lastBufferedRequest=new WriteReq(chunk,encoding,cb);if(last)last.next=state.lastBufferedRequest;else state.bufferedRequest=state.lastBufferedRequest;state.bufferedRequestCount+=1}else doWrite(stream,state,false,len,chunk,encoding,cb);return ret}function doWrite(stream,
state,writev,len,chunk,encoding,cb){state.writelen=len;state.writecb=cb;state.writing=true;state.sync=true;if(writev)stream._writev(chunk,state.onwrite);else stream._write(chunk,encoding,state.onwrite);state.sync=false}function onwriteError(stream,state,sync,er,cb){--state.pendingcb;if(sync)processNextTick(cb,er);else cb(er);stream._writableState.errorEmitted=true;stream.emit("error",er)}function onwriteStateUpdate(state){state.writing=false;state.writecb=null;state.length-=state.writelen;state.writelen=
0}function onwrite(stream,er){var state=stream._writableState;var sync=state.sync;var cb=state.writecb;onwriteStateUpdate(state);if(er)onwriteError(stream,state,sync,er,cb);else{var finished=needFinish(state);if(!finished&&!state.corked&&!state.bufferProcessing&&state.bufferedRequest)clearBuffer(stream,state);if(sync)asyncWrite(afterWrite,stream,state,finished,cb);else afterWrite(stream,state,finished,cb)}}function afterWrite(stream,state,finished,cb){if(!finished)onwriteDrain(stream,state);state.pendingcb--;
cb();finishMaybe(stream,state)}function onwriteDrain(stream,state){if(state.length===0&&state.needDrain){state.needDrain=false;stream.emit("drain")}}function clearBuffer(stream,state){state.bufferProcessing=true;var entry=state.bufferedRequest;if(stream._writev&&entry&&entry.next){var l=state.bufferedRequestCount;var buffer=new Array(l);var holder=state.corkedRequestsFree;holder.entry=entry;var count=0;while(entry){buffer[count]=entry;entry=entry.next;count+=1}doWrite(stream,state,true,state.length,
buffer,"",holder.finish);state.pendingcb++;state.lastBufferedRequest=null;state.corkedRequestsFree=holder.next;holder.next=null}else{while(entry){var chunk=entry.chunk;var encoding=entry.encoding;var cb=entry.callback;var len=state.objectMode?1:chunk.length;doWrite(stream,state,false,len,chunk,encoding,cb);entry=entry.next;if(state.writing)break}if(entry===null)state.lastBufferedRequest=null}state.bufferedRequestCount=0;state.bufferedRequest=entry;state.bufferProcessing=false}Writable.prototype._write=
function(chunk,encoding,cb){cb(new Error("not implemented"))};Writable.prototype._writev=null;Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;if(typeof chunk==="function"){cb=chunk;chunk=null;encoding=null}else if(typeof encoding==="function"){cb=encoding;encoding=null}if(chunk!==null&&chunk!==undefined)this.write(chunk,encoding);if(state.corked){state.corked=1;this.uncork()}if(!state.ending&&!state.finished)endWritable(this,state,cb)};function needFinish(state){return state.ending&&
state.length===0&&state.bufferedRequest===null&&!state.finished&&!state.writing}function prefinish(stream,state){if(!state.prefinished){state.prefinished=true;stream.emit("prefinish")}}function finishMaybe(stream,state){var need=needFinish(state);if(need)if(state.pendingcb===0){prefinish(stream,state);state.finished=true;stream.emit("finish")}else prefinish(stream,state);return need}function endWritable(stream,state,cb){state.ending=true;finishMaybe(stream,state);if(cb)if(state.finished)processNextTick(cb);
else stream.once("finish",cb);state.ended=true;stream.writable=false}function CorkedRequest(state){var _this=this;this.next=null;this.entry=null;this.finish=function(err){var entry=_this.entry;_this.entry=null;while(entry){var cb=entry.callback;state.pendingcb--;cb(err);entry=entry.next}if(state.corkedRequestsFree)state.corkedRequestsFree.next=_this;else state.corkedRequestsFree=_this}}}).call(this,_dereq_("_process"))},{"./_stream_duplex":77,"_process":71,"buffer":25,"core-util-is":28,"events":32,
"inherits":35,"process-nextick-args":70,"util-deprecate":95}],82:[function(_dereq_,module,exports){module.exports=_dereq_("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":78}],83:[function(_dereq_,module,exports){var Stream=function(){try{return _dereq_("st"+"ream")}catch(_){}}();exports=module.exports=_dereq_("./lib/_stream_readable.js");exports.Stream=Stream||exports;exports.Readable=exports;exports.Writable=_dereq_("./lib/_stream_writable.js");exports.Duplex=_dereq_("./lib/_stream_duplex.js");
exports.Transform=_dereq_("./lib/_stream_transform.js");exports.PassThrough=_dereq_("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":77,"./lib/_stream_passthrough.js":78,"./lib/_stream_readable.js":79,"./lib/_stream_transform.js":80,"./lib/_stream_writable.js":81}],84:[function(_dereq_,module,exports){module.exports=_dereq_("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":80}],85:[function(_dereq_,module,exports){module.exports=_dereq_("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":81}],
86:[function(_dereq_,module,exports){module.exports=Stream;var EE=_dereq_("events").EventEmitter;var inherits=_dereq_("inherits");inherits(Stream,EE);Stream.Readable=_dereq_("readable-stream/readable.js");Stream.Writable=_dereq_("readable-stream/writable.js");Stream.Duplex=_dereq_("readable-stream/duplex.js");Stream.Transform=_dereq_("readable-stream/transform.js");Stream.PassThrough=_dereq_("readable-stream/passthrough.js");Stream.Stream=Stream;function Stream(){EE.call(this)}Stream.prototype.pipe=
function(dest,options){var source=this;function ondata(chunk){if(dest.writable)if(false===dest.write(chunk)&&source.pause)source.pause()}source.on("data",ondata);function ondrain(){if(source.readable&&source.resume)source.resume()}dest.on("drain",ondrain);if(!dest._isStdio&&(!options||options.end!==false)){source.on("end",onend);source.on("close",onclose)}var didOnEnd=false;function onend(){if(didOnEnd)return;didOnEnd=true;dest.end()}function onclose(){if(didOnEnd)return;didOnEnd=true;if(typeof dest.destroy===
"function")dest.destroy()}function onerror(er){cleanup();if(EE.listenerCount(this,"error")===0)throw er;}source.on("error",onerror);dest.on("error",onerror);function cleanup(){source.removeListener("data",ondata);dest.removeListener("drain",ondrain);source.removeListener("end",onend);source.removeListener("close",onclose);source.removeListener("error",onerror);dest.removeListener("error",onerror);source.removeListener("end",cleanup);source.removeListener("close",cleanup);dest.removeListener("close",
cleanup)}source.on("end",cleanup);source.on("close",cleanup);dest.on("close",cleanup);dest.emit("pipe",source);return dest}},{"events":32,"inherits":35,"readable-stream/duplex.js":76,"readable-stream/passthrough.js":82,"readable-stream/readable.js":83,"readable-stream/transform.js":84,"readable-stream/writable.js":85}],87:[function(_dereq_,module,exports){(function(global){var ClientRequest=_dereq_("./lib/request");var extend=_dereq_("xtend");var statusCodes=_dereq_("builtin-status-codes");var url=
_dereq_("url");var http=exports;http.request=function(opts,cb){if(typeof opts==="string")opts=url.parse(opts);else opts=extend(opts);var defaultProtocol=global.location.protocol.search(/^https?:$/)===-1?"http:":"";var protocol=opts.protocol||defaultProtocol;var host=opts.hostname||opts.host;var port=opts.port;var path=opts.path||"/";if(host&&host.indexOf(":")!==-1)host="["+host+"]";opts.url=(host?protocol+"//"+host:"")+(port?":"+port:"")+path;opts.method=(opts.method||"GET").toUpperCase();opts.headers=
opts.headers||{};var req=new ClientRequest(opts);if(cb)req.on("response",cb);return req};http.get=function get(opts,cb){var req=http.request(opts,cb);req.end();return req};http.Agent=function(){};http.Agent.defaultMaxSockets=4;http.STATUS_CODES=statusCodes;http.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,
typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./lib/request":89,"builtin-status-codes":26,"url":93,"xtend":98}],88:[function(_dereq_,module,exports){(function(global){exports.fetch=isFunction(global.fetch)&&isFunction(global.ReadableByteStream);exports.blobConstructor=false;try{new Blob([new ArrayBuffer(1)]);exports.blobConstructor=true}catch(e){}var xhr=new global.XMLHttpRequest;xhr.open("GET",global.location.host?"/":"https://example.com");
function checkTypeSupport(type){try{xhr.responseType=type;return xhr.responseType===type}catch(e){}return false}var haveArrayBuffer=typeof global.ArrayBuffer!=="undefined";var haveSlice=haveArrayBuffer&&isFunction(global.ArrayBuffer.prototype.slice);exports.arraybuffer=haveArrayBuffer&&checkTypeSupport("arraybuffer");exports.msstream=!exports.fetch&&haveSlice&&checkTypeSupport("ms-stream");exports.mozchunkedarraybuffer=!exports.fetch&&haveArrayBuffer&&checkTypeSupport("moz-chunked-arraybuffer");exports.overrideMimeType=
isFunction(xhr.overrideMimeType);exports.vbArray=isFunction(global.VBArray);function isFunction(value){return typeof value==="function"}xhr=null}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],89:[function(_dereq_,module,exports){(function(process,global,Buffer){var capability=_dereq_("./capability");var inherits=_dereq_("inherits");var response=_dereq_("./response");var stream=_dereq_("stream");var toArrayBuffer=_dereq_("to-arraybuffer");
var IncomingMessage=response.IncomingMessage;var rStates=response.readyStates;function decideMode(preferBinary){if(capability.fetch)return"fetch";else if(capability.mozchunkedarraybuffer)return"moz-chunked-arraybuffer";else if(capability.msstream)return"ms-stream";else if(capability.arraybuffer&&preferBinary)return"arraybuffer";else if(capability.vbArray&&preferBinary)return"text:vbarray";else return"text"}var ClientRequest=module.exports=function(opts){var self=this;stream.Writable.call(self);self._opts=
opts;self._body=[];self._headers={};if(opts.auth)self.setHeader("Authorization","Basic "+(new Buffer(opts.auth)).toString("base64"));Object.keys(opts.headers).forEach(function(name){self.setHeader(name,opts.headers[name])});var preferBinary;if(opts.mode==="prefer-streaming")preferBinary=false;else if(opts.mode==="allow-wrong-content-type")preferBinary=!capability.overrideMimeType;else if(!opts.mode||opts.mode==="default"||opts.mode==="prefer-fast")preferBinary=true;else throw new Error("Invalid value for opts.mode");
self._mode=decideMode(preferBinary);self.on("finish",function(){self._onFinish()})};inherits(ClientRequest,stream.Writable);ClientRequest.prototype.setHeader=function(name,value){var self=this;var lowerName=name.toLowerCase();if(unsafeHeaders.indexOf(lowerName)!==-1)return;self._headers[lowerName]={name:name,value:value}};ClientRequest.prototype.getHeader=function(name){var self=this;return self._headers[name.toLowerCase()].value};ClientRequest.prototype.removeHeader=function(name){var self=this;
delete self._headers[name.toLowerCase()]};ClientRequest.prototype._onFinish=function(){var self=this;if(self._destroyed)return;var opts=self._opts;var headersObj=self._headers;var body;if(opts.method==="POST"||opts.method==="PUT"||opts.method==="PATCH")if(capability.blobConstructor)body=new global.Blob(self._body.map(function(buffer){return toArrayBuffer(buffer)}),{type:(headersObj["content-type"]||{}).value||""});else body=Buffer.concat(self._body).toString();if(self._mode==="fetch"){var headers=
Object.keys(headersObj).map(function(name){return[headersObj[name].name,headersObj[name].value]});global.fetch(self._opts.url,{method:self._opts.method,headers:headers,body:body,mode:"cors",credentials:opts.withCredentials?"include":"same-origin"}).then(function(response){self._fetchResponse=response;self._connect()},function(reason){self.emit("error",reason)})}else{var xhr=self._xhr=new global.XMLHttpRequest;try{xhr.open(self._opts.method,self._opts.url,true)}catch(err){process.nextTick(function(){self.emit("error",
err)});return}if("responseType"in xhr)xhr.responseType=self._mode.split(":")[0];if("withCredentials"in xhr)xhr.withCredentials=!!opts.withCredentials;if(self._mode==="text"&&"overrideMimeType"in xhr)xhr.overrideMimeType("text/plain; charset\x3dx-user-defined");Object.keys(headersObj).forEach(function(name){xhr.setRequestHeader(headersObj[name].name,headersObj[name].value)});self._response=null;xhr.onreadystatechange=function(){switch(xhr.readyState){case rStates.LOADING:case rStates.DONE:self._onXHRProgress();
break}};if(self._mode==="moz-chunked-arraybuffer")xhr.onprogress=function(){self._onXHRProgress()};xhr.onerror=function(){if(self._destroyed)return;self.emit("error",new Error("XHR error"))};try{xhr.send(body)}catch(err){process.nextTick(function(){self.emit("error",err)});return}}};function statusValid(xhr){try{var status=xhr.status;return status!==null&&status!==0}catch(e){return false}}ClientRequest.prototype._onXHRProgress=function(){var self=this;if(!statusValid(self._xhr)||self._destroyed)return;
if(!self._response)self._connect();self._response._onXHRProgress()};ClientRequest.prototype._connect=function(){var self=this;if(self._destroyed)return;self._response=new IncomingMessage(self._xhr,self._fetchResponse,self._mode);self.emit("response",self._response)};ClientRequest.prototype._write=function(chunk,encoding,cb){var self=this;self._body.push(chunk);cb()};ClientRequest.prototype.abort=ClientRequest.prototype.destroy=function(){var self=this;self._destroyed=true;if(self._response)self._response._destroyed=
true;if(self._xhr)self._xhr.abort()};ClientRequest.prototype.end=function(data,encoding,cb){var self=this;if(typeof data==="function"){cb=data;data=undefined}stream.Writable.prototype.end.call(self,data,encoding,cb)};ClientRequest.prototype.flushHeaders=function(){};ClientRequest.prototype.setTimeout=function(){};ClientRequest.prototype.setNoDelay=function(){};ClientRequest.prototype.setSocketKeepAlive=function(){};var unsafeHeaders=["accept-charset","accept-encoding","access-control-request-headers",
"access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,_dereq_("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{},_dereq_("buffer").Buffer)},{"./capability":88,"./response":90,"_process":71,"buffer":25,"inherits":35,"stream":86,"to-arraybuffer":92}],90:[function(_dereq_,module,
exports){(function(process,global,Buffer){var capability=_dereq_("./capability");var inherits=_dereq_("inherits");var stream=_dereq_("stream");var rStates=exports.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4};var IncomingMessage=exports.IncomingMessage=function(xhr,response,mode){var self=this;stream.Readable.call(self);self._mode=mode;self.headers={};self.rawHeaders=[];self.trailers={};self.rawTrailers=[];self.on("end",function(){process.nextTick(function(){self.emit("close")})});
if(mode==="fetch"){self._fetchResponse=response;self.statusCode=response.status;self.statusMessage=response.statusText;for(var header,_i,_it=response.headers[Symbol.iterator]();header=(_i=_it.next()).value,!_i.done;){self.headers[header[0].toLowerCase()]=header[1];self.rawHeaders.push(header[0],header[1])}var reader=response.body.getReader();function read(){reader.read().then(function(result){if(self._destroyed)return;if(result.done){self.push(null);return}self.push(new Buffer(result.value));read()})}
read()}else{self._xhr=xhr;self._pos=0;self.statusCode=xhr.status;self.statusMessage=xhr.statusText;var headers=xhr.getAllResponseHeaders().split(/\r?\n/);headers.forEach(function(header){var matches=header.match(/^([^:]+):\s*(.*)/);if(matches){var key=matches[1].toLowerCase();if(key==="set-cookie"){if(self.headers[key]===undefined)self.headers[key]=[];self.headers[key].push(matches[2])}else if(self.headers[key]!==undefined)self.headers[key]+=", "+matches[2];else self.headers[key]=matches[2];self.rawHeaders.push(matches[1],
matches[2])}});self._charset="x-user-defined";if(!capability.overrideMimeType){var mimeType=self.rawHeaders["mime-type"];if(mimeType){var charsetMatch=mimeType.match(/;\s*charset=([^;])(;|$)/);if(charsetMatch)self._charset=charsetMatch[1].toLowerCase()}if(!self._charset)self._charset="utf-8"}}};inherits(IncomingMessage,stream.Readable);IncomingMessage.prototype._read=function(){};IncomingMessage.prototype._onXHRProgress=function(){var self=this;var xhr=self._xhr;var response=null;switch(self._mode){case "text:vbarray":if(xhr.readyState!==
rStates.DONE)break;try{response=(new global.VBArray(xhr.responseBody)).toArray()}catch(e){}if(response!==null){self.push(new Buffer(response));break}case "text":try{response=xhr.responseText}catch(e){self._mode="text:vbarray";break}if(response.length>self._pos){var newData=response.substr(self._pos);if(self._charset==="x-user-defined"){var buffer=new Buffer(newData.length);for(var i=0;i<newData.length;i++)buffer[i]=newData.charCodeAt(i)&255;self.push(buffer)}else self.push(newData,self._charset);
self._pos=response.length}break;case "arraybuffer":if(xhr.readyState!==rStates.DONE)break;response=xhr.response;self.push(new Buffer(new Uint8Array(response)));break;case "moz-chunked-arraybuffer":response=xhr.response;if(xhr.readyState!==rStates.LOADING||!response)break;self.push(new Buffer(new Uint8Array(response)));break;case "ms-stream":response=xhr.response;if(xhr.readyState!==rStates.LOADING)break;var reader=new global.MSStreamReader;reader.onprogress=function(){if(reader.result.byteLength>
self._pos){self.push(new Buffer(new Uint8Array(reader.result.slice(self._pos))));self._pos=reader.result.byteLength}};reader.onload=function(){self.push(null)};reader.readAsArrayBuffer(response);break}if(self._xhr.readyState===rStates.DONE&&self._mode!=="ms-stream")self.push(null)}}).call(this,_dereq_("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{},_dereq_("buffer").Buffer)},{"./capability":88,"_process":71,"buffer":25,"inherits":35,
"stream":86}],91:[function(_dereq_,module,exports){var Buffer=_dereq_("buffer").Buffer;var isBufferEncoding=Buffer.isEncoding||function(encoding){switch(encoding&&encoding.toLowerCase()){case "hex":case "utf8":case "utf-8":case "ascii":case "binary":case "base64":case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":case "raw":return true;default:return false}};function assertEncoding(encoding){if(encoding&&!isBufferEncoding(encoding))throw new Error("Unknown encoding: "+encoding);}var StringDecoder=
exports.StringDecoder=function(encoding){this.encoding=(encoding||"utf8").toLowerCase().replace(/[-_]/,"");assertEncoding(encoding);switch(this.encoding){case "utf8":this.surrogateSize=3;break;case "ucs2":case "utf16le":this.surrogateSize=2;this.detectIncompleteChar=utf16DetectIncompleteChar;break;case "base64":this.surrogateSize=3;this.detectIncompleteChar=base64DetectIncompleteChar;break;default:this.write=passThroughWrite;return}this.charBuffer=new Buffer(6);this.charReceived=0;this.charLength=
0};StringDecoder.prototype.write=function(buffer){var charStr="";while(this.charLength){var available=buffer.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:buffer.length;buffer.copy(this.charBuffer,this.charReceived,0,available);this.charReceived+=available;if(this.charReceived<this.charLength)return"";buffer=buffer.slice(available,buffer.length);charStr=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var charCode=charStr.charCodeAt(charStr.length-1);
if(charCode>=55296&&charCode<=56319){this.charLength+=this.surrogateSize;charStr="";continue}this.charReceived=this.charLength=0;if(buffer.length===0)return charStr;break}this.detectIncompleteChar(buffer);var end=buffer.length;if(this.charLength){buffer.copy(this.charBuffer,0,buffer.length-this.charReceived,end);end-=this.charReceived}charStr+=buffer.toString(this.encoding,0,end);var end=charStr.length-1;var charCode=charStr.charCodeAt(end);if(charCode>=55296&&charCode<=56319){var size=this.surrogateSize;
this.charLength+=size;this.charReceived+=size;this.charBuffer.copy(this.charBuffer,size,0,size);buffer.copy(this.charBuffer,0,0,size);return charStr.substring(0,end)}return charStr};StringDecoder.prototype.detectIncompleteChar=function(buffer){var i=buffer.length>=3?3:buffer.length;for(;i>0;i--){var c=buffer[buffer.length-i];if(i==1&&c>>5==6){this.charLength=2;break}if(i<=2&&c>>4==14){this.charLength=3;break}if(i<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=i};StringDecoder.prototype.end=
function(buffer){var res="";if(buffer&&buffer.length)res=this.write(buffer);if(this.charReceived){var cr=this.charReceived;var buf=this.charBuffer;var enc=this.encoding;res+=buf.slice(0,cr).toString(enc)}return res};function passThroughWrite(buffer){return buffer.toString(this.encoding)}function utf16DetectIncompleteChar(buffer){this.charReceived=buffer.length%2;this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(buffer){this.charReceived=buffer.length%3;this.charLength=this.charReceived?
3:0}},{"buffer":25}],92:[function(_dereq_,module,exports){var Buffer=_dereq_("buffer").Buffer;module.exports=function(buf){if(buf instanceof Uint8Array)if(buf.byteOffset===0&&buf.byteLength===buf.buffer.byteLength)return buf.buffer;else if(typeof buf.buffer.slice==="function")return buf.buffer.slice(buf.byteOffset,buf.byteOffset+buf.byteLength);if(Buffer.isBuffer(buf)){var arrayCopy=new Uint8Array(buf.length);var len=buf.length;for(var i=0;i<len;i++)arrayCopy[i]=buf[i];return arrayCopy.buffer}else throw new Error("Argument must be a Buffer");
}},{"buffer":25}],93:[function(_dereq_,module,exports){var punycode=_dereq_("punycode");var util=_dereq_("./util");exports.parse=urlParse;exports.resolve=urlResolve;exports.resolveObject=urlResolveObject;exports.format=urlFormat;exports.Url=Url;function Url(){this.protocol=null;this.slashes=null;this.auth=null;this.host=null;this.port=null;this.hostname=null;this.hash=null;this.search=null;this.query=null;this.pathname=null;this.path=null;this.href=null}var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=
/:[0-9]*$/,simplePathPattern=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,delims=["\x3c","\x3e",'"',"`"," ","\r","\n","\t"],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={"javascript":true,"javascript:":true},hostlessProtocol={"javascript":true,"javascript:":true},
slashedProtocol={"http":true,"https":true,"ftp":true,"gopher":true,"file":true,"http:":true,"https:":true,"ftp:":true,"gopher:":true,"file:":true},querystring=_dereq_("querystring");function urlParse(url,parseQueryString,slashesDenoteHost){if(url&&util.isObject(url)&&url instanceof Url)return url;var u=new Url;u.parse(url,parseQueryString,slashesDenoteHost);return u}Url.prototype.parse=function(url,parseQueryString,slashesDenoteHost){if(!util.isString(url))throw new TypeError("Parameter 'url' must be a string, not "+
typeof url);var queryIndex=url.indexOf("?"),splitter=queryIndex!==-1&&queryIndex<url.indexOf("#")?"?":"#",uSplit=url.split(splitter),slashRegex=/\\/g;uSplit[0]=uSplit[0].replace(slashRegex,"/");url=uSplit.join(splitter);var rest=url;rest=rest.trim();if(!slashesDenoteHost&&url.split("#").length===1){var simplePath=simplePathPattern.exec(rest);if(simplePath){this.path=rest;this.href=rest;this.pathname=simplePath[1];if(simplePath[2]){this.search=simplePath[2];if(parseQueryString)this.query=querystring.parse(this.search.substr(1));
else this.query=this.search.substr(1)}else if(parseQueryString){this.search="";this.query={}}return this}}var proto=protocolPattern.exec(rest);if(proto){proto=proto[0];var lowerProto=proto.toLowerCase();this.protocol=lowerProto;rest=rest.substr(proto.length)}if(slashesDenoteHost||proto||rest.match(/^\/\/[^@\/]+@[^@\/]+/)){var slashes=rest.substr(0,2)==="//";if(slashes&&!(proto&&hostlessProtocol[proto])){rest=rest.substr(2);this.slashes=true}}if(!hostlessProtocol[proto]&&(slashes||proto&&!slashedProtocol[proto])){var hostEnd=
-1;for(var i=0;i<hostEndingChars.length;i++){var hec=rest.indexOf(hostEndingChars[i]);if(hec!==-1&&(hostEnd===-1||hec<hostEnd))hostEnd=hec}var auth,atSign;if(hostEnd===-1)atSign=rest.lastIndexOf("@");else atSign=rest.lastIndexOf("@",hostEnd);if(atSign!==-1){auth=rest.slice(0,atSign);rest=rest.slice(atSign+1);this.auth=decodeURIComponent(auth)}hostEnd=-1;for(var i=0;i<nonHostChars.length;i++){var hec=rest.indexOf(nonHostChars[i]);if(hec!==-1&&(hostEnd===-1||hec<hostEnd))hostEnd=hec}if(hostEnd===-1)hostEnd=
rest.length;this.host=rest.slice(0,hostEnd);rest=rest.slice(hostEnd);this.parseHost();this.hostname=this.hostname||"";var ipv6Hostname=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!ipv6Hostname){var hostparts=this.hostname.split(/\./);for(var i=0,l=hostparts.length;i<l;i++){var part=hostparts[i];if(!part)continue;if(!part.match(hostnamePartPattern)){var newpart="";for(var j=0,k=part.length;j<k;j++)if(part.charCodeAt(j)>127)newpart+="x";else newpart+=part[j];if(!newpart.match(hostnamePartPattern)){var validParts=
hostparts.slice(0,i);var notHost=hostparts.slice(i+1);var bit=part.match(hostnamePartStart);if(bit){validParts.push(bit[1]);notHost.unshift(bit[2])}if(notHost.length)rest="/"+notHost.join(".")+rest;this.hostname=validParts.join(".");break}}}}if(this.hostname.length>hostnameMaxLen)this.hostname="";else this.hostname=this.hostname.toLowerCase();if(!ipv6Hostname)this.hostname=punycode.toASCII(this.hostname);var p=this.port?":"+this.port:"";var h=this.hostname||"";this.host=h+p;this.href+=this.host;if(ipv6Hostname){this.hostname=
this.hostname.substr(1,this.hostname.length-2);if(rest[0]!=="/")rest="/"+rest}}if(!unsafeProtocol[lowerProto])for(var i=0,l=autoEscape.length;i<l;i++){var ae=autoEscape[i];if(rest.indexOf(ae)===-1)continue;var esc=encodeURIComponent(ae);if(esc===ae)esc=escape(ae);rest=rest.split(ae).join(esc)}var hash=rest.indexOf("#");if(hash!==-1){this.hash=rest.substr(hash);rest=rest.slice(0,hash)}var qm=rest.indexOf("?");if(qm!==-1){this.search=rest.substr(qm);this.query=rest.substr(qm+1);if(parseQueryString)this.query=
querystring.parse(this.query);rest=rest.slice(0,qm)}else if(parseQueryString){this.search="";this.query={}}if(rest)this.pathname=rest;if(slashedProtocol[lowerProto]&&this.hostname&&!this.pathname)this.pathname="/";if(this.pathname||this.search){var p=this.pathname||"";var s=this.search||"";this.path=p+s}this.href=this.format();return this};function urlFormat(obj){if(util.isString(obj))obj=urlParse(obj);if(!(obj instanceof Url))return Url.prototype.format.call(obj);return obj.format()}Url.prototype.format=
function(){var auth=this.auth||"";if(auth){auth=encodeURIComponent(auth);auth=auth.replace(/%3A/i,":");auth+="@"}var protocol=this.protocol||"",pathname=this.pathname||"",hash=this.hash||"",host=false,query="";if(this.host)host=auth+this.host;else if(this.hostname){host=auth+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]");if(this.port)host+=":"+this.port}if(this.query&&util.isObject(this.query)&&Object.keys(this.query).length)query=querystring.stringify(this.query);var search=
this.search||query&&"?"+query||"";if(protocol&&protocol.substr(-1)!==":")protocol+=":";if(this.slashes||(!protocol||slashedProtocol[protocol])&&host!==false){host="//"+(host||"");if(pathname&&pathname.charAt(0)!=="/")pathname="/"+pathname}else if(!host)host="";if(hash&&hash.charAt(0)!=="#")hash="#"+hash;if(search&&search.charAt(0)!=="?")search="?"+search;pathname=pathname.replace(/[?#]/g,function(match){return encodeURIComponent(match)});search=search.replace("#","%23");return protocol+host+pathname+
search+hash};function urlResolve(source,relative){return urlParse(source,false,true).resolve(relative)}Url.prototype.resolve=function(relative){return this.resolveObject(urlParse(relative,false,true)).format()};function urlResolveObject(source,relative){if(!source)return relative;return urlParse(source,false,true).resolveObject(relative)}Url.prototype.resolveObject=function(relative){if(util.isString(relative)){var rel=new Url;rel.parse(relative,false,true);relative=rel}var result=new Url;var tkeys=
Object.keys(this);for(var tk=0;tk<tkeys.length;tk++){var tkey=tkeys[tk];result[tkey]=this[tkey]}result.hash=relative.hash;if(relative.href===""){result.href=result.format();return result}if(relative.slashes&&!relative.protocol){var rkeys=Object.keys(relative);for(var rk=0;rk<rkeys.length;rk++){var rkey=rkeys[rk];if(rkey!=="protocol")result[rkey]=relative[rkey]}if(slashedProtocol[result.protocol]&&result.hostname&&!result.pathname)result.path=result.pathname="/";result.href=result.format();return result}if(relative.protocol&&
relative.protocol!==result.protocol){if(!slashedProtocol[relative.protocol]){var keys=Object.keys(relative);for(var v=0;v<keys.length;v++){var k=keys[v];result[k]=relative[k]}result.href=result.format();return result}result.protocol=relative.protocol;if(!relative.host&&!hostlessProtocol[relative.protocol]){var relPath=(relative.pathname||"").split("/");while(relPath.length&&!(relative.host=relPath.shift()));if(!relative.host)relative.host="";if(!relative.hostname)relative.hostname="";if(relPath[0]!==
"")relPath.unshift("");if(relPath.length<2)relPath.unshift("");result.pathname=relPath.join("/")}else result.pathname=relative.pathname;result.search=relative.search;result.query=relative.query;result.host=relative.host||"";result.auth=relative.auth;result.hostname=relative.hostname||relative.host;result.port=relative.port;if(result.pathname||result.search){var p=result.pathname||"";var s=result.search||"";result.path=p+s}result.slashes=result.slashes||relative.slashes;result.href=result.format();
return result}var isSourceAbs=result.pathname&&result.pathname.charAt(0)==="/",isRelAbs=relative.host||relative.pathname&&relative.pathname.charAt(0)==="/",mustEndAbs=isRelAbs||isSourceAbs||result.host&&relative.pathname,removeAllDots=mustEndAbs,srcPath=result.pathname&&result.pathname.split("/")||[],relPath=relative.pathname&&relative.pathname.split("/")||[],psychotic=result.protocol&&!slashedProtocol[result.protocol];if(psychotic){result.hostname="";result.port=null;if(result.host)if(srcPath[0]===
"")srcPath[0]=result.host;else srcPath.unshift(result.host);result.host="";if(relative.protocol){relative.hostname=null;relative.port=null;if(relative.host)if(relPath[0]==="")relPath[0]=relative.host;else relPath.unshift(relative.host);relative.host=null}mustEndAbs=mustEndAbs&&(relPath[0]===""||srcPath[0]==="")}if(isRelAbs){result.host=relative.host||relative.host===""?relative.host:result.host;result.hostname=relative.hostname||relative.hostname===""?relative.hostname:result.hostname;result.search=
relative.search;result.query=relative.query;srcPath=relPath}else if(relPath.length){if(!srcPath)srcPath=[];srcPath.pop();srcPath=srcPath.concat(relPath);result.search=relative.search;result.query=relative.query}else if(!util.isNullOrUndefined(relative.search)){if(psychotic){result.hostname=result.host=srcPath.shift();var authInHost=result.host&&result.host.indexOf("@")>0?result.host.split("@"):false;if(authInHost){result.auth=authInHost.shift();result.host=result.hostname=authInHost.shift()}}result.search=
relative.search;result.query=relative.query;if(!util.isNull(result.pathname)||!util.isNull(result.search))result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"");result.href=result.format();return result}if(!srcPath.length){result.pathname=null;if(result.search)result.path="/"+result.search;else result.path=null;result.href=result.format();return result}var last=srcPath.slice(-1)[0];var hasTrailingSlash=(result.host||relative.host||srcPath.length>1)&&(last==="."||last===
"..")||last==="";var up=0;for(var i=srcPath.length;i>=0;i--){last=srcPath[i];if(last===".")srcPath.splice(i,1);else if(last===".."){srcPath.splice(i,1);up++}else if(up){srcPath.splice(i,1);up--}}if(!mustEndAbs&&!removeAllDots)for(;up--;JSCOMPILER_PRESERVE(up))srcPath.unshift("..");if(mustEndAbs&&srcPath[0]!==""&&(!srcPath[0]||srcPath[0].charAt(0)!=="/"))srcPath.unshift("");if(hasTrailingSlash&&srcPath.join("/").substr(-1)!=="/")srcPath.push("");var isAbsolute=srcPath[0]===""||srcPath[0]&&srcPath[0].charAt(0)===
"/";if(psychotic){result.hostname=result.host=isAbsolute?"":srcPath.length?srcPath.shift():"";var authInHost=result.host&&result.host.indexOf("@")>0?result.host.split("@"):false;if(authInHost){result.auth=authInHost.shift();result.host=result.hostname=authInHost.shift()}}mustEndAbs=mustEndAbs||result.host&&srcPath.length;if(mustEndAbs&&!isAbsolute)srcPath.unshift("");if(!srcPath.length){result.pathname=null;result.path=null}else result.pathname=srcPath.join("/");if(!util.isNull(result.pathname)||
!util.isNull(result.search))result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"");result.auth=relative.auth||result.auth;result.slashes=result.slashes||relative.slashes;result.href=result.format();return result};Url.prototype.parseHost=function(){var host=this.host;var port=portPattern.exec(host);if(port){port=port[0];if(port!==":")this.port=port.substr(1);host=host.substr(0,host.length-port.length)}if(host)this.hostname=host}},{"./util":94,"punycode":72,"querystring":75}],
94:[function(_dereq_,module,exports){module.exports={isString:function(arg){return typeof arg==="string"},isObject:function(arg){return typeof arg==="object"&&arg!==null},isNull:function(arg){return arg===null},isNullOrUndefined:function(arg){return arg==null}}},{}],95:[function(_dereq_,module,exports){(function(global){module.exports=deprecate;function deprecate(fn,msg){if(config("noDeprecation"))return fn;var warned=false;function deprecated(){if(!warned){if(config("throwDeprecation"))throw new Error(msg);
else if(config("traceDeprecation"))console.trace(msg);else console.warn(msg);warned=true}return fn.apply(this,arguments)}return deprecated}function config(name){try{if(!global.localStorage)return false}catch(_){return false}var val=global.localStorage[name];if(null==val)return false;return String(val).toLowerCase()==="true"}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],96:[function(_dereq_,module,exports){module.exports=
function isBuffer(arg){return arg&&typeof arg==="object"&&typeof arg.copy==="function"&&typeof arg.fill==="function"&&typeof arg.readUInt8==="function"}},{}],97:[function(_dereq_,module,exports){(function(process,global){var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){var objects=[];for(var i=0;i<arguments.length;i++)objects.push(inspect(arguments[i]));return objects.join(" ")}var i=1;var args=arguments;var len=args.length;var str=String(f).replace(formatRegExp,function(x){if(x===
"%%")return"%";if(i>=len)return x;switch(x){case "%s":return String(args[i++]);case "%d":return Number(args[i++]);case "%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}});for(var x=args[i];i<len;x=args[++i])if(isNull(x)||!isObject(x))str+=" "+x;else str+=" "+inspect(x);return str};exports.deprecate=function(fn,msg){if(isUndefined(global.process))return function(){return exports.deprecate(fn,msg).apply(this,arguments)};if(process.noDeprecation===true)return fn;
var warned=false;function deprecated(){if(!warned){if(process.throwDeprecation)throw new Error(msg);else if(process.traceDeprecation)console.trace(msg);else console.error(msg);warned=true}return fn.apply(this,arguments)}return deprecated};var debugs={};var debugEnviron;exports.debuglog=function(set){if(isUndefined(debugEnviron))debugEnviron=process.env.NODE_DEBUG||"";set=set.toUpperCase();if(!debugs[set])if((new RegExp("\\b"+set+"\\b","i")).test(debugEnviron)){var pid=process.pid;debugs[set]=function(){var msg=
exports.format.apply(exports,arguments);console.error("%s %d: %s",set,pid,msg)}}else debugs[set]=function(){};return debugs[set]};function inspect(obj,opts){var ctx={seen:[],stylize:stylizeNoColor};if(arguments.length>=3)ctx.depth=arguments[2];if(arguments.length>=4)ctx.colors=arguments[3];if(isBoolean(opts))ctx.showHidden=opts;else if(opts)exports._extend(ctx,opts);if(isUndefined(ctx.showHidden))ctx.showHidden=false;if(isUndefined(ctx.depth))ctx.depth=2;if(isUndefined(ctx.colors))ctx.colors=false;
if(isUndefined(ctx.customInspect))ctx.customInspect=true;if(ctx.colors)ctx.stylize=stylizeWithColor;return formatValue(ctx,obj,ctx.depth)}exports.inspect=inspect;inspect.colors={"bold":[1,22],"italic":[3,23],"underline":[4,24],"inverse":[7,27],"white":[37,39],"grey":[90,39],"black":[30,39],"blue":[34,39],"cyan":[36,39],"green":[32,39],"magenta":[35,39],"red":[31,39],"yellow":[33,39]};inspect.styles={"special":"cyan","number":"yellow","boolean":"yellow","undefined":"grey","null":"bold","string":"green",
"date":"magenta","regexp":"red"};function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];if(style)return"\u001b["+inspect.colors[style][0]+"m"+str+"\u001b["+inspect.colors[style][1]+"m";else return str}function stylizeNoColor(str,styleType){return str}function arrayToHash(array){var hash={};array.forEach(function(val,idx){hash[val]=true});return hash}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&
!(value.constructor&&value.constructor.prototype===value)){var ret=value.inspect(recurseTimes,ctx);if(!isString(ret))ret=formatValue(ctx,ret,recurseTimes);return ret}var primitive=formatPrimitive(ctx,value);if(primitive)return primitive;var keys=Object.keys(value);var visibleKeys=arrayToHash(keys);if(ctx.showHidden)keys=Object.getOwnPropertyNames(value);if(isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0))return formatError(value);if(keys.length===0){if(isFunction(value)){var name=
value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value))return ctx.stylize(RegExp.prototype.toString.call(value),"regexp");if(isDate(value))return ctx.stylize(Date.prototype.toString.call(value),"date");if(isError(value))return formatError(value)}var base="",array=false,braces=["{","}"];if(isArray(value)){array=true;braces=["[","]"]}if(isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value))base=" "+RegExp.prototype.toString.call(value);
if(isDate(value))base=" "+Date.prototype.toUTCString.call(value);if(isError(value))base=" "+formatError(value);if(keys.length===0&&(!array||value.length==0))return braces[0]+base+braces[1];if(recurseTimes<0)if(isRegExp(value))return ctx.stylize(RegExp.prototype.toString.call(value),"regexp");else return ctx.stylize("[Object]","special");ctx.seen.push(value);var output;if(array)output=formatArray(ctx,value,recurseTimes,visibleKeys,keys);else output=keys.map(function(key){return formatProperty(ctx,
value,recurseTimes,visibleKeys,key,array)});ctx.seen.pop();return reduceToSingleString(output,base,braces)}function formatPrimitive(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}if(isNumber(value))return ctx.stylize(""+value,"number");if(isBoolean(value))return ctx.stylize(""+value,"boolean");if(isNull(value))return ctx.stylize("null",
"null")}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatArray(ctx,value,recurseTimes,visibleKeys,keys){var output=[];for(var i=0,l=value.length;i<l;++i)if(hasOwnProperty(value,String(i)))output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,String(i),true));else output.push("");keys.forEach(function(key){if(!key.match(/^\d+$/))output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,key,true))});return output}function formatProperty(ctx,value,
recurseTimes,visibleKeys,key,array){var name,str,desc;desc=Object.getOwnPropertyDescriptor(value,key)||{value:value[key]};if(desc.get)if(desc.set)str=ctx.stylize("[Getter/Setter]","special");else str=ctx.stylize("[Getter]","special");else if(desc.set)str=ctx.stylize("[Setter]","special");if(!hasOwnProperty(visibleKeys,key))name="["+key+"]";if(!str)if(ctx.seen.indexOf(desc.value)<0){if(isNull(recurseTimes))str=formatValue(ctx,desc.value,null);else str=formatValue(ctx,desc.value,recurseTimes-1);if(str.indexOf("\n")>
-1)if(array)str=str.split("\n").map(function(line){return" "+line}).join("\n").substr(2);else str="\n"+str.split("\n").map(function(line){return" "+line}).join("\n")}else str=ctx.stylize("[Circular]","special");if(isUndefined(name)){if(array&&key.match(/^\d+$/))return str;name=JSON.stringify(""+key);if(name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){name=name.substr(1,name.length-2);name=ctx.stylize(name,"name")}else{name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");name=ctx.stylize(name,
"string")}}return name+": "+str}function reduceToSingleString(output,base,braces){var numLinesEst=0;var length=output.reduce(function(prev,cur){numLinesEst++;if(cur.indexOf("\n")>=0)numLinesEst++;return prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1},0);if(length>60)return braces[0]+(base===""?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1];return braces[0]+base+" "+output.join(", ")+" "+braces[1]}function isArray(ar){return Array.isArray(ar)}exports.isArray=isArray;function isBoolean(arg){return typeof arg===
"boolean"}exports.isBoolean=isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg==="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg==="string"}exports.isString=isString;function isSymbol(arg){return typeof arg==="symbol"}exports.isSymbol=isSymbol;function isUndefined(arg){return arg===void 0}exports.isUndefined=isUndefined;
function isRegExp(re){return isObject(re)&&objectToString(re)==="[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return typeof arg==="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return isObject(d)&&objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return isObject(e)&&(objectToString(e)==="[object Error]"||e instanceof Error)}exports.isError=isError;function isFunction(arg){return typeof arg==="function"}exports.isFunction=isFunction;
function isPrimitive(arg){return arg===null||typeof arg==="boolean"||typeof arg==="number"||typeof arg==="string"||typeof arg==="symbol"||typeof arg==="undefined"}exports.isPrimitive=isPrimitive;exports.isBuffer=_dereq_("./support/isBuffer");function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return n<10?"0"+n.toString(10):n.toString(10)}var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var d=new Date;var time=
[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))};exports.inherits=_dereq_("inherits");exports._extend=function(origin,add){if(!add||!isObject(add))return origin;var keys=Object.keys(add);var i=keys.length;while(i--)origin[keys[i]]=add[keys[i]];return origin};function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,
prop)}}).call(this,_dereq_("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./support/isBuffer":96,"_process":71,"inherits":35}],98:[function(_dereq_,module,exports){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){var target={};for(var i=0;i<arguments.length;i++){var source=arguments[i];for(var key in source)if(hasOwnProperty.call(source,key))target[key]=source[key]}return target}},{}]},
{},[3])(3)})});var jsonSchemaRefParser$1=Object.freeze({default:jsonSchemaRefParser});function createCommonjsModule(fn,module){return module={exports:{}},fn(module,module.exports),module.exports}function URLUtils(url,baseURL){url=url.replace(/^\.\//,"");var m=String(url).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(?:\/\/(?:([^:@]*)(?::([^:@]*))?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);if(!m)throw new RangeError;var href=m[0]||"";var protocol=m[1]||"";var username=m[2]||"";var password=
m[3]||"";var host=m[4]||"";var hostname=m[5]||"";var port=m[6]||"";var pathname=m[7]||"";var search=m[8]||"";var hash=m[9]||"";if(baseURL!==undefined){var base=new URLUtils(baseURL);var flag=protocol===""&&host===""&&username==="";if(flag&&pathname===""&&search==="")search=base.search;if(flag&&pathname.charAt(0)!=="/")pathname=pathname!==""?base.pathname.slice(0,base.pathname.lastIndexOf("/")+1)+pathname:base.pathname;var output=[];pathname.replace(/\/?[^\/]+/g,function(p){if(p==="/..")output.pop();
else output.push(p)});pathname=output.join("")||"/";if(flag){port=base.port;hostname=base.hostname;host=base.host;password=base.password;username=base.username}if(protocol==="")protocol=base.protocol;href=protocol+(host!==""?"//":"")+(username!==""?username+(password!==""?":"+password:"")+"@":"")+host+pathname+search+hash}this.href=href;this.origin=protocol+(host!==""?"//"+host:"");this.protocol=protocol;this.username=username;this.password=password;this.host=host;this.hostname=hostname;this.port=
port;this.pathname=pathname;this.search=search;this.hash=hash}function isURL(path){if(typeof path==="string"&&/^\w+:\/\//.test(path))return true}function parseURI(href,base){return new URLUtils(href,base)}function resolveURL(base,href){base=base||"http://json-schema.org/schema#";href=parseURI(href,base);base=parseURI(base);if(base.hash&&!href.hash)return href.href+base.hash;return href.href}function getDocumentURI(uri){return typeof uri==="string"&&uri.split("#")[0]}function isKeyword(prop){return prop===
"enum"||prop==="default"||prop==="required"}var helpers={isURL:isURL,parseURI:parseURI,isKeyword:isKeyword,resolveURL:resolveURL,getDocumentURI:getDocumentURI};var findReference=createCommonjsModule(function(module){function get(obj,path){var hash=path.split("#")[1];var parts=hash.split("/").slice(1);while(parts.length){var key=decodeURIComponent(parts.shift()).replace(/~1/g,"/").replace(/~0/g,"~");if(typeof obj[key]==="undefined")throw new Error("JSON pointer not found: "+path);obj=obj[key]}return obj}
var find=module.exports=function(id,refs){var target=refs[id]||refs[id.split("#")[1]]||refs[helpers.getDocumentURI(id)];if(target)target=id.indexOf("#/")>-1?get(target,id):target;else for(var key in refs)if(helpers.resolveURL(refs[key].id,id)===refs[key].id){target=refs[key];break}if(!target)throw new Error("Reference not found: "+id);while(target.$ref)target=find(target.$ref,refs);return target}});var deepExtend_1=createCommonjsModule(function(module){function isSpecificValue(val){return val instanceof
Buffer||val instanceof Date||val instanceof RegExp?true:false}function cloneSpecificValue(val){if(val instanceof Buffer){var x=new Buffer(val.length);val.copy(x);return x}else if(val instanceof Date)return new Date(val.getTime());else if(val instanceof RegExp)return new RegExp(val);else throw new Error("Unexpected situation");}function deepCloneArray(arr){var clone=[];arr.forEach(function(item,index){if(typeof item==="object"&&item!==null)if(Array.isArray(item))clone[index]=deepCloneArray(item);else if(isSpecificValue(item))clone[index]=
cloneSpecificValue(item);else clone[index]=deepExtend({},item);else clone[index]=item});return clone}var deepExtend=module.exports=function(){if(arguments.length<1||typeof arguments[0]!=="object")return false;if(arguments.length<2)return arguments[0];var target=arguments[0];var args=Array.prototype.slice.call(arguments,1);var val,src,clone;args.forEach(function(obj){if(typeof obj!=="object"||obj===null||Array.isArray(obj))return;Object.keys(obj).forEach(function(key){src=target[key];val=obj[key];
if(val===target)return;else if(typeof val!=="object"||val===null){target[key]=val;return}else if(Array.isArray(val)){target[key]=deepCloneArray(val);return}else if(isSpecificValue(val)){target[key]=cloneSpecificValue(val);return}else if(typeof src!=="object"||src===null||Array.isArray(src)){target[key]=deepExtend({},val);return}else{target[key]=deepExtend(src,val);return}})});return target}});function copy(_,obj,refs,parent,resolve){var target=Array.isArray(obj)?[]:{};if(typeof obj.$ref==="string"){var id=
obj.$ref;var base=helpers.getDocumentURI(id);var local=id.indexOf("#/")>-1;if(local||resolve&&base!==parent){var fixed=findReference(id,refs);deepExtend_1(obj,fixed);delete obj.$ref;delete obj.id}if(_[id])return obj;_[id]=1}for(var prop in obj)if(typeof obj[prop]==="object"&&obj[prop]!==null&&!helpers.isKeyword(prop))target[prop]=copy(_,obj[prop],refs,parent,resolve);else target[prop]=obj[prop];return target}var resolveSchema=function(obj,refs,resolve){var fixedId=helpers.resolveURL(obj.$schema,obj.id),
parent=helpers.getDocumentURI(fixedId);return copy({},obj,refs,parent,resolve)};var cloneObj=createCommonjsModule(function(module){var clone=module.exports=function(obj,seen){seen=seen||[];if(seen.indexOf(obj)>-1)throw new Error("unable dereference circular structures");if(!obj||typeof obj!=="object")return obj;seen=seen.concat([obj]);var target=Array.isArray(obj)?[]:{};function copy(key,value){target[key]=clone(value,seen)}if(Array.isArray(target))obj.forEach(function(value,key){copy(key,value)});
else if(Object.prototype.toString.call(obj)==="[object Object]")Object.keys(obj).forEach(function(key){copy(key,obj[key])});return target}});var SCHEMA_URI=["http://json-schema.org/schema#","http://json-schema.org/draft-04/schema#"];function expand(obj,parent,callback){if(obj){var id=typeof obj.id==="string"?obj.id:"#";if(!helpers.isURL(id))id=helpers.resolveURL(parent===id?null:parent,id);if(typeof obj.$ref==="string"&&!helpers.isURL(obj.$ref))obj.$ref=helpers.resolveURL(id,obj.$ref);if(typeof obj.id===
"string")obj.id=parent=id}for(var key in obj){var value=obj[key];if(typeof value==="object"&&value!==null&&!helpers.isKeyword(key))expand(value,parent,callback)}if(typeof callback==="function")callback(obj)}var normalizeSchema=function(fakeroot,schema,push){if(typeof fakeroot==="object"){push=schema;schema=fakeroot;fakeroot=null}var base=fakeroot||"",copy=cloneObj(schema);if(copy.$schema&&SCHEMA_URI.indexOf(copy.$schema)===-1)throw new Error("Unsupported schema version (v4 only)");base=helpers.resolveURL(copy.$schema||
SCHEMA_URI[0],base);expand(copy,helpers.resolveURL(copy.id||"#",base),push);copy.id=copy.id||base;return copy};var index$2=createCommonjsModule(function(module){helpers.findByRef=findReference;helpers.resolveSchema=resolveSchema;helpers.normalizeSchema=normalizeSchema;var instance=module.exports=function(){function $ref(fakeroot,schema,refs,ex){if(typeof fakeroot==="object"){ex=refs;refs=schema;schema=fakeroot;fakeroot=undefined}if(typeof schema!=="object")throw new Error("schema must be an object");
if(typeof refs==="object"&&refs!==null){var aux=refs;refs=[];for(var k in aux){aux[k].id=aux[k].id||k;refs.push(aux[k])}}if(typeof refs!=="undefined"&&!Array.isArray(refs)){ex=!!refs;refs=[]}function push(ref){if(typeof ref.id==="string"){var id=helpers.resolveURL(fakeroot,ref.id).replace(/\/#?$/,"");if(id.indexOf("#")>-1){var parts=id.split("#");if(parts[1].charAt()==="/")id=parts[0];else id=parts[1]||parts[0]}if(!$ref.refs[id])$ref.refs[id]=ref}}(refs||[]).concat([schema]).forEach(function(ref){schema=
helpers.normalizeSchema(fakeroot,ref,push);push(schema)});return helpers.resolveSchema(schema,$ref.refs,ex)}$ref.refs={};$ref.util=helpers;return $ref};instance.util=helpers});var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};function __extends(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}var __assign=
Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p))t[p]=s[p]}return t};function __rest(s,e){var t={};for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0)t[p]=s[p];if(s!=null&&typeof Object.getOwnPropertySymbols==="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)if(e.indexOf(p[i])<0)t[p[i]]=s[p[i]];return t}function __decorate(decorators,target,key,desc){var c=
arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)if(d=decorators[i])r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r}function __param(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}}function __metadata(metadataKey,
metadataValue){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(metadataKey,metadataValue)}function __awaiter(thisArg,_arguments,P,generator){return new (P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):(new P(function(resolve){resolve(result.value)})).then(fulfilled,
rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})}function __generator(thisArg,body){var _={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},f,y,t,g;return g={next:verb(0),"throw":verb(1),"return":verb(2)},typeof Symbol==="function"&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return step([n,v])}}function step(op){if(f)throw new TypeError("Generator is already executing.");while(_)try{if(f=1,y&&(t=y[op[0]&2?
"return":op[0]?"throw":"next"])&&!(t=t.call(y,op[1])).done)return t;if(y=0,t)op=[0,t.value];switch(op[0]){case 0:case 1:t=op;break;case 4:_.label++;return{value:op[1],done:false};case 5:_.label++;y=op[1];op=[0];continue;case 7:op=_.ops.pop();_.trys.pop();continue;default:if(!(t=_.trys,t=t.length>0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(op[0]===6&&_.label<t[1]){_.label=t[1];t=op;break}if(t&&_.label<t[2]){_.label=t[2];
_.ops.push(op);break}if(t[2])_.ops.pop();_.trys.pop();continue}op=body.call(thisArg,_)}catch(e){op=[6,e];y=0}finally{f=t=0}if(op[0]&5)throw op[1];return{value:op[0]?op[1]:void 0,done:true}}}function __exportStar(m,exports){for(var p in m)if(!exports.hasOwnProperty(p))exports[p]=m[p]}function __values(o){var m=typeof Symbol==="function"&&o[Symbol.iterator],i=0;if(m)return m.call(o);return{next:function(){if(o&&i>=o.length)o=void 0;return{value:o&&o[i++],done:!o}}}}function __read(o,n){var m=typeof Symbol===
"function"&&o[Symbol.iterator];if(!m)return o;var i=m.call(o),r,ar=[],e;try{while((n===void 0||n-- >0)&&!(r=i.next()).done)ar.push(r.value)}catch(error){e={error:error}}finally{try{if(r&&!r.done&&(m=i["return"]))m.call(i)}finally{if(e)throw e.error;}}return ar}function __spread(){for(var ar=[],i=0;i<arguments.length;i++)ar=ar.concat(__read(arguments[i]));return ar}function __await(v){return this instanceof __await?(this.v=v,this):new __await(v)}function __asyncGenerator(thisArg,_arguments,generator){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");
var g=generator.apply(thisArg,_arguments||[]),i,q=[];return i={},verb("next"),verb("throw"),verb("return"),i[Symbol.asyncIterator]=function(){return this},i;function verb(n){if(g[n])i[n]=function(v){return new Promise(function(a,b){q.push([n,v,a,b])>1||resume(n,v)})}}function resume(n,v){try{step(g[n](v))}catch(e){settle(q[0][3],e)}}function step(r){r.value instanceof __await?Promise.resolve(r.value.v).then(fulfill,reject):settle(q[0][2],r)}function fulfill(value){resume("next",value)}function reject(value){resume("throw",
value)}function settle(f,v){if(f(v),q.shift(),q.length)resume(q[0][0],q[0][1])}}function __asyncDelegator(o){var i,p;return i={},verb("next"),verb("throw",function(e){throw e;}),verb("return"),i[Symbol.iterator]=function(){return this},i;function verb(n,f){if(o[n])i[n]=function(v){return(p=!p)?{value:__await(o[n](v)),done:n==="return"}:f?f(v):v}}}function __asyncValues(o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var m=o[Symbol.asyncIterator];return m?m.call(o):
typeof __values==="function"?__values(o):o[Symbol.iterator]()}var tslib_es6=Object.freeze({__extends:__extends,__assign:__assign,__rest:__rest,__decorate:__decorate,__param:__param,__metadata:__metadata,__awaiter:__awaiter,__generator:__generator,__exportStar:__exportStar,__values:__values,__read:__read,__spread:__spread,__await:__await,__asyncGenerator:__asyncGenerator,__asyncDelegator:__asyncDelegator,__asyncValues:__asyncValues});var types={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,
REFERENCE:6,CHAR:7};var INTS=function(){return[{type:types.RANGE,from:48,to:57}]};var WORDS=function(){return[{type:types.CHAR,value:95},{type:types.RANGE,from:97,to:122},{type:types.RANGE,from:65,to:90}].concat(INTS())};var WHITESPACE=function(){return[{type:types.CHAR,value:9},{type:types.CHAR,value:10},{type:types.CHAR,value:11},{type:types.CHAR,value:12},{type:types.CHAR,value:13},{type:types.CHAR,value:32},{type:types.CHAR,value:160},{type:types.CHAR,value:5760},{type:types.CHAR,value:6158},
{type:types.CHAR,value:8192},{type:types.CHAR,value:8193},{type:types.CHAR,value:8194},{type:types.CHAR,value:8195},{type:types.CHAR,value:8196},{type:types.CHAR,value:8197},{type:types.CHAR,value:8198},{type:types.CHAR,value:8199},{type:types.CHAR,value:8200},{type:types.CHAR,value:8201},{type:types.CHAR,value:8202},{type:types.CHAR,value:8232},{type:types.CHAR,value:8233},{type:types.CHAR,value:8239},{type:types.CHAR,value:8287},{type:types.CHAR,value:12288},{type:types.CHAR,value:65279}]};var NOTANYCHAR=
function(){return[{type:types.CHAR,value:10},{type:types.CHAR,value:13},{type:types.CHAR,value:8232},{type:types.CHAR,value:8233}]};var words=function(){return{type:types.SET,set:WORDS(),not:false}};var notWords=function(){return{type:types.SET,set:WORDS(),not:true}};var ints=function(){return{type:types.SET,set:INTS(),not:false}};var notInts=function(){return{type:types.SET,set:INTS(),not:true}};var whitespace=function(){return{type:types.SET,set:WHITESPACE(),not:false}};var notWhitespace=function(){return{type:types.SET,
set:WHITESPACE(),not:true}};var anyChar=function(){return{type:types.SET,set:NOTANYCHAR(),not:true}};var sets={words:words,notWords:notWords,ints:ints,notInts:notInts,whitespace:whitespace,notWhitespace:notWhitespace,anyChar:anyChar};var util=createCommonjsModule(function(module,exports){var CTRL="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?";var SLSH={0:0,"t":9,"n":10,"v":11,"f":12,"r":13};exports.strToChars=function(str){var chars_regex=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z\[\\\]\^?])|([0tnvfr]))/g;
str=str.replace(chars_regex,function(s,b,lbs,a16,b16,c8,dctrl,eslsh){if(lbs)return s;var code=b?8:a16?parseInt(a16,16):b16?parseInt(b16,16):c8?parseInt(c8,8):dctrl?CTRL.indexOf(dctrl):SLSH[eslsh];var c=String.fromCharCode(code);if(/[\[\]{}\^$.|?*+()]/.test(c))c="\\"+c;return c});return str};exports.tokenizeClass=function(str,regexpStr){var tokens=[];var regexp=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?(.)/g;var rs,c;while((rs=regexp.exec(str))!=null)if(rs[1])tokens.push(sets.words());
else if(rs[2])tokens.push(sets.ints());else if(rs[3])tokens.push(sets.whitespace());else if(rs[4])tokens.push(sets.notWords());else if(rs[5])tokens.push(sets.notInts());else if(rs[6])tokens.push(sets.notWhitespace());else if(rs[7])tokens.push({type:types.RANGE,from:(rs[8]||rs[9]).charCodeAt(0),to:rs[10].charCodeAt(0)});else if(c=rs[12])tokens.push({type:types.CHAR,value:c.charCodeAt(0)});else return[tokens,regexp.lastIndex];exports.error(regexpStr,"Unterminated character class")};exports.error=function(regexp,
msg){throw new SyntaxError("Invalid regular expression: /"+regexp+"/: "+msg);}});var wordBoundary=function(){return{type:types.POSITION,value:"b"}};var nonWordBoundary=function(){return{type:types.POSITION,value:"B"}};var begin=function(){return{type:types.POSITION,value:"^"}};var end=function(){return{type:types.POSITION,value:"$"}};var positions={wordBoundary:wordBoundary,nonWordBoundary:nonWordBoundary,begin:begin,end:end};var index$4=function(regexpStr){var i=0,l,c,start={type:types.ROOT,stack:[]},
lastGroup=start,last=start.stack,groupStack=[];var repeatErr=function(i){util.error(regexpStr,"Nothing to repeat at column "+(i-1))};var str=util.strToChars(regexpStr);l=str.length;while(i<l){c=str[i++];switch(c){case "\\":c=str[i++];switch(c){case "b":last.push(positions.wordBoundary());break;case "B":last.push(positions.nonWordBoundary());break;case "w":last.push(sets.words());break;case "W":last.push(sets.notWords());break;case "d":last.push(sets.ints());break;case "D":last.push(sets.notInts());
break;case "s":last.push(sets.whitespace());break;case "S":last.push(sets.notWhitespace());break;default:if(/\d/.test(c))last.push({type:types.REFERENCE,value:parseInt(c,10)});else last.push({type:types.CHAR,value:c.charCodeAt(0)})}break;case "^":last.push(positions.begin());break;case "$":last.push(positions.end());break;case "[":var not;if(str[i]==="^"){not=true;i++}else not=false;var classTokens=util.tokenizeClass(str.slice(i),regexpStr);i+=classTokens[1];last.push({type:types.SET,set:classTokens[0],
not:not});break;case ".":last.push(sets.anyChar());break;case "(":var group={type:types.GROUP,stack:[],remember:true};c=str[i];if(c==="?"){c=str[i+1];i+=2;if(c==="\x3d")group.followedBy=true;else if(c==="!")group.notFollowedBy=true;else if(c!==":")util.error(regexpStr,"Invalid group, character '"+c+"' after '?' at column "+(i-1));group.remember=false}last.push(group);groupStack.push(lastGroup);lastGroup=group;last=group.stack;break;case ")":if(groupStack.length===0)util.error(regexpStr,"Unmatched ) at column "+
(i-1));lastGroup=groupStack.pop();last=lastGroup.options?lastGroup.options[lastGroup.options.length-1]:lastGroup.stack;break;case "|":if(!lastGroup.options){lastGroup.options=[lastGroup.stack];delete lastGroup.stack}var stack=[];lastGroup.options.push(stack);last=stack;break;case "{":var rs=/^(\d+)(,(\d+)?)?\}/.exec(str.slice(i)),min,max;if(rs!==null){if(last.length===0)repeatErr(i);min=parseInt(rs[1],10);max=rs[2]?rs[3]?parseInt(rs[3],10):Infinity:min;i+=rs[0].length;last.push({type:types.REPETITION,
min:min,max:max,value:last.pop()})}else last.push({type:types.CHAR,value:123});break;case "?":if(last.length===0)repeatErr(i);last.push({type:types.REPETITION,min:0,max:1,value:last.pop()});break;case "+":if(last.length===0)repeatErr(i);last.push({type:types.REPETITION,min:1,max:Infinity,value:last.pop()});break;case "*":if(last.length===0)repeatErr(i);last.push({type:types.REPETITION,min:0,max:Infinity,value:last.pop()});break;default:last.push({type:types.CHAR,value:c.charCodeAt(0)})}}if(groupStack.length!==
0)util.error(regexpStr,"Unterminated group");return start};var types_1=types;index$4.types=types_1;function _SubRange(low,high){this.low=low;this.high=high;this.length=1+high-low}_SubRange.prototype.overlaps=function(range){return!(this.high<range.low||this.low>range.high)};_SubRange.prototype.touches=function(range){return!(this.high+1<range.low||this.low-1>range.high)};_SubRange.prototype.add=function(range){return this.touches(range)&&new _SubRange(Math.min(this.low,range.low),Math.max(this.high,
range.high))};_SubRange.prototype.subtract=function(range){if(!this.overlaps(range))return false;if(range.low<=this.low&&range.high>=this.high)return[];if(range.low>this.low&&range.high<this.high)return[new _SubRange(this.low,range.low-1),new _SubRange(range.high+1,this.high)];if(range.low<=this.low)return[new _SubRange(range.high+1,this.high)];return[new _SubRange(this.low,range.low-1)]};_SubRange.prototype.toString=function(){if(this.low==this.high)return this.low.toString();return this.low+"-"+
this.high};_SubRange.prototype.clone=function(){return new _SubRange(this.low,this.high)};function DiscontinuousRange(a,b){if(this instanceof DiscontinuousRange){this.ranges=[];this.length=0;if(a!==undefined)this.add(a,b)}else return new DiscontinuousRange(a,b)}function _update_length(self){self.length=self.ranges.reduce(function(previous,range){return previous+range.length},0)}DiscontinuousRange.prototype.add=function(a,b){var self=this;function _add(subrange){var new_ranges=[];var i=0;while(i<self.ranges.length&&
!subrange.touches(self.ranges[i])){new_ranges.push(self.ranges[i].clone());i++}while(i<self.ranges.length&&subrange.touches(self.ranges[i])){subrange=subrange.add(self.ranges[i]);i++}new_ranges.push(subrange);while(i<self.ranges.length){new_ranges.push(self.ranges[i].clone());i++}self.ranges=new_ranges;_update_length(self)}if(a instanceof DiscontinuousRange)a.ranges.forEach(_add);else if(a instanceof _SubRange)_add(a);else{if(b===undefined)b=a;_add(new _SubRange(a,b))}return this};DiscontinuousRange.prototype.subtract=
function(a,b){var self=this;function _subtract(subrange){var new_ranges=[];var i=0;while(i<self.ranges.length&&!subrange.overlaps(self.ranges[i])){new_ranges.push(self.ranges[i].clone());i++}while(i<self.ranges.length&&subrange.overlaps(self.ranges[i])){new_ranges=new_ranges.concat(self.ranges[i].subtract(subrange));i++}while(i<self.ranges.length){new_ranges.push(self.ranges[i].clone());i++}self.ranges=new_ranges;_update_length(self)}if(a instanceof DiscontinuousRange)a.ranges.forEach(_subtract);
else if(a instanceof _SubRange)_subtract(a);else{if(b===undefined)b=a;_subtract(new _SubRange(a,b))}return this};DiscontinuousRange.prototype.index=function(index){var i=0;while(i<this.ranges.length&&this.ranges[i].length<=index){index-=this.ranges[i].length;i++}if(i>=this.ranges.length)return null;return this.ranges[i].low+index};DiscontinuousRange.prototype.toString=function(){return"[ "+this.ranges.join(", ")+" ]"};DiscontinuousRange.prototype.clone=function(){return new DiscontinuousRange(this)};
var index$6=DiscontinuousRange;var randexp=createCommonjsModule(function(module){var types=index$4.types;function toOtherCase(code){return code+(97<=code&&code<=122?-32:65<=code&&code<=90?32:0)}function randBool(){return!this.randInt(0,1)}function randSelect(arr){if(arr instanceof index$6)return arr.index(this.randInt(0,arr.length-1));return arr[this.randInt(0,arr.length-1)]}function expand(token){if(token.type===index$4.types.CHAR)return new index$6(token.value);else if(token.type===index$4.types.RANGE)return new index$6(token.from,
token.to);else{var drange=new index$6;for(var i=0;i<token.set.length;i++){var subrange=expand.call(this,token.set[i]);drange.add(subrange);if(this.ignoreCase)for(var j=0;j<subrange.length;j++){var code=subrange.index(j);var otherCaseCode=toOtherCase(code);if(code!==otherCaseCode)drange.add(otherCaseCode)}}if(token.not)return this.defaultRange.clone().subtract(drange);else return drange}}function checkCustom(randexp,regexp){if(typeof regexp.max==="number")randexp.max=regexp.max;if(regexp.defaultRange instanceof
index$6)randexp.defaultRange=regexp.defaultRange;if(typeof regexp.randInt==="function")randexp.randInt=regexp.randInt}var RandExp=module.exports=function(regexp,m){this.defaultRange=this.defaultRange.clone();if(regexp instanceof RegExp){this.ignoreCase=regexp.ignoreCase;this.multiline=regexp.multiline;checkCustom(this,regexp);regexp=regexp.source}else if(typeof regexp==="string"){this.ignoreCase=m&&m.indexOf("i")!==-1;this.multiline=m&&m.indexOf("m")!==-1}else throw new Error("Expected a regexp or string");
this.tokens=index$4(regexp)};RandExp.prototype.max=100;RandExp.prototype.gen=function(){return gen.call(this,this.tokens,[])};RandExp.randexp=function(regexp,m){var randexp;if(regexp._randexp===undefined){randexp=new RandExp(regexp,m);regexp._randexp=randexp}else randexp=regexp._randexp;checkCustom(randexp,regexp);return randexp.gen()};RandExp.sugar=function(){RegExp.prototype.gen=function(){return RandExp.randexp(this)}};RandExp.prototype.defaultRange=new index$6(32,126);RandExp.prototype.randInt=
function(a,b){return a+Math.floor(Math.random()*(1+b-a))};function gen(token,groups){var stack,str,n,i,l;switch(token.type){case types.ROOT:case types.GROUP:if(token.followedBy||token.notFollowedBy)return"";if(token.remember&&token.groupNumber===undefined)token.groupNumber=groups.push(null)-1;stack=token.options?randSelect.call(this,token.options):token.stack;str="";for(i=0,l=stack.length;i<l;i++)str+=gen.call(this,stack[i],groups);if(token.remember)groups[token.groupNumber]=str;return str;case types.POSITION:return"";
case types.SET:var expandedSet=expand.call(this,token);if(!expandedSet.length)return"";return String.fromCharCode(randSelect.call(this,expandedSet));case types.REPETITION:n=this.randInt(token.min,token.max===Infinity?token.min+this.max:token.max);str="";for(i=0;i<n;i++)str+=gen.call(this,token.value,groups);return str;case types.REFERENCE:return groups[token.value-1]||"";case types.CHAR:var code=this.ignoreCase&&randBool.call(this)?toOtherCase(token.value):token.value;return String.fromCharCode(code)}}
});var require$$0=jsonSchemaRefParser$1&&jsonSchemaRefParser||jsonSchemaRefParser$1;var tslib_1=tslib_es6&&undefined||tslib_es6;function _interopDefault$1(ex){return ex&&typeof ex==="object"&&"default"in ex?ex["default"]:ex}var $RefParser=_interopDefault$1(require$$0);var deref=_interopDefault$1(index$2);function proxy(gen){return function(value,schema,property){var fn=value;var args=[];if(typeof value==="object"){fn=Object.keys(value)[0];if(Array.isArray(value[fn]))args=value[fn];else args.push(value[fn])}var props=
fn.split(".");var ctx=gen();while(props.length>1)ctx=ctx[props.shift()];value=typeof ctx==="object"?ctx[props[0]]:ctx;if(typeof value==="function")value=value.apply(ctx,args);if(Object.prototype.toString.call(value)==="[object Object]")for(var key in value)if(typeof value[key]==="function")throw new Error('Cannot resolve value for "'+property+": "+fn+'", given: '+value);return value}}var Container=function(){function Container(){this.registry={};this.support={}}Container.prototype.extend=function(name,
callback){var _this=this;this.registry[name]=callback(this.registry[name]);if(!this.support[name])this.support[name]=proxy(function(){return _this.registry[name]})};Container.prototype.define=function(name,callback){this.support[name]=callback};Container.prototype.get=function(name){if(typeof this.registry[name]==="undefined")throw new ReferenceError('"'+name+"\" dependency doesn't exist.");return this.registry[name]};Container.prototype.wrap=function(schema){var keys=Object.keys(schema);var length=
keys.length;while(length--){var fn=keys[length].replace(/^x-/,"");var gen=this.support[fn];if(typeof gen==="function"){schema.generate=function(){return gen(schema[keys[length]],schema,keys[length])};break}}return schema};return Container}();var Registry=function(){function Registry(){this.data={}}Registry.prototype.register=function(name,callback){this.data[name]=callback};Registry.prototype.registerMany=function(formats){for(var name in formats)this.data[name]=formats[name]};Registry.prototype.get=
function(name){var format=this.data[name];return format};Registry.prototype.list=function(){return this.data};return Registry}();var registry=new Registry;function formatAPI(nameOrFormatMap,callback){if(typeof nameOrFormatMap==="undefined")return registry.list();else if(typeof nameOrFormatMap==="string")if(typeof callback==="function")registry.register(nameOrFormatMap,callback);else return registry.get(nameOrFormatMap);else registry.registerMany(nameOrFormatMap)}var OptionRegistry=function(_super){tslib_1.__extends(OptionRegistry,
_super);function OptionRegistry(){var _this=_super.call(this)||this;_this.data["failOnInvalidTypes"]=true;_this.data["defaultInvalidTypeProduct"]=null;_this.data["failOnInvalidFormat"]=true;_this.data["useDefaultValue"]=false;_this.data["requiredOnly"]=false;_this.data["maxItems"]=null;_this.data["maxLength"]=null;_this.data["defaultMinItems"]=0;_this.data["defaultRandExpMax"]=10;_this.data["alwaysFakeOptionals"]=false;return _this}return OptionRegistry}(Registry);var registry$1=new OptionRegistry;
function optionAPI(nameOrOptionMap){if(typeof nameOrOptionMap==="string")return registry$1.get(nameOrOptionMap);else return registry$1.registerMany(nameOrOptionMap)}randexp.prototype.max=10;function _randexp(value){var re=new randexp(value);re.max=optionAPI("defaultRandExpMax");return re.gen()}function getSubAttribute(obj,dotSeparatedKey){var keyElements=dotSeparatedKey.split(".");while(keyElements.length){var prop=keyElements.shift();if(!obj[prop])break;obj=obj[prop]}return obj}function hasProperties(obj){var properties=
[];for(var _i=1;_i<arguments.length;_i++)properties[_i-1]=arguments[_i];return properties.filter(function(key){return typeof obj[key]!=="undefined"}).length>0}function typecast(value,schema){switch(schema.type){case "integer":return parseInt(value,10);case "number":return parseFloat(value);case "string":value=String(value);var min=Math.max(schema.minLength||0,0);var max=Math.min(schema.maxLength||Infinity,Infinity);while(value.length<min)value+=" "+value;if(value.length>max)value=value.substr(0,max);
return value;case "boolean":return!!value;default:return value}}function merge(a,b){for(var key in b)if(typeof b[key]!=="object"||b[key]===null)a[key]=b[key];else if(Array.isArray(b[key])){a[key]=a[key]||[];b[key].forEach(function(value){if(a[key].indexOf(value))a[key].push(value)})}else if(typeof a[key]!=="object"||a[key]===null||Array.isArray(a[key]))a[key]=merge({},b[key]);else a[key]=merge(a[key],b[key]);return a}function clean(obj,isArray,requiredProps){if(!obj||typeof obj!=="object")return obj;
if(Array.isArray(obj)){obj=obj.map(function(value){return clean(value,true)}).filter(function(value){return typeof value!=="undefined"});return obj}Object.keys(obj).forEach(function(k){if(!requiredProps||requiredProps.indexOf(k)===-1){if(Array.isArray(obj[k])&&!obj[k].length)delete obj[k]}else obj[k]=clean(obj[k])});if(!Object.keys(obj).length&&isArray)return undefined;return obj}function short(schema){var s=JSON.stringify(schema);var l=JSON.stringify(schema,null,2);return s.length>400?l.substr(0,
400)+"...":l}var utils={getSubAttribute:getSubAttribute,hasProperties:hasProperties,typecast:typecast,merge:merge,clean:clean,short:short,randexp:_randexp};function pick(collection){return collection[Math.floor(Math.random()*collection.length)]}function shuffle(collection){var tmp,key,copy=collection.slice(),length=collection.length;for(;length>0;){key=Math.floor(Math.random()*length);tmp=copy[--length];copy[length]=copy[key];copy[key]=tmp}return copy}var MIN_NUMBER=-100;var MAX_NUMBER=100;function getRandom(min,
max){return Math.random()*(max-min)+min}function number(min,max,defMin,defMax,hasPrecision){if(hasPrecision===void 0)hasPrecision=false;defMin=typeof defMin==="undefined"?MIN_NUMBER:defMin;defMax=typeof defMax==="undefined"?MAX_NUMBER:defMax;min=typeof min==="undefined"?defMin:min;max=typeof max==="undefined"?defMax:max;if(max<min)max+=min;var result=getRandom(min,max);if(!hasPrecision)return parseInt(result+"",10);return result}var random={pick:pick,shuffle:shuffle,number:number};var ParseError=
function(_super){tslib_1.__extends(ParseError,_super);function ParseError(message,path){var _this=_super.call(this)||this;_this.path=path;if(Error.captureStackTrace)Error.captureStackTrace(_this,_this.constructor);_this.name="ParseError";_this.message=message;_this.path=path;return _this}return ParseError}(Error);var inferredProperties={array:["additionalItems","items","maxItems","minItems","uniqueItems"],integer:["exclusiveMaximum","exclusiveMinimum","maximum","minimum","multipleOf"],object:["additionalProperties",
"dependencies","maxProperties","minProperties","patternProperties","properties","required"],string:["maxLength","minLength","pattern"]};inferredProperties.number=inferredProperties.integer;var subschemaProperties=["additionalItems","items","additionalProperties","dependencies","patternProperties","properties"];function matchesType(obj,lastElementInPath,inferredTypeProperties){return Object.keys(obj).filter(function(prop){var isSubschema=subschemaProperties.indexOf(lastElementInPath)>-1,inferredPropertyFound=
inferredTypeProperties.indexOf(prop)>-1;if(inferredPropertyFound&&!isSubschema)return true}).length>0}function inferType(obj,schemaPath){for(var typeName in inferredProperties){var lastElementInPath=schemaPath[schemaPath.length-1];if(matchesType(obj,lastElementInPath,inferredProperties[typeName]))return typeName}}function booleanGenerator(){return Math.random()>.5}var booleanType=booleanGenerator;function nullGenerator(){return null}var nullType=nullGenerator;function unique(path,items,value,sample,
resolve,traverseCallback){var tmp=[],seen=[];function walk(obj){var json=JSON.stringify(obj);if(seen.indexOf(json)===-1){seen.push(json);tmp.push(obj)}}items.forEach(walk);var limit=100;while(tmp.length!==items.length){walk(traverseCallback(value.items||sample,path,resolve));if(!limit--)break}return tmp}var arrayType=function arrayType(value,path,resolve,traverseCallback){var items=[];if(!(value.items||value.additionalItems)){if(utils.hasProperties(value,"minItems","maxItems","uniqueItems"))throw new ParseError("missing items for "+
utils.short(value),path);return items}var tmpItems=value.items;if(tmpItems instanceof Array)return Array.prototype.concat.call(items,tmpItems.map(function(item,key){var itemSubpath=path.concat(["items",key+""]);return traverseCallback(item,itemSubpath,resolve)}));var minItems=value.minItems;var maxItems=value.maxItems;if(optionAPI("defaultMinItems")&&minItems===undefined)minItems=!maxItems?optionAPI("defaultMinItems"):Math.min(optionAPI("defaultMinItems"),maxItems);if(optionAPI("maxItems")){if(maxItems&&
maxItems>optionAPI("maxItems"))maxItems=optionAPI("maxItems");if(minItems&&minItems>optionAPI("maxItems"))minItems=maxItems}var length=random.number(minItems,maxItems,1,5),sample=typeof value.additionalItems==="object"?value.additionalItems:{};for(var current=items.length;current<length;current++){var itemSubpath=path.concat(["items",current+""]);var element=traverseCallback(value.items||sample,itemSubpath,resolve);items.push(element)}if(value.uniqueItems)return unique(path.concat(["items"]),items,
value,sample,resolve,traverseCallback);return items};var MIN_INTEGER=-1E8;var MAX_INTEGER=1E8;var numberType=function numberType(value){var min=typeof value.minimum==="undefined"?MIN_INTEGER:value.minimum,max=typeof value.maximum==="undefined"?MAX_INTEGER:value.maximum,multipleOf=value.multipleOf;if(multipleOf){max=Math.floor(max/multipleOf)*multipleOf;min=Math.ceil(min/multipleOf)*multipleOf}if(value.exclusiveMinimum&&value.minimum&&min===value.minimum)min+=multipleOf||1;if(value.exclusiveMaximum&&
value.maximum&&max===value.maximum)max-=multipleOf||1;if(min>max)return NaN;if(multipleOf)return Math.floor(random.number(min,max)/multipleOf)*multipleOf;return random.number(min,max,undefined,undefined,true)};var integerType=function integerType(value){var generated=numberType(value);return generated>0?Math.floor(generated):Math.ceil(generated)};var LIPSUM_WORDS=("Lorem ipsum dolor sit amet consectetur adipisicing elit sed do eiusmod tempor incididunt ut labore"+" et dolore magna aliqua Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea"+
" commodo consequat Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla"+" pariatur Excepteur sint occaecat cupidatat non proident sunt in culpa qui officia deserunt mollit anim id est"+" laborum").split(" ");function wordsGenerator(length){var words=random.shuffle(LIPSUM_WORDS);return words.slice(0,length)}var anyType={type:["string","number","integer","boolean"]};var objectType=function objectType(value,path,resolve,traverseCallback){var props={};var properties=
value.properties||{};var patternProperties=value.patternProperties||{};var requiredProperties=(value.required||[]).slice();var allowsAdditional=value.additionalProperties===false?false:true;var propertyKeys=Object.keys(properties);var patternPropertyKeys=Object.keys(patternProperties);var additionalProperties=allowsAdditional?value.additionalProperties===true?{}:value.additionalProperties:null;if(!allowsAdditional&&propertyKeys.length===0&&patternPropertyKeys.length===0&&utils.hasProperties(value,
"minProperties","maxProperties","dependencies","required"))throw new ParseError("missing properties for:\n"+utils.short(value),path);if(optionAPI("requiredOnly")===true){requiredProperties.forEach(function(key){if(properties[key])props[key]=properties[key]});return traverseCallback(props,path.concat(["properties"]),resolve)}var min=Math.max(value.minProperties||0,requiredProperties.length);var max=Math.max(value.maxProperties||random.number(min,min+5));random.shuffle(patternPropertyKeys.concat(propertyKeys)).forEach(function(_key){if(requiredProperties.indexOf(_key)===
-1)requiredProperties.push(_key)});var _props=optionAPI("alwaysFakeOptionals")?requiredProperties:requiredProperties.slice(0,random.number(min,max));_props.forEach(function(key){if(properties[key])props[key]=properties[key];else{var found;patternPropertyKeys.forEach(function(_key){if(key.match(new RegExp(_key))){found=true;props[utils.randexp(key)]=patternProperties[_key]}});if(!found){var subschema=patternProperties[key]||additionalProperties;if(subschema)props[patternProperties[key]?utils.randexp(key):
key]=subschema}}});var current=Object.keys(props).length;while(true){if(!(patternPropertyKeys.length||allowsAdditional))break;if(current>=min)break;if(allowsAdditional){var word=wordsGenerator(1)+utils.randexp("[a-f\\d]{1,3}");if(!props[word]){props[word]=additionalProperties||anyType;current+=1}}patternPropertyKeys.forEach(function(_key){var word=utils.randexp(_key);if(!props[word]){props[word]=patternProperties[_key];current+=1}})}if(!allowsAdditional&¤t<min)throw new ParseError("properties constraints were too strong to successfully generate a valid object for:\n"+
utils.short(value),path);return traverseCallback(props,path.concat(["properties"]),resolve)};function produce(){var length=random.number(1,5);return wordsGenerator(length).join(" ")}function thunkGenerator(min,max){if(min===void 0)min=0;if(max===void 0)max=140;var min=Math.max(0,min),max=random.number(min,max),result=produce();while(result.length<min)result+=produce();if(result.length>max)result=result.substr(0,max);return result}function ipv4Generator(){return[0,0,0,0].map(function(){return random.number(0,
255)}).join(".")}var MOST_NEAR_DATETIME=2524608E6;function dateTimeGenerator(){var date=new Date;var days=random.number(-1E3,MOST_NEAR_DATETIME);date.setTime(date.getTime()-days);return date.toISOString()}var regexps={email:"[a-zA-Z\\d][a-zA-Z\\d-]{1,13}[a-zA-Z\\d]@{hostname}",hostname:"[a-zA-Z]{1,33}\\.[a-z]{2,4}",ipv6:"[a-f\\d]{4}(:[a-f\\d]{4}){7}",uri:"[a-zA-Z][a-zA-Z0-9+-.]*"};function coreFormatGenerator(coreFormat){return utils.randexp(regexps[coreFormat]).replace(/\{(\w+)\}/,function(match,
key){return utils.randexp(regexps[key])})}function generateFormat(value,invalid){var callback=formatAPI(value.format);if(typeof callback==="function")return callback(value);switch(value.format){case "date-time":return dateTimeGenerator();case "ipv4":return ipv4Generator();case "regex":return".+?";case "email":case "hostname":case "ipv6":case "uri":return coreFormatGenerator(value.format);default:if(typeof callback==="undefined")if(optionAPI("failOnInvalidFormat"))throw new Error("unknown registry key "+
utils.short(value.format));else return invalid();throw new Error('unsupported format "'+value.format+'"');}}var stringType=function stringType(value){var output;var minLength=value.minLength;var maxLength=value.maxLength;if(optionAPI("maxLength")){if(maxLength&&maxLength>optionAPI("maxLength"))maxLength=optionAPI("maxLength");if(minLength&&minLength>optionAPI("maxLength"))minLength=optionAPI("maxLength")}if(value.format)output=generateFormat(value,function(){return thunkGenerator(minLength,maxLength)});
else if(value.pattern)output=utils.randexp(value.pattern);else output=thunkGenerator(minLength,maxLength);while(output.length<minLength)output+=Math.random()>.7?thunkGenerator():utils.randexp(".+");if(output.length>maxLength)output=output.substr(0,maxLength);return output};var typeMap={boolean:booleanType,null:nullType,array:arrayType,integer:integerType,number:numberType,object:objectType,string:stringType};function traverse(schema,path,resolve){schema=resolve(schema);if(!schema)return;if(Array.isArray(schema.enum))return random.pick(schema.enum);
if(typeof schema.thunk==="function")return traverse(schema.thunk(),path,resolve);if(typeof schema.generate==="function")return utils.typecast(schema.generate(),schema);if(optionAPI("useDefaultValue")&&"default"in schema)return schema.default;var type=schema.type;if(Array.isArray(type))type=random.pick(type);else if(typeof type==="undefined")type=inferType(schema,path)||type;if(typeof type==="string")if(!typeMap[type])if(optionAPI("failOnInvalidTypes"))throw new ParseError("unknown primitive "+utils.short(type),
path.concat(["type"]));else return optionAPI("defaultInvalidTypeProduct");else try{return utils.clean(typeMap[type](schema,path,resolve,traverse),null,schema.required)}catch(e){if(typeof e.path==="undefined")throw new ParseError(e.message,path);throw e;}var copy={};if(Array.isArray(schema))copy=[];for(var prop in schema)if(typeof schema[prop]==="object"&&prop!=="definitions")copy[prop]=traverse(schema[prop],path.concat([prop]),resolve);else copy[prop]=schema[prop];return copy}function isKey(prop){return prop===
"enum"||prop==="default"||prop==="required"||prop==="definitions"}function run(refs,schema,container){try{return traverse(schema,[],function reduce(sub,maxReduceDepth){if(typeof maxReduceDepth==="undefined")maxReduceDepth=random.number(1,3);if(!sub)return null;if(sub.id&&typeof sub.id==="string"){delete sub.id;delete sub.$schema}if(typeof sub.$ref==="string"){if(sub.$ref.indexOf("#/")===-1){var ref=deref.util.findByRef(sub.$ref,refs);if(!ref)throw new Error("Reference not found: "+sub.$ref);return ref}delete sub.$ref;
return sub}if(Array.isArray(sub.allOf)){var schemas=sub.allOf;delete sub.allOf;schemas.forEach(function(subSchema){var _sub=reduce(subSchema,maxReduceDepth+1);utils.merge(sub,typeof _sub.thunk==="function"?_sub.thunk():_sub)})}if(Array.isArray(sub.oneOf||sub.anyOf)){var mix=sub.oneOf||sub.anyOf;delete sub.anyOf;delete sub.oneOf;return{thunk:function(){var copy=utils.merge({},sub);utils.merge(copy,random.pick(mix));return copy}}}for(var prop in sub)if((Array.isArray(sub[prop])||typeof sub[prop]===
"object")&&!isKey(prop))sub[prop]=reduce(sub[prop],maxReduceDepth);return container.wrap(sub)})}catch(e){if(e.path)throw new Error(e.message+" in "+"/"+e.path.join("/"));else throw e;}}var container=new Container;function getRefs(refs){var $refs={};if(Array.isArray(refs))refs.map(deref.util.normalizeSchema).forEach(function(schema){$refs[schema.id]=schema});else $refs=refs||{};return $refs}var jsf=function(schema,refs){var $=deref();var $refs=getRefs(refs);return run($refs,$(schema,$refs,true),container)};
jsf.resolve=function(schema,refs,cwd){if(typeof refs==="string"){cwd=refs;refs={}}cwd=cwd||(typeof process!=="undefined"?process.cwd():"");cwd=cwd.replace(/\/+$/,"")+"/";var $refs=getRefs(refs);var fixedRefs={order:300,canRead:true,read:function(file,callback){callback(null,deref.util.findByRef(cwd!=="/"?file.url.replace(cwd,""):file.url,$refs))}};return $RefParser.dereference(cwd,schema,{resolve:{fixedRefs:fixedRefs},dereference:{circular:"ignore"}}).then(function(sub){return jsf(sub,refs)})};jsf.utils=
utils;jsf.format=formatAPI;jsf.option=optionAPI;container.define("pattern",utils.randexp);jsf.extend=function(name,cb){container.extend(name,cb);return jsf};jsf.define=function(name,cb){container.define(name,cb);return jsf};jsf.locate=function(name){return container.get(name)};var VERSION="0.5.0-rc10";jsf.version=VERSION;var index=jsf;return index});