>1,e+=I(e/t);o*T>>1I((R-a)/d))&&D("overflow"),a+=m*d,u<=s?1:s+T<=u?T:u-s);if(mI(R/m)&&D("overflow"),d*=m}var f=t.length+1,s=V(a-l,f,0==l);I(a/f)>R-o&&D("overflow"),o+=I(a/f),a%=f,t.splice(a++,0,o)}return String.fromCodePoint.apply(String,t)}function L(e){var t=[],r=(e=z(e)).length,a=128,o=0,s=72,n=!0,i=!1,c=void 0;try{for(var l,d=e[Symbol.iterator]();!(n=(l=d.next()).done);n=!0){var u=l.value;u<128&&t.push(A(u))}}catch(e){i=!0,c=e}finally{try{!n&&d.return&&d.return()}finally{if(i)throw c}}var m=t.length,p=m;for(m&&t.push("-");pI((R-o)/b)&&D("overflow"),o+=(f-a)*b,a=f,!0),y=!1,v=void 0;try{for(var E,P=e[Symbol.iterator]();!(w=(E=P.next()).done);w=!0){var S=E.value;if(SR&&D("overflow"),S==a){for(var j=o,N=x;;N+=x){var k=N<=s?1:s+T<=N?T:N-s;if(j>6|192).toString(16).toUpperCase()+"%"+(63&e|128).toString(16).toUpperCase():"%"+(e>>12|224).toString(16).toUpperCase()+"%"+(e>>6&63|128).toString(16).toUpperCase()+"%"+(63&e|128).toString(16).toUpperCase()}function d(e){for(var t="",r=0,a=e.length;rA-Z\\x5E-\\x7E]",'[\\"\\\\]')),oe=new RegExp(w,"g"),j=new RegExp("(?:(?:%[EFef][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f])|(?:%[89A-Fa-f][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f])|(?:%[0-9A-Fa-f][0-9A-Fa-f]))","g"),se=new RegExp(P("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',E),"g"),ne=new RegExp(P("[^]",w,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),ie=ne;function N(e){var t=d(e);return t.match(oe)?t:e}var E={scheme:"mailto",parse:function(e,t){var r=e,a=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var o=!1,s={},n=r.query.split("&"),i=0,c=n.length;ithis.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();var{$data:e,meta:t}=this.opts;t&&(n.default.call(this,e),this.refs["http://json-schema.org/schema"]=i)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(i)?i:void 0)}}t.exports=r=c,Object.defineProperty(r,"__esModule",{value:!0}),r.default=c;var l=e("./compile/validate"),d=(Object.defineProperty(r,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}}),e("./compile/codegen")),u=(Object.defineProperty(r,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(r,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(r,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(r,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(r,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}}),e("./runtime/validation_error")),m=(Object.defineProperty(r,"ValidationError",{enumerable:!0,get:function(){return u.default}}),e("./compile/ref_error"));Object.defineProperty(r,"MissingRefError",{enumerable:!0,get:function(){return m.default}})},{"./compile/codegen":2,"./compile/ref_error":7,"./compile/validate":15,"./core":18,"./refs/json-schema-2020-12":20,"./runtime/validation_error":32,"./vocabularies/discriminator":55,"./vocabularies/draft2020":57}]},{},[])("2020")});
\ No newline at end of file
diff --git a/src/pretix/static/pretixcontrol/js/ui/editor.js b/src/pretix/static/pretixcontrol/js/ui/editor.js
index cce09a738..5453542ec 100644
--- a/src/pretix/static/pretixcontrol/js/ui/editor.js
+++ b/src/pretix/static/pretixcontrol/js/ui/editor.js
@@ -1,4 +1,7 @@
/*globals $, gettext, fabric, PDFJS*/
+
+window.module = {} // Hack to load ajv-compiled schema without actual module loading
+
fabric.Poweredby = fabric.util.createClass(fabric.Image, {
type: 'poweredby',
@@ -219,7 +222,6 @@ var editor = {
uploaded_file_id: null,
_window_loaded: false,
_fabric_loaded: false,
- schema: null,
_px2mm: function (v) {
return v / editor.pdf_scale / 72 * editor.pdf_page.userUnit * 25.4;
@@ -1320,14 +1322,11 @@ var editor = {
_source_save: function () {
try {
- var Ajv = window.ajv2020
- var ajv = new Ajv()
- var validate = ajv.compile(editor.schema)
var data = JSON.parse($("#source-textarea").val())
- var valid = validate(data)
+ var valid = validate30(data)
if (!valid) {
- console.log(validate.errors)
+ console.log(validate30.errors)
alert("Invalid input syntax. If you're familiar with this, check out the developer console for a full " +
"error log. Otherwise, please contact support.")
} else {
@@ -1463,10 +1462,6 @@ var editor = {
editor._update_save_button();
});
$("#pdf-info-width, #pdf-info-height").bind('change input', editor._paper_size_warning);
-
- $.getJSON($("#schema-url").text(), function (data) {
- editor.schema = data;
- })
}
};
diff --git a/src/pretix/static/schema/pdf-layout.schema.json b/src/pretix/static/schema/pdf-layout.schema.json
index e501272c9..1f0ca8b69 100644
--- a/src/pretix/static/schema/pdf-layout.schema.json
+++ b/src/pretix/static/schema/pdf-layout.schema.json
@@ -1,5 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$comment": "If the schema is changed, regenerate pdf-layout.validate.js with $ ajv compile -s ./pretix/static/schema/pdf-layout.schema.json --spec=draft2020 -o ./pretix/static/schema/pdf-layout.validate.js",
"title": "Ticket Layout",
"description": "Dynamic elements for a PDF layout",
"type": "array",
diff --git a/src/pretix/static/schema/pdf-layout.validate.js b/src/pretix/static/schema/pdf-layout.validate.js
new file mode 100644
index 000000000..de2b0fdfd
--- /dev/null
+++ b/src/pretix/static/schema/pdf-layout.validate.js
@@ -0,0 +1 @@
+"use strict";module.exports = validate30;module.exports.default = validate30;const schema42 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$comment":"If the schema is changed, regenerate pdf-layout.validate.js with $ ajv compile -s ./pretix/static/schema/pdf-layout.schema.json --spec=draft2020 -o ./pretix/static/schema/pdf-layout.validate.js","title":"Ticket Layout","description":"Dynamic elements for a PDF layout","type":"array","items":{"type":"object","description":"Layout object","oneOf":[{"required":["type","left","bottom","size"],"properties":{"type":{"type":"string","const":"barcodearea"},"page":{"description":"Page number this will be shown on, defaults to 1.","type":"number"},"left":{"description":"Position of the element on the x axis in millimeters.","oneOf":[{"type":"number"},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}]},"bottom":{"description":"Position of the element on the y axis in millimeters.","oneOf":[{"type":"number"},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}]},"content":{"description":"Name of a variable to use. The available values depend on event configuration and installed plugins. Defaults to 'secret'.","type":"string"},"text":{"description":"Custom text. Only used when 'content' is set to 'other'.","type":"string"},"text_i18n":{"description":"Custom text in multiple languages. Only used when 'content' is set to 'other_i18n'.","type":"object","patternProperties":{"[a-zA-Z-]+":{"type":"string"}},"additionalProperties":false},"size":{"description":"Size of the barcode in millimeters.","oneOf":[{"type":"number"},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}]},"nowhitespace":{"description":"Whether a barcode should be rendered without margins. Only used for type 'barcodearea'.","type":"boolean"},"color":{"description":"QR color as a tuple of three integers in the 0-255 range and one float in the 0-1 range. The last value (alpha) is ignored by the current implementation but might be used in the future.","type":"array","items":{"type":"number","minimum":0,"maximum":255},"minItems":3,"maxItems":4}},"additionalProperties":false},{"required":["type","left","bottom","content","width","height"],"properties":{"type":{"type":"string","const":"imagearea"},"page":{"description":"Page number this will be shown on, defaults to 1.","type":"number"},"left":{"description":"Position of the element on the x axis in millimeters.","oneOf":[{"type":"number"},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}]},"bottom":{"description":"Position of the element on the y axis in millimeters.","oneOf":[{"type":"number"},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}]},"content":{"description":"Name of a variable to use. The available values depend on event configuration and installed plugins.","type":"string"},"width":{"description":"Width of the element in millimeters.","oneOf":[{"type":"number"},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}]},"height":{"description":"Height of the element in millimeters.","oneOf":[{"type":"number"},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}]}},"additionalProperties":false},{"required":["type","left","bottom","content","width","height","fontsize","fontfamily","bold","italic","align","verticalalign","color"],"properties":{"type":{"type":"string","const":"textcontainer"},"page":{"description":"Page number this will be shown on, defaults to 1.","type":"number"},"left":{"description":"Position of the element on the x axis in millimeters.","oneOf":[{"type":"number"},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}]},"bottom":{"description":"Position of the element on the y axis in millimeters.","oneOf":[{"type":"number"},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}]},"width":{"description":"Width of the element in millimeters.","oneOf":[{"type":"number"},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}]},"height":{"description":"Width of the element in millimeters.","oneOf":[{"type":"number"},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}]},"content":{"description":"Name of a variable to use. The available values depend on event configuration and installed plugins.","type":"string"},"text":{"description":"Custom text. Only used when 'content' is set to 'other'.","type":"string"},"text_i18n":{"description":"Custom text in multiple languages. Only used when 'content' is set to 'other_i18n'.","type":"object","patternProperties":{"[a-zA-Z-]+":{"type":"string"}},"additionalProperties":false},"locale":{"description":"Locale to render the text in.","type":["string","null"],"pattern":"[a-zA-Z-]*"},"fontsize":{"description":"Font size","oneOf":[{"type":"number"},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}]},"lineheight":{"description":"Line height","oneOf":[{"type":"number"},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}]},"fontfamily":{"description":"Font family. The available values depend on installed plugins.","type":"string"},"bold":{"description":"Use bold font variant.","type":"boolean"},"italic":{"description":"Use italic font variant.","type":"boolean"},"autoresize":{"description":"Auto-resize font to fit box.","type":"boolean"},"splitlongwords":{"description":"Indicator for the box fitting algorithm whether long words are allowed to be broken in parts.","type":"boolean"},"align":{"description":"Horizontal text alignment.","type":"string","enum":["left","center","right"]},"verticalalign":{"description":"Vertical text alignment.","type":"string","enum":["top","middle","bottom"]},"color":{"description":"Text color as a tuple of three integers in the 0-255 range and one float in the 0-1 range. The last value (alpha) is ignored by the current implementation but might be used in the future.","type":"array","items":{"type":"number","minimum":0,"maximum":255},"minItems":3,"maxItems":4},"rotation":{"description":"Rotation in degrees.","oneOf":[{"type":"number"},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}]}},"additionalProperties":false},{"required":["type","left","bottom","content","width","fontsize","fontfamily","bold","italic","align","color"],"properties":{"type":{"type":"string","const":"textarea"},"page":{"description":"Page number this will be shown on, defaults to 1.","type":"number"},"left":{"description":"Position of the element on the x axis in millimeters.","oneOf":[{"type":"number"},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}]},"bottom":{"description":"Position of the element on the y axis in millimeters.","oneOf":[{"type":"number"},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}]},"width":{"description":"Width of the element in millimeters.","oneOf":[{"type":"number"},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}]},"content":{"description":"Name of a variable to use. The available values depend on event configuration and installed plugins.","type":"string"},"text":{"description":"Custom text. Only used when 'content' is set to 'other'.","type":"string"},"text_i18n":{"description":"Custom text in multiple languages. Only used when 'content' is set to 'other_i18n'.","type":"object","patternProperties":{"[a-zA-Z-]+":{"type":"string"}},"additionalProperties":false},"locale":{"description":"Locale to render the text in.","type":["string","null"],"pattern":"[a-zA-Z-]*"},"fontsize":{"description":"Font size","oneOf":[{"type":"number"},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}]},"lineheight":{"description":"Line height","oneOf":[{"type":"number"},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}]},"fontfamily":{"description":"Font family. The available values depend on installed plugins.","type":"string"},"bold":{"description":"Use bold font variant.","type":"boolean"},"italic":{"description":"Use italic font variant.","type":"boolean"},"align":{"description":"Text alignment.","type":"string","enum":["left","center","right"]},"color":{"description":"Text color as a tuple of three integers in the 0-255 range and one float in the 0-1 range. The last value (alpha) is ignored by the current implementation but might be used in the future.","type":"array","items":{"type":"number","minimum":0,"maximum":255},"minItems":3,"maxItems":4},"downward":{"description":"Downward rendering of text (recommended for new layouts), but default is false for backwards-compatibility.","type":"boolean"},"rotation":{"description":"Rotation in degrees.","oneOf":[{"type":"number"},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}]}},"additionalProperties":false},{"required":["type","left","bottom","content","size"],"properties":{"type":{"type":"string","const":"poweredby"},"page":{"description":"Page number this will be shown on, defaults to 1.","type":"number"},"left":{"description":"Position of the element on the x axis in millimeters.","oneOf":[{"type":"number"},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}]},"bottom":{"description":"Position of the element on the y axis in millimeters.","oneOf":[{"type":"number"},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}]},"content":{"description":"Name of a style to use. The available values currently are 'dark' and 'white'.","type":"string","enum":["dark","white"]},"size":{"description":"Size of the logo in millimeters.","oneOf":[{"type":"number"},{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$"}]}},"additionalProperties":false}]}};const func3 = Object.prototype.hasOwnProperty;const pattern4 = new RegExp("^-?[0-9]+(\\.[0-9]+)?$", "u");const pattern6 = new RegExp("[a-zA-Z-]+", "u");const pattern19 = new RegExp("[a-zA-Z-]*", "u");function validate30(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate30.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(Array.isArray(data)){var valid0 = true;const len0 = data.length;for(let i0=0; i0 4){const err23 = {instancePath:instancePath+"/" + i0+"/color",schemaPath:"#/items/oneOf/0/properties/color/maxItems",keyword:"maxItems",params:{limit: 4},message:"must NOT have more than 4 items"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}else {if(data11.length < 3){const err24 = {instancePath:instancePath+"/" + i0+"/color",schemaPath:"#/items/oneOf/0/properties/color/minItems",keyword:"minItems",params:{limit: 3},message:"must NOT have fewer than 3 items"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}else {var valid7 = true;const len1 = data11.length;for(let i1=0; i1 255 || isNaN(data12)){const err25 = {instancePath:instancePath+"/" + i0+"/color/" + i1,schemaPath:"#/items/oneOf/0/properties/color/items/maximum",keyword:"maximum",params:{comparison: "<=", limit: 255},message:"must be <= 255"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}else {if(data12 < 0 || isNaN(data12)){const err26 = {instancePath:instancePath+"/" + i0+"/color/" + i1,schemaPath:"#/items/oneOf/0/properties/color/items/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}}else {const err27 = {instancePath:instancePath+"/" + i0+"/color/" + i1,schemaPath:"#/items/oneOf/0/properties/color/items/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}}var valid7 = _errs42 === errors;if(!valid7){break;}}}}}else {const err28 = {instancePath:instancePath+"/" + i0+"/color",schemaPath:"#/items/oneOf/0/properties/color/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}var valid2 = _errs40 === errors;}else {var valid2 = true;}}}}}}}}}}}}}var _valid0 = _errs5 === errors;if(_valid0){valid1 = true;passing0 = 0;var props0 = true;}const _errs44 = errors;if(data0 && typeof data0 == "object" && !Array.isArray(data0)){let missing1;if(((((((data0.type === undefined) && (missing1 = "type")) || ((data0.left === undefined) && (missing1 = "left"))) || ((data0.bottom === undefined) && (missing1 = "bottom"))) || ((data0.content === undefined) && (missing1 = "content"))) || ((data0.width === undefined) && (missing1 = "width"))) || ((data0.height === undefined) && (missing1 = "height"))){const err29 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/oneOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}else {const _errs45 = errors;for(const key3 in data0){if(!(((((((key3 === "type") || (key3 === "page")) || (key3 === "left")) || (key3 === "bottom")) || (key3 === "content")) || (key3 === "width")) || (key3 === "height"))){const err30 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;break;}}if(_errs45 === errors){if(data0.type !== undefined){let data13 = data0.type;const _errs46 = errors;if(typeof data13 !== "string"){const err31 = {instancePath:instancePath+"/" + i0+"/type",schemaPath:"#/items/oneOf/1/properties/type/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}if("imagearea" !== data13){const err32 = {instancePath:instancePath+"/" + i0+"/type",schemaPath:"#/items/oneOf/1/properties/type/const",keyword:"const",params:{allowedValue: "imagearea"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}var valid8 = _errs46 === errors;}else {var valid8 = true;}if(valid8){if(data0.page !== undefined){let data14 = data0.page;const _errs48 = errors;if(!((typeof data14 == "number") && (isFinite(data14)))){const err33 = {instancePath:instancePath+"/" + i0+"/page",schemaPath:"#/items/oneOf/1/properties/page/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}var valid8 = _errs48 === errors;}else {var valid8 = true;}if(valid8){if(data0.left !== undefined){let data15 = data0.left;const _errs50 = errors;const _errs51 = errors;let valid9 = false;let passing4 = null;const _errs52 = errors;if(!((typeof data15 == "number") && (isFinite(data15)))){const err34 = {instancePath:instancePath+"/" + i0+"/left",schemaPath:"#/items/oneOf/1/properties/left/oneOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}var _valid4 = _errs52 === errors;if(_valid4){valid9 = true;passing4 = 0;}const _errs54 = errors;if(errors === _errs54){if(typeof data15 === "string"){if(!pattern4.test(data15)){const err35 = {instancePath:instancePath+"/" + i0+"/left",schemaPath:"#/items/oneOf/1/properties/left/oneOf/1/pattern",keyword:"pattern",params:{pattern: "^-?[0-9]+(\\.[0-9]+)?$"},message:"must match pattern \""+"^-?[0-9]+(\\.[0-9]+)?$"+"\""};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}else {const err36 = {instancePath:instancePath+"/" + i0+"/left",schemaPath:"#/items/oneOf/1/properties/left/oneOf/1/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}var _valid4 = _errs54 === errors;if(_valid4 && valid9){valid9 = false;passing4 = [passing4, 1];}else {if(_valid4){valid9 = true;passing4 = 1;}}if(!valid9){const err37 = {instancePath:instancePath+"/" + i0+"/left",schemaPath:"#/items/oneOf/1/properties/left/oneOf",keyword:"oneOf",params:{passingSchemas: passing4},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}else {errors = _errs51;if(vErrors !== null){if(_errs51){vErrors.length = _errs51;}else {vErrors = null;}}}var valid8 = _errs50 === errors;}else {var valid8 = true;}if(valid8){if(data0.bottom !== undefined){let data16 = data0.bottom;const _errs56 = errors;const _errs57 = errors;let valid10 = false;let passing5 = null;const _errs58 = errors;if(!((typeof data16 == "number") && (isFinite(data16)))){const err38 = {instancePath:instancePath+"/" + i0+"/bottom",schemaPath:"#/items/oneOf/1/properties/bottom/oneOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}var _valid5 = _errs58 === errors;if(_valid5){valid10 = true;passing5 = 0;}const _errs60 = errors;if(errors === _errs60){if(typeof data16 === "string"){if(!pattern4.test(data16)){const err39 = {instancePath:instancePath+"/" + i0+"/bottom",schemaPath:"#/items/oneOf/1/properties/bottom/oneOf/1/pattern",keyword:"pattern",params:{pattern: "^-?[0-9]+(\\.[0-9]+)?$"},message:"must match pattern \""+"^-?[0-9]+(\\.[0-9]+)?$"+"\""};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}}else {const err40 = {instancePath:instancePath+"/" + i0+"/bottom",schemaPath:"#/items/oneOf/1/properties/bottom/oneOf/1/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}}var _valid5 = _errs60 === errors;if(_valid5 && valid10){valid10 = false;passing5 = [passing5, 1];}else {if(_valid5){valid10 = true;passing5 = 1;}}if(!valid10){const err41 = {instancePath:instancePath+"/" + i0+"/bottom",schemaPath:"#/items/oneOf/1/properties/bottom/oneOf",keyword:"oneOf",params:{passingSchemas: passing5},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}else {errors = _errs57;if(vErrors !== null){if(_errs57){vErrors.length = _errs57;}else {vErrors = null;}}}var valid8 = _errs56 === errors;}else {var valid8 = true;}if(valid8){if(data0.content !== undefined){const _errs62 = errors;if(typeof data0.content !== "string"){const err42 = {instancePath:instancePath+"/" + i0+"/content",schemaPath:"#/items/oneOf/1/properties/content/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}var valid8 = _errs62 === errors;}else {var valid8 = true;}if(valid8){if(data0.width !== undefined){let data18 = data0.width;const _errs64 = errors;const _errs65 = errors;let valid11 = false;let passing6 = null;const _errs66 = errors;if(!((typeof data18 == "number") && (isFinite(data18)))){const err43 = {instancePath:instancePath+"/" + i0+"/width",schemaPath:"#/items/oneOf/1/properties/width/oneOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}var _valid6 = _errs66 === errors;if(_valid6){valid11 = true;passing6 = 0;}const _errs68 = errors;if(errors === _errs68){if(typeof data18 === "string"){if(!pattern4.test(data18)){const err44 = {instancePath:instancePath+"/" + i0+"/width",schemaPath:"#/items/oneOf/1/properties/width/oneOf/1/pattern",keyword:"pattern",params:{pattern: "^-?[0-9]+(\\.[0-9]+)?$"},message:"must match pattern \""+"^-?[0-9]+(\\.[0-9]+)?$"+"\""};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}else {const err45 = {instancePath:instancePath+"/" + i0+"/width",schemaPath:"#/items/oneOf/1/properties/width/oneOf/1/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}var _valid6 = _errs68 === errors;if(_valid6 && valid11){valid11 = false;passing6 = [passing6, 1];}else {if(_valid6){valid11 = true;passing6 = 1;}}if(!valid11){const err46 = {instancePath:instancePath+"/" + i0+"/width",schemaPath:"#/items/oneOf/1/properties/width/oneOf",keyword:"oneOf",params:{passingSchemas: passing6},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}else {errors = _errs65;if(vErrors !== null){if(_errs65){vErrors.length = _errs65;}else {vErrors = null;}}}var valid8 = _errs64 === errors;}else {var valid8 = true;}if(valid8){if(data0.height !== undefined){let data19 = data0.height;const _errs70 = errors;const _errs71 = errors;let valid12 = false;let passing7 = null;const _errs72 = errors;if(!((typeof data19 == "number") && (isFinite(data19)))){const err47 = {instancePath:instancePath+"/" + i0+"/height",schemaPath:"#/items/oneOf/1/properties/height/oneOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}var _valid7 = _errs72 === errors;if(_valid7){valid12 = true;passing7 = 0;}const _errs74 = errors;if(errors === _errs74){if(typeof data19 === "string"){if(!pattern4.test(data19)){const err48 = {instancePath:instancePath+"/" + i0+"/height",schemaPath:"#/items/oneOf/1/properties/height/oneOf/1/pattern",keyword:"pattern",params:{pattern: "^-?[0-9]+(\\.[0-9]+)?$"},message:"must match pattern \""+"^-?[0-9]+(\\.[0-9]+)?$"+"\""};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}}else {const err49 = {instancePath:instancePath+"/" + i0+"/height",schemaPath:"#/items/oneOf/1/properties/height/oneOf/1/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}}var _valid7 = _errs74 === errors;if(_valid7 && valid12){valid12 = false;passing7 = [passing7, 1];}else {if(_valid7){valid12 = true;passing7 = 1;}}if(!valid12){const err50 = {instancePath:instancePath+"/" + i0+"/height",schemaPath:"#/items/oneOf/1/properties/height/oneOf",keyword:"oneOf",params:{passingSchemas: passing7},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}else {errors = _errs71;if(vErrors !== null){if(_errs71){vErrors.length = _errs71;}else {vErrors = null;}}}var valid8 = _errs70 === errors;}else {var valid8 = true;}}}}}}}}}}var _valid0 = _errs44 === errors;if(_valid0 && valid1){valid1 = false;passing0 = [passing0, 1];}else {if(_valid0){valid1 = true;passing0 = 1;if(props0 !== true){props0 = true;}}const _errs76 = errors;if(data0 && typeof data0 == "object" && !Array.isArray(data0)){let missing2;if((((((((((((((data0.type === undefined) && (missing2 = "type")) || ((data0.left === undefined) && (missing2 = "left"))) || ((data0.bottom === undefined) && (missing2 = "bottom"))) || ((data0.content === undefined) && (missing2 = "content"))) || ((data0.width === undefined) && (missing2 = "width"))) || ((data0.height === undefined) && (missing2 = "height"))) || ((data0.fontsize === undefined) && (missing2 = "fontsize"))) || ((data0.fontfamily === undefined) && (missing2 = "fontfamily"))) || ((data0.bold === undefined) && (missing2 = "bold"))) || ((data0.italic === undefined) && (missing2 = "italic"))) || ((data0.align === undefined) && (missing2 = "align"))) || ((data0.verticalalign === undefined) && (missing2 = "verticalalign"))) || ((data0.color === undefined) && (missing2 = "color"))){const err51 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/oneOf/2/required",keyword:"required",params:{missingProperty: missing2},message:"must have required property '"+missing2+"'"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}else {const _errs77 = errors;for(const key4 in data0){if(!(func3.call(schema42.items.oneOf[2].properties, key4))){const err52 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;break;}}if(_errs77 === errors){if(data0.type !== undefined){let data20 = data0.type;const _errs78 = errors;if(typeof data20 !== "string"){const err53 = {instancePath:instancePath+"/" + i0+"/type",schemaPath:"#/items/oneOf/2/properties/type/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}if("textcontainer" !== data20){const err54 = {instancePath:instancePath+"/" + i0+"/type",schemaPath:"#/items/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue: "textcontainer"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}var valid13 = _errs78 === errors;}else {var valid13 = true;}if(valid13){if(data0.page !== undefined){let data21 = data0.page;const _errs80 = errors;if(!((typeof data21 == "number") && (isFinite(data21)))){const err55 = {instancePath:instancePath+"/" + i0+"/page",schemaPath:"#/items/oneOf/2/properties/page/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}var valid13 = _errs80 === errors;}else {var valid13 = true;}if(valid13){if(data0.left !== undefined){let data22 = data0.left;const _errs82 = errors;const _errs83 = errors;let valid14 = false;let passing8 = null;const _errs84 = errors;if(!((typeof data22 == "number") && (isFinite(data22)))){const err56 = {instancePath:instancePath+"/" + i0+"/left",schemaPath:"#/items/oneOf/2/properties/left/oneOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}var _valid8 = _errs84 === errors;if(_valid8){valid14 = true;passing8 = 0;}const _errs86 = errors;if(errors === _errs86){if(typeof data22 === "string"){if(!pattern4.test(data22)){const err57 = {instancePath:instancePath+"/" + i0+"/left",schemaPath:"#/items/oneOf/2/properties/left/oneOf/1/pattern",keyword:"pattern",params:{pattern: "^-?[0-9]+(\\.[0-9]+)?$"},message:"must match pattern \""+"^-?[0-9]+(\\.[0-9]+)?$"+"\""};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}}else {const err58 = {instancePath:instancePath+"/" + i0+"/left",schemaPath:"#/items/oneOf/2/properties/left/oneOf/1/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}}var _valid8 = _errs86 === errors;if(_valid8 && valid14){valid14 = false;passing8 = [passing8, 1];}else {if(_valid8){valid14 = true;passing8 = 1;}}if(!valid14){const err59 = {instancePath:instancePath+"/" + i0+"/left",schemaPath:"#/items/oneOf/2/properties/left/oneOf",keyword:"oneOf",params:{passingSchemas: passing8},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}else {errors = _errs83;if(vErrors !== null){if(_errs83){vErrors.length = _errs83;}else {vErrors = null;}}}var valid13 = _errs82 === errors;}else {var valid13 = true;}if(valid13){if(data0.bottom !== undefined){let data23 = data0.bottom;const _errs88 = errors;const _errs89 = errors;let valid15 = false;let passing9 = null;const _errs90 = errors;if(!((typeof data23 == "number") && (isFinite(data23)))){const err60 = {instancePath:instancePath+"/" + i0+"/bottom",schemaPath:"#/items/oneOf/2/properties/bottom/oneOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}var _valid9 = _errs90 === errors;if(_valid9){valid15 = true;passing9 = 0;}const _errs92 = errors;if(errors === _errs92){if(typeof data23 === "string"){if(!pattern4.test(data23)){const err61 = {instancePath:instancePath+"/" + i0+"/bottom",schemaPath:"#/items/oneOf/2/properties/bottom/oneOf/1/pattern",keyword:"pattern",params:{pattern: "^-?[0-9]+(\\.[0-9]+)?$"},message:"must match pattern \""+"^-?[0-9]+(\\.[0-9]+)?$"+"\""};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}}else {const err62 = {instancePath:instancePath+"/" + i0+"/bottom",schemaPath:"#/items/oneOf/2/properties/bottom/oneOf/1/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}}var _valid9 = _errs92 === errors;if(_valid9 && valid15){valid15 = false;passing9 = [passing9, 1];}else {if(_valid9){valid15 = true;passing9 = 1;}}if(!valid15){const err63 = {instancePath:instancePath+"/" + i0+"/bottom",schemaPath:"#/items/oneOf/2/properties/bottom/oneOf",keyword:"oneOf",params:{passingSchemas: passing9},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}else {errors = _errs89;if(vErrors !== null){if(_errs89){vErrors.length = _errs89;}else {vErrors = null;}}}var valid13 = _errs88 === errors;}else {var valid13 = true;}if(valid13){if(data0.width !== undefined){let data24 = data0.width;const _errs94 = errors;const _errs95 = errors;let valid16 = false;let passing10 = null;const _errs96 = errors;if(!((typeof data24 == "number") && (isFinite(data24)))){const err64 = {instancePath:instancePath+"/" + i0+"/width",schemaPath:"#/items/oneOf/2/properties/width/oneOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}var _valid10 = _errs96 === errors;if(_valid10){valid16 = true;passing10 = 0;}const _errs98 = errors;if(errors === _errs98){if(typeof data24 === "string"){if(!pattern4.test(data24)){const err65 = {instancePath:instancePath+"/" + i0+"/width",schemaPath:"#/items/oneOf/2/properties/width/oneOf/1/pattern",keyword:"pattern",params:{pattern: "^-?[0-9]+(\\.[0-9]+)?$"},message:"must match pattern \""+"^-?[0-9]+(\\.[0-9]+)?$"+"\""};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}}else {const err66 = {instancePath:instancePath+"/" + i0+"/width",schemaPath:"#/items/oneOf/2/properties/width/oneOf/1/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}}var _valid10 = _errs98 === errors;if(_valid10 && valid16){valid16 = false;passing10 = [passing10, 1];}else {if(_valid10){valid16 = true;passing10 = 1;}}if(!valid16){const err67 = {instancePath:instancePath+"/" + i0+"/width",schemaPath:"#/items/oneOf/2/properties/width/oneOf",keyword:"oneOf",params:{passingSchemas: passing10},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}else {errors = _errs95;if(vErrors !== null){if(_errs95){vErrors.length = _errs95;}else {vErrors = null;}}}var valid13 = _errs94 === errors;}else {var valid13 = true;}if(valid13){if(data0.height !== undefined){let data25 = data0.height;const _errs100 = errors;const _errs101 = errors;let valid17 = false;let passing11 = null;const _errs102 = errors;if(!((typeof data25 == "number") && (isFinite(data25)))){const err68 = {instancePath:instancePath+"/" + i0+"/height",schemaPath:"#/items/oneOf/2/properties/height/oneOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}var _valid11 = _errs102 === errors;if(_valid11){valid17 = true;passing11 = 0;}const _errs104 = errors;if(errors === _errs104){if(typeof data25 === "string"){if(!pattern4.test(data25)){const err69 = {instancePath:instancePath+"/" + i0+"/height",schemaPath:"#/items/oneOf/2/properties/height/oneOf/1/pattern",keyword:"pattern",params:{pattern: "^-?[0-9]+(\\.[0-9]+)?$"},message:"must match pattern \""+"^-?[0-9]+(\\.[0-9]+)?$"+"\""};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}}else {const err70 = {instancePath:instancePath+"/" + i0+"/height",schemaPath:"#/items/oneOf/2/properties/height/oneOf/1/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}}var _valid11 = _errs104 === errors;if(_valid11 && valid17){valid17 = false;passing11 = [passing11, 1];}else {if(_valid11){valid17 = true;passing11 = 1;}}if(!valid17){const err71 = {instancePath:instancePath+"/" + i0+"/height",schemaPath:"#/items/oneOf/2/properties/height/oneOf",keyword:"oneOf",params:{passingSchemas: passing11},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}else {errors = _errs101;if(vErrors !== null){if(_errs101){vErrors.length = _errs101;}else {vErrors = null;}}}var valid13 = _errs100 === errors;}else {var valid13 = true;}if(valid13){if(data0.content !== undefined){const _errs106 = errors;if(typeof data0.content !== "string"){const err72 = {instancePath:instancePath+"/" + i0+"/content",schemaPath:"#/items/oneOf/2/properties/content/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}var valid13 = _errs106 === errors;}else {var valid13 = true;}if(valid13){if(data0.text !== undefined){const _errs108 = errors;if(typeof data0.text !== "string"){const err73 = {instancePath:instancePath+"/" + i0+"/text",schemaPath:"#/items/oneOf/2/properties/text/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}var valid13 = _errs108 === errors;}else {var valid13 = true;}if(valid13){if(data0.text_i18n !== undefined){let data28 = data0.text_i18n;const _errs110 = errors;if(errors === _errs110){if(data28 && typeof data28 == "object" && !Array.isArray(data28)){const _errs112 = errors;for(const key5 in data28){if(!(pattern6.test(key5))){const err74 = {instancePath:instancePath+"/" + i0+"/text_i18n",schemaPath:"#/items/oneOf/2/properties/text_i18n/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;break;}}if(_errs112 === errors){var valid18 = true;for(const key6 in data28){if(pattern6.test(key6)){const _errs113 = errors;if(typeof data28[key6] !== "string"){const err75 = {instancePath:instancePath+"/" + i0+"/text_i18n/" + key6.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/items/oneOf/2/properties/text_i18n/patternProperties/%5Ba-zA-Z-%5D%2B/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}var valid18 = _errs113 === errors;if(!valid18){break;}}}}}else {const err76 = {instancePath:instancePath+"/" + i0+"/text_i18n",schemaPath:"#/items/oneOf/2/properties/text_i18n/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}}var valid13 = _errs110 === errors;}else {var valid13 = true;}if(valid13){if(data0.locale !== undefined){let data30 = data0.locale;const _errs115 = errors;if((typeof data30 !== "string") && (data30 !== null)){const err77 = {instancePath:instancePath+"/" + i0+"/locale",schemaPath:"#/items/oneOf/2/properties/locale/type",keyword:"type",params:{type: schema42.items.oneOf[2].properties.locale.type},message:"must be string,null"};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}if(errors === _errs115){if(typeof data30 === "string"){if(!pattern19.test(data30)){const err78 = {instancePath:instancePath+"/" + i0+"/locale",schemaPath:"#/items/oneOf/2/properties/locale/pattern",keyword:"pattern",params:{pattern: "[a-zA-Z-]*"},message:"must match pattern \""+"[a-zA-Z-]*"+"\""};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}}}var valid13 = _errs115 === errors;}else {var valid13 = true;}if(valid13){if(data0.fontsize !== undefined){let data31 = data0.fontsize;const _errs117 = errors;const _errs118 = errors;let valid19 = false;let passing12 = null;const _errs119 = errors;if(!((typeof data31 == "number") && (isFinite(data31)))){const err79 = {instancePath:instancePath+"/" + i0+"/fontsize",schemaPath:"#/items/oneOf/2/properties/fontsize/oneOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}var _valid12 = _errs119 === errors;if(_valid12){valid19 = true;passing12 = 0;}const _errs121 = errors;if(errors === _errs121){if(typeof data31 === "string"){if(!pattern4.test(data31)){const err80 = {instancePath:instancePath+"/" + i0+"/fontsize",schemaPath:"#/items/oneOf/2/properties/fontsize/oneOf/1/pattern",keyword:"pattern",params:{pattern: "^-?[0-9]+(\\.[0-9]+)?$"},message:"must match pattern \""+"^-?[0-9]+(\\.[0-9]+)?$"+"\""};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}}else {const err81 = {instancePath:instancePath+"/" + i0+"/fontsize",schemaPath:"#/items/oneOf/2/properties/fontsize/oneOf/1/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}}var _valid12 = _errs121 === errors;if(_valid12 && valid19){valid19 = false;passing12 = [passing12, 1];}else {if(_valid12){valid19 = true;passing12 = 1;}}if(!valid19){const err82 = {instancePath:instancePath+"/" + i0+"/fontsize",schemaPath:"#/items/oneOf/2/properties/fontsize/oneOf",keyword:"oneOf",params:{passingSchemas: passing12},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}else {errors = _errs118;if(vErrors !== null){if(_errs118){vErrors.length = _errs118;}else {vErrors = null;}}}var valid13 = _errs117 === errors;}else {var valid13 = true;}if(valid13){if(data0.lineheight !== undefined){let data32 = data0.lineheight;const _errs123 = errors;const _errs124 = errors;let valid20 = false;let passing13 = null;const _errs125 = errors;if(!((typeof data32 == "number") && (isFinite(data32)))){const err83 = {instancePath:instancePath+"/" + i0+"/lineheight",schemaPath:"#/items/oneOf/2/properties/lineheight/oneOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;}var _valid13 = _errs125 === errors;if(_valid13){valid20 = true;passing13 = 0;}const _errs127 = errors;if(errors === _errs127){if(typeof data32 === "string"){if(!pattern4.test(data32)){const err84 = {instancePath:instancePath+"/" + i0+"/lineheight",schemaPath:"#/items/oneOf/2/properties/lineheight/oneOf/1/pattern",keyword:"pattern",params:{pattern: "^-?[0-9]+(\\.[0-9]+)?$"},message:"must match pattern \""+"^-?[0-9]+(\\.[0-9]+)?$"+"\""};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}}else {const err85 = {instancePath:instancePath+"/" + i0+"/lineheight",schemaPath:"#/items/oneOf/2/properties/lineheight/oneOf/1/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}}var _valid13 = _errs127 === errors;if(_valid13 && valid20){valid20 = false;passing13 = [passing13, 1];}else {if(_valid13){valid20 = true;passing13 = 1;}}if(!valid20){const err86 = {instancePath:instancePath+"/" + i0+"/lineheight",schemaPath:"#/items/oneOf/2/properties/lineheight/oneOf",keyword:"oneOf",params:{passingSchemas: passing13},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err86];}else {vErrors.push(err86);}errors++;}else {errors = _errs124;if(vErrors !== null){if(_errs124){vErrors.length = _errs124;}else {vErrors = null;}}}var valid13 = _errs123 === errors;}else {var valid13 = true;}if(valid13){if(data0.fontfamily !== undefined){const _errs129 = errors;if(typeof data0.fontfamily !== "string"){const err87 = {instancePath:instancePath+"/" + i0+"/fontfamily",schemaPath:"#/items/oneOf/2/properties/fontfamily/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err87];}else {vErrors.push(err87);}errors++;}var valid13 = _errs129 === errors;}else {var valid13 = true;}if(valid13){if(data0.bold !== undefined){const _errs131 = errors;if(typeof data0.bold !== "boolean"){const err88 = {instancePath:instancePath+"/" + i0+"/bold",schemaPath:"#/items/oneOf/2/properties/bold/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;}var valid13 = _errs131 === errors;}else {var valid13 = true;}if(valid13){if(data0.italic !== undefined){const _errs133 = errors;if(typeof data0.italic !== "boolean"){const err89 = {instancePath:instancePath+"/" + i0+"/italic",schemaPath:"#/items/oneOf/2/properties/italic/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}var valid13 = _errs133 === errors;}else {var valid13 = true;}if(valid13){if(data0.autoresize !== undefined){const _errs135 = errors;if(typeof data0.autoresize !== "boolean"){const err90 = {instancePath:instancePath+"/" + i0+"/autoresize",schemaPath:"#/items/oneOf/2/properties/autoresize/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}var valid13 = _errs135 === errors;}else {var valid13 = true;}if(valid13){if(data0.splitlongwords !== undefined){const _errs137 = errors;if(typeof data0.splitlongwords !== "boolean"){const err91 = {instancePath:instancePath+"/" + i0+"/splitlongwords",schemaPath:"#/items/oneOf/2/properties/splitlongwords/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err91];}else {vErrors.push(err91);}errors++;}var valid13 = _errs137 === errors;}else {var valid13 = true;}if(valid13){if(data0.align !== undefined){let data38 = data0.align;const _errs139 = errors;if(typeof data38 !== "string"){const err92 = {instancePath:instancePath+"/" + i0+"/align",schemaPath:"#/items/oneOf/2/properties/align/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err92];}else {vErrors.push(err92);}errors++;}if(!(((data38 === "left") || (data38 === "center")) || (data38 === "right"))){const err93 = {instancePath:instancePath+"/" + i0+"/align",schemaPath:"#/items/oneOf/2/properties/align/enum",keyword:"enum",params:{allowedValues: schema42.items.oneOf[2].properties.align.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err93];}else {vErrors.push(err93);}errors++;}var valid13 = _errs139 === errors;}else {var valid13 = true;}if(valid13){if(data0.verticalalign !== undefined){let data39 = data0.verticalalign;const _errs141 = errors;if(typeof data39 !== "string"){const err94 = {instancePath:instancePath+"/" + i0+"/verticalalign",schemaPath:"#/items/oneOf/2/properties/verticalalign/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err94];}else {vErrors.push(err94);}errors++;}if(!(((data39 === "top") || (data39 === "middle")) || (data39 === "bottom"))){const err95 = {instancePath:instancePath+"/" + i0+"/verticalalign",schemaPath:"#/items/oneOf/2/properties/verticalalign/enum",keyword:"enum",params:{allowedValues: schema42.items.oneOf[2].properties.verticalalign.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err95];}else {vErrors.push(err95);}errors++;}var valid13 = _errs141 === errors;}else {var valid13 = true;}if(valid13){if(data0.color !== undefined){let data40 = data0.color;const _errs143 = errors;if(errors === _errs143){if(Array.isArray(data40)){if(data40.length > 4){const err96 = {instancePath:instancePath+"/" + i0+"/color",schemaPath:"#/items/oneOf/2/properties/color/maxItems",keyword:"maxItems",params:{limit: 4},message:"must NOT have more than 4 items"};if(vErrors === null){vErrors = [err96];}else {vErrors.push(err96);}errors++;}else {if(data40.length < 3){const err97 = {instancePath:instancePath+"/" + i0+"/color",schemaPath:"#/items/oneOf/2/properties/color/minItems",keyword:"minItems",params:{limit: 3},message:"must NOT have fewer than 3 items"};if(vErrors === null){vErrors = [err97];}else {vErrors.push(err97);}errors++;}else {var valid21 = true;const len2 = data40.length;for(let i2=0; i2 255 || isNaN(data41)){const err98 = {instancePath:instancePath+"/" + i0+"/color/" + i2,schemaPath:"#/items/oneOf/2/properties/color/items/maximum",keyword:"maximum",params:{comparison: "<=", limit: 255},message:"must be <= 255"};if(vErrors === null){vErrors = [err98];}else {vErrors.push(err98);}errors++;}else {if(data41 < 0 || isNaN(data41)){const err99 = {instancePath:instancePath+"/" + i0+"/color/" + i2,schemaPath:"#/items/oneOf/2/properties/color/items/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err99];}else {vErrors.push(err99);}errors++;}}}else {const err100 = {instancePath:instancePath+"/" + i0+"/color/" + i2,schemaPath:"#/items/oneOf/2/properties/color/items/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err100];}else {vErrors.push(err100);}errors++;}}var valid21 = _errs145 === errors;if(!valid21){break;}}}}}else {const err101 = {instancePath:instancePath+"/" + i0+"/color",schemaPath:"#/items/oneOf/2/properties/color/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err101];}else {vErrors.push(err101);}errors++;}}var valid13 = _errs143 === errors;}else {var valid13 = true;}if(valid13){if(data0.rotation !== undefined){let data42 = data0.rotation;const _errs147 = errors;const _errs148 = errors;let valid22 = false;let passing14 = null;const _errs149 = errors;if(!((typeof data42 == "number") && (isFinite(data42)))){const err102 = {instancePath:instancePath+"/" + i0+"/rotation",schemaPath:"#/items/oneOf/2/properties/rotation/oneOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err102];}else {vErrors.push(err102);}errors++;}var _valid14 = _errs149 === errors;if(_valid14){valid22 = true;passing14 = 0;}const _errs151 = errors;if(errors === _errs151){if(typeof data42 === "string"){if(!pattern4.test(data42)){const err103 = {instancePath:instancePath+"/" + i0+"/rotation",schemaPath:"#/items/oneOf/2/properties/rotation/oneOf/1/pattern",keyword:"pattern",params:{pattern: "^-?[0-9]+(\\.[0-9]+)?$"},message:"must match pattern \""+"^-?[0-9]+(\\.[0-9]+)?$"+"\""};if(vErrors === null){vErrors = [err103];}else {vErrors.push(err103);}errors++;}}else {const err104 = {instancePath:instancePath+"/" + i0+"/rotation",schemaPath:"#/items/oneOf/2/properties/rotation/oneOf/1/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err104];}else {vErrors.push(err104);}errors++;}}var _valid14 = _errs151 === errors;if(_valid14 && valid22){valid22 = false;passing14 = [passing14, 1];}else {if(_valid14){valid22 = true;passing14 = 1;}}if(!valid22){const err105 = {instancePath:instancePath+"/" + i0+"/rotation",schemaPath:"#/items/oneOf/2/properties/rotation/oneOf",keyword:"oneOf",params:{passingSchemas: passing14},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err105];}else {vErrors.push(err105);}errors++;}else {errors = _errs148;if(vErrors !== null){if(_errs148){vErrors.length = _errs148;}else {vErrors = null;}}}var valid13 = _errs147 === errors;}else {var valid13 = true;}}}}}}}}}}}}}}}}}}}}}}}}var _valid0 = _errs76 === errors;if(_valid0 && valid1){valid1 = false;passing0 = [passing0, 2];}else {if(_valid0){valid1 = true;passing0 = 2;if(props0 !== true){props0 = true;}}const _errs153 = errors;if(data0 && typeof data0 == "object" && !Array.isArray(data0)){let missing3;if((((((((((((data0.type === undefined) && (missing3 = "type")) || ((data0.left === undefined) && (missing3 = "left"))) || ((data0.bottom === undefined) && (missing3 = "bottom"))) || ((data0.content === undefined) && (missing3 = "content"))) || ((data0.width === undefined) && (missing3 = "width"))) || ((data0.fontsize === undefined) && (missing3 = "fontsize"))) || ((data0.fontfamily === undefined) && (missing3 = "fontfamily"))) || ((data0.bold === undefined) && (missing3 = "bold"))) || ((data0.italic === undefined) && (missing3 = "italic"))) || ((data0.align === undefined) && (missing3 = "align"))) || ((data0.color === undefined) && (missing3 = "color"))){const err106 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/oneOf/3/required",keyword:"required",params:{missingProperty: missing3},message:"must have required property '"+missing3+"'"};if(vErrors === null){vErrors = [err106];}else {vErrors.push(err106);}errors++;}else {const _errs154 = errors;for(const key7 in data0){if(!(func3.call(schema42.items.oneOf[3].properties, key7))){const err107 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key7},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err107];}else {vErrors.push(err107);}errors++;break;}}if(_errs154 === errors){if(data0.type !== undefined){let data43 = data0.type;const _errs155 = errors;if(typeof data43 !== "string"){const err108 = {instancePath:instancePath+"/" + i0+"/type",schemaPath:"#/items/oneOf/3/properties/type/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err108];}else {vErrors.push(err108);}errors++;}if("textarea" !== data43){const err109 = {instancePath:instancePath+"/" + i0+"/type",schemaPath:"#/items/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue: "textarea"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err109];}else {vErrors.push(err109);}errors++;}var valid23 = _errs155 === errors;}else {var valid23 = true;}if(valid23){if(data0.page !== undefined){let data44 = data0.page;const _errs157 = errors;if(!((typeof data44 == "number") && (isFinite(data44)))){const err110 = {instancePath:instancePath+"/" + i0+"/page",schemaPath:"#/items/oneOf/3/properties/page/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err110];}else {vErrors.push(err110);}errors++;}var valid23 = _errs157 === errors;}else {var valid23 = true;}if(valid23){if(data0.left !== undefined){let data45 = data0.left;const _errs159 = errors;const _errs160 = errors;let valid24 = false;let passing15 = null;const _errs161 = errors;if(!((typeof data45 == "number") && (isFinite(data45)))){const err111 = {instancePath:instancePath+"/" + i0+"/left",schemaPath:"#/items/oneOf/3/properties/left/oneOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err111];}else {vErrors.push(err111);}errors++;}var _valid15 = _errs161 === errors;if(_valid15){valid24 = true;passing15 = 0;}const _errs163 = errors;if(errors === _errs163){if(typeof data45 === "string"){if(!pattern4.test(data45)){const err112 = {instancePath:instancePath+"/" + i0+"/left",schemaPath:"#/items/oneOf/3/properties/left/oneOf/1/pattern",keyword:"pattern",params:{pattern: "^-?[0-9]+(\\.[0-9]+)?$"},message:"must match pattern \""+"^-?[0-9]+(\\.[0-9]+)?$"+"\""};if(vErrors === null){vErrors = [err112];}else {vErrors.push(err112);}errors++;}}else {const err113 = {instancePath:instancePath+"/" + i0+"/left",schemaPath:"#/items/oneOf/3/properties/left/oneOf/1/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err113];}else {vErrors.push(err113);}errors++;}}var _valid15 = _errs163 === errors;if(_valid15 && valid24){valid24 = false;passing15 = [passing15, 1];}else {if(_valid15){valid24 = true;passing15 = 1;}}if(!valid24){const err114 = {instancePath:instancePath+"/" + i0+"/left",schemaPath:"#/items/oneOf/3/properties/left/oneOf",keyword:"oneOf",params:{passingSchemas: passing15},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err114];}else {vErrors.push(err114);}errors++;}else {errors = _errs160;if(vErrors !== null){if(_errs160){vErrors.length = _errs160;}else {vErrors = null;}}}var valid23 = _errs159 === errors;}else {var valid23 = true;}if(valid23){if(data0.bottom !== undefined){let data46 = data0.bottom;const _errs165 = errors;const _errs166 = errors;let valid25 = false;let passing16 = null;const _errs167 = errors;if(!((typeof data46 == "number") && (isFinite(data46)))){const err115 = {instancePath:instancePath+"/" + i0+"/bottom",schemaPath:"#/items/oneOf/3/properties/bottom/oneOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err115];}else {vErrors.push(err115);}errors++;}var _valid16 = _errs167 === errors;if(_valid16){valid25 = true;passing16 = 0;}const _errs169 = errors;if(errors === _errs169){if(typeof data46 === "string"){if(!pattern4.test(data46)){const err116 = {instancePath:instancePath+"/" + i0+"/bottom",schemaPath:"#/items/oneOf/3/properties/bottom/oneOf/1/pattern",keyword:"pattern",params:{pattern: "^-?[0-9]+(\\.[0-9]+)?$"},message:"must match pattern \""+"^-?[0-9]+(\\.[0-9]+)?$"+"\""};if(vErrors === null){vErrors = [err116];}else {vErrors.push(err116);}errors++;}}else {const err117 = {instancePath:instancePath+"/" + i0+"/bottom",schemaPath:"#/items/oneOf/3/properties/bottom/oneOf/1/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err117];}else {vErrors.push(err117);}errors++;}}var _valid16 = _errs169 === errors;if(_valid16 && valid25){valid25 = false;passing16 = [passing16, 1];}else {if(_valid16){valid25 = true;passing16 = 1;}}if(!valid25){const err118 = {instancePath:instancePath+"/" + i0+"/bottom",schemaPath:"#/items/oneOf/3/properties/bottom/oneOf",keyword:"oneOf",params:{passingSchemas: passing16},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err118];}else {vErrors.push(err118);}errors++;}else {errors = _errs166;if(vErrors !== null){if(_errs166){vErrors.length = _errs166;}else {vErrors = null;}}}var valid23 = _errs165 === errors;}else {var valid23 = true;}if(valid23){if(data0.width !== undefined){let data47 = data0.width;const _errs171 = errors;const _errs172 = errors;let valid26 = false;let passing17 = null;const _errs173 = errors;if(!((typeof data47 == "number") && (isFinite(data47)))){const err119 = {instancePath:instancePath+"/" + i0+"/width",schemaPath:"#/items/oneOf/3/properties/width/oneOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err119];}else {vErrors.push(err119);}errors++;}var _valid17 = _errs173 === errors;if(_valid17){valid26 = true;passing17 = 0;}const _errs175 = errors;if(errors === _errs175){if(typeof data47 === "string"){if(!pattern4.test(data47)){const err120 = {instancePath:instancePath+"/" + i0+"/width",schemaPath:"#/items/oneOf/3/properties/width/oneOf/1/pattern",keyword:"pattern",params:{pattern: "^-?[0-9]+(\\.[0-9]+)?$"},message:"must match pattern \""+"^-?[0-9]+(\\.[0-9]+)?$"+"\""};if(vErrors === null){vErrors = [err120];}else {vErrors.push(err120);}errors++;}}else {const err121 = {instancePath:instancePath+"/" + i0+"/width",schemaPath:"#/items/oneOf/3/properties/width/oneOf/1/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err121];}else {vErrors.push(err121);}errors++;}}var _valid17 = _errs175 === errors;if(_valid17 && valid26){valid26 = false;passing17 = [passing17, 1];}else {if(_valid17){valid26 = true;passing17 = 1;}}if(!valid26){const err122 = {instancePath:instancePath+"/" + i0+"/width",schemaPath:"#/items/oneOf/3/properties/width/oneOf",keyword:"oneOf",params:{passingSchemas: passing17},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err122];}else {vErrors.push(err122);}errors++;}else {errors = _errs172;if(vErrors !== null){if(_errs172){vErrors.length = _errs172;}else {vErrors = null;}}}var valid23 = _errs171 === errors;}else {var valid23 = true;}if(valid23){if(data0.content !== undefined){const _errs177 = errors;if(typeof data0.content !== "string"){const err123 = {instancePath:instancePath+"/" + i0+"/content",schemaPath:"#/items/oneOf/3/properties/content/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err123];}else {vErrors.push(err123);}errors++;}var valid23 = _errs177 === errors;}else {var valid23 = true;}if(valid23){if(data0.text !== undefined){const _errs179 = errors;if(typeof data0.text !== "string"){const err124 = {instancePath:instancePath+"/" + i0+"/text",schemaPath:"#/items/oneOf/3/properties/text/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err124];}else {vErrors.push(err124);}errors++;}var valid23 = _errs179 === errors;}else {var valid23 = true;}if(valid23){if(data0.text_i18n !== undefined){let data50 = data0.text_i18n;const _errs181 = errors;if(errors === _errs181){if(data50 && typeof data50 == "object" && !Array.isArray(data50)){const _errs183 = errors;for(const key8 in data50){if(!(pattern6.test(key8))){const err125 = {instancePath:instancePath+"/" + i0+"/text_i18n",schemaPath:"#/items/oneOf/3/properties/text_i18n/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key8},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err125];}else {vErrors.push(err125);}errors++;break;}}if(_errs183 === errors){var valid27 = true;for(const key9 in data50){if(pattern6.test(key9)){const _errs184 = errors;if(typeof data50[key9] !== "string"){const err126 = {instancePath:instancePath+"/" + i0+"/text_i18n/" + key9.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/items/oneOf/3/properties/text_i18n/patternProperties/%5Ba-zA-Z-%5D%2B/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err126];}else {vErrors.push(err126);}errors++;}var valid27 = _errs184 === errors;if(!valid27){break;}}}}}else {const err127 = {instancePath:instancePath+"/" + i0+"/text_i18n",schemaPath:"#/items/oneOf/3/properties/text_i18n/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err127];}else {vErrors.push(err127);}errors++;}}var valid23 = _errs181 === errors;}else {var valid23 = true;}if(valid23){if(data0.locale !== undefined){let data52 = data0.locale;const _errs186 = errors;if((typeof data52 !== "string") && (data52 !== null)){const err128 = {instancePath:instancePath+"/" + i0+"/locale",schemaPath:"#/items/oneOf/3/properties/locale/type",keyword:"type",params:{type: schema42.items.oneOf[3].properties.locale.type},message:"must be string,null"};if(vErrors === null){vErrors = [err128];}else {vErrors.push(err128);}errors++;}if(errors === _errs186){if(typeof data52 === "string"){if(!pattern19.test(data52)){const err129 = {instancePath:instancePath+"/" + i0+"/locale",schemaPath:"#/items/oneOf/3/properties/locale/pattern",keyword:"pattern",params:{pattern: "[a-zA-Z-]*"},message:"must match pattern \""+"[a-zA-Z-]*"+"\""};if(vErrors === null){vErrors = [err129];}else {vErrors.push(err129);}errors++;}}}var valid23 = _errs186 === errors;}else {var valid23 = true;}if(valid23){if(data0.fontsize !== undefined){let data53 = data0.fontsize;const _errs188 = errors;const _errs189 = errors;let valid28 = false;let passing18 = null;const _errs190 = errors;if(!((typeof data53 == "number") && (isFinite(data53)))){const err130 = {instancePath:instancePath+"/" + i0+"/fontsize",schemaPath:"#/items/oneOf/3/properties/fontsize/oneOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err130];}else {vErrors.push(err130);}errors++;}var _valid18 = _errs190 === errors;if(_valid18){valid28 = true;passing18 = 0;}const _errs192 = errors;if(errors === _errs192){if(typeof data53 === "string"){if(!pattern4.test(data53)){const err131 = {instancePath:instancePath+"/" + i0+"/fontsize",schemaPath:"#/items/oneOf/3/properties/fontsize/oneOf/1/pattern",keyword:"pattern",params:{pattern: "^-?[0-9]+(\\.[0-9]+)?$"},message:"must match pattern \""+"^-?[0-9]+(\\.[0-9]+)?$"+"\""};if(vErrors === null){vErrors = [err131];}else {vErrors.push(err131);}errors++;}}else {const err132 = {instancePath:instancePath+"/" + i0+"/fontsize",schemaPath:"#/items/oneOf/3/properties/fontsize/oneOf/1/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err132];}else {vErrors.push(err132);}errors++;}}var _valid18 = _errs192 === errors;if(_valid18 && valid28){valid28 = false;passing18 = [passing18, 1];}else {if(_valid18){valid28 = true;passing18 = 1;}}if(!valid28){const err133 = {instancePath:instancePath+"/" + i0+"/fontsize",schemaPath:"#/items/oneOf/3/properties/fontsize/oneOf",keyword:"oneOf",params:{passingSchemas: passing18},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err133];}else {vErrors.push(err133);}errors++;}else {errors = _errs189;if(vErrors !== null){if(_errs189){vErrors.length = _errs189;}else {vErrors = null;}}}var valid23 = _errs188 === errors;}else {var valid23 = true;}if(valid23){if(data0.lineheight !== undefined){let data54 = data0.lineheight;const _errs194 = errors;const _errs195 = errors;let valid29 = false;let passing19 = null;const _errs196 = errors;if(!((typeof data54 == "number") && (isFinite(data54)))){const err134 = {instancePath:instancePath+"/" + i0+"/lineheight",schemaPath:"#/items/oneOf/3/properties/lineheight/oneOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err134];}else {vErrors.push(err134);}errors++;}var _valid19 = _errs196 === errors;if(_valid19){valid29 = true;passing19 = 0;}const _errs198 = errors;if(errors === _errs198){if(typeof data54 === "string"){if(!pattern4.test(data54)){const err135 = {instancePath:instancePath+"/" + i0+"/lineheight",schemaPath:"#/items/oneOf/3/properties/lineheight/oneOf/1/pattern",keyword:"pattern",params:{pattern: "^-?[0-9]+(\\.[0-9]+)?$"},message:"must match pattern \""+"^-?[0-9]+(\\.[0-9]+)?$"+"\""};if(vErrors === null){vErrors = [err135];}else {vErrors.push(err135);}errors++;}}else {const err136 = {instancePath:instancePath+"/" + i0+"/lineheight",schemaPath:"#/items/oneOf/3/properties/lineheight/oneOf/1/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err136];}else {vErrors.push(err136);}errors++;}}var _valid19 = _errs198 === errors;if(_valid19 && valid29){valid29 = false;passing19 = [passing19, 1];}else {if(_valid19){valid29 = true;passing19 = 1;}}if(!valid29){const err137 = {instancePath:instancePath+"/" + i0+"/lineheight",schemaPath:"#/items/oneOf/3/properties/lineheight/oneOf",keyword:"oneOf",params:{passingSchemas: passing19},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err137];}else {vErrors.push(err137);}errors++;}else {errors = _errs195;if(vErrors !== null){if(_errs195){vErrors.length = _errs195;}else {vErrors = null;}}}var valid23 = _errs194 === errors;}else {var valid23 = true;}if(valid23){if(data0.fontfamily !== undefined){const _errs200 = errors;if(typeof data0.fontfamily !== "string"){const err138 = {instancePath:instancePath+"/" + i0+"/fontfamily",schemaPath:"#/items/oneOf/3/properties/fontfamily/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err138];}else {vErrors.push(err138);}errors++;}var valid23 = _errs200 === errors;}else {var valid23 = true;}if(valid23){if(data0.bold !== undefined){const _errs202 = errors;if(typeof data0.bold !== "boolean"){const err139 = {instancePath:instancePath+"/" + i0+"/bold",schemaPath:"#/items/oneOf/3/properties/bold/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err139];}else {vErrors.push(err139);}errors++;}var valid23 = _errs202 === errors;}else {var valid23 = true;}if(valid23){if(data0.italic !== undefined){const _errs204 = errors;if(typeof data0.italic !== "boolean"){const err140 = {instancePath:instancePath+"/" + i0+"/italic",schemaPath:"#/items/oneOf/3/properties/italic/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err140];}else {vErrors.push(err140);}errors++;}var valid23 = _errs204 === errors;}else {var valid23 = true;}if(valid23){if(data0.align !== undefined){let data58 = data0.align;const _errs206 = errors;if(typeof data58 !== "string"){const err141 = {instancePath:instancePath+"/" + i0+"/align",schemaPath:"#/items/oneOf/3/properties/align/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err141];}else {vErrors.push(err141);}errors++;}if(!(((data58 === "left") || (data58 === "center")) || (data58 === "right"))){const err142 = {instancePath:instancePath+"/" + i0+"/align",schemaPath:"#/items/oneOf/3/properties/align/enum",keyword:"enum",params:{allowedValues: schema42.items.oneOf[3].properties.align.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err142];}else {vErrors.push(err142);}errors++;}var valid23 = _errs206 === errors;}else {var valid23 = true;}if(valid23){if(data0.color !== undefined){let data59 = data0.color;const _errs208 = errors;if(errors === _errs208){if(Array.isArray(data59)){if(data59.length > 4){const err143 = {instancePath:instancePath+"/" + i0+"/color",schemaPath:"#/items/oneOf/3/properties/color/maxItems",keyword:"maxItems",params:{limit: 4},message:"must NOT have more than 4 items"};if(vErrors === null){vErrors = [err143];}else {vErrors.push(err143);}errors++;}else {if(data59.length < 3){const err144 = {instancePath:instancePath+"/" + i0+"/color",schemaPath:"#/items/oneOf/3/properties/color/minItems",keyword:"minItems",params:{limit: 3},message:"must NOT have fewer than 3 items"};if(vErrors === null){vErrors = [err144];}else {vErrors.push(err144);}errors++;}else {var valid30 = true;const len3 = data59.length;for(let i3=0; i3 255 || isNaN(data60)){const err145 = {instancePath:instancePath+"/" + i0+"/color/" + i3,schemaPath:"#/items/oneOf/3/properties/color/items/maximum",keyword:"maximum",params:{comparison: "<=", limit: 255},message:"must be <= 255"};if(vErrors === null){vErrors = [err145];}else {vErrors.push(err145);}errors++;}else {if(data60 < 0 || isNaN(data60)){const err146 = {instancePath:instancePath+"/" + i0+"/color/" + i3,schemaPath:"#/items/oneOf/3/properties/color/items/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err146];}else {vErrors.push(err146);}errors++;}}}else {const err147 = {instancePath:instancePath+"/" + i0+"/color/" + i3,schemaPath:"#/items/oneOf/3/properties/color/items/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err147];}else {vErrors.push(err147);}errors++;}}var valid30 = _errs210 === errors;if(!valid30){break;}}}}}else {const err148 = {instancePath:instancePath+"/" + i0+"/color",schemaPath:"#/items/oneOf/3/properties/color/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err148];}else {vErrors.push(err148);}errors++;}}var valid23 = _errs208 === errors;}else {var valid23 = true;}if(valid23){if(data0.downward !== undefined){const _errs212 = errors;if(typeof data0.downward !== "boolean"){const err149 = {instancePath:instancePath+"/" + i0+"/downward",schemaPath:"#/items/oneOf/3/properties/downward/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err149];}else {vErrors.push(err149);}errors++;}var valid23 = _errs212 === errors;}else {var valid23 = true;}if(valid23){if(data0.rotation !== undefined){let data62 = data0.rotation;const _errs214 = errors;const _errs215 = errors;let valid31 = false;let passing20 = null;const _errs216 = errors;if(!((typeof data62 == "number") && (isFinite(data62)))){const err150 = {instancePath:instancePath+"/" + i0+"/rotation",schemaPath:"#/items/oneOf/3/properties/rotation/oneOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err150];}else {vErrors.push(err150);}errors++;}var _valid20 = _errs216 === errors;if(_valid20){valid31 = true;passing20 = 0;}const _errs218 = errors;if(errors === _errs218){if(typeof data62 === "string"){if(!pattern4.test(data62)){const err151 = {instancePath:instancePath+"/" + i0+"/rotation",schemaPath:"#/items/oneOf/3/properties/rotation/oneOf/1/pattern",keyword:"pattern",params:{pattern: "^-?[0-9]+(\\.[0-9]+)?$"},message:"must match pattern \""+"^-?[0-9]+(\\.[0-9]+)?$"+"\""};if(vErrors === null){vErrors = [err151];}else {vErrors.push(err151);}errors++;}}else {const err152 = {instancePath:instancePath+"/" + i0+"/rotation",schemaPath:"#/items/oneOf/3/properties/rotation/oneOf/1/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err152];}else {vErrors.push(err152);}errors++;}}var _valid20 = _errs218 === errors;if(_valid20 && valid31){valid31 = false;passing20 = [passing20, 1];}else {if(_valid20){valid31 = true;passing20 = 1;}}if(!valid31){const err153 = {instancePath:instancePath+"/" + i0+"/rotation",schemaPath:"#/items/oneOf/3/properties/rotation/oneOf",keyword:"oneOf",params:{passingSchemas: passing20},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err153];}else {vErrors.push(err153);}errors++;}else {errors = _errs215;if(vErrors !== null){if(_errs215){vErrors.length = _errs215;}else {vErrors = null;}}}var valid23 = _errs214 === errors;}else {var valid23 = true;}}}}}}}}}}}}}}}}}}}}}var _valid0 = _errs153 === errors;if(_valid0 && valid1){valid1 = false;passing0 = [passing0, 3];}else {if(_valid0){valid1 = true;passing0 = 3;if(props0 !== true){props0 = true;}}const _errs220 = errors;if(data0 && typeof data0 == "object" && !Array.isArray(data0)){let missing4;if((((((data0.type === undefined) && (missing4 = "type")) || ((data0.left === undefined) && (missing4 = "left"))) || ((data0.bottom === undefined) && (missing4 = "bottom"))) || ((data0.content === undefined) && (missing4 = "content"))) || ((data0.size === undefined) && (missing4 = "size"))){const err154 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/oneOf/4/required",keyword:"required",params:{missingProperty: missing4},message:"must have required property '"+missing4+"'"};if(vErrors === null){vErrors = [err154];}else {vErrors.push(err154);}errors++;}else {const _errs221 = errors;for(const key10 in data0){if(!((((((key10 === "type") || (key10 === "page")) || (key10 === "left")) || (key10 === "bottom")) || (key10 === "content")) || (key10 === "size"))){const err155 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/oneOf/4/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key10},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err155];}else {vErrors.push(err155);}errors++;break;}}if(_errs221 === errors){if(data0.type !== undefined){let data63 = data0.type;const _errs222 = errors;if(typeof data63 !== "string"){const err156 = {instancePath:instancePath+"/" + i0+"/type",schemaPath:"#/items/oneOf/4/properties/type/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err156];}else {vErrors.push(err156);}errors++;}if("poweredby" !== data63){const err157 = {instancePath:instancePath+"/" + i0+"/type",schemaPath:"#/items/oneOf/4/properties/type/const",keyword:"const",params:{allowedValue: "poweredby"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err157];}else {vErrors.push(err157);}errors++;}var valid32 = _errs222 === errors;}else {var valid32 = true;}if(valid32){if(data0.page !== undefined){let data64 = data0.page;const _errs224 = errors;if(!((typeof data64 == "number") && (isFinite(data64)))){const err158 = {instancePath:instancePath+"/" + i0+"/page",schemaPath:"#/items/oneOf/4/properties/page/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err158];}else {vErrors.push(err158);}errors++;}var valid32 = _errs224 === errors;}else {var valid32 = true;}if(valid32){if(data0.left !== undefined){let data65 = data0.left;const _errs226 = errors;const _errs227 = errors;let valid33 = false;let passing21 = null;const _errs228 = errors;if(!((typeof data65 == "number") && (isFinite(data65)))){const err159 = {instancePath:instancePath+"/" + i0+"/left",schemaPath:"#/items/oneOf/4/properties/left/oneOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err159];}else {vErrors.push(err159);}errors++;}var _valid21 = _errs228 === errors;if(_valid21){valid33 = true;passing21 = 0;}const _errs230 = errors;if(errors === _errs230){if(typeof data65 === "string"){if(!pattern4.test(data65)){const err160 = {instancePath:instancePath+"/" + i0+"/left",schemaPath:"#/items/oneOf/4/properties/left/oneOf/1/pattern",keyword:"pattern",params:{pattern: "^-?[0-9]+(\\.[0-9]+)?$"},message:"must match pattern \""+"^-?[0-9]+(\\.[0-9]+)?$"+"\""};if(vErrors === null){vErrors = [err160];}else {vErrors.push(err160);}errors++;}}else {const err161 = {instancePath:instancePath+"/" + i0+"/left",schemaPath:"#/items/oneOf/4/properties/left/oneOf/1/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err161];}else {vErrors.push(err161);}errors++;}}var _valid21 = _errs230 === errors;if(_valid21 && valid33){valid33 = false;passing21 = [passing21, 1];}else {if(_valid21){valid33 = true;passing21 = 1;}}if(!valid33){const err162 = {instancePath:instancePath+"/" + i0+"/left",schemaPath:"#/items/oneOf/4/properties/left/oneOf",keyword:"oneOf",params:{passingSchemas: passing21},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err162];}else {vErrors.push(err162);}errors++;}else {errors = _errs227;if(vErrors !== null){if(_errs227){vErrors.length = _errs227;}else {vErrors = null;}}}var valid32 = _errs226 === errors;}else {var valid32 = true;}if(valid32){if(data0.bottom !== undefined){let data66 = data0.bottom;const _errs232 = errors;const _errs233 = errors;let valid34 = false;let passing22 = null;const _errs234 = errors;if(!((typeof data66 == "number") && (isFinite(data66)))){const err163 = {instancePath:instancePath+"/" + i0+"/bottom",schemaPath:"#/items/oneOf/4/properties/bottom/oneOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err163];}else {vErrors.push(err163);}errors++;}var _valid22 = _errs234 === errors;if(_valid22){valid34 = true;passing22 = 0;}const _errs236 = errors;if(errors === _errs236){if(typeof data66 === "string"){if(!pattern4.test(data66)){const err164 = {instancePath:instancePath+"/" + i0+"/bottom",schemaPath:"#/items/oneOf/4/properties/bottom/oneOf/1/pattern",keyword:"pattern",params:{pattern: "^-?[0-9]+(\\.[0-9]+)?$"},message:"must match pattern \""+"^-?[0-9]+(\\.[0-9]+)?$"+"\""};if(vErrors === null){vErrors = [err164];}else {vErrors.push(err164);}errors++;}}else {const err165 = {instancePath:instancePath+"/" + i0+"/bottom",schemaPath:"#/items/oneOf/4/properties/bottom/oneOf/1/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err165];}else {vErrors.push(err165);}errors++;}}var _valid22 = _errs236 === errors;if(_valid22 && valid34){valid34 = false;passing22 = [passing22, 1];}else {if(_valid22){valid34 = true;passing22 = 1;}}if(!valid34){const err166 = {instancePath:instancePath+"/" + i0+"/bottom",schemaPath:"#/items/oneOf/4/properties/bottom/oneOf",keyword:"oneOf",params:{passingSchemas: passing22},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err166];}else {vErrors.push(err166);}errors++;}else {errors = _errs233;if(vErrors !== null){if(_errs233){vErrors.length = _errs233;}else {vErrors = null;}}}var valid32 = _errs232 === errors;}else {var valid32 = true;}if(valid32){if(data0.content !== undefined){let data67 = data0.content;const _errs238 = errors;if(typeof data67 !== "string"){const err167 = {instancePath:instancePath+"/" + i0+"/content",schemaPath:"#/items/oneOf/4/properties/content/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err167];}else {vErrors.push(err167);}errors++;}if(!((data67 === "dark") || (data67 === "white"))){const err168 = {instancePath:instancePath+"/" + i0+"/content",schemaPath:"#/items/oneOf/4/properties/content/enum",keyword:"enum",params:{allowedValues: schema42.items.oneOf[4].properties.content.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err168];}else {vErrors.push(err168);}errors++;}var valid32 = _errs238 === errors;}else {var valid32 = true;}if(valid32){if(data0.size !== undefined){let data68 = data0.size;const _errs240 = errors;const _errs241 = errors;let valid35 = false;let passing23 = null;const _errs242 = errors;if(!((typeof data68 == "number") && (isFinite(data68)))){const err169 = {instancePath:instancePath+"/" + i0+"/size",schemaPath:"#/items/oneOf/4/properties/size/oneOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err169];}else {vErrors.push(err169);}errors++;}var _valid23 = _errs242 === errors;if(_valid23){valid35 = true;passing23 = 0;}const _errs244 = errors;if(errors === _errs244){if(typeof data68 === "string"){if(!pattern4.test(data68)){const err170 = {instancePath:instancePath+"/" + i0+"/size",schemaPath:"#/items/oneOf/4/properties/size/oneOf/1/pattern",keyword:"pattern",params:{pattern: "^-?[0-9]+(\\.[0-9]+)?$"},message:"must match pattern \""+"^-?[0-9]+(\\.[0-9]+)?$"+"\""};if(vErrors === null){vErrors = [err170];}else {vErrors.push(err170);}errors++;}}else {const err171 = {instancePath:instancePath+"/" + i0+"/size",schemaPath:"#/items/oneOf/4/properties/size/oneOf/1/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err171];}else {vErrors.push(err171);}errors++;}}var _valid23 = _errs244 === errors;if(_valid23 && valid35){valid35 = false;passing23 = [passing23, 1];}else {if(_valid23){valid35 = true;passing23 = 1;}}if(!valid35){const err172 = {instancePath:instancePath+"/" + i0+"/size",schemaPath:"#/items/oneOf/4/properties/size/oneOf",keyword:"oneOf",params:{passingSchemas: passing23},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err172];}else {vErrors.push(err172);}errors++;}else {errors = _errs241;if(vErrors !== null){if(_errs241){vErrors.length = _errs241;}else {vErrors = null;}}}var valid32 = _errs240 === errors;}else {var valid32 = true;}}}}}}}}}var _valid0 = _errs220 === errors;if(_valid0 && valid1){valid1 = false;passing0 = [passing0, 4];}else {if(_valid0){valid1 = true;passing0 = 4;if(props0 !== true){props0 = true;}}}}}}if(!valid1){const err173 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err173];}else {vErrors.push(err173);}errors++;validate30.errors = vErrors;return false;}else {errors = _errs4;if(vErrors !== null){if(_errs4){vErrors.length = _errs4;}else {vErrors = null;}}}var valid0 = _errs2 === errors;if(!valid0){break;}}}else {validate30.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}validate30.errors = vErrors;return errors === 0;}validate30.evaluated = {"items":true,"dynamicProps":false,"dynamicItems":false};
\ No newline at end of file
diff --git a/src/tests/api/test_checkin.py b/src/tests/api/test_checkin.py
index 88115b40e..6117f0dcb 100644
--- a/src/tests/api/test_checkin.py
+++ b/src/tests/api/test_checkin.py
@@ -258,7 +258,7 @@ def test_list_list(token_client, organizer, event, clist, item, subevent, django
res["id"] = clist.pk
res["limit_products"] = [item.pk]
- with django_assert_num_queries(11):
+ with django_assert_num_queries(9):
resp = token_client.get('/api/v1/organizers/{}/events/{}/checkinlists/'.format(organizer.slug, event.slug))
assert resp.status_code == 200
assert [res] == resp.data['results']
@@ -437,7 +437,7 @@ def test_list_all_items_positions(token_client, organizer, event, clist, clist_a
p3["addon_to"] = p1["id"]
# All items
- with django_assert_num_queries(24):
+ with django_assert_num_queries(22):
resp = token_client.get('/api/v1/organizers/{}/events/{}/checkinlists/{}/positions/?ordering=positionid'.format(
organizer.slug, event.slug, clist_all.pk
))
diff --git a/src/tests/api/test_events.py b/src/tests/api/test_events.py
index 3787216fc..eb7d3bb86 100644
--- a/src/tests/api/test_events.py
+++ b/src/tests/api/test_events.py
@@ -1865,7 +1865,7 @@ def test_event_expand_seat_filter_and_querycount(token_client, organizer, event,
assert resp.status_code == 200
event.refresh_from_db()
- with assert_num_queries(12):
+ with assert_num_queries(10):
resp = token_client.get('/api/v1/organizers/{}/events/{}/seats/'
'?expand=orderposition&expand=cartposition&expand=voucher&is_available=true'
.format(organizer.slug, event.slug))
@@ -1875,7 +1875,7 @@ def test_event_expand_seat_filter_and_querycount(token_client, organizer, event,
with scope(organizer=organizer):
v0 = event.vouchers.create(item=item, seat=event.seats.get(seat_guid='0-0'))
- with assert_num_queries(14):
+ with assert_num_queries(12):
resp = token_client.get('/api/v1/organizers/{}/events/{}/seats/'
'?expand=orderposition&expand=cartposition&expand=voucher&is_available=false'
.format(organizer.slug, event.slug))
@@ -1883,7 +1883,7 @@ def test_event_expand_seat_filter_and_querycount(token_client, organizer, event,
assert len(resp.data['results']) == 1
assert resp.data['results'][0]['voucher']['id'] == v0.pk
- with assert_num_queries(12):
+ with assert_num_queries(10):
resp = token_client.get('/api/v1/organizers/{}/events/{}/seats/'
'?expand=orderposition&expand=cartposition&expand=voucher&is_available=true'
.format(organizer.slug, event.slug))
@@ -1894,7 +1894,7 @@ def test_event_expand_seat_filter_and_querycount(token_client, organizer, event,
v1 = event.vouchers.create(item=item, seat=event.seats.get(seat_guid='0-1'))
v2 = event.vouchers.create(item=item, seat=event.seats.get(seat_guid='0-2'))
- with assert_num_queries(16):
+ with assert_num_queries(14):
resp = token_client.get('/api/v1/organizers/{}/events/{}/seats/'
'?expand=orderposition&expand=cartposition&expand=voucher&is_available=false'
.format(organizer.slug, event.slug))
diff --git a/src/tests/api/test_items.py b/src/tests/api/test_items.py
index b2aef4737..7b61601f0 100644
--- a/src/tests/api/test_items.py
+++ b/src/tests/api/test_items.py
@@ -425,7 +425,7 @@ def test_item_list(token_client, organizer, event, team, item):
@pytest.mark.django_db
def test_item_list_queries(token_client, organizer, event, team, item, item3):
- with assert_num_queries(18):
+ with assert_num_queries(16):
resp = token_client.get('/api/v1/organizers/{}/events/{}/items/'.format(organizer.slug, event.slug))
assert resp.status_code == 200
diff --git a/src/tests/api/test_orders.py b/src/tests/api/test_orders.py
index 570178974..a41b72de5 100644
--- a/src/tests/api/test_orders.py
+++ b/src/tests/api/test_orders.py
@@ -1166,10 +1166,10 @@ def test_orderposition_list(
'type': 'entry'
}]
if '/events/' in endpoint:
- with django_assert_num_queries(18):
+ with django_assert_num_queries(16):
resp = token_client.get(endpoint + '?has_checkin=true')
else:
- with django_assert_num_queries(17):
+ with django_assert_num_queries(15):
resp = token_client.get(endpoint + '?has_checkin=true')
assert [res] == resp.data['results']