json-schema-library
Version:
Customizable and hackable json-validator and json-schema utilities for traversal, data generation and validation
1 lines • 91.3 kB
JavaScript
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("jlib",[],r):"object"==typeof exports?exports.jlib=r():e.jlib=r()}("undefined"!=typeof self?self:this,(()=>(()=>{var e={546:function(e){"undefined"!=typeof self&&self,e.exports=(()=>{"use strict";var e={d:(r,t)=>{for(var n in t)e.o(t,n)&&!e.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:t[n]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};function t(e){return"#"===e||""===e||Array.isArray(e)&&0===e.length||!1}e.r(r),e.d(r,{default:()=>P,get:()=>c,isRoot:()=>t,join:()=>x,remove:()=>$,removeUndefinedItems:()=>v,set:()=>d,split:()=>l,splitLast:()=>E});const n=/~1/g,o=/~0/g,a=/(^#?\/?)/g;function s(e){return e.replace(n,"/").replace(o,"~")}function i(e){return s(decodeURIComponent(e))}function l(e){if(null==e||"string"!=typeof e||t(e))return Array.isArray(e)?e:[];const r=e.indexOf("#")>=0?i:s,n=(e=e.replace(a,"")).split("/");for(let e=0,t=n.length;e<t;e+=1)n[e]=r(n[e]);return n}function c(e,r,n=void 0){if(null==r||null==e)return n;if(t(r))return e;const o=u(e,l(r));return void 0===o?n:o}function u(e,r){const t=r.shift();if(void 0!==e)return void 0!==t?u(e[t],r):e}const f=/^\[.*\]$/,m=/^\[(.+)\]$/;function p(e,r){return"__proto__"===e||"constructor"==e&&r.length>0&&"prototype"==r[0]}function d(e,r,t){if(null==r)return e;const n=l(r);if(0===n.length)return e;null==e&&(e=f.test(n[0])?[]:{});let o,a,s=e;for(;n.length>1;)o=n.shift(),a=f.test(n[0]),p(o,n)||(s=y(s,o,a));return o=n.pop(),h(s,o,t),e}function h(e,r,t){let n;const o=r.match(m);"[]"===r&&Array.isArray(e)?e.push(t):o?(n=o.pop(),e[n]=t):e[r]=t}function y(e,r,t){if(null!=e[r])return e[r];const n=t?[]:{};return h(e,r,n),n}function v(e){let r=0,t=0;for(;r+t<e.length;)void 0===e[r+t]&&(t+=1),e[r]=e[r+t],r+=1;return e.length=e.length-t,e}function $(e,r,t){const n=l(r),o=n.pop(),a=c(e,n);return a&&delete a[o],Array.isArray(a)&&!0!==t&&v(a),e}const b=/~/g,g=/\//g;function O(e,r){if(0===e.length)return r?"#":"";for(let t=0,n=e.length;t<n;t+=1)e[t]=e[t].replace(b,"~0").replace(g,"~1"),r&&(e[t]=encodeURIComponent(e[t]));return(r?"#/":"/")+e.join("/")}function x(e,...r){const t=[];if(Array.isArray(e))return O(e,!0===arguments[1]);const n=arguments[arguments.length-1],o="boolean"==typeof n?n:e&&"#"===e[0];for(let e=0,r=arguments.length;e<r;e+=1)t.push.apply(t,l(arguments[e]));const a=[];for(let e=0,r=t.length;e<r;e+=1)if(".."===t[e]){if(0===a.length)return o?"#":"";a.pop()}else a.push(t[e]);return O(a,o)}function E(e){const r=l(e);if(0===r.length)return"string"==typeof e&&"#"===e[0]?["#",r[0]]:["",void 0];if(1===r.length)return"#"===e[0]?["#",r[0]]:["",r[0]];const t=r.pop();return[x(r,"#"===e[0]),t]}const P={get:c,set:d,remove:$,join:x,split:l,splitLast:E,isRoot:t,removeUndefinedItems:v};return r})()},744:e=>{"use strict";var r=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var r=Object.prototype.toString.call(e);return"[object RegExp]"===r||"[object Date]"===r||function(e){return e.$$typeof===t}(e)}(e)};var t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,r){return!1!==r.clone&&r.isMergeableObject(e)?l((t=e,Array.isArray(t)?[]:{}),e,r):e;var t}function o(e,r,t){return e.concat(r).map((function(e){return n(e,t)}))}function a(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(r){return Object.propertyIsEnumerable.call(e,r)})):[]}(e))}function s(e,r){try{return r in e}catch(e){return!1}}function i(e,r,t){var o={};return t.isMergeableObject(e)&&a(e).forEach((function(r){o[r]=n(e[r],t)})),a(r).forEach((function(a){(function(e,r){return s(e,r)&&!(Object.hasOwnProperty.call(e,r)&&Object.propertyIsEnumerable.call(e,r))})(e,a)||(s(e,a)&&t.isMergeableObject(r[a])?o[a]=function(e,r){if(!r.customMerge)return l;var t=r.customMerge(e);return"function"==typeof t?t:l}(a,t)(e[a],r[a],t):o[a]=n(r[a],t))})),o}function l(e,t,a){(a=a||{}).arrayMerge=a.arrayMerge||o,a.isMergeableObject=a.isMergeableObject||r,a.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(t);return s===Array.isArray(e)?s?a.arrayMerge(e,t,a):i(e,t,a):n(t,a)}l.all=function(e,r){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,t){return l(e,t,r)}),{})};var c=l;e.exports=c},17:e=>{"use strict";e.exports=function e(r,t){if(r===t)return!0;if(r&&t&&"object"==typeof r&&"object"==typeof t){if(r.constructor!==t.constructor)return!1;var n,o,a;if(Array.isArray(r)){if((n=r.length)!=t.length)return!1;for(o=n;0!=o--;)if(!e(r[o],t[o]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();if(r.toString!==Object.prototype.toString)return r.toString()===t.toString();if((n=(a=Object.keys(r)).length)!==Object.keys(t).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,a[o]))return!1;for(o=n;0!=o--;){var s=a[o];if(!e(r[s],t[s]))return!1}return!0}return r!=r&&t!=t}},515:function(e){var r,t;r=this,t=function(){function e(r,t,n){return this.id=++e.highestId,this.name=r,this.symbols=t,this.postprocess=n,this}function r(e,r,t,n){this.rule=e,this.dot=r,this.reference=t,this.data=[],this.wantedBy=n,this.isComplete=this.dot===e.symbols.length}function t(e,r){this.grammar=e,this.index=r,this.states=[],this.wants={},this.scannable=[],this.completed={}}function n(e,r){this.rules=e,this.start=r||this.rules[0].name;var t=this.byName={};this.rules.forEach((function(e){t.hasOwnProperty(e.name)||(t[e.name]=[]),t[e.name].push(e)}))}function o(){this.reset("")}function a(e,r,a){if(e instanceof n){var s=e;a=r}else s=n.fromCompiled(e,r);for(var i in this.grammar=s,this.options={keepHistory:!1,lexer:s.lexer||new o},a||{})this.options[i]=a[i];this.lexer=this.options.lexer,this.lexerState=void 0;var l=new t(s,0);this.table=[l],l.wants[s.start]=[],l.predict(s.start),l.process(),this.current=0}function s(e){var r=typeof e;if("string"===r)return e;if("object"===r){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 r=void 0===e?this.symbols.map(s).join(" "):this.symbols.slice(0,e).map(s).join(" ")+" ● "+this.symbols.slice(e).map(s).join(" ");return this.name+" → "+r},r.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},r.prototype.nextState=function(e){var t=new r(this.rule,this.dot+1,this.reference,this.wantedBy);return t.left=this,t.right=e,t.isComplete&&(t.data=t.build(),t.right=void 0),t},r.prototype.build=function(){var e=[],r=this;do{e.push(r.right.data),r=r.left}while(r.left);return e.reverse(),e},r.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,a.fail))},t.prototype.process=function(e){for(var r=this.states,t=this.wants,n=this.completed,o=0;o<r.length;o++){var s=r[o];if(s.isComplete){if(s.finish(),s.data!==a.fail){for(var i=s.wantedBy,l=i.length;l--;){var c=i[l];this.complete(c,s)}if(s.reference===this.index){var u=s.rule.name;(this.completed[u]=this.completed[u]||[]).push(s)}}}else{if("string"!=typeof(u=s.rule.symbols[s.dot])){this.scannable.push(s);continue}if(t[u]){if(t[u].push(s),n.hasOwnProperty(u)){var f=n[u];for(l=0;l<f.length;l++){var m=f[l];this.complete(s,m)}}}else t[u]=[s],this.predict(u)}}},t.prototype.predict=function(e){for(var t=this.grammar.byName[e]||[],n=0;n<t.length;n++){var o=t[n],a=this.wants[e],s=new r(o,0,this.index,a);this.states.push(s)}},t.prototype.complete=function(e,r){var t=e.nextState(r);this.states.push(t)},n.fromCompiled=function(r,t){var o=r.Lexer;r.ParserStart&&(t=r.ParserStart,r=r.ParserRules);var a=new n(r=r.map((function(r){return new e(r.name,r.symbols,r.postprocess)})),t);return a.lexer=o,a},o.prototype.reset=function(e,r){this.buffer=e,this.index=0,this.line=r?r.line:1,this.lastLineBreak=r?-r.col:0},o.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}}},o.prototype.save=function(){return{line:this.line,col:this.index-this.lastLineBreak}},o.prototype.formatError=function(e,r){var t=this.buffer;if("string"==typeof t){var n=t.split("\n").slice(Math.max(0,this.line-5),this.line),o=t.indexOf("\n",this.index);-1===o&&(o=t.length);var a=this.index-this.lastLineBreak,s=String(this.line).length;return r+=" at line "+this.line+" col "+a+":\n\n",r+=n.map((function(e,r){return i(this.line-n.length+r+1,s)+" "+e}),this).join("\n"),r+="\n"+i("",s+a)+"^\n"}return r+" at index "+(this.index-1);function i(e,r){var t=String(e);return Array(r-t.length+1).join(" ")+t}},a.fail={},a.prototype.feed=function(e){var r,n=this.lexer;for(n.reset(e,this.lexerState);;){try{if(!(r=n.next()))break}catch(e){var a=new t(this.grammar,this.current+1);throw this.table.push(a),(l=new Error(this.reportLexerError(e))).offset=this.current,l.token=e.token,l}var s=this.table[this.current];this.options.keepHistory||delete this.table[this.current-1];var i=this.current+1;a=new t(this.grammar,i),this.table.push(a);for(var l,c=void 0!==r.text?r.text:r.value,u=n.constructor===o?r.value:r,f=s.scannable,m=f.length;m--;){var p=f[m],d=p.rule.symbols[p.dot];if(d.test?d.test(u):d.type?d.type===r.type:d.literal===c){var h=p.nextState({data:u,token:r,isToken:!0,reference:i-1});a.states.push(h)}}if(a.process(),0===a.states.length)throw(l=new Error(this.reportError(r))).offset=this.current,l.token=r,l;this.options.keepHistory&&(s.lexerState=n.save()),this.current++}return s&&(this.lexerState=n.save()),this.results=this.finish(),this},a.prototype.reportLexerError=function(e){var r,t,n=e.token;return n?(r="input "+JSON.stringify(n.text[0])+" (lexer error)",t=this.lexer.formatError(n,"Syntax error")):(r="input (lexer error)",t=e.message),this.reportErrorCommon(t,r)},a.prototype.reportError=function(e){var r=(e.type?e.type+" token: ":"")+JSON.stringify(void 0!==e.value?e.value:e),t=this.lexer.formatError(e,"Syntax error");return this.reportErrorCommon(t,r)},a.prototype.reportErrorCommon=function(e,r){var t=[];t.push(e);var n=this.table.length-2,o=this.table[n],a=o.states.filter((function(e){var r=e.rule.symbols[e.dot];return r&&"string"!=typeof r}));return 0===a.length?(t.push("Unexpected "+r+". I did not expect any more input. Here is the state of my parse table:\n"),this.displayStateStack(o.states,t)):(t.push("Unexpected "+r+". Instead, I was expecting to see one of the following:\n"),a.map((function(e){return this.buildFirstStateStack(e,[])||[e]}),this).forEach((function(e){var r=e[0],n=r.rule.symbols[r.dot],o=this.getSymbolDisplay(n);t.push("A "+o+" based on:"),this.displayStateStack(e,t)}),this)),t.push(""),t.join("\n")},a.prototype.displayStateStack=function(e,r){for(var t,n=0,o=0;o<e.length;o++){var a=e[o],s=a.rule.toString(a.dot);s===t?n++:(n>0&&r.push(" ^ "+n+" more lines identical to this"),n=0,r.push(" "+s)),t=s}},a.prototype.getSymbolDisplay=function(e){return function(e){var r=typeof e;if("string"===r)return e;if("object"===r){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)},a.prototype.buildFirstStateStack=function(e,r){if(-1!==r.indexOf(e))return null;if(0===e.wantedBy.length)return[e];var t=e.wantedBy[0],n=[e].concat(r),o=this.buildFirstStateStack(t,n);return null===o?null:[e].concat(o)},a.prototype.save=function(){var e=this.table[this.current];return e.lexerState=this.lexerState,e},a.prototype.restore=function(e){var r=e.index;this.current=r,this.table[r]=e,this.table.splice(r+1),this.lexerState=e.lexerState,this.results=this.finish()},a.prototype.rewind=function(e){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[e])},a.prototype.finish=function(){var e=[],r=this.grammar.start;return this.table[this.table.length-1].states.forEach((function(t){t.rule.name===r&&t.dot===t.rule.symbols.length&&0===t.reference&&t.data!==a.fail&&e.push(t)})),e.map((function(e){return e.data}))},{Parser:a,Grammar:n,Rule:e}},e.exports?e.exports=t():r.nearley=t()},84:(e,r)=>{"use strict";function t(e){return e[0]}Object.defineProperty(r,"__esModule",{value:!0});const n=e=>[].concat(...e.map((e=>Array.isArray(e)?n(e):e)));function o(e){return e?Array.isArray(e)?n(e).join(""):e:""}const a={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:t},{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:t},{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:t},{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:t},{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:o(e[0])}}},{name:"non_local_part",symbols:["address_literal"],postprocess:function(e){return{AddressLiteral:o(e[0])}}},{name:"Mailbox",symbols:["Local_part",{literal:"@"},"non_local_part"],postprocess:function(e){return{localPart:o(e[0]),domainPart:o(e[2])}}},{name:"Local_part",symbols:["Dot_string"],postprocess:function(e){return{DotString:o(e[0])}}},{name:"Local_part",symbols:["Quoted_string"],postprocess:function(e){return{QuotedString:o(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:t},{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:t},{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:t},{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:t},{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:t},{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:t},{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:t},{name:"ALPHA_DIGIT_U",symbols:[/[0-9A-Za-z\u0080-\uFFFF]/],postprocess:t},{name:"ALPHA_DIGIT",symbols:[/[0-9A-Za-z]/],postprocess:t},{name:"ALPHA_DIG_DASH",symbols:[/[-0-9A-Za-z]/],postprocess:t},{name:"ALPHA_DIG_DASH_U",symbols:[/[-0-9A-Za-z\u0080-\uFFFF]/],postprocess:t},{name:"HEXDIG",symbols:[/[0-9A-Fa-f]/],postprocess:t},{name:"DQUOTE",symbols:[{literal:'"'}],postprocess:t}],ParserStart:"Reverse_path"};r.default=a},125:function(e,r,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.canonicalize=r.canonicalize_quoted_string=r.normalize=r.normalize_dot_string=r.parse=void 0;const o=t(515),a=n(t(84));a.default.ParserStart="Mailbox";const s=o.Grammar.fromCompiled(a.default);function i(e){const r=new o.Parser(s);if(r.feed(e),1!==r.results.length)throw new Error("address parsing failed: ambiguous grammar");return r.results[0]}function l(e){return function(){const r=e.indexOf("+");return-1===r?e:e.substr(0,r)}().replace(/\./g,"").toLowerCase()}function c(e){return`"${e.substr(1).substr(0,e.length-2).replace(/(?:\\(.))/g,"$1").replace(/(?:(["\\]))/g,"\\$1")}"`}r.parse=i,r.normalize_dot_string=l,r.normalize=function(e){var r,t;const n=i(e),o=null!==(r=n.domainPart.AddressLiteral)&&void 0!==r?r:n.domainPart.DomainName.toLowerCase();return`${null!==(t=n.localPart.QuotedString)&&void 0!==t?t:l(n.localPart.DotString)}@${o}`},r.canonicalize_quoted_string=c,r.canonicalize=function(e){var r;const t=i(e),n=null!==(r=t.domainPart.AddressLiteral)&&void 0!==r?r:t.domainPart.DomainName.toLowerCase();return`${t.localPart.QuotedString?c(t.localPart.QuotedString):t.localPart.DotString}@${n}`}},853:(e,r,t)=>{!function(e){"use strict";e.exports.is_uri=t,e.exports.is_http_uri=n,e.exports.is_https_uri=o,e.exports.is_web_uri=a,e.exports.isUri=t,e.exports.isHttpUri=n,e.exports.isHttpsUri=o,e.exports.isWebUri=a;var r=function(e){return e.match(/(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/)};function t(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 t,n,o,a,s,i="",l="";if(i=(t=r(e))[1],n=t[2],o=t[3],a=t[4],s=t[5],i&&i.length&&o.length>=0){if(n&&n.length){if(0!==o.length&&!/^\//.test(o))return}else if(/^\/\//.test(o))return;if(/^[a-z][a-z0-9\+\-\.]*$/.test(i.toLowerCase()))return l+=i+":",n&&n.length&&(l+="//"+n),l+=o,a&&a.length&&(l+="?"+a),s&&s.length&&(l+="#"+s),l}}}function n(e,n){if(t(e)){var o,a,s,i,l="",c="",u="",f="";if(l=(o=r(e))[1],c=o[2],a=o[3],s=o[4],i=o[5],l){if(n){if("https"!=l.toLowerCase())return}else if("http"!=l.toLowerCase())return;if(c)return/:(\d+)$/.test(c)&&(u=c.match(/:(\d+)$/)[0],c=c.replace(/:\d+$/,"")),f+=l+":",f+="//"+c,u&&(f+=u),f+=a,s&&s.length&&(f+="?"+s),i&&i.length&&(f+="#"+i),f}}}function o(e){return n(e,!0)}function a(e){return n(e)||o(e)}}(e=t.nmd(e))}},r={};function t(n){var o=r[n];if(void 0!==o)return o.exports;var a=r[n]={id:n,loaded:!1,exports:{}};return e[n].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};return(()=>{"use strict";t.r(n),t.d(n,{Draft:()=>Ie,Draft04:()=>Gr,Draft06:()=>et,Draft07:()=>tt,Draft2019:()=>st,JsonEditor:()=>lt,config:()=>ct,createCustomError:()=>u,createError:()=>c,createNode:()=>L,draft04Config:()=>Hr,draft06Config:()=>Yr,draft07Config:()=>rt,draft2019Config:()=>at,draftJsonEditorConfig:()=>it,getTypeOf:()=>o,isDynamicSchema:()=>H,isJsonError:()=>p,isSchemaNode:()=>M,mergeSchema:()=>E,reduceSchema:()=>K,render:()=>i,resolveAllOf:()=>j,resolveDynamicSchema:()=>G,resolveOneOf:()=>g,resolveOneOfFuzzy:()=>x,resolveRef:()=>F,resolveRefStrict:()=>k,settings:()=>m,validateAsync:()=>T});const e={AdditionalItemsError:"Array at `{{pointer}}` may not have an additional item `{{key}}`",AdditionalPropertiesError:"Additional property `{{property}}` on `{{pointer}}` does not match schema `{{schema}}`",AllOfError:"Value `{{value}}` at `{{pointer}}` does not match schema of `{{allOf}}`",AnyOfError:"Value `{{value}}` at `{{pointer}}` does not match any schema of `{{anyOf}}`",ConstError:"Expected value at `{{pointer}}` to be `{{expected}}`, but value given is `{{value}}`",containsAnyError:"The array at `{{pointer}}` must contain at least one item",ContainsArrayError:"The property at `{{pointer}}` must not be an array",ContainsError:"The array at `{{pointer}}` must contain an element that matches `{{schema}}`",ContainsMinError:"The array at `{{pointer}}` contains {{delta}} too few items matching `{{schema}}`",ContainsMaxError:"The array at `{{pointer}}` contains {{delta}} too many items matching `{{schema}}`",EnumError:"Expected given value `{{value}}` in `{{pointer}}` to be one of `{{values}}`",ForbiddenPropertyError:"Property name `{{property}}` at `{{pointer}}` is not allowed",FormatDateError:"Value `{{value}}` at `{{pointer}}` is not a valid date",FormatDateTimeError:"Value `{{value}}` at `{{pointer}}` is not a valid date-time",FormatDurationError:"Value `{{value}}` at `{{pointer}}` is not a valid duration",FormatEmailError:"Value `{{value}}` at `{{pointer}}` is not a valid email",FormatHostnameError:"Value `{{value}}` at `{{pointer}}` is not a valid hostname",FormatIPV4Error:"Value `{{value}}` at `{{pointer}}` is not a valid IPv4 address",FormatIPV4LeadingZeroError:"IPv4 addresses starting with zero are invalid, since they are interpreted as octals",FormatIPV6Error:"Value `{{value}}` at `{{pointer}}` is not a valid IPv6 address",FormatIPV6LeadingZeroError:"IPv6 addresses starting with zero are invalid, since they are interpreted as octals",FormatJsonPointerError:"Value `{{value}}` at `{{pointer}}` is not a valid json-pointer",FormatRegExError:"Value `{{value}}` at `{{pointer}}` is not a valid regular expression",FormatTimeError:"Value `{{value}}` at `{{pointer}}` is not a valid time",FormatURIError:"Value `{{value}}` at `{{pointer}}` is not a valid uri",FormatURIReferenceError:"Value `{{value}}` at `{{pointer}}` is not a valid uri-reference",FormatURITemplateError:"Value `{{value}}` at `{{pointer}}` is not a valid uri-template",FormatURLError:"Value `{{value}}` at `{{pointer}}` is not a valid url",FormatUUIDError:"Value `{{value}}` at `{{pointer}}` is not a valid uuid",InvalidDataError:"No value may be specified in `{{pointer}}`",InvalidPropertyNameError:"Invalid property name `{{property}}` at `{{pointer}}`",MaximumError:"Value in `{{pointer}}` is `{{length}}`, but should be `{{maximum}}` at maximum",MaxItemsError:"Too many items in `{{pointer}}`, should be `{{maximum}}` at most, but got `{{length}}`",MaxLengthError:"Value `{{pointer}}` should have a maximum length of `{{maxLength}}`, but got `{{length}}`.",MaxPropertiesError:"Too many properties in `{{pointer}}`, should be `{{maxProperties}}` at most, but got `{{length}}`",MinimumError:"Value in `{{pointer}}` is `{{length}}`, but should be `{{minimum}}` at minimum",MinItemsError:"Too few items in `{{pointer}}`, should be at least `{{minItems}}`, but got `{{length}}`",MinItemsOneError:"At least one item is required in `{{pointer}}`",MinLengthError:"Value `{{pointer}}` should have a minimum length of `{{minLength}}`, but got `{{length}}`.",MinLengthOneError:"A value is required in `{{pointer}}`",MinPropertiesError:"Too few properties in `{{pointer}}`, should be at least `{{minProperties}}`, but got `{{length}}`",MissingDependencyError:"The required propery '{{missingProperty}}' in `{{pointer}}` is missing",MissingOneOfPropertyError:"Value at `{{pointer}}` property: `{{property}}`",MultipleOfError:"Expected `{{value}}` in `{{pointer}}` to be multiple of `{{multipleOf}}`",MultipleOneOfError:"Value `{{value}}` should not match multiple schemas in oneOf `{{matches}}`",NoAdditionalPropertiesError:"Additional property `{{property}}` in `{{pointer}}` is not allowed",NotError:"Value `{{value}}` at pointer should not match schema `{{not}}`",OneOfError:"Value `{{value}}` in `{{pointer}}` does not match any given oneof schema",OneOfPropertyError:"Failed finding a matching oneOfProperty schema in `{{pointer}}` where `{{property}}` matches `{{value}}`",PatternError:"Value in `{{pointer}}` should match `{{description}}`, but received `{{received}}`",PatternPropertiesError:"Property `{{key}}` does not match any patterns in `{{pointer}}`. Valid patterns are: {{patterns}}",RequiredPropertyError:"The required property `{{key}}` is missing at `{{pointer}}`",SchemaWarning:"Failed retrieving a schema from '{{pointer}}' to key '{{key}}'",TypeError:"Expected `{{value}}` ({{received}}) in `{{pointer}}` to be of type `{{expected}}`",UndefinedValueError:"Value must not be undefined in `{{pointer}}`",UnevaluatedPropertyError:"Invalid unevaluated property `{{pointer}}`",UnevaluatedItemsError:"Invalid unevaluated item `{{pointer}}`",UniqueItemsError:"Items in array must be unique. Value `{{value}}` in `{{pointer}}` is a duplicate of {{duplicatePointer}}.",UnknownPropertyError:"Could not find a valid schema for property `{{pointer}}` within object",ValueNotEmptyError:"A value for `{{property}}` is required at `{{pointer}}`"},r=Object.prototype.toString;function o(e){const t=r.call(e).match(/\s([^\]]+)\]/).pop().toLowerCase();return"file"===t?"object":t}const a="object",s="array";function i(e,r={}){return e.replace(/\{\{\w+\}\}/g,(e=>{const t=e.replace(/[{}]/g,""),n=r[t],i=o(n);return i===a||i===s?JSON.stringify(n):n}))}function l(r,t,n=r){var o;return i(null!==(o=e[r])&&void 0!==o?o:n,t)}function c(e,r){return{type:"error",name:e,code:(t=e,t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()),message:l(e,r),data:r};var t}function u(e){return c.bind(null,e)}function f(e,r=[]){for(let t=0;t<e.length;t+=1){const n=e[t];Array.isArray(n)?f(n,r):r.push(n)}return r}const m={DECLARATOR_ONEOF:"oneOfProperty",EXPOSE_ONE_OF_INDEX:!0,GET_TEMPLATE_RECURSION_LIMIT:1,propertyBlacklist:["_id"],templateDefaultOptions:{addOptionalProps:!1,removeInvalidData:!1,extendDefaults:!0}};function p(e){return"error"===(null==e?void 0:e.type)}function d(e){return p(e)||e instanceof Promise}function h(e){return p(e)}function y(e){return"object"===o(e)}const{DECLARATOR_ONEOF:v,EXPOSE_ONE_OF_INDEX:$}=m;function b(e,r){$&&y(e)&&(e.__oneOfIndex=r)}function g(e,r){const{schema:t,draft:n,pointer:o}=e;if(null!=r&&t[v]){const a=[],s=t[v],i=r[t[v]];if(void 0===i)return n.errors.missingOneOfPropertyError({property:s,pointer:o,schema:t,value:r});for(let o=0;o<t.oneOf.length;o+=1){const l=e.next(t.oneOf[o]).resolveRef(),c=n.step(l,s,r);if(p(c))return c;let u=f(n.validate(c,i));if(u=u.filter(d),!(u.length>0))return b(l.schema,o),c.next(l.schema);a.push(...u)}return n.errors.oneOfPropertyError({property:s,value:i,pointer:o,schema:t,errors:a})}const a=[],s=[];for(let o=0;o<t.oneOf.length;o+=1){const i=n.resolveRef(e.next(t.oneOf[o]));let l=f(n.validate(i,r));l=l.filter(d),l.length>0?s.push(...l):a.push({index:o,schema:i.schema})}return 1===a.length?(b(a[0].schema,a[0].index),e.next(a[0].schema)):a.length>1?n.errors.multipleOneOfError({value:r,pointer:o,schema:t,matches:a}):n.errors.oneOfError({value:JSON.stringify(r),pointer:o,schema:t,oneOf:t.oneOf,errors:s})}function O(e,r){const{draft:t,schema:n,pointer:o}=e;if(null==r||null==n.properties)return-1;let a=0;const s=Object.keys(n.properties);for(let e=0;e<s.length;e+=1){const i=s[e];r[i]&&t.isValid(r[i],n.properties[i],o)&&(a+=1)}return a}function x(e,r){const{schema:t,pointer:n,draft:o}=e;if(!Array.isArray(t.oneOf))throw new Error("not a oneof schema");if(null!=r&&t[v]){const a=[],s=t[v],i=r[t[v]];if(void 0===i)return o.errors.missingOneOfPropertyError({property:s,pointer:n,schema:t,value:r});for(let n=0;n<t.oneOf.length;n+=1){const l=o.resolveRef(e.next(t.oneOf[n])),c=o.step(l,s,r);if(p(c))return c;let u=f(o.validate(c,i));if(u=u.filter(d),!(u.length>0))return b(l.schema,n),c.next(l.schema);a.push(...u)}return o.errors.oneOfPropertyError({property:s,value:i,pointer:n,schema:t,errors:a})}const a=[];for(let s=0;s<t.oneOf.length;s+=1){const i=o.resolveRef(e.next(t.oneOf[s])).schema;o.isValid(r,i,n)&&a.push({schema:i,index:s})}if(1===a.length)return b(a[0].schema,a[0].index),e.next(a[0].schema);if(y(r)){let a,s=-1,i=0;for(let n=0;n<t.oneOf.length;n+=1){const l=o.resolveRef(e.next(t.oneOf[n])),c=O(l,r);i<c&&(i=c,a=l.schema,s=n)}return void 0===a?o.errors.oneOfError({value:JSON.stringify(r),pointer:n,schema:t,oneOf:t.oneOf}):(b(a,s),e.next(a))}return a.length>1?o.errors.multipleOneOfError({matches:a,pointer:n,schema:t,value:r}):o.errors.oneOfError({value:JSON.stringify(r),pointer:n,schema:t,oneOf:t.oneOf})}function E(e,r,...t){if("error"===(null==r?void 0:r.type))return r;if("error"===(null==e?void 0:e.type))return e;if(o(e)!==o(r))return e;const n=P(e,r);for(let e=0;e<t.length;e+=1)delete n[t[e]];return n}function P(e,r,t){var n;if(y(e)&&y(r)){const t={};return[...Object.keys(e),...Object.keys(r)].filter(((e,r,t)=>t.indexOf(e)===r)).forEach((n=>t[n]=P(e[n],r[n],n))),t}if(Array.isArray(e)&&Array.isArray(r)){if("required"===t)return e.concat(r).filter(((e,r,t)=>t.indexOf(e)===r));if("items"===t){const t=[];for(let o=0;o<r.length;o+=1)y(e[o])&&y(r[o])&&e[o].type===r[o].type?t[o]=P(e[o],r[o]):t.push(null!==(n=r[o])&&void 0!==n?n:e[o]);return t}const o=[],a=[];for(let t=0;t<Math.max(e.length,r.length);t+=1)y(e[t])&&y(r[t])?o[t]=P(e[t],r[t]):void 0!==e[t]&&void 0!==r[t]?(o[t]=e[t],a.push(r[t])):void 0!==e[t]?o[t]=e[t]:void 0!==r[t]&&a.push(r[t]);return[...o,...a].filter(((e,r,t)=>t.indexOf(e)===r))}return Array.isArray(r)?r:Array.isArray(e)?e:void 0!==r?r:e}function _(e,...r){const t={};return Object.keys(e).forEach((n=>{r.includes(n)||(t[n]=e[n])})),t}function I(e,r){if(null!=e.schema.if){if(!1===e.schema.if)return e.next(e.schema.else);if(e.schema.if&&(e.schema.then||e.schema.else)){const t=e.draft.resolveRef(e.next(e.schema.if)),n=e.draft.validate(t,r);if(0===n.length&&e.schema.then){const r=e.next(e.schema.then);return e.draft.resolveRef(r)}if(0!==n.length&&e.schema.else){const r=e.next(e.schema.else);return e.draft.resolveRef(r)}}}}function A(e){return{...e}}function S(e,r){const t=I(e,r);if(t)return t;const n=A(e.schema);return e.next(_(n,"if","then","else"))}function j(e,r){const{schema:t}=e;let n=A(t);for(let o=0;o<t.allOf.length;o+=1){n=E(n,S(e.next(t.allOf[o]).resolveRef(),r).schema)}return delete n.allOf,e.next(n)}function w(e,r){const{allOf:t}=r;if(!Array.isArray(t)||0===t.length)return;let n={};return t.forEach((r=>{if(null==r)return;const t=e.createNode(r).resolveRef();n=E(n,t.schema)})),n}function D(e,...r){if(null==e)throw new Error("undefined schema");const t=this,n=E(t.schema,e,...r);return{...t,schema:n,path:[...t.path,[t.pointer,t.schema]]}}function R(){return this.draft.resolveRef(this)}function N(e,r){if(p(e))return e;if(null==e)throw new Error("undefined schema");if(!y(e)&&"boolean"!==o(e))throw new Error(`bad schema type ${o(e)}`);const t=this;return{...t,pointer:r?`${t.pointer}/${r}`:t.pointer,schema:e,path:[...t.path,[t.pointer,t.schema]]}}function M(e){return y(e)&&e.next&&e.path&&e.draft}function L(e,r,t="#"){return{draft:e,pointer:t,schema:r,path:[],next:N,merge:D,resolveRef:R}}function k(e){if(!M(e))throw new Error("schema node expected");if(null==e.schema||null==e.schema.$ref)return e;if(e.schema.getRoot){const r=e.schema.getRoot().getRef(e.schema);return e.next(r)}const r=e.draft.rootSchema.getRef(e.schema);return e.next(r)}function F(e){if(!M(e))throw new Error("expected node");if(null==e.schema)return e;if(e.schema.$recursiveRef)return F(function(e){const r=e.path;let t=0;for(let e=r.length-1;e>=0;e--){const n=r[e][1];if(n.$id&&/^https?:\/\//.test(n.$id)&&!0!==n.$recursiveAnchor){t=e;break}}const n=r.find(((e,r)=>r>=t&&!0===e[1].$recursiveAnchor));if(n)return e.next(n[1]);for(let t=r.length-1;t>=0;t--){const n=r[t][1];if(n.$id)return e.next(n)}return e.next(e.draft.rootSchema)}(e));if(null==e.schema.$ref)return e;const r=e.draft.rootSchema.getRef(e.schema);return!1===r?e.next(r):e.merge(r,"$ref")}function T(e,r,t){const{schema:n,pointer:o,onError:a}={schema:e.rootSchema,pointer:"#",...t};let s=e.validate(e.createNode(n,o),r);if(a){s=f(s);const e=function(e){return function r(t){return Array.isArray(t)?((t=f(t)).forEach(r),t):(p(t)&&e(t),t)}}(a);for(let r=0;r<s.length;r+=1){const t=s[r];t instanceof Promise?t.then(e):p(t)&&a(t)}}return Promise.all(s).then(f).then((e=>e.filter(h))).catch((e=>{throw console.log("Failed resolving promises",e.message),console.log(e.stack),e}))}function U(e,r){var t;const{schema:n}=e,o=null!==(t=n.dependencies)&&void 0!==t?t:n.dependentSchemas;if(!y(o)||!y(r))return;let a=!1,s={required:[]};return Object.keys(o).forEach((t=>{var i,l;if(null==r[t]&&!(null===(i=n.required)||void 0===i?void 0:i.includes(t))&&!(null===(l=s.required)||void 0===l?void 0:l.includes(t)))return;const c=o[t];if(Array.isArray(c))return a=!0,void s.required.push(...c);if(y(c)){a=!0;const r=e.next(c).resolveRef();s=E(s,r.schema)}else;})),a?(s.required=(i=s.required).filter(((e,r)=>i.indexOf(e)===r)),s):void 0;var i}function C(e,r){const{draft:t,schema:n}=e;if(!Array.isArray(n.anyOf)||0===n.anyOf.length)return;let o;return n.anyOf.forEach((n=>{const a=t.resolveRef(e.next(n));0===t.validate(a,r).length&&(o=o?E(o,a.schema):a.schema)})),o?e.next(o):void 0}function V(e,r){const{anyOf:t}=e.schema;if(!Array.isArray(t)||0===t.length)return e;const n=C(e,r);if(n){const{pointer:n,schema:o}=e;return e.draft.errors.anyOfError({pointer:n,schema:o,value:r,anyOf:JSON.stringify(t)})}return e.merge(n.schema,"anyOf")}const z=["allOf","anyOf","oneOf","dependencies","if","then","else"],q=["allOf","anyOf","oneOf","dependencies","if"];function H(e){const r=Object.keys(e);return-1!==q.findIndex((e=>r.includes(e)))}function G(e,r){let t,n;const o=e.draft.resolveRef(e),{draft:a}=o,s=M(o)?o.schema:o;if(s.oneOf){const e=x(o,r);p(e)?n=e:e&&(t=E(null!=t?t:{},e.schema))}if(Array.isArray(s.allOf)){const e=s.allOf.map((e=>{if(H(e)){const t=G(o.next(e),r);if(null==t||p(t))return t;return _(E(e,t.schema),...z)}return e}));if(e.length>0){t=E(null!=t?t:{},w(a,{allOf:e}))}}const i=C(o,r);i&&i.schema&&(t=E(null!=t?t:{},i.schema));const l=U(o,r);l&&(t=E(null!=t?t:{},l));const c=I(o,r);if(M(c)&&(t=E(null!=t?t:{},c.schema)),null==t)return n;if(p(t))return t;const u=G(o.next(t),r);M(u)&&(t=E(t,u.schema));const f=_(t,...z);return o.next(f)}const J=["allOf","anyOf","oneOf","dependencies","if","then","else"];function K(e,r){const t=G(e,r);return M(t)?e.merge(t.schema,...J):t||e}var B=Function.prototype.toString,Z=Object.create,W=Object.prototype.toString,Q=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,r){this._keys.push(e),this._values.push(r)},e}();var X="undefined"!=typeof WeakMap?function(){return new WeakMap}:function(){return new Q};function Y(e){if(!e)return Z(null);var r=e.constructor;if(r===Object)return e===Object.prototype?{}:Z(e);if(r&&~B.call(r).indexOf("[native code]"))try{return new r}catch(e){}return Z(e)}var ee="g"===/test/g.flags?function(e){return e.flags}:function(e){var r="";return e.global&&(r+="g"),e.ignoreCase&&(r+="i"),e.multiline&&(r+="m"),e.unicode&&(r+="u"),e.sticky&&(r+="y"),r};function re(e){var r=W.call(e);return r.substring(8,r.length-1)}var te="undefined"!=typeof Symbol?function(e){return e[Symbol.toStringTag]||re(e)}:re,ne=Object.defineProperty,oe=Object.getOwnPropertyDescriptor,ae=Object.getOwnPropertyNames,se=Object.getOwnPropertySymbols,ie=Object.prototype,le=ie.hasOwnProperty,ce=ie.propertyIsEnumerable,ue="function"==typeof se;var fe=ue?function(e){return ae(e).concat(se(e))}:ae;function me(e,r,t){for(var n=fe(e),o=0,a=n.length,s=void 0,i=void 0;o<a;++o)if("callee"!==(s=n[o])&&"caller"!==s)if(i=oe(e,s)){i.get||i.set||(i.value=t.copier(i.value,t));try{ne(r,s,i)}catch(e){r[s]=i.value}}else r[s]=t.copier(e[s],t);return r}function pe(e,r){return e.slice(0)}function de(e,r){var t=new r.Constructor;return r.cache.set(e,t),e.forEach((function(e,n){t.set(n,r.copier(e,r))})),t}var he=ue?function(e,r){var t=Y(r.prototype);for(var n in r.cache.set(e,t),e)le.call(e,n)&&(t[n]=r.copier(e[n],r));for(var o=se(e),a=0,s=o.length,i=void 0;a<s;++a)i=o[a],ce.call(e,i)&&(t[i]=r.copier(e[i],r));return t}:function(e,r){var t=Y(r.prototype);for(var n in r.cache.set(e,t),e)le.call(e,n)&&(t[n]=r.copier(e[n],r));return t};function ye(e,r){return new r.Constructor(e.valueOf())}function ve(e,r){return e}function $e(e,r){var t=new r.Constructor;return r.cache.set(e,t),e.forEach((function(e){t.add(r.copier(e,r))})),t}var be=Array.isArray,ge=Object.assign,Oe=Object.getPrototypeOf||function(e){return e.__proto__},xe={array:function(e,r){var t=new r.Constructor;r.cache.set(e,t);for(var n=0,o=e.length;n<o;++n)t[n]=r.copier(e[n],r);return t},arrayBuffer:pe,blob:function(e,r){return e.slice(0,e.size,e.type)},dataView:function(e,r){return new r.Constructor(pe(e.buffer))},date:function(e,r){return new r.Constructor(e.getTime())},error:ve,map:de,object:he,regExp:function(e,r){var t=new r.Constructor(e.source,ee(e));return t.lastIndex=e.lastIndex,t},set:$e},Ee=ge({},xe,{array:function(e,r){var t=new r.Constructor;return r.cache.set(e,t),me(e,t,r)},map:function(e,r){return me(e,de(e,r),r)},object:function(e,r){var t=Y(r.prototype);return r.cache.set(e,t),me(e,t,r)},set:function(e,r){return me(e,$e(e,r),r)}});function Pe(e){var r=function(e){return{Arguments:e.object,Array:e.array,ArrayBuffer:e.arrayBuffer,Blob:e.blob,Boolean:ye,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:ye,Object:e.object,Promise:ve,RegExp:e.regExp,Set:e.set,String:ye,WeakMap:ve,WeakSet:ve,Uint8Array:e.arrayBuffer,Uint8ClampedArray:e.arrayBuffer,Uint16Array:e.arrayBuffer,Uint32Array:e.arrayBuffer,Uint64Array:e.arrayBuffer}}(ge({},xe,e)),t=r.Array,n=r.Object;function o(e,o){if(o.prototype=o.Constructor=void 0,!e||"object"!=typeof e)return e;if(o.cache.has(e))return o.cache.get(e);if(o.prototype=Oe(e),o.Constructor=o.prototype&&o.prototype.constructor,!o.Constructor||o.Constructor===Object)return n(e,o);if(be(e))return t(e,o);var a=r[te(e)];return a?a(e,o):"function"==typeof e.then?e:n(e,o)}return function(e){return o(e,{Constructor:void 0,cache:X(),copier:o,prototype:void 0})}}Pe(ge({},Ee,{}));const _e=Pe({});class Ie{constructor(e,r){this.remotes={},this.errors={},this.typeKeywords={},this.validateKeyword={},this.validateType={},this.validateFormat={},this.config=e,this.typeKeywords=_e(e.typeKeywords),this.validateKeyword=Object.assign({},e.validateKeyword),this.validateType=Object.assign({},e.validateType),this.validateFormat=Object.assign({},e.validateFormat),this.errors=Object.assign({},e.errors),this.setSchema(r)}get rootSchema(){return this.__rootSchema}set rootSchema(e){null!=e&&(this.__rootSchema=this.config.compileSchema(this,e))}addRemoteSchema(e,r){this.config.addRemoteSchema(this,e,r)}compileSchema(e){var r;return this.config.compileSchema(this,e,null!==(r=this.rootSchema)&&void 0!==r?r:e)}createSchemaOf(e){return this.config.createSchemaOf(e)}each(e,r,t,n){const o=this.createNode(null!=t?t:this.rootSchema,n);return this.config.each(o,e,r)}eachSchema(e,r=this.rootSchema){return this.config.eachSchema(r,e)}getChildSchemaSelection(e,r){return this.config.getChildSchemaSelection(this,e,r)}getSchema(e){const r=this.getSchemaNode(e);return M(r)?r.schema:r}getSchemaNode(e){return this.config.getSchema(this,e)}getTemplate(e,r,t=this.config.templateDefaultOptions){return this.config.getTemplate(this,e,r,t)}isValid(e,r,t){return this.config.isValid(this,e,r,t)}createNode(e,r="#"){return this.config.createNode(this,e,r)}resolveAnyOf(e,r){return this.config.resolveAnyOf(e,r)}resolveAllOf(e,r){return this.config.resolveAllOf(e,r)}resolveRef(e){return this.config.resolveRef(e)}resolveOneOf(e,r){return this.config.resolveOneOf(e,r)}setSchema(e){this.rootSchema=e}step(e,r,t){return this.config.step(e,r,t)}validate(e,r=this.rootSchema,t){if(M(e)){const t=r,n=e;return this.config.validate(n,t)}if(p(e))return[e];const n=this.createNode(r,t);return this.config.validate(n,e)}}function Ae(e,r,t,n){const o=r[e];y(o)&&Object.keys(o).forEach((r=>{Array.isArray(o[r])||("$defs"===r?Ae("$defs",o[r],t,`${n}/${e}/$defs`):je(o[r],t,`${n}/${e}/${r}`))}))}function Se(e,r,t,n){const o=r[e];Array.isArray(o)&&o.forEach(((r,o)=>je(r,t,`${n}/${e}/${o}`)))}function je(e,r,t=""){void 0!==e&&!0!==r(e,t)&&y(e)&&(Ae("properties",e,r,t),Ae("patternProperties",e,r,t),je(e.not,r,`${t}/not`),je(e.additionalProperties,r,`${t}/additionalProperties`),Ae("dependencies",e,r,t),y(e.items)&&je(e.items,r,`${t}/items`),Se("items",e,r,t),je(e.additionalItems,r,`${t}/additionalItems`),Se("allOf",e,r,t),Se("anyOf",e,r,t),Se("oneOf",e,r,t),je(e.if,r,`${t}/if`),je(e.then,r,`${t}/then`),je(e.else,r,`${t}/else`),Ae("definitions",e,r,t),Ae("$defs",e,r,t))}const we=/(#)+$/,De=/#$/,Re=/^[#/]+/,Ne=/^[^:]+:\/\/[^/]+\//,Me=/\/[^/]*$/,Le=/#.*$/,ke=/^urn:uuid:[0-9A-Fa-f]/;function Fe(e,r){return null==e&&null==r?"#":null==r?e.replace(De,""):ke.test(r)?r:null==e||""===e||"#"===e?r.replace(De,""):"#"===r[0]?`${e.replace(Le,"")}${r.replace(we,"")}`:Ne.test(r)?r.replace(De,""):Ne.test(e)&&r.startsWith("/")?`${e.replace(/(^[^:]+:\/\/[^/]+)(.*)/,"$1")}/${r.replace(Re,"")}`:`${e.replace(Me,"")}/${r.replace(Re,"")}`}var Te=t(546),Ue=t.n(Te);const Ce=/(#)+$/g,Ve=["",null,"#"];const ze=/(#)+$/g,qe=e=>"object"===o(e);function He(e,r,t){var n,o,a,s,i;let l,c;if(l=qe(t)?t.__ref||t.$ref:t,null==l)return r;const u=l.replace(ze,"");if(null!=e.remotes[u])return c=e.remotes[u],c&&c.$ref?He(e,c,c):c;const f=null===(n=e.anchors)||void 0===n?void 0:n[l];if(f)return(0,Te.get)(r,f);if(null!=e.ids[l])return c=(0,Te.get)(r,e.ids[l]),c&&c.$ref?He(e,r,c):c;const m=l,p=function(e){if(Ve.includes(e))return[];if(-1===(e=e.replace(Ce,"")).indexOf("#"))return[e.replace(/(#|\/)+$/g,"")];if(0===e.indexOf("#"))return[e.replace(Ce,"")];const r=e.split("#");return r[0]=r[0].replace(/(#|\/)+$/g,""),r[1]=`#${r[1].replace(Ce,"")}`,r}(l);if(0===p.length)return r;if(1===p.length){if(l=p[0],e.remotes[l]&&(c=e.remotes[l],c&&c.$ref))return He(e,r,c);if(e.ids[l])return c=(0,Te.get)(r,e.ids[l]),c&&c.$ref?He(e,r,c):c;const t=null===(o=r.getContext)||void 0===o?void 0:o.call(r).ids[l];if(t)return He(e,r,t)}if(2===p.length){const t=p[0];l=p[1];const n=null!==(a=e.remotes[t])&&void 0!==a?a:e.remotes[`${t}/`];if(n)return n.getContext&&null!=n.getContext().anchors[m]?n.getRef(m):n.getRef?n.getRef(l):He(e,n,l);const o=null!==(s=e.ids[t])&&void 0!==s?s:e.ids[`${t}/`];if(o)return He(e,(0,Te.get)(r,o),l)}return c