json-schema-library 7.3.1 → 7.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci.yaml +45 -0
- package/README.md +5 -2
- package/dist/jsonSchemaLibrary.js +1 -1
- package/dist/lib/compile/index.d.ts +3 -2
- package/dist/lib/getSchema.d.ts +5 -5
- package/dist/module/lib/compile/index.js +14 -2
- package/dist/module/lib/draft06/compile/index.js +9 -0
- package/dist/module/lib/eachSchema.js +1 -1
- package/dist/module/lib/getSchema.js +10 -9
- package/lib/compile/index.ts +14 -2
- package/lib/draft06/compile/index.ts +8 -0
- package/lib/eachSchema.ts +1 -1
- package/lib/getSchema.ts +12 -11
- package/package.json +5 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [develop]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [develop]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
ci:
|
|
11
|
+
name: install
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v3
|
|
15
|
+
- uses: actions/setup-node@v3
|
|
16
|
+
with:
|
|
17
|
+
node-version: "16"
|
|
18
|
+
cache: "yarn"
|
|
19
|
+
- name: Install dependencies
|
|
20
|
+
run: yarn --frozen-lockfile
|
|
21
|
+
- name: unit tests
|
|
22
|
+
run: yarn test:unit:ci
|
|
23
|
+
- uses: dorny/test-reporter@v1.6.0
|
|
24
|
+
with:
|
|
25
|
+
name: unit test results
|
|
26
|
+
path: test-result-unit.json
|
|
27
|
+
reporter: mocha-json
|
|
28
|
+
- name: Test spec v4
|
|
29
|
+
run: yarn test:spec:4:ci
|
|
30
|
+
- name: Test spec v6
|
|
31
|
+
run: yarn test:spec:6:ci
|
|
32
|
+
- name: Archive code coverage results
|
|
33
|
+
uses: actions/upload-artifact@v3
|
|
34
|
+
with:
|
|
35
|
+
name: spec v6 test results
|
|
36
|
+
path: test-result-spec6.json
|
|
37
|
+
- name: Test spec v7
|
|
38
|
+
run: yarn test:spec:7:ci
|
|
39
|
+
- uses: dorny/test-reporter@v1.6.0
|
|
40
|
+
with:
|
|
41
|
+
fail-on-error: false
|
|
42
|
+
name: spec test results # Name of the check run which will be created
|
|
43
|
+
path: test-result-spec*.json # Path to test results
|
|
44
|
+
reporter: mocha-json # Format of test results
|
|
45
|
+
list-suites: "failed"
|
package/README.md
CHANGED
|
@@ -18,8 +18,10 @@
|
|
|
18
18
|
|
|
19
19
|
`yarn add json-schema-library`
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
-
|
|
21
|
+
[](https://github.com/sagold/json-schema-library/actions/workflows/ci.yaml)
|
|
22
|
+
[](https://github.com/sagold/json-schema-library/actions/workflows/ci.yaml)
|
|
23
|
+
|
|
24
|
+
This library currently supports draft4, draft6 and draft7 features [@see benchmark](https://github.com/sagold/json-schema-benchmark)
|
|
23
25
|
|
|
24
26
|
|
|
25
27
|
**usage**
|
|
@@ -35,6 +37,7 @@ const jsonSchema: Draft = new Draft07(myJsonSchema);
|
|
|
35
37
|
const errors: JSONError[] = jsonSchema.validate(myData);
|
|
36
38
|
```
|
|
37
39
|
|
|
40
|
+
|
|
38
41
|
What follows is a description of the main draft methods.
|
|
39
42
|
|
|
40
43
|
## Draft methods
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see jsonSchemaLibrary.js.LICENSE.txt */
|
|
2
|
-
!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 __webpack_modules__={996: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 i(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(r){return e.propertyIsEnumerable(r)})):[]}(e))}function a(e,r){try{return r in e}catch(e){return!1}}function s(e,r,t){var o={};return t.isMergeableObject(e)&&i(e).forEach((function(r){o[r]=n(e[r],t)})),i(r).forEach((function(i){(function(e,r){return a(e,r)&&!(Object.hasOwnProperty.call(e,r)&&Object.propertyIsEnumerable.call(e,r))})(e,i)||(a(e,i)&&t.isMergeableObject(r[i])?o[i]=function(e,r){if(!r.customMerge)return l;var t=r.customMerge(e);return"function"==typeof t?t:l}(i,t)(e[i],r[i],t):o[i]=n(r[i],t))})),o}function l(e,t,i){(i=i||{}).arrayMerge=i.arrayMerge||o,i.isMergeableObject=i.isMergeableObject||r,i.cloneUnlessOtherwiseSpecified=n;var a=Array.isArray(t);return a===Array.isArray(e)?a?i.arrayMerge(e,t,i):s(e,t,i):n(t,i)}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 u=l;e.exports=u},723:(e,r,t)=>{"use strict";const n=t(802);var o;!function(e){e.RULES=[{name:"Grammar",bnf:[["RULE_S*","%Atomic*","EOF"]]},{name:"%Atomic",bnf:[["Production","RULE_S*"]],fragment:!0},{name:"Production",bnf:[["NCName","RULE_S*",'"::="',"RULE_WHITESPACE*","Choice","RULE_WHITESPACE*","RULE_EOL+","RULE_S*"]]},{name:"NCName",bnf:[[/[a-zA-Z][a-zA-Z_0-9]*/]]},{name:"Choice",bnf:[["SequenceOrDifference","%_Choice_1*"]],fragment:!0},{name:"%_Choice_1",bnf:[["RULE_WHITESPACE*",'"|"',"RULE_WHITESPACE*","SequenceOrDifference"]],fragment:!0},{name:"SequenceOrDifference",bnf:[["Item","RULE_WHITESPACE*","%_Item_1?"]]},{name:"%_Item_1",bnf:[["Minus","Item"],["Item*"]],fragment:!0},{name:"Minus",bnf:[['"-"']]},{name:"Item",bnf:[["RULE_WHITESPACE*","%Primary","PrimaryDecoration?"]],fragment:!0},{name:"PrimaryDecoration",bnf:[['"?"'],['"*"'],['"+"']]},{name:"DecorationName",bnf:[['"ebnf://"',/[^\x5D#]+/]]},{name:"%Primary",bnf:[["NCName"],["StringLiteral"],["CharCode"],["CharClass"],["SubItem"]],fragment:!0},{name:"SubItem",bnf:[['"("',"RULE_WHITESPACE*","Choice","RULE_WHITESPACE*",'")"']]},{name:"StringLiteral",bnf:[["'\"'",/[^"]*/,"'\"'"],['"\'"',/[^']*/,'"\'"']],pinned:1},{name:"CharCode",bnf:[['"#x"',/[0-9a-zA-Z]+/]]},{name:"CharClass",bnf:[["'['","'^'?","%RULE_CharClass_1+",'"]"']]},{name:"%RULE_CharClass_1",bnf:[["CharCodeRange"],["CharRange"],["CharCode"],["RULE_Char"]],fragment:!0},{name:"RULE_Char",bnf:[[/\x09/],[/\x0A/],[/\x0D/],[/[\x20-\x5c]/],[/[\x5e-\uD7FF]/],[/[\uE000-\uFFFD]/]]},{name:"CharRange",bnf:[["RULE_Char",'"-"',"RULE_Char"]]},{name:"CharCodeRange",bnf:[["CharCode",'"-"',"CharCode"]]},{name:"RULE_WHITESPACE",bnf:[["%RULE_WHITESPACE_CHAR*"],["Comment","RULE_WHITESPACE*"]]},{name:"RULE_S",bnf:[["RULE_WHITESPACE","RULE_S*"],["RULE_EOL","RULE_S*"]]},{name:"%RULE_WHITESPACE_CHAR",bnf:[[/\x09/],[/\x20/]],fragment:!0},{name:"Comment",bnf:[['"/*"',"%RULE_Comment_Body*",'"*/"']]},{name:"%RULE_Comment_Body",bnf:[['!"*/"',/[^*]/]],fragment:!0},{name:"RULE_EOL",bnf:[[/\x0D/,/\x0A/],[/\x0A/],[/\x0D/]]},{name:"Link",bnf:[["'['","Url","']'"]]},{name:"Url",bnf:[[/[^\x5D:/?#]/,'"://"',/[^\x5D#]+/,"%Url1?"]]},{name:"%Url1",bnf:[['"#"',"NCName"]],fragment:!0}],e.defaultParser=new n.Parser(e.RULES,{debug:!1});const r=/^(!|&)/,t=/(\?|\+|\*)$/,o=/^%/;function i(e,i){if("string"==typeof e){if(r.test(e))return"";if(o.test(e)){let r=t.exec(e),o=r?r[0]+" ":"",s=function(e,r){let t=n.findRuleByName(e,r);return t&&1==t.bnf.length&&1==t.bnf[0].length&&(t.bnf[0][0]instanceof RegExp||'"'==t.bnf[0][0][0]||"'"==t.bnf[0][0][0])}(e,i);return s?a(e,i)+o:"("+a(e,i)+")"+o}return e}return e.source.replace(/\\(?:x|u)([a-zA-Z0-9]+)/g,"#x$1").replace(/\[\\(?:x|u)([a-zA-Z0-9]+)-\\(?:x|u)([a-zA-Z0-9]+)\]/g,"[#x$1-#x$2]")}function a(e,r){let t=n.findRuleByName(e,r);return t?t.bnf.map((e=>function(e,r){return e.map((e=>i(e,r))).join(" ")}(e,r))).join(" | "):"RULE_NOT_FOUND {"+e+"}"}function s(e){let r=[];return e.grammarRules.forEach((t=>{if(!/^%/.test(t.name)){let n=t.recover?" /* { recoverUntil="+t.recover+" } */":"";r.push(t.name+" ::= "+a(t.name,e)+n)}})),r.join("\n")}e.emit=s;let l=0;function u(e){return new RegExp(e.replace(/#x([a-zA-Z0-9]{4})/g,"\\u$1").replace(/#x([a-zA-Z0-9]{3})/g,"\\u0$1").replace(/#x([a-zA-Z0-9]{2})/g,"\\x$1").replace(/#x([a-zA-Z0-9]{1})/g,"\\x0$1"))}function f(e,r,t){let n=null,o=[];return r.children.forEach(((i,a)=>{"Minus"==i.type&&function(e,r){throw console.log("reberia restar "+r+" a "+e),new Error("Difference not supported yet")}(n,i);let s=r.children[a+1];s=s&&"PrimaryDecoration"==s.type&&s.text||"";switch(i.type){case"SubItem":let r="%"+(t+l++);c(e,i,r),o.push(""+r+s);break;case"NCName":case"StringLiteral":o.push(""+i.text+s);break;case"CharCode":case"CharClass":if(s){let r={name:"%"+(t+l++),bnf:[[u(i.text)]]};e.push(r),o.push(""+r.name+s)}else o.push(u(i.text));break;case"PrimaryDecoration":break;default:throw new Error(" HOW SHOULD I PARSE THIS? "+i.type+" -> "+JSON.stringify(i.text))}n=i})),o}function c(e,r,t){let n=r.children.filter((e=>"SequenceOrDifference"==e.type)).map((r=>f(e,r,t))),o={name:t,bnf:n},i=null;n.forEach((e=>{i=i||e.recover,delete e.recover})),0==t.indexOf("%")&&(o.fragment=!0),i&&(o.recover=i),e.push(o)}function p(r,t=e.defaultParser){let n=t.getAST(r);if(!n)throw new Error("Could not parse "+r);if(n.errors&&n.errors.length)throw n.errors[0];let o=[];return n.children.filter((e=>"Production"==e.type)).map((e=>{let r=e.children.filter((e=>"NCName"==e.type))[0].text;c(o,e,r)})),o}e.getRules=p,e.Transform=function(r,t=e.defaultParser){return p(r.join(""),t)};class m extends n.Parser{constructor(r,t){super(p(r,t&&!0===t.debugRulesParser?new n.Parser(e.RULES,{debug:!0}):e.defaultParser),t)}emitSource(){return s(this)}}e.Parser=m}(o||(o={})),r.Z=o},802:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Parser=exports.findRuleByName=exports.parseRuleName=exports.escapeRegExp=exports.readToken=void 0;const UPPER_SNAKE_RE=/^[A-Z0-9_]+$/,decorationRE=/(\?|\+|\*)$/,preDecorationRE=/^(@|&|!)/,WS_RULE="WS",TokenError_1=__webpack_require__(239);function readToken(e,r){let t=r.exec(e);return t&&0==t.index?0==t[0].length&&r.source.length>0?null:{type:null,text:t[0],rest:e.substr(t[0].length),start:0,end:t[0].length-1,fullText:t[0],errors:[],children:[],parent:null}:null}function escapeRegExp(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function fixRest(e){e.rest="",e.children&&e.children.forEach((e=>fixRest(e)))}function fixPositions(e,r){e.start+=r,e.end+=r,e.children&&e.children.forEach((r=>fixPositions(r,e.start)))}function agregateErrors(e,r){r.errors&&r.errors.length&&r.errors.forEach((r=>e.push(r))),r.children&&r.children.forEach((r=>agregateErrors(e,r)))}function parseRuleName(e){let r=decorationRE.exec(e),t=preDecorationRE.exec(e),n=r&&r[0]||"",o=t&&t[0]||"",i={raw:e,name:e.replace(decorationRE,"").replace(preDecorationRE,""),isOptional:"?"==n||"*"==n,allowRepetition:"+"==n||"*"==n,atLeastOne:"+"==n,lookupPositive:"&"==o,lookupNegative:"!"==o,pinned:"@"==o,lookup:!1,isLiteral:!1};return i.isLiteral="'"==i.name[0]||'"'==i.name[0],i.lookup=i.lookupNegative||i.lookupPositive,i}function findRuleByName(e,r){let t=parseRuleName(e);return r.cachedRules[t.name]||null}function stripRules(e,r){if(e.children){let t=e.children.filter((e=>e.type&&r.test(e.type)));for(let r=0;r<t.length;r++){let n=e.children.indexOf(t[r]);-1!=n&&e.children.splice(n,1)}e.children.forEach((e=>stripRules(e,r)))}}exports.readToken=readToken,exports.escapeRegExp=escapeRegExp,exports.parseRuleName=parseRuleName,exports.findRuleByName=findRuleByName;const ignoreMissingRules=["EOF"];class Parser{constructor(e,r){this.grammarRules=e,this.options=r,this.cachedRules={},this.debug=!!r&&!0===r.debug;let t=[],n=[];if(e.forEach((e=>{let r=parseRuleName(e.name);if(r.name in this.cachedRules)t.push("Duplicated rule "+r.name);else{if(this.cachedRules[r.name]=e,e.bnf&&e.bnf.length)e.bnf.forEach((r=>{if("string"==typeof r[0]){if(parseRuleName(r[0]).name==e.name){let r="Left recursion is not allowed, rule: "+e.name;-1==t.indexOf(r)&&t.push(r)}}r.forEach((e=>{if("string"==typeof e){let r=parseRuleName(e);r.isLiteral||-1!=n.indexOf(r.name)||-1!=ignoreMissingRules.indexOf(r.name)||n.push(r.name)}}))}));else{let r="Missing rule content, rule: "+e.name;-1==t.indexOf(r)&&t.push(r)}WS_RULE==e.name&&(e.implicitWs=!1),e.implicitWs&&-1==n.indexOf(WS_RULE)&&n.push(WS_RULE),e.recover&&-1==n.indexOf(e.recover)&&n.push(e.recover)}})),n.forEach((e=>{e in this.cachedRules||t.push("Missing rule "+e)})),t.length)throw new Error(t.join("\n"))}getAST(e,r){r||(r=this.grammarRules.filter((e=>!e.fragment&&0!=e.name.indexOf("%")))[0].name);let t=this.parse(e,r);if(t){agregateErrors(t.errors,t),fixPositions(t,0),stripRules(t,/^%/),this.options&&this.options.keepUpperRules||stripRules(t,UPPER_SNAKE_RE);let e=t.rest;e&&new TokenError_1.TokenError("Unexpected end of input: \n"+e,t),fixRest(t),t.rest=e}return t}emitSource(){return"CANNOT EMIT SOURCE FROM BASE Parser"}parse(txt,target,recursion=0){let out=null,type=parseRuleName(target),expr,printable=this.debug&&!UPPER_SNAKE_RE.test(type.name);printable&&console.log(new Array(recursion).join("│ ")+"Trying to get "+target+" from "+JSON.stringify(txt.split("\n")[0]));let realType=type.name,targetLex=findRuleByName(type.name,this);if("EOF"==type.name){if(txt.length)return null;if(0==txt.length)return{type:"EOF",text:"",rest:"",start:0,end:0,fullText:"",errors:[],children:[],parent:null}}try{if(!targetLex&&type.isLiteral){let src=eval(type.name);if(""===src)return{type:"%%EMPTY%%",text:"",rest:txt,start:0,end:0,fullText:"",errors:[],children:[],parent:null};expr=new RegExp(escapeRegExp(src)),realType=null}}catch(e){return e instanceof ReferenceError&&console.error(e),null}if(expr){let e=readToken(txt,expr);if(e)return e.type=realType,e}else{let e=targetLex.bnf;e instanceof Array&&e.forEach((e=>{if(out)return;let r=null,t={type:type.name,text:"",children:[],end:0,errors:[],fullText:"",parent:null,start:0,rest:txt};targetLex.fragment&&(t.fragment=!0);let n=txt,o=0,i=e.length>0,a=!1;for(let s=0;s<e.length;s++)if("string"==typeof e[s]){let l,u=parseRuleName(e[s]);i=i&&u.isOptional;let f=!1;do{if(l=null,targetLex.implicitWs&&(l=this.parse(n,u.name,recursion+1),!l)){let e;do{if(e=this.parse(n,WS_RULE,recursion+1),!e)break;t.text=t.text+e.text,t.end=t.text.length,e.parent=t,t.children.push(e),n=n.substr(e.text.length),o+=e.text.length}while(e&&e.text.length)}if(l=l||this.parse(n,u.name,recursion+1),u.lookupNegative){if(l)return;break}if(u.lookupPositive&&!l)return;if(!l){if(u.isOptional)break;if(u.atLeastOne&&f)break}if(l&&targetLex.pinned==s+1&&(r=l,printable&&console.log(new Array(recursion+1).join("│ ")+"└─ "+l.type+" PINNED")),l||(l=this.parseRecovery(targetLex,n,recursion+1)),!l){if(!r)return;out=t,l={type:"SyntaxError",text:n,children:[],end:n.length,errors:[],fullText:"",parent:null,start:0,rest:""},n.length?new TokenError_1.TokenError(`Unexpected end of input. Expecting ${u.name} Got: ${n}`,l):new TokenError_1.TokenError(`Unexpected end of input. Missing ${u.name}`,l),printable&&console.log(new Array(recursion+1).join("│ ")+"└─ "+l.type+" "+JSON.stringify(l.text))}if(f=!0,a=!0,"%%EMPTY%%"==l.type)break;l.start+=o,l.end+=o,!u.lookupPositive&&l.type&&(l.fragment?l.children&&l.children.forEach((e=>{e.start+=o,e.end+=o,e.parent=t,t.children.push(e)})):(l.parent=t,t.children.push(l))),u.lookup&&(l.lookup=!0),printable&&console.log(new Array(recursion+1).join("│ ")+"└─ "+l.type+" "+JSON.stringify(l.text)),u.lookup||l.lookup||(t.text=t.text+l.text,t.end=t.text.length,n=n.substr(l.text.length),o+=l.text.length),t.rest=n}while(l&&u.allowRepetition&&n.length&&!l.lookup)}else{let r=readToken(n,e[s]);if(!r)return;printable&&console.log(new Array(recursion+1).join("│ ")+"└> "+JSON.stringify(r.text)+e[s].source),a=!0,r.start+=o,r.end+=o,t.text=t.text+r.text,t.end=t.text.length,n=n.substr(r.text.length),o+=r.text.length,t.rest=n}a&&(out=t,printable&&console.log(new Array(recursion).join("│ ")+"├<─┴< PUSHING "+out.type+" "+JSON.stringify(out.text)))})),out&&targetLex.simplifyWhenOneChildren&&1==out.children.length&&(out=out.children[0])}return out||printable&&console.log(target+" NOT RESOLVED FROM "+txt),out}parseRecovery(e,r,t){if(e.recover&&r.length){let n=this.debug;n&&console.log(new Array(t+1).join("│ ")+"Trying to recover until token "+e.recover+" from "+JSON.stringify(r.split("\n")[0]+r.split("\n")[1]));let o,i={type:"SyntaxError",text:"",children:[],end:0,errors:[],fullText:"",parent:null,start:0,rest:""};do{if(o=this.parse(r,e.recover,t+1),o){new TokenError_1.TokenError('Unexpected input: "'+i.text+`" Expecting: ${e.name}`,i);break}i.text=i.text+r[0],i.end=i.text.length,r=r.substr(1)}while(!o&&r.length>0);if(i.text.length>0&&o)return n&&console.log(new Array(t+1).join("│ ")+"Recovered text: "+JSON.stringify(i.text)),i}return null}}exports.Parser=Parser,exports.default=Parser},239:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.TokenError=void 0;class t extends Error{constructor(e,r){if(super(e),this.message=e,this.token=r,!r||!r.errors)throw this;r.errors.push(this)}inspect(){return"SyntaxError: "+this.message}}r.TokenError=t},63: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,i;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=(i=Object.keys(r)).length)!==Object.keys(t).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,i[o]))return!1;for(o=n;0!=o--;){var a=i[o];if(!e(r[a],t[a]))return!1}return!0}return r!=r&&t!=t}},483:e=>{"use strict";e.exports=function(e){return Array.isArray(e)?e:"[object Object]"===Object.prototype.toString.call(e)?Object.keys(e).map((function(r){return e[r]})):[]}},453:e=>{"use strict";e.exports=function(e,r){Array.isArray(e)?e.forEach(r):"[object Object]"===Object.prototype.toString.call(e)&&Object.keys(e).forEach((function(t){r(e[t],t,e)}))}},691:(e,r,t)=>{"use strict";r.values=t(817),r.asArray=t(483),r.forEach=t(453),r.keyOf=t(927),r.keys=t(988)},927:(e,r,t)=>{"use strict";var n=t(453);e.exports=function(e,r){var t=null;return n(e,(function(e,n){r===e&&(t=n)})),t}},988:e=>{"use strict";e.exports=function(e){var r;if(Array.isArray(e))r=e.map((function(e,r){return r}));else{if("[object Object]"===Object.prototype.toString.call(e))return Object.keys(e);r=[]}return r}},817:e=>{"use strict";e.exports=function(e){return Array.isArray(e)?e:"[object Object]"===Object.prototype.toString.call(e)?Object.keys(e).map((function(r){return e[r]})):null!=e?[e]:[]}},909:function(e){"undefined"!=typeof self&&self,e.exports=(()=>{"use strict";var e={431:(e,r,t)=>{function n(e){return"#"===e||""===e||Array.isArray(e)&&0===e.length||!1}t.r(r),t.d(r,{default:()=>S,get:()=>c,isRoot:()=>n,join:()=>P,remove:()=>O,removeUndefinedItems:()=>E,set:()=>h,split:()=>f});const o=/~1/g,i=/~0/g,a=/\/+/g,s=/(^[#/]*|\/+$)/g;function l(e){return e.replace(o,"/").replace(i,"~")}function u(e){return l(decodeURIComponent(e))}function f(e){if(null==e||"string"!=typeof e||n(e))return Array.isArray(e)?e:[];const r=e.indexOf("#")>=0?u:l,t=(e=(e=e.replace(a,"/")).replace(s,"")).split("/");for(let e=0,n=t.length;e<n;e+=1)t[e]=r(t[e]);return t}function c(e,r,t){if(null==r||null==e)return t;if(n(r))return e;const o=p(e,f(r));return void 0===o?t:o}function p(e,r){const t=r.shift();if(void 0!==e)return void 0!==t?p(e[t],r):e}const m=/^\[.*\]$/,d=/^\[(.+)\]$/;function h(e,r,t){if(null==r)return e;const n=f(r);if(0===n.length)return e;null==e&&(e=m.test(n[0])?[]:{});let o,i,a=e;for(;n.length>1;)o=n.shift(),i=m.test(n[0]),a=g(a,o,i);return o=n.pop(),y(a,o,t),e}function y(e,r,t){let n;const o=r.match(d);"[]"===r&&Array.isArray(e)?e.push(t):o?(n=o.pop(),e[n]=t):e[r]=t}function g(e,r,t){if(null!=e[r])return e[r];const n=t?[]:{};return y(e,r,n),n}function E(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 O(e,r,t){const n=f(r),o=n.pop(),i=c(e,n);return i&&delete i[o],Array.isArray(i)&&!0!==t&&E(i),e}const v=/\/+/g,b=/~/g,x=/\//g;function _(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(x,"~1"),r&&(e[t]=encodeURIComponent(e[t]));return((r?"#/":"/")+e.join("/")).replace(v,"/")}function P(e,...r){const t=[];if(Array.isArray(e))return _(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,f(arguments[e]));const i=[];for(let e=0,r=t.length;e<r;e+=1)if(".."===t[e]){if(0===i.length)return o?"#":"";i.pop()}else i.push(t[e]);return _(i,o)}const S={get:c,set:h,remove:O,join:P,split:f,isRoot:n,removeUndefinedItems:E}}},r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{}};return e[n](o,o.exports,t),o.exports}return 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(431)})()},481:(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=i,e.exports.isUri=t,e.exports.isHttpUri=n,e.exports.isHttpsUri=o,e.exports.isWebUri=i;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,i,a,s="",l="";if(s=(t=r(e))[1],n=t[2],o=t[3],i=t[4],a=t[5],s&&s.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(s.toLowerCase()))return l+=s+":",n&&n.length&&(l+="//"+n),l+=o,i&&i.length&&(l+="?"+i),a&&a.length&&(l+="#"+a),l}}}function n(e,n){if(t(e)){var o,i,a,s,l="",u="",f="",c="";if(l=(o=r(e))[1],u=o[2],i=o[3],a=o[4],s=o[5],l){if(n){if("https"!=l.toLowerCase())return}else if("http"!=l.toLowerCase())return;if(u)return/:(\d+)$/.test(u)&&(f=u.match(/:(\d+)$/)[0],u=u.replace(/:\d+$/,"")),c+=l+":",c+="//"+u,f&&(c+=f),c+=i,a&&a.length&&(c+="?"+a),s&&s.length&&(c+="#"+s),c}}}function o(e){return n(e,!0)}function i(e){return n(e)||o(e)}}(e=t.nmd(e))}},__webpack_module_cache__={};function __webpack_require__(e){var r=__webpack_module_cache__[e];if(void 0!==r)return r.exports;var t=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(t.exports,t,t.exports,__webpack_require__),t.loaded=!0,t.exports}__webpack_require__.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(r,{a:r}),r},__webpack_require__.d=(e,r)=>{for(var t in r)__webpack_require__.o(r,t)&&!__webpack_require__.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},__webpack_require__.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Draft:()=>j,Draft04:()=>Cr,Draft06:()=>Mr,Draft07:()=>Rr,JsonEditor:()=>$r,SchemaService:()=>wr,config:()=>qr,createCustomError:()=>o,createError:()=>n,draft04Config:()=>Tr,draft06Config:()=>Ur,draft07Config:()=>Ar,draftJsonEditorConfig:()=>jr,getTypeOf:()=>a,isJSONError:()=>s,render:()=>r,resolveOneOf:()=>m,resolveOneOfFuzzy:()=>y,resolveRef:()=>g,resolveRefMerge:()=>E,settings:()=>c,validateAsync:()=>Ir});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}}`",EnumError:"Expected given value `{{value}}` in `{{pointer}}` to be one of `{{values}}`",FormatDateError:"Value `{{value}}` at `{{pointer}}` is not a valid date",FormatDateTimeError:"Value `{{value}}` at `{{pointer}}` is not a valid date-time",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",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 `{{maximum}}` 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 `{{minimum}}`, 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 `{{minimum}}`, 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}}`",TypeError:"Expected `{{value}}` ({{received}}) in `{{pointer}}` to be of type `{{expected}}`",UndefinedValueError:"Value must not be undefined in `{{pointer}}`",UniqueItemsError:"Expected unique items in {{pointer}}: duplicate value `{{value}}` found at {{itemPointer}} and {{duplicatePointer}}",UnknownPropertyError:"Could not find a valid schema for property `{{pointer}}` within object",ValueNotEmptyError:"A value for `{{property}}` is required at `{{pointer}}`"};function r(e,r={}){return e.replace(/\{\{\w+\}\}/g,(e=>r[e.replace(/[{}]/g,"")]))}function t(t,n,o=t){return r(e[t]||o,n)}function n(e,r){return{type:"error",name:e,code:(n=e,n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()),message:t(e,r),data:r};var n}function o(e){return n.bind(null,e)}const i=Object.prototype.toString;function a(e){const r=i.call(e).match(/\s([^\]]+)\]/).pop().toLowerCase();return"file"===r?"object":r}function s(e){return"error"===(null==e?void 0:e.type)}function l(e){return s(e)||e instanceof Promise}function u(e){return s(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 c={DECLARATOR_ONEOF:"oneOfProperty",GET_TEMPLATE_RECURSION_LIMIT:1,floatingPointPrecision:1e4,propertyBlacklist:["_id"]},{DECLARATOR_ONEOF:p}=c;function m(e,r,t=e.rootSchema,n="#"){if(null!=r&&t[p]){const o=[],i=t[p],a=r[t[p]];if(void 0===a)return e.errors.missingOneOfPropertyError({property:i,pointer:n});for(let u=0;u<t.oneOf.length;u+=1){const c=e.resolveRef(t.oneOf[u]),p=e.step(i,c,r,n);if(s(p))return p;let m=f(e.validate(a,p,n));if(m=m.filter(l),!(m.length>0))return c;o.push(...m)}return e.errors.oneOfPropertyError({property:i,value:a,pointer:n,errors:o})}const o=[],i=[];for(let a=0;a<t.oneOf.length;a+=1){const s=e.resolveRef(t.oneOf[a]);let u=f(e.validate(r,s,n));u=u.filter(l),u.length>0?i.push(...u):o.push(s)}return 1===o.length?o[0]:o.length>1?e.errors.multipleOneOfError({value:r,pointer:n,matches:o}):e.errors.oneOfError({value:JSON.stringify(r),pointer:n,oneOf:t.oneOf,errors:i})}const{DECLARATOR_ONEOF:d}=c;function h(e,r,t,n){if(null==t||null==r.properties)return-1;let o=0;const i=Object.keys(r.properties);for(let a=0;a<i.length;a+=1){const s=i[a];null!=t[s]&&e.isValid(t[s],r.properties[s],n)&&(o+=1)}return o}function y(e,r,t=e.rootSchema,n="#"){if(null!=r&&t[d]){const o=[],i=t[d],a=r[t[d]];if(void 0===a)return e.errors.missingOneOfPropertyError({property:i,pointer:n});for(let u=0;u<t.oneOf.length;u+=1){const c=e.resolveRef(t.oneOf[u]),p=e.step(i,c,r,n);if(s(p))return p;let m=f(e.validate(a,p,n));if(m=m.filter(l),!(m.length>0))return c;o.push(...m)}return e.errors.oneOfPropertyError({property:i,value:a,pointer:n,errors:o})}const o=[];for(let i=0;i<t.oneOf.length;i+=1){const a=e.resolveRef(t.oneOf[i]);e.isValid(r,a,n)&&o.push(a)}if(1===o.length)return o[0];if("object"===a(r)){let o,i=0;for(let n=0;n<t.oneOf.length;n+=1){const a=e.resolveRef(t.oneOf[n]),s=h(e,a,r);i<s&&(i=s,o=t.oneOf[n])}return void 0===o?e.errors.oneOfError({value:JSON.stringify(r),pointer:n,oneOf:t.oneOf}):o}return o.length>1?e.errors.multipleOneOfError({matches:o,data:r,pointer:n}):e.errors.oneOfError({value:JSON.stringify(r),pointer:n,oneOf:t.oneOf})}function g(e,r){if(null==e||null==e.$ref)return e;if(e.getRoot){return e.getRoot().getRef(e)}return r.getRef(e)}function E(e,r){if(null==e||null==e.$ref)return e;const t=r.getRef(e),n=Object.assign({},t,e);return delete n.$ref,Object.defineProperty(n,"__ref",{enumerable:!1,value:e.__ref}),Object.defineProperty(n,"getRoot",{enumerable:!1,value:e.getRoot}),n}var O=__webpack_require__(909),v=__webpack_require__.n(O);const b={};function x(e,r,t,n=e.rootSchema){return _(e,n,v().split(r),r,t)}function _(e,r,t,n,o=b){if(0===t.length)return e.resolveRef(r);const i=t.shift();return s(r=e.step(i,r,o,n))?r:_(e,r,t,`${n}/${i}`,o=o[i])}var P=__webpack_require__(996),S=__webpack_require__.n(P);const A=(e,r)=>r,R=(e,r)=>S()(e,r,{arrayMerge:A});class j{constructor(e,r){this.remotes={},this.errors={},this.typeKeywords={},this.validateKeyword={},this.validateType={},this.validateFormat={},this.config=e,this.typeKeywords=JSON.parse(JSON.stringify(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){return this.config.each(this,e,r,t,n)}eachSchema(e,r=this.rootSchema){return this.config.eachSchema(r,e)}getChildSchemaSelection(e,r){return this.config.getChildSchemaSelection(this,e,r)}getSchema(e="#",r,t){return this.config.getSchema(this,e,r,t)}getTemplate(e,r,t){return this.config.getTemplate(this,e,r,t)}isValid(e,r,t){return this.config.isValid(this,e,r,t)}resolveAnyOf(e,r,t){return this.config.resolveAnyOf(this,e,r,t)}resolveAllOf(e,r,t){return this.config.resolveAllOf(this,e,r,t)}resolveRef(e){return this.config.resolveRef(e,this.rootSchema)}resolveOneOf(e,r,t){return this.config.resolveOneOf(this,e,r,t)}setSchema(e){this.rootSchema=e}step(e,r,t,n){return this.config.step(this,e,r,t,n)}validate(e,r,t){return this.config.validate(this,e,r,t)}}function $(e,r,t){t.id=t.id||r,e.remotes[r]=e.compileSchema(t)}var w=__webpack_require__(723);const I=new w.Z.Parser('\nroot ::= ("#" recursion | recursion | (query | pattern) recursion* | "#" SEP? | SEP)\nrecursion ::= (SEP query | pattern)*\n\nquery ::= (ESC escaped ESC | property | all | any | regex) typecheck? lookahead?\nproperty ::= [^?/{}*,()#]+\nregex ::= "{" [^}]+ "}"\nSEP ::= "/"\nall ::= "**"\nany ::= "*"\n\ntypecheck ::= "?:" ("value" | "boolean" | "string" | "number" | "object" | "array")\nlookahead ::= "?" expression ((andExpr | orExpr) expression)*\nandExpr ::= S? "&&" S?\norExpr ::= S? "||" S?\n\nexpression ::= (exprProperty | ESC escaped ESC) ((isnot | is) (exprProperty | regex | ESC escaped ESC))*\nexprProperty ::= [a-zA-Z0-9-_ $]+\nescaped ::= [^"]+\nis ::= ":"\nisnot ::= ":!"\nESC ::= \'"\'\n\npattern ::= S? "(" (SEP query | pattern (orPattern? pattern)*)* ")" quantifier? S? lookahead?\nquantifier ::= "+" | "*" | [0-9]+\norPattern ::= S? "," S?\n\nS ::= [ ]*\n'),k=e=>I.getAST(e);var N=__webpack_require__(691);const L=(e,r)=>`${e}/${r}`,T=Object.prototype.toString,C=/Object|Array/,U=e=>C.test(T.call(e));function M(e){return new RegExp(e.text.replace(/(^{|}$)/g,""))}const q={mem:[],get(e,r){const t=e[0][r];if(!q.mem.includes(t))return U(t)&&q.mem.push(t),[t,r,e[0],L(e[3],r)]},reset(){q.mem.length=0}},V={any(e,r){const t=r[0];return N.keys(t).map((e=>[t[e],e,t,L(r[3],e)]))},all(e,r){const t=[r];return N.forEach(r[0],((n,o)=>{const i=q.get(r,o);i&&t.push(...V.all(e,i))})),t},regex(e,r){const t=M(e),n=r[0];return N.keys(n).filter((e=>t.test(e))).map((e=>[n[e],e,n,L(r[3],e)]))}},D={escaped:(e,r)=>D.property(e,r),property:(e,r)=>{const t=e.text;if(r[0]&&void 0!==r[0][t])return[r[0][t],t,r[0],L(r[3],t)]},typecheck:(e,r)=>{const t=e.text.replace(/^\?:/,"");if("value"===t)return U(r[0])?void 0:r;var n;return(n=r[0],T.call(n).match(/\s([^\]]+)\]/).pop().toLowerCase())===t?r:void 0},lookahead:(e,r)=>{let t=!0,n=!1;return e.children.forEach((e=>{if("expression"===e.type){const o=void 0!==D.expression(e,r);t=!0===n?t||o:t&&o}else n="orExpr"===e.type})),t?r:void 0},expression:(e,r)=>{const t=e.children[0].text,n=e.children[1],o=e.children[2],i=r[0];if(!1!==U(i))return function(e,r,t){if(void 0===r)return void 0!==e;let n;const o=""+e;if("regex"===t.type){n=M(t).test(o)}else n=o===t.text;"isnot"===r.type&&(n=!1===n&&void 0!==e);return n}(i[t],n,o)?r:void 0}};function F(e,r,t){const n=[];let o=e;return r.children.forEach((r=>{if("orPattern"===r.type)return n.push(...o),void(o=e);o=z(o,r,t)})),n.push(...o),n}function K(e,r,t){const n=[],o=r.children.find((e=>"quantifier"===e.type)),i=function(e){if(null==e)return 1;if("*"===e||"+"===e)return 1/0;const r=parseInt(e);return isNaN(r)?1:r}(o&&o.text);let a=e;o&&"*"===o.text&&n.push(...a);let s=0;for(;a.length>0&&s<i;)a=F(a,r,t),n.push(...a),s+=1;return n}function z(e,r,t){let n;return n="query"===r.type?function(e,r,t){let n=e;return r.children.forEach((e=>{if(V[e.type])n=function(e,r,t,n){const o=[];for(let i=0,a=r.length;i<a;i+=1)o.push(...e(t,r[i],t,n));return o}(V[e.type],n,e,t);else{if(!D[e.type])throw new Error(`Unknown filter ${e.type}`);n=function(e,r,t,n){const o=[];for(let i=0,a=r.length;i<a;i+=1){const a=e(t,r[i],n);a&&o.push(a)}return o}(D[e.type],n,e,t)}})),n}(e,r,t):"pattern"===r.type?K(e,r,t):function(e,r,t){let n=e;return r.children.forEach((e=>n=z(n,e,t))),n}(e,r,t),q.reset(),q.mem.push(e),n}const J={value:e=>e.map((e=>e[0])),pointer:e=>e.map((e=>e[3])),all:e=>e,map:e=>{const r={};return e.forEach((e=>r[e[3]]=e[0])),r}};var Z;function W(e,r,t=Z.VALUE){if(null==r)return[];""===(r=r.replace(/(\/$)/g,""))&&(r="#");const n=k(r);if(null==n)throw new Error(`empty ast for '${r}'`);if(""!==n.rest)throw new Error(`Failed parsing queryString from: '${n.rest}'`);const o=function(e,r){return q.reset(),q.mem.push(e),z([[e,null,null,"#"]],r)}(e,n);return"function"==typeof t?o.map((e=>t(...e))):J[t]?J[t](o):o}!function(e){e.POINTER="pointer",e.VALUE="value",e.ALL="all",e.MAP="map"}(Z||(Z={})),W.POINTER=Z.POINTER,W.VALUE=Z.VALUE,W.ALL=Z.ALL,W.MAP=Z.MAP;const H=["root","recursion"];function B(e,r=[]){return H.includes(e.type)?(e.children.forEach((e=>B(e,r))),r):(r.push(e.text),r)}function G(e){if(null==e||""===e)return[];return B(k(e))}const Y=e=>JSON.parse(JSON.stringify(e)),Q=Object.prototype.toString,X=e=>Q.call(e).match(/\s([^\]]+)\]/).pop().toLowerCase(),ee=new RegExp('^("[^"]+"|[^?/{}*,()#]+)$'),re=["string","number","boolean","null"],te=/^\[\d*\]$/,ne=/^\[(\d+)\]$/,oe=/^".+"$/,ie=/(^\[\d*\]$|^\d+$)/;function ae(e){return parseInt(e.replace(/^(\[|\]$)/,""))}function se(e){return oe.test(e)?e.replace(/(^"|"$)/g,""):e}function le(e,r,t,n){const o=e[0];if(/^\[\]$/.test(r)){o.push(t);const r=o.length-1;return[o[r],r,o,`${e[3]}/${r}}`]}if(null==n&&"object"===X(o[r])&&"object"===X(t))return[o[r],r,o,`${e[3]}/${r}}`];if(n===fe.INSERT_ITEMS||null==n&&ne.test(r)){const n=ae(r);return function(e,r,t){e.length<=r?e[r]=t:e.splice(r,0,t)}(o,n,t),[o[n],n,o,`${e[3]}/${n}}`]}if(n===fe.REPLACE_ITEMS||null==n){const n=ae(r);return o[n]=t,[o[n],n,o,`${e[3]}/${n}}`]}throw new Error(`Unknown array index '${r}' with force-option '${n}'`)}var ue;function fe(e,r,t,n){if(null==r)return Y(e);if(""===(r=r.replace(/(\/$)/g,"")))return Y(t);const o=Y(e);let i=[[o,null,null,"#"]];const a=G(r),s=a.pop(),l=te.test(s)&&!1===ne.test(s);if(!1===ee.test(s)||l)throw new Error(`Unsupported query '${r}' ending with non-property`);return a.forEach(((e,r)=>{if("__proto__"===e||"prototyped"===e||"constructor"===e)return;if(!1===ee.test(e))return void(i=function(e,r){const t=[];return e.forEach((e=>t.push(...W(e[0],r,Z.ALL)))),t}(i,e));const t=r>=a.length-1?s:a[r+1],o=ie.test(t);i=function(e,r,t,n){return r=se(r),e.filter((e=>!(!Array.isArray(e[0])||!ie.test(r))||!1===re.includes(X(e[0][r])))).map((e=>{const o=t?[]:{},i=e[0];return Array.isArray(i)?le(e,r,o,n):(i[r]=i[r]||o,[i[r],r,i,`${e[3]}/${r}`])}))}(i,e,o,n)})),i.forEach((e=>{let r=t;"function"===X(t)&&(r=t(e[3],s,e[0],`${e[3]}/${s}`));const o=e[0];if(Array.isArray(o))le(e,s,r,n);else{const e=se(s);if("__proto__"===e||"prototyped"===e||"constructor"===e)return;o[e]=r}})),o}!function(e){e.REPLACE_ITEMS="replace",e.INSERT_ITEMS="insert"}(ue||(ue={})),fe.REPLACE_ITEMS=ue.REPLACE_ITEMS,fe.INSERT_ITEMS=ue.INSERT_ITEMS;const ce={$ref:{type:!1},allOf:{type:!1,definitions:["allOf/*"]},anyOf:{type:!1,definitions:["anyOf/*"]},array:{type:!0,definitions:["allOf/*","anyOf/*","oneOf/*","not","items","items/*","additionalItems"],validationKeywords:["minItems","maxItems","uniqueItems"],keywords:["items","additionalItems","minItems","maxItems","uniqueItems"]},boolean:{type:!0},enum:{type:!1},integer:{type:!0,definitions:["allOf/*","anyOf/*","oneOf/*","not"],validationKeywords:["minimum","maximum","multipleOf"]},not:{type:!1,definitions:["not"]},number:{type:!0,definitions:["allOf/*","anyOf/*","oneOf/*","not"],validationKeywords:["minimum","maximum","multipleOf"]},null:{type:!0},object:{type:!0,definitions:["allOf/*","anyOf/*","oneOf/*","not","properties/*","additionalProperties","patternProperties/*","dependencies/*"],validationKeywords:["minProperties","maxProperties","required"],keywords:["properties","additionalProperties","patternProperties","dependencies","minProperties","maxProperties","required"]},oneOf:{type:!1,definitions:["oneOf/*"]},string:{type:!0,definitions:["allOf/*","anyOf/*","oneOf/*","not"],validationKeywords:["minLength","maxLength","pattern"]}},pe=Object.keys(ce).filter((e=>!1===ce[e].type)),me=Object.prototype.hasOwnProperty;function de(e){if(!1==(r=e,"[object Object]"===Object.prototype.toString.call(r)))return;var r;if(e.enum)return"enum";if(ce[e.type]||Array.isArray(e.type))return e.type;const t=pe.filter((r=>e[r]));if(1===t.length)return t[0];if(0!==t.length)throw new Error(`Mutiple typeIds [${t.join(", ")}] matched in ${JSON.stringify(e)}`);for(let r=0,t=ce.object.keywords.length;r<t;r+=1){const t=ce.object.keywords[r];if(me.call(e,t))return"object"}for(let r=0,t=ce.array.keywords.length;r<t;r+=1){const t=ce.array.keywords[r];if(me.call(e,t))return"array"}}function he(e){const r=[],t=de(e);if(null==t)return r;let n;if(Array.isArray(t)){n={};for(let e=0,r=t.length;e<r;e+=1)Object.assign(n,ce[t[e]])}else n=ce[t];return null==n.definitions||n.definitions.forEach((t=>{W(e,t,((e,t,n,o)=>{(e=>"[object Object]"===Object.prototype.toString.call(e))(e)&&de(e)&&r.push({pointer:v().join(v().split(o),!1),def:e})}))})),r}function ye(e,r){if(!0===this.callback(e,r))return;he(e).forEach((e=>this.nextTypeDefs(e.def,v().join(r,e.pointer,!1))))}function ge(e,r,t,n="definitions"){const o=r[n];Object.keys(o).forEach((r=>{var i;!1!==o[r]&&(i=o[r],"[object Object]"!==Object.prototype.toString.call(i))?console.log(`Invalid schema in ${t}/${n}/${r}`):e.nextTypeDefs(o[r],v().join(t,n,r,!1))}))}function Ee(e,r,t="#"){const n={callback:r,nextTypeDefs:ye};n.nextTypeDefs(e,t),null!=e.definitions&&(n.callback=(e,t)=>{r(e,t),null!=e.definitions&&ge(n,e,t)},ge(n,e,t)),null!=e.$defs&&(n.callback=(e,t)=>{r(e,t),null!=e.definitions&&ge(n,e,t)},ge(n,e,t,"$defs"))}const Oe=/(#|\/)+$/,ve=/#$/,be=/^[^:]+:\/\/[^/]+\//,xe=/\/[^/]*$/,_e=/#.*$/;function Pe(e,r){return null==e&&null==r?"#":null==r?e.replace(ve,""):null==e?r.replace(ve,""):"#"===r[0]?`${e.replace(_e,"")}${r.replace(Oe,"")}`:be.test(r)?r.replace(ve,""):`${e.replace(xe,"")}/${r.replace(ve,"")}`}const Se=/(#|\/)+$/g,Ae=["",null,"#"];const Re=/(#|\/)+$/g;function je(e,r,t){if("object"===a(t)&&(t=t.__ref||t.$ref),null==t)return r;let n;const o=t.replace(Re,"");if(e.remotes[o])return n=e.remotes[o],n&&n.$ref?je(e,r,n.$ref):n;if(e.ids[t])return n=(0,O.get)(r,e.ids[t]),n&&n.$ref?je(e,r,n.$ref):n;const i=function(e){if(Ae.includes(e))return[];if(-1===(e=e.replace(Se,"")).indexOf("#"))return[e.replace(Se,"")];if(0===e.indexOf("#"))return[e.replace(Se,"")];const r=e.split("#");return r[0]=r[0].replace(Se,""),r[1]=`#${r[1].replace(Se,"")}`,r}(t);if(0===i.length)return r;if(1===i.length){if(t=i[0],e.remotes[t])return n=e.remotes[t],je(e,r,n.$ref);if(e.ids[t])return n=(0,O.get)(r,e.ids[t]),n&&n.$ref?je(e,r,n.$ref):n}if(2===i.length){const n=i[0];if(t=i[1],e.remotes[n])return e.remotes[n].getRef?e.remotes[n].getRef(t):je(e,e.remotes[n],t);if(e.ids[n])return je(e,(0,O.get)(r,e.ids[n]),t)}return n=(0,O.get)(r,e.ids[t]||t),n&&n.$ref?je(e,r,n.$ref):n}const $e="__compiled",we="__ref",Ie=/(#|\/)+$/g;function ke(e,r,t=r,n=!1){if(!0===r||!1===r||void 0===r)return r;if(void 0!==r[$e])return r;const o={ids:{},remotes:e.remotes},i=JSON.stringify(r),a=JSON.parse(i);if(Object.defineProperty(a,$e,{enumerable:!1,value:!0}),Object.defineProperty(a,"getRef",{enumerable:!1,value:je.bind(null,o,a)}),!1===n&&!1===i.includes("$ref"))return a;a!==t&&Object.defineProperty(a,"$defs",{enumerable:!0,value:Object.assign({},t.definitions,t.$defs,a.definitions,a.$defs)});const s={},l=()=>a;return Ee(a,((e,r)=>{e.$id&&(o.ids[e.$id.replace(Ie,"")]=r);const t=(r=`#${r}`.replace(/##+/,"#")).replace(/\/[^/]+$/,""),n=r.replace(/\/[^/]+\/[^/]+$/,""),i=Pe(s[t]||s[n],e.$id);s[r]=i,null==o.ids[i]&&(o.ids[i]=r),e.$ref&&!e.__ref&&(Object.defineProperty(e,we,{enumerable:!1,value:Pe(i,e.$ref)}),Object.defineProperty(e,"getRoot",{enumerable:!1,value:l}))})),a}function Ne(e,r,t,n=e.rootSchema,o="#"){n=e.resolveRef(n),t(n,r,o);const i=a(r);"object"===i?Object.keys(r).forEach((i=>{const a=e.step(i,n,r,o),s=r[i];e.each(s,t,a,`${o}/${i}`)})):"array"===i&&r.forEach(((i,a)=>{const s=e.step(a,n,r,o);e.each(i,t,s,`${o}/${a}`)}))}const Le={additionalItemsError:o("AdditionalItemsError"),additionalPropertiesError:o("AdditionalPropertiesError"),anyOfError:o("AnyOfError"),allOfError:o("AllOfError"),constError:o("ConstError"),containsError:o("ContainsError"),containsArrayError:o("ContainsArrayError"),containsAnyError:o("ContainsAnyError"),enumError:o("EnumError"),formatURLError:o("FormatURLError"),formatURIError:o("FormatURIError"),formatURIReferenceError:o("FormatURIReferenceError"),formatURITemplateError:o("FormatURITemplateError"),formatDateError:o("FormatDateaError"),formatDateTimeError:o("FormatDateTimeError"),formatEmailError:o("FormatEmailError"),formatHostnameError:o("FormatHostnameError"),formatIPV4Error:o("FormatIPV4Error"),formatIPV4LeadingZeroError:o("FormatIPV4LeadingZeroError"),formatIPV6Error:o("FormatIPV6Error"),formatIPV6LeadingZeroError:o("FormatIPV6LeadingZeroError"),formatJSONPointerError:o("FormatJSONPointerError"),formatRegExError:o("FormatRegExError"),formatTimeError:o("FormatTimeError"),invalidSchemaError:o("InvalidSchemaError"),invalidDataError:o("InvalidDataError"),invalidTypeError:o("InvalidTypeError"),invalidPropertyNameError:o("InvalidPropertyNameError"),maximumError:o("MaximumError"),maxItemsError:o("MaxItemsError"),maxLengthError:o("MaxLengthError"),maxPropertiesError:o("MaxPropertiesError"),minimumError:o("MinimumError"),minItemsError:o("MinItemsError"),minItemsOneError:o("MinItemsOneError"),minLengthError:o("MinLengthError"),minLengthOneError:o("MinLengthOneError"),minPropertiesError:o("MinPropertiesError"),missingDependencyError:o("MissingDependencyError"),missingOneOfPropertyError:o("MissingOneOfPropertyError"),multipleOfError:o("MultipleOfError"),multipleOneOfError:o("MultipleOneOfError"),noAdditionalPropertiesError:o("NoAdditionalPropertiesError"),notError:o("NotError"),oneOfError:o("OneOfError"),oneOfPropertyError:o("OneOfPropertyError"),patternError:o("PatternError"),patternPropertiesError:o("PatternPropertiesError"),requiredPropertyError:o("RequiredPropertyError"),typeError:o("TypeError"),undefinedValueError:o("UndefinedValueError"),uniqueItemsError:o("UniqueItemsError"),unknownPropertyError:o("UnknownPropertyError"),valueNotEmptyError:o("ValueNotEmptyError")};var Te=__webpack_require__(481),Ce=__webpack_require__.n(Te);const Ue=new RegExp("^([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\\.[0-9]+)?(([Zz])|([\\+|\\-]([01][0-9]|2[0-3]):[0-5][0-9]))$"),Me=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,qe=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,Ve=/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,De=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Fe=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,Ke=[0,31,28,31,30,31,30,31,31,30,31,30,31],ze=/^(?:\/(?:[^~/]|~0|~1)*)*$/,Je=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,Ze=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,We=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,He={date:(e,r,t,n)=>{if("string"!=typeof t)return;const o=t.match(De);if(!o)return Le.formatDateTimeError({value:t,pointer:n});const i=+o[1],a=+o[2],s=+o[3];return a>=1&&a<=12&&s>=1&&s<=(2==a&&(i%4==0&&(i%100!=0||i%400==0))?29:Ke[a])?void 0:Le.formatDateError({value:t,pointer:n})},"date-time":(e,r,t,n)=>{if("string"==typeof t)return""===t||Ue.test(t)?"Invalid Date"===new Date(t).toString()?Le.formatDateTimeError({value:t,pointer:n}):void 0:Le.formatDateTimeError({value:t,pointer:n})},email:(e,r,t,n)=>{if("string"!=typeof t)return;if('"'===t[0])return Le.formatEmailError({value:t,pointer:n});const[o,i,...a]=t.split("@");return!o||!i||0!==a.length||o.length>64||i.length>253||"."===o[0]||o.endsWith(".")||o.includes("..")?Le.formatEmailError({value:t,pointer:n}):/^[a-z0-9.-]+$/i.test(i)&&/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(o)&&i.split(".").every((e=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e)))?void 0:Le.formatEmailError({value:t,pointer:n})},hostname:(e,r,t,n)=>{if("string"==typeof t&&""!==t&&!Ve.test(t))return Le.formatHostnameError({value:t,pointer:n})},ipv4:(e,r,t,n)=>{if("string"==typeof t&&""!==t){if(t&&"0"===t[0])return Le.formatIPV4LeadingZeroError({value:t,pointer:n});if(!(t.length<=15&&Me.test(t)))return Le.formatIPV4Error({value:t,pointer:n})}},ipv6:(e,r,t,n)=>{if("string"==typeof t&&""!==t){if(t&&"0"===t[0])return Le.formatIPV6LeadingZeroError({value:t,pointer:n});if(!(t.length<=45&&qe.test(t)))return Le.formatIPV6Error({value:t,pointer:n})}},"json-pointer":(e,r,t,n)=>{if("string"==typeof t&&""!==t&&!ze.test(t))return Le.formatJSONPointerError({value:t,pointer:n})},"relative-json-pointer":(e,r,t,n)=>{if("string"==typeof t&&""!==t&&!Je.test(t))return Le.formatJSONPointerError({value:t,pointer:n})},regex:(e,r,t,n)=>{if("string"==typeof t&&!1===/\\Z$/.test(t)){try{return void new RegExp(t)}catch(e){}return Le.formatRegExError({value:t,pointer:n})}if("object"!=typeof t&&"number"!=typeof t&&!Array.isArray(t))return Le.formatRegExError({value:t,pointer:n})},time:(e,r,t,n)=>{if("string"!=typeof t)return;const o=t.match(Fe);if(!o)return Le.formatDateTimeError({value:t,pointer:n});const i=+o[1],a=+o[2],s=+o[3],l=!!o[5];return(i<=23&&a<=59&&s<=59||23==i&&59==a&&60==s)&&l?void 0:Le.formatTimeError({value:t,pointer:n})},uri:(e,r,t,n)=>{if("string"==typeof t&&""!==t&&!Ce().isUri(t))return Le.formatURIError({value:t,pointer:n})},"uri-reference":(e,r,t,n)=>{if("string"==typeof t&&""!==t&&!Ze.test(t))return Le.formatURIReferenceError({value:t,pointer:n})},"uri-template":(e,r,t,n)=>{if("string"==typeof t&&""!==t&&!We.test(t))return Le.formatURITemplateError({value:t,pointer:n})},url:(e,r,t,n)=>{if(""!==t&&!Ce().isWebUri(t))return Le.formatUrlError({value:t,pointer:n})}},Be=e=>JSON.parse(JSON.stringify(e)),Ge={addOptionalProps:!0};let Ye;function Qe(e,r){if(null==r)throw new Error("Missing pointer");const{$ref:t}=e;if(null==t)return!0;return(null==Ye[r]||null==Ye[r][t]?0:Ye[r][t])<c.GET_TEMPLATE_RECURSION_LIMIT}function Xe(e,r,t){if(null==t)throw new Error(`missing pointer ${t}`);const{$ref:n}=r;return null==n?r:(Ye[t]=Ye[t]||{},Ye[t][n]=Ye[t][n]||0,Ye[t][n]+=1,e.resolveRef(r))}function er(e,r,t,n){if("object"!==a(r))return Object.assign({pointer:n},r);if(!1===Qe(r,n)&&null==t)return!1;let o=Be(Xe(e,r,n));if(Array.isArray(r.anyOf)&&r.anyOf.length>0){if(Qe(r.anyOf[0],`${n}/anyOf/0`)){const t=Xe(e,r.anyOf[0],`${n}/anyOf/0`);o=R(o,t),o.pointer=r.anyOf[0].$ref||o.pointer}delete o.anyOf}if(Array.isArray(r.allOf)){for(let t=0,i=r.allOf.length;t<i;t+=1)Qe(r.allOf[t],`${n}/allOf/${t}`)&&(o=R(o,Xe(e,r.allOf[t],`${n}/allOf/${t}`)),o.pointer=r.allOf[t].$ref||o.pointer);delete o.allOf}return o.pointer=o.pointer||r.$ref||n,o}const rr=e=>e&&"object"==typeof e;function tr(e,r,t,n,o){if(null==t)throw new Error(`getTemplate: missing schema for data: ${JSON.stringify(r)}`);if(null==n)throw new Error("Missing pointer");let i=er(e,t,r,n);if(!rr(i))return;if(n=i.pointer,null==i?void 0:i.const)return i.const;if(i.oneOf){const t=y(e,r,i);if(null==r&&s(t))i=i.oneOf[0];else{if(s(t.type))return r;i=t}}if(!rr(i)||null==i.type)return;const l=Array.isArray(i.type)?function(e,r,t){if(null==r){if(null!=t){const r=a(t);if(e.includes(r))return r}return e[0]}const n=a(r);if(e.includes(n))return n;return e[0]}(i.type,r,i.default):i.type;if(null!=r&&a(r)!==l&&(r=function(e,r){if("string"===e)return JSON.stringify(r);if("string"!=typeof r)return null;try{if(typeof(r=JSON.parse(r))===e)return r}catch(e){}return null}(l,r)),null==nr[l])throw new Error(`Unsupported type '${l} in ${JSON.stringify(i)}'`);return nr[l](e,i,r,n,o)}const nr={null:(e,r,t)=>or(r,t,null),string:(e,r,t)=>or(r,t,""),number:(e,r,t)=>or(r,t,0),integer:(e,r,t)=>or(r,t,0),boolean:(e,r,t)=>or(r,t,!1),object:(e,r,t,n,o)=>{const i=void 0===r.default?{}:r.default,l={};if(r.properties&&Object.keys(r.properties).forEach((a=>{const s=null==t||null==t[a]?i[a]:t[a],u=Array.isArray(r.required)&&r.required.includes(a);(null!=s||u||o.addOptionalProps)&&(l[a]=tr(e,s,r.properties[a],`${n}/properties/${a}`,o))})),r.dependencies&&Object.keys(r.dependencies).forEach((i=>{const u=r.dependencies[i];if("object"!==a(u))return;if(void 0===l[i])return;const f=tr(e,t,Object.assign(Object.assign({},u),{type:"object"}),`${n}/dependencies/${i}`,o);f&&!s(f)&&Object.assign(l,f)})),t&&Object.keys(t).forEach((e=>null==l[e]&&(l[e]=t[e]))),r.if&&(r.then||r.else)){const t=e.isValid(l,r.if);if(t&&r.then){const t=e.getTemplate(l,Object.assign({type:"object"},r.then),o);Object.assign(l,t)}else if(!t&&r.else){const t=e.getTemplate(l,Object.assign({type:"object"},r.else),o);Object.assign(l,t)}}return l},array:(e,r,t,n,o)=>{var i,s,l;const u=void 0===r.default?[]:r.default;r.minItems=r.minItems||0;const f=t||[];if(null==r.items)return f;if(Array.isArray(r.items)){for(let t=0,a=Math.max(null!==(i=r.minItems)&&void 0!==i?i:0,null!==(l=null===(s=r.items)||void 0===s?void 0:s.length)&&void 0!==l?l:0);t<a;t+=1)f[t]=tr(e,null==f[t]?u[t]:f[t],r.items[t],`${n}/items/${t}`,o);return f}if("object"!==a(r.items))return f;const c=er(e,r.items,t,n);if(!1===c)return f;if(n=c.pointer||n,c.oneOf&&0===f.length){const t=c.oneOf[0];for(let i=0;i<r.minItems;i+=1)f[i]=tr(e,null==f[i]?u[i]:f[i],t,`${n}/oneOf/0`,o);return f}if(c.oneOf&&f.length>0){const t=Math.max(r.minItems,f.length);for(let r=0;r<t;r+=1){const t=null==f[r]?u[r]:f[r],i=y(e,t,c);f[r]=i?tr(e,t,i,`${n}/oneOf/${r}`,o):t}return f}if(c.type){for(let t=0,i=Math.max(r.minItems,f.length);t<i;t+=1)f[t]=tr(e,null==f[t]?u[t]:f[t],c,`${n}/items`,o);return f}return f}};function or(e,r,t){return null!=r?r:e.const?e.const:void 0===e.default&&Array.isArray(e.enum)?e.enum[0]:void 0===e.default?t:e.default}const ir=(e,r,t=e.rootSchema,n=Ge)=>(Ye={mi:{}},tr(e,r,t,"#",n));function ar(e,r,t=e.rootSchema,n="#"){return 0===e.validate(r,t,n).length}function sr(e,r){const t=typeof e;if(t!==typeof r)return!1;if(Array.isArray(e)){if(!Array.isArray(r))return!1;const t=e.length;if(t!==r.length)return!1;for(let n=0;n<t;n++)if(!sr(e[n],r[n]))return!1;return!0}if("object"===t){if(!e||!r)return e===r;const t=Object.keys(e),n=Object.keys(r);if(t.length!==n.length)return!1;for(const n of t)if(!sr(e[n],r[n]))return!1;return!0}return e===r}function lr(e){const r=[];let t=0;const n=e.length;for(;t<n;){const o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<n){const n=e.charCodeAt(t++);56320==(64512&n)?r.push(((1023&o)<<10)+(1023&n)+65536):(r.push(o),t--)}else r.push(o)}return r}const ur=c.floatingPointPrecision,fr=Object.prototype.hasOwnProperty,cr=(e,r)=>!(void 0===e[r]||!fr.call(e,r)),pr={additionalProperties:(e,r,t,n)=>{if(!0===r.additionalProperties||null==r.additionalProperties)return;if("object"===a(r.patternProperties)&&!1===r.additionalProperties)return;const o=[];let i=Object.keys(t).filter((e=>!1===c.propertyBlacklist.includes(e)));const l=Object.keys(r.properties||{});if("object"===a(r.patternProperties)){const e=Object.keys(r.patternProperties).map((e=>new RegExp(e)));i=i.filter((r=>{for(let t=0;t<e.length;t+=1)if(e[t].test(r))return!1;return!0}))}for(let a=0,u=i.length;a<u;a+=1){const u=i[a];if(-1===l.indexOf(u)){const f="object"==typeof r.additionalProperties;if(f&&Array.isArray(r.additionalProperties.oneOf)){const f=e.resolveOneOf(t[u],r.additionalProperties,`${n}/${u}`);s(f)?o.push(e.errors.additionalPropertiesError({schema:r.additionalProperties,property:i[a],properties:l,pointer:n,errors:f.data.errors})):o.push(...e.validate(t[u],f,n))}else f?0!==e.validate(t[u],r.additionalProperties,n).length&&o.push(e.errors.additionalPropertiesError({schema:r.additionalProperties,property:i[a],properties:l,pointer:n})):o.push(e.errors.noAdditionalPropertiesError({property:i[a],properties:l,pointer:n}))}}return o},allOf:(e,r,t,n)=>{if(!1===Array.isArray(r.allOf))return;const o=[];return r.allOf.forEach((r=>{o.push(...e.validate(t,r,n))})),o},anyOf:(e,r,t,n)=>{if(!1!==Array.isArray(r.anyOf)){for(let n=0;n<r.anyOf.length;n+=1)if(e.isValid(t,r.anyOf[n]))return;return e.errors.anyOfError({anyOf:r.anyOf,value:t,pointer:n})}},dependencies:(e,r,t,n)=>{if("object"!==a(r.dependencies))return;const o=[];return Object.keys(t).forEach((i=>{if(void 0===r.dependencies[i])return;if(!0===r.dependencies[i])return;if(!1===r.dependencies[i])return void o.push(e.errors.missingDependencyError({pointer:n}));let s;const l=a(r.dependencies[i]);if("array"===l)s=r.dependencies[i].filter((e=>void 0===t[e])).map((r=>e.errors.missingDependencyError({missingProperty:r,pointer:n})));else{if("object"!==l)throw new Error(`Invalid dependency definition for ${n}/${i}. Must be list or schema`);s=e.validate(t,r.dependencies[i],n)}o.push(...s)})),o.length>0?o:void 0},enum:(e,r,t,n)=>{const o=a(t);if("object"===o||"array"===o){const e=JSON.stringify(t);for(let t=0;t<r.enum.length;t+=1)if(JSON.stringify(r.enum[t])===e)return}else if(r.enum.includes(t))return;return e.errors.enumError({values:r.enum,value:t,pointer:n})},format:(e,r,t,n)=>{if(e.validateFormat[r.format]){return e.validateFormat[r.format](e,r,t,n)}},items:(e,r,t,n)=>{if(!1===r.items){if(Array.isArray(t)&&0===t.length)return;return e.errors.invalidDataError({pointer:n,value:t})}const o=[];for(let i=0;i<t.length;i+=1){const a=t[i],l=e.step(i,r,t,n);if(s(l))return[l];const u=e.validate(a,l,`${n}/${i}`);o.push(...u)}return o},maximum:(e,r,t,n)=>{if(!isNaN(r.maximum))return r.maximum&&r.maximum<t||r.maximum&&!0===r.exclusiveMaximum&&r.maximum===t?e.errors.maximumError({maximum:r.maximum,length:t,pointer:n}):void 0},maxItems:(e,r,t,n)=>{if(!isNaN(r.maxItems))return r.maxItems<t.length?e.errors.maxItemsError({maximum:r.maxItems,length:t.length,pointer:n}):void 0},maxLength:(e,r,t,n)=>{if(isNaN(r.maxLength))return;const o=lr(t).length;return r.maxLength<o?e.errors.maxLengthError({maxLength:r.maxLength,length:o,pointer:n}):void 0},maxProperties:(e,r,t,n)=>{const o=Object.keys(t).length;if(!1===isNaN(r.maxProperties)&&r.maxProperties<o)return e.errors.maxPropertiesError({maxProperties:r.maxProperties,length:o,pointer:n})},minLength:(e,r,t,n)=>{if(isNaN(r.minLength))return;const o=lr(t).length;return r.minLength>o?1===r.minLength?e.errors.minLengthOneError({minLength:r.minLength,length:o,pointer:n}):e.errors.minLengthError({minLength:r.minLength,length:o,pointer:n}):void 0},minimum:(e,r,t,n)=>{if(!isNaN(r.minimum))return r.minimum>t||!0===r.exclusiveMinimum&&r.minimum===t?e.errors.minimumError({minimum:r.minimum,length:t,pointer:n}):void 0},minItems:(e,r,t,n)=>{if(!isNaN(r.minItems))return r.minItems>t.length?1===r.minItems?e.errors.minItemsOneError({minItems:r.minItems,length:t.length,pointer:n}):e.errors.minItemsError({minItems:r.minItems,length:t.length,pointer:n}):void 0},minProperties:(e,r,t,n)=>{if(isNaN(r.minProperties))return;const o=Object.keys(t).length;return r.minProperties>o?e.errors.minPropertiesError({minProperties:r.minProperties,length:o,pointer:n}):void 0},multipleOf:(e,r,t,n)=>{if(!isNaN(r.multipleOf))return t*ur%(r.multipleOf*ur)/ur!=0?e.errors.multipleOfError({multipleOf:r.multipleOf,value:t,pointer:n}):void 0},not:(e,r,t,n)=>{const o=[];return 0===e.validate(t,r.not,n).length&&o.push(e.errors.notError({value:t,not:r.not,pointer:n})),o},oneOf:(e,r,t,n)=>{if(!1!==Array.isArray(r.oneOf))return s(r=e.resolveOneOf(t,r,n))?r:void 0},pattern:(e,r,t,n)=>{if(!1===new RegExp(r.pattern,"u").test(t))return e.errors.patternError({pattern:r.pattern,description:r.patternExample||r.pattern,received:t,pointer:n})},patternProperties:(e,r,t,n)=>{const o=r.properties||{},i=r.patternProperties;if("object"!==a(i))return;const s=[],l=Object.keys(t),u=Object.keys(i).map((e=>({regex:new RegExp(e),patternSchema:i[e]})));return l.forEach((a=>{let l=!1;for(let r=0,o=u.length;r<o;r+=1)if(u[r].regex.test(a)){l=!0;const o=e.validate(t[a],u[r].patternSchema,`${n}/${a}`);o&&o.length>0&&s.push(...o)}o[a]||!1===l&&!1===r.additionalProperties&&s.push(e.errors.patternPropertiesError({key:a,pointer:n,patterns:Object.keys(i).join(",")}))})),s},properties:(e,r,t,n)=>{const o=[],i=Object.keys(r.properties||{});for(let a=0;a<i.length;a+=1){const s=i[a];if(cr(t,s)){const i=e.step(s,r,t,n),a=e.validate(t[s],i,`${n}/${s}`);o.push(...a)}}return o},propertiesRequired:(e,r,t,n)=>{const o=[],i=Object.keys(r.properties||{});for(let a=0;a<i.length;a+=1){const s=i[a];if(void 0===t[s])o.push(e.errors.requiredPropertyError({key:s,pointer:n}));else{const i=e.step(s,r,t,n),a=e.validate(t[s],i,`${n}/${s}`);o.push(...a)}}return o},required:(e,r,t,n)=>{if(!1!==Array.isArray(r.required))return r.required.map((r=>{if(!cr(t,r))return e.errors.requiredPropertyError({key:r,pointer:n})}))},requiredNotEmpty:(e,r,t,n)=>{if(!1!==Array.isArray(r.required))return r.required.map((r=>{if(null==t[r]||""===t[r])return e.errors.valueNotEmptyError({property:r,pointer:`${n}/${r}`})}))},uniqueItems:(e,r,t,n)=>{if(!1===(Array.isArray(t)&&r.uniqueItems))return;const o=[];return t.forEach(((r,i)=>{for(let a=i+1;a<t.length;a+=1)sr(r,t[a])&&o.push(e.errors.uniqueItemsError({pointer:n,itemPointer:`${n}/${i}`,duplicatePointer:`${n}/${a}`,value:JSON.stringify(r)}))})),o}},mr=pr,dr=Object.assign(Object.assign({},mr),{contains:(e,r,t,n)=>{if(!1===r.contains)return e.errors.containsArrayError({pointer:n,value:t});if(!0===r.contains)return Array.isArray(t)&&0===t.length?e.errors.containsAnyError({pointer:n}):void 0;if("object"===a(r.contains)){for(let n=0;n<t.length;n+=1)if(e.isValid(t[n],r.contains))return;return e.errors.containsError({pointer:n,schema:JSON.stringify(r.contains)})}},exclusiveMaximum:(e,r,t,n)=>{if(!isNaN(r.exclusiveMaximum))return r.exclusiveMaximum<=t?e.errors.maximumError({maximum:r.exclusiveMaximum,length:t,pointer:n}):void 0},exclusiveMinimum:(e,r,t,n)=>{if(!isNaN(r.exclusiveMinimum))return r.exclusiveMinimum>=t?e.errors.minimumError({minimum:r.exclusiveMinimum,length:t,pointer:n}):void 0},if:(e,r,t,n)=>{if(null==r.if)return;const o=e.validate(t,r.if,n);return 0===o.length&&r.then?e.validate(t,r.then,n):0!==o.length&&r.else?e.validate(t,r.else,n):void 0},maximum:(e,r,t,n)=>{if(!isNaN(r.maximum))return r.maximum&&r.maximum<t?e.errors.maximumError({maximum:r.maximum,length:t,pointer:n}):void 0},minimum:(e,r,t,n)=>{if(!isNaN(r.minimum))return r.minimum>t?e.errors.minimumError({minimum:r.minimum,length:t,pointer:n}):void 0},patternProperties:(e,r,t,n)=>{const o=r.properties||{},i=r.patternProperties;if("object"!==a(i))return;const s=[],l=Object.keys(t),u=Object.keys(i).map((e=>({regex:new RegExp(e),patternSchema:i[e]})));return l.forEach((a=>{let l=!1;for(let r=0,o=u.length;r<o;r+=1)if(u[r].regex.test(a)){if(l=!0,!1===u[r].patternSchema)return void s.push(e.errors.patternPropertiesError({key:a,pointer:n,patterns:Object.keys(i).join(",")}));const o=e.validate(t[a],u[r].patternSchema,`${n}/${a}`);o&&o.length>0&&s.push(...o)}o[a]||!1===l&&!1===r.additionalProperties&&s.push(e.errors.patternPropertiesError({key:a,pointer:n,patterns:Object.keys(i).join(",")}))})),s},propertyNames:(e,r,t,n)=>{if(!1===r.propertyNames){if(0===Object.keys(t).length)return;return e.errors.invalidPropertyNameError({property:Object.keys(t),pointer:n,value:t})}if(!0===r.propertyNames)return;if("object"!==a(r.propertyNames))return;const o=[],i=Object.keys(t),s=Object.assign(Object.assign({},r.propertyNames),{type:"string"});return i.forEach((r=>{const i=e.validate(r,s,`${n}/${r}`);i.length>0&&o.push(e.errors.invalidPropertyNameError({property:r,pointer:n,validationError:i[0],value:t[r]}))})),o}}),hr=dr;function yr(e,r,t=e.rootSchema,n="#"){let o=Be(t);for(let r=0;r<t.allOf.length;r+=1){const n=e.resolveRef(t.allOf[r]);o=R(o,n)}return delete o.allOf,o}function gr(e,r,t=e.rootSchema,n="#"){let o=!1,i=Be(t);for(let a=0;a<t.anyOf.length;a+=1){const s=e.resolveRef(t.anyOf[a]);e.isValid(r,t.anyOf[a],n)&&(o=!0,i=R(i,s))}return!1===o?Le.anyOfError({value:r,pointer:n,anyOf:JSON.stringify(t.anyOf)}):(delete i.anyOf,i)}function Er(e){const r={type:a(e)};return"object"===r.type&&(r.properties={},Object.keys(e).forEach((t=>r.properties[t]=Er(e[t])))),"array"===r.type&&1===e.length?r.items=Er(e[0]):"array"===r.type&&(r.items=e.map(Er)),r}function Or(e,r,t=e.rootSchema){const n=e.step(r,t,{},"#");return s(n)?"one-of-error"===n.code?n.data.oneOf.map((r=>e.resolveRef(r))):n:[n]}const vr={array:(e,r,t,n,o)=>{const i=a(t.items);if("object"===i)return Array.isArray(t.items.oneOf)?e.resolveOneOf(n[r],t.items,o):Array.isArray(t.items.anyOf)?e.resolveAnyOf(n[r],t.items,o):Array.isArray(t.items.allOf)?e.resolveAllOf(n[r],t.items,o):e.resolveRef(t.items);if("array"===i){if(!0===t.items[r])return Er(n[r]);if(!1===t.items[r])return Le.invalidDataError({key:r,value:n[r],pointer:o});if(t.items[r])return e.resolveRef(t.items[r]);if(!1===t.additionalItems)return Le.additionalItemsError({key:r,value:n[r],pointer:o});if(!0===t.additionalItems||void 0===t.additionalItems)return Er(n[r]);if("object"===a(t.additionalItems))return t.additionalItems;throw new Error(`Invalid schema ${JSON.stringify(t,null,4)} for ${JSON.stringify(n,null,4)}`)}return!1!==t.additionalItems&&n[r]?Er(n[r]):new Error(`Invalid array schema for ${r} at ${o}`)},object:(e,r,t,n,o)=>{if(Array.isArray(t.oneOf)){const r=e.resolveOneOf(n,t,o);if(s(t=R(t,r)))return t}if(Array.isArray(t.anyOf)&&s(t=e.resolveAnyOf(n,t,o)))return t;if(Array.isArray(t.allOf)&&s(t=e.resolveAllOf(n,t,o)))return t;let i;if(t.properties&&void 0!==t.properties[r]){if(i=e.resolveRef(t.properties[r]),s(i))return i;if(i&&Array.isArray(i.oneOf)){let t=e.resolveOneOf(n[r],i,`${o}/${r}`);const a=i.oneOf.findIndex((e=>e===t));return t=JSON.parse(JSON.stringify(t)),t.variableSchema=!0,t.oneOfIndex=a,t.oneOfSchema=i,t}if(i)return i}const{dependencies:l}=t;if("object"===a(l)){const t=Object.keys(l).filter((e=>"object"===a(l[e])));for(let o=0,i=t.length;o<i;o+=1){const i=t[o],a=br(e,r,l[i],n);if(!s(a))return a}}if(t.if&&(t.then||t.else)){const i=e.isValid(n,t.if);if(i&&t.then){const i=br(e,r,t.then,n,o);if("string"==typeof i.type&&"error"!==i.type)return i}if(!i&&t.else){const i=br(e,r,t.else,n,o);if("string"==typeof i.type&&"error"!==i.type)return i}}if("object"===a(t.patternProperties)){let e;const n=Object.keys(t.patternProperties);for(let o=0,i=n.length;o<i;o+=1)if(e=new RegExp(n[o]),e.test(r))return t.patternProperties[n[o]]}return"object"===a(t.additionalProperties)?t.additionalProperties:!0===t.additionalProperties?Er(n[r]):Le.unknownPropertyError({property:r,value:n,pointer:`${o}`})}};function br(e,r,t,n,o="#"){if(Array.isArray(t.type)){const i=a(n);return t.type.includes(i)?vr[i](e,`${r}`,t,n,o):e.errors.typeError({value:n,pointer:o,expected:t.type,received:i})}const i=t.type||a(n),s=vr[i];return s?s(e,`${r}`,t,n,o):new Error(`Unsupported schema type ${t.type} for key ${r}`)}const xr={array:(e,r,t,n)=>e.typeKeywords.array.filter((e=>r&&null!=r[e])).map((o=>e.validateKeyword[o](e,r,t,n))),object:(e,r,t,n)=>e.typeKeywords.object.filter((e=>r&&null!=r[e])).map((o=>e.validateKeyword[o](e,r,t,n))),string:(e,r,t,n)=>e.typeKeywords.string.filter((e=>r&&null!=r[e])).map((o=>e.validateKeyword[o](e,r,t,n))),integer:(e,r,t,n)=>e.typeKeywords.number.filter((e=>r&&null!=r[e])).map((o=>e.validateKeyword[o](e,r,t,n))),number:(e,r,t,n)=>e.typeKeywords.number.filter((e=>r&&null!=r[e])).map((o=>e.validateKeyword[o](e,r,t,n))),boolean:(e,r,t,n)=>e.typeKeywords.boolean.filter((e=>r&&null!=r[e])).map((o=>e.validateKeyword[o](e,r,t,n))),null:(e,r,t,n)=>e.typeKeywords.null.filter((e=>r&&null!=r[e])).map((o=>e.validateKeyword[o](e,r,t,n)))};var _r=__webpack_require__(63),Pr=__webpack_require__.n(_r);function Sr(e,r,t=e.rootSchema,n="#"){if("boolean"===a(t=e.resolveRef(t)))return t?[]:[e.errors.invalidDataError({value:r,pointer:n})];if(s(t))return[t];if(void 0!==t.const)return Pr()(t.const,r)?[]:[e.errors.constError({value:r,expected:t.const,pointer:n})];const o=function(e,r){const t=a(e);return"number"===t&&("integer"===r||Array.isArray(r)&&r.includes("integer"))?Number.isInteger(e)?"integer":"number":t}(r,t.type),i=t.type||o;if(!(o===i||Array.isArray(i)&&i.includes(o)))return[e.errors.typeError({received:o,expected:i,value:r,pointer:n})];if(null==e.validateType[o])return[e.errors.invalidTypeError({receivedType:o,pointer:n})];return f(e.validateType[o](e,t,r,n)).filter(l)}const Ar={typeKeywords:{array:["enum","contains","items","minItems","maxItems","uniqueItems","not","if"],boolean:["enum","not"],object:["additionalProperties","dependencies","enum","format","minProperties","maxProperties","patternProperties","properties","propertyNames","required","not","oneOf","allOf","anyOf","if"],string:["enum","format","maxLength","minLength","pattern","not","oneOf","allOf","anyOf","if"],number:["enum","exclusiveMaximum","exclusiveMinimum","format","maximum","minimum","multipleOf","not","oneOf","allOf","anyOf","if"],null:["enum","format","not","oneOf","allOf","anyOf"]},validateKeyword:hr,validateType:xr,validateFormat:He,errors:Le,addRemoteSchema:$,compileSchema:ke,createSchemaOf:Er,each:Ne,eachSchema:Ee,getChildSchemaSelection:Or,getSchema:x,getTemplate:ir,isValid:ar,resolveAllOf:yr,resolveAnyOf:gr,resolveOneOf:m,resolveRef:g,step:br,validate:Sr};class Rr extends j{constructor(e,r={}){super(R(Ar,r),e)}}const jr=Object.assign(Object.assign({},Ar),{resolveOneOf:y,resolveRef:E});class $r extends j{constructor(e,r={}){super(R(jr,r),e)}}class wr{constructor(e,r){this.core=new $r(e),this.schema=e,this.data=r,this.cache={}}updateData(e){this.data=e,this.cache={}}updateSchema(e){this.schema=e,this.core.setSchema(e),this.cache={}}get(e,r){if(r){const t=x(this.core,e,r,this.schema);return Be(t)}if("#"===e)return this.schema;if(this.cache[e])return this.cache[e];const t=v().join(e,"..");let n=this.cache[t];null==n&&(n=x(this.core,t,this.data,this.schema),!0!==n.variableSchema&&(this.cache[t]=Be(n)));const o=v().split(e).pop();let i=x(this.core,o,v().get(this.data,t),this.cache[t]);return i=Be(i),!0!==i.variableSchema&&(this.cache[e]=i),i}}function Ir(e,r,t){const{schema:n,pointer:o,onError:i}=Object.assign({schema:e.rootSchema,pointer:"#"},t);let a=e.validate(r,n,o);if(i){a=f(a);const e=function(e){return function r(t){return Array.isArray(t)?((t=f(t)).forEach(r),t):(s(t)&&e(t),t)}}(i);for(let r=0;r<a.length;r+=1)a[r]instanceof Promise?a[r].then(e):s(a[r])&&i(a[r])}return Promise.all(a).then(f).then((e=>e.filter(u))).catch((e=>{throw console.log("Failed resolving promises",e.message),console.log(e.stack),e}))}const kr="__compiled",Nr="__ref",Lr=/(#|\/)+$/g;const Tr={typeKeywords:{array:["enum","items","minItems","maxItems","uniqueItems","not"],boolean:["enum","not"],object:["additionalProperties","dependencies","enum","format","minProperties","maxProperties","patternProperties","properties","required","not","oneOf","allOf","anyOf"],string:["enum","format","maxLength","minLength","pattern","not","oneOf","allOf","anyOf"],number:["enum","format","maximum","minimum","multipleOf","not","oneOf","allOf","anyOf"],null:["enum","format","not","oneOf","allOf","anyOf"]},validateKeyword:mr,validateType:{array:(e,r,t,n)=>e.typeKeywords.array.filter((e=>r&&null!=r[e])).map((o=>e.validateKeyword[o](e,r,t,n))),object:(e,r,t,n)=>e.typeKeywords.object.filter((e=>r&&null!=r[e])).map((o=>e.validateKeyword[o](e,r,t,n))),string:(e,r,t,n)=>e.typeKeywords.string.filter((e=>r&&null!=r[e])).map((o=>e.validateKeyword[o](e,r,t,n))),integer:(e,r,t,n)=>e.typeKeywords.number.filter((e=>r&&null!=r[e])).map((o=>e.validateKeyword[o](e,r,t,n))),number:(e,r,t,n)=>e.typeKeywords.number.filter((e=>r&&null!=r[e])).map((o=>e.validateKeyword[o](e,r,t,n))),boolean:(e,r,t,n)=>e.typeKeywords.boolean.filter((e=>r&&null!=r[e])).map((o=>e.validateKeyword[o](e,r,t,n))),null:(e,r,t,n)=>e.typeKeywords.null.filter((e=>r&&null!=r[e])).map((o=>e.validateKeyword[o](e,r,t,n)))},validateFormat:He,errors:Le,addRemoteSchema:$,compileSchema:function(e,r,t=r,n=!1){if(!r||void 0!==r.__compiled)return r;const o={ids:{},remotes:e.remotes},i=JSON.stringify(r),a=JSON.parse(i);if(Object.defineProperty(a,kr,{enumerable:!1,value:!0}),Object.defineProperty(a,"getRef",{enumerable:!1,value:je.bind(null,o,a)}),!1===n&&!1===i.includes("$ref"))return a;r!==t&&Object.defineProperty(a,"definitions",{enumerable:!1,value:Object.assign({},t.definitions,t.$defs,r.definitions,r.$defs)});const s={},l=()=>a;return Ee(a,((e,r)=>{e.id&&(o.ids[e.id.replace(Lr,"")]=r);const t=(r=`#${r}`.replace(/##+/,"#")).replace(/\/[^/]+$/,""),n=r.replace(/\/[^/]+\/[^/]+$/,""),i=Pe(s[t]||s[n],e.id);s[r]=i,null==o.ids[i]&&(o.ids[i]=r),e.$ref&&!e.__ref&&(Object.defineProperty(e,Nr,{enumerable:!1,value:Pe(i,e.$ref)}),Object.defineProperty(e,"getRoot",{enumerable:!1,value:l}))})),a},createSchemaOf:Er,each:Ne,eachSchema:Ee,getChildSchemaSelection:Or,getSchema:x,getTemplate:ir,isValid:ar,resolveAllOf:yr,resolveAnyOf:gr,resolveOneOf:m,resolveRef:g,step:br,validate:Sr};class Cr extends j{constructor(e,r={}){super(R(Tr,r),e)}}const Ur={typeKeywords:{array:["enum","contains","items","minItems","maxItems","uniqueItems","not","if"],boolean:["enum","not"],object:["additionalProperties","dependencies","enum","format","minProperties","maxProperties","patternProperties","properties","propertyNames","required","not","oneOf","allOf","anyOf","if"],string:["enum","format","maxLength","minLength","pattern","not","oneOf","allOf","anyOf","if"],number:["enum","exclusiveMaximum","exclusiveMinimum","format","maximum","minimum","multipleOf","not","oneOf","allOf","anyOf","if"],null:["enum","format","not","oneOf","allOf","anyOf"]},validateKeyword:hr,validateType:xr,validateFormat:He,errors:Le,addRemoteSchema:$,compileSchema:ke,createSchemaOf:Er,each:Ne,eachSchema:Ee,getChildSchemaSelection:Or,getSchema:x,getTemplate:ir,isValid:ar,resolveAllOf:yr,resolveAnyOf:gr,resolveOneOf:m,resolveRef:g,step:br,validate:Sr};class Mr extends j{constructor(e,r={}){super(R(Ur,r),e)}}const qr={strings:e}})(),__webpack_exports__})()));
|
|
2
|
+
!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 __webpack_modules__={996: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 i(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(r){return e.propertyIsEnumerable(r)})):[]}(e))}function a(e,r){try{return r in e}catch(e){return!1}}function s(e,r,t){var o={};return t.isMergeableObject(e)&&i(e).forEach((function(r){o[r]=n(e[r],t)})),i(r).forEach((function(i){(function(e,r){return a(e,r)&&!(Object.hasOwnProperty.call(e,r)&&Object.propertyIsEnumerable.call(e,r))})(e,i)||(a(e,i)&&t.isMergeableObject(r[i])?o[i]=function(e,r){if(!r.customMerge)return l;var t=r.customMerge(e);return"function"==typeof t?t:l}(i,t)(e[i],r[i],t):o[i]=n(r[i],t))})),o}function l(e,t,i){(i=i||{}).arrayMerge=i.arrayMerge||o,i.isMergeableObject=i.isMergeableObject||r,i.cloneUnlessOtherwiseSpecified=n;var a=Array.isArray(t);return a===Array.isArray(e)?a?i.arrayMerge(e,t,i):s(e,t,i):n(t,i)}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 u=l;e.exports=u},723:(e,r,t)=>{"use strict";const n=t(802);var o;!function(e){e.RULES=[{name:"Grammar",bnf:[["RULE_S*","%Atomic*","EOF"]]},{name:"%Atomic",bnf:[["Production","RULE_S*"]],fragment:!0},{name:"Production",bnf:[["NCName","RULE_S*",'"::="',"RULE_WHITESPACE*","Choice","RULE_WHITESPACE*","RULE_EOL+","RULE_S*"]]},{name:"NCName",bnf:[[/[a-zA-Z][a-zA-Z_0-9]*/]]},{name:"Choice",bnf:[["SequenceOrDifference","%_Choice_1*"]],fragment:!0},{name:"%_Choice_1",bnf:[["RULE_WHITESPACE*",'"|"',"RULE_WHITESPACE*","SequenceOrDifference"]],fragment:!0},{name:"SequenceOrDifference",bnf:[["Item","RULE_WHITESPACE*","%_Item_1?"]]},{name:"%_Item_1",bnf:[["Minus","Item"],["Item*"]],fragment:!0},{name:"Minus",bnf:[['"-"']]},{name:"Item",bnf:[["RULE_WHITESPACE*","%Primary","PrimaryDecoration?"]],fragment:!0},{name:"PrimaryDecoration",bnf:[['"?"'],['"*"'],['"+"']]},{name:"DecorationName",bnf:[['"ebnf://"',/[^\x5D#]+/]]},{name:"%Primary",bnf:[["NCName"],["StringLiteral"],["CharCode"],["CharClass"],["SubItem"]],fragment:!0},{name:"SubItem",bnf:[['"("',"RULE_WHITESPACE*","Choice","RULE_WHITESPACE*",'")"']]},{name:"StringLiteral",bnf:[["'\"'",/[^"]*/,"'\"'"],['"\'"',/[^']*/,'"\'"']],pinned:1},{name:"CharCode",bnf:[['"#x"',/[0-9a-zA-Z]+/]]},{name:"CharClass",bnf:[["'['","'^'?","%RULE_CharClass_1+",'"]"']]},{name:"%RULE_CharClass_1",bnf:[["CharCodeRange"],["CharRange"],["CharCode"],["RULE_Char"]],fragment:!0},{name:"RULE_Char",bnf:[[/\x09/],[/\x0A/],[/\x0D/],[/[\x20-\x5c]/],[/[\x5e-\uD7FF]/],[/[\uE000-\uFFFD]/]]},{name:"CharRange",bnf:[["RULE_Char",'"-"',"RULE_Char"]]},{name:"CharCodeRange",bnf:[["CharCode",'"-"',"CharCode"]]},{name:"RULE_WHITESPACE",bnf:[["%RULE_WHITESPACE_CHAR*"],["Comment","RULE_WHITESPACE*"]]},{name:"RULE_S",bnf:[["RULE_WHITESPACE","RULE_S*"],["RULE_EOL","RULE_S*"]]},{name:"%RULE_WHITESPACE_CHAR",bnf:[[/\x09/],[/\x20/]],fragment:!0},{name:"Comment",bnf:[['"/*"',"%RULE_Comment_Body*",'"*/"']]},{name:"%RULE_Comment_Body",bnf:[['!"*/"',/[^*]/]],fragment:!0},{name:"RULE_EOL",bnf:[[/\x0D/,/\x0A/],[/\x0A/],[/\x0D/]]},{name:"Link",bnf:[["'['","Url","']'"]]},{name:"Url",bnf:[[/[^\x5D:/?#]/,'"://"',/[^\x5D#]+/,"%Url1?"]]},{name:"%Url1",bnf:[['"#"',"NCName"]],fragment:!0}],e.defaultParser=new n.Parser(e.RULES,{debug:!1});const r=/^(!|&)/,t=/(\?|\+|\*)$/,o=/^%/;function i(e,i){if("string"==typeof e){if(r.test(e))return"";if(o.test(e)){let r=t.exec(e),o=r?r[0]+" ":"",s=function(e,r){let t=n.findRuleByName(e,r);return t&&1==t.bnf.length&&1==t.bnf[0].length&&(t.bnf[0][0]instanceof RegExp||'"'==t.bnf[0][0][0]||"'"==t.bnf[0][0][0])}(e,i);return s?a(e,i)+o:"("+a(e,i)+")"+o}return e}return e.source.replace(/\\(?:x|u)([a-zA-Z0-9]+)/g,"#x$1").replace(/\[\\(?:x|u)([a-zA-Z0-9]+)-\\(?:x|u)([a-zA-Z0-9]+)\]/g,"[#x$1-#x$2]")}function a(e,r){let t=n.findRuleByName(e,r);return t?t.bnf.map((e=>function(e,r){return e.map((e=>i(e,r))).join(" ")}(e,r))).join(" | "):"RULE_NOT_FOUND {"+e+"}"}function s(e){let r=[];return e.grammarRules.forEach((t=>{if(!/^%/.test(t.name)){let n=t.recover?" /* { recoverUntil="+t.recover+" } */":"";r.push(t.name+" ::= "+a(t.name,e)+n)}})),r.join("\n")}e.emit=s;let l=0;function u(e){return new RegExp(e.replace(/#x([a-zA-Z0-9]{4})/g,"\\u$1").replace(/#x([a-zA-Z0-9]{3})/g,"\\u0$1").replace(/#x([a-zA-Z0-9]{2})/g,"\\x$1").replace(/#x([a-zA-Z0-9]{1})/g,"\\x0$1"))}function f(e,r,t){let n=null,o=[];return r.children.forEach(((i,a)=>{"Minus"==i.type&&function(e,r){throw console.log("reberia restar "+r+" a "+e),new Error("Difference not supported yet")}(n,i);let s=r.children[a+1];s=s&&"PrimaryDecoration"==s.type&&s.text||"";switch(i.type){case"SubItem":let r="%"+(t+l++);c(e,i,r),o.push(""+r+s);break;case"NCName":case"StringLiteral":o.push(""+i.text+s);break;case"CharCode":case"CharClass":if(s){let r={name:"%"+(t+l++),bnf:[[u(i.text)]]};e.push(r),o.push(""+r.name+s)}else o.push(u(i.text));break;case"PrimaryDecoration":break;default:throw new Error(" HOW SHOULD I PARSE THIS? "+i.type+" -> "+JSON.stringify(i.text))}n=i})),o}function c(e,r,t){let n=r.children.filter((e=>"SequenceOrDifference"==e.type)).map((r=>f(e,r,t))),o={name:t,bnf:n},i=null;n.forEach((e=>{i=i||e.recover,delete e.recover})),0==t.indexOf("%")&&(o.fragment=!0),i&&(o.recover=i),e.push(o)}function p(r,t=e.defaultParser){let n=t.getAST(r);if(!n)throw new Error("Could not parse "+r);if(n.errors&&n.errors.length)throw n.errors[0];let o=[];return n.children.filter((e=>"Production"==e.type)).map((e=>{let r=e.children.filter((e=>"NCName"==e.type))[0].text;c(o,e,r)})),o}e.getRules=p,e.Transform=function(r,t=e.defaultParser){return p(r.join(""),t)};class m extends n.Parser{constructor(r,t){super(p(r,t&&!0===t.debugRulesParser?new n.Parser(e.RULES,{debug:!0}):e.defaultParser),t)}emitSource(){return s(this)}}e.Parser=m}(o||(o={})),r.Z=o},802:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Parser=exports.findRuleByName=exports.parseRuleName=exports.escapeRegExp=exports.readToken=void 0;const UPPER_SNAKE_RE=/^[A-Z0-9_]+$/,decorationRE=/(\?|\+|\*)$/,preDecorationRE=/^(@|&|!)/,WS_RULE="WS",TokenError_1=__webpack_require__(239);function readToken(e,r){let t=r.exec(e);return t&&0==t.index?0==t[0].length&&r.source.length>0?null:{type:null,text:t[0],rest:e.substr(t[0].length),start:0,end:t[0].length-1,fullText:t[0],errors:[],children:[],parent:null}:null}function escapeRegExp(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function fixRest(e){e.rest="",e.children&&e.children.forEach((e=>fixRest(e)))}function fixPositions(e,r){e.start+=r,e.end+=r,e.children&&e.children.forEach((r=>fixPositions(r,e.start)))}function agregateErrors(e,r){r.errors&&r.errors.length&&r.errors.forEach((r=>e.push(r))),r.children&&r.children.forEach((r=>agregateErrors(e,r)))}function parseRuleName(e){let r=decorationRE.exec(e),t=preDecorationRE.exec(e),n=r&&r[0]||"",o=t&&t[0]||"",i={raw:e,name:e.replace(decorationRE,"").replace(preDecorationRE,""),isOptional:"?"==n||"*"==n,allowRepetition:"+"==n||"*"==n,atLeastOne:"+"==n,lookupPositive:"&"==o,lookupNegative:"!"==o,pinned:"@"==o,lookup:!1,isLiteral:!1};return i.isLiteral="'"==i.name[0]||'"'==i.name[0],i.lookup=i.lookupNegative||i.lookupPositive,i}function findRuleByName(e,r){let t=parseRuleName(e);return r.cachedRules[t.name]||null}function stripRules(e,r){if(e.children){let t=e.children.filter((e=>e.type&&r.test(e.type)));for(let r=0;r<t.length;r++){let n=e.children.indexOf(t[r]);-1!=n&&e.children.splice(n,1)}e.children.forEach((e=>stripRules(e,r)))}}exports.readToken=readToken,exports.escapeRegExp=escapeRegExp,exports.parseRuleName=parseRuleName,exports.findRuleByName=findRuleByName;const ignoreMissingRules=["EOF"];class Parser{constructor(e,r){this.grammarRules=e,this.options=r,this.cachedRules={},this.debug=!!r&&!0===r.debug;let t=[],n=[];if(e.forEach((e=>{let r=parseRuleName(e.name);if(r.name in this.cachedRules)t.push("Duplicated rule "+r.name);else{if(this.cachedRules[r.name]=e,e.bnf&&e.bnf.length)e.bnf.forEach((r=>{if("string"==typeof r[0]){if(parseRuleName(r[0]).name==e.name){let r="Left recursion is not allowed, rule: "+e.name;-1==t.indexOf(r)&&t.push(r)}}r.forEach((e=>{if("string"==typeof e){let r=parseRuleName(e);r.isLiteral||-1!=n.indexOf(r.name)||-1!=ignoreMissingRules.indexOf(r.name)||n.push(r.name)}}))}));else{let r="Missing rule content, rule: "+e.name;-1==t.indexOf(r)&&t.push(r)}WS_RULE==e.name&&(e.implicitWs=!1),e.implicitWs&&-1==n.indexOf(WS_RULE)&&n.push(WS_RULE),e.recover&&-1==n.indexOf(e.recover)&&n.push(e.recover)}})),n.forEach((e=>{e in this.cachedRules||t.push("Missing rule "+e)})),t.length)throw new Error(t.join("\n"))}getAST(e,r){r||(r=this.grammarRules.filter((e=>!e.fragment&&0!=e.name.indexOf("%")))[0].name);let t=this.parse(e,r);if(t){agregateErrors(t.errors,t),fixPositions(t,0),stripRules(t,/^%/),this.options&&this.options.keepUpperRules||stripRules(t,UPPER_SNAKE_RE);let e=t.rest;e&&new TokenError_1.TokenError("Unexpected end of input: \n"+e,t),fixRest(t),t.rest=e}return t}emitSource(){return"CANNOT EMIT SOURCE FROM BASE Parser"}parse(txt,target,recursion=0){let out=null,type=parseRuleName(target),expr,printable=this.debug&&!UPPER_SNAKE_RE.test(type.name);printable&&console.log(new Array(recursion).join("│ ")+"Trying to get "+target+" from "+JSON.stringify(txt.split("\n")[0]));let realType=type.name,targetLex=findRuleByName(type.name,this);if("EOF"==type.name){if(txt.length)return null;if(0==txt.length)return{type:"EOF",text:"",rest:"",start:0,end:0,fullText:"",errors:[],children:[],parent:null}}try{if(!targetLex&&type.isLiteral){let src=eval(type.name);if(""===src)return{type:"%%EMPTY%%",text:"",rest:txt,start:0,end:0,fullText:"",errors:[],children:[],parent:null};expr=new RegExp(escapeRegExp(src)),realType=null}}catch(e){return e instanceof ReferenceError&&console.error(e),null}if(expr){let e=readToken(txt,expr);if(e)return e.type=realType,e}else{let e=targetLex.bnf;e instanceof Array&&e.forEach((e=>{if(out)return;let r=null,t={type:type.name,text:"",children:[],end:0,errors:[],fullText:"",parent:null,start:0,rest:txt};targetLex.fragment&&(t.fragment=!0);let n=txt,o=0,i=e.length>0,a=!1;for(let s=0;s<e.length;s++)if("string"==typeof e[s]){let l,u=parseRuleName(e[s]);i=i&&u.isOptional;let f=!1;do{if(l=null,targetLex.implicitWs&&(l=this.parse(n,u.name,recursion+1),!l)){let e;do{if(e=this.parse(n,WS_RULE,recursion+1),!e)break;t.text=t.text+e.text,t.end=t.text.length,e.parent=t,t.children.push(e),n=n.substr(e.text.length),o+=e.text.length}while(e&&e.text.length)}if(l=l||this.parse(n,u.name,recursion+1),u.lookupNegative){if(l)return;break}if(u.lookupPositive&&!l)return;if(!l){if(u.isOptional)break;if(u.atLeastOne&&f)break}if(l&&targetLex.pinned==s+1&&(r=l,printable&&console.log(new Array(recursion+1).join("│ ")+"└─ "+l.type+" PINNED")),l||(l=this.parseRecovery(targetLex,n,recursion+1)),!l){if(!r)return;out=t,l={type:"SyntaxError",text:n,children:[],end:n.length,errors:[],fullText:"",parent:null,start:0,rest:""},n.length?new TokenError_1.TokenError(`Unexpected end of input. Expecting ${u.name} Got: ${n}`,l):new TokenError_1.TokenError(`Unexpected end of input. Missing ${u.name}`,l),printable&&console.log(new Array(recursion+1).join("│ ")+"└─ "+l.type+" "+JSON.stringify(l.text))}if(f=!0,a=!0,"%%EMPTY%%"==l.type)break;l.start+=o,l.end+=o,!u.lookupPositive&&l.type&&(l.fragment?l.children&&l.children.forEach((e=>{e.start+=o,e.end+=o,e.parent=t,t.children.push(e)})):(l.parent=t,t.children.push(l))),u.lookup&&(l.lookup=!0),printable&&console.log(new Array(recursion+1).join("│ ")+"└─ "+l.type+" "+JSON.stringify(l.text)),u.lookup||l.lookup||(t.text=t.text+l.text,t.end=t.text.length,n=n.substr(l.text.length),o+=l.text.length),t.rest=n}while(l&&u.allowRepetition&&n.length&&!l.lookup)}else{let r=readToken(n,e[s]);if(!r)return;printable&&console.log(new Array(recursion+1).join("│ ")+"└> "+JSON.stringify(r.text)+e[s].source),a=!0,r.start+=o,r.end+=o,t.text=t.text+r.text,t.end=t.text.length,n=n.substr(r.text.length),o+=r.text.length,t.rest=n}a&&(out=t,printable&&console.log(new Array(recursion).join("│ ")+"├<─┴< PUSHING "+out.type+" "+JSON.stringify(out.text)))})),out&&targetLex.simplifyWhenOneChildren&&1==out.children.length&&(out=out.children[0])}return out||printable&&console.log(target+" NOT RESOLVED FROM "+txt),out}parseRecovery(e,r,t){if(e.recover&&r.length){let n=this.debug;n&&console.log(new Array(t+1).join("│ ")+"Trying to recover until token "+e.recover+" from "+JSON.stringify(r.split("\n")[0]+r.split("\n")[1]));let o,i={type:"SyntaxError",text:"",children:[],end:0,errors:[],fullText:"",parent:null,start:0,rest:""};do{if(o=this.parse(r,e.recover,t+1),o){new TokenError_1.TokenError('Unexpected input: "'+i.text+`" Expecting: ${e.name}`,i);break}i.text=i.text+r[0],i.end=i.text.length,r=r.substr(1)}while(!o&&r.length>0);if(i.text.length>0&&o)return n&&console.log(new Array(t+1).join("│ ")+"Recovered text: "+JSON.stringify(i.text)),i}return null}}exports.Parser=Parser,exports.default=Parser},239:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.TokenError=void 0;class t extends Error{constructor(e,r){if(super(e),this.message=e,this.token=r,!r||!r.errors)throw this;r.errors.push(this)}inspect(){return"SyntaxError: "+this.message}}r.TokenError=t},63: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,i;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=(i=Object.keys(r)).length)!==Object.keys(t).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,i[o]))return!1;for(o=n;0!=o--;){var a=i[o];if(!e(r[a],t[a]))return!1}return!0}return r!=r&&t!=t}},483:e=>{"use strict";e.exports=function(e){return Array.isArray(e)?e:"[object Object]"===Object.prototype.toString.call(e)?Object.keys(e).map((function(r){return e[r]})):[]}},453:e=>{"use strict";e.exports=function(e,r){Array.isArray(e)?e.forEach(r):"[object Object]"===Object.prototype.toString.call(e)&&Object.keys(e).forEach((function(t){r(e[t],t,e)}))}},691:(e,r,t)=>{"use strict";r.values=t(817),r.asArray=t(483),r.forEach=t(453),r.keyOf=t(927),r.keys=t(988)},927:(e,r,t)=>{"use strict";var n=t(453);e.exports=function(e,r){var t=null;return n(e,(function(e,n){r===e&&(t=n)})),t}},988:e=>{"use strict";e.exports=function(e){var r;if(Array.isArray(e))r=e.map((function(e,r){return r}));else{if("[object Object]"===Object.prototype.toString.call(e))return Object.keys(e);r=[]}return r}},817:e=>{"use strict";e.exports=function(e){return Array.isArray(e)?e:"[object Object]"===Object.prototype.toString.call(e)?Object.keys(e).map((function(r){return e[r]})):null!=e?[e]:[]}},909:function(e){"undefined"!=typeof self&&self,e.exports=(()=>{"use strict";var e={431:(e,r,t)=>{function n(e){return"#"===e||""===e||Array.isArray(e)&&0===e.length||!1}t.r(r),t.d(r,{default:()=>S,get:()=>c,isRoot:()=>n,join:()=>P,remove:()=>O,removeUndefinedItems:()=>E,set:()=>h,split:()=>f});const o=/~1/g,i=/~0/g,a=/\/+/g,s=/(^[#/]*|\/+$)/g;function l(e){return e.replace(o,"/").replace(i,"~")}function u(e){return l(decodeURIComponent(e))}function f(e){if(null==e||"string"!=typeof e||n(e))return Array.isArray(e)?e:[];const r=e.indexOf("#")>=0?u:l,t=(e=(e=e.replace(a,"/")).replace(s,"")).split("/");for(let e=0,n=t.length;e<n;e+=1)t[e]=r(t[e]);return t}function c(e,r,t){if(null==r||null==e)return t;if(n(r))return e;const o=p(e,f(r));return void 0===o?t:o}function p(e,r){const t=r.shift();if(void 0!==e)return void 0!==t?p(e[t],r):e}const m=/^\[.*\]$/,d=/^\[(.+)\]$/;function h(e,r,t){if(null==r)return e;const n=f(r);if(0===n.length)return e;null==e&&(e=m.test(n[0])?[]:{});let o,i,a=e;for(;n.length>1;)o=n.shift(),i=m.test(n[0]),a=g(a,o,i);return o=n.pop(),y(a,o,t),e}function y(e,r,t){let n;const o=r.match(d);"[]"===r&&Array.isArray(e)?e.push(t):o?(n=o.pop(),e[n]=t):e[r]=t}function g(e,r,t){if(null!=e[r])return e[r];const n=t?[]:{};return y(e,r,n),n}function E(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 O(e,r,t){const n=f(r),o=n.pop(),i=c(e,n);return i&&delete i[o],Array.isArray(i)&&!0!==t&&E(i),e}const v=/\/+/g,b=/~/g,x=/\//g;function _(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(x,"~1"),r&&(e[t]=encodeURIComponent(e[t]));return((r?"#/":"/")+e.join("/")).replace(v,"/")}function P(e,...r){const t=[];if(Array.isArray(e))return _(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,f(arguments[e]));const i=[];for(let e=0,r=t.length;e<r;e+=1)if(".."===t[e]){if(0===i.length)return o?"#":"";i.pop()}else i.push(t[e]);return _(i,o)}const S={get:c,set:h,remove:O,join:P,split:f,isRoot:n,removeUndefinedItems:E}}},r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{}};return e[n](o,o.exports,t),o.exports}return 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(431)})()},481:(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=i,e.exports.isUri=t,e.exports.isHttpUri=n,e.exports.isHttpsUri=o,e.exports.isWebUri=i;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,i,a,s="",l="";if(s=(t=r(e))[1],n=t[2],o=t[3],i=t[4],a=t[5],s&&s.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(s.toLowerCase()))return l+=s+":",n&&n.length&&(l+="//"+n),l+=o,i&&i.length&&(l+="?"+i),a&&a.length&&(l+="#"+a),l}}}function n(e,n){if(t(e)){var o,i,a,s,l="",u="",f="",c="";if(l=(o=r(e))[1],u=o[2],i=o[3],a=o[4],s=o[5],l){if(n){if("https"!=l.toLowerCase())return}else if("http"!=l.toLowerCase())return;if(u)return/:(\d+)$/.test(u)&&(f=u.match(/:(\d+)$/)[0],u=u.replace(/:\d+$/,"")),c+=l+":",c+="//"+u,f&&(c+=f),c+=i,a&&a.length&&(c+="?"+a),s&&s.length&&(c+="#"+s),c}}}function o(e){return n(e,!0)}function i(e){return n(e)||o(e)}}(e=t.nmd(e))}},__webpack_module_cache__={};function __webpack_require__(e){var r=__webpack_module_cache__[e];if(void 0!==r)return r.exports;var t=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(t.exports,t,t.exports,__webpack_require__),t.loaded=!0,t.exports}__webpack_require__.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(r,{a:r}),r},__webpack_require__.d=(e,r)=>{for(var t in r)__webpack_require__.o(r,t)&&!__webpack_require__.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},__webpack_require__.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Draft:()=>$,Draft04:()=>Cr,Draft06:()=>Mr,Draft07:()=>Rr,JsonEditor:()=>jr,SchemaService:()=>wr,config:()=>qr,createCustomError:()=>o,createError:()=>n,draft04Config:()=>Tr,draft06Config:()=>Ur,draft07Config:()=>Ar,draftJsonEditorConfig:()=>$r,getTypeOf:()=>a,isJSONError:()=>s,render:()=>r,resolveOneOf:()=>m,resolveOneOfFuzzy:()=>y,resolveRef:()=>g,resolveRefMerge:()=>E,settings:()=>c,validateAsync:()=>Ir});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}}`",EnumError:"Expected given value `{{value}}` in `{{pointer}}` to be one of `{{values}}`",FormatDateError:"Value `{{value}}` at `{{pointer}}` is not a valid date",FormatDateTimeError:"Value `{{value}}` at `{{pointer}}` is not a valid date-time",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",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 `{{maximum}}` 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 `{{minimum}}`, 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 `{{minimum}}`, 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}}`",TypeError:"Expected `{{value}}` ({{received}}) in `{{pointer}}` to be of type `{{expected}}`",UndefinedValueError:"Value must not be undefined in `{{pointer}}`",UniqueItemsError:"Expected unique items in {{pointer}}: duplicate value `{{value}}` found at {{itemPointer}} and {{duplicatePointer}}",UnknownPropertyError:"Could not find a valid schema for property `{{pointer}}` within object",ValueNotEmptyError:"A value for `{{property}}` is required at `{{pointer}}`"};function r(e,r={}){return e.replace(/\{\{\w+\}\}/g,(e=>r[e.replace(/[{}]/g,"")]))}function t(t,n,o=t){return r(e[t]||o,n)}function n(e,r){return{type:"error",name:e,code:(n=e,n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()),message:t(e,r),data:r};var n}function o(e){return n.bind(null,e)}const i=Object.prototype.toString;function a(e){const r=i.call(e).match(/\s([^\]]+)\]/).pop().toLowerCase();return"file"===r?"object":r}function s(e){return"error"===(null==e?void 0:e.type)}function l(e){return s(e)||e instanceof Promise}function u(e){return s(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 c={DECLARATOR_ONEOF:"oneOfProperty",GET_TEMPLATE_RECURSION_LIMIT:1,floatingPointPrecision:1e4,propertyBlacklist:["_id"]},{DECLARATOR_ONEOF:p}=c;function m(e,r,t=e.rootSchema,n="#"){if(null!=r&&t[p]){const o=[],i=t[p],a=r[t[p]];if(void 0===a)return e.errors.missingOneOfPropertyError({property:i,pointer:n});for(let u=0;u<t.oneOf.length;u+=1){const c=e.resolveRef(t.oneOf[u]),p=e.step(i,c,r,n);if(s(p))return p;let m=f(e.validate(a,p,n));if(m=m.filter(l),!(m.length>0))return c;o.push(...m)}return e.errors.oneOfPropertyError({property:i,value:a,pointer:n,errors:o})}const o=[],i=[];for(let a=0;a<t.oneOf.length;a+=1){const s=e.resolveRef(t.oneOf[a]);let u=f(e.validate(r,s,n));u=u.filter(l),u.length>0?i.push(...u):o.push(s)}return 1===o.length?o[0]:o.length>1?e.errors.multipleOneOfError({value:r,pointer:n,matches:o}):e.errors.oneOfError({value:JSON.stringify(r),pointer:n,oneOf:t.oneOf,errors:i})}const{DECLARATOR_ONEOF:d}=c;function h(e,r,t,n){if(null==t||null==r.properties)return-1;let o=0;const i=Object.keys(r.properties);for(let a=0;a<i.length;a+=1){const s=i[a];null!=t[s]&&e.isValid(t[s],r.properties[s],n)&&(o+=1)}return o}function y(e,r,t=e.rootSchema,n="#"){if(null!=r&&t[d]){const o=[],i=t[d],a=r[t[d]];if(void 0===a)return e.errors.missingOneOfPropertyError({property:i,pointer:n});for(let u=0;u<t.oneOf.length;u+=1){const c=e.resolveRef(t.oneOf[u]),p=e.step(i,c,r,n);if(s(p))return p;let m=f(e.validate(a,p,n));if(m=m.filter(l),!(m.length>0))return c;o.push(...m)}return e.errors.oneOfPropertyError({property:i,value:a,pointer:n,errors:o})}const o=[];for(let i=0;i<t.oneOf.length;i+=1){const a=e.resolveRef(t.oneOf[i]);e.isValid(r,a,n)&&o.push(a)}if(1===o.length)return o[0];if("object"===a(r)){let o,i=0;for(let n=0;n<t.oneOf.length;n+=1){const a=e.resolveRef(t.oneOf[n]),s=h(e,a,r);i<s&&(i=s,o=t.oneOf[n])}return void 0===o?e.errors.oneOfError({value:JSON.stringify(r),pointer:n,oneOf:t.oneOf}):o}return o.length>1?e.errors.multipleOneOfError({matches:o,data:r,pointer:n}):e.errors.oneOfError({value:JSON.stringify(r),pointer:n,oneOf:t.oneOf})}function g(e,r){if(null==e||null==e.$ref)return e;if(e.getRoot){return e.getRoot().getRef(e)}return r.getRef(e)}function E(e,r){if(null==e||null==e.$ref)return e;const t=r.getRef(e),n=Object.assign({},t,e);return delete n.$ref,Object.defineProperty(n,"__ref",{enumerable:!1,value:e.__ref}),Object.defineProperty(n,"getRoot",{enumerable:!1,value:e.getRoot}),n}var O=__webpack_require__(909),v=__webpack_require__.n(O);const b={};function x(e,r,t,n=e.rootSchema){const o=v().split(r);return n=e.resolveRef(n),_(e,n,o,r,t)}function _(e,r,t,n,o=b){if(0===t.length)return e.resolveRef(r);const i=t.shift();return s(r=e.step(i,r,o,n))?r:_(e,r,t,`${n}/${i}`,o=o[i])}var P=__webpack_require__(996),S=__webpack_require__.n(P);const A=(e,r)=>r,R=(e,r)=>S()(e,r,{arrayMerge:A});class ${constructor(e,r){this.remotes={},this.errors={},this.typeKeywords={},this.validateKeyword={},this.validateType={},this.validateFormat={},this.config=e,this.typeKeywords=JSON.parse(JSON.stringify(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){return this.config.each(this,e,r,t,n)}eachSchema(e,r=this.rootSchema){return this.config.eachSchema(r,e)}getChildSchemaSelection(e,r){return this.config.getChildSchemaSelection(this,e,r)}getSchema(e="#",r,t){return this.config.getSchema(this,e,r,t)}getTemplate(e,r,t){return this.config.getTemplate(this,e,r,t)}isValid(e,r,t){return this.config.isValid(this,e,r,t)}resolveAnyOf(e,r,t){return this.config.resolveAnyOf(this,e,r,t)}resolveAllOf(e,r,t){return this.config.resolveAllOf(this,e,r,t)}resolveRef(e){return this.config.resolveRef(e,this.rootSchema)}resolveOneOf(e,r,t){return this.config.resolveOneOf(this,e,r,t)}setSchema(e){this.rootSchema=e}step(e,r,t,n){return this.config.step(this,e,r,t,n)}validate(e,r,t){return this.config.validate(this,e,r,t)}}function j(e,r,t){t.id=t.id||r,e.remotes[r]=e.compileSchema(t)}var w=__webpack_require__(723);const I=new w.Z.Parser('\nroot ::= ("#" recursion | recursion | (query | pattern) recursion* | "#" SEP? | SEP)\nrecursion ::= (SEP query | pattern)*\n\nquery ::= (ESC escaped ESC | property | all | any | regex) typecheck? lookahead?\nproperty ::= [^?/{}*,()#]+\nregex ::= "{" [^}]+ "}"\nSEP ::= "/"\nall ::= "**"\nany ::= "*"\n\ntypecheck ::= "?:" ("value" | "boolean" | "string" | "number" | "object" | "array")\nlookahead ::= "?" expression ((andExpr | orExpr) expression)*\nandExpr ::= S? "&&" S?\norExpr ::= S? "||" S?\n\nexpression ::= (exprProperty | ESC escaped ESC) ((isnot | is) (exprProperty | regex | ESC escaped ESC))*\nexprProperty ::= [a-zA-Z0-9-_ $]+\nescaped ::= [^"]+\nis ::= ":"\nisnot ::= ":!"\nESC ::= \'"\'\n\npattern ::= S? "(" (SEP query | pattern (orPattern? pattern)*)* ")" quantifier? S? lookahead?\nquantifier ::= "+" | "*" | [0-9]+\norPattern ::= S? "," S?\n\nS ::= [ ]*\n'),k=e=>I.getAST(e);var N=__webpack_require__(691);const L=(e,r)=>`${e}/${r}`,T=Object.prototype.toString,C=/Object|Array/,U=e=>C.test(T.call(e));function M(e){return new RegExp(e.text.replace(/(^{|}$)/g,""))}const q={mem:[],get(e,r){const t=e[0][r];if(!q.mem.includes(t))return U(t)&&q.mem.push(t),[t,r,e[0],L(e[3],r)]},reset(){q.mem.length=0}},V={any(e,r){const t=r[0];return N.keys(t).map((e=>[t[e],e,t,L(r[3],e)]))},all(e,r){const t=[r];return N.forEach(r[0],((n,o)=>{const i=q.get(r,o);i&&t.push(...V.all(e,i))})),t},regex(e,r){const t=M(e),n=r[0];return N.keys(n).filter((e=>t.test(e))).map((e=>[n[e],e,n,L(r[3],e)]))}},D={escaped:(e,r)=>D.property(e,r),property:(e,r)=>{const t=e.text;if(r[0]&&void 0!==r[0][t])return[r[0][t],t,r[0],L(r[3],t)]},typecheck:(e,r)=>{const t=e.text.replace(/^\?:/,"");if("value"===t)return U(r[0])?void 0:r;var n;return(n=r[0],T.call(n).match(/\s([^\]]+)\]/).pop().toLowerCase())===t?r:void 0},lookahead:(e,r)=>{let t=!0,n=!1;return e.children.forEach((e=>{if("expression"===e.type){const o=void 0!==D.expression(e,r);t=!0===n?t||o:t&&o}else n="orExpr"===e.type})),t?r:void 0},expression:(e,r)=>{const t=e.children[0].text,n=e.children[1],o=e.children[2],i=r[0];if(!1!==U(i))return function(e,r,t){if(void 0===r)return void 0!==e;let n;const o=""+e;if("regex"===t.type){n=M(t).test(o)}else n=o===t.text;"isnot"===r.type&&(n=!1===n&&void 0!==e);return n}(i[t],n,o)?r:void 0}};function F(e,r,t){const n=[];let o=e;return r.children.forEach((r=>{if("orPattern"===r.type)return n.push(...o),void(o=e);o=z(o,r,t)})),n.push(...o),n}function K(e,r,t){const n=[],o=r.children.find((e=>"quantifier"===e.type)),i=function(e){if(null==e)return 1;if("*"===e||"+"===e)return 1/0;const r=parseInt(e);return isNaN(r)?1:r}(o&&o.text);let a=e;o&&"*"===o.text&&n.push(...a);let s=0;for(;a.length>0&&s<i;)a=F(a,r,t),n.push(...a),s+=1;return n}function z(e,r,t){let n;return n="query"===r.type?function(e,r,t){let n=e;return r.children.forEach((e=>{if(V[e.type])n=function(e,r,t,n){const o=[];for(let i=0,a=r.length;i<a;i+=1)o.push(...e(t,r[i],t,n));return o}(V[e.type],n,e,t);else{if(!D[e.type])throw new Error(`Unknown filter ${e.type}`);n=function(e,r,t,n){const o=[];for(let i=0,a=r.length;i<a;i+=1){const a=e(t,r[i],n);a&&o.push(a)}return o}(D[e.type],n,e,t)}})),n}(e,r,t):"pattern"===r.type?K(e,r,t):function(e,r,t){let n=e;return r.children.forEach((e=>n=z(n,e,t))),n}(e,r,t),q.reset(),q.mem.push(e),n}const J={value:e=>e.map((e=>e[0])),pointer:e=>e.map((e=>e[3])),all:e=>e,map:e=>{const r={};return e.forEach((e=>r[e[3]]=e[0])),r}};var Z;function W(e,r,t=Z.VALUE){if(null==r)return[];""===(r=r.replace(/(\/$)/g,""))&&(r="#");const n=k(r);if(null==n)throw new Error(`empty ast for '${r}'`);if(""!==n.rest)throw new Error(`Failed parsing queryString from: '${n.rest}'`);const o=function(e,r){return q.reset(),q.mem.push(e),z([[e,null,null,"#"]],r)}(e,n);return"function"==typeof t?o.map((e=>t(...e))):J[t]?J[t](o):o}!function(e){e.POINTER="pointer",e.VALUE="value",e.ALL="all",e.MAP="map"}(Z||(Z={})),W.POINTER=Z.POINTER,W.VALUE=Z.VALUE,W.ALL=Z.ALL,W.MAP=Z.MAP;const H=["root","recursion"];function B(e,r=[]){return H.includes(e.type)?(e.children.forEach((e=>B(e,r))),r):(r.push(e.text),r)}function G(e){if(null==e||""===e)return[];return B(k(e))}const Y=e=>JSON.parse(JSON.stringify(e)),Q=Object.prototype.toString,X=e=>Q.call(e).match(/\s([^\]]+)\]/).pop().toLowerCase(),ee=new RegExp('^("[^"]+"|[^?/{}*,()#]+)$'),re=["string","number","boolean","null"],te=/^\[\d*\]$/,ne=/^\[(\d+)\]$/,oe=/^".+"$/,ie=/(^\[\d*\]$|^\d+$)/;function ae(e){return parseInt(e.replace(/^(\[|\]$)/,""))}function se(e){return oe.test(e)?e.replace(/(^"|"$)/g,""):e}function le(e,r,t,n){const o=e[0];if(/^\[\]$/.test(r)){o.push(t);const r=o.length-1;return[o[r],r,o,`${e[3]}/${r}}`]}if(null==n&&"object"===X(o[r])&&"object"===X(t))return[o[r],r,o,`${e[3]}/${r}}`];if(n===fe.INSERT_ITEMS||null==n&&ne.test(r)){const n=ae(r);return function(e,r,t){e.length<=r?e[r]=t:e.splice(r,0,t)}(o,n,t),[o[n],n,o,`${e[3]}/${n}}`]}if(n===fe.REPLACE_ITEMS||null==n){const n=ae(r);return o[n]=t,[o[n],n,o,`${e[3]}/${n}}`]}throw new Error(`Unknown array index '${r}' with force-option '${n}'`)}var ue;function fe(e,r,t,n){if(null==r)return Y(e);if(""===(r=r.replace(/(\/$)/g,"")))return Y(t);const o=Y(e);let i=[[o,null,null,"#"]];const a=G(r),s=a.pop(),l=te.test(s)&&!1===ne.test(s);if(!1===ee.test(s)||l)throw new Error(`Unsupported query '${r}' ending with non-property`);return a.forEach(((e,r)=>{if("__proto__"===e||"prototyped"===e||"constructor"===e)return;if(!1===ee.test(e))return void(i=function(e,r){const t=[];return e.forEach((e=>t.push(...W(e[0],r,Z.ALL)))),t}(i,e));const t=r>=a.length-1?s:a[r+1],o=ie.test(t);i=function(e,r,t,n){return r=se(r),e.filter((e=>!(!Array.isArray(e[0])||!ie.test(r))||!1===re.includes(X(e[0][r])))).map((e=>{const o=t?[]:{},i=e[0];return Array.isArray(i)?le(e,r,o,n):(i[r]=i[r]||o,[i[r],r,i,`${e[3]}/${r}`])}))}(i,e,o,n)})),i.forEach((e=>{let r=t;"function"===X(t)&&(r=t(e[3],s,e[0],`${e[3]}/${s}`));const o=e[0];if(Array.isArray(o))le(e,s,r,n);else{const e=se(s);if("__proto__"===e||"prototyped"===e||"constructor"===e)return;o[e]=r}})),o}!function(e){e.REPLACE_ITEMS="replace",e.INSERT_ITEMS="insert"}(ue||(ue={})),fe.REPLACE_ITEMS=ue.REPLACE_ITEMS,fe.INSERT_ITEMS=ue.INSERT_ITEMS;const ce={$ref:{type:!1},allOf:{type:!1,definitions:["allOf/*"]},anyOf:{type:!1,definitions:["anyOf/*"]},array:{type:!0,definitions:["allOf/*","anyOf/*","oneOf/*","not","items","items/*","additionalItems"],validationKeywords:["minItems","maxItems","uniqueItems"],keywords:["items","additionalItems","minItems","maxItems","uniqueItems"]},boolean:{type:!0},enum:{type:!1},integer:{type:!0,definitions:["allOf/*","anyOf/*","oneOf/*","not"],validationKeywords:["minimum","maximum","multipleOf"]},not:{type:!1,definitions:["not"]},number:{type:!0,definitions:["allOf/*","anyOf/*","oneOf/*","not"],validationKeywords:["minimum","maximum","multipleOf"]},null:{type:!0},object:{type:!0,definitions:["allOf/*","anyOf/*","oneOf/*","not","properties/*","additionalProperties","patternProperties/*","dependencies/*"],validationKeywords:["minProperties","maxProperties","required"],keywords:["properties","additionalProperties","patternProperties","dependencies","minProperties","maxProperties","required"]},oneOf:{type:!1,definitions:["oneOf/*"]},string:{type:!0,definitions:["allOf/*","anyOf/*","oneOf/*","not"],validationKeywords:["minLength","maxLength","pattern"]}},pe=Object.keys(ce).filter((e=>!1===ce[e].type)),me=Object.prototype.hasOwnProperty;function de(e){if(!1==(r=e,"[object Object]"===Object.prototype.toString.call(r)))return;var r;if(e.enum)return"enum";if(ce[e.type]||Array.isArray(e.type))return e.type;const t=pe.filter((r=>e[r]));if(1===t.length)return t[0];if(0!==t.length)throw new Error(`Mutiple typeIds [${t.join(", ")}] matched in ${JSON.stringify(e)}`);for(let r=0,t=ce.object.keywords.length;r<t;r+=1){const t=ce.object.keywords[r];if(me.call(e,t))return"object"}for(let r=0,t=ce.array.keywords.length;r<t;r+=1){const t=ce.array.keywords[r];if(me.call(e,t))return"array"}}function he(e){const r=[],t=de(e);if(null==t)return r;let n;if(Array.isArray(t)){n={};for(let e=0,r=t.length;e<r;e+=1)Object.assign(n,ce[t[e]])}else n=ce[t];return null==n.definitions||n.definitions.forEach((t=>{W(e,t,((e,t,n,o)=>{(e=>"[object Object]"===Object.prototype.toString.call(e))(e)&&de(e)&&r.push({pointer:v().join(v().split(o),!1),def:e})}))})),r}function ye(e,r){if(!0===this.callback(e,r))return;he(e).forEach((e=>this.nextTypeDefs(e.def,v().join(r,e.pointer,!1))))}function ge(e,r,t,n="definitions"){const o=r[n];Object.keys(o).forEach((r=>{if(!1!==o[r]&&(i=o[r],"[object Object]"!==Object.prototype.toString.call(i)))var i;else e.nextTypeDefs(o[r],v().join(t,n,r,!1))}))}function Ee(e,r,t="#"){const n={callback:r,nextTypeDefs:ye};n.nextTypeDefs(e,t),null!=e.definitions&&(n.callback=(e,t)=>{r(e,t),null!=e.definitions&&ge(n,e,t)},ge(n,e,t)),null!=e.$defs&&(n.callback=(e,t)=>{r(e,t),null!=e.definitions&&ge(n,e,t)},ge(n,e,t,"$defs"))}const Oe=/(#|\/)+$/,ve=/#$/,be=/^[^:]+:\/\/[^/]+\//,xe=/\/[^/]*$/,_e=/#.*$/;function Pe(e,r){return null==e&&null==r?"#":null==r?e.replace(ve,""):null==e?r.replace(ve,""):"#"===r[0]?`${e.replace(_e,"")}${r.replace(Oe,"")}`:be.test(r)?r.replace(ve,""):`${e.replace(xe,"")}/${r.replace(ve,"")}`}const Se=/(#|\/)+$/g,Ae=["",null,"#"];const Re=/(#|\/)+$/g;function $e(e,r,t){if("object"===a(t)&&(t=t.__ref||t.$ref),null==t)return r;let n;const o=t.replace(Re,"");if(e.remotes[o])return n=e.remotes[o],n&&n.$ref?$e(e,r,n.$ref):n;if(e.ids[t])return n=(0,O.get)(r,e.ids[t]),n&&n.$ref?$e(e,r,n.$ref):n;const i=function(e){if(Ae.includes(e))return[];if(-1===(e=e.replace(Se,"")).indexOf("#"))return[e.replace(Se,"")];if(0===e.indexOf("#"))return[e.replace(Se,"")];const r=e.split("#");return r[0]=r[0].replace(Se,""),r[1]=`#${r[1].replace(Se,"")}`,r}(t);if(0===i.length)return r;if(1===i.length){if(t=i[0],e.remotes[t])return n=e.remotes[t],$e(e,r,n.$ref);if(e.ids[t])return n=(0,O.get)(r,e.ids[t]),n&&n.$ref?$e(e,r,n.$ref):n}if(2===i.length){const n=i[0];if(t=i[1],e.remotes[n])return e.remotes[n].getRef?e.remotes[n].getRef(t):$e(e,e.remotes[n],t);if(e.ids[n])return $e(e,(0,O.get)(r,e.ids[n]),t)}return n=(0,O.get)(r,e.ids[t]||t),n&&n.$ref?$e(e,r,n.$ref):n}const je="__compiled",we="__ref",Ie=/(#|\/)+$/g;function ke(e,r,t=r,n=!1){if(!0===r||!1===r||void 0===r)return r;if(void 0!==r[je])return r;const o={ids:{},remotes:e.remotes},i=JSON.stringify(r),a=JSON.parse(i);if(Object.defineProperty(a,je,{enumerable:!1,value:!0}),Object.defineProperty(a,"getRef",{enumerable:!1,value:$e.bind(null,o,a)}),!1===n&&!1===i.includes("$ref"))return a;a!==t&&Object.defineProperty(a,"$defs",{enumerable:!0,value:Object.assign({},t.definitions,t.$defs,a.definitions,a.$defs)});const s={},l=()=>a;return Ee(a,((e,r)=>{var t;if(e.$id){if(e.$id.startsWith("http")&&/(allOf|anyOf|oneOf)\/\d+$/.test(r)){const n=r.replace(/\/(allOf|anyOf|oneOf)\/\d+$/,""),o=(0,O.get)(a,n);e.$id=null!==(t=o.$id)&&void 0!==t?t:e.$id}o.ids[e.$id.replace(Ie,"")]=r}const n=(r=`#${r}`.replace(/##+/,"#")).replace(/\/[^/]+$/,""),i=r.replace(/\/[^/]+\/[^/]+$/,""),u=Pe(s[n]||s[i],e.$id);s[r]=u,null==o.ids[u]&&(o.ids[u]=r),e.$ref&&!e.__ref&&(Object.defineProperty(e,we,{enumerable:!1,value:Pe(u,e.$ref)}),Object.defineProperty(e,"getRoot",{enumerable:!1,value:l}))})),a}function Ne(e,r,t,n=e.rootSchema,o="#"){n=e.resolveRef(n),t(n,r,o);const i=a(r);"object"===i?Object.keys(r).forEach((i=>{const a=e.step(i,n,r,o),s=r[i];e.each(s,t,a,`${o}/${i}`)})):"array"===i&&r.forEach(((i,a)=>{const s=e.step(a,n,r,o);e.each(i,t,s,`${o}/${a}`)}))}const Le={additionalItemsError:o("AdditionalItemsError"),additionalPropertiesError:o("AdditionalPropertiesError"),anyOfError:o("AnyOfError"),allOfError:o("AllOfError"),constError:o("ConstError"),containsError:o("ContainsError"),containsArrayError:o("ContainsArrayError"),containsAnyError:o("ContainsAnyError"),enumError:o("EnumError"),formatURLError:o("FormatURLError"),formatURIError:o("FormatURIError"),formatURIReferenceError:o("FormatURIReferenceError"),formatURITemplateError:o("FormatURITemplateError"),formatDateError:o("FormatDateaError"),formatDateTimeError:o("FormatDateTimeError"),formatEmailError:o("FormatEmailError"),formatHostnameError:o("FormatHostnameError"),formatIPV4Error:o("FormatIPV4Error"),formatIPV4LeadingZeroError:o("FormatIPV4LeadingZeroError"),formatIPV6Error:o("FormatIPV6Error"),formatIPV6LeadingZeroError:o("FormatIPV6LeadingZeroError"),formatJSONPointerError:o("FormatJSONPointerError"),formatRegExError:o("FormatRegExError"),formatTimeError:o("FormatTimeError"),invalidSchemaError:o("InvalidSchemaError"),invalidDataError:o("InvalidDataError"),invalidTypeError:o("InvalidTypeError"),invalidPropertyNameError:o("InvalidPropertyNameError"),maximumError:o("MaximumError"),maxItemsError:o("MaxItemsError"),maxLengthError:o("MaxLengthError"),maxPropertiesError:o("MaxPropertiesError"),minimumError:o("MinimumError"),minItemsError:o("MinItemsError"),minItemsOneError:o("MinItemsOneError"),minLengthError:o("MinLengthError"),minLengthOneError:o("MinLengthOneError"),minPropertiesError:o("MinPropertiesError"),missingDependencyError:o("MissingDependencyError"),missingOneOfPropertyError:o("MissingOneOfPropertyError"),multipleOfError:o("MultipleOfError"),multipleOneOfError:o("MultipleOneOfError"),noAdditionalPropertiesError:o("NoAdditionalPropertiesError"),notError:o("NotError"),oneOfError:o("OneOfError"),oneOfPropertyError:o("OneOfPropertyError"),patternError:o("PatternError"),patternPropertiesError:o("PatternPropertiesError"),requiredPropertyError:o("RequiredPropertyError"),typeError:o("TypeError"),undefinedValueError:o("UndefinedValueError"),uniqueItemsError:o("UniqueItemsError"),unknownPropertyError:o("UnknownPropertyError"),valueNotEmptyError:o("ValueNotEmptyError")};var Te=__webpack_require__(481),Ce=__webpack_require__.n(Te);const Ue=new RegExp("^([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\\.[0-9]+)?(([Zz])|([\\+|\\-]([01][0-9]|2[0-3]):[0-5][0-9]))$"),Me=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,qe=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,Ve=/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,De=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Fe=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,Ke=[0,31,28,31,30,31,30,31,31,30,31,30,31],ze=/^(?:\/(?:[^~/]|~0|~1)*)*$/,Je=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,Ze=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,We=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,He={date:(e,r,t,n)=>{if("string"!=typeof t)return;const o=t.match(De);if(!o)return Le.formatDateTimeError({value:t,pointer:n});const i=+o[1],a=+o[2],s=+o[3];return a>=1&&a<=12&&s>=1&&s<=(2==a&&(i%4==0&&(i%100!=0||i%400==0))?29:Ke[a])?void 0:Le.formatDateError({value:t,pointer:n})},"date-time":(e,r,t,n)=>{if("string"==typeof t)return""===t||Ue.test(t)?"Invalid Date"===new Date(t).toString()?Le.formatDateTimeError({value:t,pointer:n}):void 0:Le.formatDateTimeError({value:t,pointer:n})},email:(e,r,t,n)=>{if("string"!=typeof t)return;if('"'===t[0])return Le.formatEmailError({value:t,pointer:n});const[o,i,...a]=t.split("@");return!o||!i||0!==a.length||o.length>64||i.length>253||"."===o[0]||o.endsWith(".")||o.includes("..")?Le.formatEmailError({value:t,pointer:n}):/^[a-z0-9.-]+$/i.test(i)&&/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(o)&&i.split(".").every((e=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e)))?void 0:Le.formatEmailError({value:t,pointer:n})},hostname:(e,r,t,n)=>{if("string"==typeof t&&""!==t&&!Ve.test(t))return Le.formatHostnameError({value:t,pointer:n})},ipv4:(e,r,t,n)=>{if("string"==typeof t&&""!==t){if(t&&"0"===t[0])return Le.formatIPV4LeadingZeroError({value:t,pointer:n});if(!(t.length<=15&&Me.test(t)))return Le.formatIPV4Error({value:t,pointer:n})}},ipv6:(e,r,t,n)=>{if("string"==typeof t&&""!==t){if(t&&"0"===t[0])return Le.formatIPV6LeadingZeroError({value:t,pointer:n});if(!(t.length<=45&&qe.test(t)))return Le.formatIPV6Error({value:t,pointer:n})}},"json-pointer":(e,r,t,n)=>{if("string"==typeof t&&""!==t&&!ze.test(t))return Le.formatJSONPointerError({value:t,pointer:n})},"relative-json-pointer":(e,r,t,n)=>{if("string"==typeof t&&""!==t&&!Je.test(t))return Le.formatJSONPointerError({value:t,pointer:n})},regex:(e,r,t,n)=>{if("string"==typeof t&&!1===/\\Z$/.test(t)){try{return void new RegExp(t)}catch(e){}return Le.formatRegExError({value:t,pointer:n})}if("object"!=typeof t&&"number"!=typeof t&&!Array.isArray(t))return Le.formatRegExError({value:t,pointer:n})},time:(e,r,t,n)=>{if("string"!=typeof t)return;const o=t.match(Fe);if(!o)return Le.formatDateTimeError({value:t,pointer:n});const i=+o[1],a=+o[2],s=+o[3],l=!!o[5];return(i<=23&&a<=59&&s<=59||23==i&&59==a&&60==s)&&l?void 0:Le.formatTimeError({value:t,pointer:n})},uri:(e,r,t,n)=>{if("string"==typeof t&&""!==t&&!Ce().isUri(t))return Le.formatURIError({value:t,pointer:n})},"uri-reference":(e,r,t,n)=>{if("string"==typeof t&&""!==t&&!Ze.test(t))return Le.formatURIReferenceError({value:t,pointer:n})},"uri-template":(e,r,t,n)=>{if("string"==typeof t&&""!==t&&!We.test(t))return Le.formatURITemplateError({value:t,pointer:n})},url:(e,r,t,n)=>{if(""!==t&&!Ce().isWebUri(t))return Le.formatUrlError({value:t,pointer:n})}},Be=e=>JSON.parse(JSON.stringify(e)),Ge={addOptionalProps:!0};let Ye;function Qe(e,r){if(null==r)throw new Error("Missing pointer");const{$ref:t}=e;if(null==t)return!0;return(null==Ye[r]||null==Ye[r][t]?0:Ye[r][t])<c.GET_TEMPLATE_RECURSION_LIMIT}function Xe(e,r,t){if(null==t)throw new Error(`missing pointer ${t}`);const{$ref:n}=r;return null==n?r:(Ye[t]=Ye[t]||{},Ye[t][n]=Ye[t][n]||0,Ye[t][n]+=1,e.resolveRef(r))}function er(e,r,t,n){if("object"!==a(r))return Object.assign({pointer:n},r);if(!1===Qe(r,n)&&null==t)return!1;let o=Be(Xe(e,r,n));if(Array.isArray(r.anyOf)&&r.anyOf.length>0){if(Qe(r.anyOf[0],`${n}/anyOf/0`)){const t=Xe(e,r.anyOf[0],`${n}/anyOf/0`);o=R(o,t),o.pointer=r.anyOf[0].$ref||o.pointer}delete o.anyOf}if(Array.isArray(r.allOf)){for(let t=0,i=r.allOf.length;t<i;t+=1)Qe(r.allOf[t],`${n}/allOf/${t}`)&&(o=R(o,Xe(e,r.allOf[t],`${n}/allOf/${t}`)),o.pointer=r.allOf[t].$ref||o.pointer);delete o.allOf}return o.pointer=o.pointer||r.$ref||n,o}const rr=e=>e&&"object"==typeof e;function tr(e,r,t,n,o){if(null==t)throw new Error(`getTemplate: missing schema for data: ${JSON.stringify(r)}`);if(null==n)throw new Error("Missing pointer");let i=er(e,t,r,n);if(!rr(i))return;if(n=i.pointer,null==i?void 0:i.const)return i.const;if(i.oneOf){const t=y(e,r,i);if(null==r&&s(t))i=i.oneOf[0];else{if(s(t.type))return r;i=t}}if(!rr(i)||null==i.type)return;const l=Array.isArray(i.type)?function(e,r,t){if(null==r){if(null!=t){const r=a(t);if(e.includes(r))return r}return e[0]}const n=a(r);if(e.includes(n))return n;return e[0]}(i.type,r,i.default):i.type;if(null!=r&&a(r)!==l&&(r=function(e,r){if("string"===e)return JSON.stringify(r);if("string"!=typeof r)return null;try{if(typeof(r=JSON.parse(r))===e)return r}catch(e){}return null}(l,r)),null==nr[l])throw new Error(`Unsupported type '${l} in ${JSON.stringify(i)}'`);return nr[l](e,i,r,n,o)}const nr={null:(e,r,t)=>or(r,t,null),string:(e,r,t)=>or(r,t,""),number:(e,r,t)=>or(r,t,0),integer:(e,r,t)=>or(r,t,0),boolean:(e,r,t)=>or(r,t,!1),object:(e,r,t,n,o)=>{const i=void 0===r.default?{}:r.default,l={};if(r.properties&&Object.keys(r.properties).forEach((a=>{const s=null==t||null==t[a]?i[a]:t[a],u=Array.isArray(r.required)&&r.required.includes(a);(null!=s||u||o.addOptionalProps)&&(l[a]=tr(e,s,r.properties[a],`${n}/properties/${a}`,o))})),r.dependencies&&Object.keys(r.dependencies).forEach((i=>{const u=r.dependencies[i];if("object"!==a(u))return;if(void 0===l[i])return;const f=tr(e,t,Object.assign(Object.assign({},u),{type:"object"}),`${n}/dependencies/${i}`,o);f&&!s(f)&&Object.assign(l,f)})),t&&Object.keys(t).forEach((e=>null==l[e]&&(l[e]=t[e]))),r.if&&(r.then||r.else)){const t=e.isValid(l,r.if);if(t&&r.then){const t=e.getTemplate(l,Object.assign({type:"object"},r.then),o);Object.assign(l,t)}else if(!t&&r.else){const t=e.getTemplate(l,Object.assign({type:"object"},r.else),o);Object.assign(l,t)}}return l},array:(e,r,t,n,o)=>{var i,s,l;const u=void 0===r.default?[]:r.default;r.minItems=r.minItems||0;const f=t||[];if(null==r.items)return f;if(Array.isArray(r.items)){for(let t=0,a=Math.max(null!==(i=r.minItems)&&void 0!==i?i:0,null!==(l=null===(s=r.items)||void 0===s?void 0:s.length)&&void 0!==l?l:0);t<a;t+=1)f[t]=tr(e,null==f[t]?u[t]:f[t],r.items[t],`${n}/items/${t}`,o);return f}if("object"!==a(r.items))return f;const c=er(e,r.items,t,n);if(!1===c)return f;if(n=c.pointer||n,c.oneOf&&0===f.length){const t=c.oneOf[0];for(let i=0;i<r.minItems;i+=1)f[i]=tr(e,null==f[i]?u[i]:f[i],t,`${n}/oneOf/0`,o);return f}if(c.oneOf&&f.length>0){const t=Math.max(r.minItems,f.length);for(let r=0;r<t;r+=1){const t=null==f[r]?u[r]:f[r],i=y(e,t,c);f[r]=i?tr(e,t,i,`${n}/oneOf/${r}`,o):t}return f}if(c.type){for(let t=0,i=Math.max(r.minItems,f.length);t<i;t+=1)f[t]=tr(e,null==f[t]?u[t]:f[t],c,`${n}/items`,o);return f}return f}};function or(e,r,t){return null!=r?r:e.const?e.const:void 0===e.default&&Array.isArray(e.enum)?e.enum[0]:void 0===e.default?t:e.default}const ir=(e,r,t=e.rootSchema,n=Ge)=>(Ye={mi:{}},tr(e,r,t,"#",n));function ar(e,r,t=e.rootSchema,n="#"){return 0===e.validate(r,t,n).length}function sr(e,r){const t=typeof e;if(t!==typeof r)return!1;if(Array.isArray(e)){if(!Array.isArray(r))return!1;const t=e.length;if(t!==r.length)return!1;for(let n=0;n<t;n++)if(!sr(e[n],r[n]))return!1;return!0}if("object"===t){if(!e||!r)return e===r;const t=Object.keys(e),n=Object.keys(r);if(t.length!==n.length)return!1;for(const n of t)if(!sr(e[n],r[n]))return!1;return!0}return e===r}function lr(e){const r=[];let t=0;const n=e.length;for(;t<n;){const o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<n){const n=e.charCodeAt(t++);56320==(64512&n)?r.push(((1023&o)<<10)+(1023&n)+65536):(r.push(o),t--)}else r.push(o)}return r}const ur=c.floatingPointPrecision,fr=Object.prototype.hasOwnProperty,cr=(e,r)=>!(void 0===e[r]||!fr.call(e,r)),pr={additionalProperties:(e,r,t,n)=>{if(!0===r.additionalProperties||null==r.additionalProperties)return;if("object"===a(r.patternProperties)&&!1===r.additionalProperties)return;const o=[];let i=Object.keys(t).filter((e=>!1===c.propertyBlacklist.includes(e)));const l=Object.keys(r.properties||{});if("object"===a(r.patternProperties)){const e=Object.keys(r.patternProperties).map((e=>new RegExp(e)));i=i.filter((r=>{for(let t=0;t<e.length;t+=1)if(e[t].test(r))return!1;return!0}))}for(let a=0,u=i.length;a<u;a+=1){const u=i[a];if(-1===l.indexOf(u)){const f="object"==typeof r.additionalProperties;if(f&&Array.isArray(r.additionalProperties.oneOf)){const f=e.resolveOneOf(t[u],r.additionalProperties,`${n}/${u}`);s(f)?o.push(e.errors.additionalPropertiesError({schema:r.additionalProperties,property:i[a],properties:l,pointer:n,errors:f.data.errors})):o.push(...e.validate(t[u],f,n))}else f?0!==e.validate(t[u],r.additionalProperties,n).length&&o.push(e.errors.additionalPropertiesError({schema:r.additionalProperties,property:i[a],properties:l,pointer:n})):o.push(e.errors.noAdditionalPropertiesError({property:i[a],properties:l,pointer:n}))}}return o},allOf:(e,r,t,n)=>{if(!1===Array.isArray(r.allOf))return;const o=[];return r.allOf.forEach((r=>{o.push(...e.validate(t,r,n))})),o},anyOf:(e,r,t,n)=>{if(!1!==Array.isArray(r.anyOf)){for(let n=0;n<r.anyOf.length;n+=1)if(e.isValid(t,r.anyOf[n]))return;return e.errors.anyOfError({anyOf:r.anyOf,value:t,pointer:n})}},dependencies:(e,r,t,n)=>{if("object"!==a(r.dependencies))return;const o=[];return Object.keys(t).forEach((i=>{if(void 0===r.dependencies[i])return;if(!0===r.dependencies[i])return;if(!1===r.dependencies[i])return void o.push(e.errors.missingDependencyError({pointer:n}));let s;const l=a(r.dependencies[i]);if("array"===l)s=r.dependencies[i].filter((e=>void 0===t[e])).map((r=>e.errors.missingDependencyError({missingProperty:r,pointer:n})));else{if("object"!==l)throw new Error(`Invalid dependency definition for ${n}/${i}. Must be list or schema`);s=e.validate(t,r.dependencies[i],n)}o.push(...s)})),o.length>0?o:void 0},enum:(e,r,t,n)=>{const o=a(t);if("object"===o||"array"===o){const e=JSON.stringify(t);for(let t=0;t<r.enum.length;t+=1)if(JSON.stringify(r.enum[t])===e)return}else if(r.enum.includes(t))return;return e.errors.enumError({values:r.enum,value:t,pointer:n})},format:(e,r,t,n)=>{if(e.validateFormat[r.format]){return e.validateFormat[r.format](e,r,t,n)}},items:(e,r,t,n)=>{if(!1===r.items){if(Array.isArray(t)&&0===t.length)return;return e.errors.invalidDataError({pointer:n,value:t})}const o=[];for(let i=0;i<t.length;i+=1){const a=t[i],l=e.step(i,r,t,n);if(s(l))return[l];const u=e.validate(a,l,`${n}/${i}`);o.push(...u)}return o},maximum:(e,r,t,n)=>{if(!isNaN(r.maximum))return r.maximum&&r.maximum<t||r.maximum&&!0===r.exclusiveMaximum&&r.maximum===t?e.errors.maximumError({maximum:r.maximum,length:t,pointer:n}):void 0},maxItems:(e,r,t,n)=>{if(!isNaN(r.maxItems))return r.maxItems<t.length?e.errors.maxItemsError({maximum:r.maxItems,length:t.length,pointer:n}):void 0},maxLength:(e,r,t,n)=>{if(isNaN(r.maxLength))return;const o=lr(t).length;return r.maxLength<o?e.errors.maxLengthError({maxLength:r.maxLength,length:o,pointer:n}):void 0},maxProperties:(e,r,t,n)=>{const o=Object.keys(t).length;if(!1===isNaN(r.maxProperties)&&r.maxProperties<o)return e.errors.maxPropertiesError({maxProperties:r.maxProperties,length:o,pointer:n})},minLength:(e,r,t,n)=>{if(isNaN(r.minLength))return;const o=lr(t).length;return r.minLength>o?1===r.minLength?e.errors.minLengthOneError({minLength:r.minLength,length:o,pointer:n}):e.errors.minLengthError({minLength:r.minLength,length:o,pointer:n}):void 0},minimum:(e,r,t,n)=>{if(!isNaN(r.minimum))return r.minimum>t||!0===r.exclusiveMinimum&&r.minimum===t?e.errors.minimumError({minimum:r.minimum,length:t,pointer:n}):void 0},minItems:(e,r,t,n)=>{if(!isNaN(r.minItems))return r.minItems>t.length?1===r.minItems?e.errors.minItemsOneError({minItems:r.minItems,length:t.length,pointer:n}):e.errors.minItemsError({minItems:r.minItems,length:t.length,pointer:n}):void 0},minProperties:(e,r,t,n)=>{if(isNaN(r.minProperties))return;const o=Object.keys(t).length;return r.minProperties>o?e.errors.minPropertiesError({minProperties:r.minProperties,length:o,pointer:n}):void 0},multipleOf:(e,r,t,n)=>{if(!isNaN(r.multipleOf))return t*ur%(r.multipleOf*ur)/ur!=0?e.errors.multipleOfError({multipleOf:r.multipleOf,value:t,pointer:n}):void 0},not:(e,r,t,n)=>{const o=[];return 0===e.validate(t,r.not,n).length&&o.push(e.errors.notError({value:t,not:r.not,pointer:n})),o},oneOf:(e,r,t,n)=>{if(!1!==Array.isArray(r.oneOf))return s(r=e.resolveOneOf(t,r,n))?r:void 0},pattern:(e,r,t,n)=>{if(!1===new RegExp(r.pattern,"u").test(t))return e.errors.patternError({pattern:r.pattern,description:r.patternExample||r.pattern,received:t,pointer:n})},patternProperties:(e,r,t,n)=>{const o=r.properties||{},i=r.patternProperties;if("object"!==a(i))return;const s=[],l=Object.keys(t),u=Object.keys(i).map((e=>({regex:new RegExp(e),patternSchema:i[e]})));return l.forEach((a=>{let l=!1;for(let r=0,o=u.length;r<o;r+=1)if(u[r].regex.test(a)){l=!0;const o=e.validate(t[a],u[r].patternSchema,`${n}/${a}`);o&&o.length>0&&s.push(...o)}o[a]||!1===l&&!1===r.additionalProperties&&s.push(e.errors.patternPropertiesError({key:a,pointer:n,patterns:Object.keys(i).join(",")}))})),s},properties:(e,r,t,n)=>{const o=[],i=Object.keys(r.properties||{});for(let a=0;a<i.length;a+=1){const s=i[a];if(cr(t,s)){const i=e.step(s,r,t,n),a=e.validate(t[s],i,`${n}/${s}`);o.push(...a)}}return o},propertiesRequired:(e,r,t,n)=>{const o=[],i=Object.keys(r.properties||{});for(let a=0;a<i.length;a+=1){const s=i[a];if(void 0===t[s])o.push(e.errors.requiredPropertyError({key:s,pointer:n}));else{const i=e.step(s,r,t,n),a=e.validate(t[s],i,`${n}/${s}`);o.push(...a)}}return o},required:(e,r,t,n)=>{if(!1!==Array.isArray(r.required))return r.required.map((r=>{if(!cr(t,r))return e.errors.requiredPropertyError({key:r,pointer:n})}))},requiredNotEmpty:(e,r,t,n)=>{if(!1!==Array.isArray(r.required))return r.required.map((r=>{if(null==t[r]||""===t[r])return e.errors.valueNotEmptyError({property:r,pointer:`${n}/${r}`})}))},uniqueItems:(e,r,t,n)=>{if(!1===(Array.isArray(t)&&r.uniqueItems))return;const o=[];return t.forEach(((r,i)=>{for(let a=i+1;a<t.length;a+=1)sr(r,t[a])&&o.push(e.errors.uniqueItemsError({pointer:n,itemPointer:`${n}/${i}`,duplicatePointer:`${n}/${a}`,value:JSON.stringify(r)}))})),o}},mr=pr,dr=Object.assign(Object.assign({},mr),{contains:(e,r,t,n)=>{if(!1===r.contains)return e.errors.containsArrayError({pointer:n,value:t});if(!0===r.contains)return Array.isArray(t)&&0===t.length?e.errors.containsAnyError({pointer:n}):void 0;if("object"===a(r.contains)){for(let n=0;n<t.length;n+=1)if(e.isValid(t[n],r.contains))return;return e.errors.containsError({pointer:n,schema:JSON.stringify(r.contains)})}},exclusiveMaximum:(e,r,t,n)=>{if(!isNaN(r.exclusiveMaximum))return r.exclusiveMaximum<=t?e.errors.maximumError({maximum:r.exclusiveMaximum,length:t,pointer:n}):void 0},exclusiveMinimum:(e,r,t,n)=>{if(!isNaN(r.exclusiveMinimum))return r.exclusiveMinimum>=t?e.errors.minimumError({minimum:r.exclusiveMinimum,length:t,pointer:n}):void 0},if:(e,r,t,n)=>{if(null==r.if)return;const o=e.validate(t,r.if,n);return 0===o.length&&r.then?e.validate(t,r.then,n):0!==o.length&&r.else?e.validate(t,r.else,n):void 0},maximum:(e,r,t,n)=>{if(!isNaN(r.maximum))return r.maximum&&r.maximum<t?e.errors.maximumError({maximum:r.maximum,length:t,pointer:n}):void 0},minimum:(e,r,t,n)=>{if(!isNaN(r.minimum))return r.minimum>t?e.errors.minimumError({minimum:r.minimum,length:t,pointer:n}):void 0},patternProperties:(e,r,t,n)=>{const o=r.properties||{},i=r.patternProperties;if("object"!==a(i))return;const s=[],l=Object.keys(t),u=Object.keys(i).map((e=>({regex:new RegExp(e),patternSchema:i[e]})));return l.forEach((a=>{let l=!1;for(let r=0,o=u.length;r<o;r+=1)if(u[r].regex.test(a)){if(l=!0,!1===u[r].patternSchema)return void s.push(e.errors.patternPropertiesError({key:a,pointer:n,patterns:Object.keys(i).join(",")}));const o=e.validate(t[a],u[r].patternSchema,`${n}/${a}`);o&&o.length>0&&s.push(...o)}o[a]||!1===l&&!1===r.additionalProperties&&s.push(e.errors.patternPropertiesError({key:a,pointer:n,patterns:Object.keys(i).join(",")}))})),s},propertyNames:(e,r,t,n)=>{if(!1===r.propertyNames){if(0===Object.keys(t).length)return;return e.errors.invalidPropertyNameError({property:Object.keys(t),pointer:n,value:t})}if(!0===r.propertyNames)return;if("object"!==a(r.propertyNames))return;const o=[],i=Object.keys(t),s=Object.assign(Object.assign({},r.propertyNames),{type:"string"});return i.forEach((r=>{const i=e.validate(r,s,`${n}/${r}`);i.length>0&&o.push(e.errors.invalidPropertyNameError({property:r,pointer:n,validationError:i[0],value:t[r]}))})),o}}),hr=dr;function yr(e,r,t=e.rootSchema,n="#"){let o=Be(t);for(let r=0;r<t.allOf.length;r+=1){const n=e.resolveRef(t.allOf[r]);o=R(o,n)}return delete o.allOf,o}function gr(e,r,t=e.rootSchema,n="#"){let o=!1,i=Be(t);for(let a=0;a<t.anyOf.length;a+=1){const s=e.resolveRef(t.anyOf[a]);e.isValid(r,t.anyOf[a],n)&&(o=!0,i=R(i,s))}return!1===o?Le.anyOfError({value:r,pointer:n,anyOf:JSON.stringify(t.anyOf)}):(delete i.anyOf,i)}function Er(e){const r={type:a(e)};return"object"===r.type&&(r.properties={},Object.keys(e).forEach((t=>r.properties[t]=Er(e[t])))),"array"===r.type&&1===e.length?r.items=Er(e[0]):"array"===r.type&&(r.items=e.map(Er)),r}function Or(e,r,t=e.rootSchema){const n=e.step(r,t,{},"#");return s(n)?"one-of-error"===n.code?n.data.oneOf.map((r=>e.resolveRef(r))):n:[n]}const vr={array:(e,r,t,n,o)=>{const i=a(t.items);if("object"===i)return Array.isArray(t.items.oneOf)?e.resolveOneOf(n[r],t.items,o):Array.isArray(t.items.anyOf)?e.resolveAnyOf(n[r],t.items,o):Array.isArray(t.items.allOf)?e.resolveAllOf(n[r],t.items,o):e.resolveRef(t.items);if("array"===i){if(!0===t.items[r])return Er(n[r]);if(!1===t.items[r])return Le.invalidDataError({key:r,value:n[r],pointer:o});if(t.items[r])return e.resolveRef(t.items[r]);if(!1===t.additionalItems)return Le.additionalItemsError({key:r,value:n[r],pointer:o});if(!0===t.additionalItems||void 0===t.additionalItems)return Er(n[r]);if("object"===a(t.additionalItems))return t.additionalItems;throw new Error(`Invalid schema ${JSON.stringify(t,null,4)} for ${JSON.stringify(n,null,4)}`)}return!1!==t.additionalItems&&n[r]?Er(n[r]):new Error(`Invalid array schema for ${r} at ${o}`)},object:(e,r,t,n,o)=>{if(Array.isArray(t.oneOf)){const r=e.resolveOneOf(n,t,o);if(s(t=R(t,r)))return t}if(Array.isArray(t.anyOf)&&s(t=e.resolveAnyOf(n,t,o)))return t;if(Array.isArray(t.allOf)&&s(t=e.resolveAllOf(n,t,o)))return t;let i;if(t.properties&&void 0!==t.properties[r]){if(i=e.resolveRef(t.properties[r]),s(i))return i;if(i&&Array.isArray(i.oneOf)){let t=e.resolveOneOf(n[r],i,`${o}/${r}`);const a=i.oneOf.findIndex((e=>e===t));return t=JSON.parse(JSON.stringify(t)),t.variableSchema=!0,t.oneOfIndex=a,t.oneOfSchema=i,t}if(i)return i}const{dependencies:l}=t;if("object"===a(l)){const t=Object.keys(l).filter((e=>"object"===a(l[e])));for(let o=0,i=t.length;o<i;o+=1){const i=t[o],a=br(e,r,l[i],n);if(!s(a))return a}}if(t.if&&(t.then||t.else)){const i=e.isValid(n,t.if);if(i&&t.then){const i=br(e,r,t.then,n,o);if("string"==typeof i.type&&"error"!==i.type)return i}if(!i&&t.else){const i=br(e,r,t.else,n,o);if("string"==typeof i.type&&"error"!==i.type)return i}}if("object"===a(t.patternProperties)){let e;const n=Object.keys(t.patternProperties);for(let o=0,i=n.length;o<i;o+=1)if(e=new RegExp(n[o]),e.test(r))return t.patternProperties[n[o]]}return"object"===a(t.additionalProperties)?t.additionalProperties:!0===t.additionalProperties?Er(n[r]):Le.unknownPropertyError({property:r,value:n,pointer:`${o}`})}};function br(e,r,t,n,o="#"){if(Array.isArray(t.type)){const i=a(n);return t.type.includes(i)?vr[i](e,`${r}`,t,n,o):e.errors.typeError({value:n,pointer:o,expected:t.type,received:i})}const i=t.type||a(n),s=vr[i];return s?s(e,`${r}`,t,n,o):new Error(`Unsupported schema type ${t.type} for key ${r}`)}const xr={array:(e,r,t,n)=>e.typeKeywords.array.filter((e=>r&&null!=r[e])).map((o=>e.validateKeyword[o](e,r,t,n))),object:(e,r,t,n)=>e.typeKeywords.object.filter((e=>r&&null!=r[e])).map((o=>e.validateKeyword[o](e,r,t,n))),string:(e,r,t,n)=>e.typeKeywords.string.filter((e=>r&&null!=r[e])).map((o=>e.validateKeyword[o](e,r,t,n))),integer:(e,r,t,n)=>e.typeKeywords.number.filter((e=>r&&null!=r[e])).map((o=>e.validateKeyword[o](e,r,t,n))),number:(e,r,t,n)=>e.typeKeywords.number.filter((e=>r&&null!=r[e])).map((o=>e.validateKeyword[o](e,r,t,n))),boolean:(e,r,t,n)=>e.typeKeywords.boolean.filter((e=>r&&null!=r[e])).map((o=>e.validateKeyword[o](e,r,t,n))),null:(e,r,t,n)=>e.typeKeywords.null.filter((e=>r&&null!=r[e])).map((o=>e.validateKeyword[o](e,r,t,n)))};var _r=__webpack_require__(63),Pr=__webpack_require__.n(_r);function Sr(e,r,t=e.rootSchema,n="#"){if("boolean"===a(t=e.resolveRef(t)))return t?[]:[e.errors.invalidDataError({value:r,pointer:n})];if(s(t))return[t];if(void 0!==t.const)return Pr()(t.const,r)?[]:[e.errors.constError({value:r,expected:t.const,pointer:n})];const o=function(e,r){const t=a(e);return"number"===t&&("integer"===r||Array.isArray(r)&&r.includes("integer"))?Number.isInteger(e)?"integer":"number":t}(r,t.type),i=t.type||o;if(!(o===i||Array.isArray(i)&&i.includes(o)))return[e.errors.typeError({received:o,expected:i,value:r,pointer:n})];if(null==e.validateType[o])return[e.errors.invalidTypeError({receivedType:o,pointer:n})];return f(e.validateType[o](e,t,r,n)).filter(l)}const Ar={typeKeywords:{array:["enum","contains","items","minItems","maxItems","uniqueItems","not","if"],boolean:["enum","not"],object:["additionalProperties","dependencies","enum","format","minProperties","maxProperties","patternProperties","properties","propertyNames","required","not","oneOf","allOf","anyOf","if"],string:["enum","format","maxLength","minLength","pattern","not","oneOf","allOf","anyOf","if"],number:["enum","exclusiveMaximum","exclusiveMinimum","format","maximum","minimum","multipleOf","not","oneOf","allOf","anyOf","if"],null:["enum","format","not","oneOf","allOf","anyOf"]},validateKeyword:hr,validateType:xr,validateFormat:He,errors:Le,addRemoteSchema:j,compileSchema:ke,createSchemaOf:Er,each:Ne,eachSchema:Ee,getChildSchemaSelection:Or,getSchema:x,getTemplate:ir,isValid:ar,resolveAllOf:yr,resolveAnyOf:gr,resolveOneOf:m,resolveRef:g,step:br,validate:Sr};class Rr extends ${constructor(e,r={}){super(R(Ar,r),e)}}const $r=Object.assign(Object.assign({},Ar),{resolveOneOf:y,resolveRef:E});class jr extends ${constructor(e,r={}){super(R($r,r),e)}}class wr{constructor(e,r){this.core=new jr(e),this.schema=e,this.data=r,this.cache={}}updateData(e){this.data=e,this.cache={}}updateSchema(e){this.schema=e,this.core.setSchema(e),this.cache={}}get(e,r){if(r){const t=x(this.core,e,r,this.schema);return Be(t)}if("#"===e)return this.schema;if(this.cache[e])return this.cache[e];const t=v().join(e,"..");let n=this.cache[t];null==n&&(n=x(this.core,t,this.data,this.schema),!0!==n.variableSchema&&(this.cache[t]=Be(n)));const o=v().split(e).pop();let i=x(this.core,o,v().get(this.data,t),this.cache[t]);return i=Be(i),!0!==i.variableSchema&&(this.cache[e]=i),i}}function Ir(e,r,t){const{schema:n,pointer:o,onError:i}=Object.assign({schema:e.rootSchema,pointer:"#"},t);let a=e.validate(r,n,o);if(i){a=f(a);const e=function(e){return function r(t){return Array.isArray(t)?((t=f(t)).forEach(r),t):(s(t)&&e(t),t)}}(i);for(let r=0;r<a.length;r+=1)a[r]instanceof Promise?a[r].then(e):s(a[r])&&i(a[r])}return Promise.all(a).then(f).then((e=>e.filter(u))).catch((e=>{throw console.log("Failed resolving promises",e.message),console.log(e.stack),e}))}const kr="__compiled",Nr="__ref",Lr=/(#|\/)+$/g;const Tr={typeKeywords:{array:["enum","items","minItems","maxItems","uniqueItems","not"],boolean:["enum","not"],object:["additionalProperties","dependencies","enum","format","minProperties","maxProperties","patternProperties","properties","required","not","oneOf","allOf","anyOf"],string:["enum","format","maxLength","minLength","pattern","not","oneOf","allOf","anyOf"],number:["enum","format","maximum","minimum","multipleOf","not","oneOf","allOf","anyOf"],null:["enum","format","not","oneOf","allOf","anyOf"]},validateKeyword:mr,validateType:{array:(e,r,t,n)=>e.typeKeywords.array.filter((e=>r&&null!=r[e])).map((o=>e.validateKeyword[o](e,r,t,n))),object:(e,r,t,n)=>e.typeKeywords.object.filter((e=>r&&null!=r[e])).map((o=>e.validateKeyword[o](e,r,t,n))),string:(e,r,t,n)=>e.typeKeywords.string.filter((e=>r&&null!=r[e])).map((o=>e.validateKeyword[o](e,r,t,n))),integer:(e,r,t,n)=>e.typeKeywords.number.filter((e=>r&&null!=r[e])).map((o=>e.validateKeyword[o](e,r,t,n))),number:(e,r,t,n)=>e.typeKeywords.number.filter((e=>r&&null!=r[e])).map((o=>e.validateKeyword[o](e,r,t,n))),boolean:(e,r,t,n)=>e.typeKeywords.boolean.filter((e=>r&&null!=r[e])).map((o=>e.validateKeyword[o](e,r,t,n))),null:(e,r,t,n)=>e.typeKeywords.null.filter((e=>r&&null!=r[e])).map((o=>e.validateKeyword[o](e,r,t,n)))},validateFormat:He,errors:Le,addRemoteSchema:j,compileSchema:function(e,r,t=r,n=!1){if(!r||void 0!==r.__compiled)return r;const o={ids:{},remotes:e.remotes},i=JSON.stringify(r),a=JSON.parse(i);if(Object.defineProperty(a,kr,{enumerable:!1,value:!0}),Object.defineProperty(a,"getRef",{enumerable:!1,value:$e.bind(null,o,a)}),!1===n&&!1===i.includes("$ref"))return a;r!==t&&Object.defineProperty(a,"definitions",{enumerable:!1,value:Object.assign({},t.definitions,t.$defs,r.definitions,r.$defs)});const s={},l=()=>a;return Ee(a,((e,r)=>{var t;if(e.id){if(e.id.startsWith("http")&&/(allOf|anyOf|oneOf)\/\d+$/.test(r)){const n=r.replace(/\/(allOf|anyOf|oneOf)\/\d+$/,""),o=(0,O.get)(a,n);e.id=null!==(t=o.id)&&void 0!==t?t:e.id}o.ids[e.id.replace(Lr,"")]=r}const n=(r=`#${r}`.replace(/##+/,"#")).replace(/\/[^/]+$/,""),i=r.replace(/\/[^/]+\/[^/]+$/,""),u=Pe(s[n]||s[i],e.id);s[r]=u,null==o.ids[u]&&(o.ids[u]=r),e.$ref&&!e.__ref&&(Object.defineProperty(e,Nr,{enumerable:!1,value:Pe(u,e.$ref)}),Object.defineProperty(e,"getRoot",{enumerable:!1,value:l}))})),a},createSchemaOf:Er,each:Ne,eachSchema:Ee,getChildSchemaSelection:Or,getSchema:x,getTemplate:ir,isValid:ar,resolveAllOf:yr,resolveAnyOf:gr,resolveOneOf:m,resolveRef:g,step:br,validate:Sr};class Cr extends ${constructor(e,r={}){super(R(Tr,r),e)}}const Ur={typeKeywords:{array:["enum","contains","items","minItems","maxItems","uniqueItems","not","if"],boolean:["enum","not"],object:["additionalProperties","dependencies","enum","format","minProperties","maxProperties","patternProperties","properties","propertyNames","required","not","oneOf","allOf","anyOf","if"],string:["enum","format","maxLength","minLength","pattern","not","oneOf","allOf","anyOf","if"],number:["enum","exclusiveMaximum","exclusiveMinimum","format","maximum","minimum","multipleOf","not","oneOf","allOf","anyOf","if"],null:["enum","format","not","oneOf","allOf","anyOf"]},validateKeyword:hr,validateType:xr,validateFormat:He,errors:Le,addRemoteSchema:j,compileSchema:ke,createSchemaOf:Er,each:Ne,eachSchema:Ee,getChildSchemaSelection:Or,getSchema:x,getTemplate:ir,isValid:ar,resolveAllOf:yr,resolveAnyOf:gr,resolveOneOf:m,resolveRef:g,step:br,validate:Sr};class Mr extends ${constructor(e,r={}){super(R(Ur,r),e)}}const qr={strings:e}})(),__webpack_exports__})()));
|
|
@@ -2,7 +2,8 @@ import { Draft } from "../draft";
|
|
|
2
2
|
import { JSONSchema } from "../types";
|
|
3
3
|
/**
|
|
4
4
|
* compiles the input root schema for `$ref` resolution and returns it again
|
|
5
|
-
* @attention this modifies input schema but maintains
|
|
5
|
+
* @attention this modifies input schema but maintains data-structure and thus returns
|
|
6
|
+
* the same object with JSON.stringify
|
|
6
7
|
*
|
|
7
8
|
* for a compiled json-schema you can call getRef on any contained schema (location of type).
|
|
8
9
|
* this resolves a $ref target to a valid schema (for a valid $ref)
|
|
@@ -11,6 +12,6 @@ import { JSONSchema } from "../types";
|
|
|
11
12
|
* @param schemaToCompile - json-schema to compile
|
|
12
13
|
* @param [rootSchema] - compiled root json-schema to use for definitions resolution
|
|
13
14
|
* @param [force] = false - force compile json-schema
|
|
14
|
-
* @return compiled
|
|
15
|
+
* @return compiled input json-schema
|
|
15
16
|
*/
|
|
16
17
|
export default function compileSchema(draft: Draft, schemaToCompile: JSONSchema, rootSchema?: JSONSchema, force?: boolean): JSONSchema;
|
package/dist/lib/getSchema.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { JSONSchema, JSONPointer } from "./types";
|
|
2
|
-
import { Draft
|
|
2
|
+
import { Draft } from "./draft";
|
|
3
3
|
/**
|
|
4
4
|
* Returns the json-schema of a data-json-pointer.
|
|
5
5
|
*
|
|
6
6
|
* Notes
|
|
7
|
-
* - Uses
|
|
7
|
+
* - Uses draft.step to walk through data and schema
|
|
8
8
|
*
|
|
9
|
-
* @param
|
|
9
|
+
* @param draft
|
|
10
10
|
* @param pointer - json pointer in data to get the json schema for
|
|
11
11
|
* @param [data] - the data object, which includes the json pointers value. This is optional, as
|
|
12
12
|
* long as no oneOf, anyOf, etc statement is part of the pointers schema
|
|
13
|
-
* @param [schema] - the json schema to iterate. Defaults to
|
|
13
|
+
* @param [schema] - the json schema to iterate. Defaults to draft.rootSchema
|
|
14
14
|
* @return json schema object of the json-pointer or an error
|
|
15
15
|
*/
|
|
16
|
-
export default function getSchema(
|
|
16
|
+
export default function getSchema(draft: Draft, pointer: JSONPointer, data?: unknown, schema?: JSONSchema): JSONSchema;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { eachSchema } from "../eachSchema";
|
|
3
3
|
import joinScope from "./joinScope";
|
|
4
4
|
import getRef from "./getRef";
|
|
5
|
+
import { get } from "gson-pointer";
|
|
5
6
|
const COMPILED = "__compiled";
|
|
6
7
|
const COMPILED_REF = "__ref";
|
|
7
8
|
const GET_REF = "getRef";
|
|
@@ -9,7 +10,8 @@ const GET_ROOT = "getRoot";
|
|
|
9
10
|
const suffixes = /(#|\/)+$/g;
|
|
10
11
|
/**
|
|
11
12
|
* compiles the input root schema for `$ref` resolution and returns it again
|
|
12
|
-
* @attention this modifies input schema but maintains
|
|
13
|
+
* @attention this modifies input schema but maintains data-structure and thus returns
|
|
14
|
+
* the same object with JSON.stringify
|
|
13
15
|
*
|
|
14
16
|
* for a compiled json-schema you can call getRef on any contained schema (location of type).
|
|
15
17
|
* this resolves a $ref target to a valid schema (for a valid $ref)
|
|
@@ -18,7 +20,7 @@ const suffixes = /(#|\/)+$/g;
|
|
|
18
20
|
* @param schemaToCompile - json-schema to compile
|
|
19
21
|
* @param [rootSchema] - compiled root json-schema to use for definitions resolution
|
|
20
22
|
* @param [force] = false - force compile json-schema
|
|
21
|
-
* @return compiled
|
|
23
|
+
* @return compiled input json-schema
|
|
22
24
|
*/
|
|
23
25
|
export default function compileSchema(draft, schemaToCompile, rootSchema = schemaToCompile, force = false) {
|
|
24
26
|
if (!schemaToCompile || schemaToCompile[COMPILED] !== undefined) {
|
|
@@ -27,7 +29,9 @@ export default function compileSchema(draft, schemaToCompile, rootSchema = schem
|
|
|
27
29
|
const context = { ids: {}, remotes: draft.remotes };
|
|
28
30
|
const rootSchemaAsString = JSON.stringify(schemaToCompile);
|
|
29
31
|
const compiledSchema = JSON.parse(rootSchemaAsString);
|
|
32
|
+
// flag this schema as compiled
|
|
30
33
|
Object.defineProperty(compiledSchema, COMPILED, { enumerable: false, value: true });
|
|
34
|
+
// add getRef-helper to this object
|
|
31
35
|
Object.defineProperty(compiledSchema, GET_REF, {
|
|
32
36
|
enumerable: false,
|
|
33
37
|
value: getRef.bind(null, context, compiledSchema)
|
|
@@ -46,7 +50,15 @@ export default function compileSchema(draft, schemaToCompile, rootSchema = schem
|
|
|
46
50
|
const scopes = {};
|
|
47
51
|
const getRoot = () => compiledSchema;
|
|
48
52
|
eachSchema(compiledSchema, (schema, pointer) => {
|
|
53
|
+
var _a;
|
|
49
54
|
if (schema.id) {
|
|
55
|
+
// if this is a schema being merged on root object, we cannot override
|
|
56
|
+
// parents locations, but must reuse it
|
|
57
|
+
if (schema.id.startsWith("http") && /(allOf|anyOf|oneOf)\/\d+$/.test(pointer)) {
|
|
58
|
+
const parentPointer = pointer.replace(/\/(allOf|anyOf|oneOf)\/\d+$/, "");
|
|
59
|
+
const parentSchema = get(compiledSchema, parentPointer);
|
|
60
|
+
schema.id = (_a = parentSchema.id) !== null && _a !== void 0 ? _a : schema.id;
|
|
61
|
+
}
|
|
50
62
|
context.ids[schema.id.replace(suffixes, "")] = pointer;
|
|
51
63
|
}
|
|
52
64
|
// build up scopes and add them to $ref-resolution map
|
|
@@ -2,6 +2,7 @@ import { eachSchema } from "../../eachSchema";
|
|
|
2
2
|
// import remotes from "../../../remotes";
|
|
3
3
|
import joinScope from "../../compile/joinScope";
|
|
4
4
|
import getRef from "../../compile/getRef";
|
|
5
|
+
import { get } from "gson-pointer";
|
|
5
6
|
const COMPILED = "__compiled";
|
|
6
7
|
const COMPILED_REF = "__ref";
|
|
7
8
|
const GET_REF = "getRef";
|
|
@@ -50,7 +51,15 @@ export default function compileSchema(draft, schemaToCompile, rootSchema = schem
|
|
|
50
51
|
const scopes = {};
|
|
51
52
|
const getRoot = () => compiledSchema;
|
|
52
53
|
eachSchema(compiledSchema, (schema, pointer) => {
|
|
54
|
+
var _a;
|
|
53
55
|
if (schema.$id) {
|
|
56
|
+
// if this is a schema being merged on root object, we cannot override
|
|
57
|
+
// parents locations, but must reuse it
|
|
58
|
+
if (schema.$id.startsWith("http") && /(allOf|anyOf|oneOf)\/\d+$/.test(pointer)) {
|
|
59
|
+
const parentPointer = pointer.replace(/\/(allOf|anyOf|oneOf)\/\d+$/, "");
|
|
60
|
+
const parentSchema = get(compiledSchema, parentPointer);
|
|
61
|
+
schema.$id = (_a = parentSchema.$id) !== null && _a !== void 0 ? _a : schema.$id;
|
|
62
|
+
}
|
|
54
63
|
context.ids[schema.$id.replace(suffixes, "")] = pointer;
|
|
55
64
|
}
|
|
56
65
|
// build up scopes and add them to $ref-resolution map
|
|
@@ -17,7 +17,7 @@ function eachDefinition(walk, schema, pointer, key = "definitions") {
|
|
|
17
17
|
walk.nextTypeDefs(defs[defId], gp.join(pointer, key, defId, false));
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
|
-
console.log(`Invalid schema in ${pointer}/${key}/${defId}`);
|
|
20
|
+
// console.log(`Invalid schema in ${pointer}/${key}/${defId}`);
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
export function eachSchema(schema, callback, pointer = "#") {
|
|
@@ -5,29 +5,30 @@ const emptyObject = {};
|
|
|
5
5
|
* Returns the json-schema of a data-json-pointer.
|
|
6
6
|
*
|
|
7
7
|
* Notes
|
|
8
|
-
* - Uses
|
|
8
|
+
* - Uses draft.step to walk through data and schema
|
|
9
9
|
*
|
|
10
|
-
* @param
|
|
10
|
+
* @param draft
|
|
11
11
|
* @param pointer - json pointer in data to get the json schema for
|
|
12
12
|
* @param [data] - the data object, which includes the json pointers value. This is optional, as
|
|
13
13
|
* long as no oneOf, anyOf, etc statement is part of the pointers schema
|
|
14
|
-
* @param [schema] - the json schema to iterate. Defaults to
|
|
14
|
+
* @param [schema] - the json schema to iterate. Defaults to draft.rootSchema
|
|
15
15
|
* @return json schema object of the json-pointer or an error
|
|
16
16
|
*/
|
|
17
|
-
export default function getSchema(
|
|
17
|
+
export default function getSchema(draft, pointer, data, schema = draft.rootSchema) {
|
|
18
18
|
const frags = gp.split(pointer);
|
|
19
|
-
|
|
19
|
+
schema = draft.resolveRef(schema);
|
|
20
|
+
return _get(draft, schema, frags, pointer, data);
|
|
20
21
|
}
|
|
21
|
-
function _get(
|
|
22
|
+
function _get(draft, schema, frags, pointer, data = emptyObject) {
|
|
22
23
|
if (frags.length === 0) {
|
|
23
|
-
return
|
|
24
|
+
return draft.resolveRef(schema);
|
|
24
25
|
}
|
|
25
26
|
const key = frags.shift(); // step key
|
|
26
|
-
schema =
|
|
27
|
+
schema = draft.step(key, schema, data, pointer); // step schema
|
|
27
28
|
if (isJSONError(schema)) {
|
|
28
29
|
return schema;
|
|
29
30
|
}
|
|
30
31
|
// @ts-ignore
|
|
31
32
|
data = data[key]; // step data
|
|
32
|
-
return _get(
|
|
33
|
+
return _get(draft, schema, frags, `${pointer}/${key}`, data);
|
|
33
34
|
}
|
package/lib/compile/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ import joinScope from "./joinScope";
|
|
|
5
5
|
import getRef from "./getRef";
|
|
6
6
|
import { JSONSchema } from "../types";
|
|
7
7
|
import { Context } from "./types";
|
|
8
|
+
import { get } from "gson-pointer";
|
|
8
9
|
|
|
9
10
|
const COMPILED = "__compiled";
|
|
10
11
|
const COMPILED_REF = "__ref";
|
|
@@ -14,7 +15,8 @@ const suffixes = /(#|\/)+$/g;
|
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* compiles the input root schema for `$ref` resolution and returns it again
|
|
17
|
-
* @attention this modifies input schema but maintains
|
|
18
|
+
* @attention this modifies input schema but maintains data-structure and thus returns
|
|
19
|
+
* the same object with JSON.stringify
|
|
18
20
|
*
|
|
19
21
|
* for a compiled json-schema you can call getRef on any contained schema (location of type).
|
|
20
22
|
* this resolves a $ref target to a valid schema (for a valid $ref)
|
|
@@ -23,7 +25,7 @@ const suffixes = /(#|\/)+$/g;
|
|
|
23
25
|
* @param schemaToCompile - json-schema to compile
|
|
24
26
|
* @param [rootSchema] - compiled root json-schema to use for definitions resolution
|
|
25
27
|
* @param [force] = false - force compile json-schema
|
|
26
|
-
* @return compiled
|
|
28
|
+
* @return compiled input json-schema
|
|
27
29
|
*/
|
|
28
30
|
export default function compileSchema(
|
|
29
31
|
draft: Draft,
|
|
@@ -39,7 +41,9 @@ export default function compileSchema(
|
|
|
39
41
|
const rootSchemaAsString = JSON.stringify(schemaToCompile);
|
|
40
42
|
const compiledSchema: JSONSchema = JSON.parse(rootSchemaAsString);
|
|
41
43
|
|
|
44
|
+
// flag this schema as compiled
|
|
42
45
|
Object.defineProperty(compiledSchema, COMPILED, { enumerable: false, value: true });
|
|
46
|
+
// add getRef-helper to this object
|
|
43
47
|
Object.defineProperty(compiledSchema, GET_REF, {
|
|
44
48
|
enumerable: false,
|
|
45
49
|
value: getRef.bind(null, context, compiledSchema)
|
|
@@ -66,8 +70,16 @@ export default function compileSchema(
|
|
|
66
70
|
|
|
67
71
|
const scopes: Record<string, string> = {};
|
|
68
72
|
const getRoot = () => compiledSchema;
|
|
73
|
+
|
|
69
74
|
eachSchema(compiledSchema, (schema, pointer) => {
|
|
70
75
|
if (schema.id) {
|
|
76
|
+
// if this is a schema being merged on root object, we cannot override
|
|
77
|
+
// parents locations, but must reuse it
|
|
78
|
+
if (schema.id.startsWith("http") && /(allOf|anyOf|oneOf)\/\d+$/.test(pointer)) {
|
|
79
|
+
const parentPointer = pointer.replace(/\/(allOf|anyOf|oneOf)\/\d+$/, "");
|
|
80
|
+
const parentSchema = get(compiledSchema, parentPointer);
|
|
81
|
+
schema.id = parentSchema.id ?? schema.id;
|
|
82
|
+
}
|
|
71
83
|
context.ids[schema.id.replace(suffixes, "")] = pointer;
|
|
72
84
|
}
|
|
73
85
|
|
|
@@ -5,6 +5,7 @@ import { eachSchema } from "../../eachSchema";
|
|
|
5
5
|
import joinScope from "../../compile/joinScope";
|
|
6
6
|
import getRef from "../../compile/getRef";
|
|
7
7
|
import { JSONSchema } from "../../types";
|
|
8
|
+
import { get } from "gson-pointer";
|
|
8
9
|
|
|
9
10
|
const COMPILED = "__compiled";
|
|
10
11
|
const COMPILED_REF = "__ref";
|
|
@@ -75,6 +76,13 @@ export default function compileSchema(
|
|
|
75
76
|
const getRoot = () => compiledSchema;
|
|
76
77
|
eachSchema(compiledSchema, (schema, pointer) => {
|
|
77
78
|
if (schema.$id) {
|
|
79
|
+
// if this is a schema being merged on root object, we cannot override
|
|
80
|
+
// parents locations, but must reuse it
|
|
81
|
+
if (schema.$id.startsWith("http") && /(allOf|anyOf|oneOf)\/\d+$/.test(pointer)) {
|
|
82
|
+
const parentPointer = pointer.replace(/\/(allOf|anyOf|oneOf)\/\d+$/, "");
|
|
83
|
+
const parentSchema = get(compiledSchema, parentPointer);
|
|
84
|
+
schema.$id = parentSchema.$id ?? schema.$id;
|
|
85
|
+
}
|
|
78
86
|
context.ids[schema.$id.replace(suffixes, "")] = pointer;
|
|
79
87
|
}
|
|
80
88
|
|
package/lib/eachSchema.ts
CHANGED
package/lib/getSchema.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import gp from "gson-pointer";
|
|
2
2
|
import { JSONSchema, JSONPointer, isJSONError } from "./types";
|
|
3
|
-
import { Draft
|
|
3
|
+
import { Draft } from "./draft";
|
|
4
4
|
|
|
5
5
|
const emptyObject = {};
|
|
6
6
|
|
|
@@ -8,42 +8,43 @@ const emptyObject = {};
|
|
|
8
8
|
* Returns the json-schema of a data-json-pointer.
|
|
9
9
|
*
|
|
10
10
|
* Notes
|
|
11
|
-
* - Uses
|
|
11
|
+
* - Uses draft.step to walk through data and schema
|
|
12
12
|
*
|
|
13
|
-
* @param
|
|
13
|
+
* @param draft
|
|
14
14
|
* @param pointer - json pointer in data to get the json schema for
|
|
15
15
|
* @param [data] - the data object, which includes the json pointers value. This is optional, as
|
|
16
16
|
* long as no oneOf, anyOf, etc statement is part of the pointers schema
|
|
17
|
-
* @param [schema] - the json schema to iterate. Defaults to
|
|
17
|
+
* @param [schema] - the json schema to iterate. Defaults to draft.rootSchema
|
|
18
18
|
* @return json schema object of the json-pointer or an error
|
|
19
19
|
*/
|
|
20
20
|
export default function getSchema(
|
|
21
|
-
|
|
21
|
+
draft: Draft,
|
|
22
22
|
pointer: JSONPointer,
|
|
23
23
|
data?: unknown,
|
|
24
|
-
schema: JSONSchema =
|
|
24
|
+
schema: JSONSchema = draft.rootSchema
|
|
25
25
|
): JSONSchema {
|
|
26
26
|
const frags = gp.split(pointer);
|
|
27
|
-
|
|
27
|
+
schema = draft.resolveRef(schema);
|
|
28
|
+
return _get(draft, schema, frags, pointer, data);
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
function _get(
|
|
31
|
-
|
|
32
|
+
draft: Draft,
|
|
32
33
|
schema: JSONSchema,
|
|
33
34
|
frags: Array<string>,
|
|
34
35
|
pointer: JSONPointer,
|
|
35
36
|
data: unknown = emptyObject
|
|
36
37
|
): JSONSchema {
|
|
37
38
|
if (frags.length === 0) {
|
|
38
|
-
return
|
|
39
|
+
return draft.resolveRef(schema);
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
const key = frags.shift(); // step key
|
|
42
|
-
schema =
|
|
43
|
+
schema = draft.step(key, schema, data, pointer); // step schema
|
|
43
44
|
if (isJSONError(schema)) {
|
|
44
45
|
return schema;
|
|
45
46
|
}
|
|
46
47
|
// @ts-ignore
|
|
47
48
|
data = data[key]; // step data
|
|
48
|
-
return _get(
|
|
49
|
+
return _get(draft, schema, frags, `${pointer}/${key}`, data);
|
|
49
50
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "json-schema-library",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.2",
|
|
4
4
|
"description": "Customizable and hackable json-validator and json-schema utilities for traversal, data generation and validation",
|
|
5
5
|
"module": "dist/module/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -12,7 +12,11 @@
|
|
|
12
12
|
"test": "TS_NODE_PROJECT=./test/tsconfig.json mocha -r ts-node/register -R spec 'test/**/*.test.ts'",
|
|
13
13
|
"test:integration": "TS_NODE_PROJECT=./test/tsconfig.json mocha -r ts-node/register -R spec 'test/integration/**/*.test.ts'",
|
|
14
14
|
"test:unit": "TS_NODE_PROJECT=./test/tsconfig.json mocha -r ts-node/register -R spec 'test/unit/**/*.test.ts'",
|
|
15
|
+
"test:unit:ci": "TS_NODE_PROJECT=./test/tsconfig.json mocha -r ts-node/register -R json 'test/unit/**/*.test.ts' > test-result-unit.json; exit 0",
|
|
15
16
|
"test:spec": "TS_NODE_PROJECT=./test/tsconfig.json mocha -r ts-node/register -R spec 'test/spec/**/*.test.ts'",
|
|
17
|
+
"test:spec:4:ci": "TS_NODE_PROJECT=./test/tsconfig.json mocha -r ts-node/register -R json 'test/spec/v4/*.test.ts' > test-result-spec4.json; exit 0",
|
|
18
|
+
"test:spec:6:ci": "TS_NODE_PROJECT=./test/tsconfig.json mocha -r ts-node/register -R json 'test/spec/v6/*.test.ts' > test-result-spec6.json; exit 0",
|
|
19
|
+
"test:spec:7:ci": "TS_NODE_PROJECT=./test/tsconfig.json mocha -r ts-node/register -R json 'test/spec/v7/*.test.ts' > test-result-spec7.json; exit 0",
|
|
16
20
|
"test:4": "TS_NODE_PROJECT=./test/tsconfig.json mocha -r ts-node/register -R spec 'test/spec/v4/*.test.ts'",
|
|
17
21
|
"test:6": "TS_NODE_PROJECT=./test/tsconfig.json mocha -r ts-node/register -R spec 'test/spec/v6/*.test.ts'",
|
|
18
22
|
"test:7": "TS_NODE_PROJECT=./test/tsconfig.json mocha -r ts-node/register -R spec 'test/spec/v7/*.test.ts'",
|