diff --git a/packages/demo/demo-v2/src/pages/vue-editor/views/editor/viewComponents/Text/uiSchema.js b/packages/demo/demo-v2/src/pages/vue-editor/views/editor/viewComponents/Text/uiSchema.js index 58c9afe0..027da393 100644 --- a/packages/demo/demo-v2/src/pages/vue-editor/views/editor/viewComponents/Text/uiSchema.js +++ b/packages/demo/demo-v2/src/pages/vue-editor/views/editor/viewComponents/Text/uiSchema.js @@ -8,8 +8,8 @@ export default { getWidget(widgetVm) { console.log(widgetVm); }, - onChange(newVal, oldVal) { - console.log('change:', newVal, oldVal); + onChange(data) { + console.log('change:', data); } } } diff --git a/packages/docs/docs/zh/guide/basic-config.md b/packages/docs/docs/zh/guide/basic-config.md index d1b45399..3aca83b5 100644 --- a/packages/docs/docs/zh/guide/basic-config.md +++ b/packages/docs/docs/zh/guide/basic-config.md @@ -171,8 +171,15 @@ uiSchema = { // onChange // 支持版本 1.3 - onChange(newVal, oldVal) { - console.log('change:', newVal, oldVal); + /** + * + * @param curVal 当前值 + * @param preVal 上一次的值 + * @param parentFormData 当前父节点的值,响应式的值可在这里设置其它需要联动的值 + * @param rootFormData 当前父节点的值,响应式的值可在这里设置其它需要联动的值 + */ + onChange({ curVal, preVal, parentFormData, rootFormData }) { + console.log('change:', curVal, preVal, parentFormData, rootFormData); }, // 显示标题?只对 type为`object`、`array` 类型有效 diff --git a/packages/lib/vue2/vue2-core/src/components/Widget.js b/packages/lib/vue2/vue2-core/src/components/Widget.js index 0d8c6dd3..9c2790fc 100644 --- a/packages/lib/vue2/vue2-core/src/components/Widget.js +++ b/packages/lib/vue2/vue2-core/src/components/Widget.js @@ -325,7 +325,12 @@ export default { if (formatValue.update && preVal !== formatValue.value) { self.value = formatValue.value; if (self.onChange) { - self.onChange(formatValue.value, preVal); + self.onChange({ + curVal: formatValue.value, + preVal, + parentFormData: getPathVal(self.rootFormData, self.curNodePath, 1), + rootFormData: self.rootFormData + }); } } } diff --git a/packages/lib/vue2/vue2-form-element/dist/vueJsonSchemaForm.esm.js b/packages/lib/vue2/vue2-form-element/dist/vueJsonSchemaForm.esm.js index 38a5366f..bc105349 100644 --- a/packages/lib/vue2/vue2-form-element/dist/vueJsonSchemaForm.esm.js +++ b/packages/lib/vue2/vue2-form-element/dist/vueJsonSchemaForm.esm.js @@ -10316,7 +10316,12 @@ var Widget = { self.value = formatValue.value; if (self.onChange) { - self.onChange(formatValue.value, preVal); + self.onChange({ + curVal: formatValue.value, + preVal: preVal, + parentFormData: getPathVal$1(self.rootFormData, self.curNodePath, 1), + rootFormData: self.rootFormData + }); } } } diff --git a/packages/lib/vue2/vue2-form-element/dist/vueJsonSchemaForm.esm.min.js b/packages/lib/vue2/vue2-form-element/dist/vueJsonSchemaForm.esm.min.js index b9670cae..39c36d6c 100644 --- a/packages/lib/vue2/vue2-form-element/dist/vueJsonSchemaForm.esm.min.js +++ b/packages/lib/vue2/vue2-form-element/dist/vueJsonSchemaForm.esm.min.js @@ -1,4 +1,4 @@ /** @license @lljj/vue-json-schema-form (c) 2020-2021 Liu.Jun License: Apache-2.0 */ import e from"vue";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function t(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function a(){return(a=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e}).apply(this,arguments)}function o(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function i(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?o(Object(a),!0).forEach((function(r){t(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):o(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}function n(e,r){if(null==e)return{};var t,a,o=function(e,r){if(null==e)return{};var t,a,o={},i=Object.keys(e);for(a=0;a<i.length;a++)t=i[a],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function s(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],a=!0,o=!1,i=void 0;try{for(var n,s=e[Symbol.iterator]();!(a=(n=s.next()).done)&&(t.push(n.value),!r||t.length!==r);a=!0);}catch(e){o=!0,i=e}finally{try{a||null==s.return||s.return()}finally{if(o)throw i}}return t}(e,r)||c(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,r){if(e){if("string"==typeof e)return u(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?u(e,r):void 0}}function u(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);t<r;t++)a[t]=e[t];return a}function d(e){var r=function(e,r){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var a=t.call(e,r||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:String(r)}function p(e){return"[object Object]"===Object.prototype.toString.call(e)}function h(e){return"[object Arguments]"===Object.prototype.toString.call(e)}function m(e,r){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=Object.assign({},e);return Object.keys(r).reduce((function(a,o){var i=e?e[o]:{},n=r[o];return e&&e.hasOwnProperty(o)&&p(n)?a[o]=m(i,n,t):t&&Array.isArray(i)&&Array.isArray(n)?a[o]=i.concat(n):a[o]=n,a}),a)}function f(e){var t,a=e.type;return!a&&e.const?(t=e.const,Array.isArray(t)?"array":"string"==typeof t?"string":null==t?"null":"boolean"==typeof t?"boolean":isNaN(t)?"object"===r(t)?"object":"string":"number"):!a&&e.enum?"string":!a&&e.items?"array":a||!e.properties&&!e.additionalProperties?a instanceof Array&&2===a.length&&a.includes("null")?a.find((function(e){return"null"!==e})):a:"object"}function v(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===t)return!0;if("function"==typeof e||"function"==typeof t)return!0;if("object"!==r(e)||"object"!==r(t))return!1;if(null===e||null===t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(h(e)||h(t)){if(!h(e)||!h(t))return!1;var i=Array.prototype.slice;return v(i.call(e),i.call(t),a,o)}if(e.constructor!==t.constructor)return!1;var n=Object.keys(e),s=Object.keys(t);if(0===n.length&&0===s.length)return!0;if(n.length!==s.length)return!1;for(var l,c=a.length;c--;)if(a[c]===e)return o[c]===t;a.push(e),o.push(t),n.sort(),s.sort();for(var u=n.length-1;u>=0;u--)if(n[u]!==s[u])return!1;for(var d=n.length-1;d>=0;d--)if(!v(e[l=n[d]],t[l],a,o))return!1;return a.pop(),o.pop(),!0}var g,y,b=(g="".concat(+new Date),y=0,function(){var e="".concat(+new Date);return e===g?y+=1:y=0,"".concat(g=e,"x").concat(y)});function P(e,r){return Object.entries(e).reduce((function(e,t){var a=s(t,2),o=a[0],i=a[1],n=r(o,i);return void 0!==n&&(e[n]=i),e}),{})}function w(e){return void 0===e?e:String(e).replace(/^./,(function(e){return e.toLocaleLowerCase()}))}function E(e,r){return e*r/function e(r,t){return 0===t?r:e(t,r%t)}(e,r)}function S(e,r){for(var t=r.split("/"),a=0;a<t.length;a+=1){if(void 0===e)return;e=""===t[a]?e:e[t[a]]}return e}function F(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e;if(!e.startsWith("#"))throw new Error("Could not find a definition for ".concat(t,"."));var a=S(r,e=decodeURIComponent(e.substring(1)));if(void 0===a)throw new Error("Could not find a definition for ".concat(t,"."));return a.hasOwnProperty("$ref")?F(a.$ref,r):a}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function x(e,r){return e(r={exports:{}},r.exports),r.exports}function O(e){return e&&e.default||e}var _,D=x((function(e,r){ /** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ -!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var a=r.length-1,o=1;o<a;++o)r[o]=r[o].slice(1,-1);return r[a]=r[a].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function a(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function i(e){var a=r("[0-9]","[A-Fa-f]"),o=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),i="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",n=r("[\\:\\/\\?\\#\\[\\]\\@]",i),s=e?"[\\uE000-\\uF8FF]":"[]",l=r("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t("[A-Za-z]"+r("[A-Za-z]","[0-9]","[\\+\\-\\.]")+"*"),t(t(o+"|"+r(l,i,"[\\:]"))+"*");var c=t(t("25[0-5]")+"|"+t("2[0-4][0-9]")+"|"+t("1[0-9][0-9]")+"|"+t("0?[1-9][0-9]")+"|0?0?[0-9]"),u=t(c+"\\."+c+"\\."+c+"\\."+c),d=t(a+"{1,4}"),p=t(t(d+"\\:"+d)+"|"+u),h=t(t(d+"\\:")+"{6}"+p),m=t("\\:\\:"+t(d+"\\:")+"{5}"+p),f=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+p),v=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+p),g=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+p),y=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+p),b=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+p),P=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),w=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),E=t([h,m,f,v,g,y,b,P,w].join("|")),S=t(t(l+"|"+o)+"+");t("[vV]"+a+"+\\."+r(l,i,"[\\:]")+"+"),t(t(o+"|"+r(l,i))+"*");var F=t(o+"|"+r(l,i,"[\\:\\@]"));return t(t(o+"|"+r(l,i,"[\\@]"))+"+"),t(t(F+"|"+r("[\\/\\?]",s))+"*"),{NOT_SCHEME:new RegExp(r("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,i),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,i),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,i),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,i),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,i,"[\\:\\@\\/\\?]",s),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,i,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,i),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,n),"g"),PCT_ENCODED:new RegExp(o,"g"),IPV4ADDRESS:new RegExp("^("+u+")$"),IPV6ADDRESS:new RegExp("^\\[?("+E+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+S+")")+"?\\]?$")}}var n=i(!1),s=i(!0),l=function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,r){var t=[],a=!0,o=!1,i=void 0;try{for(var n,s=e[Symbol.iterator]();!(a=(n=s.next()).done)&&(t.push(n.value),!r||t.length!==r);a=!0);}catch(e){o=!0,i=e}finally{try{!a&&s.return&&s.return()}finally{if(o)throw i}}return t}(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=2147483647,u=/^xn--/,d=/[^\0-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,f=String.fromCharCode;function v(e){throw new RangeError(h[e])}function g(e,r){var t=e.split("@"),a="";t.length>1&&(a=t[0]+"@",e=t[1]);var o=function(e,r){for(var t=[],a=e.length;a--;)t[a]=r(e[a]);return t}((e=e.replace(p,".")).split("."),r).join(".");return a+o}function y(e){for(var r=[],t=0,a=e.length;t<a;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<a){var i=e.charCodeAt(t++);56320==(64512&i)?r.push(((1023&o)<<10)+(1023&i)+65536):(r.push(o),t--)}else r.push(o)}return r}var b=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},P=function(e,r,t){var a=0;for(e=t?m(e/700):e>>1,e+=m(e/r);e>455;a+=36)e=m(e/35);return m(a+36*e/(e+38))},w=function(e){var r,t=[],a=e.length,o=0,i=128,n=72,s=e.lastIndexOf("-");s<0&&(s=0);for(var l=0;l<s;++l)e.charCodeAt(l)>=128&&v("not-basic"),t.push(e.charCodeAt(l));for(var u=s>0?s+1:0;u<a;){for(var d=o,p=1,h=36;;h+=36){u>=a&&v("invalid-input");var f=(r=e.charCodeAt(u++))-48<10?r-22:r-65<26?r-65:r-97<26?r-97:36;(f>=36||f>m((c-o)/p))&&v("overflow"),o+=f*p;var g=h<=n?1:h>=n+26?26:h-n;if(f<g)break;var y=36-g;p>m(c/y)&&v("overflow"),p*=y}var b=t.length+1;n=P(o-d,b,0==d),m(o/b)>c-i&&v("overflow"),i+=m(o/b),o%=b,t.splice(o++,0,i)}return String.fromCodePoint.apply(String,t)},E=function(e){var r=[],t=(e=y(e)).length,a=128,o=0,i=72,n=!0,s=!1,l=void 0;try{for(var u,d=e[Symbol.iterator]();!(n=(u=d.next()).done);n=!0){var p=u.value;p<128&&r.push(f(p))}}catch(e){s=!0,l=e}finally{try{!n&&d.return&&d.return()}finally{if(s)throw l}}var h=r.length,g=h;for(h&&r.push("-");g<t;){var w=c,E=!0,S=!1,F=void 0;try{for(var x,O=e[Symbol.iterator]();!(E=(x=O.next()).done);E=!0){var _=x.value;_>=a&&_<w&&(w=_)}}catch(e){S=!0,F=e}finally{try{!E&&O.return&&O.return()}finally{if(S)throw F}}var D=g+1;w-a>m((c-o)/D)&&v("overflow"),o+=(w-a)*D,a=w;var $=!0,k=!1,j=void 0;try{for(var I,A=e[Symbol.iterator]();!($=(I=A.next()).done);$=!0){var C=I.value;if(C<a&&++o>c&&v("overflow"),C==a){for(var R=o,N=36;;N+=36){var L=N<=i?1:N>=i+26?26:N-i;if(R<L)break;var T=R-L,z=36-L;r.push(f(b(L+T%z,0))),R=m(T/z)}r.push(f(b(R,0))),i=P(o,D,g==h),o=0,++g}}}catch(e){k=!0,j=e}finally{try{!$&&A.return&&A.return()}finally{if(k)throw j}}++o,++a}return r.join("")},S=function(e){return g(e,(function(e){return d.test(e)?"xn--"+E(e):e}))},F=function(e){return g(e,(function(e){return u.test(e)?w(e.slice(4).toLowerCase()):e}))},x={};function O(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function _(e){for(var r="",t=0,a=e.length;t<a;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(a-t>=6){var i=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&i)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(a-t>=9){var n=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&n)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function D(e,r){function t(e){var t=_(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,O).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,O).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,O).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,O).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,O).replace(r.PCT_ENCODED,o)),e}function $(e){return e.replace(/^0*(.*)/,"$1")||"0"}function k(e,r){var t=e.match(r.IPV4ADDRESS)||[],a=l(t,2)[1];return a?a.split(".").map($).join("."):e}function j(e,r){var t=e.match(r.IPV6ADDRESS)||[],a=l(t,3),o=a[1],i=a[2];if(o){for(var n=o.toLowerCase().split("::").reverse(),s=l(n,2),c=s[0],u=s[1],d=u?u.split(":").map($):[],p=c.split(":").map($),h=r.IPV4ADDRESS.test(p[p.length-1]),m=h?7:8,f=p.length-m,v=Array(m),g=0;g<m;++g)v[g]=d[g]||p[f+g]||"";h&&(v[m-1]=k(v[m-1],r));var y=v.reduce((function(e,r,t){if(!r||"0"===r){var a=e[e.length-1];a&&a.index+a.length===t?a.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(y&&y.length>1){var P=v.slice(0,y.index),w=v.slice(y.index+y.length);b=P.join(":")+"::"+w.join(":")}else b=v.join(":");return i&&(b+="%"+i),b}return e}var I=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,A=void 0==="".match(/(){0}/)[1];function C(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},a=!1!==r.iri?s:n;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(I);if(o){A?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=j(k(t.host,a),a)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var i=x[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||i&&i.unicodeSupport)D(t,a);else{if(t.host&&(r.domainHost||i&&i.domainHost))try{t.host=S(t.host.replace(a.PCT_ENCODED,_).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}D(t,n)}i&&i.parse&&i.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function R(e,r){var t=!1!==r.iri?s:n,a=[];return void 0!==e.userinfo&&(a.push(e.userinfo),a.push("@")),void 0!==e.host&&a.push(j(k(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(a.push(":"),a.push(String(e.port))),a.length?a.join(""):void 0}var N=/^\.\.?\//,L=/^\/\.(\/|$)/,T=/^\/\.\.(\/|$)/,z=/^\/?(?:.|\n)*?(?=\/|$)/;function q(e){for(var r=[];e.length;)if(e.match(N))e=e.replace(N,"");else if(e.match(L))e=e.replace(L,"/");else if(e.match(T))e=e.replace(T,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(z);if(!t)throw new Error("Unexpected dot segment condition");var a=t[0];e=e.slice(a.length),r.push(a)}return r.join("")}function V(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?s:n,a=[],o=x[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?F(e.host):S(e.host.replace(t.PCT_ENCODED,_).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}D(e,t),"suffix"!==r.reference&&e.scheme&&(a.push(e.scheme),a.push(":"));var i=R(e,r);if(void 0!==i&&("suffix"!==r.reference&&a.push("//"),a.push(i),e.path&&"/"!==e.path.charAt(0)&&a.push("/")),void 0!==e.path){var l=e.path;r.absolutePath||o&&o.absolutePath||(l=q(l)),void 0===i&&(l=l.replace(/^\/\//,"/%2F")),a.push(l)}return void 0!==e.query&&(a.push("?"),a.push(e.query)),void 0!==e.fragment&&(a.push("#"),a.push(e.fragment)),a.join("")}function M(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],o={};return a||(e=C(V(e,t),t),r=C(V(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=q(r.path||""),o.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=q(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=q(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=q(o.path)),o.query=r.query):(o.path=e.path,void 0!==r.query?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function W(e,r){return e&&e.toString().replace(r&&r.iri?s.PCT_ENCODED:n.PCT_ENCODED,_)}var B={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},Q={scheme:"https",domainHost:B.domainHost,parse:B.parse,serialize:B.serialize};function U(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var H={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=U(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(U(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),a=l(t,2),o=a[0],i=a[1];e.path=o&&"/"!==o?o:void 0,e.query=i,e.resourceName=void 0}return e.fragment=void 0,e}},K={scheme:"wss",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize},G={},J="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Z="[0-9A-Fa-f]",X=t(t("%[EFef]"+Z+"%"+Z+Z+"%"+Z+Z)+"|"+t("%[89A-Fa-f]"+Z+"%"+Z+Z)+"|"+t("%"+Z+Z)),Y=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),ee=new RegExp(J,"g"),re=new RegExp(X,"g"),te=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',Y),"g"),ae=new RegExp(r("[^]",J,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),oe=ae;function ie(e){var r=_(e);return r.match(ee)?r:e}var ne={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,i={},n=t.query.split("&"),s=0,l=n.length;s<l;++s){var c=n[s].split("=");switch(c[0]){case"to":for(var u=c[1].split(","),d=0,p=u.length;d<p;++d)a.push(u[d]);break;case"subject":t.subject=W(c[1],r);break;case"body":t.body=W(c[1],r);break;default:o=!0,i[W(c[0],r)]=W(c[1],r)}}o&&(t.headers=i)}t.query=void 0;for(var h=0,m=a.length;h<m;++h){var f=a[h].split("@");if(f[0]=W(f[0]),r.unicodeSupport)f[1]=W(f[1],r).toLowerCase();else try{f[1]=S(W(f[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}a[h]=f.join("@")}return t},serialize:function(e,r){var t,a=e,i=null!=(t=e.to)?t instanceof Array?t:"number"!=typeof t.length||t.split||t.setInterval||t.call?[t]:Array.prototype.slice.call(t):[];if(i){for(var n=0,s=i.length;n<s;++n){var l=String(i[n]),c=l.lastIndexOf("@"),u=l.slice(0,c).replace(re,ie).replace(re,o).replace(te,O),d=l.slice(c+1);try{d=r.iri?F(d):S(W(d,r).toLowerCase())}catch(e){a.error=a.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}i[n]=u+"@"+d}a.path=i.join(",")}var p=e.headers=e.headers||{};e.subject&&(p.subject=e.subject),e.body&&(p.body=e.body);var h=[];for(var m in p)p[m]!==G[m]&&h.push(m.replace(re,ie).replace(re,o).replace(ae,O)+"="+p[m].replace(re,ie).replace(re,o).replace(oe,O));return h.length&&(a.query=h.join("&")),a}},se=/^([^\:]+)\:(.*)/,le={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(se),a=e;if(t){var o=r.scheme||a.scheme||"urn",i=t[1].toLowerCase(),n=t[2],s=o+":"+(r.nid||i),l=x[s];a.nid=i,a.nss=n,a.path=void 0,l&&(a=l.parse(a,r))}else a.error=a.error||"URN can not be parsed.";return a},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",a=e.nid,o=t+":"+(r.nid||a),i=x[o];i&&(e=i.serialize(e,r));var n=e,s=e.nss;return n.path=(a||r.nid)+":"+s,n}},ce=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ue={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match(ce)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};x[B.scheme]=B,x[Q.scheme]=Q,x[H.scheme]=H,x[K.scheme]=K,x[ne.scheme]=ne,x[le.scheme]=le,x[ue.scheme]=ue,e.SCHEMES=x,e.pctEncChar=O,e.pctDecChars=_,e.parse=C,e.removeDotSegments=q,e.serialize=V,e.resolveComponents=M,e.resolve=function(e,r,t){var a=function(e,r){var t=e;if(r)for(var a in r)t[a]=r[a];return t}({scheme:"null"},t);return V(M(C(e,a),C(r,a),a,!0),a)},e.normalize=function(e,r){return"string"==typeof e?e=V(C(e,r),r):"object"===a(e)&&(e=C(V(e,r),r)),e},e.equal=function(e,r,t){return"string"==typeof e?e=V(C(e,t),t):"object"===a(e)&&(e=V(e,t)),"string"==typeof r?r=V(C(r,t),t):"object"===a(r)&&(r=V(r,t)),e===r},e.escapeComponent=function(e,r){return e&&e.toString().replace(r&&r.iri?s.ESCAPE:n.ESCAPE,O)},e.unescapeComponent=W,Object.defineProperty(e,"__esModule",{value:!0})}(r)}));(_=D)&&_.__esModule&&Object.prototype.hasOwnProperty.call(_,"default")&&_.default;var $=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 a,o,i;if(Array.isArray(r)){if((a=r.length)!=t.length)return!1;for(o=a;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((a=(i=Object.keys(r)).length)!==Object.keys(t).length)return!1;for(o=a;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,i[o]))return!1;for(o=a;0!=o--;){var n=i[o];if(!e(r[n],t[n]))return!1}return!0}return r!=r&&t!=t},k={copy:function(e,r){for(var t in r=r||{},e)r[t]=e[t];return r},checkDataType:j,checkDataTypes:function(e,r,t){switch(e.length){case 1:return j(e[0],r,t,!0);default:var a="",o=A(e);for(var i in o.array&&o.object&&(a=o.null?"(":"(!"+r+" || ",a+="typeof "+r+' !== "object")',delete o.null,delete o.array,delete o.object),o.number&&delete o.integer,o)a+=(a?" && ":"")+j(i,r,t,!0);return a}},coerceToTypes:function(e,r){if(Array.isArray(r)){for(var t=[],a=0;a<r.length;a++){var o=r[a];(I[o]||"array"===e&&"array"===o)&&(t[t.length]=o)}if(t.length)return t}else{if(I[r])return[r];if("array"===e&&"array"===r)return["array"]}},toHash:A,getProperty:N,escapeQuotes:L,equal:$,ucs2length:function(e){for(var r,t=0,a=e.length,o=0;o<a;)t++,(r=e.charCodeAt(o++))>=55296&&r<=56319&&o<a&&56320==(64512&(r=e.charCodeAt(o)))&&o++;return t},varOccurences:function(e,r){r+="[^0-9]";var t=e.match(new RegExp(r,"g"));return t?t.length:0},varReplace:function(e,r,t){return r+="([^0-9])",t=t.replace(/\$/g,"$$$$"),e.replace(new RegExp(r,"g"),t+"$1")},schemaHasRules:function(e,r){if("boolean"==typeof e)return!e;for(var t in e)if(r[t])return!0},schemaHasRulesExcept:function(e,r,t){if("boolean"==typeof e)return!e&&"not"!=t;for(var a in e)if(a!=t&&r[a])return!0},schemaUnknownRules:function(e,r){if("boolean"==typeof e)return;for(var t in e)if(!r[t])return t},toQuotedString:T,getPathExpr:function(e,r,t,a){return V(e,t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'")},getPath:function(e,r,t){var a=T(t?"/"+M(r):N(r));return V(e,a)},getData:function(e,r,t){var a,o,i,n;if(""===e)return"rootData";if("/"==e[0]){if(!z.test(e))throw new Error("Invalid JSON-pointer: "+e);o=e,i="rootData"}else{if(!(n=e.match(q)))throw new Error("Invalid JSON-pointer: "+e);if(a=+n[1],"#"==(o=n[2])){if(a>=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(i="data"+(r-a||""),!o)return i}for(var s=i,l=o.split("/"),c=0;c<l.length;c++){var u=l[c];u&&(i+=N(W(u)),s+=" && "+i)}return s},unescapeFragment:function(e){return W(decodeURIComponent(e))},unescapeJsonPointer:W,escapeFragment:function(e){return encodeURIComponent(M(e))},escapeJsonPointer:M};function j(e,r,t,a){var o=a?" !== ":" === ",i=a?" || ":" && ",n=a?"!":"",s=a?"":"!";switch(e){case"null":return r+o+"null";case"array":return n+"Array.isArray("+r+")";case"object":return"("+n+r+i+"typeof "+r+o+'"object"'+i+s+"Array.isArray("+r+"))";case"integer":return"(typeof "+r+o+'"number"'+i+s+"("+r+" % 1)"+i+r+o+r+(t?i+n+"isFinite("+r+")":"")+")";case"number":return"(typeof "+r+o+'"'+e+'"'+(t?i+n+"isFinite("+r+")":"")+")";default:return"typeof "+r+o+'"'+e+'"'}}var I=A(["string","number","integer","boolean","null"]);function A(e){for(var r={},t=0;t<e.length;t++)r[e[t]]=!0;return r}var C=/^[a-z$_][a-z$_0-9]*$/i,R=/'|\\/g;function N(e){return"number"==typeof e?"["+e+"]":C.test(e)?"."+e:"['"+L(e)+"']"}function L(e){return e.replace(R,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function T(e){return"'"+L(e)+"'"}var z=/^\/(?:[^~]|~0|~1)*$/,q=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function V(e,r){return'""'==e?r:(e+" + "+r).replace(/([^\\])' \+ '/g,"$1")}function M(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function W(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}var B=function(e){k.copy(e,this)};var Q=x((function(e){var r=e.exports=function(e,t,a){"function"==typeof t&&(a=t,t={}),function e(t,a,o,i,n,s,l,c,u,d){if(i&&"object"==typeof i&&!Array.isArray(i)){for(var p in a(i,n,s,l,c,u,d),i){var h=i[p];if(Array.isArray(h)){if(p in r.arrayKeywords)for(var m=0;m<h.length;m++)e(t,a,o,h[m],n+"/"+p+"/"+m,s,n,p,i,m)}else if(p in r.propsKeywords){if(h&&"object"==typeof h)for(var f in h)e(t,a,o,h[f],n+"/"+p+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),s,n,p,i,f)}else(p in r.keywords||t.allKeys&&!(p in r.skipKeywords))&&e(t,a,o,h,n+"/"+p,s,n,p,i)}o(i,n,s,l,c,u,d)}}(t,"function"==typeof(a=t.cb||a)?a:a.pre||function(){},a.post||function(){},e,"",e)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}})),U=H;function H(e,r,t){var a=this._refs[t];if("string"==typeof a){if(!this._refs[a])return H.call(this,e,r,a);a=this._refs[a]}if((a=a||this._schemas[t])instanceof B)return Y(a.schema,this._opts.inlineRefs)?a.schema:a.validate||this._compile(a);var o,i,n,s=K.call(this,r,t);return s&&(o=s.schema,r=s.root,n=s.baseId),o instanceof B?i=o.validate||e.call(this,o.schema,r,void 0,n):void 0!==o&&(i=Y(o,this._opts.inlineRefs)?o:e.call(this,o,r,void 0,n)),i}function K(e,r){var t=D.parse(r),a=re(t),o=ee(this._getId(e.schema));if(0===Object.keys(e.schema).length||a!==o){var i=ae(a),n=this._refs[i];if("string"==typeof n)return G.call(this,e,n,t);if(n instanceof B)n.validate||this._compile(n),e=n;else{if(!((n=this._schemas[i])instanceof B))return;if(n.validate||this._compile(n),i==ae(r))return{schema:n,root:e,baseId:o};e=n}if(!e.schema)return;o=ee(this._getId(e.schema))}return Z.call(this,t,o,e.schema,e)}function G(e,r,t){var a=K.call(this,e,r);if(a){var o=a.schema,i=a.baseId;e=a.root;var n=this._getId(o);return n&&(i=oe(i,n)),Z.call(this,t,i,o,e)}}H.normalizeId=ae,H.fullPath=ee,H.url=oe,H.ids=function(e){var r=ae(this._getId(e)),t={"":r},a={"":ee(r,!1)},o={},i=this;return Q(e,{allKeys:!0},(function(e,r,n,s,l,c,u){if(""!==r){var d=i._getId(e),p=t[s],h=a[s]+"/"+l;if(void 0!==u&&(h+="/"+("number"==typeof u?u:k.escapeFragment(u))),"string"==typeof d){d=p=ae(p?D.resolve(p,d):d);var m=i._refs[d];if("string"==typeof m&&(m=i._refs[m]),m&&m.schema){if(!$(e,m.schema))throw new Error('id "'+d+'" resolves to more than one schema')}else if(d!=ae(h))if("#"==d[0]){if(o[d]&&!$(e,o[d]))throw new Error('id "'+d+'" resolves to more than one schema');o[d]=e}else i._refs[d]=h}t[r]=p,a[r]=h}})),o},H.inlineRef=Y,H.schema=K;var J=k.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function Z(e,r,t,a){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var o=e.fragment.split("/"),i=1;i<o.length;i++){var n=o[i];if(n){if(void 0===(t=t[n=k.unescapeFragment(n)]))break;var s;if(!J[n]&&((s=this._getId(t))&&(r=oe(r,s)),t.$ref)){var l=oe(r,t.$ref),c=K.call(this,a,l);c&&(t=c.schema,a=c.root,r=c.baseId)}}}return void 0!==t&&t!==a.schema?{schema:t,root:a,baseId:r}:void 0}}var X=k.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function Y(e,r){return!1!==r&&(void 0===r||!0===r?function e(r){var t;if(Array.isArray(r)){for(var a=0;a<r.length;a++)if("object"==typeof(t=r[a])&&!e(t))return!1}else for(var o in r){if("$ref"==o)return!1;if("object"==typeof(t=r[o])&&!e(t))return!1}return!0}(e):r?function e(r){var t,a=0;if(Array.isArray(r)){for(var o=0;o<r.length;o++)if("object"==typeof(t=r[o])&&(a+=e(t)),a==1/0)return 1/0}else for(var i in r){if("$ref"==i)return 1/0;if(X[i])a++;else if("object"==typeof(t=r[i])&&(a+=e(t)+1),a==1/0)return 1/0}return a}(e)<=r:void 0)}function ee(e,r){return!1!==r&&(e=ae(e)),re(D.parse(e))}function re(e){return D.serialize(e).split("#")[0]+"#"}var te=/#\/?$/;function ae(e){return e?e.replace(te,""):""}function oe(e,r){return r=ae(r),D.resolve(e,r)}var ie={Validation:se((function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:se(ne)};function ne(e,r,t){this.message=t||ne.message(e,r),this.missingRef=U.url(e,r),this.missingSchema=U.normalizeId(U.fullPath(this.missingRef))}function se(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}ne.message=function(e,r){return"can't resolve reference "+r+" from id "+e};var le=function(e,r){r||(r={}),"function"==typeof r&&(r={cmp:r});var t,a="boolean"==typeof r.cycles&&r.cycles,o=r.cmp&&(t=r.cmp,function(e){return function(r,a){var o={key:r,value:e[r]},i={key:a,value:e[a]};return t(o,i)}}),i=[];return function e(r){if(r&&r.toJSON&&"function"==typeof r.toJSON&&(r=r.toJSON()),void 0!==r){if("number"==typeof r)return isFinite(r)?""+r:"null";if("object"!=typeof r)return JSON.stringify(r);var t,n;if(Array.isArray(r)){for(n="[",t=0;t<r.length;t++)t&&(n+=","),n+=e(r[t])||"null";return n+"]"}if(null===r)return"null";if(-1!==i.indexOf(r)){if(a)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=i.push(r)-1,l=Object.keys(r).sort(o&&o(r));for(n="",t=0;t<l.length;t++){var c=l[t],u=e(r[c]);u&&(n&&(n+=","),n+=JSON.stringify(c)+":"+u)}return i.splice(s,1),"{"+n+"}"}}(e)},ce=function(e,r,t){var a="",o=!0===e.schema.$async,i=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),n=e.self._getId(e.schema);if(e.opts.strictKeywords){var s=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(s){var l="unknown keyword: "+s;if("log"!==e.opts.strictKeywords)throw new Error(l);e.logger.warn(l)}}if(e.isTop&&(a+=" var validate = ",o&&(e.async=!0,a+="async "),a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",n&&(e.opts.sourceCode||e.opts.processCode)&&(a+=" /*# sourceURL="+n+" */ ")),"boolean"==typeof e.schema||!i&&!e.schema.$ref){var c=e.level,u=e.dataLevel,d=e.schema["false schema"],p=e.schemaPath+e.util.getProperty("false schema"),h=e.errSchemaPath+"/false schema",m=!e.opts.allErrors,f="data"+(u||""),v="valid"+c;if(!1===e.schema){e.isTop?m=!0:a+=" var "+v+" = false; ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'boolean schema is false' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";var g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?a+=o?" return data; ":" validate.errors = null; return true; ":a+=" var "+v+" = true; ";return e.isTop&&(a+=" }; return validate; "),a}if(e.isTop){var y=e.isTop;c=e.level=0,u=e.dataLevel=0,f="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var b="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}a+=" var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data; "}else{c=e.level,f="data"+((u=e.dataLevel)||"");if(n&&(e.baseId=e.resolve.url(e.baseId,n)),o&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+c+" = errors;"}v="valid"+c,m=!e.opts.allErrors;var P="",w="",E=e.schema.type,S=Array.isArray(E);if(E&&e.opts.nullable&&!0===e.schema.nullable&&(S?-1==E.indexOf("null")&&(E=E.concat("null")):"null"!=E&&(E=[E,"null"],S=!0)),S&&1==E.length&&(E=E[0],S=!1),e.schema.$ref&&i){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(i=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(a+=" "+e.RULES.all.$comment.code(e,"$comment")),E){if(e.opts.coerceTypes)var F=e.util.coerceToTypes(e.opts.coerceTypes,E);var x=e.RULES.types[E];if(F||S||!0===x||x&&!Z(x)){p=e.schemaPath+".type",h=e.errSchemaPath+"/type",p=e.schemaPath+".type",h=e.errSchemaPath+"/type";var O=S?"checkDataTypes":"checkDataType";if(a+=" if ("+e.util[O](E,f,e.opts.strictNumbers,!0)+") { ",F){var _="dataType"+c,D="coerced"+c;a+=" var "+_+" = typeof "+f+"; var "+D+" = undefined; ","array"==e.opts.coerceTypes&&(a+=" if ("+_+" == 'object' && Array.isArray("+f+") && "+f+".length == 1) { "+f+" = "+f+"[0]; "+_+" = typeof "+f+"; if ("+e.util.checkDataType(e.schema.type,f,e.opts.strictNumbers)+") "+D+" = "+f+"; } "),a+=" if ("+D+" !== undefined) ; ";var $=F;if($)for(var k,j=-1,I=$.length-1;j<I;)"string"==(k=$[j+=1])?a+=" else if ("+_+" == 'number' || "+_+" == 'boolean') "+D+" = '' + "+f+"; else if ("+f+" === null) "+D+" = ''; ":"number"==k||"integer"==k?(a+=" else if ("+_+" == 'boolean' || "+f+" === null || ("+_+" == 'string' && "+f+" && "+f+" == +"+f+" ","integer"==k&&(a+=" && !("+f+" % 1)"),a+=")) "+D+" = +"+f+"; "):"boolean"==k?a+=" else if ("+f+" === 'false' || "+f+" === 0 || "+f+" === null) "+D+" = false; else if ("+f+" === 'true' || "+f+" === 1) "+D+" = true; ":"null"==k?a+=" else if ("+f+" === '' || "+f+" === 0 || "+f+" === false) "+D+" = null; ":"array"==e.opts.coerceTypes&&"array"==k&&(a+=" else if ("+_+" == 'string' || "+_+" == 'number' || "+_+" == 'boolean' || "+f+" == null) "+D+" = ["+f+"]; ");a+=" else { ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } if ("+D+" !== undefined) { ";var A=u?"data"+(u-1||""):"parentData";a+=" "+f+" = "+D+"; ",u||(a+="if ("+A+" !== undefined)"),a+=" "+A+"["+(u?e.dataPathArr[u]:"parentDataProperty")+"] = "+D+"; } "}else{(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } "}}if(e.schema.$ref&&!i)a+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",m&&(a+=" } if (errors === ",a+=y?"0":"errs_"+c,a+=") { ",w+="}");else{var C=e.RULES;if(C)for(var R=-1,N=C.length-1;R<N;)if(Z(x=C[R+=1])){if(x.type&&(a+=" if ("+e.util.checkDataType(x.type,f,e.opts.strictNumbers)+") { "),e.opts.useDefaults)if("object"==x.type&&e.schema.properties){d=e.schema.properties;var L=Object.keys(d);if(L)for(var T,z=-1,q=L.length-1;z<q;){if(void 0!==(W=d[T=L[z+=1]]).default){var V=f+e.util.getProperty(T);if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+V;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+V+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+V+" === null || "+V+" === '' "),a+=" ) "+V+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(W.default)+" ":a+=" "+JSON.stringify(W.default)+" ",a+="; "}}}else if("array"==x.type&&Array.isArray(e.schema.items)){var M=e.schema.items;if(M){j=-1;for(var W,B=M.length-1;j<B;)if(void 0!==(W=M[j+=1]).default){V=f+"["+j+"]";if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+V;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+V+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+V+" === null || "+V+" === '' "),a+=" ) "+V+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(W.default)+" ":a+=" "+JSON.stringify(W.default)+" ",a+="; "}}}var Q=x.rules;if(Q)for(var U,H=-1,K=Q.length-1;H<K;)if(X(U=Q[H+=1])){var G=U.code(e,U.keyword,x.type);G&&(a+=" "+G+" ",m&&(P+="}"))}if(m&&(a+=" "+P+" ",P=""),x.type&&(a+=" } ",E&&E===x.type&&!F)){a+=" else { ";var J;p=e.schemaPath+".type",h=e.errSchemaPath+"/type";(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}m&&(a+=" if (errors === ",a+=y?"0":"errs_"+c,a+=") { ",w+="}")}}function Z(e){for(var r=e.rules,t=0;t<r.length;t++)if(X(r[t]))return!0}function X(r){return void 0!==e.schema[r.keyword]||r.implements&&function(r){for(var t=r.implements,a=0;a<t.length;a++)if(void 0!==e.schema[t[a]])return!0}(r)}return m&&(a+=" "+w+" "),y?(o?(a+=" if (errors === 0) return data; ",a+=" else throw new ValidationError(vErrors); "):(a+=" validate.errors = vErrors; ",a+=" return errors === 0; "),a+=" }; return validate;"):a+=" var "+v+" = errors === errs_"+c+";",a},ue=k.ucs2length,de=ie.Validation,pe=function e(r,t,a,o){var i=this,n=this._opts,s=[void 0],l={},c=[],u={},d=[],p={},h=[];t=t||{schema:r,refVal:s,refs:l};var m=he.call(this,r,t,o),f=this._compilations[m.index];if(m.compiling)return f.callValidate=function e(){var r=f.validate,t=r.apply(this,arguments);return e.errors=r.errors,t};var v=this._formats,g=this.RULES;try{var y=P(r,t,a,o);f.validate=y;var b=f.callValidate;return b&&(b.schema=y.schema,b.errors=null,b.refs=y.refs,b.refVal=y.refVal,b.root=y.root,b.$async=y.$async,n.sourceCode&&(b.source=y.source)),y}finally{me.call(this,r,t,o)}function P(r,a,o,u){var p=!a||a&&a.schema==r;if(a.schema!=t.schema)return e.call(i,r,a,o,u);var m,f=!0===r.$async,y=ce({isTop:!0,schema:r,isRoot:p,baseId:u,root:a,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:ie.MissingRef,RULES:g,validate:ce,util:k,resolve:U,resolveRef:w,usePattern:F,useDefault:x,useCustomRule:O,opts:n,formats:v,logger:i.logger,self:i});y=Pe(s,ye)+Pe(c,ve)+Pe(d,ge)+Pe(h,be)+y,n.processCode&&(y=n.processCode(y,r));try{m=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",y)(i,g,v,t,s,d,h,$,ue,de),s[0]=m}catch(e){throw i.logger.error("Error compiling schema, function code:",y),e}return m.schema=r,m.errors=null,m.refs=l,m.refVal=s,m.root=p?m:a,f&&(m.$async=!0),!0===n.sourceCode&&(m.source={code:y,patterns:c,defaults:d}),m}function w(r,o,c){o=U.url(r,o);var u,d,p=l[o];if(void 0!==p)return S(u=s[p],d="refVal["+p+"]");if(!c&&t.refs){var h=t.refs[o];if(void 0!==h)return S(u=t.refVal[h],d=E(o,u))}d=E(o);var m=U.call(i,P,t,o);if(void 0===m){var f=a&&a[o];f&&(m=U.inlineRef(f,n.inlineRefs)?f:e.call(i,f,t,a,r))}if(void 0!==m)return function(e,r){var t=l[e];s[t]=r}(o,m),S(m,d);!function(e){delete l[e]}(o)}function E(e,r){var t=s.length;return s[t]=r,l[e]=t,"refVal"+t}function S(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}function F(e){var r=u[e];return void 0===r&&(r=u[e]=c.length,c[r]=e),"pattern"+r}function x(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return k.toQuotedString(e);case"object":if(null===e)return"null";var r=le(e),t=p[r];return void 0===t&&(t=p[r]=d.length,d[t]=e),"default"+t}}function O(e,r,t,a){if(!1!==i._opts.validateSchema){var o=e.definition.dependencies;if(o&&!o.every((function(e){return Object.prototype.hasOwnProperty.call(t,e)})))throw new Error("parent schema must have all required keywords: "+o.join(","));var s=e.definition.validateSchema;if(s)if(!s(r)){var l="keyword schema is invalid: "+i.errorsText(s.errors);if("log"!=i._opts.validateSchema)throw new Error(l);i.logger.error(l)}}var c,u=e.definition.compile,d=e.definition.inline,p=e.definition.macro;if(u)c=u.call(i,r,t,a);else if(p)c=p.call(i,r,t,a),!1!==n.validateSchema&&i.validateSchema(c,!0);else if(d)c=d.call(i,a,e.keyword,r,t);else if(!(c=e.definition.validate))return;if(void 0===c)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var m=h.length;return h[m]=c,{code:"customRule"+m,validate:c}}};function he(e,r,t){var a=fe.call(this,e,r,t);return a>=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}function me(e,r,t){var a=fe.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}function fe(e,r,t){for(var a=0;a<this._compilations.length;a++){var o=this._compilations[a];if(o.schema==e&&o.root==r&&o.baseId==t)return a}return-1}function ve(e,r){return"var pattern"+e+" = new RegExp("+k.toQuotedString(r[e])+");"}function ge(e){return"var default"+e+" = defaults["+e+"];"}function ye(e,r){return void 0===r[e]?"":"var refVal"+e+" = refVal["+e+"];"}function be(e){return"var customRule"+e+" = customRules["+e+"];"}function Pe(e,r){if(!e.length)return"";for(var t="",a=0;a<e.length;a++)t+=r(a,e);return t}var we=x((function(e){var r=e.exports=function(){this._cache={}};r.prototype.put=function(e,r){this._cache[e]=r},r.prototype.get=function(e){return this._cache[e]},r.prototype.del=function(e){delete this._cache[e]},r.prototype.clear=function(){this._cache={}}})),Ee=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Se=[0,31,28,31,30,31,30,31,31,30,31,30,31],Fe=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,xe=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,Oe=/^(?:[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,_e=/^(?:(?:[^\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,De=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,$e=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,ke=/^(?:\/(?:[^~/]|~0|~1)*)*$/,je=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Ie=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,Ae=Ce;function Ce(e){return e="full"==e?"full":"fast",k.copy(Ce[e])}function Re(e){var r=e.match(Ee);if(!r)return!1;var t=+r[1],a=+r[2],o=+r[3];return a>=1&&a<=12&&o>=1&&o<=(2==a&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(t)?29:Se[a])}function Ne(e,r){var t=e.match(Fe);if(!t)return!1;var a=t[1],o=t[2],i=t[3],n=t[5];return(a<=23&&o<=59&&i<=59||23==a&&59==o&&60==i)&&(!r||n)}Ce.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":_e,url:De,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:xe,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:qe,uuid:$e,"json-pointer":ke,"json-pointer-uri-fragment":je,"relative-json-pointer":Ie},Ce.full={date:Re,time:Ne,"date-time":function(e){var r=e.split(Le);return 2==r.length&&Re(r[0])&&Ne(r[1],!0)},uri:function(e){return Te.test(e)&&Oe.test(e)},"uri-reference":/^(?:[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,"uri-template":_e,url:De,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:xe,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:qe,uuid:$e,"json-pointer":ke,"json-pointer-uri-fragment":je,"relative-json-pointer":Ie};var Le=/t|\s/i;var Te=/\/|:/;var ze=/[^\\]\\Z/;function qe(e){if(ze.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var Ve=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s;var h="maximum"==r,m=h?"exclusiveMaximum":"exclusiveMinimum",f=e.schema[m],v=e.opts.$data&&f&&f.$data,g=h?"<":">",y=h?">":"<",b=void 0;if(!p&&"number"!=typeof s&&void 0!==s)throw new Error(r+" must be number");if(!v&&void 0!==f&&"number"!=typeof f&&"boolean"!=typeof f)throw new Error(m+" must be number or boolean");if(v){var P=e.util.getData(f.$data,n,e.dataPathArr),w="exclusive"+i,E="exclType"+i,S="exclIsNumber"+i,F="' + "+(_="op"+i)+" + '";o+=" var schemaExcl"+i+" = "+P+"; ",o+=" var "+w+"; var "+E+" = typeof "+(P="schemaExcl"+i)+"; if ("+E+" != 'boolean' && "+E+" != 'undefined' && "+E+" != 'number') { ";var x;b=m;(x=x||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(o+=" , message: '"+m+" should be boolean' "),e.opts.verbose&&(o+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var O=o;o=x.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+E+" == 'number' ? ( ("+w+" = "+a+" === undefined || "+P+" "+g+"= "+a+") ? "+d+" "+y+"= "+P+" : "+d+" "+y+" "+a+" ) : ( ("+w+" = "+P+" === true) ? "+d+" "+y+"= "+a+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { var op"+i+" = "+w+" ? '"+g+"' : '"+g+"='; ",void 0===s&&(b=m,c=e.errSchemaPath+"/"+m,a=P,p=v)}else{F=g;if((S="number"==typeof f)&&p){var _="'"+F+"'";o+=" if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" ( "+a+" === undefined || "+f+" "+g+"= "+a+" ? "+d+" "+y+"= "+f+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { "}else{S&&void 0===s?(w=!0,b=m,c=e.errSchemaPath+"/"+m,a=f,y+="="):(S&&(a=Math[h?"min":"max"](f,s)),f===(!S||a)?(w=!0,b=m,c=e.errSchemaPath+"/"+m,y+="="):(w=!1,F+="="));_="'"+F+"'";o+=" if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+" "+y+" "+a+" || "+d+" !== "+d+") { "}}b=b||r,(x=x||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+_+", limit: "+a+", exclusive: "+w+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be "+F+" ",o+=p?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";O=o;return o=x.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",u&&(o+=" else { "),o},Me=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+".length "+("maxItems"==r?">":"<")+" "+a+") { ";var h=r,m=m||[];m.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(h||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxItems"==r?"more":"fewer",o+=" than ",o+=p?"' + "+a+" + '":""+s,o+=" items' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=m.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},We=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");var h="maxLength"==r?">":"<";o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),!1===e.opts.unicode?o+=" "+d+".length ":o+=" ucs2length("+d+") ",o+=" "+h+" "+a+") { ";var m=r,f=f||[];f.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(m||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT be ",o+="maxLength"==r?"longer":"shorter",o+=" than ",o+=p?"' + "+a+" + '":""+s,o+=" characters' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var v=o;return o=f.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+v+"]); ":o+=" validate.errors = ["+v+"]; return false; ":o+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},Be=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" Object.keys("+d+").length "+("maxProperties"==r?">":"<")+" "+a+") { ";var h=r,m=m||[];m.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(h||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxProperties"==r?"more":"fewer",o+=" than ",o+=p?"' + "+a+" + '":""+s,o+=" properties' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=m.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},Qe={$ref:function(e,r,t){var a,o,i=" ",n=e.level,s=e.dataLevel,l=e.schema[r],c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(s||""),p="valid"+n;if("#"==l||"#/"==l)e.isRoot?(a=e.async,o="validate"):(a=!0===e.root.schema.$async,o="root.refVal[0]");else{var h=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===h){var m=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(m),(y=y||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(i+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(i+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var f=i;i=y.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+f+"]); ":i+=" validate.errors = ["+f+"]; return false; ":i+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(i+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,l,m);e.logger.warn(m),u&&(i+=" if (true) { ")}}else if(h.inline){var v=e.util.copy(e);v.level++;var g="valid"+v.level;v.schema=h.schema,v.schemaPath="",v.errSchemaPath=l,i+=" "+e.validate(v).replace(/validate\.schema/g,h.code)+" ",u&&(i+=" if ("+g+") { ")}else a=!0===h.$async||e.async&&!1!==h.$async,o=h.code}if(o){var y;(y=y||[]).push(i),i="",e.opts.passContext?i+=" "+o+".call(this, ":i+=" "+o+"( ",i+=" "+d+", (dataPath || '')",'""'!=e.errorPath&&(i+=" + "+e.errorPath);var b=i+=" , "+(s?"data"+(s-1||""):"parentData")+" , "+(s?e.dataPathArr[s]:"parentDataProperty")+", rootData) ";if(i=y.pop(),a){if(!e.async)throw new Error("async schema referenced by sync schema");u&&(i+=" var "+p+"; "),i+=" try { await "+b+"; ",u&&(i+=" "+p+" = true; "),i+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",u&&(i+=" "+p+" = false; "),i+=" } ",u&&(i+=" if ("+p+") { ")}else i+=" if (!"+b+") { if (vErrors === null) vErrors = "+o+".errors; else vErrors = vErrors.concat("+o+".errors); errors = vErrors.length; } ",u&&(i+=" else { ")}return i},allOf:function(e,r,t){var a=" ",o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,s=!e.opts.allErrors,l=e.util.copy(e),c="";l.level++;var u="valid"+l.level,d=l.baseId,p=!0,h=o;if(h)for(var m,f=-1,v=h.length-1;f<v;)m=h[f+=1],(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0||!1===m:e.util.schemaHasRules(m,e.RULES.all))&&(p=!1,l.schema=m,l.schemaPath=i+"["+f+"]",l.errSchemaPath=n+"/"+f,a+=" "+e.validate(l)+" ",l.baseId=d,s&&(a+=" if ("+u+") { ",c+="}"));return s&&(a+=p?" if (true) { ":" "+c.slice(0,-1)+" "),a},anyOf:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e),m="";h.level++;var f="valid"+h.level;if(n.every((function(r){return e.opts.strictKeywords?"object"==typeof r&&Object.keys(r).length>0||!1===r:e.util.schemaHasRules(r,e.RULES.all)}))){var v=h.baseId;a+=" var "+p+" = errors; var "+d+" = false; ";var g=e.compositeRule;e.compositeRule=h.compositeRule=!0;var y=n;if(y)for(var b,P=-1,w=y.length-1;P<w;)b=y[P+=1],h.schema=b,h.schemaPath=s+"["+P+"]",h.errSchemaPath=l+"/"+P,a+=" "+e.validate(h)+" ",h.baseId=v,a+=" "+d+" = "+d+" || "+f+"; if (!"+d+") { ",m+="}";e.compositeRule=h.compositeRule=g,a+=" "+m+" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else c&&(a+=" if (true) { ");return a},$comment:function(e,r,t){var a=" ",o=e.schema[r],i=e.errSchemaPath+"/"+r;e.opts.allErrors;var n=e.util.toQuotedString(o);return!0===e.opts.$comment?a+=" console.log("+n+");":"function"==typeof e.opts.$comment&&(a+=" self._opts.$comment("+n+", "+e.util.toQuotedString(i)+", validate.root.schema);"),a},const:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p=e.opts.$data&&n&&n.$data;p&&(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; "),p||(a+=" var schema"+o+" = validate.schema"+s+";"),a+="var "+d+" = equal("+u+", schema"+o+"); if (!"+d+") { ";var h=h||[];h.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValue: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var m=a;return a=h.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+m+"]); ":a+=" validate.errors = ["+m+"]; return false; ":a+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",c&&(a+=" else { "),a},contains:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e);h.level++;var m="valid"+h.level,f="i"+o,v=h.dataLevel=e.dataLevel+1,g="data"+v,y=e.baseId,b=e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all);if(a+="var "+p+" = errors;var "+d+";",b){var P=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.schema=n,h.schemaPath=s,h.errSchemaPath=l,a+=" var "+m+" = false; for (var "+f+" = 0; "+f+" < "+u+".length; "+f+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers,!0);var w=u+"["+f+"]";h.dataPathArr[v]=f;var E=e.validate(h);h.baseId=y,e.util.varOccurences(E,g)<2?a+=" "+e.util.varReplace(E,g,w)+" ":a+=" var "+g+" = "+w+"; "+E+" ",a+=" if ("+m+") break; } ",e.compositeRule=h.compositeRule=P,a+=" if (!"+m+") {"}else a+=" if ("+u+".length == 0) {";var S=S||[];S.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should contain a valid item' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var F=a;return a=S.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+F+"]); ":a+=" validate.errors = ["+F+"]; return false; ":a+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",b&&(a+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a},dependencies:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e),h="";p.level++;var m="valid"+p.level,f={},v={},g=e.opts.ownProperties;for(w in n)if("__proto__"!=w){var y=n[w],b=Array.isArray(y)?v:f;b[w]=y}a+="var "+d+" = errors;";var P=e.errorPath;for(var w in a+="var missing"+o+";",v)if((b=v[w]).length){if(a+=" if ( "+u+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),c){a+=" && ( ";var E=b;if(E)for(var S=-1,F=E.length-1;S<F;){k=E[S+=1],S&&(a+=" || "),a+=" ( ( "+(C=u+(A=e.util.getProperty(k)))+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(k)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?k:A)+") ) "}a+=")) { ";var x="missing"+o,O="' + "+x+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,x,!0):P+" + "+x);var _=_||[];_.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var D=a;a=_.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+D+"]); ":a+=" validate.errors = ["+D+"]; return false; ":a+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{a+=" ) { ";var $=b;if($)for(var k,j=-1,I=$.length-1;j<I;){k=$[j+=1];var A=e.util.getProperty(k),C=(O=e.util.escapeQuotes(k),u+A);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,k,e.opts.jsonPointers)),a+=" if ( "+C+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(k)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",c&&(h+="}",a+=" else { ")}e.errorPath=P;var R=p.baseId;for(var w in f){y=f[w];(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all))&&(a+=" "+m+" = true; if ( "+u+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),a+=") { ",p.schema=y,p.schemaPath=s+e.util.getProperty(w),p.errSchemaPath=l+"/"+e.util.escapeFragment(w),a+=" "+e.validate(p)+" ",p.baseId=R,a+=" } ",c&&(a+=" if ("+m+") { ",h+="}"))}return c&&(a+=" "+h+" if ("+d+" == errors) {"),a},enum:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p=e.opts.$data&&n&&n.$data;p&&(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ");var h="i"+o,m="schema"+o;p||(a+=" var "+m+" = validate.schema"+s+";"),a+="var "+d+";",p&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=d+" = false;for (var "+h+"=0; "+h+"<"+m+".length; "+h+"++) if (equal("+u+", "+m+"["+h+"])) { "+d+" = true; break; }",p&&(a+=" } "),a+=" if (!"+d+") { ";var f=f||[];f.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var v=a;return a=f.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+v+"]); ":a+=" validate.errors = ["+v+"]; return false; ":a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",c&&(a+=" else { "),a},format:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||"");if(!1===e.opts.format)return c&&(a+=" if (true) { "),a;var d,p=e.opts.$data&&n&&n.$data;p?(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",d="schema"+o):d=n;var h=e.opts.unknownFormats,m=Array.isArray(h);if(p){a+=" var "+(f="format"+o)+" = formats["+d+"]; var "+(v="isObject"+o)+" = typeof "+f+" == 'object' && !("+f+" instanceof RegExp) && "+f+".validate; var "+(g="formatType"+o)+" = "+v+" && "+f+".type || 'string'; if ("+v+") { ",e.async&&(a+=" var async"+o+" = "+f+".async; "),a+=" "+f+" = "+f+".validate; } if ( ",p&&(a+=" ("+d+" !== undefined && typeof "+d+" != 'string') || "),a+=" (","ignore"!=h&&(a+=" ("+d+" && !"+f+" ",m&&(a+=" && self._opts.unknownFormats.indexOf("+d+") == -1 "),a+=") || "),a+=" ("+f+" && "+g+" == '"+t+"' && !(typeof "+f+" == 'function' ? ",e.async?a+=" (async"+o+" ? await "+f+"("+u+") : "+f+"("+u+")) ":a+=" "+f+"("+u+") ",a+=" : "+f+".test("+u+"))))) {"}else{var f;if(!(f=e.formats[n])){if("ignore"==h)return e.logger.warn('unknown format "'+n+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(a+=" if (true) { "),a;if(m&&h.indexOf(n)>=0)return c&&(a+=" if (true) { "),a;throw new Error('unknown format "'+n+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,g=(v="object"==typeof f&&!(f instanceof RegExp)&&f.validate)&&f.type||"string";if(v){var y=!0===f.async;f=f.validate}if(g!=t)return c&&(a+=" if (true) { "),a;if(y){if(!e.async)throw new Error("async format in sync schema");a+=" if (!(await "+(b="formats"+e.util.getProperty(n)+".validate")+"("+u+"))) { "}else{a+=" if (! ";var b="formats"+e.util.getProperty(n);v&&(b+=".validate"),a+="function"==typeof f?" "+b+"("+u+") ":" "+b+".test("+u+") ",a+=") { "}}var P=P||[];P.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",a+=p?""+d:""+e.util.toQuotedString(n),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",a+=p?"' + "+d+" + '":""+e.util.escapeQuotes(n),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=p?"validate.schema"+s:""+e.util.toQuotedString(n),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var w=a;return a=P.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",c&&(a+=" else { "),a},if:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e);h.level++;var m="valid"+h.level,f=e.schema.then,v=e.schema.else,g=void 0!==f&&(e.opts.strictKeywords?"object"==typeof f&&Object.keys(f).length>0||!1===f:e.util.schemaHasRules(f,e.RULES.all)),y=void 0!==v&&(e.opts.strictKeywords?"object"==typeof v&&Object.keys(v).length>0||!1===v:e.util.schemaHasRules(v,e.RULES.all)),b=h.baseId;if(g||y){var P;h.createErrors=!1,h.schema=n,h.schemaPath=s,h.errSchemaPath=l,a+=" var "+p+" = errors; var "+d+" = true; ";var w=e.compositeRule;e.compositeRule=h.compositeRule=!0,a+=" "+e.validate(h)+" ",h.baseId=b,h.createErrors=!0,a+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",e.compositeRule=h.compositeRule=w,g?(a+=" if ("+m+") { ",h.schema=e.schema.then,h.schemaPath=e.schemaPath+".then",h.errSchemaPath=e.errSchemaPath+"/then",a+=" "+e.validate(h)+" ",h.baseId=b,a+=" "+d+" = "+m+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'then'; ":P="'then'",a+=" } ",y&&(a+=" else { ")):a+=" if (!"+m+") { ",y&&(h.schema=e.schema.else,h.schemaPath=e.schemaPath+".else",h.errSchemaPath=e.errSchemaPath+"/else",a+=" "+e.validate(h)+" ",h.baseId=b,a+=" "+d+" = "+m+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'else'; ":P="'else'",a+=" } "),a+=" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+P+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match \"' + "+P+" + '\" schema' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",c&&(a+=" else { ")}else c&&(a+=" if (true) { ");return a},items:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e),m="";h.level++;var f="valid"+h.level,v="i"+o,g=h.dataLevel=e.dataLevel+1,y="data"+g,b=e.baseId;if(a+="var "+p+" = errors;var "+d+";",Array.isArray(n)){var P=e.schema.additionalItems;if(!1===P){a+=" "+d+" = "+u+".length <= "+n.length+"; ";var w=l;l=e.errSchemaPath+"/additionalItems",a+=" if (!"+d+") { ";var E=E||[];E.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+n.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+n.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var S=a;a=E.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",l=w,c&&(m+="}",a+=" else { ")}var F=n;if(F)for(var x,O=-1,_=F.length-1;O<_;)if(x=F[O+=1],e.opts.strictKeywords?"object"==typeof x&&Object.keys(x).length>0||!1===x:e.util.schemaHasRules(x,e.RULES.all)){a+=" "+f+" = true; if ("+u+".length > "+O+") { ";var D=u+"["+O+"]";h.schema=x,h.schemaPath=s+"["+O+"]",h.errSchemaPath=l+"/"+O,h.errorPath=e.util.getPathExpr(e.errorPath,O,e.opts.jsonPointers,!0),h.dataPathArr[g]=O;var $=e.validate(h);h.baseId=b,e.util.varOccurences($,y)<2?a+=" "+e.util.varReplace($,y,D)+" ":a+=" var "+y+" = "+D+"; "+$+" ",a+=" } ",c&&(a+=" if ("+f+") { ",m+="}")}if("object"==typeof P&&(e.opts.strictKeywords?"object"==typeof P&&Object.keys(P).length>0||!1===P:e.util.schemaHasRules(P,e.RULES.all))){h.schema=P,h.schemaPath=e.schemaPath+".additionalItems",h.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+f+" = true; if ("+u+".length > "+n.length+") { for (var "+v+" = "+n.length+"; "+v+" < "+u+".length; "+v+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=u+"["+v+"]";h.dataPathArr[g]=v;$=e.validate(h);h.baseId=b,e.util.varOccurences($,y)<2?a+=" "+e.util.varReplace($,y,D)+" ":a+=" var "+y+" = "+D+"; "+$+" ",c&&(a+=" if (!"+f+") break; "),a+=" } } ",c&&(a+=" if ("+f+") { ",m+="}")}}else if(e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all)){h.schema=n,h.schemaPath=s,h.errSchemaPath=l,a+=" for (var "+v+" = 0; "+v+" < "+u+".length; "+v+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=u+"["+v+"]";h.dataPathArr[g]=v;$=e.validate(h);h.baseId=b,e.util.varOccurences($,y)<2?a+=" "+e.util.varReplace($,y,D)+" ":a+=" var "+y+" = "+D+"; "+$+" ",c&&(a+=" if (!"+f+") break; "),a+=" }"}return c&&(a+=" "+m+" if ("+p+" == errors) {"),a},maximum:Ve,minimum:Ve,maxItems:Me,minItems:Me,maxLength:We,minLength:We,maxProperties:Be,minProperties:Be,multipleOf:function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");o+="var division"+i+";if (",p&&(o+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),o+=" (division"+i+" = "+d+" / "+a+", ",e.opts.multipleOfPrecision?o+=" Math.abs(Math.round(division"+i+") - division"+i+") > 1e-"+e.opts.multipleOfPrecision+" ":o+=" division"+i+" !== parseInt(division"+i+") ",o+=" ) ",p&&(o+=" ) "),o+=" ) { ";var h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be multiple of ",o+=p?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var m=o;return o=h.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},not:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level;if(e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all)){p.schema=n,p.schemaPath=s,p.errSchemaPath=l,a+=" var "+d+" = errors; ";var m,f=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.createErrors=!1,p.opts.allErrors&&(m=p.opts.allErrors,p.opts.allErrors=!1),a+=" "+e.validate(p)+" ",p.createErrors=!0,m&&(p.opts.allErrors=m),e.compositeRule=p.compositeRule=f,a+=" if ("+h+") { ";var v=v||[];v.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var g=a;a=v.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(a+=" if (false) { ");return a},oneOf:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e),m="";h.level++;var f="valid"+h.level,v=h.baseId,g="prevValid"+o,y="passingSchemas"+o;a+="var "+p+" = errors , "+g+" = false , "+d+" = false , "+y+" = null; ";var b=e.compositeRule;e.compositeRule=h.compositeRule=!0;var P=n;if(P)for(var w,E=-1,S=P.length-1;E<S;)w=P[E+=1],(e.opts.strictKeywords?"object"==typeof w&&Object.keys(w).length>0||!1===w:e.util.schemaHasRules(w,e.RULES.all))?(h.schema=w,h.schemaPath=s+"["+E+"]",h.errSchemaPath=l+"/"+E,a+=" "+e.validate(h)+" ",h.baseId=v):a+=" var "+f+" = true; ",E&&(a+=" if ("+f+" && "+g+") { "+d+" = false; "+y+" = ["+y+", "+E+"]; } else { ",m+="}"),a+=" if ("+f+") { "+d+" = "+g+" = true; "+y+" = "+E+"; }";return e.compositeRule=h.compositeRule=b,a+=m+"if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a},pattern:function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'string') || "),o+=" !"+(p?"(new RegExp("+a+"))":e.usePattern(s))+".test("+d+") ) { ";var h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { pattern: ",o+=p?""+a:""+e.util.toQuotedString(s),o+=" } ",!1!==e.opts.messages&&(o+=" , message: 'should match pattern \"",o+=p?"' + "+a+" + '":""+e.util.escapeQuotes(s),o+="\"' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+e.util.toQuotedString(s),o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var m=o;return o=h.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},properties:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e),h="";p.level++;var m="valid"+p.level,f="key"+o,v="idx"+o,g=p.dataLevel=e.dataLevel+1,y="data"+g,b="dataProperties"+o,P=Object.keys(n||{}).filter(A),w=e.schema.patternProperties||{},E=Object.keys(w).filter(A),S=e.schema.additionalProperties,F=P.length||E.length,x=!1===S,O="object"==typeof S&&Object.keys(S).length,_=e.opts.removeAdditional,D=x||O||_,$=e.opts.ownProperties,k=e.baseId,j=e.schema.required;if(j&&(!e.opts.$data||!j.$data)&&j.length<e.opts.loopRequired)var I=e.util.toHash(j);function A(e){return"__proto__"!==e}if(a+="var "+d+" = errors;var "+m+" = true;",$&&(a+=" var "+b+" = undefined;"),D){if(a+=$?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+u+") { ",F){if(a+=" var isAdditional"+o+" = !(false ",P.length)if(P.length>8)a+=" || validate.schema"+s+".hasOwnProperty("+f+") ";else{var C=P;if(C)for(var R=-1,N=C.length-1;R<N;)G=C[R+=1],a+=" || "+f+" == "+e.util.toQuotedString(G)+" "}if(E.length){var L=E;if(L)for(var T=-1,z=L.length-1;T<z;)ie=L[T+=1],a+=" || "+e.usePattern(ie)+".test("+f+") "}a+=" ); if (isAdditional"+o+") { "}if("all"==_)a+=" delete "+u+"["+f+"]; ";else{var q=e.errorPath,V="' + "+f+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers)),x)if(_)a+=" delete "+u+"["+f+"]; ";else{a+=" "+m+" = false; ";var M=l;l=e.errSchemaPath+"/additionalProperties",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { additionalProperty: '"+V+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is an invalid additional property":a+="should NOT have additional properties",a+="' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var W=a;a=te.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+W+"]); ":a+=" validate.errors = ["+W+"]; return false; ":a+=" var err = "+W+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=M,c&&(a+=" break; ")}else if(O)if("failing"==_){a+=" var "+d+" = errors; ";var B=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=S,p.schemaPath=e.schemaPath+".additionalProperties",p.errSchemaPath=e.errSchemaPath+"/additionalProperties",p.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);var Q=u+"["+f+"]";p.dataPathArr[g]=f;var U=e.validate(p);p.baseId=k,e.util.varOccurences(U,y)<2?a+=" "+e.util.varReplace(U,y,Q)+" ":a+=" var "+y+" = "+Q+"; "+U+" ",a+=" if (!"+m+") { errors = "+d+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+u+"["+f+"]; } ",e.compositeRule=p.compositeRule=B}else{p.schema=S,p.schemaPath=e.schemaPath+".additionalProperties",p.errSchemaPath=e.errSchemaPath+"/additionalProperties",p.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);Q=u+"["+f+"]";p.dataPathArr[g]=f;U=e.validate(p);p.baseId=k,e.util.varOccurences(U,y)<2?a+=" "+e.util.varReplace(U,y,Q)+" ":a+=" var "+y+" = "+Q+"; "+U+" ",c&&(a+=" if (!"+m+") break; ")}e.errorPath=q}F&&(a+=" } "),a+=" } ",c&&(a+=" if ("+m+") { ",h+="}")}var H=e.opts.useDefaults&&!e.compositeRule;if(P.length){var K=P;if(K)for(var G,J=-1,Z=K.length-1;J<Z;){var X=n[G=K[J+=1]];if(e.opts.strictKeywords?"object"==typeof X&&Object.keys(X).length>0||!1===X:e.util.schemaHasRules(X,e.RULES.all)){var Y=e.util.getProperty(G),ee=(Q=u+Y,H&&void 0!==X.default);p.schema=X,p.schemaPath=s+Y,p.errSchemaPath=l+"/"+e.util.escapeFragment(G),p.errorPath=e.util.getPath(e.errorPath,G,e.opts.jsonPointers),p.dataPathArr[g]=e.util.toQuotedString(G);U=e.validate(p);if(p.baseId=k,e.util.varOccurences(U,y)<2){U=e.util.varReplace(U,y,Q);var re=Q}else{re=y;a+=" var "+y+" = "+Q+"; "}if(ee)a+=" "+U+" ";else{if(I&&I[G]){a+=" if ( "+re+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+m+" = false; ";q=e.errorPath,M=l;var te,ae=e.util.escapeQuotes(G);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(q,G,e.opts.jsonPointers)),l=e.errSchemaPath+"/required",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+ae+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+ae+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";W=a;a=te.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+W+"]); ":a+=" validate.errors = ["+W+"]; return false; ":a+=" var err = "+W+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=M,e.errorPath=q,a+=" } else { "}else c?(a+=" if ( "+re+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+m+" = true; } else { "):(a+=" if ("+re+" !== undefined ",$&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=" ) { ");a+=" "+U+" } "}}c&&(a+=" if ("+m+") { ",h+="}")}}if(E.length){var oe=E;if(oe)for(var ie,ne=-1,se=oe.length-1;ne<se;){X=w[ie=oe[ne+=1]];if(e.opts.strictKeywords?"object"==typeof X&&Object.keys(X).length>0||!1===X:e.util.schemaHasRules(X,e.RULES.all)){p.schema=X,p.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(ie),p.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(ie),a+=$?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+u+") { ",a+=" if ("+e.usePattern(ie)+".test("+f+")) { ",p.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);Q=u+"["+f+"]";p.dataPathArr[g]=f;U=e.validate(p);p.baseId=k,e.util.varOccurences(U,y)<2?a+=" "+e.util.varReplace(U,y,Q)+" ":a+=" var "+y+" = "+Q+"; "+U+" ",c&&(a+=" if (!"+m+") break; "),a+=" } ",c&&(a+=" else "+m+" = true; "),a+=" } ",c&&(a+=" if ("+m+") { ",h+="}")}}}return c&&(a+=" "+h+" if ("+d+" == errors) {"),a},propertyNames:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level;if(a+="var "+d+" = errors;",e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all)){p.schema=n,p.schemaPath=s,p.errSchemaPath=l;var m="key"+o,f="idx"+o,v="i"+o,g="' + "+m+" + '",y="data"+(p.dataLevel=e.dataLevel+1),b="dataProperties"+o,P=e.opts.ownProperties,w=e.baseId;P&&(a+=" var "+b+" = undefined; "),a+=P?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+f+"=0; "+f+"<"+b+".length; "+f+"++) { var "+m+" = "+b+"["+f+"]; ":" for (var "+m+" in "+u+") { ",a+=" var startErrs"+o+" = errors; ";var E=m,S=e.compositeRule;e.compositeRule=p.compositeRule=!0;var F=e.validate(p);p.baseId=w,e.util.varOccurences(F,y)<2?a+=" "+e.util.varReplace(F,y,E)+" ":a+=" var "+y+" = "+E+"; "+F+" ",e.compositeRule=p.compositeRule=S,a+=" if (!"+h+") { for (var "+v+"=startErrs"+o+"; "+v+"<errors; "+v+"++) { vErrors["+v+"].propertyName = "+m+"; } var err = ",!1!==e.createErrors?(a+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { propertyName: '"+g+"' } ",!1!==e.opts.messages&&(a+=" , message: 'property name \\'"+g+"\\' is invalid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),c&&(a+=" break; "),a+=" } }"}return c&&(a+=" if ("+d+" == errors) {"),a},required:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p=e.opts.$data&&n&&n.$data;p&&(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ");var h="schema"+o;if(!p)if(n.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var m=[],f=n;if(f)for(var v,g=-1,y=f.length-1;g<y;){v=f[g+=1];var b=e.schema.properties[v];b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0||!1===b:e.util.schemaHasRules(b,e.RULES.all))||(m[m.length]=v)}}else m=n;if(p||m.length){var P=e.errorPath,w=p||m.length>=e.opts.loopRequired,E=e.opts.ownProperties;if(c)if(a+=" var missing"+o+"; ",w){p||(a+=" var "+h+" = validate.schema"+s+"; ");var S="' + "+($="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,$,e.opts.jsonPointers)),a+=" var "+d+" = true; ",p&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=" for (var "+O+" = 0; "+O+" < "+h+".length; "+O+"++) { "+d+" = "+u+"["+h+"["+O+"]] !== undefined ",E&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", "+h+"["+O+"]) "),a+="; if (!"+d+") break; } ",p&&(a+=" } "),a+=" if (!"+d+") { ",(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var F=a;a=D.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+F+"]); ":a+=" validate.errors = ["+F+"]; return false; ":a+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var x=m;if(x)for(var O=-1,_=x.length-1;O<_;){j=x[O+=1],O&&(a+=" || "),a+=" ( ( "+(R=u+(C=e.util.getProperty(j)))+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(j)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?j:C)+") ) "}a+=") { ";var D;S="' + "+($="missing"+o)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,$,!0):P+" + "+$),(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";F=a;a=D.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+F+"]); ":a+=" validate.errors = ["+F+"]; return false; ":a+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(w){p||(a+=" var "+h+" = validate.schema"+s+"; ");var $;S="' + "+($="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,$,e.opts.jsonPointers)),p&&(a+=" if ("+h+" && !Array.isArray("+h+")) { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+h+" !== undefined) { "),a+=" for (var "+O+" = 0; "+O+" < "+h+".length; "+O+"++) { if ("+u+"["+h+"["+O+"]] === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", "+h+"["+O+"]) "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",p&&(a+=" } ")}else{var k=m;if(k)for(var j,I=-1,A=k.length-1;I<A;){j=k[I+=1];var C=e.util.getProperty(j),R=(S=e.util.escapeQuotes(j),u+C);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,j,e.opts.jsonPointers)),a+=" if ( "+R+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(j)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=P}else c&&(a+=" if (true) {");return a},uniqueItems:function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p="valid"+i,h=e.opts.$data&&s&&s.$data;if(h?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,(s||h)&&!1!==e.opts.uniqueItems){h&&(o+=" var "+p+"; if ("+a+" === false || "+a+" === undefined) "+p+" = true; else if (typeof "+a+" != 'boolean') "+p+" = false; else { "),o+=" var i = "+d+".length , "+p+" = true , j; if (i > 1) { ";var m=e.schema.items&&e.schema.items.type,f=Array.isArray(m);if(!m||"object"==m||"array"==m||f&&(m.indexOf("object")>=0||m.indexOf("array")>=0))o+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+d+"[i], "+d+"[j])) { "+p+" = false; break outer; } } } ";else{o+=" var itemIndices = {}, item; for (;i--;) { var item = "+d+"[i]; ";var v="checkDataType"+(f?"s":"");o+=" if ("+e.util[v](m,"item",e.opts.strictNumbers,!0)+") continue; ",f&&(o+=" if (typeof item == 'string') item = '\"' + item; "),o+=" if (typeof itemIndices[item] == 'number') { "+p+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}o+=" } ",h&&(o+=" } "),o+=" if (!"+p+") { ";var g=g||[];g.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(o+=" , schema: ",o+=h?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var y=o;o=g.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+y+"]); ":o+=" validate.errors = ["+y+"]; return false; ":o+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",u&&(o+=" else { ")}else u&&(o+=" if (true) { ");return o},validate:ce},Ue=k.toHash,He=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"],Ke=function(e,r){for(var t=0;t<r.length;t++){e=JSON.parse(JSON.stringify(e));var a,o=r[t].split("/"),i=e;for(a=1;a<o.length;a++)i=i[o[a]];for(a=0;a<He.length;a++){var n=He[a],s=i[n];s&&(i[n]={anyOf:[s,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e},Ge=ie.MissingRef,Je=function e(r,t,a){var o=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof t&&(a=t,t=void 0);var i=n(r).then((function(){var e=o._addSchema(r,void 0,t);return e.validate||function e(r){try{return o._compile(r)}catch(e){if(e instanceof Ge)return a(e);throw e}function a(a){var i=a.missingSchema;if(c(i))throw new Error("Schema "+i+" is loaded but "+a.missingRef+" cannot be resolved");var s=o._loadingSchemas[i];return s||(s=o._loadingSchemas[i]=o._opts.loadSchema(i)).then(l,l),s.then((function(e){if(!c(i))return n(e).then((function(){c(i)||o.addSchema(e,i,void 0,t)}))})).then((function(){return e(r)}));function l(){delete o._loadingSchemas[i]}function c(e){return o._refs[e]||o._schemas[e]}}}(e)}));a&&i.then((function(e){a(null,e)}),a);return i;function n(r){var t=r.$schema;return t&&!o.getSchema(t)?e.call(o,{$ref:t},!0):Promise.resolve()}};var Ze=function(e,r,t){var a,o,i=" ",n=e.level,s=e.dataLevel,l=e.schema[r],c=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,d=!e.opts.allErrors,p="data"+(s||""),h="valid"+n,m="errs__"+n,f=e.opts.$data&&l&&l.$data;f?(i+=" var schema"+n+" = "+e.util.getData(l.$data,s,e.dataPathArr)+"; ",o="schema"+n):o=l;var v,g,y,b,P,w="definition"+n,E=this.definition,S="";if(f&&E.$data){P="keywordValidate"+n;var F=E.validateSchema;i+=" var "+w+" = RULES.custom['"+r+"'].definition; var "+P+" = "+w+".validate;"}else{if(!(b=e.useCustomRule(this,l,e.schema,e)))return;o="validate.schema"+c,P=b.code,v=E.compile,g=E.inline,y=E.macro}var x=P+".errors",O="i"+n,_="ruleErr"+n,D=E.async;if(D&&!e.async)throw new Error("async keyword in sync schema");if(g||y||(i+=x+" = null;"),i+="var "+m+" = errors;var "+h+";",f&&E.$data&&(S+="}",i+=" if ("+o+" === undefined) { "+h+" = true; } else { ",F&&(S+="}",i+=" "+h+" = "+w+".validateSchema("+o+"); if ("+h+") { ")),g)E.statements?i+=" "+b.validate+" ":i+=" "+h+" = "+b.validate+"; ";else if(y){var $=e.util.copy(e);S="";$.level++;var k="valid"+$.level;$.schema=b.validate,$.schemaPath="";var j=e.compositeRule;e.compositeRule=$.compositeRule=!0;var I=e.validate($).replace(/validate\.schema/g,P);e.compositeRule=$.compositeRule=j,i+=" "+I}else{(N=N||[]).push(i),i="",i+=" "+P+".call( ",e.opts.passContext?i+="this":i+="self",v||!1===E.schema?i+=" , "+p+" ":i+=" , "+o+" , "+p+" , validate.schema"+e.schemaPath+" ",i+=" , (dataPath || '')",'""'!=e.errorPath&&(i+=" + "+e.errorPath);var A=s?"data"+(s-1||""):"parentData",C=s?e.dataPathArr[s]:"parentDataProperty",R=i+=" , "+A+" , "+C+" , rootData ) ";i=N.pop(),!1===E.errors?(i+=" "+h+" = ",D&&(i+="await "),i+=R+"; "):i+=D?" var "+(x="customErrors"+n)+" = null; try { "+h+" = await "+R+"; } catch (e) { "+h+" = false; if (e instanceof ValidationError) "+x+" = e.errors; else throw e; } ":" "+x+" = null; "+h+" = "+R+"; "}if(E.modifying&&(i+=" if ("+A+") "+p+" = "+A+"["+C+"];"),i+=""+S,E.valid)d&&(i+=" if (true) { ");else{var N;i+=" if ( ",void 0===E.valid?(i+=" !",i+=y?""+k:""+h):i+=" "+!E.valid+" ",i+=") { ",a=this.keyword,(N=N||[]).push(i),i="",(N=N||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(i+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var L=i;i=N.pop(),!e.compositeRule&&d?e.async?i+=" throw new ValidationError(["+L+"]); ":i+=" validate.errors = ["+L+"]; return false; ":i+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var T=i;i=N.pop(),g?E.errors?"full"!=E.errors&&(i+=" for (var "+O+"="+m+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(i+=" "+_+".schema = "+o+"; "+_+".data = "+p+"; "),i+=" } "):!1===E.errors?i+=" "+T+" ":(i+=" if ("+m+" == errors) { "+T+" } else { for (var "+O+"="+m+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(i+=" "+_+".schema = "+o+"; "+_+".data = "+p+"; "),i+=" } } "):y?(i+=" var err = ",!1!==e.createErrors?(i+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(i+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&d&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; ")):!1===E.errors?i+=" "+T+" ":(i+=" if (Array.isArray("+x+")) { if (vErrors === null) vErrors = "+x+"; else vErrors = vErrors.concat("+x+"); errors = vErrors.length; for (var "+O+"="+m+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; "+_+'.schemaPath = "'+u+'"; ',e.opts.verbose&&(i+=" "+_+".schema = "+o+"; "+_+".data = "+p+"; "),i+=" } } else { "+T+" } "),i+=" } ",d&&(i+=" else { ")}return i},Xe="http://json-schema.org/draft-07/schema#",Ye="http://json-schema.org/draft-07/schema#",er="Core schema meta-schema",rr={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},tr=["object","boolean"],ar={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},or={$schema:Xe,$id:Ye,title:er,definitions:rr,type:tr,properties:ar,default:!0},ir=O(Object.freeze({__proto__:null,$schema:Xe,$id:Ye,title:er,definitions:rr,type:tr,properties:ar,default:or})),nr={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:ir.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:ir.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}},sr=/^[a-z_$][a-z0-9_$-]*$/i,lr=function(e,r){var t=this.RULES;if(t.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!sr.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(r){this.validateKeyword(r,!0);var a=r.type;if(Array.isArray(a))for(var o=0;o<a.length;o++)n(e,a[o],r);else n(e,a,r);var i=r.metaSchema;i&&(r.$data&&this._opts.$data&&(i={anyOf:[i,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),r.validateSchema=this.compile(i,!0))}function n(e,r,a){for(var o,i=0;i<t.length;i++){var n=t[i];if(n.type==r){o=n;break}}o||(o={type:r,rules:[]},t.push(o));var s={keyword:e,definition:a,custom:!0,code:Ze,implements:a.implements};o.rules.push(s),t.custom[e]=s}return t.keywords[e]=t.all[e]=!0,this},cr=function(e){var r=this.RULES.custom[e];return r?r.definition:this.RULES.keywords[e]||!1},ur=function(e){var r=this.RULES;delete r.keywords[e],delete r.all[e],delete r.custom[e];for(var t=0;t<r.length;t++)for(var a=r[t].rules,o=0;o<a.length;o++)if(a[o].keyword==e){a.splice(o,1);break}return this},dr=function e(r,t){e.errors=null;var a=this._validateKeyword=this._validateKeyword||this.compile(nr,!0);if(a(r))return!0;if(e.errors=a.errors,t)throw new Error("custom keyword definition is invalid: "+this.errorsText(a.errors));return!1};var pr="http://json-schema.org/draft-07/schema#",hr="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",mr="Meta-schema for $data reference (JSON Schema extension proposal)",fr=["$data"],vr={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},gr={$schema:pr,$id:hr,description:mr,type:"object",required:fr,properties:vr,additionalProperties:!1},yr=O(Object.freeze({__proto__:null,$schema:pr,$id:hr,description:mr,type:"object",required:fr,properties:vr,additionalProperties:!1,default:gr})),br=Sr;Sr.prototype.validate=function(e,r){var t;if("string"==typeof e){if(!(t=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);t=a.validate||this._compile(a)}var o=t(r);!0!==t.$async&&(this.errors=t.errors);return o},Sr.prototype.compile=function(e,r){var t=this._addSchema(e,void 0,r);return t.validate||this._compile(t)},Sr.prototype.addSchema=function(e,r,t,a){if(Array.isArray(e)){for(var o=0;o<e.length;o++)this.addSchema(e[o],void 0,t,a);return this}var i=this._getId(e);if(void 0!==i&&"string"!=typeof i)throw new Error("schema id must be string");return $r(this,r=U.normalizeId(r||i)),this._schemas[r]=this._addSchema(e,t,a,!0),this},Sr.prototype.addMetaSchema=function(e,r,t){return this.addSchema(e,r,t,!0),this},Sr.prototype.validateSchema=function(e,r){var t=e.$schema;if(void 0!==t&&"string"!=typeof t)throw new Error("$schema must be a string");if(!(t=t||this._opts.defaultMeta||function(e){var r=e._opts.meta;return e._opts.defaultMeta="object"==typeof r?e._getId(r)||r:e.getSchema(Pr)?Pr:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var a=this.validate(t,e);if(!a&&r){var o="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(o);this.logger.error(o)}return a},Sr.prototype.getSchema=function(e){var r=Fr(this,e);switch(typeof r){case"object":return r.validate||this._compile(r);case"string":return this.getSchema(r);case"undefined":return function(e,r){var t=U.schema.call(e,{schema:{}},r);if(t){var a=t.schema,o=t.root,i=t.baseId,n=pe.call(e,a,o,void 0,i);return e._fragments[r]=new B({ref:r,fragment:!0,schema:a,root:o,baseId:i,validate:n}),n}}(this,e)}},Sr.prototype.removeSchema=function(e){if(e instanceof RegExp)return xr(this,this._schemas,e),xr(this,this._refs,e),this;switch(typeof e){case"undefined":return xr(this,this._schemas),xr(this,this._refs),this._cache.clear(),this;case"string":var r=Fr(this,e);return r&&this._cache.del(r.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var t=this._opts.serialize,a=t?t(e):e;this._cache.del(a);var o=this._getId(e);o&&(o=U.normalizeId(o),delete this._schemas[o],delete this._refs[o])}return this},Sr.prototype.addFormat=function(e,r){"string"==typeof r&&(r=new RegExp(r));return this._formats[e]=r,this},Sr.prototype.errorsText=function(e,r){if(!(e=e||this.errors))return"No errors";for(var t=void 0===(r=r||{}).separator?", ":r.separator,a=void 0===r.dataVar?"data":r.dataVar,o="",i=0;i<e.length;i++){var n=e[i];n&&(o+=a+n.dataPath+" "+n.message+t)}return o.slice(0,-t.length)},Sr.prototype._addSchema=function(e,r,t,a){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var o=this._opts.serialize,i=o?o(e):e,n=this._cache.get(i);if(n)return n;a=a||!1!==this._opts.addUsedSchema;var s=U.normalizeId(this._getId(e));s&&a&&$r(this,s);var l,c=!1!==this._opts.validateSchema&&!r;c&&!(l=s&&s==U.normalizeId(e.$schema))&&this.validateSchema(e,!0);var u=U.ids.call(this,e),d=new B({id:s,schema:e,localRefs:u,cacheKey:i,meta:t});"#"!=s[0]&&a&&(this._refs[s]=d);this._cache.put(i,d),c&&l&&this.validateSchema(e,!0);return d},Sr.prototype._compile=function(e,r){if(e.compiling)return e.validate=o,o.schema=e.schema,o.errors=null,o.root=r||o,!0===e.schema.$async&&(o.$async=!0),o;var t,a;e.compiling=!0,e.meta&&(t=this._opts,this._opts=this._metaOpts);try{a=pe.call(this,e.schema,r,e.localRefs)}catch(r){throw delete e.validate,r}finally{e.compiling=!1,e.meta&&(this._opts=t)}return e.validate=a,e.refs=a.refs,e.refVal=a.refVal,e.root=a.root,a;function o(){var r=e.validate,t=r.apply(this,arguments);return o.errors=r.errors,t}},Sr.prototype.compileAsync=Je,Sr.prototype.addKeyword=lr,Sr.prototype.getKeyword=cr,Sr.prototype.removeKeyword=ur,Sr.prototype.validateKeyword=dr,Sr.ValidationError=ie.Validation,Sr.MissingRefError=ie.MissingRef,Sr.$dataMetaSchema=Ke;var Pr="http://json-schema.org/draft-07/schema",wr=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],Er=["/properties"];function Sr(e){if(!(this instanceof Sr))return new Sr(e);var r,t;e=this._opts=k.copy(e)||{},function(e){var r=e._opts.logger;if(!1===r)e.logger={log:kr,warn:kr,error:kr};else{if(void 0===r&&(r=console),!("object"==typeof r&&r.log&&r.warn&&r.error))throw new Error("logger must implement log, warn and error methods");e.logger=r}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=Ae(e.format),this._cache=e.cache||new we,this._loadingSchemas={},this._compilations=[],this.RULES=((r=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}]).all=Ue(t=["type","$comment"]),r.types=Ue(["number","integer","string","array","object","boolean","null"]),r.forEach((function(e){e.rules=e.rules.map((function(e){var a;if("object"==typeof e){var o=Object.keys(e)[0];a=e[o],e=o,a.forEach((function(e){t.push(e),r.all[e]=!0}))}return t.push(e),r.all[e]={keyword:e,code:Qe[e],implements:a}})),r.all.$comment={keyword:"$comment",code:Qe.$comment},e.type&&(r.types[e.type]=e)})),r.keywords=Ue(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),r.custom={},r),this._getId=function(e){switch(e.schemaId){case"auto":return Dr;case"id":return Or;default:return _r}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=le),this._metaOpts=function(e){for(var r=k.copy(e._opts),t=0;t<wr.length;t++)delete r[wr[t]];return r}(this),e.formats&&function(e){for(var r in e._opts.formats){var t=e._opts.formats[r];e.addFormat(r,t)}}(this),e.keywords&&function(e){for(var r in e._opts.keywords){var t=e._opts.keywords[r];e.addKeyword(r,t)}}(this),function(e){var r;e._opts.$data&&(r=yr,e.addMetaSchema(r,r.$id,!0));if(!1===e._opts.meta)return;var t=ir;e._opts.$data&&(t=Ke(t,Er));e.addMetaSchema(t,Pr,!0),e._refs["http://json-schema.org/schema"]=Pr}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var r=e._opts.schemas;if(!r)return;if(Array.isArray(r))e.addSchema(r);else for(var t in r)e.addSchema(r[t],t)}(this)}function Fr(e,r){return r=U.normalizeId(r),e._schemas[r]||e._refs[r]||e._fragments[r]}function xr(e,r,t){for(var a in r){var o=r[a];o.meta||t&&!t.test(a)||(e._cache.del(o.cacheKey),delete r[a])}}function Or(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function _r(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function Dr(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function $r(e,r){if(e._schemas[r]||e._refs[r])throw new Error('schema with key or id "'+r+'" already exists')}function kr(){}var jr={$$currentLocalizeFn:function(e){if(e&&e.length)for(var r=0;r<e.length;r+=1){var t=e[r],a=void 0,o=void 0,i=void 0;switch(t.keyword){case"$ref":a="无法找到引用".concat(t.params.ref);break;case"additionalItems":a="",o=t.params.limit,a+="不允许超过".concat(o,"个元素");break;case"additionalProperties":a="不允许有额外的属性";break;case"anyOf":a="数据应为 anyOf 所指定的其中一个";break;case"const":a="应当等于常量";break;case"contains":a="应当包含一个有效项";break;case"custom":a='应当通过 "'.concat(t.keyword,' 关键词校验"');break;case"dependencies":a="",o=t.params.depsCount,a+="应当拥有属性".concat(t.params.property,"的依赖属性").concat(t.params.deps);break;case"enum":a="应当是预设定的枚举值之一";break;case"exclusiveMaximum":case"exclusiveMinimum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(i);break;case"false schema":a="布尔模式出错";break;case"format":a='应当匹配格式 "'.concat(t.params.format,'"');break;case"formatExclusiveMaximum":a="formatExclusiveMaximum 应当是布尔值";break;case"formatExclusiveMinimum":a="formatExclusiveMinimum 应当是布尔值";break;case"formatMaximum":case"formatMinimum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当是 ".concat(i);break;case"if":a='应当匹配模式 "'.concat(t.params.failingKeyword,'" ');break;case"maximum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(i);break;case"maxItems":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个项");break;case"maxLength":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个字符");break;case"maxProperties":a="",o=t.params.limit,a+="不应有多于 ".concat(o," 个属性");break;case"minimum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(i);break;case"minItems":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个项");break;case"minLength":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个字符");break;case"minProperties":a="",o=t.params.limit,a+="不应有少于 ".concat(o," 个属性");break;case"multipleOf":a="应当是 ".concat(t.params.multipleOf," 的整数倍");break;case"not":a='不应当匹配 "not" schema';break;case"oneOf":a='只能匹配一个 "oneOf" 中的 schema';break;case"pattern":a='应当匹配模式 "'.concat(t.params.pattern,'"');break;case"patternRequired":a="应当有属性匹配模式 ".concat(t.params.missingPattern);break;case"propertyNames":a="属性名 '".concat(t.params.propertyName,"' 无效");break;case"required":a="应当有必需属性 ".concat(t.params.missingProperty);break;case"switch":a="由于 ".concat(t.params.caseIndex,' 失败,未通过 "switch" 校验, ');break;case"type":a="应当是 ".concat(t.params.type," 类型");break;case"uniqueItems":a="不应当含有重复项 (第 ".concat(t.params.j," 项与第 ").concat(t.params.i," 项是重复的)");break;default:continue}t.message=a}},getCurrentLocalize:function(){return this.$$currentLocalizeFn},useLocal:function(e){this.$$currentLocalizeFn=e}};function Ir(e,t){try{if("object"===r(t))return e.fill(null).map((function(){return JSON.parse(JSON.stringify(t))}))}catch(e){}}function Ar(e,r){return e.filter((function(e){return r.includes(e)}))}function Cr(e,r,t){var a=F(e.$ref,r);e.$ref;var o=n(e,["$ref"]);return Tr(i(i({},a),o),r,t)}function Rr(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length<2)return r[0];for(var a={},o=[].concat(r),i=function(){var e=p(o[0])?o[0]:{},r=p(o[1])?o[1]:{};a=Object.assign({},e),Object.keys(r).reduce((function(t,a){var o=e[a],i=r[a];if(p(o)||p(i))if(p(o)&&p(i))t[a]=Rr(o,i);else{var n=s(p(o)?[o,i]:[i,o],2),l=n[0],c=n[1];t[a]="additionalProperties"===a?!0===c&&l:l}else if(Array.isArray(o)||Array.isArray(i))if(Array.isArray(o)&&Array.isArray(i)){if(p(o[0])||p(i[0]))throw new Error("暂不支持如上数组对象元素合并");var u=Ar([].concat(o),[].concat(i));if(u.length<=0)throw new Error("无法合并如上数据");0===u.length&&"type"===a?t[a]=u[0]:t[a]=u}else{var d=s(Array.isArray(o)?[o,i]:[i,o],2),h=d[0],m=d[1];if(void 0===m)t[a]=h;else{if(!h.includes(m))throw new Error("无法合并如下数据");t[a]=m}}else if(void 0!==o&&void 0!==i)if("maxLength"===a||"maximum"===a||"maxItems"===a||"exclusiveMaximum"===a||"maxProperties"===a)t[a]=Math.min(o,i);else if("minLength"===a||"minimum"===a||"minItems"===a||"exclusiveMinimum"===a||"minProperties"===a)t[a]=Math.max(o,i);else if("multipleOf"===a)t[a]=E(o,i);else{if(o!==i)throw new Error("无法合并如下数据");t[a]=o}else t[a]=void 0===o?i:o;return t}),a),o.splice(0,2,a)};o.length>=2;)i();return a}function Nr(e,r,t){var a=i(i({},e),{},{allOf:e.allOf.map((function(e){return Tr(e,r,t)}))});try{var o=a.allOf,s=n(a,["allOf"]);return Rr.apply(void 0,[s].concat(l(o)))}catch(e){return a.allOf,n(a,["allOf"])}}function Lr(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.hasOwnProperty("allOf")&&(e=Nr(e,r,t)),e.hasOwnProperty("$ref")&&(e=Cr(e,r,t)),e}function Tr(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return p(e)?Lr(e,r,t):{}}function zr(e){return e?"".concat("__pathRoot",".").concat(e).replace(/\./g,"_"):"__pathRoot"}function qr(e){return""===e}function Vr(e,r){return""===e?r:[e,r].join(".")}function Mr(r,t){e.delete(r,t)}function Wr(r,t,a){for(var o=t.split("."),i=0;i<o.length;i+=1){if(o.length-i<2){e.set(r,o[o.length-1],a);break}r=r[o[i]]}}function Br(e,r){for(var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=r.split("."),o=0;o<a.length-t;o+=1){if(void 0===e)return;e=""===a[o]?e:e[a[o]]}return e}function Qr(e){return e}var Ur=Object.freeze({__proto__:null,nodePath2ClassName:zr,isRootNodePath:qr,computedCurPath:Vr,deletePathVal:Mr,setPathVal:Wr,getPathVal:Br,path2prop:Qr}),Hr=/{{(.*)}}/;function Kr(e,r,t,a){if(void 0!==t){var o=Hr.exec(t);if(Hr.lastIndex=0,o){var i=o[1].trim();return new Function("parentFormData","rootFormData","return ".concat(i))(Br(e,r,1),e)}return a()}}function Gr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.schema,t=e.uiSchema,a=arguments.length>1?arguments[1]:void 0,o=Yr({schema:r,uiSchema:t,containsSpec:!1});return["title","description"].reduce((function(e,r){return o[r]&&(e["ui:".concat(r)]=String(o[r]).replace(/\$index/g,a+1)),e}),{})}function Jr(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,i=e.curNodePath,n=void 0===i?"":i,s=e.rootFormData,l=void 0===s?{}:s,c=o["ui:widget"]||t["ui:widget"],u=o["ui:hidden"]||t["ui:hidden"];return"HiddenWidget"===c||"hidden"===c||!!Kr(l,n,u,(function(){return"function"==typeof u?u(Br(l,n,1),l):u}))}function Zr(e,t){var a=t.schema,o=void 0===a?{}:a,i=t.uiSchema,n=void 0===i?{}:i,s=o["ui:field"]||n["ui:field"];if("function"==typeof s||"object"===r(s)||"string"==typeof s)return{field:s,fieldProps:n["ui:fieldProps"]||o["ui:fieldProps"]};var l=e[f(o)];if(l)return{field:l};if(!l&&(o.anyOf||o.oneOf))return{field:null};throw new Error("不支持的field类型 ".concat(o.type))}function Xr(e){var r=e.schema,a=void 0===r?{}:r,o=e.uiSchema,n=void 0===o?{}:o,s=e.curNodePath,c=e.rootFormData,u=void 0===c?{}:c;return Object.assign.apply(Object,[{}].concat(l([a,n].map((function(e){return Object.keys(e).reduce((function(r,a){var o=e[a];return"ui:options"===a&&p(o)?i(i({},r),o):0===a.indexOf("ui:")?i(i({},r),{},t({},a.substring(3),void 0===s?o:Kr(u,s,o,(function(){return o})))):r}),{})})))))}function Yr(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.containsSpec,s=void 0===n||n,l=e.curNodePath,c=e.rootFormData,u={};return s&&(u.readonly=!!t.readOnly,void 0!==t.multipleOf&&(u.step=t.multipleOf),(t.minimum||0===t.minimum)&&(u.min=t.minimum),(t.maximum||0===t.maximum)&&(u.max=t.maximum),(t.minLength||0===t.minLength)&&(u.minlength=t.minLength),(t.maxLength||0===t.maxLength)&&(u.maxlength=t.maxLength),"date-time"!==t.format&&"date"!==t.format||("array"===t.type?(u.isRange=!0,u.isNumberValue=!(t.items&&"string"===t.items.type)):u.isNumberValue=!("string"===t.type))),i(i({title:t.title,description:t.description},u),Xr({schema:t,uiSchema:o,curNodePath:l,rootFormData:c}))}function et(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,i=e.curNodePath,s=e.rootFormData,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,c=Yr({schema:t,uiSchema:o,curNodePath:i,rootFormData:s});!c.widget&&l&&Object.assign(c,l({schema:t,uiSchema:o}));var u=c.widget,d=c.title,p=c.labelWidth,h=c.description,m=c.attrs,f=c.class,v=c.style,g=c.fieldAttrs,y=c.fieldStyle,b=c.fieldClass,P=c.emptyValue,w=c.width,E=c.getWidget,S=c.onChange,F=n(c,["widget","title","labelWidth","description","attrs","class","style","fieldAttrs","fieldStyle","fieldClass","emptyValue","width","getWidget","onChange"]);return{widget:u,label:d,labelWidth:p,description:h,widgetAttrs:m,widgetClass:f,widgetStyle:v,fieldAttrs:g,width:w,fieldStyle:y,fieldClass:b,emptyValue:P,getWidget:E,onChange:S,uiProps:F}}function rt(e){var r=e.schema,a=void 0===r?{}:r,o=e.uiSchema,n=void 0===o?{}:o,s=e.errorSchema,c=void 0===s?{}:s;return Object.assign.apply(Object,[{}].concat(l([a,n,c].map((function(e){return Object.keys(e).reduce((function(r,a){var o=e[a];return"err:options"===a&&p(o)?i(i({},r),o):0===a.indexOf("err:")?i(i({},r),{},t({},a.substring(4),o)):r}),{})})))))}function tt(e,r){if(!Array.isArray(r))return e;var t,a=function(e){return e.reduce((function(e,r){return e[r]=!0,e}),{})},o=a(e),i=r.filter((function(e){return"*"===e||o[e]})),n=a(i),s=e.filter((function(e){return!n[e]})),c=i.indexOf("*");if(-1===c){if(s.length)throw new Error("uiSchema order list does not contain ".concat((t=s).length>1?"properties '".concat(t.join("', '"),"'"):"property '".concat(t[0],"'")));return i}if(c!==i.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");var u=l(i);return u.splice.apply(u,[c,1].concat(l(s))),u}function at(e){return Array.isArray(e.enum)&&1===e.enum.length||e.hasOwnProperty("const")}function ot(e){if(Array.isArray(e.enum)&&1===e.enum.length)return e.enum[0];if(e.hasOwnProperty("const"))return e.const;throw new Error("schema cannot be inferred as a constant")}function it(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=Tr(e,r),a=t.oneOf||t.anyOf;return!!Array.isArray(t.enum)||!!Array.isArray(a)&&a.every((function(e){return at(e)}))}function nt(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every((function(e){return p(e)}))}function st(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!(!e.uniqueItems||!e.items)&&it(e.items,r)}function lt(e){return e.additionalItems,p(e.additionalItems)}function ct(e,r,t,a){if(e.enum){var o=Xr({schema:e,uiSchema:r,curNodePath:t,rootFormData:a}).enumNames||e.enumNames;return e.enum.map((function(e,r){return{label:o&&o[r]||String(e),value:e}}))}var i=e.oneOf||e.anyOf,n=r.oneOf||r.anyOf;return i.map((function(e,r){var o=n&&n[r]?Xr({schema:e,uiSchema:n[r],curNodePath:t,rootFormData:a}):{},i=ot(e);return{label:o.title||e.title||String(i),value:i}}))}function ut(e,r,t){if(e)return e;if(r){var a=t.split(".").pop();if(a&&a!=="".concat(Number(a)))return a}return""}var dt=Object.freeze({__proto__:null,replaceArrayIndex:Gr,isHiddenWidget:Jr,getUiField:Zr,getUserUiOptions:Xr,getUiOptions:Yr,getWidgetConfig:et,getUserErrOptions:rt,orderProperties:tt,isConstant:at,toConstant:ot,isSelect:it,isFixedItems:nt,isMultiSelect:st,allowAdditionalItems:lt,optionsList:ct,fallbackLabel:ut}),pt=ft(),ht=null,mt=null;function ft(){var e=new br({errorDataPath:"property",allErrors:!0,multipleOfPrecision:8,schemaId:"auto",unknownFormats:"ignore"});return e.addFormat("data-url",/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/),e.addFormat("color",/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/),e}function vt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null===e?[]:e.map((function(e){var r=e.dataPath,t=e.keyword,a=e.message,o=e.params,i=e.schemaPath,n="".concat(r);return{name:t,property:n,message:a,params:o,stack:"".concat(n," ").concat(a).trim(),schemaPath:i}}))}function gt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.transformErrors,o=e.additionalMetaSchemas,i=void 0===o?[]:o,n=e.customFormats,s=void 0===n?{}:n,c=!v(mt,i),u=!v(ht,s);(c||u)&&(pt=ft()),i&&c&&Array.isArray(i)&&(pt.addMetaSchema(i),mt=i),s&&u&&p(s)&&(Object.keys(s).forEach((function(e){pt.addFormat(e,s[e])})),ht=s);var d=null;try{pt.validate(t,r)}catch(e){d=e}jr.getCurrentLocalize()(pt.errors);var h=vt(pt.errors);pt.errors=null;var m=d&&d.message&&"string"==typeof d.message&&d.message.includes("no schema with key or ref ");return m&&(h=[].concat(l(h),[{stack:d.message}])),"function"==typeof a&&(h=a(h)),{errors:h}}function yt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.uiSchema,o=e.transformErrors,i=e.additionalMetaSchemas,n=void 0===i?[]:i,s=e.customFormats,l=void 0===s?{}:s,c=e.errorSchema,u=void 0===c?{}:c,d=e.required,p=void 0!==d&&d,h=e.propPath,m=void 0===h?"":h,f=e.isOnlyFirstError,v=void 0===f||f,g="array"===t.type&&Array.isArray(r)&&0===r.length,y=void 0===r||g;if(p){if(y){var b={keyword:"required",params:{missingProperty:m}},P=rt({schema:t,uiSchema:a,errorSchema:u}).required;return P?b.message=P:jr.getCurrentLocalize()([b]),[b]}}else if(y&&!g)return[];var w=gt({formData:r,schema:t,transformErrors:o,additionalMetaSchemas:n,customFormats:l}).errors;w=w.filter((function(e){return""===e.property&&!e.schemaPath.includes("#/anyOf/")&&!e.schemaPath.includes("#/oneOf/")||"additionalProperties"===e.name}));var E=rt({schema:t,uiSchema:a,errorSchema:u});return(v&&w.length>0?[w[0]]:w).reduce((function(e,r){return r.message=void 0!==E[r.name]?E[r.name]:r.message,e.push(r),e}),[])}function bt(e,r){try{return pt.validate(e,r)}catch(e){return!1}}function Pt(e,r,t){for(var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=0;n<r.length;n++){var s=Tr(r[n],t,e);if(s.properties){var l=i(i({},t.definitions?{definitions:t.definitions}:{}),{},{anyOf:Object.keys(s.properties).map((function(e){return{required:[e]}}))}),c=void 0;if(s.anyOf){var u=a({},s);u.allOf?u.allOf=u.allOf.slice():u.allOf=[],u.allOf.push(l),c=u}else c=Object.assign({},s,l);if(o||delete c.required,bt(c,e))return n}else if(bt(r[n],e))return n}return 0}var wt=Object.freeze({__proto__:null,ajvValidateFormData:gt,validateFormDataAndTransformMsg:yt,isValid:bt,getMatchingOption:Pt});function Et(e,r){if(Array.isArray(r))return Array.isArray(e)||(e=[]),r.map((function(r,t){return e[t]?Et(e[t],r):r}));if(p(r)){var t=Object.assign({},e);return Object.keys(r).reduce((function(t,a){return t[a]=Et(e?e[a]:{},r[a]),t}),t)}return r}function St(e,r,t){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=p(e)?e:{},n=p(a)?a:{};"allOf"in i&&(i=Nr(i,t,n));var s=r;if(p(s)&&p(i.default))s=m(s,i.default);else if("default"in i)s=i.default;else{if("$ref"in i){var l=F(i.$ref,t);return St(l,s,t,n,o)}if(nt(i))s=i.items.map((function(e,a){return St(e,Array.isArray(r)?r[a]:void 0,t,n,o)}));else if("oneOf"in i){var c=Tr(i.oneOf[Pt(n,i.oneOf,t)],t,n);if(i.properties&&c.properties){var u=m(i,c);delete u.oneOf,i=u}else i=c}else if("anyOf"in i){var d=Tr(i.anyOf[Pt(n,i.anyOf,t)],t,n);if(i.properties&&d.properties){var h=m(i,d);delete h.anyOf,i=h}else i=d}}switch(void 0===s&&(s=i.default),f(i)){case"null":return null;case"object":return Object.keys(i.properties||{}).reduce((function(e,r){var a=St(i.properties[r],(s||{})[r],t,(n||{})[r],o);return(o||void 0!==a)&&(e[r]=a),e}),{});case"array":if(Array.isArray(s)&&(s=s.map((function(e,r){return St(i.items[r]||i.additionalItems||{},e,t,{},o)}))),Array.isArray(a)&&(s=a.map((function(e,r){return St(i.items,(s||{})[r],t,e,{},o)}))),i.minItems){if(st(i,t))return s||[];var v=s?s.length:0;if(i.minItems>v){var g=s||[],y=Array.isArray(i.items)?i.additionalItems:i.items,b=Ir(new Array(i.minItems-v),St(y,y.defaults,t,{},o));return g.concat(b)}}s=void 0===s?[]:s}return s}function Ft(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!p(e))throw new Error("Invalid schema: ".concat(e));var o=Tr(e,t,r),i=St(o,e.default,t,r,a);return void 0===r?i:p(r)||Array.isArray(r)?Et(i,r):0===r||!1===r||""===r?r:r||i}function xt(e,r){void 0===r&&(r={});var t=r.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}xt('.genFromComponent{font-size:14px;line-height:1;word-wrap:break-word;word-break:break-word;padding:0;margin:0}.genFromComponent a,.genFromComponent h1,.genFromComponent h2,.genFromComponent h3,.genFromComponent li,.genFromComponent p,.genFromComponent ul{font-size:14px}.genFromComponent .genFormIcon{width:12px;height:12px;vertical-align:top}.genFromComponent .genFormBtn{display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;background:#fff;border:1px solid #dcdfe6;color:#606266;-webkit-appearance:none;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;margin:0;-webkit-transition:.1s;transition:.1s;font-weight:500;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;padding:12px 20px;font-size:14px;border-radius:4px}.genFromComponent .genFormBtn.is-plain:focus,.genFromComponent .genFormBtn.is-plain:hover{background:#fff;border-color:#409eff;color:#409eff}.genFromComponent .hiddenWidget{display:none}.genFromComponent .fieldGroupWrap+.fieldGroupWrap .fieldGroupWrap_title{margin-top:20px}.genFromComponent .fieldGroupWrap_title{position:relative;display:block;width:100%;line-height:26px;margin-bottom:8px;font-size:15px;font-weight:700;border:0}.genFromComponent .fieldGroupWrap_des{font-size:12px;line-height:20px;margin-bottom:10px;color:#999}.genFromComponent .genFromWidget_des{padding:0;margin-top:0;margin-bottom:2px;font-size:12px;line-height:20px;color:#999;text-align:left}.genFromComponent .formItemErrorBox{margin:0 auto;color:#ff5757;padding-top:2px;position:absolute;top:100%;left:0;display:-webkit-box!important;line-height:16px;text-overflow:ellipsis;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1;white-space:normal;font-size:12px;text-align:left}.genFromComponent .genFormIcon-qs{fill:#606266;vertical-align:middle;display:inline-block;width:16px;height:16px;margin-left:2px;margin-top:-2px;cursor:pointer}.genFromComponent .genFormItemRequired:before{content:"*";color:#f56c6c;margin-right:4px}.genFromComponent .appendCombining_box{margin-bottom:22px}.genFromComponent .appendCombining_box .appendCombining_box{margin-bottom:10px}.genFromComponent .appendCombining_box{padding:10px;background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .validateWidget{margin-bottom:0!important;width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important;padding:0!important}.genFromComponent .validateWidget .formItemErrorBox{padding:5px 0;position:relative}.genFromComponent .arrayField:not(.genFormItem){margin-bottom:22px}.genFromComponent .arrayField:not(.genFormItem) .arrayField{margin-bottom:10px}.genFromComponent .arrayOrderList{background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .arrayOrderList_item{position:relative;padding:25px 10px 12px;border-radius:2px;margin-bottom:6px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.genFromComponent .arrayOrderList_bottomAddBtn{text-align:right;padding:15px 10px;margin-bottom:10px}.genFromComponent .bottomAddBtn{width:40%;min-width:10px;max-width:180px}.genFromComponent .arrayListItem_content{padding-top:15px;-webkit-box-flex:1;-ms-flex:1;flex:1;margin:0 auto;-webkit-box-shadow:0 -1px 0 0 rgba(0,0,0,.05);box-shadow:0 -1px 0 0 rgba(0,0,0,.05)}.genFromComponent .arrayListItem_index,.genFromComponent .arrayListItem_operateTool{position:absolute;height:25px}.genFromComponent .arrayListItem_index{top:6px;line-height:18px;height:18px;padding:0 6px;background-color:rgba(0,0,0,.28);color:#fff;font-size:12px;border-radius:2px}.genFromComponent .arrayListItem_operateTool{width:75px;right:9px;top:-1px;text-align:right;font-size:0}.genFromComponent .arrayListItem_btn{vertical-align:top;display:inline-block;padding:6px;margin:0;font-size:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none;cursor:pointer;text-align:center;background:transparent;color:#666}.genFromComponent .arrayListItem_btn:hover{opacity:.6}.genFromComponent .arrayListItem_btn[disabled]{color:#999;opacity:.3!important;cursor:not-allowed}.genFromComponent .arrayListItem_orderBtn-bottom,.genFromComponent .arrayListItem_orderBtn-top{background-color:#f0f9eb}.genFromComponent .arrayListItem_btn-delete{background-color:#fef0f0}.genFromComponent .formFooter_item{text-align:right;border-top:1px solid rgba(0,0,0,.08);padding-top:10px}.genFromComponent.formInlineFooter>.fieldGroupWrap{display:inline-block;margin-right:10px}.genFromComponent.formInline .genFormItem{display:inline-block;margin-right:10px;vertical-align:top}.genFromComponent.formInline .validateWidget{margin-right:0}.genFromComponent.formInline .formFooter_item{border-top:none;padding-top:0}.layoutColumn .layoutColumn_w100{width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important}.layoutColumn .fieldGroupWrap_box{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start}.layoutColumn .fieldGroupWrap_box>div{width:100%;-ms-flex-preferred-size:100%;flex-basis:100%}.layoutColumn .fieldGroupWrap_box>.genFormItem{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;-webkit-box-sizing:border-box;box-sizing:border-box;padding-right:10px}.layoutColumn.layoutColumn-1 .fieldGroupWrap_box>.genFormItem{padding-right:0}.layoutColumn.layoutColumn-2 .fieldGroupWrap_box>.genFormItem{width:50%;-ms-flex-preferred-size:50%;flex-basis:50%}.layoutColumn.layoutColumn-3 .fieldGroupWrap_box>.genFormItem{width:33.333%;-ms-flex-preferred-size:33.333%;flex-basis:33.333%}');var Ot={formFooter:{type:Object,default:function(){return{show:!0,okBtn:"保存",cancelBtn:"取消"}}},value:{type:null,default:function(){return{}},required:!0},formProps:{type:Object,default:function(){return{}}},fallbackLabel:{type:Boolean,default:!1},schema:{type:Object,default:function(){return{}},required:!0},uiSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},errorSchema:{type:Object,default:function(){return{}}}},_t={name:"FormFooter",props:{okBtn:{type:String,default:"保存"},cancelBtn:{type:String,default:"取消"},formItemAttrs:{type:Object,default:function(){return{}}},globalOptions:null},render:function(e){var r=this,t=this.$props,a=t.okBtn,o=t.cancelBtn,n=t.globalOptions.COMPONENT_MAP;return e(n.formItem,i({class:{formFooter_item:!0}},this.formItemAttrs),[e(n.button,{on:{click:function(){r.$emit("onCancel")}}},o),e(n.button,{style:{marginLeft:"10px"},props:{type:"primary"},on:{click:function(){r.$emit("onSubmit")}}},a)])}};var Dt=function(e,r,t,a,o,i,n,s,l,c){"boolean"!=typeof n&&(l=s,s=n,n=!1);var u,d="function"==typeof t?t.options:t;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,o&&(d.functional=!0)),a&&(d._scopeId=a),i?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(i)},d._ssrRegister=u):r&&(u=n?function(e){r.call(this,c(e,this.$root.$options.shadowRoot))}:function(e){r.call(this,s(e))}),u)if(d.functional){var p=d.render;d.render=function(e,r){return u.call(r),p(e,r)}}else{var h=d.beforeCreate;d.beforeCreate=h?[].concat(h,u):[u]}return t},$t={name:"FieldGroupWrap",inject:["genFormProvide"],props:{curNodePath:{type:String,default:""},showTitle:{type:Boolean,default:!0},showDescription:{type:Boolean,default:!0},title:{type:String,default:""},description:{type:String,default:""}},computed:{trueTitle:function(){var e=this.title;if(e)return e;var r=(this.genFormProvide.value||this.genFormProvide).fallbackLabel&&this.curNodePath.split(".").pop();return r!=="".concat(Number(r))?r:""}}},kt=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("div",{staticClass:"fieldGroupWrap"},[e.showTitle&&e.trueTitle?t("h3",{staticClass:"fieldGroupWrap_title"},[e._v("\n "+e._s(e.trueTitle)+"\n ")]):e._e(),e._v(" "),e.showDescription&&e.description?t("p",{staticClass:"fieldGroupWrap_des",domProps:{innerHTML:e._s(e.description)}}):e._e(),e._v(" "),t("div",{staticClass:"fieldGroupWrap_box"},[e._t("default")],2)])};kt._withStripped=!0;var jt=Dt({render:kt,staticRenderFns:[]},void 0,$t,void 0,!1,void 0,!1,void 0,void 0,void 0),It={formProps:{type:null},globalOptions:{type:null},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},customFormats:{type:Object,default:function(){return{}}},rootSchema:{type:Object,default:function(){return{}}},rootFormData:{type:null,default:function(){return{}}},curNodePath:{type:String,default:""},required:{type:Boolean,default:!1},needValidFieldGroup:{type:Boolean,default:!0}},At=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-down",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}})])};At._withStripped=!0;var Ct=Dt({render:At,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Rt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-up",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}})])};Rt._withStripped=!0;var Nt=Dt({render:Rt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Lt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-close",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1\n 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0\n 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}})])};Lt._withStripped=!0;var Tt=Dt({render:Lt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),zt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-plus",attrs:{t:"1551322312294",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"10297","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"200",height:"200"}},[r("path",{attrs:{d:"M474 152m8 0l60 0q8 0 8 8l0 704q0 8-8 8l-60 0q-8 0-8-8l0-704q0-8 8-8Z","p-id":"10298"}}),this._v(" "),r("path",{attrs:{d:"M168 474m8 0l672 0q8 0 8 8l0 60q0 8-8 8l-672 0q-8 0-8-8l0-60q0-8 8-8Z","p-id":"10299"}})])};zt._withStripped=!0;var qt=Dt({render:zt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Vt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-qs",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 708c-22.1\n 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 0\n 0-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8\n 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6\n 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6\n 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z"}})])};Vt._withStripped=!0;var Mt=Dt({render:Vt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Wt={name:"Widget",inject:["genFormProvide"],props:{isFormData:{type:Boolean,default:!0},curValue:{type:null,default:0},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},widget:{type:[String,Function,Object],default:null},required:{type:Boolean,default:!1},emptyValue:{type:null,default:void 0},formatValue:{type:[Function],default:function(e){return{update:!0,value:e}}},rootFormData:{type:null},curNodePath:{type:String,default:""},label:{type:String,default:""},width:{type:String,default:""},labelWidth:{type:String,default:""},description:{type:String,default:""},widgetAttrs:{type:Object,default:function(){return{}}},widgetClass:{type:Object,default:function(){return{}}},widgetStyle:{type:Object,default:function(){return{}}},fieldAttrs:{type:Object,default:function(){return{}}},fieldClass:{type:Object,default:function(){return{}}},fieldStyle:{type:Object,default:function(){return{}}},uiProps:{type:Object,default:function(){return{}}},formProps:null,getWidget:null,globalOptions:null,onChange:null},computed:{value:{get:function(){return this.isFormData?Br(this.rootFormData,this.curNodePath):this.curValue},set:function(e){var r=""===e||null===e?this.emptyValue:e;this.isFormData&&Wr(this.rootFormData,this.curNodePath,r),this.$emit("onChange",r)}}},created:function(){this.uiProps.enumOptions&&this.uiProps.enumOptions.length>0&&void 0===this.value&&this.value!==this.uiProps.enumOptions[0]&&(this.schema.items?this.value=[]:this.required&&(this.value=this.uiProps.enumOptions[0].value))},render:function(e){var r=this,t=this.$props.curNodePath,a=qr(t),o=r.globalOptions.HELPERS.isMiniDes(r.formProps),n=r.description?e("div",{domProps:{innerHTML:r.description},class:{genFromWidget_des:!0}}):null,s=r.globalOptions.COMPONENT_MAP,l=o&&n?e(s.popover,{style:{margin:"0 2px",fontSize:"16px",cursor:"pointer"},props:{placement:"top",trigger:"hover"}},[n,e(Mt,{slot:"reference"})]):null,c=i(i({},r.fieldStyle),r.width?{width:r.width,flexBasis:r.width,paddingRight:"10px"}:{}),u=ut(r.label,r.widget&&this.genFormProvide.fallbackLabel,t);return e(s.formItem,{class:i(i({},r.fieldClass),{},{genFormItem:!0}),style:c,attrs:r.fieldAttrs,props:i(i({},r.labelWidth?{labelWidth:r.labelWidth}:{}),this.isFormData?{prop:a?"__$$root":t,rules:[{validator:function(e,o,i){a&&(o=r.rootFormData);var n=yt({formData:o,schema:r.$props.schema,uiSchema:r.$props.uiSchema,customFormats:r.$props.customFormats,errorSchema:r.errorSchema,required:r.required,propPath:t});if(n.length>0)return i(n[0].message);var s=r.$props.customRule;return s&&"function"==typeof s?s({field:t,value:o,rootFormData:r.rootFormData,callback:i}):i()},trigger:"blur"}]}:{}),scopedSlots:{error:function(r){return r.error?e("div",{class:{formItemErrorBox:!0},attrs:{title:r.error}},[r.error]):null}}},[u?e("span",{slot:"label",class:{genFormLabel:!0,genFormItemRequired:r.required}},["".concat(u),l,"".concat(r.formProps&&r.formProps.labelSuffix||"")]):null,o?null:n,e(r.widget,{style:r.widgetStyle,class:r.widgetClass,attrs:i(i(i({},r.widgetAttrs),r.uiProps),{},{value:this.value}),ref:"widgetRef",on:{"hook:mounted":function(){r.getWidget&&"function"==typeof r.getWidget&&r.getWidget.call(null,r.$refs.widgetRef)},input:function(e){var t=r.formatValue(e),a=r.value;t.update&&a!==t.value&&(r.value=t.value,r.onChange&&r.onChange(t.value,a))}}})])}},Bt={name:"ObjectField",functional:!0,props:It,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,n=t.errorSchema,c=t.needValidFieldGroup,u=t.curNodePath,d=t.rootFormData,h=t.globalOptions,m=Yr({schema:a,uiSchema:o,curNodePath:u,rootFormData:d}),f=m.title,v=m.description,g=m.showTitle,y=m.showDescription,b=m.order,P=m.fieldClass,w=m.fieldAttrs,E=m.fieldStyle,S=m.onlyShowIfDependent,F=tt(Object.keys(a.properties||{}),b).map((function(t){var l=function(e){return Array.isArray(a.required)&&!!~a.required.indexOf(e)}(t),c=function(e){var r=!1,t=!1;return p(a.dependencies)&&(t=Object.entries(a.dependencies).some((function(t){var a=s(t,2),o=a[0],i=a[1],n=!(!Array.isArray(i)||!~i.indexOf(e));return r=r||n,n&&void 0!==Br(d,u)[o]}))),{isDependency:r,curDependent:t}}(t),h=c.isDependency,m=c.curDependent;return h&&S&&!m?null:e(aa,{key:t,props:i(i({},r.props),{},{schema:a.properties[t],uiSchema:o[t],errorSchema:n[t],required:l||m,curNodePath:Vr(u,t)})})}));return e(jt,{props:{title:f,description:v,showTitle:g,showDescription:y,curNodePath:u},class:i(i({},r.data.class),P),attrs:w,style:E},[e("template",{slot:"default"},[].concat(l(F),[c?e(Wt,{key:"validateWidget-object",class:{validateWidget:!0,"validateWidget-object":!0},props:{schema:Object.entries(a).reduce((function(e,r){var t=s(r,2),o=t[0],i=t[1];return!1!==a.additionalProperties&&["properties","id","$id"].includes(o)||(e[o]=i),e}),{}),uiSchema:o,errorSchema:n,curNodePath:u,rootFormData:d,globalOptions:h}}):null]))])}},Qt={name:"StringField",props:It,functional:!0,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,n=t.curNodePath,s=t.rootFormData,l=t.globalOptions.WIDGET_MAP,c=it(a)&&ct(a,o,n,s),u=et({schema:a,uiSchema:o,curNodePath:n,rootFormData:s},(function(){var e="number"===a.type||"integer"===a.type;return{widget:c?l.common.select:l.formats[a.format]||(e?l.types.number:l.types.string)}}));return c&&!u.uiProps.enumOptions&&(u.uiProps.enumOptions=c),e(Wt,i(i({},r.data),{},{props:i(i({},r.props),u)}))}},Ut={name:"NumberField",props:It,functional:!0,render:function(e,r){return e(Qt,r.data)}},Ht={name:"IntegerField",props:It,functional:!0,render:function(e,r){return e(Qt,r.data)}},Kt={name:"BooleanField",props:It,functional:!0,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,n=t.curNodePath,s=t.rootFormData,l=t.globalOptions,c=ct({enumNames:a.enumNames||["true","false"],enum:a.enum||[!0,!1]},o,n,s),u=et({schema:a,uiSchema:o,curNodePath:n,rootFormData:s},(function(){return{widget:l.WIDGET_MAP.types.boolean}}));return u.uiProps.enumOptions=u.uiProps.enumOptions||c,e(Wt,i(i({},r.data),{},{props:i(i({},r.props),u)}))}},Gt={name:"ArrayOrderList",props:{vNodeList:{type:Array,default:[]},tupleItemsLength:{type:Number,default:0},addable:{type:Boolean,default:!0},showIndexNumber:{type:Boolean,default:!1},sortable:{type:Boolean,default:!0},removable:{type:Boolean,default:!0},maxItems:{},minItems:{},globalOptions:null},computed:{canAdd:function(){var e=this.$props,r=e.addable,t=e.maxItems,a=e.vNodeList;return!!r&&(void 0===t||a.length<t)},canRemove:function(){var e=this.$props,r=e.removable,t=e.minItems,a=e.vNodeList;return!!r&&(void 0===t||a.length>t)}},render:function(e){var r=this;return this.vNodeList.length<=0&&!this.addable?null:e("div",{class:{arrayOrderList:!0}},this.vNodeList.map((function(t,a){var o=t.key,n=t.vNode,s=r.tupleItemsLength+a,l=a+1;return e("div",{key:o,class:{arrayOrderList_item:!0}},[r.showIndexNumber?e("div",{class:{arrayListItem_index:!0}},l):null,e("div",{class:{arrayListItem_operateTool:!0}},[e("button",{style:i({},r.sortable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.sortable||0===a},class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-top":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"moveUp",data:{index:s}})}}},[e(Nt)]),e("button",{style:i({},r.sortable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.sortable||a===r.vNodeList.length-1},class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-bottom":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"moveDown",data:{index:s}})}}},[e(Ct)]),e("button",{style:i({},r.removable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.canRemove},class:{arrayListItem_btn:!0,"arrayListItem_btn-delete":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"remove",data:{index:s}})}}},[e(Tt)])]),e("div",{class:{arrayListItem_content:!0}},[n])])})).concat([e("p",{style:i({},this.canAdd?{}:{display:"none"}),class:{arrayOrderList_bottomAddBtn:!0}},[e("button",{attrs:{type:"button"},class:{bottomAddBtn:!0,"is-plain":!0,genFormBtn:!0},on:{click:function(){r.$emit("onArrayOperate",{command:"add"})}}},[e(qt,{style:{marginRight:"5px"}}),this.maxItems?"( ".concat(this.vNodeList.length," / ").concat(this.maxItems," )"):""])])]))}},Jt={name:"ArrayFieldNormal",functional:!0,props:i(i({},It),{},{itemsFormData:{type:Array}}),render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,n=t.curNodePath,s=t.rootFormData,l=t.itemsFormData,c=t.errorSchema,u=t.globalOptions,d=Yr({schema:a,uiSchema:o,curNodePath:n,rootFormData:s}),p=d.title,h=d.description,m=d.addable,f=d.showIndexNumber,v=d.sortable,g=d.removable,y=d.showTitle,b=d.showDescription,P=d.fieldClass,w=d.fieldAttrs,E=d.fieldStyle,S=l.map((function(t,s){var l=Gr({schema:a.items,uiSchema:o.items},s);return{key:t.key,vNode:e(aa,{key:t.key,props:i(i({},r.props),{},{schema:a.items,required:![].concat(a.items.type).includes("null"),uiSchema:i(i({},o.items),l),errorSchema:c.items,curNodePath:Vr(n,s)})})}}));return e(jt,{props:{title:p,description:h,showTitle:y,showDescription:b,curNodePath:n},class:i(i({},r.data.class),P),attrs:w,style:E},[e(Gt,{props:{vNodeList:S,showIndexNumber:f,addable:m,sortable:v,removable:g,maxItems:a.maxItems,minItems:a.minItems,globalOptions:u},on:r.listeners})])}},Zt={name:"ArrayFieldMultiSelect",functional:!0,props:i({},It),render:function(e,r){var t=r.props,a=t.schema,o=t.rootSchema,n=t.uiSchema,s=t.curNodePath,l=t.rootFormData,c=t.globalOptions,u=ct(Tr(a.items,o),n,s,l),d=et({schema:a,uiSchema:n,curNodePath:s,rootFormData:l},(function(){return{widget:c.WIDGET_MAP.common.checkboxGroup}}));return d.uiProps.multiple=!0,u&&!d.uiProps.enumOptions&&(d.uiProps.enumOptions=u),e(Wt,i(i({},r.data),{},{props:i(i({},r.props),d)}))}},Xt={name:"ArrayFieldTuple",props:i(i({},It),{},{itemsFormData:{type:Array,default:function(){return[]}}}),created:function(){this.fixItemsFormData()},methods:{fixItemsFormData:function(){var e=!Array.isArray(this.itemsFormData);if(e||this.itemsFormData.length<this.schema.items.length){var r=Ft(this.schema,void 0,this.rootSchema);e?this.$emit("onArrayOperate",{command:"setNewTarget",data:{newTarget:r}}):this.$emit("onArrayOperate",{command:"batchPush",data:{pushArray:r.slice(this.itemsFormData.length)}})}}},render:function(e){var r=this;if(!Array.isArray(this.itemsFormData))return null;var t,a,o=this.$props,n=o.schema,s=o.uiSchema,c=o.errorSchema,u=o.curNodePath,d=o.globalOptions,p=Yr({schema:n,uiSchema:s,curNodePath:u,rootFormData:this.rootFormData}),h=p.title,m=p.description,f=p.addable,v=p.showIndexNumber,g=p.sortable,y=p.removable,b=p.showTitle,P=p.showDescription,w=p.fieldClass,E=p.fieldAttrs,S=p.fieldStyle,F=(t=this.itemsFormData,a=this.schema.items.length-1,t.reduce((function(e,r,t){return e[t>a?1:0].push(r),e}),[[],[]])),x=F[0].map((function(t,a){return e(aa,{key:t.key,props:i(i({},r.$props),{},{required:![].concat(n.items[a].type).includes("null"),schema:n.items[a],uiSchema:s.items?s.items[a]:{},errorSchema:c.items?c.items[a]:{},curNodePath:Vr(u,a)})})})),O=F[1].map((function(t,a){var o=Gr({schema:n.additionalItems,uiSchema:s.additionalItems},a);return{key:t.key,vNode:e(aa,{key:t.key,props:i(i({},r.$props),{},{schema:n.additionalItems,required:![].concat(n.additionalItems.type).includes("null"),uiSchema:i(i({},s.additionalItems),o),errorSchema:c.additionalItems,curNodePath:Vr(u,a+n.items.length)})})}})),_=(void 0===f||f)&<(this.schema);return e(jt,{props:{title:h,description:m,showTitle:b,showDescription:P,curNodePath:u},class:w,attrs:E,style:S},[].concat(l(x),[e(Gt,{props:{vNodeList:O,tupleItemsLength:n.items.length,addable:_,showIndexNumber:v,sortable:g,removable:y,maxItems:n.maxItems,minItems:n.minItems,globalOptions:d},on:this.$listeners})]))}},Yt={name:"ArrayFieldSpecialFormat",props:It,functional:!0,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,n=t.curNodePath,s=t.rootFormData,l=et({schema:i({"ui:widget":t.globalOptions.WIDGET_MAP.formats[a.format]},a),uiSchema:o,curNodePath:n,rootFormData:s});return e(Wt,i(i({},r.data),{},{props:i(i({},r.props),l)}))}},ea={name:"ArrayField",props:It,data:function(){return{formKeys:this.getCuFormData().map((function(){return b()}))}},computed:{itemsFormData:function(){var e=this.$data.formKeys;return this.curFormData.map((function(r,t){return{key:e[t],value:r}}))},curFormData:function(){return this.getCuFormData()}},watch:{curFormData:function(e,r){e!==r&&Array.isArray(e)&&(this.formKeys=e.map((function(){return b()})))}},methods:{getCuFormData:function(){var e=this.$props,r=Br(e.rootFormData,e.curNodePath);return Array.isArray(r)?r:[]},getNewFormDataRow:function(){var e=this.$props,r=e.schema,t=e.rootSchema,a=r.items;return nt(this.schema)&<(this.schema)&&(a=r.additionalItems),Ft(a,void 0,t)},handleArrayOperate:function(e){var r=e.command,t=e.data,a={moveUp:function(e,r){!function(e,r){if(0===r)return!1;var t=[e[r],e[r-1]];e.splice.apply(e,[r-1,2].concat(t))}(e,r.index)},moveDown:function(e,r){!function(e,r){if(r===e.length-1)return!1;var t=e[r],a=[e[r+1],t];e.splice.apply(e,[r,2].concat(a))}(e,r.index)},remove:function(e,r){!function(e,r){e.splice(r,1).length}(e,r.index)},add:function(e,r){var t=r.newRowData;e.push(t)},batchPush:function(e,r){r.pushArray.forEach((function(r){e.push(r)}))},setNewTarget:function(e,r){Wr(r.formData,r.nodePath,r.newTarget)}}[r];if(!a)throw new Error("错误 - 未知的操作:[".concat(r,"]"));var o=t,i=t;"add"===r?(o={newRowData:this.getNewFormDataRow()},i={newRowData:b()}):"batchPush"===r?i={pushArray:o.pushArray.map((function(e){return b()}))}:"setNewTarget"===r&&(o={formData:this.rootFormData,nodePath:this.curNodePath,newTarget:o.newTarget},i={formData:this.$data,nodePath:"formKeys",newTarget:o.newTarget.map((function(e){return b()}))}),a.apply(this,[this.$data.formKeys,i]),a.apply(this,[this.curFormData,o])}},render:function(e){var r=this.$props,a=r.schema,o=r.uiSchema,n=r.rootSchema,l=r.rootFormData,c=r.curNodePath,u=r.globalOptions;if(!a.hasOwnProperty("items"))throw new Error("[".concat(a,"] 请先定义 items属性"));if(st(a,n))return e(Zt,{props:this.$props,class:t({},w(Zt.name),!0)});if(a.format||a["ui:widget"]||o["ui:widget"])return e(Yt,{props:this.$props,class:t({},w(Yt.name),!0)});var d=nt(a)?Xt:Jt;return e("div",[e(d,{props:i({itemsFormData:this.itemsFormData},this.$props),class:t({},w(d.name),!0),on:{onArrayOperate:this.handleArrayOperate}}),this.needValidFieldGroup?e(Wt,{key:"validateWidget-array",class:{validateWidget:!0,"validateWidget-array":!0},props:{schema:Object.entries(this.$props.schema).reduce((function(e,r){var t=s(r,2),a=t[0],o=t[1];return"items"!==a&&(e[a]=o),e}),{}),uiSchema:o,errorSchema:this.errorSchema,curNodePath:c,rootFormData:l,globalOptions:u}}):null])}},ra={name:"SelectLinkageField",props:i(i({},It),{},{combiningType:{type:String,default:"anyOf"},selectList:{type:Array,require:!0}}),data:function(){return{curSelectIndex:this.computedCurSelectIndexByFormData(Br(this.rootFormData,this.curNodePath))}},methods:{computedCurSelectIndexByFormData:function(e){var r=Pt(e,this.selectList,this.rootSchema,!0);return 0!==r?r:this.curSelectIndex||0},getSelectBoxVNode:function(){var e=this,r=et({schema:this.schema["".concat(this.combiningType,"Select")]||{},uiSchema:this.uiSchema["".concat(this.combiningType,"Select")]||{},curNodePath:this.curNodePath,rootFormData:this.rootFormData},(function(){return{widget:"SelectWidget"}}));if(r.label=r.label||this.schema.title,r.description=r.description||this.schema.description,!r.uiProps.enumOptions){var a=this.uiSchema[this.combiningType]||[];r.uiProps.enumOptions=this.selectList.map((function(e,r){return{label:Yr({schema:e,uiSchema:a[r],containsSpec:!1}).title||"选项 ".concat(r+1),value:r}}))}return this.$createElement(Wt,{key:"fieldSelect_".concat(this.combiningType),class:t({},"fieldSelect_".concat(this.combiningType),!0),props:i({isFormData:!1,curValue:this.curSelectIndex,globalOptions:this.globalOptions},r),on:{onChange:function(r){e.curSelectIndex=r}}})}},watch:{curSelectIndex:function(e,r){var t=Br(this.rootFormData,this.curNodePath),a=Ft(this.selectList[e],void 0,this.rootSchema),o=Object.prototype.hasOwnProperty;if(p(t)){var i=Tr(this.selectList[r],this.rootSchema);if("object"===f(i))for(var n in i.properties)o.call(i.properties,n)&&!o.call(a,n)&&Mr(t,n)}p(a)?Object.entries(a).forEach((function(e){var r=s(e,2),a=r[0],o=r[1];void 0!==o&&Wr(t,a,o)})):Wr(this.rootFormData,this.curNodePath,a||t)}},render:function(e){var r,a=this,o=this.$props.curNodePath,s=zr(o),l=null;if(("object"===this.schema.type||this.schema.properties)&&!function(e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!1;return!0}(this.schema.properties)){var c,u=Object.assign({},this.schema);delete u[this.combiningType],l=e(aa,{key:"origin_".concat(this.combiningType),class:(c={},t(c,"".concat(this.combiningType,"_originBox"),!0),t(c,"".concat(s,"-originBox"),!0),c),props:i(i({},this.$props),{},{schema:u})})}var p=[this.getSelectBoxVNode()],h=this.selectList[this.curSelectIndex];if(h){var m=this.schema,f=this.combiningType,v="".concat(this.combiningType,"Select");m.properties,m[f],m[v];var g=n(m,["properties",f,v].map(d));h=Object.assign({},g,h);var y=P(Yr({schema:this.schema,uiSchema:this.uiSchema,containsSpec:!1,curNodePath:o,rootFormData:this.rootFormData}),(function(e){return e===a.combiningType?void 0:"ui:".concat(e)})),b=P(rt({schema:this.schema,uiSchema:this.uiSchema,errorSchema:this.errorSchema}),(function(e){return e===a.combiningType?void 0:"err:".concat(e)}));p.push(e(aa,{key:"appendSchema_".concat(this.combiningType),props:i(i({},this.$props),{},{schema:i({"ui:showTitle":!1,"ui:showDescription":!1},h),required:this.required,uiSchema:i(i({},y),(this.uiSchema[this.combiningType]||[])[this.curSelectIndex]),errorSchema:i(i({},b),(this.errorSchema[this.combiningType]||[])[this.curSelectIndex])})}))}return p.push(e(Wt,{key:"validateWidget-".concat(this.combiningType),class:t({validateWidget:!0},"validateWidget-".concat(this.combiningType),!0),props:{schema:this.schema,uiSchema:this.uiSchema,errorSchema:this.errorSchema,curNodePath:this.curNodePath,rootFormData:this.rootFormData,globalOptions:this.globalOptions}})),e("div",[l,e("div",{key:"appendBox_".concat(this.combiningType),class:(r={appendCombining_box:!0},t(r,"".concat(this.combiningType,"_appendBox"),!0),t(r,"".concat(s,"-appendBox"),!0),r)},p)])}},ta={array:ea,boolean:Kt,integer:Ht,number:Ut,object:Bt,string:Qt,null:{render:function(){return null}},anyOf:{name:"AnyOfField",functional:!0,render:function(e,r){var t=r.data,a=t.props,o=n(t,["props"]);return e(ra,i(i({},o),{},{props:i(i({},a),{},{combiningType:"anyOf",selectList:a.schema.anyOf})}),r.children)}},oneOf:{name:"oneOfField",functional:!0,render:function(e,r){var t=r.data,a=t.props,o=n(t,["props"]);return e(ra,i(i({},o),{},{props:i(i({},a),{},{combiningType:"oneOf",selectList:a.schema.oneOf})}),r.children)}}},aa={name:"SchemaField",props:It,functional:!0,render:function(e,r){var a,o=r.props,n=o.rootSchema,s=Tr(o.schema,n),l=i(i({},o),{},{schema:s});if(0===Object.keys(s).length)return null;var c,u,d=Zr(ta,l),p=d.field,h=d.fieldProps,m=Jr({schema:s,uiSchema:o.uiSchema,curNodePath:o.curNodePath,rootFormData:o.rootFormData}),f=zr(o.curNodePath);return s.anyOf&&s.anyOf.length>0&&!it(s)?e(ta.anyOf,{class:(c={},t(c,"".concat(f,"-anyOf"),!0),t(c,"fieldItem",!0),t(c,"anyOfField",!0),c),props:l}):s.oneOf&&s.oneOf.length>0&&!it(s)?e(ta.oneOf,{class:(u={},t(u,"".concat(f,"-oneOf"),!0),t(u,"fieldItem",!0),t(u,"oneOfField",!0),u),props:l}):p&&!m?e(p,{props:i(i({},l),{},{fieldProps:h}),class:i(i({},r.data.class),{},(a={},t(a,w(p.name)||p,!0),t(a,"hiddenWidget",m),t(a,"fieldItem",!0),t(a,f,!0),a))}):null}};var oa={name:"CheckboxesWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}},ia=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("el-checkbox-group",e._g(e._b({},"el-checkbox-group",e.$attrs,!1),e.$listeners),e._l(e.enumOptions,(function(r,a){return t("el-checkbox",{key:a,attrs:{label:r.value}},[e._v("\n "+e._s(r.label)+"\n ")])})),1)};ia._withStripped=!0;var na=Dt({render:ia,staticRenderFns:[]},void 0,oa,void 0,!1,void 0,!1,void 0,void 0,void 0),sa={name:"RadioWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}},la=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("el-radio-group",e._g(e._b({},"el-radio-group",e.$attrs,!1),e.$listeners),e._l(e.enumOptions,(function(r,a){return t("el-radio",{key:a,attrs:{label:r.value}},[e._v("\n "+e._s(r.label)+"\n ")])})),1)};la._withStripped=!0;var ca=Dt({render:la,staticRenderFns:[]},void 0,sa,void 0,!1,void 0,!1,void 0,void 0,void 0),ua={name:"SelectWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}},da=function(){var e=this.$createElement,r=this._self._c||e;return r("el-select",this._g(this._b({},"el-select",this.$attrs,!1),this.$listeners),this._l(this.enumOptions,(function(e,t){return r("el-option",{key:t,attrs:{label:e.label,value:e.value}})})),1)};da._withStripped=!0;var pa={CheckboxesWidget:na,RadioWidget:ca,SelectWidget:Dt({render:da,staticRenderFns:[]},void 0,ua,void 0,!1,void 0,!1,void 0,void 0,void 0),TimePickerWidget:{name:"TimePickerWidget",functional:!0,render:function(e,r){r.data.attrs=i({"value-format":"HH:mm:ss"},r.data.attrs||{});var t=r.data.on.input;return r.data.on=i(i({},r.data.on),{},{input:function(e){t.apply(r.data.on,[null===e?void 0:e])}}),e("el-time-picker",r.data,r.children)}},DatePickerWidget:{name:"DatePickerWidget",functional:!0,render:function(e,r){var t=r.data.attrs||{},a=t.isNumberValue,o=t.isRange,s=n(t,["isNumberValue","isRange"]);r.data.attrs=i({type:o?"daterange":"date","value-format":a?"timestamp":"yyyy-MM-dd"},s);var l=r.data.on.input;return r.data.on=i(i({},r.data.on),{},{input:function(e){var t=null===e?o?[]:void 0:e;l.apply(r.data.on,[t])}}),e("el-date-picker",r.data,r.children)}},DateTimePickerWidget:{name:"DateTimePickerWidget",functional:!0,render:function(e,r){var t=r.data.attrs||{},a=t.isNumberValue,o=t.isRange,s=n(t,["isNumberValue","isRange"]);r.data.attrs=i({type:o?"datetimerange":"datetime"},s);var l=r.data.on.input;return r.data.on=i(i({},r.data.on),{},{input:function(e){var t;t=o?null===e?[]:e.map((function(e){return new Date(e)[a?"valueOf":"toISOString"]()})):null===e?void 0:new Date(e)[a?"valueOf":"toISOString"](),l.apply(r.data.on,[t])}}),e("el-date-picker",r.data,r.children)}},UploadWidget:{name:"UploadWidget",props:{value:{default:null,type:[String,Array]},responseFileUrl:{default:function(e){return e?e.url||e.data&&e.data.url:""},type:[Function]},btnText:{type:String,default:"点击上传"},slots:{type:null,default:null}},data:function(){var e=this.value,r=Array.isArray(e),t=this.$attrs.fileList||(r?e.map((function(e,r){return{name:"已上传文件(".concat(r+1,")"),url:e}})):e?[{name:"已上传文件",url:e}]:[]);return{isArrayValue:r,fileList:t}},methods:{getUrl:function(e){return e&&(e.response&&this.responseFileUrl(e.response)||e.url)||""},emitValue:function(e){var r,t=this;if(this.isArrayValue)r=e.length?e.reduce((function(e,r){var a=t.getUrl(r);return a&&e.push(a),e}),[]):[];else{var a=e[e.length-1];r=this.getUrl(a)}this.$emit("input",r)}},render:function(){var e=this,r=this.$createElement,t=this.$attrs,a=this.$props.slots,o={attrs:i(i({fileList:this.fileList,"on-exceed":function(){e.$message&&e.$message.warning("超出文件上传数")},"on-error":function(){e.$message&&e.$message.error("文件上传失败")},"on-preview":function(r){var t=e.getUrl(r);t&&function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_blank",t=document.createElement("a");t.style.display="none",t.target=r,t.href=e,document.body.appendChild(t),t.click(),document.body.removeChild(t)}(t)}},t),{},{"on-remove":function(r,a){e.emitValue(a),t["on-remove"]&&t["on-remove"](r,a)},"on-success":function(r,a,o){e.emitValue(o),t["on-success"]&&t["on-success"](r,a,o)}})};this.isArrayValue||(o.attrs.limit=1);var n=[];return a&&a.default?n.push(r("template",{slot:"default"},["function"==typeof a.default?a.default(r):a.default])):n.push(r("el-button",{props:{type:"primary"}},[this.btnText])),a&&a.tip&&n.push(r("template",{slot:"tip"},["function"==typeof a.tip?a.tip(r):a.tip])),r("el-upload",o,n)}}},ha={types:{boolean:"el-switch",string:"el-input",number:"el-input-number",integer:"el-input-number"},formats:{color:"el-color-picker",time:pa.TimePickerWidget,date:pa.DatePickerWidget,"date-time":pa.DateTimePickerWidget},common:{select:pa.SelectWidget,radioGroup:pa.RadioWidget,checkboxGroup:pa.CheckboxesWidget},widgetComponents:pa};xt(".genFromComponent.el-form--label-top .el-form-item__label{line-height:26px;padding-bottom:6px;font-size:14px}.genFromComponent .el-checkbox,.genFromComponent .el-color-picker{vertical-align:top}");var ma=Object.freeze({WIDGET_MAP:Object.freeze(ha),COMPONENT_MAP:Object.freeze({form:"el-form",formItem:"el-form-item",button:"el-button",popover:"el-popover"}),HELPERS:{isMiniDes:function(e){return e&&["left","right"].includes(e.labelPosition)}}}),fa=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r.WIDGET_MAP.widgetComponents&&Object.entries(r.WIDGET_MAP.widgetComponents).forEach((function(r){var t=s(r,2),a=t[0],o=t[1];return e.component(a,o)})),{name:"VueForm",props:Ot,provide:function(){return{genFormProvide:this.genFormProvide}},data:function(){var e=Ft(this.$props.schema,this.$props.value,this.$props.schema);return this.emitFormDataChange(e,this.value),{formData:e}},computed:{genFormProvide:function(){return{fallbackLabel:this.fallbackLabel}},footerParams:function(){return i({show:!0,okBtn:"保存",cancelBtn:"取消"},this.formFooter)}},watch:{formData:{handler:function(e,r){this.emitFormDataChange(e,r)},deep:!0},schema:function(e,r){this.willReceiveProps(e,r)},value:function(e,r){this.willReceiveProps(e,r)}},methods:{emitFormDataChange:function(e,r){this.$emit("input",e),this.$emit("on-change",{newValue:e,oldValue:r})},willReceiveProps:function(e,r){if(!v(e,r)){var t=Ft(this.$props.schema,this.$props.value,this.$props.schema);v(this.formData,t)||(this.formData=t)}}},mounted:function(){this.$emit("on-form-mounted",this.$refs.genEditForm)},render:function(e){var a,o=this,s=this.$scopedSlots.default?this.$scopedSlots.default({formData:o.formData,formRefFn:function(){return o.$refs.genEditForm}}):this.footerParams.show?e(_t,{props:{globalOptions:r,okBtn:o.footerParams.okBtn,cancelBtn:o.footerParams.cancelBtn,formItemAttrs:o.footerParams.formItemAttrs},on:{onCancel:function(){o.$emit("on-cancel")},onSubmit:function(){o.$refs.genEditForm.validate((function(e,r){return e?o.$emit("on-submit",o.formData):o.$emit("on-validation-failed",r)}))}}}):void 0,l=o.$props.formProps,c=l.layoutColumn,u=void 0===c?1:c,d=l.inlineFooter,p=l.inline,h=n(l,["layoutColumn","inlineFooter","inline"]),m={schema:this.schema,uiSchema:this.uiSchema,errorSchema:this.errorSchema,customFormats:this.customFormats,customRule:this.customRule,rootSchema:this.schema,rootFormData:this.formData,curNodePath:"",globalOptions:r,formProps:i({labelPosition:"top",labelSuffix:":"},h)};return e(r.COMPONENT_MAP.form,{class:(a={genFromComponent:!0,formInlineFooter:d,formInline:p},t(a,"genFromComponent_".concat(this.schema.id,"Form"),!!this.schema.id),t(a,"layoutColumn",!p),t(a,"layoutColumn-".concat(u),!p),a),ref:"genEditForm",props:i({model:o.formData},m.formProps)},[e(aa,{props:m}),s])}}}(ma);"undefined"!=typeof window&&window.Vue&&window.Vue.component("VueForm",fa);export default fa;export{aa as SchemaField,It as fieldProps,dt as formUtils,Ft as getDefaultFormState,ma as globalOptions,jr as i18n,wt as schemaValidate,Ur as vueUtils}; +!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var a=r.length-1,o=1;o<a;++o)r[o]=r[o].slice(1,-1);return r[a]=r[a].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function a(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function i(e){var a=r("[0-9]","[A-Fa-f]"),o=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),i="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",n=r("[\\:\\/\\?\\#\\[\\]\\@]",i),s=e?"[\\uE000-\\uF8FF]":"[]",l=r("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t("[A-Za-z]"+r("[A-Za-z]","[0-9]","[\\+\\-\\.]")+"*"),t(t(o+"|"+r(l,i,"[\\:]"))+"*");var c=t(t("25[0-5]")+"|"+t("2[0-4][0-9]")+"|"+t("1[0-9][0-9]")+"|"+t("0?[1-9][0-9]")+"|0?0?[0-9]"),u=t(c+"\\."+c+"\\."+c+"\\."+c),d=t(a+"{1,4}"),p=t(t(d+"\\:"+d)+"|"+u),h=t(t(d+"\\:")+"{6}"+p),m=t("\\:\\:"+t(d+"\\:")+"{5}"+p),f=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+p),v=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+p),g=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+p),y=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+p),b=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+p),P=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),w=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),E=t([h,m,f,v,g,y,b,P,w].join("|")),S=t(t(l+"|"+o)+"+");t("[vV]"+a+"+\\."+r(l,i,"[\\:]")+"+"),t(t(o+"|"+r(l,i))+"*");var F=t(o+"|"+r(l,i,"[\\:\\@]"));return t(t(o+"|"+r(l,i,"[\\@]"))+"+"),t(t(F+"|"+r("[\\/\\?]",s))+"*"),{NOT_SCHEME:new RegExp(r("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,i),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,i),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,i),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,i),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,i,"[\\:\\@\\/\\?]",s),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,i,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,i),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,n),"g"),PCT_ENCODED:new RegExp(o,"g"),IPV4ADDRESS:new RegExp("^("+u+")$"),IPV6ADDRESS:new RegExp("^\\[?("+E+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+S+")")+"?\\]?$")}}var n=i(!1),s=i(!0),l=function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,r){var t=[],a=!0,o=!1,i=void 0;try{for(var n,s=e[Symbol.iterator]();!(a=(n=s.next()).done)&&(t.push(n.value),!r||t.length!==r);a=!0);}catch(e){o=!0,i=e}finally{try{!a&&s.return&&s.return()}finally{if(o)throw i}}return t}(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=2147483647,u=/^xn--/,d=/[^\0-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,f=String.fromCharCode;function v(e){throw new RangeError(h[e])}function g(e,r){var t=e.split("@"),a="";t.length>1&&(a=t[0]+"@",e=t[1]);var o=function(e,r){for(var t=[],a=e.length;a--;)t[a]=r(e[a]);return t}((e=e.replace(p,".")).split("."),r).join(".");return a+o}function y(e){for(var r=[],t=0,a=e.length;t<a;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<a){var i=e.charCodeAt(t++);56320==(64512&i)?r.push(((1023&o)<<10)+(1023&i)+65536):(r.push(o),t--)}else r.push(o)}return r}var b=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},P=function(e,r,t){var a=0;for(e=t?m(e/700):e>>1,e+=m(e/r);e>455;a+=36)e=m(e/35);return m(a+36*e/(e+38))},w=function(e){var r,t=[],a=e.length,o=0,i=128,n=72,s=e.lastIndexOf("-");s<0&&(s=0);for(var l=0;l<s;++l)e.charCodeAt(l)>=128&&v("not-basic"),t.push(e.charCodeAt(l));for(var u=s>0?s+1:0;u<a;){for(var d=o,p=1,h=36;;h+=36){u>=a&&v("invalid-input");var f=(r=e.charCodeAt(u++))-48<10?r-22:r-65<26?r-65:r-97<26?r-97:36;(f>=36||f>m((c-o)/p))&&v("overflow"),o+=f*p;var g=h<=n?1:h>=n+26?26:h-n;if(f<g)break;var y=36-g;p>m(c/y)&&v("overflow"),p*=y}var b=t.length+1;n=P(o-d,b,0==d),m(o/b)>c-i&&v("overflow"),i+=m(o/b),o%=b,t.splice(o++,0,i)}return String.fromCodePoint.apply(String,t)},E=function(e){var r=[],t=(e=y(e)).length,a=128,o=0,i=72,n=!0,s=!1,l=void 0;try{for(var u,d=e[Symbol.iterator]();!(n=(u=d.next()).done);n=!0){var p=u.value;p<128&&r.push(f(p))}}catch(e){s=!0,l=e}finally{try{!n&&d.return&&d.return()}finally{if(s)throw l}}var h=r.length,g=h;for(h&&r.push("-");g<t;){var w=c,E=!0,S=!1,F=void 0;try{for(var x,O=e[Symbol.iterator]();!(E=(x=O.next()).done);E=!0){var _=x.value;_>=a&&_<w&&(w=_)}}catch(e){S=!0,F=e}finally{try{!E&&O.return&&O.return()}finally{if(S)throw F}}var D=g+1;w-a>m((c-o)/D)&&v("overflow"),o+=(w-a)*D,a=w;var $=!0,k=!1,j=void 0;try{for(var I,A=e[Symbol.iterator]();!($=(I=A.next()).done);$=!0){var C=I.value;if(C<a&&++o>c&&v("overflow"),C==a){for(var R=o,N=36;;N+=36){var L=N<=i?1:N>=i+26?26:N-i;if(R<L)break;var T=R-L,z=36-L;r.push(f(b(L+T%z,0))),R=m(T/z)}r.push(f(b(R,0))),i=P(o,D,g==h),o=0,++g}}}catch(e){k=!0,j=e}finally{try{!$&&A.return&&A.return()}finally{if(k)throw j}}++o,++a}return r.join("")},S=function(e){return g(e,(function(e){return d.test(e)?"xn--"+E(e):e}))},F=function(e){return g(e,(function(e){return u.test(e)?w(e.slice(4).toLowerCase()):e}))},x={};function O(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function _(e){for(var r="",t=0,a=e.length;t<a;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(a-t>=6){var i=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&i)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(a-t>=9){var n=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&n)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function D(e,r){function t(e){var t=_(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,O).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,O).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,O).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,O).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,O).replace(r.PCT_ENCODED,o)),e}function $(e){return e.replace(/^0*(.*)/,"$1")||"0"}function k(e,r){var t=e.match(r.IPV4ADDRESS)||[],a=l(t,2)[1];return a?a.split(".").map($).join("."):e}function j(e,r){var t=e.match(r.IPV6ADDRESS)||[],a=l(t,3),o=a[1],i=a[2];if(o){for(var n=o.toLowerCase().split("::").reverse(),s=l(n,2),c=s[0],u=s[1],d=u?u.split(":").map($):[],p=c.split(":").map($),h=r.IPV4ADDRESS.test(p[p.length-1]),m=h?7:8,f=p.length-m,v=Array(m),g=0;g<m;++g)v[g]=d[g]||p[f+g]||"";h&&(v[m-1]=k(v[m-1],r));var y=v.reduce((function(e,r,t){if(!r||"0"===r){var a=e[e.length-1];a&&a.index+a.length===t?a.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(y&&y.length>1){var P=v.slice(0,y.index),w=v.slice(y.index+y.length);b=P.join(":")+"::"+w.join(":")}else b=v.join(":");return i&&(b+="%"+i),b}return e}var I=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,A=void 0==="".match(/(){0}/)[1];function C(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},a=!1!==r.iri?s:n;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(I);if(o){A?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=j(k(t.host,a),a)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var i=x[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||i&&i.unicodeSupport)D(t,a);else{if(t.host&&(r.domainHost||i&&i.domainHost))try{t.host=S(t.host.replace(a.PCT_ENCODED,_).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}D(t,n)}i&&i.parse&&i.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function R(e,r){var t=!1!==r.iri?s:n,a=[];return void 0!==e.userinfo&&(a.push(e.userinfo),a.push("@")),void 0!==e.host&&a.push(j(k(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(a.push(":"),a.push(String(e.port))),a.length?a.join(""):void 0}var N=/^\.\.?\//,L=/^\/\.(\/|$)/,T=/^\/\.\.(\/|$)/,z=/^\/?(?:.|\n)*?(?=\/|$)/;function q(e){for(var r=[];e.length;)if(e.match(N))e=e.replace(N,"");else if(e.match(L))e=e.replace(L,"/");else if(e.match(T))e=e.replace(T,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(z);if(!t)throw new Error("Unexpected dot segment condition");var a=t[0];e=e.slice(a.length),r.push(a)}return r.join("")}function V(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?s:n,a=[],o=x[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?F(e.host):S(e.host.replace(t.PCT_ENCODED,_).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}D(e,t),"suffix"!==r.reference&&e.scheme&&(a.push(e.scheme),a.push(":"));var i=R(e,r);if(void 0!==i&&("suffix"!==r.reference&&a.push("//"),a.push(i),e.path&&"/"!==e.path.charAt(0)&&a.push("/")),void 0!==e.path){var l=e.path;r.absolutePath||o&&o.absolutePath||(l=q(l)),void 0===i&&(l=l.replace(/^\/\//,"/%2F")),a.push(l)}return void 0!==e.query&&(a.push("?"),a.push(e.query)),void 0!==e.fragment&&(a.push("#"),a.push(e.fragment)),a.join("")}function M(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],o={};return a||(e=C(V(e,t),t),r=C(V(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=q(r.path||""),o.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=q(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=q(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=q(o.path)),o.query=r.query):(o.path=e.path,void 0!==r.query?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function W(e,r){return e&&e.toString().replace(r&&r.iri?s.PCT_ENCODED:n.PCT_ENCODED,_)}var B={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},Q={scheme:"https",domainHost:B.domainHost,parse:B.parse,serialize:B.serialize};function U(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var H={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=U(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(U(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),a=l(t,2),o=a[0],i=a[1];e.path=o&&"/"!==o?o:void 0,e.query=i,e.resourceName=void 0}return e.fragment=void 0,e}},K={scheme:"wss",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize},G={},J="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Z="[0-9A-Fa-f]",X=t(t("%[EFef]"+Z+"%"+Z+Z+"%"+Z+Z)+"|"+t("%[89A-Fa-f]"+Z+"%"+Z+Z)+"|"+t("%"+Z+Z)),Y=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),ee=new RegExp(J,"g"),re=new RegExp(X,"g"),te=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',Y),"g"),ae=new RegExp(r("[^]",J,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),oe=ae;function ie(e){var r=_(e);return r.match(ee)?r:e}var ne={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,i={},n=t.query.split("&"),s=0,l=n.length;s<l;++s){var c=n[s].split("=");switch(c[0]){case"to":for(var u=c[1].split(","),d=0,p=u.length;d<p;++d)a.push(u[d]);break;case"subject":t.subject=W(c[1],r);break;case"body":t.body=W(c[1],r);break;default:o=!0,i[W(c[0],r)]=W(c[1],r)}}o&&(t.headers=i)}t.query=void 0;for(var h=0,m=a.length;h<m;++h){var f=a[h].split("@");if(f[0]=W(f[0]),r.unicodeSupport)f[1]=W(f[1],r).toLowerCase();else try{f[1]=S(W(f[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}a[h]=f.join("@")}return t},serialize:function(e,r){var t,a=e,i=null!=(t=e.to)?t instanceof Array?t:"number"!=typeof t.length||t.split||t.setInterval||t.call?[t]:Array.prototype.slice.call(t):[];if(i){for(var n=0,s=i.length;n<s;++n){var l=String(i[n]),c=l.lastIndexOf("@"),u=l.slice(0,c).replace(re,ie).replace(re,o).replace(te,O),d=l.slice(c+1);try{d=r.iri?F(d):S(W(d,r).toLowerCase())}catch(e){a.error=a.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}i[n]=u+"@"+d}a.path=i.join(",")}var p=e.headers=e.headers||{};e.subject&&(p.subject=e.subject),e.body&&(p.body=e.body);var h=[];for(var m in p)p[m]!==G[m]&&h.push(m.replace(re,ie).replace(re,o).replace(ae,O)+"="+p[m].replace(re,ie).replace(re,o).replace(oe,O));return h.length&&(a.query=h.join("&")),a}},se=/^([^\:]+)\:(.*)/,le={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(se),a=e;if(t){var o=r.scheme||a.scheme||"urn",i=t[1].toLowerCase(),n=t[2],s=o+":"+(r.nid||i),l=x[s];a.nid=i,a.nss=n,a.path=void 0,l&&(a=l.parse(a,r))}else a.error=a.error||"URN can not be parsed.";return a},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",a=e.nid,o=t+":"+(r.nid||a),i=x[o];i&&(e=i.serialize(e,r));var n=e,s=e.nss;return n.path=(a||r.nid)+":"+s,n}},ce=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ue={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match(ce)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};x[B.scheme]=B,x[Q.scheme]=Q,x[H.scheme]=H,x[K.scheme]=K,x[ne.scheme]=ne,x[le.scheme]=le,x[ue.scheme]=ue,e.SCHEMES=x,e.pctEncChar=O,e.pctDecChars=_,e.parse=C,e.removeDotSegments=q,e.serialize=V,e.resolveComponents=M,e.resolve=function(e,r,t){var a=function(e,r){var t=e;if(r)for(var a in r)t[a]=r[a];return t}({scheme:"null"},t);return V(M(C(e,a),C(r,a),a,!0),a)},e.normalize=function(e,r){return"string"==typeof e?e=V(C(e,r),r):"object"===a(e)&&(e=C(V(e,r),r)),e},e.equal=function(e,r,t){return"string"==typeof e?e=V(C(e,t),t):"object"===a(e)&&(e=V(e,t)),"string"==typeof r?r=V(C(r,t),t):"object"===a(r)&&(r=V(r,t)),e===r},e.escapeComponent=function(e,r){return e&&e.toString().replace(r&&r.iri?s.ESCAPE:n.ESCAPE,O)},e.unescapeComponent=W,Object.defineProperty(e,"__esModule",{value:!0})}(r)}));(_=D)&&_.__esModule&&Object.prototype.hasOwnProperty.call(_,"default")&&_.default;var $=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 a,o,i;if(Array.isArray(r)){if((a=r.length)!=t.length)return!1;for(o=a;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((a=(i=Object.keys(r)).length)!==Object.keys(t).length)return!1;for(o=a;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,i[o]))return!1;for(o=a;0!=o--;){var n=i[o];if(!e(r[n],t[n]))return!1}return!0}return r!=r&&t!=t},k={copy:function(e,r){for(var t in r=r||{},e)r[t]=e[t];return r},checkDataType:j,checkDataTypes:function(e,r,t){switch(e.length){case 1:return j(e[0],r,t,!0);default:var a="",o=A(e);for(var i in o.array&&o.object&&(a=o.null?"(":"(!"+r+" || ",a+="typeof "+r+' !== "object")',delete o.null,delete o.array,delete o.object),o.number&&delete o.integer,o)a+=(a?" && ":"")+j(i,r,t,!0);return a}},coerceToTypes:function(e,r){if(Array.isArray(r)){for(var t=[],a=0;a<r.length;a++){var o=r[a];(I[o]||"array"===e&&"array"===o)&&(t[t.length]=o)}if(t.length)return t}else{if(I[r])return[r];if("array"===e&&"array"===r)return["array"]}},toHash:A,getProperty:N,escapeQuotes:L,equal:$,ucs2length:function(e){for(var r,t=0,a=e.length,o=0;o<a;)t++,(r=e.charCodeAt(o++))>=55296&&r<=56319&&o<a&&56320==(64512&(r=e.charCodeAt(o)))&&o++;return t},varOccurences:function(e,r){r+="[^0-9]";var t=e.match(new RegExp(r,"g"));return t?t.length:0},varReplace:function(e,r,t){return r+="([^0-9])",t=t.replace(/\$/g,"$$$$"),e.replace(new RegExp(r,"g"),t+"$1")},schemaHasRules:function(e,r){if("boolean"==typeof e)return!e;for(var t in e)if(r[t])return!0},schemaHasRulesExcept:function(e,r,t){if("boolean"==typeof e)return!e&&"not"!=t;for(var a in e)if(a!=t&&r[a])return!0},schemaUnknownRules:function(e,r){if("boolean"==typeof e)return;for(var t in e)if(!r[t])return t},toQuotedString:T,getPathExpr:function(e,r,t,a){return V(e,t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'")},getPath:function(e,r,t){var a=T(t?"/"+M(r):N(r));return V(e,a)},getData:function(e,r,t){var a,o,i,n;if(""===e)return"rootData";if("/"==e[0]){if(!z.test(e))throw new Error("Invalid JSON-pointer: "+e);o=e,i="rootData"}else{if(!(n=e.match(q)))throw new Error("Invalid JSON-pointer: "+e);if(a=+n[1],"#"==(o=n[2])){if(a>=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(i="data"+(r-a||""),!o)return i}for(var s=i,l=o.split("/"),c=0;c<l.length;c++){var u=l[c];u&&(i+=N(W(u)),s+=" && "+i)}return s},unescapeFragment:function(e){return W(decodeURIComponent(e))},unescapeJsonPointer:W,escapeFragment:function(e){return encodeURIComponent(M(e))},escapeJsonPointer:M};function j(e,r,t,a){var o=a?" !== ":" === ",i=a?" || ":" && ",n=a?"!":"",s=a?"":"!";switch(e){case"null":return r+o+"null";case"array":return n+"Array.isArray("+r+")";case"object":return"("+n+r+i+"typeof "+r+o+'"object"'+i+s+"Array.isArray("+r+"))";case"integer":return"(typeof "+r+o+'"number"'+i+s+"("+r+" % 1)"+i+r+o+r+(t?i+n+"isFinite("+r+")":"")+")";case"number":return"(typeof "+r+o+'"'+e+'"'+(t?i+n+"isFinite("+r+")":"")+")";default:return"typeof "+r+o+'"'+e+'"'}}var I=A(["string","number","integer","boolean","null"]);function A(e){for(var r={},t=0;t<e.length;t++)r[e[t]]=!0;return r}var C=/^[a-z$_][a-z$_0-9]*$/i,R=/'|\\/g;function N(e){return"number"==typeof e?"["+e+"]":C.test(e)?"."+e:"['"+L(e)+"']"}function L(e){return e.replace(R,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function T(e){return"'"+L(e)+"'"}var z=/^\/(?:[^~]|~0|~1)*$/,q=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function V(e,r){return'""'==e?r:(e+" + "+r).replace(/([^\\])' \+ '/g,"$1")}function M(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function W(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}var B=function(e){k.copy(e,this)};var Q=x((function(e){var r=e.exports=function(e,t,a){"function"==typeof t&&(a=t,t={}),function e(t,a,o,i,n,s,l,c,u,d){if(i&&"object"==typeof i&&!Array.isArray(i)){for(var p in a(i,n,s,l,c,u,d),i){var h=i[p];if(Array.isArray(h)){if(p in r.arrayKeywords)for(var m=0;m<h.length;m++)e(t,a,o,h[m],n+"/"+p+"/"+m,s,n,p,i,m)}else if(p in r.propsKeywords){if(h&&"object"==typeof h)for(var f in h)e(t,a,o,h[f],n+"/"+p+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),s,n,p,i,f)}else(p in r.keywords||t.allKeys&&!(p in r.skipKeywords))&&e(t,a,o,h,n+"/"+p,s,n,p,i)}o(i,n,s,l,c,u,d)}}(t,"function"==typeof(a=t.cb||a)?a:a.pre||function(){},a.post||function(){},e,"",e)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}})),U=H;function H(e,r,t){var a=this._refs[t];if("string"==typeof a){if(!this._refs[a])return H.call(this,e,r,a);a=this._refs[a]}if((a=a||this._schemas[t])instanceof B)return Y(a.schema,this._opts.inlineRefs)?a.schema:a.validate||this._compile(a);var o,i,n,s=K.call(this,r,t);return s&&(o=s.schema,r=s.root,n=s.baseId),o instanceof B?i=o.validate||e.call(this,o.schema,r,void 0,n):void 0!==o&&(i=Y(o,this._opts.inlineRefs)?o:e.call(this,o,r,void 0,n)),i}function K(e,r){var t=D.parse(r),a=re(t),o=ee(this._getId(e.schema));if(0===Object.keys(e.schema).length||a!==o){var i=ae(a),n=this._refs[i];if("string"==typeof n)return G.call(this,e,n,t);if(n instanceof B)n.validate||this._compile(n),e=n;else{if(!((n=this._schemas[i])instanceof B))return;if(n.validate||this._compile(n),i==ae(r))return{schema:n,root:e,baseId:o};e=n}if(!e.schema)return;o=ee(this._getId(e.schema))}return Z.call(this,t,o,e.schema,e)}function G(e,r,t){var a=K.call(this,e,r);if(a){var o=a.schema,i=a.baseId;e=a.root;var n=this._getId(o);return n&&(i=oe(i,n)),Z.call(this,t,i,o,e)}}H.normalizeId=ae,H.fullPath=ee,H.url=oe,H.ids=function(e){var r=ae(this._getId(e)),t={"":r},a={"":ee(r,!1)},o={},i=this;return Q(e,{allKeys:!0},(function(e,r,n,s,l,c,u){if(""!==r){var d=i._getId(e),p=t[s],h=a[s]+"/"+l;if(void 0!==u&&(h+="/"+("number"==typeof u?u:k.escapeFragment(u))),"string"==typeof d){d=p=ae(p?D.resolve(p,d):d);var m=i._refs[d];if("string"==typeof m&&(m=i._refs[m]),m&&m.schema){if(!$(e,m.schema))throw new Error('id "'+d+'" resolves to more than one schema')}else if(d!=ae(h))if("#"==d[0]){if(o[d]&&!$(e,o[d]))throw new Error('id "'+d+'" resolves to more than one schema');o[d]=e}else i._refs[d]=h}t[r]=p,a[r]=h}})),o},H.inlineRef=Y,H.schema=K;var J=k.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function Z(e,r,t,a){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var o=e.fragment.split("/"),i=1;i<o.length;i++){var n=o[i];if(n){if(void 0===(t=t[n=k.unescapeFragment(n)]))break;var s;if(!J[n]&&((s=this._getId(t))&&(r=oe(r,s)),t.$ref)){var l=oe(r,t.$ref),c=K.call(this,a,l);c&&(t=c.schema,a=c.root,r=c.baseId)}}}return void 0!==t&&t!==a.schema?{schema:t,root:a,baseId:r}:void 0}}var X=k.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function Y(e,r){return!1!==r&&(void 0===r||!0===r?function e(r){var t;if(Array.isArray(r)){for(var a=0;a<r.length;a++)if("object"==typeof(t=r[a])&&!e(t))return!1}else for(var o in r){if("$ref"==o)return!1;if("object"==typeof(t=r[o])&&!e(t))return!1}return!0}(e):r?function e(r){var t,a=0;if(Array.isArray(r)){for(var o=0;o<r.length;o++)if("object"==typeof(t=r[o])&&(a+=e(t)),a==1/0)return 1/0}else for(var i in r){if("$ref"==i)return 1/0;if(X[i])a++;else if("object"==typeof(t=r[i])&&(a+=e(t)+1),a==1/0)return 1/0}return a}(e)<=r:void 0)}function ee(e,r){return!1!==r&&(e=ae(e)),re(D.parse(e))}function re(e){return D.serialize(e).split("#")[0]+"#"}var te=/#\/?$/;function ae(e){return e?e.replace(te,""):""}function oe(e,r){return r=ae(r),D.resolve(e,r)}var ie={Validation:se((function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:se(ne)};function ne(e,r,t){this.message=t||ne.message(e,r),this.missingRef=U.url(e,r),this.missingSchema=U.normalizeId(U.fullPath(this.missingRef))}function se(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}ne.message=function(e,r){return"can't resolve reference "+r+" from id "+e};var le=function(e,r){r||(r={}),"function"==typeof r&&(r={cmp:r});var t,a="boolean"==typeof r.cycles&&r.cycles,o=r.cmp&&(t=r.cmp,function(e){return function(r,a){var o={key:r,value:e[r]},i={key:a,value:e[a]};return t(o,i)}}),i=[];return function e(r){if(r&&r.toJSON&&"function"==typeof r.toJSON&&(r=r.toJSON()),void 0!==r){if("number"==typeof r)return isFinite(r)?""+r:"null";if("object"!=typeof r)return JSON.stringify(r);var t,n;if(Array.isArray(r)){for(n="[",t=0;t<r.length;t++)t&&(n+=","),n+=e(r[t])||"null";return n+"]"}if(null===r)return"null";if(-1!==i.indexOf(r)){if(a)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=i.push(r)-1,l=Object.keys(r).sort(o&&o(r));for(n="",t=0;t<l.length;t++){var c=l[t],u=e(r[c]);u&&(n&&(n+=","),n+=JSON.stringify(c)+":"+u)}return i.splice(s,1),"{"+n+"}"}}(e)},ce=function(e,r,t){var a="",o=!0===e.schema.$async,i=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),n=e.self._getId(e.schema);if(e.opts.strictKeywords){var s=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(s){var l="unknown keyword: "+s;if("log"!==e.opts.strictKeywords)throw new Error(l);e.logger.warn(l)}}if(e.isTop&&(a+=" var validate = ",o&&(e.async=!0,a+="async "),a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",n&&(e.opts.sourceCode||e.opts.processCode)&&(a+=" /*# sourceURL="+n+" */ ")),"boolean"==typeof e.schema||!i&&!e.schema.$ref){var c=e.level,u=e.dataLevel,d=e.schema["false schema"],p=e.schemaPath+e.util.getProperty("false schema"),h=e.errSchemaPath+"/false schema",m=!e.opts.allErrors,f="data"+(u||""),v="valid"+c;if(!1===e.schema){e.isTop?m=!0:a+=" var "+v+" = false; ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'boolean schema is false' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";var g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?a+=o?" return data; ":" validate.errors = null; return true; ":a+=" var "+v+" = true; ";return e.isTop&&(a+=" }; return validate; "),a}if(e.isTop){var y=e.isTop;c=e.level=0,u=e.dataLevel=0,f="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var b="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}a+=" var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data; "}else{c=e.level,f="data"+((u=e.dataLevel)||"");if(n&&(e.baseId=e.resolve.url(e.baseId,n)),o&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+c+" = errors;"}v="valid"+c,m=!e.opts.allErrors;var P="",w="",E=e.schema.type,S=Array.isArray(E);if(E&&e.opts.nullable&&!0===e.schema.nullable&&(S?-1==E.indexOf("null")&&(E=E.concat("null")):"null"!=E&&(E=[E,"null"],S=!0)),S&&1==E.length&&(E=E[0],S=!1),e.schema.$ref&&i){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(i=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(a+=" "+e.RULES.all.$comment.code(e,"$comment")),E){if(e.opts.coerceTypes)var F=e.util.coerceToTypes(e.opts.coerceTypes,E);var x=e.RULES.types[E];if(F||S||!0===x||x&&!Z(x)){p=e.schemaPath+".type",h=e.errSchemaPath+"/type",p=e.schemaPath+".type",h=e.errSchemaPath+"/type";var O=S?"checkDataTypes":"checkDataType";if(a+=" if ("+e.util[O](E,f,e.opts.strictNumbers,!0)+") { ",F){var _="dataType"+c,D="coerced"+c;a+=" var "+_+" = typeof "+f+"; var "+D+" = undefined; ","array"==e.opts.coerceTypes&&(a+=" if ("+_+" == 'object' && Array.isArray("+f+") && "+f+".length == 1) { "+f+" = "+f+"[0]; "+_+" = typeof "+f+"; if ("+e.util.checkDataType(e.schema.type,f,e.opts.strictNumbers)+") "+D+" = "+f+"; } "),a+=" if ("+D+" !== undefined) ; ";var $=F;if($)for(var k,j=-1,I=$.length-1;j<I;)"string"==(k=$[j+=1])?a+=" else if ("+_+" == 'number' || "+_+" == 'boolean') "+D+" = '' + "+f+"; else if ("+f+" === null) "+D+" = ''; ":"number"==k||"integer"==k?(a+=" else if ("+_+" == 'boolean' || "+f+" === null || ("+_+" == 'string' && "+f+" && "+f+" == +"+f+" ","integer"==k&&(a+=" && !("+f+" % 1)"),a+=")) "+D+" = +"+f+"; "):"boolean"==k?a+=" else if ("+f+" === 'false' || "+f+" === 0 || "+f+" === null) "+D+" = false; else if ("+f+" === 'true' || "+f+" === 1) "+D+" = true; ":"null"==k?a+=" else if ("+f+" === '' || "+f+" === 0 || "+f+" === false) "+D+" = null; ":"array"==e.opts.coerceTypes&&"array"==k&&(a+=" else if ("+_+" == 'string' || "+_+" == 'number' || "+_+" == 'boolean' || "+f+" == null) "+D+" = ["+f+"]; ");a+=" else { ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } if ("+D+" !== undefined) { ";var A=u?"data"+(u-1||""):"parentData";a+=" "+f+" = "+D+"; ",u||(a+="if ("+A+" !== undefined)"),a+=" "+A+"["+(u?e.dataPathArr[u]:"parentDataProperty")+"] = "+D+"; } "}else{(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } "}}if(e.schema.$ref&&!i)a+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",m&&(a+=" } if (errors === ",a+=y?"0":"errs_"+c,a+=") { ",w+="}");else{var C=e.RULES;if(C)for(var R=-1,N=C.length-1;R<N;)if(Z(x=C[R+=1])){if(x.type&&(a+=" if ("+e.util.checkDataType(x.type,f,e.opts.strictNumbers)+") { "),e.opts.useDefaults)if("object"==x.type&&e.schema.properties){d=e.schema.properties;var L=Object.keys(d);if(L)for(var T,z=-1,q=L.length-1;z<q;){if(void 0!==(W=d[T=L[z+=1]]).default){var V=f+e.util.getProperty(T);if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+V;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+V+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+V+" === null || "+V+" === '' "),a+=" ) "+V+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(W.default)+" ":a+=" "+JSON.stringify(W.default)+" ",a+="; "}}}else if("array"==x.type&&Array.isArray(e.schema.items)){var M=e.schema.items;if(M){j=-1;for(var W,B=M.length-1;j<B;)if(void 0!==(W=M[j+=1]).default){V=f+"["+j+"]";if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+V;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+V+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+V+" === null || "+V+" === '' "),a+=" ) "+V+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(W.default)+" ":a+=" "+JSON.stringify(W.default)+" ",a+="; "}}}var Q=x.rules;if(Q)for(var U,H=-1,K=Q.length-1;H<K;)if(X(U=Q[H+=1])){var G=U.code(e,U.keyword,x.type);G&&(a+=" "+G+" ",m&&(P+="}"))}if(m&&(a+=" "+P+" ",P=""),x.type&&(a+=" } ",E&&E===x.type&&!F)){a+=" else { ";var J;p=e.schemaPath+".type",h=e.errSchemaPath+"/type";(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}m&&(a+=" if (errors === ",a+=y?"0":"errs_"+c,a+=") { ",w+="}")}}function Z(e){for(var r=e.rules,t=0;t<r.length;t++)if(X(r[t]))return!0}function X(r){return void 0!==e.schema[r.keyword]||r.implements&&function(r){for(var t=r.implements,a=0;a<t.length;a++)if(void 0!==e.schema[t[a]])return!0}(r)}return m&&(a+=" "+w+" "),y?(o?(a+=" if (errors === 0) return data; ",a+=" else throw new ValidationError(vErrors); "):(a+=" validate.errors = vErrors; ",a+=" return errors === 0; "),a+=" }; return validate;"):a+=" var "+v+" = errors === errs_"+c+";",a},ue=k.ucs2length,de=ie.Validation,pe=function e(r,t,a,o){var i=this,n=this._opts,s=[void 0],l={},c=[],u={},d=[],p={},h=[];t=t||{schema:r,refVal:s,refs:l};var m=he.call(this,r,t,o),f=this._compilations[m.index];if(m.compiling)return f.callValidate=function e(){var r=f.validate,t=r.apply(this,arguments);return e.errors=r.errors,t};var v=this._formats,g=this.RULES;try{var y=P(r,t,a,o);f.validate=y;var b=f.callValidate;return b&&(b.schema=y.schema,b.errors=null,b.refs=y.refs,b.refVal=y.refVal,b.root=y.root,b.$async=y.$async,n.sourceCode&&(b.source=y.source)),y}finally{me.call(this,r,t,o)}function P(r,a,o,u){var p=!a||a&&a.schema==r;if(a.schema!=t.schema)return e.call(i,r,a,o,u);var m,f=!0===r.$async,y=ce({isTop:!0,schema:r,isRoot:p,baseId:u,root:a,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:ie.MissingRef,RULES:g,validate:ce,util:k,resolve:U,resolveRef:w,usePattern:F,useDefault:x,useCustomRule:O,opts:n,formats:v,logger:i.logger,self:i});y=Pe(s,ye)+Pe(c,ve)+Pe(d,ge)+Pe(h,be)+y,n.processCode&&(y=n.processCode(y,r));try{m=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",y)(i,g,v,t,s,d,h,$,ue,de),s[0]=m}catch(e){throw i.logger.error("Error compiling schema, function code:",y),e}return m.schema=r,m.errors=null,m.refs=l,m.refVal=s,m.root=p?m:a,f&&(m.$async=!0),!0===n.sourceCode&&(m.source={code:y,patterns:c,defaults:d}),m}function w(r,o,c){o=U.url(r,o);var u,d,p=l[o];if(void 0!==p)return S(u=s[p],d="refVal["+p+"]");if(!c&&t.refs){var h=t.refs[o];if(void 0!==h)return S(u=t.refVal[h],d=E(o,u))}d=E(o);var m=U.call(i,P,t,o);if(void 0===m){var f=a&&a[o];f&&(m=U.inlineRef(f,n.inlineRefs)?f:e.call(i,f,t,a,r))}if(void 0!==m)return function(e,r){var t=l[e];s[t]=r}(o,m),S(m,d);!function(e){delete l[e]}(o)}function E(e,r){var t=s.length;return s[t]=r,l[e]=t,"refVal"+t}function S(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}function F(e){var r=u[e];return void 0===r&&(r=u[e]=c.length,c[r]=e),"pattern"+r}function x(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return k.toQuotedString(e);case"object":if(null===e)return"null";var r=le(e),t=p[r];return void 0===t&&(t=p[r]=d.length,d[t]=e),"default"+t}}function O(e,r,t,a){if(!1!==i._opts.validateSchema){var o=e.definition.dependencies;if(o&&!o.every((function(e){return Object.prototype.hasOwnProperty.call(t,e)})))throw new Error("parent schema must have all required keywords: "+o.join(","));var s=e.definition.validateSchema;if(s)if(!s(r)){var l="keyword schema is invalid: "+i.errorsText(s.errors);if("log"!=i._opts.validateSchema)throw new Error(l);i.logger.error(l)}}var c,u=e.definition.compile,d=e.definition.inline,p=e.definition.macro;if(u)c=u.call(i,r,t,a);else if(p)c=p.call(i,r,t,a),!1!==n.validateSchema&&i.validateSchema(c,!0);else if(d)c=d.call(i,a,e.keyword,r,t);else if(!(c=e.definition.validate))return;if(void 0===c)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var m=h.length;return h[m]=c,{code:"customRule"+m,validate:c}}};function he(e,r,t){var a=fe.call(this,e,r,t);return a>=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}function me(e,r,t){var a=fe.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}function fe(e,r,t){for(var a=0;a<this._compilations.length;a++){var o=this._compilations[a];if(o.schema==e&&o.root==r&&o.baseId==t)return a}return-1}function ve(e,r){return"var pattern"+e+" = new RegExp("+k.toQuotedString(r[e])+");"}function ge(e){return"var default"+e+" = defaults["+e+"];"}function ye(e,r){return void 0===r[e]?"":"var refVal"+e+" = refVal["+e+"];"}function be(e){return"var customRule"+e+" = customRules["+e+"];"}function Pe(e,r){if(!e.length)return"";for(var t="",a=0;a<e.length;a++)t+=r(a,e);return t}var we=x((function(e){var r=e.exports=function(){this._cache={}};r.prototype.put=function(e,r){this._cache[e]=r},r.prototype.get=function(e){return this._cache[e]},r.prototype.del=function(e){delete this._cache[e]},r.prototype.clear=function(){this._cache={}}})),Ee=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Se=[0,31,28,31,30,31,30,31,31,30,31,30,31],Fe=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,xe=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,Oe=/^(?:[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,_e=/^(?:(?:[^\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,De=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,$e=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,ke=/^(?:\/(?:[^~/]|~0|~1)*)*$/,je=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Ie=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,Ae=Ce;function Ce(e){return e="full"==e?"full":"fast",k.copy(Ce[e])}function Re(e){var r=e.match(Ee);if(!r)return!1;var t=+r[1],a=+r[2],o=+r[3];return a>=1&&a<=12&&o>=1&&o<=(2==a&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(t)?29:Se[a])}function Ne(e,r){var t=e.match(Fe);if(!t)return!1;var a=t[1],o=t[2],i=t[3],n=t[5];return(a<=23&&o<=59&&i<=59||23==a&&59==o&&60==i)&&(!r||n)}Ce.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":_e,url:De,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:xe,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:qe,uuid:$e,"json-pointer":ke,"json-pointer-uri-fragment":je,"relative-json-pointer":Ie},Ce.full={date:Re,time:Ne,"date-time":function(e){var r=e.split(Le);return 2==r.length&&Re(r[0])&&Ne(r[1],!0)},uri:function(e){return Te.test(e)&&Oe.test(e)},"uri-reference":/^(?:[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,"uri-template":_e,url:De,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:xe,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:qe,uuid:$e,"json-pointer":ke,"json-pointer-uri-fragment":je,"relative-json-pointer":Ie};var Le=/t|\s/i;var Te=/\/|:/;var ze=/[^\\]\\Z/;function qe(e){if(ze.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var Ve=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s;var h="maximum"==r,m=h?"exclusiveMaximum":"exclusiveMinimum",f=e.schema[m],v=e.opts.$data&&f&&f.$data,g=h?"<":">",y=h?">":"<",b=void 0;if(!p&&"number"!=typeof s&&void 0!==s)throw new Error(r+" must be number");if(!v&&void 0!==f&&"number"!=typeof f&&"boolean"!=typeof f)throw new Error(m+" must be number or boolean");if(v){var P=e.util.getData(f.$data,n,e.dataPathArr),w="exclusive"+i,E="exclType"+i,S="exclIsNumber"+i,F="' + "+(_="op"+i)+" + '";o+=" var schemaExcl"+i+" = "+P+"; ",o+=" var "+w+"; var "+E+" = typeof "+(P="schemaExcl"+i)+"; if ("+E+" != 'boolean' && "+E+" != 'undefined' && "+E+" != 'number') { ";var x;b=m;(x=x||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(o+=" , message: '"+m+" should be boolean' "),e.opts.verbose&&(o+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var O=o;o=x.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+E+" == 'number' ? ( ("+w+" = "+a+" === undefined || "+P+" "+g+"= "+a+") ? "+d+" "+y+"= "+P+" : "+d+" "+y+" "+a+" ) : ( ("+w+" = "+P+" === true) ? "+d+" "+y+"= "+a+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { var op"+i+" = "+w+" ? '"+g+"' : '"+g+"='; ",void 0===s&&(b=m,c=e.errSchemaPath+"/"+m,a=P,p=v)}else{F=g;if((S="number"==typeof f)&&p){var _="'"+F+"'";o+=" if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" ( "+a+" === undefined || "+f+" "+g+"= "+a+" ? "+d+" "+y+"= "+f+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { "}else{S&&void 0===s?(w=!0,b=m,c=e.errSchemaPath+"/"+m,a=f,y+="="):(S&&(a=Math[h?"min":"max"](f,s)),f===(!S||a)?(w=!0,b=m,c=e.errSchemaPath+"/"+m,y+="="):(w=!1,F+="="));_="'"+F+"'";o+=" if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+" "+y+" "+a+" || "+d+" !== "+d+") { "}}b=b||r,(x=x||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+_+", limit: "+a+", exclusive: "+w+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be "+F+" ",o+=p?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";O=o;return o=x.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",u&&(o+=" else { "),o},Me=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+".length "+("maxItems"==r?">":"<")+" "+a+") { ";var h=r,m=m||[];m.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(h||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxItems"==r?"more":"fewer",o+=" than ",o+=p?"' + "+a+" + '":""+s,o+=" items' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=m.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},We=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");var h="maxLength"==r?">":"<";o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),!1===e.opts.unicode?o+=" "+d+".length ":o+=" ucs2length("+d+") ",o+=" "+h+" "+a+") { ";var m=r,f=f||[];f.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(m||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT be ",o+="maxLength"==r?"longer":"shorter",o+=" than ",o+=p?"' + "+a+" + '":""+s,o+=" characters' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var v=o;return o=f.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+v+"]); ":o+=" validate.errors = ["+v+"]; return false; ":o+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},Be=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" Object.keys("+d+").length "+("maxProperties"==r?">":"<")+" "+a+") { ";var h=r,m=m||[];m.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(h||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxProperties"==r?"more":"fewer",o+=" than ",o+=p?"' + "+a+" + '":""+s,o+=" properties' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=m.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},Qe={$ref:function(e,r,t){var a,o,i=" ",n=e.level,s=e.dataLevel,l=e.schema[r],c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(s||""),p="valid"+n;if("#"==l||"#/"==l)e.isRoot?(a=e.async,o="validate"):(a=!0===e.root.schema.$async,o="root.refVal[0]");else{var h=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===h){var m=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(m),(y=y||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(i+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(i+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var f=i;i=y.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+f+"]); ":i+=" validate.errors = ["+f+"]; return false; ":i+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(i+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,l,m);e.logger.warn(m),u&&(i+=" if (true) { ")}}else if(h.inline){var v=e.util.copy(e);v.level++;var g="valid"+v.level;v.schema=h.schema,v.schemaPath="",v.errSchemaPath=l,i+=" "+e.validate(v).replace(/validate\.schema/g,h.code)+" ",u&&(i+=" if ("+g+") { ")}else a=!0===h.$async||e.async&&!1!==h.$async,o=h.code}if(o){var y;(y=y||[]).push(i),i="",e.opts.passContext?i+=" "+o+".call(this, ":i+=" "+o+"( ",i+=" "+d+", (dataPath || '')",'""'!=e.errorPath&&(i+=" + "+e.errorPath);var b=i+=" , "+(s?"data"+(s-1||""):"parentData")+" , "+(s?e.dataPathArr[s]:"parentDataProperty")+", rootData) ";if(i=y.pop(),a){if(!e.async)throw new Error("async schema referenced by sync schema");u&&(i+=" var "+p+"; "),i+=" try { await "+b+"; ",u&&(i+=" "+p+" = true; "),i+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",u&&(i+=" "+p+" = false; "),i+=" } ",u&&(i+=" if ("+p+") { ")}else i+=" if (!"+b+") { if (vErrors === null) vErrors = "+o+".errors; else vErrors = vErrors.concat("+o+".errors); errors = vErrors.length; } ",u&&(i+=" else { ")}return i},allOf:function(e,r,t){var a=" ",o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,s=!e.opts.allErrors,l=e.util.copy(e),c="";l.level++;var u="valid"+l.level,d=l.baseId,p=!0,h=o;if(h)for(var m,f=-1,v=h.length-1;f<v;)m=h[f+=1],(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0||!1===m:e.util.schemaHasRules(m,e.RULES.all))&&(p=!1,l.schema=m,l.schemaPath=i+"["+f+"]",l.errSchemaPath=n+"/"+f,a+=" "+e.validate(l)+" ",l.baseId=d,s&&(a+=" if ("+u+") { ",c+="}"));return s&&(a+=p?" if (true) { ":" "+c.slice(0,-1)+" "),a},anyOf:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e),m="";h.level++;var f="valid"+h.level;if(n.every((function(r){return e.opts.strictKeywords?"object"==typeof r&&Object.keys(r).length>0||!1===r:e.util.schemaHasRules(r,e.RULES.all)}))){var v=h.baseId;a+=" var "+p+" = errors; var "+d+" = false; ";var g=e.compositeRule;e.compositeRule=h.compositeRule=!0;var y=n;if(y)for(var b,P=-1,w=y.length-1;P<w;)b=y[P+=1],h.schema=b,h.schemaPath=s+"["+P+"]",h.errSchemaPath=l+"/"+P,a+=" "+e.validate(h)+" ",h.baseId=v,a+=" "+d+" = "+d+" || "+f+"; if (!"+d+") { ",m+="}";e.compositeRule=h.compositeRule=g,a+=" "+m+" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else c&&(a+=" if (true) { ");return a},$comment:function(e,r,t){var a=" ",o=e.schema[r],i=e.errSchemaPath+"/"+r;e.opts.allErrors;var n=e.util.toQuotedString(o);return!0===e.opts.$comment?a+=" console.log("+n+");":"function"==typeof e.opts.$comment&&(a+=" self._opts.$comment("+n+", "+e.util.toQuotedString(i)+", validate.root.schema);"),a},const:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p=e.opts.$data&&n&&n.$data;p&&(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; "),p||(a+=" var schema"+o+" = validate.schema"+s+";"),a+="var "+d+" = equal("+u+", schema"+o+"); if (!"+d+") { ";var h=h||[];h.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValue: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var m=a;return a=h.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+m+"]); ":a+=" validate.errors = ["+m+"]; return false; ":a+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",c&&(a+=" else { "),a},contains:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e);h.level++;var m="valid"+h.level,f="i"+o,v=h.dataLevel=e.dataLevel+1,g="data"+v,y=e.baseId,b=e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all);if(a+="var "+p+" = errors;var "+d+";",b){var P=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.schema=n,h.schemaPath=s,h.errSchemaPath=l,a+=" var "+m+" = false; for (var "+f+" = 0; "+f+" < "+u+".length; "+f+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers,!0);var w=u+"["+f+"]";h.dataPathArr[v]=f;var E=e.validate(h);h.baseId=y,e.util.varOccurences(E,g)<2?a+=" "+e.util.varReplace(E,g,w)+" ":a+=" var "+g+" = "+w+"; "+E+" ",a+=" if ("+m+") break; } ",e.compositeRule=h.compositeRule=P,a+=" if (!"+m+") {"}else a+=" if ("+u+".length == 0) {";var S=S||[];S.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should contain a valid item' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var F=a;return a=S.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+F+"]); ":a+=" validate.errors = ["+F+"]; return false; ":a+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",b&&(a+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a},dependencies:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e),h="";p.level++;var m="valid"+p.level,f={},v={},g=e.opts.ownProperties;for(w in n)if("__proto__"!=w){var y=n[w],b=Array.isArray(y)?v:f;b[w]=y}a+="var "+d+" = errors;";var P=e.errorPath;for(var w in a+="var missing"+o+";",v)if((b=v[w]).length){if(a+=" if ( "+u+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),c){a+=" && ( ";var E=b;if(E)for(var S=-1,F=E.length-1;S<F;){k=E[S+=1],S&&(a+=" || "),a+=" ( ( "+(C=u+(A=e.util.getProperty(k)))+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(k)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?k:A)+") ) "}a+=")) { ";var x="missing"+o,O="' + "+x+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,x,!0):P+" + "+x);var _=_||[];_.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var D=a;a=_.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+D+"]); ":a+=" validate.errors = ["+D+"]; return false; ":a+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{a+=" ) { ";var $=b;if($)for(var k,j=-1,I=$.length-1;j<I;){k=$[j+=1];var A=e.util.getProperty(k),C=(O=e.util.escapeQuotes(k),u+A);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,k,e.opts.jsonPointers)),a+=" if ( "+C+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(k)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",c&&(h+="}",a+=" else { ")}e.errorPath=P;var R=p.baseId;for(var w in f){y=f[w];(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all))&&(a+=" "+m+" = true; if ( "+u+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),a+=") { ",p.schema=y,p.schemaPath=s+e.util.getProperty(w),p.errSchemaPath=l+"/"+e.util.escapeFragment(w),a+=" "+e.validate(p)+" ",p.baseId=R,a+=" } ",c&&(a+=" if ("+m+") { ",h+="}"))}return c&&(a+=" "+h+" if ("+d+" == errors) {"),a},enum:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p=e.opts.$data&&n&&n.$data;p&&(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ");var h="i"+o,m="schema"+o;p||(a+=" var "+m+" = validate.schema"+s+";"),a+="var "+d+";",p&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=d+" = false;for (var "+h+"=0; "+h+"<"+m+".length; "+h+"++) if (equal("+u+", "+m+"["+h+"])) { "+d+" = true; break; }",p&&(a+=" } "),a+=" if (!"+d+") { ";var f=f||[];f.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var v=a;return a=f.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+v+"]); ":a+=" validate.errors = ["+v+"]; return false; ":a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",c&&(a+=" else { "),a},format:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||"");if(!1===e.opts.format)return c&&(a+=" if (true) { "),a;var d,p=e.opts.$data&&n&&n.$data;p?(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",d="schema"+o):d=n;var h=e.opts.unknownFormats,m=Array.isArray(h);if(p){a+=" var "+(f="format"+o)+" = formats["+d+"]; var "+(v="isObject"+o)+" = typeof "+f+" == 'object' && !("+f+" instanceof RegExp) && "+f+".validate; var "+(g="formatType"+o)+" = "+v+" && "+f+".type || 'string'; if ("+v+") { ",e.async&&(a+=" var async"+o+" = "+f+".async; "),a+=" "+f+" = "+f+".validate; } if ( ",p&&(a+=" ("+d+" !== undefined && typeof "+d+" != 'string') || "),a+=" (","ignore"!=h&&(a+=" ("+d+" && !"+f+" ",m&&(a+=" && self._opts.unknownFormats.indexOf("+d+") == -1 "),a+=") || "),a+=" ("+f+" && "+g+" == '"+t+"' && !(typeof "+f+" == 'function' ? ",e.async?a+=" (async"+o+" ? await "+f+"("+u+") : "+f+"("+u+")) ":a+=" "+f+"("+u+") ",a+=" : "+f+".test("+u+"))))) {"}else{var f;if(!(f=e.formats[n])){if("ignore"==h)return e.logger.warn('unknown format "'+n+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(a+=" if (true) { "),a;if(m&&h.indexOf(n)>=0)return c&&(a+=" if (true) { "),a;throw new Error('unknown format "'+n+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,g=(v="object"==typeof f&&!(f instanceof RegExp)&&f.validate)&&f.type||"string";if(v){var y=!0===f.async;f=f.validate}if(g!=t)return c&&(a+=" if (true) { "),a;if(y){if(!e.async)throw new Error("async format in sync schema");a+=" if (!(await "+(b="formats"+e.util.getProperty(n)+".validate")+"("+u+"))) { "}else{a+=" if (! ";var b="formats"+e.util.getProperty(n);v&&(b+=".validate"),a+="function"==typeof f?" "+b+"("+u+") ":" "+b+".test("+u+") ",a+=") { "}}var P=P||[];P.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",a+=p?""+d:""+e.util.toQuotedString(n),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",a+=p?"' + "+d+" + '":""+e.util.escapeQuotes(n),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=p?"validate.schema"+s:""+e.util.toQuotedString(n),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var w=a;return a=P.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",c&&(a+=" else { "),a},if:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e);h.level++;var m="valid"+h.level,f=e.schema.then,v=e.schema.else,g=void 0!==f&&(e.opts.strictKeywords?"object"==typeof f&&Object.keys(f).length>0||!1===f:e.util.schemaHasRules(f,e.RULES.all)),y=void 0!==v&&(e.opts.strictKeywords?"object"==typeof v&&Object.keys(v).length>0||!1===v:e.util.schemaHasRules(v,e.RULES.all)),b=h.baseId;if(g||y){var P;h.createErrors=!1,h.schema=n,h.schemaPath=s,h.errSchemaPath=l,a+=" var "+p+" = errors; var "+d+" = true; ";var w=e.compositeRule;e.compositeRule=h.compositeRule=!0,a+=" "+e.validate(h)+" ",h.baseId=b,h.createErrors=!0,a+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",e.compositeRule=h.compositeRule=w,g?(a+=" if ("+m+") { ",h.schema=e.schema.then,h.schemaPath=e.schemaPath+".then",h.errSchemaPath=e.errSchemaPath+"/then",a+=" "+e.validate(h)+" ",h.baseId=b,a+=" "+d+" = "+m+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'then'; ":P="'then'",a+=" } ",y&&(a+=" else { ")):a+=" if (!"+m+") { ",y&&(h.schema=e.schema.else,h.schemaPath=e.schemaPath+".else",h.errSchemaPath=e.errSchemaPath+"/else",a+=" "+e.validate(h)+" ",h.baseId=b,a+=" "+d+" = "+m+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'else'; ":P="'else'",a+=" } "),a+=" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+P+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match \"' + "+P+" + '\" schema' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",c&&(a+=" else { ")}else c&&(a+=" if (true) { ");return a},items:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e),m="";h.level++;var f="valid"+h.level,v="i"+o,g=h.dataLevel=e.dataLevel+1,y="data"+g,b=e.baseId;if(a+="var "+p+" = errors;var "+d+";",Array.isArray(n)){var P=e.schema.additionalItems;if(!1===P){a+=" "+d+" = "+u+".length <= "+n.length+"; ";var w=l;l=e.errSchemaPath+"/additionalItems",a+=" if (!"+d+") { ";var E=E||[];E.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+n.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+n.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var S=a;a=E.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",l=w,c&&(m+="}",a+=" else { ")}var F=n;if(F)for(var x,O=-1,_=F.length-1;O<_;)if(x=F[O+=1],e.opts.strictKeywords?"object"==typeof x&&Object.keys(x).length>0||!1===x:e.util.schemaHasRules(x,e.RULES.all)){a+=" "+f+" = true; if ("+u+".length > "+O+") { ";var D=u+"["+O+"]";h.schema=x,h.schemaPath=s+"["+O+"]",h.errSchemaPath=l+"/"+O,h.errorPath=e.util.getPathExpr(e.errorPath,O,e.opts.jsonPointers,!0),h.dataPathArr[g]=O;var $=e.validate(h);h.baseId=b,e.util.varOccurences($,y)<2?a+=" "+e.util.varReplace($,y,D)+" ":a+=" var "+y+" = "+D+"; "+$+" ",a+=" } ",c&&(a+=" if ("+f+") { ",m+="}")}if("object"==typeof P&&(e.opts.strictKeywords?"object"==typeof P&&Object.keys(P).length>0||!1===P:e.util.schemaHasRules(P,e.RULES.all))){h.schema=P,h.schemaPath=e.schemaPath+".additionalItems",h.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+f+" = true; if ("+u+".length > "+n.length+") { for (var "+v+" = "+n.length+"; "+v+" < "+u+".length; "+v+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=u+"["+v+"]";h.dataPathArr[g]=v;$=e.validate(h);h.baseId=b,e.util.varOccurences($,y)<2?a+=" "+e.util.varReplace($,y,D)+" ":a+=" var "+y+" = "+D+"; "+$+" ",c&&(a+=" if (!"+f+") break; "),a+=" } } ",c&&(a+=" if ("+f+") { ",m+="}")}}else if(e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all)){h.schema=n,h.schemaPath=s,h.errSchemaPath=l,a+=" for (var "+v+" = 0; "+v+" < "+u+".length; "+v+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=u+"["+v+"]";h.dataPathArr[g]=v;$=e.validate(h);h.baseId=b,e.util.varOccurences($,y)<2?a+=" "+e.util.varReplace($,y,D)+" ":a+=" var "+y+" = "+D+"; "+$+" ",c&&(a+=" if (!"+f+") break; "),a+=" }"}return c&&(a+=" "+m+" if ("+p+" == errors) {"),a},maximum:Ve,minimum:Ve,maxItems:Me,minItems:Me,maxLength:We,minLength:We,maxProperties:Be,minProperties:Be,multipleOf:function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");o+="var division"+i+";if (",p&&(o+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),o+=" (division"+i+" = "+d+" / "+a+", ",e.opts.multipleOfPrecision?o+=" Math.abs(Math.round(division"+i+") - division"+i+") > 1e-"+e.opts.multipleOfPrecision+" ":o+=" division"+i+" !== parseInt(division"+i+") ",o+=" ) ",p&&(o+=" ) "),o+=" ) { ";var h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be multiple of ",o+=p?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var m=o;return o=h.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},not:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level;if(e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all)){p.schema=n,p.schemaPath=s,p.errSchemaPath=l,a+=" var "+d+" = errors; ";var m,f=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.createErrors=!1,p.opts.allErrors&&(m=p.opts.allErrors,p.opts.allErrors=!1),a+=" "+e.validate(p)+" ",p.createErrors=!0,m&&(p.opts.allErrors=m),e.compositeRule=p.compositeRule=f,a+=" if ("+h+") { ";var v=v||[];v.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var g=a;a=v.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(a+=" if (false) { ");return a},oneOf:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e),m="";h.level++;var f="valid"+h.level,v=h.baseId,g="prevValid"+o,y="passingSchemas"+o;a+="var "+p+" = errors , "+g+" = false , "+d+" = false , "+y+" = null; ";var b=e.compositeRule;e.compositeRule=h.compositeRule=!0;var P=n;if(P)for(var w,E=-1,S=P.length-1;E<S;)w=P[E+=1],(e.opts.strictKeywords?"object"==typeof w&&Object.keys(w).length>0||!1===w:e.util.schemaHasRules(w,e.RULES.all))?(h.schema=w,h.schemaPath=s+"["+E+"]",h.errSchemaPath=l+"/"+E,a+=" "+e.validate(h)+" ",h.baseId=v):a+=" var "+f+" = true; ",E&&(a+=" if ("+f+" && "+g+") { "+d+" = false; "+y+" = ["+y+", "+E+"]; } else { ",m+="}"),a+=" if ("+f+") { "+d+" = "+g+" = true; "+y+" = "+E+"; }";return e.compositeRule=h.compositeRule=b,a+=m+"if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a},pattern:function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'string') || "),o+=" !"+(p?"(new RegExp("+a+"))":e.usePattern(s))+".test("+d+") ) { ";var h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { pattern: ",o+=p?""+a:""+e.util.toQuotedString(s),o+=" } ",!1!==e.opts.messages&&(o+=" , message: 'should match pattern \"",o+=p?"' + "+a+" + '":""+e.util.escapeQuotes(s),o+="\"' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+e.util.toQuotedString(s),o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var m=o;return o=h.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},properties:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e),h="";p.level++;var m="valid"+p.level,f="key"+o,v="idx"+o,g=p.dataLevel=e.dataLevel+1,y="data"+g,b="dataProperties"+o,P=Object.keys(n||{}).filter(A),w=e.schema.patternProperties||{},E=Object.keys(w).filter(A),S=e.schema.additionalProperties,F=P.length||E.length,x=!1===S,O="object"==typeof S&&Object.keys(S).length,_=e.opts.removeAdditional,D=x||O||_,$=e.opts.ownProperties,k=e.baseId,j=e.schema.required;if(j&&(!e.opts.$data||!j.$data)&&j.length<e.opts.loopRequired)var I=e.util.toHash(j);function A(e){return"__proto__"!==e}if(a+="var "+d+" = errors;var "+m+" = true;",$&&(a+=" var "+b+" = undefined;"),D){if(a+=$?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+u+") { ",F){if(a+=" var isAdditional"+o+" = !(false ",P.length)if(P.length>8)a+=" || validate.schema"+s+".hasOwnProperty("+f+") ";else{var C=P;if(C)for(var R=-1,N=C.length-1;R<N;)G=C[R+=1],a+=" || "+f+" == "+e.util.toQuotedString(G)+" "}if(E.length){var L=E;if(L)for(var T=-1,z=L.length-1;T<z;)ie=L[T+=1],a+=" || "+e.usePattern(ie)+".test("+f+") "}a+=" ); if (isAdditional"+o+") { "}if("all"==_)a+=" delete "+u+"["+f+"]; ";else{var q=e.errorPath,V="' + "+f+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers)),x)if(_)a+=" delete "+u+"["+f+"]; ";else{a+=" "+m+" = false; ";var M=l;l=e.errSchemaPath+"/additionalProperties",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { additionalProperty: '"+V+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is an invalid additional property":a+="should NOT have additional properties",a+="' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var W=a;a=te.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+W+"]); ":a+=" validate.errors = ["+W+"]; return false; ":a+=" var err = "+W+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=M,c&&(a+=" break; ")}else if(O)if("failing"==_){a+=" var "+d+" = errors; ";var B=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=S,p.schemaPath=e.schemaPath+".additionalProperties",p.errSchemaPath=e.errSchemaPath+"/additionalProperties",p.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);var Q=u+"["+f+"]";p.dataPathArr[g]=f;var U=e.validate(p);p.baseId=k,e.util.varOccurences(U,y)<2?a+=" "+e.util.varReplace(U,y,Q)+" ":a+=" var "+y+" = "+Q+"; "+U+" ",a+=" if (!"+m+") { errors = "+d+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+u+"["+f+"]; } ",e.compositeRule=p.compositeRule=B}else{p.schema=S,p.schemaPath=e.schemaPath+".additionalProperties",p.errSchemaPath=e.errSchemaPath+"/additionalProperties",p.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);Q=u+"["+f+"]";p.dataPathArr[g]=f;U=e.validate(p);p.baseId=k,e.util.varOccurences(U,y)<2?a+=" "+e.util.varReplace(U,y,Q)+" ":a+=" var "+y+" = "+Q+"; "+U+" ",c&&(a+=" if (!"+m+") break; ")}e.errorPath=q}F&&(a+=" } "),a+=" } ",c&&(a+=" if ("+m+") { ",h+="}")}var H=e.opts.useDefaults&&!e.compositeRule;if(P.length){var K=P;if(K)for(var G,J=-1,Z=K.length-1;J<Z;){var X=n[G=K[J+=1]];if(e.opts.strictKeywords?"object"==typeof X&&Object.keys(X).length>0||!1===X:e.util.schemaHasRules(X,e.RULES.all)){var Y=e.util.getProperty(G),ee=(Q=u+Y,H&&void 0!==X.default);p.schema=X,p.schemaPath=s+Y,p.errSchemaPath=l+"/"+e.util.escapeFragment(G),p.errorPath=e.util.getPath(e.errorPath,G,e.opts.jsonPointers),p.dataPathArr[g]=e.util.toQuotedString(G);U=e.validate(p);if(p.baseId=k,e.util.varOccurences(U,y)<2){U=e.util.varReplace(U,y,Q);var re=Q}else{re=y;a+=" var "+y+" = "+Q+"; "}if(ee)a+=" "+U+" ";else{if(I&&I[G]){a+=" if ( "+re+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+m+" = false; ";q=e.errorPath,M=l;var te,ae=e.util.escapeQuotes(G);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(q,G,e.opts.jsonPointers)),l=e.errSchemaPath+"/required",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+ae+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+ae+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";W=a;a=te.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+W+"]); ":a+=" validate.errors = ["+W+"]; return false; ":a+=" var err = "+W+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=M,e.errorPath=q,a+=" } else { "}else c?(a+=" if ( "+re+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+m+" = true; } else { "):(a+=" if ("+re+" !== undefined ",$&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=" ) { ");a+=" "+U+" } "}}c&&(a+=" if ("+m+") { ",h+="}")}}if(E.length){var oe=E;if(oe)for(var ie,ne=-1,se=oe.length-1;ne<se;){X=w[ie=oe[ne+=1]];if(e.opts.strictKeywords?"object"==typeof X&&Object.keys(X).length>0||!1===X:e.util.schemaHasRules(X,e.RULES.all)){p.schema=X,p.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(ie),p.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(ie),a+=$?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+u+") { ",a+=" if ("+e.usePattern(ie)+".test("+f+")) { ",p.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);Q=u+"["+f+"]";p.dataPathArr[g]=f;U=e.validate(p);p.baseId=k,e.util.varOccurences(U,y)<2?a+=" "+e.util.varReplace(U,y,Q)+" ":a+=" var "+y+" = "+Q+"; "+U+" ",c&&(a+=" if (!"+m+") break; "),a+=" } ",c&&(a+=" else "+m+" = true; "),a+=" } ",c&&(a+=" if ("+m+") { ",h+="}")}}}return c&&(a+=" "+h+" if ("+d+" == errors) {"),a},propertyNames:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level;if(a+="var "+d+" = errors;",e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all)){p.schema=n,p.schemaPath=s,p.errSchemaPath=l;var m="key"+o,f="idx"+o,v="i"+o,g="' + "+m+" + '",y="data"+(p.dataLevel=e.dataLevel+1),b="dataProperties"+o,P=e.opts.ownProperties,w=e.baseId;P&&(a+=" var "+b+" = undefined; "),a+=P?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+f+"=0; "+f+"<"+b+".length; "+f+"++) { var "+m+" = "+b+"["+f+"]; ":" for (var "+m+" in "+u+") { ",a+=" var startErrs"+o+" = errors; ";var E=m,S=e.compositeRule;e.compositeRule=p.compositeRule=!0;var F=e.validate(p);p.baseId=w,e.util.varOccurences(F,y)<2?a+=" "+e.util.varReplace(F,y,E)+" ":a+=" var "+y+" = "+E+"; "+F+" ",e.compositeRule=p.compositeRule=S,a+=" if (!"+h+") { for (var "+v+"=startErrs"+o+"; "+v+"<errors; "+v+"++) { vErrors["+v+"].propertyName = "+m+"; } var err = ",!1!==e.createErrors?(a+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { propertyName: '"+g+"' } ",!1!==e.opts.messages&&(a+=" , message: 'property name \\'"+g+"\\' is invalid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),c&&(a+=" break; "),a+=" } }"}return c&&(a+=" if ("+d+" == errors) {"),a},required:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p=e.opts.$data&&n&&n.$data;p&&(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ");var h="schema"+o;if(!p)if(n.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var m=[],f=n;if(f)for(var v,g=-1,y=f.length-1;g<y;){v=f[g+=1];var b=e.schema.properties[v];b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0||!1===b:e.util.schemaHasRules(b,e.RULES.all))||(m[m.length]=v)}}else m=n;if(p||m.length){var P=e.errorPath,w=p||m.length>=e.opts.loopRequired,E=e.opts.ownProperties;if(c)if(a+=" var missing"+o+"; ",w){p||(a+=" var "+h+" = validate.schema"+s+"; ");var S="' + "+($="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,$,e.opts.jsonPointers)),a+=" var "+d+" = true; ",p&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=" for (var "+O+" = 0; "+O+" < "+h+".length; "+O+"++) { "+d+" = "+u+"["+h+"["+O+"]] !== undefined ",E&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", "+h+"["+O+"]) "),a+="; if (!"+d+") break; } ",p&&(a+=" } "),a+=" if (!"+d+") { ",(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var F=a;a=D.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+F+"]); ":a+=" validate.errors = ["+F+"]; return false; ":a+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var x=m;if(x)for(var O=-1,_=x.length-1;O<_;){j=x[O+=1],O&&(a+=" || "),a+=" ( ( "+(R=u+(C=e.util.getProperty(j)))+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(j)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?j:C)+") ) "}a+=") { ";var D;S="' + "+($="missing"+o)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,$,!0):P+" + "+$),(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";F=a;a=D.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+F+"]); ":a+=" validate.errors = ["+F+"]; return false; ":a+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(w){p||(a+=" var "+h+" = validate.schema"+s+"; ");var $;S="' + "+($="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,$,e.opts.jsonPointers)),p&&(a+=" if ("+h+" && !Array.isArray("+h+")) { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+h+" !== undefined) { "),a+=" for (var "+O+" = 0; "+O+" < "+h+".length; "+O+"++) { if ("+u+"["+h+"["+O+"]] === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", "+h+"["+O+"]) "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",p&&(a+=" } ")}else{var k=m;if(k)for(var j,I=-1,A=k.length-1;I<A;){j=k[I+=1];var C=e.util.getProperty(j),R=(S=e.util.escapeQuotes(j),u+C);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,j,e.opts.jsonPointers)),a+=" if ( "+R+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(j)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=P}else c&&(a+=" if (true) {");return a},uniqueItems:function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p="valid"+i,h=e.opts.$data&&s&&s.$data;if(h?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,(s||h)&&!1!==e.opts.uniqueItems){h&&(o+=" var "+p+"; if ("+a+" === false || "+a+" === undefined) "+p+" = true; else if (typeof "+a+" != 'boolean') "+p+" = false; else { "),o+=" var i = "+d+".length , "+p+" = true , j; if (i > 1) { ";var m=e.schema.items&&e.schema.items.type,f=Array.isArray(m);if(!m||"object"==m||"array"==m||f&&(m.indexOf("object")>=0||m.indexOf("array")>=0))o+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+d+"[i], "+d+"[j])) { "+p+" = false; break outer; } } } ";else{o+=" var itemIndices = {}, item; for (;i--;) { var item = "+d+"[i]; ";var v="checkDataType"+(f?"s":"");o+=" if ("+e.util[v](m,"item",e.opts.strictNumbers,!0)+") continue; ",f&&(o+=" if (typeof item == 'string') item = '\"' + item; "),o+=" if (typeof itemIndices[item] == 'number') { "+p+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}o+=" } ",h&&(o+=" } "),o+=" if (!"+p+") { ";var g=g||[];g.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(o+=" , schema: ",o+=h?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var y=o;o=g.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+y+"]); ":o+=" validate.errors = ["+y+"]; return false; ":o+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",u&&(o+=" else { ")}else u&&(o+=" if (true) { ");return o},validate:ce},Ue=k.toHash,He=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"],Ke=function(e,r){for(var t=0;t<r.length;t++){e=JSON.parse(JSON.stringify(e));var a,o=r[t].split("/"),i=e;for(a=1;a<o.length;a++)i=i[o[a]];for(a=0;a<He.length;a++){var n=He[a],s=i[n];s&&(i[n]={anyOf:[s,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e},Ge=ie.MissingRef,Je=function e(r,t,a){var o=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof t&&(a=t,t=void 0);var i=n(r).then((function(){var e=o._addSchema(r,void 0,t);return e.validate||function e(r){try{return o._compile(r)}catch(e){if(e instanceof Ge)return a(e);throw e}function a(a){var i=a.missingSchema;if(c(i))throw new Error("Schema "+i+" is loaded but "+a.missingRef+" cannot be resolved");var s=o._loadingSchemas[i];return s||(s=o._loadingSchemas[i]=o._opts.loadSchema(i)).then(l,l),s.then((function(e){if(!c(i))return n(e).then((function(){c(i)||o.addSchema(e,i,void 0,t)}))})).then((function(){return e(r)}));function l(){delete o._loadingSchemas[i]}function c(e){return o._refs[e]||o._schemas[e]}}}(e)}));a&&i.then((function(e){a(null,e)}),a);return i;function n(r){var t=r.$schema;return t&&!o.getSchema(t)?e.call(o,{$ref:t},!0):Promise.resolve()}};var Ze=function(e,r,t){var a,o,i=" ",n=e.level,s=e.dataLevel,l=e.schema[r],c=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,d=!e.opts.allErrors,p="data"+(s||""),h="valid"+n,m="errs__"+n,f=e.opts.$data&&l&&l.$data;f?(i+=" var schema"+n+" = "+e.util.getData(l.$data,s,e.dataPathArr)+"; ",o="schema"+n):o=l;var v,g,y,b,P,w="definition"+n,E=this.definition,S="";if(f&&E.$data){P="keywordValidate"+n;var F=E.validateSchema;i+=" var "+w+" = RULES.custom['"+r+"'].definition; var "+P+" = "+w+".validate;"}else{if(!(b=e.useCustomRule(this,l,e.schema,e)))return;o="validate.schema"+c,P=b.code,v=E.compile,g=E.inline,y=E.macro}var x=P+".errors",O="i"+n,_="ruleErr"+n,D=E.async;if(D&&!e.async)throw new Error("async keyword in sync schema");if(g||y||(i+=x+" = null;"),i+="var "+m+" = errors;var "+h+";",f&&E.$data&&(S+="}",i+=" if ("+o+" === undefined) { "+h+" = true; } else { ",F&&(S+="}",i+=" "+h+" = "+w+".validateSchema("+o+"); if ("+h+") { ")),g)E.statements?i+=" "+b.validate+" ":i+=" "+h+" = "+b.validate+"; ";else if(y){var $=e.util.copy(e);S="";$.level++;var k="valid"+$.level;$.schema=b.validate,$.schemaPath="";var j=e.compositeRule;e.compositeRule=$.compositeRule=!0;var I=e.validate($).replace(/validate\.schema/g,P);e.compositeRule=$.compositeRule=j,i+=" "+I}else{(N=N||[]).push(i),i="",i+=" "+P+".call( ",e.opts.passContext?i+="this":i+="self",v||!1===E.schema?i+=" , "+p+" ":i+=" , "+o+" , "+p+" , validate.schema"+e.schemaPath+" ",i+=" , (dataPath || '')",'""'!=e.errorPath&&(i+=" + "+e.errorPath);var A=s?"data"+(s-1||""):"parentData",C=s?e.dataPathArr[s]:"parentDataProperty",R=i+=" , "+A+" , "+C+" , rootData ) ";i=N.pop(),!1===E.errors?(i+=" "+h+" = ",D&&(i+="await "),i+=R+"; "):i+=D?" var "+(x="customErrors"+n)+" = null; try { "+h+" = await "+R+"; } catch (e) { "+h+" = false; if (e instanceof ValidationError) "+x+" = e.errors; else throw e; } ":" "+x+" = null; "+h+" = "+R+"; "}if(E.modifying&&(i+=" if ("+A+") "+p+" = "+A+"["+C+"];"),i+=""+S,E.valid)d&&(i+=" if (true) { ");else{var N;i+=" if ( ",void 0===E.valid?(i+=" !",i+=y?""+k:""+h):i+=" "+!E.valid+" ",i+=") { ",a=this.keyword,(N=N||[]).push(i),i="",(N=N||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(i+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var L=i;i=N.pop(),!e.compositeRule&&d?e.async?i+=" throw new ValidationError(["+L+"]); ":i+=" validate.errors = ["+L+"]; return false; ":i+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var T=i;i=N.pop(),g?E.errors?"full"!=E.errors&&(i+=" for (var "+O+"="+m+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(i+=" "+_+".schema = "+o+"; "+_+".data = "+p+"; "),i+=" } "):!1===E.errors?i+=" "+T+" ":(i+=" if ("+m+" == errors) { "+T+" } else { for (var "+O+"="+m+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(i+=" "+_+".schema = "+o+"; "+_+".data = "+p+"; "),i+=" } } "):y?(i+=" var err = ",!1!==e.createErrors?(i+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(i+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&d&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; ")):!1===E.errors?i+=" "+T+" ":(i+=" if (Array.isArray("+x+")) { if (vErrors === null) vErrors = "+x+"; else vErrors = vErrors.concat("+x+"); errors = vErrors.length; for (var "+O+"="+m+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; "+_+'.schemaPath = "'+u+'"; ',e.opts.verbose&&(i+=" "+_+".schema = "+o+"; "+_+".data = "+p+"; "),i+=" } } else { "+T+" } "),i+=" } ",d&&(i+=" else { ")}return i},Xe="http://json-schema.org/draft-07/schema#",Ye="http://json-schema.org/draft-07/schema#",er="Core schema meta-schema",rr={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},tr=["object","boolean"],ar={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},or={$schema:Xe,$id:Ye,title:er,definitions:rr,type:tr,properties:ar,default:!0},ir=O(Object.freeze({__proto__:null,$schema:Xe,$id:Ye,title:er,definitions:rr,type:tr,properties:ar,default:or})),nr={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:ir.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:ir.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}},sr=/^[a-z_$][a-z0-9_$-]*$/i,lr=function(e,r){var t=this.RULES;if(t.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!sr.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(r){this.validateKeyword(r,!0);var a=r.type;if(Array.isArray(a))for(var o=0;o<a.length;o++)n(e,a[o],r);else n(e,a,r);var i=r.metaSchema;i&&(r.$data&&this._opts.$data&&(i={anyOf:[i,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),r.validateSchema=this.compile(i,!0))}function n(e,r,a){for(var o,i=0;i<t.length;i++){var n=t[i];if(n.type==r){o=n;break}}o||(o={type:r,rules:[]},t.push(o));var s={keyword:e,definition:a,custom:!0,code:Ze,implements:a.implements};o.rules.push(s),t.custom[e]=s}return t.keywords[e]=t.all[e]=!0,this},cr=function(e){var r=this.RULES.custom[e];return r?r.definition:this.RULES.keywords[e]||!1},ur=function(e){var r=this.RULES;delete r.keywords[e],delete r.all[e],delete r.custom[e];for(var t=0;t<r.length;t++)for(var a=r[t].rules,o=0;o<a.length;o++)if(a[o].keyword==e){a.splice(o,1);break}return this},dr=function e(r,t){e.errors=null;var a=this._validateKeyword=this._validateKeyword||this.compile(nr,!0);if(a(r))return!0;if(e.errors=a.errors,t)throw new Error("custom keyword definition is invalid: "+this.errorsText(a.errors));return!1};var pr="http://json-schema.org/draft-07/schema#",hr="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",mr="Meta-schema for $data reference (JSON Schema extension proposal)",fr=["$data"],vr={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},gr={$schema:pr,$id:hr,description:mr,type:"object",required:fr,properties:vr,additionalProperties:!1},yr=O(Object.freeze({__proto__:null,$schema:pr,$id:hr,description:mr,type:"object",required:fr,properties:vr,additionalProperties:!1,default:gr})),br=Sr;Sr.prototype.validate=function(e,r){var t;if("string"==typeof e){if(!(t=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);t=a.validate||this._compile(a)}var o=t(r);!0!==t.$async&&(this.errors=t.errors);return o},Sr.prototype.compile=function(e,r){var t=this._addSchema(e,void 0,r);return t.validate||this._compile(t)},Sr.prototype.addSchema=function(e,r,t,a){if(Array.isArray(e)){for(var o=0;o<e.length;o++)this.addSchema(e[o],void 0,t,a);return this}var i=this._getId(e);if(void 0!==i&&"string"!=typeof i)throw new Error("schema id must be string");return $r(this,r=U.normalizeId(r||i)),this._schemas[r]=this._addSchema(e,t,a,!0),this},Sr.prototype.addMetaSchema=function(e,r,t){return this.addSchema(e,r,t,!0),this},Sr.prototype.validateSchema=function(e,r){var t=e.$schema;if(void 0!==t&&"string"!=typeof t)throw new Error("$schema must be a string");if(!(t=t||this._opts.defaultMeta||function(e){var r=e._opts.meta;return e._opts.defaultMeta="object"==typeof r?e._getId(r)||r:e.getSchema(Pr)?Pr:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var a=this.validate(t,e);if(!a&&r){var o="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(o);this.logger.error(o)}return a},Sr.prototype.getSchema=function(e){var r=Fr(this,e);switch(typeof r){case"object":return r.validate||this._compile(r);case"string":return this.getSchema(r);case"undefined":return function(e,r){var t=U.schema.call(e,{schema:{}},r);if(t){var a=t.schema,o=t.root,i=t.baseId,n=pe.call(e,a,o,void 0,i);return e._fragments[r]=new B({ref:r,fragment:!0,schema:a,root:o,baseId:i,validate:n}),n}}(this,e)}},Sr.prototype.removeSchema=function(e){if(e instanceof RegExp)return xr(this,this._schemas,e),xr(this,this._refs,e),this;switch(typeof e){case"undefined":return xr(this,this._schemas),xr(this,this._refs),this._cache.clear(),this;case"string":var r=Fr(this,e);return r&&this._cache.del(r.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var t=this._opts.serialize,a=t?t(e):e;this._cache.del(a);var o=this._getId(e);o&&(o=U.normalizeId(o),delete this._schemas[o],delete this._refs[o])}return this},Sr.prototype.addFormat=function(e,r){"string"==typeof r&&(r=new RegExp(r));return this._formats[e]=r,this},Sr.prototype.errorsText=function(e,r){if(!(e=e||this.errors))return"No errors";for(var t=void 0===(r=r||{}).separator?", ":r.separator,a=void 0===r.dataVar?"data":r.dataVar,o="",i=0;i<e.length;i++){var n=e[i];n&&(o+=a+n.dataPath+" "+n.message+t)}return o.slice(0,-t.length)},Sr.prototype._addSchema=function(e,r,t,a){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var o=this._opts.serialize,i=o?o(e):e,n=this._cache.get(i);if(n)return n;a=a||!1!==this._opts.addUsedSchema;var s=U.normalizeId(this._getId(e));s&&a&&$r(this,s);var l,c=!1!==this._opts.validateSchema&&!r;c&&!(l=s&&s==U.normalizeId(e.$schema))&&this.validateSchema(e,!0);var u=U.ids.call(this,e),d=new B({id:s,schema:e,localRefs:u,cacheKey:i,meta:t});"#"!=s[0]&&a&&(this._refs[s]=d);this._cache.put(i,d),c&&l&&this.validateSchema(e,!0);return d},Sr.prototype._compile=function(e,r){if(e.compiling)return e.validate=o,o.schema=e.schema,o.errors=null,o.root=r||o,!0===e.schema.$async&&(o.$async=!0),o;var t,a;e.compiling=!0,e.meta&&(t=this._opts,this._opts=this._metaOpts);try{a=pe.call(this,e.schema,r,e.localRefs)}catch(r){throw delete e.validate,r}finally{e.compiling=!1,e.meta&&(this._opts=t)}return e.validate=a,e.refs=a.refs,e.refVal=a.refVal,e.root=a.root,a;function o(){var r=e.validate,t=r.apply(this,arguments);return o.errors=r.errors,t}},Sr.prototype.compileAsync=Je,Sr.prototype.addKeyword=lr,Sr.prototype.getKeyword=cr,Sr.prototype.removeKeyword=ur,Sr.prototype.validateKeyword=dr,Sr.ValidationError=ie.Validation,Sr.MissingRefError=ie.MissingRef,Sr.$dataMetaSchema=Ke;var Pr="http://json-schema.org/draft-07/schema",wr=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],Er=["/properties"];function Sr(e){if(!(this instanceof Sr))return new Sr(e);var r,t;e=this._opts=k.copy(e)||{},function(e){var r=e._opts.logger;if(!1===r)e.logger={log:kr,warn:kr,error:kr};else{if(void 0===r&&(r=console),!("object"==typeof r&&r.log&&r.warn&&r.error))throw new Error("logger must implement log, warn and error methods");e.logger=r}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=Ae(e.format),this._cache=e.cache||new we,this._loadingSchemas={},this._compilations=[],this.RULES=((r=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}]).all=Ue(t=["type","$comment"]),r.types=Ue(["number","integer","string","array","object","boolean","null"]),r.forEach((function(e){e.rules=e.rules.map((function(e){var a;if("object"==typeof e){var o=Object.keys(e)[0];a=e[o],e=o,a.forEach((function(e){t.push(e),r.all[e]=!0}))}return t.push(e),r.all[e]={keyword:e,code:Qe[e],implements:a}})),r.all.$comment={keyword:"$comment",code:Qe.$comment},e.type&&(r.types[e.type]=e)})),r.keywords=Ue(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),r.custom={},r),this._getId=function(e){switch(e.schemaId){case"auto":return Dr;case"id":return Or;default:return _r}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=le),this._metaOpts=function(e){for(var r=k.copy(e._opts),t=0;t<wr.length;t++)delete r[wr[t]];return r}(this),e.formats&&function(e){for(var r in e._opts.formats){var t=e._opts.formats[r];e.addFormat(r,t)}}(this),e.keywords&&function(e){for(var r in e._opts.keywords){var t=e._opts.keywords[r];e.addKeyword(r,t)}}(this),function(e){var r;e._opts.$data&&(r=yr,e.addMetaSchema(r,r.$id,!0));if(!1===e._opts.meta)return;var t=ir;e._opts.$data&&(t=Ke(t,Er));e.addMetaSchema(t,Pr,!0),e._refs["http://json-schema.org/schema"]=Pr}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var r=e._opts.schemas;if(!r)return;if(Array.isArray(r))e.addSchema(r);else for(var t in r)e.addSchema(r[t],t)}(this)}function Fr(e,r){return r=U.normalizeId(r),e._schemas[r]||e._refs[r]||e._fragments[r]}function xr(e,r,t){for(var a in r){var o=r[a];o.meta||t&&!t.test(a)||(e._cache.del(o.cacheKey),delete r[a])}}function Or(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function _r(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function Dr(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function $r(e,r){if(e._schemas[r]||e._refs[r])throw new Error('schema with key or id "'+r+'" already exists')}function kr(){}var jr={$$currentLocalizeFn:function(e){if(e&&e.length)for(var r=0;r<e.length;r+=1){var t=e[r],a=void 0,o=void 0,i=void 0;switch(t.keyword){case"$ref":a="无法找到引用".concat(t.params.ref);break;case"additionalItems":a="",o=t.params.limit,a+="不允许超过".concat(o,"个元素");break;case"additionalProperties":a="不允许有额外的属性";break;case"anyOf":a="数据应为 anyOf 所指定的其中一个";break;case"const":a="应当等于常量";break;case"contains":a="应当包含一个有效项";break;case"custom":a='应当通过 "'.concat(t.keyword,' 关键词校验"');break;case"dependencies":a="",o=t.params.depsCount,a+="应当拥有属性".concat(t.params.property,"的依赖属性").concat(t.params.deps);break;case"enum":a="应当是预设定的枚举值之一";break;case"exclusiveMaximum":case"exclusiveMinimum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(i);break;case"false schema":a="布尔模式出错";break;case"format":a='应当匹配格式 "'.concat(t.params.format,'"');break;case"formatExclusiveMaximum":a="formatExclusiveMaximum 应当是布尔值";break;case"formatExclusiveMinimum":a="formatExclusiveMinimum 应当是布尔值";break;case"formatMaximum":case"formatMinimum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当是 ".concat(i);break;case"if":a='应当匹配模式 "'.concat(t.params.failingKeyword,'" ');break;case"maximum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(i);break;case"maxItems":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个项");break;case"maxLength":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个字符");break;case"maxProperties":a="",o=t.params.limit,a+="不应有多于 ".concat(o," 个属性");break;case"minimum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(i);break;case"minItems":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个项");break;case"minLength":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个字符");break;case"minProperties":a="",o=t.params.limit,a+="不应有少于 ".concat(o," 个属性");break;case"multipleOf":a="应当是 ".concat(t.params.multipleOf," 的整数倍");break;case"not":a='不应当匹配 "not" schema';break;case"oneOf":a='只能匹配一个 "oneOf" 中的 schema';break;case"pattern":a='应当匹配模式 "'.concat(t.params.pattern,'"');break;case"patternRequired":a="应当有属性匹配模式 ".concat(t.params.missingPattern);break;case"propertyNames":a="属性名 '".concat(t.params.propertyName,"' 无效");break;case"required":a="应当有必需属性 ".concat(t.params.missingProperty);break;case"switch":a="由于 ".concat(t.params.caseIndex,' 失败,未通过 "switch" 校验, ');break;case"type":a="应当是 ".concat(t.params.type," 类型");break;case"uniqueItems":a="不应当含有重复项 (第 ".concat(t.params.j," 项与第 ").concat(t.params.i," 项是重复的)");break;default:continue}t.message=a}},getCurrentLocalize:function(){return this.$$currentLocalizeFn},useLocal:function(e){this.$$currentLocalizeFn=e}};function Ir(e,t){try{if("object"===r(t))return e.fill(null).map((function(){return JSON.parse(JSON.stringify(t))}))}catch(e){}}function Ar(e,r){return e.filter((function(e){return r.includes(e)}))}function Cr(e,r,t){var a=F(e.$ref,r);e.$ref;var o=n(e,["$ref"]);return Tr(i(i({},a),o),r,t)}function Rr(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length<2)return r[0];for(var a={},o=[].concat(r),i=function(){var e=p(o[0])?o[0]:{},r=p(o[1])?o[1]:{};a=Object.assign({},e),Object.keys(r).reduce((function(t,a){var o=e[a],i=r[a];if(p(o)||p(i))if(p(o)&&p(i))t[a]=Rr(o,i);else{var n=s(p(o)?[o,i]:[i,o],2),l=n[0],c=n[1];t[a]="additionalProperties"===a?!0===c&&l:l}else if(Array.isArray(o)||Array.isArray(i))if(Array.isArray(o)&&Array.isArray(i)){if(p(o[0])||p(i[0]))throw new Error("暂不支持如上数组对象元素合并");var u=Ar([].concat(o),[].concat(i));if(u.length<=0)throw new Error("无法合并如上数据");0===u.length&&"type"===a?t[a]=u[0]:t[a]=u}else{var d=s(Array.isArray(o)?[o,i]:[i,o],2),h=d[0],m=d[1];if(void 0===m)t[a]=h;else{if(!h.includes(m))throw new Error("无法合并如下数据");t[a]=m}}else if(void 0!==o&&void 0!==i)if("maxLength"===a||"maximum"===a||"maxItems"===a||"exclusiveMaximum"===a||"maxProperties"===a)t[a]=Math.min(o,i);else if("minLength"===a||"minimum"===a||"minItems"===a||"exclusiveMinimum"===a||"minProperties"===a)t[a]=Math.max(o,i);else if("multipleOf"===a)t[a]=E(o,i);else{if(o!==i)throw new Error("无法合并如下数据");t[a]=o}else t[a]=void 0===o?i:o;return t}),a),o.splice(0,2,a)};o.length>=2;)i();return a}function Nr(e,r,t){var a=i(i({},e),{},{allOf:e.allOf.map((function(e){return Tr(e,r,t)}))});try{var o=a.allOf,s=n(a,["allOf"]);return Rr.apply(void 0,[s].concat(l(o)))}catch(e){return a.allOf,n(a,["allOf"])}}function Lr(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.hasOwnProperty("allOf")&&(e=Nr(e,r,t)),e.hasOwnProperty("$ref")&&(e=Cr(e,r,t)),e}function Tr(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return p(e)?Lr(e,r,t):{}}function zr(e){return e?"".concat("__pathRoot",".").concat(e).replace(/\./g,"_"):"__pathRoot"}function qr(e){return""===e}function Vr(e,r){return""===e?r:[e,r].join(".")}function Mr(r,t){e.delete(r,t)}function Wr(r,t,a){for(var o=t.split("."),i=0;i<o.length;i+=1){if(o.length-i<2){e.set(r,o[o.length-1],a);break}r=r[o[i]]}}function Br(e,r){for(var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=r.split("."),o=0;o<a.length-t;o+=1){if(void 0===e)return;e=""===a[o]?e:e[a[o]]}return e}function Qr(e){return e}var Ur=Object.freeze({__proto__:null,nodePath2ClassName:zr,isRootNodePath:qr,computedCurPath:Vr,deletePathVal:Mr,setPathVal:Wr,getPathVal:Br,path2prop:Qr}),Hr=/{{(.*)}}/;function Kr(e,r,t,a){if(void 0!==t){var o=Hr.exec(t);if(Hr.lastIndex=0,o){var i=o[1].trim();return new Function("parentFormData","rootFormData","return ".concat(i))(Br(e,r,1),e)}return a()}}function Gr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.schema,t=e.uiSchema,a=arguments.length>1?arguments[1]:void 0,o=Yr({schema:r,uiSchema:t,containsSpec:!1});return["title","description"].reduce((function(e,r){return o[r]&&(e["ui:".concat(r)]=String(o[r]).replace(/\$index/g,a+1)),e}),{})}function Jr(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,i=e.curNodePath,n=void 0===i?"":i,s=e.rootFormData,l=void 0===s?{}:s,c=o["ui:widget"]||t["ui:widget"],u=o["ui:hidden"]||t["ui:hidden"];return"HiddenWidget"===c||"hidden"===c||!!Kr(l,n,u,(function(){return"function"==typeof u?u(Br(l,n,1),l):u}))}function Zr(e,t){var a=t.schema,o=void 0===a?{}:a,i=t.uiSchema,n=void 0===i?{}:i,s=o["ui:field"]||n["ui:field"];if("function"==typeof s||"object"===r(s)||"string"==typeof s)return{field:s,fieldProps:n["ui:fieldProps"]||o["ui:fieldProps"]};var l=e[f(o)];if(l)return{field:l};if(!l&&(o.anyOf||o.oneOf))return{field:null};throw new Error("不支持的field类型 ".concat(o.type))}function Xr(e){var r=e.schema,a=void 0===r?{}:r,o=e.uiSchema,n=void 0===o?{}:o,s=e.curNodePath,c=e.rootFormData,u=void 0===c?{}:c;return Object.assign.apply(Object,[{}].concat(l([a,n].map((function(e){return Object.keys(e).reduce((function(r,a){var o=e[a];return"ui:options"===a&&p(o)?i(i({},r),o):0===a.indexOf("ui:")?i(i({},r),{},t({},a.substring(3),void 0===s?o:Kr(u,s,o,(function(){return o})))):r}),{})})))))}function Yr(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.containsSpec,s=void 0===n||n,l=e.curNodePath,c=e.rootFormData,u={};return s&&(u.readonly=!!t.readOnly,void 0!==t.multipleOf&&(u.step=t.multipleOf),(t.minimum||0===t.minimum)&&(u.min=t.minimum),(t.maximum||0===t.maximum)&&(u.max=t.maximum),(t.minLength||0===t.minLength)&&(u.minlength=t.minLength),(t.maxLength||0===t.maxLength)&&(u.maxlength=t.maxLength),"date-time"!==t.format&&"date"!==t.format||("array"===t.type?(u.isRange=!0,u.isNumberValue=!(t.items&&"string"===t.items.type)):u.isNumberValue=!("string"===t.type))),i(i({title:t.title,description:t.description},u),Xr({schema:t,uiSchema:o,curNodePath:l,rootFormData:c}))}function et(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,i=e.curNodePath,s=e.rootFormData,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,c=Yr({schema:t,uiSchema:o,curNodePath:i,rootFormData:s});!c.widget&&l&&Object.assign(c,l({schema:t,uiSchema:o}));var u=c.widget,d=c.title,p=c.labelWidth,h=c.description,m=c.attrs,f=c.class,v=c.style,g=c.fieldAttrs,y=c.fieldStyle,b=c.fieldClass,P=c.emptyValue,w=c.width,E=c.getWidget,S=c.onChange,F=n(c,["widget","title","labelWidth","description","attrs","class","style","fieldAttrs","fieldStyle","fieldClass","emptyValue","width","getWidget","onChange"]);return{widget:u,label:d,labelWidth:p,description:h,widgetAttrs:m,widgetClass:f,widgetStyle:v,fieldAttrs:g,width:w,fieldStyle:y,fieldClass:b,emptyValue:P,getWidget:E,onChange:S,uiProps:F}}function rt(e){var r=e.schema,a=void 0===r?{}:r,o=e.uiSchema,n=void 0===o?{}:o,s=e.errorSchema,c=void 0===s?{}:s;return Object.assign.apply(Object,[{}].concat(l([a,n,c].map((function(e){return Object.keys(e).reduce((function(r,a){var o=e[a];return"err:options"===a&&p(o)?i(i({},r),o):0===a.indexOf("err:")?i(i({},r),{},t({},a.substring(4),o)):r}),{})})))))}function tt(e,r){if(!Array.isArray(r))return e;var t,a=function(e){return e.reduce((function(e,r){return e[r]=!0,e}),{})},o=a(e),i=r.filter((function(e){return"*"===e||o[e]})),n=a(i),s=e.filter((function(e){return!n[e]})),c=i.indexOf("*");if(-1===c){if(s.length)throw new Error("uiSchema order list does not contain ".concat((t=s).length>1?"properties '".concat(t.join("', '"),"'"):"property '".concat(t[0],"'")));return i}if(c!==i.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");var u=l(i);return u.splice.apply(u,[c,1].concat(l(s))),u}function at(e){return Array.isArray(e.enum)&&1===e.enum.length||e.hasOwnProperty("const")}function ot(e){if(Array.isArray(e.enum)&&1===e.enum.length)return e.enum[0];if(e.hasOwnProperty("const"))return e.const;throw new Error("schema cannot be inferred as a constant")}function it(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=Tr(e,r),a=t.oneOf||t.anyOf;return!!Array.isArray(t.enum)||!!Array.isArray(a)&&a.every((function(e){return at(e)}))}function nt(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every((function(e){return p(e)}))}function st(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!(!e.uniqueItems||!e.items)&&it(e.items,r)}function lt(e){return e.additionalItems,p(e.additionalItems)}function ct(e,r,t,a){if(e.enum){var o=Xr({schema:e,uiSchema:r,curNodePath:t,rootFormData:a}).enumNames||e.enumNames;return e.enum.map((function(e,r){return{label:o&&o[r]||String(e),value:e}}))}var i=e.oneOf||e.anyOf,n=r.oneOf||r.anyOf;return i.map((function(e,r){var o=n&&n[r]?Xr({schema:e,uiSchema:n[r],curNodePath:t,rootFormData:a}):{},i=ot(e);return{label:o.title||e.title||String(i),value:i}}))}function ut(e,r,t){if(e)return e;if(r){var a=t.split(".").pop();if(a&&a!=="".concat(Number(a)))return a}return""}var dt=Object.freeze({__proto__:null,replaceArrayIndex:Gr,isHiddenWidget:Jr,getUiField:Zr,getUserUiOptions:Xr,getUiOptions:Yr,getWidgetConfig:et,getUserErrOptions:rt,orderProperties:tt,isConstant:at,toConstant:ot,isSelect:it,isFixedItems:nt,isMultiSelect:st,allowAdditionalItems:lt,optionsList:ct,fallbackLabel:ut}),pt=ft(),ht=null,mt=null;function ft(){var e=new br({errorDataPath:"property",allErrors:!0,multipleOfPrecision:8,schemaId:"auto",unknownFormats:"ignore"});return e.addFormat("data-url",/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/),e.addFormat("color",/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/),e}function vt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null===e?[]:e.map((function(e){var r=e.dataPath,t=e.keyword,a=e.message,o=e.params,i=e.schemaPath,n="".concat(r);return{name:t,property:n,message:a,params:o,stack:"".concat(n," ").concat(a).trim(),schemaPath:i}}))}function gt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.transformErrors,o=e.additionalMetaSchemas,i=void 0===o?[]:o,n=e.customFormats,s=void 0===n?{}:n,c=!v(mt,i),u=!v(ht,s);(c||u)&&(pt=ft()),i&&c&&Array.isArray(i)&&(pt.addMetaSchema(i),mt=i),s&&u&&p(s)&&(Object.keys(s).forEach((function(e){pt.addFormat(e,s[e])})),ht=s);var d=null;try{pt.validate(t,r)}catch(e){d=e}jr.getCurrentLocalize()(pt.errors);var h=vt(pt.errors);pt.errors=null;var m=d&&d.message&&"string"==typeof d.message&&d.message.includes("no schema with key or ref ");return m&&(h=[].concat(l(h),[{stack:d.message}])),"function"==typeof a&&(h=a(h)),{errors:h}}function yt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.uiSchema,o=e.transformErrors,i=e.additionalMetaSchemas,n=void 0===i?[]:i,s=e.customFormats,l=void 0===s?{}:s,c=e.errorSchema,u=void 0===c?{}:c,d=e.required,p=void 0!==d&&d,h=e.propPath,m=void 0===h?"":h,f=e.isOnlyFirstError,v=void 0===f||f,g="array"===t.type&&Array.isArray(r)&&0===r.length,y=void 0===r||g;if(p){if(y){var b={keyword:"required",params:{missingProperty:m}},P=rt({schema:t,uiSchema:a,errorSchema:u}).required;return P?b.message=P:jr.getCurrentLocalize()([b]),[b]}}else if(y&&!g)return[];var w=gt({formData:r,schema:t,transformErrors:o,additionalMetaSchemas:n,customFormats:l}).errors;w=w.filter((function(e){return""===e.property&&!e.schemaPath.includes("#/anyOf/")&&!e.schemaPath.includes("#/oneOf/")||"additionalProperties"===e.name}));var E=rt({schema:t,uiSchema:a,errorSchema:u});return(v&&w.length>0?[w[0]]:w).reduce((function(e,r){return r.message=void 0!==E[r.name]?E[r.name]:r.message,e.push(r),e}),[])}function bt(e,r){try{return pt.validate(e,r)}catch(e){return!1}}function Pt(e,r,t){for(var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=0;n<r.length;n++){var s=Tr(r[n],t,e);if(s.properties){var l=i(i({},t.definitions?{definitions:t.definitions}:{}),{},{anyOf:Object.keys(s.properties).map((function(e){return{required:[e]}}))}),c=void 0;if(s.anyOf){var u=a({},s);u.allOf?u.allOf=u.allOf.slice():u.allOf=[],u.allOf.push(l),c=u}else c=Object.assign({},s,l);if(o||delete c.required,bt(c,e))return n}else if(bt(r[n],e))return n}return 0}var wt=Object.freeze({__proto__:null,ajvValidateFormData:gt,validateFormDataAndTransformMsg:yt,isValid:bt,getMatchingOption:Pt});function Et(e,r){if(Array.isArray(r))return Array.isArray(e)||(e=[]),r.map((function(r,t){return e[t]?Et(e[t],r):r}));if(p(r)){var t=Object.assign({},e);return Object.keys(r).reduce((function(t,a){return t[a]=Et(e?e[a]:{},r[a]),t}),t)}return r}function St(e,r,t){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=p(e)?e:{},n=p(a)?a:{};"allOf"in i&&(i=Nr(i,t,n));var s=r;if(p(s)&&p(i.default))s=m(s,i.default);else if("default"in i)s=i.default;else{if("$ref"in i){var l=F(i.$ref,t);return St(l,s,t,n,o)}if(nt(i))s=i.items.map((function(e,a){return St(e,Array.isArray(r)?r[a]:void 0,t,n,o)}));else if("oneOf"in i){var c=Tr(i.oneOf[Pt(n,i.oneOf,t)],t,n);if(i.properties&&c.properties){var u=m(i,c);delete u.oneOf,i=u}else i=c}else if("anyOf"in i){var d=Tr(i.anyOf[Pt(n,i.anyOf,t)],t,n);if(i.properties&&d.properties){var h=m(i,d);delete h.anyOf,i=h}else i=d}}switch(void 0===s&&(s=i.default),f(i)){case"null":return null;case"object":return Object.keys(i.properties||{}).reduce((function(e,r){var a=St(i.properties[r],(s||{})[r],t,(n||{})[r],o);return(o||void 0!==a)&&(e[r]=a),e}),{});case"array":if(Array.isArray(s)&&(s=s.map((function(e,r){return St(i.items[r]||i.additionalItems||{},e,t,{},o)}))),Array.isArray(a)&&(s=a.map((function(e,r){return St(i.items,(s||{})[r],t,e,{},o)}))),i.minItems){if(st(i,t))return s||[];var v=s?s.length:0;if(i.minItems>v){var g=s||[],y=Array.isArray(i.items)?i.additionalItems:i.items,b=Ir(new Array(i.minItems-v),St(y,y.defaults,t,{},o));return g.concat(b)}}s=void 0===s?[]:s}return s}function Ft(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!p(e))throw new Error("Invalid schema: ".concat(e));var o=Tr(e,t,r),i=St(o,e.default,t,r,a);return void 0===r?i:p(r)||Array.isArray(r)?Et(i,r):0===r||!1===r||""===r?r:r||i}function xt(e,r){void 0===r&&(r={});var t=r.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}xt('.genFromComponent{font-size:14px;line-height:1;word-wrap:break-word;word-break:break-word;padding:0;margin:0}.genFromComponent a,.genFromComponent h1,.genFromComponent h2,.genFromComponent h3,.genFromComponent li,.genFromComponent p,.genFromComponent ul{font-size:14px}.genFromComponent .genFormIcon{width:12px;height:12px;vertical-align:top}.genFromComponent .genFormBtn{display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;background:#fff;border:1px solid #dcdfe6;color:#606266;-webkit-appearance:none;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;margin:0;-webkit-transition:.1s;transition:.1s;font-weight:500;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;padding:12px 20px;font-size:14px;border-radius:4px}.genFromComponent .genFormBtn.is-plain:focus,.genFromComponent .genFormBtn.is-plain:hover{background:#fff;border-color:#409eff;color:#409eff}.genFromComponent .hiddenWidget{display:none}.genFromComponent .fieldGroupWrap+.fieldGroupWrap .fieldGroupWrap_title{margin-top:20px}.genFromComponent .fieldGroupWrap_title{position:relative;display:block;width:100%;line-height:26px;margin-bottom:8px;font-size:15px;font-weight:700;border:0}.genFromComponent .fieldGroupWrap_des{font-size:12px;line-height:20px;margin-bottom:10px;color:#999}.genFromComponent .genFromWidget_des{padding:0;margin-top:0;margin-bottom:2px;font-size:12px;line-height:20px;color:#999;text-align:left}.genFromComponent .formItemErrorBox{margin:0 auto;color:#ff5757;padding-top:2px;position:absolute;top:100%;left:0;display:-webkit-box!important;line-height:16px;text-overflow:ellipsis;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1;white-space:normal;font-size:12px;text-align:left}.genFromComponent .genFormIcon-qs{fill:#606266;vertical-align:middle;display:inline-block;width:16px;height:16px;margin-left:2px;margin-top:-2px;cursor:pointer}.genFromComponent .genFormItemRequired:before{content:"*";color:#f56c6c;margin-right:4px}.genFromComponent .appendCombining_box{margin-bottom:22px}.genFromComponent .appendCombining_box .appendCombining_box{margin-bottom:10px}.genFromComponent .appendCombining_box{padding:10px;background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .validateWidget{margin-bottom:0!important;width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important;padding:0!important}.genFromComponent .validateWidget .formItemErrorBox{padding:5px 0;position:relative}.genFromComponent .arrayField:not(.genFormItem){margin-bottom:22px}.genFromComponent .arrayField:not(.genFormItem) .arrayField{margin-bottom:10px}.genFromComponent .arrayOrderList{background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .arrayOrderList_item{position:relative;padding:25px 10px 12px;border-radius:2px;margin-bottom:6px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.genFromComponent .arrayOrderList_bottomAddBtn{text-align:right;padding:15px 10px;margin-bottom:10px}.genFromComponent .bottomAddBtn{width:40%;min-width:10px;max-width:180px}.genFromComponent .arrayListItem_content{padding-top:15px;-webkit-box-flex:1;-ms-flex:1;flex:1;margin:0 auto;-webkit-box-shadow:0 -1px 0 0 rgba(0,0,0,.05);box-shadow:0 -1px 0 0 rgba(0,0,0,.05)}.genFromComponent .arrayListItem_index,.genFromComponent .arrayListItem_operateTool{position:absolute;height:25px}.genFromComponent .arrayListItem_index{top:6px;line-height:18px;height:18px;padding:0 6px;background-color:rgba(0,0,0,.28);color:#fff;font-size:12px;border-radius:2px}.genFromComponent .arrayListItem_operateTool{width:75px;right:9px;top:-1px;text-align:right;font-size:0}.genFromComponent .arrayListItem_btn{vertical-align:top;display:inline-block;padding:6px;margin:0;font-size:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none;cursor:pointer;text-align:center;background:transparent;color:#666}.genFromComponent .arrayListItem_btn:hover{opacity:.6}.genFromComponent .arrayListItem_btn[disabled]{color:#999;opacity:.3!important;cursor:not-allowed}.genFromComponent .arrayListItem_orderBtn-bottom,.genFromComponent .arrayListItem_orderBtn-top{background-color:#f0f9eb}.genFromComponent .arrayListItem_btn-delete{background-color:#fef0f0}.genFromComponent .formFooter_item{text-align:right;border-top:1px solid rgba(0,0,0,.08);padding-top:10px}.genFromComponent.formInlineFooter>.fieldGroupWrap{display:inline-block;margin-right:10px}.genFromComponent.formInline .genFormItem{display:inline-block;margin-right:10px;vertical-align:top}.genFromComponent.formInline .validateWidget{margin-right:0}.genFromComponent.formInline .formFooter_item{border-top:none;padding-top:0}.layoutColumn .layoutColumn_w100{width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important}.layoutColumn .fieldGroupWrap_box{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start}.layoutColumn .fieldGroupWrap_box>div{width:100%;-ms-flex-preferred-size:100%;flex-basis:100%}.layoutColumn .fieldGroupWrap_box>.genFormItem{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;-webkit-box-sizing:border-box;box-sizing:border-box;padding-right:10px}.layoutColumn.layoutColumn-1 .fieldGroupWrap_box>.genFormItem{padding-right:0}.layoutColumn.layoutColumn-2 .fieldGroupWrap_box>.genFormItem{width:50%;-ms-flex-preferred-size:50%;flex-basis:50%}.layoutColumn.layoutColumn-3 .fieldGroupWrap_box>.genFormItem{width:33.333%;-ms-flex-preferred-size:33.333%;flex-basis:33.333%}');var Ot={formFooter:{type:Object,default:function(){return{show:!0,okBtn:"保存",cancelBtn:"取消"}}},value:{type:null,default:function(){return{}},required:!0},formProps:{type:Object,default:function(){return{}}},fallbackLabel:{type:Boolean,default:!1},schema:{type:Object,default:function(){return{}},required:!0},uiSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},errorSchema:{type:Object,default:function(){return{}}}},_t={name:"FormFooter",props:{okBtn:{type:String,default:"保存"},cancelBtn:{type:String,default:"取消"},formItemAttrs:{type:Object,default:function(){return{}}},globalOptions:null},render:function(e){var r=this,t=this.$props,a=t.okBtn,o=t.cancelBtn,n=t.globalOptions.COMPONENT_MAP;return e(n.formItem,i({class:{formFooter_item:!0}},this.formItemAttrs),[e(n.button,{on:{click:function(){r.$emit("onCancel")}}},o),e(n.button,{style:{marginLeft:"10px"},props:{type:"primary"},on:{click:function(){r.$emit("onSubmit")}}},a)])}};var Dt=function(e,r,t,a,o,i,n,s,l,c){"boolean"!=typeof n&&(l=s,s=n,n=!1);var u,d="function"==typeof t?t.options:t;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,o&&(d.functional=!0)),a&&(d._scopeId=a),i?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(i)},d._ssrRegister=u):r&&(u=n?function(e){r.call(this,c(e,this.$root.$options.shadowRoot))}:function(e){r.call(this,s(e))}),u)if(d.functional){var p=d.render;d.render=function(e,r){return u.call(r),p(e,r)}}else{var h=d.beforeCreate;d.beforeCreate=h?[].concat(h,u):[u]}return t},$t={name:"FieldGroupWrap",inject:["genFormProvide"],props:{curNodePath:{type:String,default:""},showTitle:{type:Boolean,default:!0},showDescription:{type:Boolean,default:!0},title:{type:String,default:""},description:{type:String,default:""}},computed:{trueTitle:function(){var e=this.title;if(e)return e;var r=(this.genFormProvide.value||this.genFormProvide).fallbackLabel&&this.curNodePath.split(".").pop();return r!=="".concat(Number(r))?r:""}}},kt=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("div",{staticClass:"fieldGroupWrap"},[e.showTitle&&e.trueTitle?t("h3",{staticClass:"fieldGroupWrap_title"},[e._v("\n "+e._s(e.trueTitle)+"\n ")]):e._e(),e._v(" "),e.showDescription&&e.description?t("p",{staticClass:"fieldGroupWrap_des",domProps:{innerHTML:e._s(e.description)}}):e._e(),e._v(" "),t("div",{staticClass:"fieldGroupWrap_box"},[e._t("default")],2)])};kt._withStripped=!0;var jt=Dt({render:kt,staticRenderFns:[]},void 0,$t,void 0,!1,void 0,!1,void 0,void 0,void 0),It={formProps:{type:null},globalOptions:{type:null},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},customFormats:{type:Object,default:function(){return{}}},rootSchema:{type:Object,default:function(){return{}}},rootFormData:{type:null,default:function(){return{}}},curNodePath:{type:String,default:""},required:{type:Boolean,default:!1},needValidFieldGroup:{type:Boolean,default:!0}},At=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-down",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}})])};At._withStripped=!0;var Ct=Dt({render:At,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Rt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-up",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}})])};Rt._withStripped=!0;var Nt=Dt({render:Rt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Lt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-close",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1\n 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0\n 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}})])};Lt._withStripped=!0;var Tt=Dt({render:Lt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),zt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-plus",attrs:{t:"1551322312294",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"10297","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"200",height:"200"}},[r("path",{attrs:{d:"M474 152m8 0l60 0q8 0 8 8l0 704q0 8-8 8l-60 0q-8 0-8-8l0-704q0-8 8-8Z","p-id":"10298"}}),this._v(" "),r("path",{attrs:{d:"M168 474m8 0l672 0q8 0 8 8l0 60q0 8-8 8l-672 0q-8 0-8-8l0-60q0-8 8-8Z","p-id":"10299"}})])};zt._withStripped=!0;var qt=Dt({render:zt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Vt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-qs",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 708c-22.1\n 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 0\n 0-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8\n 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6\n 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6\n 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z"}})])};Vt._withStripped=!0;var Mt=Dt({render:Vt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Wt={name:"Widget",inject:["genFormProvide"],props:{isFormData:{type:Boolean,default:!0},curValue:{type:null,default:0},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},widget:{type:[String,Function,Object],default:null},required:{type:Boolean,default:!1},emptyValue:{type:null,default:void 0},formatValue:{type:[Function],default:function(e){return{update:!0,value:e}}},rootFormData:{type:null},curNodePath:{type:String,default:""},label:{type:String,default:""},width:{type:String,default:""},labelWidth:{type:String,default:""},description:{type:String,default:""},widgetAttrs:{type:Object,default:function(){return{}}},widgetClass:{type:Object,default:function(){return{}}},widgetStyle:{type:Object,default:function(){return{}}},fieldAttrs:{type:Object,default:function(){return{}}},fieldClass:{type:Object,default:function(){return{}}},fieldStyle:{type:Object,default:function(){return{}}},uiProps:{type:Object,default:function(){return{}}},formProps:null,getWidget:null,globalOptions:null,onChange:null},computed:{value:{get:function(){return this.isFormData?Br(this.rootFormData,this.curNodePath):this.curValue},set:function(e){var r=""===e||null===e?this.emptyValue:e;this.isFormData&&Wr(this.rootFormData,this.curNodePath,r),this.$emit("onChange",r)}}},created:function(){this.uiProps.enumOptions&&this.uiProps.enumOptions.length>0&&void 0===this.value&&this.value!==this.uiProps.enumOptions[0]&&(this.schema.items?this.value=[]:this.required&&(this.value=this.uiProps.enumOptions[0].value))},render:function(e){var r=this,t=this.$props.curNodePath,a=qr(t),o=r.globalOptions.HELPERS.isMiniDes(r.formProps),n=r.description?e("div",{domProps:{innerHTML:r.description},class:{genFromWidget_des:!0}}):null,s=r.globalOptions.COMPONENT_MAP,l=o&&n?e(s.popover,{style:{margin:"0 2px",fontSize:"16px",cursor:"pointer"},props:{placement:"top",trigger:"hover"}},[n,e(Mt,{slot:"reference"})]):null,c=i(i({},r.fieldStyle),r.width?{width:r.width,flexBasis:r.width,paddingRight:"10px"}:{}),u=ut(r.label,r.widget&&this.genFormProvide.fallbackLabel,t);return e(s.formItem,{class:i(i({},r.fieldClass),{},{genFormItem:!0}),style:c,attrs:r.fieldAttrs,props:i(i({},r.labelWidth?{labelWidth:r.labelWidth}:{}),this.isFormData?{prop:a?"__$$root":t,rules:[{validator:function(e,o,i){a&&(o=r.rootFormData);var n=yt({formData:o,schema:r.$props.schema,uiSchema:r.$props.uiSchema,customFormats:r.$props.customFormats,errorSchema:r.errorSchema,required:r.required,propPath:t});if(n.length>0)return i(n[0].message);var s=r.$props.customRule;return s&&"function"==typeof s?s({field:t,value:o,rootFormData:r.rootFormData,callback:i}):i()},trigger:"blur"}]}:{}),scopedSlots:{error:function(r){return r.error?e("div",{class:{formItemErrorBox:!0},attrs:{title:r.error}},[r.error]):null}}},[u?e("span",{slot:"label",class:{genFormLabel:!0,genFormItemRequired:r.required}},["".concat(u),l,"".concat(r.formProps&&r.formProps.labelSuffix||"")]):null,o?null:n,e(r.widget,{style:r.widgetStyle,class:r.widgetClass,attrs:i(i(i({},r.widgetAttrs),r.uiProps),{},{value:this.value}),ref:"widgetRef",on:{"hook:mounted":function(){r.getWidget&&"function"==typeof r.getWidget&&r.getWidget.call(null,r.$refs.widgetRef)},input:function(e){var t=r.formatValue(e),a=r.value;t.update&&a!==t.value&&(r.value=t.value,r.onChange&&r.onChange({curVal:t.value,preVal:a,parentFormData:Br(r.rootFormData,r.curNodePath,1),rootFormData:r.rootFormData}))}}})])}},Bt={name:"ObjectField",functional:!0,props:It,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,n=t.errorSchema,c=t.needValidFieldGroup,u=t.curNodePath,d=t.rootFormData,h=t.globalOptions,m=Yr({schema:a,uiSchema:o,curNodePath:u,rootFormData:d}),f=m.title,v=m.description,g=m.showTitle,y=m.showDescription,b=m.order,P=m.fieldClass,w=m.fieldAttrs,E=m.fieldStyle,S=m.onlyShowIfDependent,F=tt(Object.keys(a.properties||{}),b).map((function(t){var l=function(e){return Array.isArray(a.required)&&!!~a.required.indexOf(e)}(t),c=function(e){var r=!1,t=!1;return p(a.dependencies)&&(t=Object.entries(a.dependencies).some((function(t){var a=s(t,2),o=a[0],i=a[1],n=!(!Array.isArray(i)||!~i.indexOf(e));return r=r||n,n&&void 0!==Br(d,u)[o]}))),{isDependency:r,curDependent:t}}(t),h=c.isDependency,m=c.curDependent;return h&&S&&!m?null:e(aa,{key:t,props:i(i({},r.props),{},{schema:a.properties[t],uiSchema:o[t],errorSchema:n[t],required:l||m,curNodePath:Vr(u,t)})})}));return e(jt,{props:{title:f,description:v,showTitle:g,showDescription:y,curNodePath:u},class:i(i({},r.data.class),P),attrs:w,style:E},[e("template",{slot:"default"},[].concat(l(F),[c?e(Wt,{key:"validateWidget-object",class:{validateWidget:!0,"validateWidget-object":!0},props:{schema:Object.entries(a).reduce((function(e,r){var t=s(r,2),o=t[0],i=t[1];return!1!==a.additionalProperties&&["properties","id","$id"].includes(o)||(e[o]=i),e}),{}),uiSchema:o,errorSchema:n,curNodePath:u,rootFormData:d,globalOptions:h}}):null]))])}},Qt={name:"StringField",props:It,functional:!0,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,n=t.curNodePath,s=t.rootFormData,l=t.globalOptions.WIDGET_MAP,c=it(a)&&ct(a,o,n,s),u=et({schema:a,uiSchema:o,curNodePath:n,rootFormData:s},(function(){var e="number"===a.type||"integer"===a.type;return{widget:c?l.common.select:l.formats[a.format]||(e?l.types.number:l.types.string)}}));return c&&!u.uiProps.enumOptions&&(u.uiProps.enumOptions=c),e(Wt,i(i({},r.data),{},{props:i(i({},r.props),u)}))}},Ut={name:"NumberField",props:It,functional:!0,render:function(e,r){return e(Qt,r.data)}},Ht={name:"IntegerField",props:It,functional:!0,render:function(e,r){return e(Qt,r.data)}},Kt={name:"BooleanField",props:It,functional:!0,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,n=t.curNodePath,s=t.rootFormData,l=t.globalOptions,c=ct({enumNames:a.enumNames||["true","false"],enum:a.enum||[!0,!1]},o,n,s),u=et({schema:a,uiSchema:o,curNodePath:n,rootFormData:s},(function(){return{widget:l.WIDGET_MAP.types.boolean}}));return u.uiProps.enumOptions=u.uiProps.enumOptions||c,e(Wt,i(i({},r.data),{},{props:i(i({},r.props),u)}))}},Gt={name:"ArrayOrderList",props:{vNodeList:{type:Array,default:[]},tupleItemsLength:{type:Number,default:0},addable:{type:Boolean,default:!0},showIndexNumber:{type:Boolean,default:!1},sortable:{type:Boolean,default:!0},removable:{type:Boolean,default:!0},maxItems:{},minItems:{},globalOptions:null},computed:{canAdd:function(){var e=this.$props,r=e.addable,t=e.maxItems,a=e.vNodeList;return!!r&&(void 0===t||a.length<t)},canRemove:function(){var e=this.$props,r=e.removable,t=e.minItems,a=e.vNodeList;return!!r&&(void 0===t||a.length>t)}},render:function(e){var r=this;return this.vNodeList.length<=0&&!this.addable?null:e("div",{class:{arrayOrderList:!0}},this.vNodeList.map((function(t,a){var o=t.key,n=t.vNode,s=r.tupleItemsLength+a,l=a+1;return e("div",{key:o,class:{arrayOrderList_item:!0}},[r.showIndexNumber?e("div",{class:{arrayListItem_index:!0}},l):null,e("div",{class:{arrayListItem_operateTool:!0}},[e("button",{style:i({},r.sortable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.sortable||0===a},class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-top":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"moveUp",data:{index:s}})}}},[e(Nt)]),e("button",{style:i({},r.sortable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.sortable||a===r.vNodeList.length-1},class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-bottom":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"moveDown",data:{index:s}})}}},[e(Ct)]),e("button",{style:i({},r.removable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.canRemove},class:{arrayListItem_btn:!0,"arrayListItem_btn-delete":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"remove",data:{index:s}})}}},[e(Tt)])]),e("div",{class:{arrayListItem_content:!0}},[n])])})).concat([e("p",{style:i({},this.canAdd?{}:{display:"none"}),class:{arrayOrderList_bottomAddBtn:!0}},[e("button",{attrs:{type:"button"},class:{bottomAddBtn:!0,"is-plain":!0,genFormBtn:!0},on:{click:function(){r.$emit("onArrayOperate",{command:"add"})}}},[e(qt,{style:{marginRight:"5px"}}),this.maxItems?"( ".concat(this.vNodeList.length," / ").concat(this.maxItems," )"):""])])]))}},Jt={name:"ArrayFieldNormal",functional:!0,props:i(i({},It),{},{itemsFormData:{type:Array}}),render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,n=t.curNodePath,s=t.rootFormData,l=t.itemsFormData,c=t.errorSchema,u=t.globalOptions,d=Yr({schema:a,uiSchema:o,curNodePath:n,rootFormData:s}),p=d.title,h=d.description,m=d.addable,f=d.showIndexNumber,v=d.sortable,g=d.removable,y=d.showTitle,b=d.showDescription,P=d.fieldClass,w=d.fieldAttrs,E=d.fieldStyle,S=l.map((function(t,s){var l=Gr({schema:a.items,uiSchema:o.items},s);return{key:t.key,vNode:e(aa,{key:t.key,props:i(i({},r.props),{},{schema:a.items,required:![].concat(a.items.type).includes("null"),uiSchema:i(i({},o.items),l),errorSchema:c.items,curNodePath:Vr(n,s)})})}}));return e(jt,{props:{title:p,description:h,showTitle:y,showDescription:b,curNodePath:n},class:i(i({},r.data.class),P),attrs:w,style:E},[e(Gt,{props:{vNodeList:S,showIndexNumber:f,addable:m,sortable:v,removable:g,maxItems:a.maxItems,minItems:a.minItems,globalOptions:u},on:r.listeners})])}},Zt={name:"ArrayFieldMultiSelect",functional:!0,props:i({},It),render:function(e,r){var t=r.props,a=t.schema,o=t.rootSchema,n=t.uiSchema,s=t.curNodePath,l=t.rootFormData,c=t.globalOptions,u=ct(Tr(a.items,o),n,s,l),d=et({schema:a,uiSchema:n,curNodePath:s,rootFormData:l},(function(){return{widget:c.WIDGET_MAP.common.checkboxGroup}}));return d.uiProps.multiple=!0,u&&!d.uiProps.enumOptions&&(d.uiProps.enumOptions=u),e(Wt,i(i({},r.data),{},{props:i(i({},r.props),d)}))}},Xt={name:"ArrayFieldTuple",props:i(i({},It),{},{itemsFormData:{type:Array,default:function(){return[]}}}),created:function(){this.fixItemsFormData()},methods:{fixItemsFormData:function(){var e=!Array.isArray(this.itemsFormData);if(e||this.itemsFormData.length<this.schema.items.length){var r=Ft(this.schema,void 0,this.rootSchema);e?this.$emit("onArrayOperate",{command:"setNewTarget",data:{newTarget:r}}):this.$emit("onArrayOperate",{command:"batchPush",data:{pushArray:r.slice(this.itemsFormData.length)}})}}},render:function(e){var r=this;if(!Array.isArray(this.itemsFormData))return null;var t,a,o=this.$props,n=o.schema,s=o.uiSchema,c=o.errorSchema,u=o.curNodePath,d=o.globalOptions,p=Yr({schema:n,uiSchema:s,curNodePath:u,rootFormData:this.rootFormData}),h=p.title,m=p.description,f=p.addable,v=p.showIndexNumber,g=p.sortable,y=p.removable,b=p.showTitle,P=p.showDescription,w=p.fieldClass,E=p.fieldAttrs,S=p.fieldStyle,F=(t=this.itemsFormData,a=this.schema.items.length-1,t.reduce((function(e,r,t){return e[t>a?1:0].push(r),e}),[[],[]])),x=F[0].map((function(t,a){return e(aa,{key:t.key,props:i(i({},r.$props),{},{required:![].concat(n.items[a].type).includes("null"),schema:n.items[a],uiSchema:s.items?s.items[a]:{},errorSchema:c.items?c.items[a]:{},curNodePath:Vr(u,a)})})})),O=F[1].map((function(t,a){var o=Gr({schema:n.additionalItems,uiSchema:s.additionalItems},a);return{key:t.key,vNode:e(aa,{key:t.key,props:i(i({},r.$props),{},{schema:n.additionalItems,required:![].concat(n.additionalItems.type).includes("null"),uiSchema:i(i({},s.additionalItems),o),errorSchema:c.additionalItems,curNodePath:Vr(u,a+n.items.length)})})}})),_=(void 0===f||f)&<(this.schema);return e(jt,{props:{title:h,description:m,showTitle:b,showDescription:P,curNodePath:u},class:w,attrs:E,style:S},[].concat(l(x),[e(Gt,{props:{vNodeList:O,tupleItemsLength:n.items.length,addable:_,showIndexNumber:v,sortable:g,removable:y,maxItems:n.maxItems,minItems:n.minItems,globalOptions:d},on:this.$listeners})]))}},Yt={name:"ArrayFieldSpecialFormat",props:It,functional:!0,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,n=t.curNodePath,s=t.rootFormData,l=et({schema:i({"ui:widget":t.globalOptions.WIDGET_MAP.formats[a.format]},a),uiSchema:o,curNodePath:n,rootFormData:s});return e(Wt,i(i({},r.data),{},{props:i(i({},r.props),l)}))}},ea={name:"ArrayField",props:It,data:function(){return{formKeys:this.getCuFormData().map((function(){return b()}))}},computed:{itemsFormData:function(){var e=this.$data.formKeys;return this.curFormData.map((function(r,t){return{key:e[t],value:r}}))},curFormData:function(){return this.getCuFormData()}},watch:{curFormData:function(e,r){e!==r&&Array.isArray(e)&&(this.formKeys=e.map((function(){return b()})))}},methods:{getCuFormData:function(){var e=this.$props,r=Br(e.rootFormData,e.curNodePath);return Array.isArray(r)?r:[]},getNewFormDataRow:function(){var e=this.$props,r=e.schema,t=e.rootSchema,a=r.items;return nt(this.schema)&<(this.schema)&&(a=r.additionalItems),Ft(a,void 0,t)},handleArrayOperate:function(e){var r=e.command,t=e.data,a={moveUp:function(e,r){!function(e,r){if(0===r)return!1;var t=[e[r],e[r-1]];e.splice.apply(e,[r-1,2].concat(t))}(e,r.index)},moveDown:function(e,r){!function(e,r){if(r===e.length-1)return!1;var t=e[r],a=[e[r+1],t];e.splice.apply(e,[r,2].concat(a))}(e,r.index)},remove:function(e,r){!function(e,r){e.splice(r,1).length}(e,r.index)},add:function(e,r){var t=r.newRowData;e.push(t)},batchPush:function(e,r){r.pushArray.forEach((function(r){e.push(r)}))},setNewTarget:function(e,r){Wr(r.formData,r.nodePath,r.newTarget)}}[r];if(!a)throw new Error("错误 - 未知的操作:[".concat(r,"]"));var o=t,i=t;"add"===r?(o={newRowData:this.getNewFormDataRow()},i={newRowData:b()}):"batchPush"===r?i={pushArray:o.pushArray.map((function(e){return b()}))}:"setNewTarget"===r&&(o={formData:this.rootFormData,nodePath:this.curNodePath,newTarget:o.newTarget},i={formData:this.$data,nodePath:"formKeys",newTarget:o.newTarget.map((function(e){return b()}))}),a.apply(this,[this.$data.formKeys,i]),a.apply(this,[this.curFormData,o])}},render:function(e){var r=this.$props,a=r.schema,o=r.uiSchema,n=r.rootSchema,l=r.rootFormData,c=r.curNodePath,u=r.globalOptions;if(!a.hasOwnProperty("items"))throw new Error("[".concat(a,"] 请先定义 items属性"));if(st(a,n))return e(Zt,{props:this.$props,class:t({},w(Zt.name),!0)});if(a.format||a["ui:widget"]||o["ui:widget"])return e(Yt,{props:this.$props,class:t({},w(Yt.name),!0)});var d=nt(a)?Xt:Jt;return e("div",[e(d,{props:i({itemsFormData:this.itemsFormData},this.$props),class:t({},w(d.name),!0),on:{onArrayOperate:this.handleArrayOperate}}),this.needValidFieldGroup?e(Wt,{key:"validateWidget-array",class:{validateWidget:!0,"validateWidget-array":!0},props:{schema:Object.entries(this.$props.schema).reduce((function(e,r){var t=s(r,2),a=t[0],o=t[1];return"items"!==a&&(e[a]=o),e}),{}),uiSchema:o,errorSchema:this.errorSchema,curNodePath:c,rootFormData:l,globalOptions:u}}):null])}},ra={name:"SelectLinkageField",props:i(i({},It),{},{combiningType:{type:String,default:"anyOf"},selectList:{type:Array,require:!0}}),data:function(){return{curSelectIndex:this.computedCurSelectIndexByFormData(Br(this.rootFormData,this.curNodePath))}},methods:{computedCurSelectIndexByFormData:function(e){var r=Pt(e,this.selectList,this.rootSchema,!0);return 0!==r?r:this.curSelectIndex||0},getSelectBoxVNode:function(){var e=this,r=et({schema:this.schema["".concat(this.combiningType,"Select")]||{},uiSchema:this.uiSchema["".concat(this.combiningType,"Select")]||{},curNodePath:this.curNodePath,rootFormData:this.rootFormData},(function(){return{widget:"SelectWidget"}}));if(r.label=r.label||this.schema.title,r.description=r.description||this.schema.description,!r.uiProps.enumOptions){var a=this.uiSchema[this.combiningType]||[];r.uiProps.enumOptions=this.selectList.map((function(e,r){return{label:Yr({schema:e,uiSchema:a[r],containsSpec:!1}).title||"选项 ".concat(r+1),value:r}}))}return this.$createElement(Wt,{key:"fieldSelect_".concat(this.combiningType),class:t({},"fieldSelect_".concat(this.combiningType),!0),props:i({isFormData:!1,curValue:this.curSelectIndex,globalOptions:this.globalOptions},r),on:{onChange:function(r){e.curSelectIndex=r}}})}},watch:{curSelectIndex:function(e,r){var t=Br(this.rootFormData,this.curNodePath),a=Ft(this.selectList[e],void 0,this.rootSchema),o=Object.prototype.hasOwnProperty;if(p(t)){var i=Tr(this.selectList[r],this.rootSchema);if("object"===f(i))for(var n in i.properties)o.call(i.properties,n)&&!o.call(a,n)&&Mr(t,n)}p(a)?Object.entries(a).forEach((function(e){var r=s(e,2),a=r[0],o=r[1];void 0!==o&&Wr(t,a,o)})):Wr(this.rootFormData,this.curNodePath,a||t)}},render:function(e){var r,a=this,o=this.$props.curNodePath,s=zr(o),l=null;if(("object"===this.schema.type||this.schema.properties)&&!function(e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!1;return!0}(this.schema.properties)){var c,u=Object.assign({},this.schema);delete u[this.combiningType],l=e(aa,{key:"origin_".concat(this.combiningType),class:(c={},t(c,"".concat(this.combiningType,"_originBox"),!0),t(c,"".concat(s,"-originBox"),!0),c),props:i(i({},this.$props),{},{schema:u})})}var p=[this.getSelectBoxVNode()],h=this.selectList[this.curSelectIndex];if(h){var m=this.schema,f=this.combiningType,v="".concat(this.combiningType,"Select");m.properties,m[f],m[v];var g=n(m,["properties",f,v].map(d));h=Object.assign({},g,h);var y=P(Yr({schema:this.schema,uiSchema:this.uiSchema,containsSpec:!1,curNodePath:o,rootFormData:this.rootFormData}),(function(e){return e===a.combiningType?void 0:"ui:".concat(e)})),b=P(rt({schema:this.schema,uiSchema:this.uiSchema,errorSchema:this.errorSchema}),(function(e){return e===a.combiningType?void 0:"err:".concat(e)}));p.push(e(aa,{key:"appendSchema_".concat(this.combiningType),props:i(i({},this.$props),{},{schema:i({"ui:showTitle":!1,"ui:showDescription":!1},h),required:this.required,uiSchema:i(i({},y),(this.uiSchema[this.combiningType]||[])[this.curSelectIndex]),errorSchema:i(i({},b),(this.errorSchema[this.combiningType]||[])[this.curSelectIndex])})}))}return p.push(e(Wt,{key:"validateWidget-".concat(this.combiningType),class:t({validateWidget:!0},"validateWidget-".concat(this.combiningType),!0),props:{schema:this.schema,uiSchema:this.uiSchema,errorSchema:this.errorSchema,curNodePath:this.curNodePath,rootFormData:this.rootFormData,globalOptions:this.globalOptions}})),e("div",[l,e("div",{key:"appendBox_".concat(this.combiningType),class:(r={appendCombining_box:!0},t(r,"".concat(this.combiningType,"_appendBox"),!0),t(r,"".concat(s,"-appendBox"),!0),r)},p)])}},ta={array:ea,boolean:Kt,integer:Ht,number:Ut,object:Bt,string:Qt,null:{render:function(){return null}},anyOf:{name:"AnyOfField",functional:!0,render:function(e,r){var t=r.data,a=t.props,o=n(t,["props"]);return e(ra,i(i({},o),{},{props:i(i({},a),{},{combiningType:"anyOf",selectList:a.schema.anyOf})}),r.children)}},oneOf:{name:"oneOfField",functional:!0,render:function(e,r){var t=r.data,a=t.props,o=n(t,["props"]);return e(ra,i(i({},o),{},{props:i(i({},a),{},{combiningType:"oneOf",selectList:a.schema.oneOf})}),r.children)}}},aa={name:"SchemaField",props:It,functional:!0,render:function(e,r){var a,o=r.props,n=o.rootSchema,s=Tr(o.schema,n),l=i(i({},o),{},{schema:s});if(0===Object.keys(s).length)return null;var c,u,d=Zr(ta,l),p=d.field,h=d.fieldProps,m=Jr({schema:s,uiSchema:o.uiSchema,curNodePath:o.curNodePath,rootFormData:o.rootFormData}),f=zr(o.curNodePath);return s.anyOf&&s.anyOf.length>0&&!it(s)?e(ta.anyOf,{class:(c={},t(c,"".concat(f,"-anyOf"),!0),t(c,"fieldItem",!0),t(c,"anyOfField",!0),c),props:l}):s.oneOf&&s.oneOf.length>0&&!it(s)?e(ta.oneOf,{class:(u={},t(u,"".concat(f,"-oneOf"),!0),t(u,"fieldItem",!0),t(u,"oneOfField",!0),u),props:l}):p&&!m?e(p,{props:i(i({},l),{},{fieldProps:h}),class:i(i({},r.data.class),{},(a={},t(a,w(p.name)||p,!0),t(a,"hiddenWidget",m),t(a,"fieldItem",!0),t(a,f,!0),a))}):null}};var oa={name:"CheckboxesWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}},ia=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("el-checkbox-group",e._g(e._b({},"el-checkbox-group",e.$attrs,!1),e.$listeners),e._l(e.enumOptions,(function(r,a){return t("el-checkbox",{key:a,attrs:{label:r.value}},[e._v("\n "+e._s(r.label)+"\n ")])})),1)};ia._withStripped=!0;var na=Dt({render:ia,staticRenderFns:[]},void 0,oa,void 0,!1,void 0,!1,void 0,void 0,void 0),sa={name:"RadioWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}},la=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("el-radio-group",e._g(e._b({},"el-radio-group",e.$attrs,!1),e.$listeners),e._l(e.enumOptions,(function(r,a){return t("el-radio",{key:a,attrs:{label:r.value}},[e._v("\n "+e._s(r.label)+"\n ")])})),1)};la._withStripped=!0;var ca=Dt({render:la,staticRenderFns:[]},void 0,sa,void 0,!1,void 0,!1,void 0,void 0,void 0),ua={name:"SelectWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}},da=function(){var e=this.$createElement,r=this._self._c||e;return r("el-select",this._g(this._b({},"el-select",this.$attrs,!1),this.$listeners),this._l(this.enumOptions,(function(e,t){return r("el-option",{key:t,attrs:{label:e.label,value:e.value}})})),1)};da._withStripped=!0;var pa={CheckboxesWidget:na,RadioWidget:ca,SelectWidget:Dt({render:da,staticRenderFns:[]},void 0,ua,void 0,!1,void 0,!1,void 0,void 0,void 0),TimePickerWidget:{name:"TimePickerWidget",functional:!0,render:function(e,r){r.data.attrs=i({"value-format":"HH:mm:ss"},r.data.attrs||{});var t=r.data.on.input;return r.data.on=i(i({},r.data.on),{},{input:function(e){t.apply(r.data.on,[null===e?void 0:e])}}),e("el-time-picker",r.data,r.children)}},DatePickerWidget:{name:"DatePickerWidget",functional:!0,render:function(e,r){var t=r.data.attrs||{},a=t.isNumberValue,o=t.isRange,s=n(t,["isNumberValue","isRange"]);r.data.attrs=i({type:o?"daterange":"date","value-format":a?"timestamp":"yyyy-MM-dd"},s);var l=r.data.on.input;return r.data.on=i(i({},r.data.on),{},{input:function(e){var t=null===e?o?[]:void 0:e;l.apply(r.data.on,[t])}}),e("el-date-picker",r.data,r.children)}},DateTimePickerWidget:{name:"DateTimePickerWidget",functional:!0,render:function(e,r){var t=r.data.attrs||{},a=t.isNumberValue,o=t.isRange,s=n(t,["isNumberValue","isRange"]);r.data.attrs=i({type:o?"datetimerange":"datetime"},s);var l=r.data.on.input;return r.data.on=i(i({},r.data.on),{},{input:function(e){var t;t=o?null===e?[]:e.map((function(e){return new Date(e)[a?"valueOf":"toISOString"]()})):null===e?void 0:new Date(e)[a?"valueOf":"toISOString"](),l.apply(r.data.on,[t])}}),e("el-date-picker",r.data,r.children)}},UploadWidget:{name:"UploadWidget",props:{value:{default:null,type:[String,Array]},responseFileUrl:{default:function(e){return e?e.url||e.data&&e.data.url:""},type:[Function]},btnText:{type:String,default:"点击上传"},slots:{type:null,default:null}},data:function(){var e=this.value,r=Array.isArray(e),t=this.$attrs.fileList||(r?e.map((function(e,r){return{name:"已上传文件(".concat(r+1,")"),url:e}})):e?[{name:"已上传文件",url:e}]:[]);return{isArrayValue:r,fileList:t}},methods:{getUrl:function(e){return e&&(e.response&&this.responseFileUrl(e.response)||e.url)||""},emitValue:function(e){var r,t=this;if(this.isArrayValue)r=e.length?e.reduce((function(e,r){var a=t.getUrl(r);return a&&e.push(a),e}),[]):[];else{var a=e[e.length-1];r=this.getUrl(a)}this.$emit("input",r)}},render:function(){var e=this,r=this.$createElement,t=this.$attrs,a=this.$props.slots,o={attrs:i(i({fileList:this.fileList,"on-exceed":function(){e.$message&&e.$message.warning("超出文件上传数")},"on-error":function(){e.$message&&e.$message.error("文件上传失败")},"on-preview":function(r){var t=e.getUrl(r);t&&function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_blank",t=document.createElement("a");t.style.display="none",t.target=r,t.href=e,document.body.appendChild(t),t.click(),document.body.removeChild(t)}(t)}},t),{},{"on-remove":function(r,a){e.emitValue(a),t["on-remove"]&&t["on-remove"](r,a)},"on-success":function(r,a,o){e.emitValue(o),t["on-success"]&&t["on-success"](r,a,o)}})};this.isArrayValue||(o.attrs.limit=1);var n=[];return a&&a.default?n.push(r("template",{slot:"default"},["function"==typeof a.default?a.default(r):a.default])):n.push(r("el-button",{props:{type:"primary"}},[this.btnText])),a&&a.tip&&n.push(r("template",{slot:"tip"},["function"==typeof a.tip?a.tip(r):a.tip])),r("el-upload",o,n)}}},ha={types:{boolean:"el-switch",string:"el-input",number:"el-input-number",integer:"el-input-number"},formats:{color:"el-color-picker",time:pa.TimePickerWidget,date:pa.DatePickerWidget,"date-time":pa.DateTimePickerWidget},common:{select:pa.SelectWidget,radioGroup:pa.RadioWidget,checkboxGroup:pa.CheckboxesWidget},widgetComponents:pa};xt(".genFromComponent.el-form--label-top .el-form-item__label{line-height:26px;padding-bottom:6px;font-size:14px}.genFromComponent .el-checkbox,.genFromComponent .el-color-picker{vertical-align:top}");var ma=Object.freeze({WIDGET_MAP:Object.freeze(ha),COMPONENT_MAP:Object.freeze({form:"el-form",formItem:"el-form-item",button:"el-button",popover:"el-popover"}),HELPERS:{isMiniDes:function(e){return e&&["left","right"].includes(e.labelPosition)}}}),fa=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r.WIDGET_MAP.widgetComponents&&Object.entries(r.WIDGET_MAP.widgetComponents).forEach((function(r){var t=s(r,2),a=t[0],o=t[1];return e.component(a,o)})),{name:"VueForm",props:Ot,provide:function(){return{genFormProvide:this.genFormProvide}},data:function(){var e=Ft(this.$props.schema,this.$props.value,this.$props.schema);return this.emitFormDataChange(e,this.value),{formData:e}},computed:{genFormProvide:function(){return{fallbackLabel:this.fallbackLabel}},footerParams:function(){return i({show:!0,okBtn:"保存",cancelBtn:"取消"},this.formFooter)}},watch:{formData:{handler:function(e,r){this.emitFormDataChange(e,r)},deep:!0},schema:function(e,r){this.willReceiveProps(e,r)},value:function(e,r){this.willReceiveProps(e,r)}},methods:{emitFormDataChange:function(e,r){this.$emit("input",e),this.$emit("on-change",{newValue:e,oldValue:r})},willReceiveProps:function(e,r){if(!v(e,r)){var t=Ft(this.$props.schema,this.$props.value,this.$props.schema);v(this.formData,t)||(this.formData=t)}}},mounted:function(){this.$emit("on-form-mounted",this.$refs.genEditForm)},render:function(e){var a,o=this,s=this.$scopedSlots.default?this.$scopedSlots.default({formData:o.formData,formRefFn:function(){return o.$refs.genEditForm}}):this.footerParams.show?e(_t,{props:{globalOptions:r,okBtn:o.footerParams.okBtn,cancelBtn:o.footerParams.cancelBtn,formItemAttrs:o.footerParams.formItemAttrs},on:{onCancel:function(){o.$emit("on-cancel")},onSubmit:function(){o.$refs.genEditForm.validate((function(e,r){return e?o.$emit("on-submit",o.formData):o.$emit("on-validation-failed",r)}))}}}):void 0,l=o.$props.formProps,c=l.layoutColumn,u=void 0===c?1:c,d=l.inlineFooter,p=l.inline,h=n(l,["layoutColumn","inlineFooter","inline"]),m={schema:this.schema,uiSchema:this.uiSchema,errorSchema:this.errorSchema,customFormats:this.customFormats,customRule:this.customRule,rootSchema:this.schema,rootFormData:this.formData,curNodePath:"",globalOptions:r,formProps:i({labelPosition:"top",labelSuffix:":"},h)};return e(r.COMPONENT_MAP.form,{class:(a={genFromComponent:!0,formInlineFooter:d,formInline:p},t(a,"genFromComponent_".concat(this.schema.id,"Form"),!!this.schema.id),t(a,"layoutColumn",!p),t(a,"layoutColumn-".concat(u),!p),a),ref:"genEditForm",props:i({model:o.formData},m.formProps)},[e(aa,{props:m}),s])}}}(ma);"undefined"!=typeof window&&window.Vue&&window.Vue.component("VueForm",fa);export default fa;export{aa as SchemaField,It as fieldProps,dt as formUtils,Ft as getDefaultFormState,ma as globalOptions,jr as i18n,wt as schemaValidate,Ur as vueUtils}; diff --git a/packages/lib/vue2/vue2-form-element/dist/vueJsonSchemaForm.umd.js b/packages/lib/vue2/vue2-form-element/dist/vueJsonSchemaForm.umd.js index 9c0a844a..34ec5434 100644 --- a/packages/lib/vue2/vue2-form-element/dist/vueJsonSchemaForm.umd.js +++ b/packages/lib/vue2/vue2-form-element/dist/vueJsonSchemaForm.umd.js @@ -10324,7 +10324,12 @@ self.value = formatValue.value; if (self.onChange) { - self.onChange(formatValue.value, preVal); + self.onChange({ + curVal: formatValue.value, + preVal: preVal, + parentFormData: getPathVal$1(self.rootFormData, self.curNodePath, 1), + rootFormData: self.rootFormData + }); } } } diff --git a/packages/lib/vue2/vue2-form-element/dist/vueJsonSchemaForm.umd.min.js b/packages/lib/vue2/vue2-form-element/dist/vueJsonSchemaForm.umd.min.js index eabfbf32..0fc96985 100644 --- a/packages/lib/vue2/vue2-form-element/dist/vueJsonSchemaForm.umd.min.js +++ b/packages/lib/vue2/vue2-form-element/dist/vueJsonSchemaForm.umd.min.js @@ -1,4 +1,4 @@ /** @license @lljj/vue-json-schema-form (c) 2020-2021 Liu.Jun License: Apache-2.0 */ !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).vueJsonSchemaForm={},e.Vue)}(this,(function(e,r){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=t(r);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function n(){return(n=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e}).apply(this,arguments)}function s(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function l(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?s(Object(t),!0).forEach((function(r){i(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function c(e,r){if(null==e)return{};var t,a,o=function(e,r){if(null==e)return{};var t,a,o={},i=Object.keys(e);for(a=0;a<i.length;a++)t=i[a],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function u(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],a=!0,o=!1,i=void 0;try{for(var n,s=e[Symbol.iterator]();!(a=(n=s.next()).done)&&(t.push(n.value),!r||t.length!==r);a=!0);}catch(e){o=!0,i=e}finally{try{a||null==s.return||s.return()}finally{if(o)throw i}}return t}(e,r)||p(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,r){if(e){if("string"==typeof e)return h(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?h(e,r):void 0}}function h(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);t<r;t++)a[t]=e[t];return a}function m(e){var r=function(e,r){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var a=t.call(e,r||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:String(r)}function f(e){return"[object Object]"===Object.prototype.toString.call(e)}function v(e){return"[object Arguments]"===Object.prototype.toString.call(e)}function g(e,r){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=Object.assign({},e);return Object.keys(r).reduce((function(a,o){var i=e?e[o]:{},n=r[o];return e&&e.hasOwnProperty(o)&&f(n)?a[o]=g(i,n,t):t&&Array.isArray(i)&&Array.isArray(n)?a[o]=i.concat(n):a[o]=n,a}),a)}function y(e){var r,t=e.type;return!t&&e.const?(r=e.const,Array.isArray(r)?"array":"string"==typeof r?"string":null==r?"null":"boolean"==typeof r?"boolean":isNaN(r)?"object"===o(r)?"object":"string":"number"):!t&&e.enum?"string":!t&&e.items?"array":t||!e.properties&&!e.additionalProperties?t instanceof Array&&2===t.length&&t.includes("null")?t.find((function(e){return"null"!==e})):t:"object"}function b(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===r)return!0;if("function"==typeof e||"function"==typeof r)return!0;if("object"!==o(e)||"object"!==o(r))return!1;if(null===e||null===r)return!1;if(e instanceof Date&&r instanceof Date)return e.getTime()===r.getTime();if(e instanceof RegExp&&r instanceof RegExp)return e.source===r.source&&e.global===r.global&&e.multiline===r.multiline&&e.lastIndex===r.lastIndex&&e.ignoreCase===r.ignoreCase;if(v(e)||v(r)){if(!v(e)||!v(r))return!1;var i=Array.prototype.slice;return b(i.call(e),i.call(r),t,a)}if(e.constructor!==r.constructor)return!1;var n=Object.keys(e),s=Object.keys(r);if(0===n.length&&0===s.length)return!0;if(n.length!==s.length)return!1;for(var l,c=t.length;c--;)if(t[c]===e)return a[c]===r;t.push(e),a.push(r),n.sort(),s.sort();for(var u=n.length-1;u>=0;u--)if(n[u]!==s[u])return!1;for(var d=n.length-1;d>=0;d--)if(!b(e[l=n[d]],r[l],t,a))return!1;return t.pop(),a.pop(),!0}var P,w,E=(P="".concat(+new Date),w=0,function(){var e="".concat(+new Date);return e===P?w+=1:w=0,"".concat(P=e,"x").concat(w)});function S(e,r){return Object.entries(e).reduce((function(e,t){var a=u(t,2),o=a[0],i=a[1],n=r(o,i);return void 0!==n&&(e[n]=i),e}),{})}function F(e){return void 0===e?e:String(e).replace(/^./,(function(e){return e.toLocaleLowerCase()}))}function x(e,r){return e*r/function e(r,t){return 0===t?r:e(t,r%t)}(e,r)}function O(e,r){for(var t=r.split("/"),a=0;a<t.length;a+=1){if(void 0===e)return;e=""===t[a]?e:e[t[a]]}return e}function _(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e;if(!e.startsWith("#"))throw new Error("Could not find a definition for ".concat(t,"."));var a=O(r,e=decodeURIComponent(e.substring(1)));if(void 0===a)throw new Error("Could not find a definition for ".concat(t,"."));return a.hasOwnProperty("$ref")?_(a.$ref,r):a}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function D(e,r){return e(r={exports:{}},r.exports),r.exports}function $(e){return e&&e.default||e}var k,j=D((function(e,r){ /** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ -!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var a=r.length-1,o=1;o<a;++o)r[o]=r[o].slice(1,-1);return r[a]=r[a].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function a(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function i(e){var a=r("[0-9]","[A-Fa-f]"),o=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),i="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",n=r("[\\:\\/\\?\\#\\[\\]\\@]",i),s=e?"[\\uE000-\\uF8FF]":"[]",l=r("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t("[A-Za-z]"+r("[A-Za-z]","[0-9]","[\\+\\-\\.]")+"*"),t(t(o+"|"+r(l,i,"[\\:]"))+"*");var c=t(t("25[0-5]")+"|"+t("2[0-4][0-9]")+"|"+t("1[0-9][0-9]")+"|"+t("0?[1-9][0-9]")+"|0?0?[0-9]"),u=t(c+"\\."+c+"\\."+c+"\\."+c),d=t(a+"{1,4}"),p=t(t(d+"\\:"+d)+"|"+u),h=t(t(d+"\\:")+"{6}"+p),m=t("\\:\\:"+t(d+"\\:")+"{5}"+p),f=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+p),v=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+p),g=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+p),y=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+p),b=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+p),P=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),w=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),E=t([h,m,f,v,g,y,b,P,w].join("|")),S=t(t(l+"|"+o)+"+");t("[vV]"+a+"+\\."+r(l,i,"[\\:]")+"+"),t(t(o+"|"+r(l,i))+"*");var F=t(o+"|"+r(l,i,"[\\:\\@]"));return t(t(o+"|"+r(l,i,"[\\@]"))+"+"),t(t(F+"|"+r("[\\/\\?]",s))+"*"),{NOT_SCHEME:new RegExp(r("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,i),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,i),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,i),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,i),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,i,"[\\:\\@\\/\\?]",s),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,i,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,i),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,n),"g"),PCT_ENCODED:new RegExp(o,"g"),IPV4ADDRESS:new RegExp("^("+u+")$"),IPV6ADDRESS:new RegExp("^\\[?("+E+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+S+")")+"?\\]?$")}}var n=i(!1),s=i(!0),l=function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,r){var t=[],a=!0,o=!1,i=void 0;try{for(var n,s=e[Symbol.iterator]();!(a=(n=s.next()).done)&&(t.push(n.value),!r||t.length!==r);a=!0);}catch(e){o=!0,i=e}finally{try{!a&&s.return&&s.return()}finally{if(o)throw i}}return t}(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=2147483647,u=/^xn--/,d=/[^\0-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,f=String.fromCharCode;function v(e){throw new RangeError(h[e])}function g(e,r){var t=e.split("@"),a="";t.length>1&&(a=t[0]+"@",e=t[1]);var o=function(e,r){for(var t=[],a=e.length;a--;)t[a]=r(e[a]);return t}((e=e.replace(p,".")).split("."),r).join(".");return a+o}function y(e){for(var r=[],t=0,a=e.length;t<a;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<a){var i=e.charCodeAt(t++);56320==(64512&i)?r.push(((1023&o)<<10)+(1023&i)+65536):(r.push(o),t--)}else r.push(o)}return r}var b=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},P=function(e,r,t){var a=0;for(e=t?m(e/700):e>>1,e+=m(e/r);e>455;a+=36)e=m(e/35);return m(a+36*e/(e+38))},w=function(e){var r,t=[],a=e.length,o=0,i=128,n=72,s=e.lastIndexOf("-");s<0&&(s=0);for(var l=0;l<s;++l)e.charCodeAt(l)>=128&&v("not-basic"),t.push(e.charCodeAt(l));for(var u=s>0?s+1:0;u<a;){for(var d=o,p=1,h=36;;h+=36){u>=a&&v("invalid-input");var f=(r=e.charCodeAt(u++))-48<10?r-22:r-65<26?r-65:r-97<26?r-97:36;(f>=36||f>m((c-o)/p))&&v("overflow"),o+=f*p;var g=h<=n?1:h>=n+26?26:h-n;if(f<g)break;var y=36-g;p>m(c/y)&&v("overflow"),p*=y}var b=t.length+1;n=P(o-d,b,0==d),m(o/b)>c-i&&v("overflow"),i+=m(o/b),o%=b,t.splice(o++,0,i)}return String.fromCodePoint.apply(String,t)},E=function(e){var r=[],t=(e=y(e)).length,a=128,o=0,i=72,n=!0,s=!1,l=void 0;try{for(var u,d=e[Symbol.iterator]();!(n=(u=d.next()).done);n=!0){var p=u.value;p<128&&r.push(f(p))}}catch(e){s=!0,l=e}finally{try{!n&&d.return&&d.return()}finally{if(s)throw l}}var h=r.length,g=h;for(h&&r.push("-");g<t;){var w=c,E=!0,S=!1,F=void 0;try{for(var x,O=e[Symbol.iterator]();!(E=(x=O.next()).done);E=!0){var _=x.value;_>=a&&_<w&&(w=_)}}catch(e){S=!0,F=e}finally{try{!E&&O.return&&O.return()}finally{if(S)throw F}}var D=g+1;w-a>m((c-o)/D)&&v("overflow"),o+=(w-a)*D,a=w;var $=!0,k=!1,j=void 0;try{for(var I,A=e[Symbol.iterator]();!($=(I=A.next()).done);$=!0){var C=I.value;if(C<a&&++o>c&&v("overflow"),C==a){for(var R=o,N=36;;N+=36){var L=N<=i?1:N>=i+26?26:N-i;if(R<L)break;var T=R-L,z=36-L;r.push(f(b(L+T%z,0))),R=m(T/z)}r.push(f(b(R,0))),i=P(o,D,g==h),o=0,++g}}}catch(e){k=!0,j=e}finally{try{!$&&A.return&&A.return()}finally{if(k)throw j}}++o,++a}return r.join("")},S=function(e){return g(e,(function(e){return d.test(e)?"xn--"+E(e):e}))},F=function(e){return g(e,(function(e){return u.test(e)?w(e.slice(4).toLowerCase()):e}))},x={};function O(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function _(e){for(var r="",t=0,a=e.length;t<a;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(a-t>=6){var i=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&i)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(a-t>=9){var n=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&n)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function D(e,r){function t(e){var t=_(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,O).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,O).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,O).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,O).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,O).replace(r.PCT_ENCODED,o)),e}function $(e){return e.replace(/^0*(.*)/,"$1")||"0"}function k(e,r){var t=e.match(r.IPV4ADDRESS)||[],a=l(t,2)[1];return a?a.split(".").map($).join("."):e}function j(e,r){var t=e.match(r.IPV6ADDRESS)||[],a=l(t,3),o=a[1],i=a[2];if(o){for(var n=o.toLowerCase().split("::").reverse(),s=l(n,2),c=s[0],u=s[1],d=u?u.split(":").map($):[],p=c.split(":").map($),h=r.IPV4ADDRESS.test(p[p.length-1]),m=h?7:8,f=p.length-m,v=Array(m),g=0;g<m;++g)v[g]=d[g]||p[f+g]||"";h&&(v[m-1]=k(v[m-1],r));var y=v.reduce((function(e,r,t){if(!r||"0"===r){var a=e[e.length-1];a&&a.index+a.length===t?a.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(y&&y.length>1){var P=v.slice(0,y.index),w=v.slice(y.index+y.length);b=P.join(":")+"::"+w.join(":")}else b=v.join(":");return i&&(b+="%"+i),b}return e}var I=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,A=void 0==="".match(/(){0}/)[1];function C(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},a=!1!==r.iri?s:n;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(I);if(o){A?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=j(k(t.host,a),a)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var i=x[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||i&&i.unicodeSupport)D(t,a);else{if(t.host&&(r.domainHost||i&&i.domainHost))try{t.host=S(t.host.replace(a.PCT_ENCODED,_).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}D(t,n)}i&&i.parse&&i.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function R(e,r){var t=!1!==r.iri?s:n,a=[];return void 0!==e.userinfo&&(a.push(e.userinfo),a.push("@")),void 0!==e.host&&a.push(j(k(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(a.push(":"),a.push(String(e.port))),a.length?a.join(""):void 0}var N=/^\.\.?\//,L=/^\/\.(\/|$)/,T=/^\/\.\.(\/|$)/,z=/^\/?(?:.|\n)*?(?=\/|$)/;function q(e){for(var r=[];e.length;)if(e.match(N))e=e.replace(N,"");else if(e.match(L))e=e.replace(L,"/");else if(e.match(T))e=e.replace(T,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(z);if(!t)throw new Error("Unexpected dot segment condition");var a=t[0];e=e.slice(a.length),r.push(a)}return r.join("")}function V(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?s:n,a=[],o=x[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?F(e.host):S(e.host.replace(t.PCT_ENCODED,_).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}D(e,t),"suffix"!==r.reference&&e.scheme&&(a.push(e.scheme),a.push(":"));var i=R(e,r);if(void 0!==i&&("suffix"!==r.reference&&a.push("//"),a.push(i),e.path&&"/"!==e.path.charAt(0)&&a.push("/")),void 0!==e.path){var l=e.path;r.absolutePath||o&&o.absolutePath||(l=q(l)),void 0===i&&(l=l.replace(/^\/\//,"/%2F")),a.push(l)}return void 0!==e.query&&(a.push("?"),a.push(e.query)),void 0!==e.fragment&&(a.push("#"),a.push(e.fragment)),a.join("")}function M(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],o={};return a||(e=C(V(e,t),t),r=C(V(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=q(r.path||""),o.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=q(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=q(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=q(o.path)),o.query=r.query):(o.path=e.path,void 0!==r.query?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function U(e,r){return e&&e.toString().replace(r&&r.iri?s.PCT_ENCODED:n.PCT_ENCODED,_)}var W={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},B={scheme:"https",domainHost:W.domainHost,parse:W.parse,serialize:W.serialize};function Q(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var H={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=Q(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(Q(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),a=l(t,2),o=a[0],i=a[1];e.path=o&&"/"!==o?o:void 0,e.query=i,e.resourceName=void 0}return e.fragment=void 0,e}},K={scheme:"wss",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize},G={},J="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Z="[0-9A-Fa-f]",X=t(t("%[EFef]"+Z+"%"+Z+Z+"%"+Z+Z)+"|"+t("%[89A-Fa-f]"+Z+"%"+Z+Z)+"|"+t("%"+Z+Z)),Y=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),ee=new RegExp(J,"g"),re=new RegExp(X,"g"),te=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',Y),"g"),ae=new RegExp(r("[^]",J,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),oe=ae;function ie(e){var r=_(e);return r.match(ee)?r:e}var ne={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,i={},n=t.query.split("&"),s=0,l=n.length;s<l;++s){var c=n[s].split("=");switch(c[0]){case"to":for(var u=c[1].split(","),d=0,p=u.length;d<p;++d)a.push(u[d]);break;case"subject":t.subject=U(c[1],r);break;case"body":t.body=U(c[1],r);break;default:o=!0,i[U(c[0],r)]=U(c[1],r)}}o&&(t.headers=i)}t.query=void 0;for(var h=0,m=a.length;h<m;++h){var f=a[h].split("@");if(f[0]=U(f[0]),r.unicodeSupport)f[1]=U(f[1],r).toLowerCase();else try{f[1]=S(U(f[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}a[h]=f.join("@")}return t},serialize:function(e,r){var t,a=e,i=null!=(t=e.to)?t instanceof Array?t:"number"!=typeof t.length||t.split||t.setInterval||t.call?[t]:Array.prototype.slice.call(t):[];if(i){for(var n=0,s=i.length;n<s;++n){var l=String(i[n]),c=l.lastIndexOf("@"),u=l.slice(0,c).replace(re,ie).replace(re,o).replace(te,O),d=l.slice(c+1);try{d=r.iri?F(d):S(U(d,r).toLowerCase())}catch(e){a.error=a.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}i[n]=u+"@"+d}a.path=i.join(",")}var p=e.headers=e.headers||{};e.subject&&(p.subject=e.subject),e.body&&(p.body=e.body);var h=[];for(var m in p)p[m]!==G[m]&&h.push(m.replace(re,ie).replace(re,o).replace(ae,O)+"="+p[m].replace(re,ie).replace(re,o).replace(oe,O));return h.length&&(a.query=h.join("&")),a}},se=/^([^\:]+)\:(.*)/,le={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(se),a=e;if(t){var o=r.scheme||a.scheme||"urn",i=t[1].toLowerCase(),n=t[2],s=o+":"+(r.nid||i),l=x[s];a.nid=i,a.nss=n,a.path=void 0,l&&(a=l.parse(a,r))}else a.error=a.error||"URN can not be parsed.";return a},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",a=e.nid,o=t+":"+(r.nid||a),i=x[o];i&&(e=i.serialize(e,r));var n=e,s=e.nss;return n.path=(a||r.nid)+":"+s,n}},ce=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ue={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match(ce)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};x[W.scheme]=W,x[B.scheme]=B,x[H.scheme]=H,x[K.scheme]=K,x[ne.scheme]=ne,x[le.scheme]=le,x[ue.scheme]=ue,e.SCHEMES=x,e.pctEncChar=O,e.pctDecChars=_,e.parse=C,e.removeDotSegments=q,e.serialize=V,e.resolveComponents=M,e.resolve=function(e,r,t){var a=function(e,r){var t=e;if(r)for(var a in r)t[a]=r[a];return t}({scheme:"null"},t);return V(M(C(e,a),C(r,a),a,!0),a)},e.normalize=function(e,r){return"string"==typeof e?e=V(C(e,r),r):"object"===a(e)&&(e=C(V(e,r),r)),e},e.equal=function(e,r,t){return"string"==typeof e?e=V(C(e,t),t):"object"===a(e)&&(e=V(e,t)),"string"==typeof r?r=V(C(r,t),t):"object"===a(r)&&(r=V(r,t)),e===r},e.escapeComponent=function(e,r){return e&&e.toString().replace(r&&r.iri?s.ESCAPE:n.ESCAPE,O)},e.unescapeComponent=U,Object.defineProperty(e,"__esModule",{value:!0})}(r)}));(k=j)&&k.__esModule&&Object.prototype.hasOwnProperty.call(k,"default")&&k.default;var I=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 a,o,i;if(Array.isArray(r)){if((a=r.length)!=t.length)return!1;for(o=a;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((a=(i=Object.keys(r)).length)!==Object.keys(t).length)return!1;for(o=a;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,i[o]))return!1;for(o=a;0!=o--;){var n=i[o];if(!e(r[n],t[n]))return!1}return!0}return r!=r&&t!=t},A={copy:function(e,r){for(var t in r=r||{},e)r[t]=e[t];return r},checkDataType:C,checkDataTypes:function(e,r,t){switch(e.length){case 1:return C(e[0],r,t,!0);default:var a="",o=N(e);for(var i in o.array&&o.object&&(a=o.null?"(":"(!"+r+" || ",a+="typeof "+r+' !== "object")',delete o.null,delete o.array,delete o.object),o.number&&delete o.integer,o)a+=(a?" && ":"")+C(i,r,t,!0);return a}},coerceToTypes:function(e,r){if(Array.isArray(r)){for(var t=[],a=0;a<r.length;a++){var o=r[a];(R[o]||"array"===e&&"array"===o)&&(t[t.length]=o)}if(t.length)return t}else{if(R[r])return[r];if("array"===e&&"array"===r)return["array"]}},toHash:N,getProperty:z,escapeQuotes:q,equal:I,ucs2length:function(e){for(var r,t=0,a=e.length,o=0;o<a;)t++,(r=e.charCodeAt(o++))>=55296&&r<=56319&&o<a&&56320==(64512&(r=e.charCodeAt(o)))&&o++;return t},varOccurences:function(e,r){r+="[^0-9]";var t=e.match(new RegExp(r,"g"));return t?t.length:0},varReplace:function(e,r,t){return r+="([^0-9])",t=t.replace(/\$/g,"$$$$"),e.replace(new RegExp(r,"g"),t+"$1")},schemaHasRules:function(e,r){if("boolean"==typeof e)return!e;for(var t in e)if(r[t])return!0},schemaHasRulesExcept:function(e,r,t){if("boolean"==typeof e)return!e&&"not"!=t;for(var a in e)if(a!=t&&r[a])return!0},schemaUnknownRules:function(e,r){if("boolean"==typeof e)return;for(var t in e)if(!r[t])return t},toQuotedString:V,getPathExpr:function(e,r,t,a){return W(e,t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'")},getPath:function(e,r,t){var a=V(t?"/"+B(r):z(r));return W(e,a)},getData:function(e,r,t){var a,o,i,n;if(""===e)return"rootData";if("/"==e[0]){if(!M.test(e))throw new Error("Invalid JSON-pointer: "+e);o=e,i="rootData"}else{if(!(n=e.match(U)))throw new Error("Invalid JSON-pointer: "+e);if(a=+n[1],"#"==(o=n[2])){if(a>=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(i="data"+(r-a||""),!o)return i}for(var s=i,l=o.split("/"),c=0;c<l.length;c++){var u=l[c];u&&(i+=z(Q(u)),s+=" && "+i)}return s},unescapeFragment:function(e){return Q(decodeURIComponent(e))},unescapeJsonPointer:Q,escapeFragment:function(e){return encodeURIComponent(B(e))},escapeJsonPointer:B};function C(e,r,t,a){var o=a?" !== ":" === ",i=a?" || ":" && ",n=a?"!":"",s=a?"":"!";switch(e){case"null":return r+o+"null";case"array":return n+"Array.isArray("+r+")";case"object":return"("+n+r+i+"typeof "+r+o+'"object"'+i+s+"Array.isArray("+r+"))";case"integer":return"(typeof "+r+o+'"number"'+i+s+"("+r+" % 1)"+i+r+o+r+(t?i+n+"isFinite("+r+")":"")+")";case"number":return"(typeof "+r+o+'"'+e+'"'+(t?i+n+"isFinite("+r+")":"")+")";default:return"typeof "+r+o+'"'+e+'"'}}var R=N(["string","number","integer","boolean","null"]);function N(e){for(var r={},t=0;t<e.length;t++)r[e[t]]=!0;return r}var L=/^[a-z$_][a-z$_0-9]*$/i,T=/'|\\/g;function z(e){return"number"==typeof e?"["+e+"]":L.test(e)?"."+e:"['"+q(e)+"']"}function q(e){return e.replace(T,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function V(e){return"'"+q(e)+"'"}var M=/^\/(?:[^~]|~0|~1)*$/,U=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function W(e,r){return'""'==e?r:(e+" + "+r).replace(/([^\\])' \+ '/g,"$1")}function B(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Q(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}var H=function(e){A.copy(e,this)};var K=D((function(e){var r=e.exports=function(e,t,a){"function"==typeof t&&(a=t,t={}),function e(t,a,o,i,n,s,l,c,u,d){if(i&&"object"==typeof i&&!Array.isArray(i)){for(var p in a(i,n,s,l,c,u,d),i){var h=i[p];if(Array.isArray(h)){if(p in r.arrayKeywords)for(var m=0;m<h.length;m++)e(t,a,o,h[m],n+"/"+p+"/"+m,s,n,p,i,m)}else if(p in r.propsKeywords){if(h&&"object"==typeof h)for(var f in h)e(t,a,o,h[f],n+"/"+p+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),s,n,p,i,f)}else(p in r.keywords||t.allKeys&&!(p in r.skipKeywords))&&e(t,a,o,h,n+"/"+p,s,n,p,i)}o(i,n,s,l,c,u,d)}}(t,"function"==typeof(a=t.cb||a)?a:a.pre||function(){},a.post||function(){},e,"",e)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}})),G=J;function J(e,r,t){var a=this._refs[t];if("string"==typeof a){if(!this._refs[a])return J.call(this,e,r,a);a=this._refs[a]}if((a=a||this._schemas[t])instanceof H)return te(a.schema,this._opts.inlineRefs)?a.schema:a.validate||this._compile(a);var o,i,n,s=Z.call(this,r,t);return s&&(o=s.schema,r=s.root,n=s.baseId),o instanceof H?i=o.validate||e.call(this,o.schema,r,void 0,n):void 0!==o&&(i=te(o,this._opts.inlineRefs)?o:e.call(this,o,r,void 0,n)),i}function Z(e,r){var t=j.parse(r),a=oe(t),o=ae(this._getId(e.schema));if(0===Object.keys(e.schema).length||a!==o){var i=ne(a),n=this._refs[i];if("string"==typeof n)return X.call(this,e,n,t);if(n instanceof H)n.validate||this._compile(n),e=n;else{if(!((n=this._schemas[i])instanceof H))return;if(n.validate||this._compile(n),i==ne(r))return{schema:n,root:e,baseId:o};e=n}if(!e.schema)return;o=ae(this._getId(e.schema))}return ee.call(this,t,o,e.schema,e)}function X(e,r,t){var a=Z.call(this,e,r);if(a){var o=a.schema,i=a.baseId;e=a.root;var n=this._getId(o);return n&&(i=se(i,n)),ee.call(this,t,i,o,e)}}J.normalizeId=ne,J.fullPath=ae,J.url=se,J.ids=function(e){var r=ne(this._getId(e)),t={"":r},a={"":ae(r,!1)},o={},i=this;return K(e,{allKeys:!0},(function(e,r,n,s,l,c,u){if(""!==r){var d=i._getId(e),p=t[s],h=a[s]+"/"+l;if(void 0!==u&&(h+="/"+("number"==typeof u?u:A.escapeFragment(u))),"string"==typeof d){d=p=ne(p?j.resolve(p,d):d);var m=i._refs[d];if("string"==typeof m&&(m=i._refs[m]),m&&m.schema){if(!I(e,m.schema))throw new Error('id "'+d+'" resolves to more than one schema')}else if(d!=ne(h))if("#"==d[0]){if(o[d]&&!I(e,o[d]))throw new Error('id "'+d+'" resolves to more than one schema');o[d]=e}else i._refs[d]=h}t[r]=p,a[r]=h}})),o},J.inlineRef=te,J.schema=Z;var Y=A.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function ee(e,r,t,a){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var o=e.fragment.split("/"),i=1;i<o.length;i++){var n=o[i];if(n){if(void 0===(t=t[n=A.unescapeFragment(n)]))break;var s;if(!Y[n]&&((s=this._getId(t))&&(r=se(r,s)),t.$ref)){var l=se(r,t.$ref),c=Z.call(this,a,l);c&&(t=c.schema,a=c.root,r=c.baseId)}}}return void 0!==t&&t!==a.schema?{schema:t,root:a,baseId:r}:void 0}}var re=A.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function te(e,r){return!1!==r&&(void 0===r||!0===r?function e(r){var t;if(Array.isArray(r)){for(var a=0;a<r.length;a++)if("object"==typeof(t=r[a])&&!e(t))return!1}else for(var o in r){if("$ref"==o)return!1;if("object"==typeof(t=r[o])&&!e(t))return!1}return!0}(e):r?function e(r){var t,a=0;if(Array.isArray(r)){for(var o=0;o<r.length;o++)if("object"==typeof(t=r[o])&&(a+=e(t)),a==1/0)return 1/0}else for(var i in r){if("$ref"==i)return 1/0;if(re[i])a++;else if("object"==typeof(t=r[i])&&(a+=e(t)+1),a==1/0)return 1/0}return a}(e)<=r:void 0)}function ae(e,r){return!1!==r&&(e=ne(e)),oe(j.parse(e))}function oe(e){return j.serialize(e).split("#")[0]+"#"}var ie=/#\/?$/;function ne(e){return e?e.replace(ie,""):""}function se(e,r){return r=ne(r),j.resolve(e,r)}var le={Validation:ue((function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:ue(ce)};function ce(e,r,t){this.message=t||ce.message(e,r),this.missingRef=G.url(e,r),this.missingSchema=G.normalizeId(G.fullPath(this.missingRef))}function ue(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}ce.message=function(e,r){return"can't resolve reference "+r+" from id "+e};var de=function(e,r){r||(r={}),"function"==typeof r&&(r={cmp:r});var t,a="boolean"==typeof r.cycles&&r.cycles,o=r.cmp&&(t=r.cmp,function(e){return function(r,a){var o={key:r,value:e[r]},i={key:a,value:e[a]};return t(o,i)}}),i=[];return function e(r){if(r&&r.toJSON&&"function"==typeof r.toJSON&&(r=r.toJSON()),void 0!==r){if("number"==typeof r)return isFinite(r)?""+r:"null";if("object"!=typeof r)return JSON.stringify(r);var t,n;if(Array.isArray(r)){for(n="[",t=0;t<r.length;t++)t&&(n+=","),n+=e(r[t])||"null";return n+"]"}if(null===r)return"null";if(-1!==i.indexOf(r)){if(a)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=i.push(r)-1,l=Object.keys(r).sort(o&&o(r));for(n="",t=0;t<l.length;t++){var c=l[t],u=e(r[c]);u&&(n&&(n+=","),n+=JSON.stringify(c)+":"+u)}return i.splice(s,1),"{"+n+"}"}}(e)},pe=function(e,r,t){var a="",o=!0===e.schema.$async,i=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),n=e.self._getId(e.schema);if(e.opts.strictKeywords){var s=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(s){var l="unknown keyword: "+s;if("log"!==e.opts.strictKeywords)throw new Error(l);e.logger.warn(l)}}if(e.isTop&&(a+=" var validate = ",o&&(e.async=!0,a+="async "),a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",n&&(e.opts.sourceCode||e.opts.processCode)&&(a+=" /*# sourceURL="+n+" */ ")),"boolean"==typeof e.schema||!i&&!e.schema.$ref){var c=e.level,u=e.dataLevel,d=e.schema["false schema"],p=e.schemaPath+e.util.getProperty("false schema"),h=e.errSchemaPath+"/false schema",m=!e.opts.allErrors,f="data"+(u||""),v="valid"+c;if(!1===e.schema){e.isTop?m=!0:a+=" var "+v+" = false; ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'boolean schema is false' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";var g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?a+=o?" return data; ":" validate.errors = null; return true; ":a+=" var "+v+" = true; ";return e.isTop&&(a+=" }; return validate; "),a}if(e.isTop){var y=e.isTop;c=e.level=0,u=e.dataLevel=0,f="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var b="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}a+=" var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data; "}else{c=e.level,f="data"+((u=e.dataLevel)||"");if(n&&(e.baseId=e.resolve.url(e.baseId,n)),o&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+c+" = errors;"}v="valid"+c,m=!e.opts.allErrors;var P="",w="",E=e.schema.type,S=Array.isArray(E);if(E&&e.opts.nullable&&!0===e.schema.nullable&&(S?-1==E.indexOf("null")&&(E=E.concat("null")):"null"!=E&&(E=[E,"null"],S=!0)),S&&1==E.length&&(E=E[0],S=!1),e.schema.$ref&&i){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(i=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(a+=" "+e.RULES.all.$comment.code(e,"$comment")),E){if(e.opts.coerceTypes)var F=e.util.coerceToTypes(e.opts.coerceTypes,E);var x=e.RULES.types[E];if(F||S||!0===x||x&&!Z(x)){p=e.schemaPath+".type",h=e.errSchemaPath+"/type",p=e.schemaPath+".type",h=e.errSchemaPath+"/type";var O=S?"checkDataTypes":"checkDataType";if(a+=" if ("+e.util[O](E,f,e.opts.strictNumbers,!0)+") { ",F){var _="dataType"+c,D="coerced"+c;a+=" var "+_+" = typeof "+f+"; var "+D+" = undefined; ","array"==e.opts.coerceTypes&&(a+=" if ("+_+" == 'object' && Array.isArray("+f+") && "+f+".length == 1) { "+f+" = "+f+"[0]; "+_+" = typeof "+f+"; if ("+e.util.checkDataType(e.schema.type,f,e.opts.strictNumbers)+") "+D+" = "+f+"; } "),a+=" if ("+D+" !== undefined) ; ";var $=F;if($)for(var k,j=-1,I=$.length-1;j<I;)"string"==(k=$[j+=1])?a+=" else if ("+_+" == 'number' || "+_+" == 'boolean') "+D+" = '' + "+f+"; else if ("+f+" === null) "+D+" = ''; ":"number"==k||"integer"==k?(a+=" else if ("+_+" == 'boolean' || "+f+" === null || ("+_+" == 'string' && "+f+" && "+f+" == +"+f+" ","integer"==k&&(a+=" && !("+f+" % 1)"),a+=")) "+D+" = +"+f+"; "):"boolean"==k?a+=" else if ("+f+" === 'false' || "+f+" === 0 || "+f+" === null) "+D+" = false; else if ("+f+" === 'true' || "+f+" === 1) "+D+" = true; ":"null"==k?a+=" else if ("+f+" === '' || "+f+" === 0 || "+f+" === false) "+D+" = null; ":"array"==e.opts.coerceTypes&&"array"==k&&(a+=" else if ("+_+" == 'string' || "+_+" == 'number' || "+_+" == 'boolean' || "+f+" == null) "+D+" = ["+f+"]; ");a+=" else { ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } if ("+D+" !== undefined) { ";var A=u?"data"+(u-1||""):"parentData";a+=" "+f+" = "+D+"; ",u||(a+="if ("+A+" !== undefined)"),a+=" "+A+"["+(u?e.dataPathArr[u]:"parentDataProperty")+"] = "+D+"; } "}else{(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } "}}if(e.schema.$ref&&!i)a+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",m&&(a+=" } if (errors === ",a+=y?"0":"errs_"+c,a+=") { ",w+="}");else{var C=e.RULES;if(C)for(var R=-1,N=C.length-1;R<N;)if(Z(x=C[R+=1])){if(x.type&&(a+=" if ("+e.util.checkDataType(x.type,f,e.opts.strictNumbers)+") { "),e.opts.useDefaults)if("object"==x.type&&e.schema.properties){d=e.schema.properties;var L=Object.keys(d);if(L)for(var T,z=-1,q=L.length-1;z<q;){if(void 0!==(U=d[T=L[z+=1]]).default){var V=f+e.util.getProperty(T);if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+V;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+V+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+V+" === null || "+V+" === '' "),a+=" ) "+V+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(U.default)+" ":a+=" "+JSON.stringify(U.default)+" ",a+="; "}}}else if("array"==x.type&&Array.isArray(e.schema.items)){var M=e.schema.items;if(M){j=-1;for(var U,W=M.length-1;j<W;)if(void 0!==(U=M[j+=1]).default){V=f+"["+j+"]";if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+V;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+V+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+V+" === null || "+V+" === '' "),a+=" ) "+V+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(U.default)+" ":a+=" "+JSON.stringify(U.default)+" ",a+="; "}}}var B=x.rules;if(B)for(var Q,H=-1,K=B.length-1;H<K;)if(X(Q=B[H+=1])){var G=Q.code(e,Q.keyword,x.type);G&&(a+=" "+G+" ",m&&(P+="}"))}if(m&&(a+=" "+P+" ",P=""),x.type&&(a+=" } ",E&&E===x.type&&!F)){a+=" else { ";var J;p=e.schemaPath+".type",h=e.errSchemaPath+"/type";(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}m&&(a+=" if (errors === ",a+=y?"0":"errs_"+c,a+=") { ",w+="}")}}function Z(e){for(var r=e.rules,t=0;t<r.length;t++)if(X(r[t]))return!0}function X(r){return void 0!==e.schema[r.keyword]||r.implements&&function(r){for(var t=r.implements,a=0;a<t.length;a++)if(void 0!==e.schema[t[a]])return!0}(r)}return m&&(a+=" "+w+" "),y?(o?(a+=" if (errors === 0) return data; ",a+=" else throw new ValidationError(vErrors); "):(a+=" validate.errors = vErrors; ",a+=" return errors === 0; "),a+=" }; return validate;"):a+=" var "+v+" = errors === errs_"+c+";",a},he=A.ucs2length,me=le.Validation,fe=function e(r,t,a,o){var i=this,n=this._opts,s=[void 0],l={},c=[],u={},d=[],p={},h=[];t=t||{schema:r,refVal:s,refs:l};var m=ve.call(this,r,t,o),f=this._compilations[m.index];if(m.compiling)return f.callValidate=function e(){var r=f.validate,t=r.apply(this,arguments);return e.errors=r.errors,t};var v=this._formats,g=this.RULES;try{var y=P(r,t,a,o);f.validate=y;var b=f.callValidate;return b&&(b.schema=y.schema,b.errors=null,b.refs=y.refs,b.refVal=y.refVal,b.root=y.root,b.$async=y.$async,n.sourceCode&&(b.source=y.source)),y}finally{ge.call(this,r,t,o)}function P(r,a,o,u){var p=!a||a&&a.schema==r;if(a.schema!=t.schema)return e.call(i,r,a,o,u);var m,f=!0===r.$async,y=pe({isTop:!0,schema:r,isRoot:p,baseId:u,root:a,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:le.MissingRef,RULES:g,validate:pe,util:A,resolve:G,resolveRef:w,usePattern:F,useDefault:x,useCustomRule:O,opts:n,formats:v,logger:i.logger,self:i});y=Se(s,we)+Se(c,be)+Se(d,Pe)+Se(h,Ee)+y,n.processCode&&(y=n.processCode(y,r));try{m=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",y)(i,g,v,t,s,d,h,I,he,me),s[0]=m}catch(e){throw i.logger.error("Error compiling schema, function code:",y),e}return m.schema=r,m.errors=null,m.refs=l,m.refVal=s,m.root=p?m:a,f&&(m.$async=!0),!0===n.sourceCode&&(m.source={code:y,patterns:c,defaults:d}),m}function w(r,o,c){o=G.url(r,o);var u,d,p=l[o];if(void 0!==p)return S(u=s[p],d="refVal["+p+"]");if(!c&&t.refs){var h=t.refs[o];if(void 0!==h)return S(u=t.refVal[h],d=E(o,u))}d=E(o);var m=G.call(i,P,t,o);if(void 0===m){var f=a&&a[o];f&&(m=G.inlineRef(f,n.inlineRefs)?f:e.call(i,f,t,a,r))}if(void 0!==m)return function(e,r){var t=l[e];s[t]=r}(o,m),S(m,d);!function(e){delete l[e]}(o)}function E(e,r){var t=s.length;return s[t]=r,l[e]=t,"refVal"+t}function S(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}function F(e){var r=u[e];return void 0===r&&(r=u[e]=c.length,c[r]=e),"pattern"+r}function x(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return A.toQuotedString(e);case"object":if(null===e)return"null";var r=de(e),t=p[r];return void 0===t&&(t=p[r]=d.length,d[t]=e),"default"+t}}function O(e,r,t,a){if(!1!==i._opts.validateSchema){var o=e.definition.dependencies;if(o&&!o.every((function(e){return Object.prototype.hasOwnProperty.call(t,e)})))throw new Error("parent schema must have all required keywords: "+o.join(","));var s=e.definition.validateSchema;if(s)if(!s(r)){var l="keyword schema is invalid: "+i.errorsText(s.errors);if("log"!=i._opts.validateSchema)throw new Error(l);i.logger.error(l)}}var c,u=e.definition.compile,d=e.definition.inline,p=e.definition.macro;if(u)c=u.call(i,r,t,a);else if(p)c=p.call(i,r,t,a),!1!==n.validateSchema&&i.validateSchema(c,!0);else if(d)c=d.call(i,a,e.keyword,r,t);else if(!(c=e.definition.validate))return;if(void 0===c)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var m=h.length;return h[m]=c,{code:"customRule"+m,validate:c}}};function ve(e,r,t){var a=ye.call(this,e,r,t);return a>=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}function ge(e,r,t){var a=ye.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}function ye(e,r,t){for(var a=0;a<this._compilations.length;a++){var o=this._compilations[a];if(o.schema==e&&o.root==r&&o.baseId==t)return a}return-1}function be(e,r){return"var pattern"+e+" = new RegExp("+A.toQuotedString(r[e])+");"}function Pe(e){return"var default"+e+" = defaults["+e+"];"}function we(e,r){return void 0===r[e]?"":"var refVal"+e+" = refVal["+e+"];"}function Ee(e){return"var customRule"+e+" = customRules["+e+"];"}function Se(e,r){if(!e.length)return"";for(var t="",a=0;a<e.length;a++)t+=r(a,e);return t}var Fe=D((function(e){var r=e.exports=function(){this._cache={}};r.prototype.put=function(e,r){this._cache[e]=r},r.prototype.get=function(e){return this._cache[e]},r.prototype.del=function(e){delete this._cache[e]},r.prototype.clear=function(){this._cache={}}})),xe=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Oe=[0,31,28,31,30,31,30,31,31,30,31,30,31],_e=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,De=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,$e=/^(?:[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,ke=/^(?:(?:[^\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,je=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,Ie=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Ae=/^(?:\/(?:[^~/]|~0|~1)*)*$/,Ce=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Re=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,Ne=Le;function Le(e){return e="full"==e?"full":"fast",A.copy(Le[e])}function Te(e){var r=e.match(xe);if(!r)return!1;var t=+r[1],a=+r[2],o=+r[3];return a>=1&&a<=12&&o>=1&&o<=(2==a&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(t)?29:Oe[a])}function ze(e,r){var t=e.match(_e);if(!t)return!1;var a=t[1],o=t[2],i=t[3],n=t[5];return(a<=23&&o<=59&&i<=59||23==a&&59==o&&60==i)&&(!r||n)}Le.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":ke,url:je,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:De,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:Ue,uuid:Ie,"json-pointer":Ae,"json-pointer-uri-fragment":Ce,"relative-json-pointer":Re},Le.full={date:Te,time:ze,"date-time":function(e){var r=e.split(qe);return 2==r.length&&Te(r[0])&&ze(r[1],!0)},uri:function(e){return Ve.test(e)&&$e.test(e)},"uri-reference":/^(?:[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,"uri-template":ke,url:je,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:De,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:Ue,uuid:Ie,"json-pointer":Ae,"json-pointer-uri-fragment":Ce,"relative-json-pointer":Re};var qe=/t|\s/i;var Ve=/\/|:/;var Me=/[^\\]\\Z/;function Ue(e){if(Me.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var We=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s;var h="maximum"==r,m=h?"exclusiveMaximum":"exclusiveMinimum",f=e.schema[m],v=e.opts.$data&&f&&f.$data,g=h?"<":">",y=h?">":"<",b=void 0;if(!p&&"number"!=typeof s&&void 0!==s)throw new Error(r+" must be number");if(!v&&void 0!==f&&"number"!=typeof f&&"boolean"!=typeof f)throw new Error(m+" must be number or boolean");if(v){var P=e.util.getData(f.$data,n,e.dataPathArr),w="exclusive"+i,E="exclType"+i,S="exclIsNumber"+i,F="' + "+(_="op"+i)+" + '";o+=" var schemaExcl"+i+" = "+P+"; ",o+=" var "+w+"; var "+E+" = typeof "+(P="schemaExcl"+i)+"; if ("+E+" != 'boolean' && "+E+" != 'undefined' && "+E+" != 'number') { ";var x;b=m;(x=x||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(o+=" , message: '"+m+" should be boolean' "),e.opts.verbose&&(o+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var O=o;o=x.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+E+" == 'number' ? ( ("+w+" = "+a+" === undefined || "+P+" "+g+"= "+a+") ? "+d+" "+y+"= "+P+" : "+d+" "+y+" "+a+" ) : ( ("+w+" = "+P+" === true) ? "+d+" "+y+"= "+a+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { var op"+i+" = "+w+" ? '"+g+"' : '"+g+"='; ",void 0===s&&(b=m,c=e.errSchemaPath+"/"+m,a=P,p=v)}else{F=g;if((S="number"==typeof f)&&p){var _="'"+F+"'";o+=" if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" ( "+a+" === undefined || "+f+" "+g+"= "+a+" ? "+d+" "+y+"= "+f+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { "}else{S&&void 0===s?(w=!0,b=m,c=e.errSchemaPath+"/"+m,a=f,y+="="):(S&&(a=Math[h?"min":"max"](f,s)),f===(!S||a)?(w=!0,b=m,c=e.errSchemaPath+"/"+m,y+="="):(w=!1,F+="="));_="'"+F+"'";o+=" if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+" "+y+" "+a+" || "+d+" !== "+d+") { "}}b=b||r,(x=x||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+_+", limit: "+a+", exclusive: "+w+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be "+F+" ",o+=p?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";O=o;return o=x.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",u&&(o+=" else { "),o},Be=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+".length "+("maxItems"==r?">":"<")+" "+a+") { ";var h=r,m=m||[];m.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(h||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxItems"==r?"more":"fewer",o+=" than ",o+=p?"' + "+a+" + '":""+s,o+=" items' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=m.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},Qe=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");var h="maxLength"==r?">":"<";o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),!1===e.opts.unicode?o+=" "+d+".length ":o+=" ucs2length("+d+") ",o+=" "+h+" "+a+") { ";var m=r,f=f||[];f.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(m||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT be ",o+="maxLength"==r?"longer":"shorter",o+=" than ",o+=p?"' + "+a+" + '":""+s,o+=" characters' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var v=o;return o=f.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+v+"]); ":o+=" validate.errors = ["+v+"]; return false; ":o+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},He=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" Object.keys("+d+").length "+("maxProperties"==r?">":"<")+" "+a+") { ";var h=r,m=m||[];m.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(h||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxProperties"==r?"more":"fewer",o+=" than ",o+=p?"' + "+a+" + '":""+s,o+=" properties' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=m.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},Ke={$ref:function(e,r,t){var a,o,i=" ",n=e.level,s=e.dataLevel,l=e.schema[r],c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(s||""),p="valid"+n;if("#"==l||"#/"==l)e.isRoot?(a=e.async,o="validate"):(a=!0===e.root.schema.$async,o="root.refVal[0]");else{var h=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===h){var m=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(m),(y=y||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(i+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(i+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var f=i;i=y.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+f+"]); ":i+=" validate.errors = ["+f+"]; return false; ":i+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(i+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,l,m);e.logger.warn(m),u&&(i+=" if (true) { ")}}else if(h.inline){var v=e.util.copy(e);v.level++;var g="valid"+v.level;v.schema=h.schema,v.schemaPath="",v.errSchemaPath=l,i+=" "+e.validate(v).replace(/validate\.schema/g,h.code)+" ",u&&(i+=" if ("+g+") { ")}else a=!0===h.$async||e.async&&!1!==h.$async,o=h.code}if(o){var y;(y=y||[]).push(i),i="",e.opts.passContext?i+=" "+o+".call(this, ":i+=" "+o+"( ",i+=" "+d+", (dataPath || '')",'""'!=e.errorPath&&(i+=" + "+e.errorPath);var b=i+=" , "+(s?"data"+(s-1||""):"parentData")+" , "+(s?e.dataPathArr[s]:"parentDataProperty")+", rootData) ";if(i=y.pop(),a){if(!e.async)throw new Error("async schema referenced by sync schema");u&&(i+=" var "+p+"; "),i+=" try { await "+b+"; ",u&&(i+=" "+p+" = true; "),i+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",u&&(i+=" "+p+" = false; "),i+=" } ",u&&(i+=" if ("+p+") { ")}else i+=" if (!"+b+") { if (vErrors === null) vErrors = "+o+".errors; else vErrors = vErrors.concat("+o+".errors); errors = vErrors.length; } ",u&&(i+=" else { ")}return i},allOf:function(e,r,t){var a=" ",o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,s=!e.opts.allErrors,l=e.util.copy(e),c="";l.level++;var u="valid"+l.level,d=l.baseId,p=!0,h=o;if(h)for(var m,f=-1,v=h.length-1;f<v;)m=h[f+=1],(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0||!1===m:e.util.schemaHasRules(m,e.RULES.all))&&(p=!1,l.schema=m,l.schemaPath=i+"["+f+"]",l.errSchemaPath=n+"/"+f,a+=" "+e.validate(l)+" ",l.baseId=d,s&&(a+=" if ("+u+") { ",c+="}"));return s&&(a+=p?" if (true) { ":" "+c.slice(0,-1)+" "),a},anyOf:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e),m="";h.level++;var f="valid"+h.level;if(n.every((function(r){return e.opts.strictKeywords?"object"==typeof r&&Object.keys(r).length>0||!1===r:e.util.schemaHasRules(r,e.RULES.all)}))){var v=h.baseId;a+=" var "+p+" = errors; var "+d+" = false; ";var g=e.compositeRule;e.compositeRule=h.compositeRule=!0;var y=n;if(y)for(var b,P=-1,w=y.length-1;P<w;)b=y[P+=1],h.schema=b,h.schemaPath=s+"["+P+"]",h.errSchemaPath=l+"/"+P,a+=" "+e.validate(h)+" ",h.baseId=v,a+=" "+d+" = "+d+" || "+f+"; if (!"+d+") { ",m+="}";e.compositeRule=h.compositeRule=g,a+=" "+m+" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else c&&(a+=" if (true) { ");return a},$comment:function(e,r,t){var a=" ",o=e.schema[r],i=e.errSchemaPath+"/"+r;e.opts.allErrors;var n=e.util.toQuotedString(o);return!0===e.opts.$comment?a+=" console.log("+n+");":"function"==typeof e.opts.$comment&&(a+=" self._opts.$comment("+n+", "+e.util.toQuotedString(i)+", validate.root.schema);"),a},const:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p=e.opts.$data&&n&&n.$data;p&&(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; "),p||(a+=" var schema"+o+" = validate.schema"+s+";"),a+="var "+d+" = equal("+u+", schema"+o+"); if (!"+d+") { ";var h=h||[];h.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValue: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var m=a;return a=h.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+m+"]); ":a+=" validate.errors = ["+m+"]; return false; ":a+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",c&&(a+=" else { "),a},contains:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e);h.level++;var m="valid"+h.level,f="i"+o,v=h.dataLevel=e.dataLevel+1,g="data"+v,y=e.baseId,b=e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all);if(a+="var "+p+" = errors;var "+d+";",b){var P=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.schema=n,h.schemaPath=s,h.errSchemaPath=l,a+=" var "+m+" = false; for (var "+f+" = 0; "+f+" < "+u+".length; "+f+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers,!0);var w=u+"["+f+"]";h.dataPathArr[v]=f;var E=e.validate(h);h.baseId=y,e.util.varOccurences(E,g)<2?a+=" "+e.util.varReplace(E,g,w)+" ":a+=" var "+g+" = "+w+"; "+E+" ",a+=" if ("+m+") break; } ",e.compositeRule=h.compositeRule=P,a+=" if (!"+m+") {"}else a+=" if ("+u+".length == 0) {";var S=S||[];S.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should contain a valid item' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var F=a;return a=S.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+F+"]); ":a+=" validate.errors = ["+F+"]; return false; ":a+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",b&&(a+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a},dependencies:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e),h="";p.level++;var m="valid"+p.level,f={},v={},g=e.opts.ownProperties;for(w in n)if("__proto__"!=w){var y=n[w],b=Array.isArray(y)?v:f;b[w]=y}a+="var "+d+" = errors;";var P=e.errorPath;for(var w in a+="var missing"+o+";",v)if((b=v[w]).length){if(a+=" if ( "+u+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),c){a+=" && ( ";var E=b;if(E)for(var S=-1,F=E.length-1;S<F;){k=E[S+=1],S&&(a+=" || "),a+=" ( ( "+(C=u+(A=e.util.getProperty(k)))+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(k)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?k:A)+") ) "}a+=")) { ";var x="missing"+o,O="' + "+x+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,x,!0):P+" + "+x);var _=_||[];_.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var D=a;a=_.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+D+"]); ":a+=" validate.errors = ["+D+"]; return false; ":a+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{a+=" ) { ";var $=b;if($)for(var k,j=-1,I=$.length-1;j<I;){k=$[j+=1];var A=e.util.getProperty(k),C=(O=e.util.escapeQuotes(k),u+A);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,k,e.opts.jsonPointers)),a+=" if ( "+C+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(k)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",c&&(h+="}",a+=" else { ")}e.errorPath=P;var R=p.baseId;for(var w in f){y=f[w];(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all))&&(a+=" "+m+" = true; if ( "+u+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),a+=") { ",p.schema=y,p.schemaPath=s+e.util.getProperty(w),p.errSchemaPath=l+"/"+e.util.escapeFragment(w),a+=" "+e.validate(p)+" ",p.baseId=R,a+=" } ",c&&(a+=" if ("+m+") { ",h+="}"))}return c&&(a+=" "+h+" if ("+d+" == errors) {"),a},enum:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p=e.opts.$data&&n&&n.$data;p&&(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ");var h="i"+o,m="schema"+o;p||(a+=" var "+m+" = validate.schema"+s+";"),a+="var "+d+";",p&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=d+" = false;for (var "+h+"=0; "+h+"<"+m+".length; "+h+"++) if (equal("+u+", "+m+"["+h+"])) { "+d+" = true; break; }",p&&(a+=" } "),a+=" if (!"+d+") { ";var f=f||[];f.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var v=a;return a=f.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+v+"]); ":a+=" validate.errors = ["+v+"]; return false; ":a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",c&&(a+=" else { "),a},format:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||"");if(!1===e.opts.format)return c&&(a+=" if (true) { "),a;var d,p=e.opts.$data&&n&&n.$data;p?(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",d="schema"+o):d=n;var h=e.opts.unknownFormats,m=Array.isArray(h);if(p){a+=" var "+(f="format"+o)+" = formats["+d+"]; var "+(v="isObject"+o)+" = typeof "+f+" == 'object' && !("+f+" instanceof RegExp) && "+f+".validate; var "+(g="formatType"+o)+" = "+v+" && "+f+".type || 'string'; if ("+v+") { ",e.async&&(a+=" var async"+o+" = "+f+".async; "),a+=" "+f+" = "+f+".validate; } if ( ",p&&(a+=" ("+d+" !== undefined && typeof "+d+" != 'string') || "),a+=" (","ignore"!=h&&(a+=" ("+d+" && !"+f+" ",m&&(a+=" && self._opts.unknownFormats.indexOf("+d+") == -1 "),a+=") || "),a+=" ("+f+" && "+g+" == '"+t+"' && !(typeof "+f+" == 'function' ? ",e.async?a+=" (async"+o+" ? await "+f+"("+u+") : "+f+"("+u+")) ":a+=" "+f+"("+u+") ",a+=" : "+f+".test("+u+"))))) {"}else{var f;if(!(f=e.formats[n])){if("ignore"==h)return e.logger.warn('unknown format "'+n+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(a+=" if (true) { "),a;if(m&&h.indexOf(n)>=0)return c&&(a+=" if (true) { "),a;throw new Error('unknown format "'+n+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,g=(v="object"==typeof f&&!(f instanceof RegExp)&&f.validate)&&f.type||"string";if(v){var y=!0===f.async;f=f.validate}if(g!=t)return c&&(a+=" if (true) { "),a;if(y){if(!e.async)throw new Error("async format in sync schema");a+=" if (!(await "+(b="formats"+e.util.getProperty(n)+".validate")+"("+u+"))) { "}else{a+=" if (! ";var b="formats"+e.util.getProperty(n);v&&(b+=".validate"),a+="function"==typeof f?" "+b+"("+u+") ":" "+b+".test("+u+") ",a+=") { "}}var P=P||[];P.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",a+=p?""+d:""+e.util.toQuotedString(n),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",a+=p?"' + "+d+" + '":""+e.util.escapeQuotes(n),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=p?"validate.schema"+s:""+e.util.toQuotedString(n),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var w=a;return a=P.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",c&&(a+=" else { "),a},if:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e);h.level++;var m="valid"+h.level,f=e.schema.then,v=e.schema.else,g=void 0!==f&&(e.opts.strictKeywords?"object"==typeof f&&Object.keys(f).length>0||!1===f:e.util.schemaHasRules(f,e.RULES.all)),y=void 0!==v&&(e.opts.strictKeywords?"object"==typeof v&&Object.keys(v).length>0||!1===v:e.util.schemaHasRules(v,e.RULES.all)),b=h.baseId;if(g||y){var P;h.createErrors=!1,h.schema=n,h.schemaPath=s,h.errSchemaPath=l,a+=" var "+p+" = errors; var "+d+" = true; ";var w=e.compositeRule;e.compositeRule=h.compositeRule=!0,a+=" "+e.validate(h)+" ",h.baseId=b,h.createErrors=!0,a+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",e.compositeRule=h.compositeRule=w,g?(a+=" if ("+m+") { ",h.schema=e.schema.then,h.schemaPath=e.schemaPath+".then",h.errSchemaPath=e.errSchemaPath+"/then",a+=" "+e.validate(h)+" ",h.baseId=b,a+=" "+d+" = "+m+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'then'; ":P="'then'",a+=" } ",y&&(a+=" else { ")):a+=" if (!"+m+") { ",y&&(h.schema=e.schema.else,h.schemaPath=e.schemaPath+".else",h.errSchemaPath=e.errSchemaPath+"/else",a+=" "+e.validate(h)+" ",h.baseId=b,a+=" "+d+" = "+m+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'else'; ":P="'else'",a+=" } "),a+=" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+P+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match \"' + "+P+" + '\" schema' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",c&&(a+=" else { ")}else c&&(a+=" if (true) { ");return a},items:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e),m="";h.level++;var f="valid"+h.level,v="i"+o,g=h.dataLevel=e.dataLevel+1,y="data"+g,b=e.baseId;if(a+="var "+p+" = errors;var "+d+";",Array.isArray(n)){var P=e.schema.additionalItems;if(!1===P){a+=" "+d+" = "+u+".length <= "+n.length+"; ";var w=l;l=e.errSchemaPath+"/additionalItems",a+=" if (!"+d+") { ";var E=E||[];E.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+n.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+n.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var S=a;a=E.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",l=w,c&&(m+="}",a+=" else { ")}var F=n;if(F)for(var x,O=-1,_=F.length-1;O<_;)if(x=F[O+=1],e.opts.strictKeywords?"object"==typeof x&&Object.keys(x).length>0||!1===x:e.util.schemaHasRules(x,e.RULES.all)){a+=" "+f+" = true; if ("+u+".length > "+O+") { ";var D=u+"["+O+"]";h.schema=x,h.schemaPath=s+"["+O+"]",h.errSchemaPath=l+"/"+O,h.errorPath=e.util.getPathExpr(e.errorPath,O,e.opts.jsonPointers,!0),h.dataPathArr[g]=O;var $=e.validate(h);h.baseId=b,e.util.varOccurences($,y)<2?a+=" "+e.util.varReplace($,y,D)+" ":a+=" var "+y+" = "+D+"; "+$+" ",a+=" } ",c&&(a+=" if ("+f+") { ",m+="}")}if("object"==typeof P&&(e.opts.strictKeywords?"object"==typeof P&&Object.keys(P).length>0||!1===P:e.util.schemaHasRules(P,e.RULES.all))){h.schema=P,h.schemaPath=e.schemaPath+".additionalItems",h.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+f+" = true; if ("+u+".length > "+n.length+") { for (var "+v+" = "+n.length+"; "+v+" < "+u+".length; "+v+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=u+"["+v+"]";h.dataPathArr[g]=v;$=e.validate(h);h.baseId=b,e.util.varOccurences($,y)<2?a+=" "+e.util.varReplace($,y,D)+" ":a+=" var "+y+" = "+D+"; "+$+" ",c&&(a+=" if (!"+f+") break; "),a+=" } } ",c&&(a+=" if ("+f+") { ",m+="}")}}else if(e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all)){h.schema=n,h.schemaPath=s,h.errSchemaPath=l,a+=" for (var "+v+" = 0; "+v+" < "+u+".length; "+v+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=u+"["+v+"]";h.dataPathArr[g]=v;$=e.validate(h);h.baseId=b,e.util.varOccurences($,y)<2?a+=" "+e.util.varReplace($,y,D)+" ":a+=" var "+y+" = "+D+"; "+$+" ",c&&(a+=" if (!"+f+") break; "),a+=" }"}return c&&(a+=" "+m+" if ("+p+" == errors) {"),a},maximum:We,minimum:We,maxItems:Be,minItems:Be,maxLength:Qe,minLength:Qe,maxProperties:He,minProperties:He,multipleOf:function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");o+="var division"+i+";if (",p&&(o+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),o+=" (division"+i+" = "+d+" / "+a+", ",e.opts.multipleOfPrecision?o+=" Math.abs(Math.round(division"+i+") - division"+i+") > 1e-"+e.opts.multipleOfPrecision+" ":o+=" division"+i+" !== parseInt(division"+i+") ",o+=" ) ",p&&(o+=" ) "),o+=" ) { ";var h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be multiple of ",o+=p?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var m=o;return o=h.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},not:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level;if(e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all)){p.schema=n,p.schemaPath=s,p.errSchemaPath=l,a+=" var "+d+" = errors; ";var m,f=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.createErrors=!1,p.opts.allErrors&&(m=p.opts.allErrors,p.opts.allErrors=!1),a+=" "+e.validate(p)+" ",p.createErrors=!0,m&&(p.opts.allErrors=m),e.compositeRule=p.compositeRule=f,a+=" if ("+h+") { ";var v=v||[];v.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var g=a;a=v.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(a+=" if (false) { ");return a},oneOf:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e),m="";h.level++;var f="valid"+h.level,v=h.baseId,g="prevValid"+o,y="passingSchemas"+o;a+="var "+p+" = errors , "+g+" = false , "+d+" = false , "+y+" = null; ";var b=e.compositeRule;e.compositeRule=h.compositeRule=!0;var P=n;if(P)for(var w,E=-1,S=P.length-1;E<S;)w=P[E+=1],(e.opts.strictKeywords?"object"==typeof w&&Object.keys(w).length>0||!1===w:e.util.schemaHasRules(w,e.RULES.all))?(h.schema=w,h.schemaPath=s+"["+E+"]",h.errSchemaPath=l+"/"+E,a+=" "+e.validate(h)+" ",h.baseId=v):a+=" var "+f+" = true; ",E&&(a+=" if ("+f+" && "+g+") { "+d+" = false; "+y+" = ["+y+", "+E+"]; } else { ",m+="}"),a+=" if ("+f+") { "+d+" = "+g+" = true; "+y+" = "+E+"; }";return e.compositeRule=h.compositeRule=b,a+=m+"if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a},pattern:function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'string') || "),o+=" !"+(p?"(new RegExp("+a+"))":e.usePattern(s))+".test("+d+") ) { ";var h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { pattern: ",o+=p?""+a:""+e.util.toQuotedString(s),o+=" } ",!1!==e.opts.messages&&(o+=" , message: 'should match pattern \"",o+=p?"' + "+a+" + '":""+e.util.escapeQuotes(s),o+="\"' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+e.util.toQuotedString(s),o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var m=o;return o=h.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},properties:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e),h="";p.level++;var m="valid"+p.level,f="key"+o,v="idx"+o,g=p.dataLevel=e.dataLevel+1,y="data"+g,b="dataProperties"+o,P=Object.keys(n||{}).filter(A),w=e.schema.patternProperties||{},E=Object.keys(w).filter(A),S=e.schema.additionalProperties,F=P.length||E.length,x=!1===S,O="object"==typeof S&&Object.keys(S).length,_=e.opts.removeAdditional,D=x||O||_,$=e.opts.ownProperties,k=e.baseId,j=e.schema.required;if(j&&(!e.opts.$data||!j.$data)&&j.length<e.opts.loopRequired)var I=e.util.toHash(j);function A(e){return"__proto__"!==e}if(a+="var "+d+" = errors;var "+m+" = true;",$&&(a+=" var "+b+" = undefined;"),D){if(a+=$?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+u+") { ",F){if(a+=" var isAdditional"+o+" = !(false ",P.length)if(P.length>8)a+=" || validate.schema"+s+".hasOwnProperty("+f+") ";else{var C=P;if(C)for(var R=-1,N=C.length-1;R<N;)G=C[R+=1],a+=" || "+f+" == "+e.util.toQuotedString(G)+" "}if(E.length){var L=E;if(L)for(var T=-1,z=L.length-1;T<z;)ie=L[T+=1],a+=" || "+e.usePattern(ie)+".test("+f+") "}a+=" ); if (isAdditional"+o+") { "}if("all"==_)a+=" delete "+u+"["+f+"]; ";else{var q=e.errorPath,V="' + "+f+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers)),x)if(_)a+=" delete "+u+"["+f+"]; ";else{a+=" "+m+" = false; ";var M=l;l=e.errSchemaPath+"/additionalProperties",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { additionalProperty: '"+V+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is an invalid additional property":a+="should NOT have additional properties",a+="' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var U=a;a=te.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+U+"]); ":a+=" validate.errors = ["+U+"]; return false; ":a+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=M,c&&(a+=" break; ")}else if(O)if("failing"==_){a+=" var "+d+" = errors; ";var W=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=S,p.schemaPath=e.schemaPath+".additionalProperties",p.errSchemaPath=e.errSchemaPath+"/additionalProperties",p.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);var B=u+"["+f+"]";p.dataPathArr[g]=f;var Q=e.validate(p);p.baseId=k,e.util.varOccurences(Q,y)<2?a+=" "+e.util.varReplace(Q,y,B)+" ":a+=" var "+y+" = "+B+"; "+Q+" ",a+=" if (!"+m+") { errors = "+d+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+u+"["+f+"]; } ",e.compositeRule=p.compositeRule=W}else{p.schema=S,p.schemaPath=e.schemaPath+".additionalProperties",p.errSchemaPath=e.errSchemaPath+"/additionalProperties",p.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);B=u+"["+f+"]";p.dataPathArr[g]=f;Q=e.validate(p);p.baseId=k,e.util.varOccurences(Q,y)<2?a+=" "+e.util.varReplace(Q,y,B)+" ":a+=" var "+y+" = "+B+"; "+Q+" ",c&&(a+=" if (!"+m+") break; ")}e.errorPath=q}F&&(a+=" } "),a+=" } ",c&&(a+=" if ("+m+") { ",h+="}")}var H=e.opts.useDefaults&&!e.compositeRule;if(P.length){var K=P;if(K)for(var G,J=-1,Z=K.length-1;J<Z;){var X=n[G=K[J+=1]];if(e.opts.strictKeywords?"object"==typeof X&&Object.keys(X).length>0||!1===X:e.util.schemaHasRules(X,e.RULES.all)){var Y=e.util.getProperty(G),ee=(B=u+Y,H&&void 0!==X.default);p.schema=X,p.schemaPath=s+Y,p.errSchemaPath=l+"/"+e.util.escapeFragment(G),p.errorPath=e.util.getPath(e.errorPath,G,e.opts.jsonPointers),p.dataPathArr[g]=e.util.toQuotedString(G);Q=e.validate(p);if(p.baseId=k,e.util.varOccurences(Q,y)<2){Q=e.util.varReplace(Q,y,B);var re=B}else{re=y;a+=" var "+y+" = "+B+"; "}if(ee)a+=" "+Q+" ";else{if(I&&I[G]){a+=" if ( "+re+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+m+" = false; ";q=e.errorPath,M=l;var te,ae=e.util.escapeQuotes(G);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(q,G,e.opts.jsonPointers)),l=e.errSchemaPath+"/required",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+ae+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+ae+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";U=a;a=te.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+U+"]); ":a+=" validate.errors = ["+U+"]; return false; ":a+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=M,e.errorPath=q,a+=" } else { "}else c?(a+=" if ( "+re+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+m+" = true; } else { "):(a+=" if ("+re+" !== undefined ",$&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=" ) { ");a+=" "+Q+" } "}}c&&(a+=" if ("+m+") { ",h+="}")}}if(E.length){var oe=E;if(oe)for(var ie,ne=-1,se=oe.length-1;ne<se;){X=w[ie=oe[ne+=1]];if(e.opts.strictKeywords?"object"==typeof X&&Object.keys(X).length>0||!1===X:e.util.schemaHasRules(X,e.RULES.all)){p.schema=X,p.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(ie),p.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(ie),a+=$?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+u+") { ",a+=" if ("+e.usePattern(ie)+".test("+f+")) { ",p.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);B=u+"["+f+"]";p.dataPathArr[g]=f;Q=e.validate(p);p.baseId=k,e.util.varOccurences(Q,y)<2?a+=" "+e.util.varReplace(Q,y,B)+" ":a+=" var "+y+" = "+B+"; "+Q+" ",c&&(a+=" if (!"+m+") break; "),a+=" } ",c&&(a+=" else "+m+" = true; "),a+=" } ",c&&(a+=" if ("+m+") { ",h+="}")}}}return c&&(a+=" "+h+" if ("+d+" == errors) {"),a},propertyNames:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level;if(a+="var "+d+" = errors;",e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all)){p.schema=n,p.schemaPath=s,p.errSchemaPath=l;var m="key"+o,f="idx"+o,v="i"+o,g="' + "+m+" + '",y="data"+(p.dataLevel=e.dataLevel+1),b="dataProperties"+o,P=e.opts.ownProperties,w=e.baseId;P&&(a+=" var "+b+" = undefined; "),a+=P?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+f+"=0; "+f+"<"+b+".length; "+f+"++) { var "+m+" = "+b+"["+f+"]; ":" for (var "+m+" in "+u+") { ",a+=" var startErrs"+o+" = errors; ";var E=m,S=e.compositeRule;e.compositeRule=p.compositeRule=!0;var F=e.validate(p);p.baseId=w,e.util.varOccurences(F,y)<2?a+=" "+e.util.varReplace(F,y,E)+" ":a+=" var "+y+" = "+E+"; "+F+" ",e.compositeRule=p.compositeRule=S,a+=" if (!"+h+") { for (var "+v+"=startErrs"+o+"; "+v+"<errors; "+v+"++) { vErrors["+v+"].propertyName = "+m+"; } var err = ",!1!==e.createErrors?(a+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { propertyName: '"+g+"' } ",!1!==e.opts.messages&&(a+=" , message: 'property name \\'"+g+"\\' is invalid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),c&&(a+=" break; "),a+=" } }"}return c&&(a+=" if ("+d+" == errors) {"),a},required:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p=e.opts.$data&&n&&n.$data;p&&(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ");var h="schema"+o;if(!p)if(n.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var m=[],f=n;if(f)for(var v,g=-1,y=f.length-1;g<y;){v=f[g+=1];var b=e.schema.properties[v];b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0||!1===b:e.util.schemaHasRules(b,e.RULES.all))||(m[m.length]=v)}}else m=n;if(p||m.length){var P=e.errorPath,w=p||m.length>=e.opts.loopRequired,E=e.opts.ownProperties;if(c)if(a+=" var missing"+o+"; ",w){p||(a+=" var "+h+" = validate.schema"+s+"; ");var S="' + "+($="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,$,e.opts.jsonPointers)),a+=" var "+d+" = true; ",p&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=" for (var "+O+" = 0; "+O+" < "+h+".length; "+O+"++) { "+d+" = "+u+"["+h+"["+O+"]] !== undefined ",E&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", "+h+"["+O+"]) "),a+="; if (!"+d+") break; } ",p&&(a+=" } "),a+=" if (!"+d+") { ",(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var F=a;a=D.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+F+"]); ":a+=" validate.errors = ["+F+"]; return false; ":a+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var x=m;if(x)for(var O=-1,_=x.length-1;O<_;){j=x[O+=1],O&&(a+=" || "),a+=" ( ( "+(R=u+(C=e.util.getProperty(j)))+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(j)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?j:C)+") ) "}a+=") { ";var D;S="' + "+($="missing"+o)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,$,!0):P+" + "+$),(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";F=a;a=D.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+F+"]); ":a+=" validate.errors = ["+F+"]; return false; ":a+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(w){p||(a+=" var "+h+" = validate.schema"+s+"; ");var $;S="' + "+($="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,$,e.opts.jsonPointers)),p&&(a+=" if ("+h+" && !Array.isArray("+h+")) { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+h+" !== undefined) { "),a+=" for (var "+O+" = 0; "+O+" < "+h+".length; "+O+"++) { if ("+u+"["+h+"["+O+"]] === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", "+h+"["+O+"]) "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",p&&(a+=" } ")}else{var k=m;if(k)for(var j,I=-1,A=k.length-1;I<A;){j=k[I+=1];var C=e.util.getProperty(j),R=(S=e.util.escapeQuotes(j),u+C);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,j,e.opts.jsonPointers)),a+=" if ( "+R+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(j)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=P}else c&&(a+=" if (true) {");return a},uniqueItems:function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p="valid"+i,h=e.opts.$data&&s&&s.$data;if(h?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,(s||h)&&!1!==e.opts.uniqueItems){h&&(o+=" var "+p+"; if ("+a+" === false || "+a+" === undefined) "+p+" = true; else if (typeof "+a+" != 'boolean') "+p+" = false; else { "),o+=" var i = "+d+".length , "+p+" = true , j; if (i > 1) { ";var m=e.schema.items&&e.schema.items.type,f=Array.isArray(m);if(!m||"object"==m||"array"==m||f&&(m.indexOf("object")>=0||m.indexOf("array")>=0))o+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+d+"[i], "+d+"[j])) { "+p+" = false; break outer; } } } ";else{o+=" var itemIndices = {}, item; for (;i--;) { var item = "+d+"[i]; ";var v="checkDataType"+(f?"s":"");o+=" if ("+e.util[v](m,"item",e.opts.strictNumbers,!0)+") continue; ",f&&(o+=" if (typeof item == 'string') item = '\"' + item; "),o+=" if (typeof itemIndices[item] == 'number') { "+p+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}o+=" } ",h&&(o+=" } "),o+=" if (!"+p+") { ";var g=g||[];g.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(o+=" , schema: ",o+=h?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var y=o;o=g.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+y+"]); ":o+=" validate.errors = ["+y+"]; return false; ":o+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",u&&(o+=" else { ")}else u&&(o+=" if (true) { ");return o},validate:pe},Ge=A.toHash,Je=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"],Ze=function(e,r){for(var t=0;t<r.length;t++){e=JSON.parse(JSON.stringify(e));var a,o=r[t].split("/"),i=e;for(a=1;a<o.length;a++)i=i[o[a]];for(a=0;a<Je.length;a++){var n=Je[a],s=i[n];s&&(i[n]={anyOf:[s,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e},Xe=le.MissingRef,Ye=function e(r,t,a){var o=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof t&&(a=t,t=void 0);var i=n(r).then((function(){var e=o._addSchema(r,void 0,t);return e.validate||function e(r){try{return o._compile(r)}catch(e){if(e instanceof Xe)return a(e);throw e}function a(a){var i=a.missingSchema;if(c(i))throw new Error("Schema "+i+" is loaded but "+a.missingRef+" cannot be resolved");var s=o._loadingSchemas[i];return s||(s=o._loadingSchemas[i]=o._opts.loadSchema(i)).then(l,l),s.then((function(e){if(!c(i))return n(e).then((function(){c(i)||o.addSchema(e,i,void 0,t)}))})).then((function(){return e(r)}));function l(){delete o._loadingSchemas[i]}function c(e){return o._refs[e]||o._schemas[e]}}}(e)}));a&&i.then((function(e){a(null,e)}),a);return i;function n(r){var t=r.$schema;return t&&!o.getSchema(t)?e.call(o,{$ref:t},!0):Promise.resolve()}};var er=function(e,r,t){var a,o,i=" ",n=e.level,s=e.dataLevel,l=e.schema[r],c=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,d=!e.opts.allErrors,p="data"+(s||""),h="valid"+n,m="errs__"+n,f=e.opts.$data&&l&&l.$data;f?(i+=" var schema"+n+" = "+e.util.getData(l.$data,s,e.dataPathArr)+"; ",o="schema"+n):o=l;var v,g,y,b,P,w="definition"+n,E=this.definition,S="";if(f&&E.$data){P="keywordValidate"+n;var F=E.validateSchema;i+=" var "+w+" = RULES.custom['"+r+"'].definition; var "+P+" = "+w+".validate;"}else{if(!(b=e.useCustomRule(this,l,e.schema,e)))return;o="validate.schema"+c,P=b.code,v=E.compile,g=E.inline,y=E.macro}var x=P+".errors",O="i"+n,_="ruleErr"+n,D=E.async;if(D&&!e.async)throw new Error("async keyword in sync schema");if(g||y||(i+=x+" = null;"),i+="var "+m+" = errors;var "+h+";",f&&E.$data&&(S+="}",i+=" if ("+o+" === undefined) { "+h+" = true; } else { ",F&&(S+="}",i+=" "+h+" = "+w+".validateSchema("+o+"); if ("+h+") { ")),g)E.statements?i+=" "+b.validate+" ":i+=" "+h+" = "+b.validate+"; ";else if(y){var $=e.util.copy(e);S="";$.level++;var k="valid"+$.level;$.schema=b.validate,$.schemaPath="";var j=e.compositeRule;e.compositeRule=$.compositeRule=!0;var I=e.validate($).replace(/validate\.schema/g,P);e.compositeRule=$.compositeRule=j,i+=" "+I}else{(N=N||[]).push(i),i="",i+=" "+P+".call( ",e.opts.passContext?i+="this":i+="self",v||!1===E.schema?i+=" , "+p+" ":i+=" , "+o+" , "+p+" , validate.schema"+e.schemaPath+" ",i+=" , (dataPath || '')",'""'!=e.errorPath&&(i+=" + "+e.errorPath);var A=s?"data"+(s-1||""):"parentData",C=s?e.dataPathArr[s]:"parentDataProperty",R=i+=" , "+A+" , "+C+" , rootData ) ";i=N.pop(),!1===E.errors?(i+=" "+h+" = ",D&&(i+="await "),i+=R+"; "):i+=D?" var "+(x="customErrors"+n)+" = null; try { "+h+" = await "+R+"; } catch (e) { "+h+" = false; if (e instanceof ValidationError) "+x+" = e.errors; else throw e; } ":" "+x+" = null; "+h+" = "+R+"; "}if(E.modifying&&(i+=" if ("+A+") "+p+" = "+A+"["+C+"];"),i+=""+S,E.valid)d&&(i+=" if (true) { ");else{var N;i+=" if ( ",void 0===E.valid?(i+=" !",i+=y?""+k:""+h):i+=" "+!E.valid+" ",i+=") { ",a=this.keyword,(N=N||[]).push(i),i="",(N=N||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(i+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var L=i;i=N.pop(),!e.compositeRule&&d?e.async?i+=" throw new ValidationError(["+L+"]); ":i+=" validate.errors = ["+L+"]; return false; ":i+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var T=i;i=N.pop(),g?E.errors?"full"!=E.errors&&(i+=" for (var "+O+"="+m+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(i+=" "+_+".schema = "+o+"; "+_+".data = "+p+"; "),i+=" } "):!1===E.errors?i+=" "+T+" ":(i+=" if ("+m+" == errors) { "+T+" } else { for (var "+O+"="+m+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(i+=" "+_+".schema = "+o+"; "+_+".data = "+p+"; "),i+=" } } "):y?(i+=" var err = ",!1!==e.createErrors?(i+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(i+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&d&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; ")):!1===E.errors?i+=" "+T+" ":(i+=" if (Array.isArray("+x+")) { if (vErrors === null) vErrors = "+x+"; else vErrors = vErrors.concat("+x+"); errors = vErrors.length; for (var "+O+"="+m+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; "+_+'.schemaPath = "'+u+'"; ',e.opts.verbose&&(i+=" "+_+".schema = "+o+"; "+_+".data = "+p+"; "),i+=" } } else { "+T+" } "),i+=" } ",d&&(i+=" else { ")}return i},rr="http://json-schema.org/draft-07/schema#",tr="http://json-schema.org/draft-07/schema#",ar="Core schema meta-schema",or={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},ir=["object","boolean"],nr={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},sr={$schema:rr,$id:tr,title:ar,definitions:or,type:ir,properties:nr,default:!0},lr=$(Object.freeze({__proto__:null,$schema:rr,$id:tr,title:ar,definitions:or,type:ir,properties:nr,default:sr})),cr={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:lr.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:lr.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}},ur=/^[a-z_$][a-z0-9_$-]*$/i,dr=function(e,r){var t=this.RULES;if(t.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!ur.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(r){this.validateKeyword(r,!0);var a=r.type;if(Array.isArray(a))for(var o=0;o<a.length;o++)n(e,a[o],r);else n(e,a,r);var i=r.metaSchema;i&&(r.$data&&this._opts.$data&&(i={anyOf:[i,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),r.validateSchema=this.compile(i,!0))}function n(e,r,a){for(var o,i=0;i<t.length;i++){var n=t[i];if(n.type==r){o=n;break}}o||(o={type:r,rules:[]},t.push(o));var s={keyword:e,definition:a,custom:!0,code:er,implements:a.implements};o.rules.push(s),t.custom[e]=s}return t.keywords[e]=t.all[e]=!0,this},pr=function(e){var r=this.RULES.custom[e];return r?r.definition:this.RULES.keywords[e]||!1},hr=function(e){var r=this.RULES;delete r.keywords[e],delete r.all[e],delete r.custom[e];for(var t=0;t<r.length;t++)for(var a=r[t].rules,o=0;o<a.length;o++)if(a[o].keyword==e){a.splice(o,1);break}return this},mr=function e(r,t){e.errors=null;var a=this._validateKeyword=this._validateKeyword||this.compile(cr,!0);if(a(r))return!0;if(e.errors=a.errors,t)throw new Error("custom keyword definition is invalid: "+this.errorsText(a.errors));return!1};var fr="http://json-schema.org/draft-07/schema#",vr="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",gr="Meta-schema for $data reference (JSON Schema extension proposal)",yr=["$data"],br={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Pr={$schema:fr,$id:vr,description:gr,type:"object",required:yr,properties:br,additionalProperties:!1},wr=$(Object.freeze({__proto__:null,$schema:fr,$id:vr,description:gr,type:"object",required:yr,properties:br,additionalProperties:!1,default:Pr})),Er=Or;Or.prototype.validate=function(e,r){var t;if("string"==typeof e){if(!(t=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);t=a.validate||this._compile(a)}var o=t(r);!0!==t.$async&&(this.errors=t.errors);return o},Or.prototype.compile=function(e,r){var t=this._addSchema(e,void 0,r);return t.validate||this._compile(t)},Or.prototype.addSchema=function(e,r,t,a){if(Array.isArray(e)){for(var o=0;o<e.length;o++)this.addSchema(e[o],void 0,t,a);return this}var i=this._getId(e);if(void 0!==i&&"string"!=typeof i)throw new Error("schema id must be string");return Ir(this,r=G.normalizeId(r||i)),this._schemas[r]=this._addSchema(e,t,a,!0),this},Or.prototype.addMetaSchema=function(e,r,t){return this.addSchema(e,r,t,!0),this},Or.prototype.validateSchema=function(e,r){var t=e.$schema;if(void 0!==t&&"string"!=typeof t)throw new Error("$schema must be a string");if(!(t=t||this._opts.defaultMeta||function(e){var r=e._opts.meta;return e._opts.defaultMeta="object"==typeof r?e._getId(r)||r:e.getSchema(Sr)?Sr:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var a=this.validate(t,e);if(!a&&r){var o="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(o);this.logger.error(o)}return a},Or.prototype.getSchema=function(e){var r=_r(this,e);switch(typeof r){case"object":return r.validate||this._compile(r);case"string":return this.getSchema(r);case"undefined":return function(e,r){var t=G.schema.call(e,{schema:{}},r);if(t){var a=t.schema,o=t.root,i=t.baseId,n=fe.call(e,a,o,void 0,i);return e._fragments[r]=new H({ref:r,fragment:!0,schema:a,root:o,baseId:i,validate:n}),n}}(this,e)}},Or.prototype.removeSchema=function(e){if(e instanceof RegExp)return Dr(this,this._schemas,e),Dr(this,this._refs,e),this;switch(typeof e){case"undefined":return Dr(this,this._schemas),Dr(this,this._refs),this._cache.clear(),this;case"string":var r=_r(this,e);return r&&this._cache.del(r.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var t=this._opts.serialize,a=t?t(e):e;this._cache.del(a);var o=this._getId(e);o&&(o=G.normalizeId(o),delete this._schemas[o],delete this._refs[o])}return this},Or.prototype.addFormat=function(e,r){"string"==typeof r&&(r=new RegExp(r));return this._formats[e]=r,this},Or.prototype.errorsText=function(e,r){if(!(e=e||this.errors))return"No errors";for(var t=void 0===(r=r||{}).separator?", ":r.separator,a=void 0===r.dataVar?"data":r.dataVar,o="",i=0;i<e.length;i++){var n=e[i];n&&(o+=a+n.dataPath+" "+n.message+t)}return o.slice(0,-t.length)},Or.prototype._addSchema=function(e,r,t,a){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var o=this._opts.serialize,i=o?o(e):e,n=this._cache.get(i);if(n)return n;a=a||!1!==this._opts.addUsedSchema;var s=G.normalizeId(this._getId(e));s&&a&&Ir(this,s);var l,c=!1!==this._opts.validateSchema&&!r;c&&!(l=s&&s==G.normalizeId(e.$schema))&&this.validateSchema(e,!0);var u=G.ids.call(this,e),d=new H({id:s,schema:e,localRefs:u,cacheKey:i,meta:t});"#"!=s[0]&&a&&(this._refs[s]=d);this._cache.put(i,d),c&&l&&this.validateSchema(e,!0);return d},Or.prototype._compile=function(e,r){if(e.compiling)return e.validate=o,o.schema=e.schema,o.errors=null,o.root=r||o,!0===e.schema.$async&&(o.$async=!0),o;var t,a;e.compiling=!0,e.meta&&(t=this._opts,this._opts=this._metaOpts);try{a=fe.call(this,e.schema,r,e.localRefs)}catch(r){throw delete e.validate,r}finally{e.compiling=!1,e.meta&&(this._opts=t)}return e.validate=a,e.refs=a.refs,e.refVal=a.refVal,e.root=a.root,a;function o(){var r=e.validate,t=r.apply(this,arguments);return o.errors=r.errors,t}},Or.prototype.compileAsync=Ye,Or.prototype.addKeyword=dr,Or.prototype.getKeyword=pr,Or.prototype.removeKeyword=hr,Or.prototype.validateKeyword=mr,Or.ValidationError=le.Validation,Or.MissingRefError=le.MissingRef,Or.$dataMetaSchema=Ze;var Sr="http://json-schema.org/draft-07/schema",Fr=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],xr=["/properties"];function Or(e){if(!(this instanceof Or))return new Or(e);var r,t;e=this._opts=A.copy(e)||{},function(e){var r=e._opts.logger;if(!1===r)e.logger={log:Ar,warn:Ar,error:Ar};else{if(void 0===r&&(r=console),!("object"==typeof r&&r.log&&r.warn&&r.error))throw new Error("logger must implement log, warn and error methods");e.logger=r}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=Ne(e.format),this._cache=e.cache||new Fe,this._loadingSchemas={},this._compilations=[],this.RULES=((r=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}]).all=Ge(t=["type","$comment"]),r.types=Ge(["number","integer","string","array","object","boolean","null"]),r.forEach((function(e){e.rules=e.rules.map((function(e){var a;if("object"==typeof e){var o=Object.keys(e)[0];a=e[o],e=o,a.forEach((function(e){t.push(e),r.all[e]=!0}))}return t.push(e),r.all[e]={keyword:e,code:Ke[e],implements:a}})),r.all.$comment={keyword:"$comment",code:Ke.$comment},e.type&&(r.types[e.type]=e)})),r.keywords=Ge(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),r.custom={},r),this._getId=function(e){switch(e.schemaId){case"auto":return jr;case"id":return $r;default:return kr}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=de),this._metaOpts=function(e){for(var r=A.copy(e._opts),t=0;t<Fr.length;t++)delete r[Fr[t]];return r}(this),e.formats&&function(e){for(var r in e._opts.formats){var t=e._opts.formats[r];e.addFormat(r,t)}}(this),e.keywords&&function(e){for(var r in e._opts.keywords){var t=e._opts.keywords[r];e.addKeyword(r,t)}}(this),function(e){var r;e._opts.$data&&(r=wr,e.addMetaSchema(r,r.$id,!0));if(!1===e._opts.meta)return;var t=lr;e._opts.$data&&(t=Ze(t,xr));e.addMetaSchema(t,Sr,!0),e._refs["http://json-schema.org/schema"]=Sr}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var r=e._opts.schemas;if(!r)return;if(Array.isArray(r))e.addSchema(r);else for(var t in r)e.addSchema(r[t],t)}(this)}function _r(e,r){return r=G.normalizeId(r),e._schemas[r]||e._refs[r]||e._fragments[r]}function Dr(e,r,t){for(var a in r){var o=r[a];o.meta||t&&!t.test(a)||(e._cache.del(o.cacheKey),delete r[a])}}function $r(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function kr(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function jr(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function Ir(e,r){if(e._schemas[r]||e._refs[r])throw new Error('schema with key or id "'+r+'" already exists')}function Ar(){}var Cr={$$currentLocalizeFn:function(e){if(e&&e.length)for(var r=0;r<e.length;r+=1){var t=e[r],a=void 0,o=void 0,i=void 0;switch(t.keyword){case"$ref":a="无法找到引用".concat(t.params.ref);break;case"additionalItems":a="",o=t.params.limit,a+="不允许超过".concat(o,"个元素");break;case"additionalProperties":a="不允许有额外的属性";break;case"anyOf":a="数据应为 anyOf 所指定的其中一个";break;case"const":a="应当等于常量";break;case"contains":a="应当包含一个有效项";break;case"custom":a='应当通过 "'.concat(t.keyword,' 关键词校验"');break;case"dependencies":a="",o=t.params.depsCount,a+="应当拥有属性".concat(t.params.property,"的依赖属性").concat(t.params.deps);break;case"enum":a="应当是预设定的枚举值之一";break;case"exclusiveMaximum":case"exclusiveMinimum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(i);break;case"false schema":a="布尔模式出错";break;case"format":a='应当匹配格式 "'.concat(t.params.format,'"');break;case"formatExclusiveMaximum":a="formatExclusiveMaximum 应当是布尔值";break;case"formatExclusiveMinimum":a="formatExclusiveMinimum 应当是布尔值";break;case"formatMaximum":case"formatMinimum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当是 ".concat(i);break;case"if":a='应当匹配模式 "'.concat(t.params.failingKeyword,'" ');break;case"maximum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(i);break;case"maxItems":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个项");break;case"maxLength":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个字符");break;case"maxProperties":a="",o=t.params.limit,a+="不应有多于 ".concat(o," 个属性");break;case"minimum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(i);break;case"minItems":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个项");break;case"minLength":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个字符");break;case"minProperties":a="",o=t.params.limit,a+="不应有少于 ".concat(o," 个属性");break;case"multipleOf":a="应当是 ".concat(t.params.multipleOf," 的整数倍");break;case"not":a='不应当匹配 "not" schema';break;case"oneOf":a='只能匹配一个 "oneOf" 中的 schema';break;case"pattern":a='应当匹配模式 "'.concat(t.params.pattern,'"');break;case"patternRequired":a="应当有属性匹配模式 ".concat(t.params.missingPattern);break;case"propertyNames":a="属性名 '".concat(t.params.propertyName,"' 无效");break;case"required":a="应当有必需属性 ".concat(t.params.missingProperty);break;case"switch":a="由于 ".concat(t.params.caseIndex,' 失败,未通过 "switch" 校验, ');break;case"type":a="应当是 ".concat(t.params.type," 类型");break;case"uniqueItems":a="不应当含有重复项 (第 ".concat(t.params.j," 项与第 ").concat(t.params.i," 项是重复的)");break;default:continue}t.message=a}},getCurrentLocalize:function(){return this.$$currentLocalizeFn},useLocal:function(e){this.$$currentLocalizeFn=e}};function Rr(e,r){try{if("object"===o(r))return e.fill(null).map((function(){return JSON.parse(JSON.stringify(r))}))}catch(e){}}function Nr(e,r){return e.filter((function(e){return r.includes(e)}))}function Lr(e,r,t){var a=_(e.$ref,r);e.$ref;var o=c(e,["$ref"]);return Vr(l(l({},a),o),r,t)}function Tr(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length<2)return r[0];for(var a={},o=[].concat(r),i=function(){var e=f(o[0])?o[0]:{},r=f(o[1])?o[1]:{};a=Object.assign({},e),Object.keys(r).reduce((function(t,a){var o=e[a],i=r[a];if(f(o)||f(i))if(f(o)&&f(i))t[a]=Tr(o,i);else{var n=u(f(o)?[o,i]:[i,o],2),s=n[0],l=n[1];t[a]="additionalProperties"===a?!0===l&&s:s}else if(Array.isArray(o)||Array.isArray(i))if(Array.isArray(o)&&Array.isArray(i)){if(f(o[0])||f(i[0]))throw new Error("暂不支持如上数组对象元素合并");var c=Nr([].concat(o),[].concat(i));if(c.length<=0)throw new Error("无法合并如上数据");0===c.length&&"type"===a?t[a]=c[0]:t[a]=c}else{var d=u(Array.isArray(o)?[o,i]:[i,o],2),p=d[0],h=d[1];if(void 0===h)t[a]=p;else{if(!p.includes(h))throw new Error("无法合并如下数据");t[a]=h}}else if(void 0!==o&&void 0!==i)if("maxLength"===a||"maximum"===a||"maxItems"===a||"exclusiveMaximum"===a||"maxProperties"===a)t[a]=Math.min(o,i);else if("minLength"===a||"minimum"===a||"minItems"===a||"exclusiveMinimum"===a||"minProperties"===a)t[a]=Math.max(o,i);else if("multipleOf"===a)t[a]=x(o,i);else{if(o!==i)throw new Error("无法合并如下数据");t[a]=o}else t[a]=void 0===o?i:o;return t}),a),o.splice(0,2,a)};o.length>=2;)i();return a}function zr(e,r,t){var a=l(l({},e),{},{allOf:e.allOf.map((function(e){return Vr(e,r,t)}))});try{var o=a.allOf,i=c(a,["allOf"]);return Tr.apply(void 0,[i].concat(d(o)))}catch(e){return a.allOf,c(a,["allOf"])}}function qr(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.hasOwnProperty("allOf")&&(e=zr(e,r,t)),e.hasOwnProperty("$ref")&&(e=Lr(e,r,t)),e}function Vr(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return f(e)?qr(e,r,t):{}}function Mr(e){return e?"".concat("__pathRoot",".").concat(e).replace(/\./g,"_"):"__pathRoot"}function Ur(e){return""===e}function Wr(e,r){return""===e?r:[e,r].join(".")}function Br(e,r){a.default.delete(e,r)}function Qr(e,r,t){for(var o=r.split("."),i=0;i<o.length;i+=1){if(o.length-i<2){a.default.set(e,o[o.length-1],t);break}e=e[o[i]]}}function Hr(e,r){for(var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=r.split("."),o=0;o<a.length-t;o+=1){if(void 0===e)return;e=""===a[o]?e:e[a[o]]}return e}function Kr(e){return e}var Gr=Object.freeze({__proto__:null,nodePath2ClassName:Mr,isRootNodePath:Ur,computedCurPath:Wr,deletePathVal:Br,setPathVal:Qr,getPathVal:Hr,path2prop:Kr}),Jr=/{{(.*)}}/;function Zr(e,r,t,a){if(void 0!==t){var o=Jr.exec(t);if(Jr.lastIndex=0,o){var i=o[1].trim();return new Function("parentFormData","rootFormData","return ".concat(i))(Hr(e,r,1),e)}return a()}}function Xr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.schema,t=e.uiSchema,a=arguments.length>1?arguments[1]:void 0,o=tt({schema:r,uiSchema:t,containsSpec:!1});return["title","description"].reduce((function(e,r){return o[r]&&(e["ui:".concat(r)]=String(o[r]).replace(/\$index/g,a+1)),e}),{})}function Yr(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,i=e.curNodePath,n=void 0===i?"":i,s=e.rootFormData,l=void 0===s?{}:s,c=o["ui:widget"]||t["ui:widget"],u=o["ui:hidden"]||t["ui:hidden"];return"HiddenWidget"===c||"hidden"===c||!!Zr(l,n,u,(function(){return"function"==typeof u?u(Hr(l,n,1),l):u}))}function et(e,r){var t=r.schema,a=void 0===t?{}:t,i=r.uiSchema,n=void 0===i?{}:i,s=a["ui:field"]||n["ui:field"];if("function"==typeof s||"object"===o(s)||"string"==typeof s)return{field:s,fieldProps:n["ui:fieldProps"]||a["ui:fieldProps"]};var l=e[y(a)];if(l)return{field:l};if(!l&&(a.anyOf||a.oneOf))return{field:null};throw new Error("不支持的field类型 ".concat(a.type))}function rt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.curNodePath,s=e.rootFormData,c=void 0===s?{}:s;return Object.assign.apply(Object,[{}].concat(d([t,o].map((function(e){return Object.keys(e).reduce((function(r,t){var a=e[t];return"ui:options"===t&&f(a)?l(l({},r),a):0===t.indexOf("ui:")?l(l({},r),{},i({},t.substring(3),void 0===n?a:Zr(c,n,a,(function(){return a})))):r}),{})})))))}function tt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,i=e.containsSpec,n=void 0===i||i,s=e.curNodePath,c=e.rootFormData,u={};return n&&(u.readonly=!!t.readOnly,void 0!==t.multipleOf&&(u.step=t.multipleOf),(t.minimum||0===t.minimum)&&(u.min=t.minimum),(t.maximum||0===t.maximum)&&(u.max=t.maximum),(t.minLength||0===t.minLength)&&(u.minlength=t.minLength),(t.maxLength||0===t.maxLength)&&(u.maxlength=t.maxLength),"date-time"!==t.format&&"date"!==t.format||("array"===t.type?(u.isRange=!0,u.isNumberValue=!(t.items&&"string"===t.items.type)):u.isNumberValue=!("string"===t.type))),l(l({title:t.title,description:t.description},u),rt({schema:t,uiSchema:o,curNodePath:s,rootFormData:c}))}function at(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,i=e.curNodePath,n=e.rootFormData,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,l=tt({schema:t,uiSchema:o,curNodePath:i,rootFormData:n});!l.widget&&s&&Object.assign(l,s({schema:t,uiSchema:o}));var u=l.widget,d=l.title,p=l.labelWidth,h=l.description,m=l.attrs,f=l.class,v=l.style,g=l.fieldAttrs,y=l.fieldStyle,b=l.fieldClass,P=l.emptyValue,w=l.width,E=l.getWidget,S=l.onChange,F=c(l,["widget","title","labelWidth","description","attrs","class","style","fieldAttrs","fieldStyle","fieldClass","emptyValue","width","getWidget","onChange"]);return{widget:u,label:d,labelWidth:p,description:h,widgetAttrs:m,widgetClass:f,widgetStyle:v,fieldAttrs:g,width:w,fieldStyle:y,fieldClass:b,emptyValue:P,getWidget:E,onChange:S,uiProps:F}}function ot(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.errorSchema,s=void 0===n?{}:n;return Object.assign.apply(Object,[{}].concat(d([t,o,s].map((function(e){return Object.keys(e).reduce((function(r,t){var a=e[t];return"err:options"===t&&f(a)?l(l({},r),a):0===t.indexOf("err:")?l(l({},r),{},i({},t.substring(4),a)):r}),{})})))))}function it(e,r){if(!Array.isArray(r))return e;var t,a=function(e){return e.reduce((function(e,r){return e[r]=!0,e}),{})},o=a(e),i=r.filter((function(e){return"*"===e||o[e]})),n=a(i),s=e.filter((function(e){return!n[e]})),l=i.indexOf("*");if(-1===l){if(s.length)throw new Error("uiSchema order list does not contain ".concat((t=s).length>1?"properties '".concat(t.join("', '"),"'"):"property '".concat(t[0],"'")));return i}if(l!==i.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");var c=d(i);return c.splice.apply(c,[l,1].concat(d(s))),c}function nt(e){return Array.isArray(e.enum)&&1===e.enum.length||e.hasOwnProperty("const")}function st(e){if(Array.isArray(e.enum)&&1===e.enum.length)return e.enum[0];if(e.hasOwnProperty("const"))return e.const;throw new Error("schema cannot be inferred as a constant")}function lt(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=Vr(e,r),a=t.oneOf||t.anyOf;return!!Array.isArray(t.enum)||!!Array.isArray(a)&&a.every((function(e){return nt(e)}))}function ct(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every((function(e){return f(e)}))}function ut(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!(!e.uniqueItems||!e.items)&<(e.items,r)}function dt(e){return e.additionalItems,f(e.additionalItems)}function pt(e,r,t,a){if(e.enum){var o=rt({schema:e,uiSchema:r,curNodePath:t,rootFormData:a}).enumNames||e.enumNames;return e.enum.map((function(e,r){return{label:o&&o[r]||String(e),value:e}}))}var i=e.oneOf||e.anyOf,n=r.oneOf||r.anyOf;return i.map((function(e,r){var o=n&&n[r]?rt({schema:e,uiSchema:n[r],curNodePath:t,rootFormData:a}):{},i=st(e);return{label:o.title||e.title||String(i),value:i}}))}function ht(e,r,t){if(e)return e;if(r){var a=t.split(".").pop();if(a&&a!=="".concat(Number(a)))return a}return""}var mt=Object.freeze({__proto__:null,replaceArrayIndex:Xr,isHiddenWidget:Yr,getUiField:et,getUserUiOptions:rt,getUiOptions:tt,getWidgetConfig:at,getUserErrOptions:ot,orderProperties:it,isConstant:nt,toConstant:st,isSelect:lt,isFixedItems:ct,isMultiSelect:ut,allowAdditionalItems:dt,optionsList:pt,fallbackLabel:ht}),ft=yt(),vt=null,gt=null;function yt(){var e=new Er({errorDataPath:"property",allErrors:!0,multipleOfPrecision:8,schemaId:"auto",unknownFormats:"ignore"});return e.addFormat("data-url",/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/),e.addFormat("color",/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/),e}function bt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null===e?[]:e.map((function(e){var r=e.dataPath,t=e.keyword,a=e.message,o=e.params,i=e.schemaPath,n="".concat(r);return{name:t,property:n,message:a,params:o,stack:"".concat(n," ").concat(a).trim(),schemaPath:i}}))}function Pt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.transformErrors,o=e.additionalMetaSchemas,i=void 0===o?[]:o,n=e.customFormats,s=void 0===n?{}:n,l=!b(gt,i),c=!b(vt,s);(l||c)&&(ft=yt()),i&&l&&Array.isArray(i)&&(ft.addMetaSchema(i),gt=i),s&&c&&f(s)&&(Object.keys(s).forEach((function(e){ft.addFormat(e,s[e])})),vt=s);var u=null;try{ft.validate(t,r)}catch(e){u=e}Cr.getCurrentLocalize()(ft.errors);var p=bt(ft.errors);ft.errors=null;var h=u&&u.message&&"string"==typeof u.message&&u.message.includes("no schema with key or ref ");return h&&(p=[].concat(d(p),[{stack:u.message}])),"function"==typeof a&&(p=a(p)),{errors:p}}function wt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.uiSchema,o=e.transformErrors,i=e.additionalMetaSchemas,n=void 0===i?[]:i,s=e.customFormats,l=void 0===s?{}:s,c=e.errorSchema,u=void 0===c?{}:c,d=e.required,p=void 0!==d&&d,h=e.propPath,m=void 0===h?"":h,f=e.isOnlyFirstError,v=void 0===f||f,g="array"===t.type&&Array.isArray(r)&&0===r.length,y=void 0===r||g;if(p){if(y){var b={keyword:"required",params:{missingProperty:m}},P=ot({schema:t,uiSchema:a,errorSchema:u}).required;return P?b.message=P:Cr.getCurrentLocalize()([b]),[b]}}else if(y&&!g)return[];var w=Pt({formData:r,schema:t,transformErrors:o,additionalMetaSchemas:n,customFormats:l}).errors;w=w.filter((function(e){return""===e.property&&!e.schemaPath.includes("#/anyOf/")&&!e.schemaPath.includes("#/oneOf/")||"additionalProperties"===e.name}));var E=ot({schema:t,uiSchema:a,errorSchema:u});return(v&&w.length>0?[w[0]]:w).reduce((function(e,r){return r.message=void 0!==E[r.name]?E[r.name]:r.message,e.push(r),e}),[])}function Et(e,r){try{return ft.validate(e,r)}catch(e){return!1}}function St(e,r,t){for(var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=0;o<r.length;o++){var i=Vr(r[o],t,e);if(i.properties){var s=l(l({},t.definitions?{definitions:t.definitions}:{}),{},{anyOf:Object.keys(i.properties).map((function(e){return{required:[e]}}))}),c=void 0;if(i.anyOf){var u=n({},i);u.allOf?u.allOf=u.allOf.slice():u.allOf=[],u.allOf.push(s),c=u}else c=Object.assign({},i,s);if(a||delete c.required,Et(c,e))return o}else if(Et(r[o],e))return o}return 0}var Ft=Object.freeze({__proto__:null,ajvValidateFormData:Pt,validateFormDataAndTransformMsg:wt,isValid:Et,getMatchingOption:St});function xt(e,r){if(Array.isArray(r))return Array.isArray(e)||(e=[]),r.map((function(r,t){return e[t]?xt(e[t],r):r}));if(f(r)){var t=Object.assign({},e);return Object.keys(r).reduce((function(t,a){return t[a]=xt(e?e[a]:{},r[a]),t}),t)}return r}function Ot(e,r,t){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=f(e)?e:{},n=f(a)?a:{};"allOf"in i&&(i=zr(i,t,n));var s=r;if(f(s)&&f(i.default))s=g(s,i.default);else if("default"in i)s=i.default;else{if("$ref"in i){var l=_(i.$ref,t);return Ot(l,s,t,n,o)}if(ct(i))s=i.items.map((function(e,a){return Ot(e,Array.isArray(r)?r[a]:void 0,t,n,o)}));else if("oneOf"in i){var c=Vr(i.oneOf[St(n,i.oneOf,t)],t,n);if(i.properties&&c.properties){var u=g(i,c);delete u.oneOf,i=u}else i=c}else if("anyOf"in i){var d=Vr(i.anyOf[St(n,i.anyOf,t)],t,n);if(i.properties&&d.properties){var p=g(i,d);delete p.anyOf,i=p}else i=d}}switch(void 0===s&&(s=i.default),y(i)){case"null":return null;case"object":return Object.keys(i.properties||{}).reduce((function(e,r){var a=Ot(i.properties[r],(s||{})[r],t,(n||{})[r],o);return(o||void 0!==a)&&(e[r]=a),e}),{});case"array":if(Array.isArray(s)&&(s=s.map((function(e,r){return Ot(i.items[r]||i.additionalItems||{},e,t,{},o)}))),Array.isArray(a)&&(s=a.map((function(e,r){return Ot(i.items,(s||{})[r],t,e,{},o)}))),i.minItems){if(ut(i,t))return s||[];var h=s?s.length:0;if(i.minItems>h){var m=s||[],v=Array.isArray(i.items)?i.additionalItems:i.items,b=Rr(new Array(i.minItems-h),Ot(v,v.defaults,t,{},o));return m.concat(b)}}s=void 0===s?[]:s}return s}function _t(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!f(e))throw new Error("Invalid schema: ".concat(e));var o=Vr(e,t,r),i=Ot(o,e.default,t,r,a);return void 0===r?i:f(r)||Array.isArray(r)?xt(i,r):0===r||!1===r||""===r?r:r||i}function Dt(e,r){void 0===r&&(r={});var t=r.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}Dt('.genFromComponent{font-size:14px;line-height:1;word-wrap:break-word;word-break:break-word;padding:0;margin:0}.genFromComponent a,.genFromComponent h1,.genFromComponent h2,.genFromComponent h3,.genFromComponent li,.genFromComponent p,.genFromComponent ul{font-size:14px}.genFromComponent .genFormIcon{width:12px;height:12px;vertical-align:top}.genFromComponent .genFormBtn{display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;background:#fff;border:1px solid #dcdfe6;color:#606266;-webkit-appearance:none;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;margin:0;-webkit-transition:.1s;transition:.1s;font-weight:500;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;padding:12px 20px;font-size:14px;border-radius:4px}.genFromComponent .genFormBtn.is-plain:focus,.genFromComponent .genFormBtn.is-plain:hover{background:#fff;border-color:#409eff;color:#409eff}.genFromComponent .hiddenWidget{display:none}.genFromComponent .fieldGroupWrap+.fieldGroupWrap .fieldGroupWrap_title{margin-top:20px}.genFromComponent .fieldGroupWrap_title{position:relative;display:block;width:100%;line-height:26px;margin-bottom:8px;font-size:15px;font-weight:700;border:0}.genFromComponent .fieldGroupWrap_des{font-size:12px;line-height:20px;margin-bottom:10px;color:#999}.genFromComponent .genFromWidget_des{padding:0;margin-top:0;margin-bottom:2px;font-size:12px;line-height:20px;color:#999;text-align:left}.genFromComponent .formItemErrorBox{margin:0 auto;color:#ff5757;padding-top:2px;position:absolute;top:100%;left:0;display:-webkit-box!important;line-height:16px;text-overflow:ellipsis;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1;white-space:normal;font-size:12px;text-align:left}.genFromComponent .genFormIcon-qs{fill:#606266;vertical-align:middle;display:inline-block;width:16px;height:16px;margin-left:2px;margin-top:-2px;cursor:pointer}.genFromComponent .genFormItemRequired:before{content:"*";color:#f56c6c;margin-right:4px}.genFromComponent .appendCombining_box{margin-bottom:22px}.genFromComponent .appendCombining_box .appendCombining_box{margin-bottom:10px}.genFromComponent .appendCombining_box{padding:10px;background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .validateWidget{margin-bottom:0!important;width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important;padding:0!important}.genFromComponent .validateWidget .formItemErrorBox{padding:5px 0;position:relative}.genFromComponent .arrayField:not(.genFormItem){margin-bottom:22px}.genFromComponent .arrayField:not(.genFormItem) .arrayField{margin-bottom:10px}.genFromComponent .arrayOrderList{background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .arrayOrderList_item{position:relative;padding:25px 10px 12px;border-radius:2px;margin-bottom:6px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.genFromComponent .arrayOrderList_bottomAddBtn{text-align:right;padding:15px 10px;margin-bottom:10px}.genFromComponent .bottomAddBtn{width:40%;min-width:10px;max-width:180px}.genFromComponent .arrayListItem_content{padding-top:15px;-webkit-box-flex:1;-ms-flex:1;flex:1;margin:0 auto;-webkit-box-shadow:0 -1px 0 0 rgba(0,0,0,.05);box-shadow:0 -1px 0 0 rgba(0,0,0,.05)}.genFromComponent .arrayListItem_index,.genFromComponent .arrayListItem_operateTool{position:absolute;height:25px}.genFromComponent .arrayListItem_index{top:6px;line-height:18px;height:18px;padding:0 6px;background-color:rgba(0,0,0,.28);color:#fff;font-size:12px;border-radius:2px}.genFromComponent .arrayListItem_operateTool{width:75px;right:9px;top:-1px;text-align:right;font-size:0}.genFromComponent .arrayListItem_btn{vertical-align:top;display:inline-block;padding:6px;margin:0;font-size:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none;cursor:pointer;text-align:center;background:transparent;color:#666}.genFromComponent .arrayListItem_btn:hover{opacity:.6}.genFromComponent .arrayListItem_btn[disabled]{color:#999;opacity:.3!important;cursor:not-allowed}.genFromComponent .arrayListItem_orderBtn-bottom,.genFromComponent .arrayListItem_orderBtn-top{background-color:#f0f9eb}.genFromComponent .arrayListItem_btn-delete{background-color:#fef0f0}.genFromComponent .formFooter_item{text-align:right;border-top:1px solid rgba(0,0,0,.08);padding-top:10px}.genFromComponent.formInlineFooter>.fieldGroupWrap{display:inline-block;margin-right:10px}.genFromComponent.formInline .genFormItem{display:inline-block;margin-right:10px;vertical-align:top}.genFromComponent.formInline .validateWidget{margin-right:0}.genFromComponent.formInline .formFooter_item{border-top:none;padding-top:0}.layoutColumn .layoutColumn_w100{width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important}.layoutColumn .fieldGroupWrap_box{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start}.layoutColumn .fieldGroupWrap_box>div{width:100%;-ms-flex-preferred-size:100%;flex-basis:100%}.layoutColumn .fieldGroupWrap_box>.genFormItem{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;-webkit-box-sizing:border-box;box-sizing:border-box;padding-right:10px}.layoutColumn.layoutColumn-1 .fieldGroupWrap_box>.genFormItem{padding-right:0}.layoutColumn.layoutColumn-2 .fieldGroupWrap_box>.genFormItem{width:50%;-ms-flex-preferred-size:50%;flex-basis:50%}.layoutColumn.layoutColumn-3 .fieldGroupWrap_box>.genFormItem{width:33.333%;-ms-flex-preferred-size:33.333%;flex-basis:33.333%}');var $t={formFooter:{type:Object,default:function(){return{show:!0,okBtn:"保存",cancelBtn:"取消"}}},value:{type:null,default:function(){return{}},required:!0},formProps:{type:Object,default:function(){return{}}},fallbackLabel:{type:Boolean,default:!1},schema:{type:Object,default:function(){return{}},required:!0},uiSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},errorSchema:{type:Object,default:function(){return{}}}},kt={name:"FormFooter",props:{okBtn:{type:String,default:"保存"},cancelBtn:{type:String,default:"取消"},formItemAttrs:{type:Object,default:function(){return{}}},globalOptions:null},render:function(e){var r=this,t=this.$props,a=t.okBtn,o=t.cancelBtn,i=t.globalOptions.COMPONENT_MAP;return e(i.formItem,l({class:{formFooter_item:!0}},this.formItemAttrs),[e(i.button,{on:{click:function(){r.$emit("onCancel")}}},o),e(i.button,{style:{marginLeft:"10px"},props:{type:"primary"},on:{click:function(){r.$emit("onSubmit")}}},a)])}};var jt=function(e,r,t,a,o,i,n,s,l,c){"boolean"!=typeof n&&(l=s,s=n,n=!1);var u,d="function"==typeof t?t.options:t;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,o&&(d.functional=!0)),a&&(d._scopeId=a),i?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(i)},d._ssrRegister=u):r&&(u=n?function(e){r.call(this,c(e,this.$root.$options.shadowRoot))}:function(e){r.call(this,s(e))}),u)if(d.functional){var p=d.render;d.render=function(e,r){return u.call(r),p(e,r)}}else{var h=d.beforeCreate;d.beforeCreate=h?[].concat(h,u):[u]}return t},It={name:"FieldGroupWrap",inject:["genFormProvide"],props:{curNodePath:{type:String,default:""},showTitle:{type:Boolean,default:!0},showDescription:{type:Boolean,default:!0},title:{type:String,default:""},description:{type:String,default:""}},computed:{trueTitle:function(){var e=this.title;if(e)return e;var r=(this.genFormProvide.value||this.genFormProvide).fallbackLabel&&this.curNodePath.split(".").pop();return r!=="".concat(Number(r))?r:""}}},At=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("div",{staticClass:"fieldGroupWrap"},[e.showTitle&&e.trueTitle?t("h3",{staticClass:"fieldGroupWrap_title"},[e._v("\n "+e._s(e.trueTitle)+"\n ")]):e._e(),e._v(" "),e.showDescription&&e.description?t("p",{staticClass:"fieldGroupWrap_des",domProps:{innerHTML:e._s(e.description)}}):e._e(),e._v(" "),t("div",{staticClass:"fieldGroupWrap_box"},[e._t("default")],2)])};At._withStripped=!0;var Ct=jt({render:At,staticRenderFns:[]},void 0,It,void 0,!1,void 0,!1,void 0,void 0,void 0),Rt={formProps:{type:null},globalOptions:{type:null},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},customFormats:{type:Object,default:function(){return{}}},rootSchema:{type:Object,default:function(){return{}}},rootFormData:{type:null,default:function(){return{}}},curNodePath:{type:String,default:""},required:{type:Boolean,default:!1},needValidFieldGroup:{type:Boolean,default:!0}},Nt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-down",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}})])};Nt._withStripped=!0;var Lt=jt({render:Nt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Tt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-up",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}})])};Tt._withStripped=!0;var zt=jt({render:Tt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),qt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-close",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1\n 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0\n 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}})])};qt._withStripped=!0;var Vt=jt({render:qt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Mt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-plus",attrs:{t:"1551322312294",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"10297","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"200",height:"200"}},[r("path",{attrs:{d:"M474 152m8 0l60 0q8 0 8 8l0 704q0 8-8 8l-60 0q-8 0-8-8l0-704q0-8 8-8Z","p-id":"10298"}}),this._v(" "),r("path",{attrs:{d:"M168 474m8 0l672 0q8 0 8 8l0 60q0 8-8 8l-672 0q-8 0-8-8l0-60q0-8 8-8Z","p-id":"10299"}})])};Mt._withStripped=!0;var Ut=jt({render:Mt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Wt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-qs",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 708c-22.1\n 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 0\n 0-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8\n 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6\n 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6\n 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z"}})])};Wt._withStripped=!0;var Bt=jt({render:Wt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Qt={name:"Widget",inject:["genFormProvide"],props:{isFormData:{type:Boolean,default:!0},curValue:{type:null,default:0},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},widget:{type:[String,Function,Object],default:null},required:{type:Boolean,default:!1},emptyValue:{type:null,default:void 0},formatValue:{type:[Function],default:function(e){return{update:!0,value:e}}},rootFormData:{type:null},curNodePath:{type:String,default:""},label:{type:String,default:""},width:{type:String,default:""},labelWidth:{type:String,default:""},description:{type:String,default:""},widgetAttrs:{type:Object,default:function(){return{}}},widgetClass:{type:Object,default:function(){return{}}},widgetStyle:{type:Object,default:function(){return{}}},fieldAttrs:{type:Object,default:function(){return{}}},fieldClass:{type:Object,default:function(){return{}}},fieldStyle:{type:Object,default:function(){return{}}},uiProps:{type:Object,default:function(){return{}}},formProps:null,getWidget:null,globalOptions:null,onChange:null},computed:{value:{get:function(){return this.isFormData?Hr(this.rootFormData,this.curNodePath):this.curValue},set:function(e){var r=""===e||null===e?this.emptyValue:e;this.isFormData&&Qr(this.rootFormData,this.curNodePath,r),this.$emit("onChange",r)}}},created:function(){this.uiProps.enumOptions&&this.uiProps.enumOptions.length>0&&void 0===this.value&&this.value!==this.uiProps.enumOptions[0]&&(this.schema.items?this.value=[]:this.required&&(this.value=this.uiProps.enumOptions[0].value))},render:function(e){var r=this,t=this.$props.curNodePath,a=Ur(t),o=r.globalOptions.HELPERS.isMiniDes(r.formProps),i=r.description?e("div",{domProps:{innerHTML:r.description},class:{genFromWidget_des:!0}}):null,n=r.globalOptions.COMPONENT_MAP,s=o&&i?e(n.popover,{style:{margin:"0 2px",fontSize:"16px",cursor:"pointer"},props:{placement:"top",trigger:"hover"}},[i,e(Bt,{slot:"reference"})]):null,c=l(l({},r.fieldStyle),r.width?{width:r.width,flexBasis:r.width,paddingRight:"10px"}:{}),u=ht(r.label,r.widget&&this.genFormProvide.fallbackLabel,t);return e(n.formItem,{class:l(l({},r.fieldClass),{},{genFormItem:!0}),style:c,attrs:r.fieldAttrs,props:l(l({},r.labelWidth?{labelWidth:r.labelWidth}:{}),this.isFormData?{prop:a?"__$$root":t,rules:[{validator:function(e,o,i){a&&(o=r.rootFormData);var n=wt({formData:o,schema:r.$props.schema,uiSchema:r.$props.uiSchema,customFormats:r.$props.customFormats,errorSchema:r.errorSchema,required:r.required,propPath:t});if(n.length>0)return i(n[0].message);var s=r.$props.customRule;return s&&"function"==typeof s?s({field:t,value:o,rootFormData:r.rootFormData,callback:i}):i()},trigger:"blur"}]}:{}),scopedSlots:{error:function(r){return r.error?e("div",{class:{formItemErrorBox:!0},attrs:{title:r.error}},[r.error]):null}}},[u?e("span",{slot:"label",class:{genFormLabel:!0,genFormItemRequired:r.required}},["".concat(u),s,"".concat(r.formProps&&r.formProps.labelSuffix||"")]):null,o?null:i,e(r.widget,{style:r.widgetStyle,class:r.widgetClass,attrs:l(l(l({},r.widgetAttrs),r.uiProps),{},{value:this.value}),ref:"widgetRef",on:{"hook:mounted":function(){r.getWidget&&"function"==typeof r.getWidget&&r.getWidget.call(null,r.$refs.widgetRef)},input:function(e){var t=r.formatValue(e),a=r.value;t.update&&a!==t.value&&(r.value=t.value,r.onChange&&r.onChange(t.value,a))}}})])}},Ht={name:"ObjectField",functional:!0,props:Rt,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,i=t.errorSchema,n=t.needValidFieldGroup,s=t.curNodePath,c=t.rootFormData,p=t.globalOptions,h=tt({schema:a,uiSchema:o,curNodePath:s,rootFormData:c}),m=h.title,v=h.description,g=h.showTitle,y=h.showDescription,b=h.order,P=h.fieldClass,w=h.fieldAttrs,E=h.fieldStyle,S=h.onlyShowIfDependent,F=it(Object.keys(a.properties||{}),b).map((function(t){var n=function(e){return Array.isArray(a.required)&&!!~a.required.indexOf(e)}(t),d=function(e){var r=!1,t=!1;return f(a.dependencies)&&(t=Object.entries(a.dependencies).some((function(t){var a=u(t,2),o=a[0],i=a[1],n=!(!Array.isArray(i)||!~i.indexOf(e));return r=r||n,n&&void 0!==Hr(c,s)[o]}))),{isDependency:r,curDependent:t}}(t),p=d.isDependency,h=d.curDependent;return p&&S&&!h?null:e(na,{key:t,props:l(l({},r.props),{},{schema:a.properties[t],uiSchema:o[t],errorSchema:i[t],required:n||h,curNodePath:Wr(s,t)})})}));return e(Ct,{props:{title:m,description:v,showTitle:g,showDescription:y,curNodePath:s},class:l(l({},r.data.class),P),attrs:w,style:E},[e("template",{slot:"default"},[].concat(d(F),[n?e(Qt,{key:"validateWidget-object",class:{validateWidget:!0,"validateWidget-object":!0},props:{schema:Object.entries(a).reduce((function(e,r){var t=u(r,2),o=t[0],i=t[1];return!1!==a.additionalProperties&&["properties","id","$id"].includes(o)||(e[o]=i),e}),{}),uiSchema:o,errorSchema:i,curNodePath:s,rootFormData:c,globalOptions:p}}):null]))])}},Kt={name:"StringField",props:Rt,functional:!0,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,i=t.curNodePath,n=t.rootFormData,s=t.globalOptions.WIDGET_MAP,c=lt(a)&&pt(a,o,i,n),u=at({schema:a,uiSchema:o,curNodePath:i,rootFormData:n},(function(){var e="number"===a.type||"integer"===a.type;return{widget:c?s.common.select:s.formats[a.format]||(e?s.types.number:s.types.string)}}));return c&&!u.uiProps.enumOptions&&(u.uiProps.enumOptions=c),e(Qt,l(l({},r.data),{},{props:l(l({},r.props),u)}))}},Gt={name:"NumberField",props:Rt,functional:!0,render:function(e,r){return e(Kt,r.data)}},Jt={name:"IntegerField",props:Rt,functional:!0,render:function(e,r){return e(Kt,r.data)}},Zt={name:"BooleanField",props:Rt,functional:!0,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,i=t.curNodePath,n=t.rootFormData,s=t.globalOptions,c=pt({enumNames:a.enumNames||["true","false"],enum:a.enum||[!0,!1]},o,i,n),u=at({schema:a,uiSchema:o,curNodePath:i,rootFormData:n},(function(){return{widget:s.WIDGET_MAP.types.boolean}}));return u.uiProps.enumOptions=u.uiProps.enumOptions||c,e(Qt,l(l({},r.data),{},{props:l(l({},r.props),u)}))}},Xt={name:"ArrayOrderList",props:{vNodeList:{type:Array,default:[]},tupleItemsLength:{type:Number,default:0},addable:{type:Boolean,default:!0},showIndexNumber:{type:Boolean,default:!1},sortable:{type:Boolean,default:!0},removable:{type:Boolean,default:!0},maxItems:{},minItems:{},globalOptions:null},computed:{canAdd:function(){var e=this.$props,r=e.addable,t=e.maxItems,a=e.vNodeList;return!!r&&(void 0===t||a.length<t)},canRemove:function(){var e=this.$props,r=e.removable,t=e.minItems,a=e.vNodeList;return!!r&&(void 0===t||a.length>t)}},render:function(e){var r=this;return this.vNodeList.length<=0&&!this.addable?null:e("div",{class:{arrayOrderList:!0}},this.vNodeList.map((function(t,a){var o=t.key,i=t.vNode,n=r.tupleItemsLength+a,s=a+1;return e("div",{key:o,class:{arrayOrderList_item:!0}},[r.showIndexNumber?e("div",{class:{arrayListItem_index:!0}},s):null,e("div",{class:{arrayListItem_operateTool:!0}},[e("button",{style:l({},r.sortable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.sortable||0===a},class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-top":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"moveUp",data:{index:n}})}}},[e(zt)]),e("button",{style:l({},r.sortable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.sortable||a===r.vNodeList.length-1},class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-bottom":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"moveDown",data:{index:n}})}}},[e(Lt)]),e("button",{style:l({},r.removable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.canRemove},class:{arrayListItem_btn:!0,"arrayListItem_btn-delete":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"remove",data:{index:n}})}}},[e(Vt)])]),e("div",{class:{arrayListItem_content:!0}},[i])])})).concat([e("p",{style:l({},this.canAdd?{}:{display:"none"}),class:{arrayOrderList_bottomAddBtn:!0}},[e("button",{attrs:{type:"button"},class:{bottomAddBtn:!0,"is-plain":!0,genFormBtn:!0},on:{click:function(){r.$emit("onArrayOperate",{command:"add"})}}},[e(Ut,{style:{marginRight:"5px"}}),this.maxItems?"( ".concat(this.vNodeList.length," / ").concat(this.maxItems," )"):""])])]))}},Yt={name:"ArrayFieldNormal",functional:!0,props:l(l({},Rt),{},{itemsFormData:{type:Array}}),render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,i=t.curNodePath,n=t.rootFormData,s=t.itemsFormData,c=t.errorSchema,u=t.globalOptions,d=tt({schema:a,uiSchema:o,curNodePath:i,rootFormData:n}),p=d.title,h=d.description,m=d.addable,f=d.showIndexNumber,v=d.sortable,g=d.removable,y=d.showTitle,b=d.showDescription,P=d.fieldClass,w=d.fieldAttrs,E=d.fieldStyle,S=s.map((function(t,n){var s=Xr({schema:a.items,uiSchema:o.items},n);return{key:t.key,vNode:e(na,{key:t.key,props:l(l({},r.props),{},{schema:a.items,required:![].concat(a.items.type).includes("null"),uiSchema:l(l({},o.items),s),errorSchema:c.items,curNodePath:Wr(i,n)})})}}));return e(Ct,{props:{title:p,description:h,showTitle:y,showDescription:b,curNodePath:i},class:l(l({},r.data.class),P),attrs:w,style:E},[e(Xt,{props:{vNodeList:S,showIndexNumber:f,addable:m,sortable:v,removable:g,maxItems:a.maxItems,minItems:a.minItems,globalOptions:u},on:r.listeners})])}},ea={name:"ArrayFieldMultiSelect",functional:!0,props:l({},Rt),render:function(e,r){var t=r.props,a=t.schema,o=t.rootSchema,i=t.uiSchema,n=t.curNodePath,s=t.rootFormData,c=t.globalOptions,u=pt(Vr(a.items,o),i,n,s),d=at({schema:a,uiSchema:i,curNodePath:n,rootFormData:s},(function(){return{widget:c.WIDGET_MAP.common.checkboxGroup}}));return d.uiProps.multiple=!0,u&&!d.uiProps.enumOptions&&(d.uiProps.enumOptions=u),e(Qt,l(l({},r.data),{},{props:l(l({},r.props),d)}))}},ra={name:"ArrayFieldTuple",props:l(l({},Rt),{},{itemsFormData:{type:Array,default:function(){return[]}}}),created:function(){this.fixItemsFormData()},methods:{fixItemsFormData:function(){var e=!Array.isArray(this.itemsFormData);if(e||this.itemsFormData.length<this.schema.items.length){var r=_t(this.schema,void 0,this.rootSchema);e?this.$emit("onArrayOperate",{command:"setNewTarget",data:{newTarget:r}}):this.$emit("onArrayOperate",{command:"batchPush",data:{pushArray:r.slice(this.itemsFormData.length)}})}}},render:function(e){var r=this;if(!Array.isArray(this.itemsFormData))return null;var t,a,o=this.$props,i=o.schema,n=o.uiSchema,s=o.errorSchema,c=o.curNodePath,u=o.globalOptions,p=tt({schema:i,uiSchema:n,curNodePath:c,rootFormData:this.rootFormData}),h=p.title,m=p.description,f=p.addable,v=p.showIndexNumber,g=p.sortable,y=p.removable,b=p.showTitle,P=p.showDescription,w=p.fieldClass,E=p.fieldAttrs,S=p.fieldStyle,F=(t=this.itemsFormData,a=this.schema.items.length-1,t.reduce((function(e,r,t){return e[t>a?1:0].push(r),e}),[[],[]])),x=F[0].map((function(t,a){return e(na,{key:t.key,props:l(l({},r.$props),{},{required:![].concat(i.items[a].type).includes("null"),schema:i.items[a],uiSchema:n.items?n.items[a]:{},errorSchema:s.items?s.items[a]:{},curNodePath:Wr(c,a)})})})),O=F[1].map((function(t,a){var o=Xr({schema:i.additionalItems,uiSchema:n.additionalItems},a);return{key:t.key,vNode:e(na,{key:t.key,props:l(l({},r.$props),{},{schema:i.additionalItems,required:![].concat(i.additionalItems.type).includes("null"),uiSchema:l(l({},n.additionalItems),o),errorSchema:s.additionalItems,curNodePath:Wr(c,a+i.items.length)})})}})),_=(void 0===f||f)&&dt(this.schema);return e(Ct,{props:{title:h,description:m,showTitle:b,showDescription:P,curNodePath:c},class:w,attrs:E,style:S},[].concat(d(x),[e(Xt,{props:{vNodeList:O,tupleItemsLength:i.items.length,addable:_,showIndexNumber:v,sortable:g,removable:y,maxItems:i.maxItems,minItems:i.minItems,globalOptions:u},on:this.$listeners})]))}},ta={name:"ArrayFieldSpecialFormat",props:Rt,functional:!0,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,i=t.curNodePath,n=t.rootFormData,s=at({schema:l({"ui:widget":t.globalOptions.WIDGET_MAP.formats[a.format]},a),uiSchema:o,curNodePath:i,rootFormData:n});return e(Qt,l(l({},r.data),{},{props:l(l({},r.props),s)}))}},aa={name:"ArrayField",props:Rt,data:function(){return{formKeys:this.getCuFormData().map((function(){return E()}))}},computed:{itemsFormData:function(){var e=this.$data.formKeys;return this.curFormData.map((function(r,t){return{key:e[t],value:r}}))},curFormData:function(){return this.getCuFormData()}},watch:{curFormData:function(e,r){e!==r&&Array.isArray(e)&&(this.formKeys=e.map((function(){return E()})))}},methods:{getCuFormData:function(){var e=this.$props,r=Hr(e.rootFormData,e.curNodePath);return Array.isArray(r)?r:[]},getNewFormDataRow:function(){var e=this.$props,r=e.schema,t=e.rootSchema,a=r.items;return ct(this.schema)&&dt(this.schema)&&(a=r.additionalItems),_t(a,void 0,t)},handleArrayOperate:function(e){var r=e.command,t=e.data,a={moveUp:function(e,r){!function(e,r){if(0===r)return!1;var t=[e[r],e[r-1]];e.splice.apply(e,[r-1,2].concat(t))}(e,r.index)},moveDown:function(e,r){!function(e,r){if(r===e.length-1)return!1;var t=e[r],a=[e[r+1],t];e.splice.apply(e,[r,2].concat(a))}(e,r.index)},remove:function(e,r){!function(e,r){e.splice(r,1).length}(e,r.index)},add:function(e,r){var t=r.newRowData;e.push(t)},batchPush:function(e,r){r.pushArray.forEach((function(r){e.push(r)}))},setNewTarget:function(e,r){Qr(r.formData,r.nodePath,r.newTarget)}}[r];if(!a)throw new Error("错误 - 未知的操作:[".concat(r,"]"));var o=t,i=t;"add"===r?(o={newRowData:this.getNewFormDataRow()},i={newRowData:E()}):"batchPush"===r?i={pushArray:o.pushArray.map((function(e){return E()}))}:"setNewTarget"===r&&(o={formData:this.rootFormData,nodePath:this.curNodePath,newTarget:o.newTarget},i={formData:this.$data,nodePath:"formKeys",newTarget:o.newTarget.map((function(e){return E()}))}),a.apply(this,[this.$data.formKeys,i]),a.apply(this,[this.curFormData,o])}},render:function(e){var r=this.$props,t=r.schema,a=r.uiSchema,o=r.rootSchema,n=r.rootFormData,s=r.curNodePath,c=r.globalOptions;if(!t.hasOwnProperty("items"))throw new Error("[".concat(t,"] 请先定义 items属性"));if(ut(t,o))return e(ea,{props:this.$props,class:i({},F(ea.name),!0)});if(t.format||t["ui:widget"]||a["ui:widget"])return e(ta,{props:this.$props,class:i({},F(ta.name),!0)});var d=ct(t)?ra:Yt;return e("div",[e(d,{props:l({itemsFormData:this.itemsFormData},this.$props),class:i({},F(d.name),!0),on:{onArrayOperate:this.handleArrayOperate}}),this.needValidFieldGroup?e(Qt,{key:"validateWidget-array",class:{validateWidget:!0,"validateWidget-array":!0},props:{schema:Object.entries(this.$props.schema).reduce((function(e,r){var t=u(r,2),a=t[0],o=t[1];return"items"!==a&&(e[a]=o),e}),{}),uiSchema:a,errorSchema:this.errorSchema,curNodePath:s,rootFormData:n,globalOptions:c}}):null])}},oa={name:"SelectLinkageField",props:l(l({},Rt),{},{combiningType:{type:String,default:"anyOf"},selectList:{type:Array,require:!0}}),data:function(){return{curSelectIndex:this.computedCurSelectIndexByFormData(Hr(this.rootFormData,this.curNodePath))}},methods:{computedCurSelectIndexByFormData:function(e){var r=St(e,this.selectList,this.rootSchema,!0);return 0!==r?r:this.curSelectIndex||0},getSelectBoxVNode:function(){var e=this,r=at({schema:this.schema["".concat(this.combiningType,"Select")]||{},uiSchema:this.uiSchema["".concat(this.combiningType,"Select")]||{},curNodePath:this.curNodePath,rootFormData:this.rootFormData},(function(){return{widget:"SelectWidget"}}));if(r.label=r.label||this.schema.title,r.description=r.description||this.schema.description,!r.uiProps.enumOptions){var t=this.uiSchema[this.combiningType]||[];r.uiProps.enumOptions=this.selectList.map((function(e,r){return{label:tt({schema:e,uiSchema:t[r],containsSpec:!1}).title||"选项 ".concat(r+1),value:r}}))}return this.$createElement(Qt,{key:"fieldSelect_".concat(this.combiningType),class:i({},"fieldSelect_".concat(this.combiningType),!0),props:l({isFormData:!1,curValue:this.curSelectIndex,globalOptions:this.globalOptions},r),on:{onChange:function(r){e.curSelectIndex=r}}})}},watch:{curSelectIndex:function(e,r){var t=Hr(this.rootFormData,this.curNodePath),a=_t(this.selectList[e],void 0,this.rootSchema),o=Object.prototype.hasOwnProperty;if(f(t)){var i=Vr(this.selectList[r],this.rootSchema);if("object"===y(i))for(var n in i.properties)o.call(i.properties,n)&&!o.call(a,n)&&Br(t,n)}f(a)?Object.entries(a).forEach((function(e){var r=u(e,2),a=r[0],o=r[1];void 0!==o&&Qr(t,a,o)})):Qr(this.rootFormData,this.curNodePath,a||t)}},render:function(e){var r,t=this,a=this.$props.curNodePath,o=Mr(a),n=null;if(("object"===this.schema.type||this.schema.properties)&&!function(e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!1;return!0}(this.schema.properties)){var s,u=Object.assign({},this.schema);delete u[this.combiningType],n=e(na,{key:"origin_".concat(this.combiningType),class:(s={},i(s,"".concat(this.combiningType,"_originBox"),!0),i(s,"".concat(o,"-originBox"),!0),s),props:l(l({},this.$props),{},{schema:u})})}var d=[this.getSelectBoxVNode()],p=this.selectList[this.curSelectIndex];if(p){var h=this.schema,f=this.combiningType,v="".concat(this.combiningType,"Select");h.properties,h[f],h[v];var g=c(h,["properties",f,v].map(m));p=Object.assign({},g,p);var y=S(tt({schema:this.schema,uiSchema:this.uiSchema,containsSpec:!1,curNodePath:a,rootFormData:this.rootFormData}),(function(e){return e===t.combiningType?void 0:"ui:".concat(e)})),b=S(ot({schema:this.schema,uiSchema:this.uiSchema,errorSchema:this.errorSchema}),(function(e){return e===t.combiningType?void 0:"err:".concat(e)}));d.push(e(na,{key:"appendSchema_".concat(this.combiningType),props:l(l({},this.$props),{},{schema:l({"ui:showTitle":!1,"ui:showDescription":!1},p),required:this.required,uiSchema:l(l({},y),(this.uiSchema[this.combiningType]||[])[this.curSelectIndex]),errorSchema:l(l({},b),(this.errorSchema[this.combiningType]||[])[this.curSelectIndex])})}))}return d.push(e(Qt,{key:"validateWidget-".concat(this.combiningType),class:i({validateWidget:!0},"validateWidget-".concat(this.combiningType),!0),props:{schema:this.schema,uiSchema:this.uiSchema,errorSchema:this.errorSchema,curNodePath:this.curNodePath,rootFormData:this.rootFormData,globalOptions:this.globalOptions}})),e("div",[n,e("div",{key:"appendBox_".concat(this.combiningType),class:(r={appendCombining_box:!0},i(r,"".concat(this.combiningType,"_appendBox"),!0),i(r,"".concat(o,"-appendBox"),!0),r)},d)])}},ia={array:aa,boolean:Zt,integer:Jt,number:Gt,object:Ht,string:Kt,null:{render:function(){return null}},anyOf:{name:"AnyOfField",functional:!0,render:function(e,r){var t=r.data,a=t.props,o=c(t,["props"]);return e(oa,l(l({},o),{},{props:l(l({},a),{},{combiningType:"anyOf",selectList:a.schema.anyOf})}),r.children)}},oneOf:{name:"oneOfField",functional:!0,render:function(e,r){var t=r.data,a=t.props,o=c(t,["props"]);return e(oa,l(l({},o),{},{props:l(l({},a),{},{combiningType:"oneOf",selectList:a.schema.oneOf})}),r.children)}}},na={name:"SchemaField",props:Rt,functional:!0,render:function(e,r){var t,a=r.props,o=a.rootSchema,n=Vr(a.schema,o),s=l(l({},a),{},{schema:n});if(0===Object.keys(n).length)return null;var c,u,d=et(ia,s),p=d.field,h=d.fieldProps,m=Yr({schema:n,uiSchema:a.uiSchema,curNodePath:a.curNodePath,rootFormData:a.rootFormData}),f=Mr(a.curNodePath);return n.anyOf&&n.anyOf.length>0&&!lt(n)?e(ia.anyOf,{class:(c={},i(c,"".concat(f,"-anyOf"),!0),i(c,"fieldItem",!0),i(c,"anyOfField",!0),c),props:s}):n.oneOf&&n.oneOf.length>0&&!lt(n)?e(ia.oneOf,{class:(u={},i(u,"".concat(f,"-oneOf"),!0),i(u,"fieldItem",!0),i(u,"oneOfField",!0),u),props:s}):p&&!m?e(p,{props:l(l({},s),{},{fieldProps:h}),class:l(l({},r.data.class),{},(t={},i(t,F(p.name)||p,!0),i(t,"hiddenWidget",m),i(t,"fieldItem",!0),i(t,f,!0),t))}):null}};var sa={name:"CheckboxesWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}},la=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("el-checkbox-group",e._g(e._b({},"el-checkbox-group",e.$attrs,!1),e.$listeners),e._l(e.enumOptions,(function(r,a){return t("el-checkbox",{key:a,attrs:{label:r.value}},[e._v("\n "+e._s(r.label)+"\n ")])})),1)};la._withStripped=!0;var ca=jt({render:la,staticRenderFns:[]},void 0,sa,void 0,!1,void 0,!1,void 0,void 0,void 0),ua={name:"RadioWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}},da=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("el-radio-group",e._g(e._b({},"el-radio-group",e.$attrs,!1),e.$listeners),e._l(e.enumOptions,(function(r,a){return t("el-radio",{key:a,attrs:{label:r.value}},[e._v("\n "+e._s(r.label)+"\n ")])})),1)};da._withStripped=!0;var pa=jt({render:da,staticRenderFns:[]},void 0,ua,void 0,!1,void 0,!1,void 0,void 0,void 0),ha={name:"SelectWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}},ma=function(){var e=this.$createElement,r=this._self._c||e;return r("el-select",this._g(this._b({},"el-select",this.$attrs,!1),this.$listeners),this._l(this.enumOptions,(function(e,t){return r("el-option",{key:t,attrs:{label:e.label,value:e.value}})})),1)};ma._withStripped=!0;var fa={CheckboxesWidget:ca,RadioWidget:pa,SelectWidget:jt({render:ma,staticRenderFns:[]},void 0,ha,void 0,!1,void 0,!1,void 0,void 0,void 0),TimePickerWidget:{name:"TimePickerWidget",functional:!0,render:function(e,r){r.data.attrs=l({"value-format":"HH:mm:ss"},r.data.attrs||{});var t=r.data.on.input;return r.data.on=l(l({},r.data.on),{},{input:function(e){t.apply(r.data.on,[null===e?void 0:e])}}),e("el-time-picker",r.data,r.children)}},DatePickerWidget:{name:"DatePickerWidget",functional:!0,render:function(e,r){var t=r.data.attrs||{},a=t.isNumberValue,o=t.isRange,i=c(t,["isNumberValue","isRange"]);r.data.attrs=l({type:o?"daterange":"date","value-format":a?"timestamp":"yyyy-MM-dd"},i);var n=r.data.on.input;return r.data.on=l(l({},r.data.on),{},{input:function(e){var t=null===e?o?[]:void 0:e;n.apply(r.data.on,[t])}}),e("el-date-picker",r.data,r.children)}},DateTimePickerWidget:{name:"DateTimePickerWidget",functional:!0,render:function(e,r){var t=r.data.attrs||{},a=t.isNumberValue,o=t.isRange,i=c(t,["isNumberValue","isRange"]);r.data.attrs=l({type:o?"datetimerange":"datetime"},i);var n=r.data.on.input;return r.data.on=l(l({},r.data.on),{},{input:function(e){var t;t=o?null===e?[]:e.map((function(e){return new Date(e)[a?"valueOf":"toISOString"]()})):null===e?void 0:new Date(e)[a?"valueOf":"toISOString"](),n.apply(r.data.on,[t])}}),e("el-date-picker",r.data,r.children)}},UploadWidget:{name:"UploadWidget",props:{value:{default:null,type:[String,Array]},responseFileUrl:{default:function(e){return e?e.url||e.data&&e.data.url:""},type:[Function]},btnText:{type:String,default:"点击上传"},slots:{type:null,default:null}},data:function(){var e=this.value,r=Array.isArray(e),t=this.$attrs.fileList||(r?e.map((function(e,r){return{name:"已上传文件(".concat(r+1,")"),url:e}})):e?[{name:"已上传文件",url:e}]:[]);return{isArrayValue:r,fileList:t}},methods:{getUrl:function(e){return e&&(e.response&&this.responseFileUrl(e.response)||e.url)||""},emitValue:function(e){var r,t=this;if(this.isArrayValue)r=e.length?e.reduce((function(e,r){var a=t.getUrl(r);return a&&e.push(a),e}),[]):[];else{var a=e[e.length-1];r=this.getUrl(a)}this.$emit("input",r)}},render:function(){var e=this,r=this.$createElement,t=this.$attrs,a=this.$props.slots,o={attrs:l(l({fileList:this.fileList,"on-exceed":function(){e.$message&&e.$message.warning("超出文件上传数")},"on-error":function(){e.$message&&e.$message.error("文件上传失败")},"on-preview":function(r){var t=e.getUrl(r);t&&function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_blank",t=document.createElement("a");t.style.display="none",t.target=r,t.href=e,document.body.appendChild(t),t.click(),document.body.removeChild(t)}(t)}},t),{},{"on-remove":function(r,a){e.emitValue(a),t["on-remove"]&&t["on-remove"](r,a)},"on-success":function(r,a,o){e.emitValue(o),t["on-success"]&&t["on-success"](r,a,o)}})};this.isArrayValue||(o.attrs.limit=1);var i=[];return a&&a.default?i.push(r("template",{slot:"default"},["function"==typeof a.default?a.default(r):a.default])):i.push(r("el-button",{props:{type:"primary"}},[this.btnText])),a&&a.tip&&i.push(r("template",{slot:"tip"},["function"==typeof a.tip?a.tip(r):a.tip])),r("el-upload",o,i)}}},va={types:{boolean:"el-switch",string:"el-input",number:"el-input-number",integer:"el-input-number"},formats:{color:"el-color-picker",time:fa.TimePickerWidget,date:fa.DatePickerWidget,"date-time":fa.DateTimePickerWidget},common:{select:fa.SelectWidget,radioGroup:fa.RadioWidget,checkboxGroup:fa.CheckboxesWidget},widgetComponents:fa};Dt(".genFromComponent.el-form--label-top .el-form-item__label{line-height:26px;padding-bottom:6px;font-size:14px}.genFromComponent .el-checkbox,.genFromComponent .el-color-picker{vertical-align:top}");var ga=Object.freeze({WIDGET_MAP:Object.freeze(va),COMPONENT_MAP:Object.freeze({form:"el-form",formItem:"el-form-item",button:"el-button",popover:"el-popover"}),HELPERS:{isMiniDes:function(e){return e&&["left","right"].includes(e.labelPosition)}}}),ya=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.WIDGET_MAP.widgetComponents&&Object.entries(e.WIDGET_MAP.widgetComponents).forEach((function(e){var r=u(e,2),t=r[0],o=r[1];return a.default.component(t,o)})),{name:"VueForm",props:$t,provide:function(){return{genFormProvide:this.genFormProvide}},data:function(){var e=_t(this.$props.schema,this.$props.value,this.$props.schema);return this.emitFormDataChange(e,this.value),{formData:e}},computed:{genFormProvide:function(){return{fallbackLabel:this.fallbackLabel}},footerParams:function(){return l({show:!0,okBtn:"保存",cancelBtn:"取消"},this.formFooter)}},watch:{formData:{handler:function(e,r){this.emitFormDataChange(e,r)},deep:!0},schema:function(e,r){this.willReceiveProps(e,r)},value:function(e,r){this.willReceiveProps(e,r)}},methods:{emitFormDataChange:function(e,r){this.$emit("input",e),this.$emit("on-change",{newValue:e,oldValue:r})},willReceiveProps:function(e,r){if(!b(e,r)){var t=_t(this.$props.schema,this.$props.value,this.$props.schema);b(this.formData,t)||(this.formData=t)}}},mounted:function(){this.$emit("on-form-mounted",this.$refs.genEditForm)},render:function(r){var t,a=this,o=this.$scopedSlots.default?this.$scopedSlots.default({formData:a.formData,formRefFn:function(){return a.$refs.genEditForm}}):this.footerParams.show?r(kt,{props:{globalOptions:e,okBtn:a.footerParams.okBtn,cancelBtn:a.footerParams.cancelBtn,formItemAttrs:a.footerParams.formItemAttrs},on:{onCancel:function(){a.$emit("on-cancel")},onSubmit:function(){a.$refs.genEditForm.validate((function(e,r){return e?a.$emit("on-submit",a.formData):a.$emit("on-validation-failed",r)}))}}}):void 0,n=a.$props.formProps,s=n.layoutColumn,u=void 0===s?1:s,d=n.inlineFooter,p=n.inline,h=c(n,["layoutColumn","inlineFooter","inline"]),m={schema:this.schema,uiSchema:this.uiSchema,errorSchema:this.errorSchema,customFormats:this.customFormats,customRule:this.customRule,rootSchema:this.schema,rootFormData:this.formData,curNodePath:"",globalOptions:e,formProps:l({labelPosition:"top",labelSuffix:":"},h)};return r(e.COMPONENT_MAP.form,{class:(t={genFromComponent:!0,formInlineFooter:d,formInline:p},i(t,"genFromComponent_".concat(this.schema.id,"Form"),!!this.schema.id),i(t,"layoutColumn",!p),i(t,"layoutColumn-".concat(u),!p),t),ref:"genEditForm",props:l({model:a.formData},m.formProps)},[r(na,{props:m}),o])}}}(ga);"undefined"!=typeof window&&window.Vue&&window.Vue.component("VueForm",ya),e.SchemaField=na,e.default=ya,e.fieldProps=Rt,e.formUtils=mt,e.getDefaultFormState=_t,e.globalOptions=ga,e.i18n=Cr,e.schemaValidate=Ft,e.vueUtils=Gr,Object.defineProperty(e,"__esModule",{value:!0})})); +!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var a=r.length-1,o=1;o<a;++o)r[o]=r[o].slice(1,-1);return r[a]=r[a].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function a(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function i(e){var a=r("[0-9]","[A-Fa-f]"),o=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),i="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",n=r("[\\:\\/\\?\\#\\[\\]\\@]",i),s=e?"[\\uE000-\\uF8FF]":"[]",l=r("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t("[A-Za-z]"+r("[A-Za-z]","[0-9]","[\\+\\-\\.]")+"*"),t(t(o+"|"+r(l,i,"[\\:]"))+"*");var c=t(t("25[0-5]")+"|"+t("2[0-4][0-9]")+"|"+t("1[0-9][0-9]")+"|"+t("0?[1-9][0-9]")+"|0?0?[0-9]"),u=t(c+"\\."+c+"\\."+c+"\\."+c),d=t(a+"{1,4}"),p=t(t(d+"\\:"+d)+"|"+u),h=t(t(d+"\\:")+"{6}"+p),m=t("\\:\\:"+t(d+"\\:")+"{5}"+p),f=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+p),v=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+p),g=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+p),y=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+p),b=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+p),P=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),w=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),E=t([h,m,f,v,g,y,b,P,w].join("|")),S=t(t(l+"|"+o)+"+");t("[vV]"+a+"+\\."+r(l,i,"[\\:]")+"+"),t(t(o+"|"+r(l,i))+"*");var F=t(o+"|"+r(l,i,"[\\:\\@]"));return t(t(o+"|"+r(l,i,"[\\@]"))+"+"),t(t(F+"|"+r("[\\/\\?]",s))+"*"),{NOT_SCHEME:new RegExp(r("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,i),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,i),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,i),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,i),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,i,"[\\:\\@\\/\\?]",s),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,i,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,i),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,n),"g"),PCT_ENCODED:new RegExp(o,"g"),IPV4ADDRESS:new RegExp("^("+u+")$"),IPV6ADDRESS:new RegExp("^\\[?("+E+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+S+")")+"?\\]?$")}}var n=i(!1),s=i(!0),l=function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,r){var t=[],a=!0,o=!1,i=void 0;try{for(var n,s=e[Symbol.iterator]();!(a=(n=s.next()).done)&&(t.push(n.value),!r||t.length!==r);a=!0);}catch(e){o=!0,i=e}finally{try{!a&&s.return&&s.return()}finally{if(o)throw i}}return t}(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=2147483647,u=/^xn--/,d=/[^\0-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,f=String.fromCharCode;function v(e){throw new RangeError(h[e])}function g(e,r){var t=e.split("@"),a="";t.length>1&&(a=t[0]+"@",e=t[1]);var o=function(e,r){for(var t=[],a=e.length;a--;)t[a]=r(e[a]);return t}((e=e.replace(p,".")).split("."),r).join(".");return a+o}function y(e){for(var r=[],t=0,a=e.length;t<a;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<a){var i=e.charCodeAt(t++);56320==(64512&i)?r.push(((1023&o)<<10)+(1023&i)+65536):(r.push(o),t--)}else r.push(o)}return r}var b=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},P=function(e,r,t){var a=0;for(e=t?m(e/700):e>>1,e+=m(e/r);e>455;a+=36)e=m(e/35);return m(a+36*e/(e+38))},w=function(e){var r,t=[],a=e.length,o=0,i=128,n=72,s=e.lastIndexOf("-");s<0&&(s=0);for(var l=0;l<s;++l)e.charCodeAt(l)>=128&&v("not-basic"),t.push(e.charCodeAt(l));for(var u=s>0?s+1:0;u<a;){for(var d=o,p=1,h=36;;h+=36){u>=a&&v("invalid-input");var f=(r=e.charCodeAt(u++))-48<10?r-22:r-65<26?r-65:r-97<26?r-97:36;(f>=36||f>m((c-o)/p))&&v("overflow"),o+=f*p;var g=h<=n?1:h>=n+26?26:h-n;if(f<g)break;var y=36-g;p>m(c/y)&&v("overflow"),p*=y}var b=t.length+1;n=P(o-d,b,0==d),m(o/b)>c-i&&v("overflow"),i+=m(o/b),o%=b,t.splice(o++,0,i)}return String.fromCodePoint.apply(String,t)},E=function(e){var r=[],t=(e=y(e)).length,a=128,o=0,i=72,n=!0,s=!1,l=void 0;try{for(var u,d=e[Symbol.iterator]();!(n=(u=d.next()).done);n=!0){var p=u.value;p<128&&r.push(f(p))}}catch(e){s=!0,l=e}finally{try{!n&&d.return&&d.return()}finally{if(s)throw l}}var h=r.length,g=h;for(h&&r.push("-");g<t;){var w=c,E=!0,S=!1,F=void 0;try{for(var x,O=e[Symbol.iterator]();!(E=(x=O.next()).done);E=!0){var _=x.value;_>=a&&_<w&&(w=_)}}catch(e){S=!0,F=e}finally{try{!E&&O.return&&O.return()}finally{if(S)throw F}}var D=g+1;w-a>m((c-o)/D)&&v("overflow"),o+=(w-a)*D,a=w;var $=!0,k=!1,j=void 0;try{for(var I,A=e[Symbol.iterator]();!($=(I=A.next()).done);$=!0){var C=I.value;if(C<a&&++o>c&&v("overflow"),C==a){for(var R=o,N=36;;N+=36){var L=N<=i?1:N>=i+26?26:N-i;if(R<L)break;var T=R-L,z=36-L;r.push(f(b(L+T%z,0))),R=m(T/z)}r.push(f(b(R,0))),i=P(o,D,g==h),o=0,++g}}}catch(e){k=!0,j=e}finally{try{!$&&A.return&&A.return()}finally{if(k)throw j}}++o,++a}return r.join("")},S=function(e){return g(e,(function(e){return d.test(e)?"xn--"+E(e):e}))},F=function(e){return g(e,(function(e){return u.test(e)?w(e.slice(4).toLowerCase()):e}))},x={};function O(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function _(e){for(var r="",t=0,a=e.length;t<a;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(a-t>=6){var i=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&i)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(a-t>=9){var n=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&n)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function D(e,r){function t(e){var t=_(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,O).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,O).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,O).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,O).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,O).replace(r.PCT_ENCODED,o)),e}function $(e){return e.replace(/^0*(.*)/,"$1")||"0"}function k(e,r){var t=e.match(r.IPV4ADDRESS)||[],a=l(t,2)[1];return a?a.split(".").map($).join("."):e}function j(e,r){var t=e.match(r.IPV6ADDRESS)||[],a=l(t,3),o=a[1],i=a[2];if(o){for(var n=o.toLowerCase().split("::").reverse(),s=l(n,2),c=s[0],u=s[1],d=u?u.split(":").map($):[],p=c.split(":").map($),h=r.IPV4ADDRESS.test(p[p.length-1]),m=h?7:8,f=p.length-m,v=Array(m),g=0;g<m;++g)v[g]=d[g]||p[f+g]||"";h&&(v[m-1]=k(v[m-1],r));var y=v.reduce((function(e,r,t){if(!r||"0"===r){var a=e[e.length-1];a&&a.index+a.length===t?a.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(y&&y.length>1){var P=v.slice(0,y.index),w=v.slice(y.index+y.length);b=P.join(":")+"::"+w.join(":")}else b=v.join(":");return i&&(b+="%"+i),b}return e}var I=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,A=void 0==="".match(/(){0}/)[1];function C(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},a=!1!==r.iri?s:n;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(I);if(o){A?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=j(k(t.host,a),a)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var i=x[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||i&&i.unicodeSupport)D(t,a);else{if(t.host&&(r.domainHost||i&&i.domainHost))try{t.host=S(t.host.replace(a.PCT_ENCODED,_).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}D(t,n)}i&&i.parse&&i.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function R(e,r){var t=!1!==r.iri?s:n,a=[];return void 0!==e.userinfo&&(a.push(e.userinfo),a.push("@")),void 0!==e.host&&a.push(j(k(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(a.push(":"),a.push(String(e.port))),a.length?a.join(""):void 0}var N=/^\.\.?\//,L=/^\/\.(\/|$)/,T=/^\/\.\.(\/|$)/,z=/^\/?(?:.|\n)*?(?=\/|$)/;function q(e){for(var r=[];e.length;)if(e.match(N))e=e.replace(N,"");else if(e.match(L))e=e.replace(L,"/");else if(e.match(T))e=e.replace(T,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(z);if(!t)throw new Error("Unexpected dot segment condition");var a=t[0];e=e.slice(a.length),r.push(a)}return r.join("")}function V(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?s:n,a=[],o=x[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?F(e.host):S(e.host.replace(t.PCT_ENCODED,_).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}D(e,t),"suffix"!==r.reference&&e.scheme&&(a.push(e.scheme),a.push(":"));var i=R(e,r);if(void 0!==i&&("suffix"!==r.reference&&a.push("//"),a.push(i),e.path&&"/"!==e.path.charAt(0)&&a.push("/")),void 0!==e.path){var l=e.path;r.absolutePath||o&&o.absolutePath||(l=q(l)),void 0===i&&(l=l.replace(/^\/\//,"/%2F")),a.push(l)}return void 0!==e.query&&(a.push("?"),a.push(e.query)),void 0!==e.fragment&&(a.push("#"),a.push(e.fragment)),a.join("")}function M(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],o={};return a||(e=C(V(e,t),t),r=C(V(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=q(r.path||""),o.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=q(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=q(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=q(o.path)),o.query=r.query):(o.path=e.path,void 0!==r.query?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function U(e,r){return e&&e.toString().replace(r&&r.iri?s.PCT_ENCODED:n.PCT_ENCODED,_)}var W={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},B={scheme:"https",domainHost:W.domainHost,parse:W.parse,serialize:W.serialize};function Q(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var H={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=Q(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(Q(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),a=l(t,2),o=a[0],i=a[1];e.path=o&&"/"!==o?o:void 0,e.query=i,e.resourceName=void 0}return e.fragment=void 0,e}},K={scheme:"wss",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize},G={},J="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Z="[0-9A-Fa-f]",X=t(t("%[EFef]"+Z+"%"+Z+Z+"%"+Z+Z)+"|"+t("%[89A-Fa-f]"+Z+"%"+Z+Z)+"|"+t("%"+Z+Z)),Y=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),ee=new RegExp(J,"g"),re=new RegExp(X,"g"),te=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',Y),"g"),ae=new RegExp(r("[^]",J,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),oe=ae;function ie(e){var r=_(e);return r.match(ee)?r:e}var ne={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,i={},n=t.query.split("&"),s=0,l=n.length;s<l;++s){var c=n[s].split("=");switch(c[0]){case"to":for(var u=c[1].split(","),d=0,p=u.length;d<p;++d)a.push(u[d]);break;case"subject":t.subject=U(c[1],r);break;case"body":t.body=U(c[1],r);break;default:o=!0,i[U(c[0],r)]=U(c[1],r)}}o&&(t.headers=i)}t.query=void 0;for(var h=0,m=a.length;h<m;++h){var f=a[h].split("@");if(f[0]=U(f[0]),r.unicodeSupport)f[1]=U(f[1],r).toLowerCase();else try{f[1]=S(U(f[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}a[h]=f.join("@")}return t},serialize:function(e,r){var t,a=e,i=null!=(t=e.to)?t instanceof Array?t:"number"!=typeof t.length||t.split||t.setInterval||t.call?[t]:Array.prototype.slice.call(t):[];if(i){for(var n=0,s=i.length;n<s;++n){var l=String(i[n]),c=l.lastIndexOf("@"),u=l.slice(0,c).replace(re,ie).replace(re,o).replace(te,O),d=l.slice(c+1);try{d=r.iri?F(d):S(U(d,r).toLowerCase())}catch(e){a.error=a.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}i[n]=u+"@"+d}a.path=i.join(",")}var p=e.headers=e.headers||{};e.subject&&(p.subject=e.subject),e.body&&(p.body=e.body);var h=[];for(var m in p)p[m]!==G[m]&&h.push(m.replace(re,ie).replace(re,o).replace(ae,O)+"="+p[m].replace(re,ie).replace(re,o).replace(oe,O));return h.length&&(a.query=h.join("&")),a}},se=/^([^\:]+)\:(.*)/,le={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(se),a=e;if(t){var o=r.scheme||a.scheme||"urn",i=t[1].toLowerCase(),n=t[2],s=o+":"+(r.nid||i),l=x[s];a.nid=i,a.nss=n,a.path=void 0,l&&(a=l.parse(a,r))}else a.error=a.error||"URN can not be parsed.";return a},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",a=e.nid,o=t+":"+(r.nid||a),i=x[o];i&&(e=i.serialize(e,r));var n=e,s=e.nss;return n.path=(a||r.nid)+":"+s,n}},ce=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ue={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match(ce)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};x[W.scheme]=W,x[B.scheme]=B,x[H.scheme]=H,x[K.scheme]=K,x[ne.scheme]=ne,x[le.scheme]=le,x[ue.scheme]=ue,e.SCHEMES=x,e.pctEncChar=O,e.pctDecChars=_,e.parse=C,e.removeDotSegments=q,e.serialize=V,e.resolveComponents=M,e.resolve=function(e,r,t){var a=function(e,r){var t=e;if(r)for(var a in r)t[a]=r[a];return t}({scheme:"null"},t);return V(M(C(e,a),C(r,a),a,!0),a)},e.normalize=function(e,r){return"string"==typeof e?e=V(C(e,r),r):"object"===a(e)&&(e=C(V(e,r),r)),e},e.equal=function(e,r,t){return"string"==typeof e?e=V(C(e,t),t):"object"===a(e)&&(e=V(e,t)),"string"==typeof r?r=V(C(r,t),t):"object"===a(r)&&(r=V(r,t)),e===r},e.escapeComponent=function(e,r){return e&&e.toString().replace(r&&r.iri?s.ESCAPE:n.ESCAPE,O)},e.unescapeComponent=U,Object.defineProperty(e,"__esModule",{value:!0})}(r)}));(k=j)&&k.__esModule&&Object.prototype.hasOwnProperty.call(k,"default")&&k.default;var I=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 a,o,i;if(Array.isArray(r)){if((a=r.length)!=t.length)return!1;for(o=a;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((a=(i=Object.keys(r)).length)!==Object.keys(t).length)return!1;for(o=a;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,i[o]))return!1;for(o=a;0!=o--;){var n=i[o];if(!e(r[n],t[n]))return!1}return!0}return r!=r&&t!=t},A={copy:function(e,r){for(var t in r=r||{},e)r[t]=e[t];return r},checkDataType:C,checkDataTypes:function(e,r,t){switch(e.length){case 1:return C(e[0],r,t,!0);default:var a="",o=N(e);for(var i in o.array&&o.object&&(a=o.null?"(":"(!"+r+" || ",a+="typeof "+r+' !== "object")',delete o.null,delete o.array,delete o.object),o.number&&delete o.integer,o)a+=(a?" && ":"")+C(i,r,t,!0);return a}},coerceToTypes:function(e,r){if(Array.isArray(r)){for(var t=[],a=0;a<r.length;a++){var o=r[a];(R[o]||"array"===e&&"array"===o)&&(t[t.length]=o)}if(t.length)return t}else{if(R[r])return[r];if("array"===e&&"array"===r)return["array"]}},toHash:N,getProperty:z,escapeQuotes:q,equal:I,ucs2length:function(e){for(var r,t=0,a=e.length,o=0;o<a;)t++,(r=e.charCodeAt(o++))>=55296&&r<=56319&&o<a&&56320==(64512&(r=e.charCodeAt(o)))&&o++;return t},varOccurences:function(e,r){r+="[^0-9]";var t=e.match(new RegExp(r,"g"));return t?t.length:0},varReplace:function(e,r,t){return r+="([^0-9])",t=t.replace(/\$/g,"$$$$"),e.replace(new RegExp(r,"g"),t+"$1")},schemaHasRules:function(e,r){if("boolean"==typeof e)return!e;for(var t in e)if(r[t])return!0},schemaHasRulesExcept:function(e,r,t){if("boolean"==typeof e)return!e&&"not"!=t;for(var a in e)if(a!=t&&r[a])return!0},schemaUnknownRules:function(e,r){if("boolean"==typeof e)return;for(var t in e)if(!r[t])return t},toQuotedString:V,getPathExpr:function(e,r,t,a){return W(e,t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'")},getPath:function(e,r,t){var a=V(t?"/"+B(r):z(r));return W(e,a)},getData:function(e,r,t){var a,o,i,n;if(""===e)return"rootData";if("/"==e[0]){if(!M.test(e))throw new Error("Invalid JSON-pointer: "+e);o=e,i="rootData"}else{if(!(n=e.match(U)))throw new Error("Invalid JSON-pointer: "+e);if(a=+n[1],"#"==(o=n[2])){if(a>=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(i="data"+(r-a||""),!o)return i}for(var s=i,l=o.split("/"),c=0;c<l.length;c++){var u=l[c];u&&(i+=z(Q(u)),s+=" && "+i)}return s},unescapeFragment:function(e){return Q(decodeURIComponent(e))},unescapeJsonPointer:Q,escapeFragment:function(e){return encodeURIComponent(B(e))},escapeJsonPointer:B};function C(e,r,t,a){var o=a?" !== ":" === ",i=a?" || ":" && ",n=a?"!":"",s=a?"":"!";switch(e){case"null":return r+o+"null";case"array":return n+"Array.isArray("+r+")";case"object":return"("+n+r+i+"typeof "+r+o+'"object"'+i+s+"Array.isArray("+r+"))";case"integer":return"(typeof "+r+o+'"number"'+i+s+"("+r+" % 1)"+i+r+o+r+(t?i+n+"isFinite("+r+")":"")+")";case"number":return"(typeof "+r+o+'"'+e+'"'+(t?i+n+"isFinite("+r+")":"")+")";default:return"typeof "+r+o+'"'+e+'"'}}var R=N(["string","number","integer","boolean","null"]);function N(e){for(var r={},t=0;t<e.length;t++)r[e[t]]=!0;return r}var L=/^[a-z$_][a-z$_0-9]*$/i,T=/'|\\/g;function z(e){return"number"==typeof e?"["+e+"]":L.test(e)?"."+e:"['"+q(e)+"']"}function q(e){return e.replace(T,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function V(e){return"'"+q(e)+"'"}var M=/^\/(?:[^~]|~0|~1)*$/,U=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function W(e,r){return'""'==e?r:(e+" + "+r).replace(/([^\\])' \+ '/g,"$1")}function B(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Q(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}var H=function(e){A.copy(e,this)};var K=D((function(e){var r=e.exports=function(e,t,a){"function"==typeof t&&(a=t,t={}),function e(t,a,o,i,n,s,l,c,u,d){if(i&&"object"==typeof i&&!Array.isArray(i)){for(var p in a(i,n,s,l,c,u,d),i){var h=i[p];if(Array.isArray(h)){if(p in r.arrayKeywords)for(var m=0;m<h.length;m++)e(t,a,o,h[m],n+"/"+p+"/"+m,s,n,p,i,m)}else if(p in r.propsKeywords){if(h&&"object"==typeof h)for(var f in h)e(t,a,o,h[f],n+"/"+p+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),s,n,p,i,f)}else(p in r.keywords||t.allKeys&&!(p in r.skipKeywords))&&e(t,a,o,h,n+"/"+p,s,n,p,i)}o(i,n,s,l,c,u,d)}}(t,"function"==typeof(a=t.cb||a)?a:a.pre||function(){},a.post||function(){},e,"",e)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}})),G=J;function J(e,r,t){var a=this._refs[t];if("string"==typeof a){if(!this._refs[a])return J.call(this,e,r,a);a=this._refs[a]}if((a=a||this._schemas[t])instanceof H)return te(a.schema,this._opts.inlineRefs)?a.schema:a.validate||this._compile(a);var o,i,n,s=Z.call(this,r,t);return s&&(o=s.schema,r=s.root,n=s.baseId),o instanceof H?i=o.validate||e.call(this,o.schema,r,void 0,n):void 0!==o&&(i=te(o,this._opts.inlineRefs)?o:e.call(this,o,r,void 0,n)),i}function Z(e,r){var t=j.parse(r),a=oe(t),o=ae(this._getId(e.schema));if(0===Object.keys(e.schema).length||a!==o){var i=ne(a),n=this._refs[i];if("string"==typeof n)return X.call(this,e,n,t);if(n instanceof H)n.validate||this._compile(n),e=n;else{if(!((n=this._schemas[i])instanceof H))return;if(n.validate||this._compile(n),i==ne(r))return{schema:n,root:e,baseId:o};e=n}if(!e.schema)return;o=ae(this._getId(e.schema))}return ee.call(this,t,o,e.schema,e)}function X(e,r,t){var a=Z.call(this,e,r);if(a){var o=a.schema,i=a.baseId;e=a.root;var n=this._getId(o);return n&&(i=se(i,n)),ee.call(this,t,i,o,e)}}J.normalizeId=ne,J.fullPath=ae,J.url=se,J.ids=function(e){var r=ne(this._getId(e)),t={"":r},a={"":ae(r,!1)},o={},i=this;return K(e,{allKeys:!0},(function(e,r,n,s,l,c,u){if(""!==r){var d=i._getId(e),p=t[s],h=a[s]+"/"+l;if(void 0!==u&&(h+="/"+("number"==typeof u?u:A.escapeFragment(u))),"string"==typeof d){d=p=ne(p?j.resolve(p,d):d);var m=i._refs[d];if("string"==typeof m&&(m=i._refs[m]),m&&m.schema){if(!I(e,m.schema))throw new Error('id "'+d+'" resolves to more than one schema')}else if(d!=ne(h))if("#"==d[0]){if(o[d]&&!I(e,o[d]))throw new Error('id "'+d+'" resolves to more than one schema');o[d]=e}else i._refs[d]=h}t[r]=p,a[r]=h}})),o},J.inlineRef=te,J.schema=Z;var Y=A.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function ee(e,r,t,a){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var o=e.fragment.split("/"),i=1;i<o.length;i++){var n=o[i];if(n){if(void 0===(t=t[n=A.unescapeFragment(n)]))break;var s;if(!Y[n]&&((s=this._getId(t))&&(r=se(r,s)),t.$ref)){var l=se(r,t.$ref),c=Z.call(this,a,l);c&&(t=c.schema,a=c.root,r=c.baseId)}}}return void 0!==t&&t!==a.schema?{schema:t,root:a,baseId:r}:void 0}}var re=A.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function te(e,r){return!1!==r&&(void 0===r||!0===r?function e(r){var t;if(Array.isArray(r)){for(var a=0;a<r.length;a++)if("object"==typeof(t=r[a])&&!e(t))return!1}else for(var o in r){if("$ref"==o)return!1;if("object"==typeof(t=r[o])&&!e(t))return!1}return!0}(e):r?function e(r){var t,a=0;if(Array.isArray(r)){for(var o=0;o<r.length;o++)if("object"==typeof(t=r[o])&&(a+=e(t)),a==1/0)return 1/0}else for(var i in r){if("$ref"==i)return 1/0;if(re[i])a++;else if("object"==typeof(t=r[i])&&(a+=e(t)+1),a==1/0)return 1/0}return a}(e)<=r:void 0)}function ae(e,r){return!1!==r&&(e=ne(e)),oe(j.parse(e))}function oe(e){return j.serialize(e).split("#")[0]+"#"}var ie=/#\/?$/;function ne(e){return e?e.replace(ie,""):""}function se(e,r){return r=ne(r),j.resolve(e,r)}var le={Validation:ue((function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:ue(ce)};function ce(e,r,t){this.message=t||ce.message(e,r),this.missingRef=G.url(e,r),this.missingSchema=G.normalizeId(G.fullPath(this.missingRef))}function ue(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}ce.message=function(e,r){return"can't resolve reference "+r+" from id "+e};var de=function(e,r){r||(r={}),"function"==typeof r&&(r={cmp:r});var t,a="boolean"==typeof r.cycles&&r.cycles,o=r.cmp&&(t=r.cmp,function(e){return function(r,a){var o={key:r,value:e[r]},i={key:a,value:e[a]};return t(o,i)}}),i=[];return function e(r){if(r&&r.toJSON&&"function"==typeof r.toJSON&&(r=r.toJSON()),void 0!==r){if("number"==typeof r)return isFinite(r)?""+r:"null";if("object"!=typeof r)return JSON.stringify(r);var t,n;if(Array.isArray(r)){for(n="[",t=0;t<r.length;t++)t&&(n+=","),n+=e(r[t])||"null";return n+"]"}if(null===r)return"null";if(-1!==i.indexOf(r)){if(a)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=i.push(r)-1,l=Object.keys(r).sort(o&&o(r));for(n="",t=0;t<l.length;t++){var c=l[t],u=e(r[c]);u&&(n&&(n+=","),n+=JSON.stringify(c)+":"+u)}return i.splice(s,1),"{"+n+"}"}}(e)},pe=function(e,r,t){var a="",o=!0===e.schema.$async,i=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),n=e.self._getId(e.schema);if(e.opts.strictKeywords){var s=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(s){var l="unknown keyword: "+s;if("log"!==e.opts.strictKeywords)throw new Error(l);e.logger.warn(l)}}if(e.isTop&&(a+=" var validate = ",o&&(e.async=!0,a+="async "),a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",n&&(e.opts.sourceCode||e.opts.processCode)&&(a+=" /*# sourceURL="+n+" */ ")),"boolean"==typeof e.schema||!i&&!e.schema.$ref){var c=e.level,u=e.dataLevel,d=e.schema["false schema"],p=e.schemaPath+e.util.getProperty("false schema"),h=e.errSchemaPath+"/false schema",m=!e.opts.allErrors,f="data"+(u||""),v="valid"+c;if(!1===e.schema){e.isTop?m=!0:a+=" var "+v+" = false; ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'boolean schema is false' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";var g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?a+=o?" return data; ":" validate.errors = null; return true; ":a+=" var "+v+" = true; ";return e.isTop&&(a+=" }; return validate; "),a}if(e.isTop){var y=e.isTop;c=e.level=0,u=e.dataLevel=0,f="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var b="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}a+=" var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data; "}else{c=e.level,f="data"+((u=e.dataLevel)||"");if(n&&(e.baseId=e.resolve.url(e.baseId,n)),o&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+c+" = errors;"}v="valid"+c,m=!e.opts.allErrors;var P="",w="",E=e.schema.type,S=Array.isArray(E);if(E&&e.opts.nullable&&!0===e.schema.nullable&&(S?-1==E.indexOf("null")&&(E=E.concat("null")):"null"!=E&&(E=[E,"null"],S=!0)),S&&1==E.length&&(E=E[0],S=!1),e.schema.$ref&&i){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(i=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(a+=" "+e.RULES.all.$comment.code(e,"$comment")),E){if(e.opts.coerceTypes)var F=e.util.coerceToTypes(e.opts.coerceTypes,E);var x=e.RULES.types[E];if(F||S||!0===x||x&&!Z(x)){p=e.schemaPath+".type",h=e.errSchemaPath+"/type",p=e.schemaPath+".type",h=e.errSchemaPath+"/type";var O=S?"checkDataTypes":"checkDataType";if(a+=" if ("+e.util[O](E,f,e.opts.strictNumbers,!0)+") { ",F){var _="dataType"+c,D="coerced"+c;a+=" var "+_+" = typeof "+f+"; var "+D+" = undefined; ","array"==e.opts.coerceTypes&&(a+=" if ("+_+" == 'object' && Array.isArray("+f+") && "+f+".length == 1) { "+f+" = "+f+"[0]; "+_+" = typeof "+f+"; if ("+e.util.checkDataType(e.schema.type,f,e.opts.strictNumbers)+") "+D+" = "+f+"; } "),a+=" if ("+D+" !== undefined) ; ";var $=F;if($)for(var k,j=-1,I=$.length-1;j<I;)"string"==(k=$[j+=1])?a+=" else if ("+_+" == 'number' || "+_+" == 'boolean') "+D+" = '' + "+f+"; else if ("+f+" === null) "+D+" = ''; ":"number"==k||"integer"==k?(a+=" else if ("+_+" == 'boolean' || "+f+" === null || ("+_+" == 'string' && "+f+" && "+f+" == +"+f+" ","integer"==k&&(a+=" && !("+f+" % 1)"),a+=")) "+D+" = +"+f+"; "):"boolean"==k?a+=" else if ("+f+" === 'false' || "+f+" === 0 || "+f+" === null) "+D+" = false; else if ("+f+" === 'true' || "+f+" === 1) "+D+" = true; ":"null"==k?a+=" else if ("+f+" === '' || "+f+" === 0 || "+f+" === false) "+D+" = null; ":"array"==e.opts.coerceTypes&&"array"==k&&(a+=" else if ("+_+" == 'string' || "+_+" == 'number' || "+_+" == 'boolean' || "+f+" == null) "+D+" = ["+f+"]; ");a+=" else { ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } if ("+D+" !== undefined) { ";var A=u?"data"+(u-1||""):"parentData";a+=" "+f+" = "+D+"; ",u||(a+="if ("+A+" !== undefined)"),a+=" "+A+"["+(u?e.dataPathArr[u]:"parentDataProperty")+"] = "+D+"; } "}else{(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } "}}if(e.schema.$ref&&!i)a+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",m&&(a+=" } if (errors === ",a+=y?"0":"errs_"+c,a+=") { ",w+="}");else{var C=e.RULES;if(C)for(var R=-1,N=C.length-1;R<N;)if(Z(x=C[R+=1])){if(x.type&&(a+=" if ("+e.util.checkDataType(x.type,f,e.opts.strictNumbers)+") { "),e.opts.useDefaults)if("object"==x.type&&e.schema.properties){d=e.schema.properties;var L=Object.keys(d);if(L)for(var T,z=-1,q=L.length-1;z<q;){if(void 0!==(U=d[T=L[z+=1]]).default){var V=f+e.util.getProperty(T);if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+V;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+V+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+V+" === null || "+V+" === '' "),a+=" ) "+V+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(U.default)+" ":a+=" "+JSON.stringify(U.default)+" ",a+="; "}}}else if("array"==x.type&&Array.isArray(e.schema.items)){var M=e.schema.items;if(M){j=-1;for(var U,W=M.length-1;j<W;)if(void 0!==(U=M[j+=1]).default){V=f+"["+j+"]";if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+V;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+V+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+V+" === null || "+V+" === '' "),a+=" ) "+V+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(U.default)+" ":a+=" "+JSON.stringify(U.default)+" ",a+="; "}}}var B=x.rules;if(B)for(var Q,H=-1,K=B.length-1;H<K;)if(X(Q=B[H+=1])){var G=Q.code(e,Q.keyword,x.type);G&&(a+=" "+G+" ",m&&(P+="}"))}if(m&&(a+=" "+P+" ",P=""),x.type&&(a+=" } ",E&&E===x.type&&!F)){a+=" else { ";var J;p=e.schemaPath+".type",h=e.errSchemaPath+"/type";(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}m&&(a+=" if (errors === ",a+=y?"0":"errs_"+c,a+=") { ",w+="}")}}function Z(e){for(var r=e.rules,t=0;t<r.length;t++)if(X(r[t]))return!0}function X(r){return void 0!==e.schema[r.keyword]||r.implements&&function(r){for(var t=r.implements,a=0;a<t.length;a++)if(void 0!==e.schema[t[a]])return!0}(r)}return m&&(a+=" "+w+" "),y?(o?(a+=" if (errors === 0) return data; ",a+=" else throw new ValidationError(vErrors); "):(a+=" validate.errors = vErrors; ",a+=" return errors === 0; "),a+=" }; return validate;"):a+=" var "+v+" = errors === errs_"+c+";",a},he=A.ucs2length,me=le.Validation,fe=function e(r,t,a,o){var i=this,n=this._opts,s=[void 0],l={},c=[],u={},d=[],p={},h=[];t=t||{schema:r,refVal:s,refs:l};var m=ve.call(this,r,t,o),f=this._compilations[m.index];if(m.compiling)return f.callValidate=function e(){var r=f.validate,t=r.apply(this,arguments);return e.errors=r.errors,t};var v=this._formats,g=this.RULES;try{var y=P(r,t,a,o);f.validate=y;var b=f.callValidate;return b&&(b.schema=y.schema,b.errors=null,b.refs=y.refs,b.refVal=y.refVal,b.root=y.root,b.$async=y.$async,n.sourceCode&&(b.source=y.source)),y}finally{ge.call(this,r,t,o)}function P(r,a,o,u){var p=!a||a&&a.schema==r;if(a.schema!=t.schema)return e.call(i,r,a,o,u);var m,f=!0===r.$async,y=pe({isTop:!0,schema:r,isRoot:p,baseId:u,root:a,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:le.MissingRef,RULES:g,validate:pe,util:A,resolve:G,resolveRef:w,usePattern:F,useDefault:x,useCustomRule:O,opts:n,formats:v,logger:i.logger,self:i});y=Se(s,we)+Se(c,be)+Se(d,Pe)+Se(h,Ee)+y,n.processCode&&(y=n.processCode(y,r));try{m=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",y)(i,g,v,t,s,d,h,I,he,me),s[0]=m}catch(e){throw i.logger.error("Error compiling schema, function code:",y),e}return m.schema=r,m.errors=null,m.refs=l,m.refVal=s,m.root=p?m:a,f&&(m.$async=!0),!0===n.sourceCode&&(m.source={code:y,patterns:c,defaults:d}),m}function w(r,o,c){o=G.url(r,o);var u,d,p=l[o];if(void 0!==p)return S(u=s[p],d="refVal["+p+"]");if(!c&&t.refs){var h=t.refs[o];if(void 0!==h)return S(u=t.refVal[h],d=E(o,u))}d=E(o);var m=G.call(i,P,t,o);if(void 0===m){var f=a&&a[o];f&&(m=G.inlineRef(f,n.inlineRefs)?f:e.call(i,f,t,a,r))}if(void 0!==m)return function(e,r){var t=l[e];s[t]=r}(o,m),S(m,d);!function(e){delete l[e]}(o)}function E(e,r){var t=s.length;return s[t]=r,l[e]=t,"refVal"+t}function S(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}function F(e){var r=u[e];return void 0===r&&(r=u[e]=c.length,c[r]=e),"pattern"+r}function x(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return A.toQuotedString(e);case"object":if(null===e)return"null";var r=de(e),t=p[r];return void 0===t&&(t=p[r]=d.length,d[t]=e),"default"+t}}function O(e,r,t,a){if(!1!==i._opts.validateSchema){var o=e.definition.dependencies;if(o&&!o.every((function(e){return Object.prototype.hasOwnProperty.call(t,e)})))throw new Error("parent schema must have all required keywords: "+o.join(","));var s=e.definition.validateSchema;if(s)if(!s(r)){var l="keyword schema is invalid: "+i.errorsText(s.errors);if("log"!=i._opts.validateSchema)throw new Error(l);i.logger.error(l)}}var c,u=e.definition.compile,d=e.definition.inline,p=e.definition.macro;if(u)c=u.call(i,r,t,a);else if(p)c=p.call(i,r,t,a),!1!==n.validateSchema&&i.validateSchema(c,!0);else if(d)c=d.call(i,a,e.keyword,r,t);else if(!(c=e.definition.validate))return;if(void 0===c)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var m=h.length;return h[m]=c,{code:"customRule"+m,validate:c}}};function ve(e,r,t){var a=ye.call(this,e,r,t);return a>=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}function ge(e,r,t){var a=ye.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}function ye(e,r,t){for(var a=0;a<this._compilations.length;a++){var o=this._compilations[a];if(o.schema==e&&o.root==r&&o.baseId==t)return a}return-1}function be(e,r){return"var pattern"+e+" = new RegExp("+A.toQuotedString(r[e])+");"}function Pe(e){return"var default"+e+" = defaults["+e+"];"}function we(e,r){return void 0===r[e]?"":"var refVal"+e+" = refVal["+e+"];"}function Ee(e){return"var customRule"+e+" = customRules["+e+"];"}function Se(e,r){if(!e.length)return"";for(var t="",a=0;a<e.length;a++)t+=r(a,e);return t}var Fe=D((function(e){var r=e.exports=function(){this._cache={}};r.prototype.put=function(e,r){this._cache[e]=r},r.prototype.get=function(e){return this._cache[e]},r.prototype.del=function(e){delete this._cache[e]},r.prototype.clear=function(){this._cache={}}})),xe=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Oe=[0,31,28,31,30,31,30,31,31,30,31,30,31],_e=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,De=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,$e=/^(?:[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,ke=/^(?:(?:[^\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,je=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,Ie=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Ae=/^(?:\/(?:[^~/]|~0|~1)*)*$/,Ce=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Re=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,Ne=Le;function Le(e){return e="full"==e?"full":"fast",A.copy(Le[e])}function Te(e){var r=e.match(xe);if(!r)return!1;var t=+r[1],a=+r[2],o=+r[3];return a>=1&&a<=12&&o>=1&&o<=(2==a&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(t)?29:Oe[a])}function ze(e,r){var t=e.match(_e);if(!t)return!1;var a=t[1],o=t[2],i=t[3],n=t[5];return(a<=23&&o<=59&&i<=59||23==a&&59==o&&60==i)&&(!r||n)}Le.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":ke,url:je,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:De,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:Ue,uuid:Ie,"json-pointer":Ae,"json-pointer-uri-fragment":Ce,"relative-json-pointer":Re},Le.full={date:Te,time:ze,"date-time":function(e){var r=e.split(qe);return 2==r.length&&Te(r[0])&&ze(r[1],!0)},uri:function(e){return Ve.test(e)&&$e.test(e)},"uri-reference":/^(?:[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,"uri-template":ke,url:je,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:De,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:Ue,uuid:Ie,"json-pointer":Ae,"json-pointer-uri-fragment":Ce,"relative-json-pointer":Re};var qe=/t|\s/i;var Ve=/\/|:/;var Me=/[^\\]\\Z/;function Ue(e){if(Me.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var We=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s;var h="maximum"==r,m=h?"exclusiveMaximum":"exclusiveMinimum",f=e.schema[m],v=e.opts.$data&&f&&f.$data,g=h?"<":">",y=h?">":"<",b=void 0;if(!p&&"number"!=typeof s&&void 0!==s)throw new Error(r+" must be number");if(!v&&void 0!==f&&"number"!=typeof f&&"boolean"!=typeof f)throw new Error(m+" must be number or boolean");if(v){var P=e.util.getData(f.$data,n,e.dataPathArr),w="exclusive"+i,E="exclType"+i,S="exclIsNumber"+i,F="' + "+(_="op"+i)+" + '";o+=" var schemaExcl"+i+" = "+P+"; ",o+=" var "+w+"; var "+E+" = typeof "+(P="schemaExcl"+i)+"; if ("+E+" != 'boolean' && "+E+" != 'undefined' && "+E+" != 'number') { ";var x;b=m;(x=x||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(o+=" , message: '"+m+" should be boolean' "),e.opts.verbose&&(o+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var O=o;o=x.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+E+" == 'number' ? ( ("+w+" = "+a+" === undefined || "+P+" "+g+"= "+a+") ? "+d+" "+y+"= "+P+" : "+d+" "+y+" "+a+" ) : ( ("+w+" = "+P+" === true) ? "+d+" "+y+"= "+a+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { var op"+i+" = "+w+" ? '"+g+"' : '"+g+"='; ",void 0===s&&(b=m,c=e.errSchemaPath+"/"+m,a=P,p=v)}else{F=g;if((S="number"==typeof f)&&p){var _="'"+F+"'";o+=" if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" ( "+a+" === undefined || "+f+" "+g+"= "+a+" ? "+d+" "+y+"= "+f+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { "}else{S&&void 0===s?(w=!0,b=m,c=e.errSchemaPath+"/"+m,a=f,y+="="):(S&&(a=Math[h?"min":"max"](f,s)),f===(!S||a)?(w=!0,b=m,c=e.errSchemaPath+"/"+m,y+="="):(w=!1,F+="="));_="'"+F+"'";o+=" if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+" "+y+" "+a+" || "+d+" !== "+d+") { "}}b=b||r,(x=x||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+_+", limit: "+a+", exclusive: "+w+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be "+F+" ",o+=p?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";O=o;return o=x.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",u&&(o+=" else { "),o},Be=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+".length "+("maxItems"==r?">":"<")+" "+a+") { ";var h=r,m=m||[];m.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(h||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxItems"==r?"more":"fewer",o+=" than ",o+=p?"' + "+a+" + '":""+s,o+=" items' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=m.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},Qe=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");var h="maxLength"==r?">":"<";o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),!1===e.opts.unicode?o+=" "+d+".length ":o+=" ucs2length("+d+") ",o+=" "+h+" "+a+") { ";var m=r,f=f||[];f.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(m||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT be ",o+="maxLength"==r?"longer":"shorter",o+=" than ",o+=p?"' + "+a+" + '":""+s,o+=" characters' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var v=o;return o=f.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+v+"]); ":o+=" validate.errors = ["+v+"]; return false; ":o+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},He=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" Object.keys("+d+").length "+("maxProperties"==r?">":"<")+" "+a+") { ";var h=r,m=m||[];m.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(h||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxProperties"==r?"more":"fewer",o+=" than ",o+=p?"' + "+a+" + '":""+s,o+=" properties' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=m.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},Ke={$ref:function(e,r,t){var a,o,i=" ",n=e.level,s=e.dataLevel,l=e.schema[r],c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(s||""),p="valid"+n;if("#"==l||"#/"==l)e.isRoot?(a=e.async,o="validate"):(a=!0===e.root.schema.$async,o="root.refVal[0]");else{var h=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===h){var m=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(m),(y=y||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(i+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(i+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var f=i;i=y.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+f+"]); ":i+=" validate.errors = ["+f+"]; return false; ":i+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(i+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,l,m);e.logger.warn(m),u&&(i+=" if (true) { ")}}else if(h.inline){var v=e.util.copy(e);v.level++;var g="valid"+v.level;v.schema=h.schema,v.schemaPath="",v.errSchemaPath=l,i+=" "+e.validate(v).replace(/validate\.schema/g,h.code)+" ",u&&(i+=" if ("+g+") { ")}else a=!0===h.$async||e.async&&!1!==h.$async,o=h.code}if(o){var y;(y=y||[]).push(i),i="",e.opts.passContext?i+=" "+o+".call(this, ":i+=" "+o+"( ",i+=" "+d+", (dataPath || '')",'""'!=e.errorPath&&(i+=" + "+e.errorPath);var b=i+=" , "+(s?"data"+(s-1||""):"parentData")+" , "+(s?e.dataPathArr[s]:"parentDataProperty")+", rootData) ";if(i=y.pop(),a){if(!e.async)throw new Error("async schema referenced by sync schema");u&&(i+=" var "+p+"; "),i+=" try { await "+b+"; ",u&&(i+=" "+p+" = true; "),i+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",u&&(i+=" "+p+" = false; "),i+=" } ",u&&(i+=" if ("+p+") { ")}else i+=" if (!"+b+") { if (vErrors === null) vErrors = "+o+".errors; else vErrors = vErrors.concat("+o+".errors); errors = vErrors.length; } ",u&&(i+=" else { ")}return i},allOf:function(e,r,t){var a=" ",o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,s=!e.opts.allErrors,l=e.util.copy(e),c="";l.level++;var u="valid"+l.level,d=l.baseId,p=!0,h=o;if(h)for(var m,f=-1,v=h.length-1;f<v;)m=h[f+=1],(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0||!1===m:e.util.schemaHasRules(m,e.RULES.all))&&(p=!1,l.schema=m,l.schemaPath=i+"["+f+"]",l.errSchemaPath=n+"/"+f,a+=" "+e.validate(l)+" ",l.baseId=d,s&&(a+=" if ("+u+") { ",c+="}"));return s&&(a+=p?" if (true) { ":" "+c.slice(0,-1)+" "),a},anyOf:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e),m="";h.level++;var f="valid"+h.level;if(n.every((function(r){return e.opts.strictKeywords?"object"==typeof r&&Object.keys(r).length>0||!1===r:e.util.schemaHasRules(r,e.RULES.all)}))){var v=h.baseId;a+=" var "+p+" = errors; var "+d+" = false; ";var g=e.compositeRule;e.compositeRule=h.compositeRule=!0;var y=n;if(y)for(var b,P=-1,w=y.length-1;P<w;)b=y[P+=1],h.schema=b,h.schemaPath=s+"["+P+"]",h.errSchemaPath=l+"/"+P,a+=" "+e.validate(h)+" ",h.baseId=v,a+=" "+d+" = "+d+" || "+f+"; if (!"+d+") { ",m+="}";e.compositeRule=h.compositeRule=g,a+=" "+m+" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else c&&(a+=" if (true) { ");return a},$comment:function(e,r,t){var a=" ",o=e.schema[r],i=e.errSchemaPath+"/"+r;e.opts.allErrors;var n=e.util.toQuotedString(o);return!0===e.opts.$comment?a+=" console.log("+n+");":"function"==typeof e.opts.$comment&&(a+=" self._opts.$comment("+n+", "+e.util.toQuotedString(i)+", validate.root.schema);"),a},const:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p=e.opts.$data&&n&&n.$data;p&&(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; "),p||(a+=" var schema"+o+" = validate.schema"+s+";"),a+="var "+d+" = equal("+u+", schema"+o+"); if (!"+d+") { ";var h=h||[];h.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValue: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var m=a;return a=h.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+m+"]); ":a+=" validate.errors = ["+m+"]; return false; ":a+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",c&&(a+=" else { "),a},contains:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e);h.level++;var m="valid"+h.level,f="i"+o,v=h.dataLevel=e.dataLevel+1,g="data"+v,y=e.baseId,b=e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all);if(a+="var "+p+" = errors;var "+d+";",b){var P=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.schema=n,h.schemaPath=s,h.errSchemaPath=l,a+=" var "+m+" = false; for (var "+f+" = 0; "+f+" < "+u+".length; "+f+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers,!0);var w=u+"["+f+"]";h.dataPathArr[v]=f;var E=e.validate(h);h.baseId=y,e.util.varOccurences(E,g)<2?a+=" "+e.util.varReplace(E,g,w)+" ":a+=" var "+g+" = "+w+"; "+E+" ",a+=" if ("+m+") break; } ",e.compositeRule=h.compositeRule=P,a+=" if (!"+m+") {"}else a+=" if ("+u+".length == 0) {";var S=S||[];S.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should contain a valid item' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var F=a;return a=S.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+F+"]); ":a+=" validate.errors = ["+F+"]; return false; ":a+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",b&&(a+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a},dependencies:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e),h="";p.level++;var m="valid"+p.level,f={},v={},g=e.opts.ownProperties;for(w in n)if("__proto__"!=w){var y=n[w],b=Array.isArray(y)?v:f;b[w]=y}a+="var "+d+" = errors;";var P=e.errorPath;for(var w in a+="var missing"+o+";",v)if((b=v[w]).length){if(a+=" if ( "+u+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),c){a+=" && ( ";var E=b;if(E)for(var S=-1,F=E.length-1;S<F;){k=E[S+=1],S&&(a+=" || "),a+=" ( ( "+(C=u+(A=e.util.getProperty(k)))+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(k)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?k:A)+") ) "}a+=")) { ";var x="missing"+o,O="' + "+x+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,x,!0):P+" + "+x);var _=_||[];_.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var D=a;a=_.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+D+"]); ":a+=" validate.errors = ["+D+"]; return false; ":a+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{a+=" ) { ";var $=b;if($)for(var k,j=-1,I=$.length-1;j<I;){k=$[j+=1];var A=e.util.getProperty(k),C=(O=e.util.escapeQuotes(k),u+A);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,k,e.opts.jsonPointers)),a+=" if ( "+C+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(k)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",c&&(h+="}",a+=" else { ")}e.errorPath=P;var R=p.baseId;for(var w in f){y=f[w];(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all))&&(a+=" "+m+" = true; if ( "+u+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),a+=") { ",p.schema=y,p.schemaPath=s+e.util.getProperty(w),p.errSchemaPath=l+"/"+e.util.escapeFragment(w),a+=" "+e.validate(p)+" ",p.baseId=R,a+=" } ",c&&(a+=" if ("+m+") { ",h+="}"))}return c&&(a+=" "+h+" if ("+d+" == errors) {"),a},enum:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p=e.opts.$data&&n&&n.$data;p&&(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ");var h="i"+o,m="schema"+o;p||(a+=" var "+m+" = validate.schema"+s+";"),a+="var "+d+";",p&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=d+" = false;for (var "+h+"=0; "+h+"<"+m+".length; "+h+"++) if (equal("+u+", "+m+"["+h+"])) { "+d+" = true; break; }",p&&(a+=" } "),a+=" if (!"+d+") { ";var f=f||[];f.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var v=a;return a=f.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+v+"]); ":a+=" validate.errors = ["+v+"]; return false; ":a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",c&&(a+=" else { "),a},format:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||"");if(!1===e.opts.format)return c&&(a+=" if (true) { "),a;var d,p=e.opts.$data&&n&&n.$data;p?(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",d="schema"+o):d=n;var h=e.opts.unknownFormats,m=Array.isArray(h);if(p){a+=" var "+(f="format"+o)+" = formats["+d+"]; var "+(v="isObject"+o)+" = typeof "+f+" == 'object' && !("+f+" instanceof RegExp) && "+f+".validate; var "+(g="formatType"+o)+" = "+v+" && "+f+".type || 'string'; if ("+v+") { ",e.async&&(a+=" var async"+o+" = "+f+".async; "),a+=" "+f+" = "+f+".validate; } if ( ",p&&(a+=" ("+d+" !== undefined && typeof "+d+" != 'string') || "),a+=" (","ignore"!=h&&(a+=" ("+d+" && !"+f+" ",m&&(a+=" && self._opts.unknownFormats.indexOf("+d+") == -1 "),a+=") || "),a+=" ("+f+" && "+g+" == '"+t+"' && !(typeof "+f+" == 'function' ? ",e.async?a+=" (async"+o+" ? await "+f+"("+u+") : "+f+"("+u+")) ":a+=" "+f+"("+u+") ",a+=" : "+f+".test("+u+"))))) {"}else{var f;if(!(f=e.formats[n])){if("ignore"==h)return e.logger.warn('unknown format "'+n+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(a+=" if (true) { "),a;if(m&&h.indexOf(n)>=0)return c&&(a+=" if (true) { "),a;throw new Error('unknown format "'+n+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,g=(v="object"==typeof f&&!(f instanceof RegExp)&&f.validate)&&f.type||"string";if(v){var y=!0===f.async;f=f.validate}if(g!=t)return c&&(a+=" if (true) { "),a;if(y){if(!e.async)throw new Error("async format in sync schema");a+=" if (!(await "+(b="formats"+e.util.getProperty(n)+".validate")+"("+u+"))) { "}else{a+=" if (! ";var b="formats"+e.util.getProperty(n);v&&(b+=".validate"),a+="function"==typeof f?" "+b+"("+u+") ":" "+b+".test("+u+") ",a+=") { "}}var P=P||[];P.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",a+=p?""+d:""+e.util.toQuotedString(n),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",a+=p?"' + "+d+" + '":""+e.util.escapeQuotes(n),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=p?"validate.schema"+s:""+e.util.toQuotedString(n),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var w=a;return a=P.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",c&&(a+=" else { "),a},if:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e);h.level++;var m="valid"+h.level,f=e.schema.then,v=e.schema.else,g=void 0!==f&&(e.opts.strictKeywords?"object"==typeof f&&Object.keys(f).length>0||!1===f:e.util.schemaHasRules(f,e.RULES.all)),y=void 0!==v&&(e.opts.strictKeywords?"object"==typeof v&&Object.keys(v).length>0||!1===v:e.util.schemaHasRules(v,e.RULES.all)),b=h.baseId;if(g||y){var P;h.createErrors=!1,h.schema=n,h.schemaPath=s,h.errSchemaPath=l,a+=" var "+p+" = errors; var "+d+" = true; ";var w=e.compositeRule;e.compositeRule=h.compositeRule=!0,a+=" "+e.validate(h)+" ",h.baseId=b,h.createErrors=!0,a+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",e.compositeRule=h.compositeRule=w,g?(a+=" if ("+m+") { ",h.schema=e.schema.then,h.schemaPath=e.schemaPath+".then",h.errSchemaPath=e.errSchemaPath+"/then",a+=" "+e.validate(h)+" ",h.baseId=b,a+=" "+d+" = "+m+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'then'; ":P="'then'",a+=" } ",y&&(a+=" else { ")):a+=" if (!"+m+") { ",y&&(h.schema=e.schema.else,h.schemaPath=e.schemaPath+".else",h.errSchemaPath=e.errSchemaPath+"/else",a+=" "+e.validate(h)+" ",h.baseId=b,a+=" "+d+" = "+m+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'else'; ":P="'else'",a+=" } "),a+=" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+P+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match \"' + "+P+" + '\" schema' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",c&&(a+=" else { ")}else c&&(a+=" if (true) { ");return a},items:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e),m="";h.level++;var f="valid"+h.level,v="i"+o,g=h.dataLevel=e.dataLevel+1,y="data"+g,b=e.baseId;if(a+="var "+p+" = errors;var "+d+";",Array.isArray(n)){var P=e.schema.additionalItems;if(!1===P){a+=" "+d+" = "+u+".length <= "+n.length+"; ";var w=l;l=e.errSchemaPath+"/additionalItems",a+=" if (!"+d+") { ";var E=E||[];E.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+n.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+n.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var S=a;a=E.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",l=w,c&&(m+="}",a+=" else { ")}var F=n;if(F)for(var x,O=-1,_=F.length-1;O<_;)if(x=F[O+=1],e.opts.strictKeywords?"object"==typeof x&&Object.keys(x).length>0||!1===x:e.util.schemaHasRules(x,e.RULES.all)){a+=" "+f+" = true; if ("+u+".length > "+O+") { ";var D=u+"["+O+"]";h.schema=x,h.schemaPath=s+"["+O+"]",h.errSchemaPath=l+"/"+O,h.errorPath=e.util.getPathExpr(e.errorPath,O,e.opts.jsonPointers,!0),h.dataPathArr[g]=O;var $=e.validate(h);h.baseId=b,e.util.varOccurences($,y)<2?a+=" "+e.util.varReplace($,y,D)+" ":a+=" var "+y+" = "+D+"; "+$+" ",a+=" } ",c&&(a+=" if ("+f+") { ",m+="}")}if("object"==typeof P&&(e.opts.strictKeywords?"object"==typeof P&&Object.keys(P).length>0||!1===P:e.util.schemaHasRules(P,e.RULES.all))){h.schema=P,h.schemaPath=e.schemaPath+".additionalItems",h.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+f+" = true; if ("+u+".length > "+n.length+") { for (var "+v+" = "+n.length+"; "+v+" < "+u+".length; "+v+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=u+"["+v+"]";h.dataPathArr[g]=v;$=e.validate(h);h.baseId=b,e.util.varOccurences($,y)<2?a+=" "+e.util.varReplace($,y,D)+" ":a+=" var "+y+" = "+D+"; "+$+" ",c&&(a+=" if (!"+f+") break; "),a+=" } } ",c&&(a+=" if ("+f+") { ",m+="}")}}else if(e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all)){h.schema=n,h.schemaPath=s,h.errSchemaPath=l,a+=" for (var "+v+" = 0; "+v+" < "+u+".length; "+v+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=u+"["+v+"]";h.dataPathArr[g]=v;$=e.validate(h);h.baseId=b,e.util.varOccurences($,y)<2?a+=" "+e.util.varReplace($,y,D)+" ":a+=" var "+y+" = "+D+"; "+$+" ",c&&(a+=" if (!"+f+") break; "),a+=" }"}return c&&(a+=" "+m+" if ("+p+" == errors) {"),a},maximum:We,minimum:We,maxItems:Be,minItems:Be,maxLength:Qe,minLength:Qe,maxProperties:He,minProperties:He,multipleOf:function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");o+="var division"+i+";if (",p&&(o+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),o+=" (division"+i+" = "+d+" / "+a+", ",e.opts.multipleOfPrecision?o+=" Math.abs(Math.round(division"+i+") - division"+i+") > 1e-"+e.opts.multipleOfPrecision+" ":o+=" division"+i+" !== parseInt(division"+i+") ",o+=" ) ",p&&(o+=" ) "),o+=" ) { ";var h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be multiple of ",o+=p?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var m=o;return o=h.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},not:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level;if(e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all)){p.schema=n,p.schemaPath=s,p.errSchemaPath=l,a+=" var "+d+" = errors; ";var m,f=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.createErrors=!1,p.opts.allErrors&&(m=p.opts.allErrors,p.opts.allErrors=!1),a+=" "+e.validate(p)+" ",p.createErrors=!0,m&&(p.opts.allErrors=m),e.compositeRule=p.compositeRule=f,a+=" if ("+h+") { ";var v=v||[];v.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var g=a;a=v.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(a+=" if (false) { ");return a},oneOf:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e),m="";h.level++;var f="valid"+h.level,v=h.baseId,g="prevValid"+o,y="passingSchemas"+o;a+="var "+p+" = errors , "+g+" = false , "+d+" = false , "+y+" = null; ";var b=e.compositeRule;e.compositeRule=h.compositeRule=!0;var P=n;if(P)for(var w,E=-1,S=P.length-1;E<S;)w=P[E+=1],(e.opts.strictKeywords?"object"==typeof w&&Object.keys(w).length>0||!1===w:e.util.schemaHasRules(w,e.RULES.all))?(h.schema=w,h.schemaPath=s+"["+E+"]",h.errSchemaPath=l+"/"+E,a+=" "+e.validate(h)+" ",h.baseId=v):a+=" var "+f+" = true; ",E&&(a+=" if ("+f+" && "+g+") { "+d+" = false; "+y+" = ["+y+", "+E+"]; } else { ",m+="}"),a+=" if ("+f+") { "+d+" = "+g+" = true; "+y+" = "+E+"; }";return e.compositeRule=h.compositeRule=b,a+=m+"if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a},pattern:function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'string') || "),o+=" !"+(p?"(new RegExp("+a+"))":e.usePattern(s))+".test("+d+") ) { ";var h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { pattern: ",o+=p?""+a:""+e.util.toQuotedString(s),o+=" } ",!1!==e.opts.messages&&(o+=" , message: 'should match pattern \"",o+=p?"' + "+a+" + '":""+e.util.escapeQuotes(s),o+="\"' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+e.util.toQuotedString(s),o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var m=o;return o=h.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},properties:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e),h="";p.level++;var m="valid"+p.level,f="key"+o,v="idx"+o,g=p.dataLevel=e.dataLevel+1,y="data"+g,b="dataProperties"+o,P=Object.keys(n||{}).filter(A),w=e.schema.patternProperties||{},E=Object.keys(w).filter(A),S=e.schema.additionalProperties,F=P.length||E.length,x=!1===S,O="object"==typeof S&&Object.keys(S).length,_=e.opts.removeAdditional,D=x||O||_,$=e.opts.ownProperties,k=e.baseId,j=e.schema.required;if(j&&(!e.opts.$data||!j.$data)&&j.length<e.opts.loopRequired)var I=e.util.toHash(j);function A(e){return"__proto__"!==e}if(a+="var "+d+" = errors;var "+m+" = true;",$&&(a+=" var "+b+" = undefined;"),D){if(a+=$?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+u+") { ",F){if(a+=" var isAdditional"+o+" = !(false ",P.length)if(P.length>8)a+=" || validate.schema"+s+".hasOwnProperty("+f+") ";else{var C=P;if(C)for(var R=-1,N=C.length-1;R<N;)G=C[R+=1],a+=" || "+f+" == "+e.util.toQuotedString(G)+" "}if(E.length){var L=E;if(L)for(var T=-1,z=L.length-1;T<z;)ie=L[T+=1],a+=" || "+e.usePattern(ie)+".test("+f+") "}a+=" ); if (isAdditional"+o+") { "}if("all"==_)a+=" delete "+u+"["+f+"]; ";else{var q=e.errorPath,V="' + "+f+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers)),x)if(_)a+=" delete "+u+"["+f+"]; ";else{a+=" "+m+" = false; ";var M=l;l=e.errSchemaPath+"/additionalProperties",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { additionalProperty: '"+V+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is an invalid additional property":a+="should NOT have additional properties",a+="' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var U=a;a=te.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+U+"]); ":a+=" validate.errors = ["+U+"]; return false; ":a+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=M,c&&(a+=" break; ")}else if(O)if("failing"==_){a+=" var "+d+" = errors; ";var W=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=S,p.schemaPath=e.schemaPath+".additionalProperties",p.errSchemaPath=e.errSchemaPath+"/additionalProperties",p.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);var B=u+"["+f+"]";p.dataPathArr[g]=f;var Q=e.validate(p);p.baseId=k,e.util.varOccurences(Q,y)<2?a+=" "+e.util.varReplace(Q,y,B)+" ":a+=" var "+y+" = "+B+"; "+Q+" ",a+=" if (!"+m+") { errors = "+d+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+u+"["+f+"]; } ",e.compositeRule=p.compositeRule=W}else{p.schema=S,p.schemaPath=e.schemaPath+".additionalProperties",p.errSchemaPath=e.errSchemaPath+"/additionalProperties",p.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);B=u+"["+f+"]";p.dataPathArr[g]=f;Q=e.validate(p);p.baseId=k,e.util.varOccurences(Q,y)<2?a+=" "+e.util.varReplace(Q,y,B)+" ":a+=" var "+y+" = "+B+"; "+Q+" ",c&&(a+=" if (!"+m+") break; ")}e.errorPath=q}F&&(a+=" } "),a+=" } ",c&&(a+=" if ("+m+") { ",h+="}")}var H=e.opts.useDefaults&&!e.compositeRule;if(P.length){var K=P;if(K)for(var G,J=-1,Z=K.length-1;J<Z;){var X=n[G=K[J+=1]];if(e.opts.strictKeywords?"object"==typeof X&&Object.keys(X).length>0||!1===X:e.util.schemaHasRules(X,e.RULES.all)){var Y=e.util.getProperty(G),ee=(B=u+Y,H&&void 0!==X.default);p.schema=X,p.schemaPath=s+Y,p.errSchemaPath=l+"/"+e.util.escapeFragment(G),p.errorPath=e.util.getPath(e.errorPath,G,e.opts.jsonPointers),p.dataPathArr[g]=e.util.toQuotedString(G);Q=e.validate(p);if(p.baseId=k,e.util.varOccurences(Q,y)<2){Q=e.util.varReplace(Q,y,B);var re=B}else{re=y;a+=" var "+y+" = "+B+"; "}if(ee)a+=" "+Q+" ";else{if(I&&I[G]){a+=" if ( "+re+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+m+" = false; ";q=e.errorPath,M=l;var te,ae=e.util.escapeQuotes(G);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(q,G,e.opts.jsonPointers)),l=e.errSchemaPath+"/required",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+ae+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+ae+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";U=a;a=te.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+U+"]); ":a+=" validate.errors = ["+U+"]; return false; ":a+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=M,e.errorPath=q,a+=" } else { "}else c?(a+=" if ( "+re+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+m+" = true; } else { "):(a+=" if ("+re+" !== undefined ",$&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=" ) { ");a+=" "+Q+" } "}}c&&(a+=" if ("+m+") { ",h+="}")}}if(E.length){var oe=E;if(oe)for(var ie,ne=-1,se=oe.length-1;ne<se;){X=w[ie=oe[ne+=1]];if(e.opts.strictKeywords?"object"==typeof X&&Object.keys(X).length>0||!1===X:e.util.schemaHasRules(X,e.RULES.all)){p.schema=X,p.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(ie),p.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(ie),a+=$?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+u+") { ",a+=" if ("+e.usePattern(ie)+".test("+f+")) { ",p.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);B=u+"["+f+"]";p.dataPathArr[g]=f;Q=e.validate(p);p.baseId=k,e.util.varOccurences(Q,y)<2?a+=" "+e.util.varReplace(Q,y,B)+" ":a+=" var "+y+" = "+B+"; "+Q+" ",c&&(a+=" if (!"+m+") break; "),a+=" } ",c&&(a+=" else "+m+" = true; "),a+=" } ",c&&(a+=" if ("+m+") { ",h+="}")}}}return c&&(a+=" "+h+" if ("+d+" == errors) {"),a},propertyNames:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level;if(a+="var "+d+" = errors;",e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all)){p.schema=n,p.schemaPath=s,p.errSchemaPath=l;var m="key"+o,f="idx"+o,v="i"+o,g="' + "+m+" + '",y="data"+(p.dataLevel=e.dataLevel+1),b="dataProperties"+o,P=e.opts.ownProperties,w=e.baseId;P&&(a+=" var "+b+" = undefined; "),a+=P?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+f+"=0; "+f+"<"+b+".length; "+f+"++) { var "+m+" = "+b+"["+f+"]; ":" for (var "+m+" in "+u+") { ",a+=" var startErrs"+o+" = errors; ";var E=m,S=e.compositeRule;e.compositeRule=p.compositeRule=!0;var F=e.validate(p);p.baseId=w,e.util.varOccurences(F,y)<2?a+=" "+e.util.varReplace(F,y,E)+" ":a+=" var "+y+" = "+E+"; "+F+" ",e.compositeRule=p.compositeRule=S,a+=" if (!"+h+") { for (var "+v+"=startErrs"+o+"; "+v+"<errors; "+v+"++) { vErrors["+v+"].propertyName = "+m+"; } var err = ",!1!==e.createErrors?(a+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { propertyName: '"+g+"' } ",!1!==e.opts.messages&&(a+=" , message: 'property name \\'"+g+"\\' is invalid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),c&&(a+=" break; "),a+=" } }"}return c&&(a+=" if ("+d+" == errors) {"),a},required:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p=e.opts.$data&&n&&n.$data;p&&(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ");var h="schema"+o;if(!p)if(n.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var m=[],f=n;if(f)for(var v,g=-1,y=f.length-1;g<y;){v=f[g+=1];var b=e.schema.properties[v];b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0||!1===b:e.util.schemaHasRules(b,e.RULES.all))||(m[m.length]=v)}}else m=n;if(p||m.length){var P=e.errorPath,w=p||m.length>=e.opts.loopRequired,E=e.opts.ownProperties;if(c)if(a+=" var missing"+o+"; ",w){p||(a+=" var "+h+" = validate.schema"+s+"; ");var S="' + "+($="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,$,e.opts.jsonPointers)),a+=" var "+d+" = true; ",p&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=" for (var "+O+" = 0; "+O+" < "+h+".length; "+O+"++) { "+d+" = "+u+"["+h+"["+O+"]] !== undefined ",E&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", "+h+"["+O+"]) "),a+="; if (!"+d+") break; } ",p&&(a+=" } "),a+=" if (!"+d+") { ",(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var F=a;a=D.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+F+"]); ":a+=" validate.errors = ["+F+"]; return false; ":a+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var x=m;if(x)for(var O=-1,_=x.length-1;O<_;){j=x[O+=1],O&&(a+=" || "),a+=" ( ( "+(R=u+(C=e.util.getProperty(j)))+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(j)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?j:C)+") ) "}a+=") { ";var D;S="' + "+($="missing"+o)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,$,!0):P+" + "+$),(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";F=a;a=D.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+F+"]); ":a+=" validate.errors = ["+F+"]; return false; ":a+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(w){p||(a+=" var "+h+" = validate.schema"+s+"; ");var $;S="' + "+($="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,$,e.opts.jsonPointers)),p&&(a+=" if ("+h+" && !Array.isArray("+h+")) { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+h+" !== undefined) { "),a+=" for (var "+O+" = 0; "+O+" < "+h+".length; "+O+"++) { if ("+u+"["+h+"["+O+"]] === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", "+h+"["+O+"]) "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",p&&(a+=" } ")}else{var k=m;if(k)for(var j,I=-1,A=k.length-1;I<A;){j=k[I+=1];var C=e.util.getProperty(j),R=(S=e.util.escapeQuotes(j),u+C);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,j,e.opts.jsonPointers)),a+=" if ( "+R+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(j)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=P}else c&&(a+=" if (true) {");return a},uniqueItems:function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p="valid"+i,h=e.opts.$data&&s&&s.$data;if(h?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,(s||h)&&!1!==e.opts.uniqueItems){h&&(o+=" var "+p+"; if ("+a+" === false || "+a+" === undefined) "+p+" = true; else if (typeof "+a+" != 'boolean') "+p+" = false; else { "),o+=" var i = "+d+".length , "+p+" = true , j; if (i > 1) { ";var m=e.schema.items&&e.schema.items.type,f=Array.isArray(m);if(!m||"object"==m||"array"==m||f&&(m.indexOf("object")>=0||m.indexOf("array")>=0))o+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+d+"[i], "+d+"[j])) { "+p+" = false; break outer; } } } ";else{o+=" var itemIndices = {}, item; for (;i--;) { var item = "+d+"[i]; ";var v="checkDataType"+(f?"s":"");o+=" if ("+e.util[v](m,"item",e.opts.strictNumbers,!0)+") continue; ",f&&(o+=" if (typeof item == 'string') item = '\"' + item; "),o+=" if (typeof itemIndices[item] == 'number') { "+p+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}o+=" } ",h&&(o+=" } "),o+=" if (!"+p+") { ";var g=g||[];g.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(o+=" , schema: ",o+=h?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var y=o;o=g.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+y+"]); ":o+=" validate.errors = ["+y+"]; return false; ":o+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",u&&(o+=" else { ")}else u&&(o+=" if (true) { ");return o},validate:pe},Ge=A.toHash,Je=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"],Ze=function(e,r){for(var t=0;t<r.length;t++){e=JSON.parse(JSON.stringify(e));var a,o=r[t].split("/"),i=e;for(a=1;a<o.length;a++)i=i[o[a]];for(a=0;a<Je.length;a++){var n=Je[a],s=i[n];s&&(i[n]={anyOf:[s,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e},Xe=le.MissingRef,Ye=function e(r,t,a){var o=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof t&&(a=t,t=void 0);var i=n(r).then((function(){var e=o._addSchema(r,void 0,t);return e.validate||function e(r){try{return o._compile(r)}catch(e){if(e instanceof Xe)return a(e);throw e}function a(a){var i=a.missingSchema;if(c(i))throw new Error("Schema "+i+" is loaded but "+a.missingRef+" cannot be resolved");var s=o._loadingSchemas[i];return s||(s=o._loadingSchemas[i]=o._opts.loadSchema(i)).then(l,l),s.then((function(e){if(!c(i))return n(e).then((function(){c(i)||o.addSchema(e,i,void 0,t)}))})).then((function(){return e(r)}));function l(){delete o._loadingSchemas[i]}function c(e){return o._refs[e]||o._schemas[e]}}}(e)}));a&&i.then((function(e){a(null,e)}),a);return i;function n(r){var t=r.$schema;return t&&!o.getSchema(t)?e.call(o,{$ref:t},!0):Promise.resolve()}};var er=function(e,r,t){var a,o,i=" ",n=e.level,s=e.dataLevel,l=e.schema[r],c=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,d=!e.opts.allErrors,p="data"+(s||""),h="valid"+n,m="errs__"+n,f=e.opts.$data&&l&&l.$data;f?(i+=" var schema"+n+" = "+e.util.getData(l.$data,s,e.dataPathArr)+"; ",o="schema"+n):o=l;var v,g,y,b,P,w="definition"+n,E=this.definition,S="";if(f&&E.$data){P="keywordValidate"+n;var F=E.validateSchema;i+=" var "+w+" = RULES.custom['"+r+"'].definition; var "+P+" = "+w+".validate;"}else{if(!(b=e.useCustomRule(this,l,e.schema,e)))return;o="validate.schema"+c,P=b.code,v=E.compile,g=E.inline,y=E.macro}var x=P+".errors",O="i"+n,_="ruleErr"+n,D=E.async;if(D&&!e.async)throw new Error("async keyword in sync schema");if(g||y||(i+=x+" = null;"),i+="var "+m+" = errors;var "+h+";",f&&E.$data&&(S+="}",i+=" if ("+o+" === undefined) { "+h+" = true; } else { ",F&&(S+="}",i+=" "+h+" = "+w+".validateSchema("+o+"); if ("+h+") { ")),g)E.statements?i+=" "+b.validate+" ":i+=" "+h+" = "+b.validate+"; ";else if(y){var $=e.util.copy(e);S="";$.level++;var k="valid"+$.level;$.schema=b.validate,$.schemaPath="";var j=e.compositeRule;e.compositeRule=$.compositeRule=!0;var I=e.validate($).replace(/validate\.schema/g,P);e.compositeRule=$.compositeRule=j,i+=" "+I}else{(N=N||[]).push(i),i="",i+=" "+P+".call( ",e.opts.passContext?i+="this":i+="self",v||!1===E.schema?i+=" , "+p+" ":i+=" , "+o+" , "+p+" , validate.schema"+e.schemaPath+" ",i+=" , (dataPath || '')",'""'!=e.errorPath&&(i+=" + "+e.errorPath);var A=s?"data"+(s-1||""):"parentData",C=s?e.dataPathArr[s]:"parentDataProperty",R=i+=" , "+A+" , "+C+" , rootData ) ";i=N.pop(),!1===E.errors?(i+=" "+h+" = ",D&&(i+="await "),i+=R+"; "):i+=D?" var "+(x="customErrors"+n)+" = null; try { "+h+" = await "+R+"; } catch (e) { "+h+" = false; if (e instanceof ValidationError) "+x+" = e.errors; else throw e; } ":" "+x+" = null; "+h+" = "+R+"; "}if(E.modifying&&(i+=" if ("+A+") "+p+" = "+A+"["+C+"];"),i+=""+S,E.valid)d&&(i+=" if (true) { ");else{var N;i+=" if ( ",void 0===E.valid?(i+=" !",i+=y?""+k:""+h):i+=" "+!E.valid+" ",i+=") { ",a=this.keyword,(N=N||[]).push(i),i="",(N=N||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(i+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var L=i;i=N.pop(),!e.compositeRule&&d?e.async?i+=" throw new ValidationError(["+L+"]); ":i+=" validate.errors = ["+L+"]; return false; ":i+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var T=i;i=N.pop(),g?E.errors?"full"!=E.errors&&(i+=" for (var "+O+"="+m+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(i+=" "+_+".schema = "+o+"; "+_+".data = "+p+"; "),i+=" } "):!1===E.errors?i+=" "+T+" ":(i+=" if ("+m+" == errors) { "+T+" } else { for (var "+O+"="+m+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(i+=" "+_+".schema = "+o+"; "+_+".data = "+p+"; "),i+=" } } "):y?(i+=" var err = ",!1!==e.createErrors?(i+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(i+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&d&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; ")):!1===E.errors?i+=" "+T+" ":(i+=" if (Array.isArray("+x+")) { if (vErrors === null) vErrors = "+x+"; else vErrors = vErrors.concat("+x+"); errors = vErrors.length; for (var "+O+"="+m+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; "+_+'.schemaPath = "'+u+'"; ',e.opts.verbose&&(i+=" "+_+".schema = "+o+"; "+_+".data = "+p+"; "),i+=" } } else { "+T+" } "),i+=" } ",d&&(i+=" else { ")}return i},rr="http://json-schema.org/draft-07/schema#",tr="http://json-schema.org/draft-07/schema#",ar="Core schema meta-schema",or={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},ir=["object","boolean"],nr={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},sr={$schema:rr,$id:tr,title:ar,definitions:or,type:ir,properties:nr,default:!0},lr=$(Object.freeze({__proto__:null,$schema:rr,$id:tr,title:ar,definitions:or,type:ir,properties:nr,default:sr})),cr={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:lr.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:lr.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}},ur=/^[a-z_$][a-z0-9_$-]*$/i,dr=function(e,r){var t=this.RULES;if(t.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!ur.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(r){this.validateKeyword(r,!0);var a=r.type;if(Array.isArray(a))for(var o=0;o<a.length;o++)n(e,a[o],r);else n(e,a,r);var i=r.metaSchema;i&&(r.$data&&this._opts.$data&&(i={anyOf:[i,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),r.validateSchema=this.compile(i,!0))}function n(e,r,a){for(var o,i=0;i<t.length;i++){var n=t[i];if(n.type==r){o=n;break}}o||(o={type:r,rules:[]},t.push(o));var s={keyword:e,definition:a,custom:!0,code:er,implements:a.implements};o.rules.push(s),t.custom[e]=s}return t.keywords[e]=t.all[e]=!0,this},pr=function(e){var r=this.RULES.custom[e];return r?r.definition:this.RULES.keywords[e]||!1},hr=function(e){var r=this.RULES;delete r.keywords[e],delete r.all[e],delete r.custom[e];for(var t=0;t<r.length;t++)for(var a=r[t].rules,o=0;o<a.length;o++)if(a[o].keyword==e){a.splice(o,1);break}return this},mr=function e(r,t){e.errors=null;var a=this._validateKeyword=this._validateKeyword||this.compile(cr,!0);if(a(r))return!0;if(e.errors=a.errors,t)throw new Error("custom keyword definition is invalid: "+this.errorsText(a.errors));return!1};var fr="http://json-schema.org/draft-07/schema#",vr="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",gr="Meta-schema for $data reference (JSON Schema extension proposal)",yr=["$data"],br={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Pr={$schema:fr,$id:vr,description:gr,type:"object",required:yr,properties:br,additionalProperties:!1},wr=$(Object.freeze({__proto__:null,$schema:fr,$id:vr,description:gr,type:"object",required:yr,properties:br,additionalProperties:!1,default:Pr})),Er=Or;Or.prototype.validate=function(e,r){var t;if("string"==typeof e){if(!(t=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);t=a.validate||this._compile(a)}var o=t(r);!0!==t.$async&&(this.errors=t.errors);return o},Or.prototype.compile=function(e,r){var t=this._addSchema(e,void 0,r);return t.validate||this._compile(t)},Or.prototype.addSchema=function(e,r,t,a){if(Array.isArray(e)){for(var o=0;o<e.length;o++)this.addSchema(e[o],void 0,t,a);return this}var i=this._getId(e);if(void 0!==i&&"string"!=typeof i)throw new Error("schema id must be string");return Ir(this,r=G.normalizeId(r||i)),this._schemas[r]=this._addSchema(e,t,a,!0),this},Or.prototype.addMetaSchema=function(e,r,t){return this.addSchema(e,r,t,!0),this},Or.prototype.validateSchema=function(e,r){var t=e.$schema;if(void 0!==t&&"string"!=typeof t)throw new Error("$schema must be a string");if(!(t=t||this._opts.defaultMeta||function(e){var r=e._opts.meta;return e._opts.defaultMeta="object"==typeof r?e._getId(r)||r:e.getSchema(Sr)?Sr:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var a=this.validate(t,e);if(!a&&r){var o="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(o);this.logger.error(o)}return a},Or.prototype.getSchema=function(e){var r=_r(this,e);switch(typeof r){case"object":return r.validate||this._compile(r);case"string":return this.getSchema(r);case"undefined":return function(e,r){var t=G.schema.call(e,{schema:{}},r);if(t){var a=t.schema,o=t.root,i=t.baseId,n=fe.call(e,a,o,void 0,i);return e._fragments[r]=new H({ref:r,fragment:!0,schema:a,root:o,baseId:i,validate:n}),n}}(this,e)}},Or.prototype.removeSchema=function(e){if(e instanceof RegExp)return Dr(this,this._schemas,e),Dr(this,this._refs,e),this;switch(typeof e){case"undefined":return Dr(this,this._schemas),Dr(this,this._refs),this._cache.clear(),this;case"string":var r=_r(this,e);return r&&this._cache.del(r.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var t=this._opts.serialize,a=t?t(e):e;this._cache.del(a);var o=this._getId(e);o&&(o=G.normalizeId(o),delete this._schemas[o],delete this._refs[o])}return this},Or.prototype.addFormat=function(e,r){"string"==typeof r&&(r=new RegExp(r));return this._formats[e]=r,this},Or.prototype.errorsText=function(e,r){if(!(e=e||this.errors))return"No errors";for(var t=void 0===(r=r||{}).separator?", ":r.separator,a=void 0===r.dataVar?"data":r.dataVar,o="",i=0;i<e.length;i++){var n=e[i];n&&(o+=a+n.dataPath+" "+n.message+t)}return o.slice(0,-t.length)},Or.prototype._addSchema=function(e,r,t,a){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var o=this._opts.serialize,i=o?o(e):e,n=this._cache.get(i);if(n)return n;a=a||!1!==this._opts.addUsedSchema;var s=G.normalizeId(this._getId(e));s&&a&&Ir(this,s);var l,c=!1!==this._opts.validateSchema&&!r;c&&!(l=s&&s==G.normalizeId(e.$schema))&&this.validateSchema(e,!0);var u=G.ids.call(this,e),d=new H({id:s,schema:e,localRefs:u,cacheKey:i,meta:t});"#"!=s[0]&&a&&(this._refs[s]=d);this._cache.put(i,d),c&&l&&this.validateSchema(e,!0);return d},Or.prototype._compile=function(e,r){if(e.compiling)return e.validate=o,o.schema=e.schema,o.errors=null,o.root=r||o,!0===e.schema.$async&&(o.$async=!0),o;var t,a;e.compiling=!0,e.meta&&(t=this._opts,this._opts=this._metaOpts);try{a=fe.call(this,e.schema,r,e.localRefs)}catch(r){throw delete e.validate,r}finally{e.compiling=!1,e.meta&&(this._opts=t)}return e.validate=a,e.refs=a.refs,e.refVal=a.refVal,e.root=a.root,a;function o(){var r=e.validate,t=r.apply(this,arguments);return o.errors=r.errors,t}},Or.prototype.compileAsync=Ye,Or.prototype.addKeyword=dr,Or.prototype.getKeyword=pr,Or.prototype.removeKeyword=hr,Or.prototype.validateKeyword=mr,Or.ValidationError=le.Validation,Or.MissingRefError=le.MissingRef,Or.$dataMetaSchema=Ze;var Sr="http://json-schema.org/draft-07/schema",Fr=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],xr=["/properties"];function Or(e){if(!(this instanceof Or))return new Or(e);var r,t;e=this._opts=A.copy(e)||{},function(e){var r=e._opts.logger;if(!1===r)e.logger={log:Ar,warn:Ar,error:Ar};else{if(void 0===r&&(r=console),!("object"==typeof r&&r.log&&r.warn&&r.error))throw new Error("logger must implement log, warn and error methods");e.logger=r}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=Ne(e.format),this._cache=e.cache||new Fe,this._loadingSchemas={},this._compilations=[],this.RULES=((r=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}]).all=Ge(t=["type","$comment"]),r.types=Ge(["number","integer","string","array","object","boolean","null"]),r.forEach((function(e){e.rules=e.rules.map((function(e){var a;if("object"==typeof e){var o=Object.keys(e)[0];a=e[o],e=o,a.forEach((function(e){t.push(e),r.all[e]=!0}))}return t.push(e),r.all[e]={keyword:e,code:Ke[e],implements:a}})),r.all.$comment={keyword:"$comment",code:Ke.$comment},e.type&&(r.types[e.type]=e)})),r.keywords=Ge(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),r.custom={},r),this._getId=function(e){switch(e.schemaId){case"auto":return jr;case"id":return $r;default:return kr}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=de),this._metaOpts=function(e){for(var r=A.copy(e._opts),t=0;t<Fr.length;t++)delete r[Fr[t]];return r}(this),e.formats&&function(e){for(var r in e._opts.formats){var t=e._opts.formats[r];e.addFormat(r,t)}}(this),e.keywords&&function(e){for(var r in e._opts.keywords){var t=e._opts.keywords[r];e.addKeyword(r,t)}}(this),function(e){var r;e._opts.$data&&(r=wr,e.addMetaSchema(r,r.$id,!0));if(!1===e._opts.meta)return;var t=lr;e._opts.$data&&(t=Ze(t,xr));e.addMetaSchema(t,Sr,!0),e._refs["http://json-schema.org/schema"]=Sr}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var r=e._opts.schemas;if(!r)return;if(Array.isArray(r))e.addSchema(r);else for(var t in r)e.addSchema(r[t],t)}(this)}function _r(e,r){return r=G.normalizeId(r),e._schemas[r]||e._refs[r]||e._fragments[r]}function Dr(e,r,t){for(var a in r){var o=r[a];o.meta||t&&!t.test(a)||(e._cache.del(o.cacheKey),delete r[a])}}function $r(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function kr(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function jr(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function Ir(e,r){if(e._schemas[r]||e._refs[r])throw new Error('schema with key or id "'+r+'" already exists')}function Ar(){}var Cr={$$currentLocalizeFn:function(e){if(e&&e.length)for(var r=0;r<e.length;r+=1){var t=e[r],a=void 0,o=void 0,i=void 0;switch(t.keyword){case"$ref":a="无法找到引用".concat(t.params.ref);break;case"additionalItems":a="",o=t.params.limit,a+="不允许超过".concat(o,"个元素");break;case"additionalProperties":a="不允许有额外的属性";break;case"anyOf":a="数据应为 anyOf 所指定的其中一个";break;case"const":a="应当等于常量";break;case"contains":a="应当包含一个有效项";break;case"custom":a='应当通过 "'.concat(t.keyword,' 关键词校验"');break;case"dependencies":a="",o=t.params.depsCount,a+="应当拥有属性".concat(t.params.property,"的依赖属性").concat(t.params.deps);break;case"enum":a="应当是预设定的枚举值之一";break;case"exclusiveMaximum":case"exclusiveMinimum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(i);break;case"false schema":a="布尔模式出错";break;case"format":a='应当匹配格式 "'.concat(t.params.format,'"');break;case"formatExclusiveMaximum":a="formatExclusiveMaximum 应当是布尔值";break;case"formatExclusiveMinimum":a="formatExclusiveMinimum 应当是布尔值";break;case"formatMaximum":case"formatMinimum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当是 ".concat(i);break;case"if":a='应当匹配模式 "'.concat(t.params.failingKeyword,'" ');break;case"maximum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(i);break;case"maxItems":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个项");break;case"maxLength":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个字符");break;case"maxProperties":a="",o=t.params.limit,a+="不应有多于 ".concat(o," 个属性");break;case"minimum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(i);break;case"minItems":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个项");break;case"minLength":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个字符");break;case"minProperties":a="",o=t.params.limit,a+="不应有少于 ".concat(o," 个属性");break;case"multipleOf":a="应当是 ".concat(t.params.multipleOf," 的整数倍");break;case"not":a='不应当匹配 "not" schema';break;case"oneOf":a='只能匹配一个 "oneOf" 中的 schema';break;case"pattern":a='应当匹配模式 "'.concat(t.params.pattern,'"');break;case"patternRequired":a="应当有属性匹配模式 ".concat(t.params.missingPattern);break;case"propertyNames":a="属性名 '".concat(t.params.propertyName,"' 无效");break;case"required":a="应当有必需属性 ".concat(t.params.missingProperty);break;case"switch":a="由于 ".concat(t.params.caseIndex,' 失败,未通过 "switch" 校验, ');break;case"type":a="应当是 ".concat(t.params.type," 类型");break;case"uniqueItems":a="不应当含有重复项 (第 ".concat(t.params.j," 项与第 ").concat(t.params.i," 项是重复的)");break;default:continue}t.message=a}},getCurrentLocalize:function(){return this.$$currentLocalizeFn},useLocal:function(e){this.$$currentLocalizeFn=e}};function Rr(e,r){try{if("object"===o(r))return e.fill(null).map((function(){return JSON.parse(JSON.stringify(r))}))}catch(e){}}function Nr(e,r){return e.filter((function(e){return r.includes(e)}))}function Lr(e,r,t){var a=_(e.$ref,r);e.$ref;var o=c(e,["$ref"]);return Vr(l(l({},a),o),r,t)}function Tr(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length<2)return r[0];for(var a={},o=[].concat(r),i=function(){var e=f(o[0])?o[0]:{},r=f(o[1])?o[1]:{};a=Object.assign({},e),Object.keys(r).reduce((function(t,a){var o=e[a],i=r[a];if(f(o)||f(i))if(f(o)&&f(i))t[a]=Tr(o,i);else{var n=u(f(o)?[o,i]:[i,o],2),s=n[0],l=n[1];t[a]="additionalProperties"===a?!0===l&&s:s}else if(Array.isArray(o)||Array.isArray(i))if(Array.isArray(o)&&Array.isArray(i)){if(f(o[0])||f(i[0]))throw new Error("暂不支持如上数组对象元素合并");var c=Nr([].concat(o),[].concat(i));if(c.length<=0)throw new Error("无法合并如上数据");0===c.length&&"type"===a?t[a]=c[0]:t[a]=c}else{var d=u(Array.isArray(o)?[o,i]:[i,o],2),p=d[0],h=d[1];if(void 0===h)t[a]=p;else{if(!p.includes(h))throw new Error("无法合并如下数据");t[a]=h}}else if(void 0!==o&&void 0!==i)if("maxLength"===a||"maximum"===a||"maxItems"===a||"exclusiveMaximum"===a||"maxProperties"===a)t[a]=Math.min(o,i);else if("minLength"===a||"minimum"===a||"minItems"===a||"exclusiveMinimum"===a||"minProperties"===a)t[a]=Math.max(o,i);else if("multipleOf"===a)t[a]=x(o,i);else{if(o!==i)throw new Error("无法合并如下数据");t[a]=o}else t[a]=void 0===o?i:o;return t}),a),o.splice(0,2,a)};o.length>=2;)i();return a}function zr(e,r,t){var a=l(l({},e),{},{allOf:e.allOf.map((function(e){return Vr(e,r,t)}))});try{var o=a.allOf,i=c(a,["allOf"]);return Tr.apply(void 0,[i].concat(d(o)))}catch(e){return a.allOf,c(a,["allOf"])}}function qr(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.hasOwnProperty("allOf")&&(e=zr(e,r,t)),e.hasOwnProperty("$ref")&&(e=Lr(e,r,t)),e}function Vr(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return f(e)?qr(e,r,t):{}}function Mr(e){return e?"".concat("__pathRoot",".").concat(e).replace(/\./g,"_"):"__pathRoot"}function Ur(e){return""===e}function Wr(e,r){return""===e?r:[e,r].join(".")}function Br(e,r){a.default.delete(e,r)}function Qr(e,r,t){for(var o=r.split("."),i=0;i<o.length;i+=1){if(o.length-i<2){a.default.set(e,o[o.length-1],t);break}e=e[o[i]]}}function Hr(e,r){for(var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=r.split("."),o=0;o<a.length-t;o+=1){if(void 0===e)return;e=""===a[o]?e:e[a[o]]}return e}function Kr(e){return e}var Gr=Object.freeze({__proto__:null,nodePath2ClassName:Mr,isRootNodePath:Ur,computedCurPath:Wr,deletePathVal:Br,setPathVal:Qr,getPathVal:Hr,path2prop:Kr}),Jr=/{{(.*)}}/;function Zr(e,r,t,a){if(void 0!==t){var o=Jr.exec(t);if(Jr.lastIndex=0,o){var i=o[1].trim();return new Function("parentFormData","rootFormData","return ".concat(i))(Hr(e,r,1),e)}return a()}}function Xr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.schema,t=e.uiSchema,a=arguments.length>1?arguments[1]:void 0,o=tt({schema:r,uiSchema:t,containsSpec:!1});return["title","description"].reduce((function(e,r){return o[r]&&(e["ui:".concat(r)]=String(o[r]).replace(/\$index/g,a+1)),e}),{})}function Yr(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,i=e.curNodePath,n=void 0===i?"":i,s=e.rootFormData,l=void 0===s?{}:s,c=o["ui:widget"]||t["ui:widget"],u=o["ui:hidden"]||t["ui:hidden"];return"HiddenWidget"===c||"hidden"===c||!!Zr(l,n,u,(function(){return"function"==typeof u?u(Hr(l,n,1),l):u}))}function et(e,r){var t=r.schema,a=void 0===t?{}:t,i=r.uiSchema,n=void 0===i?{}:i,s=a["ui:field"]||n["ui:field"];if("function"==typeof s||"object"===o(s)||"string"==typeof s)return{field:s,fieldProps:n["ui:fieldProps"]||a["ui:fieldProps"]};var l=e[y(a)];if(l)return{field:l};if(!l&&(a.anyOf||a.oneOf))return{field:null};throw new Error("不支持的field类型 ".concat(a.type))}function rt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.curNodePath,s=e.rootFormData,c=void 0===s?{}:s;return Object.assign.apply(Object,[{}].concat(d([t,o].map((function(e){return Object.keys(e).reduce((function(r,t){var a=e[t];return"ui:options"===t&&f(a)?l(l({},r),a):0===t.indexOf("ui:")?l(l({},r),{},i({},t.substring(3),void 0===n?a:Zr(c,n,a,(function(){return a})))):r}),{})})))))}function tt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,i=e.containsSpec,n=void 0===i||i,s=e.curNodePath,c=e.rootFormData,u={};return n&&(u.readonly=!!t.readOnly,void 0!==t.multipleOf&&(u.step=t.multipleOf),(t.minimum||0===t.minimum)&&(u.min=t.minimum),(t.maximum||0===t.maximum)&&(u.max=t.maximum),(t.minLength||0===t.minLength)&&(u.minlength=t.minLength),(t.maxLength||0===t.maxLength)&&(u.maxlength=t.maxLength),"date-time"!==t.format&&"date"!==t.format||("array"===t.type?(u.isRange=!0,u.isNumberValue=!(t.items&&"string"===t.items.type)):u.isNumberValue=!("string"===t.type))),l(l({title:t.title,description:t.description},u),rt({schema:t,uiSchema:o,curNodePath:s,rootFormData:c}))}function at(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,i=e.curNodePath,n=e.rootFormData,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,l=tt({schema:t,uiSchema:o,curNodePath:i,rootFormData:n});!l.widget&&s&&Object.assign(l,s({schema:t,uiSchema:o}));var u=l.widget,d=l.title,p=l.labelWidth,h=l.description,m=l.attrs,f=l.class,v=l.style,g=l.fieldAttrs,y=l.fieldStyle,b=l.fieldClass,P=l.emptyValue,w=l.width,E=l.getWidget,S=l.onChange,F=c(l,["widget","title","labelWidth","description","attrs","class","style","fieldAttrs","fieldStyle","fieldClass","emptyValue","width","getWidget","onChange"]);return{widget:u,label:d,labelWidth:p,description:h,widgetAttrs:m,widgetClass:f,widgetStyle:v,fieldAttrs:g,width:w,fieldStyle:y,fieldClass:b,emptyValue:P,getWidget:E,onChange:S,uiProps:F}}function ot(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.errorSchema,s=void 0===n?{}:n;return Object.assign.apply(Object,[{}].concat(d([t,o,s].map((function(e){return Object.keys(e).reduce((function(r,t){var a=e[t];return"err:options"===t&&f(a)?l(l({},r),a):0===t.indexOf("err:")?l(l({},r),{},i({},t.substring(4),a)):r}),{})})))))}function it(e,r){if(!Array.isArray(r))return e;var t,a=function(e){return e.reduce((function(e,r){return e[r]=!0,e}),{})},o=a(e),i=r.filter((function(e){return"*"===e||o[e]})),n=a(i),s=e.filter((function(e){return!n[e]})),l=i.indexOf("*");if(-1===l){if(s.length)throw new Error("uiSchema order list does not contain ".concat((t=s).length>1?"properties '".concat(t.join("', '"),"'"):"property '".concat(t[0],"'")));return i}if(l!==i.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");var c=d(i);return c.splice.apply(c,[l,1].concat(d(s))),c}function nt(e){return Array.isArray(e.enum)&&1===e.enum.length||e.hasOwnProperty("const")}function st(e){if(Array.isArray(e.enum)&&1===e.enum.length)return e.enum[0];if(e.hasOwnProperty("const"))return e.const;throw new Error("schema cannot be inferred as a constant")}function lt(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=Vr(e,r),a=t.oneOf||t.anyOf;return!!Array.isArray(t.enum)||!!Array.isArray(a)&&a.every((function(e){return nt(e)}))}function ct(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every((function(e){return f(e)}))}function ut(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!(!e.uniqueItems||!e.items)&<(e.items,r)}function dt(e){return e.additionalItems,f(e.additionalItems)}function pt(e,r,t,a){if(e.enum){var o=rt({schema:e,uiSchema:r,curNodePath:t,rootFormData:a}).enumNames||e.enumNames;return e.enum.map((function(e,r){return{label:o&&o[r]||String(e),value:e}}))}var i=e.oneOf||e.anyOf,n=r.oneOf||r.anyOf;return i.map((function(e,r){var o=n&&n[r]?rt({schema:e,uiSchema:n[r],curNodePath:t,rootFormData:a}):{},i=st(e);return{label:o.title||e.title||String(i),value:i}}))}function ht(e,r,t){if(e)return e;if(r){var a=t.split(".").pop();if(a&&a!=="".concat(Number(a)))return a}return""}var mt=Object.freeze({__proto__:null,replaceArrayIndex:Xr,isHiddenWidget:Yr,getUiField:et,getUserUiOptions:rt,getUiOptions:tt,getWidgetConfig:at,getUserErrOptions:ot,orderProperties:it,isConstant:nt,toConstant:st,isSelect:lt,isFixedItems:ct,isMultiSelect:ut,allowAdditionalItems:dt,optionsList:pt,fallbackLabel:ht}),ft=yt(),vt=null,gt=null;function yt(){var e=new Er({errorDataPath:"property",allErrors:!0,multipleOfPrecision:8,schemaId:"auto",unknownFormats:"ignore"});return e.addFormat("data-url",/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/),e.addFormat("color",/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/),e}function bt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null===e?[]:e.map((function(e){var r=e.dataPath,t=e.keyword,a=e.message,o=e.params,i=e.schemaPath,n="".concat(r);return{name:t,property:n,message:a,params:o,stack:"".concat(n," ").concat(a).trim(),schemaPath:i}}))}function Pt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.transformErrors,o=e.additionalMetaSchemas,i=void 0===o?[]:o,n=e.customFormats,s=void 0===n?{}:n,l=!b(gt,i),c=!b(vt,s);(l||c)&&(ft=yt()),i&&l&&Array.isArray(i)&&(ft.addMetaSchema(i),gt=i),s&&c&&f(s)&&(Object.keys(s).forEach((function(e){ft.addFormat(e,s[e])})),vt=s);var u=null;try{ft.validate(t,r)}catch(e){u=e}Cr.getCurrentLocalize()(ft.errors);var p=bt(ft.errors);ft.errors=null;var h=u&&u.message&&"string"==typeof u.message&&u.message.includes("no schema with key or ref ");return h&&(p=[].concat(d(p),[{stack:u.message}])),"function"==typeof a&&(p=a(p)),{errors:p}}function wt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.uiSchema,o=e.transformErrors,i=e.additionalMetaSchemas,n=void 0===i?[]:i,s=e.customFormats,l=void 0===s?{}:s,c=e.errorSchema,u=void 0===c?{}:c,d=e.required,p=void 0!==d&&d,h=e.propPath,m=void 0===h?"":h,f=e.isOnlyFirstError,v=void 0===f||f,g="array"===t.type&&Array.isArray(r)&&0===r.length,y=void 0===r||g;if(p){if(y){var b={keyword:"required",params:{missingProperty:m}},P=ot({schema:t,uiSchema:a,errorSchema:u}).required;return P?b.message=P:Cr.getCurrentLocalize()([b]),[b]}}else if(y&&!g)return[];var w=Pt({formData:r,schema:t,transformErrors:o,additionalMetaSchemas:n,customFormats:l}).errors;w=w.filter((function(e){return""===e.property&&!e.schemaPath.includes("#/anyOf/")&&!e.schemaPath.includes("#/oneOf/")||"additionalProperties"===e.name}));var E=ot({schema:t,uiSchema:a,errorSchema:u});return(v&&w.length>0?[w[0]]:w).reduce((function(e,r){return r.message=void 0!==E[r.name]?E[r.name]:r.message,e.push(r),e}),[])}function Et(e,r){try{return ft.validate(e,r)}catch(e){return!1}}function St(e,r,t){for(var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=0;o<r.length;o++){var i=Vr(r[o],t,e);if(i.properties){var s=l(l({},t.definitions?{definitions:t.definitions}:{}),{},{anyOf:Object.keys(i.properties).map((function(e){return{required:[e]}}))}),c=void 0;if(i.anyOf){var u=n({},i);u.allOf?u.allOf=u.allOf.slice():u.allOf=[],u.allOf.push(s),c=u}else c=Object.assign({},i,s);if(a||delete c.required,Et(c,e))return o}else if(Et(r[o],e))return o}return 0}var Ft=Object.freeze({__proto__:null,ajvValidateFormData:Pt,validateFormDataAndTransformMsg:wt,isValid:Et,getMatchingOption:St});function xt(e,r){if(Array.isArray(r))return Array.isArray(e)||(e=[]),r.map((function(r,t){return e[t]?xt(e[t],r):r}));if(f(r)){var t=Object.assign({},e);return Object.keys(r).reduce((function(t,a){return t[a]=xt(e?e[a]:{},r[a]),t}),t)}return r}function Ot(e,r,t){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=f(e)?e:{},n=f(a)?a:{};"allOf"in i&&(i=zr(i,t,n));var s=r;if(f(s)&&f(i.default))s=g(s,i.default);else if("default"in i)s=i.default;else{if("$ref"in i){var l=_(i.$ref,t);return Ot(l,s,t,n,o)}if(ct(i))s=i.items.map((function(e,a){return Ot(e,Array.isArray(r)?r[a]:void 0,t,n,o)}));else if("oneOf"in i){var c=Vr(i.oneOf[St(n,i.oneOf,t)],t,n);if(i.properties&&c.properties){var u=g(i,c);delete u.oneOf,i=u}else i=c}else if("anyOf"in i){var d=Vr(i.anyOf[St(n,i.anyOf,t)],t,n);if(i.properties&&d.properties){var p=g(i,d);delete p.anyOf,i=p}else i=d}}switch(void 0===s&&(s=i.default),y(i)){case"null":return null;case"object":return Object.keys(i.properties||{}).reduce((function(e,r){var a=Ot(i.properties[r],(s||{})[r],t,(n||{})[r],o);return(o||void 0!==a)&&(e[r]=a),e}),{});case"array":if(Array.isArray(s)&&(s=s.map((function(e,r){return Ot(i.items[r]||i.additionalItems||{},e,t,{},o)}))),Array.isArray(a)&&(s=a.map((function(e,r){return Ot(i.items,(s||{})[r],t,e,{},o)}))),i.minItems){if(ut(i,t))return s||[];var h=s?s.length:0;if(i.minItems>h){var m=s||[],v=Array.isArray(i.items)?i.additionalItems:i.items,b=Rr(new Array(i.minItems-h),Ot(v,v.defaults,t,{},o));return m.concat(b)}}s=void 0===s?[]:s}return s}function _t(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!f(e))throw new Error("Invalid schema: ".concat(e));var o=Vr(e,t,r),i=Ot(o,e.default,t,r,a);return void 0===r?i:f(r)||Array.isArray(r)?xt(i,r):0===r||!1===r||""===r?r:r||i}function Dt(e,r){void 0===r&&(r={});var t=r.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}Dt('.genFromComponent{font-size:14px;line-height:1;word-wrap:break-word;word-break:break-word;padding:0;margin:0}.genFromComponent a,.genFromComponent h1,.genFromComponent h2,.genFromComponent h3,.genFromComponent li,.genFromComponent p,.genFromComponent ul{font-size:14px}.genFromComponent .genFormIcon{width:12px;height:12px;vertical-align:top}.genFromComponent .genFormBtn{display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;background:#fff;border:1px solid #dcdfe6;color:#606266;-webkit-appearance:none;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;margin:0;-webkit-transition:.1s;transition:.1s;font-weight:500;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;padding:12px 20px;font-size:14px;border-radius:4px}.genFromComponent .genFormBtn.is-plain:focus,.genFromComponent .genFormBtn.is-plain:hover{background:#fff;border-color:#409eff;color:#409eff}.genFromComponent .hiddenWidget{display:none}.genFromComponent .fieldGroupWrap+.fieldGroupWrap .fieldGroupWrap_title{margin-top:20px}.genFromComponent .fieldGroupWrap_title{position:relative;display:block;width:100%;line-height:26px;margin-bottom:8px;font-size:15px;font-weight:700;border:0}.genFromComponent .fieldGroupWrap_des{font-size:12px;line-height:20px;margin-bottom:10px;color:#999}.genFromComponent .genFromWidget_des{padding:0;margin-top:0;margin-bottom:2px;font-size:12px;line-height:20px;color:#999;text-align:left}.genFromComponent .formItemErrorBox{margin:0 auto;color:#ff5757;padding-top:2px;position:absolute;top:100%;left:0;display:-webkit-box!important;line-height:16px;text-overflow:ellipsis;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1;white-space:normal;font-size:12px;text-align:left}.genFromComponent .genFormIcon-qs{fill:#606266;vertical-align:middle;display:inline-block;width:16px;height:16px;margin-left:2px;margin-top:-2px;cursor:pointer}.genFromComponent .genFormItemRequired:before{content:"*";color:#f56c6c;margin-right:4px}.genFromComponent .appendCombining_box{margin-bottom:22px}.genFromComponent .appendCombining_box .appendCombining_box{margin-bottom:10px}.genFromComponent .appendCombining_box{padding:10px;background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .validateWidget{margin-bottom:0!important;width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important;padding:0!important}.genFromComponent .validateWidget .formItemErrorBox{padding:5px 0;position:relative}.genFromComponent .arrayField:not(.genFormItem){margin-bottom:22px}.genFromComponent .arrayField:not(.genFormItem) .arrayField{margin-bottom:10px}.genFromComponent .arrayOrderList{background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .arrayOrderList_item{position:relative;padding:25px 10px 12px;border-radius:2px;margin-bottom:6px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.genFromComponent .arrayOrderList_bottomAddBtn{text-align:right;padding:15px 10px;margin-bottom:10px}.genFromComponent .bottomAddBtn{width:40%;min-width:10px;max-width:180px}.genFromComponent .arrayListItem_content{padding-top:15px;-webkit-box-flex:1;-ms-flex:1;flex:1;margin:0 auto;-webkit-box-shadow:0 -1px 0 0 rgba(0,0,0,.05);box-shadow:0 -1px 0 0 rgba(0,0,0,.05)}.genFromComponent .arrayListItem_index,.genFromComponent .arrayListItem_operateTool{position:absolute;height:25px}.genFromComponent .arrayListItem_index{top:6px;line-height:18px;height:18px;padding:0 6px;background-color:rgba(0,0,0,.28);color:#fff;font-size:12px;border-radius:2px}.genFromComponent .arrayListItem_operateTool{width:75px;right:9px;top:-1px;text-align:right;font-size:0}.genFromComponent .arrayListItem_btn{vertical-align:top;display:inline-block;padding:6px;margin:0;font-size:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none;cursor:pointer;text-align:center;background:transparent;color:#666}.genFromComponent .arrayListItem_btn:hover{opacity:.6}.genFromComponent .arrayListItem_btn[disabled]{color:#999;opacity:.3!important;cursor:not-allowed}.genFromComponent .arrayListItem_orderBtn-bottom,.genFromComponent .arrayListItem_orderBtn-top{background-color:#f0f9eb}.genFromComponent .arrayListItem_btn-delete{background-color:#fef0f0}.genFromComponent .formFooter_item{text-align:right;border-top:1px solid rgba(0,0,0,.08);padding-top:10px}.genFromComponent.formInlineFooter>.fieldGroupWrap{display:inline-block;margin-right:10px}.genFromComponent.formInline .genFormItem{display:inline-block;margin-right:10px;vertical-align:top}.genFromComponent.formInline .validateWidget{margin-right:0}.genFromComponent.formInline .formFooter_item{border-top:none;padding-top:0}.layoutColumn .layoutColumn_w100{width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important}.layoutColumn .fieldGroupWrap_box{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start}.layoutColumn .fieldGroupWrap_box>div{width:100%;-ms-flex-preferred-size:100%;flex-basis:100%}.layoutColumn .fieldGroupWrap_box>.genFormItem{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;-webkit-box-sizing:border-box;box-sizing:border-box;padding-right:10px}.layoutColumn.layoutColumn-1 .fieldGroupWrap_box>.genFormItem{padding-right:0}.layoutColumn.layoutColumn-2 .fieldGroupWrap_box>.genFormItem{width:50%;-ms-flex-preferred-size:50%;flex-basis:50%}.layoutColumn.layoutColumn-3 .fieldGroupWrap_box>.genFormItem{width:33.333%;-ms-flex-preferred-size:33.333%;flex-basis:33.333%}');var $t={formFooter:{type:Object,default:function(){return{show:!0,okBtn:"保存",cancelBtn:"取消"}}},value:{type:null,default:function(){return{}},required:!0},formProps:{type:Object,default:function(){return{}}},fallbackLabel:{type:Boolean,default:!1},schema:{type:Object,default:function(){return{}},required:!0},uiSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},errorSchema:{type:Object,default:function(){return{}}}},kt={name:"FormFooter",props:{okBtn:{type:String,default:"保存"},cancelBtn:{type:String,default:"取消"},formItemAttrs:{type:Object,default:function(){return{}}},globalOptions:null},render:function(e){var r=this,t=this.$props,a=t.okBtn,o=t.cancelBtn,i=t.globalOptions.COMPONENT_MAP;return e(i.formItem,l({class:{formFooter_item:!0}},this.formItemAttrs),[e(i.button,{on:{click:function(){r.$emit("onCancel")}}},o),e(i.button,{style:{marginLeft:"10px"},props:{type:"primary"},on:{click:function(){r.$emit("onSubmit")}}},a)])}};var jt=function(e,r,t,a,o,i,n,s,l,c){"boolean"!=typeof n&&(l=s,s=n,n=!1);var u,d="function"==typeof t?t.options:t;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,o&&(d.functional=!0)),a&&(d._scopeId=a),i?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(i)},d._ssrRegister=u):r&&(u=n?function(e){r.call(this,c(e,this.$root.$options.shadowRoot))}:function(e){r.call(this,s(e))}),u)if(d.functional){var p=d.render;d.render=function(e,r){return u.call(r),p(e,r)}}else{var h=d.beforeCreate;d.beforeCreate=h?[].concat(h,u):[u]}return t},It={name:"FieldGroupWrap",inject:["genFormProvide"],props:{curNodePath:{type:String,default:""},showTitle:{type:Boolean,default:!0},showDescription:{type:Boolean,default:!0},title:{type:String,default:""},description:{type:String,default:""}},computed:{trueTitle:function(){var e=this.title;if(e)return e;var r=(this.genFormProvide.value||this.genFormProvide).fallbackLabel&&this.curNodePath.split(".").pop();return r!=="".concat(Number(r))?r:""}}},At=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("div",{staticClass:"fieldGroupWrap"},[e.showTitle&&e.trueTitle?t("h3",{staticClass:"fieldGroupWrap_title"},[e._v("\n "+e._s(e.trueTitle)+"\n ")]):e._e(),e._v(" "),e.showDescription&&e.description?t("p",{staticClass:"fieldGroupWrap_des",domProps:{innerHTML:e._s(e.description)}}):e._e(),e._v(" "),t("div",{staticClass:"fieldGroupWrap_box"},[e._t("default")],2)])};At._withStripped=!0;var Ct=jt({render:At,staticRenderFns:[]},void 0,It,void 0,!1,void 0,!1,void 0,void 0,void 0),Rt={formProps:{type:null},globalOptions:{type:null},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},customFormats:{type:Object,default:function(){return{}}},rootSchema:{type:Object,default:function(){return{}}},rootFormData:{type:null,default:function(){return{}}},curNodePath:{type:String,default:""},required:{type:Boolean,default:!1},needValidFieldGroup:{type:Boolean,default:!0}},Nt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-down",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}})])};Nt._withStripped=!0;var Lt=jt({render:Nt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Tt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-up",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}})])};Tt._withStripped=!0;var zt=jt({render:Tt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),qt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-close",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1\n 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0\n 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}})])};qt._withStripped=!0;var Vt=jt({render:qt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Mt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-plus",attrs:{t:"1551322312294",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"10297","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"200",height:"200"}},[r("path",{attrs:{d:"M474 152m8 0l60 0q8 0 8 8l0 704q0 8-8 8l-60 0q-8 0-8-8l0-704q0-8 8-8Z","p-id":"10298"}}),this._v(" "),r("path",{attrs:{d:"M168 474m8 0l672 0q8 0 8 8l0 60q0 8-8 8l-672 0q-8 0-8-8l0-60q0-8 8-8Z","p-id":"10299"}})])};Mt._withStripped=!0;var Ut=jt({render:Mt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Wt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-qs",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 708c-22.1\n 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 0\n 0-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8\n 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6\n 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6\n 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z"}})])};Wt._withStripped=!0;var Bt=jt({render:Wt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Qt={name:"Widget",inject:["genFormProvide"],props:{isFormData:{type:Boolean,default:!0},curValue:{type:null,default:0},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},widget:{type:[String,Function,Object],default:null},required:{type:Boolean,default:!1},emptyValue:{type:null,default:void 0},formatValue:{type:[Function],default:function(e){return{update:!0,value:e}}},rootFormData:{type:null},curNodePath:{type:String,default:""},label:{type:String,default:""},width:{type:String,default:""},labelWidth:{type:String,default:""},description:{type:String,default:""},widgetAttrs:{type:Object,default:function(){return{}}},widgetClass:{type:Object,default:function(){return{}}},widgetStyle:{type:Object,default:function(){return{}}},fieldAttrs:{type:Object,default:function(){return{}}},fieldClass:{type:Object,default:function(){return{}}},fieldStyle:{type:Object,default:function(){return{}}},uiProps:{type:Object,default:function(){return{}}},formProps:null,getWidget:null,globalOptions:null,onChange:null},computed:{value:{get:function(){return this.isFormData?Hr(this.rootFormData,this.curNodePath):this.curValue},set:function(e){var r=""===e||null===e?this.emptyValue:e;this.isFormData&&Qr(this.rootFormData,this.curNodePath,r),this.$emit("onChange",r)}}},created:function(){this.uiProps.enumOptions&&this.uiProps.enumOptions.length>0&&void 0===this.value&&this.value!==this.uiProps.enumOptions[0]&&(this.schema.items?this.value=[]:this.required&&(this.value=this.uiProps.enumOptions[0].value))},render:function(e){var r=this,t=this.$props.curNodePath,a=Ur(t),o=r.globalOptions.HELPERS.isMiniDes(r.formProps),i=r.description?e("div",{domProps:{innerHTML:r.description},class:{genFromWidget_des:!0}}):null,n=r.globalOptions.COMPONENT_MAP,s=o&&i?e(n.popover,{style:{margin:"0 2px",fontSize:"16px",cursor:"pointer"},props:{placement:"top",trigger:"hover"}},[i,e(Bt,{slot:"reference"})]):null,c=l(l({},r.fieldStyle),r.width?{width:r.width,flexBasis:r.width,paddingRight:"10px"}:{}),u=ht(r.label,r.widget&&this.genFormProvide.fallbackLabel,t);return e(n.formItem,{class:l(l({},r.fieldClass),{},{genFormItem:!0}),style:c,attrs:r.fieldAttrs,props:l(l({},r.labelWidth?{labelWidth:r.labelWidth}:{}),this.isFormData?{prop:a?"__$$root":t,rules:[{validator:function(e,o,i){a&&(o=r.rootFormData);var n=wt({formData:o,schema:r.$props.schema,uiSchema:r.$props.uiSchema,customFormats:r.$props.customFormats,errorSchema:r.errorSchema,required:r.required,propPath:t});if(n.length>0)return i(n[0].message);var s=r.$props.customRule;return s&&"function"==typeof s?s({field:t,value:o,rootFormData:r.rootFormData,callback:i}):i()},trigger:"blur"}]}:{}),scopedSlots:{error:function(r){return r.error?e("div",{class:{formItemErrorBox:!0},attrs:{title:r.error}},[r.error]):null}}},[u?e("span",{slot:"label",class:{genFormLabel:!0,genFormItemRequired:r.required}},["".concat(u),s,"".concat(r.formProps&&r.formProps.labelSuffix||"")]):null,o?null:i,e(r.widget,{style:r.widgetStyle,class:r.widgetClass,attrs:l(l(l({},r.widgetAttrs),r.uiProps),{},{value:this.value}),ref:"widgetRef",on:{"hook:mounted":function(){r.getWidget&&"function"==typeof r.getWidget&&r.getWidget.call(null,r.$refs.widgetRef)},input:function(e){var t=r.formatValue(e),a=r.value;t.update&&a!==t.value&&(r.value=t.value,r.onChange&&r.onChange({curVal:t.value,preVal:a,parentFormData:Hr(r.rootFormData,r.curNodePath,1),rootFormData:r.rootFormData}))}}})])}},Ht={name:"ObjectField",functional:!0,props:Rt,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,i=t.errorSchema,n=t.needValidFieldGroup,s=t.curNodePath,c=t.rootFormData,p=t.globalOptions,h=tt({schema:a,uiSchema:o,curNodePath:s,rootFormData:c}),m=h.title,v=h.description,g=h.showTitle,y=h.showDescription,b=h.order,P=h.fieldClass,w=h.fieldAttrs,E=h.fieldStyle,S=h.onlyShowIfDependent,F=it(Object.keys(a.properties||{}),b).map((function(t){var n=function(e){return Array.isArray(a.required)&&!!~a.required.indexOf(e)}(t),d=function(e){var r=!1,t=!1;return f(a.dependencies)&&(t=Object.entries(a.dependencies).some((function(t){var a=u(t,2),o=a[0],i=a[1],n=!(!Array.isArray(i)||!~i.indexOf(e));return r=r||n,n&&void 0!==Hr(c,s)[o]}))),{isDependency:r,curDependent:t}}(t),p=d.isDependency,h=d.curDependent;return p&&S&&!h?null:e(na,{key:t,props:l(l({},r.props),{},{schema:a.properties[t],uiSchema:o[t],errorSchema:i[t],required:n||h,curNodePath:Wr(s,t)})})}));return e(Ct,{props:{title:m,description:v,showTitle:g,showDescription:y,curNodePath:s},class:l(l({},r.data.class),P),attrs:w,style:E},[e("template",{slot:"default"},[].concat(d(F),[n?e(Qt,{key:"validateWidget-object",class:{validateWidget:!0,"validateWidget-object":!0},props:{schema:Object.entries(a).reduce((function(e,r){var t=u(r,2),o=t[0],i=t[1];return!1!==a.additionalProperties&&["properties","id","$id"].includes(o)||(e[o]=i),e}),{}),uiSchema:o,errorSchema:i,curNodePath:s,rootFormData:c,globalOptions:p}}):null]))])}},Kt={name:"StringField",props:Rt,functional:!0,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,i=t.curNodePath,n=t.rootFormData,s=t.globalOptions.WIDGET_MAP,c=lt(a)&&pt(a,o,i,n),u=at({schema:a,uiSchema:o,curNodePath:i,rootFormData:n},(function(){var e="number"===a.type||"integer"===a.type;return{widget:c?s.common.select:s.formats[a.format]||(e?s.types.number:s.types.string)}}));return c&&!u.uiProps.enumOptions&&(u.uiProps.enumOptions=c),e(Qt,l(l({},r.data),{},{props:l(l({},r.props),u)}))}},Gt={name:"NumberField",props:Rt,functional:!0,render:function(e,r){return e(Kt,r.data)}},Jt={name:"IntegerField",props:Rt,functional:!0,render:function(e,r){return e(Kt,r.data)}},Zt={name:"BooleanField",props:Rt,functional:!0,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,i=t.curNodePath,n=t.rootFormData,s=t.globalOptions,c=pt({enumNames:a.enumNames||["true","false"],enum:a.enum||[!0,!1]},o,i,n),u=at({schema:a,uiSchema:o,curNodePath:i,rootFormData:n},(function(){return{widget:s.WIDGET_MAP.types.boolean}}));return u.uiProps.enumOptions=u.uiProps.enumOptions||c,e(Qt,l(l({},r.data),{},{props:l(l({},r.props),u)}))}},Xt={name:"ArrayOrderList",props:{vNodeList:{type:Array,default:[]},tupleItemsLength:{type:Number,default:0},addable:{type:Boolean,default:!0},showIndexNumber:{type:Boolean,default:!1},sortable:{type:Boolean,default:!0},removable:{type:Boolean,default:!0},maxItems:{},minItems:{},globalOptions:null},computed:{canAdd:function(){var e=this.$props,r=e.addable,t=e.maxItems,a=e.vNodeList;return!!r&&(void 0===t||a.length<t)},canRemove:function(){var e=this.$props,r=e.removable,t=e.minItems,a=e.vNodeList;return!!r&&(void 0===t||a.length>t)}},render:function(e){var r=this;return this.vNodeList.length<=0&&!this.addable?null:e("div",{class:{arrayOrderList:!0}},this.vNodeList.map((function(t,a){var o=t.key,i=t.vNode,n=r.tupleItemsLength+a,s=a+1;return e("div",{key:o,class:{arrayOrderList_item:!0}},[r.showIndexNumber?e("div",{class:{arrayListItem_index:!0}},s):null,e("div",{class:{arrayListItem_operateTool:!0}},[e("button",{style:l({},r.sortable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.sortable||0===a},class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-top":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"moveUp",data:{index:n}})}}},[e(zt)]),e("button",{style:l({},r.sortable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.sortable||a===r.vNodeList.length-1},class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-bottom":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"moveDown",data:{index:n}})}}},[e(Lt)]),e("button",{style:l({},r.removable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.canRemove},class:{arrayListItem_btn:!0,"arrayListItem_btn-delete":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"remove",data:{index:n}})}}},[e(Vt)])]),e("div",{class:{arrayListItem_content:!0}},[i])])})).concat([e("p",{style:l({},this.canAdd?{}:{display:"none"}),class:{arrayOrderList_bottomAddBtn:!0}},[e("button",{attrs:{type:"button"},class:{bottomAddBtn:!0,"is-plain":!0,genFormBtn:!0},on:{click:function(){r.$emit("onArrayOperate",{command:"add"})}}},[e(Ut,{style:{marginRight:"5px"}}),this.maxItems?"( ".concat(this.vNodeList.length," / ").concat(this.maxItems," )"):""])])]))}},Yt={name:"ArrayFieldNormal",functional:!0,props:l(l({},Rt),{},{itemsFormData:{type:Array}}),render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,i=t.curNodePath,n=t.rootFormData,s=t.itemsFormData,c=t.errorSchema,u=t.globalOptions,d=tt({schema:a,uiSchema:o,curNodePath:i,rootFormData:n}),p=d.title,h=d.description,m=d.addable,f=d.showIndexNumber,v=d.sortable,g=d.removable,y=d.showTitle,b=d.showDescription,P=d.fieldClass,w=d.fieldAttrs,E=d.fieldStyle,S=s.map((function(t,n){var s=Xr({schema:a.items,uiSchema:o.items},n);return{key:t.key,vNode:e(na,{key:t.key,props:l(l({},r.props),{},{schema:a.items,required:![].concat(a.items.type).includes("null"),uiSchema:l(l({},o.items),s),errorSchema:c.items,curNodePath:Wr(i,n)})})}}));return e(Ct,{props:{title:p,description:h,showTitle:y,showDescription:b,curNodePath:i},class:l(l({},r.data.class),P),attrs:w,style:E},[e(Xt,{props:{vNodeList:S,showIndexNumber:f,addable:m,sortable:v,removable:g,maxItems:a.maxItems,minItems:a.minItems,globalOptions:u},on:r.listeners})])}},ea={name:"ArrayFieldMultiSelect",functional:!0,props:l({},Rt),render:function(e,r){var t=r.props,a=t.schema,o=t.rootSchema,i=t.uiSchema,n=t.curNodePath,s=t.rootFormData,c=t.globalOptions,u=pt(Vr(a.items,o),i,n,s),d=at({schema:a,uiSchema:i,curNodePath:n,rootFormData:s},(function(){return{widget:c.WIDGET_MAP.common.checkboxGroup}}));return d.uiProps.multiple=!0,u&&!d.uiProps.enumOptions&&(d.uiProps.enumOptions=u),e(Qt,l(l({},r.data),{},{props:l(l({},r.props),d)}))}},ra={name:"ArrayFieldTuple",props:l(l({},Rt),{},{itemsFormData:{type:Array,default:function(){return[]}}}),created:function(){this.fixItemsFormData()},methods:{fixItemsFormData:function(){var e=!Array.isArray(this.itemsFormData);if(e||this.itemsFormData.length<this.schema.items.length){var r=_t(this.schema,void 0,this.rootSchema);e?this.$emit("onArrayOperate",{command:"setNewTarget",data:{newTarget:r}}):this.$emit("onArrayOperate",{command:"batchPush",data:{pushArray:r.slice(this.itemsFormData.length)}})}}},render:function(e){var r=this;if(!Array.isArray(this.itemsFormData))return null;var t,a,o=this.$props,i=o.schema,n=o.uiSchema,s=o.errorSchema,c=o.curNodePath,u=o.globalOptions,p=tt({schema:i,uiSchema:n,curNodePath:c,rootFormData:this.rootFormData}),h=p.title,m=p.description,f=p.addable,v=p.showIndexNumber,g=p.sortable,y=p.removable,b=p.showTitle,P=p.showDescription,w=p.fieldClass,E=p.fieldAttrs,S=p.fieldStyle,F=(t=this.itemsFormData,a=this.schema.items.length-1,t.reduce((function(e,r,t){return e[t>a?1:0].push(r),e}),[[],[]])),x=F[0].map((function(t,a){return e(na,{key:t.key,props:l(l({},r.$props),{},{required:![].concat(i.items[a].type).includes("null"),schema:i.items[a],uiSchema:n.items?n.items[a]:{},errorSchema:s.items?s.items[a]:{},curNodePath:Wr(c,a)})})})),O=F[1].map((function(t,a){var o=Xr({schema:i.additionalItems,uiSchema:n.additionalItems},a);return{key:t.key,vNode:e(na,{key:t.key,props:l(l({},r.$props),{},{schema:i.additionalItems,required:![].concat(i.additionalItems.type).includes("null"),uiSchema:l(l({},n.additionalItems),o),errorSchema:s.additionalItems,curNodePath:Wr(c,a+i.items.length)})})}})),_=(void 0===f||f)&&dt(this.schema);return e(Ct,{props:{title:h,description:m,showTitle:b,showDescription:P,curNodePath:c},class:w,attrs:E,style:S},[].concat(d(x),[e(Xt,{props:{vNodeList:O,tupleItemsLength:i.items.length,addable:_,showIndexNumber:v,sortable:g,removable:y,maxItems:i.maxItems,minItems:i.minItems,globalOptions:u},on:this.$listeners})]))}},ta={name:"ArrayFieldSpecialFormat",props:Rt,functional:!0,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,i=t.curNodePath,n=t.rootFormData,s=at({schema:l({"ui:widget":t.globalOptions.WIDGET_MAP.formats[a.format]},a),uiSchema:o,curNodePath:i,rootFormData:n});return e(Qt,l(l({},r.data),{},{props:l(l({},r.props),s)}))}},aa={name:"ArrayField",props:Rt,data:function(){return{formKeys:this.getCuFormData().map((function(){return E()}))}},computed:{itemsFormData:function(){var e=this.$data.formKeys;return this.curFormData.map((function(r,t){return{key:e[t],value:r}}))},curFormData:function(){return this.getCuFormData()}},watch:{curFormData:function(e,r){e!==r&&Array.isArray(e)&&(this.formKeys=e.map((function(){return E()})))}},methods:{getCuFormData:function(){var e=this.$props,r=Hr(e.rootFormData,e.curNodePath);return Array.isArray(r)?r:[]},getNewFormDataRow:function(){var e=this.$props,r=e.schema,t=e.rootSchema,a=r.items;return ct(this.schema)&&dt(this.schema)&&(a=r.additionalItems),_t(a,void 0,t)},handleArrayOperate:function(e){var r=e.command,t=e.data,a={moveUp:function(e,r){!function(e,r){if(0===r)return!1;var t=[e[r],e[r-1]];e.splice.apply(e,[r-1,2].concat(t))}(e,r.index)},moveDown:function(e,r){!function(e,r){if(r===e.length-1)return!1;var t=e[r],a=[e[r+1],t];e.splice.apply(e,[r,2].concat(a))}(e,r.index)},remove:function(e,r){!function(e,r){e.splice(r,1).length}(e,r.index)},add:function(e,r){var t=r.newRowData;e.push(t)},batchPush:function(e,r){r.pushArray.forEach((function(r){e.push(r)}))},setNewTarget:function(e,r){Qr(r.formData,r.nodePath,r.newTarget)}}[r];if(!a)throw new Error("错误 - 未知的操作:[".concat(r,"]"));var o=t,i=t;"add"===r?(o={newRowData:this.getNewFormDataRow()},i={newRowData:E()}):"batchPush"===r?i={pushArray:o.pushArray.map((function(e){return E()}))}:"setNewTarget"===r&&(o={formData:this.rootFormData,nodePath:this.curNodePath,newTarget:o.newTarget},i={formData:this.$data,nodePath:"formKeys",newTarget:o.newTarget.map((function(e){return E()}))}),a.apply(this,[this.$data.formKeys,i]),a.apply(this,[this.curFormData,o])}},render:function(e){var r=this.$props,t=r.schema,a=r.uiSchema,o=r.rootSchema,n=r.rootFormData,s=r.curNodePath,c=r.globalOptions;if(!t.hasOwnProperty("items"))throw new Error("[".concat(t,"] 请先定义 items属性"));if(ut(t,o))return e(ea,{props:this.$props,class:i({},F(ea.name),!0)});if(t.format||t["ui:widget"]||a["ui:widget"])return e(ta,{props:this.$props,class:i({},F(ta.name),!0)});var d=ct(t)?ra:Yt;return e("div",[e(d,{props:l({itemsFormData:this.itemsFormData},this.$props),class:i({},F(d.name),!0),on:{onArrayOperate:this.handleArrayOperate}}),this.needValidFieldGroup?e(Qt,{key:"validateWidget-array",class:{validateWidget:!0,"validateWidget-array":!0},props:{schema:Object.entries(this.$props.schema).reduce((function(e,r){var t=u(r,2),a=t[0],o=t[1];return"items"!==a&&(e[a]=o),e}),{}),uiSchema:a,errorSchema:this.errorSchema,curNodePath:s,rootFormData:n,globalOptions:c}}):null])}},oa={name:"SelectLinkageField",props:l(l({},Rt),{},{combiningType:{type:String,default:"anyOf"},selectList:{type:Array,require:!0}}),data:function(){return{curSelectIndex:this.computedCurSelectIndexByFormData(Hr(this.rootFormData,this.curNodePath))}},methods:{computedCurSelectIndexByFormData:function(e){var r=St(e,this.selectList,this.rootSchema,!0);return 0!==r?r:this.curSelectIndex||0},getSelectBoxVNode:function(){var e=this,r=at({schema:this.schema["".concat(this.combiningType,"Select")]||{},uiSchema:this.uiSchema["".concat(this.combiningType,"Select")]||{},curNodePath:this.curNodePath,rootFormData:this.rootFormData},(function(){return{widget:"SelectWidget"}}));if(r.label=r.label||this.schema.title,r.description=r.description||this.schema.description,!r.uiProps.enumOptions){var t=this.uiSchema[this.combiningType]||[];r.uiProps.enumOptions=this.selectList.map((function(e,r){return{label:tt({schema:e,uiSchema:t[r],containsSpec:!1}).title||"选项 ".concat(r+1),value:r}}))}return this.$createElement(Qt,{key:"fieldSelect_".concat(this.combiningType),class:i({},"fieldSelect_".concat(this.combiningType),!0),props:l({isFormData:!1,curValue:this.curSelectIndex,globalOptions:this.globalOptions},r),on:{onChange:function(r){e.curSelectIndex=r}}})}},watch:{curSelectIndex:function(e,r){var t=Hr(this.rootFormData,this.curNodePath),a=_t(this.selectList[e],void 0,this.rootSchema),o=Object.prototype.hasOwnProperty;if(f(t)){var i=Vr(this.selectList[r],this.rootSchema);if("object"===y(i))for(var n in i.properties)o.call(i.properties,n)&&!o.call(a,n)&&Br(t,n)}f(a)?Object.entries(a).forEach((function(e){var r=u(e,2),a=r[0],o=r[1];void 0!==o&&Qr(t,a,o)})):Qr(this.rootFormData,this.curNodePath,a||t)}},render:function(e){var r,t=this,a=this.$props.curNodePath,o=Mr(a),n=null;if(("object"===this.schema.type||this.schema.properties)&&!function(e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!1;return!0}(this.schema.properties)){var s,u=Object.assign({},this.schema);delete u[this.combiningType],n=e(na,{key:"origin_".concat(this.combiningType),class:(s={},i(s,"".concat(this.combiningType,"_originBox"),!0),i(s,"".concat(o,"-originBox"),!0),s),props:l(l({},this.$props),{},{schema:u})})}var d=[this.getSelectBoxVNode()],p=this.selectList[this.curSelectIndex];if(p){var h=this.schema,f=this.combiningType,v="".concat(this.combiningType,"Select");h.properties,h[f],h[v];var g=c(h,["properties",f,v].map(m));p=Object.assign({},g,p);var y=S(tt({schema:this.schema,uiSchema:this.uiSchema,containsSpec:!1,curNodePath:a,rootFormData:this.rootFormData}),(function(e){return e===t.combiningType?void 0:"ui:".concat(e)})),b=S(ot({schema:this.schema,uiSchema:this.uiSchema,errorSchema:this.errorSchema}),(function(e){return e===t.combiningType?void 0:"err:".concat(e)}));d.push(e(na,{key:"appendSchema_".concat(this.combiningType),props:l(l({},this.$props),{},{schema:l({"ui:showTitle":!1,"ui:showDescription":!1},p),required:this.required,uiSchema:l(l({},y),(this.uiSchema[this.combiningType]||[])[this.curSelectIndex]),errorSchema:l(l({},b),(this.errorSchema[this.combiningType]||[])[this.curSelectIndex])})}))}return d.push(e(Qt,{key:"validateWidget-".concat(this.combiningType),class:i({validateWidget:!0},"validateWidget-".concat(this.combiningType),!0),props:{schema:this.schema,uiSchema:this.uiSchema,errorSchema:this.errorSchema,curNodePath:this.curNodePath,rootFormData:this.rootFormData,globalOptions:this.globalOptions}})),e("div",[n,e("div",{key:"appendBox_".concat(this.combiningType),class:(r={appendCombining_box:!0},i(r,"".concat(this.combiningType,"_appendBox"),!0),i(r,"".concat(o,"-appendBox"),!0),r)},d)])}},ia={array:aa,boolean:Zt,integer:Jt,number:Gt,object:Ht,string:Kt,null:{render:function(){return null}},anyOf:{name:"AnyOfField",functional:!0,render:function(e,r){var t=r.data,a=t.props,o=c(t,["props"]);return e(oa,l(l({},o),{},{props:l(l({},a),{},{combiningType:"anyOf",selectList:a.schema.anyOf})}),r.children)}},oneOf:{name:"oneOfField",functional:!0,render:function(e,r){var t=r.data,a=t.props,o=c(t,["props"]);return e(oa,l(l({},o),{},{props:l(l({},a),{},{combiningType:"oneOf",selectList:a.schema.oneOf})}),r.children)}}},na={name:"SchemaField",props:Rt,functional:!0,render:function(e,r){var t,a=r.props,o=a.rootSchema,n=Vr(a.schema,o),s=l(l({},a),{},{schema:n});if(0===Object.keys(n).length)return null;var c,u,d=et(ia,s),p=d.field,h=d.fieldProps,m=Yr({schema:n,uiSchema:a.uiSchema,curNodePath:a.curNodePath,rootFormData:a.rootFormData}),f=Mr(a.curNodePath);return n.anyOf&&n.anyOf.length>0&&!lt(n)?e(ia.anyOf,{class:(c={},i(c,"".concat(f,"-anyOf"),!0),i(c,"fieldItem",!0),i(c,"anyOfField",!0),c),props:s}):n.oneOf&&n.oneOf.length>0&&!lt(n)?e(ia.oneOf,{class:(u={},i(u,"".concat(f,"-oneOf"),!0),i(u,"fieldItem",!0),i(u,"oneOfField",!0),u),props:s}):p&&!m?e(p,{props:l(l({},s),{},{fieldProps:h}),class:l(l({},r.data.class),{},(t={},i(t,F(p.name)||p,!0),i(t,"hiddenWidget",m),i(t,"fieldItem",!0),i(t,f,!0),t))}):null}};var sa={name:"CheckboxesWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}},la=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("el-checkbox-group",e._g(e._b({},"el-checkbox-group",e.$attrs,!1),e.$listeners),e._l(e.enumOptions,(function(r,a){return t("el-checkbox",{key:a,attrs:{label:r.value}},[e._v("\n "+e._s(r.label)+"\n ")])})),1)};la._withStripped=!0;var ca=jt({render:la,staticRenderFns:[]},void 0,sa,void 0,!1,void 0,!1,void 0,void 0,void 0),ua={name:"RadioWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}},da=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("el-radio-group",e._g(e._b({},"el-radio-group",e.$attrs,!1),e.$listeners),e._l(e.enumOptions,(function(r,a){return t("el-radio",{key:a,attrs:{label:r.value}},[e._v("\n "+e._s(r.label)+"\n ")])})),1)};da._withStripped=!0;var pa=jt({render:da,staticRenderFns:[]},void 0,ua,void 0,!1,void 0,!1,void 0,void 0,void 0),ha={name:"SelectWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}},ma=function(){var e=this.$createElement,r=this._self._c||e;return r("el-select",this._g(this._b({},"el-select",this.$attrs,!1),this.$listeners),this._l(this.enumOptions,(function(e,t){return r("el-option",{key:t,attrs:{label:e.label,value:e.value}})})),1)};ma._withStripped=!0;var fa={CheckboxesWidget:ca,RadioWidget:pa,SelectWidget:jt({render:ma,staticRenderFns:[]},void 0,ha,void 0,!1,void 0,!1,void 0,void 0,void 0),TimePickerWidget:{name:"TimePickerWidget",functional:!0,render:function(e,r){r.data.attrs=l({"value-format":"HH:mm:ss"},r.data.attrs||{});var t=r.data.on.input;return r.data.on=l(l({},r.data.on),{},{input:function(e){t.apply(r.data.on,[null===e?void 0:e])}}),e("el-time-picker",r.data,r.children)}},DatePickerWidget:{name:"DatePickerWidget",functional:!0,render:function(e,r){var t=r.data.attrs||{},a=t.isNumberValue,o=t.isRange,i=c(t,["isNumberValue","isRange"]);r.data.attrs=l({type:o?"daterange":"date","value-format":a?"timestamp":"yyyy-MM-dd"},i);var n=r.data.on.input;return r.data.on=l(l({},r.data.on),{},{input:function(e){var t=null===e?o?[]:void 0:e;n.apply(r.data.on,[t])}}),e("el-date-picker",r.data,r.children)}},DateTimePickerWidget:{name:"DateTimePickerWidget",functional:!0,render:function(e,r){var t=r.data.attrs||{},a=t.isNumberValue,o=t.isRange,i=c(t,["isNumberValue","isRange"]);r.data.attrs=l({type:o?"datetimerange":"datetime"},i);var n=r.data.on.input;return r.data.on=l(l({},r.data.on),{},{input:function(e){var t;t=o?null===e?[]:e.map((function(e){return new Date(e)[a?"valueOf":"toISOString"]()})):null===e?void 0:new Date(e)[a?"valueOf":"toISOString"](),n.apply(r.data.on,[t])}}),e("el-date-picker",r.data,r.children)}},UploadWidget:{name:"UploadWidget",props:{value:{default:null,type:[String,Array]},responseFileUrl:{default:function(e){return e?e.url||e.data&&e.data.url:""},type:[Function]},btnText:{type:String,default:"点击上传"},slots:{type:null,default:null}},data:function(){var e=this.value,r=Array.isArray(e),t=this.$attrs.fileList||(r?e.map((function(e,r){return{name:"已上传文件(".concat(r+1,")"),url:e}})):e?[{name:"已上传文件",url:e}]:[]);return{isArrayValue:r,fileList:t}},methods:{getUrl:function(e){return e&&(e.response&&this.responseFileUrl(e.response)||e.url)||""},emitValue:function(e){var r,t=this;if(this.isArrayValue)r=e.length?e.reduce((function(e,r){var a=t.getUrl(r);return a&&e.push(a),e}),[]):[];else{var a=e[e.length-1];r=this.getUrl(a)}this.$emit("input",r)}},render:function(){var e=this,r=this.$createElement,t=this.$attrs,a=this.$props.slots,o={attrs:l(l({fileList:this.fileList,"on-exceed":function(){e.$message&&e.$message.warning("超出文件上传数")},"on-error":function(){e.$message&&e.$message.error("文件上传失败")},"on-preview":function(r){var t=e.getUrl(r);t&&function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_blank",t=document.createElement("a");t.style.display="none",t.target=r,t.href=e,document.body.appendChild(t),t.click(),document.body.removeChild(t)}(t)}},t),{},{"on-remove":function(r,a){e.emitValue(a),t["on-remove"]&&t["on-remove"](r,a)},"on-success":function(r,a,o){e.emitValue(o),t["on-success"]&&t["on-success"](r,a,o)}})};this.isArrayValue||(o.attrs.limit=1);var i=[];return a&&a.default?i.push(r("template",{slot:"default"},["function"==typeof a.default?a.default(r):a.default])):i.push(r("el-button",{props:{type:"primary"}},[this.btnText])),a&&a.tip&&i.push(r("template",{slot:"tip"},["function"==typeof a.tip?a.tip(r):a.tip])),r("el-upload",o,i)}}},va={types:{boolean:"el-switch",string:"el-input",number:"el-input-number",integer:"el-input-number"},formats:{color:"el-color-picker",time:fa.TimePickerWidget,date:fa.DatePickerWidget,"date-time":fa.DateTimePickerWidget},common:{select:fa.SelectWidget,radioGroup:fa.RadioWidget,checkboxGroup:fa.CheckboxesWidget},widgetComponents:fa};Dt(".genFromComponent.el-form--label-top .el-form-item__label{line-height:26px;padding-bottom:6px;font-size:14px}.genFromComponent .el-checkbox,.genFromComponent .el-color-picker{vertical-align:top}");var ga=Object.freeze({WIDGET_MAP:Object.freeze(va),COMPONENT_MAP:Object.freeze({form:"el-form",formItem:"el-form-item",button:"el-button",popover:"el-popover"}),HELPERS:{isMiniDes:function(e){return e&&["left","right"].includes(e.labelPosition)}}}),ya=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.WIDGET_MAP.widgetComponents&&Object.entries(e.WIDGET_MAP.widgetComponents).forEach((function(e){var r=u(e,2),t=r[0],o=r[1];return a.default.component(t,o)})),{name:"VueForm",props:$t,provide:function(){return{genFormProvide:this.genFormProvide}},data:function(){var e=_t(this.$props.schema,this.$props.value,this.$props.schema);return this.emitFormDataChange(e,this.value),{formData:e}},computed:{genFormProvide:function(){return{fallbackLabel:this.fallbackLabel}},footerParams:function(){return l({show:!0,okBtn:"保存",cancelBtn:"取消"},this.formFooter)}},watch:{formData:{handler:function(e,r){this.emitFormDataChange(e,r)},deep:!0},schema:function(e,r){this.willReceiveProps(e,r)},value:function(e,r){this.willReceiveProps(e,r)}},methods:{emitFormDataChange:function(e,r){this.$emit("input",e),this.$emit("on-change",{newValue:e,oldValue:r})},willReceiveProps:function(e,r){if(!b(e,r)){var t=_t(this.$props.schema,this.$props.value,this.$props.schema);b(this.formData,t)||(this.formData=t)}}},mounted:function(){this.$emit("on-form-mounted",this.$refs.genEditForm)},render:function(r){var t,a=this,o=this.$scopedSlots.default?this.$scopedSlots.default({formData:a.formData,formRefFn:function(){return a.$refs.genEditForm}}):this.footerParams.show?r(kt,{props:{globalOptions:e,okBtn:a.footerParams.okBtn,cancelBtn:a.footerParams.cancelBtn,formItemAttrs:a.footerParams.formItemAttrs},on:{onCancel:function(){a.$emit("on-cancel")},onSubmit:function(){a.$refs.genEditForm.validate((function(e,r){return e?a.$emit("on-submit",a.formData):a.$emit("on-validation-failed",r)}))}}}):void 0,n=a.$props.formProps,s=n.layoutColumn,u=void 0===s?1:s,d=n.inlineFooter,p=n.inline,h=c(n,["layoutColumn","inlineFooter","inline"]),m={schema:this.schema,uiSchema:this.uiSchema,errorSchema:this.errorSchema,customFormats:this.customFormats,customRule:this.customRule,rootSchema:this.schema,rootFormData:this.formData,curNodePath:"",globalOptions:e,formProps:l({labelPosition:"top",labelSuffix:":"},h)};return r(e.COMPONENT_MAP.form,{class:(t={genFromComponent:!0,formInlineFooter:d,formInline:p},i(t,"genFromComponent_".concat(this.schema.id,"Form"),!!this.schema.id),i(t,"layoutColumn",!p),i(t,"layoutColumn-".concat(u),!p),t),ref:"genEditForm",props:l({model:a.formData},m.formProps)},[r(na,{props:m}),o])}}}(ga);"undefined"!=typeof window&&window.Vue&&window.Vue.component("VueForm",ya),e.SchemaField=na,e.default=ya,e.fieldProps=Rt,e.formUtils=mt,e.getDefaultFormState=_t,e.globalOptions=ga,e.i18n=Cr,e.schemaValidate=Ft,e.vueUtils=Gr,Object.defineProperty(e,"__esModule",{value:!0})})); diff --git a/packages/lib/vue2/vue2-form-iview3/dist/vue2-form-iview3.esm.js b/packages/lib/vue2/vue2-form-iview3/dist/vue2-form-iview3.esm.js index 19f7a263..07cc5973 100644 --- a/packages/lib/vue2/vue2-form-iview3/dist/vue2-form-iview3.esm.js +++ b/packages/lib/vue2/vue2-form-iview3/dist/vue2-form-iview3.esm.js @@ -10316,7 +10316,12 @@ var Widget = { self.value = formatValue.value; if (self.onChange) { - self.onChange(formatValue.value, preVal); + self.onChange({ + curVal: formatValue.value, + preVal: preVal, + parentFormData: getPathVal$1(self.rootFormData, self.curNodePath, 1), + rootFormData: self.rootFormData + }); } } } diff --git a/packages/lib/vue2/vue2-form-iview3/dist/vue2-form-iview3.esm.min.js b/packages/lib/vue2/vue2-form-iview3/dist/vue2-form-iview3.esm.min.js index 85ca52d3..c60b09fa 100644 --- a/packages/lib/vue2/vue2-form-iview3/dist/vue2-form-iview3.esm.min.js +++ b/packages/lib/vue2/vue2-form-iview3/dist/vue2-form-iview3.esm.min.js @@ -1,4 +1,4 @@ /** @license @lljj/vue2-form-iview3 (c) 2020-2021 Liu.Jun License: Apache-2.0 */ import e from"vue";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function t(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function a(){return(a=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e}).apply(this,arguments)}function o(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function i(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?o(Object(a),!0).forEach((function(r){t(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):o(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}function n(e,r){if(null==e)return{};var t,a,o=function(e,r){if(null==e)return{};var t,a,o={},i=Object.keys(e);for(a=0;a<i.length;a++)t=i[a],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function s(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],a=!0,o=!1,i=void 0;try{for(var n,s=e[Symbol.iterator]();!(a=(n=s.next()).done)&&(t.push(n.value),!r||t.length!==r);a=!0);}catch(e){o=!0,i=e}finally{try{a||null==s.return||s.return()}finally{if(o)throw i}}return t}(e,r)||c(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,r){if(e){if("string"==typeof e)return u(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?u(e,r):void 0}}function u(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);t<r;t++)a[t]=e[t];return a}function d(e){var r=function(e,r){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var a=t.call(e,r||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:String(r)}function p(e){return"[object Object]"===Object.prototype.toString.call(e)}function h(e){return"[object Arguments]"===Object.prototype.toString.call(e)}function m(e,r){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=Object.assign({},e);return Object.keys(r).reduce((function(a,o){var i=e?e[o]:{},n=r[o];return e&&e.hasOwnProperty(o)&&p(n)?a[o]=m(i,n,t):t&&Array.isArray(i)&&Array.isArray(n)?a[o]=i.concat(n):a[o]=n,a}),a)}function f(e){var t,a=e.type;return!a&&e.const?(t=e.const,Array.isArray(t)?"array":"string"==typeof t?"string":null==t?"null":"boolean"==typeof t?"boolean":isNaN(t)?"object"===r(t)?"object":"string":"number"):!a&&e.enum?"string":!a&&e.items?"array":a||!e.properties&&!e.additionalProperties?a instanceof Array&&2===a.length&&a.includes("null")?a.find((function(e){return"null"!==e})):a:"object"}function v(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===t)return!0;if("function"==typeof e||"function"==typeof t)return!0;if("object"!==r(e)||"object"!==r(t))return!1;if(null===e||null===t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(h(e)||h(t)){if(!h(e)||!h(t))return!1;var i=Array.prototype.slice;return v(i.call(e),i.call(t),a,o)}if(e.constructor!==t.constructor)return!1;var n=Object.keys(e),s=Object.keys(t);if(0===n.length&&0===s.length)return!0;if(n.length!==s.length)return!1;for(var l,c=a.length;c--;)if(a[c]===e)return o[c]===t;a.push(e),o.push(t),n.sort(),s.sort();for(var u=n.length-1;u>=0;u--)if(n[u]!==s[u])return!1;for(var d=n.length-1;d>=0;d--)if(!v(e[l=n[d]],t[l],a,o))return!1;return a.pop(),o.pop(),!0}var g,y,b=(g="".concat(+new Date),y=0,function(){var e="".concat(+new Date);return e===g?y+=1:y=0,"".concat(g=e,"x").concat(y)});function P(e,r){return Object.entries(e).reduce((function(e,t){var a=s(t,2),o=a[0],i=a[1],n=r(o,i);return void 0!==n&&(e[n]=i),e}),{})}function w(e){return void 0===e?e:String(e).replace(/^./,(function(e){return e.toLocaleLowerCase()}))}function E(e,r){return e*r/function e(r,t){return 0===t?r:e(t,r%t)}(e,r)}function S(e,r){for(var t=r.split("/"),a=0;a<t.length;a+=1){if(void 0===e)return;e=""===t[a]?e:e[t[a]]}return e}function F(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e;if(!e.startsWith("#"))throw new Error("Could not find a definition for ".concat(t,"."));var a=S(r,e=decodeURIComponent(e.substring(1)));if(void 0===a)throw new Error("Could not find a definition for ".concat(t,"."));return a.hasOwnProperty("$ref")?F(a.$ref,r):a}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function x(e,r){return e(r={exports:{}},r.exports),r.exports}function O(e){return e&&e.default||e}var _,D=x((function(e,r){ /** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ -!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var a=r.length-1,o=1;o<a;++o)r[o]=r[o].slice(1,-1);return r[a]=r[a].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function a(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function i(e){var a=r("[0-9]","[A-Fa-f]"),o=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),i="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",n=r("[\\:\\/\\?\\#\\[\\]\\@]",i),s=e?"[\\uE000-\\uF8FF]":"[]",l=r("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t("[A-Za-z]"+r("[A-Za-z]","[0-9]","[\\+\\-\\.]")+"*"),t(t(o+"|"+r(l,i,"[\\:]"))+"*");var c=t(t("25[0-5]")+"|"+t("2[0-4][0-9]")+"|"+t("1[0-9][0-9]")+"|"+t("0?[1-9][0-9]")+"|0?0?[0-9]"),u=t(c+"\\."+c+"\\."+c+"\\."+c),d=t(a+"{1,4}"),p=t(t(d+"\\:"+d)+"|"+u),h=t(t(d+"\\:")+"{6}"+p),m=t("\\:\\:"+t(d+"\\:")+"{5}"+p),f=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+p),v=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+p),g=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+p),y=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+p),b=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+p),P=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),w=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),E=t([h,m,f,v,g,y,b,P,w].join("|")),S=t(t(l+"|"+o)+"+");t("[vV]"+a+"+\\."+r(l,i,"[\\:]")+"+"),t(t(o+"|"+r(l,i))+"*");var F=t(o+"|"+r(l,i,"[\\:\\@]"));return t(t(o+"|"+r(l,i,"[\\@]"))+"+"),t(t(F+"|"+r("[\\/\\?]",s))+"*"),{NOT_SCHEME:new RegExp(r("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,i),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,i),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,i),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,i),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,i,"[\\:\\@\\/\\?]",s),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,i,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,i),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,n),"g"),PCT_ENCODED:new RegExp(o,"g"),IPV4ADDRESS:new RegExp("^("+u+")$"),IPV6ADDRESS:new RegExp("^\\[?("+E+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+S+")")+"?\\]?$")}}var n=i(!1),s=i(!0),l=function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,r){var t=[],a=!0,o=!1,i=void 0;try{for(var n,s=e[Symbol.iterator]();!(a=(n=s.next()).done)&&(t.push(n.value),!r||t.length!==r);a=!0);}catch(e){o=!0,i=e}finally{try{!a&&s.return&&s.return()}finally{if(o)throw i}}return t}(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=2147483647,u=/^xn--/,d=/[^\0-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,f=String.fromCharCode;function v(e){throw new RangeError(h[e])}function g(e,r){var t=e.split("@"),a="";t.length>1&&(a=t[0]+"@",e=t[1]);var o=function(e,r){for(var t=[],a=e.length;a--;)t[a]=r(e[a]);return t}((e=e.replace(p,".")).split("."),r).join(".");return a+o}function y(e){for(var r=[],t=0,a=e.length;t<a;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<a){var i=e.charCodeAt(t++);56320==(64512&i)?r.push(((1023&o)<<10)+(1023&i)+65536):(r.push(o),t--)}else r.push(o)}return r}var b=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},P=function(e,r,t){var a=0;for(e=t?m(e/700):e>>1,e+=m(e/r);e>455;a+=36)e=m(e/35);return m(a+36*e/(e+38))},w=function(e){var r,t=[],a=e.length,o=0,i=128,n=72,s=e.lastIndexOf("-");s<0&&(s=0);for(var l=0;l<s;++l)e.charCodeAt(l)>=128&&v("not-basic"),t.push(e.charCodeAt(l));for(var u=s>0?s+1:0;u<a;){for(var d=o,p=1,h=36;;h+=36){u>=a&&v("invalid-input");var f=(r=e.charCodeAt(u++))-48<10?r-22:r-65<26?r-65:r-97<26?r-97:36;(f>=36||f>m((c-o)/p))&&v("overflow"),o+=f*p;var g=h<=n?1:h>=n+26?26:h-n;if(f<g)break;var y=36-g;p>m(c/y)&&v("overflow"),p*=y}var b=t.length+1;n=P(o-d,b,0==d),m(o/b)>c-i&&v("overflow"),i+=m(o/b),o%=b,t.splice(o++,0,i)}return String.fromCodePoint.apply(String,t)},E=function(e){var r=[],t=(e=y(e)).length,a=128,o=0,i=72,n=!0,s=!1,l=void 0;try{for(var u,d=e[Symbol.iterator]();!(n=(u=d.next()).done);n=!0){var p=u.value;p<128&&r.push(f(p))}}catch(e){s=!0,l=e}finally{try{!n&&d.return&&d.return()}finally{if(s)throw l}}var h=r.length,g=h;for(h&&r.push("-");g<t;){var w=c,E=!0,S=!1,F=void 0;try{for(var x,O=e[Symbol.iterator]();!(E=(x=O.next()).done);E=!0){var _=x.value;_>=a&&_<w&&(w=_)}}catch(e){S=!0,F=e}finally{try{!E&&O.return&&O.return()}finally{if(S)throw F}}var D=g+1;w-a>m((c-o)/D)&&v("overflow"),o+=(w-a)*D,a=w;var $=!0,k=!1,j=void 0;try{for(var I,A=e[Symbol.iterator]();!($=(I=A.next()).done);$=!0){var C=I.value;if(C<a&&++o>c&&v("overflow"),C==a){for(var R=o,N=36;;N+=36){var L=N<=i?1:N>=i+26?26:N-i;if(R<L)break;var T=R-L,z=36-L;r.push(f(b(L+T%z,0))),R=m(T/z)}r.push(f(b(R,0))),i=P(o,D,g==h),o=0,++g}}}catch(e){k=!0,j=e}finally{try{!$&&A.return&&A.return()}finally{if(k)throw j}}++o,++a}return r.join("")},S=function(e){return g(e,(function(e){return d.test(e)?"xn--"+E(e):e}))},F=function(e){return g(e,(function(e){return u.test(e)?w(e.slice(4).toLowerCase()):e}))},x={};function O(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function _(e){for(var r="",t=0,a=e.length;t<a;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(a-t>=6){var i=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&i)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(a-t>=9){var n=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&n)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function D(e,r){function t(e){var t=_(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,O).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,O).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,O).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,O).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,O).replace(r.PCT_ENCODED,o)),e}function $(e){return e.replace(/^0*(.*)/,"$1")||"0"}function k(e,r){var t=e.match(r.IPV4ADDRESS)||[],a=l(t,2)[1];return a?a.split(".").map($).join("."):e}function j(e,r){var t=e.match(r.IPV6ADDRESS)||[],a=l(t,3),o=a[1],i=a[2];if(o){for(var n=o.toLowerCase().split("::").reverse(),s=l(n,2),c=s[0],u=s[1],d=u?u.split(":").map($):[],p=c.split(":").map($),h=r.IPV4ADDRESS.test(p[p.length-1]),m=h?7:8,f=p.length-m,v=Array(m),g=0;g<m;++g)v[g]=d[g]||p[f+g]||"";h&&(v[m-1]=k(v[m-1],r));var y=v.reduce((function(e,r,t){if(!r||"0"===r){var a=e[e.length-1];a&&a.index+a.length===t?a.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(y&&y.length>1){var P=v.slice(0,y.index),w=v.slice(y.index+y.length);b=P.join(":")+"::"+w.join(":")}else b=v.join(":");return i&&(b+="%"+i),b}return e}var I=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,A=void 0==="".match(/(){0}/)[1];function C(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},a=!1!==r.iri?s:n;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(I);if(o){A?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=j(k(t.host,a),a)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var i=x[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||i&&i.unicodeSupport)D(t,a);else{if(t.host&&(r.domainHost||i&&i.domainHost))try{t.host=S(t.host.replace(a.PCT_ENCODED,_).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}D(t,n)}i&&i.parse&&i.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function R(e,r){var t=!1!==r.iri?s:n,a=[];return void 0!==e.userinfo&&(a.push(e.userinfo),a.push("@")),void 0!==e.host&&a.push(j(k(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(a.push(":"),a.push(String(e.port))),a.length?a.join(""):void 0}var N=/^\.\.?\//,L=/^\/\.(\/|$)/,T=/^\/\.\.(\/|$)/,z=/^\/?(?:.|\n)*?(?=\/|$)/;function q(e){for(var r=[];e.length;)if(e.match(N))e=e.replace(N,"");else if(e.match(L))e=e.replace(L,"/");else if(e.match(T))e=e.replace(T,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(z);if(!t)throw new Error("Unexpected dot segment condition");var a=t[0];e=e.slice(a.length),r.push(a)}return r.join("")}function V(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?s:n,a=[],o=x[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?F(e.host):S(e.host.replace(t.PCT_ENCODED,_).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}D(e,t),"suffix"!==r.reference&&e.scheme&&(a.push(e.scheme),a.push(":"));var i=R(e,r);if(void 0!==i&&("suffix"!==r.reference&&a.push("//"),a.push(i),e.path&&"/"!==e.path.charAt(0)&&a.push("/")),void 0!==e.path){var l=e.path;r.absolutePath||o&&o.absolutePath||(l=q(l)),void 0===i&&(l=l.replace(/^\/\//,"/%2F")),a.push(l)}return void 0!==e.query&&(a.push("?"),a.push(e.query)),void 0!==e.fragment&&(a.push("#"),a.push(e.fragment)),a.join("")}function W(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],o={};return a||(e=C(V(e,t),t),r=C(V(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=q(r.path||""),o.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=q(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=q(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=q(o.path)),o.query=r.query):(o.path=e.path,void 0!==r.query?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function M(e,r){return e&&e.toString().replace(r&&r.iri?s.PCT_ENCODED:n.PCT_ENCODED,_)}var B={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},Q={scheme:"https",domainHost:B.domainHost,parse:B.parse,serialize:B.serialize};function U(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var H={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=U(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(U(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),a=l(t,2),o=a[0],i=a[1];e.path=o&&"/"!==o?o:void 0,e.query=i,e.resourceName=void 0}return e.fragment=void 0,e}},K={scheme:"wss",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize},G={},J="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Z="[0-9A-Fa-f]",Y=t(t("%[EFef]"+Z+"%"+Z+Z+"%"+Z+Z)+"|"+t("%[89A-Fa-f]"+Z+"%"+Z+Z)+"|"+t("%"+Z+Z)),X=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),ee=new RegExp(J,"g"),re=new RegExp(Y,"g"),te=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',X),"g"),ae=new RegExp(r("[^]",J,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),oe=ae;function ie(e){var r=_(e);return r.match(ee)?r:e}var ne={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,i={},n=t.query.split("&"),s=0,l=n.length;s<l;++s){var c=n[s].split("=");switch(c[0]){case"to":for(var u=c[1].split(","),d=0,p=u.length;d<p;++d)a.push(u[d]);break;case"subject":t.subject=M(c[1],r);break;case"body":t.body=M(c[1],r);break;default:o=!0,i[M(c[0],r)]=M(c[1],r)}}o&&(t.headers=i)}t.query=void 0;for(var h=0,m=a.length;h<m;++h){var f=a[h].split("@");if(f[0]=M(f[0]),r.unicodeSupport)f[1]=M(f[1],r).toLowerCase();else try{f[1]=S(M(f[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}a[h]=f.join("@")}return t},serialize:function(e,r){var t,a=e,i=null!=(t=e.to)?t instanceof Array?t:"number"!=typeof t.length||t.split||t.setInterval||t.call?[t]:Array.prototype.slice.call(t):[];if(i){for(var n=0,s=i.length;n<s;++n){var l=String(i[n]),c=l.lastIndexOf("@"),u=l.slice(0,c).replace(re,ie).replace(re,o).replace(te,O),d=l.slice(c+1);try{d=r.iri?F(d):S(M(d,r).toLowerCase())}catch(e){a.error=a.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}i[n]=u+"@"+d}a.path=i.join(",")}var p=e.headers=e.headers||{};e.subject&&(p.subject=e.subject),e.body&&(p.body=e.body);var h=[];for(var m in p)p[m]!==G[m]&&h.push(m.replace(re,ie).replace(re,o).replace(ae,O)+"="+p[m].replace(re,ie).replace(re,o).replace(oe,O));return h.length&&(a.query=h.join("&")),a}},se=/^([^\:]+)\:(.*)/,le={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(se),a=e;if(t){var o=r.scheme||a.scheme||"urn",i=t[1].toLowerCase(),n=t[2],s=o+":"+(r.nid||i),l=x[s];a.nid=i,a.nss=n,a.path=void 0,l&&(a=l.parse(a,r))}else a.error=a.error||"URN can not be parsed.";return a},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",a=e.nid,o=t+":"+(r.nid||a),i=x[o];i&&(e=i.serialize(e,r));var n=e,s=e.nss;return n.path=(a||r.nid)+":"+s,n}},ce=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ue={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match(ce)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};x[B.scheme]=B,x[Q.scheme]=Q,x[H.scheme]=H,x[K.scheme]=K,x[ne.scheme]=ne,x[le.scheme]=le,x[ue.scheme]=ue,e.SCHEMES=x,e.pctEncChar=O,e.pctDecChars=_,e.parse=C,e.removeDotSegments=q,e.serialize=V,e.resolveComponents=W,e.resolve=function(e,r,t){var a=function(e,r){var t=e;if(r)for(var a in r)t[a]=r[a];return t}({scheme:"null"},t);return V(W(C(e,a),C(r,a),a,!0),a)},e.normalize=function(e,r){return"string"==typeof e?e=V(C(e,r),r):"object"===a(e)&&(e=C(V(e,r),r)),e},e.equal=function(e,r,t){return"string"==typeof e?e=V(C(e,t),t):"object"===a(e)&&(e=V(e,t)),"string"==typeof r?r=V(C(r,t),t):"object"===a(r)&&(r=V(r,t)),e===r},e.escapeComponent=function(e,r){return e&&e.toString().replace(r&&r.iri?s.ESCAPE:n.ESCAPE,O)},e.unescapeComponent=M,Object.defineProperty(e,"__esModule",{value:!0})}(r)}));(_=D)&&_.__esModule&&Object.prototype.hasOwnProperty.call(_,"default")&&_.default;var $=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 a,o,i;if(Array.isArray(r)){if((a=r.length)!=t.length)return!1;for(o=a;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((a=(i=Object.keys(r)).length)!==Object.keys(t).length)return!1;for(o=a;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,i[o]))return!1;for(o=a;0!=o--;){var n=i[o];if(!e(r[n],t[n]))return!1}return!0}return r!=r&&t!=t},k={copy:function(e,r){for(var t in r=r||{},e)r[t]=e[t];return r},checkDataType:j,checkDataTypes:function(e,r,t){switch(e.length){case 1:return j(e[0],r,t,!0);default:var a="",o=A(e);for(var i in o.array&&o.object&&(a=o.null?"(":"(!"+r+" || ",a+="typeof "+r+' !== "object")',delete o.null,delete o.array,delete o.object),o.number&&delete o.integer,o)a+=(a?" && ":"")+j(i,r,t,!0);return a}},coerceToTypes:function(e,r){if(Array.isArray(r)){for(var t=[],a=0;a<r.length;a++){var o=r[a];(I[o]||"array"===e&&"array"===o)&&(t[t.length]=o)}if(t.length)return t}else{if(I[r])return[r];if("array"===e&&"array"===r)return["array"]}},toHash:A,getProperty:N,escapeQuotes:L,equal:$,ucs2length:function(e){for(var r,t=0,a=e.length,o=0;o<a;)t++,(r=e.charCodeAt(o++))>=55296&&r<=56319&&o<a&&56320==(64512&(r=e.charCodeAt(o)))&&o++;return t},varOccurences:function(e,r){r+="[^0-9]";var t=e.match(new RegExp(r,"g"));return t?t.length:0},varReplace:function(e,r,t){return r+="([^0-9])",t=t.replace(/\$/g,"$$$$"),e.replace(new RegExp(r,"g"),t+"$1")},schemaHasRules:function(e,r){if("boolean"==typeof e)return!e;for(var t in e)if(r[t])return!0},schemaHasRulesExcept:function(e,r,t){if("boolean"==typeof e)return!e&&"not"!=t;for(var a in e)if(a!=t&&r[a])return!0},schemaUnknownRules:function(e,r){if("boolean"==typeof e)return;for(var t in e)if(!r[t])return t},toQuotedString:T,getPathExpr:function(e,r,t,a){return V(e,t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'")},getPath:function(e,r,t){var a=T(t?"/"+W(r):N(r));return V(e,a)},getData:function(e,r,t){var a,o,i,n;if(""===e)return"rootData";if("/"==e[0]){if(!z.test(e))throw new Error("Invalid JSON-pointer: "+e);o=e,i="rootData"}else{if(!(n=e.match(q)))throw new Error("Invalid JSON-pointer: "+e);if(a=+n[1],"#"==(o=n[2])){if(a>=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(i="data"+(r-a||""),!o)return i}for(var s=i,l=o.split("/"),c=0;c<l.length;c++){var u=l[c];u&&(i+=N(M(u)),s+=" && "+i)}return s},unescapeFragment:function(e){return M(decodeURIComponent(e))},unescapeJsonPointer:M,escapeFragment:function(e){return encodeURIComponent(W(e))},escapeJsonPointer:W};function j(e,r,t,a){var o=a?" !== ":" === ",i=a?" || ":" && ",n=a?"!":"",s=a?"":"!";switch(e){case"null":return r+o+"null";case"array":return n+"Array.isArray("+r+")";case"object":return"("+n+r+i+"typeof "+r+o+'"object"'+i+s+"Array.isArray("+r+"))";case"integer":return"(typeof "+r+o+'"number"'+i+s+"("+r+" % 1)"+i+r+o+r+(t?i+n+"isFinite("+r+")":"")+")";case"number":return"(typeof "+r+o+'"'+e+'"'+(t?i+n+"isFinite("+r+")":"")+")";default:return"typeof "+r+o+'"'+e+'"'}}var I=A(["string","number","integer","boolean","null"]);function A(e){for(var r={},t=0;t<e.length;t++)r[e[t]]=!0;return r}var C=/^[a-z$_][a-z$_0-9]*$/i,R=/'|\\/g;function N(e){return"number"==typeof e?"["+e+"]":C.test(e)?"."+e:"['"+L(e)+"']"}function L(e){return e.replace(R,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function T(e){return"'"+L(e)+"'"}var z=/^\/(?:[^~]|~0|~1)*$/,q=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function V(e,r){return'""'==e?r:(e+" + "+r).replace(/([^\\])' \+ '/g,"$1")}function W(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function M(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}var B=function(e){k.copy(e,this)};var Q=x((function(e){var r=e.exports=function(e,t,a){"function"==typeof t&&(a=t,t={}),function e(t,a,o,i,n,s,l,c,u,d){if(i&&"object"==typeof i&&!Array.isArray(i)){for(var p in a(i,n,s,l,c,u,d),i){var h=i[p];if(Array.isArray(h)){if(p in r.arrayKeywords)for(var m=0;m<h.length;m++)e(t,a,o,h[m],n+"/"+p+"/"+m,s,n,p,i,m)}else if(p in r.propsKeywords){if(h&&"object"==typeof h)for(var f in h)e(t,a,o,h[f],n+"/"+p+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),s,n,p,i,f)}else(p in r.keywords||t.allKeys&&!(p in r.skipKeywords))&&e(t,a,o,h,n+"/"+p,s,n,p,i)}o(i,n,s,l,c,u,d)}}(t,"function"==typeof(a=t.cb||a)?a:a.pre||function(){},a.post||function(){},e,"",e)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}})),U=H;function H(e,r,t){var a=this._refs[t];if("string"==typeof a){if(!this._refs[a])return H.call(this,e,r,a);a=this._refs[a]}if((a=a||this._schemas[t])instanceof B)return X(a.schema,this._opts.inlineRefs)?a.schema:a.validate||this._compile(a);var o,i,n,s=K.call(this,r,t);return s&&(o=s.schema,r=s.root,n=s.baseId),o instanceof B?i=o.validate||e.call(this,o.schema,r,void 0,n):void 0!==o&&(i=X(o,this._opts.inlineRefs)?o:e.call(this,o,r,void 0,n)),i}function K(e,r){var t=D.parse(r),a=re(t),o=ee(this._getId(e.schema));if(0===Object.keys(e.schema).length||a!==o){var i=ae(a),n=this._refs[i];if("string"==typeof n)return G.call(this,e,n,t);if(n instanceof B)n.validate||this._compile(n),e=n;else{if(!((n=this._schemas[i])instanceof B))return;if(n.validate||this._compile(n),i==ae(r))return{schema:n,root:e,baseId:o};e=n}if(!e.schema)return;o=ee(this._getId(e.schema))}return Z.call(this,t,o,e.schema,e)}function G(e,r,t){var a=K.call(this,e,r);if(a){var o=a.schema,i=a.baseId;e=a.root;var n=this._getId(o);return n&&(i=oe(i,n)),Z.call(this,t,i,o,e)}}H.normalizeId=ae,H.fullPath=ee,H.url=oe,H.ids=function(e){var r=ae(this._getId(e)),t={"":r},a={"":ee(r,!1)},o={},i=this;return Q(e,{allKeys:!0},(function(e,r,n,s,l,c,u){if(""!==r){var d=i._getId(e),p=t[s],h=a[s]+"/"+l;if(void 0!==u&&(h+="/"+("number"==typeof u?u:k.escapeFragment(u))),"string"==typeof d){d=p=ae(p?D.resolve(p,d):d);var m=i._refs[d];if("string"==typeof m&&(m=i._refs[m]),m&&m.schema){if(!$(e,m.schema))throw new Error('id "'+d+'" resolves to more than one schema')}else if(d!=ae(h))if("#"==d[0]){if(o[d]&&!$(e,o[d]))throw new Error('id "'+d+'" resolves to more than one schema');o[d]=e}else i._refs[d]=h}t[r]=p,a[r]=h}})),o},H.inlineRef=X,H.schema=K;var J=k.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function Z(e,r,t,a){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var o=e.fragment.split("/"),i=1;i<o.length;i++){var n=o[i];if(n){if(void 0===(t=t[n=k.unescapeFragment(n)]))break;var s;if(!J[n]&&((s=this._getId(t))&&(r=oe(r,s)),t.$ref)){var l=oe(r,t.$ref),c=K.call(this,a,l);c&&(t=c.schema,a=c.root,r=c.baseId)}}}return void 0!==t&&t!==a.schema?{schema:t,root:a,baseId:r}:void 0}}var Y=k.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function X(e,r){return!1!==r&&(void 0===r||!0===r?function e(r){var t;if(Array.isArray(r)){for(var a=0;a<r.length;a++)if("object"==typeof(t=r[a])&&!e(t))return!1}else for(var o in r){if("$ref"==o)return!1;if("object"==typeof(t=r[o])&&!e(t))return!1}return!0}(e):r?function e(r){var t,a=0;if(Array.isArray(r)){for(var o=0;o<r.length;o++)if("object"==typeof(t=r[o])&&(a+=e(t)),a==1/0)return 1/0}else for(var i in r){if("$ref"==i)return 1/0;if(Y[i])a++;else if("object"==typeof(t=r[i])&&(a+=e(t)+1),a==1/0)return 1/0}return a}(e)<=r:void 0)}function ee(e,r){return!1!==r&&(e=ae(e)),re(D.parse(e))}function re(e){return D.serialize(e).split("#")[0]+"#"}var te=/#\/?$/;function ae(e){return e?e.replace(te,""):""}function oe(e,r){return r=ae(r),D.resolve(e,r)}var ie={Validation:se((function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:se(ne)};function ne(e,r,t){this.message=t||ne.message(e,r),this.missingRef=U.url(e,r),this.missingSchema=U.normalizeId(U.fullPath(this.missingRef))}function se(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}ne.message=function(e,r){return"can't resolve reference "+r+" from id "+e};var le=function(e,r){r||(r={}),"function"==typeof r&&(r={cmp:r});var t="boolean"==typeof r.cycles&&r.cycles,a=r.cmp&&function(e){return function(r){return function(t,a){var o={key:t,value:r[t]},i={key:a,value:r[a]};return e(o,i)}}}(r.cmp),o=[];return function e(r){if(r&&r.toJSON&&"function"==typeof r.toJSON&&(r=r.toJSON()),void 0!==r){if("number"==typeof r)return isFinite(r)?""+r:"null";if("object"!=typeof r)return JSON.stringify(r);var i,n;if(Array.isArray(r)){for(n="[",i=0;i<r.length;i++)i&&(n+=","),n+=e(r[i])||"null";return n+"]"}if(null===r)return"null";if(-1!==o.indexOf(r)){if(t)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=o.push(r)-1,l=Object.keys(r).sort(a&&a(r));for(n="",i=0;i<l.length;i++){var c=l[i],u=e(r[c]);u&&(n&&(n+=","),n+=JSON.stringify(c)+":"+u)}return o.splice(s,1),"{"+n+"}"}}(e)},ce=function(e,r,t){var a="",o=!0===e.schema.$async,i=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),n=e.self._getId(e.schema);if(e.opts.strictKeywords){var s=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(s){var l="unknown keyword: "+s;if("log"!==e.opts.strictKeywords)throw new Error(l);e.logger.warn(l)}}if(e.isTop&&(a+=" var validate = ",o&&(e.async=!0,a+="async "),a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",n&&(e.opts.sourceCode||e.opts.processCode)&&(a+=" /*# sourceURL="+n+" */ ")),"boolean"==typeof e.schema||!i&&!e.schema.$ref){var c=e.level,u=e.dataLevel,d=e.schema["false schema"],p=e.schemaPath+e.util.getProperty("false schema"),h=e.errSchemaPath+"/false schema",m=!e.opts.allErrors,f="data"+(u||""),v="valid"+c;if(!1===e.schema){e.isTop?m=!0:a+=" var "+v+" = false; ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'boolean schema is false' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";var g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?a+=o?" return data; ":" validate.errors = null; return true; ":a+=" var "+v+" = true; ";return e.isTop&&(a+=" }; return validate; "),a}if(e.isTop){var y=e.isTop;c=e.level=0,u=e.dataLevel=0,f="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var b="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}a+=" var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data; "}else{c=e.level,f="data"+((u=e.dataLevel)||"");if(n&&(e.baseId=e.resolve.url(e.baseId,n)),o&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+c+" = errors;"}v="valid"+c,m=!e.opts.allErrors;var P="",w="",E=e.schema.type,S=Array.isArray(E);if(E&&e.opts.nullable&&!0===e.schema.nullable&&(S?-1==E.indexOf("null")&&(E=E.concat("null")):"null"!=E&&(E=[E,"null"],S=!0)),S&&1==E.length&&(E=E[0],S=!1),e.schema.$ref&&i){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(i=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(a+=" "+e.RULES.all.$comment.code(e,"$comment")),E){if(e.opts.coerceTypes)var F=e.util.coerceToTypes(e.opts.coerceTypes,E);var x=e.RULES.types[E];if(F||S||!0===x||x&&!Z(x)){p=e.schemaPath+".type",h=e.errSchemaPath+"/type",p=e.schemaPath+".type",h=e.errSchemaPath+"/type";var O=S?"checkDataTypes":"checkDataType";if(a+=" if ("+e.util[O](E,f,e.opts.strictNumbers,!0)+") { ",F){var _="dataType"+c,D="coerced"+c;a+=" var "+_+" = typeof "+f+"; var "+D+" = undefined; ","array"==e.opts.coerceTypes&&(a+=" if ("+_+" == 'object' && Array.isArray("+f+") && "+f+".length == 1) { "+f+" = "+f+"[0]; "+_+" = typeof "+f+"; if ("+e.util.checkDataType(e.schema.type,f,e.opts.strictNumbers)+") "+D+" = "+f+"; } "),a+=" if ("+D+" !== undefined) ; ";var $=F;if($)for(var k,j=-1,I=$.length-1;j<I;)"string"==(k=$[j+=1])?a+=" else if ("+_+" == 'number' || "+_+" == 'boolean') "+D+" = '' + "+f+"; else if ("+f+" === null) "+D+" = ''; ":"number"==k||"integer"==k?(a+=" else if ("+_+" == 'boolean' || "+f+" === null || ("+_+" == 'string' && "+f+" && "+f+" == +"+f+" ","integer"==k&&(a+=" && !("+f+" % 1)"),a+=")) "+D+" = +"+f+"; "):"boolean"==k?a+=" else if ("+f+" === 'false' || "+f+" === 0 || "+f+" === null) "+D+" = false; else if ("+f+" === 'true' || "+f+" === 1) "+D+" = true; ":"null"==k?a+=" else if ("+f+" === '' || "+f+" === 0 || "+f+" === false) "+D+" = null; ":"array"==e.opts.coerceTypes&&"array"==k&&(a+=" else if ("+_+" == 'string' || "+_+" == 'number' || "+_+" == 'boolean' || "+f+" == null) "+D+" = ["+f+"]; ");a+=" else { ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } if ("+D+" !== undefined) { ";var A=u?"data"+(u-1||""):"parentData";a+=" "+f+" = "+D+"; ",u||(a+="if ("+A+" !== undefined)"),a+=" "+A+"["+(u?e.dataPathArr[u]:"parentDataProperty")+"] = "+D+"; } "}else{(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } "}}if(e.schema.$ref&&!i)a+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",m&&(a+=" } if (errors === ",a+=y?"0":"errs_"+c,a+=") { ",w+="}");else{var C=e.RULES;if(C)for(var R=-1,N=C.length-1;R<N;)if(Z(x=C[R+=1])){if(x.type&&(a+=" if ("+e.util.checkDataType(x.type,f,e.opts.strictNumbers)+") { "),e.opts.useDefaults)if("object"==x.type&&e.schema.properties){d=e.schema.properties;var L=Object.keys(d);if(L)for(var T,z=-1,q=L.length-1;z<q;){if(void 0!==(M=d[T=L[z+=1]]).default){var V=f+e.util.getProperty(T);if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+V;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+V+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+V+" === null || "+V+" === '' "),a+=" ) "+V+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(M.default)+" ":a+=" "+JSON.stringify(M.default)+" ",a+="; "}}}else if("array"==x.type&&Array.isArray(e.schema.items)){var W=e.schema.items;if(W){j=-1;for(var M,B=W.length-1;j<B;)if(void 0!==(M=W[j+=1]).default){V=f+"["+j+"]";if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+V;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+V+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+V+" === null || "+V+" === '' "),a+=" ) "+V+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(M.default)+" ":a+=" "+JSON.stringify(M.default)+" ",a+="; "}}}var Q=x.rules;if(Q)for(var U,H=-1,K=Q.length-1;H<K;)if(Y(U=Q[H+=1])){var G=U.code(e,U.keyword,x.type);G&&(a+=" "+G+" ",m&&(P+="}"))}if(m&&(a+=" "+P+" ",P=""),x.type&&(a+=" } ",E&&E===x.type&&!F)){a+=" else { ";var J;p=e.schemaPath+".type",h=e.errSchemaPath+"/type";(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}m&&(a+=" if (errors === ",a+=y?"0":"errs_"+c,a+=") { ",w+="}")}}function Z(e){for(var r=e.rules,t=0;t<r.length;t++)if(Y(r[t]))return!0}function Y(r){return void 0!==e.schema[r.keyword]||r.implements&&function(r){for(var t=r.implements,a=0;a<t.length;a++)if(void 0!==e.schema[t[a]])return!0}(r)}return m&&(a+=" "+w+" "),y?(o?(a+=" if (errors === 0) return data; ",a+=" else throw new ValidationError(vErrors); "):(a+=" validate.errors = vErrors; ",a+=" return errors === 0; "),a+=" }; return validate;"):a+=" var "+v+" = errors === errs_"+c+";",a},ue=k.ucs2length,de=ie.Validation,pe=function e(r,t,a,o){var i=this,n=this._opts,s=[void 0],l={},c=[],u={},d=[],p={},h=[];t=t||{schema:r,refVal:s,refs:l};var m=he.call(this,r,t,o),f=this._compilations[m.index];if(m.compiling)return f.callValidate=function e(){var r=f.validate,t=r.apply(this,arguments);return e.errors=r.errors,t};var v=this._formats,g=this.RULES;try{var y=P(r,t,a,o);f.validate=y;var b=f.callValidate;return b&&(b.schema=y.schema,b.errors=null,b.refs=y.refs,b.refVal=y.refVal,b.root=y.root,b.$async=y.$async,n.sourceCode&&(b.source=y.source)),y}finally{me.call(this,r,t,o)}function P(r,a,o,u){var p=!a||a&&a.schema==r;if(a.schema!=t.schema)return e.call(i,r,a,o,u);var m,f=!0===r.$async,y=ce({isTop:!0,schema:r,isRoot:p,baseId:u,root:a,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:ie.MissingRef,RULES:g,validate:ce,util:k,resolve:U,resolveRef:w,usePattern:F,useDefault:x,useCustomRule:O,opts:n,formats:v,logger:i.logger,self:i});y=Pe(s,ye)+Pe(c,ve)+Pe(d,ge)+Pe(h,be)+y,n.processCode&&(y=n.processCode(y,r));try{m=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",y)(i,g,v,t,s,d,h,$,ue,de),s[0]=m}catch(e){throw i.logger.error("Error compiling schema, function code:",y),e}return m.schema=r,m.errors=null,m.refs=l,m.refVal=s,m.root=p?m:a,f&&(m.$async=!0),!0===n.sourceCode&&(m.source={code:y,patterns:c,defaults:d}),m}function w(r,o,c){o=U.url(r,o);var u,d,p=l[o];if(void 0!==p)return S(u=s[p],d="refVal["+p+"]");if(!c&&t.refs){var h=t.refs[o];if(void 0!==h)return S(u=t.refVal[h],d=E(o,u))}d=E(o);var m=U.call(i,P,t,o);if(void 0===m){var f=a&&a[o];f&&(m=U.inlineRef(f,n.inlineRefs)?f:e.call(i,f,t,a,r))}if(void 0!==m)return function(e,r){var t=l[e];s[t]=r}(o,m),S(m,d);!function(e){delete l[e]}(o)}function E(e,r){var t=s.length;return s[t]=r,l[e]=t,"refVal"+t}function S(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}function F(e){var r=u[e];return void 0===r&&(r=u[e]=c.length,c[r]=e),"pattern"+r}function x(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return k.toQuotedString(e);case"object":if(null===e)return"null";var r=le(e),t=p[r];return void 0===t&&(t=p[r]=d.length,d[t]=e),"default"+t}}function O(e,r,t,a){if(!1!==i._opts.validateSchema){var o=e.definition.dependencies;if(o&&!o.every((function(e){return Object.prototype.hasOwnProperty.call(t,e)})))throw new Error("parent schema must have all required keywords: "+o.join(","));var s=e.definition.validateSchema;if(s)if(!s(r)){var l="keyword schema is invalid: "+i.errorsText(s.errors);if("log"!=i._opts.validateSchema)throw new Error(l);i.logger.error(l)}}var c,u=e.definition.compile,d=e.definition.inline,p=e.definition.macro;if(u)c=u.call(i,r,t,a);else if(p)c=p.call(i,r,t,a),!1!==n.validateSchema&&i.validateSchema(c,!0);else if(d)c=d.call(i,a,e.keyword,r,t);else if(!(c=e.definition.validate))return;if(void 0===c)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var m=h.length;return h[m]=c,{code:"customRule"+m,validate:c}}};function he(e,r,t){var a=fe.call(this,e,r,t);return a>=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}function me(e,r,t){var a=fe.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}function fe(e,r,t){for(var a=0;a<this._compilations.length;a++){var o=this._compilations[a];if(o.schema==e&&o.root==r&&o.baseId==t)return a}return-1}function ve(e,r){return"var pattern"+e+" = new RegExp("+k.toQuotedString(r[e])+");"}function ge(e){return"var default"+e+" = defaults["+e+"];"}function ye(e,r){return void 0===r[e]?"":"var refVal"+e+" = refVal["+e+"];"}function be(e){return"var customRule"+e+" = customRules["+e+"];"}function Pe(e,r){if(!e.length)return"";for(var t="",a=0;a<e.length;a++)t+=r(a,e);return t}var we=x((function(e){var r=e.exports=function(){this._cache={}};r.prototype.put=function(e,r){this._cache[e]=r},r.prototype.get=function(e){return this._cache[e]},r.prototype.del=function(e){delete this._cache[e]},r.prototype.clear=function(){this._cache={}}})),Ee=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Se=[0,31,28,31,30,31,30,31,31,30,31,30,31],Fe=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,xe=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,Oe=/^(?:[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,_e=/^(?:(?:[^\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,De=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,$e=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,ke=/^(?:\/(?:[^~/]|~0|~1)*)*$/,je=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Ie=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,Ae=Ce;function Ce(e){return e="full"==e?"full":"fast",k.copy(Ce[e])}function Re(e){var r=e.match(Ee);if(!r)return!1;var t=+r[1],a=+r[2],o=+r[3];return a>=1&&a<=12&&o>=1&&o<=(2==a&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(t)?29:Se[a])}function Ne(e,r){var t=e.match(Fe);if(!t)return!1;var a=t[1],o=t[2],i=t[3],n=t[5];return(a<=23&&o<=59&&i<=59||23==a&&59==o&&60==i)&&(!r||n)}Ce.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":_e,url:De,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:xe,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:qe,uuid:$e,"json-pointer":ke,"json-pointer-uri-fragment":je,"relative-json-pointer":Ie},Ce.full={date:Re,time:Ne,"date-time":function(e){var r=e.split(Le);return 2==r.length&&Re(r[0])&&Ne(r[1],!0)},uri:function(e){return Te.test(e)&&Oe.test(e)},"uri-reference":/^(?:[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,"uri-template":_e,url:De,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:xe,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:qe,uuid:$e,"json-pointer":ke,"json-pointer-uri-fragment":je,"relative-json-pointer":Ie};var Le=/t|\s/i;var Te=/\/|:/;var ze=/[^\\]\\Z/;function qe(e){if(ze.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var Ve=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s;var h="maximum"==r,m=h?"exclusiveMaximum":"exclusiveMinimum",f=e.schema[m],v=e.opts.$data&&f&&f.$data,g=h?"<":">",y=h?">":"<",b=void 0;if(!p&&"number"!=typeof s&&void 0!==s)throw new Error(r+" must be number");if(!v&&void 0!==f&&"number"!=typeof f&&"boolean"!=typeof f)throw new Error(m+" must be number or boolean");if(v){var P=e.util.getData(f.$data,n,e.dataPathArr),w="exclusive"+i,E="exclType"+i,S="exclIsNumber"+i,F="' + "+(_="op"+i)+" + '";o+=" var schemaExcl"+i+" = "+P+"; ",o+=" var "+w+"; var "+E+" = typeof "+(P="schemaExcl"+i)+"; if ("+E+" != 'boolean' && "+E+" != 'undefined' && "+E+" != 'number') { ";var x;b=m;(x=x||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(o+=" , message: '"+m+" should be boolean' "),e.opts.verbose&&(o+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var O=o;o=x.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+E+" == 'number' ? ( ("+w+" = "+a+" === undefined || "+P+" "+g+"= "+a+") ? "+d+" "+y+"= "+P+" : "+d+" "+y+" "+a+" ) : ( ("+w+" = "+P+" === true) ? "+d+" "+y+"= "+a+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { var op"+i+" = "+w+" ? '"+g+"' : '"+g+"='; ",void 0===s&&(b=m,c=e.errSchemaPath+"/"+m,a=P,p=v)}else{F=g;if((S="number"==typeof f)&&p){var _="'"+F+"'";o+=" if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" ( "+a+" === undefined || "+f+" "+g+"= "+a+" ? "+d+" "+y+"= "+f+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { "}else{S&&void 0===s?(w=!0,b=m,c=e.errSchemaPath+"/"+m,a=f,y+="="):(S&&(a=Math[h?"min":"max"](f,s)),f===(!S||a)?(w=!0,b=m,c=e.errSchemaPath+"/"+m,y+="="):(w=!1,F+="="));_="'"+F+"'";o+=" if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+" "+y+" "+a+" || "+d+" !== "+d+") { "}}b=b||r,(x=x||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+_+", limit: "+a+", exclusive: "+w+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be "+F+" ",o+=p?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";O=o;return o=x.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",u&&(o+=" else { "),o},We=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+".length "+("maxItems"==r?">":"<")+" "+a+") { ";var h=r,m=m||[];m.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(h||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxItems"==r?"more":"fewer",o+=" than ",o+=p?"' + "+a+" + '":""+s,o+=" items' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=m.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},Me=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");var h="maxLength"==r?">":"<";o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),!1===e.opts.unicode?o+=" "+d+".length ":o+=" ucs2length("+d+") ",o+=" "+h+" "+a+") { ";var m=r,f=f||[];f.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(m||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT be ",o+="maxLength"==r?"longer":"shorter",o+=" than ",o+=p?"' + "+a+" + '":""+s,o+=" characters' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var v=o;return o=f.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+v+"]); ":o+=" validate.errors = ["+v+"]; return false; ":o+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},Be=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" Object.keys("+d+").length "+("maxProperties"==r?">":"<")+" "+a+") { ";var h=r,m=m||[];m.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(h||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxProperties"==r?"more":"fewer",o+=" than ",o+=p?"' + "+a+" + '":""+s,o+=" properties' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=m.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},Qe={$ref:function(e,r,t){var a,o,i=" ",n=e.level,s=e.dataLevel,l=e.schema[r],c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(s||""),p="valid"+n;if("#"==l||"#/"==l)e.isRoot?(a=e.async,o="validate"):(a=!0===e.root.schema.$async,o="root.refVal[0]");else{var h=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===h){var m=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(m),(y=y||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(i+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(i+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var f=i;i=y.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+f+"]); ":i+=" validate.errors = ["+f+"]; return false; ":i+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(i+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,l,m);e.logger.warn(m),u&&(i+=" if (true) { ")}}else if(h.inline){var v=e.util.copy(e);v.level++;var g="valid"+v.level;v.schema=h.schema,v.schemaPath="",v.errSchemaPath=l,i+=" "+e.validate(v).replace(/validate\.schema/g,h.code)+" ",u&&(i+=" if ("+g+") { ")}else a=!0===h.$async||e.async&&!1!==h.$async,o=h.code}if(o){var y;(y=y||[]).push(i),i="",e.opts.passContext?i+=" "+o+".call(this, ":i+=" "+o+"( ",i+=" "+d+", (dataPath || '')",'""'!=e.errorPath&&(i+=" + "+e.errorPath);var b=i+=" , "+(s?"data"+(s-1||""):"parentData")+" , "+(s?e.dataPathArr[s]:"parentDataProperty")+", rootData) ";if(i=y.pop(),a){if(!e.async)throw new Error("async schema referenced by sync schema");u&&(i+=" var "+p+"; "),i+=" try { await "+b+"; ",u&&(i+=" "+p+" = true; "),i+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",u&&(i+=" "+p+" = false; "),i+=" } ",u&&(i+=" if ("+p+") { ")}else i+=" if (!"+b+") { if (vErrors === null) vErrors = "+o+".errors; else vErrors = vErrors.concat("+o+".errors); errors = vErrors.length; } ",u&&(i+=" else { ")}return i},allOf:function(e,r,t){var a=" ",o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,s=!e.opts.allErrors,l=e.util.copy(e),c="";l.level++;var u="valid"+l.level,d=l.baseId,p=!0,h=o;if(h)for(var m,f=-1,v=h.length-1;f<v;)m=h[f+=1],(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0||!1===m:e.util.schemaHasRules(m,e.RULES.all))&&(p=!1,l.schema=m,l.schemaPath=i+"["+f+"]",l.errSchemaPath=n+"/"+f,a+=" "+e.validate(l)+" ",l.baseId=d,s&&(a+=" if ("+u+") { ",c+="}"));return s&&(a+=p?" if (true) { ":" "+c.slice(0,-1)+" "),a},anyOf:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e),m="";h.level++;var f="valid"+h.level;if(n.every((function(r){return e.opts.strictKeywords?"object"==typeof r&&Object.keys(r).length>0||!1===r:e.util.schemaHasRules(r,e.RULES.all)}))){var v=h.baseId;a+=" var "+p+" = errors; var "+d+" = false; ";var g=e.compositeRule;e.compositeRule=h.compositeRule=!0;var y=n;if(y)for(var b,P=-1,w=y.length-1;P<w;)b=y[P+=1],h.schema=b,h.schemaPath=s+"["+P+"]",h.errSchemaPath=l+"/"+P,a+=" "+e.validate(h)+" ",h.baseId=v,a+=" "+d+" = "+d+" || "+f+"; if (!"+d+") { ",m+="}";e.compositeRule=h.compositeRule=g,a+=" "+m+" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else c&&(a+=" if (true) { ");return a},$comment:function(e,r,t){var a=" ",o=e.schema[r],i=e.errSchemaPath+"/"+r;e.opts.allErrors;var n=e.util.toQuotedString(o);return!0===e.opts.$comment?a+=" console.log("+n+");":"function"==typeof e.opts.$comment&&(a+=" self._opts.$comment("+n+", "+e.util.toQuotedString(i)+", validate.root.schema);"),a},const:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p=e.opts.$data&&n&&n.$data;p&&(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; "),p||(a+=" var schema"+o+" = validate.schema"+s+";"),a+="var "+d+" = equal("+u+", schema"+o+"); if (!"+d+") { ";var h=h||[];h.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValue: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var m=a;return a=h.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+m+"]); ":a+=" validate.errors = ["+m+"]; return false; ":a+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",c&&(a+=" else { "),a},contains:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e);h.level++;var m="valid"+h.level,f="i"+o,v=h.dataLevel=e.dataLevel+1,g="data"+v,y=e.baseId,b=e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all);if(a+="var "+p+" = errors;var "+d+";",b){var P=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.schema=n,h.schemaPath=s,h.errSchemaPath=l,a+=" var "+m+" = false; for (var "+f+" = 0; "+f+" < "+u+".length; "+f+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers,!0);var w=u+"["+f+"]";h.dataPathArr[v]=f;var E=e.validate(h);h.baseId=y,e.util.varOccurences(E,g)<2?a+=" "+e.util.varReplace(E,g,w)+" ":a+=" var "+g+" = "+w+"; "+E+" ",a+=" if ("+m+") break; } ",e.compositeRule=h.compositeRule=P,a+=" if (!"+m+") {"}else a+=" if ("+u+".length == 0) {";var S=S||[];S.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should contain a valid item' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var F=a;return a=S.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+F+"]); ":a+=" validate.errors = ["+F+"]; return false; ":a+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",b&&(a+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a},dependencies:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e),h="";p.level++;var m="valid"+p.level,f={},v={},g=e.opts.ownProperties;for(w in n)if("__proto__"!=w){var y=n[w],b=Array.isArray(y)?v:f;b[w]=y}a+="var "+d+" = errors;";var P=e.errorPath;for(var w in a+="var missing"+o+";",v)if((b=v[w]).length){if(a+=" if ( "+u+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),c){a+=" && ( ";var E=b;if(E)for(var S=-1,F=E.length-1;S<F;){k=E[S+=1],S&&(a+=" || "),a+=" ( ( "+(C=u+(A=e.util.getProperty(k)))+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(k)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?k:A)+") ) "}a+=")) { ";var x="missing"+o,O="' + "+x+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,x,!0):P+" + "+x);var _=_||[];_.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var D=a;a=_.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+D+"]); ":a+=" validate.errors = ["+D+"]; return false; ":a+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{a+=" ) { ";var $=b;if($)for(var k,j=-1,I=$.length-1;j<I;){k=$[j+=1];var A=e.util.getProperty(k),C=(O=e.util.escapeQuotes(k),u+A);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,k,e.opts.jsonPointers)),a+=" if ( "+C+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(k)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",c&&(h+="}",a+=" else { ")}e.errorPath=P;var R=p.baseId;for(var w in f){y=f[w];(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all))&&(a+=" "+m+" = true; if ( "+u+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),a+=") { ",p.schema=y,p.schemaPath=s+e.util.getProperty(w),p.errSchemaPath=l+"/"+e.util.escapeFragment(w),a+=" "+e.validate(p)+" ",p.baseId=R,a+=" } ",c&&(a+=" if ("+m+") { ",h+="}"))}return c&&(a+=" "+h+" if ("+d+" == errors) {"),a},enum:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p=e.opts.$data&&n&&n.$data;p&&(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ");var h="i"+o,m="schema"+o;p||(a+=" var "+m+" = validate.schema"+s+";"),a+="var "+d+";",p&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=d+" = false;for (var "+h+"=0; "+h+"<"+m+".length; "+h+"++) if (equal("+u+", "+m+"["+h+"])) { "+d+" = true; break; }",p&&(a+=" } "),a+=" if (!"+d+") { ";var f=f||[];f.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var v=a;return a=f.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+v+"]); ":a+=" validate.errors = ["+v+"]; return false; ":a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",c&&(a+=" else { "),a},format:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||"");if(!1===e.opts.format)return c&&(a+=" if (true) { "),a;var d,p=e.opts.$data&&n&&n.$data;p?(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",d="schema"+o):d=n;var h=e.opts.unknownFormats,m=Array.isArray(h);if(p){a+=" var "+(f="format"+o)+" = formats["+d+"]; var "+(v="isObject"+o)+" = typeof "+f+" == 'object' && !("+f+" instanceof RegExp) && "+f+".validate; var "+(g="formatType"+o)+" = "+v+" && "+f+".type || 'string'; if ("+v+") { ",e.async&&(a+=" var async"+o+" = "+f+".async; "),a+=" "+f+" = "+f+".validate; } if ( ",p&&(a+=" ("+d+" !== undefined && typeof "+d+" != 'string') || "),a+=" (","ignore"!=h&&(a+=" ("+d+" && !"+f+" ",m&&(a+=" && self._opts.unknownFormats.indexOf("+d+") == -1 "),a+=") || "),a+=" ("+f+" && "+g+" == '"+t+"' && !(typeof "+f+" == 'function' ? ",e.async?a+=" (async"+o+" ? await "+f+"("+u+") : "+f+"("+u+")) ":a+=" "+f+"("+u+") ",a+=" : "+f+".test("+u+"))))) {"}else{var f;if(!(f=e.formats[n])){if("ignore"==h)return e.logger.warn('unknown format "'+n+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(a+=" if (true) { "),a;if(m&&h.indexOf(n)>=0)return c&&(a+=" if (true) { "),a;throw new Error('unknown format "'+n+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,g=(v="object"==typeof f&&!(f instanceof RegExp)&&f.validate)&&f.type||"string";if(v){var y=!0===f.async;f=f.validate}if(g!=t)return c&&(a+=" if (true) { "),a;if(y){if(!e.async)throw new Error("async format in sync schema");a+=" if (!(await "+(b="formats"+e.util.getProperty(n)+".validate")+"("+u+"))) { "}else{a+=" if (! ";var b="formats"+e.util.getProperty(n);v&&(b+=".validate"),a+="function"==typeof f?" "+b+"("+u+") ":" "+b+".test("+u+") ",a+=") { "}}var P=P||[];P.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",a+=p?""+d:""+e.util.toQuotedString(n),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",a+=p?"' + "+d+" + '":""+e.util.escapeQuotes(n),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=p?"validate.schema"+s:""+e.util.toQuotedString(n),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var w=a;return a=P.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",c&&(a+=" else { "),a},if:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e);h.level++;var m="valid"+h.level,f=e.schema.then,v=e.schema.else,g=void 0!==f&&(e.opts.strictKeywords?"object"==typeof f&&Object.keys(f).length>0||!1===f:e.util.schemaHasRules(f,e.RULES.all)),y=void 0!==v&&(e.opts.strictKeywords?"object"==typeof v&&Object.keys(v).length>0||!1===v:e.util.schemaHasRules(v,e.RULES.all)),b=h.baseId;if(g||y){var P;h.createErrors=!1,h.schema=n,h.schemaPath=s,h.errSchemaPath=l,a+=" var "+p+" = errors; var "+d+" = true; ";var w=e.compositeRule;e.compositeRule=h.compositeRule=!0,a+=" "+e.validate(h)+" ",h.baseId=b,h.createErrors=!0,a+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",e.compositeRule=h.compositeRule=w,g?(a+=" if ("+m+") { ",h.schema=e.schema.then,h.schemaPath=e.schemaPath+".then",h.errSchemaPath=e.errSchemaPath+"/then",a+=" "+e.validate(h)+" ",h.baseId=b,a+=" "+d+" = "+m+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'then'; ":P="'then'",a+=" } ",y&&(a+=" else { ")):a+=" if (!"+m+") { ",y&&(h.schema=e.schema.else,h.schemaPath=e.schemaPath+".else",h.errSchemaPath=e.errSchemaPath+"/else",a+=" "+e.validate(h)+" ",h.baseId=b,a+=" "+d+" = "+m+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'else'; ":P="'else'",a+=" } "),a+=" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+P+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match \"' + "+P+" + '\" schema' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",c&&(a+=" else { ")}else c&&(a+=" if (true) { ");return a},items:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e),m="";h.level++;var f="valid"+h.level,v="i"+o,g=h.dataLevel=e.dataLevel+1,y="data"+g,b=e.baseId;if(a+="var "+p+" = errors;var "+d+";",Array.isArray(n)){var P=e.schema.additionalItems;if(!1===P){a+=" "+d+" = "+u+".length <= "+n.length+"; ";var w=l;l=e.errSchemaPath+"/additionalItems",a+=" if (!"+d+") { ";var E=E||[];E.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+n.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+n.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var S=a;a=E.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",l=w,c&&(m+="}",a+=" else { ")}var F=n;if(F)for(var x,O=-1,_=F.length-1;O<_;)if(x=F[O+=1],e.opts.strictKeywords?"object"==typeof x&&Object.keys(x).length>0||!1===x:e.util.schemaHasRules(x,e.RULES.all)){a+=" "+f+" = true; if ("+u+".length > "+O+") { ";var D=u+"["+O+"]";h.schema=x,h.schemaPath=s+"["+O+"]",h.errSchemaPath=l+"/"+O,h.errorPath=e.util.getPathExpr(e.errorPath,O,e.opts.jsonPointers,!0),h.dataPathArr[g]=O;var $=e.validate(h);h.baseId=b,e.util.varOccurences($,y)<2?a+=" "+e.util.varReplace($,y,D)+" ":a+=" var "+y+" = "+D+"; "+$+" ",a+=" } ",c&&(a+=" if ("+f+") { ",m+="}")}if("object"==typeof P&&(e.opts.strictKeywords?"object"==typeof P&&Object.keys(P).length>0||!1===P:e.util.schemaHasRules(P,e.RULES.all))){h.schema=P,h.schemaPath=e.schemaPath+".additionalItems",h.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+f+" = true; if ("+u+".length > "+n.length+") { for (var "+v+" = "+n.length+"; "+v+" < "+u+".length; "+v+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=u+"["+v+"]";h.dataPathArr[g]=v;$=e.validate(h);h.baseId=b,e.util.varOccurences($,y)<2?a+=" "+e.util.varReplace($,y,D)+" ":a+=" var "+y+" = "+D+"; "+$+" ",c&&(a+=" if (!"+f+") break; "),a+=" } } ",c&&(a+=" if ("+f+") { ",m+="}")}}else if(e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all)){h.schema=n,h.schemaPath=s,h.errSchemaPath=l,a+=" for (var "+v+" = 0; "+v+" < "+u+".length; "+v+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=u+"["+v+"]";h.dataPathArr[g]=v;$=e.validate(h);h.baseId=b,e.util.varOccurences($,y)<2?a+=" "+e.util.varReplace($,y,D)+" ":a+=" var "+y+" = "+D+"; "+$+" ",c&&(a+=" if (!"+f+") break; "),a+=" }"}return c&&(a+=" "+m+" if ("+p+" == errors) {"),a},maximum:Ve,minimum:Ve,maxItems:We,minItems:We,maxLength:Me,minLength:Me,maxProperties:Be,minProperties:Be,multipleOf:function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");o+="var division"+i+";if (",p&&(o+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),o+=" (division"+i+" = "+d+" / "+a+", ",e.opts.multipleOfPrecision?o+=" Math.abs(Math.round(division"+i+") - division"+i+") > 1e-"+e.opts.multipleOfPrecision+" ":o+=" division"+i+" !== parseInt(division"+i+") ",o+=" ) ",p&&(o+=" ) "),o+=" ) { ";var h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be multiple of ",o+=p?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var m=o;return o=h.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},not:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level;if(e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all)){p.schema=n,p.schemaPath=s,p.errSchemaPath=l,a+=" var "+d+" = errors; ";var m,f=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.createErrors=!1,p.opts.allErrors&&(m=p.opts.allErrors,p.opts.allErrors=!1),a+=" "+e.validate(p)+" ",p.createErrors=!0,m&&(p.opts.allErrors=m),e.compositeRule=p.compositeRule=f,a+=" if ("+h+") { ";var v=v||[];v.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var g=a;a=v.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(a+=" if (false) { ");return a},oneOf:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e),m="";h.level++;var f="valid"+h.level,v=h.baseId,g="prevValid"+o,y="passingSchemas"+o;a+="var "+p+" = errors , "+g+" = false , "+d+" = false , "+y+" = null; ";var b=e.compositeRule;e.compositeRule=h.compositeRule=!0;var P=n;if(P)for(var w,E=-1,S=P.length-1;E<S;)w=P[E+=1],(e.opts.strictKeywords?"object"==typeof w&&Object.keys(w).length>0||!1===w:e.util.schemaHasRules(w,e.RULES.all))?(h.schema=w,h.schemaPath=s+"["+E+"]",h.errSchemaPath=l+"/"+E,a+=" "+e.validate(h)+" ",h.baseId=v):a+=" var "+f+" = true; ",E&&(a+=" if ("+f+" && "+g+") { "+d+" = false; "+y+" = ["+y+", "+E+"]; } else { ",m+="}"),a+=" if ("+f+") { "+d+" = "+g+" = true; "+y+" = "+E+"; }";return e.compositeRule=h.compositeRule=b,a+=m+"if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a},pattern:function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'string') || "),o+=" !"+(p?"(new RegExp("+a+"))":e.usePattern(s))+".test("+d+") ) { ";var h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { pattern: ",o+=p?""+a:""+e.util.toQuotedString(s),o+=" } ",!1!==e.opts.messages&&(o+=" , message: 'should match pattern \"",o+=p?"' + "+a+" + '":""+e.util.escapeQuotes(s),o+="\"' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+e.util.toQuotedString(s),o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var m=o;return o=h.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},properties:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e),h="";p.level++;var m="valid"+p.level,f="key"+o,v="idx"+o,g=p.dataLevel=e.dataLevel+1,y="data"+g,b="dataProperties"+o,P=Object.keys(n||{}).filter(A),w=e.schema.patternProperties||{},E=Object.keys(w).filter(A),S=e.schema.additionalProperties,F=P.length||E.length,x=!1===S,O="object"==typeof S&&Object.keys(S).length,_=e.opts.removeAdditional,D=x||O||_,$=e.opts.ownProperties,k=e.baseId,j=e.schema.required;if(j&&(!e.opts.$data||!j.$data)&&j.length<e.opts.loopRequired)var I=e.util.toHash(j);function A(e){return"__proto__"!==e}if(a+="var "+d+" = errors;var "+m+" = true;",$&&(a+=" var "+b+" = undefined;"),D){if(a+=$?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+u+") { ",F){if(a+=" var isAdditional"+o+" = !(false ",P.length)if(P.length>8)a+=" || validate.schema"+s+".hasOwnProperty("+f+") ";else{var C=P;if(C)for(var R=-1,N=C.length-1;R<N;)G=C[R+=1],a+=" || "+f+" == "+e.util.toQuotedString(G)+" "}if(E.length){var L=E;if(L)for(var T=-1,z=L.length-1;T<z;)ie=L[T+=1],a+=" || "+e.usePattern(ie)+".test("+f+") "}a+=" ); if (isAdditional"+o+") { "}if("all"==_)a+=" delete "+u+"["+f+"]; ";else{var q=e.errorPath,V="' + "+f+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers)),x)if(_)a+=" delete "+u+"["+f+"]; ";else{a+=" "+m+" = false; ";var W=l;l=e.errSchemaPath+"/additionalProperties",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { additionalProperty: '"+V+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is an invalid additional property":a+="should NOT have additional properties",a+="' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var M=a;a=te.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+M+"]); ":a+=" validate.errors = ["+M+"]; return false; ":a+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=W,c&&(a+=" break; ")}else if(O)if("failing"==_){a+=" var "+d+" = errors; ";var B=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=S,p.schemaPath=e.schemaPath+".additionalProperties",p.errSchemaPath=e.errSchemaPath+"/additionalProperties",p.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);var Q=u+"["+f+"]";p.dataPathArr[g]=f;var U=e.validate(p);p.baseId=k,e.util.varOccurences(U,y)<2?a+=" "+e.util.varReplace(U,y,Q)+" ":a+=" var "+y+" = "+Q+"; "+U+" ",a+=" if (!"+m+") { errors = "+d+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+u+"["+f+"]; } ",e.compositeRule=p.compositeRule=B}else{p.schema=S,p.schemaPath=e.schemaPath+".additionalProperties",p.errSchemaPath=e.errSchemaPath+"/additionalProperties",p.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);Q=u+"["+f+"]";p.dataPathArr[g]=f;U=e.validate(p);p.baseId=k,e.util.varOccurences(U,y)<2?a+=" "+e.util.varReplace(U,y,Q)+" ":a+=" var "+y+" = "+Q+"; "+U+" ",c&&(a+=" if (!"+m+") break; ")}e.errorPath=q}F&&(a+=" } "),a+=" } ",c&&(a+=" if ("+m+") { ",h+="}")}var H=e.opts.useDefaults&&!e.compositeRule;if(P.length){var K=P;if(K)for(var G,J=-1,Z=K.length-1;J<Z;){var Y=n[G=K[J+=1]];if(e.opts.strictKeywords?"object"==typeof Y&&Object.keys(Y).length>0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all)){var X=e.util.getProperty(G),ee=(Q=u+X,H&&void 0!==Y.default);p.schema=Y,p.schemaPath=s+X,p.errSchemaPath=l+"/"+e.util.escapeFragment(G),p.errorPath=e.util.getPath(e.errorPath,G,e.opts.jsonPointers),p.dataPathArr[g]=e.util.toQuotedString(G);U=e.validate(p);if(p.baseId=k,e.util.varOccurences(U,y)<2){U=e.util.varReplace(U,y,Q);var re=Q}else{re=y;a+=" var "+y+" = "+Q+"; "}if(ee)a+=" "+U+" ";else{if(I&&I[G]){a+=" if ( "+re+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+m+" = false; ";q=e.errorPath,W=l;var te,ae=e.util.escapeQuotes(G);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(q,G,e.opts.jsonPointers)),l=e.errSchemaPath+"/required",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+ae+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+ae+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";M=a;a=te.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+M+"]); ":a+=" validate.errors = ["+M+"]; return false; ":a+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=W,e.errorPath=q,a+=" } else { "}else c?(a+=" if ( "+re+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+m+" = true; } else { "):(a+=" if ("+re+" !== undefined ",$&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=" ) { ");a+=" "+U+" } "}}c&&(a+=" if ("+m+") { ",h+="}")}}if(E.length){var oe=E;if(oe)for(var ie,ne=-1,se=oe.length-1;ne<se;){Y=w[ie=oe[ne+=1]];if(e.opts.strictKeywords?"object"==typeof Y&&Object.keys(Y).length>0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all)){p.schema=Y,p.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(ie),p.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(ie),a+=$?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+u+") { ",a+=" if ("+e.usePattern(ie)+".test("+f+")) { ",p.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);Q=u+"["+f+"]";p.dataPathArr[g]=f;U=e.validate(p);p.baseId=k,e.util.varOccurences(U,y)<2?a+=" "+e.util.varReplace(U,y,Q)+" ":a+=" var "+y+" = "+Q+"; "+U+" ",c&&(a+=" if (!"+m+") break; "),a+=" } ",c&&(a+=" else "+m+" = true; "),a+=" } ",c&&(a+=" if ("+m+") { ",h+="}")}}}return c&&(a+=" "+h+" if ("+d+" == errors) {"),a},propertyNames:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level;if(a+="var "+d+" = errors;",e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all)){p.schema=n,p.schemaPath=s,p.errSchemaPath=l;var m="key"+o,f="idx"+o,v="i"+o,g="' + "+m+" + '",y="data"+(p.dataLevel=e.dataLevel+1),b="dataProperties"+o,P=e.opts.ownProperties,w=e.baseId;P&&(a+=" var "+b+" = undefined; "),a+=P?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+f+"=0; "+f+"<"+b+".length; "+f+"++) { var "+m+" = "+b+"["+f+"]; ":" for (var "+m+" in "+u+") { ",a+=" var startErrs"+o+" = errors; ";var E=m,S=e.compositeRule;e.compositeRule=p.compositeRule=!0;var F=e.validate(p);p.baseId=w,e.util.varOccurences(F,y)<2?a+=" "+e.util.varReplace(F,y,E)+" ":a+=" var "+y+" = "+E+"; "+F+" ",e.compositeRule=p.compositeRule=S,a+=" if (!"+h+") { for (var "+v+"=startErrs"+o+"; "+v+"<errors; "+v+"++) { vErrors["+v+"].propertyName = "+m+"; } var err = ",!1!==e.createErrors?(a+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { propertyName: '"+g+"' } ",!1!==e.opts.messages&&(a+=" , message: 'property name \\'"+g+"\\' is invalid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),c&&(a+=" break; "),a+=" } }"}return c&&(a+=" if ("+d+" == errors) {"),a},required:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p=e.opts.$data&&n&&n.$data;p&&(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ");var h="schema"+o;if(!p)if(n.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var m=[],f=n;if(f)for(var v,g=-1,y=f.length-1;g<y;){v=f[g+=1];var b=e.schema.properties[v];b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0||!1===b:e.util.schemaHasRules(b,e.RULES.all))||(m[m.length]=v)}}else m=n;if(p||m.length){var P=e.errorPath,w=p||m.length>=e.opts.loopRequired,E=e.opts.ownProperties;if(c)if(a+=" var missing"+o+"; ",w){p||(a+=" var "+h+" = validate.schema"+s+"; ");var S="' + "+($="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,$,e.opts.jsonPointers)),a+=" var "+d+" = true; ",p&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=" for (var "+O+" = 0; "+O+" < "+h+".length; "+O+"++) { "+d+" = "+u+"["+h+"["+O+"]] !== undefined ",E&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", "+h+"["+O+"]) "),a+="; if (!"+d+") break; } ",p&&(a+=" } "),a+=" if (!"+d+") { ",(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var F=a;a=D.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+F+"]); ":a+=" validate.errors = ["+F+"]; return false; ":a+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var x=m;if(x)for(var O=-1,_=x.length-1;O<_;){j=x[O+=1],O&&(a+=" || "),a+=" ( ( "+(R=u+(C=e.util.getProperty(j)))+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(j)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?j:C)+") ) "}a+=") { ";var D;S="' + "+($="missing"+o)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,$,!0):P+" + "+$),(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";F=a;a=D.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+F+"]); ":a+=" validate.errors = ["+F+"]; return false; ":a+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(w){p||(a+=" var "+h+" = validate.schema"+s+"; ");var $;S="' + "+($="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,$,e.opts.jsonPointers)),p&&(a+=" if ("+h+" && !Array.isArray("+h+")) { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+h+" !== undefined) { "),a+=" for (var "+O+" = 0; "+O+" < "+h+".length; "+O+"++) { if ("+u+"["+h+"["+O+"]] === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", "+h+"["+O+"]) "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",p&&(a+=" } ")}else{var k=m;if(k)for(var j,I=-1,A=k.length-1;I<A;){j=k[I+=1];var C=e.util.getProperty(j),R=(S=e.util.escapeQuotes(j),u+C);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,j,e.opts.jsonPointers)),a+=" if ( "+R+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(j)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=P}else c&&(a+=" if (true) {");return a},uniqueItems:function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p="valid"+i,h=e.opts.$data&&s&&s.$data;if(h?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,(s||h)&&!1!==e.opts.uniqueItems){h&&(o+=" var "+p+"; if ("+a+" === false || "+a+" === undefined) "+p+" = true; else if (typeof "+a+" != 'boolean') "+p+" = false; else { "),o+=" var i = "+d+".length , "+p+" = true , j; if (i > 1) { ";var m=e.schema.items&&e.schema.items.type,f=Array.isArray(m);if(!m||"object"==m||"array"==m||f&&(m.indexOf("object")>=0||m.indexOf("array")>=0))o+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+d+"[i], "+d+"[j])) { "+p+" = false; break outer; } } } ";else{o+=" var itemIndices = {}, item; for (;i--;) { var item = "+d+"[i]; ";var v="checkDataType"+(f?"s":"");o+=" if ("+e.util[v](m,"item",e.opts.strictNumbers,!0)+") continue; ",f&&(o+=" if (typeof item == 'string') item = '\"' + item; "),o+=" if (typeof itemIndices[item] == 'number') { "+p+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}o+=" } ",h&&(o+=" } "),o+=" if (!"+p+") { ";var g=g||[];g.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(o+=" , schema: ",o+=h?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var y=o;o=g.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+y+"]); ":o+=" validate.errors = ["+y+"]; return false; ":o+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",u&&(o+=" else { ")}else u&&(o+=" if (true) { ");return o},validate:ce},Ue=k.toHash,He=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"],Ke=function(e,r){for(var t=0;t<r.length;t++){e=JSON.parse(JSON.stringify(e));var a,o=r[t].split("/"),i=e;for(a=1;a<o.length;a++)i=i[o[a]];for(a=0;a<He.length;a++){var n=He[a],s=i[n];s&&(i[n]={anyOf:[s,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e},Ge=ie.MissingRef,Je=function e(r,t,a){var o=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof t&&(a=t,t=void 0);var i=n(r).then((function(){var e=o._addSchema(r,void 0,t);return e.validate||function e(r){try{return o._compile(r)}catch(e){if(e instanceof Ge)return a(e);throw e}function a(a){var i=a.missingSchema;if(c(i))throw new Error("Schema "+i+" is loaded but "+a.missingRef+" cannot be resolved");var s=o._loadingSchemas[i];return s||(s=o._loadingSchemas[i]=o._opts.loadSchema(i)).then(l,l),s.then((function(e){if(!c(i))return n(e).then((function(){c(i)||o.addSchema(e,i,void 0,t)}))})).then((function(){return e(r)}));function l(){delete o._loadingSchemas[i]}function c(e){return o._refs[e]||o._schemas[e]}}}(e)}));a&&i.then((function(e){a(null,e)}),a);return i;function n(r){var t=r.$schema;return t&&!o.getSchema(t)?e.call(o,{$ref:t},!0):Promise.resolve()}};var Ze=function(e,r,t){var a,o,i=" ",n=e.level,s=e.dataLevel,l=e.schema[r],c=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,d=!e.opts.allErrors,p="data"+(s||""),h="valid"+n,m="errs__"+n,f=e.opts.$data&&l&&l.$data;f?(i+=" var schema"+n+" = "+e.util.getData(l.$data,s,e.dataPathArr)+"; ",o="schema"+n):o=l;var v,g,y,b,P,w="definition"+n,E=this.definition,S="";if(f&&E.$data){P="keywordValidate"+n;var F=E.validateSchema;i+=" var "+w+" = RULES.custom['"+r+"'].definition; var "+P+" = "+w+".validate;"}else{if(!(b=e.useCustomRule(this,l,e.schema,e)))return;o="validate.schema"+c,P=b.code,v=E.compile,g=E.inline,y=E.macro}var x=P+".errors",O="i"+n,_="ruleErr"+n,D=E.async;if(D&&!e.async)throw new Error("async keyword in sync schema");if(g||y||(i+=x+" = null;"),i+="var "+m+" = errors;var "+h+";",f&&E.$data&&(S+="}",i+=" if ("+o+" === undefined) { "+h+" = true; } else { ",F&&(S+="}",i+=" "+h+" = "+w+".validateSchema("+o+"); if ("+h+") { ")),g)E.statements?i+=" "+b.validate+" ":i+=" "+h+" = "+b.validate+"; ";else if(y){var $=e.util.copy(e);S="";$.level++;var k="valid"+$.level;$.schema=b.validate,$.schemaPath="";var j=e.compositeRule;e.compositeRule=$.compositeRule=!0;var I=e.validate($).replace(/validate\.schema/g,P);e.compositeRule=$.compositeRule=j,i+=" "+I}else{(N=N||[]).push(i),i="",i+=" "+P+".call( ",e.opts.passContext?i+="this":i+="self",v||!1===E.schema?i+=" , "+p+" ":i+=" , "+o+" , "+p+" , validate.schema"+e.schemaPath+" ",i+=" , (dataPath || '')",'""'!=e.errorPath&&(i+=" + "+e.errorPath);var A=s?"data"+(s-1||""):"parentData",C=s?e.dataPathArr[s]:"parentDataProperty",R=i+=" , "+A+" , "+C+" , rootData ) ";i=N.pop(),!1===E.errors?(i+=" "+h+" = ",D&&(i+="await "),i+=R+"; "):i+=D?" var "+(x="customErrors"+n)+" = null; try { "+h+" = await "+R+"; } catch (e) { "+h+" = false; if (e instanceof ValidationError) "+x+" = e.errors; else throw e; } ":" "+x+" = null; "+h+" = "+R+"; "}if(E.modifying&&(i+=" if ("+A+") "+p+" = "+A+"["+C+"];"),i+=""+S,E.valid)d&&(i+=" if (true) { ");else{var N;i+=" if ( ",void 0===E.valid?(i+=" !",i+=y?""+k:""+h):i+=" "+!E.valid+" ",i+=") { ",a=this.keyword,(N=N||[]).push(i),i="",(N=N||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(i+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var L=i;i=N.pop(),!e.compositeRule&&d?e.async?i+=" throw new ValidationError(["+L+"]); ":i+=" validate.errors = ["+L+"]; return false; ":i+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var T=i;i=N.pop(),g?E.errors?"full"!=E.errors&&(i+=" for (var "+O+"="+m+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(i+=" "+_+".schema = "+o+"; "+_+".data = "+p+"; "),i+=" } "):!1===E.errors?i+=" "+T+" ":(i+=" if ("+m+" == errors) { "+T+" } else { for (var "+O+"="+m+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(i+=" "+_+".schema = "+o+"; "+_+".data = "+p+"; "),i+=" } } "):y?(i+=" var err = ",!1!==e.createErrors?(i+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(i+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&d&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; ")):!1===E.errors?i+=" "+T+" ":(i+=" if (Array.isArray("+x+")) { if (vErrors === null) vErrors = "+x+"; else vErrors = vErrors.concat("+x+"); errors = vErrors.length; for (var "+O+"="+m+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; "+_+'.schemaPath = "'+u+'"; ',e.opts.verbose&&(i+=" "+_+".schema = "+o+"; "+_+".data = "+p+"; "),i+=" } } else { "+T+" } "),i+=" } ",d&&(i+=" else { ")}return i},Ye="http://json-schema.org/draft-07/schema#",Xe="http://json-schema.org/draft-07/schema#",er="Core schema meta-schema",rr={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},tr=["object","boolean"],ar={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},or={$schema:Ye,$id:Xe,title:er,definitions:rr,type:tr,properties:ar,default:!0},ir=O(Object.freeze({__proto__:null,$schema:Ye,$id:Xe,title:er,definitions:rr,type:tr,properties:ar,default:or})),nr={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:ir.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:ir.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}},sr=/^[a-z_$][a-z0-9_$-]*$/i,lr=function(e,r){var t=this.RULES;if(t.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!sr.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(r){this.validateKeyword(r,!0);var a=r.type;if(Array.isArray(a))for(var o=0;o<a.length;o++)n(e,a[o],r);else n(e,a,r);var i=r.metaSchema;i&&(r.$data&&this._opts.$data&&(i={anyOf:[i,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),r.validateSchema=this.compile(i,!0))}function n(e,r,a){for(var o,i=0;i<t.length;i++){var n=t[i];if(n.type==r){o=n;break}}o||(o={type:r,rules:[]},t.push(o));var s={keyword:e,definition:a,custom:!0,code:Ze,implements:a.implements};o.rules.push(s),t.custom[e]=s}return t.keywords[e]=t.all[e]=!0,this},cr=function(e){var r=this.RULES.custom[e];return r?r.definition:this.RULES.keywords[e]||!1},ur=function(e){var r=this.RULES;delete r.keywords[e],delete r.all[e],delete r.custom[e];for(var t=0;t<r.length;t++)for(var a=r[t].rules,o=0;o<a.length;o++)if(a[o].keyword==e){a.splice(o,1);break}return this},dr=function e(r,t){e.errors=null;var a=this._validateKeyword=this._validateKeyword||this.compile(nr,!0);if(a(r))return!0;if(e.errors=a.errors,t)throw new Error("custom keyword definition is invalid: "+this.errorsText(a.errors));return!1};var pr="http://json-schema.org/draft-07/schema#",hr="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",mr="Meta-schema for $data reference (JSON Schema extension proposal)",fr=["$data"],vr={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},gr={$schema:pr,$id:hr,description:mr,type:"object",required:fr,properties:vr,additionalProperties:!1},yr=O(Object.freeze({__proto__:null,$schema:pr,$id:hr,description:mr,type:"object",required:fr,properties:vr,additionalProperties:!1,default:gr})),br=Sr;Sr.prototype.validate=function(e,r){var t;if("string"==typeof e){if(!(t=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);t=a.validate||this._compile(a)}var o=t(r);!0!==t.$async&&(this.errors=t.errors);return o},Sr.prototype.compile=function(e,r){var t=this._addSchema(e,void 0,r);return t.validate||this._compile(t)},Sr.prototype.addSchema=function(e,r,t,a){if(Array.isArray(e)){for(var o=0;o<e.length;o++)this.addSchema(e[o],void 0,t,a);return this}var i=this._getId(e);if(void 0!==i&&"string"!=typeof i)throw new Error("schema id must be string");return $r(this,r=U.normalizeId(r||i)),this._schemas[r]=this._addSchema(e,t,a,!0),this},Sr.prototype.addMetaSchema=function(e,r,t){return this.addSchema(e,r,t,!0),this},Sr.prototype.validateSchema=function(e,r){var t=e.$schema;if(void 0!==t&&"string"!=typeof t)throw new Error("$schema must be a string");if(!(t=t||this._opts.defaultMeta||function(e){var r=e._opts.meta;return e._opts.defaultMeta="object"==typeof r?e._getId(r)||r:e.getSchema(Pr)?Pr:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var a=this.validate(t,e);if(!a&&r){var o="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(o);this.logger.error(o)}return a},Sr.prototype.getSchema=function(e){var r=Fr(this,e);switch(typeof r){case"object":return r.validate||this._compile(r);case"string":return this.getSchema(r);case"undefined":return function(e,r){var t=U.schema.call(e,{schema:{}},r);if(t){var a=t.schema,o=t.root,i=t.baseId,n=pe.call(e,a,o,void 0,i);return e._fragments[r]=new B({ref:r,fragment:!0,schema:a,root:o,baseId:i,validate:n}),n}}(this,e)}},Sr.prototype.removeSchema=function(e){if(e instanceof RegExp)return xr(this,this._schemas,e),xr(this,this._refs,e),this;switch(typeof e){case"undefined":return xr(this,this._schemas),xr(this,this._refs),this._cache.clear(),this;case"string":var r=Fr(this,e);return r&&this._cache.del(r.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var t=this._opts.serialize,a=t?t(e):e;this._cache.del(a);var o=this._getId(e);o&&(o=U.normalizeId(o),delete this._schemas[o],delete this._refs[o])}return this},Sr.prototype.addFormat=function(e,r){"string"==typeof r&&(r=new RegExp(r));return this._formats[e]=r,this},Sr.prototype.errorsText=function(e,r){if(!(e=e||this.errors))return"No errors";for(var t=void 0===(r=r||{}).separator?", ":r.separator,a=void 0===r.dataVar?"data":r.dataVar,o="",i=0;i<e.length;i++){var n=e[i];n&&(o+=a+n.dataPath+" "+n.message+t)}return o.slice(0,-t.length)},Sr.prototype._addSchema=function(e,r,t,a){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var o=this._opts.serialize,i=o?o(e):e,n=this._cache.get(i);if(n)return n;a=a||!1!==this._opts.addUsedSchema;var s=U.normalizeId(this._getId(e));s&&a&&$r(this,s);var l,c=!1!==this._opts.validateSchema&&!r;c&&!(l=s&&s==U.normalizeId(e.$schema))&&this.validateSchema(e,!0);var u=U.ids.call(this,e),d=new B({id:s,schema:e,localRefs:u,cacheKey:i,meta:t});"#"!=s[0]&&a&&(this._refs[s]=d);this._cache.put(i,d),c&&l&&this.validateSchema(e,!0);return d},Sr.prototype._compile=function(e,r){if(e.compiling)return e.validate=o,o.schema=e.schema,o.errors=null,o.root=r||o,!0===e.schema.$async&&(o.$async=!0),o;var t,a;e.compiling=!0,e.meta&&(t=this._opts,this._opts=this._metaOpts);try{a=pe.call(this,e.schema,r,e.localRefs)}catch(r){throw delete e.validate,r}finally{e.compiling=!1,e.meta&&(this._opts=t)}return e.validate=a,e.refs=a.refs,e.refVal=a.refVal,e.root=a.root,a;function o(){var r=e.validate,t=r.apply(this,arguments);return o.errors=r.errors,t}},Sr.prototype.compileAsync=Je,Sr.prototype.addKeyword=lr,Sr.prototype.getKeyword=cr,Sr.prototype.removeKeyword=ur,Sr.prototype.validateKeyword=dr,Sr.ValidationError=ie.Validation,Sr.MissingRefError=ie.MissingRef,Sr.$dataMetaSchema=Ke;var Pr="http://json-schema.org/draft-07/schema",wr=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],Er=["/properties"];function Sr(e){if(!(this instanceof Sr))return new Sr(e);var r,t;e=this._opts=k.copy(e)||{},function(e){var r=e._opts.logger;if(!1===r)e.logger={log:kr,warn:kr,error:kr};else{if(void 0===r&&(r=console),!("object"==typeof r&&r.log&&r.warn&&r.error))throw new Error("logger must implement log, warn and error methods");e.logger=r}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=Ae(e.format),this._cache=e.cache||new we,this._loadingSchemas={},this._compilations=[],this.RULES=((r=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}]).all=Ue(t=["type","$comment"]),r.types=Ue(["number","integer","string","array","object","boolean","null"]),r.forEach((function(e){e.rules=e.rules.map((function(e){var a;if("object"==typeof e){var o=Object.keys(e)[0];a=e[o],e=o,a.forEach((function(e){t.push(e),r.all[e]=!0}))}return t.push(e),r.all[e]={keyword:e,code:Qe[e],implements:a}})),r.all.$comment={keyword:"$comment",code:Qe.$comment},e.type&&(r.types[e.type]=e)})),r.keywords=Ue(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),r.custom={},r),this._getId=function(e){switch(e.schemaId){case"auto":return Dr;case"id":return Or;default:return _r}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=le),this._metaOpts=function(e){for(var r=k.copy(e._opts),t=0;t<wr.length;t++)delete r[wr[t]];return r}(this),e.formats&&function(e){for(var r in e._opts.formats){var t=e._opts.formats[r];e.addFormat(r,t)}}(this),e.keywords&&function(e){for(var r in e._opts.keywords){var t=e._opts.keywords[r];e.addKeyword(r,t)}}(this),function(e){var r;e._opts.$data&&(r=yr,e.addMetaSchema(r,r.$id,!0));if(!1===e._opts.meta)return;var t=ir;e._opts.$data&&(t=Ke(t,Er));e.addMetaSchema(t,Pr,!0),e._refs["http://json-schema.org/schema"]=Pr}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var r=e._opts.schemas;if(!r)return;if(Array.isArray(r))e.addSchema(r);else for(var t in r)e.addSchema(r[t],t)}(this)}function Fr(e,r){return r=U.normalizeId(r),e._schemas[r]||e._refs[r]||e._fragments[r]}function xr(e,r,t){for(var a in r){var o=r[a];o.meta||t&&!t.test(a)||(e._cache.del(o.cacheKey),delete r[a])}}function Or(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function _r(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function Dr(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function $r(e,r){if(e._schemas[r]||e._refs[r])throw new Error('schema with key or id "'+r+'" already exists')}function kr(){}var jr={$$currentLocalizeFn:function(e){if(e&&e.length)for(var r=0;r<e.length;r+=1){var t=e[r],a=void 0,o=void 0,i=void 0;switch(t.keyword){case"$ref":a="无法找到引用".concat(t.params.ref);break;case"additionalItems":a="",o=t.params.limit,a+="不允许超过".concat(o,"个元素");break;case"additionalProperties":a="不允许有额外的属性";break;case"anyOf":a="数据应为 anyOf 所指定的其中一个";break;case"const":a="应当等于常量";break;case"contains":a="应当包含一个有效项";break;case"custom":a='应当通过 "'.concat(t.keyword,' 关键词校验"');break;case"dependencies":a="",o=t.params.depsCount,a+="应当拥有属性".concat(t.params.property,"的依赖属性").concat(t.params.deps);break;case"enum":a="应当是预设定的枚举值之一";break;case"exclusiveMaximum":case"exclusiveMinimum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(i);break;case"false schema":a="布尔模式出错";break;case"format":a='应当匹配格式 "'.concat(t.params.format,'"');break;case"formatExclusiveMaximum":a="formatExclusiveMaximum 应当是布尔值";break;case"formatExclusiveMinimum":a="formatExclusiveMinimum 应当是布尔值";break;case"formatMaximum":case"formatMinimum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当是 ".concat(i);break;case"if":a='应当匹配模式 "'.concat(t.params.failingKeyword,'" ');break;case"maximum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(i);break;case"maxItems":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个项");break;case"maxLength":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个字符");break;case"maxProperties":a="",o=t.params.limit,a+="不应有多于 ".concat(o," 个属性");break;case"minimum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(i);break;case"minItems":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个项");break;case"minLength":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个字符");break;case"minProperties":a="",o=t.params.limit,a+="不应有少于 ".concat(o," 个属性");break;case"multipleOf":a="应当是 ".concat(t.params.multipleOf," 的整数倍");break;case"not":a='不应当匹配 "not" schema';break;case"oneOf":a='只能匹配一个 "oneOf" 中的 schema';break;case"pattern":a='应当匹配模式 "'.concat(t.params.pattern,'"');break;case"patternRequired":a="应当有属性匹配模式 ".concat(t.params.missingPattern);break;case"propertyNames":a="属性名 '".concat(t.params.propertyName,"' 无效");break;case"required":a="应当有必需属性 ".concat(t.params.missingProperty);break;case"switch":a="由于 ".concat(t.params.caseIndex,' 失败,未通过 "switch" 校验, ');break;case"type":a="应当是 ".concat(t.params.type," 类型");break;case"uniqueItems":a="不应当含有重复项 (第 ".concat(t.params.j," 项与第 ").concat(t.params.i," 项是重复的)");break;default:continue}t.message=a}},getCurrentLocalize:function(){return this.$$currentLocalizeFn},useLocal:function(e){this.$$currentLocalizeFn=e}};function Ir(e,t){try{if("object"===r(t))return e.fill(null).map((function(){return JSON.parse(JSON.stringify(t))}))}catch(e){}}function Ar(e,r){return e.filter((function(e){return r.includes(e)}))}function Cr(e,r,t){var a=F(e.$ref,r);e.$ref;var o=n(e,["$ref"]);return Tr(i(i({},a),o),r,t)}function Rr(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length<2)return r[0];for(var a={},o=[].concat(r),i=function(){var e=p(o[0])?o[0]:{},r=p(o[1])?o[1]:{};a=Object.assign({},e),Object.keys(r).reduce((function(t,a){var o=e[a],i=r[a];if(p(o)||p(i))if(p(o)&&p(i))t[a]=Rr(o,i);else{var n=s(p(o)?[o,i]:[i,o],2),l=n[0],c=n[1];t[a]="additionalProperties"===a?!0===c&&l:l}else if(Array.isArray(o)||Array.isArray(i))if(Array.isArray(o)&&Array.isArray(i)){if(p(o[0])||p(i[0]))throw new Error("暂不支持如上数组对象元素合并");var u=Ar([].concat(o),[].concat(i));if(u.length<=0)throw new Error("无法合并如上数据");0===u.length&&"type"===a?t[a]=u[0]:t[a]=u}else{var d=s(Array.isArray(o)?[o,i]:[i,o],2),h=d[0],m=d[1];if(void 0===m)t[a]=h;else{if(!h.includes(m))throw new Error("无法合并如下数据");t[a]=m}}else if(void 0!==o&&void 0!==i)if("maxLength"===a||"maximum"===a||"maxItems"===a||"exclusiveMaximum"===a||"maxProperties"===a)t[a]=Math.min(o,i);else if("minLength"===a||"minimum"===a||"minItems"===a||"exclusiveMinimum"===a||"minProperties"===a)t[a]=Math.max(o,i);else if("multipleOf"===a)t[a]=E(o,i);else{if(o!==i)throw new Error("无法合并如下数据");t[a]=o}else t[a]=void 0===o?i:o;return t}),a),o.splice(0,2,a)};o.length>=2;)i();return a}function Nr(e,r,t){var a=i(i({},e),{},{allOf:e.allOf.map((function(e){return Tr(e,r,t)}))});try{var o=a.allOf,s=n(a,["allOf"]);return Rr.apply(void 0,[s].concat(l(o)))}catch(e){return a.allOf,n(a,["allOf"])}}function Lr(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.hasOwnProperty("allOf")&&(e=Nr(e,r,t)),e.hasOwnProperty("$ref")&&(e=Cr(e,r,t)),e}function Tr(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return p(e)?Lr(e,r,t):{}}function zr(e){return e?"".concat("__pathRoot",".").concat(e).replace(/\./g,"_"):"__pathRoot"}function qr(e){return""===e}function Vr(e,r){return""===e?r:[e,r].join(".")}function Wr(r,t){e.delete(r,t)}function Mr(r,t,a){for(var o=t.split("."),i=0;i<o.length;i+=1){if(o.length-i<2){e.set(r,o[o.length-1],a);break}r=r[o[i]]}}function Br(e,r){for(var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=r.split("."),o=0;o<a.length-t;o+=1){if(void 0===e)return;e=""===a[o]?e:e[a[o]]}return e}function Qr(e){return e}var Ur=Object.freeze({__proto__:null,nodePath2ClassName:zr,isRootNodePath:qr,computedCurPath:Vr,deletePathVal:Wr,setPathVal:Mr,getPathVal:Br,path2prop:Qr}),Hr=/{{(.*)}}/;function Kr(e,r,t,a){if(void 0!==t){var o=Hr.exec(t);if(Hr.lastIndex=0,o){var i=o[1].trim();return new Function("parentFormData","rootFormData","return ".concat(i))(Br(e,r,1),e)}return a()}}function Gr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.schema,t=e.uiSchema,a=arguments.length>1?arguments[1]:void 0,o=Xr({schema:r,uiSchema:t,containsSpec:!1});return["title","description"].reduce((function(e,r){return o[r]&&(e["ui:".concat(r)]=String(o[r]).replace(/\$index/g,a+1)),e}),{})}function Jr(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,i=e.curNodePath,n=void 0===i?"":i,s=e.rootFormData,l=void 0===s?{}:s,c=o["ui:widget"]||t["ui:widget"],u=o["ui:hidden"]||t["ui:hidden"];return"HiddenWidget"===c||"hidden"===c||!!Kr(l,n,u,(function(){return"function"==typeof u?u(Br(l,n,1),l):u}))}function Zr(e,t){var a=t.schema,o=void 0===a?{}:a,i=t.uiSchema,n=void 0===i?{}:i,s=o["ui:field"]||n["ui:field"];if("function"==typeof s||"object"===r(s)||"string"==typeof s)return{field:s,fieldProps:n["ui:fieldProps"]||o["ui:fieldProps"]};var l=e[f(o)];if(l)return{field:l};if(!l&&(o.anyOf||o.oneOf))return{field:null};throw new Error("不支持的field类型 ".concat(o.type))}function Yr(e){var r=e.schema,a=void 0===r?{}:r,o=e.uiSchema,n=void 0===o?{}:o,s=e.curNodePath,c=e.rootFormData,u=void 0===c?{}:c;return Object.assign.apply(Object,[{}].concat(l([a,n].map((function(e){return Object.keys(e).reduce((function(r,a){var o=e[a];return"ui:options"===a&&p(o)?i(i({},r),o):0===a.indexOf("ui:")?i(i({},r),{},t({},a.substring(3),void 0===s?o:Kr(u,s,o,(function(){return o})))):r}),{})})))))}function Xr(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.containsSpec,s=void 0===n||n,l=e.curNodePath,c=e.rootFormData,u={};return s&&(u.readonly=!!t.readOnly,void 0!==t.multipleOf&&(u.step=t.multipleOf),(t.minimum||0===t.minimum)&&(u.min=t.minimum),(t.maximum||0===t.maximum)&&(u.max=t.maximum),(t.minLength||0===t.minLength)&&(u.minlength=t.minLength),(t.maxLength||0===t.maxLength)&&(u.maxlength=t.maxLength),"date-time"!==t.format&&"date"!==t.format||("array"===t.type?(u.isRange=!0,u.isNumberValue=!(t.items&&"string"===t.items.type)):u.isNumberValue=!("string"===t.type))),i(i({title:t.title,description:t.description},u),Yr({schema:t,uiSchema:o,curNodePath:l,rootFormData:c}))}function et(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,i=e.curNodePath,s=e.rootFormData,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,c=Xr({schema:t,uiSchema:o,curNodePath:i,rootFormData:s});!c.widget&&l&&Object.assign(c,l({schema:t,uiSchema:o}));var u=c.widget,d=c.title,p=c.labelWidth,h=c.description,m=c.attrs,f=c.class,v=c.style,g=c.fieldAttrs,y=c.fieldStyle,b=c.fieldClass,P=c.emptyValue,w=c.width,E=c.getWidget,S=c.onChange,F=n(c,["widget","title","labelWidth","description","attrs","class","style","fieldAttrs","fieldStyle","fieldClass","emptyValue","width","getWidget","onChange"]);return{widget:u,label:d,labelWidth:p,description:h,widgetAttrs:m,widgetClass:f,widgetStyle:v,fieldAttrs:g,width:w,fieldStyle:y,fieldClass:b,emptyValue:P,getWidget:E,onChange:S,uiProps:F}}function rt(e){var r=e.schema,a=void 0===r?{}:r,o=e.uiSchema,n=void 0===o?{}:o,s=e.errorSchema,c=void 0===s?{}:s;return Object.assign.apply(Object,[{}].concat(l([a,n,c].map((function(e){return Object.keys(e).reduce((function(r,a){var o=e[a];return"err:options"===a&&p(o)?i(i({},r),o):0===a.indexOf("err:")?i(i({},r),{},t({},a.substring(4),o)):r}),{})})))))}function tt(e,r){if(!Array.isArray(r))return e;var t,a=function(e){return e.reduce((function(e,r){return e[r]=!0,e}),{})},o=a(e),i=r.filter((function(e){return"*"===e||o[e]})),n=a(i),s=e.filter((function(e){return!n[e]})),c=i.indexOf("*");if(-1===c){if(s.length)throw new Error("uiSchema order list does not contain ".concat((t=s).length>1?"properties '".concat(t.join("', '"),"'"):"property '".concat(t[0],"'")));return i}if(c!==i.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");var u=l(i);return u.splice.apply(u,[c,1].concat(l(s))),u}function at(e){return Array.isArray(e.enum)&&1===e.enum.length||e.hasOwnProperty("const")}function ot(e){if(Array.isArray(e.enum)&&1===e.enum.length)return e.enum[0];if(e.hasOwnProperty("const"))return e.const;throw new Error("schema cannot be inferred as a constant")}function it(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=Tr(e,r),a=t.oneOf||t.anyOf;return!!Array.isArray(t.enum)||!!Array.isArray(a)&&a.every((function(e){return at(e)}))}function nt(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every((function(e){return p(e)}))}function st(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!(!e.uniqueItems||!e.items)&&it(e.items,r)}function lt(e){return e.additionalItems,p(e.additionalItems)}function ct(e,r,t,a){if(e.enum){var o=Yr({schema:e,uiSchema:r,curNodePath:t,rootFormData:a}).enumNames||e.enumNames;return e.enum.map((function(e,r){return{label:o&&o[r]||String(e),value:e}}))}var i=e.oneOf||e.anyOf,n=r.oneOf||r.anyOf;return i.map((function(e,r){var o=n&&n[r]?Yr({schema:e,uiSchema:n[r],curNodePath:t,rootFormData:a}):{},i=ot(e);return{label:o.title||e.title||String(i),value:i}}))}function ut(e,r,t){if(e)return e;if(r){var a=t.split(".").pop();if(a&&a!=="".concat(Number(a)))return a}return""}var dt=Object.freeze({__proto__:null,replaceArrayIndex:Gr,isHiddenWidget:Jr,getUiField:Zr,getUserUiOptions:Yr,getUiOptions:Xr,getWidgetConfig:et,getUserErrOptions:rt,orderProperties:tt,isConstant:at,toConstant:ot,isSelect:it,isFixedItems:nt,isMultiSelect:st,allowAdditionalItems:lt,optionsList:ct,fallbackLabel:ut}),pt=ft(),ht=null,mt=null;function ft(){var e=new br({errorDataPath:"property",allErrors:!0,multipleOfPrecision:8,schemaId:"auto",unknownFormats:"ignore"});return e.addFormat("data-url",/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/),e.addFormat("color",/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/),e}function vt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null===e?[]:e.map((function(e){var r=e.dataPath,t=e.keyword,a=e.message,o=e.params,i=e.schemaPath,n="".concat(r);return{name:t,property:n,message:a,params:o,stack:"".concat(n," ").concat(a).trim(),schemaPath:i}}))}function gt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.transformErrors,o=e.additionalMetaSchemas,i=void 0===o?[]:o,n=e.customFormats,s=void 0===n?{}:n,c=!v(mt,i),u=!v(ht,s);(c||u)&&(pt=ft()),i&&c&&Array.isArray(i)&&(pt.addMetaSchema(i),mt=i),s&&u&&p(s)&&(Object.keys(s).forEach((function(e){pt.addFormat(e,s[e])})),ht=s);var d=null;try{pt.validate(t,r)}catch(e){d=e}jr.getCurrentLocalize()(pt.errors);var h=vt(pt.errors);pt.errors=null;var m=d&&d.message&&"string"==typeof d.message&&d.message.includes("no schema with key or ref ");return m&&(h=[].concat(l(h),[{stack:d.message}])),"function"==typeof a&&(h=a(h)),{errors:h}}function yt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.uiSchema,o=e.transformErrors,i=e.additionalMetaSchemas,n=void 0===i?[]:i,s=e.customFormats,l=void 0===s?{}:s,c=e.errorSchema,u=void 0===c?{}:c,d=e.required,p=void 0!==d&&d,h=e.propPath,m=void 0===h?"":h,f=e.isOnlyFirstError,v=void 0===f||f,g="array"===t.type&&Array.isArray(r)&&0===r.length,y=void 0===r||g;if(p){if(y){var b={keyword:"required",params:{missingProperty:m}},P=rt({schema:t,uiSchema:a,errorSchema:u}).required;return P?b.message=P:jr.getCurrentLocalize()([b]),[b]}}else if(y&&!g)return[];var w=gt({formData:r,schema:t,transformErrors:o,additionalMetaSchemas:n,customFormats:l}).errors;w=w.filter((function(e){return""===e.property&&!e.schemaPath.includes("#/anyOf/")&&!e.schemaPath.includes("#/oneOf/")||"additionalProperties"===e.name}));var E=rt({schema:t,uiSchema:a,errorSchema:u});return(v&&w.length>0?[w[0]]:w).reduce((function(e,r){return r.message=void 0!==E[r.name]?E[r.name]:r.message,e.push(r),e}),[])}function bt(e,r){try{return pt.validate(e,r)}catch(e){return!1}}function Pt(e,r,t){for(var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=0;n<r.length;n++){var s=Tr(r[n],t,e);if(s.properties){var l=i(i({},t.definitions?{definitions:t.definitions}:{}),{},{anyOf:Object.keys(s.properties).map((function(e){return{required:[e]}}))}),c=void 0;if(s.anyOf){var u=a({},s);u.allOf?u.allOf=u.allOf.slice():u.allOf=[],u.allOf.push(l),c=u}else c=Object.assign({},s,l);if(o||delete c.required,bt(c,e))return n}else if(bt(r[n],e))return n}return 0}var wt=Object.freeze({__proto__:null,ajvValidateFormData:gt,validateFormDataAndTransformMsg:yt,isValid:bt,getMatchingOption:Pt});function Et(e,r){if(Array.isArray(r))return Array.isArray(e)||(e=[]),r.map((function(r,t){return e[t]?Et(e[t],r):r}));if(p(r)){var t=Object.assign({},e);return Object.keys(r).reduce((function(t,a){return t[a]=Et(e?e[a]:{},r[a]),t}),t)}return r}function St(e,r,t){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=p(e)?e:{},n=p(a)?a:{};"allOf"in i&&(i=Nr(i,t,n));var s=r;if(p(s)&&p(i.default))s=m(s,i.default);else if("default"in i)s=i.default;else{if("$ref"in i){var l=F(i.$ref,t);return St(l,s,t,n,o)}if(nt(i))s=i.items.map((function(e,a){return St(e,Array.isArray(r)?r[a]:void 0,t,n,o)}));else if("oneOf"in i){var c=Tr(i.oneOf[Pt(n,i.oneOf,t)],t,n);if(i.properties&&c.properties){var u=m(i,c);delete u.oneOf,i=u}else i=c}else if("anyOf"in i){var d=Tr(i.anyOf[Pt(n,i.anyOf,t)],t,n);if(i.properties&&d.properties){var h=m(i,d);delete h.anyOf,i=h}else i=d}}switch(void 0===s&&(s=i.default),f(i)){case"null":return null;case"object":return Object.keys(i.properties||{}).reduce((function(e,r){var a=St(i.properties[r],(s||{})[r],t,(n||{})[r],o);return(o||void 0!==a)&&(e[r]=a),e}),{});case"array":if(Array.isArray(s)&&(s=s.map((function(e,r){return St(i.items[r]||i.additionalItems||{},e,t,{},o)}))),Array.isArray(a)&&(s=a.map((function(e,r){return St(i.items,(s||{})[r],t,e,{},o)}))),i.minItems){if(st(i,t))return s||[];var v=s?s.length:0;if(i.minItems>v){var g=s||[],y=Array.isArray(i.items)?i.additionalItems:i.items,b=Ir(new Array(i.minItems-v),St(y,y.defaults,t,{},o));return g.concat(b)}}s=void 0===s?[]:s}return s}function Ft(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!p(e))throw new Error("Invalid schema: ".concat(e));var o=Tr(e,t,r),i=St(o,e.default,t,r,a);return void 0===r?i:p(r)||Array.isArray(r)?Et(i,r):0===r||!1===r||""===r?r:r||i}function xt(e,r){void 0===r&&(r={});var t=r.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}xt('.genFromComponent{font-size:14px;line-height:1;word-wrap:break-word;word-break:break-word;padding:0;margin:0}.genFromComponent a,.genFromComponent h1,.genFromComponent h2,.genFromComponent h3,.genFromComponent li,.genFromComponent p,.genFromComponent ul{font-size:14px}.genFromComponent .genFormIcon{width:12px;height:12px;vertical-align:top}.genFromComponent .genFormBtn{display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;background:#fff;border:1px solid #dcdfe6;color:#606266;-webkit-appearance:none;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;margin:0;-webkit-transition:.1s;transition:.1s;font-weight:500;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;padding:12px 20px;font-size:14px;border-radius:4px}.genFromComponent .genFormBtn.is-plain:focus,.genFromComponent .genFormBtn.is-plain:hover{background:#fff;border-color:#409eff;color:#409eff}.genFromComponent .hiddenWidget{display:none}.genFromComponent .fieldGroupWrap+.fieldGroupWrap .fieldGroupWrap_title{margin-top:20px}.genFromComponent .fieldGroupWrap_title{position:relative;display:block;width:100%;line-height:26px;margin-bottom:8px;font-size:15px;font-weight:700;border:0}.genFromComponent .fieldGroupWrap_des{font-size:12px;line-height:20px;margin-bottom:10px;color:#999}.genFromComponent .genFromWidget_des{padding:0;margin-top:0;margin-bottom:2px;font-size:12px;line-height:20px;color:#999;text-align:left}.genFromComponent .formItemErrorBox{margin:0 auto;color:#ff5757;padding-top:2px;position:absolute;top:100%;left:0;display:-webkit-box!important;line-height:16px;text-overflow:ellipsis;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1;white-space:normal;font-size:12px;text-align:left}.genFromComponent .genFormIcon-qs{fill:#606266;vertical-align:middle;display:inline-block;width:16px;height:16px;margin-left:2px;margin-top:-2px;cursor:pointer}.genFromComponent .genFormItemRequired:before{content:"*";color:#f56c6c;margin-right:4px}.genFromComponent .appendCombining_box{margin-bottom:22px}.genFromComponent .appendCombining_box .appendCombining_box{margin-bottom:10px}.genFromComponent .appendCombining_box{padding:10px;background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .validateWidget{margin-bottom:0!important;width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important;padding:0!important}.genFromComponent .validateWidget .formItemErrorBox{padding:5px 0;position:relative}.genFromComponent .arrayField:not(.genFormItem){margin-bottom:22px}.genFromComponent .arrayField:not(.genFormItem) .arrayField{margin-bottom:10px}.genFromComponent .arrayOrderList{background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .arrayOrderList_item{position:relative;padding:25px 10px 12px;border-radius:2px;margin-bottom:6px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.genFromComponent .arrayOrderList_bottomAddBtn{text-align:right;padding:15px 10px;margin-bottom:10px}.genFromComponent .bottomAddBtn{width:40%;min-width:10px;max-width:180px}.genFromComponent .arrayListItem_content{padding-top:15px;-webkit-box-flex:1;-ms-flex:1;flex:1;margin:0 auto;-webkit-box-shadow:0 -1px 0 0 rgba(0,0,0,.05);box-shadow:0 -1px 0 0 rgba(0,0,0,.05)}.genFromComponent .arrayListItem_index,.genFromComponent .arrayListItem_operateTool{position:absolute;height:25px}.genFromComponent .arrayListItem_index{top:6px;line-height:18px;height:18px;padding:0 6px;background-color:rgba(0,0,0,.28);color:#fff;font-size:12px;border-radius:2px}.genFromComponent .arrayListItem_operateTool{width:75px;right:9px;top:-1px;text-align:right;font-size:0}.genFromComponent .arrayListItem_btn{vertical-align:top;display:inline-block;padding:6px;margin:0;font-size:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none;cursor:pointer;text-align:center;background:transparent;color:#666}.genFromComponent .arrayListItem_btn:hover{opacity:.6}.genFromComponent .arrayListItem_btn[disabled]{color:#999;opacity:.3!important;cursor:not-allowed}.genFromComponent .arrayListItem_orderBtn-bottom,.genFromComponent .arrayListItem_orderBtn-top{background-color:#f0f9eb}.genFromComponent .arrayListItem_btn-delete{background-color:#fef0f0}.genFromComponent .formFooter_item{text-align:right;border-top:1px solid rgba(0,0,0,.08);padding-top:10px}.genFromComponent.formInlineFooter>.fieldGroupWrap{display:inline-block;margin-right:10px}.genFromComponent.formInline .genFormItem{display:inline-block;margin-right:10px;vertical-align:top}.genFromComponent.formInline .validateWidget{margin-right:0}.genFromComponent.formInline .formFooter_item{border-top:none;padding-top:0}.layoutColumn .layoutColumn_w100{width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important}.layoutColumn .fieldGroupWrap_box{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start}.layoutColumn .fieldGroupWrap_box>div{width:100%;-ms-flex-preferred-size:100%;flex-basis:100%}.layoutColumn .fieldGroupWrap_box>.genFormItem{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;-webkit-box-sizing:border-box;box-sizing:border-box;padding-right:10px}.layoutColumn.layoutColumn-1 .fieldGroupWrap_box>.genFormItem{padding-right:0}.layoutColumn.layoutColumn-2 .fieldGroupWrap_box>.genFormItem{width:50%;-ms-flex-preferred-size:50%;flex-basis:50%}.layoutColumn.layoutColumn-3 .fieldGroupWrap_box>.genFormItem{width:33.333%;-ms-flex-preferred-size:33.333%;flex-basis:33.333%}');var Ot={formFooter:{type:Object,default:function(){return{show:!0,okBtn:"保存",cancelBtn:"取消"}}},value:{type:null,default:function(){return{}},required:!0},formProps:{type:Object,default:function(){return{}}},fallbackLabel:{type:Boolean,default:!1},schema:{type:Object,default:function(){return{}},required:!0},uiSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},errorSchema:{type:Object,default:function(){return{}}}},_t={name:"FormFooter",props:{okBtn:{type:String,default:"保存"},cancelBtn:{type:String,default:"取消"},formItemAttrs:{type:Object,default:function(){return{}}},globalOptions:null},render:function(e){var r=this,t=this.$props,a=t.okBtn,o=t.cancelBtn,n=t.globalOptions.COMPONENT_MAP;return e(n.formItem,i({class:{formFooter_item:!0}},this.formItemAttrs),[e(n.button,{on:{click:function(){r.$emit("onCancel")}}},o),e(n.button,{style:{marginLeft:"10px"},props:{type:"primary"},on:{click:function(){r.$emit("onSubmit")}}},a)])}};var Dt=function(e,r,t,a,o,i,n,s,l,c){"boolean"!=typeof n&&(l=s,s=n,n=!1);var u,d="function"==typeof t?t.options:t;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,o&&(d.functional=!0)),a&&(d._scopeId=a),i?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(i)},d._ssrRegister=u):r&&(u=n?function(e){r.call(this,c(e,this.$root.$options.shadowRoot))}:function(e){r.call(this,s(e))}),u)if(d.functional){var p=d.render;d.render=function(e,r){return u.call(r),p(e,r)}}else{var h=d.beforeCreate;d.beforeCreate=h?[].concat(h,u):[u]}return t},$t={name:"FieldGroupWrap",inject:["genFormProvide"],props:{curNodePath:{type:String,default:""},showTitle:{type:Boolean,default:!0},showDescription:{type:Boolean,default:!0},title:{type:String,default:""},description:{type:String,default:""}},computed:{trueTitle:function(){var e=this.title;if(e)return e;var r=(this.genFormProvide.value||this.genFormProvide).fallbackLabel&&this.curNodePath.split(".").pop();return r!=="".concat(Number(r))?r:""}}},kt=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("div",{staticClass:"fieldGroupWrap"},[e.showTitle&&e.trueTitle?t("h3",{staticClass:"fieldGroupWrap_title"},[e._v("\n "+e._s(e.trueTitle)+"\n ")]):e._e(),e._v(" "),e.showDescription&&e.description?t("p",{staticClass:"fieldGroupWrap_des",domProps:{innerHTML:e._s(e.description)}}):e._e(),e._v(" "),t("div",{staticClass:"fieldGroupWrap_box"},[e._t("default")],2)])};kt._withStripped=!0;var jt=Dt({render:kt,staticRenderFns:[]},void 0,$t,void 0,!1,void 0,!1,void 0,void 0,void 0),It={formProps:{type:null},globalOptions:{type:null},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},customFormats:{type:Object,default:function(){return{}}},rootSchema:{type:Object,default:function(){return{}}},rootFormData:{type:null,default:function(){return{}}},curNodePath:{type:String,default:""},required:{type:Boolean,default:!1},needValidFieldGroup:{type:Boolean,default:!0}},At=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-down",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}})])};At._withStripped=!0;var Ct=Dt({render:At,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Rt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-up",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}})])};Rt._withStripped=!0;var Nt=Dt({render:Rt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Lt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-close",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1\n 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0\n 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}})])};Lt._withStripped=!0;var Tt=Dt({render:Lt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),zt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-plus",attrs:{t:"1551322312294",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"10297","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"200",height:"200"}},[r("path",{attrs:{d:"M474 152m8 0l60 0q8 0 8 8l0 704q0 8-8 8l-60 0q-8 0-8-8l0-704q0-8 8-8Z","p-id":"10298"}}),this._v(" "),r("path",{attrs:{d:"M168 474m8 0l672 0q8 0 8 8l0 60q0 8-8 8l-672 0q-8 0-8-8l0-60q0-8 8-8Z","p-id":"10299"}})])};zt._withStripped=!0;var qt=Dt({render:zt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Vt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-qs",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 708c-22.1\n 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 0\n 0-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8\n 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6\n 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6\n 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z"}})])};Vt._withStripped=!0;var Wt=Dt({render:Vt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Mt={name:"Widget",inject:["genFormProvide"],props:{isFormData:{type:Boolean,default:!0},curValue:{type:null,default:0},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},widget:{type:[String,Function,Object],default:null},required:{type:Boolean,default:!1},emptyValue:{type:null,default:void 0},formatValue:{type:[Function],default:function(e){return{update:!0,value:e}}},rootFormData:{type:null},curNodePath:{type:String,default:""},label:{type:String,default:""},width:{type:String,default:""},labelWidth:{type:String,default:""},description:{type:String,default:""},widgetAttrs:{type:Object,default:function(){return{}}},widgetClass:{type:Object,default:function(){return{}}},widgetStyle:{type:Object,default:function(){return{}}},fieldAttrs:{type:Object,default:function(){return{}}},fieldClass:{type:Object,default:function(){return{}}},fieldStyle:{type:Object,default:function(){return{}}},uiProps:{type:Object,default:function(){return{}}},formProps:null,getWidget:null,globalOptions:null,onChange:null},computed:{value:{get:function(){return this.isFormData?Br(this.rootFormData,this.curNodePath):this.curValue},set:function(e){var r=""===e||null===e?this.emptyValue:e;this.isFormData&&Mr(this.rootFormData,this.curNodePath,r),this.$emit("onChange",r)}}},created:function(){this.uiProps.enumOptions&&this.uiProps.enumOptions.length>0&&void 0===this.value&&this.value!==this.uiProps.enumOptions[0]&&(this.schema.items?this.value=[]:this.required&&(this.value=this.uiProps.enumOptions[0].value))},render:function(e){var r=this,t=this.$props.curNodePath,a=qr(t),o=r.globalOptions.HELPERS.isMiniDes(r.formProps),n=r.description?e("div",{domProps:{innerHTML:r.description},class:{genFromWidget_des:!0}}):null,s=r.globalOptions.COMPONENT_MAP,l=o&&n?e(s.popover,{style:{margin:"0 2px",fontSize:"16px",cursor:"pointer"},props:{placement:"top",trigger:"hover"}},[n,e(Wt,{slot:"reference"})]):null,c=i(i({},r.fieldStyle),r.width?{width:r.width,flexBasis:r.width,paddingRight:"10px"}:{}),u=ut(r.label,r.widget&&this.genFormProvide.fallbackLabel,t);return e(s.formItem,{class:i(i({},r.fieldClass),{},{genFormItem:!0}),style:c,attrs:r.fieldAttrs,props:i(i({},r.labelWidth?{labelWidth:r.labelWidth}:{}),this.isFormData?{prop:a?"__$$root":t,rules:[{validator:function(e,o,i){a&&(o=r.rootFormData);var n=yt({formData:o,schema:r.$props.schema,uiSchema:r.$props.uiSchema,customFormats:r.$props.customFormats,errorSchema:r.errorSchema,required:r.required,propPath:t});if(n.length>0)return i(n[0].message);var s=r.$props.customRule;return s&&"function"==typeof s?s({field:t,value:o,rootFormData:r.rootFormData,callback:i}):i()},trigger:"blur"}]}:{}),scopedSlots:{error:function(r){return r.error?e("div",{class:{formItemErrorBox:!0},attrs:{title:r.error}},[r.error]):null}}},[u?e("span",{slot:"label",class:{genFormLabel:!0,genFormItemRequired:r.required}},["".concat(u),l,"".concat(r.formProps&&r.formProps.labelSuffix||"")]):null,o?null:n,e(r.widget,{style:r.widgetStyle,class:r.widgetClass,attrs:i(i(i({},r.widgetAttrs),r.uiProps),{},{value:this.value}),ref:"widgetRef",on:{"hook:mounted":function(){r.getWidget&&"function"==typeof r.getWidget&&r.getWidget.call(null,r.$refs.widgetRef)},input:function(e){var t=r.formatValue(e),a=r.value;t.update&&a!==t.value&&(r.value=t.value,r.onChange&&r.onChange(t.value,a))}}})])}},Bt={name:"ObjectField",functional:!0,props:It,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,n=t.errorSchema,c=t.needValidFieldGroup,u=t.curNodePath,d=t.rootFormData,h=t.globalOptions,m=Xr({schema:a,uiSchema:o,curNodePath:u,rootFormData:d}),f=m.title,v=m.description,g=m.showTitle,y=m.showDescription,b=m.order,P=m.fieldClass,w=m.fieldAttrs,E=m.fieldStyle,S=m.onlyShowIfDependent,F=tt(Object.keys(a.properties||{}),b).map((function(t){var l=function(e){return Array.isArray(a.required)&&!!~a.required.indexOf(e)}(t),c=function(e){var r=!1,t=!1;return p(a.dependencies)&&(t=Object.entries(a.dependencies).some((function(t){var a=s(t,2),o=a[0],i=a[1],n=!(!Array.isArray(i)||!~i.indexOf(e));return r=r||n,n&&void 0!==Br(d,u)[o]}))),{isDependency:r,curDependent:t}}(t),h=c.isDependency,m=c.curDependent;return h&&S&&!m?null:e(aa,{key:t,props:i(i({},r.props),{},{schema:a.properties[t],uiSchema:o[t],errorSchema:n[t],required:l||m,curNodePath:Vr(u,t)})})}));return e(jt,{props:{title:f,description:v,showTitle:g,showDescription:y,curNodePath:u},class:i(i({},r.data.class),P),attrs:w,style:E},[e("template",{slot:"default"},[].concat(l(F),[c?e(Mt,{key:"validateWidget-object",class:{validateWidget:!0,"validateWidget-object":!0},props:{schema:Object.entries(a).reduce((function(e,r){var t=s(r,2),o=t[0],i=t[1];return!1!==a.additionalProperties&&["properties","id","$id"].includes(o)||(e[o]=i),e}),{}),uiSchema:o,errorSchema:n,curNodePath:u,rootFormData:d,globalOptions:h}}):null]))])}},Qt={name:"StringField",props:It,functional:!0,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,n=t.curNodePath,s=t.rootFormData,l=t.globalOptions.WIDGET_MAP,c=it(a)&&ct(a,o,n,s),u=et({schema:a,uiSchema:o,curNodePath:n,rootFormData:s},(function(){var e="number"===a.type||"integer"===a.type;return{widget:c?l.common.select:l.formats[a.format]||(e?l.types.number:l.types.string)}}));return c&&!u.uiProps.enumOptions&&(u.uiProps.enumOptions=c),e(Mt,i(i({},r.data),{},{props:i(i({},r.props),u)}))}},Ut={name:"NumberField",props:It,functional:!0,render:function(e,r){return e(Qt,r.data)}},Ht={name:"IntegerField",props:It,functional:!0,render:function(e,r){return e(Qt,r.data)}},Kt={name:"BooleanField",props:It,functional:!0,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,n=t.curNodePath,s=t.rootFormData,l=t.globalOptions,c=ct({enumNames:a.enumNames||["true","false"],enum:a.enum||[!0,!1]},o,n,s),u=et({schema:a,uiSchema:o,curNodePath:n,rootFormData:s},(function(){return{widget:l.WIDGET_MAP.types.boolean}}));return u.uiProps.enumOptions=u.uiProps.enumOptions||c,e(Mt,i(i({},r.data),{},{props:i(i({},r.props),u)}))}},Gt={name:"ArrayOrderList",props:{vNodeList:{type:Array,default:[]},tupleItemsLength:{type:Number,default:0},addable:{type:Boolean,default:!0},showIndexNumber:{type:Boolean,default:!1},sortable:{type:Boolean,default:!0},removable:{type:Boolean,default:!0},maxItems:{},minItems:{},globalOptions:null},computed:{canAdd:function(){var e=this.$props,r=e.addable,t=e.maxItems,a=e.vNodeList;return!!r&&(void 0===t||a.length<t)},canRemove:function(){var e=this.$props,r=e.removable,t=e.minItems,a=e.vNodeList;return!!r&&(void 0===t||a.length>t)}},render:function(e){var r=this;return this.vNodeList.length<=0&&!this.addable?null:e("div",{class:{arrayOrderList:!0}},this.vNodeList.map((function(t,a){var o=t.key,n=t.vNode,s=r.tupleItemsLength+a,l=a+1;return e("div",{key:o,class:{arrayOrderList_item:!0}},[r.showIndexNumber?e("div",{class:{arrayListItem_index:!0}},l):null,e("div",{class:{arrayListItem_operateTool:!0}},[e("button",{style:i({},r.sortable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.sortable||0===a},class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-top":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"moveUp",data:{index:s}})}}},[e(Nt)]),e("button",{style:i({},r.sortable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.sortable||a===r.vNodeList.length-1},class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-bottom":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"moveDown",data:{index:s}})}}},[e(Ct)]),e("button",{style:i({},r.removable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.canRemove},class:{arrayListItem_btn:!0,"arrayListItem_btn-delete":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"remove",data:{index:s}})}}},[e(Tt)])]),e("div",{class:{arrayListItem_content:!0}},[n])])})).concat([e("p",{style:i({},this.canAdd?{}:{display:"none"}),class:{arrayOrderList_bottomAddBtn:!0}},[e("button",{attrs:{type:"button"},class:{bottomAddBtn:!0,"is-plain":!0,genFormBtn:!0},on:{click:function(){r.$emit("onArrayOperate",{command:"add"})}}},[e(qt,{style:{marginRight:"5px"}}),this.maxItems?"( ".concat(this.vNodeList.length," / ").concat(this.maxItems," )"):""])])]))}},Jt={name:"ArrayFieldNormal",functional:!0,props:i(i({},It),{},{itemsFormData:{type:Array}}),render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,n=t.curNodePath,s=t.rootFormData,l=t.itemsFormData,c=t.errorSchema,u=t.globalOptions,d=Xr({schema:a,uiSchema:o,curNodePath:n,rootFormData:s}),p=d.title,h=d.description,m=d.addable,f=d.showIndexNumber,v=d.sortable,g=d.removable,y=d.showTitle,b=d.showDescription,P=d.fieldClass,w=d.fieldAttrs,E=d.fieldStyle,S=l.map((function(t,s){var l=Gr({schema:a.items,uiSchema:o.items},s);return{key:t.key,vNode:e(aa,{key:t.key,props:i(i({},r.props),{},{schema:a.items,required:![].concat(a.items.type).includes("null"),uiSchema:i(i({},o.items),l),errorSchema:c.items,curNodePath:Vr(n,s)})})}}));return e(jt,{props:{title:p,description:h,showTitle:y,showDescription:b,curNodePath:n},class:i(i({},r.data.class),P),attrs:w,style:E},[e(Gt,{props:{vNodeList:S,showIndexNumber:f,addable:m,sortable:v,removable:g,maxItems:a.maxItems,minItems:a.minItems,globalOptions:u},on:r.listeners})])}},Zt={name:"ArrayFieldMultiSelect",functional:!0,props:i({},It),render:function(e,r){var t=r.props,a=t.schema,o=t.rootSchema,n=t.uiSchema,s=t.curNodePath,l=t.rootFormData,c=t.globalOptions,u=ct(Tr(a.items,o),n,s,l),d=et({schema:a,uiSchema:n,curNodePath:s,rootFormData:l},(function(){return{widget:c.WIDGET_MAP.common.checkboxGroup}}));return d.uiProps.multiple=!0,u&&!d.uiProps.enumOptions&&(d.uiProps.enumOptions=u),e(Mt,i(i({},r.data),{},{props:i(i({},r.props),d)}))}},Yt={name:"ArrayFieldTuple",props:i(i({},It),{},{itemsFormData:{type:Array,default:function(){return[]}}}),created:function(){this.fixItemsFormData()},methods:{fixItemsFormData:function(){var e=!Array.isArray(this.itemsFormData);if(e||this.itemsFormData.length<this.schema.items.length){var r=Ft(this.schema,void 0,this.rootSchema);e?this.$emit("onArrayOperate",{command:"setNewTarget",data:{newTarget:r}}):this.$emit("onArrayOperate",{command:"batchPush",data:{pushArray:r.slice(this.itemsFormData.length)}})}}},render:function(e){var r=this;if(!Array.isArray(this.itemsFormData))return null;var t,a,o=this.$props,n=o.schema,s=o.uiSchema,c=o.errorSchema,u=o.curNodePath,d=o.globalOptions,p=Xr({schema:n,uiSchema:s,curNodePath:u,rootFormData:this.rootFormData}),h=p.title,m=p.description,f=p.addable,v=p.showIndexNumber,g=p.sortable,y=p.removable,b=p.showTitle,P=p.showDescription,w=p.fieldClass,E=p.fieldAttrs,S=p.fieldStyle,F=(t=this.itemsFormData,a=this.schema.items.length-1,t.reduce((function(e,r,t){return e[t>a?1:0].push(r),e}),[[],[]])),x=F[0].map((function(t,a){return e(aa,{key:t.key,props:i(i({},r.$props),{},{required:![].concat(n.items[a].type).includes("null"),schema:n.items[a],uiSchema:s.items?s.items[a]:{},errorSchema:c.items?c.items[a]:{},curNodePath:Vr(u,a)})})})),O=F[1].map((function(t,a){var o=Gr({schema:n.additionalItems,uiSchema:s.additionalItems},a);return{key:t.key,vNode:e(aa,{key:t.key,props:i(i({},r.$props),{},{schema:n.additionalItems,required:![].concat(n.additionalItems.type).includes("null"),uiSchema:i(i({},s.additionalItems),o),errorSchema:c.additionalItems,curNodePath:Vr(u,a+n.items.length)})})}})),_=(void 0===f||f)&<(this.schema);return e(jt,{props:{title:h,description:m,showTitle:b,showDescription:P,curNodePath:u},class:w,attrs:E,style:S},[].concat(l(x),[e(Gt,{props:{vNodeList:O,tupleItemsLength:n.items.length,addable:_,showIndexNumber:v,sortable:g,removable:y,maxItems:n.maxItems,minItems:n.minItems,globalOptions:d},on:this.$listeners})]))}},Xt={name:"ArrayFieldSpecialFormat",props:It,functional:!0,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,n=t.curNodePath,s=t.rootFormData,l=et({schema:i({"ui:widget":t.globalOptions.WIDGET_MAP.formats[a.format]},a),uiSchema:o,curNodePath:n,rootFormData:s});return e(Mt,i(i({},r.data),{},{props:i(i({},r.props),l)}))}},ea={name:"ArrayField",props:It,data:function(){return{formKeys:this.getCuFormData().map((function(){return b()}))}},computed:{itemsFormData:function(){var e=this.$data.formKeys;return this.curFormData.map((function(r,t){return{key:e[t],value:r}}))},curFormData:function(){return this.getCuFormData()}},watch:{curFormData:function(e,r){e!==r&&Array.isArray(e)&&(this.formKeys=e.map((function(){return b()})))}},methods:{getCuFormData:function(){var e=this.$props,r=Br(e.rootFormData,e.curNodePath);return Array.isArray(r)?r:[]},getNewFormDataRow:function(){var e=this.$props,r=e.schema,t=e.rootSchema,a=r.items;return nt(this.schema)&<(this.schema)&&(a=r.additionalItems),Ft(a,void 0,t)},handleArrayOperate:function(e){var r=e.command,t=e.data,a={moveUp:function(e,r){!function(e,r){if(0===r)return!1;var t=[e[r],e[r-1]];e.splice.apply(e,[r-1,2].concat(t))}(e,r.index)},moveDown:function(e,r){!function(e,r){if(r===e.length-1)return!1;var t=e[r],a=[e[r+1],t];e.splice.apply(e,[r,2].concat(a))}(e,r.index)},remove:function(e,r){!function(e,r){e.splice(r,1).length}(e,r.index)},add:function(e,r){var t=r.newRowData;e.push(t)},batchPush:function(e,r){r.pushArray.forEach((function(r){e.push(r)}))},setNewTarget:function(e,r){Mr(r.formData,r.nodePath,r.newTarget)}}[r];if(!a)throw new Error("错误 - 未知的操作:[".concat(r,"]"));var o=t,i=t;"add"===r?(o={newRowData:this.getNewFormDataRow()},i={newRowData:b()}):"batchPush"===r?i={pushArray:o.pushArray.map((function(e){return b()}))}:"setNewTarget"===r&&(o={formData:this.rootFormData,nodePath:this.curNodePath,newTarget:o.newTarget},i={formData:this.$data,nodePath:"formKeys",newTarget:o.newTarget.map((function(e){return b()}))}),a.apply(this,[this.$data.formKeys,i]),a.apply(this,[this.curFormData,o])}},render:function(e){var r=this.$props,a=r.schema,o=r.uiSchema,n=r.rootSchema,l=r.rootFormData,c=r.curNodePath,u=r.globalOptions;if(!a.hasOwnProperty("items"))throw new Error("[".concat(a,"] 请先定义 items属性"));if(st(a,n))return e(Zt,{props:this.$props,class:t({},w(Zt.name),!0)});if(a.format||a["ui:widget"]||o["ui:widget"])return e(Xt,{props:this.$props,class:t({},w(Xt.name),!0)});var d=nt(a)?Yt:Jt;return e("div",[e(d,{props:i({itemsFormData:this.itemsFormData},this.$props),class:t({},w(d.name),!0),on:{onArrayOperate:this.handleArrayOperate}}),this.needValidFieldGroup?e(Mt,{key:"validateWidget-array",class:{validateWidget:!0,"validateWidget-array":!0},props:{schema:Object.entries(this.$props.schema).reduce((function(e,r){var t=s(r,2),a=t[0],o=t[1];return"items"!==a&&(e[a]=o),e}),{}),uiSchema:o,errorSchema:this.errorSchema,curNodePath:c,rootFormData:l,globalOptions:u}}):null])}},ra={name:"SelectLinkageField",props:i(i({},It),{},{combiningType:{type:String,default:"anyOf"},selectList:{type:Array,require:!0}}),data:function(){return{curSelectIndex:this.computedCurSelectIndexByFormData(Br(this.rootFormData,this.curNodePath))}},methods:{computedCurSelectIndexByFormData:function(e){var r=Pt(e,this.selectList,this.rootSchema,!0);return 0!==r?r:this.curSelectIndex||0},getSelectBoxVNode:function(){var e=this,r=et({schema:this.schema["".concat(this.combiningType,"Select")]||{},uiSchema:this.uiSchema["".concat(this.combiningType,"Select")]||{},curNodePath:this.curNodePath,rootFormData:this.rootFormData},(function(){return{widget:"SelectWidget"}}));if(r.label=r.label||this.schema.title,r.description=r.description||this.schema.description,!r.uiProps.enumOptions){var a=this.uiSchema[this.combiningType]||[];r.uiProps.enumOptions=this.selectList.map((function(e,r){return{label:Xr({schema:e,uiSchema:a[r],containsSpec:!1}).title||"选项 ".concat(r+1),value:r}}))}return this.$createElement(Mt,{key:"fieldSelect_".concat(this.combiningType),class:t({},"fieldSelect_".concat(this.combiningType),!0),props:i({isFormData:!1,curValue:this.curSelectIndex,globalOptions:this.globalOptions},r),on:{onChange:function(r){e.curSelectIndex=r}}})}},watch:{curSelectIndex:function(e,r){var t=Br(this.rootFormData,this.curNodePath),a=Ft(this.selectList[e],void 0,this.rootSchema),o=Object.prototype.hasOwnProperty;if(p(t)){var i=Tr(this.selectList[r],this.rootSchema);if("object"===f(i))for(var n in i.properties)o.call(i.properties,n)&&!o.call(a,n)&&Wr(t,n)}p(a)?Object.entries(a).forEach((function(e){var r=s(e,2),a=r[0],o=r[1];void 0!==o&&Mr(t,a,o)})):Mr(this.rootFormData,this.curNodePath,a||t)}},render:function(e){var r,a=this,o=this.$props.curNodePath,s=zr(o),l=null;if(("object"===this.schema.type||this.schema.properties)&&!function(e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!1;return!0}(this.schema.properties)){var c,u=Object.assign({},this.schema);delete u[this.combiningType],l=e(aa,{key:"origin_".concat(this.combiningType),class:(c={},t(c,"".concat(this.combiningType,"_originBox"),!0),t(c,"".concat(s,"-originBox"),!0),c),props:i(i({},this.$props),{},{schema:u})})}var p=[this.getSelectBoxVNode()],h=this.selectList[this.curSelectIndex];if(h){var m=this.schema,f=this.combiningType,v="".concat(this.combiningType,"Select");m.properties,m[f],m[v];var g=n(m,["properties",f,v].map(d));h=Object.assign({},g,h);var y=P(Xr({schema:this.schema,uiSchema:this.uiSchema,containsSpec:!1,curNodePath:o,rootFormData:this.rootFormData}),(function(e){return e===a.combiningType?void 0:"ui:".concat(e)})),b=P(rt({schema:this.schema,uiSchema:this.uiSchema,errorSchema:this.errorSchema}),(function(e){return e===a.combiningType?void 0:"err:".concat(e)}));p.push(e(aa,{key:"appendSchema_".concat(this.combiningType),props:i(i({},this.$props),{},{schema:i({"ui:showTitle":!1,"ui:showDescription":!1},h),required:this.required,uiSchema:i(i({},y),(this.uiSchema[this.combiningType]||[])[this.curSelectIndex]),errorSchema:i(i({},b),(this.errorSchema[this.combiningType]||[])[this.curSelectIndex])})}))}return p.push(e(Mt,{key:"validateWidget-".concat(this.combiningType),class:t({validateWidget:!0},"validateWidget-".concat(this.combiningType),!0),props:{schema:this.schema,uiSchema:this.uiSchema,errorSchema:this.errorSchema,curNodePath:this.curNodePath,rootFormData:this.rootFormData,globalOptions:this.globalOptions}})),e("div",[l,e("div",{key:"appendBox_".concat(this.combiningType),class:(r={appendCombining_box:!0},t(r,"".concat(this.combiningType,"_appendBox"),!0),t(r,"".concat(s,"-appendBox"),!0),r)},p)])}},ta={array:ea,boolean:Kt,integer:Ht,number:Ut,object:Bt,string:Qt,null:{render:function(){return null}},anyOf:{name:"AnyOfField",functional:!0,render:function(e,r){var t=r.data,a=t.props,o=n(t,["props"]);return e(ra,i(i({},o),{},{props:i(i({},a),{},{combiningType:"anyOf",selectList:a.schema.anyOf})}),r.children)}},oneOf:{name:"oneOfField",functional:!0,render:function(e,r){var t=r.data,a=t.props,o=n(t,["props"]);return e(ra,i(i({},o),{},{props:i(i({},a),{},{combiningType:"oneOf",selectList:a.schema.oneOf})}),r.children)}}},aa={name:"SchemaField",props:It,functional:!0,render:function(e,r){var a,o=r.props,n=o.rootSchema,s=Tr(o.schema,n),l=i(i({},o),{},{schema:s});if(0===Object.keys(s).length)return null;var c,u,d=Zr(ta,l),p=d.field,h=d.fieldProps,m=Jr({schema:s,uiSchema:o.uiSchema,curNodePath:o.curNodePath,rootFormData:o.rootFormData}),f=zr(o.curNodePath);return s.anyOf&&s.anyOf.length>0&&!it(s)?e(ta.anyOf,{class:(c={},t(c,"".concat(f,"-anyOf"),!0),t(c,"fieldItem",!0),t(c,"anyOfField",!0),c),props:l}):s.oneOf&&s.oneOf.length>0&&!it(s)?e(ta.oneOf,{class:(u={},t(u,"".concat(f,"-oneOf"),!0),t(u,"fieldItem",!0),t(u,"oneOfField",!0),u),props:l}):p&&!m?e(p,{props:i(i({},l),{},{fieldProps:h}),class:i(i({},r.data.class),{},(a={},t(a,w(p.name)||p,!0),t(a,"hiddenWidget",m),t(a,"fieldItem",!0),t(a,f,!0),a))}):null}};var oa={name:"CheckboxesWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}},ia=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("checkbox-group",e._g(e._b({},"checkbox-group",e.$attrs,!1),e.$listeners),e._l(e.enumOptions,(function(r,a){return t("checkbox",{key:a,attrs:{label:r.value}},[e._v("\n "+e._s(r.label)+"\n ")])})),1)};ia._withStripped=!0;var na=Dt({render:ia,staticRenderFns:[]},void 0,oa,void 0,!1,void 0,!1,void 0,void 0,void 0),sa={name:"RadioWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}},la=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("radio-group",e._g(e._b({},"radio-group",e.$attrs,!1),e.$listeners),e._l(e.enumOptions,(function(r,a){return t("radio",{key:a,attrs:{label:r.value}},[e._v("\n "+e._s(r.label)+"\n ")])})),1)};la._withStripped=!0;var ca=Dt({render:la,staticRenderFns:[]},void 0,sa,void 0,!1,void 0,!1,void 0,void 0,void 0),ua={name:"SelectWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}},da=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("i-select",e._g(e._b({},"i-select",e.$attrs,!1),e.$listeners),e._l(e.enumOptions,(function(r,a){return t("i-option",{key:a,attrs:{value:r.value}},[e._v("\n "+e._s(r.label)+"\n ")])})),1)};da._withStripped=!0;var pa=function(e){return"0".concat(e).substr(-2)};function ha(e,r){if(!e)return"";var t=new Date(e);if(r)return t.toISOString();var a={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()},o=a.month,i=a.day;return"".concat(a.year,"-").concat(pa(o),"-").concat(pa(i))}var ma=function(e){return Array.isArray(e)?e.map((function(r){return e&&new Date(r)})):e&&new Date(e)};function fa(e){return null===e||""===e||Array.isArray(e)&&e.every((function(e){return""===e}))}var va={name:"DatePickerWidget",props:{value:{type:null},isNumberValue:{type:Boolean,default:!1},isDatetime:{type:Boolean,default:!1},isRange:{type:Boolean,default:!1}},data:function(){return{originValue:ma(this.value),formatValue:this.formatDate(this.value)}},watch:{value:function(e){e===this.formatValue||(this.originValue=ma(e))}},computed:{type:function(){return this.isDatetime?this.isRange?"datetimerange":"datetime":this.isRange?"daterange":"date"}},methods:{formatDate:function(e){var r=this.$props,t=r.isRange,a=r.isNumberValue,o=r.isDatetime;return t?fa(e)?[]:e.map((function(e){return a?new Date(e).valueOf():ha(e,o)})):fa(e)?void 0:a?new Date(e).valueOf():ha(e,o)}},render:function(e){var r=this;return e("date-picker",{attrs:i({type:this.type,value:this.originValue},this.$attrs),on:i(i({},this.$listeners),{},{input:function(e){r.originValue=e,r.formatValue=r.formatDate(e),r.$emit("input",r.formatValue)}})})}},ga={CheckboxesWidget:na,RadioWidget:ca,SelectWidget:Dt({render:da,staticRenderFns:[]},void 0,ua,void 0,!1,void 0,!1,void 0,void 0,void 0),TimePickerWidget:{name:"TimePickerWidget",functional:!0,render:function(e,r){var t=r.data.on.input;return r.data.on=i(i({},r.data.on),{},{input:function(e){t.apply(r.data.on,[null===e?void 0:e])}}),e("time-picker",r.data,r.children)}},DatePickerWidget:va,DateTimePickerWidget:{name:"DateTimePickerWidget",functional:!0,render:function(e,r){return r.data.attrs.isDatetime=!0,e(va,r.data,r.children)}},UploadWidget:{name:"UploadWidget",props:{value:{default:null,type:[String,Array]},responseFileUrl:{default:function(e){return e?e.url||e.data&&e.data.url:""},type:[Function]},btnText:{type:String,default:"点击上传"},slots:{type:null,default:null}},data:function(){var e=this.value,r=Array.isArray(e),t=this.$attrs.fileList||(r?e.map((function(e,r){return{name:"已上传文件(".concat(r+1,")"),url:e}})):e?[{name:"已上传文件",url:e}]:[]);return{isArrayValue:r,fileList:t}},methods:{getUrl:function(e){return e&&(e.response&&this.responseFileUrl(e.response)||e.url)||""},emitValue:function(e){var r,t=this;if(this.isArrayValue)r=e.length?e.reduce((function(e,r){var a=t.getUrl(r);return a&&e.push(a),e}),[]):[];else{var a=e[e.length-1];r=this.getUrl(a)}this.$emit("input",r)}},render:function(){var e=this,r=this.$createElement,t=this.$attrs,a=this.$props.slots,o={attrs:i(i({defaultFileList:this.fileList,"on-error":function(){e.$message&&e.$message.error("文件上传失败")},"on-preview":function(r){var t=e.getUrl(r);t&&function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_blank",t=document.createElement("a");t.style.display="none",t.target=r,t.href=e,document.body.appendChild(t),t.click(),document.body.removeChild(t)}(t)}},t),{},{"on-remove":function(r,a){e.emitValue(a),t["on-remove"]&&t["on-remove"](r,a)},"on-success":function(r,a,o){e.emitValue(o),t["on-success"]&&t["on-success"](r,a,o)}})};this.isArrayValue||(o.attrs.limit=1);var n=[];return a&&a.default?n.push(r("template",{slot:"default"},["function"==typeof a.default?a.default(r):a.default])):n.push(r("i-button",{props:{type:"primary"}},[this.btnText])),a&&a.tip&&n.push(r("template",{slot:"tip"},["function"==typeof a.tip?a.tip(r):a.tip])),r("upload",o,n)}},SwitchWidget:{name:"SwitchWidget",functional:!0,render:function(e,r){var t=r.props,a=t.activeText,o=t.inactiveText,i=Object.entries({open:a,close:o}).reduce((function(r,t){var a=s(t,2),o=a[0],i=a[1];return void 0!==i&&r.push(e("span",{slot:o},[i])),r}),[]);return e("i-switch",r.data,i)}},InputNumberWidget:{name:"SwitchWidget",functional:!0,render:function(e,r){return void 0===r.data.attrs.value&&(r.data.attrs.value=null),e("input-number",r.data,r.children)}}},ya=ga.InputNumberWidget,ba={types:{boolean:ga.SwitchWidget,string:"i-input",number:ya,integer:ya},formats:{color:"color-picker",time:ga.TimePickerWidget,date:ga.DatePickerWidget,"date-time":ga.DateTimePickerWidget},common:{select:ga.SelectWidget,radioGroup:ga.RadioWidget,checkboxGroup:ga.CheckboxesWidget},widgetComponents:ga};xt(".genFromComponent.ivu-form-label-top .ivu-form-item-label{line-height:26px;padding-bottom:6px}.genFromComponent .ivu-form-item-error-tip{padding-top:2px;position:absolute;display:-webkit-box!important;text-overflow:ellipsis;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;text-align:left;line-height:1.2}.genFromComponent .validateWidget .ivu-form-item-error-tip{padding:5px 0;position:relative}");var Pa=Object.freeze({WIDGET_MAP:Object.freeze(ba),COMPONENT_MAP:Object.freeze({form:{functional:!0,render:function(e,r){return r.data.props=i(i({},r.data.props),{},{labelWidth:"top"!==r.data.props.labelPosition&&r.data.props.labelWidth?parseFloat(String(r.data.props.labelWidth)):void 0}),e("i-form",r.data,r.children)}},formItem:{functional:!0,render:function(e,r){return r.data.props=i(i({},r.data.props),{},{labelWidth:r.data.props&&r.data.props.labelWidth?parseFloat(String(r.data.props.labelWidth)):void 0}),e("form-item",r.data,Object.entries(r.slots()).map((function(r){var t=s(r,2),a=t[0],o=t[1];return e("template",{slot:a},o)})))}},button:"i-button",popover:{functional:!0,render:function(e,r){var t=r.slots(),a=t.default,o=t.reference;return e("poptip",r.data,[e("template",{slot:"default"},o),e("template",{slot:"content"},a)])}}}),HELPERS:{isMiniDes:function(e){return e&&["left","right"].includes(e.labelPosition)}}}),wa=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r.WIDGET_MAP.widgetComponents&&Object.entries(r.WIDGET_MAP.widgetComponents).forEach((function(r){var t=s(r,2),a=t[0],o=t[1];return e.component(a,o)})),{name:"VueForm",props:Ot,provide:function(){return{genFormProvide:this.genFormProvide}},data:function(){var e=Ft(this.$props.schema,this.$props.value,this.$props.schema);return this.emitFormDataChange(e,this.value),{formData:e}},computed:{genFormProvide:function(){return{fallbackLabel:this.fallbackLabel}},footerParams:function(){return i({show:!0,okBtn:"保存",cancelBtn:"取消"},this.formFooter)}},watch:{formData:{handler:function(e,r){this.emitFormDataChange(e,r)},deep:!0},schema:function(e,r){this.willReceiveProps(e,r)},value:function(e,r){this.willReceiveProps(e,r)}},methods:{emitFormDataChange:function(e,r){this.$emit("input",e),this.$emit("on-change",{newValue:e,oldValue:r})},willReceiveProps:function(e,r){if(!v(e,r)){var t=Ft(this.$props.schema,this.$props.value,this.$props.schema);v(this.formData,t)||(this.formData=t)}}},mounted:function(){this.$emit("on-form-mounted",this.$refs.genEditForm)},render:function(e){var a,o=this,s=this.$scopedSlots.default?this.$scopedSlots.default({formData:o.formData,formRefFn:function(){return o.$refs.genEditForm}}):this.footerParams.show?e(_t,{props:{globalOptions:r,okBtn:o.footerParams.okBtn,cancelBtn:o.footerParams.cancelBtn,formItemAttrs:o.footerParams.formItemAttrs},on:{onCancel:function(){o.$emit("on-cancel")},onSubmit:function(){o.$refs.genEditForm.validate((function(e,r){return e?o.$emit("on-submit",o.formData):o.$emit("on-validation-failed",r)}))}}}):void 0,l=o.$props.formProps,c=l.layoutColumn,u=void 0===c?1:c,d=l.inlineFooter,p=l.inline,h=n(l,["layoutColumn","inlineFooter","inline"]),m={schema:this.schema,uiSchema:this.uiSchema,errorSchema:this.errorSchema,customFormats:this.customFormats,customRule:this.customRule,rootSchema:this.schema,rootFormData:this.formData,curNodePath:"",globalOptions:r,formProps:i({labelPosition:"top",labelSuffix:":"},h)};return e(r.COMPONENT_MAP.form,{class:(a={genFromComponent:!0,formInlineFooter:d,formInline:p},t(a,"genFromComponent_".concat(this.schema.id,"Form"),!!this.schema.id),t(a,"layoutColumn",!p),t(a,"layoutColumn-".concat(u),!p),a),ref:"genEditForm",props:i({model:o.formData},m.formProps)},[e(aa,{props:m}),s])}}}(Pa);"undefined"!=typeof window&&window.Vue&&window.Vue.component("VueFormIview3",wa);export default wa;export{aa as SchemaField,It as fieldProps,dt as formUtils,Ft as getDefaultFormState,Pa as globalOptions,jr as i18n,wt as schemaValidate,Ur as vueUtils}; +!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var a=r.length-1,o=1;o<a;++o)r[o]=r[o].slice(1,-1);return r[a]=r[a].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function a(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function i(e){var a=r("[0-9]","[A-Fa-f]"),o=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),i="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",n=r("[\\:\\/\\?\\#\\[\\]\\@]",i),s=e?"[\\uE000-\\uF8FF]":"[]",l=r("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t("[A-Za-z]"+r("[A-Za-z]","[0-9]","[\\+\\-\\.]")+"*"),t(t(o+"|"+r(l,i,"[\\:]"))+"*");var c=t(t("25[0-5]")+"|"+t("2[0-4][0-9]")+"|"+t("1[0-9][0-9]")+"|"+t("0?[1-9][0-9]")+"|0?0?[0-9]"),u=t(c+"\\."+c+"\\."+c+"\\."+c),d=t(a+"{1,4}"),p=t(t(d+"\\:"+d)+"|"+u),h=t(t(d+"\\:")+"{6}"+p),m=t("\\:\\:"+t(d+"\\:")+"{5}"+p),f=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+p),v=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+p),g=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+p),y=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+p),b=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+p),P=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),w=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),E=t([h,m,f,v,g,y,b,P,w].join("|")),S=t(t(l+"|"+o)+"+");t("[vV]"+a+"+\\."+r(l,i,"[\\:]")+"+"),t(t(o+"|"+r(l,i))+"*");var F=t(o+"|"+r(l,i,"[\\:\\@]"));return t(t(o+"|"+r(l,i,"[\\@]"))+"+"),t(t(F+"|"+r("[\\/\\?]",s))+"*"),{NOT_SCHEME:new RegExp(r("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,i),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,i),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,i),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,i),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,i,"[\\:\\@\\/\\?]",s),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,i,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,i),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,n),"g"),PCT_ENCODED:new RegExp(o,"g"),IPV4ADDRESS:new RegExp("^("+u+")$"),IPV6ADDRESS:new RegExp("^\\[?("+E+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+S+")")+"?\\]?$")}}var n=i(!1),s=i(!0),l=function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,r){var t=[],a=!0,o=!1,i=void 0;try{for(var n,s=e[Symbol.iterator]();!(a=(n=s.next()).done)&&(t.push(n.value),!r||t.length!==r);a=!0);}catch(e){o=!0,i=e}finally{try{!a&&s.return&&s.return()}finally{if(o)throw i}}return t}(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=2147483647,u=/^xn--/,d=/[^\0-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,f=String.fromCharCode;function v(e){throw new RangeError(h[e])}function g(e,r){var t=e.split("@"),a="";t.length>1&&(a=t[0]+"@",e=t[1]);var o=function(e,r){for(var t=[],a=e.length;a--;)t[a]=r(e[a]);return t}((e=e.replace(p,".")).split("."),r).join(".");return a+o}function y(e){for(var r=[],t=0,a=e.length;t<a;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<a){var i=e.charCodeAt(t++);56320==(64512&i)?r.push(((1023&o)<<10)+(1023&i)+65536):(r.push(o),t--)}else r.push(o)}return r}var b=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},P=function(e,r,t){var a=0;for(e=t?m(e/700):e>>1,e+=m(e/r);e>455;a+=36)e=m(e/35);return m(a+36*e/(e+38))},w=function(e){var r,t=[],a=e.length,o=0,i=128,n=72,s=e.lastIndexOf("-");s<0&&(s=0);for(var l=0;l<s;++l)e.charCodeAt(l)>=128&&v("not-basic"),t.push(e.charCodeAt(l));for(var u=s>0?s+1:0;u<a;){for(var d=o,p=1,h=36;;h+=36){u>=a&&v("invalid-input");var f=(r=e.charCodeAt(u++))-48<10?r-22:r-65<26?r-65:r-97<26?r-97:36;(f>=36||f>m((c-o)/p))&&v("overflow"),o+=f*p;var g=h<=n?1:h>=n+26?26:h-n;if(f<g)break;var y=36-g;p>m(c/y)&&v("overflow"),p*=y}var b=t.length+1;n=P(o-d,b,0==d),m(o/b)>c-i&&v("overflow"),i+=m(o/b),o%=b,t.splice(o++,0,i)}return String.fromCodePoint.apply(String,t)},E=function(e){var r=[],t=(e=y(e)).length,a=128,o=0,i=72,n=!0,s=!1,l=void 0;try{for(var u,d=e[Symbol.iterator]();!(n=(u=d.next()).done);n=!0){var p=u.value;p<128&&r.push(f(p))}}catch(e){s=!0,l=e}finally{try{!n&&d.return&&d.return()}finally{if(s)throw l}}var h=r.length,g=h;for(h&&r.push("-");g<t;){var w=c,E=!0,S=!1,F=void 0;try{for(var x,O=e[Symbol.iterator]();!(E=(x=O.next()).done);E=!0){var _=x.value;_>=a&&_<w&&(w=_)}}catch(e){S=!0,F=e}finally{try{!E&&O.return&&O.return()}finally{if(S)throw F}}var D=g+1;w-a>m((c-o)/D)&&v("overflow"),o+=(w-a)*D,a=w;var $=!0,k=!1,j=void 0;try{for(var I,A=e[Symbol.iterator]();!($=(I=A.next()).done);$=!0){var C=I.value;if(C<a&&++o>c&&v("overflow"),C==a){for(var R=o,N=36;;N+=36){var L=N<=i?1:N>=i+26?26:N-i;if(R<L)break;var T=R-L,z=36-L;r.push(f(b(L+T%z,0))),R=m(T/z)}r.push(f(b(R,0))),i=P(o,D,g==h),o=0,++g}}}catch(e){k=!0,j=e}finally{try{!$&&A.return&&A.return()}finally{if(k)throw j}}++o,++a}return r.join("")},S=function(e){return g(e,(function(e){return d.test(e)?"xn--"+E(e):e}))},F=function(e){return g(e,(function(e){return u.test(e)?w(e.slice(4).toLowerCase()):e}))},x={};function O(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function _(e){for(var r="",t=0,a=e.length;t<a;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(a-t>=6){var i=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&i)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(a-t>=9){var n=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&n)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function D(e,r){function t(e){var t=_(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,O).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,O).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,O).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,O).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,O).replace(r.PCT_ENCODED,o)),e}function $(e){return e.replace(/^0*(.*)/,"$1")||"0"}function k(e,r){var t=e.match(r.IPV4ADDRESS)||[],a=l(t,2)[1];return a?a.split(".").map($).join("."):e}function j(e,r){var t=e.match(r.IPV6ADDRESS)||[],a=l(t,3),o=a[1],i=a[2];if(o){for(var n=o.toLowerCase().split("::").reverse(),s=l(n,2),c=s[0],u=s[1],d=u?u.split(":").map($):[],p=c.split(":").map($),h=r.IPV4ADDRESS.test(p[p.length-1]),m=h?7:8,f=p.length-m,v=Array(m),g=0;g<m;++g)v[g]=d[g]||p[f+g]||"";h&&(v[m-1]=k(v[m-1],r));var y=v.reduce((function(e,r,t){if(!r||"0"===r){var a=e[e.length-1];a&&a.index+a.length===t?a.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(y&&y.length>1){var P=v.slice(0,y.index),w=v.slice(y.index+y.length);b=P.join(":")+"::"+w.join(":")}else b=v.join(":");return i&&(b+="%"+i),b}return e}var I=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,A=void 0==="".match(/(){0}/)[1];function C(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},a=!1!==r.iri?s:n;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(I);if(o){A?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=j(k(t.host,a),a)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var i=x[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||i&&i.unicodeSupport)D(t,a);else{if(t.host&&(r.domainHost||i&&i.domainHost))try{t.host=S(t.host.replace(a.PCT_ENCODED,_).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}D(t,n)}i&&i.parse&&i.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function R(e,r){var t=!1!==r.iri?s:n,a=[];return void 0!==e.userinfo&&(a.push(e.userinfo),a.push("@")),void 0!==e.host&&a.push(j(k(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(a.push(":"),a.push(String(e.port))),a.length?a.join(""):void 0}var N=/^\.\.?\//,L=/^\/\.(\/|$)/,T=/^\/\.\.(\/|$)/,z=/^\/?(?:.|\n)*?(?=\/|$)/;function V(e){for(var r=[];e.length;)if(e.match(N))e=e.replace(N,"");else if(e.match(L))e=e.replace(L,"/");else if(e.match(T))e=e.replace(T,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(z);if(!t)throw new Error("Unexpected dot segment condition");var a=t[0];e=e.slice(a.length),r.push(a)}return r.join("")}function q(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?s:n,a=[],o=x[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?F(e.host):S(e.host.replace(t.PCT_ENCODED,_).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}D(e,t),"suffix"!==r.reference&&e.scheme&&(a.push(e.scheme),a.push(":"));var i=R(e,r);if(void 0!==i&&("suffix"!==r.reference&&a.push("//"),a.push(i),e.path&&"/"!==e.path.charAt(0)&&a.push("/")),void 0!==e.path){var l=e.path;r.absolutePath||o&&o.absolutePath||(l=V(l)),void 0===i&&(l=l.replace(/^\/\//,"/%2F")),a.push(l)}return void 0!==e.query&&(a.push("?"),a.push(e.query)),void 0!==e.fragment&&(a.push("#"),a.push(e.fragment)),a.join("")}function W(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],o={};return a||(e=C(q(e,t),t),r=C(q(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=V(r.path||""),o.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=V(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=V(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=V(o.path)),o.query=r.query):(o.path=e.path,void 0!==r.query?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function M(e,r){return e&&e.toString().replace(r&&r.iri?s.PCT_ENCODED:n.PCT_ENCODED,_)}var B={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},Q={scheme:"https",domainHost:B.domainHost,parse:B.parse,serialize:B.serialize};function U(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var H={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=U(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(U(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),a=l(t,2),o=a[0],i=a[1];e.path=o&&"/"!==o?o:void 0,e.query=i,e.resourceName=void 0}return e.fragment=void 0,e}},K={scheme:"wss",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize},G={},J="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Z="[0-9A-Fa-f]",Y=t(t("%[EFef]"+Z+"%"+Z+Z+"%"+Z+Z)+"|"+t("%[89A-Fa-f]"+Z+"%"+Z+Z)+"|"+t("%"+Z+Z)),X=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),ee=new RegExp(J,"g"),re=new RegExp(Y,"g"),te=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',X),"g"),ae=new RegExp(r("[^]",J,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),oe=ae;function ie(e){var r=_(e);return r.match(ee)?r:e}var ne={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,i={},n=t.query.split("&"),s=0,l=n.length;s<l;++s){var c=n[s].split("=");switch(c[0]){case"to":for(var u=c[1].split(","),d=0,p=u.length;d<p;++d)a.push(u[d]);break;case"subject":t.subject=M(c[1],r);break;case"body":t.body=M(c[1],r);break;default:o=!0,i[M(c[0],r)]=M(c[1],r)}}o&&(t.headers=i)}t.query=void 0;for(var h=0,m=a.length;h<m;++h){var f=a[h].split("@");if(f[0]=M(f[0]),r.unicodeSupport)f[1]=M(f[1],r).toLowerCase();else try{f[1]=S(M(f[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}a[h]=f.join("@")}return t},serialize:function(e,r){var t,a=e,i=null!=(t=e.to)?t instanceof Array?t:"number"!=typeof t.length||t.split||t.setInterval||t.call?[t]:Array.prototype.slice.call(t):[];if(i){for(var n=0,s=i.length;n<s;++n){var l=String(i[n]),c=l.lastIndexOf("@"),u=l.slice(0,c).replace(re,ie).replace(re,o).replace(te,O),d=l.slice(c+1);try{d=r.iri?F(d):S(M(d,r).toLowerCase())}catch(e){a.error=a.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}i[n]=u+"@"+d}a.path=i.join(",")}var p=e.headers=e.headers||{};e.subject&&(p.subject=e.subject),e.body&&(p.body=e.body);var h=[];for(var m in p)p[m]!==G[m]&&h.push(m.replace(re,ie).replace(re,o).replace(ae,O)+"="+p[m].replace(re,ie).replace(re,o).replace(oe,O));return h.length&&(a.query=h.join("&")),a}},se=/^([^\:]+)\:(.*)/,le={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(se),a=e;if(t){var o=r.scheme||a.scheme||"urn",i=t[1].toLowerCase(),n=t[2],s=o+":"+(r.nid||i),l=x[s];a.nid=i,a.nss=n,a.path=void 0,l&&(a=l.parse(a,r))}else a.error=a.error||"URN can not be parsed.";return a},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",a=e.nid,o=t+":"+(r.nid||a),i=x[o];i&&(e=i.serialize(e,r));var n=e,s=e.nss;return n.path=(a||r.nid)+":"+s,n}},ce=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ue={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match(ce)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};x[B.scheme]=B,x[Q.scheme]=Q,x[H.scheme]=H,x[K.scheme]=K,x[ne.scheme]=ne,x[le.scheme]=le,x[ue.scheme]=ue,e.SCHEMES=x,e.pctEncChar=O,e.pctDecChars=_,e.parse=C,e.removeDotSegments=V,e.serialize=q,e.resolveComponents=W,e.resolve=function(e,r,t){var a=function(e,r){var t=e;if(r)for(var a in r)t[a]=r[a];return t}({scheme:"null"},t);return q(W(C(e,a),C(r,a),a,!0),a)},e.normalize=function(e,r){return"string"==typeof e?e=q(C(e,r),r):"object"===a(e)&&(e=C(q(e,r),r)),e},e.equal=function(e,r,t){return"string"==typeof e?e=q(C(e,t),t):"object"===a(e)&&(e=q(e,t)),"string"==typeof r?r=q(C(r,t),t):"object"===a(r)&&(r=q(r,t)),e===r},e.escapeComponent=function(e,r){return e&&e.toString().replace(r&&r.iri?s.ESCAPE:n.ESCAPE,O)},e.unescapeComponent=M,Object.defineProperty(e,"__esModule",{value:!0})}(r)}));(_=D)&&_.__esModule&&Object.prototype.hasOwnProperty.call(_,"default")&&_.default;var $=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 a,o,i;if(Array.isArray(r)){if((a=r.length)!=t.length)return!1;for(o=a;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((a=(i=Object.keys(r)).length)!==Object.keys(t).length)return!1;for(o=a;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,i[o]))return!1;for(o=a;0!=o--;){var n=i[o];if(!e(r[n],t[n]))return!1}return!0}return r!=r&&t!=t},k={copy:function(e,r){for(var t in r=r||{},e)r[t]=e[t];return r},checkDataType:j,checkDataTypes:function(e,r,t){switch(e.length){case 1:return j(e[0],r,t,!0);default:var a="",o=A(e);for(var i in o.array&&o.object&&(a=o.null?"(":"(!"+r+" || ",a+="typeof "+r+' !== "object")',delete o.null,delete o.array,delete o.object),o.number&&delete o.integer,o)a+=(a?" && ":"")+j(i,r,t,!0);return a}},coerceToTypes:function(e,r){if(Array.isArray(r)){for(var t=[],a=0;a<r.length;a++){var o=r[a];(I[o]||"array"===e&&"array"===o)&&(t[t.length]=o)}if(t.length)return t}else{if(I[r])return[r];if("array"===e&&"array"===r)return["array"]}},toHash:A,getProperty:N,escapeQuotes:L,equal:$,ucs2length:function(e){for(var r,t=0,a=e.length,o=0;o<a;)t++,(r=e.charCodeAt(o++))>=55296&&r<=56319&&o<a&&56320==(64512&(r=e.charCodeAt(o)))&&o++;return t},varOccurences:function(e,r){r+="[^0-9]";var t=e.match(new RegExp(r,"g"));return t?t.length:0},varReplace:function(e,r,t){return r+="([^0-9])",t=t.replace(/\$/g,"$$$$"),e.replace(new RegExp(r,"g"),t+"$1")},schemaHasRules:function(e,r){if("boolean"==typeof e)return!e;for(var t in e)if(r[t])return!0},schemaHasRulesExcept:function(e,r,t){if("boolean"==typeof e)return!e&&"not"!=t;for(var a in e)if(a!=t&&r[a])return!0},schemaUnknownRules:function(e,r){if("boolean"==typeof e)return;for(var t in e)if(!r[t])return t},toQuotedString:T,getPathExpr:function(e,r,t,a){return q(e,t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'")},getPath:function(e,r,t){var a=T(t?"/"+W(r):N(r));return q(e,a)},getData:function(e,r,t){var a,o,i,n;if(""===e)return"rootData";if("/"==e[0]){if(!z.test(e))throw new Error("Invalid JSON-pointer: "+e);o=e,i="rootData"}else{if(!(n=e.match(V)))throw new Error("Invalid JSON-pointer: "+e);if(a=+n[1],"#"==(o=n[2])){if(a>=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(i="data"+(r-a||""),!o)return i}for(var s=i,l=o.split("/"),c=0;c<l.length;c++){var u=l[c];u&&(i+=N(M(u)),s+=" && "+i)}return s},unescapeFragment:function(e){return M(decodeURIComponent(e))},unescapeJsonPointer:M,escapeFragment:function(e){return encodeURIComponent(W(e))},escapeJsonPointer:W};function j(e,r,t,a){var o=a?" !== ":" === ",i=a?" || ":" && ",n=a?"!":"",s=a?"":"!";switch(e){case"null":return r+o+"null";case"array":return n+"Array.isArray("+r+")";case"object":return"("+n+r+i+"typeof "+r+o+'"object"'+i+s+"Array.isArray("+r+"))";case"integer":return"(typeof "+r+o+'"number"'+i+s+"("+r+" % 1)"+i+r+o+r+(t?i+n+"isFinite("+r+")":"")+")";case"number":return"(typeof "+r+o+'"'+e+'"'+(t?i+n+"isFinite("+r+")":"")+")";default:return"typeof "+r+o+'"'+e+'"'}}var I=A(["string","number","integer","boolean","null"]);function A(e){for(var r={},t=0;t<e.length;t++)r[e[t]]=!0;return r}var C=/^[a-z$_][a-z$_0-9]*$/i,R=/'|\\/g;function N(e){return"number"==typeof e?"["+e+"]":C.test(e)?"."+e:"['"+L(e)+"']"}function L(e){return e.replace(R,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function T(e){return"'"+L(e)+"'"}var z=/^\/(?:[^~]|~0|~1)*$/,V=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function q(e,r){return'""'==e?r:(e+" + "+r).replace(/([^\\])' \+ '/g,"$1")}function W(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function M(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}var B=function(e){k.copy(e,this)};var Q=x((function(e){var r=e.exports=function(e,t,a){"function"==typeof t&&(a=t,t={}),function e(t,a,o,i,n,s,l,c,u,d){if(i&&"object"==typeof i&&!Array.isArray(i)){for(var p in a(i,n,s,l,c,u,d),i){var h=i[p];if(Array.isArray(h)){if(p in r.arrayKeywords)for(var m=0;m<h.length;m++)e(t,a,o,h[m],n+"/"+p+"/"+m,s,n,p,i,m)}else if(p in r.propsKeywords){if(h&&"object"==typeof h)for(var f in h)e(t,a,o,h[f],n+"/"+p+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),s,n,p,i,f)}else(p in r.keywords||t.allKeys&&!(p in r.skipKeywords))&&e(t,a,o,h,n+"/"+p,s,n,p,i)}o(i,n,s,l,c,u,d)}}(t,"function"==typeof(a=t.cb||a)?a:a.pre||function(){},a.post||function(){},e,"",e)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}})),U=H;function H(e,r,t){var a=this._refs[t];if("string"==typeof a){if(!this._refs[a])return H.call(this,e,r,a);a=this._refs[a]}if((a=a||this._schemas[t])instanceof B)return X(a.schema,this._opts.inlineRefs)?a.schema:a.validate||this._compile(a);var o,i,n,s=K.call(this,r,t);return s&&(o=s.schema,r=s.root,n=s.baseId),o instanceof B?i=o.validate||e.call(this,o.schema,r,void 0,n):void 0!==o&&(i=X(o,this._opts.inlineRefs)?o:e.call(this,o,r,void 0,n)),i}function K(e,r){var t=D.parse(r),a=re(t),o=ee(this._getId(e.schema));if(0===Object.keys(e.schema).length||a!==o){var i=ae(a),n=this._refs[i];if("string"==typeof n)return G.call(this,e,n,t);if(n instanceof B)n.validate||this._compile(n),e=n;else{if(!((n=this._schemas[i])instanceof B))return;if(n.validate||this._compile(n),i==ae(r))return{schema:n,root:e,baseId:o};e=n}if(!e.schema)return;o=ee(this._getId(e.schema))}return Z.call(this,t,o,e.schema,e)}function G(e,r,t){var a=K.call(this,e,r);if(a){var o=a.schema,i=a.baseId;e=a.root;var n=this._getId(o);return n&&(i=oe(i,n)),Z.call(this,t,i,o,e)}}H.normalizeId=ae,H.fullPath=ee,H.url=oe,H.ids=function(e){var r=ae(this._getId(e)),t={"":r},a={"":ee(r,!1)},o={},i=this;return Q(e,{allKeys:!0},(function(e,r,n,s,l,c,u){if(""!==r){var d=i._getId(e),p=t[s],h=a[s]+"/"+l;if(void 0!==u&&(h+="/"+("number"==typeof u?u:k.escapeFragment(u))),"string"==typeof d){d=p=ae(p?D.resolve(p,d):d);var m=i._refs[d];if("string"==typeof m&&(m=i._refs[m]),m&&m.schema){if(!$(e,m.schema))throw new Error('id "'+d+'" resolves to more than one schema')}else if(d!=ae(h))if("#"==d[0]){if(o[d]&&!$(e,o[d]))throw new Error('id "'+d+'" resolves to more than one schema');o[d]=e}else i._refs[d]=h}t[r]=p,a[r]=h}})),o},H.inlineRef=X,H.schema=K;var J=k.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function Z(e,r,t,a){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var o=e.fragment.split("/"),i=1;i<o.length;i++){var n=o[i];if(n){if(void 0===(t=t[n=k.unescapeFragment(n)]))break;var s;if(!J[n]&&((s=this._getId(t))&&(r=oe(r,s)),t.$ref)){var l=oe(r,t.$ref),c=K.call(this,a,l);c&&(t=c.schema,a=c.root,r=c.baseId)}}}return void 0!==t&&t!==a.schema?{schema:t,root:a,baseId:r}:void 0}}var Y=k.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function X(e,r){return!1!==r&&(void 0===r||!0===r?function e(r){var t;if(Array.isArray(r)){for(var a=0;a<r.length;a++)if("object"==typeof(t=r[a])&&!e(t))return!1}else for(var o in r){if("$ref"==o)return!1;if("object"==typeof(t=r[o])&&!e(t))return!1}return!0}(e):r?function e(r){var t,a=0;if(Array.isArray(r)){for(var o=0;o<r.length;o++)if("object"==typeof(t=r[o])&&(a+=e(t)),a==1/0)return 1/0}else for(var i in r){if("$ref"==i)return 1/0;if(Y[i])a++;else if("object"==typeof(t=r[i])&&(a+=e(t)+1),a==1/0)return 1/0}return a}(e)<=r:void 0)}function ee(e,r){return!1!==r&&(e=ae(e)),re(D.parse(e))}function re(e){return D.serialize(e).split("#")[0]+"#"}var te=/#\/?$/;function ae(e){return e?e.replace(te,""):""}function oe(e,r){return r=ae(r),D.resolve(e,r)}var ie={Validation:se((function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:se(ne)};function ne(e,r,t){this.message=t||ne.message(e,r),this.missingRef=U.url(e,r),this.missingSchema=U.normalizeId(U.fullPath(this.missingRef))}function se(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}ne.message=function(e,r){return"can't resolve reference "+r+" from id "+e};var le=function(e,r){r||(r={}),"function"==typeof r&&(r={cmp:r});var t="boolean"==typeof r.cycles&&r.cycles,a=r.cmp&&function(e){return function(r){return function(t,a){var o={key:t,value:r[t]},i={key:a,value:r[a]};return e(o,i)}}}(r.cmp),o=[];return function e(r){if(r&&r.toJSON&&"function"==typeof r.toJSON&&(r=r.toJSON()),void 0!==r){if("number"==typeof r)return isFinite(r)?""+r:"null";if("object"!=typeof r)return JSON.stringify(r);var i,n;if(Array.isArray(r)){for(n="[",i=0;i<r.length;i++)i&&(n+=","),n+=e(r[i])||"null";return n+"]"}if(null===r)return"null";if(-1!==o.indexOf(r)){if(t)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=o.push(r)-1,l=Object.keys(r).sort(a&&a(r));for(n="",i=0;i<l.length;i++){var c=l[i],u=e(r[c]);u&&(n&&(n+=","),n+=JSON.stringify(c)+":"+u)}return o.splice(s,1),"{"+n+"}"}}(e)},ce=function(e,r,t){var a="",o=!0===e.schema.$async,i=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),n=e.self._getId(e.schema);if(e.opts.strictKeywords){var s=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(s){var l="unknown keyword: "+s;if("log"!==e.opts.strictKeywords)throw new Error(l);e.logger.warn(l)}}if(e.isTop&&(a+=" var validate = ",o&&(e.async=!0,a+="async "),a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",n&&(e.opts.sourceCode||e.opts.processCode)&&(a+=" /*# sourceURL="+n+" */ ")),"boolean"==typeof e.schema||!i&&!e.schema.$ref){var c=e.level,u=e.dataLevel,d=e.schema["false schema"],p=e.schemaPath+e.util.getProperty("false schema"),h=e.errSchemaPath+"/false schema",m=!e.opts.allErrors,f="data"+(u||""),v="valid"+c;if(!1===e.schema){e.isTop?m=!0:a+=" var "+v+" = false; ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'boolean schema is false' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";var g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?a+=o?" return data; ":" validate.errors = null; return true; ":a+=" var "+v+" = true; ";return e.isTop&&(a+=" }; return validate; "),a}if(e.isTop){var y=e.isTop;c=e.level=0,u=e.dataLevel=0,f="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var b="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}a+=" var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data; "}else{c=e.level,f="data"+((u=e.dataLevel)||"");if(n&&(e.baseId=e.resolve.url(e.baseId,n)),o&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+c+" = errors;"}v="valid"+c,m=!e.opts.allErrors;var P="",w="",E=e.schema.type,S=Array.isArray(E);if(E&&e.opts.nullable&&!0===e.schema.nullable&&(S?-1==E.indexOf("null")&&(E=E.concat("null")):"null"!=E&&(E=[E,"null"],S=!0)),S&&1==E.length&&(E=E[0],S=!1),e.schema.$ref&&i){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(i=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(a+=" "+e.RULES.all.$comment.code(e,"$comment")),E){if(e.opts.coerceTypes)var F=e.util.coerceToTypes(e.opts.coerceTypes,E);var x=e.RULES.types[E];if(F||S||!0===x||x&&!Z(x)){p=e.schemaPath+".type",h=e.errSchemaPath+"/type",p=e.schemaPath+".type",h=e.errSchemaPath+"/type";var O=S?"checkDataTypes":"checkDataType";if(a+=" if ("+e.util[O](E,f,e.opts.strictNumbers,!0)+") { ",F){var _="dataType"+c,D="coerced"+c;a+=" var "+_+" = typeof "+f+"; var "+D+" = undefined; ","array"==e.opts.coerceTypes&&(a+=" if ("+_+" == 'object' && Array.isArray("+f+") && "+f+".length == 1) { "+f+" = "+f+"[0]; "+_+" = typeof "+f+"; if ("+e.util.checkDataType(e.schema.type,f,e.opts.strictNumbers)+") "+D+" = "+f+"; } "),a+=" if ("+D+" !== undefined) ; ";var $=F;if($)for(var k,j=-1,I=$.length-1;j<I;)"string"==(k=$[j+=1])?a+=" else if ("+_+" == 'number' || "+_+" == 'boolean') "+D+" = '' + "+f+"; else if ("+f+" === null) "+D+" = ''; ":"number"==k||"integer"==k?(a+=" else if ("+_+" == 'boolean' || "+f+" === null || ("+_+" == 'string' && "+f+" && "+f+" == +"+f+" ","integer"==k&&(a+=" && !("+f+" % 1)"),a+=")) "+D+" = +"+f+"; "):"boolean"==k?a+=" else if ("+f+" === 'false' || "+f+" === 0 || "+f+" === null) "+D+" = false; else if ("+f+" === 'true' || "+f+" === 1) "+D+" = true; ":"null"==k?a+=" else if ("+f+" === '' || "+f+" === 0 || "+f+" === false) "+D+" = null; ":"array"==e.opts.coerceTypes&&"array"==k&&(a+=" else if ("+_+" == 'string' || "+_+" == 'number' || "+_+" == 'boolean' || "+f+" == null) "+D+" = ["+f+"]; ");a+=" else { ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } if ("+D+" !== undefined) { ";var A=u?"data"+(u-1||""):"parentData";a+=" "+f+" = "+D+"; ",u||(a+="if ("+A+" !== undefined)"),a+=" "+A+"["+(u?e.dataPathArr[u]:"parentDataProperty")+"] = "+D+"; } "}else{(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } "}}if(e.schema.$ref&&!i)a+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",m&&(a+=" } if (errors === ",a+=y?"0":"errs_"+c,a+=") { ",w+="}");else{var C=e.RULES;if(C)for(var R=-1,N=C.length-1;R<N;)if(Z(x=C[R+=1])){if(x.type&&(a+=" if ("+e.util.checkDataType(x.type,f,e.opts.strictNumbers)+") { "),e.opts.useDefaults)if("object"==x.type&&e.schema.properties){d=e.schema.properties;var L=Object.keys(d);if(L)for(var T,z=-1,V=L.length-1;z<V;){if(void 0!==(M=d[T=L[z+=1]]).default){var q=f+e.util.getProperty(T);if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+q;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+q+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+q+" === null || "+q+" === '' "),a+=" ) "+q+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(M.default)+" ":a+=" "+JSON.stringify(M.default)+" ",a+="; "}}}else if("array"==x.type&&Array.isArray(e.schema.items)){var W=e.schema.items;if(W){j=-1;for(var M,B=W.length-1;j<B;)if(void 0!==(M=W[j+=1]).default){q=f+"["+j+"]";if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+q;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+q+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+q+" === null || "+q+" === '' "),a+=" ) "+q+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(M.default)+" ":a+=" "+JSON.stringify(M.default)+" ",a+="; "}}}var Q=x.rules;if(Q)for(var U,H=-1,K=Q.length-1;H<K;)if(Y(U=Q[H+=1])){var G=U.code(e,U.keyword,x.type);G&&(a+=" "+G+" ",m&&(P+="}"))}if(m&&(a+=" "+P+" ",P=""),x.type&&(a+=" } ",E&&E===x.type&&!F)){a+=" else { ";var J;p=e.schemaPath+".type",h=e.errSchemaPath+"/type";(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}m&&(a+=" if (errors === ",a+=y?"0":"errs_"+c,a+=") { ",w+="}")}}function Z(e){for(var r=e.rules,t=0;t<r.length;t++)if(Y(r[t]))return!0}function Y(r){return void 0!==e.schema[r.keyword]||r.implements&&function(r){for(var t=r.implements,a=0;a<t.length;a++)if(void 0!==e.schema[t[a]])return!0}(r)}return m&&(a+=" "+w+" "),y?(o?(a+=" if (errors === 0) return data; ",a+=" else throw new ValidationError(vErrors); "):(a+=" validate.errors = vErrors; ",a+=" return errors === 0; "),a+=" }; return validate;"):a+=" var "+v+" = errors === errs_"+c+";",a},ue=k.ucs2length,de=ie.Validation,pe=function e(r,t,a,o){var i=this,n=this._opts,s=[void 0],l={},c=[],u={},d=[],p={},h=[];t=t||{schema:r,refVal:s,refs:l};var m=he.call(this,r,t,o),f=this._compilations[m.index];if(m.compiling)return f.callValidate=function e(){var r=f.validate,t=r.apply(this,arguments);return e.errors=r.errors,t};var v=this._formats,g=this.RULES;try{var y=P(r,t,a,o);f.validate=y;var b=f.callValidate;return b&&(b.schema=y.schema,b.errors=null,b.refs=y.refs,b.refVal=y.refVal,b.root=y.root,b.$async=y.$async,n.sourceCode&&(b.source=y.source)),y}finally{me.call(this,r,t,o)}function P(r,a,o,u){var p=!a||a&&a.schema==r;if(a.schema!=t.schema)return e.call(i,r,a,o,u);var m,f=!0===r.$async,y=ce({isTop:!0,schema:r,isRoot:p,baseId:u,root:a,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:ie.MissingRef,RULES:g,validate:ce,util:k,resolve:U,resolveRef:w,usePattern:F,useDefault:x,useCustomRule:O,opts:n,formats:v,logger:i.logger,self:i});y=Pe(s,ye)+Pe(c,ve)+Pe(d,ge)+Pe(h,be)+y,n.processCode&&(y=n.processCode(y,r));try{m=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",y)(i,g,v,t,s,d,h,$,ue,de),s[0]=m}catch(e){throw i.logger.error("Error compiling schema, function code:",y),e}return m.schema=r,m.errors=null,m.refs=l,m.refVal=s,m.root=p?m:a,f&&(m.$async=!0),!0===n.sourceCode&&(m.source={code:y,patterns:c,defaults:d}),m}function w(r,o,c){o=U.url(r,o);var u,d,p=l[o];if(void 0!==p)return S(u=s[p],d="refVal["+p+"]");if(!c&&t.refs){var h=t.refs[o];if(void 0!==h)return S(u=t.refVal[h],d=E(o,u))}d=E(o);var m=U.call(i,P,t,o);if(void 0===m){var f=a&&a[o];f&&(m=U.inlineRef(f,n.inlineRefs)?f:e.call(i,f,t,a,r))}if(void 0!==m)return function(e,r){var t=l[e];s[t]=r}(o,m),S(m,d);!function(e){delete l[e]}(o)}function E(e,r){var t=s.length;return s[t]=r,l[e]=t,"refVal"+t}function S(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}function F(e){var r=u[e];return void 0===r&&(r=u[e]=c.length,c[r]=e),"pattern"+r}function x(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return k.toQuotedString(e);case"object":if(null===e)return"null";var r=le(e),t=p[r];return void 0===t&&(t=p[r]=d.length,d[t]=e),"default"+t}}function O(e,r,t,a){if(!1!==i._opts.validateSchema){var o=e.definition.dependencies;if(o&&!o.every((function(e){return Object.prototype.hasOwnProperty.call(t,e)})))throw new Error("parent schema must have all required keywords: "+o.join(","));var s=e.definition.validateSchema;if(s)if(!s(r)){var l="keyword schema is invalid: "+i.errorsText(s.errors);if("log"!=i._opts.validateSchema)throw new Error(l);i.logger.error(l)}}var c,u=e.definition.compile,d=e.definition.inline,p=e.definition.macro;if(u)c=u.call(i,r,t,a);else if(p)c=p.call(i,r,t,a),!1!==n.validateSchema&&i.validateSchema(c,!0);else if(d)c=d.call(i,a,e.keyword,r,t);else if(!(c=e.definition.validate))return;if(void 0===c)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var m=h.length;return h[m]=c,{code:"customRule"+m,validate:c}}};function he(e,r,t){var a=fe.call(this,e,r,t);return a>=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}function me(e,r,t){var a=fe.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}function fe(e,r,t){for(var a=0;a<this._compilations.length;a++){var o=this._compilations[a];if(o.schema==e&&o.root==r&&o.baseId==t)return a}return-1}function ve(e,r){return"var pattern"+e+" = new RegExp("+k.toQuotedString(r[e])+");"}function ge(e){return"var default"+e+" = defaults["+e+"];"}function ye(e,r){return void 0===r[e]?"":"var refVal"+e+" = refVal["+e+"];"}function be(e){return"var customRule"+e+" = customRules["+e+"];"}function Pe(e,r){if(!e.length)return"";for(var t="",a=0;a<e.length;a++)t+=r(a,e);return t}var we=x((function(e){var r=e.exports=function(){this._cache={}};r.prototype.put=function(e,r){this._cache[e]=r},r.prototype.get=function(e){return this._cache[e]},r.prototype.del=function(e){delete this._cache[e]},r.prototype.clear=function(){this._cache={}}})),Ee=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Se=[0,31,28,31,30,31,30,31,31,30,31,30,31],Fe=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,xe=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,Oe=/^(?:[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,_e=/^(?:(?:[^\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,De=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,$e=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,ke=/^(?:\/(?:[^~/]|~0|~1)*)*$/,je=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Ie=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,Ae=Ce;function Ce(e){return e="full"==e?"full":"fast",k.copy(Ce[e])}function Re(e){var r=e.match(Ee);if(!r)return!1;var t=+r[1],a=+r[2],o=+r[3];return a>=1&&a<=12&&o>=1&&o<=(2==a&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(t)?29:Se[a])}function Ne(e,r){var t=e.match(Fe);if(!t)return!1;var a=t[1],o=t[2],i=t[3],n=t[5];return(a<=23&&o<=59&&i<=59||23==a&&59==o&&60==i)&&(!r||n)}Ce.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":_e,url:De,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:xe,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:Ve,uuid:$e,"json-pointer":ke,"json-pointer-uri-fragment":je,"relative-json-pointer":Ie},Ce.full={date:Re,time:Ne,"date-time":function(e){var r=e.split(Le);return 2==r.length&&Re(r[0])&&Ne(r[1],!0)},uri:function(e){return Te.test(e)&&Oe.test(e)},"uri-reference":/^(?:[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,"uri-template":_e,url:De,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:xe,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:Ve,uuid:$e,"json-pointer":ke,"json-pointer-uri-fragment":je,"relative-json-pointer":Ie};var Le=/t|\s/i;var Te=/\/|:/;var ze=/[^\\]\\Z/;function Ve(e){if(ze.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var qe=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s;var h="maximum"==r,m=h?"exclusiveMaximum":"exclusiveMinimum",f=e.schema[m],v=e.opts.$data&&f&&f.$data,g=h?"<":">",y=h?">":"<",b=void 0;if(!p&&"number"!=typeof s&&void 0!==s)throw new Error(r+" must be number");if(!v&&void 0!==f&&"number"!=typeof f&&"boolean"!=typeof f)throw new Error(m+" must be number or boolean");if(v){var P=e.util.getData(f.$data,n,e.dataPathArr),w="exclusive"+i,E="exclType"+i,S="exclIsNumber"+i,F="' + "+(_="op"+i)+" + '";o+=" var schemaExcl"+i+" = "+P+"; ",o+=" var "+w+"; var "+E+" = typeof "+(P="schemaExcl"+i)+"; if ("+E+" != 'boolean' && "+E+" != 'undefined' && "+E+" != 'number') { ";var x;b=m;(x=x||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(o+=" , message: '"+m+" should be boolean' "),e.opts.verbose&&(o+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var O=o;o=x.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+E+" == 'number' ? ( ("+w+" = "+a+" === undefined || "+P+" "+g+"= "+a+") ? "+d+" "+y+"= "+P+" : "+d+" "+y+" "+a+" ) : ( ("+w+" = "+P+" === true) ? "+d+" "+y+"= "+a+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { var op"+i+" = "+w+" ? '"+g+"' : '"+g+"='; ",void 0===s&&(b=m,c=e.errSchemaPath+"/"+m,a=P,p=v)}else{F=g;if((S="number"==typeof f)&&p){var _="'"+F+"'";o+=" if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" ( "+a+" === undefined || "+f+" "+g+"= "+a+" ? "+d+" "+y+"= "+f+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { "}else{S&&void 0===s?(w=!0,b=m,c=e.errSchemaPath+"/"+m,a=f,y+="="):(S&&(a=Math[h?"min":"max"](f,s)),f===(!S||a)?(w=!0,b=m,c=e.errSchemaPath+"/"+m,y+="="):(w=!1,F+="="));_="'"+F+"'";o+=" if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+" "+y+" "+a+" || "+d+" !== "+d+") { "}}b=b||r,(x=x||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+_+", limit: "+a+", exclusive: "+w+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be "+F+" ",o+=p?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";O=o;return o=x.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",u&&(o+=" else { "),o},We=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+".length "+("maxItems"==r?">":"<")+" "+a+") { ";var h=r,m=m||[];m.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(h||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxItems"==r?"more":"fewer",o+=" than ",o+=p?"' + "+a+" + '":""+s,o+=" items' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=m.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},Me=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");var h="maxLength"==r?">":"<";o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),!1===e.opts.unicode?o+=" "+d+".length ":o+=" ucs2length("+d+") ",o+=" "+h+" "+a+") { ";var m=r,f=f||[];f.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(m||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT be ",o+="maxLength"==r?"longer":"shorter",o+=" than ",o+=p?"' + "+a+" + '":""+s,o+=" characters' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var v=o;return o=f.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+v+"]); ":o+=" validate.errors = ["+v+"]; return false; ":o+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},Be=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" Object.keys("+d+").length "+("maxProperties"==r?">":"<")+" "+a+") { ";var h=r,m=m||[];m.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(h||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxProperties"==r?"more":"fewer",o+=" than ",o+=p?"' + "+a+" + '":""+s,o+=" properties' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=m.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},Qe={$ref:function(e,r,t){var a,o,i=" ",n=e.level,s=e.dataLevel,l=e.schema[r],c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(s||""),p="valid"+n;if("#"==l||"#/"==l)e.isRoot?(a=e.async,o="validate"):(a=!0===e.root.schema.$async,o="root.refVal[0]");else{var h=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===h){var m=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(m),(y=y||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(i+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(i+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var f=i;i=y.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+f+"]); ":i+=" validate.errors = ["+f+"]; return false; ":i+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(i+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,l,m);e.logger.warn(m),u&&(i+=" if (true) { ")}}else if(h.inline){var v=e.util.copy(e);v.level++;var g="valid"+v.level;v.schema=h.schema,v.schemaPath="",v.errSchemaPath=l,i+=" "+e.validate(v).replace(/validate\.schema/g,h.code)+" ",u&&(i+=" if ("+g+") { ")}else a=!0===h.$async||e.async&&!1!==h.$async,o=h.code}if(o){var y;(y=y||[]).push(i),i="",e.opts.passContext?i+=" "+o+".call(this, ":i+=" "+o+"( ",i+=" "+d+", (dataPath || '')",'""'!=e.errorPath&&(i+=" + "+e.errorPath);var b=i+=" , "+(s?"data"+(s-1||""):"parentData")+" , "+(s?e.dataPathArr[s]:"parentDataProperty")+", rootData) ";if(i=y.pop(),a){if(!e.async)throw new Error("async schema referenced by sync schema");u&&(i+=" var "+p+"; "),i+=" try { await "+b+"; ",u&&(i+=" "+p+" = true; "),i+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",u&&(i+=" "+p+" = false; "),i+=" } ",u&&(i+=" if ("+p+") { ")}else i+=" if (!"+b+") { if (vErrors === null) vErrors = "+o+".errors; else vErrors = vErrors.concat("+o+".errors); errors = vErrors.length; } ",u&&(i+=" else { ")}return i},allOf:function(e,r,t){var a=" ",o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,s=!e.opts.allErrors,l=e.util.copy(e),c="";l.level++;var u="valid"+l.level,d=l.baseId,p=!0,h=o;if(h)for(var m,f=-1,v=h.length-1;f<v;)m=h[f+=1],(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0||!1===m:e.util.schemaHasRules(m,e.RULES.all))&&(p=!1,l.schema=m,l.schemaPath=i+"["+f+"]",l.errSchemaPath=n+"/"+f,a+=" "+e.validate(l)+" ",l.baseId=d,s&&(a+=" if ("+u+") { ",c+="}"));return s&&(a+=p?" if (true) { ":" "+c.slice(0,-1)+" "),a},anyOf:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e),m="";h.level++;var f="valid"+h.level;if(n.every((function(r){return e.opts.strictKeywords?"object"==typeof r&&Object.keys(r).length>0||!1===r:e.util.schemaHasRules(r,e.RULES.all)}))){var v=h.baseId;a+=" var "+p+" = errors; var "+d+" = false; ";var g=e.compositeRule;e.compositeRule=h.compositeRule=!0;var y=n;if(y)for(var b,P=-1,w=y.length-1;P<w;)b=y[P+=1],h.schema=b,h.schemaPath=s+"["+P+"]",h.errSchemaPath=l+"/"+P,a+=" "+e.validate(h)+" ",h.baseId=v,a+=" "+d+" = "+d+" || "+f+"; if (!"+d+") { ",m+="}";e.compositeRule=h.compositeRule=g,a+=" "+m+" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else c&&(a+=" if (true) { ");return a},$comment:function(e,r,t){var a=" ",o=e.schema[r],i=e.errSchemaPath+"/"+r;e.opts.allErrors;var n=e.util.toQuotedString(o);return!0===e.opts.$comment?a+=" console.log("+n+");":"function"==typeof e.opts.$comment&&(a+=" self._opts.$comment("+n+", "+e.util.toQuotedString(i)+", validate.root.schema);"),a},const:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p=e.opts.$data&&n&&n.$data;p&&(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; "),p||(a+=" var schema"+o+" = validate.schema"+s+";"),a+="var "+d+" = equal("+u+", schema"+o+"); if (!"+d+") { ";var h=h||[];h.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValue: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var m=a;return a=h.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+m+"]); ":a+=" validate.errors = ["+m+"]; return false; ":a+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",c&&(a+=" else { "),a},contains:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e);h.level++;var m="valid"+h.level,f="i"+o,v=h.dataLevel=e.dataLevel+1,g="data"+v,y=e.baseId,b=e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all);if(a+="var "+p+" = errors;var "+d+";",b){var P=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.schema=n,h.schemaPath=s,h.errSchemaPath=l,a+=" var "+m+" = false; for (var "+f+" = 0; "+f+" < "+u+".length; "+f+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers,!0);var w=u+"["+f+"]";h.dataPathArr[v]=f;var E=e.validate(h);h.baseId=y,e.util.varOccurences(E,g)<2?a+=" "+e.util.varReplace(E,g,w)+" ":a+=" var "+g+" = "+w+"; "+E+" ",a+=" if ("+m+") break; } ",e.compositeRule=h.compositeRule=P,a+=" if (!"+m+") {"}else a+=" if ("+u+".length == 0) {";var S=S||[];S.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should contain a valid item' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var F=a;return a=S.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+F+"]); ":a+=" validate.errors = ["+F+"]; return false; ":a+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",b&&(a+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a},dependencies:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e),h="";p.level++;var m="valid"+p.level,f={},v={},g=e.opts.ownProperties;for(w in n)if("__proto__"!=w){var y=n[w],b=Array.isArray(y)?v:f;b[w]=y}a+="var "+d+" = errors;";var P=e.errorPath;for(var w in a+="var missing"+o+";",v)if((b=v[w]).length){if(a+=" if ( "+u+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),c){a+=" && ( ";var E=b;if(E)for(var S=-1,F=E.length-1;S<F;){k=E[S+=1],S&&(a+=" || "),a+=" ( ( "+(C=u+(A=e.util.getProperty(k)))+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(k)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?k:A)+") ) "}a+=")) { ";var x="missing"+o,O="' + "+x+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,x,!0):P+" + "+x);var _=_||[];_.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var D=a;a=_.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+D+"]); ":a+=" validate.errors = ["+D+"]; return false; ":a+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{a+=" ) { ";var $=b;if($)for(var k,j=-1,I=$.length-1;j<I;){k=$[j+=1];var A=e.util.getProperty(k),C=(O=e.util.escapeQuotes(k),u+A);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,k,e.opts.jsonPointers)),a+=" if ( "+C+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(k)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",c&&(h+="}",a+=" else { ")}e.errorPath=P;var R=p.baseId;for(var w in f){y=f[w];(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all))&&(a+=" "+m+" = true; if ( "+u+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),a+=") { ",p.schema=y,p.schemaPath=s+e.util.getProperty(w),p.errSchemaPath=l+"/"+e.util.escapeFragment(w),a+=" "+e.validate(p)+" ",p.baseId=R,a+=" } ",c&&(a+=" if ("+m+") { ",h+="}"))}return c&&(a+=" "+h+" if ("+d+" == errors) {"),a},enum:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p=e.opts.$data&&n&&n.$data;p&&(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ");var h="i"+o,m="schema"+o;p||(a+=" var "+m+" = validate.schema"+s+";"),a+="var "+d+";",p&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=d+" = false;for (var "+h+"=0; "+h+"<"+m+".length; "+h+"++) if (equal("+u+", "+m+"["+h+"])) { "+d+" = true; break; }",p&&(a+=" } "),a+=" if (!"+d+") { ";var f=f||[];f.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var v=a;return a=f.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+v+"]); ":a+=" validate.errors = ["+v+"]; return false; ":a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",c&&(a+=" else { "),a},format:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||"");if(!1===e.opts.format)return c&&(a+=" if (true) { "),a;var d,p=e.opts.$data&&n&&n.$data;p?(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",d="schema"+o):d=n;var h=e.opts.unknownFormats,m=Array.isArray(h);if(p){a+=" var "+(f="format"+o)+" = formats["+d+"]; var "+(v="isObject"+o)+" = typeof "+f+" == 'object' && !("+f+" instanceof RegExp) && "+f+".validate; var "+(g="formatType"+o)+" = "+v+" && "+f+".type || 'string'; if ("+v+") { ",e.async&&(a+=" var async"+o+" = "+f+".async; "),a+=" "+f+" = "+f+".validate; } if ( ",p&&(a+=" ("+d+" !== undefined && typeof "+d+" != 'string') || "),a+=" (","ignore"!=h&&(a+=" ("+d+" && !"+f+" ",m&&(a+=" && self._opts.unknownFormats.indexOf("+d+") == -1 "),a+=") || "),a+=" ("+f+" && "+g+" == '"+t+"' && !(typeof "+f+" == 'function' ? ",e.async?a+=" (async"+o+" ? await "+f+"("+u+") : "+f+"("+u+")) ":a+=" "+f+"("+u+") ",a+=" : "+f+".test("+u+"))))) {"}else{var f;if(!(f=e.formats[n])){if("ignore"==h)return e.logger.warn('unknown format "'+n+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(a+=" if (true) { "),a;if(m&&h.indexOf(n)>=0)return c&&(a+=" if (true) { "),a;throw new Error('unknown format "'+n+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,g=(v="object"==typeof f&&!(f instanceof RegExp)&&f.validate)&&f.type||"string";if(v){var y=!0===f.async;f=f.validate}if(g!=t)return c&&(a+=" if (true) { "),a;if(y){if(!e.async)throw new Error("async format in sync schema");a+=" if (!(await "+(b="formats"+e.util.getProperty(n)+".validate")+"("+u+"))) { "}else{a+=" if (! ";var b="formats"+e.util.getProperty(n);v&&(b+=".validate"),a+="function"==typeof f?" "+b+"("+u+") ":" "+b+".test("+u+") ",a+=") { "}}var P=P||[];P.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",a+=p?""+d:""+e.util.toQuotedString(n),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",a+=p?"' + "+d+" + '":""+e.util.escapeQuotes(n),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=p?"validate.schema"+s:""+e.util.toQuotedString(n),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var w=a;return a=P.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",c&&(a+=" else { "),a},if:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e);h.level++;var m="valid"+h.level,f=e.schema.then,v=e.schema.else,g=void 0!==f&&(e.opts.strictKeywords?"object"==typeof f&&Object.keys(f).length>0||!1===f:e.util.schemaHasRules(f,e.RULES.all)),y=void 0!==v&&(e.opts.strictKeywords?"object"==typeof v&&Object.keys(v).length>0||!1===v:e.util.schemaHasRules(v,e.RULES.all)),b=h.baseId;if(g||y){var P;h.createErrors=!1,h.schema=n,h.schemaPath=s,h.errSchemaPath=l,a+=" var "+p+" = errors; var "+d+" = true; ";var w=e.compositeRule;e.compositeRule=h.compositeRule=!0,a+=" "+e.validate(h)+" ",h.baseId=b,h.createErrors=!0,a+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",e.compositeRule=h.compositeRule=w,g?(a+=" if ("+m+") { ",h.schema=e.schema.then,h.schemaPath=e.schemaPath+".then",h.errSchemaPath=e.errSchemaPath+"/then",a+=" "+e.validate(h)+" ",h.baseId=b,a+=" "+d+" = "+m+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'then'; ":P="'then'",a+=" } ",y&&(a+=" else { ")):a+=" if (!"+m+") { ",y&&(h.schema=e.schema.else,h.schemaPath=e.schemaPath+".else",h.errSchemaPath=e.errSchemaPath+"/else",a+=" "+e.validate(h)+" ",h.baseId=b,a+=" "+d+" = "+m+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'else'; ":P="'else'",a+=" } "),a+=" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+P+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match \"' + "+P+" + '\" schema' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",c&&(a+=" else { ")}else c&&(a+=" if (true) { ");return a},items:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e),m="";h.level++;var f="valid"+h.level,v="i"+o,g=h.dataLevel=e.dataLevel+1,y="data"+g,b=e.baseId;if(a+="var "+p+" = errors;var "+d+";",Array.isArray(n)){var P=e.schema.additionalItems;if(!1===P){a+=" "+d+" = "+u+".length <= "+n.length+"; ";var w=l;l=e.errSchemaPath+"/additionalItems",a+=" if (!"+d+") { ";var E=E||[];E.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+n.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+n.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var S=a;a=E.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",l=w,c&&(m+="}",a+=" else { ")}var F=n;if(F)for(var x,O=-1,_=F.length-1;O<_;)if(x=F[O+=1],e.opts.strictKeywords?"object"==typeof x&&Object.keys(x).length>0||!1===x:e.util.schemaHasRules(x,e.RULES.all)){a+=" "+f+" = true; if ("+u+".length > "+O+") { ";var D=u+"["+O+"]";h.schema=x,h.schemaPath=s+"["+O+"]",h.errSchemaPath=l+"/"+O,h.errorPath=e.util.getPathExpr(e.errorPath,O,e.opts.jsonPointers,!0),h.dataPathArr[g]=O;var $=e.validate(h);h.baseId=b,e.util.varOccurences($,y)<2?a+=" "+e.util.varReplace($,y,D)+" ":a+=" var "+y+" = "+D+"; "+$+" ",a+=" } ",c&&(a+=" if ("+f+") { ",m+="}")}if("object"==typeof P&&(e.opts.strictKeywords?"object"==typeof P&&Object.keys(P).length>0||!1===P:e.util.schemaHasRules(P,e.RULES.all))){h.schema=P,h.schemaPath=e.schemaPath+".additionalItems",h.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+f+" = true; if ("+u+".length > "+n.length+") { for (var "+v+" = "+n.length+"; "+v+" < "+u+".length; "+v+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=u+"["+v+"]";h.dataPathArr[g]=v;$=e.validate(h);h.baseId=b,e.util.varOccurences($,y)<2?a+=" "+e.util.varReplace($,y,D)+" ":a+=" var "+y+" = "+D+"; "+$+" ",c&&(a+=" if (!"+f+") break; "),a+=" } } ",c&&(a+=" if ("+f+") { ",m+="}")}}else if(e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all)){h.schema=n,h.schemaPath=s,h.errSchemaPath=l,a+=" for (var "+v+" = 0; "+v+" < "+u+".length; "+v+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=u+"["+v+"]";h.dataPathArr[g]=v;$=e.validate(h);h.baseId=b,e.util.varOccurences($,y)<2?a+=" "+e.util.varReplace($,y,D)+" ":a+=" var "+y+" = "+D+"; "+$+" ",c&&(a+=" if (!"+f+") break; "),a+=" }"}return c&&(a+=" "+m+" if ("+p+" == errors) {"),a},maximum:qe,minimum:qe,maxItems:We,minItems:We,maxLength:Me,minLength:Me,maxProperties:Be,minProperties:Be,multipleOf:function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");o+="var division"+i+";if (",p&&(o+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),o+=" (division"+i+" = "+d+" / "+a+", ",e.opts.multipleOfPrecision?o+=" Math.abs(Math.round(division"+i+") - division"+i+") > 1e-"+e.opts.multipleOfPrecision+" ":o+=" division"+i+" !== parseInt(division"+i+") ",o+=" ) ",p&&(o+=" ) "),o+=" ) { ";var h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be multiple of ",o+=p?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var m=o;return o=h.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},not:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level;if(e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all)){p.schema=n,p.schemaPath=s,p.errSchemaPath=l,a+=" var "+d+" = errors; ";var m,f=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.createErrors=!1,p.opts.allErrors&&(m=p.opts.allErrors,p.opts.allErrors=!1),a+=" "+e.validate(p)+" ",p.createErrors=!0,m&&(p.opts.allErrors=m),e.compositeRule=p.compositeRule=f,a+=" if ("+h+") { ";var v=v||[];v.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var g=a;a=v.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(a+=" if (false) { ");return a},oneOf:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e),m="";h.level++;var f="valid"+h.level,v=h.baseId,g="prevValid"+o,y="passingSchemas"+o;a+="var "+p+" = errors , "+g+" = false , "+d+" = false , "+y+" = null; ";var b=e.compositeRule;e.compositeRule=h.compositeRule=!0;var P=n;if(P)for(var w,E=-1,S=P.length-1;E<S;)w=P[E+=1],(e.opts.strictKeywords?"object"==typeof w&&Object.keys(w).length>0||!1===w:e.util.schemaHasRules(w,e.RULES.all))?(h.schema=w,h.schemaPath=s+"["+E+"]",h.errSchemaPath=l+"/"+E,a+=" "+e.validate(h)+" ",h.baseId=v):a+=" var "+f+" = true; ",E&&(a+=" if ("+f+" && "+g+") { "+d+" = false; "+y+" = ["+y+", "+E+"]; } else { ",m+="}"),a+=" if ("+f+") { "+d+" = "+g+" = true; "+y+" = "+E+"; }";return e.compositeRule=h.compositeRule=b,a+=m+"if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a},pattern:function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'string') || "),o+=" !"+(p?"(new RegExp("+a+"))":e.usePattern(s))+".test("+d+") ) { ";var h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { pattern: ",o+=p?""+a:""+e.util.toQuotedString(s),o+=" } ",!1!==e.opts.messages&&(o+=" , message: 'should match pattern \"",o+=p?"' + "+a+" + '":""+e.util.escapeQuotes(s),o+="\"' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+e.util.toQuotedString(s),o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var m=o;return o=h.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},properties:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e),h="";p.level++;var m="valid"+p.level,f="key"+o,v="idx"+o,g=p.dataLevel=e.dataLevel+1,y="data"+g,b="dataProperties"+o,P=Object.keys(n||{}).filter(A),w=e.schema.patternProperties||{},E=Object.keys(w).filter(A),S=e.schema.additionalProperties,F=P.length||E.length,x=!1===S,O="object"==typeof S&&Object.keys(S).length,_=e.opts.removeAdditional,D=x||O||_,$=e.opts.ownProperties,k=e.baseId,j=e.schema.required;if(j&&(!e.opts.$data||!j.$data)&&j.length<e.opts.loopRequired)var I=e.util.toHash(j);function A(e){return"__proto__"!==e}if(a+="var "+d+" = errors;var "+m+" = true;",$&&(a+=" var "+b+" = undefined;"),D){if(a+=$?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+u+") { ",F){if(a+=" var isAdditional"+o+" = !(false ",P.length)if(P.length>8)a+=" || validate.schema"+s+".hasOwnProperty("+f+") ";else{var C=P;if(C)for(var R=-1,N=C.length-1;R<N;)G=C[R+=1],a+=" || "+f+" == "+e.util.toQuotedString(G)+" "}if(E.length){var L=E;if(L)for(var T=-1,z=L.length-1;T<z;)ie=L[T+=1],a+=" || "+e.usePattern(ie)+".test("+f+") "}a+=" ); if (isAdditional"+o+") { "}if("all"==_)a+=" delete "+u+"["+f+"]; ";else{var V=e.errorPath,q="' + "+f+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers)),x)if(_)a+=" delete "+u+"["+f+"]; ";else{a+=" "+m+" = false; ";var W=l;l=e.errSchemaPath+"/additionalProperties",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { additionalProperty: '"+q+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is an invalid additional property":a+="should NOT have additional properties",a+="' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var M=a;a=te.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+M+"]); ":a+=" validate.errors = ["+M+"]; return false; ":a+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=W,c&&(a+=" break; ")}else if(O)if("failing"==_){a+=" var "+d+" = errors; ";var B=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=S,p.schemaPath=e.schemaPath+".additionalProperties",p.errSchemaPath=e.errSchemaPath+"/additionalProperties",p.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);var Q=u+"["+f+"]";p.dataPathArr[g]=f;var U=e.validate(p);p.baseId=k,e.util.varOccurences(U,y)<2?a+=" "+e.util.varReplace(U,y,Q)+" ":a+=" var "+y+" = "+Q+"; "+U+" ",a+=" if (!"+m+") { errors = "+d+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+u+"["+f+"]; } ",e.compositeRule=p.compositeRule=B}else{p.schema=S,p.schemaPath=e.schemaPath+".additionalProperties",p.errSchemaPath=e.errSchemaPath+"/additionalProperties",p.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);Q=u+"["+f+"]";p.dataPathArr[g]=f;U=e.validate(p);p.baseId=k,e.util.varOccurences(U,y)<2?a+=" "+e.util.varReplace(U,y,Q)+" ":a+=" var "+y+" = "+Q+"; "+U+" ",c&&(a+=" if (!"+m+") break; ")}e.errorPath=V}F&&(a+=" } "),a+=" } ",c&&(a+=" if ("+m+") { ",h+="}")}var H=e.opts.useDefaults&&!e.compositeRule;if(P.length){var K=P;if(K)for(var G,J=-1,Z=K.length-1;J<Z;){var Y=n[G=K[J+=1]];if(e.opts.strictKeywords?"object"==typeof Y&&Object.keys(Y).length>0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all)){var X=e.util.getProperty(G),ee=(Q=u+X,H&&void 0!==Y.default);p.schema=Y,p.schemaPath=s+X,p.errSchemaPath=l+"/"+e.util.escapeFragment(G),p.errorPath=e.util.getPath(e.errorPath,G,e.opts.jsonPointers),p.dataPathArr[g]=e.util.toQuotedString(G);U=e.validate(p);if(p.baseId=k,e.util.varOccurences(U,y)<2){U=e.util.varReplace(U,y,Q);var re=Q}else{re=y;a+=" var "+y+" = "+Q+"; "}if(ee)a+=" "+U+" ";else{if(I&&I[G]){a+=" if ( "+re+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+m+" = false; ";V=e.errorPath,W=l;var te,ae=e.util.escapeQuotes(G);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(V,G,e.opts.jsonPointers)),l=e.errSchemaPath+"/required",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+ae+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+ae+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";M=a;a=te.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+M+"]); ":a+=" validate.errors = ["+M+"]; return false; ":a+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=W,e.errorPath=V,a+=" } else { "}else c?(a+=" if ( "+re+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+m+" = true; } else { "):(a+=" if ("+re+" !== undefined ",$&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=" ) { ");a+=" "+U+" } "}}c&&(a+=" if ("+m+") { ",h+="}")}}if(E.length){var oe=E;if(oe)for(var ie,ne=-1,se=oe.length-1;ne<se;){Y=w[ie=oe[ne+=1]];if(e.opts.strictKeywords?"object"==typeof Y&&Object.keys(Y).length>0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all)){p.schema=Y,p.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(ie),p.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(ie),a+=$?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+u+") { ",a+=" if ("+e.usePattern(ie)+".test("+f+")) { ",p.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);Q=u+"["+f+"]";p.dataPathArr[g]=f;U=e.validate(p);p.baseId=k,e.util.varOccurences(U,y)<2?a+=" "+e.util.varReplace(U,y,Q)+" ":a+=" var "+y+" = "+Q+"; "+U+" ",c&&(a+=" if (!"+m+") break; "),a+=" } ",c&&(a+=" else "+m+" = true; "),a+=" } ",c&&(a+=" if ("+m+") { ",h+="}")}}}return c&&(a+=" "+h+" if ("+d+" == errors) {"),a},propertyNames:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level;if(a+="var "+d+" = errors;",e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all)){p.schema=n,p.schemaPath=s,p.errSchemaPath=l;var m="key"+o,f="idx"+o,v="i"+o,g="' + "+m+" + '",y="data"+(p.dataLevel=e.dataLevel+1),b="dataProperties"+o,P=e.opts.ownProperties,w=e.baseId;P&&(a+=" var "+b+" = undefined; "),a+=P?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+f+"=0; "+f+"<"+b+".length; "+f+"++) { var "+m+" = "+b+"["+f+"]; ":" for (var "+m+" in "+u+") { ",a+=" var startErrs"+o+" = errors; ";var E=m,S=e.compositeRule;e.compositeRule=p.compositeRule=!0;var F=e.validate(p);p.baseId=w,e.util.varOccurences(F,y)<2?a+=" "+e.util.varReplace(F,y,E)+" ":a+=" var "+y+" = "+E+"; "+F+" ",e.compositeRule=p.compositeRule=S,a+=" if (!"+h+") { for (var "+v+"=startErrs"+o+"; "+v+"<errors; "+v+"++) { vErrors["+v+"].propertyName = "+m+"; } var err = ",!1!==e.createErrors?(a+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { propertyName: '"+g+"' } ",!1!==e.opts.messages&&(a+=" , message: 'property name \\'"+g+"\\' is invalid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),c&&(a+=" break; "),a+=" } }"}return c&&(a+=" if ("+d+" == errors) {"),a},required:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p=e.opts.$data&&n&&n.$data;p&&(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ");var h="schema"+o;if(!p)if(n.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var m=[],f=n;if(f)for(var v,g=-1,y=f.length-1;g<y;){v=f[g+=1];var b=e.schema.properties[v];b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0||!1===b:e.util.schemaHasRules(b,e.RULES.all))||(m[m.length]=v)}}else m=n;if(p||m.length){var P=e.errorPath,w=p||m.length>=e.opts.loopRequired,E=e.opts.ownProperties;if(c)if(a+=" var missing"+o+"; ",w){p||(a+=" var "+h+" = validate.schema"+s+"; ");var S="' + "+($="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,$,e.opts.jsonPointers)),a+=" var "+d+" = true; ",p&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=" for (var "+O+" = 0; "+O+" < "+h+".length; "+O+"++) { "+d+" = "+u+"["+h+"["+O+"]] !== undefined ",E&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", "+h+"["+O+"]) "),a+="; if (!"+d+") break; } ",p&&(a+=" } "),a+=" if (!"+d+") { ",(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var F=a;a=D.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+F+"]); ":a+=" validate.errors = ["+F+"]; return false; ":a+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var x=m;if(x)for(var O=-1,_=x.length-1;O<_;){j=x[O+=1],O&&(a+=" || "),a+=" ( ( "+(R=u+(C=e.util.getProperty(j)))+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(j)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?j:C)+") ) "}a+=") { ";var D;S="' + "+($="missing"+o)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,$,!0):P+" + "+$),(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";F=a;a=D.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+F+"]); ":a+=" validate.errors = ["+F+"]; return false; ":a+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(w){p||(a+=" var "+h+" = validate.schema"+s+"; ");var $;S="' + "+($="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,$,e.opts.jsonPointers)),p&&(a+=" if ("+h+" && !Array.isArray("+h+")) { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+h+" !== undefined) { "),a+=" for (var "+O+" = 0; "+O+" < "+h+".length; "+O+"++) { if ("+u+"["+h+"["+O+"]] === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", "+h+"["+O+"]) "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",p&&(a+=" } ")}else{var k=m;if(k)for(var j,I=-1,A=k.length-1;I<A;){j=k[I+=1];var C=e.util.getProperty(j),R=(S=e.util.escapeQuotes(j),u+C);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,j,e.opts.jsonPointers)),a+=" if ( "+R+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(j)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=P}else c&&(a+=" if (true) {");return a},uniqueItems:function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p="valid"+i,h=e.opts.$data&&s&&s.$data;if(h?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,(s||h)&&!1!==e.opts.uniqueItems){h&&(o+=" var "+p+"; if ("+a+" === false || "+a+" === undefined) "+p+" = true; else if (typeof "+a+" != 'boolean') "+p+" = false; else { "),o+=" var i = "+d+".length , "+p+" = true , j; if (i > 1) { ";var m=e.schema.items&&e.schema.items.type,f=Array.isArray(m);if(!m||"object"==m||"array"==m||f&&(m.indexOf("object")>=0||m.indexOf("array")>=0))o+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+d+"[i], "+d+"[j])) { "+p+" = false; break outer; } } } ";else{o+=" var itemIndices = {}, item; for (;i--;) { var item = "+d+"[i]; ";var v="checkDataType"+(f?"s":"");o+=" if ("+e.util[v](m,"item",e.opts.strictNumbers,!0)+") continue; ",f&&(o+=" if (typeof item == 'string') item = '\"' + item; "),o+=" if (typeof itemIndices[item] == 'number') { "+p+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}o+=" } ",h&&(o+=" } "),o+=" if (!"+p+") { ";var g=g||[];g.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(o+=" , schema: ",o+=h?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var y=o;o=g.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+y+"]); ":o+=" validate.errors = ["+y+"]; return false; ":o+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",u&&(o+=" else { ")}else u&&(o+=" if (true) { ");return o},validate:ce},Ue=k.toHash,He=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"],Ke=function(e,r){for(var t=0;t<r.length;t++){e=JSON.parse(JSON.stringify(e));var a,o=r[t].split("/"),i=e;for(a=1;a<o.length;a++)i=i[o[a]];for(a=0;a<He.length;a++){var n=He[a],s=i[n];s&&(i[n]={anyOf:[s,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e},Ge=ie.MissingRef,Je=function e(r,t,a){var o=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof t&&(a=t,t=void 0);var i=n(r).then((function(){var e=o._addSchema(r,void 0,t);return e.validate||function e(r){try{return o._compile(r)}catch(e){if(e instanceof Ge)return a(e);throw e}function a(a){var i=a.missingSchema;if(c(i))throw new Error("Schema "+i+" is loaded but "+a.missingRef+" cannot be resolved");var s=o._loadingSchemas[i];return s||(s=o._loadingSchemas[i]=o._opts.loadSchema(i)).then(l,l),s.then((function(e){if(!c(i))return n(e).then((function(){c(i)||o.addSchema(e,i,void 0,t)}))})).then((function(){return e(r)}));function l(){delete o._loadingSchemas[i]}function c(e){return o._refs[e]||o._schemas[e]}}}(e)}));a&&i.then((function(e){a(null,e)}),a);return i;function n(r){var t=r.$schema;return t&&!o.getSchema(t)?e.call(o,{$ref:t},!0):Promise.resolve()}};var Ze=function(e,r,t){var a,o,i=" ",n=e.level,s=e.dataLevel,l=e.schema[r],c=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,d=!e.opts.allErrors,p="data"+(s||""),h="valid"+n,m="errs__"+n,f=e.opts.$data&&l&&l.$data;f?(i+=" var schema"+n+" = "+e.util.getData(l.$data,s,e.dataPathArr)+"; ",o="schema"+n):o=l;var v,g,y,b,P,w="definition"+n,E=this.definition,S="";if(f&&E.$data){P="keywordValidate"+n;var F=E.validateSchema;i+=" var "+w+" = RULES.custom['"+r+"'].definition; var "+P+" = "+w+".validate;"}else{if(!(b=e.useCustomRule(this,l,e.schema,e)))return;o="validate.schema"+c,P=b.code,v=E.compile,g=E.inline,y=E.macro}var x=P+".errors",O="i"+n,_="ruleErr"+n,D=E.async;if(D&&!e.async)throw new Error("async keyword in sync schema");if(g||y||(i+=x+" = null;"),i+="var "+m+" = errors;var "+h+";",f&&E.$data&&(S+="}",i+=" if ("+o+" === undefined) { "+h+" = true; } else { ",F&&(S+="}",i+=" "+h+" = "+w+".validateSchema("+o+"); if ("+h+") { ")),g)E.statements?i+=" "+b.validate+" ":i+=" "+h+" = "+b.validate+"; ";else if(y){var $=e.util.copy(e);S="";$.level++;var k="valid"+$.level;$.schema=b.validate,$.schemaPath="";var j=e.compositeRule;e.compositeRule=$.compositeRule=!0;var I=e.validate($).replace(/validate\.schema/g,P);e.compositeRule=$.compositeRule=j,i+=" "+I}else{(N=N||[]).push(i),i="",i+=" "+P+".call( ",e.opts.passContext?i+="this":i+="self",v||!1===E.schema?i+=" , "+p+" ":i+=" , "+o+" , "+p+" , validate.schema"+e.schemaPath+" ",i+=" , (dataPath || '')",'""'!=e.errorPath&&(i+=" + "+e.errorPath);var A=s?"data"+(s-1||""):"parentData",C=s?e.dataPathArr[s]:"parentDataProperty",R=i+=" , "+A+" , "+C+" , rootData ) ";i=N.pop(),!1===E.errors?(i+=" "+h+" = ",D&&(i+="await "),i+=R+"; "):i+=D?" var "+(x="customErrors"+n)+" = null; try { "+h+" = await "+R+"; } catch (e) { "+h+" = false; if (e instanceof ValidationError) "+x+" = e.errors; else throw e; } ":" "+x+" = null; "+h+" = "+R+"; "}if(E.modifying&&(i+=" if ("+A+") "+p+" = "+A+"["+C+"];"),i+=""+S,E.valid)d&&(i+=" if (true) { ");else{var N;i+=" if ( ",void 0===E.valid?(i+=" !",i+=y?""+k:""+h):i+=" "+!E.valid+" ",i+=") { ",a=this.keyword,(N=N||[]).push(i),i="",(N=N||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(i+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var L=i;i=N.pop(),!e.compositeRule&&d?e.async?i+=" throw new ValidationError(["+L+"]); ":i+=" validate.errors = ["+L+"]; return false; ":i+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var T=i;i=N.pop(),g?E.errors?"full"!=E.errors&&(i+=" for (var "+O+"="+m+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(i+=" "+_+".schema = "+o+"; "+_+".data = "+p+"; "),i+=" } "):!1===E.errors?i+=" "+T+" ":(i+=" if ("+m+" == errors) { "+T+" } else { for (var "+O+"="+m+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(i+=" "+_+".schema = "+o+"; "+_+".data = "+p+"; "),i+=" } } "):y?(i+=" var err = ",!1!==e.createErrors?(i+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(i+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&d&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; ")):!1===E.errors?i+=" "+T+" ":(i+=" if (Array.isArray("+x+")) { if (vErrors === null) vErrors = "+x+"; else vErrors = vErrors.concat("+x+"); errors = vErrors.length; for (var "+O+"="+m+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; "+_+'.schemaPath = "'+u+'"; ',e.opts.verbose&&(i+=" "+_+".schema = "+o+"; "+_+".data = "+p+"; "),i+=" } } else { "+T+" } "),i+=" } ",d&&(i+=" else { ")}return i},Ye="http://json-schema.org/draft-07/schema#",Xe="http://json-schema.org/draft-07/schema#",er="Core schema meta-schema",rr={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},tr=["object","boolean"],ar={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},or={$schema:Ye,$id:Xe,title:er,definitions:rr,type:tr,properties:ar,default:!0},ir=O(Object.freeze({__proto__:null,$schema:Ye,$id:Xe,title:er,definitions:rr,type:tr,properties:ar,default:or})),nr={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:ir.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:ir.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}},sr=/^[a-z_$][a-z0-9_$-]*$/i,lr=function(e,r){var t=this.RULES;if(t.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!sr.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(r){this.validateKeyword(r,!0);var a=r.type;if(Array.isArray(a))for(var o=0;o<a.length;o++)n(e,a[o],r);else n(e,a,r);var i=r.metaSchema;i&&(r.$data&&this._opts.$data&&(i={anyOf:[i,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),r.validateSchema=this.compile(i,!0))}function n(e,r,a){for(var o,i=0;i<t.length;i++){var n=t[i];if(n.type==r){o=n;break}}o||(o={type:r,rules:[]},t.push(o));var s={keyword:e,definition:a,custom:!0,code:Ze,implements:a.implements};o.rules.push(s),t.custom[e]=s}return t.keywords[e]=t.all[e]=!0,this},cr=function(e){var r=this.RULES.custom[e];return r?r.definition:this.RULES.keywords[e]||!1},ur=function(e){var r=this.RULES;delete r.keywords[e],delete r.all[e],delete r.custom[e];for(var t=0;t<r.length;t++)for(var a=r[t].rules,o=0;o<a.length;o++)if(a[o].keyword==e){a.splice(o,1);break}return this},dr=function e(r,t){e.errors=null;var a=this._validateKeyword=this._validateKeyword||this.compile(nr,!0);if(a(r))return!0;if(e.errors=a.errors,t)throw new Error("custom keyword definition is invalid: "+this.errorsText(a.errors));return!1};var pr="http://json-schema.org/draft-07/schema#",hr="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",mr="Meta-schema for $data reference (JSON Schema extension proposal)",fr=["$data"],vr={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},gr={$schema:pr,$id:hr,description:mr,type:"object",required:fr,properties:vr,additionalProperties:!1},yr=O(Object.freeze({__proto__:null,$schema:pr,$id:hr,description:mr,type:"object",required:fr,properties:vr,additionalProperties:!1,default:gr})),br=Sr;Sr.prototype.validate=function(e,r){var t;if("string"==typeof e){if(!(t=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);t=a.validate||this._compile(a)}var o=t(r);!0!==t.$async&&(this.errors=t.errors);return o},Sr.prototype.compile=function(e,r){var t=this._addSchema(e,void 0,r);return t.validate||this._compile(t)},Sr.prototype.addSchema=function(e,r,t,a){if(Array.isArray(e)){for(var o=0;o<e.length;o++)this.addSchema(e[o],void 0,t,a);return this}var i=this._getId(e);if(void 0!==i&&"string"!=typeof i)throw new Error("schema id must be string");return $r(this,r=U.normalizeId(r||i)),this._schemas[r]=this._addSchema(e,t,a,!0),this},Sr.prototype.addMetaSchema=function(e,r,t){return this.addSchema(e,r,t,!0),this},Sr.prototype.validateSchema=function(e,r){var t=e.$schema;if(void 0!==t&&"string"!=typeof t)throw new Error("$schema must be a string");if(!(t=t||this._opts.defaultMeta||function(e){var r=e._opts.meta;return e._opts.defaultMeta="object"==typeof r?e._getId(r)||r:e.getSchema(Pr)?Pr:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var a=this.validate(t,e);if(!a&&r){var o="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(o);this.logger.error(o)}return a},Sr.prototype.getSchema=function(e){var r=Fr(this,e);switch(typeof r){case"object":return r.validate||this._compile(r);case"string":return this.getSchema(r);case"undefined":return function(e,r){var t=U.schema.call(e,{schema:{}},r);if(t){var a=t.schema,o=t.root,i=t.baseId,n=pe.call(e,a,o,void 0,i);return e._fragments[r]=new B({ref:r,fragment:!0,schema:a,root:o,baseId:i,validate:n}),n}}(this,e)}},Sr.prototype.removeSchema=function(e){if(e instanceof RegExp)return xr(this,this._schemas,e),xr(this,this._refs,e),this;switch(typeof e){case"undefined":return xr(this,this._schemas),xr(this,this._refs),this._cache.clear(),this;case"string":var r=Fr(this,e);return r&&this._cache.del(r.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var t=this._opts.serialize,a=t?t(e):e;this._cache.del(a);var o=this._getId(e);o&&(o=U.normalizeId(o),delete this._schemas[o],delete this._refs[o])}return this},Sr.prototype.addFormat=function(e,r){"string"==typeof r&&(r=new RegExp(r));return this._formats[e]=r,this},Sr.prototype.errorsText=function(e,r){if(!(e=e||this.errors))return"No errors";for(var t=void 0===(r=r||{}).separator?", ":r.separator,a=void 0===r.dataVar?"data":r.dataVar,o="",i=0;i<e.length;i++){var n=e[i];n&&(o+=a+n.dataPath+" "+n.message+t)}return o.slice(0,-t.length)},Sr.prototype._addSchema=function(e,r,t,a){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var o=this._opts.serialize,i=o?o(e):e,n=this._cache.get(i);if(n)return n;a=a||!1!==this._opts.addUsedSchema;var s=U.normalizeId(this._getId(e));s&&a&&$r(this,s);var l,c=!1!==this._opts.validateSchema&&!r;c&&!(l=s&&s==U.normalizeId(e.$schema))&&this.validateSchema(e,!0);var u=U.ids.call(this,e),d=new B({id:s,schema:e,localRefs:u,cacheKey:i,meta:t});"#"!=s[0]&&a&&(this._refs[s]=d);this._cache.put(i,d),c&&l&&this.validateSchema(e,!0);return d},Sr.prototype._compile=function(e,r){if(e.compiling)return e.validate=o,o.schema=e.schema,o.errors=null,o.root=r||o,!0===e.schema.$async&&(o.$async=!0),o;var t,a;e.compiling=!0,e.meta&&(t=this._opts,this._opts=this._metaOpts);try{a=pe.call(this,e.schema,r,e.localRefs)}catch(r){throw delete e.validate,r}finally{e.compiling=!1,e.meta&&(this._opts=t)}return e.validate=a,e.refs=a.refs,e.refVal=a.refVal,e.root=a.root,a;function o(){var r=e.validate,t=r.apply(this,arguments);return o.errors=r.errors,t}},Sr.prototype.compileAsync=Je,Sr.prototype.addKeyword=lr,Sr.prototype.getKeyword=cr,Sr.prototype.removeKeyword=ur,Sr.prototype.validateKeyword=dr,Sr.ValidationError=ie.Validation,Sr.MissingRefError=ie.MissingRef,Sr.$dataMetaSchema=Ke;var Pr="http://json-schema.org/draft-07/schema",wr=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],Er=["/properties"];function Sr(e){if(!(this instanceof Sr))return new Sr(e);var r,t;e=this._opts=k.copy(e)||{},function(e){var r=e._opts.logger;if(!1===r)e.logger={log:kr,warn:kr,error:kr};else{if(void 0===r&&(r=console),!("object"==typeof r&&r.log&&r.warn&&r.error))throw new Error("logger must implement log, warn and error methods");e.logger=r}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=Ae(e.format),this._cache=e.cache||new we,this._loadingSchemas={},this._compilations=[],this.RULES=((r=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}]).all=Ue(t=["type","$comment"]),r.types=Ue(["number","integer","string","array","object","boolean","null"]),r.forEach((function(e){e.rules=e.rules.map((function(e){var a;if("object"==typeof e){var o=Object.keys(e)[0];a=e[o],e=o,a.forEach((function(e){t.push(e),r.all[e]=!0}))}return t.push(e),r.all[e]={keyword:e,code:Qe[e],implements:a}})),r.all.$comment={keyword:"$comment",code:Qe.$comment},e.type&&(r.types[e.type]=e)})),r.keywords=Ue(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),r.custom={},r),this._getId=function(e){switch(e.schemaId){case"auto":return Dr;case"id":return Or;default:return _r}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=le),this._metaOpts=function(e){for(var r=k.copy(e._opts),t=0;t<wr.length;t++)delete r[wr[t]];return r}(this),e.formats&&function(e){for(var r in e._opts.formats){var t=e._opts.formats[r];e.addFormat(r,t)}}(this),e.keywords&&function(e){for(var r in e._opts.keywords){var t=e._opts.keywords[r];e.addKeyword(r,t)}}(this),function(e){var r;e._opts.$data&&(r=yr,e.addMetaSchema(r,r.$id,!0));if(!1===e._opts.meta)return;var t=ir;e._opts.$data&&(t=Ke(t,Er));e.addMetaSchema(t,Pr,!0),e._refs["http://json-schema.org/schema"]=Pr}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var r=e._opts.schemas;if(!r)return;if(Array.isArray(r))e.addSchema(r);else for(var t in r)e.addSchema(r[t],t)}(this)}function Fr(e,r){return r=U.normalizeId(r),e._schemas[r]||e._refs[r]||e._fragments[r]}function xr(e,r,t){for(var a in r){var o=r[a];o.meta||t&&!t.test(a)||(e._cache.del(o.cacheKey),delete r[a])}}function Or(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function _r(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function Dr(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function $r(e,r){if(e._schemas[r]||e._refs[r])throw new Error('schema with key or id "'+r+'" already exists')}function kr(){}var jr={$$currentLocalizeFn:function(e){if(e&&e.length)for(var r=0;r<e.length;r+=1){var t=e[r],a=void 0,o=void 0,i=void 0;switch(t.keyword){case"$ref":a="无法找到引用".concat(t.params.ref);break;case"additionalItems":a="",o=t.params.limit,a+="不允许超过".concat(o,"个元素");break;case"additionalProperties":a="不允许有额外的属性";break;case"anyOf":a="数据应为 anyOf 所指定的其中一个";break;case"const":a="应当等于常量";break;case"contains":a="应当包含一个有效项";break;case"custom":a='应当通过 "'.concat(t.keyword,' 关键词校验"');break;case"dependencies":a="",o=t.params.depsCount,a+="应当拥有属性".concat(t.params.property,"的依赖属性").concat(t.params.deps);break;case"enum":a="应当是预设定的枚举值之一";break;case"exclusiveMaximum":case"exclusiveMinimum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(i);break;case"false schema":a="布尔模式出错";break;case"format":a='应当匹配格式 "'.concat(t.params.format,'"');break;case"formatExclusiveMaximum":a="formatExclusiveMaximum 应当是布尔值";break;case"formatExclusiveMinimum":a="formatExclusiveMinimum 应当是布尔值";break;case"formatMaximum":case"formatMinimum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当是 ".concat(i);break;case"if":a='应当匹配模式 "'.concat(t.params.failingKeyword,'" ');break;case"maximum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(i);break;case"maxItems":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个项");break;case"maxLength":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个字符");break;case"maxProperties":a="",o=t.params.limit,a+="不应有多于 ".concat(o," 个属性");break;case"minimum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(i);break;case"minItems":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个项");break;case"minLength":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个字符");break;case"minProperties":a="",o=t.params.limit,a+="不应有少于 ".concat(o," 个属性");break;case"multipleOf":a="应当是 ".concat(t.params.multipleOf," 的整数倍");break;case"not":a='不应当匹配 "not" schema';break;case"oneOf":a='只能匹配一个 "oneOf" 中的 schema';break;case"pattern":a='应当匹配模式 "'.concat(t.params.pattern,'"');break;case"patternRequired":a="应当有属性匹配模式 ".concat(t.params.missingPattern);break;case"propertyNames":a="属性名 '".concat(t.params.propertyName,"' 无效");break;case"required":a="应当有必需属性 ".concat(t.params.missingProperty);break;case"switch":a="由于 ".concat(t.params.caseIndex,' 失败,未通过 "switch" 校验, ');break;case"type":a="应当是 ".concat(t.params.type," 类型");break;case"uniqueItems":a="不应当含有重复项 (第 ".concat(t.params.j," 项与第 ").concat(t.params.i," 项是重复的)");break;default:continue}t.message=a}},getCurrentLocalize:function(){return this.$$currentLocalizeFn},useLocal:function(e){this.$$currentLocalizeFn=e}};function Ir(e,t){try{if("object"===r(t))return e.fill(null).map((function(){return JSON.parse(JSON.stringify(t))}))}catch(e){}}function Ar(e,r){return e.filter((function(e){return r.includes(e)}))}function Cr(e,r,t){var a=F(e.$ref,r);e.$ref;var o=n(e,["$ref"]);return Tr(i(i({},a),o),r,t)}function Rr(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length<2)return r[0];for(var a={},o=[].concat(r),i=function(){var e=p(o[0])?o[0]:{},r=p(o[1])?o[1]:{};a=Object.assign({},e),Object.keys(r).reduce((function(t,a){var o=e[a],i=r[a];if(p(o)||p(i))if(p(o)&&p(i))t[a]=Rr(o,i);else{var n=s(p(o)?[o,i]:[i,o],2),l=n[0],c=n[1];t[a]="additionalProperties"===a?!0===c&&l:l}else if(Array.isArray(o)||Array.isArray(i))if(Array.isArray(o)&&Array.isArray(i)){if(p(o[0])||p(i[0]))throw new Error("暂不支持如上数组对象元素合并");var u=Ar([].concat(o),[].concat(i));if(u.length<=0)throw new Error("无法合并如上数据");0===u.length&&"type"===a?t[a]=u[0]:t[a]=u}else{var d=s(Array.isArray(o)?[o,i]:[i,o],2),h=d[0],m=d[1];if(void 0===m)t[a]=h;else{if(!h.includes(m))throw new Error("无法合并如下数据");t[a]=m}}else if(void 0!==o&&void 0!==i)if("maxLength"===a||"maximum"===a||"maxItems"===a||"exclusiveMaximum"===a||"maxProperties"===a)t[a]=Math.min(o,i);else if("minLength"===a||"minimum"===a||"minItems"===a||"exclusiveMinimum"===a||"minProperties"===a)t[a]=Math.max(o,i);else if("multipleOf"===a)t[a]=E(o,i);else{if(o!==i)throw new Error("无法合并如下数据");t[a]=o}else t[a]=void 0===o?i:o;return t}),a),o.splice(0,2,a)};o.length>=2;)i();return a}function Nr(e,r,t){var a=i(i({},e),{},{allOf:e.allOf.map((function(e){return Tr(e,r,t)}))});try{var o=a.allOf,s=n(a,["allOf"]);return Rr.apply(void 0,[s].concat(l(o)))}catch(e){return a.allOf,n(a,["allOf"])}}function Lr(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.hasOwnProperty("allOf")&&(e=Nr(e,r,t)),e.hasOwnProperty("$ref")&&(e=Cr(e,r,t)),e}function Tr(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return p(e)?Lr(e,r,t):{}}function zr(e){return e?"".concat("__pathRoot",".").concat(e).replace(/\./g,"_"):"__pathRoot"}function Vr(e){return""===e}function qr(e,r){return""===e?r:[e,r].join(".")}function Wr(r,t){e.delete(r,t)}function Mr(r,t,a){for(var o=t.split("."),i=0;i<o.length;i+=1){if(o.length-i<2){e.set(r,o[o.length-1],a);break}r=r[o[i]]}}function Br(e,r){for(var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=r.split("."),o=0;o<a.length-t;o+=1){if(void 0===e)return;e=""===a[o]?e:e[a[o]]}return e}function Qr(e){return e}var Ur=Object.freeze({__proto__:null,nodePath2ClassName:zr,isRootNodePath:Vr,computedCurPath:qr,deletePathVal:Wr,setPathVal:Mr,getPathVal:Br,path2prop:Qr}),Hr=/{{(.*)}}/;function Kr(e,r,t,a){if(void 0!==t){var o=Hr.exec(t);if(Hr.lastIndex=0,o){var i=o[1].trim();return new Function("parentFormData","rootFormData","return ".concat(i))(Br(e,r,1),e)}return a()}}function Gr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.schema,t=e.uiSchema,a=arguments.length>1?arguments[1]:void 0,o=Xr({schema:r,uiSchema:t,containsSpec:!1});return["title","description"].reduce((function(e,r){return o[r]&&(e["ui:".concat(r)]=String(o[r]).replace(/\$index/g,a+1)),e}),{})}function Jr(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,i=e.curNodePath,n=void 0===i?"":i,s=e.rootFormData,l=void 0===s?{}:s,c=o["ui:widget"]||t["ui:widget"],u=o["ui:hidden"]||t["ui:hidden"];return"HiddenWidget"===c||"hidden"===c||!!Kr(l,n,u,(function(){return"function"==typeof u?u(Br(l,n,1),l):u}))}function Zr(e,t){var a=t.schema,o=void 0===a?{}:a,i=t.uiSchema,n=void 0===i?{}:i,s=o["ui:field"]||n["ui:field"];if("function"==typeof s||"object"===r(s)||"string"==typeof s)return{field:s,fieldProps:n["ui:fieldProps"]||o["ui:fieldProps"]};var l=e[f(o)];if(l)return{field:l};if(!l&&(o.anyOf||o.oneOf))return{field:null};throw new Error("不支持的field类型 ".concat(o.type))}function Yr(e){var r=e.schema,a=void 0===r?{}:r,o=e.uiSchema,n=void 0===o?{}:o,s=e.curNodePath,c=e.rootFormData,u=void 0===c?{}:c;return Object.assign.apply(Object,[{}].concat(l([a,n].map((function(e){return Object.keys(e).reduce((function(r,a){var o=e[a];return"ui:options"===a&&p(o)?i(i({},r),o):0===a.indexOf("ui:")?i(i({},r),{},t({},a.substring(3),void 0===s?o:Kr(u,s,o,(function(){return o})))):r}),{})})))))}function Xr(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.containsSpec,s=void 0===n||n,l=e.curNodePath,c=e.rootFormData,u={};return s&&(u.readonly=!!t.readOnly,void 0!==t.multipleOf&&(u.step=t.multipleOf),(t.minimum||0===t.minimum)&&(u.min=t.minimum),(t.maximum||0===t.maximum)&&(u.max=t.maximum),(t.minLength||0===t.minLength)&&(u.minlength=t.minLength),(t.maxLength||0===t.maxLength)&&(u.maxlength=t.maxLength),"date-time"!==t.format&&"date"!==t.format||("array"===t.type?(u.isRange=!0,u.isNumberValue=!(t.items&&"string"===t.items.type)):u.isNumberValue=!("string"===t.type))),i(i({title:t.title,description:t.description},u),Yr({schema:t,uiSchema:o,curNodePath:l,rootFormData:c}))}function et(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,i=e.curNodePath,s=e.rootFormData,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,c=Xr({schema:t,uiSchema:o,curNodePath:i,rootFormData:s});!c.widget&&l&&Object.assign(c,l({schema:t,uiSchema:o}));var u=c.widget,d=c.title,p=c.labelWidth,h=c.description,m=c.attrs,f=c.class,v=c.style,g=c.fieldAttrs,y=c.fieldStyle,b=c.fieldClass,P=c.emptyValue,w=c.width,E=c.getWidget,S=c.onChange,F=n(c,["widget","title","labelWidth","description","attrs","class","style","fieldAttrs","fieldStyle","fieldClass","emptyValue","width","getWidget","onChange"]);return{widget:u,label:d,labelWidth:p,description:h,widgetAttrs:m,widgetClass:f,widgetStyle:v,fieldAttrs:g,width:w,fieldStyle:y,fieldClass:b,emptyValue:P,getWidget:E,onChange:S,uiProps:F}}function rt(e){var r=e.schema,a=void 0===r?{}:r,o=e.uiSchema,n=void 0===o?{}:o,s=e.errorSchema,c=void 0===s?{}:s;return Object.assign.apply(Object,[{}].concat(l([a,n,c].map((function(e){return Object.keys(e).reduce((function(r,a){var o=e[a];return"err:options"===a&&p(o)?i(i({},r),o):0===a.indexOf("err:")?i(i({},r),{},t({},a.substring(4),o)):r}),{})})))))}function tt(e,r){if(!Array.isArray(r))return e;var t,a=function(e){return e.reduce((function(e,r){return e[r]=!0,e}),{})},o=a(e),i=r.filter((function(e){return"*"===e||o[e]})),n=a(i),s=e.filter((function(e){return!n[e]})),c=i.indexOf("*");if(-1===c){if(s.length)throw new Error("uiSchema order list does not contain ".concat((t=s).length>1?"properties '".concat(t.join("', '"),"'"):"property '".concat(t[0],"'")));return i}if(c!==i.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");var u=l(i);return u.splice.apply(u,[c,1].concat(l(s))),u}function at(e){return Array.isArray(e.enum)&&1===e.enum.length||e.hasOwnProperty("const")}function ot(e){if(Array.isArray(e.enum)&&1===e.enum.length)return e.enum[0];if(e.hasOwnProperty("const"))return e.const;throw new Error("schema cannot be inferred as a constant")}function it(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=Tr(e,r),a=t.oneOf||t.anyOf;return!!Array.isArray(t.enum)||!!Array.isArray(a)&&a.every((function(e){return at(e)}))}function nt(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every((function(e){return p(e)}))}function st(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!(!e.uniqueItems||!e.items)&&it(e.items,r)}function lt(e){return e.additionalItems,p(e.additionalItems)}function ct(e,r,t,a){if(e.enum){var o=Yr({schema:e,uiSchema:r,curNodePath:t,rootFormData:a}).enumNames||e.enumNames;return e.enum.map((function(e,r){return{label:o&&o[r]||String(e),value:e}}))}var i=e.oneOf||e.anyOf,n=r.oneOf||r.anyOf;return i.map((function(e,r){var o=n&&n[r]?Yr({schema:e,uiSchema:n[r],curNodePath:t,rootFormData:a}):{},i=ot(e);return{label:o.title||e.title||String(i),value:i}}))}function ut(e,r,t){if(e)return e;if(r){var a=t.split(".").pop();if(a&&a!=="".concat(Number(a)))return a}return""}var dt=Object.freeze({__proto__:null,replaceArrayIndex:Gr,isHiddenWidget:Jr,getUiField:Zr,getUserUiOptions:Yr,getUiOptions:Xr,getWidgetConfig:et,getUserErrOptions:rt,orderProperties:tt,isConstant:at,toConstant:ot,isSelect:it,isFixedItems:nt,isMultiSelect:st,allowAdditionalItems:lt,optionsList:ct,fallbackLabel:ut}),pt=ft(),ht=null,mt=null;function ft(){var e=new br({errorDataPath:"property",allErrors:!0,multipleOfPrecision:8,schemaId:"auto",unknownFormats:"ignore"});return e.addFormat("data-url",/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/),e.addFormat("color",/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/),e}function vt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null===e?[]:e.map((function(e){var r=e.dataPath,t=e.keyword,a=e.message,o=e.params,i=e.schemaPath,n="".concat(r);return{name:t,property:n,message:a,params:o,stack:"".concat(n," ").concat(a).trim(),schemaPath:i}}))}function gt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.transformErrors,o=e.additionalMetaSchemas,i=void 0===o?[]:o,n=e.customFormats,s=void 0===n?{}:n,c=!v(mt,i),u=!v(ht,s);(c||u)&&(pt=ft()),i&&c&&Array.isArray(i)&&(pt.addMetaSchema(i),mt=i),s&&u&&p(s)&&(Object.keys(s).forEach((function(e){pt.addFormat(e,s[e])})),ht=s);var d=null;try{pt.validate(t,r)}catch(e){d=e}jr.getCurrentLocalize()(pt.errors);var h=vt(pt.errors);pt.errors=null;var m=d&&d.message&&"string"==typeof d.message&&d.message.includes("no schema with key or ref ");return m&&(h=[].concat(l(h),[{stack:d.message}])),"function"==typeof a&&(h=a(h)),{errors:h}}function yt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.uiSchema,o=e.transformErrors,i=e.additionalMetaSchemas,n=void 0===i?[]:i,s=e.customFormats,l=void 0===s?{}:s,c=e.errorSchema,u=void 0===c?{}:c,d=e.required,p=void 0!==d&&d,h=e.propPath,m=void 0===h?"":h,f=e.isOnlyFirstError,v=void 0===f||f,g="array"===t.type&&Array.isArray(r)&&0===r.length,y=void 0===r||g;if(p){if(y){var b={keyword:"required",params:{missingProperty:m}},P=rt({schema:t,uiSchema:a,errorSchema:u}).required;return P?b.message=P:jr.getCurrentLocalize()([b]),[b]}}else if(y&&!g)return[];var w=gt({formData:r,schema:t,transformErrors:o,additionalMetaSchemas:n,customFormats:l}).errors;w=w.filter((function(e){return""===e.property&&!e.schemaPath.includes("#/anyOf/")&&!e.schemaPath.includes("#/oneOf/")||"additionalProperties"===e.name}));var E=rt({schema:t,uiSchema:a,errorSchema:u});return(v&&w.length>0?[w[0]]:w).reduce((function(e,r){return r.message=void 0!==E[r.name]?E[r.name]:r.message,e.push(r),e}),[])}function bt(e,r){try{return pt.validate(e,r)}catch(e){return!1}}function Pt(e,r,t){for(var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=0;n<r.length;n++){var s=Tr(r[n],t,e);if(s.properties){var l=i(i({},t.definitions?{definitions:t.definitions}:{}),{},{anyOf:Object.keys(s.properties).map((function(e){return{required:[e]}}))}),c=void 0;if(s.anyOf){var u=a({},s);u.allOf?u.allOf=u.allOf.slice():u.allOf=[],u.allOf.push(l),c=u}else c=Object.assign({},s,l);if(o||delete c.required,bt(c,e))return n}else if(bt(r[n],e))return n}return 0}var wt=Object.freeze({__proto__:null,ajvValidateFormData:gt,validateFormDataAndTransformMsg:yt,isValid:bt,getMatchingOption:Pt});function Et(e,r){if(Array.isArray(r))return Array.isArray(e)||(e=[]),r.map((function(r,t){return e[t]?Et(e[t],r):r}));if(p(r)){var t=Object.assign({},e);return Object.keys(r).reduce((function(t,a){return t[a]=Et(e?e[a]:{},r[a]),t}),t)}return r}function St(e,r,t){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=p(e)?e:{},n=p(a)?a:{};"allOf"in i&&(i=Nr(i,t,n));var s=r;if(p(s)&&p(i.default))s=m(s,i.default);else if("default"in i)s=i.default;else{if("$ref"in i){var l=F(i.$ref,t);return St(l,s,t,n,o)}if(nt(i))s=i.items.map((function(e,a){return St(e,Array.isArray(r)?r[a]:void 0,t,n,o)}));else if("oneOf"in i){var c=Tr(i.oneOf[Pt(n,i.oneOf,t)],t,n);if(i.properties&&c.properties){var u=m(i,c);delete u.oneOf,i=u}else i=c}else if("anyOf"in i){var d=Tr(i.anyOf[Pt(n,i.anyOf,t)],t,n);if(i.properties&&d.properties){var h=m(i,d);delete h.anyOf,i=h}else i=d}}switch(void 0===s&&(s=i.default),f(i)){case"null":return null;case"object":return Object.keys(i.properties||{}).reduce((function(e,r){var a=St(i.properties[r],(s||{})[r],t,(n||{})[r],o);return(o||void 0!==a)&&(e[r]=a),e}),{});case"array":if(Array.isArray(s)&&(s=s.map((function(e,r){return St(i.items[r]||i.additionalItems||{},e,t,{},o)}))),Array.isArray(a)&&(s=a.map((function(e,r){return St(i.items,(s||{})[r],t,e,{},o)}))),i.minItems){if(st(i,t))return s||[];var v=s?s.length:0;if(i.minItems>v){var g=s||[],y=Array.isArray(i.items)?i.additionalItems:i.items,b=Ir(new Array(i.minItems-v),St(y,y.defaults,t,{},o));return g.concat(b)}}s=void 0===s?[]:s}return s}function Ft(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!p(e))throw new Error("Invalid schema: ".concat(e));var o=Tr(e,t,r),i=St(o,e.default,t,r,a);return void 0===r?i:p(r)||Array.isArray(r)?Et(i,r):0===r||!1===r||""===r?r:r||i}function xt(e,r){void 0===r&&(r={});var t=r.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}xt('.genFromComponent{font-size:14px;line-height:1;word-wrap:break-word;word-break:break-word;padding:0;margin:0}.genFromComponent a,.genFromComponent h1,.genFromComponent h2,.genFromComponent h3,.genFromComponent li,.genFromComponent p,.genFromComponent ul{font-size:14px}.genFromComponent .genFormIcon{width:12px;height:12px;vertical-align:top}.genFromComponent .genFormBtn{display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;background:#fff;border:1px solid #dcdfe6;color:#606266;-webkit-appearance:none;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;margin:0;-webkit-transition:.1s;transition:.1s;font-weight:500;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;padding:12px 20px;font-size:14px;border-radius:4px}.genFromComponent .genFormBtn.is-plain:focus,.genFromComponent .genFormBtn.is-plain:hover{background:#fff;border-color:#409eff;color:#409eff}.genFromComponent .hiddenWidget{display:none}.genFromComponent .fieldGroupWrap+.fieldGroupWrap .fieldGroupWrap_title{margin-top:20px}.genFromComponent .fieldGroupWrap_title{position:relative;display:block;width:100%;line-height:26px;margin-bottom:8px;font-size:15px;font-weight:700;border:0}.genFromComponent .fieldGroupWrap_des{font-size:12px;line-height:20px;margin-bottom:10px;color:#999}.genFromComponent .genFromWidget_des{padding:0;margin-top:0;margin-bottom:2px;font-size:12px;line-height:20px;color:#999;text-align:left}.genFromComponent .formItemErrorBox{margin:0 auto;color:#ff5757;padding-top:2px;position:absolute;top:100%;left:0;display:-webkit-box!important;line-height:16px;text-overflow:ellipsis;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1;white-space:normal;font-size:12px;text-align:left}.genFromComponent .genFormIcon-qs{fill:#606266;vertical-align:middle;display:inline-block;width:16px;height:16px;margin-left:2px;margin-top:-2px;cursor:pointer}.genFromComponent .genFormItemRequired:before{content:"*";color:#f56c6c;margin-right:4px}.genFromComponent .appendCombining_box{margin-bottom:22px}.genFromComponent .appendCombining_box .appendCombining_box{margin-bottom:10px}.genFromComponent .appendCombining_box{padding:10px;background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .validateWidget{margin-bottom:0!important;width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important;padding:0!important}.genFromComponent .validateWidget .formItemErrorBox{padding:5px 0;position:relative}.genFromComponent .arrayField:not(.genFormItem){margin-bottom:22px}.genFromComponent .arrayField:not(.genFormItem) .arrayField{margin-bottom:10px}.genFromComponent .arrayOrderList{background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .arrayOrderList_item{position:relative;padding:25px 10px 12px;border-radius:2px;margin-bottom:6px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.genFromComponent .arrayOrderList_bottomAddBtn{text-align:right;padding:15px 10px;margin-bottom:10px}.genFromComponent .bottomAddBtn{width:40%;min-width:10px;max-width:180px}.genFromComponent .arrayListItem_content{padding-top:15px;-webkit-box-flex:1;-ms-flex:1;flex:1;margin:0 auto;-webkit-box-shadow:0 -1px 0 0 rgba(0,0,0,.05);box-shadow:0 -1px 0 0 rgba(0,0,0,.05)}.genFromComponent .arrayListItem_index,.genFromComponent .arrayListItem_operateTool{position:absolute;height:25px}.genFromComponent .arrayListItem_index{top:6px;line-height:18px;height:18px;padding:0 6px;background-color:rgba(0,0,0,.28);color:#fff;font-size:12px;border-radius:2px}.genFromComponent .arrayListItem_operateTool{width:75px;right:9px;top:-1px;text-align:right;font-size:0}.genFromComponent .arrayListItem_btn{vertical-align:top;display:inline-block;padding:6px;margin:0;font-size:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none;cursor:pointer;text-align:center;background:transparent;color:#666}.genFromComponent .arrayListItem_btn:hover{opacity:.6}.genFromComponent .arrayListItem_btn[disabled]{color:#999;opacity:.3!important;cursor:not-allowed}.genFromComponent .arrayListItem_orderBtn-bottom,.genFromComponent .arrayListItem_orderBtn-top{background-color:#f0f9eb}.genFromComponent .arrayListItem_btn-delete{background-color:#fef0f0}.genFromComponent .formFooter_item{text-align:right;border-top:1px solid rgba(0,0,0,.08);padding-top:10px}.genFromComponent.formInlineFooter>.fieldGroupWrap{display:inline-block;margin-right:10px}.genFromComponent.formInline .genFormItem{display:inline-block;margin-right:10px;vertical-align:top}.genFromComponent.formInline .validateWidget{margin-right:0}.genFromComponent.formInline .formFooter_item{border-top:none;padding-top:0}.layoutColumn .layoutColumn_w100{width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important}.layoutColumn .fieldGroupWrap_box{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start}.layoutColumn .fieldGroupWrap_box>div{width:100%;-ms-flex-preferred-size:100%;flex-basis:100%}.layoutColumn .fieldGroupWrap_box>.genFormItem{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;-webkit-box-sizing:border-box;box-sizing:border-box;padding-right:10px}.layoutColumn.layoutColumn-1 .fieldGroupWrap_box>.genFormItem{padding-right:0}.layoutColumn.layoutColumn-2 .fieldGroupWrap_box>.genFormItem{width:50%;-ms-flex-preferred-size:50%;flex-basis:50%}.layoutColumn.layoutColumn-3 .fieldGroupWrap_box>.genFormItem{width:33.333%;-ms-flex-preferred-size:33.333%;flex-basis:33.333%}');var Ot={formFooter:{type:Object,default:function(){return{show:!0,okBtn:"保存",cancelBtn:"取消"}}},value:{type:null,default:function(){return{}},required:!0},formProps:{type:Object,default:function(){return{}}},fallbackLabel:{type:Boolean,default:!1},schema:{type:Object,default:function(){return{}},required:!0},uiSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},errorSchema:{type:Object,default:function(){return{}}}},_t={name:"FormFooter",props:{okBtn:{type:String,default:"保存"},cancelBtn:{type:String,default:"取消"},formItemAttrs:{type:Object,default:function(){return{}}},globalOptions:null},render:function(e){var r=this,t=this.$props,a=t.okBtn,o=t.cancelBtn,n=t.globalOptions.COMPONENT_MAP;return e(n.formItem,i({class:{formFooter_item:!0}},this.formItemAttrs),[e(n.button,{on:{click:function(){r.$emit("onCancel")}}},o),e(n.button,{style:{marginLeft:"10px"},props:{type:"primary"},on:{click:function(){r.$emit("onSubmit")}}},a)])}};var Dt=function(e,r,t,a,o,i,n,s,l,c){"boolean"!=typeof n&&(l=s,s=n,n=!1);var u,d="function"==typeof t?t.options:t;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,o&&(d.functional=!0)),a&&(d._scopeId=a),i?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(i)},d._ssrRegister=u):r&&(u=n?function(e){r.call(this,c(e,this.$root.$options.shadowRoot))}:function(e){r.call(this,s(e))}),u)if(d.functional){var p=d.render;d.render=function(e,r){return u.call(r),p(e,r)}}else{var h=d.beforeCreate;d.beforeCreate=h?[].concat(h,u):[u]}return t},$t={name:"FieldGroupWrap",inject:["genFormProvide"],props:{curNodePath:{type:String,default:""},showTitle:{type:Boolean,default:!0},showDescription:{type:Boolean,default:!0},title:{type:String,default:""},description:{type:String,default:""}},computed:{trueTitle:function(){var e=this.title;if(e)return e;var r=(this.genFormProvide.value||this.genFormProvide).fallbackLabel&&this.curNodePath.split(".").pop();return r!=="".concat(Number(r))?r:""}}},kt=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("div",{staticClass:"fieldGroupWrap"},[e.showTitle&&e.trueTitle?t("h3",{staticClass:"fieldGroupWrap_title"},[e._v("\n "+e._s(e.trueTitle)+"\n ")]):e._e(),e._v(" "),e.showDescription&&e.description?t("p",{staticClass:"fieldGroupWrap_des",domProps:{innerHTML:e._s(e.description)}}):e._e(),e._v(" "),t("div",{staticClass:"fieldGroupWrap_box"},[e._t("default")],2)])};kt._withStripped=!0;var jt=Dt({render:kt,staticRenderFns:[]},void 0,$t,void 0,!1,void 0,!1,void 0,void 0,void 0),It={formProps:{type:null},globalOptions:{type:null},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},customFormats:{type:Object,default:function(){return{}}},rootSchema:{type:Object,default:function(){return{}}},rootFormData:{type:null,default:function(){return{}}},curNodePath:{type:String,default:""},required:{type:Boolean,default:!1},needValidFieldGroup:{type:Boolean,default:!0}},At=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-down",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}})])};At._withStripped=!0;var Ct=Dt({render:At,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Rt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-up",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}})])};Rt._withStripped=!0;var Nt=Dt({render:Rt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Lt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-close",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1\n 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0\n 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}})])};Lt._withStripped=!0;var Tt=Dt({render:Lt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),zt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-plus",attrs:{t:"1551322312294",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"10297","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"200",height:"200"}},[r("path",{attrs:{d:"M474 152m8 0l60 0q8 0 8 8l0 704q0 8-8 8l-60 0q-8 0-8-8l0-704q0-8 8-8Z","p-id":"10298"}}),this._v(" "),r("path",{attrs:{d:"M168 474m8 0l672 0q8 0 8 8l0 60q0 8-8 8l-672 0q-8 0-8-8l0-60q0-8 8-8Z","p-id":"10299"}})])};zt._withStripped=!0;var Vt=Dt({render:zt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),qt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-qs",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 708c-22.1\n 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 0\n 0-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8\n 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6\n 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6\n 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z"}})])};qt._withStripped=!0;var Wt=Dt({render:qt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Mt={name:"Widget",inject:["genFormProvide"],props:{isFormData:{type:Boolean,default:!0},curValue:{type:null,default:0},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},widget:{type:[String,Function,Object],default:null},required:{type:Boolean,default:!1},emptyValue:{type:null,default:void 0},formatValue:{type:[Function],default:function(e){return{update:!0,value:e}}},rootFormData:{type:null},curNodePath:{type:String,default:""},label:{type:String,default:""},width:{type:String,default:""},labelWidth:{type:String,default:""},description:{type:String,default:""},widgetAttrs:{type:Object,default:function(){return{}}},widgetClass:{type:Object,default:function(){return{}}},widgetStyle:{type:Object,default:function(){return{}}},fieldAttrs:{type:Object,default:function(){return{}}},fieldClass:{type:Object,default:function(){return{}}},fieldStyle:{type:Object,default:function(){return{}}},uiProps:{type:Object,default:function(){return{}}},formProps:null,getWidget:null,globalOptions:null,onChange:null},computed:{value:{get:function(){return this.isFormData?Br(this.rootFormData,this.curNodePath):this.curValue},set:function(e){var r=""===e||null===e?this.emptyValue:e;this.isFormData&&Mr(this.rootFormData,this.curNodePath,r),this.$emit("onChange",r)}}},created:function(){this.uiProps.enumOptions&&this.uiProps.enumOptions.length>0&&void 0===this.value&&this.value!==this.uiProps.enumOptions[0]&&(this.schema.items?this.value=[]:this.required&&(this.value=this.uiProps.enumOptions[0].value))},render:function(e){var r=this,t=this.$props.curNodePath,a=Vr(t),o=r.globalOptions.HELPERS.isMiniDes(r.formProps),n=r.description?e("div",{domProps:{innerHTML:r.description},class:{genFromWidget_des:!0}}):null,s=r.globalOptions.COMPONENT_MAP,l=o&&n?e(s.popover,{style:{margin:"0 2px",fontSize:"16px",cursor:"pointer"},props:{placement:"top",trigger:"hover"}},[n,e(Wt,{slot:"reference"})]):null,c=i(i({},r.fieldStyle),r.width?{width:r.width,flexBasis:r.width,paddingRight:"10px"}:{}),u=ut(r.label,r.widget&&this.genFormProvide.fallbackLabel,t);return e(s.formItem,{class:i(i({},r.fieldClass),{},{genFormItem:!0}),style:c,attrs:r.fieldAttrs,props:i(i({},r.labelWidth?{labelWidth:r.labelWidth}:{}),this.isFormData?{prop:a?"__$$root":t,rules:[{validator:function(e,o,i){a&&(o=r.rootFormData);var n=yt({formData:o,schema:r.$props.schema,uiSchema:r.$props.uiSchema,customFormats:r.$props.customFormats,errorSchema:r.errorSchema,required:r.required,propPath:t});if(n.length>0)return i(n[0].message);var s=r.$props.customRule;return s&&"function"==typeof s?s({field:t,value:o,rootFormData:r.rootFormData,callback:i}):i()},trigger:"blur"}]}:{}),scopedSlots:{error:function(r){return r.error?e("div",{class:{formItemErrorBox:!0},attrs:{title:r.error}},[r.error]):null}}},[u?e("span",{slot:"label",class:{genFormLabel:!0,genFormItemRequired:r.required}},["".concat(u),l,"".concat(r.formProps&&r.formProps.labelSuffix||"")]):null,o?null:n,e(r.widget,{style:r.widgetStyle,class:r.widgetClass,attrs:i(i(i({},r.widgetAttrs),r.uiProps),{},{value:this.value}),ref:"widgetRef",on:{"hook:mounted":function(){r.getWidget&&"function"==typeof r.getWidget&&r.getWidget.call(null,r.$refs.widgetRef)},input:function(e){var t=r.formatValue(e),a=r.value;t.update&&a!==t.value&&(r.value=t.value,r.onChange&&r.onChange({curVal:t.value,preVal:a,parentFormData:Br(r.rootFormData,r.curNodePath,1),rootFormData:r.rootFormData}))}}})])}},Bt={name:"ObjectField",functional:!0,props:It,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,n=t.errorSchema,c=t.needValidFieldGroup,u=t.curNodePath,d=t.rootFormData,h=t.globalOptions,m=Xr({schema:a,uiSchema:o,curNodePath:u,rootFormData:d}),f=m.title,v=m.description,g=m.showTitle,y=m.showDescription,b=m.order,P=m.fieldClass,w=m.fieldAttrs,E=m.fieldStyle,S=m.onlyShowIfDependent,F=tt(Object.keys(a.properties||{}),b).map((function(t){var l=function(e){return Array.isArray(a.required)&&!!~a.required.indexOf(e)}(t),c=function(e){var r=!1,t=!1;return p(a.dependencies)&&(t=Object.entries(a.dependencies).some((function(t){var a=s(t,2),o=a[0],i=a[1],n=!(!Array.isArray(i)||!~i.indexOf(e));return r=r||n,n&&void 0!==Br(d,u)[o]}))),{isDependency:r,curDependent:t}}(t),h=c.isDependency,m=c.curDependent;return h&&S&&!m?null:e(aa,{key:t,props:i(i({},r.props),{},{schema:a.properties[t],uiSchema:o[t],errorSchema:n[t],required:l||m,curNodePath:qr(u,t)})})}));return e(jt,{props:{title:f,description:v,showTitle:g,showDescription:y,curNodePath:u},class:i(i({},r.data.class),P),attrs:w,style:E},[e("template",{slot:"default"},[].concat(l(F),[c?e(Mt,{key:"validateWidget-object",class:{validateWidget:!0,"validateWidget-object":!0},props:{schema:Object.entries(a).reduce((function(e,r){var t=s(r,2),o=t[0],i=t[1];return!1!==a.additionalProperties&&["properties","id","$id"].includes(o)||(e[o]=i),e}),{}),uiSchema:o,errorSchema:n,curNodePath:u,rootFormData:d,globalOptions:h}}):null]))])}},Qt={name:"StringField",props:It,functional:!0,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,n=t.curNodePath,s=t.rootFormData,l=t.globalOptions.WIDGET_MAP,c=it(a)&&ct(a,o,n,s),u=et({schema:a,uiSchema:o,curNodePath:n,rootFormData:s},(function(){var e="number"===a.type||"integer"===a.type;return{widget:c?l.common.select:l.formats[a.format]||(e?l.types.number:l.types.string)}}));return c&&!u.uiProps.enumOptions&&(u.uiProps.enumOptions=c),e(Mt,i(i({},r.data),{},{props:i(i({},r.props),u)}))}},Ut={name:"NumberField",props:It,functional:!0,render:function(e,r){return e(Qt,r.data)}},Ht={name:"IntegerField",props:It,functional:!0,render:function(e,r){return e(Qt,r.data)}},Kt={name:"BooleanField",props:It,functional:!0,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,n=t.curNodePath,s=t.rootFormData,l=t.globalOptions,c=ct({enumNames:a.enumNames||["true","false"],enum:a.enum||[!0,!1]},o,n,s),u=et({schema:a,uiSchema:o,curNodePath:n,rootFormData:s},(function(){return{widget:l.WIDGET_MAP.types.boolean}}));return u.uiProps.enumOptions=u.uiProps.enumOptions||c,e(Mt,i(i({},r.data),{},{props:i(i({},r.props),u)}))}},Gt={name:"ArrayOrderList",props:{vNodeList:{type:Array,default:[]},tupleItemsLength:{type:Number,default:0},addable:{type:Boolean,default:!0},showIndexNumber:{type:Boolean,default:!1},sortable:{type:Boolean,default:!0},removable:{type:Boolean,default:!0},maxItems:{},minItems:{},globalOptions:null},computed:{canAdd:function(){var e=this.$props,r=e.addable,t=e.maxItems,a=e.vNodeList;return!!r&&(void 0===t||a.length<t)},canRemove:function(){var e=this.$props,r=e.removable,t=e.minItems,a=e.vNodeList;return!!r&&(void 0===t||a.length>t)}},render:function(e){var r=this;return this.vNodeList.length<=0&&!this.addable?null:e("div",{class:{arrayOrderList:!0}},this.vNodeList.map((function(t,a){var o=t.key,n=t.vNode,s=r.tupleItemsLength+a,l=a+1;return e("div",{key:o,class:{arrayOrderList_item:!0}},[r.showIndexNumber?e("div",{class:{arrayListItem_index:!0}},l):null,e("div",{class:{arrayListItem_operateTool:!0}},[e("button",{style:i({},r.sortable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.sortable||0===a},class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-top":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"moveUp",data:{index:s}})}}},[e(Nt)]),e("button",{style:i({},r.sortable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.sortable||a===r.vNodeList.length-1},class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-bottom":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"moveDown",data:{index:s}})}}},[e(Ct)]),e("button",{style:i({},r.removable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.canRemove},class:{arrayListItem_btn:!0,"arrayListItem_btn-delete":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"remove",data:{index:s}})}}},[e(Tt)])]),e("div",{class:{arrayListItem_content:!0}},[n])])})).concat([e("p",{style:i({},this.canAdd?{}:{display:"none"}),class:{arrayOrderList_bottomAddBtn:!0}},[e("button",{attrs:{type:"button"},class:{bottomAddBtn:!0,"is-plain":!0,genFormBtn:!0},on:{click:function(){r.$emit("onArrayOperate",{command:"add"})}}},[e(Vt,{style:{marginRight:"5px"}}),this.maxItems?"( ".concat(this.vNodeList.length," / ").concat(this.maxItems," )"):""])])]))}},Jt={name:"ArrayFieldNormal",functional:!0,props:i(i({},It),{},{itemsFormData:{type:Array}}),render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,n=t.curNodePath,s=t.rootFormData,l=t.itemsFormData,c=t.errorSchema,u=t.globalOptions,d=Xr({schema:a,uiSchema:o,curNodePath:n,rootFormData:s}),p=d.title,h=d.description,m=d.addable,f=d.showIndexNumber,v=d.sortable,g=d.removable,y=d.showTitle,b=d.showDescription,P=d.fieldClass,w=d.fieldAttrs,E=d.fieldStyle,S=l.map((function(t,s){var l=Gr({schema:a.items,uiSchema:o.items},s);return{key:t.key,vNode:e(aa,{key:t.key,props:i(i({},r.props),{},{schema:a.items,required:![].concat(a.items.type).includes("null"),uiSchema:i(i({},o.items),l),errorSchema:c.items,curNodePath:qr(n,s)})})}}));return e(jt,{props:{title:p,description:h,showTitle:y,showDescription:b,curNodePath:n},class:i(i({},r.data.class),P),attrs:w,style:E},[e(Gt,{props:{vNodeList:S,showIndexNumber:f,addable:m,sortable:v,removable:g,maxItems:a.maxItems,minItems:a.minItems,globalOptions:u},on:r.listeners})])}},Zt={name:"ArrayFieldMultiSelect",functional:!0,props:i({},It),render:function(e,r){var t=r.props,a=t.schema,o=t.rootSchema,n=t.uiSchema,s=t.curNodePath,l=t.rootFormData,c=t.globalOptions,u=ct(Tr(a.items,o),n,s,l),d=et({schema:a,uiSchema:n,curNodePath:s,rootFormData:l},(function(){return{widget:c.WIDGET_MAP.common.checkboxGroup}}));return d.uiProps.multiple=!0,u&&!d.uiProps.enumOptions&&(d.uiProps.enumOptions=u),e(Mt,i(i({},r.data),{},{props:i(i({},r.props),d)}))}},Yt={name:"ArrayFieldTuple",props:i(i({},It),{},{itemsFormData:{type:Array,default:function(){return[]}}}),created:function(){this.fixItemsFormData()},methods:{fixItemsFormData:function(){var e=!Array.isArray(this.itemsFormData);if(e||this.itemsFormData.length<this.schema.items.length){var r=Ft(this.schema,void 0,this.rootSchema);e?this.$emit("onArrayOperate",{command:"setNewTarget",data:{newTarget:r}}):this.$emit("onArrayOperate",{command:"batchPush",data:{pushArray:r.slice(this.itemsFormData.length)}})}}},render:function(e){var r=this;if(!Array.isArray(this.itemsFormData))return null;var t,a,o=this.$props,n=o.schema,s=o.uiSchema,c=o.errorSchema,u=o.curNodePath,d=o.globalOptions,p=Xr({schema:n,uiSchema:s,curNodePath:u,rootFormData:this.rootFormData}),h=p.title,m=p.description,f=p.addable,v=p.showIndexNumber,g=p.sortable,y=p.removable,b=p.showTitle,P=p.showDescription,w=p.fieldClass,E=p.fieldAttrs,S=p.fieldStyle,F=(t=this.itemsFormData,a=this.schema.items.length-1,t.reduce((function(e,r,t){return e[t>a?1:0].push(r),e}),[[],[]])),x=F[0].map((function(t,a){return e(aa,{key:t.key,props:i(i({},r.$props),{},{required:![].concat(n.items[a].type).includes("null"),schema:n.items[a],uiSchema:s.items?s.items[a]:{},errorSchema:c.items?c.items[a]:{},curNodePath:qr(u,a)})})})),O=F[1].map((function(t,a){var o=Gr({schema:n.additionalItems,uiSchema:s.additionalItems},a);return{key:t.key,vNode:e(aa,{key:t.key,props:i(i({},r.$props),{},{schema:n.additionalItems,required:![].concat(n.additionalItems.type).includes("null"),uiSchema:i(i({},s.additionalItems),o),errorSchema:c.additionalItems,curNodePath:qr(u,a+n.items.length)})})}})),_=(void 0===f||f)&<(this.schema);return e(jt,{props:{title:h,description:m,showTitle:b,showDescription:P,curNodePath:u},class:w,attrs:E,style:S},[].concat(l(x),[e(Gt,{props:{vNodeList:O,tupleItemsLength:n.items.length,addable:_,showIndexNumber:v,sortable:g,removable:y,maxItems:n.maxItems,minItems:n.minItems,globalOptions:d},on:this.$listeners})]))}},Xt={name:"ArrayFieldSpecialFormat",props:It,functional:!0,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,n=t.curNodePath,s=t.rootFormData,l=et({schema:i({"ui:widget":t.globalOptions.WIDGET_MAP.formats[a.format]},a),uiSchema:o,curNodePath:n,rootFormData:s});return e(Mt,i(i({},r.data),{},{props:i(i({},r.props),l)}))}},ea={name:"ArrayField",props:It,data:function(){return{formKeys:this.getCuFormData().map((function(){return b()}))}},computed:{itemsFormData:function(){var e=this.$data.formKeys;return this.curFormData.map((function(r,t){return{key:e[t],value:r}}))},curFormData:function(){return this.getCuFormData()}},watch:{curFormData:function(e,r){e!==r&&Array.isArray(e)&&(this.formKeys=e.map((function(){return b()})))}},methods:{getCuFormData:function(){var e=this.$props,r=Br(e.rootFormData,e.curNodePath);return Array.isArray(r)?r:[]},getNewFormDataRow:function(){var e=this.$props,r=e.schema,t=e.rootSchema,a=r.items;return nt(this.schema)&<(this.schema)&&(a=r.additionalItems),Ft(a,void 0,t)},handleArrayOperate:function(e){var r=e.command,t=e.data,a={moveUp:function(e,r){!function(e,r){if(0===r)return!1;var t=[e[r],e[r-1]];e.splice.apply(e,[r-1,2].concat(t))}(e,r.index)},moveDown:function(e,r){!function(e,r){if(r===e.length-1)return!1;var t=e[r],a=[e[r+1],t];e.splice.apply(e,[r,2].concat(a))}(e,r.index)},remove:function(e,r){!function(e,r){e.splice(r,1).length}(e,r.index)},add:function(e,r){var t=r.newRowData;e.push(t)},batchPush:function(e,r){r.pushArray.forEach((function(r){e.push(r)}))},setNewTarget:function(e,r){Mr(r.formData,r.nodePath,r.newTarget)}}[r];if(!a)throw new Error("错误 - 未知的操作:[".concat(r,"]"));var o=t,i=t;"add"===r?(o={newRowData:this.getNewFormDataRow()},i={newRowData:b()}):"batchPush"===r?i={pushArray:o.pushArray.map((function(e){return b()}))}:"setNewTarget"===r&&(o={formData:this.rootFormData,nodePath:this.curNodePath,newTarget:o.newTarget},i={formData:this.$data,nodePath:"formKeys",newTarget:o.newTarget.map((function(e){return b()}))}),a.apply(this,[this.$data.formKeys,i]),a.apply(this,[this.curFormData,o])}},render:function(e){var r=this.$props,a=r.schema,o=r.uiSchema,n=r.rootSchema,l=r.rootFormData,c=r.curNodePath,u=r.globalOptions;if(!a.hasOwnProperty("items"))throw new Error("[".concat(a,"] 请先定义 items属性"));if(st(a,n))return e(Zt,{props:this.$props,class:t({},w(Zt.name),!0)});if(a.format||a["ui:widget"]||o["ui:widget"])return e(Xt,{props:this.$props,class:t({},w(Xt.name),!0)});var d=nt(a)?Yt:Jt;return e("div",[e(d,{props:i({itemsFormData:this.itemsFormData},this.$props),class:t({},w(d.name),!0),on:{onArrayOperate:this.handleArrayOperate}}),this.needValidFieldGroup?e(Mt,{key:"validateWidget-array",class:{validateWidget:!0,"validateWidget-array":!0},props:{schema:Object.entries(this.$props.schema).reduce((function(e,r){var t=s(r,2),a=t[0],o=t[1];return"items"!==a&&(e[a]=o),e}),{}),uiSchema:o,errorSchema:this.errorSchema,curNodePath:c,rootFormData:l,globalOptions:u}}):null])}},ra={name:"SelectLinkageField",props:i(i({},It),{},{combiningType:{type:String,default:"anyOf"},selectList:{type:Array,require:!0}}),data:function(){return{curSelectIndex:this.computedCurSelectIndexByFormData(Br(this.rootFormData,this.curNodePath))}},methods:{computedCurSelectIndexByFormData:function(e){var r=Pt(e,this.selectList,this.rootSchema,!0);return 0!==r?r:this.curSelectIndex||0},getSelectBoxVNode:function(){var e=this,r=et({schema:this.schema["".concat(this.combiningType,"Select")]||{},uiSchema:this.uiSchema["".concat(this.combiningType,"Select")]||{},curNodePath:this.curNodePath,rootFormData:this.rootFormData},(function(){return{widget:"SelectWidget"}}));if(r.label=r.label||this.schema.title,r.description=r.description||this.schema.description,!r.uiProps.enumOptions){var a=this.uiSchema[this.combiningType]||[];r.uiProps.enumOptions=this.selectList.map((function(e,r){return{label:Xr({schema:e,uiSchema:a[r],containsSpec:!1}).title||"选项 ".concat(r+1),value:r}}))}return this.$createElement(Mt,{key:"fieldSelect_".concat(this.combiningType),class:t({},"fieldSelect_".concat(this.combiningType),!0),props:i({isFormData:!1,curValue:this.curSelectIndex,globalOptions:this.globalOptions},r),on:{onChange:function(r){e.curSelectIndex=r}}})}},watch:{curSelectIndex:function(e,r){var t=Br(this.rootFormData,this.curNodePath),a=Ft(this.selectList[e],void 0,this.rootSchema),o=Object.prototype.hasOwnProperty;if(p(t)){var i=Tr(this.selectList[r],this.rootSchema);if("object"===f(i))for(var n in i.properties)o.call(i.properties,n)&&!o.call(a,n)&&Wr(t,n)}p(a)?Object.entries(a).forEach((function(e){var r=s(e,2),a=r[0],o=r[1];void 0!==o&&Mr(t,a,o)})):Mr(this.rootFormData,this.curNodePath,a||t)}},render:function(e){var r,a=this,o=this.$props.curNodePath,s=zr(o),l=null;if(("object"===this.schema.type||this.schema.properties)&&!function(e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!1;return!0}(this.schema.properties)){var c,u=Object.assign({},this.schema);delete u[this.combiningType],l=e(aa,{key:"origin_".concat(this.combiningType),class:(c={},t(c,"".concat(this.combiningType,"_originBox"),!0),t(c,"".concat(s,"-originBox"),!0),c),props:i(i({},this.$props),{},{schema:u})})}var p=[this.getSelectBoxVNode()],h=this.selectList[this.curSelectIndex];if(h){var m=this.schema,f=this.combiningType,v="".concat(this.combiningType,"Select");m.properties,m[f],m[v];var g=n(m,["properties",f,v].map(d));h=Object.assign({},g,h);var y=P(Xr({schema:this.schema,uiSchema:this.uiSchema,containsSpec:!1,curNodePath:o,rootFormData:this.rootFormData}),(function(e){return e===a.combiningType?void 0:"ui:".concat(e)})),b=P(rt({schema:this.schema,uiSchema:this.uiSchema,errorSchema:this.errorSchema}),(function(e){return e===a.combiningType?void 0:"err:".concat(e)}));p.push(e(aa,{key:"appendSchema_".concat(this.combiningType),props:i(i({},this.$props),{},{schema:i({"ui:showTitle":!1,"ui:showDescription":!1},h),required:this.required,uiSchema:i(i({},y),(this.uiSchema[this.combiningType]||[])[this.curSelectIndex]),errorSchema:i(i({},b),(this.errorSchema[this.combiningType]||[])[this.curSelectIndex])})}))}return p.push(e(Mt,{key:"validateWidget-".concat(this.combiningType),class:t({validateWidget:!0},"validateWidget-".concat(this.combiningType),!0),props:{schema:this.schema,uiSchema:this.uiSchema,errorSchema:this.errorSchema,curNodePath:this.curNodePath,rootFormData:this.rootFormData,globalOptions:this.globalOptions}})),e("div",[l,e("div",{key:"appendBox_".concat(this.combiningType),class:(r={appendCombining_box:!0},t(r,"".concat(this.combiningType,"_appendBox"),!0),t(r,"".concat(s,"-appendBox"),!0),r)},p)])}},ta={array:ea,boolean:Kt,integer:Ht,number:Ut,object:Bt,string:Qt,null:{render:function(){return null}},anyOf:{name:"AnyOfField",functional:!0,render:function(e,r){var t=r.data,a=t.props,o=n(t,["props"]);return e(ra,i(i({},o),{},{props:i(i({},a),{},{combiningType:"anyOf",selectList:a.schema.anyOf})}),r.children)}},oneOf:{name:"oneOfField",functional:!0,render:function(e,r){var t=r.data,a=t.props,o=n(t,["props"]);return e(ra,i(i({},o),{},{props:i(i({},a),{},{combiningType:"oneOf",selectList:a.schema.oneOf})}),r.children)}}},aa={name:"SchemaField",props:It,functional:!0,render:function(e,r){var a,o=r.props,n=o.rootSchema,s=Tr(o.schema,n),l=i(i({},o),{},{schema:s});if(0===Object.keys(s).length)return null;var c,u,d=Zr(ta,l),p=d.field,h=d.fieldProps,m=Jr({schema:s,uiSchema:o.uiSchema,curNodePath:o.curNodePath,rootFormData:o.rootFormData}),f=zr(o.curNodePath);return s.anyOf&&s.anyOf.length>0&&!it(s)?e(ta.anyOf,{class:(c={},t(c,"".concat(f,"-anyOf"),!0),t(c,"fieldItem",!0),t(c,"anyOfField",!0),c),props:l}):s.oneOf&&s.oneOf.length>0&&!it(s)?e(ta.oneOf,{class:(u={},t(u,"".concat(f,"-oneOf"),!0),t(u,"fieldItem",!0),t(u,"oneOfField",!0),u),props:l}):p&&!m?e(p,{props:i(i({},l),{},{fieldProps:h}),class:i(i({},r.data.class),{},(a={},t(a,w(p.name)||p,!0),t(a,"hiddenWidget",m),t(a,"fieldItem",!0),t(a,f,!0),a))}):null}};var oa={name:"CheckboxesWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}},ia=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("checkbox-group",e._g(e._b({},"checkbox-group",e.$attrs,!1),e.$listeners),e._l(e.enumOptions,(function(r,a){return t("checkbox",{key:a,attrs:{label:r.value}},[e._v("\n "+e._s(r.label)+"\n ")])})),1)};ia._withStripped=!0;var na=Dt({render:ia,staticRenderFns:[]},void 0,oa,void 0,!1,void 0,!1,void 0,void 0,void 0),sa={name:"RadioWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}},la=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("radio-group",e._g(e._b({},"radio-group",e.$attrs,!1),e.$listeners),e._l(e.enumOptions,(function(r,a){return t("radio",{key:a,attrs:{label:r.value}},[e._v("\n "+e._s(r.label)+"\n ")])})),1)};la._withStripped=!0;var ca=Dt({render:la,staticRenderFns:[]},void 0,sa,void 0,!1,void 0,!1,void 0,void 0,void 0),ua={name:"SelectWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}},da=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("i-select",e._g(e._b({},"i-select",e.$attrs,!1),e.$listeners),e._l(e.enumOptions,(function(r,a){return t("i-option",{key:a,attrs:{value:r.value}},[e._v("\n "+e._s(r.label)+"\n ")])})),1)};da._withStripped=!0;var pa=function(e){return"0".concat(e).substr(-2)};function ha(e,r){if(!e)return"";var t=new Date(e);if(r)return t.toISOString();var a={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()},o=a.month,i=a.day;return"".concat(a.year,"-").concat(pa(o),"-").concat(pa(i))}var ma=function(e){return Array.isArray(e)?e.map((function(r){return e&&new Date(r)})):e&&new Date(e)};function fa(e){return null===e||""===e||Array.isArray(e)&&e.every((function(e){return""===e}))}var va={name:"DatePickerWidget",props:{value:{type:null},isNumberValue:{type:Boolean,default:!1},isDatetime:{type:Boolean,default:!1},isRange:{type:Boolean,default:!1}},data:function(){return{originValue:ma(this.value),formatValue:this.formatDate(this.value)}},watch:{value:function(e){e===this.formatValue||(this.originValue=ma(e))}},computed:{type:function(){return this.isDatetime?this.isRange?"datetimerange":"datetime":this.isRange?"daterange":"date"}},methods:{formatDate:function(e){var r=this.$props,t=r.isRange,a=r.isNumberValue,o=r.isDatetime;return t?fa(e)?[]:e.map((function(e){return a?new Date(e).valueOf():ha(e,o)})):fa(e)?void 0:a?new Date(e).valueOf():ha(e,o)}},render:function(e){var r=this;return e("date-picker",{attrs:i({type:this.type,value:this.originValue},this.$attrs),on:i(i({},this.$listeners),{},{input:function(e){r.originValue=e,r.formatValue=r.formatDate(e),r.$emit("input",r.formatValue)}})})}},ga={CheckboxesWidget:na,RadioWidget:ca,SelectWidget:Dt({render:da,staticRenderFns:[]},void 0,ua,void 0,!1,void 0,!1,void 0,void 0,void 0),TimePickerWidget:{name:"TimePickerWidget",functional:!0,render:function(e,r){var t=r.data.on.input;return r.data.on=i(i({},r.data.on),{},{input:function(e){t.apply(r.data.on,[null===e?void 0:e])}}),e("time-picker",r.data,r.children)}},DatePickerWidget:va,DateTimePickerWidget:{name:"DateTimePickerWidget",functional:!0,render:function(e,r){return r.data.attrs.isDatetime=!0,e(va,r.data,r.children)}},UploadWidget:{name:"UploadWidget",props:{value:{default:null,type:[String,Array]},responseFileUrl:{default:function(e){return e?e.url||e.data&&e.data.url:""},type:[Function]},btnText:{type:String,default:"点击上传"},slots:{type:null,default:null}},data:function(){var e=this.value,r=Array.isArray(e),t=this.$attrs.fileList||(r?e.map((function(e,r){return{name:"已上传文件(".concat(r+1,")"),url:e}})):e?[{name:"已上传文件",url:e}]:[]);return{isArrayValue:r,fileList:t}},methods:{getUrl:function(e){return e&&(e.response&&this.responseFileUrl(e.response)||e.url)||""},emitValue:function(e){var r,t=this;if(this.isArrayValue)r=e.length?e.reduce((function(e,r){var a=t.getUrl(r);return a&&e.push(a),e}),[]):[];else{var a=e[e.length-1];r=this.getUrl(a)}this.$emit("input",r)}},render:function(){var e=this,r=this.$createElement,t=this.$attrs,a=this.$props.slots,o={attrs:i(i({defaultFileList:this.fileList,"on-error":function(){e.$message&&e.$message.error("文件上传失败")},"on-preview":function(r){var t=e.getUrl(r);t&&function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_blank",t=document.createElement("a");t.style.display="none",t.target=r,t.href=e,document.body.appendChild(t),t.click(),document.body.removeChild(t)}(t)}},t),{},{"on-remove":function(r,a){e.emitValue(a),t["on-remove"]&&t["on-remove"](r,a)},"on-success":function(r,a,o){e.emitValue(o),t["on-success"]&&t["on-success"](r,a,o)}})};this.isArrayValue||(o.attrs.limit=1);var n=[];return a&&a.default?n.push(r("template",{slot:"default"},["function"==typeof a.default?a.default(r):a.default])):n.push(r("i-button",{props:{type:"primary"}},[this.btnText])),a&&a.tip&&n.push(r("template",{slot:"tip"},["function"==typeof a.tip?a.tip(r):a.tip])),r("upload",o,n)}},SwitchWidget:{name:"SwitchWidget",functional:!0,render:function(e,r){var t=r.props,a=t.activeText,o=t.inactiveText,i=Object.entries({open:a,close:o}).reduce((function(r,t){var a=s(t,2),o=a[0],i=a[1];return void 0!==i&&r.push(e("span",{slot:o},[i])),r}),[]);return e("i-switch",r.data,i)}},InputNumberWidget:{name:"SwitchWidget",functional:!0,render:function(e,r){return void 0===r.data.attrs.value&&(r.data.attrs.value=null),e("input-number",r.data,r.children)}}},ya=ga.InputNumberWidget,ba={types:{boolean:ga.SwitchWidget,string:"i-input",number:ya,integer:ya},formats:{color:"color-picker",time:ga.TimePickerWidget,date:ga.DatePickerWidget,"date-time":ga.DateTimePickerWidget},common:{select:ga.SelectWidget,radioGroup:ga.RadioWidget,checkboxGroup:ga.CheckboxesWidget},widgetComponents:ga};xt(".genFromComponent.ivu-form-label-top .ivu-form-item-label{line-height:26px;padding-bottom:6px}.genFromComponent .ivu-form-item-error-tip{padding-top:2px;position:absolute;display:-webkit-box!important;text-overflow:ellipsis;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;text-align:left;line-height:1.2}.genFromComponent .validateWidget .ivu-form-item-error-tip{padding:5px 0;position:relative}");var Pa=Object.freeze({WIDGET_MAP:Object.freeze(ba),COMPONENT_MAP:Object.freeze({form:{functional:!0,render:function(e,r){return r.data.props=i(i({},r.data.props),{},{labelWidth:"top"!==r.data.props.labelPosition&&r.data.props.labelWidth?parseFloat(String(r.data.props.labelWidth)):void 0}),e("i-form",r.data,r.children)}},formItem:{functional:!0,render:function(e,r){return r.data.props=i(i({},r.data.props),{},{labelWidth:r.data.props&&r.data.props.labelWidth?parseFloat(String(r.data.props.labelWidth)):void 0}),e("form-item",r.data,Object.entries(r.slots()).map((function(r){var t=s(r,2),a=t[0],o=t[1];return e("template",{slot:a},o)})))}},button:"i-button",popover:{functional:!0,render:function(e,r){var t=r.slots(),a=t.default,o=t.reference;return e("poptip",r.data,[e("template",{slot:"default"},o),e("template",{slot:"content"},a)])}}}),HELPERS:{isMiniDes:function(e){return e&&["left","right"].includes(e.labelPosition)}}}),wa=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r.WIDGET_MAP.widgetComponents&&Object.entries(r.WIDGET_MAP.widgetComponents).forEach((function(r){var t=s(r,2),a=t[0],o=t[1];return e.component(a,o)})),{name:"VueForm",props:Ot,provide:function(){return{genFormProvide:this.genFormProvide}},data:function(){var e=Ft(this.$props.schema,this.$props.value,this.$props.schema);return this.emitFormDataChange(e,this.value),{formData:e}},computed:{genFormProvide:function(){return{fallbackLabel:this.fallbackLabel}},footerParams:function(){return i({show:!0,okBtn:"保存",cancelBtn:"取消"},this.formFooter)}},watch:{formData:{handler:function(e,r){this.emitFormDataChange(e,r)},deep:!0},schema:function(e,r){this.willReceiveProps(e,r)},value:function(e,r){this.willReceiveProps(e,r)}},methods:{emitFormDataChange:function(e,r){this.$emit("input",e),this.$emit("on-change",{newValue:e,oldValue:r})},willReceiveProps:function(e,r){if(!v(e,r)){var t=Ft(this.$props.schema,this.$props.value,this.$props.schema);v(this.formData,t)||(this.formData=t)}}},mounted:function(){this.$emit("on-form-mounted",this.$refs.genEditForm)},render:function(e){var a,o=this,s=this.$scopedSlots.default?this.$scopedSlots.default({formData:o.formData,formRefFn:function(){return o.$refs.genEditForm}}):this.footerParams.show?e(_t,{props:{globalOptions:r,okBtn:o.footerParams.okBtn,cancelBtn:o.footerParams.cancelBtn,formItemAttrs:o.footerParams.formItemAttrs},on:{onCancel:function(){o.$emit("on-cancel")},onSubmit:function(){o.$refs.genEditForm.validate((function(e,r){return e?o.$emit("on-submit",o.formData):o.$emit("on-validation-failed",r)}))}}}):void 0,l=o.$props.formProps,c=l.layoutColumn,u=void 0===c?1:c,d=l.inlineFooter,p=l.inline,h=n(l,["layoutColumn","inlineFooter","inline"]),m={schema:this.schema,uiSchema:this.uiSchema,errorSchema:this.errorSchema,customFormats:this.customFormats,customRule:this.customRule,rootSchema:this.schema,rootFormData:this.formData,curNodePath:"",globalOptions:r,formProps:i({labelPosition:"top",labelSuffix:":"},h)};return e(r.COMPONENT_MAP.form,{class:(a={genFromComponent:!0,formInlineFooter:d,formInline:p},t(a,"genFromComponent_".concat(this.schema.id,"Form"),!!this.schema.id),t(a,"layoutColumn",!p),t(a,"layoutColumn-".concat(u),!p),a),ref:"genEditForm",props:i({model:o.formData},m.formProps)},[e(aa,{props:m}),s])}}}(Pa);"undefined"!=typeof window&&window.Vue&&window.Vue.component("VueFormIview3",wa);export default wa;export{aa as SchemaField,It as fieldProps,dt as formUtils,Ft as getDefaultFormState,Pa as globalOptions,jr as i18n,wt as schemaValidate,Ur as vueUtils}; diff --git a/packages/lib/vue2/vue2-form-iview3/dist/vue2-form-iview3.umd.js b/packages/lib/vue2/vue2-form-iview3/dist/vue2-form-iview3.umd.js index ae2dbe9c..497f390e 100644 --- a/packages/lib/vue2/vue2-form-iview3/dist/vue2-form-iview3.umd.js +++ b/packages/lib/vue2/vue2-form-iview3/dist/vue2-form-iview3.umd.js @@ -10324,7 +10324,12 @@ self.value = formatValue.value; if (self.onChange) { - self.onChange(formatValue.value, preVal); + self.onChange({ + curVal: formatValue.value, + preVal: preVal, + parentFormData: getPathVal$1(self.rootFormData, self.curNodePath, 1), + rootFormData: self.rootFormData + }); } } } diff --git a/packages/lib/vue2/vue2-form-iview3/dist/vue2-form-iview3.umd.min.js b/packages/lib/vue2/vue2-form-iview3/dist/vue2-form-iview3.umd.min.js index bac9d0fb..8fc0dabf 100644 --- a/packages/lib/vue2/vue2-form-iview3/dist/vue2-form-iview3.umd.min.js +++ b/packages/lib/vue2/vue2-form-iview3/dist/vue2-form-iview3.umd.min.js @@ -1,4 +1,4 @@ /** @license @lljj/vue2-form-iview3 (c) 2020-2021 Liu.Jun License: Apache-2.0 */ !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).vue2FormIview3={},e.Vue)}(this,(function(e,r){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=t(r);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function n(){return(n=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e}).apply(this,arguments)}function s(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function l(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?s(Object(t),!0).forEach((function(r){i(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function c(e,r){if(null==e)return{};var t,a,o=function(e,r){if(null==e)return{};var t,a,o={},i=Object.keys(e);for(a=0;a<i.length;a++)t=i[a],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function u(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],a=!0,o=!1,i=void 0;try{for(var n,s=e[Symbol.iterator]();!(a=(n=s.next()).done)&&(t.push(n.value),!r||t.length!==r);a=!0);}catch(e){o=!0,i=e}finally{try{a||null==s.return||s.return()}finally{if(o)throw i}}return t}(e,r)||p(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,r){if(e){if("string"==typeof e)return h(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?h(e,r):void 0}}function h(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);t<r;t++)a[t]=e[t];return a}function m(e){var r=function(e,r){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var a=t.call(e,r||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:String(r)}function f(e){return"[object Object]"===Object.prototype.toString.call(e)}function v(e){return"[object Arguments]"===Object.prototype.toString.call(e)}function g(e,r){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=Object.assign({},e);return Object.keys(r).reduce((function(a,o){var i=e?e[o]:{},n=r[o];return e&&e.hasOwnProperty(o)&&f(n)?a[o]=g(i,n,t):t&&Array.isArray(i)&&Array.isArray(n)?a[o]=i.concat(n):a[o]=n,a}),a)}function y(e){var r,t=e.type;return!t&&e.const?(r=e.const,Array.isArray(r)?"array":"string"==typeof r?"string":null==r?"null":"boolean"==typeof r?"boolean":isNaN(r)?"object"===o(r)?"object":"string":"number"):!t&&e.enum?"string":!t&&e.items?"array":t||!e.properties&&!e.additionalProperties?t instanceof Array&&2===t.length&&t.includes("null")?t.find((function(e){return"null"!==e})):t:"object"}function b(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===r)return!0;if("function"==typeof e||"function"==typeof r)return!0;if("object"!==o(e)||"object"!==o(r))return!1;if(null===e||null===r)return!1;if(e instanceof Date&&r instanceof Date)return e.getTime()===r.getTime();if(e instanceof RegExp&&r instanceof RegExp)return e.source===r.source&&e.global===r.global&&e.multiline===r.multiline&&e.lastIndex===r.lastIndex&&e.ignoreCase===r.ignoreCase;if(v(e)||v(r)){if(!v(e)||!v(r))return!1;var i=Array.prototype.slice;return b(i.call(e),i.call(r),t,a)}if(e.constructor!==r.constructor)return!1;var n=Object.keys(e),s=Object.keys(r);if(0===n.length&&0===s.length)return!0;if(n.length!==s.length)return!1;for(var l,c=t.length;c--;)if(t[c]===e)return a[c]===r;t.push(e),a.push(r),n.sort(),s.sort();for(var u=n.length-1;u>=0;u--)if(n[u]!==s[u])return!1;for(var d=n.length-1;d>=0;d--)if(!b(e[l=n[d]],r[l],t,a))return!1;return t.pop(),a.pop(),!0}var P,w,E=(P="".concat(+new Date),w=0,function(){var e="".concat(+new Date);return e===P?w+=1:w=0,"".concat(P=e,"x").concat(w)});function S(e,r){return Object.entries(e).reduce((function(e,t){var a=u(t,2),o=a[0],i=a[1],n=r(o,i);return void 0!==n&&(e[n]=i),e}),{})}function F(e){return void 0===e?e:String(e).replace(/^./,(function(e){return e.toLocaleLowerCase()}))}function x(e,r){return e*r/function e(r,t){return 0===t?r:e(t,r%t)}(e,r)}function O(e,r){for(var t=r.split("/"),a=0;a<t.length;a+=1){if(void 0===e)return;e=""===t[a]?e:e[t[a]]}return e}function _(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e;if(!e.startsWith("#"))throw new Error("Could not find a definition for ".concat(t,"."));var a=O(r,e=decodeURIComponent(e.substring(1)));if(void 0===a)throw new Error("Could not find a definition for ".concat(t,"."));return a.hasOwnProperty("$ref")?_(a.$ref,r):a}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function D(e,r){return e(r={exports:{}},r.exports),r.exports}function $(e){return e&&e.default||e}var j,k=D((function(e,r){ /** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ -!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var a=r.length-1,o=1;o<a;++o)r[o]=r[o].slice(1,-1);return r[a]=r[a].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function a(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function i(e){var a=r("[0-9]","[A-Fa-f]"),o=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),i="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",n=r("[\\:\\/\\?\\#\\[\\]\\@]",i),s=e?"[\\uE000-\\uF8FF]":"[]",l=r("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t("[A-Za-z]"+r("[A-Za-z]","[0-9]","[\\+\\-\\.]")+"*"),t(t(o+"|"+r(l,i,"[\\:]"))+"*");var c=t(t("25[0-5]")+"|"+t("2[0-4][0-9]")+"|"+t("1[0-9][0-9]")+"|"+t("0?[1-9][0-9]")+"|0?0?[0-9]"),u=t(c+"\\."+c+"\\."+c+"\\."+c),d=t(a+"{1,4}"),p=t(t(d+"\\:"+d)+"|"+u),h=t(t(d+"\\:")+"{6}"+p),m=t("\\:\\:"+t(d+"\\:")+"{5}"+p),f=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+p),v=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+p),g=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+p),y=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+p),b=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+p),P=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),w=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),E=t([h,m,f,v,g,y,b,P,w].join("|")),S=t(t(l+"|"+o)+"+");t("[vV]"+a+"+\\."+r(l,i,"[\\:]")+"+"),t(t(o+"|"+r(l,i))+"*");var F=t(o+"|"+r(l,i,"[\\:\\@]"));return t(t(o+"|"+r(l,i,"[\\@]"))+"+"),t(t(F+"|"+r("[\\/\\?]",s))+"*"),{NOT_SCHEME:new RegExp(r("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,i),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,i),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,i),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,i),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,i,"[\\:\\@\\/\\?]",s),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,i,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,i),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,n),"g"),PCT_ENCODED:new RegExp(o,"g"),IPV4ADDRESS:new RegExp("^("+u+")$"),IPV6ADDRESS:new RegExp("^\\[?("+E+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+S+")")+"?\\]?$")}}var n=i(!1),s=i(!0),l=function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,r){var t=[],a=!0,o=!1,i=void 0;try{for(var n,s=e[Symbol.iterator]();!(a=(n=s.next()).done)&&(t.push(n.value),!r||t.length!==r);a=!0);}catch(e){o=!0,i=e}finally{try{!a&&s.return&&s.return()}finally{if(o)throw i}}return t}(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=2147483647,u=/^xn--/,d=/[^\0-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,f=String.fromCharCode;function v(e){throw new RangeError(h[e])}function g(e,r){var t=e.split("@"),a="";t.length>1&&(a=t[0]+"@",e=t[1]);var o=function(e,r){for(var t=[],a=e.length;a--;)t[a]=r(e[a]);return t}((e=e.replace(p,".")).split("."),r).join(".");return a+o}function y(e){for(var r=[],t=0,a=e.length;t<a;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<a){var i=e.charCodeAt(t++);56320==(64512&i)?r.push(((1023&o)<<10)+(1023&i)+65536):(r.push(o),t--)}else r.push(o)}return r}var b=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},P=function(e,r,t){var a=0;for(e=t?m(e/700):e>>1,e+=m(e/r);e>455;a+=36)e=m(e/35);return m(a+36*e/(e+38))},w=function(e){var r,t=[],a=e.length,o=0,i=128,n=72,s=e.lastIndexOf("-");s<0&&(s=0);for(var l=0;l<s;++l)e.charCodeAt(l)>=128&&v("not-basic"),t.push(e.charCodeAt(l));for(var u=s>0?s+1:0;u<a;){for(var d=o,p=1,h=36;;h+=36){u>=a&&v("invalid-input");var f=(r=e.charCodeAt(u++))-48<10?r-22:r-65<26?r-65:r-97<26?r-97:36;(f>=36||f>m((c-o)/p))&&v("overflow"),o+=f*p;var g=h<=n?1:h>=n+26?26:h-n;if(f<g)break;var y=36-g;p>m(c/y)&&v("overflow"),p*=y}var b=t.length+1;n=P(o-d,b,0==d),m(o/b)>c-i&&v("overflow"),i+=m(o/b),o%=b,t.splice(o++,0,i)}return String.fromCodePoint.apply(String,t)},E=function(e){var r=[],t=(e=y(e)).length,a=128,o=0,i=72,n=!0,s=!1,l=void 0;try{for(var u,d=e[Symbol.iterator]();!(n=(u=d.next()).done);n=!0){var p=u.value;p<128&&r.push(f(p))}}catch(e){s=!0,l=e}finally{try{!n&&d.return&&d.return()}finally{if(s)throw l}}var h=r.length,g=h;for(h&&r.push("-");g<t;){var w=c,E=!0,S=!1,F=void 0;try{for(var x,O=e[Symbol.iterator]();!(E=(x=O.next()).done);E=!0){var _=x.value;_>=a&&_<w&&(w=_)}}catch(e){S=!0,F=e}finally{try{!E&&O.return&&O.return()}finally{if(S)throw F}}var D=g+1;w-a>m((c-o)/D)&&v("overflow"),o+=(w-a)*D,a=w;var $=!0,j=!1,k=void 0;try{for(var I,A=e[Symbol.iterator]();!($=(I=A.next()).done);$=!0){var C=I.value;if(C<a&&++o>c&&v("overflow"),C==a){for(var R=o,N=36;;N+=36){var L=N<=i?1:N>=i+26?26:N-i;if(R<L)break;var T=R-L,z=36-L;r.push(f(b(L+T%z,0))),R=m(T/z)}r.push(f(b(R,0))),i=P(o,D,g==h),o=0,++g}}}catch(e){j=!0,k=e}finally{try{!$&&A.return&&A.return()}finally{if(j)throw k}}++o,++a}return r.join("")},S=function(e){return g(e,(function(e){return d.test(e)?"xn--"+E(e):e}))},F=function(e){return g(e,(function(e){return u.test(e)?w(e.slice(4).toLowerCase()):e}))},x={};function O(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function _(e){for(var r="",t=0,a=e.length;t<a;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(a-t>=6){var i=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&i)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(a-t>=9){var n=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&n)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function D(e,r){function t(e){var t=_(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,O).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,O).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,O).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,O).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,O).replace(r.PCT_ENCODED,o)),e}function $(e){return e.replace(/^0*(.*)/,"$1")||"0"}function j(e,r){var t=e.match(r.IPV4ADDRESS)||[],a=l(t,2)[1];return a?a.split(".").map($).join("."):e}function k(e,r){var t=e.match(r.IPV6ADDRESS)||[],a=l(t,3),o=a[1],i=a[2];if(o){for(var n=o.toLowerCase().split("::").reverse(),s=l(n,2),c=s[0],u=s[1],d=u?u.split(":").map($):[],p=c.split(":").map($),h=r.IPV4ADDRESS.test(p[p.length-1]),m=h?7:8,f=p.length-m,v=Array(m),g=0;g<m;++g)v[g]=d[g]||p[f+g]||"";h&&(v[m-1]=j(v[m-1],r));var y=v.reduce((function(e,r,t){if(!r||"0"===r){var a=e[e.length-1];a&&a.index+a.length===t?a.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(y&&y.length>1){var P=v.slice(0,y.index),w=v.slice(y.index+y.length);b=P.join(":")+"::"+w.join(":")}else b=v.join(":");return i&&(b+="%"+i),b}return e}var I=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,A=void 0==="".match(/(){0}/)[1];function C(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},a=!1!==r.iri?s:n;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(I);if(o){A?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=k(j(t.host,a),a)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var i=x[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||i&&i.unicodeSupport)D(t,a);else{if(t.host&&(r.domainHost||i&&i.domainHost))try{t.host=S(t.host.replace(a.PCT_ENCODED,_).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}D(t,n)}i&&i.parse&&i.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function R(e,r){var t=!1!==r.iri?s:n,a=[];return void 0!==e.userinfo&&(a.push(e.userinfo),a.push("@")),void 0!==e.host&&a.push(k(j(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(a.push(":"),a.push(String(e.port))),a.length?a.join(""):void 0}var N=/^\.\.?\//,L=/^\/\.(\/|$)/,T=/^\/\.\.(\/|$)/,z=/^\/?(?:.|\n)*?(?=\/|$)/;function q(e){for(var r=[];e.length;)if(e.match(N))e=e.replace(N,"");else if(e.match(L))e=e.replace(L,"/");else if(e.match(T))e=e.replace(T,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(z);if(!t)throw new Error("Unexpected dot segment condition");var a=t[0];e=e.slice(a.length),r.push(a)}return r.join("")}function V(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?s:n,a=[],o=x[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?F(e.host):S(e.host.replace(t.PCT_ENCODED,_).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}D(e,t),"suffix"!==r.reference&&e.scheme&&(a.push(e.scheme),a.push(":"));var i=R(e,r);if(void 0!==i&&("suffix"!==r.reference&&a.push("//"),a.push(i),e.path&&"/"!==e.path.charAt(0)&&a.push("/")),void 0!==e.path){var l=e.path;r.absolutePath||o&&o.absolutePath||(l=q(l)),void 0===i&&(l=l.replace(/^\/\//,"/%2F")),a.push(l)}return void 0!==e.query&&(a.push("?"),a.push(e.query)),void 0!==e.fragment&&(a.push("#"),a.push(e.fragment)),a.join("")}function W(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],o={};return a||(e=C(V(e,t),t),r=C(V(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=q(r.path||""),o.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=q(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=q(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=q(o.path)),o.query=r.query):(o.path=e.path,void 0!==r.query?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function M(e,r){return e&&e.toString().replace(r&&r.iri?s.PCT_ENCODED:n.PCT_ENCODED,_)}var B={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},U={scheme:"https",domainHost:B.domainHost,parse:B.parse,serialize:B.serialize};function Q(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var H={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=Q(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(Q(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),a=l(t,2),o=a[0],i=a[1];e.path=o&&"/"!==o?o:void 0,e.query=i,e.resourceName=void 0}return e.fragment=void 0,e}},K={scheme:"wss",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize},G={},J="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Z="[0-9A-Fa-f]",Y=t(t("%[EFef]"+Z+"%"+Z+Z+"%"+Z+Z)+"|"+t("%[89A-Fa-f]"+Z+"%"+Z+Z)+"|"+t("%"+Z+Z)),X=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),ee=new RegExp(J,"g"),re=new RegExp(Y,"g"),te=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',X),"g"),ae=new RegExp(r("[^]",J,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),oe=ae;function ie(e){var r=_(e);return r.match(ee)?r:e}var ne={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,i={},n=t.query.split("&"),s=0,l=n.length;s<l;++s){var c=n[s].split("=");switch(c[0]){case"to":for(var u=c[1].split(","),d=0,p=u.length;d<p;++d)a.push(u[d]);break;case"subject":t.subject=M(c[1],r);break;case"body":t.body=M(c[1],r);break;default:o=!0,i[M(c[0],r)]=M(c[1],r)}}o&&(t.headers=i)}t.query=void 0;for(var h=0,m=a.length;h<m;++h){var f=a[h].split("@");if(f[0]=M(f[0]),r.unicodeSupport)f[1]=M(f[1],r).toLowerCase();else try{f[1]=S(M(f[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}a[h]=f.join("@")}return t},serialize:function(e,r){var t,a=e,i=null!=(t=e.to)?t instanceof Array?t:"number"!=typeof t.length||t.split||t.setInterval||t.call?[t]:Array.prototype.slice.call(t):[];if(i){for(var n=0,s=i.length;n<s;++n){var l=String(i[n]),c=l.lastIndexOf("@"),u=l.slice(0,c).replace(re,ie).replace(re,o).replace(te,O),d=l.slice(c+1);try{d=r.iri?F(d):S(M(d,r).toLowerCase())}catch(e){a.error=a.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}i[n]=u+"@"+d}a.path=i.join(",")}var p=e.headers=e.headers||{};e.subject&&(p.subject=e.subject),e.body&&(p.body=e.body);var h=[];for(var m in p)p[m]!==G[m]&&h.push(m.replace(re,ie).replace(re,o).replace(ae,O)+"="+p[m].replace(re,ie).replace(re,o).replace(oe,O));return h.length&&(a.query=h.join("&")),a}},se=/^([^\:]+)\:(.*)/,le={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(se),a=e;if(t){var o=r.scheme||a.scheme||"urn",i=t[1].toLowerCase(),n=t[2],s=o+":"+(r.nid||i),l=x[s];a.nid=i,a.nss=n,a.path=void 0,l&&(a=l.parse(a,r))}else a.error=a.error||"URN can not be parsed.";return a},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",a=e.nid,o=t+":"+(r.nid||a),i=x[o];i&&(e=i.serialize(e,r));var n=e,s=e.nss;return n.path=(a||r.nid)+":"+s,n}},ce=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ue={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match(ce)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};x[B.scheme]=B,x[U.scheme]=U,x[H.scheme]=H,x[K.scheme]=K,x[ne.scheme]=ne,x[le.scheme]=le,x[ue.scheme]=ue,e.SCHEMES=x,e.pctEncChar=O,e.pctDecChars=_,e.parse=C,e.removeDotSegments=q,e.serialize=V,e.resolveComponents=W,e.resolve=function(e,r,t){var a=function(e,r){var t=e;if(r)for(var a in r)t[a]=r[a];return t}({scheme:"null"},t);return V(W(C(e,a),C(r,a),a,!0),a)},e.normalize=function(e,r){return"string"==typeof e?e=V(C(e,r),r):"object"===a(e)&&(e=C(V(e,r),r)),e},e.equal=function(e,r,t){return"string"==typeof e?e=V(C(e,t),t):"object"===a(e)&&(e=V(e,t)),"string"==typeof r?r=V(C(r,t),t):"object"===a(r)&&(r=V(r,t)),e===r},e.escapeComponent=function(e,r){return e&&e.toString().replace(r&&r.iri?s.ESCAPE:n.ESCAPE,O)},e.unescapeComponent=M,Object.defineProperty(e,"__esModule",{value:!0})}(r)}));(j=k)&&j.__esModule&&Object.prototype.hasOwnProperty.call(j,"default")&&j.default;var I=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 a,o,i;if(Array.isArray(r)){if((a=r.length)!=t.length)return!1;for(o=a;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((a=(i=Object.keys(r)).length)!==Object.keys(t).length)return!1;for(o=a;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,i[o]))return!1;for(o=a;0!=o--;){var n=i[o];if(!e(r[n],t[n]))return!1}return!0}return r!=r&&t!=t},A={copy:function(e,r){for(var t in r=r||{},e)r[t]=e[t];return r},checkDataType:C,checkDataTypes:function(e,r,t){switch(e.length){case 1:return C(e[0],r,t,!0);default:var a="",o=N(e);for(var i in o.array&&o.object&&(a=o.null?"(":"(!"+r+" || ",a+="typeof "+r+' !== "object")',delete o.null,delete o.array,delete o.object),o.number&&delete o.integer,o)a+=(a?" && ":"")+C(i,r,t,!0);return a}},coerceToTypes:function(e,r){if(Array.isArray(r)){for(var t=[],a=0;a<r.length;a++){var o=r[a];(R[o]||"array"===e&&"array"===o)&&(t[t.length]=o)}if(t.length)return t}else{if(R[r])return[r];if("array"===e&&"array"===r)return["array"]}},toHash:N,getProperty:z,escapeQuotes:q,equal:I,ucs2length:function(e){for(var r,t=0,a=e.length,o=0;o<a;)t++,(r=e.charCodeAt(o++))>=55296&&r<=56319&&o<a&&56320==(64512&(r=e.charCodeAt(o)))&&o++;return t},varOccurences:function(e,r){r+="[^0-9]";var t=e.match(new RegExp(r,"g"));return t?t.length:0},varReplace:function(e,r,t){return r+="([^0-9])",t=t.replace(/\$/g,"$$$$"),e.replace(new RegExp(r,"g"),t+"$1")},schemaHasRules:function(e,r){if("boolean"==typeof e)return!e;for(var t in e)if(r[t])return!0},schemaHasRulesExcept:function(e,r,t){if("boolean"==typeof e)return!e&&"not"!=t;for(var a in e)if(a!=t&&r[a])return!0},schemaUnknownRules:function(e,r){if("boolean"==typeof e)return;for(var t in e)if(!r[t])return t},toQuotedString:V,getPathExpr:function(e,r,t,a){return B(e,t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'")},getPath:function(e,r,t){var a=V(t?"/"+U(r):z(r));return B(e,a)},getData:function(e,r,t){var a,o,i,n;if(""===e)return"rootData";if("/"==e[0]){if(!W.test(e))throw new Error("Invalid JSON-pointer: "+e);o=e,i="rootData"}else{if(!(n=e.match(M)))throw new Error("Invalid JSON-pointer: "+e);if(a=+n[1],"#"==(o=n[2])){if(a>=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(i="data"+(r-a||""),!o)return i}for(var s=i,l=o.split("/"),c=0;c<l.length;c++){var u=l[c];u&&(i+=z(Q(u)),s+=" && "+i)}return s},unescapeFragment:function(e){return Q(decodeURIComponent(e))},unescapeJsonPointer:Q,escapeFragment:function(e){return encodeURIComponent(U(e))},escapeJsonPointer:U};function C(e,r,t,a){var o=a?" !== ":" === ",i=a?" || ":" && ",n=a?"!":"",s=a?"":"!";switch(e){case"null":return r+o+"null";case"array":return n+"Array.isArray("+r+")";case"object":return"("+n+r+i+"typeof "+r+o+'"object"'+i+s+"Array.isArray("+r+"))";case"integer":return"(typeof "+r+o+'"number"'+i+s+"("+r+" % 1)"+i+r+o+r+(t?i+n+"isFinite("+r+")":"")+")";case"number":return"(typeof "+r+o+'"'+e+'"'+(t?i+n+"isFinite("+r+")":"")+")";default:return"typeof "+r+o+'"'+e+'"'}}var R=N(["string","number","integer","boolean","null"]);function N(e){for(var r={},t=0;t<e.length;t++)r[e[t]]=!0;return r}var L=/^[a-z$_][a-z$_0-9]*$/i,T=/'|\\/g;function z(e){return"number"==typeof e?"["+e+"]":L.test(e)?"."+e:"['"+q(e)+"']"}function q(e){return e.replace(T,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function V(e){return"'"+q(e)+"'"}var W=/^\/(?:[^~]|~0|~1)*$/,M=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function B(e,r){return'""'==e?r:(e+" + "+r).replace(/([^\\])' \+ '/g,"$1")}function U(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Q(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}var H=function(e){A.copy(e,this)};var K=D((function(e){var r=e.exports=function(e,t,a){"function"==typeof t&&(a=t,t={}),function e(t,a,o,i,n,s,l,c,u,d){if(i&&"object"==typeof i&&!Array.isArray(i)){for(var p in a(i,n,s,l,c,u,d),i){var h=i[p];if(Array.isArray(h)){if(p in r.arrayKeywords)for(var m=0;m<h.length;m++)e(t,a,o,h[m],n+"/"+p+"/"+m,s,n,p,i,m)}else if(p in r.propsKeywords){if(h&&"object"==typeof h)for(var f in h)e(t,a,o,h[f],n+"/"+p+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),s,n,p,i,f)}else(p in r.keywords||t.allKeys&&!(p in r.skipKeywords))&&e(t,a,o,h,n+"/"+p,s,n,p,i)}o(i,n,s,l,c,u,d)}}(t,"function"==typeof(a=t.cb||a)?a:a.pre||function(){},a.post||function(){},e,"",e)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}})),G=J;function J(e,r,t){var a=this._refs[t];if("string"==typeof a){if(!this._refs[a])return J.call(this,e,r,a);a=this._refs[a]}if((a=a||this._schemas[t])instanceof H)return te(a.schema,this._opts.inlineRefs)?a.schema:a.validate||this._compile(a);var o,i,n,s=Z.call(this,r,t);return s&&(o=s.schema,r=s.root,n=s.baseId),o instanceof H?i=o.validate||e.call(this,o.schema,r,void 0,n):void 0!==o&&(i=te(o,this._opts.inlineRefs)?o:e.call(this,o,r,void 0,n)),i}function Z(e,r){var t=k.parse(r),a=oe(t),o=ae(this._getId(e.schema));if(0===Object.keys(e.schema).length||a!==o){var i=ne(a),n=this._refs[i];if("string"==typeof n)return Y.call(this,e,n,t);if(n instanceof H)n.validate||this._compile(n),e=n;else{if(!((n=this._schemas[i])instanceof H))return;if(n.validate||this._compile(n),i==ne(r))return{schema:n,root:e,baseId:o};e=n}if(!e.schema)return;o=ae(this._getId(e.schema))}return ee.call(this,t,o,e.schema,e)}function Y(e,r,t){var a=Z.call(this,e,r);if(a){var o=a.schema,i=a.baseId;e=a.root;var n=this._getId(o);return n&&(i=se(i,n)),ee.call(this,t,i,o,e)}}J.normalizeId=ne,J.fullPath=ae,J.url=se,J.ids=function(e){var r=ne(this._getId(e)),t={"":r},a={"":ae(r,!1)},o={},i=this;return K(e,{allKeys:!0},(function(e,r,n,s,l,c,u){if(""!==r){var d=i._getId(e),p=t[s],h=a[s]+"/"+l;if(void 0!==u&&(h+="/"+("number"==typeof u?u:A.escapeFragment(u))),"string"==typeof d){d=p=ne(p?k.resolve(p,d):d);var m=i._refs[d];if("string"==typeof m&&(m=i._refs[m]),m&&m.schema){if(!I(e,m.schema))throw new Error('id "'+d+'" resolves to more than one schema')}else if(d!=ne(h))if("#"==d[0]){if(o[d]&&!I(e,o[d]))throw new Error('id "'+d+'" resolves to more than one schema');o[d]=e}else i._refs[d]=h}t[r]=p,a[r]=h}})),o},J.inlineRef=te,J.schema=Z;var X=A.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function ee(e,r,t,a){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var o=e.fragment.split("/"),i=1;i<o.length;i++){var n=o[i];if(n){if(void 0===(t=t[n=A.unescapeFragment(n)]))break;var s;if(!X[n]&&((s=this._getId(t))&&(r=se(r,s)),t.$ref)){var l=se(r,t.$ref),c=Z.call(this,a,l);c&&(t=c.schema,a=c.root,r=c.baseId)}}}return void 0!==t&&t!==a.schema?{schema:t,root:a,baseId:r}:void 0}}var re=A.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function te(e,r){return!1!==r&&(void 0===r||!0===r?function e(r){var t;if(Array.isArray(r)){for(var a=0;a<r.length;a++)if("object"==typeof(t=r[a])&&!e(t))return!1}else for(var o in r){if("$ref"==o)return!1;if("object"==typeof(t=r[o])&&!e(t))return!1}return!0}(e):r?function e(r){var t,a=0;if(Array.isArray(r)){for(var o=0;o<r.length;o++)if("object"==typeof(t=r[o])&&(a+=e(t)),a==1/0)return 1/0}else for(var i in r){if("$ref"==i)return 1/0;if(re[i])a++;else if("object"==typeof(t=r[i])&&(a+=e(t)+1),a==1/0)return 1/0}return a}(e)<=r:void 0)}function ae(e,r){return!1!==r&&(e=ne(e)),oe(k.parse(e))}function oe(e){return k.serialize(e).split("#")[0]+"#"}var ie=/#\/?$/;function ne(e){return e?e.replace(ie,""):""}function se(e,r){return r=ne(r),k.resolve(e,r)}var le={Validation:ue((function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:ue(ce)};function ce(e,r,t){this.message=t||ce.message(e,r),this.missingRef=G.url(e,r),this.missingSchema=G.normalizeId(G.fullPath(this.missingRef))}function ue(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}ce.message=function(e,r){return"can't resolve reference "+r+" from id "+e};var de=function(e,r){r||(r={}),"function"==typeof r&&(r={cmp:r});var t="boolean"==typeof r.cycles&&r.cycles,a=r.cmp&&function(e){return function(r){return function(t,a){var o={key:t,value:r[t]},i={key:a,value:r[a]};return e(o,i)}}}(r.cmp),o=[];return function e(r){if(r&&r.toJSON&&"function"==typeof r.toJSON&&(r=r.toJSON()),void 0!==r){if("number"==typeof r)return isFinite(r)?""+r:"null";if("object"!=typeof r)return JSON.stringify(r);var i,n;if(Array.isArray(r)){for(n="[",i=0;i<r.length;i++)i&&(n+=","),n+=e(r[i])||"null";return n+"]"}if(null===r)return"null";if(-1!==o.indexOf(r)){if(t)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=o.push(r)-1,l=Object.keys(r).sort(a&&a(r));for(n="",i=0;i<l.length;i++){var c=l[i],u=e(r[c]);u&&(n&&(n+=","),n+=JSON.stringify(c)+":"+u)}return o.splice(s,1),"{"+n+"}"}}(e)},pe=function(e,r,t){var a="",o=!0===e.schema.$async,i=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),n=e.self._getId(e.schema);if(e.opts.strictKeywords){var s=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(s){var l="unknown keyword: "+s;if("log"!==e.opts.strictKeywords)throw new Error(l);e.logger.warn(l)}}if(e.isTop&&(a+=" var validate = ",o&&(e.async=!0,a+="async "),a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",n&&(e.opts.sourceCode||e.opts.processCode)&&(a+=" /*# sourceURL="+n+" */ ")),"boolean"==typeof e.schema||!i&&!e.schema.$ref){var c=e.level,u=e.dataLevel,d=e.schema["false schema"],p=e.schemaPath+e.util.getProperty("false schema"),h=e.errSchemaPath+"/false schema",m=!e.opts.allErrors,f="data"+(u||""),v="valid"+c;if(!1===e.schema){e.isTop?m=!0:a+=" var "+v+" = false; ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'boolean schema is false' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";var g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?a+=o?" return data; ":" validate.errors = null; return true; ":a+=" var "+v+" = true; ";return e.isTop&&(a+=" }; return validate; "),a}if(e.isTop){var y=e.isTop;c=e.level=0,u=e.dataLevel=0,f="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var b="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}a+=" var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data; "}else{c=e.level,f="data"+((u=e.dataLevel)||"");if(n&&(e.baseId=e.resolve.url(e.baseId,n)),o&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+c+" = errors;"}v="valid"+c,m=!e.opts.allErrors;var P="",w="",E=e.schema.type,S=Array.isArray(E);if(E&&e.opts.nullable&&!0===e.schema.nullable&&(S?-1==E.indexOf("null")&&(E=E.concat("null")):"null"!=E&&(E=[E,"null"],S=!0)),S&&1==E.length&&(E=E[0],S=!1),e.schema.$ref&&i){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(i=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(a+=" "+e.RULES.all.$comment.code(e,"$comment")),E){if(e.opts.coerceTypes)var F=e.util.coerceToTypes(e.opts.coerceTypes,E);var x=e.RULES.types[E];if(F||S||!0===x||x&&!Z(x)){p=e.schemaPath+".type",h=e.errSchemaPath+"/type",p=e.schemaPath+".type",h=e.errSchemaPath+"/type";var O=S?"checkDataTypes":"checkDataType";if(a+=" if ("+e.util[O](E,f,e.opts.strictNumbers,!0)+") { ",F){var _="dataType"+c,D="coerced"+c;a+=" var "+_+" = typeof "+f+"; var "+D+" = undefined; ","array"==e.opts.coerceTypes&&(a+=" if ("+_+" == 'object' && Array.isArray("+f+") && "+f+".length == 1) { "+f+" = "+f+"[0]; "+_+" = typeof "+f+"; if ("+e.util.checkDataType(e.schema.type,f,e.opts.strictNumbers)+") "+D+" = "+f+"; } "),a+=" if ("+D+" !== undefined) ; ";var $=F;if($)for(var j,k=-1,I=$.length-1;k<I;)"string"==(j=$[k+=1])?a+=" else if ("+_+" == 'number' || "+_+" == 'boolean') "+D+" = '' + "+f+"; else if ("+f+" === null) "+D+" = ''; ":"number"==j||"integer"==j?(a+=" else if ("+_+" == 'boolean' || "+f+" === null || ("+_+" == 'string' && "+f+" && "+f+" == +"+f+" ","integer"==j&&(a+=" && !("+f+" % 1)"),a+=")) "+D+" = +"+f+"; "):"boolean"==j?a+=" else if ("+f+" === 'false' || "+f+" === 0 || "+f+" === null) "+D+" = false; else if ("+f+" === 'true' || "+f+" === 1) "+D+" = true; ":"null"==j?a+=" else if ("+f+" === '' || "+f+" === 0 || "+f+" === false) "+D+" = null; ":"array"==e.opts.coerceTypes&&"array"==j&&(a+=" else if ("+_+" == 'string' || "+_+" == 'number' || "+_+" == 'boolean' || "+f+" == null) "+D+" = ["+f+"]; ");a+=" else { ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } if ("+D+" !== undefined) { ";var A=u?"data"+(u-1||""):"parentData";a+=" "+f+" = "+D+"; ",u||(a+="if ("+A+" !== undefined)"),a+=" "+A+"["+(u?e.dataPathArr[u]:"parentDataProperty")+"] = "+D+"; } "}else{(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } "}}if(e.schema.$ref&&!i)a+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",m&&(a+=" } if (errors === ",a+=y?"0":"errs_"+c,a+=") { ",w+="}");else{var C=e.RULES;if(C)for(var R=-1,N=C.length-1;R<N;)if(Z(x=C[R+=1])){if(x.type&&(a+=" if ("+e.util.checkDataType(x.type,f,e.opts.strictNumbers)+") { "),e.opts.useDefaults)if("object"==x.type&&e.schema.properties){d=e.schema.properties;var L=Object.keys(d);if(L)for(var T,z=-1,q=L.length-1;z<q;){if(void 0!==(M=d[T=L[z+=1]]).default){var V=f+e.util.getProperty(T);if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+V;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+V+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+V+" === null || "+V+" === '' "),a+=" ) "+V+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(M.default)+" ":a+=" "+JSON.stringify(M.default)+" ",a+="; "}}}else if("array"==x.type&&Array.isArray(e.schema.items)){var W=e.schema.items;if(W){k=-1;for(var M,B=W.length-1;k<B;)if(void 0!==(M=W[k+=1]).default){V=f+"["+k+"]";if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+V;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+V+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+V+" === null || "+V+" === '' "),a+=" ) "+V+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(M.default)+" ":a+=" "+JSON.stringify(M.default)+" ",a+="; "}}}var U=x.rules;if(U)for(var Q,H=-1,K=U.length-1;H<K;)if(Y(Q=U[H+=1])){var G=Q.code(e,Q.keyword,x.type);G&&(a+=" "+G+" ",m&&(P+="}"))}if(m&&(a+=" "+P+" ",P=""),x.type&&(a+=" } ",E&&E===x.type&&!F)){a+=" else { ";var J;p=e.schemaPath+".type",h=e.errSchemaPath+"/type";(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}m&&(a+=" if (errors === ",a+=y?"0":"errs_"+c,a+=") { ",w+="}")}}function Z(e){for(var r=e.rules,t=0;t<r.length;t++)if(Y(r[t]))return!0}function Y(r){return void 0!==e.schema[r.keyword]||r.implements&&function(r){for(var t=r.implements,a=0;a<t.length;a++)if(void 0!==e.schema[t[a]])return!0}(r)}return m&&(a+=" "+w+" "),y?(o?(a+=" if (errors === 0) return data; ",a+=" else throw new ValidationError(vErrors); "):(a+=" validate.errors = vErrors; ",a+=" return errors === 0; "),a+=" }; return validate;"):a+=" var "+v+" = errors === errs_"+c+";",a},he=A.ucs2length,me=le.Validation,fe=function e(r,t,a,o){var i=this,n=this._opts,s=[void 0],l={},c=[],u={},d=[],p={},h=[];t=t||{schema:r,refVal:s,refs:l};var m=ve.call(this,r,t,o),f=this._compilations[m.index];if(m.compiling)return f.callValidate=function e(){var r=f.validate,t=r.apply(this,arguments);return e.errors=r.errors,t};var v=this._formats,g=this.RULES;try{var y=P(r,t,a,o);f.validate=y;var b=f.callValidate;return b&&(b.schema=y.schema,b.errors=null,b.refs=y.refs,b.refVal=y.refVal,b.root=y.root,b.$async=y.$async,n.sourceCode&&(b.source=y.source)),y}finally{ge.call(this,r,t,o)}function P(r,a,o,u){var p=!a||a&&a.schema==r;if(a.schema!=t.schema)return e.call(i,r,a,o,u);var m,f=!0===r.$async,y=pe({isTop:!0,schema:r,isRoot:p,baseId:u,root:a,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:le.MissingRef,RULES:g,validate:pe,util:A,resolve:G,resolveRef:w,usePattern:F,useDefault:x,useCustomRule:O,opts:n,formats:v,logger:i.logger,self:i});y=Se(s,we)+Se(c,be)+Se(d,Pe)+Se(h,Ee)+y,n.processCode&&(y=n.processCode(y,r));try{m=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",y)(i,g,v,t,s,d,h,I,he,me),s[0]=m}catch(e){throw i.logger.error("Error compiling schema, function code:",y),e}return m.schema=r,m.errors=null,m.refs=l,m.refVal=s,m.root=p?m:a,f&&(m.$async=!0),!0===n.sourceCode&&(m.source={code:y,patterns:c,defaults:d}),m}function w(r,o,c){o=G.url(r,o);var u,d,p=l[o];if(void 0!==p)return S(u=s[p],d="refVal["+p+"]");if(!c&&t.refs){var h=t.refs[o];if(void 0!==h)return S(u=t.refVal[h],d=E(o,u))}d=E(o);var m=G.call(i,P,t,o);if(void 0===m){var f=a&&a[o];f&&(m=G.inlineRef(f,n.inlineRefs)?f:e.call(i,f,t,a,r))}if(void 0!==m)return function(e,r){var t=l[e];s[t]=r}(o,m),S(m,d);!function(e){delete l[e]}(o)}function E(e,r){var t=s.length;return s[t]=r,l[e]=t,"refVal"+t}function S(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}function F(e){var r=u[e];return void 0===r&&(r=u[e]=c.length,c[r]=e),"pattern"+r}function x(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return A.toQuotedString(e);case"object":if(null===e)return"null";var r=de(e),t=p[r];return void 0===t&&(t=p[r]=d.length,d[t]=e),"default"+t}}function O(e,r,t,a){if(!1!==i._opts.validateSchema){var o=e.definition.dependencies;if(o&&!o.every((function(e){return Object.prototype.hasOwnProperty.call(t,e)})))throw new Error("parent schema must have all required keywords: "+o.join(","));var s=e.definition.validateSchema;if(s)if(!s(r)){var l="keyword schema is invalid: "+i.errorsText(s.errors);if("log"!=i._opts.validateSchema)throw new Error(l);i.logger.error(l)}}var c,u=e.definition.compile,d=e.definition.inline,p=e.definition.macro;if(u)c=u.call(i,r,t,a);else if(p)c=p.call(i,r,t,a),!1!==n.validateSchema&&i.validateSchema(c,!0);else if(d)c=d.call(i,a,e.keyword,r,t);else if(!(c=e.definition.validate))return;if(void 0===c)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var m=h.length;return h[m]=c,{code:"customRule"+m,validate:c}}};function ve(e,r,t){var a=ye.call(this,e,r,t);return a>=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}function ge(e,r,t){var a=ye.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}function ye(e,r,t){for(var a=0;a<this._compilations.length;a++){var o=this._compilations[a];if(o.schema==e&&o.root==r&&o.baseId==t)return a}return-1}function be(e,r){return"var pattern"+e+" = new RegExp("+A.toQuotedString(r[e])+");"}function Pe(e){return"var default"+e+" = defaults["+e+"];"}function we(e,r){return void 0===r[e]?"":"var refVal"+e+" = refVal["+e+"];"}function Ee(e){return"var customRule"+e+" = customRules["+e+"];"}function Se(e,r){if(!e.length)return"";for(var t="",a=0;a<e.length;a++)t+=r(a,e);return t}var Fe=D((function(e){var r=e.exports=function(){this._cache={}};r.prototype.put=function(e,r){this._cache[e]=r},r.prototype.get=function(e){return this._cache[e]},r.prototype.del=function(e){delete this._cache[e]},r.prototype.clear=function(){this._cache={}}})),xe=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Oe=[0,31,28,31,30,31,30,31,31,30,31,30,31],_e=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,De=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,$e=/^(?:[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,je=/^(?:(?:[^\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,ke=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,Ie=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Ae=/^(?:\/(?:[^~/]|~0|~1)*)*$/,Ce=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Re=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,Ne=Le;function Le(e){return e="full"==e?"full":"fast",A.copy(Le[e])}function Te(e){var r=e.match(xe);if(!r)return!1;var t=+r[1],a=+r[2],o=+r[3];return a>=1&&a<=12&&o>=1&&o<=(2==a&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(t)?29:Oe[a])}function ze(e,r){var t=e.match(_e);if(!t)return!1;var a=t[1],o=t[2],i=t[3],n=t[5];return(a<=23&&o<=59&&i<=59||23==a&&59==o&&60==i)&&(!r||n)}Le.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":je,url:ke,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:De,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:Me,uuid:Ie,"json-pointer":Ae,"json-pointer-uri-fragment":Ce,"relative-json-pointer":Re},Le.full={date:Te,time:ze,"date-time":function(e){var r=e.split(qe);return 2==r.length&&Te(r[0])&&ze(r[1],!0)},uri:function(e){return Ve.test(e)&&$e.test(e)},"uri-reference":/^(?:[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,"uri-template":je,url:ke,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:De,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:Me,uuid:Ie,"json-pointer":Ae,"json-pointer-uri-fragment":Ce,"relative-json-pointer":Re};var qe=/t|\s/i;var Ve=/\/|:/;var We=/[^\\]\\Z/;function Me(e){if(We.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var Be=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s;var h="maximum"==r,m=h?"exclusiveMaximum":"exclusiveMinimum",f=e.schema[m],v=e.opts.$data&&f&&f.$data,g=h?"<":">",y=h?">":"<",b=void 0;if(!p&&"number"!=typeof s&&void 0!==s)throw new Error(r+" must be number");if(!v&&void 0!==f&&"number"!=typeof f&&"boolean"!=typeof f)throw new Error(m+" must be number or boolean");if(v){var P=e.util.getData(f.$data,n,e.dataPathArr),w="exclusive"+i,E="exclType"+i,S="exclIsNumber"+i,F="' + "+(_="op"+i)+" + '";o+=" var schemaExcl"+i+" = "+P+"; ",o+=" var "+w+"; var "+E+" = typeof "+(P="schemaExcl"+i)+"; if ("+E+" != 'boolean' && "+E+" != 'undefined' && "+E+" != 'number') { ";var x;b=m;(x=x||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(o+=" , message: '"+m+" should be boolean' "),e.opts.verbose&&(o+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var O=o;o=x.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+E+" == 'number' ? ( ("+w+" = "+a+" === undefined || "+P+" "+g+"= "+a+") ? "+d+" "+y+"= "+P+" : "+d+" "+y+" "+a+" ) : ( ("+w+" = "+P+" === true) ? "+d+" "+y+"= "+a+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { var op"+i+" = "+w+" ? '"+g+"' : '"+g+"='; ",void 0===s&&(b=m,c=e.errSchemaPath+"/"+m,a=P,p=v)}else{F=g;if((S="number"==typeof f)&&p){var _="'"+F+"'";o+=" if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" ( "+a+" === undefined || "+f+" "+g+"= "+a+" ? "+d+" "+y+"= "+f+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { "}else{S&&void 0===s?(w=!0,b=m,c=e.errSchemaPath+"/"+m,a=f,y+="="):(S&&(a=Math[h?"min":"max"](f,s)),f===(!S||a)?(w=!0,b=m,c=e.errSchemaPath+"/"+m,y+="="):(w=!1,F+="="));_="'"+F+"'";o+=" if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+" "+y+" "+a+" || "+d+" !== "+d+") { "}}b=b||r,(x=x||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+_+", limit: "+a+", exclusive: "+w+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be "+F+" ",o+=p?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";O=o;return o=x.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",u&&(o+=" else { "),o},Ue=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+".length "+("maxItems"==r?">":"<")+" "+a+") { ";var h=r,m=m||[];m.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(h||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxItems"==r?"more":"fewer",o+=" than ",o+=p?"' + "+a+" + '":""+s,o+=" items' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=m.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},Qe=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");var h="maxLength"==r?">":"<";o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),!1===e.opts.unicode?o+=" "+d+".length ":o+=" ucs2length("+d+") ",o+=" "+h+" "+a+") { ";var m=r,f=f||[];f.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(m||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT be ",o+="maxLength"==r?"longer":"shorter",o+=" than ",o+=p?"' + "+a+" + '":""+s,o+=" characters' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var v=o;return o=f.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+v+"]); ":o+=" validate.errors = ["+v+"]; return false; ":o+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},He=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" Object.keys("+d+").length "+("maxProperties"==r?">":"<")+" "+a+") { ";var h=r,m=m||[];m.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(h||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxProperties"==r?"more":"fewer",o+=" than ",o+=p?"' + "+a+" + '":""+s,o+=" properties' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=m.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},Ke={$ref:function(e,r,t){var a,o,i=" ",n=e.level,s=e.dataLevel,l=e.schema[r],c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(s||""),p="valid"+n;if("#"==l||"#/"==l)e.isRoot?(a=e.async,o="validate"):(a=!0===e.root.schema.$async,o="root.refVal[0]");else{var h=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===h){var m=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(m),(y=y||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(i+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(i+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var f=i;i=y.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+f+"]); ":i+=" validate.errors = ["+f+"]; return false; ":i+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(i+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,l,m);e.logger.warn(m),u&&(i+=" if (true) { ")}}else if(h.inline){var v=e.util.copy(e);v.level++;var g="valid"+v.level;v.schema=h.schema,v.schemaPath="",v.errSchemaPath=l,i+=" "+e.validate(v).replace(/validate\.schema/g,h.code)+" ",u&&(i+=" if ("+g+") { ")}else a=!0===h.$async||e.async&&!1!==h.$async,o=h.code}if(o){var y;(y=y||[]).push(i),i="",e.opts.passContext?i+=" "+o+".call(this, ":i+=" "+o+"( ",i+=" "+d+", (dataPath || '')",'""'!=e.errorPath&&(i+=" + "+e.errorPath);var b=i+=" , "+(s?"data"+(s-1||""):"parentData")+" , "+(s?e.dataPathArr[s]:"parentDataProperty")+", rootData) ";if(i=y.pop(),a){if(!e.async)throw new Error("async schema referenced by sync schema");u&&(i+=" var "+p+"; "),i+=" try { await "+b+"; ",u&&(i+=" "+p+" = true; "),i+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",u&&(i+=" "+p+" = false; "),i+=" } ",u&&(i+=" if ("+p+") { ")}else i+=" if (!"+b+") { if (vErrors === null) vErrors = "+o+".errors; else vErrors = vErrors.concat("+o+".errors); errors = vErrors.length; } ",u&&(i+=" else { ")}return i},allOf:function(e,r,t){var a=" ",o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,s=!e.opts.allErrors,l=e.util.copy(e),c="";l.level++;var u="valid"+l.level,d=l.baseId,p=!0,h=o;if(h)for(var m,f=-1,v=h.length-1;f<v;)m=h[f+=1],(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0||!1===m:e.util.schemaHasRules(m,e.RULES.all))&&(p=!1,l.schema=m,l.schemaPath=i+"["+f+"]",l.errSchemaPath=n+"/"+f,a+=" "+e.validate(l)+" ",l.baseId=d,s&&(a+=" if ("+u+") { ",c+="}"));return s&&(a+=p?" if (true) { ":" "+c.slice(0,-1)+" "),a},anyOf:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e),m="";h.level++;var f="valid"+h.level;if(n.every((function(r){return e.opts.strictKeywords?"object"==typeof r&&Object.keys(r).length>0||!1===r:e.util.schemaHasRules(r,e.RULES.all)}))){var v=h.baseId;a+=" var "+p+" = errors; var "+d+" = false; ";var g=e.compositeRule;e.compositeRule=h.compositeRule=!0;var y=n;if(y)for(var b,P=-1,w=y.length-1;P<w;)b=y[P+=1],h.schema=b,h.schemaPath=s+"["+P+"]",h.errSchemaPath=l+"/"+P,a+=" "+e.validate(h)+" ",h.baseId=v,a+=" "+d+" = "+d+" || "+f+"; if (!"+d+") { ",m+="}";e.compositeRule=h.compositeRule=g,a+=" "+m+" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else c&&(a+=" if (true) { ");return a},$comment:function(e,r,t){var a=" ",o=e.schema[r],i=e.errSchemaPath+"/"+r;e.opts.allErrors;var n=e.util.toQuotedString(o);return!0===e.opts.$comment?a+=" console.log("+n+");":"function"==typeof e.opts.$comment&&(a+=" self._opts.$comment("+n+", "+e.util.toQuotedString(i)+", validate.root.schema);"),a},const:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p=e.opts.$data&&n&&n.$data;p&&(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; "),p||(a+=" var schema"+o+" = validate.schema"+s+";"),a+="var "+d+" = equal("+u+", schema"+o+"); if (!"+d+") { ";var h=h||[];h.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValue: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var m=a;return a=h.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+m+"]); ":a+=" validate.errors = ["+m+"]; return false; ":a+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",c&&(a+=" else { "),a},contains:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e);h.level++;var m="valid"+h.level,f="i"+o,v=h.dataLevel=e.dataLevel+1,g="data"+v,y=e.baseId,b=e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all);if(a+="var "+p+" = errors;var "+d+";",b){var P=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.schema=n,h.schemaPath=s,h.errSchemaPath=l,a+=" var "+m+" = false; for (var "+f+" = 0; "+f+" < "+u+".length; "+f+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers,!0);var w=u+"["+f+"]";h.dataPathArr[v]=f;var E=e.validate(h);h.baseId=y,e.util.varOccurences(E,g)<2?a+=" "+e.util.varReplace(E,g,w)+" ":a+=" var "+g+" = "+w+"; "+E+" ",a+=" if ("+m+") break; } ",e.compositeRule=h.compositeRule=P,a+=" if (!"+m+") {"}else a+=" if ("+u+".length == 0) {";var S=S||[];S.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should contain a valid item' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var F=a;return a=S.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+F+"]); ":a+=" validate.errors = ["+F+"]; return false; ":a+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",b&&(a+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a},dependencies:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e),h="";p.level++;var m="valid"+p.level,f={},v={},g=e.opts.ownProperties;for(w in n)if("__proto__"!=w){var y=n[w],b=Array.isArray(y)?v:f;b[w]=y}a+="var "+d+" = errors;";var P=e.errorPath;for(var w in a+="var missing"+o+";",v)if((b=v[w]).length){if(a+=" if ( "+u+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),c){a+=" && ( ";var E=b;if(E)for(var S=-1,F=E.length-1;S<F;){j=E[S+=1],S&&(a+=" || "),a+=" ( ( "+(C=u+(A=e.util.getProperty(j)))+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(j)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?j:A)+") ) "}a+=")) { ";var x="missing"+o,O="' + "+x+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,x,!0):P+" + "+x);var _=_||[];_.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var D=a;a=_.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+D+"]); ":a+=" validate.errors = ["+D+"]; return false; ":a+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{a+=" ) { ";var $=b;if($)for(var j,k=-1,I=$.length-1;k<I;){j=$[k+=1];var A=e.util.getProperty(j),C=(O=e.util.escapeQuotes(j),u+A);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,j,e.opts.jsonPointers)),a+=" if ( "+C+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(j)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",c&&(h+="}",a+=" else { ")}e.errorPath=P;var R=p.baseId;for(var w in f){y=f[w];(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all))&&(a+=" "+m+" = true; if ( "+u+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),a+=") { ",p.schema=y,p.schemaPath=s+e.util.getProperty(w),p.errSchemaPath=l+"/"+e.util.escapeFragment(w),a+=" "+e.validate(p)+" ",p.baseId=R,a+=" } ",c&&(a+=" if ("+m+") { ",h+="}"))}return c&&(a+=" "+h+" if ("+d+" == errors) {"),a},enum:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p=e.opts.$data&&n&&n.$data;p&&(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ");var h="i"+o,m="schema"+o;p||(a+=" var "+m+" = validate.schema"+s+";"),a+="var "+d+";",p&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=d+" = false;for (var "+h+"=0; "+h+"<"+m+".length; "+h+"++) if (equal("+u+", "+m+"["+h+"])) { "+d+" = true; break; }",p&&(a+=" } "),a+=" if (!"+d+") { ";var f=f||[];f.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var v=a;return a=f.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+v+"]); ":a+=" validate.errors = ["+v+"]; return false; ":a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",c&&(a+=" else { "),a},format:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||"");if(!1===e.opts.format)return c&&(a+=" if (true) { "),a;var d,p=e.opts.$data&&n&&n.$data;p?(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",d="schema"+o):d=n;var h=e.opts.unknownFormats,m=Array.isArray(h);if(p){a+=" var "+(f="format"+o)+" = formats["+d+"]; var "+(v="isObject"+o)+" = typeof "+f+" == 'object' && !("+f+" instanceof RegExp) && "+f+".validate; var "+(g="formatType"+o)+" = "+v+" && "+f+".type || 'string'; if ("+v+") { ",e.async&&(a+=" var async"+o+" = "+f+".async; "),a+=" "+f+" = "+f+".validate; } if ( ",p&&(a+=" ("+d+" !== undefined && typeof "+d+" != 'string') || "),a+=" (","ignore"!=h&&(a+=" ("+d+" && !"+f+" ",m&&(a+=" && self._opts.unknownFormats.indexOf("+d+") == -1 "),a+=") || "),a+=" ("+f+" && "+g+" == '"+t+"' && !(typeof "+f+" == 'function' ? ",e.async?a+=" (async"+o+" ? await "+f+"("+u+") : "+f+"("+u+")) ":a+=" "+f+"("+u+") ",a+=" : "+f+".test("+u+"))))) {"}else{var f;if(!(f=e.formats[n])){if("ignore"==h)return e.logger.warn('unknown format "'+n+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(a+=" if (true) { "),a;if(m&&h.indexOf(n)>=0)return c&&(a+=" if (true) { "),a;throw new Error('unknown format "'+n+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,g=(v="object"==typeof f&&!(f instanceof RegExp)&&f.validate)&&f.type||"string";if(v){var y=!0===f.async;f=f.validate}if(g!=t)return c&&(a+=" if (true) { "),a;if(y){if(!e.async)throw new Error("async format in sync schema");a+=" if (!(await "+(b="formats"+e.util.getProperty(n)+".validate")+"("+u+"))) { "}else{a+=" if (! ";var b="formats"+e.util.getProperty(n);v&&(b+=".validate"),a+="function"==typeof f?" "+b+"("+u+") ":" "+b+".test("+u+") ",a+=") { "}}var P=P||[];P.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",a+=p?""+d:""+e.util.toQuotedString(n),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",a+=p?"' + "+d+" + '":""+e.util.escapeQuotes(n),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=p?"validate.schema"+s:""+e.util.toQuotedString(n),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var w=a;return a=P.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",c&&(a+=" else { "),a},if:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e);h.level++;var m="valid"+h.level,f=e.schema.then,v=e.schema.else,g=void 0!==f&&(e.opts.strictKeywords?"object"==typeof f&&Object.keys(f).length>0||!1===f:e.util.schemaHasRules(f,e.RULES.all)),y=void 0!==v&&(e.opts.strictKeywords?"object"==typeof v&&Object.keys(v).length>0||!1===v:e.util.schemaHasRules(v,e.RULES.all)),b=h.baseId;if(g||y){var P;h.createErrors=!1,h.schema=n,h.schemaPath=s,h.errSchemaPath=l,a+=" var "+p+" = errors; var "+d+" = true; ";var w=e.compositeRule;e.compositeRule=h.compositeRule=!0,a+=" "+e.validate(h)+" ",h.baseId=b,h.createErrors=!0,a+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",e.compositeRule=h.compositeRule=w,g?(a+=" if ("+m+") { ",h.schema=e.schema.then,h.schemaPath=e.schemaPath+".then",h.errSchemaPath=e.errSchemaPath+"/then",a+=" "+e.validate(h)+" ",h.baseId=b,a+=" "+d+" = "+m+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'then'; ":P="'then'",a+=" } ",y&&(a+=" else { ")):a+=" if (!"+m+") { ",y&&(h.schema=e.schema.else,h.schemaPath=e.schemaPath+".else",h.errSchemaPath=e.errSchemaPath+"/else",a+=" "+e.validate(h)+" ",h.baseId=b,a+=" "+d+" = "+m+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'else'; ":P="'else'",a+=" } "),a+=" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+P+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match \"' + "+P+" + '\" schema' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",c&&(a+=" else { ")}else c&&(a+=" if (true) { ");return a},items:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e),m="";h.level++;var f="valid"+h.level,v="i"+o,g=h.dataLevel=e.dataLevel+1,y="data"+g,b=e.baseId;if(a+="var "+p+" = errors;var "+d+";",Array.isArray(n)){var P=e.schema.additionalItems;if(!1===P){a+=" "+d+" = "+u+".length <= "+n.length+"; ";var w=l;l=e.errSchemaPath+"/additionalItems",a+=" if (!"+d+") { ";var E=E||[];E.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+n.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+n.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var S=a;a=E.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",l=w,c&&(m+="}",a+=" else { ")}var F=n;if(F)for(var x,O=-1,_=F.length-1;O<_;)if(x=F[O+=1],e.opts.strictKeywords?"object"==typeof x&&Object.keys(x).length>0||!1===x:e.util.schemaHasRules(x,e.RULES.all)){a+=" "+f+" = true; if ("+u+".length > "+O+") { ";var D=u+"["+O+"]";h.schema=x,h.schemaPath=s+"["+O+"]",h.errSchemaPath=l+"/"+O,h.errorPath=e.util.getPathExpr(e.errorPath,O,e.opts.jsonPointers,!0),h.dataPathArr[g]=O;var $=e.validate(h);h.baseId=b,e.util.varOccurences($,y)<2?a+=" "+e.util.varReplace($,y,D)+" ":a+=" var "+y+" = "+D+"; "+$+" ",a+=" } ",c&&(a+=" if ("+f+") { ",m+="}")}if("object"==typeof P&&(e.opts.strictKeywords?"object"==typeof P&&Object.keys(P).length>0||!1===P:e.util.schemaHasRules(P,e.RULES.all))){h.schema=P,h.schemaPath=e.schemaPath+".additionalItems",h.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+f+" = true; if ("+u+".length > "+n.length+") { for (var "+v+" = "+n.length+"; "+v+" < "+u+".length; "+v+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=u+"["+v+"]";h.dataPathArr[g]=v;$=e.validate(h);h.baseId=b,e.util.varOccurences($,y)<2?a+=" "+e.util.varReplace($,y,D)+" ":a+=" var "+y+" = "+D+"; "+$+" ",c&&(a+=" if (!"+f+") break; "),a+=" } } ",c&&(a+=" if ("+f+") { ",m+="}")}}else if(e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all)){h.schema=n,h.schemaPath=s,h.errSchemaPath=l,a+=" for (var "+v+" = 0; "+v+" < "+u+".length; "+v+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=u+"["+v+"]";h.dataPathArr[g]=v;$=e.validate(h);h.baseId=b,e.util.varOccurences($,y)<2?a+=" "+e.util.varReplace($,y,D)+" ":a+=" var "+y+" = "+D+"; "+$+" ",c&&(a+=" if (!"+f+") break; "),a+=" }"}return c&&(a+=" "+m+" if ("+p+" == errors) {"),a},maximum:Be,minimum:Be,maxItems:Ue,minItems:Ue,maxLength:Qe,minLength:Qe,maxProperties:He,minProperties:He,multipleOf:function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");o+="var division"+i+";if (",p&&(o+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),o+=" (division"+i+" = "+d+" / "+a+", ",e.opts.multipleOfPrecision?o+=" Math.abs(Math.round(division"+i+") - division"+i+") > 1e-"+e.opts.multipleOfPrecision+" ":o+=" division"+i+" !== parseInt(division"+i+") ",o+=" ) ",p&&(o+=" ) "),o+=" ) { ";var h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be multiple of ",o+=p?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var m=o;return o=h.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},not:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level;if(e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all)){p.schema=n,p.schemaPath=s,p.errSchemaPath=l,a+=" var "+d+" = errors; ";var m,f=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.createErrors=!1,p.opts.allErrors&&(m=p.opts.allErrors,p.opts.allErrors=!1),a+=" "+e.validate(p)+" ",p.createErrors=!0,m&&(p.opts.allErrors=m),e.compositeRule=p.compositeRule=f,a+=" if ("+h+") { ";var v=v||[];v.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var g=a;a=v.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(a+=" if (false) { ");return a},oneOf:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e),m="";h.level++;var f="valid"+h.level,v=h.baseId,g="prevValid"+o,y="passingSchemas"+o;a+="var "+p+" = errors , "+g+" = false , "+d+" = false , "+y+" = null; ";var b=e.compositeRule;e.compositeRule=h.compositeRule=!0;var P=n;if(P)for(var w,E=-1,S=P.length-1;E<S;)w=P[E+=1],(e.opts.strictKeywords?"object"==typeof w&&Object.keys(w).length>0||!1===w:e.util.schemaHasRules(w,e.RULES.all))?(h.schema=w,h.schemaPath=s+"["+E+"]",h.errSchemaPath=l+"/"+E,a+=" "+e.validate(h)+" ",h.baseId=v):a+=" var "+f+" = true; ",E&&(a+=" if ("+f+" && "+g+") { "+d+" = false; "+y+" = ["+y+", "+E+"]; } else { ",m+="}"),a+=" if ("+f+") { "+d+" = "+g+" = true; "+y+" = "+E+"; }";return e.compositeRule=h.compositeRule=b,a+=m+"if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a},pattern:function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'string') || "),o+=" !"+(p?"(new RegExp("+a+"))":e.usePattern(s))+".test("+d+") ) { ";var h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { pattern: ",o+=p?""+a:""+e.util.toQuotedString(s),o+=" } ",!1!==e.opts.messages&&(o+=" , message: 'should match pattern \"",o+=p?"' + "+a+" + '":""+e.util.escapeQuotes(s),o+="\"' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+e.util.toQuotedString(s),o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var m=o;return o=h.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},properties:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e),h="";p.level++;var m="valid"+p.level,f="key"+o,v="idx"+o,g=p.dataLevel=e.dataLevel+1,y="data"+g,b="dataProperties"+o,P=Object.keys(n||{}).filter(A),w=e.schema.patternProperties||{},E=Object.keys(w).filter(A),S=e.schema.additionalProperties,F=P.length||E.length,x=!1===S,O="object"==typeof S&&Object.keys(S).length,_=e.opts.removeAdditional,D=x||O||_,$=e.opts.ownProperties,j=e.baseId,k=e.schema.required;if(k&&(!e.opts.$data||!k.$data)&&k.length<e.opts.loopRequired)var I=e.util.toHash(k);function A(e){return"__proto__"!==e}if(a+="var "+d+" = errors;var "+m+" = true;",$&&(a+=" var "+b+" = undefined;"),D){if(a+=$?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+u+") { ",F){if(a+=" var isAdditional"+o+" = !(false ",P.length)if(P.length>8)a+=" || validate.schema"+s+".hasOwnProperty("+f+") ";else{var C=P;if(C)for(var R=-1,N=C.length-1;R<N;)G=C[R+=1],a+=" || "+f+" == "+e.util.toQuotedString(G)+" "}if(E.length){var L=E;if(L)for(var T=-1,z=L.length-1;T<z;)ie=L[T+=1],a+=" || "+e.usePattern(ie)+".test("+f+") "}a+=" ); if (isAdditional"+o+") { "}if("all"==_)a+=" delete "+u+"["+f+"]; ";else{var q=e.errorPath,V="' + "+f+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers)),x)if(_)a+=" delete "+u+"["+f+"]; ";else{a+=" "+m+" = false; ";var W=l;l=e.errSchemaPath+"/additionalProperties",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { additionalProperty: '"+V+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is an invalid additional property":a+="should NOT have additional properties",a+="' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var M=a;a=te.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+M+"]); ":a+=" validate.errors = ["+M+"]; return false; ":a+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=W,c&&(a+=" break; ")}else if(O)if("failing"==_){a+=" var "+d+" = errors; ";var B=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=S,p.schemaPath=e.schemaPath+".additionalProperties",p.errSchemaPath=e.errSchemaPath+"/additionalProperties",p.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);var U=u+"["+f+"]";p.dataPathArr[g]=f;var Q=e.validate(p);p.baseId=j,e.util.varOccurences(Q,y)<2?a+=" "+e.util.varReplace(Q,y,U)+" ":a+=" var "+y+" = "+U+"; "+Q+" ",a+=" if (!"+m+") { errors = "+d+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+u+"["+f+"]; } ",e.compositeRule=p.compositeRule=B}else{p.schema=S,p.schemaPath=e.schemaPath+".additionalProperties",p.errSchemaPath=e.errSchemaPath+"/additionalProperties",p.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);U=u+"["+f+"]";p.dataPathArr[g]=f;Q=e.validate(p);p.baseId=j,e.util.varOccurences(Q,y)<2?a+=" "+e.util.varReplace(Q,y,U)+" ":a+=" var "+y+" = "+U+"; "+Q+" ",c&&(a+=" if (!"+m+") break; ")}e.errorPath=q}F&&(a+=" } "),a+=" } ",c&&(a+=" if ("+m+") { ",h+="}")}var H=e.opts.useDefaults&&!e.compositeRule;if(P.length){var K=P;if(K)for(var G,J=-1,Z=K.length-1;J<Z;){var Y=n[G=K[J+=1]];if(e.opts.strictKeywords?"object"==typeof Y&&Object.keys(Y).length>0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all)){var X=e.util.getProperty(G),ee=(U=u+X,H&&void 0!==Y.default);p.schema=Y,p.schemaPath=s+X,p.errSchemaPath=l+"/"+e.util.escapeFragment(G),p.errorPath=e.util.getPath(e.errorPath,G,e.opts.jsonPointers),p.dataPathArr[g]=e.util.toQuotedString(G);Q=e.validate(p);if(p.baseId=j,e.util.varOccurences(Q,y)<2){Q=e.util.varReplace(Q,y,U);var re=U}else{re=y;a+=" var "+y+" = "+U+"; "}if(ee)a+=" "+Q+" ";else{if(I&&I[G]){a+=" if ( "+re+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+m+" = false; ";q=e.errorPath,W=l;var te,ae=e.util.escapeQuotes(G);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(q,G,e.opts.jsonPointers)),l=e.errSchemaPath+"/required",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+ae+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+ae+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";M=a;a=te.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+M+"]); ":a+=" validate.errors = ["+M+"]; return false; ":a+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=W,e.errorPath=q,a+=" } else { "}else c?(a+=" if ( "+re+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+m+" = true; } else { "):(a+=" if ("+re+" !== undefined ",$&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=" ) { ");a+=" "+Q+" } "}}c&&(a+=" if ("+m+") { ",h+="}")}}if(E.length){var oe=E;if(oe)for(var ie,ne=-1,se=oe.length-1;ne<se;){Y=w[ie=oe[ne+=1]];if(e.opts.strictKeywords?"object"==typeof Y&&Object.keys(Y).length>0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all)){p.schema=Y,p.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(ie),p.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(ie),a+=$?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+u+") { ",a+=" if ("+e.usePattern(ie)+".test("+f+")) { ",p.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);U=u+"["+f+"]";p.dataPathArr[g]=f;Q=e.validate(p);p.baseId=j,e.util.varOccurences(Q,y)<2?a+=" "+e.util.varReplace(Q,y,U)+" ":a+=" var "+y+" = "+U+"; "+Q+" ",c&&(a+=" if (!"+m+") break; "),a+=" } ",c&&(a+=" else "+m+" = true; "),a+=" } ",c&&(a+=" if ("+m+") { ",h+="}")}}}return c&&(a+=" "+h+" if ("+d+" == errors) {"),a},propertyNames:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level;if(a+="var "+d+" = errors;",e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all)){p.schema=n,p.schemaPath=s,p.errSchemaPath=l;var m="key"+o,f="idx"+o,v="i"+o,g="' + "+m+" + '",y="data"+(p.dataLevel=e.dataLevel+1),b="dataProperties"+o,P=e.opts.ownProperties,w=e.baseId;P&&(a+=" var "+b+" = undefined; "),a+=P?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+f+"=0; "+f+"<"+b+".length; "+f+"++) { var "+m+" = "+b+"["+f+"]; ":" for (var "+m+" in "+u+") { ",a+=" var startErrs"+o+" = errors; ";var E=m,S=e.compositeRule;e.compositeRule=p.compositeRule=!0;var F=e.validate(p);p.baseId=w,e.util.varOccurences(F,y)<2?a+=" "+e.util.varReplace(F,y,E)+" ":a+=" var "+y+" = "+E+"; "+F+" ",e.compositeRule=p.compositeRule=S,a+=" if (!"+h+") { for (var "+v+"=startErrs"+o+"; "+v+"<errors; "+v+"++) { vErrors["+v+"].propertyName = "+m+"; } var err = ",!1!==e.createErrors?(a+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { propertyName: '"+g+"' } ",!1!==e.opts.messages&&(a+=" , message: 'property name \\'"+g+"\\' is invalid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),c&&(a+=" break; "),a+=" } }"}return c&&(a+=" if ("+d+" == errors) {"),a},required:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p=e.opts.$data&&n&&n.$data;p&&(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ");var h="schema"+o;if(!p)if(n.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var m=[],f=n;if(f)for(var v,g=-1,y=f.length-1;g<y;){v=f[g+=1];var b=e.schema.properties[v];b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0||!1===b:e.util.schemaHasRules(b,e.RULES.all))||(m[m.length]=v)}}else m=n;if(p||m.length){var P=e.errorPath,w=p||m.length>=e.opts.loopRequired,E=e.opts.ownProperties;if(c)if(a+=" var missing"+o+"; ",w){p||(a+=" var "+h+" = validate.schema"+s+"; ");var S="' + "+($="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,$,e.opts.jsonPointers)),a+=" var "+d+" = true; ",p&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=" for (var "+O+" = 0; "+O+" < "+h+".length; "+O+"++) { "+d+" = "+u+"["+h+"["+O+"]] !== undefined ",E&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", "+h+"["+O+"]) "),a+="; if (!"+d+") break; } ",p&&(a+=" } "),a+=" if (!"+d+") { ",(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var F=a;a=D.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+F+"]); ":a+=" validate.errors = ["+F+"]; return false; ":a+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var x=m;if(x)for(var O=-1,_=x.length-1;O<_;){k=x[O+=1],O&&(a+=" || "),a+=" ( ( "+(R=u+(C=e.util.getProperty(k)))+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(k)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?k:C)+") ) "}a+=") { ";var D;S="' + "+($="missing"+o)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,$,!0):P+" + "+$),(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";F=a;a=D.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+F+"]); ":a+=" validate.errors = ["+F+"]; return false; ":a+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(w){p||(a+=" var "+h+" = validate.schema"+s+"; ");var $;S="' + "+($="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,$,e.opts.jsonPointers)),p&&(a+=" if ("+h+" && !Array.isArray("+h+")) { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+h+" !== undefined) { "),a+=" for (var "+O+" = 0; "+O+" < "+h+".length; "+O+"++) { if ("+u+"["+h+"["+O+"]] === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", "+h+"["+O+"]) "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",p&&(a+=" } ")}else{var j=m;if(j)for(var k,I=-1,A=j.length-1;I<A;){k=j[I+=1];var C=e.util.getProperty(k),R=(S=e.util.escapeQuotes(k),u+C);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,k,e.opts.jsonPointers)),a+=" if ( "+R+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(k)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=P}else c&&(a+=" if (true) {");return a},uniqueItems:function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p="valid"+i,h=e.opts.$data&&s&&s.$data;if(h?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,(s||h)&&!1!==e.opts.uniqueItems){h&&(o+=" var "+p+"; if ("+a+" === false || "+a+" === undefined) "+p+" = true; else if (typeof "+a+" != 'boolean') "+p+" = false; else { "),o+=" var i = "+d+".length , "+p+" = true , j; if (i > 1) { ";var m=e.schema.items&&e.schema.items.type,f=Array.isArray(m);if(!m||"object"==m||"array"==m||f&&(m.indexOf("object")>=0||m.indexOf("array")>=0))o+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+d+"[i], "+d+"[j])) { "+p+" = false; break outer; } } } ";else{o+=" var itemIndices = {}, item; for (;i--;) { var item = "+d+"[i]; ";var v="checkDataType"+(f?"s":"");o+=" if ("+e.util[v](m,"item",e.opts.strictNumbers,!0)+") continue; ",f&&(o+=" if (typeof item == 'string') item = '\"' + item; "),o+=" if (typeof itemIndices[item] == 'number') { "+p+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}o+=" } ",h&&(o+=" } "),o+=" if (!"+p+") { ";var g=g||[];g.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(o+=" , schema: ",o+=h?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var y=o;o=g.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+y+"]); ":o+=" validate.errors = ["+y+"]; return false; ":o+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",u&&(o+=" else { ")}else u&&(o+=" if (true) { ");return o},validate:pe},Ge=A.toHash,Je=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"],Ze=function(e,r){for(var t=0;t<r.length;t++){e=JSON.parse(JSON.stringify(e));var a,o=r[t].split("/"),i=e;for(a=1;a<o.length;a++)i=i[o[a]];for(a=0;a<Je.length;a++){var n=Je[a],s=i[n];s&&(i[n]={anyOf:[s,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e},Ye=le.MissingRef,Xe=function e(r,t,a){var o=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof t&&(a=t,t=void 0);var i=n(r).then((function(){var e=o._addSchema(r,void 0,t);return e.validate||function e(r){try{return o._compile(r)}catch(e){if(e instanceof Ye)return a(e);throw e}function a(a){var i=a.missingSchema;if(c(i))throw new Error("Schema "+i+" is loaded but "+a.missingRef+" cannot be resolved");var s=o._loadingSchemas[i];return s||(s=o._loadingSchemas[i]=o._opts.loadSchema(i)).then(l,l),s.then((function(e){if(!c(i))return n(e).then((function(){c(i)||o.addSchema(e,i,void 0,t)}))})).then((function(){return e(r)}));function l(){delete o._loadingSchemas[i]}function c(e){return o._refs[e]||o._schemas[e]}}}(e)}));a&&i.then((function(e){a(null,e)}),a);return i;function n(r){var t=r.$schema;return t&&!o.getSchema(t)?e.call(o,{$ref:t},!0):Promise.resolve()}};var er=function(e,r,t){var a,o,i=" ",n=e.level,s=e.dataLevel,l=e.schema[r],c=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,d=!e.opts.allErrors,p="data"+(s||""),h="valid"+n,m="errs__"+n,f=e.opts.$data&&l&&l.$data;f?(i+=" var schema"+n+" = "+e.util.getData(l.$data,s,e.dataPathArr)+"; ",o="schema"+n):o=l;var v,g,y,b,P,w="definition"+n,E=this.definition,S="";if(f&&E.$data){P="keywordValidate"+n;var F=E.validateSchema;i+=" var "+w+" = RULES.custom['"+r+"'].definition; var "+P+" = "+w+".validate;"}else{if(!(b=e.useCustomRule(this,l,e.schema,e)))return;o="validate.schema"+c,P=b.code,v=E.compile,g=E.inline,y=E.macro}var x=P+".errors",O="i"+n,_="ruleErr"+n,D=E.async;if(D&&!e.async)throw new Error("async keyword in sync schema");if(g||y||(i+=x+" = null;"),i+="var "+m+" = errors;var "+h+";",f&&E.$data&&(S+="}",i+=" if ("+o+" === undefined) { "+h+" = true; } else { ",F&&(S+="}",i+=" "+h+" = "+w+".validateSchema("+o+"); if ("+h+") { ")),g)E.statements?i+=" "+b.validate+" ":i+=" "+h+" = "+b.validate+"; ";else if(y){var $=e.util.copy(e);S="";$.level++;var j="valid"+$.level;$.schema=b.validate,$.schemaPath="";var k=e.compositeRule;e.compositeRule=$.compositeRule=!0;var I=e.validate($).replace(/validate\.schema/g,P);e.compositeRule=$.compositeRule=k,i+=" "+I}else{(N=N||[]).push(i),i="",i+=" "+P+".call( ",e.opts.passContext?i+="this":i+="self",v||!1===E.schema?i+=" , "+p+" ":i+=" , "+o+" , "+p+" , validate.schema"+e.schemaPath+" ",i+=" , (dataPath || '')",'""'!=e.errorPath&&(i+=" + "+e.errorPath);var A=s?"data"+(s-1||""):"parentData",C=s?e.dataPathArr[s]:"parentDataProperty",R=i+=" , "+A+" , "+C+" , rootData ) ";i=N.pop(),!1===E.errors?(i+=" "+h+" = ",D&&(i+="await "),i+=R+"; "):i+=D?" var "+(x="customErrors"+n)+" = null; try { "+h+" = await "+R+"; } catch (e) { "+h+" = false; if (e instanceof ValidationError) "+x+" = e.errors; else throw e; } ":" "+x+" = null; "+h+" = "+R+"; "}if(E.modifying&&(i+=" if ("+A+") "+p+" = "+A+"["+C+"];"),i+=""+S,E.valid)d&&(i+=" if (true) { ");else{var N;i+=" if ( ",void 0===E.valid?(i+=" !",i+=y?""+j:""+h):i+=" "+!E.valid+" ",i+=") { ",a=this.keyword,(N=N||[]).push(i),i="",(N=N||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(i+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var L=i;i=N.pop(),!e.compositeRule&&d?e.async?i+=" throw new ValidationError(["+L+"]); ":i+=" validate.errors = ["+L+"]; return false; ":i+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var T=i;i=N.pop(),g?E.errors?"full"!=E.errors&&(i+=" for (var "+O+"="+m+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(i+=" "+_+".schema = "+o+"; "+_+".data = "+p+"; "),i+=" } "):!1===E.errors?i+=" "+T+" ":(i+=" if ("+m+" == errors) { "+T+" } else { for (var "+O+"="+m+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(i+=" "+_+".schema = "+o+"; "+_+".data = "+p+"; "),i+=" } } "):y?(i+=" var err = ",!1!==e.createErrors?(i+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(i+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&d&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; ")):!1===E.errors?i+=" "+T+" ":(i+=" if (Array.isArray("+x+")) { if (vErrors === null) vErrors = "+x+"; else vErrors = vErrors.concat("+x+"); errors = vErrors.length; for (var "+O+"="+m+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; "+_+'.schemaPath = "'+u+'"; ',e.opts.verbose&&(i+=" "+_+".schema = "+o+"; "+_+".data = "+p+"; "),i+=" } } else { "+T+" } "),i+=" } ",d&&(i+=" else { ")}return i},rr="http://json-schema.org/draft-07/schema#",tr="http://json-schema.org/draft-07/schema#",ar="Core schema meta-schema",or={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},ir=["object","boolean"],nr={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},sr={$schema:rr,$id:tr,title:ar,definitions:or,type:ir,properties:nr,default:!0},lr=$(Object.freeze({__proto__:null,$schema:rr,$id:tr,title:ar,definitions:or,type:ir,properties:nr,default:sr})),cr={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:lr.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:lr.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}},ur=/^[a-z_$][a-z0-9_$-]*$/i,dr=function(e,r){var t=this.RULES;if(t.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!ur.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(r){this.validateKeyword(r,!0);var a=r.type;if(Array.isArray(a))for(var o=0;o<a.length;o++)n(e,a[o],r);else n(e,a,r);var i=r.metaSchema;i&&(r.$data&&this._opts.$data&&(i={anyOf:[i,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),r.validateSchema=this.compile(i,!0))}function n(e,r,a){for(var o,i=0;i<t.length;i++){var n=t[i];if(n.type==r){o=n;break}}o||(o={type:r,rules:[]},t.push(o));var s={keyword:e,definition:a,custom:!0,code:er,implements:a.implements};o.rules.push(s),t.custom[e]=s}return t.keywords[e]=t.all[e]=!0,this},pr=function(e){var r=this.RULES.custom[e];return r?r.definition:this.RULES.keywords[e]||!1},hr=function(e){var r=this.RULES;delete r.keywords[e],delete r.all[e],delete r.custom[e];for(var t=0;t<r.length;t++)for(var a=r[t].rules,o=0;o<a.length;o++)if(a[o].keyword==e){a.splice(o,1);break}return this},mr=function e(r,t){e.errors=null;var a=this._validateKeyword=this._validateKeyword||this.compile(cr,!0);if(a(r))return!0;if(e.errors=a.errors,t)throw new Error("custom keyword definition is invalid: "+this.errorsText(a.errors));return!1};var fr="http://json-schema.org/draft-07/schema#",vr="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",gr="Meta-schema for $data reference (JSON Schema extension proposal)",yr=["$data"],br={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Pr={$schema:fr,$id:vr,description:gr,type:"object",required:yr,properties:br,additionalProperties:!1},wr=$(Object.freeze({__proto__:null,$schema:fr,$id:vr,description:gr,type:"object",required:yr,properties:br,additionalProperties:!1,default:Pr})),Er=Or;Or.prototype.validate=function(e,r){var t;if("string"==typeof e){if(!(t=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);t=a.validate||this._compile(a)}var o=t(r);!0!==t.$async&&(this.errors=t.errors);return o},Or.prototype.compile=function(e,r){var t=this._addSchema(e,void 0,r);return t.validate||this._compile(t)},Or.prototype.addSchema=function(e,r,t,a){if(Array.isArray(e)){for(var o=0;o<e.length;o++)this.addSchema(e[o],void 0,t,a);return this}var i=this._getId(e);if(void 0!==i&&"string"!=typeof i)throw new Error("schema id must be string");return Ir(this,r=G.normalizeId(r||i)),this._schemas[r]=this._addSchema(e,t,a,!0),this},Or.prototype.addMetaSchema=function(e,r,t){return this.addSchema(e,r,t,!0),this},Or.prototype.validateSchema=function(e,r){var t=e.$schema;if(void 0!==t&&"string"!=typeof t)throw new Error("$schema must be a string");if(!(t=t||this._opts.defaultMeta||function(e){var r=e._opts.meta;return e._opts.defaultMeta="object"==typeof r?e._getId(r)||r:e.getSchema(Sr)?Sr:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var a=this.validate(t,e);if(!a&&r){var o="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(o);this.logger.error(o)}return a},Or.prototype.getSchema=function(e){var r=_r(this,e);switch(typeof r){case"object":return r.validate||this._compile(r);case"string":return this.getSchema(r);case"undefined":return function(e,r){var t=G.schema.call(e,{schema:{}},r);if(t){var a=t.schema,o=t.root,i=t.baseId,n=fe.call(e,a,o,void 0,i);return e._fragments[r]=new H({ref:r,fragment:!0,schema:a,root:o,baseId:i,validate:n}),n}}(this,e)}},Or.prototype.removeSchema=function(e){if(e instanceof RegExp)return Dr(this,this._schemas,e),Dr(this,this._refs,e),this;switch(typeof e){case"undefined":return Dr(this,this._schemas),Dr(this,this._refs),this._cache.clear(),this;case"string":var r=_r(this,e);return r&&this._cache.del(r.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var t=this._opts.serialize,a=t?t(e):e;this._cache.del(a);var o=this._getId(e);o&&(o=G.normalizeId(o),delete this._schemas[o],delete this._refs[o])}return this},Or.prototype.addFormat=function(e,r){"string"==typeof r&&(r=new RegExp(r));return this._formats[e]=r,this},Or.prototype.errorsText=function(e,r){if(!(e=e||this.errors))return"No errors";for(var t=void 0===(r=r||{}).separator?", ":r.separator,a=void 0===r.dataVar?"data":r.dataVar,o="",i=0;i<e.length;i++){var n=e[i];n&&(o+=a+n.dataPath+" "+n.message+t)}return o.slice(0,-t.length)},Or.prototype._addSchema=function(e,r,t,a){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var o=this._opts.serialize,i=o?o(e):e,n=this._cache.get(i);if(n)return n;a=a||!1!==this._opts.addUsedSchema;var s=G.normalizeId(this._getId(e));s&&a&&Ir(this,s);var l,c=!1!==this._opts.validateSchema&&!r;c&&!(l=s&&s==G.normalizeId(e.$schema))&&this.validateSchema(e,!0);var u=G.ids.call(this,e),d=new H({id:s,schema:e,localRefs:u,cacheKey:i,meta:t});"#"!=s[0]&&a&&(this._refs[s]=d);this._cache.put(i,d),c&&l&&this.validateSchema(e,!0);return d},Or.prototype._compile=function(e,r){if(e.compiling)return e.validate=o,o.schema=e.schema,o.errors=null,o.root=r||o,!0===e.schema.$async&&(o.$async=!0),o;var t,a;e.compiling=!0,e.meta&&(t=this._opts,this._opts=this._metaOpts);try{a=fe.call(this,e.schema,r,e.localRefs)}catch(r){throw delete e.validate,r}finally{e.compiling=!1,e.meta&&(this._opts=t)}return e.validate=a,e.refs=a.refs,e.refVal=a.refVal,e.root=a.root,a;function o(){var r=e.validate,t=r.apply(this,arguments);return o.errors=r.errors,t}},Or.prototype.compileAsync=Xe,Or.prototype.addKeyword=dr,Or.prototype.getKeyword=pr,Or.prototype.removeKeyword=hr,Or.prototype.validateKeyword=mr,Or.ValidationError=le.Validation,Or.MissingRefError=le.MissingRef,Or.$dataMetaSchema=Ze;var Sr="http://json-schema.org/draft-07/schema",Fr=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],xr=["/properties"];function Or(e){if(!(this instanceof Or))return new Or(e);var r,t;e=this._opts=A.copy(e)||{},function(e){var r=e._opts.logger;if(!1===r)e.logger={log:Ar,warn:Ar,error:Ar};else{if(void 0===r&&(r=console),!("object"==typeof r&&r.log&&r.warn&&r.error))throw new Error("logger must implement log, warn and error methods");e.logger=r}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=Ne(e.format),this._cache=e.cache||new Fe,this._loadingSchemas={},this._compilations=[],this.RULES=((r=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}]).all=Ge(t=["type","$comment"]),r.types=Ge(["number","integer","string","array","object","boolean","null"]),r.forEach((function(e){e.rules=e.rules.map((function(e){var a;if("object"==typeof e){var o=Object.keys(e)[0];a=e[o],e=o,a.forEach((function(e){t.push(e),r.all[e]=!0}))}return t.push(e),r.all[e]={keyword:e,code:Ke[e],implements:a}})),r.all.$comment={keyword:"$comment",code:Ke.$comment},e.type&&(r.types[e.type]=e)})),r.keywords=Ge(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),r.custom={},r),this._getId=function(e){switch(e.schemaId){case"auto":return kr;case"id":return $r;default:return jr}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=de),this._metaOpts=function(e){for(var r=A.copy(e._opts),t=0;t<Fr.length;t++)delete r[Fr[t]];return r}(this),e.formats&&function(e){for(var r in e._opts.formats){var t=e._opts.formats[r];e.addFormat(r,t)}}(this),e.keywords&&function(e){for(var r in e._opts.keywords){var t=e._opts.keywords[r];e.addKeyword(r,t)}}(this),function(e){var r;e._opts.$data&&(r=wr,e.addMetaSchema(r,r.$id,!0));if(!1===e._opts.meta)return;var t=lr;e._opts.$data&&(t=Ze(t,xr));e.addMetaSchema(t,Sr,!0),e._refs["http://json-schema.org/schema"]=Sr}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var r=e._opts.schemas;if(!r)return;if(Array.isArray(r))e.addSchema(r);else for(var t in r)e.addSchema(r[t],t)}(this)}function _r(e,r){return r=G.normalizeId(r),e._schemas[r]||e._refs[r]||e._fragments[r]}function Dr(e,r,t){for(var a in r){var o=r[a];o.meta||t&&!t.test(a)||(e._cache.del(o.cacheKey),delete r[a])}}function $r(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function jr(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function kr(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function Ir(e,r){if(e._schemas[r]||e._refs[r])throw new Error('schema with key or id "'+r+'" already exists')}function Ar(){}var Cr={$$currentLocalizeFn:function(e){if(e&&e.length)for(var r=0;r<e.length;r+=1){var t=e[r],a=void 0,o=void 0,i=void 0;switch(t.keyword){case"$ref":a="无法找到引用".concat(t.params.ref);break;case"additionalItems":a="",o=t.params.limit,a+="不允许超过".concat(o,"个元素");break;case"additionalProperties":a="不允许有额外的属性";break;case"anyOf":a="数据应为 anyOf 所指定的其中一个";break;case"const":a="应当等于常量";break;case"contains":a="应当包含一个有效项";break;case"custom":a='应当通过 "'.concat(t.keyword,' 关键词校验"');break;case"dependencies":a="",o=t.params.depsCount,a+="应当拥有属性".concat(t.params.property,"的依赖属性").concat(t.params.deps);break;case"enum":a="应当是预设定的枚举值之一";break;case"exclusiveMaximum":case"exclusiveMinimum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(i);break;case"false schema":a="布尔模式出错";break;case"format":a='应当匹配格式 "'.concat(t.params.format,'"');break;case"formatExclusiveMaximum":a="formatExclusiveMaximum 应当是布尔值";break;case"formatExclusiveMinimum":a="formatExclusiveMinimum 应当是布尔值";break;case"formatMaximum":case"formatMinimum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当是 ".concat(i);break;case"if":a='应当匹配模式 "'.concat(t.params.failingKeyword,'" ');break;case"maximum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(i);break;case"maxItems":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个项");break;case"maxLength":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个字符");break;case"maxProperties":a="",o=t.params.limit,a+="不应有多于 ".concat(o," 个属性");break;case"minimum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(i);break;case"minItems":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个项");break;case"minLength":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个字符");break;case"minProperties":a="",o=t.params.limit,a+="不应有少于 ".concat(o," 个属性");break;case"multipleOf":a="应当是 ".concat(t.params.multipleOf," 的整数倍");break;case"not":a='不应当匹配 "not" schema';break;case"oneOf":a='只能匹配一个 "oneOf" 中的 schema';break;case"pattern":a='应当匹配模式 "'.concat(t.params.pattern,'"');break;case"patternRequired":a="应当有属性匹配模式 ".concat(t.params.missingPattern);break;case"propertyNames":a="属性名 '".concat(t.params.propertyName,"' 无效");break;case"required":a="应当有必需属性 ".concat(t.params.missingProperty);break;case"switch":a="由于 ".concat(t.params.caseIndex,' 失败,未通过 "switch" 校验, ');break;case"type":a="应当是 ".concat(t.params.type," 类型");break;case"uniqueItems":a="不应当含有重复项 (第 ".concat(t.params.j," 项与第 ").concat(t.params.i," 项是重复的)");break;default:continue}t.message=a}},getCurrentLocalize:function(){return this.$$currentLocalizeFn},useLocal:function(e){this.$$currentLocalizeFn=e}};function Rr(e,r){try{if("object"===o(r))return e.fill(null).map((function(){return JSON.parse(JSON.stringify(r))}))}catch(e){}}function Nr(e,r){return e.filter((function(e){return r.includes(e)}))}function Lr(e,r,t){var a=_(e.$ref,r);e.$ref;var o=c(e,["$ref"]);return Vr(l(l({},a),o),r,t)}function Tr(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length<2)return r[0];for(var a={},o=[].concat(r),i=function(){var e=f(o[0])?o[0]:{},r=f(o[1])?o[1]:{};a=Object.assign({},e),Object.keys(r).reduce((function(t,a){var o=e[a],i=r[a];if(f(o)||f(i))if(f(o)&&f(i))t[a]=Tr(o,i);else{var n=u(f(o)?[o,i]:[i,o],2),s=n[0],l=n[1];t[a]="additionalProperties"===a?!0===l&&s:s}else if(Array.isArray(o)||Array.isArray(i))if(Array.isArray(o)&&Array.isArray(i)){if(f(o[0])||f(i[0]))throw new Error("暂不支持如上数组对象元素合并");var c=Nr([].concat(o),[].concat(i));if(c.length<=0)throw new Error("无法合并如上数据");0===c.length&&"type"===a?t[a]=c[0]:t[a]=c}else{var d=u(Array.isArray(o)?[o,i]:[i,o],2),p=d[0],h=d[1];if(void 0===h)t[a]=p;else{if(!p.includes(h))throw new Error("无法合并如下数据");t[a]=h}}else if(void 0!==o&&void 0!==i)if("maxLength"===a||"maximum"===a||"maxItems"===a||"exclusiveMaximum"===a||"maxProperties"===a)t[a]=Math.min(o,i);else if("minLength"===a||"minimum"===a||"minItems"===a||"exclusiveMinimum"===a||"minProperties"===a)t[a]=Math.max(o,i);else if("multipleOf"===a)t[a]=x(o,i);else{if(o!==i)throw new Error("无法合并如下数据");t[a]=o}else t[a]=void 0===o?i:o;return t}),a),o.splice(0,2,a)};o.length>=2;)i();return a}function zr(e,r,t){var a=l(l({},e),{},{allOf:e.allOf.map((function(e){return Vr(e,r,t)}))});try{var o=a.allOf,i=c(a,["allOf"]);return Tr.apply(void 0,[i].concat(d(o)))}catch(e){return a.allOf,c(a,["allOf"])}}function qr(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.hasOwnProperty("allOf")&&(e=zr(e,r,t)),e.hasOwnProperty("$ref")&&(e=Lr(e,r,t)),e}function Vr(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return f(e)?qr(e,r,t):{}}function Wr(e){return e?"".concat("__pathRoot",".").concat(e).replace(/\./g,"_"):"__pathRoot"}function Mr(e){return""===e}function Br(e,r){return""===e?r:[e,r].join(".")}function Ur(e,r){a.default.delete(e,r)}function Qr(e,r,t){for(var o=r.split("."),i=0;i<o.length;i+=1){if(o.length-i<2){a.default.set(e,o[o.length-1],t);break}e=e[o[i]]}}function Hr(e,r){for(var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=r.split("."),o=0;o<a.length-t;o+=1){if(void 0===e)return;e=""===a[o]?e:e[a[o]]}return e}function Kr(e){return e}var Gr=Object.freeze({__proto__:null,nodePath2ClassName:Wr,isRootNodePath:Mr,computedCurPath:Br,deletePathVal:Ur,setPathVal:Qr,getPathVal:Hr,path2prop:Kr}),Jr=/{{(.*)}}/;function Zr(e,r,t,a){if(void 0!==t){var o=Jr.exec(t);if(Jr.lastIndex=0,o){var i=o[1].trim();return new Function("parentFormData","rootFormData","return ".concat(i))(Hr(e,r,1),e)}return a()}}function Yr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.schema,t=e.uiSchema,a=arguments.length>1?arguments[1]:void 0,o=tt({schema:r,uiSchema:t,containsSpec:!1});return["title","description"].reduce((function(e,r){return o[r]&&(e["ui:".concat(r)]=String(o[r]).replace(/\$index/g,a+1)),e}),{})}function Xr(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,i=e.curNodePath,n=void 0===i?"":i,s=e.rootFormData,l=void 0===s?{}:s,c=o["ui:widget"]||t["ui:widget"],u=o["ui:hidden"]||t["ui:hidden"];return"HiddenWidget"===c||"hidden"===c||!!Zr(l,n,u,(function(){return"function"==typeof u?u(Hr(l,n,1),l):u}))}function et(e,r){var t=r.schema,a=void 0===t?{}:t,i=r.uiSchema,n=void 0===i?{}:i,s=a["ui:field"]||n["ui:field"];if("function"==typeof s||"object"===o(s)||"string"==typeof s)return{field:s,fieldProps:n["ui:fieldProps"]||a["ui:fieldProps"]};var l=e[y(a)];if(l)return{field:l};if(!l&&(a.anyOf||a.oneOf))return{field:null};throw new Error("不支持的field类型 ".concat(a.type))}function rt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.curNodePath,s=e.rootFormData,c=void 0===s?{}:s;return Object.assign.apply(Object,[{}].concat(d([t,o].map((function(e){return Object.keys(e).reduce((function(r,t){var a=e[t];return"ui:options"===t&&f(a)?l(l({},r),a):0===t.indexOf("ui:")?l(l({},r),{},i({},t.substring(3),void 0===n?a:Zr(c,n,a,(function(){return a})))):r}),{})})))))}function tt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,i=e.containsSpec,n=void 0===i||i,s=e.curNodePath,c=e.rootFormData,u={};return n&&(u.readonly=!!t.readOnly,void 0!==t.multipleOf&&(u.step=t.multipleOf),(t.minimum||0===t.minimum)&&(u.min=t.minimum),(t.maximum||0===t.maximum)&&(u.max=t.maximum),(t.minLength||0===t.minLength)&&(u.minlength=t.minLength),(t.maxLength||0===t.maxLength)&&(u.maxlength=t.maxLength),"date-time"!==t.format&&"date"!==t.format||("array"===t.type?(u.isRange=!0,u.isNumberValue=!(t.items&&"string"===t.items.type)):u.isNumberValue=!("string"===t.type))),l(l({title:t.title,description:t.description},u),rt({schema:t,uiSchema:o,curNodePath:s,rootFormData:c}))}function at(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,i=e.curNodePath,n=e.rootFormData,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,l=tt({schema:t,uiSchema:o,curNodePath:i,rootFormData:n});!l.widget&&s&&Object.assign(l,s({schema:t,uiSchema:o}));var u=l.widget,d=l.title,p=l.labelWidth,h=l.description,m=l.attrs,f=l.class,v=l.style,g=l.fieldAttrs,y=l.fieldStyle,b=l.fieldClass,P=l.emptyValue,w=l.width,E=l.getWidget,S=l.onChange,F=c(l,["widget","title","labelWidth","description","attrs","class","style","fieldAttrs","fieldStyle","fieldClass","emptyValue","width","getWidget","onChange"]);return{widget:u,label:d,labelWidth:p,description:h,widgetAttrs:m,widgetClass:f,widgetStyle:v,fieldAttrs:g,width:w,fieldStyle:y,fieldClass:b,emptyValue:P,getWidget:E,onChange:S,uiProps:F}}function ot(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.errorSchema,s=void 0===n?{}:n;return Object.assign.apply(Object,[{}].concat(d([t,o,s].map((function(e){return Object.keys(e).reduce((function(r,t){var a=e[t];return"err:options"===t&&f(a)?l(l({},r),a):0===t.indexOf("err:")?l(l({},r),{},i({},t.substring(4),a)):r}),{})})))))}function it(e,r){if(!Array.isArray(r))return e;var t,a=function(e){return e.reduce((function(e,r){return e[r]=!0,e}),{})},o=a(e),i=r.filter((function(e){return"*"===e||o[e]})),n=a(i),s=e.filter((function(e){return!n[e]})),l=i.indexOf("*");if(-1===l){if(s.length)throw new Error("uiSchema order list does not contain ".concat((t=s).length>1?"properties '".concat(t.join("', '"),"'"):"property '".concat(t[0],"'")));return i}if(l!==i.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");var c=d(i);return c.splice.apply(c,[l,1].concat(d(s))),c}function nt(e){return Array.isArray(e.enum)&&1===e.enum.length||e.hasOwnProperty("const")}function st(e){if(Array.isArray(e.enum)&&1===e.enum.length)return e.enum[0];if(e.hasOwnProperty("const"))return e.const;throw new Error("schema cannot be inferred as a constant")}function lt(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=Vr(e,r),a=t.oneOf||t.anyOf;return!!Array.isArray(t.enum)||!!Array.isArray(a)&&a.every((function(e){return nt(e)}))}function ct(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every((function(e){return f(e)}))}function ut(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!(!e.uniqueItems||!e.items)&<(e.items,r)}function dt(e){return e.additionalItems,f(e.additionalItems)}function pt(e,r,t,a){if(e.enum){var o=rt({schema:e,uiSchema:r,curNodePath:t,rootFormData:a}).enumNames||e.enumNames;return e.enum.map((function(e,r){return{label:o&&o[r]||String(e),value:e}}))}var i=e.oneOf||e.anyOf,n=r.oneOf||r.anyOf;return i.map((function(e,r){var o=n&&n[r]?rt({schema:e,uiSchema:n[r],curNodePath:t,rootFormData:a}):{},i=st(e);return{label:o.title||e.title||String(i),value:i}}))}function ht(e,r,t){if(e)return e;if(r){var a=t.split(".").pop();if(a&&a!=="".concat(Number(a)))return a}return""}var mt=Object.freeze({__proto__:null,replaceArrayIndex:Yr,isHiddenWidget:Xr,getUiField:et,getUserUiOptions:rt,getUiOptions:tt,getWidgetConfig:at,getUserErrOptions:ot,orderProperties:it,isConstant:nt,toConstant:st,isSelect:lt,isFixedItems:ct,isMultiSelect:ut,allowAdditionalItems:dt,optionsList:pt,fallbackLabel:ht}),ft=yt(),vt=null,gt=null;function yt(){var e=new Er({errorDataPath:"property",allErrors:!0,multipleOfPrecision:8,schemaId:"auto",unknownFormats:"ignore"});return e.addFormat("data-url",/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/),e.addFormat("color",/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/),e}function bt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null===e?[]:e.map((function(e){var r=e.dataPath,t=e.keyword,a=e.message,o=e.params,i=e.schemaPath,n="".concat(r);return{name:t,property:n,message:a,params:o,stack:"".concat(n," ").concat(a).trim(),schemaPath:i}}))}function Pt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.transformErrors,o=e.additionalMetaSchemas,i=void 0===o?[]:o,n=e.customFormats,s=void 0===n?{}:n,l=!b(gt,i),c=!b(vt,s);(l||c)&&(ft=yt()),i&&l&&Array.isArray(i)&&(ft.addMetaSchema(i),gt=i),s&&c&&f(s)&&(Object.keys(s).forEach((function(e){ft.addFormat(e,s[e])})),vt=s);var u=null;try{ft.validate(t,r)}catch(e){u=e}Cr.getCurrentLocalize()(ft.errors);var p=bt(ft.errors);ft.errors=null;var h=u&&u.message&&"string"==typeof u.message&&u.message.includes("no schema with key or ref ");return h&&(p=[].concat(d(p),[{stack:u.message}])),"function"==typeof a&&(p=a(p)),{errors:p}}function wt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.uiSchema,o=e.transformErrors,i=e.additionalMetaSchemas,n=void 0===i?[]:i,s=e.customFormats,l=void 0===s?{}:s,c=e.errorSchema,u=void 0===c?{}:c,d=e.required,p=void 0!==d&&d,h=e.propPath,m=void 0===h?"":h,f=e.isOnlyFirstError,v=void 0===f||f,g="array"===t.type&&Array.isArray(r)&&0===r.length,y=void 0===r||g;if(p){if(y){var b={keyword:"required",params:{missingProperty:m}},P=ot({schema:t,uiSchema:a,errorSchema:u}).required;return P?b.message=P:Cr.getCurrentLocalize()([b]),[b]}}else if(y&&!g)return[];var w=Pt({formData:r,schema:t,transformErrors:o,additionalMetaSchemas:n,customFormats:l}).errors;w=w.filter((function(e){return""===e.property&&!e.schemaPath.includes("#/anyOf/")&&!e.schemaPath.includes("#/oneOf/")||"additionalProperties"===e.name}));var E=ot({schema:t,uiSchema:a,errorSchema:u});return(v&&w.length>0?[w[0]]:w).reduce((function(e,r){return r.message=void 0!==E[r.name]?E[r.name]:r.message,e.push(r),e}),[])}function Et(e,r){try{return ft.validate(e,r)}catch(e){return!1}}function St(e,r,t){for(var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=0;o<r.length;o++){var i=Vr(r[o],t,e);if(i.properties){var s=l(l({},t.definitions?{definitions:t.definitions}:{}),{},{anyOf:Object.keys(i.properties).map((function(e){return{required:[e]}}))}),c=void 0;if(i.anyOf){var u=n({},i);u.allOf?u.allOf=u.allOf.slice():u.allOf=[],u.allOf.push(s),c=u}else c=Object.assign({},i,s);if(a||delete c.required,Et(c,e))return o}else if(Et(r[o],e))return o}return 0}var Ft=Object.freeze({__proto__:null,ajvValidateFormData:Pt,validateFormDataAndTransformMsg:wt,isValid:Et,getMatchingOption:St});function xt(e,r){if(Array.isArray(r))return Array.isArray(e)||(e=[]),r.map((function(r,t){return e[t]?xt(e[t],r):r}));if(f(r)){var t=Object.assign({},e);return Object.keys(r).reduce((function(t,a){return t[a]=xt(e?e[a]:{},r[a]),t}),t)}return r}function Ot(e,r,t){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=f(e)?e:{},n=f(a)?a:{};"allOf"in i&&(i=zr(i,t,n));var s=r;if(f(s)&&f(i.default))s=g(s,i.default);else if("default"in i)s=i.default;else{if("$ref"in i){var l=_(i.$ref,t);return Ot(l,s,t,n,o)}if(ct(i))s=i.items.map((function(e,a){return Ot(e,Array.isArray(r)?r[a]:void 0,t,n,o)}));else if("oneOf"in i){var c=Vr(i.oneOf[St(n,i.oneOf,t)],t,n);if(i.properties&&c.properties){var u=g(i,c);delete u.oneOf,i=u}else i=c}else if("anyOf"in i){var d=Vr(i.anyOf[St(n,i.anyOf,t)],t,n);if(i.properties&&d.properties){var p=g(i,d);delete p.anyOf,i=p}else i=d}}switch(void 0===s&&(s=i.default),y(i)){case"null":return null;case"object":return Object.keys(i.properties||{}).reduce((function(e,r){var a=Ot(i.properties[r],(s||{})[r],t,(n||{})[r],o);return(o||void 0!==a)&&(e[r]=a),e}),{});case"array":if(Array.isArray(s)&&(s=s.map((function(e,r){return Ot(i.items[r]||i.additionalItems||{},e,t,{},o)}))),Array.isArray(a)&&(s=a.map((function(e,r){return Ot(i.items,(s||{})[r],t,e,{},o)}))),i.minItems){if(ut(i,t))return s||[];var h=s?s.length:0;if(i.minItems>h){var m=s||[],v=Array.isArray(i.items)?i.additionalItems:i.items,b=Rr(new Array(i.minItems-h),Ot(v,v.defaults,t,{},o));return m.concat(b)}}s=void 0===s?[]:s}return s}function _t(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!f(e))throw new Error("Invalid schema: ".concat(e));var o=Vr(e,t,r),i=Ot(o,e.default,t,r,a);return void 0===r?i:f(r)||Array.isArray(r)?xt(i,r):0===r||!1===r||""===r?r:r||i}function Dt(e,r){void 0===r&&(r={});var t=r.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}Dt('.genFromComponent{font-size:14px;line-height:1;word-wrap:break-word;word-break:break-word;padding:0;margin:0}.genFromComponent a,.genFromComponent h1,.genFromComponent h2,.genFromComponent h3,.genFromComponent li,.genFromComponent p,.genFromComponent ul{font-size:14px}.genFromComponent .genFormIcon{width:12px;height:12px;vertical-align:top}.genFromComponent .genFormBtn{display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;background:#fff;border:1px solid #dcdfe6;color:#606266;-webkit-appearance:none;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;margin:0;-webkit-transition:.1s;transition:.1s;font-weight:500;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;padding:12px 20px;font-size:14px;border-radius:4px}.genFromComponent .genFormBtn.is-plain:focus,.genFromComponent .genFormBtn.is-plain:hover{background:#fff;border-color:#409eff;color:#409eff}.genFromComponent .hiddenWidget{display:none}.genFromComponent .fieldGroupWrap+.fieldGroupWrap .fieldGroupWrap_title{margin-top:20px}.genFromComponent .fieldGroupWrap_title{position:relative;display:block;width:100%;line-height:26px;margin-bottom:8px;font-size:15px;font-weight:700;border:0}.genFromComponent .fieldGroupWrap_des{font-size:12px;line-height:20px;margin-bottom:10px;color:#999}.genFromComponent .genFromWidget_des{padding:0;margin-top:0;margin-bottom:2px;font-size:12px;line-height:20px;color:#999;text-align:left}.genFromComponent .formItemErrorBox{margin:0 auto;color:#ff5757;padding-top:2px;position:absolute;top:100%;left:0;display:-webkit-box!important;line-height:16px;text-overflow:ellipsis;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1;white-space:normal;font-size:12px;text-align:left}.genFromComponent .genFormIcon-qs{fill:#606266;vertical-align:middle;display:inline-block;width:16px;height:16px;margin-left:2px;margin-top:-2px;cursor:pointer}.genFromComponent .genFormItemRequired:before{content:"*";color:#f56c6c;margin-right:4px}.genFromComponent .appendCombining_box{margin-bottom:22px}.genFromComponent .appendCombining_box .appendCombining_box{margin-bottom:10px}.genFromComponent .appendCombining_box{padding:10px;background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .validateWidget{margin-bottom:0!important;width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important;padding:0!important}.genFromComponent .validateWidget .formItemErrorBox{padding:5px 0;position:relative}.genFromComponent .arrayField:not(.genFormItem){margin-bottom:22px}.genFromComponent .arrayField:not(.genFormItem) .arrayField{margin-bottom:10px}.genFromComponent .arrayOrderList{background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .arrayOrderList_item{position:relative;padding:25px 10px 12px;border-radius:2px;margin-bottom:6px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.genFromComponent .arrayOrderList_bottomAddBtn{text-align:right;padding:15px 10px;margin-bottom:10px}.genFromComponent .bottomAddBtn{width:40%;min-width:10px;max-width:180px}.genFromComponent .arrayListItem_content{padding-top:15px;-webkit-box-flex:1;-ms-flex:1;flex:1;margin:0 auto;-webkit-box-shadow:0 -1px 0 0 rgba(0,0,0,.05);box-shadow:0 -1px 0 0 rgba(0,0,0,.05)}.genFromComponent .arrayListItem_index,.genFromComponent .arrayListItem_operateTool{position:absolute;height:25px}.genFromComponent .arrayListItem_index{top:6px;line-height:18px;height:18px;padding:0 6px;background-color:rgba(0,0,0,.28);color:#fff;font-size:12px;border-radius:2px}.genFromComponent .arrayListItem_operateTool{width:75px;right:9px;top:-1px;text-align:right;font-size:0}.genFromComponent .arrayListItem_btn{vertical-align:top;display:inline-block;padding:6px;margin:0;font-size:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none;cursor:pointer;text-align:center;background:transparent;color:#666}.genFromComponent .arrayListItem_btn:hover{opacity:.6}.genFromComponent .arrayListItem_btn[disabled]{color:#999;opacity:.3!important;cursor:not-allowed}.genFromComponent .arrayListItem_orderBtn-bottom,.genFromComponent .arrayListItem_orderBtn-top{background-color:#f0f9eb}.genFromComponent .arrayListItem_btn-delete{background-color:#fef0f0}.genFromComponent .formFooter_item{text-align:right;border-top:1px solid rgba(0,0,0,.08);padding-top:10px}.genFromComponent.formInlineFooter>.fieldGroupWrap{display:inline-block;margin-right:10px}.genFromComponent.formInline .genFormItem{display:inline-block;margin-right:10px;vertical-align:top}.genFromComponent.formInline .validateWidget{margin-right:0}.genFromComponent.formInline .formFooter_item{border-top:none;padding-top:0}.layoutColumn .layoutColumn_w100{width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important}.layoutColumn .fieldGroupWrap_box{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start}.layoutColumn .fieldGroupWrap_box>div{width:100%;-ms-flex-preferred-size:100%;flex-basis:100%}.layoutColumn .fieldGroupWrap_box>.genFormItem{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;-webkit-box-sizing:border-box;box-sizing:border-box;padding-right:10px}.layoutColumn.layoutColumn-1 .fieldGroupWrap_box>.genFormItem{padding-right:0}.layoutColumn.layoutColumn-2 .fieldGroupWrap_box>.genFormItem{width:50%;-ms-flex-preferred-size:50%;flex-basis:50%}.layoutColumn.layoutColumn-3 .fieldGroupWrap_box>.genFormItem{width:33.333%;-ms-flex-preferred-size:33.333%;flex-basis:33.333%}');var $t={formFooter:{type:Object,default:function(){return{show:!0,okBtn:"保存",cancelBtn:"取消"}}},value:{type:null,default:function(){return{}},required:!0},formProps:{type:Object,default:function(){return{}}},fallbackLabel:{type:Boolean,default:!1},schema:{type:Object,default:function(){return{}},required:!0},uiSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},errorSchema:{type:Object,default:function(){return{}}}},jt={name:"FormFooter",props:{okBtn:{type:String,default:"保存"},cancelBtn:{type:String,default:"取消"},formItemAttrs:{type:Object,default:function(){return{}}},globalOptions:null},render:function(e){var r=this,t=this.$props,a=t.okBtn,o=t.cancelBtn,i=t.globalOptions.COMPONENT_MAP;return e(i.formItem,l({class:{formFooter_item:!0}},this.formItemAttrs),[e(i.button,{on:{click:function(){r.$emit("onCancel")}}},o),e(i.button,{style:{marginLeft:"10px"},props:{type:"primary"},on:{click:function(){r.$emit("onSubmit")}}},a)])}};var kt=function(e,r,t,a,o,i,n,s,l,c){"boolean"!=typeof n&&(l=s,s=n,n=!1);var u,d="function"==typeof t?t.options:t;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,o&&(d.functional=!0)),a&&(d._scopeId=a),i?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(i)},d._ssrRegister=u):r&&(u=n?function(e){r.call(this,c(e,this.$root.$options.shadowRoot))}:function(e){r.call(this,s(e))}),u)if(d.functional){var p=d.render;d.render=function(e,r){return u.call(r),p(e,r)}}else{var h=d.beforeCreate;d.beforeCreate=h?[].concat(h,u):[u]}return t},It={name:"FieldGroupWrap",inject:["genFormProvide"],props:{curNodePath:{type:String,default:""},showTitle:{type:Boolean,default:!0},showDescription:{type:Boolean,default:!0},title:{type:String,default:""},description:{type:String,default:""}},computed:{trueTitle:function(){var e=this.title;if(e)return e;var r=(this.genFormProvide.value||this.genFormProvide).fallbackLabel&&this.curNodePath.split(".").pop();return r!=="".concat(Number(r))?r:""}}},At=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("div",{staticClass:"fieldGroupWrap"},[e.showTitle&&e.trueTitle?t("h3",{staticClass:"fieldGroupWrap_title"},[e._v("\n "+e._s(e.trueTitle)+"\n ")]):e._e(),e._v(" "),e.showDescription&&e.description?t("p",{staticClass:"fieldGroupWrap_des",domProps:{innerHTML:e._s(e.description)}}):e._e(),e._v(" "),t("div",{staticClass:"fieldGroupWrap_box"},[e._t("default")],2)])};At._withStripped=!0;var Ct=kt({render:At,staticRenderFns:[]},void 0,It,void 0,!1,void 0,!1,void 0,void 0,void 0),Rt={formProps:{type:null},globalOptions:{type:null},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},customFormats:{type:Object,default:function(){return{}}},rootSchema:{type:Object,default:function(){return{}}},rootFormData:{type:null,default:function(){return{}}},curNodePath:{type:String,default:""},required:{type:Boolean,default:!1},needValidFieldGroup:{type:Boolean,default:!0}},Nt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-down",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}})])};Nt._withStripped=!0;var Lt=kt({render:Nt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Tt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-up",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}})])};Tt._withStripped=!0;var zt=kt({render:Tt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),qt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-close",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1\n 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0\n 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}})])};qt._withStripped=!0;var Vt=kt({render:qt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Wt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-plus",attrs:{t:"1551322312294",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"10297","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"200",height:"200"}},[r("path",{attrs:{d:"M474 152m8 0l60 0q8 0 8 8l0 704q0 8-8 8l-60 0q-8 0-8-8l0-704q0-8 8-8Z","p-id":"10298"}}),this._v(" "),r("path",{attrs:{d:"M168 474m8 0l672 0q8 0 8 8l0 60q0 8-8 8l-672 0q-8 0-8-8l0-60q0-8 8-8Z","p-id":"10299"}})])};Wt._withStripped=!0;var Mt=kt({render:Wt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Bt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-qs",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 708c-22.1\n 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 0\n 0-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8\n 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6\n 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6\n 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z"}})])};Bt._withStripped=!0;var Ut=kt({render:Bt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Qt={name:"Widget",inject:["genFormProvide"],props:{isFormData:{type:Boolean,default:!0},curValue:{type:null,default:0},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},widget:{type:[String,Function,Object],default:null},required:{type:Boolean,default:!1},emptyValue:{type:null,default:void 0},formatValue:{type:[Function],default:function(e){return{update:!0,value:e}}},rootFormData:{type:null},curNodePath:{type:String,default:""},label:{type:String,default:""},width:{type:String,default:""},labelWidth:{type:String,default:""},description:{type:String,default:""},widgetAttrs:{type:Object,default:function(){return{}}},widgetClass:{type:Object,default:function(){return{}}},widgetStyle:{type:Object,default:function(){return{}}},fieldAttrs:{type:Object,default:function(){return{}}},fieldClass:{type:Object,default:function(){return{}}},fieldStyle:{type:Object,default:function(){return{}}},uiProps:{type:Object,default:function(){return{}}},formProps:null,getWidget:null,globalOptions:null,onChange:null},computed:{value:{get:function(){return this.isFormData?Hr(this.rootFormData,this.curNodePath):this.curValue},set:function(e){var r=""===e||null===e?this.emptyValue:e;this.isFormData&&Qr(this.rootFormData,this.curNodePath,r),this.$emit("onChange",r)}}},created:function(){this.uiProps.enumOptions&&this.uiProps.enumOptions.length>0&&void 0===this.value&&this.value!==this.uiProps.enumOptions[0]&&(this.schema.items?this.value=[]:this.required&&(this.value=this.uiProps.enumOptions[0].value))},render:function(e){var r=this,t=this.$props.curNodePath,a=Mr(t),o=r.globalOptions.HELPERS.isMiniDes(r.formProps),i=r.description?e("div",{domProps:{innerHTML:r.description},class:{genFromWidget_des:!0}}):null,n=r.globalOptions.COMPONENT_MAP,s=o&&i?e(n.popover,{style:{margin:"0 2px",fontSize:"16px",cursor:"pointer"},props:{placement:"top",trigger:"hover"}},[i,e(Ut,{slot:"reference"})]):null,c=l(l({},r.fieldStyle),r.width?{width:r.width,flexBasis:r.width,paddingRight:"10px"}:{}),u=ht(r.label,r.widget&&this.genFormProvide.fallbackLabel,t);return e(n.formItem,{class:l(l({},r.fieldClass),{},{genFormItem:!0}),style:c,attrs:r.fieldAttrs,props:l(l({},r.labelWidth?{labelWidth:r.labelWidth}:{}),this.isFormData?{prop:a?"__$$root":t,rules:[{validator:function(e,o,i){a&&(o=r.rootFormData);var n=wt({formData:o,schema:r.$props.schema,uiSchema:r.$props.uiSchema,customFormats:r.$props.customFormats,errorSchema:r.errorSchema,required:r.required,propPath:t});if(n.length>0)return i(n[0].message);var s=r.$props.customRule;return s&&"function"==typeof s?s({field:t,value:o,rootFormData:r.rootFormData,callback:i}):i()},trigger:"blur"}]}:{}),scopedSlots:{error:function(r){return r.error?e("div",{class:{formItemErrorBox:!0},attrs:{title:r.error}},[r.error]):null}}},[u?e("span",{slot:"label",class:{genFormLabel:!0,genFormItemRequired:r.required}},["".concat(u),s,"".concat(r.formProps&&r.formProps.labelSuffix||"")]):null,o?null:i,e(r.widget,{style:r.widgetStyle,class:r.widgetClass,attrs:l(l(l({},r.widgetAttrs),r.uiProps),{},{value:this.value}),ref:"widgetRef",on:{"hook:mounted":function(){r.getWidget&&"function"==typeof r.getWidget&&r.getWidget.call(null,r.$refs.widgetRef)},input:function(e){var t=r.formatValue(e),a=r.value;t.update&&a!==t.value&&(r.value=t.value,r.onChange&&r.onChange(t.value,a))}}})])}},Ht={name:"ObjectField",functional:!0,props:Rt,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,i=t.errorSchema,n=t.needValidFieldGroup,s=t.curNodePath,c=t.rootFormData,p=t.globalOptions,h=tt({schema:a,uiSchema:o,curNodePath:s,rootFormData:c}),m=h.title,v=h.description,g=h.showTitle,y=h.showDescription,b=h.order,P=h.fieldClass,w=h.fieldAttrs,E=h.fieldStyle,S=h.onlyShowIfDependent,F=it(Object.keys(a.properties||{}),b).map((function(t){var n=function(e){return Array.isArray(a.required)&&!!~a.required.indexOf(e)}(t),d=function(e){var r=!1,t=!1;return f(a.dependencies)&&(t=Object.entries(a.dependencies).some((function(t){var a=u(t,2),o=a[0],i=a[1],n=!(!Array.isArray(i)||!~i.indexOf(e));return r=r||n,n&&void 0!==Hr(c,s)[o]}))),{isDependency:r,curDependent:t}}(t),p=d.isDependency,h=d.curDependent;return p&&S&&!h?null:e(na,{key:t,props:l(l({},r.props),{},{schema:a.properties[t],uiSchema:o[t],errorSchema:i[t],required:n||h,curNodePath:Br(s,t)})})}));return e(Ct,{props:{title:m,description:v,showTitle:g,showDescription:y,curNodePath:s},class:l(l({},r.data.class),P),attrs:w,style:E},[e("template",{slot:"default"},[].concat(d(F),[n?e(Qt,{key:"validateWidget-object",class:{validateWidget:!0,"validateWidget-object":!0},props:{schema:Object.entries(a).reduce((function(e,r){var t=u(r,2),o=t[0],i=t[1];return!1!==a.additionalProperties&&["properties","id","$id"].includes(o)||(e[o]=i),e}),{}),uiSchema:o,errorSchema:i,curNodePath:s,rootFormData:c,globalOptions:p}}):null]))])}},Kt={name:"StringField",props:Rt,functional:!0,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,i=t.curNodePath,n=t.rootFormData,s=t.globalOptions.WIDGET_MAP,c=lt(a)&&pt(a,o,i,n),u=at({schema:a,uiSchema:o,curNodePath:i,rootFormData:n},(function(){var e="number"===a.type||"integer"===a.type;return{widget:c?s.common.select:s.formats[a.format]||(e?s.types.number:s.types.string)}}));return c&&!u.uiProps.enumOptions&&(u.uiProps.enumOptions=c),e(Qt,l(l({},r.data),{},{props:l(l({},r.props),u)}))}},Gt={name:"NumberField",props:Rt,functional:!0,render:function(e,r){return e(Kt,r.data)}},Jt={name:"IntegerField",props:Rt,functional:!0,render:function(e,r){return e(Kt,r.data)}},Zt={name:"BooleanField",props:Rt,functional:!0,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,i=t.curNodePath,n=t.rootFormData,s=t.globalOptions,c=pt({enumNames:a.enumNames||["true","false"],enum:a.enum||[!0,!1]},o,i,n),u=at({schema:a,uiSchema:o,curNodePath:i,rootFormData:n},(function(){return{widget:s.WIDGET_MAP.types.boolean}}));return u.uiProps.enumOptions=u.uiProps.enumOptions||c,e(Qt,l(l({},r.data),{},{props:l(l({},r.props),u)}))}},Yt={name:"ArrayOrderList",props:{vNodeList:{type:Array,default:[]},tupleItemsLength:{type:Number,default:0},addable:{type:Boolean,default:!0},showIndexNumber:{type:Boolean,default:!1},sortable:{type:Boolean,default:!0},removable:{type:Boolean,default:!0},maxItems:{},minItems:{},globalOptions:null},computed:{canAdd:function(){var e=this.$props,r=e.addable,t=e.maxItems,a=e.vNodeList;return!!r&&(void 0===t||a.length<t)},canRemove:function(){var e=this.$props,r=e.removable,t=e.minItems,a=e.vNodeList;return!!r&&(void 0===t||a.length>t)}},render:function(e){var r=this;return this.vNodeList.length<=0&&!this.addable?null:e("div",{class:{arrayOrderList:!0}},this.vNodeList.map((function(t,a){var o=t.key,i=t.vNode,n=r.tupleItemsLength+a,s=a+1;return e("div",{key:o,class:{arrayOrderList_item:!0}},[r.showIndexNumber?e("div",{class:{arrayListItem_index:!0}},s):null,e("div",{class:{arrayListItem_operateTool:!0}},[e("button",{style:l({},r.sortable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.sortable||0===a},class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-top":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"moveUp",data:{index:n}})}}},[e(zt)]),e("button",{style:l({},r.sortable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.sortable||a===r.vNodeList.length-1},class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-bottom":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"moveDown",data:{index:n}})}}},[e(Lt)]),e("button",{style:l({},r.removable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.canRemove},class:{arrayListItem_btn:!0,"arrayListItem_btn-delete":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"remove",data:{index:n}})}}},[e(Vt)])]),e("div",{class:{arrayListItem_content:!0}},[i])])})).concat([e("p",{style:l({},this.canAdd?{}:{display:"none"}),class:{arrayOrderList_bottomAddBtn:!0}},[e("button",{attrs:{type:"button"},class:{bottomAddBtn:!0,"is-plain":!0,genFormBtn:!0},on:{click:function(){r.$emit("onArrayOperate",{command:"add"})}}},[e(Mt,{style:{marginRight:"5px"}}),this.maxItems?"( ".concat(this.vNodeList.length," / ").concat(this.maxItems," )"):""])])]))}},Xt={name:"ArrayFieldNormal",functional:!0,props:l(l({},Rt),{},{itemsFormData:{type:Array}}),render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,i=t.curNodePath,n=t.rootFormData,s=t.itemsFormData,c=t.errorSchema,u=t.globalOptions,d=tt({schema:a,uiSchema:o,curNodePath:i,rootFormData:n}),p=d.title,h=d.description,m=d.addable,f=d.showIndexNumber,v=d.sortable,g=d.removable,y=d.showTitle,b=d.showDescription,P=d.fieldClass,w=d.fieldAttrs,E=d.fieldStyle,S=s.map((function(t,n){var s=Yr({schema:a.items,uiSchema:o.items},n);return{key:t.key,vNode:e(na,{key:t.key,props:l(l({},r.props),{},{schema:a.items,required:![].concat(a.items.type).includes("null"),uiSchema:l(l({},o.items),s),errorSchema:c.items,curNodePath:Br(i,n)})})}}));return e(Ct,{props:{title:p,description:h,showTitle:y,showDescription:b,curNodePath:i},class:l(l({},r.data.class),P),attrs:w,style:E},[e(Yt,{props:{vNodeList:S,showIndexNumber:f,addable:m,sortable:v,removable:g,maxItems:a.maxItems,minItems:a.minItems,globalOptions:u},on:r.listeners})])}},ea={name:"ArrayFieldMultiSelect",functional:!0,props:l({},Rt),render:function(e,r){var t=r.props,a=t.schema,o=t.rootSchema,i=t.uiSchema,n=t.curNodePath,s=t.rootFormData,c=t.globalOptions,u=pt(Vr(a.items,o),i,n,s),d=at({schema:a,uiSchema:i,curNodePath:n,rootFormData:s},(function(){return{widget:c.WIDGET_MAP.common.checkboxGroup}}));return d.uiProps.multiple=!0,u&&!d.uiProps.enumOptions&&(d.uiProps.enumOptions=u),e(Qt,l(l({},r.data),{},{props:l(l({},r.props),d)}))}},ra={name:"ArrayFieldTuple",props:l(l({},Rt),{},{itemsFormData:{type:Array,default:function(){return[]}}}),created:function(){this.fixItemsFormData()},methods:{fixItemsFormData:function(){var e=!Array.isArray(this.itemsFormData);if(e||this.itemsFormData.length<this.schema.items.length){var r=_t(this.schema,void 0,this.rootSchema);e?this.$emit("onArrayOperate",{command:"setNewTarget",data:{newTarget:r}}):this.$emit("onArrayOperate",{command:"batchPush",data:{pushArray:r.slice(this.itemsFormData.length)}})}}},render:function(e){var r=this;if(!Array.isArray(this.itemsFormData))return null;var t,a,o=this.$props,i=o.schema,n=o.uiSchema,s=o.errorSchema,c=o.curNodePath,u=o.globalOptions,p=tt({schema:i,uiSchema:n,curNodePath:c,rootFormData:this.rootFormData}),h=p.title,m=p.description,f=p.addable,v=p.showIndexNumber,g=p.sortable,y=p.removable,b=p.showTitle,P=p.showDescription,w=p.fieldClass,E=p.fieldAttrs,S=p.fieldStyle,F=(t=this.itemsFormData,a=this.schema.items.length-1,t.reduce((function(e,r,t){return e[t>a?1:0].push(r),e}),[[],[]])),x=F[0].map((function(t,a){return e(na,{key:t.key,props:l(l({},r.$props),{},{required:![].concat(i.items[a].type).includes("null"),schema:i.items[a],uiSchema:n.items?n.items[a]:{},errorSchema:s.items?s.items[a]:{},curNodePath:Br(c,a)})})})),O=F[1].map((function(t,a){var o=Yr({schema:i.additionalItems,uiSchema:n.additionalItems},a);return{key:t.key,vNode:e(na,{key:t.key,props:l(l({},r.$props),{},{schema:i.additionalItems,required:![].concat(i.additionalItems.type).includes("null"),uiSchema:l(l({},n.additionalItems),o),errorSchema:s.additionalItems,curNodePath:Br(c,a+i.items.length)})})}})),_=(void 0===f||f)&&dt(this.schema);return e(Ct,{props:{title:h,description:m,showTitle:b,showDescription:P,curNodePath:c},class:w,attrs:E,style:S},[].concat(d(x),[e(Yt,{props:{vNodeList:O,tupleItemsLength:i.items.length,addable:_,showIndexNumber:v,sortable:g,removable:y,maxItems:i.maxItems,minItems:i.minItems,globalOptions:u},on:this.$listeners})]))}},ta={name:"ArrayFieldSpecialFormat",props:Rt,functional:!0,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,i=t.curNodePath,n=t.rootFormData,s=at({schema:l({"ui:widget":t.globalOptions.WIDGET_MAP.formats[a.format]},a),uiSchema:o,curNodePath:i,rootFormData:n});return e(Qt,l(l({},r.data),{},{props:l(l({},r.props),s)}))}},aa={name:"ArrayField",props:Rt,data:function(){return{formKeys:this.getCuFormData().map((function(){return E()}))}},computed:{itemsFormData:function(){var e=this.$data.formKeys;return this.curFormData.map((function(r,t){return{key:e[t],value:r}}))},curFormData:function(){return this.getCuFormData()}},watch:{curFormData:function(e,r){e!==r&&Array.isArray(e)&&(this.formKeys=e.map((function(){return E()})))}},methods:{getCuFormData:function(){var e=this.$props,r=Hr(e.rootFormData,e.curNodePath);return Array.isArray(r)?r:[]},getNewFormDataRow:function(){var e=this.$props,r=e.schema,t=e.rootSchema,a=r.items;return ct(this.schema)&&dt(this.schema)&&(a=r.additionalItems),_t(a,void 0,t)},handleArrayOperate:function(e){var r=e.command,t=e.data,a={moveUp:function(e,r){!function(e,r){if(0===r)return!1;var t=[e[r],e[r-1]];e.splice.apply(e,[r-1,2].concat(t))}(e,r.index)},moveDown:function(e,r){!function(e,r){if(r===e.length-1)return!1;var t=e[r],a=[e[r+1],t];e.splice.apply(e,[r,2].concat(a))}(e,r.index)},remove:function(e,r){!function(e,r){e.splice(r,1).length}(e,r.index)},add:function(e,r){var t=r.newRowData;e.push(t)},batchPush:function(e,r){r.pushArray.forEach((function(r){e.push(r)}))},setNewTarget:function(e,r){Qr(r.formData,r.nodePath,r.newTarget)}}[r];if(!a)throw new Error("错误 - 未知的操作:[".concat(r,"]"));var o=t,i=t;"add"===r?(o={newRowData:this.getNewFormDataRow()},i={newRowData:E()}):"batchPush"===r?i={pushArray:o.pushArray.map((function(e){return E()}))}:"setNewTarget"===r&&(o={formData:this.rootFormData,nodePath:this.curNodePath,newTarget:o.newTarget},i={formData:this.$data,nodePath:"formKeys",newTarget:o.newTarget.map((function(e){return E()}))}),a.apply(this,[this.$data.formKeys,i]),a.apply(this,[this.curFormData,o])}},render:function(e){var r=this.$props,t=r.schema,a=r.uiSchema,o=r.rootSchema,n=r.rootFormData,s=r.curNodePath,c=r.globalOptions;if(!t.hasOwnProperty("items"))throw new Error("[".concat(t,"] 请先定义 items属性"));if(ut(t,o))return e(ea,{props:this.$props,class:i({},F(ea.name),!0)});if(t.format||t["ui:widget"]||a["ui:widget"])return e(ta,{props:this.$props,class:i({},F(ta.name),!0)});var d=ct(t)?ra:Xt;return e("div",[e(d,{props:l({itemsFormData:this.itemsFormData},this.$props),class:i({},F(d.name),!0),on:{onArrayOperate:this.handleArrayOperate}}),this.needValidFieldGroup?e(Qt,{key:"validateWidget-array",class:{validateWidget:!0,"validateWidget-array":!0},props:{schema:Object.entries(this.$props.schema).reduce((function(e,r){var t=u(r,2),a=t[0],o=t[1];return"items"!==a&&(e[a]=o),e}),{}),uiSchema:a,errorSchema:this.errorSchema,curNodePath:s,rootFormData:n,globalOptions:c}}):null])}},oa={name:"SelectLinkageField",props:l(l({},Rt),{},{combiningType:{type:String,default:"anyOf"},selectList:{type:Array,require:!0}}),data:function(){return{curSelectIndex:this.computedCurSelectIndexByFormData(Hr(this.rootFormData,this.curNodePath))}},methods:{computedCurSelectIndexByFormData:function(e){var r=St(e,this.selectList,this.rootSchema,!0);return 0!==r?r:this.curSelectIndex||0},getSelectBoxVNode:function(){var e=this,r=at({schema:this.schema["".concat(this.combiningType,"Select")]||{},uiSchema:this.uiSchema["".concat(this.combiningType,"Select")]||{},curNodePath:this.curNodePath,rootFormData:this.rootFormData},(function(){return{widget:"SelectWidget"}}));if(r.label=r.label||this.schema.title,r.description=r.description||this.schema.description,!r.uiProps.enumOptions){var t=this.uiSchema[this.combiningType]||[];r.uiProps.enumOptions=this.selectList.map((function(e,r){return{label:tt({schema:e,uiSchema:t[r],containsSpec:!1}).title||"选项 ".concat(r+1),value:r}}))}return this.$createElement(Qt,{key:"fieldSelect_".concat(this.combiningType),class:i({},"fieldSelect_".concat(this.combiningType),!0),props:l({isFormData:!1,curValue:this.curSelectIndex,globalOptions:this.globalOptions},r),on:{onChange:function(r){e.curSelectIndex=r}}})}},watch:{curSelectIndex:function(e,r){var t=Hr(this.rootFormData,this.curNodePath),a=_t(this.selectList[e],void 0,this.rootSchema),o=Object.prototype.hasOwnProperty;if(f(t)){var i=Vr(this.selectList[r],this.rootSchema);if("object"===y(i))for(var n in i.properties)o.call(i.properties,n)&&!o.call(a,n)&&Ur(t,n)}f(a)?Object.entries(a).forEach((function(e){var r=u(e,2),a=r[0],o=r[1];void 0!==o&&Qr(t,a,o)})):Qr(this.rootFormData,this.curNodePath,a||t)}},render:function(e){var r,t=this,a=this.$props.curNodePath,o=Wr(a),n=null;if(("object"===this.schema.type||this.schema.properties)&&!function(e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!1;return!0}(this.schema.properties)){var s,u=Object.assign({},this.schema);delete u[this.combiningType],n=e(na,{key:"origin_".concat(this.combiningType),class:(s={},i(s,"".concat(this.combiningType,"_originBox"),!0),i(s,"".concat(o,"-originBox"),!0),s),props:l(l({},this.$props),{},{schema:u})})}var d=[this.getSelectBoxVNode()],p=this.selectList[this.curSelectIndex];if(p){var h=this.schema,f=this.combiningType,v="".concat(this.combiningType,"Select");h.properties,h[f],h[v];var g=c(h,["properties",f,v].map(m));p=Object.assign({},g,p);var y=S(tt({schema:this.schema,uiSchema:this.uiSchema,containsSpec:!1,curNodePath:a,rootFormData:this.rootFormData}),(function(e){return e===t.combiningType?void 0:"ui:".concat(e)})),b=S(ot({schema:this.schema,uiSchema:this.uiSchema,errorSchema:this.errorSchema}),(function(e){return e===t.combiningType?void 0:"err:".concat(e)}));d.push(e(na,{key:"appendSchema_".concat(this.combiningType),props:l(l({},this.$props),{},{schema:l({"ui:showTitle":!1,"ui:showDescription":!1},p),required:this.required,uiSchema:l(l({},y),(this.uiSchema[this.combiningType]||[])[this.curSelectIndex]),errorSchema:l(l({},b),(this.errorSchema[this.combiningType]||[])[this.curSelectIndex])})}))}return d.push(e(Qt,{key:"validateWidget-".concat(this.combiningType),class:i({validateWidget:!0},"validateWidget-".concat(this.combiningType),!0),props:{schema:this.schema,uiSchema:this.uiSchema,errorSchema:this.errorSchema,curNodePath:this.curNodePath,rootFormData:this.rootFormData,globalOptions:this.globalOptions}})),e("div",[n,e("div",{key:"appendBox_".concat(this.combiningType),class:(r={appendCombining_box:!0},i(r,"".concat(this.combiningType,"_appendBox"),!0),i(r,"".concat(o,"-appendBox"),!0),r)},d)])}},ia={array:aa,boolean:Zt,integer:Jt,number:Gt,object:Ht,string:Kt,null:{render:function(){return null}},anyOf:{name:"AnyOfField",functional:!0,render:function(e,r){var t=r.data,a=t.props,o=c(t,["props"]);return e(oa,l(l({},o),{},{props:l(l({},a),{},{combiningType:"anyOf",selectList:a.schema.anyOf})}),r.children)}},oneOf:{name:"oneOfField",functional:!0,render:function(e,r){var t=r.data,a=t.props,o=c(t,["props"]);return e(oa,l(l({},o),{},{props:l(l({},a),{},{combiningType:"oneOf",selectList:a.schema.oneOf})}),r.children)}}},na={name:"SchemaField",props:Rt,functional:!0,render:function(e,r){var t,a=r.props,o=a.rootSchema,n=Vr(a.schema,o),s=l(l({},a),{},{schema:n});if(0===Object.keys(n).length)return null;var c,u,d=et(ia,s),p=d.field,h=d.fieldProps,m=Xr({schema:n,uiSchema:a.uiSchema,curNodePath:a.curNodePath,rootFormData:a.rootFormData}),f=Wr(a.curNodePath);return n.anyOf&&n.anyOf.length>0&&!lt(n)?e(ia.anyOf,{class:(c={},i(c,"".concat(f,"-anyOf"),!0),i(c,"fieldItem",!0),i(c,"anyOfField",!0),c),props:s}):n.oneOf&&n.oneOf.length>0&&!lt(n)?e(ia.oneOf,{class:(u={},i(u,"".concat(f,"-oneOf"),!0),i(u,"fieldItem",!0),i(u,"oneOfField",!0),u),props:s}):p&&!m?e(p,{props:l(l({},s),{},{fieldProps:h}),class:l(l({},r.data.class),{},(t={},i(t,F(p.name)||p,!0),i(t,"hiddenWidget",m),i(t,"fieldItem",!0),i(t,f,!0),t))}):null}};var sa={name:"CheckboxesWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}},la=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("checkbox-group",e._g(e._b({},"checkbox-group",e.$attrs,!1),e.$listeners),e._l(e.enumOptions,(function(r,a){return t("checkbox",{key:a,attrs:{label:r.value}},[e._v("\n "+e._s(r.label)+"\n ")])})),1)};la._withStripped=!0;var ca=kt({render:la,staticRenderFns:[]},void 0,sa,void 0,!1,void 0,!1,void 0,void 0,void 0),ua={name:"RadioWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}},da=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("radio-group",e._g(e._b({},"radio-group",e.$attrs,!1),e.$listeners),e._l(e.enumOptions,(function(r,a){return t("radio",{key:a,attrs:{label:r.value}},[e._v("\n "+e._s(r.label)+"\n ")])})),1)};da._withStripped=!0;var pa=kt({render:da,staticRenderFns:[]},void 0,ua,void 0,!1,void 0,!1,void 0,void 0,void 0),ha={name:"SelectWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}},ma=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("i-select",e._g(e._b({},"i-select",e.$attrs,!1),e.$listeners),e._l(e.enumOptions,(function(r,a){return t("i-option",{key:a,attrs:{value:r.value}},[e._v("\n "+e._s(r.label)+"\n ")])})),1)};ma._withStripped=!0;var fa=function(e){return"0".concat(e).substr(-2)};function va(e,r){if(!e)return"";var t=new Date(e);if(r)return t.toISOString();var a={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()},o=a.month,i=a.day;return"".concat(a.year,"-").concat(fa(o),"-").concat(fa(i))}var ga=function(e){return Array.isArray(e)?e.map((function(r){return e&&new Date(r)})):e&&new Date(e)};function ya(e){return null===e||""===e||Array.isArray(e)&&e.every((function(e){return""===e}))}var ba={name:"DatePickerWidget",props:{value:{type:null},isNumberValue:{type:Boolean,default:!1},isDatetime:{type:Boolean,default:!1},isRange:{type:Boolean,default:!1}},data:function(){return{originValue:ga(this.value),formatValue:this.formatDate(this.value)}},watch:{value:function(e){e===this.formatValue||(this.originValue=ga(e))}},computed:{type:function(){return this.isDatetime?this.isRange?"datetimerange":"datetime":this.isRange?"daterange":"date"}},methods:{formatDate:function(e){var r=this.$props,t=r.isRange,a=r.isNumberValue,o=r.isDatetime;return t?ya(e)?[]:e.map((function(e){return a?new Date(e).valueOf():va(e,o)})):ya(e)?void 0:a?new Date(e).valueOf():va(e,o)}},render:function(e){var r=this;return e("date-picker",{attrs:l({type:this.type,value:this.originValue},this.$attrs),on:l(l({},this.$listeners),{},{input:function(e){r.originValue=e,r.formatValue=r.formatDate(e),r.$emit("input",r.formatValue)}})})}},Pa={CheckboxesWidget:ca,RadioWidget:pa,SelectWidget:kt({render:ma,staticRenderFns:[]},void 0,ha,void 0,!1,void 0,!1,void 0,void 0,void 0),TimePickerWidget:{name:"TimePickerWidget",functional:!0,render:function(e,r){var t=r.data.on.input;return r.data.on=l(l({},r.data.on),{},{input:function(e){t.apply(r.data.on,[null===e?void 0:e])}}),e("time-picker",r.data,r.children)}},DatePickerWidget:ba,DateTimePickerWidget:{name:"DateTimePickerWidget",functional:!0,render:function(e,r){return r.data.attrs.isDatetime=!0,e(ba,r.data,r.children)}},UploadWidget:{name:"UploadWidget",props:{value:{default:null,type:[String,Array]},responseFileUrl:{default:function(e){return e?e.url||e.data&&e.data.url:""},type:[Function]},btnText:{type:String,default:"点击上传"},slots:{type:null,default:null}},data:function(){var e=this.value,r=Array.isArray(e),t=this.$attrs.fileList||(r?e.map((function(e,r){return{name:"已上传文件(".concat(r+1,")"),url:e}})):e?[{name:"已上传文件",url:e}]:[]);return{isArrayValue:r,fileList:t}},methods:{getUrl:function(e){return e&&(e.response&&this.responseFileUrl(e.response)||e.url)||""},emitValue:function(e){var r,t=this;if(this.isArrayValue)r=e.length?e.reduce((function(e,r){var a=t.getUrl(r);return a&&e.push(a),e}),[]):[];else{var a=e[e.length-1];r=this.getUrl(a)}this.$emit("input",r)}},render:function(){var e=this,r=this.$createElement,t=this.$attrs,a=this.$props.slots,o={attrs:l(l({defaultFileList:this.fileList,"on-error":function(){e.$message&&e.$message.error("文件上传失败")},"on-preview":function(r){var t=e.getUrl(r);t&&function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_blank",t=document.createElement("a");t.style.display="none",t.target=r,t.href=e,document.body.appendChild(t),t.click(),document.body.removeChild(t)}(t)}},t),{},{"on-remove":function(r,a){e.emitValue(a),t["on-remove"]&&t["on-remove"](r,a)},"on-success":function(r,a,o){e.emitValue(o),t["on-success"]&&t["on-success"](r,a,o)}})};this.isArrayValue||(o.attrs.limit=1);var i=[];return a&&a.default?i.push(r("template",{slot:"default"},["function"==typeof a.default?a.default(r):a.default])):i.push(r("i-button",{props:{type:"primary"}},[this.btnText])),a&&a.tip&&i.push(r("template",{slot:"tip"},["function"==typeof a.tip?a.tip(r):a.tip])),r("upload",o,i)}},SwitchWidget:{name:"SwitchWidget",functional:!0,render:function(e,r){var t=r.props,a=t.activeText,o=t.inactiveText,i=Object.entries({open:a,close:o}).reduce((function(r,t){var a=u(t,2),o=a[0],i=a[1];return void 0!==i&&r.push(e("span",{slot:o},[i])),r}),[]);return e("i-switch",r.data,i)}},InputNumberWidget:{name:"SwitchWidget",functional:!0,render:function(e,r){return void 0===r.data.attrs.value&&(r.data.attrs.value=null),e("input-number",r.data,r.children)}}},wa=Pa.InputNumberWidget,Ea={types:{boolean:Pa.SwitchWidget,string:"i-input",number:wa,integer:wa},formats:{color:"color-picker",time:Pa.TimePickerWidget,date:Pa.DatePickerWidget,"date-time":Pa.DateTimePickerWidget},common:{select:Pa.SelectWidget,radioGroup:Pa.RadioWidget,checkboxGroup:Pa.CheckboxesWidget},widgetComponents:Pa};Dt(".genFromComponent.ivu-form-label-top .ivu-form-item-label{line-height:26px;padding-bottom:6px}.genFromComponent .ivu-form-item-error-tip{padding-top:2px;position:absolute;display:-webkit-box!important;text-overflow:ellipsis;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;text-align:left;line-height:1.2}.genFromComponent .validateWidget .ivu-form-item-error-tip{padding:5px 0;position:relative}");var Sa=Object.freeze({WIDGET_MAP:Object.freeze(Ea),COMPONENT_MAP:Object.freeze({form:{functional:!0,render:function(e,r){return r.data.props=l(l({},r.data.props),{},{labelWidth:"top"!==r.data.props.labelPosition&&r.data.props.labelWidth?parseFloat(String(r.data.props.labelWidth)):void 0}),e("i-form",r.data,r.children)}},formItem:{functional:!0,render:function(e,r){return r.data.props=l(l({},r.data.props),{},{labelWidth:r.data.props&&r.data.props.labelWidth?parseFloat(String(r.data.props.labelWidth)):void 0}),e("form-item",r.data,Object.entries(r.slots()).map((function(r){var t=u(r,2),a=t[0],o=t[1];return e("template",{slot:a},o)})))}},button:"i-button",popover:{functional:!0,render:function(e,r){var t=r.slots(),a=t.default,o=t.reference;return e("poptip",r.data,[e("template",{slot:"default"},o),e("template",{slot:"content"},a)])}}}),HELPERS:{isMiniDes:function(e){return e&&["left","right"].includes(e.labelPosition)}}}),Fa=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.WIDGET_MAP.widgetComponents&&Object.entries(e.WIDGET_MAP.widgetComponents).forEach((function(e){var r=u(e,2),t=r[0],o=r[1];return a.default.component(t,o)})),{name:"VueForm",props:$t,provide:function(){return{genFormProvide:this.genFormProvide}},data:function(){var e=_t(this.$props.schema,this.$props.value,this.$props.schema);return this.emitFormDataChange(e,this.value),{formData:e}},computed:{genFormProvide:function(){return{fallbackLabel:this.fallbackLabel}},footerParams:function(){return l({show:!0,okBtn:"保存",cancelBtn:"取消"},this.formFooter)}},watch:{formData:{handler:function(e,r){this.emitFormDataChange(e,r)},deep:!0},schema:function(e,r){this.willReceiveProps(e,r)},value:function(e,r){this.willReceiveProps(e,r)}},methods:{emitFormDataChange:function(e,r){this.$emit("input",e),this.$emit("on-change",{newValue:e,oldValue:r})},willReceiveProps:function(e,r){if(!b(e,r)){var t=_t(this.$props.schema,this.$props.value,this.$props.schema);b(this.formData,t)||(this.formData=t)}}},mounted:function(){this.$emit("on-form-mounted",this.$refs.genEditForm)},render:function(r){var t,a=this,o=this.$scopedSlots.default?this.$scopedSlots.default({formData:a.formData,formRefFn:function(){return a.$refs.genEditForm}}):this.footerParams.show?r(jt,{props:{globalOptions:e,okBtn:a.footerParams.okBtn,cancelBtn:a.footerParams.cancelBtn,formItemAttrs:a.footerParams.formItemAttrs},on:{onCancel:function(){a.$emit("on-cancel")},onSubmit:function(){a.$refs.genEditForm.validate((function(e,r){return e?a.$emit("on-submit",a.formData):a.$emit("on-validation-failed",r)}))}}}):void 0,n=a.$props.formProps,s=n.layoutColumn,u=void 0===s?1:s,d=n.inlineFooter,p=n.inline,h=c(n,["layoutColumn","inlineFooter","inline"]),m={schema:this.schema,uiSchema:this.uiSchema,errorSchema:this.errorSchema,customFormats:this.customFormats,customRule:this.customRule,rootSchema:this.schema,rootFormData:this.formData,curNodePath:"",globalOptions:e,formProps:l({labelPosition:"top",labelSuffix:":"},h)};return r(e.COMPONENT_MAP.form,{class:(t={genFromComponent:!0,formInlineFooter:d,formInline:p},i(t,"genFromComponent_".concat(this.schema.id,"Form"),!!this.schema.id),i(t,"layoutColumn",!p),i(t,"layoutColumn-".concat(u),!p),t),ref:"genEditForm",props:l({model:a.formData},m.formProps)},[r(na,{props:m}),o])}}}(Sa);"undefined"!=typeof window&&window.Vue&&window.Vue.component("VueFormIview3",Fa),e.SchemaField=na,e.default=Fa,e.fieldProps=Rt,e.formUtils=mt,e.getDefaultFormState=_t,e.globalOptions=Sa,e.i18n=Cr,e.schemaValidate=Ft,e.vueUtils=Gr,Object.defineProperty(e,"__esModule",{value:!0})})); +!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var a=r.length-1,o=1;o<a;++o)r[o]=r[o].slice(1,-1);return r[a]=r[a].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function a(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function i(e){var a=r("[0-9]","[A-Fa-f]"),o=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),i="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",n=r("[\\:\\/\\?\\#\\[\\]\\@]",i),s=e?"[\\uE000-\\uF8FF]":"[]",l=r("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t("[A-Za-z]"+r("[A-Za-z]","[0-9]","[\\+\\-\\.]")+"*"),t(t(o+"|"+r(l,i,"[\\:]"))+"*");var c=t(t("25[0-5]")+"|"+t("2[0-4][0-9]")+"|"+t("1[0-9][0-9]")+"|"+t("0?[1-9][0-9]")+"|0?0?[0-9]"),u=t(c+"\\."+c+"\\."+c+"\\."+c),d=t(a+"{1,4}"),p=t(t(d+"\\:"+d)+"|"+u),h=t(t(d+"\\:")+"{6}"+p),m=t("\\:\\:"+t(d+"\\:")+"{5}"+p),f=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+p),v=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+p),g=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+p),y=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+p),b=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+p),P=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),w=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),E=t([h,m,f,v,g,y,b,P,w].join("|")),S=t(t(l+"|"+o)+"+");t("[vV]"+a+"+\\."+r(l,i,"[\\:]")+"+"),t(t(o+"|"+r(l,i))+"*");var F=t(o+"|"+r(l,i,"[\\:\\@]"));return t(t(o+"|"+r(l,i,"[\\@]"))+"+"),t(t(F+"|"+r("[\\/\\?]",s))+"*"),{NOT_SCHEME:new RegExp(r("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,i),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,i),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,i),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,i),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,i,"[\\:\\@\\/\\?]",s),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,i,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,i),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,n),"g"),PCT_ENCODED:new RegExp(o,"g"),IPV4ADDRESS:new RegExp("^("+u+")$"),IPV6ADDRESS:new RegExp("^\\[?("+E+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+S+")")+"?\\]?$")}}var n=i(!1),s=i(!0),l=function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,r){var t=[],a=!0,o=!1,i=void 0;try{for(var n,s=e[Symbol.iterator]();!(a=(n=s.next()).done)&&(t.push(n.value),!r||t.length!==r);a=!0);}catch(e){o=!0,i=e}finally{try{!a&&s.return&&s.return()}finally{if(o)throw i}}return t}(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=2147483647,u=/^xn--/,d=/[^\0-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,f=String.fromCharCode;function v(e){throw new RangeError(h[e])}function g(e,r){var t=e.split("@"),a="";t.length>1&&(a=t[0]+"@",e=t[1]);var o=function(e,r){for(var t=[],a=e.length;a--;)t[a]=r(e[a]);return t}((e=e.replace(p,".")).split("."),r).join(".");return a+o}function y(e){for(var r=[],t=0,a=e.length;t<a;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<a){var i=e.charCodeAt(t++);56320==(64512&i)?r.push(((1023&o)<<10)+(1023&i)+65536):(r.push(o),t--)}else r.push(o)}return r}var b=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},P=function(e,r,t){var a=0;for(e=t?m(e/700):e>>1,e+=m(e/r);e>455;a+=36)e=m(e/35);return m(a+36*e/(e+38))},w=function(e){var r,t=[],a=e.length,o=0,i=128,n=72,s=e.lastIndexOf("-");s<0&&(s=0);for(var l=0;l<s;++l)e.charCodeAt(l)>=128&&v("not-basic"),t.push(e.charCodeAt(l));for(var u=s>0?s+1:0;u<a;){for(var d=o,p=1,h=36;;h+=36){u>=a&&v("invalid-input");var f=(r=e.charCodeAt(u++))-48<10?r-22:r-65<26?r-65:r-97<26?r-97:36;(f>=36||f>m((c-o)/p))&&v("overflow"),o+=f*p;var g=h<=n?1:h>=n+26?26:h-n;if(f<g)break;var y=36-g;p>m(c/y)&&v("overflow"),p*=y}var b=t.length+1;n=P(o-d,b,0==d),m(o/b)>c-i&&v("overflow"),i+=m(o/b),o%=b,t.splice(o++,0,i)}return String.fromCodePoint.apply(String,t)},E=function(e){var r=[],t=(e=y(e)).length,a=128,o=0,i=72,n=!0,s=!1,l=void 0;try{for(var u,d=e[Symbol.iterator]();!(n=(u=d.next()).done);n=!0){var p=u.value;p<128&&r.push(f(p))}}catch(e){s=!0,l=e}finally{try{!n&&d.return&&d.return()}finally{if(s)throw l}}var h=r.length,g=h;for(h&&r.push("-");g<t;){var w=c,E=!0,S=!1,F=void 0;try{for(var x,O=e[Symbol.iterator]();!(E=(x=O.next()).done);E=!0){var _=x.value;_>=a&&_<w&&(w=_)}}catch(e){S=!0,F=e}finally{try{!E&&O.return&&O.return()}finally{if(S)throw F}}var D=g+1;w-a>m((c-o)/D)&&v("overflow"),o+=(w-a)*D,a=w;var $=!0,j=!1,k=void 0;try{for(var I,A=e[Symbol.iterator]();!($=(I=A.next()).done);$=!0){var C=I.value;if(C<a&&++o>c&&v("overflow"),C==a){for(var R=o,N=36;;N+=36){var L=N<=i?1:N>=i+26?26:N-i;if(R<L)break;var T=R-L,z=36-L;r.push(f(b(L+T%z,0))),R=m(T/z)}r.push(f(b(R,0))),i=P(o,D,g==h),o=0,++g}}}catch(e){j=!0,k=e}finally{try{!$&&A.return&&A.return()}finally{if(j)throw k}}++o,++a}return r.join("")},S=function(e){return g(e,(function(e){return d.test(e)?"xn--"+E(e):e}))},F=function(e){return g(e,(function(e){return u.test(e)?w(e.slice(4).toLowerCase()):e}))},x={};function O(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function _(e){for(var r="",t=0,a=e.length;t<a;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(a-t>=6){var i=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&i)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(a-t>=9){var n=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&n)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function D(e,r){function t(e){var t=_(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,O).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,O).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,O).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,O).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,O).replace(r.PCT_ENCODED,o)),e}function $(e){return e.replace(/^0*(.*)/,"$1")||"0"}function j(e,r){var t=e.match(r.IPV4ADDRESS)||[],a=l(t,2)[1];return a?a.split(".").map($).join("."):e}function k(e,r){var t=e.match(r.IPV6ADDRESS)||[],a=l(t,3),o=a[1],i=a[2];if(o){for(var n=o.toLowerCase().split("::").reverse(),s=l(n,2),c=s[0],u=s[1],d=u?u.split(":").map($):[],p=c.split(":").map($),h=r.IPV4ADDRESS.test(p[p.length-1]),m=h?7:8,f=p.length-m,v=Array(m),g=0;g<m;++g)v[g]=d[g]||p[f+g]||"";h&&(v[m-1]=j(v[m-1],r));var y=v.reduce((function(e,r,t){if(!r||"0"===r){var a=e[e.length-1];a&&a.index+a.length===t?a.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(y&&y.length>1){var P=v.slice(0,y.index),w=v.slice(y.index+y.length);b=P.join(":")+"::"+w.join(":")}else b=v.join(":");return i&&(b+="%"+i),b}return e}var I=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,A=void 0==="".match(/(){0}/)[1];function C(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},a=!1!==r.iri?s:n;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(I);if(o){A?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=k(j(t.host,a),a)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var i=x[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||i&&i.unicodeSupport)D(t,a);else{if(t.host&&(r.domainHost||i&&i.domainHost))try{t.host=S(t.host.replace(a.PCT_ENCODED,_).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}D(t,n)}i&&i.parse&&i.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function R(e,r){var t=!1!==r.iri?s:n,a=[];return void 0!==e.userinfo&&(a.push(e.userinfo),a.push("@")),void 0!==e.host&&a.push(k(j(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(a.push(":"),a.push(String(e.port))),a.length?a.join(""):void 0}var N=/^\.\.?\//,L=/^\/\.(\/|$)/,T=/^\/\.\.(\/|$)/,z=/^\/?(?:.|\n)*?(?=\/|$)/;function V(e){for(var r=[];e.length;)if(e.match(N))e=e.replace(N,"");else if(e.match(L))e=e.replace(L,"/");else if(e.match(T))e=e.replace(T,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(z);if(!t)throw new Error("Unexpected dot segment condition");var a=t[0];e=e.slice(a.length),r.push(a)}return r.join("")}function q(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?s:n,a=[],o=x[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?F(e.host):S(e.host.replace(t.PCT_ENCODED,_).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}D(e,t),"suffix"!==r.reference&&e.scheme&&(a.push(e.scheme),a.push(":"));var i=R(e,r);if(void 0!==i&&("suffix"!==r.reference&&a.push("//"),a.push(i),e.path&&"/"!==e.path.charAt(0)&&a.push("/")),void 0!==e.path){var l=e.path;r.absolutePath||o&&o.absolutePath||(l=V(l)),void 0===i&&(l=l.replace(/^\/\//,"/%2F")),a.push(l)}return void 0!==e.query&&(a.push("?"),a.push(e.query)),void 0!==e.fragment&&(a.push("#"),a.push(e.fragment)),a.join("")}function W(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],o={};return a||(e=C(q(e,t),t),r=C(q(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=V(r.path||""),o.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=V(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=V(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=V(o.path)),o.query=r.query):(o.path=e.path,void 0!==r.query?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function M(e,r){return e&&e.toString().replace(r&&r.iri?s.PCT_ENCODED:n.PCT_ENCODED,_)}var B={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},U={scheme:"https",domainHost:B.domainHost,parse:B.parse,serialize:B.serialize};function Q(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var H={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=Q(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(Q(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),a=l(t,2),o=a[0],i=a[1];e.path=o&&"/"!==o?o:void 0,e.query=i,e.resourceName=void 0}return e.fragment=void 0,e}},K={scheme:"wss",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize},G={},J="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Z="[0-9A-Fa-f]",Y=t(t("%[EFef]"+Z+"%"+Z+Z+"%"+Z+Z)+"|"+t("%[89A-Fa-f]"+Z+"%"+Z+Z)+"|"+t("%"+Z+Z)),X=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),ee=new RegExp(J,"g"),re=new RegExp(Y,"g"),te=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',X),"g"),ae=new RegExp(r("[^]",J,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),oe=ae;function ie(e){var r=_(e);return r.match(ee)?r:e}var ne={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,i={},n=t.query.split("&"),s=0,l=n.length;s<l;++s){var c=n[s].split("=");switch(c[0]){case"to":for(var u=c[1].split(","),d=0,p=u.length;d<p;++d)a.push(u[d]);break;case"subject":t.subject=M(c[1],r);break;case"body":t.body=M(c[1],r);break;default:o=!0,i[M(c[0],r)]=M(c[1],r)}}o&&(t.headers=i)}t.query=void 0;for(var h=0,m=a.length;h<m;++h){var f=a[h].split("@");if(f[0]=M(f[0]),r.unicodeSupport)f[1]=M(f[1],r).toLowerCase();else try{f[1]=S(M(f[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}a[h]=f.join("@")}return t},serialize:function(e,r){var t,a=e,i=null!=(t=e.to)?t instanceof Array?t:"number"!=typeof t.length||t.split||t.setInterval||t.call?[t]:Array.prototype.slice.call(t):[];if(i){for(var n=0,s=i.length;n<s;++n){var l=String(i[n]),c=l.lastIndexOf("@"),u=l.slice(0,c).replace(re,ie).replace(re,o).replace(te,O),d=l.slice(c+1);try{d=r.iri?F(d):S(M(d,r).toLowerCase())}catch(e){a.error=a.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}i[n]=u+"@"+d}a.path=i.join(",")}var p=e.headers=e.headers||{};e.subject&&(p.subject=e.subject),e.body&&(p.body=e.body);var h=[];for(var m in p)p[m]!==G[m]&&h.push(m.replace(re,ie).replace(re,o).replace(ae,O)+"="+p[m].replace(re,ie).replace(re,o).replace(oe,O));return h.length&&(a.query=h.join("&")),a}},se=/^([^\:]+)\:(.*)/,le={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(se),a=e;if(t){var o=r.scheme||a.scheme||"urn",i=t[1].toLowerCase(),n=t[2],s=o+":"+(r.nid||i),l=x[s];a.nid=i,a.nss=n,a.path=void 0,l&&(a=l.parse(a,r))}else a.error=a.error||"URN can not be parsed.";return a},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",a=e.nid,o=t+":"+(r.nid||a),i=x[o];i&&(e=i.serialize(e,r));var n=e,s=e.nss;return n.path=(a||r.nid)+":"+s,n}},ce=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ue={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match(ce)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};x[B.scheme]=B,x[U.scheme]=U,x[H.scheme]=H,x[K.scheme]=K,x[ne.scheme]=ne,x[le.scheme]=le,x[ue.scheme]=ue,e.SCHEMES=x,e.pctEncChar=O,e.pctDecChars=_,e.parse=C,e.removeDotSegments=V,e.serialize=q,e.resolveComponents=W,e.resolve=function(e,r,t){var a=function(e,r){var t=e;if(r)for(var a in r)t[a]=r[a];return t}({scheme:"null"},t);return q(W(C(e,a),C(r,a),a,!0),a)},e.normalize=function(e,r){return"string"==typeof e?e=q(C(e,r),r):"object"===a(e)&&(e=C(q(e,r),r)),e},e.equal=function(e,r,t){return"string"==typeof e?e=q(C(e,t),t):"object"===a(e)&&(e=q(e,t)),"string"==typeof r?r=q(C(r,t),t):"object"===a(r)&&(r=q(r,t)),e===r},e.escapeComponent=function(e,r){return e&&e.toString().replace(r&&r.iri?s.ESCAPE:n.ESCAPE,O)},e.unescapeComponent=M,Object.defineProperty(e,"__esModule",{value:!0})}(r)}));(j=k)&&j.__esModule&&Object.prototype.hasOwnProperty.call(j,"default")&&j.default;var I=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 a,o,i;if(Array.isArray(r)){if((a=r.length)!=t.length)return!1;for(o=a;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((a=(i=Object.keys(r)).length)!==Object.keys(t).length)return!1;for(o=a;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,i[o]))return!1;for(o=a;0!=o--;){var n=i[o];if(!e(r[n],t[n]))return!1}return!0}return r!=r&&t!=t},A={copy:function(e,r){for(var t in r=r||{},e)r[t]=e[t];return r},checkDataType:C,checkDataTypes:function(e,r,t){switch(e.length){case 1:return C(e[0],r,t,!0);default:var a="",o=N(e);for(var i in o.array&&o.object&&(a=o.null?"(":"(!"+r+" || ",a+="typeof "+r+' !== "object")',delete o.null,delete o.array,delete o.object),o.number&&delete o.integer,o)a+=(a?" && ":"")+C(i,r,t,!0);return a}},coerceToTypes:function(e,r){if(Array.isArray(r)){for(var t=[],a=0;a<r.length;a++){var o=r[a];(R[o]||"array"===e&&"array"===o)&&(t[t.length]=o)}if(t.length)return t}else{if(R[r])return[r];if("array"===e&&"array"===r)return["array"]}},toHash:N,getProperty:z,escapeQuotes:V,equal:I,ucs2length:function(e){for(var r,t=0,a=e.length,o=0;o<a;)t++,(r=e.charCodeAt(o++))>=55296&&r<=56319&&o<a&&56320==(64512&(r=e.charCodeAt(o)))&&o++;return t},varOccurences:function(e,r){r+="[^0-9]";var t=e.match(new RegExp(r,"g"));return t?t.length:0},varReplace:function(e,r,t){return r+="([^0-9])",t=t.replace(/\$/g,"$$$$"),e.replace(new RegExp(r,"g"),t+"$1")},schemaHasRules:function(e,r){if("boolean"==typeof e)return!e;for(var t in e)if(r[t])return!0},schemaHasRulesExcept:function(e,r,t){if("boolean"==typeof e)return!e&&"not"!=t;for(var a in e)if(a!=t&&r[a])return!0},schemaUnknownRules:function(e,r){if("boolean"==typeof e)return;for(var t in e)if(!r[t])return t},toQuotedString:q,getPathExpr:function(e,r,t,a){return B(e,t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'")},getPath:function(e,r,t){var a=q(t?"/"+U(r):z(r));return B(e,a)},getData:function(e,r,t){var a,o,i,n;if(""===e)return"rootData";if("/"==e[0]){if(!W.test(e))throw new Error("Invalid JSON-pointer: "+e);o=e,i="rootData"}else{if(!(n=e.match(M)))throw new Error("Invalid JSON-pointer: "+e);if(a=+n[1],"#"==(o=n[2])){if(a>=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(i="data"+(r-a||""),!o)return i}for(var s=i,l=o.split("/"),c=0;c<l.length;c++){var u=l[c];u&&(i+=z(Q(u)),s+=" && "+i)}return s},unescapeFragment:function(e){return Q(decodeURIComponent(e))},unescapeJsonPointer:Q,escapeFragment:function(e){return encodeURIComponent(U(e))},escapeJsonPointer:U};function C(e,r,t,a){var o=a?" !== ":" === ",i=a?" || ":" && ",n=a?"!":"",s=a?"":"!";switch(e){case"null":return r+o+"null";case"array":return n+"Array.isArray("+r+")";case"object":return"("+n+r+i+"typeof "+r+o+'"object"'+i+s+"Array.isArray("+r+"))";case"integer":return"(typeof "+r+o+'"number"'+i+s+"("+r+" % 1)"+i+r+o+r+(t?i+n+"isFinite("+r+")":"")+")";case"number":return"(typeof "+r+o+'"'+e+'"'+(t?i+n+"isFinite("+r+")":"")+")";default:return"typeof "+r+o+'"'+e+'"'}}var R=N(["string","number","integer","boolean","null"]);function N(e){for(var r={},t=0;t<e.length;t++)r[e[t]]=!0;return r}var L=/^[a-z$_][a-z$_0-9]*$/i,T=/'|\\/g;function z(e){return"number"==typeof e?"["+e+"]":L.test(e)?"."+e:"['"+V(e)+"']"}function V(e){return e.replace(T,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function q(e){return"'"+V(e)+"'"}var W=/^\/(?:[^~]|~0|~1)*$/,M=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function B(e,r){return'""'==e?r:(e+" + "+r).replace(/([^\\])' \+ '/g,"$1")}function U(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Q(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}var H=function(e){A.copy(e,this)};var K=D((function(e){var r=e.exports=function(e,t,a){"function"==typeof t&&(a=t,t={}),function e(t,a,o,i,n,s,l,c,u,d){if(i&&"object"==typeof i&&!Array.isArray(i)){for(var p in a(i,n,s,l,c,u,d),i){var h=i[p];if(Array.isArray(h)){if(p in r.arrayKeywords)for(var m=0;m<h.length;m++)e(t,a,o,h[m],n+"/"+p+"/"+m,s,n,p,i,m)}else if(p in r.propsKeywords){if(h&&"object"==typeof h)for(var f in h)e(t,a,o,h[f],n+"/"+p+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),s,n,p,i,f)}else(p in r.keywords||t.allKeys&&!(p in r.skipKeywords))&&e(t,a,o,h,n+"/"+p,s,n,p,i)}o(i,n,s,l,c,u,d)}}(t,"function"==typeof(a=t.cb||a)?a:a.pre||function(){},a.post||function(){},e,"",e)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}})),G=J;function J(e,r,t){var a=this._refs[t];if("string"==typeof a){if(!this._refs[a])return J.call(this,e,r,a);a=this._refs[a]}if((a=a||this._schemas[t])instanceof H)return te(a.schema,this._opts.inlineRefs)?a.schema:a.validate||this._compile(a);var o,i,n,s=Z.call(this,r,t);return s&&(o=s.schema,r=s.root,n=s.baseId),o instanceof H?i=o.validate||e.call(this,o.schema,r,void 0,n):void 0!==o&&(i=te(o,this._opts.inlineRefs)?o:e.call(this,o,r,void 0,n)),i}function Z(e,r){var t=k.parse(r),a=oe(t),o=ae(this._getId(e.schema));if(0===Object.keys(e.schema).length||a!==o){var i=ne(a),n=this._refs[i];if("string"==typeof n)return Y.call(this,e,n,t);if(n instanceof H)n.validate||this._compile(n),e=n;else{if(!((n=this._schemas[i])instanceof H))return;if(n.validate||this._compile(n),i==ne(r))return{schema:n,root:e,baseId:o};e=n}if(!e.schema)return;o=ae(this._getId(e.schema))}return ee.call(this,t,o,e.schema,e)}function Y(e,r,t){var a=Z.call(this,e,r);if(a){var o=a.schema,i=a.baseId;e=a.root;var n=this._getId(o);return n&&(i=se(i,n)),ee.call(this,t,i,o,e)}}J.normalizeId=ne,J.fullPath=ae,J.url=se,J.ids=function(e){var r=ne(this._getId(e)),t={"":r},a={"":ae(r,!1)},o={},i=this;return K(e,{allKeys:!0},(function(e,r,n,s,l,c,u){if(""!==r){var d=i._getId(e),p=t[s],h=a[s]+"/"+l;if(void 0!==u&&(h+="/"+("number"==typeof u?u:A.escapeFragment(u))),"string"==typeof d){d=p=ne(p?k.resolve(p,d):d);var m=i._refs[d];if("string"==typeof m&&(m=i._refs[m]),m&&m.schema){if(!I(e,m.schema))throw new Error('id "'+d+'" resolves to more than one schema')}else if(d!=ne(h))if("#"==d[0]){if(o[d]&&!I(e,o[d]))throw new Error('id "'+d+'" resolves to more than one schema');o[d]=e}else i._refs[d]=h}t[r]=p,a[r]=h}})),o},J.inlineRef=te,J.schema=Z;var X=A.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function ee(e,r,t,a){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var o=e.fragment.split("/"),i=1;i<o.length;i++){var n=o[i];if(n){if(void 0===(t=t[n=A.unescapeFragment(n)]))break;var s;if(!X[n]&&((s=this._getId(t))&&(r=se(r,s)),t.$ref)){var l=se(r,t.$ref),c=Z.call(this,a,l);c&&(t=c.schema,a=c.root,r=c.baseId)}}}return void 0!==t&&t!==a.schema?{schema:t,root:a,baseId:r}:void 0}}var re=A.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function te(e,r){return!1!==r&&(void 0===r||!0===r?function e(r){var t;if(Array.isArray(r)){for(var a=0;a<r.length;a++)if("object"==typeof(t=r[a])&&!e(t))return!1}else for(var o in r){if("$ref"==o)return!1;if("object"==typeof(t=r[o])&&!e(t))return!1}return!0}(e):r?function e(r){var t,a=0;if(Array.isArray(r)){for(var o=0;o<r.length;o++)if("object"==typeof(t=r[o])&&(a+=e(t)),a==1/0)return 1/0}else for(var i in r){if("$ref"==i)return 1/0;if(re[i])a++;else if("object"==typeof(t=r[i])&&(a+=e(t)+1),a==1/0)return 1/0}return a}(e)<=r:void 0)}function ae(e,r){return!1!==r&&(e=ne(e)),oe(k.parse(e))}function oe(e){return k.serialize(e).split("#")[0]+"#"}var ie=/#\/?$/;function ne(e){return e?e.replace(ie,""):""}function se(e,r){return r=ne(r),k.resolve(e,r)}var le={Validation:ue((function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:ue(ce)};function ce(e,r,t){this.message=t||ce.message(e,r),this.missingRef=G.url(e,r),this.missingSchema=G.normalizeId(G.fullPath(this.missingRef))}function ue(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}ce.message=function(e,r){return"can't resolve reference "+r+" from id "+e};var de=function(e,r){r||(r={}),"function"==typeof r&&(r={cmp:r});var t="boolean"==typeof r.cycles&&r.cycles,a=r.cmp&&function(e){return function(r){return function(t,a){var o={key:t,value:r[t]},i={key:a,value:r[a]};return e(o,i)}}}(r.cmp),o=[];return function e(r){if(r&&r.toJSON&&"function"==typeof r.toJSON&&(r=r.toJSON()),void 0!==r){if("number"==typeof r)return isFinite(r)?""+r:"null";if("object"!=typeof r)return JSON.stringify(r);var i,n;if(Array.isArray(r)){for(n="[",i=0;i<r.length;i++)i&&(n+=","),n+=e(r[i])||"null";return n+"]"}if(null===r)return"null";if(-1!==o.indexOf(r)){if(t)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=o.push(r)-1,l=Object.keys(r).sort(a&&a(r));for(n="",i=0;i<l.length;i++){var c=l[i],u=e(r[c]);u&&(n&&(n+=","),n+=JSON.stringify(c)+":"+u)}return o.splice(s,1),"{"+n+"}"}}(e)},pe=function(e,r,t){var a="",o=!0===e.schema.$async,i=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),n=e.self._getId(e.schema);if(e.opts.strictKeywords){var s=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(s){var l="unknown keyword: "+s;if("log"!==e.opts.strictKeywords)throw new Error(l);e.logger.warn(l)}}if(e.isTop&&(a+=" var validate = ",o&&(e.async=!0,a+="async "),a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",n&&(e.opts.sourceCode||e.opts.processCode)&&(a+=" /*# sourceURL="+n+" */ ")),"boolean"==typeof e.schema||!i&&!e.schema.$ref){var c=e.level,u=e.dataLevel,d=e.schema["false schema"],p=e.schemaPath+e.util.getProperty("false schema"),h=e.errSchemaPath+"/false schema",m=!e.opts.allErrors,f="data"+(u||""),v="valid"+c;if(!1===e.schema){e.isTop?m=!0:a+=" var "+v+" = false; ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'boolean schema is false' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";var g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?a+=o?" return data; ":" validate.errors = null; return true; ":a+=" var "+v+" = true; ";return e.isTop&&(a+=" }; return validate; "),a}if(e.isTop){var y=e.isTop;c=e.level=0,u=e.dataLevel=0,f="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var b="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}a+=" var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data; "}else{c=e.level,f="data"+((u=e.dataLevel)||"");if(n&&(e.baseId=e.resolve.url(e.baseId,n)),o&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+c+" = errors;"}v="valid"+c,m=!e.opts.allErrors;var P="",w="",E=e.schema.type,S=Array.isArray(E);if(E&&e.opts.nullable&&!0===e.schema.nullable&&(S?-1==E.indexOf("null")&&(E=E.concat("null")):"null"!=E&&(E=[E,"null"],S=!0)),S&&1==E.length&&(E=E[0],S=!1),e.schema.$ref&&i){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(i=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(a+=" "+e.RULES.all.$comment.code(e,"$comment")),E){if(e.opts.coerceTypes)var F=e.util.coerceToTypes(e.opts.coerceTypes,E);var x=e.RULES.types[E];if(F||S||!0===x||x&&!Z(x)){p=e.schemaPath+".type",h=e.errSchemaPath+"/type",p=e.schemaPath+".type",h=e.errSchemaPath+"/type";var O=S?"checkDataTypes":"checkDataType";if(a+=" if ("+e.util[O](E,f,e.opts.strictNumbers,!0)+") { ",F){var _="dataType"+c,D="coerced"+c;a+=" var "+_+" = typeof "+f+"; var "+D+" = undefined; ","array"==e.opts.coerceTypes&&(a+=" if ("+_+" == 'object' && Array.isArray("+f+") && "+f+".length == 1) { "+f+" = "+f+"[0]; "+_+" = typeof "+f+"; if ("+e.util.checkDataType(e.schema.type,f,e.opts.strictNumbers)+") "+D+" = "+f+"; } "),a+=" if ("+D+" !== undefined) ; ";var $=F;if($)for(var j,k=-1,I=$.length-1;k<I;)"string"==(j=$[k+=1])?a+=" else if ("+_+" == 'number' || "+_+" == 'boolean') "+D+" = '' + "+f+"; else if ("+f+" === null) "+D+" = ''; ":"number"==j||"integer"==j?(a+=" else if ("+_+" == 'boolean' || "+f+" === null || ("+_+" == 'string' && "+f+" && "+f+" == +"+f+" ","integer"==j&&(a+=" && !("+f+" % 1)"),a+=")) "+D+" = +"+f+"; "):"boolean"==j?a+=" else if ("+f+" === 'false' || "+f+" === 0 || "+f+" === null) "+D+" = false; else if ("+f+" === 'true' || "+f+" === 1) "+D+" = true; ":"null"==j?a+=" else if ("+f+" === '' || "+f+" === 0 || "+f+" === false) "+D+" = null; ":"array"==e.opts.coerceTypes&&"array"==j&&(a+=" else if ("+_+" == 'string' || "+_+" == 'number' || "+_+" == 'boolean' || "+f+" == null) "+D+" = ["+f+"]; ");a+=" else { ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } if ("+D+" !== undefined) { ";var A=u?"data"+(u-1||""):"parentData";a+=" "+f+" = "+D+"; ",u||(a+="if ("+A+" !== undefined)"),a+=" "+A+"["+(u?e.dataPathArr[u]:"parentDataProperty")+"] = "+D+"; } "}else{(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } "}}if(e.schema.$ref&&!i)a+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",m&&(a+=" } if (errors === ",a+=y?"0":"errs_"+c,a+=") { ",w+="}");else{var C=e.RULES;if(C)for(var R=-1,N=C.length-1;R<N;)if(Z(x=C[R+=1])){if(x.type&&(a+=" if ("+e.util.checkDataType(x.type,f,e.opts.strictNumbers)+") { "),e.opts.useDefaults)if("object"==x.type&&e.schema.properties){d=e.schema.properties;var L=Object.keys(d);if(L)for(var T,z=-1,V=L.length-1;z<V;){if(void 0!==(M=d[T=L[z+=1]]).default){var q=f+e.util.getProperty(T);if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+q;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+q+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+q+" === null || "+q+" === '' "),a+=" ) "+q+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(M.default)+" ":a+=" "+JSON.stringify(M.default)+" ",a+="; "}}}else if("array"==x.type&&Array.isArray(e.schema.items)){var W=e.schema.items;if(W){k=-1;for(var M,B=W.length-1;k<B;)if(void 0!==(M=W[k+=1]).default){q=f+"["+k+"]";if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+q;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+q+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+q+" === null || "+q+" === '' "),a+=" ) "+q+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(M.default)+" ":a+=" "+JSON.stringify(M.default)+" ",a+="; "}}}var U=x.rules;if(U)for(var Q,H=-1,K=U.length-1;H<K;)if(Y(Q=U[H+=1])){var G=Q.code(e,Q.keyword,x.type);G&&(a+=" "+G+" ",m&&(P+="}"))}if(m&&(a+=" "+P+" ",P=""),x.type&&(a+=" } ",E&&E===x.type&&!F)){a+=" else { ";var J;p=e.schemaPath+".type",h=e.errSchemaPath+"/type";(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}m&&(a+=" if (errors === ",a+=y?"0":"errs_"+c,a+=") { ",w+="}")}}function Z(e){for(var r=e.rules,t=0;t<r.length;t++)if(Y(r[t]))return!0}function Y(r){return void 0!==e.schema[r.keyword]||r.implements&&function(r){for(var t=r.implements,a=0;a<t.length;a++)if(void 0!==e.schema[t[a]])return!0}(r)}return m&&(a+=" "+w+" "),y?(o?(a+=" if (errors === 0) return data; ",a+=" else throw new ValidationError(vErrors); "):(a+=" validate.errors = vErrors; ",a+=" return errors === 0; "),a+=" }; return validate;"):a+=" var "+v+" = errors === errs_"+c+";",a},he=A.ucs2length,me=le.Validation,fe=function e(r,t,a,o){var i=this,n=this._opts,s=[void 0],l={},c=[],u={},d=[],p={},h=[];t=t||{schema:r,refVal:s,refs:l};var m=ve.call(this,r,t,o),f=this._compilations[m.index];if(m.compiling)return f.callValidate=function e(){var r=f.validate,t=r.apply(this,arguments);return e.errors=r.errors,t};var v=this._formats,g=this.RULES;try{var y=P(r,t,a,o);f.validate=y;var b=f.callValidate;return b&&(b.schema=y.schema,b.errors=null,b.refs=y.refs,b.refVal=y.refVal,b.root=y.root,b.$async=y.$async,n.sourceCode&&(b.source=y.source)),y}finally{ge.call(this,r,t,o)}function P(r,a,o,u){var p=!a||a&&a.schema==r;if(a.schema!=t.schema)return e.call(i,r,a,o,u);var m,f=!0===r.$async,y=pe({isTop:!0,schema:r,isRoot:p,baseId:u,root:a,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:le.MissingRef,RULES:g,validate:pe,util:A,resolve:G,resolveRef:w,usePattern:F,useDefault:x,useCustomRule:O,opts:n,formats:v,logger:i.logger,self:i});y=Se(s,we)+Se(c,be)+Se(d,Pe)+Se(h,Ee)+y,n.processCode&&(y=n.processCode(y,r));try{m=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",y)(i,g,v,t,s,d,h,I,he,me),s[0]=m}catch(e){throw i.logger.error("Error compiling schema, function code:",y),e}return m.schema=r,m.errors=null,m.refs=l,m.refVal=s,m.root=p?m:a,f&&(m.$async=!0),!0===n.sourceCode&&(m.source={code:y,patterns:c,defaults:d}),m}function w(r,o,c){o=G.url(r,o);var u,d,p=l[o];if(void 0!==p)return S(u=s[p],d="refVal["+p+"]");if(!c&&t.refs){var h=t.refs[o];if(void 0!==h)return S(u=t.refVal[h],d=E(o,u))}d=E(o);var m=G.call(i,P,t,o);if(void 0===m){var f=a&&a[o];f&&(m=G.inlineRef(f,n.inlineRefs)?f:e.call(i,f,t,a,r))}if(void 0!==m)return function(e,r){var t=l[e];s[t]=r}(o,m),S(m,d);!function(e){delete l[e]}(o)}function E(e,r){var t=s.length;return s[t]=r,l[e]=t,"refVal"+t}function S(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}function F(e){var r=u[e];return void 0===r&&(r=u[e]=c.length,c[r]=e),"pattern"+r}function x(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return A.toQuotedString(e);case"object":if(null===e)return"null";var r=de(e),t=p[r];return void 0===t&&(t=p[r]=d.length,d[t]=e),"default"+t}}function O(e,r,t,a){if(!1!==i._opts.validateSchema){var o=e.definition.dependencies;if(o&&!o.every((function(e){return Object.prototype.hasOwnProperty.call(t,e)})))throw new Error("parent schema must have all required keywords: "+o.join(","));var s=e.definition.validateSchema;if(s)if(!s(r)){var l="keyword schema is invalid: "+i.errorsText(s.errors);if("log"!=i._opts.validateSchema)throw new Error(l);i.logger.error(l)}}var c,u=e.definition.compile,d=e.definition.inline,p=e.definition.macro;if(u)c=u.call(i,r,t,a);else if(p)c=p.call(i,r,t,a),!1!==n.validateSchema&&i.validateSchema(c,!0);else if(d)c=d.call(i,a,e.keyword,r,t);else if(!(c=e.definition.validate))return;if(void 0===c)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var m=h.length;return h[m]=c,{code:"customRule"+m,validate:c}}};function ve(e,r,t){var a=ye.call(this,e,r,t);return a>=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}function ge(e,r,t){var a=ye.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}function ye(e,r,t){for(var a=0;a<this._compilations.length;a++){var o=this._compilations[a];if(o.schema==e&&o.root==r&&o.baseId==t)return a}return-1}function be(e,r){return"var pattern"+e+" = new RegExp("+A.toQuotedString(r[e])+");"}function Pe(e){return"var default"+e+" = defaults["+e+"];"}function we(e,r){return void 0===r[e]?"":"var refVal"+e+" = refVal["+e+"];"}function Ee(e){return"var customRule"+e+" = customRules["+e+"];"}function Se(e,r){if(!e.length)return"";for(var t="",a=0;a<e.length;a++)t+=r(a,e);return t}var Fe=D((function(e){var r=e.exports=function(){this._cache={}};r.prototype.put=function(e,r){this._cache[e]=r},r.prototype.get=function(e){return this._cache[e]},r.prototype.del=function(e){delete this._cache[e]},r.prototype.clear=function(){this._cache={}}})),xe=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Oe=[0,31,28,31,30,31,30,31,31,30,31,30,31],_e=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,De=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,$e=/^(?:[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,je=/^(?:(?:[^\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,ke=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,Ie=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Ae=/^(?:\/(?:[^~/]|~0|~1)*)*$/,Ce=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Re=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,Ne=Le;function Le(e){return e="full"==e?"full":"fast",A.copy(Le[e])}function Te(e){var r=e.match(xe);if(!r)return!1;var t=+r[1],a=+r[2],o=+r[3];return a>=1&&a<=12&&o>=1&&o<=(2==a&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(t)?29:Oe[a])}function ze(e,r){var t=e.match(_e);if(!t)return!1;var a=t[1],o=t[2],i=t[3],n=t[5];return(a<=23&&o<=59&&i<=59||23==a&&59==o&&60==i)&&(!r||n)}Le.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":je,url:ke,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:De,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:Me,uuid:Ie,"json-pointer":Ae,"json-pointer-uri-fragment":Ce,"relative-json-pointer":Re},Le.full={date:Te,time:ze,"date-time":function(e){var r=e.split(Ve);return 2==r.length&&Te(r[0])&&ze(r[1],!0)},uri:function(e){return qe.test(e)&&$e.test(e)},"uri-reference":/^(?:[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,"uri-template":je,url:ke,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:De,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:Me,uuid:Ie,"json-pointer":Ae,"json-pointer-uri-fragment":Ce,"relative-json-pointer":Re};var Ve=/t|\s/i;var qe=/\/|:/;var We=/[^\\]\\Z/;function Me(e){if(We.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var Be=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s;var h="maximum"==r,m=h?"exclusiveMaximum":"exclusiveMinimum",f=e.schema[m],v=e.opts.$data&&f&&f.$data,g=h?"<":">",y=h?">":"<",b=void 0;if(!p&&"number"!=typeof s&&void 0!==s)throw new Error(r+" must be number");if(!v&&void 0!==f&&"number"!=typeof f&&"boolean"!=typeof f)throw new Error(m+" must be number or boolean");if(v){var P=e.util.getData(f.$data,n,e.dataPathArr),w="exclusive"+i,E="exclType"+i,S="exclIsNumber"+i,F="' + "+(_="op"+i)+" + '";o+=" var schemaExcl"+i+" = "+P+"; ",o+=" var "+w+"; var "+E+" = typeof "+(P="schemaExcl"+i)+"; if ("+E+" != 'boolean' && "+E+" != 'undefined' && "+E+" != 'number') { ";var x;b=m;(x=x||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(o+=" , message: '"+m+" should be boolean' "),e.opts.verbose&&(o+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var O=o;o=x.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+E+" == 'number' ? ( ("+w+" = "+a+" === undefined || "+P+" "+g+"= "+a+") ? "+d+" "+y+"= "+P+" : "+d+" "+y+" "+a+" ) : ( ("+w+" = "+P+" === true) ? "+d+" "+y+"= "+a+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { var op"+i+" = "+w+" ? '"+g+"' : '"+g+"='; ",void 0===s&&(b=m,c=e.errSchemaPath+"/"+m,a=P,p=v)}else{F=g;if((S="number"==typeof f)&&p){var _="'"+F+"'";o+=" if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" ( "+a+" === undefined || "+f+" "+g+"= "+a+" ? "+d+" "+y+"= "+f+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { "}else{S&&void 0===s?(w=!0,b=m,c=e.errSchemaPath+"/"+m,a=f,y+="="):(S&&(a=Math[h?"min":"max"](f,s)),f===(!S||a)?(w=!0,b=m,c=e.errSchemaPath+"/"+m,y+="="):(w=!1,F+="="));_="'"+F+"'";o+=" if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+" "+y+" "+a+" || "+d+" !== "+d+") { "}}b=b||r,(x=x||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+_+", limit: "+a+", exclusive: "+w+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be "+F+" ",o+=p?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";O=o;return o=x.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",u&&(o+=" else { "),o},Ue=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+".length "+("maxItems"==r?">":"<")+" "+a+") { ";var h=r,m=m||[];m.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(h||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxItems"==r?"more":"fewer",o+=" than ",o+=p?"' + "+a+" + '":""+s,o+=" items' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=m.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},Qe=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");var h="maxLength"==r?">":"<";o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),!1===e.opts.unicode?o+=" "+d+".length ":o+=" ucs2length("+d+") ",o+=" "+h+" "+a+") { ";var m=r,f=f||[];f.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(m||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT be ",o+="maxLength"==r?"longer":"shorter",o+=" than ",o+=p?"' + "+a+" + '":""+s,o+=" characters' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var v=o;return o=f.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+v+"]); ":o+=" validate.errors = ["+v+"]; return false; ":o+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},He=function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" Object.keys("+d+").length "+("maxProperties"==r?">":"<")+" "+a+") { ";var h=r,m=m||[];m.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(h||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxProperties"==r?"more":"fewer",o+=" than ",o+=p?"' + "+a+" + '":""+s,o+=" properties' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=m.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},Ke={$ref:function(e,r,t){var a,o,i=" ",n=e.level,s=e.dataLevel,l=e.schema[r],c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(s||""),p="valid"+n;if("#"==l||"#/"==l)e.isRoot?(a=e.async,o="validate"):(a=!0===e.root.schema.$async,o="root.refVal[0]");else{var h=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===h){var m=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(m),(y=y||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(i+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(i+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var f=i;i=y.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+f+"]); ":i+=" validate.errors = ["+f+"]; return false; ":i+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(i+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,l,m);e.logger.warn(m),u&&(i+=" if (true) { ")}}else if(h.inline){var v=e.util.copy(e);v.level++;var g="valid"+v.level;v.schema=h.schema,v.schemaPath="",v.errSchemaPath=l,i+=" "+e.validate(v).replace(/validate\.schema/g,h.code)+" ",u&&(i+=" if ("+g+") { ")}else a=!0===h.$async||e.async&&!1!==h.$async,o=h.code}if(o){var y;(y=y||[]).push(i),i="",e.opts.passContext?i+=" "+o+".call(this, ":i+=" "+o+"( ",i+=" "+d+", (dataPath || '')",'""'!=e.errorPath&&(i+=" + "+e.errorPath);var b=i+=" , "+(s?"data"+(s-1||""):"parentData")+" , "+(s?e.dataPathArr[s]:"parentDataProperty")+", rootData) ";if(i=y.pop(),a){if(!e.async)throw new Error("async schema referenced by sync schema");u&&(i+=" var "+p+"; "),i+=" try { await "+b+"; ",u&&(i+=" "+p+" = true; "),i+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",u&&(i+=" "+p+" = false; "),i+=" } ",u&&(i+=" if ("+p+") { ")}else i+=" if (!"+b+") { if (vErrors === null) vErrors = "+o+".errors; else vErrors = vErrors.concat("+o+".errors); errors = vErrors.length; } ",u&&(i+=" else { ")}return i},allOf:function(e,r,t){var a=" ",o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,s=!e.opts.allErrors,l=e.util.copy(e),c="";l.level++;var u="valid"+l.level,d=l.baseId,p=!0,h=o;if(h)for(var m,f=-1,v=h.length-1;f<v;)m=h[f+=1],(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0||!1===m:e.util.schemaHasRules(m,e.RULES.all))&&(p=!1,l.schema=m,l.schemaPath=i+"["+f+"]",l.errSchemaPath=n+"/"+f,a+=" "+e.validate(l)+" ",l.baseId=d,s&&(a+=" if ("+u+") { ",c+="}"));return s&&(a+=p?" if (true) { ":" "+c.slice(0,-1)+" "),a},anyOf:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e),m="";h.level++;var f="valid"+h.level;if(n.every((function(r){return e.opts.strictKeywords?"object"==typeof r&&Object.keys(r).length>0||!1===r:e.util.schemaHasRules(r,e.RULES.all)}))){var v=h.baseId;a+=" var "+p+" = errors; var "+d+" = false; ";var g=e.compositeRule;e.compositeRule=h.compositeRule=!0;var y=n;if(y)for(var b,P=-1,w=y.length-1;P<w;)b=y[P+=1],h.schema=b,h.schemaPath=s+"["+P+"]",h.errSchemaPath=l+"/"+P,a+=" "+e.validate(h)+" ",h.baseId=v,a+=" "+d+" = "+d+" || "+f+"; if (!"+d+") { ",m+="}";e.compositeRule=h.compositeRule=g,a+=" "+m+" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else c&&(a+=" if (true) { ");return a},$comment:function(e,r,t){var a=" ",o=e.schema[r],i=e.errSchemaPath+"/"+r;e.opts.allErrors;var n=e.util.toQuotedString(o);return!0===e.opts.$comment?a+=" console.log("+n+");":"function"==typeof e.opts.$comment&&(a+=" self._opts.$comment("+n+", "+e.util.toQuotedString(i)+", validate.root.schema);"),a},const:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p=e.opts.$data&&n&&n.$data;p&&(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; "),p||(a+=" var schema"+o+" = validate.schema"+s+";"),a+="var "+d+" = equal("+u+", schema"+o+"); if (!"+d+") { ";var h=h||[];h.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValue: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var m=a;return a=h.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+m+"]); ":a+=" validate.errors = ["+m+"]; return false; ":a+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",c&&(a+=" else { "),a},contains:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e);h.level++;var m="valid"+h.level,f="i"+o,v=h.dataLevel=e.dataLevel+1,g="data"+v,y=e.baseId,b=e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all);if(a+="var "+p+" = errors;var "+d+";",b){var P=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.schema=n,h.schemaPath=s,h.errSchemaPath=l,a+=" var "+m+" = false; for (var "+f+" = 0; "+f+" < "+u+".length; "+f+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers,!0);var w=u+"["+f+"]";h.dataPathArr[v]=f;var E=e.validate(h);h.baseId=y,e.util.varOccurences(E,g)<2?a+=" "+e.util.varReplace(E,g,w)+" ":a+=" var "+g+" = "+w+"; "+E+" ",a+=" if ("+m+") break; } ",e.compositeRule=h.compositeRule=P,a+=" if (!"+m+") {"}else a+=" if ("+u+".length == 0) {";var S=S||[];S.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should contain a valid item' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var F=a;return a=S.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+F+"]); ":a+=" validate.errors = ["+F+"]; return false; ":a+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",b&&(a+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a},dependencies:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e),h="";p.level++;var m="valid"+p.level,f={},v={},g=e.opts.ownProperties;for(w in n)if("__proto__"!=w){var y=n[w],b=Array.isArray(y)?v:f;b[w]=y}a+="var "+d+" = errors;";var P=e.errorPath;for(var w in a+="var missing"+o+";",v)if((b=v[w]).length){if(a+=" if ( "+u+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),c){a+=" && ( ";var E=b;if(E)for(var S=-1,F=E.length-1;S<F;){j=E[S+=1],S&&(a+=" || "),a+=" ( ( "+(C=u+(A=e.util.getProperty(j)))+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(j)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?j:A)+") ) "}a+=")) { ";var x="missing"+o,O="' + "+x+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,x,!0):P+" + "+x);var _=_||[];_.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var D=a;a=_.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+D+"]); ":a+=" validate.errors = ["+D+"]; return false; ":a+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{a+=" ) { ";var $=b;if($)for(var j,k=-1,I=$.length-1;k<I;){j=$[k+=1];var A=e.util.getProperty(j),C=(O=e.util.escapeQuotes(j),u+A);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,j,e.opts.jsonPointers)),a+=" if ( "+C+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(j)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",c&&(h+="}",a+=" else { ")}e.errorPath=P;var R=p.baseId;for(var w in f){y=f[w];(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all))&&(a+=" "+m+" = true; if ( "+u+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),a+=") { ",p.schema=y,p.schemaPath=s+e.util.getProperty(w),p.errSchemaPath=l+"/"+e.util.escapeFragment(w),a+=" "+e.validate(p)+" ",p.baseId=R,a+=" } ",c&&(a+=" if ("+m+") { ",h+="}"))}return c&&(a+=" "+h+" if ("+d+" == errors) {"),a},enum:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p=e.opts.$data&&n&&n.$data;p&&(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ");var h="i"+o,m="schema"+o;p||(a+=" var "+m+" = validate.schema"+s+";"),a+="var "+d+";",p&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=d+" = false;for (var "+h+"=0; "+h+"<"+m+".length; "+h+"++) if (equal("+u+", "+m+"["+h+"])) { "+d+" = true; break; }",p&&(a+=" } "),a+=" if (!"+d+") { ";var f=f||[];f.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var v=a;return a=f.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+v+"]); ":a+=" validate.errors = ["+v+"]; return false; ":a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",c&&(a+=" else { "),a},format:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||"");if(!1===e.opts.format)return c&&(a+=" if (true) { "),a;var d,p=e.opts.$data&&n&&n.$data;p?(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",d="schema"+o):d=n;var h=e.opts.unknownFormats,m=Array.isArray(h);if(p){a+=" var "+(f="format"+o)+" = formats["+d+"]; var "+(v="isObject"+o)+" = typeof "+f+" == 'object' && !("+f+" instanceof RegExp) && "+f+".validate; var "+(g="formatType"+o)+" = "+v+" && "+f+".type || 'string'; if ("+v+") { ",e.async&&(a+=" var async"+o+" = "+f+".async; "),a+=" "+f+" = "+f+".validate; } if ( ",p&&(a+=" ("+d+" !== undefined && typeof "+d+" != 'string') || "),a+=" (","ignore"!=h&&(a+=" ("+d+" && !"+f+" ",m&&(a+=" && self._opts.unknownFormats.indexOf("+d+") == -1 "),a+=") || "),a+=" ("+f+" && "+g+" == '"+t+"' && !(typeof "+f+" == 'function' ? ",e.async?a+=" (async"+o+" ? await "+f+"("+u+") : "+f+"("+u+")) ":a+=" "+f+"("+u+") ",a+=" : "+f+".test("+u+"))))) {"}else{var f;if(!(f=e.formats[n])){if("ignore"==h)return e.logger.warn('unknown format "'+n+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(a+=" if (true) { "),a;if(m&&h.indexOf(n)>=0)return c&&(a+=" if (true) { "),a;throw new Error('unknown format "'+n+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,g=(v="object"==typeof f&&!(f instanceof RegExp)&&f.validate)&&f.type||"string";if(v){var y=!0===f.async;f=f.validate}if(g!=t)return c&&(a+=" if (true) { "),a;if(y){if(!e.async)throw new Error("async format in sync schema");a+=" if (!(await "+(b="formats"+e.util.getProperty(n)+".validate")+"("+u+"))) { "}else{a+=" if (! ";var b="formats"+e.util.getProperty(n);v&&(b+=".validate"),a+="function"==typeof f?" "+b+"("+u+") ":" "+b+".test("+u+") ",a+=") { "}}var P=P||[];P.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",a+=p?""+d:""+e.util.toQuotedString(n),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",a+=p?"' + "+d+" + '":""+e.util.escapeQuotes(n),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=p?"validate.schema"+s:""+e.util.toQuotedString(n),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var w=a;return a=P.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",c&&(a+=" else { "),a},if:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e);h.level++;var m="valid"+h.level,f=e.schema.then,v=e.schema.else,g=void 0!==f&&(e.opts.strictKeywords?"object"==typeof f&&Object.keys(f).length>0||!1===f:e.util.schemaHasRules(f,e.RULES.all)),y=void 0!==v&&(e.opts.strictKeywords?"object"==typeof v&&Object.keys(v).length>0||!1===v:e.util.schemaHasRules(v,e.RULES.all)),b=h.baseId;if(g||y){var P;h.createErrors=!1,h.schema=n,h.schemaPath=s,h.errSchemaPath=l,a+=" var "+p+" = errors; var "+d+" = true; ";var w=e.compositeRule;e.compositeRule=h.compositeRule=!0,a+=" "+e.validate(h)+" ",h.baseId=b,h.createErrors=!0,a+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",e.compositeRule=h.compositeRule=w,g?(a+=" if ("+m+") { ",h.schema=e.schema.then,h.schemaPath=e.schemaPath+".then",h.errSchemaPath=e.errSchemaPath+"/then",a+=" "+e.validate(h)+" ",h.baseId=b,a+=" "+d+" = "+m+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'then'; ":P="'then'",a+=" } ",y&&(a+=" else { ")):a+=" if (!"+m+") { ",y&&(h.schema=e.schema.else,h.schemaPath=e.schemaPath+".else",h.errSchemaPath=e.errSchemaPath+"/else",a+=" "+e.validate(h)+" ",h.baseId=b,a+=" "+d+" = "+m+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'else'; ":P="'else'",a+=" } "),a+=" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+P+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match \"' + "+P+" + '\" schema' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",c&&(a+=" else { ")}else c&&(a+=" if (true) { ");return a},items:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e),m="";h.level++;var f="valid"+h.level,v="i"+o,g=h.dataLevel=e.dataLevel+1,y="data"+g,b=e.baseId;if(a+="var "+p+" = errors;var "+d+";",Array.isArray(n)){var P=e.schema.additionalItems;if(!1===P){a+=" "+d+" = "+u+".length <= "+n.length+"; ";var w=l;l=e.errSchemaPath+"/additionalItems",a+=" if (!"+d+") { ";var E=E||[];E.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+n.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+n.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var S=a;a=E.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",l=w,c&&(m+="}",a+=" else { ")}var F=n;if(F)for(var x,O=-1,_=F.length-1;O<_;)if(x=F[O+=1],e.opts.strictKeywords?"object"==typeof x&&Object.keys(x).length>0||!1===x:e.util.schemaHasRules(x,e.RULES.all)){a+=" "+f+" = true; if ("+u+".length > "+O+") { ";var D=u+"["+O+"]";h.schema=x,h.schemaPath=s+"["+O+"]",h.errSchemaPath=l+"/"+O,h.errorPath=e.util.getPathExpr(e.errorPath,O,e.opts.jsonPointers,!0),h.dataPathArr[g]=O;var $=e.validate(h);h.baseId=b,e.util.varOccurences($,y)<2?a+=" "+e.util.varReplace($,y,D)+" ":a+=" var "+y+" = "+D+"; "+$+" ",a+=" } ",c&&(a+=" if ("+f+") { ",m+="}")}if("object"==typeof P&&(e.opts.strictKeywords?"object"==typeof P&&Object.keys(P).length>0||!1===P:e.util.schemaHasRules(P,e.RULES.all))){h.schema=P,h.schemaPath=e.schemaPath+".additionalItems",h.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+f+" = true; if ("+u+".length > "+n.length+") { for (var "+v+" = "+n.length+"; "+v+" < "+u+".length; "+v+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=u+"["+v+"]";h.dataPathArr[g]=v;$=e.validate(h);h.baseId=b,e.util.varOccurences($,y)<2?a+=" "+e.util.varReplace($,y,D)+" ":a+=" var "+y+" = "+D+"; "+$+" ",c&&(a+=" if (!"+f+") break; "),a+=" } } ",c&&(a+=" if ("+f+") { ",m+="}")}}else if(e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all)){h.schema=n,h.schemaPath=s,h.errSchemaPath=l,a+=" for (var "+v+" = 0; "+v+" < "+u+".length; "+v+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=u+"["+v+"]";h.dataPathArr[g]=v;$=e.validate(h);h.baseId=b,e.util.varOccurences($,y)<2?a+=" "+e.util.varReplace($,y,D)+" ":a+=" var "+y+" = "+D+"; "+$+" ",c&&(a+=" if (!"+f+") break; "),a+=" }"}return c&&(a+=" "+m+" if ("+p+" == errors) {"),a},maximum:Be,minimum:Be,maxItems:Ue,minItems:Ue,maxLength:Qe,minLength:Qe,maxProperties:He,minProperties:He,multipleOf:function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,!p&&"number"!=typeof s)throw new Error(r+" must be number");o+="var division"+i+";if (",p&&(o+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),o+=" (division"+i+" = "+d+" / "+a+", ",e.opts.multipleOfPrecision?o+=" Math.abs(Math.round(division"+i+") - division"+i+") > 1e-"+e.opts.multipleOfPrecision+" ":o+=" division"+i+" !== parseInt(division"+i+") ",o+=" ) ",p&&(o+=" ) "),o+=" ) { ";var h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be multiple of ",o+=p?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var m=o;return o=h.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},not:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level;if(e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all)){p.schema=n,p.schemaPath=s,p.errSchemaPath=l,a+=" var "+d+" = errors; ";var m,f=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.createErrors=!1,p.opts.allErrors&&(m=p.opts.allErrors,p.opts.allErrors=!1),a+=" "+e.validate(p)+" ",p.createErrors=!0,m&&(p.opts.allErrors=m),e.compositeRule=p.compositeRule=f,a+=" if ("+h+") { ";var v=v||[];v.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var g=a;a=v.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(a+=" if (false) { ");return a},oneOf:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p="errs__"+o,h=e.util.copy(e),m="";h.level++;var f="valid"+h.level,v=h.baseId,g="prevValid"+o,y="passingSchemas"+o;a+="var "+p+" = errors , "+g+" = false , "+d+" = false , "+y+" = null; ";var b=e.compositeRule;e.compositeRule=h.compositeRule=!0;var P=n;if(P)for(var w,E=-1,S=P.length-1;E<S;)w=P[E+=1],(e.opts.strictKeywords?"object"==typeof w&&Object.keys(w).length>0||!1===w:e.util.schemaHasRules(w,e.RULES.all))?(h.schema=w,h.schemaPath=s+"["+E+"]",h.errSchemaPath=l+"/"+E,a+=" "+e.validate(h)+" ",h.baseId=v):a+=" var "+f+" = true; ",E&&(a+=" if ("+f+" && "+g+") { "+d+" = false; "+y+" = ["+y+", "+E+"]; } else { ",m+="}"),a+=" if ("+f+") { "+d+" = "+g+" = true; "+y+" = "+E+"; }";return e.compositeRule=h.compositeRule=b,a+=m+"if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a},pattern:function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p=e.opts.$data&&s&&s.$data;p?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,o+="if ( ",p&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'string') || "),o+=" !"+(p?"(new RegExp("+a+"))":e.usePattern(s))+".test("+d+") ) { ";var h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { pattern: ",o+=p?""+a:""+e.util.toQuotedString(s),o+=" } ",!1!==e.opts.messages&&(o+=" , message: 'should match pattern \"",o+=p?"' + "+a+" + '":""+e.util.escapeQuotes(s),o+="\"' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+e.util.toQuotedString(s),o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var m=o;return o=h.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},properties:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e),h="";p.level++;var m="valid"+p.level,f="key"+o,v="idx"+o,g=p.dataLevel=e.dataLevel+1,y="data"+g,b="dataProperties"+o,P=Object.keys(n||{}).filter(A),w=e.schema.patternProperties||{},E=Object.keys(w).filter(A),S=e.schema.additionalProperties,F=P.length||E.length,x=!1===S,O="object"==typeof S&&Object.keys(S).length,_=e.opts.removeAdditional,D=x||O||_,$=e.opts.ownProperties,j=e.baseId,k=e.schema.required;if(k&&(!e.opts.$data||!k.$data)&&k.length<e.opts.loopRequired)var I=e.util.toHash(k);function A(e){return"__proto__"!==e}if(a+="var "+d+" = errors;var "+m+" = true;",$&&(a+=" var "+b+" = undefined;"),D){if(a+=$?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+u+") { ",F){if(a+=" var isAdditional"+o+" = !(false ",P.length)if(P.length>8)a+=" || validate.schema"+s+".hasOwnProperty("+f+") ";else{var C=P;if(C)for(var R=-1,N=C.length-1;R<N;)G=C[R+=1],a+=" || "+f+" == "+e.util.toQuotedString(G)+" "}if(E.length){var L=E;if(L)for(var T=-1,z=L.length-1;T<z;)ie=L[T+=1],a+=" || "+e.usePattern(ie)+".test("+f+") "}a+=" ); if (isAdditional"+o+") { "}if("all"==_)a+=" delete "+u+"["+f+"]; ";else{var V=e.errorPath,q="' + "+f+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers)),x)if(_)a+=" delete "+u+"["+f+"]; ";else{a+=" "+m+" = false; ";var W=l;l=e.errSchemaPath+"/additionalProperties",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { additionalProperty: '"+q+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is an invalid additional property":a+="should NOT have additional properties",a+="' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var M=a;a=te.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+M+"]); ":a+=" validate.errors = ["+M+"]; return false; ":a+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=W,c&&(a+=" break; ")}else if(O)if("failing"==_){a+=" var "+d+" = errors; ";var B=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=S,p.schemaPath=e.schemaPath+".additionalProperties",p.errSchemaPath=e.errSchemaPath+"/additionalProperties",p.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);var U=u+"["+f+"]";p.dataPathArr[g]=f;var Q=e.validate(p);p.baseId=j,e.util.varOccurences(Q,y)<2?a+=" "+e.util.varReplace(Q,y,U)+" ":a+=" var "+y+" = "+U+"; "+Q+" ",a+=" if (!"+m+") { errors = "+d+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+u+"["+f+"]; } ",e.compositeRule=p.compositeRule=B}else{p.schema=S,p.schemaPath=e.schemaPath+".additionalProperties",p.errSchemaPath=e.errSchemaPath+"/additionalProperties",p.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);U=u+"["+f+"]";p.dataPathArr[g]=f;Q=e.validate(p);p.baseId=j,e.util.varOccurences(Q,y)<2?a+=" "+e.util.varReplace(Q,y,U)+" ":a+=" var "+y+" = "+U+"; "+Q+" ",c&&(a+=" if (!"+m+") break; ")}e.errorPath=V}F&&(a+=" } "),a+=" } ",c&&(a+=" if ("+m+") { ",h+="}")}var H=e.opts.useDefaults&&!e.compositeRule;if(P.length){var K=P;if(K)for(var G,J=-1,Z=K.length-1;J<Z;){var Y=n[G=K[J+=1]];if(e.opts.strictKeywords?"object"==typeof Y&&Object.keys(Y).length>0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all)){var X=e.util.getProperty(G),ee=(U=u+X,H&&void 0!==Y.default);p.schema=Y,p.schemaPath=s+X,p.errSchemaPath=l+"/"+e.util.escapeFragment(G),p.errorPath=e.util.getPath(e.errorPath,G,e.opts.jsonPointers),p.dataPathArr[g]=e.util.toQuotedString(G);Q=e.validate(p);if(p.baseId=j,e.util.varOccurences(Q,y)<2){Q=e.util.varReplace(Q,y,U);var re=U}else{re=y;a+=" var "+y+" = "+U+"; "}if(ee)a+=" "+Q+" ";else{if(I&&I[G]){a+=" if ( "+re+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+m+" = false; ";V=e.errorPath,W=l;var te,ae=e.util.escapeQuotes(G);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(V,G,e.opts.jsonPointers)),l=e.errSchemaPath+"/required",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+ae+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+ae+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";M=a;a=te.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+M+"]); ":a+=" validate.errors = ["+M+"]; return false; ":a+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=W,e.errorPath=V,a+=" } else { "}else c?(a+=" if ( "+re+" === undefined ",$&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+m+" = true; } else { "):(a+=" if ("+re+" !== undefined ",$&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=" ) { ");a+=" "+Q+" } "}}c&&(a+=" if ("+m+") { ",h+="}")}}if(E.length){var oe=E;if(oe)for(var ie,ne=-1,se=oe.length-1;ne<se;){Y=w[ie=oe[ne+=1]];if(e.opts.strictKeywords?"object"==typeof Y&&Object.keys(Y).length>0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all)){p.schema=Y,p.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(ie),p.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(ie),a+=$?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+u+") { ",a+=" if ("+e.usePattern(ie)+".test("+f+")) { ",p.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);U=u+"["+f+"]";p.dataPathArr[g]=f;Q=e.validate(p);p.baseId=j,e.util.varOccurences(Q,y)<2?a+=" "+e.util.varReplace(Q,y,U)+" ":a+=" var "+y+" = "+U+"; "+Q+" ",c&&(a+=" if (!"+m+") break; "),a+=" } ",c&&(a+=" else "+m+" = true; "),a+=" } ",c&&(a+=" if ("+m+") { ",h+="}")}}}return c&&(a+=" "+h+" if ("+d+" == errors) {"),a},propertyNames:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level;if(a+="var "+d+" = errors;",e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all)){p.schema=n,p.schemaPath=s,p.errSchemaPath=l;var m="key"+o,f="idx"+o,v="i"+o,g="' + "+m+" + '",y="data"+(p.dataLevel=e.dataLevel+1),b="dataProperties"+o,P=e.opts.ownProperties,w=e.baseId;P&&(a+=" var "+b+" = undefined; "),a+=P?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+f+"=0; "+f+"<"+b+".length; "+f+"++) { var "+m+" = "+b+"["+f+"]; ":" for (var "+m+" in "+u+") { ",a+=" var startErrs"+o+" = errors; ";var E=m,S=e.compositeRule;e.compositeRule=p.compositeRule=!0;var F=e.validate(p);p.baseId=w,e.util.varOccurences(F,y)<2?a+=" "+e.util.varReplace(F,y,E)+" ":a+=" var "+y+" = "+E+"; "+F+" ",e.compositeRule=p.compositeRule=S,a+=" if (!"+h+") { for (var "+v+"=startErrs"+o+"; "+v+"<errors; "+v+"++) { vErrors["+v+"].propertyName = "+m+"; } var err = ",!1!==e.createErrors?(a+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { propertyName: '"+g+"' } ",!1!==e.opts.messages&&(a+=" , message: 'property name \\'"+g+"\\' is invalid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),c&&(a+=" break; "),a+=" } }"}return c&&(a+=" if ("+d+" == errors) {"),a},required:function(e,r,t){var a=" ",o=e.level,i=e.dataLevel,n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d="valid"+o,p=e.opts.$data&&n&&n.$data;p&&(a+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ");var h="schema"+o;if(!p)if(n.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var m=[],f=n;if(f)for(var v,g=-1,y=f.length-1;g<y;){v=f[g+=1];var b=e.schema.properties[v];b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0||!1===b:e.util.schemaHasRules(b,e.RULES.all))||(m[m.length]=v)}}else m=n;if(p||m.length){var P=e.errorPath,w=p||m.length>=e.opts.loopRequired,E=e.opts.ownProperties;if(c)if(a+=" var missing"+o+"; ",w){p||(a+=" var "+h+" = validate.schema"+s+"; ");var S="' + "+($="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,$,e.opts.jsonPointers)),a+=" var "+d+" = true; ",p&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=" for (var "+O+" = 0; "+O+" < "+h+".length; "+O+"++) { "+d+" = "+u+"["+h+"["+O+"]] !== undefined ",E&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", "+h+"["+O+"]) "),a+="; if (!"+d+") break; } ",p&&(a+=" } "),a+=" if (!"+d+") { ",(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var F=a;a=D.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+F+"]); ":a+=" validate.errors = ["+F+"]; return false; ":a+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var x=m;if(x)for(var O=-1,_=x.length-1;O<_;){k=x[O+=1],O&&(a+=" || "),a+=" ( ( "+(R=u+(C=e.util.getProperty(k)))+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(k)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?k:C)+") ) "}a+=") { ";var D;S="' + "+($="missing"+o)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,$,!0):P+" + "+$),(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";F=a;a=D.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+F+"]); ":a+=" validate.errors = ["+F+"]; return false; ":a+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(w){p||(a+=" var "+h+" = validate.schema"+s+"; ");var $;S="' + "+($="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,$,e.opts.jsonPointers)),p&&(a+=" if ("+h+" && !Array.isArray("+h+")) { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+h+" !== undefined) { "),a+=" for (var "+O+" = 0; "+O+" < "+h+".length; "+O+"++) { if ("+u+"["+h+"["+O+"]] === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", "+h+"["+O+"]) "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",p&&(a+=" } ")}else{var j=m;if(j)for(var k,I=-1,A=j.length-1;I<A;){k=j[I+=1];var C=e.util.getProperty(k),R=(S=e.util.escapeQuotes(k),u+C);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,k,e.opts.jsonPointers)),a+=" if ( "+R+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(k)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=P}else c&&(a+=" if (true) {");return a},uniqueItems:function(e,r,t){var a,o=" ",i=e.level,n=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(n||""),p="valid"+i,h=e.opts.$data&&s&&s.$data;if(h?(o+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=s,(s||h)&&!1!==e.opts.uniqueItems){h&&(o+=" var "+p+"; if ("+a+" === false || "+a+" === undefined) "+p+" = true; else if (typeof "+a+" != 'boolean') "+p+" = false; else { "),o+=" var i = "+d+".length , "+p+" = true , j; if (i > 1) { ";var m=e.schema.items&&e.schema.items.type,f=Array.isArray(m);if(!m||"object"==m||"array"==m||f&&(m.indexOf("object")>=0||m.indexOf("array")>=0))o+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+d+"[i], "+d+"[j])) { "+p+" = false; break outer; } } } ";else{o+=" var itemIndices = {}, item; for (;i--;) { var item = "+d+"[i]; ";var v="checkDataType"+(f?"s":"");o+=" if ("+e.util[v](m,"item",e.opts.strictNumbers,!0)+") continue; ",f&&(o+=" if (typeof item == 'string') item = '\"' + item; "),o+=" if (typeof itemIndices[item] == 'number') { "+p+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}o+=" } ",h&&(o+=" } "),o+=" if (!"+p+") { ";var g=g||[];g.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(o+=" , schema: ",o+=h?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var y=o;o=g.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+y+"]); ":o+=" validate.errors = ["+y+"]; return false; ":o+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",u&&(o+=" else { ")}else u&&(o+=" if (true) { ");return o},validate:pe},Ge=A.toHash,Je=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"],Ze=function(e,r){for(var t=0;t<r.length;t++){e=JSON.parse(JSON.stringify(e));var a,o=r[t].split("/"),i=e;for(a=1;a<o.length;a++)i=i[o[a]];for(a=0;a<Je.length;a++){var n=Je[a],s=i[n];s&&(i[n]={anyOf:[s,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e},Ye=le.MissingRef,Xe=function e(r,t,a){var o=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof t&&(a=t,t=void 0);var i=n(r).then((function(){var e=o._addSchema(r,void 0,t);return e.validate||function e(r){try{return o._compile(r)}catch(e){if(e instanceof Ye)return a(e);throw e}function a(a){var i=a.missingSchema;if(c(i))throw new Error("Schema "+i+" is loaded but "+a.missingRef+" cannot be resolved");var s=o._loadingSchemas[i];return s||(s=o._loadingSchemas[i]=o._opts.loadSchema(i)).then(l,l),s.then((function(e){if(!c(i))return n(e).then((function(){c(i)||o.addSchema(e,i,void 0,t)}))})).then((function(){return e(r)}));function l(){delete o._loadingSchemas[i]}function c(e){return o._refs[e]||o._schemas[e]}}}(e)}));a&&i.then((function(e){a(null,e)}),a);return i;function n(r){var t=r.$schema;return t&&!o.getSchema(t)?e.call(o,{$ref:t},!0):Promise.resolve()}};var er=function(e,r,t){var a,o,i=" ",n=e.level,s=e.dataLevel,l=e.schema[r],c=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,d=!e.opts.allErrors,p="data"+(s||""),h="valid"+n,m="errs__"+n,f=e.opts.$data&&l&&l.$data;f?(i+=" var schema"+n+" = "+e.util.getData(l.$data,s,e.dataPathArr)+"; ",o="schema"+n):o=l;var v,g,y,b,P,w="definition"+n,E=this.definition,S="";if(f&&E.$data){P="keywordValidate"+n;var F=E.validateSchema;i+=" var "+w+" = RULES.custom['"+r+"'].definition; var "+P+" = "+w+".validate;"}else{if(!(b=e.useCustomRule(this,l,e.schema,e)))return;o="validate.schema"+c,P=b.code,v=E.compile,g=E.inline,y=E.macro}var x=P+".errors",O="i"+n,_="ruleErr"+n,D=E.async;if(D&&!e.async)throw new Error("async keyword in sync schema");if(g||y||(i+=x+" = null;"),i+="var "+m+" = errors;var "+h+";",f&&E.$data&&(S+="}",i+=" if ("+o+" === undefined) { "+h+" = true; } else { ",F&&(S+="}",i+=" "+h+" = "+w+".validateSchema("+o+"); if ("+h+") { ")),g)E.statements?i+=" "+b.validate+" ":i+=" "+h+" = "+b.validate+"; ";else if(y){var $=e.util.copy(e);S="";$.level++;var j="valid"+$.level;$.schema=b.validate,$.schemaPath="";var k=e.compositeRule;e.compositeRule=$.compositeRule=!0;var I=e.validate($).replace(/validate\.schema/g,P);e.compositeRule=$.compositeRule=k,i+=" "+I}else{(N=N||[]).push(i),i="",i+=" "+P+".call( ",e.opts.passContext?i+="this":i+="self",v||!1===E.schema?i+=" , "+p+" ":i+=" , "+o+" , "+p+" , validate.schema"+e.schemaPath+" ",i+=" , (dataPath || '')",'""'!=e.errorPath&&(i+=" + "+e.errorPath);var A=s?"data"+(s-1||""):"parentData",C=s?e.dataPathArr[s]:"parentDataProperty",R=i+=" , "+A+" , "+C+" , rootData ) ";i=N.pop(),!1===E.errors?(i+=" "+h+" = ",D&&(i+="await "),i+=R+"; "):i+=D?" var "+(x="customErrors"+n)+" = null; try { "+h+" = await "+R+"; } catch (e) { "+h+" = false; if (e instanceof ValidationError) "+x+" = e.errors; else throw e; } ":" "+x+" = null; "+h+" = "+R+"; "}if(E.modifying&&(i+=" if ("+A+") "+p+" = "+A+"["+C+"];"),i+=""+S,E.valid)d&&(i+=" if (true) { ");else{var N;i+=" if ( ",void 0===E.valid?(i+=" !",i+=y?""+j:""+h):i+=" "+!E.valid+" ",i+=") { ",a=this.keyword,(N=N||[]).push(i),i="",(N=N||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(i+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var L=i;i=N.pop(),!e.compositeRule&&d?e.async?i+=" throw new ValidationError(["+L+"]); ":i+=" validate.errors = ["+L+"]; return false; ":i+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var T=i;i=N.pop(),g?E.errors?"full"!=E.errors&&(i+=" for (var "+O+"="+m+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(i+=" "+_+".schema = "+o+"; "+_+".data = "+p+"; "),i+=" } "):!1===E.errors?i+=" "+T+" ":(i+=" if ("+m+" == errors) { "+T+" } else { for (var "+O+"="+m+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(i+=" "+_+".schema = "+o+"; "+_+".data = "+p+"; "),i+=" } } "):y?(i+=" var err = ",!1!==e.createErrors?(i+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(i+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&d&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; ")):!1===E.errors?i+=" "+T+" ":(i+=" if (Array.isArray("+x+")) { if (vErrors === null) vErrors = "+x+"; else vErrors = vErrors.concat("+x+"); errors = vErrors.length; for (var "+O+"="+m+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; "+_+'.schemaPath = "'+u+'"; ',e.opts.verbose&&(i+=" "+_+".schema = "+o+"; "+_+".data = "+p+"; "),i+=" } } else { "+T+" } "),i+=" } ",d&&(i+=" else { ")}return i},rr="http://json-schema.org/draft-07/schema#",tr="http://json-schema.org/draft-07/schema#",ar="Core schema meta-schema",or={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},ir=["object","boolean"],nr={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},sr={$schema:rr,$id:tr,title:ar,definitions:or,type:ir,properties:nr,default:!0},lr=$(Object.freeze({__proto__:null,$schema:rr,$id:tr,title:ar,definitions:or,type:ir,properties:nr,default:sr})),cr={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:lr.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:lr.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}},ur=/^[a-z_$][a-z0-9_$-]*$/i,dr=function(e,r){var t=this.RULES;if(t.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!ur.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(r){this.validateKeyword(r,!0);var a=r.type;if(Array.isArray(a))for(var o=0;o<a.length;o++)n(e,a[o],r);else n(e,a,r);var i=r.metaSchema;i&&(r.$data&&this._opts.$data&&(i={anyOf:[i,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),r.validateSchema=this.compile(i,!0))}function n(e,r,a){for(var o,i=0;i<t.length;i++){var n=t[i];if(n.type==r){o=n;break}}o||(o={type:r,rules:[]},t.push(o));var s={keyword:e,definition:a,custom:!0,code:er,implements:a.implements};o.rules.push(s),t.custom[e]=s}return t.keywords[e]=t.all[e]=!0,this},pr=function(e){var r=this.RULES.custom[e];return r?r.definition:this.RULES.keywords[e]||!1},hr=function(e){var r=this.RULES;delete r.keywords[e],delete r.all[e],delete r.custom[e];for(var t=0;t<r.length;t++)for(var a=r[t].rules,o=0;o<a.length;o++)if(a[o].keyword==e){a.splice(o,1);break}return this},mr=function e(r,t){e.errors=null;var a=this._validateKeyword=this._validateKeyword||this.compile(cr,!0);if(a(r))return!0;if(e.errors=a.errors,t)throw new Error("custom keyword definition is invalid: "+this.errorsText(a.errors));return!1};var fr="http://json-schema.org/draft-07/schema#",vr="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",gr="Meta-schema for $data reference (JSON Schema extension proposal)",yr=["$data"],br={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Pr={$schema:fr,$id:vr,description:gr,type:"object",required:yr,properties:br,additionalProperties:!1},wr=$(Object.freeze({__proto__:null,$schema:fr,$id:vr,description:gr,type:"object",required:yr,properties:br,additionalProperties:!1,default:Pr})),Er=Or;Or.prototype.validate=function(e,r){var t;if("string"==typeof e){if(!(t=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);t=a.validate||this._compile(a)}var o=t(r);!0!==t.$async&&(this.errors=t.errors);return o},Or.prototype.compile=function(e,r){var t=this._addSchema(e,void 0,r);return t.validate||this._compile(t)},Or.prototype.addSchema=function(e,r,t,a){if(Array.isArray(e)){for(var o=0;o<e.length;o++)this.addSchema(e[o],void 0,t,a);return this}var i=this._getId(e);if(void 0!==i&&"string"!=typeof i)throw new Error("schema id must be string");return Ir(this,r=G.normalizeId(r||i)),this._schemas[r]=this._addSchema(e,t,a,!0),this},Or.prototype.addMetaSchema=function(e,r,t){return this.addSchema(e,r,t,!0),this},Or.prototype.validateSchema=function(e,r){var t=e.$schema;if(void 0!==t&&"string"!=typeof t)throw new Error("$schema must be a string");if(!(t=t||this._opts.defaultMeta||function(e){var r=e._opts.meta;return e._opts.defaultMeta="object"==typeof r?e._getId(r)||r:e.getSchema(Sr)?Sr:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var a=this.validate(t,e);if(!a&&r){var o="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(o);this.logger.error(o)}return a},Or.prototype.getSchema=function(e){var r=_r(this,e);switch(typeof r){case"object":return r.validate||this._compile(r);case"string":return this.getSchema(r);case"undefined":return function(e,r){var t=G.schema.call(e,{schema:{}},r);if(t){var a=t.schema,o=t.root,i=t.baseId,n=fe.call(e,a,o,void 0,i);return e._fragments[r]=new H({ref:r,fragment:!0,schema:a,root:o,baseId:i,validate:n}),n}}(this,e)}},Or.prototype.removeSchema=function(e){if(e instanceof RegExp)return Dr(this,this._schemas,e),Dr(this,this._refs,e),this;switch(typeof e){case"undefined":return Dr(this,this._schemas),Dr(this,this._refs),this._cache.clear(),this;case"string":var r=_r(this,e);return r&&this._cache.del(r.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var t=this._opts.serialize,a=t?t(e):e;this._cache.del(a);var o=this._getId(e);o&&(o=G.normalizeId(o),delete this._schemas[o],delete this._refs[o])}return this},Or.prototype.addFormat=function(e,r){"string"==typeof r&&(r=new RegExp(r));return this._formats[e]=r,this},Or.prototype.errorsText=function(e,r){if(!(e=e||this.errors))return"No errors";for(var t=void 0===(r=r||{}).separator?", ":r.separator,a=void 0===r.dataVar?"data":r.dataVar,o="",i=0;i<e.length;i++){var n=e[i];n&&(o+=a+n.dataPath+" "+n.message+t)}return o.slice(0,-t.length)},Or.prototype._addSchema=function(e,r,t,a){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var o=this._opts.serialize,i=o?o(e):e,n=this._cache.get(i);if(n)return n;a=a||!1!==this._opts.addUsedSchema;var s=G.normalizeId(this._getId(e));s&&a&&Ir(this,s);var l,c=!1!==this._opts.validateSchema&&!r;c&&!(l=s&&s==G.normalizeId(e.$schema))&&this.validateSchema(e,!0);var u=G.ids.call(this,e),d=new H({id:s,schema:e,localRefs:u,cacheKey:i,meta:t});"#"!=s[0]&&a&&(this._refs[s]=d);this._cache.put(i,d),c&&l&&this.validateSchema(e,!0);return d},Or.prototype._compile=function(e,r){if(e.compiling)return e.validate=o,o.schema=e.schema,o.errors=null,o.root=r||o,!0===e.schema.$async&&(o.$async=!0),o;var t,a;e.compiling=!0,e.meta&&(t=this._opts,this._opts=this._metaOpts);try{a=fe.call(this,e.schema,r,e.localRefs)}catch(r){throw delete e.validate,r}finally{e.compiling=!1,e.meta&&(this._opts=t)}return e.validate=a,e.refs=a.refs,e.refVal=a.refVal,e.root=a.root,a;function o(){var r=e.validate,t=r.apply(this,arguments);return o.errors=r.errors,t}},Or.prototype.compileAsync=Xe,Or.prototype.addKeyword=dr,Or.prototype.getKeyword=pr,Or.prototype.removeKeyword=hr,Or.prototype.validateKeyword=mr,Or.ValidationError=le.Validation,Or.MissingRefError=le.MissingRef,Or.$dataMetaSchema=Ze;var Sr="http://json-schema.org/draft-07/schema",Fr=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],xr=["/properties"];function Or(e){if(!(this instanceof Or))return new Or(e);var r,t;e=this._opts=A.copy(e)||{},function(e){var r=e._opts.logger;if(!1===r)e.logger={log:Ar,warn:Ar,error:Ar};else{if(void 0===r&&(r=console),!("object"==typeof r&&r.log&&r.warn&&r.error))throw new Error("logger must implement log, warn and error methods");e.logger=r}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=Ne(e.format),this._cache=e.cache||new Fe,this._loadingSchemas={},this._compilations=[],this.RULES=((r=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}]).all=Ge(t=["type","$comment"]),r.types=Ge(["number","integer","string","array","object","boolean","null"]),r.forEach((function(e){e.rules=e.rules.map((function(e){var a;if("object"==typeof e){var o=Object.keys(e)[0];a=e[o],e=o,a.forEach((function(e){t.push(e),r.all[e]=!0}))}return t.push(e),r.all[e]={keyword:e,code:Ke[e],implements:a}})),r.all.$comment={keyword:"$comment",code:Ke.$comment},e.type&&(r.types[e.type]=e)})),r.keywords=Ge(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),r.custom={},r),this._getId=function(e){switch(e.schemaId){case"auto":return kr;case"id":return $r;default:return jr}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=de),this._metaOpts=function(e){for(var r=A.copy(e._opts),t=0;t<Fr.length;t++)delete r[Fr[t]];return r}(this),e.formats&&function(e){for(var r in e._opts.formats){var t=e._opts.formats[r];e.addFormat(r,t)}}(this),e.keywords&&function(e){for(var r in e._opts.keywords){var t=e._opts.keywords[r];e.addKeyword(r,t)}}(this),function(e){var r;e._opts.$data&&(r=wr,e.addMetaSchema(r,r.$id,!0));if(!1===e._opts.meta)return;var t=lr;e._opts.$data&&(t=Ze(t,xr));e.addMetaSchema(t,Sr,!0),e._refs["http://json-schema.org/schema"]=Sr}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var r=e._opts.schemas;if(!r)return;if(Array.isArray(r))e.addSchema(r);else for(var t in r)e.addSchema(r[t],t)}(this)}function _r(e,r){return r=G.normalizeId(r),e._schemas[r]||e._refs[r]||e._fragments[r]}function Dr(e,r,t){for(var a in r){var o=r[a];o.meta||t&&!t.test(a)||(e._cache.del(o.cacheKey),delete r[a])}}function $r(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function jr(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function kr(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function Ir(e,r){if(e._schemas[r]||e._refs[r])throw new Error('schema with key or id "'+r+'" already exists')}function Ar(){}var Cr={$$currentLocalizeFn:function(e){if(e&&e.length)for(var r=0;r<e.length;r+=1){var t=e[r],a=void 0,o=void 0,i=void 0;switch(t.keyword){case"$ref":a="无法找到引用".concat(t.params.ref);break;case"additionalItems":a="",o=t.params.limit,a+="不允许超过".concat(o,"个元素");break;case"additionalProperties":a="不允许有额外的属性";break;case"anyOf":a="数据应为 anyOf 所指定的其中一个";break;case"const":a="应当等于常量";break;case"contains":a="应当包含一个有效项";break;case"custom":a='应当通过 "'.concat(t.keyword,' 关键词校验"');break;case"dependencies":a="",o=t.params.depsCount,a+="应当拥有属性".concat(t.params.property,"的依赖属性").concat(t.params.deps);break;case"enum":a="应当是预设定的枚举值之一";break;case"exclusiveMaximum":case"exclusiveMinimum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(i);break;case"false schema":a="布尔模式出错";break;case"format":a='应当匹配格式 "'.concat(t.params.format,'"');break;case"formatExclusiveMaximum":a="formatExclusiveMaximum 应当是布尔值";break;case"formatExclusiveMinimum":a="formatExclusiveMinimum 应当是布尔值";break;case"formatMaximum":case"formatMinimum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当是 ".concat(i);break;case"if":a='应当匹配模式 "'.concat(t.params.failingKeyword,'" ');break;case"maximum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(i);break;case"maxItems":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个项");break;case"maxLength":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个字符");break;case"maxProperties":a="",o=t.params.limit,a+="不应有多于 ".concat(o," 个属性");break;case"minimum":a="",i="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(i);break;case"minItems":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个项");break;case"minLength":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个字符");break;case"minProperties":a="",o=t.params.limit,a+="不应有少于 ".concat(o," 个属性");break;case"multipleOf":a="应当是 ".concat(t.params.multipleOf," 的整数倍");break;case"not":a='不应当匹配 "not" schema';break;case"oneOf":a='只能匹配一个 "oneOf" 中的 schema';break;case"pattern":a='应当匹配模式 "'.concat(t.params.pattern,'"');break;case"patternRequired":a="应当有属性匹配模式 ".concat(t.params.missingPattern);break;case"propertyNames":a="属性名 '".concat(t.params.propertyName,"' 无效");break;case"required":a="应当有必需属性 ".concat(t.params.missingProperty);break;case"switch":a="由于 ".concat(t.params.caseIndex,' 失败,未通过 "switch" 校验, ');break;case"type":a="应当是 ".concat(t.params.type," 类型");break;case"uniqueItems":a="不应当含有重复项 (第 ".concat(t.params.j," 项与第 ").concat(t.params.i," 项是重复的)");break;default:continue}t.message=a}},getCurrentLocalize:function(){return this.$$currentLocalizeFn},useLocal:function(e){this.$$currentLocalizeFn=e}};function Rr(e,r){try{if("object"===o(r))return e.fill(null).map((function(){return JSON.parse(JSON.stringify(r))}))}catch(e){}}function Nr(e,r){return e.filter((function(e){return r.includes(e)}))}function Lr(e,r,t){var a=_(e.$ref,r);e.$ref;var o=c(e,["$ref"]);return qr(l(l({},a),o),r,t)}function Tr(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length<2)return r[0];for(var a={},o=[].concat(r),i=function(){var e=f(o[0])?o[0]:{},r=f(o[1])?o[1]:{};a=Object.assign({},e),Object.keys(r).reduce((function(t,a){var o=e[a],i=r[a];if(f(o)||f(i))if(f(o)&&f(i))t[a]=Tr(o,i);else{var n=u(f(o)?[o,i]:[i,o],2),s=n[0],l=n[1];t[a]="additionalProperties"===a?!0===l&&s:s}else if(Array.isArray(o)||Array.isArray(i))if(Array.isArray(o)&&Array.isArray(i)){if(f(o[0])||f(i[0]))throw new Error("暂不支持如上数组对象元素合并");var c=Nr([].concat(o),[].concat(i));if(c.length<=0)throw new Error("无法合并如上数据");0===c.length&&"type"===a?t[a]=c[0]:t[a]=c}else{var d=u(Array.isArray(o)?[o,i]:[i,o],2),p=d[0],h=d[1];if(void 0===h)t[a]=p;else{if(!p.includes(h))throw new Error("无法合并如下数据");t[a]=h}}else if(void 0!==o&&void 0!==i)if("maxLength"===a||"maximum"===a||"maxItems"===a||"exclusiveMaximum"===a||"maxProperties"===a)t[a]=Math.min(o,i);else if("minLength"===a||"minimum"===a||"minItems"===a||"exclusiveMinimum"===a||"minProperties"===a)t[a]=Math.max(o,i);else if("multipleOf"===a)t[a]=x(o,i);else{if(o!==i)throw new Error("无法合并如下数据");t[a]=o}else t[a]=void 0===o?i:o;return t}),a),o.splice(0,2,a)};o.length>=2;)i();return a}function zr(e,r,t){var a=l(l({},e),{},{allOf:e.allOf.map((function(e){return qr(e,r,t)}))});try{var o=a.allOf,i=c(a,["allOf"]);return Tr.apply(void 0,[i].concat(d(o)))}catch(e){return a.allOf,c(a,["allOf"])}}function Vr(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.hasOwnProperty("allOf")&&(e=zr(e,r,t)),e.hasOwnProperty("$ref")&&(e=Lr(e,r,t)),e}function qr(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return f(e)?Vr(e,r,t):{}}function Wr(e){return e?"".concat("__pathRoot",".").concat(e).replace(/\./g,"_"):"__pathRoot"}function Mr(e){return""===e}function Br(e,r){return""===e?r:[e,r].join(".")}function Ur(e,r){a.default.delete(e,r)}function Qr(e,r,t){for(var o=r.split("."),i=0;i<o.length;i+=1){if(o.length-i<2){a.default.set(e,o[o.length-1],t);break}e=e[o[i]]}}function Hr(e,r){for(var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=r.split("."),o=0;o<a.length-t;o+=1){if(void 0===e)return;e=""===a[o]?e:e[a[o]]}return e}function Kr(e){return e}var Gr=Object.freeze({__proto__:null,nodePath2ClassName:Wr,isRootNodePath:Mr,computedCurPath:Br,deletePathVal:Ur,setPathVal:Qr,getPathVal:Hr,path2prop:Kr}),Jr=/{{(.*)}}/;function Zr(e,r,t,a){if(void 0!==t){var o=Jr.exec(t);if(Jr.lastIndex=0,o){var i=o[1].trim();return new Function("parentFormData","rootFormData","return ".concat(i))(Hr(e,r,1),e)}return a()}}function Yr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.schema,t=e.uiSchema,a=arguments.length>1?arguments[1]:void 0,o=tt({schema:r,uiSchema:t,containsSpec:!1});return["title","description"].reduce((function(e,r){return o[r]&&(e["ui:".concat(r)]=String(o[r]).replace(/\$index/g,a+1)),e}),{})}function Xr(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,i=e.curNodePath,n=void 0===i?"":i,s=e.rootFormData,l=void 0===s?{}:s,c=o["ui:widget"]||t["ui:widget"],u=o["ui:hidden"]||t["ui:hidden"];return"HiddenWidget"===c||"hidden"===c||!!Zr(l,n,u,(function(){return"function"==typeof u?u(Hr(l,n,1),l):u}))}function et(e,r){var t=r.schema,a=void 0===t?{}:t,i=r.uiSchema,n=void 0===i?{}:i,s=a["ui:field"]||n["ui:field"];if("function"==typeof s||"object"===o(s)||"string"==typeof s)return{field:s,fieldProps:n["ui:fieldProps"]||a["ui:fieldProps"]};var l=e[y(a)];if(l)return{field:l};if(!l&&(a.anyOf||a.oneOf))return{field:null};throw new Error("不支持的field类型 ".concat(a.type))}function rt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.curNodePath,s=e.rootFormData,c=void 0===s?{}:s;return Object.assign.apply(Object,[{}].concat(d([t,o].map((function(e){return Object.keys(e).reduce((function(r,t){var a=e[t];return"ui:options"===t&&f(a)?l(l({},r),a):0===t.indexOf("ui:")?l(l({},r),{},i({},t.substring(3),void 0===n?a:Zr(c,n,a,(function(){return a})))):r}),{})})))))}function tt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,i=e.containsSpec,n=void 0===i||i,s=e.curNodePath,c=e.rootFormData,u={};return n&&(u.readonly=!!t.readOnly,void 0!==t.multipleOf&&(u.step=t.multipleOf),(t.minimum||0===t.minimum)&&(u.min=t.minimum),(t.maximum||0===t.maximum)&&(u.max=t.maximum),(t.minLength||0===t.minLength)&&(u.minlength=t.minLength),(t.maxLength||0===t.maxLength)&&(u.maxlength=t.maxLength),"date-time"!==t.format&&"date"!==t.format||("array"===t.type?(u.isRange=!0,u.isNumberValue=!(t.items&&"string"===t.items.type)):u.isNumberValue=!("string"===t.type))),l(l({title:t.title,description:t.description},u),rt({schema:t,uiSchema:o,curNodePath:s,rootFormData:c}))}function at(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,i=e.curNodePath,n=e.rootFormData,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,l=tt({schema:t,uiSchema:o,curNodePath:i,rootFormData:n});!l.widget&&s&&Object.assign(l,s({schema:t,uiSchema:o}));var u=l.widget,d=l.title,p=l.labelWidth,h=l.description,m=l.attrs,f=l.class,v=l.style,g=l.fieldAttrs,y=l.fieldStyle,b=l.fieldClass,P=l.emptyValue,w=l.width,E=l.getWidget,S=l.onChange,F=c(l,["widget","title","labelWidth","description","attrs","class","style","fieldAttrs","fieldStyle","fieldClass","emptyValue","width","getWidget","onChange"]);return{widget:u,label:d,labelWidth:p,description:h,widgetAttrs:m,widgetClass:f,widgetStyle:v,fieldAttrs:g,width:w,fieldStyle:y,fieldClass:b,emptyValue:P,getWidget:E,onChange:S,uiProps:F}}function ot(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.errorSchema,s=void 0===n?{}:n;return Object.assign.apply(Object,[{}].concat(d([t,o,s].map((function(e){return Object.keys(e).reduce((function(r,t){var a=e[t];return"err:options"===t&&f(a)?l(l({},r),a):0===t.indexOf("err:")?l(l({},r),{},i({},t.substring(4),a)):r}),{})})))))}function it(e,r){if(!Array.isArray(r))return e;var t,a=function(e){return e.reduce((function(e,r){return e[r]=!0,e}),{})},o=a(e),i=r.filter((function(e){return"*"===e||o[e]})),n=a(i),s=e.filter((function(e){return!n[e]})),l=i.indexOf("*");if(-1===l){if(s.length)throw new Error("uiSchema order list does not contain ".concat((t=s).length>1?"properties '".concat(t.join("', '"),"'"):"property '".concat(t[0],"'")));return i}if(l!==i.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");var c=d(i);return c.splice.apply(c,[l,1].concat(d(s))),c}function nt(e){return Array.isArray(e.enum)&&1===e.enum.length||e.hasOwnProperty("const")}function st(e){if(Array.isArray(e.enum)&&1===e.enum.length)return e.enum[0];if(e.hasOwnProperty("const"))return e.const;throw new Error("schema cannot be inferred as a constant")}function lt(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=qr(e,r),a=t.oneOf||t.anyOf;return!!Array.isArray(t.enum)||!!Array.isArray(a)&&a.every((function(e){return nt(e)}))}function ct(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every((function(e){return f(e)}))}function ut(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!(!e.uniqueItems||!e.items)&<(e.items,r)}function dt(e){return e.additionalItems,f(e.additionalItems)}function pt(e,r,t,a){if(e.enum){var o=rt({schema:e,uiSchema:r,curNodePath:t,rootFormData:a}).enumNames||e.enumNames;return e.enum.map((function(e,r){return{label:o&&o[r]||String(e),value:e}}))}var i=e.oneOf||e.anyOf,n=r.oneOf||r.anyOf;return i.map((function(e,r){var o=n&&n[r]?rt({schema:e,uiSchema:n[r],curNodePath:t,rootFormData:a}):{},i=st(e);return{label:o.title||e.title||String(i),value:i}}))}function ht(e,r,t){if(e)return e;if(r){var a=t.split(".").pop();if(a&&a!=="".concat(Number(a)))return a}return""}var mt=Object.freeze({__proto__:null,replaceArrayIndex:Yr,isHiddenWidget:Xr,getUiField:et,getUserUiOptions:rt,getUiOptions:tt,getWidgetConfig:at,getUserErrOptions:ot,orderProperties:it,isConstant:nt,toConstant:st,isSelect:lt,isFixedItems:ct,isMultiSelect:ut,allowAdditionalItems:dt,optionsList:pt,fallbackLabel:ht}),ft=yt(),vt=null,gt=null;function yt(){var e=new Er({errorDataPath:"property",allErrors:!0,multipleOfPrecision:8,schemaId:"auto",unknownFormats:"ignore"});return e.addFormat("data-url",/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/),e.addFormat("color",/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/),e}function bt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null===e?[]:e.map((function(e){var r=e.dataPath,t=e.keyword,a=e.message,o=e.params,i=e.schemaPath,n="".concat(r);return{name:t,property:n,message:a,params:o,stack:"".concat(n," ").concat(a).trim(),schemaPath:i}}))}function Pt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.transformErrors,o=e.additionalMetaSchemas,i=void 0===o?[]:o,n=e.customFormats,s=void 0===n?{}:n,l=!b(gt,i),c=!b(vt,s);(l||c)&&(ft=yt()),i&&l&&Array.isArray(i)&&(ft.addMetaSchema(i),gt=i),s&&c&&f(s)&&(Object.keys(s).forEach((function(e){ft.addFormat(e,s[e])})),vt=s);var u=null;try{ft.validate(t,r)}catch(e){u=e}Cr.getCurrentLocalize()(ft.errors);var p=bt(ft.errors);ft.errors=null;var h=u&&u.message&&"string"==typeof u.message&&u.message.includes("no schema with key or ref ");return h&&(p=[].concat(d(p),[{stack:u.message}])),"function"==typeof a&&(p=a(p)),{errors:p}}function wt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.uiSchema,o=e.transformErrors,i=e.additionalMetaSchemas,n=void 0===i?[]:i,s=e.customFormats,l=void 0===s?{}:s,c=e.errorSchema,u=void 0===c?{}:c,d=e.required,p=void 0!==d&&d,h=e.propPath,m=void 0===h?"":h,f=e.isOnlyFirstError,v=void 0===f||f,g="array"===t.type&&Array.isArray(r)&&0===r.length,y=void 0===r||g;if(p){if(y){var b={keyword:"required",params:{missingProperty:m}},P=ot({schema:t,uiSchema:a,errorSchema:u}).required;return P?b.message=P:Cr.getCurrentLocalize()([b]),[b]}}else if(y&&!g)return[];var w=Pt({formData:r,schema:t,transformErrors:o,additionalMetaSchemas:n,customFormats:l}).errors;w=w.filter((function(e){return""===e.property&&!e.schemaPath.includes("#/anyOf/")&&!e.schemaPath.includes("#/oneOf/")||"additionalProperties"===e.name}));var E=ot({schema:t,uiSchema:a,errorSchema:u});return(v&&w.length>0?[w[0]]:w).reduce((function(e,r){return r.message=void 0!==E[r.name]?E[r.name]:r.message,e.push(r),e}),[])}function Et(e,r){try{return ft.validate(e,r)}catch(e){return!1}}function St(e,r,t){for(var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=0;o<r.length;o++){var i=qr(r[o],t,e);if(i.properties){var s=l(l({},t.definitions?{definitions:t.definitions}:{}),{},{anyOf:Object.keys(i.properties).map((function(e){return{required:[e]}}))}),c=void 0;if(i.anyOf){var u=n({},i);u.allOf?u.allOf=u.allOf.slice():u.allOf=[],u.allOf.push(s),c=u}else c=Object.assign({},i,s);if(a||delete c.required,Et(c,e))return o}else if(Et(r[o],e))return o}return 0}var Ft=Object.freeze({__proto__:null,ajvValidateFormData:Pt,validateFormDataAndTransformMsg:wt,isValid:Et,getMatchingOption:St});function xt(e,r){if(Array.isArray(r))return Array.isArray(e)||(e=[]),r.map((function(r,t){return e[t]?xt(e[t],r):r}));if(f(r)){var t=Object.assign({},e);return Object.keys(r).reduce((function(t,a){return t[a]=xt(e?e[a]:{},r[a]),t}),t)}return r}function Ot(e,r,t){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=f(e)?e:{},n=f(a)?a:{};"allOf"in i&&(i=zr(i,t,n));var s=r;if(f(s)&&f(i.default))s=g(s,i.default);else if("default"in i)s=i.default;else{if("$ref"in i){var l=_(i.$ref,t);return Ot(l,s,t,n,o)}if(ct(i))s=i.items.map((function(e,a){return Ot(e,Array.isArray(r)?r[a]:void 0,t,n,o)}));else if("oneOf"in i){var c=qr(i.oneOf[St(n,i.oneOf,t)],t,n);if(i.properties&&c.properties){var u=g(i,c);delete u.oneOf,i=u}else i=c}else if("anyOf"in i){var d=qr(i.anyOf[St(n,i.anyOf,t)],t,n);if(i.properties&&d.properties){var p=g(i,d);delete p.anyOf,i=p}else i=d}}switch(void 0===s&&(s=i.default),y(i)){case"null":return null;case"object":return Object.keys(i.properties||{}).reduce((function(e,r){var a=Ot(i.properties[r],(s||{})[r],t,(n||{})[r],o);return(o||void 0!==a)&&(e[r]=a),e}),{});case"array":if(Array.isArray(s)&&(s=s.map((function(e,r){return Ot(i.items[r]||i.additionalItems||{},e,t,{},o)}))),Array.isArray(a)&&(s=a.map((function(e,r){return Ot(i.items,(s||{})[r],t,e,{},o)}))),i.minItems){if(ut(i,t))return s||[];var h=s?s.length:0;if(i.minItems>h){var m=s||[],v=Array.isArray(i.items)?i.additionalItems:i.items,b=Rr(new Array(i.minItems-h),Ot(v,v.defaults,t,{},o));return m.concat(b)}}s=void 0===s?[]:s}return s}function _t(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!f(e))throw new Error("Invalid schema: ".concat(e));var o=qr(e,t,r),i=Ot(o,e.default,t,r,a);return void 0===r?i:f(r)||Array.isArray(r)?xt(i,r):0===r||!1===r||""===r?r:r||i}function Dt(e,r){void 0===r&&(r={});var t=r.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}Dt('.genFromComponent{font-size:14px;line-height:1;word-wrap:break-word;word-break:break-word;padding:0;margin:0}.genFromComponent a,.genFromComponent h1,.genFromComponent h2,.genFromComponent h3,.genFromComponent li,.genFromComponent p,.genFromComponent ul{font-size:14px}.genFromComponent .genFormIcon{width:12px;height:12px;vertical-align:top}.genFromComponent .genFormBtn{display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;background:#fff;border:1px solid #dcdfe6;color:#606266;-webkit-appearance:none;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;margin:0;-webkit-transition:.1s;transition:.1s;font-weight:500;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;padding:12px 20px;font-size:14px;border-radius:4px}.genFromComponent .genFormBtn.is-plain:focus,.genFromComponent .genFormBtn.is-plain:hover{background:#fff;border-color:#409eff;color:#409eff}.genFromComponent .hiddenWidget{display:none}.genFromComponent .fieldGroupWrap+.fieldGroupWrap .fieldGroupWrap_title{margin-top:20px}.genFromComponent .fieldGroupWrap_title{position:relative;display:block;width:100%;line-height:26px;margin-bottom:8px;font-size:15px;font-weight:700;border:0}.genFromComponent .fieldGroupWrap_des{font-size:12px;line-height:20px;margin-bottom:10px;color:#999}.genFromComponent .genFromWidget_des{padding:0;margin-top:0;margin-bottom:2px;font-size:12px;line-height:20px;color:#999;text-align:left}.genFromComponent .formItemErrorBox{margin:0 auto;color:#ff5757;padding-top:2px;position:absolute;top:100%;left:0;display:-webkit-box!important;line-height:16px;text-overflow:ellipsis;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1;white-space:normal;font-size:12px;text-align:left}.genFromComponent .genFormIcon-qs{fill:#606266;vertical-align:middle;display:inline-block;width:16px;height:16px;margin-left:2px;margin-top:-2px;cursor:pointer}.genFromComponent .genFormItemRequired:before{content:"*";color:#f56c6c;margin-right:4px}.genFromComponent .appendCombining_box{margin-bottom:22px}.genFromComponent .appendCombining_box .appendCombining_box{margin-bottom:10px}.genFromComponent .appendCombining_box{padding:10px;background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .validateWidget{margin-bottom:0!important;width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important;padding:0!important}.genFromComponent .validateWidget .formItemErrorBox{padding:5px 0;position:relative}.genFromComponent .arrayField:not(.genFormItem){margin-bottom:22px}.genFromComponent .arrayField:not(.genFormItem) .arrayField{margin-bottom:10px}.genFromComponent .arrayOrderList{background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .arrayOrderList_item{position:relative;padding:25px 10px 12px;border-radius:2px;margin-bottom:6px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.genFromComponent .arrayOrderList_bottomAddBtn{text-align:right;padding:15px 10px;margin-bottom:10px}.genFromComponent .bottomAddBtn{width:40%;min-width:10px;max-width:180px}.genFromComponent .arrayListItem_content{padding-top:15px;-webkit-box-flex:1;-ms-flex:1;flex:1;margin:0 auto;-webkit-box-shadow:0 -1px 0 0 rgba(0,0,0,.05);box-shadow:0 -1px 0 0 rgba(0,0,0,.05)}.genFromComponent .arrayListItem_index,.genFromComponent .arrayListItem_operateTool{position:absolute;height:25px}.genFromComponent .arrayListItem_index{top:6px;line-height:18px;height:18px;padding:0 6px;background-color:rgba(0,0,0,.28);color:#fff;font-size:12px;border-radius:2px}.genFromComponent .arrayListItem_operateTool{width:75px;right:9px;top:-1px;text-align:right;font-size:0}.genFromComponent .arrayListItem_btn{vertical-align:top;display:inline-block;padding:6px;margin:0;font-size:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none;cursor:pointer;text-align:center;background:transparent;color:#666}.genFromComponent .arrayListItem_btn:hover{opacity:.6}.genFromComponent .arrayListItem_btn[disabled]{color:#999;opacity:.3!important;cursor:not-allowed}.genFromComponent .arrayListItem_orderBtn-bottom,.genFromComponent .arrayListItem_orderBtn-top{background-color:#f0f9eb}.genFromComponent .arrayListItem_btn-delete{background-color:#fef0f0}.genFromComponent .formFooter_item{text-align:right;border-top:1px solid rgba(0,0,0,.08);padding-top:10px}.genFromComponent.formInlineFooter>.fieldGroupWrap{display:inline-block;margin-right:10px}.genFromComponent.formInline .genFormItem{display:inline-block;margin-right:10px;vertical-align:top}.genFromComponent.formInline .validateWidget{margin-right:0}.genFromComponent.formInline .formFooter_item{border-top:none;padding-top:0}.layoutColumn .layoutColumn_w100{width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important}.layoutColumn .fieldGroupWrap_box{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start}.layoutColumn .fieldGroupWrap_box>div{width:100%;-ms-flex-preferred-size:100%;flex-basis:100%}.layoutColumn .fieldGroupWrap_box>.genFormItem{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;-webkit-box-sizing:border-box;box-sizing:border-box;padding-right:10px}.layoutColumn.layoutColumn-1 .fieldGroupWrap_box>.genFormItem{padding-right:0}.layoutColumn.layoutColumn-2 .fieldGroupWrap_box>.genFormItem{width:50%;-ms-flex-preferred-size:50%;flex-basis:50%}.layoutColumn.layoutColumn-3 .fieldGroupWrap_box>.genFormItem{width:33.333%;-ms-flex-preferred-size:33.333%;flex-basis:33.333%}');var $t={formFooter:{type:Object,default:function(){return{show:!0,okBtn:"保存",cancelBtn:"取消"}}},value:{type:null,default:function(){return{}},required:!0},formProps:{type:Object,default:function(){return{}}},fallbackLabel:{type:Boolean,default:!1},schema:{type:Object,default:function(){return{}},required:!0},uiSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},errorSchema:{type:Object,default:function(){return{}}}},jt={name:"FormFooter",props:{okBtn:{type:String,default:"保存"},cancelBtn:{type:String,default:"取消"},formItemAttrs:{type:Object,default:function(){return{}}},globalOptions:null},render:function(e){var r=this,t=this.$props,a=t.okBtn,o=t.cancelBtn,i=t.globalOptions.COMPONENT_MAP;return e(i.formItem,l({class:{formFooter_item:!0}},this.formItemAttrs),[e(i.button,{on:{click:function(){r.$emit("onCancel")}}},o),e(i.button,{style:{marginLeft:"10px"},props:{type:"primary"},on:{click:function(){r.$emit("onSubmit")}}},a)])}};var kt=function(e,r,t,a,o,i,n,s,l,c){"boolean"!=typeof n&&(l=s,s=n,n=!1);var u,d="function"==typeof t?t.options:t;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,o&&(d.functional=!0)),a&&(d._scopeId=a),i?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(i)},d._ssrRegister=u):r&&(u=n?function(e){r.call(this,c(e,this.$root.$options.shadowRoot))}:function(e){r.call(this,s(e))}),u)if(d.functional){var p=d.render;d.render=function(e,r){return u.call(r),p(e,r)}}else{var h=d.beforeCreate;d.beforeCreate=h?[].concat(h,u):[u]}return t},It={name:"FieldGroupWrap",inject:["genFormProvide"],props:{curNodePath:{type:String,default:""},showTitle:{type:Boolean,default:!0},showDescription:{type:Boolean,default:!0},title:{type:String,default:""},description:{type:String,default:""}},computed:{trueTitle:function(){var e=this.title;if(e)return e;var r=(this.genFormProvide.value||this.genFormProvide).fallbackLabel&&this.curNodePath.split(".").pop();return r!=="".concat(Number(r))?r:""}}},At=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("div",{staticClass:"fieldGroupWrap"},[e.showTitle&&e.trueTitle?t("h3",{staticClass:"fieldGroupWrap_title"},[e._v("\n "+e._s(e.trueTitle)+"\n ")]):e._e(),e._v(" "),e.showDescription&&e.description?t("p",{staticClass:"fieldGroupWrap_des",domProps:{innerHTML:e._s(e.description)}}):e._e(),e._v(" "),t("div",{staticClass:"fieldGroupWrap_box"},[e._t("default")],2)])};At._withStripped=!0;var Ct=kt({render:At,staticRenderFns:[]},void 0,It,void 0,!1,void 0,!1,void 0,void 0,void 0),Rt={formProps:{type:null},globalOptions:{type:null},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},customFormats:{type:Object,default:function(){return{}}},rootSchema:{type:Object,default:function(){return{}}},rootFormData:{type:null,default:function(){return{}}},curNodePath:{type:String,default:""},required:{type:Boolean,default:!1},needValidFieldGroup:{type:Boolean,default:!0}},Nt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-down",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}})])};Nt._withStripped=!0;var Lt=kt({render:Nt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Tt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-up",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}})])};Tt._withStripped=!0;var zt=kt({render:Tt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Vt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-close",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1\n 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0\n 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}})])};Vt._withStripped=!0;var qt=kt({render:Vt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Wt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-plus",attrs:{t:"1551322312294",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"10297","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"200",height:"200"}},[r("path",{attrs:{d:"M474 152m8 0l60 0q8 0 8 8l0 704q0 8-8 8l-60 0q-8 0-8-8l0-704q0-8 8-8Z","p-id":"10298"}}),this._v(" "),r("path",{attrs:{d:"M168 474m8 0l672 0q8 0 8 8l0 60q0 8-8 8l-672 0q-8 0-8-8l0-60q0-8 8-8Z","p-id":"10299"}})])};Wt._withStripped=!0;var Mt=kt({render:Wt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Bt=function(){var e=this.$createElement,r=this._self._c||e;return r("svg",{staticClass:"genFormIcon genFormIcon-qs",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"}},[r("path",{attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 708c-22.1\n 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 0\n 0-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8\n 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6\n 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6\n 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z"}})])};Bt._withStripped=!0;var Ut=kt({render:Bt,staticRenderFns:[]},void 0,{},void 0,!1,void 0,!1,void 0,void 0,void 0),Qt={name:"Widget",inject:["genFormProvide"],props:{isFormData:{type:Boolean,default:!0},curValue:{type:null,default:0},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},widget:{type:[String,Function,Object],default:null},required:{type:Boolean,default:!1},emptyValue:{type:null,default:void 0},formatValue:{type:[Function],default:function(e){return{update:!0,value:e}}},rootFormData:{type:null},curNodePath:{type:String,default:""},label:{type:String,default:""},width:{type:String,default:""},labelWidth:{type:String,default:""},description:{type:String,default:""},widgetAttrs:{type:Object,default:function(){return{}}},widgetClass:{type:Object,default:function(){return{}}},widgetStyle:{type:Object,default:function(){return{}}},fieldAttrs:{type:Object,default:function(){return{}}},fieldClass:{type:Object,default:function(){return{}}},fieldStyle:{type:Object,default:function(){return{}}},uiProps:{type:Object,default:function(){return{}}},formProps:null,getWidget:null,globalOptions:null,onChange:null},computed:{value:{get:function(){return this.isFormData?Hr(this.rootFormData,this.curNodePath):this.curValue},set:function(e){var r=""===e||null===e?this.emptyValue:e;this.isFormData&&Qr(this.rootFormData,this.curNodePath,r),this.$emit("onChange",r)}}},created:function(){this.uiProps.enumOptions&&this.uiProps.enumOptions.length>0&&void 0===this.value&&this.value!==this.uiProps.enumOptions[0]&&(this.schema.items?this.value=[]:this.required&&(this.value=this.uiProps.enumOptions[0].value))},render:function(e){var r=this,t=this.$props.curNodePath,a=Mr(t),o=r.globalOptions.HELPERS.isMiniDes(r.formProps),i=r.description?e("div",{domProps:{innerHTML:r.description},class:{genFromWidget_des:!0}}):null,n=r.globalOptions.COMPONENT_MAP,s=o&&i?e(n.popover,{style:{margin:"0 2px",fontSize:"16px",cursor:"pointer"},props:{placement:"top",trigger:"hover"}},[i,e(Ut,{slot:"reference"})]):null,c=l(l({},r.fieldStyle),r.width?{width:r.width,flexBasis:r.width,paddingRight:"10px"}:{}),u=ht(r.label,r.widget&&this.genFormProvide.fallbackLabel,t);return e(n.formItem,{class:l(l({},r.fieldClass),{},{genFormItem:!0}),style:c,attrs:r.fieldAttrs,props:l(l({},r.labelWidth?{labelWidth:r.labelWidth}:{}),this.isFormData?{prop:a?"__$$root":t,rules:[{validator:function(e,o,i){a&&(o=r.rootFormData);var n=wt({formData:o,schema:r.$props.schema,uiSchema:r.$props.uiSchema,customFormats:r.$props.customFormats,errorSchema:r.errorSchema,required:r.required,propPath:t});if(n.length>0)return i(n[0].message);var s=r.$props.customRule;return s&&"function"==typeof s?s({field:t,value:o,rootFormData:r.rootFormData,callback:i}):i()},trigger:"blur"}]}:{}),scopedSlots:{error:function(r){return r.error?e("div",{class:{formItemErrorBox:!0},attrs:{title:r.error}},[r.error]):null}}},[u?e("span",{slot:"label",class:{genFormLabel:!0,genFormItemRequired:r.required}},["".concat(u),s,"".concat(r.formProps&&r.formProps.labelSuffix||"")]):null,o?null:i,e(r.widget,{style:r.widgetStyle,class:r.widgetClass,attrs:l(l(l({},r.widgetAttrs),r.uiProps),{},{value:this.value}),ref:"widgetRef",on:{"hook:mounted":function(){r.getWidget&&"function"==typeof r.getWidget&&r.getWidget.call(null,r.$refs.widgetRef)},input:function(e){var t=r.formatValue(e),a=r.value;t.update&&a!==t.value&&(r.value=t.value,r.onChange&&r.onChange({curVal:t.value,preVal:a,parentFormData:Hr(r.rootFormData,r.curNodePath,1),rootFormData:r.rootFormData}))}}})])}},Ht={name:"ObjectField",functional:!0,props:Rt,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,i=t.errorSchema,n=t.needValidFieldGroup,s=t.curNodePath,c=t.rootFormData,p=t.globalOptions,h=tt({schema:a,uiSchema:o,curNodePath:s,rootFormData:c}),m=h.title,v=h.description,g=h.showTitle,y=h.showDescription,b=h.order,P=h.fieldClass,w=h.fieldAttrs,E=h.fieldStyle,S=h.onlyShowIfDependent,F=it(Object.keys(a.properties||{}),b).map((function(t){var n=function(e){return Array.isArray(a.required)&&!!~a.required.indexOf(e)}(t),d=function(e){var r=!1,t=!1;return f(a.dependencies)&&(t=Object.entries(a.dependencies).some((function(t){var a=u(t,2),o=a[0],i=a[1],n=!(!Array.isArray(i)||!~i.indexOf(e));return r=r||n,n&&void 0!==Hr(c,s)[o]}))),{isDependency:r,curDependent:t}}(t),p=d.isDependency,h=d.curDependent;return p&&S&&!h?null:e(na,{key:t,props:l(l({},r.props),{},{schema:a.properties[t],uiSchema:o[t],errorSchema:i[t],required:n||h,curNodePath:Br(s,t)})})}));return e(Ct,{props:{title:m,description:v,showTitle:g,showDescription:y,curNodePath:s},class:l(l({},r.data.class),P),attrs:w,style:E},[e("template",{slot:"default"},[].concat(d(F),[n?e(Qt,{key:"validateWidget-object",class:{validateWidget:!0,"validateWidget-object":!0},props:{schema:Object.entries(a).reduce((function(e,r){var t=u(r,2),o=t[0],i=t[1];return!1!==a.additionalProperties&&["properties","id","$id"].includes(o)||(e[o]=i),e}),{}),uiSchema:o,errorSchema:i,curNodePath:s,rootFormData:c,globalOptions:p}}):null]))])}},Kt={name:"StringField",props:Rt,functional:!0,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,i=t.curNodePath,n=t.rootFormData,s=t.globalOptions.WIDGET_MAP,c=lt(a)&&pt(a,o,i,n),u=at({schema:a,uiSchema:o,curNodePath:i,rootFormData:n},(function(){var e="number"===a.type||"integer"===a.type;return{widget:c?s.common.select:s.formats[a.format]||(e?s.types.number:s.types.string)}}));return c&&!u.uiProps.enumOptions&&(u.uiProps.enumOptions=c),e(Qt,l(l({},r.data),{},{props:l(l({},r.props),u)}))}},Gt={name:"NumberField",props:Rt,functional:!0,render:function(e,r){return e(Kt,r.data)}},Jt={name:"IntegerField",props:Rt,functional:!0,render:function(e,r){return e(Kt,r.data)}},Zt={name:"BooleanField",props:Rt,functional:!0,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,i=t.curNodePath,n=t.rootFormData,s=t.globalOptions,c=pt({enumNames:a.enumNames||["true","false"],enum:a.enum||[!0,!1]},o,i,n),u=at({schema:a,uiSchema:o,curNodePath:i,rootFormData:n},(function(){return{widget:s.WIDGET_MAP.types.boolean}}));return u.uiProps.enumOptions=u.uiProps.enumOptions||c,e(Qt,l(l({},r.data),{},{props:l(l({},r.props),u)}))}},Yt={name:"ArrayOrderList",props:{vNodeList:{type:Array,default:[]},tupleItemsLength:{type:Number,default:0},addable:{type:Boolean,default:!0},showIndexNumber:{type:Boolean,default:!1},sortable:{type:Boolean,default:!0},removable:{type:Boolean,default:!0},maxItems:{},minItems:{},globalOptions:null},computed:{canAdd:function(){var e=this.$props,r=e.addable,t=e.maxItems,a=e.vNodeList;return!!r&&(void 0===t||a.length<t)},canRemove:function(){var e=this.$props,r=e.removable,t=e.minItems,a=e.vNodeList;return!!r&&(void 0===t||a.length>t)}},render:function(e){var r=this;return this.vNodeList.length<=0&&!this.addable?null:e("div",{class:{arrayOrderList:!0}},this.vNodeList.map((function(t,a){var o=t.key,i=t.vNode,n=r.tupleItemsLength+a,s=a+1;return e("div",{key:o,class:{arrayOrderList_item:!0}},[r.showIndexNumber?e("div",{class:{arrayListItem_index:!0}},s):null,e("div",{class:{arrayListItem_operateTool:!0}},[e("button",{style:l({},r.sortable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.sortable||0===a},class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-top":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"moveUp",data:{index:n}})}}},[e(zt)]),e("button",{style:l({},r.sortable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.sortable||a===r.vNodeList.length-1},class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-bottom":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"moveDown",data:{index:n}})}}},[e(Lt)]),e("button",{style:l({},r.removable?{}:{display:"none"}),attrs:{type:"button",disabled:!r.canRemove},class:{arrayListItem_btn:!0,"arrayListItem_btn-delete":!0},on:{click:function(){r.$emit("onArrayOperate",{command:"remove",data:{index:n}})}}},[e(qt)])]),e("div",{class:{arrayListItem_content:!0}},[i])])})).concat([e("p",{style:l({},this.canAdd?{}:{display:"none"}),class:{arrayOrderList_bottomAddBtn:!0}},[e("button",{attrs:{type:"button"},class:{bottomAddBtn:!0,"is-plain":!0,genFormBtn:!0},on:{click:function(){r.$emit("onArrayOperate",{command:"add"})}}},[e(Mt,{style:{marginRight:"5px"}}),this.maxItems?"( ".concat(this.vNodeList.length," / ").concat(this.maxItems," )"):""])])]))}},Xt={name:"ArrayFieldNormal",functional:!0,props:l(l({},Rt),{},{itemsFormData:{type:Array}}),render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,i=t.curNodePath,n=t.rootFormData,s=t.itemsFormData,c=t.errorSchema,u=t.globalOptions,d=tt({schema:a,uiSchema:o,curNodePath:i,rootFormData:n}),p=d.title,h=d.description,m=d.addable,f=d.showIndexNumber,v=d.sortable,g=d.removable,y=d.showTitle,b=d.showDescription,P=d.fieldClass,w=d.fieldAttrs,E=d.fieldStyle,S=s.map((function(t,n){var s=Yr({schema:a.items,uiSchema:o.items},n);return{key:t.key,vNode:e(na,{key:t.key,props:l(l({},r.props),{},{schema:a.items,required:![].concat(a.items.type).includes("null"),uiSchema:l(l({},o.items),s),errorSchema:c.items,curNodePath:Br(i,n)})})}}));return e(Ct,{props:{title:p,description:h,showTitle:y,showDescription:b,curNodePath:i},class:l(l({},r.data.class),P),attrs:w,style:E},[e(Yt,{props:{vNodeList:S,showIndexNumber:f,addable:m,sortable:v,removable:g,maxItems:a.maxItems,minItems:a.minItems,globalOptions:u},on:r.listeners})])}},ea={name:"ArrayFieldMultiSelect",functional:!0,props:l({},Rt),render:function(e,r){var t=r.props,a=t.schema,o=t.rootSchema,i=t.uiSchema,n=t.curNodePath,s=t.rootFormData,c=t.globalOptions,u=pt(qr(a.items,o),i,n,s),d=at({schema:a,uiSchema:i,curNodePath:n,rootFormData:s},(function(){return{widget:c.WIDGET_MAP.common.checkboxGroup}}));return d.uiProps.multiple=!0,u&&!d.uiProps.enumOptions&&(d.uiProps.enumOptions=u),e(Qt,l(l({},r.data),{},{props:l(l({},r.props),d)}))}},ra={name:"ArrayFieldTuple",props:l(l({},Rt),{},{itemsFormData:{type:Array,default:function(){return[]}}}),created:function(){this.fixItemsFormData()},methods:{fixItemsFormData:function(){var e=!Array.isArray(this.itemsFormData);if(e||this.itemsFormData.length<this.schema.items.length){var r=_t(this.schema,void 0,this.rootSchema);e?this.$emit("onArrayOperate",{command:"setNewTarget",data:{newTarget:r}}):this.$emit("onArrayOperate",{command:"batchPush",data:{pushArray:r.slice(this.itemsFormData.length)}})}}},render:function(e){var r=this;if(!Array.isArray(this.itemsFormData))return null;var t,a,o=this.$props,i=o.schema,n=o.uiSchema,s=o.errorSchema,c=o.curNodePath,u=o.globalOptions,p=tt({schema:i,uiSchema:n,curNodePath:c,rootFormData:this.rootFormData}),h=p.title,m=p.description,f=p.addable,v=p.showIndexNumber,g=p.sortable,y=p.removable,b=p.showTitle,P=p.showDescription,w=p.fieldClass,E=p.fieldAttrs,S=p.fieldStyle,F=(t=this.itemsFormData,a=this.schema.items.length-1,t.reduce((function(e,r,t){return e[t>a?1:0].push(r),e}),[[],[]])),x=F[0].map((function(t,a){return e(na,{key:t.key,props:l(l({},r.$props),{},{required:![].concat(i.items[a].type).includes("null"),schema:i.items[a],uiSchema:n.items?n.items[a]:{},errorSchema:s.items?s.items[a]:{},curNodePath:Br(c,a)})})})),O=F[1].map((function(t,a){var o=Yr({schema:i.additionalItems,uiSchema:n.additionalItems},a);return{key:t.key,vNode:e(na,{key:t.key,props:l(l({},r.$props),{},{schema:i.additionalItems,required:![].concat(i.additionalItems.type).includes("null"),uiSchema:l(l({},n.additionalItems),o),errorSchema:s.additionalItems,curNodePath:Br(c,a+i.items.length)})})}})),_=(void 0===f||f)&&dt(this.schema);return e(Ct,{props:{title:h,description:m,showTitle:b,showDescription:P,curNodePath:c},class:w,attrs:E,style:S},[].concat(d(x),[e(Yt,{props:{vNodeList:O,tupleItemsLength:i.items.length,addable:_,showIndexNumber:v,sortable:g,removable:y,maxItems:i.maxItems,minItems:i.minItems,globalOptions:u},on:this.$listeners})]))}},ta={name:"ArrayFieldSpecialFormat",props:Rt,functional:!0,render:function(e,r){var t=r.props,a=t.schema,o=t.uiSchema,i=t.curNodePath,n=t.rootFormData,s=at({schema:l({"ui:widget":t.globalOptions.WIDGET_MAP.formats[a.format]},a),uiSchema:o,curNodePath:i,rootFormData:n});return e(Qt,l(l({},r.data),{},{props:l(l({},r.props),s)}))}},aa={name:"ArrayField",props:Rt,data:function(){return{formKeys:this.getCuFormData().map((function(){return E()}))}},computed:{itemsFormData:function(){var e=this.$data.formKeys;return this.curFormData.map((function(r,t){return{key:e[t],value:r}}))},curFormData:function(){return this.getCuFormData()}},watch:{curFormData:function(e,r){e!==r&&Array.isArray(e)&&(this.formKeys=e.map((function(){return E()})))}},methods:{getCuFormData:function(){var e=this.$props,r=Hr(e.rootFormData,e.curNodePath);return Array.isArray(r)?r:[]},getNewFormDataRow:function(){var e=this.$props,r=e.schema,t=e.rootSchema,a=r.items;return ct(this.schema)&&dt(this.schema)&&(a=r.additionalItems),_t(a,void 0,t)},handleArrayOperate:function(e){var r=e.command,t=e.data,a={moveUp:function(e,r){!function(e,r){if(0===r)return!1;var t=[e[r],e[r-1]];e.splice.apply(e,[r-1,2].concat(t))}(e,r.index)},moveDown:function(e,r){!function(e,r){if(r===e.length-1)return!1;var t=e[r],a=[e[r+1],t];e.splice.apply(e,[r,2].concat(a))}(e,r.index)},remove:function(e,r){!function(e,r){e.splice(r,1).length}(e,r.index)},add:function(e,r){var t=r.newRowData;e.push(t)},batchPush:function(e,r){r.pushArray.forEach((function(r){e.push(r)}))},setNewTarget:function(e,r){Qr(r.formData,r.nodePath,r.newTarget)}}[r];if(!a)throw new Error("错误 - 未知的操作:[".concat(r,"]"));var o=t,i=t;"add"===r?(o={newRowData:this.getNewFormDataRow()},i={newRowData:E()}):"batchPush"===r?i={pushArray:o.pushArray.map((function(e){return E()}))}:"setNewTarget"===r&&(o={formData:this.rootFormData,nodePath:this.curNodePath,newTarget:o.newTarget},i={formData:this.$data,nodePath:"formKeys",newTarget:o.newTarget.map((function(e){return E()}))}),a.apply(this,[this.$data.formKeys,i]),a.apply(this,[this.curFormData,o])}},render:function(e){var r=this.$props,t=r.schema,a=r.uiSchema,o=r.rootSchema,n=r.rootFormData,s=r.curNodePath,c=r.globalOptions;if(!t.hasOwnProperty("items"))throw new Error("[".concat(t,"] 请先定义 items属性"));if(ut(t,o))return e(ea,{props:this.$props,class:i({},F(ea.name),!0)});if(t.format||t["ui:widget"]||a["ui:widget"])return e(ta,{props:this.$props,class:i({},F(ta.name),!0)});var d=ct(t)?ra:Xt;return e("div",[e(d,{props:l({itemsFormData:this.itemsFormData},this.$props),class:i({},F(d.name),!0),on:{onArrayOperate:this.handleArrayOperate}}),this.needValidFieldGroup?e(Qt,{key:"validateWidget-array",class:{validateWidget:!0,"validateWidget-array":!0},props:{schema:Object.entries(this.$props.schema).reduce((function(e,r){var t=u(r,2),a=t[0],o=t[1];return"items"!==a&&(e[a]=o),e}),{}),uiSchema:a,errorSchema:this.errorSchema,curNodePath:s,rootFormData:n,globalOptions:c}}):null])}},oa={name:"SelectLinkageField",props:l(l({},Rt),{},{combiningType:{type:String,default:"anyOf"},selectList:{type:Array,require:!0}}),data:function(){return{curSelectIndex:this.computedCurSelectIndexByFormData(Hr(this.rootFormData,this.curNodePath))}},methods:{computedCurSelectIndexByFormData:function(e){var r=St(e,this.selectList,this.rootSchema,!0);return 0!==r?r:this.curSelectIndex||0},getSelectBoxVNode:function(){var e=this,r=at({schema:this.schema["".concat(this.combiningType,"Select")]||{},uiSchema:this.uiSchema["".concat(this.combiningType,"Select")]||{},curNodePath:this.curNodePath,rootFormData:this.rootFormData},(function(){return{widget:"SelectWidget"}}));if(r.label=r.label||this.schema.title,r.description=r.description||this.schema.description,!r.uiProps.enumOptions){var t=this.uiSchema[this.combiningType]||[];r.uiProps.enumOptions=this.selectList.map((function(e,r){return{label:tt({schema:e,uiSchema:t[r],containsSpec:!1}).title||"选项 ".concat(r+1),value:r}}))}return this.$createElement(Qt,{key:"fieldSelect_".concat(this.combiningType),class:i({},"fieldSelect_".concat(this.combiningType),!0),props:l({isFormData:!1,curValue:this.curSelectIndex,globalOptions:this.globalOptions},r),on:{onChange:function(r){e.curSelectIndex=r}}})}},watch:{curSelectIndex:function(e,r){var t=Hr(this.rootFormData,this.curNodePath),a=_t(this.selectList[e],void 0,this.rootSchema),o=Object.prototype.hasOwnProperty;if(f(t)){var i=qr(this.selectList[r],this.rootSchema);if("object"===y(i))for(var n in i.properties)o.call(i.properties,n)&&!o.call(a,n)&&Ur(t,n)}f(a)?Object.entries(a).forEach((function(e){var r=u(e,2),a=r[0],o=r[1];void 0!==o&&Qr(t,a,o)})):Qr(this.rootFormData,this.curNodePath,a||t)}},render:function(e){var r,t=this,a=this.$props.curNodePath,o=Wr(a),n=null;if(("object"===this.schema.type||this.schema.properties)&&!function(e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!1;return!0}(this.schema.properties)){var s,u=Object.assign({},this.schema);delete u[this.combiningType],n=e(na,{key:"origin_".concat(this.combiningType),class:(s={},i(s,"".concat(this.combiningType,"_originBox"),!0),i(s,"".concat(o,"-originBox"),!0),s),props:l(l({},this.$props),{},{schema:u})})}var d=[this.getSelectBoxVNode()],p=this.selectList[this.curSelectIndex];if(p){var h=this.schema,f=this.combiningType,v="".concat(this.combiningType,"Select");h.properties,h[f],h[v];var g=c(h,["properties",f,v].map(m));p=Object.assign({},g,p);var y=S(tt({schema:this.schema,uiSchema:this.uiSchema,containsSpec:!1,curNodePath:a,rootFormData:this.rootFormData}),(function(e){return e===t.combiningType?void 0:"ui:".concat(e)})),b=S(ot({schema:this.schema,uiSchema:this.uiSchema,errorSchema:this.errorSchema}),(function(e){return e===t.combiningType?void 0:"err:".concat(e)}));d.push(e(na,{key:"appendSchema_".concat(this.combiningType),props:l(l({},this.$props),{},{schema:l({"ui:showTitle":!1,"ui:showDescription":!1},p),required:this.required,uiSchema:l(l({},y),(this.uiSchema[this.combiningType]||[])[this.curSelectIndex]),errorSchema:l(l({},b),(this.errorSchema[this.combiningType]||[])[this.curSelectIndex])})}))}return d.push(e(Qt,{key:"validateWidget-".concat(this.combiningType),class:i({validateWidget:!0},"validateWidget-".concat(this.combiningType),!0),props:{schema:this.schema,uiSchema:this.uiSchema,errorSchema:this.errorSchema,curNodePath:this.curNodePath,rootFormData:this.rootFormData,globalOptions:this.globalOptions}})),e("div",[n,e("div",{key:"appendBox_".concat(this.combiningType),class:(r={appendCombining_box:!0},i(r,"".concat(this.combiningType,"_appendBox"),!0),i(r,"".concat(o,"-appendBox"),!0),r)},d)])}},ia={array:aa,boolean:Zt,integer:Jt,number:Gt,object:Ht,string:Kt,null:{render:function(){return null}},anyOf:{name:"AnyOfField",functional:!0,render:function(e,r){var t=r.data,a=t.props,o=c(t,["props"]);return e(oa,l(l({},o),{},{props:l(l({},a),{},{combiningType:"anyOf",selectList:a.schema.anyOf})}),r.children)}},oneOf:{name:"oneOfField",functional:!0,render:function(e,r){var t=r.data,a=t.props,o=c(t,["props"]);return e(oa,l(l({},o),{},{props:l(l({},a),{},{combiningType:"oneOf",selectList:a.schema.oneOf})}),r.children)}}},na={name:"SchemaField",props:Rt,functional:!0,render:function(e,r){var t,a=r.props,o=a.rootSchema,n=qr(a.schema,o),s=l(l({},a),{},{schema:n});if(0===Object.keys(n).length)return null;var c,u,d=et(ia,s),p=d.field,h=d.fieldProps,m=Xr({schema:n,uiSchema:a.uiSchema,curNodePath:a.curNodePath,rootFormData:a.rootFormData}),f=Wr(a.curNodePath);return n.anyOf&&n.anyOf.length>0&&!lt(n)?e(ia.anyOf,{class:(c={},i(c,"".concat(f,"-anyOf"),!0),i(c,"fieldItem",!0),i(c,"anyOfField",!0),c),props:s}):n.oneOf&&n.oneOf.length>0&&!lt(n)?e(ia.oneOf,{class:(u={},i(u,"".concat(f,"-oneOf"),!0),i(u,"fieldItem",!0),i(u,"oneOfField",!0),u),props:s}):p&&!m?e(p,{props:l(l({},s),{},{fieldProps:h}),class:l(l({},r.data.class),{},(t={},i(t,F(p.name)||p,!0),i(t,"hiddenWidget",m),i(t,"fieldItem",!0),i(t,f,!0),t))}):null}};var sa={name:"CheckboxesWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}},la=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("checkbox-group",e._g(e._b({},"checkbox-group",e.$attrs,!1),e.$listeners),e._l(e.enumOptions,(function(r,a){return t("checkbox",{key:a,attrs:{label:r.value}},[e._v("\n "+e._s(r.label)+"\n ")])})),1)};la._withStripped=!0;var ca=kt({render:la,staticRenderFns:[]},void 0,sa,void 0,!1,void 0,!1,void 0,void 0,void 0),ua={name:"RadioWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}},da=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("radio-group",e._g(e._b({},"radio-group",e.$attrs,!1),e.$listeners),e._l(e.enumOptions,(function(r,a){return t("radio",{key:a,attrs:{label:r.value}},[e._v("\n "+e._s(r.label)+"\n ")])})),1)};da._withStripped=!0;var pa=kt({render:da,staticRenderFns:[]},void 0,ua,void 0,!1,void 0,!1,void 0,void 0,void 0),ha={name:"SelectWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}},ma=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("i-select",e._g(e._b({},"i-select",e.$attrs,!1),e.$listeners),e._l(e.enumOptions,(function(r,a){return t("i-option",{key:a,attrs:{value:r.value}},[e._v("\n "+e._s(r.label)+"\n ")])})),1)};ma._withStripped=!0;var fa=function(e){return"0".concat(e).substr(-2)};function va(e,r){if(!e)return"";var t=new Date(e);if(r)return t.toISOString();var a={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()},o=a.month,i=a.day;return"".concat(a.year,"-").concat(fa(o),"-").concat(fa(i))}var ga=function(e){return Array.isArray(e)?e.map((function(r){return e&&new Date(r)})):e&&new Date(e)};function ya(e){return null===e||""===e||Array.isArray(e)&&e.every((function(e){return""===e}))}var ba={name:"DatePickerWidget",props:{value:{type:null},isNumberValue:{type:Boolean,default:!1},isDatetime:{type:Boolean,default:!1},isRange:{type:Boolean,default:!1}},data:function(){return{originValue:ga(this.value),formatValue:this.formatDate(this.value)}},watch:{value:function(e){e===this.formatValue||(this.originValue=ga(e))}},computed:{type:function(){return this.isDatetime?this.isRange?"datetimerange":"datetime":this.isRange?"daterange":"date"}},methods:{formatDate:function(e){var r=this.$props,t=r.isRange,a=r.isNumberValue,o=r.isDatetime;return t?ya(e)?[]:e.map((function(e){return a?new Date(e).valueOf():va(e,o)})):ya(e)?void 0:a?new Date(e).valueOf():va(e,o)}},render:function(e){var r=this;return e("date-picker",{attrs:l({type:this.type,value:this.originValue},this.$attrs),on:l(l({},this.$listeners),{},{input:function(e){r.originValue=e,r.formatValue=r.formatDate(e),r.$emit("input",r.formatValue)}})})}},Pa={CheckboxesWidget:ca,RadioWidget:pa,SelectWidget:kt({render:ma,staticRenderFns:[]},void 0,ha,void 0,!1,void 0,!1,void 0,void 0,void 0),TimePickerWidget:{name:"TimePickerWidget",functional:!0,render:function(e,r){var t=r.data.on.input;return r.data.on=l(l({},r.data.on),{},{input:function(e){t.apply(r.data.on,[null===e?void 0:e])}}),e("time-picker",r.data,r.children)}},DatePickerWidget:ba,DateTimePickerWidget:{name:"DateTimePickerWidget",functional:!0,render:function(e,r){return r.data.attrs.isDatetime=!0,e(ba,r.data,r.children)}},UploadWidget:{name:"UploadWidget",props:{value:{default:null,type:[String,Array]},responseFileUrl:{default:function(e){return e?e.url||e.data&&e.data.url:""},type:[Function]},btnText:{type:String,default:"点击上传"},slots:{type:null,default:null}},data:function(){var e=this.value,r=Array.isArray(e),t=this.$attrs.fileList||(r?e.map((function(e,r){return{name:"已上传文件(".concat(r+1,")"),url:e}})):e?[{name:"已上传文件",url:e}]:[]);return{isArrayValue:r,fileList:t}},methods:{getUrl:function(e){return e&&(e.response&&this.responseFileUrl(e.response)||e.url)||""},emitValue:function(e){var r,t=this;if(this.isArrayValue)r=e.length?e.reduce((function(e,r){var a=t.getUrl(r);return a&&e.push(a),e}),[]):[];else{var a=e[e.length-1];r=this.getUrl(a)}this.$emit("input",r)}},render:function(){var e=this,r=this.$createElement,t=this.$attrs,a=this.$props.slots,o={attrs:l(l({defaultFileList:this.fileList,"on-error":function(){e.$message&&e.$message.error("文件上传失败")},"on-preview":function(r){var t=e.getUrl(r);t&&function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_blank",t=document.createElement("a");t.style.display="none",t.target=r,t.href=e,document.body.appendChild(t),t.click(),document.body.removeChild(t)}(t)}},t),{},{"on-remove":function(r,a){e.emitValue(a),t["on-remove"]&&t["on-remove"](r,a)},"on-success":function(r,a,o){e.emitValue(o),t["on-success"]&&t["on-success"](r,a,o)}})};this.isArrayValue||(o.attrs.limit=1);var i=[];return a&&a.default?i.push(r("template",{slot:"default"},["function"==typeof a.default?a.default(r):a.default])):i.push(r("i-button",{props:{type:"primary"}},[this.btnText])),a&&a.tip&&i.push(r("template",{slot:"tip"},["function"==typeof a.tip?a.tip(r):a.tip])),r("upload",o,i)}},SwitchWidget:{name:"SwitchWidget",functional:!0,render:function(e,r){var t=r.props,a=t.activeText,o=t.inactiveText,i=Object.entries({open:a,close:o}).reduce((function(r,t){var a=u(t,2),o=a[0],i=a[1];return void 0!==i&&r.push(e("span",{slot:o},[i])),r}),[]);return e("i-switch",r.data,i)}},InputNumberWidget:{name:"SwitchWidget",functional:!0,render:function(e,r){return void 0===r.data.attrs.value&&(r.data.attrs.value=null),e("input-number",r.data,r.children)}}},wa=Pa.InputNumberWidget,Ea={types:{boolean:Pa.SwitchWidget,string:"i-input",number:wa,integer:wa},formats:{color:"color-picker",time:Pa.TimePickerWidget,date:Pa.DatePickerWidget,"date-time":Pa.DateTimePickerWidget},common:{select:Pa.SelectWidget,radioGroup:Pa.RadioWidget,checkboxGroup:Pa.CheckboxesWidget},widgetComponents:Pa};Dt(".genFromComponent.ivu-form-label-top .ivu-form-item-label{line-height:26px;padding-bottom:6px}.genFromComponent .ivu-form-item-error-tip{padding-top:2px;position:absolute;display:-webkit-box!important;text-overflow:ellipsis;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;text-align:left;line-height:1.2}.genFromComponent .validateWidget .ivu-form-item-error-tip{padding:5px 0;position:relative}");var Sa=Object.freeze({WIDGET_MAP:Object.freeze(Ea),COMPONENT_MAP:Object.freeze({form:{functional:!0,render:function(e,r){return r.data.props=l(l({},r.data.props),{},{labelWidth:"top"!==r.data.props.labelPosition&&r.data.props.labelWidth?parseFloat(String(r.data.props.labelWidth)):void 0}),e("i-form",r.data,r.children)}},formItem:{functional:!0,render:function(e,r){return r.data.props=l(l({},r.data.props),{},{labelWidth:r.data.props&&r.data.props.labelWidth?parseFloat(String(r.data.props.labelWidth)):void 0}),e("form-item",r.data,Object.entries(r.slots()).map((function(r){var t=u(r,2),a=t[0],o=t[1];return e("template",{slot:a},o)})))}},button:"i-button",popover:{functional:!0,render:function(e,r){var t=r.slots(),a=t.default,o=t.reference;return e("poptip",r.data,[e("template",{slot:"default"},o),e("template",{slot:"content"},a)])}}}),HELPERS:{isMiniDes:function(e){return e&&["left","right"].includes(e.labelPosition)}}}),Fa=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.WIDGET_MAP.widgetComponents&&Object.entries(e.WIDGET_MAP.widgetComponents).forEach((function(e){var r=u(e,2),t=r[0],o=r[1];return a.default.component(t,o)})),{name:"VueForm",props:$t,provide:function(){return{genFormProvide:this.genFormProvide}},data:function(){var e=_t(this.$props.schema,this.$props.value,this.$props.schema);return this.emitFormDataChange(e,this.value),{formData:e}},computed:{genFormProvide:function(){return{fallbackLabel:this.fallbackLabel}},footerParams:function(){return l({show:!0,okBtn:"保存",cancelBtn:"取消"},this.formFooter)}},watch:{formData:{handler:function(e,r){this.emitFormDataChange(e,r)},deep:!0},schema:function(e,r){this.willReceiveProps(e,r)},value:function(e,r){this.willReceiveProps(e,r)}},methods:{emitFormDataChange:function(e,r){this.$emit("input",e),this.$emit("on-change",{newValue:e,oldValue:r})},willReceiveProps:function(e,r){if(!b(e,r)){var t=_t(this.$props.schema,this.$props.value,this.$props.schema);b(this.formData,t)||(this.formData=t)}}},mounted:function(){this.$emit("on-form-mounted",this.$refs.genEditForm)},render:function(r){var t,a=this,o=this.$scopedSlots.default?this.$scopedSlots.default({formData:a.formData,formRefFn:function(){return a.$refs.genEditForm}}):this.footerParams.show?r(jt,{props:{globalOptions:e,okBtn:a.footerParams.okBtn,cancelBtn:a.footerParams.cancelBtn,formItemAttrs:a.footerParams.formItemAttrs},on:{onCancel:function(){a.$emit("on-cancel")},onSubmit:function(){a.$refs.genEditForm.validate((function(e,r){return e?a.$emit("on-submit",a.formData):a.$emit("on-validation-failed",r)}))}}}):void 0,n=a.$props.formProps,s=n.layoutColumn,u=void 0===s?1:s,d=n.inlineFooter,p=n.inline,h=c(n,["layoutColumn","inlineFooter","inline"]),m={schema:this.schema,uiSchema:this.uiSchema,errorSchema:this.errorSchema,customFormats:this.customFormats,customRule:this.customRule,rootSchema:this.schema,rootFormData:this.formData,curNodePath:"",globalOptions:e,formProps:l({labelPosition:"top",labelSuffix:":"},h)};return r(e.COMPONENT_MAP.form,{class:(t={genFromComponent:!0,formInlineFooter:d,formInline:p},i(t,"genFromComponent_".concat(this.schema.id,"Form"),!!this.schema.id),i(t,"layoutColumn",!p),i(t,"layoutColumn-".concat(u),!p),t),ref:"genEditForm",props:l({model:a.formData},m.formProps)},[r(na,{props:m}),o])}}}(Sa);"undefined"!=typeof window&&window.Vue&&window.Vue.component("VueFormIview3",Fa),e.SchemaField=na,e.default=Fa,e.fieldProps=Rt,e.formUtils=mt,e.getDefaultFormState=_t,e.globalOptions=Sa,e.i18n=Cr,e.schemaValidate=Ft,e.vueUtils=Gr,Object.defineProperty(e,"__esModule",{value:!0})})); diff --git a/packages/lib/vue3/vue3-core/src/components/Widget.js b/packages/lib/vue3/vue3-core/src/components/Widget.js index ffb3392c..4e1c1478 100644 --- a/packages/lib/vue3/vue3-core/src/components/Widget.js +++ b/packages/lib/vue3/vue3-core/src/components/Widget.js @@ -318,7 +318,12 @@ export default { if (preVal !== event) { widgetValue.value = event; if (props.onChange) { - props.onChange(event, preVal); + props.onChange({ + curVal: event, + preVal, + parentFormData: getPathVal(props.rootFormData, props.curNodePath, 1), + rootFormData: props.rootFormData + }); } } }, diff --git a/packages/lib/vue3/vue3-form-ant/dist/vue3-form-ant.esm.js b/packages/lib/vue3/vue3-form-ant/dist/vue3-form-ant.esm.js index 1bc7f82b..9bd0ef69 100644 --- a/packages/lib/vue3/vue3-form-ant/dist/vue3-form-ant.esm.js +++ b/packages/lib/vue3/vue3-form-ant/dist/vue3-form-ant.esm.js @@ -10045,7 +10045,12 @@ var Widget = { widgetValue.value = event; if (props.onChange) { - props.onChange(event, preVal); + props.onChange({ + curVal: event, + preVal: preVal, + parentFormData: getPathVal(props.rootFormData, props.curNodePath, 1), + rootFormData: props.rootFormData + }); } } } diff --git a/packages/lib/vue3/vue3-form-ant/dist/vue3-form-ant.esm.min.js b/packages/lib/vue3/vue3-form-ant/dist/vue3-form-ant.esm.min.js index c00e59a2..3487389b 100644 --- a/packages/lib/vue3/vue3-form-ant/dist/vue3-form-ant.esm.min.js +++ b/packages/lib/vue3/vue3-form-ant/dist/vue3-form-ant.esm.min.js @@ -1,4 +1,4 @@ /** @license @lljj/vue3-form-ant (c) 2020-2021 Liu.Jun License: Apache-2.0 */ import{resolveComponent as e,h as r,openBlock as t,createBlock as a,toDisplayString as o,createCommentVNode as n,createVNode as i,renderSlot as s,inject as l,computed as u,ref as c,watch as d,toRaw as m,getCurrentInstance as p,provide as h,defineComponent as f,onMounted as v}from"vue";function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function b(){return(b=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e}).apply(this,arguments)}function P(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function w(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?P(Object(t),!0).forEach((function(r){y(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function E(e,r){if(null==e)return{};var t,a,o=function(e,r){if(null==e)return{};var t,a,o={},n=Object.keys(e);for(a=0;a<n.length;a++)t=n[a],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a<n.length;a++)t=n[a],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function S(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],a=!0,o=!1,n=void 0;try{for(var i,s=e[Symbol.iterator]();!(a=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);a=!0);}catch(e){o=!0,n=e}finally{try{a||null==s.return||s.return()}finally{if(o)throw n}}return t}(e,r)||F(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||F(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(e,r){if(e){if("string"==typeof e)return O(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?O(e,r):void 0}}function O(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);t<r;t++)a[t]=e[t];return a}function _(e){var r=function(e,r){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var a=t.call(e,r||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:String(r)}function D(e){return e?"".concat("__pathRoot",".").concat(e).replace(/\./g,"_"):"__pathRoot"}function k(e){return""===e}function j(e,r){return""===e?r:[e,r].join(".")}function I(e,r){for(var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=r.split("."),o=0;o<a.length-t;o+=1){if(void 0===e)return;e=""===a[o]?e:e[a[o]]}return e}function A(e){return e}function C(e,r){delete e[r]}function R(e,r,t){for(var a=r.split("."),o=0;o<a.length;o+=1){if(a.length-o<2){e[a[a.length-1]]=t;break}e=e[a[o]]}}function $(r){return"string"==typeof r?e(r):r}var N=Object.freeze({__proto__:null,deletePathVal:C,setPathVal:R,resolveComponent:$,nodePath2ClassName:D,isRootNodePath:k,computedCurPath:j,getPathVal:I,path2prop:A});function L(e){return"[object Object]"===Object.prototype.toString.call(e)}function T(e){return"[object Arguments]"===Object.prototype.toString.call(e)}function z(e,r){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=Object.assign({},e);return Object.keys(r).reduce((function(a,o){var n=e?e[o]:{},i=r[o];return e&&e.hasOwnProperty(o)&&L(i)?a[o]=z(n,i,t):t&&Array.isArray(n)&&Array.isArray(i)?a[o]=n.concat(i):a[o]=i,a}),a)}function V(e){var r,t=e.type;return!t&&e.const?(r=e.const,Array.isArray(r)?"array":"string"==typeof r?"string":null==r?"null":"boolean"==typeof r?"boolean":isNaN(r)?"object"===g(r)?"object":"string":"number"):!t&&e.enum?"string":!t&&e.items?"array":t||!e.properties&&!e.additionalProperties?t instanceof Array&&2===t.length&&t.includes("null")?t.find((function(e){return"null"!==e})):t:"object"}function q(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===r)return!0;if("function"==typeof e||"function"==typeof r)return!0;if("object"!==g(e)||"object"!==g(r))return!1;if(null===e||null===r)return!1;if(e instanceof Date&&r instanceof Date)return e.getTime()===r.getTime();if(e instanceof RegExp&&r instanceof RegExp)return e.source===r.source&&e.global===r.global&&e.multiline===r.multiline&&e.lastIndex===r.lastIndex&&e.ignoreCase===r.ignoreCase;if(T(e)||T(r)){if(!T(e)||!T(r))return!1;var o=Array.prototype.slice;return q(o.call(e),o.call(r),t,a)}if(e.constructor!==r.constructor)return!1;var n=Object.keys(e),i=Object.keys(r);if(0===n.length&&0===i.length)return!0;if(n.length!==i.length)return!1;for(var s,l=t.length;l--;)if(t[l]===e)return a[l]===r;t.push(e),a.push(r),n.sort(),i.sort();for(var u=n.length-1;u>=0;u--)if(n[u]!==i[u])return!1;for(var c=n.length-1;c>=0;c--)if(!q(e[s=n[c]],r[s],t,a))return!1;return t.pop(),a.pop(),!0}var M,W,U=(M="".concat(+new Date),W=0,function(){var e="".concat(+new Date);return e===M?W+=1:W=0,"".concat(M=e,"x").concat(W)});function Q(e,r){return Object.entries(e).reduce((function(e,t){var a=S(t,2),o=a[0],n=a[1],i=r(o,n);return void 0!==i&&(e[i]=n),e}),{})}function B(e){return void 0===e?e:String(e).replace(/^./,(function(e){return e.toLocaleLowerCase()}))}function H(e,r){return e*r/function e(r,t){return 0===t?r:e(t,r%t)}(e,r)}function K(e,r){for(var t=r.split("/"),a=0;a<t.length;a+=1){if(void 0===e)return;e=""===t[a]?e:e[t[a]]}return e}function G(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e;if(!e.startsWith("#"))throw new Error("Could not find a definition for ".concat(t,"."));var a=K(r,e=decodeURIComponent(e.substring(1)));if(void 0===a)throw new Error("Could not find a definition for ".concat(t,"."));return a.hasOwnProperty("$ref")?G(a.$ref,r):a}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function J(e,r){return e(r={exports:{}},r.exports),r.exports}function Z(e){return e&&e.default||e}var Y,X=J((function(e,r){ /** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ -!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var a=r.length-1,o=1;o<a;++o)r[o]=r[o].slice(1,-1);return r[a]=r[a].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function a(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function n(e){var a=r("[0-9]","[A-Fa-f]"),o=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),n="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",i=r("[\\:\\/\\?\\#\\[\\]\\@]",n),s=e?"[\\uE000-\\uF8FF]":"[]",l=r("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t("[A-Za-z]"+r("[A-Za-z]","[0-9]","[\\+\\-\\.]")+"*"),t(t(o+"|"+r(l,n,"[\\:]"))+"*");var u=t(t("25[0-5]")+"|"+t("2[0-4][0-9]")+"|"+t("1[0-9][0-9]")+"|"+t("0?[1-9][0-9]")+"|0?0?[0-9]"),c=t(u+"\\."+u+"\\."+u+"\\."+u),d=t(a+"{1,4}"),m=t(t(d+"\\:"+d)+"|"+c),p=t(t(d+"\\:")+"{6}"+m),h=t("\\:\\:"+t(d+"\\:")+"{5}"+m),f=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+m),v=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+m),g=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+m),y=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+m),b=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+m),P=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),w=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),E=t([p,h,f,v,g,y,b,P,w].join("|")),S=t(t(l+"|"+o)+"+");t("[vV]"+a+"+\\."+r(l,n,"[\\:]")+"+"),t(t(o+"|"+r(l,n))+"*");var x=t(o+"|"+r(l,n,"[\\:\\@]"));return t(t(o+"|"+r(l,n,"[\\@]"))+"+"),t(t(x+"|"+r("[\\/\\?]",s))+"*"),{NOT_SCHEME:new RegExp(r("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,n),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,n),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,n),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,n),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,n,"[\\:\\@\\/\\?]",s),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,n,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,n),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,i),"g"),PCT_ENCODED:new RegExp(o,"g"),IPV4ADDRESS:new RegExp("^("+c+")$"),IPV6ADDRESS:new RegExp("^\\[?("+E+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+S+")")+"?\\]?$")}}var i=n(!1),s=n(!0),l=function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,r){var t=[],a=!0,o=!1,n=void 0;try{for(var i,s=e[Symbol.iterator]();!(a=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);a=!0);}catch(e){o=!0,n=e}finally{try{!a&&s.return&&s.return()}finally{if(o)throw n}}return t}(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")},u=2147483647,c=/^xn--/,d=/[^\0-\x7E]/,m=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,f=String.fromCharCode;function v(e){throw new RangeError(p[e])}function g(e,r){var t=e.split("@"),a="";t.length>1&&(a=t[0]+"@",e=t[1]);var o=function(e,r){for(var t=[],a=e.length;a--;)t[a]=r(e[a]);return t}((e=e.replace(m,".")).split("."),r).join(".");return a+o}function y(e){for(var r=[],t=0,a=e.length;t<a;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<a){var 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}var b=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},P=function(e,r,t){var a=0;for(e=t?h(e/700):e>>1,e+=h(e/r);e>455;a+=36)e=h(e/35);return h(a+36*e/(e+38))},w=function(e){var r,t=[],a=e.length,o=0,n=128,i=72,s=e.lastIndexOf("-");s<0&&(s=0);for(var l=0;l<s;++l)e.charCodeAt(l)>=128&&v("not-basic"),t.push(e.charCodeAt(l));for(var c=s>0?s+1:0;c<a;){for(var d=o,m=1,p=36;;p+=36){c>=a&&v("invalid-input");var f=(r=e.charCodeAt(c++))-48<10?r-22:r-65<26?r-65:r-97<26?r-97:36;(f>=36||f>h((u-o)/m))&&v("overflow"),o+=f*m;var g=p<=i?1:p>=i+26?26:p-i;if(f<g)break;var y=36-g;m>h(u/y)&&v("overflow"),m*=y}var b=t.length+1;i=P(o-d,b,0==d),h(o/b)>u-n&&v("overflow"),n+=h(o/b),o%=b,t.splice(o++,0,n)}return String.fromCodePoint.apply(String,t)},E=function(e){var r=[],t=(e=y(e)).length,a=128,o=0,n=72,i=!0,s=!1,l=void 0;try{for(var c,d=e[Symbol.iterator]();!(i=(c=d.next()).done);i=!0){var m=c.value;m<128&&r.push(f(m))}}catch(e){s=!0,l=e}finally{try{!i&&d.return&&d.return()}finally{if(s)throw l}}var p=r.length,g=p;for(p&&r.push("-");g<t;){var w=u,E=!0,S=!1,x=void 0;try{for(var F,O=e[Symbol.iterator]();!(E=(F=O.next()).done);E=!0){var _=F.value;_>=a&&_<w&&(w=_)}}catch(e){S=!0,x=e}finally{try{!E&&O.return&&O.return()}finally{if(S)throw x}}var D=g+1;w-a>h((u-o)/D)&&v("overflow"),o+=(w-a)*D,a=w;var k=!0,j=!1,I=void 0;try{for(var A,C=e[Symbol.iterator]();!(k=(A=C.next()).done);k=!0){var R=A.value;if(R<a&&++o>u&&v("overflow"),R==a){for(var $=o,N=36;;N+=36){var L=N<=n?1:N>=n+26?26:N-n;if($<L)break;var T=$-L,z=36-L;r.push(f(b(L+T%z,0))),$=h(T/z)}r.push(f(b($,0))),n=P(o,D,g==p),o=0,++g}}}catch(e){j=!0,I=e}finally{try{!k&&C.return&&C.return()}finally{if(j)throw I}}++o,++a}return r.join("")},S=function(e){return g(e,(function(e){return d.test(e)?"xn--"+E(e):e}))},x=function(e){return g(e,(function(e){return c.test(e)?w(e.slice(4).toLowerCase()):e}))},F={};function O(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function _(e){for(var r="",t=0,a=e.length;t<a;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(a-t>=6){var n=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&n)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(a-t>=9){var i=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function D(e,r){function t(e){var t=_(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,O).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,O).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,O).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,O).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,O).replace(r.PCT_ENCODED,o)),e}function k(e){return e.replace(/^0*(.*)/,"$1")||"0"}function j(e,r){var t=e.match(r.IPV4ADDRESS)||[],a=l(t,2)[1];return a?a.split(".").map(k).join("."):e}function I(e,r){var t=e.match(r.IPV6ADDRESS)||[],a=l(t,3),o=a[1],n=a[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),u=s[0],c=s[1],d=c?c.split(":").map(k):[],m=u.split(":").map(k),p=r.IPV4ADDRESS.test(m[m.length-1]),h=p?7:8,f=m.length-h,v=Array(h),g=0;g<h;++g)v[g]=d[g]||m[f+g]||"";p&&(v[h-1]=j(v[h-1],r));var y=v.reduce((function(e,r,t){if(!r||"0"===r){var a=e[e.length-1];a&&a.index+a.length===t?a.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(y&&y.length>1){var P=v.slice(0,y.index),w=v.slice(y.index+y.length);b=P.join(":")+"::"+w.join(":")}else b=v.join(":");return n&&(b+="%"+n),b}return e}var A=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,C=void 0==="".match(/(){0}/)[1];function R(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},a=!1!==r.iri?s:i;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(A);if(o){C?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=I(j(t.host,a),a)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var n=F[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||n&&n.unicodeSupport)D(t,a);else{if(t.host&&(r.domainHost||n&&n.domainHost))try{t.host=S(t.host.replace(a.PCT_ENCODED,_).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}D(t,i)}n&&n.parse&&n.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function $(e,r){var t=!1!==r.iri?s:i,a=[];return void 0!==e.userinfo&&(a.push(e.userinfo),a.push("@")),void 0!==e.host&&a.push(I(j(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(a.push(":"),a.push(String(e.port))),a.length?a.join(""):void 0}var N=/^\.\.?\//,L=/^\/\.(\/|$)/,T=/^\/\.\.(\/|$)/,z=/^\/?(?:.|\n)*?(?=\/|$)/;function V(e){for(var r=[];e.length;)if(e.match(N))e=e.replace(N,"");else if(e.match(L))e=e.replace(L,"/");else if(e.match(T))e=e.replace(T,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(z);if(!t)throw new Error("Unexpected dot segment condition");var a=t[0];e=e.slice(a.length),r.push(a)}return r.join("")}function q(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?s:i,a=[],o=F[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?x(e.host):S(e.host.replace(t.PCT_ENCODED,_).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}D(e,t),"suffix"!==r.reference&&e.scheme&&(a.push(e.scheme),a.push(":"));var n=$(e,r);if(void 0!==n&&("suffix"!==r.reference&&a.push("//"),a.push(n),e.path&&"/"!==e.path.charAt(0)&&a.push("/")),void 0!==e.path){var l=e.path;r.absolutePath||o&&o.absolutePath||(l=V(l)),void 0===n&&(l=l.replace(/^\/\//,"/%2F")),a.push(l)}return void 0!==e.query&&(a.push("?"),a.push(e.query)),void 0!==e.fragment&&(a.push("#"),a.push(e.fragment)),a.join("")}function M(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],o={};return a||(e=R(q(e,t),t),r=R(q(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=V(r.path||""),o.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=V(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=V(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=V(o.path)),o.query=r.query):(o.path=e.path,void 0!==r.query?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function W(e,r){return e&&e.toString().replace(r&&r.iri?s.PCT_ENCODED:i.PCT_ENCODED,_)}var U={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},Q={scheme:"https",domainHost:U.domainHost,parse:U.parse,serialize:U.serialize};function B(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var H={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=B(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(B(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),a=l(t,2),o=a[0],n=a[1];e.path=o&&"/"!==o?o:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}},K={scheme:"wss",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize},G={},J="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Z="[0-9A-Fa-f]",Y=t(t("%[EFef]"+Z+"%"+Z+Z+"%"+Z+Z)+"|"+t("%[89A-Fa-f]"+Z+"%"+Z+Z)+"|"+t("%"+Z+Z)),X=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),ee=new RegExp(J,"g"),re=new RegExp(Y,"g"),te=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',X),"g"),ae=new RegExp(r("[^]",J,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),oe=ae;function ne(e){var r=_(e);return r.match(ee)?r:e}var ie={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,n={},i=t.query.split("&"),s=0,l=i.length;s<l;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var c=u[1].split(","),d=0,m=c.length;d<m;++d)a.push(c[d]);break;case"subject":t.subject=W(u[1],r);break;case"body":t.body=W(u[1],r);break;default:o=!0,n[W(u[0],r)]=W(u[1],r)}}o&&(t.headers=n)}t.query=void 0;for(var p=0,h=a.length;p<h;++p){var f=a[p].split("@");if(f[0]=W(f[0]),r.unicodeSupport)f[1]=W(f[1],r).toLowerCase();else try{f[1]=S(W(f[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}a[p]=f.join("@")}return t},serialize:function(e,r){var t,a=e,n=null!=(t=e.to)?t instanceof Array?t:"number"!=typeof t.length||t.split||t.setInterval||t.call?[t]:Array.prototype.slice.call(t):[];if(n){for(var i=0,s=n.length;i<s;++i){var l=String(n[i]),u=l.lastIndexOf("@"),c=l.slice(0,u).replace(re,ne).replace(re,o).replace(te,O),d=l.slice(u+1);try{d=r.iri?x(d):S(W(d,r).toLowerCase())}catch(e){a.error=a.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=c+"@"+d}a.path=n.join(",")}var m=e.headers=e.headers||{};e.subject&&(m.subject=e.subject),e.body&&(m.body=e.body);var p=[];for(var h in m)m[h]!==G[h]&&p.push(h.replace(re,ne).replace(re,o).replace(ae,O)+"="+m[h].replace(re,ne).replace(re,o).replace(oe,O));return p.length&&(a.query=p.join("&")),a}},se=/^([^\:]+)\:(.*)/,le={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(se),a=e;if(t){var o=r.scheme||a.scheme||"urn",n=t[1].toLowerCase(),i=t[2],s=o+":"+(r.nid||n),l=F[s];a.nid=n,a.nss=i,a.path=void 0,l&&(a=l.parse(a,r))}else a.error=a.error||"URN can not be parsed.";return a},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",a=e.nid,o=t+":"+(r.nid||a),n=F[o];n&&(e=n.serialize(e,r));var i=e,s=e.nss;return i.path=(a||r.nid)+":"+s,i}},ue=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ce={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match(ue)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};F[U.scheme]=U,F[Q.scheme]=Q,F[H.scheme]=H,F[K.scheme]=K,F[ie.scheme]=ie,F[le.scheme]=le,F[ce.scheme]=ce,e.SCHEMES=F,e.pctEncChar=O,e.pctDecChars=_,e.parse=R,e.removeDotSegments=V,e.serialize=q,e.resolveComponents=M,e.resolve=function(e,r,t){var a=function(e,r){var t=e;if(r)for(var a in r)t[a]=r[a];return t}({scheme:"null"},t);return q(M(R(e,a),R(r,a),a,!0),a)},e.normalize=function(e,r){return"string"==typeof e?e=q(R(e,r),r):"object"===a(e)&&(e=R(q(e,r),r)),e},e.equal=function(e,r,t){return"string"==typeof e?e=q(R(e,t),t):"object"===a(e)&&(e=q(e,t)),"string"==typeof r?r=q(R(r,t),t):"object"===a(r)&&(r=q(r,t)),e===r},e.escapeComponent=function(e,r){return e&&e.toString().replace(r&&r.iri?s.ESCAPE:i.ESCAPE,O)},e.unescapeComponent=W,Object.defineProperty(e,"__esModule",{value:!0})}(r)}));(Y=X)&&Y.__esModule&&Object.prototype.hasOwnProperty.call(Y,"default")&&Y.default;var ee=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 a,o,n;if(Array.isArray(r)){if((a=r.length)!=t.length)return!1;for(o=a;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((a=(n=Object.keys(r)).length)!==Object.keys(t).length)return!1;for(o=a;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,n[o]))return!1;for(o=a;0!=o--;){var i=n[o];if(!e(r[i],t[i]))return!1}return!0}return r!=r&&t!=t},re={copy:function(e,r){for(var t in r=r||{},e)r[t]=e[t];return r},checkDataType:te,checkDataTypes:function(e,r,t){switch(e.length){case 1:return te(e[0],r,t,!0);default:var a="",o=oe(e);for(var n in o.array&&o.object&&(a=o.null?"(":"(!"+r+" || ",a+="typeof "+r+' !== "object")',delete o.null,delete o.array,delete o.object),o.number&&delete o.integer,o)a+=(a?" && ":"")+te(n,r,t,!0);return a}},coerceToTypes:function(e,r){if(Array.isArray(r)){for(var t=[],a=0;a<r.length;a++){var o=r[a];(ae[o]||"array"===e&&"array"===o)&&(t[t.length]=o)}if(t.length)return t}else{if(ae[r])return[r];if("array"===e&&"array"===r)return["array"]}},toHash:oe,getProperty:se,escapeQuotes:le,equal:ee,ucs2length:function(e){for(var r,t=0,a=e.length,o=0;o<a;)t++,(r=e.charCodeAt(o++))>=55296&&r<=56319&&o<a&&56320==(64512&(r=e.charCodeAt(o)))&&o++;return t},varOccurences:function(e,r){r+="[^0-9]";var t=e.match(new RegExp(r,"g"));return t?t.length:0},varReplace:function(e,r,t){return r+="([^0-9])",t=t.replace(/\$/g,"$$$$"),e.replace(new RegExp(r,"g"),t+"$1")},schemaHasRules:function(e,r){if("boolean"==typeof e)return!e;for(var t in e)if(r[t])return!0},schemaHasRulesExcept:function(e,r,t){if("boolean"==typeof e)return!e&&"not"!=t;for(var a in e)if(a!=t&&r[a])return!0},schemaUnknownRules:function(e,r){if("boolean"==typeof e)return;for(var t in e)if(!r[t])return t},toQuotedString:ue,getPathExpr:function(e,r,t,a){return me(e,t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'")},getPath:function(e,r,t){var a=ue(t?"/"+pe(r):se(r));return me(e,a)},getData:function(e,r,t){var a,o,n,i;if(""===e)return"rootData";if("/"==e[0]){if(!ce.test(e))throw new Error("Invalid JSON-pointer: "+e);o=e,n="rootData"}else{if(!(i=e.match(de)))throw new Error("Invalid JSON-pointer: "+e);if(a=+i[1],"#"==(o=i[2])){if(a>=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(n="data"+(r-a||""),!o)return n}for(var s=n,l=o.split("/"),u=0;u<l.length;u++){var c=l[u];c&&(n+=se(he(c)),s+=" && "+n)}return s},unescapeFragment:function(e){return he(decodeURIComponent(e))},unescapeJsonPointer:he,escapeFragment:function(e){return encodeURIComponent(pe(e))},escapeJsonPointer:pe};function te(e,r,t,a){var o=a?" !== ":" === ",n=a?" || ":" && ",i=a?"!":"",s=a?"":"!";switch(e){case"null":return r+o+"null";case"array":return i+"Array.isArray("+r+")";case"object":return"("+i+r+n+"typeof "+r+o+'"object"'+n+s+"Array.isArray("+r+"))";case"integer":return"(typeof "+r+o+'"number"'+n+s+"("+r+" % 1)"+n+r+o+r+(t?n+i+"isFinite("+r+")":"")+")";case"number":return"(typeof "+r+o+'"'+e+'"'+(t?n+i+"isFinite("+r+")":"")+")";default:return"typeof "+r+o+'"'+e+'"'}}var ae=oe(["string","number","integer","boolean","null"]);function oe(e){for(var r={},t=0;t<e.length;t++)r[e[t]]=!0;return r}var ne=/^[a-z$_][a-z$_0-9]*$/i,ie=/'|\\/g;function se(e){return"number"==typeof e?"["+e+"]":ne.test(e)?"."+e:"['"+le(e)+"']"}function le(e){return e.replace(ie,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function ue(e){return"'"+le(e)+"'"}var ce=/^\/(?:[^~]|~0|~1)*$/,de=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function me(e,r){return'""'==e?r:(e+" + "+r).replace(/([^\\])' \+ '/g,"$1")}function pe(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function he(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}var fe=function(e){re.copy(e,this)};var ve=J((function(e){var r=e.exports=function(e,t,a){"function"==typeof t&&(a=t,t={}),function e(t,a,o,n,i,s,l,u,c,d){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var m in a(n,i,s,l,u,c,d),n){var p=n[m];if(Array.isArray(p)){if(m in r.arrayKeywords)for(var h=0;h<p.length;h++)e(t,a,o,p[h],i+"/"+m+"/"+h,s,i,m,n,h)}else if(m in r.propsKeywords){if(p&&"object"==typeof p)for(var f in p)e(t,a,o,p[f],i+"/"+m+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),s,i,m,n,f)}else(m in r.keywords||t.allKeys&&!(m in r.skipKeywords))&&e(t,a,o,p,i+"/"+m,s,i,m,n)}o(n,i,s,l,u,c,d)}}(t,"function"==typeof(a=t.cb||a)?a:a.pre||function(){},a.post||function(){},e,"",e)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}})),ge=ye;function ye(e,r,t){var a=this._refs[t];if("string"==typeof a){if(!this._refs[a])return ye.call(this,e,r,a);a=this._refs[a]}if((a=a||this._schemas[t])instanceof fe)return xe(a.schema,this._opts.inlineRefs)?a.schema:a.validate||this._compile(a);var o,n,i,s=be.call(this,r,t);return s&&(o=s.schema,r=s.root,i=s.baseId),o instanceof fe?n=o.validate||e.call(this,o.schema,r,void 0,i):void 0!==o&&(n=xe(o,this._opts.inlineRefs)?o:e.call(this,o,r,void 0,i)),n}function be(e,r){var t=X.parse(r),a=Oe(t),o=Fe(this._getId(e.schema));if(0===Object.keys(e.schema).length||a!==o){var n=De(a),i=this._refs[n];if("string"==typeof i)return Pe.call(this,e,i,t);if(i instanceof fe)i.validate||this._compile(i),e=i;else{if(!((i=this._schemas[n])instanceof fe))return;if(i.validate||this._compile(i),n==De(r))return{schema:i,root:e,baseId:o};e=i}if(!e.schema)return;o=Fe(this._getId(e.schema))}return Ee.call(this,t,o,e.schema,e)}function Pe(e,r,t){var a=be.call(this,e,r);if(a){var o=a.schema,n=a.baseId;e=a.root;var i=this._getId(o);return i&&(n=ke(n,i)),Ee.call(this,t,n,o,e)}}ye.normalizeId=De,ye.fullPath=Fe,ye.url=ke,ye.ids=function(e){var r=De(this._getId(e)),t={"":r},a={"":Fe(r,!1)},o={},n=this;return ve(e,{allKeys:!0},(function(e,r,i,s,l,u,c){if(""!==r){var d=n._getId(e),m=t[s],p=a[s]+"/"+l;if(void 0!==c&&(p+="/"+("number"==typeof c?c:re.escapeFragment(c))),"string"==typeof d){d=m=De(m?X.resolve(m,d):d);var h=n._refs[d];if("string"==typeof h&&(h=n._refs[h]),h&&h.schema){if(!ee(e,h.schema))throw new Error('id "'+d+'" resolves to more than one schema')}else if(d!=De(p))if("#"==d[0]){if(o[d]&&!ee(e,o[d]))throw new Error('id "'+d+'" resolves to more than one schema');o[d]=e}else n._refs[d]=p}t[r]=m,a[r]=p}})),o},ye.inlineRef=xe,ye.schema=be;var we=re.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function Ee(e,r,t,a){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var o=e.fragment.split("/"),n=1;n<o.length;n++){var i=o[n];if(i){if(void 0===(t=t[i=re.unescapeFragment(i)]))break;var s;if(!we[i]&&((s=this._getId(t))&&(r=ke(r,s)),t.$ref)){var l=ke(r,t.$ref),u=be.call(this,a,l);u&&(t=u.schema,a=u.root,r=u.baseId)}}}return void 0!==t&&t!==a.schema?{schema:t,root:a,baseId:r}:void 0}}var Se=re.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function xe(e,r){return!1!==r&&(void 0===r||!0===r?function e(r){var t;if(Array.isArray(r)){for(var a=0;a<r.length;a++)if("object"==typeof(t=r[a])&&!e(t))return!1}else for(var o in r){if("$ref"==o)return!1;if("object"==typeof(t=r[o])&&!e(t))return!1}return!0}(e):r?function e(r){var t,a=0;if(Array.isArray(r)){for(var o=0;o<r.length;o++)if("object"==typeof(t=r[o])&&(a+=e(t)),a==1/0)return 1/0}else for(var n in r){if("$ref"==n)return 1/0;if(Se[n])a++;else if("object"==typeof(t=r[n])&&(a+=e(t)+1),a==1/0)return 1/0}return a}(e)<=r:void 0)}function Fe(e,r){return!1!==r&&(e=De(e)),Oe(X.parse(e))}function Oe(e){return X.serialize(e).split("#")[0]+"#"}var _e=/#\/?$/;function De(e){return e?e.replace(_e,""):""}function ke(e,r){return r=De(r),X.resolve(e,r)}var je={Validation:Ae((function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:Ae(Ie)};function Ie(e,r,t){this.message=t||Ie.message(e,r),this.missingRef=ge.url(e,r),this.missingSchema=ge.normalizeId(ge.fullPath(this.missingRef))}function Ae(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}Ie.message=function(e,r){return"can't resolve reference "+r+" from id "+e};var Ce=function(e,r){r||(r={}),"function"==typeof r&&(r={cmp:r});var t,a="boolean"==typeof r.cycles&&r.cycles,o=r.cmp&&(t=r.cmp,function(e){return function(r,a){var o={key:r,value:e[r]},n={key:a,value:e[a]};return t(o,n)}}),n=[];return function e(r){if(r&&r.toJSON&&"function"==typeof r.toJSON&&(r=r.toJSON()),void 0!==r){if("number"==typeof r)return isFinite(r)?""+r:"null";if("object"!=typeof r)return JSON.stringify(r);var t,i;if(Array.isArray(r)){for(i="[",t=0;t<r.length;t++)t&&(i+=","),i+=e(r[t])||"null";return i+"]"}if(null===r)return"null";if(-1!==n.indexOf(r)){if(a)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=n.push(r)-1,l=Object.keys(r).sort(o&&o(r));for(i="",t=0;t<l.length;t++){var u=l[t],c=e(r[u]);c&&(i&&(i+=","),i+=JSON.stringify(u)+":"+c)}return n.splice(s,1),"{"+i+"}"}}(e)},Re=function(e,r,t){var a="",o=!0===e.schema.$async,n=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),i=e.self._getId(e.schema);if(e.opts.strictKeywords){var s=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(s){var l="unknown keyword: "+s;if("log"!==e.opts.strictKeywords)throw new Error(l);e.logger.warn(l)}}if(e.isTop&&(a+=" var validate = ",o&&(e.async=!0,a+="async "),a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",i&&(e.opts.sourceCode||e.opts.processCode)&&(a+=" /*# sourceURL="+i+" */ ")),"boolean"==typeof e.schema||!n&&!e.schema.$ref){var u=e.level,c=e.dataLevel,d=e.schema["false schema"],m=e.schemaPath+e.util.getProperty("false schema"),p=e.errSchemaPath+"/false schema",h=!e.opts.allErrors,f="data"+(c||""),v="valid"+u;if(!1===e.schema){e.isTop?h=!0:a+=" var "+v+" = false; ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'boolean schema is false' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";var g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?a+=o?" return data; ":" validate.errors = null; return true; ":a+=" var "+v+" = true; ";return e.isTop&&(a+=" }; return validate; "),a}if(e.isTop){var y=e.isTop;u=e.level=0,c=e.dataLevel=0,f="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var b="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}a+=" var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data; "}else{u=e.level,f="data"+((c=e.dataLevel)||"");if(i&&(e.baseId=e.resolve.url(e.baseId,i)),o&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+u+" = errors;"}v="valid"+u,h=!e.opts.allErrors;var P="",w="",E=e.schema.type,S=Array.isArray(E);if(E&&e.opts.nullable&&!0===e.schema.nullable&&(S?-1==E.indexOf("null")&&(E=E.concat("null")):"null"!=E&&(E=[E,"null"],S=!0)),S&&1==E.length&&(E=E[0],S=!1),e.schema.$ref&&n){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(n=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(a+=" "+e.RULES.all.$comment.code(e,"$comment")),E){if(e.opts.coerceTypes)var x=e.util.coerceToTypes(e.opts.coerceTypes,E);var F=e.RULES.types[E];if(x||S||!0===F||F&&!Z(F)){m=e.schemaPath+".type",p=e.errSchemaPath+"/type",m=e.schemaPath+".type",p=e.errSchemaPath+"/type";var O=S?"checkDataTypes":"checkDataType";if(a+=" if ("+e.util[O](E,f,e.opts.strictNumbers,!0)+") { ",x){var _="dataType"+u,D="coerced"+u;a+=" var "+_+" = typeof "+f+"; var "+D+" = undefined; ","array"==e.opts.coerceTypes&&(a+=" if ("+_+" == 'object' && Array.isArray("+f+") && "+f+".length == 1) { "+f+" = "+f+"[0]; "+_+" = typeof "+f+"; if ("+e.util.checkDataType(e.schema.type,f,e.opts.strictNumbers)+") "+D+" = "+f+"; } "),a+=" if ("+D+" !== undefined) ; ";var k=x;if(k)for(var j,I=-1,A=k.length-1;I<A;)"string"==(j=k[I+=1])?a+=" else if ("+_+" == 'number' || "+_+" == 'boolean') "+D+" = '' + "+f+"; else if ("+f+" === null) "+D+" = ''; ":"number"==j||"integer"==j?(a+=" else if ("+_+" == 'boolean' || "+f+" === null || ("+_+" == 'string' && "+f+" && "+f+" == +"+f+" ","integer"==j&&(a+=" && !("+f+" % 1)"),a+=")) "+D+" = +"+f+"; "):"boolean"==j?a+=" else if ("+f+" === 'false' || "+f+" === 0 || "+f+" === null) "+D+" = false; else if ("+f+" === 'true' || "+f+" === 1) "+D+" = true; ":"null"==j?a+=" else if ("+f+" === '' || "+f+" === 0 || "+f+" === false) "+D+" = null; ":"array"==e.opts.coerceTypes&&"array"==j&&(a+=" else if ("+_+" == 'string' || "+_+" == 'number' || "+_+" == 'boolean' || "+f+" == null) "+D+" = ["+f+"]; ");a+=" else { ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } if ("+D+" !== undefined) { ";var C=c?"data"+(c-1||""):"parentData";a+=" "+f+" = "+D+"; ",c||(a+="if ("+C+" !== undefined)"),a+=" "+C+"["+(c?e.dataPathArr[c]:"parentDataProperty")+"] = "+D+"; } "}else{(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } "}}if(e.schema.$ref&&!n)a+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",h&&(a+=" } if (errors === ",a+=y?"0":"errs_"+u,a+=") { ",w+="}");else{var R=e.RULES;if(R)for(var $=-1,N=R.length-1;$<N;)if(Z(F=R[$+=1])){if(F.type&&(a+=" if ("+e.util.checkDataType(F.type,f,e.opts.strictNumbers)+") { "),e.opts.useDefaults)if("object"==F.type&&e.schema.properties){d=e.schema.properties;var L=Object.keys(d);if(L)for(var T,z=-1,V=L.length-1;z<V;){if(void 0!==(W=d[T=L[z+=1]]).default){var q=f+e.util.getProperty(T);if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+q;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+q+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+q+" === null || "+q+" === '' "),a+=" ) "+q+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(W.default)+" ":a+=" "+JSON.stringify(W.default)+" ",a+="; "}}}else if("array"==F.type&&Array.isArray(e.schema.items)){var M=e.schema.items;if(M){I=-1;for(var W,U=M.length-1;I<U;)if(void 0!==(W=M[I+=1]).default){q=f+"["+I+"]";if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+q;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+q+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+q+" === null || "+q+" === '' "),a+=" ) "+q+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(W.default)+" ":a+=" "+JSON.stringify(W.default)+" ",a+="; "}}}var Q=F.rules;if(Q)for(var B,H=-1,K=Q.length-1;H<K;)if(Y(B=Q[H+=1])){var G=B.code(e,B.keyword,F.type);G&&(a+=" "+G+" ",h&&(P+="}"))}if(h&&(a+=" "+P+" ",P=""),F.type&&(a+=" } ",E&&E===F.type&&!x)){a+=" else { ";var J;m=e.schemaPath+".type",p=e.errSchemaPath+"/type";(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}h&&(a+=" if (errors === ",a+=y?"0":"errs_"+u,a+=") { ",w+="}")}}function Z(e){for(var r=e.rules,t=0;t<r.length;t++)if(Y(r[t]))return!0}function Y(r){return void 0!==e.schema[r.keyword]||r.implements&&function(r){for(var t=r.implements,a=0;a<t.length;a++)if(void 0!==e.schema[t[a]])return!0}(r)}return h&&(a+=" "+w+" "),y?(o?(a+=" if (errors === 0) return data; ",a+=" else throw new ValidationError(vErrors); "):(a+=" validate.errors = vErrors; ",a+=" return errors === 0; "),a+=" }; return validate;"):a+=" var "+v+" = errors === errs_"+u+";",a},$e=re.ucs2length,Ne=je.Validation,Le=function e(r,t,a,o){var n=this,i=this._opts,s=[void 0],l={},u=[],c={},d=[],m={},p=[];t=t||{schema:r,refVal:s,refs:l};var h=Te.call(this,r,t,o),f=this._compilations[h.index];if(h.compiling)return f.callValidate=function e(){var r=f.validate,t=r.apply(this,arguments);return e.errors=r.errors,t};var v=this._formats,g=this.RULES;try{var y=P(r,t,a,o);f.validate=y;var b=f.callValidate;return b&&(b.schema=y.schema,b.errors=null,b.refs=y.refs,b.refVal=y.refVal,b.root=y.root,b.$async=y.$async,i.sourceCode&&(b.source=y.source)),y}finally{ze.call(this,r,t,o)}function P(r,a,o,c){var m=!a||a&&a.schema==r;if(a.schema!=t.schema)return e.call(n,r,a,o,c);var h,f=!0===r.$async,y=Re({isTop:!0,schema:r,isRoot:m,baseId:c,root:a,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:je.MissingRef,RULES:g,validate:Re,util:re,resolve:ge,resolveRef:w,usePattern:x,useDefault:F,useCustomRule:O,opts:i,formats:v,logger:n.logger,self:n});y=Qe(s,We)+Qe(u,qe)+Qe(d,Me)+Qe(p,Ue)+y,i.processCode&&(y=i.processCode(y,r));try{h=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",y)(n,g,v,t,s,d,p,ee,$e,Ne),s[0]=h}catch(e){throw n.logger.error("Error compiling schema, function code:",y),e}return h.schema=r,h.errors=null,h.refs=l,h.refVal=s,h.root=m?h:a,f&&(h.$async=!0),!0===i.sourceCode&&(h.source={code:y,patterns:u,defaults:d}),h}function w(r,o,u){o=ge.url(r,o);var c,d,m=l[o];if(void 0!==m)return S(c=s[m],d="refVal["+m+"]");if(!u&&t.refs){var p=t.refs[o];if(void 0!==p)return S(c=t.refVal[p],d=E(o,c))}d=E(o);var h=ge.call(n,P,t,o);if(void 0===h){var f=a&&a[o];f&&(h=ge.inlineRef(f,i.inlineRefs)?f:e.call(n,f,t,a,r))}if(void 0!==h)return function(e,r){var t=l[e];s[t]=r}(o,h),S(h,d);!function(e){delete l[e]}(o)}function E(e,r){var t=s.length;return s[t]=r,l[e]=t,"refVal"+t}function S(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}function x(e){var r=c[e];return void 0===r&&(r=c[e]=u.length,u[r]=e),"pattern"+r}function F(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return re.toQuotedString(e);case"object":if(null===e)return"null";var r=Ce(e),t=m[r];return void 0===t&&(t=m[r]=d.length,d[t]=e),"default"+t}}function O(e,r,t,a){if(!1!==n._opts.validateSchema){var o=e.definition.dependencies;if(o&&!o.every((function(e){return Object.prototype.hasOwnProperty.call(t,e)})))throw new Error("parent schema must have all required keywords: "+o.join(","));var s=e.definition.validateSchema;if(s)if(!s(r)){var l="keyword schema is invalid: "+n.errorsText(s.errors);if("log"!=n._opts.validateSchema)throw new Error(l);n.logger.error(l)}}var u,c=e.definition.compile,d=e.definition.inline,m=e.definition.macro;if(c)u=c.call(n,r,t,a);else if(m)u=m.call(n,r,t,a),!1!==i.validateSchema&&n.validateSchema(u,!0);else if(d)u=d.call(n,a,e.keyword,r,t);else if(!(u=e.definition.validate))return;if(void 0===u)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var h=p.length;return p[h]=u,{code:"customRule"+h,validate:u}}};function Te(e,r,t){var a=Ve.call(this,e,r,t);return a>=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}function ze(e,r,t){var a=Ve.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}function Ve(e,r,t){for(var a=0;a<this._compilations.length;a++){var o=this._compilations[a];if(o.schema==e&&o.root==r&&o.baseId==t)return a}return-1}function qe(e,r){return"var pattern"+e+" = new RegExp("+re.toQuotedString(r[e])+");"}function Me(e){return"var default"+e+" = defaults["+e+"];"}function We(e,r){return void 0===r[e]?"":"var refVal"+e+" = refVal["+e+"];"}function Ue(e){return"var customRule"+e+" = customRules["+e+"];"}function Qe(e,r){if(!e.length)return"";for(var t="",a=0;a<e.length;a++)t+=r(a,e);return t}var Be=J((function(e){var r=e.exports=function(){this._cache={}};r.prototype.put=function(e,r){this._cache[e]=r},r.prototype.get=function(e){return this._cache[e]},r.prototype.del=function(e){delete this._cache[e]},r.prototype.clear=function(){this._cache={}}})),He=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Ke=[0,31,28,31,30,31,30,31,31,30,31,30,31],Ge=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,Je=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,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,Ye=/^(?:(?:[^\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,Xe=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,er=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,rr=/^(?:\/(?:[^~/]|~0|~1)*)*$/,tr=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,ar=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,or=nr;function nr(e){return e="full"==e?"full":"fast",re.copy(nr[e])}function ir(e){var r=e.match(He);if(!r)return!1;var t=+r[1],a=+r[2],o=+r[3];return a>=1&&a<=12&&o>=1&&o<=(2==a&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(t)?29:Ke[a])}function sr(e,r){var t=e.match(Ge);if(!t)return!1;var a=t[1],o=t[2],n=t[3],i=t[5];return(a<=23&&o<=59&&n<=59||23==a&&59==o&&60==n)&&(!r||i)}nr.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":Ye,url:Xe,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:Je,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:dr,uuid:er,"json-pointer":rr,"json-pointer-uri-fragment":tr,"relative-json-pointer":ar},nr.full={date:ir,time:sr,"date-time":function(e){var r=e.split(lr);return 2==r.length&&ir(r[0])&&sr(r[1],!0)},uri:function(e){return ur.test(e)&&Ze.test(e)},"uri-reference":/^(?:[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,"uri-template":Ye,url:Xe,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:Je,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:dr,uuid:er,"json-pointer":rr,"json-pointer-uri-fragment":tr,"relative-json-pointer":ar};var lr=/t|\s/i;var ur=/\/|:/;var cr=/[^\\]\\Z/;function dr(e){if(cr.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var mr=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s;var p="maximum"==r,h=p?"exclusiveMaximum":"exclusiveMinimum",f=e.schema[h],v=e.opts.$data&&f&&f.$data,g=p?"<":">",y=p?">":"<",b=void 0;if(!m&&"number"!=typeof s&&void 0!==s)throw new Error(r+" must be number");if(!v&&void 0!==f&&"number"!=typeof f&&"boolean"!=typeof f)throw new Error(h+" must be number or boolean");if(v){var P=e.util.getData(f.$data,i,e.dataPathArr),w="exclusive"+n,E="exclType"+n,S="exclIsNumber"+n,x="' + "+(_="op"+n)+" + '";o+=" var schemaExcl"+n+" = "+P+"; ",o+=" var "+w+"; var "+E+" = typeof "+(P="schemaExcl"+n)+"; if ("+E+" != 'boolean' && "+E+" != 'undefined' && "+E+" != 'number') { ";var F;b=h;(F=F||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(o+=" , message: '"+h+" should be boolean' "),e.opts.verbose&&(o+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var O=o;o=F.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+E+" == 'number' ? ( ("+w+" = "+a+" === undefined || "+P+" "+g+"= "+a+") ? "+d+" "+y+"= "+P+" : "+d+" "+y+" "+a+" ) : ( ("+w+" = "+P+" === true) ? "+d+" "+y+"= "+a+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { var op"+n+" = "+w+" ? '"+g+"' : '"+g+"='; ",void 0===s&&(b=h,u=e.errSchemaPath+"/"+h,a=P,m=v)}else{x=g;if((S="number"==typeof f)&&m){var _="'"+x+"'";o+=" if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" ( "+a+" === undefined || "+f+" "+g+"= "+a+" ? "+d+" "+y+"= "+f+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { "}else{S&&void 0===s?(w=!0,b=h,u=e.errSchemaPath+"/"+h,a=f,y+="="):(S&&(a=Math[p?"min":"max"](f,s)),f===(!S||a)?(w=!0,b=h,u=e.errSchemaPath+"/"+h,y+="="):(w=!1,x+="="));_="'"+x+"'";o+=" if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+" "+y+" "+a+" || "+d+" !== "+d+") { "}}b=b||r,(F=F||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+_+", limit: "+a+", exclusive: "+w+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be "+x+" ",o+=m?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";O=o;return o=F.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",c&&(o+=" else { "),o},pr=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+".length "+("maxItems"==r?">":"<")+" "+a+") { ";var p=r,h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxItems"==r?"more":"fewer",o+=" than ",o+=m?"' + "+a+" + '":""+s,o+=" items' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=h.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},hr=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");var p="maxLength"==r?">":"<";o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),!1===e.opts.unicode?o+=" "+d+".length ":o+=" ucs2length("+d+") ",o+=" "+p+" "+a+") { ";var h=r,f=f||[];f.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(h||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT be ",o+="maxLength"==r?"longer":"shorter",o+=" than ",o+=m?"' + "+a+" + '":""+s,o+=" characters' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var v=o;return o=f.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+v+"]); ":o+=" validate.errors = ["+v+"]; return false; ":o+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},fr=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" Object.keys("+d+").length "+("maxProperties"==r?">":"<")+" "+a+") { ";var p=r,h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxProperties"==r?"more":"fewer",o+=" than ",o+=m?"' + "+a+" + '":""+s,o+=" properties' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=h.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},vr={$ref:function(e,r,t){var a,o,n=" ",i=e.level,s=e.dataLevel,l=e.schema[r],u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(s||""),m="valid"+i;if("#"==l||"#/"==l)e.isRoot?(a=e.async,o="validate"):(a=!0===e.root.schema.$async,o="root.refVal[0]");else{var p=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===p){var h=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(h),(y=y||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(n+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(n+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ";var f=n;n=y.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+f+"]); ":n+=" validate.errors = ["+f+"]; return false; ":n+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(n+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,l,h);e.logger.warn(h),c&&(n+=" if (true) { ")}}else if(p.inline){var v=e.util.copy(e);v.level++;var g="valid"+v.level;v.schema=p.schema,v.schemaPath="",v.errSchemaPath=l,n+=" "+e.validate(v).replace(/validate\.schema/g,p.code)+" ",c&&(n+=" if ("+g+") { ")}else a=!0===p.$async||e.async&&!1!==p.$async,o=p.code}if(o){var y;(y=y||[]).push(n),n="",e.opts.passContext?n+=" "+o+".call(this, ":n+=" "+o+"( ",n+=" "+d+", (dataPath || '')",'""'!=e.errorPath&&(n+=" + "+e.errorPath);var b=n+=" , "+(s?"data"+(s-1||""):"parentData")+" , "+(s?e.dataPathArr[s]:"parentDataProperty")+", rootData) ";if(n=y.pop(),a){if(!e.async)throw new Error("async schema referenced by sync schema");c&&(n+=" var "+m+"; "),n+=" try { await "+b+"; ",c&&(n+=" "+m+" = true; "),n+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",c&&(n+=" "+m+" = false; "),n+=" } ",c&&(n+=" if ("+m+") { ")}else n+=" if (!"+b+") { if (vErrors === null) vErrors = "+o+".errors; else vErrors = vErrors.concat("+o+".errors); errors = vErrors.length; } ",c&&(n+=" else { ")}return n},allOf:function(e,r,t){var a=" ",o=e.schema[r],n=e.schemaPath+e.util.getProperty(r),i=e.errSchemaPath+"/"+r,s=!e.opts.allErrors,l=e.util.copy(e),u="";l.level++;var c="valid"+l.level,d=l.baseId,m=!0,p=o;if(p)for(var h,f=-1,v=p.length-1;f<v;)h=p[f+=1],(e.opts.strictKeywords?"object"==typeof h&&Object.keys(h).length>0||!1===h:e.util.schemaHasRules(h,e.RULES.all))&&(m=!1,l.schema=h,l.schemaPath=n+"["+f+"]",l.errSchemaPath=i+"/"+f,a+=" "+e.validate(l)+" ",l.baseId=d,s&&(a+=" if ("+c+") { ",u+="}"));return s&&(a+=m?" if (true) { ":" "+u.slice(0,-1)+" "),a},anyOf:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e),h="";p.level++;var f="valid"+p.level;if(i.every((function(r){return e.opts.strictKeywords?"object"==typeof r&&Object.keys(r).length>0||!1===r:e.util.schemaHasRules(r,e.RULES.all)}))){var v=p.baseId;a+=" var "+m+" = errors; var "+d+" = false; ";var g=e.compositeRule;e.compositeRule=p.compositeRule=!0;var y=i;if(y)for(var b,P=-1,w=y.length-1;P<w;)b=y[P+=1],p.schema=b,p.schemaPath=s+"["+P+"]",p.errSchemaPath=l+"/"+P,a+=" "+e.validate(p)+" ",p.baseId=v,a+=" "+d+" = "+d+" || "+f+"; if (!"+d+") { ",h+="}";e.compositeRule=p.compositeRule=g,a+=" "+h+" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } else { errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else u&&(a+=" if (true) { ");return a},$comment:function(e,r,t){var a=" ",o=e.schema[r],n=e.errSchemaPath+"/"+r;e.opts.allErrors;var i=e.util.toQuotedString(o);return!0===e.opts.$comment?a+=" console.log("+i+");":"function"==typeof e.opts.$comment&&(a+=" self._opts.$comment("+i+", "+e.util.toQuotedString(n)+", validate.root.schema);"),a},const:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m=e.opts.$data&&i&&i.$data;m&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; "),m||(a+=" var schema"+o+" = validate.schema"+s+";"),a+="var "+d+" = equal("+c+", schema"+o+"); if (!"+d+") { ";var p=p||[];p.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValue: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var h=a;return a=p.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+h+"]); ":a+=" validate.errors = ["+h+"]; return false; ":a+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",u&&(a+=" else { "),a},contains:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level,f="i"+o,v=p.dataLevel=e.dataLevel+1,g="data"+v,y=e.baseId,b=e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all);if(a+="var "+m+" = errors;var "+d+";",b){var P=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=i,p.schemaPath=s,p.errSchemaPath=l,a+=" var "+h+" = false; for (var "+f+" = 0; "+f+" < "+c+".length; "+f+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers,!0);var w=c+"["+f+"]";p.dataPathArr[v]=f;var E=e.validate(p);p.baseId=y,e.util.varOccurences(E,g)<2?a+=" "+e.util.varReplace(E,g,w)+" ":a+=" var "+g+" = "+w+"; "+E+" ",a+=" if ("+h+") break; } ",e.compositeRule=p.compositeRule=P,a+=" if (!"+h+") {"}else a+=" if ("+c+".length == 0) {";var S=S||[];S.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should contain a valid item' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var x=a;return a=S.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",b&&(a+=" errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a},dependencies:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="errs__"+o,m=e.util.copy(e),p="";m.level++;var h="valid"+m.level,f={},v={},g=e.opts.ownProperties;for(w in i)if("__proto__"!=w){var y=i[w],b=Array.isArray(y)?v:f;b[w]=y}a+="var "+d+" = errors;";var P=e.errorPath;for(var w in a+="var missing"+o+";",v)if((b=v[w]).length){if(a+=" if ( "+c+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(w)+"') "),u){a+=" && ( ";var E=b;if(E)for(var S=-1,x=E.length-1;S<x;){j=E[S+=1],S&&(a+=" || "),a+=" ( ( "+(R=c+(C=e.util.getProperty(j)))+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(j)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?j:C)+") ) "}a+=")) { ";var F="missing"+o,O="' + "+F+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,F,!0):P+" + "+F);var _=_||[];_.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var D=a;a=_.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+D+"]); ":a+=" validate.errors = ["+D+"]; return false; ":a+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{a+=" ) { ";var k=b;if(k)for(var j,I=-1,A=k.length-1;I<A;){j=k[I+=1];var C=e.util.getProperty(j),R=(O=e.util.escapeQuotes(j),c+C);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,j,e.opts.jsonPointers)),a+=" if ( "+R+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(j)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",u&&(p+="}",a+=" else { ")}e.errorPath=P;var $=m.baseId;for(var w in f){y=f[w];(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all))&&(a+=" "+h+" = true; if ( "+c+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(w)+"') "),a+=") { ",m.schema=y,m.schemaPath=s+e.util.getProperty(w),m.errSchemaPath=l+"/"+e.util.escapeFragment(w),a+=" "+e.validate(m)+" ",m.baseId=$,a+=" } ",u&&(a+=" if ("+h+") { ",p+="}"))}return u&&(a+=" "+p+" if ("+d+" == errors) {"),a},enum:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m=e.opts.$data&&i&&i.$data;m&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ");var p="i"+o,h="schema"+o;m||(a+=" var "+h+" = validate.schema"+s+";"),a+="var "+d+";",m&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=d+" = false;for (var "+p+"=0; "+p+"<"+h+".length; "+p+"++) if (equal("+c+", "+h+"["+p+"])) { "+d+" = true; break; }",m&&(a+=" } "),a+=" if (!"+d+") { ";var f=f||[];f.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var v=a;return a=f.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+v+"]); ":a+=" validate.errors = ["+v+"]; return false; ":a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",u&&(a+=" else { "),a},format:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||"");if(!1===e.opts.format)return u&&(a+=" if (true) { "),a;var d,m=e.opts.$data&&i&&i.$data;m?(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ",d="schema"+o):d=i;var p=e.opts.unknownFormats,h=Array.isArray(p);if(m){a+=" var "+(f="format"+o)+" = formats["+d+"]; var "+(v="isObject"+o)+" = typeof "+f+" == 'object' && !("+f+" instanceof RegExp) && "+f+".validate; var "+(g="formatType"+o)+" = "+v+" && "+f+".type || 'string'; if ("+v+") { ",e.async&&(a+=" var async"+o+" = "+f+".async; "),a+=" "+f+" = "+f+".validate; } if ( ",m&&(a+=" ("+d+" !== undefined && typeof "+d+" != 'string') || "),a+=" (","ignore"!=p&&(a+=" ("+d+" && !"+f+" ",h&&(a+=" && self._opts.unknownFormats.indexOf("+d+") == -1 "),a+=") || "),a+=" ("+f+" && "+g+" == '"+t+"' && !(typeof "+f+" == 'function' ? ",e.async?a+=" (async"+o+" ? await "+f+"("+c+") : "+f+"("+c+")) ":a+=" "+f+"("+c+") ",a+=" : "+f+".test("+c+"))))) {"}else{var f;if(!(f=e.formats[i])){if("ignore"==p)return e.logger.warn('unknown format "'+i+'" ignored in schema at path "'+e.errSchemaPath+'"'),u&&(a+=" if (true) { "),a;if(h&&p.indexOf(i)>=0)return u&&(a+=" if (true) { "),a;throw new Error('unknown format "'+i+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,g=(v="object"==typeof f&&!(f instanceof RegExp)&&f.validate)&&f.type||"string";if(v){var y=!0===f.async;f=f.validate}if(g!=t)return u&&(a+=" if (true) { "),a;if(y){if(!e.async)throw new Error("async format in sync schema");a+=" if (!(await "+(b="formats"+e.util.getProperty(i)+".validate")+"("+c+"))) { "}else{a+=" if (! ";var b="formats"+e.util.getProperty(i);v&&(b+=".validate"),a+="function"==typeof f?" "+b+"("+c+") ":" "+b+".test("+c+") ",a+=") { "}}var P=P||[];P.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",a+=m?""+d:""+e.util.toQuotedString(i),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",a+=m?"' + "+d+" + '":""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=m?"validate.schema"+s:""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var w=a;return a=P.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",u&&(a+=" else { "),a},if:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level,f=e.schema.then,v=e.schema.else,g=void 0!==f&&(e.opts.strictKeywords?"object"==typeof f&&Object.keys(f).length>0||!1===f:e.util.schemaHasRules(f,e.RULES.all)),y=void 0!==v&&(e.opts.strictKeywords?"object"==typeof v&&Object.keys(v).length>0||!1===v:e.util.schemaHasRules(v,e.RULES.all)),b=p.baseId;if(g||y){var P;p.createErrors=!1,p.schema=i,p.schemaPath=s,p.errSchemaPath=l,a+=" var "+m+" = errors; var "+d+" = true; ";var w=e.compositeRule;e.compositeRule=p.compositeRule=!0,a+=" "+e.validate(p)+" ",p.baseId=b,p.createErrors=!0,a+=" errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } ",e.compositeRule=p.compositeRule=w,g?(a+=" if ("+h+") { ",p.schema=e.schema.then,p.schemaPath=e.schemaPath+".then",p.errSchemaPath=e.errSchemaPath+"/then",a+=" "+e.validate(p)+" ",p.baseId=b,a+=" "+d+" = "+h+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'then'; ":P="'then'",a+=" } ",y&&(a+=" else { ")):a+=" if (!"+h+") { ",y&&(p.schema=e.schema.else,p.schemaPath=e.schemaPath+".else",p.errSchemaPath=e.errSchemaPath+"/else",a+=" "+e.validate(p)+" ",p.baseId=b,a+=" "+d+" = "+h+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'else'; ":P="'else'",a+=" } "),a+=" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+P+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match \"' + "+P+" + '\" schema' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",u&&(a+=" else { ")}else u&&(a+=" if (true) { ");return a},items:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e),h="";p.level++;var f="valid"+p.level,v="i"+o,g=p.dataLevel=e.dataLevel+1,y="data"+g,b=e.baseId;if(a+="var "+m+" = errors;var "+d+";",Array.isArray(i)){var P=e.schema.additionalItems;if(!1===P){a+=" "+d+" = "+c+".length <= "+i.length+"; ";var w=l;l=e.errSchemaPath+"/additionalItems",a+=" if (!"+d+") { ";var E=E||[];E.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+i.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+i.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var S=a;a=E.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",l=w,u&&(h+="}",a+=" else { ")}var x=i;if(x)for(var F,O=-1,_=x.length-1;O<_;)if(F=x[O+=1],e.opts.strictKeywords?"object"==typeof F&&Object.keys(F).length>0||!1===F:e.util.schemaHasRules(F,e.RULES.all)){a+=" "+f+" = true; if ("+c+".length > "+O+") { ";var D=c+"["+O+"]";p.schema=F,p.schemaPath=s+"["+O+"]",p.errSchemaPath=l+"/"+O,p.errorPath=e.util.getPathExpr(e.errorPath,O,e.opts.jsonPointers,!0),p.dataPathArr[g]=O;var k=e.validate(p);p.baseId=b,e.util.varOccurences(k,y)<2?a+=" "+e.util.varReplace(k,y,D)+" ":a+=" var "+y+" = "+D+"; "+k+" ",a+=" } ",u&&(a+=" if ("+f+") { ",h+="}")}if("object"==typeof P&&(e.opts.strictKeywords?"object"==typeof P&&Object.keys(P).length>0||!1===P:e.util.schemaHasRules(P,e.RULES.all))){p.schema=P,p.schemaPath=e.schemaPath+".additionalItems",p.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+f+" = true; if ("+c+".length > "+i.length+") { for (var "+v+" = "+i.length+"; "+v+" < "+c+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=c+"["+v+"]";p.dataPathArr[g]=v;k=e.validate(p);p.baseId=b,e.util.varOccurences(k,y)<2?a+=" "+e.util.varReplace(k,y,D)+" ":a+=" var "+y+" = "+D+"; "+k+" ",u&&(a+=" if (!"+f+") break; "),a+=" } } ",u&&(a+=" if ("+f+") { ",h+="}")}}else if(e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){p.schema=i,p.schemaPath=s,p.errSchemaPath=l,a+=" for (var "+v+" = 0; "+v+" < "+c+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=c+"["+v+"]";p.dataPathArr[g]=v;k=e.validate(p);p.baseId=b,e.util.varOccurences(k,y)<2?a+=" "+e.util.varReplace(k,y,D)+" ":a+=" var "+y+" = "+D+"; "+k+" ",u&&(a+=" if (!"+f+") break; "),a+=" }"}return u&&(a+=" "+h+" if ("+m+" == errors) {"),a},maximum:mr,minimum:mr,maxItems:pr,minItems:pr,maxLength:hr,minLength:hr,maxProperties:fr,minProperties:fr,multipleOf:function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");o+="var division"+n+";if (",m&&(o+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),o+=" (division"+n+" = "+d+" / "+a+", ",e.opts.multipleOfPrecision?o+=" Math.abs(Math.round(division"+n+") - division"+n+") > 1e-"+e.opts.multipleOfPrecision+" ":o+=" division"+n+" !== parseInt(division"+n+") ",o+=" ) ",m&&(o+=" ) "),o+=" ) { ";var p=p||[];p.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be multiple of ",o+=m?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var h=o;return o=p.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+h+"]); ":o+=" validate.errors = ["+h+"]; return false; ":o+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},not:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="errs__"+o,m=e.util.copy(e);m.level++;var p="valid"+m.level;if(e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){m.schema=i,m.schemaPath=s,m.errSchemaPath=l,a+=" var "+d+" = errors; ";var h,f=e.compositeRule;e.compositeRule=m.compositeRule=!0,m.createErrors=!1,m.opts.allErrors&&(h=m.opts.allErrors,m.opts.allErrors=!1),a+=" "+e.validate(m)+" ",m.createErrors=!0,h&&(m.opts.allErrors=h),e.compositeRule=m.compositeRule=f,a+=" if ("+p+") { ";var v=v||[];v.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var g=a;a=v.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(a+=" if (false) { ");return a},oneOf:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e),h="";p.level++;var f="valid"+p.level,v=p.baseId,g="prevValid"+o,y="passingSchemas"+o;a+="var "+m+" = errors , "+g+" = false , "+d+" = false , "+y+" = null; ";var b=e.compositeRule;e.compositeRule=p.compositeRule=!0;var P=i;if(P)for(var w,E=-1,S=P.length-1;E<S;)w=P[E+=1],(e.opts.strictKeywords?"object"==typeof w&&Object.keys(w).length>0||!1===w:e.util.schemaHasRules(w,e.RULES.all))?(p.schema=w,p.schemaPath=s+"["+E+"]",p.errSchemaPath=l+"/"+E,a+=" "+e.validate(p)+" ",p.baseId=v):a+=" var "+f+" = true; ",E&&(a+=" if ("+f+" && "+g+") { "+d+" = false; "+y+" = ["+y+", "+E+"]; } else { ",h+="}"),a+=" if ("+f+") { "+d+" = "+g+" = true; "+y+" = "+E+"; }";return e.compositeRule=p.compositeRule=b,a+=h+"if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a},pattern:function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'string') || "),o+=" !"+(m?"(new RegExp("+a+"))":e.usePattern(s))+".test("+d+") ) { ";var p=p||[];p.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { pattern: ",o+=m?""+a:""+e.util.toQuotedString(s),o+=" } ",!1!==e.opts.messages&&(o+=" , message: 'should match pattern \"",o+=m?"' + "+a+" + '":""+e.util.escapeQuotes(s),o+="\"' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+e.util.toQuotedString(s),o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var h=o;return o=p.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+h+"]); ":o+=" validate.errors = ["+h+"]; return false; ":o+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},properties:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="errs__"+o,m=e.util.copy(e),p="";m.level++;var h="valid"+m.level,f="key"+o,v="idx"+o,g=m.dataLevel=e.dataLevel+1,y="data"+g,b="dataProperties"+o,P=Object.keys(i||{}).filter(C),w=e.schema.patternProperties||{},E=Object.keys(w).filter(C),S=e.schema.additionalProperties,x=P.length||E.length,F=!1===S,O="object"==typeof S&&Object.keys(S).length,_=e.opts.removeAdditional,D=F||O||_,k=e.opts.ownProperties,j=e.baseId,I=e.schema.required;if(I&&(!e.opts.$data||!I.$data)&&I.length<e.opts.loopRequired)var A=e.util.toHash(I);function C(e){return"__proto__"!==e}if(a+="var "+d+" = errors;var "+h+" = true;",k&&(a+=" var "+b+" = undefined;"),D){if(a+=k?" "+b+" = "+b+" || Object.keys("+c+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+c+") { ",x){if(a+=" var isAdditional"+o+" = !(false ",P.length)if(P.length>8)a+=" || validate.schema"+s+".hasOwnProperty("+f+") ";else{var R=P;if(R)for(var $=-1,N=R.length-1;$<N;)G=R[$+=1],a+=" || "+f+" == "+e.util.toQuotedString(G)+" "}if(E.length){var L=E;if(L)for(var T=-1,z=L.length-1;T<z;)ne=L[T+=1],a+=" || "+e.usePattern(ne)+".test("+f+") "}a+=" ); if (isAdditional"+o+") { "}if("all"==_)a+=" delete "+c+"["+f+"]; ";else{var V=e.errorPath,q="' + "+f+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers)),F)if(_)a+=" delete "+c+"["+f+"]; ";else{a+=" "+h+" = false; ";var M=l;l=e.errSchemaPath+"/additionalProperties",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { additionalProperty: '"+q+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is an invalid additional property":a+="should NOT have additional properties",a+="' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var W=a;a=te.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+W+"]); ":a+=" validate.errors = ["+W+"]; return false; ":a+=" var err = "+W+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=M,u&&(a+=" break; ")}else if(O)if("failing"==_){a+=" var "+d+" = errors; ";var U=e.compositeRule;e.compositeRule=m.compositeRule=!0,m.schema=S,m.schemaPath=e.schemaPath+".additionalProperties",m.errSchemaPath=e.errSchemaPath+"/additionalProperties",m.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);var Q=c+"["+f+"]";m.dataPathArr[g]=f;var B=e.validate(m);m.baseId=j,e.util.varOccurences(B,y)<2?a+=" "+e.util.varReplace(B,y,Q)+" ":a+=" var "+y+" = "+Q+"; "+B+" ",a+=" if (!"+h+") { errors = "+d+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+c+"["+f+"]; } ",e.compositeRule=m.compositeRule=U}else{m.schema=S,m.schemaPath=e.schemaPath+".additionalProperties",m.errSchemaPath=e.errSchemaPath+"/additionalProperties",m.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);Q=c+"["+f+"]";m.dataPathArr[g]=f;B=e.validate(m);m.baseId=j,e.util.varOccurences(B,y)<2?a+=" "+e.util.varReplace(B,y,Q)+" ":a+=" var "+y+" = "+Q+"; "+B+" ",u&&(a+=" if (!"+h+") break; ")}e.errorPath=V}x&&(a+=" } "),a+=" } ",u&&(a+=" if ("+h+") { ",p+="}")}var H=e.opts.useDefaults&&!e.compositeRule;if(P.length){var K=P;if(K)for(var G,J=-1,Z=K.length-1;J<Z;){var Y=i[G=K[J+=1]];if(e.opts.strictKeywords?"object"==typeof Y&&Object.keys(Y).length>0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all)){var X=e.util.getProperty(G),ee=(Q=c+X,H&&void 0!==Y.default);m.schema=Y,m.schemaPath=s+X,m.errSchemaPath=l+"/"+e.util.escapeFragment(G),m.errorPath=e.util.getPath(e.errorPath,G,e.opts.jsonPointers),m.dataPathArr[g]=e.util.toQuotedString(G);B=e.validate(m);if(m.baseId=j,e.util.varOccurences(B,y)<2){B=e.util.varReplace(B,y,Q);var re=Q}else{re=y;a+=" var "+y+" = "+Q+"; "}if(ee)a+=" "+B+" ";else{if(A&&A[G]){a+=" if ( "+re+" === undefined ",k&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+h+" = false; ";V=e.errorPath,M=l;var te,ae=e.util.escapeQuotes(G);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(V,G,e.opts.jsonPointers)),l=e.errSchemaPath+"/required",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+ae+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+ae+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";W=a;a=te.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+W+"]); ":a+=" validate.errors = ["+W+"]; return false; ":a+=" var err = "+W+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=M,e.errorPath=V,a+=" } else { "}else u?(a+=" if ( "+re+" === undefined ",k&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+h+" = true; } else { "):(a+=" if ("+re+" !== undefined ",k&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(G)+"') "),a+=" ) { ");a+=" "+B+" } "}}u&&(a+=" if ("+h+") { ",p+="}")}}if(E.length){var oe=E;if(oe)for(var ne,ie=-1,se=oe.length-1;ie<se;){Y=w[ne=oe[ie+=1]];if(e.opts.strictKeywords?"object"==typeof Y&&Object.keys(Y).length>0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all)){m.schema=Y,m.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(ne),m.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(ne),a+=k?" "+b+" = "+b+" || Object.keys("+c+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+c+") { ",a+=" if ("+e.usePattern(ne)+".test("+f+")) { ",m.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);Q=c+"["+f+"]";m.dataPathArr[g]=f;B=e.validate(m);m.baseId=j,e.util.varOccurences(B,y)<2?a+=" "+e.util.varReplace(B,y,Q)+" ":a+=" var "+y+" = "+Q+"; "+B+" ",u&&(a+=" if (!"+h+") break; "),a+=" } ",u&&(a+=" else "+h+" = true; "),a+=" } ",u&&(a+=" if ("+h+") { ",p+="}")}}}return u&&(a+=" "+p+" if ("+d+" == errors) {"),a},propertyNames:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="errs__"+o,m=e.util.copy(e);m.level++;var p="valid"+m.level;if(a+="var "+d+" = errors;",e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){m.schema=i,m.schemaPath=s,m.errSchemaPath=l;var h="key"+o,f="idx"+o,v="i"+o,g="' + "+h+" + '",y="data"+(m.dataLevel=e.dataLevel+1),b="dataProperties"+o,P=e.opts.ownProperties,w=e.baseId;P&&(a+=" var "+b+" = undefined; "),a+=P?" "+b+" = "+b+" || Object.keys("+c+"); for (var "+f+"=0; "+f+"<"+b+".length; "+f+"++) { var "+h+" = "+b+"["+f+"]; ":" for (var "+h+" in "+c+") { ",a+=" var startErrs"+o+" = errors; ";var E=h,S=e.compositeRule;e.compositeRule=m.compositeRule=!0;var x=e.validate(m);m.baseId=w,e.util.varOccurences(x,y)<2?a+=" "+e.util.varReplace(x,y,E)+" ":a+=" var "+y+" = "+E+"; "+x+" ",e.compositeRule=m.compositeRule=S,a+=" if (!"+p+") { for (var "+v+"=startErrs"+o+"; "+v+"<errors; "+v+"++) { vErrors["+v+"].propertyName = "+h+"; } var err = ",!1!==e.createErrors?(a+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { propertyName: '"+g+"' } ",!1!==e.opts.messages&&(a+=" , message: 'property name \\'"+g+"\\' is invalid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),u&&(a+=" break; "),a+=" } }"}return u&&(a+=" if ("+d+" == errors) {"),a},required:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m=e.opts.$data&&i&&i.$data;m&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ");var p="schema"+o;if(!m)if(i.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var h=[],f=i;if(f)for(var v,g=-1,y=f.length-1;g<y;){v=f[g+=1];var b=e.schema.properties[v];b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0||!1===b:e.util.schemaHasRules(b,e.RULES.all))||(h[h.length]=v)}}else h=i;if(m||h.length){var P=e.errorPath,w=m||h.length>=e.opts.loopRequired,E=e.opts.ownProperties;if(u)if(a+=" var missing"+o+"; ",w){m||(a+=" var "+p+" = validate.schema"+s+"; ");var S="' + "+(k="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,k,e.opts.jsonPointers)),a+=" var "+d+" = true; ",m&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=" for (var "+O+" = 0; "+O+" < "+p+".length; "+O+"++) { "+d+" = "+c+"["+p+"["+O+"]] !== undefined ",E&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", "+p+"["+O+"]) "),a+="; if (!"+d+") break; } ",m&&(a+=" } "),a+=" if (!"+d+") { ",(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var x=a;a=D.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var F=h;if(F)for(var O=-1,_=F.length-1;O<_;){I=F[O+=1],O&&(a+=" || "),a+=" ( ( "+($=c+(R=e.util.getProperty(I)))+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(I)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?I:R)+") ) "}a+=") { ";var D;S="' + "+(k="missing"+o)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,k,!0):P+" + "+k),(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";x=a;a=D.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(w){m||(a+=" var "+p+" = validate.schema"+s+"; ");var k;S="' + "+(k="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,k,e.opts.jsonPointers)),m&&(a+=" if ("+p+" && !Array.isArray("+p+")) { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+p+" !== undefined) { "),a+=" for (var "+O+" = 0; "+O+" < "+p+".length; "+O+"++) { if ("+c+"["+p+"["+O+"]] === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", "+p+"["+O+"]) "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",m&&(a+=" } ")}else{var j=h;if(j)for(var I,A=-1,C=j.length-1;A<C;){I=j[A+=1];var R=e.util.getProperty(I),$=(S=e.util.escapeQuotes(I),c+R);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,I,e.opts.jsonPointers)),a+=" if ( "+$+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(I)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=P}else u&&(a+=" if (true) {");return a},uniqueItems:function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m="valid"+n,p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,(s||p)&&!1!==e.opts.uniqueItems){p&&(o+=" var "+m+"; if ("+a+" === false || "+a+" === undefined) "+m+" = true; else if (typeof "+a+" != 'boolean') "+m+" = false; else { "),o+=" var i = "+d+".length , "+m+" = true , j; if (i > 1) { ";var h=e.schema.items&&e.schema.items.type,f=Array.isArray(h);if(!h||"object"==h||"array"==h||f&&(h.indexOf("object")>=0||h.indexOf("array")>=0))o+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+d+"[i], "+d+"[j])) { "+m+" = false; break outer; } } } ";else{o+=" var itemIndices = {}, item; for (;i--;) { var item = "+d+"[i]; ";var v="checkDataType"+(f?"s":"");o+=" if ("+e.util[v](h,"item",e.opts.strictNumbers,!0)+") continue; ",f&&(o+=" if (typeof item == 'string') item = '\"' + item; "),o+=" if (typeof itemIndices[item] == 'number') { "+m+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}o+=" } ",p&&(o+=" } "),o+=" if (!"+m+") { ";var g=g||[];g.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var y=o;o=g.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+y+"]); ":o+=" validate.errors = ["+y+"]; return false; ":o+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",c&&(o+=" else { ")}else c&&(o+=" if (true) { ");return o},validate:Re},gr=re.toHash,yr=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"],br=function(e,r){for(var t=0;t<r.length;t++){e=JSON.parse(JSON.stringify(e));var a,o=r[t].split("/"),n=e;for(a=1;a<o.length;a++)n=n[o[a]];for(a=0;a<yr.length;a++){var i=yr[a],s=n[i];s&&(n[i]={anyOf:[s,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e},Pr=je.MissingRef,wr=function e(r,t,a){var o=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof t&&(a=t,t=void 0);var n=i(r).then((function(){var e=o._addSchema(r,void 0,t);return e.validate||function e(r){try{return o._compile(r)}catch(e){if(e instanceof Pr)return a(e);throw e}function a(a){var n=a.missingSchema;if(u(n))throw new Error("Schema "+n+" is loaded but "+a.missingRef+" cannot be resolved");var s=o._loadingSchemas[n];return s||(s=o._loadingSchemas[n]=o._opts.loadSchema(n)).then(l,l),s.then((function(e){if(!u(n))return i(e).then((function(){u(n)||o.addSchema(e,n,void 0,t)}))})).then((function(){return e(r)}));function l(){delete o._loadingSchemas[n]}function u(e){return o._refs[e]||o._schemas[e]}}}(e)}));a&&n.then((function(e){a(null,e)}),a);return n;function i(r){var t=r.$schema;return t&&!o.getSchema(t)?e.call(o,{$ref:t},!0):Promise.resolve()}};var Er=function(e,r,t){var a,o,n=" ",i=e.level,s=e.dataLevel,l=e.schema[r],u=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,d=!e.opts.allErrors,m="data"+(s||""),p="valid"+i,h="errs__"+i,f=e.opts.$data&&l&&l.$data;f?(n+=" var schema"+i+" = "+e.util.getData(l.$data,s,e.dataPathArr)+"; ",o="schema"+i):o=l;var v,g,y,b,P,w="definition"+i,E=this.definition,S="";if(f&&E.$data){P="keywordValidate"+i;var x=E.validateSchema;n+=" var "+w+" = RULES.custom['"+r+"'].definition; var "+P+" = "+w+".validate;"}else{if(!(b=e.useCustomRule(this,l,e.schema,e)))return;o="validate.schema"+u,P=b.code,v=E.compile,g=E.inline,y=E.macro}var F=P+".errors",O="i"+i,_="ruleErr"+i,D=E.async;if(D&&!e.async)throw new Error("async keyword in sync schema");if(g||y||(n+=F+" = null;"),n+="var "+h+" = errors;var "+p+";",f&&E.$data&&(S+="}",n+=" if ("+o+" === undefined) { "+p+" = true; } else { ",x&&(S+="}",n+=" "+p+" = "+w+".validateSchema("+o+"); if ("+p+") { ")),g)E.statements?n+=" "+b.validate+" ":n+=" "+p+" = "+b.validate+"; ";else if(y){var k=e.util.copy(e);S="";k.level++;var j="valid"+k.level;k.schema=b.validate,k.schemaPath="";var I=e.compositeRule;e.compositeRule=k.compositeRule=!0;var A=e.validate(k).replace(/validate\.schema/g,P);e.compositeRule=k.compositeRule=I,n+=" "+A}else{(N=N||[]).push(n),n="",n+=" "+P+".call( ",e.opts.passContext?n+="this":n+="self",v||!1===E.schema?n+=" , "+m+" ":n+=" , "+o+" , "+m+" , validate.schema"+e.schemaPath+" ",n+=" , (dataPath || '')",'""'!=e.errorPath&&(n+=" + "+e.errorPath);var C=s?"data"+(s-1||""):"parentData",R=s?e.dataPathArr[s]:"parentDataProperty",$=n+=" , "+C+" , "+R+" , rootData ) ";n=N.pop(),!1===E.errors?(n+=" "+p+" = ",D&&(n+="await "),n+=$+"; "):n+=D?" var "+(F="customErrors"+i)+" = null; try { "+p+" = await "+$+"; } catch (e) { "+p+" = false; if (e instanceof ValidationError) "+F+" = e.errors; else throw e; } ":" "+F+" = null; "+p+" = "+$+"; "}if(E.modifying&&(n+=" if ("+C+") "+m+" = "+C+"["+R+"];"),n+=""+S,E.valid)d&&(n+=" if (true) { ");else{var N;n+=" if ( ",void 0===E.valid?(n+=" !",n+=y?""+j:""+p):n+=" "+!E.valid+" ",n+=") { ",a=this.keyword,(N=N||[]).push(n),n="",(N=N||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(n+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";var L=n;n=N.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+L+"]); ":n+=" validate.errors = ["+L+"]; return false; ":n+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var T=n;n=N.pop(),g?E.errors?"full"!=E.errors&&(n+=" for (var "+O+"="+h+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+c+'"; } ',e.opts.verbose&&(n+=" "+_+".schema = "+o+"; "+_+".data = "+m+"; "),n+=" } "):!1===E.errors?n+=" "+T+" ":(n+=" if ("+h+" == errors) { "+T+" } else { for (var "+O+"="+h+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+c+'"; } ',e.opts.verbose&&(n+=" "+_+".schema = "+o+"; "+_+".data = "+m+"; "),n+=" } } "):y?(n+=" var err = ",!1!==e.createErrors?(n+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(n+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&d&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; ")):!1===E.errors?n+=" "+T+" ":(n+=" if (Array.isArray("+F+")) { if (vErrors === null) vErrors = "+F+"; else vErrors = vErrors.concat("+F+"); errors = vErrors.length; for (var "+O+"="+h+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; "+_+'.schemaPath = "'+c+'"; ',e.opts.verbose&&(n+=" "+_+".schema = "+o+"; "+_+".data = "+m+"; "),n+=" } } else { "+T+" } "),n+=" } ",d&&(n+=" else { ")}return n},Sr="http://json-schema.org/draft-07/schema#",xr="http://json-schema.org/draft-07/schema#",Fr="Core schema meta-schema",Or={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},_r=["object","boolean"],Dr={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},kr={$schema:Sr,$id:xr,title:Fr,definitions:Or,type:_r,properties:Dr,default:!0},jr=Z(Object.freeze({__proto__:null,$schema:Sr,$id:xr,title:Fr,definitions:Or,type:_r,properties:Dr,default:kr})),Ir={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:jr.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:jr.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}},Ar=/^[a-z_$][a-z0-9_$-]*$/i,Cr=function(e,r){var t=this.RULES;if(t.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!Ar.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(r){this.validateKeyword(r,!0);var a=r.type;if(Array.isArray(a))for(var o=0;o<a.length;o++)i(e,a[o],r);else i(e,a,r);var n=r.metaSchema;n&&(r.$data&&this._opts.$data&&(n={anyOf:[n,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),r.validateSchema=this.compile(n,!0))}function i(e,r,a){for(var o,n=0;n<t.length;n++){var i=t[n];if(i.type==r){o=i;break}}o||(o={type:r,rules:[]},t.push(o));var s={keyword:e,definition:a,custom:!0,code:Er,implements:a.implements};o.rules.push(s),t.custom[e]=s}return t.keywords[e]=t.all[e]=!0,this},Rr=function(e){var r=this.RULES.custom[e];return r?r.definition:this.RULES.keywords[e]||!1},$r=function(e){var r=this.RULES;delete r.keywords[e],delete r.all[e],delete r.custom[e];for(var t=0;t<r.length;t++)for(var a=r[t].rules,o=0;o<a.length;o++)if(a[o].keyword==e){a.splice(o,1);break}return this},Nr=function e(r,t){e.errors=null;var a=this._validateKeyword=this._validateKeyword||this.compile(Ir,!0);if(a(r))return!0;if(e.errors=a.errors,t)throw new Error("custom keyword definition is invalid: "+this.errorsText(a.errors));return!1};var Lr="http://json-schema.org/draft-07/schema#",Tr="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",zr="Meta-schema for $data reference (JSON Schema extension proposal)",Vr=["$data"],qr={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Mr={$schema:Lr,$id:Tr,description:zr,type:"object",required:Vr,properties:qr,additionalProperties:!1},Wr=Z(Object.freeze({__proto__:null,$schema:Lr,$id:Tr,description:zr,type:"object",required:Vr,properties:qr,additionalProperties:!1,default:Mr})),Ur=Kr;Kr.prototype.validate=function(e,r){var t;if("string"==typeof e){if(!(t=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);t=a.validate||this._compile(a)}var o=t(r);!0!==t.$async&&(this.errors=t.errors);return o},Kr.prototype.compile=function(e,r){var t=this._addSchema(e,void 0,r);return t.validate||this._compile(t)},Kr.prototype.addSchema=function(e,r,t,a){if(Array.isArray(e)){for(var o=0;o<e.length;o++)this.addSchema(e[o],void 0,t,a);return this}var n=this._getId(e);if(void 0!==n&&"string"!=typeof n)throw new Error("schema id must be string");return et(this,r=ge.normalizeId(r||n)),this._schemas[r]=this._addSchema(e,t,a,!0),this},Kr.prototype.addMetaSchema=function(e,r,t){return this.addSchema(e,r,t,!0),this},Kr.prototype.validateSchema=function(e,r){var t=e.$schema;if(void 0!==t&&"string"!=typeof t)throw new Error("$schema must be a string");if(!(t=t||this._opts.defaultMeta||function(e){var r=e._opts.meta;return e._opts.defaultMeta="object"==typeof r?e._getId(r)||r:e.getSchema(Qr)?Qr:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var a=this.validate(t,e);if(!a&&r){var o="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(o);this.logger.error(o)}return a},Kr.prototype.getSchema=function(e){var r=Gr(this,e);switch(typeof r){case"object":return r.validate||this._compile(r);case"string":return this.getSchema(r);case"undefined":return function(e,r){var t=ge.schema.call(e,{schema:{}},r);if(t){var a=t.schema,o=t.root,n=t.baseId,i=Le.call(e,a,o,void 0,n);return e._fragments[r]=new fe({ref:r,fragment:!0,schema:a,root:o,baseId:n,validate:i}),i}}(this,e)}},Kr.prototype.removeSchema=function(e){if(e instanceof RegExp)return Jr(this,this._schemas,e),Jr(this,this._refs,e),this;switch(typeof e){case"undefined":return Jr(this,this._schemas),Jr(this,this._refs),this._cache.clear(),this;case"string":var r=Gr(this,e);return r&&this._cache.del(r.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var t=this._opts.serialize,a=t?t(e):e;this._cache.del(a);var o=this._getId(e);o&&(o=ge.normalizeId(o),delete this._schemas[o],delete this._refs[o])}return this},Kr.prototype.addFormat=function(e,r){"string"==typeof r&&(r=new RegExp(r));return this._formats[e]=r,this},Kr.prototype.errorsText=function(e,r){if(!(e=e||this.errors))return"No errors";for(var t=void 0===(r=r||{}).separator?", ":r.separator,a=void 0===r.dataVar?"data":r.dataVar,o="",n=0;n<e.length;n++){var i=e[n];i&&(o+=a+i.dataPath+" "+i.message+t)}return o.slice(0,-t.length)},Kr.prototype._addSchema=function(e,r,t,a){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var o=this._opts.serialize,n=o?o(e):e,i=this._cache.get(n);if(i)return i;a=a||!1!==this._opts.addUsedSchema;var s=ge.normalizeId(this._getId(e));s&&a&&et(this,s);var l,u=!1!==this._opts.validateSchema&&!r;u&&!(l=s&&s==ge.normalizeId(e.$schema))&&this.validateSchema(e,!0);var c=ge.ids.call(this,e),d=new fe({id:s,schema:e,localRefs:c,cacheKey:n,meta:t});"#"!=s[0]&&a&&(this._refs[s]=d);this._cache.put(n,d),u&&l&&this.validateSchema(e,!0);return d},Kr.prototype._compile=function(e,r){if(e.compiling)return e.validate=o,o.schema=e.schema,o.errors=null,o.root=r||o,!0===e.schema.$async&&(o.$async=!0),o;var t,a;e.compiling=!0,e.meta&&(t=this._opts,this._opts=this._metaOpts);try{a=Le.call(this,e.schema,r,e.localRefs)}catch(r){throw delete e.validate,r}finally{e.compiling=!1,e.meta&&(this._opts=t)}return e.validate=a,e.refs=a.refs,e.refVal=a.refVal,e.root=a.root,a;function o(){var r=e.validate,t=r.apply(this,arguments);return o.errors=r.errors,t}},Kr.prototype.compileAsync=wr,Kr.prototype.addKeyword=Cr,Kr.prototype.getKeyword=Rr,Kr.prototype.removeKeyword=$r,Kr.prototype.validateKeyword=Nr,Kr.ValidationError=je.Validation,Kr.MissingRefError=je.MissingRef,Kr.$dataMetaSchema=br;var Qr="http://json-schema.org/draft-07/schema",Br=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],Hr=["/properties"];function Kr(e){if(!(this instanceof Kr))return new Kr(e);var r,t;e=this._opts=re.copy(e)||{},function(e){var r=e._opts.logger;if(!1===r)e.logger={log:rt,warn:rt,error:rt};else{if(void 0===r&&(r=console),!("object"==typeof r&&r.log&&r.warn&&r.error))throw new Error("logger must implement log, warn and error methods");e.logger=r}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=or(e.format),this._cache=e.cache||new Be,this._loadingSchemas={},this._compilations=[],this.RULES=((r=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}]).all=gr(t=["type","$comment"]),r.types=gr(["number","integer","string","array","object","boolean","null"]),r.forEach((function(e){e.rules=e.rules.map((function(e){var a;if("object"==typeof e){var o=Object.keys(e)[0];a=e[o],e=o,a.forEach((function(e){t.push(e),r.all[e]=!0}))}return t.push(e),r.all[e]={keyword:e,code:vr[e],implements:a}})),r.all.$comment={keyword:"$comment",code:vr.$comment},e.type&&(r.types[e.type]=e)})),r.keywords=gr(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),r.custom={},r),this._getId=function(e){switch(e.schemaId){case"auto":return Xr;case"id":return Zr;default:return Yr}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=Ce),this._metaOpts=function(e){for(var r=re.copy(e._opts),t=0;t<Br.length;t++)delete r[Br[t]];return r}(this),e.formats&&function(e){for(var r in e._opts.formats){var t=e._opts.formats[r];e.addFormat(r,t)}}(this),e.keywords&&function(e){for(var r in e._opts.keywords){var t=e._opts.keywords[r];e.addKeyword(r,t)}}(this),function(e){var r;e._opts.$data&&(r=Wr,e.addMetaSchema(r,r.$id,!0));if(!1===e._opts.meta)return;var t=jr;e._opts.$data&&(t=br(t,Hr));e.addMetaSchema(t,Qr,!0),e._refs["http://json-schema.org/schema"]=Qr}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var r=e._opts.schemas;if(!r)return;if(Array.isArray(r))e.addSchema(r);else for(var t in r)e.addSchema(r[t],t)}(this)}function Gr(e,r){return r=ge.normalizeId(r),e._schemas[r]||e._refs[r]||e._fragments[r]}function Jr(e,r,t){for(var a in r){var o=r[a];o.meta||t&&!t.test(a)||(e._cache.del(o.cacheKey),delete r[a])}}function Zr(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function Yr(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function Xr(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function et(e,r){if(e._schemas[r]||e._refs[r])throw new Error('schema with key or id "'+r+'" already exists')}function rt(){}var tt={$$currentLocalizeFn:function(e){if(e&&e.length)for(var r=0;r<e.length;r+=1){var t=e[r],a=void 0,o=void 0,n=void 0;switch(t.keyword){case"$ref":a="无法找到引用".concat(t.params.ref);break;case"additionalItems":a="",o=t.params.limit,a+="不允许超过".concat(o,"个元素");break;case"additionalProperties":a="不允许有额外的属性";break;case"anyOf":a="数据应为 anyOf 所指定的其中一个";break;case"const":a="应当等于常量";break;case"contains":a="应当包含一个有效项";break;case"custom":a='应当通过 "'.concat(t.keyword,' 关键词校验"');break;case"dependencies":a="",o=t.params.depsCount,a+="应当拥有属性".concat(t.params.property,"的依赖属性").concat(t.params.deps);break;case"enum":a="应当是预设定的枚举值之一";break;case"exclusiveMaximum":case"exclusiveMinimum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(n);break;case"false schema":a="布尔模式出错";break;case"format":a='应当匹配格式 "'.concat(t.params.format,'"');break;case"formatExclusiveMaximum":a="formatExclusiveMaximum 应当是布尔值";break;case"formatExclusiveMinimum":a="formatExclusiveMinimum 应当是布尔值";break;case"formatMaximum":case"formatMinimum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当是 ".concat(n);break;case"if":a='应当匹配模式 "'.concat(t.params.failingKeyword,'" ');break;case"maximum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(n);break;case"maxItems":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个项");break;case"maxLength":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个字符");break;case"maxProperties":a="",o=t.params.limit,a+="不应有多于 ".concat(o," 个属性");break;case"minimum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(n);break;case"minItems":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个项");break;case"minLength":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个字符");break;case"minProperties":a="",o=t.params.limit,a+="不应有少于 ".concat(o," 个属性");break;case"multipleOf":a="应当是 ".concat(t.params.multipleOf," 的整数倍");break;case"not":a='不应当匹配 "not" schema';break;case"oneOf":a='只能匹配一个 "oneOf" 中的 schema';break;case"pattern":a='应当匹配模式 "'.concat(t.params.pattern,'"');break;case"patternRequired":a="应当有属性匹配模式 ".concat(t.params.missingPattern);break;case"propertyNames":a="属性名 '".concat(t.params.propertyName,"' 无效");break;case"required":a="应当有必需属性 ".concat(t.params.missingProperty);break;case"switch":a="由于 ".concat(t.params.caseIndex,' 失败,未通过 "switch" 校验, ');break;case"type":a="应当是 ".concat(t.params.type," 类型");break;case"uniqueItems":a="不应当含有重复项 (第 ".concat(t.params.j," 项与第 ").concat(t.params.i," 项是重复的)");break;default:continue}t.message=a}},getCurrentLocalize:function(){return this.$$currentLocalizeFn},useLocal:function(e){this.$$currentLocalizeFn=e}};function at(e,r){try{if("object"===g(r))return e.fill(null).map((function(){return JSON.parse(JSON.stringify(r))}))}catch(e){}}function ot(e,r){return e.filter((function(e){return r.includes(e)}))}function nt(e,r,t){var a=G(e.$ref,r);e.$ref;var o=E(e,["$ref"]);return ut(w(w({},a),o),r,t)}function it(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length<2)return r[0];for(var a={},o=[].concat(r),n=function(){var e=L(o[0])?o[0]:{},r=L(o[1])?o[1]:{};a=Object.assign({},e),Object.keys(r).reduce((function(t,a){var o=e[a],n=r[a];if(L(o)||L(n))if(L(o)&&L(n))t[a]=it(o,n);else{var i=S(L(o)?[o,n]:[n,o],2),s=i[0],l=i[1];t[a]="additionalProperties"===a?!0===l&&s:s}else if(Array.isArray(o)||Array.isArray(n))if(Array.isArray(o)&&Array.isArray(n)){if(L(o[0])||L(n[0]))throw new Error("暂不支持如上数组对象元素合并");var u=ot([].concat(o),[].concat(n));if(u.length<=0)throw new Error("无法合并如上数据");0===u.length&&"type"===a?t[a]=u[0]:t[a]=u}else{var c=S(Array.isArray(o)?[o,n]:[n,o],2),d=c[0],m=c[1];if(void 0===m)t[a]=d;else{if(!d.includes(m))throw new Error("无法合并如下数据");t[a]=m}}else if(void 0!==o&&void 0!==n)if("maxLength"===a||"maximum"===a||"maxItems"===a||"exclusiveMaximum"===a||"maxProperties"===a)t[a]=Math.min(o,n);else if("minLength"===a||"minimum"===a||"minItems"===a||"exclusiveMinimum"===a||"minProperties"===a)t[a]=Math.max(o,n);else if("multipleOf"===a)t[a]=H(o,n);else{if(o!==n)throw new Error("无法合并如下数据");t[a]=o}else t[a]=void 0===o?n:o;return t}),a),o.splice(0,2,a)};o.length>=2;)n();return a}function st(e,r,t){var a=w(w({},e),{},{allOf:e.allOf.map((function(e){return ut(e,r,t)}))});try{var o=a.allOf,n=E(a,["allOf"]);return it.apply(void 0,[n].concat(x(o)))}catch(e){return a.allOf,E(a,["allOf"])}}function lt(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.hasOwnProperty("allOf")&&(e=st(e,r,t)),e.hasOwnProperty("$ref")&&(e=nt(e,r,t)),e}function ut(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return L(e)?lt(e,r,t):{}}var ct=/{{(.*)}}/;function dt(e,r,t,a){if(void 0!==t){var o=ct.exec(t);if(ct.lastIndex=0,o){var n=o[1].trim();return new Function("parentFormData","rootFormData","return ".concat(n))(I(e,r,1),e)}return a()}}function mt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.schema,t=e.uiSchema,a=arguments.length>1?arguments[1]:void 0,o=vt({schema:r,uiSchema:t,containsSpec:!1});return["title","description"].reduce((function(e,r){return o[r]&&(e["ui:".concat(r)]=String(o[r]).replace(/\$index/g,a+1)),e}),{})}function pt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.curNodePath,i=void 0===n?"":n,s=e.rootFormData,l=void 0===s?{}:s,u=o["ui:widget"]||t["ui:widget"],c=o["ui:hidden"]||t["ui:hidden"];return"HiddenWidget"===u||"hidden"===u||!!dt(l,i,c,(function(){return"function"==typeof c?c(I(l,i,1),l):c}))}function ht(e,r){var t=r.schema,a=void 0===t?{}:t,o=r.uiSchema,n=void 0===o?{}:o,i=a["ui:field"]||n["ui:field"];if("function"==typeof i||"object"===g(i)||"string"==typeof i)return{field:i,fieldProps:n["ui:fieldProps"]||a["ui:fieldProps"]};var s=e[V(a)];if(s)return{field:s};if(!s&&(a.anyOf||a.oneOf))return{field:null};throw new Error("不支持的field类型 ".concat(a.type))}function ft(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.curNodePath,i=e.rootFormData,s=void 0===i?{}:i;return Object.assign.apply(Object,[{}].concat(x([t,o].map((function(e){return Object.keys(e).reduce((function(r,t){var a=e[t];return"ui:options"===t&&L(a)?w(w({},r),a):0===t.indexOf("ui:")?w(w({},r),{},y({},t.substring(3),void 0===n?a:dt(s,n,a,(function(){return a})))):r}),{})})))))}function vt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.containsSpec,i=void 0===n||n,s=e.curNodePath,l=e.rootFormData,u={};return i&&(u.readonly=!!t.readOnly,void 0!==t.multipleOf&&(u.step=t.multipleOf),(t.minimum||0===t.minimum)&&(u.min=t.minimum),(t.maximum||0===t.maximum)&&(u.max=t.maximum),(t.minLength||0===t.minLength)&&(u.minlength=t.minLength),(t.maxLength||0===t.maxLength)&&(u.maxlength=t.maxLength),"date-time"!==t.format&&"date"!==t.format||("array"===t.type?(u.isRange=!0,u.isNumberValue=!(t.items&&"string"===t.items.type)):u.isNumberValue=!("string"===t.type))),w(w({title:t.title,description:t.description},u),ft({schema:t,uiSchema:o,curNodePath:s,rootFormData:l}))}function gt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.curNodePath,i=e.rootFormData,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,l=vt({schema:t,uiSchema:o,curNodePath:n,rootFormData:i});!l.widget&&s&&Object.assign(l,s({schema:t,uiSchema:o}));var u=l.widget,c=l.title,d=l.labelWidth,m=l.description,p=l.attrs,h=l.class,f=l.style,v=l.fieldAttrs,g=l.fieldStyle,y=l.fieldClass,b=l.emptyValue,P=l.width,w=l.getWidget,S=l.onChange,x=E(l,["widget","title","labelWidth","description","attrs","class","style","fieldAttrs","fieldStyle","fieldClass","emptyValue","width","getWidget","onChange"]);return{widget:u,label:c,labelWidth:d,description:m,widgetAttrs:p,widgetClass:h,widgetStyle:f,fieldAttrs:v,width:P,fieldStyle:g,fieldClass:y,emptyValue:b,getWidget:w,onChange:S,uiProps:x}}function yt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.errorSchema,i=void 0===n?{}:n;return Object.assign.apply(Object,[{}].concat(x([t,o,i].map((function(e){return Object.keys(e).reduce((function(r,t){var a=e[t];return"err:options"===t&&L(a)?w(w({},r),a):0===t.indexOf("err:")?w(w({},r),{},y({},t.substring(4),a)):r}),{})})))))}function bt(e,r){if(!Array.isArray(r))return e;var t,a=function(e){return e.reduce((function(e,r){return e[r]=!0,e}),{})},o=a(e),n=r.filter((function(e){return"*"===e||o[e]})),i=a(n),s=e.filter((function(e){return!i[e]})),l=n.indexOf("*");if(-1===l){if(s.length)throw new Error("uiSchema order list does not contain ".concat((t=s).length>1?"properties '".concat(t.join("', '"),"'"):"property '".concat(t[0],"'")));return n}if(l!==n.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");var u=x(n);return u.splice.apply(u,[l,1].concat(x(s))),u}function Pt(e){return Array.isArray(e.enum)&&1===e.enum.length||e.hasOwnProperty("const")}function wt(e){if(Array.isArray(e.enum)&&1===e.enum.length)return e.enum[0];if(e.hasOwnProperty("const"))return e.const;throw new Error("schema cannot be inferred as a constant")}function Et(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=ut(e,r),a=t.oneOf||t.anyOf;return!!Array.isArray(t.enum)||!!Array.isArray(a)&&a.every((function(e){return Pt(e)}))}function St(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every((function(e){return L(e)}))}function xt(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!(!e.uniqueItems||!e.items)&&Et(e.items,r)}function Ft(e){return e.additionalItems,L(e.additionalItems)}function Ot(e,r,t,a){if(e.enum){var o=ft({schema:e,uiSchema:r,curNodePath:t,rootFormData:a}).enumNames||e.enumNames;return e.enum.map((function(e,r){return{label:o&&o[r]||String(e),value:e}}))}var n=e.oneOf||e.anyOf,i=r.oneOf||r.anyOf;return n.map((function(e,r){var o=i&&i[r]?ft({schema:e,uiSchema:i[r],curNodePath:t,rootFormData:a}):{},n=wt(e);return{label:o.title||e.title||String(n),value:n}}))}function _t(e,r,t){if(e)return e;if(r){var a=t.split(".").pop();if(a&&a!=="".concat(Number(a)))return a}return""}var Dt=Object.freeze({__proto__:null,replaceArrayIndex:mt,isHiddenWidget:pt,getUiField:ht,getUserUiOptions:ft,getUiOptions:vt,getWidgetConfig:gt,getUserErrOptions:yt,orderProperties:bt,isConstant:Pt,toConstant:wt,isSelect:Et,isFixedItems:St,isMultiSelect:xt,allowAdditionalItems:Ft,optionsList:Ot,fallbackLabel:_t}),kt=At(),jt=null,It=null;function At(){var e=new Ur({errorDataPath:"property",allErrors:!0,multipleOfPrecision:8,schemaId:"auto",unknownFormats:"ignore"});return e.addFormat("data-url",/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/),e.addFormat("color",/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/),e}function Ct(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null===e?[]:e.map((function(e){var r=e.dataPath,t=e.keyword,a=e.message,o=e.params,n=e.schemaPath,i="".concat(r);return{name:t,property:i,message:a,params:o,stack:"".concat(i," ").concat(a).trim(),schemaPath:n}}))}function Rt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.transformErrors,o=e.additionalMetaSchemas,n=void 0===o?[]:o,i=e.customFormats,s=void 0===i?{}:i,l=!q(It,n),u=!q(jt,s);(l||u)&&(kt=At()),n&&l&&Array.isArray(n)&&(kt.addMetaSchema(n),It=n),s&&u&&L(s)&&(Object.keys(s).forEach((function(e){kt.addFormat(e,s[e])})),jt=s);var c=null;try{kt.validate(t,r)}catch(e){c=e}tt.getCurrentLocalize()(kt.errors);var d=Ct(kt.errors);kt.errors=null;var m=c&&c.message&&"string"==typeof c.message&&c.message.includes("no schema with key or ref ");return m&&(d=[].concat(x(d),[{stack:c.message}])),"function"==typeof a&&(d=a(d)),{errors:d}}function $t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.uiSchema,o=e.transformErrors,n=e.additionalMetaSchemas,i=void 0===n?[]:n,s=e.customFormats,l=void 0===s?{}:s,u=e.errorSchema,c=void 0===u?{}:u,d=e.required,m=void 0!==d&&d,p=e.propPath,h=void 0===p?"":p,f=e.isOnlyFirstError,v=void 0===f||f,g="array"===t.type&&Array.isArray(r)&&0===r.length,y=void 0===r||g;if(m){if(y){var b={keyword:"required",params:{missingProperty:h}},P=yt({schema:t,uiSchema:a,errorSchema:c}).required;return P?b.message=P:tt.getCurrentLocalize()([b]),[b]}}else if(y&&!g)return[];var w=Rt({formData:r,schema:t,transformErrors:o,additionalMetaSchemas:i,customFormats:l}).errors;w=w.filter((function(e){return""===e.property&&!e.schemaPath.includes("#/anyOf/")&&!e.schemaPath.includes("#/oneOf/")||"additionalProperties"===e.name}));var E=yt({schema:t,uiSchema:a,errorSchema:c});return(v&&w.length>0?[w[0]]:w).reduce((function(e,r){return r.message=void 0!==E[r.name]?E[r.name]:r.message,e.push(r),e}),[])}function Nt(e,r){try{return kt.validate(e,r)}catch(e){return!1}}function Lt(e,r,t){for(var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=0;o<r.length;o++){var n=ut(r[o],t,e);if(n.properties){var i=w(w({},t.definitions?{definitions:t.definitions}:{}),{},{anyOf:Object.keys(n.properties).map((function(e){return{required:[e]}}))}),s=void 0;if(n.anyOf){var l=b({},n);l.allOf?l.allOf=l.allOf.slice():l.allOf=[],l.allOf.push(i),s=l}else s=Object.assign({},n,i);if(a||delete s.required,Nt(s,e))return o}else if(Nt(r[o],e))return o}return 0}var Tt=Object.freeze({__proto__:null,ajvValidateFormData:Rt,validateFormDataAndTransformMsg:$t,isValid:Nt,getMatchingOption:Lt});function zt(e,r){if(Array.isArray(r))return Array.isArray(e)||(e=[]),r.map((function(r,t){return e[t]?zt(e[t],r):r}));if(L(r)){var t=Object.assign({},e);return Object.keys(r).reduce((function(t,a){return t[a]=zt(e?e[a]:{},r[a]),t}),t)}return r}function Vt(e,r,t){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],n=L(e)?e:{},i=L(a)?a:{};"allOf"in n&&(n=st(n,t,i));var s=r;if(L(s)&&L(n.default))s=z(s,n.default);else if("default"in n)s=n.default;else{if("$ref"in n){var l=G(n.$ref,t);return Vt(l,s,t,i,o)}if(St(n))s=n.items.map((function(e,a){return Vt(e,Array.isArray(r)?r[a]:void 0,t,i,o)}));else if("oneOf"in n){var u=ut(n.oneOf[Lt(i,n.oneOf,t)],t,i);if(n.properties&&u.properties){var c=z(n,u);delete c.oneOf,n=c}else n=u}else if("anyOf"in n){var d=ut(n.anyOf[Lt(i,n.anyOf,t)],t,i);if(n.properties&&d.properties){var m=z(n,d);delete m.anyOf,n=m}else n=d}}switch(void 0===s&&(s=n.default),V(n)){case"null":return null;case"object":return Object.keys(n.properties||{}).reduce((function(e,r){var a=Vt(n.properties[r],(s||{})[r],t,(i||{})[r],o);return(o||void 0!==a)&&(e[r]=a),e}),{});case"array":if(Array.isArray(s)&&(s=s.map((function(e,r){return Vt(n.items[r]||n.additionalItems||{},e,t,{},o)}))),Array.isArray(a)&&(s=a.map((function(e,r){return Vt(n.items,(s||{})[r],t,e,{},o)}))),n.minItems){if(xt(n,t))return s||[];var p=s?s.length:0;if(n.minItems>p){var h=s||[],f=Array.isArray(n.items)?n.additionalItems:n.items,v=at(new Array(n.minItems-p),Vt(f,f.defaults,t,{},o));return h.concat(v)}}s=void 0===s?[]:s}return s}function qt(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!L(e))throw new Error("Invalid schema: ".concat(e));var o=ut(e,t,r),n=Vt(o,e.default,t,r,a);return void 0===r?n:L(r)||Array.isArray(r)?zt(n,r):0===r||!1===r||""===r?r:r||n}function Mt(e,r){void 0===r&&(r={});var t=r.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}Mt('.genFromComponent{font-size:14px;line-height:1;word-wrap:break-word;word-break:break-word;padding:0;margin:0}.genFromComponent a,.genFromComponent h1,.genFromComponent h2,.genFromComponent h3,.genFromComponent li,.genFromComponent p,.genFromComponent ul{font-size:14px}.genFromComponent .genFormIcon{width:12px;height:12px;vertical-align:top}.genFromComponent .genFormBtn{display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;background:#fff;border:1px solid #dcdfe6;color:#606266;-webkit-appearance:none;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;margin:0;-webkit-transition:.1s;transition:.1s;font-weight:500;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;padding:12px 20px;font-size:14px;border-radius:4px}.genFromComponent .genFormBtn.is-plain:focus,.genFromComponent .genFormBtn.is-plain:hover{background:#fff;border-color:#409eff;color:#409eff}.genFromComponent .hiddenWidget{display:none}.genFromComponent .fieldGroupWrap+.fieldGroupWrap .fieldGroupWrap_title{margin-top:20px}.genFromComponent .fieldGroupWrap_title{position:relative;display:block;width:100%;line-height:26px;margin-bottom:8px;font-size:15px;font-weight:700;border:0}.genFromComponent .fieldGroupWrap_des{font-size:12px;line-height:20px;margin-bottom:10px;color:#999}.genFromComponent .genFromWidget_des{padding:0;margin-top:0;margin-bottom:2px;font-size:12px;line-height:20px;color:#999;text-align:left}.genFromComponent .formItemErrorBox{margin:0 auto;color:#ff5757;padding-top:2px;position:absolute;top:100%;left:0;display:-webkit-box!important;line-height:16px;text-overflow:ellipsis;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1;white-space:normal;font-size:12px;text-align:left}.genFromComponent .genFormIcon-qs{fill:#606266;vertical-align:middle;display:inline-block;width:16px;height:16px;margin-left:2px;margin-top:-2px;cursor:pointer}.genFromComponent .genFormItemRequired:before{content:"*";color:#f56c6c;margin-right:4px}.genFromComponent .appendCombining_box{margin-bottom:22px}.genFromComponent .appendCombining_box .appendCombining_box{margin-bottom:10px}.genFromComponent .appendCombining_box{padding:10px;background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .validateWidget{margin-bottom:0!important;width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important;padding:0!important}.genFromComponent .validateWidget .formItemErrorBox{padding:5px 0;position:relative}.genFromComponent .arrayField:not(.genFormItem){margin-bottom:22px}.genFromComponent .arrayField:not(.genFormItem) .arrayField{margin-bottom:10px}.genFromComponent .arrayOrderList{background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .arrayOrderList_item{position:relative;padding:25px 10px 12px;border-radius:2px;margin-bottom:6px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.genFromComponent .arrayOrderList_bottomAddBtn{text-align:right;padding:15px 10px;margin-bottom:10px}.genFromComponent .bottomAddBtn{width:40%;min-width:10px;max-width:180px}.genFromComponent .arrayListItem_content{padding-top:15px;-webkit-box-flex:1;-ms-flex:1;flex:1;margin:0 auto;-webkit-box-shadow:0 -1px 0 0 rgba(0,0,0,.05);box-shadow:0 -1px 0 0 rgba(0,0,0,.05)}.genFromComponent .arrayListItem_index,.genFromComponent .arrayListItem_operateTool{position:absolute;height:25px}.genFromComponent .arrayListItem_index{top:6px;line-height:18px;height:18px;padding:0 6px;background-color:rgba(0,0,0,.28);color:#fff;font-size:12px;border-radius:2px}.genFromComponent .arrayListItem_operateTool{width:75px;right:9px;top:-1px;text-align:right;font-size:0}.genFromComponent .arrayListItem_btn{vertical-align:top;display:inline-block;padding:6px;margin:0;font-size:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none;cursor:pointer;text-align:center;background:transparent;color:#666}.genFromComponent .arrayListItem_btn:hover{opacity:.6}.genFromComponent .arrayListItem_btn[disabled]{color:#999;opacity:.3!important;cursor:not-allowed}.genFromComponent .arrayListItem_orderBtn-bottom,.genFromComponent .arrayListItem_orderBtn-top{background-color:#f0f9eb}.genFromComponent .arrayListItem_btn-delete{background-color:#fef0f0}.genFromComponent .formFooter_item{text-align:right;border-top:1px solid rgba(0,0,0,.08);padding-top:10px}.genFromComponent.formInlineFooter>.fieldGroupWrap{display:inline-block;margin-right:10px}.genFromComponent.formInline .genFormItem{display:inline-block;margin-right:10px;vertical-align:top}.genFromComponent.formInline .validateWidget{margin-right:0}.genFromComponent.formInline .formFooter_item{border-top:none;padding-top:0}.layoutColumn .layoutColumn_w100{width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important}.layoutColumn .fieldGroupWrap_box{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start}.layoutColumn .fieldGroupWrap_box>div{width:100%;-ms-flex-preferred-size:100%;flex-basis:100%}.layoutColumn .fieldGroupWrap_box>.genFormItem{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;-webkit-box-sizing:border-box;box-sizing:border-box;padding-right:10px}.layoutColumn.layoutColumn-1 .fieldGroupWrap_box>.genFormItem{padding-right:0}.layoutColumn.layoutColumn-2 .fieldGroupWrap_box>.genFormItem{width:50%;-ms-flex-preferred-size:50%;flex-basis:50%}.layoutColumn.layoutColumn-3 .fieldGroupWrap_box>.genFormItem{width:33.333%;-ms-flex-preferred-size:33.333%;flex-basis:33.333%}');var Wt={formFooter:{type:Object,default:function(){return{show:!0,okBtn:"保存",cancelBtn:"取消"}}},modelValue:{type:null,default:function(){return{}},required:!0},fallbackLabel:{type:Boolean,default:!1},formProps:{type:Object,default:function(){return{}}},schema:{type:Object,default:function(){return{}},required:!0},uiSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},errorSchema:{type:Object,default:function(){return{}}}},Ut={name:"FormFooter",props:{okBtn:{type:String,default:"保存"},cancelBtn:{type:String,default:"取消"},formItemAttrs:{type:Object,default:function(){return{}}},globalOptions:{type:Object,default:function(){return{}}}},emits:["cancel","submit"],setup:function(e,t){var a=t.emit,o=e.globalOptions.COMPONENT_MAP;return function(){return r($(o.formItem),w({class:{formFooter_item:!0}},e.formItemAttrs),{default:function(){return[r($(o.button),{onClick:function(){a("cancel")}},{default:function(){return e.cancelBtn}}),r($(o.button),{style:{marginLeft:"10px"},type:"primary",onClick:function(){a("submit")}},{default:function(){return e.okBtn}})]}})}}},Qt={name:"FieldGroupWrap",inject:["genFormProvide"],props:{curNodePath:{type:String,default:""},showTitle:{type:Boolean,default:!0},showDescription:{type:Boolean,default:!0},title:{type:String,default:""},description:{type:String,default:""}},computed:{trueTitle:function(){var e=this.title;if(e)return e;var r=(this.genFormProvide.value||this.genFormProvide).fallbackLabel&&this.curNodePath.split(".").pop();return r!=="".concat(Number(r))?r:""}}},Bt={class:"fieldGroupWrap"},Ht={key:0,class:"fieldGroupWrap_title"},Kt={class:"fieldGroupWrap_box"};Qt.render=function(e,r,l,u,c,d){return t(),a("div",Bt,[l.showTitle&&d.trueTitle?(t(),a("h3",Ht,o(d.trueTitle),1)):n("v-if",!0),l.showDescription&&l.description?(t(),a("p",{key:1,class:"fieldGroupWrap_des",innerHTML:l.description},null,8,["innerHTML"])):n("v-if",!0),i("div",Kt,[s(e.$slots,"default")])])},Qt.__file="utils/components/FieldGroupWrap.vue";var Gt={formProps:{type:null},globalOptions:{type:null},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},customFormats:{type:Object,default:function(){return{}}},rootSchema:{type:Object,default:function(){return{}}},rootFormData:{type:null,default:function(){return{}}},curNodePath:{type:String,default:""},required:{type:Boolean,default:!1},needValidFieldGroup:{type:Boolean,default:!0}},Jt={class:"genFormIcon genFormIcon-down",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},Zt=i("path",{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"},null,-1);var Yt={render:function(e,r){return t(),a("svg",Jt,[Zt])},__file:"utils/icons/IconCaretDown.vue"},Xt={class:"genFormIcon genFormIcon-up",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},ea=i("path",{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"},null,-1);var ra={render:function(e,r){return t(),a("svg",Xt,[ea])},__file:"utils/icons/IconCaretUp.vue"},ta={class:"genFormIcon genFormIcon-close",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},aa=i("path",{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1\n 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0\n 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"},null,-1);var oa={render:function(e,r){return t(),a("svg",ta,[aa])},__file:"utils/icons/IconClose.vue"},na={class:"genFormIcon genFormIcon-plus",t:"1551322312294",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"10297","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"200",height:"200"},ia=i("path",{d:"M474 152m8 0l60 0q8 0 8 8l0 704q0 8-8 8l-60 0q-8 0-8-8l0-704q0-8 8-8Z","p-id":"10298"},null,-1),sa=i("path",{d:"M168 474m8 0l672 0q8 0 8 8l0 60q0 8-8 8l-672 0q-8 0-8-8l0-60q0-8 8-8Z","p-id":"10299"},null,-1);var la={render:function(e,r){return t(),a("svg",na,[ia,sa])},__file:"utils/icons/IconPlus.vue"},ua={class:"genFormIcon genFormIcon-qs",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},ca=i("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 708c-22.1\n 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 0\n 0-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8\n 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6\n 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6\n 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z"},null,-1);var da={render:function(e,r){return t(),a("svg",ua,[ca])},__file:"utils/icons/IconQuestion.vue"},ma={name:"Widget",props:{isFormData:{type:Boolean,default:!0},curValue:{type:null,default:0},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},widget:{type:[String,Function,Object],default:null},required:{type:Boolean,default:!1},emptyValue:{type:null,default:void 0},rootFormData:{type:null},curNodePath:{type:String,default:""},label:{type:String,default:""},width:{type:String,default:""},labelWidth:{type:String,default:""},description:{type:String,default:""},widgetAttrs:{type:Object,default:function(){return{}}},widgetClass:{type:Object,default:function(){return{}}},widgetStyle:{type:Object,default:function(){return{}}},fieldAttrs:{type:Object,default:function(){return{}}},fieldClass:{type:Object,default:function(){return{}}},fieldStyle:{type:Object,default:function(){return{}}},uiProps:{type:Object,default:function(){return{}}},formProps:null,getWidget:null,globalOptions:null,onChange:null},emits:["change"],inheritAttrs:!0,setup:function(e,t){var a=t.emit,o=l("genFormProvide"),n=u({get:function(){return e.isFormData?I(e.rootFormData,e.curNodePath):e.curValue},set:function(r){var t=""===r||null===r?e.emptyValue:r;e.isFormData&&R(e.rootFormData,e.curNodePath,t),a("change",t)}});e.uiProps.enumOptions&&e.uiProps.enumOptions.length>0&&void 0===n.value&&n.value!==e.uiProps.enumOptions[0]&&(e.schema.items?n.value=[]:e.required&&(n.value=e.uiProps.enumOptions[0].value));var i=c(null);return"function"==typeof e.getWidget&&d(i,(function(){e.getWidget.call(null,i.value)})),function(){var t=k(e.curNodePath),a=e.globalOptions.HELPERS.isMiniDes(e.formProps),s=e.description?r("div",{innerHTML:e.description,class:{genFromWidget_des:!0}}):null,l=e.globalOptions.COMPONENT_MAP,u=a&&s?r($(l.popover),{style:{margin:"0 2px",fontSize:"16px",cursor:"pointer"},placement:"top",trigger:"hover"},{default:function(){return s},reference:function(){return r(da)}}):null,c=w(w({},e.fieldStyle),e.width?{width:e.width,flexBasis:e.width,paddingRight:"10px"}:{}),d=_t(e.label,e.widget&&o.value.fallbackLabel,e.curNodePath);return r($(l.formItem),w(w(w({class:w(w({},e.fieldClass),{},{genFormItem:!0}),style:c},e.fieldAttrs),e.labelWidth?{labelWidth:e.labelWidth}:{}),e.isFormData?{prop:t?"__$$root":e.curNodePath,rules:[{validator:function(r,a,o){t&&(a=e.rootFormData);var n=$t({formData:a,schema:e.schema,uiSchema:e.uiSchema,customFormats:e.customFormats,errorSchema:e.errorSchema,required:e.required,propPath:e.curNodePath});if(n.length>0)return o?o(n[0].message):Promise.reject(n[0].message);var i=e.customRule;return i&&"function"==typeof i?i({field:e.curNodePath,value:a,rootFormData:e.rootFormData,callback:o}):o?o():Promise.resolve()},trigger:"blur"}]}:{}),w(w({error:function(e){return e.error?r("div",{class:{formItemErrorBox:!0},title:e.error},[e.error]):null}},d?{label:function(){return r("span",{class:{genFormLabel:!0,genFormItemRequired:e.required}},["".concat(d)].concat(x(u?[u]:[]),["".concat(e.formProps&&e.formProps.labelSuffix||"")]))}}:{}),{},{default:function(t){return[].concat(x(!a&&s?[s]:[]),x(e.widget?[r($(e.widget),w(w(w({style:e.widgetStyle,class:e.widgetClass},e.widgetAttrs),e.uiProps),{},{modelValue:n.value,ref:i,"onUpdate:modelValue":function(r){var t=n.value;t!==r&&(n.value=r,e.onChange&&e.onChange(r,t))}},t))]:[]))}}))}}},pa={name:"ObjectField",props:Gt,setup:function(e){return function(){var t=e.curNodePath,a=vt({schema:e.schema,uiSchema:e.uiSchema,curNodePath:t,rootFormData:e.rootFormData}),o=a.title,n=a.description,i=a.showTitle,s=a.showDescription,l=a.order,u=a.fieldClass,c=a.fieldAttrs,d=a.fieldStyle,m=a.onlyShowIfDependent,p=bt(Object.keys(e.schema.properties||{}),l).map((function(a){var o=function(r){return Array.isArray(e.schema.required)&&!!~e.schema.required.indexOf(r)}(a),n=function(r){var t=!1,a=!1;return L(e.schema.dependencies)&&(a=Object.entries(e.schema.dependencies).some((function(a){var o=S(a,2),n=o[0],i=o[1],s=!(!Array.isArray(i)||!~i.indexOf(r));return t=t||s,s&&void 0!==I(e.rootFormData,e.curNodePath)[n]}))),{isDependency:t,curDependent:a}}(a),i=n.isDependency,s=n.curDependent;return i&&m&&!s?null:r(Oa,w(w({key:a},e),{},{schema:e.schema.properties[a],uiSchema:e.uiSchema[a],errorSchema:e.errorSchema[a],required:o||s,curNodePath:j(t,a)}))}));return r(Qt,w({title:o,description:n,showTitle:i,showDescription:s,curNodePath:t,class:w({},u),style:d},c),{default:function(){return[].concat(x(p),x(e.needValidFieldGroup?[r(ma,{key:"validateWidget-object",class:{validateWidget:!0,"validateWidget-object":!0},schema:Object.entries(e.schema).reduce((function(r,t){var a=S(t,2),o=a[0],n=a[1];return!1!==e.schema.additionalProperties&&["properties","id","$id"].includes(o)||(r[o]=n),r}),{}),uiSchema:e.uiSchema,errorSchema:e.errorSchema,curNodePath:t,rootFormData:e.rootFormData,globalOptions:e.globalOptions})]:[]))}})}}},ha={name:"StringField",props:Gt,setup:function(e,t){var a=t.attrs,o=u((function(){var r=Et(e.schema)&&Ot(e.schema,e.uiSchema,e.curNodePath,e.rootFormData),t=gt({schema:e.schema,uiSchema:e.uiSchema,curNodePath:e.curNodePath,rootFormData:e.rootFormData},(function(){var t="number"===e.schema.type||"integer"===e.schema.type;return{widget:r?e.globalOptions.WIDGET_MAP.common.select:e.globalOptions.WIDGET_MAP.formats[e.schema.format]||(t?e.globalOptions.WIDGET_MAP.types.number:e.globalOptions.WIDGET_MAP.types.string)}}));return r&&!t.uiProps.enumOptions&&(t.uiProps.enumOptions=r),t}));return function(){return r(ma,w(w(w({},e),a),o.value))}}},fa={name:"NumberField",props:Gt,setup:function(e,t){var a=t.attrs;return function(){return r(ha,w(w({},e),a))}}},va={name:"IntegerField",props:Gt,setup:function(e,t){var a=t.attrs;return function(){return r(ha,w(w({},e),a))}}},ga={name:"BooleanField",props:Gt,setup:function(e,t){var a=t.attrs;return function(){var t=e.schema,o=e.uiSchema,n=e.curNodePath,i=e.rootFormData,s=e.globalOptions,l=Ot({enumNames:t.enumNames||["true","false"],enum:t.enum||[!0,!1]},o,n,i),u=gt({schema:t,uiSchema:o,curNodePath:n,rootFormData:i},(function(){return{widget:s.WIDGET_MAP.types.boolean}}));return u.uiProps.enumOptions=u.uiProps.enumOptions||l,r(ma,w(w(w({},a),e),u))}}},ya={name:"ArrayOrderList",emits:["arrayOperate"],props:{vNodeList:{type:Array,default:[]},tupleItemsLength:{type:Number,default:0},addable:{type:Boolean,default:!0},showIndexNumber:{type:Boolean,default:!1},sortable:{type:Boolean,default:!0},removable:{type:Boolean,default:!0},maxItems:{},minItems:{},globalOptions:null},setup:function(e,t){var a=t.emit,o=u((function(){var r=e.addable,t=e.maxItems,a=e.vNodeList;return!!r&&(void 0===t||a.length<t)})),n=u((function(){var r=e.removable,t=e.minItems,a=e.vNodeList;return!!r&&(void 0===t||a.length>t)}));return function(){return e.vNodeList.length<=0&&!e.addable?null:r("div",{class:{arrayOrderList:!0}},e.vNodeList.map((function(t,o){var i=t.key,s=t.vNode,l=e.tupleItemsLength+o,u=o+1;return r("div",{key:i,class:{arrayOrderList_item:!0}},[e.showIndexNumber?r("div",{class:{arrayListItem_index:!0}},u):null,r("div",{class:{arrayListItem_operateTool:!0}},[r("button",{style:w({},e.sortable?{}:{display:"none"}),class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-top":!0},type:"button",disabled:!e.sortable||0===o,onClick:function(){a("arrayOperate",{command:"moveUp",data:{index:l}})}},[r(ra)]),r("button",{style:w({},e.sortable?{}:{display:"none"}),class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-bottom":!0},type:"button",disabled:!e.sortable||o===e.vNodeList.length-1,onClick:function(){a("arrayOperate",{command:"moveDown",data:{index:l}})}},[r(Yt)]),r("button",{style:w({},e.removable?{}:{display:"none"}),class:{arrayListItem_btn:!0,"arrayListItem_btn-delete":!0},type:"button",disabled:!n.value,onClick:function(){a("arrayOperate",{command:"remove",data:{index:l}})}},[r(oa)])]),r("div",{class:{arrayListItem_content:!0}},[s])])})).concat([r("p",{style:w({},o.value?{}:{display:"none"}),class:{arrayOrderList_bottomAddBtn:!0}},[r("button",{class:{bottomAddBtn:!0,"is-plain":!0,genFormBtn:!0},type:"button",onClick:function(){a("arrayOperate",{command:"add"})}},[r(la,{style:{marginRight:"5px"}}),e.maxItems?"( ".concat(e.vNodeList.length," / ").concat(e.maxItems," )"):""])])]))}}},ba={name:"ArrayFieldNormal",props:w(w({},Gt),{},{itemsFormData:{type:Array}}),setup:function(e,t){var a=t.attrs;return function(){var t=e.schema,o=e.uiSchema,n=e.curNodePath,i=e.rootFormData,s=e.itemsFormData,l=e.errorSchema,u=e.globalOptions,c=vt({schema:t,uiSchema:o,curNodePath:n,rootFormData:i}),d=c.title,m=c.description,p=c.addable,h=c.showIndexNumber,f=c.sortable,v=c.removable,g=c.showTitle,y=c.showDescription,b=c.fieldClass,P=c.fieldAttrs,E=c.fieldStyle,S=s.map((function(a,i){var s=mt({schema:t.items,uiSchema:o.items},i);return{key:a.key,vNode:r(Oa,w(w({key:a.key},e),{},{schema:t.items,required:![].concat(t.items.type).includes("null"),uiSchema:w(w({},o.items),s),errorSchema:l.items,curNodePath:j(n,i)}))}}));return r(Qt,{title:d,description:m,showTitle:g,showDescription:y,curNodePath:n,class:b,attrs:P,style:E},{default:function(){return r(ya,w(w({},a),{},{vNodeList:S,showIndexNumber:h,addable:p,sortable:f,removable:v,maxItems:t.maxItems,minItems:t.minItems,globalOptions:u}))}})}}},Pa={name:"ArrayFieldMultiSelect",props:w({},Gt),setup:function(e,t){var a=t.attrs;return function(){var t=e.schema,o=e.rootSchema,n=e.uiSchema,i=e.curNodePath,s=e.rootFormData,l=e.globalOptions,u=Ot(ut(t.items,o),n,i,s),c=gt({schema:t,uiSchema:n,curNodePath:i,rootFormData:s},(function(){return{widget:l.WIDGET_MAP.common.checkboxGroup}}));return c.uiProps.multiple=!0,u&&!c.uiProps.enumOptions&&(c.uiProps.enumOptions=u),r(ma,w(w(w({},a),e),c))}}},wa={name:"ArrayFieldTuple",props:w(w({},Gt),{},{itemsFormData:{type:Array,default:function(){return[]}}}),emits:["arrayOperate"],setup:function(e,t){var a=t.emit;t.attrs;return function(){var r=!Array.isArray(e.itemsFormData);if(r||e.itemsFormData.length<e.schema.items.length){var t=qt(e.schema,void 0,e.rootSchema);a("arrayOperate",r?{command:"setNewTarget",data:{newTarget:t}}:{command:"batchPush",data:{pushArray:t.slice(e.itemsFormData.length)}})}}(),function(){if(!Array.isArray(e.itemsFormData))return null;var t,o,n=e.schema,i=e.uiSchema,s=e.errorSchema,l=e.curNodePath,u=e.globalOptions,c=vt({schema:n,uiSchema:i,curNodePath:l,rootFormData:e.rootFormData}),d=c.title,m=c.description,p=c.addable,h=c.showIndexNumber,f=c.sortable,v=c.removable,g=c.showTitle,y=c.showDescription,b=c.fieldClass,P=c.fieldAttrs,E=c.fieldStyle,S=(t=e.itemsFormData,o=e.schema.items.length-1,t.reduce((function(e,r,t){return e[t>o?1:0].push(r),e}),[[],[]])),F=S[0].map((function(t,a){return r(Oa,w(w({key:t.key},e),{},{required:![].concat(n.items[a].type).includes("null"),schema:n.items[a],uiSchema:i.items?i.items[a]:{},errorSchema:s.items?s.items[a]:{},curNodePath:j(l,a)}))})),O=S[1].map((function(t,a){var o=mt({schema:n.additionalItems,uiSchema:i.additionalItems},a);return{key:t.key,vNode:r(Oa,w(w({key:t.key},e),{},{schema:n.additionalItems,required:![].concat(n.additionalItems.type).includes("null"),uiSchema:w(w({},i.additionalItems),o),errorSchema:s.additionalItems,curNodePath:j(e.curNodePath,a+n.items.length)}))}})),_=(void 0===p||p)&&Ft(e.schema);return r(Qt,w(w({title:d,description:m,showTitle:g,showDescription:y,curNodePath:l},P),{},{class:b,style:E}),{default:function(){return[].concat(x(F),[r(ya,{onArrayOperate:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return a.apply(void 0,["arrayOperate"].concat(r))},vNodeList:O,tupleItemsLength:n.items.length,addable:_,showIndexNumber:h,sortable:f,removable:v,maxItems:n.maxItems,minItems:n.minItems,globalOptions:u})])}})}}},Ea={name:"ArrayFieldSpecialFormat",props:Gt,setup:function(e,t){var a=t.attrs,o=e.schema,n=e.uiSchema,i=e.curNodePath,s=e.rootFormData,l=gt({schema:w({"ui:widget":e.globalOptions.WIDGET_MAP.formats[o.format]},o),uiSchema:n,curNodePath:i,rootFormData:s});return function(){return r(ma,w(w(w({},a),e),l))}}},Sa={name:"ArrayField",props:Gt,setup:function(e){var t=function(){var r=I(e.rootFormData,e.curNodePath);return Array.isArray(r)?r:[]},a=c(t().map((function(){return U()}))),o=u((function(){return t()}));d(o,(function(e,r){e!==r&&m(e)!==m(r)&&Array.isArray(e)&&(a.value=e.map((function(){return U()})))}),{deep:!0});var n=u((function(){return o.value.map((function(e,r){return{key:a.value[r],value:e}}))})),i=function(r){var t=r.command,n=r.data,i={moveUp:function(e,r){!function(e,r){if(0===r)return!1;var t=[e[r],e[r-1]];e.splice.apply(e,[r-1,2].concat(t))}(e,r.index)},moveDown:function(e,r){!function(e,r){if(r===e.length-1)return!1;var t=e[r],a=[e[r+1],t];e.splice.apply(e,[r,2].concat(a))}(e,r.index)},remove:function(e,r){!function(e,r){e.splice(r,1).length}(e,r.index)},add:function(e,r){var t=r.newRowData;e.push(t)},batchPush:function(e,r){r.pushArray.forEach((function(r){e.push(r)}))},setNewTarget:function(e,r){R(r.formData,r.nodePath,r.newTarget)}}[t];if(!i)throw new Error("错误 - 未知的操作:[".concat(t,"]"));var s,l,u,c=n,d=n;"add"===t?(c={newRowData:(s=e.schema,l=e.rootSchema,u=s.items,St(s)&&Ft(s)&&(u=s.additionalItems),qt(u,void 0,l))},d={newRowData:U()}):"batchPush"===t?d={pushArray:c.pushArray.map((function(e){return U()}))}:"setNewTarget"===t&&(c={formData:e.rootFormData,nodePath:e.curNodePath,newTarget:c.newTarget},d={formData:a,nodePath:"value",newTarget:c.newTarget.map((function(e){return U()}))}),i.apply(null,[a.value,d]),i.apply(null,[o.value,c])};return function(){var t=e.schema,a=e.uiSchema,o=e.rootSchema,s=e.rootFormData,l=e.curNodePath,u=e.globalOptions;if(!t.hasOwnProperty("items"))throw new Error("[".concat(t,"] 请先定义 items属性"));if(xt(t,o))return r(Pa,w(w({},e),{},{class:y({},B(Pa.name),!0)}));if(t.format||t["ui:widget"]||a["ui:widget"])return r(Ea,w(w({},e),{},{class:y({},B(Ea.name),!0)}));var c=St(t)?wa:ba;return r("div",[r(c,w(w({itemsFormData:n.value},e),{},{onArrayOperate:i,class:y({},B(c.name),!0)})),e.needValidFieldGroup?r(ma,{key:"validateWidget-array",class:{validateWidget:!0,"validateWidget-array":!0},schema:Object.entries(t).reduce((function(e,r){var t=S(r,2),a=t[0],o=t[1];return"items"!==a&&(e[a]=o),e}),{}),uiSchema:a,errorSchema:e.errorSchema,curNodePath:l,rootFormData:s,globalOptions:u}):null])}}},xa={name:"SelectLinkageField",props:w(w({},Gt),{},{combiningType:{type:String,default:"anyOf"},selectList:{type:Array,require:!0}}),setup:function(e){var t,a,o=c((t=I(e.rootFormData,e.curNodePath),0!==(a=Lt(t,e.selectList,e.rootSchema,!0))?a:e.curSelectIndex||0)),n=function(){var t=gt({schema:e.schema["".concat(e.combiningType,"Select")]||{},uiSchema:e.uiSchema["".concat(e.combiningType,"Select")]||{},curNodePath:e.curNodePath,rootFormData:e.rootFormData},(function(){return{widget:"SelectWidget"}}));if(t.label=t.label||e.schema.title,t.description=t.description||e.schema.description,!t.uiProps.enumOptions){var a=e.uiSchema[e.combiningType]||[];t.uiProps.enumOptions=e.selectList.map((function(e,r){return{label:vt({schema:e,uiSchema:a[r],containsSpec:!1}).title||"选项 ".concat(r+1),value:r}}))}return r(ma,w(w({key:"fieldSelect_".concat(e.combiningType),class:y({},"fieldSelect_".concat(e.combiningType),!0),isFormData:!1,curValue:o.value,globalOptions:e.globalOptions},t),{},{onChange:function(e){o.value=e}}))};return d(o,(function(r,t){var a=I(e.rootFormData,e.curNodePath),o=qt(e.selectList[r],void 0,e.rootSchema),n=Object.prototype.hasOwnProperty;if(L(a)){var i=ut(e.selectList[t],e.rootSchema);if("object"===V(i))for(var s in i.properties)n.call(i.properties,s)&&!n.call(o,s)&&C(a,s)}L(o)?Object.entries(o).forEach((function(e){var r=S(e,2),t=r[0],o=r[1];void 0!==o&&R(a,t,o)})):R(e.rootFormData,e.curNodePath,o||a)})),function(){var t,a=e.curNodePath,i=D(a),s=null;if(("object"===e.schema.type||e.schema.properties)&&!function(e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!1;return!0}(e.schema.properties)){var l,u=Object.assign({},e.schema);delete u[e.combiningType],s=r(Oa,w(w({key:"origin_".concat(e.combiningType),class:(l={},y(l,"".concat(e.combiningType,"_originBox"),!0),y(l,"".concat(i,"-originBox"),!0),l)},e),{},{schema:u}))}var c=[n()],d=e.selectList[o.value];if(d){var m=e.schema,p=e.combiningType,h="".concat(e.combiningType,"Select");m.properties,m[p],m[h];var f=E(m,["properties",p,h].map(_));d=Object.assign({},f,d);var v=Q(vt({schema:e.schema,uiSchema:e.uiSchema,containsSpec:!1,curNodePath:a,rootFormData:e.rootFormData}),(function(r){return r===e.combiningType?void 0:"ui:".concat(r)})),g=Q(yt({schema:e.schema,uiSchema:e.uiSchema,errorSchema:e.errorSchema}),(function(r){return r===e.combiningType?void 0:"err:".concat(r)}));c.push(r(Oa,w(w({key:"appendSchema_".concat(e.combiningType)},e),{},{schema:w({"ui:showTitle":!1,"ui:showDescription":!1},d),required:e.required,uiSchema:w(w({},v),(e.uiSchema[e.combiningType]||[])[o.value]),errorSchema:w(w({},g),(e.errorSchema[e.combiningType]||[])[o.value])})))}return c.push(r(ma,{key:"validateWidget-".concat(e.combiningType),class:y({validateWidget:!0},"validateWidget-".concat(e.combiningType),!0),schema:e.schema,uiSchema:e.uiSchema,errorSchema:e.errorSchema,curNodePath:e.curNodePath,rootFormData:e.rootFormData,globalOptions:e.globalOptions})),r("div",[s,r("div",{key:"appendBox_".concat(e.combiningType),class:(t={appendCombining_box:!0},y(t,"".concat(e.combiningType,"_appendBox"),!0),y(t,"".concat(i,"-appendBox"),!0),t)},c)])}}},Fa={array:Sa,boolean:ga,integer:va,number:fa,object:pa,string:ha,null:{render:function(){return null}},anyOf:{name:"AnyOfField",setup:function(e,t){var a=t.attrs,o=t.slots;return function(){return r(xa,w(w({},a),{},{combiningType:"anyOf",selectList:a.schema.anyOf}),o)}}},oneOf:{name:"oneOfField",setup:function(e,t){var a=t.attrs,o=t.slots;return function(){return r(xa,w(w({},a),{},{combiningType:"oneOf",selectList:a.schema.oneOf}),o)}}}},Oa={name:"SchemaField",props:Gt,setup:function(e){return function(){var t,a=ut(e.schema,e.rootSchema),o=w(w({},e),{},{schema:a});if(0===Object.keys(a).length)return null;var n,i,s=ht(Fa,o),l=s.field,u=s.fieldProps,c=pt({schema:a,uiSchema:e.uiSchema,curNodePath:e.curNodePath,rootFormData:e.rootFormData}),d=D(e.curNodePath);return a.anyOf&&a.anyOf.length>0&&!Et(a)?r($(Fa.anyOf),w({class:(n={},y(n,"".concat(d,"-anyOf"),!0),y(n,"fieldItem",!0),y(n,"anyOfField",!0),n)},o)):a.oneOf&&a.oneOf.length>0&&!Et(a)?r($(Fa.oneOf),w({class:(i={},y(i,"".concat(d,"-oneOf"),!0),y(i,"fieldItem",!0),y(i,"oneOfField",!0),i)},o)):l&&!c?r($(l),w(w({},o),{},{fieldProps:u,class:(t={},y(t,B(l.name)||l,!0),y(t,"hiddenWidget",c),y(t,"fieldItem",!0),y(t,d,!0),t)})):null}}};var _a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.model,o=void 0===a?"value":a;return f({inheritAttrs:!1,setup:function(t,a){var n=a.attrs,i=a.slots;return function(){var t,a=n.modelValue,s=n["onUpdate:modelValue"],l=E(n,["modelValue","onUpdate:modelValue"]);return r($(e),w((y(t={},o,a),y(t,"onUpdate:".concat(o),s),t),l),i)}}})},Da=function(e){return f({inheritAttrs:!1,setup:function(t,a){var o=a.attrs,n=a.slots;return function(){var t=o.isNumberValue,a=o.isRange,i=o.value,s=E(o,["isNumberValue","isRange","value"]),l=t?a?(i||[]).map((function(e){return"number"==typeof e?String(e):e})):"number"==typeof i?String(i):i:i,u=w(w({},o),{},{value:l,"onUpdate:value":function(e){t&&(e=a?e.map((function(e){return+e})):+e),s["onUpdate:value"].call(this,e)}});return r($(e),u,n)}}})},ka=_a({name:"CheckboxesWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}},setup:function(e,t){var a=t.attrs;return function(){return r($("a-checkbox-group"),a,{default:function(){return e.enumOptions.map((function(e,t){return r($("a-checkbox"),{key:t,value:e.value},{default:function(){return e.label}})}))}})}}},{model:"value"}),ja=_a({name:"RadioWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}},setup:function(e,t){var a=t.attrs;return function(){return r($("a-radio-group"),a,{default:function(){return e.enumOptions.map((function(e,t){return r($("a-radio"),{key:t,value:e.value},{default:function(){return e.label}})}))}})}}},{model:"value"}),Ia=_a({name:"SelectWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}},setup:function(e,t){var a=t.attrs;return function(){return r($("a-select"),w(w({},a.multiple?{mode:"multiple"}:{}),a),{default:function(){return e.enumOptions.map((function(e,t){return r($("a-select-option"),{key:t,value:e.value},{default:function(){return e.label}})}))}})}}},{model:"value"}),Aa=_a(Da({name:"DatePickerWidget",inheritAttrs:!1,setup:function(e,t){var a=t.attrs;return function(){var e=a.isNumberValue,t=a.isRange,o=E(a,["isNumberValue","isRange"]);return r($(t?"a-range-picker":"a-date-picker"),w({valueFormat:e?"x":"YYYY-MM-DD"},o))}}}),{model:"value"}),Ca=_a(Da({name:"DatePickerWidget",inheritAttrs:!1,setup:function(e,t){var a=t.attrs;return function(){var e=a.isNumberValue,t=a.isRange,o=E(a,["isNumberValue","isRange"]);return r($(t?"a-range-picker":"a-date-picker"),w({valueFormat:e?"x":"YYYY-MM-DDTHH:mm:ssZ",showTime:!0},o))}}}),{model:"value"}),Ra={CheckboxesWidget:ka,RadioWidget:ja,SelectWidget:Ia,TimePickerWidget:_a({name:"TimePickerWidget",inheritAttrs:!1,setup:function(e,t){var a=t.attrs;return function(){return r($("a-time-picker"),w({"value-format":"HH:mm:ss"},a))}}},{model:"value"}),DatePickerWidget:Aa,DateTimePickerWidget:Ca,UploadWidget:{name:"UploadWidget",props:{modelValue:{default:null,type:[String,Array]},responseFileUrl:{default:function(){return function(e){return e?e.url||e.data&&e.data.url:""}},type:[Function]},btnText:{type:String,default:"点击上传"},slots:{type:null,default:null}},inheritAttrs:!1,setup:function(e,t){var a=t.attrs,o=t.emit,n=e.modelValue,i=Array.isArray(n),s=a.fileList||(i?n.map((function(e,r){return{uid:String(r),status:"done",name:"已上传文件(".concat(r+1,")"),url:e}})):n?[{uid:"1",status:"done",name:"已上传文件",url:n}]:[]),l=c(s),u=function(r){return r&&(r.response&&e.responseFileUrl(r.response)||r.url)||""};return function(){return r($("a-upload"),w(w({},a),{},{fileList:l.value,"onUpdate:fileList":function(e){l.value=e},onChange:function(e){"uploading"!==e.file.status&&function(e){var r;if(i)r=e.length?e.reduce((function(e,r){var t=u(r);return t&&(r.url=t,e.push(t)),e}),[]):[];else{var t=e[e.length-1];r=u(t),t&&r?(t.url=r,l.value=[t]):l.value=[]}o("update:modelValue",r)}(e.fileList),a.onChange&&a.onChange.call(this,e)}}),w({default:function(){return r($("a-button"),{type:"primary"},{default:function(){return e.btnText}})}},e.slots||{}))}}},InputWidget:_a("a-input"),InputNumberWidget:_a("a-input-number"),AutoCompleteWidget:_a("a-auto-complete"),SliderWidget:_a("a-slider"),RateWidget:_a("a-rate"),SwitchWidget:_a("a-switch",{model:"checked"})},$a=Ra.InputWidget,Na=Ra.InputNumberWidget,La={types:{boolean:Ra.SwitchWidget,string:$a,number:Na,integer:Na},formats:{color:{setup:function(e,t){var a=t.attrs;return function(){return r($a,w(w({},a),{},{style:w(w({},a.style||{}),{},{maxWidth:"180px"})}),{addonAfter:function(){return r($a,{disabled:a.disabled,readonly:a.readonly,moduleValue:a.moduleValue,"onUpdate:modelValue":a["onUpdate:modelValue"],type:"color",style:{padding:"0",width:"50px"}})}})}}},time:Ra.TimePickerWidget,date:Ra.DatePickerWidget,"date-time":Ra.DateTimePickerWidget},common:{select:Ra.SelectWidget,radioGroup:Ra.RadioWidget,checkboxGroup:Ra.CheckboxesWidget},widgetComponents:Ra};Mt(".genFromComponent.ant-form-vertical .ant-form-item-label{line-height:26px;padding-bottom:6px;font-size:14px}.genFromComponent .ant-form-item{margin-bottom:22px}.genFromComponent .ant-form-item.ant-form-item-with-help{margin-bottom:2px}.genFromComponent .ant-form-explain{padding-top:2px;display:-webkit-box!important;text-overflow:ellipsis;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;text-align:left;line-height:1.2;font-size:12px}.genFromComponent .validateWidget .ant-form-explain{padding:5px 0;position:relative}.genFromComponent .ant-form-item-label>label.ant-form-item-no-colon:after{display:none}");var Ta={WIDGET_MAP:La,COMPONENT_MAP:{form:f({inheritAttrs:!1,setup:function(e,t){var a=t.attrs,o=t.slots,n={top:{layout:"vertical"},left:{layout:"horizontal",labelAlign:"left"},right:{layout:"horizontal",labelAlign:"right"}},i=c(null);return a.setFormRef&&v((function(){i.value.$$validate=function(e){i.value.validate().then((function(r){e(!0,r)})).catch((function(r){e(!1,r.errorFields)}))},a.setFormRef(i.value)})),function(){a.setFormRef;var e=a.labelPosition;a.labelWidth;var t=a.model,s=E(a,["setFormRef","labelPosition","labelWidth","model"]);return r($("a-form"),w(w(w({ref:i,model:t.value},n[e||"top"]),s),{},{colon:!1}),o)}}}),formItem:f({inheritAttrs:!1,setup:function(e,t){var a=t.attrs,o=t.slots,n=c(null);return function(){var e=a.prop,t=a.rules,i=E(a,["prop","rules"]);return r($("a-form-item"),w(w({},i),{},{ref:n,rules:(t||[]).map((function(e){return w(w({},e),{},{validator:function(r,t){return e.validator.apply(this,[r,t])}})})),name:e?e.split("."):e}),w(w({},o),{},{default:function(){return o.default.call(this,{onBlur:function(e){var r=e.target.previousElementSibling;r&&r.classList.contains("genFromWidget_des")&&n.value.onFieldBlur()}})}}))}}}),button:"a-button",popover:f({setup:function(e,t){var a=t.attrs,o=t.slots,n=o.default,i=o.reference;return function(){return r($("a-popover"),{attrs:a},{default:i,content:n})}}})},HELPERS:{isMiniDes:function(e){return e&&(["left","right"].includes(e.labelPosition)||"horizontal"===e.layout)}}},za=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={name:"VueForm",props:Wt,emits:["update:modelValue","change","cancel","submit","validation-failed","form-mounted"],setup:function(a,o){var n=o.slots,i=o.emit;if(!t.installed&&e.WIDGET_MAP.widgetComponents){var s=p();Object.entries(e.WIDGET_MAP.widgetComponents).forEach((function(e){var r=S(e,2),t=r[0],a=r[1];return s.appContext.app.component(t,a)})),t.installed=!0}h("genFormProvide",u((function(){return{fallbackLabel:a.fallbackLabel}})));var l=c(qt(a.schema,a.modelValue,a.schema)),m=u((function(){return w({show:!0,okBtn:"保存",cancelBtn:"取消"},a.formFooter)})),f=null,v=function(e,r){i("update:modelValue",e),i("change",{newValue:e,oldValue:r})},g=function(e,r){if(!q(e,r)){var t=qt(a.schema,a.modelValue,a.schema);q(l.value,t)||(l.value=t)}};d(l,(function(e,r){v(e,r)}),{deep:!0}),d((function(){return a.schema}),(function(e,r){g(e,r)})),d((function(){return a.modelValue}),(function(e,r){g(e,r)})),v(l.value,a.modelValue);return function(){var t,o=a.formProps,s=o.layoutColumn,u=void 0===s?1:s,c=o.inlineFooter,d=o.inline,p=E(o,["layoutColumn","inlineFooter","inline"]),h={schema:a.schema,uiSchema:a.uiSchema,errorSchema:a.errorSchema,customFormats:a.customFormats,customRule:a.customRule,rootSchema:a.schema,rootFormData:l.value,curNodePath:"",globalOptions:e,formProps:w({labelSuffix:":",labelPosition:"top"},p)};return r($(e.COMPONENT_MAP.form),w({class:(t={genFromComponent:!0,formInlineFooter:c,formInline:d},y(t,"genFromComponent_".concat(a.schema.id,"Form"),!!a.schema.id),y(t,"layoutColumn",!d),y(t,"layoutColumn-".concat(u),!d),t),setFormRef:function(e){f=e,i("form-mounted",e)},model:l},h.formProps),{default:function(){return[r(Oa,h),n.default?n.default({formData:l,formRefFn:function(){return f}}):m.value.show?r(Ut,{globalOptions:e,okBtn:m.value.okBtn,cancelBtn:m.value.cancelBtn,formItemAttrs:m.value.formItemAttrs,onCancel:function(){i("cancel")},onSubmit:function(){(f.$$validate||f.validate)((function(e,r){return e?i("submit",l):i("validation-failed",r)}))}}):[]]}})}},install:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.component(r.name||t.name,t)}};return t}(Ta);export default za;export{Oa as SchemaField,Gt as fieldProps,Dt as formUtils,qt as getDefaultFormState,Ta as globalOptions,tt as i18n,_a as modelValueComponent,Tt as schemaValidate,N as vueUtils}; +!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var a=r.length-1,o=1;o<a;++o)r[o]=r[o].slice(1,-1);return r[a]=r[a].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function a(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function n(e){var a=r("[0-9]","[A-Fa-f]"),o=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),n="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",i=r("[\\:\\/\\?\\#\\[\\]\\@]",n),s=e?"[\\uE000-\\uF8FF]":"[]",l=r("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t("[A-Za-z]"+r("[A-Za-z]","[0-9]","[\\+\\-\\.]")+"*"),t(t(o+"|"+r(l,n,"[\\:]"))+"*");var u=t(t("25[0-5]")+"|"+t("2[0-4][0-9]")+"|"+t("1[0-9][0-9]")+"|"+t("0?[1-9][0-9]")+"|0?0?[0-9]"),c=t(u+"\\."+u+"\\."+u+"\\."+u),d=t(a+"{1,4}"),m=t(t(d+"\\:"+d)+"|"+c),p=t(t(d+"\\:")+"{6}"+m),h=t("\\:\\:"+t(d+"\\:")+"{5}"+m),f=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+m),v=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+m),g=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+m),y=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+m),b=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+m),P=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),w=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),E=t([p,h,f,v,g,y,b,P,w].join("|")),S=t(t(l+"|"+o)+"+");t("[vV]"+a+"+\\."+r(l,n,"[\\:]")+"+"),t(t(o+"|"+r(l,n))+"*");var x=t(o+"|"+r(l,n,"[\\:\\@]"));return t(t(o+"|"+r(l,n,"[\\@]"))+"+"),t(t(x+"|"+r("[\\/\\?]",s))+"*"),{NOT_SCHEME:new RegExp(r("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,n),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,n),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,n),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,n),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,n,"[\\:\\@\\/\\?]",s),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,n,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,n),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,i),"g"),PCT_ENCODED:new RegExp(o,"g"),IPV4ADDRESS:new RegExp("^("+c+")$"),IPV6ADDRESS:new RegExp("^\\[?("+E+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+S+")")+"?\\]?$")}}var i=n(!1),s=n(!0),l=function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,r){var t=[],a=!0,o=!1,n=void 0;try{for(var i,s=e[Symbol.iterator]();!(a=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);a=!0);}catch(e){o=!0,n=e}finally{try{!a&&s.return&&s.return()}finally{if(o)throw n}}return t}(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")},u=2147483647,c=/^xn--/,d=/[^\0-\x7E]/,m=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,f=String.fromCharCode;function v(e){throw new RangeError(p[e])}function g(e,r){var t=e.split("@"),a="";t.length>1&&(a=t[0]+"@",e=t[1]);var o=function(e,r){for(var t=[],a=e.length;a--;)t[a]=r(e[a]);return t}((e=e.replace(m,".")).split("."),r).join(".");return a+o}function y(e){for(var r=[],t=0,a=e.length;t<a;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<a){var 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}var b=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},P=function(e,r,t){var a=0;for(e=t?h(e/700):e>>1,e+=h(e/r);e>455;a+=36)e=h(e/35);return h(a+36*e/(e+38))},w=function(e){var r,t=[],a=e.length,o=0,n=128,i=72,s=e.lastIndexOf("-");s<0&&(s=0);for(var l=0;l<s;++l)e.charCodeAt(l)>=128&&v("not-basic"),t.push(e.charCodeAt(l));for(var c=s>0?s+1:0;c<a;){for(var d=o,m=1,p=36;;p+=36){c>=a&&v("invalid-input");var f=(r=e.charCodeAt(c++))-48<10?r-22:r-65<26?r-65:r-97<26?r-97:36;(f>=36||f>h((u-o)/m))&&v("overflow"),o+=f*m;var g=p<=i?1:p>=i+26?26:p-i;if(f<g)break;var y=36-g;m>h(u/y)&&v("overflow"),m*=y}var b=t.length+1;i=P(o-d,b,0==d),h(o/b)>u-n&&v("overflow"),n+=h(o/b),o%=b,t.splice(o++,0,n)}return String.fromCodePoint.apply(String,t)},E=function(e){var r=[],t=(e=y(e)).length,a=128,o=0,n=72,i=!0,s=!1,l=void 0;try{for(var c,d=e[Symbol.iterator]();!(i=(c=d.next()).done);i=!0){var m=c.value;m<128&&r.push(f(m))}}catch(e){s=!0,l=e}finally{try{!i&&d.return&&d.return()}finally{if(s)throw l}}var p=r.length,g=p;for(p&&r.push("-");g<t;){var w=u,E=!0,S=!1,x=void 0;try{for(var F,O=e[Symbol.iterator]();!(E=(F=O.next()).done);E=!0){var _=F.value;_>=a&&_<w&&(w=_)}}catch(e){S=!0,x=e}finally{try{!E&&O.return&&O.return()}finally{if(S)throw x}}var D=g+1;w-a>h((u-o)/D)&&v("overflow"),o+=(w-a)*D,a=w;var k=!0,j=!1,I=void 0;try{for(var A,C=e[Symbol.iterator]();!(k=(A=C.next()).done);k=!0){var R=A.value;if(R<a&&++o>u&&v("overflow"),R==a){for(var $=o,N=36;;N+=36){var L=N<=n?1:N>=n+26?26:N-n;if($<L)break;var T=$-L,z=36-L;r.push(f(b(L+T%z,0))),$=h(T/z)}r.push(f(b($,0))),n=P(o,D,g==p),o=0,++g}}}catch(e){j=!0,I=e}finally{try{!k&&C.return&&C.return()}finally{if(j)throw I}}++o,++a}return r.join("")},S=function(e){return g(e,(function(e){return d.test(e)?"xn--"+E(e):e}))},x=function(e){return g(e,(function(e){return c.test(e)?w(e.slice(4).toLowerCase()):e}))},F={};function O(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function _(e){for(var r="",t=0,a=e.length;t<a;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(a-t>=6){var n=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&n)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(a-t>=9){var i=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function D(e,r){function t(e){var t=_(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,O).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,O).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,O).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,O).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,O).replace(r.PCT_ENCODED,o)),e}function k(e){return e.replace(/^0*(.*)/,"$1")||"0"}function j(e,r){var t=e.match(r.IPV4ADDRESS)||[],a=l(t,2)[1];return a?a.split(".").map(k).join("."):e}function I(e,r){var t=e.match(r.IPV6ADDRESS)||[],a=l(t,3),o=a[1],n=a[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),u=s[0],c=s[1],d=c?c.split(":").map(k):[],m=u.split(":").map(k),p=r.IPV4ADDRESS.test(m[m.length-1]),h=p?7:8,f=m.length-h,v=Array(h),g=0;g<h;++g)v[g]=d[g]||m[f+g]||"";p&&(v[h-1]=j(v[h-1],r));var y=v.reduce((function(e,r,t){if(!r||"0"===r){var a=e[e.length-1];a&&a.index+a.length===t?a.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(y&&y.length>1){var P=v.slice(0,y.index),w=v.slice(y.index+y.length);b=P.join(":")+"::"+w.join(":")}else b=v.join(":");return n&&(b+="%"+n),b}return e}var A=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,C=void 0==="".match(/(){0}/)[1];function R(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},a=!1!==r.iri?s:i;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(A);if(o){C?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=I(j(t.host,a),a)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var n=F[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||n&&n.unicodeSupport)D(t,a);else{if(t.host&&(r.domainHost||n&&n.domainHost))try{t.host=S(t.host.replace(a.PCT_ENCODED,_).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}D(t,i)}n&&n.parse&&n.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function $(e,r){var t=!1!==r.iri?s:i,a=[];return void 0!==e.userinfo&&(a.push(e.userinfo),a.push("@")),void 0!==e.host&&a.push(I(j(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(a.push(":"),a.push(String(e.port))),a.length?a.join(""):void 0}var N=/^\.\.?\//,L=/^\/\.(\/|$)/,T=/^\/\.\.(\/|$)/,z=/^\/?(?:.|\n)*?(?=\/|$)/;function V(e){for(var r=[];e.length;)if(e.match(N))e=e.replace(N,"");else if(e.match(L))e=e.replace(L,"/");else if(e.match(T))e=e.replace(T,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(z);if(!t)throw new Error("Unexpected dot segment condition");var a=t[0];e=e.slice(a.length),r.push(a)}return r.join("")}function q(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?s:i,a=[],o=F[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?x(e.host):S(e.host.replace(t.PCT_ENCODED,_).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}D(e,t),"suffix"!==r.reference&&e.scheme&&(a.push(e.scheme),a.push(":"));var n=$(e,r);if(void 0!==n&&("suffix"!==r.reference&&a.push("//"),a.push(n),e.path&&"/"!==e.path.charAt(0)&&a.push("/")),void 0!==e.path){var l=e.path;r.absolutePath||o&&o.absolutePath||(l=V(l)),void 0===n&&(l=l.replace(/^\/\//,"/%2F")),a.push(l)}return void 0!==e.query&&(a.push("?"),a.push(e.query)),void 0!==e.fragment&&(a.push("#"),a.push(e.fragment)),a.join("")}function M(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],o={};return a||(e=R(q(e,t),t),r=R(q(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=V(r.path||""),o.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=V(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=V(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=V(o.path)),o.query=r.query):(o.path=e.path,void 0!==r.query?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function W(e,r){return e&&e.toString().replace(r&&r.iri?s.PCT_ENCODED:i.PCT_ENCODED,_)}var U={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},Q={scheme:"https",domainHost:U.domainHost,parse:U.parse,serialize:U.serialize};function B(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var H={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=B(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(B(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),a=l(t,2),o=a[0],n=a[1];e.path=o&&"/"!==o?o:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}},K={scheme:"wss",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize},G={},J="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Z="[0-9A-Fa-f]",Y=t(t("%[EFef]"+Z+"%"+Z+Z+"%"+Z+Z)+"|"+t("%[89A-Fa-f]"+Z+"%"+Z+Z)+"|"+t("%"+Z+Z)),X=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),ee=new RegExp(J,"g"),re=new RegExp(Y,"g"),te=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',X),"g"),ae=new RegExp(r("[^]",J,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),oe=ae;function ne(e){var r=_(e);return r.match(ee)?r:e}var ie={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,n={},i=t.query.split("&"),s=0,l=i.length;s<l;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var c=u[1].split(","),d=0,m=c.length;d<m;++d)a.push(c[d]);break;case"subject":t.subject=W(u[1],r);break;case"body":t.body=W(u[1],r);break;default:o=!0,n[W(u[0],r)]=W(u[1],r)}}o&&(t.headers=n)}t.query=void 0;for(var p=0,h=a.length;p<h;++p){var f=a[p].split("@");if(f[0]=W(f[0]),r.unicodeSupport)f[1]=W(f[1],r).toLowerCase();else try{f[1]=S(W(f[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}a[p]=f.join("@")}return t},serialize:function(e,r){var t,a=e,n=null!=(t=e.to)?t instanceof Array?t:"number"!=typeof t.length||t.split||t.setInterval||t.call?[t]:Array.prototype.slice.call(t):[];if(n){for(var i=0,s=n.length;i<s;++i){var l=String(n[i]),u=l.lastIndexOf("@"),c=l.slice(0,u).replace(re,ne).replace(re,o).replace(te,O),d=l.slice(u+1);try{d=r.iri?x(d):S(W(d,r).toLowerCase())}catch(e){a.error=a.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=c+"@"+d}a.path=n.join(",")}var m=e.headers=e.headers||{};e.subject&&(m.subject=e.subject),e.body&&(m.body=e.body);var p=[];for(var h in m)m[h]!==G[h]&&p.push(h.replace(re,ne).replace(re,o).replace(ae,O)+"="+m[h].replace(re,ne).replace(re,o).replace(oe,O));return p.length&&(a.query=p.join("&")),a}},se=/^([^\:]+)\:(.*)/,le={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(se),a=e;if(t){var o=r.scheme||a.scheme||"urn",n=t[1].toLowerCase(),i=t[2],s=o+":"+(r.nid||n),l=F[s];a.nid=n,a.nss=i,a.path=void 0,l&&(a=l.parse(a,r))}else a.error=a.error||"URN can not be parsed.";return a},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",a=e.nid,o=t+":"+(r.nid||a),n=F[o];n&&(e=n.serialize(e,r));var i=e,s=e.nss;return i.path=(a||r.nid)+":"+s,i}},ue=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ce={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match(ue)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};F[U.scheme]=U,F[Q.scheme]=Q,F[H.scheme]=H,F[K.scheme]=K,F[ie.scheme]=ie,F[le.scheme]=le,F[ce.scheme]=ce,e.SCHEMES=F,e.pctEncChar=O,e.pctDecChars=_,e.parse=R,e.removeDotSegments=V,e.serialize=q,e.resolveComponents=M,e.resolve=function(e,r,t){var a=function(e,r){var t=e;if(r)for(var a in r)t[a]=r[a];return t}({scheme:"null"},t);return q(M(R(e,a),R(r,a),a,!0),a)},e.normalize=function(e,r){return"string"==typeof e?e=q(R(e,r),r):"object"===a(e)&&(e=R(q(e,r),r)),e},e.equal=function(e,r,t){return"string"==typeof e?e=q(R(e,t),t):"object"===a(e)&&(e=q(e,t)),"string"==typeof r?r=q(R(r,t),t):"object"===a(r)&&(r=q(r,t)),e===r},e.escapeComponent=function(e,r){return e&&e.toString().replace(r&&r.iri?s.ESCAPE:i.ESCAPE,O)},e.unescapeComponent=W,Object.defineProperty(e,"__esModule",{value:!0})}(r)}));(Y=X)&&Y.__esModule&&Object.prototype.hasOwnProperty.call(Y,"default")&&Y.default;var ee=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 a,o,n;if(Array.isArray(r)){if((a=r.length)!=t.length)return!1;for(o=a;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((a=(n=Object.keys(r)).length)!==Object.keys(t).length)return!1;for(o=a;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,n[o]))return!1;for(o=a;0!=o--;){var i=n[o];if(!e(r[i],t[i]))return!1}return!0}return r!=r&&t!=t},re={copy:function(e,r){for(var t in r=r||{},e)r[t]=e[t];return r},checkDataType:te,checkDataTypes:function(e,r,t){switch(e.length){case 1:return te(e[0],r,t,!0);default:var a="",o=oe(e);for(var n in o.array&&o.object&&(a=o.null?"(":"(!"+r+" || ",a+="typeof "+r+' !== "object")',delete o.null,delete o.array,delete o.object),o.number&&delete o.integer,o)a+=(a?" && ":"")+te(n,r,t,!0);return a}},coerceToTypes:function(e,r){if(Array.isArray(r)){for(var t=[],a=0;a<r.length;a++){var o=r[a];(ae[o]||"array"===e&&"array"===o)&&(t[t.length]=o)}if(t.length)return t}else{if(ae[r])return[r];if("array"===e&&"array"===r)return["array"]}},toHash:oe,getProperty:se,escapeQuotes:le,equal:ee,ucs2length:function(e){for(var r,t=0,a=e.length,o=0;o<a;)t++,(r=e.charCodeAt(o++))>=55296&&r<=56319&&o<a&&56320==(64512&(r=e.charCodeAt(o)))&&o++;return t},varOccurences:function(e,r){r+="[^0-9]";var t=e.match(new RegExp(r,"g"));return t?t.length:0},varReplace:function(e,r,t){return r+="([^0-9])",t=t.replace(/\$/g,"$$$$"),e.replace(new RegExp(r,"g"),t+"$1")},schemaHasRules:function(e,r){if("boolean"==typeof e)return!e;for(var t in e)if(r[t])return!0},schemaHasRulesExcept:function(e,r,t){if("boolean"==typeof e)return!e&&"not"!=t;for(var a in e)if(a!=t&&r[a])return!0},schemaUnknownRules:function(e,r){if("boolean"==typeof e)return;for(var t in e)if(!r[t])return t},toQuotedString:ue,getPathExpr:function(e,r,t,a){return me(e,t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'")},getPath:function(e,r,t){var a=ue(t?"/"+pe(r):se(r));return me(e,a)},getData:function(e,r,t){var a,o,n,i;if(""===e)return"rootData";if("/"==e[0]){if(!ce.test(e))throw new Error("Invalid JSON-pointer: "+e);o=e,n="rootData"}else{if(!(i=e.match(de)))throw new Error("Invalid JSON-pointer: "+e);if(a=+i[1],"#"==(o=i[2])){if(a>=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(n="data"+(r-a||""),!o)return n}for(var s=n,l=o.split("/"),u=0;u<l.length;u++){var c=l[u];c&&(n+=se(he(c)),s+=" && "+n)}return s},unescapeFragment:function(e){return he(decodeURIComponent(e))},unescapeJsonPointer:he,escapeFragment:function(e){return encodeURIComponent(pe(e))},escapeJsonPointer:pe};function te(e,r,t,a){var o=a?" !== ":" === ",n=a?" || ":" && ",i=a?"!":"",s=a?"":"!";switch(e){case"null":return r+o+"null";case"array":return i+"Array.isArray("+r+")";case"object":return"("+i+r+n+"typeof "+r+o+'"object"'+n+s+"Array.isArray("+r+"))";case"integer":return"(typeof "+r+o+'"number"'+n+s+"("+r+" % 1)"+n+r+o+r+(t?n+i+"isFinite("+r+")":"")+")";case"number":return"(typeof "+r+o+'"'+e+'"'+(t?n+i+"isFinite("+r+")":"")+")";default:return"typeof "+r+o+'"'+e+'"'}}var ae=oe(["string","number","integer","boolean","null"]);function oe(e){for(var r={},t=0;t<e.length;t++)r[e[t]]=!0;return r}var ne=/^[a-z$_][a-z$_0-9]*$/i,ie=/'|\\/g;function se(e){return"number"==typeof e?"["+e+"]":ne.test(e)?"."+e:"['"+le(e)+"']"}function le(e){return e.replace(ie,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function ue(e){return"'"+le(e)+"'"}var ce=/^\/(?:[^~]|~0|~1)*$/,de=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function me(e,r){return'""'==e?r:(e+" + "+r).replace(/([^\\])' \+ '/g,"$1")}function pe(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function he(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}var fe=function(e){re.copy(e,this)};var ve=J((function(e){var r=e.exports=function(e,t,a){"function"==typeof t&&(a=t,t={}),function e(t,a,o,n,i,s,l,u,c,d){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var m in a(n,i,s,l,u,c,d),n){var p=n[m];if(Array.isArray(p)){if(m in r.arrayKeywords)for(var h=0;h<p.length;h++)e(t,a,o,p[h],i+"/"+m+"/"+h,s,i,m,n,h)}else if(m in r.propsKeywords){if(p&&"object"==typeof p)for(var f in p)e(t,a,o,p[f],i+"/"+m+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),s,i,m,n,f)}else(m in r.keywords||t.allKeys&&!(m in r.skipKeywords))&&e(t,a,o,p,i+"/"+m,s,i,m,n)}o(n,i,s,l,u,c,d)}}(t,"function"==typeof(a=t.cb||a)?a:a.pre||function(){},a.post||function(){},e,"",e)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}})),ge=ye;function ye(e,r,t){var a=this._refs[t];if("string"==typeof a){if(!this._refs[a])return ye.call(this,e,r,a);a=this._refs[a]}if((a=a||this._schemas[t])instanceof fe)return xe(a.schema,this._opts.inlineRefs)?a.schema:a.validate||this._compile(a);var o,n,i,s=be.call(this,r,t);return s&&(o=s.schema,r=s.root,i=s.baseId),o instanceof fe?n=o.validate||e.call(this,o.schema,r,void 0,i):void 0!==o&&(n=xe(o,this._opts.inlineRefs)?o:e.call(this,o,r,void 0,i)),n}function be(e,r){var t=X.parse(r),a=Oe(t),o=Fe(this._getId(e.schema));if(0===Object.keys(e.schema).length||a!==o){var n=De(a),i=this._refs[n];if("string"==typeof i)return Pe.call(this,e,i,t);if(i instanceof fe)i.validate||this._compile(i),e=i;else{if(!((i=this._schemas[n])instanceof fe))return;if(i.validate||this._compile(i),n==De(r))return{schema:i,root:e,baseId:o};e=i}if(!e.schema)return;o=Fe(this._getId(e.schema))}return Ee.call(this,t,o,e.schema,e)}function Pe(e,r,t){var a=be.call(this,e,r);if(a){var o=a.schema,n=a.baseId;e=a.root;var i=this._getId(o);return i&&(n=ke(n,i)),Ee.call(this,t,n,o,e)}}ye.normalizeId=De,ye.fullPath=Fe,ye.url=ke,ye.ids=function(e){var r=De(this._getId(e)),t={"":r},a={"":Fe(r,!1)},o={},n=this;return ve(e,{allKeys:!0},(function(e,r,i,s,l,u,c){if(""!==r){var d=n._getId(e),m=t[s],p=a[s]+"/"+l;if(void 0!==c&&(p+="/"+("number"==typeof c?c:re.escapeFragment(c))),"string"==typeof d){d=m=De(m?X.resolve(m,d):d);var h=n._refs[d];if("string"==typeof h&&(h=n._refs[h]),h&&h.schema){if(!ee(e,h.schema))throw new Error('id "'+d+'" resolves to more than one schema')}else if(d!=De(p))if("#"==d[0]){if(o[d]&&!ee(e,o[d]))throw new Error('id "'+d+'" resolves to more than one schema');o[d]=e}else n._refs[d]=p}t[r]=m,a[r]=p}})),o},ye.inlineRef=xe,ye.schema=be;var we=re.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function Ee(e,r,t,a){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var o=e.fragment.split("/"),n=1;n<o.length;n++){var i=o[n];if(i){if(void 0===(t=t[i=re.unescapeFragment(i)]))break;var s;if(!we[i]&&((s=this._getId(t))&&(r=ke(r,s)),t.$ref)){var l=ke(r,t.$ref),u=be.call(this,a,l);u&&(t=u.schema,a=u.root,r=u.baseId)}}}return void 0!==t&&t!==a.schema?{schema:t,root:a,baseId:r}:void 0}}var Se=re.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function xe(e,r){return!1!==r&&(void 0===r||!0===r?function e(r){var t;if(Array.isArray(r)){for(var a=0;a<r.length;a++)if("object"==typeof(t=r[a])&&!e(t))return!1}else for(var o in r){if("$ref"==o)return!1;if("object"==typeof(t=r[o])&&!e(t))return!1}return!0}(e):r?function e(r){var t,a=0;if(Array.isArray(r)){for(var o=0;o<r.length;o++)if("object"==typeof(t=r[o])&&(a+=e(t)),a==1/0)return 1/0}else for(var n in r){if("$ref"==n)return 1/0;if(Se[n])a++;else if("object"==typeof(t=r[n])&&(a+=e(t)+1),a==1/0)return 1/0}return a}(e)<=r:void 0)}function Fe(e,r){return!1!==r&&(e=De(e)),Oe(X.parse(e))}function Oe(e){return X.serialize(e).split("#")[0]+"#"}var _e=/#\/?$/;function De(e){return e?e.replace(_e,""):""}function ke(e,r){return r=De(r),X.resolve(e,r)}var je={Validation:Ae((function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:Ae(Ie)};function Ie(e,r,t){this.message=t||Ie.message(e,r),this.missingRef=ge.url(e,r),this.missingSchema=ge.normalizeId(ge.fullPath(this.missingRef))}function Ae(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}Ie.message=function(e,r){return"can't resolve reference "+r+" from id "+e};var Ce=function(e,r){r||(r={}),"function"==typeof r&&(r={cmp:r});var t,a="boolean"==typeof r.cycles&&r.cycles,o=r.cmp&&(t=r.cmp,function(e){return function(r,a){var o={key:r,value:e[r]},n={key:a,value:e[a]};return t(o,n)}}),n=[];return function e(r){if(r&&r.toJSON&&"function"==typeof r.toJSON&&(r=r.toJSON()),void 0!==r){if("number"==typeof r)return isFinite(r)?""+r:"null";if("object"!=typeof r)return JSON.stringify(r);var t,i;if(Array.isArray(r)){for(i="[",t=0;t<r.length;t++)t&&(i+=","),i+=e(r[t])||"null";return i+"]"}if(null===r)return"null";if(-1!==n.indexOf(r)){if(a)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=n.push(r)-1,l=Object.keys(r).sort(o&&o(r));for(i="",t=0;t<l.length;t++){var u=l[t],c=e(r[u]);c&&(i&&(i+=","),i+=JSON.stringify(u)+":"+c)}return n.splice(s,1),"{"+i+"}"}}(e)},Re=function(e,r,t){var a="",o=!0===e.schema.$async,n=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),i=e.self._getId(e.schema);if(e.opts.strictKeywords){var s=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(s){var l="unknown keyword: "+s;if("log"!==e.opts.strictKeywords)throw new Error(l);e.logger.warn(l)}}if(e.isTop&&(a+=" var validate = ",o&&(e.async=!0,a+="async "),a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",i&&(e.opts.sourceCode||e.opts.processCode)&&(a+=" /*# sourceURL="+i+" */ ")),"boolean"==typeof e.schema||!n&&!e.schema.$ref){var u=e.level,c=e.dataLevel,d=e.schema["false schema"],m=e.schemaPath+e.util.getProperty("false schema"),p=e.errSchemaPath+"/false schema",h=!e.opts.allErrors,f="data"+(c||""),v="valid"+u;if(!1===e.schema){e.isTop?h=!0:a+=" var "+v+" = false; ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'boolean schema is false' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";var g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?a+=o?" return data; ":" validate.errors = null; return true; ":a+=" var "+v+" = true; ";return e.isTop&&(a+=" }; return validate; "),a}if(e.isTop){var y=e.isTop;u=e.level=0,c=e.dataLevel=0,f="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var b="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}a+=" var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data; "}else{u=e.level,f="data"+((c=e.dataLevel)||"");if(i&&(e.baseId=e.resolve.url(e.baseId,i)),o&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+u+" = errors;"}v="valid"+u,h=!e.opts.allErrors;var P="",w="",E=e.schema.type,S=Array.isArray(E);if(E&&e.opts.nullable&&!0===e.schema.nullable&&(S?-1==E.indexOf("null")&&(E=E.concat("null")):"null"!=E&&(E=[E,"null"],S=!0)),S&&1==E.length&&(E=E[0],S=!1),e.schema.$ref&&n){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(n=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(a+=" "+e.RULES.all.$comment.code(e,"$comment")),E){if(e.opts.coerceTypes)var x=e.util.coerceToTypes(e.opts.coerceTypes,E);var F=e.RULES.types[E];if(x||S||!0===F||F&&!Z(F)){m=e.schemaPath+".type",p=e.errSchemaPath+"/type",m=e.schemaPath+".type",p=e.errSchemaPath+"/type";var O=S?"checkDataTypes":"checkDataType";if(a+=" if ("+e.util[O](E,f,e.opts.strictNumbers,!0)+") { ",x){var _="dataType"+u,D="coerced"+u;a+=" var "+_+" = typeof "+f+"; var "+D+" = undefined; ","array"==e.opts.coerceTypes&&(a+=" if ("+_+" == 'object' && Array.isArray("+f+") && "+f+".length == 1) { "+f+" = "+f+"[0]; "+_+" = typeof "+f+"; if ("+e.util.checkDataType(e.schema.type,f,e.opts.strictNumbers)+") "+D+" = "+f+"; } "),a+=" if ("+D+" !== undefined) ; ";var k=x;if(k)for(var j,I=-1,A=k.length-1;I<A;)"string"==(j=k[I+=1])?a+=" else if ("+_+" == 'number' || "+_+" == 'boolean') "+D+" = '' + "+f+"; else if ("+f+" === null) "+D+" = ''; ":"number"==j||"integer"==j?(a+=" else if ("+_+" == 'boolean' || "+f+" === null || ("+_+" == 'string' && "+f+" && "+f+" == +"+f+" ","integer"==j&&(a+=" && !("+f+" % 1)"),a+=")) "+D+" = +"+f+"; "):"boolean"==j?a+=" else if ("+f+" === 'false' || "+f+" === 0 || "+f+" === null) "+D+" = false; else if ("+f+" === 'true' || "+f+" === 1) "+D+" = true; ":"null"==j?a+=" else if ("+f+" === '' || "+f+" === 0 || "+f+" === false) "+D+" = null; ":"array"==e.opts.coerceTypes&&"array"==j&&(a+=" else if ("+_+" == 'string' || "+_+" == 'number' || "+_+" == 'boolean' || "+f+" == null) "+D+" = ["+f+"]; ");a+=" else { ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } if ("+D+" !== undefined) { ";var C=c?"data"+(c-1||""):"parentData";a+=" "+f+" = "+D+"; ",c||(a+="if ("+C+" !== undefined)"),a+=" "+C+"["+(c?e.dataPathArr[c]:"parentDataProperty")+"] = "+D+"; } "}else{(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } "}}if(e.schema.$ref&&!n)a+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",h&&(a+=" } if (errors === ",a+=y?"0":"errs_"+u,a+=") { ",w+="}");else{var R=e.RULES;if(R)for(var $=-1,N=R.length-1;$<N;)if(Z(F=R[$+=1])){if(F.type&&(a+=" if ("+e.util.checkDataType(F.type,f,e.opts.strictNumbers)+") { "),e.opts.useDefaults)if("object"==F.type&&e.schema.properties){d=e.schema.properties;var L=Object.keys(d);if(L)for(var T,z=-1,V=L.length-1;z<V;){if(void 0!==(W=d[T=L[z+=1]]).default){var q=f+e.util.getProperty(T);if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+q;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+q+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+q+" === null || "+q+" === '' "),a+=" ) "+q+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(W.default)+" ":a+=" "+JSON.stringify(W.default)+" ",a+="; "}}}else if("array"==F.type&&Array.isArray(e.schema.items)){var M=e.schema.items;if(M){I=-1;for(var W,U=M.length-1;I<U;)if(void 0!==(W=M[I+=1]).default){q=f+"["+I+"]";if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+q;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+q+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+q+" === null || "+q+" === '' "),a+=" ) "+q+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(W.default)+" ":a+=" "+JSON.stringify(W.default)+" ",a+="; "}}}var Q=F.rules;if(Q)for(var B,H=-1,K=Q.length-1;H<K;)if(Y(B=Q[H+=1])){var G=B.code(e,B.keyword,F.type);G&&(a+=" "+G+" ",h&&(P+="}"))}if(h&&(a+=" "+P+" ",P=""),F.type&&(a+=" } ",E&&E===F.type&&!x)){a+=" else { ";var J;m=e.schemaPath+".type",p=e.errSchemaPath+"/type";(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}h&&(a+=" if (errors === ",a+=y?"0":"errs_"+u,a+=") { ",w+="}")}}function Z(e){for(var r=e.rules,t=0;t<r.length;t++)if(Y(r[t]))return!0}function Y(r){return void 0!==e.schema[r.keyword]||r.implements&&function(r){for(var t=r.implements,a=0;a<t.length;a++)if(void 0!==e.schema[t[a]])return!0}(r)}return h&&(a+=" "+w+" "),y?(o?(a+=" if (errors === 0) return data; ",a+=" else throw new ValidationError(vErrors); "):(a+=" validate.errors = vErrors; ",a+=" return errors === 0; "),a+=" }; return validate;"):a+=" var "+v+" = errors === errs_"+u+";",a},$e=re.ucs2length,Ne=je.Validation,Le=function e(r,t,a,o){var n=this,i=this._opts,s=[void 0],l={},u=[],c={},d=[],m={},p=[];t=t||{schema:r,refVal:s,refs:l};var h=Te.call(this,r,t,o),f=this._compilations[h.index];if(h.compiling)return f.callValidate=function e(){var r=f.validate,t=r.apply(this,arguments);return e.errors=r.errors,t};var v=this._formats,g=this.RULES;try{var y=P(r,t,a,o);f.validate=y;var b=f.callValidate;return b&&(b.schema=y.schema,b.errors=null,b.refs=y.refs,b.refVal=y.refVal,b.root=y.root,b.$async=y.$async,i.sourceCode&&(b.source=y.source)),y}finally{ze.call(this,r,t,o)}function P(r,a,o,c){var m=!a||a&&a.schema==r;if(a.schema!=t.schema)return e.call(n,r,a,o,c);var h,f=!0===r.$async,y=Re({isTop:!0,schema:r,isRoot:m,baseId:c,root:a,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:je.MissingRef,RULES:g,validate:Re,util:re,resolve:ge,resolveRef:w,usePattern:x,useDefault:F,useCustomRule:O,opts:i,formats:v,logger:n.logger,self:n});y=Qe(s,We)+Qe(u,qe)+Qe(d,Me)+Qe(p,Ue)+y,i.processCode&&(y=i.processCode(y,r));try{h=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",y)(n,g,v,t,s,d,p,ee,$e,Ne),s[0]=h}catch(e){throw n.logger.error("Error compiling schema, function code:",y),e}return h.schema=r,h.errors=null,h.refs=l,h.refVal=s,h.root=m?h:a,f&&(h.$async=!0),!0===i.sourceCode&&(h.source={code:y,patterns:u,defaults:d}),h}function w(r,o,u){o=ge.url(r,o);var c,d,m=l[o];if(void 0!==m)return S(c=s[m],d="refVal["+m+"]");if(!u&&t.refs){var p=t.refs[o];if(void 0!==p)return S(c=t.refVal[p],d=E(o,c))}d=E(o);var h=ge.call(n,P,t,o);if(void 0===h){var f=a&&a[o];f&&(h=ge.inlineRef(f,i.inlineRefs)?f:e.call(n,f,t,a,r))}if(void 0!==h)return function(e,r){var t=l[e];s[t]=r}(o,h),S(h,d);!function(e){delete l[e]}(o)}function E(e,r){var t=s.length;return s[t]=r,l[e]=t,"refVal"+t}function S(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}function x(e){var r=c[e];return void 0===r&&(r=c[e]=u.length,u[r]=e),"pattern"+r}function F(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return re.toQuotedString(e);case"object":if(null===e)return"null";var r=Ce(e),t=m[r];return void 0===t&&(t=m[r]=d.length,d[t]=e),"default"+t}}function O(e,r,t,a){if(!1!==n._opts.validateSchema){var o=e.definition.dependencies;if(o&&!o.every((function(e){return Object.prototype.hasOwnProperty.call(t,e)})))throw new Error("parent schema must have all required keywords: "+o.join(","));var s=e.definition.validateSchema;if(s)if(!s(r)){var l="keyword schema is invalid: "+n.errorsText(s.errors);if("log"!=n._opts.validateSchema)throw new Error(l);n.logger.error(l)}}var u,c=e.definition.compile,d=e.definition.inline,m=e.definition.macro;if(c)u=c.call(n,r,t,a);else if(m)u=m.call(n,r,t,a),!1!==i.validateSchema&&n.validateSchema(u,!0);else if(d)u=d.call(n,a,e.keyword,r,t);else if(!(u=e.definition.validate))return;if(void 0===u)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var h=p.length;return p[h]=u,{code:"customRule"+h,validate:u}}};function Te(e,r,t){var a=Ve.call(this,e,r,t);return a>=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}function ze(e,r,t){var a=Ve.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}function Ve(e,r,t){for(var a=0;a<this._compilations.length;a++){var o=this._compilations[a];if(o.schema==e&&o.root==r&&o.baseId==t)return a}return-1}function qe(e,r){return"var pattern"+e+" = new RegExp("+re.toQuotedString(r[e])+");"}function Me(e){return"var default"+e+" = defaults["+e+"];"}function We(e,r){return void 0===r[e]?"":"var refVal"+e+" = refVal["+e+"];"}function Ue(e){return"var customRule"+e+" = customRules["+e+"];"}function Qe(e,r){if(!e.length)return"";for(var t="",a=0;a<e.length;a++)t+=r(a,e);return t}var Be=J((function(e){var r=e.exports=function(){this._cache={}};r.prototype.put=function(e,r){this._cache[e]=r},r.prototype.get=function(e){return this._cache[e]},r.prototype.del=function(e){delete this._cache[e]},r.prototype.clear=function(){this._cache={}}})),He=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Ke=[0,31,28,31,30,31,30,31,31,30,31,30,31],Ge=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,Je=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,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,Ye=/^(?:(?:[^\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,Xe=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,er=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,rr=/^(?:\/(?:[^~/]|~0|~1)*)*$/,tr=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,ar=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,or=nr;function nr(e){return e="full"==e?"full":"fast",re.copy(nr[e])}function ir(e){var r=e.match(He);if(!r)return!1;var t=+r[1],a=+r[2],o=+r[3];return a>=1&&a<=12&&o>=1&&o<=(2==a&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(t)?29:Ke[a])}function sr(e,r){var t=e.match(Ge);if(!t)return!1;var a=t[1],o=t[2],n=t[3],i=t[5];return(a<=23&&o<=59&&n<=59||23==a&&59==o&&60==n)&&(!r||i)}nr.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":Ye,url:Xe,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:Je,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:dr,uuid:er,"json-pointer":rr,"json-pointer-uri-fragment":tr,"relative-json-pointer":ar},nr.full={date:ir,time:sr,"date-time":function(e){var r=e.split(lr);return 2==r.length&&ir(r[0])&&sr(r[1],!0)},uri:function(e){return ur.test(e)&&Ze.test(e)},"uri-reference":/^(?:[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,"uri-template":Ye,url:Xe,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:Je,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:dr,uuid:er,"json-pointer":rr,"json-pointer-uri-fragment":tr,"relative-json-pointer":ar};var lr=/t|\s/i;var ur=/\/|:/;var cr=/[^\\]\\Z/;function dr(e){if(cr.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var mr=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s;var p="maximum"==r,h=p?"exclusiveMaximum":"exclusiveMinimum",f=e.schema[h],v=e.opts.$data&&f&&f.$data,g=p?"<":">",y=p?">":"<",b=void 0;if(!m&&"number"!=typeof s&&void 0!==s)throw new Error(r+" must be number");if(!v&&void 0!==f&&"number"!=typeof f&&"boolean"!=typeof f)throw new Error(h+" must be number or boolean");if(v){var P=e.util.getData(f.$data,i,e.dataPathArr),w="exclusive"+n,E="exclType"+n,S="exclIsNumber"+n,x="' + "+(_="op"+n)+" + '";o+=" var schemaExcl"+n+" = "+P+"; ",o+=" var "+w+"; var "+E+" = typeof "+(P="schemaExcl"+n)+"; if ("+E+" != 'boolean' && "+E+" != 'undefined' && "+E+" != 'number') { ";var F;b=h;(F=F||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(o+=" , message: '"+h+" should be boolean' "),e.opts.verbose&&(o+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var O=o;o=F.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+E+" == 'number' ? ( ("+w+" = "+a+" === undefined || "+P+" "+g+"= "+a+") ? "+d+" "+y+"= "+P+" : "+d+" "+y+" "+a+" ) : ( ("+w+" = "+P+" === true) ? "+d+" "+y+"= "+a+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { var op"+n+" = "+w+" ? '"+g+"' : '"+g+"='; ",void 0===s&&(b=h,u=e.errSchemaPath+"/"+h,a=P,m=v)}else{x=g;if((S="number"==typeof f)&&m){var _="'"+x+"'";o+=" if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" ( "+a+" === undefined || "+f+" "+g+"= "+a+" ? "+d+" "+y+"= "+f+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { "}else{S&&void 0===s?(w=!0,b=h,u=e.errSchemaPath+"/"+h,a=f,y+="="):(S&&(a=Math[p?"min":"max"](f,s)),f===(!S||a)?(w=!0,b=h,u=e.errSchemaPath+"/"+h,y+="="):(w=!1,x+="="));_="'"+x+"'";o+=" if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+" "+y+" "+a+" || "+d+" !== "+d+") { "}}b=b||r,(F=F||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+_+", limit: "+a+", exclusive: "+w+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be "+x+" ",o+=m?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";O=o;return o=F.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",c&&(o+=" else { "),o},pr=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+".length "+("maxItems"==r?">":"<")+" "+a+") { ";var p=r,h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxItems"==r?"more":"fewer",o+=" than ",o+=m?"' + "+a+" + '":""+s,o+=" items' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=h.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},hr=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");var p="maxLength"==r?">":"<";o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),!1===e.opts.unicode?o+=" "+d+".length ":o+=" ucs2length("+d+") ",o+=" "+p+" "+a+") { ";var h=r,f=f||[];f.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(h||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT be ",o+="maxLength"==r?"longer":"shorter",o+=" than ",o+=m?"' + "+a+" + '":""+s,o+=" characters' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var v=o;return o=f.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+v+"]); ":o+=" validate.errors = ["+v+"]; return false; ":o+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},fr=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" Object.keys("+d+").length "+("maxProperties"==r?">":"<")+" "+a+") { ";var p=r,h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxProperties"==r?"more":"fewer",o+=" than ",o+=m?"' + "+a+" + '":""+s,o+=" properties' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=h.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},vr={$ref:function(e,r,t){var a,o,n=" ",i=e.level,s=e.dataLevel,l=e.schema[r],u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(s||""),m="valid"+i;if("#"==l||"#/"==l)e.isRoot?(a=e.async,o="validate"):(a=!0===e.root.schema.$async,o="root.refVal[0]");else{var p=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===p){var h=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(h),(y=y||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(n+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(n+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ";var f=n;n=y.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+f+"]); ":n+=" validate.errors = ["+f+"]; return false; ":n+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(n+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,l,h);e.logger.warn(h),c&&(n+=" if (true) { ")}}else if(p.inline){var v=e.util.copy(e);v.level++;var g="valid"+v.level;v.schema=p.schema,v.schemaPath="",v.errSchemaPath=l,n+=" "+e.validate(v).replace(/validate\.schema/g,p.code)+" ",c&&(n+=" if ("+g+") { ")}else a=!0===p.$async||e.async&&!1!==p.$async,o=p.code}if(o){var y;(y=y||[]).push(n),n="",e.opts.passContext?n+=" "+o+".call(this, ":n+=" "+o+"( ",n+=" "+d+", (dataPath || '')",'""'!=e.errorPath&&(n+=" + "+e.errorPath);var b=n+=" , "+(s?"data"+(s-1||""):"parentData")+" , "+(s?e.dataPathArr[s]:"parentDataProperty")+", rootData) ";if(n=y.pop(),a){if(!e.async)throw new Error("async schema referenced by sync schema");c&&(n+=" var "+m+"; "),n+=" try { await "+b+"; ",c&&(n+=" "+m+" = true; "),n+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",c&&(n+=" "+m+" = false; "),n+=" } ",c&&(n+=" if ("+m+") { ")}else n+=" if (!"+b+") { if (vErrors === null) vErrors = "+o+".errors; else vErrors = vErrors.concat("+o+".errors); errors = vErrors.length; } ",c&&(n+=" else { ")}return n},allOf:function(e,r,t){var a=" ",o=e.schema[r],n=e.schemaPath+e.util.getProperty(r),i=e.errSchemaPath+"/"+r,s=!e.opts.allErrors,l=e.util.copy(e),u="";l.level++;var c="valid"+l.level,d=l.baseId,m=!0,p=o;if(p)for(var h,f=-1,v=p.length-1;f<v;)h=p[f+=1],(e.opts.strictKeywords?"object"==typeof h&&Object.keys(h).length>0||!1===h:e.util.schemaHasRules(h,e.RULES.all))&&(m=!1,l.schema=h,l.schemaPath=n+"["+f+"]",l.errSchemaPath=i+"/"+f,a+=" "+e.validate(l)+" ",l.baseId=d,s&&(a+=" if ("+c+") { ",u+="}"));return s&&(a+=m?" if (true) { ":" "+u.slice(0,-1)+" "),a},anyOf:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e),h="";p.level++;var f="valid"+p.level;if(i.every((function(r){return e.opts.strictKeywords?"object"==typeof r&&Object.keys(r).length>0||!1===r:e.util.schemaHasRules(r,e.RULES.all)}))){var v=p.baseId;a+=" var "+m+" = errors; var "+d+" = false; ";var g=e.compositeRule;e.compositeRule=p.compositeRule=!0;var y=i;if(y)for(var b,P=-1,w=y.length-1;P<w;)b=y[P+=1],p.schema=b,p.schemaPath=s+"["+P+"]",p.errSchemaPath=l+"/"+P,a+=" "+e.validate(p)+" ",p.baseId=v,a+=" "+d+" = "+d+" || "+f+"; if (!"+d+") { ",h+="}";e.compositeRule=p.compositeRule=g,a+=" "+h+" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } else { errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else u&&(a+=" if (true) { ");return a},$comment:function(e,r,t){var a=" ",o=e.schema[r],n=e.errSchemaPath+"/"+r;e.opts.allErrors;var i=e.util.toQuotedString(o);return!0===e.opts.$comment?a+=" console.log("+i+");":"function"==typeof e.opts.$comment&&(a+=" self._opts.$comment("+i+", "+e.util.toQuotedString(n)+", validate.root.schema);"),a},const:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m=e.opts.$data&&i&&i.$data;m&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; "),m||(a+=" var schema"+o+" = validate.schema"+s+";"),a+="var "+d+" = equal("+c+", schema"+o+"); if (!"+d+") { ";var p=p||[];p.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValue: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var h=a;return a=p.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+h+"]); ":a+=" validate.errors = ["+h+"]; return false; ":a+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",u&&(a+=" else { "),a},contains:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level,f="i"+o,v=p.dataLevel=e.dataLevel+1,g="data"+v,y=e.baseId,b=e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all);if(a+="var "+m+" = errors;var "+d+";",b){var P=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=i,p.schemaPath=s,p.errSchemaPath=l,a+=" var "+h+" = false; for (var "+f+" = 0; "+f+" < "+c+".length; "+f+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers,!0);var w=c+"["+f+"]";p.dataPathArr[v]=f;var E=e.validate(p);p.baseId=y,e.util.varOccurences(E,g)<2?a+=" "+e.util.varReplace(E,g,w)+" ":a+=" var "+g+" = "+w+"; "+E+" ",a+=" if ("+h+") break; } ",e.compositeRule=p.compositeRule=P,a+=" if (!"+h+") {"}else a+=" if ("+c+".length == 0) {";var S=S||[];S.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should contain a valid item' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var x=a;return a=S.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",b&&(a+=" errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a},dependencies:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="errs__"+o,m=e.util.copy(e),p="";m.level++;var h="valid"+m.level,f={},v={},g=e.opts.ownProperties;for(w in i)if("__proto__"!=w){var y=i[w],b=Array.isArray(y)?v:f;b[w]=y}a+="var "+d+" = errors;";var P=e.errorPath;for(var w in a+="var missing"+o+";",v)if((b=v[w]).length){if(a+=" if ( "+c+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(w)+"') "),u){a+=" && ( ";var E=b;if(E)for(var S=-1,x=E.length-1;S<x;){j=E[S+=1],S&&(a+=" || "),a+=" ( ( "+(R=c+(C=e.util.getProperty(j)))+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(j)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?j:C)+") ) "}a+=")) { ";var F="missing"+o,O="' + "+F+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,F,!0):P+" + "+F);var _=_||[];_.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var D=a;a=_.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+D+"]); ":a+=" validate.errors = ["+D+"]; return false; ":a+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{a+=" ) { ";var k=b;if(k)for(var j,I=-1,A=k.length-1;I<A;){j=k[I+=1];var C=e.util.getProperty(j),R=(O=e.util.escapeQuotes(j),c+C);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,j,e.opts.jsonPointers)),a+=" if ( "+R+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(j)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",u&&(p+="}",a+=" else { ")}e.errorPath=P;var $=m.baseId;for(var w in f){y=f[w];(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all))&&(a+=" "+h+" = true; if ( "+c+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(w)+"') "),a+=") { ",m.schema=y,m.schemaPath=s+e.util.getProperty(w),m.errSchemaPath=l+"/"+e.util.escapeFragment(w),a+=" "+e.validate(m)+" ",m.baseId=$,a+=" } ",u&&(a+=" if ("+h+") { ",p+="}"))}return u&&(a+=" "+p+" if ("+d+" == errors) {"),a},enum:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m=e.opts.$data&&i&&i.$data;m&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ");var p="i"+o,h="schema"+o;m||(a+=" var "+h+" = validate.schema"+s+";"),a+="var "+d+";",m&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=d+" = false;for (var "+p+"=0; "+p+"<"+h+".length; "+p+"++) if (equal("+c+", "+h+"["+p+"])) { "+d+" = true; break; }",m&&(a+=" } "),a+=" if (!"+d+") { ";var f=f||[];f.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var v=a;return a=f.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+v+"]); ":a+=" validate.errors = ["+v+"]; return false; ":a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",u&&(a+=" else { "),a},format:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||"");if(!1===e.opts.format)return u&&(a+=" if (true) { "),a;var d,m=e.opts.$data&&i&&i.$data;m?(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ",d="schema"+o):d=i;var p=e.opts.unknownFormats,h=Array.isArray(p);if(m){a+=" var "+(f="format"+o)+" = formats["+d+"]; var "+(v="isObject"+o)+" = typeof "+f+" == 'object' && !("+f+" instanceof RegExp) && "+f+".validate; var "+(g="formatType"+o)+" = "+v+" && "+f+".type || 'string'; if ("+v+") { ",e.async&&(a+=" var async"+o+" = "+f+".async; "),a+=" "+f+" = "+f+".validate; } if ( ",m&&(a+=" ("+d+" !== undefined && typeof "+d+" != 'string') || "),a+=" (","ignore"!=p&&(a+=" ("+d+" && !"+f+" ",h&&(a+=" && self._opts.unknownFormats.indexOf("+d+") == -1 "),a+=") || "),a+=" ("+f+" && "+g+" == '"+t+"' && !(typeof "+f+" == 'function' ? ",e.async?a+=" (async"+o+" ? await "+f+"("+c+") : "+f+"("+c+")) ":a+=" "+f+"("+c+") ",a+=" : "+f+".test("+c+"))))) {"}else{var f;if(!(f=e.formats[i])){if("ignore"==p)return e.logger.warn('unknown format "'+i+'" ignored in schema at path "'+e.errSchemaPath+'"'),u&&(a+=" if (true) { "),a;if(h&&p.indexOf(i)>=0)return u&&(a+=" if (true) { "),a;throw new Error('unknown format "'+i+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,g=(v="object"==typeof f&&!(f instanceof RegExp)&&f.validate)&&f.type||"string";if(v){var y=!0===f.async;f=f.validate}if(g!=t)return u&&(a+=" if (true) { "),a;if(y){if(!e.async)throw new Error("async format in sync schema");a+=" if (!(await "+(b="formats"+e.util.getProperty(i)+".validate")+"("+c+"))) { "}else{a+=" if (! ";var b="formats"+e.util.getProperty(i);v&&(b+=".validate"),a+="function"==typeof f?" "+b+"("+c+") ":" "+b+".test("+c+") ",a+=") { "}}var P=P||[];P.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",a+=m?""+d:""+e.util.toQuotedString(i),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",a+=m?"' + "+d+" + '":""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=m?"validate.schema"+s:""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var w=a;return a=P.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",u&&(a+=" else { "),a},if:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level,f=e.schema.then,v=e.schema.else,g=void 0!==f&&(e.opts.strictKeywords?"object"==typeof f&&Object.keys(f).length>0||!1===f:e.util.schemaHasRules(f,e.RULES.all)),y=void 0!==v&&(e.opts.strictKeywords?"object"==typeof v&&Object.keys(v).length>0||!1===v:e.util.schemaHasRules(v,e.RULES.all)),b=p.baseId;if(g||y){var P;p.createErrors=!1,p.schema=i,p.schemaPath=s,p.errSchemaPath=l,a+=" var "+m+" = errors; var "+d+" = true; ";var w=e.compositeRule;e.compositeRule=p.compositeRule=!0,a+=" "+e.validate(p)+" ",p.baseId=b,p.createErrors=!0,a+=" errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } ",e.compositeRule=p.compositeRule=w,g?(a+=" if ("+h+") { ",p.schema=e.schema.then,p.schemaPath=e.schemaPath+".then",p.errSchemaPath=e.errSchemaPath+"/then",a+=" "+e.validate(p)+" ",p.baseId=b,a+=" "+d+" = "+h+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'then'; ":P="'then'",a+=" } ",y&&(a+=" else { ")):a+=" if (!"+h+") { ",y&&(p.schema=e.schema.else,p.schemaPath=e.schemaPath+".else",p.errSchemaPath=e.errSchemaPath+"/else",a+=" "+e.validate(p)+" ",p.baseId=b,a+=" "+d+" = "+h+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'else'; ":P="'else'",a+=" } "),a+=" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+P+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match \"' + "+P+" + '\" schema' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",u&&(a+=" else { ")}else u&&(a+=" if (true) { ");return a},items:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e),h="";p.level++;var f="valid"+p.level,v="i"+o,g=p.dataLevel=e.dataLevel+1,y="data"+g,b=e.baseId;if(a+="var "+m+" = errors;var "+d+";",Array.isArray(i)){var P=e.schema.additionalItems;if(!1===P){a+=" "+d+" = "+c+".length <= "+i.length+"; ";var w=l;l=e.errSchemaPath+"/additionalItems",a+=" if (!"+d+") { ";var E=E||[];E.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+i.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+i.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var S=a;a=E.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",l=w,u&&(h+="}",a+=" else { ")}var x=i;if(x)for(var F,O=-1,_=x.length-1;O<_;)if(F=x[O+=1],e.opts.strictKeywords?"object"==typeof F&&Object.keys(F).length>0||!1===F:e.util.schemaHasRules(F,e.RULES.all)){a+=" "+f+" = true; if ("+c+".length > "+O+") { ";var D=c+"["+O+"]";p.schema=F,p.schemaPath=s+"["+O+"]",p.errSchemaPath=l+"/"+O,p.errorPath=e.util.getPathExpr(e.errorPath,O,e.opts.jsonPointers,!0),p.dataPathArr[g]=O;var k=e.validate(p);p.baseId=b,e.util.varOccurences(k,y)<2?a+=" "+e.util.varReplace(k,y,D)+" ":a+=" var "+y+" = "+D+"; "+k+" ",a+=" } ",u&&(a+=" if ("+f+") { ",h+="}")}if("object"==typeof P&&(e.opts.strictKeywords?"object"==typeof P&&Object.keys(P).length>0||!1===P:e.util.schemaHasRules(P,e.RULES.all))){p.schema=P,p.schemaPath=e.schemaPath+".additionalItems",p.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+f+" = true; if ("+c+".length > "+i.length+") { for (var "+v+" = "+i.length+"; "+v+" < "+c+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=c+"["+v+"]";p.dataPathArr[g]=v;k=e.validate(p);p.baseId=b,e.util.varOccurences(k,y)<2?a+=" "+e.util.varReplace(k,y,D)+" ":a+=" var "+y+" = "+D+"; "+k+" ",u&&(a+=" if (!"+f+") break; "),a+=" } } ",u&&(a+=" if ("+f+") { ",h+="}")}}else if(e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){p.schema=i,p.schemaPath=s,p.errSchemaPath=l,a+=" for (var "+v+" = 0; "+v+" < "+c+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=c+"["+v+"]";p.dataPathArr[g]=v;k=e.validate(p);p.baseId=b,e.util.varOccurences(k,y)<2?a+=" "+e.util.varReplace(k,y,D)+" ":a+=" var "+y+" = "+D+"; "+k+" ",u&&(a+=" if (!"+f+") break; "),a+=" }"}return u&&(a+=" "+h+" if ("+m+" == errors) {"),a},maximum:mr,minimum:mr,maxItems:pr,minItems:pr,maxLength:hr,minLength:hr,maxProperties:fr,minProperties:fr,multipleOf:function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");o+="var division"+n+";if (",m&&(o+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),o+=" (division"+n+" = "+d+" / "+a+", ",e.opts.multipleOfPrecision?o+=" Math.abs(Math.round(division"+n+") - division"+n+") > 1e-"+e.opts.multipleOfPrecision+" ":o+=" division"+n+" !== parseInt(division"+n+") ",o+=" ) ",m&&(o+=" ) "),o+=" ) { ";var p=p||[];p.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be multiple of ",o+=m?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var h=o;return o=p.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+h+"]); ":o+=" validate.errors = ["+h+"]; return false; ":o+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},not:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="errs__"+o,m=e.util.copy(e);m.level++;var p="valid"+m.level;if(e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){m.schema=i,m.schemaPath=s,m.errSchemaPath=l,a+=" var "+d+" = errors; ";var h,f=e.compositeRule;e.compositeRule=m.compositeRule=!0,m.createErrors=!1,m.opts.allErrors&&(h=m.opts.allErrors,m.opts.allErrors=!1),a+=" "+e.validate(m)+" ",m.createErrors=!0,h&&(m.opts.allErrors=h),e.compositeRule=m.compositeRule=f,a+=" if ("+p+") { ";var v=v||[];v.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var g=a;a=v.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(a+=" if (false) { ");return a},oneOf:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e),h="";p.level++;var f="valid"+p.level,v=p.baseId,g="prevValid"+o,y="passingSchemas"+o;a+="var "+m+" = errors , "+g+" = false , "+d+" = false , "+y+" = null; ";var b=e.compositeRule;e.compositeRule=p.compositeRule=!0;var P=i;if(P)for(var w,E=-1,S=P.length-1;E<S;)w=P[E+=1],(e.opts.strictKeywords?"object"==typeof w&&Object.keys(w).length>0||!1===w:e.util.schemaHasRules(w,e.RULES.all))?(p.schema=w,p.schemaPath=s+"["+E+"]",p.errSchemaPath=l+"/"+E,a+=" "+e.validate(p)+" ",p.baseId=v):a+=" var "+f+" = true; ",E&&(a+=" if ("+f+" && "+g+") { "+d+" = false; "+y+" = ["+y+", "+E+"]; } else { ",h+="}"),a+=" if ("+f+") { "+d+" = "+g+" = true; "+y+" = "+E+"; }";return e.compositeRule=p.compositeRule=b,a+=h+"if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a},pattern:function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'string') || "),o+=" !"+(m?"(new RegExp("+a+"))":e.usePattern(s))+".test("+d+") ) { ";var p=p||[];p.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { pattern: ",o+=m?""+a:""+e.util.toQuotedString(s),o+=" } ",!1!==e.opts.messages&&(o+=" , message: 'should match pattern \"",o+=m?"' + "+a+" + '":""+e.util.escapeQuotes(s),o+="\"' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+e.util.toQuotedString(s),o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var h=o;return o=p.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+h+"]); ":o+=" validate.errors = ["+h+"]; return false; ":o+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},properties:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="errs__"+o,m=e.util.copy(e),p="";m.level++;var h="valid"+m.level,f="key"+o,v="idx"+o,g=m.dataLevel=e.dataLevel+1,y="data"+g,b="dataProperties"+o,P=Object.keys(i||{}).filter(C),w=e.schema.patternProperties||{},E=Object.keys(w).filter(C),S=e.schema.additionalProperties,x=P.length||E.length,F=!1===S,O="object"==typeof S&&Object.keys(S).length,_=e.opts.removeAdditional,D=F||O||_,k=e.opts.ownProperties,j=e.baseId,I=e.schema.required;if(I&&(!e.opts.$data||!I.$data)&&I.length<e.opts.loopRequired)var A=e.util.toHash(I);function C(e){return"__proto__"!==e}if(a+="var "+d+" = errors;var "+h+" = true;",k&&(a+=" var "+b+" = undefined;"),D){if(a+=k?" "+b+" = "+b+" || Object.keys("+c+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+c+") { ",x){if(a+=" var isAdditional"+o+" = !(false ",P.length)if(P.length>8)a+=" || validate.schema"+s+".hasOwnProperty("+f+") ";else{var R=P;if(R)for(var $=-1,N=R.length-1;$<N;)G=R[$+=1],a+=" || "+f+" == "+e.util.toQuotedString(G)+" "}if(E.length){var L=E;if(L)for(var T=-1,z=L.length-1;T<z;)ne=L[T+=1],a+=" || "+e.usePattern(ne)+".test("+f+") "}a+=" ); if (isAdditional"+o+") { "}if("all"==_)a+=" delete "+c+"["+f+"]; ";else{var V=e.errorPath,q="' + "+f+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers)),F)if(_)a+=" delete "+c+"["+f+"]; ";else{a+=" "+h+" = false; ";var M=l;l=e.errSchemaPath+"/additionalProperties",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { additionalProperty: '"+q+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is an invalid additional property":a+="should NOT have additional properties",a+="' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var W=a;a=te.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+W+"]); ":a+=" validate.errors = ["+W+"]; return false; ":a+=" var err = "+W+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=M,u&&(a+=" break; ")}else if(O)if("failing"==_){a+=" var "+d+" = errors; ";var U=e.compositeRule;e.compositeRule=m.compositeRule=!0,m.schema=S,m.schemaPath=e.schemaPath+".additionalProperties",m.errSchemaPath=e.errSchemaPath+"/additionalProperties",m.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);var Q=c+"["+f+"]";m.dataPathArr[g]=f;var B=e.validate(m);m.baseId=j,e.util.varOccurences(B,y)<2?a+=" "+e.util.varReplace(B,y,Q)+" ":a+=" var "+y+" = "+Q+"; "+B+" ",a+=" if (!"+h+") { errors = "+d+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+c+"["+f+"]; } ",e.compositeRule=m.compositeRule=U}else{m.schema=S,m.schemaPath=e.schemaPath+".additionalProperties",m.errSchemaPath=e.errSchemaPath+"/additionalProperties",m.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);Q=c+"["+f+"]";m.dataPathArr[g]=f;B=e.validate(m);m.baseId=j,e.util.varOccurences(B,y)<2?a+=" "+e.util.varReplace(B,y,Q)+" ":a+=" var "+y+" = "+Q+"; "+B+" ",u&&(a+=" if (!"+h+") break; ")}e.errorPath=V}x&&(a+=" } "),a+=" } ",u&&(a+=" if ("+h+") { ",p+="}")}var H=e.opts.useDefaults&&!e.compositeRule;if(P.length){var K=P;if(K)for(var G,J=-1,Z=K.length-1;J<Z;){var Y=i[G=K[J+=1]];if(e.opts.strictKeywords?"object"==typeof Y&&Object.keys(Y).length>0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all)){var X=e.util.getProperty(G),ee=(Q=c+X,H&&void 0!==Y.default);m.schema=Y,m.schemaPath=s+X,m.errSchemaPath=l+"/"+e.util.escapeFragment(G),m.errorPath=e.util.getPath(e.errorPath,G,e.opts.jsonPointers),m.dataPathArr[g]=e.util.toQuotedString(G);B=e.validate(m);if(m.baseId=j,e.util.varOccurences(B,y)<2){B=e.util.varReplace(B,y,Q);var re=Q}else{re=y;a+=" var "+y+" = "+Q+"; "}if(ee)a+=" "+B+" ";else{if(A&&A[G]){a+=" if ( "+re+" === undefined ",k&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+h+" = false; ";V=e.errorPath,M=l;var te,ae=e.util.escapeQuotes(G);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(V,G,e.opts.jsonPointers)),l=e.errSchemaPath+"/required",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+ae+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+ae+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";W=a;a=te.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+W+"]); ":a+=" validate.errors = ["+W+"]; return false; ":a+=" var err = "+W+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=M,e.errorPath=V,a+=" } else { "}else u?(a+=" if ( "+re+" === undefined ",k&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+h+" = true; } else { "):(a+=" if ("+re+" !== undefined ",k&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(G)+"') "),a+=" ) { ");a+=" "+B+" } "}}u&&(a+=" if ("+h+") { ",p+="}")}}if(E.length){var oe=E;if(oe)for(var ne,ie=-1,se=oe.length-1;ie<se;){Y=w[ne=oe[ie+=1]];if(e.opts.strictKeywords?"object"==typeof Y&&Object.keys(Y).length>0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all)){m.schema=Y,m.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(ne),m.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(ne),a+=k?" "+b+" = "+b+" || Object.keys("+c+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+c+") { ",a+=" if ("+e.usePattern(ne)+".test("+f+")) { ",m.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);Q=c+"["+f+"]";m.dataPathArr[g]=f;B=e.validate(m);m.baseId=j,e.util.varOccurences(B,y)<2?a+=" "+e.util.varReplace(B,y,Q)+" ":a+=" var "+y+" = "+Q+"; "+B+" ",u&&(a+=" if (!"+h+") break; "),a+=" } ",u&&(a+=" else "+h+" = true; "),a+=" } ",u&&(a+=" if ("+h+") { ",p+="}")}}}return u&&(a+=" "+p+" if ("+d+" == errors) {"),a},propertyNames:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="errs__"+o,m=e.util.copy(e);m.level++;var p="valid"+m.level;if(a+="var "+d+" = errors;",e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){m.schema=i,m.schemaPath=s,m.errSchemaPath=l;var h="key"+o,f="idx"+o,v="i"+o,g="' + "+h+" + '",y="data"+(m.dataLevel=e.dataLevel+1),b="dataProperties"+o,P=e.opts.ownProperties,w=e.baseId;P&&(a+=" var "+b+" = undefined; "),a+=P?" "+b+" = "+b+" || Object.keys("+c+"); for (var "+f+"=0; "+f+"<"+b+".length; "+f+"++) { var "+h+" = "+b+"["+f+"]; ":" for (var "+h+" in "+c+") { ",a+=" var startErrs"+o+" = errors; ";var E=h,S=e.compositeRule;e.compositeRule=m.compositeRule=!0;var x=e.validate(m);m.baseId=w,e.util.varOccurences(x,y)<2?a+=" "+e.util.varReplace(x,y,E)+" ":a+=" var "+y+" = "+E+"; "+x+" ",e.compositeRule=m.compositeRule=S,a+=" if (!"+p+") { for (var "+v+"=startErrs"+o+"; "+v+"<errors; "+v+"++) { vErrors["+v+"].propertyName = "+h+"; } var err = ",!1!==e.createErrors?(a+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { propertyName: '"+g+"' } ",!1!==e.opts.messages&&(a+=" , message: 'property name \\'"+g+"\\' is invalid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),u&&(a+=" break; "),a+=" } }"}return u&&(a+=" if ("+d+" == errors) {"),a},required:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m=e.opts.$data&&i&&i.$data;m&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ");var p="schema"+o;if(!m)if(i.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var h=[],f=i;if(f)for(var v,g=-1,y=f.length-1;g<y;){v=f[g+=1];var b=e.schema.properties[v];b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0||!1===b:e.util.schemaHasRules(b,e.RULES.all))||(h[h.length]=v)}}else h=i;if(m||h.length){var P=e.errorPath,w=m||h.length>=e.opts.loopRequired,E=e.opts.ownProperties;if(u)if(a+=" var missing"+o+"; ",w){m||(a+=" var "+p+" = validate.schema"+s+"; ");var S="' + "+(k="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,k,e.opts.jsonPointers)),a+=" var "+d+" = true; ",m&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=" for (var "+O+" = 0; "+O+" < "+p+".length; "+O+"++) { "+d+" = "+c+"["+p+"["+O+"]] !== undefined ",E&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", "+p+"["+O+"]) "),a+="; if (!"+d+") break; } ",m&&(a+=" } "),a+=" if (!"+d+") { ",(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var x=a;a=D.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var F=h;if(F)for(var O=-1,_=F.length-1;O<_;){I=F[O+=1],O&&(a+=" || "),a+=" ( ( "+($=c+(R=e.util.getProperty(I)))+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(I)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?I:R)+") ) "}a+=") { ";var D;S="' + "+(k="missing"+o)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,k,!0):P+" + "+k),(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";x=a;a=D.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(w){m||(a+=" var "+p+" = validate.schema"+s+"; ");var k;S="' + "+(k="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,k,e.opts.jsonPointers)),m&&(a+=" if ("+p+" && !Array.isArray("+p+")) { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+p+" !== undefined) { "),a+=" for (var "+O+" = 0; "+O+" < "+p+".length; "+O+"++) { if ("+c+"["+p+"["+O+"]] === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", "+p+"["+O+"]) "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",m&&(a+=" } ")}else{var j=h;if(j)for(var I,A=-1,C=j.length-1;A<C;){I=j[A+=1];var R=e.util.getProperty(I),$=(S=e.util.escapeQuotes(I),c+R);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,I,e.opts.jsonPointers)),a+=" if ( "+$+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(I)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=P}else u&&(a+=" if (true) {");return a},uniqueItems:function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m="valid"+n,p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,(s||p)&&!1!==e.opts.uniqueItems){p&&(o+=" var "+m+"; if ("+a+" === false || "+a+" === undefined) "+m+" = true; else if (typeof "+a+" != 'boolean') "+m+" = false; else { "),o+=" var i = "+d+".length , "+m+" = true , j; if (i > 1) { ";var h=e.schema.items&&e.schema.items.type,f=Array.isArray(h);if(!h||"object"==h||"array"==h||f&&(h.indexOf("object")>=0||h.indexOf("array")>=0))o+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+d+"[i], "+d+"[j])) { "+m+" = false; break outer; } } } ";else{o+=" var itemIndices = {}, item; for (;i--;) { var item = "+d+"[i]; ";var v="checkDataType"+(f?"s":"");o+=" if ("+e.util[v](h,"item",e.opts.strictNumbers,!0)+") continue; ",f&&(o+=" if (typeof item == 'string') item = '\"' + item; "),o+=" if (typeof itemIndices[item] == 'number') { "+m+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}o+=" } ",p&&(o+=" } "),o+=" if (!"+m+") { ";var g=g||[];g.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var y=o;o=g.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+y+"]); ":o+=" validate.errors = ["+y+"]; return false; ":o+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",c&&(o+=" else { ")}else c&&(o+=" if (true) { ");return o},validate:Re},gr=re.toHash,yr=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"],br=function(e,r){for(var t=0;t<r.length;t++){e=JSON.parse(JSON.stringify(e));var a,o=r[t].split("/"),n=e;for(a=1;a<o.length;a++)n=n[o[a]];for(a=0;a<yr.length;a++){var i=yr[a],s=n[i];s&&(n[i]={anyOf:[s,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e},Pr=je.MissingRef,wr=function e(r,t,a){var o=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof t&&(a=t,t=void 0);var n=i(r).then((function(){var e=o._addSchema(r,void 0,t);return e.validate||function e(r){try{return o._compile(r)}catch(e){if(e instanceof Pr)return a(e);throw e}function a(a){var n=a.missingSchema;if(u(n))throw new Error("Schema "+n+" is loaded but "+a.missingRef+" cannot be resolved");var s=o._loadingSchemas[n];return s||(s=o._loadingSchemas[n]=o._opts.loadSchema(n)).then(l,l),s.then((function(e){if(!u(n))return i(e).then((function(){u(n)||o.addSchema(e,n,void 0,t)}))})).then((function(){return e(r)}));function l(){delete o._loadingSchemas[n]}function u(e){return o._refs[e]||o._schemas[e]}}}(e)}));a&&n.then((function(e){a(null,e)}),a);return n;function i(r){var t=r.$schema;return t&&!o.getSchema(t)?e.call(o,{$ref:t},!0):Promise.resolve()}};var Er=function(e,r,t){var a,o,n=" ",i=e.level,s=e.dataLevel,l=e.schema[r],u=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,d=!e.opts.allErrors,m="data"+(s||""),p="valid"+i,h="errs__"+i,f=e.opts.$data&&l&&l.$data;f?(n+=" var schema"+i+" = "+e.util.getData(l.$data,s,e.dataPathArr)+"; ",o="schema"+i):o=l;var v,g,y,b,P,w="definition"+i,E=this.definition,S="";if(f&&E.$data){P="keywordValidate"+i;var x=E.validateSchema;n+=" var "+w+" = RULES.custom['"+r+"'].definition; var "+P+" = "+w+".validate;"}else{if(!(b=e.useCustomRule(this,l,e.schema,e)))return;o="validate.schema"+u,P=b.code,v=E.compile,g=E.inline,y=E.macro}var F=P+".errors",O="i"+i,_="ruleErr"+i,D=E.async;if(D&&!e.async)throw new Error("async keyword in sync schema");if(g||y||(n+=F+" = null;"),n+="var "+h+" = errors;var "+p+";",f&&E.$data&&(S+="}",n+=" if ("+o+" === undefined) { "+p+" = true; } else { ",x&&(S+="}",n+=" "+p+" = "+w+".validateSchema("+o+"); if ("+p+") { ")),g)E.statements?n+=" "+b.validate+" ":n+=" "+p+" = "+b.validate+"; ";else if(y){var k=e.util.copy(e);S="";k.level++;var j="valid"+k.level;k.schema=b.validate,k.schemaPath="";var I=e.compositeRule;e.compositeRule=k.compositeRule=!0;var A=e.validate(k).replace(/validate\.schema/g,P);e.compositeRule=k.compositeRule=I,n+=" "+A}else{(N=N||[]).push(n),n="",n+=" "+P+".call( ",e.opts.passContext?n+="this":n+="self",v||!1===E.schema?n+=" , "+m+" ":n+=" , "+o+" , "+m+" , validate.schema"+e.schemaPath+" ",n+=" , (dataPath || '')",'""'!=e.errorPath&&(n+=" + "+e.errorPath);var C=s?"data"+(s-1||""):"parentData",R=s?e.dataPathArr[s]:"parentDataProperty",$=n+=" , "+C+" , "+R+" , rootData ) ";n=N.pop(),!1===E.errors?(n+=" "+p+" = ",D&&(n+="await "),n+=$+"; "):n+=D?" var "+(F="customErrors"+i)+" = null; try { "+p+" = await "+$+"; } catch (e) { "+p+" = false; if (e instanceof ValidationError) "+F+" = e.errors; else throw e; } ":" "+F+" = null; "+p+" = "+$+"; "}if(E.modifying&&(n+=" if ("+C+") "+m+" = "+C+"["+R+"];"),n+=""+S,E.valid)d&&(n+=" if (true) { ");else{var N;n+=" if ( ",void 0===E.valid?(n+=" !",n+=y?""+j:""+p):n+=" "+!E.valid+" ",n+=") { ",a=this.keyword,(N=N||[]).push(n),n="",(N=N||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(n+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";var L=n;n=N.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+L+"]); ":n+=" validate.errors = ["+L+"]; return false; ":n+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var T=n;n=N.pop(),g?E.errors?"full"!=E.errors&&(n+=" for (var "+O+"="+h+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+c+'"; } ',e.opts.verbose&&(n+=" "+_+".schema = "+o+"; "+_+".data = "+m+"; "),n+=" } "):!1===E.errors?n+=" "+T+" ":(n+=" if ("+h+" == errors) { "+T+" } else { for (var "+O+"="+h+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+c+'"; } ',e.opts.verbose&&(n+=" "+_+".schema = "+o+"; "+_+".data = "+m+"; "),n+=" } } "):y?(n+=" var err = ",!1!==e.createErrors?(n+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(n+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&d&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; ")):!1===E.errors?n+=" "+T+" ":(n+=" if (Array.isArray("+F+")) { if (vErrors === null) vErrors = "+F+"; else vErrors = vErrors.concat("+F+"); errors = vErrors.length; for (var "+O+"="+h+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; "+_+'.schemaPath = "'+c+'"; ',e.opts.verbose&&(n+=" "+_+".schema = "+o+"; "+_+".data = "+m+"; "),n+=" } } else { "+T+" } "),n+=" } ",d&&(n+=" else { ")}return n},Sr="http://json-schema.org/draft-07/schema#",xr="http://json-schema.org/draft-07/schema#",Fr="Core schema meta-schema",Or={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},_r=["object","boolean"],Dr={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},kr={$schema:Sr,$id:xr,title:Fr,definitions:Or,type:_r,properties:Dr,default:!0},jr=Z(Object.freeze({__proto__:null,$schema:Sr,$id:xr,title:Fr,definitions:Or,type:_r,properties:Dr,default:kr})),Ir={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:jr.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:jr.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}},Ar=/^[a-z_$][a-z0-9_$-]*$/i,Cr=function(e,r){var t=this.RULES;if(t.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!Ar.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(r){this.validateKeyword(r,!0);var a=r.type;if(Array.isArray(a))for(var o=0;o<a.length;o++)i(e,a[o],r);else i(e,a,r);var n=r.metaSchema;n&&(r.$data&&this._opts.$data&&(n={anyOf:[n,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),r.validateSchema=this.compile(n,!0))}function i(e,r,a){for(var o,n=0;n<t.length;n++){var i=t[n];if(i.type==r){o=i;break}}o||(o={type:r,rules:[]},t.push(o));var s={keyword:e,definition:a,custom:!0,code:Er,implements:a.implements};o.rules.push(s),t.custom[e]=s}return t.keywords[e]=t.all[e]=!0,this},Rr=function(e){var r=this.RULES.custom[e];return r?r.definition:this.RULES.keywords[e]||!1},$r=function(e){var r=this.RULES;delete r.keywords[e],delete r.all[e],delete r.custom[e];for(var t=0;t<r.length;t++)for(var a=r[t].rules,o=0;o<a.length;o++)if(a[o].keyword==e){a.splice(o,1);break}return this},Nr=function e(r,t){e.errors=null;var a=this._validateKeyword=this._validateKeyword||this.compile(Ir,!0);if(a(r))return!0;if(e.errors=a.errors,t)throw new Error("custom keyword definition is invalid: "+this.errorsText(a.errors));return!1};var Lr="http://json-schema.org/draft-07/schema#",Tr="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",zr="Meta-schema for $data reference (JSON Schema extension proposal)",Vr=["$data"],qr={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Mr={$schema:Lr,$id:Tr,description:zr,type:"object",required:Vr,properties:qr,additionalProperties:!1},Wr=Z(Object.freeze({__proto__:null,$schema:Lr,$id:Tr,description:zr,type:"object",required:Vr,properties:qr,additionalProperties:!1,default:Mr})),Ur=Kr;Kr.prototype.validate=function(e,r){var t;if("string"==typeof e){if(!(t=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);t=a.validate||this._compile(a)}var o=t(r);!0!==t.$async&&(this.errors=t.errors);return o},Kr.prototype.compile=function(e,r){var t=this._addSchema(e,void 0,r);return t.validate||this._compile(t)},Kr.prototype.addSchema=function(e,r,t,a){if(Array.isArray(e)){for(var o=0;o<e.length;o++)this.addSchema(e[o],void 0,t,a);return this}var n=this._getId(e);if(void 0!==n&&"string"!=typeof n)throw new Error("schema id must be string");return et(this,r=ge.normalizeId(r||n)),this._schemas[r]=this._addSchema(e,t,a,!0),this},Kr.prototype.addMetaSchema=function(e,r,t){return this.addSchema(e,r,t,!0),this},Kr.prototype.validateSchema=function(e,r){var t=e.$schema;if(void 0!==t&&"string"!=typeof t)throw new Error("$schema must be a string");if(!(t=t||this._opts.defaultMeta||function(e){var r=e._opts.meta;return e._opts.defaultMeta="object"==typeof r?e._getId(r)||r:e.getSchema(Qr)?Qr:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var a=this.validate(t,e);if(!a&&r){var o="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(o);this.logger.error(o)}return a},Kr.prototype.getSchema=function(e){var r=Gr(this,e);switch(typeof r){case"object":return r.validate||this._compile(r);case"string":return this.getSchema(r);case"undefined":return function(e,r){var t=ge.schema.call(e,{schema:{}},r);if(t){var a=t.schema,o=t.root,n=t.baseId,i=Le.call(e,a,o,void 0,n);return e._fragments[r]=new fe({ref:r,fragment:!0,schema:a,root:o,baseId:n,validate:i}),i}}(this,e)}},Kr.prototype.removeSchema=function(e){if(e instanceof RegExp)return Jr(this,this._schemas,e),Jr(this,this._refs,e),this;switch(typeof e){case"undefined":return Jr(this,this._schemas),Jr(this,this._refs),this._cache.clear(),this;case"string":var r=Gr(this,e);return r&&this._cache.del(r.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var t=this._opts.serialize,a=t?t(e):e;this._cache.del(a);var o=this._getId(e);o&&(o=ge.normalizeId(o),delete this._schemas[o],delete this._refs[o])}return this},Kr.prototype.addFormat=function(e,r){"string"==typeof r&&(r=new RegExp(r));return this._formats[e]=r,this},Kr.prototype.errorsText=function(e,r){if(!(e=e||this.errors))return"No errors";for(var t=void 0===(r=r||{}).separator?", ":r.separator,a=void 0===r.dataVar?"data":r.dataVar,o="",n=0;n<e.length;n++){var i=e[n];i&&(o+=a+i.dataPath+" "+i.message+t)}return o.slice(0,-t.length)},Kr.prototype._addSchema=function(e,r,t,a){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var o=this._opts.serialize,n=o?o(e):e,i=this._cache.get(n);if(i)return i;a=a||!1!==this._opts.addUsedSchema;var s=ge.normalizeId(this._getId(e));s&&a&&et(this,s);var l,u=!1!==this._opts.validateSchema&&!r;u&&!(l=s&&s==ge.normalizeId(e.$schema))&&this.validateSchema(e,!0);var c=ge.ids.call(this,e),d=new fe({id:s,schema:e,localRefs:c,cacheKey:n,meta:t});"#"!=s[0]&&a&&(this._refs[s]=d);this._cache.put(n,d),u&&l&&this.validateSchema(e,!0);return d},Kr.prototype._compile=function(e,r){if(e.compiling)return e.validate=o,o.schema=e.schema,o.errors=null,o.root=r||o,!0===e.schema.$async&&(o.$async=!0),o;var t,a;e.compiling=!0,e.meta&&(t=this._opts,this._opts=this._metaOpts);try{a=Le.call(this,e.schema,r,e.localRefs)}catch(r){throw delete e.validate,r}finally{e.compiling=!1,e.meta&&(this._opts=t)}return e.validate=a,e.refs=a.refs,e.refVal=a.refVal,e.root=a.root,a;function o(){var r=e.validate,t=r.apply(this,arguments);return o.errors=r.errors,t}},Kr.prototype.compileAsync=wr,Kr.prototype.addKeyword=Cr,Kr.prototype.getKeyword=Rr,Kr.prototype.removeKeyword=$r,Kr.prototype.validateKeyword=Nr,Kr.ValidationError=je.Validation,Kr.MissingRefError=je.MissingRef,Kr.$dataMetaSchema=br;var Qr="http://json-schema.org/draft-07/schema",Br=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],Hr=["/properties"];function Kr(e){if(!(this instanceof Kr))return new Kr(e);var r,t;e=this._opts=re.copy(e)||{},function(e){var r=e._opts.logger;if(!1===r)e.logger={log:rt,warn:rt,error:rt};else{if(void 0===r&&(r=console),!("object"==typeof r&&r.log&&r.warn&&r.error))throw new Error("logger must implement log, warn and error methods");e.logger=r}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=or(e.format),this._cache=e.cache||new Be,this._loadingSchemas={},this._compilations=[],this.RULES=((r=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}]).all=gr(t=["type","$comment"]),r.types=gr(["number","integer","string","array","object","boolean","null"]),r.forEach((function(e){e.rules=e.rules.map((function(e){var a;if("object"==typeof e){var o=Object.keys(e)[0];a=e[o],e=o,a.forEach((function(e){t.push(e),r.all[e]=!0}))}return t.push(e),r.all[e]={keyword:e,code:vr[e],implements:a}})),r.all.$comment={keyword:"$comment",code:vr.$comment},e.type&&(r.types[e.type]=e)})),r.keywords=gr(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),r.custom={},r),this._getId=function(e){switch(e.schemaId){case"auto":return Xr;case"id":return Zr;default:return Yr}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=Ce),this._metaOpts=function(e){for(var r=re.copy(e._opts),t=0;t<Br.length;t++)delete r[Br[t]];return r}(this),e.formats&&function(e){for(var r in e._opts.formats){var t=e._opts.formats[r];e.addFormat(r,t)}}(this),e.keywords&&function(e){for(var r in e._opts.keywords){var t=e._opts.keywords[r];e.addKeyword(r,t)}}(this),function(e){var r;e._opts.$data&&(r=Wr,e.addMetaSchema(r,r.$id,!0));if(!1===e._opts.meta)return;var t=jr;e._opts.$data&&(t=br(t,Hr));e.addMetaSchema(t,Qr,!0),e._refs["http://json-schema.org/schema"]=Qr}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var r=e._opts.schemas;if(!r)return;if(Array.isArray(r))e.addSchema(r);else for(var t in r)e.addSchema(r[t],t)}(this)}function Gr(e,r){return r=ge.normalizeId(r),e._schemas[r]||e._refs[r]||e._fragments[r]}function Jr(e,r,t){for(var a in r){var o=r[a];o.meta||t&&!t.test(a)||(e._cache.del(o.cacheKey),delete r[a])}}function Zr(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function Yr(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function Xr(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function et(e,r){if(e._schemas[r]||e._refs[r])throw new Error('schema with key or id "'+r+'" already exists')}function rt(){}var tt={$$currentLocalizeFn:function(e){if(e&&e.length)for(var r=0;r<e.length;r+=1){var t=e[r],a=void 0,o=void 0,n=void 0;switch(t.keyword){case"$ref":a="无法找到引用".concat(t.params.ref);break;case"additionalItems":a="",o=t.params.limit,a+="不允许超过".concat(o,"个元素");break;case"additionalProperties":a="不允许有额外的属性";break;case"anyOf":a="数据应为 anyOf 所指定的其中一个";break;case"const":a="应当等于常量";break;case"contains":a="应当包含一个有效项";break;case"custom":a='应当通过 "'.concat(t.keyword,' 关键词校验"');break;case"dependencies":a="",o=t.params.depsCount,a+="应当拥有属性".concat(t.params.property,"的依赖属性").concat(t.params.deps);break;case"enum":a="应当是预设定的枚举值之一";break;case"exclusiveMaximum":case"exclusiveMinimum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(n);break;case"false schema":a="布尔模式出错";break;case"format":a='应当匹配格式 "'.concat(t.params.format,'"');break;case"formatExclusiveMaximum":a="formatExclusiveMaximum 应当是布尔值";break;case"formatExclusiveMinimum":a="formatExclusiveMinimum 应当是布尔值";break;case"formatMaximum":case"formatMinimum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当是 ".concat(n);break;case"if":a='应当匹配模式 "'.concat(t.params.failingKeyword,'" ');break;case"maximum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(n);break;case"maxItems":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个项");break;case"maxLength":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个字符");break;case"maxProperties":a="",o=t.params.limit,a+="不应有多于 ".concat(o," 个属性");break;case"minimum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(n);break;case"minItems":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个项");break;case"minLength":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个字符");break;case"minProperties":a="",o=t.params.limit,a+="不应有少于 ".concat(o," 个属性");break;case"multipleOf":a="应当是 ".concat(t.params.multipleOf," 的整数倍");break;case"not":a='不应当匹配 "not" schema';break;case"oneOf":a='只能匹配一个 "oneOf" 中的 schema';break;case"pattern":a='应当匹配模式 "'.concat(t.params.pattern,'"');break;case"patternRequired":a="应当有属性匹配模式 ".concat(t.params.missingPattern);break;case"propertyNames":a="属性名 '".concat(t.params.propertyName,"' 无效");break;case"required":a="应当有必需属性 ".concat(t.params.missingProperty);break;case"switch":a="由于 ".concat(t.params.caseIndex,' 失败,未通过 "switch" 校验, ');break;case"type":a="应当是 ".concat(t.params.type," 类型");break;case"uniqueItems":a="不应当含有重复项 (第 ".concat(t.params.j," 项与第 ").concat(t.params.i," 项是重复的)");break;default:continue}t.message=a}},getCurrentLocalize:function(){return this.$$currentLocalizeFn},useLocal:function(e){this.$$currentLocalizeFn=e}};function at(e,r){try{if("object"===g(r))return e.fill(null).map((function(){return JSON.parse(JSON.stringify(r))}))}catch(e){}}function ot(e,r){return e.filter((function(e){return r.includes(e)}))}function nt(e,r,t){var a=G(e.$ref,r);e.$ref;var o=E(e,["$ref"]);return ut(w(w({},a),o),r,t)}function it(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length<2)return r[0];for(var a={},o=[].concat(r),n=function(){var e=L(o[0])?o[0]:{},r=L(o[1])?o[1]:{};a=Object.assign({},e),Object.keys(r).reduce((function(t,a){var o=e[a],n=r[a];if(L(o)||L(n))if(L(o)&&L(n))t[a]=it(o,n);else{var i=S(L(o)?[o,n]:[n,o],2),s=i[0],l=i[1];t[a]="additionalProperties"===a?!0===l&&s:s}else if(Array.isArray(o)||Array.isArray(n))if(Array.isArray(o)&&Array.isArray(n)){if(L(o[0])||L(n[0]))throw new Error("暂不支持如上数组对象元素合并");var u=ot([].concat(o),[].concat(n));if(u.length<=0)throw new Error("无法合并如上数据");0===u.length&&"type"===a?t[a]=u[0]:t[a]=u}else{var c=S(Array.isArray(o)?[o,n]:[n,o],2),d=c[0],m=c[1];if(void 0===m)t[a]=d;else{if(!d.includes(m))throw new Error("无法合并如下数据");t[a]=m}}else if(void 0!==o&&void 0!==n)if("maxLength"===a||"maximum"===a||"maxItems"===a||"exclusiveMaximum"===a||"maxProperties"===a)t[a]=Math.min(o,n);else if("minLength"===a||"minimum"===a||"minItems"===a||"exclusiveMinimum"===a||"minProperties"===a)t[a]=Math.max(o,n);else if("multipleOf"===a)t[a]=H(o,n);else{if(o!==n)throw new Error("无法合并如下数据");t[a]=o}else t[a]=void 0===o?n:o;return t}),a),o.splice(0,2,a)};o.length>=2;)n();return a}function st(e,r,t){var a=w(w({},e),{},{allOf:e.allOf.map((function(e){return ut(e,r,t)}))});try{var o=a.allOf,n=E(a,["allOf"]);return it.apply(void 0,[n].concat(x(o)))}catch(e){return a.allOf,E(a,["allOf"])}}function lt(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.hasOwnProperty("allOf")&&(e=st(e,r,t)),e.hasOwnProperty("$ref")&&(e=nt(e,r,t)),e}function ut(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return L(e)?lt(e,r,t):{}}var ct=/{{(.*)}}/;function dt(e,r,t,a){if(void 0!==t){var o=ct.exec(t);if(ct.lastIndex=0,o){var n=o[1].trim();return new Function("parentFormData","rootFormData","return ".concat(n))(I(e,r,1),e)}return a()}}function mt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.schema,t=e.uiSchema,a=arguments.length>1?arguments[1]:void 0,o=vt({schema:r,uiSchema:t,containsSpec:!1});return["title","description"].reduce((function(e,r){return o[r]&&(e["ui:".concat(r)]=String(o[r]).replace(/\$index/g,a+1)),e}),{})}function pt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.curNodePath,i=void 0===n?"":n,s=e.rootFormData,l=void 0===s?{}:s,u=o["ui:widget"]||t["ui:widget"],c=o["ui:hidden"]||t["ui:hidden"];return"HiddenWidget"===u||"hidden"===u||!!dt(l,i,c,(function(){return"function"==typeof c?c(I(l,i,1),l):c}))}function ht(e,r){var t=r.schema,a=void 0===t?{}:t,o=r.uiSchema,n=void 0===o?{}:o,i=a["ui:field"]||n["ui:field"];if("function"==typeof i||"object"===g(i)||"string"==typeof i)return{field:i,fieldProps:n["ui:fieldProps"]||a["ui:fieldProps"]};var s=e[V(a)];if(s)return{field:s};if(!s&&(a.anyOf||a.oneOf))return{field:null};throw new Error("不支持的field类型 ".concat(a.type))}function ft(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.curNodePath,i=e.rootFormData,s=void 0===i?{}:i;return Object.assign.apply(Object,[{}].concat(x([t,o].map((function(e){return Object.keys(e).reduce((function(r,t){var a=e[t];return"ui:options"===t&&L(a)?w(w({},r),a):0===t.indexOf("ui:")?w(w({},r),{},y({},t.substring(3),void 0===n?a:dt(s,n,a,(function(){return a})))):r}),{})})))))}function vt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.containsSpec,i=void 0===n||n,s=e.curNodePath,l=e.rootFormData,u={};return i&&(u.readonly=!!t.readOnly,void 0!==t.multipleOf&&(u.step=t.multipleOf),(t.minimum||0===t.minimum)&&(u.min=t.minimum),(t.maximum||0===t.maximum)&&(u.max=t.maximum),(t.minLength||0===t.minLength)&&(u.minlength=t.minLength),(t.maxLength||0===t.maxLength)&&(u.maxlength=t.maxLength),"date-time"!==t.format&&"date"!==t.format||("array"===t.type?(u.isRange=!0,u.isNumberValue=!(t.items&&"string"===t.items.type)):u.isNumberValue=!("string"===t.type))),w(w({title:t.title,description:t.description},u),ft({schema:t,uiSchema:o,curNodePath:s,rootFormData:l}))}function gt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.curNodePath,i=e.rootFormData,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,l=vt({schema:t,uiSchema:o,curNodePath:n,rootFormData:i});!l.widget&&s&&Object.assign(l,s({schema:t,uiSchema:o}));var u=l.widget,c=l.title,d=l.labelWidth,m=l.description,p=l.attrs,h=l.class,f=l.style,v=l.fieldAttrs,g=l.fieldStyle,y=l.fieldClass,b=l.emptyValue,P=l.width,w=l.getWidget,S=l.onChange,x=E(l,["widget","title","labelWidth","description","attrs","class","style","fieldAttrs","fieldStyle","fieldClass","emptyValue","width","getWidget","onChange"]);return{widget:u,label:c,labelWidth:d,description:m,widgetAttrs:p,widgetClass:h,widgetStyle:f,fieldAttrs:v,width:P,fieldStyle:g,fieldClass:y,emptyValue:b,getWidget:w,onChange:S,uiProps:x}}function yt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.errorSchema,i=void 0===n?{}:n;return Object.assign.apply(Object,[{}].concat(x([t,o,i].map((function(e){return Object.keys(e).reduce((function(r,t){var a=e[t];return"err:options"===t&&L(a)?w(w({},r),a):0===t.indexOf("err:")?w(w({},r),{},y({},t.substring(4),a)):r}),{})})))))}function bt(e,r){if(!Array.isArray(r))return e;var t,a=function(e){return e.reduce((function(e,r){return e[r]=!0,e}),{})},o=a(e),n=r.filter((function(e){return"*"===e||o[e]})),i=a(n),s=e.filter((function(e){return!i[e]})),l=n.indexOf("*");if(-1===l){if(s.length)throw new Error("uiSchema order list does not contain ".concat((t=s).length>1?"properties '".concat(t.join("', '"),"'"):"property '".concat(t[0],"'")));return n}if(l!==n.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");var u=x(n);return u.splice.apply(u,[l,1].concat(x(s))),u}function Pt(e){return Array.isArray(e.enum)&&1===e.enum.length||e.hasOwnProperty("const")}function wt(e){if(Array.isArray(e.enum)&&1===e.enum.length)return e.enum[0];if(e.hasOwnProperty("const"))return e.const;throw new Error("schema cannot be inferred as a constant")}function Et(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=ut(e,r),a=t.oneOf||t.anyOf;return!!Array.isArray(t.enum)||!!Array.isArray(a)&&a.every((function(e){return Pt(e)}))}function St(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every((function(e){return L(e)}))}function xt(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!(!e.uniqueItems||!e.items)&&Et(e.items,r)}function Ft(e){return e.additionalItems,L(e.additionalItems)}function Ot(e,r,t,a){if(e.enum){var o=ft({schema:e,uiSchema:r,curNodePath:t,rootFormData:a}).enumNames||e.enumNames;return e.enum.map((function(e,r){return{label:o&&o[r]||String(e),value:e}}))}var n=e.oneOf||e.anyOf,i=r.oneOf||r.anyOf;return n.map((function(e,r){var o=i&&i[r]?ft({schema:e,uiSchema:i[r],curNodePath:t,rootFormData:a}):{},n=wt(e);return{label:o.title||e.title||String(n),value:n}}))}function _t(e,r,t){if(e)return e;if(r){var a=t.split(".").pop();if(a&&a!=="".concat(Number(a)))return a}return""}var Dt=Object.freeze({__proto__:null,replaceArrayIndex:mt,isHiddenWidget:pt,getUiField:ht,getUserUiOptions:ft,getUiOptions:vt,getWidgetConfig:gt,getUserErrOptions:yt,orderProperties:bt,isConstant:Pt,toConstant:wt,isSelect:Et,isFixedItems:St,isMultiSelect:xt,allowAdditionalItems:Ft,optionsList:Ot,fallbackLabel:_t}),kt=At(),jt=null,It=null;function At(){var e=new Ur({errorDataPath:"property",allErrors:!0,multipleOfPrecision:8,schemaId:"auto",unknownFormats:"ignore"});return e.addFormat("data-url",/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/),e.addFormat("color",/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/),e}function Ct(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null===e?[]:e.map((function(e){var r=e.dataPath,t=e.keyword,a=e.message,o=e.params,n=e.schemaPath,i="".concat(r);return{name:t,property:i,message:a,params:o,stack:"".concat(i," ").concat(a).trim(),schemaPath:n}}))}function Rt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.transformErrors,o=e.additionalMetaSchemas,n=void 0===o?[]:o,i=e.customFormats,s=void 0===i?{}:i,l=!q(It,n),u=!q(jt,s);(l||u)&&(kt=At()),n&&l&&Array.isArray(n)&&(kt.addMetaSchema(n),It=n),s&&u&&L(s)&&(Object.keys(s).forEach((function(e){kt.addFormat(e,s[e])})),jt=s);var c=null;try{kt.validate(t,r)}catch(e){c=e}tt.getCurrentLocalize()(kt.errors);var d=Ct(kt.errors);kt.errors=null;var m=c&&c.message&&"string"==typeof c.message&&c.message.includes("no schema with key or ref ");return m&&(d=[].concat(x(d),[{stack:c.message}])),"function"==typeof a&&(d=a(d)),{errors:d}}function $t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.uiSchema,o=e.transformErrors,n=e.additionalMetaSchemas,i=void 0===n?[]:n,s=e.customFormats,l=void 0===s?{}:s,u=e.errorSchema,c=void 0===u?{}:u,d=e.required,m=void 0!==d&&d,p=e.propPath,h=void 0===p?"":p,f=e.isOnlyFirstError,v=void 0===f||f,g="array"===t.type&&Array.isArray(r)&&0===r.length,y=void 0===r||g;if(m){if(y){var b={keyword:"required",params:{missingProperty:h}},P=yt({schema:t,uiSchema:a,errorSchema:c}).required;return P?b.message=P:tt.getCurrentLocalize()([b]),[b]}}else if(y&&!g)return[];var w=Rt({formData:r,schema:t,transformErrors:o,additionalMetaSchemas:i,customFormats:l}).errors;w=w.filter((function(e){return""===e.property&&!e.schemaPath.includes("#/anyOf/")&&!e.schemaPath.includes("#/oneOf/")||"additionalProperties"===e.name}));var E=yt({schema:t,uiSchema:a,errorSchema:c});return(v&&w.length>0?[w[0]]:w).reduce((function(e,r){return r.message=void 0!==E[r.name]?E[r.name]:r.message,e.push(r),e}),[])}function Nt(e,r){try{return kt.validate(e,r)}catch(e){return!1}}function Lt(e,r,t){for(var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=0;o<r.length;o++){var n=ut(r[o],t,e);if(n.properties){var i=w(w({},t.definitions?{definitions:t.definitions}:{}),{},{anyOf:Object.keys(n.properties).map((function(e){return{required:[e]}}))}),s=void 0;if(n.anyOf){var l=b({},n);l.allOf?l.allOf=l.allOf.slice():l.allOf=[],l.allOf.push(i),s=l}else s=Object.assign({},n,i);if(a||delete s.required,Nt(s,e))return o}else if(Nt(r[o],e))return o}return 0}var Tt=Object.freeze({__proto__:null,ajvValidateFormData:Rt,validateFormDataAndTransformMsg:$t,isValid:Nt,getMatchingOption:Lt});function zt(e,r){if(Array.isArray(r))return Array.isArray(e)||(e=[]),r.map((function(r,t){return e[t]?zt(e[t],r):r}));if(L(r)){var t=Object.assign({},e);return Object.keys(r).reduce((function(t,a){return t[a]=zt(e?e[a]:{},r[a]),t}),t)}return r}function Vt(e,r,t){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],n=L(e)?e:{},i=L(a)?a:{};"allOf"in n&&(n=st(n,t,i));var s=r;if(L(s)&&L(n.default))s=z(s,n.default);else if("default"in n)s=n.default;else{if("$ref"in n){var l=G(n.$ref,t);return Vt(l,s,t,i,o)}if(St(n))s=n.items.map((function(e,a){return Vt(e,Array.isArray(r)?r[a]:void 0,t,i,o)}));else if("oneOf"in n){var u=ut(n.oneOf[Lt(i,n.oneOf,t)],t,i);if(n.properties&&u.properties){var c=z(n,u);delete c.oneOf,n=c}else n=u}else if("anyOf"in n){var d=ut(n.anyOf[Lt(i,n.anyOf,t)],t,i);if(n.properties&&d.properties){var m=z(n,d);delete m.anyOf,n=m}else n=d}}switch(void 0===s&&(s=n.default),V(n)){case"null":return null;case"object":return Object.keys(n.properties||{}).reduce((function(e,r){var a=Vt(n.properties[r],(s||{})[r],t,(i||{})[r],o);return(o||void 0!==a)&&(e[r]=a),e}),{});case"array":if(Array.isArray(s)&&(s=s.map((function(e,r){return Vt(n.items[r]||n.additionalItems||{},e,t,{},o)}))),Array.isArray(a)&&(s=a.map((function(e,r){return Vt(n.items,(s||{})[r],t,e,{},o)}))),n.minItems){if(xt(n,t))return s||[];var p=s?s.length:0;if(n.minItems>p){var h=s||[],f=Array.isArray(n.items)?n.additionalItems:n.items,v=at(new Array(n.minItems-p),Vt(f,f.defaults,t,{},o));return h.concat(v)}}s=void 0===s?[]:s}return s}function qt(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!L(e))throw new Error("Invalid schema: ".concat(e));var o=ut(e,t,r),n=Vt(o,e.default,t,r,a);return void 0===r?n:L(r)||Array.isArray(r)?zt(n,r):0===r||!1===r||""===r?r:r||n}function Mt(e,r){void 0===r&&(r={});var t=r.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}Mt('.genFromComponent{font-size:14px;line-height:1;word-wrap:break-word;word-break:break-word;padding:0;margin:0}.genFromComponent a,.genFromComponent h1,.genFromComponent h2,.genFromComponent h3,.genFromComponent li,.genFromComponent p,.genFromComponent ul{font-size:14px}.genFromComponent .genFormIcon{width:12px;height:12px;vertical-align:top}.genFromComponent .genFormBtn{display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;background:#fff;border:1px solid #dcdfe6;color:#606266;-webkit-appearance:none;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;margin:0;-webkit-transition:.1s;transition:.1s;font-weight:500;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;padding:12px 20px;font-size:14px;border-radius:4px}.genFromComponent .genFormBtn.is-plain:focus,.genFromComponent .genFormBtn.is-plain:hover{background:#fff;border-color:#409eff;color:#409eff}.genFromComponent .hiddenWidget{display:none}.genFromComponent .fieldGroupWrap+.fieldGroupWrap .fieldGroupWrap_title{margin-top:20px}.genFromComponent .fieldGroupWrap_title{position:relative;display:block;width:100%;line-height:26px;margin-bottom:8px;font-size:15px;font-weight:700;border:0}.genFromComponent .fieldGroupWrap_des{font-size:12px;line-height:20px;margin-bottom:10px;color:#999}.genFromComponent .genFromWidget_des{padding:0;margin-top:0;margin-bottom:2px;font-size:12px;line-height:20px;color:#999;text-align:left}.genFromComponent .formItemErrorBox{margin:0 auto;color:#ff5757;padding-top:2px;position:absolute;top:100%;left:0;display:-webkit-box!important;line-height:16px;text-overflow:ellipsis;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1;white-space:normal;font-size:12px;text-align:left}.genFromComponent .genFormIcon-qs{fill:#606266;vertical-align:middle;display:inline-block;width:16px;height:16px;margin-left:2px;margin-top:-2px;cursor:pointer}.genFromComponent .genFormItemRequired:before{content:"*";color:#f56c6c;margin-right:4px}.genFromComponent .appendCombining_box{margin-bottom:22px}.genFromComponent .appendCombining_box .appendCombining_box{margin-bottom:10px}.genFromComponent .appendCombining_box{padding:10px;background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .validateWidget{margin-bottom:0!important;width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important;padding:0!important}.genFromComponent .validateWidget .formItemErrorBox{padding:5px 0;position:relative}.genFromComponent .arrayField:not(.genFormItem){margin-bottom:22px}.genFromComponent .arrayField:not(.genFormItem) .arrayField{margin-bottom:10px}.genFromComponent .arrayOrderList{background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .arrayOrderList_item{position:relative;padding:25px 10px 12px;border-radius:2px;margin-bottom:6px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.genFromComponent .arrayOrderList_bottomAddBtn{text-align:right;padding:15px 10px;margin-bottom:10px}.genFromComponent .bottomAddBtn{width:40%;min-width:10px;max-width:180px}.genFromComponent .arrayListItem_content{padding-top:15px;-webkit-box-flex:1;-ms-flex:1;flex:1;margin:0 auto;-webkit-box-shadow:0 -1px 0 0 rgba(0,0,0,.05);box-shadow:0 -1px 0 0 rgba(0,0,0,.05)}.genFromComponent .arrayListItem_index,.genFromComponent .arrayListItem_operateTool{position:absolute;height:25px}.genFromComponent .arrayListItem_index{top:6px;line-height:18px;height:18px;padding:0 6px;background-color:rgba(0,0,0,.28);color:#fff;font-size:12px;border-radius:2px}.genFromComponent .arrayListItem_operateTool{width:75px;right:9px;top:-1px;text-align:right;font-size:0}.genFromComponent .arrayListItem_btn{vertical-align:top;display:inline-block;padding:6px;margin:0;font-size:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none;cursor:pointer;text-align:center;background:transparent;color:#666}.genFromComponent .arrayListItem_btn:hover{opacity:.6}.genFromComponent .arrayListItem_btn[disabled]{color:#999;opacity:.3!important;cursor:not-allowed}.genFromComponent .arrayListItem_orderBtn-bottom,.genFromComponent .arrayListItem_orderBtn-top{background-color:#f0f9eb}.genFromComponent .arrayListItem_btn-delete{background-color:#fef0f0}.genFromComponent .formFooter_item{text-align:right;border-top:1px solid rgba(0,0,0,.08);padding-top:10px}.genFromComponent.formInlineFooter>.fieldGroupWrap{display:inline-block;margin-right:10px}.genFromComponent.formInline .genFormItem{display:inline-block;margin-right:10px;vertical-align:top}.genFromComponent.formInline .validateWidget{margin-right:0}.genFromComponent.formInline .formFooter_item{border-top:none;padding-top:0}.layoutColumn .layoutColumn_w100{width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important}.layoutColumn .fieldGroupWrap_box{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start}.layoutColumn .fieldGroupWrap_box>div{width:100%;-ms-flex-preferred-size:100%;flex-basis:100%}.layoutColumn .fieldGroupWrap_box>.genFormItem{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;-webkit-box-sizing:border-box;box-sizing:border-box;padding-right:10px}.layoutColumn.layoutColumn-1 .fieldGroupWrap_box>.genFormItem{padding-right:0}.layoutColumn.layoutColumn-2 .fieldGroupWrap_box>.genFormItem{width:50%;-ms-flex-preferred-size:50%;flex-basis:50%}.layoutColumn.layoutColumn-3 .fieldGroupWrap_box>.genFormItem{width:33.333%;-ms-flex-preferred-size:33.333%;flex-basis:33.333%}');var Wt={formFooter:{type:Object,default:function(){return{show:!0,okBtn:"保存",cancelBtn:"取消"}}},modelValue:{type:null,default:function(){return{}},required:!0},fallbackLabel:{type:Boolean,default:!1},formProps:{type:Object,default:function(){return{}}},schema:{type:Object,default:function(){return{}},required:!0},uiSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},errorSchema:{type:Object,default:function(){return{}}}},Ut={name:"FormFooter",props:{okBtn:{type:String,default:"保存"},cancelBtn:{type:String,default:"取消"},formItemAttrs:{type:Object,default:function(){return{}}},globalOptions:{type:Object,default:function(){return{}}}},emits:["cancel","submit"],setup:function(e,t){var a=t.emit,o=e.globalOptions.COMPONENT_MAP;return function(){return r($(o.formItem),w({class:{formFooter_item:!0}},e.formItemAttrs),{default:function(){return[r($(o.button),{onClick:function(){a("cancel")}},{default:function(){return e.cancelBtn}}),r($(o.button),{style:{marginLeft:"10px"},type:"primary",onClick:function(){a("submit")}},{default:function(){return e.okBtn}})]}})}}},Qt={name:"FieldGroupWrap",inject:["genFormProvide"],props:{curNodePath:{type:String,default:""},showTitle:{type:Boolean,default:!0},showDescription:{type:Boolean,default:!0},title:{type:String,default:""},description:{type:String,default:""}},computed:{trueTitle:function(){var e=this.title;if(e)return e;var r=(this.genFormProvide.value||this.genFormProvide).fallbackLabel&&this.curNodePath.split(".").pop();return r!=="".concat(Number(r))?r:""}}},Bt={class:"fieldGroupWrap"},Ht={key:0,class:"fieldGroupWrap_title"},Kt={class:"fieldGroupWrap_box"};Qt.render=function(e,r,l,u,c,d){return t(),a("div",Bt,[l.showTitle&&d.trueTitle?(t(),a("h3",Ht,o(d.trueTitle),1)):n("v-if",!0),l.showDescription&&l.description?(t(),a("p",{key:1,class:"fieldGroupWrap_des",innerHTML:l.description},null,8,["innerHTML"])):n("v-if",!0),i("div",Kt,[s(e.$slots,"default")])])},Qt.__file="utils/components/FieldGroupWrap.vue";var Gt={formProps:{type:null},globalOptions:{type:null},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},customFormats:{type:Object,default:function(){return{}}},rootSchema:{type:Object,default:function(){return{}}},rootFormData:{type:null,default:function(){return{}}},curNodePath:{type:String,default:""},required:{type:Boolean,default:!1},needValidFieldGroup:{type:Boolean,default:!0}},Jt={class:"genFormIcon genFormIcon-down",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},Zt=i("path",{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"},null,-1);var Yt={render:function(e,r){return t(),a("svg",Jt,[Zt])},__file:"utils/icons/IconCaretDown.vue"},Xt={class:"genFormIcon genFormIcon-up",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},ea=i("path",{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"},null,-1);var ra={render:function(e,r){return t(),a("svg",Xt,[ea])},__file:"utils/icons/IconCaretUp.vue"},ta={class:"genFormIcon genFormIcon-close",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},aa=i("path",{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1\n 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0\n 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"},null,-1);var oa={render:function(e,r){return t(),a("svg",ta,[aa])},__file:"utils/icons/IconClose.vue"},na={class:"genFormIcon genFormIcon-plus",t:"1551322312294",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"10297","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"200",height:"200"},ia=i("path",{d:"M474 152m8 0l60 0q8 0 8 8l0 704q0 8-8 8l-60 0q-8 0-8-8l0-704q0-8 8-8Z","p-id":"10298"},null,-1),sa=i("path",{d:"M168 474m8 0l672 0q8 0 8 8l0 60q0 8-8 8l-672 0q-8 0-8-8l0-60q0-8 8-8Z","p-id":"10299"},null,-1);var la={render:function(e,r){return t(),a("svg",na,[ia,sa])},__file:"utils/icons/IconPlus.vue"},ua={class:"genFormIcon genFormIcon-qs",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},ca=i("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 708c-22.1\n 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 0\n 0-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8\n 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6\n 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6\n 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z"},null,-1);var da={render:function(e,r){return t(),a("svg",ua,[ca])},__file:"utils/icons/IconQuestion.vue"},ma={name:"Widget",props:{isFormData:{type:Boolean,default:!0},curValue:{type:null,default:0},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},widget:{type:[String,Function,Object],default:null},required:{type:Boolean,default:!1},emptyValue:{type:null,default:void 0},rootFormData:{type:null},curNodePath:{type:String,default:""},label:{type:String,default:""},width:{type:String,default:""},labelWidth:{type:String,default:""},description:{type:String,default:""},widgetAttrs:{type:Object,default:function(){return{}}},widgetClass:{type:Object,default:function(){return{}}},widgetStyle:{type:Object,default:function(){return{}}},fieldAttrs:{type:Object,default:function(){return{}}},fieldClass:{type:Object,default:function(){return{}}},fieldStyle:{type:Object,default:function(){return{}}},uiProps:{type:Object,default:function(){return{}}},formProps:null,getWidget:null,globalOptions:null,onChange:null},emits:["change"],inheritAttrs:!0,setup:function(e,t){var a=t.emit,o=l("genFormProvide"),n=u({get:function(){return e.isFormData?I(e.rootFormData,e.curNodePath):e.curValue},set:function(r){var t=""===r||null===r?e.emptyValue:r;e.isFormData&&R(e.rootFormData,e.curNodePath,t),a("change",t)}});e.uiProps.enumOptions&&e.uiProps.enumOptions.length>0&&void 0===n.value&&n.value!==e.uiProps.enumOptions[0]&&(e.schema.items?n.value=[]:e.required&&(n.value=e.uiProps.enumOptions[0].value));var i=c(null);return"function"==typeof e.getWidget&&d(i,(function(){e.getWidget.call(null,i.value)})),function(){var t=k(e.curNodePath),a=e.globalOptions.HELPERS.isMiniDes(e.formProps),s=e.description?r("div",{innerHTML:e.description,class:{genFromWidget_des:!0}}):null,l=e.globalOptions.COMPONENT_MAP,u=a&&s?r($(l.popover),{style:{margin:"0 2px",fontSize:"16px",cursor:"pointer"},placement:"top",trigger:"hover"},{default:function(){return s},reference:function(){return r(da)}}):null,c=w(w({},e.fieldStyle),e.width?{width:e.width,flexBasis:e.width,paddingRight:"10px"}:{}),d=_t(e.label,e.widget&&o.value.fallbackLabel,e.curNodePath);return r($(l.formItem),w(w(w({class:w(w({},e.fieldClass),{},{genFormItem:!0}),style:c},e.fieldAttrs),e.labelWidth?{labelWidth:e.labelWidth}:{}),e.isFormData?{prop:t?"__$$root":e.curNodePath,rules:[{validator:function(r,a,o){t&&(a=e.rootFormData);var n=$t({formData:a,schema:e.schema,uiSchema:e.uiSchema,customFormats:e.customFormats,errorSchema:e.errorSchema,required:e.required,propPath:e.curNodePath});if(n.length>0)return o?o(n[0].message):Promise.reject(n[0].message);var i=e.customRule;return i&&"function"==typeof i?i({field:e.curNodePath,value:a,rootFormData:e.rootFormData,callback:o}):o?o():Promise.resolve()},trigger:"blur"}]}:{}),w(w({error:function(e){return e.error?r("div",{class:{formItemErrorBox:!0},title:e.error},[e.error]):null}},d?{label:function(){return r("span",{class:{genFormLabel:!0,genFormItemRequired:e.required}},["".concat(d)].concat(x(u?[u]:[]),["".concat(e.formProps&&e.formProps.labelSuffix||"")]))}}:{}),{},{default:function(t){return[].concat(x(!a&&s?[s]:[]),x(e.widget?[r($(e.widget),w(w(w({style:e.widgetStyle,class:e.widgetClass},e.widgetAttrs),e.uiProps),{},{modelValue:n.value,ref:i,"onUpdate:modelValue":function(r){var t=n.value;t!==r&&(n.value=r,e.onChange&&e.onChange({curVal:r,preVal:t,parentFormData:I(e.rootFormData,e.curNodePath,1),rootFormData:e.rootFormData}))}},t))]:[]))}}))}}},pa={name:"ObjectField",props:Gt,setup:function(e){return function(){var t=e.curNodePath,a=vt({schema:e.schema,uiSchema:e.uiSchema,curNodePath:t,rootFormData:e.rootFormData}),o=a.title,n=a.description,i=a.showTitle,s=a.showDescription,l=a.order,u=a.fieldClass,c=a.fieldAttrs,d=a.fieldStyle,m=a.onlyShowIfDependent,p=bt(Object.keys(e.schema.properties||{}),l).map((function(a){var o=function(r){return Array.isArray(e.schema.required)&&!!~e.schema.required.indexOf(r)}(a),n=function(r){var t=!1,a=!1;return L(e.schema.dependencies)&&(a=Object.entries(e.schema.dependencies).some((function(a){var o=S(a,2),n=o[0],i=o[1],s=!(!Array.isArray(i)||!~i.indexOf(r));return t=t||s,s&&void 0!==I(e.rootFormData,e.curNodePath)[n]}))),{isDependency:t,curDependent:a}}(a),i=n.isDependency,s=n.curDependent;return i&&m&&!s?null:r(Oa,w(w({key:a},e),{},{schema:e.schema.properties[a],uiSchema:e.uiSchema[a],errorSchema:e.errorSchema[a],required:o||s,curNodePath:j(t,a)}))}));return r(Qt,w({title:o,description:n,showTitle:i,showDescription:s,curNodePath:t,class:w({},u),style:d},c),{default:function(){return[].concat(x(p),x(e.needValidFieldGroup?[r(ma,{key:"validateWidget-object",class:{validateWidget:!0,"validateWidget-object":!0},schema:Object.entries(e.schema).reduce((function(r,t){var a=S(t,2),o=a[0],n=a[1];return!1!==e.schema.additionalProperties&&["properties","id","$id"].includes(o)||(r[o]=n),r}),{}),uiSchema:e.uiSchema,errorSchema:e.errorSchema,curNodePath:t,rootFormData:e.rootFormData,globalOptions:e.globalOptions})]:[]))}})}}},ha={name:"StringField",props:Gt,setup:function(e,t){var a=t.attrs,o=u((function(){var r=Et(e.schema)&&Ot(e.schema,e.uiSchema,e.curNodePath,e.rootFormData),t=gt({schema:e.schema,uiSchema:e.uiSchema,curNodePath:e.curNodePath,rootFormData:e.rootFormData},(function(){var t="number"===e.schema.type||"integer"===e.schema.type;return{widget:r?e.globalOptions.WIDGET_MAP.common.select:e.globalOptions.WIDGET_MAP.formats[e.schema.format]||(t?e.globalOptions.WIDGET_MAP.types.number:e.globalOptions.WIDGET_MAP.types.string)}}));return r&&!t.uiProps.enumOptions&&(t.uiProps.enumOptions=r),t}));return function(){return r(ma,w(w(w({},e),a),o.value))}}},fa={name:"NumberField",props:Gt,setup:function(e,t){var a=t.attrs;return function(){return r(ha,w(w({},e),a))}}},va={name:"IntegerField",props:Gt,setup:function(e,t){var a=t.attrs;return function(){return r(ha,w(w({},e),a))}}},ga={name:"BooleanField",props:Gt,setup:function(e,t){var a=t.attrs;return function(){var t=e.schema,o=e.uiSchema,n=e.curNodePath,i=e.rootFormData,s=e.globalOptions,l=Ot({enumNames:t.enumNames||["true","false"],enum:t.enum||[!0,!1]},o,n,i),u=gt({schema:t,uiSchema:o,curNodePath:n,rootFormData:i},(function(){return{widget:s.WIDGET_MAP.types.boolean}}));return u.uiProps.enumOptions=u.uiProps.enumOptions||l,r(ma,w(w(w({},a),e),u))}}},ya={name:"ArrayOrderList",emits:["arrayOperate"],props:{vNodeList:{type:Array,default:[]},tupleItemsLength:{type:Number,default:0},addable:{type:Boolean,default:!0},showIndexNumber:{type:Boolean,default:!1},sortable:{type:Boolean,default:!0},removable:{type:Boolean,default:!0},maxItems:{},minItems:{},globalOptions:null},setup:function(e,t){var a=t.emit,o=u((function(){var r=e.addable,t=e.maxItems,a=e.vNodeList;return!!r&&(void 0===t||a.length<t)})),n=u((function(){var r=e.removable,t=e.minItems,a=e.vNodeList;return!!r&&(void 0===t||a.length>t)}));return function(){return e.vNodeList.length<=0&&!e.addable?null:r("div",{class:{arrayOrderList:!0}},e.vNodeList.map((function(t,o){var i=t.key,s=t.vNode,l=e.tupleItemsLength+o,u=o+1;return r("div",{key:i,class:{arrayOrderList_item:!0}},[e.showIndexNumber?r("div",{class:{arrayListItem_index:!0}},u):null,r("div",{class:{arrayListItem_operateTool:!0}},[r("button",{style:w({},e.sortable?{}:{display:"none"}),class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-top":!0},type:"button",disabled:!e.sortable||0===o,onClick:function(){a("arrayOperate",{command:"moveUp",data:{index:l}})}},[r(ra)]),r("button",{style:w({},e.sortable?{}:{display:"none"}),class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-bottom":!0},type:"button",disabled:!e.sortable||o===e.vNodeList.length-1,onClick:function(){a("arrayOperate",{command:"moveDown",data:{index:l}})}},[r(Yt)]),r("button",{style:w({},e.removable?{}:{display:"none"}),class:{arrayListItem_btn:!0,"arrayListItem_btn-delete":!0},type:"button",disabled:!n.value,onClick:function(){a("arrayOperate",{command:"remove",data:{index:l}})}},[r(oa)])]),r("div",{class:{arrayListItem_content:!0}},[s])])})).concat([r("p",{style:w({},o.value?{}:{display:"none"}),class:{arrayOrderList_bottomAddBtn:!0}},[r("button",{class:{bottomAddBtn:!0,"is-plain":!0,genFormBtn:!0},type:"button",onClick:function(){a("arrayOperate",{command:"add"})}},[r(la,{style:{marginRight:"5px"}}),e.maxItems?"( ".concat(e.vNodeList.length," / ").concat(e.maxItems," )"):""])])]))}}},ba={name:"ArrayFieldNormal",props:w(w({},Gt),{},{itemsFormData:{type:Array}}),setup:function(e,t){var a=t.attrs;return function(){var t=e.schema,o=e.uiSchema,n=e.curNodePath,i=e.rootFormData,s=e.itemsFormData,l=e.errorSchema,u=e.globalOptions,c=vt({schema:t,uiSchema:o,curNodePath:n,rootFormData:i}),d=c.title,m=c.description,p=c.addable,h=c.showIndexNumber,f=c.sortable,v=c.removable,g=c.showTitle,y=c.showDescription,b=c.fieldClass,P=c.fieldAttrs,E=c.fieldStyle,S=s.map((function(a,i){var s=mt({schema:t.items,uiSchema:o.items},i);return{key:a.key,vNode:r(Oa,w(w({key:a.key},e),{},{schema:t.items,required:![].concat(t.items.type).includes("null"),uiSchema:w(w({},o.items),s),errorSchema:l.items,curNodePath:j(n,i)}))}}));return r(Qt,{title:d,description:m,showTitle:g,showDescription:y,curNodePath:n,class:b,attrs:P,style:E},{default:function(){return r(ya,w(w({},a),{},{vNodeList:S,showIndexNumber:h,addable:p,sortable:f,removable:v,maxItems:t.maxItems,minItems:t.minItems,globalOptions:u}))}})}}},Pa={name:"ArrayFieldMultiSelect",props:w({},Gt),setup:function(e,t){var a=t.attrs;return function(){var t=e.schema,o=e.rootSchema,n=e.uiSchema,i=e.curNodePath,s=e.rootFormData,l=e.globalOptions,u=Ot(ut(t.items,o),n,i,s),c=gt({schema:t,uiSchema:n,curNodePath:i,rootFormData:s},(function(){return{widget:l.WIDGET_MAP.common.checkboxGroup}}));return c.uiProps.multiple=!0,u&&!c.uiProps.enumOptions&&(c.uiProps.enumOptions=u),r(ma,w(w(w({},a),e),c))}}},wa={name:"ArrayFieldTuple",props:w(w({},Gt),{},{itemsFormData:{type:Array,default:function(){return[]}}}),emits:["arrayOperate"],setup:function(e,t){var a=t.emit;t.attrs;return function(){var r=!Array.isArray(e.itemsFormData);if(r||e.itemsFormData.length<e.schema.items.length){var t=qt(e.schema,void 0,e.rootSchema);a("arrayOperate",r?{command:"setNewTarget",data:{newTarget:t}}:{command:"batchPush",data:{pushArray:t.slice(e.itemsFormData.length)}})}}(),function(){if(!Array.isArray(e.itemsFormData))return null;var t,o,n=e.schema,i=e.uiSchema,s=e.errorSchema,l=e.curNodePath,u=e.globalOptions,c=vt({schema:n,uiSchema:i,curNodePath:l,rootFormData:e.rootFormData}),d=c.title,m=c.description,p=c.addable,h=c.showIndexNumber,f=c.sortable,v=c.removable,g=c.showTitle,y=c.showDescription,b=c.fieldClass,P=c.fieldAttrs,E=c.fieldStyle,S=(t=e.itemsFormData,o=e.schema.items.length-1,t.reduce((function(e,r,t){return e[t>o?1:0].push(r),e}),[[],[]])),F=S[0].map((function(t,a){return r(Oa,w(w({key:t.key},e),{},{required:![].concat(n.items[a].type).includes("null"),schema:n.items[a],uiSchema:i.items?i.items[a]:{},errorSchema:s.items?s.items[a]:{},curNodePath:j(l,a)}))})),O=S[1].map((function(t,a){var o=mt({schema:n.additionalItems,uiSchema:i.additionalItems},a);return{key:t.key,vNode:r(Oa,w(w({key:t.key},e),{},{schema:n.additionalItems,required:![].concat(n.additionalItems.type).includes("null"),uiSchema:w(w({},i.additionalItems),o),errorSchema:s.additionalItems,curNodePath:j(e.curNodePath,a+n.items.length)}))}})),_=(void 0===p||p)&&Ft(e.schema);return r(Qt,w(w({title:d,description:m,showTitle:g,showDescription:y,curNodePath:l},P),{},{class:b,style:E}),{default:function(){return[].concat(x(F),[r(ya,{onArrayOperate:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return a.apply(void 0,["arrayOperate"].concat(r))},vNodeList:O,tupleItemsLength:n.items.length,addable:_,showIndexNumber:h,sortable:f,removable:v,maxItems:n.maxItems,minItems:n.minItems,globalOptions:u})])}})}}},Ea={name:"ArrayFieldSpecialFormat",props:Gt,setup:function(e,t){var a=t.attrs,o=e.schema,n=e.uiSchema,i=e.curNodePath,s=e.rootFormData,l=gt({schema:w({"ui:widget":e.globalOptions.WIDGET_MAP.formats[o.format]},o),uiSchema:n,curNodePath:i,rootFormData:s});return function(){return r(ma,w(w(w({},a),e),l))}}},Sa={name:"ArrayField",props:Gt,setup:function(e){var t=function(){var r=I(e.rootFormData,e.curNodePath);return Array.isArray(r)?r:[]},a=c(t().map((function(){return U()}))),o=u((function(){return t()}));d(o,(function(e,r){e!==r&&m(e)!==m(r)&&Array.isArray(e)&&(a.value=e.map((function(){return U()})))}),{deep:!0});var n=u((function(){return o.value.map((function(e,r){return{key:a.value[r],value:e}}))})),i=function(r){var t=r.command,n=r.data,i={moveUp:function(e,r){!function(e,r){if(0===r)return!1;var t=[e[r],e[r-1]];e.splice.apply(e,[r-1,2].concat(t))}(e,r.index)},moveDown:function(e,r){!function(e,r){if(r===e.length-1)return!1;var t=e[r],a=[e[r+1],t];e.splice.apply(e,[r,2].concat(a))}(e,r.index)},remove:function(e,r){!function(e,r){e.splice(r,1).length}(e,r.index)},add:function(e,r){var t=r.newRowData;e.push(t)},batchPush:function(e,r){r.pushArray.forEach((function(r){e.push(r)}))},setNewTarget:function(e,r){R(r.formData,r.nodePath,r.newTarget)}}[t];if(!i)throw new Error("错误 - 未知的操作:[".concat(t,"]"));var s,l,u,c=n,d=n;"add"===t?(c={newRowData:(s=e.schema,l=e.rootSchema,u=s.items,St(s)&&Ft(s)&&(u=s.additionalItems),qt(u,void 0,l))},d={newRowData:U()}):"batchPush"===t?d={pushArray:c.pushArray.map((function(e){return U()}))}:"setNewTarget"===t&&(c={formData:e.rootFormData,nodePath:e.curNodePath,newTarget:c.newTarget},d={formData:a,nodePath:"value",newTarget:c.newTarget.map((function(e){return U()}))}),i.apply(null,[a.value,d]),i.apply(null,[o.value,c])};return function(){var t=e.schema,a=e.uiSchema,o=e.rootSchema,s=e.rootFormData,l=e.curNodePath,u=e.globalOptions;if(!t.hasOwnProperty("items"))throw new Error("[".concat(t,"] 请先定义 items属性"));if(xt(t,o))return r(Pa,w(w({},e),{},{class:y({},B(Pa.name),!0)}));if(t.format||t["ui:widget"]||a["ui:widget"])return r(Ea,w(w({},e),{},{class:y({},B(Ea.name),!0)}));var c=St(t)?wa:ba;return r("div",[r(c,w(w({itemsFormData:n.value},e),{},{onArrayOperate:i,class:y({},B(c.name),!0)})),e.needValidFieldGroup?r(ma,{key:"validateWidget-array",class:{validateWidget:!0,"validateWidget-array":!0},schema:Object.entries(t).reduce((function(e,r){var t=S(r,2),a=t[0],o=t[1];return"items"!==a&&(e[a]=o),e}),{}),uiSchema:a,errorSchema:e.errorSchema,curNodePath:l,rootFormData:s,globalOptions:u}):null])}}},xa={name:"SelectLinkageField",props:w(w({},Gt),{},{combiningType:{type:String,default:"anyOf"},selectList:{type:Array,require:!0}}),setup:function(e){var t,a,o=c((t=I(e.rootFormData,e.curNodePath),0!==(a=Lt(t,e.selectList,e.rootSchema,!0))?a:e.curSelectIndex||0)),n=function(){var t=gt({schema:e.schema["".concat(e.combiningType,"Select")]||{},uiSchema:e.uiSchema["".concat(e.combiningType,"Select")]||{},curNodePath:e.curNodePath,rootFormData:e.rootFormData},(function(){return{widget:"SelectWidget"}}));if(t.label=t.label||e.schema.title,t.description=t.description||e.schema.description,!t.uiProps.enumOptions){var a=e.uiSchema[e.combiningType]||[];t.uiProps.enumOptions=e.selectList.map((function(e,r){return{label:vt({schema:e,uiSchema:a[r],containsSpec:!1}).title||"选项 ".concat(r+1),value:r}}))}return r(ma,w(w({key:"fieldSelect_".concat(e.combiningType),class:y({},"fieldSelect_".concat(e.combiningType),!0),isFormData:!1,curValue:o.value,globalOptions:e.globalOptions},t),{},{onChange:function(e){o.value=e}}))};return d(o,(function(r,t){var a=I(e.rootFormData,e.curNodePath),o=qt(e.selectList[r],void 0,e.rootSchema),n=Object.prototype.hasOwnProperty;if(L(a)){var i=ut(e.selectList[t],e.rootSchema);if("object"===V(i))for(var s in i.properties)n.call(i.properties,s)&&!n.call(o,s)&&C(a,s)}L(o)?Object.entries(o).forEach((function(e){var r=S(e,2),t=r[0],o=r[1];void 0!==o&&R(a,t,o)})):R(e.rootFormData,e.curNodePath,o||a)})),function(){var t,a=e.curNodePath,i=D(a),s=null;if(("object"===e.schema.type||e.schema.properties)&&!function(e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!1;return!0}(e.schema.properties)){var l,u=Object.assign({},e.schema);delete u[e.combiningType],s=r(Oa,w(w({key:"origin_".concat(e.combiningType),class:(l={},y(l,"".concat(e.combiningType,"_originBox"),!0),y(l,"".concat(i,"-originBox"),!0),l)},e),{},{schema:u}))}var c=[n()],d=e.selectList[o.value];if(d){var m=e.schema,p=e.combiningType,h="".concat(e.combiningType,"Select");m.properties,m[p],m[h];var f=E(m,["properties",p,h].map(_));d=Object.assign({},f,d);var v=Q(vt({schema:e.schema,uiSchema:e.uiSchema,containsSpec:!1,curNodePath:a,rootFormData:e.rootFormData}),(function(r){return r===e.combiningType?void 0:"ui:".concat(r)})),g=Q(yt({schema:e.schema,uiSchema:e.uiSchema,errorSchema:e.errorSchema}),(function(r){return r===e.combiningType?void 0:"err:".concat(r)}));c.push(r(Oa,w(w({key:"appendSchema_".concat(e.combiningType)},e),{},{schema:w({"ui:showTitle":!1,"ui:showDescription":!1},d),required:e.required,uiSchema:w(w({},v),(e.uiSchema[e.combiningType]||[])[o.value]),errorSchema:w(w({},g),(e.errorSchema[e.combiningType]||[])[o.value])})))}return c.push(r(ma,{key:"validateWidget-".concat(e.combiningType),class:y({validateWidget:!0},"validateWidget-".concat(e.combiningType),!0),schema:e.schema,uiSchema:e.uiSchema,errorSchema:e.errorSchema,curNodePath:e.curNodePath,rootFormData:e.rootFormData,globalOptions:e.globalOptions})),r("div",[s,r("div",{key:"appendBox_".concat(e.combiningType),class:(t={appendCombining_box:!0},y(t,"".concat(e.combiningType,"_appendBox"),!0),y(t,"".concat(i,"-appendBox"),!0),t)},c)])}}},Fa={array:Sa,boolean:ga,integer:va,number:fa,object:pa,string:ha,null:{render:function(){return null}},anyOf:{name:"AnyOfField",setup:function(e,t){var a=t.attrs,o=t.slots;return function(){return r(xa,w(w({},a),{},{combiningType:"anyOf",selectList:a.schema.anyOf}),o)}}},oneOf:{name:"oneOfField",setup:function(e,t){var a=t.attrs,o=t.slots;return function(){return r(xa,w(w({},a),{},{combiningType:"oneOf",selectList:a.schema.oneOf}),o)}}}},Oa={name:"SchemaField",props:Gt,setup:function(e){return function(){var t,a=ut(e.schema,e.rootSchema),o=w(w({},e),{},{schema:a});if(0===Object.keys(a).length)return null;var n,i,s=ht(Fa,o),l=s.field,u=s.fieldProps,c=pt({schema:a,uiSchema:e.uiSchema,curNodePath:e.curNodePath,rootFormData:e.rootFormData}),d=D(e.curNodePath);return a.anyOf&&a.anyOf.length>0&&!Et(a)?r($(Fa.anyOf),w({class:(n={},y(n,"".concat(d,"-anyOf"),!0),y(n,"fieldItem",!0),y(n,"anyOfField",!0),n)},o)):a.oneOf&&a.oneOf.length>0&&!Et(a)?r($(Fa.oneOf),w({class:(i={},y(i,"".concat(d,"-oneOf"),!0),y(i,"fieldItem",!0),y(i,"oneOfField",!0),i)},o)):l&&!c?r($(l),w(w({},o),{},{fieldProps:u,class:(t={},y(t,B(l.name)||l,!0),y(t,"hiddenWidget",c),y(t,"fieldItem",!0),y(t,d,!0),t)})):null}}};var _a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.model,o=void 0===a?"value":a;return f({inheritAttrs:!1,setup:function(t,a){var n=a.attrs,i=a.slots;return function(){var t,a=n.modelValue,s=n["onUpdate:modelValue"],l=E(n,["modelValue","onUpdate:modelValue"]);return r($(e),w((y(t={},o,a),y(t,"onUpdate:".concat(o),s),t),l),i)}}})},Da=function(e){return f({inheritAttrs:!1,setup:function(t,a){var o=a.attrs,n=a.slots;return function(){var t=o.isNumberValue,a=o.isRange,i=o.value,s=E(o,["isNumberValue","isRange","value"]),l=t?a?(i||[]).map((function(e){return"number"==typeof e?String(e):e})):"number"==typeof i?String(i):i:i,u=w(w({},o),{},{value:l,"onUpdate:value":function(e){t&&(e=a?e.map((function(e){return+e})):+e),s["onUpdate:value"].call(this,e)}});return r($(e),u,n)}}})},ka=_a({name:"CheckboxesWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}},setup:function(e,t){var a=t.attrs;return function(){return r($("a-checkbox-group"),a,{default:function(){return e.enumOptions.map((function(e,t){return r($("a-checkbox"),{key:t,value:e.value},{default:function(){return e.label}})}))}})}}},{model:"value"}),ja=_a({name:"RadioWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}},setup:function(e,t){var a=t.attrs;return function(){return r($("a-radio-group"),a,{default:function(){return e.enumOptions.map((function(e,t){return r($("a-radio"),{key:t,value:e.value},{default:function(){return e.label}})}))}})}}},{model:"value"}),Ia=_a({name:"SelectWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}},setup:function(e,t){var a=t.attrs;return function(){return r($("a-select"),w(w({},a.multiple?{mode:"multiple"}:{}),a),{default:function(){return e.enumOptions.map((function(e,t){return r($("a-select-option"),{key:t,value:e.value},{default:function(){return e.label}})}))}})}}},{model:"value"}),Aa=_a(Da({name:"DatePickerWidget",inheritAttrs:!1,setup:function(e,t){var a=t.attrs;return function(){var e=a.isNumberValue,t=a.isRange,o=E(a,["isNumberValue","isRange"]);return r($(t?"a-range-picker":"a-date-picker"),w({valueFormat:e?"x":"YYYY-MM-DD"},o))}}}),{model:"value"}),Ca=_a(Da({name:"DatePickerWidget",inheritAttrs:!1,setup:function(e,t){var a=t.attrs;return function(){var e=a.isNumberValue,t=a.isRange,o=E(a,["isNumberValue","isRange"]);return r($(t?"a-range-picker":"a-date-picker"),w({valueFormat:e?"x":"YYYY-MM-DDTHH:mm:ssZ",showTime:!0},o))}}}),{model:"value"}),Ra={CheckboxesWidget:ka,RadioWidget:ja,SelectWidget:Ia,TimePickerWidget:_a({name:"TimePickerWidget",inheritAttrs:!1,setup:function(e,t){var a=t.attrs;return function(){return r($("a-time-picker"),w({"value-format":"HH:mm:ss"},a))}}},{model:"value"}),DatePickerWidget:Aa,DateTimePickerWidget:Ca,UploadWidget:{name:"UploadWidget",props:{modelValue:{default:null,type:[String,Array]},responseFileUrl:{default:function(){return function(e){return e?e.url||e.data&&e.data.url:""}},type:[Function]},btnText:{type:String,default:"点击上传"},slots:{type:null,default:null}},inheritAttrs:!1,setup:function(e,t){var a=t.attrs,o=t.emit,n=e.modelValue,i=Array.isArray(n),s=a.fileList||(i?n.map((function(e,r){return{uid:String(r),status:"done",name:"已上传文件(".concat(r+1,")"),url:e}})):n?[{uid:"1",status:"done",name:"已上传文件",url:n}]:[]),l=c(s),u=function(r){return r&&(r.response&&e.responseFileUrl(r.response)||r.url)||""};return function(){return r($("a-upload"),w(w({},a),{},{fileList:l.value,"onUpdate:fileList":function(e){l.value=e},onChange:function(e){"uploading"!==e.file.status&&function(e){var r;if(i)r=e.length?e.reduce((function(e,r){var t=u(r);return t&&(r.url=t,e.push(t)),e}),[]):[];else{var t=e[e.length-1];r=u(t),t&&r?(t.url=r,l.value=[t]):l.value=[]}o("update:modelValue",r)}(e.fileList),a.onChange&&a.onChange.call(this,e)}}),w({default:function(){return r($("a-button"),{type:"primary"},{default:function(){return e.btnText}})}},e.slots||{}))}}},InputWidget:_a("a-input"),InputNumberWidget:_a("a-input-number"),AutoCompleteWidget:_a("a-auto-complete"),SliderWidget:_a("a-slider"),RateWidget:_a("a-rate"),SwitchWidget:_a("a-switch",{model:"checked"})},$a=Ra.InputWidget,Na=Ra.InputNumberWidget,La={types:{boolean:Ra.SwitchWidget,string:$a,number:Na,integer:Na},formats:{color:{setup:function(e,t){var a=t.attrs;return function(){return r($a,w(w({},a),{},{style:w(w({},a.style||{}),{},{maxWidth:"180px"})}),{addonAfter:function(){return r($a,{disabled:a.disabled,readonly:a.readonly,moduleValue:a.moduleValue,"onUpdate:modelValue":a["onUpdate:modelValue"],type:"color",style:{padding:"0",width:"50px"}})}})}}},time:Ra.TimePickerWidget,date:Ra.DatePickerWidget,"date-time":Ra.DateTimePickerWidget},common:{select:Ra.SelectWidget,radioGroup:Ra.RadioWidget,checkboxGroup:Ra.CheckboxesWidget},widgetComponents:Ra};Mt(".genFromComponent.ant-form-vertical .ant-form-item-label{line-height:26px;padding-bottom:6px;font-size:14px}.genFromComponent .ant-form-item{margin-bottom:22px}.genFromComponent .ant-form-item.ant-form-item-with-help{margin-bottom:2px}.genFromComponent .ant-form-explain{padding-top:2px;display:-webkit-box!important;text-overflow:ellipsis;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;text-align:left;line-height:1.2;font-size:12px}.genFromComponent .validateWidget .ant-form-explain{padding:5px 0;position:relative}.genFromComponent .ant-form-item-label>label.ant-form-item-no-colon:after{display:none}");var Ta={WIDGET_MAP:La,COMPONENT_MAP:{form:f({inheritAttrs:!1,setup:function(e,t){var a=t.attrs,o=t.slots,n={top:{layout:"vertical"},left:{layout:"horizontal",labelAlign:"left"},right:{layout:"horizontal",labelAlign:"right"}},i=c(null);return a.setFormRef&&v((function(){i.value.$$validate=function(e){i.value.validate().then((function(r){e(!0,r)})).catch((function(r){e(!1,r.errorFields)}))},a.setFormRef(i.value)})),function(){a.setFormRef;var e=a.labelPosition;a.labelWidth;var t=a.model,s=E(a,["setFormRef","labelPosition","labelWidth","model"]);return r($("a-form"),w(w(w({ref:i,model:t.value},n[e||"top"]),s),{},{colon:!1}),o)}}}),formItem:f({inheritAttrs:!1,setup:function(e,t){var a=t.attrs,o=t.slots,n=c(null);return function(){var e=a.prop,t=a.rules,i=E(a,["prop","rules"]);return r($("a-form-item"),w(w({},i),{},{ref:n,rules:(t||[]).map((function(e){return w(w({},e),{},{validator:function(r,t){return e.validator.apply(this,[r,t])}})})),name:e?e.split("."):e}),w(w({},o),{},{default:function(){return o.default.call(this,{onBlur:function(e){var r=e.target.previousElementSibling;r&&r.classList.contains("genFromWidget_des")&&n.value.onFieldBlur()}})}}))}}}),button:"a-button",popover:f({setup:function(e,t){var a=t.attrs,o=t.slots,n=o.default,i=o.reference;return function(){return r($("a-popover"),{attrs:a},{default:i,content:n})}}})},HELPERS:{isMiniDes:function(e){return e&&(["left","right"].includes(e.labelPosition)||"horizontal"===e.layout)}}},za=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={name:"VueForm",props:Wt,emits:["update:modelValue","change","cancel","submit","validation-failed","form-mounted"],setup:function(a,o){var n=o.slots,i=o.emit;if(!t.installed&&e.WIDGET_MAP.widgetComponents){var s=p();Object.entries(e.WIDGET_MAP.widgetComponents).forEach((function(e){var r=S(e,2),t=r[0],a=r[1];return s.appContext.app.component(t,a)})),t.installed=!0}h("genFormProvide",u((function(){return{fallbackLabel:a.fallbackLabel}})));var l=c(qt(a.schema,a.modelValue,a.schema)),m=u((function(){return w({show:!0,okBtn:"保存",cancelBtn:"取消"},a.formFooter)})),f=null,v=function(e,r){i("update:modelValue",e),i("change",{newValue:e,oldValue:r})},g=function(e,r){if(!q(e,r)){var t=qt(a.schema,a.modelValue,a.schema);q(l.value,t)||(l.value=t)}};d(l,(function(e,r){v(e,r)}),{deep:!0}),d((function(){return a.schema}),(function(e,r){g(e,r)})),d((function(){return a.modelValue}),(function(e,r){g(e,r)})),v(l.value,a.modelValue);return function(){var t,o=a.formProps,s=o.layoutColumn,u=void 0===s?1:s,c=o.inlineFooter,d=o.inline,p=E(o,["layoutColumn","inlineFooter","inline"]),h={schema:a.schema,uiSchema:a.uiSchema,errorSchema:a.errorSchema,customFormats:a.customFormats,customRule:a.customRule,rootSchema:a.schema,rootFormData:l.value,curNodePath:"",globalOptions:e,formProps:w({labelSuffix:":",labelPosition:"top"},p)};return r($(e.COMPONENT_MAP.form),w({class:(t={genFromComponent:!0,formInlineFooter:c,formInline:d},y(t,"genFromComponent_".concat(a.schema.id,"Form"),!!a.schema.id),y(t,"layoutColumn",!d),y(t,"layoutColumn-".concat(u),!d),t),setFormRef:function(e){f=e,i("form-mounted",e)},model:l},h.formProps),{default:function(){return[r(Oa,h),n.default?n.default({formData:l,formRefFn:function(){return f}}):m.value.show?r(Ut,{globalOptions:e,okBtn:m.value.okBtn,cancelBtn:m.value.cancelBtn,formItemAttrs:m.value.formItemAttrs,onCancel:function(){i("cancel")},onSubmit:function(){(f.$$validate||f.validate)((function(e,r){return e?i("submit",l):i("validation-failed",r)}))}}):[]]}})}},install:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.component(r.name||t.name,t)}};return t}(Ta);export default za;export{Oa as SchemaField,Gt as fieldProps,Dt as formUtils,qt as getDefaultFormState,Ta as globalOptions,tt as i18n,_a as modelValueComponent,Tt as schemaValidate,N as vueUtils}; diff --git a/packages/lib/vue3/vue3-form-ant/dist/vue3-form-ant.umd.js b/packages/lib/vue3/vue3-form-ant/dist/vue3-form-ant.umd.js index 2b18c96e..50b3125d 100644 --- a/packages/lib/vue3/vue3-form-ant/dist/vue3-form-ant.umd.js +++ b/packages/lib/vue3/vue3-form-ant/dist/vue3-form-ant.umd.js @@ -10049,7 +10049,12 @@ widgetValue.value = event; if (props.onChange) { - props.onChange(event, preVal); + props.onChange({ + curVal: event, + preVal: preVal, + parentFormData: getPathVal(props.rootFormData, props.curNodePath, 1), + rootFormData: props.rootFormData + }); } } } diff --git a/packages/lib/vue3/vue3-form-ant/dist/vue3-form-ant.umd.min.js b/packages/lib/vue3/vue3-form-ant/dist/vue3-form-ant.umd.min.js index 17070447..9a4222f9 100644 --- a/packages/lib/vue3/vue3-form-ant/dist/vue3-form-ant.umd.min.js +++ b/packages/lib/vue3/vue3-form-ant/dist/vue3-form-ant.umd.min.js @@ -1,4 +1,4 @@ /** @license @lljj/vue3-form-ant (c) 2020-2021 Liu.Jun License: Apache-2.0 */ !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).vue3FormAnt={},e.Vue)}(this,(function(e,r){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function o(){return(o=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e}).apply(this,arguments)}function n(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function i(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?n(Object(t),!0).forEach((function(r){a(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):n(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function s(e,r){if(null==e)return{};var t,a,o=function(e,r){if(null==e)return{};var t,a,o={},n=Object.keys(e);for(a=0;a<n.length;a++)t=n[a],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a<n.length;a++)t=n[a],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function l(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],a=!0,o=!1,n=void 0;try{for(var i,s=e[Symbol.iterator]();!(a=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);a=!0);}catch(e){o=!0,n=e}finally{try{a||null==s.return||s.return()}finally{if(o)throw n}}return t}(e,r)||c(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,r){if(e){if("string"==typeof e)return d(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?d(e,r):void 0}}function d(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);t<r;t++)a[t]=e[t];return a}function m(e){var r=function(e,r){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var a=t.call(e,r||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:String(r)}function p(e){return e?"".concat("__pathRoot",".").concat(e).replace(/\./g,"_"):"__pathRoot"}function h(e){return""===e}function f(e,r){return""===e?r:[e,r].join(".")}function v(e,r){for(var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=r.split("."),o=0;o<a.length-t;o+=1){if(void 0===e)return;e=""===a[o]?e:e[a[o]]}return e}function g(e){return e}function y(e,r){delete e[r]}function b(e,r,t){for(var a=r.split("."),o=0;o<a.length;o+=1){if(a.length-o<2){e[a[a.length-1]]=t;break}e=e[a[o]]}}function P(e){return"string"==typeof e?r.resolveComponent(e):e}var w=Object.freeze({__proto__:null,deletePathVal:y,setPathVal:b,resolveComponent:P,nodePath2ClassName:p,isRootNodePath:h,computedCurPath:f,getPathVal:v,path2prop:g});function E(e){return"[object Object]"===Object.prototype.toString.call(e)}function S(e){return"[object Arguments]"===Object.prototype.toString.call(e)}function x(e,r){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=Object.assign({},e);return Object.keys(r).reduce((function(a,o){var n=e?e[o]:{},i=r[o];return e&&e.hasOwnProperty(o)&&E(i)?a[o]=x(n,i,t):t&&Array.isArray(n)&&Array.isArray(i)?a[o]=n.concat(i):a[o]=i,a}),a)}function F(e){var r,a=e.type;return!a&&e.const?(r=e.const,Array.isArray(r)?"array":"string"==typeof r?"string":null==r?"null":"boolean"==typeof r?"boolean":isNaN(r)?"object"===t(r)?"object":"string":"number"):!a&&e.enum?"string":!a&&e.items?"array":a||!e.properties&&!e.additionalProperties?a instanceof Array&&2===a.length&&a.includes("null")?a.find((function(e){return"null"!==e})):a:"object"}function O(e,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===r)return!0;if("function"==typeof e||"function"==typeof r)return!0;if("object"!==t(e)||"object"!==t(r))return!1;if(null===e||null===r)return!1;if(e instanceof Date&&r instanceof Date)return e.getTime()===r.getTime();if(e instanceof RegExp&&r instanceof RegExp)return e.source===r.source&&e.global===r.global&&e.multiline===r.multiline&&e.lastIndex===r.lastIndex&&e.ignoreCase===r.ignoreCase;if(S(e)||S(r)){if(!S(e)||!S(r))return!1;var n=Array.prototype.slice;return O(n.call(e),n.call(r),a,o)}if(e.constructor!==r.constructor)return!1;var i=Object.keys(e),s=Object.keys(r);if(0===i.length&&0===s.length)return!0;if(i.length!==s.length)return!1;for(var l,u=a.length;u--;)if(a[u]===e)return o[u]===r;a.push(e),o.push(r),i.sort(),s.sort();for(var c=i.length-1;c>=0;c--)if(i[c]!==s[c])return!1;for(var d=i.length-1;d>=0;d--)if(!O(e[l=i[d]],r[l],a,o))return!1;return a.pop(),o.pop(),!0}var _,D,k=(_="".concat(+new Date),D=0,function(){var e="".concat(+new Date);return e===_?D+=1:D=0,"".concat(_=e,"x").concat(D)});function j(e,r){return Object.entries(e).reduce((function(e,t){var a=l(t,2),o=a[0],n=a[1],i=r(o,n);return void 0!==i&&(e[i]=n),e}),{})}function I(e){return void 0===e?e:String(e).replace(/^./,(function(e){return e.toLocaleLowerCase()}))}function A(e,r){return e*r/function e(r,t){return 0===t?r:e(t,r%t)}(e,r)}function C(e,r){for(var t=r.split("/"),a=0;a<t.length;a+=1){if(void 0===e)return;e=""===t[a]?e:e[t[a]]}return e}function R(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e;if(!e.startsWith("#"))throw new Error("Could not find a definition for ".concat(t,"."));var a=C(r,e=decodeURIComponent(e.substring(1)));if(void 0===a)throw new Error("Could not find a definition for ".concat(t,"."));return a.hasOwnProperty("$ref")?R(a.$ref,r):a}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function $(e,r){return e(r={exports:{}},r.exports),r.exports}function N(e){return e&&e.default||e}var L,T=$((function(e,r){ /** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ -!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var a=r.length-1,o=1;o<a;++o)r[o]=r[o].slice(1,-1);return r[a]=r[a].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function a(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function n(e){var a=r("[0-9]","[A-Fa-f]"),o=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),n="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",i=r("[\\:\\/\\?\\#\\[\\]\\@]",n),s=e?"[\\uE000-\\uF8FF]":"[]",l=r("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t("[A-Za-z]"+r("[A-Za-z]","[0-9]","[\\+\\-\\.]")+"*"),t(t(o+"|"+r(l,n,"[\\:]"))+"*");var u=t(t("25[0-5]")+"|"+t("2[0-4][0-9]")+"|"+t("1[0-9][0-9]")+"|"+t("0?[1-9][0-9]")+"|0?0?[0-9]"),c=t(u+"\\."+u+"\\."+u+"\\."+u),d=t(a+"{1,4}"),m=t(t(d+"\\:"+d)+"|"+c),p=t(t(d+"\\:")+"{6}"+m),h=t("\\:\\:"+t(d+"\\:")+"{5}"+m),f=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+m),v=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+m),g=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+m),y=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+m),b=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+m),P=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),w=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),E=t([p,h,f,v,g,y,b,P,w].join("|")),S=t(t(l+"|"+o)+"+");t("[vV]"+a+"+\\."+r(l,n,"[\\:]")+"+"),t(t(o+"|"+r(l,n))+"*");var x=t(o+"|"+r(l,n,"[\\:\\@]"));return t(t(o+"|"+r(l,n,"[\\@]"))+"+"),t(t(x+"|"+r("[\\/\\?]",s))+"*"),{NOT_SCHEME:new RegExp(r("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,n),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,n),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,n),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,n),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,n,"[\\:\\@\\/\\?]",s),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,n,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,n),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,i),"g"),PCT_ENCODED:new RegExp(o,"g"),IPV4ADDRESS:new RegExp("^("+c+")$"),IPV6ADDRESS:new RegExp("^\\[?("+E+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+S+")")+"?\\]?$")}}var i=n(!1),s=n(!0),l=function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,r){var t=[],a=!0,o=!1,n=void 0;try{for(var i,s=e[Symbol.iterator]();!(a=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);a=!0);}catch(e){o=!0,n=e}finally{try{!a&&s.return&&s.return()}finally{if(o)throw n}}return t}(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")},u=2147483647,c=/^xn--/,d=/[^\0-\x7E]/,m=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,f=String.fromCharCode;function v(e){throw new RangeError(p[e])}function g(e,r){var t=e.split("@"),a="";t.length>1&&(a=t[0]+"@",e=t[1]);var o=function(e,r){for(var t=[],a=e.length;a--;)t[a]=r(e[a]);return t}((e=e.replace(m,".")).split("."),r).join(".");return a+o}function y(e){for(var r=[],t=0,a=e.length;t<a;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<a){var 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}var b=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},P=function(e,r,t){var a=0;for(e=t?h(e/700):e>>1,e+=h(e/r);e>455;a+=36)e=h(e/35);return h(a+36*e/(e+38))},w=function(e){var r,t=[],a=e.length,o=0,n=128,i=72,s=e.lastIndexOf("-");s<0&&(s=0);for(var l=0;l<s;++l)e.charCodeAt(l)>=128&&v("not-basic"),t.push(e.charCodeAt(l));for(var c=s>0?s+1:0;c<a;){for(var d=o,m=1,p=36;;p+=36){c>=a&&v("invalid-input");var f=(r=e.charCodeAt(c++))-48<10?r-22:r-65<26?r-65:r-97<26?r-97:36;(f>=36||f>h((u-o)/m))&&v("overflow"),o+=f*m;var g=p<=i?1:p>=i+26?26:p-i;if(f<g)break;var y=36-g;m>h(u/y)&&v("overflow"),m*=y}var b=t.length+1;i=P(o-d,b,0==d),h(o/b)>u-n&&v("overflow"),n+=h(o/b),o%=b,t.splice(o++,0,n)}return String.fromCodePoint.apply(String,t)},E=function(e){var r=[],t=(e=y(e)).length,a=128,o=0,n=72,i=!0,s=!1,l=void 0;try{for(var c,d=e[Symbol.iterator]();!(i=(c=d.next()).done);i=!0){var m=c.value;m<128&&r.push(f(m))}}catch(e){s=!0,l=e}finally{try{!i&&d.return&&d.return()}finally{if(s)throw l}}var p=r.length,g=p;for(p&&r.push("-");g<t;){var w=u,E=!0,S=!1,x=void 0;try{for(var F,O=e[Symbol.iterator]();!(E=(F=O.next()).done);E=!0){var _=F.value;_>=a&&_<w&&(w=_)}}catch(e){S=!0,x=e}finally{try{!E&&O.return&&O.return()}finally{if(S)throw x}}var D=g+1;w-a>h((u-o)/D)&&v("overflow"),o+=(w-a)*D,a=w;var k=!0,j=!1,I=void 0;try{for(var A,C=e[Symbol.iterator]();!(k=(A=C.next()).done);k=!0){var R=A.value;if(R<a&&++o>u&&v("overflow"),R==a){for(var $=o,N=36;;N+=36){var L=N<=n?1:N>=n+26?26:N-n;if($<L)break;var T=$-L,z=36-L;r.push(f(b(L+T%z,0))),$=h(T/z)}r.push(f(b($,0))),n=P(o,D,g==p),o=0,++g}}}catch(e){j=!0,I=e}finally{try{!k&&C.return&&C.return()}finally{if(j)throw I}}++o,++a}return r.join("")},S=function(e){return g(e,(function(e){return d.test(e)?"xn--"+E(e):e}))},x=function(e){return g(e,(function(e){return c.test(e)?w(e.slice(4).toLowerCase()):e}))},F={};function O(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function _(e){for(var r="",t=0,a=e.length;t<a;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(a-t>=6){var n=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&n)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(a-t>=9){var i=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function D(e,r){function t(e){var t=_(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,O).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,O).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,O).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,O).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,O).replace(r.PCT_ENCODED,o)),e}function k(e){return e.replace(/^0*(.*)/,"$1")||"0"}function j(e,r){var t=e.match(r.IPV4ADDRESS)||[],a=l(t,2)[1];return a?a.split(".").map(k).join("."):e}function I(e,r){var t=e.match(r.IPV6ADDRESS)||[],a=l(t,3),o=a[1],n=a[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),u=s[0],c=s[1],d=c?c.split(":").map(k):[],m=u.split(":").map(k),p=r.IPV4ADDRESS.test(m[m.length-1]),h=p?7:8,f=m.length-h,v=Array(h),g=0;g<h;++g)v[g]=d[g]||m[f+g]||"";p&&(v[h-1]=j(v[h-1],r));var y=v.reduce((function(e,r,t){if(!r||"0"===r){var a=e[e.length-1];a&&a.index+a.length===t?a.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(y&&y.length>1){var P=v.slice(0,y.index),w=v.slice(y.index+y.length);b=P.join(":")+"::"+w.join(":")}else b=v.join(":");return n&&(b+="%"+n),b}return e}var A=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,C=void 0==="".match(/(){0}/)[1];function R(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},a=!1!==r.iri?s:i;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(A);if(o){C?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=I(j(t.host,a),a)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var n=F[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||n&&n.unicodeSupport)D(t,a);else{if(t.host&&(r.domainHost||n&&n.domainHost))try{t.host=S(t.host.replace(a.PCT_ENCODED,_).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}D(t,i)}n&&n.parse&&n.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function $(e,r){var t=!1!==r.iri?s:i,a=[];return void 0!==e.userinfo&&(a.push(e.userinfo),a.push("@")),void 0!==e.host&&a.push(I(j(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(a.push(":"),a.push(String(e.port))),a.length?a.join(""):void 0}var N=/^\.\.?\//,L=/^\/\.(\/|$)/,T=/^\/\.\.(\/|$)/,z=/^\/?(?:.|\n)*?(?=\/|$)/;function V(e){for(var r=[];e.length;)if(e.match(N))e=e.replace(N,"");else if(e.match(L))e=e.replace(L,"/");else if(e.match(T))e=e.replace(T,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(z);if(!t)throw new Error("Unexpected dot segment condition");var a=t[0];e=e.slice(a.length),r.push(a)}return r.join("")}function q(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?s:i,a=[],o=F[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?x(e.host):S(e.host.replace(t.PCT_ENCODED,_).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}D(e,t),"suffix"!==r.reference&&e.scheme&&(a.push(e.scheme),a.push(":"));var n=$(e,r);if(void 0!==n&&("suffix"!==r.reference&&a.push("//"),a.push(n),e.path&&"/"!==e.path.charAt(0)&&a.push("/")),void 0!==e.path){var l=e.path;r.absolutePath||o&&o.absolutePath||(l=V(l)),void 0===n&&(l=l.replace(/^\/\//,"/%2F")),a.push(l)}return void 0!==e.query&&(a.push("?"),a.push(e.query)),void 0!==e.fragment&&(a.push("#"),a.push(e.fragment)),a.join("")}function M(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],o={};return a||(e=R(q(e,t),t),r=R(q(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=V(r.path||""),o.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=V(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=V(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=V(o.path)),o.query=r.query):(o.path=e.path,void 0!==r.query?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function W(e,r){return e&&e.toString().replace(r&&r.iri?s.PCT_ENCODED:i.PCT_ENCODED,_)}var B={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},U={scheme:"https",domainHost:B.domainHost,parse:B.parse,serialize:B.serialize};function Q(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var H={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=Q(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(Q(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),a=l(t,2),o=a[0],n=a[1];e.path=o&&"/"!==o?o:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}},K={scheme:"wss",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize},G={},J="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Z="[0-9A-Fa-f]",Y=t(t("%[EFef]"+Z+"%"+Z+Z+"%"+Z+Z)+"|"+t("%[89A-Fa-f]"+Z+"%"+Z+Z)+"|"+t("%"+Z+Z)),X=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),ee=new RegExp(J,"g"),re=new RegExp(Y,"g"),te=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',X),"g"),ae=new RegExp(r("[^]",J,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),oe=ae;function ne(e){var r=_(e);return r.match(ee)?r:e}var ie={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,n={},i=t.query.split("&"),s=0,l=i.length;s<l;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var c=u[1].split(","),d=0,m=c.length;d<m;++d)a.push(c[d]);break;case"subject":t.subject=W(u[1],r);break;case"body":t.body=W(u[1],r);break;default:o=!0,n[W(u[0],r)]=W(u[1],r)}}o&&(t.headers=n)}t.query=void 0;for(var p=0,h=a.length;p<h;++p){var f=a[p].split("@");if(f[0]=W(f[0]),r.unicodeSupport)f[1]=W(f[1],r).toLowerCase();else try{f[1]=S(W(f[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}a[p]=f.join("@")}return t},serialize:function(e,r){var t,a=e,n=null!=(t=e.to)?t instanceof Array?t:"number"!=typeof t.length||t.split||t.setInterval||t.call?[t]:Array.prototype.slice.call(t):[];if(n){for(var i=0,s=n.length;i<s;++i){var l=String(n[i]),u=l.lastIndexOf("@"),c=l.slice(0,u).replace(re,ne).replace(re,o).replace(te,O),d=l.slice(u+1);try{d=r.iri?x(d):S(W(d,r).toLowerCase())}catch(e){a.error=a.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=c+"@"+d}a.path=n.join(",")}var m=e.headers=e.headers||{};e.subject&&(m.subject=e.subject),e.body&&(m.body=e.body);var p=[];for(var h in m)m[h]!==G[h]&&p.push(h.replace(re,ne).replace(re,o).replace(ae,O)+"="+m[h].replace(re,ne).replace(re,o).replace(oe,O));return p.length&&(a.query=p.join("&")),a}},se=/^([^\:]+)\:(.*)/,le={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(se),a=e;if(t){var o=r.scheme||a.scheme||"urn",n=t[1].toLowerCase(),i=t[2],s=o+":"+(r.nid||n),l=F[s];a.nid=n,a.nss=i,a.path=void 0,l&&(a=l.parse(a,r))}else a.error=a.error||"URN can not be parsed.";return a},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",a=e.nid,o=t+":"+(r.nid||a),n=F[o];n&&(e=n.serialize(e,r));var i=e,s=e.nss;return i.path=(a||r.nid)+":"+s,i}},ue=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ce={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match(ue)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};F[B.scheme]=B,F[U.scheme]=U,F[H.scheme]=H,F[K.scheme]=K,F[ie.scheme]=ie,F[le.scheme]=le,F[ce.scheme]=ce,e.SCHEMES=F,e.pctEncChar=O,e.pctDecChars=_,e.parse=R,e.removeDotSegments=V,e.serialize=q,e.resolveComponents=M,e.resolve=function(e,r,t){var a=function(e,r){var t=e;if(r)for(var a in r)t[a]=r[a];return t}({scheme:"null"},t);return q(M(R(e,a),R(r,a),a,!0),a)},e.normalize=function(e,r){return"string"==typeof e?e=q(R(e,r),r):"object"===a(e)&&(e=R(q(e,r),r)),e},e.equal=function(e,r,t){return"string"==typeof e?e=q(R(e,t),t):"object"===a(e)&&(e=q(e,t)),"string"==typeof r?r=q(R(r,t),t):"object"===a(r)&&(r=q(r,t)),e===r},e.escapeComponent=function(e,r){return e&&e.toString().replace(r&&r.iri?s.ESCAPE:i.ESCAPE,O)},e.unescapeComponent=W,Object.defineProperty(e,"__esModule",{value:!0})}(r)}));(L=T)&&L.__esModule&&Object.prototype.hasOwnProperty.call(L,"default")&&L.default;var z=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 a,o,n;if(Array.isArray(r)){if((a=r.length)!=t.length)return!1;for(o=a;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((a=(n=Object.keys(r)).length)!==Object.keys(t).length)return!1;for(o=a;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,n[o]))return!1;for(o=a;0!=o--;){var i=n[o];if(!e(r[i],t[i]))return!1}return!0}return r!=r&&t!=t},V={copy:function(e,r){for(var t in r=r||{},e)r[t]=e[t];return r},checkDataType:q,checkDataTypes:function(e,r,t){switch(e.length){case 1:return q(e[0],r,t,!0);default:var a="",o=W(e);for(var n in o.array&&o.object&&(a=o.null?"(":"(!"+r+" || ",a+="typeof "+r+' !== "object")',delete o.null,delete o.array,delete o.object),o.number&&delete o.integer,o)a+=(a?" && ":"")+q(n,r,t,!0);return a}},coerceToTypes:function(e,r){if(Array.isArray(r)){for(var t=[],a=0;a<r.length;a++){var o=r[a];(M[o]||"array"===e&&"array"===o)&&(t[t.length]=o)}if(t.length)return t}else{if(M[r])return[r];if("array"===e&&"array"===r)return["array"]}},toHash:W,getProperty:Q,escapeQuotes:H,equal:z,ucs2length:function(e){for(var r,t=0,a=e.length,o=0;o<a;)t++,(r=e.charCodeAt(o++))>=55296&&r<=56319&&o<a&&56320==(64512&(r=e.charCodeAt(o)))&&o++;return t},varOccurences:function(e,r){r+="[^0-9]";var t=e.match(new RegExp(r,"g"));return t?t.length:0},varReplace:function(e,r,t){return r+="([^0-9])",t=t.replace(/\$/g,"$$$$"),e.replace(new RegExp(r,"g"),t+"$1")},schemaHasRules:function(e,r){if("boolean"==typeof e)return!e;for(var t in e)if(r[t])return!0},schemaHasRulesExcept:function(e,r,t){if("boolean"==typeof e)return!e&&"not"!=t;for(var a in e)if(a!=t&&r[a])return!0},schemaUnknownRules:function(e,r){if("boolean"==typeof e)return;for(var t in e)if(!r[t])return t},toQuotedString:K,getPathExpr:function(e,r,t,a){return Z(e,t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'")},getPath:function(e,r,t){var a=K(t?"/"+Y(r):Q(r));return Z(e,a)},getData:function(e,r,t){var a,o,n,i;if(""===e)return"rootData";if("/"==e[0]){if(!G.test(e))throw new Error("Invalid JSON-pointer: "+e);o=e,n="rootData"}else{if(!(i=e.match(J)))throw new Error("Invalid JSON-pointer: "+e);if(a=+i[1],"#"==(o=i[2])){if(a>=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(n="data"+(r-a||""),!o)return n}for(var s=n,l=o.split("/"),u=0;u<l.length;u++){var c=l[u];c&&(n+=Q(X(c)),s+=" && "+n)}return s},unescapeFragment:function(e){return X(decodeURIComponent(e))},unescapeJsonPointer:X,escapeFragment:function(e){return encodeURIComponent(Y(e))},escapeJsonPointer:Y};function q(e,r,t,a){var o=a?" !== ":" === ",n=a?" || ":" && ",i=a?"!":"",s=a?"":"!";switch(e){case"null":return r+o+"null";case"array":return i+"Array.isArray("+r+")";case"object":return"("+i+r+n+"typeof "+r+o+'"object"'+n+s+"Array.isArray("+r+"))";case"integer":return"(typeof "+r+o+'"number"'+n+s+"("+r+" % 1)"+n+r+o+r+(t?n+i+"isFinite("+r+")":"")+")";case"number":return"(typeof "+r+o+'"'+e+'"'+(t?n+i+"isFinite("+r+")":"")+")";default:return"typeof "+r+o+'"'+e+'"'}}var M=W(["string","number","integer","boolean","null"]);function W(e){for(var r={},t=0;t<e.length;t++)r[e[t]]=!0;return r}var B=/^[a-z$_][a-z$_0-9]*$/i,U=/'|\\/g;function Q(e){return"number"==typeof e?"["+e+"]":B.test(e)?"."+e:"['"+H(e)+"']"}function H(e){return e.replace(U,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function K(e){return"'"+H(e)+"'"}var G=/^\/(?:[^~]|~0|~1)*$/,J=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Z(e,r){return'""'==e?r:(e+" + "+r).replace(/([^\\])' \+ '/g,"$1")}function Y(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function X(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}var ee=function(e){V.copy(e,this)};var re=$((function(e){var r=e.exports=function(e,t,a){"function"==typeof t&&(a=t,t={}),function e(t,a,o,n,i,s,l,u,c,d){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var m in a(n,i,s,l,u,c,d),n){var p=n[m];if(Array.isArray(p)){if(m in r.arrayKeywords)for(var h=0;h<p.length;h++)e(t,a,o,p[h],i+"/"+m+"/"+h,s,i,m,n,h)}else if(m in r.propsKeywords){if(p&&"object"==typeof p)for(var f in p)e(t,a,o,p[f],i+"/"+m+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),s,i,m,n,f)}else(m in r.keywords||t.allKeys&&!(m in r.skipKeywords))&&e(t,a,o,p,i+"/"+m,s,i,m,n)}o(n,i,s,l,u,c,d)}}(t,"function"==typeof(a=t.cb||a)?a:a.pre||function(){},a.post||function(){},e,"",e)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}})),te=ae;function ae(e,r,t){var a=this._refs[t];if("string"==typeof a){if(!this._refs[a])return ae.call(this,e,r,a);a=this._refs[a]}if((a=a||this._schemas[t])instanceof ee)return ue(a.schema,this._opts.inlineRefs)?a.schema:a.validate||this._compile(a);var o,n,i,s=oe.call(this,r,t);return s&&(o=s.schema,r=s.root,i=s.baseId),o instanceof ee?n=o.validate||e.call(this,o.schema,r,void 0,i):void 0!==o&&(n=ue(o,this._opts.inlineRefs)?o:e.call(this,o,r,void 0,i)),n}function oe(e,r){var t=T.parse(r),a=de(t),o=ce(this._getId(e.schema));if(0===Object.keys(e.schema).length||a!==o){var n=pe(a),i=this._refs[n];if("string"==typeof i)return ne.call(this,e,i,t);if(i instanceof ee)i.validate||this._compile(i),e=i;else{if(!((i=this._schemas[n])instanceof ee))return;if(i.validate||this._compile(i),n==pe(r))return{schema:i,root:e,baseId:o};e=i}if(!e.schema)return;o=ce(this._getId(e.schema))}return se.call(this,t,o,e.schema,e)}function ne(e,r,t){var a=oe.call(this,e,r);if(a){var o=a.schema,n=a.baseId;e=a.root;var i=this._getId(o);return i&&(n=he(n,i)),se.call(this,t,n,o,e)}}ae.normalizeId=pe,ae.fullPath=ce,ae.url=he,ae.ids=function(e){var r=pe(this._getId(e)),t={"":r},a={"":ce(r,!1)},o={},n=this;return re(e,{allKeys:!0},(function(e,r,i,s,l,u,c){if(""!==r){var d=n._getId(e),m=t[s],p=a[s]+"/"+l;if(void 0!==c&&(p+="/"+("number"==typeof c?c:V.escapeFragment(c))),"string"==typeof d){d=m=pe(m?T.resolve(m,d):d);var h=n._refs[d];if("string"==typeof h&&(h=n._refs[h]),h&&h.schema){if(!z(e,h.schema))throw new Error('id "'+d+'" resolves to more than one schema')}else if(d!=pe(p))if("#"==d[0]){if(o[d]&&!z(e,o[d]))throw new Error('id "'+d+'" resolves to more than one schema');o[d]=e}else n._refs[d]=p}t[r]=m,a[r]=p}})),o},ae.inlineRef=ue,ae.schema=oe;var ie=V.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function se(e,r,t,a){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var o=e.fragment.split("/"),n=1;n<o.length;n++){var i=o[n];if(i){if(void 0===(t=t[i=V.unescapeFragment(i)]))break;var s;if(!ie[i]&&((s=this._getId(t))&&(r=he(r,s)),t.$ref)){var l=he(r,t.$ref),u=oe.call(this,a,l);u&&(t=u.schema,a=u.root,r=u.baseId)}}}return void 0!==t&&t!==a.schema?{schema:t,root:a,baseId:r}:void 0}}var le=V.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function ue(e,r){return!1!==r&&(void 0===r||!0===r?function e(r){var t;if(Array.isArray(r)){for(var a=0;a<r.length;a++)if("object"==typeof(t=r[a])&&!e(t))return!1}else for(var o in r){if("$ref"==o)return!1;if("object"==typeof(t=r[o])&&!e(t))return!1}return!0}(e):r?function e(r){var t,a=0;if(Array.isArray(r)){for(var o=0;o<r.length;o++)if("object"==typeof(t=r[o])&&(a+=e(t)),a==1/0)return 1/0}else for(var n in r){if("$ref"==n)return 1/0;if(le[n])a++;else if("object"==typeof(t=r[n])&&(a+=e(t)+1),a==1/0)return 1/0}return a}(e)<=r:void 0)}function ce(e,r){return!1!==r&&(e=pe(e)),de(T.parse(e))}function de(e){return T.serialize(e).split("#")[0]+"#"}var me=/#\/?$/;function pe(e){return e?e.replace(me,""):""}function he(e,r){return r=pe(r),T.resolve(e,r)}var fe={Validation:ge((function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:ge(ve)};function ve(e,r,t){this.message=t||ve.message(e,r),this.missingRef=te.url(e,r),this.missingSchema=te.normalizeId(te.fullPath(this.missingRef))}function ge(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}ve.message=function(e,r){return"can't resolve reference "+r+" from id "+e};var ye=function(e,r){r||(r={}),"function"==typeof r&&(r={cmp:r});var t,a="boolean"==typeof r.cycles&&r.cycles,o=r.cmp&&(t=r.cmp,function(e){return function(r,a){var o={key:r,value:e[r]},n={key:a,value:e[a]};return t(o,n)}}),n=[];return function e(r){if(r&&r.toJSON&&"function"==typeof r.toJSON&&(r=r.toJSON()),void 0!==r){if("number"==typeof r)return isFinite(r)?""+r:"null";if("object"!=typeof r)return JSON.stringify(r);var t,i;if(Array.isArray(r)){for(i="[",t=0;t<r.length;t++)t&&(i+=","),i+=e(r[t])||"null";return i+"]"}if(null===r)return"null";if(-1!==n.indexOf(r)){if(a)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=n.push(r)-1,l=Object.keys(r).sort(o&&o(r));for(i="",t=0;t<l.length;t++){var u=l[t],c=e(r[u]);c&&(i&&(i+=","),i+=JSON.stringify(u)+":"+c)}return n.splice(s,1),"{"+i+"}"}}(e)},be=function(e,r,t){var a="",o=!0===e.schema.$async,n=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),i=e.self._getId(e.schema);if(e.opts.strictKeywords){var s=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(s){var l="unknown keyword: "+s;if("log"!==e.opts.strictKeywords)throw new Error(l);e.logger.warn(l)}}if(e.isTop&&(a+=" var validate = ",o&&(e.async=!0,a+="async "),a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",i&&(e.opts.sourceCode||e.opts.processCode)&&(a+=" /*# sourceURL="+i+" */ ")),"boolean"==typeof e.schema||!n&&!e.schema.$ref){var u=e.level,c=e.dataLevel,d=e.schema["false schema"],m=e.schemaPath+e.util.getProperty("false schema"),p=e.errSchemaPath+"/false schema",h=!e.opts.allErrors,f="data"+(c||""),v="valid"+u;if(!1===e.schema){e.isTop?h=!0:a+=" var "+v+" = false; ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'boolean schema is false' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";var g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?a+=o?" return data; ":" validate.errors = null; return true; ":a+=" var "+v+" = true; ";return e.isTop&&(a+=" }; return validate; "),a}if(e.isTop){var y=e.isTop;u=e.level=0,c=e.dataLevel=0,f="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var b="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}a+=" var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data; "}else{u=e.level,f="data"+((c=e.dataLevel)||"");if(i&&(e.baseId=e.resolve.url(e.baseId,i)),o&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+u+" = errors;"}v="valid"+u,h=!e.opts.allErrors;var P="",w="",E=e.schema.type,S=Array.isArray(E);if(E&&e.opts.nullable&&!0===e.schema.nullable&&(S?-1==E.indexOf("null")&&(E=E.concat("null")):"null"!=E&&(E=[E,"null"],S=!0)),S&&1==E.length&&(E=E[0],S=!1),e.schema.$ref&&n){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(n=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(a+=" "+e.RULES.all.$comment.code(e,"$comment")),E){if(e.opts.coerceTypes)var x=e.util.coerceToTypes(e.opts.coerceTypes,E);var F=e.RULES.types[E];if(x||S||!0===F||F&&!Z(F)){m=e.schemaPath+".type",p=e.errSchemaPath+"/type",m=e.schemaPath+".type",p=e.errSchemaPath+"/type";var O=S?"checkDataTypes":"checkDataType";if(a+=" if ("+e.util[O](E,f,e.opts.strictNumbers,!0)+") { ",x){var _="dataType"+u,D="coerced"+u;a+=" var "+_+" = typeof "+f+"; var "+D+" = undefined; ","array"==e.opts.coerceTypes&&(a+=" if ("+_+" == 'object' && Array.isArray("+f+") && "+f+".length == 1) { "+f+" = "+f+"[0]; "+_+" = typeof "+f+"; if ("+e.util.checkDataType(e.schema.type,f,e.opts.strictNumbers)+") "+D+" = "+f+"; } "),a+=" if ("+D+" !== undefined) ; ";var k=x;if(k)for(var j,I=-1,A=k.length-1;I<A;)"string"==(j=k[I+=1])?a+=" else if ("+_+" == 'number' || "+_+" == 'boolean') "+D+" = '' + "+f+"; else if ("+f+" === null) "+D+" = ''; ":"number"==j||"integer"==j?(a+=" else if ("+_+" == 'boolean' || "+f+" === null || ("+_+" == 'string' && "+f+" && "+f+" == +"+f+" ","integer"==j&&(a+=" && !("+f+" % 1)"),a+=")) "+D+" = +"+f+"; "):"boolean"==j?a+=" else if ("+f+" === 'false' || "+f+" === 0 || "+f+" === null) "+D+" = false; else if ("+f+" === 'true' || "+f+" === 1) "+D+" = true; ":"null"==j?a+=" else if ("+f+" === '' || "+f+" === 0 || "+f+" === false) "+D+" = null; ":"array"==e.opts.coerceTypes&&"array"==j&&(a+=" else if ("+_+" == 'string' || "+_+" == 'number' || "+_+" == 'boolean' || "+f+" == null) "+D+" = ["+f+"]; ");a+=" else { ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } if ("+D+" !== undefined) { ";var C=c?"data"+(c-1||""):"parentData";a+=" "+f+" = "+D+"; ",c||(a+="if ("+C+" !== undefined)"),a+=" "+C+"["+(c?e.dataPathArr[c]:"parentDataProperty")+"] = "+D+"; } "}else{(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } "}}if(e.schema.$ref&&!n)a+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",h&&(a+=" } if (errors === ",a+=y?"0":"errs_"+u,a+=") { ",w+="}");else{var R=e.RULES;if(R)for(var $=-1,N=R.length-1;$<N;)if(Z(F=R[$+=1])){if(F.type&&(a+=" if ("+e.util.checkDataType(F.type,f,e.opts.strictNumbers)+") { "),e.opts.useDefaults)if("object"==F.type&&e.schema.properties){d=e.schema.properties;var L=Object.keys(d);if(L)for(var T,z=-1,V=L.length-1;z<V;){if(void 0!==(W=d[T=L[z+=1]]).default){var q=f+e.util.getProperty(T);if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+q;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+q+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+q+" === null || "+q+" === '' "),a+=" ) "+q+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(W.default)+" ":a+=" "+JSON.stringify(W.default)+" ",a+="; "}}}else if("array"==F.type&&Array.isArray(e.schema.items)){var M=e.schema.items;if(M){I=-1;for(var W,B=M.length-1;I<B;)if(void 0!==(W=M[I+=1]).default){q=f+"["+I+"]";if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+q;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+q+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+q+" === null || "+q+" === '' "),a+=" ) "+q+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(W.default)+" ":a+=" "+JSON.stringify(W.default)+" ",a+="; "}}}var U=F.rules;if(U)for(var Q,H=-1,K=U.length-1;H<K;)if(Y(Q=U[H+=1])){var G=Q.code(e,Q.keyword,F.type);G&&(a+=" "+G+" ",h&&(P+="}"))}if(h&&(a+=" "+P+" ",P=""),F.type&&(a+=" } ",E&&E===F.type&&!x)){a+=" else { ";var J;m=e.schemaPath+".type",p=e.errSchemaPath+"/type";(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}h&&(a+=" if (errors === ",a+=y?"0":"errs_"+u,a+=") { ",w+="}")}}function Z(e){for(var r=e.rules,t=0;t<r.length;t++)if(Y(r[t]))return!0}function Y(r){return void 0!==e.schema[r.keyword]||r.implements&&function(r){for(var t=r.implements,a=0;a<t.length;a++)if(void 0!==e.schema[t[a]])return!0}(r)}return h&&(a+=" "+w+" "),y?(o?(a+=" if (errors === 0) return data; ",a+=" else throw new ValidationError(vErrors); "):(a+=" validate.errors = vErrors; ",a+=" return errors === 0; "),a+=" }; return validate;"):a+=" var "+v+" = errors === errs_"+u+";",a},Pe=V.ucs2length,we=fe.Validation,Ee=function e(r,t,a,o){var n=this,i=this._opts,s=[void 0],l={},u=[],c={},d=[],m={},p=[];t=t||{schema:r,refVal:s,refs:l};var h=Se.call(this,r,t,o),f=this._compilations[h.index];if(h.compiling)return f.callValidate=function e(){var r=f.validate,t=r.apply(this,arguments);return e.errors=r.errors,t};var v=this._formats,g=this.RULES;try{var y=P(r,t,a,o);f.validate=y;var b=f.callValidate;return b&&(b.schema=y.schema,b.errors=null,b.refs=y.refs,b.refVal=y.refVal,b.root=y.root,b.$async=y.$async,i.sourceCode&&(b.source=y.source)),y}finally{xe.call(this,r,t,o)}function P(r,a,o,c){var m=!a||a&&a.schema==r;if(a.schema!=t.schema)return e.call(n,r,a,o,c);var h,f=!0===r.$async,y=be({isTop:!0,schema:r,isRoot:m,baseId:c,root:a,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:fe.MissingRef,RULES:g,validate:be,util:V,resolve:te,resolveRef:w,usePattern:x,useDefault:F,useCustomRule:O,opts:i,formats:v,logger:n.logger,self:n});y=je(s,De)+je(u,Oe)+je(d,_e)+je(p,ke)+y,i.processCode&&(y=i.processCode(y,r));try{h=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",y)(n,g,v,t,s,d,p,z,Pe,we),s[0]=h}catch(e){throw n.logger.error("Error compiling schema, function code:",y),e}return h.schema=r,h.errors=null,h.refs=l,h.refVal=s,h.root=m?h:a,f&&(h.$async=!0),!0===i.sourceCode&&(h.source={code:y,patterns:u,defaults:d}),h}function w(r,o,u){o=te.url(r,o);var c,d,m=l[o];if(void 0!==m)return S(c=s[m],d="refVal["+m+"]");if(!u&&t.refs){var p=t.refs[o];if(void 0!==p)return S(c=t.refVal[p],d=E(o,c))}d=E(o);var h=te.call(n,P,t,o);if(void 0===h){var f=a&&a[o];f&&(h=te.inlineRef(f,i.inlineRefs)?f:e.call(n,f,t,a,r))}if(void 0!==h)return function(e,r){var t=l[e];s[t]=r}(o,h),S(h,d);!function(e){delete l[e]}(o)}function E(e,r){var t=s.length;return s[t]=r,l[e]=t,"refVal"+t}function S(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}function x(e){var r=c[e];return void 0===r&&(r=c[e]=u.length,u[r]=e),"pattern"+r}function F(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return V.toQuotedString(e);case"object":if(null===e)return"null";var r=ye(e),t=m[r];return void 0===t&&(t=m[r]=d.length,d[t]=e),"default"+t}}function O(e,r,t,a){if(!1!==n._opts.validateSchema){var o=e.definition.dependencies;if(o&&!o.every((function(e){return Object.prototype.hasOwnProperty.call(t,e)})))throw new Error("parent schema must have all required keywords: "+o.join(","));var s=e.definition.validateSchema;if(s)if(!s(r)){var l="keyword schema is invalid: "+n.errorsText(s.errors);if("log"!=n._opts.validateSchema)throw new Error(l);n.logger.error(l)}}var u,c=e.definition.compile,d=e.definition.inline,m=e.definition.macro;if(c)u=c.call(n,r,t,a);else if(m)u=m.call(n,r,t,a),!1!==i.validateSchema&&n.validateSchema(u,!0);else if(d)u=d.call(n,a,e.keyword,r,t);else if(!(u=e.definition.validate))return;if(void 0===u)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var h=p.length;return p[h]=u,{code:"customRule"+h,validate:u}}};function Se(e,r,t){var a=Fe.call(this,e,r,t);return a>=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}function xe(e,r,t){var a=Fe.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}function Fe(e,r,t){for(var a=0;a<this._compilations.length;a++){var o=this._compilations[a];if(o.schema==e&&o.root==r&&o.baseId==t)return a}return-1}function Oe(e,r){return"var pattern"+e+" = new RegExp("+V.toQuotedString(r[e])+");"}function _e(e){return"var default"+e+" = defaults["+e+"];"}function De(e,r){return void 0===r[e]?"":"var refVal"+e+" = refVal["+e+"];"}function ke(e){return"var customRule"+e+" = customRules["+e+"];"}function je(e,r){if(!e.length)return"";for(var t="",a=0;a<e.length;a++)t+=r(a,e);return t}var Ie=$((function(e){var r=e.exports=function(){this._cache={}};r.prototype.put=function(e,r){this._cache[e]=r},r.prototype.get=function(e){return this._cache[e]},r.prototype.del=function(e){delete this._cache[e]},r.prototype.clear=function(){this._cache={}}})),Ae=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Ce=[0,31,28,31,30,31,30,31,31,30,31,30,31],Re=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,$e=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,Ne=/^(?:[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,Le=/^(?:(?:[^\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,Te=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,ze=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Ve=/^(?:\/(?:[^~/]|~0|~1)*)*$/,qe=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Me=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,We=Be;function Be(e){return e="full"==e?"full":"fast",V.copy(Be[e])}function Ue(e){var r=e.match(Ae);if(!r)return!1;var t=+r[1],a=+r[2],o=+r[3];return a>=1&&a<=12&&o>=1&&o<=(2==a&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(t)?29:Ce[a])}function Qe(e,r){var t=e.match(Re);if(!t)return!1;var a=t[1],o=t[2],n=t[3],i=t[5];return(a<=23&&o<=59&&n<=59||23==a&&59==o&&60==n)&&(!r||i)}Be.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":Le,url:Te,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:$e,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:Je,uuid:ze,"json-pointer":Ve,"json-pointer-uri-fragment":qe,"relative-json-pointer":Me},Be.full={date:Ue,time:Qe,"date-time":function(e){var r=e.split(He);return 2==r.length&&Ue(r[0])&&Qe(r[1],!0)},uri:function(e){return Ke.test(e)&&Ne.test(e)},"uri-reference":/^(?:[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,"uri-template":Le,url:Te,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:$e,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:Je,uuid:ze,"json-pointer":Ve,"json-pointer-uri-fragment":qe,"relative-json-pointer":Me};var He=/t|\s/i;var Ke=/\/|:/;var Ge=/[^\\]\\Z/;function Je(e){if(Ge.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var Ze=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s;var p="maximum"==r,h=p?"exclusiveMaximum":"exclusiveMinimum",f=e.schema[h],v=e.opts.$data&&f&&f.$data,g=p?"<":">",y=p?">":"<",b=void 0;if(!m&&"number"!=typeof s&&void 0!==s)throw new Error(r+" must be number");if(!v&&void 0!==f&&"number"!=typeof f&&"boolean"!=typeof f)throw new Error(h+" must be number or boolean");if(v){var P=e.util.getData(f.$data,i,e.dataPathArr),w="exclusive"+n,E="exclType"+n,S="exclIsNumber"+n,x="' + "+(_="op"+n)+" + '";o+=" var schemaExcl"+n+" = "+P+"; ",o+=" var "+w+"; var "+E+" = typeof "+(P="schemaExcl"+n)+"; if ("+E+" != 'boolean' && "+E+" != 'undefined' && "+E+" != 'number') { ";var F;b=h;(F=F||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(o+=" , message: '"+h+" should be boolean' "),e.opts.verbose&&(o+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var O=o;o=F.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+E+" == 'number' ? ( ("+w+" = "+a+" === undefined || "+P+" "+g+"= "+a+") ? "+d+" "+y+"= "+P+" : "+d+" "+y+" "+a+" ) : ( ("+w+" = "+P+" === true) ? "+d+" "+y+"= "+a+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { var op"+n+" = "+w+" ? '"+g+"' : '"+g+"='; ",void 0===s&&(b=h,u=e.errSchemaPath+"/"+h,a=P,m=v)}else{x=g;if((S="number"==typeof f)&&m){var _="'"+x+"'";o+=" if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" ( "+a+" === undefined || "+f+" "+g+"= "+a+" ? "+d+" "+y+"= "+f+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { "}else{S&&void 0===s?(w=!0,b=h,u=e.errSchemaPath+"/"+h,a=f,y+="="):(S&&(a=Math[p?"min":"max"](f,s)),f===(!S||a)?(w=!0,b=h,u=e.errSchemaPath+"/"+h,y+="="):(w=!1,x+="="));_="'"+x+"'";o+=" if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+" "+y+" "+a+" || "+d+" !== "+d+") { "}}b=b||r,(F=F||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+_+", limit: "+a+", exclusive: "+w+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be "+x+" ",o+=m?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";O=o;return o=F.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",c&&(o+=" else { "),o},Ye=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+".length "+("maxItems"==r?">":"<")+" "+a+") { ";var p=r,h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxItems"==r?"more":"fewer",o+=" than ",o+=m?"' + "+a+" + '":""+s,o+=" items' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=h.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},Xe=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");var p="maxLength"==r?">":"<";o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),!1===e.opts.unicode?o+=" "+d+".length ":o+=" ucs2length("+d+") ",o+=" "+p+" "+a+") { ";var h=r,f=f||[];f.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(h||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT be ",o+="maxLength"==r?"longer":"shorter",o+=" than ",o+=m?"' + "+a+" + '":""+s,o+=" characters' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var v=o;return o=f.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+v+"]); ":o+=" validate.errors = ["+v+"]; return false; ":o+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},er=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" Object.keys("+d+").length "+("maxProperties"==r?">":"<")+" "+a+") { ";var p=r,h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxProperties"==r?"more":"fewer",o+=" than ",o+=m?"' + "+a+" + '":""+s,o+=" properties' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=h.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},rr={$ref:function(e,r,t){var a,o,n=" ",i=e.level,s=e.dataLevel,l=e.schema[r],u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(s||""),m="valid"+i;if("#"==l||"#/"==l)e.isRoot?(a=e.async,o="validate"):(a=!0===e.root.schema.$async,o="root.refVal[0]");else{var p=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===p){var h=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(h),(y=y||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(n+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(n+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ";var f=n;n=y.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+f+"]); ":n+=" validate.errors = ["+f+"]; return false; ":n+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(n+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,l,h);e.logger.warn(h),c&&(n+=" if (true) { ")}}else if(p.inline){var v=e.util.copy(e);v.level++;var g="valid"+v.level;v.schema=p.schema,v.schemaPath="",v.errSchemaPath=l,n+=" "+e.validate(v).replace(/validate\.schema/g,p.code)+" ",c&&(n+=" if ("+g+") { ")}else a=!0===p.$async||e.async&&!1!==p.$async,o=p.code}if(o){var y;(y=y||[]).push(n),n="",e.opts.passContext?n+=" "+o+".call(this, ":n+=" "+o+"( ",n+=" "+d+", (dataPath || '')",'""'!=e.errorPath&&(n+=" + "+e.errorPath);var b=n+=" , "+(s?"data"+(s-1||""):"parentData")+" , "+(s?e.dataPathArr[s]:"parentDataProperty")+", rootData) ";if(n=y.pop(),a){if(!e.async)throw new Error("async schema referenced by sync schema");c&&(n+=" var "+m+"; "),n+=" try { await "+b+"; ",c&&(n+=" "+m+" = true; "),n+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",c&&(n+=" "+m+" = false; "),n+=" } ",c&&(n+=" if ("+m+") { ")}else n+=" if (!"+b+") { if (vErrors === null) vErrors = "+o+".errors; else vErrors = vErrors.concat("+o+".errors); errors = vErrors.length; } ",c&&(n+=" else { ")}return n},allOf:function(e,r,t){var a=" ",o=e.schema[r],n=e.schemaPath+e.util.getProperty(r),i=e.errSchemaPath+"/"+r,s=!e.opts.allErrors,l=e.util.copy(e),u="";l.level++;var c="valid"+l.level,d=l.baseId,m=!0,p=o;if(p)for(var h,f=-1,v=p.length-1;f<v;)h=p[f+=1],(e.opts.strictKeywords?"object"==typeof h&&Object.keys(h).length>0||!1===h:e.util.schemaHasRules(h,e.RULES.all))&&(m=!1,l.schema=h,l.schemaPath=n+"["+f+"]",l.errSchemaPath=i+"/"+f,a+=" "+e.validate(l)+" ",l.baseId=d,s&&(a+=" if ("+c+") { ",u+="}"));return s&&(a+=m?" if (true) { ":" "+u.slice(0,-1)+" "),a},anyOf:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e),h="";p.level++;var f="valid"+p.level;if(i.every((function(r){return e.opts.strictKeywords?"object"==typeof r&&Object.keys(r).length>0||!1===r:e.util.schemaHasRules(r,e.RULES.all)}))){var v=p.baseId;a+=" var "+m+" = errors; var "+d+" = false; ";var g=e.compositeRule;e.compositeRule=p.compositeRule=!0;var y=i;if(y)for(var b,P=-1,w=y.length-1;P<w;)b=y[P+=1],p.schema=b,p.schemaPath=s+"["+P+"]",p.errSchemaPath=l+"/"+P,a+=" "+e.validate(p)+" ",p.baseId=v,a+=" "+d+" = "+d+" || "+f+"; if (!"+d+") { ",h+="}";e.compositeRule=p.compositeRule=g,a+=" "+h+" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } else { errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else u&&(a+=" if (true) { ");return a},$comment:function(e,r,t){var a=" ",o=e.schema[r],n=e.errSchemaPath+"/"+r;e.opts.allErrors;var i=e.util.toQuotedString(o);return!0===e.opts.$comment?a+=" console.log("+i+");":"function"==typeof e.opts.$comment&&(a+=" self._opts.$comment("+i+", "+e.util.toQuotedString(n)+", validate.root.schema);"),a},const:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m=e.opts.$data&&i&&i.$data;m&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; "),m||(a+=" var schema"+o+" = validate.schema"+s+";"),a+="var "+d+" = equal("+c+", schema"+o+"); if (!"+d+") { ";var p=p||[];p.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValue: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var h=a;return a=p.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+h+"]); ":a+=" validate.errors = ["+h+"]; return false; ":a+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",u&&(a+=" else { "),a},contains:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level,f="i"+o,v=p.dataLevel=e.dataLevel+1,g="data"+v,y=e.baseId,b=e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all);if(a+="var "+m+" = errors;var "+d+";",b){var P=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=i,p.schemaPath=s,p.errSchemaPath=l,a+=" var "+h+" = false; for (var "+f+" = 0; "+f+" < "+c+".length; "+f+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers,!0);var w=c+"["+f+"]";p.dataPathArr[v]=f;var E=e.validate(p);p.baseId=y,e.util.varOccurences(E,g)<2?a+=" "+e.util.varReplace(E,g,w)+" ":a+=" var "+g+" = "+w+"; "+E+" ",a+=" if ("+h+") break; } ",e.compositeRule=p.compositeRule=P,a+=" if (!"+h+") {"}else a+=" if ("+c+".length == 0) {";var S=S||[];S.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should contain a valid item' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var x=a;return a=S.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",b&&(a+=" errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a},dependencies:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="errs__"+o,m=e.util.copy(e),p="";m.level++;var h="valid"+m.level,f={},v={},g=e.opts.ownProperties;for(w in i)if("__proto__"!=w){var y=i[w],b=Array.isArray(y)?v:f;b[w]=y}a+="var "+d+" = errors;";var P=e.errorPath;for(var w in a+="var missing"+o+";",v)if((b=v[w]).length){if(a+=" if ( "+c+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(w)+"') "),u){a+=" && ( ";var E=b;if(E)for(var S=-1,x=E.length-1;S<x;){j=E[S+=1],S&&(a+=" || "),a+=" ( ( "+(R=c+(C=e.util.getProperty(j)))+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(j)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?j:C)+") ) "}a+=")) { ";var F="missing"+o,O="' + "+F+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,F,!0):P+" + "+F);var _=_||[];_.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var D=a;a=_.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+D+"]); ":a+=" validate.errors = ["+D+"]; return false; ":a+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{a+=" ) { ";var k=b;if(k)for(var j,I=-1,A=k.length-1;I<A;){j=k[I+=1];var C=e.util.getProperty(j),R=(O=e.util.escapeQuotes(j),c+C);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,j,e.opts.jsonPointers)),a+=" if ( "+R+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(j)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",u&&(p+="}",a+=" else { ")}e.errorPath=P;var $=m.baseId;for(var w in f){y=f[w];(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all))&&(a+=" "+h+" = true; if ( "+c+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(w)+"') "),a+=") { ",m.schema=y,m.schemaPath=s+e.util.getProperty(w),m.errSchemaPath=l+"/"+e.util.escapeFragment(w),a+=" "+e.validate(m)+" ",m.baseId=$,a+=" } ",u&&(a+=" if ("+h+") { ",p+="}"))}return u&&(a+=" "+p+" if ("+d+" == errors) {"),a},enum:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m=e.opts.$data&&i&&i.$data;m&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ");var p="i"+o,h="schema"+o;m||(a+=" var "+h+" = validate.schema"+s+";"),a+="var "+d+";",m&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=d+" = false;for (var "+p+"=0; "+p+"<"+h+".length; "+p+"++) if (equal("+c+", "+h+"["+p+"])) { "+d+" = true; break; }",m&&(a+=" } "),a+=" if (!"+d+") { ";var f=f||[];f.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var v=a;return a=f.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+v+"]); ":a+=" validate.errors = ["+v+"]; return false; ":a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",u&&(a+=" else { "),a},format:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||"");if(!1===e.opts.format)return u&&(a+=" if (true) { "),a;var d,m=e.opts.$data&&i&&i.$data;m?(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ",d="schema"+o):d=i;var p=e.opts.unknownFormats,h=Array.isArray(p);if(m){a+=" var "+(f="format"+o)+" = formats["+d+"]; var "+(v="isObject"+o)+" = typeof "+f+" == 'object' && !("+f+" instanceof RegExp) && "+f+".validate; var "+(g="formatType"+o)+" = "+v+" && "+f+".type || 'string'; if ("+v+") { ",e.async&&(a+=" var async"+o+" = "+f+".async; "),a+=" "+f+" = "+f+".validate; } if ( ",m&&(a+=" ("+d+" !== undefined && typeof "+d+" != 'string') || "),a+=" (","ignore"!=p&&(a+=" ("+d+" && !"+f+" ",h&&(a+=" && self._opts.unknownFormats.indexOf("+d+") == -1 "),a+=") || "),a+=" ("+f+" && "+g+" == '"+t+"' && !(typeof "+f+" == 'function' ? ",e.async?a+=" (async"+o+" ? await "+f+"("+c+") : "+f+"("+c+")) ":a+=" "+f+"("+c+") ",a+=" : "+f+".test("+c+"))))) {"}else{var f;if(!(f=e.formats[i])){if("ignore"==p)return e.logger.warn('unknown format "'+i+'" ignored in schema at path "'+e.errSchemaPath+'"'),u&&(a+=" if (true) { "),a;if(h&&p.indexOf(i)>=0)return u&&(a+=" if (true) { "),a;throw new Error('unknown format "'+i+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,g=(v="object"==typeof f&&!(f instanceof RegExp)&&f.validate)&&f.type||"string";if(v){var y=!0===f.async;f=f.validate}if(g!=t)return u&&(a+=" if (true) { "),a;if(y){if(!e.async)throw new Error("async format in sync schema");a+=" if (!(await "+(b="formats"+e.util.getProperty(i)+".validate")+"("+c+"))) { "}else{a+=" if (! ";var b="formats"+e.util.getProperty(i);v&&(b+=".validate"),a+="function"==typeof f?" "+b+"("+c+") ":" "+b+".test("+c+") ",a+=") { "}}var P=P||[];P.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",a+=m?""+d:""+e.util.toQuotedString(i),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",a+=m?"' + "+d+" + '":""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=m?"validate.schema"+s:""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var w=a;return a=P.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",u&&(a+=" else { "),a},if:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level,f=e.schema.then,v=e.schema.else,g=void 0!==f&&(e.opts.strictKeywords?"object"==typeof f&&Object.keys(f).length>0||!1===f:e.util.schemaHasRules(f,e.RULES.all)),y=void 0!==v&&(e.opts.strictKeywords?"object"==typeof v&&Object.keys(v).length>0||!1===v:e.util.schemaHasRules(v,e.RULES.all)),b=p.baseId;if(g||y){var P;p.createErrors=!1,p.schema=i,p.schemaPath=s,p.errSchemaPath=l,a+=" var "+m+" = errors; var "+d+" = true; ";var w=e.compositeRule;e.compositeRule=p.compositeRule=!0,a+=" "+e.validate(p)+" ",p.baseId=b,p.createErrors=!0,a+=" errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } ",e.compositeRule=p.compositeRule=w,g?(a+=" if ("+h+") { ",p.schema=e.schema.then,p.schemaPath=e.schemaPath+".then",p.errSchemaPath=e.errSchemaPath+"/then",a+=" "+e.validate(p)+" ",p.baseId=b,a+=" "+d+" = "+h+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'then'; ":P="'then'",a+=" } ",y&&(a+=" else { ")):a+=" if (!"+h+") { ",y&&(p.schema=e.schema.else,p.schemaPath=e.schemaPath+".else",p.errSchemaPath=e.errSchemaPath+"/else",a+=" "+e.validate(p)+" ",p.baseId=b,a+=" "+d+" = "+h+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'else'; ":P="'else'",a+=" } "),a+=" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+P+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match \"' + "+P+" + '\" schema' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",u&&(a+=" else { ")}else u&&(a+=" if (true) { ");return a},items:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e),h="";p.level++;var f="valid"+p.level,v="i"+o,g=p.dataLevel=e.dataLevel+1,y="data"+g,b=e.baseId;if(a+="var "+m+" = errors;var "+d+";",Array.isArray(i)){var P=e.schema.additionalItems;if(!1===P){a+=" "+d+" = "+c+".length <= "+i.length+"; ";var w=l;l=e.errSchemaPath+"/additionalItems",a+=" if (!"+d+") { ";var E=E||[];E.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+i.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+i.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var S=a;a=E.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",l=w,u&&(h+="}",a+=" else { ")}var x=i;if(x)for(var F,O=-1,_=x.length-1;O<_;)if(F=x[O+=1],e.opts.strictKeywords?"object"==typeof F&&Object.keys(F).length>0||!1===F:e.util.schemaHasRules(F,e.RULES.all)){a+=" "+f+" = true; if ("+c+".length > "+O+") { ";var D=c+"["+O+"]";p.schema=F,p.schemaPath=s+"["+O+"]",p.errSchemaPath=l+"/"+O,p.errorPath=e.util.getPathExpr(e.errorPath,O,e.opts.jsonPointers,!0),p.dataPathArr[g]=O;var k=e.validate(p);p.baseId=b,e.util.varOccurences(k,y)<2?a+=" "+e.util.varReplace(k,y,D)+" ":a+=" var "+y+" = "+D+"; "+k+" ",a+=" } ",u&&(a+=" if ("+f+") { ",h+="}")}if("object"==typeof P&&(e.opts.strictKeywords?"object"==typeof P&&Object.keys(P).length>0||!1===P:e.util.schemaHasRules(P,e.RULES.all))){p.schema=P,p.schemaPath=e.schemaPath+".additionalItems",p.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+f+" = true; if ("+c+".length > "+i.length+") { for (var "+v+" = "+i.length+"; "+v+" < "+c+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=c+"["+v+"]";p.dataPathArr[g]=v;k=e.validate(p);p.baseId=b,e.util.varOccurences(k,y)<2?a+=" "+e.util.varReplace(k,y,D)+" ":a+=" var "+y+" = "+D+"; "+k+" ",u&&(a+=" if (!"+f+") break; "),a+=" } } ",u&&(a+=" if ("+f+") { ",h+="}")}}else if(e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){p.schema=i,p.schemaPath=s,p.errSchemaPath=l,a+=" for (var "+v+" = 0; "+v+" < "+c+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=c+"["+v+"]";p.dataPathArr[g]=v;k=e.validate(p);p.baseId=b,e.util.varOccurences(k,y)<2?a+=" "+e.util.varReplace(k,y,D)+" ":a+=" var "+y+" = "+D+"; "+k+" ",u&&(a+=" if (!"+f+") break; "),a+=" }"}return u&&(a+=" "+h+" if ("+m+" == errors) {"),a},maximum:Ze,minimum:Ze,maxItems:Ye,minItems:Ye,maxLength:Xe,minLength:Xe,maxProperties:er,minProperties:er,multipleOf:function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");o+="var division"+n+";if (",m&&(o+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),o+=" (division"+n+" = "+d+" / "+a+", ",e.opts.multipleOfPrecision?o+=" Math.abs(Math.round(division"+n+") - division"+n+") > 1e-"+e.opts.multipleOfPrecision+" ":o+=" division"+n+" !== parseInt(division"+n+") ",o+=" ) ",m&&(o+=" ) "),o+=" ) { ";var p=p||[];p.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be multiple of ",o+=m?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var h=o;return o=p.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+h+"]); ":o+=" validate.errors = ["+h+"]; return false; ":o+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},not:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="errs__"+o,m=e.util.copy(e);m.level++;var p="valid"+m.level;if(e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){m.schema=i,m.schemaPath=s,m.errSchemaPath=l,a+=" var "+d+" = errors; ";var h,f=e.compositeRule;e.compositeRule=m.compositeRule=!0,m.createErrors=!1,m.opts.allErrors&&(h=m.opts.allErrors,m.opts.allErrors=!1),a+=" "+e.validate(m)+" ",m.createErrors=!0,h&&(m.opts.allErrors=h),e.compositeRule=m.compositeRule=f,a+=" if ("+p+") { ";var v=v||[];v.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var g=a;a=v.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(a+=" if (false) { ");return a},oneOf:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e),h="";p.level++;var f="valid"+p.level,v=p.baseId,g="prevValid"+o,y="passingSchemas"+o;a+="var "+m+" = errors , "+g+" = false , "+d+" = false , "+y+" = null; ";var b=e.compositeRule;e.compositeRule=p.compositeRule=!0;var P=i;if(P)for(var w,E=-1,S=P.length-1;E<S;)w=P[E+=1],(e.opts.strictKeywords?"object"==typeof w&&Object.keys(w).length>0||!1===w:e.util.schemaHasRules(w,e.RULES.all))?(p.schema=w,p.schemaPath=s+"["+E+"]",p.errSchemaPath=l+"/"+E,a+=" "+e.validate(p)+" ",p.baseId=v):a+=" var "+f+" = true; ",E&&(a+=" if ("+f+" && "+g+") { "+d+" = false; "+y+" = ["+y+", "+E+"]; } else { ",h+="}"),a+=" if ("+f+") { "+d+" = "+g+" = true; "+y+" = "+E+"; }";return e.compositeRule=p.compositeRule=b,a+=h+"if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a},pattern:function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'string') || "),o+=" !"+(m?"(new RegExp("+a+"))":e.usePattern(s))+".test("+d+") ) { ";var p=p||[];p.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { pattern: ",o+=m?""+a:""+e.util.toQuotedString(s),o+=" } ",!1!==e.opts.messages&&(o+=" , message: 'should match pattern \"",o+=m?"' + "+a+" + '":""+e.util.escapeQuotes(s),o+="\"' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+e.util.toQuotedString(s),o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var h=o;return o=p.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+h+"]); ":o+=" validate.errors = ["+h+"]; return false; ":o+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},properties:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="errs__"+o,m=e.util.copy(e),p="";m.level++;var h="valid"+m.level,f="key"+o,v="idx"+o,g=m.dataLevel=e.dataLevel+1,y="data"+g,b="dataProperties"+o,P=Object.keys(i||{}).filter(C),w=e.schema.patternProperties||{},E=Object.keys(w).filter(C),S=e.schema.additionalProperties,x=P.length||E.length,F=!1===S,O="object"==typeof S&&Object.keys(S).length,_=e.opts.removeAdditional,D=F||O||_,k=e.opts.ownProperties,j=e.baseId,I=e.schema.required;if(I&&(!e.opts.$data||!I.$data)&&I.length<e.opts.loopRequired)var A=e.util.toHash(I);function C(e){return"__proto__"!==e}if(a+="var "+d+" = errors;var "+h+" = true;",k&&(a+=" var "+b+" = undefined;"),D){if(a+=k?" "+b+" = "+b+" || Object.keys("+c+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+c+") { ",x){if(a+=" var isAdditional"+o+" = !(false ",P.length)if(P.length>8)a+=" || validate.schema"+s+".hasOwnProperty("+f+") ";else{var R=P;if(R)for(var $=-1,N=R.length-1;$<N;)G=R[$+=1],a+=" || "+f+" == "+e.util.toQuotedString(G)+" "}if(E.length){var L=E;if(L)for(var T=-1,z=L.length-1;T<z;)ne=L[T+=1],a+=" || "+e.usePattern(ne)+".test("+f+") "}a+=" ); if (isAdditional"+o+") { "}if("all"==_)a+=" delete "+c+"["+f+"]; ";else{var V=e.errorPath,q="' + "+f+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers)),F)if(_)a+=" delete "+c+"["+f+"]; ";else{a+=" "+h+" = false; ";var M=l;l=e.errSchemaPath+"/additionalProperties",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { additionalProperty: '"+q+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is an invalid additional property":a+="should NOT have additional properties",a+="' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var W=a;a=te.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+W+"]); ":a+=" validate.errors = ["+W+"]; return false; ":a+=" var err = "+W+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=M,u&&(a+=" break; ")}else if(O)if("failing"==_){a+=" var "+d+" = errors; ";var B=e.compositeRule;e.compositeRule=m.compositeRule=!0,m.schema=S,m.schemaPath=e.schemaPath+".additionalProperties",m.errSchemaPath=e.errSchemaPath+"/additionalProperties",m.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);var U=c+"["+f+"]";m.dataPathArr[g]=f;var Q=e.validate(m);m.baseId=j,e.util.varOccurences(Q,y)<2?a+=" "+e.util.varReplace(Q,y,U)+" ":a+=" var "+y+" = "+U+"; "+Q+" ",a+=" if (!"+h+") { errors = "+d+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+c+"["+f+"]; } ",e.compositeRule=m.compositeRule=B}else{m.schema=S,m.schemaPath=e.schemaPath+".additionalProperties",m.errSchemaPath=e.errSchemaPath+"/additionalProperties",m.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);U=c+"["+f+"]";m.dataPathArr[g]=f;Q=e.validate(m);m.baseId=j,e.util.varOccurences(Q,y)<2?a+=" "+e.util.varReplace(Q,y,U)+" ":a+=" var "+y+" = "+U+"; "+Q+" ",u&&(a+=" if (!"+h+") break; ")}e.errorPath=V}x&&(a+=" } "),a+=" } ",u&&(a+=" if ("+h+") { ",p+="}")}var H=e.opts.useDefaults&&!e.compositeRule;if(P.length){var K=P;if(K)for(var G,J=-1,Z=K.length-1;J<Z;){var Y=i[G=K[J+=1]];if(e.opts.strictKeywords?"object"==typeof Y&&Object.keys(Y).length>0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all)){var X=e.util.getProperty(G),ee=(U=c+X,H&&void 0!==Y.default);m.schema=Y,m.schemaPath=s+X,m.errSchemaPath=l+"/"+e.util.escapeFragment(G),m.errorPath=e.util.getPath(e.errorPath,G,e.opts.jsonPointers),m.dataPathArr[g]=e.util.toQuotedString(G);Q=e.validate(m);if(m.baseId=j,e.util.varOccurences(Q,y)<2){Q=e.util.varReplace(Q,y,U);var re=U}else{re=y;a+=" var "+y+" = "+U+"; "}if(ee)a+=" "+Q+" ";else{if(A&&A[G]){a+=" if ( "+re+" === undefined ",k&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+h+" = false; ";V=e.errorPath,M=l;var te,ae=e.util.escapeQuotes(G);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(V,G,e.opts.jsonPointers)),l=e.errSchemaPath+"/required",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+ae+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+ae+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";W=a;a=te.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+W+"]); ":a+=" validate.errors = ["+W+"]; return false; ":a+=" var err = "+W+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=M,e.errorPath=V,a+=" } else { "}else u?(a+=" if ( "+re+" === undefined ",k&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+h+" = true; } else { "):(a+=" if ("+re+" !== undefined ",k&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(G)+"') "),a+=" ) { ");a+=" "+Q+" } "}}u&&(a+=" if ("+h+") { ",p+="}")}}if(E.length){var oe=E;if(oe)for(var ne,ie=-1,se=oe.length-1;ie<se;){Y=w[ne=oe[ie+=1]];if(e.opts.strictKeywords?"object"==typeof Y&&Object.keys(Y).length>0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all)){m.schema=Y,m.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(ne),m.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(ne),a+=k?" "+b+" = "+b+" || Object.keys("+c+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+c+") { ",a+=" if ("+e.usePattern(ne)+".test("+f+")) { ",m.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);U=c+"["+f+"]";m.dataPathArr[g]=f;Q=e.validate(m);m.baseId=j,e.util.varOccurences(Q,y)<2?a+=" "+e.util.varReplace(Q,y,U)+" ":a+=" var "+y+" = "+U+"; "+Q+" ",u&&(a+=" if (!"+h+") break; "),a+=" } ",u&&(a+=" else "+h+" = true; "),a+=" } ",u&&(a+=" if ("+h+") { ",p+="}")}}}return u&&(a+=" "+p+" if ("+d+" == errors) {"),a},propertyNames:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="errs__"+o,m=e.util.copy(e);m.level++;var p="valid"+m.level;if(a+="var "+d+" = errors;",e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){m.schema=i,m.schemaPath=s,m.errSchemaPath=l;var h="key"+o,f="idx"+o,v="i"+o,g="' + "+h+" + '",y="data"+(m.dataLevel=e.dataLevel+1),b="dataProperties"+o,P=e.opts.ownProperties,w=e.baseId;P&&(a+=" var "+b+" = undefined; "),a+=P?" "+b+" = "+b+" || Object.keys("+c+"); for (var "+f+"=0; "+f+"<"+b+".length; "+f+"++) { var "+h+" = "+b+"["+f+"]; ":" for (var "+h+" in "+c+") { ",a+=" var startErrs"+o+" = errors; ";var E=h,S=e.compositeRule;e.compositeRule=m.compositeRule=!0;var x=e.validate(m);m.baseId=w,e.util.varOccurences(x,y)<2?a+=" "+e.util.varReplace(x,y,E)+" ":a+=" var "+y+" = "+E+"; "+x+" ",e.compositeRule=m.compositeRule=S,a+=" if (!"+p+") { for (var "+v+"=startErrs"+o+"; "+v+"<errors; "+v+"++) { vErrors["+v+"].propertyName = "+h+"; } var err = ",!1!==e.createErrors?(a+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { propertyName: '"+g+"' } ",!1!==e.opts.messages&&(a+=" , message: 'property name \\'"+g+"\\' is invalid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),u&&(a+=" break; "),a+=" } }"}return u&&(a+=" if ("+d+" == errors) {"),a},required:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m=e.opts.$data&&i&&i.$data;m&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ");var p="schema"+o;if(!m)if(i.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var h=[],f=i;if(f)for(var v,g=-1,y=f.length-1;g<y;){v=f[g+=1];var b=e.schema.properties[v];b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0||!1===b:e.util.schemaHasRules(b,e.RULES.all))||(h[h.length]=v)}}else h=i;if(m||h.length){var P=e.errorPath,w=m||h.length>=e.opts.loopRequired,E=e.opts.ownProperties;if(u)if(a+=" var missing"+o+"; ",w){m||(a+=" var "+p+" = validate.schema"+s+"; ");var S="' + "+(k="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,k,e.opts.jsonPointers)),a+=" var "+d+" = true; ",m&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=" for (var "+O+" = 0; "+O+" < "+p+".length; "+O+"++) { "+d+" = "+c+"["+p+"["+O+"]] !== undefined ",E&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", "+p+"["+O+"]) "),a+="; if (!"+d+") break; } ",m&&(a+=" } "),a+=" if (!"+d+") { ",(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var x=a;a=D.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var F=h;if(F)for(var O=-1,_=F.length-1;O<_;){I=F[O+=1],O&&(a+=" || "),a+=" ( ( "+($=c+(R=e.util.getProperty(I)))+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(I)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?I:R)+") ) "}a+=") { ";var D;S="' + "+(k="missing"+o)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,k,!0):P+" + "+k),(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";x=a;a=D.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(w){m||(a+=" var "+p+" = validate.schema"+s+"; ");var k;S="' + "+(k="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,k,e.opts.jsonPointers)),m&&(a+=" if ("+p+" && !Array.isArray("+p+")) { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+p+" !== undefined) { "),a+=" for (var "+O+" = 0; "+O+" < "+p+".length; "+O+"++) { if ("+c+"["+p+"["+O+"]] === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", "+p+"["+O+"]) "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",m&&(a+=" } ")}else{var j=h;if(j)for(var I,A=-1,C=j.length-1;A<C;){I=j[A+=1];var R=e.util.getProperty(I),$=(S=e.util.escapeQuotes(I),c+R);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,I,e.opts.jsonPointers)),a+=" if ( "+$+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(I)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=P}else u&&(a+=" if (true) {");return a},uniqueItems:function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m="valid"+n,p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,(s||p)&&!1!==e.opts.uniqueItems){p&&(o+=" var "+m+"; if ("+a+" === false || "+a+" === undefined) "+m+" = true; else if (typeof "+a+" != 'boolean') "+m+" = false; else { "),o+=" var i = "+d+".length , "+m+" = true , j; if (i > 1) { ";var h=e.schema.items&&e.schema.items.type,f=Array.isArray(h);if(!h||"object"==h||"array"==h||f&&(h.indexOf("object")>=0||h.indexOf("array")>=0))o+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+d+"[i], "+d+"[j])) { "+m+" = false; break outer; } } } ";else{o+=" var itemIndices = {}, item; for (;i--;) { var item = "+d+"[i]; ";var v="checkDataType"+(f?"s":"");o+=" if ("+e.util[v](h,"item",e.opts.strictNumbers,!0)+") continue; ",f&&(o+=" if (typeof item == 'string') item = '\"' + item; "),o+=" if (typeof itemIndices[item] == 'number') { "+m+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}o+=" } ",p&&(o+=" } "),o+=" if (!"+m+") { ";var g=g||[];g.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var y=o;o=g.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+y+"]); ":o+=" validate.errors = ["+y+"]; return false; ":o+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",c&&(o+=" else { ")}else c&&(o+=" if (true) { ");return o},validate:be},tr=V.toHash,ar=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"],or=function(e,r){for(var t=0;t<r.length;t++){e=JSON.parse(JSON.stringify(e));var a,o=r[t].split("/"),n=e;for(a=1;a<o.length;a++)n=n[o[a]];for(a=0;a<ar.length;a++){var i=ar[a],s=n[i];s&&(n[i]={anyOf:[s,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e},nr=fe.MissingRef,ir=function e(r,t,a){var o=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof t&&(a=t,t=void 0);var n=i(r).then((function(){var e=o._addSchema(r,void 0,t);return e.validate||function e(r){try{return o._compile(r)}catch(e){if(e instanceof nr)return a(e);throw e}function a(a){var n=a.missingSchema;if(u(n))throw new Error("Schema "+n+" is loaded but "+a.missingRef+" cannot be resolved");var s=o._loadingSchemas[n];return s||(s=o._loadingSchemas[n]=o._opts.loadSchema(n)).then(l,l),s.then((function(e){if(!u(n))return i(e).then((function(){u(n)||o.addSchema(e,n,void 0,t)}))})).then((function(){return e(r)}));function l(){delete o._loadingSchemas[n]}function u(e){return o._refs[e]||o._schemas[e]}}}(e)}));a&&n.then((function(e){a(null,e)}),a);return n;function i(r){var t=r.$schema;return t&&!o.getSchema(t)?e.call(o,{$ref:t},!0):Promise.resolve()}};var sr=function(e,r,t){var a,o,n=" ",i=e.level,s=e.dataLevel,l=e.schema[r],u=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,d=!e.opts.allErrors,m="data"+(s||""),p="valid"+i,h="errs__"+i,f=e.opts.$data&&l&&l.$data;f?(n+=" var schema"+i+" = "+e.util.getData(l.$data,s,e.dataPathArr)+"; ",o="schema"+i):o=l;var v,g,y,b,P,w="definition"+i,E=this.definition,S="";if(f&&E.$data){P="keywordValidate"+i;var x=E.validateSchema;n+=" var "+w+" = RULES.custom['"+r+"'].definition; var "+P+" = "+w+".validate;"}else{if(!(b=e.useCustomRule(this,l,e.schema,e)))return;o="validate.schema"+u,P=b.code,v=E.compile,g=E.inline,y=E.macro}var F=P+".errors",O="i"+i,_="ruleErr"+i,D=E.async;if(D&&!e.async)throw new Error("async keyword in sync schema");if(g||y||(n+=F+" = null;"),n+="var "+h+" = errors;var "+p+";",f&&E.$data&&(S+="}",n+=" if ("+o+" === undefined) { "+p+" = true; } else { ",x&&(S+="}",n+=" "+p+" = "+w+".validateSchema("+o+"); if ("+p+") { ")),g)E.statements?n+=" "+b.validate+" ":n+=" "+p+" = "+b.validate+"; ";else if(y){var k=e.util.copy(e);S="";k.level++;var j="valid"+k.level;k.schema=b.validate,k.schemaPath="";var I=e.compositeRule;e.compositeRule=k.compositeRule=!0;var A=e.validate(k).replace(/validate\.schema/g,P);e.compositeRule=k.compositeRule=I,n+=" "+A}else{(N=N||[]).push(n),n="",n+=" "+P+".call( ",e.opts.passContext?n+="this":n+="self",v||!1===E.schema?n+=" , "+m+" ":n+=" , "+o+" , "+m+" , validate.schema"+e.schemaPath+" ",n+=" , (dataPath || '')",'""'!=e.errorPath&&(n+=" + "+e.errorPath);var C=s?"data"+(s-1||""):"parentData",R=s?e.dataPathArr[s]:"parentDataProperty",$=n+=" , "+C+" , "+R+" , rootData ) ";n=N.pop(),!1===E.errors?(n+=" "+p+" = ",D&&(n+="await "),n+=$+"; "):n+=D?" var "+(F="customErrors"+i)+" = null; try { "+p+" = await "+$+"; } catch (e) { "+p+" = false; if (e instanceof ValidationError) "+F+" = e.errors; else throw e; } ":" "+F+" = null; "+p+" = "+$+"; "}if(E.modifying&&(n+=" if ("+C+") "+m+" = "+C+"["+R+"];"),n+=""+S,E.valid)d&&(n+=" if (true) { ");else{var N;n+=" if ( ",void 0===E.valid?(n+=" !",n+=y?""+j:""+p):n+=" "+!E.valid+" ",n+=") { ",a=this.keyword,(N=N||[]).push(n),n="",(N=N||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(n+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";var L=n;n=N.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+L+"]); ":n+=" validate.errors = ["+L+"]; return false; ":n+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var T=n;n=N.pop(),g?E.errors?"full"!=E.errors&&(n+=" for (var "+O+"="+h+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+c+'"; } ',e.opts.verbose&&(n+=" "+_+".schema = "+o+"; "+_+".data = "+m+"; "),n+=" } "):!1===E.errors?n+=" "+T+" ":(n+=" if ("+h+" == errors) { "+T+" } else { for (var "+O+"="+h+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+c+'"; } ',e.opts.verbose&&(n+=" "+_+".schema = "+o+"; "+_+".data = "+m+"; "),n+=" } } "):y?(n+=" var err = ",!1!==e.createErrors?(n+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(n+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&d&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; ")):!1===E.errors?n+=" "+T+" ":(n+=" if (Array.isArray("+F+")) { if (vErrors === null) vErrors = "+F+"; else vErrors = vErrors.concat("+F+"); errors = vErrors.length; for (var "+O+"="+h+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; "+_+'.schemaPath = "'+c+'"; ',e.opts.verbose&&(n+=" "+_+".schema = "+o+"; "+_+".data = "+m+"; "),n+=" } } else { "+T+" } "),n+=" } ",d&&(n+=" else { ")}return n},lr="http://json-schema.org/draft-07/schema#",ur="http://json-schema.org/draft-07/schema#",cr="Core schema meta-schema",dr={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},mr=["object","boolean"],pr={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},hr={$schema:lr,$id:ur,title:cr,definitions:dr,type:mr,properties:pr,default:!0},fr=N(Object.freeze({__proto__:null,$schema:lr,$id:ur,title:cr,definitions:dr,type:mr,properties:pr,default:hr})),vr={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:fr.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:fr.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}},gr=/^[a-z_$][a-z0-9_$-]*$/i,yr=function(e,r){var t=this.RULES;if(t.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!gr.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(r){this.validateKeyword(r,!0);var a=r.type;if(Array.isArray(a))for(var o=0;o<a.length;o++)i(e,a[o],r);else i(e,a,r);var n=r.metaSchema;n&&(r.$data&&this._opts.$data&&(n={anyOf:[n,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),r.validateSchema=this.compile(n,!0))}function i(e,r,a){for(var o,n=0;n<t.length;n++){var i=t[n];if(i.type==r){o=i;break}}o||(o={type:r,rules:[]},t.push(o));var s={keyword:e,definition:a,custom:!0,code:sr,implements:a.implements};o.rules.push(s),t.custom[e]=s}return t.keywords[e]=t.all[e]=!0,this},br=function(e){var r=this.RULES.custom[e];return r?r.definition:this.RULES.keywords[e]||!1},Pr=function(e){var r=this.RULES;delete r.keywords[e],delete r.all[e],delete r.custom[e];for(var t=0;t<r.length;t++)for(var a=r[t].rules,o=0;o<a.length;o++)if(a[o].keyword==e){a.splice(o,1);break}return this},wr=function e(r,t){e.errors=null;var a=this._validateKeyword=this._validateKeyword||this.compile(vr,!0);if(a(r))return!0;if(e.errors=a.errors,t)throw new Error("custom keyword definition is invalid: "+this.errorsText(a.errors));return!1};var Er="http://json-schema.org/draft-07/schema#",Sr="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",xr="Meta-schema for $data reference (JSON Schema extension proposal)",Fr=["$data"],Or={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},_r={$schema:Er,$id:Sr,description:xr,type:"object",required:Fr,properties:Or,additionalProperties:!1},Dr=N(Object.freeze({__proto__:null,$schema:Er,$id:Sr,description:xr,type:"object",required:Fr,properties:Or,additionalProperties:!1,default:_r})),kr=Cr;Cr.prototype.validate=function(e,r){var t;if("string"==typeof e){if(!(t=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);t=a.validate||this._compile(a)}var o=t(r);!0!==t.$async&&(this.errors=t.errors);return o},Cr.prototype.compile=function(e,r){var t=this._addSchema(e,void 0,r);return t.validate||this._compile(t)},Cr.prototype.addSchema=function(e,r,t,a){if(Array.isArray(e)){for(var o=0;o<e.length;o++)this.addSchema(e[o],void 0,t,a);return this}var n=this._getId(e);if(void 0!==n&&"string"!=typeof n)throw new Error("schema id must be string");return zr(this,r=te.normalizeId(r||n)),this._schemas[r]=this._addSchema(e,t,a,!0),this},Cr.prototype.addMetaSchema=function(e,r,t){return this.addSchema(e,r,t,!0),this},Cr.prototype.validateSchema=function(e,r){var t=e.$schema;if(void 0!==t&&"string"!=typeof t)throw new Error("$schema must be a string");if(!(t=t||this._opts.defaultMeta||function(e){var r=e._opts.meta;return e._opts.defaultMeta="object"==typeof r?e._getId(r)||r:e.getSchema(jr)?jr:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var a=this.validate(t,e);if(!a&&r){var o="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(o);this.logger.error(o)}return a},Cr.prototype.getSchema=function(e){var r=Rr(this,e);switch(typeof r){case"object":return r.validate||this._compile(r);case"string":return this.getSchema(r);case"undefined":return function(e,r){var t=te.schema.call(e,{schema:{}},r);if(t){var a=t.schema,o=t.root,n=t.baseId,i=Ee.call(e,a,o,void 0,n);return e._fragments[r]=new ee({ref:r,fragment:!0,schema:a,root:o,baseId:n,validate:i}),i}}(this,e)}},Cr.prototype.removeSchema=function(e){if(e instanceof RegExp)return $r(this,this._schemas,e),$r(this,this._refs,e),this;switch(typeof e){case"undefined":return $r(this,this._schemas),$r(this,this._refs),this._cache.clear(),this;case"string":var r=Rr(this,e);return r&&this._cache.del(r.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var t=this._opts.serialize,a=t?t(e):e;this._cache.del(a);var o=this._getId(e);o&&(o=te.normalizeId(o),delete this._schemas[o],delete this._refs[o])}return this},Cr.prototype.addFormat=function(e,r){"string"==typeof r&&(r=new RegExp(r));return this._formats[e]=r,this},Cr.prototype.errorsText=function(e,r){if(!(e=e||this.errors))return"No errors";for(var t=void 0===(r=r||{}).separator?", ":r.separator,a=void 0===r.dataVar?"data":r.dataVar,o="",n=0;n<e.length;n++){var i=e[n];i&&(o+=a+i.dataPath+" "+i.message+t)}return o.slice(0,-t.length)},Cr.prototype._addSchema=function(e,r,t,a){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var o=this._opts.serialize,n=o?o(e):e,i=this._cache.get(n);if(i)return i;a=a||!1!==this._opts.addUsedSchema;var s=te.normalizeId(this._getId(e));s&&a&&zr(this,s);var l,u=!1!==this._opts.validateSchema&&!r;u&&!(l=s&&s==te.normalizeId(e.$schema))&&this.validateSchema(e,!0);var c=te.ids.call(this,e),d=new ee({id:s,schema:e,localRefs:c,cacheKey:n,meta:t});"#"!=s[0]&&a&&(this._refs[s]=d);this._cache.put(n,d),u&&l&&this.validateSchema(e,!0);return d},Cr.prototype._compile=function(e,r){if(e.compiling)return e.validate=o,o.schema=e.schema,o.errors=null,o.root=r||o,!0===e.schema.$async&&(o.$async=!0),o;var t,a;e.compiling=!0,e.meta&&(t=this._opts,this._opts=this._metaOpts);try{a=Ee.call(this,e.schema,r,e.localRefs)}catch(r){throw delete e.validate,r}finally{e.compiling=!1,e.meta&&(this._opts=t)}return e.validate=a,e.refs=a.refs,e.refVal=a.refVal,e.root=a.root,a;function o(){var r=e.validate,t=r.apply(this,arguments);return o.errors=r.errors,t}},Cr.prototype.compileAsync=ir,Cr.prototype.addKeyword=yr,Cr.prototype.getKeyword=br,Cr.prototype.removeKeyword=Pr,Cr.prototype.validateKeyword=wr,Cr.ValidationError=fe.Validation,Cr.MissingRefError=fe.MissingRef,Cr.$dataMetaSchema=or;var jr="http://json-schema.org/draft-07/schema",Ir=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],Ar=["/properties"];function Cr(e){if(!(this instanceof Cr))return new Cr(e);var r,t;e=this._opts=V.copy(e)||{},function(e){var r=e._opts.logger;if(!1===r)e.logger={log:Vr,warn:Vr,error:Vr};else{if(void 0===r&&(r=console),!("object"==typeof r&&r.log&&r.warn&&r.error))throw new Error("logger must implement log, warn and error methods");e.logger=r}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=We(e.format),this._cache=e.cache||new Ie,this._loadingSchemas={},this._compilations=[],this.RULES=((r=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}]).all=tr(t=["type","$comment"]),r.types=tr(["number","integer","string","array","object","boolean","null"]),r.forEach((function(e){e.rules=e.rules.map((function(e){var a;if("object"==typeof e){var o=Object.keys(e)[0];a=e[o],e=o,a.forEach((function(e){t.push(e),r.all[e]=!0}))}return t.push(e),r.all[e]={keyword:e,code:rr[e],implements:a}})),r.all.$comment={keyword:"$comment",code:rr.$comment},e.type&&(r.types[e.type]=e)})),r.keywords=tr(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),r.custom={},r),this._getId=function(e){switch(e.schemaId){case"auto":return Tr;case"id":return Nr;default:return Lr}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=ye),this._metaOpts=function(e){for(var r=V.copy(e._opts),t=0;t<Ir.length;t++)delete r[Ir[t]];return r}(this),e.formats&&function(e){for(var r in e._opts.formats){var t=e._opts.formats[r];e.addFormat(r,t)}}(this),e.keywords&&function(e){for(var r in e._opts.keywords){var t=e._opts.keywords[r];e.addKeyword(r,t)}}(this),function(e){var r;e._opts.$data&&(r=Dr,e.addMetaSchema(r,r.$id,!0));if(!1===e._opts.meta)return;var t=fr;e._opts.$data&&(t=or(t,Ar));e.addMetaSchema(t,jr,!0),e._refs["http://json-schema.org/schema"]=jr}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var r=e._opts.schemas;if(!r)return;if(Array.isArray(r))e.addSchema(r);else for(var t in r)e.addSchema(r[t],t)}(this)}function Rr(e,r){return r=te.normalizeId(r),e._schemas[r]||e._refs[r]||e._fragments[r]}function $r(e,r,t){for(var a in r){var o=r[a];o.meta||t&&!t.test(a)||(e._cache.del(o.cacheKey),delete r[a])}}function Nr(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function Lr(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function Tr(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function zr(e,r){if(e._schemas[r]||e._refs[r])throw new Error('schema with key or id "'+r+'" already exists')}function Vr(){}var qr={$$currentLocalizeFn:function(e){if(e&&e.length)for(var r=0;r<e.length;r+=1){var t=e[r],a=void 0,o=void 0,n=void 0;switch(t.keyword){case"$ref":a="无法找到引用".concat(t.params.ref);break;case"additionalItems":a="",o=t.params.limit,a+="不允许超过".concat(o,"个元素");break;case"additionalProperties":a="不允许有额外的属性";break;case"anyOf":a="数据应为 anyOf 所指定的其中一个";break;case"const":a="应当等于常量";break;case"contains":a="应当包含一个有效项";break;case"custom":a='应当通过 "'.concat(t.keyword,' 关键词校验"');break;case"dependencies":a="",o=t.params.depsCount,a+="应当拥有属性".concat(t.params.property,"的依赖属性").concat(t.params.deps);break;case"enum":a="应当是预设定的枚举值之一";break;case"exclusiveMaximum":case"exclusiveMinimum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(n);break;case"false schema":a="布尔模式出错";break;case"format":a='应当匹配格式 "'.concat(t.params.format,'"');break;case"formatExclusiveMaximum":a="formatExclusiveMaximum 应当是布尔值";break;case"formatExclusiveMinimum":a="formatExclusiveMinimum 应当是布尔值";break;case"formatMaximum":case"formatMinimum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当是 ".concat(n);break;case"if":a='应当匹配模式 "'.concat(t.params.failingKeyword,'" ');break;case"maximum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(n);break;case"maxItems":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个项");break;case"maxLength":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个字符");break;case"maxProperties":a="",o=t.params.limit,a+="不应有多于 ".concat(o," 个属性");break;case"minimum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(n);break;case"minItems":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个项");break;case"minLength":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个字符");break;case"minProperties":a="",o=t.params.limit,a+="不应有少于 ".concat(o," 个属性");break;case"multipleOf":a="应当是 ".concat(t.params.multipleOf," 的整数倍");break;case"not":a='不应当匹配 "not" schema';break;case"oneOf":a='只能匹配一个 "oneOf" 中的 schema';break;case"pattern":a='应当匹配模式 "'.concat(t.params.pattern,'"');break;case"patternRequired":a="应当有属性匹配模式 ".concat(t.params.missingPattern);break;case"propertyNames":a="属性名 '".concat(t.params.propertyName,"' 无效");break;case"required":a="应当有必需属性 ".concat(t.params.missingProperty);break;case"switch":a="由于 ".concat(t.params.caseIndex,' 失败,未通过 "switch" 校验, ');break;case"type":a="应当是 ".concat(t.params.type," 类型");break;case"uniqueItems":a="不应当含有重复项 (第 ".concat(t.params.j," 项与第 ").concat(t.params.i," 项是重复的)");break;default:continue}t.message=a}},getCurrentLocalize:function(){return this.$$currentLocalizeFn},useLocal:function(e){this.$$currentLocalizeFn=e}};function Mr(e,r){try{if("object"===t(r))return e.fill(null).map((function(){return JSON.parse(JSON.stringify(r))}))}catch(e){}}function Wr(e,r){return e.filter((function(e){return r.includes(e)}))}function Br(e,r,t){var a=R(e.$ref,r);e.$ref;var o=s(e,["$ref"]);return Kr(i(i({},a),o),r,t)}function Ur(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length<2)return r[0];for(var a={},o=[].concat(r),n=function(){var e=E(o[0])?o[0]:{},r=E(o[1])?o[1]:{};a=Object.assign({},e),Object.keys(r).reduce((function(t,a){var o=e[a],n=r[a];if(E(o)||E(n))if(E(o)&&E(n))t[a]=Ur(o,n);else{var i=l(E(o)?[o,n]:[n,o],2),s=i[0],u=i[1];t[a]="additionalProperties"===a?!0===u&&s:s}else if(Array.isArray(o)||Array.isArray(n))if(Array.isArray(o)&&Array.isArray(n)){if(E(o[0])||E(n[0]))throw new Error("暂不支持如上数组对象元素合并");var c=Wr([].concat(o),[].concat(n));if(c.length<=0)throw new Error("无法合并如上数据");0===c.length&&"type"===a?t[a]=c[0]:t[a]=c}else{var d=l(Array.isArray(o)?[o,n]:[n,o],2),m=d[0],p=d[1];if(void 0===p)t[a]=m;else{if(!m.includes(p))throw new Error("无法合并如下数据");t[a]=p}}else if(void 0!==o&&void 0!==n)if("maxLength"===a||"maximum"===a||"maxItems"===a||"exclusiveMaximum"===a||"maxProperties"===a)t[a]=Math.min(o,n);else if("minLength"===a||"minimum"===a||"minItems"===a||"exclusiveMinimum"===a||"minProperties"===a)t[a]=Math.max(o,n);else if("multipleOf"===a)t[a]=A(o,n);else{if(o!==n)throw new Error("无法合并如下数据");t[a]=o}else t[a]=void 0===o?n:o;return t}),a),o.splice(0,2,a)};o.length>=2;)n();return a}function Qr(e,r,t){var a=i(i({},e),{},{allOf:e.allOf.map((function(e){return Kr(e,r,t)}))});try{var o=a.allOf,n=s(a,["allOf"]);return Ur.apply(void 0,[n].concat(u(o)))}catch(e){return a.allOf,s(a,["allOf"])}}function Hr(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.hasOwnProperty("allOf")&&(e=Qr(e,r,t)),e.hasOwnProperty("$ref")&&(e=Br(e,r,t)),e}function Kr(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return E(e)?Hr(e,r,t):{}}var Gr=/{{(.*)}}/;function Jr(e,r,t,a){if(void 0!==t){var o=Gr.exec(t);if(Gr.lastIndex=0,o){var n=o[1].trim();return new Function("parentFormData","rootFormData","return ".concat(n))(v(e,r,1),e)}return a()}}function Zr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.schema,t=e.uiSchema,a=arguments.length>1?arguments[1]:void 0,o=rt({schema:r,uiSchema:t,containsSpec:!1});return["title","description"].reduce((function(e,r){return o[r]&&(e["ui:".concat(r)]=String(o[r]).replace(/\$index/g,a+1)),e}),{})}function Yr(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.curNodePath,i=void 0===n?"":n,s=e.rootFormData,l=void 0===s?{}:s,u=o["ui:widget"]||t["ui:widget"],c=o["ui:hidden"]||t["ui:hidden"];return"HiddenWidget"===u||"hidden"===u||!!Jr(l,i,c,(function(){return"function"==typeof c?c(v(l,i,1),l):c}))}function Xr(e,r){var a=r.schema,o=void 0===a?{}:a,n=r.uiSchema,i=void 0===n?{}:n,s=o["ui:field"]||i["ui:field"];if("function"==typeof s||"object"===t(s)||"string"==typeof s)return{field:s,fieldProps:i["ui:fieldProps"]||o["ui:fieldProps"]};var l=e[F(o)];if(l)return{field:l};if(!l&&(o.anyOf||o.oneOf))return{field:null};throw new Error("不支持的field类型 ".concat(o.type))}function et(e){var r=e.schema,t=void 0===r?{}:r,o=e.uiSchema,n=void 0===o?{}:o,s=e.curNodePath,l=e.rootFormData,c=void 0===l?{}:l;return Object.assign.apply(Object,[{}].concat(u([t,n].map((function(e){return Object.keys(e).reduce((function(r,t){var o=e[t];return"ui:options"===t&&E(o)?i(i({},r),o):0===t.indexOf("ui:")?i(i({},r),{},a({},t.substring(3),void 0===s?o:Jr(c,s,o,(function(){return o})))):r}),{})})))))}function rt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.containsSpec,s=void 0===n||n,l=e.curNodePath,u=e.rootFormData,c={};return s&&(c.readonly=!!t.readOnly,void 0!==t.multipleOf&&(c.step=t.multipleOf),(t.minimum||0===t.minimum)&&(c.min=t.minimum),(t.maximum||0===t.maximum)&&(c.max=t.maximum),(t.minLength||0===t.minLength)&&(c.minlength=t.minLength),(t.maxLength||0===t.maxLength)&&(c.maxlength=t.maxLength),"date-time"!==t.format&&"date"!==t.format||("array"===t.type?(c.isRange=!0,c.isNumberValue=!(t.items&&"string"===t.items.type)):c.isNumberValue=!("string"===t.type))),i(i({title:t.title,description:t.description},c),et({schema:t,uiSchema:o,curNodePath:l,rootFormData:u}))}function tt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.curNodePath,i=e.rootFormData,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,u=rt({schema:t,uiSchema:o,curNodePath:n,rootFormData:i});!u.widget&&l&&Object.assign(u,l({schema:t,uiSchema:o}));var c=u.widget,d=u.title,m=u.labelWidth,p=u.description,h=u.attrs,f=u.class,v=u.style,g=u.fieldAttrs,y=u.fieldStyle,b=u.fieldClass,P=u.emptyValue,w=u.width,E=u.getWidget,S=u.onChange,x=s(u,["widget","title","labelWidth","description","attrs","class","style","fieldAttrs","fieldStyle","fieldClass","emptyValue","width","getWidget","onChange"]);return{widget:c,label:d,labelWidth:m,description:p,widgetAttrs:h,widgetClass:f,widgetStyle:v,fieldAttrs:g,width:w,fieldStyle:y,fieldClass:b,emptyValue:P,getWidget:E,onChange:S,uiProps:x}}function at(e){var r=e.schema,t=void 0===r?{}:r,o=e.uiSchema,n=void 0===o?{}:o,s=e.errorSchema,l=void 0===s?{}:s;return Object.assign.apply(Object,[{}].concat(u([t,n,l].map((function(e){return Object.keys(e).reduce((function(r,t){var o=e[t];return"err:options"===t&&E(o)?i(i({},r),o):0===t.indexOf("err:")?i(i({},r),{},a({},t.substring(4),o)):r}),{})})))))}function ot(e,r){if(!Array.isArray(r))return e;var t,a=function(e){return e.reduce((function(e,r){return e[r]=!0,e}),{})},o=a(e),n=r.filter((function(e){return"*"===e||o[e]})),i=a(n),s=e.filter((function(e){return!i[e]})),l=n.indexOf("*");if(-1===l){if(s.length)throw new Error("uiSchema order list does not contain ".concat((t=s).length>1?"properties '".concat(t.join("', '"),"'"):"property '".concat(t[0],"'")));return n}if(l!==n.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");var c=u(n);return c.splice.apply(c,[l,1].concat(u(s))),c}function nt(e){return Array.isArray(e.enum)&&1===e.enum.length||e.hasOwnProperty("const")}function it(e){if(Array.isArray(e.enum)&&1===e.enum.length)return e.enum[0];if(e.hasOwnProperty("const"))return e.const;throw new Error("schema cannot be inferred as a constant")}function st(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=Kr(e,r),a=t.oneOf||t.anyOf;return!!Array.isArray(t.enum)||!!Array.isArray(a)&&a.every((function(e){return nt(e)}))}function lt(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every((function(e){return E(e)}))}function ut(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!(!e.uniqueItems||!e.items)&&st(e.items,r)}function ct(e){return e.additionalItems,E(e.additionalItems)}function dt(e,r,t,a){if(e.enum){var o=et({schema:e,uiSchema:r,curNodePath:t,rootFormData:a}).enumNames||e.enumNames;return e.enum.map((function(e,r){return{label:o&&o[r]||String(e),value:e}}))}var n=e.oneOf||e.anyOf,i=r.oneOf||r.anyOf;return n.map((function(e,r){var o=i&&i[r]?et({schema:e,uiSchema:i[r],curNodePath:t,rootFormData:a}):{},n=it(e);return{label:o.title||e.title||String(n),value:n}}))}function mt(e,r,t){if(e)return e;if(r){var a=t.split(".").pop();if(a&&a!=="".concat(Number(a)))return a}return""}var pt=Object.freeze({__proto__:null,replaceArrayIndex:Zr,isHiddenWidget:Yr,getUiField:Xr,getUserUiOptions:et,getUiOptions:rt,getWidgetConfig:tt,getUserErrOptions:at,orderProperties:ot,isConstant:nt,toConstant:it,isSelect:st,isFixedItems:lt,isMultiSelect:ut,allowAdditionalItems:ct,optionsList:dt,fallbackLabel:mt}),ht=gt(),ft=null,vt=null;function gt(){var e=new kr({errorDataPath:"property",allErrors:!0,multipleOfPrecision:8,schemaId:"auto",unknownFormats:"ignore"});return e.addFormat("data-url",/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/),e.addFormat("color",/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/),e}function yt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null===e?[]:e.map((function(e){var r=e.dataPath,t=e.keyword,a=e.message,o=e.params,n=e.schemaPath,i="".concat(r);return{name:t,property:i,message:a,params:o,stack:"".concat(i," ").concat(a).trim(),schemaPath:n}}))}function bt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.transformErrors,o=e.additionalMetaSchemas,n=void 0===o?[]:o,i=e.customFormats,s=void 0===i?{}:i,l=!O(vt,n),c=!O(ft,s);(l||c)&&(ht=gt()),n&&l&&Array.isArray(n)&&(ht.addMetaSchema(n),vt=n),s&&c&&E(s)&&(Object.keys(s).forEach((function(e){ht.addFormat(e,s[e])})),ft=s);var d=null;try{ht.validate(t,r)}catch(e){d=e}qr.getCurrentLocalize()(ht.errors);var m=yt(ht.errors);ht.errors=null;var p=d&&d.message&&"string"==typeof d.message&&d.message.includes("no schema with key or ref ");return p&&(m=[].concat(u(m),[{stack:d.message}])),"function"==typeof a&&(m=a(m)),{errors:m}}function Pt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.uiSchema,o=e.transformErrors,n=e.additionalMetaSchemas,i=void 0===n?[]:n,s=e.customFormats,l=void 0===s?{}:s,u=e.errorSchema,c=void 0===u?{}:u,d=e.required,m=void 0!==d&&d,p=e.propPath,h=void 0===p?"":p,f=e.isOnlyFirstError,v=void 0===f||f,g="array"===t.type&&Array.isArray(r)&&0===r.length,y=void 0===r||g;if(m){if(y){var b={keyword:"required",params:{missingProperty:h}},P=at({schema:t,uiSchema:a,errorSchema:c}).required;return P?b.message=P:qr.getCurrentLocalize()([b]),[b]}}else if(y&&!g)return[];var w=bt({formData:r,schema:t,transformErrors:o,additionalMetaSchemas:i,customFormats:l}).errors;w=w.filter((function(e){return""===e.property&&!e.schemaPath.includes("#/anyOf/")&&!e.schemaPath.includes("#/oneOf/")||"additionalProperties"===e.name}));var E=at({schema:t,uiSchema:a,errorSchema:c});return(v&&w.length>0?[w[0]]:w).reduce((function(e,r){return r.message=void 0!==E[r.name]?E[r.name]:r.message,e.push(r),e}),[])}function wt(e,r){try{return ht.validate(e,r)}catch(e){return!1}}function Et(e,r,t){for(var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=0;n<r.length;n++){var s=Kr(r[n],t,e);if(s.properties){var l=i(i({},t.definitions?{definitions:t.definitions}:{}),{},{anyOf:Object.keys(s.properties).map((function(e){return{required:[e]}}))}),u=void 0;if(s.anyOf){var c=o({},s);c.allOf?c.allOf=c.allOf.slice():c.allOf=[],c.allOf.push(l),u=c}else u=Object.assign({},s,l);if(a||delete u.required,wt(u,e))return n}else if(wt(r[n],e))return n}return 0}var St=Object.freeze({__proto__:null,ajvValidateFormData:bt,validateFormDataAndTransformMsg:Pt,isValid:wt,getMatchingOption:Et});function xt(e,r){if(Array.isArray(r))return Array.isArray(e)||(e=[]),r.map((function(r,t){return e[t]?xt(e[t],r):r}));if(E(r)){var t=Object.assign({},e);return Object.keys(r).reduce((function(t,a){return t[a]=xt(e?e[a]:{},r[a]),t}),t)}return r}function Ft(e,r,t){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],n=E(e)?e:{},i=E(a)?a:{};"allOf"in n&&(n=Qr(n,t,i));var s=r;if(E(s)&&E(n.default))s=x(s,n.default);else if("default"in n)s=n.default;else{if("$ref"in n){var l=R(n.$ref,t);return Ft(l,s,t,i,o)}if(lt(n))s=n.items.map((function(e,a){return Ft(e,Array.isArray(r)?r[a]:void 0,t,i,o)}));else if("oneOf"in n){var u=Kr(n.oneOf[Et(i,n.oneOf,t)],t,i);if(n.properties&&u.properties){var c=x(n,u);delete c.oneOf,n=c}else n=u}else if("anyOf"in n){var d=Kr(n.anyOf[Et(i,n.anyOf,t)],t,i);if(n.properties&&d.properties){var m=x(n,d);delete m.anyOf,n=m}else n=d}}switch(void 0===s&&(s=n.default),F(n)){case"null":return null;case"object":return Object.keys(n.properties||{}).reduce((function(e,r){var a=Ft(n.properties[r],(s||{})[r],t,(i||{})[r],o);return(o||void 0!==a)&&(e[r]=a),e}),{});case"array":if(Array.isArray(s)&&(s=s.map((function(e,r){return Ft(n.items[r]||n.additionalItems||{},e,t,{},o)}))),Array.isArray(a)&&(s=a.map((function(e,r){return Ft(n.items,(s||{})[r],t,e,{},o)}))),n.minItems){if(ut(n,t))return s||[];var p=s?s.length:0;if(n.minItems>p){var h=s||[],f=Array.isArray(n.items)?n.additionalItems:n.items,v=Mr(new Array(n.minItems-p),Ft(f,f.defaults,t,{},o));return h.concat(v)}}s=void 0===s?[]:s}return s}function Ot(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!E(e))throw new Error("Invalid schema: ".concat(e));var o=Kr(e,t,r),n=Ft(o,e.default,t,r,a);return void 0===r?n:E(r)||Array.isArray(r)?xt(n,r):0===r||!1===r||""===r?r:r||n}function _t(e,r){void 0===r&&(r={});var t=r.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}_t('.genFromComponent{font-size:14px;line-height:1;word-wrap:break-word;word-break:break-word;padding:0;margin:0}.genFromComponent a,.genFromComponent h1,.genFromComponent h2,.genFromComponent h3,.genFromComponent li,.genFromComponent p,.genFromComponent ul{font-size:14px}.genFromComponent .genFormIcon{width:12px;height:12px;vertical-align:top}.genFromComponent .genFormBtn{display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;background:#fff;border:1px solid #dcdfe6;color:#606266;-webkit-appearance:none;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;margin:0;-webkit-transition:.1s;transition:.1s;font-weight:500;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;padding:12px 20px;font-size:14px;border-radius:4px}.genFromComponent .genFormBtn.is-plain:focus,.genFromComponent .genFormBtn.is-plain:hover{background:#fff;border-color:#409eff;color:#409eff}.genFromComponent .hiddenWidget{display:none}.genFromComponent .fieldGroupWrap+.fieldGroupWrap .fieldGroupWrap_title{margin-top:20px}.genFromComponent .fieldGroupWrap_title{position:relative;display:block;width:100%;line-height:26px;margin-bottom:8px;font-size:15px;font-weight:700;border:0}.genFromComponent .fieldGroupWrap_des{font-size:12px;line-height:20px;margin-bottom:10px;color:#999}.genFromComponent .genFromWidget_des{padding:0;margin-top:0;margin-bottom:2px;font-size:12px;line-height:20px;color:#999;text-align:left}.genFromComponent .formItemErrorBox{margin:0 auto;color:#ff5757;padding-top:2px;position:absolute;top:100%;left:0;display:-webkit-box!important;line-height:16px;text-overflow:ellipsis;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1;white-space:normal;font-size:12px;text-align:left}.genFromComponent .genFormIcon-qs{fill:#606266;vertical-align:middle;display:inline-block;width:16px;height:16px;margin-left:2px;margin-top:-2px;cursor:pointer}.genFromComponent .genFormItemRequired:before{content:"*";color:#f56c6c;margin-right:4px}.genFromComponent .appendCombining_box{margin-bottom:22px}.genFromComponent .appendCombining_box .appendCombining_box{margin-bottom:10px}.genFromComponent .appendCombining_box{padding:10px;background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .validateWidget{margin-bottom:0!important;width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important;padding:0!important}.genFromComponent .validateWidget .formItemErrorBox{padding:5px 0;position:relative}.genFromComponent .arrayField:not(.genFormItem){margin-bottom:22px}.genFromComponent .arrayField:not(.genFormItem) .arrayField{margin-bottom:10px}.genFromComponent .arrayOrderList{background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .arrayOrderList_item{position:relative;padding:25px 10px 12px;border-radius:2px;margin-bottom:6px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.genFromComponent .arrayOrderList_bottomAddBtn{text-align:right;padding:15px 10px;margin-bottom:10px}.genFromComponent .bottomAddBtn{width:40%;min-width:10px;max-width:180px}.genFromComponent .arrayListItem_content{padding-top:15px;-webkit-box-flex:1;-ms-flex:1;flex:1;margin:0 auto;-webkit-box-shadow:0 -1px 0 0 rgba(0,0,0,.05);box-shadow:0 -1px 0 0 rgba(0,0,0,.05)}.genFromComponent .arrayListItem_index,.genFromComponent .arrayListItem_operateTool{position:absolute;height:25px}.genFromComponent .arrayListItem_index{top:6px;line-height:18px;height:18px;padding:0 6px;background-color:rgba(0,0,0,.28);color:#fff;font-size:12px;border-radius:2px}.genFromComponent .arrayListItem_operateTool{width:75px;right:9px;top:-1px;text-align:right;font-size:0}.genFromComponent .arrayListItem_btn{vertical-align:top;display:inline-block;padding:6px;margin:0;font-size:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none;cursor:pointer;text-align:center;background:transparent;color:#666}.genFromComponent .arrayListItem_btn:hover{opacity:.6}.genFromComponent .arrayListItem_btn[disabled]{color:#999;opacity:.3!important;cursor:not-allowed}.genFromComponent .arrayListItem_orderBtn-bottom,.genFromComponent .arrayListItem_orderBtn-top{background-color:#f0f9eb}.genFromComponent .arrayListItem_btn-delete{background-color:#fef0f0}.genFromComponent .formFooter_item{text-align:right;border-top:1px solid rgba(0,0,0,.08);padding-top:10px}.genFromComponent.formInlineFooter>.fieldGroupWrap{display:inline-block;margin-right:10px}.genFromComponent.formInline .genFormItem{display:inline-block;margin-right:10px;vertical-align:top}.genFromComponent.formInline .validateWidget{margin-right:0}.genFromComponent.formInline .formFooter_item{border-top:none;padding-top:0}.layoutColumn .layoutColumn_w100{width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important}.layoutColumn .fieldGroupWrap_box{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start}.layoutColumn .fieldGroupWrap_box>div{width:100%;-ms-flex-preferred-size:100%;flex-basis:100%}.layoutColumn .fieldGroupWrap_box>.genFormItem{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;-webkit-box-sizing:border-box;box-sizing:border-box;padding-right:10px}.layoutColumn.layoutColumn-1 .fieldGroupWrap_box>.genFormItem{padding-right:0}.layoutColumn.layoutColumn-2 .fieldGroupWrap_box>.genFormItem{width:50%;-ms-flex-preferred-size:50%;flex-basis:50%}.layoutColumn.layoutColumn-3 .fieldGroupWrap_box>.genFormItem{width:33.333%;-ms-flex-preferred-size:33.333%;flex-basis:33.333%}');var Dt={formFooter:{type:Object,default:function(){return{show:!0,okBtn:"保存",cancelBtn:"取消"}}},modelValue:{type:null,default:function(){return{}},required:!0},fallbackLabel:{type:Boolean,default:!1},formProps:{type:Object,default:function(){return{}}},schema:{type:Object,default:function(){return{}},required:!0},uiSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},errorSchema:{type:Object,default:function(){return{}}}},kt={name:"FormFooter",props:{okBtn:{type:String,default:"保存"},cancelBtn:{type:String,default:"取消"},formItemAttrs:{type:Object,default:function(){return{}}},globalOptions:{type:Object,default:function(){return{}}}},emits:["cancel","submit"],setup:function(e,t){var a=t.emit,o=e.globalOptions.COMPONENT_MAP;return function(){return r.h(P(o.formItem),i({class:{formFooter_item:!0}},e.formItemAttrs),{default:function(){return[r.h(P(o.button),{onClick:function(){a("cancel")}},{default:function(){return e.cancelBtn}}),r.h(P(o.button),{style:{marginLeft:"10px"},type:"primary",onClick:function(){a("submit")}},{default:function(){return e.okBtn}})]}})}}},jt={name:"FieldGroupWrap",inject:["genFormProvide"],props:{curNodePath:{type:String,default:""},showTitle:{type:Boolean,default:!0},showDescription:{type:Boolean,default:!0},title:{type:String,default:""},description:{type:String,default:""}},computed:{trueTitle:function(){var e=this.title;if(e)return e;var r=(this.genFormProvide.value||this.genFormProvide).fallbackLabel&&this.curNodePath.split(".").pop();return r!=="".concat(Number(r))?r:""}}},It={class:"fieldGroupWrap"},At={key:0,class:"fieldGroupWrap_title"},Ct={class:"fieldGroupWrap_box"};jt.render=function(e,t,a,o,n,i){return r.openBlock(),r.createBlock("div",It,[a.showTitle&&i.trueTitle?(r.openBlock(),r.createBlock("h3",At,r.toDisplayString(i.trueTitle),1)):r.createCommentVNode("v-if",!0),a.showDescription&&a.description?(r.openBlock(),r.createBlock("p",{key:1,class:"fieldGroupWrap_des",innerHTML:a.description},null,8,["innerHTML"])):r.createCommentVNode("v-if",!0),r.createVNode("div",Ct,[r.renderSlot(e.$slots,"default")])])},jt.__file="utils/components/FieldGroupWrap.vue";var Rt={formProps:{type:null},globalOptions:{type:null},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},customFormats:{type:Object,default:function(){return{}}},rootSchema:{type:Object,default:function(){return{}}},rootFormData:{type:null,default:function(){return{}}},curNodePath:{type:String,default:""},required:{type:Boolean,default:!1},needValidFieldGroup:{type:Boolean,default:!0}},$t={class:"genFormIcon genFormIcon-down",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},Nt=r.createVNode("path",{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"},null,-1);var Lt={render:function(e,t){return r.openBlock(),r.createBlock("svg",$t,[Nt])},__file:"utils/icons/IconCaretDown.vue"},Tt={class:"genFormIcon genFormIcon-up",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},zt=r.createVNode("path",{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"},null,-1);var Vt={render:function(e,t){return r.openBlock(),r.createBlock("svg",Tt,[zt])},__file:"utils/icons/IconCaretUp.vue"},qt={class:"genFormIcon genFormIcon-close",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},Mt=r.createVNode("path",{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1\n 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0\n 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"},null,-1);var Wt={render:function(e,t){return r.openBlock(),r.createBlock("svg",qt,[Mt])},__file:"utils/icons/IconClose.vue"},Bt={class:"genFormIcon genFormIcon-plus",t:"1551322312294",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"10297","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"200",height:"200"},Ut=r.createVNode("path",{d:"M474 152m8 0l60 0q8 0 8 8l0 704q0 8-8 8l-60 0q-8 0-8-8l0-704q0-8 8-8Z","p-id":"10298"},null,-1),Qt=r.createVNode("path",{d:"M168 474m8 0l672 0q8 0 8 8l0 60q0 8-8 8l-672 0q-8 0-8-8l0-60q0-8 8-8Z","p-id":"10299"},null,-1);var Ht={render:function(e,t){return r.openBlock(),r.createBlock("svg",Bt,[Ut,Qt])},__file:"utils/icons/IconPlus.vue"},Kt={class:"genFormIcon genFormIcon-qs",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},Gt=r.createVNode("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 708c-22.1\n 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 0\n 0-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8\n 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6\n 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6\n 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z"},null,-1);var Jt={render:function(e,t){return r.openBlock(),r.createBlock("svg",Kt,[Gt])},__file:"utils/icons/IconQuestion.vue"},Zt={name:"Widget",props:{isFormData:{type:Boolean,default:!0},curValue:{type:null,default:0},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},widget:{type:[String,Function,Object],default:null},required:{type:Boolean,default:!1},emptyValue:{type:null,default:void 0},rootFormData:{type:null},curNodePath:{type:String,default:""},label:{type:String,default:""},width:{type:String,default:""},labelWidth:{type:String,default:""},description:{type:String,default:""},widgetAttrs:{type:Object,default:function(){return{}}},widgetClass:{type:Object,default:function(){return{}}},widgetStyle:{type:Object,default:function(){return{}}},fieldAttrs:{type:Object,default:function(){return{}}},fieldClass:{type:Object,default:function(){return{}}},fieldStyle:{type:Object,default:function(){return{}}},uiProps:{type:Object,default:function(){return{}}},formProps:null,getWidget:null,globalOptions:null,onChange:null},emits:["change"],inheritAttrs:!0,setup:function(e,t){var a=t.emit,o=r.inject("genFormProvide"),n=r.computed({get:function(){return e.isFormData?v(e.rootFormData,e.curNodePath):e.curValue},set:function(r){var t=""===r||null===r?e.emptyValue:r;e.isFormData&&b(e.rootFormData,e.curNodePath,t),a("change",t)}});e.uiProps.enumOptions&&e.uiProps.enumOptions.length>0&&void 0===n.value&&n.value!==e.uiProps.enumOptions[0]&&(e.schema.items?n.value=[]:e.required&&(n.value=e.uiProps.enumOptions[0].value));var s=r.ref(null);return"function"==typeof e.getWidget&&r.watch(s,(function(){e.getWidget.call(null,s.value)})),function(){var t=h(e.curNodePath),a=e.globalOptions.HELPERS.isMiniDes(e.formProps),l=e.description?r.h("div",{innerHTML:e.description,class:{genFromWidget_des:!0}}):null,c=e.globalOptions.COMPONENT_MAP,d=a&&l?r.h(P(c.popover),{style:{margin:"0 2px",fontSize:"16px",cursor:"pointer"},placement:"top",trigger:"hover"},{default:function(){return l},reference:function(){return r.h(Jt)}}):null,m=i(i({},e.fieldStyle),e.width?{width:e.width,flexBasis:e.width,paddingRight:"10px"}:{}),p=mt(e.label,e.widget&&o.value.fallbackLabel,e.curNodePath);return r.h(P(c.formItem),i(i(i({class:i(i({},e.fieldClass),{},{genFormItem:!0}),style:m},e.fieldAttrs),e.labelWidth?{labelWidth:e.labelWidth}:{}),e.isFormData?{prop:t?"__$$root":e.curNodePath,rules:[{validator:function(r,a,o){t&&(a=e.rootFormData);var n=Pt({formData:a,schema:e.schema,uiSchema:e.uiSchema,customFormats:e.customFormats,errorSchema:e.errorSchema,required:e.required,propPath:e.curNodePath});if(n.length>0)return o?o(n[0].message):Promise.reject(n[0].message);var i=e.customRule;return i&&"function"==typeof i?i({field:e.curNodePath,value:a,rootFormData:e.rootFormData,callback:o}):o?o():Promise.resolve()},trigger:"blur"}]}:{}),i(i({error:function(e){return e.error?r.h("div",{class:{formItemErrorBox:!0},title:e.error},[e.error]):null}},p?{label:function(){return r.h("span",{class:{genFormLabel:!0,genFormItemRequired:e.required}},["".concat(p)].concat(u(d?[d]:[]),["".concat(e.formProps&&e.formProps.labelSuffix||"")]))}}:{}),{},{default:function(t){return[].concat(u(!a&&l?[l]:[]),u(e.widget?[r.h(P(e.widget),i(i(i({style:e.widgetStyle,class:e.widgetClass},e.widgetAttrs),e.uiProps),{},{modelValue:n.value,ref:s,"onUpdate:modelValue":function(r){var t=n.value;t!==r&&(n.value=r,e.onChange&&e.onChange(r,t))}},t))]:[]))}}))}}},Yt={name:"ObjectField",props:Rt,setup:function(e){return function(){var t=e.curNodePath,a=rt({schema:e.schema,uiSchema:e.uiSchema,curNodePath:t,rootFormData:e.rootFormData}),o=a.title,n=a.description,s=a.showTitle,c=a.showDescription,d=a.order,m=a.fieldClass,p=a.fieldAttrs,h=a.fieldStyle,g=a.onlyShowIfDependent,y=ot(Object.keys(e.schema.properties||{}),d).map((function(a){var o=function(r){return Array.isArray(e.schema.required)&&!!~e.schema.required.indexOf(r)}(a),n=function(r){var t=!1,a=!1;return E(e.schema.dependencies)&&(a=Object.entries(e.schema.dependencies).some((function(a){var o=l(a,2),n=o[0],i=o[1],s=!(!Array.isArray(i)||!~i.indexOf(r));return t=t||s,s&&void 0!==v(e.rootFormData,e.curNodePath)[n]}))),{isDependency:t,curDependent:a}}(a),s=n.isDependency,u=n.curDependent;return s&&g&&!u?null:r.h(da,i(i({key:a},e),{},{schema:e.schema.properties[a],uiSchema:e.uiSchema[a],errorSchema:e.errorSchema[a],required:o||u,curNodePath:f(t,a)}))}));return r.h(jt,i({title:o,description:n,showTitle:s,showDescription:c,curNodePath:t,class:i({},m),style:h},p),{default:function(){return[].concat(u(y),u(e.needValidFieldGroup?[r.h(Zt,{key:"validateWidget-object",class:{validateWidget:!0,"validateWidget-object":!0},schema:Object.entries(e.schema).reduce((function(r,t){var a=l(t,2),o=a[0],n=a[1];return!1!==e.schema.additionalProperties&&["properties","id","$id"].includes(o)||(r[o]=n),r}),{}),uiSchema:e.uiSchema,errorSchema:e.errorSchema,curNodePath:t,rootFormData:e.rootFormData,globalOptions:e.globalOptions})]:[]))}})}}},Xt={name:"StringField",props:Rt,setup:function(e,t){var a=t.attrs,o=r.computed((function(){var r=st(e.schema)&&dt(e.schema,e.uiSchema,e.curNodePath,e.rootFormData),t=tt({schema:e.schema,uiSchema:e.uiSchema,curNodePath:e.curNodePath,rootFormData:e.rootFormData},(function(){var t="number"===e.schema.type||"integer"===e.schema.type;return{widget:r?e.globalOptions.WIDGET_MAP.common.select:e.globalOptions.WIDGET_MAP.formats[e.schema.format]||(t?e.globalOptions.WIDGET_MAP.types.number:e.globalOptions.WIDGET_MAP.types.string)}}));return r&&!t.uiProps.enumOptions&&(t.uiProps.enumOptions=r),t}));return function(){return r.h(Zt,i(i(i({},e),a),o.value))}}},ea={name:"NumberField",props:Rt,setup:function(e,t){var a=t.attrs;return function(){return r.h(Xt,i(i({},e),a))}}},ra={name:"IntegerField",props:Rt,setup:function(e,t){var a=t.attrs;return function(){return r.h(Xt,i(i({},e),a))}}},ta={name:"BooleanField",props:Rt,setup:function(e,t){var a=t.attrs;return function(){var t=e.schema,o=e.uiSchema,n=e.curNodePath,s=e.rootFormData,l=e.globalOptions,u=dt({enumNames:t.enumNames||["true","false"],enum:t.enum||[!0,!1]},o,n,s),c=tt({schema:t,uiSchema:o,curNodePath:n,rootFormData:s},(function(){return{widget:l.WIDGET_MAP.types.boolean}}));return c.uiProps.enumOptions=c.uiProps.enumOptions||u,r.h(Zt,i(i(i({},a),e),c))}}},aa={name:"ArrayOrderList",emits:["arrayOperate"],props:{vNodeList:{type:Array,default:[]},tupleItemsLength:{type:Number,default:0},addable:{type:Boolean,default:!0},showIndexNumber:{type:Boolean,default:!1},sortable:{type:Boolean,default:!0},removable:{type:Boolean,default:!0},maxItems:{},minItems:{},globalOptions:null},setup:function(e,t){var a=t.emit,o=r.computed((function(){var r=e.addable,t=e.maxItems,a=e.vNodeList;return!!r&&(void 0===t||a.length<t)})),n=r.computed((function(){var r=e.removable,t=e.minItems,a=e.vNodeList;return!!r&&(void 0===t||a.length>t)}));return function(){return e.vNodeList.length<=0&&!e.addable?null:r.h("div",{class:{arrayOrderList:!0}},e.vNodeList.map((function(t,o){var s=t.key,l=t.vNode,u=e.tupleItemsLength+o,c=o+1;return r.h("div",{key:s,class:{arrayOrderList_item:!0}},[e.showIndexNumber?r.h("div",{class:{arrayListItem_index:!0}},c):null,r.h("div",{class:{arrayListItem_operateTool:!0}},[r.h("button",{style:i({},e.sortable?{}:{display:"none"}),class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-top":!0},type:"button",disabled:!e.sortable||0===o,onClick:function(){a("arrayOperate",{command:"moveUp",data:{index:u}})}},[r.h(Vt)]),r.h("button",{style:i({},e.sortable?{}:{display:"none"}),class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-bottom":!0},type:"button",disabled:!e.sortable||o===e.vNodeList.length-1,onClick:function(){a("arrayOperate",{command:"moveDown",data:{index:u}})}},[r.h(Lt)]),r.h("button",{style:i({},e.removable?{}:{display:"none"}),class:{arrayListItem_btn:!0,"arrayListItem_btn-delete":!0},type:"button",disabled:!n.value,onClick:function(){a("arrayOperate",{command:"remove",data:{index:u}})}},[r.h(Wt)])]),r.h("div",{class:{arrayListItem_content:!0}},[l])])})).concat([r.h("p",{style:i({},o.value?{}:{display:"none"}),class:{arrayOrderList_bottomAddBtn:!0}},[r.h("button",{class:{bottomAddBtn:!0,"is-plain":!0,genFormBtn:!0},type:"button",onClick:function(){a("arrayOperate",{command:"add"})}},[r.h(Ht,{style:{marginRight:"5px"}}),e.maxItems?"( ".concat(e.vNodeList.length," / ").concat(e.maxItems," )"):""])])]))}}},oa={name:"ArrayFieldNormal",props:i(i({},Rt),{},{itemsFormData:{type:Array}}),setup:function(e,t){var a=t.attrs;return function(){var t=e.schema,o=e.uiSchema,n=e.curNodePath,s=e.rootFormData,l=e.itemsFormData,u=e.errorSchema,c=e.globalOptions,d=rt({schema:t,uiSchema:o,curNodePath:n,rootFormData:s}),m=d.title,p=d.description,h=d.addable,v=d.showIndexNumber,g=d.sortable,y=d.removable,b=d.showTitle,P=d.showDescription,w=d.fieldClass,E=d.fieldAttrs,S=d.fieldStyle,x=l.map((function(a,s){var l=Zr({schema:t.items,uiSchema:o.items},s);return{key:a.key,vNode:r.h(da,i(i({key:a.key},e),{},{schema:t.items,required:![].concat(t.items.type).includes("null"),uiSchema:i(i({},o.items),l),errorSchema:u.items,curNodePath:f(n,s)}))}}));return r.h(jt,{title:m,description:p,showTitle:b,showDescription:P,curNodePath:n,class:w,attrs:E,style:S},{default:function(){return r.h(aa,i(i({},a),{},{vNodeList:x,showIndexNumber:v,addable:h,sortable:g,removable:y,maxItems:t.maxItems,minItems:t.minItems,globalOptions:c}))}})}}},na={name:"ArrayFieldMultiSelect",props:i({},Rt),setup:function(e,t){var a=t.attrs;return function(){var t=e.schema,o=e.rootSchema,n=e.uiSchema,s=e.curNodePath,l=e.rootFormData,u=e.globalOptions,c=dt(Kr(t.items,o),n,s,l),d=tt({schema:t,uiSchema:n,curNodePath:s,rootFormData:l},(function(){return{widget:u.WIDGET_MAP.common.checkboxGroup}}));return d.uiProps.multiple=!0,c&&!d.uiProps.enumOptions&&(d.uiProps.enumOptions=c),r.h(Zt,i(i(i({},a),e),d))}}},ia={name:"ArrayFieldTuple",props:i(i({},Rt),{},{itemsFormData:{type:Array,default:function(){return[]}}}),emits:["arrayOperate"],setup:function(e,t){var a=t.emit;t.attrs;return function(){var r=!Array.isArray(e.itemsFormData);if(r||e.itemsFormData.length<e.schema.items.length){var t=Ot(e.schema,void 0,e.rootSchema);a("arrayOperate",r?{command:"setNewTarget",data:{newTarget:t}}:{command:"batchPush",data:{pushArray:t.slice(e.itemsFormData.length)}})}}(),function(){if(!Array.isArray(e.itemsFormData))return null;var t,o,n=e.schema,s=e.uiSchema,l=e.errorSchema,c=e.curNodePath,d=e.globalOptions,m=rt({schema:n,uiSchema:s,curNodePath:c,rootFormData:e.rootFormData}),p=m.title,h=m.description,v=m.addable,g=m.showIndexNumber,y=m.sortable,b=m.removable,P=m.showTitle,w=m.showDescription,E=m.fieldClass,S=m.fieldAttrs,x=m.fieldStyle,F=(t=e.itemsFormData,o=e.schema.items.length-1,t.reduce((function(e,r,t){return e[t>o?1:0].push(r),e}),[[],[]])),O=F[0].map((function(t,a){return r.h(da,i(i({key:t.key},e),{},{required:![].concat(n.items[a].type).includes("null"),schema:n.items[a],uiSchema:s.items?s.items[a]:{},errorSchema:l.items?l.items[a]:{},curNodePath:f(c,a)}))})),_=F[1].map((function(t,a){var o=Zr({schema:n.additionalItems,uiSchema:s.additionalItems},a);return{key:t.key,vNode:r.h(da,i(i({key:t.key},e),{},{schema:n.additionalItems,required:![].concat(n.additionalItems.type).includes("null"),uiSchema:i(i({},s.additionalItems),o),errorSchema:l.additionalItems,curNodePath:f(e.curNodePath,a+n.items.length)}))}})),D=(void 0===v||v)&&ct(e.schema);return r.h(jt,i(i({title:p,description:h,showTitle:P,showDescription:w,curNodePath:c},S),{},{class:E,style:x}),{default:function(){return[].concat(u(O),[r.h(aa,{onArrayOperate:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return a.apply(void 0,["arrayOperate"].concat(r))},vNodeList:_,tupleItemsLength:n.items.length,addable:D,showIndexNumber:g,sortable:y,removable:b,maxItems:n.maxItems,minItems:n.minItems,globalOptions:d})])}})}}},sa={name:"ArrayFieldSpecialFormat",props:Rt,setup:function(e,t){var a=t.attrs,o=e.schema,n=e.uiSchema,s=e.curNodePath,l=e.rootFormData,u=tt({schema:i({"ui:widget":e.globalOptions.WIDGET_MAP.formats[o.format]},o),uiSchema:n,curNodePath:s,rootFormData:l});return function(){return r.h(Zt,i(i(i({},a),e),u))}}},la={name:"ArrayField",props:Rt,setup:function(e){var t=function(){var r=v(e.rootFormData,e.curNodePath);return Array.isArray(r)?r:[]},o=r.ref(t().map((function(){return k()}))),n=r.computed((function(){return t()}));r.watch(n,(function(e,t){e!==t&&r.toRaw(e)!==r.toRaw(t)&&Array.isArray(e)&&(o.value=e.map((function(){return k()})))}),{deep:!0});var s=r.computed((function(){return n.value.map((function(e,r){return{key:o.value[r],value:e}}))})),u=function(r){var t=r.command,a=r.data,i={moveUp:function(e,r){!function(e,r){if(0===r)return!1;var t=[e[r],e[r-1]];e.splice.apply(e,[r-1,2].concat(t))}(e,r.index)},moveDown:function(e,r){!function(e,r){if(r===e.length-1)return!1;var t=e[r],a=[e[r+1],t];e.splice.apply(e,[r,2].concat(a))}(e,r.index)},remove:function(e,r){!function(e,r){e.splice(r,1).length}(e,r.index)},add:function(e,r){var t=r.newRowData;e.push(t)},batchPush:function(e,r){r.pushArray.forEach((function(r){e.push(r)}))},setNewTarget:function(e,r){b(r.formData,r.nodePath,r.newTarget)}}[t];if(!i)throw new Error("错误 - 未知的操作:[".concat(t,"]"));var s,l,u,c=a,d=a;"add"===t?(c={newRowData:(s=e.schema,l=e.rootSchema,u=s.items,lt(s)&&ct(s)&&(u=s.additionalItems),Ot(u,void 0,l))},d={newRowData:k()}):"batchPush"===t?d={pushArray:c.pushArray.map((function(e){return k()}))}:"setNewTarget"===t&&(c={formData:e.rootFormData,nodePath:e.curNodePath,newTarget:c.newTarget},d={formData:o,nodePath:"value",newTarget:c.newTarget.map((function(e){return k()}))}),i.apply(null,[o.value,d]),i.apply(null,[n.value,c])};return function(){var t=e.schema,o=e.uiSchema,n=e.rootSchema,c=e.rootFormData,d=e.curNodePath,m=e.globalOptions;if(!t.hasOwnProperty("items"))throw new Error("[".concat(t,"] 请先定义 items属性"));if(ut(t,n))return r.h(na,i(i({},e),{},{class:a({},I(na.name),!0)}));if(t.format||t["ui:widget"]||o["ui:widget"])return r.h(sa,i(i({},e),{},{class:a({},I(sa.name),!0)}));var p=lt(t)?ia:oa;return r.h("div",[r.h(p,i(i({itemsFormData:s.value},e),{},{onArrayOperate:u,class:a({},I(p.name),!0)})),e.needValidFieldGroup?r.h(Zt,{key:"validateWidget-array",class:{validateWidget:!0,"validateWidget-array":!0},schema:Object.entries(t).reduce((function(e,r){var t=l(r,2),a=t[0],o=t[1];return"items"!==a&&(e[a]=o),e}),{}),uiSchema:o,errorSchema:e.errorSchema,curNodePath:d,rootFormData:c,globalOptions:m}):null])}}},ua={name:"SelectLinkageField",props:i(i({},Rt),{},{combiningType:{type:String,default:"anyOf"},selectList:{type:Array,require:!0}}),setup:function(e){var t,o,n=r.ref((t=v(e.rootFormData,e.curNodePath),0!==(o=Et(t,e.selectList,e.rootSchema,!0))?o:e.curSelectIndex||0)),u=function(){var t=tt({schema:e.schema["".concat(e.combiningType,"Select")]||{},uiSchema:e.uiSchema["".concat(e.combiningType,"Select")]||{},curNodePath:e.curNodePath,rootFormData:e.rootFormData},(function(){return{widget:"SelectWidget"}}));if(t.label=t.label||e.schema.title,t.description=t.description||e.schema.description,!t.uiProps.enumOptions){var o=e.uiSchema[e.combiningType]||[];t.uiProps.enumOptions=e.selectList.map((function(e,r){return{label:rt({schema:e,uiSchema:o[r],containsSpec:!1}).title||"选项 ".concat(r+1),value:r}}))}return r.h(Zt,i(i({key:"fieldSelect_".concat(e.combiningType),class:a({},"fieldSelect_".concat(e.combiningType),!0),isFormData:!1,curValue:n.value,globalOptions:e.globalOptions},t),{},{onChange:function(e){n.value=e}}))};return r.watch(n,(function(r,t){var a=v(e.rootFormData,e.curNodePath),o=Ot(e.selectList[r],void 0,e.rootSchema),n=Object.prototype.hasOwnProperty;if(E(a)){var i=Kr(e.selectList[t],e.rootSchema);if("object"===F(i))for(var s in i.properties)n.call(i.properties,s)&&!n.call(o,s)&&y(a,s)}E(o)?Object.entries(o).forEach((function(e){var r=l(e,2),t=r[0],o=r[1];void 0!==o&&b(a,t,o)})):b(e.rootFormData,e.curNodePath,o||a)})),function(){var t,o=e.curNodePath,l=p(o),c=null;if(("object"===e.schema.type||e.schema.properties)&&!function(e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!1;return!0}(e.schema.properties)){var d,h=Object.assign({},e.schema);delete h[e.combiningType],c=r.h(da,i(i({key:"origin_".concat(e.combiningType),class:(d={},a(d,"".concat(e.combiningType,"_originBox"),!0),a(d,"".concat(l,"-originBox"),!0),d)},e),{},{schema:h}))}var f=[u()],v=e.selectList[n.value];if(v){var g=e.schema,y=e.combiningType,b="".concat(e.combiningType,"Select");g.properties,g[y],g[b];var P=s(g,["properties",y,b].map(m));v=Object.assign({},P,v);var w=j(rt({schema:e.schema,uiSchema:e.uiSchema,containsSpec:!1,curNodePath:o,rootFormData:e.rootFormData}),(function(r){return r===e.combiningType?void 0:"ui:".concat(r)})),E=j(at({schema:e.schema,uiSchema:e.uiSchema,errorSchema:e.errorSchema}),(function(r){return r===e.combiningType?void 0:"err:".concat(r)}));f.push(r.h(da,i(i({key:"appendSchema_".concat(e.combiningType)},e),{},{schema:i({"ui:showTitle":!1,"ui:showDescription":!1},v),required:e.required,uiSchema:i(i({},w),(e.uiSchema[e.combiningType]||[])[n.value]),errorSchema:i(i({},E),(e.errorSchema[e.combiningType]||[])[n.value])})))}return f.push(r.h(Zt,{key:"validateWidget-".concat(e.combiningType),class:a({validateWidget:!0},"validateWidget-".concat(e.combiningType),!0),schema:e.schema,uiSchema:e.uiSchema,errorSchema:e.errorSchema,curNodePath:e.curNodePath,rootFormData:e.rootFormData,globalOptions:e.globalOptions})),r.h("div",[c,r.h("div",{key:"appendBox_".concat(e.combiningType),class:(t={appendCombining_box:!0},a(t,"".concat(e.combiningType,"_appendBox"),!0),a(t,"".concat(l,"-appendBox"),!0),t)},f)])}}},ca={array:la,boolean:ta,integer:ra,number:ea,object:Yt,string:Xt,null:{render:function(){return null}},anyOf:{name:"AnyOfField",setup:function(e,t){var a=t.attrs,o=t.slots;return function(){return r.h(ua,i(i({},a),{},{combiningType:"anyOf",selectList:a.schema.anyOf}),o)}}},oneOf:{name:"oneOfField",setup:function(e,t){var a=t.attrs,o=t.slots;return function(){return r.h(ua,i(i({},a),{},{combiningType:"oneOf",selectList:a.schema.oneOf}),o)}}}},da={name:"SchemaField",props:Rt,setup:function(e){return function(){var t,o=Kr(e.schema,e.rootSchema),n=i(i({},e),{},{schema:o});if(0===Object.keys(o).length)return null;var s,l,u=Xr(ca,n),c=u.field,d=u.fieldProps,m=Yr({schema:o,uiSchema:e.uiSchema,curNodePath:e.curNodePath,rootFormData:e.rootFormData}),h=p(e.curNodePath);return o.anyOf&&o.anyOf.length>0&&!st(o)?r.h(P(ca.anyOf),i({class:(s={},a(s,"".concat(h,"-anyOf"),!0),a(s,"fieldItem",!0),a(s,"anyOfField",!0),s)},n)):o.oneOf&&o.oneOf.length>0&&!st(o)?r.h(P(ca.oneOf),i({class:(l={},a(l,"".concat(h,"-oneOf"),!0),a(l,"fieldItem",!0),a(l,"oneOfField",!0),l)},n)):c&&!m?r.h(P(c),i(i({},n),{},{fieldProps:d,class:(t={},a(t,I(c.name)||c,!0),a(t,"hiddenWidget",m),a(t,"fieldItem",!0),a(t,h,!0),t)})):null}}};var ma=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t.model,n=void 0===o?"value":o;return r.defineComponent({inheritAttrs:!1,setup:function(t,o){var l=o.attrs,u=o.slots;return function(){var t,o=l.modelValue,c=l["onUpdate:modelValue"],d=s(l,["modelValue","onUpdate:modelValue"]);return r.h(P(e),i((a(t={},n,o),a(t,"onUpdate:".concat(n),c),t),d),u)}}})},pa=function(e){return r.defineComponent({inheritAttrs:!1,setup:function(t,a){var o=a.attrs,n=a.slots;return function(){var t=o.isNumberValue,a=o.isRange,l=o.value,u=s(o,["isNumberValue","isRange","value"]),c=t?a?(l||[]).map((function(e){return"number"==typeof e?String(e):e})):"number"==typeof l?String(l):l:l,d=i(i({},o),{},{value:c,"onUpdate:value":function(e){t&&(e=a?e.map((function(e){return+e})):+e),u["onUpdate:value"].call(this,e)}});return r.h(P(e),d,n)}}})},ha=ma({name:"CheckboxesWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}},setup:function(e,t){var a=t.attrs;return function(){return r.h(P("a-checkbox-group"),a,{default:function(){return e.enumOptions.map((function(e,t){return r.h(P("a-checkbox"),{key:t,value:e.value},{default:function(){return e.label}})}))}})}}},{model:"value"}),fa=ma({name:"RadioWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}},setup:function(e,t){var a=t.attrs;return function(){return r.h(P("a-radio-group"),a,{default:function(){return e.enumOptions.map((function(e,t){return r.h(P("a-radio"),{key:t,value:e.value},{default:function(){return e.label}})}))}})}}},{model:"value"}),va=ma({name:"SelectWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}},setup:function(e,t){var a=t.attrs;return function(){return r.h(P("a-select"),i(i({},a.multiple?{mode:"multiple"}:{}),a),{default:function(){return e.enumOptions.map((function(e,t){return r.h(P("a-select-option"),{key:t,value:e.value},{default:function(){return e.label}})}))}})}}},{model:"value"}),ga=ma(pa({name:"DatePickerWidget",inheritAttrs:!1,setup:function(e,t){var a=t.attrs;return function(){var e=a.isNumberValue,t=a.isRange,o=s(a,["isNumberValue","isRange"]);return r.h(P(t?"a-range-picker":"a-date-picker"),i({valueFormat:e?"x":"YYYY-MM-DD"},o))}}}),{model:"value"}),ya=ma(pa({name:"DatePickerWidget",inheritAttrs:!1,setup:function(e,t){var a=t.attrs;return function(){var e=a.isNumberValue,t=a.isRange,o=s(a,["isNumberValue","isRange"]);return r.h(P(t?"a-range-picker":"a-date-picker"),i({valueFormat:e?"x":"YYYY-MM-DDTHH:mm:ssZ",showTime:!0},o))}}}),{model:"value"}),ba={CheckboxesWidget:ha,RadioWidget:fa,SelectWidget:va,TimePickerWidget:ma({name:"TimePickerWidget",inheritAttrs:!1,setup:function(e,t){var a=t.attrs;return function(){return r.h(P("a-time-picker"),i({"value-format":"HH:mm:ss"},a))}}},{model:"value"}),DatePickerWidget:ga,DateTimePickerWidget:ya,UploadWidget:{name:"UploadWidget",props:{modelValue:{default:null,type:[String,Array]},responseFileUrl:{default:function(){return function(e){return e?e.url||e.data&&e.data.url:""}},type:[Function]},btnText:{type:String,default:"点击上传"},slots:{type:null,default:null}},inheritAttrs:!1,setup:function(e,t){var a=t.attrs,o=t.emit,n=e.modelValue,s=Array.isArray(n),l=a.fileList||(s?n.map((function(e,r){return{uid:String(r),status:"done",name:"已上传文件(".concat(r+1,")"),url:e}})):n?[{uid:"1",status:"done",name:"已上传文件",url:n}]:[]),u=r.ref(l),c=function(r){return r&&(r.response&&e.responseFileUrl(r.response)||r.url)||""};return function(){return r.h(P("a-upload"),i(i({},a),{},{fileList:u.value,"onUpdate:fileList":function(e){u.value=e},onChange:function(e){"uploading"!==e.file.status&&function(e){var r;if(s)r=e.length?e.reduce((function(e,r){var t=c(r);return t&&(r.url=t,e.push(t)),e}),[]):[];else{var t=e[e.length-1];r=c(t),t&&r?(t.url=r,u.value=[t]):u.value=[]}o("update:modelValue",r)}(e.fileList),a.onChange&&a.onChange.call(this,e)}}),i({default:function(){return r.h(P("a-button"),{type:"primary"},{default:function(){return e.btnText}})}},e.slots||{}))}}},InputWidget:ma("a-input"),InputNumberWidget:ma("a-input-number"),AutoCompleteWidget:ma("a-auto-complete"),SliderWidget:ma("a-slider"),RateWidget:ma("a-rate"),SwitchWidget:ma("a-switch",{model:"checked"})},Pa=ba.InputWidget,wa=ba.InputNumberWidget,Ea={types:{boolean:ba.SwitchWidget,string:Pa,number:wa,integer:wa},formats:{color:{setup:function(e,t){var a=t.attrs;return function(){return r.h(Pa,i(i({},a),{},{style:i(i({},a.style||{}),{},{maxWidth:"180px"})}),{addonAfter:function(){return r.h(Pa,{disabled:a.disabled,readonly:a.readonly,moduleValue:a.moduleValue,"onUpdate:modelValue":a["onUpdate:modelValue"],type:"color",style:{padding:"0",width:"50px"}})}})}}},time:ba.TimePickerWidget,date:ba.DatePickerWidget,"date-time":ba.DateTimePickerWidget},common:{select:ba.SelectWidget,radioGroup:ba.RadioWidget,checkboxGroup:ba.CheckboxesWidget},widgetComponents:ba};_t(".genFromComponent.ant-form-vertical .ant-form-item-label{line-height:26px;padding-bottom:6px;font-size:14px}.genFromComponent .ant-form-item{margin-bottom:22px}.genFromComponent .ant-form-item.ant-form-item-with-help{margin-bottom:2px}.genFromComponent .ant-form-explain{padding-top:2px;display:-webkit-box!important;text-overflow:ellipsis;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;text-align:left;line-height:1.2;font-size:12px}.genFromComponent .validateWidget .ant-form-explain{padding:5px 0;position:relative}.genFromComponent .ant-form-item-label>label.ant-form-item-no-colon:after{display:none}");var Sa={WIDGET_MAP:Ea,COMPONENT_MAP:{form:r.defineComponent({inheritAttrs:!1,setup:function(e,t){var a=t.attrs,o=t.slots,n={top:{layout:"vertical"},left:{layout:"horizontal",labelAlign:"left"},right:{layout:"horizontal",labelAlign:"right"}},l=r.ref(null);return a.setFormRef&&r.onMounted((function(){l.value.$$validate=function(e){l.value.validate().then((function(r){e(!0,r)})).catch((function(r){e(!1,r.errorFields)}))},a.setFormRef(l.value)})),function(){a.setFormRef;var e=a.labelPosition;a.labelWidth;var t=a.model,u=s(a,["setFormRef","labelPosition","labelWidth","model"]);return r.h(P("a-form"),i(i(i({ref:l,model:t.value},n[e||"top"]),u),{},{colon:!1}),o)}}}),formItem:r.defineComponent({inheritAttrs:!1,setup:function(e,t){var a=t.attrs,o=t.slots,n=r.ref(null);return function(){var e=a.prop,t=a.rules,l=s(a,["prop","rules"]);return r.h(P("a-form-item"),i(i({},l),{},{ref:n,rules:(t||[]).map((function(e){return i(i({},e),{},{validator:function(r,t){return e.validator.apply(this,[r,t])}})})),name:e?e.split("."):e}),i(i({},o),{},{default:function(){return o.default.call(this,{onBlur:function(e){var r=e.target.previousElementSibling;r&&r.classList.contains("genFromWidget_des")&&n.value.onFieldBlur()}})}}))}}}),button:"a-button",popover:r.defineComponent({setup:function(e,t){var a=t.attrs,o=t.slots,n=o.default,i=o.reference;return function(){return r.h(P("a-popover"),{attrs:a},{default:i,content:n})}}})},HELPERS:{isMiniDes:function(e){return e&&(["left","right"].includes(e.labelPosition)||"horizontal"===e.layout)}}},xa=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={name:"VueForm",props:Dt,emits:["update:modelValue","change","cancel","submit","validation-failed","form-mounted"],setup:function(o,n){var u=n.slots,c=n.emit;if(!t.installed&&e.WIDGET_MAP.widgetComponents){var d=r.getCurrentInstance();Object.entries(e.WIDGET_MAP.widgetComponents).forEach((function(e){var r=l(e,2),t=r[0],a=r[1];return d.appContext.app.component(t,a)})),t.installed=!0}r.provide("genFormProvide",r.computed((function(){return{fallbackLabel:o.fallbackLabel}})));var m=r.ref(Ot(o.schema,o.modelValue,o.schema)),p=r.computed((function(){return i({show:!0,okBtn:"保存",cancelBtn:"取消"},o.formFooter)})),h=null,f=function(e,r){c("update:modelValue",e),c("change",{newValue:e,oldValue:r})},v=function(e,r){if(!O(e,r)){var t=Ot(o.schema,o.modelValue,o.schema);O(m.value,t)||(m.value=t)}};r.watch(m,(function(e,r){f(e,r)}),{deep:!0}),r.watch((function(){return o.schema}),(function(e,r){v(e,r)})),r.watch((function(){return o.modelValue}),(function(e,r){v(e,r)})),f(m.value,o.modelValue);return function(){var t,n=o.formProps,l=n.layoutColumn,d=void 0===l?1:l,f=n.inlineFooter,v=n.inline,g=s(n,["layoutColumn","inlineFooter","inline"]),y={schema:o.schema,uiSchema:o.uiSchema,errorSchema:o.errorSchema,customFormats:o.customFormats,customRule:o.customRule,rootSchema:o.schema,rootFormData:m.value,curNodePath:"",globalOptions:e,formProps:i({labelSuffix:":",labelPosition:"top"},g)};return r.h(P(e.COMPONENT_MAP.form),i({class:(t={genFromComponent:!0,formInlineFooter:f,formInline:v},a(t,"genFromComponent_".concat(o.schema.id,"Form"),!!o.schema.id),a(t,"layoutColumn",!v),a(t,"layoutColumn-".concat(d),!v),t),setFormRef:function(e){h=e,c("form-mounted",e)},model:m},y.formProps),{default:function(){return[r.h(da,y),u.default?u.default({formData:m,formRefFn:function(){return h}}):p.value.show?r.h(kt,{globalOptions:e,okBtn:p.value.okBtn,cancelBtn:p.value.cancelBtn,formItemAttrs:p.value.formItemAttrs,onCancel:function(){c("cancel")},onSubmit:function(){(h.$$validate||h.validate)((function(e,r){return e?c("submit",m):c("validation-failed",r)}))}}):[]]}})}},install:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.component(r.name||t.name,t)}};return t}(Sa);e.SchemaField=da,e.default=xa,e.fieldProps=Rt,e.formUtils=pt,e.getDefaultFormState=Ot,e.globalOptions=Sa,e.i18n=qr,e.modelValueComponent=ma,e.schemaValidate=St,e.vueUtils=w,Object.defineProperty(e,"__esModule",{value:!0})})); +!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var a=r.length-1,o=1;o<a;++o)r[o]=r[o].slice(1,-1);return r[a]=r[a].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function a(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function n(e){var a=r("[0-9]","[A-Fa-f]"),o=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),n="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",i=r("[\\:\\/\\?\\#\\[\\]\\@]",n),s=e?"[\\uE000-\\uF8FF]":"[]",l=r("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t("[A-Za-z]"+r("[A-Za-z]","[0-9]","[\\+\\-\\.]")+"*"),t(t(o+"|"+r(l,n,"[\\:]"))+"*");var u=t(t("25[0-5]")+"|"+t("2[0-4][0-9]")+"|"+t("1[0-9][0-9]")+"|"+t("0?[1-9][0-9]")+"|0?0?[0-9]"),c=t(u+"\\."+u+"\\."+u+"\\."+u),d=t(a+"{1,4}"),m=t(t(d+"\\:"+d)+"|"+c),p=t(t(d+"\\:")+"{6}"+m),h=t("\\:\\:"+t(d+"\\:")+"{5}"+m),f=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+m),v=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+m),g=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+m),y=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+m),b=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+m),P=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),w=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),E=t([p,h,f,v,g,y,b,P,w].join("|")),S=t(t(l+"|"+o)+"+");t("[vV]"+a+"+\\."+r(l,n,"[\\:]")+"+"),t(t(o+"|"+r(l,n))+"*");var x=t(o+"|"+r(l,n,"[\\:\\@]"));return t(t(o+"|"+r(l,n,"[\\@]"))+"+"),t(t(x+"|"+r("[\\/\\?]",s))+"*"),{NOT_SCHEME:new RegExp(r("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,n),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,n),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,n),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,n),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,n,"[\\:\\@\\/\\?]",s),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,n,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,n),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,i),"g"),PCT_ENCODED:new RegExp(o,"g"),IPV4ADDRESS:new RegExp("^("+c+")$"),IPV6ADDRESS:new RegExp("^\\[?("+E+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+S+")")+"?\\]?$")}}var i=n(!1),s=n(!0),l=function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,r){var t=[],a=!0,o=!1,n=void 0;try{for(var i,s=e[Symbol.iterator]();!(a=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);a=!0);}catch(e){o=!0,n=e}finally{try{!a&&s.return&&s.return()}finally{if(o)throw n}}return t}(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")},u=2147483647,c=/^xn--/,d=/[^\0-\x7E]/,m=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,f=String.fromCharCode;function v(e){throw new RangeError(p[e])}function g(e,r){var t=e.split("@"),a="";t.length>1&&(a=t[0]+"@",e=t[1]);var o=function(e,r){for(var t=[],a=e.length;a--;)t[a]=r(e[a]);return t}((e=e.replace(m,".")).split("."),r).join(".");return a+o}function y(e){for(var r=[],t=0,a=e.length;t<a;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<a){var 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}var b=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},P=function(e,r,t){var a=0;for(e=t?h(e/700):e>>1,e+=h(e/r);e>455;a+=36)e=h(e/35);return h(a+36*e/(e+38))},w=function(e){var r,t=[],a=e.length,o=0,n=128,i=72,s=e.lastIndexOf("-");s<0&&(s=0);for(var l=0;l<s;++l)e.charCodeAt(l)>=128&&v("not-basic"),t.push(e.charCodeAt(l));for(var c=s>0?s+1:0;c<a;){for(var d=o,m=1,p=36;;p+=36){c>=a&&v("invalid-input");var f=(r=e.charCodeAt(c++))-48<10?r-22:r-65<26?r-65:r-97<26?r-97:36;(f>=36||f>h((u-o)/m))&&v("overflow"),o+=f*m;var g=p<=i?1:p>=i+26?26:p-i;if(f<g)break;var y=36-g;m>h(u/y)&&v("overflow"),m*=y}var b=t.length+1;i=P(o-d,b,0==d),h(o/b)>u-n&&v("overflow"),n+=h(o/b),o%=b,t.splice(o++,0,n)}return String.fromCodePoint.apply(String,t)},E=function(e){var r=[],t=(e=y(e)).length,a=128,o=0,n=72,i=!0,s=!1,l=void 0;try{for(var c,d=e[Symbol.iterator]();!(i=(c=d.next()).done);i=!0){var m=c.value;m<128&&r.push(f(m))}}catch(e){s=!0,l=e}finally{try{!i&&d.return&&d.return()}finally{if(s)throw l}}var p=r.length,g=p;for(p&&r.push("-");g<t;){var w=u,E=!0,S=!1,x=void 0;try{for(var F,O=e[Symbol.iterator]();!(E=(F=O.next()).done);E=!0){var _=F.value;_>=a&&_<w&&(w=_)}}catch(e){S=!0,x=e}finally{try{!E&&O.return&&O.return()}finally{if(S)throw x}}var D=g+1;w-a>h((u-o)/D)&&v("overflow"),o+=(w-a)*D,a=w;var k=!0,j=!1,I=void 0;try{for(var A,C=e[Symbol.iterator]();!(k=(A=C.next()).done);k=!0){var R=A.value;if(R<a&&++o>u&&v("overflow"),R==a){for(var $=o,N=36;;N+=36){var L=N<=n?1:N>=n+26?26:N-n;if($<L)break;var T=$-L,z=36-L;r.push(f(b(L+T%z,0))),$=h(T/z)}r.push(f(b($,0))),n=P(o,D,g==p),o=0,++g}}}catch(e){j=!0,I=e}finally{try{!k&&C.return&&C.return()}finally{if(j)throw I}}++o,++a}return r.join("")},S=function(e){return g(e,(function(e){return d.test(e)?"xn--"+E(e):e}))},x=function(e){return g(e,(function(e){return c.test(e)?w(e.slice(4).toLowerCase()):e}))},F={};function O(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function _(e){for(var r="",t=0,a=e.length;t<a;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(a-t>=6){var n=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&n)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(a-t>=9){var i=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function D(e,r){function t(e){var t=_(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,O).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,O).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,O).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,O).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,O).replace(r.PCT_ENCODED,o)),e}function k(e){return e.replace(/^0*(.*)/,"$1")||"0"}function j(e,r){var t=e.match(r.IPV4ADDRESS)||[],a=l(t,2)[1];return a?a.split(".").map(k).join("."):e}function I(e,r){var t=e.match(r.IPV6ADDRESS)||[],a=l(t,3),o=a[1],n=a[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),u=s[0],c=s[1],d=c?c.split(":").map(k):[],m=u.split(":").map(k),p=r.IPV4ADDRESS.test(m[m.length-1]),h=p?7:8,f=m.length-h,v=Array(h),g=0;g<h;++g)v[g]=d[g]||m[f+g]||"";p&&(v[h-1]=j(v[h-1],r));var y=v.reduce((function(e,r,t){if(!r||"0"===r){var a=e[e.length-1];a&&a.index+a.length===t?a.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(y&&y.length>1){var P=v.slice(0,y.index),w=v.slice(y.index+y.length);b=P.join(":")+"::"+w.join(":")}else b=v.join(":");return n&&(b+="%"+n),b}return e}var A=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,C=void 0==="".match(/(){0}/)[1];function R(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},a=!1!==r.iri?s:i;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(A);if(o){C?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=I(j(t.host,a),a)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var n=F[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||n&&n.unicodeSupport)D(t,a);else{if(t.host&&(r.domainHost||n&&n.domainHost))try{t.host=S(t.host.replace(a.PCT_ENCODED,_).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}D(t,i)}n&&n.parse&&n.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function $(e,r){var t=!1!==r.iri?s:i,a=[];return void 0!==e.userinfo&&(a.push(e.userinfo),a.push("@")),void 0!==e.host&&a.push(I(j(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(a.push(":"),a.push(String(e.port))),a.length?a.join(""):void 0}var N=/^\.\.?\//,L=/^\/\.(\/|$)/,T=/^\/\.\.(\/|$)/,z=/^\/?(?:.|\n)*?(?=\/|$)/;function V(e){for(var r=[];e.length;)if(e.match(N))e=e.replace(N,"");else if(e.match(L))e=e.replace(L,"/");else if(e.match(T))e=e.replace(T,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(z);if(!t)throw new Error("Unexpected dot segment condition");var a=t[0];e=e.slice(a.length),r.push(a)}return r.join("")}function q(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?s:i,a=[],o=F[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?x(e.host):S(e.host.replace(t.PCT_ENCODED,_).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}D(e,t),"suffix"!==r.reference&&e.scheme&&(a.push(e.scheme),a.push(":"));var n=$(e,r);if(void 0!==n&&("suffix"!==r.reference&&a.push("//"),a.push(n),e.path&&"/"!==e.path.charAt(0)&&a.push("/")),void 0!==e.path){var l=e.path;r.absolutePath||o&&o.absolutePath||(l=V(l)),void 0===n&&(l=l.replace(/^\/\//,"/%2F")),a.push(l)}return void 0!==e.query&&(a.push("?"),a.push(e.query)),void 0!==e.fragment&&(a.push("#"),a.push(e.fragment)),a.join("")}function M(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],o={};return a||(e=R(q(e,t),t),r=R(q(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=V(r.path||""),o.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=V(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=V(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=V(o.path)),o.query=r.query):(o.path=e.path,void 0!==r.query?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function W(e,r){return e&&e.toString().replace(r&&r.iri?s.PCT_ENCODED:i.PCT_ENCODED,_)}var B={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},U={scheme:"https",domainHost:B.domainHost,parse:B.parse,serialize:B.serialize};function Q(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var H={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=Q(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(Q(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),a=l(t,2),o=a[0],n=a[1];e.path=o&&"/"!==o?o:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}},K={scheme:"wss",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize},G={},J="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Z="[0-9A-Fa-f]",Y=t(t("%[EFef]"+Z+"%"+Z+Z+"%"+Z+Z)+"|"+t("%[89A-Fa-f]"+Z+"%"+Z+Z)+"|"+t("%"+Z+Z)),X=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),ee=new RegExp(J,"g"),re=new RegExp(Y,"g"),te=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',X),"g"),ae=new RegExp(r("[^]",J,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),oe=ae;function ne(e){var r=_(e);return r.match(ee)?r:e}var ie={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,n={},i=t.query.split("&"),s=0,l=i.length;s<l;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var c=u[1].split(","),d=0,m=c.length;d<m;++d)a.push(c[d]);break;case"subject":t.subject=W(u[1],r);break;case"body":t.body=W(u[1],r);break;default:o=!0,n[W(u[0],r)]=W(u[1],r)}}o&&(t.headers=n)}t.query=void 0;for(var p=0,h=a.length;p<h;++p){var f=a[p].split("@");if(f[0]=W(f[0]),r.unicodeSupport)f[1]=W(f[1],r).toLowerCase();else try{f[1]=S(W(f[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}a[p]=f.join("@")}return t},serialize:function(e,r){var t,a=e,n=null!=(t=e.to)?t instanceof Array?t:"number"!=typeof t.length||t.split||t.setInterval||t.call?[t]:Array.prototype.slice.call(t):[];if(n){for(var i=0,s=n.length;i<s;++i){var l=String(n[i]),u=l.lastIndexOf("@"),c=l.slice(0,u).replace(re,ne).replace(re,o).replace(te,O),d=l.slice(u+1);try{d=r.iri?x(d):S(W(d,r).toLowerCase())}catch(e){a.error=a.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=c+"@"+d}a.path=n.join(",")}var m=e.headers=e.headers||{};e.subject&&(m.subject=e.subject),e.body&&(m.body=e.body);var p=[];for(var h in m)m[h]!==G[h]&&p.push(h.replace(re,ne).replace(re,o).replace(ae,O)+"="+m[h].replace(re,ne).replace(re,o).replace(oe,O));return p.length&&(a.query=p.join("&")),a}},se=/^([^\:]+)\:(.*)/,le={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(se),a=e;if(t){var o=r.scheme||a.scheme||"urn",n=t[1].toLowerCase(),i=t[2],s=o+":"+(r.nid||n),l=F[s];a.nid=n,a.nss=i,a.path=void 0,l&&(a=l.parse(a,r))}else a.error=a.error||"URN can not be parsed.";return a},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",a=e.nid,o=t+":"+(r.nid||a),n=F[o];n&&(e=n.serialize(e,r));var i=e,s=e.nss;return i.path=(a||r.nid)+":"+s,i}},ue=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ce={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match(ue)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};F[B.scheme]=B,F[U.scheme]=U,F[H.scheme]=H,F[K.scheme]=K,F[ie.scheme]=ie,F[le.scheme]=le,F[ce.scheme]=ce,e.SCHEMES=F,e.pctEncChar=O,e.pctDecChars=_,e.parse=R,e.removeDotSegments=V,e.serialize=q,e.resolveComponents=M,e.resolve=function(e,r,t){var a=function(e,r){var t=e;if(r)for(var a in r)t[a]=r[a];return t}({scheme:"null"},t);return q(M(R(e,a),R(r,a),a,!0),a)},e.normalize=function(e,r){return"string"==typeof e?e=q(R(e,r),r):"object"===a(e)&&(e=R(q(e,r),r)),e},e.equal=function(e,r,t){return"string"==typeof e?e=q(R(e,t),t):"object"===a(e)&&(e=q(e,t)),"string"==typeof r?r=q(R(r,t),t):"object"===a(r)&&(r=q(r,t)),e===r},e.escapeComponent=function(e,r){return e&&e.toString().replace(r&&r.iri?s.ESCAPE:i.ESCAPE,O)},e.unescapeComponent=W,Object.defineProperty(e,"__esModule",{value:!0})}(r)}));(L=T)&&L.__esModule&&Object.prototype.hasOwnProperty.call(L,"default")&&L.default;var z=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 a,o,n;if(Array.isArray(r)){if((a=r.length)!=t.length)return!1;for(o=a;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((a=(n=Object.keys(r)).length)!==Object.keys(t).length)return!1;for(o=a;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,n[o]))return!1;for(o=a;0!=o--;){var i=n[o];if(!e(r[i],t[i]))return!1}return!0}return r!=r&&t!=t},V={copy:function(e,r){for(var t in r=r||{},e)r[t]=e[t];return r},checkDataType:q,checkDataTypes:function(e,r,t){switch(e.length){case 1:return q(e[0],r,t,!0);default:var a="",o=W(e);for(var n in o.array&&o.object&&(a=o.null?"(":"(!"+r+" || ",a+="typeof "+r+' !== "object")',delete o.null,delete o.array,delete o.object),o.number&&delete o.integer,o)a+=(a?" && ":"")+q(n,r,t,!0);return a}},coerceToTypes:function(e,r){if(Array.isArray(r)){for(var t=[],a=0;a<r.length;a++){var o=r[a];(M[o]||"array"===e&&"array"===o)&&(t[t.length]=o)}if(t.length)return t}else{if(M[r])return[r];if("array"===e&&"array"===r)return["array"]}},toHash:W,getProperty:Q,escapeQuotes:H,equal:z,ucs2length:function(e){for(var r,t=0,a=e.length,o=0;o<a;)t++,(r=e.charCodeAt(o++))>=55296&&r<=56319&&o<a&&56320==(64512&(r=e.charCodeAt(o)))&&o++;return t},varOccurences:function(e,r){r+="[^0-9]";var t=e.match(new RegExp(r,"g"));return t?t.length:0},varReplace:function(e,r,t){return r+="([^0-9])",t=t.replace(/\$/g,"$$$$"),e.replace(new RegExp(r,"g"),t+"$1")},schemaHasRules:function(e,r){if("boolean"==typeof e)return!e;for(var t in e)if(r[t])return!0},schemaHasRulesExcept:function(e,r,t){if("boolean"==typeof e)return!e&&"not"!=t;for(var a in e)if(a!=t&&r[a])return!0},schemaUnknownRules:function(e,r){if("boolean"==typeof e)return;for(var t in e)if(!r[t])return t},toQuotedString:K,getPathExpr:function(e,r,t,a){return Z(e,t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'")},getPath:function(e,r,t){var a=K(t?"/"+Y(r):Q(r));return Z(e,a)},getData:function(e,r,t){var a,o,n,i;if(""===e)return"rootData";if("/"==e[0]){if(!G.test(e))throw new Error("Invalid JSON-pointer: "+e);o=e,n="rootData"}else{if(!(i=e.match(J)))throw new Error("Invalid JSON-pointer: "+e);if(a=+i[1],"#"==(o=i[2])){if(a>=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(n="data"+(r-a||""),!o)return n}for(var s=n,l=o.split("/"),u=0;u<l.length;u++){var c=l[u];c&&(n+=Q(X(c)),s+=" && "+n)}return s},unescapeFragment:function(e){return X(decodeURIComponent(e))},unescapeJsonPointer:X,escapeFragment:function(e){return encodeURIComponent(Y(e))},escapeJsonPointer:Y};function q(e,r,t,a){var o=a?" !== ":" === ",n=a?" || ":" && ",i=a?"!":"",s=a?"":"!";switch(e){case"null":return r+o+"null";case"array":return i+"Array.isArray("+r+")";case"object":return"("+i+r+n+"typeof "+r+o+'"object"'+n+s+"Array.isArray("+r+"))";case"integer":return"(typeof "+r+o+'"number"'+n+s+"("+r+" % 1)"+n+r+o+r+(t?n+i+"isFinite("+r+")":"")+")";case"number":return"(typeof "+r+o+'"'+e+'"'+(t?n+i+"isFinite("+r+")":"")+")";default:return"typeof "+r+o+'"'+e+'"'}}var M=W(["string","number","integer","boolean","null"]);function W(e){for(var r={},t=0;t<e.length;t++)r[e[t]]=!0;return r}var B=/^[a-z$_][a-z$_0-9]*$/i,U=/'|\\/g;function Q(e){return"number"==typeof e?"["+e+"]":B.test(e)?"."+e:"['"+H(e)+"']"}function H(e){return e.replace(U,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function K(e){return"'"+H(e)+"'"}var G=/^\/(?:[^~]|~0|~1)*$/,J=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Z(e,r){return'""'==e?r:(e+" + "+r).replace(/([^\\])' \+ '/g,"$1")}function Y(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function X(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}var ee=function(e){V.copy(e,this)};var re=$((function(e){var r=e.exports=function(e,t,a){"function"==typeof t&&(a=t,t={}),function e(t,a,o,n,i,s,l,u,c,d){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var m in a(n,i,s,l,u,c,d),n){var p=n[m];if(Array.isArray(p)){if(m in r.arrayKeywords)for(var h=0;h<p.length;h++)e(t,a,o,p[h],i+"/"+m+"/"+h,s,i,m,n,h)}else if(m in r.propsKeywords){if(p&&"object"==typeof p)for(var f in p)e(t,a,o,p[f],i+"/"+m+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),s,i,m,n,f)}else(m in r.keywords||t.allKeys&&!(m in r.skipKeywords))&&e(t,a,o,p,i+"/"+m,s,i,m,n)}o(n,i,s,l,u,c,d)}}(t,"function"==typeof(a=t.cb||a)?a:a.pre||function(){},a.post||function(){},e,"",e)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}})),te=ae;function ae(e,r,t){var a=this._refs[t];if("string"==typeof a){if(!this._refs[a])return ae.call(this,e,r,a);a=this._refs[a]}if((a=a||this._schemas[t])instanceof ee)return ue(a.schema,this._opts.inlineRefs)?a.schema:a.validate||this._compile(a);var o,n,i,s=oe.call(this,r,t);return s&&(o=s.schema,r=s.root,i=s.baseId),o instanceof ee?n=o.validate||e.call(this,o.schema,r,void 0,i):void 0!==o&&(n=ue(o,this._opts.inlineRefs)?o:e.call(this,o,r,void 0,i)),n}function oe(e,r){var t=T.parse(r),a=de(t),o=ce(this._getId(e.schema));if(0===Object.keys(e.schema).length||a!==o){var n=pe(a),i=this._refs[n];if("string"==typeof i)return ne.call(this,e,i,t);if(i instanceof ee)i.validate||this._compile(i),e=i;else{if(!((i=this._schemas[n])instanceof ee))return;if(i.validate||this._compile(i),n==pe(r))return{schema:i,root:e,baseId:o};e=i}if(!e.schema)return;o=ce(this._getId(e.schema))}return se.call(this,t,o,e.schema,e)}function ne(e,r,t){var a=oe.call(this,e,r);if(a){var o=a.schema,n=a.baseId;e=a.root;var i=this._getId(o);return i&&(n=he(n,i)),se.call(this,t,n,o,e)}}ae.normalizeId=pe,ae.fullPath=ce,ae.url=he,ae.ids=function(e){var r=pe(this._getId(e)),t={"":r},a={"":ce(r,!1)},o={},n=this;return re(e,{allKeys:!0},(function(e,r,i,s,l,u,c){if(""!==r){var d=n._getId(e),m=t[s],p=a[s]+"/"+l;if(void 0!==c&&(p+="/"+("number"==typeof c?c:V.escapeFragment(c))),"string"==typeof d){d=m=pe(m?T.resolve(m,d):d);var h=n._refs[d];if("string"==typeof h&&(h=n._refs[h]),h&&h.schema){if(!z(e,h.schema))throw new Error('id "'+d+'" resolves to more than one schema')}else if(d!=pe(p))if("#"==d[0]){if(o[d]&&!z(e,o[d]))throw new Error('id "'+d+'" resolves to more than one schema');o[d]=e}else n._refs[d]=p}t[r]=m,a[r]=p}})),o},ae.inlineRef=ue,ae.schema=oe;var ie=V.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function se(e,r,t,a){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var o=e.fragment.split("/"),n=1;n<o.length;n++){var i=o[n];if(i){if(void 0===(t=t[i=V.unescapeFragment(i)]))break;var s;if(!ie[i]&&((s=this._getId(t))&&(r=he(r,s)),t.$ref)){var l=he(r,t.$ref),u=oe.call(this,a,l);u&&(t=u.schema,a=u.root,r=u.baseId)}}}return void 0!==t&&t!==a.schema?{schema:t,root:a,baseId:r}:void 0}}var le=V.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function ue(e,r){return!1!==r&&(void 0===r||!0===r?function e(r){var t;if(Array.isArray(r)){for(var a=0;a<r.length;a++)if("object"==typeof(t=r[a])&&!e(t))return!1}else for(var o in r){if("$ref"==o)return!1;if("object"==typeof(t=r[o])&&!e(t))return!1}return!0}(e):r?function e(r){var t,a=0;if(Array.isArray(r)){for(var o=0;o<r.length;o++)if("object"==typeof(t=r[o])&&(a+=e(t)),a==1/0)return 1/0}else for(var n in r){if("$ref"==n)return 1/0;if(le[n])a++;else if("object"==typeof(t=r[n])&&(a+=e(t)+1),a==1/0)return 1/0}return a}(e)<=r:void 0)}function ce(e,r){return!1!==r&&(e=pe(e)),de(T.parse(e))}function de(e){return T.serialize(e).split("#")[0]+"#"}var me=/#\/?$/;function pe(e){return e?e.replace(me,""):""}function he(e,r){return r=pe(r),T.resolve(e,r)}var fe={Validation:ge((function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:ge(ve)};function ve(e,r,t){this.message=t||ve.message(e,r),this.missingRef=te.url(e,r),this.missingSchema=te.normalizeId(te.fullPath(this.missingRef))}function ge(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}ve.message=function(e,r){return"can't resolve reference "+r+" from id "+e};var ye=function(e,r){r||(r={}),"function"==typeof r&&(r={cmp:r});var t,a="boolean"==typeof r.cycles&&r.cycles,o=r.cmp&&(t=r.cmp,function(e){return function(r,a){var o={key:r,value:e[r]},n={key:a,value:e[a]};return t(o,n)}}),n=[];return function e(r){if(r&&r.toJSON&&"function"==typeof r.toJSON&&(r=r.toJSON()),void 0!==r){if("number"==typeof r)return isFinite(r)?""+r:"null";if("object"!=typeof r)return JSON.stringify(r);var t,i;if(Array.isArray(r)){for(i="[",t=0;t<r.length;t++)t&&(i+=","),i+=e(r[t])||"null";return i+"]"}if(null===r)return"null";if(-1!==n.indexOf(r)){if(a)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=n.push(r)-1,l=Object.keys(r).sort(o&&o(r));for(i="",t=0;t<l.length;t++){var u=l[t],c=e(r[u]);c&&(i&&(i+=","),i+=JSON.stringify(u)+":"+c)}return n.splice(s,1),"{"+i+"}"}}(e)},be=function(e,r,t){var a="",o=!0===e.schema.$async,n=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),i=e.self._getId(e.schema);if(e.opts.strictKeywords){var s=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(s){var l="unknown keyword: "+s;if("log"!==e.opts.strictKeywords)throw new Error(l);e.logger.warn(l)}}if(e.isTop&&(a+=" var validate = ",o&&(e.async=!0,a+="async "),a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",i&&(e.opts.sourceCode||e.opts.processCode)&&(a+=" /*# sourceURL="+i+" */ ")),"boolean"==typeof e.schema||!n&&!e.schema.$ref){var u=e.level,c=e.dataLevel,d=e.schema["false schema"],m=e.schemaPath+e.util.getProperty("false schema"),p=e.errSchemaPath+"/false schema",h=!e.opts.allErrors,f="data"+(c||""),v="valid"+u;if(!1===e.schema){e.isTop?h=!0:a+=" var "+v+" = false; ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'boolean schema is false' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";var g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?a+=o?" return data; ":" validate.errors = null; return true; ":a+=" var "+v+" = true; ";return e.isTop&&(a+=" }; return validate; "),a}if(e.isTop){var y=e.isTop;u=e.level=0,c=e.dataLevel=0,f="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var b="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}a+=" var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data; "}else{u=e.level,f="data"+((c=e.dataLevel)||"");if(i&&(e.baseId=e.resolve.url(e.baseId,i)),o&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+u+" = errors;"}v="valid"+u,h=!e.opts.allErrors;var P="",w="",E=e.schema.type,S=Array.isArray(E);if(E&&e.opts.nullable&&!0===e.schema.nullable&&(S?-1==E.indexOf("null")&&(E=E.concat("null")):"null"!=E&&(E=[E,"null"],S=!0)),S&&1==E.length&&(E=E[0],S=!1),e.schema.$ref&&n){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(n=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(a+=" "+e.RULES.all.$comment.code(e,"$comment")),E){if(e.opts.coerceTypes)var x=e.util.coerceToTypes(e.opts.coerceTypes,E);var F=e.RULES.types[E];if(x||S||!0===F||F&&!Z(F)){m=e.schemaPath+".type",p=e.errSchemaPath+"/type",m=e.schemaPath+".type",p=e.errSchemaPath+"/type";var O=S?"checkDataTypes":"checkDataType";if(a+=" if ("+e.util[O](E,f,e.opts.strictNumbers,!0)+") { ",x){var _="dataType"+u,D="coerced"+u;a+=" var "+_+" = typeof "+f+"; var "+D+" = undefined; ","array"==e.opts.coerceTypes&&(a+=" if ("+_+" == 'object' && Array.isArray("+f+") && "+f+".length == 1) { "+f+" = "+f+"[0]; "+_+" = typeof "+f+"; if ("+e.util.checkDataType(e.schema.type,f,e.opts.strictNumbers)+") "+D+" = "+f+"; } "),a+=" if ("+D+" !== undefined) ; ";var k=x;if(k)for(var j,I=-1,A=k.length-1;I<A;)"string"==(j=k[I+=1])?a+=" else if ("+_+" == 'number' || "+_+" == 'boolean') "+D+" = '' + "+f+"; else if ("+f+" === null) "+D+" = ''; ":"number"==j||"integer"==j?(a+=" else if ("+_+" == 'boolean' || "+f+" === null || ("+_+" == 'string' && "+f+" && "+f+" == +"+f+" ","integer"==j&&(a+=" && !("+f+" % 1)"),a+=")) "+D+" = +"+f+"; "):"boolean"==j?a+=" else if ("+f+" === 'false' || "+f+" === 0 || "+f+" === null) "+D+" = false; else if ("+f+" === 'true' || "+f+" === 1) "+D+" = true; ":"null"==j?a+=" else if ("+f+" === '' || "+f+" === 0 || "+f+" === false) "+D+" = null; ":"array"==e.opts.coerceTypes&&"array"==j&&(a+=" else if ("+_+" == 'string' || "+_+" == 'number' || "+_+" == 'boolean' || "+f+" == null) "+D+" = ["+f+"]; ");a+=" else { ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } if ("+D+" !== undefined) { ";var C=c?"data"+(c-1||""):"parentData";a+=" "+f+" = "+D+"; ",c||(a+="if ("+C+" !== undefined)"),a+=" "+C+"["+(c?e.dataPathArr[c]:"parentDataProperty")+"] = "+D+"; } "}else{(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } "}}if(e.schema.$ref&&!n)a+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",h&&(a+=" } if (errors === ",a+=y?"0":"errs_"+u,a+=") { ",w+="}");else{var R=e.RULES;if(R)for(var $=-1,N=R.length-1;$<N;)if(Z(F=R[$+=1])){if(F.type&&(a+=" if ("+e.util.checkDataType(F.type,f,e.opts.strictNumbers)+") { "),e.opts.useDefaults)if("object"==F.type&&e.schema.properties){d=e.schema.properties;var L=Object.keys(d);if(L)for(var T,z=-1,V=L.length-1;z<V;){if(void 0!==(W=d[T=L[z+=1]]).default){var q=f+e.util.getProperty(T);if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+q;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+q+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+q+" === null || "+q+" === '' "),a+=" ) "+q+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(W.default)+" ":a+=" "+JSON.stringify(W.default)+" ",a+="; "}}}else if("array"==F.type&&Array.isArray(e.schema.items)){var M=e.schema.items;if(M){I=-1;for(var W,B=M.length-1;I<B;)if(void 0!==(W=M[I+=1]).default){q=f+"["+I+"]";if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+q;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+q+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+q+" === null || "+q+" === '' "),a+=" ) "+q+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(W.default)+" ":a+=" "+JSON.stringify(W.default)+" ",a+="; "}}}var U=F.rules;if(U)for(var Q,H=-1,K=U.length-1;H<K;)if(Y(Q=U[H+=1])){var G=Q.code(e,Q.keyword,F.type);G&&(a+=" "+G+" ",h&&(P+="}"))}if(h&&(a+=" "+P+" ",P=""),F.type&&(a+=" } ",E&&E===F.type&&!x)){a+=" else { ";var J;m=e.schemaPath+".type",p=e.errSchemaPath+"/type";(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}h&&(a+=" if (errors === ",a+=y?"0":"errs_"+u,a+=") { ",w+="}")}}function Z(e){for(var r=e.rules,t=0;t<r.length;t++)if(Y(r[t]))return!0}function Y(r){return void 0!==e.schema[r.keyword]||r.implements&&function(r){for(var t=r.implements,a=0;a<t.length;a++)if(void 0!==e.schema[t[a]])return!0}(r)}return h&&(a+=" "+w+" "),y?(o?(a+=" if (errors === 0) return data; ",a+=" else throw new ValidationError(vErrors); "):(a+=" validate.errors = vErrors; ",a+=" return errors === 0; "),a+=" }; return validate;"):a+=" var "+v+" = errors === errs_"+u+";",a},Pe=V.ucs2length,we=fe.Validation,Ee=function e(r,t,a,o){var n=this,i=this._opts,s=[void 0],l={},u=[],c={},d=[],m={},p=[];t=t||{schema:r,refVal:s,refs:l};var h=Se.call(this,r,t,o),f=this._compilations[h.index];if(h.compiling)return f.callValidate=function e(){var r=f.validate,t=r.apply(this,arguments);return e.errors=r.errors,t};var v=this._formats,g=this.RULES;try{var y=P(r,t,a,o);f.validate=y;var b=f.callValidate;return b&&(b.schema=y.schema,b.errors=null,b.refs=y.refs,b.refVal=y.refVal,b.root=y.root,b.$async=y.$async,i.sourceCode&&(b.source=y.source)),y}finally{xe.call(this,r,t,o)}function P(r,a,o,c){var m=!a||a&&a.schema==r;if(a.schema!=t.schema)return e.call(n,r,a,o,c);var h,f=!0===r.$async,y=be({isTop:!0,schema:r,isRoot:m,baseId:c,root:a,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:fe.MissingRef,RULES:g,validate:be,util:V,resolve:te,resolveRef:w,usePattern:x,useDefault:F,useCustomRule:O,opts:i,formats:v,logger:n.logger,self:n});y=je(s,De)+je(u,Oe)+je(d,_e)+je(p,ke)+y,i.processCode&&(y=i.processCode(y,r));try{h=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",y)(n,g,v,t,s,d,p,z,Pe,we),s[0]=h}catch(e){throw n.logger.error("Error compiling schema, function code:",y),e}return h.schema=r,h.errors=null,h.refs=l,h.refVal=s,h.root=m?h:a,f&&(h.$async=!0),!0===i.sourceCode&&(h.source={code:y,patterns:u,defaults:d}),h}function w(r,o,u){o=te.url(r,o);var c,d,m=l[o];if(void 0!==m)return S(c=s[m],d="refVal["+m+"]");if(!u&&t.refs){var p=t.refs[o];if(void 0!==p)return S(c=t.refVal[p],d=E(o,c))}d=E(o);var h=te.call(n,P,t,o);if(void 0===h){var f=a&&a[o];f&&(h=te.inlineRef(f,i.inlineRefs)?f:e.call(n,f,t,a,r))}if(void 0!==h)return function(e,r){var t=l[e];s[t]=r}(o,h),S(h,d);!function(e){delete l[e]}(o)}function E(e,r){var t=s.length;return s[t]=r,l[e]=t,"refVal"+t}function S(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}function x(e){var r=c[e];return void 0===r&&(r=c[e]=u.length,u[r]=e),"pattern"+r}function F(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return V.toQuotedString(e);case"object":if(null===e)return"null";var r=ye(e),t=m[r];return void 0===t&&(t=m[r]=d.length,d[t]=e),"default"+t}}function O(e,r,t,a){if(!1!==n._opts.validateSchema){var o=e.definition.dependencies;if(o&&!o.every((function(e){return Object.prototype.hasOwnProperty.call(t,e)})))throw new Error("parent schema must have all required keywords: "+o.join(","));var s=e.definition.validateSchema;if(s)if(!s(r)){var l="keyword schema is invalid: "+n.errorsText(s.errors);if("log"!=n._opts.validateSchema)throw new Error(l);n.logger.error(l)}}var u,c=e.definition.compile,d=e.definition.inline,m=e.definition.macro;if(c)u=c.call(n,r,t,a);else if(m)u=m.call(n,r,t,a),!1!==i.validateSchema&&n.validateSchema(u,!0);else if(d)u=d.call(n,a,e.keyword,r,t);else if(!(u=e.definition.validate))return;if(void 0===u)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var h=p.length;return p[h]=u,{code:"customRule"+h,validate:u}}};function Se(e,r,t){var a=Fe.call(this,e,r,t);return a>=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}function xe(e,r,t){var a=Fe.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}function Fe(e,r,t){for(var a=0;a<this._compilations.length;a++){var o=this._compilations[a];if(o.schema==e&&o.root==r&&o.baseId==t)return a}return-1}function Oe(e,r){return"var pattern"+e+" = new RegExp("+V.toQuotedString(r[e])+");"}function _e(e){return"var default"+e+" = defaults["+e+"];"}function De(e,r){return void 0===r[e]?"":"var refVal"+e+" = refVal["+e+"];"}function ke(e){return"var customRule"+e+" = customRules["+e+"];"}function je(e,r){if(!e.length)return"";for(var t="",a=0;a<e.length;a++)t+=r(a,e);return t}var Ie=$((function(e){var r=e.exports=function(){this._cache={}};r.prototype.put=function(e,r){this._cache[e]=r},r.prototype.get=function(e){return this._cache[e]},r.prototype.del=function(e){delete this._cache[e]},r.prototype.clear=function(){this._cache={}}})),Ae=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Ce=[0,31,28,31,30,31,30,31,31,30,31,30,31],Re=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,$e=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,Ne=/^(?:[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,Le=/^(?:(?:[^\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,Te=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,ze=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Ve=/^(?:\/(?:[^~/]|~0|~1)*)*$/,qe=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Me=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,We=Be;function Be(e){return e="full"==e?"full":"fast",V.copy(Be[e])}function Ue(e){var r=e.match(Ae);if(!r)return!1;var t=+r[1],a=+r[2],o=+r[3];return a>=1&&a<=12&&o>=1&&o<=(2==a&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(t)?29:Ce[a])}function Qe(e,r){var t=e.match(Re);if(!t)return!1;var a=t[1],o=t[2],n=t[3],i=t[5];return(a<=23&&o<=59&&n<=59||23==a&&59==o&&60==n)&&(!r||i)}Be.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":Le,url:Te,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:$e,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:Je,uuid:ze,"json-pointer":Ve,"json-pointer-uri-fragment":qe,"relative-json-pointer":Me},Be.full={date:Ue,time:Qe,"date-time":function(e){var r=e.split(He);return 2==r.length&&Ue(r[0])&&Qe(r[1],!0)},uri:function(e){return Ke.test(e)&&Ne.test(e)},"uri-reference":/^(?:[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,"uri-template":Le,url:Te,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:$e,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:Je,uuid:ze,"json-pointer":Ve,"json-pointer-uri-fragment":qe,"relative-json-pointer":Me};var He=/t|\s/i;var Ke=/\/|:/;var Ge=/[^\\]\\Z/;function Je(e){if(Ge.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var Ze=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s;var p="maximum"==r,h=p?"exclusiveMaximum":"exclusiveMinimum",f=e.schema[h],v=e.opts.$data&&f&&f.$data,g=p?"<":">",y=p?">":"<",b=void 0;if(!m&&"number"!=typeof s&&void 0!==s)throw new Error(r+" must be number");if(!v&&void 0!==f&&"number"!=typeof f&&"boolean"!=typeof f)throw new Error(h+" must be number or boolean");if(v){var P=e.util.getData(f.$data,i,e.dataPathArr),w="exclusive"+n,E="exclType"+n,S="exclIsNumber"+n,x="' + "+(_="op"+n)+" + '";o+=" var schemaExcl"+n+" = "+P+"; ",o+=" var "+w+"; var "+E+" = typeof "+(P="schemaExcl"+n)+"; if ("+E+" != 'boolean' && "+E+" != 'undefined' && "+E+" != 'number') { ";var F;b=h;(F=F||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(o+=" , message: '"+h+" should be boolean' "),e.opts.verbose&&(o+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var O=o;o=F.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+E+" == 'number' ? ( ("+w+" = "+a+" === undefined || "+P+" "+g+"= "+a+") ? "+d+" "+y+"= "+P+" : "+d+" "+y+" "+a+" ) : ( ("+w+" = "+P+" === true) ? "+d+" "+y+"= "+a+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { var op"+n+" = "+w+" ? '"+g+"' : '"+g+"='; ",void 0===s&&(b=h,u=e.errSchemaPath+"/"+h,a=P,m=v)}else{x=g;if((S="number"==typeof f)&&m){var _="'"+x+"'";o+=" if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" ( "+a+" === undefined || "+f+" "+g+"= "+a+" ? "+d+" "+y+"= "+f+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { "}else{S&&void 0===s?(w=!0,b=h,u=e.errSchemaPath+"/"+h,a=f,y+="="):(S&&(a=Math[p?"min":"max"](f,s)),f===(!S||a)?(w=!0,b=h,u=e.errSchemaPath+"/"+h,y+="="):(w=!1,x+="="));_="'"+x+"'";o+=" if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+" "+y+" "+a+" || "+d+" !== "+d+") { "}}b=b||r,(F=F||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+_+", limit: "+a+", exclusive: "+w+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be "+x+" ",o+=m?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";O=o;return o=F.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",c&&(o+=" else { "),o},Ye=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+".length "+("maxItems"==r?">":"<")+" "+a+") { ";var p=r,h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxItems"==r?"more":"fewer",o+=" than ",o+=m?"' + "+a+" + '":""+s,o+=" items' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=h.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},Xe=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");var p="maxLength"==r?">":"<";o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),!1===e.opts.unicode?o+=" "+d+".length ":o+=" ucs2length("+d+") ",o+=" "+p+" "+a+") { ";var h=r,f=f||[];f.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(h||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT be ",o+="maxLength"==r?"longer":"shorter",o+=" than ",o+=m?"' + "+a+" + '":""+s,o+=" characters' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var v=o;return o=f.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+v+"]); ":o+=" validate.errors = ["+v+"]; return false; ":o+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},er=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" Object.keys("+d+").length "+("maxProperties"==r?">":"<")+" "+a+") { ";var p=r,h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxProperties"==r?"more":"fewer",o+=" than ",o+=m?"' + "+a+" + '":""+s,o+=" properties' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=h.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},rr={$ref:function(e,r,t){var a,o,n=" ",i=e.level,s=e.dataLevel,l=e.schema[r],u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(s||""),m="valid"+i;if("#"==l||"#/"==l)e.isRoot?(a=e.async,o="validate"):(a=!0===e.root.schema.$async,o="root.refVal[0]");else{var p=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===p){var h=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(h),(y=y||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(n+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(n+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ";var f=n;n=y.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+f+"]); ":n+=" validate.errors = ["+f+"]; return false; ":n+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(n+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,l,h);e.logger.warn(h),c&&(n+=" if (true) { ")}}else if(p.inline){var v=e.util.copy(e);v.level++;var g="valid"+v.level;v.schema=p.schema,v.schemaPath="",v.errSchemaPath=l,n+=" "+e.validate(v).replace(/validate\.schema/g,p.code)+" ",c&&(n+=" if ("+g+") { ")}else a=!0===p.$async||e.async&&!1!==p.$async,o=p.code}if(o){var y;(y=y||[]).push(n),n="",e.opts.passContext?n+=" "+o+".call(this, ":n+=" "+o+"( ",n+=" "+d+", (dataPath || '')",'""'!=e.errorPath&&(n+=" + "+e.errorPath);var b=n+=" , "+(s?"data"+(s-1||""):"parentData")+" , "+(s?e.dataPathArr[s]:"parentDataProperty")+", rootData) ";if(n=y.pop(),a){if(!e.async)throw new Error("async schema referenced by sync schema");c&&(n+=" var "+m+"; "),n+=" try { await "+b+"; ",c&&(n+=" "+m+" = true; "),n+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",c&&(n+=" "+m+" = false; "),n+=" } ",c&&(n+=" if ("+m+") { ")}else n+=" if (!"+b+") { if (vErrors === null) vErrors = "+o+".errors; else vErrors = vErrors.concat("+o+".errors); errors = vErrors.length; } ",c&&(n+=" else { ")}return n},allOf:function(e,r,t){var a=" ",o=e.schema[r],n=e.schemaPath+e.util.getProperty(r),i=e.errSchemaPath+"/"+r,s=!e.opts.allErrors,l=e.util.copy(e),u="";l.level++;var c="valid"+l.level,d=l.baseId,m=!0,p=o;if(p)for(var h,f=-1,v=p.length-1;f<v;)h=p[f+=1],(e.opts.strictKeywords?"object"==typeof h&&Object.keys(h).length>0||!1===h:e.util.schemaHasRules(h,e.RULES.all))&&(m=!1,l.schema=h,l.schemaPath=n+"["+f+"]",l.errSchemaPath=i+"/"+f,a+=" "+e.validate(l)+" ",l.baseId=d,s&&(a+=" if ("+c+") { ",u+="}"));return s&&(a+=m?" if (true) { ":" "+u.slice(0,-1)+" "),a},anyOf:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e),h="";p.level++;var f="valid"+p.level;if(i.every((function(r){return e.opts.strictKeywords?"object"==typeof r&&Object.keys(r).length>0||!1===r:e.util.schemaHasRules(r,e.RULES.all)}))){var v=p.baseId;a+=" var "+m+" = errors; var "+d+" = false; ";var g=e.compositeRule;e.compositeRule=p.compositeRule=!0;var y=i;if(y)for(var b,P=-1,w=y.length-1;P<w;)b=y[P+=1],p.schema=b,p.schemaPath=s+"["+P+"]",p.errSchemaPath=l+"/"+P,a+=" "+e.validate(p)+" ",p.baseId=v,a+=" "+d+" = "+d+" || "+f+"; if (!"+d+") { ",h+="}";e.compositeRule=p.compositeRule=g,a+=" "+h+" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } else { errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else u&&(a+=" if (true) { ");return a},$comment:function(e,r,t){var a=" ",o=e.schema[r],n=e.errSchemaPath+"/"+r;e.opts.allErrors;var i=e.util.toQuotedString(o);return!0===e.opts.$comment?a+=" console.log("+i+");":"function"==typeof e.opts.$comment&&(a+=" self._opts.$comment("+i+", "+e.util.toQuotedString(n)+", validate.root.schema);"),a},const:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m=e.opts.$data&&i&&i.$data;m&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; "),m||(a+=" var schema"+o+" = validate.schema"+s+";"),a+="var "+d+" = equal("+c+", schema"+o+"); if (!"+d+") { ";var p=p||[];p.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValue: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var h=a;return a=p.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+h+"]); ":a+=" validate.errors = ["+h+"]; return false; ":a+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",u&&(a+=" else { "),a},contains:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level,f="i"+o,v=p.dataLevel=e.dataLevel+1,g="data"+v,y=e.baseId,b=e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all);if(a+="var "+m+" = errors;var "+d+";",b){var P=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=i,p.schemaPath=s,p.errSchemaPath=l,a+=" var "+h+" = false; for (var "+f+" = 0; "+f+" < "+c+".length; "+f+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers,!0);var w=c+"["+f+"]";p.dataPathArr[v]=f;var E=e.validate(p);p.baseId=y,e.util.varOccurences(E,g)<2?a+=" "+e.util.varReplace(E,g,w)+" ":a+=" var "+g+" = "+w+"; "+E+" ",a+=" if ("+h+") break; } ",e.compositeRule=p.compositeRule=P,a+=" if (!"+h+") {"}else a+=" if ("+c+".length == 0) {";var S=S||[];S.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should contain a valid item' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var x=a;return a=S.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",b&&(a+=" errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a},dependencies:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="errs__"+o,m=e.util.copy(e),p="";m.level++;var h="valid"+m.level,f={},v={},g=e.opts.ownProperties;for(w in i)if("__proto__"!=w){var y=i[w],b=Array.isArray(y)?v:f;b[w]=y}a+="var "+d+" = errors;";var P=e.errorPath;for(var w in a+="var missing"+o+";",v)if((b=v[w]).length){if(a+=" if ( "+c+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(w)+"') "),u){a+=" && ( ";var E=b;if(E)for(var S=-1,x=E.length-1;S<x;){j=E[S+=1],S&&(a+=" || "),a+=" ( ( "+(R=c+(C=e.util.getProperty(j)))+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(j)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?j:C)+") ) "}a+=")) { ";var F="missing"+o,O="' + "+F+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,F,!0):P+" + "+F);var _=_||[];_.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var D=a;a=_.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+D+"]); ":a+=" validate.errors = ["+D+"]; return false; ":a+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{a+=" ) { ";var k=b;if(k)for(var j,I=-1,A=k.length-1;I<A;){j=k[I+=1];var C=e.util.getProperty(j),R=(O=e.util.escapeQuotes(j),c+C);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,j,e.opts.jsonPointers)),a+=" if ( "+R+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(j)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",u&&(p+="}",a+=" else { ")}e.errorPath=P;var $=m.baseId;for(var w in f){y=f[w];(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all))&&(a+=" "+h+" = true; if ( "+c+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(w)+"') "),a+=") { ",m.schema=y,m.schemaPath=s+e.util.getProperty(w),m.errSchemaPath=l+"/"+e.util.escapeFragment(w),a+=" "+e.validate(m)+" ",m.baseId=$,a+=" } ",u&&(a+=" if ("+h+") { ",p+="}"))}return u&&(a+=" "+p+" if ("+d+" == errors) {"),a},enum:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m=e.opts.$data&&i&&i.$data;m&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ");var p="i"+o,h="schema"+o;m||(a+=" var "+h+" = validate.schema"+s+";"),a+="var "+d+";",m&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=d+" = false;for (var "+p+"=0; "+p+"<"+h+".length; "+p+"++) if (equal("+c+", "+h+"["+p+"])) { "+d+" = true; break; }",m&&(a+=" } "),a+=" if (!"+d+") { ";var f=f||[];f.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var v=a;return a=f.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+v+"]); ":a+=" validate.errors = ["+v+"]; return false; ":a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",u&&(a+=" else { "),a},format:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||"");if(!1===e.opts.format)return u&&(a+=" if (true) { "),a;var d,m=e.opts.$data&&i&&i.$data;m?(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ",d="schema"+o):d=i;var p=e.opts.unknownFormats,h=Array.isArray(p);if(m){a+=" var "+(f="format"+o)+" = formats["+d+"]; var "+(v="isObject"+o)+" = typeof "+f+" == 'object' && !("+f+" instanceof RegExp) && "+f+".validate; var "+(g="formatType"+o)+" = "+v+" && "+f+".type || 'string'; if ("+v+") { ",e.async&&(a+=" var async"+o+" = "+f+".async; "),a+=" "+f+" = "+f+".validate; } if ( ",m&&(a+=" ("+d+" !== undefined && typeof "+d+" != 'string') || "),a+=" (","ignore"!=p&&(a+=" ("+d+" && !"+f+" ",h&&(a+=" && self._opts.unknownFormats.indexOf("+d+") == -1 "),a+=") || "),a+=" ("+f+" && "+g+" == '"+t+"' && !(typeof "+f+" == 'function' ? ",e.async?a+=" (async"+o+" ? await "+f+"("+c+") : "+f+"("+c+")) ":a+=" "+f+"("+c+") ",a+=" : "+f+".test("+c+"))))) {"}else{var f;if(!(f=e.formats[i])){if("ignore"==p)return e.logger.warn('unknown format "'+i+'" ignored in schema at path "'+e.errSchemaPath+'"'),u&&(a+=" if (true) { "),a;if(h&&p.indexOf(i)>=0)return u&&(a+=" if (true) { "),a;throw new Error('unknown format "'+i+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,g=(v="object"==typeof f&&!(f instanceof RegExp)&&f.validate)&&f.type||"string";if(v){var y=!0===f.async;f=f.validate}if(g!=t)return u&&(a+=" if (true) { "),a;if(y){if(!e.async)throw new Error("async format in sync schema");a+=" if (!(await "+(b="formats"+e.util.getProperty(i)+".validate")+"("+c+"))) { "}else{a+=" if (! ";var b="formats"+e.util.getProperty(i);v&&(b+=".validate"),a+="function"==typeof f?" "+b+"("+c+") ":" "+b+".test("+c+") ",a+=") { "}}var P=P||[];P.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",a+=m?""+d:""+e.util.toQuotedString(i),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",a+=m?"' + "+d+" + '":""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=m?"validate.schema"+s:""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var w=a;return a=P.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",u&&(a+=" else { "),a},if:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level,f=e.schema.then,v=e.schema.else,g=void 0!==f&&(e.opts.strictKeywords?"object"==typeof f&&Object.keys(f).length>0||!1===f:e.util.schemaHasRules(f,e.RULES.all)),y=void 0!==v&&(e.opts.strictKeywords?"object"==typeof v&&Object.keys(v).length>0||!1===v:e.util.schemaHasRules(v,e.RULES.all)),b=p.baseId;if(g||y){var P;p.createErrors=!1,p.schema=i,p.schemaPath=s,p.errSchemaPath=l,a+=" var "+m+" = errors; var "+d+" = true; ";var w=e.compositeRule;e.compositeRule=p.compositeRule=!0,a+=" "+e.validate(p)+" ",p.baseId=b,p.createErrors=!0,a+=" errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } ",e.compositeRule=p.compositeRule=w,g?(a+=" if ("+h+") { ",p.schema=e.schema.then,p.schemaPath=e.schemaPath+".then",p.errSchemaPath=e.errSchemaPath+"/then",a+=" "+e.validate(p)+" ",p.baseId=b,a+=" "+d+" = "+h+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'then'; ":P="'then'",a+=" } ",y&&(a+=" else { ")):a+=" if (!"+h+") { ",y&&(p.schema=e.schema.else,p.schemaPath=e.schemaPath+".else",p.errSchemaPath=e.errSchemaPath+"/else",a+=" "+e.validate(p)+" ",p.baseId=b,a+=" "+d+" = "+h+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'else'; ":P="'else'",a+=" } "),a+=" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+P+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match \"' + "+P+" + '\" schema' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",u&&(a+=" else { ")}else u&&(a+=" if (true) { ");return a},items:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e),h="";p.level++;var f="valid"+p.level,v="i"+o,g=p.dataLevel=e.dataLevel+1,y="data"+g,b=e.baseId;if(a+="var "+m+" = errors;var "+d+";",Array.isArray(i)){var P=e.schema.additionalItems;if(!1===P){a+=" "+d+" = "+c+".length <= "+i.length+"; ";var w=l;l=e.errSchemaPath+"/additionalItems",a+=" if (!"+d+") { ";var E=E||[];E.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+i.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+i.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var S=a;a=E.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",l=w,u&&(h+="}",a+=" else { ")}var x=i;if(x)for(var F,O=-1,_=x.length-1;O<_;)if(F=x[O+=1],e.opts.strictKeywords?"object"==typeof F&&Object.keys(F).length>0||!1===F:e.util.schemaHasRules(F,e.RULES.all)){a+=" "+f+" = true; if ("+c+".length > "+O+") { ";var D=c+"["+O+"]";p.schema=F,p.schemaPath=s+"["+O+"]",p.errSchemaPath=l+"/"+O,p.errorPath=e.util.getPathExpr(e.errorPath,O,e.opts.jsonPointers,!0),p.dataPathArr[g]=O;var k=e.validate(p);p.baseId=b,e.util.varOccurences(k,y)<2?a+=" "+e.util.varReplace(k,y,D)+" ":a+=" var "+y+" = "+D+"; "+k+" ",a+=" } ",u&&(a+=" if ("+f+") { ",h+="}")}if("object"==typeof P&&(e.opts.strictKeywords?"object"==typeof P&&Object.keys(P).length>0||!1===P:e.util.schemaHasRules(P,e.RULES.all))){p.schema=P,p.schemaPath=e.schemaPath+".additionalItems",p.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+f+" = true; if ("+c+".length > "+i.length+") { for (var "+v+" = "+i.length+"; "+v+" < "+c+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=c+"["+v+"]";p.dataPathArr[g]=v;k=e.validate(p);p.baseId=b,e.util.varOccurences(k,y)<2?a+=" "+e.util.varReplace(k,y,D)+" ":a+=" var "+y+" = "+D+"; "+k+" ",u&&(a+=" if (!"+f+") break; "),a+=" } } ",u&&(a+=" if ("+f+") { ",h+="}")}}else if(e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){p.schema=i,p.schemaPath=s,p.errSchemaPath=l,a+=" for (var "+v+" = 0; "+v+" < "+c+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=c+"["+v+"]";p.dataPathArr[g]=v;k=e.validate(p);p.baseId=b,e.util.varOccurences(k,y)<2?a+=" "+e.util.varReplace(k,y,D)+" ":a+=" var "+y+" = "+D+"; "+k+" ",u&&(a+=" if (!"+f+") break; "),a+=" }"}return u&&(a+=" "+h+" if ("+m+" == errors) {"),a},maximum:Ze,minimum:Ze,maxItems:Ye,minItems:Ye,maxLength:Xe,minLength:Xe,maxProperties:er,minProperties:er,multipleOf:function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");o+="var division"+n+";if (",m&&(o+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),o+=" (division"+n+" = "+d+" / "+a+", ",e.opts.multipleOfPrecision?o+=" Math.abs(Math.round(division"+n+") - division"+n+") > 1e-"+e.opts.multipleOfPrecision+" ":o+=" division"+n+" !== parseInt(division"+n+") ",o+=" ) ",m&&(o+=" ) "),o+=" ) { ";var p=p||[];p.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be multiple of ",o+=m?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var h=o;return o=p.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+h+"]); ":o+=" validate.errors = ["+h+"]; return false; ":o+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},not:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="errs__"+o,m=e.util.copy(e);m.level++;var p="valid"+m.level;if(e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){m.schema=i,m.schemaPath=s,m.errSchemaPath=l,a+=" var "+d+" = errors; ";var h,f=e.compositeRule;e.compositeRule=m.compositeRule=!0,m.createErrors=!1,m.opts.allErrors&&(h=m.opts.allErrors,m.opts.allErrors=!1),a+=" "+e.validate(m)+" ",m.createErrors=!0,h&&(m.opts.allErrors=h),e.compositeRule=m.compositeRule=f,a+=" if ("+p+") { ";var v=v||[];v.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var g=a;a=v.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(a+=" if (false) { ");return a},oneOf:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e),h="";p.level++;var f="valid"+p.level,v=p.baseId,g="prevValid"+o,y="passingSchemas"+o;a+="var "+m+" = errors , "+g+" = false , "+d+" = false , "+y+" = null; ";var b=e.compositeRule;e.compositeRule=p.compositeRule=!0;var P=i;if(P)for(var w,E=-1,S=P.length-1;E<S;)w=P[E+=1],(e.opts.strictKeywords?"object"==typeof w&&Object.keys(w).length>0||!1===w:e.util.schemaHasRules(w,e.RULES.all))?(p.schema=w,p.schemaPath=s+"["+E+"]",p.errSchemaPath=l+"/"+E,a+=" "+e.validate(p)+" ",p.baseId=v):a+=" var "+f+" = true; ",E&&(a+=" if ("+f+" && "+g+") { "+d+" = false; "+y+" = ["+y+", "+E+"]; } else { ",h+="}"),a+=" if ("+f+") { "+d+" = "+g+" = true; "+y+" = "+E+"; }";return e.compositeRule=p.compositeRule=b,a+=h+"if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a},pattern:function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'string') || "),o+=" !"+(m?"(new RegExp("+a+"))":e.usePattern(s))+".test("+d+") ) { ";var p=p||[];p.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { pattern: ",o+=m?""+a:""+e.util.toQuotedString(s),o+=" } ",!1!==e.opts.messages&&(o+=" , message: 'should match pattern \"",o+=m?"' + "+a+" + '":""+e.util.escapeQuotes(s),o+="\"' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+e.util.toQuotedString(s),o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var h=o;return o=p.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+h+"]); ":o+=" validate.errors = ["+h+"]; return false; ":o+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},properties:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="errs__"+o,m=e.util.copy(e),p="";m.level++;var h="valid"+m.level,f="key"+o,v="idx"+o,g=m.dataLevel=e.dataLevel+1,y="data"+g,b="dataProperties"+o,P=Object.keys(i||{}).filter(C),w=e.schema.patternProperties||{},E=Object.keys(w).filter(C),S=e.schema.additionalProperties,x=P.length||E.length,F=!1===S,O="object"==typeof S&&Object.keys(S).length,_=e.opts.removeAdditional,D=F||O||_,k=e.opts.ownProperties,j=e.baseId,I=e.schema.required;if(I&&(!e.opts.$data||!I.$data)&&I.length<e.opts.loopRequired)var A=e.util.toHash(I);function C(e){return"__proto__"!==e}if(a+="var "+d+" = errors;var "+h+" = true;",k&&(a+=" var "+b+" = undefined;"),D){if(a+=k?" "+b+" = "+b+" || Object.keys("+c+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+c+") { ",x){if(a+=" var isAdditional"+o+" = !(false ",P.length)if(P.length>8)a+=" || validate.schema"+s+".hasOwnProperty("+f+") ";else{var R=P;if(R)for(var $=-1,N=R.length-1;$<N;)G=R[$+=1],a+=" || "+f+" == "+e.util.toQuotedString(G)+" "}if(E.length){var L=E;if(L)for(var T=-1,z=L.length-1;T<z;)ne=L[T+=1],a+=" || "+e.usePattern(ne)+".test("+f+") "}a+=" ); if (isAdditional"+o+") { "}if("all"==_)a+=" delete "+c+"["+f+"]; ";else{var V=e.errorPath,q="' + "+f+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers)),F)if(_)a+=" delete "+c+"["+f+"]; ";else{a+=" "+h+" = false; ";var M=l;l=e.errSchemaPath+"/additionalProperties",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { additionalProperty: '"+q+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is an invalid additional property":a+="should NOT have additional properties",a+="' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var W=a;a=te.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+W+"]); ":a+=" validate.errors = ["+W+"]; return false; ":a+=" var err = "+W+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=M,u&&(a+=" break; ")}else if(O)if("failing"==_){a+=" var "+d+" = errors; ";var B=e.compositeRule;e.compositeRule=m.compositeRule=!0,m.schema=S,m.schemaPath=e.schemaPath+".additionalProperties",m.errSchemaPath=e.errSchemaPath+"/additionalProperties",m.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);var U=c+"["+f+"]";m.dataPathArr[g]=f;var Q=e.validate(m);m.baseId=j,e.util.varOccurences(Q,y)<2?a+=" "+e.util.varReplace(Q,y,U)+" ":a+=" var "+y+" = "+U+"; "+Q+" ",a+=" if (!"+h+") { errors = "+d+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+c+"["+f+"]; } ",e.compositeRule=m.compositeRule=B}else{m.schema=S,m.schemaPath=e.schemaPath+".additionalProperties",m.errSchemaPath=e.errSchemaPath+"/additionalProperties",m.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);U=c+"["+f+"]";m.dataPathArr[g]=f;Q=e.validate(m);m.baseId=j,e.util.varOccurences(Q,y)<2?a+=" "+e.util.varReplace(Q,y,U)+" ":a+=" var "+y+" = "+U+"; "+Q+" ",u&&(a+=" if (!"+h+") break; ")}e.errorPath=V}x&&(a+=" } "),a+=" } ",u&&(a+=" if ("+h+") { ",p+="}")}var H=e.opts.useDefaults&&!e.compositeRule;if(P.length){var K=P;if(K)for(var G,J=-1,Z=K.length-1;J<Z;){var Y=i[G=K[J+=1]];if(e.opts.strictKeywords?"object"==typeof Y&&Object.keys(Y).length>0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all)){var X=e.util.getProperty(G),ee=(U=c+X,H&&void 0!==Y.default);m.schema=Y,m.schemaPath=s+X,m.errSchemaPath=l+"/"+e.util.escapeFragment(G),m.errorPath=e.util.getPath(e.errorPath,G,e.opts.jsonPointers),m.dataPathArr[g]=e.util.toQuotedString(G);Q=e.validate(m);if(m.baseId=j,e.util.varOccurences(Q,y)<2){Q=e.util.varReplace(Q,y,U);var re=U}else{re=y;a+=" var "+y+" = "+U+"; "}if(ee)a+=" "+Q+" ";else{if(A&&A[G]){a+=" if ( "+re+" === undefined ",k&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+h+" = false; ";V=e.errorPath,M=l;var te,ae=e.util.escapeQuotes(G);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(V,G,e.opts.jsonPointers)),l=e.errSchemaPath+"/required",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+ae+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+ae+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";W=a;a=te.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+W+"]); ":a+=" validate.errors = ["+W+"]; return false; ":a+=" var err = "+W+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=M,e.errorPath=V,a+=" } else { "}else u?(a+=" if ( "+re+" === undefined ",k&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+h+" = true; } else { "):(a+=" if ("+re+" !== undefined ",k&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(G)+"') "),a+=" ) { ");a+=" "+Q+" } "}}u&&(a+=" if ("+h+") { ",p+="}")}}if(E.length){var oe=E;if(oe)for(var ne,ie=-1,se=oe.length-1;ie<se;){Y=w[ne=oe[ie+=1]];if(e.opts.strictKeywords?"object"==typeof Y&&Object.keys(Y).length>0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all)){m.schema=Y,m.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(ne),m.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(ne),a+=k?" "+b+" = "+b+" || Object.keys("+c+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+c+") { ",a+=" if ("+e.usePattern(ne)+".test("+f+")) { ",m.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);U=c+"["+f+"]";m.dataPathArr[g]=f;Q=e.validate(m);m.baseId=j,e.util.varOccurences(Q,y)<2?a+=" "+e.util.varReplace(Q,y,U)+" ":a+=" var "+y+" = "+U+"; "+Q+" ",u&&(a+=" if (!"+h+") break; "),a+=" } ",u&&(a+=" else "+h+" = true; "),a+=" } ",u&&(a+=" if ("+h+") { ",p+="}")}}}return u&&(a+=" "+p+" if ("+d+" == errors) {"),a},propertyNames:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="errs__"+o,m=e.util.copy(e);m.level++;var p="valid"+m.level;if(a+="var "+d+" = errors;",e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){m.schema=i,m.schemaPath=s,m.errSchemaPath=l;var h="key"+o,f="idx"+o,v="i"+o,g="' + "+h+" + '",y="data"+(m.dataLevel=e.dataLevel+1),b="dataProperties"+o,P=e.opts.ownProperties,w=e.baseId;P&&(a+=" var "+b+" = undefined; "),a+=P?" "+b+" = "+b+" || Object.keys("+c+"); for (var "+f+"=0; "+f+"<"+b+".length; "+f+"++) { var "+h+" = "+b+"["+f+"]; ":" for (var "+h+" in "+c+") { ",a+=" var startErrs"+o+" = errors; ";var E=h,S=e.compositeRule;e.compositeRule=m.compositeRule=!0;var x=e.validate(m);m.baseId=w,e.util.varOccurences(x,y)<2?a+=" "+e.util.varReplace(x,y,E)+" ":a+=" var "+y+" = "+E+"; "+x+" ",e.compositeRule=m.compositeRule=S,a+=" if (!"+p+") { for (var "+v+"=startErrs"+o+"; "+v+"<errors; "+v+"++) { vErrors["+v+"].propertyName = "+h+"; } var err = ",!1!==e.createErrors?(a+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { propertyName: '"+g+"' } ",!1!==e.opts.messages&&(a+=" , message: 'property name \\'"+g+"\\' is invalid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),u&&(a+=" break; "),a+=" } }"}return u&&(a+=" if ("+d+" == errors) {"),a},required:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m=e.opts.$data&&i&&i.$data;m&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ");var p="schema"+o;if(!m)if(i.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var h=[],f=i;if(f)for(var v,g=-1,y=f.length-1;g<y;){v=f[g+=1];var b=e.schema.properties[v];b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0||!1===b:e.util.schemaHasRules(b,e.RULES.all))||(h[h.length]=v)}}else h=i;if(m||h.length){var P=e.errorPath,w=m||h.length>=e.opts.loopRequired,E=e.opts.ownProperties;if(u)if(a+=" var missing"+o+"; ",w){m||(a+=" var "+p+" = validate.schema"+s+"; ");var S="' + "+(k="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,k,e.opts.jsonPointers)),a+=" var "+d+" = true; ",m&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=" for (var "+O+" = 0; "+O+" < "+p+".length; "+O+"++) { "+d+" = "+c+"["+p+"["+O+"]] !== undefined ",E&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", "+p+"["+O+"]) "),a+="; if (!"+d+") break; } ",m&&(a+=" } "),a+=" if (!"+d+") { ",(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var x=a;a=D.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var F=h;if(F)for(var O=-1,_=F.length-1;O<_;){I=F[O+=1],O&&(a+=" || "),a+=" ( ( "+($=c+(R=e.util.getProperty(I)))+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(I)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?I:R)+") ) "}a+=") { ";var D;S="' + "+(k="missing"+o)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,k,!0):P+" + "+k),(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";x=a;a=D.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(w){m||(a+=" var "+p+" = validate.schema"+s+"; ");var k;S="' + "+(k="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,k,e.opts.jsonPointers)),m&&(a+=" if ("+p+" && !Array.isArray("+p+")) { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+p+" !== undefined) { "),a+=" for (var "+O+" = 0; "+O+" < "+p+".length; "+O+"++) { if ("+c+"["+p+"["+O+"]] === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", "+p+"["+O+"]) "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",m&&(a+=" } ")}else{var j=h;if(j)for(var I,A=-1,C=j.length-1;A<C;){I=j[A+=1];var R=e.util.getProperty(I),$=(S=e.util.escapeQuotes(I),c+R);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,I,e.opts.jsonPointers)),a+=" if ( "+$+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(I)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=P}else u&&(a+=" if (true) {");return a},uniqueItems:function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m="valid"+n,p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,(s||p)&&!1!==e.opts.uniqueItems){p&&(o+=" var "+m+"; if ("+a+" === false || "+a+" === undefined) "+m+" = true; else if (typeof "+a+" != 'boolean') "+m+" = false; else { "),o+=" var i = "+d+".length , "+m+" = true , j; if (i > 1) { ";var h=e.schema.items&&e.schema.items.type,f=Array.isArray(h);if(!h||"object"==h||"array"==h||f&&(h.indexOf("object")>=0||h.indexOf("array")>=0))o+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+d+"[i], "+d+"[j])) { "+m+" = false; break outer; } } } ";else{o+=" var itemIndices = {}, item; for (;i--;) { var item = "+d+"[i]; ";var v="checkDataType"+(f?"s":"");o+=" if ("+e.util[v](h,"item",e.opts.strictNumbers,!0)+") continue; ",f&&(o+=" if (typeof item == 'string') item = '\"' + item; "),o+=" if (typeof itemIndices[item] == 'number') { "+m+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}o+=" } ",p&&(o+=" } "),o+=" if (!"+m+") { ";var g=g||[];g.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var y=o;o=g.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+y+"]); ":o+=" validate.errors = ["+y+"]; return false; ":o+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",c&&(o+=" else { ")}else c&&(o+=" if (true) { ");return o},validate:be},tr=V.toHash,ar=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"],or=function(e,r){for(var t=0;t<r.length;t++){e=JSON.parse(JSON.stringify(e));var a,o=r[t].split("/"),n=e;for(a=1;a<o.length;a++)n=n[o[a]];for(a=0;a<ar.length;a++){var i=ar[a],s=n[i];s&&(n[i]={anyOf:[s,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e},nr=fe.MissingRef,ir=function e(r,t,a){var o=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof t&&(a=t,t=void 0);var n=i(r).then((function(){var e=o._addSchema(r,void 0,t);return e.validate||function e(r){try{return o._compile(r)}catch(e){if(e instanceof nr)return a(e);throw e}function a(a){var n=a.missingSchema;if(u(n))throw new Error("Schema "+n+" is loaded but "+a.missingRef+" cannot be resolved");var s=o._loadingSchemas[n];return s||(s=o._loadingSchemas[n]=o._opts.loadSchema(n)).then(l,l),s.then((function(e){if(!u(n))return i(e).then((function(){u(n)||o.addSchema(e,n,void 0,t)}))})).then((function(){return e(r)}));function l(){delete o._loadingSchemas[n]}function u(e){return o._refs[e]||o._schemas[e]}}}(e)}));a&&n.then((function(e){a(null,e)}),a);return n;function i(r){var t=r.$schema;return t&&!o.getSchema(t)?e.call(o,{$ref:t},!0):Promise.resolve()}};var sr=function(e,r,t){var a,o,n=" ",i=e.level,s=e.dataLevel,l=e.schema[r],u=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,d=!e.opts.allErrors,m="data"+(s||""),p="valid"+i,h="errs__"+i,f=e.opts.$data&&l&&l.$data;f?(n+=" var schema"+i+" = "+e.util.getData(l.$data,s,e.dataPathArr)+"; ",o="schema"+i):o=l;var v,g,y,b,P,w="definition"+i,E=this.definition,S="";if(f&&E.$data){P="keywordValidate"+i;var x=E.validateSchema;n+=" var "+w+" = RULES.custom['"+r+"'].definition; var "+P+" = "+w+".validate;"}else{if(!(b=e.useCustomRule(this,l,e.schema,e)))return;o="validate.schema"+u,P=b.code,v=E.compile,g=E.inline,y=E.macro}var F=P+".errors",O="i"+i,_="ruleErr"+i,D=E.async;if(D&&!e.async)throw new Error("async keyword in sync schema");if(g||y||(n+=F+" = null;"),n+="var "+h+" = errors;var "+p+";",f&&E.$data&&(S+="}",n+=" if ("+o+" === undefined) { "+p+" = true; } else { ",x&&(S+="}",n+=" "+p+" = "+w+".validateSchema("+o+"); if ("+p+") { ")),g)E.statements?n+=" "+b.validate+" ":n+=" "+p+" = "+b.validate+"; ";else if(y){var k=e.util.copy(e);S="";k.level++;var j="valid"+k.level;k.schema=b.validate,k.schemaPath="";var I=e.compositeRule;e.compositeRule=k.compositeRule=!0;var A=e.validate(k).replace(/validate\.schema/g,P);e.compositeRule=k.compositeRule=I,n+=" "+A}else{(N=N||[]).push(n),n="",n+=" "+P+".call( ",e.opts.passContext?n+="this":n+="self",v||!1===E.schema?n+=" , "+m+" ":n+=" , "+o+" , "+m+" , validate.schema"+e.schemaPath+" ",n+=" , (dataPath || '')",'""'!=e.errorPath&&(n+=" + "+e.errorPath);var C=s?"data"+(s-1||""):"parentData",R=s?e.dataPathArr[s]:"parentDataProperty",$=n+=" , "+C+" , "+R+" , rootData ) ";n=N.pop(),!1===E.errors?(n+=" "+p+" = ",D&&(n+="await "),n+=$+"; "):n+=D?" var "+(F="customErrors"+i)+" = null; try { "+p+" = await "+$+"; } catch (e) { "+p+" = false; if (e instanceof ValidationError) "+F+" = e.errors; else throw e; } ":" "+F+" = null; "+p+" = "+$+"; "}if(E.modifying&&(n+=" if ("+C+") "+m+" = "+C+"["+R+"];"),n+=""+S,E.valid)d&&(n+=" if (true) { ");else{var N;n+=" if ( ",void 0===E.valid?(n+=" !",n+=y?""+j:""+p):n+=" "+!E.valid+" ",n+=") { ",a=this.keyword,(N=N||[]).push(n),n="",(N=N||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(n+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";var L=n;n=N.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+L+"]); ":n+=" validate.errors = ["+L+"]; return false; ":n+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var T=n;n=N.pop(),g?E.errors?"full"!=E.errors&&(n+=" for (var "+O+"="+h+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+c+'"; } ',e.opts.verbose&&(n+=" "+_+".schema = "+o+"; "+_+".data = "+m+"; "),n+=" } "):!1===E.errors?n+=" "+T+" ":(n+=" if ("+h+" == errors) { "+T+" } else { for (var "+O+"="+h+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+c+'"; } ',e.opts.verbose&&(n+=" "+_+".schema = "+o+"; "+_+".data = "+m+"; "),n+=" } } "):y?(n+=" var err = ",!1!==e.createErrors?(n+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(n+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&d&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; ")):!1===E.errors?n+=" "+T+" ":(n+=" if (Array.isArray("+F+")) { if (vErrors === null) vErrors = "+F+"; else vErrors = vErrors.concat("+F+"); errors = vErrors.length; for (var "+O+"="+h+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; "+_+'.schemaPath = "'+c+'"; ',e.opts.verbose&&(n+=" "+_+".schema = "+o+"; "+_+".data = "+m+"; "),n+=" } } else { "+T+" } "),n+=" } ",d&&(n+=" else { ")}return n},lr="http://json-schema.org/draft-07/schema#",ur="http://json-schema.org/draft-07/schema#",cr="Core schema meta-schema",dr={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},mr=["object","boolean"],pr={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},hr={$schema:lr,$id:ur,title:cr,definitions:dr,type:mr,properties:pr,default:!0},fr=N(Object.freeze({__proto__:null,$schema:lr,$id:ur,title:cr,definitions:dr,type:mr,properties:pr,default:hr})),vr={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:fr.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:fr.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}},gr=/^[a-z_$][a-z0-9_$-]*$/i,yr=function(e,r){var t=this.RULES;if(t.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!gr.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(r){this.validateKeyword(r,!0);var a=r.type;if(Array.isArray(a))for(var o=0;o<a.length;o++)i(e,a[o],r);else i(e,a,r);var n=r.metaSchema;n&&(r.$data&&this._opts.$data&&(n={anyOf:[n,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),r.validateSchema=this.compile(n,!0))}function i(e,r,a){for(var o,n=0;n<t.length;n++){var i=t[n];if(i.type==r){o=i;break}}o||(o={type:r,rules:[]},t.push(o));var s={keyword:e,definition:a,custom:!0,code:sr,implements:a.implements};o.rules.push(s),t.custom[e]=s}return t.keywords[e]=t.all[e]=!0,this},br=function(e){var r=this.RULES.custom[e];return r?r.definition:this.RULES.keywords[e]||!1},Pr=function(e){var r=this.RULES;delete r.keywords[e],delete r.all[e],delete r.custom[e];for(var t=0;t<r.length;t++)for(var a=r[t].rules,o=0;o<a.length;o++)if(a[o].keyword==e){a.splice(o,1);break}return this},wr=function e(r,t){e.errors=null;var a=this._validateKeyword=this._validateKeyword||this.compile(vr,!0);if(a(r))return!0;if(e.errors=a.errors,t)throw new Error("custom keyword definition is invalid: "+this.errorsText(a.errors));return!1};var Er="http://json-schema.org/draft-07/schema#",Sr="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",xr="Meta-schema for $data reference (JSON Schema extension proposal)",Fr=["$data"],Or={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},_r={$schema:Er,$id:Sr,description:xr,type:"object",required:Fr,properties:Or,additionalProperties:!1},Dr=N(Object.freeze({__proto__:null,$schema:Er,$id:Sr,description:xr,type:"object",required:Fr,properties:Or,additionalProperties:!1,default:_r})),kr=Cr;Cr.prototype.validate=function(e,r){var t;if("string"==typeof e){if(!(t=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);t=a.validate||this._compile(a)}var o=t(r);!0!==t.$async&&(this.errors=t.errors);return o},Cr.prototype.compile=function(e,r){var t=this._addSchema(e,void 0,r);return t.validate||this._compile(t)},Cr.prototype.addSchema=function(e,r,t,a){if(Array.isArray(e)){for(var o=0;o<e.length;o++)this.addSchema(e[o],void 0,t,a);return this}var n=this._getId(e);if(void 0!==n&&"string"!=typeof n)throw new Error("schema id must be string");return zr(this,r=te.normalizeId(r||n)),this._schemas[r]=this._addSchema(e,t,a,!0),this},Cr.prototype.addMetaSchema=function(e,r,t){return this.addSchema(e,r,t,!0),this},Cr.prototype.validateSchema=function(e,r){var t=e.$schema;if(void 0!==t&&"string"!=typeof t)throw new Error("$schema must be a string");if(!(t=t||this._opts.defaultMeta||function(e){var r=e._opts.meta;return e._opts.defaultMeta="object"==typeof r?e._getId(r)||r:e.getSchema(jr)?jr:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var a=this.validate(t,e);if(!a&&r){var o="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(o);this.logger.error(o)}return a},Cr.prototype.getSchema=function(e){var r=Rr(this,e);switch(typeof r){case"object":return r.validate||this._compile(r);case"string":return this.getSchema(r);case"undefined":return function(e,r){var t=te.schema.call(e,{schema:{}},r);if(t){var a=t.schema,o=t.root,n=t.baseId,i=Ee.call(e,a,o,void 0,n);return e._fragments[r]=new ee({ref:r,fragment:!0,schema:a,root:o,baseId:n,validate:i}),i}}(this,e)}},Cr.prototype.removeSchema=function(e){if(e instanceof RegExp)return $r(this,this._schemas,e),$r(this,this._refs,e),this;switch(typeof e){case"undefined":return $r(this,this._schemas),$r(this,this._refs),this._cache.clear(),this;case"string":var r=Rr(this,e);return r&&this._cache.del(r.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var t=this._opts.serialize,a=t?t(e):e;this._cache.del(a);var o=this._getId(e);o&&(o=te.normalizeId(o),delete this._schemas[o],delete this._refs[o])}return this},Cr.prototype.addFormat=function(e,r){"string"==typeof r&&(r=new RegExp(r));return this._formats[e]=r,this},Cr.prototype.errorsText=function(e,r){if(!(e=e||this.errors))return"No errors";for(var t=void 0===(r=r||{}).separator?", ":r.separator,a=void 0===r.dataVar?"data":r.dataVar,o="",n=0;n<e.length;n++){var i=e[n];i&&(o+=a+i.dataPath+" "+i.message+t)}return o.slice(0,-t.length)},Cr.prototype._addSchema=function(e,r,t,a){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var o=this._opts.serialize,n=o?o(e):e,i=this._cache.get(n);if(i)return i;a=a||!1!==this._opts.addUsedSchema;var s=te.normalizeId(this._getId(e));s&&a&&zr(this,s);var l,u=!1!==this._opts.validateSchema&&!r;u&&!(l=s&&s==te.normalizeId(e.$schema))&&this.validateSchema(e,!0);var c=te.ids.call(this,e),d=new ee({id:s,schema:e,localRefs:c,cacheKey:n,meta:t});"#"!=s[0]&&a&&(this._refs[s]=d);this._cache.put(n,d),u&&l&&this.validateSchema(e,!0);return d},Cr.prototype._compile=function(e,r){if(e.compiling)return e.validate=o,o.schema=e.schema,o.errors=null,o.root=r||o,!0===e.schema.$async&&(o.$async=!0),o;var t,a;e.compiling=!0,e.meta&&(t=this._opts,this._opts=this._metaOpts);try{a=Ee.call(this,e.schema,r,e.localRefs)}catch(r){throw delete e.validate,r}finally{e.compiling=!1,e.meta&&(this._opts=t)}return e.validate=a,e.refs=a.refs,e.refVal=a.refVal,e.root=a.root,a;function o(){var r=e.validate,t=r.apply(this,arguments);return o.errors=r.errors,t}},Cr.prototype.compileAsync=ir,Cr.prototype.addKeyword=yr,Cr.prototype.getKeyword=br,Cr.prototype.removeKeyword=Pr,Cr.prototype.validateKeyword=wr,Cr.ValidationError=fe.Validation,Cr.MissingRefError=fe.MissingRef,Cr.$dataMetaSchema=or;var jr="http://json-schema.org/draft-07/schema",Ir=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],Ar=["/properties"];function Cr(e){if(!(this instanceof Cr))return new Cr(e);var r,t;e=this._opts=V.copy(e)||{},function(e){var r=e._opts.logger;if(!1===r)e.logger={log:Vr,warn:Vr,error:Vr};else{if(void 0===r&&(r=console),!("object"==typeof r&&r.log&&r.warn&&r.error))throw new Error("logger must implement log, warn and error methods");e.logger=r}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=We(e.format),this._cache=e.cache||new Ie,this._loadingSchemas={},this._compilations=[],this.RULES=((r=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}]).all=tr(t=["type","$comment"]),r.types=tr(["number","integer","string","array","object","boolean","null"]),r.forEach((function(e){e.rules=e.rules.map((function(e){var a;if("object"==typeof e){var o=Object.keys(e)[0];a=e[o],e=o,a.forEach((function(e){t.push(e),r.all[e]=!0}))}return t.push(e),r.all[e]={keyword:e,code:rr[e],implements:a}})),r.all.$comment={keyword:"$comment",code:rr.$comment},e.type&&(r.types[e.type]=e)})),r.keywords=tr(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),r.custom={},r),this._getId=function(e){switch(e.schemaId){case"auto":return Tr;case"id":return Nr;default:return Lr}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=ye),this._metaOpts=function(e){for(var r=V.copy(e._opts),t=0;t<Ir.length;t++)delete r[Ir[t]];return r}(this),e.formats&&function(e){for(var r in e._opts.formats){var t=e._opts.formats[r];e.addFormat(r,t)}}(this),e.keywords&&function(e){for(var r in e._opts.keywords){var t=e._opts.keywords[r];e.addKeyword(r,t)}}(this),function(e){var r;e._opts.$data&&(r=Dr,e.addMetaSchema(r,r.$id,!0));if(!1===e._opts.meta)return;var t=fr;e._opts.$data&&(t=or(t,Ar));e.addMetaSchema(t,jr,!0),e._refs["http://json-schema.org/schema"]=jr}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var r=e._opts.schemas;if(!r)return;if(Array.isArray(r))e.addSchema(r);else for(var t in r)e.addSchema(r[t],t)}(this)}function Rr(e,r){return r=te.normalizeId(r),e._schemas[r]||e._refs[r]||e._fragments[r]}function $r(e,r,t){for(var a in r){var o=r[a];o.meta||t&&!t.test(a)||(e._cache.del(o.cacheKey),delete r[a])}}function Nr(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function Lr(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function Tr(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function zr(e,r){if(e._schemas[r]||e._refs[r])throw new Error('schema with key or id "'+r+'" already exists')}function Vr(){}var qr={$$currentLocalizeFn:function(e){if(e&&e.length)for(var r=0;r<e.length;r+=1){var t=e[r],a=void 0,o=void 0,n=void 0;switch(t.keyword){case"$ref":a="无法找到引用".concat(t.params.ref);break;case"additionalItems":a="",o=t.params.limit,a+="不允许超过".concat(o,"个元素");break;case"additionalProperties":a="不允许有额外的属性";break;case"anyOf":a="数据应为 anyOf 所指定的其中一个";break;case"const":a="应当等于常量";break;case"contains":a="应当包含一个有效项";break;case"custom":a='应当通过 "'.concat(t.keyword,' 关键词校验"');break;case"dependencies":a="",o=t.params.depsCount,a+="应当拥有属性".concat(t.params.property,"的依赖属性").concat(t.params.deps);break;case"enum":a="应当是预设定的枚举值之一";break;case"exclusiveMaximum":case"exclusiveMinimum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(n);break;case"false schema":a="布尔模式出错";break;case"format":a='应当匹配格式 "'.concat(t.params.format,'"');break;case"formatExclusiveMaximum":a="formatExclusiveMaximum 应当是布尔值";break;case"formatExclusiveMinimum":a="formatExclusiveMinimum 应当是布尔值";break;case"formatMaximum":case"formatMinimum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当是 ".concat(n);break;case"if":a='应当匹配模式 "'.concat(t.params.failingKeyword,'" ');break;case"maximum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(n);break;case"maxItems":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个项");break;case"maxLength":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个字符");break;case"maxProperties":a="",o=t.params.limit,a+="不应有多于 ".concat(o," 个属性");break;case"minimum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(n);break;case"minItems":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个项");break;case"minLength":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个字符");break;case"minProperties":a="",o=t.params.limit,a+="不应有少于 ".concat(o," 个属性");break;case"multipleOf":a="应当是 ".concat(t.params.multipleOf," 的整数倍");break;case"not":a='不应当匹配 "not" schema';break;case"oneOf":a='只能匹配一个 "oneOf" 中的 schema';break;case"pattern":a='应当匹配模式 "'.concat(t.params.pattern,'"');break;case"patternRequired":a="应当有属性匹配模式 ".concat(t.params.missingPattern);break;case"propertyNames":a="属性名 '".concat(t.params.propertyName,"' 无效");break;case"required":a="应当有必需属性 ".concat(t.params.missingProperty);break;case"switch":a="由于 ".concat(t.params.caseIndex,' 失败,未通过 "switch" 校验, ');break;case"type":a="应当是 ".concat(t.params.type," 类型");break;case"uniqueItems":a="不应当含有重复项 (第 ".concat(t.params.j," 项与第 ").concat(t.params.i," 项是重复的)");break;default:continue}t.message=a}},getCurrentLocalize:function(){return this.$$currentLocalizeFn},useLocal:function(e){this.$$currentLocalizeFn=e}};function Mr(e,r){try{if("object"===t(r))return e.fill(null).map((function(){return JSON.parse(JSON.stringify(r))}))}catch(e){}}function Wr(e,r){return e.filter((function(e){return r.includes(e)}))}function Br(e,r,t){var a=R(e.$ref,r);e.$ref;var o=s(e,["$ref"]);return Kr(i(i({},a),o),r,t)}function Ur(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length<2)return r[0];for(var a={},o=[].concat(r),n=function(){var e=E(o[0])?o[0]:{},r=E(o[1])?o[1]:{};a=Object.assign({},e),Object.keys(r).reduce((function(t,a){var o=e[a],n=r[a];if(E(o)||E(n))if(E(o)&&E(n))t[a]=Ur(o,n);else{var i=l(E(o)?[o,n]:[n,o],2),s=i[0],u=i[1];t[a]="additionalProperties"===a?!0===u&&s:s}else if(Array.isArray(o)||Array.isArray(n))if(Array.isArray(o)&&Array.isArray(n)){if(E(o[0])||E(n[0]))throw new Error("暂不支持如上数组对象元素合并");var c=Wr([].concat(o),[].concat(n));if(c.length<=0)throw new Error("无法合并如上数据");0===c.length&&"type"===a?t[a]=c[0]:t[a]=c}else{var d=l(Array.isArray(o)?[o,n]:[n,o],2),m=d[0],p=d[1];if(void 0===p)t[a]=m;else{if(!m.includes(p))throw new Error("无法合并如下数据");t[a]=p}}else if(void 0!==o&&void 0!==n)if("maxLength"===a||"maximum"===a||"maxItems"===a||"exclusiveMaximum"===a||"maxProperties"===a)t[a]=Math.min(o,n);else if("minLength"===a||"minimum"===a||"minItems"===a||"exclusiveMinimum"===a||"minProperties"===a)t[a]=Math.max(o,n);else if("multipleOf"===a)t[a]=A(o,n);else{if(o!==n)throw new Error("无法合并如下数据");t[a]=o}else t[a]=void 0===o?n:o;return t}),a),o.splice(0,2,a)};o.length>=2;)n();return a}function Qr(e,r,t){var a=i(i({},e),{},{allOf:e.allOf.map((function(e){return Kr(e,r,t)}))});try{var o=a.allOf,n=s(a,["allOf"]);return Ur.apply(void 0,[n].concat(u(o)))}catch(e){return a.allOf,s(a,["allOf"])}}function Hr(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.hasOwnProperty("allOf")&&(e=Qr(e,r,t)),e.hasOwnProperty("$ref")&&(e=Br(e,r,t)),e}function Kr(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return E(e)?Hr(e,r,t):{}}var Gr=/{{(.*)}}/;function Jr(e,r,t,a){if(void 0!==t){var o=Gr.exec(t);if(Gr.lastIndex=0,o){var n=o[1].trim();return new Function("parentFormData","rootFormData","return ".concat(n))(v(e,r,1),e)}return a()}}function Zr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.schema,t=e.uiSchema,a=arguments.length>1?arguments[1]:void 0,o=rt({schema:r,uiSchema:t,containsSpec:!1});return["title","description"].reduce((function(e,r){return o[r]&&(e["ui:".concat(r)]=String(o[r]).replace(/\$index/g,a+1)),e}),{})}function Yr(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.curNodePath,i=void 0===n?"":n,s=e.rootFormData,l=void 0===s?{}:s,u=o["ui:widget"]||t["ui:widget"],c=o["ui:hidden"]||t["ui:hidden"];return"HiddenWidget"===u||"hidden"===u||!!Jr(l,i,c,(function(){return"function"==typeof c?c(v(l,i,1),l):c}))}function Xr(e,r){var a=r.schema,o=void 0===a?{}:a,n=r.uiSchema,i=void 0===n?{}:n,s=o["ui:field"]||i["ui:field"];if("function"==typeof s||"object"===t(s)||"string"==typeof s)return{field:s,fieldProps:i["ui:fieldProps"]||o["ui:fieldProps"]};var l=e[F(o)];if(l)return{field:l};if(!l&&(o.anyOf||o.oneOf))return{field:null};throw new Error("不支持的field类型 ".concat(o.type))}function et(e){var r=e.schema,t=void 0===r?{}:r,o=e.uiSchema,n=void 0===o?{}:o,s=e.curNodePath,l=e.rootFormData,c=void 0===l?{}:l;return Object.assign.apply(Object,[{}].concat(u([t,n].map((function(e){return Object.keys(e).reduce((function(r,t){var o=e[t];return"ui:options"===t&&E(o)?i(i({},r),o):0===t.indexOf("ui:")?i(i({},r),{},a({},t.substring(3),void 0===s?o:Jr(c,s,o,(function(){return o})))):r}),{})})))))}function rt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.containsSpec,s=void 0===n||n,l=e.curNodePath,u=e.rootFormData,c={};return s&&(c.readonly=!!t.readOnly,void 0!==t.multipleOf&&(c.step=t.multipleOf),(t.minimum||0===t.minimum)&&(c.min=t.minimum),(t.maximum||0===t.maximum)&&(c.max=t.maximum),(t.minLength||0===t.minLength)&&(c.minlength=t.minLength),(t.maxLength||0===t.maxLength)&&(c.maxlength=t.maxLength),"date-time"!==t.format&&"date"!==t.format||("array"===t.type?(c.isRange=!0,c.isNumberValue=!(t.items&&"string"===t.items.type)):c.isNumberValue=!("string"===t.type))),i(i({title:t.title,description:t.description},c),et({schema:t,uiSchema:o,curNodePath:l,rootFormData:u}))}function tt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.curNodePath,i=e.rootFormData,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,u=rt({schema:t,uiSchema:o,curNodePath:n,rootFormData:i});!u.widget&&l&&Object.assign(u,l({schema:t,uiSchema:o}));var c=u.widget,d=u.title,m=u.labelWidth,p=u.description,h=u.attrs,f=u.class,v=u.style,g=u.fieldAttrs,y=u.fieldStyle,b=u.fieldClass,P=u.emptyValue,w=u.width,E=u.getWidget,S=u.onChange,x=s(u,["widget","title","labelWidth","description","attrs","class","style","fieldAttrs","fieldStyle","fieldClass","emptyValue","width","getWidget","onChange"]);return{widget:c,label:d,labelWidth:m,description:p,widgetAttrs:h,widgetClass:f,widgetStyle:v,fieldAttrs:g,width:w,fieldStyle:y,fieldClass:b,emptyValue:P,getWidget:E,onChange:S,uiProps:x}}function at(e){var r=e.schema,t=void 0===r?{}:r,o=e.uiSchema,n=void 0===o?{}:o,s=e.errorSchema,l=void 0===s?{}:s;return Object.assign.apply(Object,[{}].concat(u([t,n,l].map((function(e){return Object.keys(e).reduce((function(r,t){var o=e[t];return"err:options"===t&&E(o)?i(i({},r),o):0===t.indexOf("err:")?i(i({},r),{},a({},t.substring(4),o)):r}),{})})))))}function ot(e,r){if(!Array.isArray(r))return e;var t,a=function(e){return e.reduce((function(e,r){return e[r]=!0,e}),{})},o=a(e),n=r.filter((function(e){return"*"===e||o[e]})),i=a(n),s=e.filter((function(e){return!i[e]})),l=n.indexOf("*");if(-1===l){if(s.length)throw new Error("uiSchema order list does not contain ".concat((t=s).length>1?"properties '".concat(t.join("', '"),"'"):"property '".concat(t[0],"'")));return n}if(l!==n.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");var c=u(n);return c.splice.apply(c,[l,1].concat(u(s))),c}function nt(e){return Array.isArray(e.enum)&&1===e.enum.length||e.hasOwnProperty("const")}function it(e){if(Array.isArray(e.enum)&&1===e.enum.length)return e.enum[0];if(e.hasOwnProperty("const"))return e.const;throw new Error("schema cannot be inferred as a constant")}function st(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=Kr(e,r),a=t.oneOf||t.anyOf;return!!Array.isArray(t.enum)||!!Array.isArray(a)&&a.every((function(e){return nt(e)}))}function lt(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every((function(e){return E(e)}))}function ut(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!(!e.uniqueItems||!e.items)&&st(e.items,r)}function ct(e){return e.additionalItems,E(e.additionalItems)}function dt(e,r,t,a){if(e.enum){var o=et({schema:e,uiSchema:r,curNodePath:t,rootFormData:a}).enumNames||e.enumNames;return e.enum.map((function(e,r){return{label:o&&o[r]||String(e),value:e}}))}var n=e.oneOf||e.anyOf,i=r.oneOf||r.anyOf;return n.map((function(e,r){var o=i&&i[r]?et({schema:e,uiSchema:i[r],curNodePath:t,rootFormData:a}):{},n=it(e);return{label:o.title||e.title||String(n),value:n}}))}function mt(e,r,t){if(e)return e;if(r){var a=t.split(".").pop();if(a&&a!=="".concat(Number(a)))return a}return""}var pt=Object.freeze({__proto__:null,replaceArrayIndex:Zr,isHiddenWidget:Yr,getUiField:Xr,getUserUiOptions:et,getUiOptions:rt,getWidgetConfig:tt,getUserErrOptions:at,orderProperties:ot,isConstant:nt,toConstant:it,isSelect:st,isFixedItems:lt,isMultiSelect:ut,allowAdditionalItems:ct,optionsList:dt,fallbackLabel:mt}),ht=gt(),ft=null,vt=null;function gt(){var e=new kr({errorDataPath:"property",allErrors:!0,multipleOfPrecision:8,schemaId:"auto",unknownFormats:"ignore"});return e.addFormat("data-url",/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/),e.addFormat("color",/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/),e}function yt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null===e?[]:e.map((function(e){var r=e.dataPath,t=e.keyword,a=e.message,o=e.params,n=e.schemaPath,i="".concat(r);return{name:t,property:i,message:a,params:o,stack:"".concat(i," ").concat(a).trim(),schemaPath:n}}))}function bt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.transformErrors,o=e.additionalMetaSchemas,n=void 0===o?[]:o,i=e.customFormats,s=void 0===i?{}:i,l=!O(vt,n),c=!O(ft,s);(l||c)&&(ht=gt()),n&&l&&Array.isArray(n)&&(ht.addMetaSchema(n),vt=n),s&&c&&E(s)&&(Object.keys(s).forEach((function(e){ht.addFormat(e,s[e])})),ft=s);var d=null;try{ht.validate(t,r)}catch(e){d=e}qr.getCurrentLocalize()(ht.errors);var m=yt(ht.errors);ht.errors=null;var p=d&&d.message&&"string"==typeof d.message&&d.message.includes("no schema with key or ref ");return p&&(m=[].concat(u(m),[{stack:d.message}])),"function"==typeof a&&(m=a(m)),{errors:m}}function Pt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.uiSchema,o=e.transformErrors,n=e.additionalMetaSchemas,i=void 0===n?[]:n,s=e.customFormats,l=void 0===s?{}:s,u=e.errorSchema,c=void 0===u?{}:u,d=e.required,m=void 0!==d&&d,p=e.propPath,h=void 0===p?"":p,f=e.isOnlyFirstError,v=void 0===f||f,g="array"===t.type&&Array.isArray(r)&&0===r.length,y=void 0===r||g;if(m){if(y){var b={keyword:"required",params:{missingProperty:h}},P=at({schema:t,uiSchema:a,errorSchema:c}).required;return P?b.message=P:qr.getCurrentLocalize()([b]),[b]}}else if(y&&!g)return[];var w=bt({formData:r,schema:t,transformErrors:o,additionalMetaSchemas:i,customFormats:l}).errors;w=w.filter((function(e){return""===e.property&&!e.schemaPath.includes("#/anyOf/")&&!e.schemaPath.includes("#/oneOf/")||"additionalProperties"===e.name}));var E=at({schema:t,uiSchema:a,errorSchema:c});return(v&&w.length>0?[w[0]]:w).reduce((function(e,r){return r.message=void 0!==E[r.name]?E[r.name]:r.message,e.push(r),e}),[])}function wt(e,r){try{return ht.validate(e,r)}catch(e){return!1}}function Et(e,r,t){for(var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=0;n<r.length;n++){var s=Kr(r[n],t,e);if(s.properties){var l=i(i({},t.definitions?{definitions:t.definitions}:{}),{},{anyOf:Object.keys(s.properties).map((function(e){return{required:[e]}}))}),u=void 0;if(s.anyOf){var c=o({},s);c.allOf?c.allOf=c.allOf.slice():c.allOf=[],c.allOf.push(l),u=c}else u=Object.assign({},s,l);if(a||delete u.required,wt(u,e))return n}else if(wt(r[n],e))return n}return 0}var St=Object.freeze({__proto__:null,ajvValidateFormData:bt,validateFormDataAndTransformMsg:Pt,isValid:wt,getMatchingOption:Et});function xt(e,r){if(Array.isArray(r))return Array.isArray(e)||(e=[]),r.map((function(r,t){return e[t]?xt(e[t],r):r}));if(E(r)){var t=Object.assign({},e);return Object.keys(r).reduce((function(t,a){return t[a]=xt(e?e[a]:{},r[a]),t}),t)}return r}function Ft(e,r,t){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],n=E(e)?e:{},i=E(a)?a:{};"allOf"in n&&(n=Qr(n,t,i));var s=r;if(E(s)&&E(n.default))s=x(s,n.default);else if("default"in n)s=n.default;else{if("$ref"in n){var l=R(n.$ref,t);return Ft(l,s,t,i,o)}if(lt(n))s=n.items.map((function(e,a){return Ft(e,Array.isArray(r)?r[a]:void 0,t,i,o)}));else if("oneOf"in n){var u=Kr(n.oneOf[Et(i,n.oneOf,t)],t,i);if(n.properties&&u.properties){var c=x(n,u);delete c.oneOf,n=c}else n=u}else if("anyOf"in n){var d=Kr(n.anyOf[Et(i,n.anyOf,t)],t,i);if(n.properties&&d.properties){var m=x(n,d);delete m.anyOf,n=m}else n=d}}switch(void 0===s&&(s=n.default),F(n)){case"null":return null;case"object":return Object.keys(n.properties||{}).reduce((function(e,r){var a=Ft(n.properties[r],(s||{})[r],t,(i||{})[r],o);return(o||void 0!==a)&&(e[r]=a),e}),{});case"array":if(Array.isArray(s)&&(s=s.map((function(e,r){return Ft(n.items[r]||n.additionalItems||{},e,t,{},o)}))),Array.isArray(a)&&(s=a.map((function(e,r){return Ft(n.items,(s||{})[r],t,e,{},o)}))),n.minItems){if(ut(n,t))return s||[];var p=s?s.length:0;if(n.minItems>p){var h=s||[],f=Array.isArray(n.items)?n.additionalItems:n.items,v=Mr(new Array(n.minItems-p),Ft(f,f.defaults,t,{},o));return h.concat(v)}}s=void 0===s?[]:s}return s}function Ot(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!E(e))throw new Error("Invalid schema: ".concat(e));var o=Kr(e,t,r),n=Ft(o,e.default,t,r,a);return void 0===r?n:E(r)||Array.isArray(r)?xt(n,r):0===r||!1===r||""===r?r:r||n}function _t(e,r){void 0===r&&(r={});var t=r.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}_t('.genFromComponent{font-size:14px;line-height:1;word-wrap:break-word;word-break:break-word;padding:0;margin:0}.genFromComponent a,.genFromComponent h1,.genFromComponent h2,.genFromComponent h3,.genFromComponent li,.genFromComponent p,.genFromComponent ul{font-size:14px}.genFromComponent .genFormIcon{width:12px;height:12px;vertical-align:top}.genFromComponent .genFormBtn{display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;background:#fff;border:1px solid #dcdfe6;color:#606266;-webkit-appearance:none;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;margin:0;-webkit-transition:.1s;transition:.1s;font-weight:500;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;padding:12px 20px;font-size:14px;border-radius:4px}.genFromComponent .genFormBtn.is-plain:focus,.genFromComponent .genFormBtn.is-plain:hover{background:#fff;border-color:#409eff;color:#409eff}.genFromComponent .hiddenWidget{display:none}.genFromComponent .fieldGroupWrap+.fieldGroupWrap .fieldGroupWrap_title{margin-top:20px}.genFromComponent .fieldGroupWrap_title{position:relative;display:block;width:100%;line-height:26px;margin-bottom:8px;font-size:15px;font-weight:700;border:0}.genFromComponent .fieldGroupWrap_des{font-size:12px;line-height:20px;margin-bottom:10px;color:#999}.genFromComponent .genFromWidget_des{padding:0;margin-top:0;margin-bottom:2px;font-size:12px;line-height:20px;color:#999;text-align:left}.genFromComponent .formItemErrorBox{margin:0 auto;color:#ff5757;padding-top:2px;position:absolute;top:100%;left:0;display:-webkit-box!important;line-height:16px;text-overflow:ellipsis;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1;white-space:normal;font-size:12px;text-align:left}.genFromComponent .genFormIcon-qs{fill:#606266;vertical-align:middle;display:inline-block;width:16px;height:16px;margin-left:2px;margin-top:-2px;cursor:pointer}.genFromComponent .genFormItemRequired:before{content:"*";color:#f56c6c;margin-right:4px}.genFromComponent .appendCombining_box{margin-bottom:22px}.genFromComponent .appendCombining_box .appendCombining_box{margin-bottom:10px}.genFromComponent .appendCombining_box{padding:10px;background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .validateWidget{margin-bottom:0!important;width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important;padding:0!important}.genFromComponent .validateWidget .formItemErrorBox{padding:5px 0;position:relative}.genFromComponent .arrayField:not(.genFormItem){margin-bottom:22px}.genFromComponent .arrayField:not(.genFormItem) .arrayField{margin-bottom:10px}.genFromComponent .arrayOrderList{background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .arrayOrderList_item{position:relative;padding:25px 10px 12px;border-radius:2px;margin-bottom:6px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.genFromComponent .arrayOrderList_bottomAddBtn{text-align:right;padding:15px 10px;margin-bottom:10px}.genFromComponent .bottomAddBtn{width:40%;min-width:10px;max-width:180px}.genFromComponent .arrayListItem_content{padding-top:15px;-webkit-box-flex:1;-ms-flex:1;flex:1;margin:0 auto;-webkit-box-shadow:0 -1px 0 0 rgba(0,0,0,.05);box-shadow:0 -1px 0 0 rgba(0,0,0,.05)}.genFromComponent .arrayListItem_index,.genFromComponent .arrayListItem_operateTool{position:absolute;height:25px}.genFromComponent .arrayListItem_index{top:6px;line-height:18px;height:18px;padding:0 6px;background-color:rgba(0,0,0,.28);color:#fff;font-size:12px;border-radius:2px}.genFromComponent .arrayListItem_operateTool{width:75px;right:9px;top:-1px;text-align:right;font-size:0}.genFromComponent .arrayListItem_btn{vertical-align:top;display:inline-block;padding:6px;margin:0;font-size:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none;cursor:pointer;text-align:center;background:transparent;color:#666}.genFromComponent .arrayListItem_btn:hover{opacity:.6}.genFromComponent .arrayListItem_btn[disabled]{color:#999;opacity:.3!important;cursor:not-allowed}.genFromComponent .arrayListItem_orderBtn-bottom,.genFromComponent .arrayListItem_orderBtn-top{background-color:#f0f9eb}.genFromComponent .arrayListItem_btn-delete{background-color:#fef0f0}.genFromComponent .formFooter_item{text-align:right;border-top:1px solid rgba(0,0,0,.08);padding-top:10px}.genFromComponent.formInlineFooter>.fieldGroupWrap{display:inline-block;margin-right:10px}.genFromComponent.formInline .genFormItem{display:inline-block;margin-right:10px;vertical-align:top}.genFromComponent.formInline .validateWidget{margin-right:0}.genFromComponent.formInline .formFooter_item{border-top:none;padding-top:0}.layoutColumn .layoutColumn_w100{width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important}.layoutColumn .fieldGroupWrap_box{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start}.layoutColumn .fieldGroupWrap_box>div{width:100%;-ms-flex-preferred-size:100%;flex-basis:100%}.layoutColumn .fieldGroupWrap_box>.genFormItem{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;-webkit-box-sizing:border-box;box-sizing:border-box;padding-right:10px}.layoutColumn.layoutColumn-1 .fieldGroupWrap_box>.genFormItem{padding-right:0}.layoutColumn.layoutColumn-2 .fieldGroupWrap_box>.genFormItem{width:50%;-ms-flex-preferred-size:50%;flex-basis:50%}.layoutColumn.layoutColumn-3 .fieldGroupWrap_box>.genFormItem{width:33.333%;-ms-flex-preferred-size:33.333%;flex-basis:33.333%}');var Dt={formFooter:{type:Object,default:function(){return{show:!0,okBtn:"保存",cancelBtn:"取消"}}},modelValue:{type:null,default:function(){return{}},required:!0},fallbackLabel:{type:Boolean,default:!1},formProps:{type:Object,default:function(){return{}}},schema:{type:Object,default:function(){return{}},required:!0},uiSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},errorSchema:{type:Object,default:function(){return{}}}},kt={name:"FormFooter",props:{okBtn:{type:String,default:"保存"},cancelBtn:{type:String,default:"取消"},formItemAttrs:{type:Object,default:function(){return{}}},globalOptions:{type:Object,default:function(){return{}}}},emits:["cancel","submit"],setup:function(e,t){var a=t.emit,o=e.globalOptions.COMPONENT_MAP;return function(){return r.h(P(o.formItem),i({class:{formFooter_item:!0}},e.formItemAttrs),{default:function(){return[r.h(P(o.button),{onClick:function(){a("cancel")}},{default:function(){return e.cancelBtn}}),r.h(P(o.button),{style:{marginLeft:"10px"},type:"primary",onClick:function(){a("submit")}},{default:function(){return e.okBtn}})]}})}}},jt={name:"FieldGroupWrap",inject:["genFormProvide"],props:{curNodePath:{type:String,default:""},showTitle:{type:Boolean,default:!0},showDescription:{type:Boolean,default:!0},title:{type:String,default:""},description:{type:String,default:""}},computed:{trueTitle:function(){var e=this.title;if(e)return e;var r=(this.genFormProvide.value||this.genFormProvide).fallbackLabel&&this.curNodePath.split(".").pop();return r!=="".concat(Number(r))?r:""}}},It={class:"fieldGroupWrap"},At={key:0,class:"fieldGroupWrap_title"},Ct={class:"fieldGroupWrap_box"};jt.render=function(e,t,a,o,n,i){return r.openBlock(),r.createBlock("div",It,[a.showTitle&&i.trueTitle?(r.openBlock(),r.createBlock("h3",At,r.toDisplayString(i.trueTitle),1)):r.createCommentVNode("v-if",!0),a.showDescription&&a.description?(r.openBlock(),r.createBlock("p",{key:1,class:"fieldGroupWrap_des",innerHTML:a.description},null,8,["innerHTML"])):r.createCommentVNode("v-if",!0),r.createVNode("div",Ct,[r.renderSlot(e.$slots,"default")])])},jt.__file="utils/components/FieldGroupWrap.vue";var Rt={formProps:{type:null},globalOptions:{type:null},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},customFormats:{type:Object,default:function(){return{}}},rootSchema:{type:Object,default:function(){return{}}},rootFormData:{type:null,default:function(){return{}}},curNodePath:{type:String,default:""},required:{type:Boolean,default:!1},needValidFieldGroup:{type:Boolean,default:!0}},$t={class:"genFormIcon genFormIcon-down",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},Nt=r.createVNode("path",{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"},null,-1);var Lt={render:function(e,t){return r.openBlock(),r.createBlock("svg",$t,[Nt])},__file:"utils/icons/IconCaretDown.vue"},Tt={class:"genFormIcon genFormIcon-up",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},zt=r.createVNode("path",{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"},null,-1);var Vt={render:function(e,t){return r.openBlock(),r.createBlock("svg",Tt,[zt])},__file:"utils/icons/IconCaretUp.vue"},qt={class:"genFormIcon genFormIcon-close",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},Mt=r.createVNode("path",{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1\n 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0\n 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"},null,-1);var Wt={render:function(e,t){return r.openBlock(),r.createBlock("svg",qt,[Mt])},__file:"utils/icons/IconClose.vue"},Bt={class:"genFormIcon genFormIcon-plus",t:"1551322312294",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"10297","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"200",height:"200"},Ut=r.createVNode("path",{d:"M474 152m8 0l60 0q8 0 8 8l0 704q0 8-8 8l-60 0q-8 0-8-8l0-704q0-8 8-8Z","p-id":"10298"},null,-1),Qt=r.createVNode("path",{d:"M168 474m8 0l672 0q8 0 8 8l0 60q0 8-8 8l-672 0q-8 0-8-8l0-60q0-8 8-8Z","p-id":"10299"},null,-1);var Ht={render:function(e,t){return r.openBlock(),r.createBlock("svg",Bt,[Ut,Qt])},__file:"utils/icons/IconPlus.vue"},Kt={class:"genFormIcon genFormIcon-qs",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},Gt=r.createVNode("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 708c-22.1\n 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 0\n 0-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8\n 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6\n 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6\n 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z"},null,-1);var Jt={render:function(e,t){return r.openBlock(),r.createBlock("svg",Kt,[Gt])},__file:"utils/icons/IconQuestion.vue"},Zt={name:"Widget",props:{isFormData:{type:Boolean,default:!0},curValue:{type:null,default:0},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},widget:{type:[String,Function,Object],default:null},required:{type:Boolean,default:!1},emptyValue:{type:null,default:void 0},rootFormData:{type:null},curNodePath:{type:String,default:""},label:{type:String,default:""},width:{type:String,default:""},labelWidth:{type:String,default:""},description:{type:String,default:""},widgetAttrs:{type:Object,default:function(){return{}}},widgetClass:{type:Object,default:function(){return{}}},widgetStyle:{type:Object,default:function(){return{}}},fieldAttrs:{type:Object,default:function(){return{}}},fieldClass:{type:Object,default:function(){return{}}},fieldStyle:{type:Object,default:function(){return{}}},uiProps:{type:Object,default:function(){return{}}},formProps:null,getWidget:null,globalOptions:null,onChange:null},emits:["change"],inheritAttrs:!0,setup:function(e,t){var a=t.emit,o=r.inject("genFormProvide"),n=r.computed({get:function(){return e.isFormData?v(e.rootFormData,e.curNodePath):e.curValue},set:function(r){var t=""===r||null===r?e.emptyValue:r;e.isFormData&&b(e.rootFormData,e.curNodePath,t),a("change",t)}});e.uiProps.enumOptions&&e.uiProps.enumOptions.length>0&&void 0===n.value&&n.value!==e.uiProps.enumOptions[0]&&(e.schema.items?n.value=[]:e.required&&(n.value=e.uiProps.enumOptions[0].value));var s=r.ref(null);return"function"==typeof e.getWidget&&r.watch(s,(function(){e.getWidget.call(null,s.value)})),function(){var t=h(e.curNodePath),a=e.globalOptions.HELPERS.isMiniDes(e.formProps),l=e.description?r.h("div",{innerHTML:e.description,class:{genFromWidget_des:!0}}):null,c=e.globalOptions.COMPONENT_MAP,d=a&&l?r.h(P(c.popover),{style:{margin:"0 2px",fontSize:"16px",cursor:"pointer"},placement:"top",trigger:"hover"},{default:function(){return l},reference:function(){return r.h(Jt)}}):null,m=i(i({},e.fieldStyle),e.width?{width:e.width,flexBasis:e.width,paddingRight:"10px"}:{}),p=mt(e.label,e.widget&&o.value.fallbackLabel,e.curNodePath);return r.h(P(c.formItem),i(i(i({class:i(i({},e.fieldClass),{},{genFormItem:!0}),style:m},e.fieldAttrs),e.labelWidth?{labelWidth:e.labelWidth}:{}),e.isFormData?{prop:t?"__$$root":e.curNodePath,rules:[{validator:function(r,a,o){t&&(a=e.rootFormData);var n=Pt({formData:a,schema:e.schema,uiSchema:e.uiSchema,customFormats:e.customFormats,errorSchema:e.errorSchema,required:e.required,propPath:e.curNodePath});if(n.length>0)return o?o(n[0].message):Promise.reject(n[0].message);var i=e.customRule;return i&&"function"==typeof i?i({field:e.curNodePath,value:a,rootFormData:e.rootFormData,callback:o}):o?o():Promise.resolve()},trigger:"blur"}]}:{}),i(i({error:function(e){return e.error?r.h("div",{class:{formItemErrorBox:!0},title:e.error},[e.error]):null}},p?{label:function(){return r.h("span",{class:{genFormLabel:!0,genFormItemRequired:e.required}},["".concat(p)].concat(u(d?[d]:[]),["".concat(e.formProps&&e.formProps.labelSuffix||"")]))}}:{}),{},{default:function(t){return[].concat(u(!a&&l?[l]:[]),u(e.widget?[r.h(P(e.widget),i(i(i({style:e.widgetStyle,class:e.widgetClass},e.widgetAttrs),e.uiProps),{},{modelValue:n.value,ref:s,"onUpdate:modelValue":function(r){var t=n.value;t!==r&&(n.value=r,e.onChange&&e.onChange({curVal:r,preVal:t,parentFormData:v(e.rootFormData,e.curNodePath,1),rootFormData:e.rootFormData}))}},t))]:[]))}}))}}},Yt={name:"ObjectField",props:Rt,setup:function(e){return function(){var t=e.curNodePath,a=rt({schema:e.schema,uiSchema:e.uiSchema,curNodePath:t,rootFormData:e.rootFormData}),o=a.title,n=a.description,s=a.showTitle,c=a.showDescription,d=a.order,m=a.fieldClass,p=a.fieldAttrs,h=a.fieldStyle,g=a.onlyShowIfDependent,y=ot(Object.keys(e.schema.properties||{}),d).map((function(a){var o=function(r){return Array.isArray(e.schema.required)&&!!~e.schema.required.indexOf(r)}(a),n=function(r){var t=!1,a=!1;return E(e.schema.dependencies)&&(a=Object.entries(e.schema.dependencies).some((function(a){var o=l(a,2),n=o[0],i=o[1],s=!(!Array.isArray(i)||!~i.indexOf(r));return t=t||s,s&&void 0!==v(e.rootFormData,e.curNodePath)[n]}))),{isDependency:t,curDependent:a}}(a),s=n.isDependency,u=n.curDependent;return s&&g&&!u?null:r.h(da,i(i({key:a},e),{},{schema:e.schema.properties[a],uiSchema:e.uiSchema[a],errorSchema:e.errorSchema[a],required:o||u,curNodePath:f(t,a)}))}));return r.h(jt,i({title:o,description:n,showTitle:s,showDescription:c,curNodePath:t,class:i({},m),style:h},p),{default:function(){return[].concat(u(y),u(e.needValidFieldGroup?[r.h(Zt,{key:"validateWidget-object",class:{validateWidget:!0,"validateWidget-object":!0},schema:Object.entries(e.schema).reduce((function(r,t){var a=l(t,2),o=a[0],n=a[1];return!1!==e.schema.additionalProperties&&["properties","id","$id"].includes(o)||(r[o]=n),r}),{}),uiSchema:e.uiSchema,errorSchema:e.errorSchema,curNodePath:t,rootFormData:e.rootFormData,globalOptions:e.globalOptions})]:[]))}})}}},Xt={name:"StringField",props:Rt,setup:function(e,t){var a=t.attrs,o=r.computed((function(){var r=st(e.schema)&&dt(e.schema,e.uiSchema,e.curNodePath,e.rootFormData),t=tt({schema:e.schema,uiSchema:e.uiSchema,curNodePath:e.curNodePath,rootFormData:e.rootFormData},(function(){var t="number"===e.schema.type||"integer"===e.schema.type;return{widget:r?e.globalOptions.WIDGET_MAP.common.select:e.globalOptions.WIDGET_MAP.formats[e.schema.format]||(t?e.globalOptions.WIDGET_MAP.types.number:e.globalOptions.WIDGET_MAP.types.string)}}));return r&&!t.uiProps.enumOptions&&(t.uiProps.enumOptions=r),t}));return function(){return r.h(Zt,i(i(i({},e),a),o.value))}}},ea={name:"NumberField",props:Rt,setup:function(e,t){var a=t.attrs;return function(){return r.h(Xt,i(i({},e),a))}}},ra={name:"IntegerField",props:Rt,setup:function(e,t){var a=t.attrs;return function(){return r.h(Xt,i(i({},e),a))}}},ta={name:"BooleanField",props:Rt,setup:function(e,t){var a=t.attrs;return function(){var t=e.schema,o=e.uiSchema,n=e.curNodePath,s=e.rootFormData,l=e.globalOptions,u=dt({enumNames:t.enumNames||["true","false"],enum:t.enum||[!0,!1]},o,n,s),c=tt({schema:t,uiSchema:o,curNodePath:n,rootFormData:s},(function(){return{widget:l.WIDGET_MAP.types.boolean}}));return c.uiProps.enumOptions=c.uiProps.enumOptions||u,r.h(Zt,i(i(i({},a),e),c))}}},aa={name:"ArrayOrderList",emits:["arrayOperate"],props:{vNodeList:{type:Array,default:[]},tupleItemsLength:{type:Number,default:0},addable:{type:Boolean,default:!0},showIndexNumber:{type:Boolean,default:!1},sortable:{type:Boolean,default:!0},removable:{type:Boolean,default:!0},maxItems:{},minItems:{},globalOptions:null},setup:function(e,t){var a=t.emit,o=r.computed((function(){var r=e.addable,t=e.maxItems,a=e.vNodeList;return!!r&&(void 0===t||a.length<t)})),n=r.computed((function(){var r=e.removable,t=e.minItems,a=e.vNodeList;return!!r&&(void 0===t||a.length>t)}));return function(){return e.vNodeList.length<=0&&!e.addable?null:r.h("div",{class:{arrayOrderList:!0}},e.vNodeList.map((function(t,o){var s=t.key,l=t.vNode,u=e.tupleItemsLength+o,c=o+1;return r.h("div",{key:s,class:{arrayOrderList_item:!0}},[e.showIndexNumber?r.h("div",{class:{arrayListItem_index:!0}},c):null,r.h("div",{class:{arrayListItem_operateTool:!0}},[r.h("button",{style:i({},e.sortable?{}:{display:"none"}),class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-top":!0},type:"button",disabled:!e.sortable||0===o,onClick:function(){a("arrayOperate",{command:"moveUp",data:{index:u}})}},[r.h(Vt)]),r.h("button",{style:i({},e.sortable?{}:{display:"none"}),class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-bottom":!0},type:"button",disabled:!e.sortable||o===e.vNodeList.length-1,onClick:function(){a("arrayOperate",{command:"moveDown",data:{index:u}})}},[r.h(Lt)]),r.h("button",{style:i({},e.removable?{}:{display:"none"}),class:{arrayListItem_btn:!0,"arrayListItem_btn-delete":!0},type:"button",disabled:!n.value,onClick:function(){a("arrayOperate",{command:"remove",data:{index:u}})}},[r.h(Wt)])]),r.h("div",{class:{arrayListItem_content:!0}},[l])])})).concat([r.h("p",{style:i({},o.value?{}:{display:"none"}),class:{arrayOrderList_bottomAddBtn:!0}},[r.h("button",{class:{bottomAddBtn:!0,"is-plain":!0,genFormBtn:!0},type:"button",onClick:function(){a("arrayOperate",{command:"add"})}},[r.h(Ht,{style:{marginRight:"5px"}}),e.maxItems?"( ".concat(e.vNodeList.length," / ").concat(e.maxItems," )"):""])])]))}}},oa={name:"ArrayFieldNormal",props:i(i({},Rt),{},{itemsFormData:{type:Array}}),setup:function(e,t){var a=t.attrs;return function(){var t=e.schema,o=e.uiSchema,n=e.curNodePath,s=e.rootFormData,l=e.itemsFormData,u=e.errorSchema,c=e.globalOptions,d=rt({schema:t,uiSchema:o,curNodePath:n,rootFormData:s}),m=d.title,p=d.description,h=d.addable,v=d.showIndexNumber,g=d.sortable,y=d.removable,b=d.showTitle,P=d.showDescription,w=d.fieldClass,E=d.fieldAttrs,S=d.fieldStyle,x=l.map((function(a,s){var l=Zr({schema:t.items,uiSchema:o.items},s);return{key:a.key,vNode:r.h(da,i(i({key:a.key},e),{},{schema:t.items,required:![].concat(t.items.type).includes("null"),uiSchema:i(i({},o.items),l),errorSchema:u.items,curNodePath:f(n,s)}))}}));return r.h(jt,{title:m,description:p,showTitle:b,showDescription:P,curNodePath:n,class:w,attrs:E,style:S},{default:function(){return r.h(aa,i(i({},a),{},{vNodeList:x,showIndexNumber:v,addable:h,sortable:g,removable:y,maxItems:t.maxItems,minItems:t.minItems,globalOptions:c}))}})}}},na={name:"ArrayFieldMultiSelect",props:i({},Rt),setup:function(e,t){var a=t.attrs;return function(){var t=e.schema,o=e.rootSchema,n=e.uiSchema,s=e.curNodePath,l=e.rootFormData,u=e.globalOptions,c=dt(Kr(t.items,o),n,s,l),d=tt({schema:t,uiSchema:n,curNodePath:s,rootFormData:l},(function(){return{widget:u.WIDGET_MAP.common.checkboxGroup}}));return d.uiProps.multiple=!0,c&&!d.uiProps.enumOptions&&(d.uiProps.enumOptions=c),r.h(Zt,i(i(i({},a),e),d))}}},ia={name:"ArrayFieldTuple",props:i(i({},Rt),{},{itemsFormData:{type:Array,default:function(){return[]}}}),emits:["arrayOperate"],setup:function(e,t){var a=t.emit;t.attrs;return function(){var r=!Array.isArray(e.itemsFormData);if(r||e.itemsFormData.length<e.schema.items.length){var t=Ot(e.schema,void 0,e.rootSchema);a("arrayOperate",r?{command:"setNewTarget",data:{newTarget:t}}:{command:"batchPush",data:{pushArray:t.slice(e.itemsFormData.length)}})}}(),function(){if(!Array.isArray(e.itemsFormData))return null;var t,o,n=e.schema,s=e.uiSchema,l=e.errorSchema,c=e.curNodePath,d=e.globalOptions,m=rt({schema:n,uiSchema:s,curNodePath:c,rootFormData:e.rootFormData}),p=m.title,h=m.description,v=m.addable,g=m.showIndexNumber,y=m.sortable,b=m.removable,P=m.showTitle,w=m.showDescription,E=m.fieldClass,S=m.fieldAttrs,x=m.fieldStyle,F=(t=e.itemsFormData,o=e.schema.items.length-1,t.reduce((function(e,r,t){return e[t>o?1:0].push(r),e}),[[],[]])),O=F[0].map((function(t,a){return r.h(da,i(i({key:t.key},e),{},{required:![].concat(n.items[a].type).includes("null"),schema:n.items[a],uiSchema:s.items?s.items[a]:{},errorSchema:l.items?l.items[a]:{},curNodePath:f(c,a)}))})),_=F[1].map((function(t,a){var o=Zr({schema:n.additionalItems,uiSchema:s.additionalItems},a);return{key:t.key,vNode:r.h(da,i(i({key:t.key},e),{},{schema:n.additionalItems,required:![].concat(n.additionalItems.type).includes("null"),uiSchema:i(i({},s.additionalItems),o),errorSchema:l.additionalItems,curNodePath:f(e.curNodePath,a+n.items.length)}))}})),D=(void 0===v||v)&&ct(e.schema);return r.h(jt,i(i({title:p,description:h,showTitle:P,showDescription:w,curNodePath:c},S),{},{class:E,style:x}),{default:function(){return[].concat(u(O),[r.h(aa,{onArrayOperate:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return a.apply(void 0,["arrayOperate"].concat(r))},vNodeList:_,tupleItemsLength:n.items.length,addable:D,showIndexNumber:g,sortable:y,removable:b,maxItems:n.maxItems,minItems:n.minItems,globalOptions:d})])}})}}},sa={name:"ArrayFieldSpecialFormat",props:Rt,setup:function(e,t){var a=t.attrs,o=e.schema,n=e.uiSchema,s=e.curNodePath,l=e.rootFormData,u=tt({schema:i({"ui:widget":e.globalOptions.WIDGET_MAP.formats[o.format]},o),uiSchema:n,curNodePath:s,rootFormData:l});return function(){return r.h(Zt,i(i(i({},a),e),u))}}},la={name:"ArrayField",props:Rt,setup:function(e){var t=function(){var r=v(e.rootFormData,e.curNodePath);return Array.isArray(r)?r:[]},o=r.ref(t().map((function(){return k()}))),n=r.computed((function(){return t()}));r.watch(n,(function(e,t){e!==t&&r.toRaw(e)!==r.toRaw(t)&&Array.isArray(e)&&(o.value=e.map((function(){return k()})))}),{deep:!0});var s=r.computed((function(){return n.value.map((function(e,r){return{key:o.value[r],value:e}}))})),u=function(r){var t=r.command,a=r.data,i={moveUp:function(e,r){!function(e,r){if(0===r)return!1;var t=[e[r],e[r-1]];e.splice.apply(e,[r-1,2].concat(t))}(e,r.index)},moveDown:function(e,r){!function(e,r){if(r===e.length-1)return!1;var t=e[r],a=[e[r+1],t];e.splice.apply(e,[r,2].concat(a))}(e,r.index)},remove:function(e,r){!function(e,r){e.splice(r,1).length}(e,r.index)},add:function(e,r){var t=r.newRowData;e.push(t)},batchPush:function(e,r){r.pushArray.forEach((function(r){e.push(r)}))},setNewTarget:function(e,r){b(r.formData,r.nodePath,r.newTarget)}}[t];if(!i)throw new Error("错误 - 未知的操作:[".concat(t,"]"));var s,l,u,c=a,d=a;"add"===t?(c={newRowData:(s=e.schema,l=e.rootSchema,u=s.items,lt(s)&&ct(s)&&(u=s.additionalItems),Ot(u,void 0,l))},d={newRowData:k()}):"batchPush"===t?d={pushArray:c.pushArray.map((function(e){return k()}))}:"setNewTarget"===t&&(c={formData:e.rootFormData,nodePath:e.curNodePath,newTarget:c.newTarget},d={formData:o,nodePath:"value",newTarget:c.newTarget.map((function(e){return k()}))}),i.apply(null,[o.value,d]),i.apply(null,[n.value,c])};return function(){var t=e.schema,o=e.uiSchema,n=e.rootSchema,c=e.rootFormData,d=e.curNodePath,m=e.globalOptions;if(!t.hasOwnProperty("items"))throw new Error("[".concat(t,"] 请先定义 items属性"));if(ut(t,n))return r.h(na,i(i({},e),{},{class:a({},I(na.name),!0)}));if(t.format||t["ui:widget"]||o["ui:widget"])return r.h(sa,i(i({},e),{},{class:a({},I(sa.name),!0)}));var p=lt(t)?ia:oa;return r.h("div",[r.h(p,i(i({itemsFormData:s.value},e),{},{onArrayOperate:u,class:a({},I(p.name),!0)})),e.needValidFieldGroup?r.h(Zt,{key:"validateWidget-array",class:{validateWidget:!0,"validateWidget-array":!0},schema:Object.entries(t).reduce((function(e,r){var t=l(r,2),a=t[0],o=t[1];return"items"!==a&&(e[a]=o),e}),{}),uiSchema:o,errorSchema:e.errorSchema,curNodePath:d,rootFormData:c,globalOptions:m}):null])}}},ua={name:"SelectLinkageField",props:i(i({},Rt),{},{combiningType:{type:String,default:"anyOf"},selectList:{type:Array,require:!0}}),setup:function(e){var t,o,n=r.ref((t=v(e.rootFormData,e.curNodePath),0!==(o=Et(t,e.selectList,e.rootSchema,!0))?o:e.curSelectIndex||0)),u=function(){var t=tt({schema:e.schema["".concat(e.combiningType,"Select")]||{},uiSchema:e.uiSchema["".concat(e.combiningType,"Select")]||{},curNodePath:e.curNodePath,rootFormData:e.rootFormData},(function(){return{widget:"SelectWidget"}}));if(t.label=t.label||e.schema.title,t.description=t.description||e.schema.description,!t.uiProps.enumOptions){var o=e.uiSchema[e.combiningType]||[];t.uiProps.enumOptions=e.selectList.map((function(e,r){return{label:rt({schema:e,uiSchema:o[r],containsSpec:!1}).title||"选项 ".concat(r+1),value:r}}))}return r.h(Zt,i(i({key:"fieldSelect_".concat(e.combiningType),class:a({},"fieldSelect_".concat(e.combiningType),!0),isFormData:!1,curValue:n.value,globalOptions:e.globalOptions},t),{},{onChange:function(e){n.value=e}}))};return r.watch(n,(function(r,t){var a=v(e.rootFormData,e.curNodePath),o=Ot(e.selectList[r],void 0,e.rootSchema),n=Object.prototype.hasOwnProperty;if(E(a)){var i=Kr(e.selectList[t],e.rootSchema);if("object"===F(i))for(var s in i.properties)n.call(i.properties,s)&&!n.call(o,s)&&y(a,s)}E(o)?Object.entries(o).forEach((function(e){var r=l(e,2),t=r[0],o=r[1];void 0!==o&&b(a,t,o)})):b(e.rootFormData,e.curNodePath,o||a)})),function(){var t,o=e.curNodePath,l=p(o),c=null;if(("object"===e.schema.type||e.schema.properties)&&!function(e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!1;return!0}(e.schema.properties)){var d,h=Object.assign({},e.schema);delete h[e.combiningType],c=r.h(da,i(i({key:"origin_".concat(e.combiningType),class:(d={},a(d,"".concat(e.combiningType,"_originBox"),!0),a(d,"".concat(l,"-originBox"),!0),d)},e),{},{schema:h}))}var f=[u()],v=e.selectList[n.value];if(v){var g=e.schema,y=e.combiningType,b="".concat(e.combiningType,"Select");g.properties,g[y],g[b];var P=s(g,["properties",y,b].map(m));v=Object.assign({},P,v);var w=j(rt({schema:e.schema,uiSchema:e.uiSchema,containsSpec:!1,curNodePath:o,rootFormData:e.rootFormData}),(function(r){return r===e.combiningType?void 0:"ui:".concat(r)})),E=j(at({schema:e.schema,uiSchema:e.uiSchema,errorSchema:e.errorSchema}),(function(r){return r===e.combiningType?void 0:"err:".concat(r)}));f.push(r.h(da,i(i({key:"appendSchema_".concat(e.combiningType)},e),{},{schema:i({"ui:showTitle":!1,"ui:showDescription":!1},v),required:e.required,uiSchema:i(i({},w),(e.uiSchema[e.combiningType]||[])[n.value]),errorSchema:i(i({},E),(e.errorSchema[e.combiningType]||[])[n.value])})))}return f.push(r.h(Zt,{key:"validateWidget-".concat(e.combiningType),class:a({validateWidget:!0},"validateWidget-".concat(e.combiningType),!0),schema:e.schema,uiSchema:e.uiSchema,errorSchema:e.errorSchema,curNodePath:e.curNodePath,rootFormData:e.rootFormData,globalOptions:e.globalOptions})),r.h("div",[c,r.h("div",{key:"appendBox_".concat(e.combiningType),class:(t={appendCombining_box:!0},a(t,"".concat(e.combiningType,"_appendBox"),!0),a(t,"".concat(l,"-appendBox"),!0),t)},f)])}}},ca={array:la,boolean:ta,integer:ra,number:ea,object:Yt,string:Xt,null:{render:function(){return null}},anyOf:{name:"AnyOfField",setup:function(e,t){var a=t.attrs,o=t.slots;return function(){return r.h(ua,i(i({},a),{},{combiningType:"anyOf",selectList:a.schema.anyOf}),o)}}},oneOf:{name:"oneOfField",setup:function(e,t){var a=t.attrs,o=t.slots;return function(){return r.h(ua,i(i({},a),{},{combiningType:"oneOf",selectList:a.schema.oneOf}),o)}}}},da={name:"SchemaField",props:Rt,setup:function(e){return function(){var t,o=Kr(e.schema,e.rootSchema),n=i(i({},e),{},{schema:o});if(0===Object.keys(o).length)return null;var s,l,u=Xr(ca,n),c=u.field,d=u.fieldProps,m=Yr({schema:o,uiSchema:e.uiSchema,curNodePath:e.curNodePath,rootFormData:e.rootFormData}),h=p(e.curNodePath);return o.anyOf&&o.anyOf.length>0&&!st(o)?r.h(P(ca.anyOf),i({class:(s={},a(s,"".concat(h,"-anyOf"),!0),a(s,"fieldItem",!0),a(s,"anyOfField",!0),s)},n)):o.oneOf&&o.oneOf.length>0&&!st(o)?r.h(P(ca.oneOf),i({class:(l={},a(l,"".concat(h,"-oneOf"),!0),a(l,"fieldItem",!0),a(l,"oneOfField",!0),l)},n)):c&&!m?r.h(P(c),i(i({},n),{},{fieldProps:d,class:(t={},a(t,I(c.name)||c,!0),a(t,"hiddenWidget",m),a(t,"fieldItem",!0),a(t,h,!0),t)})):null}}};var ma=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t.model,n=void 0===o?"value":o;return r.defineComponent({inheritAttrs:!1,setup:function(t,o){var l=o.attrs,u=o.slots;return function(){var t,o=l.modelValue,c=l["onUpdate:modelValue"],d=s(l,["modelValue","onUpdate:modelValue"]);return r.h(P(e),i((a(t={},n,o),a(t,"onUpdate:".concat(n),c),t),d),u)}}})},pa=function(e){return r.defineComponent({inheritAttrs:!1,setup:function(t,a){var o=a.attrs,n=a.slots;return function(){var t=o.isNumberValue,a=o.isRange,l=o.value,u=s(o,["isNumberValue","isRange","value"]),c=t?a?(l||[]).map((function(e){return"number"==typeof e?String(e):e})):"number"==typeof l?String(l):l:l,d=i(i({},o),{},{value:c,"onUpdate:value":function(e){t&&(e=a?e.map((function(e){return+e})):+e),u["onUpdate:value"].call(this,e)}});return r.h(P(e),d,n)}}})},ha=ma({name:"CheckboxesWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}},setup:function(e,t){var a=t.attrs;return function(){return r.h(P("a-checkbox-group"),a,{default:function(){return e.enumOptions.map((function(e,t){return r.h(P("a-checkbox"),{key:t,value:e.value},{default:function(){return e.label}})}))}})}}},{model:"value"}),fa=ma({name:"RadioWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}},setup:function(e,t){var a=t.attrs;return function(){return r.h(P("a-radio-group"),a,{default:function(){return e.enumOptions.map((function(e,t){return r.h(P("a-radio"),{key:t,value:e.value},{default:function(){return e.label}})}))}})}}},{model:"value"}),va=ma({name:"SelectWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}},setup:function(e,t){var a=t.attrs;return function(){return r.h(P("a-select"),i(i({},a.multiple?{mode:"multiple"}:{}),a),{default:function(){return e.enumOptions.map((function(e,t){return r.h(P("a-select-option"),{key:t,value:e.value},{default:function(){return e.label}})}))}})}}},{model:"value"}),ga=ma(pa({name:"DatePickerWidget",inheritAttrs:!1,setup:function(e,t){var a=t.attrs;return function(){var e=a.isNumberValue,t=a.isRange,o=s(a,["isNumberValue","isRange"]);return r.h(P(t?"a-range-picker":"a-date-picker"),i({valueFormat:e?"x":"YYYY-MM-DD"},o))}}}),{model:"value"}),ya=ma(pa({name:"DatePickerWidget",inheritAttrs:!1,setup:function(e,t){var a=t.attrs;return function(){var e=a.isNumberValue,t=a.isRange,o=s(a,["isNumberValue","isRange"]);return r.h(P(t?"a-range-picker":"a-date-picker"),i({valueFormat:e?"x":"YYYY-MM-DDTHH:mm:ssZ",showTime:!0},o))}}}),{model:"value"}),ba={CheckboxesWidget:ha,RadioWidget:fa,SelectWidget:va,TimePickerWidget:ma({name:"TimePickerWidget",inheritAttrs:!1,setup:function(e,t){var a=t.attrs;return function(){return r.h(P("a-time-picker"),i({"value-format":"HH:mm:ss"},a))}}},{model:"value"}),DatePickerWidget:ga,DateTimePickerWidget:ya,UploadWidget:{name:"UploadWidget",props:{modelValue:{default:null,type:[String,Array]},responseFileUrl:{default:function(){return function(e){return e?e.url||e.data&&e.data.url:""}},type:[Function]},btnText:{type:String,default:"点击上传"},slots:{type:null,default:null}},inheritAttrs:!1,setup:function(e,t){var a=t.attrs,o=t.emit,n=e.modelValue,s=Array.isArray(n),l=a.fileList||(s?n.map((function(e,r){return{uid:String(r),status:"done",name:"已上传文件(".concat(r+1,")"),url:e}})):n?[{uid:"1",status:"done",name:"已上传文件",url:n}]:[]),u=r.ref(l),c=function(r){return r&&(r.response&&e.responseFileUrl(r.response)||r.url)||""};return function(){return r.h(P("a-upload"),i(i({},a),{},{fileList:u.value,"onUpdate:fileList":function(e){u.value=e},onChange:function(e){"uploading"!==e.file.status&&function(e){var r;if(s)r=e.length?e.reduce((function(e,r){var t=c(r);return t&&(r.url=t,e.push(t)),e}),[]):[];else{var t=e[e.length-1];r=c(t),t&&r?(t.url=r,u.value=[t]):u.value=[]}o("update:modelValue",r)}(e.fileList),a.onChange&&a.onChange.call(this,e)}}),i({default:function(){return r.h(P("a-button"),{type:"primary"},{default:function(){return e.btnText}})}},e.slots||{}))}}},InputWidget:ma("a-input"),InputNumberWidget:ma("a-input-number"),AutoCompleteWidget:ma("a-auto-complete"),SliderWidget:ma("a-slider"),RateWidget:ma("a-rate"),SwitchWidget:ma("a-switch",{model:"checked"})},Pa=ba.InputWidget,wa=ba.InputNumberWidget,Ea={types:{boolean:ba.SwitchWidget,string:Pa,number:wa,integer:wa},formats:{color:{setup:function(e,t){var a=t.attrs;return function(){return r.h(Pa,i(i({},a),{},{style:i(i({},a.style||{}),{},{maxWidth:"180px"})}),{addonAfter:function(){return r.h(Pa,{disabled:a.disabled,readonly:a.readonly,moduleValue:a.moduleValue,"onUpdate:modelValue":a["onUpdate:modelValue"],type:"color",style:{padding:"0",width:"50px"}})}})}}},time:ba.TimePickerWidget,date:ba.DatePickerWidget,"date-time":ba.DateTimePickerWidget},common:{select:ba.SelectWidget,radioGroup:ba.RadioWidget,checkboxGroup:ba.CheckboxesWidget},widgetComponents:ba};_t(".genFromComponent.ant-form-vertical .ant-form-item-label{line-height:26px;padding-bottom:6px;font-size:14px}.genFromComponent .ant-form-item{margin-bottom:22px}.genFromComponent .ant-form-item.ant-form-item-with-help{margin-bottom:2px}.genFromComponent .ant-form-explain{padding-top:2px;display:-webkit-box!important;text-overflow:ellipsis;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;text-align:left;line-height:1.2;font-size:12px}.genFromComponent .validateWidget .ant-form-explain{padding:5px 0;position:relative}.genFromComponent .ant-form-item-label>label.ant-form-item-no-colon:after{display:none}");var Sa={WIDGET_MAP:Ea,COMPONENT_MAP:{form:r.defineComponent({inheritAttrs:!1,setup:function(e,t){var a=t.attrs,o=t.slots,n={top:{layout:"vertical"},left:{layout:"horizontal",labelAlign:"left"},right:{layout:"horizontal",labelAlign:"right"}},l=r.ref(null);return a.setFormRef&&r.onMounted((function(){l.value.$$validate=function(e){l.value.validate().then((function(r){e(!0,r)})).catch((function(r){e(!1,r.errorFields)}))},a.setFormRef(l.value)})),function(){a.setFormRef;var e=a.labelPosition;a.labelWidth;var t=a.model,u=s(a,["setFormRef","labelPosition","labelWidth","model"]);return r.h(P("a-form"),i(i(i({ref:l,model:t.value},n[e||"top"]),u),{},{colon:!1}),o)}}}),formItem:r.defineComponent({inheritAttrs:!1,setup:function(e,t){var a=t.attrs,o=t.slots,n=r.ref(null);return function(){var e=a.prop,t=a.rules,l=s(a,["prop","rules"]);return r.h(P("a-form-item"),i(i({},l),{},{ref:n,rules:(t||[]).map((function(e){return i(i({},e),{},{validator:function(r,t){return e.validator.apply(this,[r,t])}})})),name:e?e.split("."):e}),i(i({},o),{},{default:function(){return o.default.call(this,{onBlur:function(e){var r=e.target.previousElementSibling;r&&r.classList.contains("genFromWidget_des")&&n.value.onFieldBlur()}})}}))}}}),button:"a-button",popover:r.defineComponent({setup:function(e,t){var a=t.attrs,o=t.slots,n=o.default,i=o.reference;return function(){return r.h(P("a-popover"),{attrs:a},{default:i,content:n})}}})},HELPERS:{isMiniDes:function(e){return e&&(["left","right"].includes(e.labelPosition)||"horizontal"===e.layout)}}},xa=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={name:"VueForm",props:Dt,emits:["update:modelValue","change","cancel","submit","validation-failed","form-mounted"],setup:function(o,n){var u=n.slots,c=n.emit;if(!t.installed&&e.WIDGET_MAP.widgetComponents){var d=r.getCurrentInstance();Object.entries(e.WIDGET_MAP.widgetComponents).forEach((function(e){var r=l(e,2),t=r[0],a=r[1];return d.appContext.app.component(t,a)})),t.installed=!0}r.provide("genFormProvide",r.computed((function(){return{fallbackLabel:o.fallbackLabel}})));var m=r.ref(Ot(o.schema,o.modelValue,o.schema)),p=r.computed((function(){return i({show:!0,okBtn:"保存",cancelBtn:"取消"},o.formFooter)})),h=null,f=function(e,r){c("update:modelValue",e),c("change",{newValue:e,oldValue:r})},v=function(e,r){if(!O(e,r)){var t=Ot(o.schema,o.modelValue,o.schema);O(m.value,t)||(m.value=t)}};r.watch(m,(function(e,r){f(e,r)}),{deep:!0}),r.watch((function(){return o.schema}),(function(e,r){v(e,r)})),r.watch((function(){return o.modelValue}),(function(e,r){v(e,r)})),f(m.value,o.modelValue);return function(){var t,n=o.formProps,l=n.layoutColumn,d=void 0===l?1:l,f=n.inlineFooter,v=n.inline,g=s(n,["layoutColumn","inlineFooter","inline"]),y={schema:o.schema,uiSchema:o.uiSchema,errorSchema:o.errorSchema,customFormats:o.customFormats,customRule:o.customRule,rootSchema:o.schema,rootFormData:m.value,curNodePath:"",globalOptions:e,formProps:i({labelSuffix:":",labelPosition:"top"},g)};return r.h(P(e.COMPONENT_MAP.form),i({class:(t={genFromComponent:!0,formInlineFooter:f,formInline:v},a(t,"genFromComponent_".concat(o.schema.id,"Form"),!!o.schema.id),a(t,"layoutColumn",!v),a(t,"layoutColumn-".concat(d),!v),t),setFormRef:function(e){h=e,c("form-mounted",e)},model:m},y.formProps),{default:function(){return[r.h(da,y),u.default?u.default({formData:m,formRefFn:function(){return h}}):p.value.show?r.h(kt,{globalOptions:e,okBtn:p.value.okBtn,cancelBtn:p.value.cancelBtn,formItemAttrs:p.value.formItemAttrs,onCancel:function(){c("cancel")},onSubmit:function(){(h.$$validate||h.validate)((function(e,r){return e?c("submit",m):c("validation-failed",r)}))}}):[]]}})}},install:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.component(r.name||t.name,t)}};return t}(Sa);e.SchemaField=da,e.default=xa,e.fieldProps=Rt,e.formUtils=pt,e.getDefaultFormState=Ot,e.globalOptions=Sa,e.i18n=qr,e.modelValueComponent=ma,e.schemaValidate=St,e.vueUtils=w,Object.defineProperty(e,"__esModule",{value:!0})})); diff --git a/packages/lib/vue3/vue3-form-element/dist/vue3-form-element.esm.js b/packages/lib/vue3/vue3-form-element/dist/vue3-form-element.esm.js index bfcb9612..7738912a 100644 --- a/packages/lib/vue3/vue3-form-element/dist/vue3-form-element.esm.js +++ b/packages/lib/vue3/vue3-form-element/dist/vue3-form-element.esm.js @@ -10091,7 +10091,12 @@ var Widget = { widgetValue.value = event; if (props.onChange) { - props.onChange(event, preVal); + props.onChange({ + curVal: event, + preVal: preVal, + parentFormData: getPathVal(props.rootFormData, props.curNodePath, 1), + rootFormData: props.rootFormData + }); } } } diff --git a/packages/lib/vue3/vue3-form-element/dist/vue3-form-element.esm.min.js b/packages/lib/vue3/vue3-form-element/dist/vue3-form-element.esm.min.js index f3d9b6a1..ec5e7994 100644 --- a/packages/lib/vue3/vue3-form-element/dist/vue3-form-element.esm.min.js +++ b/packages/lib/vue3/vue3-form-element/dist/vue3-form-element.esm.min.js @@ -1,4 +1,4 @@ /** @license @lljj/vue3-form-element (c) 2020-2021 Liu.Jun License: Apache-2.0 */ import{resolveComponent as e,h as r,openBlock as t,createBlock as a,toDisplayString as o,createCommentVNode as n,createVNode as i,renderSlot as s,inject as l,computed as u,ref as c,watch as d,toRaw as m,getCurrentInstance as p,provide as h,withCtx as f,Fragment as v,renderList as g,createTextVNode as y,defineComponent as b,onMounted as P}from"vue";function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function E(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function S(){return(S=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e}).apply(this,arguments)}function x(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function F(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?x(Object(t),!0).forEach((function(r){E(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):x(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function O(e,r){if(null==e)return{};var t,a,o=function(e,r){if(null==e)return{};var t,a,o={},n=Object.keys(e);for(a=0;a<n.length;a++)t=n[a],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a<n.length;a++)t=n[a],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function _(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],a=!0,o=!1,n=void 0;try{for(var i,s=e[Symbol.iterator]();!(a=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);a=!0);}catch(e){o=!0,n=e}finally{try{a||null==s.return||s.return()}finally{if(o)throw n}}return t}(e,r)||k(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(e){return function(e){if(Array.isArray(e))return j(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||k(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,r){if(e){if("string"==typeof e)return j(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?j(e,r):void 0}}function j(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);t<r;t++)a[t]=e[t];return a}function I(e){var r=function(e,r){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var a=t.call(e,r||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:String(r)}function A(e){return e?"".concat("__pathRoot",".").concat(e).replace(/\./g,"_"):"__pathRoot"}function C(e){return""===e}function R(e,r){return""===e?r:[e,r].join(".")}function $(e,r){for(var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=r.split("."),o=0;o<a.length-t;o+=1){if(void 0===e)return;e=""===a[o]?e:e[a[o]]}return e}function N(e){return e}function L(e,r){delete e[r]}function T(e,r,t){for(var a=r.split("."),o=0;o<a.length;o+=1){if(a.length-o<2){e[a[a.length-1]]=t;break}e=e[a[o]]}}function z(r){return"string"==typeof r?e(r):r}var V=Object.freeze({__proto__:null,deletePathVal:L,setPathVal:T,resolveComponent:z,nodePath2ClassName:A,isRootNodePath:C,computedCurPath:R,getPathVal:$,path2prop:N});function q(e){return"[object Object]"===Object.prototype.toString.call(e)}function M(e){return"[object Arguments]"===Object.prototype.toString.call(e)}function U(e,r){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=Object.assign({},e);return Object.keys(r).reduce((function(a,o){var n=e?e[o]:{},i=r[o];return e&&e.hasOwnProperty(o)&&q(i)?a[o]=U(n,i,t):t&&Array.isArray(n)&&Array.isArray(i)?a[o]=n.concat(i):a[o]=i,a}),a)}function W(e){var r,t=e.type;return!t&&e.const?(r=e.const,Array.isArray(r)?"array":"string"==typeof r?"string":null==r?"null":"boolean"==typeof r?"boolean":isNaN(r)?"object"===w(r)?"object":"string":"number"):!t&&e.enum?"string":!t&&e.items?"array":t||!e.properties&&!e.additionalProperties?t instanceof Array&&2===t.length&&t.includes("null")?t.find((function(e){return"null"!==e})):t:"object"}function Q(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===r)return!0;if("function"==typeof e||"function"==typeof r)return!0;if("object"!==w(e)||"object"!==w(r))return!1;if(null===e||null===r)return!1;if(e instanceof Date&&r instanceof Date)return e.getTime()===r.getTime();if(e instanceof RegExp&&r instanceof RegExp)return e.source===r.source&&e.global===r.global&&e.multiline===r.multiline&&e.lastIndex===r.lastIndex&&e.ignoreCase===r.ignoreCase;if(M(e)||M(r)){if(!M(e)||!M(r))return!1;var o=Array.prototype.slice;return Q(o.call(e),o.call(r),t,a)}if(e.constructor!==r.constructor)return!1;var n=Object.keys(e),i=Object.keys(r);if(0===n.length&&0===i.length)return!0;if(n.length!==i.length)return!1;for(var s,l=t.length;l--;)if(t[l]===e)return a[l]===r;t.push(e),a.push(r),n.sort(),i.sort();for(var u=n.length-1;u>=0;u--)if(n[u]!==i[u])return!1;for(var c=n.length-1;c>=0;c--)if(!Q(e[s=n[c]],r[s],t,a))return!1;return t.pop(),a.pop(),!0}var B,H,K=(B="".concat(+new Date),H=0,function(){var e="".concat(+new Date);return e===B?H+=1:H=0,"".concat(B=e,"x").concat(H)});function G(e,r){return Object.entries(e).reduce((function(e,t){var a=_(t,2),o=a[0],n=a[1],i=r(o,n);return void 0!==i&&(e[i]=n),e}),{})}var J=function(e){return"0".concat(e).substr(-2)};function Z(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)return{year:-1,month:-1,day:-1,hour:r?-1:0,minute:r?-1:0,second:r?-1:0};var t=new Date(e);if(Number.isNaN(t.getTime()))throw new Error("Unable to parse date ".concat(e));return{year:t.getUTCFullYear(),month:J(t.getUTCMonth()+1),day:J(t.getUTCDate()),hour:J(r?t.getUTCHours():0),minute:J(r?t.getUTCMinutes():0),second:J(r?t.getUTCSeconds():0)}}function Y(e){return void 0===e?e:String(e).replace(/^./,(function(e){return e.toLocaleLowerCase()}))}function X(e,r){return e*r/function e(r,t){return 0===t?r:e(t,r%t)}(e,r)}function ee(e,r){for(var t=r.split("/"),a=0;a<t.length;a+=1){if(void 0===e)return;e=""===t[a]?e:e[t[a]]}return e}function re(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e;if(!e.startsWith("#"))throw new Error("Could not find a definition for ".concat(t,"."));var a=ee(r,e=decodeURIComponent(e.substring(1)));if(void 0===a)throw new Error("Could not find a definition for ".concat(t,"."));return a.hasOwnProperty("$ref")?re(a.$ref,r):a}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function te(e,r){return e(r={exports:{}},r.exports),r.exports}function ae(e){return e&&e.default||e}var oe,ne=te((function(e,r){ /** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ -!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var a=r.length-1,o=1;o<a;++o)r[o]=r[o].slice(1,-1);return r[a]=r[a].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function a(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function n(e){var a=r("[0-9]","[A-Fa-f]"),o=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),n="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",i=r("[\\:\\/\\?\\#\\[\\]\\@]",n),s=e?"[\\uE000-\\uF8FF]":"[]",l=r("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t("[A-Za-z]"+r("[A-Za-z]","[0-9]","[\\+\\-\\.]")+"*"),t(t(o+"|"+r(l,n,"[\\:]"))+"*");var u=t(t("25[0-5]")+"|"+t("2[0-4][0-9]")+"|"+t("1[0-9][0-9]")+"|"+t("0?[1-9][0-9]")+"|0?0?[0-9]"),c=t(u+"\\."+u+"\\."+u+"\\."+u),d=t(a+"{1,4}"),m=t(t(d+"\\:"+d)+"|"+c),p=t(t(d+"\\:")+"{6}"+m),h=t("\\:\\:"+t(d+"\\:")+"{5}"+m),f=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+m),v=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+m),g=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+m),y=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+m),b=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+m),P=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),w=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),E=t([p,h,f,v,g,y,b,P,w].join("|")),S=t(t(l+"|"+o)+"+");t("[vV]"+a+"+\\."+r(l,n,"[\\:]")+"+"),t(t(o+"|"+r(l,n))+"*");var x=t(o+"|"+r(l,n,"[\\:\\@]"));return t(t(o+"|"+r(l,n,"[\\@]"))+"+"),t(t(x+"|"+r("[\\/\\?]",s))+"*"),{NOT_SCHEME:new RegExp(r("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,n),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,n),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,n),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,n),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,n,"[\\:\\@\\/\\?]",s),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,n,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,n),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,i),"g"),PCT_ENCODED:new RegExp(o,"g"),IPV4ADDRESS:new RegExp("^("+c+")$"),IPV6ADDRESS:new RegExp("^\\[?("+E+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+S+")")+"?\\]?$")}}var i=n(!1),s=n(!0),l=function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,r){var t=[],a=!0,o=!1,n=void 0;try{for(var i,s=e[Symbol.iterator]();!(a=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);a=!0);}catch(e){o=!0,n=e}finally{try{!a&&s.return&&s.return()}finally{if(o)throw n}}return t}(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")},u=2147483647,c=/^xn--/,d=/[^\0-\x7E]/,m=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,f=String.fromCharCode;function v(e){throw new RangeError(p[e])}function g(e,r){var t=e.split("@"),a="";t.length>1&&(a=t[0]+"@",e=t[1]);var o=function(e,r){for(var t=[],a=e.length;a--;)t[a]=r(e[a]);return t}((e=e.replace(m,".")).split("."),r).join(".");return a+o}function y(e){for(var r=[],t=0,a=e.length;t<a;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<a){var 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}var b=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},P=function(e,r,t){var a=0;for(e=t?h(e/700):e>>1,e+=h(e/r);e>455;a+=36)e=h(e/35);return h(a+36*e/(e+38))},w=function(e){var r,t=[],a=e.length,o=0,n=128,i=72,s=e.lastIndexOf("-");s<0&&(s=0);for(var l=0;l<s;++l)e.charCodeAt(l)>=128&&v("not-basic"),t.push(e.charCodeAt(l));for(var c=s>0?s+1:0;c<a;){for(var d=o,m=1,p=36;;p+=36){c>=a&&v("invalid-input");var f=(r=e.charCodeAt(c++))-48<10?r-22:r-65<26?r-65:r-97<26?r-97:36;(f>=36||f>h((u-o)/m))&&v("overflow"),o+=f*m;var g=p<=i?1:p>=i+26?26:p-i;if(f<g)break;var y=36-g;m>h(u/y)&&v("overflow"),m*=y}var b=t.length+1;i=P(o-d,b,0==d),h(o/b)>u-n&&v("overflow"),n+=h(o/b),o%=b,t.splice(o++,0,n)}return String.fromCodePoint.apply(String,t)},E=function(e){var r=[],t=(e=y(e)).length,a=128,o=0,n=72,i=!0,s=!1,l=void 0;try{for(var c,d=e[Symbol.iterator]();!(i=(c=d.next()).done);i=!0){var m=c.value;m<128&&r.push(f(m))}}catch(e){s=!0,l=e}finally{try{!i&&d.return&&d.return()}finally{if(s)throw l}}var p=r.length,g=p;for(p&&r.push("-");g<t;){var w=u,E=!0,S=!1,x=void 0;try{for(var F,O=e[Symbol.iterator]();!(E=(F=O.next()).done);E=!0){var _=F.value;_>=a&&_<w&&(w=_)}}catch(e){S=!0,x=e}finally{try{!E&&O.return&&O.return()}finally{if(S)throw x}}var D=g+1;w-a>h((u-o)/D)&&v("overflow"),o+=(w-a)*D,a=w;var k=!0,j=!1,I=void 0;try{for(var A,C=e[Symbol.iterator]();!(k=(A=C.next()).done);k=!0){var R=A.value;if(R<a&&++o>u&&v("overflow"),R==a){for(var $=o,N=36;;N+=36){var L=N<=n?1:N>=n+26?26:N-n;if($<L)break;var T=$-L,z=36-L;r.push(f(b(L+T%z,0))),$=h(T/z)}r.push(f(b($,0))),n=P(o,D,g==p),o=0,++g}}}catch(e){j=!0,I=e}finally{try{!k&&C.return&&C.return()}finally{if(j)throw I}}++o,++a}return r.join("")},S=function(e){return g(e,(function(e){return d.test(e)?"xn--"+E(e):e}))},x=function(e){return g(e,(function(e){return c.test(e)?w(e.slice(4).toLowerCase()):e}))},F={};function O(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function _(e){for(var r="",t=0,a=e.length;t<a;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(a-t>=6){var n=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&n)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(a-t>=9){var i=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function D(e,r){function t(e){var t=_(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,O).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,O).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,O).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,O).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,O).replace(r.PCT_ENCODED,o)),e}function k(e){return e.replace(/^0*(.*)/,"$1")||"0"}function j(e,r){var t=e.match(r.IPV4ADDRESS)||[],a=l(t,2)[1];return a?a.split(".").map(k).join("."):e}function I(e,r){var t=e.match(r.IPV6ADDRESS)||[],a=l(t,3),o=a[1],n=a[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),u=s[0],c=s[1],d=c?c.split(":").map(k):[],m=u.split(":").map(k),p=r.IPV4ADDRESS.test(m[m.length-1]),h=p?7:8,f=m.length-h,v=Array(h),g=0;g<h;++g)v[g]=d[g]||m[f+g]||"";p&&(v[h-1]=j(v[h-1],r));var y=v.reduce((function(e,r,t){if(!r||"0"===r){var a=e[e.length-1];a&&a.index+a.length===t?a.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(y&&y.length>1){var P=v.slice(0,y.index),w=v.slice(y.index+y.length);b=P.join(":")+"::"+w.join(":")}else b=v.join(":");return n&&(b+="%"+n),b}return e}var A=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,C=void 0==="".match(/(){0}/)[1];function R(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},a=!1!==r.iri?s:i;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(A);if(o){C?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=I(j(t.host,a),a)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var n=F[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||n&&n.unicodeSupport)D(t,a);else{if(t.host&&(r.domainHost||n&&n.domainHost))try{t.host=S(t.host.replace(a.PCT_ENCODED,_).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}D(t,i)}n&&n.parse&&n.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function $(e,r){var t=!1!==r.iri?s:i,a=[];return void 0!==e.userinfo&&(a.push(e.userinfo),a.push("@")),void 0!==e.host&&a.push(I(j(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(a.push(":"),a.push(String(e.port))),a.length?a.join(""):void 0}var N=/^\.\.?\//,L=/^\/\.(\/|$)/,T=/^\/\.\.(\/|$)/,z=/^\/?(?:.|\n)*?(?=\/|$)/;function V(e){for(var r=[];e.length;)if(e.match(N))e=e.replace(N,"");else if(e.match(L))e=e.replace(L,"/");else if(e.match(T))e=e.replace(T,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(z);if(!t)throw new Error("Unexpected dot segment condition");var a=t[0];e=e.slice(a.length),r.push(a)}return r.join("")}function q(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?s:i,a=[],o=F[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?x(e.host):S(e.host.replace(t.PCT_ENCODED,_).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}D(e,t),"suffix"!==r.reference&&e.scheme&&(a.push(e.scheme),a.push(":"));var n=$(e,r);if(void 0!==n&&("suffix"!==r.reference&&a.push("//"),a.push(n),e.path&&"/"!==e.path.charAt(0)&&a.push("/")),void 0!==e.path){var l=e.path;r.absolutePath||o&&o.absolutePath||(l=V(l)),void 0===n&&(l=l.replace(/^\/\//,"/%2F")),a.push(l)}return void 0!==e.query&&(a.push("?"),a.push(e.query)),void 0!==e.fragment&&(a.push("#"),a.push(e.fragment)),a.join("")}function M(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],o={};return a||(e=R(q(e,t),t),r=R(q(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=V(r.path||""),o.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=V(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=V(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=V(o.path)),o.query=r.query):(o.path=e.path,void 0!==r.query?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function U(e,r){return e&&e.toString().replace(r&&r.iri?s.PCT_ENCODED:i.PCT_ENCODED,_)}var W={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},Q={scheme:"https",domainHost:W.domainHost,parse:W.parse,serialize:W.serialize};function B(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var H={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=B(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(B(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),a=l(t,2),o=a[0],n=a[1];e.path=o&&"/"!==o?o:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}},K={scheme:"wss",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize},G={},J="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Z="[0-9A-Fa-f]",Y=t(t("%[EFef]"+Z+"%"+Z+Z+"%"+Z+Z)+"|"+t("%[89A-Fa-f]"+Z+"%"+Z+Z)+"|"+t("%"+Z+Z)),X=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),ee=new RegExp(J,"g"),re=new RegExp(Y,"g"),te=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',X),"g"),ae=new RegExp(r("[^]",J,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),oe=ae;function ne(e){var r=_(e);return r.match(ee)?r:e}var ie={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,n={},i=t.query.split("&"),s=0,l=i.length;s<l;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var c=u[1].split(","),d=0,m=c.length;d<m;++d)a.push(c[d]);break;case"subject":t.subject=U(u[1],r);break;case"body":t.body=U(u[1],r);break;default:o=!0,n[U(u[0],r)]=U(u[1],r)}}o&&(t.headers=n)}t.query=void 0;for(var p=0,h=a.length;p<h;++p){var f=a[p].split("@");if(f[0]=U(f[0]),r.unicodeSupport)f[1]=U(f[1],r).toLowerCase();else try{f[1]=S(U(f[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}a[p]=f.join("@")}return t},serialize:function(e,r){var t,a=e,n=null!=(t=e.to)?t instanceof Array?t:"number"!=typeof t.length||t.split||t.setInterval||t.call?[t]:Array.prototype.slice.call(t):[];if(n){for(var i=0,s=n.length;i<s;++i){var l=String(n[i]),u=l.lastIndexOf("@"),c=l.slice(0,u).replace(re,ne).replace(re,o).replace(te,O),d=l.slice(u+1);try{d=r.iri?x(d):S(U(d,r).toLowerCase())}catch(e){a.error=a.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=c+"@"+d}a.path=n.join(",")}var m=e.headers=e.headers||{};e.subject&&(m.subject=e.subject),e.body&&(m.body=e.body);var p=[];for(var h in m)m[h]!==G[h]&&p.push(h.replace(re,ne).replace(re,o).replace(ae,O)+"="+m[h].replace(re,ne).replace(re,o).replace(oe,O));return p.length&&(a.query=p.join("&")),a}},se=/^([^\:]+)\:(.*)/,le={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(se),a=e;if(t){var o=r.scheme||a.scheme||"urn",n=t[1].toLowerCase(),i=t[2],s=o+":"+(r.nid||n),l=F[s];a.nid=n,a.nss=i,a.path=void 0,l&&(a=l.parse(a,r))}else a.error=a.error||"URN can not be parsed.";return a},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",a=e.nid,o=t+":"+(r.nid||a),n=F[o];n&&(e=n.serialize(e,r));var i=e,s=e.nss;return i.path=(a||r.nid)+":"+s,i}},ue=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ce={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match(ue)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};F[W.scheme]=W,F[Q.scheme]=Q,F[H.scheme]=H,F[K.scheme]=K,F[ie.scheme]=ie,F[le.scheme]=le,F[ce.scheme]=ce,e.SCHEMES=F,e.pctEncChar=O,e.pctDecChars=_,e.parse=R,e.removeDotSegments=V,e.serialize=q,e.resolveComponents=M,e.resolve=function(e,r,t){var a=function(e,r){var t=e;if(r)for(var a in r)t[a]=r[a];return t}({scheme:"null"},t);return q(M(R(e,a),R(r,a),a,!0),a)},e.normalize=function(e,r){return"string"==typeof e?e=q(R(e,r),r):"object"===a(e)&&(e=R(q(e,r),r)),e},e.equal=function(e,r,t){return"string"==typeof e?e=q(R(e,t),t):"object"===a(e)&&(e=q(e,t)),"string"==typeof r?r=q(R(r,t),t):"object"===a(r)&&(r=q(r,t)),e===r},e.escapeComponent=function(e,r){return e&&e.toString().replace(r&&r.iri?s.ESCAPE:i.ESCAPE,O)},e.unescapeComponent=U,Object.defineProperty(e,"__esModule",{value:!0})}(r)}));(oe=ne)&&oe.__esModule&&Object.prototype.hasOwnProperty.call(oe,"default")&&oe.default;var ie=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 a,o,n;if(Array.isArray(r)){if((a=r.length)!=t.length)return!1;for(o=a;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((a=(n=Object.keys(r)).length)!==Object.keys(t).length)return!1;for(o=a;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,n[o]))return!1;for(o=a;0!=o--;){var i=n[o];if(!e(r[i],t[i]))return!1}return!0}return r!=r&&t!=t},se={copy:function(e,r){for(var t in r=r||{},e)r[t]=e[t];return r},checkDataType:le,checkDataTypes:function(e,r,t){switch(e.length){case 1:return le(e[0],r,t,!0);default:var a="",o=ce(e);for(var n in o.array&&o.object&&(a=o.null?"(":"(!"+r+" || ",a+="typeof "+r+' !== "object")',delete o.null,delete o.array,delete o.object),o.number&&delete o.integer,o)a+=(a?" && ":"")+le(n,r,t,!0);return a}},coerceToTypes:function(e,r){if(Array.isArray(r)){for(var t=[],a=0;a<r.length;a++){var o=r[a];(ue[o]||"array"===e&&"array"===o)&&(t[t.length]=o)}if(t.length)return t}else{if(ue[r])return[r];if("array"===e&&"array"===r)return["array"]}},toHash:ce,getProperty:pe,escapeQuotes:he,equal:ie,ucs2length:function(e){for(var r,t=0,a=e.length,o=0;o<a;)t++,(r=e.charCodeAt(o++))>=55296&&r<=56319&&o<a&&56320==(64512&(r=e.charCodeAt(o)))&&o++;return t},varOccurences:function(e,r){r+="[^0-9]";var t=e.match(new RegExp(r,"g"));return t?t.length:0},varReplace:function(e,r,t){return r+="([^0-9])",t=t.replace(/\$/g,"$$$$"),e.replace(new RegExp(r,"g"),t+"$1")},schemaHasRules:function(e,r){if("boolean"==typeof e)return!e;for(var t in e)if(r[t])return!0},schemaHasRulesExcept:function(e,r,t){if("boolean"==typeof e)return!e&&"not"!=t;for(var a in e)if(a!=t&&r[a])return!0},schemaUnknownRules:function(e,r){if("boolean"==typeof e)return;for(var t in e)if(!r[t])return t},toQuotedString:fe,getPathExpr:function(e,r,t,a){return ye(e,t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'")},getPath:function(e,r,t){var a=fe(t?"/"+be(r):pe(r));return ye(e,a)},getData:function(e,r,t){var a,o,n,i;if(""===e)return"rootData";if("/"==e[0]){if(!ve.test(e))throw new Error("Invalid JSON-pointer: "+e);o=e,n="rootData"}else{if(!(i=e.match(ge)))throw new Error("Invalid JSON-pointer: "+e);if(a=+i[1],"#"==(o=i[2])){if(a>=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(n="data"+(r-a||""),!o)return n}for(var s=n,l=o.split("/"),u=0;u<l.length;u++){var c=l[u];c&&(n+=pe(Pe(c)),s+=" && "+n)}return s},unescapeFragment:function(e){return Pe(decodeURIComponent(e))},unescapeJsonPointer:Pe,escapeFragment:function(e){return encodeURIComponent(be(e))},escapeJsonPointer:be};function le(e,r,t,a){var o=a?" !== ":" === ",n=a?" || ":" && ",i=a?"!":"",s=a?"":"!";switch(e){case"null":return r+o+"null";case"array":return i+"Array.isArray("+r+")";case"object":return"("+i+r+n+"typeof "+r+o+'"object"'+n+s+"Array.isArray("+r+"))";case"integer":return"(typeof "+r+o+'"number"'+n+s+"("+r+" % 1)"+n+r+o+r+(t?n+i+"isFinite("+r+")":"")+")";case"number":return"(typeof "+r+o+'"'+e+'"'+(t?n+i+"isFinite("+r+")":"")+")";default:return"typeof "+r+o+'"'+e+'"'}}var ue=ce(["string","number","integer","boolean","null"]);function ce(e){for(var r={},t=0;t<e.length;t++)r[e[t]]=!0;return r}var de=/^[a-z$_][a-z$_0-9]*$/i,me=/'|\\/g;function pe(e){return"number"==typeof e?"["+e+"]":de.test(e)?"."+e:"['"+he(e)+"']"}function he(e){return e.replace(me,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function fe(e){return"'"+he(e)+"'"}var ve=/^\/(?:[^~]|~0|~1)*$/,ge=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ye(e,r){return'""'==e?r:(e+" + "+r).replace(/([^\\])' \+ '/g,"$1")}function be(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Pe(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}var we=function(e){se.copy(e,this)};var Ee=te((function(e){var r=e.exports=function(e,t,a){"function"==typeof t&&(a=t,t={}),function e(t,a,o,n,i,s,l,u,c,d){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var m in a(n,i,s,l,u,c,d),n){var p=n[m];if(Array.isArray(p)){if(m in r.arrayKeywords)for(var h=0;h<p.length;h++)e(t,a,o,p[h],i+"/"+m+"/"+h,s,i,m,n,h)}else if(m in r.propsKeywords){if(p&&"object"==typeof p)for(var f in p)e(t,a,o,p[f],i+"/"+m+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),s,i,m,n,f)}else(m in r.keywords||t.allKeys&&!(m in r.skipKeywords))&&e(t,a,o,p,i+"/"+m,s,i,m,n)}o(n,i,s,l,u,c,d)}}(t,"function"==typeof(a=t.cb||a)?a:a.pre||function(){},a.post||function(){},e,"",e)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}})),Se=xe;function xe(e,r,t){var a=this._refs[t];if("string"==typeof a){if(!this._refs[a])return xe.call(this,e,r,a);a=this._refs[a]}if((a=a||this._schemas[t])instanceof we)return je(a.schema,this._opts.inlineRefs)?a.schema:a.validate||this._compile(a);var o,n,i,s=Fe.call(this,r,t);return s&&(o=s.schema,r=s.root,i=s.baseId),o instanceof we?n=o.validate||e.call(this,o.schema,r,void 0,i):void 0!==o&&(n=je(o,this._opts.inlineRefs)?o:e.call(this,o,r,void 0,i)),n}function Fe(e,r){var t=ne.parse(r),a=Ae(t),o=Ie(this._getId(e.schema));if(0===Object.keys(e.schema).length||a!==o){var n=Re(a),i=this._refs[n];if("string"==typeof i)return Oe.call(this,e,i,t);if(i instanceof we)i.validate||this._compile(i),e=i;else{if(!((i=this._schemas[n])instanceof we))return;if(i.validate||this._compile(i),n==Re(r))return{schema:i,root:e,baseId:o};e=i}if(!e.schema)return;o=Ie(this._getId(e.schema))}return De.call(this,t,o,e.schema,e)}function Oe(e,r,t){var a=Fe.call(this,e,r);if(a){var o=a.schema,n=a.baseId;e=a.root;var i=this._getId(o);return i&&(n=$e(n,i)),De.call(this,t,n,o,e)}}xe.normalizeId=Re,xe.fullPath=Ie,xe.url=$e,xe.ids=function(e){var r=Re(this._getId(e)),t={"":r},a={"":Ie(r,!1)},o={},n=this;return Ee(e,{allKeys:!0},(function(e,r,i,s,l,u,c){if(""!==r){var d=n._getId(e),m=t[s],p=a[s]+"/"+l;if(void 0!==c&&(p+="/"+("number"==typeof c?c:se.escapeFragment(c))),"string"==typeof d){d=m=Re(m?ne.resolve(m,d):d);var h=n._refs[d];if("string"==typeof h&&(h=n._refs[h]),h&&h.schema){if(!ie(e,h.schema))throw new Error('id "'+d+'" resolves to more than one schema')}else if(d!=Re(p))if("#"==d[0]){if(o[d]&&!ie(e,o[d]))throw new Error('id "'+d+'" resolves to more than one schema');o[d]=e}else n._refs[d]=p}t[r]=m,a[r]=p}})),o},xe.inlineRef=je,xe.schema=Fe;var _e=se.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function De(e,r,t,a){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var o=e.fragment.split("/"),n=1;n<o.length;n++){var i=o[n];if(i){if(void 0===(t=t[i=se.unescapeFragment(i)]))break;var s;if(!_e[i]&&((s=this._getId(t))&&(r=$e(r,s)),t.$ref)){var l=$e(r,t.$ref),u=Fe.call(this,a,l);u&&(t=u.schema,a=u.root,r=u.baseId)}}}return void 0!==t&&t!==a.schema?{schema:t,root:a,baseId:r}:void 0}}var ke=se.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function je(e,r){return!1!==r&&(void 0===r||!0===r?function e(r){var t;if(Array.isArray(r)){for(var a=0;a<r.length;a++)if("object"==typeof(t=r[a])&&!e(t))return!1}else for(var o in r){if("$ref"==o)return!1;if("object"==typeof(t=r[o])&&!e(t))return!1}return!0}(e):r?function e(r){var t,a=0;if(Array.isArray(r)){for(var o=0;o<r.length;o++)if("object"==typeof(t=r[o])&&(a+=e(t)),a==1/0)return 1/0}else for(var n in r){if("$ref"==n)return 1/0;if(ke[n])a++;else if("object"==typeof(t=r[n])&&(a+=e(t)+1),a==1/0)return 1/0}return a}(e)<=r:void 0)}function Ie(e,r){return!1!==r&&(e=Re(e)),Ae(ne.parse(e))}function Ae(e){return ne.serialize(e).split("#")[0]+"#"}var Ce=/#\/?$/;function Re(e){return e?e.replace(Ce,""):""}function $e(e,r){return r=Re(r),ne.resolve(e,r)}var Ne={Validation:Te((function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:Te(Le)};function Le(e,r,t){this.message=t||Le.message(e,r),this.missingRef=Se.url(e,r),this.missingSchema=Se.normalizeId(Se.fullPath(this.missingRef))}function Te(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}Le.message=function(e,r){return"can't resolve reference "+r+" from id "+e};var ze=function(e,r){r||(r={}),"function"==typeof r&&(r={cmp:r});var t="boolean"==typeof r.cycles&&r.cycles,a=r.cmp&&function(e){return function(r){return function(t,a){var o={key:t,value:r[t]},n={key:a,value:r[a]};return e(o,n)}}}(r.cmp),o=[];return function e(r){if(r&&r.toJSON&&"function"==typeof r.toJSON&&(r=r.toJSON()),void 0!==r){if("number"==typeof r)return isFinite(r)?""+r:"null";if("object"!=typeof r)return JSON.stringify(r);var n,i;if(Array.isArray(r)){for(i="[",n=0;n<r.length;n++)n&&(i+=","),i+=e(r[n])||"null";return i+"]"}if(null===r)return"null";if(-1!==o.indexOf(r)){if(t)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=o.push(r)-1,l=Object.keys(r).sort(a&&a(r));for(i="",n=0;n<l.length;n++){var u=l[n],c=e(r[u]);c&&(i&&(i+=","),i+=JSON.stringify(u)+":"+c)}return o.splice(s,1),"{"+i+"}"}}(e)},Ve=function(e,r,t){var a="",o=!0===e.schema.$async,n=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),i=e.self._getId(e.schema);if(e.opts.strictKeywords){var s=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(s){var l="unknown keyword: "+s;if("log"!==e.opts.strictKeywords)throw new Error(l);e.logger.warn(l)}}if(e.isTop&&(a+=" var validate = ",o&&(e.async=!0,a+="async "),a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",i&&(e.opts.sourceCode||e.opts.processCode)&&(a+=" /*# sourceURL="+i+" */ ")),"boolean"==typeof e.schema||!n&&!e.schema.$ref){var u=e.level,c=e.dataLevel,d=e.schema["false schema"],m=e.schemaPath+e.util.getProperty("false schema"),p=e.errSchemaPath+"/false schema",h=!e.opts.allErrors,f="data"+(c||""),v="valid"+u;if(!1===e.schema){e.isTop?h=!0:a+=" var "+v+" = false; ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'boolean schema is false' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";var g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?a+=o?" return data; ":" validate.errors = null; return true; ":a+=" var "+v+" = true; ";return e.isTop&&(a+=" }; return validate; "),a}if(e.isTop){var y=e.isTop;u=e.level=0,c=e.dataLevel=0,f="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var b="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}a+=" var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data; "}else{u=e.level,f="data"+((c=e.dataLevel)||"");if(i&&(e.baseId=e.resolve.url(e.baseId,i)),o&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+u+" = errors;"}v="valid"+u,h=!e.opts.allErrors;var P="",w="",E=e.schema.type,S=Array.isArray(E);if(E&&e.opts.nullable&&!0===e.schema.nullable&&(S?-1==E.indexOf("null")&&(E=E.concat("null")):"null"!=E&&(E=[E,"null"],S=!0)),S&&1==E.length&&(E=E[0],S=!1),e.schema.$ref&&n){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(n=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(a+=" "+e.RULES.all.$comment.code(e,"$comment")),E){if(e.opts.coerceTypes)var x=e.util.coerceToTypes(e.opts.coerceTypes,E);var F=e.RULES.types[E];if(x||S||!0===F||F&&!Z(F)){m=e.schemaPath+".type",p=e.errSchemaPath+"/type",m=e.schemaPath+".type",p=e.errSchemaPath+"/type";var O=S?"checkDataTypes":"checkDataType";if(a+=" if ("+e.util[O](E,f,e.opts.strictNumbers,!0)+") { ",x){var _="dataType"+u,D="coerced"+u;a+=" var "+_+" = typeof "+f+"; var "+D+" = undefined; ","array"==e.opts.coerceTypes&&(a+=" if ("+_+" == 'object' && Array.isArray("+f+") && "+f+".length == 1) { "+f+" = "+f+"[0]; "+_+" = typeof "+f+"; if ("+e.util.checkDataType(e.schema.type,f,e.opts.strictNumbers)+") "+D+" = "+f+"; } "),a+=" if ("+D+" !== undefined) ; ";var k=x;if(k)for(var j,I=-1,A=k.length-1;I<A;)"string"==(j=k[I+=1])?a+=" else if ("+_+" == 'number' || "+_+" == 'boolean') "+D+" = '' + "+f+"; else if ("+f+" === null) "+D+" = ''; ":"number"==j||"integer"==j?(a+=" else if ("+_+" == 'boolean' || "+f+" === null || ("+_+" == 'string' && "+f+" && "+f+" == +"+f+" ","integer"==j&&(a+=" && !("+f+" % 1)"),a+=")) "+D+" = +"+f+"; "):"boolean"==j?a+=" else if ("+f+" === 'false' || "+f+" === 0 || "+f+" === null) "+D+" = false; else if ("+f+" === 'true' || "+f+" === 1) "+D+" = true; ":"null"==j?a+=" else if ("+f+" === '' || "+f+" === 0 || "+f+" === false) "+D+" = null; ":"array"==e.opts.coerceTypes&&"array"==j&&(a+=" else if ("+_+" == 'string' || "+_+" == 'number' || "+_+" == 'boolean' || "+f+" == null) "+D+" = ["+f+"]; ");a+=" else { ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } if ("+D+" !== undefined) { ";var C=c?"data"+(c-1||""):"parentData";a+=" "+f+" = "+D+"; ",c||(a+="if ("+C+" !== undefined)"),a+=" "+C+"["+(c?e.dataPathArr[c]:"parentDataProperty")+"] = "+D+"; } "}else{(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } "}}if(e.schema.$ref&&!n)a+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",h&&(a+=" } if (errors === ",a+=y?"0":"errs_"+u,a+=") { ",w+="}");else{var R=e.RULES;if(R)for(var $=-1,N=R.length-1;$<N;)if(Z(F=R[$+=1])){if(F.type&&(a+=" if ("+e.util.checkDataType(F.type,f,e.opts.strictNumbers)+") { "),e.opts.useDefaults)if("object"==F.type&&e.schema.properties){d=e.schema.properties;var L=Object.keys(d);if(L)for(var T,z=-1,V=L.length-1;z<V;){if(void 0!==(U=d[T=L[z+=1]]).default){var q=f+e.util.getProperty(T);if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+q;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+q+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+q+" === null || "+q+" === '' "),a+=" ) "+q+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(U.default)+" ":a+=" "+JSON.stringify(U.default)+" ",a+="; "}}}else if("array"==F.type&&Array.isArray(e.schema.items)){var M=e.schema.items;if(M){I=-1;for(var U,W=M.length-1;I<W;)if(void 0!==(U=M[I+=1]).default){q=f+"["+I+"]";if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+q;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+q+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+q+" === null || "+q+" === '' "),a+=" ) "+q+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(U.default)+" ":a+=" "+JSON.stringify(U.default)+" ",a+="; "}}}var Q=F.rules;if(Q)for(var B,H=-1,K=Q.length-1;H<K;)if(Y(B=Q[H+=1])){var G=B.code(e,B.keyword,F.type);G&&(a+=" "+G+" ",h&&(P+="}"))}if(h&&(a+=" "+P+" ",P=""),F.type&&(a+=" } ",E&&E===F.type&&!x)){a+=" else { ";var J;m=e.schemaPath+".type",p=e.errSchemaPath+"/type";(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}h&&(a+=" if (errors === ",a+=y?"0":"errs_"+u,a+=") { ",w+="}")}}function Z(e){for(var r=e.rules,t=0;t<r.length;t++)if(Y(r[t]))return!0}function Y(r){return void 0!==e.schema[r.keyword]||r.implements&&function(r){for(var t=r.implements,a=0;a<t.length;a++)if(void 0!==e.schema[t[a]])return!0}(r)}return h&&(a+=" "+w+" "),y?(o?(a+=" if (errors === 0) return data; ",a+=" else throw new ValidationError(vErrors); "):(a+=" validate.errors = vErrors; ",a+=" return errors === 0; "),a+=" }; return validate;"):a+=" var "+v+" = errors === errs_"+u+";",a},qe=se.ucs2length,Me=Ne.Validation,Ue=function e(r,t,a,o){var n=this,i=this._opts,s=[void 0],l={},u=[],c={},d=[],m={},p=[];t=t||{schema:r,refVal:s,refs:l};var h=We.call(this,r,t,o),f=this._compilations[h.index];if(h.compiling)return f.callValidate=function e(){var r=f.validate,t=r.apply(this,arguments);return e.errors=r.errors,t};var v=this._formats,g=this.RULES;try{var y=P(r,t,a,o);f.validate=y;var b=f.callValidate;return b&&(b.schema=y.schema,b.errors=null,b.refs=y.refs,b.refVal=y.refVal,b.root=y.root,b.$async=y.$async,i.sourceCode&&(b.source=y.source)),y}finally{Qe.call(this,r,t,o)}function P(r,a,o,c){var m=!a||a&&a.schema==r;if(a.schema!=t.schema)return e.call(n,r,a,o,c);var h,f=!0===r.$async,y=Ve({isTop:!0,schema:r,isRoot:m,baseId:c,root:a,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:Ne.MissingRef,RULES:g,validate:Ve,util:se,resolve:Se,resolveRef:w,usePattern:x,useDefault:F,useCustomRule:O,opts:i,formats:v,logger:n.logger,self:n});y=Ze(s,Ge)+Ze(u,He)+Ze(d,Ke)+Ze(p,Je)+y,i.processCode&&(y=i.processCode(y,r));try{h=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",y)(n,g,v,t,s,d,p,ie,qe,Me),s[0]=h}catch(e){throw n.logger.error("Error compiling schema, function code:",y),e}return h.schema=r,h.errors=null,h.refs=l,h.refVal=s,h.root=m?h:a,f&&(h.$async=!0),!0===i.sourceCode&&(h.source={code:y,patterns:u,defaults:d}),h}function w(r,o,u){o=Se.url(r,o);var c,d,m=l[o];if(void 0!==m)return S(c=s[m],d="refVal["+m+"]");if(!u&&t.refs){var p=t.refs[o];if(void 0!==p)return S(c=t.refVal[p],d=E(o,c))}d=E(o);var h=Se.call(n,P,t,o);if(void 0===h){var f=a&&a[o];f&&(h=Se.inlineRef(f,i.inlineRefs)?f:e.call(n,f,t,a,r))}if(void 0!==h)return function(e,r){var t=l[e];s[t]=r}(o,h),S(h,d);!function(e){delete l[e]}(o)}function E(e,r){var t=s.length;return s[t]=r,l[e]=t,"refVal"+t}function S(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}function x(e){var r=c[e];return void 0===r&&(r=c[e]=u.length,u[r]=e),"pattern"+r}function F(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return se.toQuotedString(e);case"object":if(null===e)return"null";var r=ze(e),t=m[r];return void 0===t&&(t=m[r]=d.length,d[t]=e),"default"+t}}function O(e,r,t,a){if(!1!==n._opts.validateSchema){var o=e.definition.dependencies;if(o&&!o.every((function(e){return Object.prototype.hasOwnProperty.call(t,e)})))throw new Error("parent schema must have all required keywords: "+o.join(","));var s=e.definition.validateSchema;if(s)if(!s(r)){var l="keyword schema is invalid: "+n.errorsText(s.errors);if("log"!=n._opts.validateSchema)throw new Error(l);n.logger.error(l)}}var u,c=e.definition.compile,d=e.definition.inline,m=e.definition.macro;if(c)u=c.call(n,r,t,a);else if(m)u=m.call(n,r,t,a),!1!==i.validateSchema&&n.validateSchema(u,!0);else if(d)u=d.call(n,a,e.keyword,r,t);else if(!(u=e.definition.validate))return;if(void 0===u)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var h=p.length;return p[h]=u,{code:"customRule"+h,validate:u}}};function We(e,r,t){var a=Be.call(this,e,r,t);return a>=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}function Qe(e,r,t){var a=Be.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}function Be(e,r,t){for(var a=0;a<this._compilations.length;a++){var o=this._compilations[a];if(o.schema==e&&o.root==r&&o.baseId==t)return a}return-1}function He(e,r){return"var pattern"+e+" = new RegExp("+se.toQuotedString(r[e])+");"}function Ke(e){return"var default"+e+" = defaults["+e+"];"}function Ge(e,r){return void 0===r[e]?"":"var refVal"+e+" = refVal["+e+"];"}function Je(e){return"var customRule"+e+" = customRules["+e+"];"}function Ze(e,r){if(!e.length)return"";for(var t="",a=0;a<e.length;a++)t+=r(a,e);return t}var Ye=te((function(e){var r=e.exports=function(){this._cache={}};r.prototype.put=function(e,r){this._cache[e]=r},r.prototype.get=function(e){return this._cache[e]},r.prototype.del=function(e){delete this._cache[e]},r.prototype.clear=function(){this._cache={}}})),Xe=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,er=[0,31,28,31,30,31,30,31,31,30,31,30,31],rr=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,tr=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ar=/^(?:[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,or=/^(?:(?:[^\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,nr=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,ir=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,sr=/^(?:\/(?:[^~/]|~0|~1)*)*$/,lr=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,ur=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,cr=dr;function dr(e){return e="full"==e?"full":"fast",se.copy(dr[e])}function mr(e){var r=e.match(Xe);if(!r)return!1;var t=+r[1],a=+r[2],o=+r[3];return a>=1&&a<=12&&o>=1&&o<=(2==a&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(t)?29:er[a])}function pr(e,r){var t=e.match(rr);if(!t)return!1;var a=t[1],o=t[2],n=t[3],i=t[5];return(a<=23&&o<=59&&n<=59||23==a&&59==o&&60==n)&&(!r||i)}dr.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":or,url:nr,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:tr,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:gr,uuid:ir,"json-pointer":sr,"json-pointer-uri-fragment":lr,"relative-json-pointer":ur},dr.full={date:mr,time:pr,"date-time":function(e){var r=e.split(hr);return 2==r.length&&mr(r[0])&&pr(r[1],!0)},uri:function(e){return fr.test(e)&&ar.test(e)},"uri-reference":/^(?:[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,"uri-template":or,url:nr,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:tr,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:gr,uuid:ir,"json-pointer":sr,"json-pointer-uri-fragment":lr,"relative-json-pointer":ur};var hr=/t|\s/i;var fr=/\/|:/;var vr=/[^\\]\\Z/;function gr(e){if(vr.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var yr=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s;var p="maximum"==r,h=p?"exclusiveMaximum":"exclusiveMinimum",f=e.schema[h],v=e.opts.$data&&f&&f.$data,g=p?"<":">",y=p?">":"<",b=void 0;if(!m&&"number"!=typeof s&&void 0!==s)throw new Error(r+" must be number");if(!v&&void 0!==f&&"number"!=typeof f&&"boolean"!=typeof f)throw new Error(h+" must be number or boolean");if(v){var P=e.util.getData(f.$data,i,e.dataPathArr),w="exclusive"+n,E="exclType"+n,S="exclIsNumber"+n,x="' + "+(_="op"+n)+" + '";o+=" var schemaExcl"+n+" = "+P+"; ",o+=" var "+w+"; var "+E+" = typeof "+(P="schemaExcl"+n)+"; if ("+E+" != 'boolean' && "+E+" != 'undefined' && "+E+" != 'number') { ";var F;b=h;(F=F||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(o+=" , message: '"+h+" should be boolean' "),e.opts.verbose&&(o+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var O=o;o=F.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+E+" == 'number' ? ( ("+w+" = "+a+" === undefined || "+P+" "+g+"= "+a+") ? "+d+" "+y+"= "+P+" : "+d+" "+y+" "+a+" ) : ( ("+w+" = "+P+" === true) ? "+d+" "+y+"= "+a+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { var op"+n+" = "+w+" ? '"+g+"' : '"+g+"='; ",void 0===s&&(b=h,u=e.errSchemaPath+"/"+h,a=P,m=v)}else{x=g;if((S="number"==typeof f)&&m){var _="'"+x+"'";o+=" if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" ( "+a+" === undefined || "+f+" "+g+"= "+a+" ? "+d+" "+y+"= "+f+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { "}else{S&&void 0===s?(w=!0,b=h,u=e.errSchemaPath+"/"+h,a=f,y+="="):(S&&(a=Math[p?"min":"max"](f,s)),f===(!S||a)?(w=!0,b=h,u=e.errSchemaPath+"/"+h,y+="="):(w=!1,x+="="));_="'"+x+"'";o+=" if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+" "+y+" "+a+" || "+d+" !== "+d+") { "}}b=b||r,(F=F||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+_+", limit: "+a+", exclusive: "+w+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be "+x+" ",o+=m?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";O=o;return o=F.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",c&&(o+=" else { "),o},br=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+".length "+("maxItems"==r?">":"<")+" "+a+") { ";var p=r,h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxItems"==r?"more":"fewer",o+=" than ",o+=m?"' + "+a+" + '":""+s,o+=" items' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=h.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},Pr=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");var p="maxLength"==r?">":"<";o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),!1===e.opts.unicode?o+=" "+d+".length ":o+=" ucs2length("+d+") ",o+=" "+p+" "+a+") { ";var h=r,f=f||[];f.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(h||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT be ",o+="maxLength"==r?"longer":"shorter",o+=" than ",o+=m?"' + "+a+" + '":""+s,o+=" characters' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var v=o;return o=f.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+v+"]); ":o+=" validate.errors = ["+v+"]; return false; ":o+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},wr=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" Object.keys("+d+").length "+("maxProperties"==r?">":"<")+" "+a+") { ";var p=r,h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxProperties"==r?"more":"fewer",o+=" than ",o+=m?"' + "+a+" + '":""+s,o+=" properties' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=h.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},Er={$ref:function(e,r,t){var a,o,n=" ",i=e.level,s=e.dataLevel,l=e.schema[r],u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(s||""),m="valid"+i;if("#"==l||"#/"==l)e.isRoot?(a=e.async,o="validate"):(a=!0===e.root.schema.$async,o="root.refVal[0]");else{var p=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===p){var h=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(h),(y=y||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(n+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(n+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ";var f=n;n=y.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+f+"]); ":n+=" validate.errors = ["+f+"]; return false; ":n+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(n+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,l,h);e.logger.warn(h),c&&(n+=" if (true) { ")}}else if(p.inline){var v=e.util.copy(e);v.level++;var g="valid"+v.level;v.schema=p.schema,v.schemaPath="",v.errSchemaPath=l,n+=" "+e.validate(v).replace(/validate\.schema/g,p.code)+" ",c&&(n+=" if ("+g+") { ")}else a=!0===p.$async||e.async&&!1!==p.$async,o=p.code}if(o){var y;(y=y||[]).push(n),n="",e.opts.passContext?n+=" "+o+".call(this, ":n+=" "+o+"( ",n+=" "+d+", (dataPath || '')",'""'!=e.errorPath&&(n+=" + "+e.errorPath);var b=n+=" , "+(s?"data"+(s-1||""):"parentData")+" , "+(s?e.dataPathArr[s]:"parentDataProperty")+", rootData) ";if(n=y.pop(),a){if(!e.async)throw new Error("async schema referenced by sync schema");c&&(n+=" var "+m+"; "),n+=" try { await "+b+"; ",c&&(n+=" "+m+" = true; "),n+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",c&&(n+=" "+m+" = false; "),n+=" } ",c&&(n+=" if ("+m+") { ")}else n+=" if (!"+b+") { if (vErrors === null) vErrors = "+o+".errors; else vErrors = vErrors.concat("+o+".errors); errors = vErrors.length; } ",c&&(n+=" else { ")}return n},allOf:function(e,r,t){var a=" ",o=e.schema[r],n=e.schemaPath+e.util.getProperty(r),i=e.errSchemaPath+"/"+r,s=!e.opts.allErrors,l=e.util.copy(e),u="";l.level++;var c="valid"+l.level,d=l.baseId,m=!0,p=o;if(p)for(var h,f=-1,v=p.length-1;f<v;)h=p[f+=1],(e.opts.strictKeywords?"object"==typeof h&&Object.keys(h).length>0||!1===h:e.util.schemaHasRules(h,e.RULES.all))&&(m=!1,l.schema=h,l.schemaPath=n+"["+f+"]",l.errSchemaPath=i+"/"+f,a+=" "+e.validate(l)+" ",l.baseId=d,s&&(a+=" if ("+c+") { ",u+="}"));return s&&(a+=m?" if (true) { ":" "+u.slice(0,-1)+" "),a},anyOf:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e),h="";p.level++;var f="valid"+p.level;if(i.every((function(r){return e.opts.strictKeywords?"object"==typeof r&&Object.keys(r).length>0||!1===r:e.util.schemaHasRules(r,e.RULES.all)}))){var v=p.baseId;a+=" var "+m+" = errors; var "+d+" = false; ";var g=e.compositeRule;e.compositeRule=p.compositeRule=!0;var y=i;if(y)for(var b,P=-1,w=y.length-1;P<w;)b=y[P+=1],p.schema=b,p.schemaPath=s+"["+P+"]",p.errSchemaPath=l+"/"+P,a+=" "+e.validate(p)+" ",p.baseId=v,a+=" "+d+" = "+d+" || "+f+"; if (!"+d+") { ",h+="}";e.compositeRule=p.compositeRule=g,a+=" "+h+" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } else { errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else u&&(a+=" if (true) { ");return a},$comment:function(e,r,t){var a=" ",o=e.schema[r],n=e.errSchemaPath+"/"+r;e.opts.allErrors;var i=e.util.toQuotedString(o);return!0===e.opts.$comment?a+=" console.log("+i+");":"function"==typeof e.opts.$comment&&(a+=" self._opts.$comment("+i+", "+e.util.toQuotedString(n)+", validate.root.schema);"),a},const:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m=e.opts.$data&&i&&i.$data;m&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; "),m||(a+=" var schema"+o+" = validate.schema"+s+";"),a+="var "+d+" = equal("+c+", schema"+o+"); if (!"+d+") { ";var p=p||[];p.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValue: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var h=a;return a=p.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+h+"]); ":a+=" validate.errors = ["+h+"]; return false; ":a+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",u&&(a+=" else { "),a},contains:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level,f="i"+o,v=p.dataLevel=e.dataLevel+1,g="data"+v,y=e.baseId,b=e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all);if(a+="var "+m+" = errors;var "+d+";",b){var P=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=i,p.schemaPath=s,p.errSchemaPath=l,a+=" var "+h+" = false; for (var "+f+" = 0; "+f+" < "+c+".length; "+f+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers,!0);var w=c+"["+f+"]";p.dataPathArr[v]=f;var E=e.validate(p);p.baseId=y,e.util.varOccurences(E,g)<2?a+=" "+e.util.varReplace(E,g,w)+" ":a+=" var "+g+" = "+w+"; "+E+" ",a+=" if ("+h+") break; } ",e.compositeRule=p.compositeRule=P,a+=" if (!"+h+") {"}else a+=" if ("+c+".length == 0) {";var S=S||[];S.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should contain a valid item' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var x=a;return a=S.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",b&&(a+=" errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a},dependencies:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="errs__"+o,m=e.util.copy(e),p="";m.level++;var h="valid"+m.level,f={},v={},g=e.opts.ownProperties;for(w in i)if("__proto__"!=w){var y=i[w],b=Array.isArray(y)?v:f;b[w]=y}a+="var "+d+" = errors;";var P=e.errorPath;for(var w in a+="var missing"+o+";",v)if((b=v[w]).length){if(a+=" if ( "+c+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(w)+"') "),u){a+=" && ( ";var E=b;if(E)for(var S=-1,x=E.length-1;S<x;){j=E[S+=1],S&&(a+=" || "),a+=" ( ( "+(R=c+(C=e.util.getProperty(j)))+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(j)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?j:C)+") ) "}a+=")) { ";var F="missing"+o,O="' + "+F+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,F,!0):P+" + "+F);var _=_||[];_.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var D=a;a=_.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+D+"]); ":a+=" validate.errors = ["+D+"]; return false; ":a+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{a+=" ) { ";var k=b;if(k)for(var j,I=-1,A=k.length-1;I<A;){j=k[I+=1];var C=e.util.getProperty(j),R=(O=e.util.escapeQuotes(j),c+C);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,j,e.opts.jsonPointers)),a+=" if ( "+R+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(j)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",u&&(p+="}",a+=" else { ")}e.errorPath=P;var $=m.baseId;for(var w in f){y=f[w];(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all))&&(a+=" "+h+" = true; if ( "+c+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(w)+"') "),a+=") { ",m.schema=y,m.schemaPath=s+e.util.getProperty(w),m.errSchemaPath=l+"/"+e.util.escapeFragment(w),a+=" "+e.validate(m)+" ",m.baseId=$,a+=" } ",u&&(a+=" if ("+h+") { ",p+="}"))}return u&&(a+=" "+p+" if ("+d+" == errors) {"),a},enum:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m=e.opts.$data&&i&&i.$data;m&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ");var p="i"+o,h="schema"+o;m||(a+=" var "+h+" = validate.schema"+s+";"),a+="var "+d+";",m&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=d+" = false;for (var "+p+"=0; "+p+"<"+h+".length; "+p+"++) if (equal("+c+", "+h+"["+p+"])) { "+d+" = true; break; }",m&&(a+=" } "),a+=" if (!"+d+") { ";var f=f||[];f.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var v=a;return a=f.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+v+"]); ":a+=" validate.errors = ["+v+"]; return false; ":a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",u&&(a+=" else { "),a},format:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||"");if(!1===e.opts.format)return u&&(a+=" if (true) { "),a;var d,m=e.opts.$data&&i&&i.$data;m?(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ",d="schema"+o):d=i;var p=e.opts.unknownFormats,h=Array.isArray(p);if(m){a+=" var "+(f="format"+o)+" = formats["+d+"]; var "+(v="isObject"+o)+" = typeof "+f+" == 'object' && !("+f+" instanceof RegExp) && "+f+".validate; var "+(g="formatType"+o)+" = "+v+" && "+f+".type || 'string'; if ("+v+") { ",e.async&&(a+=" var async"+o+" = "+f+".async; "),a+=" "+f+" = "+f+".validate; } if ( ",m&&(a+=" ("+d+" !== undefined && typeof "+d+" != 'string') || "),a+=" (","ignore"!=p&&(a+=" ("+d+" && !"+f+" ",h&&(a+=" && self._opts.unknownFormats.indexOf("+d+") == -1 "),a+=") || "),a+=" ("+f+" && "+g+" == '"+t+"' && !(typeof "+f+" == 'function' ? ",e.async?a+=" (async"+o+" ? await "+f+"("+c+") : "+f+"("+c+")) ":a+=" "+f+"("+c+") ",a+=" : "+f+".test("+c+"))))) {"}else{var f;if(!(f=e.formats[i])){if("ignore"==p)return e.logger.warn('unknown format "'+i+'" ignored in schema at path "'+e.errSchemaPath+'"'),u&&(a+=" if (true) { "),a;if(h&&p.indexOf(i)>=0)return u&&(a+=" if (true) { "),a;throw new Error('unknown format "'+i+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,g=(v="object"==typeof f&&!(f instanceof RegExp)&&f.validate)&&f.type||"string";if(v){var y=!0===f.async;f=f.validate}if(g!=t)return u&&(a+=" if (true) { "),a;if(y){if(!e.async)throw new Error("async format in sync schema");a+=" if (!(await "+(b="formats"+e.util.getProperty(i)+".validate")+"("+c+"))) { "}else{a+=" if (! ";var b="formats"+e.util.getProperty(i);v&&(b+=".validate"),a+="function"==typeof f?" "+b+"("+c+") ":" "+b+".test("+c+") ",a+=") { "}}var P=P||[];P.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",a+=m?""+d:""+e.util.toQuotedString(i),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",a+=m?"' + "+d+" + '":""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=m?"validate.schema"+s:""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var w=a;return a=P.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",u&&(a+=" else { "),a},if:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level,f=e.schema.then,v=e.schema.else,g=void 0!==f&&(e.opts.strictKeywords?"object"==typeof f&&Object.keys(f).length>0||!1===f:e.util.schemaHasRules(f,e.RULES.all)),y=void 0!==v&&(e.opts.strictKeywords?"object"==typeof v&&Object.keys(v).length>0||!1===v:e.util.schemaHasRules(v,e.RULES.all)),b=p.baseId;if(g||y){var P;p.createErrors=!1,p.schema=i,p.schemaPath=s,p.errSchemaPath=l,a+=" var "+m+" = errors; var "+d+" = true; ";var w=e.compositeRule;e.compositeRule=p.compositeRule=!0,a+=" "+e.validate(p)+" ",p.baseId=b,p.createErrors=!0,a+=" errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } ",e.compositeRule=p.compositeRule=w,g?(a+=" if ("+h+") { ",p.schema=e.schema.then,p.schemaPath=e.schemaPath+".then",p.errSchemaPath=e.errSchemaPath+"/then",a+=" "+e.validate(p)+" ",p.baseId=b,a+=" "+d+" = "+h+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'then'; ":P="'then'",a+=" } ",y&&(a+=" else { ")):a+=" if (!"+h+") { ",y&&(p.schema=e.schema.else,p.schemaPath=e.schemaPath+".else",p.errSchemaPath=e.errSchemaPath+"/else",a+=" "+e.validate(p)+" ",p.baseId=b,a+=" "+d+" = "+h+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'else'; ":P="'else'",a+=" } "),a+=" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+P+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match \"' + "+P+" + '\" schema' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",u&&(a+=" else { ")}else u&&(a+=" if (true) { ");return a},items:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e),h="";p.level++;var f="valid"+p.level,v="i"+o,g=p.dataLevel=e.dataLevel+1,y="data"+g,b=e.baseId;if(a+="var "+m+" = errors;var "+d+";",Array.isArray(i)){var P=e.schema.additionalItems;if(!1===P){a+=" "+d+" = "+c+".length <= "+i.length+"; ";var w=l;l=e.errSchemaPath+"/additionalItems",a+=" if (!"+d+") { ";var E=E||[];E.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+i.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+i.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var S=a;a=E.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",l=w,u&&(h+="}",a+=" else { ")}var x=i;if(x)for(var F,O=-1,_=x.length-1;O<_;)if(F=x[O+=1],e.opts.strictKeywords?"object"==typeof F&&Object.keys(F).length>0||!1===F:e.util.schemaHasRules(F,e.RULES.all)){a+=" "+f+" = true; if ("+c+".length > "+O+") { ";var D=c+"["+O+"]";p.schema=F,p.schemaPath=s+"["+O+"]",p.errSchemaPath=l+"/"+O,p.errorPath=e.util.getPathExpr(e.errorPath,O,e.opts.jsonPointers,!0),p.dataPathArr[g]=O;var k=e.validate(p);p.baseId=b,e.util.varOccurences(k,y)<2?a+=" "+e.util.varReplace(k,y,D)+" ":a+=" var "+y+" = "+D+"; "+k+" ",a+=" } ",u&&(a+=" if ("+f+") { ",h+="}")}if("object"==typeof P&&(e.opts.strictKeywords?"object"==typeof P&&Object.keys(P).length>0||!1===P:e.util.schemaHasRules(P,e.RULES.all))){p.schema=P,p.schemaPath=e.schemaPath+".additionalItems",p.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+f+" = true; if ("+c+".length > "+i.length+") { for (var "+v+" = "+i.length+"; "+v+" < "+c+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=c+"["+v+"]";p.dataPathArr[g]=v;k=e.validate(p);p.baseId=b,e.util.varOccurences(k,y)<2?a+=" "+e.util.varReplace(k,y,D)+" ":a+=" var "+y+" = "+D+"; "+k+" ",u&&(a+=" if (!"+f+") break; "),a+=" } } ",u&&(a+=" if ("+f+") { ",h+="}")}}else if(e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){p.schema=i,p.schemaPath=s,p.errSchemaPath=l,a+=" for (var "+v+" = 0; "+v+" < "+c+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=c+"["+v+"]";p.dataPathArr[g]=v;k=e.validate(p);p.baseId=b,e.util.varOccurences(k,y)<2?a+=" "+e.util.varReplace(k,y,D)+" ":a+=" var "+y+" = "+D+"; "+k+" ",u&&(a+=" if (!"+f+") break; "),a+=" }"}return u&&(a+=" "+h+" if ("+m+" == errors) {"),a},maximum:yr,minimum:yr,maxItems:br,minItems:br,maxLength:Pr,minLength:Pr,maxProperties:wr,minProperties:wr,multipleOf:function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");o+="var division"+n+";if (",m&&(o+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),o+=" (division"+n+" = "+d+" / "+a+", ",e.opts.multipleOfPrecision?o+=" Math.abs(Math.round(division"+n+") - division"+n+") > 1e-"+e.opts.multipleOfPrecision+" ":o+=" division"+n+" !== parseInt(division"+n+") ",o+=" ) ",m&&(o+=" ) "),o+=" ) { ";var p=p||[];p.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be multiple of ",o+=m?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var h=o;return o=p.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+h+"]); ":o+=" validate.errors = ["+h+"]; return false; ":o+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},not:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="errs__"+o,m=e.util.copy(e);m.level++;var p="valid"+m.level;if(e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){m.schema=i,m.schemaPath=s,m.errSchemaPath=l,a+=" var "+d+" = errors; ";var h,f=e.compositeRule;e.compositeRule=m.compositeRule=!0,m.createErrors=!1,m.opts.allErrors&&(h=m.opts.allErrors,m.opts.allErrors=!1),a+=" "+e.validate(m)+" ",m.createErrors=!0,h&&(m.opts.allErrors=h),e.compositeRule=m.compositeRule=f,a+=" if ("+p+") { ";var v=v||[];v.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var g=a;a=v.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(a+=" if (false) { ");return a},oneOf:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e),h="";p.level++;var f="valid"+p.level,v=p.baseId,g="prevValid"+o,y="passingSchemas"+o;a+="var "+m+" = errors , "+g+" = false , "+d+" = false , "+y+" = null; ";var b=e.compositeRule;e.compositeRule=p.compositeRule=!0;var P=i;if(P)for(var w,E=-1,S=P.length-1;E<S;)w=P[E+=1],(e.opts.strictKeywords?"object"==typeof w&&Object.keys(w).length>0||!1===w:e.util.schemaHasRules(w,e.RULES.all))?(p.schema=w,p.schemaPath=s+"["+E+"]",p.errSchemaPath=l+"/"+E,a+=" "+e.validate(p)+" ",p.baseId=v):a+=" var "+f+" = true; ",E&&(a+=" if ("+f+" && "+g+") { "+d+" = false; "+y+" = ["+y+", "+E+"]; } else { ",h+="}"),a+=" if ("+f+") { "+d+" = "+g+" = true; "+y+" = "+E+"; }";return e.compositeRule=p.compositeRule=b,a+=h+"if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a},pattern:function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'string') || "),o+=" !"+(m?"(new RegExp("+a+"))":e.usePattern(s))+".test("+d+") ) { ";var p=p||[];p.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { pattern: ",o+=m?""+a:""+e.util.toQuotedString(s),o+=" } ",!1!==e.opts.messages&&(o+=" , message: 'should match pattern \"",o+=m?"' + "+a+" + '":""+e.util.escapeQuotes(s),o+="\"' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+e.util.toQuotedString(s),o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var h=o;return o=p.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+h+"]); ":o+=" validate.errors = ["+h+"]; return false; ":o+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},properties:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="errs__"+o,m=e.util.copy(e),p="";m.level++;var h="valid"+m.level,f="key"+o,v="idx"+o,g=m.dataLevel=e.dataLevel+1,y="data"+g,b="dataProperties"+o,P=Object.keys(i||{}).filter(C),w=e.schema.patternProperties||{},E=Object.keys(w).filter(C),S=e.schema.additionalProperties,x=P.length||E.length,F=!1===S,O="object"==typeof S&&Object.keys(S).length,_=e.opts.removeAdditional,D=F||O||_,k=e.opts.ownProperties,j=e.baseId,I=e.schema.required;if(I&&(!e.opts.$data||!I.$data)&&I.length<e.opts.loopRequired)var A=e.util.toHash(I);function C(e){return"__proto__"!==e}if(a+="var "+d+" = errors;var "+h+" = true;",k&&(a+=" var "+b+" = undefined;"),D){if(a+=k?" "+b+" = "+b+" || Object.keys("+c+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+c+") { ",x){if(a+=" var isAdditional"+o+" = !(false ",P.length)if(P.length>8)a+=" || validate.schema"+s+".hasOwnProperty("+f+") ";else{var R=P;if(R)for(var $=-1,N=R.length-1;$<N;)G=R[$+=1],a+=" || "+f+" == "+e.util.toQuotedString(G)+" "}if(E.length){var L=E;if(L)for(var T=-1,z=L.length-1;T<z;)ne=L[T+=1],a+=" || "+e.usePattern(ne)+".test("+f+") "}a+=" ); if (isAdditional"+o+") { "}if("all"==_)a+=" delete "+c+"["+f+"]; ";else{var V=e.errorPath,q="' + "+f+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers)),F)if(_)a+=" delete "+c+"["+f+"]; ";else{a+=" "+h+" = false; ";var M=l;l=e.errSchemaPath+"/additionalProperties",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { additionalProperty: '"+q+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is an invalid additional property":a+="should NOT have additional properties",a+="' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var U=a;a=te.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+U+"]); ":a+=" validate.errors = ["+U+"]; return false; ":a+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=M,u&&(a+=" break; ")}else if(O)if("failing"==_){a+=" var "+d+" = errors; ";var W=e.compositeRule;e.compositeRule=m.compositeRule=!0,m.schema=S,m.schemaPath=e.schemaPath+".additionalProperties",m.errSchemaPath=e.errSchemaPath+"/additionalProperties",m.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);var Q=c+"["+f+"]";m.dataPathArr[g]=f;var B=e.validate(m);m.baseId=j,e.util.varOccurences(B,y)<2?a+=" "+e.util.varReplace(B,y,Q)+" ":a+=" var "+y+" = "+Q+"; "+B+" ",a+=" if (!"+h+") { errors = "+d+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+c+"["+f+"]; } ",e.compositeRule=m.compositeRule=W}else{m.schema=S,m.schemaPath=e.schemaPath+".additionalProperties",m.errSchemaPath=e.errSchemaPath+"/additionalProperties",m.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);Q=c+"["+f+"]";m.dataPathArr[g]=f;B=e.validate(m);m.baseId=j,e.util.varOccurences(B,y)<2?a+=" "+e.util.varReplace(B,y,Q)+" ":a+=" var "+y+" = "+Q+"; "+B+" ",u&&(a+=" if (!"+h+") break; ")}e.errorPath=V}x&&(a+=" } "),a+=" } ",u&&(a+=" if ("+h+") { ",p+="}")}var H=e.opts.useDefaults&&!e.compositeRule;if(P.length){var K=P;if(K)for(var G,J=-1,Z=K.length-1;J<Z;){var Y=i[G=K[J+=1]];if(e.opts.strictKeywords?"object"==typeof Y&&Object.keys(Y).length>0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all)){var X=e.util.getProperty(G),ee=(Q=c+X,H&&void 0!==Y.default);m.schema=Y,m.schemaPath=s+X,m.errSchemaPath=l+"/"+e.util.escapeFragment(G),m.errorPath=e.util.getPath(e.errorPath,G,e.opts.jsonPointers),m.dataPathArr[g]=e.util.toQuotedString(G);B=e.validate(m);if(m.baseId=j,e.util.varOccurences(B,y)<2){B=e.util.varReplace(B,y,Q);var re=Q}else{re=y;a+=" var "+y+" = "+Q+"; "}if(ee)a+=" "+B+" ";else{if(A&&A[G]){a+=" if ( "+re+" === undefined ",k&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+h+" = false; ";V=e.errorPath,M=l;var te,ae=e.util.escapeQuotes(G);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(V,G,e.opts.jsonPointers)),l=e.errSchemaPath+"/required",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+ae+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+ae+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";U=a;a=te.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+U+"]); ":a+=" validate.errors = ["+U+"]; return false; ":a+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=M,e.errorPath=V,a+=" } else { "}else u?(a+=" if ( "+re+" === undefined ",k&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+h+" = true; } else { "):(a+=" if ("+re+" !== undefined ",k&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(G)+"') "),a+=" ) { ");a+=" "+B+" } "}}u&&(a+=" if ("+h+") { ",p+="}")}}if(E.length){var oe=E;if(oe)for(var ne,ie=-1,se=oe.length-1;ie<se;){Y=w[ne=oe[ie+=1]];if(e.opts.strictKeywords?"object"==typeof Y&&Object.keys(Y).length>0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all)){m.schema=Y,m.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(ne),m.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(ne),a+=k?" "+b+" = "+b+" || Object.keys("+c+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+c+") { ",a+=" if ("+e.usePattern(ne)+".test("+f+")) { ",m.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);Q=c+"["+f+"]";m.dataPathArr[g]=f;B=e.validate(m);m.baseId=j,e.util.varOccurences(B,y)<2?a+=" "+e.util.varReplace(B,y,Q)+" ":a+=" var "+y+" = "+Q+"; "+B+" ",u&&(a+=" if (!"+h+") break; "),a+=" } ",u&&(a+=" else "+h+" = true; "),a+=" } ",u&&(a+=" if ("+h+") { ",p+="}")}}}return u&&(a+=" "+p+" if ("+d+" == errors) {"),a},propertyNames:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="errs__"+o,m=e.util.copy(e);m.level++;var p="valid"+m.level;if(a+="var "+d+" = errors;",e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){m.schema=i,m.schemaPath=s,m.errSchemaPath=l;var h="key"+o,f="idx"+o,v="i"+o,g="' + "+h+" + '",y="data"+(m.dataLevel=e.dataLevel+1),b="dataProperties"+o,P=e.opts.ownProperties,w=e.baseId;P&&(a+=" var "+b+" = undefined; "),a+=P?" "+b+" = "+b+" || Object.keys("+c+"); for (var "+f+"=0; "+f+"<"+b+".length; "+f+"++) { var "+h+" = "+b+"["+f+"]; ":" for (var "+h+" in "+c+") { ",a+=" var startErrs"+o+" = errors; ";var E=h,S=e.compositeRule;e.compositeRule=m.compositeRule=!0;var x=e.validate(m);m.baseId=w,e.util.varOccurences(x,y)<2?a+=" "+e.util.varReplace(x,y,E)+" ":a+=" var "+y+" = "+E+"; "+x+" ",e.compositeRule=m.compositeRule=S,a+=" if (!"+p+") { for (var "+v+"=startErrs"+o+"; "+v+"<errors; "+v+"++) { vErrors["+v+"].propertyName = "+h+"; } var err = ",!1!==e.createErrors?(a+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { propertyName: '"+g+"' } ",!1!==e.opts.messages&&(a+=" , message: 'property name \\'"+g+"\\' is invalid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),u&&(a+=" break; "),a+=" } }"}return u&&(a+=" if ("+d+" == errors) {"),a},required:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m=e.opts.$data&&i&&i.$data;m&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ");var p="schema"+o;if(!m)if(i.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var h=[],f=i;if(f)for(var v,g=-1,y=f.length-1;g<y;){v=f[g+=1];var b=e.schema.properties[v];b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0||!1===b:e.util.schemaHasRules(b,e.RULES.all))||(h[h.length]=v)}}else h=i;if(m||h.length){var P=e.errorPath,w=m||h.length>=e.opts.loopRequired,E=e.opts.ownProperties;if(u)if(a+=" var missing"+o+"; ",w){m||(a+=" var "+p+" = validate.schema"+s+"; ");var S="' + "+(k="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,k,e.opts.jsonPointers)),a+=" var "+d+" = true; ",m&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=" for (var "+O+" = 0; "+O+" < "+p+".length; "+O+"++) { "+d+" = "+c+"["+p+"["+O+"]] !== undefined ",E&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", "+p+"["+O+"]) "),a+="; if (!"+d+") break; } ",m&&(a+=" } "),a+=" if (!"+d+") { ",(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var x=a;a=D.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var F=h;if(F)for(var O=-1,_=F.length-1;O<_;){I=F[O+=1],O&&(a+=" || "),a+=" ( ( "+($=c+(R=e.util.getProperty(I)))+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(I)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?I:R)+") ) "}a+=") { ";var D;S="' + "+(k="missing"+o)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,k,!0):P+" + "+k),(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";x=a;a=D.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(w){m||(a+=" var "+p+" = validate.schema"+s+"; ");var k;S="' + "+(k="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,k,e.opts.jsonPointers)),m&&(a+=" if ("+p+" && !Array.isArray("+p+")) { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+p+" !== undefined) { "),a+=" for (var "+O+" = 0; "+O+" < "+p+".length; "+O+"++) { if ("+c+"["+p+"["+O+"]] === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", "+p+"["+O+"]) "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",m&&(a+=" } ")}else{var j=h;if(j)for(var I,A=-1,C=j.length-1;A<C;){I=j[A+=1];var R=e.util.getProperty(I),$=(S=e.util.escapeQuotes(I),c+R);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,I,e.opts.jsonPointers)),a+=" if ( "+$+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(I)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=P}else u&&(a+=" if (true) {");return a},uniqueItems:function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m="valid"+n,p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,(s||p)&&!1!==e.opts.uniqueItems){p&&(o+=" var "+m+"; if ("+a+" === false || "+a+" === undefined) "+m+" = true; else if (typeof "+a+" != 'boolean') "+m+" = false; else { "),o+=" var i = "+d+".length , "+m+" = true , j; if (i > 1) { ";var h=e.schema.items&&e.schema.items.type,f=Array.isArray(h);if(!h||"object"==h||"array"==h||f&&(h.indexOf("object")>=0||h.indexOf("array")>=0))o+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+d+"[i], "+d+"[j])) { "+m+" = false; break outer; } } } ";else{o+=" var itemIndices = {}, item; for (;i--;) { var item = "+d+"[i]; ";var v="checkDataType"+(f?"s":"");o+=" if ("+e.util[v](h,"item",e.opts.strictNumbers,!0)+") continue; ",f&&(o+=" if (typeof item == 'string') item = '\"' + item; "),o+=" if (typeof itemIndices[item] == 'number') { "+m+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}o+=" } ",p&&(o+=" } "),o+=" if (!"+m+") { ";var g=g||[];g.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var y=o;o=g.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+y+"]); ":o+=" validate.errors = ["+y+"]; return false; ":o+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",c&&(o+=" else { ")}else c&&(o+=" if (true) { ");return o},validate:Ve},Sr=se.toHash,xr=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"],Fr=function(e,r){for(var t=0;t<r.length;t++){e=JSON.parse(JSON.stringify(e));var a,o=r[t].split("/"),n=e;for(a=1;a<o.length;a++)n=n[o[a]];for(a=0;a<xr.length;a++){var i=xr[a],s=n[i];s&&(n[i]={anyOf:[s,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e},Or=Ne.MissingRef,_r=function e(r,t,a){var o=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof t&&(a=t,t=void 0);var n=i(r).then((function(){var e=o._addSchema(r,void 0,t);return e.validate||function e(r){try{return o._compile(r)}catch(e){if(e instanceof Or)return a(e);throw e}function a(a){var n=a.missingSchema;if(u(n))throw new Error("Schema "+n+" is loaded but "+a.missingRef+" cannot be resolved");var s=o._loadingSchemas[n];return s||(s=o._loadingSchemas[n]=o._opts.loadSchema(n)).then(l,l),s.then((function(e){if(!u(n))return i(e).then((function(){u(n)||o.addSchema(e,n,void 0,t)}))})).then((function(){return e(r)}));function l(){delete o._loadingSchemas[n]}function u(e){return o._refs[e]||o._schemas[e]}}}(e)}));a&&n.then((function(e){a(null,e)}),a);return n;function i(r){var t=r.$schema;return t&&!o.getSchema(t)?e.call(o,{$ref:t},!0):Promise.resolve()}};var Dr=function(e,r,t){var a,o,n=" ",i=e.level,s=e.dataLevel,l=e.schema[r],u=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,d=!e.opts.allErrors,m="data"+(s||""),p="valid"+i,h="errs__"+i,f=e.opts.$data&&l&&l.$data;f?(n+=" var schema"+i+" = "+e.util.getData(l.$data,s,e.dataPathArr)+"; ",o="schema"+i):o=l;var v,g,y,b,P,w="definition"+i,E=this.definition,S="";if(f&&E.$data){P="keywordValidate"+i;var x=E.validateSchema;n+=" var "+w+" = RULES.custom['"+r+"'].definition; var "+P+" = "+w+".validate;"}else{if(!(b=e.useCustomRule(this,l,e.schema,e)))return;o="validate.schema"+u,P=b.code,v=E.compile,g=E.inline,y=E.macro}var F=P+".errors",O="i"+i,_="ruleErr"+i,D=E.async;if(D&&!e.async)throw new Error("async keyword in sync schema");if(g||y||(n+=F+" = null;"),n+="var "+h+" = errors;var "+p+";",f&&E.$data&&(S+="}",n+=" if ("+o+" === undefined) { "+p+" = true; } else { ",x&&(S+="}",n+=" "+p+" = "+w+".validateSchema("+o+"); if ("+p+") { ")),g)E.statements?n+=" "+b.validate+" ":n+=" "+p+" = "+b.validate+"; ";else if(y){var k=e.util.copy(e);S="";k.level++;var j="valid"+k.level;k.schema=b.validate,k.schemaPath="";var I=e.compositeRule;e.compositeRule=k.compositeRule=!0;var A=e.validate(k).replace(/validate\.schema/g,P);e.compositeRule=k.compositeRule=I,n+=" "+A}else{(N=N||[]).push(n),n="",n+=" "+P+".call( ",e.opts.passContext?n+="this":n+="self",v||!1===E.schema?n+=" , "+m+" ":n+=" , "+o+" , "+m+" , validate.schema"+e.schemaPath+" ",n+=" , (dataPath || '')",'""'!=e.errorPath&&(n+=" + "+e.errorPath);var C=s?"data"+(s-1||""):"parentData",R=s?e.dataPathArr[s]:"parentDataProperty",$=n+=" , "+C+" , "+R+" , rootData ) ";n=N.pop(),!1===E.errors?(n+=" "+p+" = ",D&&(n+="await "),n+=$+"; "):n+=D?" var "+(F="customErrors"+i)+" = null; try { "+p+" = await "+$+"; } catch (e) { "+p+" = false; if (e instanceof ValidationError) "+F+" = e.errors; else throw e; } ":" "+F+" = null; "+p+" = "+$+"; "}if(E.modifying&&(n+=" if ("+C+") "+m+" = "+C+"["+R+"];"),n+=""+S,E.valid)d&&(n+=" if (true) { ");else{var N;n+=" if ( ",void 0===E.valid?(n+=" !",n+=y?""+j:""+p):n+=" "+!E.valid+" ",n+=") { ",a=this.keyword,(N=N||[]).push(n),n="",(N=N||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(n+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";var L=n;n=N.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+L+"]); ":n+=" validate.errors = ["+L+"]; return false; ":n+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var T=n;n=N.pop(),g?E.errors?"full"!=E.errors&&(n+=" for (var "+O+"="+h+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+c+'"; } ',e.opts.verbose&&(n+=" "+_+".schema = "+o+"; "+_+".data = "+m+"; "),n+=" } "):!1===E.errors?n+=" "+T+" ":(n+=" if ("+h+" == errors) { "+T+" } else { for (var "+O+"="+h+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+c+'"; } ',e.opts.verbose&&(n+=" "+_+".schema = "+o+"; "+_+".data = "+m+"; "),n+=" } } "):y?(n+=" var err = ",!1!==e.createErrors?(n+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(n+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&d&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; ")):!1===E.errors?n+=" "+T+" ":(n+=" if (Array.isArray("+F+")) { if (vErrors === null) vErrors = "+F+"; else vErrors = vErrors.concat("+F+"); errors = vErrors.length; for (var "+O+"="+h+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; "+_+'.schemaPath = "'+c+'"; ',e.opts.verbose&&(n+=" "+_+".schema = "+o+"; "+_+".data = "+m+"; "),n+=" } } else { "+T+" } "),n+=" } ",d&&(n+=" else { ")}return n},kr="http://json-schema.org/draft-07/schema#",jr="http://json-schema.org/draft-07/schema#",Ir="Core schema meta-schema",Ar={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},Cr=["object","boolean"],Rr={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},$r={$schema:kr,$id:jr,title:Ir,definitions:Ar,type:Cr,properties:Rr,default:!0},Nr=ae(Object.freeze({__proto__:null,$schema:kr,$id:jr,title:Ir,definitions:Ar,type:Cr,properties:Rr,default:$r})),Lr={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:Nr.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:Nr.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}},Tr=/^[a-z_$][a-z0-9_$-]*$/i,zr=function(e,r){var t=this.RULES;if(t.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!Tr.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(r){this.validateKeyword(r,!0);var a=r.type;if(Array.isArray(a))for(var o=0;o<a.length;o++)i(e,a[o],r);else i(e,a,r);var n=r.metaSchema;n&&(r.$data&&this._opts.$data&&(n={anyOf:[n,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),r.validateSchema=this.compile(n,!0))}function i(e,r,a){for(var o,n=0;n<t.length;n++){var i=t[n];if(i.type==r){o=i;break}}o||(o={type:r,rules:[]},t.push(o));var s={keyword:e,definition:a,custom:!0,code:Dr,implements:a.implements};o.rules.push(s),t.custom[e]=s}return t.keywords[e]=t.all[e]=!0,this},Vr=function(e){var r=this.RULES.custom[e];return r?r.definition:this.RULES.keywords[e]||!1},qr=function(e){var r=this.RULES;delete r.keywords[e],delete r.all[e],delete r.custom[e];for(var t=0;t<r.length;t++)for(var a=r[t].rules,o=0;o<a.length;o++)if(a[o].keyword==e){a.splice(o,1);break}return this},Mr=function e(r,t){e.errors=null;var a=this._validateKeyword=this._validateKeyword||this.compile(Lr,!0);if(a(r))return!0;if(e.errors=a.errors,t)throw new Error("custom keyword definition is invalid: "+this.errorsText(a.errors));return!1};var Ur="http://json-schema.org/draft-07/schema#",Wr="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Qr="Meta-schema for $data reference (JSON Schema extension proposal)",Br=["$data"],Hr={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Kr={$schema:Ur,$id:Wr,description:Qr,type:"object",required:Br,properties:Hr,additionalProperties:!1},Gr=ae(Object.freeze({__proto__:null,$schema:Ur,$id:Wr,description:Qr,type:"object",required:Br,properties:Hr,additionalProperties:!1,default:Kr})),Jr=et;et.prototype.validate=function(e,r){var t;if("string"==typeof e){if(!(t=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);t=a.validate||this._compile(a)}var o=t(r);!0!==t.$async&&(this.errors=t.errors);return o},et.prototype.compile=function(e,r){var t=this._addSchema(e,void 0,r);return t.validate||this._compile(t)},et.prototype.addSchema=function(e,r,t,a){if(Array.isArray(e)){for(var o=0;o<e.length;o++)this.addSchema(e[o],void 0,t,a);return this}var n=this._getId(e);if(void 0!==n&&"string"!=typeof n)throw new Error("schema id must be string");return it(this,r=Se.normalizeId(r||n)),this._schemas[r]=this._addSchema(e,t,a,!0),this},et.prototype.addMetaSchema=function(e,r,t){return this.addSchema(e,r,t,!0),this},et.prototype.validateSchema=function(e,r){var t=e.$schema;if(void 0!==t&&"string"!=typeof t)throw new Error("$schema must be a string");if(!(t=t||this._opts.defaultMeta||function(e){var r=e._opts.meta;return e._opts.defaultMeta="object"==typeof r?e._getId(r)||r:e.getSchema(Zr)?Zr:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var a=this.validate(t,e);if(!a&&r){var o="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(o);this.logger.error(o)}return a},et.prototype.getSchema=function(e){var r=rt(this,e);switch(typeof r){case"object":return r.validate||this._compile(r);case"string":return this.getSchema(r);case"undefined":return function(e,r){var t=Se.schema.call(e,{schema:{}},r);if(t){var a=t.schema,o=t.root,n=t.baseId,i=Ue.call(e,a,o,void 0,n);return e._fragments[r]=new we({ref:r,fragment:!0,schema:a,root:o,baseId:n,validate:i}),i}}(this,e)}},et.prototype.removeSchema=function(e){if(e instanceof RegExp)return tt(this,this._schemas,e),tt(this,this._refs,e),this;switch(typeof e){case"undefined":return tt(this,this._schemas),tt(this,this._refs),this._cache.clear(),this;case"string":var r=rt(this,e);return r&&this._cache.del(r.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var t=this._opts.serialize,a=t?t(e):e;this._cache.del(a);var o=this._getId(e);o&&(o=Se.normalizeId(o),delete this._schemas[o],delete this._refs[o])}return this},et.prototype.addFormat=function(e,r){"string"==typeof r&&(r=new RegExp(r));return this._formats[e]=r,this},et.prototype.errorsText=function(e,r){if(!(e=e||this.errors))return"No errors";for(var t=void 0===(r=r||{}).separator?", ":r.separator,a=void 0===r.dataVar?"data":r.dataVar,o="",n=0;n<e.length;n++){var i=e[n];i&&(o+=a+i.dataPath+" "+i.message+t)}return o.slice(0,-t.length)},et.prototype._addSchema=function(e,r,t,a){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var o=this._opts.serialize,n=o?o(e):e,i=this._cache.get(n);if(i)return i;a=a||!1!==this._opts.addUsedSchema;var s=Se.normalizeId(this._getId(e));s&&a&&it(this,s);var l,u=!1!==this._opts.validateSchema&&!r;u&&!(l=s&&s==Se.normalizeId(e.$schema))&&this.validateSchema(e,!0);var c=Se.ids.call(this,e),d=new we({id:s,schema:e,localRefs:c,cacheKey:n,meta:t});"#"!=s[0]&&a&&(this._refs[s]=d);this._cache.put(n,d),u&&l&&this.validateSchema(e,!0);return d},et.prototype._compile=function(e,r){if(e.compiling)return e.validate=o,o.schema=e.schema,o.errors=null,o.root=r||o,!0===e.schema.$async&&(o.$async=!0),o;var t,a;e.compiling=!0,e.meta&&(t=this._opts,this._opts=this._metaOpts);try{a=Ue.call(this,e.schema,r,e.localRefs)}catch(r){throw delete e.validate,r}finally{e.compiling=!1,e.meta&&(this._opts=t)}return e.validate=a,e.refs=a.refs,e.refVal=a.refVal,e.root=a.root,a;function o(){var r=e.validate,t=r.apply(this,arguments);return o.errors=r.errors,t}},et.prototype.compileAsync=_r,et.prototype.addKeyword=zr,et.prototype.getKeyword=Vr,et.prototype.removeKeyword=qr,et.prototype.validateKeyword=Mr,et.ValidationError=Ne.Validation,et.MissingRefError=Ne.MissingRef,et.$dataMetaSchema=Fr;var Zr="http://json-schema.org/draft-07/schema",Yr=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],Xr=["/properties"];function et(e){if(!(this instanceof et))return new et(e);var r,t;e=this._opts=se.copy(e)||{},function(e){var r=e._opts.logger;if(!1===r)e.logger={log:st,warn:st,error:st};else{if(void 0===r&&(r=console),!("object"==typeof r&&r.log&&r.warn&&r.error))throw new Error("logger must implement log, warn and error methods");e.logger=r}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=cr(e.format),this._cache=e.cache||new Ye,this._loadingSchemas={},this._compilations=[],this.RULES=((r=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}]).all=Sr(t=["type","$comment"]),r.types=Sr(["number","integer","string","array","object","boolean","null"]),r.forEach((function(e){e.rules=e.rules.map((function(e){var a;if("object"==typeof e){var o=Object.keys(e)[0];a=e[o],e=o,a.forEach((function(e){t.push(e),r.all[e]=!0}))}return t.push(e),r.all[e]={keyword:e,code:Er[e],implements:a}})),r.all.$comment={keyword:"$comment",code:Er.$comment},e.type&&(r.types[e.type]=e)})),r.keywords=Sr(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),r.custom={},r),this._getId=function(e){switch(e.schemaId){case"auto":return nt;case"id":return at;default:return ot}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=ze),this._metaOpts=function(e){for(var r=se.copy(e._opts),t=0;t<Yr.length;t++)delete r[Yr[t]];return r}(this),e.formats&&function(e){for(var r in e._opts.formats){var t=e._opts.formats[r];e.addFormat(r,t)}}(this),e.keywords&&function(e){for(var r in e._opts.keywords){var t=e._opts.keywords[r];e.addKeyword(r,t)}}(this),function(e){var r;e._opts.$data&&(r=Gr,e.addMetaSchema(r,r.$id,!0));if(!1===e._opts.meta)return;var t=Nr;e._opts.$data&&(t=Fr(t,Xr));e.addMetaSchema(t,Zr,!0),e._refs["http://json-schema.org/schema"]=Zr}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var r=e._opts.schemas;if(!r)return;if(Array.isArray(r))e.addSchema(r);else for(var t in r)e.addSchema(r[t],t)}(this)}function rt(e,r){return r=Se.normalizeId(r),e._schemas[r]||e._refs[r]||e._fragments[r]}function tt(e,r,t){for(var a in r){var o=r[a];o.meta||t&&!t.test(a)||(e._cache.del(o.cacheKey),delete r[a])}}function at(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function ot(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function nt(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function it(e,r){if(e._schemas[r]||e._refs[r])throw new Error('schema with key or id "'+r+'" already exists')}function st(){}var lt={$$currentLocalizeFn:function(e){if(e&&e.length)for(var r=0;r<e.length;r+=1){var t=e[r],a=void 0,o=void 0,n=void 0;switch(t.keyword){case"$ref":a="无法找到引用".concat(t.params.ref);break;case"additionalItems":a="",o=t.params.limit,a+="不允许超过".concat(o,"个元素");break;case"additionalProperties":a="不允许有额外的属性";break;case"anyOf":a="数据应为 anyOf 所指定的其中一个";break;case"const":a="应当等于常量";break;case"contains":a="应当包含一个有效项";break;case"custom":a='应当通过 "'.concat(t.keyword,' 关键词校验"');break;case"dependencies":a="",o=t.params.depsCount,a+="应当拥有属性".concat(t.params.property,"的依赖属性").concat(t.params.deps);break;case"enum":a="应当是预设定的枚举值之一";break;case"exclusiveMaximum":case"exclusiveMinimum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(n);break;case"false schema":a="布尔模式出错";break;case"format":a='应当匹配格式 "'.concat(t.params.format,'"');break;case"formatExclusiveMaximum":a="formatExclusiveMaximum 应当是布尔值";break;case"formatExclusiveMinimum":a="formatExclusiveMinimum 应当是布尔值";break;case"formatMaximum":case"formatMinimum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当是 ".concat(n);break;case"if":a='应当匹配模式 "'.concat(t.params.failingKeyword,'" ');break;case"maximum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(n);break;case"maxItems":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个项");break;case"maxLength":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个字符");break;case"maxProperties":a="",o=t.params.limit,a+="不应有多于 ".concat(o," 个属性");break;case"minimum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(n);break;case"minItems":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个项");break;case"minLength":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个字符");break;case"minProperties":a="",o=t.params.limit,a+="不应有少于 ".concat(o," 个属性");break;case"multipleOf":a="应当是 ".concat(t.params.multipleOf," 的整数倍");break;case"not":a='不应当匹配 "not" schema';break;case"oneOf":a='只能匹配一个 "oneOf" 中的 schema';break;case"pattern":a='应当匹配模式 "'.concat(t.params.pattern,'"');break;case"patternRequired":a="应当有属性匹配模式 ".concat(t.params.missingPattern);break;case"propertyNames":a="属性名 '".concat(t.params.propertyName,"' 无效");break;case"required":a="应当有必需属性 ".concat(t.params.missingProperty);break;case"switch":a="由于 ".concat(t.params.caseIndex,' 失败,未通过 "switch" 校验, ');break;case"type":a="应当是 ".concat(t.params.type," 类型");break;case"uniqueItems":a="不应当含有重复项 (第 ".concat(t.params.j," 项与第 ").concat(t.params.i," 项是重复的)");break;default:continue}t.message=a}},getCurrentLocalize:function(){return this.$$currentLocalizeFn},useLocal:function(e){this.$$currentLocalizeFn=e}};function ut(e,r){try{if("object"===w(r))return e.fill(null).map((function(){return JSON.parse(JSON.stringify(r))}))}catch(e){}}function ct(e,r){return e.filter((function(e){return r.includes(e)}))}function dt(e,r,t){var a=re(e.$ref,r);e.$ref;var o=O(e,["$ref"]);return ft(F(F({},a),o),r,t)}function mt(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length<2)return r[0];for(var a={},o=[].concat(r),n=function(){var e=q(o[0])?o[0]:{},r=q(o[1])?o[1]:{};a=Object.assign({},e),Object.keys(r).reduce((function(t,a){var o=e[a],n=r[a];if(q(o)||q(n))if(q(o)&&q(n))t[a]=mt(o,n);else{var i=_(q(o)?[o,n]:[n,o],2),s=i[0],l=i[1];t[a]="additionalProperties"===a?!0===l&&s:s}else if(Array.isArray(o)||Array.isArray(n))if(Array.isArray(o)&&Array.isArray(n)){if(q(o[0])||q(n[0]))throw new Error("暂不支持如上数组对象元素合并");var u=ct([].concat(o),[].concat(n));if(u.length<=0)throw new Error("无法合并如上数据");0===u.length&&"type"===a?t[a]=u[0]:t[a]=u}else{var c=_(Array.isArray(o)?[o,n]:[n,o],2),d=c[0],m=c[1];if(void 0===m)t[a]=d;else{if(!d.includes(m))throw new Error("无法合并如下数据");t[a]=m}}else if(void 0!==o&&void 0!==n)if("maxLength"===a||"maximum"===a||"maxItems"===a||"exclusiveMaximum"===a||"maxProperties"===a)t[a]=Math.min(o,n);else if("minLength"===a||"minimum"===a||"minItems"===a||"exclusiveMinimum"===a||"minProperties"===a)t[a]=Math.max(o,n);else if("multipleOf"===a)t[a]=X(o,n);else{if(o!==n)throw new Error("无法合并如下数据");t[a]=o}else t[a]=void 0===o?n:o;return t}),a),o.splice(0,2,a)};o.length>=2;)n();return a}function pt(e,r,t){var a=F(F({},e),{},{allOf:e.allOf.map((function(e){return ft(e,r,t)}))});try{var o=a.allOf,n=O(a,["allOf"]);return mt.apply(void 0,[n].concat(D(o)))}catch(e){return a.allOf,O(a,["allOf"])}}function ht(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.hasOwnProperty("allOf")&&(e=pt(e,r,t)),e.hasOwnProperty("$ref")&&(e=dt(e,r,t)),e}function ft(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return q(e)?ht(e,r,t):{}}var vt=/{{(.*)}}/;function gt(e,r,t,a){if(void 0!==t){var o=vt.exec(t);if(vt.lastIndex=0,o){var n=o[1].trim();return new Function("parentFormData","rootFormData","return ".concat(n))($(e,r,1),e)}return a()}}function yt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.schema,t=e.uiSchema,a=arguments.length>1?arguments[1]:void 0,o=Et({schema:r,uiSchema:t,containsSpec:!1});return["title","description"].reduce((function(e,r){return o[r]&&(e["ui:".concat(r)]=String(o[r]).replace(/\$index/g,a+1)),e}),{})}function bt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.curNodePath,i=void 0===n?"":n,s=e.rootFormData,l=void 0===s?{}:s,u=o["ui:widget"]||t["ui:widget"],c=o["ui:hidden"]||t["ui:hidden"];return"HiddenWidget"===u||"hidden"===u||!!gt(l,i,c,(function(){return"function"==typeof c?c($(l,i,1),l):c}))}function Pt(e,r){var t=r.schema,a=void 0===t?{}:t,o=r.uiSchema,n=void 0===o?{}:o,i=a["ui:field"]||n["ui:field"];if("function"==typeof i||"object"===w(i)||"string"==typeof i)return{field:i,fieldProps:n["ui:fieldProps"]||a["ui:fieldProps"]};var s=e[W(a)];if(s)return{field:s};if(!s&&(a.anyOf||a.oneOf))return{field:null};throw new Error("不支持的field类型 ".concat(a.type))}function wt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.curNodePath,i=e.rootFormData,s=void 0===i?{}:i;return Object.assign.apply(Object,[{}].concat(D([t,o].map((function(e){return Object.keys(e).reduce((function(r,t){var a=e[t];return"ui:options"===t&&q(a)?F(F({},r),a):0===t.indexOf("ui:")?F(F({},r),{},E({},t.substring(3),void 0===n?a:gt(s,n,a,(function(){return a})))):r}),{})})))))}function Et(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.containsSpec,i=void 0===n||n,s=e.curNodePath,l=e.rootFormData,u={};return i&&(u.readonly=!!t.readOnly,void 0!==t.multipleOf&&(u.step=t.multipleOf),(t.minimum||0===t.minimum)&&(u.min=t.minimum),(t.maximum||0===t.maximum)&&(u.max=t.maximum),(t.minLength||0===t.minLength)&&(u.minlength=t.minLength),(t.maxLength||0===t.maxLength)&&(u.maxlength=t.maxLength),"date-time"!==t.format&&"date"!==t.format||("array"===t.type?(u.isRange=!0,u.isNumberValue=!(t.items&&"string"===t.items.type)):u.isNumberValue=!("string"===t.type))),F(F({title:t.title,description:t.description},u),wt({schema:t,uiSchema:o,curNodePath:s,rootFormData:l}))}function St(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.curNodePath,i=e.rootFormData,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,l=Et({schema:t,uiSchema:o,curNodePath:n,rootFormData:i});!l.widget&&s&&Object.assign(l,s({schema:t,uiSchema:o}));var u=l.widget,c=l.title,d=l.labelWidth,m=l.description,p=l.attrs,h=l.class,f=l.style,v=l.fieldAttrs,g=l.fieldStyle,y=l.fieldClass,b=l.emptyValue,P=l.width,w=l.getWidget,E=l.onChange,S=O(l,["widget","title","labelWidth","description","attrs","class","style","fieldAttrs","fieldStyle","fieldClass","emptyValue","width","getWidget","onChange"]);return{widget:u,label:c,labelWidth:d,description:m,widgetAttrs:p,widgetClass:h,widgetStyle:f,fieldAttrs:v,width:P,fieldStyle:g,fieldClass:y,emptyValue:b,getWidget:w,onChange:E,uiProps:S}}function xt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.errorSchema,i=void 0===n?{}:n;return Object.assign.apply(Object,[{}].concat(D([t,o,i].map((function(e){return Object.keys(e).reduce((function(r,t){var a=e[t];return"err:options"===t&&q(a)?F(F({},r),a):0===t.indexOf("err:")?F(F({},r),{},E({},t.substring(4),a)):r}),{})})))))}function Ft(e,r){if(!Array.isArray(r))return e;var t,a=function(e){return e.reduce((function(e,r){return e[r]=!0,e}),{})},o=a(e),n=r.filter((function(e){return"*"===e||o[e]})),i=a(n),s=e.filter((function(e){return!i[e]})),l=n.indexOf("*");if(-1===l){if(s.length)throw new Error("uiSchema order list does not contain ".concat((t=s).length>1?"properties '".concat(t.join("', '"),"'"):"property '".concat(t[0],"'")));return n}if(l!==n.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");var u=D(n);return u.splice.apply(u,[l,1].concat(D(s))),u}function Ot(e){return Array.isArray(e.enum)&&1===e.enum.length||e.hasOwnProperty("const")}function _t(e){if(Array.isArray(e.enum)&&1===e.enum.length)return e.enum[0];if(e.hasOwnProperty("const"))return e.const;throw new Error("schema cannot be inferred as a constant")}function Dt(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=ft(e,r),a=t.oneOf||t.anyOf;return!!Array.isArray(t.enum)||!!Array.isArray(a)&&a.every((function(e){return Ot(e)}))}function kt(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every((function(e){return q(e)}))}function jt(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!(!e.uniqueItems||!e.items)&&Dt(e.items,r)}function It(e){return e.additionalItems,q(e.additionalItems)}function At(e,r,t,a){if(e.enum){var o=wt({schema:e,uiSchema:r,curNodePath:t,rootFormData:a}).enumNames||e.enumNames;return e.enum.map((function(e,r){return{label:o&&o[r]||String(e),value:e}}))}var n=e.oneOf||e.anyOf,i=r.oneOf||r.anyOf;return n.map((function(e,r){var o=i&&i[r]?wt({schema:e,uiSchema:i[r],curNodePath:t,rootFormData:a}):{},n=_t(e);return{label:o.title||e.title||String(n),value:n}}))}function Ct(e,r,t){if(e)return e;if(r){var a=t.split(".").pop();if(a&&a!=="".concat(Number(a)))return a}return""}var Rt=Object.freeze({__proto__:null,replaceArrayIndex:yt,isHiddenWidget:bt,getUiField:Pt,getUserUiOptions:wt,getUiOptions:Et,getWidgetConfig:St,getUserErrOptions:xt,orderProperties:Ft,isConstant:Ot,toConstant:_t,isSelect:Dt,isFixedItems:kt,isMultiSelect:jt,allowAdditionalItems:It,optionsList:At,fallbackLabel:Ct}),$t=Tt(),Nt=null,Lt=null;function Tt(){var e=new Jr({errorDataPath:"property",allErrors:!0,multipleOfPrecision:8,schemaId:"auto",unknownFormats:"ignore"});return e.addFormat("data-url",/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/),e.addFormat("color",/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/),e}function zt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null===e?[]:e.map((function(e){var r=e.dataPath,t=e.keyword,a=e.message,o=e.params,n=e.schemaPath,i="".concat(r);return{name:t,property:i,message:a,params:o,stack:"".concat(i," ").concat(a).trim(),schemaPath:n}}))}function Vt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.transformErrors,o=e.additionalMetaSchemas,n=void 0===o?[]:o,i=e.customFormats,s=void 0===i?{}:i,l=!Q(Lt,n),u=!Q(Nt,s);(l||u)&&($t=Tt()),n&&l&&Array.isArray(n)&&($t.addMetaSchema(n),Lt=n),s&&u&&q(s)&&(Object.keys(s).forEach((function(e){$t.addFormat(e,s[e])})),Nt=s);var c=null;try{$t.validate(t,r)}catch(e){c=e}lt.getCurrentLocalize()($t.errors);var d=zt($t.errors);$t.errors=null;var m=c&&c.message&&"string"==typeof c.message&&c.message.includes("no schema with key or ref ");return m&&(d=[].concat(D(d),[{stack:c.message}])),"function"==typeof a&&(d=a(d)),{errors:d}}function qt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.uiSchema,o=e.transformErrors,n=e.additionalMetaSchemas,i=void 0===n?[]:n,s=e.customFormats,l=void 0===s?{}:s,u=e.errorSchema,c=void 0===u?{}:u,d=e.required,m=void 0!==d&&d,p=e.propPath,h=void 0===p?"":p,f=e.isOnlyFirstError,v=void 0===f||f,g="array"===t.type&&Array.isArray(r)&&0===r.length,y=void 0===r||g;if(m){if(y){var b={keyword:"required",params:{missingProperty:h}},P=xt({schema:t,uiSchema:a,errorSchema:c}).required;return P?b.message=P:lt.getCurrentLocalize()([b]),[b]}}else if(y&&!g)return[];var w=Vt({formData:r,schema:t,transformErrors:o,additionalMetaSchemas:i,customFormats:l}).errors;w=w.filter((function(e){return""===e.property&&!e.schemaPath.includes("#/anyOf/")&&!e.schemaPath.includes("#/oneOf/")||"additionalProperties"===e.name}));var E=xt({schema:t,uiSchema:a,errorSchema:c});return(v&&w.length>0?[w[0]]:w).reduce((function(e,r){return r.message=void 0!==E[r.name]?E[r.name]:r.message,e.push(r),e}),[])}function Mt(e,r){try{return $t.validate(e,r)}catch(e){return!1}}function Ut(e,r,t){for(var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=0;o<r.length;o++){var n=ft(r[o],t,e);if(n.properties){var i=F(F({},t.definitions?{definitions:t.definitions}:{}),{},{anyOf:Object.keys(n.properties).map((function(e){return{required:[e]}}))}),s=void 0;if(n.anyOf){var l=S({},n);l.allOf?l.allOf=l.allOf.slice():l.allOf=[],l.allOf.push(i),s=l}else s=Object.assign({},n,i);if(a||delete s.required,Mt(s,e))return o}else if(Mt(r[o],e))return o}return 0}var Wt=Object.freeze({__proto__:null,ajvValidateFormData:Vt,validateFormDataAndTransformMsg:qt,isValid:Mt,getMatchingOption:Ut});function Qt(e,r){if(Array.isArray(r))return Array.isArray(e)||(e=[]),r.map((function(r,t){return e[t]?Qt(e[t],r):r}));if(q(r)){var t=Object.assign({},e);return Object.keys(r).reduce((function(t,a){return t[a]=Qt(e?e[a]:{},r[a]),t}),t)}return r}function Bt(e,r,t){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],n=q(e)?e:{},i=q(a)?a:{};"allOf"in n&&(n=pt(n,t,i));var s=r;if(q(s)&&q(n.default))s=U(s,n.default);else if("default"in n)s=n.default;else{if("$ref"in n){var l=re(n.$ref,t);return Bt(l,s,t,i,o)}if(kt(n))s=n.items.map((function(e,a){return Bt(e,Array.isArray(r)?r[a]:void 0,t,i,o)}));else if("oneOf"in n){var u=ft(n.oneOf[Ut(i,n.oneOf,t)],t,i);if(n.properties&&u.properties){var c=U(n,u);delete c.oneOf,n=c}else n=u}else if("anyOf"in n){var d=ft(n.anyOf[Ut(i,n.anyOf,t)],t,i);if(n.properties&&d.properties){var m=U(n,d);delete m.anyOf,n=m}else n=d}}switch(void 0===s&&(s=n.default),W(n)){case"null":return null;case"object":return Object.keys(n.properties||{}).reduce((function(e,r){var a=Bt(n.properties[r],(s||{})[r],t,(i||{})[r],o);return(o||void 0!==a)&&(e[r]=a),e}),{});case"array":if(Array.isArray(s)&&(s=s.map((function(e,r){return Bt(n.items[r]||n.additionalItems||{},e,t,{},o)}))),Array.isArray(a)&&(s=a.map((function(e,r){return Bt(n.items,(s||{})[r],t,e,{},o)}))),n.minItems){if(jt(n,t))return s||[];var p=s?s.length:0;if(n.minItems>p){var h=s||[],f=Array.isArray(n.items)?n.additionalItems:n.items,v=ut(new Array(n.minItems-p),Bt(f,f.defaults,t,{},o));return h.concat(v)}}s=void 0===s?[]:s}return s}function Ht(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!q(e))throw new Error("Invalid schema: ".concat(e));var o=ft(e,t,r),n=Bt(o,e.default,t,r,a);return void 0===r?n:q(r)||Array.isArray(r)?Qt(n,r):0===r||!1===r||""===r?r:r||n}function Kt(e,r){void 0===r&&(r={});var t=r.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}Kt('.genFromComponent{font-size:14px;line-height:1;word-wrap:break-word;word-break:break-word;padding:0;margin:0}.genFromComponent a,.genFromComponent h1,.genFromComponent h2,.genFromComponent h3,.genFromComponent li,.genFromComponent p,.genFromComponent ul{font-size:14px}.genFromComponent .genFormIcon{width:12px;height:12px;vertical-align:top}.genFromComponent .genFormBtn{display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;background:#fff;border:1px solid #dcdfe6;color:#606266;-webkit-appearance:none;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;margin:0;-webkit-transition:.1s;transition:.1s;font-weight:500;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;padding:12px 20px;font-size:14px;border-radius:4px}.genFromComponent .genFormBtn.is-plain:focus,.genFromComponent .genFormBtn.is-plain:hover{background:#fff;border-color:#409eff;color:#409eff}.genFromComponent .hiddenWidget{display:none}.genFromComponent .fieldGroupWrap+.fieldGroupWrap .fieldGroupWrap_title{margin-top:20px}.genFromComponent .fieldGroupWrap_title{position:relative;display:block;width:100%;line-height:26px;margin-bottom:8px;font-size:15px;font-weight:700;border:0}.genFromComponent .fieldGroupWrap_des{font-size:12px;line-height:20px;margin-bottom:10px;color:#999}.genFromComponent .genFromWidget_des{padding:0;margin-top:0;margin-bottom:2px;font-size:12px;line-height:20px;color:#999;text-align:left}.genFromComponent .formItemErrorBox{margin:0 auto;color:#ff5757;padding-top:2px;position:absolute;top:100%;left:0;display:-webkit-box!important;line-height:16px;text-overflow:ellipsis;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1;white-space:normal;font-size:12px;text-align:left}.genFromComponent .genFormIcon-qs{fill:#606266;vertical-align:middle;display:inline-block;width:16px;height:16px;margin-left:2px;margin-top:-2px;cursor:pointer}.genFromComponent .genFormItemRequired:before{content:"*";color:#f56c6c;margin-right:4px}.genFromComponent .appendCombining_box{margin-bottom:22px}.genFromComponent .appendCombining_box .appendCombining_box{margin-bottom:10px}.genFromComponent .appendCombining_box{padding:10px;background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .validateWidget{margin-bottom:0!important;width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important;padding:0!important}.genFromComponent .validateWidget .formItemErrorBox{padding:5px 0;position:relative}.genFromComponent .arrayField:not(.genFormItem){margin-bottom:22px}.genFromComponent .arrayField:not(.genFormItem) .arrayField{margin-bottom:10px}.genFromComponent .arrayOrderList{background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .arrayOrderList_item{position:relative;padding:25px 10px 12px;border-radius:2px;margin-bottom:6px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.genFromComponent .arrayOrderList_bottomAddBtn{text-align:right;padding:15px 10px;margin-bottom:10px}.genFromComponent .bottomAddBtn{width:40%;min-width:10px;max-width:180px}.genFromComponent .arrayListItem_content{padding-top:15px;-webkit-box-flex:1;-ms-flex:1;flex:1;margin:0 auto;-webkit-box-shadow:0 -1px 0 0 rgba(0,0,0,.05);box-shadow:0 -1px 0 0 rgba(0,0,0,.05)}.genFromComponent .arrayListItem_index,.genFromComponent .arrayListItem_operateTool{position:absolute;height:25px}.genFromComponent .arrayListItem_index{top:6px;line-height:18px;height:18px;padding:0 6px;background-color:rgba(0,0,0,.28);color:#fff;font-size:12px;border-radius:2px}.genFromComponent .arrayListItem_operateTool{width:75px;right:9px;top:-1px;text-align:right;font-size:0}.genFromComponent .arrayListItem_btn{vertical-align:top;display:inline-block;padding:6px;margin:0;font-size:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none;cursor:pointer;text-align:center;background:transparent;color:#666}.genFromComponent .arrayListItem_btn:hover{opacity:.6}.genFromComponent .arrayListItem_btn[disabled]{color:#999;opacity:.3!important;cursor:not-allowed}.genFromComponent .arrayListItem_orderBtn-bottom,.genFromComponent .arrayListItem_orderBtn-top{background-color:#f0f9eb}.genFromComponent .arrayListItem_btn-delete{background-color:#fef0f0}.genFromComponent .formFooter_item{text-align:right;border-top:1px solid rgba(0,0,0,.08);padding-top:10px}.genFromComponent.formInlineFooter>.fieldGroupWrap{display:inline-block;margin-right:10px}.genFromComponent.formInline .genFormItem{display:inline-block;margin-right:10px;vertical-align:top}.genFromComponent.formInline .validateWidget{margin-right:0}.genFromComponent.formInline .formFooter_item{border-top:none;padding-top:0}.layoutColumn .layoutColumn_w100{width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important}.layoutColumn .fieldGroupWrap_box{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start}.layoutColumn .fieldGroupWrap_box>div{width:100%;-ms-flex-preferred-size:100%;flex-basis:100%}.layoutColumn .fieldGroupWrap_box>.genFormItem{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;-webkit-box-sizing:border-box;box-sizing:border-box;padding-right:10px}.layoutColumn.layoutColumn-1 .fieldGroupWrap_box>.genFormItem{padding-right:0}.layoutColumn.layoutColumn-2 .fieldGroupWrap_box>.genFormItem{width:50%;-ms-flex-preferred-size:50%;flex-basis:50%}.layoutColumn.layoutColumn-3 .fieldGroupWrap_box>.genFormItem{width:33.333%;-ms-flex-preferred-size:33.333%;flex-basis:33.333%}');var Gt={formFooter:{type:Object,default:function(){return{show:!0,okBtn:"保存",cancelBtn:"取消"}}},modelValue:{type:null,default:function(){return{}},required:!0},fallbackLabel:{type:Boolean,default:!1},formProps:{type:Object,default:function(){return{}}},schema:{type:Object,default:function(){return{}},required:!0},uiSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},errorSchema:{type:Object,default:function(){return{}}}},Jt={name:"FormFooter",props:{okBtn:{type:String,default:"保存"},cancelBtn:{type:String,default:"取消"},formItemAttrs:{type:Object,default:function(){return{}}},globalOptions:{type:Object,default:function(){return{}}}},emits:["cancel","submit"],setup:function(e,t){var a=t.emit,o=e.globalOptions.COMPONENT_MAP;return function(){return r(z(o.formItem),F({class:{formFooter_item:!0}},e.formItemAttrs),{default:function(){return[r(z(o.button),{onClick:function(){a("cancel")}},{default:function(){return e.cancelBtn}}),r(z(o.button),{style:{marginLeft:"10px"},type:"primary",onClick:function(){a("submit")}},{default:function(){return e.okBtn}})]}})}}},Zt={name:"FieldGroupWrap",inject:["genFormProvide"],props:{curNodePath:{type:String,default:""},showTitle:{type:Boolean,default:!0},showDescription:{type:Boolean,default:!0},title:{type:String,default:""},description:{type:String,default:""}},computed:{trueTitle:function(){var e=this.title;if(e)return e;var r=(this.genFormProvide.value||this.genFormProvide).fallbackLabel&&this.curNodePath.split(".").pop();return r!=="".concat(Number(r))?r:""}}},Yt={class:"fieldGroupWrap"},Xt={key:0,class:"fieldGroupWrap_title"},ea={class:"fieldGroupWrap_box"};Zt.render=function(e,r,l,u,c,d){return t(),a("div",Yt,[l.showTitle&&d.trueTitle?(t(),a("h3",Xt,o(d.trueTitle),1)):n("v-if",!0),l.showDescription&&l.description?(t(),a("p",{key:1,class:"fieldGroupWrap_des",innerHTML:l.description},null,8,["innerHTML"])):n("v-if",!0),i("div",ea,[s(e.$slots,"default")])])},Zt.__file="utils/components/FieldGroupWrap.vue";var ra={formProps:{type:null},globalOptions:{type:null},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},customFormats:{type:Object,default:function(){return{}}},rootSchema:{type:Object,default:function(){return{}}},rootFormData:{type:null,default:function(){return{}}},curNodePath:{type:String,default:""},required:{type:Boolean,default:!1},needValidFieldGroup:{type:Boolean,default:!0}},ta={class:"genFormIcon genFormIcon-down",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},aa=i("path",{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"},null,-1);var oa={render:function(e,r){return t(),a("svg",ta,[aa])},__file:"utils/icons/IconCaretDown.vue"},na={class:"genFormIcon genFormIcon-up",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},ia=i("path",{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"},null,-1);var sa={render:function(e,r){return t(),a("svg",na,[ia])},__file:"utils/icons/IconCaretUp.vue"},la={class:"genFormIcon genFormIcon-close",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},ua=i("path",{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1\n 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0\n 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"},null,-1);var ca={render:function(e,r){return t(),a("svg",la,[ua])},__file:"utils/icons/IconClose.vue"},da={class:"genFormIcon genFormIcon-plus",t:"1551322312294",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"10297","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"200",height:"200"},ma=i("path",{d:"M474 152m8 0l60 0q8 0 8 8l0 704q0 8-8 8l-60 0q-8 0-8-8l0-704q0-8 8-8Z","p-id":"10298"},null,-1),pa=i("path",{d:"M168 474m8 0l672 0q8 0 8 8l0 60q0 8-8 8l-672 0q-8 0-8-8l0-60q0-8 8-8Z","p-id":"10299"},null,-1);var ha={render:function(e,r){return t(),a("svg",da,[ma,pa])},__file:"utils/icons/IconPlus.vue"},fa={class:"genFormIcon genFormIcon-qs",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},va=i("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 708c-22.1\n 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 0\n 0-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8\n 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6\n 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6\n 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z"},null,-1);var ga={render:function(e,r){return t(),a("svg",fa,[va])},__file:"utils/icons/IconQuestion.vue"},ya={name:"Widget",props:{isFormData:{type:Boolean,default:!0},curValue:{type:null,default:0},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},widget:{type:[String,Function,Object],default:null},required:{type:Boolean,default:!1},emptyValue:{type:null,default:void 0},rootFormData:{type:null},curNodePath:{type:String,default:""},label:{type:String,default:""},width:{type:String,default:""},labelWidth:{type:String,default:""},description:{type:String,default:""},widgetAttrs:{type:Object,default:function(){return{}}},widgetClass:{type:Object,default:function(){return{}}},widgetStyle:{type:Object,default:function(){return{}}},fieldAttrs:{type:Object,default:function(){return{}}},fieldClass:{type:Object,default:function(){return{}}},fieldStyle:{type:Object,default:function(){return{}}},uiProps:{type:Object,default:function(){return{}}},formProps:null,getWidget:null,globalOptions:null,onChange:null},emits:["change"],inheritAttrs:!0,setup:function(e,t){var a=t.emit,o=l("genFormProvide"),n=u({get:function(){return e.isFormData?$(e.rootFormData,e.curNodePath):e.curValue},set:function(r){var t=""===r||null===r?e.emptyValue:r;e.isFormData&&T(e.rootFormData,e.curNodePath,t),a("change",t)}});e.uiProps.enumOptions&&e.uiProps.enumOptions.length>0&&void 0===n.value&&n.value!==e.uiProps.enumOptions[0]&&(e.schema.items?n.value=[]:e.required&&(n.value=e.uiProps.enumOptions[0].value));var i=c(null);return"function"==typeof e.getWidget&&d(i,(function(){e.getWidget.call(null,i.value)})),function(){var t=C(e.curNodePath),a=e.globalOptions.HELPERS.isMiniDes(e.formProps),s=e.description?r("div",{innerHTML:e.description,class:{genFromWidget_des:!0}}):null,l=e.globalOptions.COMPONENT_MAP,u=a&&s?r(z(l.popover),{style:{margin:"0 2px",fontSize:"16px",cursor:"pointer"},placement:"top",trigger:"hover"},{default:function(){return s},reference:function(){return r(ga)}}):null,c=F(F({},e.fieldStyle),e.width?{width:e.width,flexBasis:e.width,paddingRight:"10px"}:{}),d=Ct(e.label,e.widget&&o.value.fallbackLabel,e.curNodePath);return r(z(l.formItem),F(F(F({class:F(F({},e.fieldClass),{},{genFormItem:!0}),style:c},e.fieldAttrs),e.labelWidth?{labelWidth:e.labelWidth}:{}),e.isFormData?{prop:t?"__$$root":e.curNodePath,rules:[{validator:function(r,a,o){t&&(a=e.rootFormData);var n=qt({formData:a,schema:e.schema,uiSchema:e.uiSchema,customFormats:e.customFormats,errorSchema:e.errorSchema,required:e.required,propPath:e.curNodePath});if(n.length>0)return o?o(n[0].message):Promise.reject(n[0].message);var i=e.customRule;return i&&"function"==typeof i?i({field:e.curNodePath,value:a,rootFormData:e.rootFormData,callback:o}):o?o():Promise.resolve()},trigger:"blur"}]}:{}),F(F({error:function(e){return e.error?r("div",{class:{formItemErrorBox:!0},title:e.error},[e.error]):null}},d?{label:function(){return r("span",{class:{genFormLabel:!0,genFormItemRequired:e.required}},["".concat(d)].concat(D(u?[u]:[]),["".concat(e.formProps&&e.formProps.labelSuffix||"")]))}}:{}),{},{default:function(t){return[].concat(D(!a&&s?[s]:[]),D(e.widget?[r(z(e.widget),F(F(F({style:e.widgetStyle,class:e.widgetClass},e.widgetAttrs),e.uiProps),{},{modelValue:n.value,ref:i,"onUpdate:modelValue":function(r){var t=n.value;t!==r&&(n.value=r,e.onChange&&e.onChange(r,t))}},t))]:[]))}}))}}},ba={name:"ObjectField",props:ra,setup:function(e){return function(){var t=e.curNodePath,a=Et({schema:e.schema,uiSchema:e.uiSchema,curNodePath:t,rootFormData:e.rootFormData}),o=a.title,n=a.description,i=a.showTitle,s=a.showDescription,l=a.order,u=a.fieldClass,c=a.fieldAttrs,d=a.fieldStyle,m=a.onlyShowIfDependent,p=Ft(Object.keys(e.schema.properties||{}),l).map((function(a){var o=function(r){return Array.isArray(e.schema.required)&&!!~e.schema.required.indexOf(r)}(a),n=function(r){var t=!1,a=!1;return q(e.schema.dependencies)&&(a=Object.entries(e.schema.dependencies).some((function(a){var o=_(a,2),n=o[0],i=o[1],s=!(!Array.isArray(i)||!~i.indexOf(r));return t=t||s,s&&void 0!==$(e.rootFormData,e.curNodePath)[n]}))),{isDependency:t,curDependent:a}}(a),i=n.isDependency,s=n.curDependent;return i&&m&&!s?null:r(Aa,F(F({key:a},e),{},{schema:e.schema.properties[a],uiSchema:e.uiSchema[a],errorSchema:e.errorSchema[a],required:o||s,curNodePath:R(t,a)}))}));return r(Zt,F({title:o,description:n,showTitle:i,showDescription:s,curNodePath:t,class:F({},u),style:d},c),{default:function(){return[].concat(D(p),D(e.needValidFieldGroup?[r(ya,{key:"validateWidget-object",class:{validateWidget:!0,"validateWidget-object":!0},schema:Object.entries(e.schema).reduce((function(r,t){var a=_(t,2),o=a[0],n=a[1];return!1!==e.schema.additionalProperties&&["properties","id","$id"].includes(o)||(r[o]=n),r}),{}),uiSchema:e.uiSchema,errorSchema:e.errorSchema,curNodePath:t,rootFormData:e.rootFormData,globalOptions:e.globalOptions})]:[]))}})}}},Pa={name:"StringField",props:ra,setup:function(e,t){var a=t.attrs,o=u((function(){var r=Dt(e.schema)&&At(e.schema,e.uiSchema,e.curNodePath,e.rootFormData),t=St({schema:e.schema,uiSchema:e.uiSchema,curNodePath:e.curNodePath,rootFormData:e.rootFormData},(function(){var t="number"===e.schema.type||"integer"===e.schema.type;return{widget:r?e.globalOptions.WIDGET_MAP.common.select:e.globalOptions.WIDGET_MAP.formats[e.schema.format]||(t?e.globalOptions.WIDGET_MAP.types.number:e.globalOptions.WIDGET_MAP.types.string)}}));return r&&!t.uiProps.enumOptions&&(t.uiProps.enumOptions=r),t}));return function(){return r(ya,F(F(F({},e),a),o.value))}}},wa={name:"NumberField",props:ra,setup:function(e,t){var a=t.attrs;return function(){return r(Pa,F(F({},e),a))}}},Ea={name:"IntegerField",props:ra,setup:function(e,t){var a=t.attrs;return function(){return r(Pa,F(F({},e),a))}}},Sa={name:"BooleanField",props:ra,setup:function(e,t){var a=t.attrs;return function(){var t=e.schema,o=e.uiSchema,n=e.curNodePath,i=e.rootFormData,s=e.globalOptions,l=At({enumNames:t.enumNames||["true","false"],enum:t.enum||[!0,!1]},o,n,i),u=St({schema:t,uiSchema:o,curNodePath:n,rootFormData:i},(function(){return{widget:s.WIDGET_MAP.types.boolean}}));return u.uiProps.enumOptions=u.uiProps.enumOptions||l,r(ya,F(F(F({},a),e),u))}}},xa={name:"ArrayOrderList",emits:["arrayOperate"],props:{vNodeList:{type:Array,default:[]},tupleItemsLength:{type:Number,default:0},addable:{type:Boolean,default:!0},showIndexNumber:{type:Boolean,default:!1},sortable:{type:Boolean,default:!0},removable:{type:Boolean,default:!0},maxItems:{},minItems:{},globalOptions:null},setup:function(e,t){var a=t.emit,o=u((function(){var r=e.addable,t=e.maxItems,a=e.vNodeList;return!!r&&(void 0===t||a.length<t)})),n=u((function(){var r=e.removable,t=e.minItems,a=e.vNodeList;return!!r&&(void 0===t||a.length>t)}));return function(){return e.vNodeList.length<=0&&!e.addable?null:r("div",{class:{arrayOrderList:!0}},e.vNodeList.map((function(t,o){var i=t.key,s=t.vNode,l=e.tupleItemsLength+o,u=o+1;return r("div",{key:i,class:{arrayOrderList_item:!0}},[e.showIndexNumber?r("div",{class:{arrayListItem_index:!0}},u):null,r("div",{class:{arrayListItem_operateTool:!0}},[r("button",{style:F({},e.sortable?{}:{display:"none"}),class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-top":!0},type:"button",disabled:!e.sortable||0===o,onClick:function(){a("arrayOperate",{command:"moveUp",data:{index:l}})}},[r(sa)]),r("button",{style:F({},e.sortable?{}:{display:"none"}),class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-bottom":!0},type:"button",disabled:!e.sortable||o===e.vNodeList.length-1,onClick:function(){a("arrayOperate",{command:"moveDown",data:{index:l}})}},[r(oa)]),r("button",{style:F({},e.removable?{}:{display:"none"}),class:{arrayListItem_btn:!0,"arrayListItem_btn-delete":!0},type:"button",disabled:!n.value,onClick:function(){a("arrayOperate",{command:"remove",data:{index:l}})}},[r(ca)])]),r("div",{class:{arrayListItem_content:!0}},[s])])})).concat([r("p",{style:F({},o.value?{}:{display:"none"}),class:{arrayOrderList_bottomAddBtn:!0}},[r("button",{class:{bottomAddBtn:!0,"is-plain":!0,genFormBtn:!0},type:"button",onClick:function(){a("arrayOperate",{command:"add"})}},[r(ha,{style:{marginRight:"5px"}}),e.maxItems?"( ".concat(e.vNodeList.length," / ").concat(e.maxItems," )"):""])])]))}}},Fa={name:"ArrayFieldNormal",props:F(F({},ra),{},{itemsFormData:{type:Array}}),setup:function(e,t){var a=t.attrs;return function(){var t=e.schema,o=e.uiSchema,n=e.curNodePath,i=e.rootFormData,s=e.itemsFormData,l=e.errorSchema,u=e.globalOptions,c=Et({schema:t,uiSchema:o,curNodePath:n,rootFormData:i}),d=c.title,m=c.description,p=c.addable,h=c.showIndexNumber,f=c.sortable,v=c.removable,g=c.showTitle,y=c.showDescription,b=c.fieldClass,P=c.fieldAttrs,w=c.fieldStyle,E=s.map((function(a,i){var s=yt({schema:t.items,uiSchema:o.items},i);return{key:a.key,vNode:r(Aa,F(F({key:a.key},e),{},{schema:t.items,required:![].concat(t.items.type).includes("null"),uiSchema:F(F({},o.items),s),errorSchema:l.items,curNodePath:R(n,i)}))}}));return r(Zt,{title:d,description:m,showTitle:g,showDescription:y,curNodePath:n,class:b,attrs:P,style:w},{default:function(){return r(xa,F(F({},a),{},{vNodeList:E,showIndexNumber:h,addable:p,sortable:f,removable:v,maxItems:t.maxItems,minItems:t.minItems,globalOptions:u}))}})}}},Oa={name:"ArrayFieldMultiSelect",props:F({},ra),setup:function(e,t){var a=t.attrs;return function(){var t=e.schema,o=e.rootSchema,n=e.uiSchema,i=e.curNodePath,s=e.rootFormData,l=e.globalOptions,u=At(ft(t.items,o),n,i,s),c=St({schema:t,uiSchema:n,curNodePath:i,rootFormData:s},(function(){return{widget:l.WIDGET_MAP.common.checkboxGroup}}));return c.uiProps.multiple=!0,u&&!c.uiProps.enumOptions&&(c.uiProps.enumOptions=u),r(ya,F(F(F({},a),e),c))}}},_a={name:"ArrayFieldTuple",props:F(F({},ra),{},{itemsFormData:{type:Array,default:function(){return[]}}}),emits:["arrayOperate"],setup:function(e,t){var a=t.emit;t.attrs;return function(){var r=!Array.isArray(e.itemsFormData);if(r||e.itemsFormData.length<e.schema.items.length){var t=Ht(e.schema,void 0,e.rootSchema);a("arrayOperate",r?{command:"setNewTarget",data:{newTarget:t}}:{command:"batchPush",data:{pushArray:t.slice(e.itemsFormData.length)}})}}(),function(){if(!Array.isArray(e.itemsFormData))return null;var t,o,n=e.schema,i=e.uiSchema,s=e.errorSchema,l=e.curNodePath,u=e.globalOptions,c=Et({schema:n,uiSchema:i,curNodePath:l,rootFormData:e.rootFormData}),d=c.title,m=c.description,p=c.addable,h=c.showIndexNumber,f=c.sortable,v=c.removable,g=c.showTitle,y=c.showDescription,b=c.fieldClass,P=c.fieldAttrs,w=c.fieldStyle,E=(t=e.itemsFormData,o=e.schema.items.length-1,t.reduce((function(e,r,t){return e[t>o?1:0].push(r),e}),[[],[]])),S=E[0].map((function(t,a){return r(Aa,F(F({key:t.key},e),{},{required:![].concat(n.items[a].type).includes("null"),schema:n.items[a],uiSchema:i.items?i.items[a]:{},errorSchema:s.items?s.items[a]:{},curNodePath:R(l,a)}))})),x=E[1].map((function(t,a){var o=yt({schema:n.additionalItems,uiSchema:i.additionalItems},a);return{key:t.key,vNode:r(Aa,F(F({key:t.key},e),{},{schema:n.additionalItems,required:![].concat(n.additionalItems.type).includes("null"),uiSchema:F(F({},i.additionalItems),o),errorSchema:s.additionalItems,curNodePath:R(e.curNodePath,a+n.items.length)}))}})),O=(void 0===p||p)&&It(e.schema);return r(Zt,F(F({title:d,description:m,showTitle:g,showDescription:y,curNodePath:l},P),{},{class:b,style:w}),{default:function(){return[].concat(D(S),[r(xa,{onArrayOperate:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return a.apply(void 0,["arrayOperate"].concat(r))},vNodeList:x,tupleItemsLength:n.items.length,addable:O,showIndexNumber:h,sortable:f,removable:v,maxItems:n.maxItems,minItems:n.minItems,globalOptions:u})])}})}}},Da={name:"ArrayFieldSpecialFormat",props:ra,setup:function(e,t){var a=t.attrs,o=e.schema,n=e.uiSchema,i=e.curNodePath,s=e.rootFormData,l=St({schema:F({"ui:widget":e.globalOptions.WIDGET_MAP.formats[o.format]},o),uiSchema:n,curNodePath:i,rootFormData:s});return function(){return r(ya,F(F(F({},a),e),l))}}},ka={name:"ArrayField",props:ra,setup:function(e){var t=function(){var r=$(e.rootFormData,e.curNodePath);return Array.isArray(r)?r:[]},a=c(t().map((function(){return K()}))),o=u((function(){return t()}));d(o,(function(e,r){e!==r&&m(e)!==m(r)&&Array.isArray(e)&&(a.value=e.map((function(){return K()})))}),{deep:!0});var n=u((function(){return o.value.map((function(e,r){return{key:a.value[r],value:e}}))})),i=function(r){var t=r.command,n=r.data,i={moveUp:function(e,r){!function(e,r){if(0===r)return!1;var t=[e[r],e[r-1]];e.splice.apply(e,[r-1,2].concat(t))}(e,r.index)},moveDown:function(e,r){!function(e,r){if(r===e.length-1)return!1;var t=e[r],a=[e[r+1],t];e.splice.apply(e,[r,2].concat(a))}(e,r.index)},remove:function(e,r){!function(e,r){e.splice(r,1).length}(e,r.index)},add:function(e,r){var t=r.newRowData;e.push(t)},batchPush:function(e,r){r.pushArray.forEach((function(r){e.push(r)}))},setNewTarget:function(e,r){T(r.formData,r.nodePath,r.newTarget)}}[t];if(!i)throw new Error("错误 - 未知的操作:[".concat(t,"]"));var s,l,u,c=n,d=n;"add"===t?(c={newRowData:(s=e.schema,l=e.rootSchema,u=s.items,kt(s)&&It(s)&&(u=s.additionalItems),Ht(u,void 0,l))},d={newRowData:K()}):"batchPush"===t?d={pushArray:c.pushArray.map((function(e){return K()}))}:"setNewTarget"===t&&(c={formData:e.rootFormData,nodePath:e.curNodePath,newTarget:c.newTarget},d={formData:a,nodePath:"value",newTarget:c.newTarget.map((function(e){return K()}))}),i.apply(null,[a.value,d]),i.apply(null,[o.value,c])};return function(){var t=e.schema,a=e.uiSchema,o=e.rootSchema,s=e.rootFormData,l=e.curNodePath,u=e.globalOptions;if(!t.hasOwnProperty("items"))throw new Error("[".concat(t,"] 请先定义 items属性"));if(jt(t,o))return r(Oa,F(F({},e),{},{class:E({},Y(Oa.name),!0)}));if(t.format||t["ui:widget"]||a["ui:widget"])return r(Da,F(F({},e),{},{class:E({},Y(Da.name),!0)}));var c=kt(t)?_a:Fa;return r("div",[r(c,F(F({itemsFormData:n.value},e),{},{onArrayOperate:i,class:E({},Y(c.name),!0)})),e.needValidFieldGroup?r(ya,{key:"validateWidget-array",class:{validateWidget:!0,"validateWidget-array":!0},schema:Object.entries(t).reduce((function(e,r){var t=_(r,2),a=t[0],o=t[1];return"items"!==a&&(e[a]=o),e}),{}),uiSchema:a,errorSchema:e.errorSchema,curNodePath:l,rootFormData:s,globalOptions:u}):null])}}},ja={name:"SelectLinkageField",props:F(F({},ra),{},{combiningType:{type:String,default:"anyOf"},selectList:{type:Array,require:!0}}),setup:function(e){var t,a,o=c((t=$(e.rootFormData,e.curNodePath),0!==(a=Ut(t,e.selectList,e.rootSchema,!0))?a:e.curSelectIndex||0)),n=function(){var t=St({schema:e.schema["".concat(e.combiningType,"Select")]||{},uiSchema:e.uiSchema["".concat(e.combiningType,"Select")]||{},curNodePath:e.curNodePath,rootFormData:e.rootFormData},(function(){return{widget:"SelectWidget"}}));if(t.label=t.label||e.schema.title,t.description=t.description||e.schema.description,!t.uiProps.enumOptions){var a=e.uiSchema[e.combiningType]||[];t.uiProps.enumOptions=e.selectList.map((function(e,r){return{label:Et({schema:e,uiSchema:a[r],containsSpec:!1}).title||"选项 ".concat(r+1),value:r}}))}return r(ya,F(F({key:"fieldSelect_".concat(e.combiningType),class:E({},"fieldSelect_".concat(e.combiningType),!0),isFormData:!1,curValue:o.value,globalOptions:e.globalOptions},t),{},{onChange:function(e){o.value=e}}))};return d(o,(function(r,t){var a=$(e.rootFormData,e.curNodePath),o=Ht(e.selectList[r],void 0,e.rootSchema),n=Object.prototype.hasOwnProperty;if(q(a)){var i=ft(e.selectList[t],e.rootSchema);if("object"===W(i))for(var s in i.properties)n.call(i.properties,s)&&!n.call(o,s)&&L(a,s)}q(o)?Object.entries(o).forEach((function(e){var r=_(e,2),t=r[0],o=r[1];void 0!==o&&T(a,t,o)})):T(e.rootFormData,e.curNodePath,o||a)})),function(){var t,a=e.curNodePath,i=A(a),s=null;if(("object"===e.schema.type||e.schema.properties)&&!function(e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!1;return!0}(e.schema.properties)){var l,u=Object.assign({},e.schema);delete u[e.combiningType],s=r(Aa,F(F({key:"origin_".concat(e.combiningType),class:(l={},E(l,"".concat(e.combiningType,"_originBox"),!0),E(l,"".concat(i,"-originBox"),!0),l)},e),{},{schema:u}))}var c=[n()],d=e.selectList[o.value];if(d){var m=e.schema,p=e.combiningType,h="".concat(e.combiningType,"Select");m.properties,m[p],m[h];var f=O(m,["properties",p,h].map(I));d=Object.assign({},f,d);var v=G(Et({schema:e.schema,uiSchema:e.uiSchema,containsSpec:!1,curNodePath:a,rootFormData:e.rootFormData}),(function(r){return r===e.combiningType?void 0:"ui:".concat(r)})),g=G(xt({schema:e.schema,uiSchema:e.uiSchema,errorSchema:e.errorSchema}),(function(r){return r===e.combiningType?void 0:"err:".concat(r)}));c.push(r(Aa,F(F({key:"appendSchema_".concat(e.combiningType)},e),{},{schema:F({"ui:showTitle":!1,"ui:showDescription":!1},d),required:e.required,uiSchema:F(F({},v),(e.uiSchema[e.combiningType]||[])[o.value]),errorSchema:F(F({},g),(e.errorSchema[e.combiningType]||[])[o.value])})))}return c.push(r(ya,{key:"validateWidget-".concat(e.combiningType),class:E({validateWidget:!0},"validateWidget-".concat(e.combiningType),!0),schema:e.schema,uiSchema:e.uiSchema,errorSchema:e.errorSchema,curNodePath:e.curNodePath,rootFormData:e.rootFormData,globalOptions:e.globalOptions})),r("div",[s,r("div",{key:"appendBox_".concat(e.combiningType),class:(t={appendCombining_box:!0},E(t,"".concat(e.combiningType,"_appendBox"),!0),E(t,"".concat(i,"-appendBox"),!0),t)},c)])}}},Ia={array:ka,boolean:Sa,integer:Ea,number:wa,object:ba,string:Pa,null:{render:function(){return null}},anyOf:{name:"AnyOfField",setup:function(e,t){var a=t.attrs,o=t.slots;return function(){return r(ja,F(F({},a),{},{combiningType:"anyOf",selectList:a.schema.anyOf}),o)}}},oneOf:{name:"oneOfField",setup:function(e,t){var a=t.attrs,o=t.slots;return function(){return r(ja,F(F({},a),{},{combiningType:"oneOf",selectList:a.schema.oneOf}),o)}}}},Aa={name:"SchemaField",props:ra,setup:function(e){return function(){var t,a=ft(e.schema,e.rootSchema),o=F(F({},e),{},{schema:a});if(0===Object.keys(a).length)return null;var n,i,s=Pt(Ia,o),l=s.field,u=s.fieldProps,c=bt({schema:a,uiSchema:e.uiSchema,curNodePath:e.curNodePath,rootFormData:e.rootFormData}),d=A(e.curNodePath);return a.anyOf&&a.anyOf.length>0&&!Dt(a)?r(z(Ia.anyOf),F({class:(n={},E(n,"".concat(d,"-anyOf"),!0),E(n,"fieldItem",!0),E(n,"anyOfField",!0),n)},o)):a.oneOf&&a.oneOf.length>0&&!Dt(a)?r(z(Ia.oneOf),F({class:(i={},E(i,"".concat(d,"-oneOf"),!0),E(i,"fieldItem",!0),E(i,"oneOfField",!0),i)},o)):l&&!c?r(z(l),F(F({},o),{},{fieldProps:u,class:(t={},E(t,Y(l.name)||l,!0),E(t,"hiddenWidget",c),E(t,"fieldItem",!0),E(t,d,!0),t)})):null}}};var Ca={name:"CheckboxesWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}};Ca.render=function(r,n,i,s,l,u){var c=e("el-checkbox"),d=e("el-checkbox-group");return t(),a(d,r.$attrs,{default:f((function(){return[(t(!0),a(v,null,g(i.enumOptions,(function(e,r){return t(),a(c,{key:r,label:e.value},{default:f((function(){return[y(o(e.label),1)]})),_:2},1032,["label"])})),128))]})),_:1},16)},Ca.__file="src/config/widgets/CheckboxesWidget/index.vue";var Ra={name:"RadioWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}};Ra.render=function(r,n,i,s,l,u){var c=e("el-radio"),d=e("el-radio-group");return t(),a(d,r.$attrs,{default:f((function(){return[(t(!0),a(v,null,g(i.enumOptions,(function(e,r){return t(),a(c,{key:r,label:e.value},{default:f((function(){return[y(o(e.label),1)]})),_:2},1032,["label"])})),128))]})),_:1},16)},Ra.__file="src/config/widgets/RadioWidget/index.vue";var $a={name:"SelectWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}};function Na(e){return null===e||""===e||Array.isArray(e)&&e.every((function(e){return""===e}))}$a.render=function(r,o,n,i,s,l){var u=e("el-option"),c=e("el-select");return t(),a(c,r.$attrs,{default:f((function(){return[(t(!0),a(v,null,g(n.enumOptions,(function(e,r){return t(),a(u,{key:r,label:e.label,value:e.value},null,8,["label","value"])})),128))]})),_:1},16)},$a.__file="src/config/widgets/SelectWidget/index.vue";var La=function(e){var r=Z(e,!1),t=r.year,a=r.month,o=r.day;return"".concat(t,"-").concat(a,"-").concat(o)},Ta=function(e){if(e instanceof Date)return e;if("string"==typeof e){var r=_(e.split(":"),3),t=r[0],a=r[1],o=r[2],n=new Date;return n.setHours(+t),n.setMinutes(+a),n.setSeconds(+o),n}},za={CheckboxesWidget:Ca,RadioWidget:Ra,SelectWidget:$a,TimePickerWidget:{name:"TimePickerWidget",inheritAttrs:!1,props:{modelValue:{default:null,type:null}},setup:function(e,t){var a=t.attrs,o=t.slots,n=c(Ta(e.modelValue)),i=e.modelValue;return d((function(){return e.modelValue}),(function(e){e!==i&&(n.value=Ta(e))})),function(){return r(z("el-time-picker"),F(F({},a),{},{modelValue:n.value,"onUpdate:modelValue":function(e){var r,t,o,s;n.value=e,i=null===e?void 0:(r=Z(e,!0),t=r.hour,o=r.minute,s=r.second,"".concat(t,":").concat(o,":").concat(s)),a["onUpdate:modelValue"].apply(a,[i])}}),o)}}},DatePickerWidget:{name:"DatePickerWidget",inheritAttrs:!1,setup:function(e,t){var a=t.attrs,o=t.slots;return function(){var e=a||{},t=e.isNumberValue,n=e.isRange,i=O(e,["isNumberValue","isRange"]);return r(z("el-date-picker"),F(F({type:n?"daterange":"date"},i),{},{"onUpdate:modelValue":function(e){var r;r=n?Na(e)?[]:e.map((function(e){return t?new Date(e).valueOf():La(e)})):Na(e)?void 0:t?new Date(e).valueOf():La(e),a["onUpdate:modelValue"].apply(a,[r])}}),o)}}},DateTimePickerWidget:{name:"DateTimePickerWidget",inheritAttrs:!1,setup:function(e,t){var a=t.attrs,o=t.slots;return function(){var e=a||{},t=e.isNumberValue,n=e.isRange,i=O(e,["isNumberValue","isRange"]);return r(z("el-date-picker"),F(F({type:n?"datetimerange":"datetime"},i),{},{"onUpdate:modelValue":function(e){var r=function(e,r,t){return e?null===t?[]:t.map((function(e){return new Date(e)[r?"valueOf":"toISOString"]()})):null===t?void 0:new Date(t)[r?"valueOf":"toISOString"]()}(n,t,e);a["onUpdate:modelValue"].apply(a,[r])}}),o)}}},UploadWidget:{name:"UploadWidget",props:{modelValue:{default:null,type:[String,Array]},responseFileUrl:{default:function(){return function(e){return e?e.url||e.data&&e.data.url:""}},type:[Function]},btnText:{type:String,default:"点击上传"},slots:{type:null,default:null}},setup:function(e,t){var a=t.attrs,o=t.emit,n=e.modelValue,i=Array.isArray(n),s=a.fileList||(i?n.map((function(e,r){return{name:"已上传文件(".concat(r+1,")"),url:e}})):n?[{name:"已上传文件",url:n}]:[]),l=c(s),u=function(r){return r&&(r.response&&e.responseFileUrl(r.response)||r.url)||""},d=function(e){var r;if(i)r=e.length?e.reduce((function(e,r){var t=u(r);return t&&e.push(t),e}),[]):[];else{var t=e[e.length-1];r=u(t)}o("update:modelValue",r)},m=p().appContext.config.globalProperties;return function(){var t=F(F({fileList:l.value,"on-exceed":function(){m.$message&&m.$message.warning("超出文件上传数")},"on-error":function(){m.$message&&m.$message.error("文件上传失败")},"on-preview":function(e){var r=u(e);r&&function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_blank",t=document.createElement("a");t.style.display="none",t.target=r,t.href=e,document.body.appendChild(t),t.click(),document.body.removeChild(t)}(r)}},a),{},{"on-remove":function(e,r){d(r),a["on-remove"]&&a["on-remove"](e,r)},"on-success":function(e,r,t){d(t),a["on-success"]&&a["on-success"](e,r,t)}});i||(t.limit=1);var o=F({default:function(){return r(z("el-button"),{type:"primary"},{default:function(){return e.btnText}})}},e.slots||{});return r(z("el-upload"),t,o)}}}},Va={types:{boolean:"el-switch",string:"el-input",number:"el-input-number",integer:"el-input-number"},formats:{color:"el-color-picker",time:za.TimePickerWidget,date:za.DatePickerWidget,"date-time":za.DateTimePickerWidget},common:{select:za.SelectWidget,radioGroup:za.RadioWidget,checkboxGroup:za.CheckboxesWidget},widgetComponents:za};Kt(".genFromComponent.el-form--label-top .el-form-item__label{line-height:26px;padding-bottom:6px;font-size:14px}.genFromComponent .el-checkbox,.genFromComponent .el-color-picker{vertical-align:top}");var qa={WIDGET_MAP:Va,COMPONENT_MAP:{form:b({inheritAttrs:!1,setup:function(e,t){var a=t.attrs,o=t.slots,n=c(null);return a.setFormRef&&P((function(){a.setFormRef(n.value)})),function(){a.setFormRef;var e=O(a,["setFormRef"]);return r(z("el-form"),F({ref:n},e),o)}}}),formItem:"el-form-item",button:"el-button",popover:"el-popover"},HELPERS:{isMiniDes:function(e){return e&&["left","right"].includes(e.labelPosition)}}},Ma=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={name:"VueForm",props:Gt,emits:["update:modelValue","change","cancel","submit","validation-failed","form-mounted"],setup:function(a,o){var n=o.slots,i=o.emit;if(!t.installed&&e.WIDGET_MAP.widgetComponents){var s=p();Object.entries(e.WIDGET_MAP.widgetComponents).forEach((function(e){var r=_(e,2),t=r[0],a=r[1];return s.appContext.app.component(t,a)})),t.installed=!0}h("genFormProvide",u((function(){return{fallbackLabel:a.fallbackLabel}})));var l=c(Ht(a.schema,a.modelValue,a.schema)),m=u((function(){return F({show:!0,okBtn:"保存",cancelBtn:"取消"},a.formFooter)})),f=null,v=function(e,r){i("update:modelValue",e),i("change",{newValue:e,oldValue:r})},g=function(e,r){if(!Q(e,r)){var t=Ht(a.schema,a.modelValue,a.schema);Q(l.value,t)||(l.value=t)}};d(l,(function(e,r){v(e,r)}),{deep:!0}),d((function(){return a.schema}),(function(e,r){g(e,r)})),d((function(){return a.modelValue}),(function(e,r){g(e,r)})),v(l.value,a.modelValue);return function(){var t,o=a.formProps,s=o.layoutColumn,u=void 0===s?1:s,c=o.inlineFooter,d=o.inline,p=O(o,["layoutColumn","inlineFooter","inline"]),h={schema:a.schema,uiSchema:a.uiSchema,errorSchema:a.errorSchema,customFormats:a.customFormats,customRule:a.customRule,rootSchema:a.schema,rootFormData:l.value,curNodePath:"",globalOptions:e,formProps:F({labelSuffix:":",labelPosition:"top"},p)};return r(z(e.COMPONENT_MAP.form),F({class:(t={genFromComponent:!0,formInlineFooter:c,formInline:d},E(t,"genFromComponent_".concat(a.schema.id,"Form"),!!a.schema.id),E(t,"layoutColumn",!d),E(t,"layoutColumn-".concat(u),!d),t),setFormRef:function(e){f=e,i("form-mounted",e)},model:l},h.formProps),{default:function(){return[r(Aa,h),n.default?n.default({formData:l,formRefFn:function(){return f}}):m.value.show?r(Jt,{globalOptions:e,okBtn:m.value.okBtn,cancelBtn:m.value.cancelBtn,formItemAttrs:m.value.formItemAttrs,onCancel:function(){i("cancel")},onSubmit:function(){(f.$$validate||f.validate)((function(e,r){return e?i("submit",l):i("validation-failed",r)}))}}):[]]}})}},install:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.component(r.name||t.name,t)}};return t}(qa);export default Ma;export{Aa as SchemaField,ra as fieldProps,Rt as formUtils,Ht as getDefaultFormState,qa as globalOptions,lt as i18n,Wt as schemaValidate,V as vueUtils}; +!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var a=r.length-1,o=1;o<a;++o)r[o]=r[o].slice(1,-1);return r[a]=r[a].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function a(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function n(e){var a=r("[0-9]","[A-Fa-f]"),o=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),n="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",i=r("[\\:\\/\\?\\#\\[\\]\\@]",n),s=e?"[\\uE000-\\uF8FF]":"[]",l=r("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t("[A-Za-z]"+r("[A-Za-z]","[0-9]","[\\+\\-\\.]")+"*"),t(t(o+"|"+r(l,n,"[\\:]"))+"*");var u=t(t("25[0-5]")+"|"+t("2[0-4][0-9]")+"|"+t("1[0-9][0-9]")+"|"+t("0?[1-9][0-9]")+"|0?0?[0-9]"),c=t(u+"\\."+u+"\\."+u+"\\."+u),d=t(a+"{1,4}"),m=t(t(d+"\\:"+d)+"|"+c),p=t(t(d+"\\:")+"{6}"+m),h=t("\\:\\:"+t(d+"\\:")+"{5}"+m),f=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+m),v=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+m),g=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+m),y=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+m),b=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+m),P=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),w=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),E=t([p,h,f,v,g,y,b,P,w].join("|")),S=t(t(l+"|"+o)+"+");t("[vV]"+a+"+\\."+r(l,n,"[\\:]")+"+"),t(t(o+"|"+r(l,n))+"*");var x=t(o+"|"+r(l,n,"[\\:\\@]"));return t(t(o+"|"+r(l,n,"[\\@]"))+"+"),t(t(x+"|"+r("[\\/\\?]",s))+"*"),{NOT_SCHEME:new RegExp(r("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,n),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,n),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,n),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,n),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,n,"[\\:\\@\\/\\?]",s),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,n,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,n),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,i),"g"),PCT_ENCODED:new RegExp(o,"g"),IPV4ADDRESS:new RegExp("^("+c+")$"),IPV6ADDRESS:new RegExp("^\\[?("+E+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+S+")")+"?\\]?$")}}var i=n(!1),s=n(!0),l=function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,r){var t=[],a=!0,o=!1,n=void 0;try{for(var i,s=e[Symbol.iterator]();!(a=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);a=!0);}catch(e){o=!0,n=e}finally{try{!a&&s.return&&s.return()}finally{if(o)throw n}}return t}(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")},u=2147483647,c=/^xn--/,d=/[^\0-\x7E]/,m=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,f=String.fromCharCode;function v(e){throw new RangeError(p[e])}function g(e,r){var t=e.split("@"),a="";t.length>1&&(a=t[0]+"@",e=t[1]);var o=function(e,r){for(var t=[],a=e.length;a--;)t[a]=r(e[a]);return t}((e=e.replace(m,".")).split("."),r).join(".");return a+o}function y(e){for(var r=[],t=0,a=e.length;t<a;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<a){var 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}var b=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},P=function(e,r,t){var a=0;for(e=t?h(e/700):e>>1,e+=h(e/r);e>455;a+=36)e=h(e/35);return h(a+36*e/(e+38))},w=function(e){var r,t=[],a=e.length,o=0,n=128,i=72,s=e.lastIndexOf("-");s<0&&(s=0);for(var l=0;l<s;++l)e.charCodeAt(l)>=128&&v("not-basic"),t.push(e.charCodeAt(l));for(var c=s>0?s+1:0;c<a;){for(var d=o,m=1,p=36;;p+=36){c>=a&&v("invalid-input");var f=(r=e.charCodeAt(c++))-48<10?r-22:r-65<26?r-65:r-97<26?r-97:36;(f>=36||f>h((u-o)/m))&&v("overflow"),o+=f*m;var g=p<=i?1:p>=i+26?26:p-i;if(f<g)break;var y=36-g;m>h(u/y)&&v("overflow"),m*=y}var b=t.length+1;i=P(o-d,b,0==d),h(o/b)>u-n&&v("overflow"),n+=h(o/b),o%=b,t.splice(o++,0,n)}return String.fromCodePoint.apply(String,t)},E=function(e){var r=[],t=(e=y(e)).length,a=128,o=0,n=72,i=!0,s=!1,l=void 0;try{for(var c,d=e[Symbol.iterator]();!(i=(c=d.next()).done);i=!0){var m=c.value;m<128&&r.push(f(m))}}catch(e){s=!0,l=e}finally{try{!i&&d.return&&d.return()}finally{if(s)throw l}}var p=r.length,g=p;for(p&&r.push("-");g<t;){var w=u,E=!0,S=!1,x=void 0;try{for(var F,O=e[Symbol.iterator]();!(E=(F=O.next()).done);E=!0){var _=F.value;_>=a&&_<w&&(w=_)}}catch(e){S=!0,x=e}finally{try{!E&&O.return&&O.return()}finally{if(S)throw x}}var D=g+1;w-a>h((u-o)/D)&&v("overflow"),o+=(w-a)*D,a=w;var k=!0,j=!1,I=void 0;try{for(var A,C=e[Symbol.iterator]();!(k=(A=C.next()).done);k=!0){var R=A.value;if(R<a&&++o>u&&v("overflow"),R==a){for(var $=o,N=36;;N+=36){var L=N<=n?1:N>=n+26?26:N-n;if($<L)break;var T=$-L,z=36-L;r.push(f(b(L+T%z,0))),$=h(T/z)}r.push(f(b($,0))),n=P(o,D,g==p),o=0,++g}}}catch(e){j=!0,I=e}finally{try{!k&&C.return&&C.return()}finally{if(j)throw I}}++o,++a}return r.join("")},S=function(e){return g(e,(function(e){return d.test(e)?"xn--"+E(e):e}))},x=function(e){return g(e,(function(e){return c.test(e)?w(e.slice(4).toLowerCase()):e}))},F={};function O(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function _(e){for(var r="",t=0,a=e.length;t<a;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(a-t>=6){var n=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&n)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(a-t>=9){var i=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function D(e,r){function t(e){var t=_(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,O).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,O).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,O).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,O).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,O).replace(r.PCT_ENCODED,o)),e}function k(e){return e.replace(/^0*(.*)/,"$1")||"0"}function j(e,r){var t=e.match(r.IPV4ADDRESS)||[],a=l(t,2)[1];return a?a.split(".").map(k).join("."):e}function I(e,r){var t=e.match(r.IPV6ADDRESS)||[],a=l(t,3),o=a[1],n=a[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),u=s[0],c=s[1],d=c?c.split(":").map(k):[],m=u.split(":").map(k),p=r.IPV4ADDRESS.test(m[m.length-1]),h=p?7:8,f=m.length-h,v=Array(h),g=0;g<h;++g)v[g]=d[g]||m[f+g]||"";p&&(v[h-1]=j(v[h-1],r));var y=v.reduce((function(e,r,t){if(!r||"0"===r){var a=e[e.length-1];a&&a.index+a.length===t?a.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(y&&y.length>1){var P=v.slice(0,y.index),w=v.slice(y.index+y.length);b=P.join(":")+"::"+w.join(":")}else b=v.join(":");return n&&(b+="%"+n),b}return e}var A=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,C=void 0==="".match(/(){0}/)[1];function R(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},a=!1!==r.iri?s:i;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(A);if(o){C?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=I(j(t.host,a),a)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var n=F[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||n&&n.unicodeSupport)D(t,a);else{if(t.host&&(r.domainHost||n&&n.domainHost))try{t.host=S(t.host.replace(a.PCT_ENCODED,_).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}D(t,i)}n&&n.parse&&n.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function $(e,r){var t=!1!==r.iri?s:i,a=[];return void 0!==e.userinfo&&(a.push(e.userinfo),a.push("@")),void 0!==e.host&&a.push(I(j(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(a.push(":"),a.push(String(e.port))),a.length?a.join(""):void 0}var N=/^\.\.?\//,L=/^\/\.(\/|$)/,T=/^\/\.\.(\/|$)/,z=/^\/?(?:.|\n)*?(?=\/|$)/;function V(e){for(var r=[];e.length;)if(e.match(N))e=e.replace(N,"");else if(e.match(L))e=e.replace(L,"/");else if(e.match(T))e=e.replace(T,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(z);if(!t)throw new Error("Unexpected dot segment condition");var a=t[0];e=e.slice(a.length),r.push(a)}return r.join("")}function q(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?s:i,a=[],o=F[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?x(e.host):S(e.host.replace(t.PCT_ENCODED,_).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}D(e,t),"suffix"!==r.reference&&e.scheme&&(a.push(e.scheme),a.push(":"));var n=$(e,r);if(void 0!==n&&("suffix"!==r.reference&&a.push("//"),a.push(n),e.path&&"/"!==e.path.charAt(0)&&a.push("/")),void 0!==e.path){var l=e.path;r.absolutePath||o&&o.absolutePath||(l=V(l)),void 0===n&&(l=l.replace(/^\/\//,"/%2F")),a.push(l)}return void 0!==e.query&&(a.push("?"),a.push(e.query)),void 0!==e.fragment&&(a.push("#"),a.push(e.fragment)),a.join("")}function M(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],o={};return a||(e=R(q(e,t),t),r=R(q(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=V(r.path||""),o.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=V(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=V(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=V(o.path)),o.query=r.query):(o.path=e.path,void 0!==r.query?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function U(e,r){return e&&e.toString().replace(r&&r.iri?s.PCT_ENCODED:i.PCT_ENCODED,_)}var W={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},Q={scheme:"https",domainHost:W.domainHost,parse:W.parse,serialize:W.serialize};function B(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var H={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=B(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(B(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),a=l(t,2),o=a[0],n=a[1];e.path=o&&"/"!==o?o:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}},K={scheme:"wss",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize},G={},J="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Z="[0-9A-Fa-f]",Y=t(t("%[EFef]"+Z+"%"+Z+Z+"%"+Z+Z)+"|"+t("%[89A-Fa-f]"+Z+"%"+Z+Z)+"|"+t("%"+Z+Z)),X=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),ee=new RegExp(J,"g"),re=new RegExp(Y,"g"),te=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',X),"g"),ae=new RegExp(r("[^]",J,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),oe=ae;function ne(e){var r=_(e);return r.match(ee)?r:e}var ie={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,n={},i=t.query.split("&"),s=0,l=i.length;s<l;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var c=u[1].split(","),d=0,m=c.length;d<m;++d)a.push(c[d]);break;case"subject":t.subject=U(u[1],r);break;case"body":t.body=U(u[1],r);break;default:o=!0,n[U(u[0],r)]=U(u[1],r)}}o&&(t.headers=n)}t.query=void 0;for(var p=0,h=a.length;p<h;++p){var f=a[p].split("@");if(f[0]=U(f[0]),r.unicodeSupport)f[1]=U(f[1],r).toLowerCase();else try{f[1]=S(U(f[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}a[p]=f.join("@")}return t},serialize:function(e,r){var t,a=e,n=null!=(t=e.to)?t instanceof Array?t:"number"!=typeof t.length||t.split||t.setInterval||t.call?[t]:Array.prototype.slice.call(t):[];if(n){for(var i=0,s=n.length;i<s;++i){var l=String(n[i]),u=l.lastIndexOf("@"),c=l.slice(0,u).replace(re,ne).replace(re,o).replace(te,O),d=l.slice(u+1);try{d=r.iri?x(d):S(U(d,r).toLowerCase())}catch(e){a.error=a.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=c+"@"+d}a.path=n.join(",")}var m=e.headers=e.headers||{};e.subject&&(m.subject=e.subject),e.body&&(m.body=e.body);var p=[];for(var h in m)m[h]!==G[h]&&p.push(h.replace(re,ne).replace(re,o).replace(ae,O)+"="+m[h].replace(re,ne).replace(re,o).replace(oe,O));return p.length&&(a.query=p.join("&")),a}},se=/^([^\:]+)\:(.*)/,le={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(se),a=e;if(t){var o=r.scheme||a.scheme||"urn",n=t[1].toLowerCase(),i=t[2],s=o+":"+(r.nid||n),l=F[s];a.nid=n,a.nss=i,a.path=void 0,l&&(a=l.parse(a,r))}else a.error=a.error||"URN can not be parsed.";return a},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",a=e.nid,o=t+":"+(r.nid||a),n=F[o];n&&(e=n.serialize(e,r));var i=e,s=e.nss;return i.path=(a||r.nid)+":"+s,i}},ue=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ce={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match(ue)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};F[W.scheme]=W,F[Q.scheme]=Q,F[H.scheme]=H,F[K.scheme]=K,F[ie.scheme]=ie,F[le.scheme]=le,F[ce.scheme]=ce,e.SCHEMES=F,e.pctEncChar=O,e.pctDecChars=_,e.parse=R,e.removeDotSegments=V,e.serialize=q,e.resolveComponents=M,e.resolve=function(e,r,t){var a=function(e,r){var t=e;if(r)for(var a in r)t[a]=r[a];return t}({scheme:"null"},t);return q(M(R(e,a),R(r,a),a,!0),a)},e.normalize=function(e,r){return"string"==typeof e?e=q(R(e,r),r):"object"===a(e)&&(e=R(q(e,r),r)),e},e.equal=function(e,r,t){return"string"==typeof e?e=q(R(e,t),t):"object"===a(e)&&(e=q(e,t)),"string"==typeof r?r=q(R(r,t),t):"object"===a(r)&&(r=q(r,t)),e===r},e.escapeComponent=function(e,r){return e&&e.toString().replace(r&&r.iri?s.ESCAPE:i.ESCAPE,O)},e.unescapeComponent=U,Object.defineProperty(e,"__esModule",{value:!0})}(r)}));(oe=ne)&&oe.__esModule&&Object.prototype.hasOwnProperty.call(oe,"default")&&oe.default;var ie=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 a,o,n;if(Array.isArray(r)){if((a=r.length)!=t.length)return!1;for(o=a;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((a=(n=Object.keys(r)).length)!==Object.keys(t).length)return!1;for(o=a;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,n[o]))return!1;for(o=a;0!=o--;){var i=n[o];if(!e(r[i],t[i]))return!1}return!0}return r!=r&&t!=t},se={copy:function(e,r){for(var t in r=r||{},e)r[t]=e[t];return r},checkDataType:le,checkDataTypes:function(e,r,t){switch(e.length){case 1:return le(e[0],r,t,!0);default:var a="",o=ce(e);for(var n in o.array&&o.object&&(a=o.null?"(":"(!"+r+" || ",a+="typeof "+r+' !== "object")',delete o.null,delete o.array,delete o.object),o.number&&delete o.integer,o)a+=(a?" && ":"")+le(n,r,t,!0);return a}},coerceToTypes:function(e,r){if(Array.isArray(r)){for(var t=[],a=0;a<r.length;a++){var o=r[a];(ue[o]||"array"===e&&"array"===o)&&(t[t.length]=o)}if(t.length)return t}else{if(ue[r])return[r];if("array"===e&&"array"===r)return["array"]}},toHash:ce,getProperty:pe,escapeQuotes:he,equal:ie,ucs2length:function(e){for(var r,t=0,a=e.length,o=0;o<a;)t++,(r=e.charCodeAt(o++))>=55296&&r<=56319&&o<a&&56320==(64512&(r=e.charCodeAt(o)))&&o++;return t},varOccurences:function(e,r){r+="[^0-9]";var t=e.match(new RegExp(r,"g"));return t?t.length:0},varReplace:function(e,r,t){return r+="([^0-9])",t=t.replace(/\$/g,"$$$$"),e.replace(new RegExp(r,"g"),t+"$1")},schemaHasRules:function(e,r){if("boolean"==typeof e)return!e;for(var t in e)if(r[t])return!0},schemaHasRulesExcept:function(e,r,t){if("boolean"==typeof e)return!e&&"not"!=t;for(var a in e)if(a!=t&&r[a])return!0},schemaUnknownRules:function(e,r){if("boolean"==typeof e)return;for(var t in e)if(!r[t])return t},toQuotedString:fe,getPathExpr:function(e,r,t,a){return ye(e,t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'")},getPath:function(e,r,t){var a=fe(t?"/"+be(r):pe(r));return ye(e,a)},getData:function(e,r,t){var a,o,n,i;if(""===e)return"rootData";if("/"==e[0]){if(!ve.test(e))throw new Error("Invalid JSON-pointer: "+e);o=e,n="rootData"}else{if(!(i=e.match(ge)))throw new Error("Invalid JSON-pointer: "+e);if(a=+i[1],"#"==(o=i[2])){if(a>=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(n="data"+(r-a||""),!o)return n}for(var s=n,l=o.split("/"),u=0;u<l.length;u++){var c=l[u];c&&(n+=pe(Pe(c)),s+=" && "+n)}return s},unescapeFragment:function(e){return Pe(decodeURIComponent(e))},unescapeJsonPointer:Pe,escapeFragment:function(e){return encodeURIComponent(be(e))},escapeJsonPointer:be};function le(e,r,t,a){var o=a?" !== ":" === ",n=a?" || ":" && ",i=a?"!":"",s=a?"":"!";switch(e){case"null":return r+o+"null";case"array":return i+"Array.isArray("+r+")";case"object":return"("+i+r+n+"typeof "+r+o+'"object"'+n+s+"Array.isArray("+r+"))";case"integer":return"(typeof "+r+o+'"number"'+n+s+"("+r+" % 1)"+n+r+o+r+(t?n+i+"isFinite("+r+")":"")+")";case"number":return"(typeof "+r+o+'"'+e+'"'+(t?n+i+"isFinite("+r+")":"")+")";default:return"typeof "+r+o+'"'+e+'"'}}var ue=ce(["string","number","integer","boolean","null"]);function ce(e){for(var r={},t=0;t<e.length;t++)r[e[t]]=!0;return r}var de=/^[a-z$_][a-z$_0-9]*$/i,me=/'|\\/g;function pe(e){return"number"==typeof e?"["+e+"]":de.test(e)?"."+e:"['"+he(e)+"']"}function he(e){return e.replace(me,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function fe(e){return"'"+he(e)+"'"}var ve=/^\/(?:[^~]|~0|~1)*$/,ge=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ye(e,r){return'""'==e?r:(e+" + "+r).replace(/([^\\])' \+ '/g,"$1")}function be(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Pe(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}var we=function(e){se.copy(e,this)};var Ee=te((function(e){var r=e.exports=function(e,t,a){"function"==typeof t&&(a=t,t={}),function e(t,a,o,n,i,s,l,u,c,d){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var m in a(n,i,s,l,u,c,d),n){var p=n[m];if(Array.isArray(p)){if(m in r.arrayKeywords)for(var h=0;h<p.length;h++)e(t,a,o,p[h],i+"/"+m+"/"+h,s,i,m,n,h)}else if(m in r.propsKeywords){if(p&&"object"==typeof p)for(var f in p)e(t,a,o,p[f],i+"/"+m+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),s,i,m,n,f)}else(m in r.keywords||t.allKeys&&!(m in r.skipKeywords))&&e(t,a,o,p,i+"/"+m,s,i,m,n)}o(n,i,s,l,u,c,d)}}(t,"function"==typeof(a=t.cb||a)?a:a.pre||function(){},a.post||function(){},e,"",e)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}})),Se=xe;function xe(e,r,t){var a=this._refs[t];if("string"==typeof a){if(!this._refs[a])return xe.call(this,e,r,a);a=this._refs[a]}if((a=a||this._schemas[t])instanceof we)return je(a.schema,this._opts.inlineRefs)?a.schema:a.validate||this._compile(a);var o,n,i,s=Fe.call(this,r,t);return s&&(o=s.schema,r=s.root,i=s.baseId),o instanceof we?n=o.validate||e.call(this,o.schema,r,void 0,i):void 0!==o&&(n=je(o,this._opts.inlineRefs)?o:e.call(this,o,r,void 0,i)),n}function Fe(e,r){var t=ne.parse(r),a=Ae(t),o=Ie(this._getId(e.schema));if(0===Object.keys(e.schema).length||a!==o){var n=Re(a),i=this._refs[n];if("string"==typeof i)return Oe.call(this,e,i,t);if(i instanceof we)i.validate||this._compile(i),e=i;else{if(!((i=this._schemas[n])instanceof we))return;if(i.validate||this._compile(i),n==Re(r))return{schema:i,root:e,baseId:o};e=i}if(!e.schema)return;o=Ie(this._getId(e.schema))}return De.call(this,t,o,e.schema,e)}function Oe(e,r,t){var a=Fe.call(this,e,r);if(a){var o=a.schema,n=a.baseId;e=a.root;var i=this._getId(o);return i&&(n=$e(n,i)),De.call(this,t,n,o,e)}}xe.normalizeId=Re,xe.fullPath=Ie,xe.url=$e,xe.ids=function(e){var r=Re(this._getId(e)),t={"":r},a={"":Ie(r,!1)},o={},n=this;return Ee(e,{allKeys:!0},(function(e,r,i,s,l,u,c){if(""!==r){var d=n._getId(e),m=t[s],p=a[s]+"/"+l;if(void 0!==c&&(p+="/"+("number"==typeof c?c:se.escapeFragment(c))),"string"==typeof d){d=m=Re(m?ne.resolve(m,d):d);var h=n._refs[d];if("string"==typeof h&&(h=n._refs[h]),h&&h.schema){if(!ie(e,h.schema))throw new Error('id "'+d+'" resolves to more than one schema')}else if(d!=Re(p))if("#"==d[0]){if(o[d]&&!ie(e,o[d]))throw new Error('id "'+d+'" resolves to more than one schema');o[d]=e}else n._refs[d]=p}t[r]=m,a[r]=p}})),o},xe.inlineRef=je,xe.schema=Fe;var _e=se.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function De(e,r,t,a){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var o=e.fragment.split("/"),n=1;n<o.length;n++){var i=o[n];if(i){if(void 0===(t=t[i=se.unescapeFragment(i)]))break;var s;if(!_e[i]&&((s=this._getId(t))&&(r=$e(r,s)),t.$ref)){var l=$e(r,t.$ref),u=Fe.call(this,a,l);u&&(t=u.schema,a=u.root,r=u.baseId)}}}return void 0!==t&&t!==a.schema?{schema:t,root:a,baseId:r}:void 0}}var ke=se.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function je(e,r){return!1!==r&&(void 0===r||!0===r?function e(r){var t;if(Array.isArray(r)){for(var a=0;a<r.length;a++)if("object"==typeof(t=r[a])&&!e(t))return!1}else for(var o in r){if("$ref"==o)return!1;if("object"==typeof(t=r[o])&&!e(t))return!1}return!0}(e):r?function e(r){var t,a=0;if(Array.isArray(r)){for(var o=0;o<r.length;o++)if("object"==typeof(t=r[o])&&(a+=e(t)),a==1/0)return 1/0}else for(var n in r){if("$ref"==n)return 1/0;if(ke[n])a++;else if("object"==typeof(t=r[n])&&(a+=e(t)+1),a==1/0)return 1/0}return a}(e)<=r:void 0)}function Ie(e,r){return!1!==r&&(e=Re(e)),Ae(ne.parse(e))}function Ae(e){return ne.serialize(e).split("#")[0]+"#"}var Ce=/#\/?$/;function Re(e){return e?e.replace(Ce,""):""}function $e(e,r){return r=Re(r),ne.resolve(e,r)}var Ne={Validation:Te((function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:Te(Le)};function Le(e,r,t){this.message=t||Le.message(e,r),this.missingRef=Se.url(e,r),this.missingSchema=Se.normalizeId(Se.fullPath(this.missingRef))}function Te(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}Le.message=function(e,r){return"can't resolve reference "+r+" from id "+e};var ze=function(e,r){r||(r={}),"function"==typeof r&&(r={cmp:r});var t="boolean"==typeof r.cycles&&r.cycles,a=r.cmp&&function(e){return function(r){return function(t,a){var o={key:t,value:r[t]},n={key:a,value:r[a]};return e(o,n)}}}(r.cmp),o=[];return function e(r){if(r&&r.toJSON&&"function"==typeof r.toJSON&&(r=r.toJSON()),void 0!==r){if("number"==typeof r)return isFinite(r)?""+r:"null";if("object"!=typeof r)return JSON.stringify(r);var n,i;if(Array.isArray(r)){for(i="[",n=0;n<r.length;n++)n&&(i+=","),i+=e(r[n])||"null";return i+"]"}if(null===r)return"null";if(-1!==o.indexOf(r)){if(t)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=o.push(r)-1,l=Object.keys(r).sort(a&&a(r));for(i="",n=0;n<l.length;n++){var u=l[n],c=e(r[u]);c&&(i&&(i+=","),i+=JSON.stringify(u)+":"+c)}return o.splice(s,1),"{"+i+"}"}}(e)},Ve=function(e,r,t){var a="",o=!0===e.schema.$async,n=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),i=e.self._getId(e.schema);if(e.opts.strictKeywords){var s=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(s){var l="unknown keyword: "+s;if("log"!==e.opts.strictKeywords)throw new Error(l);e.logger.warn(l)}}if(e.isTop&&(a+=" var validate = ",o&&(e.async=!0,a+="async "),a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",i&&(e.opts.sourceCode||e.opts.processCode)&&(a+=" /*# sourceURL="+i+" */ ")),"boolean"==typeof e.schema||!n&&!e.schema.$ref){var u=e.level,c=e.dataLevel,d=e.schema["false schema"],m=e.schemaPath+e.util.getProperty("false schema"),p=e.errSchemaPath+"/false schema",h=!e.opts.allErrors,f="data"+(c||""),v="valid"+u;if(!1===e.schema){e.isTop?h=!0:a+=" var "+v+" = false; ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'boolean schema is false' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";var g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?a+=o?" return data; ":" validate.errors = null; return true; ":a+=" var "+v+" = true; ";return e.isTop&&(a+=" }; return validate; "),a}if(e.isTop){var y=e.isTop;u=e.level=0,c=e.dataLevel=0,f="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var b="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}a+=" var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data; "}else{u=e.level,f="data"+((c=e.dataLevel)||"");if(i&&(e.baseId=e.resolve.url(e.baseId,i)),o&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+u+" = errors;"}v="valid"+u,h=!e.opts.allErrors;var P="",w="",E=e.schema.type,S=Array.isArray(E);if(E&&e.opts.nullable&&!0===e.schema.nullable&&(S?-1==E.indexOf("null")&&(E=E.concat("null")):"null"!=E&&(E=[E,"null"],S=!0)),S&&1==E.length&&(E=E[0],S=!1),e.schema.$ref&&n){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(n=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(a+=" "+e.RULES.all.$comment.code(e,"$comment")),E){if(e.opts.coerceTypes)var x=e.util.coerceToTypes(e.opts.coerceTypes,E);var F=e.RULES.types[E];if(x||S||!0===F||F&&!Z(F)){m=e.schemaPath+".type",p=e.errSchemaPath+"/type",m=e.schemaPath+".type",p=e.errSchemaPath+"/type";var O=S?"checkDataTypes":"checkDataType";if(a+=" if ("+e.util[O](E,f,e.opts.strictNumbers,!0)+") { ",x){var _="dataType"+u,D="coerced"+u;a+=" var "+_+" = typeof "+f+"; var "+D+" = undefined; ","array"==e.opts.coerceTypes&&(a+=" if ("+_+" == 'object' && Array.isArray("+f+") && "+f+".length == 1) { "+f+" = "+f+"[0]; "+_+" = typeof "+f+"; if ("+e.util.checkDataType(e.schema.type,f,e.opts.strictNumbers)+") "+D+" = "+f+"; } "),a+=" if ("+D+" !== undefined) ; ";var k=x;if(k)for(var j,I=-1,A=k.length-1;I<A;)"string"==(j=k[I+=1])?a+=" else if ("+_+" == 'number' || "+_+" == 'boolean') "+D+" = '' + "+f+"; else if ("+f+" === null) "+D+" = ''; ":"number"==j||"integer"==j?(a+=" else if ("+_+" == 'boolean' || "+f+" === null || ("+_+" == 'string' && "+f+" && "+f+" == +"+f+" ","integer"==j&&(a+=" && !("+f+" % 1)"),a+=")) "+D+" = +"+f+"; "):"boolean"==j?a+=" else if ("+f+" === 'false' || "+f+" === 0 || "+f+" === null) "+D+" = false; else if ("+f+" === 'true' || "+f+" === 1) "+D+" = true; ":"null"==j?a+=" else if ("+f+" === '' || "+f+" === 0 || "+f+" === false) "+D+" = null; ":"array"==e.opts.coerceTypes&&"array"==j&&(a+=" else if ("+_+" == 'string' || "+_+" == 'number' || "+_+" == 'boolean' || "+f+" == null) "+D+" = ["+f+"]; ");a+=" else { ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } if ("+D+" !== undefined) { ";var C=c?"data"+(c-1||""):"parentData";a+=" "+f+" = "+D+"; ",c||(a+="if ("+C+" !== undefined)"),a+=" "+C+"["+(c?e.dataPathArr[c]:"parentDataProperty")+"] = "+D+"; } "}else{(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } "}}if(e.schema.$ref&&!n)a+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",h&&(a+=" } if (errors === ",a+=y?"0":"errs_"+u,a+=") { ",w+="}");else{var R=e.RULES;if(R)for(var $=-1,N=R.length-1;$<N;)if(Z(F=R[$+=1])){if(F.type&&(a+=" if ("+e.util.checkDataType(F.type,f,e.opts.strictNumbers)+") { "),e.opts.useDefaults)if("object"==F.type&&e.schema.properties){d=e.schema.properties;var L=Object.keys(d);if(L)for(var T,z=-1,V=L.length-1;z<V;){if(void 0!==(U=d[T=L[z+=1]]).default){var q=f+e.util.getProperty(T);if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+q;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+q+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+q+" === null || "+q+" === '' "),a+=" ) "+q+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(U.default)+" ":a+=" "+JSON.stringify(U.default)+" ",a+="; "}}}else if("array"==F.type&&Array.isArray(e.schema.items)){var M=e.schema.items;if(M){I=-1;for(var U,W=M.length-1;I<W;)if(void 0!==(U=M[I+=1]).default){q=f+"["+I+"]";if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+q;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+q+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+q+" === null || "+q+" === '' "),a+=" ) "+q+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(U.default)+" ":a+=" "+JSON.stringify(U.default)+" ",a+="; "}}}var Q=F.rules;if(Q)for(var B,H=-1,K=Q.length-1;H<K;)if(Y(B=Q[H+=1])){var G=B.code(e,B.keyword,F.type);G&&(a+=" "+G+" ",h&&(P+="}"))}if(h&&(a+=" "+P+" ",P=""),F.type&&(a+=" } ",E&&E===F.type&&!x)){a+=" else { ";var J;m=e.schemaPath+".type",p=e.errSchemaPath+"/type";(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}h&&(a+=" if (errors === ",a+=y?"0":"errs_"+u,a+=") { ",w+="}")}}function Z(e){for(var r=e.rules,t=0;t<r.length;t++)if(Y(r[t]))return!0}function Y(r){return void 0!==e.schema[r.keyword]||r.implements&&function(r){for(var t=r.implements,a=0;a<t.length;a++)if(void 0!==e.schema[t[a]])return!0}(r)}return h&&(a+=" "+w+" "),y?(o?(a+=" if (errors === 0) return data; ",a+=" else throw new ValidationError(vErrors); "):(a+=" validate.errors = vErrors; ",a+=" return errors === 0; "),a+=" }; return validate;"):a+=" var "+v+" = errors === errs_"+u+";",a},qe=se.ucs2length,Me=Ne.Validation,Ue=function e(r,t,a,o){var n=this,i=this._opts,s=[void 0],l={},u=[],c={},d=[],m={},p=[];t=t||{schema:r,refVal:s,refs:l};var h=We.call(this,r,t,o),f=this._compilations[h.index];if(h.compiling)return f.callValidate=function e(){var r=f.validate,t=r.apply(this,arguments);return e.errors=r.errors,t};var v=this._formats,g=this.RULES;try{var y=P(r,t,a,o);f.validate=y;var b=f.callValidate;return b&&(b.schema=y.schema,b.errors=null,b.refs=y.refs,b.refVal=y.refVal,b.root=y.root,b.$async=y.$async,i.sourceCode&&(b.source=y.source)),y}finally{Qe.call(this,r,t,o)}function P(r,a,o,c){var m=!a||a&&a.schema==r;if(a.schema!=t.schema)return e.call(n,r,a,o,c);var h,f=!0===r.$async,y=Ve({isTop:!0,schema:r,isRoot:m,baseId:c,root:a,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:Ne.MissingRef,RULES:g,validate:Ve,util:se,resolve:Se,resolveRef:w,usePattern:x,useDefault:F,useCustomRule:O,opts:i,formats:v,logger:n.logger,self:n});y=Ze(s,Ge)+Ze(u,He)+Ze(d,Ke)+Ze(p,Je)+y,i.processCode&&(y=i.processCode(y,r));try{h=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",y)(n,g,v,t,s,d,p,ie,qe,Me),s[0]=h}catch(e){throw n.logger.error("Error compiling schema, function code:",y),e}return h.schema=r,h.errors=null,h.refs=l,h.refVal=s,h.root=m?h:a,f&&(h.$async=!0),!0===i.sourceCode&&(h.source={code:y,patterns:u,defaults:d}),h}function w(r,o,u){o=Se.url(r,o);var c,d,m=l[o];if(void 0!==m)return S(c=s[m],d="refVal["+m+"]");if(!u&&t.refs){var p=t.refs[o];if(void 0!==p)return S(c=t.refVal[p],d=E(o,c))}d=E(o);var h=Se.call(n,P,t,o);if(void 0===h){var f=a&&a[o];f&&(h=Se.inlineRef(f,i.inlineRefs)?f:e.call(n,f,t,a,r))}if(void 0!==h)return function(e,r){var t=l[e];s[t]=r}(o,h),S(h,d);!function(e){delete l[e]}(o)}function E(e,r){var t=s.length;return s[t]=r,l[e]=t,"refVal"+t}function S(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}function x(e){var r=c[e];return void 0===r&&(r=c[e]=u.length,u[r]=e),"pattern"+r}function F(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return se.toQuotedString(e);case"object":if(null===e)return"null";var r=ze(e),t=m[r];return void 0===t&&(t=m[r]=d.length,d[t]=e),"default"+t}}function O(e,r,t,a){if(!1!==n._opts.validateSchema){var o=e.definition.dependencies;if(o&&!o.every((function(e){return Object.prototype.hasOwnProperty.call(t,e)})))throw new Error("parent schema must have all required keywords: "+o.join(","));var s=e.definition.validateSchema;if(s)if(!s(r)){var l="keyword schema is invalid: "+n.errorsText(s.errors);if("log"!=n._opts.validateSchema)throw new Error(l);n.logger.error(l)}}var u,c=e.definition.compile,d=e.definition.inline,m=e.definition.macro;if(c)u=c.call(n,r,t,a);else if(m)u=m.call(n,r,t,a),!1!==i.validateSchema&&n.validateSchema(u,!0);else if(d)u=d.call(n,a,e.keyword,r,t);else if(!(u=e.definition.validate))return;if(void 0===u)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var h=p.length;return p[h]=u,{code:"customRule"+h,validate:u}}};function We(e,r,t){var a=Be.call(this,e,r,t);return a>=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}function Qe(e,r,t){var a=Be.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}function Be(e,r,t){for(var a=0;a<this._compilations.length;a++){var o=this._compilations[a];if(o.schema==e&&o.root==r&&o.baseId==t)return a}return-1}function He(e,r){return"var pattern"+e+" = new RegExp("+se.toQuotedString(r[e])+");"}function Ke(e){return"var default"+e+" = defaults["+e+"];"}function Ge(e,r){return void 0===r[e]?"":"var refVal"+e+" = refVal["+e+"];"}function Je(e){return"var customRule"+e+" = customRules["+e+"];"}function Ze(e,r){if(!e.length)return"";for(var t="",a=0;a<e.length;a++)t+=r(a,e);return t}var Ye=te((function(e){var r=e.exports=function(){this._cache={}};r.prototype.put=function(e,r){this._cache[e]=r},r.prototype.get=function(e){return this._cache[e]},r.prototype.del=function(e){delete this._cache[e]},r.prototype.clear=function(){this._cache={}}})),Xe=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,er=[0,31,28,31,30,31,30,31,31,30,31,30,31],rr=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,tr=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ar=/^(?:[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,or=/^(?:(?:[^\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,nr=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,ir=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,sr=/^(?:\/(?:[^~/]|~0|~1)*)*$/,lr=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,ur=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,cr=dr;function dr(e){return e="full"==e?"full":"fast",se.copy(dr[e])}function mr(e){var r=e.match(Xe);if(!r)return!1;var t=+r[1],a=+r[2],o=+r[3];return a>=1&&a<=12&&o>=1&&o<=(2==a&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(t)?29:er[a])}function pr(e,r){var t=e.match(rr);if(!t)return!1;var a=t[1],o=t[2],n=t[3],i=t[5];return(a<=23&&o<=59&&n<=59||23==a&&59==o&&60==n)&&(!r||i)}dr.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":or,url:nr,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:tr,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:gr,uuid:ir,"json-pointer":sr,"json-pointer-uri-fragment":lr,"relative-json-pointer":ur},dr.full={date:mr,time:pr,"date-time":function(e){var r=e.split(hr);return 2==r.length&&mr(r[0])&&pr(r[1],!0)},uri:function(e){return fr.test(e)&&ar.test(e)},"uri-reference":/^(?:[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,"uri-template":or,url:nr,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:tr,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:gr,uuid:ir,"json-pointer":sr,"json-pointer-uri-fragment":lr,"relative-json-pointer":ur};var hr=/t|\s/i;var fr=/\/|:/;var vr=/[^\\]\\Z/;function gr(e){if(vr.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var yr=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s;var p="maximum"==r,h=p?"exclusiveMaximum":"exclusiveMinimum",f=e.schema[h],v=e.opts.$data&&f&&f.$data,g=p?"<":">",y=p?">":"<",b=void 0;if(!m&&"number"!=typeof s&&void 0!==s)throw new Error(r+" must be number");if(!v&&void 0!==f&&"number"!=typeof f&&"boolean"!=typeof f)throw new Error(h+" must be number or boolean");if(v){var P=e.util.getData(f.$data,i,e.dataPathArr),w="exclusive"+n,E="exclType"+n,S="exclIsNumber"+n,x="' + "+(_="op"+n)+" + '";o+=" var schemaExcl"+n+" = "+P+"; ",o+=" var "+w+"; var "+E+" = typeof "+(P="schemaExcl"+n)+"; if ("+E+" != 'boolean' && "+E+" != 'undefined' && "+E+" != 'number') { ";var F;b=h;(F=F||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(o+=" , message: '"+h+" should be boolean' "),e.opts.verbose&&(o+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var O=o;o=F.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+E+" == 'number' ? ( ("+w+" = "+a+" === undefined || "+P+" "+g+"= "+a+") ? "+d+" "+y+"= "+P+" : "+d+" "+y+" "+a+" ) : ( ("+w+" = "+P+" === true) ? "+d+" "+y+"= "+a+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { var op"+n+" = "+w+" ? '"+g+"' : '"+g+"='; ",void 0===s&&(b=h,u=e.errSchemaPath+"/"+h,a=P,m=v)}else{x=g;if((S="number"==typeof f)&&m){var _="'"+x+"'";o+=" if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" ( "+a+" === undefined || "+f+" "+g+"= "+a+" ? "+d+" "+y+"= "+f+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { "}else{S&&void 0===s?(w=!0,b=h,u=e.errSchemaPath+"/"+h,a=f,y+="="):(S&&(a=Math[p?"min":"max"](f,s)),f===(!S||a)?(w=!0,b=h,u=e.errSchemaPath+"/"+h,y+="="):(w=!1,x+="="));_="'"+x+"'";o+=" if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+" "+y+" "+a+" || "+d+" !== "+d+") { "}}b=b||r,(F=F||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+_+", limit: "+a+", exclusive: "+w+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be "+x+" ",o+=m?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";O=o;return o=F.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",c&&(o+=" else { "),o},br=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+".length "+("maxItems"==r?">":"<")+" "+a+") { ";var p=r,h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxItems"==r?"more":"fewer",o+=" than ",o+=m?"' + "+a+" + '":""+s,o+=" items' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=h.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},Pr=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");var p="maxLength"==r?">":"<";o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),!1===e.opts.unicode?o+=" "+d+".length ":o+=" ucs2length("+d+") ",o+=" "+p+" "+a+") { ";var h=r,f=f||[];f.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(h||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT be ",o+="maxLength"==r?"longer":"shorter",o+=" than ",o+=m?"' + "+a+" + '":""+s,o+=" characters' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var v=o;return o=f.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+v+"]); ":o+=" validate.errors = ["+v+"]; return false; ":o+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},wr=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" Object.keys("+d+").length "+("maxProperties"==r?">":"<")+" "+a+") { ";var p=r,h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxProperties"==r?"more":"fewer",o+=" than ",o+=m?"' + "+a+" + '":""+s,o+=" properties' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=h.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},Er={$ref:function(e,r,t){var a,o,n=" ",i=e.level,s=e.dataLevel,l=e.schema[r],u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(s||""),m="valid"+i;if("#"==l||"#/"==l)e.isRoot?(a=e.async,o="validate"):(a=!0===e.root.schema.$async,o="root.refVal[0]");else{var p=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===p){var h=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(h),(y=y||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(n+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(n+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ";var f=n;n=y.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+f+"]); ":n+=" validate.errors = ["+f+"]; return false; ":n+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(n+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,l,h);e.logger.warn(h),c&&(n+=" if (true) { ")}}else if(p.inline){var v=e.util.copy(e);v.level++;var g="valid"+v.level;v.schema=p.schema,v.schemaPath="",v.errSchemaPath=l,n+=" "+e.validate(v).replace(/validate\.schema/g,p.code)+" ",c&&(n+=" if ("+g+") { ")}else a=!0===p.$async||e.async&&!1!==p.$async,o=p.code}if(o){var y;(y=y||[]).push(n),n="",e.opts.passContext?n+=" "+o+".call(this, ":n+=" "+o+"( ",n+=" "+d+", (dataPath || '')",'""'!=e.errorPath&&(n+=" + "+e.errorPath);var b=n+=" , "+(s?"data"+(s-1||""):"parentData")+" , "+(s?e.dataPathArr[s]:"parentDataProperty")+", rootData) ";if(n=y.pop(),a){if(!e.async)throw new Error("async schema referenced by sync schema");c&&(n+=" var "+m+"; "),n+=" try { await "+b+"; ",c&&(n+=" "+m+" = true; "),n+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",c&&(n+=" "+m+" = false; "),n+=" } ",c&&(n+=" if ("+m+") { ")}else n+=" if (!"+b+") { if (vErrors === null) vErrors = "+o+".errors; else vErrors = vErrors.concat("+o+".errors); errors = vErrors.length; } ",c&&(n+=" else { ")}return n},allOf:function(e,r,t){var a=" ",o=e.schema[r],n=e.schemaPath+e.util.getProperty(r),i=e.errSchemaPath+"/"+r,s=!e.opts.allErrors,l=e.util.copy(e),u="";l.level++;var c="valid"+l.level,d=l.baseId,m=!0,p=o;if(p)for(var h,f=-1,v=p.length-1;f<v;)h=p[f+=1],(e.opts.strictKeywords?"object"==typeof h&&Object.keys(h).length>0||!1===h:e.util.schemaHasRules(h,e.RULES.all))&&(m=!1,l.schema=h,l.schemaPath=n+"["+f+"]",l.errSchemaPath=i+"/"+f,a+=" "+e.validate(l)+" ",l.baseId=d,s&&(a+=" if ("+c+") { ",u+="}"));return s&&(a+=m?" if (true) { ":" "+u.slice(0,-1)+" "),a},anyOf:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e),h="";p.level++;var f="valid"+p.level;if(i.every((function(r){return e.opts.strictKeywords?"object"==typeof r&&Object.keys(r).length>0||!1===r:e.util.schemaHasRules(r,e.RULES.all)}))){var v=p.baseId;a+=" var "+m+" = errors; var "+d+" = false; ";var g=e.compositeRule;e.compositeRule=p.compositeRule=!0;var y=i;if(y)for(var b,P=-1,w=y.length-1;P<w;)b=y[P+=1],p.schema=b,p.schemaPath=s+"["+P+"]",p.errSchemaPath=l+"/"+P,a+=" "+e.validate(p)+" ",p.baseId=v,a+=" "+d+" = "+d+" || "+f+"; if (!"+d+") { ",h+="}";e.compositeRule=p.compositeRule=g,a+=" "+h+" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } else { errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else u&&(a+=" if (true) { ");return a},$comment:function(e,r,t){var a=" ",o=e.schema[r],n=e.errSchemaPath+"/"+r;e.opts.allErrors;var i=e.util.toQuotedString(o);return!0===e.opts.$comment?a+=" console.log("+i+");":"function"==typeof e.opts.$comment&&(a+=" self._opts.$comment("+i+", "+e.util.toQuotedString(n)+", validate.root.schema);"),a},const:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m=e.opts.$data&&i&&i.$data;m&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; "),m||(a+=" var schema"+o+" = validate.schema"+s+";"),a+="var "+d+" = equal("+c+", schema"+o+"); if (!"+d+") { ";var p=p||[];p.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValue: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var h=a;return a=p.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+h+"]); ":a+=" validate.errors = ["+h+"]; return false; ":a+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",u&&(a+=" else { "),a},contains:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level,f="i"+o,v=p.dataLevel=e.dataLevel+1,g="data"+v,y=e.baseId,b=e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all);if(a+="var "+m+" = errors;var "+d+";",b){var P=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=i,p.schemaPath=s,p.errSchemaPath=l,a+=" var "+h+" = false; for (var "+f+" = 0; "+f+" < "+c+".length; "+f+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers,!0);var w=c+"["+f+"]";p.dataPathArr[v]=f;var E=e.validate(p);p.baseId=y,e.util.varOccurences(E,g)<2?a+=" "+e.util.varReplace(E,g,w)+" ":a+=" var "+g+" = "+w+"; "+E+" ",a+=" if ("+h+") break; } ",e.compositeRule=p.compositeRule=P,a+=" if (!"+h+") {"}else a+=" if ("+c+".length == 0) {";var S=S||[];S.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should contain a valid item' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var x=a;return a=S.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",b&&(a+=" errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a},dependencies:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="errs__"+o,m=e.util.copy(e),p="";m.level++;var h="valid"+m.level,f={},v={},g=e.opts.ownProperties;for(w in i)if("__proto__"!=w){var y=i[w],b=Array.isArray(y)?v:f;b[w]=y}a+="var "+d+" = errors;";var P=e.errorPath;for(var w in a+="var missing"+o+";",v)if((b=v[w]).length){if(a+=" if ( "+c+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(w)+"') "),u){a+=" && ( ";var E=b;if(E)for(var S=-1,x=E.length-1;S<x;){j=E[S+=1],S&&(a+=" || "),a+=" ( ( "+(R=c+(C=e.util.getProperty(j)))+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(j)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?j:C)+") ) "}a+=")) { ";var F="missing"+o,O="' + "+F+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,F,!0):P+" + "+F);var _=_||[];_.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var D=a;a=_.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+D+"]); ":a+=" validate.errors = ["+D+"]; return false; ":a+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{a+=" ) { ";var k=b;if(k)for(var j,I=-1,A=k.length-1;I<A;){j=k[I+=1];var C=e.util.getProperty(j),R=(O=e.util.escapeQuotes(j),c+C);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,j,e.opts.jsonPointers)),a+=" if ( "+R+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(j)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",u&&(p+="}",a+=" else { ")}e.errorPath=P;var $=m.baseId;for(var w in f){y=f[w];(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all))&&(a+=" "+h+" = true; if ( "+c+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(w)+"') "),a+=") { ",m.schema=y,m.schemaPath=s+e.util.getProperty(w),m.errSchemaPath=l+"/"+e.util.escapeFragment(w),a+=" "+e.validate(m)+" ",m.baseId=$,a+=" } ",u&&(a+=" if ("+h+") { ",p+="}"))}return u&&(a+=" "+p+" if ("+d+" == errors) {"),a},enum:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m=e.opts.$data&&i&&i.$data;m&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ");var p="i"+o,h="schema"+o;m||(a+=" var "+h+" = validate.schema"+s+";"),a+="var "+d+";",m&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=d+" = false;for (var "+p+"=0; "+p+"<"+h+".length; "+p+"++) if (equal("+c+", "+h+"["+p+"])) { "+d+" = true; break; }",m&&(a+=" } "),a+=" if (!"+d+") { ";var f=f||[];f.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var v=a;return a=f.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+v+"]); ":a+=" validate.errors = ["+v+"]; return false; ":a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",u&&(a+=" else { "),a},format:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||"");if(!1===e.opts.format)return u&&(a+=" if (true) { "),a;var d,m=e.opts.$data&&i&&i.$data;m?(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ",d="schema"+o):d=i;var p=e.opts.unknownFormats,h=Array.isArray(p);if(m){a+=" var "+(f="format"+o)+" = formats["+d+"]; var "+(v="isObject"+o)+" = typeof "+f+" == 'object' && !("+f+" instanceof RegExp) && "+f+".validate; var "+(g="formatType"+o)+" = "+v+" && "+f+".type || 'string'; if ("+v+") { ",e.async&&(a+=" var async"+o+" = "+f+".async; "),a+=" "+f+" = "+f+".validate; } if ( ",m&&(a+=" ("+d+" !== undefined && typeof "+d+" != 'string') || "),a+=" (","ignore"!=p&&(a+=" ("+d+" && !"+f+" ",h&&(a+=" && self._opts.unknownFormats.indexOf("+d+") == -1 "),a+=") || "),a+=" ("+f+" && "+g+" == '"+t+"' && !(typeof "+f+" == 'function' ? ",e.async?a+=" (async"+o+" ? await "+f+"("+c+") : "+f+"("+c+")) ":a+=" "+f+"("+c+") ",a+=" : "+f+".test("+c+"))))) {"}else{var f;if(!(f=e.formats[i])){if("ignore"==p)return e.logger.warn('unknown format "'+i+'" ignored in schema at path "'+e.errSchemaPath+'"'),u&&(a+=" if (true) { "),a;if(h&&p.indexOf(i)>=0)return u&&(a+=" if (true) { "),a;throw new Error('unknown format "'+i+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,g=(v="object"==typeof f&&!(f instanceof RegExp)&&f.validate)&&f.type||"string";if(v){var y=!0===f.async;f=f.validate}if(g!=t)return u&&(a+=" if (true) { "),a;if(y){if(!e.async)throw new Error("async format in sync schema");a+=" if (!(await "+(b="formats"+e.util.getProperty(i)+".validate")+"("+c+"))) { "}else{a+=" if (! ";var b="formats"+e.util.getProperty(i);v&&(b+=".validate"),a+="function"==typeof f?" "+b+"("+c+") ":" "+b+".test("+c+") ",a+=") { "}}var P=P||[];P.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",a+=m?""+d:""+e.util.toQuotedString(i),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",a+=m?"' + "+d+" + '":""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=m?"validate.schema"+s:""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var w=a;return a=P.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",u&&(a+=" else { "),a},if:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level,f=e.schema.then,v=e.schema.else,g=void 0!==f&&(e.opts.strictKeywords?"object"==typeof f&&Object.keys(f).length>0||!1===f:e.util.schemaHasRules(f,e.RULES.all)),y=void 0!==v&&(e.opts.strictKeywords?"object"==typeof v&&Object.keys(v).length>0||!1===v:e.util.schemaHasRules(v,e.RULES.all)),b=p.baseId;if(g||y){var P;p.createErrors=!1,p.schema=i,p.schemaPath=s,p.errSchemaPath=l,a+=" var "+m+" = errors; var "+d+" = true; ";var w=e.compositeRule;e.compositeRule=p.compositeRule=!0,a+=" "+e.validate(p)+" ",p.baseId=b,p.createErrors=!0,a+=" errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } ",e.compositeRule=p.compositeRule=w,g?(a+=" if ("+h+") { ",p.schema=e.schema.then,p.schemaPath=e.schemaPath+".then",p.errSchemaPath=e.errSchemaPath+"/then",a+=" "+e.validate(p)+" ",p.baseId=b,a+=" "+d+" = "+h+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'then'; ":P="'then'",a+=" } ",y&&(a+=" else { ")):a+=" if (!"+h+") { ",y&&(p.schema=e.schema.else,p.schemaPath=e.schemaPath+".else",p.errSchemaPath=e.errSchemaPath+"/else",a+=" "+e.validate(p)+" ",p.baseId=b,a+=" "+d+" = "+h+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'else'; ":P="'else'",a+=" } "),a+=" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+P+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match \"' + "+P+" + '\" schema' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",u&&(a+=" else { ")}else u&&(a+=" if (true) { ");return a},items:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e),h="";p.level++;var f="valid"+p.level,v="i"+o,g=p.dataLevel=e.dataLevel+1,y="data"+g,b=e.baseId;if(a+="var "+m+" = errors;var "+d+";",Array.isArray(i)){var P=e.schema.additionalItems;if(!1===P){a+=" "+d+" = "+c+".length <= "+i.length+"; ";var w=l;l=e.errSchemaPath+"/additionalItems",a+=" if (!"+d+") { ";var E=E||[];E.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+i.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+i.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var S=a;a=E.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",l=w,u&&(h+="}",a+=" else { ")}var x=i;if(x)for(var F,O=-1,_=x.length-1;O<_;)if(F=x[O+=1],e.opts.strictKeywords?"object"==typeof F&&Object.keys(F).length>0||!1===F:e.util.schemaHasRules(F,e.RULES.all)){a+=" "+f+" = true; if ("+c+".length > "+O+") { ";var D=c+"["+O+"]";p.schema=F,p.schemaPath=s+"["+O+"]",p.errSchemaPath=l+"/"+O,p.errorPath=e.util.getPathExpr(e.errorPath,O,e.opts.jsonPointers,!0),p.dataPathArr[g]=O;var k=e.validate(p);p.baseId=b,e.util.varOccurences(k,y)<2?a+=" "+e.util.varReplace(k,y,D)+" ":a+=" var "+y+" = "+D+"; "+k+" ",a+=" } ",u&&(a+=" if ("+f+") { ",h+="}")}if("object"==typeof P&&(e.opts.strictKeywords?"object"==typeof P&&Object.keys(P).length>0||!1===P:e.util.schemaHasRules(P,e.RULES.all))){p.schema=P,p.schemaPath=e.schemaPath+".additionalItems",p.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+f+" = true; if ("+c+".length > "+i.length+") { for (var "+v+" = "+i.length+"; "+v+" < "+c+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=c+"["+v+"]";p.dataPathArr[g]=v;k=e.validate(p);p.baseId=b,e.util.varOccurences(k,y)<2?a+=" "+e.util.varReplace(k,y,D)+" ":a+=" var "+y+" = "+D+"; "+k+" ",u&&(a+=" if (!"+f+") break; "),a+=" } } ",u&&(a+=" if ("+f+") { ",h+="}")}}else if(e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){p.schema=i,p.schemaPath=s,p.errSchemaPath=l,a+=" for (var "+v+" = 0; "+v+" < "+c+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=c+"["+v+"]";p.dataPathArr[g]=v;k=e.validate(p);p.baseId=b,e.util.varOccurences(k,y)<2?a+=" "+e.util.varReplace(k,y,D)+" ":a+=" var "+y+" = "+D+"; "+k+" ",u&&(a+=" if (!"+f+") break; "),a+=" }"}return u&&(a+=" "+h+" if ("+m+" == errors) {"),a},maximum:yr,minimum:yr,maxItems:br,minItems:br,maxLength:Pr,minLength:Pr,maxProperties:wr,minProperties:wr,multipleOf:function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");o+="var division"+n+";if (",m&&(o+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),o+=" (division"+n+" = "+d+" / "+a+", ",e.opts.multipleOfPrecision?o+=" Math.abs(Math.round(division"+n+") - division"+n+") > 1e-"+e.opts.multipleOfPrecision+" ":o+=" division"+n+" !== parseInt(division"+n+") ",o+=" ) ",m&&(o+=" ) "),o+=" ) { ";var p=p||[];p.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be multiple of ",o+=m?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var h=o;return o=p.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+h+"]); ":o+=" validate.errors = ["+h+"]; return false; ":o+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},not:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="errs__"+o,m=e.util.copy(e);m.level++;var p="valid"+m.level;if(e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){m.schema=i,m.schemaPath=s,m.errSchemaPath=l,a+=" var "+d+" = errors; ";var h,f=e.compositeRule;e.compositeRule=m.compositeRule=!0,m.createErrors=!1,m.opts.allErrors&&(h=m.opts.allErrors,m.opts.allErrors=!1),a+=" "+e.validate(m)+" ",m.createErrors=!0,h&&(m.opts.allErrors=h),e.compositeRule=m.compositeRule=f,a+=" if ("+p+") { ";var v=v||[];v.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var g=a;a=v.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(a+=" if (false) { ");return a},oneOf:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e),h="";p.level++;var f="valid"+p.level,v=p.baseId,g="prevValid"+o,y="passingSchemas"+o;a+="var "+m+" = errors , "+g+" = false , "+d+" = false , "+y+" = null; ";var b=e.compositeRule;e.compositeRule=p.compositeRule=!0;var P=i;if(P)for(var w,E=-1,S=P.length-1;E<S;)w=P[E+=1],(e.opts.strictKeywords?"object"==typeof w&&Object.keys(w).length>0||!1===w:e.util.schemaHasRules(w,e.RULES.all))?(p.schema=w,p.schemaPath=s+"["+E+"]",p.errSchemaPath=l+"/"+E,a+=" "+e.validate(p)+" ",p.baseId=v):a+=" var "+f+" = true; ",E&&(a+=" if ("+f+" && "+g+") { "+d+" = false; "+y+" = ["+y+", "+E+"]; } else { ",h+="}"),a+=" if ("+f+") { "+d+" = "+g+" = true; "+y+" = "+E+"; }";return e.compositeRule=p.compositeRule=b,a+=h+"if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a},pattern:function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'string') || "),o+=" !"+(m?"(new RegExp("+a+"))":e.usePattern(s))+".test("+d+") ) { ";var p=p||[];p.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { pattern: ",o+=m?""+a:""+e.util.toQuotedString(s),o+=" } ",!1!==e.opts.messages&&(o+=" , message: 'should match pattern \"",o+=m?"' + "+a+" + '":""+e.util.escapeQuotes(s),o+="\"' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+e.util.toQuotedString(s),o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var h=o;return o=p.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+h+"]); ":o+=" validate.errors = ["+h+"]; return false; ":o+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",c&&(o+=" else { "),o},properties:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="errs__"+o,m=e.util.copy(e),p="";m.level++;var h="valid"+m.level,f="key"+o,v="idx"+o,g=m.dataLevel=e.dataLevel+1,y="data"+g,b="dataProperties"+o,P=Object.keys(i||{}).filter(C),w=e.schema.patternProperties||{},E=Object.keys(w).filter(C),S=e.schema.additionalProperties,x=P.length||E.length,F=!1===S,O="object"==typeof S&&Object.keys(S).length,_=e.opts.removeAdditional,D=F||O||_,k=e.opts.ownProperties,j=e.baseId,I=e.schema.required;if(I&&(!e.opts.$data||!I.$data)&&I.length<e.opts.loopRequired)var A=e.util.toHash(I);function C(e){return"__proto__"!==e}if(a+="var "+d+" = errors;var "+h+" = true;",k&&(a+=" var "+b+" = undefined;"),D){if(a+=k?" "+b+" = "+b+" || Object.keys("+c+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+c+") { ",x){if(a+=" var isAdditional"+o+" = !(false ",P.length)if(P.length>8)a+=" || validate.schema"+s+".hasOwnProperty("+f+") ";else{var R=P;if(R)for(var $=-1,N=R.length-1;$<N;)G=R[$+=1],a+=" || "+f+" == "+e.util.toQuotedString(G)+" "}if(E.length){var L=E;if(L)for(var T=-1,z=L.length-1;T<z;)ne=L[T+=1],a+=" || "+e.usePattern(ne)+".test("+f+") "}a+=" ); if (isAdditional"+o+") { "}if("all"==_)a+=" delete "+c+"["+f+"]; ";else{var V=e.errorPath,q="' + "+f+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers)),F)if(_)a+=" delete "+c+"["+f+"]; ";else{a+=" "+h+" = false; ";var M=l;l=e.errSchemaPath+"/additionalProperties",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { additionalProperty: '"+q+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is an invalid additional property":a+="should NOT have additional properties",a+="' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var U=a;a=te.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+U+"]); ":a+=" validate.errors = ["+U+"]; return false; ":a+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=M,u&&(a+=" break; ")}else if(O)if("failing"==_){a+=" var "+d+" = errors; ";var W=e.compositeRule;e.compositeRule=m.compositeRule=!0,m.schema=S,m.schemaPath=e.schemaPath+".additionalProperties",m.errSchemaPath=e.errSchemaPath+"/additionalProperties",m.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);var Q=c+"["+f+"]";m.dataPathArr[g]=f;var B=e.validate(m);m.baseId=j,e.util.varOccurences(B,y)<2?a+=" "+e.util.varReplace(B,y,Q)+" ":a+=" var "+y+" = "+Q+"; "+B+" ",a+=" if (!"+h+") { errors = "+d+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+c+"["+f+"]; } ",e.compositeRule=m.compositeRule=W}else{m.schema=S,m.schemaPath=e.schemaPath+".additionalProperties",m.errSchemaPath=e.errSchemaPath+"/additionalProperties",m.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);Q=c+"["+f+"]";m.dataPathArr[g]=f;B=e.validate(m);m.baseId=j,e.util.varOccurences(B,y)<2?a+=" "+e.util.varReplace(B,y,Q)+" ":a+=" var "+y+" = "+Q+"; "+B+" ",u&&(a+=" if (!"+h+") break; ")}e.errorPath=V}x&&(a+=" } "),a+=" } ",u&&(a+=" if ("+h+") { ",p+="}")}var H=e.opts.useDefaults&&!e.compositeRule;if(P.length){var K=P;if(K)for(var G,J=-1,Z=K.length-1;J<Z;){var Y=i[G=K[J+=1]];if(e.opts.strictKeywords?"object"==typeof Y&&Object.keys(Y).length>0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all)){var X=e.util.getProperty(G),ee=(Q=c+X,H&&void 0!==Y.default);m.schema=Y,m.schemaPath=s+X,m.errSchemaPath=l+"/"+e.util.escapeFragment(G),m.errorPath=e.util.getPath(e.errorPath,G,e.opts.jsonPointers),m.dataPathArr[g]=e.util.toQuotedString(G);B=e.validate(m);if(m.baseId=j,e.util.varOccurences(B,y)<2){B=e.util.varReplace(B,y,Q);var re=Q}else{re=y;a+=" var "+y+" = "+Q+"; "}if(ee)a+=" "+B+" ";else{if(A&&A[G]){a+=" if ( "+re+" === undefined ",k&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+h+" = false; ";V=e.errorPath,M=l;var te,ae=e.util.escapeQuotes(G);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(V,G,e.opts.jsonPointers)),l=e.errSchemaPath+"/required",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+ae+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+ae+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";U=a;a=te.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+U+"]); ":a+=" validate.errors = ["+U+"]; return false; ":a+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=M,e.errorPath=V,a+=" } else { "}else u?(a+=" if ( "+re+" === undefined ",k&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+h+" = true; } else { "):(a+=" if ("+re+" !== undefined ",k&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(G)+"') "),a+=" ) { ");a+=" "+B+" } "}}u&&(a+=" if ("+h+") { ",p+="}")}}if(E.length){var oe=E;if(oe)for(var ne,ie=-1,se=oe.length-1;ie<se;){Y=w[ne=oe[ie+=1]];if(e.opts.strictKeywords?"object"==typeof Y&&Object.keys(Y).length>0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all)){m.schema=Y,m.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(ne),m.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(ne),a+=k?" "+b+" = "+b+" || Object.keys("+c+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+c+") { ",a+=" if ("+e.usePattern(ne)+".test("+f+")) { ",m.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);Q=c+"["+f+"]";m.dataPathArr[g]=f;B=e.validate(m);m.baseId=j,e.util.varOccurences(B,y)<2?a+=" "+e.util.varReplace(B,y,Q)+" ":a+=" var "+y+" = "+Q+"; "+B+" ",u&&(a+=" if (!"+h+") break; "),a+=" } ",u&&(a+=" else "+h+" = true; "),a+=" } ",u&&(a+=" if ("+h+") { ",p+="}")}}}return u&&(a+=" "+p+" if ("+d+" == errors) {"),a},propertyNames:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="errs__"+o,m=e.util.copy(e);m.level++;var p="valid"+m.level;if(a+="var "+d+" = errors;",e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){m.schema=i,m.schemaPath=s,m.errSchemaPath=l;var h="key"+o,f="idx"+o,v="i"+o,g="' + "+h+" + '",y="data"+(m.dataLevel=e.dataLevel+1),b="dataProperties"+o,P=e.opts.ownProperties,w=e.baseId;P&&(a+=" var "+b+" = undefined; "),a+=P?" "+b+" = "+b+" || Object.keys("+c+"); for (var "+f+"=0; "+f+"<"+b+".length; "+f+"++) { var "+h+" = "+b+"["+f+"]; ":" for (var "+h+" in "+c+") { ",a+=" var startErrs"+o+" = errors; ";var E=h,S=e.compositeRule;e.compositeRule=m.compositeRule=!0;var x=e.validate(m);m.baseId=w,e.util.varOccurences(x,y)<2?a+=" "+e.util.varReplace(x,y,E)+" ":a+=" var "+y+" = "+E+"; "+x+" ",e.compositeRule=m.compositeRule=S,a+=" if (!"+p+") { for (var "+v+"=startErrs"+o+"; "+v+"<errors; "+v+"++) { vErrors["+v+"].propertyName = "+h+"; } var err = ",!1!==e.createErrors?(a+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { propertyName: '"+g+"' } ",!1!==e.opts.messages&&(a+=" , message: 'property name \\'"+g+"\\' is invalid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),u&&(a+=" break; "),a+=" } }"}return u&&(a+=" if ("+d+" == errors) {"),a},required:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(n||""),d="valid"+o,m=e.opts.$data&&i&&i.$data;m&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ");var p="schema"+o;if(!m)if(i.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var h=[],f=i;if(f)for(var v,g=-1,y=f.length-1;g<y;){v=f[g+=1];var b=e.schema.properties[v];b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0||!1===b:e.util.schemaHasRules(b,e.RULES.all))||(h[h.length]=v)}}else h=i;if(m||h.length){var P=e.errorPath,w=m||h.length>=e.opts.loopRequired,E=e.opts.ownProperties;if(u)if(a+=" var missing"+o+"; ",w){m||(a+=" var "+p+" = validate.schema"+s+"; ");var S="' + "+(k="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,k,e.opts.jsonPointers)),a+=" var "+d+" = true; ",m&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=" for (var "+O+" = 0; "+O+" < "+p+".length; "+O+"++) { "+d+" = "+c+"["+p+"["+O+"]] !== undefined ",E&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", "+p+"["+O+"]) "),a+="; if (!"+d+") break; } ",m&&(a+=" } "),a+=" if (!"+d+") { ",(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var x=a;a=D.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var F=h;if(F)for(var O=-1,_=F.length-1;O<_;){I=F[O+=1],O&&(a+=" || "),a+=" ( ( "+($=c+(R=e.util.getProperty(I)))+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(I)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?I:R)+") ) "}a+=") { ";var D;S="' + "+(k="missing"+o)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,k,!0):P+" + "+k),(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";x=a;a=D.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(w){m||(a+=" var "+p+" = validate.schema"+s+"; ");var k;S="' + "+(k="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,k,e.opts.jsonPointers)),m&&(a+=" if ("+p+" && !Array.isArray("+p+")) { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+p+" !== undefined) { "),a+=" for (var "+O+" = 0; "+O+" < "+p+".length; "+O+"++) { if ("+c+"["+p+"["+O+"]] === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", "+p+"["+O+"]) "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",m&&(a+=" } ")}else{var j=h;if(j)for(var I,A=-1,C=j.length-1;A<C;){I=j[A+=1];var R=e.util.getProperty(I),$=(S=e.util.escapeQuotes(I),c+R);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,I,e.opts.jsonPointers)),a+=" if ( "+$+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(I)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=P}else u&&(a+=" if (true) {");return a},uniqueItems:function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,d="data"+(i||""),m="valid"+n,p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,(s||p)&&!1!==e.opts.uniqueItems){p&&(o+=" var "+m+"; if ("+a+" === false || "+a+" === undefined) "+m+" = true; else if (typeof "+a+" != 'boolean') "+m+" = false; else { "),o+=" var i = "+d+".length , "+m+" = true , j; if (i > 1) { ";var h=e.schema.items&&e.schema.items.type,f=Array.isArray(h);if(!h||"object"==h||"array"==h||f&&(h.indexOf("object")>=0||h.indexOf("array")>=0))o+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+d+"[i], "+d+"[j])) { "+m+" = false; break outer; } } } ";else{o+=" var itemIndices = {}, item; for (;i--;) { var item = "+d+"[i]; ";var v="checkDataType"+(f?"s":"");o+=" if ("+e.util[v](h,"item",e.opts.strictNumbers,!0)+") continue; ",f&&(o+=" if (typeof item == 'string') item = '\"' + item; "),o+=" if (typeof itemIndices[item] == 'number') { "+m+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}o+=" } ",p&&(o+=" } "),o+=" if (!"+m+") { ";var g=g||[];g.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var y=o;o=g.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+y+"]); ":o+=" validate.errors = ["+y+"]; return false; ":o+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",c&&(o+=" else { ")}else c&&(o+=" if (true) { ");return o},validate:Ve},Sr=se.toHash,xr=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"],Fr=function(e,r){for(var t=0;t<r.length;t++){e=JSON.parse(JSON.stringify(e));var a,o=r[t].split("/"),n=e;for(a=1;a<o.length;a++)n=n[o[a]];for(a=0;a<xr.length;a++){var i=xr[a],s=n[i];s&&(n[i]={anyOf:[s,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e},Or=Ne.MissingRef,_r=function e(r,t,a){var o=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof t&&(a=t,t=void 0);var n=i(r).then((function(){var e=o._addSchema(r,void 0,t);return e.validate||function e(r){try{return o._compile(r)}catch(e){if(e instanceof Or)return a(e);throw e}function a(a){var n=a.missingSchema;if(u(n))throw new Error("Schema "+n+" is loaded but "+a.missingRef+" cannot be resolved");var s=o._loadingSchemas[n];return s||(s=o._loadingSchemas[n]=o._opts.loadSchema(n)).then(l,l),s.then((function(e){if(!u(n))return i(e).then((function(){u(n)||o.addSchema(e,n,void 0,t)}))})).then((function(){return e(r)}));function l(){delete o._loadingSchemas[n]}function u(e){return o._refs[e]||o._schemas[e]}}}(e)}));a&&n.then((function(e){a(null,e)}),a);return n;function i(r){var t=r.$schema;return t&&!o.getSchema(t)?e.call(o,{$ref:t},!0):Promise.resolve()}};var Dr=function(e,r,t){var a,o,n=" ",i=e.level,s=e.dataLevel,l=e.schema[r],u=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,d=!e.opts.allErrors,m="data"+(s||""),p="valid"+i,h="errs__"+i,f=e.opts.$data&&l&&l.$data;f?(n+=" var schema"+i+" = "+e.util.getData(l.$data,s,e.dataPathArr)+"; ",o="schema"+i):o=l;var v,g,y,b,P,w="definition"+i,E=this.definition,S="";if(f&&E.$data){P="keywordValidate"+i;var x=E.validateSchema;n+=" var "+w+" = RULES.custom['"+r+"'].definition; var "+P+" = "+w+".validate;"}else{if(!(b=e.useCustomRule(this,l,e.schema,e)))return;o="validate.schema"+u,P=b.code,v=E.compile,g=E.inline,y=E.macro}var F=P+".errors",O="i"+i,_="ruleErr"+i,D=E.async;if(D&&!e.async)throw new Error("async keyword in sync schema");if(g||y||(n+=F+" = null;"),n+="var "+h+" = errors;var "+p+";",f&&E.$data&&(S+="}",n+=" if ("+o+" === undefined) { "+p+" = true; } else { ",x&&(S+="}",n+=" "+p+" = "+w+".validateSchema("+o+"); if ("+p+") { ")),g)E.statements?n+=" "+b.validate+" ":n+=" "+p+" = "+b.validate+"; ";else if(y){var k=e.util.copy(e);S="";k.level++;var j="valid"+k.level;k.schema=b.validate,k.schemaPath="";var I=e.compositeRule;e.compositeRule=k.compositeRule=!0;var A=e.validate(k).replace(/validate\.schema/g,P);e.compositeRule=k.compositeRule=I,n+=" "+A}else{(N=N||[]).push(n),n="",n+=" "+P+".call( ",e.opts.passContext?n+="this":n+="self",v||!1===E.schema?n+=" , "+m+" ":n+=" , "+o+" , "+m+" , validate.schema"+e.schemaPath+" ",n+=" , (dataPath || '')",'""'!=e.errorPath&&(n+=" + "+e.errorPath);var C=s?"data"+(s-1||""):"parentData",R=s?e.dataPathArr[s]:"parentDataProperty",$=n+=" , "+C+" , "+R+" , rootData ) ";n=N.pop(),!1===E.errors?(n+=" "+p+" = ",D&&(n+="await "),n+=$+"; "):n+=D?" var "+(F="customErrors"+i)+" = null; try { "+p+" = await "+$+"; } catch (e) { "+p+" = false; if (e instanceof ValidationError) "+F+" = e.errors; else throw e; } ":" "+F+" = null; "+p+" = "+$+"; "}if(E.modifying&&(n+=" if ("+C+") "+m+" = "+C+"["+R+"];"),n+=""+S,E.valid)d&&(n+=" if (true) { ");else{var N;n+=" if ( ",void 0===E.valid?(n+=" !",n+=y?""+j:""+p):n+=" "+!E.valid+" ",n+=") { ",a=this.keyword,(N=N||[]).push(n),n="",(N=N||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(n+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";var L=n;n=N.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+L+"]); ":n+=" validate.errors = ["+L+"]; return false; ":n+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var T=n;n=N.pop(),g?E.errors?"full"!=E.errors&&(n+=" for (var "+O+"="+h+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+c+'"; } ',e.opts.verbose&&(n+=" "+_+".schema = "+o+"; "+_+".data = "+m+"; "),n+=" } "):!1===E.errors?n+=" "+T+" ":(n+=" if ("+h+" == errors) { "+T+" } else { for (var "+O+"="+h+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+c+'"; } ',e.opts.verbose&&(n+=" "+_+".schema = "+o+"; "+_+".data = "+m+"; "),n+=" } } "):y?(n+=" var err = ",!1!==e.createErrors?(n+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(n+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&d&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; ")):!1===E.errors?n+=" "+T+" ":(n+=" if (Array.isArray("+F+")) { if (vErrors === null) vErrors = "+F+"; else vErrors = vErrors.concat("+F+"); errors = vErrors.length; for (var "+O+"="+h+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; "+_+'.schemaPath = "'+c+'"; ',e.opts.verbose&&(n+=" "+_+".schema = "+o+"; "+_+".data = "+m+"; "),n+=" } } else { "+T+" } "),n+=" } ",d&&(n+=" else { ")}return n},kr="http://json-schema.org/draft-07/schema#",jr="http://json-schema.org/draft-07/schema#",Ir="Core schema meta-schema",Ar={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},Cr=["object","boolean"],Rr={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},$r={$schema:kr,$id:jr,title:Ir,definitions:Ar,type:Cr,properties:Rr,default:!0},Nr=ae(Object.freeze({__proto__:null,$schema:kr,$id:jr,title:Ir,definitions:Ar,type:Cr,properties:Rr,default:$r})),Lr={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:Nr.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:Nr.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}},Tr=/^[a-z_$][a-z0-9_$-]*$/i,zr=function(e,r){var t=this.RULES;if(t.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!Tr.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(r){this.validateKeyword(r,!0);var a=r.type;if(Array.isArray(a))for(var o=0;o<a.length;o++)i(e,a[o],r);else i(e,a,r);var n=r.metaSchema;n&&(r.$data&&this._opts.$data&&(n={anyOf:[n,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),r.validateSchema=this.compile(n,!0))}function i(e,r,a){for(var o,n=0;n<t.length;n++){var i=t[n];if(i.type==r){o=i;break}}o||(o={type:r,rules:[]},t.push(o));var s={keyword:e,definition:a,custom:!0,code:Dr,implements:a.implements};o.rules.push(s),t.custom[e]=s}return t.keywords[e]=t.all[e]=!0,this},Vr=function(e){var r=this.RULES.custom[e];return r?r.definition:this.RULES.keywords[e]||!1},qr=function(e){var r=this.RULES;delete r.keywords[e],delete r.all[e],delete r.custom[e];for(var t=0;t<r.length;t++)for(var a=r[t].rules,o=0;o<a.length;o++)if(a[o].keyword==e){a.splice(o,1);break}return this},Mr=function e(r,t){e.errors=null;var a=this._validateKeyword=this._validateKeyword||this.compile(Lr,!0);if(a(r))return!0;if(e.errors=a.errors,t)throw new Error("custom keyword definition is invalid: "+this.errorsText(a.errors));return!1};var Ur="http://json-schema.org/draft-07/schema#",Wr="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Qr="Meta-schema for $data reference (JSON Schema extension proposal)",Br=["$data"],Hr={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Kr={$schema:Ur,$id:Wr,description:Qr,type:"object",required:Br,properties:Hr,additionalProperties:!1},Gr=ae(Object.freeze({__proto__:null,$schema:Ur,$id:Wr,description:Qr,type:"object",required:Br,properties:Hr,additionalProperties:!1,default:Kr})),Jr=et;et.prototype.validate=function(e,r){var t;if("string"==typeof e){if(!(t=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);t=a.validate||this._compile(a)}var o=t(r);!0!==t.$async&&(this.errors=t.errors);return o},et.prototype.compile=function(e,r){var t=this._addSchema(e,void 0,r);return t.validate||this._compile(t)},et.prototype.addSchema=function(e,r,t,a){if(Array.isArray(e)){for(var o=0;o<e.length;o++)this.addSchema(e[o],void 0,t,a);return this}var n=this._getId(e);if(void 0!==n&&"string"!=typeof n)throw new Error("schema id must be string");return it(this,r=Se.normalizeId(r||n)),this._schemas[r]=this._addSchema(e,t,a,!0),this},et.prototype.addMetaSchema=function(e,r,t){return this.addSchema(e,r,t,!0),this},et.prototype.validateSchema=function(e,r){var t=e.$schema;if(void 0!==t&&"string"!=typeof t)throw new Error("$schema must be a string");if(!(t=t||this._opts.defaultMeta||function(e){var r=e._opts.meta;return e._opts.defaultMeta="object"==typeof r?e._getId(r)||r:e.getSchema(Zr)?Zr:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var a=this.validate(t,e);if(!a&&r){var o="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(o);this.logger.error(o)}return a},et.prototype.getSchema=function(e){var r=rt(this,e);switch(typeof r){case"object":return r.validate||this._compile(r);case"string":return this.getSchema(r);case"undefined":return function(e,r){var t=Se.schema.call(e,{schema:{}},r);if(t){var a=t.schema,o=t.root,n=t.baseId,i=Ue.call(e,a,o,void 0,n);return e._fragments[r]=new we({ref:r,fragment:!0,schema:a,root:o,baseId:n,validate:i}),i}}(this,e)}},et.prototype.removeSchema=function(e){if(e instanceof RegExp)return tt(this,this._schemas,e),tt(this,this._refs,e),this;switch(typeof e){case"undefined":return tt(this,this._schemas),tt(this,this._refs),this._cache.clear(),this;case"string":var r=rt(this,e);return r&&this._cache.del(r.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var t=this._opts.serialize,a=t?t(e):e;this._cache.del(a);var o=this._getId(e);o&&(o=Se.normalizeId(o),delete this._schemas[o],delete this._refs[o])}return this},et.prototype.addFormat=function(e,r){"string"==typeof r&&(r=new RegExp(r));return this._formats[e]=r,this},et.prototype.errorsText=function(e,r){if(!(e=e||this.errors))return"No errors";for(var t=void 0===(r=r||{}).separator?", ":r.separator,a=void 0===r.dataVar?"data":r.dataVar,o="",n=0;n<e.length;n++){var i=e[n];i&&(o+=a+i.dataPath+" "+i.message+t)}return o.slice(0,-t.length)},et.prototype._addSchema=function(e,r,t,a){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var o=this._opts.serialize,n=o?o(e):e,i=this._cache.get(n);if(i)return i;a=a||!1!==this._opts.addUsedSchema;var s=Se.normalizeId(this._getId(e));s&&a&&it(this,s);var l,u=!1!==this._opts.validateSchema&&!r;u&&!(l=s&&s==Se.normalizeId(e.$schema))&&this.validateSchema(e,!0);var c=Se.ids.call(this,e),d=new we({id:s,schema:e,localRefs:c,cacheKey:n,meta:t});"#"!=s[0]&&a&&(this._refs[s]=d);this._cache.put(n,d),u&&l&&this.validateSchema(e,!0);return d},et.prototype._compile=function(e,r){if(e.compiling)return e.validate=o,o.schema=e.schema,o.errors=null,o.root=r||o,!0===e.schema.$async&&(o.$async=!0),o;var t,a;e.compiling=!0,e.meta&&(t=this._opts,this._opts=this._metaOpts);try{a=Ue.call(this,e.schema,r,e.localRefs)}catch(r){throw delete e.validate,r}finally{e.compiling=!1,e.meta&&(this._opts=t)}return e.validate=a,e.refs=a.refs,e.refVal=a.refVal,e.root=a.root,a;function o(){var r=e.validate,t=r.apply(this,arguments);return o.errors=r.errors,t}},et.prototype.compileAsync=_r,et.prototype.addKeyword=zr,et.prototype.getKeyword=Vr,et.prototype.removeKeyword=qr,et.prototype.validateKeyword=Mr,et.ValidationError=Ne.Validation,et.MissingRefError=Ne.MissingRef,et.$dataMetaSchema=Fr;var Zr="http://json-schema.org/draft-07/schema",Yr=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],Xr=["/properties"];function et(e){if(!(this instanceof et))return new et(e);var r,t;e=this._opts=se.copy(e)||{},function(e){var r=e._opts.logger;if(!1===r)e.logger={log:st,warn:st,error:st};else{if(void 0===r&&(r=console),!("object"==typeof r&&r.log&&r.warn&&r.error))throw new Error("logger must implement log, warn and error methods");e.logger=r}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=cr(e.format),this._cache=e.cache||new Ye,this._loadingSchemas={},this._compilations=[],this.RULES=((r=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}]).all=Sr(t=["type","$comment"]),r.types=Sr(["number","integer","string","array","object","boolean","null"]),r.forEach((function(e){e.rules=e.rules.map((function(e){var a;if("object"==typeof e){var o=Object.keys(e)[0];a=e[o],e=o,a.forEach((function(e){t.push(e),r.all[e]=!0}))}return t.push(e),r.all[e]={keyword:e,code:Er[e],implements:a}})),r.all.$comment={keyword:"$comment",code:Er.$comment},e.type&&(r.types[e.type]=e)})),r.keywords=Sr(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),r.custom={},r),this._getId=function(e){switch(e.schemaId){case"auto":return nt;case"id":return at;default:return ot}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=ze),this._metaOpts=function(e){for(var r=se.copy(e._opts),t=0;t<Yr.length;t++)delete r[Yr[t]];return r}(this),e.formats&&function(e){for(var r in e._opts.formats){var t=e._opts.formats[r];e.addFormat(r,t)}}(this),e.keywords&&function(e){for(var r in e._opts.keywords){var t=e._opts.keywords[r];e.addKeyword(r,t)}}(this),function(e){var r;e._opts.$data&&(r=Gr,e.addMetaSchema(r,r.$id,!0));if(!1===e._opts.meta)return;var t=Nr;e._opts.$data&&(t=Fr(t,Xr));e.addMetaSchema(t,Zr,!0),e._refs["http://json-schema.org/schema"]=Zr}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var r=e._opts.schemas;if(!r)return;if(Array.isArray(r))e.addSchema(r);else for(var t in r)e.addSchema(r[t],t)}(this)}function rt(e,r){return r=Se.normalizeId(r),e._schemas[r]||e._refs[r]||e._fragments[r]}function tt(e,r,t){for(var a in r){var o=r[a];o.meta||t&&!t.test(a)||(e._cache.del(o.cacheKey),delete r[a])}}function at(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function ot(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function nt(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function it(e,r){if(e._schemas[r]||e._refs[r])throw new Error('schema with key or id "'+r+'" already exists')}function st(){}var lt={$$currentLocalizeFn:function(e){if(e&&e.length)for(var r=0;r<e.length;r+=1){var t=e[r],a=void 0,o=void 0,n=void 0;switch(t.keyword){case"$ref":a="无法找到引用".concat(t.params.ref);break;case"additionalItems":a="",o=t.params.limit,a+="不允许超过".concat(o,"个元素");break;case"additionalProperties":a="不允许有额外的属性";break;case"anyOf":a="数据应为 anyOf 所指定的其中一个";break;case"const":a="应当等于常量";break;case"contains":a="应当包含一个有效项";break;case"custom":a='应当通过 "'.concat(t.keyword,' 关键词校验"');break;case"dependencies":a="",o=t.params.depsCount,a+="应当拥有属性".concat(t.params.property,"的依赖属性").concat(t.params.deps);break;case"enum":a="应当是预设定的枚举值之一";break;case"exclusiveMaximum":case"exclusiveMinimum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(n);break;case"false schema":a="布尔模式出错";break;case"format":a='应当匹配格式 "'.concat(t.params.format,'"');break;case"formatExclusiveMaximum":a="formatExclusiveMaximum 应当是布尔值";break;case"formatExclusiveMinimum":a="formatExclusiveMinimum 应当是布尔值";break;case"formatMaximum":case"formatMinimum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当是 ".concat(n);break;case"if":a='应当匹配模式 "'.concat(t.params.failingKeyword,'" ');break;case"maximum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(n);break;case"maxItems":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个项");break;case"maxLength":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个字符");break;case"maxProperties":a="",o=t.params.limit,a+="不应有多于 ".concat(o," 个属性");break;case"minimum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(n);break;case"minItems":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个项");break;case"minLength":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个字符");break;case"minProperties":a="",o=t.params.limit,a+="不应有少于 ".concat(o," 个属性");break;case"multipleOf":a="应当是 ".concat(t.params.multipleOf," 的整数倍");break;case"not":a='不应当匹配 "not" schema';break;case"oneOf":a='只能匹配一个 "oneOf" 中的 schema';break;case"pattern":a='应当匹配模式 "'.concat(t.params.pattern,'"');break;case"patternRequired":a="应当有属性匹配模式 ".concat(t.params.missingPattern);break;case"propertyNames":a="属性名 '".concat(t.params.propertyName,"' 无效");break;case"required":a="应当有必需属性 ".concat(t.params.missingProperty);break;case"switch":a="由于 ".concat(t.params.caseIndex,' 失败,未通过 "switch" 校验, ');break;case"type":a="应当是 ".concat(t.params.type," 类型");break;case"uniqueItems":a="不应当含有重复项 (第 ".concat(t.params.j," 项与第 ").concat(t.params.i," 项是重复的)");break;default:continue}t.message=a}},getCurrentLocalize:function(){return this.$$currentLocalizeFn},useLocal:function(e){this.$$currentLocalizeFn=e}};function ut(e,r){try{if("object"===w(r))return e.fill(null).map((function(){return JSON.parse(JSON.stringify(r))}))}catch(e){}}function ct(e,r){return e.filter((function(e){return r.includes(e)}))}function dt(e,r,t){var a=re(e.$ref,r);e.$ref;var o=O(e,["$ref"]);return ft(F(F({},a),o),r,t)}function mt(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length<2)return r[0];for(var a={},o=[].concat(r),n=function(){var e=q(o[0])?o[0]:{},r=q(o[1])?o[1]:{};a=Object.assign({},e),Object.keys(r).reduce((function(t,a){var o=e[a],n=r[a];if(q(o)||q(n))if(q(o)&&q(n))t[a]=mt(o,n);else{var i=_(q(o)?[o,n]:[n,o],2),s=i[0],l=i[1];t[a]="additionalProperties"===a?!0===l&&s:s}else if(Array.isArray(o)||Array.isArray(n))if(Array.isArray(o)&&Array.isArray(n)){if(q(o[0])||q(n[0]))throw new Error("暂不支持如上数组对象元素合并");var u=ct([].concat(o),[].concat(n));if(u.length<=0)throw new Error("无法合并如上数据");0===u.length&&"type"===a?t[a]=u[0]:t[a]=u}else{var c=_(Array.isArray(o)?[o,n]:[n,o],2),d=c[0],m=c[1];if(void 0===m)t[a]=d;else{if(!d.includes(m))throw new Error("无法合并如下数据");t[a]=m}}else if(void 0!==o&&void 0!==n)if("maxLength"===a||"maximum"===a||"maxItems"===a||"exclusiveMaximum"===a||"maxProperties"===a)t[a]=Math.min(o,n);else if("minLength"===a||"minimum"===a||"minItems"===a||"exclusiveMinimum"===a||"minProperties"===a)t[a]=Math.max(o,n);else if("multipleOf"===a)t[a]=X(o,n);else{if(o!==n)throw new Error("无法合并如下数据");t[a]=o}else t[a]=void 0===o?n:o;return t}),a),o.splice(0,2,a)};o.length>=2;)n();return a}function pt(e,r,t){var a=F(F({},e),{},{allOf:e.allOf.map((function(e){return ft(e,r,t)}))});try{var o=a.allOf,n=O(a,["allOf"]);return mt.apply(void 0,[n].concat(D(o)))}catch(e){return a.allOf,O(a,["allOf"])}}function ht(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.hasOwnProperty("allOf")&&(e=pt(e,r,t)),e.hasOwnProperty("$ref")&&(e=dt(e,r,t)),e}function ft(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return q(e)?ht(e,r,t):{}}var vt=/{{(.*)}}/;function gt(e,r,t,a){if(void 0!==t){var o=vt.exec(t);if(vt.lastIndex=0,o){var n=o[1].trim();return new Function("parentFormData","rootFormData","return ".concat(n))($(e,r,1),e)}return a()}}function yt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.schema,t=e.uiSchema,a=arguments.length>1?arguments[1]:void 0,o=Et({schema:r,uiSchema:t,containsSpec:!1});return["title","description"].reduce((function(e,r){return o[r]&&(e["ui:".concat(r)]=String(o[r]).replace(/\$index/g,a+1)),e}),{})}function bt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.curNodePath,i=void 0===n?"":n,s=e.rootFormData,l=void 0===s?{}:s,u=o["ui:widget"]||t["ui:widget"],c=o["ui:hidden"]||t["ui:hidden"];return"HiddenWidget"===u||"hidden"===u||!!gt(l,i,c,(function(){return"function"==typeof c?c($(l,i,1),l):c}))}function Pt(e,r){var t=r.schema,a=void 0===t?{}:t,o=r.uiSchema,n=void 0===o?{}:o,i=a["ui:field"]||n["ui:field"];if("function"==typeof i||"object"===w(i)||"string"==typeof i)return{field:i,fieldProps:n["ui:fieldProps"]||a["ui:fieldProps"]};var s=e[W(a)];if(s)return{field:s};if(!s&&(a.anyOf||a.oneOf))return{field:null};throw new Error("不支持的field类型 ".concat(a.type))}function wt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.curNodePath,i=e.rootFormData,s=void 0===i?{}:i;return Object.assign.apply(Object,[{}].concat(D([t,o].map((function(e){return Object.keys(e).reduce((function(r,t){var a=e[t];return"ui:options"===t&&q(a)?F(F({},r),a):0===t.indexOf("ui:")?F(F({},r),{},E({},t.substring(3),void 0===n?a:gt(s,n,a,(function(){return a})))):r}),{})})))))}function Et(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.containsSpec,i=void 0===n||n,s=e.curNodePath,l=e.rootFormData,u={};return i&&(u.readonly=!!t.readOnly,void 0!==t.multipleOf&&(u.step=t.multipleOf),(t.minimum||0===t.minimum)&&(u.min=t.minimum),(t.maximum||0===t.maximum)&&(u.max=t.maximum),(t.minLength||0===t.minLength)&&(u.minlength=t.minLength),(t.maxLength||0===t.maxLength)&&(u.maxlength=t.maxLength),"date-time"!==t.format&&"date"!==t.format||("array"===t.type?(u.isRange=!0,u.isNumberValue=!(t.items&&"string"===t.items.type)):u.isNumberValue=!("string"===t.type))),F(F({title:t.title,description:t.description},u),wt({schema:t,uiSchema:o,curNodePath:s,rootFormData:l}))}function St(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.curNodePath,i=e.rootFormData,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,l=Et({schema:t,uiSchema:o,curNodePath:n,rootFormData:i});!l.widget&&s&&Object.assign(l,s({schema:t,uiSchema:o}));var u=l.widget,c=l.title,d=l.labelWidth,m=l.description,p=l.attrs,h=l.class,f=l.style,v=l.fieldAttrs,g=l.fieldStyle,y=l.fieldClass,b=l.emptyValue,P=l.width,w=l.getWidget,E=l.onChange,S=O(l,["widget","title","labelWidth","description","attrs","class","style","fieldAttrs","fieldStyle","fieldClass","emptyValue","width","getWidget","onChange"]);return{widget:u,label:c,labelWidth:d,description:m,widgetAttrs:p,widgetClass:h,widgetStyle:f,fieldAttrs:v,width:P,fieldStyle:g,fieldClass:y,emptyValue:b,getWidget:w,onChange:E,uiProps:S}}function xt(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.errorSchema,i=void 0===n?{}:n;return Object.assign.apply(Object,[{}].concat(D([t,o,i].map((function(e){return Object.keys(e).reduce((function(r,t){var a=e[t];return"err:options"===t&&q(a)?F(F({},r),a):0===t.indexOf("err:")?F(F({},r),{},E({},t.substring(4),a)):r}),{})})))))}function Ft(e,r){if(!Array.isArray(r))return e;var t,a=function(e){return e.reduce((function(e,r){return e[r]=!0,e}),{})},o=a(e),n=r.filter((function(e){return"*"===e||o[e]})),i=a(n),s=e.filter((function(e){return!i[e]})),l=n.indexOf("*");if(-1===l){if(s.length)throw new Error("uiSchema order list does not contain ".concat((t=s).length>1?"properties '".concat(t.join("', '"),"'"):"property '".concat(t[0],"'")));return n}if(l!==n.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");var u=D(n);return u.splice.apply(u,[l,1].concat(D(s))),u}function Ot(e){return Array.isArray(e.enum)&&1===e.enum.length||e.hasOwnProperty("const")}function _t(e){if(Array.isArray(e.enum)&&1===e.enum.length)return e.enum[0];if(e.hasOwnProperty("const"))return e.const;throw new Error("schema cannot be inferred as a constant")}function Dt(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=ft(e,r),a=t.oneOf||t.anyOf;return!!Array.isArray(t.enum)||!!Array.isArray(a)&&a.every((function(e){return Ot(e)}))}function kt(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every((function(e){return q(e)}))}function jt(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!(!e.uniqueItems||!e.items)&&Dt(e.items,r)}function It(e){return e.additionalItems,q(e.additionalItems)}function At(e,r,t,a){if(e.enum){var o=wt({schema:e,uiSchema:r,curNodePath:t,rootFormData:a}).enumNames||e.enumNames;return e.enum.map((function(e,r){return{label:o&&o[r]||String(e),value:e}}))}var n=e.oneOf||e.anyOf,i=r.oneOf||r.anyOf;return n.map((function(e,r){var o=i&&i[r]?wt({schema:e,uiSchema:i[r],curNodePath:t,rootFormData:a}):{},n=_t(e);return{label:o.title||e.title||String(n),value:n}}))}function Ct(e,r,t){if(e)return e;if(r){var a=t.split(".").pop();if(a&&a!=="".concat(Number(a)))return a}return""}var Rt=Object.freeze({__proto__:null,replaceArrayIndex:yt,isHiddenWidget:bt,getUiField:Pt,getUserUiOptions:wt,getUiOptions:Et,getWidgetConfig:St,getUserErrOptions:xt,orderProperties:Ft,isConstant:Ot,toConstant:_t,isSelect:Dt,isFixedItems:kt,isMultiSelect:jt,allowAdditionalItems:It,optionsList:At,fallbackLabel:Ct}),$t=Tt(),Nt=null,Lt=null;function Tt(){var e=new Jr({errorDataPath:"property",allErrors:!0,multipleOfPrecision:8,schemaId:"auto",unknownFormats:"ignore"});return e.addFormat("data-url",/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/),e.addFormat("color",/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/),e}function zt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null===e?[]:e.map((function(e){var r=e.dataPath,t=e.keyword,a=e.message,o=e.params,n=e.schemaPath,i="".concat(r);return{name:t,property:i,message:a,params:o,stack:"".concat(i," ").concat(a).trim(),schemaPath:n}}))}function Vt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.transformErrors,o=e.additionalMetaSchemas,n=void 0===o?[]:o,i=e.customFormats,s=void 0===i?{}:i,l=!Q(Lt,n),u=!Q(Nt,s);(l||u)&&($t=Tt()),n&&l&&Array.isArray(n)&&($t.addMetaSchema(n),Lt=n),s&&u&&q(s)&&(Object.keys(s).forEach((function(e){$t.addFormat(e,s[e])})),Nt=s);var c=null;try{$t.validate(t,r)}catch(e){c=e}lt.getCurrentLocalize()($t.errors);var d=zt($t.errors);$t.errors=null;var m=c&&c.message&&"string"==typeof c.message&&c.message.includes("no schema with key or ref ");return m&&(d=[].concat(D(d),[{stack:c.message}])),"function"==typeof a&&(d=a(d)),{errors:d}}function qt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.uiSchema,o=e.transformErrors,n=e.additionalMetaSchemas,i=void 0===n?[]:n,s=e.customFormats,l=void 0===s?{}:s,u=e.errorSchema,c=void 0===u?{}:u,d=e.required,m=void 0!==d&&d,p=e.propPath,h=void 0===p?"":p,f=e.isOnlyFirstError,v=void 0===f||f,g="array"===t.type&&Array.isArray(r)&&0===r.length,y=void 0===r||g;if(m){if(y){var b={keyword:"required",params:{missingProperty:h}},P=xt({schema:t,uiSchema:a,errorSchema:c}).required;return P?b.message=P:lt.getCurrentLocalize()([b]),[b]}}else if(y&&!g)return[];var w=Vt({formData:r,schema:t,transformErrors:o,additionalMetaSchemas:i,customFormats:l}).errors;w=w.filter((function(e){return""===e.property&&!e.schemaPath.includes("#/anyOf/")&&!e.schemaPath.includes("#/oneOf/")||"additionalProperties"===e.name}));var E=xt({schema:t,uiSchema:a,errorSchema:c});return(v&&w.length>0?[w[0]]:w).reduce((function(e,r){return r.message=void 0!==E[r.name]?E[r.name]:r.message,e.push(r),e}),[])}function Mt(e,r){try{return $t.validate(e,r)}catch(e){return!1}}function Ut(e,r,t){for(var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=0;o<r.length;o++){var n=ft(r[o],t,e);if(n.properties){var i=F(F({},t.definitions?{definitions:t.definitions}:{}),{},{anyOf:Object.keys(n.properties).map((function(e){return{required:[e]}}))}),s=void 0;if(n.anyOf){var l=S({},n);l.allOf?l.allOf=l.allOf.slice():l.allOf=[],l.allOf.push(i),s=l}else s=Object.assign({},n,i);if(a||delete s.required,Mt(s,e))return o}else if(Mt(r[o],e))return o}return 0}var Wt=Object.freeze({__proto__:null,ajvValidateFormData:Vt,validateFormDataAndTransformMsg:qt,isValid:Mt,getMatchingOption:Ut});function Qt(e,r){if(Array.isArray(r))return Array.isArray(e)||(e=[]),r.map((function(r,t){return e[t]?Qt(e[t],r):r}));if(q(r)){var t=Object.assign({},e);return Object.keys(r).reduce((function(t,a){return t[a]=Qt(e?e[a]:{},r[a]),t}),t)}return r}function Bt(e,r,t){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],n=q(e)?e:{},i=q(a)?a:{};"allOf"in n&&(n=pt(n,t,i));var s=r;if(q(s)&&q(n.default))s=U(s,n.default);else if("default"in n)s=n.default;else{if("$ref"in n){var l=re(n.$ref,t);return Bt(l,s,t,i,o)}if(kt(n))s=n.items.map((function(e,a){return Bt(e,Array.isArray(r)?r[a]:void 0,t,i,o)}));else if("oneOf"in n){var u=ft(n.oneOf[Ut(i,n.oneOf,t)],t,i);if(n.properties&&u.properties){var c=U(n,u);delete c.oneOf,n=c}else n=u}else if("anyOf"in n){var d=ft(n.anyOf[Ut(i,n.anyOf,t)],t,i);if(n.properties&&d.properties){var m=U(n,d);delete m.anyOf,n=m}else n=d}}switch(void 0===s&&(s=n.default),W(n)){case"null":return null;case"object":return Object.keys(n.properties||{}).reduce((function(e,r){var a=Bt(n.properties[r],(s||{})[r],t,(i||{})[r],o);return(o||void 0!==a)&&(e[r]=a),e}),{});case"array":if(Array.isArray(s)&&(s=s.map((function(e,r){return Bt(n.items[r]||n.additionalItems||{},e,t,{},o)}))),Array.isArray(a)&&(s=a.map((function(e,r){return Bt(n.items,(s||{})[r],t,e,{},o)}))),n.minItems){if(jt(n,t))return s||[];var p=s?s.length:0;if(n.minItems>p){var h=s||[],f=Array.isArray(n.items)?n.additionalItems:n.items,v=ut(new Array(n.minItems-p),Bt(f,f.defaults,t,{},o));return h.concat(v)}}s=void 0===s?[]:s}return s}function Ht(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!q(e))throw new Error("Invalid schema: ".concat(e));var o=ft(e,t,r),n=Bt(o,e.default,t,r,a);return void 0===r?n:q(r)||Array.isArray(r)?Qt(n,r):0===r||!1===r||""===r?r:r||n}function Kt(e,r){void 0===r&&(r={});var t=r.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}Kt('.genFromComponent{font-size:14px;line-height:1;word-wrap:break-word;word-break:break-word;padding:0;margin:0}.genFromComponent a,.genFromComponent h1,.genFromComponent h2,.genFromComponent h3,.genFromComponent li,.genFromComponent p,.genFromComponent ul{font-size:14px}.genFromComponent .genFormIcon{width:12px;height:12px;vertical-align:top}.genFromComponent .genFormBtn{display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;background:#fff;border:1px solid #dcdfe6;color:#606266;-webkit-appearance:none;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;margin:0;-webkit-transition:.1s;transition:.1s;font-weight:500;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;padding:12px 20px;font-size:14px;border-radius:4px}.genFromComponent .genFormBtn.is-plain:focus,.genFromComponent .genFormBtn.is-plain:hover{background:#fff;border-color:#409eff;color:#409eff}.genFromComponent .hiddenWidget{display:none}.genFromComponent .fieldGroupWrap+.fieldGroupWrap .fieldGroupWrap_title{margin-top:20px}.genFromComponent .fieldGroupWrap_title{position:relative;display:block;width:100%;line-height:26px;margin-bottom:8px;font-size:15px;font-weight:700;border:0}.genFromComponent .fieldGroupWrap_des{font-size:12px;line-height:20px;margin-bottom:10px;color:#999}.genFromComponent .genFromWidget_des{padding:0;margin-top:0;margin-bottom:2px;font-size:12px;line-height:20px;color:#999;text-align:left}.genFromComponent .formItemErrorBox{margin:0 auto;color:#ff5757;padding-top:2px;position:absolute;top:100%;left:0;display:-webkit-box!important;line-height:16px;text-overflow:ellipsis;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1;white-space:normal;font-size:12px;text-align:left}.genFromComponent .genFormIcon-qs{fill:#606266;vertical-align:middle;display:inline-block;width:16px;height:16px;margin-left:2px;margin-top:-2px;cursor:pointer}.genFromComponent .genFormItemRequired:before{content:"*";color:#f56c6c;margin-right:4px}.genFromComponent .appendCombining_box{margin-bottom:22px}.genFromComponent .appendCombining_box .appendCombining_box{margin-bottom:10px}.genFromComponent .appendCombining_box{padding:10px;background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .validateWidget{margin-bottom:0!important;width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important;padding:0!important}.genFromComponent .validateWidget .formItemErrorBox{padding:5px 0;position:relative}.genFromComponent .arrayField:not(.genFormItem){margin-bottom:22px}.genFromComponent .arrayField:not(.genFormItem) .arrayField{margin-bottom:10px}.genFromComponent .arrayOrderList{background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .arrayOrderList_item{position:relative;padding:25px 10px 12px;border-radius:2px;margin-bottom:6px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.genFromComponent .arrayOrderList_bottomAddBtn{text-align:right;padding:15px 10px;margin-bottom:10px}.genFromComponent .bottomAddBtn{width:40%;min-width:10px;max-width:180px}.genFromComponent .arrayListItem_content{padding-top:15px;-webkit-box-flex:1;-ms-flex:1;flex:1;margin:0 auto;-webkit-box-shadow:0 -1px 0 0 rgba(0,0,0,.05);box-shadow:0 -1px 0 0 rgba(0,0,0,.05)}.genFromComponent .arrayListItem_index,.genFromComponent .arrayListItem_operateTool{position:absolute;height:25px}.genFromComponent .arrayListItem_index{top:6px;line-height:18px;height:18px;padding:0 6px;background-color:rgba(0,0,0,.28);color:#fff;font-size:12px;border-radius:2px}.genFromComponent .arrayListItem_operateTool{width:75px;right:9px;top:-1px;text-align:right;font-size:0}.genFromComponent .arrayListItem_btn{vertical-align:top;display:inline-block;padding:6px;margin:0;font-size:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none;cursor:pointer;text-align:center;background:transparent;color:#666}.genFromComponent .arrayListItem_btn:hover{opacity:.6}.genFromComponent .arrayListItem_btn[disabled]{color:#999;opacity:.3!important;cursor:not-allowed}.genFromComponent .arrayListItem_orderBtn-bottom,.genFromComponent .arrayListItem_orderBtn-top{background-color:#f0f9eb}.genFromComponent .arrayListItem_btn-delete{background-color:#fef0f0}.genFromComponent .formFooter_item{text-align:right;border-top:1px solid rgba(0,0,0,.08);padding-top:10px}.genFromComponent.formInlineFooter>.fieldGroupWrap{display:inline-block;margin-right:10px}.genFromComponent.formInline .genFormItem{display:inline-block;margin-right:10px;vertical-align:top}.genFromComponent.formInline .validateWidget{margin-right:0}.genFromComponent.formInline .formFooter_item{border-top:none;padding-top:0}.layoutColumn .layoutColumn_w100{width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important}.layoutColumn .fieldGroupWrap_box{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start}.layoutColumn .fieldGroupWrap_box>div{width:100%;-ms-flex-preferred-size:100%;flex-basis:100%}.layoutColumn .fieldGroupWrap_box>.genFormItem{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;-webkit-box-sizing:border-box;box-sizing:border-box;padding-right:10px}.layoutColumn.layoutColumn-1 .fieldGroupWrap_box>.genFormItem{padding-right:0}.layoutColumn.layoutColumn-2 .fieldGroupWrap_box>.genFormItem{width:50%;-ms-flex-preferred-size:50%;flex-basis:50%}.layoutColumn.layoutColumn-3 .fieldGroupWrap_box>.genFormItem{width:33.333%;-ms-flex-preferred-size:33.333%;flex-basis:33.333%}');var Gt={formFooter:{type:Object,default:function(){return{show:!0,okBtn:"保存",cancelBtn:"取消"}}},modelValue:{type:null,default:function(){return{}},required:!0},fallbackLabel:{type:Boolean,default:!1},formProps:{type:Object,default:function(){return{}}},schema:{type:Object,default:function(){return{}},required:!0},uiSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},errorSchema:{type:Object,default:function(){return{}}}},Jt={name:"FormFooter",props:{okBtn:{type:String,default:"保存"},cancelBtn:{type:String,default:"取消"},formItemAttrs:{type:Object,default:function(){return{}}},globalOptions:{type:Object,default:function(){return{}}}},emits:["cancel","submit"],setup:function(e,t){var a=t.emit,o=e.globalOptions.COMPONENT_MAP;return function(){return r(z(o.formItem),F({class:{formFooter_item:!0}},e.formItemAttrs),{default:function(){return[r(z(o.button),{onClick:function(){a("cancel")}},{default:function(){return e.cancelBtn}}),r(z(o.button),{style:{marginLeft:"10px"},type:"primary",onClick:function(){a("submit")}},{default:function(){return e.okBtn}})]}})}}},Zt={name:"FieldGroupWrap",inject:["genFormProvide"],props:{curNodePath:{type:String,default:""},showTitle:{type:Boolean,default:!0},showDescription:{type:Boolean,default:!0},title:{type:String,default:""},description:{type:String,default:""}},computed:{trueTitle:function(){var e=this.title;if(e)return e;var r=(this.genFormProvide.value||this.genFormProvide).fallbackLabel&&this.curNodePath.split(".").pop();return r!=="".concat(Number(r))?r:""}}},Yt={class:"fieldGroupWrap"},Xt={key:0,class:"fieldGroupWrap_title"},ea={class:"fieldGroupWrap_box"};Zt.render=function(e,r,l,u,c,d){return t(),a("div",Yt,[l.showTitle&&d.trueTitle?(t(),a("h3",Xt,o(d.trueTitle),1)):n("v-if",!0),l.showDescription&&l.description?(t(),a("p",{key:1,class:"fieldGroupWrap_des",innerHTML:l.description},null,8,["innerHTML"])):n("v-if",!0),i("div",ea,[s(e.$slots,"default")])])},Zt.__file="utils/components/FieldGroupWrap.vue";var ra={formProps:{type:null},globalOptions:{type:null},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},customFormats:{type:Object,default:function(){return{}}},rootSchema:{type:Object,default:function(){return{}}},rootFormData:{type:null,default:function(){return{}}},curNodePath:{type:String,default:""},required:{type:Boolean,default:!1},needValidFieldGroup:{type:Boolean,default:!0}},ta={class:"genFormIcon genFormIcon-down",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},aa=i("path",{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"},null,-1);var oa={render:function(e,r){return t(),a("svg",ta,[aa])},__file:"utils/icons/IconCaretDown.vue"},na={class:"genFormIcon genFormIcon-up",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},ia=i("path",{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"},null,-1);var sa={render:function(e,r){return t(),a("svg",na,[ia])},__file:"utils/icons/IconCaretUp.vue"},la={class:"genFormIcon genFormIcon-close",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},ua=i("path",{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1\n 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0\n 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"},null,-1);var ca={render:function(e,r){return t(),a("svg",la,[ua])},__file:"utils/icons/IconClose.vue"},da={class:"genFormIcon genFormIcon-plus",t:"1551322312294",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"10297","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"200",height:"200"},ma=i("path",{d:"M474 152m8 0l60 0q8 0 8 8l0 704q0 8-8 8l-60 0q-8 0-8-8l0-704q0-8 8-8Z","p-id":"10298"},null,-1),pa=i("path",{d:"M168 474m8 0l672 0q8 0 8 8l0 60q0 8-8 8l-672 0q-8 0-8-8l0-60q0-8 8-8Z","p-id":"10299"},null,-1);var ha={render:function(e,r){return t(),a("svg",da,[ma,pa])},__file:"utils/icons/IconPlus.vue"},fa={class:"genFormIcon genFormIcon-qs",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},va=i("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 708c-22.1\n 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 0\n 0-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8\n 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6\n 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6\n 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z"},null,-1);var ga={render:function(e,r){return t(),a("svg",fa,[va])},__file:"utils/icons/IconQuestion.vue"},ya={name:"Widget",props:{isFormData:{type:Boolean,default:!0},curValue:{type:null,default:0},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},widget:{type:[String,Function,Object],default:null},required:{type:Boolean,default:!1},emptyValue:{type:null,default:void 0},rootFormData:{type:null},curNodePath:{type:String,default:""},label:{type:String,default:""},width:{type:String,default:""},labelWidth:{type:String,default:""},description:{type:String,default:""},widgetAttrs:{type:Object,default:function(){return{}}},widgetClass:{type:Object,default:function(){return{}}},widgetStyle:{type:Object,default:function(){return{}}},fieldAttrs:{type:Object,default:function(){return{}}},fieldClass:{type:Object,default:function(){return{}}},fieldStyle:{type:Object,default:function(){return{}}},uiProps:{type:Object,default:function(){return{}}},formProps:null,getWidget:null,globalOptions:null,onChange:null},emits:["change"],inheritAttrs:!0,setup:function(e,t){var a=t.emit,o=l("genFormProvide"),n=u({get:function(){return e.isFormData?$(e.rootFormData,e.curNodePath):e.curValue},set:function(r){var t=""===r||null===r?e.emptyValue:r;e.isFormData&&T(e.rootFormData,e.curNodePath,t),a("change",t)}});e.uiProps.enumOptions&&e.uiProps.enumOptions.length>0&&void 0===n.value&&n.value!==e.uiProps.enumOptions[0]&&(e.schema.items?n.value=[]:e.required&&(n.value=e.uiProps.enumOptions[0].value));var i=c(null);return"function"==typeof e.getWidget&&d(i,(function(){e.getWidget.call(null,i.value)})),function(){var t=C(e.curNodePath),a=e.globalOptions.HELPERS.isMiniDes(e.formProps),s=e.description?r("div",{innerHTML:e.description,class:{genFromWidget_des:!0}}):null,l=e.globalOptions.COMPONENT_MAP,u=a&&s?r(z(l.popover),{style:{margin:"0 2px",fontSize:"16px",cursor:"pointer"},placement:"top",trigger:"hover"},{default:function(){return s},reference:function(){return r(ga)}}):null,c=F(F({},e.fieldStyle),e.width?{width:e.width,flexBasis:e.width,paddingRight:"10px"}:{}),d=Ct(e.label,e.widget&&o.value.fallbackLabel,e.curNodePath);return r(z(l.formItem),F(F(F({class:F(F({},e.fieldClass),{},{genFormItem:!0}),style:c},e.fieldAttrs),e.labelWidth?{labelWidth:e.labelWidth}:{}),e.isFormData?{prop:t?"__$$root":e.curNodePath,rules:[{validator:function(r,a,o){t&&(a=e.rootFormData);var n=qt({formData:a,schema:e.schema,uiSchema:e.uiSchema,customFormats:e.customFormats,errorSchema:e.errorSchema,required:e.required,propPath:e.curNodePath});if(n.length>0)return o?o(n[0].message):Promise.reject(n[0].message);var i=e.customRule;return i&&"function"==typeof i?i({field:e.curNodePath,value:a,rootFormData:e.rootFormData,callback:o}):o?o():Promise.resolve()},trigger:"blur"}]}:{}),F(F({error:function(e){return e.error?r("div",{class:{formItemErrorBox:!0},title:e.error},[e.error]):null}},d?{label:function(){return r("span",{class:{genFormLabel:!0,genFormItemRequired:e.required}},["".concat(d)].concat(D(u?[u]:[]),["".concat(e.formProps&&e.formProps.labelSuffix||"")]))}}:{}),{},{default:function(t){return[].concat(D(!a&&s?[s]:[]),D(e.widget?[r(z(e.widget),F(F(F({style:e.widgetStyle,class:e.widgetClass},e.widgetAttrs),e.uiProps),{},{modelValue:n.value,ref:i,"onUpdate:modelValue":function(r){var t=n.value;t!==r&&(n.value=r,e.onChange&&e.onChange({curVal:r,preVal:t,parentFormData:$(e.rootFormData,e.curNodePath,1),rootFormData:e.rootFormData}))}},t))]:[]))}}))}}},ba={name:"ObjectField",props:ra,setup:function(e){return function(){var t=e.curNodePath,a=Et({schema:e.schema,uiSchema:e.uiSchema,curNodePath:t,rootFormData:e.rootFormData}),o=a.title,n=a.description,i=a.showTitle,s=a.showDescription,l=a.order,u=a.fieldClass,c=a.fieldAttrs,d=a.fieldStyle,m=a.onlyShowIfDependent,p=Ft(Object.keys(e.schema.properties||{}),l).map((function(a){var o=function(r){return Array.isArray(e.schema.required)&&!!~e.schema.required.indexOf(r)}(a),n=function(r){var t=!1,a=!1;return q(e.schema.dependencies)&&(a=Object.entries(e.schema.dependencies).some((function(a){var o=_(a,2),n=o[0],i=o[1],s=!(!Array.isArray(i)||!~i.indexOf(r));return t=t||s,s&&void 0!==$(e.rootFormData,e.curNodePath)[n]}))),{isDependency:t,curDependent:a}}(a),i=n.isDependency,s=n.curDependent;return i&&m&&!s?null:r(Aa,F(F({key:a},e),{},{schema:e.schema.properties[a],uiSchema:e.uiSchema[a],errorSchema:e.errorSchema[a],required:o||s,curNodePath:R(t,a)}))}));return r(Zt,F({title:o,description:n,showTitle:i,showDescription:s,curNodePath:t,class:F({},u),style:d},c),{default:function(){return[].concat(D(p),D(e.needValidFieldGroup?[r(ya,{key:"validateWidget-object",class:{validateWidget:!0,"validateWidget-object":!0},schema:Object.entries(e.schema).reduce((function(r,t){var a=_(t,2),o=a[0],n=a[1];return!1!==e.schema.additionalProperties&&["properties","id","$id"].includes(o)||(r[o]=n),r}),{}),uiSchema:e.uiSchema,errorSchema:e.errorSchema,curNodePath:t,rootFormData:e.rootFormData,globalOptions:e.globalOptions})]:[]))}})}}},Pa={name:"StringField",props:ra,setup:function(e,t){var a=t.attrs,o=u((function(){var r=Dt(e.schema)&&At(e.schema,e.uiSchema,e.curNodePath,e.rootFormData),t=St({schema:e.schema,uiSchema:e.uiSchema,curNodePath:e.curNodePath,rootFormData:e.rootFormData},(function(){var t="number"===e.schema.type||"integer"===e.schema.type;return{widget:r?e.globalOptions.WIDGET_MAP.common.select:e.globalOptions.WIDGET_MAP.formats[e.schema.format]||(t?e.globalOptions.WIDGET_MAP.types.number:e.globalOptions.WIDGET_MAP.types.string)}}));return r&&!t.uiProps.enumOptions&&(t.uiProps.enumOptions=r),t}));return function(){return r(ya,F(F(F({},e),a),o.value))}}},wa={name:"NumberField",props:ra,setup:function(e,t){var a=t.attrs;return function(){return r(Pa,F(F({},e),a))}}},Ea={name:"IntegerField",props:ra,setup:function(e,t){var a=t.attrs;return function(){return r(Pa,F(F({},e),a))}}},Sa={name:"BooleanField",props:ra,setup:function(e,t){var a=t.attrs;return function(){var t=e.schema,o=e.uiSchema,n=e.curNodePath,i=e.rootFormData,s=e.globalOptions,l=At({enumNames:t.enumNames||["true","false"],enum:t.enum||[!0,!1]},o,n,i),u=St({schema:t,uiSchema:o,curNodePath:n,rootFormData:i},(function(){return{widget:s.WIDGET_MAP.types.boolean}}));return u.uiProps.enumOptions=u.uiProps.enumOptions||l,r(ya,F(F(F({},a),e),u))}}},xa={name:"ArrayOrderList",emits:["arrayOperate"],props:{vNodeList:{type:Array,default:[]},tupleItemsLength:{type:Number,default:0},addable:{type:Boolean,default:!0},showIndexNumber:{type:Boolean,default:!1},sortable:{type:Boolean,default:!0},removable:{type:Boolean,default:!0},maxItems:{},minItems:{},globalOptions:null},setup:function(e,t){var a=t.emit,o=u((function(){var r=e.addable,t=e.maxItems,a=e.vNodeList;return!!r&&(void 0===t||a.length<t)})),n=u((function(){var r=e.removable,t=e.minItems,a=e.vNodeList;return!!r&&(void 0===t||a.length>t)}));return function(){return e.vNodeList.length<=0&&!e.addable?null:r("div",{class:{arrayOrderList:!0}},e.vNodeList.map((function(t,o){var i=t.key,s=t.vNode,l=e.tupleItemsLength+o,u=o+1;return r("div",{key:i,class:{arrayOrderList_item:!0}},[e.showIndexNumber?r("div",{class:{arrayListItem_index:!0}},u):null,r("div",{class:{arrayListItem_operateTool:!0}},[r("button",{style:F({},e.sortable?{}:{display:"none"}),class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-top":!0},type:"button",disabled:!e.sortable||0===o,onClick:function(){a("arrayOperate",{command:"moveUp",data:{index:l}})}},[r(sa)]),r("button",{style:F({},e.sortable?{}:{display:"none"}),class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-bottom":!0},type:"button",disabled:!e.sortable||o===e.vNodeList.length-1,onClick:function(){a("arrayOperate",{command:"moveDown",data:{index:l}})}},[r(oa)]),r("button",{style:F({},e.removable?{}:{display:"none"}),class:{arrayListItem_btn:!0,"arrayListItem_btn-delete":!0},type:"button",disabled:!n.value,onClick:function(){a("arrayOperate",{command:"remove",data:{index:l}})}},[r(ca)])]),r("div",{class:{arrayListItem_content:!0}},[s])])})).concat([r("p",{style:F({},o.value?{}:{display:"none"}),class:{arrayOrderList_bottomAddBtn:!0}},[r("button",{class:{bottomAddBtn:!0,"is-plain":!0,genFormBtn:!0},type:"button",onClick:function(){a("arrayOperate",{command:"add"})}},[r(ha,{style:{marginRight:"5px"}}),e.maxItems?"( ".concat(e.vNodeList.length," / ").concat(e.maxItems," )"):""])])]))}}},Fa={name:"ArrayFieldNormal",props:F(F({},ra),{},{itemsFormData:{type:Array}}),setup:function(e,t){var a=t.attrs;return function(){var t=e.schema,o=e.uiSchema,n=e.curNodePath,i=e.rootFormData,s=e.itemsFormData,l=e.errorSchema,u=e.globalOptions,c=Et({schema:t,uiSchema:o,curNodePath:n,rootFormData:i}),d=c.title,m=c.description,p=c.addable,h=c.showIndexNumber,f=c.sortable,v=c.removable,g=c.showTitle,y=c.showDescription,b=c.fieldClass,P=c.fieldAttrs,w=c.fieldStyle,E=s.map((function(a,i){var s=yt({schema:t.items,uiSchema:o.items},i);return{key:a.key,vNode:r(Aa,F(F({key:a.key},e),{},{schema:t.items,required:![].concat(t.items.type).includes("null"),uiSchema:F(F({},o.items),s),errorSchema:l.items,curNodePath:R(n,i)}))}}));return r(Zt,{title:d,description:m,showTitle:g,showDescription:y,curNodePath:n,class:b,attrs:P,style:w},{default:function(){return r(xa,F(F({},a),{},{vNodeList:E,showIndexNumber:h,addable:p,sortable:f,removable:v,maxItems:t.maxItems,minItems:t.minItems,globalOptions:u}))}})}}},Oa={name:"ArrayFieldMultiSelect",props:F({},ra),setup:function(e,t){var a=t.attrs;return function(){var t=e.schema,o=e.rootSchema,n=e.uiSchema,i=e.curNodePath,s=e.rootFormData,l=e.globalOptions,u=At(ft(t.items,o),n,i,s),c=St({schema:t,uiSchema:n,curNodePath:i,rootFormData:s},(function(){return{widget:l.WIDGET_MAP.common.checkboxGroup}}));return c.uiProps.multiple=!0,u&&!c.uiProps.enumOptions&&(c.uiProps.enumOptions=u),r(ya,F(F(F({},a),e),c))}}},_a={name:"ArrayFieldTuple",props:F(F({},ra),{},{itemsFormData:{type:Array,default:function(){return[]}}}),emits:["arrayOperate"],setup:function(e,t){var a=t.emit;t.attrs;return function(){var r=!Array.isArray(e.itemsFormData);if(r||e.itemsFormData.length<e.schema.items.length){var t=Ht(e.schema,void 0,e.rootSchema);a("arrayOperate",r?{command:"setNewTarget",data:{newTarget:t}}:{command:"batchPush",data:{pushArray:t.slice(e.itemsFormData.length)}})}}(),function(){if(!Array.isArray(e.itemsFormData))return null;var t,o,n=e.schema,i=e.uiSchema,s=e.errorSchema,l=e.curNodePath,u=e.globalOptions,c=Et({schema:n,uiSchema:i,curNodePath:l,rootFormData:e.rootFormData}),d=c.title,m=c.description,p=c.addable,h=c.showIndexNumber,f=c.sortable,v=c.removable,g=c.showTitle,y=c.showDescription,b=c.fieldClass,P=c.fieldAttrs,w=c.fieldStyle,E=(t=e.itemsFormData,o=e.schema.items.length-1,t.reduce((function(e,r,t){return e[t>o?1:0].push(r),e}),[[],[]])),S=E[0].map((function(t,a){return r(Aa,F(F({key:t.key},e),{},{required:![].concat(n.items[a].type).includes("null"),schema:n.items[a],uiSchema:i.items?i.items[a]:{},errorSchema:s.items?s.items[a]:{},curNodePath:R(l,a)}))})),x=E[1].map((function(t,a){var o=yt({schema:n.additionalItems,uiSchema:i.additionalItems},a);return{key:t.key,vNode:r(Aa,F(F({key:t.key},e),{},{schema:n.additionalItems,required:![].concat(n.additionalItems.type).includes("null"),uiSchema:F(F({},i.additionalItems),o),errorSchema:s.additionalItems,curNodePath:R(e.curNodePath,a+n.items.length)}))}})),O=(void 0===p||p)&&It(e.schema);return r(Zt,F(F({title:d,description:m,showTitle:g,showDescription:y,curNodePath:l},P),{},{class:b,style:w}),{default:function(){return[].concat(D(S),[r(xa,{onArrayOperate:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return a.apply(void 0,["arrayOperate"].concat(r))},vNodeList:x,tupleItemsLength:n.items.length,addable:O,showIndexNumber:h,sortable:f,removable:v,maxItems:n.maxItems,minItems:n.minItems,globalOptions:u})])}})}}},Da={name:"ArrayFieldSpecialFormat",props:ra,setup:function(e,t){var a=t.attrs,o=e.schema,n=e.uiSchema,i=e.curNodePath,s=e.rootFormData,l=St({schema:F({"ui:widget":e.globalOptions.WIDGET_MAP.formats[o.format]},o),uiSchema:n,curNodePath:i,rootFormData:s});return function(){return r(ya,F(F(F({},a),e),l))}}},ka={name:"ArrayField",props:ra,setup:function(e){var t=function(){var r=$(e.rootFormData,e.curNodePath);return Array.isArray(r)?r:[]},a=c(t().map((function(){return K()}))),o=u((function(){return t()}));d(o,(function(e,r){e!==r&&m(e)!==m(r)&&Array.isArray(e)&&(a.value=e.map((function(){return K()})))}),{deep:!0});var n=u((function(){return o.value.map((function(e,r){return{key:a.value[r],value:e}}))})),i=function(r){var t=r.command,n=r.data,i={moveUp:function(e,r){!function(e,r){if(0===r)return!1;var t=[e[r],e[r-1]];e.splice.apply(e,[r-1,2].concat(t))}(e,r.index)},moveDown:function(e,r){!function(e,r){if(r===e.length-1)return!1;var t=e[r],a=[e[r+1],t];e.splice.apply(e,[r,2].concat(a))}(e,r.index)},remove:function(e,r){!function(e,r){e.splice(r,1).length}(e,r.index)},add:function(e,r){var t=r.newRowData;e.push(t)},batchPush:function(e,r){r.pushArray.forEach((function(r){e.push(r)}))},setNewTarget:function(e,r){T(r.formData,r.nodePath,r.newTarget)}}[t];if(!i)throw new Error("错误 - 未知的操作:[".concat(t,"]"));var s,l,u,c=n,d=n;"add"===t?(c={newRowData:(s=e.schema,l=e.rootSchema,u=s.items,kt(s)&&It(s)&&(u=s.additionalItems),Ht(u,void 0,l))},d={newRowData:K()}):"batchPush"===t?d={pushArray:c.pushArray.map((function(e){return K()}))}:"setNewTarget"===t&&(c={formData:e.rootFormData,nodePath:e.curNodePath,newTarget:c.newTarget},d={formData:a,nodePath:"value",newTarget:c.newTarget.map((function(e){return K()}))}),i.apply(null,[a.value,d]),i.apply(null,[o.value,c])};return function(){var t=e.schema,a=e.uiSchema,o=e.rootSchema,s=e.rootFormData,l=e.curNodePath,u=e.globalOptions;if(!t.hasOwnProperty("items"))throw new Error("[".concat(t,"] 请先定义 items属性"));if(jt(t,o))return r(Oa,F(F({},e),{},{class:E({},Y(Oa.name),!0)}));if(t.format||t["ui:widget"]||a["ui:widget"])return r(Da,F(F({},e),{},{class:E({},Y(Da.name),!0)}));var c=kt(t)?_a:Fa;return r("div",[r(c,F(F({itemsFormData:n.value},e),{},{onArrayOperate:i,class:E({},Y(c.name),!0)})),e.needValidFieldGroup?r(ya,{key:"validateWidget-array",class:{validateWidget:!0,"validateWidget-array":!0},schema:Object.entries(t).reduce((function(e,r){var t=_(r,2),a=t[0],o=t[1];return"items"!==a&&(e[a]=o),e}),{}),uiSchema:a,errorSchema:e.errorSchema,curNodePath:l,rootFormData:s,globalOptions:u}):null])}}},ja={name:"SelectLinkageField",props:F(F({},ra),{},{combiningType:{type:String,default:"anyOf"},selectList:{type:Array,require:!0}}),setup:function(e){var t,a,o=c((t=$(e.rootFormData,e.curNodePath),0!==(a=Ut(t,e.selectList,e.rootSchema,!0))?a:e.curSelectIndex||0)),n=function(){var t=St({schema:e.schema["".concat(e.combiningType,"Select")]||{},uiSchema:e.uiSchema["".concat(e.combiningType,"Select")]||{},curNodePath:e.curNodePath,rootFormData:e.rootFormData},(function(){return{widget:"SelectWidget"}}));if(t.label=t.label||e.schema.title,t.description=t.description||e.schema.description,!t.uiProps.enumOptions){var a=e.uiSchema[e.combiningType]||[];t.uiProps.enumOptions=e.selectList.map((function(e,r){return{label:Et({schema:e,uiSchema:a[r],containsSpec:!1}).title||"选项 ".concat(r+1),value:r}}))}return r(ya,F(F({key:"fieldSelect_".concat(e.combiningType),class:E({},"fieldSelect_".concat(e.combiningType),!0),isFormData:!1,curValue:o.value,globalOptions:e.globalOptions},t),{},{onChange:function(e){o.value=e}}))};return d(o,(function(r,t){var a=$(e.rootFormData,e.curNodePath),o=Ht(e.selectList[r],void 0,e.rootSchema),n=Object.prototype.hasOwnProperty;if(q(a)){var i=ft(e.selectList[t],e.rootSchema);if("object"===W(i))for(var s in i.properties)n.call(i.properties,s)&&!n.call(o,s)&&L(a,s)}q(o)?Object.entries(o).forEach((function(e){var r=_(e,2),t=r[0],o=r[1];void 0!==o&&T(a,t,o)})):T(e.rootFormData,e.curNodePath,o||a)})),function(){var t,a=e.curNodePath,i=A(a),s=null;if(("object"===e.schema.type||e.schema.properties)&&!function(e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!1;return!0}(e.schema.properties)){var l,u=Object.assign({},e.schema);delete u[e.combiningType],s=r(Aa,F(F({key:"origin_".concat(e.combiningType),class:(l={},E(l,"".concat(e.combiningType,"_originBox"),!0),E(l,"".concat(i,"-originBox"),!0),l)},e),{},{schema:u}))}var c=[n()],d=e.selectList[o.value];if(d){var m=e.schema,p=e.combiningType,h="".concat(e.combiningType,"Select");m.properties,m[p],m[h];var f=O(m,["properties",p,h].map(I));d=Object.assign({},f,d);var v=G(Et({schema:e.schema,uiSchema:e.uiSchema,containsSpec:!1,curNodePath:a,rootFormData:e.rootFormData}),(function(r){return r===e.combiningType?void 0:"ui:".concat(r)})),g=G(xt({schema:e.schema,uiSchema:e.uiSchema,errorSchema:e.errorSchema}),(function(r){return r===e.combiningType?void 0:"err:".concat(r)}));c.push(r(Aa,F(F({key:"appendSchema_".concat(e.combiningType)},e),{},{schema:F({"ui:showTitle":!1,"ui:showDescription":!1},d),required:e.required,uiSchema:F(F({},v),(e.uiSchema[e.combiningType]||[])[o.value]),errorSchema:F(F({},g),(e.errorSchema[e.combiningType]||[])[o.value])})))}return c.push(r(ya,{key:"validateWidget-".concat(e.combiningType),class:E({validateWidget:!0},"validateWidget-".concat(e.combiningType),!0),schema:e.schema,uiSchema:e.uiSchema,errorSchema:e.errorSchema,curNodePath:e.curNodePath,rootFormData:e.rootFormData,globalOptions:e.globalOptions})),r("div",[s,r("div",{key:"appendBox_".concat(e.combiningType),class:(t={appendCombining_box:!0},E(t,"".concat(e.combiningType,"_appendBox"),!0),E(t,"".concat(i,"-appendBox"),!0),t)},c)])}}},Ia={array:ka,boolean:Sa,integer:Ea,number:wa,object:ba,string:Pa,null:{render:function(){return null}},anyOf:{name:"AnyOfField",setup:function(e,t){var a=t.attrs,o=t.slots;return function(){return r(ja,F(F({},a),{},{combiningType:"anyOf",selectList:a.schema.anyOf}),o)}}},oneOf:{name:"oneOfField",setup:function(e,t){var a=t.attrs,o=t.slots;return function(){return r(ja,F(F({},a),{},{combiningType:"oneOf",selectList:a.schema.oneOf}),o)}}}},Aa={name:"SchemaField",props:ra,setup:function(e){return function(){var t,a=ft(e.schema,e.rootSchema),o=F(F({},e),{},{schema:a});if(0===Object.keys(a).length)return null;var n,i,s=Pt(Ia,o),l=s.field,u=s.fieldProps,c=bt({schema:a,uiSchema:e.uiSchema,curNodePath:e.curNodePath,rootFormData:e.rootFormData}),d=A(e.curNodePath);return a.anyOf&&a.anyOf.length>0&&!Dt(a)?r(z(Ia.anyOf),F({class:(n={},E(n,"".concat(d,"-anyOf"),!0),E(n,"fieldItem",!0),E(n,"anyOfField",!0),n)},o)):a.oneOf&&a.oneOf.length>0&&!Dt(a)?r(z(Ia.oneOf),F({class:(i={},E(i,"".concat(d,"-oneOf"),!0),E(i,"fieldItem",!0),E(i,"oneOfField",!0),i)},o)):l&&!c?r(z(l),F(F({},o),{},{fieldProps:u,class:(t={},E(t,Y(l.name)||l,!0),E(t,"hiddenWidget",c),E(t,"fieldItem",!0),E(t,d,!0),t)})):null}}};var Ca={name:"CheckboxesWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}};Ca.render=function(r,n,i,s,l,u){var c=e("el-checkbox"),d=e("el-checkbox-group");return t(),a(d,r.$attrs,{default:f((function(){return[(t(!0),a(v,null,g(i.enumOptions,(function(e,r){return t(),a(c,{key:r,label:e.value},{default:f((function(){return[y(o(e.label),1)]})),_:2},1032,["label"])})),128))]})),_:1},16)},Ca.__file="src/config/widgets/CheckboxesWidget/index.vue";var Ra={name:"RadioWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}};Ra.render=function(r,n,i,s,l,u){var c=e("el-radio"),d=e("el-radio-group");return t(),a(d,r.$attrs,{default:f((function(){return[(t(!0),a(v,null,g(i.enumOptions,(function(e,r){return t(),a(c,{key:r,label:e.value},{default:f((function(){return[y(o(e.label),1)]})),_:2},1032,["label"])})),128))]})),_:1},16)},Ra.__file="src/config/widgets/RadioWidget/index.vue";var $a={name:"SelectWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}};function Na(e){return null===e||""===e||Array.isArray(e)&&e.every((function(e){return""===e}))}$a.render=function(r,o,n,i,s,l){var u=e("el-option"),c=e("el-select");return t(),a(c,r.$attrs,{default:f((function(){return[(t(!0),a(v,null,g(n.enumOptions,(function(e,r){return t(),a(u,{key:r,label:e.label,value:e.value},null,8,["label","value"])})),128))]})),_:1},16)},$a.__file="src/config/widgets/SelectWidget/index.vue";var La=function(e){var r=Z(e,!1),t=r.year,a=r.month,o=r.day;return"".concat(t,"-").concat(a,"-").concat(o)},Ta=function(e){if(e instanceof Date)return e;if("string"==typeof e){var r=_(e.split(":"),3),t=r[0],a=r[1],o=r[2],n=new Date;return n.setHours(+t),n.setMinutes(+a),n.setSeconds(+o),n}},za={CheckboxesWidget:Ca,RadioWidget:Ra,SelectWidget:$a,TimePickerWidget:{name:"TimePickerWidget",inheritAttrs:!1,props:{modelValue:{default:null,type:null}},setup:function(e,t){var a=t.attrs,o=t.slots,n=c(Ta(e.modelValue)),i=e.modelValue;return d((function(){return e.modelValue}),(function(e){e!==i&&(n.value=Ta(e))})),function(){return r(z("el-time-picker"),F(F({},a),{},{modelValue:n.value,"onUpdate:modelValue":function(e){var r,t,o,s;n.value=e,i=null===e?void 0:(r=Z(e,!0),t=r.hour,o=r.minute,s=r.second,"".concat(t,":").concat(o,":").concat(s)),a["onUpdate:modelValue"].apply(a,[i])}}),o)}}},DatePickerWidget:{name:"DatePickerWidget",inheritAttrs:!1,setup:function(e,t){var a=t.attrs,o=t.slots;return function(){var e=a||{},t=e.isNumberValue,n=e.isRange,i=O(e,["isNumberValue","isRange"]);return r(z("el-date-picker"),F(F({type:n?"daterange":"date"},i),{},{"onUpdate:modelValue":function(e){var r;r=n?Na(e)?[]:e.map((function(e){return t?new Date(e).valueOf():La(e)})):Na(e)?void 0:t?new Date(e).valueOf():La(e),a["onUpdate:modelValue"].apply(a,[r])}}),o)}}},DateTimePickerWidget:{name:"DateTimePickerWidget",inheritAttrs:!1,setup:function(e,t){var a=t.attrs,o=t.slots;return function(){var e=a||{},t=e.isNumberValue,n=e.isRange,i=O(e,["isNumberValue","isRange"]);return r(z("el-date-picker"),F(F({type:n?"datetimerange":"datetime"},i),{},{"onUpdate:modelValue":function(e){var r=function(e,r,t){return e?null===t?[]:t.map((function(e){return new Date(e)[r?"valueOf":"toISOString"]()})):null===t?void 0:new Date(t)[r?"valueOf":"toISOString"]()}(n,t,e);a["onUpdate:modelValue"].apply(a,[r])}}),o)}}},UploadWidget:{name:"UploadWidget",props:{modelValue:{default:null,type:[String,Array]},responseFileUrl:{default:function(){return function(e){return e?e.url||e.data&&e.data.url:""}},type:[Function]},btnText:{type:String,default:"点击上传"},slots:{type:null,default:null}},setup:function(e,t){var a=t.attrs,o=t.emit,n=e.modelValue,i=Array.isArray(n),s=a.fileList||(i?n.map((function(e,r){return{name:"已上传文件(".concat(r+1,")"),url:e}})):n?[{name:"已上传文件",url:n}]:[]),l=c(s),u=function(r){return r&&(r.response&&e.responseFileUrl(r.response)||r.url)||""},d=function(e){var r;if(i)r=e.length?e.reduce((function(e,r){var t=u(r);return t&&e.push(t),e}),[]):[];else{var t=e[e.length-1];r=u(t)}o("update:modelValue",r)},m=p().appContext.config.globalProperties;return function(){var t=F(F({fileList:l.value,"on-exceed":function(){m.$message&&m.$message.warning("超出文件上传数")},"on-error":function(){m.$message&&m.$message.error("文件上传失败")},"on-preview":function(e){var r=u(e);r&&function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_blank",t=document.createElement("a");t.style.display="none",t.target=r,t.href=e,document.body.appendChild(t),t.click(),document.body.removeChild(t)}(r)}},a),{},{"on-remove":function(e,r){d(r),a["on-remove"]&&a["on-remove"](e,r)},"on-success":function(e,r,t){d(t),a["on-success"]&&a["on-success"](e,r,t)}});i||(t.limit=1);var o=F({default:function(){return r(z("el-button"),{type:"primary"},{default:function(){return e.btnText}})}},e.slots||{});return r(z("el-upload"),t,o)}}}},Va={types:{boolean:"el-switch",string:"el-input",number:"el-input-number",integer:"el-input-number"},formats:{color:"el-color-picker",time:za.TimePickerWidget,date:za.DatePickerWidget,"date-time":za.DateTimePickerWidget},common:{select:za.SelectWidget,radioGroup:za.RadioWidget,checkboxGroup:za.CheckboxesWidget},widgetComponents:za};Kt(".genFromComponent.el-form--label-top .el-form-item__label{line-height:26px;padding-bottom:6px;font-size:14px}.genFromComponent .el-checkbox,.genFromComponent .el-color-picker{vertical-align:top}");var qa={WIDGET_MAP:Va,COMPONENT_MAP:{form:b({inheritAttrs:!1,setup:function(e,t){var a=t.attrs,o=t.slots,n=c(null);return a.setFormRef&&P((function(){a.setFormRef(n.value)})),function(){a.setFormRef;var e=O(a,["setFormRef"]);return r(z("el-form"),F({ref:n},e),o)}}}),formItem:"el-form-item",button:"el-button",popover:"el-popover"},HELPERS:{isMiniDes:function(e){return e&&["left","right"].includes(e.labelPosition)}}},Ma=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={name:"VueForm",props:Gt,emits:["update:modelValue","change","cancel","submit","validation-failed","form-mounted"],setup:function(a,o){var n=o.slots,i=o.emit;if(!t.installed&&e.WIDGET_MAP.widgetComponents){var s=p();Object.entries(e.WIDGET_MAP.widgetComponents).forEach((function(e){var r=_(e,2),t=r[0],a=r[1];return s.appContext.app.component(t,a)})),t.installed=!0}h("genFormProvide",u((function(){return{fallbackLabel:a.fallbackLabel}})));var l=c(Ht(a.schema,a.modelValue,a.schema)),m=u((function(){return F({show:!0,okBtn:"保存",cancelBtn:"取消"},a.formFooter)})),f=null,v=function(e,r){i("update:modelValue",e),i("change",{newValue:e,oldValue:r})},g=function(e,r){if(!Q(e,r)){var t=Ht(a.schema,a.modelValue,a.schema);Q(l.value,t)||(l.value=t)}};d(l,(function(e,r){v(e,r)}),{deep:!0}),d((function(){return a.schema}),(function(e,r){g(e,r)})),d((function(){return a.modelValue}),(function(e,r){g(e,r)})),v(l.value,a.modelValue);return function(){var t,o=a.formProps,s=o.layoutColumn,u=void 0===s?1:s,c=o.inlineFooter,d=o.inline,p=O(o,["layoutColumn","inlineFooter","inline"]),h={schema:a.schema,uiSchema:a.uiSchema,errorSchema:a.errorSchema,customFormats:a.customFormats,customRule:a.customRule,rootSchema:a.schema,rootFormData:l.value,curNodePath:"",globalOptions:e,formProps:F({labelSuffix:":",labelPosition:"top"},p)};return r(z(e.COMPONENT_MAP.form),F({class:(t={genFromComponent:!0,formInlineFooter:c,formInline:d},E(t,"genFromComponent_".concat(a.schema.id,"Form"),!!a.schema.id),E(t,"layoutColumn",!d),E(t,"layoutColumn-".concat(u),!d),t),setFormRef:function(e){f=e,i("form-mounted",e)},model:l},h.formProps),{default:function(){return[r(Aa,h),n.default?n.default({formData:l,formRefFn:function(){return f}}):m.value.show?r(Jt,{globalOptions:e,okBtn:m.value.okBtn,cancelBtn:m.value.cancelBtn,formItemAttrs:m.value.formItemAttrs,onCancel:function(){i("cancel")},onSubmit:function(){(f.$$validate||f.validate)((function(e,r){return e?i("submit",l):i("validation-failed",r)}))}}):[]]}})}},install:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.component(r.name||t.name,t)}};return t}(qa);export default Ma;export{Aa as SchemaField,ra as fieldProps,Rt as formUtils,Ht as getDefaultFormState,qa as globalOptions,lt as i18n,Wt as schemaValidate,V as vueUtils}; diff --git a/packages/lib/vue3/vue3-form-element/dist/vue3-form-element.umd.js b/packages/lib/vue3/vue3-form-element/dist/vue3-form-element.umd.js index 72ed03e7..46a557e6 100644 --- a/packages/lib/vue3/vue3-form-element/dist/vue3-form-element.umd.js +++ b/packages/lib/vue3/vue3-form-element/dist/vue3-form-element.umd.js @@ -10095,7 +10095,12 @@ widgetValue.value = event; if (props.onChange) { - props.onChange(event, preVal); + props.onChange({ + curVal: event, + preVal: preVal, + parentFormData: getPathVal(props.rootFormData, props.curNodePath, 1), + rootFormData: props.rootFormData + }); } } } diff --git a/packages/lib/vue3/vue3-form-element/dist/vue3-form-element.umd.min.js b/packages/lib/vue3/vue3-form-element/dist/vue3-form-element.umd.min.js index 3cd76c0a..ef550b3d 100644 --- a/packages/lib/vue3/vue3-form-element/dist/vue3-form-element.umd.min.js +++ b/packages/lib/vue3/vue3-form-element/dist/vue3-form-element.umd.min.js @@ -1,4 +1,4 @@ /** @license @lljj/vue3-form-element (c) 2020-2021 Liu.Jun License: Apache-2.0 */ !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).vue3FormElement={},e.Vue)}(this,(function(e,r){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function o(){return(o=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e}).apply(this,arguments)}function n(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function i(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?n(Object(t),!0).forEach((function(r){a(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):n(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function s(e,r){if(null==e)return{};var t,a,o=function(e,r){if(null==e)return{};var t,a,o={},n=Object.keys(e);for(a=0;a<n.length;a++)t=n[a],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a<n.length;a++)t=n[a],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function l(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],a=!0,o=!1,n=void 0;try{for(var i,s=e[Symbol.iterator]();!(a=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);a=!0);}catch(e){o=!0,n=e}finally{try{a||null==s.return||s.return()}finally{if(o)throw n}}return t}(e,r)||u(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,r){if(e){if("string"==typeof e)return d(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?d(e,r):void 0}}function d(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);t<r;t++)a[t]=e[t];return a}function m(e){var r=function(e,r){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var a=t.call(e,r||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:String(r)}function p(e){return e?"".concat("__pathRoot",".").concat(e).replace(/\./g,"_"):"__pathRoot"}function h(e){return""===e}function f(e,r){return""===e?r:[e,r].join(".")}function v(e,r){for(var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=r.split("."),o=0;o<a.length-t;o+=1){if(void 0===e)return;e=""===a[o]?e:e[a[o]]}return e}function g(e){return e}function y(e,r){delete e[r]}function b(e,r,t){for(var a=r.split("."),o=0;o<a.length;o+=1){if(a.length-o<2){e[a[a.length-1]]=t;break}e=e[a[o]]}}function P(e){return"string"==typeof e?r.resolveComponent(e):e}var w=Object.freeze({__proto__:null,deletePathVal:y,setPathVal:b,resolveComponent:P,nodePath2ClassName:p,isRootNodePath:h,computedCurPath:f,getPathVal:v,path2prop:g});function E(e){return"[object Object]"===Object.prototype.toString.call(e)}function S(e){return"[object Arguments]"===Object.prototype.toString.call(e)}function x(e,r){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=Object.assign({},e);return Object.keys(r).reduce((function(a,o){var n=e?e[o]:{},i=r[o];return e&&e.hasOwnProperty(o)&&E(i)?a[o]=x(n,i,t):t&&Array.isArray(n)&&Array.isArray(i)?a[o]=n.concat(i):a[o]=i,a}),a)}function F(e){var r,a=e.type;return!a&&e.const?(r=e.const,Array.isArray(r)?"array":"string"==typeof r?"string":null==r?"null":"boolean"==typeof r?"boolean":isNaN(r)?"object"===t(r)?"object":"string":"number"):!a&&e.enum?"string":!a&&e.items?"array":a||!e.properties&&!e.additionalProperties?a instanceof Array&&2===a.length&&a.includes("null")?a.find((function(e){return"null"!==e})):a:"object"}function O(e,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===r)return!0;if("function"==typeof e||"function"==typeof r)return!0;if("object"!==t(e)||"object"!==t(r))return!1;if(null===e||null===r)return!1;if(e instanceof Date&&r instanceof Date)return e.getTime()===r.getTime();if(e instanceof RegExp&&r instanceof RegExp)return e.source===r.source&&e.global===r.global&&e.multiline===r.multiline&&e.lastIndex===r.lastIndex&&e.ignoreCase===r.ignoreCase;if(S(e)||S(r)){if(!S(e)||!S(r))return!1;var n=Array.prototype.slice;return O(n.call(e),n.call(r),a,o)}if(e.constructor!==r.constructor)return!1;var i=Object.keys(e),s=Object.keys(r);if(0===i.length&&0===s.length)return!0;if(i.length!==s.length)return!1;for(var l,c=a.length;c--;)if(a[c]===e)return o[c]===r;a.push(e),o.push(r),i.sort(),s.sort();for(var u=i.length-1;u>=0;u--)if(i[u]!==s[u])return!1;for(var d=i.length-1;d>=0;d--)if(!O(e[l=i[d]],r[l],a,o))return!1;return a.pop(),o.pop(),!0}var _,D,k=(_="".concat(+new Date),D=0,function(){var e="".concat(+new Date);return e===_?D+=1:D=0,"".concat(_=e,"x").concat(D)});function j(e,r){return Object.entries(e).reduce((function(e,t){var a=l(t,2),o=a[0],n=a[1],i=r(o,n);return void 0!==i&&(e[i]=n),e}),{})}var I=function(e){return"0".concat(e).substr(-2)};function C(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)return{year:-1,month:-1,day:-1,hour:r?-1:0,minute:r?-1:0,second:r?-1:0};var t=new Date(e);if(Number.isNaN(t.getTime()))throw new Error("Unable to parse date ".concat(e));return{year:t.getUTCFullYear(),month:I(t.getUTCMonth()+1),day:I(t.getUTCDate()),hour:I(r?t.getUTCHours():0),minute:I(r?t.getUTCMinutes():0),second:I(r?t.getUTCSeconds():0)}}function A(e){return void 0===e?e:String(e).replace(/^./,(function(e){return e.toLocaleLowerCase()}))}function R(e,r){return e*r/function e(r,t){return 0===t?r:e(t,r%t)}(e,r)}function $(e,r){for(var t=r.split("/"),a=0;a<t.length;a+=1){if(void 0===e)return;e=""===t[a]?e:e[t[a]]}return e}function N(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e;if(!e.startsWith("#"))throw new Error("Could not find a definition for ".concat(t,"."));var a=$(r,e=decodeURIComponent(e.substring(1)));if(void 0===a)throw new Error("Could not find a definition for ".concat(t,"."));return a.hasOwnProperty("$ref")?N(a.$ref,r):a}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function L(e,r){return e(r={exports:{}},r.exports),r.exports}function T(e){return e&&e.default||e}var z,V=L((function(e,r){ /** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ -!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var a=r.length-1,o=1;o<a;++o)r[o]=r[o].slice(1,-1);return r[a]=r[a].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function a(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function n(e){var a=r("[0-9]","[A-Fa-f]"),o=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),n="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",i=r("[\\:\\/\\?\\#\\[\\]\\@]",n),s=e?"[\\uE000-\\uF8FF]":"[]",l=r("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t("[A-Za-z]"+r("[A-Za-z]","[0-9]","[\\+\\-\\.]")+"*"),t(t(o+"|"+r(l,n,"[\\:]"))+"*");var c=t(t("25[0-5]")+"|"+t("2[0-4][0-9]")+"|"+t("1[0-9][0-9]")+"|"+t("0?[1-9][0-9]")+"|0?0?[0-9]"),u=t(c+"\\."+c+"\\."+c+"\\."+c),d=t(a+"{1,4}"),m=t(t(d+"\\:"+d)+"|"+u),p=t(t(d+"\\:")+"{6}"+m),h=t("\\:\\:"+t(d+"\\:")+"{5}"+m),f=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+m),v=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+m),g=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+m),y=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+m),b=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+m),P=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),w=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),E=t([p,h,f,v,g,y,b,P,w].join("|")),S=t(t(l+"|"+o)+"+");t("[vV]"+a+"+\\."+r(l,n,"[\\:]")+"+"),t(t(o+"|"+r(l,n))+"*");var x=t(o+"|"+r(l,n,"[\\:\\@]"));return t(t(o+"|"+r(l,n,"[\\@]"))+"+"),t(t(x+"|"+r("[\\/\\?]",s))+"*"),{NOT_SCHEME:new RegExp(r("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,n),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,n),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,n),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,n),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,n,"[\\:\\@\\/\\?]",s),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,n,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,n),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,i),"g"),PCT_ENCODED:new RegExp(o,"g"),IPV4ADDRESS:new RegExp("^("+u+")$"),IPV6ADDRESS:new RegExp("^\\[?("+E+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+S+")")+"?\\]?$")}}var i=n(!1),s=n(!0),l=function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,r){var t=[],a=!0,o=!1,n=void 0;try{for(var i,s=e[Symbol.iterator]();!(a=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);a=!0);}catch(e){o=!0,n=e}finally{try{!a&&s.return&&s.return()}finally{if(o)throw n}}return t}(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=2147483647,u=/^xn--/,d=/[^\0-\x7E]/,m=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,f=String.fromCharCode;function v(e){throw new RangeError(p[e])}function g(e,r){var t=e.split("@"),a="";t.length>1&&(a=t[0]+"@",e=t[1]);var o=function(e,r){for(var t=[],a=e.length;a--;)t[a]=r(e[a]);return t}((e=e.replace(m,".")).split("."),r).join(".");return a+o}function y(e){for(var r=[],t=0,a=e.length;t<a;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<a){var 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}var b=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},P=function(e,r,t){var a=0;for(e=t?h(e/700):e>>1,e+=h(e/r);e>455;a+=36)e=h(e/35);return h(a+36*e/(e+38))},w=function(e){var r,t=[],a=e.length,o=0,n=128,i=72,s=e.lastIndexOf("-");s<0&&(s=0);for(var l=0;l<s;++l)e.charCodeAt(l)>=128&&v("not-basic"),t.push(e.charCodeAt(l));for(var u=s>0?s+1:0;u<a;){for(var d=o,m=1,p=36;;p+=36){u>=a&&v("invalid-input");var f=(r=e.charCodeAt(u++))-48<10?r-22:r-65<26?r-65:r-97<26?r-97:36;(f>=36||f>h((c-o)/m))&&v("overflow"),o+=f*m;var g=p<=i?1:p>=i+26?26:p-i;if(f<g)break;var y=36-g;m>h(c/y)&&v("overflow"),m*=y}var b=t.length+1;i=P(o-d,b,0==d),h(o/b)>c-n&&v("overflow"),n+=h(o/b),o%=b,t.splice(o++,0,n)}return String.fromCodePoint.apply(String,t)},E=function(e){var r=[],t=(e=y(e)).length,a=128,o=0,n=72,i=!0,s=!1,l=void 0;try{for(var u,d=e[Symbol.iterator]();!(i=(u=d.next()).done);i=!0){var m=u.value;m<128&&r.push(f(m))}}catch(e){s=!0,l=e}finally{try{!i&&d.return&&d.return()}finally{if(s)throw l}}var p=r.length,g=p;for(p&&r.push("-");g<t;){var w=c,E=!0,S=!1,x=void 0;try{for(var F,O=e[Symbol.iterator]();!(E=(F=O.next()).done);E=!0){var _=F.value;_>=a&&_<w&&(w=_)}}catch(e){S=!0,x=e}finally{try{!E&&O.return&&O.return()}finally{if(S)throw x}}var D=g+1;w-a>h((c-o)/D)&&v("overflow"),o+=(w-a)*D,a=w;var k=!0,j=!1,I=void 0;try{for(var C,A=e[Symbol.iterator]();!(k=(C=A.next()).done);k=!0){var R=C.value;if(R<a&&++o>c&&v("overflow"),R==a){for(var $=o,N=36;;N+=36){var L=N<=n?1:N>=n+26?26:N-n;if($<L)break;var T=$-L,z=36-L;r.push(f(b(L+T%z,0))),$=h(T/z)}r.push(f(b($,0))),n=P(o,D,g==p),o=0,++g}}}catch(e){j=!0,I=e}finally{try{!k&&A.return&&A.return()}finally{if(j)throw I}}++o,++a}return r.join("")},S=function(e){return g(e,(function(e){return d.test(e)?"xn--"+E(e):e}))},x=function(e){return g(e,(function(e){return u.test(e)?w(e.slice(4).toLowerCase()):e}))},F={};function O(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function _(e){for(var r="",t=0,a=e.length;t<a;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(a-t>=6){var n=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&n)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(a-t>=9){var i=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function D(e,r){function t(e){var t=_(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,O).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,O).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,O).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,O).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,O).replace(r.PCT_ENCODED,o)),e}function k(e){return e.replace(/^0*(.*)/,"$1")||"0"}function j(e,r){var t=e.match(r.IPV4ADDRESS)||[],a=l(t,2)[1];return a?a.split(".").map(k).join("."):e}function I(e,r){var t=e.match(r.IPV6ADDRESS)||[],a=l(t,3),o=a[1],n=a[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),c=s[0],u=s[1],d=u?u.split(":").map(k):[],m=c.split(":").map(k),p=r.IPV4ADDRESS.test(m[m.length-1]),h=p?7:8,f=m.length-h,v=Array(h),g=0;g<h;++g)v[g]=d[g]||m[f+g]||"";p&&(v[h-1]=j(v[h-1],r));var y=v.reduce((function(e,r,t){if(!r||"0"===r){var a=e[e.length-1];a&&a.index+a.length===t?a.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(y&&y.length>1){var P=v.slice(0,y.index),w=v.slice(y.index+y.length);b=P.join(":")+"::"+w.join(":")}else b=v.join(":");return n&&(b+="%"+n),b}return e}var C=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,A=void 0==="".match(/(){0}/)[1];function R(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},a=!1!==r.iri?s:i;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(C);if(o){A?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=I(j(t.host,a),a)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var n=F[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||n&&n.unicodeSupport)D(t,a);else{if(t.host&&(r.domainHost||n&&n.domainHost))try{t.host=S(t.host.replace(a.PCT_ENCODED,_).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}D(t,i)}n&&n.parse&&n.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function $(e,r){var t=!1!==r.iri?s:i,a=[];return void 0!==e.userinfo&&(a.push(e.userinfo),a.push("@")),void 0!==e.host&&a.push(I(j(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(a.push(":"),a.push(String(e.port))),a.length?a.join(""):void 0}var N=/^\.\.?\//,L=/^\/\.(\/|$)/,T=/^\/\.\.(\/|$)/,z=/^\/?(?:.|\n)*?(?=\/|$)/;function V(e){for(var r=[];e.length;)if(e.match(N))e=e.replace(N,"");else if(e.match(L))e=e.replace(L,"/");else if(e.match(T))e=e.replace(T,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(z);if(!t)throw new Error("Unexpected dot segment condition");var a=t[0];e=e.slice(a.length),r.push(a)}return r.join("")}function q(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?s:i,a=[],o=F[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?x(e.host):S(e.host.replace(t.PCT_ENCODED,_).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}D(e,t),"suffix"!==r.reference&&e.scheme&&(a.push(e.scheme),a.push(":"));var n=$(e,r);if(void 0!==n&&("suffix"!==r.reference&&a.push("//"),a.push(n),e.path&&"/"!==e.path.charAt(0)&&a.push("/")),void 0!==e.path){var l=e.path;r.absolutePath||o&&o.absolutePath||(l=V(l)),void 0===n&&(l=l.replace(/^\/\//,"/%2F")),a.push(l)}return void 0!==e.query&&(a.push("?"),a.push(e.query)),void 0!==e.fragment&&(a.push("#"),a.push(e.fragment)),a.join("")}function B(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],o={};return a||(e=R(q(e,t),t),r=R(q(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=V(r.path||""),o.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=V(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=V(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=V(o.path)),o.query=r.query):(o.path=e.path,void 0!==r.query?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function M(e,r){return e&&e.toString().replace(r&&r.iri?s.PCT_ENCODED:i.PCT_ENCODED,_)}var U={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},W={scheme:"https",domainHost:U.domainHost,parse:U.parse,serialize:U.serialize};function Q(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var H={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=Q(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(Q(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),a=l(t,2),o=a[0],n=a[1];e.path=o&&"/"!==o?o:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}},K={scheme:"wss",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize},G={},J="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Z="[0-9A-Fa-f]",Y=t(t("%[EFef]"+Z+"%"+Z+Z+"%"+Z+Z)+"|"+t("%[89A-Fa-f]"+Z+"%"+Z+Z)+"|"+t("%"+Z+Z)),X=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),ee=new RegExp(J,"g"),re=new RegExp(Y,"g"),te=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',X),"g"),ae=new RegExp(r("[^]",J,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),oe=ae;function ne(e){var r=_(e);return r.match(ee)?r:e}var ie={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,n={},i=t.query.split("&"),s=0,l=i.length;s<l;++s){var c=i[s].split("=");switch(c[0]){case"to":for(var u=c[1].split(","),d=0,m=u.length;d<m;++d)a.push(u[d]);break;case"subject":t.subject=M(c[1],r);break;case"body":t.body=M(c[1],r);break;default:o=!0,n[M(c[0],r)]=M(c[1],r)}}o&&(t.headers=n)}t.query=void 0;for(var p=0,h=a.length;p<h;++p){var f=a[p].split("@");if(f[0]=M(f[0]),r.unicodeSupport)f[1]=M(f[1],r).toLowerCase();else try{f[1]=S(M(f[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}a[p]=f.join("@")}return t},serialize:function(e,r){var t,a=e,n=null!=(t=e.to)?t instanceof Array?t:"number"!=typeof t.length||t.split||t.setInterval||t.call?[t]:Array.prototype.slice.call(t):[];if(n){for(var i=0,s=n.length;i<s;++i){var l=String(n[i]),c=l.lastIndexOf("@"),u=l.slice(0,c).replace(re,ne).replace(re,o).replace(te,O),d=l.slice(c+1);try{d=r.iri?x(d):S(M(d,r).toLowerCase())}catch(e){a.error=a.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=u+"@"+d}a.path=n.join(",")}var m=e.headers=e.headers||{};e.subject&&(m.subject=e.subject),e.body&&(m.body=e.body);var p=[];for(var h in m)m[h]!==G[h]&&p.push(h.replace(re,ne).replace(re,o).replace(ae,O)+"="+m[h].replace(re,ne).replace(re,o).replace(oe,O));return p.length&&(a.query=p.join("&")),a}},se=/^([^\:]+)\:(.*)/,le={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(se),a=e;if(t){var o=r.scheme||a.scheme||"urn",n=t[1].toLowerCase(),i=t[2],s=o+":"+(r.nid||n),l=F[s];a.nid=n,a.nss=i,a.path=void 0,l&&(a=l.parse(a,r))}else a.error=a.error||"URN can not be parsed.";return a},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",a=e.nid,o=t+":"+(r.nid||a),n=F[o];n&&(e=n.serialize(e,r));var i=e,s=e.nss;return i.path=(a||r.nid)+":"+s,i}},ce=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ue={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match(ce)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};F[U.scheme]=U,F[W.scheme]=W,F[H.scheme]=H,F[K.scheme]=K,F[ie.scheme]=ie,F[le.scheme]=le,F[ue.scheme]=ue,e.SCHEMES=F,e.pctEncChar=O,e.pctDecChars=_,e.parse=R,e.removeDotSegments=V,e.serialize=q,e.resolveComponents=B,e.resolve=function(e,r,t){var a=function(e,r){var t=e;if(r)for(var a in r)t[a]=r[a];return t}({scheme:"null"},t);return q(B(R(e,a),R(r,a),a,!0),a)},e.normalize=function(e,r){return"string"==typeof e?e=q(R(e,r),r):"object"===a(e)&&(e=R(q(e,r),r)),e},e.equal=function(e,r,t){return"string"==typeof e?e=q(R(e,t),t):"object"===a(e)&&(e=q(e,t)),"string"==typeof r?r=q(R(r,t),t):"object"===a(r)&&(r=q(r,t)),e===r},e.escapeComponent=function(e,r){return e&&e.toString().replace(r&&r.iri?s.ESCAPE:i.ESCAPE,O)},e.unescapeComponent=M,Object.defineProperty(e,"__esModule",{value:!0})}(r)}));(z=V)&&z.__esModule&&Object.prototype.hasOwnProperty.call(z,"default")&&z.default;var q=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 a,o,n;if(Array.isArray(r)){if((a=r.length)!=t.length)return!1;for(o=a;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((a=(n=Object.keys(r)).length)!==Object.keys(t).length)return!1;for(o=a;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,n[o]))return!1;for(o=a;0!=o--;){var i=n[o];if(!e(r[i],t[i]))return!1}return!0}return r!=r&&t!=t},B={copy:function(e,r){for(var t in r=r||{},e)r[t]=e[t];return r},checkDataType:M,checkDataTypes:function(e,r,t){switch(e.length){case 1:return M(e[0],r,t,!0);default:var a="",o=W(e);for(var n in o.array&&o.object&&(a=o.null?"(":"(!"+r+" || ",a+="typeof "+r+' !== "object")',delete o.null,delete o.array,delete o.object),o.number&&delete o.integer,o)a+=(a?" && ":"")+M(n,r,t,!0);return a}},coerceToTypes:function(e,r){if(Array.isArray(r)){for(var t=[],a=0;a<r.length;a++){var o=r[a];(U[o]||"array"===e&&"array"===o)&&(t[t.length]=o)}if(t.length)return t}else{if(U[r])return[r];if("array"===e&&"array"===r)return["array"]}},toHash:W,getProperty:K,escapeQuotes:G,equal:q,ucs2length:function(e){for(var r,t=0,a=e.length,o=0;o<a;)t++,(r=e.charCodeAt(o++))>=55296&&r<=56319&&o<a&&56320==(64512&(r=e.charCodeAt(o)))&&o++;return t},varOccurences:function(e,r){r+="[^0-9]";var t=e.match(new RegExp(r,"g"));return t?t.length:0},varReplace:function(e,r,t){return r+="([^0-9])",t=t.replace(/\$/g,"$$$$"),e.replace(new RegExp(r,"g"),t+"$1")},schemaHasRules:function(e,r){if("boolean"==typeof e)return!e;for(var t in e)if(r[t])return!0},schemaHasRulesExcept:function(e,r,t){if("boolean"==typeof e)return!e&&"not"!=t;for(var a in e)if(a!=t&&r[a])return!0},schemaUnknownRules:function(e,r){if("boolean"==typeof e)return;for(var t in e)if(!r[t])return t},toQuotedString:J,getPathExpr:function(e,r,t,a){return X(e,t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'")},getPath:function(e,r,t){var a=J(t?"/"+ee(r):K(r));return X(e,a)},getData:function(e,r,t){var a,o,n,i;if(""===e)return"rootData";if("/"==e[0]){if(!Z.test(e))throw new Error("Invalid JSON-pointer: "+e);o=e,n="rootData"}else{if(!(i=e.match(Y)))throw new Error("Invalid JSON-pointer: "+e);if(a=+i[1],"#"==(o=i[2])){if(a>=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(n="data"+(r-a||""),!o)return n}for(var s=n,l=o.split("/"),c=0;c<l.length;c++){var u=l[c];u&&(n+=K(re(u)),s+=" && "+n)}return s},unescapeFragment:function(e){return re(decodeURIComponent(e))},unescapeJsonPointer:re,escapeFragment:function(e){return encodeURIComponent(ee(e))},escapeJsonPointer:ee};function M(e,r,t,a){var o=a?" !== ":" === ",n=a?" || ":" && ",i=a?"!":"",s=a?"":"!";switch(e){case"null":return r+o+"null";case"array":return i+"Array.isArray("+r+")";case"object":return"("+i+r+n+"typeof "+r+o+'"object"'+n+s+"Array.isArray("+r+"))";case"integer":return"(typeof "+r+o+'"number"'+n+s+"("+r+" % 1)"+n+r+o+r+(t?n+i+"isFinite("+r+")":"")+")";case"number":return"(typeof "+r+o+'"'+e+'"'+(t?n+i+"isFinite("+r+")":"")+")";default:return"typeof "+r+o+'"'+e+'"'}}var U=W(["string","number","integer","boolean","null"]);function W(e){for(var r={},t=0;t<e.length;t++)r[e[t]]=!0;return r}var Q=/^[a-z$_][a-z$_0-9]*$/i,H=/'|\\/g;function K(e){return"number"==typeof e?"["+e+"]":Q.test(e)?"."+e:"['"+G(e)+"']"}function G(e){return e.replace(H,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function J(e){return"'"+G(e)+"'"}var Z=/^\/(?:[^~]|~0|~1)*$/,Y=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function X(e,r){return'""'==e?r:(e+" + "+r).replace(/([^\\])' \+ '/g,"$1")}function ee(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function re(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}var te=function(e){B.copy(e,this)};var ae=L((function(e){var r=e.exports=function(e,t,a){"function"==typeof t&&(a=t,t={}),function e(t,a,o,n,i,s,l,c,u,d){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var m in a(n,i,s,l,c,u,d),n){var p=n[m];if(Array.isArray(p)){if(m in r.arrayKeywords)for(var h=0;h<p.length;h++)e(t,a,o,p[h],i+"/"+m+"/"+h,s,i,m,n,h)}else if(m in r.propsKeywords){if(p&&"object"==typeof p)for(var f in p)e(t,a,o,p[f],i+"/"+m+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),s,i,m,n,f)}else(m in r.keywords||t.allKeys&&!(m in r.skipKeywords))&&e(t,a,o,p,i+"/"+m,s,i,m,n)}o(n,i,s,l,c,u,d)}}(t,"function"==typeof(a=t.cb||a)?a:a.pre||function(){},a.post||function(){},e,"",e)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}})),oe=ne;function ne(e,r,t){var a=this._refs[t];if("string"==typeof a){if(!this._refs[a])return ne.call(this,e,r,a);a=this._refs[a]}if((a=a||this._schemas[t])instanceof te)return de(a.schema,this._opts.inlineRefs)?a.schema:a.validate||this._compile(a);var o,n,i,s=ie.call(this,r,t);return s&&(o=s.schema,r=s.root,i=s.baseId),o instanceof te?n=o.validate||e.call(this,o.schema,r,void 0,i):void 0!==o&&(n=de(o,this._opts.inlineRefs)?o:e.call(this,o,r,void 0,i)),n}function ie(e,r){var t=V.parse(r),a=pe(t),o=me(this._getId(e.schema));if(0===Object.keys(e.schema).length||a!==o){var n=fe(a),i=this._refs[n];if("string"==typeof i)return se.call(this,e,i,t);if(i instanceof te)i.validate||this._compile(i),e=i;else{if(!((i=this._schemas[n])instanceof te))return;if(i.validate||this._compile(i),n==fe(r))return{schema:i,root:e,baseId:o};e=i}if(!e.schema)return;o=me(this._getId(e.schema))}return ce.call(this,t,o,e.schema,e)}function se(e,r,t){var a=ie.call(this,e,r);if(a){var o=a.schema,n=a.baseId;e=a.root;var i=this._getId(o);return i&&(n=ve(n,i)),ce.call(this,t,n,o,e)}}ne.normalizeId=fe,ne.fullPath=me,ne.url=ve,ne.ids=function(e){var r=fe(this._getId(e)),t={"":r},a={"":me(r,!1)},o={},n=this;return ae(e,{allKeys:!0},(function(e,r,i,s,l,c,u){if(""!==r){var d=n._getId(e),m=t[s],p=a[s]+"/"+l;if(void 0!==u&&(p+="/"+("number"==typeof u?u:B.escapeFragment(u))),"string"==typeof d){d=m=fe(m?V.resolve(m,d):d);var h=n._refs[d];if("string"==typeof h&&(h=n._refs[h]),h&&h.schema){if(!q(e,h.schema))throw new Error('id "'+d+'" resolves to more than one schema')}else if(d!=fe(p))if("#"==d[0]){if(o[d]&&!q(e,o[d]))throw new Error('id "'+d+'" resolves to more than one schema');o[d]=e}else n._refs[d]=p}t[r]=m,a[r]=p}})),o},ne.inlineRef=de,ne.schema=ie;var le=B.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function ce(e,r,t,a){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var o=e.fragment.split("/"),n=1;n<o.length;n++){var i=o[n];if(i){if(void 0===(t=t[i=B.unescapeFragment(i)]))break;var s;if(!le[i]&&((s=this._getId(t))&&(r=ve(r,s)),t.$ref)){var l=ve(r,t.$ref),c=ie.call(this,a,l);c&&(t=c.schema,a=c.root,r=c.baseId)}}}return void 0!==t&&t!==a.schema?{schema:t,root:a,baseId:r}:void 0}}var ue=B.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function de(e,r){return!1!==r&&(void 0===r||!0===r?function e(r){var t;if(Array.isArray(r)){for(var a=0;a<r.length;a++)if("object"==typeof(t=r[a])&&!e(t))return!1}else for(var o in r){if("$ref"==o)return!1;if("object"==typeof(t=r[o])&&!e(t))return!1}return!0}(e):r?function e(r){var t,a=0;if(Array.isArray(r)){for(var o=0;o<r.length;o++)if("object"==typeof(t=r[o])&&(a+=e(t)),a==1/0)return 1/0}else for(var n in r){if("$ref"==n)return 1/0;if(ue[n])a++;else if("object"==typeof(t=r[n])&&(a+=e(t)+1),a==1/0)return 1/0}return a}(e)<=r:void 0)}function me(e,r){return!1!==r&&(e=fe(e)),pe(V.parse(e))}function pe(e){return V.serialize(e).split("#")[0]+"#"}var he=/#\/?$/;function fe(e){return e?e.replace(he,""):""}function ve(e,r){return r=fe(r),V.resolve(e,r)}var ge={Validation:be((function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:be(ye)};function ye(e,r,t){this.message=t||ye.message(e,r),this.missingRef=oe.url(e,r),this.missingSchema=oe.normalizeId(oe.fullPath(this.missingRef))}function be(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}ye.message=function(e,r){return"can't resolve reference "+r+" from id "+e};var Pe=function(e,r){r||(r={}),"function"==typeof r&&(r={cmp:r});var t="boolean"==typeof r.cycles&&r.cycles,a=r.cmp&&function(e){return function(r){return function(t,a){var o={key:t,value:r[t]},n={key:a,value:r[a]};return e(o,n)}}}(r.cmp),o=[];return function e(r){if(r&&r.toJSON&&"function"==typeof r.toJSON&&(r=r.toJSON()),void 0!==r){if("number"==typeof r)return isFinite(r)?""+r:"null";if("object"!=typeof r)return JSON.stringify(r);var n,i;if(Array.isArray(r)){for(i="[",n=0;n<r.length;n++)n&&(i+=","),i+=e(r[n])||"null";return i+"]"}if(null===r)return"null";if(-1!==o.indexOf(r)){if(t)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=o.push(r)-1,l=Object.keys(r).sort(a&&a(r));for(i="",n=0;n<l.length;n++){var c=l[n],u=e(r[c]);u&&(i&&(i+=","),i+=JSON.stringify(c)+":"+u)}return o.splice(s,1),"{"+i+"}"}}(e)},we=function(e,r,t){var a="",o=!0===e.schema.$async,n=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),i=e.self._getId(e.schema);if(e.opts.strictKeywords){var s=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(s){var l="unknown keyword: "+s;if("log"!==e.opts.strictKeywords)throw new Error(l);e.logger.warn(l)}}if(e.isTop&&(a+=" var validate = ",o&&(e.async=!0,a+="async "),a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",i&&(e.opts.sourceCode||e.opts.processCode)&&(a+=" /*# sourceURL="+i+" */ ")),"boolean"==typeof e.schema||!n&&!e.schema.$ref){var c=e.level,u=e.dataLevel,d=e.schema["false schema"],m=e.schemaPath+e.util.getProperty("false schema"),p=e.errSchemaPath+"/false schema",h=!e.opts.allErrors,f="data"+(u||""),v="valid"+c;if(!1===e.schema){e.isTop?h=!0:a+=" var "+v+" = false; ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'boolean schema is false' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";var g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?a+=o?" return data; ":" validate.errors = null; return true; ":a+=" var "+v+" = true; ";return e.isTop&&(a+=" }; return validate; "),a}if(e.isTop){var y=e.isTop;c=e.level=0,u=e.dataLevel=0,f="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var b="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}a+=" var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data; "}else{c=e.level,f="data"+((u=e.dataLevel)||"");if(i&&(e.baseId=e.resolve.url(e.baseId,i)),o&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+c+" = errors;"}v="valid"+c,h=!e.opts.allErrors;var P="",w="",E=e.schema.type,S=Array.isArray(E);if(E&&e.opts.nullable&&!0===e.schema.nullable&&(S?-1==E.indexOf("null")&&(E=E.concat("null")):"null"!=E&&(E=[E,"null"],S=!0)),S&&1==E.length&&(E=E[0],S=!1),e.schema.$ref&&n){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(n=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(a+=" "+e.RULES.all.$comment.code(e,"$comment")),E){if(e.opts.coerceTypes)var x=e.util.coerceToTypes(e.opts.coerceTypes,E);var F=e.RULES.types[E];if(x||S||!0===F||F&&!Z(F)){m=e.schemaPath+".type",p=e.errSchemaPath+"/type",m=e.schemaPath+".type",p=e.errSchemaPath+"/type";var O=S?"checkDataTypes":"checkDataType";if(a+=" if ("+e.util[O](E,f,e.opts.strictNumbers,!0)+") { ",x){var _="dataType"+c,D="coerced"+c;a+=" var "+_+" = typeof "+f+"; var "+D+" = undefined; ","array"==e.opts.coerceTypes&&(a+=" if ("+_+" == 'object' && Array.isArray("+f+") && "+f+".length == 1) { "+f+" = "+f+"[0]; "+_+" = typeof "+f+"; if ("+e.util.checkDataType(e.schema.type,f,e.opts.strictNumbers)+") "+D+" = "+f+"; } "),a+=" if ("+D+" !== undefined) ; ";var k=x;if(k)for(var j,I=-1,C=k.length-1;I<C;)"string"==(j=k[I+=1])?a+=" else if ("+_+" == 'number' || "+_+" == 'boolean') "+D+" = '' + "+f+"; else if ("+f+" === null) "+D+" = ''; ":"number"==j||"integer"==j?(a+=" else if ("+_+" == 'boolean' || "+f+" === null || ("+_+" == 'string' && "+f+" && "+f+" == +"+f+" ","integer"==j&&(a+=" && !("+f+" % 1)"),a+=")) "+D+" = +"+f+"; "):"boolean"==j?a+=" else if ("+f+" === 'false' || "+f+" === 0 || "+f+" === null) "+D+" = false; else if ("+f+" === 'true' || "+f+" === 1) "+D+" = true; ":"null"==j?a+=" else if ("+f+" === '' || "+f+" === 0 || "+f+" === false) "+D+" = null; ":"array"==e.opts.coerceTypes&&"array"==j&&(a+=" else if ("+_+" == 'string' || "+_+" == 'number' || "+_+" == 'boolean' || "+f+" == null) "+D+" = ["+f+"]; ");a+=" else { ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } if ("+D+" !== undefined) { ";var A=u?"data"+(u-1||""):"parentData";a+=" "+f+" = "+D+"; ",u||(a+="if ("+A+" !== undefined)"),a+=" "+A+"["+(u?e.dataPathArr[u]:"parentDataProperty")+"] = "+D+"; } "}else{(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } "}}if(e.schema.$ref&&!n)a+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",h&&(a+=" } if (errors === ",a+=y?"0":"errs_"+c,a+=") { ",w+="}");else{var R=e.RULES;if(R)for(var $=-1,N=R.length-1;$<N;)if(Z(F=R[$+=1])){if(F.type&&(a+=" if ("+e.util.checkDataType(F.type,f,e.opts.strictNumbers)+") { "),e.opts.useDefaults)if("object"==F.type&&e.schema.properties){d=e.schema.properties;var L=Object.keys(d);if(L)for(var T,z=-1,V=L.length-1;z<V;){if(void 0!==(M=d[T=L[z+=1]]).default){var q=f+e.util.getProperty(T);if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+q;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+q+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+q+" === null || "+q+" === '' "),a+=" ) "+q+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(M.default)+" ":a+=" "+JSON.stringify(M.default)+" ",a+="; "}}}else if("array"==F.type&&Array.isArray(e.schema.items)){var B=e.schema.items;if(B){I=-1;for(var M,U=B.length-1;I<U;)if(void 0!==(M=B[I+=1]).default){q=f+"["+I+"]";if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+q;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+q+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+q+" === null || "+q+" === '' "),a+=" ) "+q+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(M.default)+" ":a+=" "+JSON.stringify(M.default)+" ",a+="; "}}}var W=F.rules;if(W)for(var Q,H=-1,K=W.length-1;H<K;)if(Y(Q=W[H+=1])){var G=Q.code(e,Q.keyword,F.type);G&&(a+=" "+G+" ",h&&(P+="}"))}if(h&&(a+=" "+P+" ",P=""),F.type&&(a+=" } ",E&&E===F.type&&!x)){a+=" else { ";var J;m=e.schemaPath+".type",p=e.errSchemaPath+"/type";(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}h&&(a+=" if (errors === ",a+=y?"0":"errs_"+c,a+=") { ",w+="}")}}function Z(e){for(var r=e.rules,t=0;t<r.length;t++)if(Y(r[t]))return!0}function Y(r){return void 0!==e.schema[r.keyword]||r.implements&&function(r){for(var t=r.implements,a=0;a<t.length;a++)if(void 0!==e.schema[t[a]])return!0}(r)}return h&&(a+=" "+w+" "),y?(o?(a+=" if (errors === 0) return data; ",a+=" else throw new ValidationError(vErrors); "):(a+=" validate.errors = vErrors; ",a+=" return errors === 0; "),a+=" }; return validate;"):a+=" var "+v+" = errors === errs_"+c+";",a},Ee=B.ucs2length,Se=ge.Validation,xe=function e(r,t,a,o){var n=this,i=this._opts,s=[void 0],l={},c=[],u={},d=[],m={},p=[];t=t||{schema:r,refVal:s,refs:l};var h=Fe.call(this,r,t,o),f=this._compilations[h.index];if(h.compiling)return f.callValidate=function e(){var r=f.validate,t=r.apply(this,arguments);return e.errors=r.errors,t};var v=this._formats,g=this.RULES;try{var y=P(r,t,a,o);f.validate=y;var b=f.callValidate;return b&&(b.schema=y.schema,b.errors=null,b.refs=y.refs,b.refVal=y.refVal,b.root=y.root,b.$async=y.$async,i.sourceCode&&(b.source=y.source)),y}finally{Oe.call(this,r,t,o)}function P(r,a,o,u){var m=!a||a&&a.schema==r;if(a.schema!=t.schema)return e.call(n,r,a,o,u);var h,f=!0===r.$async,y=we({isTop:!0,schema:r,isRoot:m,baseId:u,root:a,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:ge.MissingRef,RULES:g,validate:we,util:B,resolve:oe,resolveRef:w,usePattern:x,useDefault:F,useCustomRule:O,opts:i,formats:v,logger:n.logger,self:n});y=Ce(s,je)+Ce(c,De)+Ce(d,ke)+Ce(p,Ie)+y,i.processCode&&(y=i.processCode(y,r));try{h=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",y)(n,g,v,t,s,d,p,q,Ee,Se),s[0]=h}catch(e){throw n.logger.error("Error compiling schema, function code:",y),e}return h.schema=r,h.errors=null,h.refs=l,h.refVal=s,h.root=m?h:a,f&&(h.$async=!0),!0===i.sourceCode&&(h.source={code:y,patterns:c,defaults:d}),h}function w(r,o,c){o=oe.url(r,o);var u,d,m=l[o];if(void 0!==m)return S(u=s[m],d="refVal["+m+"]");if(!c&&t.refs){var p=t.refs[o];if(void 0!==p)return S(u=t.refVal[p],d=E(o,u))}d=E(o);var h=oe.call(n,P,t,o);if(void 0===h){var f=a&&a[o];f&&(h=oe.inlineRef(f,i.inlineRefs)?f:e.call(n,f,t,a,r))}if(void 0!==h)return function(e,r){var t=l[e];s[t]=r}(o,h),S(h,d);!function(e){delete l[e]}(o)}function E(e,r){var t=s.length;return s[t]=r,l[e]=t,"refVal"+t}function S(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}function x(e){var r=u[e];return void 0===r&&(r=u[e]=c.length,c[r]=e),"pattern"+r}function F(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return B.toQuotedString(e);case"object":if(null===e)return"null";var r=Pe(e),t=m[r];return void 0===t&&(t=m[r]=d.length,d[t]=e),"default"+t}}function O(e,r,t,a){if(!1!==n._opts.validateSchema){var o=e.definition.dependencies;if(o&&!o.every((function(e){return Object.prototype.hasOwnProperty.call(t,e)})))throw new Error("parent schema must have all required keywords: "+o.join(","));var s=e.definition.validateSchema;if(s)if(!s(r)){var l="keyword schema is invalid: "+n.errorsText(s.errors);if("log"!=n._opts.validateSchema)throw new Error(l);n.logger.error(l)}}var c,u=e.definition.compile,d=e.definition.inline,m=e.definition.macro;if(u)c=u.call(n,r,t,a);else if(m)c=m.call(n,r,t,a),!1!==i.validateSchema&&n.validateSchema(c,!0);else if(d)c=d.call(n,a,e.keyword,r,t);else if(!(c=e.definition.validate))return;if(void 0===c)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var h=p.length;return p[h]=c,{code:"customRule"+h,validate:c}}};function Fe(e,r,t){var a=_e.call(this,e,r,t);return a>=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}function Oe(e,r,t){var a=_e.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}function _e(e,r,t){for(var a=0;a<this._compilations.length;a++){var o=this._compilations[a];if(o.schema==e&&o.root==r&&o.baseId==t)return a}return-1}function De(e,r){return"var pattern"+e+" = new RegExp("+B.toQuotedString(r[e])+");"}function ke(e){return"var default"+e+" = defaults["+e+"];"}function je(e,r){return void 0===r[e]?"":"var refVal"+e+" = refVal["+e+"];"}function Ie(e){return"var customRule"+e+" = customRules["+e+"];"}function Ce(e,r){if(!e.length)return"";for(var t="",a=0;a<e.length;a++)t+=r(a,e);return t}var Ae=L((function(e){var r=e.exports=function(){this._cache={}};r.prototype.put=function(e,r){this._cache[e]=r},r.prototype.get=function(e){return this._cache[e]},r.prototype.del=function(e){delete this._cache[e]},r.prototype.clear=function(){this._cache={}}})),Re=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,$e=[0,31,28,31,30,31,30,31,31,30,31,30,31],Ne=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,Le=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,Te=/^(?:[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,ze=/^(?:(?:[^\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,Ve=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,qe=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Be=/^(?:\/(?:[^~/]|~0|~1)*)*$/,Me=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Ue=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,We=Qe;function Qe(e){return e="full"==e?"full":"fast",B.copy(Qe[e])}function He(e){var r=e.match(Re);if(!r)return!1;var t=+r[1],a=+r[2],o=+r[3];return a>=1&&a<=12&&o>=1&&o<=(2==a&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(t)?29:$e[a])}function Ke(e,r){var t=e.match(Ne);if(!t)return!1;var a=t[1],o=t[2],n=t[3],i=t[5];return(a<=23&&o<=59&&n<=59||23==a&&59==o&&60==n)&&(!r||i)}Qe.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":ze,url:Ve,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:Le,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:Ye,uuid:qe,"json-pointer":Be,"json-pointer-uri-fragment":Me,"relative-json-pointer":Ue},Qe.full={date:He,time:Ke,"date-time":function(e){var r=e.split(Ge);return 2==r.length&&He(r[0])&&Ke(r[1],!0)},uri:function(e){return Je.test(e)&&Te.test(e)},"uri-reference":/^(?:[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,"uri-template":ze,url:Ve,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:Le,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:Ye,uuid:qe,"json-pointer":Be,"json-pointer-uri-fragment":Me,"relative-json-pointer":Ue};var Ge=/t|\s/i;var Je=/\/|:/;var Ze=/[^\\]\\Z/;function Ye(e){if(Ze.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var Xe=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s;var p="maximum"==r,h=p?"exclusiveMaximum":"exclusiveMinimum",f=e.schema[h],v=e.opts.$data&&f&&f.$data,g=p?"<":">",y=p?">":"<",b=void 0;if(!m&&"number"!=typeof s&&void 0!==s)throw new Error(r+" must be number");if(!v&&void 0!==f&&"number"!=typeof f&&"boolean"!=typeof f)throw new Error(h+" must be number or boolean");if(v){var P=e.util.getData(f.$data,i,e.dataPathArr),w="exclusive"+n,E="exclType"+n,S="exclIsNumber"+n,x="' + "+(_="op"+n)+" + '";o+=" var schemaExcl"+n+" = "+P+"; ",o+=" var "+w+"; var "+E+" = typeof "+(P="schemaExcl"+n)+"; if ("+E+" != 'boolean' && "+E+" != 'undefined' && "+E+" != 'number') { ";var F;b=h;(F=F||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(o+=" , message: '"+h+" should be boolean' "),e.opts.verbose&&(o+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var O=o;o=F.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+E+" == 'number' ? ( ("+w+" = "+a+" === undefined || "+P+" "+g+"= "+a+") ? "+d+" "+y+"= "+P+" : "+d+" "+y+" "+a+" ) : ( ("+w+" = "+P+" === true) ? "+d+" "+y+"= "+a+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { var op"+n+" = "+w+" ? '"+g+"' : '"+g+"='; ",void 0===s&&(b=h,c=e.errSchemaPath+"/"+h,a=P,m=v)}else{x=g;if((S="number"==typeof f)&&m){var _="'"+x+"'";o+=" if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" ( "+a+" === undefined || "+f+" "+g+"= "+a+" ? "+d+" "+y+"= "+f+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { "}else{S&&void 0===s?(w=!0,b=h,c=e.errSchemaPath+"/"+h,a=f,y+="="):(S&&(a=Math[p?"min":"max"](f,s)),f===(!S||a)?(w=!0,b=h,c=e.errSchemaPath+"/"+h,y+="="):(w=!1,x+="="));_="'"+x+"'";o+=" if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+" "+y+" "+a+" || "+d+" !== "+d+") { "}}b=b||r,(F=F||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+_+", limit: "+a+", exclusive: "+w+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be "+x+" ",o+=m?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";O=o;return o=F.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",u&&(o+=" else { "),o},er=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+".length "+("maxItems"==r?">":"<")+" "+a+") { ";var p=r,h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxItems"==r?"more":"fewer",o+=" than ",o+=m?"' + "+a+" + '":""+s,o+=" items' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=h.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},rr=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");var p="maxLength"==r?">":"<";o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),!1===e.opts.unicode?o+=" "+d+".length ":o+=" ucs2length("+d+") ",o+=" "+p+" "+a+") { ";var h=r,f=f||[];f.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(h||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT be ",o+="maxLength"==r?"longer":"shorter",o+=" than ",o+=m?"' + "+a+" + '":""+s,o+=" characters' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var v=o;return o=f.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+v+"]); ":o+=" validate.errors = ["+v+"]; return false; ":o+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},tr=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" Object.keys("+d+").length "+("maxProperties"==r?">":"<")+" "+a+") { ";var p=r,h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxProperties"==r?"more":"fewer",o+=" than ",o+=m?"' + "+a+" + '":""+s,o+=" properties' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=h.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},ar={$ref:function(e,r,t){var a,o,n=" ",i=e.level,s=e.dataLevel,l=e.schema[r],c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(s||""),m="valid"+i;if("#"==l||"#/"==l)e.isRoot?(a=e.async,o="validate"):(a=!0===e.root.schema.$async,o="root.refVal[0]");else{var p=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===p){var h=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(h),(y=y||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(n+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(n+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ";var f=n;n=y.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+f+"]); ":n+=" validate.errors = ["+f+"]; return false; ":n+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(n+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,l,h);e.logger.warn(h),u&&(n+=" if (true) { ")}}else if(p.inline){var v=e.util.copy(e);v.level++;var g="valid"+v.level;v.schema=p.schema,v.schemaPath="",v.errSchemaPath=l,n+=" "+e.validate(v).replace(/validate\.schema/g,p.code)+" ",u&&(n+=" if ("+g+") { ")}else a=!0===p.$async||e.async&&!1!==p.$async,o=p.code}if(o){var y;(y=y||[]).push(n),n="",e.opts.passContext?n+=" "+o+".call(this, ":n+=" "+o+"( ",n+=" "+d+", (dataPath || '')",'""'!=e.errorPath&&(n+=" + "+e.errorPath);var b=n+=" , "+(s?"data"+(s-1||""):"parentData")+" , "+(s?e.dataPathArr[s]:"parentDataProperty")+", rootData) ";if(n=y.pop(),a){if(!e.async)throw new Error("async schema referenced by sync schema");u&&(n+=" var "+m+"; "),n+=" try { await "+b+"; ",u&&(n+=" "+m+" = true; "),n+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",u&&(n+=" "+m+" = false; "),n+=" } ",u&&(n+=" if ("+m+") { ")}else n+=" if (!"+b+") { if (vErrors === null) vErrors = "+o+".errors; else vErrors = vErrors.concat("+o+".errors); errors = vErrors.length; } ",u&&(n+=" else { ")}return n},allOf:function(e,r,t){var a=" ",o=e.schema[r],n=e.schemaPath+e.util.getProperty(r),i=e.errSchemaPath+"/"+r,s=!e.opts.allErrors,l=e.util.copy(e),c="";l.level++;var u="valid"+l.level,d=l.baseId,m=!0,p=o;if(p)for(var h,f=-1,v=p.length-1;f<v;)h=p[f+=1],(e.opts.strictKeywords?"object"==typeof h&&Object.keys(h).length>0||!1===h:e.util.schemaHasRules(h,e.RULES.all))&&(m=!1,l.schema=h,l.schemaPath=n+"["+f+"]",l.errSchemaPath=i+"/"+f,a+=" "+e.validate(l)+" ",l.baseId=d,s&&(a+=" if ("+u+") { ",c+="}"));return s&&(a+=m?" if (true) { ":" "+c.slice(0,-1)+" "),a},anyOf:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e),h="";p.level++;var f="valid"+p.level;if(i.every((function(r){return e.opts.strictKeywords?"object"==typeof r&&Object.keys(r).length>0||!1===r:e.util.schemaHasRules(r,e.RULES.all)}))){var v=p.baseId;a+=" var "+m+" = errors; var "+d+" = false; ";var g=e.compositeRule;e.compositeRule=p.compositeRule=!0;var y=i;if(y)for(var b,P=-1,w=y.length-1;P<w;)b=y[P+=1],p.schema=b,p.schemaPath=s+"["+P+"]",p.errSchemaPath=l+"/"+P,a+=" "+e.validate(p)+" ",p.baseId=v,a+=" "+d+" = "+d+" || "+f+"; if (!"+d+") { ",h+="}";e.compositeRule=p.compositeRule=g,a+=" "+h+" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } else { errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else c&&(a+=" if (true) { ");return a},$comment:function(e,r,t){var a=" ",o=e.schema[r],n=e.errSchemaPath+"/"+r;e.opts.allErrors;var i=e.util.toQuotedString(o);return!0===e.opts.$comment?a+=" console.log("+i+");":"function"==typeof e.opts.$comment&&(a+=" self._opts.$comment("+i+", "+e.util.toQuotedString(n)+", validate.root.schema);"),a},const:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(n||""),d="valid"+o,m=e.opts.$data&&i&&i.$data;m&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; "),m||(a+=" var schema"+o+" = validate.schema"+s+";"),a+="var "+d+" = equal("+u+", schema"+o+"); if (!"+d+") { ";var p=p||[];p.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValue: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var h=a;return a=p.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+h+"]); ":a+=" validate.errors = ["+h+"]; return false; ":a+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",c&&(a+=" else { "),a},contains:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level,f="i"+o,v=p.dataLevel=e.dataLevel+1,g="data"+v,y=e.baseId,b=e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all);if(a+="var "+m+" = errors;var "+d+";",b){var P=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=i,p.schemaPath=s,p.errSchemaPath=l,a+=" var "+h+" = false; for (var "+f+" = 0; "+f+" < "+u+".length; "+f+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers,!0);var w=u+"["+f+"]";p.dataPathArr[v]=f;var E=e.validate(p);p.baseId=y,e.util.varOccurences(E,g)<2?a+=" "+e.util.varReplace(E,g,w)+" ":a+=" var "+g+" = "+w+"; "+E+" ",a+=" if ("+h+") break; } ",e.compositeRule=p.compositeRule=P,a+=" if (!"+h+") {"}else a+=" if ("+u+".length == 0) {";var S=S||[];S.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should contain a valid item' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var x=a;return a=S.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",b&&(a+=" errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a},dependencies:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(n||""),d="errs__"+o,m=e.util.copy(e),p="";m.level++;var h="valid"+m.level,f={},v={},g=e.opts.ownProperties;for(w in i)if("__proto__"!=w){var y=i[w],b=Array.isArray(y)?v:f;b[w]=y}a+="var "+d+" = errors;";var P=e.errorPath;for(var w in a+="var missing"+o+";",v)if((b=v[w]).length){if(a+=" if ( "+u+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),c){a+=" && ( ";var E=b;if(E)for(var S=-1,x=E.length-1;S<x;){j=E[S+=1],S&&(a+=" || "),a+=" ( ( "+(R=u+(A=e.util.getProperty(j)))+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(j)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?j:A)+") ) "}a+=")) { ";var F="missing"+o,O="' + "+F+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,F,!0):P+" + "+F);var _=_||[];_.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var D=a;a=_.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+D+"]); ":a+=" validate.errors = ["+D+"]; return false; ":a+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{a+=" ) { ";var k=b;if(k)for(var j,I=-1,C=k.length-1;I<C;){j=k[I+=1];var A=e.util.getProperty(j),R=(O=e.util.escapeQuotes(j),u+A);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,j,e.opts.jsonPointers)),a+=" if ( "+R+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(j)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",c&&(p+="}",a+=" else { ")}e.errorPath=P;var $=m.baseId;for(var w in f){y=f[w];(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all))&&(a+=" "+h+" = true; if ( "+u+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),a+=") { ",m.schema=y,m.schemaPath=s+e.util.getProperty(w),m.errSchemaPath=l+"/"+e.util.escapeFragment(w),a+=" "+e.validate(m)+" ",m.baseId=$,a+=" } ",c&&(a+=" if ("+h+") { ",p+="}"))}return c&&(a+=" "+p+" if ("+d+" == errors) {"),a},enum:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(n||""),d="valid"+o,m=e.opts.$data&&i&&i.$data;m&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ");var p="i"+o,h="schema"+o;m||(a+=" var "+h+" = validate.schema"+s+";"),a+="var "+d+";",m&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=d+" = false;for (var "+p+"=0; "+p+"<"+h+".length; "+p+"++) if (equal("+u+", "+h+"["+p+"])) { "+d+" = true; break; }",m&&(a+=" } "),a+=" if (!"+d+") { ";var f=f||[];f.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var v=a;return a=f.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+v+"]); ":a+=" validate.errors = ["+v+"]; return false; ":a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",c&&(a+=" else { "),a},format:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(n||"");if(!1===e.opts.format)return c&&(a+=" if (true) { "),a;var d,m=e.opts.$data&&i&&i.$data;m?(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ",d="schema"+o):d=i;var p=e.opts.unknownFormats,h=Array.isArray(p);if(m){a+=" var "+(f="format"+o)+" = formats["+d+"]; var "+(v="isObject"+o)+" = typeof "+f+" == 'object' && !("+f+" instanceof RegExp) && "+f+".validate; var "+(g="formatType"+o)+" = "+v+" && "+f+".type || 'string'; if ("+v+") { ",e.async&&(a+=" var async"+o+" = "+f+".async; "),a+=" "+f+" = "+f+".validate; } if ( ",m&&(a+=" ("+d+" !== undefined && typeof "+d+" != 'string') || "),a+=" (","ignore"!=p&&(a+=" ("+d+" && !"+f+" ",h&&(a+=" && self._opts.unknownFormats.indexOf("+d+") == -1 "),a+=") || "),a+=" ("+f+" && "+g+" == '"+t+"' && !(typeof "+f+" == 'function' ? ",e.async?a+=" (async"+o+" ? await "+f+"("+u+") : "+f+"("+u+")) ":a+=" "+f+"("+u+") ",a+=" : "+f+".test("+u+"))))) {"}else{var f;if(!(f=e.formats[i])){if("ignore"==p)return e.logger.warn('unknown format "'+i+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(a+=" if (true) { "),a;if(h&&p.indexOf(i)>=0)return c&&(a+=" if (true) { "),a;throw new Error('unknown format "'+i+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,g=(v="object"==typeof f&&!(f instanceof RegExp)&&f.validate)&&f.type||"string";if(v){var y=!0===f.async;f=f.validate}if(g!=t)return c&&(a+=" if (true) { "),a;if(y){if(!e.async)throw new Error("async format in sync schema");a+=" if (!(await "+(b="formats"+e.util.getProperty(i)+".validate")+"("+u+"))) { "}else{a+=" if (! ";var b="formats"+e.util.getProperty(i);v&&(b+=".validate"),a+="function"==typeof f?" "+b+"("+u+") ":" "+b+".test("+u+") ",a+=") { "}}var P=P||[];P.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",a+=m?""+d:""+e.util.toQuotedString(i),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",a+=m?"' + "+d+" + '":""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=m?"validate.schema"+s:""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var w=a;return a=P.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",c&&(a+=" else { "),a},if:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level,f=e.schema.then,v=e.schema.else,g=void 0!==f&&(e.opts.strictKeywords?"object"==typeof f&&Object.keys(f).length>0||!1===f:e.util.schemaHasRules(f,e.RULES.all)),y=void 0!==v&&(e.opts.strictKeywords?"object"==typeof v&&Object.keys(v).length>0||!1===v:e.util.schemaHasRules(v,e.RULES.all)),b=p.baseId;if(g||y){var P;p.createErrors=!1,p.schema=i,p.schemaPath=s,p.errSchemaPath=l,a+=" var "+m+" = errors; var "+d+" = true; ";var w=e.compositeRule;e.compositeRule=p.compositeRule=!0,a+=" "+e.validate(p)+" ",p.baseId=b,p.createErrors=!0,a+=" errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } ",e.compositeRule=p.compositeRule=w,g?(a+=" if ("+h+") { ",p.schema=e.schema.then,p.schemaPath=e.schemaPath+".then",p.errSchemaPath=e.errSchemaPath+"/then",a+=" "+e.validate(p)+" ",p.baseId=b,a+=" "+d+" = "+h+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'then'; ":P="'then'",a+=" } ",y&&(a+=" else { ")):a+=" if (!"+h+") { ",y&&(p.schema=e.schema.else,p.schemaPath=e.schemaPath+".else",p.errSchemaPath=e.errSchemaPath+"/else",a+=" "+e.validate(p)+" ",p.baseId=b,a+=" "+d+" = "+h+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'else'; ":P="'else'",a+=" } "),a+=" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+P+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match \"' + "+P+" + '\" schema' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",c&&(a+=" else { ")}else c&&(a+=" if (true) { ");return a},items:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e),h="";p.level++;var f="valid"+p.level,v="i"+o,g=p.dataLevel=e.dataLevel+1,y="data"+g,b=e.baseId;if(a+="var "+m+" = errors;var "+d+";",Array.isArray(i)){var P=e.schema.additionalItems;if(!1===P){a+=" "+d+" = "+u+".length <= "+i.length+"; ";var w=l;l=e.errSchemaPath+"/additionalItems",a+=" if (!"+d+") { ";var E=E||[];E.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+i.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+i.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var S=a;a=E.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",l=w,c&&(h+="}",a+=" else { ")}var x=i;if(x)for(var F,O=-1,_=x.length-1;O<_;)if(F=x[O+=1],e.opts.strictKeywords?"object"==typeof F&&Object.keys(F).length>0||!1===F:e.util.schemaHasRules(F,e.RULES.all)){a+=" "+f+" = true; if ("+u+".length > "+O+") { ";var D=u+"["+O+"]";p.schema=F,p.schemaPath=s+"["+O+"]",p.errSchemaPath=l+"/"+O,p.errorPath=e.util.getPathExpr(e.errorPath,O,e.opts.jsonPointers,!0),p.dataPathArr[g]=O;var k=e.validate(p);p.baseId=b,e.util.varOccurences(k,y)<2?a+=" "+e.util.varReplace(k,y,D)+" ":a+=" var "+y+" = "+D+"; "+k+" ",a+=" } ",c&&(a+=" if ("+f+") { ",h+="}")}if("object"==typeof P&&(e.opts.strictKeywords?"object"==typeof P&&Object.keys(P).length>0||!1===P:e.util.schemaHasRules(P,e.RULES.all))){p.schema=P,p.schemaPath=e.schemaPath+".additionalItems",p.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+f+" = true; if ("+u+".length > "+i.length+") { for (var "+v+" = "+i.length+"; "+v+" < "+u+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=u+"["+v+"]";p.dataPathArr[g]=v;k=e.validate(p);p.baseId=b,e.util.varOccurences(k,y)<2?a+=" "+e.util.varReplace(k,y,D)+" ":a+=" var "+y+" = "+D+"; "+k+" ",c&&(a+=" if (!"+f+") break; "),a+=" } } ",c&&(a+=" if ("+f+") { ",h+="}")}}else if(e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){p.schema=i,p.schemaPath=s,p.errSchemaPath=l,a+=" for (var "+v+" = 0; "+v+" < "+u+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=u+"["+v+"]";p.dataPathArr[g]=v;k=e.validate(p);p.baseId=b,e.util.varOccurences(k,y)<2?a+=" "+e.util.varReplace(k,y,D)+" ":a+=" var "+y+" = "+D+"; "+k+" ",c&&(a+=" if (!"+f+") break; "),a+=" }"}return c&&(a+=" "+h+" if ("+m+" == errors) {"),a},maximum:Xe,minimum:Xe,maxItems:er,minItems:er,maxLength:rr,minLength:rr,maxProperties:tr,minProperties:tr,multipleOf:function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");o+="var division"+n+";if (",m&&(o+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),o+=" (division"+n+" = "+d+" / "+a+", ",e.opts.multipleOfPrecision?o+=" Math.abs(Math.round(division"+n+") - division"+n+") > 1e-"+e.opts.multipleOfPrecision+" ":o+=" division"+n+" !== parseInt(division"+n+") ",o+=" ) ",m&&(o+=" ) "),o+=" ) { ";var p=p||[];p.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be multiple of ",o+=m?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var h=o;return o=p.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+h+"]); ":o+=" validate.errors = ["+h+"]; return false; ":o+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},not:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(n||""),d="errs__"+o,m=e.util.copy(e);m.level++;var p="valid"+m.level;if(e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){m.schema=i,m.schemaPath=s,m.errSchemaPath=l,a+=" var "+d+" = errors; ";var h,f=e.compositeRule;e.compositeRule=m.compositeRule=!0,m.createErrors=!1,m.opts.allErrors&&(h=m.opts.allErrors,m.opts.allErrors=!1),a+=" "+e.validate(m)+" ",m.createErrors=!0,h&&(m.opts.allErrors=h),e.compositeRule=m.compositeRule=f,a+=" if ("+p+") { ";var v=v||[];v.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var g=a;a=v.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(a+=" if (false) { ");return a},oneOf:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e),h="";p.level++;var f="valid"+p.level,v=p.baseId,g="prevValid"+o,y="passingSchemas"+o;a+="var "+m+" = errors , "+g+" = false , "+d+" = false , "+y+" = null; ";var b=e.compositeRule;e.compositeRule=p.compositeRule=!0;var P=i;if(P)for(var w,E=-1,S=P.length-1;E<S;)w=P[E+=1],(e.opts.strictKeywords?"object"==typeof w&&Object.keys(w).length>0||!1===w:e.util.schemaHasRules(w,e.RULES.all))?(p.schema=w,p.schemaPath=s+"["+E+"]",p.errSchemaPath=l+"/"+E,a+=" "+e.validate(p)+" ",p.baseId=v):a+=" var "+f+" = true; ",E&&(a+=" if ("+f+" && "+g+") { "+d+" = false; "+y+" = ["+y+", "+E+"]; } else { ",h+="}"),a+=" if ("+f+") { "+d+" = "+g+" = true; "+y+" = "+E+"; }";return e.compositeRule=p.compositeRule=b,a+=h+"if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a},pattern:function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'string') || "),o+=" !"+(m?"(new RegExp("+a+"))":e.usePattern(s))+".test("+d+") ) { ";var p=p||[];p.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { pattern: ",o+=m?""+a:""+e.util.toQuotedString(s),o+=" } ",!1!==e.opts.messages&&(o+=" , message: 'should match pattern \"",o+=m?"' + "+a+" + '":""+e.util.escapeQuotes(s),o+="\"' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+e.util.toQuotedString(s),o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var h=o;return o=p.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+h+"]); ":o+=" validate.errors = ["+h+"]; return false; ":o+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},properties:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(n||""),d="errs__"+o,m=e.util.copy(e),p="";m.level++;var h="valid"+m.level,f="key"+o,v="idx"+o,g=m.dataLevel=e.dataLevel+1,y="data"+g,b="dataProperties"+o,P=Object.keys(i||{}).filter(A),w=e.schema.patternProperties||{},E=Object.keys(w).filter(A),S=e.schema.additionalProperties,x=P.length||E.length,F=!1===S,O="object"==typeof S&&Object.keys(S).length,_=e.opts.removeAdditional,D=F||O||_,k=e.opts.ownProperties,j=e.baseId,I=e.schema.required;if(I&&(!e.opts.$data||!I.$data)&&I.length<e.opts.loopRequired)var C=e.util.toHash(I);function A(e){return"__proto__"!==e}if(a+="var "+d+" = errors;var "+h+" = true;",k&&(a+=" var "+b+" = undefined;"),D){if(a+=k?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+u+") { ",x){if(a+=" var isAdditional"+o+" = !(false ",P.length)if(P.length>8)a+=" || validate.schema"+s+".hasOwnProperty("+f+") ";else{var R=P;if(R)for(var $=-1,N=R.length-1;$<N;)G=R[$+=1],a+=" || "+f+" == "+e.util.toQuotedString(G)+" "}if(E.length){var L=E;if(L)for(var T=-1,z=L.length-1;T<z;)ne=L[T+=1],a+=" || "+e.usePattern(ne)+".test("+f+") "}a+=" ); if (isAdditional"+o+") { "}if("all"==_)a+=" delete "+u+"["+f+"]; ";else{var V=e.errorPath,q="' + "+f+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers)),F)if(_)a+=" delete "+u+"["+f+"]; ";else{a+=" "+h+" = false; ";var B=l;l=e.errSchemaPath+"/additionalProperties",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { additionalProperty: '"+q+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is an invalid additional property":a+="should NOT have additional properties",a+="' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var M=a;a=te.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+M+"]); ":a+=" validate.errors = ["+M+"]; return false; ":a+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=B,c&&(a+=" break; ")}else if(O)if("failing"==_){a+=" var "+d+" = errors; ";var U=e.compositeRule;e.compositeRule=m.compositeRule=!0,m.schema=S,m.schemaPath=e.schemaPath+".additionalProperties",m.errSchemaPath=e.errSchemaPath+"/additionalProperties",m.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);var W=u+"["+f+"]";m.dataPathArr[g]=f;var Q=e.validate(m);m.baseId=j,e.util.varOccurences(Q,y)<2?a+=" "+e.util.varReplace(Q,y,W)+" ":a+=" var "+y+" = "+W+"; "+Q+" ",a+=" if (!"+h+") { errors = "+d+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+u+"["+f+"]; } ",e.compositeRule=m.compositeRule=U}else{m.schema=S,m.schemaPath=e.schemaPath+".additionalProperties",m.errSchemaPath=e.errSchemaPath+"/additionalProperties",m.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);W=u+"["+f+"]";m.dataPathArr[g]=f;Q=e.validate(m);m.baseId=j,e.util.varOccurences(Q,y)<2?a+=" "+e.util.varReplace(Q,y,W)+" ":a+=" var "+y+" = "+W+"; "+Q+" ",c&&(a+=" if (!"+h+") break; ")}e.errorPath=V}x&&(a+=" } "),a+=" } ",c&&(a+=" if ("+h+") { ",p+="}")}var H=e.opts.useDefaults&&!e.compositeRule;if(P.length){var K=P;if(K)for(var G,J=-1,Z=K.length-1;J<Z;){var Y=i[G=K[J+=1]];if(e.opts.strictKeywords?"object"==typeof Y&&Object.keys(Y).length>0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all)){var X=e.util.getProperty(G),ee=(W=u+X,H&&void 0!==Y.default);m.schema=Y,m.schemaPath=s+X,m.errSchemaPath=l+"/"+e.util.escapeFragment(G),m.errorPath=e.util.getPath(e.errorPath,G,e.opts.jsonPointers),m.dataPathArr[g]=e.util.toQuotedString(G);Q=e.validate(m);if(m.baseId=j,e.util.varOccurences(Q,y)<2){Q=e.util.varReplace(Q,y,W);var re=W}else{re=y;a+=" var "+y+" = "+W+"; "}if(ee)a+=" "+Q+" ";else{if(C&&C[G]){a+=" if ( "+re+" === undefined ",k&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+h+" = false; ";V=e.errorPath,B=l;var te,ae=e.util.escapeQuotes(G);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(V,G,e.opts.jsonPointers)),l=e.errSchemaPath+"/required",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+ae+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+ae+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";M=a;a=te.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+M+"]); ":a+=" validate.errors = ["+M+"]; return false; ":a+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=B,e.errorPath=V,a+=" } else { "}else c?(a+=" if ( "+re+" === undefined ",k&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+h+" = true; } else { "):(a+=" if ("+re+" !== undefined ",k&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=" ) { ");a+=" "+Q+" } "}}c&&(a+=" if ("+h+") { ",p+="}")}}if(E.length){var oe=E;if(oe)for(var ne,ie=-1,se=oe.length-1;ie<se;){Y=w[ne=oe[ie+=1]];if(e.opts.strictKeywords?"object"==typeof Y&&Object.keys(Y).length>0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all)){m.schema=Y,m.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(ne),m.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(ne),a+=k?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+u+") { ",a+=" if ("+e.usePattern(ne)+".test("+f+")) { ",m.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);W=u+"["+f+"]";m.dataPathArr[g]=f;Q=e.validate(m);m.baseId=j,e.util.varOccurences(Q,y)<2?a+=" "+e.util.varReplace(Q,y,W)+" ":a+=" var "+y+" = "+W+"; "+Q+" ",c&&(a+=" if (!"+h+") break; "),a+=" } ",c&&(a+=" else "+h+" = true; "),a+=" } ",c&&(a+=" if ("+h+") { ",p+="}")}}}return c&&(a+=" "+p+" if ("+d+" == errors) {"),a},propertyNames:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(n||""),d="errs__"+o,m=e.util.copy(e);m.level++;var p="valid"+m.level;if(a+="var "+d+" = errors;",e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){m.schema=i,m.schemaPath=s,m.errSchemaPath=l;var h="key"+o,f="idx"+o,v="i"+o,g="' + "+h+" + '",y="data"+(m.dataLevel=e.dataLevel+1),b="dataProperties"+o,P=e.opts.ownProperties,w=e.baseId;P&&(a+=" var "+b+" = undefined; "),a+=P?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+f+"=0; "+f+"<"+b+".length; "+f+"++) { var "+h+" = "+b+"["+f+"]; ":" for (var "+h+" in "+u+") { ",a+=" var startErrs"+o+" = errors; ";var E=h,S=e.compositeRule;e.compositeRule=m.compositeRule=!0;var x=e.validate(m);m.baseId=w,e.util.varOccurences(x,y)<2?a+=" "+e.util.varReplace(x,y,E)+" ":a+=" var "+y+" = "+E+"; "+x+" ",e.compositeRule=m.compositeRule=S,a+=" if (!"+p+") { for (var "+v+"=startErrs"+o+"; "+v+"<errors; "+v+"++) { vErrors["+v+"].propertyName = "+h+"; } var err = ",!1!==e.createErrors?(a+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { propertyName: '"+g+"' } ",!1!==e.opts.messages&&(a+=" , message: 'property name \\'"+g+"\\' is invalid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),c&&(a+=" break; "),a+=" } }"}return c&&(a+=" if ("+d+" == errors) {"),a},required:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(n||""),d="valid"+o,m=e.opts.$data&&i&&i.$data;m&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ");var p="schema"+o;if(!m)if(i.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var h=[],f=i;if(f)for(var v,g=-1,y=f.length-1;g<y;){v=f[g+=1];var b=e.schema.properties[v];b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0||!1===b:e.util.schemaHasRules(b,e.RULES.all))||(h[h.length]=v)}}else h=i;if(m||h.length){var P=e.errorPath,w=m||h.length>=e.opts.loopRequired,E=e.opts.ownProperties;if(c)if(a+=" var missing"+o+"; ",w){m||(a+=" var "+p+" = validate.schema"+s+"; ");var S="' + "+(k="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,k,e.opts.jsonPointers)),a+=" var "+d+" = true; ",m&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=" for (var "+O+" = 0; "+O+" < "+p+".length; "+O+"++) { "+d+" = "+u+"["+p+"["+O+"]] !== undefined ",E&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", "+p+"["+O+"]) "),a+="; if (!"+d+") break; } ",m&&(a+=" } "),a+=" if (!"+d+") { ",(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var x=a;a=D.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var F=h;if(F)for(var O=-1,_=F.length-1;O<_;){I=F[O+=1],O&&(a+=" || "),a+=" ( ( "+($=u+(R=e.util.getProperty(I)))+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(I)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?I:R)+") ) "}a+=") { ";var D;S="' + "+(k="missing"+o)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,k,!0):P+" + "+k),(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";x=a;a=D.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(w){m||(a+=" var "+p+" = validate.schema"+s+"; ");var k;S="' + "+(k="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,k,e.opts.jsonPointers)),m&&(a+=" if ("+p+" && !Array.isArray("+p+")) { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+p+" !== undefined) { "),a+=" for (var "+O+" = 0; "+O+" < "+p+".length; "+O+"++) { if ("+u+"["+p+"["+O+"]] === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", "+p+"["+O+"]) "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",m&&(a+=" } ")}else{var j=h;if(j)for(var I,C=-1,A=j.length-1;C<A;){I=j[C+=1];var R=e.util.getProperty(I),$=(S=e.util.escapeQuotes(I),u+R);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,I,e.opts.jsonPointers)),a+=" if ( "+$+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(I)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=P}else c&&(a+=" if (true) {");return a},uniqueItems:function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(i||""),m="valid"+n,p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,(s||p)&&!1!==e.opts.uniqueItems){p&&(o+=" var "+m+"; if ("+a+" === false || "+a+" === undefined) "+m+" = true; else if (typeof "+a+" != 'boolean') "+m+" = false; else { "),o+=" var i = "+d+".length , "+m+" = true , j; if (i > 1) { ";var h=e.schema.items&&e.schema.items.type,f=Array.isArray(h);if(!h||"object"==h||"array"==h||f&&(h.indexOf("object")>=0||h.indexOf("array")>=0))o+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+d+"[i], "+d+"[j])) { "+m+" = false; break outer; } } } ";else{o+=" var itemIndices = {}, item; for (;i--;) { var item = "+d+"[i]; ";var v="checkDataType"+(f?"s":"");o+=" if ("+e.util[v](h,"item",e.opts.strictNumbers,!0)+") continue; ",f&&(o+=" if (typeof item == 'string') item = '\"' + item; "),o+=" if (typeof itemIndices[item] == 'number') { "+m+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}o+=" } ",p&&(o+=" } "),o+=" if (!"+m+") { ";var g=g||[];g.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var y=o;o=g.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+y+"]); ":o+=" validate.errors = ["+y+"]; return false; ":o+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",u&&(o+=" else { ")}else u&&(o+=" if (true) { ");return o},validate:we},or=B.toHash,nr=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"],ir=function(e,r){for(var t=0;t<r.length;t++){e=JSON.parse(JSON.stringify(e));var a,o=r[t].split("/"),n=e;for(a=1;a<o.length;a++)n=n[o[a]];for(a=0;a<nr.length;a++){var i=nr[a],s=n[i];s&&(n[i]={anyOf:[s,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e},sr=ge.MissingRef,lr=function e(r,t,a){var o=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof t&&(a=t,t=void 0);var n=i(r).then((function(){var e=o._addSchema(r,void 0,t);return e.validate||function e(r){try{return o._compile(r)}catch(e){if(e instanceof sr)return a(e);throw e}function a(a){var n=a.missingSchema;if(c(n))throw new Error("Schema "+n+" is loaded but "+a.missingRef+" cannot be resolved");var s=o._loadingSchemas[n];return s||(s=o._loadingSchemas[n]=o._opts.loadSchema(n)).then(l,l),s.then((function(e){if(!c(n))return i(e).then((function(){c(n)||o.addSchema(e,n,void 0,t)}))})).then((function(){return e(r)}));function l(){delete o._loadingSchemas[n]}function c(e){return o._refs[e]||o._schemas[e]}}}(e)}));a&&n.then((function(e){a(null,e)}),a);return n;function i(r){var t=r.$schema;return t&&!o.getSchema(t)?e.call(o,{$ref:t},!0):Promise.resolve()}};var cr=function(e,r,t){var a,o,n=" ",i=e.level,s=e.dataLevel,l=e.schema[r],c=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,d=!e.opts.allErrors,m="data"+(s||""),p="valid"+i,h="errs__"+i,f=e.opts.$data&&l&&l.$data;f?(n+=" var schema"+i+" = "+e.util.getData(l.$data,s,e.dataPathArr)+"; ",o="schema"+i):o=l;var v,g,y,b,P,w="definition"+i,E=this.definition,S="";if(f&&E.$data){P="keywordValidate"+i;var x=E.validateSchema;n+=" var "+w+" = RULES.custom['"+r+"'].definition; var "+P+" = "+w+".validate;"}else{if(!(b=e.useCustomRule(this,l,e.schema,e)))return;o="validate.schema"+c,P=b.code,v=E.compile,g=E.inline,y=E.macro}var F=P+".errors",O="i"+i,_="ruleErr"+i,D=E.async;if(D&&!e.async)throw new Error("async keyword in sync schema");if(g||y||(n+=F+" = null;"),n+="var "+h+" = errors;var "+p+";",f&&E.$data&&(S+="}",n+=" if ("+o+" === undefined) { "+p+" = true; } else { ",x&&(S+="}",n+=" "+p+" = "+w+".validateSchema("+o+"); if ("+p+") { ")),g)E.statements?n+=" "+b.validate+" ":n+=" "+p+" = "+b.validate+"; ";else if(y){var k=e.util.copy(e);S="";k.level++;var j="valid"+k.level;k.schema=b.validate,k.schemaPath="";var I=e.compositeRule;e.compositeRule=k.compositeRule=!0;var C=e.validate(k).replace(/validate\.schema/g,P);e.compositeRule=k.compositeRule=I,n+=" "+C}else{(N=N||[]).push(n),n="",n+=" "+P+".call( ",e.opts.passContext?n+="this":n+="self",v||!1===E.schema?n+=" , "+m+" ":n+=" , "+o+" , "+m+" , validate.schema"+e.schemaPath+" ",n+=" , (dataPath || '')",'""'!=e.errorPath&&(n+=" + "+e.errorPath);var A=s?"data"+(s-1||""):"parentData",R=s?e.dataPathArr[s]:"parentDataProperty",$=n+=" , "+A+" , "+R+" , rootData ) ";n=N.pop(),!1===E.errors?(n+=" "+p+" = ",D&&(n+="await "),n+=$+"; "):n+=D?" var "+(F="customErrors"+i)+" = null; try { "+p+" = await "+$+"; } catch (e) { "+p+" = false; if (e instanceof ValidationError) "+F+" = e.errors; else throw e; } ":" "+F+" = null; "+p+" = "+$+"; "}if(E.modifying&&(n+=" if ("+A+") "+m+" = "+A+"["+R+"];"),n+=""+S,E.valid)d&&(n+=" if (true) { ");else{var N;n+=" if ( ",void 0===E.valid?(n+=" !",n+=y?""+j:""+p):n+=" "+!E.valid+" ",n+=") { ",a=this.keyword,(N=N||[]).push(n),n="",(N=N||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(n+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";var L=n;n=N.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+L+"]); ":n+=" validate.errors = ["+L+"]; return false; ":n+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var T=n;n=N.pop(),g?E.errors?"full"!=E.errors&&(n+=" for (var "+O+"="+h+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(n+=" "+_+".schema = "+o+"; "+_+".data = "+m+"; "),n+=" } "):!1===E.errors?n+=" "+T+" ":(n+=" if ("+h+" == errors) { "+T+" } else { for (var "+O+"="+h+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(n+=" "+_+".schema = "+o+"; "+_+".data = "+m+"; "),n+=" } } "):y?(n+=" var err = ",!1!==e.createErrors?(n+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(n+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&d&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; ")):!1===E.errors?n+=" "+T+" ":(n+=" if (Array.isArray("+F+")) { if (vErrors === null) vErrors = "+F+"; else vErrors = vErrors.concat("+F+"); errors = vErrors.length; for (var "+O+"="+h+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; "+_+'.schemaPath = "'+u+'"; ',e.opts.verbose&&(n+=" "+_+".schema = "+o+"; "+_+".data = "+m+"; "),n+=" } } else { "+T+" } "),n+=" } ",d&&(n+=" else { ")}return n},ur="http://json-schema.org/draft-07/schema#",dr="http://json-schema.org/draft-07/schema#",mr="Core schema meta-schema",pr={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},hr=["object","boolean"],fr={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},vr={$schema:ur,$id:dr,title:mr,definitions:pr,type:hr,properties:fr,default:!0},gr=T(Object.freeze({__proto__:null,$schema:ur,$id:dr,title:mr,definitions:pr,type:hr,properties:fr,default:vr})),yr={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:gr.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:gr.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}},br=/^[a-z_$][a-z0-9_$-]*$/i,Pr=function(e,r){var t=this.RULES;if(t.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!br.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(r){this.validateKeyword(r,!0);var a=r.type;if(Array.isArray(a))for(var o=0;o<a.length;o++)i(e,a[o],r);else i(e,a,r);var n=r.metaSchema;n&&(r.$data&&this._opts.$data&&(n={anyOf:[n,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),r.validateSchema=this.compile(n,!0))}function i(e,r,a){for(var o,n=0;n<t.length;n++){var i=t[n];if(i.type==r){o=i;break}}o||(o={type:r,rules:[]},t.push(o));var s={keyword:e,definition:a,custom:!0,code:cr,implements:a.implements};o.rules.push(s),t.custom[e]=s}return t.keywords[e]=t.all[e]=!0,this},wr=function(e){var r=this.RULES.custom[e];return r?r.definition:this.RULES.keywords[e]||!1},Er=function(e){var r=this.RULES;delete r.keywords[e],delete r.all[e],delete r.custom[e];for(var t=0;t<r.length;t++)for(var a=r[t].rules,o=0;o<a.length;o++)if(a[o].keyword==e){a.splice(o,1);break}return this},Sr=function e(r,t){e.errors=null;var a=this._validateKeyword=this._validateKeyword||this.compile(yr,!0);if(a(r))return!0;if(e.errors=a.errors,t)throw new Error("custom keyword definition is invalid: "+this.errorsText(a.errors));return!1};var xr="http://json-schema.org/draft-07/schema#",Fr="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Or="Meta-schema for $data reference (JSON Schema extension proposal)",_r=["$data"],Dr={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},kr={$schema:xr,$id:Fr,description:Or,type:"object",required:_r,properties:Dr,additionalProperties:!1},jr=T(Object.freeze({__proto__:null,$schema:xr,$id:Fr,description:Or,type:"object",required:_r,properties:Dr,additionalProperties:!1,default:kr})),Ir=$r;$r.prototype.validate=function(e,r){var t;if("string"==typeof e){if(!(t=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);t=a.validate||this._compile(a)}var o=t(r);!0!==t.$async&&(this.errors=t.errors);return o},$r.prototype.compile=function(e,r){var t=this._addSchema(e,void 0,r);return t.validate||this._compile(t)},$r.prototype.addSchema=function(e,r,t,a){if(Array.isArray(e)){for(var o=0;o<e.length;o++)this.addSchema(e[o],void 0,t,a);return this}var n=this._getId(e);if(void 0!==n&&"string"!=typeof n)throw new Error("schema id must be string");return qr(this,r=oe.normalizeId(r||n)),this._schemas[r]=this._addSchema(e,t,a,!0),this},$r.prototype.addMetaSchema=function(e,r,t){return this.addSchema(e,r,t,!0),this},$r.prototype.validateSchema=function(e,r){var t=e.$schema;if(void 0!==t&&"string"!=typeof t)throw new Error("$schema must be a string");if(!(t=t||this._opts.defaultMeta||function(e){var r=e._opts.meta;return e._opts.defaultMeta="object"==typeof r?e._getId(r)||r:e.getSchema(Cr)?Cr:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var a=this.validate(t,e);if(!a&&r){var o="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(o);this.logger.error(o)}return a},$r.prototype.getSchema=function(e){var r=Nr(this,e);switch(typeof r){case"object":return r.validate||this._compile(r);case"string":return this.getSchema(r);case"undefined":return function(e,r){var t=oe.schema.call(e,{schema:{}},r);if(t){var a=t.schema,o=t.root,n=t.baseId,i=xe.call(e,a,o,void 0,n);return e._fragments[r]=new te({ref:r,fragment:!0,schema:a,root:o,baseId:n,validate:i}),i}}(this,e)}},$r.prototype.removeSchema=function(e){if(e instanceof RegExp)return Lr(this,this._schemas,e),Lr(this,this._refs,e),this;switch(typeof e){case"undefined":return Lr(this,this._schemas),Lr(this,this._refs),this._cache.clear(),this;case"string":var r=Nr(this,e);return r&&this._cache.del(r.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var t=this._opts.serialize,a=t?t(e):e;this._cache.del(a);var o=this._getId(e);o&&(o=oe.normalizeId(o),delete this._schemas[o],delete this._refs[o])}return this},$r.prototype.addFormat=function(e,r){"string"==typeof r&&(r=new RegExp(r));return this._formats[e]=r,this},$r.prototype.errorsText=function(e,r){if(!(e=e||this.errors))return"No errors";for(var t=void 0===(r=r||{}).separator?", ":r.separator,a=void 0===r.dataVar?"data":r.dataVar,o="",n=0;n<e.length;n++){var i=e[n];i&&(o+=a+i.dataPath+" "+i.message+t)}return o.slice(0,-t.length)},$r.prototype._addSchema=function(e,r,t,a){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var o=this._opts.serialize,n=o?o(e):e,i=this._cache.get(n);if(i)return i;a=a||!1!==this._opts.addUsedSchema;var s=oe.normalizeId(this._getId(e));s&&a&&qr(this,s);var l,c=!1!==this._opts.validateSchema&&!r;c&&!(l=s&&s==oe.normalizeId(e.$schema))&&this.validateSchema(e,!0);var u=oe.ids.call(this,e),d=new te({id:s,schema:e,localRefs:u,cacheKey:n,meta:t});"#"!=s[0]&&a&&(this._refs[s]=d);this._cache.put(n,d),c&&l&&this.validateSchema(e,!0);return d},$r.prototype._compile=function(e,r){if(e.compiling)return e.validate=o,o.schema=e.schema,o.errors=null,o.root=r||o,!0===e.schema.$async&&(o.$async=!0),o;var t,a;e.compiling=!0,e.meta&&(t=this._opts,this._opts=this._metaOpts);try{a=xe.call(this,e.schema,r,e.localRefs)}catch(r){throw delete e.validate,r}finally{e.compiling=!1,e.meta&&(this._opts=t)}return e.validate=a,e.refs=a.refs,e.refVal=a.refVal,e.root=a.root,a;function o(){var r=e.validate,t=r.apply(this,arguments);return o.errors=r.errors,t}},$r.prototype.compileAsync=lr,$r.prototype.addKeyword=Pr,$r.prototype.getKeyword=wr,$r.prototype.removeKeyword=Er,$r.prototype.validateKeyword=Sr,$r.ValidationError=ge.Validation,$r.MissingRefError=ge.MissingRef,$r.$dataMetaSchema=ir;var Cr="http://json-schema.org/draft-07/schema",Ar=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],Rr=["/properties"];function $r(e){if(!(this instanceof $r))return new $r(e);var r,t;e=this._opts=B.copy(e)||{},function(e){var r=e._opts.logger;if(!1===r)e.logger={log:Br,warn:Br,error:Br};else{if(void 0===r&&(r=console),!("object"==typeof r&&r.log&&r.warn&&r.error))throw new Error("logger must implement log, warn and error methods");e.logger=r}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=We(e.format),this._cache=e.cache||new Ae,this._loadingSchemas={},this._compilations=[],this.RULES=((r=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}]).all=or(t=["type","$comment"]),r.types=or(["number","integer","string","array","object","boolean","null"]),r.forEach((function(e){e.rules=e.rules.map((function(e){var a;if("object"==typeof e){var o=Object.keys(e)[0];a=e[o],e=o,a.forEach((function(e){t.push(e),r.all[e]=!0}))}return t.push(e),r.all[e]={keyword:e,code:ar[e],implements:a}})),r.all.$comment={keyword:"$comment",code:ar.$comment},e.type&&(r.types[e.type]=e)})),r.keywords=or(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),r.custom={},r),this._getId=function(e){switch(e.schemaId){case"auto":return Vr;case"id":return Tr;default:return zr}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=Pe),this._metaOpts=function(e){for(var r=B.copy(e._opts),t=0;t<Ar.length;t++)delete r[Ar[t]];return r}(this),e.formats&&function(e){for(var r in e._opts.formats){var t=e._opts.formats[r];e.addFormat(r,t)}}(this),e.keywords&&function(e){for(var r in e._opts.keywords){var t=e._opts.keywords[r];e.addKeyword(r,t)}}(this),function(e){var r;e._opts.$data&&(r=jr,e.addMetaSchema(r,r.$id,!0));if(!1===e._opts.meta)return;var t=gr;e._opts.$data&&(t=ir(t,Rr));e.addMetaSchema(t,Cr,!0),e._refs["http://json-schema.org/schema"]=Cr}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var r=e._opts.schemas;if(!r)return;if(Array.isArray(r))e.addSchema(r);else for(var t in r)e.addSchema(r[t],t)}(this)}function Nr(e,r){return r=oe.normalizeId(r),e._schemas[r]||e._refs[r]||e._fragments[r]}function Lr(e,r,t){for(var a in r){var o=r[a];o.meta||t&&!t.test(a)||(e._cache.del(o.cacheKey),delete r[a])}}function Tr(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function zr(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function Vr(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function qr(e,r){if(e._schemas[r]||e._refs[r])throw new Error('schema with key or id "'+r+'" already exists')}function Br(){}var Mr={$$currentLocalizeFn:function(e){if(e&&e.length)for(var r=0;r<e.length;r+=1){var t=e[r],a=void 0,o=void 0,n=void 0;switch(t.keyword){case"$ref":a="无法找到引用".concat(t.params.ref);break;case"additionalItems":a="",o=t.params.limit,a+="不允许超过".concat(o,"个元素");break;case"additionalProperties":a="不允许有额外的属性";break;case"anyOf":a="数据应为 anyOf 所指定的其中一个";break;case"const":a="应当等于常量";break;case"contains":a="应当包含一个有效项";break;case"custom":a='应当通过 "'.concat(t.keyword,' 关键词校验"');break;case"dependencies":a="",o=t.params.depsCount,a+="应当拥有属性".concat(t.params.property,"的依赖属性").concat(t.params.deps);break;case"enum":a="应当是预设定的枚举值之一";break;case"exclusiveMaximum":case"exclusiveMinimum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(n);break;case"false schema":a="布尔模式出错";break;case"format":a='应当匹配格式 "'.concat(t.params.format,'"');break;case"formatExclusiveMaximum":a="formatExclusiveMaximum 应当是布尔值";break;case"formatExclusiveMinimum":a="formatExclusiveMinimum 应当是布尔值";break;case"formatMaximum":case"formatMinimum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当是 ".concat(n);break;case"if":a='应当匹配模式 "'.concat(t.params.failingKeyword,'" ');break;case"maximum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(n);break;case"maxItems":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个项");break;case"maxLength":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个字符");break;case"maxProperties":a="",o=t.params.limit,a+="不应有多于 ".concat(o," 个属性");break;case"minimum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(n);break;case"minItems":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个项");break;case"minLength":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个字符");break;case"minProperties":a="",o=t.params.limit,a+="不应有少于 ".concat(o," 个属性");break;case"multipleOf":a="应当是 ".concat(t.params.multipleOf," 的整数倍");break;case"not":a='不应当匹配 "not" schema';break;case"oneOf":a='只能匹配一个 "oneOf" 中的 schema';break;case"pattern":a='应当匹配模式 "'.concat(t.params.pattern,'"');break;case"patternRequired":a="应当有属性匹配模式 ".concat(t.params.missingPattern);break;case"propertyNames":a="属性名 '".concat(t.params.propertyName,"' 无效");break;case"required":a="应当有必需属性 ".concat(t.params.missingProperty);break;case"switch":a="由于 ".concat(t.params.caseIndex,' 失败,未通过 "switch" 校验, ');break;case"type":a="应当是 ".concat(t.params.type," 类型");break;case"uniqueItems":a="不应当含有重复项 (第 ".concat(t.params.j," 项与第 ").concat(t.params.i," 项是重复的)");break;default:continue}t.message=a}},getCurrentLocalize:function(){return this.$$currentLocalizeFn},useLocal:function(e){this.$$currentLocalizeFn=e}};function Ur(e,r){try{if("object"===t(r))return e.fill(null).map((function(){return JSON.parse(JSON.stringify(r))}))}catch(e){}}function Wr(e,r){return e.filter((function(e){return r.includes(e)}))}function Qr(e,r,t){var a=N(e.$ref,r);e.$ref;var o=s(e,["$ref"]);return Jr(i(i({},a),o),r,t)}function Hr(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length<2)return r[0];for(var a={},o=[].concat(r),n=function(){var e=E(o[0])?o[0]:{},r=E(o[1])?o[1]:{};a=Object.assign({},e),Object.keys(r).reduce((function(t,a){var o=e[a],n=r[a];if(E(o)||E(n))if(E(o)&&E(n))t[a]=Hr(o,n);else{var i=l(E(o)?[o,n]:[n,o],2),s=i[0],c=i[1];t[a]="additionalProperties"===a?!0===c&&s:s}else if(Array.isArray(o)||Array.isArray(n))if(Array.isArray(o)&&Array.isArray(n)){if(E(o[0])||E(n[0]))throw new Error("暂不支持如上数组对象元素合并");var u=Wr([].concat(o),[].concat(n));if(u.length<=0)throw new Error("无法合并如上数据");0===u.length&&"type"===a?t[a]=u[0]:t[a]=u}else{var d=l(Array.isArray(o)?[o,n]:[n,o],2),m=d[0],p=d[1];if(void 0===p)t[a]=m;else{if(!m.includes(p))throw new Error("无法合并如下数据");t[a]=p}}else if(void 0!==o&&void 0!==n)if("maxLength"===a||"maximum"===a||"maxItems"===a||"exclusiveMaximum"===a||"maxProperties"===a)t[a]=Math.min(o,n);else if("minLength"===a||"minimum"===a||"minItems"===a||"exclusiveMinimum"===a||"minProperties"===a)t[a]=Math.max(o,n);else if("multipleOf"===a)t[a]=R(o,n);else{if(o!==n)throw new Error("无法合并如下数据");t[a]=o}else t[a]=void 0===o?n:o;return t}),a),o.splice(0,2,a)};o.length>=2;)n();return a}function Kr(e,r,t){var a=i(i({},e),{},{allOf:e.allOf.map((function(e){return Jr(e,r,t)}))});try{var o=a.allOf,n=s(a,["allOf"]);return Hr.apply(void 0,[n].concat(c(o)))}catch(e){return a.allOf,s(a,["allOf"])}}function Gr(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.hasOwnProperty("allOf")&&(e=Kr(e,r,t)),e.hasOwnProperty("$ref")&&(e=Qr(e,r,t)),e}function Jr(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return E(e)?Gr(e,r,t):{}}var Zr=/{{(.*)}}/;function Yr(e,r,t,a){if(void 0!==t){var o=Zr.exec(t);if(Zr.lastIndex=0,o){var n=o[1].trim();return new Function("parentFormData","rootFormData","return ".concat(n))(v(e,r,1),e)}return a()}}function Xr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.schema,t=e.uiSchema,a=arguments.length>1?arguments[1]:void 0,o=at({schema:r,uiSchema:t,containsSpec:!1});return["title","description"].reduce((function(e,r){return o[r]&&(e["ui:".concat(r)]=String(o[r]).replace(/\$index/g,a+1)),e}),{})}function et(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.curNodePath,i=void 0===n?"":n,s=e.rootFormData,l=void 0===s?{}:s,c=o["ui:widget"]||t["ui:widget"],u=o["ui:hidden"]||t["ui:hidden"];return"HiddenWidget"===c||"hidden"===c||!!Yr(l,i,u,(function(){return"function"==typeof u?u(v(l,i,1),l):u}))}function rt(e,r){var a=r.schema,o=void 0===a?{}:a,n=r.uiSchema,i=void 0===n?{}:n,s=o["ui:field"]||i["ui:field"];if("function"==typeof s||"object"===t(s)||"string"==typeof s)return{field:s,fieldProps:i["ui:fieldProps"]||o["ui:fieldProps"]};var l=e[F(o)];if(l)return{field:l};if(!l&&(o.anyOf||o.oneOf))return{field:null};throw new Error("不支持的field类型 ".concat(o.type))}function tt(e){var r=e.schema,t=void 0===r?{}:r,o=e.uiSchema,n=void 0===o?{}:o,s=e.curNodePath,l=e.rootFormData,u=void 0===l?{}:l;return Object.assign.apply(Object,[{}].concat(c([t,n].map((function(e){return Object.keys(e).reduce((function(r,t){var o=e[t];return"ui:options"===t&&E(o)?i(i({},r),o):0===t.indexOf("ui:")?i(i({},r),{},a({},t.substring(3),void 0===s?o:Yr(u,s,o,(function(){return o})))):r}),{})})))))}function at(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.containsSpec,s=void 0===n||n,l=e.curNodePath,c=e.rootFormData,u={};return s&&(u.readonly=!!t.readOnly,void 0!==t.multipleOf&&(u.step=t.multipleOf),(t.minimum||0===t.minimum)&&(u.min=t.minimum),(t.maximum||0===t.maximum)&&(u.max=t.maximum),(t.minLength||0===t.minLength)&&(u.minlength=t.minLength),(t.maxLength||0===t.maxLength)&&(u.maxlength=t.maxLength),"date-time"!==t.format&&"date"!==t.format||("array"===t.type?(u.isRange=!0,u.isNumberValue=!(t.items&&"string"===t.items.type)):u.isNumberValue=!("string"===t.type))),i(i({title:t.title,description:t.description},u),tt({schema:t,uiSchema:o,curNodePath:l,rootFormData:c}))}function ot(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.curNodePath,i=e.rootFormData,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,c=at({schema:t,uiSchema:o,curNodePath:n,rootFormData:i});!c.widget&&l&&Object.assign(c,l({schema:t,uiSchema:o}));var u=c.widget,d=c.title,m=c.labelWidth,p=c.description,h=c.attrs,f=c.class,v=c.style,g=c.fieldAttrs,y=c.fieldStyle,b=c.fieldClass,P=c.emptyValue,w=c.width,E=c.getWidget,S=c.onChange,x=s(c,["widget","title","labelWidth","description","attrs","class","style","fieldAttrs","fieldStyle","fieldClass","emptyValue","width","getWidget","onChange"]);return{widget:u,label:d,labelWidth:m,description:p,widgetAttrs:h,widgetClass:f,widgetStyle:v,fieldAttrs:g,width:w,fieldStyle:y,fieldClass:b,emptyValue:P,getWidget:E,onChange:S,uiProps:x}}function nt(e){var r=e.schema,t=void 0===r?{}:r,o=e.uiSchema,n=void 0===o?{}:o,s=e.errorSchema,l=void 0===s?{}:s;return Object.assign.apply(Object,[{}].concat(c([t,n,l].map((function(e){return Object.keys(e).reduce((function(r,t){var o=e[t];return"err:options"===t&&E(o)?i(i({},r),o):0===t.indexOf("err:")?i(i({},r),{},a({},t.substring(4),o)):r}),{})})))))}function it(e,r){if(!Array.isArray(r))return e;var t,a=function(e){return e.reduce((function(e,r){return e[r]=!0,e}),{})},o=a(e),n=r.filter((function(e){return"*"===e||o[e]})),i=a(n),s=e.filter((function(e){return!i[e]})),l=n.indexOf("*");if(-1===l){if(s.length)throw new Error("uiSchema order list does not contain ".concat((t=s).length>1?"properties '".concat(t.join("', '"),"'"):"property '".concat(t[0],"'")));return n}if(l!==n.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");var u=c(n);return u.splice.apply(u,[l,1].concat(c(s))),u}function st(e){return Array.isArray(e.enum)&&1===e.enum.length||e.hasOwnProperty("const")}function lt(e){if(Array.isArray(e.enum)&&1===e.enum.length)return e.enum[0];if(e.hasOwnProperty("const"))return e.const;throw new Error("schema cannot be inferred as a constant")}function ct(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=Jr(e,r),a=t.oneOf||t.anyOf;return!!Array.isArray(t.enum)||!!Array.isArray(a)&&a.every((function(e){return st(e)}))}function ut(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every((function(e){return E(e)}))}function dt(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!(!e.uniqueItems||!e.items)&&ct(e.items,r)}function mt(e){return e.additionalItems,E(e.additionalItems)}function pt(e,r,t,a){if(e.enum){var o=tt({schema:e,uiSchema:r,curNodePath:t,rootFormData:a}).enumNames||e.enumNames;return e.enum.map((function(e,r){return{label:o&&o[r]||String(e),value:e}}))}var n=e.oneOf||e.anyOf,i=r.oneOf||r.anyOf;return n.map((function(e,r){var o=i&&i[r]?tt({schema:e,uiSchema:i[r],curNodePath:t,rootFormData:a}):{},n=lt(e);return{label:o.title||e.title||String(n),value:n}}))}function ht(e,r,t){if(e)return e;if(r){var a=t.split(".").pop();if(a&&a!=="".concat(Number(a)))return a}return""}var ft=Object.freeze({__proto__:null,replaceArrayIndex:Xr,isHiddenWidget:et,getUiField:rt,getUserUiOptions:tt,getUiOptions:at,getWidgetConfig:ot,getUserErrOptions:nt,orderProperties:it,isConstant:st,toConstant:lt,isSelect:ct,isFixedItems:ut,isMultiSelect:dt,allowAdditionalItems:mt,optionsList:pt,fallbackLabel:ht}),vt=bt(),gt=null,yt=null;function bt(){var e=new Ir({errorDataPath:"property",allErrors:!0,multipleOfPrecision:8,schemaId:"auto",unknownFormats:"ignore"});return e.addFormat("data-url",/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/),e.addFormat("color",/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/),e}function Pt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null===e?[]:e.map((function(e){var r=e.dataPath,t=e.keyword,a=e.message,o=e.params,n=e.schemaPath,i="".concat(r);return{name:t,property:i,message:a,params:o,stack:"".concat(i," ").concat(a).trim(),schemaPath:n}}))}function wt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.transformErrors,o=e.additionalMetaSchemas,n=void 0===o?[]:o,i=e.customFormats,s=void 0===i?{}:i,l=!O(yt,n),u=!O(gt,s);(l||u)&&(vt=bt()),n&&l&&Array.isArray(n)&&(vt.addMetaSchema(n),yt=n),s&&u&&E(s)&&(Object.keys(s).forEach((function(e){vt.addFormat(e,s[e])})),gt=s);var d=null;try{vt.validate(t,r)}catch(e){d=e}Mr.getCurrentLocalize()(vt.errors);var m=Pt(vt.errors);vt.errors=null;var p=d&&d.message&&"string"==typeof d.message&&d.message.includes("no schema with key or ref ");return p&&(m=[].concat(c(m),[{stack:d.message}])),"function"==typeof a&&(m=a(m)),{errors:m}}function Et(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.uiSchema,o=e.transformErrors,n=e.additionalMetaSchemas,i=void 0===n?[]:n,s=e.customFormats,l=void 0===s?{}:s,c=e.errorSchema,u=void 0===c?{}:c,d=e.required,m=void 0!==d&&d,p=e.propPath,h=void 0===p?"":p,f=e.isOnlyFirstError,v=void 0===f||f,g="array"===t.type&&Array.isArray(r)&&0===r.length,y=void 0===r||g;if(m){if(y){var b={keyword:"required",params:{missingProperty:h}},P=nt({schema:t,uiSchema:a,errorSchema:u}).required;return P?b.message=P:Mr.getCurrentLocalize()([b]),[b]}}else if(y&&!g)return[];var w=wt({formData:r,schema:t,transformErrors:o,additionalMetaSchemas:i,customFormats:l}).errors;w=w.filter((function(e){return""===e.property&&!e.schemaPath.includes("#/anyOf/")&&!e.schemaPath.includes("#/oneOf/")||"additionalProperties"===e.name}));var E=nt({schema:t,uiSchema:a,errorSchema:u});return(v&&w.length>0?[w[0]]:w).reduce((function(e,r){return r.message=void 0!==E[r.name]?E[r.name]:r.message,e.push(r),e}),[])}function St(e,r){try{return vt.validate(e,r)}catch(e){return!1}}function xt(e,r,t){for(var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=0;n<r.length;n++){var s=Jr(r[n],t,e);if(s.properties){var l=i(i({},t.definitions?{definitions:t.definitions}:{}),{},{anyOf:Object.keys(s.properties).map((function(e){return{required:[e]}}))}),c=void 0;if(s.anyOf){var u=o({},s);u.allOf?u.allOf=u.allOf.slice():u.allOf=[],u.allOf.push(l),c=u}else c=Object.assign({},s,l);if(a||delete c.required,St(c,e))return n}else if(St(r[n],e))return n}return 0}var Ft=Object.freeze({__proto__:null,ajvValidateFormData:wt,validateFormDataAndTransformMsg:Et,isValid:St,getMatchingOption:xt});function Ot(e,r){if(Array.isArray(r))return Array.isArray(e)||(e=[]),r.map((function(r,t){return e[t]?Ot(e[t],r):r}));if(E(r)){var t=Object.assign({},e);return Object.keys(r).reduce((function(t,a){return t[a]=Ot(e?e[a]:{},r[a]),t}),t)}return r}function _t(e,r,t){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],n=E(e)?e:{},i=E(a)?a:{};"allOf"in n&&(n=Kr(n,t,i));var s=r;if(E(s)&&E(n.default))s=x(s,n.default);else if("default"in n)s=n.default;else{if("$ref"in n){var l=N(n.$ref,t);return _t(l,s,t,i,o)}if(ut(n))s=n.items.map((function(e,a){return _t(e,Array.isArray(r)?r[a]:void 0,t,i,o)}));else if("oneOf"in n){var c=Jr(n.oneOf[xt(i,n.oneOf,t)],t,i);if(n.properties&&c.properties){var u=x(n,c);delete u.oneOf,n=u}else n=c}else if("anyOf"in n){var d=Jr(n.anyOf[xt(i,n.anyOf,t)],t,i);if(n.properties&&d.properties){var m=x(n,d);delete m.anyOf,n=m}else n=d}}switch(void 0===s&&(s=n.default),F(n)){case"null":return null;case"object":return Object.keys(n.properties||{}).reduce((function(e,r){var a=_t(n.properties[r],(s||{})[r],t,(i||{})[r],o);return(o||void 0!==a)&&(e[r]=a),e}),{});case"array":if(Array.isArray(s)&&(s=s.map((function(e,r){return _t(n.items[r]||n.additionalItems||{},e,t,{},o)}))),Array.isArray(a)&&(s=a.map((function(e,r){return _t(n.items,(s||{})[r],t,e,{},o)}))),n.minItems){if(dt(n,t))return s||[];var p=s?s.length:0;if(n.minItems>p){var h=s||[],f=Array.isArray(n.items)?n.additionalItems:n.items,v=Ur(new Array(n.minItems-p),_t(f,f.defaults,t,{},o));return h.concat(v)}}s=void 0===s?[]:s}return s}function Dt(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!E(e))throw new Error("Invalid schema: ".concat(e));var o=Jr(e,t,r),n=_t(o,e.default,t,r,a);return void 0===r?n:E(r)||Array.isArray(r)?Ot(n,r):0===r||!1===r||""===r?r:r||n}function kt(e,r){void 0===r&&(r={});var t=r.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}kt('.genFromComponent{font-size:14px;line-height:1;word-wrap:break-word;word-break:break-word;padding:0;margin:0}.genFromComponent a,.genFromComponent h1,.genFromComponent h2,.genFromComponent h3,.genFromComponent li,.genFromComponent p,.genFromComponent ul{font-size:14px}.genFromComponent .genFormIcon{width:12px;height:12px;vertical-align:top}.genFromComponent .genFormBtn{display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;background:#fff;border:1px solid #dcdfe6;color:#606266;-webkit-appearance:none;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;margin:0;-webkit-transition:.1s;transition:.1s;font-weight:500;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;padding:12px 20px;font-size:14px;border-radius:4px}.genFromComponent .genFormBtn.is-plain:focus,.genFromComponent .genFormBtn.is-plain:hover{background:#fff;border-color:#409eff;color:#409eff}.genFromComponent .hiddenWidget{display:none}.genFromComponent .fieldGroupWrap+.fieldGroupWrap .fieldGroupWrap_title{margin-top:20px}.genFromComponent .fieldGroupWrap_title{position:relative;display:block;width:100%;line-height:26px;margin-bottom:8px;font-size:15px;font-weight:700;border:0}.genFromComponent .fieldGroupWrap_des{font-size:12px;line-height:20px;margin-bottom:10px;color:#999}.genFromComponent .genFromWidget_des{padding:0;margin-top:0;margin-bottom:2px;font-size:12px;line-height:20px;color:#999;text-align:left}.genFromComponent .formItemErrorBox{margin:0 auto;color:#ff5757;padding-top:2px;position:absolute;top:100%;left:0;display:-webkit-box!important;line-height:16px;text-overflow:ellipsis;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1;white-space:normal;font-size:12px;text-align:left}.genFromComponent .genFormIcon-qs{fill:#606266;vertical-align:middle;display:inline-block;width:16px;height:16px;margin-left:2px;margin-top:-2px;cursor:pointer}.genFromComponent .genFormItemRequired:before{content:"*";color:#f56c6c;margin-right:4px}.genFromComponent .appendCombining_box{margin-bottom:22px}.genFromComponent .appendCombining_box .appendCombining_box{margin-bottom:10px}.genFromComponent .appendCombining_box{padding:10px;background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .validateWidget{margin-bottom:0!important;width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important;padding:0!important}.genFromComponent .validateWidget .formItemErrorBox{padding:5px 0;position:relative}.genFromComponent .arrayField:not(.genFormItem){margin-bottom:22px}.genFromComponent .arrayField:not(.genFormItem) .arrayField{margin-bottom:10px}.genFromComponent .arrayOrderList{background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .arrayOrderList_item{position:relative;padding:25px 10px 12px;border-radius:2px;margin-bottom:6px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.genFromComponent .arrayOrderList_bottomAddBtn{text-align:right;padding:15px 10px;margin-bottom:10px}.genFromComponent .bottomAddBtn{width:40%;min-width:10px;max-width:180px}.genFromComponent .arrayListItem_content{padding-top:15px;-webkit-box-flex:1;-ms-flex:1;flex:1;margin:0 auto;-webkit-box-shadow:0 -1px 0 0 rgba(0,0,0,.05);box-shadow:0 -1px 0 0 rgba(0,0,0,.05)}.genFromComponent .arrayListItem_index,.genFromComponent .arrayListItem_operateTool{position:absolute;height:25px}.genFromComponent .arrayListItem_index{top:6px;line-height:18px;height:18px;padding:0 6px;background-color:rgba(0,0,0,.28);color:#fff;font-size:12px;border-radius:2px}.genFromComponent .arrayListItem_operateTool{width:75px;right:9px;top:-1px;text-align:right;font-size:0}.genFromComponent .arrayListItem_btn{vertical-align:top;display:inline-block;padding:6px;margin:0;font-size:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none;cursor:pointer;text-align:center;background:transparent;color:#666}.genFromComponent .arrayListItem_btn:hover{opacity:.6}.genFromComponent .arrayListItem_btn[disabled]{color:#999;opacity:.3!important;cursor:not-allowed}.genFromComponent .arrayListItem_orderBtn-bottom,.genFromComponent .arrayListItem_orderBtn-top{background-color:#f0f9eb}.genFromComponent .arrayListItem_btn-delete{background-color:#fef0f0}.genFromComponent .formFooter_item{text-align:right;border-top:1px solid rgba(0,0,0,.08);padding-top:10px}.genFromComponent.formInlineFooter>.fieldGroupWrap{display:inline-block;margin-right:10px}.genFromComponent.formInline .genFormItem{display:inline-block;margin-right:10px;vertical-align:top}.genFromComponent.formInline .validateWidget{margin-right:0}.genFromComponent.formInline .formFooter_item{border-top:none;padding-top:0}.layoutColumn .layoutColumn_w100{width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important}.layoutColumn .fieldGroupWrap_box{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start}.layoutColumn .fieldGroupWrap_box>div{width:100%;-ms-flex-preferred-size:100%;flex-basis:100%}.layoutColumn .fieldGroupWrap_box>.genFormItem{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;-webkit-box-sizing:border-box;box-sizing:border-box;padding-right:10px}.layoutColumn.layoutColumn-1 .fieldGroupWrap_box>.genFormItem{padding-right:0}.layoutColumn.layoutColumn-2 .fieldGroupWrap_box>.genFormItem{width:50%;-ms-flex-preferred-size:50%;flex-basis:50%}.layoutColumn.layoutColumn-3 .fieldGroupWrap_box>.genFormItem{width:33.333%;-ms-flex-preferred-size:33.333%;flex-basis:33.333%}');var jt={formFooter:{type:Object,default:function(){return{show:!0,okBtn:"保存",cancelBtn:"取消"}}},modelValue:{type:null,default:function(){return{}},required:!0},fallbackLabel:{type:Boolean,default:!1},formProps:{type:Object,default:function(){return{}}},schema:{type:Object,default:function(){return{}},required:!0},uiSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},errorSchema:{type:Object,default:function(){return{}}}},It={name:"FormFooter",props:{okBtn:{type:String,default:"保存"},cancelBtn:{type:String,default:"取消"},formItemAttrs:{type:Object,default:function(){return{}}},globalOptions:{type:Object,default:function(){return{}}}},emits:["cancel","submit"],setup:function(e,t){var a=t.emit,o=e.globalOptions.COMPONENT_MAP;return function(){return r.h(P(o.formItem),i({class:{formFooter_item:!0}},e.formItemAttrs),{default:function(){return[r.h(P(o.button),{onClick:function(){a("cancel")}},{default:function(){return e.cancelBtn}}),r.h(P(o.button),{style:{marginLeft:"10px"},type:"primary",onClick:function(){a("submit")}},{default:function(){return e.okBtn}})]}})}}},Ct={name:"FieldGroupWrap",inject:["genFormProvide"],props:{curNodePath:{type:String,default:""},showTitle:{type:Boolean,default:!0},showDescription:{type:Boolean,default:!0},title:{type:String,default:""},description:{type:String,default:""}},computed:{trueTitle:function(){var e=this.title;if(e)return e;var r=(this.genFormProvide.value||this.genFormProvide).fallbackLabel&&this.curNodePath.split(".").pop();return r!=="".concat(Number(r))?r:""}}},At={class:"fieldGroupWrap"},Rt={key:0,class:"fieldGroupWrap_title"},$t={class:"fieldGroupWrap_box"};Ct.render=function(e,t,a,o,n,i){return r.openBlock(),r.createBlock("div",At,[a.showTitle&&i.trueTitle?(r.openBlock(),r.createBlock("h3",Rt,r.toDisplayString(i.trueTitle),1)):r.createCommentVNode("v-if",!0),a.showDescription&&a.description?(r.openBlock(),r.createBlock("p",{key:1,class:"fieldGroupWrap_des",innerHTML:a.description},null,8,["innerHTML"])):r.createCommentVNode("v-if",!0),r.createVNode("div",$t,[r.renderSlot(e.$slots,"default")])])},Ct.__file="utils/components/FieldGroupWrap.vue";var Nt={formProps:{type:null},globalOptions:{type:null},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},customFormats:{type:Object,default:function(){return{}}},rootSchema:{type:Object,default:function(){return{}}},rootFormData:{type:null,default:function(){return{}}},curNodePath:{type:String,default:""},required:{type:Boolean,default:!1},needValidFieldGroup:{type:Boolean,default:!0}},Lt={class:"genFormIcon genFormIcon-down",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},Tt=r.createVNode("path",{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"},null,-1);var zt={render:function(e,t){return r.openBlock(),r.createBlock("svg",Lt,[Tt])},__file:"utils/icons/IconCaretDown.vue"},Vt={class:"genFormIcon genFormIcon-up",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},qt=r.createVNode("path",{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"},null,-1);var Bt={render:function(e,t){return r.openBlock(),r.createBlock("svg",Vt,[qt])},__file:"utils/icons/IconCaretUp.vue"},Mt={class:"genFormIcon genFormIcon-close",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},Ut=r.createVNode("path",{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1\n 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0\n 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"},null,-1);var Wt={render:function(e,t){return r.openBlock(),r.createBlock("svg",Mt,[Ut])},__file:"utils/icons/IconClose.vue"},Qt={class:"genFormIcon genFormIcon-plus",t:"1551322312294",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"10297","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"200",height:"200"},Ht=r.createVNode("path",{d:"M474 152m8 0l60 0q8 0 8 8l0 704q0 8-8 8l-60 0q-8 0-8-8l0-704q0-8 8-8Z","p-id":"10298"},null,-1),Kt=r.createVNode("path",{d:"M168 474m8 0l672 0q8 0 8 8l0 60q0 8-8 8l-672 0q-8 0-8-8l0-60q0-8 8-8Z","p-id":"10299"},null,-1);var Gt={render:function(e,t){return r.openBlock(),r.createBlock("svg",Qt,[Ht,Kt])},__file:"utils/icons/IconPlus.vue"},Jt={class:"genFormIcon genFormIcon-qs",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},Zt=r.createVNode("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 708c-22.1\n 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 0\n 0-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8\n 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6\n 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6\n 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z"},null,-1);var Yt={render:function(e,t){return r.openBlock(),r.createBlock("svg",Jt,[Zt])},__file:"utils/icons/IconQuestion.vue"},Xt={name:"Widget",props:{isFormData:{type:Boolean,default:!0},curValue:{type:null,default:0},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},widget:{type:[String,Function,Object],default:null},required:{type:Boolean,default:!1},emptyValue:{type:null,default:void 0},rootFormData:{type:null},curNodePath:{type:String,default:""},label:{type:String,default:""},width:{type:String,default:""},labelWidth:{type:String,default:""},description:{type:String,default:""},widgetAttrs:{type:Object,default:function(){return{}}},widgetClass:{type:Object,default:function(){return{}}},widgetStyle:{type:Object,default:function(){return{}}},fieldAttrs:{type:Object,default:function(){return{}}},fieldClass:{type:Object,default:function(){return{}}},fieldStyle:{type:Object,default:function(){return{}}},uiProps:{type:Object,default:function(){return{}}},formProps:null,getWidget:null,globalOptions:null,onChange:null},emits:["change"],inheritAttrs:!0,setup:function(e,t){var a=t.emit,o=r.inject("genFormProvide"),n=r.computed({get:function(){return e.isFormData?v(e.rootFormData,e.curNodePath):e.curValue},set:function(r){var t=""===r||null===r?e.emptyValue:r;e.isFormData&&b(e.rootFormData,e.curNodePath,t),a("change",t)}});e.uiProps.enumOptions&&e.uiProps.enumOptions.length>0&&void 0===n.value&&n.value!==e.uiProps.enumOptions[0]&&(e.schema.items?n.value=[]:e.required&&(n.value=e.uiProps.enumOptions[0].value));var s=r.ref(null);return"function"==typeof e.getWidget&&r.watch(s,(function(){e.getWidget.call(null,s.value)})),function(){var t=h(e.curNodePath),a=e.globalOptions.HELPERS.isMiniDes(e.formProps),l=e.description?r.h("div",{innerHTML:e.description,class:{genFromWidget_des:!0}}):null,u=e.globalOptions.COMPONENT_MAP,d=a&&l?r.h(P(u.popover),{style:{margin:"0 2px",fontSize:"16px",cursor:"pointer"},placement:"top",trigger:"hover"},{default:function(){return l},reference:function(){return r.h(Yt)}}):null,m=i(i({},e.fieldStyle),e.width?{width:e.width,flexBasis:e.width,paddingRight:"10px"}:{}),p=ht(e.label,e.widget&&o.value.fallbackLabel,e.curNodePath);return r.h(P(u.formItem),i(i(i({class:i(i({},e.fieldClass),{},{genFormItem:!0}),style:m},e.fieldAttrs),e.labelWidth?{labelWidth:e.labelWidth}:{}),e.isFormData?{prop:t?"__$$root":e.curNodePath,rules:[{validator:function(r,a,o){t&&(a=e.rootFormData);var n=Et({formData:a,schema:e.schema,uiSchema:e.uiSchema,customFormats:e.customFormats,errorSchema:e.errorSchema,required:e.required,propPath:e.curNodePath});if(n.length>0)return o?o(n[0].message):Promise.reject(n[0].message);var i=e.customRule;return i&&"function"==typeof i?i({field:e.curNodePath,value:a,rootFormData:e.rootFormData,callback:o}):o?o():Promise.resolve()},trigger:"blur"}]}:{}),i(i({error:function(e){return e.error?r.h("div",{class:{formItemErrorBox:!0},title:e.error},[e.error]):null}},p?{label:function(){return r.h("span",{class:{genFormLabel:!0,genFormItemRequired:e.required}},["".concat(p)].concat(c(d?[d]:[]),["".concat(e.formProps&&e.formProps.labelSuffix||"")]))}}:{}),{},{default:function(t){return[].concat(c(!a&&l?[l]:[]),c(e.widget?[r.h(P(e.widget),i(i(i({style:e.widgetStyle,class:e.widgetClass},e.widgetAttrs),e.uiProps),{},{modelValue:n.value,ref:s,"onUpdate:modelValue":function(r){var t=n.value;t!==r&&(n.value=r,e.onChange&&e.onChange(r,t))}},t))]:[]))}}))}}},ea={name:"ObjectField",props:Nt,setup:function(e){return function(){var t=e.curNodePath,a=at({schema:e.schema,uiSchema:e.uiSchema,curNodePath:t,rootFormData:e.rootFormData}),o=a.title,n=a.description,s=a.showTitle,u=a.showDescription,d=a.order,m=a.fieldClass,p=a.fieldAttrs,h=a.fieldStyle,g=a.onlyShowIfDependent,y=it(Object.keys(e.schema.properties||{}),d).map((function(a){var o=function(r){return Array.isArray(e.schema.required)&&!!~e.schema.required.indexOf(r)}(a),n=function(r){var t=!1,a=!1;return E(e.schema.dependencies)&&(a=Object.entries(e.schema.dependencies).some((function(a){var o=l(a,2),n=o[0],i=o[1],s=!(!Array.isArray(i)||!~i.indexOf(r));return t=t||s,s&&void 0!==v(e.rootFormData,e.curNodePath)[n]}))),{isDependency:t,curDependent:a}}(a),s=n.isDependency,c=n.curDependent;return s&&g&&!c?null:r.h(pa,i(i({key:a},e),{},{schema:e.schema.properties[a],uiSchema:e.uiSchema[a],errorSchema:e.errorSchema[a],required:o||c,curNodePath:f(t,a)}))}));return r.h(Ct,i({title:o,description:n,showTitle:s,showDescription:u,curNodePath:t,class:i({},m),style:h},p),{default:function(){return[].concat(c(y),c(e.needValidFieldGroup?[r.h(Xt,{key:"validateWidget-object",class:{validateWidget:!0,"validateWidget-object":!0},schema:Object.entries(e.schema).reduce((function(r,t){var a=l(t,2),o=a[0],n=a[1];return!1!==e.schema.additionalProperties&&["properties","id","$id"].includes(o)||(r[o]=n),r}),{}),uiSchema:e.uiSchema,errorSchema:e.errorSchema,curNodePath:t,rootFormData:e.rootFormData,globalOptions:e.globalOptions})]:[]))}})}}},ra={name:"StringField",props:Nt,setup:function(e,t){var a=t.attrs,o=r.computed((function(){var r=ct(e.schema)&&pt(e.schema,e.uiSchema,e.curNodePath,e.rootFormData),t=ot({schema:e.schema,uiSchema:e.uiSchema,curNodePath:e.curNodePath,rootFormData:e.rootFormData},(function(){var t="number"===e.schema.type||"integer"===e.schema.type;return{widget:r?e.globalOptions.WIDGET_MAP.common.select:e.globalOptions.WIDGET_MAP.formats[e.schema.format]||(t?e.globalOptions.WIDGET_MAP.types.number:e.globalOptions.WIDGET_MAP.types.string)}}));return r&&!t.uiProps.enumOptions&&(t.uiProps.enumOptions=r),t}));return function(){return r.h(Xt,i(i(i({},e),a),o.value))}}},ta={name:"NumberField",props:Nt,setup:function(e,t){var a=t.attrs;return function(){return r.h(ra,i(i({},e),a))}}},aa={name:"IntegerField",props:Nt,setup:function(e,t){var a=t.attrs;return function(){return r.h(ra,i(i({},e),a))}}},oa={name:"BooleanField",props:Nt,setup:function(e,t){var a=t.attrs;return function(){var t=e.schema,o=e.uiSchema,n=e.curNodePath,s=e.rootFormData,l=e.globalOptions,c=pt({enumNames:t.enumNames||["true","false"],enum:t.enum||[!0,!1]},o,n,s),u=ot({schema:t,uiSchema:o,curNodePath:n,rootFormData:s},(function(){return{widget:l.WIDGET_MAP.types.boolean}}));return u.uiProps.enumOptions=u.uiProps.enumOptions||c,r.h(Xt,i(i(i({},a),e),u))}}},na={name:"ArrayOrderList",emits:["arrayOperate"],props:{vNodeList:{type:Array,default:[]},tupleItemsLength:{type:Number,default:0},addable:{type:Boolean,default:!0},showIndexNumber:{type:Boolean,default:!1},sortable:{type:Boolean,default:!0},removable:{type:Boolean,default:!0},maxItems:{},minItems:{},globalOptions:null},setup:function(e,t){var a=t.emit,o=r.computed((function(){var r=e.addable,t=e.maxItems,a=e.vNodeList;return!!r&&(void 0===t||a.length<t)})),n=r.computed((function(){var r=e.removable,t=e.minItems,a=e.vNodeList;return!!r&&(void 0===t||a.length>t)}));return function(){return e.vNodeList.length<=0&&!e.addable?null:r.h("div",{class:{arrayOrderList:!0}},e.vNodeList.map((function(t,o){var s=t.key,l=t.vNode,c=e.tupleItemsLength+o,u=o+1;return r.h("div",{key:s,class:{arrayOrderList_item:!0}},[e.showIndexNumber?r.h("div",{class:{arrayListItem_index:!0}},u):null,r.h("div",{class:{arrayListItem_operateTool:!0}},[r.h("button",{style:i({},e.sortable?{}:{display:"none"}),class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-top":!0},type:"button",disabled:!e.sortable||0===o,onClick:function(){a("arrayOperate",{command:"moveUp",data:{index:c}})}},[r.h(Bt)]),r.h("button",{style:i({},e.sortable?{}:{display:"none"}),class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-bottom":!0},type:"button",disabled:!e.sortable||o===e.vNodeList.length-1,onClick:function(){a("arrayOperate",{command:"moveDown",data:{index:c}})}},[r.h(zt)]),r.h("button",{style:i({},e.removable?{}:{display:"none"}),class:{arrayListItem_btn:!0,"arrayListItem_btn-delete":!0},type:"button",disabled:!n.value,onClick:function(){a("arrayOperate",{command:"remove",data:{index:c}})}},[r.h(Wt)])]),r.h("div",{class:{arrayListItem_content:!0}},[l])])})).concat([r.h("p",{style:i({},o.value?{}:{display:"none"}),class:{arrayOrderList_bottomAddBtn:!0}},[r.h("button",{class:{bottomAddBtn:!0,"is-plain":!0,genFormBtn:!0},type:"button",onClick:function(){a("arrayOperate",{command:"add"})}},[r.h(Gt,{style:{marginRight:"5px"}}),e.maxItems?"( ".concat(e.vNodeList.length," / ").concat(e.maxItems," )"):""])])]))}}},ia={name:"ArrayFieldNormal",props:i(i({},Nt),{},{itemsFormData:{type:Array}}),setup:function(e,t){var a=t.attrs;return function(){var t=e.schema,o=e.uiSchema,n=e.curNodePath,s=e.rootFormData,l=e.itemsFormData,c=e.errorSchema,u=e.globalOptions,d=at({schema:t,uiSchema:o,curNodePath:n,rootFormData:s}),m=d.title,p=d.description,h=d.addable,v=d.showIndexNumber,g=d.sortable,y=d.removable,b=d.showTitle,P=d.showDescription,w=d.fieldClass,E=d.fieldAttrs,S=d.fieldStyle,x=l.map((function(a,s){var l=Xr({schema:t.items,uiSchema:o.items},s);return{key:a.key,vNode:r.h(pa,i(i({key:a.key},e),{},{schema:t.items,required:![].concat(t.items.type).includes("null"),uiSchema:i(i({},o.items),l),errorSchema:c.items,curNodePath:f(n,s)}))}}));return r.h(Ct,{title:m,description:p,showTitle:b,showDescription:P,curNodePath:n,class:w,attrs:E,style:S},{default:function(){return r.h(na,i(i({},a),{},{vNodeList:x,showIndexNumber:v,addable:h,sortable:g,removable:y,maxItems:t.maxItems,minItems:t.minItems,globalOptions:u}))}})}}},sa={name:"ArrayFieldMultiSelect",props:i({},Nt),setup:function(e,t){var a=t.attrs;return function(){var t=e.schema,o=e.rootSchema,n=e.uiSchema,s=e.curNodePath,l=e.rootFormData,c=e.globalOptions,u=pt(Jr(t.items,o),n,s,l),d=ot({schema:t,uiSchema:n,curNodePath:s,rootFormData:l},(function(){return{widget:c.WIDGET_MAP.common.checkboxGroup}}));return d.uiProps.multiple=!0,u&&!d.uiProps.enumOptions&&(d.uiProps.enumOptions=u),r.h(Xt,i(i(i({},a),e),d))}}},la={name:"ArrayFieldTuple",props:i(i({},Nt),{},{itemsFormData:{type:Array,default:function(){return[]}}}),emits:["arrayOperate"],setup:function(e,t){var a=t.emit;t.attrs;return function(){var r=!Array.isArray(e.itemsFormData);if(r||e.itemsFormData.length<e.schema.items.length){var t=Dt(e.schema,void 0,e.rootSchema);a("arrayOperate",r?{command:"setNewTarget",data:{newTarget:t}}:{command:"batchPush",data:{pushArray:t.slice(e.itemsFormData.length)}})}}(),function(){if(!Array.isArray(e.itemsFormData))return null;var t,o,n=e.schema,s=e.uiSchema,l=e.errorSchema,u=e.curNodePath,d=e.globalOptions,m=at({schema:n,uiSchema:s,curNodePath:u,rootFormData:e.rootFormData}),p=m.title,h=m.description,v=m.addable,g=m.showIndexNumber,y=m.sortable,b=m.removable,P=m.showTitle,w=m.showDescription,E=m.fieldClass,S=m.fieldAttrs,x=m.fieldStyle,F=(t=e.itemsFormData,o=e.schema.items.length-1,t.reduce((function(e,r,t){return e[t>o?1:0].push(r),e}),[[],[]])),O=F[0].map((function(t,a){return r.h(pa,i(i({key:t.key},e),{},{required:![].concat(n.items[a].type).includes("null"),schema:n.items[a],uiSchema:s.items?s.items[a]:{},errorSchema:l.items?l.items[a]:{},curNodePath:f(u,a)}))})),_=F[1].map((function(t,a){var o=Xr({schema:n.additionalItems,uiSchema:s.additionalItems},a);return{key:t.key,vNode:r.h(pa,i(i({key:t.key},e),{},{schema:n.additionalItems,required:![].concat(n.additionalItems.type).includes("null"),uiSchema:i(i({},s.additionalItems),o),errorSchema:l.additionalItems,curNodePath:f(e.curNodePath,a+n.items.length)}))}})),D=(void 0===v||v)&&mt(e.schema);return r.h(Ct,i(i({title:p,description:h,showTitle:P,showDescription:w,curNodePath:u},S),{},{class:E,style:x}),{default:function(){return[].concat(c(O),[r.h(na,{onArrayOperate:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return a.apply(void 0,["arrayOperate"].concat(r))},vNodeList:_,tupleItemsLength:n.items.length,addable:D,showIndexNumber:g,sortable:y,removable:b,maxItems:n.maxItems,minItems:n.minItems,globalOptions:d})])}})}}},ca={name:"ArrayFieldSpecialFormat",props:Nt,setup:function(e,t){var a=t.attrs,o=e.schema,n=e.uiSchema,s=e.curNodePath,l=e.rootFormData,c=ot({schema:i({"ui:widget":e.globalOptions.WIDGET_MAP.formats[o.format]},o),uiSchema:n,curNodePath:s,rootFormData:l});return function(){return r.h(Xt,i(i(i({},a),e),c))}}},ua={name:"ArrayField",props:Nt,setup:function(e){var t=function(){var r=v(e.rootFormData,e.curNodePath);return Array.isArray(r)?r:[]},o=r.ref(t().map((function(){return k()}))),n=r.computed((function(){return t()}));r.watch(n,(function(e,t){e!==t&&r.toRaw(e)!==r.toRaw(t)&&Array.isArray(e)&&(o.value=e.map((function(){return k()})))}),{deep:!0});var s=r.computed((function(){return n.value.map((function(e,r){return{key:o.value[r],value:e}}))})),c=function(r){var t=r.command,a=r.data,i={moveUp:function(e,r){!function(e,r){if(0===r)return!1;var t=[e[r],e[r-1]];e.splice.apply(e,[r-1,2].concat(t))}(e,r.index)},moveDown:function(e,r){!function(e,r){if(r===e.length-1)return!1;var t=e[r],a=[e[r+1],t];e.splice.apply(e,[r,2].concat(a))}(e,r.index)},remove:function(e,r){!function(e,r){e.splice(r,1).length}(e,r.index)},add:function(e,r){var t=r.newRowData;e.push(t)},batchPush:function(e,r){r.pushArray.forEach((function(r){e.push(r)}))},setNewTarget:function(e,r){b(r.formData,r.nodePath,r.newTarget)}}[t];if(!i)throw new Error("错误 - 未知的操作:[".concat(t,"]"));var s,l,c,u=a,d=a;"add"===t?(u={newRowData:(s=e.schema,l=e.rootSchema,c=s.items,ut(s)&&mt(s)&&(c=s.additionalItems),Dt(c,void 0,l))},d={newRowData:k()}):"batchPush"===t?d={pushArray:u.pushArray.map((function(e){return k()}))}:"setNewTarget"===t&&(u={formData:e.rootFormData,nodePath:e.curNodePath,newTarget:u.newTarget},d={formData:o,nodePath:"value",newTarget:u.newTarget.map((function(e){return k()}))}),i.apply(null,[o.value,d]),i.apply(null,[n.value,u])};return function(){var t=e.schema,o=e.uiSchema,n=e.rootSchema,u=e.rootFormData,d=e.curNodePath,m=e.globalOptions;if(!t.hasOwnProperty("items"))throw new Error("[".concat(t,"] 请先定义 items属性"));if(dt(t,n))return r.h(sa,i(i({},e),{},{class:a({},A(sa.name),!0)}));if(t.format||t["ui:widget"]||o["ui:widget"])return r.h(ca,i(i({},e),{},{class:a({},A(ca.name),!0)}));var p=ut(t)?la:ia;return r.h("div",[r.h(p,i(i({itemsFormData:s.value},e),{},{onArrayOperate:c,class:a({},A(p.name),!0)})),e.needValidFieldGroup?r.h(Xt,{key:"validateWidget-array",class:{validateWidget:!0,"validateWidget-array":!0},schema:Object.entries(t).reduce((function(e,r){var t=l(r,2),a=t[0],o=t[1];return"items"!==a&&(e[a]=o),e}),{}),uiSchema:o,errorSchema:e.errorSchema,curNodePath:d,rootFormData:u,globalOptions:m}):null])}}},da={name:"SelectLinkageField",props:i(i({},Nt),{},{combiningType:{type:String,default:"anyOf"},selectList:{type:Array,require:!0}}),setup:function(e){var t,o,n=r.ref((t=v(e.rootFormData,e.curNodePath),0!==(o=xt(t,e.selectList,e.rootSchema,!0))?o:e.curSelectIndex||0)),c=function(){var t=ot({schema:e.schema["".concat(e.combiningType,"Select")]||{},uiSchema:e.uiSchema["".concat(e.combiningType,"Select")]||{},curNodePath:e.curNodePath,rootFormData:e.rootFormData},(function(){return{widget:"SelectWidget"}}));if(t.label=t.label||e.schema.title,t.description=t.description||e.schema.description,!t.uiProps.enumOptions){var o=e.uiSchema[e.combiningType]||[];t.uiProps.enumOptions=e.selectList.map((function(e,r){return{label:at({schema:e,uiSchema:o[r],containsSpec:!1}).title||"选项 ".concat(r+1),value:r}}))}return r.h(Xt,i(i({key:"fieldSelect_".concat(e.combiningType),class:a({},"fieldSelect_".concat(e.combiningType),!0),isFormData:!1,curValue:n.value,globalOptions:e.globalOptions},t),{},{onChange:function(e){n.value=e}}))};return r.watch(n,(function(r,t){var a=v(e.rootFormData,e.curNodePath),o=Dt(e.selectList[r],void 0,e.rootSchema),n=Object.prototype.hasOwnProperty;if(E(a)){var i=Jr(e.selectList[t],e.rootSchema);if("object"===F(i))for(var s in i.properties)n.call(i.properties,s)&&!n.call(o,s)&&y(a,s)}E(o)?Object.entries(o).forEach((function(e){var r=l(e,2),t=r[0],o=r[1];void 0!==o&&b(a,t,o)})):b(e.rootFormData,e.curNodePath,o||a)})),function(){var t,o=e.curNodePath,l=p(o),u=null;if(("object"===e.schema.type||e.schema.properties)&&!function(e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!1;return!0}(e.schema.properties)){var d,h=Object.assign({},e.schema);delete h[e.combiningType],u=r.h(pa,i(i({key:"origin_".concat(e.combiningType),class:(d={},a(d,"".concat(e.combiningType,"_originBox"),!0),a(d,"".concat(l,"-originBox"),!0),d)},e),{},{schema:h}))}var f=[c()],v=e.selectList[n.value];if(v){var g=e.schema,y=e.combiningType,b="".concat(e.combiningType,"Select");g.properties,g[y],g[b];var P=s(g,["properties",y,b].map(m));v=Object.assign({},P,v);var w=j(at({schema:e.schema,uiSchema:e.uiSchema,containsSpec:!1,curNodePath:o,rootFormData:e.rootFormData}),(function(r){return r===e.combiningType?void 0:"ui:".concat(r)})),E=j(nt({schema:e.schema,uiSchema:e.uiSchema,errorSchema:e.errorSchema}),(function(r){return r===e.combiningType?void 0:"err:".concat(r)}));f.push(r.h(pa,i(i({key:"appendSchema_".concat(e.combiningType)},e),{},{schema:i({"ui:showTitle":!1,"ui:showDescription":!1},v),required:e.required,uiSchema:i(i({},w),(e.uiSchema[e.combiningType]||[])[n.value]),errorSchema:i(i({},E),(e.errorSchema[e.combiningType]||[])[n.value])})))}return f.push(r.h(Xt,{key:"validateWidget-".concat(e.combiningType),class:a({validateWidget:!0},"validateWidget-".concat(e.combiningType),!0),schema:e.schema,uiSchema:e.uiSchema,errorSchema:e.errorSchema,curNodePath:e.curNodePath,rootFormData:e.rootFormData,globalOptions:e.globalOptions})),r.h("div",[u,r.h("div",{key:"appendBox_".concat(e.combiningType),class:(t={appendCombining_box:!0},a(t,"".concat(e.combiningType,"_appendBox"),!0),a(t,"".concat(l,"-appendBox"),!0),t)},f)])}}},ma={array:ua,boolean:oa,integer:aa,number:ta,object:ea,string:ra,null:{render:function(){return null}},anyOf:{name:"AnyOfField",setup:function(e,t){var a=t.attrs,o=t.slots;return function(){return r.h(da,i(i({},a),{},{combiningType:"anyOf",selectList:a.schema.anyOf}),o)}}},oneOf:{name:"oneOfField",setup:function(e,t){var a=t.attrs,o=t.slots;return function(){return r.h(da,i(i({},a),{},{combiningType:"oneOf",selectList:a.schema.oneOf}),o)}}}},pa={name:"SchemaField",props:Nt,setup:function(e){return function(){var t,o=Jr(e.schema,e.rootSchema),n=i(i({},e),{},{schema:o});if(0===Object.keys(o).length)return null;var s,l,c=rt(ma,n),u=c.field,d=c.fieldProps,m=et({schema:o,uiSchema:e.uiSchema,curNodePath:e.curNodePath,rootFormData:e.rootFormData}),h=p(e.curNodePath);return o.anyOf&&o.anyOf.length>0&&!ct(o)?r.h(P(ma.anyOf),i({class:(s={},a(s,"".concat(h,"-anyOf"),!0),a(s,"fieldItem",!0),a(s,"anyOfField",!0),s)},n)):o.oneOf&&o.oneOf.length>0&&!ct(o)?r.h(P(ma.oneOf),i({class:(l={},a(l,"".concat(h,"-oneOf"),!0),a(l,"fieldItem",!0),a(l,"oneOfField",!0),l)},n)):u&&!m?r.h(P(u),i(i({},n),{},{fieldProps:d,class:(t={},a(t,A(u.name)||u,!0),a(t,"hiddenWidget",m),a(t,"fieldItem",!0),a(t,h,!0),t)})):null}}};var ha={name:"CheckboxesWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}};ha.render=function(e,t,a,o,n,i){var s=r.resolveComponent("el-checkbox"),l=r.resolveComponent("el-checkbox-group");return r.openBlock(),r.createBlock(l,e.$attrs,{default:r.withCtx((function(){return[(r.openBlock(!0),r.createBlock(r.Fragment,null,r.renderList(a.enumOptions,(function(e,t){return r.openBlock(),r.createBlock(s,{key:t,label:e.value},{default:r.withCtx((function(){return[r.createTextVNode(r.toDisplayString(e.label),1)]})),_:2},1032,["label"])})),128))]})),_:1},16)},ha.__file="src/config/widgets/CheckboxesWidget/index.vue";var fa={name:"RadioWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}};fa.render=function(e,t,a,o,n,i){var s=r.resolveComponent("el-radio"),l=r.resolveComponent("el-radio-group");return r.openBlock(),r.createBlock(l,e.$attrs,{default:r.withCtx((function(){return[(r.openBlock(!0),r.createBlock(r.Fragment,null,r.renderList(a.enumOptions,(function(e,t){return r.openBlock(),r.createBlock(s,{key:t,label:e.value},{default:r.withCtx((function(){return[r.createTextVNode(r.toDisplayString(e.label),1)]})),_:2},1032,["label"])})),128))]})),_:1},16)},fa.__file="src/config/widgets/RadioWidget/index.vue";var va={name:"SelectWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}};function ga(e){return null===e||""===e||Array.isArray(e)&&e.every((function(e){return""===e}))}va.render=function(e,t,a,o,n,i){var s=r.resolveComponent("el-option"),l=r.resolveComponent("el-select");return r.openBlock(),r.createBlock(l,e.$attrs,{default:r.withCtx((function(){return[(r.openBlock(!0),r.createBlock(r.Fragment,null,r.renderList(a.enumOptions,(function(e,t){return r.openBlock(),r.createBlock(s,{key:t,label:e.label,value:e.value},null,8,["label","value"])})),128))]})),_:1},16)},va.__file="src/config/widgets/SelectWidget/index.vue";var ya=function(e){var r=C(e,!1),t=r.year,a=r.month,o=r.day;return"".concat(t,"-").concat(a,"-").concat(o)},ba=function(e){if(e instanceof Date)return e;if("string"==typeof e){var r=l(e.split(":"),3),t=r[0],a=r[1],o=r[2],n=new Date;return n.setHours(+t),n.setMinutes(+a),n.setSeconds(+o),n}},Pa={CheckboxesWidget:ha,RadioWidget:fa,SelectWidget:va,TimePickerWidget:{name:"TimePickerWidget",inheritAttrs:!1,props:{modelValue:{default:null,type:null}},setup:function(e,t){var a=t.attrs,o=t.slots,n=r.ref(ba(e.modelValue)),s=e.modelValue;return r.watch((function(){return e.modelValue}),(function(e){e!==s&&(n.value=ba(e))})),function(){return r.h(P("el-time-picker"),i(i({},a),{},{modelValue:n.value,"onUpdate:modelValue":function(e){var r,t,o,i;n.value=e,s=null===e?void 0:(r=C(e,!0),t=r.hour,o=r.minute,i=r.second,"".concat(t,":").concat(o,":").concat(i)),a["onUpdate:modelValue"].apply(a,[s])}}),o)}}},DatePickerWidget:{name:"DatePickerWidget",inheritAttrs:!1,setup:function(e,t){var a=t.attrs,o=t.slots;return function(){var e=a||{},t=e.isNumberValue,n=e.isRange,l=s(e,["isNumberValue","isRange"]);return r.h(P("el-date-picker"),i(i({type:n?"daterange":"date"},l),{},{"onUpdate:modelValue":function(e){var r;r=n?ga(e)?[]:e.map((function(e){return t?new Date(e).valueOf():ya(e)})):ga(e)?void 0:t?new Date(e).valueOf():ya(e),a["onUpdate:modelValue"].apply(a,[r])}}),o)}}},DateTimePickerWidget:{name:"DateTimePickerWidget",inheritAttrs:!1,setup:function(e,t){var a=t.attrs,o=t.slots;return function(){var e=a||{},t=e.isNumberValue,n=e.isRange,l=s(e,["isNumberValue","isRange"]);return r.h(P("el-date-picker"),i(i({type:n?"datetimerange":"datetime"},l),{},{"onUpdate:modelValue":function(e){var r=function(e,r,t){return e?null===t?[]:t.map((function(e){return new Date(e)[r?"valueOf":"toISOString"]()})):null===t?void 0:new Date(t)[r?"valueOf":"toISOString"]()}(n,t,e);a["onUpdate:modelValue"].apply(a,[r])}}),o)}}},UploadWidget:{name:"UploadWidget",props:{modelValue:{default:null,type:[String,Array]},responseFileUrl:{default:function(){return function(e){return e?e.url||e.data&&e.data.url:""}},type:[Function]},btnText:{type:String,default:"点击上传"},slots:{type:null,default:null}},setup:function(e,t){var a=t.attrs,o=t.emit,n=e.modelValue,s=Array.isArray(n),l=a.fileList||(s?n.map((function(e,r){return{name:"已上传文件(".concat(r+1,")"),url:e}})):n?[{name:"已上传文件",url:n}]:[]),c=r.ref(l),u=function(r){return r&&(r.response&&e.responseFileUrl(r.response)||r.url)||""},d=function(e){var r;if(s)r=e.length?e.reduce((function(e,r){var t=u(r);return t&&e.push(t),e}),[]):[];else{var t=e[e.length-1];r=u(t)}o("update:modelValue",r)},m=r.getCurrentInstance().appContext.config.globalProperties;return function(){var t=i(i({fileList:c.value,"on-exceed":function(){m.$message&&m.$message.warning("超出文件上传数")},"on-error":function(){m.$message&&m.$message.error("文件上传失败")},"on-preview":function(e){var r=u(e);r&&function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_blank",t=document.createElement("a");t.style.display="none",t.target=r,t.href=e,document.body.appendChild(t),t.click(),document.body.removeChild(t)}(r)}},a),{},{"on-remove":function(e,r){d(r),a["on-remove"]&&a["on-remove"](e,r)},"on-success":function(e,r,t){d(t),a["on-success"]&&a["on-success"](e,r,t)}});s||(t.limit=1);var o=i({default:function(){return r.h(P("el-button"),{type:"primary"},{default:function(){return e.btnText}})}},e.slots||{});return r.h(P("el-upload"),t,o)}}}},wa={types:{boolean:"el-switch",string:"el-input",number:"el-input-number",integer:"el-input-number"},formats:{color:"el-color-picker",time:Pa.TimePickerWidget,date:Pa.DatePickerWidget,"date-time":Pa.DateTimePickerWidget},common:{select:Pa.SelectWidget,radioGroup:Pa.RadioWidget,checkboxGroup:Pa.CheckboxesWidget},widgetComponents:Pa};kt(".genFromComponent.el-form--label-top .el-form-item__label{line-height:26px;padding-bottom:6px;font-size:14px}.genFromComponent .el-checkbox,.genFromComponent .el-color-picker{vertical-align:top}");var Ea={WIDGET_MAP:wa,COMPONENT_MAP:{form:r.defineComponent({inheritAttrs:!1,setup:function(e,t){var a=t.attrs,o=t.slots,n=r.ref(null);return a.setFormRef&&r.onMounted((function(){a.setFormRef(n.value)})),function(){a.setFormRef;var e=s(a,["setFormRef"]);return r.h(P("el-form"),i({ref:n},e),o)}}}),formItem:"el-form-item",button:"el-button",popover:"el-popover"},HELPERS:{isMiniDes:function(e){return e&&["left","right"].includes(e.labelPosition)}}},Sa=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={name:"VueForm",props:jt,emits:["update:modelValue","change","cancel","submit","validation-failed","form-mounted"],setup:function(o,n){var c=n.slots,u=n.emit;if(!t.installed&&e.WIDGET_MAP.widgetComponents){var d=r.getCurrentInstance();Object.entries(e.WIDGET_MAP.widgetComponents).forEach((function(e){var r=l(e,2),t=r[0],a=r[1];return d.appContext.app.component(t,a)})),t.installed=!0}r.provide("genFormProvide",r.computed((function(){return{fallbackLabel:o.fallbackLabel}})));var m=r.ref(Dt(o.schema,o.modelValue,o.schema)),p=r.computed((function(){return i({show:!0,okBtn:"保存",cancelBtn:"取消"},o.formFooter)})),h=null,f=function(e,r){u("update:modelValue",e),u("change",{newValue:e,oldValue:r})},v=function(e,r){if(!O(e,r)){var t=Dt(o.schema,o.modelValue,o.schema);O(m.value,t)||(m.value=t)}};r.watch(m,(function(e,r){f(e,r)}),{deep:!0}),r.watch((function(){return o.schema}),(function(e,r){v(e,r)})),r.watch((function(){return o.modelValue}),(function(e,r){v(e,r)})),f(m.value,o.modelValue);return function(){var t,n=o.formProps,l=n.layoutColumn,d=void 0===l?1:l,f=n.inlineFooter,v=n.inline,g=s(n,["layoutColumn","inlineFooter","inline"]),y={schema:o.schema,uiSchema:o.uiSchema,errorSchema:o.errorSchema,customFormats:o.customFormats,customRule:o.customRule,rootSchema:o.schema,rootFormData:m.value,curNodePath:"",globalOptions:e,formProps:i({labelSuffix:":",labelPosition:"top"},g)};return r.h(P(e.COMPONENT_MAP.form),i({class:(t={genFromComponent:!0,formInlineFooter:f,formInline:v},a(t,"genFromComponent_".concat(o.schema.id,"Form"),!!o.schema.id),a(t,"layoutColumn",!v),a(t,"layoutColumn-".concat(d),!v),t),setFormRef:function(e){h=e,u("form-mounted",e)},model:m},y.formProps),{default:function(){return[r.h(pa,y),c.default?c.default({formData:m,formRefFn:function(){return h}}):p.value.show?r.h(It,{globalOptions:e,okBtn:p.value.okBtn,cancelBtn:p.value.cancelBtn,formItemAttrs:p.value.formItemAttrs,onCancel:function(){u("cancel")},onSubmit:function(){(h.$$validate||h.validate)((function(e,r){return e?u("submit",m):u("validation-failed",r)}))}}):[]]}})}},install:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.component(r.name||t.name,t)}};return t}(Ea);e.SchemaField=pa,e.default=Sa,e.fieldProps=Nt,e.formUtils=ft,e.getDefaultFormState=Dt,e.globalOptions=Ea,e.i18n=Mr,e.schemaValidate=Ft,e.vueUtils=w,Object.defineProperty(e,"__esModule",{value:!0})})); +!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var a=r.length-1,o=1;o<a;++o)r[o]=r[o].slice(1,-1);return r[a]=r[a].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function a(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function n(e){var a=r("[0-9]","[A-Fa-f]"),o=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),n="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",i=r("[\\:\\/\\?\\#\\[\\]\\@]",n),s=e?"[\\uE000-\\uF8FF]":"[]",l=r("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t("[A-Za-z]"+r("[A-Za-z]","[0-9]","[\\+\\-\\.]")+"*"),t(t(o+"|"+r(l,n,"[\\:]"))+"*");var c=t(t("25[0-5]")+"|"+t("2[0-4][0-9]")+"|"+t("1[0-9][0-9]")+"|"+t("0?[1-9][0-9]")+"|0?0?[0-9]"),u=t(c+"\\."+c+"\\."+c+"\\."+c),d=t(a+"{1,4}"),m=t(t(d+"\\:"+d)+"|"+u),p=t(t(d+"\\:")+"{6}"+m),h=t("\\:\\:"+t(d+"\\:")+"{5}"+m),f=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+m),v=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+m),g=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+m),y=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+m),b=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+m),P=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),w=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),E=t([p,h,f,v,g,y,b,P,w].join("|")),S=t(t(l+"|"+o)+"+");t("[vV]"+a+"+\\."+r(l,n,"[\\:]")+"+"),t(t(o+"|"+r(l,n))+"*");var x=t(o+"|"+r(l,n,"[\\:\\@]"));return t(t(o+"|"+r(l,n,"[\\@]"))+"+"),t(t(x+"|"+r("[\\/\\?]",s))+"*"),{NOT_SCHEME:new RegExp(r("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,n),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,n),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,n),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,n),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,n,"[\\:\\@\\/\\?]",s),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,n,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,n),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,i),"g"),PCT_ENCODED:new RegExp(o,"g"),IPV4ADDRESS:new RegExp("^("+u+")$"),IPV6ADDRESS:new RegExp("^\\[?("+E+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+S+")")+"?\\]?$")}}var i=n(!1),s=n(!0),l=function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,r){var t=[],a=!0,o=!1,n=void 0;try{for(var i,s=e[Symbol.iterator]();!(a=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);a=!0);}catch(e){o=!0,n=e}finally{try{!a&&s.return&&s.return()}finally{if(o)throw n}}return t}(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=2147483647,u=/^xn--/,d=/[^\0-\x7E]/,m=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,f=String.fromCharCode;function v(e){throw new RangeError(p[e])}function g(e,r){var t=e.split("@"),a="";t.length>1&&(a=t[0]+"@",e=t[1]);var o=function(e,r){for(var t=[],a=e.length;a--;)t[a]=r(e[a]);return t}((e=e.replace(m,".")).split("."),r).join(".");return a+o}function y(e){for(var r=[],t=0,a=e.length;t<a;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<a){var 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}var b=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},P=function(e,r,t){var a=0;for(e=t?h(e/700):e>>1,e+=h(e/r);e>455;a+=36)e=h(e/35);return h(a+36*e/(e+38))},w=function(e){var r,t=[],a=e.length,o=0,n=128,i=72,s=e.lastIndexOf("-");s<0&&(s=0);for(var l=0;l<s;++l)e.charCodeAt(l)>=128&&v("not-basic"),t.push(e.charCodeAt(l));for(var u=s>0?s+1:0;u<a;){for(var d=o,m=1,p=36;;p+=36){u>=a&&v("invalid-input");var f=(r=e.charCodeAt(u++))-48<10?r-22:r-65<26?r-65:r-97<26?r-97:36;(f>=36||f>h((c-o)/m))&&v("overflow"),o+=f*m;var g=p<=i?1:p>=i+26?26:p-i;if(f<g)break;var y=36-g;m>h(c/y)&&v("overflow"),m*=y}var b=t.length+1;i=P(o-d,b,0==d),h(o/b)>c-n&&v("overflow"),n+=h(o/b),o%=b,t.splice(o++,0,n)}return String.fromCodePoint.apply(String,t)},E=function(e){var r=[],t=(e=y(e)).length,a=128,o=0,n=72,i=!0,s=!1,l=void 0;try{for(var u,d=e[Symbol.iterator]();!(i=(u=d.next()).done);i=!0){var m=u.value;m<128&&r.push(f(m))}}catch(e){s=!0,l=e}finally{try{!i&&d.return&&d.return()}finally{if(s)throw l}}var p=r.length,g=p;for(p&&r.push("-");g<t;){var w=c,E=!0,S=!1,x=void 0;try{for(var F,O=e[Symbol.iterator]();!(E=(F=O.next()).done);E=!0){var _=F.value;_>=a&&_<w&&(w=_)}}catch(e){S=!0,x=e}finally{try{!E&&O.return&&O.return()}finally{if(S)throw x}}var D=g+1;w-a>h((c-o)/D)&&v("overflow"),o+=(w-a)*D,a=w;var k=!0,j=!1,I=void 0;try{for(var C,A=e[Symbol.iterator]();!(k=(C=A.next()).done);k=!0){var R=C.value;if(R<a&&++o>c&&v("overflow"),R==a){for(var $=o,N=36;;N+=36){var L=N<=n?1:N>=n+26?26:N-n;if($<L)break;var T=$-L,z=36-L;r.push(f(b(L+T%z,0))),$=h(T/z)}r.push(f(b($,0))),n=P(o,D,g==p),o=0,++g}}}catch(e){j=!0,I=e}finally{try{!k&&A.return&&A.return()}finally{if(j)throw I}}++o,++a}return r.join("")},S=function(e){return g(e,(function(e){return d.test(e)?"xn--"+E(e):e}))},x=function(e){return g(e,(function(e){return u.test(e)?w(e.slice(4).toLowerCase()):e}))},F={};function O(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function _(e){for(var r="",t=0,a=e.length;t<a;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(a-t>=6){var n=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&n)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(a-t>=9){var i=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function D(e,r){function t(e){var t=_(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,O).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,O).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,O).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,O).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,O).replace(r.PCT_ENCODED,o)),e}function k(e){return e.replace(/^0*(.*)/,"$1")||"0"}function j(e,r){var t=e.match(r.IPV4ADDRESS)||[],a=l(t,2)[1];return a?a.split(".").map(k).join("."):e}function I(e,r){var t=e.match(r.IPV6ADDRESS)||[],a=l(t,3),o=a[1],n=a[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),c=s[0],u=s[1],d=u?u.split(":").map(k):[],m=c.split(":").map(k),p=r.IPV4ADDRESS.test(m[m.length-1]),h=p?7:8,f=m.length-h,v=Array(h),g=0;g<h;++g)v[g]=d[g]||m[f+g]||"";p&&(v[h-1]=j(v[h-1],r));var y=v.reduce((function(e,r,t){if(!r||"0"===r){var a=e[e.length-1];a&&a.index+a.length===t?a.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(y&&y.length>1){var P=v.slice(0,y.index),w=v.slice(y.index+y.length);b=P.join(":")+"::"+w.join(":")}else b=v.join(":");return n&&(b+="%"+n),b}return e}var C=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,A=void 0==="".match(/(){0}/)[1];function R(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},a=!1!==r.iri?s:i;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(C);if(o){A?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=I(j(t.host,a),a)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var n=F[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||n&&n.unicodeSupport)D(t,a);else{if(t.host&&(r.domainHost||n&&n.domainHost))try{t.host=S(t.host.replace(a.PCT_ENCODED,_).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}D(t,i)}n&&n.parse&&n.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function $(e,r){var t=!1!==r.iri?s:i,a=[];return void 0!==e.userinfo&&(a.push(e.userinfo),a.push("@")),void 0!==e.host&&a.push(I(j(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(a.push(":"),a.push(String(e.port))),a.length?a.join(""):void 0}var N=/^\.\.?\//,L=/^\/\.(\/|$)/,T=/^\/\.\.(\/|$)/,z=/^\/?(?:.|\n)*?(?=\/|$)/;function V(e){for(var r=[];e.length;)if(e.match(N))e=e.replace(N,"");else if(e.match(L))e=e.replace(L,"/");else if(e.match(T))e=e.replace(T,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(z);if(!t)throw new Error("Unexpected dot segment condition");var a=t[0];e=e.slice(a.length),r.push(a)}return r.join("")}function q(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?s:i,a=[],o=F[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?x(e.host):S(e.host.replace(t.PCT_ENCODED,_).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}D(e,t),"suffix"!==r.reference&&e.scheme&&(a.push(e.scheme),a.push(":"));var n=$(e,r);if(void 0!==n&&("suffix"!==r.reference&&a.push("//"),a.push(n),e.path&&"/"!==e.path.charAt(0)&&a.push("/")),void 0!==e.path){var l=e.path;r.absolutePath||o&&o.absolutePath||(l=V(l)),void 0===n&&(l=l.replace(/^\/\//,"/%2F")),a.push(l)}return void 0!==e.query&&(a.push("?"),a.push(e.query)),void 0!==e.fragment&&(a.push("#"),a.push(e.fragment)),a.join("")}function B(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],o={};return a||(e=R(q(e,t),t),r=R(q(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=V(r.path||""),o.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=V(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=V(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=V(o.path)),o.query=r.query):(o.path=e.path,void 0!==r.query?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function M(e,r){return e&&e.toString().replace(r&&r.iri?s.PCT_ENCODED:i.PCT_ENCODED,_)}var U={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},W={scheme:"https",domainHost:U.domainHost,parse:U.parse,serialize:U.serialize};function Q(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var H={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=Q(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(Q(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),a=l(t,2),o=a[0],n=a[1];e.path=o&&"/"!==o?o:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}},K={scheme:"wss",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize},G={},J="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Z="[0-9A-Fa-f]",Y=t(t("%[EFef]"+Z+"%"+Z+Z+"%"+Z+Z)+"|"+t("%[89A-Fa-f]"+Z+"%"+Z+Z)+"|"+t("%"+Z+Z)),X=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),ee=new RegExp(J,"g"),re=new RegExp(Y,"g"),te=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',X),"g"),ae=new RegExp(r("[^]",J,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),oe=ae;function ne(e){var r=_(e);return r.match(ee)?r:e}var ie={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,n={},i=t.query.split("&"),s=0,l=i.length;s<l;++s){var c=i[s].split("=");switch(c[0]){case"to":for(var u=c[1].split(","),d=0,m=u.length;d<m;++d)a.push(u[d]);break;case"subject":t.subject=M(c[1],r);break;case"body":t.body=M(c[1],r);break;default:o=!0,n[M(c[0],r)]=M(c[1],r)}}o&&(t.headers=n)}t.query=void 0;for(var p=0,h=a.length;p<h;++p){var f=a[p].split("@");if(f[0]=M(f[0]),r.unicodeSupport)f[1]=M(f[1],r).toLowerCase();else try{f[1]=S(M(f[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}a[p]=f.join("@")}return t},serialize:function(e,r){var t,a=e,n=null!=(t=e.to)?t instanceof Array?t:"number"!=typeof t.length||t.split||t.setInterval||t.call?[t]:Array.prototype.slice.call(t):[];if(n){for(var i=0,s=n.length;i<s;++i){var l=String(n[i]),c=l.lastIndexOf("@"),u=l.slice(0,c).replace(re,ne).replace(re,o).replace(te,O),d=l.slice(c+1);try{d=r.iri?x(d):S(M(d,r).toLowerCase())}catch(e){a.error=a.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=u+"@"+d}a.path=n.join(",")}var m=e.headers=e.headers||{};e.subject&&(m.subject=e.subject),e.body&&(m.body=e.body);var p=[];for(var h in m)m[h]!==G[h]&&p.push(h.replace(re,ne).replace(re,o).replace(ae,O)+"="+m[h].replace(re,ne).replace(re,o).replace(oe,O));return p.length&&(a.query=p.join("&")),a}},se=/^([^\:]+)\:(.*)/,le={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(se),a=e;if(t){var o=r.scheme||a.scheme||"urn",n=t[1].toLowerCase(),i=t[2],s=o+":"+(r.nid||n),l=F[s];a.nid=n,a.nss=i,a.path=void 0,l&&(a=l.parse(a,r))}else a.error=a.error||"URN can not be parsed.";return a},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",a=e.nid,o=t+":"+(r.nid||a),n=F[o];n&&(e=n.serialize(e,r));var i=e,s=e.nss;return i.path=(a||r.nid)+":"+s,i}},ce=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ue={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match(ce)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};F[U.scheme]=U,F[W.scheme]=W,F[H.scheme]=H,F[K.scheme]=K,F[ie.scheme]=ie,F[le.scheme]=le,F[ue.scheme]=ue,e.SCHEMES=F,e.pctEncChar=O,e.pctDecChars=_,e.parse=R,e.removeDotSegments=V,e.serialize=q,e.resolveComponents=B,e.resolve=function(e,r,t){var a=function(e,r){var t=e;if(r)for(var a in r)t[a]=r[a];return t}({scheme:"null"},t);return q(B(R(e,a),R(r,a),a,!0),a)},e.normalize=function(e,r){return"string"==typeof e?e=q(R(e,r),r):"object"===a(e)&&(e=R(q(e,r),r)),e},e.equal=function(e,r,t){return"string"==typeof e?e=q(R(e,t),t):"object"===a(e)&&(e=q(e,t)),"string"==typeof r?r=q(R(r,t),t):"object"===a(r)&&(r=q(r,t)),e===r},e.escapeComponent=function(e,r){return e&&e.toString().replace(r&&r.iri?s.ESCAPE:i.ESCAPE,O)},e.unescapeComponent=M,Object.defineProperty(e,"__esModule",{value:!0})}(r)}));(z=V)&&z.__esModule&&Object.prototype.hasOwnProperty.call(z,"default")&&z.default;var q=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 a,o,n;if(Array.isArray(r)){if((a=r.length)!=t.length)return!1;for(o=a;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((a=(n=Object.keys(r)).length)!==Object.keys(t).length)return!1;for(o=a;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,n[o]))return!1;for(o=a;0!=o--;){var i=n[o];if(!e(r[i],t[i]))return!1}return!0}return r!=r&&t!=t},B={copy:function(e,r){for(var t in r=r||{},e)r[t]=e[t];return r},checkDataType:M,checkDataTypes:function(e,r,t){switch(e.length){case 1:return M(e[0],r,t,!0);default:var a="",o=W(e);for(var n in o.array&&o.object&&(a=o.null?"(":"(!"+r+" || ",a+="typeof "+r+' !== "object")',delete o.null,delete o.array,delete o.object),o.number&&delete o.integer,o)a+=(a?" && ":"")+M(n,r,t,!0);return a}},coerceToTypes:function(e,r){if(Array.isArray(r)){for(var t=[],a=0;a<r.length;a++){var o=r[a];(U[o]||"array"===e&&"array"===o)&&(t[t.length]=o)}if(t.length)return t}else{if(U[r])return[r];if("array"===e&&"array"===r)return["array"]}},toHash:W,getProperty:K,escapeQuotes:G,equal:q,ucs2length:function(e){for(var r,t=0,a=e.length,o=0;o<a;)t++,(r=e.charCodeAt(o++))>=55296&&r<=56319&&o<a&&56320==(64512&(r=e.charCodeAt(o)))&&o++;return t},varOccurences:function(e,r){r+="[^0-9]";var t=e.match(new RegExp(r,"g"));return t?t.length:0},varReplace:function(e,r,t){return r+="([^0-9])",t=t.replace(/\$/g,"$$$$"),e.replace(new RegExp(r,"g"),t+"$1")},schemaHasRules:function(e,r){if("boolean"==typeof e)return!e;for(var t in e)if(r[t])return!0},schemaHasRulesExcept:function(e,r,t){if("boolean"==typeof e)return!e&&"not"!=t;for(var a in e)if(a!=t&&r[a])return!0},schemaUnknownRules:function(e,r){if("boolean"==typeof e)return;for(var t in e)if(!r[t])return t},toQuotedString:J,getPathExpr:function(e,r,t,a){return X(e,t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'")},getPath:function(e,r,t){var a=J(t?"/"+ee(r):K(r));return X(e,a)},getData:function(e,r,t){var a,o,n,i;if(""===e)return"rootData";if("/"==e[0]){if(!Z.test(e))throw new Error("Invalid JSON-pointer: "+e);o=e,n="rootData"}else{if(!(i=e.match(Y)))throw new Error("Invalid JSON-pointer: "+e);if(a=+i[1],"#"==(o=i[2])){if(a>=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(n="data"+(r-a||""),!o)return n}for(var s=n,l=o.split("/"),c=0;c<l.length;c++){var u=l[c];u&&(n+=K(re(u)),s+=" && "+n)}return s},unescapeFragment:function(e){return re(decodeURIComponent(e))},unescapeJsonPointer:re,escapeFragment:function(e){return encodeURIComponent(ee(e))},escapeJsonPointer:ee};function M(e,r,t,a){var o=a?" !== ":" === ",n=a?" || ":" && ",i=a?"!":"",s=a?"":"!";switch(e){case"null":return r+o+"null";case"array":return i+"Array.isArray("+r+")";case"object":return"("+i+r+n+"typeof "+r+o+'"object"'+n+s+"Array.isArray("+r+"))";case"integer":return"(typeof "+r+o+'"number"'+n+s+"("+r+" % 1)"+n+r+o+r+(t?n+i+"isFinite("+r+")":"")+")";case"number":return"(typeof "+r+o+'"'+e+'"'+(t?n+i+"isFinite("+r+")":"")+")";default:return"typeof "+r+o+'"'+e+'"'}}var U=W(["string","number","integer","boolean","null"]);function W(e){for(var r={},t=0;t<e.length;t++)r[e[t]]=!0;return r}var Q=/^[a-z$_][a-z$_0-9]*$/i,H=/'|\\/g;function K(e){return"number"==typeof e?"["+e+"]":Q.test(e)?"."+e:"['"+G(e)+"']"}function G(e){return e.replace(H,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function J(e){return"'"+G(e)+"'"}var Z=/^\/(?:[^~]|~0|~1)*$/,Y=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function X(e,r){return'""'==e?r:(e+" + "+r).replace(/([^\\])' \+ '/g,"$1")}function ee(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function re(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}var te=function(e){B.copy(e,this)};var ae=L((function(e){var r=e.exports=function(e,t,a){"function"==typeof t&&(a=t,t={}),function e(t,a,o,n,i,s,l,c,u,d){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var m in a(n,i,s,l,c,u,d),n){var p=n[m];if(Array.isArray(p)){if(m in r.arrayKeywords)for(var h=0;h<p.length;h++)e(t,a,o,p[h],i+"/"+m+"/"+h,s,i,m,n,h)}else if(m in r.propsKeywords){if(p&&"object"==typeof p)for(var f in p)e(t,a,o,p[f],i+"/"+m+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),s,i,m,n,f)}else(m in r.keywords||t.allKeys&&!(m in r.skipKeywords))&&e(t,a,o,p,i+"/"+m,s,i,m,n)}o(n,i,s,l,c,u,d)}}(t,"function"==typeof(a=t.cb||a)?a:a.pre||function(){},a.post||function(){},e,"",e)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}})),oe=ne;function ne(e,r,t){var a=this._refs[t];if("string"==typeof a){if(!this._refs[a])return ne.call(this,e,r,a);a=this._refs[a]}if((a=a||this._schemas[t])instanceof te)return de(a.schema,this._opts.inlineRefs)?a.schema:a.validate||this._compile(a);var o,n,i,s=ie.call(this,r,t);return s&&(o=s.schema,r=s.root,i=s.baseId),o instanceof te?n=o.validate||e.call(this,o.schema,r,void 0,i):void 0!==o&&(n=de(o,this._opts.inlineRefs)?o:e.call(this,o,r,void 0,i)),n}function ie(e,r){var t=V.parse(r),a=pe(t),o=me(this._getId(e.schema));if(0===Object.keys(e.schema).length||a!==o){var n=fe(a),i=this._refs[n];if("string"==typeof i)return se.call(this,e,i,t);if(i instanceof te)i.validate||this._compile(i),e=i;else{if(!((i=this._schemas[n])instanceof te))return;if(i.validate||this._compile(i),n==fe(r))return{schema:i,root:e,baseId:o};e=i}if(!e.schema)return;o=me(this._getId(e.schema))}return ce.call(this,t,o,e.schema,e)}function se(e,r,t){var a=ie.call(this,e,r);if(a){var o=a.schema,n=a.baseId;e=a.root;var i=this._getId(o);return i&&(n=ve(n,i)),ce.call(this,t,n,o,e)}}ne.normalizeId=fe,ne.fullPath=me,ne.url=ve,ne.ids=function(e){var r=fe(this._getId(e)),t={"":r},a={"":me(r,!1)},o={},n=this;return ae(e,{allKeys:!0},(function(e,r,i,s,l,c,u){if(""!==r){var d=n._getId(e),m=t[s],p=a[s]+"/"+l;if(void 0!==u&&(p+="/"+("number"==typeof u?u:B.escapeFragment(u))),"string"==typeof d){d=m=fe(m?V.resolve(m,d):d);var h=n._refs[d];if("string"==typeof h&&(h=n._refs[h]),h&&h.schema){if(!q(e,h.schema))throw new Error('id "'+d+'" resolves to more than one schema')}else if(d!=fe(p))if("#"==d[0]){if(o[d]&&!q(e,o[d]))throw new Error('id "'+d+'" resolves to more than one schema');o[d]=e}else n._refs[d]=p}t[r]=m,a[r]=p}})),o},ne.inlineRef=de,ne.schema=ie;var le=B.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function ce(e,r,t,a){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var o=e.fragment.split("/"),n=1;n<o.length;n++){var i=o[n];if(i){if(void 0===(t=t[i=B.unescapeFragment(i)]))break;var s;if(!le[i]&&((s=this._getId(t))&&(r=ve(r,s)),t.$ref)){var l=ve(r,t.$ref),c=ie.call(this,a,l);c&&(t=c.schema,a=c.root,r=c.baseId)}}}return void 0!==t&&t!==a.schema?{schema:t,root:a,baseId:r}:void 0}}var ue=B.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function de(e,r){return!1!==r&&(void 0===r||!0===r?function e(r){var t;if(Array.isArray(r)){for(var a=0;a<r.length;a++)if("object"==typeof(t=r[a])&&!e(t))return!1}else for(var o in r){if("$ref"==o)return!1;if("object"==typeof(t=r[o])&&!e(t))return!1}return!0}(e):r?function e(r){var t,a=0;if(Array.isArray(r)){for(var o=0;o<r.length;o++)if("object"==typeof(t=r[o])&&(a+=e(t)),a==1/0)return 1/0}else for(var n in r){if("$ref"==n)return 1/0;if(ue[n])a++;else if("object"==typeof(t=r[n])&&(a+=e(t)+1),a==1/0)return 1/0}return a}(e)<=r:void 0)}function me(e,r){return!1!==r&&(e=fe(e)),pe(V.parse(e))}function pe(e){return V.serialize(e).split("#")[0]+"#"}var he=/#\/?$/;function fe(e){return e?e.replace(he,""):""}function ve(e,r){return r=fe(r),V.resolve(e,r)}var ge={Validation:be((function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:be(ye)};function ye(e,r,t){this.message=t||ye.message(e,r),this.missingRef=oe.url(e,r),this.missingSchema=oe.normalizeId(oe.fullPath(this.missingRef))}function be(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}ye.message=function(e,r){return"can't resolve reference "+r+" from id "+e};var Pe=function(e,r){r||(r={}),"function"==typeof r&&(r={cmp:r});var t="boolean"==typeof r.cycles&&r.cycles,a=r.cmp&&function(e){return function(r){return function(t,a){var o={key:t,value:r[t]},n={key:a,value:r[a]};return e(o,n)}}}(r.cmp),o=[];return function e(r){if(r&&r.toJSON&&"function"==typeof r.toJSON&&(r=r.toJSON()),void 0!==r){if("number"==typeof r)return isFinite(r)?""+r:"null";if("object"!=typeof r)return JSON.stringify(r);var n,i;if(Array.isArray(r)){for(i="[",n=0;n<r.length;n++)n&&(i+=","),i+=e(r[n])||"null";return i+"]"}if(null===r)return"null";if(-1!==o.indexOf(r)){if(t)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=o.push(r)-1,l=Object.keys(r).sort(a&&a(r));for(i="",n=0;n<l.length;n++){var c=l[n],u=e(r[c]);u&&(i&&(i+=","),i+=JSON.stringify(c)+":"+u)}return o.splice(s,1),"{"+i+"}"}}(e)},we=function(e,r,t){var a="",o=!0===e.schema.$async,n=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),i=e.self._getId(e.schema);if(e.opts.strictKeywords){var s=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(s){var l="unknown keyword: "+s;if("log"!==e.opts.strictKeywords)throw new Error(l);e.logger.warn(l)}}if(e.isTop&&(a+=" var validate = ",o&&(e.async=!0,a+="async "),a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",i&&(e.opts.sourceCode||e.opts.processCode)&&(a+=" /*# sourceURL="+i+" */ ")),"boolean"==typeof e.schema||!n&&!e.schema.$ref){var c=e.level,u=e.dataLevel,d=e.schema["false schema"],m=e.schemaPath+e.util.getProperty("false schema"),p=e.errSchemaPath+"/false schema",h=!e.opts.allErrors,f="data"+(u||""),v="valid"+c;if(!1===e.schema){e.isTop?h=!0:a+=" var "+v+" = false; ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'boolean schema is false' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";var g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?a+=o?" return data; ":" validate.errors = null; return true; ":a+=" var "+v+" = true; ";return e.isTop&&(a+=" }; return validate; "),a}if(e.isTop){var y=e.isTop;c=e.level=0,u=e.dataLevel=0,f="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var b="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}a+=" var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data; "}else{c=e.level,f="data"+((u=e.dataLevel)||"");if(i&&(e.baseId=e.resolve.url(e.baseId,i)),o&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+c+" = errors;"}v="valid"+c,h=!e.opts.allErrors;var P="",w="",E=e.schema.type,S=Array.isArray(E);if(E&&e.opts.nullable&&!0===e.schema.nullable&&(S?-1==E.indexOf("null")&&(E=E.concat("null")):"null"!=E&&(E=[E,"null"],S=!0)),S&&1==E.length&&(E=E[0],S=!1),e.schema.$ref&&n){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(n=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(a+=" "+e.RULES.all.$comment.code(e,"$comment")),E){if(e.opts.coerceTypes)var x=e.util.coerceToTypes(e.opts.coerceTypes,E);var F=e.RULES.types[E];if(x||S||!0===F||F&&!Z(F)){m=e.schemaPath+".type",p=e.errSchemaPath+"/type",m=e.schemaPath+".type",p=e.errSchemaPath+"/type";var O=S?"checkDataTypes":"checkDataType";if(a+=" if ("+e.util[O](E,f,e.opts.strictNumbers,!0)+") { ",x){var _="dataType"+c,D="coerced"+c;a+=" var "+_+" = typeof "+f+"; var "+D+" = undefined; ","array"==e.opts.coerceTypes&&(a+=" if ("+_+" == 'object' && Array.isArray("+f+") && "+f+".length == 1) { "+f+" = "+f+"[0]; "+_+" = typeof "+f+"; if ("+e.util.checkDataType(e.schema.type,f,e.opts.strictNumbers)+") "+D+" = "+f+"; } "),a+=" if ("+D+" !== undefined) ; ";var k=x;if(k)for(var j,I=-1,C=k.length-1;I<C;)"string"==(j=k[I+=1])?a+=" else if ("+_+" == 'number' || "+_+" == 'boolean') "+D+" = '' + "+f+"; else if ("+f+" === null) "+D+" = ''; ":"number"==j||"integer"==j?(a+=" else if ("+_+" == 'boolean' || "+f+" === null || ("+_+" == 'string' && "+f+" && "+f+" == +"+f+" ","integer"==j&&(a+=" && !("+f+" % 1)"),a+=")) "+D+" = +"+f+"; "):"boolean"==j?a+=" else if ("+f+" === 'false' || "+f+" === 0 || "+f+" === null) "+D+" = false; else if ("+f+" === 'true' || "+f+" === 1) "+D+" = true; ":"null"==j?a+=" else if ("+f+" === '' || "+f+" === 0 || "+f+" === false) "+D+" = null; ":"array"==e.opts.coerceTypes&&"array"==j&&(a+=" else if ("+_+" == 'string' || "+_+" == 'number' || "+_+" == 'boolean' || "+f+" == null) "+D+" = ["+f+"]; ");a+=" else { ",(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } if ("+D+" !== undefined) { ";var A=u?"data"+(u-1||""):"parentData";a+=" "+f+" = "+D+"; ",u||(a+="if ("+A+" !== undefined)"),a+=" "+A+"["+(u?e.dataPathArr[u]:"parentDataProperty")+"] = "+D+"; } "}else{(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } "}}if(e.schema.$ref&&!n)a+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",h&&(a+=" } if (errors === ",a+=y?"0":"errs_"+c,a+=") { ",w+="}");else{var R=e.RULES;if(R)for(var $=-1,N=R.length-1;$<N;)if(Z(F=R[$+=1])){if(F.type&&(a+=" if ("+e.util.checkDataType(F.type,f,e.opts.strictNumbers)+") { "),e.opts.useDefaults)if("object"==F.type&&e.schema.properties){d=e.schema.properties;var L=Object.keys(d);if(L)for(var T,z=-1,V=L.length-1;z<V;){if(void 0!==(M=d[T=L[z+=1]]).default){var q=f+e.util.getProperty(T);if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+q;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+q+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+q+" === null || "+q+" === '' "),a+=" ) "+q+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(M.default)+" ":a+=" "+JSON.stringify(M.default)+" ",a+="; "}}}else if("array"==F.type&&Array.isArray(e.schema.items)){var B=e.schema.items;if(B){I=-1;for(var M,U=B.length-1;I<U;)if(void 0!==(M=B[I+=1]).default){q=f+"["+I+"]";if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+q;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else a+=" if ("+q+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+q+" === null || "+q+" === '' "),a+=" ) "+q+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(M.default)+" ":a+=" "+JSON.stringify(M.default)+" ",a+="; "}}}var W=F.rules;if(W)for(var Q,H=-1,K=W.length-1;H<K;)if(Y(Q=W[H+=1])){var G=Q.code(e,Q.keyword,F.type);G&&(a+=" "+G+" ",h&&(P+="}"))}if(h&&(a+=" "+P+" ",P=""),F.type&&(a+=" } ",E&&E===F.type&&!x)){a+=" else { ";var J;m=e.schemaPath+".type",p=e.errSchemaPath+"/type";(J=J||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=S?""+E.join(","):""+E,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+E.join(","):""+E,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+m+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=J.pop(),!e.compositeRule&&h?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}h&&(a+=" if (errors === ",a+=y?"0":"errs_"+c,a+=") { ",w+="}")}}function Z(e){for(var r=e.rules,t=0;t<r.length;t++)if(Y(r[t]))return!0}function Y(r){return void 0!==e.schema[r.keyword]||r.implements&&function(r){for(var t=r.implements,a=0;a<t.length;a++)if(void 0!==e.schema[t[a]])return!0}(r)}return h&&(a+=" "+w+" "),y?(o?(a+=" if (errors === 0) return data; ",a+=" else throw new ValidationError(vErrors); "):(a+=" validate.errors = vErrors; ",a+=" return errors === 0; "),a+=" }; return validate;"):a+=" var "+v+" = errors === errs_"+c+";",a},Ee=B.ucs2length,Se=ge.Validation,xe=function e(r,t,a,o){var n=this,i=this._opts,s=[void 0],l={},c=[],u={},d=[],m={},p=[];t=t||{schema:r,refVal:s,refs:l};var h=Fe.call(this,r,t,o),f=this._compilations[h.index];if(h.compiling)return f.callValidate=function e(){var r=f.validate,t=r.apply(this,arguments);return e.errors=r.errors,t};var v=this._formats,g=this.RULES;try{var y=P(r,t,a,o);f.validate=y;var b=f.callValidate;return b&&(b.schema=y.schema,b.errors=null,b.refs=y.refs,b.refVal=y.refVal,b.root=y.root,b.$async=y.$async,i.sourceCode&&(b.source=y.source)),y}finally{Oe.call(this,r,t,o)}function P(r,a,o,u){var m=!a||a&&a.schema==r;if(a.schema!=t.schema)return e.call(n,r,a,o,u);var h,f=!0===r.$async,y=we({isTop:!0,schema:r,isRoot:m,baseId:u,root:a,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:ge.MissingRef,RULES:g,validate:we,util:B,resolve:oe,resolveRef:w,usePattern:x,useDefault:F,useCustomRule:O,opts:i,formats:v,logger:n.logger,self:n});y=Ce(s,je)+Ce(c,De)+Ce(d,ke)+Ce(p,Ie)+y,i.processCode&&(y=i.processCode(y,r));try{h=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",y)(n,g,v,t,s,d,p,q,Ee,Se),s[0]=h}catch(e){throw n.logger.error("Error compiling schema, function code:",y),e}return h.schema=r,h.errors=null,h.refs=l,h.refVal=s,h.root=m?h:a,f&&(h.$async=!0),!0===i.sourceCode&&(h.source={code:y,patterns:c,defaults:d}),h}function w(r,o,c){o=oe.url(r,o);var u,d,m=l[o];if(void 0!==m)return S(u=s[m],d="refVal["+m+"]");if(!c&&t.refs){var p=t.refs[o];if(void 0!==p)return S(u=t.refVal[p],d=E(o,u))}d=E(o);var h=oe.call(n,P,t,o);if(void 0===h){var f=a&&a[o];f&&(h=oe.inlineRef(f,i.inlineRefs)?f:e.call(n,f,t,a,r))}if(void 0!==h)return function(e,r){var t=l[e];s[t]=r}(o,h),S(h,d);!function(e){delete l[e]}(o)}function E(e,r){var t=s.length;return s[t]=r,l[e]=t,"refVal"+t}function S(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}function x(e){var r=u[e];return void 0===r&&(r=u[e]=c.length,c[r]=e),"pattern"+r}function F(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return B.toQuotedString(e);case"object":if(null===e)return"null";var r=Pe(e),t=m[r];return void 0===t&&(t=m[r]=d.length,d[t]=e),"default"+t}}function O(e,r,t,a){if(!1!==n._opts.validateSchema){var o=e.definition.dependencies;if(o&&!o.every((function(e){return Object.prototype.hasOwnProperty.call(t,e)})))throw new Error("parent schema must have all required keywords: "+o.join(","));var s=e.definition.validateSchema;if(s)if(!s(r)){var l="keyword schema is invalid: "+n.errorsText(s.errors);if("log"!=n._opts.validateSchema)throw new Error(l);n.logger.error(l)}}var c,u=e.definition.compile,d=e.definition.inline,m=e.definition.macro;if(u)c=u.call(n,r,t,a);else if(m)c=m.call(n,r,t,a),!1!==i.validateSchema&&n.validateSchema(c,!0);else if(d)c=d.call(n,a,e.keyword,r,t);else if(!(c=e.definition.validate))return;if(void 0===c)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var h=p.length;return p[h]=c,{code:"customRule"+h,validate:c}}};function Fe(e,r,t){var a=_e.call(this,e,r,t);return a>=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}function Oe(e,r,t){var a=_e.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}function _e(e,r,t){for(var a=0;a<this._compilations.length;a++){var o=this._compilations[a];if(o.schema==e&&o.root==r&&o.baseId==t)return a}return-1}function De(e,r){return"var pattern"+e+" = new RegExp("+B.toQuotedString(r[e])+");"}function ke(e){return"var default"+e+" = defaults["+e+"];"}function je(e,r){return void 0===r[e]?"":"var refVal"+e+" = refVal["+e+"];"}function Ie(e){return"var customRule"+e+" = customRules["+e+"];"}function Ce(e,r){if(!e.length)return"";for(var t="",a=0;a<e.length;a++)t+=r(a,e);return t}var Ae=L((function(e){var r=e.exports=function(){this._cache={}};r.prototype.put=function(e,r){this._cache[e]=r},r.prototype.get=function(e){return this._cache[e]},r.prototype.del=function(e){delete this._cache[e]},r.prototype.clear=function(){this._cache={}}})),Re=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,$e=[0,31,28,31,30,31,30,31,31,30,31,30,31],Ne=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,Le=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,Te=/^(?:[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,ze=/^(?:(?:[^\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,Ve=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,qe=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Be=/^(?:\/(?:[^~/]|~0|~1)*)*$/,Me=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Ue=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,We=Qe;function Qe(e){return e="full"==e?"full":"fast",B.copy(Qe[e])}function He(e){var r=e.match(Re);if(!r)return!1;var t=+r[1],a=+r[2],o=+r[3];return a>=1&&a<=12&&o>=1&&o<=(2==a&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(t)?29:$e[a])}function Ke(e,r){var t=e.match(Ne);if(!t)return!1;var a=t[1],o=t[2],n=t[3],i=t[5];return(a<=23&&o<=59&&n<=59||23==a&&59==o&&60==n)&&(!r||i)}Qe.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":ze,url:Ve,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:Le,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:Ye,uuid:qe,"json-pointer":Be,"json-pointer-uri-fragment":Me,"relative-json-pointer":Ue},Qe.full={date:He,time:Ke,"date-time":function(e){var r=e.split(Ge);return 2==r.length&&He(r[0])&&Ke(r[1],!0)},uri:function(e){return Je.test(e)&&Te.test(e)},"uri-reference":/^(?:[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,"uri-template":ze,url:Ve,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:Le,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i,regex:Ye,uuid:qe,"json-pointer":Be,"json-pointer-uri-fragment":Me,"relative-json-pointer":Ue};var Ge=/t|\s/i;var Je=/\/|:/;var Ze=/[^\\]\\Z/;function Ye(e){if(Ze.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var Xe=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s;var p="maximum"==r,h=p?"exclusiveMaximum":"exclusiveMinimum",f=e.schema[h],v=e.opts.$data&&f&&f.$data,g=p?"<":">",y=p?">":"<",b=void 0;if(!m&&"number"!=typeof s&&void 0!==s)throw new Error(r+" must be number");if(!v&&void 0!==f&&"number"!=typeof f&&"boolean"!=typeof f)throw new Error(h+" must be number or boolean");if(v){var P=e.util.getData(f.$data,i,e.dataPathArr),w="exclusive"+n,E="exclType"+n,S="exclIsNumber"+n,x="' + "+(_="op"+n)+" + '";o+=" var schemaExcl"+n+" = "+P+"; ",o+=" var "+w+"; var "+E+" = typeof "+(P="schemaExcl"+n)+"; if ("+E+" != 'boolean' && "+E+" != 'undefined' && "+E+" != 'number') { ";var F;b=h;(F=F||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(o+=" , message: '"+h+" should be boolean' "),e.opts.verbose&&(o+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var O=o;o=F.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+E+" == 'number' ? ( ("+w+" = "+a+" === undefined || "+P+" "+g+"= "+a+") ? "+d+" "+y+"= "+P+" : "+d+" "+y+" "+a+" ) : ( ("+w+" = "+P+" === true) ? "+d+" "+y+"= "+a+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { var op"+n+" = "+w+" ? '"+g+"' : '"+g+"='; ",void 0===s&&(b=h,c=e.errSchemaPath+"/"+h,a=P,m=v)}else{x=g;if((S="number"==typeof f)&&m){var _="'"+x+"'";o+=" if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" ( "+a+" === undefined || "+f+" "+g+"= "+a+" ? "+d+" "+y+"= "+f+" : "+d+" "+y+" "+a+" ) || "+d+" !== "+d+") { "}else{S&&void 0===s?(w=!0,b=h,c=e.errSchemaPath+"/"+h,a=f,y+="="):(S&&(a=Math[p?"min":"max"](f,s)),f===(!S||a)?(w=!0,b=h,c=e.errSchemaPath+"/"+h,y+="="):(w=!1,x+="="));_="'"+x+"'";o+=" if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+" "+y+" "+a+" || "+d+" !== "+d+") { "}}b=b||r,(F=F||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(b||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+_+", limit: "+a+", exclusive: "+w+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be "+x+" ",o+=m?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";O=o;return o=F.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+O+"]); ":o+=" validate.errors = ["+O+"]; return false; ":o+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",u&&(o+=" else { "),o},er=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+d+".length "+("maxItems"==r?">":"<")+" "+a+") { ";var p=r,h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxItems"==r?"more":"fewer",o+=" than ",o+=m?"' + "+a+" + '":""+s,o+=" items' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=h.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},rr=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");var p="maxLength"==r?">":"<";o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),!1===e.opts.unicode?o+=" "+d+".length ":o+=" ucs2length("+d+") ",o+=" "+p+" "+a+") { ";var h=r,f=f||[];f.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(h||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT be ",o+="maxLength"==r?"longer":"shorter",o+=" than ",o+=m?"' + "+a+" + '":""+s,o+=" characters' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var v=o;return o=f.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+v+"]); ":o+=" validate.errors = ["+v+"]; return false; ":o+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},tr=function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" Object.keys("+d+").length "+("maxProperties"==r?">":"<")+" "+a+") { ";var p=r,h=h||[];h.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxProperties"==r?"more":"fewer",o+=" than ",o+=m?"' + "+a+" + '":""+s,o+=" properties' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var f=o;return o=h.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},ar={$ref:function(e,r,t){var a,o,n=" ",i=e.level,s=e.dataLevel,l=e.schema[r],c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(s||""),m="valid"+i;if("#"==l||"#/"==l)e.isRoot?(a=e.async,o="validate"):(a=!0===e.root.schema.$async,o="root.refVal[0]");else{var p=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===p){var h=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(h),(y=y||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(n+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(n+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),n+=" } "):n+=" {} ";var f=n;n=y.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+f+"]); ":n+=" validate.errors = ["+f+"]; return false; ":n+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(n+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,l,h);e.logger.warn(h),u&&(n+=" if (true) { ")}}else if(p.inline){var v=e.util.copy(e);v.level++;var g="valid"+v.level;v.schema=p.schema,v.schemaPath="",v.errSchemaPath=l,n+=" "+e.validate(v).replace(/validate\.schema/g,p.code)+" ",u&&(n+=" if ("+g+") { ")}else a=!0===p.$async||e.async&&!1!==p.$async,o=p.code}if(o){var y;(y=y||[]).push(n),n="",e.opts.passContext?n+=" "+o+".call(this, ":n+=" "+o+"( ",n+=" "+d+", (dataPath || '')",'""'!=e.errorPath&&(n+=" + "+e.errorPath);var b=n+=" , "+(s?"data"+(s-1||""):"parentData")+" , "+(s?e.dataPathArr[s]:"parentDataProperty")+", rootData) ";if(n=y.pop(),a){if(!e.async)throw new Error("async schema referenced by sync schema");u&&(n+=" var "+m+"; "),n+=" try { await "+b+"; ",u&&(n+=" "+m+" = true; "),n+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",u&&(n+=" "+m+" = false; "),n+=" } ",u&&(n+=" if ("+m+") { ")}else n+=" if (!"+b+") { if (vErrors === null) vErrors = "+o+".errors; else vErrors = vErrors.concat("+o+".errors); errors = vErrors.length; } ",u&&(n+=" else { ")}return n},allOf:function(e,r,t){var a=" ",o=e.schema[r],n=e.schemaPath+e.util.getProperty(r),i=e.errSchemaPath+"/"+r,s=!e.opts.allErrors,l=e.util.copy(e),c="";l.level++;var u="valid"+l.level,d=l.baseId,m=!0,p=o;if(p)for(var h,f=-1,v=p.length-1;f<v;)h=p[f+=1],(e.opts.strictKeywords?"object"==typeof h&&Object.keys(h).length>0||!1===h:e.util.schemaHasRules(h,e.RULES.all))&&(m=!1,l.schema=h,l.schemaPath=n+"["+f+"]",l.errSchemaPath=i+"/"+f,a+=" "+e.validate(l)+" ",l.baseId=d,s&&(a+=" if ("+u+") { ",c+="}"));return s&&(a+=m?" if (true) { ":" "+c.slice(0,-1)+" "),a},anyOf:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e),h="";p.level++;var f="valid"+p.level;if(i.every((function(r){return e.opts.strictKeywords?"object"==typeof r&&Object.keys(r).length>0||!1===r:e.util.schemaHasRules(r,e.RULES.all)}))){var v=p.baseId;a+=" var "+m+" = errors; var "+d+" = false; ";var g=e.compositeRule;e.compositeRule=p.compositeRule=!0;var y=i;if(y)for(var b,P=-1,w=y.length-1;P<w;)b=y[P+=1],p.schema=b,p.schemaPath=s+"["+P+"]",p.errSchemaPath=l+"/"+P,a+=" "+e.validate(p)+" ",p.baseId=v,a+=" "+d+" = "+d+" || "+f+"; if (!"+d+") { ",h+="}";e.compositeRule=p.compositeRule=g,a+=" "+h+" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } else { errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else c&&(a+=" if (true) { ");return a},$comment:function(e,r,t){var a=" ",o=e.schema[r],n=e.errSchemaPath+"/"+r;e.opts.allErrors;var i=e.util.toQuotedString(o);return!0===e.opts.$comment?a+=" console.log("+i+");":"function"==typeof e.opts.$comment&&(a+=" self._opts.$comment("+i+", "+e.util.toQuotedString(n)+", validate.root.schema);"),a},const:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(n||""),d="valid"+o,m=e.opts.$data&&i&&i.$data;m&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; "),m||(a+=" var schema"+o+" = validate.schema"+s+";"),a+="var "+d+" = equal("+u+", schema"+o+"); if (!"+d+") { ";var p=p||[];p.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValue: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var h=a;return a=p.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+h+"]); ":a+=" validate.errors = ["+h+"]; return false; ":a+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",c&&(a+=" else { "),a},contains:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level,f="i"+o,v=p.dataLevel=e.dataLevel+1,g="data"+v,y=e.baseId,b=e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all);if(a+="var "+m+" = errors;var "+d+";",b){var P=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=i,p.schemaPath=s,p.errSchemaPath=l,a+=" var "+h+" = false; for (var "+f+" = 0; "+f+" < "+u+".length; "+f+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers,!0);var w=u+"["+f+"]";p.dataPathArr[v]=f;var E=e.validate(p);p.baseId=y,e.util.varOccurences(E,g)<2?a+=" "+e.util.varReplace(E,g,w)+" ":a+=" var "+g+" = "+w+"; "+E+" ",a+=" if ("+h+") break; } ",e.compositeRule=p.compositeRule=P,a+=" if (!"+h+") {"}else a+=" if ("+u+".length == 0) {";var S=S||[];S.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should contain a valid item' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var x=a;return a=S.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",b&&(a+=" errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a},dependencies:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(n||""),d="errs__"+o,m=e.util.copy(e),p="";m.level++;var h="valid"+m.level,f={},v={},g=e.opts.ownProperties;for(w in i)if("__proto__"!=w){var y=i[w],b=Array.isArray(y)?v:f;b[w]=y}a+="var "+d+" = errors;";var P=e.errorPath;for(var w in a+="var missing"+o+";",v)if((b=v[w]).length){if(a+=" if ( "+u+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),c){a+=" && ( ";var E=b;if(E)for(var S=-1,x=E.length-1;S<x;){j=E[S+=1],S&&(a+=" || "),a+=" ( ( "+(R=u+(A=e.util.getProperty(j)))+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(j)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?j:A)+") ) "}a+=")) { ";var F="missing"+o,O="' + "+F+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,F,!0):P+" + "+F);var _=_||[];_.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var D=a;a=_.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+D+"]); ":a+=" validate.errors = ["+D+"]; return false; ":a+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{a+=" ) { ";var k=b;if(k)for(var j,I=-1,C=k.length-1;I<C;){j=k[I+=1];var A=e.util.getProperty(j),R=(O=e.util.escapeQuotes(j),u+A);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,j,e.opts.jsonPointers)),a+=" if ( "+R+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(j)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+O+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==b.length?a+="property "+e.util.escapeQuotes(b[0]):a+="properties "+e.util.escapeQuotes(b.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",c&&(p+="}",a+=" else { ")}e.errorPath=P;var $=m.baseId;for(var w in f){y=f[w];(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all))&&(a+=" "+h+" = true; if ( "+u+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),a+=") { ",m.schema=y,m.schemaPath=s+e.util.getProperty(w),m.errSchemaPath=l+"/"+e.util.escapeFragment(w),a+=" "+e.validate(m)+" ",m.baseId=$,a+=" } ",c&&(a+=" if ("+h+") { ",p+="}"))}return c&&(a+=" "+p+" if ("+d+" == errors) {"),a},enum:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(n||""),d="valid"+o,m=e.opts.$data&&i&&i.$data;m&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ");var p="i"+o,h="schema"+o;m||(a+=" var "+h+" = validate.schema"+s+";"),a+="var "+d+";",m&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=d+" = false;for (var "+p+"=0; "+p+"<"+h+".length; "+p+"++) if (equal("+u+", "+h+"["+p+"])) { "+d+" = true; break; }",m&&(a+=" } "),a+=" if (!"+d+") { ";var f=f||[];f.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var v=a;return a=f.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+v+"]); ":a+=" validate.errors = ["+v+"]; return false; ":a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",c&&(a+=" else { "),a},format:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(n||"");if(!1===e.opts.format)return c&&(a+=" if (true) { "),a;var d,m=e.opts.$data&&i&&i.$data;m?(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ",d="schema"+o):d=i;var p=e.opts.unknownFormats,h=Array.isArray(p);if(m){a+=" var "+(f="format"+o)+" = formats["+d+"]; var "+(v="isObject"+o)+" = typeof "+f+" == 'object' && !("+f+" instanceof RegExp) && "+f+".validate; var "+(g="formatType"+o)+" = "+v+" && "+f+".type || 'string'; if ("+v+") { ",e.async&&(a+=" var async"+o+" = "+f+".async; "),a+=" "+f+" = "+f+".validate; } if ( ",m&&(a+=" ("+d+" !== undefined && typeof "+d+" != 'string') || "),a+=" (","ignore"!=p&&(a+=" ("+d+" && !"+f+" ",h&&(a+=" && self._opts.unknownFormats.indexOf("+d+") == -1 "),a+=") || "),a+=" ("+f+" && "+g+" == '"+t+"' && !(typeof "+f+" == 'function' ? ",e.async?a+=" (async"+o+" ? await "+f+"("+u+") : "+f+"("+u+")) ":a+=" "+f+"("+u+") ",a+=" : "+f+".test("+u+"))))) {"}else{var f;if(!(f=e.formats[i])){if("ignore"==p)return e.logger.warn('unknown format "'+i+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(a+=" if (true) { "),a;if(h&&p.indexOf(i)>=0)return c&&(a+=" if (true) { "),a;throw new Error('unknown format "'+i+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,g=(v="object"==typeof f&&!(f instanceof RegExp)&&f.validate)&&f.type||"string";if(v){var y=!0===f.async;f=f.validate}if(g!=t)return c&&(a+=" if (true) { "),a;if(y){if(!e.async)throw new Error("async format in sync schema");a+=" if (!(await "+(b="formats"+e.util.getProperty(i)+".validate")+"("+u+"))) { "}else{a+=" if (! ";var b="formats"+e.util.getProperty(i);v&&(b+=".validate"),a+="function"==typeof f?" "+b+"("+u+") ":" "+b+".test("+u+") ",a+=") { "}}var P=P||[];P.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",a+=m?""+d:""+e.util.toQuotedString(i),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",a+=m?"' + "+d+" + '":""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=m?"validate.schema"+s:""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var w=a;return a=P.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",c&&(a+=" else { "),a},if:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e);p.level++;var h="valid"+p.level,f=e.schema.then,v=e.schema.else,g=void 0!==f&&(e.opts.strictKeywords?"object"==typeof f&&Object.keys(f).length>0||!1===f:e.util.schemaHasRules(f,e.RULES.all)),y=void 0!==v&&(e.opts.strictKeywords?"object"==typeof v&&Object.keys(v).length>0||!1===v:e.util.schemaHasRules(v,e.RULES.all)),b=p.baseId;if(g||y){var P;p.createErrors=!1,p.schema=i,p.schemaPath=s,p.errSchemaPath=l,a+=" var "+m+" = errors; var "+d+" = true; ";var w=e.compositeRule;e.compositeRule=p.compositeRule=!0,a+=" "+e.validate(p)+" ",p.baseId=b,p.createErrors=!0,a+=" errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } ",e.compositeRule=p.compositeRule=w,g?(a+=" if ("+h+") { ",p.schema=e.schema.then,p.schemaPath=e.schemaPath+".then",p.errSchemaPath=e.errSchemaPath+"/then",a+=" "+e.validate(p)+" ",p.baseId=b,a+=" "+d+" = "+h+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'then'; ":P="'then'",a+=" } ",y&&(a+=" else { ")):a+=" if (!"+h+") { ",y&&(p.schema=e.schema.else,p.schemaPath=e.schemaPath+".else",p.errSchemaPath=e.errSchemaPath+"/else",a+=" "+e.validate(p)+" ",p.baseId=b,a+=" "+d+" = "+h+"; ",g&&y?a+=" var "+(P="ifClause"+o)+" = 'else'; ":P="'else'",a+=" } "),a+=" if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+P+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match \"' + "+P+" + '\" schema' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",c&&(a+=" else { ")}else c&&(a+=" if (true) { ");return a},items:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e),h="";p.level++;var f="valid"+p.level,v="i"+o,g=p.dataLevel=e.dataLevel+1,y="data"+g,b=e.baseId;if(a+="var "+m+" = errors;var "+d+";",Array.isArray(i)){var P=e.schema.additionalItems;if(!1===P){a+=" "+d+" = "+u+".length <= "+i.length+"; ";var w=l;l=e.errSchemaPath+"/additionalItems",a+=" if (!"+d+") { ";var E=E||[];E.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+i.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+i.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var S=a;a=E.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",l=w,c&&(h+="}",a+=" else { ")}var x=i;if(x)for(var F,O=-1,_=x.length-1;O<_;)if(F=x[O+=1],e.opts.strictKeywords?"object"==typeof F&&Object.keys(F).length>0||!1===F:e.util.schemaHasRules(F,e.RULES.all)){a+=" "+f+" = true; if ("+u+".length > "+O+") { ";var D=u+"["+O+"]";p.schema=F,p.schemaPath=s+"["+O+"]",p.errSchemaPath=l+"/"+O,p.errorPath=e.util.getPathExpr(e.errorPath,O,e.opts.jsonPointers,!0),p.dataPathArr[g]=O;var k=e.validate(p);p.baseId=b,e.util.varOccurences(k,y)<2?a+=" "+e.util.varReplace(k,y,D)+" ":a+=" var "+y+" = "+D+"; "+k+" ",a+=" } ",c&&(a+=" if ("+f+") { ",h+="}")}if("object"==typeof P&&(e.opts.strictKeywords?"object"==typeof P&&Object.keys(P).length>0||!1===P:e.util.schemaHasRules(P,e.RULES.all))){p.schema=P,p.schemaPath=e.schemaPath+".additionalItems",p.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+f+" = true; if ("+u+".length > "+i.length+") { for (var "+v+" = "+i.length+"; "+v+" < "+u+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=u+"["+v+"]";p.dataPathArr[g]=v;k=e.validate(p);p.baseId=b,e.util.varOccurences(k,y)<2?a+=" "+e.util.varReplace(k,y,D)+" ":a+=" var "+y+" = "+D+"; "+k+" ",c&&(a+=" if (!"+f+") break; "),a+=" } } ",c&&(a+=" if ("+f+") { ",h+="}")}}else if(e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){p.schema=i,p.schemaPath=s,p.errSchemaPath=l,a+=" for (var "+v+" = 0; "+v+" < "+u+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);D=u+"["+v+"]";p.dataPathArr[g]=v;k=e.validate(p);p.baseId=b,e.util.varOccurences(k,y)<2?a+=" "+e.util.varReplace(k,y,D)+" ":a+=" var "+y+" = "+D+"; "+k+" ",c&&(a+=" if (!"+f+") break; "),a+=" }"}return c&&(a+=" "+h+" if ("+m+" == errors) {"),a},maximum:Xe,minimum:Xe,maxItems:er,minItems:er,maxLength:rr,minLength:rr,maxProperties:tr,minProperties:tr,multipleOf:function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;if(m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,!m&&"number"!=typeof s)throw new Error(r+" must be number");o+="var division"+n+";if (",m&&(o+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),o+=" (division"+n+" = "+d+" / "+a+", ",e.opts.multipleOfPrecision?o+=" Math.abs(Math.round(division"+n+") - division"+n+") > 1e-"+e.opts.multipleOfPrecision+" ":o+=" division"+n+" !== parseInt(division"+n+") ",o+=" ) ",m&&(o+=" ) "),o+=" ) { ";var p=p||[];p.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be multiple of ",o+=m?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var h=o;return o=p.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+h+"]); ":o+=" validate.errors = ["+h+"]; return false; ":o+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},not:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(n||""),d="errs__"+o,m=e.util.copy(e);m.level++;var p="valid"+m.level;if(e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){m.schema=i,m.schemaPath=s,m.errSchemaPath=l,a+=" var "+d+" = errors; ";var h,f=e.compositeRule;e.compositeRule=m.compositeRule=!0,m.createErrors=!1,m.opts.allErrors&&(h=m.opts.allErrors,m.opts.allErrors=!1),a+=" "+e.validate(m)+" ",m.createErrors=!0,h&&(m.opts.allErrors=h),e.compositeRule=m.compositeRule=f,a+=" if ("+p+") { ";var v=v||[];v.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var g=a;a=v.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(a+=" if (false) { ");return a},oneOf:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(n||""),d="valid"+o,m="errs__"+o,p=e.util.copy(e),h="";p.level++;var f="valid"+p.level,v=p.baseId,g="prevValid"+o,y="passingSchemas"+o;a+="var "+m+" = errors , "+g+" = false , "+d+" = false , "+y+" = null; ";var b=e.compositeRule;e.compositeRule=p.compositeRule=!0;var P=i;if(P)for(var w,E=-1,S=P.length-1;E<S;)w=P[E+=1],(e.opts.strictKeywords?"object"==typeof w&&Object.keys(w).length>0||!1===w:e.util.schemaHasRules(w,e.RULES.all))?(p.schema=w,p.schemaPath=s+"["+E+"]",p.errSchemaPath=l+"/"+E,a+=" "+e.validate(p)+" ",p.baseId=v):a+=" var "+f+" = true; ",E&&(a+=" if ("+f+" && "+g+") { "+d+" = false; "+y+" = ["+y+", "+E+"]; } else { ",h+="}"),a+=" if ("+f+") { "+d+" = "+g+" = true; "+y+" = "+E+"; }";return e.compositeRule=p.compositeRule=b,a+=h+"if (!"+d+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a},pattern:function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(i||""),m=e.opts.$data&&s&&s.$data;m?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,o+="if ( ",m&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'string') || "),o+=" !"+(m?"(new RegExp("+a+"))":e.usePattern(s))+".test("+d+") ) { ";var p=p||[];p.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { pattern: ",o+=m?""+a:""+e.util.toQuotedString(s),o+=" } ",!1!==e.opts.messages&&(o+=" , message: 'should match pattern \"",o+=m?"' + "+a+" + '":""+e.util.escapeQuotes(s),o+="\"' "),e.opts.verbose&&(o+=" , schema: ",o+=m?"validate.schema"+l:""+e.util.toQuotedString(s),o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var h=o;return o=p.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+h+"]); ":o+=" validate.errors = ["+h+"]; return false; ":o+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o},properties:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(n||""),d="errs__"+o,m=e.util.copy(e),p="";m.level++;var h="valid"+m.level,f="key"+o,v="idx"+o,g=m.dataLevel=e.dataLevel+1,y="data"+g,b="dataProperties"+o,P=Object.keys(i||{}).filter(A),w=e.schema.patternProperties||{},E=Object.keys(w).filter(A),S=e.schema.additionalProperties,x=P.length||E.length,F=!1===S,O="object"==typeof S&&Object.keys(S).length,_=e.opts.removeAdditional,D=F||O||_,k=e.opts.ownProperties,j=e.baseId,I=e.schema.required;if(I&&(!e.opts.$data||!I.$data)&&I.length<e.opts.loopRequired)var C=e.util.toHash(I);function A(e){return"__proto__"!==e}if(a+="var "+d+" = errors;var "+h+" = true;",k&&(a+=" var "+b+" = undefined;"),D){if(a+=k?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+u+") { ",x){if(a+=" var isAdditional"+o+" = !(false ",P.length)if(P.length>8)a+=" || validate.schema"+s+".hasOwnProperty("+f+") ";else{var R=P;if(R)for(var $=-1,N=R.length-1;$<N;)G=R[$+=1],a+=" || "+f+" == "+e.util.toQuotedString(G)+" "}if(E.length){var L=E;if(L)for(var T=-1,z=L.length-1;T<z;)ne=L[T+=1],a+=" || "+e.usePattern(ne)+".test("+f+") "}a+=" ); if (isAdditional"+o+") { "}if("all"==_)a+=" delete "+u+"["+f+"]; ";else{var V=e.errorPath,q="' + "+f+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers)),F)if(_)a+=" delete "+u+"["+f+"]; ";else{a+=" "+h+" = false; ";var B=l;l=e.errSchemaPath+"/additionalProperties",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { additionalProperty: '"+q+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is an invalid additional property":a+="should NOT have additional properties",a+="' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var M=a;a=te.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+M+"]); ":a+=" validate.errors = ["+M+"]; return false; ":a+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=B,c&&(a+=" break; ")}else if(O)if("failing"==_){a+=" var "+d+" = errors; ";var U=e.compositeRule;e.compositeRule=m.compositeRule=!0,m.schema=S,m.schemaPath=e.schemaPath+".additionalProperties",m.errSchemaPath=e.errSchemaPath+"/additionalProperties",m.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);var W=u+"["+f+"]";m.dataPathArr[g]=f;var Q=e.validate(m);m.baseId=j,e.util.varOccurences(Q,y)<2?a+=" "+e.util.varReplace(Q,y,W)+" ":a+=" var "+y+" = "+W+"; "+Q+" ",a+=" if (!"+h+") { errors = "+d+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+u+"["+f+"]; } ",e.compositeRule=m.compositeRule=U}else{m.schema=S,m.schemaPath=e.schemaPath+".additionalProperties",m.errSchemaPath=e.errSchemaPath+"/additionalProperties",m.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);W=u+"["+f+"]";m.dataPathArr[g]=f;Q=e.validate(m);m.baseId=j,e.util.varOccurences(Q,y)<2?a+=" "+e.util.varReplace(Q,y,W)+" ":a+=" var "+y+" = "+W+"; "+Q+" ",c&&(a+=" if (!"+h+") break; ")}e.errorPath=V}x&&(a+=" } "),a+=" } ",c&&(a+=" if ("+h+") { ",p+="}")}var H=e.opts.useDefaults&&!e.compositeRule;if(P.length){var K=P;if(K)for(var G,J=-1,Z=K.length-1;J<Z;){var Y=i[G=K[J+=1]];if(e.opts.strictKeywords?"object"==typeof Y&&Object.keys(Y).length>0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all)){var X=e.util.getProperty(G),ee=(W=u+X,H&&void 0!==Y.default);m.schema=Y,m.schemaPath=s+X,m.errSchemaPath=l+"/"+e.util.escapeFragment(G),m.errorPath=e.util.getPath(e.errorPath,G,e.opts.jsonPointers),m.dataPathArr[g]=e.util.toQuotedString(G);Q=e.validate(m);if(m.baseId=j,e.util.varOccurences(Q,y)<2){Q=e.util.varReplace(Q,y,W);var re=W}else{re=y;a+=" var "+y+" = "+W+"; "}if(ee)a+=" "+Q+" ";else{if(C&&C[G]){a+=" if ( "+re+" === undefined ",k&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+h+" = false; ";V=e.errorPath,B=l;var te,ae=e.util.escapeQuotes(G);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(V,G,e.opts.jsonPointers)),l=e.errSchemaPath+"/required",(te=te||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+ae+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+ae+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";M=a;a=te.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+M+"]); ":a+=" validate.errors = ["+M+"]; return false; ":a+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=B,e.errorPath=V,a+=" } else { "}else c?(a+=" if ( "+re+" === undefined ",k&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=") { "+h+" = true; } else { "):(a+=" if ("+re+" !== undefined ",k&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(G)+"') "),a+=" ) { ");a+=" "+Q+" } "}}c&&(a+=" if ("+h+") { ",p+="}")}}if(E.length){var oe=E;if(oe)for(var ne,ie=-1,se=oe.length-1;ie<se;){Y=w[ne=oe[ie+=1]];if(e.opts.strictKeywords?"object"==typeof Y&&Object.keys(Y).length>0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all)){m.schema=Y,m.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(ne),m.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(ne),a+=k?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+f+" = "+b+"["+v+"]; ":" for (var "+f+" in "+u+") { ",a+=" if ("+e.usePattern(ne)+".test("+f+")) { ",m.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);W=u+"["+f+"]";m.dataPathArr[g]=f;Q=e.validate(m);m.baseId=j,e.util.varOccurences(Q,y)<2?a+=" "+e.util.varReplace(Q,y,W)+" ":a+=" var "+y+" = "+W+"; "+Q+" ",c&&(a+=" if (!"+h+") break; "),a+=" } ",c&&(a+=" else "+h+" = true; "),a+=" } ",c&&(a+=" if ("+h+") { ",p+="}")}}}return c&&(a+=" "+p+" if ("+d+" == errors) {"),a},propertyNames:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(n||""),d="errs__"+o,m=e.util.copy(e);m.level++;var p="valid"+m.level;if(a+="var "+d+" = errors;",e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){m.schema=i,m.schemaPath=s,m.errSchemaPath=l;var h="key"+o,f="idx"+o,v="i"+o,g="' + "+h+" + '",y="data"+(m.dataLevel=e.dataLevel+1),b="dataProperties"+o,P=e.opts.ownProperties,w=e.baseId;P&&(a+=" var "+b+" = undefined; "),a+=P?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+f+"=0; "+f+"<"+b+".length; "+f+"++) { var "+h+" = "+b+"["+f+"]; ":" for (var "+h+" in "+u+") { ",a+=" var startErrs"+o+" = errors; ";var E=h,S=e.compositeRule;e.compositeRule=m.compositeRule=!0;var x=e.validate(m);m.baseId=w,e.util.varOccurences(x,y)<2?a+=" "+e.util.varReplace(x,y,E)+" ":a+=" var "+y+" = "+E+"; "+x+" ",e.compositeRule=m.compositeRule=S,a+=" if (!"+p+") { for (var "+v+"=startErrs"+o+"; "+v+"<errors; "+v+"++) { vErrors["+v+"].propertyName = "+h+"; } var err = ",!1!==e.createErrors?(a+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { propertyName: '"+g+"' } ",!1!==e.opts.messages&&(a+=" , message: 'property name \\'"+g+"\\' is invalid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),c&&(a+=" break; "),a+=" } }"}return c&&(a+=" if ("+d+" == errors) {"),a},required:function(e,r,t){var a=" ",o=e.level,n=e.dataLevel,i=e.schema[r],s=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(n||""),d="valid"+o,m=e.opts.$data&&i&&i.$data;m&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ");var p="schema"+o;if(!m)if(i.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var h=[],f=i;if(f)for(var v,g=-1,y=f.length-1;g<y;){v=f[g+=1];var b=e.schema.properties[v];b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0||!1===b:e.util.schemaHasRules(b,e.RULES.all))||(h[h.length]=v)}}else h=i;if(m||h.length){var P=e.errorPath,w=m||h.length>=e.opts.loopRequired,E=e.opts.ownProperties;if(c)if(a+=" var missing"+o+"; ",w){m||(a+=" var "+p+" = validate.schema"+s+"; ");var S="' + "+(k="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,k,e.opts.jsonPointers)),a+=" var "+d+" = true; ",m&&(a+=" if (schema"+o+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+o+")) "+d+" = false; else {"),a+=" for (var "+O+" = 0; "+O+" < "+p+".length; "+O+"++) { "+d+" = "+u+"["+p+"["+O+"]] !== undefined ",E&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", "+p+"["+O+"]) "),a+="; if (!"+d+") break; } ",m&&(a+=" } "),a+=" if (!"+d+") { ",(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var x=a;a=D.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var F=h;if(F)for(var O=-1,_=F.length-1;O<_;){I=F[O+=1],O&&(a+=" || "),a+=" ( ( "+($=u+(R=e.util.getProperty(I)))+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(I)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?I:R)+") ) "}a+=") { ";var D;S="' + "+(k="missing"+o)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,k,!0):P+" + "+k),(D=D||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";x=a;a=D.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(w){m||(a+=" var "+p+" = validate.schema"+s+"; ");var k;S="' + "+(k="schema"+o+"["+(O="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,k,e.opts.jsonPointers)),m&&(a+=" if ("+p+" && !Array.isArray("+p+")) { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+p+" !== undefined) { "),a+=" for (var "+O+" = 0; "+O+" < "+p+".length; "+O+"++) { if ("+u+"["+p+"["+O+"]] === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", "+p+"["+O+"]) "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",m&&(a+=" } ")}else{var j=h;if(j)for(var I,C=-1,A=j.length-1;C<A;){I=j[C+=1];var R=e.util.getProperty(I),$=(S=e.util.escapeQuotes(I),u+R);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,I,e.opts.jsonPointers)),a+=" if ( "+$+" === undefined ",E&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(I)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=P}else c&&(a+=" if (true) {");return a},uniqueItems:function(e,r,t){var a,o=" ",n=e.level,i=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,d="data"+(i||""),m="valid"+n,p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",a="schema"+n):a=s,(s||p)&&!1!==e.opts.uniqueItems){p&&(o+=" var "+m+"; if ("+a+" === false || "+a+" === undefined) "+m+" = true; else if (typeof "+a+" != 'boolean') "+m+" = false; else { "),o+=" var i = "+d+".length , "+m+" = true , j; if (i > 1) { ";var h=e.schema.items&&e.schema.items.type,f=Array.isArray(h);if(!h||"object"==h||"array"==h||f&&(h.indexOf("object")>=0||h.indexOf("array")>=0))o+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+d+"[i], "+d+"[j])) { "+m+" = false; break outer; } } } ";else{o+=" var itemIndices = {}, item; for (;i--;) { var item = "+d+"[i]; ";var v="checkDataType"+(f?"s":"");o+=" if ("+e.util[v](h,"item",e.opts.strictNumbers,!0)+") continue; ",f&&(o+=" if (typeof item == 'string') item = '\"' + item; "),o+=" if (typeof itemIndices[item] == 'number') { "+m+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}o+=" } ",p&&(o+=" } "),o+=" if (!"+m+") { ";var g=g||[];g.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+l:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var y=o;o=g.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+y+"]); ":o+=" validate.errors = ["+y+"]; return false; ":o+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",u&&(o+=" else { ")}else u&&(o+=" if (true) { ");return o},validate:we},or=B.toHash,nr=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"],ir=function(e,r){for(var t=0;t<r.length;t++){e=JSON.parse(JSON.stringify(e));var a,o=r[t].split("/"),n=e;for(a=1;a<o.length;a++)n=n[o[a]];for(a=0;a<nr.length;a++){var i=nr[a],s=n[i];s&&(n[i]={anyOf:[s,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e},sr=ge.MissingRef,lr=function e(r,t,a){var o=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof t&&(a=t,t=void 0);var n=i(r).then((function(){var e=o._addSchema(r,void 0,t);return e.validate||function e(r){try{return o._compile(r)}catch(e){if(e instanceof sr)return a(e);throw e}function a(a){var n=a.missingSchema;if(c(n))throw new Error("Schema "+n+" is loaded but "+a.missingRef+" cannot be resolved");var s=o._loadingSchemas[n];return s||(s=o._loadingSchemas[n]=o._opts.loadSchema(n)).then(l,l),s.then((function(e){if(!c(n))return i(e).then((function(){c(n)||o.addSchema(e,n,void 0,t)}))})).then((function(){return e(r)}));function l(){delete o._loadingSchemas[n]}function c(e){return o._refs[e]||o._schemas[e]}}}(e)}));a&&n.then((function(e){a(null,e)}),a);return n;function i(r){var t=r.$schema;return t&&!o.getSchema(t)?e.call(o,{$ref:t},!0):Promise.resolve()}};var cr=function(e,r,t){var a,o,n=" ",i=e.level,s=e.dataLevel,l=e.schema[r],c=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,d=!e.opts.allErrors,m="data"+(s||""),p="valid"+i,h="errs__"+i,f=e.opts.$data&&l&&l.$data;f?(n+=" var schema"+i+" = "+e.util.getData(l.$data,s,e.dataPathArr)+"; ",o="schema"+i):o=l;var v,g,y,b,P,w="definition"+i,E=this.definition,S="";if(f&&E.$data){P="keywordValidate"+i;var x=E.validateSchema;n+=" var "+w+" = RULES.custom['"+r+"'].definition; var "+P+" = "+w+".validate;"}else{if(!(b=e.useCustomRule(this,l,e.schema,e)))return;o="validate.schema"+c,P=b.code,v=E.compile,g=E.inline,y=E.macro}var F=P+".errors",O="i"+i,_="ruleErr"+i,D=E.async;if(D&&!e.async)throw new Error("async keyword in sync schema");if(g||y||(n+=F+" = null;"),n+="var "+h+" = errors;var "+p+";",f&&E.$data&&(S+="}",n+=" if ("+o+" === undefined) { "+p+" = true; } else { ",x&&(S+="}",n+=" "+p+" = "+w+".validateSchema("+o+"); if ("+p+") { ")),g)E.statements?n+=" "+b.validate+" ":n+=" "+p+" = "+b.validate+"; ";else if(y){var k=e.util.copy(e);S="";k.level++;var j="valid"+k.level;k.schema=b.validate,k.schemaPath="";var I=e.compositeRule;e.compositeRule=k.compositeRule=!0;var C=e.validate(k).replace(/validate\.schema/g,P);e.compositeRule=k.compositeRule=I,n+=" "+C}else{(N=N||[]).push(n),n="",n+=" "+P+".call( ",e.opts.passContext?n+="this":n+="self",v||!1===E.schema?n+=" , "+m+" ":n+=" , "+o+" , "+m+" , validate.schema"+e.schemaPath+" ",n+=" , (dataPath || '')",'""'!=e.errorPath&&(n+=" + "+e.errorPath);var A=s?"data"+(s-1||""):"parentData",R=s?e.dataPathArr[s]:"parentDataProperty",$=n+=" , "+A+" , "+R+" , rootData ) ";n=N.pop(),!1===E.errors?(n+=" "+p+" = ",D&&(n+="await "),n+=$+"; "):n+=D?" var "+(F="customErrors"+i)+" = null; try { "+p+" = await "+$+"; } catch (e) { "+p+" = false; if (e instanceof ValidationError) "+F+" = e.errors; else throw e; } ":" "+F+" = null; "+p+" = "+$+"; "}if(E.modifying&&(n+=" if ("+A+") "+m+" = "+A+"["+R+"];"),n+=""+S,E.valid)d&&(n+=" if (true) { ");else{var N;n+=" if ( ",void 0===E.valid?(n+=" !",n+=y?""+j:""+p):n+=" "+!E.valid+" ",n+=") { ",a=this.keyword,(N=N||[]).push(n),n="",(N=N||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(n+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";var L=n;n=N.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+L+"]); ":n+=" validate.errors = ["+L+"]; return false; ":n+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var T=n;n=N.pop(),g?E.errors?"full"!=E.errors&&(n+=" for (var "+O+"="+h+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(n+=" "+_+".schema = "+o+"; "+_+".data = "+m+"; "),n+=" } "):!1===E.errors?n+=" "+T+" ":(n+=" if ("+h+" == errors) { "+T+" } else { for (var "+O+"="+h+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+_+".schemaPath === undefined) { "+_+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(n+=" "+_+".schema = "+o+"; "+_+".data = "+m+"; "),n+=" } } "):y?(n+=" var err = ",!1!==e.createErrors?(n+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(n+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&d&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; ")):!1===E.errors?n+=" "+T+" ":(n+=" if (Array.isArray("+F+")) { if (vErrors === null) vErrors = "+F+"; else vErrors = vErrors.concat("+F+"); errors = vErrors.length; for (var "+O+"="+h+"; "+O+"<errors; "+O+"++) { var "+_+" = vErrors["+O+"]; if ("+_+".dataPath === undefined) "+_+".dataPath = (dataPath || '') + "+e.errorPath+"; "+_+'.schemaPath = "'+u+'"; ',e.opts.verbose&&(n+=" "+_+".schema = "+o+"; "+_+".data = "+m+"; "),n+=" } } else { "+T+" } "),n+=" } ",d&&(n+=" else { ")}return n},ur="http://json-schema.org/draft-07/schema#",dr="http://json-schema.org/draft-07/schema#",mr="Core schema meta-schema",pr={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},hr=["object","boolean"],fr={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},vr={$schema:ur,$id:dr,title:mr,definitions:pr,type:hr,properties:fr,default:!0},gr=T(Object.freeze({__proto__:null,$schema:ur,$id:dr,title:mr,definitions:pr,type:hr,properties:fr,default:vr})),yr={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:gr.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:gr.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}},br=/^[a-z_$][a-z0-9_$-]*$/i,Pr=function(e,r){var t=this.RULES;if(t.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!br.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(r){this.validateKeyword(r,!0);var a=r.type;if(Array.isArray(a))for(var o=0;o<a.length;o++)i(e,a[o],r);else i(e,a,r);var n=r.metaSchema;n&&(r.$data&&this._opts.$data&&(n={anyOf:[n,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),r.validateSchema=this.compile(n,!0))}function i(e,r,a){for(var o,n=0;n<t.length;n++){var i=t[n];if(i.type==r){o=i;break}}o||(o={type:r,rules:[]},t.push(o));var s={keyword:e,definition:a,custom:!0,code:cr,implements:a.implements};o.rules.push(s),t.custom[e]=s}return t.keywords[e]=t.all[e]=!0,this},wr=function(e){var r=this.RULES.custom[e];return r?r.definition:this.RULES.keywords[e]||!1},Er=function(e){var r=this.RULES;delete r.keywords[e],delete r.all[e],delete r.custom[e];for(var t=0;t<r.length;t++)for(var a=r[t].rules,o=0;o<a.length;o++)if(a[o].keyword==e){a.splice(o,1);break}return this},Sr=function e(r,t){e.errors=null;var a=this._validateKeyword=this._validateKeyword||this.compile(yr,!0);if(a(r))return!0;if(e.errors=a.errors,t)throw new Error("custom keyword definition is invalid: "+this.errorsText(a.errors));return!1};var xr="http://json-schema.org/draft-07/schema#",Fr="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Or="Meta-schema for $data reference (JSON Schema extension proposal)",_r=["$data"],Dr={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},kr={$schema:xr,$id:Fr,description:Or,type:"object",required:_r,properties:Dr,additionalProperties:!1},jr=T(Object.freeze({__proto__:null,$schema:xr,$id:Fr,description:Or,type:"object",required:_r,properties:Dr,additionalProperties:!1,default:kr})),Ir=$r;$r.prototype.validate=function(e,r){var t;if("string"==typeof e){if(!(t=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);t=a.validate||this._compile(a)}var o=t(r);!0!==t.$async&&(this.errors=t.errors);return o},$r.prototype.compile=function(e,r){var t=this._addSchema(e,void 0,r);return t.validate||this._compile(t)},$r.prototype.addSchema=function(e,r,t,a){if(Array.isArray(e)){for(var o=0;o<e.length;o++)this.addSchema(e[o],void 0,t,a);return this}var n=this._getId(e);if(void 0!==n&&"string"!=typeof n)throw new Error("schema id must be string");return qr(this,r=oe.normalizeId(r||n)),this._schemas[r]=this._addSchema(e,t,a,!0),this},$r.prototype.addMetaSchema=function(e,r,t){return this.addSchema(e,r,t,!0),this},$r.prototype.validateSchema=function(e,r){var t=e.$schema;if(void 0!==t&&"string"!=typeof t)throw new Error("$schema must be a string");if(!(t=t||this._opts.defaultMeta||function(e){var r=e._opts.meta;return e._opts.defaultMeta="object"==typeof r?e._getId(r)||r:e.getSchema(Cr)?Cr:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var a=this.validate(t,e);if(!a&&r){var o="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(o);this.logger.error(o)}return a},$r.prototype.getSchema=function(e){var r=Nr(this,e);switch(typeof r){case"object":return r.validate||this._compile(r);case"string":return this.getSchema(r);case"undefined":return function(e,r){var t=oe.schema.call(e,{schema:{}},r);if(t){var a=t.schema,o=t.root,n=t.baseId,i=xe.call(e,a,o,void 0,n);return e._fragments[r]=new te({ref:r,fragment:!0,schema:a,root:o,baseId:n,validate:i}),i}}(this,e)}},$r.prototype.removeSchema=function(e){if(e instanceof RegExp)return Lr(this,this._schemas,e),Lr(this,this._refs,e),this;switch(typeof e){case"undefined":return Lr(this,this._schemas),Lr(this,this._refs),this._cache.clear(),this;case"string":var r=Nr(this,e);return r&&this._cache.del(r.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var t=this._opts.serialize,a=t?t(e):e;this._cache.del(a);var o=this._getId(e);o&&(o=oe.normalizeId(o),delete this._schemas[o],delete this._refs[o])}return this},$r.prototype.addFormat=function(e,r){"string"==typeof r&&(r=new RegExp(r));return this._formats[e]=r,this},$r.prototype.errorsText=function(e,r){if(!(e=e||this.errors))return"No errors";for(var t=void 0===(r=r||{}).separator?", ":r.separator,a=void 0===r.dataVar?"data":r.dataVar,o="",n=0;n<e.length;n++){var i=e[n];i&&(o+=a+i.dataPath+" "+i.message+t)}return o.slice(0,-t.length)},$r.prototype._addSchema=function(e,r,t,a){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var o=this._opts.serialize,n=o?o(e):e,i=this._cache.get(n);if(i)return i;a=a||!1!==this._opts.addUsedSchema;var s=oe.normalizeId(this._getId(e));s&&a&&qr(this,s);var l,c=!1!==this._opts.validateSchema&&!r;c&&!(l=s&&s==oe.normalizeId(e.$schema))&&this.validateSchema(e,!0);var u=oe.ids.call(this,e),d=new te({id:s,schema:e,localRefs:u,cacheKey:n,meta:t});"#"!=s[0]&&a&&(this._refs[s]=d);this._cache.put(n,d),c&&l&&this.validateSchema(e,!0);return d},$r.prototype._compile=function(e,r){if(e.compiling)return e.validate=o,o.schema=e.schema,o.errors=null,o.root=r||o,!0===e.schema.$async&&(o.$async=!0),o;var t,a;e.compiling=!0,e.meta&&(t=this._opts,this._opts=this._metaOpts);try{a=xe.call(this,e.schema,r,e.localRefs)}catch(r){throw delete e.validate,r}finally{e.compiling=!1,e.meta&&(this._opts=t)}return e.validate=a,e.refs=a.refs,e.refVal=a.refVal,e.root=a.root,a;function o(){var r=e.validate,t=r.apply(this,arguments);return o.errors=r.errors,t}},$r.prototype.compileAsync=lr,$r.prototype.addKeyword=Pr,$r.prototype.getKeyword=wr,$r.prototype.removeKeyword=Er,$r.prototype.validateKeyword=Sr,$r.ValidationError=ge.Validation,$r.MissingRefError=ge.MissingRef,$r.$dataMetaSchema=ir;var Cr="http://json-schema.org/draft-07/schema",Ar=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],Rr=["/properties"];function $r(e){if(!(this instanceof $r))return new $r(e);var r,t;e=this._opts=B.copy(e)||{},function(e){var r=e._opts.logger;if(!1===r)e.logger={log:Br,warn:Br,error:Br};else{if(void 0===r&&(r=console),!("object"==typeof r&&r.log&&r.warn&&r.error))throw new Error("logger must implement log, warn and error methods");e.logger=r}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=We(e.format),this._cache=e.cache||new Ae,this._loadingSchemas={},this._compilations=[],this.RULES=((r=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}]).all=or(t=["type","$comment"]),r.types=or(["number","integer","string","array","object","boolean","null"]),r.forEach((function(e){e.rules=e.rules.map((function(e){var a;if("object"==typeof e){var o=Object.keys(e)[0];a=e[o],e=o,a.forEach((function(e){t.push(e),r.all[e]=!0}))}return t.push(e),r.all[e]={keyword:e,code:ar[e],implements:a}})),r.all.$comment={keyword:"$comment",code:ar.$comment},e.type&&(r.types[e.type]=e)})),r.keywords=or(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),r.custom={},r),this._getId=function(e){switch(e.schemaId){case"auto":return Vr;case"id":return Tr;default:return zr}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=Pe),this._metaOpts=function(e){for(var r=B.copy(e._opts),t=0;t<Ar.length;t++)delete r[Ar[t]];return r}(this),e.formats&&function(e){for(var r in e._opts.formats){var t=e._opts.formats[r];e.addFormat(r,t)}}(this),e.keywords&&function(e){for(var r in e._opts.keywords){var t=e._opts.keywords[r];e.addKeyword(r,t)}}(this),function(e){var r;e._opts.$data&&(r=jr,e.addMetaSchema(r,r.$id,!0));if(!1===e._opts.meta)return;var t=gr;e._opts.$data&&(t=ir(t,Rr));e.addMetaSchema(t,Cr,!0),e._refs["http://json-schema.org/schema"]=Cr}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var r=e._opts.schemas;if(!r)return;if(Array.isArray(r))e.addSchema(r);else for(var t in r)e.addSchema(r[t],t)}(this)}function Nr(e,r){return r=oe.normalizeId(r),e._schemas[r]||e._refs[r]||e._fragments[r]}function Lr(e,r,t){for(var a in r){var o=r[a];o.meta||t&&!t.test(a)||(e._cache.del(o.cacheKey),delete r[a])}}function Tr(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function zr(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function Vr(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function qr(e,r){if(e._schemas[r]||e._refs[r])throw new Error('schema with key or id "'+r+'" already exists')}function Br(){}var Mr={$$currentLocalizeFn:function(e){if(e&&e.length)for(var r=0;r<e.length;r+=1){var t=e[r],a=void 0,o=void 0,n=void 0;switch(t.keyword){case"$ref":a="无法找到引用".concat(t.params.ref);break;case"additionalItems":a="",o=t.params.limit,a+="不允许超过".concat(o,"个元素");break;case"additionalProperties":a="不允许有额外的属性";break;case"anyOf":a="数据应为 anyOf 所指定的其中一个";break;case"const":a="应当等于常量";break;case"contains":a="应当包含一个有效项";break;case"custom":a='应当通过 "'.concat(t.keyword,' 关键词校验"');break;case"dependencies":a="",o=t.params.depsCount,a+="应当拥有属性".concat(t.params.property,"的依赖属性").concat(t.params.deps);break;case"enum":a="应当是预设定的枚举值之一";break;case"exclusiveMaximum":case"exclusiveMinimum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(n);break;case"false schema":a="布尔模式出错";break;case"format":a='应当匹配格式 "'.concat(t.params.format,'"');break;case"formatExclusiveMaximum":a="formatExclusiveMaximum 应当是布尔值";break;case"formatExclusiveMinimum":a="formatExclusiveMinimum 应当是布尔值";break;case"formatMaximum":case"formatMinimum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当是 ".concat(n);break;case"if":a='应当匹配模式 "'.concat(t.params.failingKeyword,'" ');break;case"maximum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(n);break;case"maxItems":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个项");break;case"maxLength":a="",o=t.params.limit,a+="不应多于 ".concat(o," 个字符");break;case"maxProperties":a="",o=t.params.limit,a+="不应有多于 ".concat(o," 个属性");break;case"minimum":a="",n="".concat(t.params.comparison," ").concat(t.params.limit),a+="应当为 ".concat(n);break;case"minItems":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个项");break;case"minLength":a="",o=t.params.limit,a+="不应少于 ".concat(o," 个字符");break;case"minProperties":a="",o=t.params.limit,a+="不应有少于 ".concat(o," 个属性");break;case"multipleOf":a="应当是 ".concat(t.params.multipleOf," 的整数倍");break;case"not":a='不应当匹配 "not" schema';break;case"oneOf":a='只能匹配一个 "oneOf" 中的 schema';break;case"pattern":a='应当匹配模式 "'.concat(t.params.pattern,'"');break;case"patternRequired":a="应当有属性匹配模式 ".concat(t.params.missingPattern);break;case"propertyNames":a="属性名 '".concat(t.params.propertyName,"' 无效");break;case"required":a="应当有必需属性 ".concat(t.params.missingProperty);break;case"switch":a="由于 ".concat(t.params.caseIndex,' 失败,未通过 "switch" 校验, ');break;case"type":a="应当是 ".concat(t.params.type," 类型");break;case"uniqueItems":a="不应当含有重复项 (第 ".concat(t.params.j," 项与第 ").concat(t.params.i," 项是重复的)");break;default:continue}t.message=a}},getCurrentLocalize:function(){return this.$$currentLocalizeFn},useLocal:function(e){this.$$currentLocalizeFn=e}};function Ur(e,r){try{if("object"===t(r))return e.fill(null).map((function(){return JSON.parse(JSON.stringify(r))}))}catch(e){}}function Wr(e,r){return e.filter((function(e){return r.includes(e)}))}function Qr(e,r,t){var a=N(e.$ref,r);e.$ref;var o=s(e,["$ref"]);return Jr(i(i({},a),o),r,t)}function Hr(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length<2)return r[0];for(var a={},o=[].concat(r),n=function(){var e=E(o[0])?o[0]:{},r=E(o[1])?o[1]:{};a=Object.assign({},e),Object.keys(r).reduce((function(t,a){var o=e[a],n=r[a];if(E(o)||E(n))if(E(o)&&E(n))t[a]=Hr(o,n);else{var i=l(E(o)?[o,n]:[n,o],2),s=i[0],c=i[1];t[a]="additionalProperties"===a?!0===c&&s:s}else if(Array.isArray(o)||Array.isArray(n))if(Array.isArray(o)&&Array.isArray(n)){if(E(o[0])||E(n[0]))throw new Error("暂不支持如上数组对象元素合并");var u=Wr([].concat(o),[].concat(n));if(u.length<=0)throw new Error("无法合并如上数据");0===u.length&&"type"===a?t[a]=u[0]:t[a]=u}else{var d=l(Array.isArray(o)?[o,n]:[n,o],2),m=d[0],p=d[1];if(void 0===p)t[a]=m;else{if(!m.includes(p))throw new Error("无法合并如下数据");t[a]=p}}else if(void 0!==o&&void 0!==n)if("maxLength"===a||"maximum"===a||"maxItems"===a||"exclusiveMaximum"===a||"maxProperties"===a)t[a]=Math.min(o,n);else if("minLength"===a||"minimum"===a||"minItems"===a||"exclusiveMinimum"===a||"minProperties"===a)t[a]=Math.max(o,n);else if("multipleOf"===a)t[a]=R(o,n);else{if(o!==n)throw new Error("无法合并如下数据");t[a]=o}else t[a]=void 0===o?n:o;return t}),a),o.splice(0,2,a)};o.length>=2;)n();return a}function Kr(e,r,t){var a=i(i({},e),{},{allOf:e.allOf.map((function(e){return Jr(e,r,t)}))});try{var o=a.allOf,n=s(a,["allOf"]);return Hr.apply(void 0,[n].concat(c(o)))}catch(e){return a.allOf,s(a,["allOf"])}}function Gr(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.hasOwnProperty("allOf")&&(e=Kr(e,r,t)),e.hasOwnProperty("$ref")&&(e=Qr(e,r,t)),e}function Jr(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return E(e)?Gr(e,r,t):{}}var Zr=/{{(.*)}}/;function Yr(e,r,t,a){if(void 0!==t){var o=Zr.exec(t);if(Zr.lastIndex=0,o){var n=o[1].trim();return new Function("parentFormData","rootFormData","return ".concat(n))(v(e,r,1),e)}return a()}}function Xr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.schema,t=e.uiSchema,a=arguments.length>1?arguments[1]:void 0,o=at({schema:r,uiSchema:t,containsSpec:!1});return["title","description"].reduce((function(e,r){return o[r]&&(e["ui:".concat(r)]=String(o[r]).replace(/\$index/g,a+1)),e}),{})}function et(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.curNodePath,i=void 0===n?"":n,s=e.rootFormData,l=void 0===s?{}:s,c=o["ui:widget"]||t["ui:widget"],u=o["ui:hidden"]||t["ui:hidden"];return"HiddenWidget"===c||"hidden"===c||!!Yr(l,i,u,(function(){return"function"==typeof u?u(v(l,i,1),l):u}))}function rt(e,r){var a=r.schema,o=void 0===a?{}:a,n=r.uiSchema,i=void 0===n?{}:n,s=o["ui:field"]||i["ui:field"];if("function"==typeof s||"object"===t(s)||"string"==typeof s)return{field:s,fieldProps:i["ui:fieldProps"]||o["ui:fieldProps"]};var l=e[F(o)];if(l)return{field:l};if(!l&&(o.anyOf||o.oneOf))return{field:null};throw new Error("不支持的field类型 ".concat(o.type))}function tt(e){var r=e.schema,t=void 0===r?{}:r,o=e.uiSchema,n=void 0===o?{}:o,s=e.curNodePath,l=e.rootFormData,u=void 0===l?{}:l;return Object.assign.apply(Object,[{}].concat(c([t,n].map((function(e){return Object.keys(e).reduce((function(r,t){var o=e[t];return"ui:options"===t&&E(o)?i(i({},r),o):0===t.indexOf("ui:")?i(i({},r),{},a({},t.substring(3),void 0===s?o:Yr(u,s,o,(function(){return o})))):r}),{})})))))}function at(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.containsSpec,s=void 0===n||n,l=e.curNodePath,c=e.rootFormData,u={};return s&&(u.readonly=!!t.readOnly,void 0!==t.multipleOf&&(u.step=t.multipleOf),(t.minimum||0===t.minimum)&&(u.min=t.minimum),(t.maximum||0===t.maximum)&&(u.max=t.maximum),(t.minLength||0===t.minLength)&&(u.minlength=t.minLength),(t.maxLength||0===t.maxLength)&&(u.maxlength=t.maxLength),"date-time"!==t.format&&"date"!==t.format||("array"===t.type?(u.isRange=!0,u.isNumberValue=!(t.items&&"string"===t.items.type)):u.isNumberValue=!("string"===t.type))),i(i({title:t.title,description:t.description},u),tt({schema:t,uiSchema:o,curNodePath:l,rootFormData:c}))}function ot(e){var r=e.schema,t=void 0===r?{}:r,a=e.uiSchema,o=void 0===a?{}:a,n=e.curNodePath,i=e.rootFormData,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,c=at({schema:t,uiSchema:o,curNodePath:n,rootFormData:i});!c.widget&&l&&Object.assign(c,l({schema:t,uiSchema:o}));var u=c.widget,d=c.title,m=c.labelWidth,p=c.description,h=c.attrs,f=c.class,v=c.style,g=c.fieldAttrs,y=c.fieldStyle,b=c.fieldClass,P=c.emptyValue,w=c.width,E=c.getWidget,S=c.onChange,x=s(c,["widget","title","labelWidth","description","attrs","class","style","fieldAttrs","fieldStyle","fieldClass","emptyValue","width","getWidget","onChange"]);return{widget:u,label:d,labelWidth:m,description:p,widgetAttrs:h,widgetClass:f,widgetStyle:v,fieldAttrs:g,width:w,fieldStyle:y,fieldClass:b,emptyValue:P,getWidget:E,onChange:S,uiProps:x}}function nt(e){var r=e.schema,t=void 0===r?{}:r,o=e.uiSchema,n=void 0===o?{}:o,s=e.errorSchema,l=void 0===s?{}:s;return Object.assign.apply(Object,[{}].concat(c([t,n,l].map((function(e){return Object.keys(e).reduce((function(r,t){var o=e[t];return"err:options"===t&&E(o)?i(i({},r),o):0===t.indexOf("err:")?i(i({},r),{},a({},t.substring(4),o)):r}),{})})))))}function it(e,r){if(!Array.isArray(r))return e;var t,a=function(e){return e.reduce((function(e,r){return e[r]=!0,e}),{})},o=a(e),n=r.filter((function(e){return"*"===e||o[e]})),i=a(n),s=e.filter((function(e){return!i[e]})),l=n.indexOf("*");if(-1===l){if(s.length)throw new Error("uiSchema order list does not contain ".concat((t=s).length>1?"properties '".concat(t.join("', '"),"'"):"property '".concat(t[0],"'")));return n}if(l!==n.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");var u=c(n);return u.splice.apply(u,[l,1].concat(c(s))),u}function st(e){return Array.isArray(e.enum)&&1===e.enum.length||e.hasOwnProperty("const")}function lt(e){if(Array.isArray(e.enum)&&1===e.enum.length)return e.enum[0];if(e.hasOwnProperty("const"))return e.const;throw new Error("schema cannot be inferred as a constant")}function ct(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=Jr(e,r),a=t.oneOf||t.anyOf;return!!Array.isArray(t.enum)||!!Array.isArray(a)&&a.every((function(e){return st(e)}))}function ut(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every((function(e){return E(e)}))}function dt(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!(!e.uniqueItems||!e.items)&&ct(e.items,r)}function mt(e){return e.additionalItems,E(e.additionalItems)}function pt(e,r,t,a){if(e.enum){var o=tt({schema:e,uiSchema:r,curNodePath:t,rootFormData:a}).enumNames||e.enumNames;return e.enum.map((function(e,r){return{label:o&&o[r]||String(e),value:e}}))}var n=e.oneOf||e.anyOf,i=r.oneOf||r.anyOf;return n.map((function(e,r){var o=i&&i[r]?tt({schema:e,uiSchema:i[r],curNodePath:t,rootFormData:a}):{},n=lt(e);return{label:o.title||e.title||String(n),value:n}}))}function ht(e,r,t){if(e)return e;if(r){var a=t.split(".").pop();if(a&&a!=="".concat(Number(a)))return a}return""}var ft=Object.freeze({__proto__:null,replaceArrayIndex:Xr,isHiddenWidget:et,getUiField:rt,getUserUiOptions:tt,getUiOptions:at,getWidgetConfig:ot,getUserErrOptions:nt,orderProperties:it,isConstant:st,toConstant:lt,isSelect:ct,isFixedItems:ut,isMultiSelect:dt,allowAdditionalItems:mt,optionsList:pt,fallbackLabel:ht}),vt=bt(),gt=null,yt=null;function bt(){var e=new Ir({errorDataPath:"property",allErrors:!0,multipleOfPrecision:8,schemaId:"auto",unknownFormats:"ignore"});return e.addFormat("data-url",/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/),e.addFormat("color",/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/),e}function Pt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null===e?[]:e.map((function(e){var r=e.dataPath,t=e.keyword,a=e.message,o=e.params,n=e.schemaPath,i="".concat(r);return{name:t,property:i,message:a,params:o,stack:"".concat(i," ").concat(a).trim(),schemaPath:n}}))}function wt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.transformErrors,o=e.additionalMetaSchemas,n=void 0===o?[]:o,i=e.customFormats,s=void 0===i?{}:i,l=!O(yt,n),u=!O(gt,s);(l||u)&&(vt=bt()),n&&l&&Array.isArray(n)&&(vt.addMetaSchema(n),yt=n),s&&u&&E(s)&&(Object.keys(s).forEach((function(e){vt.addFormat(e,s[e])})),gt=s);var d=null;try{vt.validate(t,r)}catch(e){d=e}Mr.getCurrentLocalize()(vt.errors);var m=Pt(vt.errors);vt.errors=null;var p=d&&d.message&&"string"==typeof d.message&&d.message.includes("no schema with key or ref ");return p&&(m=[].concat(c(m),[{stack:d.message}])),"function"==typeof a&&(m=a(m)),{errors:m}}function Et(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.formData,t=e.schema,a=e.uiSchema,o=e.transformErrors,n=e.additionalMetaSchemas,i=void 0===n?[]:n,s=e.customFormats,l=void 0===s?{}:s,c=e.errorSchema,u=void 0===c?{}:c,d=e.required,m=void 0!==d&&d,p=e.propPath,h=void 0===p?"":p,f=e.isOnlyFirstError,v=void 0===f||f,g="array"===t.type&&Array.isArray(r)&&0===r.length,y=void 0===r||g;if(m){if(y){var b={keyword:"required",params:{missingProperty:h}},P=nt({schema:t,uiSchema:a,errorSchema:u}).required;return P?b.message=P:Mr.getCurrentLocalize()([b]),[b]}}else if(y&&!g)return[];var w=wt({formData:r,schema:t,transformErrors:o,additionalMetaSchemas:i,customFormats:l}).errors;w=w.filter((function(e){return""===e.property&&!e.schemaPath.includes("#/anyOf/")&&!e.schemaPath.includes("#/oneOf/")||"additionalProperties"===e.name}));var E=nt({schema:t,uiSchema:a,errorSchema:u});return(v&&w.length>0?[w[0]]:w).reduce((function(e,r){return r.message=void 0!==E[r.name]?E[r.name]:r.message,e.push(r),e}),[])}function St(e,r){try{return vt.validate(e,r)}catch(e){return!1}}function xt(e,r,t){for(var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=0;n<r.length;n++){var s=Jr(r[n],t,e);if(s.properties){var l=i(i({},t.definitions?{definitions:t.definitions}:{}),{},{anyOf:Object.keys(s.properties).map((function(e){return{required:[e]}}))}),c=void 0;if(s.anyOf){var u=o({},s);u.allOf?u.allOf=u.allOf.slice():u.allOf=[],u.allOf.push(l),c=u}else c=Object.assign({},s,l);if(a||delete c.required,St(c,e))return n}else if(St(r[n],e))return n}return 0}var Ft=Object.freeze({__proto__:null,ajvValidateFormData:wt,validateFormDataAndTransformMsg:Et,isValid:St,getMatchingOption:xt});function Ot(e,r){if(Array.isArray(r))return Array.isArray(e)||(e=[]),r.map((function(r,t){return e[t]?Ot(e[t],r):r}));if(E(r)){var t=Object.assign({},e);return Object.keys(r).reduce((function(t,a){return t[a]=Ot(e?e[a]:{},r[a]),t}),t)}return r}function _t(e,r,t){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],n=E(e)?e:{},i=E(a)?a:{};"allOf"in n&&(n=Kr(n,t,i));var s=r;if(E(s)&&E(n.default))s=x(s,n.default);else if("default"in n)s=n.default;else{if("$ref"in n){var l=N(n.$ref,t);return _t(l,s,t,i,o)}if(ut(n))s=n.items.map((function(e,a){return _t(e,Array.isArray(r)?r[a]:void 0,t,i,o)}));else if("oneOf"in n){var c=Jr(n.oneOf[xt(i,n.oneOf,t)],t,i);if(n.properties&&c.properties){var u=x(n,c);delete u.oneOf,n=u}else n=c}else if("anyOf"in n){var d=Jr(n.anyOf[xt(i,n.anyOf,t)],t,i);if(n.properties&&d.properties){var m=x(n,d);delete m.anyOf,n=m}else n=d}}switch(void 0===s&&(s=n.default),F(n)){case"null":return null;case"object":return Object.keys(n.properties||{}).reduce((function(e,r){var a=_t(n.properties[r],(s||{})[r],t,(i||{})[r],o);return(o||void 0!==a)&&(e[r]=a),e}),{});case"array":if(Array.isArray(s)&&(s=s.map((function(e,r){return _t(n.items[r]||n.additionalItems||{},e,t,{},o)}))),Array.isArray(a)&&(s=a.map((function(e,r){return _t(n.items,(s||{})[r],t,e,{},o)}))),n.minItems){if(dt(n,t))return s||[];var p=s?s.length:0;if(n.minItems>p){var h=s||[],f=Array.isArray(n.items)?n.additionalItems:n.items,v=Ur(new Array(n.minItems-p),_t(f,f.defaults,t,{},o));return h.concat(v)}}s=void 0===s?[]:s}return s}function Dt(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!E(e))throw new Error("Invalid schema: ".concat(e));var o=Jr(e,t,r),n=_t(o,e.default,t,r,a);return void 0===r?n:E(r)||Array.isArray(r)?Ot(n,r):0===r||!1===r||""===r?r:r||n}function kt(e,r){void 0===r&&(r={});var t=r.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}kt('.genFromComponent{font-size:14px;line-height:1;word-wrap:break-word;word-break:break-word;padding:0;margin:0}.genFromComponent a,.genFromComponent h1,.genFromComponent h2,.genFromComponent h3,.genFromComponent li,.genFromComponent p,.genFromComponent ul{font-size:14px}.genFromComponent .genFormIcon{width:12px;height:12px;vertical-align:top}.genFromComponent .genFormBtn{display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;background:#fff;border:1px solid #dcdfe6;color:#606266;-webkit-appearance:none;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;margin:0;-webkit-transition:.1s;transition:.1s;font-weight:500;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;padding:12px 20px;font-size:14px;border-radius:4px}.genFromComponent .genFormBtn.is-plain:focus,.genFromComponent .genFormBtn.is-plain:hover{background:#fff;border-color:#409eff;color:#409eff}.genFromComponent .hiddenWidget{display:none}.genFromComponent .fieldGroupWrap+.fieldGroupWrap .fieldGroupWrap_title{margin-top:20px}.genFromComponent .fieldGroupWrap_title{position:relative;display:block;width:100%;line-height:26px;margin-bottom:8px;font-size:15px;font-weight:700;border:0}.genFromComponent .fieldGroupWrap_des{font-size:12px;line-height:20px;margin-bottom:10px;color:#999}.genFromComponent .genFromWidget_des{padding:0;margin-top:0;margin-bottom:2px;font-size:12px;line-height:20px;color:#999;text-align:left}.genFromComponent .formItemErrorBox{margin:0 auto;color:#ff5757;padding-top:2px;position:absolute;top:100%;left:0;display:-webkit-box!important;line-height:16px;text-overflow:ellipsis;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1;white-space:normal;font-size:12px;text-align:left}.genFromComponent .genFormIcon-qs{fill:#606266;vertical-align:middle;display:inline-block;width:16px;height:16px;margin-left:2px;margin-top:-2px;cursor:pointer}.genFromComponent .genFormItemRequired:before{content:"*";color:#f56c6c;margin-right:4px}.genFromComponent .appendCombining_box{margin-bottom:22px}.genFromComponent .appendCombining_box .appendCombining_box{margin-bottom:10px}.genFromComponent .appendCombining_box{padding:10px;background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .validateWidget{margin-bottom:0!important;width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important;padding:0!important}.genFromComponent .validateWidget .formItemErrorBox{padding:5px 0;position:relative}.genFromComponent .arrayField:not(.genFormItem){margin-bottom:22px}.genFromComponent .arrayField:not(.genFormItem) .arrayField{margin-bottom:10px}.genFromComponent .arrayOrderList{background:hsla(0,0%,94.9%,.8);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 0 3px 1px rgba(0,0,0,.1)}.genFromComponent .arrayOrderList_item{position:relative;padding:25px 10px 12px;border-radius:2px;margin-bottom:6px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.genFromComponent .arrayOrderList_bottomAddBtn{text-align:right;padding:15px 10px;margin-bottom:10px}.genFromComponent .bottomAddBtn{width:40%;min-width:10px;max-width:180px}.genFromComponent .arrayListItem_content{padding-top:15px;-webkit-box-flex:1;-ms-flex:1;flex:1;margin:0 auto;-webkit-box-shadow:0 -1px 0 0 rgba(0,0,0,.05);box-shadow:0 -1px 0 0 rgba(0,0,0,.05)}.genFromComponent .arrayListItem_index,.genFromComponent .arrayListItem_operateTool{position:absolute;height:25px}.genFromComponent .arrayListItem_index{top:6px;line-height:18px;height:18px;padding:0 6px;background-color:rgba(0,0,0,.28);color:#fff;font-size:12px;border-radius:2px}.genFromComponent .arrayListItem_operateTool{width:75px;right:9px;top:-1px;text-align:right;font-size:0}.genFromComponent .arrayListItem_btn{vertical-align:top;display:inline-block;padding:6px;margin:0;font-size:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none;cursor:pointer;text-align:center;background:transparent;color:#666}.genFromComponent .arrayListItem_btn:hover{opacity:.6}.genFromComponent .arrayListItem_btn[disabled]{color:#999;opacity:.3!important;cursor:not-allowed}.genFromComponent .arrayListItem_orderBtn-bottom,.genFromComponent .arrayListItem_orderBtn-top{background-color:#f0f9eb}.genFromComponent .arrayListItem_btn-delete{background-color:#fef0f0}.genFromComponent .formFooter_item{text-align:right;border-top:1px solid rgba(0,0,0,.08);padding-top:10px}.genFromComponent.formInlineFooter>.fieldGroupWrap{display:inline-block;margin-right:10px}.genFromComponent.formInline .genFormItem{display:inline-block;margin-right:10px;vertical-align:top}.genFromComponent.formInline .validateWidget{margin-right:0}.genFromComponent.formInline .formFooter_item{border-top:none;padding-top:0}.layoutColumn .layoutColumn_w100{width:100%!important;-ms-flex-preferred-size:100%!important;flex-basis:100%!important}.layoutColumn .fieldGroupWrap_box{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start}.layoutColumn .fieldGroupWrap_box>div{width:100%;-ms-flex-preferred-size:100%;flex-basis:100%}.layoutColumn .fieldGroupWrap_box>.genFormItem{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;-webkit-box-sizing:border-box;box-sizing:border-box;padding-right:10px}.layoutColumn.layoutColumn-1 .fieldGroupWrap_box>.genFormItem{padding-right:0}.layoutColumn.layoutColumn-2 .fieldGroupWrap_box>.genFormItem{width:50%;-ms-flex-preferred-size:50%;flex-basis:50%}.layoutColumn.layoutColumn-3 .fieldGroupWrap_box>.genFormItem{width:33.333%;-ms-flex-preferred-size:33.333%;flex-basis:33.333%}');var jt={formFooter:{type:Object,default:function(){return{show:!0,okBtn:"保存",cancelBtn:"取消"}}},modelValue:{type:null,default:function(){return{}},required:!0},fallbackLabel:{type:Boolean,default:!1},formProps:{type:Object,default:function(){return{}}},schema:{type:Object,default:function(){return{}},required:!0},uiSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},errorSchema:{type:Object,default:function(){return{}}}},It={name:"FormFooter",props:{okBtn:{type:String,default:"保存"},cancelBtn:{type:String,default:"取消"},formItemAttrs:{type:Object,default:function(){return{}}},globalOptions:{type:Object,default:function(){return{}}}},emits:["cancel","submit"],setup:function(e,t){var a=t.emit,o=e.globalOptions.COMPONENT_MAP;return function(){return r.h(P(o.formItem),i({class:{formFooter_item:!0}},e.formItemAttrs),{default:function(){return[r.h(P(o.button),{onClick:function(){a("cancel")}},{default:function(){return e.cancelBtn}}),r.h(P(o.button),{style:{marginLeft:"10px"},type:"primary",onClick:function(){a("submit")}},{default:function(){return e.okBtn}})]}})}}},Ct={name:"FieldGroupWrap",inject:["genFormProvide"],props:{curNodePath:{type:String,default:""},showTitle:{type:Boolean,default:!0},showDescription:{type:Boolean,default:!0},title:{type:String,default:""},description:{type:String,default:""}},computed:{trueTitle:function(){var e=this.title;if(e)return e;var r=(this.genFormProvide.value||this.genFormProvide).fallbackLabel&&this.curNodePath.split(".").pop();return r!=="".concat(Number(r))?r:""}}},At={class:"fieldGroupWrap"},Rt={key:0,class:"fieldGroupWrap_title"},$t={class:"fieldGroupWrap_box"};Ct.render=function(e,t,a,o,n,i){return r.openBlock(),r.createBlock("div",At,[a.showTitle&&i.trueTitle?(r.openBlock(),r.createBlock("h3",Rt,r.toDisplayString(i.trueTitle),1)):r.createCommentVNode("v-if",!0),a.showDescription&&a.description?(r.openBlock(),r.createBlock("p",{key:1,class:"fieldGroupWrap_des",innerHTML:a.description},null,8,["innerHTML"])):r.createCommentVNode("v-if",!0),r.createVNode("div",$t,[r.renderSlot(e.$slots,"default")])])},Ct.__file="utils/components/FieldGroupWrap.vue";var Nt={formProps:{type:null},globalOptions:{type:null},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},customFormats:{type:Object,default:function(){return{}}},rootSchema:{type:Object,default:function(){return{}}},rootFormData:{type:null,default:function(){return{}}},curNodePath:{type:String,default:""},required:{type:Boolean,default:!1},needValidFieldGroup:{type:Boolean,default:!0}},Lt={class:"genFormIcon genFormIcon-down",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},Tt=r.createVNode("path",{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"},null,-1);var zt={render:function(e,t){return r.openBlock(),r.createBlock("svg",Lt,[Tt])},__file:"utils/icons/IconCaretDown.vue"},Vt={class:"genFormIcon genFormIcon-up",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},qt=r.createVNode("path",{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"},null,-1);var Bt={render:function(e,t){return r.openBlock(),r.createBlock("svg",Vt,[qt])},__file:"utils/icons/IconCaretUp.vue"},Mt={class:"genFormIcon genFormIcon-close",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},Ut=r.createVNode("path",{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1\n 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0\n 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"},null,-1);var Wt={render:function(e,t){return r.openBlock(),r.createBlock("svg",Mt,[Ut])},__file:"utils/icons/IconClose.vue"},Qt={class:"genFormIcon genFormIcon-plus",t:"1551322312294",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"10297","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"200",height:"200"},Ht=r.createVNode("path",{d:"M474 152m8 0l60 0q8 0 8 8l0 704q0 8-8 8l-60 0q-8 0-8-8l0-704q0-8 8-8Z","p-id":"10298"},null,-1),Kt=r.createVNode("path",{d:"M168 474m8 0l672 0q8 0 8 8l0 60q0 8-8 8l-672 0q-8 0-8-8l0-60q0-8 8-8Z","p-id":"10299"},null,-1);var Gt={render:function(e,t){return r.openBlock(),r.createBlock("svg",Qt,[Ht,Kt])},__file:"utils/icons/IconPlus.vue"},Jt={class:"genFormIcon genFormIcon-qs",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},Zt=r.createVNode("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 708c-22.1\n 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 0\n 0-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8\n 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6\n 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6\n 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z"},null,-1);var Yt={render:function(e,t){return r.openBlock(),r.createBlock("svg",Jt,[Zt])},__file:"utils/icons/IconQuestion.vue"},Xt={name:"Widget",props:{isFormData:{type:Boolean,default:!0},curValue:{type:null,default:0},schema:{type:Object,default:function(){return{}}},uiSchema:{type:Object,default:function(){return{}}},errorSchema:{type:Object,default:function(){return{}}},customFormats:{type:Object,default:function(){return{}}},customRule:{type:Function,default:null},widget:{type:[String,Function,Object],default:null},required:{type:Boolean,default:!1},emptyValue:{type:null,default:void 0},rootFormData:{type:null},curNodePath:{type:String,default:""},label:{type:String,default:""},width:{type:String,default:""},labelWidth:{type:String,default:""},description:{type:String,default:""},widgetAttrs:{type:Object,default:function(){return{}}},widgetClass:{type:Object,default:function(){return{}}},widgetStyle:{type:Object,default:function(){return{}}},fieldAttrs:{type:Object,default:function(){return{}}},fieldClass:{type:Object,default:function(){return{}}},fieldStyle:{type:Object,default:function(){return{}}},uiProps:{type:Object,default:function(){return{}}},formProps:null,getWidget:null,globalOptions:null,onChange:null},emits:["change"],inheritAttrs:!0,setup:function(e,t){var a=t.emit,o=r.inject("genFormProvide"),n=r.computed({get:function(){return e.isFormData?v(e.rootFormData,e.curNodePath):e.curValue},set:function(r){var t=""===r||null===r?e.emptyValue:r;e.isFormData&&b(e.rootFormData,e.curNodePath,t),a("change",t)}});e.uiProps.enumOptions&&e.uiProps.enumOptions.length>0&&void 0===n.value&&n.value!==e.uiProps.enumOptions[0]&&(e.schema.items?n.value=[]:e.required&&(n.value=e.uiProps.enumOptions[0].value));var s=r.ref(null);return"function"==typeof e.getWidget&&r.watch(s,(function(){e.getWidget.call(null,s.value)})),function(){var t=h(e.curNodePath),a=e.globalOptions.HELPERS.isMiniDes(e.formProps),l=e.description?r.h("div",{innerHTML:e.description,class:{genFromWidget_des:!0}}):null,u=e.globalOptions.COMPONENT_MAP,d=a&&l?r.h(P(u.popover),{style:{margin:"0 2px",fontSize:"16px",cursor:"pointer"},placement:"top",trigger:"hover"},{default:function(){return l},reference:function(){return r.h(Yt)}}):null,m=i(i({},e.fieldStyle),e.width?{width:e.width,flexBasis:e.width,paddingRight:"10px"}:{}),p=ht(e.label,e.widget&&o.value.fallbackLabel,e.curNodePath);return r.h(P(u.formItem),i(i(i({class:i(i({},e.fieldClass),{},{genFormItem:!0}),style:m},e.fieldAttrs),e.labelWidth?{labelWidth:e.labelWidth}:{}),e.isFormData?{prop:t?"__$$root":e.curNodePath,rules:[{validator:function(r,a,o){t&&(a=e.rootFormData);var n=Et({formData:a,schema:e.schema,uiSchema:e.uiSchema,customFormats:e.customFormats,errorSchema:e.errorSchema,required:e.required,propPath:e.curNodePath});if(n.length>0)return o?o(n[0].message):Promise.reject(n[0].message);var i=e.customRule;return i&&"function"==typeof i?i({field:e.curNodePath,value:a,rootFormData:e.rootFormData,callback:o}):o?o():Promise.resolve()},trigger:"blur"}]}:{}),i(i({error:function(e){return e.error?r.h("div",{class:{formItemErrorBox:!0},title:e.error},[e.error]):null}},p?{label:function(){return r.h("span",{class:{genFormLabel:!0,genFormItemRequired:e.required}},["".concat(p)].concat(c(d?[d]:[]),["".concat(e.formProps&&e.formProps.labelSuffix||"")]))}}:{}),{},{default:function(t){return[].concat(c(!a&&l?[l]:[]),c(e.widget?[r.h(P(e.widget),i(i(i({style:e.widgetStyle,class:e.widgetClass},e.widgetAttrs),e.uiProps),{},{modelValue:n.value,ref:s,"onUpdate:modelValue":function(r){var t=n.value;t!==r&&(n.value=r,e.onChange&&e.onChange({curVal:r,preVal:t,parentFormData:v(e.rootFormData,e.curNodePath,1),rootFormData:e.rootFormData}))}},t))]:[]))}}))}}},ea={name:"ObjectField",props:Nt,setup:function(e){return function(){var t=e.curNodePath,a=at({schema:e.schema,uiSchema:e.uiSchema,curNodePath:t,rootFormData:e.rootFormData}),o=a.title,n=a.description,s=a.showTitle,u=a.showDescription,d=a.order,m=a.fieldClass,p=a.fieldAttrs,h=a.fieldStyle,g=a.onlyShowIfDependent,y=it(Object.keys(e.schema.properties||{}),d).map((function(a){var o=function(r){return Array.isArray(e.schema.required)&&!!~e.schema.required.indexOf(r)}(a),n=function(r){var t=!1,a=!1;return E(e.schema.dependencies)&&(a=Object.entries(e.schema.dependencies).some((function(a){var o=l(a,2),n=o[0],i=o[1],s=!(!Array.isArray(i)||!~i.indexOf(r));return t=t||s,s&&void 0!==v(e.rootFormData,e.curNodePath)[n]}))),{isDependency:t,curDependent:a}}(a),s=n.isDependency,c=n.curDependent;return s&&g&&!c?null:r.h(pa,i(i({key:a},e),{},{schema:e.schema.properties[a],uiSchema:e.uiSchema[a],errorSchema:e.errorSchema[a],required:o||c,curNodePath:f(t,a)}))}));return r.h(Ct,i({title:o,description:n,showTitle:s,showDescription:u,curNodePath:t,class:i({},m),style:h},p),{default:function(){return[].concat(c(y),c(e.needValidFieldGroup?[r.h(Xt,{key:"validateWidget-object",class:{validateWidget:!0,"validateWidget-object":!0},schema:Object.entries(e.schema).reduce((function(r,t){var a=l(t,2),o=a[0],n=a[1];return!1!==e.schema.additionalProperties&&["properties","id","$id"].includes(o)||(r[o]=n),r}),{}),uiSchema:e.uiSchema,errorSchema:e.errorSchema,curNodePath:t,rootFormData:e.rootFormData,globalOptions:e.globalOptions})]:[]))}})}}},ra={name:"StringField",props:Nt,setup:function(e,t){var a=t.attrs,o=r.computed((function(){var r=ct(e.schema)&&pt(e.schema,e.uiSchema,e.curNodePath,e.rootFormData),t=ot({schema:e.schema,uiSchema:e.uiSchema,curNodePath:e.curNodePath,rootFormData:e.rootFormData},(function(){var t="number"===e.schema.type||"integer"===e.schema.type;return{widget:r?e.globalOptions.WIDGET_MAP.common.select:e.globalOptions.WIDGET_MAP.formats[e.schema.format]||(t?e.globalOptions.WIDGET_MAP.types.number:e.globalOptions.WIDGET_MAP.types.string)}}));return r&&!t.uiProps.enumOptions&&(t.uiProps.enumOptions=r),t}));return function(){return r.h(Xt,i(i(i({},e),a),o.value))}}},ta={name:"NumberField",props:Nt,setup:function(e,t){var a=t.attrs;return function(){return r.h(ra,i(i({},e),a))}}},aa={name:"IntegerField",props:Nt,setup:function(e,t){var a=t.attrs;return function(){return r.h(ra,i(i({},e),a))}}},oa={name:"BooleanField",props:Nt,setup:function(e,t){var a=t.attrs;return function(){var t=e.schema,o=e.uiSchema,n=e.curNodePath,s=e.rootFormData,l=e.globalOptions,c=pt({enumNames:t.enumNames||["true","false"],enum:t.enum||[!0,!1]},o,n,s),u=ot({schema:t,uiSchema:o,curNodePath:n,rootFormData:s},(function(){return{widget:l.WIDGET_MAP.types.boolean}}));return u.uiProps.enumOptions=u.uiProps.enumOptions||c,r.h(Xt,i(i(i({},a),e),u))}}},na={name:"ArrayOrderList",emits:["arrayOperate"],props:{vNodeList:{type:Array,default:[]},tupleItemsLength:{type:Number,default:0},addable:{type:Boolean,default:!0},showIndexNumber:{type:Boolean,default:!1},sortable:{type:Boolean,default:!0},removable:{type:Boolean,default:!0},maxItems:{},minItems:{},globalOptions:null},setup:function(e,t){var a=t.emit,o=r.computed((function(){var r=e.addable,t=e.maxItems,a=e.vNodeList;return!!r&&(void 0===t||a.length<t)})),n=r.computed((function(){var r=e.removable,t=e.minItems,a=e.vNodeList;return!!r&&(void 0===t||a.length>t)}));return function(){return e.vNodeList.length<=0&&!e.addable?null:r.h("div",{class:{arrayOrderList:!0}},e.vNodeList.map((function(t,o){var s=t.key,l=t.vNode,c=e.tupleItemsLength+o,u=o+1;return r.h("div",{key:s,class:{arrayOrderList_item:!0}},[e.showIndexNumber?r.h("div",{class:{arrayListItem_index:!0}},u):null,r.h("div",{class:{arrayListItem_operateTool:!0}},[r.h("button",{style:i({},e.sortable?{}:{display:"none"}),class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-top":!0},type:"button",disabled:!e.sortable||0===o,onClick:function(){a("arrayOperate",{command:"moveUp",data:{index:c}})}},[r.h(Bt)]),r.h("button",{style:i({},e.sortable?{}:{display:"none"}),class:{arrayListItem_btn:!0,"arrayListItem_orderBtn-bottom":!0},type:"button",disabled:!e.sortable||o===e.vNodeList.length-1,onClick:function(){a("arrayOperate",{command:"moveDown",data:{index:c}})}},[r.h(zt)]),r.h("button",{style:i({},e.removable?{}:{display:"none"}),class:{arrayListItem_btn:!0,"arrayListItem_btn-delete":!0},type:"button",disabled:!n.value,onClick:function(){a("arrayOperate",{command:"remove",data:{index:c}})}},[r.h(Wt)])]),r.h("div",{class:{arrayListItem_content:!0}},[l])])})).concat([r.h("p",{style:i({},o.value?{}:{display:"none"}),class:{arrayOrderList_bottomAddBtn:!0}},[r.h("button",{class:{bottomAddBtn:!0,"is-plain":!0,genFormBtn:!0},type:"button",onClick:function(){a("arrayOperate",{command:"add"})}},[r.h(Gt,{style:{marginRight:"5px"}}),e.maxItems?"( ".concat(e.vNodeList.length," / ").concat(e.maxItems," )"):""])])]))}}},ia={name:"ArrayFieldNormal",props:i(i({},Nt),{},{itemsFormData:{type:Array}}),setup:function(e,t){var a=t.attrs;return function(){var t=e.schema,o=e.uiSchema,n=e.curNodePath,s=e.rootFormData,l=e.itemsFormData,c=e.errorSchema,u=e.globalOptions,d=at({schema:t,uiSchema:o,curNodePath:n,rootFormData:s}),m=d.title,p=d.description,h=d.addable,v=d.showIndexNumber,g=d.sortable,y=d.removable,b=d.showTitle,P=d.showDescription,w=d.fieldClass,E=d.fieldAttrs,S=d.fieldStyle,x=l.map((function(a,s){var l=Xr({schema:t.items,uiSchema:o.items},s);return{key:a.key,vNode:r.h(pa,i(i({key:a.key},e),{},{schema:t.items,required:![].concat(t.items.type).includes("null"),uiSchema:i(i({},o.items),l),errorSchema:c.items,curNodePath:f(n,s)}))}}));return r.h(Ct,{title:m,description:p,showTitle:b,showDescription:P,curNodePath:n,class:w,attrs:E,style:S},{default:function(){return r.h(na,i(i({},a),{},{vNodeList:x,showIndexNumber:v,addable:h,sortable:g,removable:y,maxItems:t.maxItems,minItems:t.minItems,globalOptions:u}))}})}}},sa={name:"ArrayFieldMultiSelect",props:i({},Nt),setup:function(e,t){var a=t.attrs;return function(){var t=e.schema,o=e.rootSchema,n=e.uiSchema,s=e.curNodePath,l=e.rootFormData,c=e.globalOptions,u=pt(Jr(t.items,o),n,s,l),d=ot({schema:t,uiSchema:n,curNodePath:s,rootFormData:l},(function(){return{widget:c.WIDGET_MAP.common.checkboxGroup}}));return d.uiProps.multiple=!0,u&&!d.uiProps.enumOptions&&(d.uiProps.enumOptions=u),r.h(Xt,i(i(i({},a),e),d))}}},la={name:"ArrayFieldTuple",props:i(i({},Nt),{},{itemsFormData:{type:Array,default:function(){return[]}}}),emits:["arrayOperate"],setup:function(e,t){var a=t.emit;t.attrs;return function(){var r=!Array.isArray(e.itemsFormData);if(r||e.itemsFormData.length<e.schema.items.length){var t=Dt(e.schema,void 0,e.rootSchema);a("arrayOperate",r?{command:"setNewTarget",data:{newTarget:t}}:{command:"batchPush",data:{pushArray:t.slice(e.itemsFormData.length)}})}}(),function(){if(!Array.isArray(e.itemsFormData))return null;var t,o,n=e.schema,s=e.uiSchema,l=e.errorSchema,u=e.curNodePath,d=e.globalOptions,m=at({schema:n,uiSchema:s,curNodePath:u,rootFormData:e.rootFormData}),p=m.title,h=m.description,v=m.addable,g=m.showIndexNumber,y=m.sortable,b=m.removable,P=m.showTitle,w=m.showDescription,E=m.fieldClass,S=m.fieldAttrs,x=m.fieldStyle,F=(t=e.itemsFormData,o=e.schema.items.length-1,t.reduce((function(e,r,t){return e[t>o?1:0].push(r),e}),[[],[]])),O=F[0].map((function(t,a){return r.h(pa,i(i({key:t.key},e),{},{required:![].concat(n.items[a].type).includes("null"),schema:n.items[a],uiSchema:s.items?s.items[a]:{},errorSchema:l.items?l.items[a]:{},curNodePath:f(u,a)}))})),_=F[1].map((function(t,a){var o=Xr({schema:n.additionalItems,uiSchema:s.additionalItems},a);return{key:t.key,vNode:r.h(pa,i(i({key:t.key},e),{},{schema:n.additionalItems,required:![].concat(n.additionalItems.type).includes("null"),uiSchema:i(i({},s.additionalItems),o),errorSchema:l.additionalItems,curNodePath:f(e.curNodePath,a+n.items.length)}))}})),D=(void 0===v||v)&&mt(e.schema);return r.h(Ct,i(i({title:p,description:h,showTitle:P,showDescription:w,curNodePath:u},S),{},{class:E,style:x}),{default:function(){return[].concat(c(O),[r.h(na,{onArrayOperate:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return a.apply(void 0,["arrayOperate"].concat(r))},vNodeList:_,tupleItemsLength:n.items.length,addable:D,showIndexNumber:g,sortable:y,removable:b,maxItems:n.maxItems,minItems:n.minItems,globalOptions:d})])}})}}},ca={name:"ArrayFieldSpecialFormat",props:Nt,setup:function(e,t){var a=t.attrs,o=e.schema,n=e.uiSchema,s=e.curNodePath,l=e.rootFormData,c=ot({schema:i({"ui:widget":e.globalOptions.WIDGET_MAP.formats[o.format]},o),uiSchema:n,curNodePath:s,rootFormData:l});return function(){return r.h(Xt,i(i(i({},a),e),c))}}},ua={name:"ArrayField",props:Nt,setup:function(e){var t=function(){var r=v(e.rootFormData,e.curNodePath);return Array.isArray(r)?r:[]},o=r.ref(t().map((function(){return k()}))),n=r.computed((function(){return t()}));r.watch(n,(function(e,t){e!==t&&r.toRaw(e)!==r.toRaw(t)&&Array.isArray(e)&&(o.value=e.map((function(){return k()})))}),{deep:!0});var s=r.computed((function(){return n.value.map((function(e,r){return{key:o.value[r],value:e}}))})),c=function(r){var t=r.command,a=r.data,i={moveUp:function(e,r){!function(e,r){if(0===r)return!1;var t=[e[r],e[r-1]];e.splice.apply(e,[r-1,2].concat(t))}(e,r.index)},moveDown:function(e,r){!function(e,r){if(r===e.length-1)return!1;var t=e[r],a=[e[r+1],t];e.splice.apply(e,[r,2].concat(a))}(e,r.index)},remove:function(e,r){!function(e,r){e.splice(r,1).length}(e,r.index)},add:function(e,r){var t=r.newRowData;e.push(t)},batchPush:function(e,r){r.pushArray.forEach((function(r){e.push(r)}))},setNewTarget:function(e,r){b(r.formData,r.nodePath,r.newTarget)}}[t];if(!i)throw new Error("错误 - 未知的操作:[".concat(t,"]"));var s,l,c,u=a,d=a;"add"===t?(u={newRowData:(s=e.schema,l=e.rootSchema,c=s.items,ut(s)&&mt(s)&&(c=s.additionalItems),Dt(c,void 0,l))},d={newRowData:k()}):"batchPush"===t?d={pushArray:u.pushArray.map((function(e){return k()}))}:"setNewTarget"===t&&(u={formData:e.rootFormData,nodePath:e.curNodePath,newTarget:u.newTarget},d={formData:o,nodePath:"value",newTarget:u.newTarget.map((function(e){return k()}))}),i.apply(null,[o.value,d]),i.apply(null,[n.value,u])};return function(){var t=e.schema,o=e.uiSchema,n=e.rootSchema,u=e.rootFormData,d=e.curNodePath,m=e.globalOptions;if(!t.hasOwnProperty("items"))throw new Error("[".concat(t,"] 请先定义 items属性"));if(dt(t,n))return r.h(sa,i(i({},e),{},{class:a({},A(sa.name),!0)}));if(t.format||t["ui:widget"]||o["ui:widget"])return r.h(ca,i(i({},e),{},{class:a({},A(ca.name),!0)}));var p=ut(t)?la:ia;return r.h("div",[r.h(p,i(i({itemsFormData:s.value},e),{},{onArrayOperate:c,class:a({},A(p.name),!0)})),e.needValidFieldGroup?r.h(Xt,{key:"validateWidget-array",class:{validateWidget:!0,"validateWidget-array":!0},schema:Object.entries(t).reduce((function(e,r){var t=l(r,2),a=t[0],o=t[1];return"items"!==a&&(e[a]=o),e}),{}),uiSchema:o,errorSchema:e.errorSchema,curNodePath:d,rootFormData:u,globalOptions:m}):null])}}},da={name:"SelectLinkageField",props:i(i({},Nt),{},{combiningType:{type:String,default:"anyOf"},selectList:{type:Array,require:!0}}),setup:function(e){var t,o,n=r.ref((t=v(e.rootFormData,e.curNodePath),0!==(o=xt(t,e.selectList,e.rootSchema,!0))?o:e.curSelectIndex||0)),c=function(){var t=ot({schema:e.schema["".concat(e.combiningType,"Select")]||{},uiSchema:e.uiSchema["".concat(e.combiningType,"Select")]||{},curNodePath:e.curNodePath,rootFormData:e.rootFormData},(function(){return{widget:"SelectWidget"}}));if(t.label=t.label||e.schema.title,t.description=t.description||e.schema.description,!t.uiProps.enumOptions){var o=e.uiSchema[e.combiningType]||[];t.uiProps.enumOptions=e.selectList.map((function(e,r){return{label:at({schema:e,uiSchema:o[r],containsSpec:!1}).title||"选项 ".concat(r+1),value:r}}))}return r.h(Xt,i(i({key:"fieldSelect_".concat(e.combiningType),class:a({},"fieldSelect_".concat(e.combiningType),!0),isFormData:!1,curValue:n.value,globalOptions:e.globalOptions},t),{},{onChange:function(e){n.value=e}}))};return r.watch(n,(function(r,t){var a=v(e.rootFormData,e.curNodePath),o=Dt(e.selectList[r],void 0,e.rootSchema),n=Object.prototype.hasOwnProperty;if(E(a)){var i=Jr(e.selectList[t],e.rootSchema);if("object"===F(i))for(var s in i.properties)n.call(i.properties,s)&&!n.call(o,s)&&y(a,s)}E(o)?Object.entries(o).forEach((function(e){var r=l(e,2),t=r[0],o=r[1];void 0!==o&&b(a,t,o)})):b(e.rootFormData,e.curNodePath,o||a)})),function(){var t,o=e.curNodePath,l=p(o),u=null;if(("object"===e.schema.type||e.schema.properties)&&!function(e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!1;return!0}(e.schema.properties)){var d,h=Object.assign({},e.schema);delete h[e.combiningType],u=r.h(pa,i(i({key:"origin_".concat(e.combiningType),class:(d={},a(d,"".concat(e.combiningType,"_originBox"),!0),a(d,"".concat(l,"-originBox"),!0),d)},e),{},{schema:h}))}var f=[c()],v=e.selectList[n.value];if(v){var g=e.schema,y=e.combiningType,b="".concat(e.combiningType,"Select");g.properties,g[y],g[b];var P=s(g,["properties",y,b].map(m));v=Object.assign({},P,v);var w=j(at({schema:e.schema,uiSchema:e.uiSchema,containsSpec:!1,curNodePath:o,rootFormData:e.rootFormData}),(function(r){return r===e.combiningType?void 0:"ui:".concat(r)})),E=j(nt({schema:e.schema,uiSchema:e.uiSchema,errorSchema:e.errorSchema}),(function(r){return r===e.combiningType?void 0:"err:".concat(r)}));f.push(r.h(pa,i(i({key:"appendSchema_".concat(e.combiningType)},e),{},{schema:i({"ui:showTitle":!1,"ui:showDescription":!1},v),required:e.required,uiSchema:i(i({},w),(e.uiSchema[e.combiningType]||[])[n.value]),errorSchema:i(i({},E),(e.errorSchema[e.combiningType]||[])[n.value])})))}return f.push(r.h(Xt,{key:"validateWidget-".concat(e.combiningType),class:a({validateWidget:!0},"validateWidget-".concat(e.combiningType),!0),schema:e.schema,uiSchema:e.uiSchema,errorSchema:e.errorSchema,curNodePath:e.curNodePath,rootFormData:e.rootFormData,globalOptions:e.globalOptions})),r.h("div",[u,r.h("div",{key:"appendBox_".concat(e.combiningType),class:(t={appendCombining_box:!0},a(t,"".concat(e.combiningType,"_appendBox"),!0),a(t,"".concat(l,"-appendBox"),!0),t)},f)])}}},ma={array:ua,boolean:oa,integer:aa,number:ta,object:ea,string:ra,null:{render:function(){return null}},anyOf:{name:"AnyOfField",setup:function(e,t){var a=t.attrs,o=t.slots;return function(){return r.h(da,i(i({},a),{},{combiningType:"anyOf",selectList:a.schema.anyOf}),o)}}},oneOf:{name:"oneOfField",setup:function(e,t){var a=t.attrs,o=t.slots;return function(){return r.h(da,i(i({},a),{},{combiningType:"oneOf",selectList:a.schema.oneOf}),o)}}}},pa={name:"SchemaField",props:Nt,setup:function(e){return function(){var t,o=Jr(e.schema,e.rootSchema),n=i(i({},e),{},{schema:o});if(0===Object.keys(o).length)return null;var s,l,c=rt(ma,n),u=c.field,d=c.fieldProps,m=et({schema:o,uiSchema:e.uiSchema,curNodePath:e.curNodePath,rootFormData:e.rootFormData}),h=p(e.curNodePath);return o.anyOf&&o.anyOf.length>0&&!ct(o)?r.h(P(ma.anyOf),i({class:(s={},a(s,"".concat(h,"-anyOf"),!0),a(s,"fieldItem",!0),a(s,"anyOfField",!0),s)},n)):o.oneOf&&o.oneOf.length>0&&!ct(o)?r.h(P(ma.oneOf),i({class:(l={},a(l,"".concat(h,"-oneOf"),!0),a(l,"fieldItem",!0),a(l,"oneOfField",!0),l)},n)):u&&!m?r.h(P(u),i(i({},n),{},{fieldProps:d,class:(t={},a(t,A(u.name)||u,!0),a(t,"hiddenWidget",m),a(t,"fieldItem",!0),a(t,h,!0),t)})):null}}};var ha={name:"CheckboxesWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}};ha.render=function(e,t,a,o,n,i){var s=r.resolveComponent("el-checkbox"),l=r.resolveComponent("el-checkbox-group");return r.openBlock(),r.createBlock(l,e.$attrs,{default:r.withCtx((function(){return[(r.openBlock(!0),r.createBlock(r.Fragment,null,r.renderList(a.enumOptions,(function(e,t){return r.openBlock(),r.createBlock(s,{key:t,label:e.value},{default:r.withCtx((function(){return[r.createTextVNode(r.toDisplayString(e.label),1)]})),_:2},1032,["label"])})),128))]})),_:1},16)},ha.__file="src/config/widgets/CheckboxesWidget/index.vue";var fa={name:"RadioWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}};fa.render=function(e,t,a,o,n,i){var s=r.resolveComponent("el-radio"),l=r.resolveComponent("el-radio-group");return r.openBlock(),r.createBlock(l,e.$attrs,{default:r.withCtx((function(){return[(r.openBlock(!0),r.createBlock(r.Fragment,null,r.renderList(a.enumOptions,(function(e,t){return r.openBlock(),r.createBlock(s,{key:t,label:e.value},{default:r.withCtx((function(){return[r.createTextVNode(r.toDisplayString(e.label),1)]})),_:2},1032,["label"])})),128))]})),_:1},16)},fa.__file="src/config/widgets/RadioWidget/index.vue";var va={name:"SelectWidget",props:{enumOptions:{default:function(){return[]},type:[Array]}}};function ga(e){return null===e||""===e||Array.isArray(e)&&e.every((function(e){return""===e}))}va.render=function(e,t,a,o,n,i){var s=r.resolveComponent("el-option"),l=r.resolveComponent("el-select");return r.openBlock(),r.createBlock(l,e.$attrs,{default:r.withCtx((function(){return[(r.openBlock(!0),r.createBlock(r.Fragment,null,r.renderList(a.enumOptions,(function(e,t){return r.openBlock(),r.createBlock(s,{key:t,label:e.label,value:e.value},null,8,["label","value"])})),128))]})),_:1},16)},va.__file="src/config/widgets/SelectWidget/index.vue";var ya=function(e){var r=C(e,!1),t=r.year,a=r.month,o=r.day;return"".concat(t,"-").concat(a,"-").concat(o)},ba=function(e){if(e instanceof Date)return e;if("string"==typeof e){var r=l(e.split(":"),3),t=r[0],a=r[1],o=r[2],n=new Date;return n.setHours(+t),n.setMinutes(+a),n.setSeconds(+o),n}},Pa={CheckboxesWidget:ha,RadioWidget:fa,SelectWidget:va,TimePickerWidget:{name:"TimePickerWidget",inheritAttrs:!1,props:{modelValue:{default:null,type:null}},setup:function(e,t){var a=t.attrs,o=t.slots,n=r.ref(ba(e.modelValue)),s=e.modelValue;return r.watch((function(){return e.modelValue}),(function(e){e!==s&&(n.value=ba(e))})),function(){return r.h(P("el-time-picker"),i(i({},a),{},{modelValue:n.value,"onUpdate:modelValue":function(e){var r,t,o,i;n.value=e,s=null===e?void 0:(r=C(e,!0),t=r.hour,o=r.minute,i=r.second,"".concat(t,":").concat(o,":").concat(i)),a["onUpdate:modelValue"].apply(a,[s])}}),o)}}},DatePickerWidget:{name:"DatePickerWidget",inheritAttrs:!1,setup:function(e,t){var a=t.attrs,o=t.slots;return function(){var e=a||{},t=e.isNumberValue,n=e.isRange,l=s(e,["isNumberValue","isRange"]);return r.h(P("el-date-picker"),i(i({type:n?"daterange":"date"},l),{},{"onUpdate:modelValue":function(e){var r;r=n?ga(e)?[]:e.map((function(e){return t?new Date(e).valueOf():ya(e)})):ga(e)?void 0:t?new Date(e).valueOf():ya(e),a["onUpdate:modelValue"].apply(a,[r])}}),o)}}},DateTimePickerWidget:{name:"DateTimePickerWidget",inheritAttrs:!1,setup:function(e,t){var a=t.attrs,o=t.slots;return function(){var e=a||{},t=e.isNumberValue,n=e.isRange,l=s(e,["isNumberValue","isRange"]);return r.h(P("el-date-picker"),i(i({type:n?"datetimerange":"datetime"},l),{},{"onUpdate:modelValue":function(e){var r=function(e,r,t){return e?null===t?[]:t.map((function(e){return new Date(e)[r?"valueOf":"toISOString"]()})):null===t?void 0:new Date(t)[r?"valueOf":"toISOString"]()}(n,t,e);a["onUpdate:modelValue"].apply(a,[r])}}),o)}}},UploadWidget:{name:"UploadWidget",props:{modelValue:{default:null,type:[String,Array]},responseFileUrl:{default:function(){return function(e){return e?e.url||e.data&&e.data.url:""}},type:[Function]},btnText:{type:String,default:"点击上传"},slots:{type:null,default:null}},setup:function(e,t){var a=t.attrs,o=t.emit,n=e.modelValue,s=Array.isArray(n),l=a.fileList||(s?n.map((function(e,r){return{name:"已上传文件(".concat(r+1,")"),url:e}})):n?[{name:"已上传文件",url:n}]:[]),c=r.ref(l),u=function(r){return r&&(r.response&&e.responseFileUrl(r.response)||r.url)||""},d=function(e){var r;if(s)r=e.length?e.reduce((function(e,r){var t=u(r);return t&&e.push(t),e}),[]):[];else{var t=e[e.length-1];r=u(t)}o("update:modelValue",r)},m=r.getCurrentInstance().appContext.config.globalProperties;return function(){var t=i(i({fileList:c.value,"on-exceed":function(){m.$message&&m.$message.warning("超出文件上传数")},"on-error":function(){m.$message&&m.$message.error("文件上传失败")},"on-preview":function(e){var r=u(e);r&&function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_blank",t=document.createElement("a");t.style.display="none",t.target=r,t.href=e,document.body.appendChild(t),t.click(),document.body.removeChild(t)}(r)}},a),{},{"on-remove":function(e,r){d(r),a["on-remove"]&&a["on-remove"](e,r)},"on-success":function(e,r,t){d(t),a["on-success"]&&a["on-success"](e,r,t)}});s||(t.limit=1);var o=i({default:function(){return r.h(P("el-button"),{type:"primary"},{default:function(){return e.btnText}})}},e.slots||{});return r.h(P("el-upload"),t,o)}}}},wa={types:{boolean:"el-switch",string:"el-input",number:"el-input-number",integer:"el-input-number"},formats:{color:"el-color-picker",time:Pa.TimePickerWidget,date:Pa.DatePickerWidget,"date-time":Pa.DateTimePickerWidget},common:{select:Pa.SelectWidget,radioGroup:Pa.RadioWidget,checkboxGroup:Pa.CheckboxesWidget},widgetComponents:Pa};kt(".genFromComponent.el-form--label-top .el-form-item__label{line-height:26px;padding-bottom:6px;font-size:14px}.genFromComponent .el-checkbox,.genFromComponent .el-color-picker{vertical-align:top}");var Ea={WIDGET_MAP:wa,COMPONENT_MAP:{form:r.defineComponent({inheritAttrs:!1,setup:function(e,t){var a=t.attrs,o=t.slots,n=r.ref(null);return a.setFormRef&&r.onMounted((function(){a.setFormRef(n.value)})),function(){a.setFormRef;var e=s(a,["setFormRef"]);return r.h(P("el-form"),i({ref:n},e),o)}}}),formItem:"el-form-item",button:"el-button",popover:"el-popover"},HELPERS:{isMiniDes:function(e){return e&&["left","right"].includes(e.labelPosition)}}},Sa=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={name:"VueForm",props:jt,emits:["update:modelValue","change","cancel","submit","validation-failed","form-mounted"],setup:function(o,n){var c=n.slots,u=n.emit;if(!t.installed&&e.WIDGET_MAP.widgetComponents){var d=r.getCurrentInstance();Object.entries(e.WIDGET_MAP.widgetComponents).forEach((function(e){var r=l(e,2),t=r[0],a=r[1];return d.appContext.app.component(t,a)})),t.installed=!0}r.provide("genFormProvide",r.computed((function(){return{fallbackLabel:o.fallbackLabel}})));var m=r.ref(Dt(o.schema,o.modelValue,o.schema)),p=r.computed((function(){return i({show:!0,okBtn:"保存",cancelBtn:"取消"},o.formFooter)})),h=null,f=function(e,r){u("update:modelValue",e),u("change",{newValue:e,oldValue:r})},v=function(e,r){if(!O(e,r)){var t=Dt(o.schema,o.modelValue,o.schema);O(m.value,t)||(m.value=t)}};r.watch(m,(function(e,r){f(e,r)}),{deep:!0}),r.watch((function(){return o.schema}),(function(e,r){v(e,r)})),r.watch((function(){return o.modelValue}),(function(e,r){v(e,r)})),f(m.value,o.modelValue);return function(){var t,n=o.formProps,l=n.layoutColumn,d=void 0===l?1:l,f=n.inlineFooter,v=n.inline,g=s(n,["layoutColumn","inlineFooter","inline"]),y={schema:o.schema,uiSchema:o.uiSchema,errorSchema:o.errorSchema,customFormats:o.customFormats,customRule:o.customRule,rootSchema:o.schema,rootFormData:m.value,curNodePath:"",globalOptions:e,formProps:i({labelSuffix:":",labelPosition:"top"},g)};return r.h(P(e.COMPONENT_MAP.form),i({class:(t={genFromComponent:!0,formInlineFooter:f,formInline:v},a(t,"genFromComponent_".concat(o.schema.id,"Form"),!!o.schema.id),a(t,"layoutColumn",!v),a(t,"layoutColumn-".concat(d),!v),t),setFormRef:function(e){h=e,u("form-mounted",e)},model:m},y.formProps),{default:function(){return[r.h(pa,y),c.default?c.default({formData:m,formRefFn:function(){return h}}):p.value.show?r.h(It,{globalOptions:e,okBtn:p.value.okBtn,cancelBtn:p.value.cancelBtn,formItemAttrs:p.value.formItemAttrs,onCancel:function(){u("cancel")},onSubmit:function(){(h.$$validate||h.validate)((function(e,r){return e?u("submit",m):u("validation-failed",r)}))}}):[]]}})}},install:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.component(r.name||t.name,t)}};return t}(Ea);e.SchemaField=pa,e.default=Sa,e.fieldProps=Nt,e.formUtils=ft,e.getDefaultFormState=Dt,e.globalOptions=Ea,e.i18n=Mr,e.schemaValidate=Ft,e.vueUtils=w,Object.defineProperty(e,"__esModule",{value:!0})}));