.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / node_modules / table / dist / validateStreamConfig.js
1 'use strict';
2 var equal = require('ajv/lib/compile/equal');
3 var validate = (function() {
4   var pattern0 = new RegExp('^[0-9]+$');
5   var refVal = [];
6   var refVal1 = (function() {
7     var pattern0 = new RegExp('^[0-9]+$');
8     return function validate(data, dataPath, parentData, parentDataProperty, rootData) {
9       'use strict';
10       var vErrors = null;
11       var errors = 0;
12       if (rootData === undefined) rootData = data;
13       if ((data && typeof data === "object" && !Array.isArray(data))) {
14         var errs__0 = errors;
15         var valid1 = true;
16         for (var key0 in data) {
17           var isAdditional0 = !(false || validate.schema.properties[key0]);
18           if (isAdditional0) {
19             valid1 = false;
20             var err = {
21               keyword: 'additionalProperties',
22               dataPath: (dataPath || '') + "",
23               schemaPath: '#/additionalProperties',
24               params: {
25                 additionalProperty: '' + key0 + ''
26               },
27               message: 'should NOT have additional properties'
28             };
29             if (vErrors === null) vErrors = [err];
30             else vErrors.push(err);
31             errors++;
32           }
33         }
34         if (data.topBody !== undefined) {
35           var errs_1 = errors;
36           if (!refVal2(data.topBody, (dataPath || '') + '.topBody', data, 'topBody', rootData)) {
37             if (vErrors === null) vErrors = refVal2.errors;
38             else vErrors = vErrors.concat(refVal2.errors);
39             errors = vErrors.length;
40           }
41           var valid1 = errors === errs_1;
42         }
43         if (data.topJoin !== undefined) {
44           var errs_1 = errors;
45           if (!refVal[2](data.topJoin, (dataPath || '') + '.topJoin', data, 'topJoin', rootData)) {
46             if (vErrors === null) vErrors = refVal[2].errors;
47             else vErrors = vErrors.concat(refVal[2].errors);
48             errors = vErrors.length;
49           }
50           var valid1 = errors === errs_1;
51         }
52         if (data.topLeft !== undefined) {
53           var errs_1 = errors;
54           if (!refVal[2](data.topLeft, (dataPath || '') + '.topLeft', data, 'topLeft', rootData)) {
55             if (vErrors === null) vErrors = refVal[2].errors;
56             else vErrors = vErrors.concat(refVal[2].errors);
57             errors = vErrors.length;
58           }
59           var valid1 = errors === errs_1;
60         }
61         if (data.topRight !== undefined) {
62           var errs_1 = errors;
63           if (!refVal[2](data.topRight, (dataPath || '') + '.topRight', data, 'topRight', rootData)) {
64             if (vErrors === null) vErrors = refVal[2].errors;
65             else vErrors = vErrors.concat(refVal[2].errors);
66             errors = vErrors.length;
67           }
68           var valid1 = errors === errs_1;
69         }
70         if (data.bottomBody !== undefined) {
71           var errs_1 = errors;
72           if (!refVal[2](data.bottomBody, (dataPath || '') + '.bottomBody', data, 'bottomBody', rootData)) {
73             if (vErrors === null) vErrors = refVal[2].errors;
74             else vErrors = vErrors.concat(refVal[2].errors);
75             errors = vErrors.length;
76           }
77           var valid1 = errors === errs_1;
78         }
79         if (data.bottomJoin !== undefined) {
80           var errs_1 = errors;
81           if (!refVal[2](data.bottomJoin, (dataPath || '') + '.bottomJoin', data, 'bottomJoin', rootData)) {
82             if (vErrors === null) vErrors = refVal[2].errors;
83             else vErrors = vErrors.concat(refVal[2].errors);
84             errors = vErrors.length;
85           }
86           var valid1 = errors === errs_1;
87         }
88         if (data.bottomLeft !== undefined) {
89           var errs_1 = errors;
90           if (!refVal[2](data.bottomLeft, (dataPath || '') + '.bottomLeft', data, 'bottomLeft', rootData)) {
91             if (vErrors === null) vErrors = refVal[2].errors;
92             else vErrors = vErrors.concat(refVal[2].errors);
93             errors = vErrors.length;
94           }
95           var valid1 = errors === errs_1;
96         }
97         if (data.bottomRight !== undefined) {
98           var errs_1 = errors;
99           if (!refVal[2](data.bottomRight, (dataPath || '') + '.bottomRight', data, 'bottomRight', rootData)) {
100             if (vErrors === null) vErrors = refVal[2].errors;
101             else vErrors = vErrors.concat(refVal[2].errors);
102             errors = vErrors.length;
103           }
104           var valid1 = errors === errs_1;
105         }
106         if (data.bodyLeft !== undefined) {
107           var errs_1 = errors;
108           if (!refVal[2](data.bodyLeft, (dataPath || '') + '.bodyLeft', data, 'bodyLeft', rootData)) {
109             if (vErrors === null) vErrors = refVal[2].errors;
110             else vErrors = vErrors.concat(refVal[2].errors);
111             errors = vErrors.length;
112           }
113           var valid1 = errors === errs_1;
114         }
115         if (data.bodyRight !== undefined) {
116           var errs_1 = errors;
117           if (!refVal[2](data.bodyRight, (dataPath || '') + '.bodyRight', data, 'bodyRight', rootData)) {
118             if (vErrors === null) vErrors = refVal[2].errors;
119             else vErrors = vErrors.concat(refVal[2].errors);
120             errors = vErrors.length;
121           }
122           var valid1 = errors === errs_1;
123         }
124         if (data.bodyJoin !== undefined) {
125           var errs_1 = errors;
126           if (!refVal[2](data.bodyJoin, (dataPath || '') + '.bodyJoin', data, 'bodyJoin', rootData)) {
127             if (vErrors === null) vErrors = refVal[2].errors;
128             else vErrors = vErrors.concat(refVal[2].errors);
129             errors = vErrors.length;
130           }
131           var valid1 = errors === errs_1;
132         }
133         if (data.joinBody !== undefined) {
134           var errs_1 = errors;
135           if (!refVal[2](data.joinBody, (dataPath || '') + '.joinBody', data, 'joinBody', rootData)) {
136             if (vErrors === null) vErrors = refVal[2].errors;
137             else vErrors = vErrors.concat(refVal[2].errors);
138             errors = vErrors.length;
139           }
140           var valid1 = errors === errs_1;
141         }
142         if (data.joinLeft !== undefined) {
143           var errs_1 = errors;
144           if (!refVal[2](data.joinLeft, (dataPath || '') + '.joinLeft', data, 'joinLeft', rootData)) {
145             if (vErrors === null) vErrors = refVal[2].errors;
146             else vErrors = vErrors.concat(refVal[2].errors);
147             errors = vErrors.length;
148           }
149           var valid1 = errors === errs_1;
150         }
151         if (data.joinRight !== undefined) {
152           var errs_1 = errors;
153           if (!refVal[2](data.joinRight, (dataPath || '') + '.joinRight', data, 'joinRight', rootData)) {
154             if (vErrors === null) vErrors = refVal[2].errors;
155             else vErrors = vErrors.concat(refVal[2].errors);
156             errors = vErrors.length;
157           }
158           var valid1 = errors === errs_1;
159         }
160         if (data.joinJoin !== undefined) {
161           var errs_1 = errors;
162           if (!refVal[2](data.joinJoin, (dataPath || '') + '.joinJoin', data, 'joinJoin', rootData)) {
163             if (vErrors === null) vErrors = refVal[2].errors;
164             else vErrors = vErrors.concat(refVal[2].errors);
165             errors = vErrors.length;
166           }
167           var valid1 = errors === errs_1;
168         }
169       } else {
170         var err = {
171           keyword: 'type',
172           dataPath: (dataPath || '') + "",
173           schemaPath: '#/type',
174           params: {
175             type: 'object'
176           },
177           message: 'should be object'
178         };
179         if (vErrors === null) vErrors = [err];
180         else vErrors.push(err);
181         errors++;
182       }
183       validate.errors = vErrors;
184       return errors === 0;
185     };
186   })();
187   refVal1.schema = {
188     "type": "object",
189     "properties": {
190       "topBody": {
191         "$ref": "#/definitions/border"
192       },
193       "topJoin": {
194         "$ref": "#/definitions/border"
195       },
196       "topLeft": {
197         "$ref": "#/definitions/border"
198       },
199       "topRight": {
200         "$ref": "#/definitions/border"
201       },
202       "bottomBody": {
203         "$ref": "#/definitions/border"
204       },
205       "bottomJoin": {
206         "$ref": "#/definitions/border"
207       },
208       "bottomLeft": {
209         "$ref": "#/definitions/border"
210       },
211       "bottomRight": {
212         "$ref": "#/definitions/border"
213       },
214       "bodyLeft": {
215         "$ref": "#/definitions/border"
216       },
217       "bodyRight": {
218         "$ref": "#/definitions/border"
219       },
220       "bodyJoin": {
221         "$ref": "#/definitions/border"
222       },
223       "joinBody": {
224         "$ref": "#/definitions/border"
225       },
226       "joinLeft": {
227         "$ref": "#/definitions/border"
228       },
229       "joinRight": {
230         "$ref": "#/definitions/border"
231       },
232       "joinJoin": {
233         "$ref": "#/definitions/border"
234       }
235     },
236     "additionalProperties": false
237   };
238   refVal1.errors = null;
239   refVal[1] = refVal1;
240   var refVal2 = (function() {
241     var pattern0 = new RegExp('^[0-9]+$');
242     return function validate(data, dataPath, parentData, parentDataProperty, rootData) {
243       'use strict';
244       var vErrors = null;
245       var errors = 0;
246       if (typeof data !== "string") {
247         var err = {
248           keyword: 'type',
249           dataPath: (dataPath || '') + "",
250           schemaPath: '#/type',
251           params: {
252             type: 'string'
253           },
254           message: 'should be string'
255         };
256         if (vErrors === null) vErrors = [err];
257         else vErrors.push(err);
258         errors++;
259       }
260       validate.errors = vErrors;
261       return errors === 0;
262     };
263   })();
264   refVal2.schema = {
265     "type": "string"
266   };
267   refVal2.errors = null;
268   refVal[2] = refVal2;
269   var refVal3 = (function() {
270     var pattern0 = new RegExp('^[0-9]+$');
271     return function validate(data, dataPath, parentData, parentDataProperty, rootData) {
272       'use strict';
273       var vErrors = null;
274       var errors = 0;
275       if (rootData === undefined) rootData = data;
276       if ((data && typeof data === "object" && !Array.isArray(data))) {
277         var errs__0 = errors;
278         var valid1 = true;
279         for (var key0 in data) {
280           var isAdditional0 = !(false || pattern0.test(key0));
281           if (isAdditional0) {
282             valid1 = false;
283             var err = {
284               keyword: 'additionalProperties',
285               dataPath: (dataPath || '') + "",
286               schemaPath: '#/additionalProperties',
287               params: {
288                 additionalProperty: '' + key0 + ''
289               },
290               message: 'should NOT have additional properties'
291             };
292             if (vErrors === null) vErrors = [err];
293             else vErrors.push(err);
294             errors++;
295           }
296         }
297         for (var key0 in data) {
298           if (pattern0.test(key0)) {
299             var errs_1 = errors;
300             if (!refVal4(data[key0], (dataPath || '') + '[\'' + key0 + '\']', data, key0, rootData)) {
301               if (vErrors === null) vErrors = refVal4.errors;
302               else vErrors = vErrors.concat(refVal4.errors);
303               errors = vErrors.length;
304             }
305             var valid1 = errors === errs_1;
306           }
307         }
308       } else {
309         var err = {
310           keyword: 'type',
311           dataPath: (dataPath || '') + "",
312           schemaPath: '#/type',
313           params: {
314             type: 'object'
315           },
316           message: 'should be object'
317         };
318         if (vErrors === null) vErrors = [err];
319         else vErrors.push(err);
320         errors++;
321       }
322       validate.errors = vErrors;
323       return errors === 0;
324     };
325   })();
326   refVal3.schema = {
327     "type": "object",
328     "patternProperties": {
329       "^[0-9]+$": {
330         "$ref": "#/definitions/column"
331       }
332     },
333     "additionalProperties": false
334   };
335   refVal3.errors = null;
336   refVal[3] = refVal3;
337   var refVal4 = (function() {
338     var pattern0 = new RegExp('^[0-9]+$');
339     return function validate(data, dataPath, parentData, parentDataProperty, rootData) {
340       'use strict';
341       var vErrors = null;
342       var errors = 0;
343       if ((data && typeof data === "object" && !Array.isArray(data))) {
344         var errs__0 = errors;
345         var valid1 = true;
346         for (var key0 in data) {
347           var isAdditional0 = !(false || validate.schema.properties[key0]);
348           if (isAdditional0) {
349             valid1 = false;
350             var err = {
351               keyword: 'additionalProperties',
352               dataPath: (dataPath || '') + "",
353               schemaPath: '#/additionalProperties',
354               params: {
355                 additionalProperty: '' + key0 + ''
356               },
357               message: 'should NOT have additional properties'
358             };
359             if (vErrors === null) vErrors = [err];
360             else vErrors.push(err);
361             errors++;
362           }
363         }
364         var data1 = data.alignment;
365         if (data1 !== undefined) {
366           var errs_1 = errors;
367           if (typeof data1 !== "string") {
368             var err = {
369               keyword: 'type',
370               dataPath: (dataPath || '') + '.alignment',
371               schemaPath: '#/properties/alignment/type',
372               params: {
373                 type: 'string'
374               },
375               message: 'should be string'
376             };
377             if (vErrors === null) vErrors = [err];
378             else vErrors.push(err);
379             errors++;
380           }
381           var schema1 = validate.schema.properties.alignment.enum;
382           var valid1;
383           valid1 = false;
384           for (var i1 = 0; i1 < schema1.length; i1++)
385             if (equal(data1, schema1[i1])) {
386               valid1 = true;
387               break;
388             }
389           if (!valid1) {
390             var err = {
391               keyword: 'enum',
392               dataPath: (dataPath || '') + '.alignment',
393               schemaPath: '#/properties/alignment/enum',
394               params: {
395                 allowedValues: schema1
396               },
397               message: 'should be equal to one of the allowed values'
398             };
399             if (vErrors === null) vErrors = [err];
400             else vErrors.push(err);
401             errors++;
402           }
403           var valid1 = errors === errs_1;
404         }
405         if (data.width !== undefined) {
406           var errs_1 = errors;
407           if (typeof data.width !== "number") {
408             var err = {
409               keyword: 'type',
410               dataPath: (dataPath || '') + '.width',
411               schemaPath: '#/properties/width/type',
412               params: {
413                 type: 'number'
414               },
415               message: 'should be number'
416             };
417             if (vErrors === null) vErrors = [err];
418             else vErrors.push(err);
419             errors++;
420           }
421           var valid1 = errors === errs_1;
422         }
423         if (data.wrapWord !== undefined) {
424           var errs_1 = errors;
425           if (typeof data.wrapWord !== "boolean") {
426             var err = {
427               keyword: 'type',
428               dataPath: (dataPath || '') + '.wrapWord',
429               schemaPath: '#/properties/wrapWord/type',
430               params: {
431                 type: 'boolean'
432               },
433               message: 'should be boolean'
434             };
435             if (vErrors === null) vErrors = [err];
436             else vErrors.push(err);
437             errors++;
438           }
439           var valid1 = errors === errs_1;
440         }
441         if (data.truncate !== undefined) {
442           var errs_1 = errors;
443           if (typeof data.truncate !== "number") {
444             var err = {
445               keyword: 'type',
446               dataPath: (dataPath || '') + '.truncate',
447               schemaPath: '#/properties/truncate/type',
448               params: {
449                 type: 'number'
450               },
451               message: 'should be number'
452             };
453             if (vErrors === null) vErrors = [err];
454             else vErrors.push(err);
455             errors++;
456           }
457           var valid1 = errors === errs_1;
458         }
459         if (data.paddingLeft !== undefined) {
460           var errs_1 = errors;
461           if (typeof data.paddingLeft !== "number") {
462             var err = {
463               keyword: 'type',
464               dataPath: (dataPath || '') + '.paddingLeft',
465               schemaPath: '#/properties/paddingLeft/type',
466               params: {
467                 type: 'number'
468               },
469               message: 'should be number'
470             };
471             if (vErrors === null) vErrors = [err];
472             else vErrors.push(err);
473             errors++;
474           }
475           var valid1 = errors === errs_1;
476         }
477         if (data.paddingRight !== undefined) {
478           var errs_1 = errors;
479           if (typeof data.paddingRight !== "number") {
480             var err = {
481               keyword: 'type',
482               dataPath: (dataPath || '') + '.paddingRight',
483               schemaPath: '#/properties/paddingRight/type',
484               params: {
485                 type: 'number'
486               },
487               message: 'should be number'
488             };
489             if (vErrors === null) vErrors = [err];
490             else vErrors.push(err);
491             errors++;
492           }
493           var valid1 = errors === errs_1;
494         }
495       } else {
496         var err = {
497           keyword: 'type',
498           dataPath: (dataPath || '') + "",
499           schemaPath: '#/type',
500           params: {
501             type: 'object'
502           },
503           message: 'should be object'
504         };
505         if (vErrors === null) vErrors = [err];
506         else vErrors.push(err);
507         errors++;
508       }
509       validate.errors = vErrors;
510       return errors === 0;
511     };
512   })();
513   refVal4.schema = {
514     "type": "object",
515     "properties": {
516       "alignment": {
517         "type": "string",
518         "enum": ["left", "right", "center"]
519       },
520       "width": {
521         "type": "number"
522       },
523       "wrapWord": {
524         "type": "boolean"
525       },
526       "truncate": {
527         "type": "number"
528       },
529       "paddingLeft": {
530         "type": "number"
531       },
532       "paddingRight": {
533         "type": "number"
534       }
535     },
536     "additionalProperties": false
537   };
538   refVal4.errors = null;
539   refVal[4] = refVal4;
540   return function validate(data, dataPath, parentData, parentDataProperty, rootData) {
541     'use strict'; /*# sourceURL=streamConfig.json */
542     var vErrors = null;
543     var errors = 0;
544     if (rootData === undefined) rootData = data;
545     if ((data && typeof data === "object" && !Array.isArray(data))) {
546       var errs__0 = errors;
547       var valid1 = true;
548       for (var key0 in data) {
549         var isAdditional0 = !(false || key0 == 'border' || key0 == 'columns' || key0 == 'columnDefault' || key0 == 'columnCount');
550         if (isAdditional0) {
551           valid1 = false;
552           var err = {
553             keyword: 'additionalProperties',
554             dataPath: (dataPath || '') + "",
555             schemaPath: '#/additionalProperties',
556             params: {
557               additionalProperty: '' + key0 + ''
558             },
559             message: 'should NOT have additional properties'
560           };
561           if (vErrors === null) vErrors = [err];
562           else vErrors.push(err);
563           errors++;
564         }
565       }
566       if (data.border !== undefined) {
567         var errs_1 = errors;
568         if (!refVal1(data.border, (dataPath || '') + '.border', data, 'border', rootData)) {
569           if (vErrors === null) vErrors = refVal1.errors;
570           else vErrors = vErrors.concat(refVal1.errors);
571           errors = vErrors.length;
572         }
573         var valid1 = errors === errs_1;
574       }
575       if (data.columns !== undefined) {
576         var errs_1 = errors;
577         if (!refVal3(data.columns, (dataPath || '') + '.columns', data, 'columns', rootData)) {
578           if (vErrors === null) vErrors = refVal3.errors;
579           else vErrors = vErrors.concat(refVal3.errors);
580           errors = vErrors.length;
581         }
582         var valid1 = errors === errs_1;
583       }
584       if (data.columnDefault !== undefined) {
585         var errs_1 = errors;
586         if (!refVal[4](data.columnDefault, (dataPath || '') + '.columnDefault', data, 'columnDefault', rootData)) {
587           if (vErrors === null) vErrors = refVal[4].errors;
588           else vErrors = vErrors.concat(refVal[4].errors);
589           errors = vErrors.length;
590         }
591         var valid1 = errors === errs_1;
592       }
593       if (data.columnCount !== undefined) {
594         var errs_1 = errors;
595         if (typeof data.columnCount !== "number") {
596           var err = {
597             keyword: 'type',
598             dataPath: (dataPath || '') + '.columnCount',
599             schemaPath: '#/properties/columnCount/type',
600             params: {
601               type: 'number'
602             },
603             message: 'should be number'
604           };
605           if (vErrors === null) vErrors = [err];
606           else vErrors.push(err);
607           errors++;
608         }
609         var valid1 = errors === errs_1;
610       }
611     } else {
612       var err = {
613         keyword: 'type',
614         dataPath: (dataPath || '') + "",
615         schemaPath: '#/type',
616         params: {
617           type: 'object'
618         },
619         message: 'should be object'
620       };
621       if (vErrors === null) vErrors = [err];
622       else vErrors.push(err);
623       errors++;
624     }
625     validate.errors = vErrors;
626     return errors === 0;
627   };
628 })();
629 validate.schema = {
630   "$id": "streamConfig.json",
631   "$schema": "http://json-schema.org/draft-06/schema#",
632   "type": "object",
633   "properties": {
634     "border": {
635       "$ref": "#/definitions/borders"
636     },
637     "columns": {
638       "$ref": "#/definitions/columns"
639     },
640     "columnDefault": {
641       "$ref": "#/definitions/column"
642     },
643     "columnCount": {
644       "type": "number"
645     }
646   },
647   "additionalProperties": false,
648   "definitions": {
649     "columns": {
650       "type": "object",
651       "patternProperties": {
652         "^[0-9]+$": {
653           "$ref": "#/definitions/column"
654         }
655       },
656       "additionalProperties": false
657     },
658     "column": {
659       "type": "object",
660       "properties": {
661         "alignment": {
662           "type": "string",
663           "enum": ["left", "right", "center"]
664         },
665         "width": {
666           "type": "number"
667         },
668         "wrapWord": {
669           "type": "boolean"
670         },
671         "truncate": {
672           "type": "number"
673         },
674         "paddingLeft": {
675           "type": "number"
676         },
677         "paddingRight": {
678           "type": "number"
679         }
680       },
681       "additionalProperties": false
682     },
683     "borders": {
684       "type": "object",
685       "properties": {
686         "topBody": {
687           "$ref": "#/definitions/border"
688         },
689         "topJoin": {
690           "$ref": "#/definitions/border"
691         },
692         "topLeft": {
693           "$ref": "#/definitions/border"
694         },
695         "topRight": {
696           "$ref": "#/definitions/border"
697         },
698         "bottomBody": {
699           "$ref": "#/definitions/border"
700         },
701         "bottomJoin": {
702           "$ref": "#/definitions/border"
703         },
704         "bottomLeft": {
705           "$ref": "#/definitions/border"
706         },
707         "bottomRight": {
708           "$ref": "#/definitions/border"
709         },
710         "bodyLeft": {
711           "$ref": "#/definitions/border"
712         },
713         "bodyRight": {
714           "$ref": "#/definitions/border"
715         },
716         "bodyJoin": {
717           "$ref": "#/definitions/border"
718         },
719         "joinBody": {
720           "$ref": "#/definitions/border"
721         },
722         "joinLeft": {
723           "$ref": "#/definitions/border"
724         },
725         "joinRight": {
726           "$ref": "#/definitions/border"
727         },
728         "joinJoin": {
729           "$ref": "#/definitions/border"
730         }
731       },
732       "additionalProperties": false
733     },
734     "border": {
735       "type": "string"
736     }
737   }
738 };
739 validate.errors = null;
740 module.exports = validate;