UNPKG

json-schema-library

Version:

Customizable and hackable json-validator and json-schema utilities for traversal, data generation and validation

1 lines 136 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("jlib",[],t):"object"==typeof exports?exports.jlib=t():e.jlib=t()}("undefined"!=typeof self?self:this,(()=>(()=>{var e={546:function(e){"undefined"!=typeof self&&self,e.exports=(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(e){return"#"===e||""===e||Array.isArray(e)&&0===e.length||!1}e.r(t),e.d(t,{default:()=>O,get:()=>c,isRoot:()=>r,join:()=>I,remove:()=>$,removeUndefinedItems:()=>y,set:()=>p,split:()=>l,splitLast:()=>P});const n=/~1/g,a=/~0/g,o=/(^#?\/?)/g;function i(e){return e.replace(n,"/").replace(a,"~")}function s(e){return i(decodeURIComponent(e))}function l(e){if(null==e||"string"!=typeof e||r(e))return Array.isArray(e)?e:[];const t=e.indexOf("#")>=0?s:i,n=(e=e.replace(o,"")).split("/");for(let e=0,r=n.length;e<r;e+=1)n[e]=t(n[e]);return n}function c(e,t,n=void 0){if(null==t||null==e)return n;if(r(t))return e;const a=d(e,l(t));return void 0===a?n:a}function d(e,t){const r=t.shift();if(void 0!==e)return void 0!==r?d(e[r],t):e}const u=/^\[.*\]$/,m=/^[[{](.+)[\]}]$/;function f(e,t){return"__proto__"===e||"constructor"==e&&t.length>0&&"prototype"==t[0]}function p(e,t,r){if(null==t)return e;const n=l(t);if(0===n.length)return e;null==e&&(e=u.test(n[0])?[]:{});let a,o,i=e;for(;n.length>1;)a=n.shift(),o=u.test(n[0])||`${parseInt(n[0])}`===n[0],f(a,n)||(i=v(i,a,o));return a=n.pop(),h(i,a,r),e}function h(e,t,r){var n,a;const o=null!==(a=null===(n=t.match(m))||void 0===n?void 0:n.pop())&&void 0!==a?a:t;"[]"===t&&Array.isArray(e)?e.push(r):e[o]=r}function v(e,t,r){var n,a;const o=null!==(a=null===(n=t.match(m))||void 0===n?void 0:n.pop())&&void 0!==a?a:t;if(null!=e[o])return e[o];const i=r?[]:{};return h(e,t,i),i}function y(e){let t=0,r=0;for(;t+r<e.length;)void 0===e[t+r]&&(r+=1),e[t]=e[t+r],t+=1;return e.length=e.length-r,e}function $(e,t,r){const n=l(t),a=n.pop(),o=c(e,n);return o&&delete o[a],Array.isArray(o)&&!0!==r&&y(o),e}const g=/~/g,b=/\//g;function x(e,t){if(0===e.length)return t?"#":"";for(let r=0,n=e.length;r<n;r+=1)e[r]=e[r].replace(g,"~0").replace(b,"~1"),t&&(e[r]=encodeURIComponent(e[r]));return(t?"#/":"/")+e.join("/")}function I(e,...t){const r=[];if(Array.isArray(e))return x(e,!0===arguments[1]);const n=arguments[arguments.length-1],a="boolean"==typeof n?n:e&&"#"===e[0];for(let e=0,t=arguments.length;e<t;e+=1)r.push.apply(r,l(arguments[e]));const o=[];for(let e=0,t=r.length;e<t;e+=1)if(".."===r[e]){if(0===o.length)return a?"#":"";o.pop()}else o.push(r[e]);return x(o,a)}function P(e){const t=l(e);if(0===t.length)return"string"==typeof e&&"#"===e[0]?["#",t[0]]:["",void 0];if(1===t.length)return"#"===e[0]?["#",t[0]]:["",t[0]];const r=t.pop();return[I(t,"#"===e[0]),r]}const O={get:c,set:p,remove:$,join:I,split:l,splitLast:P,isRoot:r,removeUndefinedItems:y};return t})()},17:e=>{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,a,o;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(a=n;0!=a--;)if(!e(t[a],r[a]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(a=n;0!=a--;)if(!Object.prototype.hasOwnProperty.call(r,o[a]))return!1;for(a=n;0!=a--;){var i=o[a];if(!e(t[i],r[i]))return!1}return!0}return t!=t&&r!=r}},515:function(e){var t,r;t=this,r=function(){function e(t,r,n){return this.id=++e.highestId,this.name=t,this.symbols=r,this.postprocess=n,this}function t(e,t,r,n){this.rule=e,this.dot=t,this.reference=r,this.data=[],this.wantedBy=n,this.isComplete=this.dot===e.symbols.length}function r(e,t){this.grammar=e,this.index=t,this.states=[],this.wants={},this.scannable=[],this.completed={}}function n(e,t){this.rules=e,this.start=t||this.rules[0].name;var r=this.byName={};this.rules.forEach((function(e){r.hasOwnProperty(e.name)||(r[e.name]=[]),r[e.name].push(e)}))}function a(){this.reset("")}function o(e,t,o){if(e instanceof n){var i=e;o=t}else i=n.fromCompiled(e,t);for(var s in this.grammar=i,this.options={keepHistory:!1,lexer:i.lexer||new a},o||{})this.options[s]=o[s];this.lexer=this.options.lexer,this.lexerState=void 0;var l=new r(i,0);this.table=[l],l.wants[i.start]=[],l.predict(i.start),l.process(),this.current=0}function i(e){var t=typeof e;if("string"===t)return e;if("object"===t){if(e.literal)return JSON.stringify(e.literal);if(e instanceof RegExp)return e.toString();if(e.type)return"%"+e.type;if(e.test)return"<"+String(e.test)+">";throw new Error("Unknown symbol type: "+e)}}return e.highestId=0,e.prototype.toString=function(e){var t=void 0===e?this.symbols.map(i).join(" "):this.symbols.slice(0,e).map(i).join(" ")+" ● "+this.symbols.slice(e).map(i).join(" ");return this.name+" → "+t},t.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},t.prototype.nextState=function(e){var r=new t(this.rule,this.dot+1,this.reference,this.wantedBy);return r.left=this,r.right=e,r.isComplete&&(r.data=r.build(),r.right=void 0),r},t.prototype.build=function(){var e=[],t=this;do{e.push(t.right.data),t=t.left}while(t.left);return e.reverse(),e},t.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,o.fail))},r.prototype.process=function(e){for(var t=this.states,r=this.wants,n=this.completed,a=0;a<t.length;a++){var i=t[a];if(i.isComplete){if(i.finish(),i.data!==o.fail){for(var s=i.wantedBy,l=s.length;l--;){var c=s[l];this.complete(c,i)}if(i.reference===this.index){var d=i.rule.name;(this.completed[d]=this.completed[d]||[]).push(i)}}}else{if("string"!=typeof(d=i.rule.symbols[i.dot])){this.scannable.push(i);continue}if(r[d]){if(r[d].push(i),n.hasOwnProperty(d)){var u=n[d];for(l=0;l<u.length;l++){var m=u[l];this.complete(i,m)}}}else r[d]=[i],this.predict(d)}}},r.prototype.predict=function(e){for(var r=this.grammar.byName[e]||[],n=0;n<r.length;n++){var a=r[n],o=this.wants[e],i=new t(a,0,this.index,o);this.states.push(i)}},r.prototype.complete=function(e,t){var r=e.nextState(t);this.states.push(r)},n.fromCompiled=function(t,r){var a=t.Lexer;t.ParserStart&&(r=t.ParserStart,t=t.ParserRules);var o=new n(t=t.map((function(t){return new e(t.name,t.symbols,t.postprocess)})),r);return o.lexer=a,o},a.prototype.reset=function(e,t){this.buffer=e,this.index=0,this.line=t?t.line:1,this.lastLineBreak=t?-t.col:0},a.prototype.next=function(){if(this.index<this.buffer.length){var e=this.buffer[this.index++];return"\n"===e&&(this.line+=1,this.lastLineBreak=this.index),{value:e}}},a.prototype.save=function(){return{line:this.line,col:this.index-this.lastLineBreak}},a.prototype.formatError=function(e,t){var r=this.buffer;if("string"==typeof r){var n=r.split("\n").slice(Math.max(0,this.line-5),this.line),a=r.indexOf("\n",this.index);-1===a&&(a=r.length);var o=this.index-this.lastLineBreak,i=String(this.line).length;return t+=" at line "+this.line+" col "+o+":\n\n",t+=n.map((function(e,t){return s(this.line-n.length+t+1,i)+" "+e}),this).join("\n"),t+="\n"+s("",i+o)+"^\n"}return t+" at index "+(this.index-1);function s(e,t){var r=String(e);return Array(t-r.length+1).join(" ")+r}},o.fail={},o.prototype.feed=function(e){var t,n=this.lexer;for(n.reset(e,this.lexerState);;){try{if(!(t=n.next()))break}catch(e){var o=new r(this.grammar,this.current+1);throw this.table.push(o),(l=new Error(this.reportLexerError(e))).offset=this.current,l.token=e.token,l}var i=this.table[this.current];this.options.keepHistory||delete this.table[this.current-1];var s=this.current+1;o=new r(this.grammar,s),this.table.push(o);for(var l,c=void 0!==t.text?t.text:t.value,d=n.constructor===a?t.value:t,u=i.scannable,m=u.length;m--;){var f=u[m],p=f.rule.symbols[f.dot];if(p.test?p.test(d):p.type?p.type===t.type:p.literal===c){var h=f.nextState({data:d,token:t,isToken:!0,reference:s-1});o.states.push(h)}}if(o.process(),0===o.states.length)throw(l=new Error(this.reportError(t))).offset=this.current,l.token=t,l;this.options.keepHistory&&(i.lexerState=n.save()),this.current++}return i&&(this.lexerState=n.save()),this.results=this.finish(),this},o.prototype.reportLexerError=function(e){var t,r,n=e.token;return n?(t="input "+JSON.stringify(n.text[0])+" (lexer error)",r=this.lexer.formatError(n,"Syntax error")):(t="input (lexer error)",r=e.message),this.reportErrorCommon(r,t)},o.prototype.reportError=function(e){var t=(e.type?e.type+" token: ":"")+JSON.stringify(void 0!==e.value?e.value:e),r=this.lexer.formatError(e,"Syntax error");return this.reportErrorCommon(r,t)},o.prototype.reportErrorCommon=function(e,t){var r=[];r.push(e);var n=this.table.length-2,a=this.table[n],o=a.states.filter((function(e){var t=e.rule.symbols[e.dot];return t&&"string"!=typeof t}));return 0===o.length?(r.push("Unexpected "+t+". I did not expect any more input. Here is the state of my parse table:\n"),this.displayStateStack(a.states,r)):(r.push("Unexpected "+t+". Instead, I was expecting to see one of the following:\n"),o.map((function(e){return this.buildFirstStateStack(e,[])||[e]}),this).forEach((function(e){var t=e[0],n=t.rule.symbols[t.dot],a=this.getSymbolDisplay(n);r.push("A "+a+" based on:"),this.displayStateStack(e,r)}),this)),r.push(""),r.join("\n")},o.prototype.displayStateStack=function(e,t){for(var r,n=0,a=0;a<e.length;a++){var o=e[a],i=o.rule.toString(o.dot);i===r?n++:(n>0&&t.push(" ^ "+n+" more lines identical to this"),n=0,t.push(" "+i)),r=i}},o.prototype.getSymbolDisplay=function(e){return function(e){var t=typeof e;if("string"===t)return e;if("object"===t){if(e.literal)return JSON.stringify(e.literal);if(e instanceof RegExp)return"character matching "+e;if(e.type)return e.type+" token";if(e.test)return"token matching "+String(e.test);throw new Error("Unknown symbol type: "+e)}}(e)},o.prototype.buildFirstStateStack=function(e,t){if(-1!==t.indexOf(e))return null;if(0===e.wantedBy.length)return[e];var r=e.wantedBy[0],n=[e].concat(t),a=this.buildFirstStateStack(r,n);return null===a?null:[e].concat(a)},o.prototype.save=function(){var e=this.table[this.current];return e.lexerState=this.lexerState,e},o.prototype.restore=function(e){var t=e.index;this.current=t,this.table[t]=e,this.table.splice(t+1),this.lexerState=e.lexerState,this.results=this.finish()},o.prototype.rewind=function(e){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[e])},o.prototype.finish=function(){var e=[],t=this.grammar.start;return this.table[this.table.length-1].states.forEach((function(r){r.rule.name===t&&r.dot===r.rule.symbols.length&&0===r.reference&&r.data!==o.fail&&e.push(r)})),e.map((function(e){return e.data}))},{Parser:o,Grammar:n,Rule:e}},e.exports?e.exports=r():t.nearley=r()},84:(e,t)=>{"use strict";function r(e){return e[0]}Object.defineProperty(t,"__esModule",{value:!0});const n=e=>[].concat(...e.map((e=>Array.isArray(e)?n(e):e)));function a(e){return e?Array.isArray(e)?n(e).join(""):e:""}const o={Lexer:void 0,ParserRules:[{name:"Reverse_path",symbols:["Path"]},{name:"Reverse_path$string$1",symbols:[{literal:"<"},{literal:">"}],postprocess:e=>e.join("")},{name:"Reverse_path",symbols:["Reverse_path$string$1"]},{name:"Forward_path$subexpression$1$subexpression$1",symbols:[{literal:"<"},/[pP]/,/[oO]/,/[sS]/,/[tT]/,/[mM]/,/[aA]/,/[sS]/,/[tT]/,/[eE]/,/[rR]/,{literal:"@"}],postprocess:function(e){return e.join("")}},{name:"Forward_path$subexpression$1",symbols:["Forward_path$subexpression$1$subexpression$1","Domain",{literal:">"}]},{name:"Forward_path",symbols:["Forward_path$subexpression$1"]},{name:"Forward_path$subexpression$2",symbols:[{literal:"<"},/[pP]/,/[oO]/,/[sS]/,/[tT]/,/[mM]/,/[aA]/,/[sS]/,/[tT]/,/[eE]/,/[rR]/,{literal:">"}],postprocess:function(e){return e.join("")}},{name:"Forward_path",symbols:["Forward_path$subexpression$2"]},{name:"Forward_path",symbols:["Path"]},{name:"Path$ebnf$1$subexpression$1",symbols:["A_d_l",{literal:":"}]},{name:"Path$ebnf$1",symbols:["Path$ebnf$1$subexpression$1"],postprocess:r},{name:"Path$ebnf$1",symbols:[],postprocess:()=>null},{name:"Path",symbols:[{literal:"<"},"Path$ebnf$1","Mailbox",{literal:">"}]},{name:"A_d_l$ebnf$1",symbols:[]},{name:"A_d_l$ebnf$1$subexpression$1",symbols:[{literal:","},"At_domain"]},{name:"A_d_l$ebnf$1",symbols:["A_d_l$ebnf$1","A_d_l$ebnf$1$subexpression$1"],postprocess:e=>e[0].concat([e[1]])},{name:"A_d_l",symbols:["At_domain","A_d_l$ebnf$1"]},{name:"At_domain",symbols:[{literal:"@"},"Domain"]},{name:"Domain$ebnf$1",symbols:[]},{name:"Domain$ebnf$1$subexpression$1",symbols:[{literal:"."},"sub_domain"]},{name:"Domain$ebnf$1",symbols:["Domain$ebnf$1","Domain$ebnf$1$subexpression$1"],postprocess:e=>e[0].concat([e[1]])},{name:"Domain",symbols:["sub_domain","Domain$ebnf$1"]},{name:"sub_domain",symbols:["U_label"]},{name:"Let_dig",symbols:["ALPHA_DIGIT"],postprocess:r},{name:"Ldh_str$ebnf$1",symbols:[]},{name:"Ldh_str$ebnf$1",symbols:["Ldh_str$ebnf$1","ALPHA_DIG_DASH"],postprocess:e=>e[0].concat([e[1]])},{name:"Ldh_str",symbols:["Ldh_str$ebnf$1","Let_dig"]},{name:"U_Let_dig",symbols:["ALPHA_DIGIT_U"],postprocess:r},{name:"U_Ldh_str$ebnf$1",symbols:[]},{name:"U_Ldh_str$ebnf$1",symbols:["U_Ldh_str$ebnf$1","ALPHA_DIG_DASH_U"],postprocess:e=>e[0].concat([e[1]])},{name:"U_Ldh_str",symbols:["U_Ldh_str$ebnf$1","U_Let_dig"]},{name:"U_label$ebnf$1$subexpression$1",symbols:["U_Ldh_str"]},{name:"U_label$ebnf$1",symbols:["U_label$ebnf$1$subexpression$1"],postprocess:r},{name:"U_label$ebnf$1",symbols:[],postprocess:()=>null},{name:"U_label",symbols:["U_Let_dig","U_label$ebnf$1"]},{name:"address_literal$subexpression$1",symbols:["IPv4_address_literal"]},{name:"address_literal$subexpression$1",symbols:["IPv6_address_literal"]},{name:"address_literal$subexpression$1",symbols:["General_address_literal"]},{name:"address_literal",symbols:[{literal:"["},"address_literal$subexpression$1",{literal:"]"}]},{name:"non_local_part",symbols:["Domain"],postprocess:function(e){return{DomainName:a(e[0])}}},{name:"non_local_part",symbols:["address_literal"],postprocess:function(e){return{AddressLiteral:a(e[0])}}},{name:"Mailbox",symbols:["Local_part",{literal:"@"},"non_local_part"],postprocess:function(e){return{localPart:a(e[0]),domainPart:a(e[2])}}},{name:"Local_part",symbols:["Dot_string"],postprocess:function(e){return{DotString:a(e[0])}}},{name:"Local_part",symbols:["Quoted_string"],postprocess:function(e){return{QuotedString:a(e[0])}}},{name:"Dot_string$ebnf$1",symbols:[]},{name:"Dot_string$ebnf$1$subexpression$1",symbols:[{literal:"."},"Atom"]},{name:"Dot_string$ebnf$1",symbols:["Dot_string$ebnf$1","Dot_string$ebnf$1$subexpression$1"],postprocess:e=>e[0].concat([e[1]])},{name:"Dot_string",symbols:["Atom","Dot_string$ebnf$1"]},{name:"Atom$ebnf$1",symbols:[/[0-9A-Za-z!#$%&'*+\-/=?^_`{|}~\u0080-\uFFFF/]/]},{name:"Atom$ebnf$1",symbols:["Atom$ebnf$1",/[0-9A-Za-z!#$%&'*+\-/=?^_`{|}~\u0080-\uFFFF/]/],postprocess:e=>e[0].concat([e[1]])},{name:"Atom",symbols:["Atom$ebnf$1"]},{name:"Quoted_string$ebnf$1",symbols:[]},{name:"Quoted_string$ebnf$1",symbols:["Quoted_string$ebnf$1","QcontentSMTP"],postprocess:e=>e[0].concat([e[1]])},{name:"Quoted_string",symbols:["DQUOTE","Quoted_string$ebnf$1","DQUOTE"]},{name:"QcontentSMTP",symbols:["qtextSMTP"]},{name:"QcontentSMTP",symbols:["quoted_pairSMTP"]},{name:"quoted_pairSMTP",symbols:[{literal:"\\"},/[\x20-\x7e]/]},{name:"qtextSMTP",symbols:[/[\x20-\x21\x23-\x5b\x5d-\x7e\u0080-\uFFFF]/],postprocess:r},{name:"IPv4_address_literal$macrocall$2",symbols:[{literal:"."},"Snum"]},{name:"IPv4_address_literal$macrocall$1",symbols:["IPv4_address_literal$macrocall$2","IPv4_address_literal$macrocall$2","IPv4_address_literal$macrocall$2"]},{name:"IPv4_address_literal",symbols:["Snum","IPv4_address_literal$macrocall$1"]},{name:"IPv6_address_literal$subexpression$1",symbols:[/[iI]/,/[pP]/,/[vV]/,{literal:"6"},{literal:":"}],postprocess:function(e){return e.join("")}},{name:"IPv6_address_literal",symbols:["IPv6_address_literal$subexpression$1","IPv6_addr"]},{name:"General_address_literal$ebnf$1",symbols:["dcontent"]},{name:"General_address_literal$ebnf$1",symbols:["General_address_literal$ebnf$1","dcontent"],postprocess:e=>e[0].concat([e[1]])},{name:"General_address_literal",symbols:["Standardized_tag",{literal:":"},"General_address_literal$ebnf$1"]},{name:"Standardized_tag",symbols:["Ldh_str"]},{name:"dcontent",symbols:[/[\x21-\x5a\x5e-\x7e]/],postprocess:r},{name:"Snum",symbols:["DIGIT"]},{name:"Snum$subexpression$1",symbols:[/[1-9]/,"DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$1"]},{name:"Snum$subexpression$2",symbols:[{literal:"1"},"DIGIT","DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$2"]},{name:"Snum$subexpression$3",symbols:[{literal:"2"},/[0-4]/,"DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$3"]},{name:"Snum$subexpression$4",symbols:[{literal:"2"},{literal:"5"},/[0-5]/]},{name:"Snum",symbols:["Snum$subexpression$4"]},{name:"IPv6_addr",symbols:["IPv6_full"]},{name:"IPv6_addr",symbols:["IPv6_comp"]},{name:"IPv6_addr",symbols:["IPv6v4_full"]},{name:"IPv6_addr",symbols:["IPv6v4_comp"]},{name:"IPv6_hex",symbols:["HEXDIG"]},{name:"IPv6_hex$subexpression$1",symbols:["HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$1"]},{name:"IPv6_hex$subexpression$2",symbols:["HEXDIG","HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$2"]},{name:"IPv6_hex$subexpression$3",symbols:["HEXDIG","HEXDIG","HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$3"]},{name:"IPv6_full$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_full$macrocall$1",symbols:["IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2"]},{name:"IPv6_full",symbols:["IPv6_hex","IPv6_full$macrocall$1"]},{name:"IPv6_comp$ebnf$1$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_comp$ebnf$1$subexpression$1$macrocall$1",symbols:["IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2"]},{name:"IPv6_comp$ebnf$1$subexpression$1",symbols:["IPv6_hex","IPv6_comp$ebnf$1$subexpression$1$macrocall$1"]},{name:"IPv6_comp$ebnf$1",symbols:["IPv6_comp$ebnf$1$subexpression$1"],postprocess:r},{name:"IPv6_comp$ebnf$1",symbols:[],postprocess:()=>null},{name:"IPv6_comp$string$1",symbols:[{literal:":"},{literal:":"}],postprocess:e=>e.join("")},{name:"IPv6_comp$ebnf$2$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_comp$ebnf$2$subexpression$1$macrocall$1",symbols:["IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2"]},{name:"IPv6_comp$ebnf$2$subexpression$1",symbols:["IPv6_hex","IPv6_comp$ebnf$2$subexpression$1$macrocall$1"]},{name:"IPv6_comp$ebnf$2",symbols:["IPv6_comp$ebnf$2$subexpression$1"],postprocess:r},{name:"IPv6_comp$ebnf$2",symbols:[],postprocess:()=>null},{name:"IPv6_comp",symbols:["IPv6_comp$ebnf$1","IPv6_comp$string$1","IPv6_comp$ebnf$2"]},{name:"IPv6v4_full$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_full$macrocall$1",symbols:["IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2"]},{name:"IPv6v4_full",symbols:["IPv6_hex","IPv6v4_full$macrocall$1",{literal:":"},"IPv4_address_literal"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1$macrocall$1",symbols:["IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1",symbols:["IPv6_hex","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$1"]},{name:"IPv6v4_comp$ebnf$1",symbols:["IPv6v4_comp$ebnf$1$subexpression$1"],postprocess:r},{name:"IPv6v4_comp$ebnf$1",symbols:[],postprocess:()=>null},{name:"IPv6v4_comp$string$1",symbols:[{literal:":"},{literal:":"}],postprocess:e=>e.join("")},{name:"IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_comp$ebnf$2$subexpression$1$macrocall$1",symbols:["IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2"]},{name:"IPv6v4_comp$ebnf$2$subexpression$1",symbols:["IPv6_hex","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$1",{literal:":"}]},{name:"IPv6v4_comp$ebnf$2",symbols:["IPv6v4_comp$ebnf$2$subexpression$1"],postprocess:r},{name:"IPv6v4_comp$ebnf$2",symbols:[],postprocess:()=>null},{name:"IPv6v4_comp",symbols:["IPv6v4_comp$ebnf$1","IPv6v4_comp$string$1","IPv6v4_comp$ebnf$2","IPv4_address_literal"]},{name:"DIGIT",symbols:[/[0-9]/],postprocess:r},{name:"ALPHA_DIGIT_U",symbols:[/[0-9A-Za-z\u0080-\uFFFF]/],postprocess:r},{name:"ALPHA_DIGIT",symbols:[/[0-9A-Za-z]/],postprocess:r},{name:"ALPHA_DIG_DASH",symbols:[/[-0-9A-Za-z]/],postprocess:r},{name:"ALPHA_DIG_DASH_U",symbols:[/[-0-9A-Za-z\u0080-\uFFFF]/],postprocess:r},{name:"HEXDIG",symbols:[/[0-9A-Fa-f]/],postprocess:r},{name:"DQUOTE",symbols:[{literal:'"'}],postprocess:r}],ParserStart:"Reverse_path"};t.default=o},125:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.canonicalize=t.canonicalize_quoted_string=t.normalize=t.normalize_dot_string=t.parse=void 0;const a=r(515),o=n(r(84));o.default.ParserStart="Mailbox";const i=a.Grammar.fromCompiled(o.default);function s(e){const t=new a.Parser(i);if(t.feed(e),1!==t.results.length)throw new Error("address parsing failed: ambiguous grammar");return t.results[0]}function l(e){return function(){const t=e.indexOf("+");return-1===t?e:e.substr(0,t)}().replace(/\./g,"").toLowerCase()}function c(e){return`"${e.substr(1).substr(0,e.length-2).replace(/(?:\\(.))/g,"$1").replace(/(?:(["\\]))/g,"\\$1")}"`}t.parse=s,t.normalize_dot_string=l,t.normalize=function(e){var t,r;const n=s(e),a=null!==(t=n.domainPart.AddressLiteral)&&void 0!==t?t:n.domainPart.DomainName.toLowerCase();return`${null!==(r=n.localPart.QuotedString)&&void 0!==r?r:l(n.localPart.DotString)}@${a}`},t.canonicalize_quoted_string=c,t.canonicalize=function(e){var t;const r=s(e),n=null!==(t=r.domainPart.AddressLiteral)&&void 0!==t?t:r.domainPart.DomainName.toLowerCase();return`${r.localPart.QuotedString?c(r.localPart.QuotedString):r.localPart.DotString}@${n}`}},853:(e,t,r)=>{!function(e){"use strict";e.exports.is_uri=r,e.exports.is_http_uri=n,e.exports.is_https_uri=a,e.exports.is_web_uri=o,e.exports.isUri=r,e.exports.isHttpUri=n,e.exports.isHttpsUri=a,e.exports.isWebUri=o;var t=function(e){return e.match(/(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/)};function r(e){if(e&&!/[^a-z0-9\:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=\.\-\_\~\%]/i.test(e)&&!/%[^0-9a-f]/i.test(e)&&!/%[0-9a-f](:?[^0-9a-f]|$)/i.test(e)){var r,n,a,o,i,s="",l="";if(s=(r=t(e))[1],n=r[2],a=r[3],o=r[4],i=r[5],s&&s.length&&a.length>=0){if(n&&n.length){if(0!==a.length&&!/^\//.test(a))return}else if(/^\/\//.test(a))return;if(/^[a-z][a-z0-9\+\-\.]*$/.test(s.toLowerCase()))return l+=s+":",n&&n.length&&(l+="//"+n),l+=a,o&&o.length&&(l+="?"+o),i&&i.length&&(l+="#"+i),l}}}function n(e,n){if(r(e)){var a,o,i,s,l="",c="",d="",u="";if(l=(a=t(e))[1],c=a[2],o=a[3],i=a[4],s=a[5],l){if(n){if("https"!=l.toLowerCase())return}else if("http"!=l.toLowerCase())return;if(c)return/:(\d+)$/.test(c)&&(d=c.match(/:(\d+)$/)[0],c=c.replace(/:\d+$/,"")),u+=l+":",u+="//"+c,d&&(u+=d),u+=o,i&&i.length&&(u+="?"+i),s&&s.length&&(u+="#"+s),u}}}function a(e){return n(e,!0)}function o(e){return n(e)||a(e)}}(e=r.nmd(e))}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};return(()=>{"use strict";r.r(n),r.d(n,{addKeywords:()=>jt,compileSchema:()=>Dr,draft04:()=>cr,draft06:()=>fr,draft07:()=>hr,draft2019:()=>Or,draft2020:()=>wr,draftEditor:()=>Lr,extendDraft:()=>St,getSchemaType:()=>Tt,getTypeOf:()=>B,isJsonError:()=>Ie,isReduceable:()=>he,isSchemaNode:()=>pe,mergeNode:()=>se,mergeSchema:()=>te,oneOfFuzzyKeyword:()=>ct,oneOfKeyword:()=>lt,remotes:()=>Mr,render:()=>ce});var e=Function.prototype.toString,t=Object.create,a=Object.prototype.toString,o=function(){function e(){this._keys=[],this._values=[]}return e.prototype.has=function(e){return!!~this._keys.indexOf(e)},e.prototype.get=function(e){return this._values[this._keys.indexOf(e)]},e.prototype.set=function(e,t){this._keys.push(e),this._values.push(t)},e}();var i="undefined"!=typeof WeakMap?function(){return new WeakMap}:function(){return new o};function s(r){if(!r)return t(null);var n=r.constructor;if(n===Object)return r===Object.prototype?{}:t(r);if(n&&~e.call(n).indexOf("[native code]"))try{return new n}catch(e){}return t(r)}var l="g"===/test/g.flags?function(e){return e.flags}:function(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t};function c(e){var t=a.call(e);return t.substring(8,t.length-1)}var d="undefined"!=typeof Symbol?function(e){return e[Symbol.toStringTag]||c(e)}:c,u=Object.defineProperty,m=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,h=Object.prototype,v=h.hasOwnProperty,y=h.propertyIsEnumerable,$="function"==typeof p;var g=$?function(e){return f(e).concat(p(e))}:f;function b(e,t,r){for(var n=g(e),a=0,o=n.length,i=void 0,s=void 0;a<o;++a)if("callee"!==(i=n[a])&&"caller"!==i)if(s=m(e,i)){s.get||s.set||(s.value=r.copier(s.value,r));try{u(t,i,s)}catch(e){t[i]=s.value}}else t[i]=r.copier(e[i],r);return t}function x(e,t){return e.slice(0)}function I(e,t){var r=new t.Constructor;return t.cache.set(e,r),e.forEach((function(e,n){r.set(n,t.copier(e,t))})),r}var P=$?function(e,t){var r=s(t.prototype);for(var n in t.cache.set(e,r),e)v.call(e,n)&&(r[n]=t.copier(e[n],t));for(var a=p(e),o=0,i=a.length,l=void 0;o<i;++o)l=a[o],y.call(e,l)&&(r[l]=t.copier(e[l],t));return r}:function(e,t){var r=s(t.prototype);for(var n in t.cache.set(e,r),e)v.call(e,n)&&(r[n]=t.copier(e[n],t));return r};function O(e,t){return new t.Constructor(e.valueOf())}function _(e,t){return e}function A(e,t){var r=new t.Constructor;return t.cache.set(e,r),e.forEach((function(e){r.add(t.copier(e,t))})),r}var S=Array.isArray,j=Object.assign,N=Object.getPrototypeOf||function(e){return e.__proto__},E={array:function(e,t){var r=new t.Constructor;t.cache.set(e,r);for(var n=0,a=e.length;n<a;++n)r[n]=t.copier(e[n],t);return r},arrayBuffer:x,blob:function(e,t){return e.slice(0,e.size,e.type)},dataView:function(e,t){return new t.Constructor(x(e.buffer))},date:function(e,t){return new t.Constructor(e.getTime())},error:_,map:I,object:P,regExp:function(e,t){var r=new t.Constructor(e.source,l(e));return r.lastIndex=e.lastIndex,r},set:A},k=j({},E,{array:function(e,t){var r=new t.Constructor;return t.cache.set(e,r),b(e,r,t)},map:function(e,t){return b(e,I(e,t),t)},object:function(e,t){var r=s(t.prototype);return t.cache.set(e,r),b(e,r,t)},set:function(e,t){return b(e,A(e,t),t)}});function w(e){var t=function(e){return{Arguments:e.object,Array:e.array,ArrayBuffer:e.arrayBuffer,Blob:e.blob,Boolean:O,DataView:e.dataView,Date:e.date,Error:e.error,Float32Array:e.arrayBuffer,Float64Array:e.arrayBuffer,Int8Array:e.arrayBuffer,Int16Array:e.arrayBuffer,Int32Array:e.arrayBuffer,Map:e.map,Number:O,Object:e.object,Promise:_,RegExp:e.regExp,Set:e.set,String:O,WeakMap:_,WeakSet:_,Uint8Array:e.arrayBuffer,Uint8ClampedArray:e.arrayBuffer,Uint16Array:e.arrayBuffer,Uint32Array:e.arrayBuffer,Uint64Array:e.arrayBuffer}}(j({},E,e)),r=t.Array,n=t.Object;function a(e,a){if(a.prototype=a.Constructor=void 0,!e||"object"!=typeof e)return e;if(a.cache.has(e))return a.cache.get(e);if(a.prototype=N(e),a.Constructor=a.prototype&&a.prototype.constructor,!a.Constructor||a.Constructor===Object)return n(e,a);if(S(e))return r(e,a);var o=t[d(e)];return o?o(e,a):"function"==typeof e.then?e:n(e,a)}return function(e){return a(e,{Constructor:void 0,cache:i(),copier:a,prototype:void 0})}}w(j({},k,{}));var R=w({});const D=/(#)+$/,L=/#$/,M=/^[#/]+/,V=/^[^:]+:\/\/[^/]+\//,q=/\/[^/]*$/,T=/#.*$/,C=/^urn:uuid:[0-9A-Fa-f]/;function z(e,t){const r=function(e,t){return null!=e||null!=t&&""!==t?null==t||""===t?e.replace(L,""):C.test(t)?t:null==e||""===e||"#"===e?t.replace(L,""):"#"===t[0]?"/"===e[0]?t:`${e.replace(T,"")}${t.replace(D,"")}`:V.test(t)?t.replace(L,""):V.test(e)&&t.startsWith("/")?`${e.replace(/(^[^:]+:\/\/[^/]+)(.*)/,"$1")}/${t.replace(M,"")}`:`${e.replace(q,"")}/${t.replace(M,"")}`:"#"}(e,t);return""===r?"#":r}const F=/(#)+$/g,J=["",null,"#"];function U(e){if(J.includes(e))return[];if(-1===(e=e.replace(F,"")).indexOf("#"))return[e.replace(/(#|\/)+$/g,"")];if(0===e.indexOf("#"))return[e.replace(F,"")];const t=e.split("#");return t[0]=t[0].replace(/(#|\/)+$/g,""),t[1]=`#${t[1].replace(F,"")}`,t}function G(e,...t){const r={};return Object.keys(e).forEach((n=>{t.includes(n)||(r[n]=e[n])})),r}const H=Object.prototype.toString;function B(e){const t=H.call(e).slice(8,-1).toLowerCase();return"file"===t?"object":t}function W(e){return"object"===B(e)}const Z={DECLARATOR_ONEOF:"oneOfProperty",propertyBlacklist:["_id"],DYNAMIC_PROPERTIES:["$ref","$defs","if","then","else","allOf","anyOf","oneOf","dependentSchemas","dependentRequired","definitions","dependencies","patternProperties"]};function Q(e){const t=void 0===e?{}:{type:B(e)};if("object"===t.type&&W(e)&&(t.properties={},Object.keys(e).forEach((r=>t.properties[r]=Q(e[r])))),"array"===t.type&&Array.isArray(e))if(1===e.length)t.items=Q(e[0]);else{t.items=e.map(Q);null==t.items.find((e=>e.type!==t.items[0].type))&&(t.items=t.items[0])}return t}function X(e,t){null!=t&&Object.values(t).forEach((t=>K(t,e)))}function Y(e,t){null!=t&&t.forEach((t=>K(t,e)))}function K(e,t=[]){return pe(e)?(t.push(e),X(t,e.$defs),e.additionalProperties&&K(e.additionalProperties,t),Y(t,e.allOf),Y(t,e.anyOf),e.contains&&K(e.contains,t),X(t,e.dependentSchemas),e.if&&K(e.if,t),e.else&&K(e.else,t),e.then&&K(e.then,t),e.items&&K(e.items,t),Y(t,e.prefixItems),e.not&&K(e.not,t),Y(t,e.oneOf),e.patternProperties&&Object.values(e.patternProperties).forEach((({node:e})=>K(e,t))),X(t,e.properties),e.propertyNames&&K(e.propertyNames,t),e.unevaluatedProperties&&K(e.unevaluatedProperties,t),e.unevaluatedItems&&K(e.unevaluatedItems,t),t):t}var ee=r(546);function te(e,t,...r){if("error"===(null==t?void 0:t.type))return t;if("error"===(null==e?void 0:e.type))return e;if(B(e)!==B(t))return e;const n=re(e,t);for(let e=0;e<r.length;e+=1)delete n[r[e]];return n}function re(e,t,r){var n;if(W(e)&&W(t)){const r={};return[...Object.keys(e),...Object.keys(t)].filter(((e,t,r)=>r.indexOf(e)===t)).forEach((n=>r[n]=re(e[n],t[n],n))),r}if(Array.isArray(e)&&Array.isArray(t)){if("required"===r||"anyOf"===r)return e.concat(t).filter(((e,t,r)=>r.indexOf(e)===t));if("items"===r||"prefixItems"===r){const r=[];for(let a=0;a<t.length;a+=1)W(e[a])&&W(t[a])&&e[a].type===t[a].type?r[a]=re(e[a],t[a]):r.push(null!==(n=t[a])&&void 0!==n?n:e[a]);return r}const a=[],o=[];for(let r=0;r<Math.max(e.length,t.length);r+=1)W(e[r])&&W(t[r])?a[r]=re(e[r],t[r]):void 0!==e[r]&&void 0!==t[r]?(a[r]=e[r],o.push(t[r])):void 0!==e[r]?a[r]=e[r]:void 0!==t[r]&&o.push(t[r]);return[...a,...o].filter(((e,t,r)=>r.indexOf(e)===t))}return Array.isArray(t)?t:Array.isArray(e)?e:void 0!==t?t:e}function ne(e,t){var r,n;return(null!==(r=t.order)&&void 0!==r?r:0)-(null!==(n=e.order)&&void 0!==n?n:0)}function ae(e,t,r){var n,a;if(null==e||r.indexOf(e)!==t)return!1;const o=null!==(a=null===(n=e.toJSON)||void 0===n?void 0:n.call(e))&&void 0!==a?a:e.name;return r.find(((e,r)=>{var n,a;return(null!==(a=null===(n=e.toJSON)||void 0===n?void 0:n.call(e))&&void 0!==a?a:e.name)===o&&r===t}))}function oe(e,t){if(null==e||null==t)return t||e;const r={};return[...Object.keys(e),...Object.keys(t)].filter(((e,t,r)=>r.indexOf(e)===t)).forEach((n=>{const a=se(e[n],t[n]);pe(a)&&(r[n]=a)})),r}function ie(e,t){if(null==e||null==t)return e||t;const r=[...e],n=e.map((e=>e.node.evaluationPath));return t.forEach((e=>{n.includes(e.node.evaluationPath)||r.push(e)})),r}function se(e,t,...r){var n,a;if(null==e||null==t)return e||t;const o={};e.items&&t.prefixItems||e.prefixItems&&t.items?t.prefixItems?o.prefixItems=t.prefixItems:o.items=t.items:(o.prefixItems=null!==(n=t.prefixItems)&&void 0!==n?n:e.prefixItems,o.items=se(e.items,t.items));const i={...e,...t,...o,dynamicId:ve(e.dynamicId,t.dynamicId),oneOfIndex:null!==(a=e.oneOfIndex)&&void 0!==a?a:t.oneOfIndex,schema:te(e.schema,t.schema,...r),parent:e.parent,resolvers:e.resolvers.concat(t.resolvers).filter(ae).sort(ne),reducers:e.reducers.concat(t.reducers).filter(ae).sort(ne),validators:e.validators.concat(t.validators).filter(ae).sort(ne),additionalProperties:se(e.additionalProperties,t.additionalProperties),contains:se(e.contains,t.contains),if:se(e.if,t.if),then:se(e.then,t.then),else:se(e.else,t.else),not:se(e.not,t.not),propertyNames:se(e.propertyNames,t.propertyNames),unevaluatedProperties:se(e.unevaluatedProperties,t.unevaluatedProperties),unevaluatedItems:se(e.unevaluatedItems,t.unevaluatedItems),$defs:oe(e.$defs,t.$defs),patternProperties:ie(e.patternProperties,t.patternProperties),properties:oe(e.properties,t.properties)};function s(e){var t,r,n;const a=null!==(r=null===(t=e.toJSON)||void 0===t?void 0:t.call(e))&&void 0!==r?r:e.name;return void 0!==(null===(n=i.schema)||void 0===n?void 0:n[a])||(i[a]=void 0,!1)}return null==r||r.forEach((e=>i[e]=void 0)),i.resolvers=i.resolvers.filter(s),i.reducers=i.reducers.filter(s),i.validators=i.validators.filter(s),i}function le(e,...t){if(!W(e)||0===t.length)return e;const r={};return t.forEach((t=>{void 0!==e[t]&&(r[t]=e[t])})),r}function ce(e,t={}){return e.replace(/\{\{(\w+)\}\}/g,((e,r)=>{const n=t[r];return null==n?"":"object"==typeof n?JSON.stringify(n):String(n)}))}const de=Object.prototype.hasOwnProperty,ue=(e,t)=>!(void 0===e[t]||!de.call(e,t));function me(e,t){return W(e)||Array.isArray(e)?e[t]:void 0}const{DYNAMIC_PROPERTIES:fe}=Z;function pe(e){return W(e)&&Array.isArray(null==e?void 0:e.reducers)&&Array.isArray(null==e?void 0:e.resolvers)}function he(e){for(let t=0,r=fe.length;t<r;t+=1)if(ue(e,fe[t]))return!0;return!1}function ve(e,t){return e==t?null!=e?e:"":null==e||null==t?e||t:e.startsWith(t)?e:t.startsWith(e)?t:`${e}+${t}`}const ye={compileSchema(e,t=this.evaluationPath,r,n){const a=t.split("/$ref")[0],o=this,i={lastIdPointer:o.lastIdPointer,context:o.context,parent:o,evaluationPath:t,dynamicId:ve(o.dynamicId,n),schemaLocation:null!=r?r:(0,ee.join)(o.schemaLocation,a),reducers:[],resolvers:[],validators:[],schema:e,...ye};return be(i),i},createError(e,t,r){var n,a,o;let i=r;if(void 0===i){const r=null!==(o=null===(a=null===(n=this.schema)||void 0===n?void 0:n.errorMessages)||void 0===a?void 0:a[e])&&void 0!==o?o:this.context.errors[e];if("function"==typeof r)return r(t);i=ce(null!=r?r:name,t)}return{type:"error",code:e,message:i,data:t}},createSchema:Q,getChildSelection(e){return this.context.methods.getChildSelection(this,e)},getNode:function(e,t,r={}){var n,a,o;r.path=null!==(n=r.path)&&void 0!==n?n:[],r.withSchemaWarning=null!==(a=r.withSchemaWarning)&&void 0!==a&&a,r.pointer=null!==(o=r.pointer)&&void 0!==o?o:"#";const i=this,s=(0,ee.split)(e);if(0===s.length){const e=i.resolveRef(r);return Ie(e)?{node:void 0,error:e}:{node:e,error:void 0}}let l="#",c=i;for(let e=0,n=s.length;e<n;e+=1){l=`${l}/${s[e]}`;const n=c.getNodeChild(s[e],t,{...r,pointer:l});if(n.error)return n;if(null==n.node)return n;c=n.node,t=me(t,s[e])}const d=c.resolveRef(r);return Ie(d)?{node:void 0,error:d}:{node:d,error:void 0}},getNodeChild:function(e,t,r={}){var n,a,o;r.path=null!==(n=r.path)&&void 0!==n?n:[],r.withSchemaWarning=null!==(a=r.withSchemaWarning)&&void 0!==a&&a,r.pointer=null!==(o=r.pointer)&&void 0!==o?o:"#";const{path:i,pointer:s}=r;let l=this;if(l.reducers.length){const r=l.reduceNode(t,{key:e,path:i,pointer:s});if(r.error)return r;pe(r.node)&&(l=r.node)}for(const r of l.resolvers){const n=r({data:t,key:e,node:l});if(pe(n))return{node:n,error:void 0};if(Ie(n))return{node:void 0,error:n}}const c=l.resolveRef({path:i});if(c!==l)return c.getNodeChild(e,t,r);if(!0===r.createSchema){return{node:l.compileSchema(l.createSchema(me(t,e)),`${l.evaluationPath}/additional`,`${l.schemaLocation}/additional`),error:void 0}}if(!0===r.withSchemaWarning){return{node:void 0,error:l.createError("schema-warning",{pointer:s,value:t,schema:l.schema,key:e})}}return{node:void 0,error:void 0}},getNodeRef(e){return this.compileSchema({$ref:e}).resolveRef()},getNodeRoot(){return this.context.rootNode},getDraftVersion(){return this.context.version},getData(e,t){const r=this,n={recursionLimit:1,...r.context.getDataDefaultOptions,cache:{},...null!=t?t:{}};return r.context.methods.getData(r,e,n)},reduceNode(e,t={}){const r=this,{key:n,pointer:a,path:o}=t;if(!1===r.schema)return{node:r,error:void 0};if(!0===r.schema){const t=r.compileSchema(Q(e),r.evaluationPath,r.schemaLocation);return null==o||o.push({pointer:a,node:r}),{node:t,error:void 0}}let i,s=r.compileSchema(r.schema,r.evaluationPath,r.schemaLocation);const l=r.reducers;for(let t=0;t<l.length;t+=1){const c=l[t]({data:e,key:n,node:r,pointer:a,path:o});if(Ie(c))return{node:void 0,error:c};if(c){if(!1===c.schema){i=!1;break}s=se(s,c)}}return!1===i?{node:{...r,schema:!1,reducers:[]},error:void 0}:(s!==r&&(null==o||o.push({pointer:a,node:r})),s.schema=G(s.schema,...fe),fe.forEach((e=>s[e]=void 0)),{node:s,error:void 0})},validate(e,t="#",r=[]){var n;const a=null!==(n=Oe(this,e,t,r))&&void 0!==n?n:[],o=[],i=Pe(Array.isArray(a)?a:[a]).filter(Ie),s=[];Pe(Array.isArray(a)?a:[a]).forEach((e=>{Ie(e)?o.push(e):e instanceof Promise&&s.push(e)}));return{valid:0===i.length,errors:o,errorsAsync:s}},addRemoteSchema(e,t){var r;t.$id=z(t.$id||e);const{context:n}=this,a=function(e,t){var r;if(!Array.isArray(e)||0===e.length)throw new Error(`Missing drafts in 'compileSchema({ $schema: "${t}" })'`);return 1===e.length?e[0]:null!==(r=e.find((e=>new RegExp(e.$schemaRegEx).test(t))))&&void 0!==r?r:e[e.length-1]}(n.drafts,null!==(r=null==t?void 0:t.$schema)&&void 0!==r?r:this.context.rootNode.$schema),o={evaluationPath:"#",lastIdPointer:"#",schemaLocation:"#",dynamicId:"",reducers:[],resolvers:[],validators:[],schema:t,context:{...n,refs:{},anchors:{},...R(le(a,"methods","keywords","version","formats","errors"))},...ye};return o.context.rootNode=o,o.context.remotes[z(e)]=o,be(o),this},toSchemaNodes(){return K(this)},toDataNodes(e,t){return this.context.methods.toDataNodes(this,e,t)},toJSON(){var e;return{...this,context:void 0,errors:void 0,parent:null===(e=this.parent)||void 0===e?void 0:e.evaluationPath}}},$e=["$ref","if","$defs"],ge=["draft-04","draft-06","draft-07"];function be(e){if(e.schema.$ref&&ge.includes(e.context.version))return void e.context.keywords.filter((({keyword:e})=>$e.includes(e))).forEach((t=>xe(t,e)));const t=Object.keys(e.schema);e.context.keywords.filter((({keyword:e})=>t.includes(e)||$e.includes(e))).forEach((t=>xe(t,e)))}function xe(e,t){var r,n,a,o;null===(r=e.parse)||void 0===r||r.call(e,t),(null===(n=e.addReduce)||void 0===n?void 0:n.call(e,t))&&t.reducers.push(e.reduce),(null===(a=e.addResolve)||void 0===a?void 0:a.call(e,t))&&t.resolvers.push(e.resolve),(null===(o=e.addValidate)||void 0===o?void 0:o.call(e,t))&&t.validators.push(e.validate)}function Ie(e){return"error"===(null==e?void 0:e.type)}function Pe(e,t=[]){if(!Array.isArray(e))return[e];for(let r=0;r<e.length;r+=1){const n=e[r];Array.isArray(n)?Pe(n,t):(Ie(n)||n instanceof Promise)&&t.push(n)}return t}function Oe(e,t,r,n){null==n||n.push({pointer:r,node:e});const a=e.schema;if(!0===a)return[];if(!1===a)return[e.createError("invalid-data-error",{value:t,pointer:r,schema:e.schema})];const o=[];for(const a of e.validators){const i=a({node:e,data:t,pointer:r,path:n});Array.isArray(i)?o.push(...i):i&&o.push(i)}return Pe(o)}const _e={id:"$ref",keyword:"$ref",order:10,parse:function(e){var t,r,n,a,o;e.resolveRef=je;const i=z(null===(t=e.parent)||void 0===t?void 0:t.$id,null===(r=e.schema)||void 0===r?void 0:r.$id);e.$id=i,e.lastIdPointer=null!==(a=null===(n=e.parent)||void 0===n?void 0:n.lastIdPointer)&&void 0!==a?a:"#",i!==(null===(o=e.parent)||void 0===o?void 0:o.$id)&&"#"!==e.evaluationPath&&(e.lastIdPointer=e.evaluationPath);if("#"!==e.lastIdPointer&&e.evaluationPath.startsWith(e.lastIdPointer)){const t=`#${e.evaluationPath.replace(e.lastIdPointer,"")}`;Ae(e,z(i,t))}Ae(e,z(e.context.rootNode.$id,e.evaluationPath));const s=e.schema.$anchor;if(s){const t=`${i.replace(/#$/,"")}#${s}`;null==e.context.anchors[t]&&(e.context.anchors[t]=e)}const l=e.schema.$dynamicAnchor;if(l){const t=`${i.replace(/#$/,"")}#${l}`;null==e.context.dynamicAnchors[t]&&(e.context.dynamicAnchors[t]=e)}e.schema.$ref&&(e.$ref=z(i,e.schema.$ref),e.$ref.startsWith("/")&&(e.$ref=`#${e.$ref}`))},addReduce:e=>null!=e.$ref||null!=e.schema.$dynamicRef,reduce:Se,addValidate:({schema:e})=>null!=e.$ref||null!=e.$dynamicRef,validate:function({node:e,data:t,pointer:r="#",path:n}){const a=e.resolveRef({pointer:r,path:n});if(null!=a)return Oe(a,t,r,n)}};function Ae(e,t){null==e.context.refs[t]&&(e.context.refs[t]=e)}function Se({node:e,data:t,key:r,pointer:n,path:a}){if(null==e)return;const o=e.resolveRef({pointer:n,path:a});if(null==o)return;if(o.schemaLocation===e.schemaLocation)return o;const i=se(e,o),{node:s,error:l}=i.reduceNode(t,{key:r,pointer:n,path:a});return null!=s?s:l}function je({pointer:e,path:t}={}){const r=this;if(r.schema.$dynamicRef){const n=function(e,t){const r=t,n=z(e.$id,e.schema.$dynamicRef),a=null==e.context.dynamicAnchors[n];if(a&&e.context.anchors[n])return Ee(e.context.anchors[n],e);for(let t=0;t<r.length;t+=1){if(r[t].node.schema.$dynamicAnchor)return Ee(r[t].node,e);const n=e.schema.$dynamicRef.split("#").pop(),a=z(r[t].node.$id,`#${n}`);if(e.context.dynamicAnchors[a])return Ee(e.context.dynamicAnchors[a],e)}const o=ke(e,n);return o}(r,t);return null==t||t.push({pointer:e,node:n}),n}if(null==r.$ref)return r;const n=ke(r);return null!=n&&(null==t||t.push({pointer:e,node:n})),n}const Ne=["title","description","options","readOnly","writeOnly"];function Ee(e,t){let r=e.schema;return W(e.schema)&&(r={...G(e.schema,"$id"),...le(t.schema,...Ne)}),e.compileSchema(r,`${t.evaluationPath}/$ref`,e.schemaLocation)}function ke(e,t=(null==e?void 0:e.$ref)){if(null==t)return e;if(e.context.refs[t])return Ee(e.context.refs[t],e);if(e.context.anchors[t])return Ee(e.context.anchors[t],e);if(e.context.dynamicAnchors[t])return Ee(e.context.dynamicAnchors[t],e);const r=U(t);if(0!==r.length)if(1!==r.length)if(2!==r.length)console.error("REF: UNHANDLED",t);else{const n=r[0];if(e.context.remotes[n]&&e!==e.context.remotes[n]){const a=e.context.remotes[n];let o=ke(a,t);if(o)return o;if(o=ke(a,r[1]),o)return o}if(e.context.refs[n]){const t=e.context.refs[n],a=(0,ee.split)(r[1]);let o=t;for(let e=0;e<a.length;e+=1)if(o=o[a[e]],null==o)return void console.error("REF: FAILED RESOLVING ref json-pointer",r[1]);return o}console.error("REF: UNFOUND 2",t)}else{const t=r[0];if(e.context.remotes[t])return Ee(e.context.remotes[t],e);if("#"===t[0]){const r=e.context.rootNode.schema,n=(0,ee.get)(r,t);if(n)return e.compileSchema(n,`${e.evaluationPath}/$ref`,t)}}}const we={id:"additionalItems",keyword:"additionalItems",order:-10,parse:function(e){const{schema:t,evaluationPath:r,schemaLocation:n}=e;(W(t.additionalItems)||!0===t.additionalItems)&&Array.isArray(t.items)&&(e.items=e.compileSchema(t.additionalItems,`${r}/additionalItems`,`${n}/additionalItems`))},addResolve:e=>null!=e.items,resolve:function({node:e,key:t,data:r}){if(Array.isArray(r)){const n=me(r,t),{node:a,error:o}=e.items.reduceNode(n);return null!=a?a:o}},addValidate:({schema:e})=>null!=e.additionalItems&&!0!==e.additionalItems&&Array.isArray(e.items),validate:function({node:e,data:t,pointer:r,path:n}){const{schema:a}=e;if(!Array.isArray(t)||0===t.length)return;if(Array.isArray(a.items)&&a.items.length>=t.length)return;const o=Array.isArray(a.items)?a.items.length:0,i=[];for(let s=o;s<t.length;s+=1){const o=t[s];if(e.items){const t=Oe(e.items,o,`${r}/${s}`,n);t&&i.push(...t)}else!1===a.additionalItems&&i.push(e.createError("additional-items-error",{key:s,pointer:`${r}/${s}`,value:t,schema:a}))}return i}};const Re={id:"additionalProperties",keyword:"additionalProperties",order:-10,parse:function(e){const{schema:t,evaluationPath:r,schemaLocation:n}=e;W(t.additionalProperties)&&(e.additionalProperties=e.compileSchema(t.additionalProperties,`${r}/additionalProperties`,`${n}/additionalProperties`))},addResolve:({schema:e})=>null!=e.additionalProperties,resolve:function({node:e,data:t,key:r}){const n=me(t,r);if(e.additionalProperties){const{node:t,error:r}=e.additionalProperties.reduceNode(n);return null!=t?t:r}if(!1===e.schema.additionalProperties)return e.createError("no-additional-properties-error",{pointer:`${r}`,schema:e.schema,value:me(t,r),property:`${r}`})},addValidate:({schema:e})=>!0!==e.additionalProperties&&null!=e.additionalProperties&&!(!1===e.additionalProperties&&W(e.patternProperties)),validate:function({node:e,data:t,pointer:r="#",path:n}){if(!W(t))return;const{schema:a}=e,o=[];let i=Object.keys(t).filter((e=>!1===Z.propertyBlacklist.includes(e)));Array.isArray(e.patternProperties)&&(i=i.filter((t=>{for(let r=0;r<e.patternProperties.length;r+=1)if(e.patternProperties[r].pattern.test(t))return!1;return!0})));const s=e.properties?Object.keys(e.properties):[];return i.filter((e=>-1===s.indexOf(e))).forEach((i=>{const l=me(t,i);if(W(e.additionalProperties)){const t=Oe(e.additionalProperties,l,`${r}/${i}`,n);t&&o.push(...t)}else o.push(e.createError("no-additional-properties-error",{pointer:`${r}/${i}`,schema:a,value:t,property:i,properties:s}))})),o}};const De={id:"allOf",keyword:"allOf",parse:function(e){const{schema:t,evaluationPath:r}=e;Array.isArray(t.allOf)&&t.allOf.length&&(e.allOf=t.allOf.map(((t,n)=>e.compileSchema(t,`${r}/allOf/${n}`,`${e.schemaLocation}/allOf/${n}`))))},addReduce:e=>null!=e.allOf,reduce:function({node:e,data:t,key:r,pointer:n,path:a}){var o,i;if(null==e.allOf)return;let s={},l="";for(let c=0;c<e.allOf.length;c+=1){const{node:d}=e.allOf[c].reduceNode(t,{key:r,pointer:n,path:a});if(d){const t=null!==(i=null===(o=d.dynamicId)||void 0===o?void 0:o.replace(e.dynamicId,""))&&void 0!==i?i:"";l+=`${""===l?"":","}${""===t?`allOf/${c}`:t}`;const r=te(e.allOf[c].schema,d.schema);s=te(s,r,"allOf","contains")}}return e.compileSchema(s,`${e.evaluationPath}/${l}`,e.schemaLocation,`${e.schemaLocation}(${l})`)},addValidate:e=>null!=e.allOf,validate:function({node:e,data:t,pointer:r,path:n}){if(!Array.isArray(e.allOf)||0===e.allOf.length)return;const a=[];return e.allOf.forEach((e=>{a.push(...Oe(e,t,r,n))})),a}};const Le={id:"anyOf",keyword:"anyOf",parse:function(e){const{schema:t,evaluationPath:r,schemaLocation:n}=e;Array.isArray(t.anyOf)&&t.anyOf.length&&(e.anyOf=t.anyOf.map(((t,a)=>e.compileSchema(t,`${r}/anyOf/${a}`,`${n}/anyOf/${a}`))))},addReduce:e=>null!=e.anyOf,reduce:function({node:e,data:t,pointer:r,path:n}){var a,o;if(null==e.anyOf)return;let i={},s="";for(let l=0;l<e.anyOf.length;l+=1)if(0===Oe(e.anyOf[l],t,r,n).length){const{node:r}=e.anyOf[l].reduceNode(t);if(r){const t=null!==(o=null===(a=r.dynamicId)||void 0===a?void 0:a.replace(e.dynamicId,""))&&void 0!==o?o:"";s+=`${""===s?"":","}${""===t?`anyOf/${l}`:t}`;const n=te(e.anyOf[l].schema,r.schema);i=te(i,n,"anyOf")}}return e.compileSchema(i,`${e.evaluationPath}${s}`,e.schemaLocation,`${e.schemaLocation}(${s})`)},addValidate:e=>null!=e.anyOf,validate:function({node:e,data:t,pointer:r,path:n}){for(let a=0;a<e.anyOf.length;a+=1)if(0===Oe(e.anyOf[a],t,r,n).length)return;return e.createError("any-of-error",{pointer:r,schema:e.schema,value:t,anyOf:e.schema.anyOf})}};const Me={id:"contains",keyword:"contains",parse:function(e){const{schema:t,evaluationPath:r}=e;if(null==t.contains)return;e.contains=e.compileSchema(t.contains,`${r}/contains`)},addValidate:e=>null!=e.contains,validate:function({node:e,data:t,pointer:r,path:n}){var a,o;const{schema:i}=e;if(!Array.isArray(t))return;if(!1===i.contains)return e.createError("contains-array-error",{pointer:r,value:t,schema:i});if(!0===i.contains)return Array.isArray(t)&&0===t.length?e.createError("contains-any-error",{pointer:r,value:t,schema:i}):void 0;if(!W(i.contains)||!Array.isArray(t))return;let s=0;for(let a=0;a<t.length;a+=1)0===Oe(e.contains,t[a],r,n).length&&s++;const l=null!==(a=i.maxContains)&&void 0!==a?a:1/0,c=null!==(o=i.minContains)&&void 0!==o?o:1;if(l>=s&&c<=s)return;if(l<s)return e.createError("contains-max-error",{pointer:r,schema:i,delta:s-l,value:t});if(c>s)ret