Scripts/resources/[phone]/npwd/dist/html/7053.js

2 lines
36 KiB
JavaScript
Raw Normal View History

2024-12-29 19:49:12 +00:00
/*! For license information please see 7053.js.LICENSE.txt */
(self.webpackChunk_npwd_nui=self.webpackChunk_npwd_nui||[]).push([[7053],{44149:function(e,t,r){"use strict";var n=r(53198),a=n.ValidatorResult,i=n.SchemaError,s={ignoreProperties:{id:!0,default:!0,description:!0,title:!0,additionalItems:!0,then:!0,else:!0,$schema:!0,$ref:!0,extends:!0}},o=s.validators={};function h(e,t,r,n,a){var i=t.throwError,s=t.throwAll;t.throwError=!1,t.throwAll=!1;var o=this.validateSchema(e,a,t,r);return t.throwError=i,t.throwAll=s,!o.valid&&n instanceof Function&&n(o),o.valid}function u(e,t){if(Object.hasOwnProperty.call(e,t))return e[t];if(t in e)for(;e=Object.getPrototypeOf(e);)if(Object.propertyIsEnumerable.call(e,t))return e[t]}function c(e,t,r,n,a,i){if(this.types.object(e)&&(!t.properties||void 0===t.properties[a]))if(!1===t.additionalProperties)i.addError({name:"additionalProperties",argument:a,message:"is not allowed to have the additional property "+JSON.stringify(a)});else{var s=t.additionalProperties||{};"function"==typeof r.preValidateProperty&&r.preValidateProperty(e,a,s,r,n);var o=this.validateSchema(e[a],s,r,n.makeChild(s,a));o.instance!==i.instance[a]&&(i.instance[a]=o.instance),i.importErrors(o)}}o.type=function(e,t,r,n){if(void 0===e)return null;var i=new a(e,t,r,n),s=Array.isArray(t.type)?t.type:[t.type];if(!s.some(this.testType.bind(this,e,t,r,n))){var o=s.map((function(e){if(e){var t=e.$id||e.id;return t?"<"+t+">":e+""}}));i.addError({name:"type",argument:o,message:"is not of a type(s) "+o})}return i},o.anyOf=function(e,t,r,n){if(void 0===e)return null;var s=new a(e,t,r,n),o=new a(e,t,r,n);if(!Array.isArray(t.anyOf))throw new i("anyOf must be an array");if(!t.anyOf.some(h.bind(this,e,r,n,(function(e){o.importErrors(e)})))){var u=t.anyOf.map((function(e,t){var r=e.$id||e.id;return r?"<"+r+">":e.title&&JSON.stringify(e.title)||e.$ref&&"<"+e.$ref+">"||"[subschema "+t+"]"}));r.nestedErrors&&s.importErrors(o),s.addError({name:"anyOf",argument:u,message:"is not any of "+u.join(",")})}return s},o.allOf=function(e,t,r,n){if(void 0===e)return null;if(!Array.isArray(t.allOf))throw new i("allOf must be an array");var s=new a(e,t,r,n),o=this;return t.allOf.forEach((function(t,a){var i=o.validateSchema(e,t,r,n);if(!i.valid){var h=t.$id||t.id||t.title&&JSON.stringify(t.title)||t.$ref&&"<"+t.$ref+">"||"[subschema "+a+"]";s.addError({name:"allOf",argument:{id:h,length:i.errors.length,valid:i},message:"does not match allOf schema "+h+" with "+i.errors.length+" error[s]:"}),s.importErrors(i)}})),s},o.oneOf=function(e,t,r,n){if(void 0===e)return null;if(!Array.isArray(t.oneOf))throw new i("oneOf must be an array");var s=new a(e,t,r,n),o=new a(e,t,r,n),u=t.oneOf.filter(h.bind(this,e,r,n,(function(e){o.importErrors(e)}))).length,c=t.oneOf.map((function(e,t){return e.$id||e.id||e.title&&JSON.stringify(e.title)||e.$ref&&"<"+e.$ref+">"||"[subschema "+t+"]"}));return 1!==u&&(r.nestedErrors&&s.importErrors(o),s.addError({name:"oneOf",argument:c,message:"is not exactly one from "+c.join(",")})),s},o.if=function(e,t,r,i){if(void 0===e)return null;if(!n.isSchema(t.if))throw new Error('Expected "if" keyword to be a schema');var s,o=h.call(this,e,r,i,null,t.if),u=new a(e,t,r,i);if(o){if(void 0===t.then)return;if(!n.isSchema(t.then))throw new Error('Expected "then" keyword to be a schema');s=this.validateSchema(e,t.then,r,i.makeChild(t.then)),u.importErrors(s)}else{if(void 0===t.else)return;if(!n.isSchema(t.else))throw new Error('Expected "else" keyword to be a schema');s=this.validateSchema(e,t.else,r,i.makeChild(t.else)),u.importErrors(s)}return u},o.propertyNames=function(e,t,r,s){if(this.types.object(e)){var o=new a(e,t,r,s),h=void 0!==t.propertyNames?t.propertyNames:{};if(!n.isSchema(h))throw new i('Expected "propertyNames" to be a schema (object or boolean)');for(var c in e)if(void 0!==u(e,c)){var f=this.validateSchema(c,h,r,s.makeChild(h));o.importErrors(f)}return o}},o.properties=function(e,t,r,n){if(this.types.object(e)){var s=new a(e,t,r,n),o=t.properties||{};for(var h in o){var c=o[h];if(void 0!==c){if(null===c)throw new i('Unexpected null, expected schema in "properties"');"function"==typeof r