{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://www.capro.dev/tachisto/spec-schema.json",
  "title": "Tachisto experiment spec",
  "description": "A declarative experiment the Tachisto compiler turns into jsPsych source. Edit it here or open it in the builder at https://www.capro.dev/tachisto/app/.",
  "type": "object",
  "required": [
    "name",
    "timeline"
  ],
  "properties": {
    "$schema": {
      "title": "This schema, so an editor knows how to check the file.",
      "type": "string"
    },
    "name": {
      "title": "What the experiment is called.",
      "type": "string",
      "minLength": 1
    },
    "authors": {
      "title": "Whoever made the experiment, in the shape Psych-DS expects for a person.",
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "identifier": {
            "title": "A URL that identifies them across datasets, usually an ORCID.",
            "type": "string"
          },
          "affiliation": {
            "title": "The institution they belong to, such as their university.",
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    },
    "sample_size": {
      "title": "How many participants the study plans to recruit.",
      "type": "integer",
      "minimum": 1
    },
    "settings": {
      "$ref": "#/definitions/experimentSettings"
    },
    "data": {
      "$ref": "#/definitions/dataSettings"
    },
    "recruitment": {
      "$ref": "#/definitions/recruitmentSettings"
    },
    "assets": {
      "title": "Files the experiment shows, carried in the spec so it stays self-contained.",
      "type": "array",
      "items": {
        "$ref": "#/definitions/asset"
      }
    },
    "conditions": {
      "title": "Conditions tables, each a list of rows a block can run over.",
      "type": "object",
      "additionalProperties": {
        "type": "array",
        "items": {
          "type": "object"
        }
      }
    },
    "timeline": {
      "title": "The steps of the experiment, in order.",
      "type": "array",
      "items": {
        "$ref": "#/definitions/node"
      }
    }
  },
  "additionalProperties": false,
  "definitions": {
    "node": {
      "title": "A step in the timeline.",
      "type": "object",
      "required": [
        "kind"
      ],
      "properties": {
        "kind": {
          "title": "What this step is.",
          "enum": [
            "trial",
            "block",
            "loop",
            "assign",
            "counterbalance",
            "branch",
            "checkpoint",
            "end"
          ]
        }
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "kind": {
                "const": "trial"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "$ref": "#/definitions/trial"
          }
        },
        {
          "if": {
            "properties": {
              "kind": {
                "const": "block"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "$ref": "#/definitions/block"
          }
        },
        {
          "if": {
            "properties": {
              "kind": {
                "const": "loop"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "$ref": "#/definitions/loop"
          }
        },
        {
          "if": {
            "properties": {
              "kind": {
                "const": "assign"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "$ref": "#/definitions/assign"
          }
        },
        {
          "if": {
            "properties": {
              "kind": {
                "const": "counterbalance"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "$ref": "#/definitions/counterbalance"
          }
        },
        {
          "if": {
            "properties": {
              "kind": {
                "const": "branch"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "$ref": "#/definitions/branch"
          }
        },
        {
          "if": {
            "properties": {
              "kind": {
                "const": "checkpoint"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "$ref": "#/definitions/checkpoint"
          }
        },
        {
          "if": {
            "properties": {
              "kind": {
                "const": "end"
              }
            },
            "required": [
              "kind"
            ]
          },
          "then": {
            "$ref": "#/definitions/end"
          }
        }
      ]
    },
    "trial": {
      "title": "One step the participant sees, run by a jsPsych plugin.",
      "type": "object",
      "required": [
        "kind",
        "plugin"
      ],
      "properties": {
        "kind": {
          "const": "trial"
        },
        "plugin": {
          "title": "The jsPsych plugin that runs this step.",
          "enum": [
            "animation",
            "audio-button-response",
            "audio-keyboard-response",
            "audio-slider-response",
            "browser-check",
            "call-function",
            "categorize-animation",
            "categorize-html",
            "categorize-image",
            "cloze",
            "external-html",
            "free-sort",
            "fullscreen",
            "html-audio-response",
            "html-button-response",
            "html-keyboard-response",
            "html-slider-response",
            "html-video-response",
            "iat-html",
            "iat-image",
            "image-button-response",
            "image-keyboard-response",
            "image-slider-response",
            "initialize-camera",
            "initialize-microphone",
            "instructions",
            "maxdiff",
            "mirror-camera",
            "preload",
            "psychophysics",
            "resize",
            "same-different-html",
            "same-different-image",
            "serial-reaction-time",
            "serial-reaction-time-mouse",
            "sketchpad",
            "survey-html-form",
            "survey-likert",
            "survey-multi-choice",
            "survey-multi-select",
            "survey-text",
            "video-button-response",
            "video-keyboard-response",
            "video-slider-response",
            "virtual-chinrest",
            "visual-search-circle",
            "webgazer-calibrate",
            "webgazer-init-camera",
            "webgazer-validate"
          ]
        },
        "tag": {
          "title": "A label other steps can refer to, such as a loop judging these trials' accuracy.",
          "type": "string"
        },
        "params": {
          "title": "The plugin's parameters.",
          "type": "object"
        },
        "record": {
          "title": "Extra columns written to the data file for this trial.",
          "type": "object",
          "propertyNames": {
            "not": {
              "enum": [
                "ending",
                "checkpoint"
              ]
            }
          },
          "additionalProperties": {
            "$ref": "#/definitions/parameterValue"
          }
        },
        "score": {
          "$ref": "#/definitions/scoringRule"
        },
        "exclusion_ending": {
          "title": "The ending a participant this step turns away is sent to, for a step that can, such as a browser check.",
          "type": "string"
        },
        "gaze": {
          "title": "Records where the participant looks during this step, once eye tracking is calibrated.",
          "type": "object",
          "properties": {
            "targets": {
              "title": "CSS selectors of elements whose place on the screen is recorded with the gaze, such as the stimulus.",
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              }
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false,
      "allOf": [
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "animation"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "stimuli": {
                    "title": "stimuli",
                    "description": "Each element of the array is a path to an image file.",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "format": "asset-image",
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "frame_time": {
                    "title": "frame time",
                    "description": "How long to display each image in milliseconds.",
                    "default": 250,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "frame_isi": {
                    "title": "frame isi",
                    "description": "If greater than 0, then a gap will be shown between each image in the sequence. This parameter specifies the length of the gap in milliseconds.",
                    "default": 0,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "sequence_reps": {
                    "title": "sequence reps",
                    "description": "How many times to show the entire sequence. There will be no gap (other than the gap specified by `frame_isi`) between repetitions.",
                    "default": 1,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "choices": {
                    "title": "choices",
                    "description": "This array contains the key(s) that the participant is allowed to press in order to respond to the stimulus. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) and [this page (event.key column)](https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/) for more examples. Any key presses that are not listed in the array will be ignored. The default value of `\"ALL_KEYS\"` means that all keys will be accepted as valid responses. Specifying `\"NO_KEYS\"` will mean that no responses are allowed.",
                    "default": "ALL_KEYS",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "format": "keyboard-key",
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "enum": [
                          "ALL_KEYS",
                          "NO_KEYS"
                        ]
                      }
                    ]
                  },
                  "prompt": {
                    "title": "prompt",
                    "description": "This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key(s) to press).",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "render_on_canvas": {
                    "title": "render on canvas",
                    "description": "If true, the images will be drawn onto a canvas element. This prevents a blank screen (white flash) between consecutive images in some browsers, like Firefox and Edge. If false, the image will be shown via an img element, as in previous versions of jsPsych.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "stimuli"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "audio-button-response"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "stimulus": {
                    "title": "stimulus",
                    "description": "Path to audio file to be played.",
                    "anyOf": [
                      {
                        "format": "asset-audio",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "choices": {
                    "title": "choices",
                    "description": "Labels for the buttons. Each different string in the array will generate a different button.",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "button_html": {
                    "title": "button html",
                    "description": "A function that generates the HTML for each button in the `choices` array. The function gets the string and index of the item in the `choices` array and should return valid HTML. If you want to use different markup for each button, you can do that by using a conditional on either parameter. The default parameter returns a button element with the text label of the choice.",
                    "examples": [
                      {
                        "code": "function(choice, choice_index) {\n  return `<button class=\"jspsych-btn\">${choice}</button>`;\n}"
                      }
                    ],
                    "anyOf": [
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "prompt": {
                    "title": "prompt",
                    "description": "This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press).",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "trial_duration": {
                    "title": "trial duration",
                    "description": "How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, the trial will wait for a response indefinitely",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "button_layout": {
                    "title": "button layout",
                    "description": "Setting to `'grid'` will make the container element have the CSS property `display: grid` and enable the use of `grid_rows` and `grid_columns`. Setting to `'flex'` will make the container element have the CSS property `display: flex`. You can customize how the buttons are laid out by adding inline CSS in the `button_html` parameter.",
                    "default": "grid",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "grid_rows": {
                    "title": "grid rows",
                    "description": "The number of rows in the button grid. Only applicable when `button_layout` is set to `'grid'`. If null, the number of rows will be determined automatically based on the number of buttons and the number of columns.",
                    "default": 1,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "grid_columns": {
                    "title": "grid columns",
                    "description": "The number of columns in the button grid. Only applicable when `button_layout` is set to `'grid'`. If null, the number of columns will be determined automatically based on the number of buttons and the number of rows.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "response_ends_trial": {
                    "title": "response ends trial",
                    "description": "If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the participant to listen to the stimulus for a fixed amount of time, even if they respond before the time is complete.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "trial_ends_after_audio": {
                    "title": "trial ends after audio",
                    "description": "If true, then the trial will end as soon as the audio file finishes playing.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "response_allowed_while_playing": {
                    "title": "response allowed while playing",
                    "description": "If true, then responses are allowed while the audio is playing. If false, then the audio must finish playing before the button choices are enabled and a response is accepted. Once the audio has played all the way through, the buttons are enabled and a response is allowed (including while the audio is being re-played via on-screen playback controls).",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "enable_button_after": {
                    "title": "enable button after",
                    "description": "How long the button will delay enabling in milliseconds. If `response_allowed_while_playing` is `true`, the timer will start immediately. If it is `false`, the timer will start at the end of the audio.",
                    "default": 0,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "stimulus",
                  "choices"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "audio-keyboard-response"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "stimulus": {
                    "title": "stimulus",
                    "description": "The audio file to be played.",
                    "anyOf": [
                      {
                        "format": "asset-audio",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "choices": {
                    "title": "choices",
                    "description": "This array contains the key(s) that the participant is allowed to press in order to respond to the stimulus. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) and [this page (event.key column)](https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/) for more examples. Any key presses that are not listed in the array will be ignored. The default value of `\"ALL_KEYS\"` means that all keys will be accepted as valid responses. Specifying `\"NO_KEYS\"` will mean that no responses are allowed.",
                    "default": "ALL_KEYS",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "format": "keyboard-key",
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "enum": [
                          "ALL_KEYS",
                          "NO_KEYS"
                        ]
                      }
                    ]
                  },
                  "prompt": {
                    "title": "Prompt",
                    "description": "This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press).",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "trial_duration": {
                    "title": "trial duration",
                    "description": "How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, then the trial will wait for a response indefinitely.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "response_ends_trial": {
                    "title": "response ends trial",
                    "description": "If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can use set this parameter to `false` to force the participant to listen to the stimulus for a fixed amount of time, even if they respond before the time is complete",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "trial_ends_after_audio": {
                    "title": "Trial ends after audio",
                    "description": "If true, then the trial will end as soon as the audio file finishes playing.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "response_allowed_while_playing": {
                    "title": "response allowed while playing",
                    "description": "If true, then responses are allowed while the audio is playing. If false, then the audio must finish playing before a keyboard response is accepted. Once the audio has played all the way through, a valid keyboard response is allowed (including while the audio is being re-played via on-screen playback controls).",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "wait_for_key_release": {
                    "title": "wait for key release",
                    "description": "If true, the response is not registered until the participant releases the key. The response time (`rt`) still reflects when the key was pressed, and the additional data field `rt_key_duration` records how long the key was held down. Note that when this is true, the trial cannot end until the key is released: with `response_ends_trial: true` the trial ends at the key release, and if the trial ends for another reason (e.g., `trial_duration`) while the key is still held, no response is recorded for the trial.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "stimulus"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "audio-slider-response"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "stimulus": {
                    "title": "stimulus",
                    "description": "Audio file to be played.",
                    "anyOf": [
                      {
                        "format": "asset-audio",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "min": {
                    "title": "min",
                    "description": "Sets the minimum value of the slider.",
                    "default": 0,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "max": {
                    "title": "max",
                    "description": "Sets the maximum value of the slider",
                    "default": 100,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "slider_start": {
                    "title": "slider start",
                    "description": "Sets the starting value of the slider",
                    "default": 50,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "step": {
                    "title": "step",
                    "description": "Sets the step of the slider. This is the smallest amount by which the slider can change.",
                    "default": 1,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "labels": {
                    "title": "labels",
                    "description": "Labels displayed at equidistant locations on the slider. For example, two labels will be placed at the ends of the slider. Three labels would place two at the ends and one in the middle. Four will place two at the ends, and the other two will be at 33% and 67% of the slider width.",
                    "default": [],
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "format": "html",
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "slider_width": {
                    "title": "slider width",
                    "description": "Set the width of the slider in pixels. If left null, then the width will be equal to the widest element in the display.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "button_label": {
                    "title": "button label",
                    "description": "Label of the button to end the trial.",
                    "default": "Continue",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "require_movement": {
                    "title": "require movement",
                    "description": "If true, the participant must move the slider before clicking the continue button.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "prompt": {
                    "title": "prompt",
                    "description": "This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press).",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "trial_duration": {
                    "title": "trial duration",
                    "description": "How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, then the trial will wait for a response indefinitely.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "response_ends_trial": {
                    "title": "response ends trial",
                    "description": "If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the participant to listen to the stimulus for a fixed amount of time, even if they respond before the time is complete.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "trial_ends_after_audio": {
                    "title": "trial ends after audio",
                    "description": "If true, then the trial will end as soon as the audio file finishes playing.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "response_allowed_while_playing": {
                    "title": "response allowed while playing",
                    "description": "If true, then responses are allowed while the audio is playing. If false, then the audio must finish playing before the slider is enabled and the trial can end via the next button click. Once the audio has played all the way through, the slider is enabled and a response is allowed (including while the audio is being re-played via on-screen playback controls).",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "stimulus"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "browser-check"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "features": {
                    "title": "features",
                    "description": "The list of browser features to record. The default value includes all of the available options.",
                    "default": [
                      "width",
                      "height",
                      "webaudio",
                      "browser",
                      "browser_version",
                      "mobile",
                      "os",
                      "fullscreen",
                      "vsync_rate",
                      "webcam",
                      "microphone"
                    ],
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "enum": [
                            "width",
                            "height",
                            "webaudio",
                            "browser",
                            "browser_version",
                            "mobile",
                            "os",
                            "fullscreen",
                            "vsync_rate",
                            "webcam",
                            "microphone"
                          ],
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "skip_features": {
                    "title": "skip features",
                    "description": "Any features listed here will be skipped, even if they appear in `features`. Use this when you want to run most of the defaults.",
                    "default": [],
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "enum": [
                            "width",
                            "height",
                            "webaudio",
                            "browser",
                            "browser_version",
                            "mobile",
                            "os",
                            "fullscreen",
                            "vsync_rate",
                            "webcam",
                            "microphone"
                          ],
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "vsync_frame_count": {
                    "title": "vsync frame count",
                    "description": "The number of frames to sample when measuring the display refresh rate (`\"vsync_rate\"`). Increasing the number will potenially improve the stability of the estimate at the cost of increasing the amount of time the plugin takes during this test. On most devices, 60 frames takes about 1 second to measure.",
                    "default": 60,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "allow_window_resize": {
                    "title": "allow window resize",
                    "description": "Whether to allow the participant to resize the browser window if the window is smaller than `minimum_width` and/or `minimum_height`. If `false`, then the `minimum_width` and `minimum_height` parameters are ignored and you can validate the size in the `inclusion_function`.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "minimum_width": {
                    "title": "minimum width",
                    "description": "If `allow_window_resize` is `true`, then this is the minimum width of the window (in pixels) that must be met before continuing.",
                    "default": 0,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "minimum_height": {
                    "title": "minimum height",
                    "description": "If `allow_window_resize` is `true`, then this is the minimum height of the window (in pixels) that must be met before continuing.",
                    "default": 0,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "window_resize_message": {
                    "title": "window resize message",
                    "description": "The message that will be displayed during the interactive resize when `allow_window_resize` is `true` and the window is too small. If the message contains HTML elements with the special IDs `browser-check-min-width`, `browser-check-min-height`, `browser-check-actual-height`, and/or `browser-check-actual-width`, then the contents of those elements will be dynamically updated to reflect the `minimum_width`, `minimum_height` and measured width and height of the browser. The default message is: `<p>Your browser window is too small to complete this experiment. Please maximize the size of your browser window. If your browser window is already maximized, you will not be able to complete this experiment.</p> <p>The minimum window width is <span id=\"browser-check-min-width\"></span> px.</p> <p>Your current window width is <span id=\"browser-check-actual-width\"></span> px.</p> <p>The minimum window height is <span id=\"browser-check-min-height\"></span> px.</p> <p>Your current window height is <span id=\"browser-check-actual-height\"></span> px.</p>`.",
                    "default": "<p>Your browser window is too small to complete this experiment. Please maximize the size of your browser window. \n        If your browser window is already maximized, you will not be able to complete this experiment.</p>\n        <p>The minimum window width is <span id=\"browser-check-min-width\"></span> px.</p>\n        <p>Your current window width is <span id=\"browser-check-actual-width\"></span> px.</p>\n        <p>The minimum window height is <span id=\"browser-check-min-height\"></span> px.</p>\n        <p>Your current window height is <span id=\"browser-check-actual-height\"></span> px.</p>",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "resize_fail_button_text": {
                    "title": "resize fail button text",
                    "description": "During the interactive resize, a button with this text will be displayed below the `window_resize_message` for the participant to click if the window cannot meet the minimum size needed. When the button is clicked, the experiment will end and `exclusion_message` will be displayed.",
                    "default": "I cannot make the window any larger",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "inclusion_function": {
                    "title": "inclusion function",
                    "description": "A function that evaluates to `true` if the browser meets all of the inclusion criteria for the experiment, and `false` otherwise. The first argument to the function will be an object containing key value pairs with the measured features of the browser. The keys will be the same as those listed in `features`.",
                    "examples": [
                      {
                        "code": "() => {\n  return true;\n}"
                      }
                    ],
                    "anyOf": [
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "exclusion_message": {
                    "title": "exclusion message",
                    "description": "A function that returns the message to display if `inclusion_function` evaluates to `false` or if the participant clicks on the resize fail button during the interactive resize. In order to allow customization of the message, the first argument to the function will be an object containing key value pairs with the measured features of the browser. The keys will be the same as those listed in `features`. See example below.",
                    "examples": [
                      {
                        "code": "() => {\n  return `<p>Your browser does not meet the requirements to participate in this experiment.</p>`;\n}"
                      }
                    ],
                    "anyOf": [
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "call-function"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "func": {
                    "title": "func",
                    "description": "The function to call.",
                    "anyOf": [
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "async": {
                    "title": "async",
                    "description": "Set to true if `func` is an asynchoronous function. If this is true, then the first argument passed to `func` will be a callback that you should call when the async operation is complete. You can pass data to the callback. See example below.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "func"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "categorize-animation"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "stimuli": {
                    "title": "stimuli",
                    "description": "Each element of the array is a path to an image file.",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "format": "asset-image",
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "key_answer": {
                    "title": "key answer",
                    "description": "The key character indicating the correct response.",
                    "examples": [
                      "f"
                    ],
                    "anyOf": [
                      {
                        "format": "keyboard-key",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "choices": {
                    "title": "choices",
                    "description": "This array contains the key(s) that the participant is allowed to press in order to respond to the stimulus. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) and [this page (event.key column)](https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/) for more examples. Any key presses that are not listed in the array will be ignored. The default value of `\"ALL_KEYS\"` means that all keys will be accepted as valid responses. Specifying `\"NO_KEYS\"` will mean that no responses are allowed.",
                    "default": "ALL_KEYS",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "format": "keyboard-key",
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "enum": [
                          "ALL_KEYS",
                          "NO_KEYS"
                        ]
                      }
                    ]
                  },
                  "text_answer": {
                    "title": "text answer",
                    "description": "A text label that describes the correct answer. Used in conjunction with the `correct_text` and `incorrect_text` parameters.",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "correct_text": {
                    "title": "correct text",
                    "description": "String to show when the correct answer is given. Can contain HTML formatting. The special string `%ANS%` can be used within the string. If present, the plugin will put the `text_answer` for the trial in place of the %ANS% string (see example below).",
                    "default": "Correct.",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "incorrect_text": {
                    "title": "incorrect text",
                    "description": "String to show when the wrong answer is given. Can contain HTML formatting. The special string `%ANS%` can be used within the string. If present, the plugin will put the `text_answer` for the trial in place of the %ANS% string (see example below).",
                    "default": "Wrong.",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "frame_time": {
                    "title": "frame time",
                    "description": "How long to display each image (in milliseconds).",
                    "default": 500,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "sequence_reps": {
                    "title": "sequence reps",
                    "description": "How many times to show the entire sequence.",
                    "default": 1,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "allow_response_before_complete": {
                    "title": "allow response before complete",
                    "description": "If true, the participant can respond before the animation sequence finishes.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "feedback_duration": {
                    "title": "feedback duration",
                    "description": "How long to show the feedback (milliseconds).",
                    "default": 2000,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "prompt": {
                    "title": "prompt",
                    "description": "This string can contain HTML markup. Any content here will be displayed below the stimulus or the end of the animation depending on the allow_response_before_complete parameter. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press).",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "render_on_canvas": {
                    "title": "render on canvas",
                    "description": "If true, the images will be drawn onto a canvas element. This prevents a blank screen (white flash) between consecutive images in some browsers, like Firefox and Edge. If false, the image will be shown via an img element, as in previous versions of jsPsych.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "stimuli",
                  "key_answer"
                ],
                "additionalProperties": false
              }
            },
            "not": {
              "title": "This step scores its answers itself.",
              "required": [
                "score"
              ]
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "categorize-html"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "stimulus": {
                    "title": "stimulus",
                    "description": "The HTML stimulus to display.",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "key_answer": {
                    "title": "key answer",
                    "description": "The key character indicating the correct response.",
                    "examples": [
                      "f"
                    ],
                    "anyOf": [
                      {
                        "format": "keyboard-key",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "choices": {
                    "title": "choices",
                    "description": "This array contains the key(s) that the participant is allowed to press in order to respond to the stimulus. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) and [this page (event.key column)](https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/) for more examples. Any key presses that are not listed in the array will be ignored. The default value of `\"ALL_KEYS\"` means that all keys will be accepted as valid responses. Specifying `\"NO_KEYS\"` will mean that no responses are allowed.",
                    "default": "ALL_KEYS",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "format": "keyboard-key",
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "enum": [
                          "ALL_KEYS",
                          "NO_KEYS"
                        ]
                      }
                    ]
                  },
                  "text_answer": {
                    "title": "text answer",
                    "description": "A label that is associated with the correct answer. Used in conjunction with the `correct_text` and `incorrect_text` parameters.",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "correct_text": {
                    "title": "correct text",
                    "description": "String to show when the correct answer is given. Can contain HTML formatting. The special string `%ANS%` can be used within the string. If present, the plugin will put the `text_answer` for the trial in place of the `%ANS%` string (see example below).",
                    "default": "<p class='feedback'>Correct</p>",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "incorrect_text": {
                    "title": "incorrect text",
                    "description": "String to show when the wrong answer is given. Can contain HTML formatting. The special string `%ANS%` can be used within the string. If present, the plugin will put the `text_answer` for the trial in place of the `%ANS%` string (see example below).",
                    "default": "<p class='feedback'>Incorrect</p>",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "prompt": {
                    "title": "prompt",
                    "description": "This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press).",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "force_correct_button_press": {
                    "title": "force correct button press",
                    "description": "If set to true, then the participant must press the correct response key after feedback is given in order to advance to the next trial.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "show_stim_with_feedback": {
                    "title": "show stim with feedback",
                    "description": "If set to true, then the stimulus will be shown during feedback. If false, then only the text feedback will display during feedback.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "show_feedback_on_timeout": {
                    "title": "show feedback on timeout",
                    "description": "If true, then category feedback will be displayed for an incorrect response after a timeout (trial_duration is exceeded). If false, then a timeout message will be shown.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "timeout_message": {
                    "title": "timeout message",
                    "description": "The message to show on a timeout non-response.",
                    "default": "<p>Please respond faster.</p>",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "stimulus_duration": {
                    "title": "stimulus duration",
                    "description": "How long to show the stimulus for (milliseconds). If null, then the stimulus is shown until a response is given.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "trial_duration": {
                    "title": "trial duration",
                    "description": "The maximum time allowed for a response. If null, then the experiment will wait indefinitely for a response.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "feedback_duration": {
                    "title": "feedback duration",
                    "description": "How long to show the feedback for (milliseconds).",
                    "default": 2000,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "stimulus",
                  "key_answer"
                ],
                "additionalProperties": false
              }
            },
            "not": {
              "title": "This step scores its answers itself.",
              "required": [
                "score"
              ]
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "categorize-image"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "stimulus": {
                    "title": "stimulus",
                    "description": "The path to the image file.",
                    "anyOf": [
                      {
                        "format": "asset-image",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "key_answer": {
                    "title": "key answer",
                    "description": "The key character indicating the correct response.",
                    "examples": [
                      "f"
                    ],
                    "anyOf": [
                      {
                        "format": "keyboard-key",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "choices": {
                    "title": "choices",
                    "description": "This array contains the key(s) that the participant is allowed to press in order to respond to the stimulus. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) and [this page (event.key column)](https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/) for more examples. Any key presses that are not listed in the array will be ignored. The default value of `\"ALL_KEYS\"` means that all keys will be accepted as valid responses. Specifying `\"NO_KEYS\"` will mean that no responses are allowed.",
                    "default": "ALL_KEYS",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "format": "keyboard-key",
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "enum": [
                          "ALL_KEYS",
                          "NO_KEYS"
                        ]
                      }
                    ]
                  },
                  "text_answer": {
                    "title": "text answer",
                    "description": "A label that is associated with the correct answer. Used in conjunction with the `correct_text` and `incorrect_text` parameters.",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "correct_text": {
                    "title": "correct text",
                    "description": "String to show when the correct answer is given. Can contain HTML formatting. The special string `%ANS%` can be used within the string. If present, the plugin will put the `text_answer` for the trial in place of the %ANS% string (see example below).",
                    "default": "<p class='feedback'>Correct</p>",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "incorrect_text": {
                    "title": "incorrect text",
                    "description": "String to show when the wrong answer is given. Can contain HTML formatting. The special string `%ANS%` can be used within the string. If present, the plugin will put the `text_answer` for the trial in place of the %ANS% string (see example below).",
                    "default": "<p class='feedback'>Wrong</p>",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "prompt": {
                    "title": "prompt",
                    "description": "This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press).",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "force_correct_button_press": {
                    "title": "force correct button press",
                    "description": "If set to true, then the participant must press the correct response key after feedback is given in order to advance to the next trial.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "show_stim_with_feedback": {
                    "title": "show stim with feedback",
                    "description": "If set to true, then the stimulus will be shown during feedback. If false, then only the text feedback will display during feedback.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "show_feedback_on_timeout": {
                    "title": "show feedback on timeout",
                    "description": "If true, then category feedback will be displayed for an incorrect response after a timeout (trial_duration is exceeded). If false, then a timeout message will be shown.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "timeout_message": {
                    "title": "timeout message",
                    "description": "The message to show on a timeout non-response.",
                    "default": "<p>Please respond faster.</p>",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "stimulus_duration": {
                    "title": "stimulus duration",
                    "description": "How long to show the stimulus for (milliseconds). If null, then the stimulus is shown until a response is given.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "trial_duration": {
                    "title": "trial duration",
                    "description": "The maximum time allowed for a response. If null, then the experiment will wait indefinitely for a response.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "feedback_duration": {
                    "title": "feedback duration",
                    "description": "How long to show the feedback for (milliseconds).",
                    "default": 2000,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "stimulus",
                  "key_answer"
                ],
                "additionalProperties": false
              }
            },
            "not": {
              "title": "This step scores its answers itself.",
              "required": [
                "score"
              ]
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "cloze"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "text": {
                    "title": "text",
                    "description": "The cloze text to be displayed. Blanks are indicated by %% signs and automatically replaced by input fields. If there is a correct answer you want the system to check against, it must be typed between the two percentage signs (i.e. % correct solution %). If you would like to input multiple solutions, type a slash between each responses (i.e. %1/2/3%).",
                    "examples": [
                      "<p>The cat sat on the %mat%.</p>"
                    ],
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "button_text": {
                    "title": "button text",
                    "description": "Text of the button participants have to press for finishing the cloze test.",
                    "default": "OK",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "check_answers": {
                    "title": "check answers",
                    "description": "Boolean value indicating if the answers given by participants should be compared against a correct solution given in `text` after the submit button was clicked. If ```true```, answers are checked and in case of differences, the ```mistake_fn``` is called. In this case, the trial does not automatically finish. If ```false```, no checks are performed and the trial ends when clicking the submit button.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "allow_blanks": {
                    "title": "allow blanks",
                    "description": "Boolean value indicating if the answers given by participants should be checked for completion after the button was clicked. If ```true```, answers are not checked for completion and blank answers are allowed. The trial will then automatically finish upon the clicking the button. If ```false```, answers are checked for completion, and in case there are some fields with missing answers, the ```mistake_fn``` is called. In this case, the trial does not automatically finish.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "case_sensitivity": {
                    "title": "Case sensitivity",
                    "description": "Boolean value indicating if the solutions checker must be case sensitive.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "mistake_fn": {
                    "title": "mistake fn",
                    "description": "Function called if either `check_answers` is `true` or `allow_blanks` is `false` and there is a discrepancy between the set answers and the answers provided, or if all input fields aren't filled out, respectively.",
                    "examples": [
                      {
                        "code": "() => {\n}"
                      }
                    ],
                    "anyOf": [
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "autofocus": {
                    "title": "autofocus",
                    "description": "Boolean value indicating if the first input field should be focused when the trial starts. Enabled by default, but may be disabled especially if participants are using screen readers.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "text"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "external-html"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "url": {
                    "title": "url",
                    "description": "The URL of the page to display.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "cont_key": {
                    "title": "cont key",
                    "description": "The key character the participant can use to advance to the next trial. If left as null, then the participant will not be able to advance trials using the keyboard.",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "keyboard-key",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "cont_btn": {
                    "title": "cont btn",
                    "description": "The ID of a clickable element on the page. When the element is clicked, the trial will advance.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "check_fn": {
                    "title": "check fn",
                    "description": "`function(){ return true; }` | This function is called with the jsPsych `display_element` as the only argument when the participant attempts to advance the trial. The trial will only advance if the function return `true`. This can be used to verify that the participant has correctly filled out a form before continuing, for example.",
                    "examples": [
                      {
                        "code": "() => true"
                      }
                    ],
                    "anyOf": [
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "force_refresh": {
                    "title": "force refresh",
                    "description": "If `true`, then the plugin will avoid using the cached version of the HTML page to load if one exists.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "execute_script": {
                    "title": "Execute scripts",
                    "description": "If `true`, then scripts on the remote page will be executed.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "url"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "free-sort"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "stimuli": {
                    "title": "stimuli",
                    "description": "Each element of this array is an image path.",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "format": "asset-image",
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "stim_height": {
                    "title": "stim height",
                    "description": "The height of the images in pixels.",
                    "default": 100,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "stim_width": {
                    "title": "stim width",
                    "description": "The width of the images in pixels.",
                    "default": 100,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "scale_factor": {
                    "title": "scale factor",
                    "description": "How much larger to make the stimulus while moving (1 = no scaling).",
                    "default": 1.5,
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "sort_area_height": {
                    "title": "sort area height",
                    "description": "The height of the container that participants can move the stimuli in. Stimuli will be constrained to this area.",
                    "default": 700,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "sort_area_width": {
                    "title": "sort area width",
                    "description": "The width of the container that participants can move the stimuli in. Stimuli will be constrained to this area.",
                    "default": 700,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "sort_area_shape": {
                    "title": "sort area shape",
                    "description": "The shape of the sorting area, can be \"ellipse\" or \"square\".",
                    "default": "ellipse",
                    "anyOf": [
                      {
                        "enum": [
                          "square",
                          "ellipse"
                        ],
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "prompt": {
                    "title": "prompt",
                    "description": "This string can contain HTML markup. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press).",
                    "default": "",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "prompt_location": {
                    "title": "prompt location",
                    "description": "Indicates whether to show the prompt `\"above\"` or `\"below\"` the sorting area.",
                    "default": "above",
                    "anyOf": [
                      {
                        "enum": [
                          "above",
                          "below"
                        ],
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "button_label": {
                    "title": "button label",
                    "description": "The text that appears on the button to continue to the next trial.",
                    "default": "Continue",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "change_border_background_color": {
                    "title": "change border background color",
                    "description": "If true, the sort area border color will change while items are being moved in and out of the sort area, and the background color will change once all items have been moved into the sort area. If false, the border will remain black and the background will remain white throughout the trial.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "border_color_in": {
                    "title": "border color in",
                    "description": "If change_border_background_color is true, the sort area border will change to this color when an item is being moved into the sort area, and the background will change to this color when all of the items have been moved into the sort area.",
                    "default": "#a1d99b",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "border_color_out": {
                    "title": "border color out",
                    "description": "If change_border_background_color is true, this will be the color of the sort area border when there are one or more items that still need to be moved into the sort area.",
                    "default": "#fc9272",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "border_width": {
                    "title": "border width",
                    "description": "The width in pixels of the border around the sort area. If null, the border width defaults to 3% of the sort area height.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "counter_text_unfinished": {
                    "title": "counter text unfinished",
                    "description": "Text to display when there are one or more items that still need to be placed in the sort area. If \"%n%\" is included in the string, it will be replaced with the number of items that still need to be moved inside. If \"%s%\" is included in the string, a \"s\" will be included when the number of items remaining is greater than one.",
                    "default": "You still need to place %n% item%s% inside the sort area.",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "counter_text_finished": {
                    "title": "counter text finished",
                    "description": "Text that will take the place of the counter_text_unfinished text when all items have been moved inside the sort area.",
                    "default": "All items placed. Feel free to reposition items if necessary.",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "stim_starts_inside": {
                    "title": "stim starts inside",
                    "description": "If false, the images will be positioned to the left and right of the sort area when the trial loads. If true, the images will be positioned at random locations inside the sort area when the trial loads.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "column_spread_factor": {
                    "title": "column spread factor",
                    "description": "When the images appear outside the sort area, this determines the x-axis spread of the image columns. Default value is 1. Values less than 1 will compress the image columns along the x-axis, and values greater than 1 will spread them farther apart.",
                    "default": 1,
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "stimuli"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "fullscreen"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "fullscreen_mode": {
                    "title": "fullscreen mode",
                    "description": "A value of `true` causes the experiment to enter fullscreen mode. A value of `false` causes the browser to exit fullscreen mode.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "message": {
                    "title": "message",
                    "description": "`<p>The experiment will switch to full screen mode when you press the button below</p>` | The HTML content to display above the button to enter fullscreen mode.",
                    "default": "<p>The experiment will switch to full screen mode when you press the button below</p>",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "button_label": {
                    "title": "button label",
                    "description": "The text that appears on the button to enter fullscreen mode.",
                    "default": "Continue",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "delay_after": {
                    "title": "delay after",
                    "description": "The length of time to delay after entering fullscreen mode before ending the trial. This can be useful because entering fullscreen is jarring and most browsers display some kind of message that the browser has entered fullscreen mode.",
                    "default": 1000,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "html-audio-response"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "stimulus": {
                    "title": "stimulus",
                    "description": "The HTML content to be displayed.",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "stimulus_duration": {
                    "title": "stimulus duration",
                    "description": "How long to display the stimulus in milliseconds. The visibility CSS property of the stimulus will be set to `hidden` after this time has elapsed. If this is null, then the stimulus will remain visible until the trial ends.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "recording_duration": {
                    "title": "recording duration",
                    "description": "The maximum length of the recording, in milliseconds. The default value is intentionally set low because of the potential to accidentally record very large data files if left too high. You can set this to `null` to allow the participant to control the length of the recording via the done button, but be careful with this option as it can lead to crashing the browser if the participant waits too long to stop the recording.",
                    "default": 2000,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "show_done_button": {
                    "title": "show done button",
                    "description": "Whether to show a button on the screen that the participant can click to finish the recording.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "done_button_label": {
                    "title": "done button label",
                    "description": "The label for the done button.",
                    "default": "Continue",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "record_again_button_label": {
                    "title": "record again button label",
                    "description": "The label for the record again button enabled when `allow_playback: true`.",
                    "default": "Record again",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "accept_button_label": {
                    "title": "accept button label",
                    "description": "The label for the accept button enabled when `allow_playback: true`.",
                    "default": "Continue",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "allow_playback": {
                    "title": "allow playback",
                    "description": "Whether to allow the participant to listen to their recording and decide whether to rerecord or not. If `true`, then the participant will be shown an interface to play their recorded audio and click one of two buttons to either accept the recording or rerecord. If rerecord is selected, then stimulus will be shown again, as if the trial is starting again from the beginning.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "save_audio_url": {
                    "title": "save audio url",
                    "description": "If `true`, then an [Object URL](https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL) will be generated and stored for the recorded audio. Only set this to `true` if you plan to reuse the recorded audio later in the experiment, as it is a potentially memory-intensive feature.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "stimulus"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "html-button-response"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "stimulus": {
                    "title": "stimulus",
                    "description": "The HTML content to be displayed.",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "choices": {
                    "title": "choices",
                    "description": "Labels for the buttons. Each different string in the array will generate a different button.",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "button_html": {
                    "title": "button html",
                    "description": "A function that generates the HTML for each button in the `choices` array. The function gets the string and index of the item in the `choices` array and should return valid HTML. If you want to use different markup for each button, you can do that by using a conditional on either parameter. The default parameter returns a button element with the text label of the choice.",
                    "examples": [
                      {
                        "code": "function(choice, choice_index) {\n  return `<button class=\"jspsych-btn\">${choice}</button>`;\n}"
                      }
                    ],
                    "anyOf": [
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "prompt": {
                    "title": "prompt",
                    "description": "This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press).",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "stimulus_duration": {
                    "title": "stimulus duration",
                    "description": "How long to display the stimulus in milliseconds. The visibility CSS property of the stimulus will be set to `hidden` after this time has elapsed. If this is null, then the stimulus will remain visible until the trial ends.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "trial_duration": {
                    "title": "trial duration",
                    "description": "ow long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, the trial will wait for a response indefinitely.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "button_layout": {
                    "title": "button layout",
                    "description": "Setting to `'grid'` will make the container element have the CSS property `display: grid` and enable the use of `grid_rows` and `grid_columns`. Setting to `'flex'` will make the container element have the CSS property `display: flex`. You can customize how the buttons are laid out by adding inline CSS in the `button_html` parameter.",
                    "default": "grid",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "grid_rows": {
                    "title": "grid rows",
                    "description": "The number of rows in the button grid. Only applicable when `button_layout` is set to `'grid'`. If null, the number of rows will be determined automatically based on the number of buttons and the number of columns.",
                    "default": 1,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "grid_columns": {
                    "title": "grid columns",
                    "description": "The number of columns in the button grid. Only applicable when `button_layout` is set to `'grid'`. If null, the number of columns will be determined automatically based on the number of buttons and the number of rows.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "response_ends_trial": {
                    "title": "response ends trial",
                    "description": "If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the participant to view a stimulus for a fixed amount of time, even if they respond before the time is complete.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "enable_button_after": {
                    "title": "enable button after",
                    "description": "How long the button will delay enabling in milliseconds.",
                    "default": 0,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "stimulus",
                  "choices"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "html-keyboard-response"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "stimulus": {
                    "title": "stimulus",
                    "description": "The string to be displayed.",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "choices": {
                    "title": "choices",
                    "description": "This array contains the key(s) that the participant is allowed to press in order to respond to the stimulus. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see {@link https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values this page} and {@link https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/ this page (event.key column)} for more examples. Any key presses that are not listed in the array will be ignored. The default value of `\"ALL_KEYS\"` means that all keys will be accepted as valid responses. Specifying `\"NO_KEYS\"` will mean that no responses are allowed.",
                    "default": "ALL_KEYS",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "format": "keyboard-key",
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "enum": [
                          "ALL_KEYS",
                          "NO_KEYS"
                        ]
                      }
                    ]
                  },
                  "prompt": {
                    "title": "prompt",
                    "description": "This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press).",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "stimulus_duration": {
                    "title": "stimulus duration",
                    "description": "How long to display the stimulus in milliseconds. The visibility CSS property of the stimulus will be set to `hidden` after this time has elapsed. If this is null, then the stimulus will remain visible until the trial ends.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "trial_duration": {
                    "title": "trial duration",
                    "description": "How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, then the trial will wait for a response indefinitely.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "response_ends_trial": {
                    "title": "response ends trial",
                    "description": "If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the trial_duration parameter). If false, then the trial will continue until the value for trial_duration is reached. You can set this parameter to false to force the participant to view a stimulus for a fixed amount of time, even if they respond before the time is complete.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "wait_for_key_release": {
                    "title": "wait for key release",
                    "description": "If true, the response is not registered until the participant releases the key. The response time (`rt`) still reflects when the key was pressed, and the additional data field `rt_key_duration` records how long the key was held down. Note that when this is true, the trial cannot end until the key is released: with `response_ends_trial: true` the trial ends at the key release, and if the trial ends for another reason (e.g., `trial_duration`) while the key is still held, no response is recorded for the trial.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "stimulus"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "html-slider-response"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "stimulus": {
                    "title": "stimulus",
                    "description": "The HTML string to be displayed",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "min": {
                    "title": "min",
                    "description": "Sets the minimum value of the slider.",
                    "default": 0,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "max": {
                    "title": "max",
                    "description": "Sets the maximum value of the slider",
                    "default": 100,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "slider_start": {
                    "title": "slider start",
                    "description": "Sets the starting value of the slider",
                    "default": 50,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "step": {
                    "title": "step",
                    "description": "Sets the step of the slider. This is the smallest amount by which the slider can change.",
                    "default": 1,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "labels": {
                    "title": "labels",
                    "description": "Labels displayed at equidistant locations on the slider. For example, two labels will be placed at the ends of the slider. Three labels would place two at the ends and one in the middle. Four will place two at the ends, and the other two will be at 33% and 67% of the slider width.",
                    "default": [],
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "format": "html",
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "slider_width": {
                    "title": "slider width",
                    "description": "Set the width of the slider in pixels. If left null, then the width will be equal to the widest element in the display.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "button_label": {
                    "title": "button label",
                    "description": "Label of the button to end the trial.",
                    "default": "Continue",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "require_movement": {
                    "title": "require movement",
                    "description": "If true, the participant must move the slider before clicking the continue button.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "prompt": {
                    "title": "prompt",
                    "description": "This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press).",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "stimulus_duration": {
                    "title": "stimulus duration",
                    "description": "How long to display the stimulus in milliseconds. The visibility CSS property of the stimulus will be set to `hidden` after this time has elapsed. If this is null, then the stimulus will remain visible until the trial ends.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "trial_duration": {
                    "title": "trial duration",
                    "description": "How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, then the trial will wait for a response indefinitely.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "response_ends_trial": {
                    "title": "response ends trial",
                    "description": "If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the participant to view a stimulus for a fixed amount of time, even if they respond before the time is complete.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "stimulus"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "html-video-response"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "stimulus": {
                    "title": "stimulus",
                    "description": "The HTML string to be displayed",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "stimulus_duration": {
                    "title": "stimulus duration",
                    "description": "How long to display the stimulus in milliseconds. The visibility CSS property of the stimulus will be set to `hidden` after this time has elapsed. If this is null, then the stimulus will remain visible until the trial ends.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "recording_duration": {
                    "title": "recording duration",
                    "description": "The maximum length of the recording, in milliseconds. The default value is intentionally set low because of the potential to accidentally record very large data files if left too high. You can set this to `null` to allow the participant to control the length of the recording via the done button, but be careful with this option as it can lead to crashing the browser if the participant waits too long to stop the recording.",
                    "default": 2000,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "show_done_button": {
                    "title": "show done button",
                    "description": "Whether or not to show a button to end the recording. If false, the recording_duration must be set.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "done_button_label": {
                    "title": "done button label",
                    "description": "Label for the done (stop recording) button. Only used if show_done_button is true.",
                    "default": "Continue",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "record_again_button_label": {
                    "title": "record again button label",
                    "description": "The label for the record again button enabled when `allow_playback: true`.",
                    "default": "Record again",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "accept_button_label": {
                    "title": "accept button label",
                    "description": "The label for the accept button enabled when `allow_playback: true`.",
                    "default": "Continue",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "allow_playback": {
                    "title": "allow playback",
                    "description": "Whether to allow the participant to listen to their recording and decide whether to rerecord or not. If `true`, then the participant will be shown an interface to play their recorded video and click one of two buttons to either accept the recording or rerecord. If rerecord is selected, then stimulus will be shown again, as if the trial is starting again from the beginning.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "save_video_url": {
                    "title": "save video url",
                    "description": "If `true`, then an [Object URL](https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL) will be generated and stored for the recorded video. Only set this to `true` if you plan to reuse the recorded video later in the experiment, as it is a potentially memory-intensive feature.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "stimulus"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "iat-html"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "stimulus": {
                    "title": "stimulus",
                    "description": "The HTML string to be displayed.",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "left_category_key": {
                    "title": "left category key",
                    "description": "Key press that is associated with the `left_category_label`.",
                    "default": "e",
                    "anyOf": [
                      {
                        "format": "keyboard-key",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "right_category_key": {
                    "title": "right category key",
                    "description": "Key press that is associated with the `right_category_label`.",
                    "default": "i",
                    "anyOf": [
                      {
                        "format": "keyboard-key",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "left_category_label": {
                    "title": "left category label",
                    "description": "An array that contains the words/labels associated with a certain stimulus. The labels are aligned to the left side of the page.",
                    "default": [
                      "left"
                    ],
                    "anyOf": [
                      {
                        "minItems": 1,
                        "maxItems": 2,
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "right_category_label": {
                    "title": "right category label",
                    "description": "An array that contains the words/labels associated with a certain stimulus. The labels are aligned to the right side of the page.",
                    "default": [
                      "right"
                    ],
                    "anyOf": [
                      {
                        "minItems": 1,
                        "maxItems": 2,
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "key_to_move_forward": {
                    "title": "key to move forward",
                    "description": "This array contains the characters the participant is allowed to press to move on to the next trial if their key press was incorrect and feedback was displayed. Can also have 'other key' as an option which will only allow the user to select the right key to move forward.",
                    "default": "ALL_KEYS",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "format": "keyboard-key",
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "enum": [
                          "ALL_KEYS",
                          "NO_KEYS"
                        ]
                      }
                    ]
                  },
                  "display_feedback": {
                    "title": "display feedback",
                    "description": "If `true`, then `html_when_wrong` and `wrong_image_name` is required. If `false`, `trial_duration` is needed and trial will continue automatically.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "html_when_wrong": {
                    "title": "html when wrong",
                    "description": "The content to display when a user presses the wrong key.",
                    "default": "<span style=\"color: red; font-size: 80px\">X</span>",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "bottom_instructions": {
                    "title": "bottom instructions",
                    "description": "Instructions about making a wrong key press and whether another key press is needed to continue.",
                    "default": "<p>If you press the wrong key, a red X will appear. Press any key to continue.</p>",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "force_correct_key_press": {
                    "title": "force correct key press",
                    "description": "If this is `true` and the user presses the wrong key then they have to press the other key to continue. An example would be two keys 'e' and 'i'. If the key associated with the stimulus is 'e' and key 'i' was pressed, then pressing 'e' is needed to continue the trial. When this is `true`, then parameter `key_to_move_forward` is not used. If this is `true` and the user presses the wrong key then they have to press the other key to continue. An example would be two keys 'e' and 'i'. If the key associated with the stimulus is 'e' and key 'i' was pressed, then pressing 'e' is needed to continue the trial. When this is `true`, then parameter `key_to_move_forward` is not used.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "stim_key_association": {
                    "title": "stim key association",
                    "description": "Either 'left' or 'right'. This indicates whether the stimulus is associated with the key press and category on the left or right side of the page (`left_category_key` or `right_category_key`).",
                    "anyOf": [
                      {
                        "enum": [
                          "left",
                          "right"
                        ],
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "response_ends_trial": {
                    "title": "response ends trial",
                    "description": "If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can use this parameter to force the participant to view a stimulus for a fixed amount of time, even if they respond before the time is complete.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "trial_duration": {
                    "title": "trial duration",
                    "description": "How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as `null` for the trial and the trial will end. If the value of this parameter is `null`, then the trial will wait for a response indefinitely.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "stimulus",
                  "stim_key_association"
                ],
                "additionalProperties": false
              }
            },
            "not": {
              "title": "This step scores its answers itself.",
              "required": [
                "score"
              ]
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "iat-image"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "stimulus": {
                    "title": "stimulus",
                    "description": "The stimulus to display. The path to an image.",
                    "anyOf": [
                      {
                        "format": "asset-image",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "left_category_key": {
                    "title": "left category key",
                    "description": "Key press that is associated with the `left_category_label`.",
                    "default": "e",
                    "anyOf": [
                      {
                        "format": "keyboard-key",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "right_category_key": {
                    "title": "right category key",
                    "description": "Key press that is associated with the `right_category_label`.",
                    "default": "i",
                    "anyOf": [
                      {
                        "format": "keyboard-key",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "left_category_label": {
                    "title": "left category label",
                    "description": "An array that contains the words/labels associated with a certain stimulus. The labels are aligned to the left side of the page.",
                    "default": [
                      "left"
                    ],
                    "anyOf": [
                      {
                        "minItems": 1,
                        "maxItems": 2,
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "right_category_label": {
                    "title": "right category label",
                    "description": "An array that contains the words/labels associated with a certain stimulus. The labels are aligned to the right side of the page.",
                    "default": [
                      "right"
                    ],
                    "anyOf": [
                      {
                        "minItems": 1,
                        "maxItems": 2,
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "key_to_move_forward": {
                    "title": "key to move forward",
                    "description": "This array contains the characters the participant is allowed to press to move on to the next trial if their key press was incorrect and feedback was displayed. Can also have 'other key' as an option which will only allow the user to select the right key to move forward.",
                    "default": "ALL_KEYS",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "format": "keyboard-key",
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "enum": [
                          "ALL_KEYS",
                          "NO_KEYS"
                        ]
                      }
                    ]
                  },
                  "display_feedback": {
                    "title": "display feedback",
                    "description": "If `true`, then `html_when_wrong` and `wrong_image_name` is required. If `false`, `trial_duration` is needed and trial will continue automatically.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "html_when_wrong": {
                    "title": "html when wrong",
                    "description": "The content to display when a user presses the wrong key.",
                    "default": "<span style=\"color: red; font-size: 80px\">X</span>",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "bottom_instructions": {
                    "title": "bottom instructions",
                    "description": "Instructions about making a wrong key press and whether another key press is needed to continue.",
                    "default": "<p>If you press the wrong key, a red X will appear. Press any key to continue.</p>",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "force_correct_key_press": {
                    "title": "force correct key press",
                    "description": "If this is `true` and the user presses the wrong key then they have to press the other key to continue. An example would be two keys 'e' and 'i'. If the key associated with the stimulus is 'e' and key 'i' was pressed, then pressing 'e' is needed to continue the trial. When this is `true`, then parameter `key_to_move_forward` is not used. If this is `true` and the user presses the wrong key then they have to press the other key to continue. An example would be two keys 'e' and 'i'. If the key associated with the stimulus is 'e' and key 'i' was pressed, then pressing 'e' is needed to continue the trial. When this is `true`, then parameter `key_to_move_forward` is not used.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "stim_key_association": {
                    "title": "stim key association",
                    "description": "Either 'left' or 'right'. This indicates whether the stimulus is associated with the key press and category on the left or right side of the page (`left_category_key` or `right_category_key`).",
                    "anyOf": [
                      {
                        "enum": [
                          "left",
                          "right"
                        ],
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "response_ends_trial": {
                    "title": "response ends trial",
                    "description": "If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can use this parameter to force the participant to view a stimulus for a fixed amount of time, even if they respond before the time is complete.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "trial_duration": {
                    "title": "trial duration",
                    "description": "How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as `null` for the trial and the trial will end. If the value of this parameter is `null`, then the trial will wait for a response indefinitely.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "stimulus",
                  "stim_key_association"
                ],
                "additionalProperties": false
              }
            },
            "not": {
              "title": "This step scores its answers itself.",
              "required": [
                "score"
              ]
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "image-button-response"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "stimulus": {
                    "title": "stimulus",
                    "description": "The path of the image file to be displayed.",
                    "anyOf": [
                      {
                        "format": "asset-image",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "stimulus_height": {
                    "title": "stimulus height",
                    "description": "Set the height of the image in pixels. If left null (no value specified), then the image will display at its natural height.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "stimulus_width": {
                    "title": "stimulus width",
                    "description": "Set the width of the image in pixels. If left null (no value specified), then the image will display at its natural width.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "maintain_aspect_ratio": {
                    "title": "maintain aspect ratio",
                    "description": "If setting *only* the width or *only* the height and this parameter is true, then the other dimension will be scaled to maintain the image's aspect ratio.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "choices": {
                    "title": "choices",
                    "description": "Labels for the buttons. Each different string in the array will generate a different button.",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "button_html": {
                    "title": "button html",
                    "description": "``(choice: string, choice_index: number)=>`<button class=\"jspsych-btn\">${choice}</button>``; | A function that generates the HTML for each button in the `choices` array. The function gets the string and index of the item in the `choices` array and should return valid HTML. If you want to use different markup for each button, you can do that by using a conditional on either parameter. The default parameter returns a button element with the text label of the choice.",
                    "examples": [
                      {
                        "code": "function(choice, choice_index) {\n  return `<button class=\"jspsych-btn\">${choice}</button>`;\n}"
                      }
                    ],
                    "anyOf": [
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "prompt": {
                    "title": "prompt",
                    "description": "This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press).",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "stimulus_duration": {
                    "title": "stimulus duration",
                    "description": "How long to show the stimulus for in milliseconds. If the value is null, then the stimulus will be shown until the participant makes a response.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "trial_duration": {
                    "title": "trial duration",
                    "description": "How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, the trial will wait for a response indefinitely.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "button_layout": {
                    "title": "button layout",
                    "description": "Setting to `'grid'` will make the container element have the CSS property `display: grid` and enable the use of `grid_rows` and `grid_columns`. Setting to `'flex'` will make the container element have the CSS property `display: flex`. You can customize how the buttons are laid out by adding inline CSS in the `button_html` parameter.",
                    "default": "grid",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "grid_rows": {
                    "title": "grid rows",
                    "description": "The number of rows in the button grid. Only applicable when `button_layout` is set to `'grid'`. If null, the number of rows will be determined automatically based on the number of buttons and the number of columns.",
                    "default": 1,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "grid_columns": {
                    "title": "grid columns",
                    "description": "The number of columns in the button grid. Only applicable when `button_layout` is set to `'grid'`. If null, the number of columns will be determined automatically based on the number of buttons and the number of rows.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "response_ends_trial": {
                    "title": "response ends trial",
                    "description": "If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the participant to view a stimulus for a fixed amount of time, even if they respond before the time is complete.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "render_on_canvas": {
                    "title": "render on canvas",
                    "description": "If true, the image will be drawn onto a canvas element. This prevents a blank screen (white flash) between consecutive image trials in some browsers, like Firefox and Edge. If false, the image will be shown via an img element, as in previous versions of jsPsych. If the stimulus is an **animated gif**, you must set this parameter to false, because the canvas rendering method will only present static images.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "enable_button_after": {
                    "title": "enable button after",
                    "description": "How long the button will delay enabling in milliseconds.",
                    "default": 0,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "stimulus",
                  "choices"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "image-keyboard-response"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "stimulus": {
                    "title": "stimulus",
                    "description": "The path of the image file to be displayed.",
                    "anyOf": [
                      {
                        "format": "asset-image",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "stimulus_height": {
                    "title": "stimulus height",
                    "description": "Set the height of the image in pixels. If left null (no value specified), then the image will display at its natural height.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "stimulus_width": {
                    "title": "stimulus width",
                    "description": "Set the width of the image in pixels. If left null (no value specified), then the image will display at its natural width.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "maintain_aspect_ratio": {
                    "title": "maintain aspect ratio",
                    "description": "If setting *only* the width or *only* the height and this parameter is true, then the other dimension will be scaled to maintain the image's aspect ratio.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "choices": {
                    "title": "choices",
                    "description": "his array contains the key(s) that the participant is allowed to press in order to respond to the stimulus. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) and [this page (event.key column)](https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/) for more examples. Any key presses that are not listed in the array will be ignored. The default value of `\"ALL_KEYS\"` means that all keys will be accepted as valid responses. Specifying `\"NO_KEYS\"` will mean that no responses are allowed.",
                    "default": "ALL_KEYS",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "format": "keyboard-key",
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "enum": [
                          "ALL_KEYS",
                          "NO_KEYS"
                        ]
                      }
                    ]
                  },
                  "prompt": {
                    "title": "prompt",
                    "description": "This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press).",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "stimulus_duration": {
                    "title": "stimulus duration",
                    "description": "How long to show the stimulus for in milliseconds. If the value is `null`, then the stimulus will be shown until the participant makes a response.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "trial_duration": {
                    "title": "trial duration",
                    "description": "How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as null for the trial and the trial will end. If the value of this parameter is `null`, then the trial will wait for a response indefinitely.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "response_ends_trial": {
                    "title": "response ends trial",
                    "description": "If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the participant to view a stimulus for a fixed amount of time, even if they respond before the time is complete.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "render_on_canvas": {
                    "title": "render on canvas",
                    "description": "If `true`, the image will be drawn onto a canvas element. This prevents a blank screen (white flash) between consecutive image trials in some browsers, like Firefox and Edge. If `false`, the image will be shown via an img element, as in previous versions of jsPsych. If the stimulus is an **animated gif**, you must set this parameter to false, because the canvas rendering method will only present static images.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "wait_for_key_release": {
                    "title": "wait for key release",
                    "description": "If true, the response is not registered until the participant releases the key. The response time (`rt`) still reflects when the key was pressed, and the additional data field `rt_key_duration` records how long the key was held down. Note that when this is true, the trial cannot end until the key is released: with `response_ends_trial: true` the trial ends at the key release, and if the trial ends for another reason (e.g., `trial_duration`) while the key is still held, no response is recorded for the trial.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "stimulus"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "image-slider-response"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "stimulus": {
                    "title": "stimulus",
                    "description": "The path to the image file to be displayed.",
                    "anyOf": [
                      {
                        "format": "asset-image",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "stimulus_height": {
                    "title": "stimulus height",
                    "description": "Set the height of the image in pixels. If left null (no value specified), then the image will display at its natural height.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "stimulus_width": {
                    "title": "stimulus width",
                    "description": "Set the width of the image in pixels. If left null (no value specified), then the image will display at its natural width.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "maintain_aspect_ratio": {
                    "title": "maintain aspect ratio",
                    "description": "If setting *only* the width or *only* the height and this parameter is true, then the other dimension will be scaled to maintain the image's aspect ratio.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "min": {
                    "title": "min",
                    "description": "Sets the minimum value of the slider.",
                    "default": 0,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "max": {
                    "title": "max",
                    "description": "Sets the maximum value of the slider.",
                    "default": 100,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "slider_start": {
                    "title": "slider start",
                    "description": "Sets the starting value of the slider.",
                    "default": 50,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "step": {
                    "title": "step",
                    "description": "Sets the step of the slider.",
                    "default": 1,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "labels": {
                    "title": "labels",
                    "description": "abels displayed at equidistant locations on the slider. For example, two labels will be placed at the ends of the slider. Three labels would place two at the ends and one in the middle. Four will place two at the ends, and the other two will be at 33% and 67% of the slider width.",
                    "default": [],
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "slider_width": {
                    "title": "slider width",
                    "description": "Set the width of the slider in pixels. If left null, then the width will be equal to the widest element in the display.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "button_label": {
                    "title": "button label",
                    "description": "Label of the button to advance/submit.",
                    "default": "Continue",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "require_movement": {
                    "title": "require movement",
                    "description": "If true, the participant must move the slider before clicking the continue button.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "prompt": {
                    "title": "prompt",
                    "description": "This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press).",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "stimulus_duration": {
                    "title": "stimulus duration",
                    "description": "How long to show the stimulus for in milliseconds. If the value is null, then the stimulus will be shown until the participant makes a response.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "trial_duration": {
                    "title": "trial duration",
                    "description": "How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, then the trial will wait for a response indefinitely.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "response_ends_trial": {
                    "title": "response ends trial",
                    "description": "If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the participant to view a stimulus for a fixed amount of time, even if they respond before the time is complete.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "render_on_canvas": {
                    "title": "render on canvas",
                    "description": "If true, the image will be drawn onto a canvas element. This prevents a blank screen (white flash) between consecutive image trials in some browsers, like Firefox and Edge. If false, the image will be shown via an img element, as in previous versions of jsPsych. If the stimulus is an **animated gif**, you must set this parameter to false, because the canvas rendering method will only present static images.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "stimulus"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "initialize-camera"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "device_select_message": {
                    "title": "device select message",
                    "description": "The message to display when the user is presented with a dropdown list of available devices.",
                    "default": "<p>Please select the camera you would like to use.</p>",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "button_label": {
                    "title": "button label",
                    "description": "The label for the select button.",
                    "default": "Use this camera",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "include_audio": {
                    "title": "include audio",
                    "description": "Set to `true` to include an audio track in the recordings.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "width": {
                    "title": "width",
                    "description": "Request a specific width for the recording. This is not a guarantee that this width will be used, as it depends on the capabilities of the participant's device. Learn more about `MediaRecorder` constraints [here](https://developer.mozilla.org/en-US/docs/Web/API/Media_Streams_API/Constraints#requesting_a_specific_value_for_a_setting).",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "height": {
                    "title": "height",
                    "description": "Request a specific height for the recording. This is not a guarantee that this height will be used, as it depends on the capabilities of the participant's device. Learn more about `MediaRecorder` constraints [here](https://developer.mozilla.org/en-US/docs/Web/API/Media_Streams_API/Constraints#requesting_a_specific_value_for_a_setting).",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "mime_type": {
                    "title": "mime type",
                    "description": "Set this to use a specific [MIME type](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/mimeType) for the recording. Set the entire type, e.g., `'video/mp4; codecs=\"avc1.424028, mp4a.40.2\"'`.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "initialize-microphone"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "device_select_message": {
                    "title": "device select message",
                    "description": "The message to display when the user is presented with a dropdown list of available devices.",
                    "default": "<p>Please select the microphone you would like to use.</p>",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "button_label": {
                    "title": "button label",
                    "description": "The label for the select button.",
                    "default": "Use this microphone",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "instructions"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "pages": {
                    "title": "pages",
                    "description": "Each element of the array is the content for a single page. Each page should be an HTML-formatted string.",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "format": "html",
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "key_forward": {
                    "title": "key forward",
                    "description": "This is the key that the participant can press in order to advance to the next page. This key should be specified as a string (e.g., `'a'`, `'ArrowLeft'`, `' '`, `'Enter'`).",
                    "default": "ArrowRight",
                    "anyOf": [
                      {
                        "format": "keyboard-key",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "key_backward": {
                    "title": "key backward",
                    "description": "This is the key that the participant can press to return to the previous page. This key should be specified as a string (e.g., `'a'`, `'ArrowLeft'`, `' '`, `'Enter'`).",
                    "default": "ArrowLeft",
                    "anyOf": [
                      {
                        "format": "keyboard-key",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "allow_backward": {
                    "title": "allow backward",
                    "description": "If true, the participant can return to previous pages of the instructions. If false, they may only advace to the next page.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "allow_keys": {
                    "title": "allow keys",
                    "description": "If `true`, the participant can use keyboard keys to navigate the pages. If `false`, they may not.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "show_clickable_nav": {
                    "title": "show clickable nav",
                    "description": "If true, then a `Previous` and `Next` button will be displayed beneath the instructions. Participants can click the buttons to navigate.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "show_page_number": {
                    "title": "show page number",
                    "description": "If true, and clickable navigation is enabled, then Page x/y will be shown between the nav buttons.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "page_label": {
                    "title": "page label",
                    "description": "The text that appears before x/y pages displayed when show_page_number is true.",
                    "default": "Page",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "button_label_previous": {
                    "title": "button label previous",
                    "description": "The text that appears on the button to go backwards.",
                    "default": "Previous",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "button_label_next": {
                    "title": "button label next",
                    "description": "The text that appears on the button to go forwards.",
                    "default": "Next",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "on_page_change": {
                    "title": "Page change callback",
                    "description": "The callback function when page changes",
                    "examples": [
                      {
                        "code": "function(current_page) {\n}"
                      }
                    ],
                    "anyOf": [
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "pages"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "maxdiff"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "alternatives": {
                    "title": "alternatives",
                    "description": "An array of one or more alternatives of string type to fill the rows of the maxdiff table. If `required` is true, then the array must contain two or more alternatives, so that at least one can be selected for both the left and right columns.",
                    "examples": [
                      [
                        "Option 1",
                        "Option 2",
                        "Option 3"
                      ]
                    ],
                    "anyOf": [
                      {
                        "minItems": 2,
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "labels": {
                    "title": "labels",
                    "description": "An array with exactly two labels of string type to display as column headings (to the left and right of the alternatives) for responses on the criteria of interest.",
                    "examples": [
                      [
                        "Least important",
                        "Most important"
                      ]
                    ],
                    "anyOf": [
                      {
                        "minItems": 2,
                        "maxItems": 2,
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "randomize_alternative_order": {
                    "title": "randomize alternative order",
                    "description": "If true, the display order of `alternatives` is randomly determined at the start of the trial.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "preamble": {
                    "title": "preamble",
                    "description": "HTML formatted string to display at the top of the page above the maxdiff table.",
                    "default": "",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "button_label": {
                    "title": "button label",
                    "description": "Label of the button to submit response.",
                    "default": "Continue",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "required": {
                    "title": "required",
                    "description": "If true, prevents the user from submitting the response and proceeding until a radio button in both the left and right response columns has been selected.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "alternatives",
                  "labels"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "mirror-camera"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "prompt": {
                    "title": "prompt",
                    "description": "HTML-formatted content to display below the camera feed.",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "button_label": {
                    "title": "button label",
                    "description": "The label of the button to advance to the next trial.",
                    "default": "Continue",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "height": {
                    "title": "height",
                    "description": "The height of the video playback element. If left `null` then it will match the size of the recording.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "width": {
                    "title": "width",
                    "description": "The width of the video playback element. If left `null` then it will match the size of the recording.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "mirror_camera": {
                    "title": "mirror camera",
                    "description": "Whether to mirror the video image.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "preload"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "auto_preload": {
                    "title": "auto preload",
                    "description": "If `true`, the plugin will preload any files that can be automatically preloaded based on the main experiment timeline that is passed to `jsPsych.run`. If `false`, any file(s) to be preloaded should be specified by passing a timeline array to the `trials` parameter and/or an array of file paths to the `images`, `audio`, and/or `video` parameters. Setting this parameter to `false` is useful when you plan to preload your files in smaller batches throughout the experiment.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "trials": {
                    "title": "trials",
                    "description": "An array containing one or more jsPsych trial or timeline objects. This parameter is useful when you want to automatically preload stimuli files from a specific subset of the experiment. See [Creating an Experiment: The Timeline](../overview/timeline.md) for information on constructing timelines.",
                    "default": [],
                    "anyOf": [
                      {
                        "format": "timeline",
                        "type": "array"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "images": {
                    "title": "images",
                    "description": "Array with one or more image files to load. This parameter is often used in cases where media files cannot be automatically preloaded based on the timeline, e.g. because the media files are passed into an image plugin/parameter with timeline variables or dynamic parameters, or because the image is embedded in an HTML string.",
                    "default": [],
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "audio": {
                    "title": "audio",
                    "description": "Array with one or more audio files to load. This parameter is often used in cases where media files cannot be automatically preloaded based on the timeline, e.g. because the media files are passed into an audio plugin/parameter with timeline variables or dynamic parameters, or because the audio is embedded in an HTML string.",
                    "default": [],
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "video": {
                    "title": "video",
                    "description": "Array with one or more video files to load. This parameter is often used in cases where media files cannot be automatically preloaded based on the timeline, e.g. because the media files are passed into a video plugin/parameter with timeline variables or dynamic parameters, or because the video is embedded in an HTML string.",
                    "default": [],
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "message": {
                    "title": "message",
                    "description": "HTML-formatted message to show above the progress bar while the files are loading. If `null`, then no message is shown.",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "show_progress_bar": {
                    "title": "show progress bar",
                    "description": "If `true`, a progress bar will be shown while the files are loading. If `false`, no progress bar is shown.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "continue_after_error": {
                    "title": "continue after error",
                    "description": "Whether or not to continue with the experiment if a loading error occurs. If false, then if a loading error occurs, the error_message will be shown on the page and the trial will not end. If true, then if if a loading error occurs, the trial will end and preloading failure will be logged in the trial data.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "error_message": {
                    "title": "error message",
                    "description": "HTML-formatted message to be shown on the page after loading fails or times out. Only applies when `continue_after_error` is `false`.",
                    "default": "The experiment failed to load.",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "show_detailed_errors": {
                    "title": "show detailed errors",
                    "description": "Whether or not to show a detailed error message on the page. If true, then detailed error messages will be shown on the page for all files that failed to load, along with the general error_message. This parameter is only relevant when continue_after_error is false.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "max_load_time": {
                    "title": "max load time",
                    "description": "The maximum amount of time that the plugin should wait before stopping the preload and either ending the trial (if continue_after_error is true) or stopping the experiment with an error message (if continue_after_error is false). If null, the plugin will wait indefintely for the files to load.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "on_error": {
                    "title": "on error",
                    "description": "Function to be called after a file fails to load. The function takes the file name as its only argument.",
                    "default": null,
                    "anyOf": [
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "on_success": {
                    "title": "on success",
                    "description": "Function to be called after a file loads successfully. The function takes the file name as its only argument.",
                    "default": null,
                    "anyOf": [
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "psychophysics"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "stimuli": {
                    "title": "Stimuli",
                    "description": "The objects drawn on the canvas, each placed by its centre.",
                    "examples": [
                      [
                        {
                          "obj_type": "cross",
                          "line_length": 40
                        }
                      ]
                    ],
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "properties": {
                            "startX": {
                              "title": "startX",
                              "description": "The horizontal start position.",
                              "default": 0,
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "startY": {
                              "title": "startY",
                              "description": "The vertical start position.",
                              "default": 0,
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "endX": {
                              "title": "endX",
                              "description": "The horizontal end position.",
                              "default": null,
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "endY": {
                              "title": "endY",
                              "description": "The vertical end position.",
                              "default": null,
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "show_start_time": {
                              "title": "Show start time",
                              "description": "Time to start presenting the stimuli",
                              "default": 0,
                              "anyOf": [
                                {
                                  "type": "integer"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "show_end_time": {
                              "title": "Show end time",
                              "description": "Time to end presenting the stimuli",
                              "default": null,
                              "anyOf": [
                                {
                                  "type": "integer"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "show_start_frame": {
                              "title": "Show start frame",
                              "description": "Time to start presenting the stimuli in frames",
                              "default": 0,
                              "anyOf": [
                                {
                                  "type": "integer"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "show_end_frame": {
                              "title": "Show end frame",
                              "description": "Time to end presenting the stimuli in frames",
                              "default": null,
                              "anyOf": [
                                {
                                  "type": "integer"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "line_width": {
                              "title": "Line width",
                              "description": "The line width",
                              "default": 1,
                              "anyOf": [
                                {
                                  "type": "integer"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "lineJoin": {
                              "title": "lineJoin",
                              "description": "The type of the corner when two lines meet.",
                              "default": "miter",
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "miterLimit": {
                              "title": "miterLimit",
                              "description": "The maximum miter length.",
                              "default": 10,
                              "anyOf": [
                                {
                                  "type": "integer"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "drawFunc": {
                              "title": "Draw function",
                              "description": "This function enables to move objects horizontally and vertically.",
                              "default": null,
                              "anyOf": [
                                {
                                  "$ref": "#/definitions/code"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "change_attr": {
                              "title": "Change attributes",
                              "description": "This function enables to change attributes of objects immediately before drawing.",
                              "default": null,
                              "anyOf": [
                                {
                                  "$ref": "#/definitions/code"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "is_frame": {
                              "title": "time is in frames",
                              "description": "If true, time is treated in frames.",
                              "default": false,
                              "anyOf": [
                                {
                                  "type": "boolean"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "prepared": {
                              "title": "Stimulus prepared flag",
                              "description": "If true, the stimulus is prepared for presentation",
                              "default": false,
                              "anyOf": [
                                {
                                  "type": "boolean"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "origin_center": {
                              "title": "origin_center",
                              "description": "The origin is the center of the window.",
                              "default": true,
                              "anyOf": [
                                {
                                  "type": "boolean"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "is_presented": {
                              "title": "is_presented",
                              "description": "This will be true when the stimulus is presented.",
                              "default": false,
                              "anyOf": [
                                {
                                  "type": "boolean"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "trial_ends_after_audio": {
                              "title": "Trial ends after audio",
                              "description": "If true, then the trial will end as soon as the audio file finishes playing.",
                              "default": false,
                              "anyOf": [
                                {
                                  "type": "boolean"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "modulate_color": {
                              "title": "modulate_color",
                              "description": "The base RGBA array of the gabor patch.",
                              "default": [
                                1,
                                1,
                                1,
                                1
                              ],
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "number"
                                  }
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "offset_color": {
                              "title": "offset_color",
                              "description": "The offset RGBA array of the gabor patch.",
                              "default": [
                                0.5,
                                0.5,
                                0.5,
                                0
                              ],
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "number"
                                  }
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "min_validModulationRange": {
                              "title": "min_validModulationRange",
                              "description": "The minimum of the validation range of the gabor patch.",
                              "default": -2,
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "max_validModulationRange": {
                              "title": "max_validModulationRange",
                              "description": "The maximum of the validation range of the gabor patch.",
                              "default": 2,
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "tilt": {
                              "title": "tilt",
                              "description": "The angle of the gabor patch in degrees.",
                              "default": 0,
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "sf": {
                              "title": "spatial frequency",
                              "description": "The spatial frequency of the gabor patch.",
                              "default": 0.05,
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "phase": {
                              "title": "phase",
                              "description": "The phase (degrees) of the gabor patch.",
                              "default": 0,
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "sc": {
                              "title": "standard deviation",
                              "description": "The standard deviation of the distribution.",
                              "default": 20,
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "contrast": {
                              "title": "contrast",
                              "description": "The contrast of the gabor patch.",
                              "default": 20,
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "contrastPreMultiplicator": {
                              "title": "contrastPreMultiplicator",
                              "description": "A scaling factor",
                              "default": 1,
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "drift": {
                              "title": "drift",
                              "description": "The velocity of the drifting gabor patch.",
                              "default": 0,
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "method": {
                              "title": "gabor_drawing_method",
                              "description": "The method of drawing the gabor patch.",
                              "default": "ml-matrix",
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "disableNorm": {
                              "title": "disableNorm",
                              "description": "Disable normalization of the gaussian function.",
                              "default": false,
                              "anyOf": [
                                {
                                  "type": "boolean"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "disableGauss": {
                              "title": "disableGauss",
                              "description": "Disable to convolve with a Gaussian.",
                              "default": false,
                              "anyOf": [
                                {
                                  "type": "boolean"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "mask_func": {
                              "title": "Masking function",
                              "description": "Masking the image manually.",
                              "default": null,
                              "anyOf": [
                                {
                                  "$ref": "#/definitions/code"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "text_color": {
                              "title": "text color",
                              "description": "The color of the text.",
                              "default": "#000000",
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "fontStyle": {
                              "title": "font style",
                              "description": "Font style",
                              "default": "normal",
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "fontWeight": {
                              "title": "font weight",
                              "description": "Font weight",
                              "default": "normal",
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "fontSize": {
                              "title": "font size",
                              "description": "Font size",
                              "default": "20px",
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "fontFamily": {
                              "title": "font family",
                              "description": "Font family",
                              "default": "Verdana, Arial, Helvetica, sans-serif",
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "pixi_angle": {
                              "title": "pixi angle",
                              "description": "jspsych-psychophysics Copyright (c) 2019-2026 Daiichiro Kuroki Released under the MIT license jspsych-psychophysics is a plugin for conducting online/Web-based psychophysical experiments using jsPsych (de Leeuw, 2015). Please see http://jspsychophysics.hes.kyushu-u.ac.jp/ about how to use this plugin. This application uses following libraries ml-matrix: Copyright (c) 2014 Michaël Zasso PixiJS: Copyright (c) 2013-2023 Mathew Groves, Chad Engler See LICENSE file for details */ declare const info: { name: string; version: string; description: string; parameters: { stimuli: { type: ParameterType; array: boolean; pretty_name: string; description: string; nested: { startX: { type: ParameterType; pretty_name: string; default: number; description: string; }; startY: { type: ParameterType; pretty_name: string; default: number; description: string; }; endX: { type: ParameterType; pretty_name: string; default: any; description: string; }; endY: { type: ParameterType; pretty_name: string; default: any; description: string; }; show_start_time: { type: ParameterType; pretty_name: string; default: number; description: string; }; show_end_time: { type: ParameterType; pretty_name: string; default: any; description: string; }; show_start_frame: { type: ParameterType; pretty_name: string; default: number; description: string; }; show_end_frame: { type: ParameterType; pretty_name: string; default: any; description: string; }; line_width: { type: ParameterType; pretty_name: string; default: number; description: string; }; lineJoin: { type: ParameterType; pretty_name: string; default: string; description: string; }; miterLimit: { type: ParameterType; pretty_name: string; default: number; description: string; }; drawFunc: { type: ParameterType; pretty_name: string; default: any; description: string; }; change_attr: { type: ParameterType; pretty_name: string; default: any; description: string; }; is_frame: { type: ParameterType; pretty_name: string; default: boolean; description: string; }; prepared: { type: ParameterType; pretty_name: string; default: boolean; description: string; }; origin_center: { type: ParameterType; pretty_name: string; default: boolean; description: string; }; is_presented: { type: ParameterType; pretty_name: string; default: boolean; description: string; }; trial_ends_after_audio: { type: ParameterType; pretty_name: string; default: boolean; description: string; }; modulate_color: { type: ParameterType; array: boolean; pretty_name: string; default: number[]; description: string; }; offset_color: { type: ParameterType; array: boolean; pretty_name: string; default: number[]; description: string; }; min_validModulationRange: { type: ParameterType; pretty_name: string; default: number; description: string; }; max_validModulationRange: { type: ParameterType; pretty_name: string; default: number; description: string; }; tilt: { type: ParameterType; pretty_name: string; default: number; description: string; }; sf: { type: ParameterType; pretty_name: string; default: number; description: string; }; phase: { type: ParameterType; pretty_name: string; default: number; description: string; }; sc: { type: ParameterType; pretty_name: string; default: number; description: string; }; contrast: { type: ParameterType; pretty_name: string; default: number; description: string; }; contrastPreMultiplicator: { type: ParameterType; pretty_name: string; default: number; description: string; }; drift: { type: ParameterType; pretty_name: string; default: number; description: string; }; method: { type: ParameterType; pretty_name: string; default: string; description: string; }; disableNorm: { type: ParameterType; pretty_name: string; default: boolean; description: string; }; disableGauss: { type: ParameterType; pretty_name: string; default: boolean; description: string; }; mask_func: { type: ParameterType; pretty_name: string; default: any; description: string; }; text_color: { type: ParameterType; pretty_name: string; default: string; description: string; }; fontStyle: { type: ParameterType; pretty_name: string; default: string; description: string; }; fontWeight: { type: ParameterType; pretty_name: string; default: string; description: string; }; fontSize: { type: ParameterType; pretty_name: string; default: string; description: string; }; fontFamily: { type: ParameterType; pretty_name: string; default: string; description: string; }; /** The angle (degrees) of the stimulus when using PixiJS.",
                              "default": null,
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "pixi_rotation": {
                              "title": "pixi rotation",
                              "description": "The rotation (radians) of the stimulus when using PixiJS.",
                              "default": null,
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "pixi_mask": {
                              "title": "pixi mask",
                              "description": "Mask parameter for PixiJS. This function should return a PIXI.Graphics object that will be used as a mask for the stimulus.",
                              "default": null,
                              "anyOf": [
                                {
                                  "$ref": "#/definitions/code"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "pixi_filters": {
                              "title": "pixi filters",
                              "description": "Filter parameter for PixiJS. This function should return a PIXI.Filter object that will be used to filter the stimulus.",
                              "default": null,
                              "anyOf": [
                                {
                                  "$ref": "#/definitions/code"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "pixi_zIndex": {
                              "title": "pixi zIndex",
                              "description": "The z-index of the stimulus when using PixiJS. Stimuli with higher z-index will be drawn on top of those with lower z-index.",
                              "default": null,
                              "anyOf": [
                                {
                                  "type": "integer"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "random_dot_area_width": {
                              "title": "random dot area width",
                              "description": "The width of the area where the random dots are presented (in pixels).",
                              "default": 100,
                              "anyOf": [
                                {
                                  "type": "integer"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "random_dot_area_height": {
                              "title": "random dot area height",
                              "description": "The height of the area where the random dots are presented (in pixels).",
                              "default": 100,
                              "anyOf": [
                                {
                                  "type": "integer"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "random_dot_size": {
                              "title": "random dot size",
                              "description": "The size of the random dots (in pixels).",
                              "default": 5,
                              "anyOf": [
                                {
                                  "type": "integer"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "random_dot_density": {
                              "title": "random dot density",
                              "description": "The density of the random dots, ranging from 0 to 1.",
                              "default": 0.5,
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "random_dot_background_color": {
                              "title": "random dot background color",
                              "description": "The background color of the canvas for the random dots.",
                              "default": "white",
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "random_dot_color": {
                              "title": "random dot color",
                              "description": "The color of the random dots.",
                              "default": "black",
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "obj_type": {
                              "title": "Shape",
                              "description": "What kind of object this is.",
                              "anyOf": [
                                {
                                  "enum": [
                                    "cross",
                                    "circle",
                                    "rect",
                                    "line",
                                    "text",
                                    "image"
                                  ],
                                  "type": "string"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "radius": {
                              "title": "Radius",
                              "description": "Radius of the circle, in pixels.",
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "width": {
                              "title": "Width",
                              "description": "Width of the rectangle, in pixels.",
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "height": {
                              "title": "Height",
                              "description": "Height of the rectangle, in pixels.",
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "line_length": {
                              "title": "Length",
                              "description": "Length of the line, or of each arm of the cross, in pixels.",
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "angle": {
                              "title": "Angle",
                              "description": "Rotation of the line, in degrees.",
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "line_color": {
                              "title": "Line colour",
                              "description": "Colour of the outline or line, as any CSS colour.",
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "fill_color": {
                              "title": "Fill colour",
                              "description": "Colour inside the shape, as any CSS colour.",
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "content": {
                              "title": "Text",
                              "description": "The text to draw; a line break starts a new line.",
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "file": {
                              "title": "Image",
                              "description": "The image file to draw.",
                              "anyOf": [
                                {
                                  "format": "asset-image",
                                  "type": "string"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "scale": {
                              "title": "Scale",
                              "description": "Size relative to the image's own, e.g. 0.5 for half.",
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "image_width": {
                              "title": "Image width",
                              "description": "Width to draw the image at, in pixels; keeps its shape.",
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "image_height": {
                              "title": "Image height",
                              "description": "Height to draw the image at, in pixels; keeps its shape.",
                              "anyOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            }
                          },
                          "required": [
                            "obj_type"
                          ]
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "pixi_app": {
                    "title": "Pixi application",
                    "default": null,
                    "anyOf": [
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "choices": {
                    "title": "Choices",
                    "description": "The keys the subject is allowed to press to respond to the stimulus.",
                    "default": "ALL_KEYS",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "format": "keyboard-key",
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "enum": [
                          "ALL_KEYS",
                          "NO_KEYS"
                        ]
                      }
                    ]
                  },
                  "prompt": {
                    "title": "Prompt",
                    "description": "Any content here will be displayed below the stimulus.",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "upper_prompt": {
                    "title": "Upper prompt",
                    "description": "Any content here will be displayed above the stimulus.",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "lower_prompt": {
                    "title": "Lower prompt",
                    "description": "This is the same as the prompt.",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "canvas_width": {
                    "title": "Canvas width",
                    "description": "The width of the canvas.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "canvas_height": {
                    "title": "Canvas height",
                    "description": "The height of the canvas.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "canvas_offsetX": {
                    "title": "Canvas offset X",
                    "description": "This value is subtracted from the width of the canvas.",
                    "default": 0,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "canvas_offsetY": {
                    "title": "Canvas offset Y",
                    "description": "This value is subtracted from the height of the canvas.",
                    "default": 8,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "trial_duration": {
                    "title": "Trial duration",
                    "description": "How long to show trial before it ends.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "response_ends_trial": {
                    "title": "Response ends trial",
                    "description": "If true, trial will end when subject makes a response.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "background_color": {
                    "title": "Background color",
                    "description": "The background color of the canvas.",
                    "default": "grey",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "response_type": {
                    "title": "key, mouse or button",
                    "description": "How to make a response.",
                    "default": "key",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "response_start_time": {
                    "title": "Response start",
                    "description": "When the subject is allowed to respond to the stimulus.",
                    "default": 0,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "raf_func": {
                    "title": "Step function",
                    "description": "This function enables to move objects as you wish.",
                    "default": null,
                    "anyOf": [
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "mouse_down_func": {
                    "title": "Mouse down function",
                    "description": "This function is set to the event listener of the mousedown.",
                    "default": null,
                    "anyOf": [
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "mouse_move_func": {
                    "title": "Mouse move function",
                    "description": "This function is set to the event listener of the mousemove.",
                    "default": null,
                    "anyOf": [
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "mouse_up_func": {
                    "title": "Mouse up function",
                    "description": "This function is set to the event listener of the mouseup.",
                    "default": null,
                    "anyOf": [
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "key_down_func": {
                    "title": "Key down function",
                    "description": "This function is set to the event listener of the keydown.",
                    "default": null,
                    "anyOf": [
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "key_up_func": {
                    "title": "Key up function",
                    "description": "This function is set to the event listener of the keyup.",
                    "default": null,
                    "anyOf": [
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "touchstart_func": {
                    "title": "Touch start function",
                    "description": "This function is set to the event listener of the CANVAS touchstart.",
                    "default": null,
                    "anyOf": [
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "touchend_func": {
                    "title": "Touch end function",
                    "description": "This function is set to the event listener of the CANVAS touchend.",
                    "default": null,
                    "anyOf": [
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "touchcancel_func": {
                    "title": "Touch cancel function",
                    "description": "This function is set to the event listener of the CANVAS touchcancel.",
                    "default": null,
                    "anyOf": [
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "touchmove_func": {
                    "title": "Touch move function",
                    "description": "This function is set to the event listener of the CANVAS touchmove.",
                    "default": null,
                    "anyOf": [
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "button_choices": {
                    "title": "Button choices",
                    "description": "The labels for the buttons.",
                    "default": [
                      "Next"
                    ],
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "button_html": {
                    "title": "button html",
                    "examples": [
                      {
                        "code": "function(choice, choice_index) {\n  return `<button class=\"jspsych-btn\">${choice}</button>`;\n}"
                      }
                    ],
                    "anyOf": [
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "button_layout": {
                    "title": "button layout",
                    "description": "Setting to `'grid'` will make the container element have the CSS property `display: grid` and enable the use of `grid_rows` and `grid_columns`. Setting to `'flex'` will make the container element have the CSS property `display: flex`. You can customize how the buttons are laid out by adding inline CSS in the `button_html` parameter.",
                    "default": "grid",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "grid_rows": {
                    "title": "grid rows",
                    "description": "The number of rows in the button grid. Only applicable when `button_layout` is set to `'grid'`. If null, the number of rows will be determined automatically based on the number of buttons and the number of columns.",
                    "default": 1,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "grid_columns": {
                    "title": "grid columns",
                    "description": "The number of columns in the button grid. Only applicable when `button_layout` is set to `'grid'`. If null, the number of columns will be determined automatically based on the number of buttons and the number of rows.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "vert_button_margin": {
                    "title": "Margin vertical",
                    "description": "The vertical margin of the button.",
                    "default": "0px",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "horiz_button_margin": {
                    "title": "Margin horizontal",
                    "description": "The horizontal margin of the button.",
                    "default": "8px",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "clear_canvas": {
                    "title": "clear_canvas",
                    "description": "Clear the canvas per frame.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "stimuli"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "resize"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "item_height": {
                    "title": "item height",
                    "description": "The height of the item to be measured. Any units can be used as long as you are consistent with using the same units for all parameters.",
                    "default": 1,
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "item_width": {
                    "title": "item width",
                    "description": "The width of the item to be measured.",
                    "default": 1,
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "prompt": {
                    "title": "prompt",
                    "description": "The content displayed below the resizable box and above the button.",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "pixels_per_unit": {
                    "title": "pixels per unit",
                    "description": "After the scaling factor is applied, this many pixels will equal one unit of measurement.",
                    "default": 100,
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "starting_size": {
                    "title": "starting size",
                    "description": "The initial size of the box, in pixels, along the largest dimension. The aspect ratio will be set automatically to match the item width and height.",
                    "default": 100,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "button_label": {
                    "title": "button label",
                    "description": "Label to display on the button to complete calibration.",
                    "default": "Continue",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "same-different-html"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "stimuli": {
                    "title": "stimuli",
                    "description": "A pair of stimuli, represented as an array with two entries, one for each stimulus. A stimulus is a string containing valid HTML markup. Stimuli will be shown in the order that they are defined in the array.",
                    "examples": [
                      [
                        "<p>A</p>",
                        "<p>A</p>"
                      ]
                    ],
                    "anyOf": [
                      {
                        "minItems": 2,
                        "maxItems": 2,
                        "type": "array",
                        "items": {
                          "format": "html",
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "answer": {
                    "title": "answer",
                    "description": "Correct answer: either \"same\" or \"different\".",
                    "anyOf": [
                      {
                        "enum": [
                          "same",
                          "different"
                        ],
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "same_key": {
                    "title": "same key",
                    "description": "The key that subjects should press to indicate that the two stimuli are the same.",
                    "default": "q",
                    "anyOf": [
                      {
                        "format": "keyboard-key",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "different_key": {
                    "title": "different key",
                    "description": "The key that subjects should press to indicate that the two stimuli are different.",
                    "default": "p",
                    "anyOf": [
                      {
                        "format": "keyboard-key",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "first_stim_duration": {
                    "title": "first stim duration",
                    "description": "How long to show the first stimulus for in milliseconds. If the value of this parameter is null then the stimulus will be shown until the participant presses any key.",
                    "default": 1000,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "gap_duration": {
                    "title": "gap duration",
                    "description": "How long to show a blank screen in between the two stimuli.",
                    "default": 500,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "second_stim_duration": {
                    "title": "Second stimulus duration",
                    "description": "How long to show the second stimulus for in milliseconds. If null, then the stimulus will remain on the screen until a valid response is made.",
                    "default": 1000,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "prompt": {
                    "title": "prompt",
                    "description": "This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press).",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "stimuli",
                  "answer"
                ],
                "additionalProperties": false
              }
            },
            "not": {
              "title": "This step scores its answers itself.",
              "required": [
                "score"
              ]
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "same-different-image"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "stimuli": {
                    "title": "stimuli",
                    "description": "A pair of stimuli, represented as an array with two entries, one for each stimulus. The stimulus is a path to an image file. Stimuli will be shown in the order that they are defined in the array.",
                    "anyOf": [
                      {
                        "minItems": 2,
                        "maxItems": 2,
                        "type": "array",
                        "items": {
                          "format": "asset-image",
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "answer": {
                    "title": "answer",
                    "description": "Either `'same'` or `'different'`.",
                    "anyOf": [
                      {
                        "enum": [
                          "same",
                          "different"
                        ],
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "same_key": {
                    "title": "same key",
                    "description": "The key that subjects should press to indicate that the two stimuli are the same.",
                    "default": "q",
                    "anyOf": [
                      {
                        "format": "keyboard-key",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "different_key": {
                    "title": "different key",
                    "description": "The key that subjects should press to indicate that the two stimuli are different.",
                    "default": "p",
                    "anyOf": [
                      {
                        "format": "keyboard-key",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "first_stim_duration": {
                    "title": "first stim duration",
                    "description": "How long to show the first stimulus for in milliseconds. If the value of this parameter is null then the stimulus will be shown until the participant presses any key.",
                    "default": 1000,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "gap_duration": {
                    "title": "gap duration",
                    "description": "How long to show a blank screen in between the two stimuli",
                    "default": 500,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "second_stim_duration": {
                    "title": "second stim duration",
                    "description": "How long to show the second stimulus for in milliseconds. If null, then the stimulus will remain on the screen until a valid response is made.",
                    "default": 1000,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "prompt": {
                    "title": "prompt",
                    "description": "This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press).",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "stimuli",
                  "answer"
                ],
                "additionalProperties": false
              }
            },
            "not": {
              "title": "This step scores its answers itself.",
              "required": [
                "score"
              ]
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "serial-reaction-time"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "grid": {
                    "title": "grid",
                    "description": "This array represents the grid of boxes shown on the screen. Each inner array represents a single row. The entries in the inner arrays represent the columns. If an entry is `1` then a square will be drawn at that location on the grid. If an entry is `0` then the corresponding location on the grid will be empty. Thus, by mixing `1`s and `0`s it is possible to create many different grid-based arrangements.",
                    "default": [
                      [
                        1,
                        1,
                        1,
                        1
                      ]
                    ],
                    "anyOf": [
                      {
                        "format": "grid",
                        "type": "array",
                        "items": {
                          "title": "row",
                          "type": "array",
                          "items": {
                            "title": "cell",
                            "enum": [
                              0,
                              1
                            ],
                            "type": "integer"
                          }
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "target": {
                    "title": "target",
                    "description": "The location of the target. The array should be the [row, column] of the target.",
                    "examples": [
                      [
                        0,
                        0
                      ]
                    ],
                    "anyOf": [
                      {
                        "minItems": 2,
                        "maxItems": 2,
                        "type": "array",
                        "items": {
                          "type": "integer"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "choices": {
                    "title": "choices",
                    "description": "The dimensions of this array must match the dimensions of `grid`. Each entry in this array is the key that should be pressed for that corresponding location in the grid. Entries can be left blank if there is no key associated with that location of the grid.",
                    "default": [
                      [
                        "3",
                        "5",
                        "7",
                        "9"
                      ]
                    ],
                    "anyOf": [
                      {
                        "format": "grid",
                        "type": "array",
                        "items": {
                          "title": "row",
                          "type": "array",
                          "items": {
                            "title": "cell",
                            "format": "keyboard-key",
                            "type": "string"
                          }
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "grid_square_size": {
                    "title": "grid square size",
                    "description": "The width and height in pixels of each square in the grid.",
                    "default": 100,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "target_color": {
                    "title": "target color",
                    "description": "The color of the target square.",
                    "default": "#999",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "response_ends_trial": {
                    "title": "response ends trial",
                    "description": "If true, the trial ends after a key press. Feedback is displayed if `show_response_feedback` is true.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "pre_target_duration": {
                    "title": "pre target duration",
                    "description": "The number of milliseconds to display the grid *before* the target changes color.",
                    "default": 0,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "trial_duration": {
                    "title": "trial duration",
                    "description": "The maximum length of time of the trial, not including feedback.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "show_response_feedback": {
                    "title": "show response feedback",
                    "description": "If true, show feedback indicating where the user responded and whether it was correct.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "feedback_duration": {
                    "title": "feedback duration",
                    "description": "The length of time in milliseconds to show the feedback.",
                    "default": 200,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "fade_duration": {
                    "title": "fade duration",
                    "description": "If a positive number, the target will progressively change color at the start of the trial, with the transition lasting this many milliseconds.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "prompt": {
                    "title": "prompt",
                    "description": "This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which keys to press).",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "target"
                ],
                "additionalProperties": false
              }
            },
            "not": {
              "title": "This step scores its answers itself.",
              "required": [
                "score"
              ]
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "serial-reaction-time-mouse"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "grid": {
                    "title": "grid",
                    "description": "This array represents the grid of boxes shown on the screen. Each inner array represents a single row. The entries in the inner arrays represent the columns. If an entry is `1` then a square will be drawn at that location on the grid. If an entry is `0` then the corresponding location on the grid will be empty. Thus, by mixing `1`s and `0`s it is possible to create many different grid-based arrangements.",
                    "default": [
                      [
                        1,
                        1,
                        1,
                        1
                      ]
                    ],
                    "anyOf": [
                      {
                        "format": "grid",
                        "type": "array",
                        "items": {
                          "title": "row",
                          "type": "array",
                          "items": {
                            "title": "cell",
                            "enum": [
                              0,
                              1
                            ],
                            "type": "integer"
                          }
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "target": {
                    "title": "target",
                    "description": "The location of the target. The array should be the [row, column] of the target.",
                    "examples": [
                      [
                        0,
                        0
                      ]
                    ],
                    "anyOf": [
                      {
                        "minItems": 2,
                        "maxItems": 2,
                        "type": "array",
                        "items": {
                          "type": "integer"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "grid_square_size": {
                    "title": "grid square size",
                    "description": "The width and height in pixels of each square in the grid.",
                    "default": 100,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "target_color": {
                    "title": "target color",
                    "description": "The color of the target square.",
                    "default": "#999",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "response_ends_trial": {
                    "title": "response ends trial",
                    "description": "If true, the trial ends after a click. Feedback is displayed if `show_response_feedback` is true.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "pre_target_duration": {
                    "title": "pre target duration",
                    "description": "The number of milliseconds to display the grid *before* the target changes color.",
                    "default": 0,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "trial_duration": {
                    "title": "trial duration",
                    "description": "How long to show the trial */ /** The maximum length of time of the trial, not including feedback.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "show_response_feedback": {
                    "title": "show response feedback",
                    "description": "If true, show feedback indicating where the participant clicked and whether it was correct.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "feedback_duration": {
                    "title": "feedback duration",
                    "description": "The length of time in milliseconds to show the feedback.",
                    "default": 200,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "fade_duration": {
                    "title": "fade duration",
                    "description": "If a positive number, the target will progressively change color at the start of the trial, with the transition lasting this many milliseconds.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "allow_nontarget_responses": {
                    "title": "allow nontarget responses",
                    "description": "If true, then user can make nontarget response.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "prompt": {
                    "title": "prompt",
                    "description": "This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which keys to press).",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "target"
                ],
                "additionalProperties": false
              }
            },
            "not": {
              "title": "This step scores its answers itself.",
              "required": [
                "score"
              ]
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "sketchpad"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "canvas_shape": {
                    "title": "canvas shape",
                    "description": "The shape of the canvas element. Accepts `'rectangle'` or `'circle'`",
                    "default": "rectangle",
                    "anyOf": [
                      {
                        "enum": [
                          "rectangle",
                          "circle"
                        ],
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "canvas_width": {
                    "title": "canvas width",
                    "description": "Width of the canvas in pixels when `canvas_shape` is a `\"rectangle\"`.",
                    "default": 500,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "canvas_height": {
                    "title": "canvas height",
                    "description": "Height of the canvas in pixels when `canvas_shape` is a `\"rectangle\"`.",
                    "default": 500,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "canvas_diameter": {
                    "title": "canvas diameter",
                    "description": "Diameter of the canvas (when `canvas_shape` is `'circle'`) in pixels.",
                    "default": 500,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "canvas_border_width": {
                    "title": "canvas border width",
                    "description": "This width of the border around the canvas element",
                    "default": 0,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "canvas_border_color": {
                    "title": "canvas border color",
                    "description": "The color of the border around the canvas element.",
                    "default": "#000",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "background_image": {
                    "title": "background image",
                    "description": "Path to an image to render as the background of the canvas.",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "asset-image",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "background_color": {
                    "title": "background color",
                    "description": "Color of the canvas background. Note that a `background_image` will render on top of the color.",
                    "default": "#ffffff",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "stroke_width": {
                    "title": "stroke width",
                    "description": "The width of the strokes on the canvas.",
                    "default": 2,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "stroke_color": {
                    "title": "stroke color",
                    "description": "The color of the stroke on the canvas.",
                    "default": "#000000",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "stroke_color_palette": {
                    "title": "stroke color palette",
                    "description": "Array of colors to render as a palette of choices for stroke color. Clicking on the corresponding color button will change the stroke color.",
                    "default": [],
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "prompt": {
                    "title": "prompt",
                    "description": "HTML content to render above or below the canvas (use `prompt_location` parameter to change location).",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "prompt_location": {
                    "title": "prompt location",
                    "description": "Location of the `prompt` content. Can be 'abovecanvas' or 'belowcanvas' or 'belowbutton'.",
                    "default": "abovecanvas",
                    "anyOf": [
                      {
                        "enum": [
                          "abovecanvas",
                          "belowcanvas",
                          "belowbutton"
                        ],
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "save_final_image": {
                    "title": "save final image",
                    "description": "Whether to save the final image in the data as a base64 encoded data URL.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "save_strokes": {
                    "title": "save strokes",
                    "description": "Whether to save the individual stroke data that generated the final image.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "key_to_draw": {
                    "title": "key to draw",
                    "description": "If this key is held down then it is like the mouse button being held down. The \"ink\" will flow when the button is held and stop when it is lifted. Pass in the string representation of the key, e.g., `'a'` for the A key or `' '` for the spacebar.",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "keyboard-key",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "show_finished_button": {
                    "title": "show finished button",
                    "description": "Whether to show the button that ends the trial.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "finished_button_label": {
                    "title": "finished button label",
                    "description": "The label for the button that ends the trial.",
                    "default": "Finished",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "show_clear_button": {
                    "title": "show clear button",
                    "description": "Whether to show the button that clears the entire drawing.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "clear_button_label": {
                    "title": "clear button label",
                    "description": "The label for the button that clears the entire drawing.",
                    "default": "Clear",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "show_undo_button": {
                    "title": "show undo button",
                    "description": "Whether to show the button that enables an undo action.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "undo_button_label": {
                    "title": "undo button label",
                    "description": "The label for the button that performs an undo action.",
                    "default": "Undo",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "show_redo_button": {
                    "title": "show redo button",
                    "description": "Whether to show the button that enables an redo action. `show_undo_button` must also be `true` for the redo button to show.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "redo_button_label": {
                    "title": "redo button label",
                    "description": "The label for the button that performs an redo action.",
                    "default": "Redo",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "choices": {
                    "title": "choices",
                    "description": "This array contains the key(s) that the participant is allowed to press in order to end the trial. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) and [this page (event.key column)](https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/) for more examples. Any key presses that are not listed in the array will be ignored. The default value of `\"NO_KEYS\"` means that no keys will be accepted as valid responses. Specifying `\"ALL_KEYS\"` will mean that all responses are allowed.",
                    "default": "NO_KEYS",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "format": "keyboard-key",
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "enum": [
                          "ALL_KEYS",
                          "NO_KEYS"
                        ]
                      }
                    ]
                  },
                  "trial_duration": {
                    "title": "trial duration",
                    "description": "Length of time before the trial ends. If `null` the trial will continue indefinitely (until another way of ending the trial occurs).",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "show_countdown_trial_duration": {
                    "title": "show countdown trial duration",
                    "description": "Whether to show a timer that counts down until the end of the trial when `trial_duration` is not `null`.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "countdown_timer_html": {
                    "title": "countdown timer html",
                    "description": "The HTML to use for rendering the countdown timer. The element with `id=\"sketchpad-timer\"` will have its content replaced by a countdown timer in the format `MM:SS`.",
                    "default": "<span id=\"sketchpad-timer\"></span> remaining",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "survey-html-form"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "html": {
                    "title": "html",
                    "description": "HTML formatted string containing all the input elements to display. Every element has to have its own distinctive name attribute. The <form> tag must not be included and is generated by the plugin.",
                    "default": null,
                    "examples": [
                      "<p><label>Your age <input name=\"age\" type=\"number\" min=\"18\" required></label></p>"
                    ],
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "preamble": {
                    "title": "preamble",
                    "description": "HTML formatted string to display at the top of the page above all the questions.",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "button_label": {
                    "title": "button label",
                    "description": "The text that appears on the button to finish the trial.",
                    "default": "Continue",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "autofocus": {
                    "title": "autofocus",
                    "description": "The HTML element ID of a form field to autofocus on.",
                    "default": "",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "dataAsArray": {
                    "title": "dataAsArray",
                    "description": "Retrieve the data as an array e.g. [{name: \"INPUT_NAME\", value: \"INPUT_VALUE\"}, ...] instead of an object e.g. {INPUT_NAME: INPUT_VALUE, ...}.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "autocomplete": {
                    "title": "autocomplete",
                    "description": "Setting this to true will enable browser auto-complete or auto-fill for the form.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "html"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "survey-likert"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "questions": {
                    "title": "questions",
                    "description": "Array containing one or more objects with parameters for the question(s) that should be shown on the page.",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "properties": {
                            "prompt": {
                              "title": "prompt",
                              "description": "Question prompt.",
                              "anyOf": [
                                {
                                  "format": "html",
                                  "type": "string"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "labels": {
                              "title": "labels",
                              "description": "Array of likert labels to display for this question.",
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "required": {
                              "title": "required",
                              "description": "Whether or not a response to this question must be given in order to continue.",
                              "default": false,
                              "anyOf": [
                                {
                                  "type": "boolean"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "name": {
                              "title": "name",
                              "description": "Name of the question in the trial data. If no name is given, the questions are named Q0, Q1, etc.",
                              "default": "",
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "default_response": {
                              "title": "default response",
                              "description": "Default response value for this question (0-based index of labels array).",
                              "default": null,
                              "anyOf": [
                                {
                                  "type": "integer"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "prompt",
                            "labels"
                          ]
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "randomize_question_order": {
                    "title": "randomize question order",
                    "description": "If true, the order of the questions in the 'questions' array will be randomized.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "preamble": {
                    "title": "preamble",
                    "description": "HTML-formatted string to display at top of the page above all of the questions.",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "scale_width": {
                    "title": "scale width",
                    "description": "Width of the likert scales in pixels.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "button_label": {
                    "title": "button label",
                    "description": "Label of the button to submit responses.",
                    "default": "Continue",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "autocomplete": {
                    "title": "autocomplete",
                    "description": "Setting this to true will enable browser auto-complete or auto-fill for the form.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "questions"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "survey-multi-choice"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "questions": {
                    "title": "questions",
                    "description": "An array of objects, each object represents a question that appears on the screen. Each object contains a prompt, options, required, and horizontal parameter that will be applied to the question. See examples below for further clarification.`prompt`: Type string, default value is *undefined*. The string is prompt/question that will be associated with a group of options (radio buttons). All questions will get presented on the same page (trial). `options`: Type array, defualt value is *undefined*. An array of strings. The array contains a set of options to display for an individual question.`required`: Type boolean, default value is null. The boolean value indicates if a question is required('true') or not ('false'), using the HTML5 `required` attribute. If this parameter is undefined, the question will be optional. `horizontal`:Type boolean, default value is false. If true, then the question is centered and the options are displayed horizontally. `name`: Name of the question. Used for storing data. If left undefined then default names (`Q0`, `Q1`, `...`) will be used for the questions.",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "properties": {
                            "prompt": {
                              "title": "prompt",
                              "description": "Question prompt.",
                              "anyOf": [
                                {
                                  "format": "html",
                                  "type": "string"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "options": {
                              "title": "options",
                              "description": "Array of multiple choice options for this question.",
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "required": {
                              "title": "required",
                              "description": "Whether or not a response to this question must be given in order to continue.",
                              "default": false,
                              "anyOf": [
                                {
                                  "type": "boolean"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "horizontal": {
                              "title": "horizontal",
                              "description": "If true, then the question will be centered and options will be displayed horizontally.",
                              "default": false,
                              "anyOf": [
                                {
                                  "type": "boolean"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "name": {
                              "title": "name",
                              "description": "Name of the question in the trial data. If no name is given, the questions are named Q0, Q1, etc.",
                              "default": "",
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            }
                          },
                          "required": [
                            "prompt",
                            "options"
                          ]
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "randomize_question_order": {
                    "title": "randomize question order",
                    "description": "If true, the display order of `questions` is randomly determined at the start of the trial. In the data object, `Q0` will still refer to the first question in the array, regardless of where it was presented visually.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "preamble": {
                    "title": "preamble",
                    "description": "HTML formatted string to display at the top of the page above all the questions.",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "button_label": {
                    "title": "button label",
                    "description": "Label of the button.",
                    "default": "Continue",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "autocomplete": {
                    "title": "autocomplete",
                    "description": "This determines whether or not all of the input elements on the page should allow autocomplete. Setting this to true will enable autocomplete or auto-fill for the form.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "questions"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "survey-multi-select"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "questions": {
                    "title": "questions",
                    "description": "An array of objects, each object represents a question that appears on the screen. Each object contains a prompt, options, required, and horizontal parameter that will be applied to the question. See examples below for further clarification.`prompt`: Type string, default value is *undefined*. The string is prompt/question that will be associated with a group of options (radio buttons). All questions will get presented on the same page (trial). `options`: Type array, defualt value is *undefined*. An array of strings. The array contains a set of options to display for an individual question.`required`: Type boolean, default value is null. The boolean value indicates if a question is required('true') or not ('false'), using the HTML5 `required` attribute. If this parameter is undefined, the question will be optional. `horizontal`:Type boolean, default value is false. If true, then the question is centered and the options are displayed horizontally. `name`: Name of the question. Used for storing data. If left undefined then default names (`Q0`, `Q1`, `...`) will be used for the questions.",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "properties": {
                            "prompt": {
                              "title": "prompt",
                              "description": "Question prompt.",
                              "anyOf": [
                                {
                                  "format": "html",
                                  "type": "string"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "options": {
                              "title": "options",
                              "description": "Array of multiple select options for this question.",
                              "anyOf": [
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "horizontal": {
                              "title": "horizontal",
                              "description": "If true, then the question will be centered and options will be displayed horizontally.",
                              "default": false,
                              "anyOf": [
                                {
                                  "type": "boolean"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "required": {
                              "title": "required",
                              "description": "Whether or not a response to this question must be given in order to continue.",
                              "default": false,
                              "anyOf": [
                                {
                                  "type": "boolean"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "name": {
                              "title": "name",
                              "description": "Name of the question in the trial data. If no name is given, the questions are named Q0, Q1, etc.",
                              "default": "",
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            }
                          },
                          "required": [
                            "prompt",
                            "options"
                          ]
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "randomize_question_order": {
                    "title": "randomize question order",
                    "description": "If true, the display order of `questions` is randomly determined at the start of the trial. In the data object, `Q0` will still refer to the first question in the array, regardless of where it was presented visually.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "preamble": {
                    "title": "preamble",
                    "description": "HTML formatted string to display at the top of the page above all the questions.",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "button_label": {
                    "title": "button label",
                    "description": "Label of the button to submit responses.",
                    "default": "Continue",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "required_message": {
                    "title": "required message",
                    "description": "'You must choose at least one response for this question' | Message to display if required response is not given.",
                    "default": "You must choose at least one response for this question",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "autocomplete": {
                    "title": "autocomplete",
                    "description": "This determines whether or not all of the input elements on the page should allow autocomplete. Setting this to true will enable autocomplete or auto-fill for the form.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "questions"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "survey-text"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "questions": {
                    "title": "questions",
                    "description": "An array of objects, each object represents a question that appears on the screen. Each object contains a prompt, options, required, and horizontal parameter that will be applied to the question. See examples below for further clarification.`prompt`: Type string, default value is *undefined*. The string is prompt/question that will be associated with a group of options (radio buttons). All questions will get presented on the same page (trial). `options`: Type array, defualt value is *undefined*. An array of strings. The array contains a set of options to display for an individual question.`required`: Type boolean, default value is null. The boolean value indicates if a question is required('true') or not ('false'), using the HTML5 `required` attribute. If this parameter is undefined, the question will be optional. `horizontal`:Type boolean, default value is false. If true, then the question is centered and the options are displayed horizontally. `name`: Name of the question. Used for storing data. If left undefined then default names (`Q0`, `Q1`, `...`) will be used for the questions.",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "properties": {
                            "prompt": {
                              "title": "prompt",
                              "description": "Question prompt.",
                              "anyOf": [
                                {
                                  "format": "html",
                                  "type": "string"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "placeholder": {
                              "title": "placeholder",
                              "description": "Placeholder text in the response text box.",
                              "default": "",
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "rows": {
                              "title": "rows",
                              "description": "The number of rows for the response text box.",
                              "default": 1,
                              "anyOf": [
                                {
                                  "type": "integer"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "columns": {
                              "title": "columns",
                              "description": "The number of columns for the response text box.",
                              "default": 40,
                              "anyOf": [
                                {
                                  "type": "integer"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "required": {
                              "title": "required",
                              "description": "Whether or not a response to this question must be given in order to continue.",
                              "default": false,
                              "anyOf": [
                                {
                                  "type": "boolean"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            },
                            "name": {
                              "title": "name",
                              "description": "Name of the question in the trial data. If no name is given, the questions are named Q0, Q1, etc.",
                              "default": "",
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "$ref": "#/definitions/variableReference"
                                },
                                {
                                  "$ref": "#/definitions/code"
                                }
                              ]
                            }
                          },
                          "required": [
                            "prompt"
                          ]
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "randomize_question_order": {
                    "title": "randomize question order",
                    "description": "If true, the display order of `questions` is randomly determined at the start of the trial. In the data object, `Q0` will still refer to the first question in the array, regardless of where it was presented visually.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "preamble": {
                    "title": "preamble",
                    "description": "HTML formatted string to display at the top of the page above all the questions.",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "button_label": {
                    "title": "button label",
                    "description": "Label of the button to submit responses.",
                    "default": "Continue",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "autocomplete": {
                    "title": "autocomplete",
                    "description": "Setting this to true will enable browser auto-complete or auto-fill for the form.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "questions"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "video-button-response"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "stimulus": {
                    "title": "stimulus",
                    "description": "An array of file paths to the video. You can specify multiple formats of the same video (e.g., .mp4, .ogg, .webm) to maximize the [cross-browser compatibility](https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats). Usually .mp4 is a safe cross-browser option. The plugin does not reliably support .mov files. The player will use the first source file in the array that is compatible with the browser, so specify the files in order of preference.",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "format": "asset-video",
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "choices": {
                    "title": "choices",
                    "description": "Labels for the buttons. Each different string in the array will generate a different button.",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "button_html": {
                    "title": "button html",
                    "description": "A function that generates the HTML for each button in the `choices` array. The function gets the string and index of the item in the `choices` array and should return valid HTML. If you want to use different markup for each button, you can do that by using a conditional on either parameter. The default parameter returns a button element with the text label of the choice.",
                    "examples": [
                      {
                        "code": "function(choice, choice_index) {\n  return `<button class=\"jspsych-btn\">${choice}</button>`;\n}"
                      }
                    ],
                    "anyOf": [
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "prompt": {
                    "title": "prompt",
                    "description": "This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press).",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "width": {
                    "title": "width",
                    "description": "The width of the video display in pixels. If `null`, the video will take the original video's dimensions, or properly scaled with the aspect ratio if the height is also specified.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "height": {
                    "title": "height",
                    "description": "The height of the video display in pixels. If `null`, the video will take the original video's dimensions, or properly scaled with the aspect ratio if the width is also specified.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "autoplay": {
                    "title": "Autoplay",
                    "description": "If true, the video will begin playing as soon as it has loaded.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "controls": {
                    "title": "controls",
                    "description": "If true, controls for the video player will be available to the participant. They will be able to pause the video or move the playback to any point in the video.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "start": {
                    "title": "start",
                    "description": "Time to start the clip. If `null` (default), video will start at the beginning of the file.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "stop": {
                    "title": "stop",
                    "description": "Time to stop the clip. If `null` (default), video will stop at the end of the file.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "rate": {
                    "title": "rate",
                    "description": "The playback rate of the video. 1 is normal, <1 is slower, >1 is faster.",
                    "default": 1,
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "trial_ends_after_video": {
                    "title": "trial ends after video",
                    "description": "If true, the trial will end immediately after the video finishes playing.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "trial_duration": {
                    "title": "trial duration",
                    "description": "How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, then the trial will wait for a response indefinitely.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "button_layout": {
                    "title": "button layout",
                    "description": "Setting to `'grid'` will make the container element have the CSS property `display: grid` and enable the use of `grid_rows` and `grid_columns`. Setting to `'flex'` will make the container element have the CSS property `display: flex`. You can customize how the buttons are laid out by adding inline CSS in the `button_html` parameter.",
                    "default": "grid",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "grid_rows": {
                    "title": "grid rows",
                    "description": "The number of rows in the button grid. Only applicable when `button_layout` is set to `'grid'`. If null, the number of rows will be determined automatically based on the number of buttons and the number of columns.",
                    "default": 1,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "grid_columns": {
                    "title": "grid columns",
                    "description": "The number of grid columns when `button_layout` is \"grid\". Setting to `null` (default value) will infer the number of columns based on the number of rows and buttons.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "response_ends_trial": {
                    "title": "response ends trial",
                    "description": "If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the participant to view a stimulus for a fixed amount of time, even if they respond before the time is complete.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "response_allowed_while_playing": {
                    "title": "response allowed while playing",
                    "description": "If true, then responses are allowed while the video is playing. If false, then the video must finish playing before the button choices are enabled and a response is accepted. Once the video has played all the way through, the buttons are enabled and a response is allowed (including while the video is being re-played via on-screen playback controls).",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "enable_button_after": {
                    "title": "enable button after",
                    "description": "How long the button will delay enabling in milliseconds. If `response_allowed_while_playing` is `true`, the timer will start immediately. If it is `false`, the timer will start at the end of the video.",
                    "default": 0,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "stimulus",
                  "choices"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "video-keyboard-response"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "stimulus": {
                    "title": "Video",
                    "description": "Array of the video file(s) to play. Video can be provided in multiple file formats for better cross-browser support.",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "format": "asset-video",
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "choices": {
                    "title": "Choices",
                    "description": "Array containing the key(s) the subject is allowed to press to respond to the stimulus.",
                    "default": "ALL_KEYS",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "format": "keyboard-key",
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "enum": [
                          "ALL_KEYS",
                          "NO_KEYS"
                        ]
                      }
                    ]
                  },
                  "prompt": {
                    "title": "Prompt",
                    "description": "Any content here will be displayed below the stimulus.",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "width": {
                    "title": "Width",
                    "description": "The width of the video display in pixels. If `null`, the video will take the original video's dimensions, or properly scaled with the aspect ratio if the height is also specified.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "height": {
                    "title": "Height",
                    "description": "The height of the video display in pixels. If `null`, the video will take the original video's dimensions, or properly scaled with the aspect ratio if the width is also specified.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "autoplay": {
                    "title": "Autoplay",
                    "description": "If true, the video will begin playing as soon as it has loaded.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "controls": {
                    "title": "Controls",
                    "description": "If true, the subject will be able to pause the video or move the playback to any point in the video.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "start": {
                    "title": "Start",
                    "description": "Time to start the clip. If null (default), video will start at the beginning of the file.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "stop": {
                    "title": "Stop",
                    "description": "Time to stop the clip. If null (default), video will stop at the end of the file.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "rate": {
                    "title": "Rate",
                    "description": "The playback rate of the video. 1 is normal, <1 is slower, >1 is faster.",
                    "default": 1,
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "trial_ends_after_video": {
                    "title": "End trial after video finishes",
                    "description": "If true, the trial will end immediately after the video finishes playing.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "trial_duration": {
                    "title": "Trial duration",
                    "description": "How long to show trial before it ends.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "response_ends_trial": {
                    "title": "Response ends trial",
                    "description": "If true, the trial will end when subject makes a response.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "response_allowed_while_playing": {
                    "title": "Response allowed while playing",
                    "description": "If true, then responses are allowed while the video is playing. If false, then the video must finish playing before a response is accepted.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "wait_for_key_release": {
                    "title": "wait for key release",
                    "description": "If true, the response is not registered until the participant releases the key. The response time (`rt`) still reflects when the key was pressed, and the additional data field `rt_key_duration` records how long the key was held down. Note that when this is true, the trial cannot end until the key is released: with `response_ends_trial: true` the trial ends at the key release, and if the trial ends for another reason (e.g., `trial_duration`) while the key is still held, no response is recorded for the trial.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "stimulus"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "video-slider-response"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "stimulus": {
                    "title": "stimulus",
                    "description": "An array of file paths to the video. You can specify multiple formats of the same video (e.g., .mp4, .ogg, .webm) to maximize the [cross-browser compatibility](https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats). Usually .mp4 is a safe cross-browser option. The plugin does not reliably support .mov files. The player will use the first source file in the array that is compatible with the browser, so specify the files in order of preference.",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "format": "asset-video",
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "prompt": {
                    "title": "prompt",
                    "description": "This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press).",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "width": {
                    "title": "width",
                    "description": "The width of the video display in pixels. If `null`, the video will take the original video's dimensions, or properly scaled with the aspect ratio if the height is also specified.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "height": {
                    "title": "height",
                    "description": "The height of the video display in pixels. If `null`, the video will take the original video's dimensions, or properly scaled with the aspect ratio if the width is also specified.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "autoplay": {
                    "title": "autoplay",
                    "description": "If true, the video will begin playing as soon as it has loaded.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "controls": {
                    "title": "controls",
                    "description": "If true, controls for the video player will be available to the participant. They will be able to pause the video or move the playback to any point in the video.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "start": {
                    "title": "start",
                    "description": "Time to start the clip. If null (default), video will start at the beginning of the file.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "stop": {
                    "title": "stop",
                    "description": "Time to stop the clip. If null (default), video will stop at the end of the file.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "rate": {
                    "title": "rate",
                    "description": "The playback rate of the video. 1 is normal, <1 is slower, >1 is faster.",
                    "default": 1,
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "min": {
                    "title": "min",
                    "description": "Sets the minimum value of the slider.",
                    "default": 0,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "max": {
                    "title": "max",
                    "description": "Sets the maximum value of the slider.",
                    "default": 100,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "slider_start": {
                    "title": "slider start",
                    "description": "Sets the starting value of the slider.",
                    "default": 50,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "step": {
                    "title": "step",
                    "description": "Sets the step of the slider. This is the smallest amount by which the slider can change.",
                    "default": 1,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "labels": {
                    "title": "labels",
                    "description": "Labels displayed at equidistant locations on the slider. For example, two labels will be placed at the ends of the slider. Three labels would place two at the ends and one in the middle. Four will place two at the ends, and the other two will be at 33% and 67% of the slider width.",
                    "default": [],
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "format": "html",
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "slider_width": {
                    "title": "slider width",
                    "description": "Set the width of the slider in pixels. If left null, then the width will be equal to the widest element in the display.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "button_label": {
                    "title": "button label",
                    "description": "Label of the button to end the trial.",
                    "default": "Continue",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "require_movement": {
                    "title": "require movement",
                    "description": "If true, the participant must move the slider before clicking the continue button.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "trial_ends_after_video": {
                    "title": "trial ends after video",
                    "description": "If true, the trial will end immediately after the video finishes playing.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "trial_duration": {
                    "title": "trial duration",
                    "description": "How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, then the trial will wait for a response indefinitely.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "response_ends_trial": {
                    "title": "response ends trial",
                    "description": "If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the participant to view a stimulus for a fixed amount of time, even if they respond before the time is complete.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "response_allowed_while_playing": {
                    "title": "response allowed while playing",
                    "description": "If true, then responses are allowed while the video is playing. If false, then the video must finish playing before the slider is enabled and the trial can end via the next button click. Once the video has played all the way through, the slider is enabled and a response is allowed (including while the video is being re-played via on-screen playback controls).",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "stimulus"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "virtual-chinrest"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "resize_units": {
                    "title": "resize units",
                    "description": "Units to resize the jsPsych content to after the trial is over: `\"none\"` `\"cm\"` `\"inch\"` or `\"deg\"`. If `\"none\"`, no resizing will be done to the jsPsych content after the virtual-chinrest trial ends.",
                    "default": "none",
                    "anyOf": [
                      {
                        "enum": [
                          "none",
                          "cm",
                          "inch",
                          "deg"
                        ],
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "pixels_per_unit": {
                    "title": "pixels per unit",
                    "description": "After the scaling factor is applied, this many pixels will equal one unit of measurement, where the units are indicated by `resize_units`. This is only used when resizing is done after the trial ends (i.e. the `resize_units` parameter is not \"none\").",
                    "default": 100,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "adjustment_prompt": {
                    "title": "adjustment prompt",
                    "description": "This string can contain HTML markup. Any content here will be displayed **below the card stimulus** during the resizing phase.",
                    "default": "\n          <div style=\"text-align: left;\">\n          <p>Click and drag the lower right corner of the image until it is the same size as a credit card held up to the screen.</p>\n          <p>You can use any card that is the same size as a credit card, like a membership card or driver's license.</p>\n          <p>If you do not have access to a real card you can use a ruler to measure the image width to 3.37 inches or 85.6 mm.</p>\n          </div>",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "adjustment_button_prompt": {
                    "title": "adjustment button prompt",
                    "description": "Content of the button displayed below the card stimulus during the resizing phase.",
                    "default": "Click here when the image is the correct size",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "item_path": {
                    "title": "item path",
                    "description": "Path of the item to be presented in the card stimulus during the resizing phase. If `null` then no image is shown, and a solid color background is used instead. _An example image is available in `/examples/img/card.png`_",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "asset-image",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "item_height_mm": {
                    "title": "item height mm",
                    "description": "The known height of the physical item (e.g. credit card) to be measured, in mm.",
                    "default": 53.98,
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "item_width_mm": {
                    "title": "item width mm",
                    "description": "The known width of the physical item (e.g. credit card) to be measured, in mm.",
                    "default": 85.6,
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "item_init_size": {
                    "title": "item init size",
                    "description": "The initial size of the card stimulus, in pixels, along its largest dimension.",
                    "default": 250,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "blindspot_reps": {
                    "title": "blindspot reps",
                    "description": "How many times to measure the blindspot location. If `0`, blindspot will not be detected, and viewing distance and degree data will not be computed.",
                    "default": 5,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "blindspot_prompt": {
                    "title": "Blindspot prompt",
                    "description": "This string can contain HTML markup. Any content here will be displayed **above the blindspot task**.",
                    "default": "\n          <p>Now we will quickly measure how far away you are sitting.</p>\n          <div style=\"text-align: left\">\n            <ol>\n              <li>Put your left hand on the <b>space bar</b>.</li>\n              <li>Cover your right eye with your right hand.</li>\n              <li>Using your left eye, focus on the black square. Keep your focus on the black square.</li>\n              <li>The <span style=\"color: red; font-weight: bold;\">red ball</span> will disappear as it moves from right to left. Press the space bar as soon as the ball disappears.</li>\n            </ol>\n          </div>\n          <p>Press the space bar when you are ready to begin.</p>\n          ",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "blindspot_measurements_prompt": {
                    "title": "blindspot measurements prompt",
                    "description": "Content of the start button for the blindspot tasks. */ /** Text accompanying the remaining measurements counter that appears below the blindspot task.",
                    "default": "Remaining measurements: ",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "viewing_distance_report": {
                    "title": "viewing distance report",
                    "description": "Estimated viewing distance data displayed after blindspot task. If `\"none\"` is given, viewing distance will not be reported to the participant. The HTML `span` element with `id = distance-estimate` returns the distance.",
                    "default": "<p>Based on your responses, you are sitting about <span id='distance-estimate' style='font-weight: bold;'></span> from the screen.</p><p>Does that seem about right?</p>",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "redo_measurement_button_label": {
                    "title": "redo measurement button label",
                    "description": "Text for the button on the viewing distance report page to re-do the viewing distance estimate. If the participant click this button, the blindspot task starts again.",
                    "default": "No, that is not close. Try again.",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "blindspot_done_prompt": {
                    "title": "blindspot done prompt",
                    "description": "Text for the button on the viewing distance report page that can be clicked to accept the viewing distance estimate.",
                    "default": "Yes",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "visual-search-circle"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "target": {
                    "title": "target",
                    "description": "Path to image file that is the search target. This parameter must specified when the stimuli set is defined using the `target`, `foil` and `set_size` parameters, but should NOT be specified when using the `stimuli` parameter.",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "asset-image",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "foil": {
                    "title": "foil",
                    "description": "Path to image file that is the foil/distractor. This image will be repeated for all distractors up to the `set_size` value. This parameter must specified when the stimuli set is defined using the `target`, `foil` and `set_size` parameters, but should NOT be specified when using the `stimuli` parameter.",
                    "default": null,
                    "anyOf": [
                      {
                        "format": "asset-image",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "set_size": {
                    "title": "set size",
                    "description": "How many items should be displayed, including the target when `target_present` is `true`. The foil image will be repeated up to this value when `target_present` is `false`, or up to `set_size - 1` when `target_present` is `true`. This parameter must specified when using the `target`, `foil` and `set_size` parameters to define the stimuli set, but should NOT be specified when using the `stimuli` parameter.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "stimuli": {
                    "title": "stimuli",
                    "description": "Array containing all of the image files to be displayed. This parameter must be specified when NOT using the `target`, `foil`, and `set_size` parameters to define the stimuli set.",
                    "default": [],
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "format": "asset-image",
                          "type": "string"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "target_present": {
                    "title": "target present",
                    "description": "Is the target present? This parameter must always be specified. When using the `target`, `foil` and `set_size` parameters, `false` means that the foil image will be repeated up to the set_size, and `true` means that the target will be presented along with the foil image repeated up to set_size - 1. When using the `stimuli` parameter, this parameter is only used to determine the response accuracy.",
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "fixation_image": {
                    "title": "fixation image",
                    "description": "Path to image file that is a fixation target. This parameter must always be specified.",
                    "anyOf": [
                      {
                        "format": "asset-image",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "target_size": {
                    "title": "target size",
                    "description": "Two element array indicating the height and width of the search array element images.",
                    "default": [
                      50,
                      50
                    ],
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "integer"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "fixation_size": {
                    "title": "fixation size",
                    "description": "Two element array indicating the height and width of the fixation image.",
                    "default": [
                      16,
                      16
                    ],
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "integer"
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "circle_diameter": {
                    "title": "circle diameter",
                    "description": "The diameter of the search array circle in pixels.",
                    "default": 250,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "target_present_key": {
                    "title": "target present key",
                    "description": "The key to press if the target is present in the search array.",
                    "default": "j",
                    "anyOf": [
                      {
                        "format": "keyboard-key",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "target_absent_key": {
                    "title": "target absent key",
                    "description": "The key to press if the target is not present in the search array.",
                    "default": "f",
                    "anyOf": [
                      {
                        "format": "keyboard-key",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "trial_duration": {
                    "title": "trial duration",
                    "description": "The maximum amount of time the participant is allowed to search before the trial will continue. A value of null will allow the participant to search indefinitely.",
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "fixation_duration": {
                    "title": "fixation duration",
                    "description": "How long to show the fixation image for before the search array (in milliseconds).",
                    "default": 1000,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "randomize_item_locations": {
                    "title": "Randomize item locations",
                    "description": "Whether to use randomized locations on the circle for the items. If `false`, then the first item will always show at the location specified by `location_first_item`.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "location_first_item": {
                    "title": "Location first item",
                    "description": "If `randomize_item_locations` is `false`, the location of the first item on the circle, in degrees. 0 degrees is above the fixation, and moving clockwise in the positive direction.",
                    "default": 0,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "response_ends_trial": {
                    "title": "response ends trial",
                    "description": "If true, the trial will end when the participant makes a response.",
                    "default": true,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [
                  "target_present",
                  "fixation_image"
                ],
                "additionalProperties": false
              }
            },
            "not": {
              "title": "This step scores its answers itself.",
              "required": [
                "score"
              ]
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "webgazer-calibrate"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "calibration_points": {
                    "title": "calibration points",
                    "description": "Array of points in `[x,y]` coordinates. Specified as a percentage of the screen width and height, from the left and top edge. The default grid is 9 points.",
                    "default": [
                      [
                        10,
                        10
                      ],
                      [
                        10,
                        50
                      ],
                      [
                        10,
                        90
                      ],
                      [
                        50,
                        10
                      ],
                      [
                        50,
                        50
                      ],
                      [
                        50,
                        90
                      ],
                      [
                        90,
                        10
                      ],
                      [
                        90,
                        50
                      ],
                      [
                        90,
                        90
                      ]
                    ],
                    "anyOf": [
                      {
                        "format": "grid",
                        "type": "array",
                        "items": {
                          "title": "row",
                          "minItems": 2,
                          "maxItems": 2,
                          "type": "array",
                          "items": {
                            "title": "cell",
                            "type": "integer"
                          }
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "calibration_mode": {
                    "title": "calibration mode",
                    "description": "Can specify `click` to have participants click on calibration points or `view` to have participants passively watch calibration points.",
                    "default": "click",
                    "anyOf": [
                      {
                        "enum": [
                          "click",
                          "view"
                        ],
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "point_size": {
                    "title": "point size",
                    "description": "Diameter of the calibration points in pixels.",
                    "default": 20,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "repetitions_per_point": {
                    "title": "repetitions per point",
                    "description": "The number of times to repeat the sequence of calibration points.",
                    "default": 1,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "randomize_calibration_order": {
                    "title": "randomize calibration order",
                    "description": "Whether to randomize the order of the calibration points.",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "time_to_saccade": {
                    "title": "time to saccade",
                    "description": "If `calibration_mode` is set to `view`, then this is the delay before calibrating after showing a point. Gives the participant time to fixate on the new target before assuming that the participant is looking at the target.",
                    "default": 1000,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "time_per_point": {
                    "title": "time per point",
                    "description": "If `calibration_mode` is set to `view`, then this is the length of time to show a point while calibrating. Note that if `click` calibration is used then the point will remain on the screen until clicked.",
                    "default": 1000,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "webgazer-init-camera"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "instructions": {
                    "title": "instructions",
                    "description": "Instructions for the participant to follow.",
                    "default": "\n            <p>Position your head so that the webcam has a good view of your eyes.</p>\n            <p>Center your face in the box and look directly towards the camera.</p>\n            <p>It is important that you try and keep your head reasonably still throughout the experiment, so please take a moment to adjust your setup to be comfortable.</p>\n            <p>When your face is centered in the box and the box is green, you can click to continue.</p>",
                    "anyOf": [
                      {
                        "format": "html",
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "button_text": {
                    "title": "button text",
                    "description": "The text for the button that participants click to end the trial.",
                    "default": "Continue",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [],
                "additionalProperties": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "plugin": {
                "const": "webgazer-validate"
              }
            },
            "required": [
              "plugin"
            ]
          },
          "then": {
            "properties": {
              "params": {
                "type": "object",
                "properties": {
                  "validation_points": {
                    "title": "validation points",
                    "description": "Array of points in [x,y] coordinates",
                    "default": [
                      [
                        10,
                        10
                      ],
                      [
                        10,
                        50
                      ],
                      [
                        10,
                        90
                      ],
                      [
                        50,
                        10
                      ],
                      [
                        50,
                        50
                      ],
                      [
                        50,
                        90
                      ],
                      [
                        90,
                        10
                      ],
                      [
                        90,
                        50
                      ],
                      [
                        90,
                        90
                      ]
                    ],
                    "anyOf": [
                      {
                        "format": "grid",
                        "type": "array",
                        "items": {
                          "title": "row",
                          "minItems": 2,
                          "maxItems": 2,
                          "type": "array",
                          "items": {
                            "title": "cell",
                            "type": "integer"
                          }
                        }
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "validation_point_coordinates": {
                    "title": "validation point coordinates",
                    "description": "Are the validation_points specified as percentages of screen width and height, or the distance in pixels from the center of the screen? Options are 'percent' and 'center-offset-pixels'",
                    "default": "percent",
                    "anyOf": [
                      {
                        "enum": [
                          "percent",
                          "center-offset-pixels"
                        ],
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "roi_radius": {
                    "title": "roi radius",
                    "description": "Tolerance around validation point in pixels",
                    "default": 200,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "randomize_validation_order": {
                    "title": "randomize validation order",
                    "description": "Whether or not to randomize the order of validation points",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "time_to_saccade": {
                    "title": "time to saccade",
                    "description": "Delay before validating after showing a point",
                    "default": 1000,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "validation_duration": {
                    "title": "validation duration",
                    "description": "Length of time to show each point",
                    "default": 2000,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "point_size": {
                    "title": "point size",
                    "description": "Validation point size in pixels",
                    "default": 20,
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "show_validation_data": {
                    "title": "show validation data",
                    "description": "If true, then validation data will be shown on the screen after validation is complete",
                    "default": false,
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "$ref": "#/definitions/variableReference"
                      },
                      {
                        "$ref": "#/definitions/code"
                      }
                    ]
                  },
                  "data": {},
                  "on_finish": {}
                },
                "required": [],
                "additionalProperties": false
              }
            }
          }
        }
      ]
    },
    "block": {
      "title": "Runs its steps once per row of a conditions table.",
      "type": "object",
      "required": [
        "kind",
        "conditions",
        "children"
      ],
      "properties": {
        "kind": {
          "const": "block"
        },
        "conditions": {
          "title": "The name of the conditions table this block runs over.",
          "type": "string"
        },
        "randomize_order": {
          "title": "Shuffle the rows for every participant.",
          "type": "boolean"
        },
        "repetitions": {
          "title": "How many times to go through the whole table.",
          "type": "integer",
          "minimum": 1
        },
        "children": {
          "title": "The steps run for each row.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/node"
          }
        }
      },
      "additionalProperties": false
    },
    "loop": {
      "title": "Repeats its steps while a tagged set of trials stays below an accuracy threshold.",
      "type": "object",
      "required": [
        "kind",
        "repeat_while",
        "children"
      ],
      "properties": {
        "kind": {
          "const": "loop"
        },
        "id": {
          "type": "string"
        },
        "repeat_while": {
          "$ref": "#/definitions/accuracyRule"
        },
        "children": {
          "title": "The steps that repeat.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/node"
          }
        }
      },
      "additionalProperties": false
    },
    "assign": {
      "title": "Splits participants between groups: a between-subjects manipulation.",
      "type": "object",
      "required": [
        "kind",
        "method",
        "groups"
      ],
      "properties": {
        "kind": {
          "const": "assign"
        },
        "method": {
          "title": "How a group is chosen.",
          "description": "`random` decides in the browser; `balanced` asks the data service for the next group, which requires uploading data with an experiment id.",
          "enum": [
            "random",
            "balanced"
          ]
        },
        "record_as": {
          "title": "Column name the chosen group is recorded under.",
          "type": "string",
          "not": {
            "enum": [
              "ending",
              "checkpoint"
            ]
          }
        },
        "groups": {
          "title": "The groups participants are split between.",
          "type": "array",
          "minItems": 2,
          "items": {
            "type": "object",
            "required": [
              "name",
              "children"
            ],
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1
              },
              "children": {
                "title": "The group's steps.",
                "type": "array",
                "items": {
                  "$ref": "#/definitions/node"
                }
              }
            },
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    },
    "counterbalance": {
      "title": "Runs every task for every participant, in an order that varies between participants.",
      "type": "object",
      "required": [
        "kind",
        "method",
        "tasks"
      ],
      "properties": {
        "kind": {
          "const": "counterbalance"
        },
        "method": {
          "title": "How each participant's order is chosen.",
          "description": "`random` shuffles the tasks in the browser; `latin_square` asks the data service for the participant's row of a balanced Latin square, which requires uploading data with an experiment id. With data downloaded, only `random` is available.",
          "enum": [
            "random",
            "latin_square"
          ]
        },
        "record_as": {
          "title": "Column name the order used is recorded under, as \"first > second\".",
          "type": "string"
        },
        "tasks": {
          "title": "The tasks whose order is counterbalanced.",
          "type": "array",
          "minItems": 2,
          "items": {
            "type": "object",
            "required": [
              "name",
              "children"
            ],
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1
              },
              "children": {
                "title": "The task's steps.",
                "type": "array",
                "items": {
                  "$ref": "#/definitions/node"
                }
              }
            },
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    },
    "branch": {
      "title": "Sends a participant down one of two paths depending on how they did or what they answered.",
      "type": "object",
      "required": [
        "kind",
        "when",
        "then"
      ],
      "properties": {
        "kind": {
          "const": "branch"
        },
        "when": {
          "oneOf": [
            {
              "$ref": "#/definitions/accuracyRule"
            },
            {
              "$ref": "#/definitions/responseRule"
            }
          ]
        },
        "then": {
          "title": "Steps run when the rule holds.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/node"
          }
        },
        "otherwise": {
          "title": "Steps run when it does not.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/node"
          }
        }
      },
      "additionalProperties": false
    },
    "checkpoint": {
      "title": "Records that a participant reached a point in the study, for drop-out analysis.",
      "type": "object",
      "required": [
        "kind",
        "name"
      ],
      "properties": {
        "kind": {
          "const": "checkpoint"
        },
        "name": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "end": {
      "title": "Ends the study here, the way one of the recruitment endings says, after saving the data.",
      "type": "object",
      "required": [
        "kind",
        "ending"
      ],
      "properties": {
        "kind": {
          "const": "end"
        },
        "ending": {
          "title": "The name of an ending in `recruitment.endings`, such as `no_consent`.",
          "type": "string",
          "pattern": "^[A-Za-z][A-Za-z0-9_-]*$"
        }
      },
      "additionalProperties": false
    },
    "variableReference": {
      "title": "A value read from a column of the enclosing conditions table.",
      "type": "object",
      "required": [
        "var"
      ],
      "properties": {
        "var": {
          "title": "The column name.",
          "type": "string"
        },
        "wrap": {
          "title": "Markup the column's value is placed inside, with the value where `%s` is.",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "code": {
      "title": "JavaScript the author wrote: the function itself for a parameter that takes one, or an expression worked out when the trial starts. `jsPsych` is in scope.",
      "type": "object",
      "required": [
        "code"
      ],
      "properties": {
        "code": {
          "title": "A single JavaScript expression.",
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "parameterValue": {
      "anyOf": [
        {
          "$ref": "#/definitions/variableReference"
        },
        {
          "type": [
            "string",
            "number",
            "boolean",
            "null"
          ]
        },
        {
          "type": "array"
        }
      ]
    },
    "scoringRule": {
      "title": "What counts as a correct response on this trial.",
      "type": "object",
      "required": [
        "correct_if_response_equals"
      ],
      "properties": {
        "correct_if_response_equals": {
          "anyOf": [
            {
              "$ref": "#/definitions/variableReference"
            },
            {
              "type": [
                "string",
                "number"
              ]
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "accuracyRule": {
      "title": "A threshold applied to the trials carrying one tag.",
      "type": "object",
      "required": [
        "scope"
      ],
      "properties": {
        "scope": {
          "title": "The tag whose trials are measured.",
          "type": "string",
          "minLength": 1
        },
        "accuracy_below": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "accuracy_at_least": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      },
      "additionalProperties": false,
      "not": {
        "title": "A rule compares accuracy one way, not both at once.",
        "required": [
          "accuracy_below",
          "accuracy_at_least"
        ]
      }
    },
    "responseRule": {
      "title": "Holds when the latest answer on the trials carrying one tag matches.",
      "type": "object",
      "required": [
        "scope",
        "response_equals"
      ],
      "properties": {
        "scope": {
          "title": "The tag whose most recent trial is read.",
          "type": "string",
          "minLength": 1
        },
        "response_equals": {
          "title": "The answer looked for, compared as text: `1` matches the second button.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": [
                "number",
                "boolean"
              ]
            }
          ]
        },
        "question": {
          "title": "The question to read when a trial asks several, as a survey does.",
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "experimentSettings": {
      "title": "Settings that apply to the whole experiment rather than to one step.",
      "type": "object",
      "properties": {
        "default_iti": {
          "title": "Gap in milliseconds after every trial, unless a step sets its own.",
          "type": "number",
          "minimum": 0
        },
        "minimum_valid_rt": {
          "title": "Responses faster than this are ignored, in milliseconds.",
          "type": "number",
          "minimum": 0
        },
        "show_progress_bar": {
          "type": "boolean"
        },
        "progress_bar_message": {
          "type": "string"
        },
        "background_color": {
          "title": "What the participant's screen looks like behind the stimulus.",
          "type": "string",
          "pattern": "^(#[0-9a-fA-F]{3,8}|[a-zA-Z]+|(rgb|rgba|hsl|hsla)\\([0-9.,%\\s/deg]+\\))$"
        },
        "text_color": {
          "type": "string",
          "pattern": "^(#[0-9a-fA-F]{3,8}|[a-zA-Z]+|(rgb|rgba|hsl|hsla)\\([0-9.,%\\s/deg]+\\))$"
        }
      },
      "additionalProperties": false
    },
    "dataSettings": {
      "title": "Where a participant's results go.",
      "type": "object",
      "required": [
        "save"
      ],
      "properties": {
        "save": {
          "title": "`download` saves a CSV on the participant's machine, `post` uploads it.",
          "enum": [
            "download",
            "post"
          ]
        },
        "endpoint": {
          "title": "The address of the DataPipe to upload to, a path prefix allowed; defaults to pipe.jspsych.org. It starts with https://, or http:// only for localhost, and holds no login, ? or #.",
          "type": "string"
        },
        "experiment_id": {
          "title": "The experiment id the endpoint files the data under.",
          "type": "string"
        },
        "filename_prefix": {
          "type": "string"
        },
        "stream": {
          "title": "Also send each step's row to DataPipe as it is recorded.",
          "description": "A participant who leaves partway then still leaves a partial file, which DataPipe keeps. Only for uploaded data, and only when every ending keeps all of it.",
          "type": "boolean"
        },
        "condition_fallback": {
          "title": "What happens when DataPipe cannot hand out a condition.",
          "description": "`stop` (the default) ends the study with a message to the participant. `random` draws a group or task order in the browser instead, which keeps the session running but may leave groups unbalanced. Only for uploaded data.",
          "enum": [
            "stop",
            "random"
          ]
        }
      },
      "additionalProperties": false,
      "allOf": [
        {
          "if": {
            "properties": {
              "save": {
                "const": "post"
              }
            },
            "required": [
              "save"
            ]
          },
          "then": {
            "title": "Uploading needs an experiment id from the service receiving the data.",
            "required": [
              "experiment_id"
            ]
          }
        },
        {
          "if": {
            "properties": {
              "stream": {
                "const": true
              }
            },
            "required": [
              "stream"
            ]
          },
          "then": {
            "title": "Saving data as it goes needs it uploaded to DataPipe.",
            "properties": {
              "save": {
                "const": "post"
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "condition_fallback"
            ]
          },
          "then": {
            "title": "What to do when no condition comes back needs data uploaded to DataPipe.",
            "properties": {
              "save": {
                "const": "post"
              }
            }
          }
        }
      ]
    },
    "recruitmentSettings": {
      "title": "How the study meets the platform participants are recruited from.",
      "type": "object",
      "properties": {
        "platform": {
          "enum": [
            "prolific",
            "sona",
            "connect",
            "custom"
          ]
        },
        "id_param": {
          "title": "The URL parameter the platform passes the participant's id in.",
          "type": "string",
          "minLength": 1
        },
        "endings": {
          "title": "What happens when the study ends each way it can.",
          "description": "`complete` is how the study ends once every step has run; any other ending is reached through an `end` step, such as `no_consent` for a participant who declines.",
          "type": "object",
          "propertyNames": {
            "pattern": "^[A-Za-z][A-Za-z0-9_-]*$"
          },
          "properties": {
            "complete": {
              "allOf": [
                {
                  "$ref": "#/definitions/ending"
                },
                {
                  "title": "A completed study keeps all its data.",
                  "properties": {
                    "keep": {
                      "const": "all"
                    }
                  }
                }
              ]
            }
          },
          "additionalProperties": {
            "$ref": "#/definitions/ending"
          }
        }
      },
      "additionalProperties": false
    },
    "ending": {
      "title": "Where the participant goes, or what they are shown, once their data is saved.",
      "type": "object",
      "properties": {
        "url": {
          "title": "The platform's return URL; `{participant_id}` is replaced with the id.",
          "type": "string",
          "pattern": "^https://"
        },
        "message": {
          "title": "Shown to the participant, who stays on the page, instead of a return URL.",
          "type": "string",
          "pattern": "\\S"
        },
        "keep": {
          "title": "What is saved on reaching this ending.",
          "description": "`all` saves every row, `checkpoint` only the row saying which ending was reached, and `nothing` saves and sends nothing at all. Only an early ending can keep less than `all`.",
          "enum": [
            "all",
            "checkpoint",
            "nothing"
          ],
          "default": "all"
        }
      },
      "additionalProperties": false,
      "oneOf": [
        {
          "required": [
            "url"
          ]
        },
        {
          "required": [
            "message"
          ]
        }
      ]
    },
    "asset": {
      "type": "object",
      "required": [
        "name",
        "url"
      ],
      "properties": {
        "name": {
          "title": "The name the spec refers to this file by, e.g. \"face.png\".",
          "type": "string",
          "minLength": 1
        },
        "url": {
          "title": "A data URL holding the file.",
          "type": "string",
          "pattern": "^data:"
        }
      },
      "additionalProperties": false
    }
  }
}
